# Changelog ## 0.5.2 ### Patch Changes - 66ec988: Remove the `maxHeight`, `buttons`, `buttonsAlignment`, and `form` props from `Modal`. Consumers now compose a modal's content themselves by rendering it as children: - Instead of `buttons`/`buttonsAlignment`, render `Button` components inside the modal and lay them out as needed - Instead of `form`, render a `
` element inside the modal, with the form's fields and buttons inside it - Instead of `maxHeight`, wrap long content in an element with its own `maxHeight` and `overflowY: "auto"`. The modal now grows to fit its content, and its body no longer scrolls on its own - 1577cd9: Add a `dismissible` prop to the `Modal` component. When set to `false`, the user can't dismiss the modal: pressing `Escape` and clicking the backdrop are ignored, and the close button in the header is disabled. This is useful for critical flows, such as while a form is submitting. The modal can still be closed programmatically with `close()`. - 0016e64: Renamed CSS tokens (Tailwind class names are unchanged): - Color tokens now have a `--vesper-color-` prefix (eg. `--vesper-stone-500` is now `--vesper-color-stone-500`, and `--vesper-background-primary` is now `--vesper-color-background-primary`) - `--vesper-stroke-base` and `--vesper-stroke-strong` are replaced by `--vesper-border-width-base` and `--vesper-border-width-strong` for borders, and `--vesper-outline-width-base` and `--vesper-outline-width-strong` for outlines - e9b515f: Adjust `button` component styling to prevent layout shift when toggling between a disabled and non-disabled variant - 0a504ea: Fix bug where `switch` was not animating its background color correctly when flipped on - 2c3f125: Update `Material` to accept `false` and `null` values for its `state` prop. - 15cec00: Update `toggle` styles to allow rendering it at arbitrary widths while having toggle occupy available space - 1bf3f2b: Add a `Table` component, available from `@tenstorrent/vesper/table`. It renders a styled native `` element, and styles any ``, ``, ``, `
`, and `` elements placed inside it. - 226e7e6: Widen the `title` prop type in `Accordion` from `string` to `ReactNode` - a46041e: Add alternate sets of semantic tokens for high contrast mode - 0016e64: Added `withVesper`, a `tailwind-merge` plugin exported from `@tenstorrent/vesper/tailwind-merge`. Pass it to `extendTailwindMerge` (eg. `extendTailwindMerge(withVesper)`) to resolve conflicts between Vesper's Tailwind classes and Tailwind's own classes. `tailwind-merge` (`^3.6.0`) is an optional peer dependency, which you only need to install to use `withVesper`. ## 0.5.1 ### Patch Changes - ed0452c: Removed the `copyOnHover` prop from `CodeBlock`. On devices that support hover, the copy-to-clipboard button is now always hidden until the code block is hovered or the button receives keyboard focus. - ed0452c: Updated the following component styles to match updated designs in Figma: `Admonition`, `Button`, `Checkbox`, `Chip`, `Choicebox`, `Code`, `CodeBlock`, `Combobox`, `IconButton`, `RadioGroup`, `Select`, `Sheet`, `Snippet`, `StatusIndicator`, `Switch`, `Toast`, `Toggle` - ed0452c: Bug fix: clear pending copy-to-clipboard timeouts in `Snippet` and `CodeBlock` when they unmount, and restart the `CodeBlock` copy confirmation timeout when its copy button is clicked again. - ed0452c: Update CSS tokens: - Add a `--vesper-blur` token, along with a matching `blur-vesper` Tailwind utility - Rename `--vesper-text-alpha-disabled` to `--vesper-text-inverse-disabled` (and the `text-vesper-text-alpha-disabled` Tailwind utility to `text-vesper-text-inverse-disabled`) - `--vesper-background-inverse-primary` and `--vesper-background-inverse-secondary` now resolve to opaque `--vesper-stone-900` and `--vesper-stone-800` colors instead of their alpha counterparts - `--vesper-shadow-{100,200,300,400}` tokens now use a neutral black shadow color instead of a teal-tinted one - ed0452c: Applied a backdrop blur (using the new `--vesper-blur` token) to disabled `Button`, `Checkbox`, `Chip`, `Switch`, and `Toggle` components. - ed0452c: Added a `size` prop to `FormInputMessage`, which accepts `"sm"` (default) or `"lg"`. Small messages render with the `label-xxs` typography variant, and large messages render with the `label-xs` typography variant and increased padding. - ed0452c: Added hover states to `TextInput`, `TextArea`, `Checkbox`, and `RadioGroup`. - ed0452c: Added `SliderHorizontal` and `Stop` icons. - ed0452c: Updated `SplitButton`: - Increase the default `menuWidth` from `200` to `280` - The `"subtle"` variant now renders its buttons with `tertiary` `Button` styles - The menu toggle button now has a fixed width for `md` and `lg` sizes, and the action button fills the remaining space - ed0452c: Add a `ThemePersistenceScript` component to the `theme-switcher` module. Render it once in the document's `` to save the active theme to `localStorage` and apply the saved theme before the page is first painted. Themes are kept in sync across browser tabs, and the `localStorage` key can be customized via the `storageKey` prop. - ed0452c: Updated `ThemeSwitcher` and `useTheme`: - `ThemeSwitcher` and `useTheme` now stay in sync with any change to the `data-vesper-theme` attribute on the document root, not just changes made with `useTheme`'s setter function - The active theme is now styled based on the document root's `data-vesper-theme` attribute, so the correct theme displays before hydration - Restyle `ThemeSwitcher` with a transparent background, a filled indicator for the active theme, and a hover state for its buttons - ed0452c: Added two new props to `Tooltip`: - `variant`: either `"contrast"` (default) or `"danger"`, which determines the tooltip's color scheme - `hideArrow`: when `true`, hides the tooltip's arrow and removes the arrow's height from the distance between the tooltip and its trigger - ed0452c: Add new `Typography` variants such that every `copy-*` and `label-*` size now has a `-mono` counterpart. Also adjust the styling of existing variants: `display-*` variants now render with a lighter font weight and `tight` letter spacing, and `label-xs`/`label-xs-bold` now render with `normal` letter spacing. ## 0.5.0 ### Minor Changes - 00ca199: Update `theme-switcher` module to export a new hook, `useTheme`, which exposes the current theme and a setter function to consumers. ### Patch Changes - 256a134: Widens the `message` prop in `form-input-message` to accept `null` and `false` values. ## 0.4.0 ### Minor Changes - c24297b: Convert `Menu` to a polymorphic component. This allows consumers to compose dropdown menus easier with existing Vesper components like `Button`, `IconButton`, and `TextButton` via the `as` prop. - 8c0b47b: Added a new prop to `TabItem`, `contentAsPanel`, that allows consumers to control whether a tab panel's `content` renders as the tab panel itself via prop forwarding. The behavior prior to this change was to _always_ treat a tab's `content` as the panel itself. - 3d90c86: Added a new prop to `Tooltip`, `wrapWithButton`, that allows consumers to control whether a tooltip's trigger renders with a wrapping `