@baseline-ui/mcp 3.5.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.cjs CHANGED
@@ -386,6 +386,26 @@ export function ArabicLocaleLtrOverrideBarChart() {
386
386
  />
387
387
  </I18nProvider>
388
388
  );
389
+ }
390
+
391
+ const manyCategories = Array.from({ length: 40 }, (_, index) => ({
392
+ label: \`C\${index}\`,
393
+ a: 10 + (index % 7),
394
+ b: 5 + (index % 5),
395
+ }));
396
+
397
+ /** Many categories in a narrow chart without a grid. */
398
+ export function ManyCategoriesNoGridBarChart() {
399
+ return (
400
+ <BarChart
401
+ data={manyCategories}
402
+ bars={[{ dataKey: "a" }, { dataKey: "b" }]}
403
+ barSize={32}
404
+ showGrid={false}
405
+ width={480}
406
+ xAxisDataKey="label"
407
+ />
408
+ );
389
409
  }`},similarTo:[],figmaUrl:null},LineChart:{id:"charts-linechart",breadcrumb:"Charts/LineChart",importStatement:`import { Box } from "@baseline-ui/core";
390
410
  import { LineChart } from "@baseline-ui/charts";`,description:"The `LineChart` component renders a responsive line chart for time series or other ordered data. It is built on top of [Recharts](https://recharts.org/) and styled with Baseline UI design tokens so it picks up the active theme automatically.",documentation:'The `LineChart` component renders a responsive line chart for time series or other ordered data. It is built on top of [Recharts](https://recharts.org/) and styled with Baseline UI design tokens so it picks up the active theme automatically.\n\n* Renders one or more lines from a single dataset, keyed by `xAxisDataKey` and the per-line `dataKey`.\n* Themed axes, grid, tooltip, and legend styled with Baseline UI tokens \u2014 adapts to light, dark, and high-contrast themes.\n* Default line colors cycle through theme support colors (`info`, `success`, `warning`, `error`); each line can override with a custom `color`.\n* Toggleable tooltip, legend, grid, and axes for compact or sparkline-style charts.\n* Configurable curve interpolation (`monotone`, `linear`, etc.) and per-line stroke width.\n* Responsive by default \u2014 fills the parent container width while preserving the configured `height`.\n* Built-in keyboard navigation across data points via Recharts\' accessibility layer.\n\n```jsx\nimport { LineChart } from "@baseline-ui/charts";\n\nconst data = [\n { month: "Jan", revenue: 4000, expenses: 2400 },\n { month: "Feb", revenue: 3000, expenses: 1398 },\n { month: "Mar", revenue: 5000, expenses: 3200 },\n];\n\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue" },\n { dataKey: "expenses", name: "Expenses" },\n ]}\n/>;\n```\n\nThe default variant renders a full-width line chart with grid, axes, and tooltip enabled. Use `showLegend` to also render a legend above the chart.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue" },\n { dataKey: "expenses", name: "Expenses" },\n ]}\n showLegend\n/>\n```\n\nSet `variant="sparkline"` for a compact 40\xD720 inline trend indicator. Grid, axes, tooltip, and legend are hidden by default, the stroke is thinner, and chart margins are reduced to a 1px inset (just enough to prevent stroke clipping) so the line fills the box. Each chrome flag can still be re-enabled individually \u2014 for example, `showTooltip` re-enables the tooltip on a sparkline.\n\n```jsx\n<LineChart\n variant="sparkline"\n data={data}\n xAxisDataKey="month"\n lines={[{ dataKey: "revenue" }]}\n/>\n```\n\nPass a single entry in `lines` to render a single-series chart.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[{ dataKey: "revenue", name: "Revenue" }]}\n/>\n```\n\nDefault line colors cycle through `info` \u2192 `success` \u2192 `warning` \u2192 `error` and wrap modulo four. Provide a `color` per line to override the default.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue" },\n { dataKey: "expenses", name: "Expenses" },\n { dataKey: "profit", name: "Profit" },\n { dataKey: "tax", name: "Tax" },\n { dataKey: "fees", name: "Fees" },\n ]}\n showLegend\n/>\n```\n\nSet `dot` to `true` on a line to render a marker at each data point.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue", dot: true },\n { dataKey: "expenses", name: "Expenses", dot: true },\n ]}\n/>\n```\n\nThe `type` prop on each line controls the curve interpolation. The default is `monotone`; use `linear` for straight segments between points. Any [Recharts curve type](https://recharts.org/en-US/api/Line#type) is supported.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue", type: "linear" },\n { dataKey: "expenses", name: "Expenses", type: "linear" },\n ]}\n/>\n```\n\nOverride the default theme colors by passing `color` and `strokeWidth` per line.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue", color: "#7c3aed", strokeWidth: 3 },\n { dataKey: "expenses", name: "Expenses", color: "#f59e0b", strokeWidth: 3 },\n ]}\n showLegend\n/>\n```\n\n`showTooltip`, `showGrid`, `showXAxis`, and `showYAxis` toggle the corresponding chart chrome individually. They default to `true` for the default variant and `false` for the `sparkline` variant. Pass an explicit value to override the variant default.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[...]}\n showXAxis={false}\n showYAxis={false}\n showGrid={false}\n/>\n```\n\nThe chart surface is keyboard-focusable on the default variant. When focused via keyboard, the surface shows a focus ring and arrow keys move an indicator across data points, opening the tooltip at each step. The `sparkline` variant disables the accessibility layer and is not focusable.\n\n| Key | Function |\n| ------------- | --------------------------------------------------------------------------- |\n| `Tab` | Moves focus to the chart surface (default variant only). |\n| `Arrow Right` | Advances the active data point one step to the right and shows the tooltip. |\n| `Arrow Left` | Advances the active data point one step to the left and shows the tooltip. |\n| `Escape` | Dismisses the tooltip and clears the active data point. |\n\nThe `sparkline` variant disables the accessibility layer and is not keyboard-navigable.\n\nLineChart shares its legend, tooltip, and surface markup with every other chart in the package. The `BaselineUI-Chart-*` selectors are stable shared hooks; the kind-specific `BaselineUI-LineChart` class lets you scope styles to line charts only. Internal Recharts class names are not part of the public API.\n\n| Selector | Description |\n| ------------------------------------------------- | ------------------------------------------------------------------- |\n| `.BaselineUI-LineChart` | The line-chart root identifier. |\n| `.BaselineUI-LineChart[data-variant="default"]` | Targets only the default variant. |\n| `.BaselineUI-LineChart[data-variant="sparkline"]` | Targets only the sparkline variant. |\n| `.BaselineUI-Chart-Surface` | The chart drawing area that wraps the SVG. |\n| `.BaselineUI-Chart-Legend` | The legend list element. Only rendered when `showLegend` is `true`. |\n| `.BaselineUI-Chart-LegendItem` | A single legend entry \u2014 one per series. |\n| `.BaselineUI-Chart-LegendSwatch` | The colored swatch in a legend entry. |\n| `.BaselineUI-Chart-Tooltip` | The hover/focus tooltip container. |\n| `.BaselineUI-Chart-TooltipItem` | A single series entry in the tooltip. |\n| `.BaselineUI-Chart-TooltipSwatch` | The colored swatch in a tooltip entry. |',props:`interface LineChartProps {
391
411
  /**
@@ -3097,268 +3117,433 @@ children?: ReactNode
3097
3117
  Nested Box
3098
3118
  </Box>
3099
3119
  </Box>
3100
- );`}],implementation:""},similarTo:[],figmaUrl:null},ButtonSelect:{id:"core-forms-buttonselect",breadcrumb:"Core/Forms/ButtonSelect",importStatement:'import { Box, ButtonSelect, VariantViewer } from "@baseline-ui/core";',description:"`ButtonSelect` pairs a primary action button with an adjacent dropdown trigger that opens a list of options. Use it when a single action has multiple related variants the user can switch between, such as picking the active shape tool from a set.",documentation:'`ButtonSelect` pairs a primary action button with an adjacent dropdown trigger that opens a list of options. Use it when a single action has multiple related variants the user can switch between, such as picking the active shape tool from a set.\n\n* Combines a button (toggle/action) with a select dropdown menu\n* Button can toggle current selection or trigger an action\n* Supports icons, optional labels, and tooltips for better UX\n* Configurable with different sizes, states (disabled/enabled), and behaviors\n* Full keyboard navigation and screen reader support\n* Customizable styling through `optionClassName`, `optionStyle`, `triggerClassName`, and `triggerStyle` props\n* Individual button behaviour per option via `buttonBehaviour` function\n* Validation state support\n\n```jsx\nimport { ButtonSelect } from "@baseline-ui/core";\nimport { EllipseIcon, RectangleIcon, PolygonIcon } from "@baseline-ui/icons/24";\n\nconst items = [\n { id: "ellipse", icon: EllipseIcon, label: "Ellipse" },\n { id: "square", icon: RectangleIcon, label: "Square" },\n { id: "polygon", icon: PolygonIcon, label: "Polygon" },\n];\n\n<ButtonSelect items={items} aria-label="Shape Options" />;\n```\n\nYou can hide the label in the button and just show the icon by setting the `hideLabel` prop to true.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" hideLabel />\n```\n\nBy default, ButtonSelect displays a tooltip on the dropdown trigger. When `hideLabel` is `true`, the main button also receives a tooltip showing the selected item\'s label. You can disable tooltips by setting `tooltipProps` with `isDisabled: true`.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n tooltipProps={{ isDisabled: true }}\n/>\n```\n\nYou can also pass `tooltipProps` as a function to customize tooltips per trigger:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n tooltipProps={(trigger) => ({\n text: trigger === "button" ? "Toggle shape" : "More shapes",\n })}\n/>\n```\n\nYou can set the default selected item in the dropdown by using the `defaultSelectedKey` prop.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n defaultSelectedKey="polygon"\n/>\n```\n\nYou can set the default button selection state using the `defaultSelected` prop.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" defaultSelected={true} />\n```\n\nYou can control the selected item by using the `selectedKey` prop. Use `isSelected` and `onButtonSelectionChange` to control the button toggle state.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n selectedKey={selectedKey}\n onSelectionChange={setSelectedKey}\n isSelected={isSelected}\n onButtonSelectionChange={({ isSelected }) => setIsSelected(isSelected)}\n/>\n```\n\nYou can disable the entire component using the `isDisabled` prop. Use `disabledKeys` to disable individual options in the dropdown.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" isDisabled />\n```\n\nYou can disable specific options in the dropdown using `disabledKeys`. If the currently selected item\'s key is in `disabledKeys`, the main button is also disabled.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n disabledKeys={["square"]}\n/>\n```\n\nBy default, the button uses a `"toggle"` behavior, which means it can be toggled on/off. You can change it to `"action"` behavior, which means it will trigger an action when pressed but won\'t toggle a state.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n buttonBehaviour="action"\n onPress={(e) => console.log("Button pressed", e)}\n/>\n```\n\nYou can also pass `buttonBehaviour` as a function to assign different behaviors per option:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n buttonBehaviour={(activeKey) =>\n activeKey === "ellipse" ? "action" : "toggle"\n }\n/>\n```\n\nButtonSelect provides several callbacks:\n\n* **`onPress`** \u2014 Called when the main button is pressed\n* **`onButtonAction`** \u2014 Called with `{ isSelected, selectedKey, buttonBehaviour }` when the button is pressed\n* **`onButtonSelectionChange`** \u2014 Called with `{ isSelected, selectedKey }` when toggle state changes\n* **`onSelectionChange`** \u2014 Called with the new key when a dropdown option is selected\n* **`onOptionPress`** \u2014 Called with `(pressEvent, key)` when any dropdown option is pressed\n\nUse `validationState` to indicate a validation state. Supported values are `"error"` and `"warning"`.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n validationState="error"\n/>\n```\n\nButtonSelect comes in two sizes: `md` (default) and `lg`.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" size="lg" />\n```\n\nUse `optionClassName`, `optionStyle`, `triggerClassName`, and `triggerStyle` to customize the appearance. These accept either static values or functions for dynamic styling:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n optionClassName={(item, { isButton, isSelected }) =>\n isButton && isSelected ? "active-button" : ""\n }\n optionStyle={(item, { isButton }) => ({\n backgroundColor: isButton ? "lightblue" : undefined,\n })}\n triggerClassName="custom-trigger"\n/>\n```\n\n| Selector | Description |\n| ---------------------------------- | ----------------------------------------------------------- |\n| `.BaselineUI-ButtonSelect` | The root container element. |\n| `.BaselineUI-ButtonSelect-Button` | The main action/toggle button. |\n| `.BaselineUI-ButtonSelect-Trigger` | The dropdown trigger (caret) button. |\n| `.BaselineUI-ButtonSelect-Select` | The select/dropdown wrapper. |\n| `[data-hovered]` | Present when the component is hovered. |\n| `[data-selected]` | Present when the button is in the selected (toggled) state. |\n| `[data-disabled]` | Present when the component is disabled. |\n| `[data-expanded]` | Present when the dropdown is open. |\n| `[data-button-behaviour]` | The current button behaviour (`"toggle"` or `"action"`). |\n\n> **Note:** Boolean data attributes (`data-hovered`, `data-selected`, `data-disabled`, `data-expanded`) are only present in the DOM when `true`.\n\n| Key | Function |\n| ----------- | ------------------------------------------------------------------------ |\n| `Space` | Toggles the button if focused, or activates the selected dropdown option |\n| `Enter` | Toggles the button if focused, or activates the selected dropdown option |\n| `Tab` | Moves focus to the next focusable element |\n| `Shift+Tab` | Moves focus to the previous focusable element |\n| `ArrowDown` | Opens the dropdown if trigger is focused; navigates down within dropdown |\n| `ArrowUp` | Navigates up within the dropdown |\n| `Home` | Moves to the first option in the dropdown |\n| `End` | Moves to the last option in the dropdown |\n| `Escape` | Closes the dropdown if open |\n\n* **Select** \u2014 Use when you only need a dropdown without a primary action button.\n* **ToggleButton** \u2014 Use when you need a standalone toggle button without a dropdown.\n* **ActionButton** \u2014 Use when you need a standalone action button.\n* **ListBox** \u2014 The underlying list component used in the dropdown.',props:`interface ButtonSelectProps {
3120
+ );`}],implementation:""},similarTo:[],figmaUrl:null},Breadcrumbs:{id:"core-navigation-breadcrumbs",breadcrumb:"Core/Navigation/Breadcrumbs",importStatement:'import { ActionIconButton, Breadcrumb, Breadcrumbs, Menu, Select, VariantViewer } from "@baseline-ui/core";',description:"`Breadcrumbs` shows the path to the current page or resource as a trail of links, so people can see where they are and jump back to a parent.",documentation:'`Breadcrumbs` shows the path to the current page or resource as a trail of links, so people can see where they are and jump back to a parent.\n\n* Text, icon and icon-only breadcrumbs\n* Custom content, such as a `Select`, in place of a link\n* Individually or fully disabled breadcrumbs\n* Custom or no separator\n* Breadcrumbs that are real links with `href`\n\n```jsx\nimport { Breadcrumb, Breadcrumbs } from "@baseline-ui/core";\n\n<Breadcrumbs aria-label="File location" onAction={(id) => navigate(id)}>\n <Breadcrumb id="home" label="Home" />\n <Breadcrumb id="documents" label="Documents" />\n <Breadcrumb id="report" label="Report.pdf" />\n</Breadcrumbs>;\n```\n\nEach `Breadcrumb` needs a unique `id`, which is passed to `onAction` when it is pressed. Pass `href` to render the breadcrumb as a regular link; `onAction` is still called when it is pressed. The current breadcrumb and disabled breadcrumbs are not links, even with an `href`. The last breadcrumb is the current page: it is exposed with `aria-current="page"` and cannot be pressed.\n\nAdd an `icon` next to the `label`, or use `icon` with an `aria-label` and no `label` for an icon-only breadcrumb.\n\nPass the `id`s of the breadcrumbs to disable in `disabledKeys`, or set `isDisabled` to disable all of them.\n\nUse `separator` to replace the default caret, or pass `null` to render none. The separator is hidden from assistive technology and only appears between breadcrumbs.\n\nChildren of a `Breadcrumb` replace its link and render as is, so you can put a `Select` or a `Menu` in the trail. `onAction` is not called for them. Custom content stays interactive even when it is the last breadcrumb. It does not receive `disabledKeys`, `isDisabled` or the current-page marking, so handle those in the content itself.\n\n`Breadcrumbs` does not collapse on its own. To shorten a long trail, put the hidden levels in a `Menu` whose trigger is an ellipsis button.\n\nThe trail is rendered inside a `nav` landmark with an ordered list of breadcrumbs. Give it an `aria-label` that describes what the trail is for, such as "File location".\n\n* The current page has `aria-current="page"`.\n* Icon-only breadcrumbs need an `aria-label`.\n* Separators are decorative and hidden from assistive technology.\n\n| Key | Function |\n| ----- | ------------------------------------- |\n| Tab | Moves focus to the next enabled link. |\n| Enter | Activates the focused breadcrumb. |',props:`interface BreadcrumbsProps {
3101
3121
  /**
3102
- * @deprecated Do not use in new components. This is a legacy block
3103
- * identifier; new components should exclude it via
3104
- * \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
3105
- * Retained on existing components for backward compatibility.
3106
- *
3107
- * The unique identifier for the block. This is used to identify the block in
3108
- * the DOM and in the block map. It is added as a data attribute
3109
- * \`data-block-id\` to the root element of the block if a DOM node is
3110
- * rendered.
3111
- */
3112
- data-block-id?: string
3113
- /**
3114
- * @deprecated Do not use in new components. This is a legacy block group
3115
- * marker; new components should exclude it via
3116
- * \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
3117
- * Retained on existing components for backward compatibility.
3118
- *
3119
- * Represents a data block group. This is similar to \`data-block-id\` but it
3120
- * doesn't have to be unique just like \`class\`. This is used to group blocks
3121
- * together in the DOM and in the block map. It is added as a data attribute
3122
- * \`data-block-class\` to the root element of the block if a DOM node is
3123
- * rendered.
3122
+ * The \`id\` of the root element.
3124
3123
  */
3125
- data-block-class?: string
3124
+ id?: string
3126
3125
  /**
3127
- * The className applied to the root element of the component.
3126
+ * The \`Breadcrumb\` items to render, from the root to the current page.
3128
3127
  */
3129
- className?: string
3128
+ children: React.ReactNode
3130
3129
  /**
3131
- * The style applied to the root element of the component.
3130
+ * Handler that is called with the \`id\` of a breadcrumb when it is pressed.
3132
3131
  */
3133
- style?: React.CSSProperties
3132
+ onAction?: (key: Key) => void
3134
3133
  /**
3135
- * The size of the button.
3136
- *
3137
- * @default "md"
3134
+ * The \`id\`s of the breadcrumbs that are disabled. Only the link is disabled:
3135
+ * unlike \`isDisabled\`, the list item gets no \`data-disabled\` attribute.
3138
3136
  */
3139
- size?: "md" | "lg"
3137
+ disabledKeys?: Iterable<Key>
3140
3138
  /**
3141
- * Whether to hide the label in the button.
3139
+ * Whether every breadcrumb is disabled.
3142
3140
  *
3143
3141
  * @default false
3144
3142
  */
3145
- hideLabel?: boolean
3146
- /**
3147
- * A callback that is called when the button selection changes.
3148
- */
3149
- onButtonSelectionChange?: (options: {
3150
- isSelected: boolean;
3151
- selectedKey: string;
3152
- }) => void
3153
- /**
3154
- * The aria-label for the select button.
3155
- */
3156
- moreAriaLabel?: string
3157
- /**
3158
- * A function that is called to get the class name for the option.
3159
- */
3160
- optionClassName?: | string
3161
- | ((
3162
- item: ListOption,
3163
- options: {
3164
- isButton: boolean;
3165
- isSelected: boolean;
3166
- },
3167
- ) => string)
3168
- /**
3169
- * A function that is called to get the style for the option.
3170
- */
3171
- optionStyle?: | React.CSSProperties
3172
- | ((
3173
- item: ListOption,
3174
- options: {
3175
- isButton: boolean;
3176
- isSelected: boolean;
3177
- },
3178
- ) => React.CSSProperties)
3179
- /**
3180
- * Props for the tooltip.
3181
- */
3182
- tooltipProps?: | Omit<TooltipProps, "children">
3183
- | ((trigger: "button" | "select") => Omit<TooltipProps, "children">)
3184
- /**
3185
- * The behaviour of the button select.
3186
- *
3187
- * @default "toggle"
3188
- */
3189
- buttonBehaviour?: ButtonBehaviour | ((activeKey: string) => ButtonBehaviour)
3190
- /**
3191
- * A callback that is called when the button is pressed.
3192
- */
3193
- onButtonAction?: (options: {
3194
- isSelected: boolean;
3195
- selectedKey: string;
3196
- buttonBehaviour: ButtonBehaviour;
3197
- }) => void
3143
+ isDisabled?: boolean
3198
3144
  /**
3199
- * A callback that is called when the option in the dropdown is pressed.
3200
- */
3201
- onOptionPress?: (e: PressEvent, key: string) => void
3202
- }`,stories:{usage:[{id:"core-forms-buttonselect--basic",name:"Basic",snippet:'const Basic = () => <ButtonSelect aria-label="Button select" items={items} />;'},{id:"core-forms-buttonselect--variants",name:"Variants",snippet:`const Variants = (args) => (
3203
- <VariantViewer
3204
- header={["Enabled", "Selected", "Disabled", "Disabled Selected"]}
3205
- component={ButtonSelect}
3145
+ * The element rendered between breadcrumbs. It is hidden from assistive
3146
+ * technology. Pass \`null\`, \`false\` or \`""\` to render no separator.
3147
+ *
3148
+ * @default A caret icon pointing toward the current page
3149
+ */
3150
+ separator?: React.ReactNode
3151
+ }`,stories:{usage:[{id:"core-navigation-breadcrumbs--basic",name:"Basic",snippet:`const Basic = () => <Breadcrumbs aria-label="File location">
3152
+ <Breadcrumb id="home" label="Home" />
3153
+ <Breadcrumb id="documents" label="Documents" />
3154
+ <Breadcrumb id="report" label="Report.pdf" />
3155
+ </Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--with-icons",name:"With Icons",snippet:`const WithIcons = () => <Breadcrumbs aria-label="File location">
3156
+ <Breadcrumb id="folders" icon={FolderIcon} aria-label="Folders" />
3157
+ <Breadcrumb id="documents" label="Documents" icon={FolderIcon} />
3158
+ <Breadcrumb id="report" label="Report.pdf" />
3159
+ </Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--disabled",name:"Disabled",snippet:`const Disabled = () => <Breadcrumbs aria-label="File location" disabledKeys={["documents"]}>
3160
+ <Breadcrumb id="home" label="Home" />
3161
+ <Breadcrumb id="documents" label="Documents" />
3162
+ <Breadcrumb id="report" label="Report.pdf" />
3163
+ </Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--custom-separator",name:"Custom Separator",snippet:`const CustomSeparator = () => <Breadcrumbs aria-label="File location" separator="/">
3164
+ <Breadcrumb id="home" label="Home" />
3165
+ <Breadcrumb id="documents" label="Documents" />
3166
+ <Breadcrumb id="report" label="Report.pdf" />
3167
+ </Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--with-select",name:"With Select",snippet:`const WithSelect = () => <Breadcrumbs aria-label="File location">
3168
+ <Breadcrumb id="home" label="Home" />
3169
+ <Breadcrumb id="folder">
3170
+ <Select
3171
+ aria-label="Folder"
3172
+ variant="ghost"
3173
+ items={folderItems}
3174
+ defaultSelectedKey="design" />
3175
+ </Breadcrumb>
3176
+ <Breadcrumb id="report" label="Report.pdf" />
3177
+ </Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--collapsed",name:"Collapsed",snippet:`const Collapsed = () => <Breadcrumbs aria-label="File location">
3178
+ <Breadcrumb id="home" label="Home" />
3179
+ <Breadcrumb id="more">
3180
+ <Menu
3181
+ items={hiddenItems}
3182
+ triggerLabel="More"
3183
+ renderTrigger={({ buttonProps, ref }) => (
3184
+ <ActionIconButton
3185
+ {...buttonProps}
3186
+ ref={ref}
3187
+ icon={MoreIcon}
3188
+ aria-label="More"
3189
+ variant="tertiary"
3190
+ />
3191
+ )} />
3192
+ </Breadcrumb>
3193
+ <Breadcrumb id="documents" label="Documents" />
3194
+ <Breadcrumb id="report" label="Report.pdf" />
3195
+ </Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--variants",name:"Variants",snippet:`const Variants = () => (
3196
+ <VariantViewer<React.ComponentProps<typeof BreadcrumbsRow>>
3197
+ header={["Enabled", "Item disabled", "All disabled"]}
3206
3198
  variants={{
3207
- Medium: [
3208
- { size: "md" },
3209
- { size: "md", defaultSelected: true },
3210
- { size: "md", isDisabled: true },
3211
- { size: "md", isDisabled: true, defaultSelected: true },
3199
+ "Text only": [
3200
+ { kind: "text" },
3201
+ { kind: "text", disabledKeys: ["home", "documents"] },
3202
+ { kind: "text", isDisabled: true },
3212
3203
  ],
3213
- Large: [
3214
- { size: "lg" },
3215
- { size: "lg", defaultSelected: true },
3216
- { size: "lg", isDisabled: true },
3217
- { size: "lg", isDisabled: true, defaultSelected: true },
3204
+ "Icon only": [
3205
+ { kind: "icon-only" },
3206
+ { kind: "icon-only", disabledKeys: ["home", "documents"] },
3207
+ { kind: "icon-only", isDisabled: true },
3218
3208
  ],
3219
- "Without Label Medium": [
3220
- { size: "md", hideLabel: true },
3221
- { size: "md", hideLabel: true, defaultSelected: true },
3222
- { size: "md", hideLabel: true, isDisabled: true },
3223
- {
3224
- size: "md",
3225
- hideLabel: true,
3226
- isDisabled: true,
3227
- defaultSelected: true,
3228
- },
3229
- ],
3230
- "Without Label Large": [
3231
- { size: "lg", hideLabel: true },
3232
- { size: "lg", hideLabel: true, defaultSelected: true },
3233
- { size: "lg", hideLabel: true, isDisabled: true },
3234
- {
3235
- size: "lg",
3236
- hideLabel: true,
3237
- isDisabled: true,
3238
- defaultSelected: true,
3239
- },
3209
+ "Icon and text": [
3210
+ { kind: "icon-and-text" },
3211
+ { kind: "icon-and-text", disabledKeys: ["home", "documents"] },
3212
+ { kind: "icon-and-text", isDisabled: true },
3240
3213
  ],
3241
3214
  }}
3242
- defaultProps={args}
3215
+ component={BreadcrumbsRow}
3243
3216
  />
3244
- );`},{id:"core-forms-buttonselect--with-hidden-label",name:"With Hidden Label",snippet:'const WithHiddenLabel = () => <ButtonSelect aria-label="Button select" items={items} hideLabel />;'},{id:"core-forms-buttonselect--without-tooltip",name:"Without Tooltip",snippet:`const WithoutTooltip = () => <ButtonSelect
3245
- aria-label="Button select"
3246
- items={items}
3247
- tooltipProps={{
3248
- isDisabled: true,
3249
- }} />;`},{id:"core-forms-buttonselect--default-select-selected-value",name:"Default Select Selected Value",snippet:'const DefaultSelectSelectedValue = () => <ButtonSelect aria-label="Button select" items={items} defaultSelectedKey="polygon" />;'},{id:"core-forms-buttonselect--default-button-selected-value",name:"Default Button Selected Value",snippet:'const DefaultButtonSelectedValue = () => <ButtonSelect aria-label="Button select" items={items} defaultSelected />;'},{id:"core-forms-buttonselect--controlled",name:"Controlled",snippet:'const Controlled = () => <ButtonSelect aria-label="Button select" items={items} selectedKey="polygon" />;'},{id:"core-forms-buttonselect--disabled",name:"Disabled",snippet:`const Disabled = () => <Box display="flex" flexDirection="column" gap="lg">
3250
- <ButtonSelect aria-label="Button select" items={items} isDisabled />
3251
- <ButtonSelect aria-label="Button select" items={items} isDisabled selectedKey="ellipse" />
3252
- </Box>;`},{id:"core-forms-buttonselect--with-default-open",name:"With Default Open",snippet:'const WithDefaultOpen = () => <ButtonSelect aria-label="Button select" items={items} defaultOpen />;'},{id:"core-forms-buttonselect--with-action-behaviour",name:"With Action Behaviour",snippet:`const WithActionBehaviour = () => <ButtonSelect
3253
- aria-label="Button select"
3254
- items={items}
3255
- buttonBehaviour="action"
3256
- onPress={fn()}
3257
- onSelectionChange={fn()} />;`},{id:"core-forms-buttonselect--with-individual-button-behaviour",name:"With Individual Button Behaviour",snippet:`const WithIndividualButtonBehaviour = () => <ButtonSelect
3258
- aria-label="Button select"
3259
- items={items}
3260
- buttonBehaviour={(activeKey) =>
3261
- activeKey === "ellipse" ? "action" : "toggle"}
3262
- onPress={fn()}
3263
- onSelectionChange={fn()} />;`},{id:"core-forms-buttonselect--with-disabled-keys",name:"With Disabled Keys",snippet:'const WithDisabledKeys = () => <ButtonSelect aria-label="Button select" items={items} disabledKeys={["square"]} />;'},{id:"core-forms-buttonselect--with-multiple-disabled-keys",name:"With Multiple Disabled Keys",snippet:`const WithMultipleDisabledKeys = () => <ButtonSelect
3264
- aria-label="Button select"
3265
- items={items}
3266
- disabledKeys={["square", "polygon"]} />;`},{id:"core-forms-buttonselect--with-disabled-keys-and-default-selected",name:"With Disabled Keys And Default Selected",snippet:`const WithDisabledKeysAndDefaultSelected = () => <ButtonSelect
3267
- aria-label="Button select"
3268
- items={items}
3269
- disabledKeys={["square"]}
3270
- defaultSelectedKey="polygon" />;`},{id:"core-forms-buttonselect--with-button-disabled-key",name:"With Button Disabled Key",snippet:'const WithButtonDisabledKey = () => <ButtonSelect aria-label="Button select" items={items} disabledKeys={["ellipse"]} />;'},{id:"core-forms-buttonselect--with-validation-error",name:"With Validation Error",snippet:'const WithValidationError = () => <ButtonSelect aria-label="Button select" items={items} validationState="error" />;'},{id:"core-forms-buttonselect--with-callbacks",name:"With Callbacks",snippet:`const WithCallbacks = () => <ButtonSelect
3271
- aria-label="Button select"
3272
- items={items}
3273
- onPress={fn()}
3274
- onSelectionChange={fn()}
3275
- onButtonAction={fn()}
3276
- onButtonSelectionChange={fn()}
3277
- onOptionPress={fn()} />;`},{id:"core-forms-buttonselect--controlled-button-selection",name:"Controlled Button Selection",snippet:`const ControlledButtonSelection = () => <ButtonSelect
3278
- aria-label="Button select"
3279
- items={items}
3280
- isSelected
3281
- onButtonSelectionChange={fn()} />;`},{id:"core-forms-buttonselect--long-text-labels",name:"Long Text Labels",snippet:`const LongTextLabels = () => <ButtonSelect
3282
- aria-label="Button select"
3283
- items={[
3284
- {
3285
- id: "long-1",
3286
- label:
3287
- "This is an extremely long label that should demonstrate overflow",
3288
- },
3289
- {
3290
- id: "long-2",
3291
- label: "Another very long label to test truncation and layout",
3292
- },
3293
- { id: "short", label: "Short" },
3294
- ]} />;`},{id:"core-forms-buttonselect--many-items",name:"Many Items",snippet:'const ManyItems = () => <ButtonSelect\n aria-label="Button select"\n items={Array.from({ length: 20 }, (_, i) => ({\n id: `item-${i}`,\n label: `Item ${i + 1}`,\n }))}\n defaultOpen />;'},{id:"core-forms-buttonselect--items-without-icons",name:"Items Without Icons",snippet:`const ItemsWithoutIcons = () => <ButtonSelect
3295
- aria-label="Button select"
3296
- items={[
3297
- { id: "option-a", label: "Option A" },
3298
- { id: "option-b", label: "Option B" },
3299
- { id: "option-c", label: "Option C" },
3300
- ]} />;`},{id:"core-forms-buttonselect--exclude-from-tab-order",name:"Exclude From Tab Order",snippet:'const ExcludeFromTabOrder = () => <ButtonSelect aria-label="Button select" items={items} excludeFromTabOrder />;'}],implementation:`import React from "react";
3217
+ );`}],implementation:`import { FolderIcon } from "@baseline-ui/icons/16";
3218
+ import React from "react";
3301
3219
 
3302
3220
  import { items } from "../../ListBox/__tests__/testComponents";
3303
- import { ButtonSelect } from "../ButtonSelect";
3221
+ import { Select } from "../../Select/Select";
3222
+ import { Breadcrumb, Breadcrumbs } from "../Breadcrumbs";
3304
3223
 
3305
- import type { ButtonSelectProps } from "../ButtonSelect.types";
3224
+ import type { BreadcrumbsProps } from "../Breadcrumbs.types";
3306
3225
 
3307
- export const ButtonSelectExample: React.FC<Omit<ButtonSelectProps, "items">> = (
3308
- args,
3309
- ) => {
3310
- return (
3311
- <ButtonSelect
3312
- optionClassName={(item) => item.label}
3313
- {...args}
3314
- items={items}
3315
- />
3316
- );
3317
- };
3318
-
3319
- export const IndividualButtonBehaviour: React.FC<
3320
- Omit<ButtonSelectProps, "items">
3321
- > = (args) => {
3322
- return (
3323
- <ButtonSelect
3324
- buttonBehaviour={(activeKey) =>
3325
- activeKey === "ellipse" ? "action" : "toggle"
3226
+ export const BreadcrumbsExample: React.FC<
3227
+ Partial<BreadcrumbsProps> & {
3228
+ homeTestId?: string;
3229
+ unlabeled?: boolean;
3230
+ withTrailingButton?: boolean;
3326
3231
  }
3327
- {...args}
3232
+ > = ({ homeTestId, unlabeled, withTrailingButton, ...props }) => (
3233
+ <>
3234
+ <Breadcrumbs aria-label={unlabeled ? undefined : "Trail"} {...props}>
3235
+ <Breadcrumb id="home" label="Home" data-testid={homeTestId} />
3236
+ <Breadcrumb id="docs" label="Documents" />
3237
+ <Breadcrumb id="file" label="Report.pdf" />
3238
+ </Breadcrumbs>
3239
+ {withTrailingButton ? (
3240
+ <button type="button" onClick={() => props.onAction?.("after")}>
3241
+ After
3242
+ </button>
3243
+ ) : null}
3244
+ </>
3245
+ );
3246
+
3247
+ export const BreadcrumbsIconExample: React.FC<Partial<BreadcrumbsProps>> = (
3248
+ props,
3249
+ ) => (
3250
+ <Breadcrumbs aria-label="Trail" {...props}>
3251
+ <Breadcrumb id="folders" icon={FolderIcon} aria-label="Folders" />
3252
+ <Breadcrumb id="docs" label="Documents" icon={FolderIcon} />
3253
+ <Breadcrumb id="file" label="Report.pdf" />
3254
+ </Breadcrumbs>
3255
+ );
3256
+
3257
+ export const BreadcrumbsSelectExample: React.FC<{ last?: boolean }> = ({
3258
+ last = false,
3259
+ }) => {
3260
+ const select = (
3261
+ <Select
3262
+ aria-label="Shape"
3263
+ variant="ghost"
3328
3264
  items={items}
3329
- aria-label="Shape Options"
3265
+ defaultSelectedKey="ellipse"
3330
3266
  />
3331
3267
  );
3332
- };
3333
3268
 
3334
- export const ButtonSelectWithTooltipFn: React.FC<
3335
- Omit<ButtonSelectProps, "items">
3336
- > = (args) => {
3337
3269
  return (
3338
- <ButtonSelect
3339
- {...args}
3340
- items={items}
3341
- hideLabel={true}
3342
- tooltipProps={(trigger) => ({
3343
- text: trigger === "button" ? "Custom Button Tip" : "Custom Select Tip",
3344
- })}
3345
- />
3270
+ <Breadcrumbs aria-label="Trail">
3271
+ <Breadcrumb id="home" label="Home" />
3272
+ <Breadcrumb id="shape">{select}</Breadcrumb>
3273
+ {!last && <Breadcrumb id="file" label="Report.pdf" />}
3274
+ </Breadcrumbs>
3346
3275
  );
3347
3276
  };
3348
3277
 
3349
- export const ButtonSelectWithOptionStyleFn: React.FC<
3350
- Omit<ButtonSelectProps, "items">
3351
- > = (args) => {
3352
- return (
3353
- <ButtonSelect
3354
- {...args}
3355
- items={items}
3356
- optionStyle={(_, { isButton }) => ({
3357
- backgroundColor: isButton ? "rgb(0, 128, 0)" : "rgb(0, 0, 255)",
3358
- })}
3359
- />
3360
- );
3361
- };`},similarTo:[],figmaUrl:null},Calendar:{id:"core-forms-calendar",breadcrumb:"Core/Forms/Calendar",importStatement:'import { Box, Calendar, I18nProvider, Select } from "@baseline-ui/core";',description:"`Calendar` presents a monthly grid of dates from which the user can pick a single day. Use it when a date needs to be chosen visually, such as scheduling an event or setting a deadline.",documentation:'`Calendar` presents a monthly grid of dates from which the user can pick a single day. Use it when a date needs to be chosen visually, such as scheduling an event or setting a deadline.\n\n* **Date selection** \u2013 Click or press Enter to select a date\n* **International calendars** \u2013 Supports 13 calendar systems including Gregorian, Buddhist, Islamic, Persian, and more\n* **Keyboard navigation** \u2013 Full arrow key, Page Up/Down, and Home/End support\n* **Accessible** \u2013 Uses `role="grid"` with proper ARIA attributes for screen readers\n* **Size variants** \u2013 Available in `sm` (default) and `xs` sizes\n* **Optional title** \u2013 Displays a calendar icon, title text, and separator above the grid\n\n```jsx\nimport { Calendar } from "@baseline-ui/core";\n\n<Calendar aria-label="Event date" />;\n```\n\nA title bar with a calendar icon and separator can be displayed above the calendar grid.\n\n```jsx\n<Calendar aria-label="Event date" title="Date" />\n```\n\nSet an initial selected date using the `defaultValue` prop with a date from `@internationalized/date`.\n\n```jsx\nimport { parseDate } from "@internationalized/date";\n\n<Calendar\n aria-label="Event date"\n defaultValue={parseDate("2024-09-15")}\n title="Date"\n/>;\n```\n\nThe calendar is available in two sizes: `sm` (default, 320px wide) and `xs` (240px wide).\n\n```jsx\n<Calendar aria-label="Event date" size="xs" title="Date" />\n```\n\n```jsx\n<Calendar aria-label="Event date" size="xs" />\n```\n\nThe `headerVariant` prop controls how the calendar header is displayed. The default is `"title"`, which shows the month and year as plain text between navigation arrows.\n\nUse `headerVariant="selectMonth"` to display the month and year as a dropdown selector with grouped navigation arrows.\n\n```jsx\n<Calendar aria-label="Event date" headerVariant="selectMonth" />\n```\n\n```jsx\n<Calendar aria-label="Event date" headerVariant="selectMonth" title="Date" />\n```\n\nUse `headerVariant="selectMonthAndYear"` to display separate month and year sections, each with their own navigation arrows.\n\n```jsx\n<Calendar aria-label="Event date" headerVariant="selectMonthAndYear" />\n```\n\n```jsx\n<Calendar\n aria-label="Event date"\n headerVariant="selectMonthAndYear"\n title="Date"\n/>\n```\n\nWhen `isDisabled` is true, all dates and navigation buttons become non-interactive.\n\n```jsx\n<Calendar aria-label="Event date" isDisabled />\n```\n\nWhen `isReadOnly` is true, the selected date is visible but cannot be changed.\n\n```jsx\nimport { getLocalTimeZone, today } from "@internationalized/date";\n\n<Calendar\n aria-label="Event date"\n isReadOnly\n defaultValue={today(getLocalTimeZone())}\n/>;\n```\n\nRestrict selectable dates to a range using `minValue` and `maxValue`. Dates outside the range are disabled, and navigation buttons disable at boundaries.\n\n```jsx\nimport { getLocalTimeZone, today } from "@internationalized/date";\n\n<Calendar\n aria-label="Event date"\n minValue={today(getLocalTimeZone())}\n maxValue={today(getLocalTimeZone()).add({ months: 1 })}\n/>;\n```\n\nUse `isDateUnavailable` to mark specific dates as unavailable. These dates display with a strikethrough and cannot be selected.\n\n```jsx\n<Calendar\n aria-label="Event date"\n isDateUnavailable={(date) =>\n date.day === 10 || date.day === 20 || date.day === 25\n }\n/>\n```\n\nCalendar supports various calendar systems used around the world. The calendar system is automatically determined based on the user\'s locale. Wrap the calendar in an `I18nProvider` to override the locale and display a different calendar system.\n\nUse the locale selector below to preview different calendar systems including Buddhist (`th-TH`), Persian (`fa-IR`), Islamic (`ar-SA`), Hebrew (`he-IL-u-ca-hebrew`), Japanese (`ja-JP-u-ca-japanese`), and ROC (`zh-TW-u-ca-roc`).\n\n```jsx\nimport { I18nProvider, Calendar } from "@baseline-ui/core";\nimport { parseDate } from "@internationalized/date";\n\n<I18nProvider locale="th-TH">\n <Calendar aria-label="Event date" defaultValue={parseDate("2024-09-15")} />\n</I18nProvider>;\n```\n\nAn `aria-label` must be provided to the Calendar for accessibility. If the calendar is labeled by a separate visible element, use `aria-labelledby` instead.\n\n```jsx\n{/* Labeling with aria-label */}\n<Calendar aria-label="Appointment date" />\n\n{/* Labeling with a visible element */}\n<label id="date-label">Appointment date</label>\n<Calendar aria-labelledby="date-label" />\n```\n\nWhen the `title` prop is set, it is automatically linked via `aria-labelledby` so no additional labeling prop is needed.\n\n| Selector | Description |\n| ---------------------- | ------------------------------- |\n| `.BaselineUI-Calendar` | Root container element |\n| `[data-selected]` | Selected date cell |\n| `[data-disabled]` | Disabled date cell |\n| `[data-unavailable]` | Unavailable date cell |\n| `[data-outside-month]` | Date cell outside current month |\n| `[data-focus-visible]` | Keyboard-focused cell |\n| `[data-hovered]` | Hovered date cell |\n| `[data-today]` | Today\'s date cell |\n\n| Key | Function |\n| ----------------- | ------------------------------------------------ |\n| `ArrowRight` | Move focus to the next day |\n| `ArrowLeft` | Move focus to the previous day |\n| `ArrowDown` | Move focus to the same day in the next week |\n| `ArrowUp` | Move focus to the same day in the previous week |\n| `PageDown` | Move focus to the same day in the next month |\n| `PageUp` | Move focus to the same day in the previous month |\n| `Home` | Move focus to the first day of the month |\n| `End` | Move focus to the last day of the month |\n| `Enter` / `Space` | Select the focused date |\n\n* **[RangeCalendar](/docs/core-forms-rangecalendar--docs)** \u2013 For selecting a date range instead of a single date\n* **[DateField](/docs/core-forms-datefield--docs)** \u2013 For keyboard-based date input with individual editable segments',props:`interface CalendarProps {
3278
+ export const BreadcrumbsHrefExample: React.FC<Partial<BreadcrumbsProps>> = (
3279
+ props,
3280
+ ) => (
3281
+ <Breadcrumbs aria-label="Trail" {...props}>
3282
+ <Breadcrumb id="home" label="Home" href="#home" />
3283
+ <Breadcrumb id="file" label="Report.pdf" href="#file" />
3284
+ </Breadcrumbs>
3285
+ );`},similarTo:[],figmaUrl:"https://www.figma.com/design/7Ft0mFZCq8fTVnTkXjTSZR/Baseline-UI?node-id=19605-113450&m=dev"},ButtonSelect:{id:"core-forms-buttonselect",breadcrumb:"Core/Forms/ButtonSelect",importStatement:'import { Box, ButtonSelect, VariantViewer } from "@baseline-ui/core";',description:"`ButtonSelect` pairs a primary action button with an adjacent dropdown trigger that opens a list of options. Use it when a single action has multiple related variants the user can switch between, such as picking the active shape tool from a set.",documentation:'`ButtonSelect` pairs a primary action button with an adjacent dropdown trigger that opens a list of options. Use it when a single action has multiple related variants the user can switch between, such as picking the active shape tool from a set.\n\n* Combines a button (toggle/action) with a select dropdown menu\n* Button can toggle current selection or trigger an action\n* Supports icons, optional labels, and tooltips for better UX\n* Configurable with different sizes, states (disabled/enabled), and behaviors\n* Full keyboard navigation and screen reader support\n* Customizable styling through `optionClassName`, `optionStyle`, `triggerClassName`, and `triggerStyle` props\n* Individual button behaviour per option via `buttonBehaviour` function\n* Validation state support\n\n```jsx\nimport { ButtonSelect } from "@baseline-ui/core";\nimport { EllipseIcon, RectangleIcon, PolygonIcon } from "@baseline-ui/icons/24";\n\nconst items = [\n { id: "ellipse", icon: EllipseIcon, label: "Ellipse" },\n { id: "square", icon: RectangleIcon, label: "Square" },\n { id: "polygon", icon: PolygonIcon, label: "Polygon" },\n];\n\n<ButtonSelect items={items} aria-label="Shape Options" />;\n```\n\nYou can hide the label in the button and just show the icon by setting the `hideLabel` prop to true.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" hideLabel />\n```\n\nBy default, ButtonSelect displays a tooltip on the dropdown trigger. When `hideLabel` is `true`, the main button also receives a tooltip showing the selected item\'s label. You can disable tooltips by setting `tooltipProps` with `isDisabled: true`.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n tooltipProps={{ isDisabled: true }}\n/>\n```\n\nYou can also pass `tooltipProps` as a function to customize tooltips per trigger:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n tooltipProps={(trigger) => ({\n text: trigger === "button" ? "Toggle shape" : "More shapes",\n })}\n/>\n```\n\nYou can set the default selected item in the dropdown by using the `defaultSelectedKey` prop.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n defaultSelectedKey="polygon"\n/>\n```\n\nYou can set the default button selection state using the `defaultSelected` prop.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" defaultSelected={true} />\n```\n\nYou can control the selected item by using the `selectedKey` prop. Use `isSelected` and `onButtonSelectionChange` to control the button toggle state.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n selectedKey={selectedKey}\n onSelectionChange={setSelectedKey}\n isSelected={isSelected}\n onButtonSelectionChange={({ isSelected }) => setIsSelected(isSelected)}\n/>\n```\n\nYou can disable the entire component using the `isDisabled` prop. Use `disabledKeys` to disable individual options in the dropdown.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" isDisabled />\n```\n\nYou can disable specific options in the dropdown using `disabledKeys`. If the currently selected item\'s key is in `disabledKeys`, the main button is also disabled.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n disabledKeys={["square"]}\n/>\n```\n\nBy default, the button uses a `"toggle"` behavior, which means it can be toggled on/off. You can change it to `"action"` behavior, which means it will trigger an action when pressed but won\'t toggle a state.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n buttonBehaviour="action"\n onPress={(e) => console.log("Button pressed", e)}\n/>\n```\n\nYou can also pass `buttonBehaviour` as a function to assign different behaviors per option:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n buttonBehaviour={(activeKey) =>\n activeKey === "ellipse" ? "action" : "toggle"\n }\n/>\n```\n\nButtonSelect provides several callbacks:\n\n* **`onPress`** \u2014 Called when the main button is pressed\n* **`onButtonAction`** \u2014 Called with `{ isSelected, selectedKey, buttonBehaviour }` when the button is pressed\n* **`onButtonSelectionChange`** \u2014 Called with `{ isSelected, selectedKey }` when toggle state changes\n* **`onSelectionChange`** \u2014 Called with the new key when a dropdown option is selected\n* **`onOptionPress`** \u2014 Called with `(pressEvent, key)` when any dropdown option is pressed\n\nUse `validationState` to indicate a validation state. Supported values are `"error"` and `"warning"`.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n validationState="error"\n/>\n```\n\nButtonSelect comes in two sizes: `md` (default) and `lg`.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" size="lg" />\n```\n\nUse `optionClassName`, `optionStyle`, `triggerClassName`, and `triggerStyle` to customize the appearance. These accept either static values or functions for dynamic styling:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n optionClassName={(item, { isButton, isSelected }) =>\n isButton && isSelected ? "active-button" : ""\n }\n optionStyle={(item, { isButton }) => ({\n backgroundColor: isButton ? "lightblue" : undefined,\n })}\n triggerClassName="custom-trigger"\n/>\n```\n\n| Selector | Description |\n| ---------------------------------- | ----------------------------------------------------------- |\n| `.BaselineUI-ButtonSelect` | The root container element. |\n| `.BaselineUI-ButtonSelect-Button` | The main action/toggle button. |\n| `.BaselineUI-ButtonSelect-Trigger` | The dropdown trigger (caret) button. |\n| `.BaselineUI-ButtonSelect-Select` | The select/dropdown wrapper. |\n| `[data-hovered]` | Present when the component is hovered. |\n| `[data-selected]` | Present when the button is in the selected (toggled) state. |\n| `[data-disabled]` | Present when the component is disabled. |\n| `[data-expanded]` | Present when the dropdown is open. |\n| `[data-button-behaviour]` | The current button behaviour (`"toggle"` or `"action"`). |\n\n> **Note:** Boolean data attributes (`data-hovered`, `data-selected`, `data-disabled`, `data-expanded`) are only present in the DOM when `true`.\n\n| Key | Function |\n| ----------- | ------------------------------------------------------------------------ |\n| `Space` | Toggles the button if focused, or activates the selected dropdown option |\n| `Enter` | Toggles the button if focused, or activates the selected dropdown option |\n| `Tab` | Moves focus to the next focusable element |\n| `Shift+Tab` | Moves focus to the previous focusable element |\n| `ArrowDown` | Opens the dropdown if trigger is focused; navigates down within dropdown |\n| `ArrowUp` | Navigates up within the dropdown |\n| `Home` | Moves to the first option in the dropdown |\n| `End` | Moves to the last option in the dropdown |\n| `Escape` | Closes the dropdown if open |\n\n* **Select** \u2014 Use when you only need a dropdown without a primary action button.\n* **ToggleButton** \u2014 Use when you need a standalone toggle button without a dropdown.\n* **ActionButton** \u2014 Use when you need a standalone action button.\n* **ListBox** \u2014 The underlying list component used in the dropdown.',props:`interface ButtonSelectProps {
3286
+ /**
3287
+ * @deprecated Do not use in new components. This is a legacy block
3288
+ * identifier; new components should exclude it via
3289
+ * \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
3290
+ * Retained on existing components for backward compatibility.
3291
+ *
3292
+ * The unique identifier for the block. This is used to identify the block in
3293
+ * the DOM and in the block map. It is added as a data attribute
3294
+ * \`data-block-id\` to the root element of the block if a DOM node is
3295
+ * rendered.
3296
+ */
3297
+ data-block-id?: string
3298
+ /**
3299
+ * @deprecated Do not use in new components. This is a legacy block group
3300
+ * marker; new components should exclude it via
3301
+ * \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
3302
+ * Retained on existing components for backward compatibility.
3303
+ *
3304
+ * Represents a data block group. This is similar to \`data-block-id\` but it
3305
+ * doesn't have to be unique just like \`class\`. This is used to group blocks
3306
+ * together in the DOM and in the block map. It is added as a data attribute
3307
+ * \`data-block-class\` to the root element of the block if a DOM node is
3308
+ * rendered.
3309
+ */
3310
+ data-block-class?: string
3311
+ /**
3312
+ * The className applied to the root element of the component.
3313
+ */
3314
+ className?: string
3315
+ /**
3316
+ * The style applied to the root element of the component.
3317
+ */
3318
+ style?: React.CSSProperties
3319
+ /**
3320
+ * The size of the button.
3321
+ *
3322
+ * @default "md"
3323
+ */
3324
+ size?: "md" | "lg"
3325
+ /**
3326
+ * Whether to hide the label in the button.
3327
+ *
3328
+ * @default false
3329
+ */
3330
+ hideLabel?: boolean
3331
+ /**
3332
+ * A callback that is called when the button selection changes.
3333
+ */
3334
+ onButtonSelectionChange?: (options: {
3335
+ isSelected: boolean;
3336
+ selectedKey: string;
3337
+ }) => void
3338
+ /**
3339
+ * The aria-label for the select button.
3340
+ */
3341
+ moreAriaLabel?: string
3342
+ /**
3343
+ * A function that is called to get the class name for the option.
3344
+ */
3345
+ optionClassName?: | string
3346
+ | ((
3347
+ item: ListOption,
3348
+ options: {
3349
+ isButton: boolean;
3350
+ isSelected: boolean;
3351
+ },
3352
+ ) => string)
3353
+ /**
3354
+ * A function that is called to get the style for the option.
3355
+ */
3356
+ optionStyle?: | React.CSSProperties
3357
+ | ((
3358
+ item: ListOption,
3359
+ options: {
3360
+ isButton: boolean;
3361
+ isSelected: boolean;
3362
+ },
3363
+ ) => React.CSSProperties)
3364
+ /**
3365
+ * Props for the tooltip.
3366
+ */
3367
+ tooltipProps?: | Omit<TooltipProps, "children">
3368
+ | ((trigger: "button" | "select") => Omit<TooltipProps, "children">)
3369
+ /**
3370
+ * The behaviour of the button select.
3371
+ *
3372
+ * @default "toggle"
3373
+ */
3374
+ buttonBehaviour?: ButtonBehaviour | ((activeKey: string) => ButtonBehaviour)
3375
+ /**
3376
+ * A callback that is called when the button is pressed.
3377
+ */
3378
+ onButtonAction?: (options: {
3379
+ isSelected: boolean;
3380
+ selectedKey: string;
3381
+ buttonBehaviour: ButtonBehaviour;
3382
+ }) => void
3383
+ /**
3384
+ * A callback that is called when the option in the dropdown is pressed.
3385
+ */
3386
+ onOptionPress?: (e: PressEvent, key: string) => void
3387
+ }`,stories:{usage:[{id:"core-forms-buttonselect--basic",name:"Basic",snippet:'const Basic = () => <ButtonSelect aria-label="Button select" items={items} />;'},{id:"core-forms-buttonselect--variants",name:"Variants",snippet:`const Variants = (args) => (
3388
+ <VariantViewer
3389
+ header={["Enabled", "Selected", "Disabled", "Disabled Selected"]}
3390
+ component={ButtonSelect}
3391
+ variants={{
3392
+ Medium: [
3393
+ { size: "md" },
3394
+ { size: "md", defaultSelected: true },
3395
+ { size: "md", isDisabled: true },
3396
+ { size: "md", isDisabled: true, defaultSelected: true },
3397
+ ],
3398
+ Large: [
3399
+ { size: "lg" },
3400
+ { size: "lg", defaultSelected: true },
3401
+ { size: "lg", isDisabled: true },
3402
+ { size: "lg", isDisabled: true, defaultSelected: true },
3403
+ ],
3404
+ "Without Label Medium": [
3405
+ { size: "md", hideLabel: true },
3406
+ { size: "md", hideLabel: true, defaultSelected: true },
3407
+ { size: "md", hideLabel: true, isDisabled: true },
3408
+ {
3409
+ size: "md",
3410
+ hideLabel: true,
3411
+ isDisabled: true,
3412
+ defaultSelected: true,
3413
+ },
3414
+ ],
3415
+ "Without Label Large": [
3416
+ { size: "lg", hideLabel: true },
3417
+ { size: "lg", hideLabel: true, defaultSelected: true },
3418
+ { size: "lg", hideLabel: true, isDisabled: true },
3419
+ {
3420
+ size: "lg",
3421
+ hideLabel: true,
3422
+ isDisabled: true,
3423
+ defaultSelected: true,
3424
+ },
3425
+ ],
3426
+ }}
3427
+ defaultProps={args}
3428
+ />
3429
+ );`},{id:"core-forms-buttonselect--with-hidden-label",name:"With Hidden Label",snippet:'const WithHiddenLabel = () => <ButtonSelect aria-label="Button select" items={items} hideLabel />;'},{id:"core-forms-buttonselect--without-tooltip",name:"Without Tooltip",snippet:`const WithoutTooltip = () => <ButtonSelect
3430
+ aria-label="Button select"
3431
+ items={items}
3432
+ tooltipProps={{
3433
+ isDisabled: true,
3434
+ }} />;`},{id:"core-forms-buttonselect--default-select-selected-value",name:"Default Select Selected Value",snippet:'const DefaultSelectSelectedValue = () => <ButtonSelect aria-label="Button select" items={items} defaultSelectedKey="polygon" />;'},{id:"core-forms-buttonselect--default-button-selected-value",name:"Default Button Selected Value",snippet:'const DefaultButtonSelectedValue = () => <ButtonSelect aria-label="Button select" items={items} defaultSelected />;'},{id:"core-forms-buttonselect--controlled",name:"Controlled",snippet:'const Controlled = () => <ButtonSelect aria-label="Button select" items={items} selectedKey="polygon" />;'},{id:"core-forms-buttonselect--disabled",name:"Disabled",snippet:`const Disabled = () => <Box display="flex" flexDirection="column" gap="lg">
3435
+ <ButtonSelect aria-label="Button select" items={items} isDisabled />
3436
+ <ButtonSelect aria-label="Button select" items={items} isDisabled selectedKey="ellipse" />
3437
+ </Box>;`},{id:"core-forms-buttonselect--with-default-open",name:"With Default Open",snippet:'const WithDefaultOpen = () => <ButtonSelect aria-label="Button select" items={items} defaultOpen />;'},{id:"core-forms-buttonselect--with-action-behaviour",name:"With Action Behaviour",snippet:`const WithActionBehaviour = () => <ButtonSelect
3438
+ aria-label="Button select"
3439
+ items={items}
3440
+ buttonBehaviour="action"
3441
+ onPress={fn()}
3442
+ onSelectionChange={fn()} />;`},{id:"core-forms-buttonselect--with-individual-button-behaviour",name:"With Individual Button Behaviour",snippet:`const WithIndividualButtonBehaviour = () => <ButtonSelect
3443
+ aria-label="Button select"
3444
+ items={items}
3445
+ buttonBehaviour={(activeKey) =>
3446
+ activeKey === "ellipse" ? "action" : "toggle"}
3447
+ onPress={fn()}
3448
+ onSelectionChange={fn()} />;`},{id:"core-forms-buttonselect--with-disabled-keys",name:"With Disabled Keys",snippet:'const WithDisabledKeys = () => <ButtonSelect aria-label="Button select" items={items} disabledKeys={["square"]} />;'},{id:"core-forms-buttonselect--with-multiple-disabled-keys",name:"With Multiple Disabled Keys",snippet:`const WithMultipleDisabledKeys = () => <ButtonSelect
3449
+ aria-label="Button select"
3450
+ items={items}
3451
+ disabledKeys={["square", "polygon"]} />;`},{id:"core-forms-buttonselect--with-disabled-keys-and-default-selected",name:"With Disabled Keys And Default Selected",snippet:`const WithDisabledKeysAndDefaultSelected = () => <ButtonSelect
3452
+ aria-label="Button select"
3453
+ items={items}
3454
+ disabledKeys={["square"]}
3455
+ defaultSelectedKey="polygon" />;`},{id:"core-forms-buttonselect--with-button-disabled-key",name:"With Button Disabled Key",snippet:'const WithButtonDisabledKey = () => <ButtonSelect aria-label="Button select" items={items} disabledKeys={["ellipse"]} />;'},{id:"core-forms-buttonselect--with-validation-error",name:"With Validation Error",snippet:'const WithValidationError = () => <ButtonSelect aria-label="Button select" items={items} validationState="error" />;'},{id:"core-forms-buttonselect--with-callbacks",name:"With Callbacks",snippet:`const WithCallbacks = () => <ButtonSelect
3456
+ aria-label="Button select"
3457
+ items={items}
3458
+ onPress={fn()}
3459
+ onSelectionChange={fn()}
3460
+ onButtonAction={fn()}
3461
+ onButtonSelectionChange={fn()}
3462
+ onOptionPress={fn()} />;`},{id:"core-forms-buttonselect--controlled-button-selection",name:"Controlled Button Selection",snippet:`const ControlledButtonSelection = () => <ButtonSelect
3463
+ aria-label="Button select"
3464
+ items={items}
3465
+ isSelected
3466
+ onButtonSelectionChange={fn()} />;`},{id:"core-forms-buttonselect--long-text-labels",name:"Long Text Labels",snippet:`const LongTextLabels = () => <ButtonSelect
3467
+ aria-label="Button select"
3468
+ items={[
3469
+ {
3470
+ id: "long-1",
3471
+ label:
3472
+ "This is an extremely long label that should demonstrate overflow",
3473
+ },
3474
+ {
3475
+ id: "long-2",
3476
+ label: "Another very long label to test truncation and layout",
3477
+ },
3478
+ { id: "short", label: "Short" },
3479
+ ]} />;`},{id:"core-forms-buttonselect--many-items",name:"Many Items",snippet:'const ManyItems = () => <ButtonSelect\n aria-label="Button select"\n items={Array.from({ length: 20 }, (_, i) => ({\n id: `item-${i}`,\n label: `Item ${i + 1}`,\n }))}\n defaultOpen />;'},{id:"core-forms-buttonselect--items-without-icons",name:"Items Without Icons",snippet:`const ItemsWithoutIcons = () => <ButtonSelect
3480
+ aria-label="Button select"
3481
+ items={[
3482
+ { id: "option-a", label: "Option A" },
3483
+ { id: "option-b", label: "Option B" },
3484
+ { id: "option-c", label: "Option C" },
3485
+ ]} />;`},{id:"core-forms-buttonselect--exclude-from-tab-order",name:"Exclude From Tab Order",snippet:'const ExcludeFromTabOrder = () => <ButtonSelect aria-label="Button select" items={items} excludeFromTabOrder />;'}],implementation:`import React from "react";
3486
+
3487
+ import { items } from "../../ListBox/__tests__/testComponents";
3488
+ import { ButtonSelect } from "../ButtonSelect";
3489
+
3490
+ import type { ButtonSelectProps } from "../ButtonSelect.types";
3491
+
3492
+ export const ButtonSelectExample: React.FC<Omit<ButtonSelectProps, "items">> = (
3493
+ args,
3494
+ ) => {
3495
+ return (
3496
+ <ButtonSelect
3497
+ optionClassName={(item) => item.label}
3498
+ {...args}
3499
+ items={items}
3500
+ />
3501
+ );
3502
+ };
3503
+
3504
+ export const IndividualButtonBehaviour: React.FC<
3505
+ Omit<ButtonSelectProps, "items">
3506
+ > = (args) => {
3507
+ return (
3508
+ <ButtonSelect
3509
+ buttonBehaviour={(activeKey) =>
3510
+ activeKey === "ellipse" ? "action" : "toggle"
3511
+ }
3512
+ {...args}
3513
+ items={items}
3514
+ aria-label="Shape Options"
3515
+ />
3516
+ );
3517
+ };
3518
+
3519
+ export const ButtonSelectWithTooltipFn: React.FC<
3520
+ Omit<ButtonSelectProps, "items">
3521
+ > = (args) => {
3522
+ return (
3523
+ <ButtonSelect
3524
+ {...args}
3525
+ items={items}
3526
+ hideLabel={true}
3527
+ tooltipProps={(trigger) => ({
3528
+ text: trigger === "button" ? "Custom Button Tip" : "Custom Select Tip",
3529
+ })}
3530
+ />
3531
+ );
3532
+ };
3533
+
3534
+ export const ButtonSelectWithOptionStyleFn: React.FC<
3535
+ Omit<ButtonSelectProps, "items">
3536
+ > = (args) => {
3537
+ return (
3538
+ <ButtonSelect
3539
+ {...args}
3540
+ items={items}
3541
+ optionStyle={(_, { isButton }) => ({
3542
+ backgroundColor: isButton ? "rgb(0, 128, 0)" : "rgb(0, 0, 255)",
3543
+ })}
3544
+ />
3545
+ );
3546
+ };`},similarTo:[],figmaUrl:null},Calendar:{id:"core-forms-calendar",breadcrumb:"Core/Forms/Calendar",importStatement:'import { Box, Calendar, I18nProvider, Select } from "@baseline-ui/core";',description:"`Calendar` presents a monthly grid of dates from which the user can pick a single day. Use it when a date needs to be chosen visually, such as scheduling an event or setting a deadline.",documentation:'`Calendar` presents a monthly grid of dates from which the user can pick a single day. Use it when a date needs to be chosen visually, such as scheduling an event or setting a deadline.\n\n* **Date selection** \u2013 Click or press Enter to select a date\n* **International calendars** \u2013 Supports 13 calendar systems including Gregorian, Buddhist, Islamic, Persian, and more\n* **Keyboard navigation** \u2013 Full arrow key, Page Up/Down, and Home/End support\n* **Accessible** \u2013 Uses `role="grid"` with proper ARIA attributes for screen readers\n* **Size variants** \u2013 Available in `sm` (default) and `xs` sizes\n* **Optional title** \u2013 Displays a calendar icon, title text, and separator above the grid\n\n```jsx\nimport { Calendar } from "@baseline-ui/core";\n\n<Calendar aria-label="Event date" />;\n```\n\nA title bar with a calendar icon and separator can be displayed above the calendar grid.\n\n```jsx\n<Calendar aria-label="Event date" title="Date" />\n```\n\nSet an initial selected date using the `defaultValue` prop with a date from `@internationalized/date`.\n\n```jsx\nimport { parseDate } from "@internationalized/date";\n\n<Calendar\n aria-label="Event date"\n defaultValue={parseDate("2024-09-15")}\n title="Date"\n/>;\n```\n\nThe calendar is available in two sizes: `sm` (default, 320px wide) and `xs` (240px wide).\n\n```jsx\n<Calendar aria-label="Event date" size="xs" title="Date" />\n```\n\n```jsx\n<Calendar aria-label="Event date" size="xs" />\n```\n\nThe `headerVariant` prop controls how the calendar header is displayed. The default is `"title"`, which shows the month and year as plain text between navigation arrows.\n\nUse `headerVariant="selectMonth"` to display the month and year as a dropdown selector with grouped navigation arrows.\n\n```jsx\n<Calendar aria-label="Event date" headerVariant="selectMonth" />\n```\n\n```jsx\n<Calendar aria-label="Event date" headerVariant="selectMonth" title="Date" />\n```\n\nUse `headerVariant="selectMonthAndYear"` to display separate month and year sections, each with their own navigation arrows.\n\n```jsx\n<Calendar aria-label="Event date" headerVariant="selectMonthAndYear" />\n```\n\n```jsx\n<Calendar\n aria-label="Event date"\n headerVariant="selectMonthAndYear"\n title="Date"\n/>\n```\n\nWhen `isDisabled` is true, all dates and navigation buttons become non-interactive.\n\n```jsx\n<Calendar aria-label="Event date" isDisabled />\n```\n\nWhen `isReadOnly` is true, the selected date is visible but cannot be changed.\n\n```jsx\nimport { getLocalTimeZone, today } from "@internationalized/date";\n\n<Calendar\n aria-label="Event date"\n isReadOnly\n defaultValue={today(getLocalTimeZone())}\n/>;\n```\n\nRestrict selectable dates to a range using `minValue` and `maxValue`. Dates outside the range are disabled, and navigation buttons disable at boundaries.\n\n```jsx\nimport { getLocalTimeZone, today } from "@internationalized/date";\n\n<Calendar\n aria-label="Event date"\n minValue={today(getLocalTimeZone())}\n maxValue={today(getLocalTimeZone()).add({ months: 1 })}\n/>;\n```\n\nUse `isDateUnavailable` to mark specific dates as unavailable. These dates display with a strikethrough and cannot be selected.\n\n```jsx\n<Calendar\n aria-label="Event date"\n isDateUnavailable={(date) =>\n date.day === 10 || date.day === 20 || date.day === 25\n }\n/>\n```\n\nCalendar supports various calendar systems used around the world. The calendar system is automatically determined based on the user\'s locale. Wrap the calendar in an `I18nProvider` to override the locale and display a different calendar system.\n\nUse the locale selector below to preview different calendar systems including Buddhist (`th-TH`), Persian (`fa-IR`), Islamic (`ar-SA`), Hebrew (`he-IL-u-ca-hebrew`), Japanese (`ja-JP-u-ca-japanese`), and ROC (`zh-TW-u-ca-roc`).\n\n```jsx\nimport { I18nProvider, Calendar } from "@baseline-ui/core";\nimport { parseDate } from "@internationalized/date";\n\n<I18nProvider locale="th-TH">\n <Calendar aria-label="Event date" defaultValue={parseDate("2024-09-15")} />\n</I18nProvider>;\n```\n\nAn `aria-label` must be provided to the Calendar for accessibility. If the calendar is labeled by a separate visible element, use `aria-labelledby` instead.\n\n```jsx\n{/* Labeling with aria-label */}\n<Calendar aria-label="Appointment date" />\n\n{/* Labeling with a visible element */}\n<label id="date-label">Appointment date</label>\n<Calendar aria-labelledby="date-label" />\n```\n\nWhen the `title` prop is set, it is automatically linked via `aria-labelledby` so no additional labeling prop is needed.\n\n| Selector | Description |\n| ---------------------- | ------------------------------- |\n| `.BaselineUI-Calendar` | Root container element |\n| `[data-selected]` | Selected date cell |\n| `[data-disabled]` | Disabled date cell |\n| `[data-unavailable]` | Unavailable date cell |\n| `[data-outside-month]` | Date cell outside current month |\n| `[data-focus-visible]` | Keyboard-focused cell |\n| `[data-hovered]` | Hovered date cell |\n| `[data-today]` | Today\'s date cell |\n\n| Key | Function |\n| ----------------- | ------------------------------------------------ |\n| `ArrowRight` | Move focus to the next day |\n| `ArrowLeft` | Move focus to the previous day |\n| `ArrowDown` | Move focus to the same day in the next week |\n| `ArrowUp` | Move focus to the same day in the previous week |\n| `PageDown` | Move focus to the same day in the next month |\n| `PageUp` | Move focus to the same day in the previous month |\n| `Home` | Move focus to the first day of the month |\n| `End` | Move focus to the last day of the month |\n| `Enter` / `Space` | Select the focused date |\n\n* **[RangeCalendar](/docs/core-forms-rangecalendar--docs)** \u2013 For selecting a date range instead of a single date\n* **[DateField](/docs/core-forms-datefield--docs)** \u2013 For keyboard-based date input with individual editable segments',props:`interface CalendarProps {
3362
3547
  /**
3363
3548
  * @deprecated Do not use in new components. This is a legacy block
3364
3549
  * identifier; new components should exclude it via
@@ -3570,14 +3755,21 @@ export const UnavailableCalendarExample: React.FC<
3570
3755
  export const InternationalCalendarExample: React.FC<
3571
3756
  Omit<CalendarProps, "defaultValue" | "value"> & {
3572
3757
  defaultValue?: string;
3758
+ /** Era of \`defaultValue\`, e.g. \`"BC"\`, which an ISO date string cannot express. */
3759
+ defaultValueEra?: string;
3573
3760
  locale: string;
3574
3761
  }
3575
- > = ({ defaultValue, locale, ...rest }) => {
3762
+ > = ({ defaultValue, defaultValueEra, locale, ...rest }) => {
3763
+ const date = defaultValue ? parseDate(defaultValue) : undefined;
3576
3764
  return (
3577
3765
  <I18nProvider locale={locale}>
3578
3766
  <Calendar
3579
3767
  {...rest}
3580
- defaultValue={defaultValue ? parseDate(defaultValue) : undefined}
3768
+ defaultValue={
3769
+ date && defaultValueEra
3770
+ ? new CalendarDate(defaultValueEra, date.year, date.month, date.day)
3771
+ : date
3772
+ }
3581
3773
  />
3582
3774
  </I18nProvider>
3583
3775
  );
@@ -4078,14 +4270,21 @@ export const UnavailableCalendarExample: React.FC<
4078
4270
  export const InternationalCalendarExample: React.FC<
4079
4271
  Omit<CalendarProps, "defaultValue" | "value"> & {
4080
4272
  defaultValue?: string;
4273
+ /** Era of \`defaultValue\`, e.g. \`"BC"\`, which an ISO date string cannot express. */
4274
+ defaultValueEra?: string;
4081
4275
  locale: string;
4082
4276
  }
4083
- > = ({ defaultValue, locale, ...rest }) => {
4277
+ > = ({ defaultValue, defaultValueEra, locale, ...rest }) => {
4278
+ const date = defaultValue ? parseDate(defaultValue) : undefined;
4084
4279
  return (
4085
4280
  <I18nProvider locale={locale}>
4086
4281
  <Calendar
4087
4282
  {...rest}
4088
- defaultValue={defaultValue ? parseDate(defaultValue) : undefined}
4283
+ defaultValue={
4284
+ date && defaultValueEra
4285
+ ? new CalendarDate(defaultValueEra, date.year, date.month, date.day)
4286
+ : date
4287
+ }
4089
4288
  />
4090
4289
  </I18nProvider>
4091
4290
  );
@@ -4343,7 +4542,9 @@ includePicker?: boolean
4343
4542
  * that is currently selected. If boolean, the label will be shown only when
4344
4543
  * the color is not \`null\`. If a function, the function will be called with
4345
4544
  * the current color and should return a string. If \`false\`, the label will
4346
- * not be shown.
4545
+ * not be shown, but the default trigger's accessible name still includes the
4546
+ * color name. A custom \`renderTriggerButton\` receives \`colorName: false\` and
4547
+ * is responsible for naming its trigger.
4347
4548
  *
4348
4549
  * @default true
4349
4550
  */
@@ -4523,10 +4724,13 @@ import { presets } from "./data";
4523
4724
 
4524
4725
  import type { ColorInputProps, IconColorInputProps } from "../ColorInput.types";
4525
4726
 
4526
- export const CustomTriggerButton = () => {
4727
+ export const CustomTriggerButton: React.FC<
4728
+ Omit<ColorInputProps, "renderTriggerButton">
4729
+ > = (props) => {
4527
4730
  return (
4528
4731
  <ColorInput
4529
4732
  label="label"
4733
+ presets={presets}
4530
4734
  renderTriggerButton={({ colorName, ref, triggerProps }) => (
4531
4735
  <ActionIconButton
4532
4736
  {...triggerProps}
@@ -4536,6 +4740,7 @@ export const CustomTriggerButton = () => {
4536
4740
  aria-haspopup="true"
4537
4741
  />
4538
4742
  )}
4743
+ {...props}
4539
4744
  />
4540
4745
  );
4541
4746
  };
@@ -4636,6 +4841,10 @@ export const StoredCustomColorsExample: React.FC<{ storageKey: string }> = ({
4636
4841
  />
4637
4842
  );
4638
4843
 
4844
+ export const RedPresetColorInput: React.FC<ColorInputProps> = (props) => (
4845
+ <ColorInput presets={presets} defaultValue="#ff0000" {...props} />
4846
+ );
4847
+
4639
4848
  export const IconColorInputExample: React.FC<
4640
4849
  Omit<IconColorInputProps, "icon">
4641
4850
  > = (props) => <IconColorInput icon={BorderColorIcon} {...props} />;
@@ -7929,7 +8138,15 @@ export const DrawerWithActionExample: React.FC<{
7929
8138
  Drawer Content
7930
8139
  </Drawer>
7931
8140
  );
7932
- };`},similarTo:[],figmaUrl:null},Editor:{id:"core-miscellaneous-editor",breadcrumb:"Core/Miscellaneous/Editor",importStatement:'import { Editor, HeadlessCustomEditor } from "@baseline-ui/core";',description:"`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.",documentation:'`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.\n\n* supports rich text editing, including bold, italic and underline formatting.\n* supports font color and background color formatting\n* supports link creation, editing and removal\n* supports plain text editing\n* supports mouse, keyboard and touch interactions.\n* Exposed to the screen-readers and other assistive technologies using ARIA.\n* Mention support with user search and keyboard navigation\n* Keyboard shortcuts for common actions (submit, toolbar focus, help)\n* Imperative handle API (`editorHandle`) for programmatic focus and caret positioning\n* Custom footer buttons (action and toggle types)\n* Clear on save/cancel behavior\n* Auto-focus with configurable caret position\n\nYou can import the Editor component like so:\n\n```jsx\nimport { Editor } from "@baseline-ui/core";\n\nexport default function App() {\n return (\n <Editor\n aria-label="Comment"\n placeholder="Write a comment..."\n onSave={(value) => {\n console.log(value);\n }}\n />\n );\n}\n```\n\nIf you only need a single-line plain text input, use the `TextInput` component instead.\n\nThe `Editor` component has multiple variants that can be used to customize the appearance and behavior of the component.\n\n* `default` - the default variant\n* `minimal` - a minimal variant that removes the toolbar and only allows plain text editing.\n\n```jsx\n<Editor\n aria-label="Editor"\n variant="minimal"\n avatarName="John Doe"\n spellCheck={false}\n placeholder="Type something..."\n defaultValue="This is a minimal editor"\n/>\n```\n\nIn the example above, the `variant` prop is used to set the variant to `minimal`. This removes the toolbar and only allows plain text editing.\nThe first editor passes `isInline={false}`; the second one keeps the default inline rendering, which shows the avatar (set via `avatarName`) next to the input.\n\nYou can enable rich text editing by setting the `enableRichText` prop to `true`. This will enable the rich text toolbar and allow users to format the text. The default value is `false`.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="<p>This is a rich editor. It supports <b>bold</b>, <i>italic</i>, and <u>underline</u>. <a href=\'https://example.com\'>Links</a> are also supported.</p><br/><p>You can set both <span style=\'color: #ac0000; background-color: #ffffff;\'>font color</span> and <span style=\'background-color: #ffff00; color: #000000;\'>background color</span>.</p>"\n/>\n```\n\nYou can set a placeholder for the editor by using the `placeholder` prop. This will display a placeholder when the editor is empty.\n\nThe `Editor` component can be controlled by using the `value` and `onChange` props together. This allows you to control the value of the editor from the parent component, in both plain text and rich text mode.\n\nFor uncontrolled usage, set the initial content with `defaultValue` and read edits via `onChange` or `onSave` \u2014 the editor manages its own state afterwards.\n\nFor backwards compatibility, passing `value` without `onChange` in rich text mode sets the initial content only (it behaves like `defaultValue`), matching the behavior of earlier versions.\n\nThe same pattern works in rich text mode \u2014 controlled rich text requires both `value` and `onChange`:\n\n```jsx\nfunction ControlledRichTextEditor() {\n const [value, setValue] = React.useState(\n "<p>This is a <b>controlled</b> rich text editor</p>",\n );\n\n return (\n <Editor\n aria-label="Editor"\n enableRichText\n placeholder="Type something..."\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n }}\n />\n );\n}\n```\n\nThe `Editor` component can be disabled by using the `isDisabled` prop. This will disable the editor and prevent users from editing the content.\n\nThe `Editor` component supports mentions. You can enable mentions by passing the `mentionableUsers` prop, an array of `MentionableUser` objects with required `id`, `name`, and `displayName` properties, plus optional `avatar` and `description`. The `id` should be unique for each user, `name` is the username matched while typing, and `displayName` is the label rendered for the mention.\nThe mentions feature only works when `enableRichText` is set to `true`. Users can start a mention by typing `@` in the editor or by pressing the mention (@) button in the footer.\nPasted or dropped mentions are checked against `mentionableUsers`: a mention of a listed user takes that user\'s label, and any other mention, including every mention while `mentionableUsers` is undefined, becomes plain `@Name` text. This also applies when users cut and paste or drag a mention within the editor.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="Mentioning <span data-user-id=\'john-doe\'>John Doe</span>."\n mentionableUsers={[\n {\n id: "1",\n name: "john.doe",\n displayName: "John Doe",\n description: "john@gmail.com",\n },\n {\n id: "2",\n name: "jane.doe",\n displayName: "Jane Doe",\n description: "jane@gmail.com",\n },\n ]}\n/>\n```\n\nYou can add custom buttons to the footer by using the `footerButtons` prop. This prop is an array of objects of the shape `{ type: "action" | "toggle", props: {...} }`, where `props` accepts the `ActionIconButton` props (for `type: "action"`) or the `ToggleIconButton` props (for `type: "toggle"`), except `size` and `variant`, which are set by the editor.\n\n```jsx\nimport { AnonymousIcon } from "@baseline-ui/icons/16";\n\n<Editor\n aria-label="Editor"\n enableRichText\n footerButtons={[\n {\n type: "toggle",\n props: {\n "aria-label": "Save",\n icon: AnonymousIcon,\n onPress: () => {\n alert("Save");\n },\n },\n },\n ]}\n/>;\n```\n\n| Key | Function |\n| ------------------------------ | -------------------------------------------------------- |\n| `Ctrl+B` / `Cmd+B` | Toggle bold (rich text mode) |\n| `Ctrl+I` / `Cmd+I` | Toggle italic (rich text mode) |\n| `Ctrl+U` / `Cmd+U` | Toggle underline (rich text mode) |\n| `Ctrl+Z` / `Cmd+Z` | Undo (rich text mode) |\n| `Ctrl+Shift+Z` / `Cmd+Shift+Z` | Redo (rich text mode) |\n| `Ctrl+Y` | Redo (rich text mode) |\n| `@` | Start a mention (rich text mode with `mentionableUsers`) |\n| `Alt+F10` | Focus toolbar (rich text mode) |\n| `Ctrl+Enter` / `Cmd+Enter` | Submit (always) |\n| `Enter` | Submit (when `saveOnEnter` is true) |\n| `Shift+Enter` | New line |\n| `Ctrl+Shift+H` / `Cmd+Shift+H` | Open help dialog (rich text mode) |\n| `Escape` | Close mention input / help dialog |\n| `Tab` | Focus next |\n| `Shift+Tab` | Focus previous |\n\nWhen `saveOnEnter` is set to `true`, pressing the `Enter` key will submit the editor instead of creating a new line. This is useful for single-line text inputs or quick note-taking scenarios.\n\nThe `clearOnSave` and `clearOnCancel` props clear the editor content after the respective action completes. These are useful for resetting the editor after submission or cancellation.\n\nThe `autoFocus` prop allows you to focus the editor on mount with optional caret positioning:\n\n* `true` - Focus on mount, caret at default position\n* `"start"` - Focus on mount, caret at position 0\n* `"end"` - Focus on mount, caret at end of text\n\nThe `editorHandle` ref provides imperative methods for programmatic control:\n\n* `focus()` - Focus the editor\n* `setCaretPosition(index)` - Position the caret at a specific index\n\nThe `isSaveDisabled` prop disables only the save button while keeping the editor content functional. This is different from `isDisabled`, which disables both the editor and buttons.\n\nThe `maxMentionableUsersSuggestions` prop controls how many mention suggestions are displayed when the user types `@`. This is useful for large user lists where you want to limit the visible suggestions.\n\nThe `spellCheck` prop enables or disables browser spell checking in the editor.\n\nIn rich text mode, the editor includes a built-in help dialog that lists all available keyboard shortcuts (formatting, clipboard, undo/redo, submit). It opens as a modal overlay when the user presses `Ctrl+Shift+H` / `Cmd+Shift+H` while the editor has focus, and closes with `Escape` or the close button.\n\nUse the headless editor APIs when you need the rich-text engine without the default `Editor` chrome. This is useful for custom toolbars, inline editors embedded in other components, or experiences that need to render their own controls while reusing Baseline UI\'s rich-text model, keyboard shortcuts, selection handling, undo/redo, and HTML serialization.\n\n```jsx\nimport {\n EditorProvider,\n useEditable,\n useEditor,\n useEditorContext,\n} from "@baseline-ui/core";\n\nfunction FormattingToolbar() {\n const editor = useEditorContext();\n\n return (\n <button\n aria-pressed={editor.isMarkActive("bold")}\n onClick={() => editor.toggleMark("bold")}\n type="button"\n >\n Bold\n </button>\n );\n}\n\nfunction CustomRichTextEditor() {\n const editor = useEditor({\n defaultValue: "<p>Hello <b>world</b></p>",\n onChange: (html) => {\n console.log(html);\n },\n });\n const { editableProps } = useEditable(editor);\n\n return (\n <EditorProvider editor={editor}>\n <FormattingToolbar />\n <div {...editableProps} style={{ whiteSpace: "pre-wrap" }} />\n </EditorProvider>\n );\n}\n```\n\nThe headless API is split into these parts:\n\n| API | Purpose |\n| ------------------ | ------------------------------------------------------------------------ |\n| `useEditor` | Creates one rich-text editor instance and returns the `EditorState` API. |\n| `useEditable` | Attaches an `EditorState` to a `contenteditable` element. |\n| `EditorProvider` | Provides an editor instance to nested toolbar controls. |\n| `useEditorContext` | Reads the nearest provided editor instance. |\n| `EditorCore` | Framework-free engine escape hatch for advanced integrations. |\n\n`EditorState` exposes reactive state (`value`, `isEmpty`, `selectionState`, `canUndo`, `canRedo`, `isDisabled`) and imperative methods (`focus`, `setValue`, `getValue`, `undo`, `redo`, `exec`, `toggleMark`, `setMark`). For custom keyboard behavior, pass `onKeyDown` to `useEditable`; return `true` when you handled the event to skip the built-in shortcuts.\n\nStyle the editable element with `white-space: pre-wrap` (the built-in `Editor` does this internally). This preserves significant whitespace \u2014 leading, trailing, and consecutive spaces \u2014 which would otherwise collapse when the editor re-renders from its model, making a trailing space appear not to be inserted.\n\n| Selector | Description |\n| ------------------------------------------- | ----------------------------------------- |\n| `.BaselineUI-Editor` | Root container element |\n| `.BaselineUI-Editor-Save` | Save/submit button |\n| `.BaselineUI-Editor-Cancel` | Cancel button |\n| `.BaselineUI-Editor-Footer` | Footer toolbar containing action buttons |\n| `.BaselineUI-Editor-Mention` | Mention (@) button in footer |\n| `.BaselineUI-Editor-RichEditorToolbar` | Rich text formatting toolbar |\n| `.BaselineUI-Editor-RichEditorEditingArea` | Rich text contenteditable area |\n| `.BaselineUI-Editor-RichEditorPlaceholder` | Rich text empty-state placeholder overlay |\n| `.BaselineUI-Editor-PlainEditorEditingArea` | Plain text textarea element |\n\n`@baseline-ui/test-utils` ships a Playwright tester for the Editor so component and E2E specs don\'t have to relearn its markup. Build one from a frame and use its locators instead of hand-rolled selectors or translated labels:\n\n```ts\nimport { testers } from "@baseline-ui/test-utils";\n\nconst editor = testers(frame).editor();\n\nawait editor.textbox.fill("Hello");\nawait editor.boldButton.click();\nawait editor.openLinkDialog();\nawait editor.linkInput.fill("https://example.com");\nawait editor.linkAddButton.click();\nawait editor.startMention();\nawait editor.mentionOption("John Doe").click();\n```\n\nThe tester works in both modes \u2014 `textbox` resolves to the rich text contenteditable or the plain-mode `<textarea>` (both expose `role="textbox"`), and the rich-text-only surface (toolbar, link dialog, mention dropdown, help dialog) simply won\'t match when `enableRichText` is off. Pass a `root` locator when more than one Editor is mounted in the same frame:\n\n```ts\nconst editor = testers(frame).editor({\n root: frame.locator(".BaselineUI-Editor").first(),\n});\n```\n\nLocators are backed by stable `data-testid`s on the component (e.g. `editor-bold-button`, `editor-link-input`, `editor-help-dialog-close-button`) rather than accessible names, so they stay reliable across translations. The disclosure helpers (`openFontColorPicker`, `openBackgroundColorPicker`, `openLinkDialog`, `openHelpDialog`, `startMention`) are idempotent and no-op when the target surface is already open.',props:`interface EditorProps {
8141
+ };`},similarTo:[],figmaUrl:null},Editor:{id:"core-miscellaneous-editor",breadcrumb:"Core/Miscellaneous/Editor",importStatement:`import {
8142
+ Editor,
8143
+ HeadlessClipboardHooksDemo,
8144
+ HeadlessCustomEditor,
8145
+ HeadlessDocumentModelDemo,
8146
+ HeadlessHtmlStylesDemo,
8147
+ HeadlessMaxLengthDemo,
8148
+ HeadlessParagraphsDemo,
8149
+ } from "@baseline-ui/core";`,description:"`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.",documentation:'`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.\n\n* supports rich text editing, including bold, italic and underline formatting.\n* supports font color and background color formatting\n* supports link creation, editing and removal\n* supports plain text editing\n* supports mouse, keyboard and touch interactions.\n* Exposed to the screen-readers and other assistive technologies using ARIA.\n* Mention support with user search and keyboard navigation\n* Keyboard shortcuts for common actions (submit, toolbar focus, help)\n* Imperative handle API (`editorHandle`) for programmatic focus and caret positioning\n* Custom footer buttons (action and toggle types)\n* Clear on save/cancel behavior\n* Auto-focus with configurable caret position\n\nYou can import the Editor component like so:\n\n```jsx\nimport { Editor } from "@baseline-ui/core";\n\nexport default function App() {\n return (\n <Editor\n aria-label="Comment"\n placeholder="Write a comment..."\n onSave={(value) => {\n console.log(value);\n }}\n />\n );\n}\n```\n\nIf you only need a single-line plain text input, use the `TextInput` component instead.\n\nThe `Editor` component has multiple variants that can be used to customize the appearance and behavior of the component.\n\n* `default` - the default variant\n* `minimal` - a minimal variant that removes the toolbar and only allows plain text editing.\n\n```jsx\n<Editor\n aria-label="Editor"\n variant="minimal"\n avatarName="John Doe"\n spellCheck={false}\n placeholder="Type something..."\n defaultValue="This is a minimal editor"\n/>\n```\n\nIn the example above, the `variant` prop is used to set the variant to `minimal`. This removes the toolbar and only allows plain text editing.\nThe first editor passes `isInline={false}`; the second one keeps the default inline rendering, which shows the avatar (set via `avatarName`) next to the input.\n\nYou can enable rich text editing by setting the `enableRichText` prop to `true`. This will enable the rich text toolbar and allow users to format the text. The default value is `false`.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="<p>This is a rich editor. It supports <b>bold</b>, <i>italic</i>, and <u>underline</u>. <a href=\'https://example.com\'>Links</a> are also supported.</p><br/><p>You can set both <span style=\'color: #ac0000; background-color: #ffffff;\'>font color</span> and <span style=\'background-color: #ffff00; color: #000000;\'>background color</span>.</p>"\n/>\n```\n\nYou can set a placeholder for the editor by using the `placeholder` prop. This will display a placeholder when the editor is empty.\n\nThe `Editor` component can be controlled by using the `value` and `onChange` props together. This allows you to control the value of the editor from the parent component, in both plain text and rich text mode.\n\nFor uncontrolled usage, set the initial content with `defaultValue` and read edits via `onChange` or `onSave` \u2014 the editor manages its own state afterwards.\n\nFor backwards compatibility, passing `value` without `onChange` in rich text mode sets the initial content only (it behaves like `defaultValue`), matching the behavior of earlier versions.\n\nThe same pattern works in rich text mode \u2014 controlled rich text requires both `value` and `onChange`:\n\n```jsx\nfunction ControlledRichTextEditor() {\n const [value, setValue] = React.useState(\n "<p>This is a <b>controlled</b> rich text editor</p>",\n );\n\n return (\n <Editor\n aria-label="Editor"\n enableRichText\n placeholder="Type something..."\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n }}\n />\n );\n}\n```\n\nThe `Editor` component can be disabled by using the `isDisabled` prop. This will disable the editor and prevent users from editing the content.\n\nThe `Editor` component supports mentions. You can enable mentions by passing the `mentionableUsers` prop, an array of `MentionableUser` objects with required `id`, `name`, and `displayName` properties, plus optional `avatar` and `description`. The `id` should be unique for each user, `name` is the username matched while typing, and `displayName` is the label rendered for the mention.\nThe mentions feature only works when `enableRichText` is set to `true`. Users can start a mention by typing `@` in the editor or by pressing the mention (@) button in the footer.\nPasted or dropped mentions are checked against `mentionableUsers`: a mention of a listed user takes that user\'s label, and any other mention, including every mention while `mentionableUsers` is undefined, becomes plain `@Name` text. This also applies when users cut and paste or drag a mention within the editor.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="Mentioning <span data-user-id=\'john-doe\'>John Doe</span>."\n mentionableUsers={[\n {\n id: "1",\n name: "john.doe",\n displayName: "John Doe",\n description: "john@gmail.com",\n },\n {\n id: "2",\n name: "jane.doe",\n displayName: "Jane Doe",\n description: "jane@gmail.com",\n },\n ]}\n/>\n```\n\nYou can add custom buttons to the footer by using the `footerButtons` prop. This prop is an array of objects of the shape `{ type: "action" | "toggle", props: {...} }`, where `props` accepts the `ActionIconButton` props (for `type: "action"`) or the `ToggleIconButton` props (for `type: "toggle"`), except `size` and `variant`, which are set by the editor.\n\n```jsx\nimport { AnonymousIcon } from "@baseline-ui/icons/16";\n\n<Editor\n aria-label="Editor"\n enableRichText\n footerButtons={[\n {\n type: "toggle",\n props: {\n "aria-label": "Save",\n icon: AnonymousIcon,\n onPress: () => {\n alert("Save");\n },\n },\n },\n ]}\n/>;\n```\n\n| Key | Function |\n| ------------------------------ | -------------------------------------------------------- |\n| `Ctrl+B` / `Cmd+B` | Toggle bold (rich text mode) |\n| `Ctrl+I` / `Cmd+I` | Toggle italic (rich text mode) |\n| `Ctrl+U` / `Cmd+U` | Toggle underline (rich text mode) |\n| `Ctrl+Z` / `Cmd+Z` | Undo (rich text mode) |\n| `Ctrl+Shift+Z` / `Cmd+Shift+Z` | Redo (rich text mode) |\n| `Ctrl+Y` | Redo (rich text mode) |\n| `@` | Start a mention (rich text mode with `mentionableUsers`) |\n| `Alt+F10` | Focus toolbar (rich text mode) |\n| `Ctrl+Enter` / `Cmd+Enter` | Submit (always) |\n| `Enter` | Submit (when `saveOnEnter` is true) |\n| `Shift+Enter` | New line |\n| `Ctrl+Shift+H` / `Cmd+Shift+H` | Open help dialog (rich text mode) |\n| `Escape` | Close mention input / help dialog |\n| `Tab` | Focus next |\n| `Shift+Tab` | Focus previous |\n\nWhen `saveOnEnter` is set to `true`, pressing the `Enter` key will submit the editor instead of creating a new line. This is useful for single-line text inputs or quick note-taking scenarios.\n\nThe `clearOnSave` and `clearOnCancel` props clear the editor content after the respective action completes. These are useful for resetting the editor after submission or cancellation.\n\nThe `autoFocus` prop allows you to focus the editor on mount with optional caret positioning:\n\n* `true` - Focus on mount, caret at default position\n* `"start"` - Focus on mount, caret at position 0\n* `"end"` - Focus on mount, caret at end of text\n\nThe `editorHandle` ref provides imperative methods for programmatic control:\n\n* `focus()` - Focus the editor\n* `setCaretPosition(index)` - Position the caret at a specific index\n\nThe `isSaveDisabled` prop disables only the save button while keeping the editor content functional. This is different from `isDisabled`, which disables both the editor and buttons.\n\nThe `maxMentionableUsersSuggestions` prop controls how many mention suggestions are displayed when the user types `@`. This is useful for large user lists where you want to limit the visible suggestions.\n\nThe `spellCheck` prop enables or disables browser spell checking in the editor.\n\nIn rich text mode, the editor includes a built-in help dialog that lists all available keyboard shortcuts (formatting, clipboard, undo/redo, submit). It opens as a modal overlay when the user presses `Ctrl+Shift+H` / `Cmd+Shift+H` while the editor has focus, and closes with `Escape` or the close button.\n\nUse the headless editor APIs when you need the rich-text engine without the default `Editor` chrome. This is useful for custom toolbars, inline editors embedded in other components, or experiences that need to render their own controls while reusing Baseline UI\'s rich-text model, keyboard shortcuts, selection handling, undo/redo, and HTML serialization.\n\n```jsx\nimport {\n EditorProvider,\n useEditable,\n useEditor,\n useEditorContext,\n} from "@baseline-ui/core";\n\nfunction FormattingToolbar() {\n const editor = useEditorContext();\n\n return (\n <button\n aria-pressed={editor.isMarkActive("bold")}\n onClick={() => editor.toggleMark("bold")}\n type="button"\n >\n Bold\n </button>\n );\n}\n\nfunction CustomRichTextEditor() {\n const editor = useEditor({\n defaultValue: "<p>Hello <b>world</b></p>",\n onChange: (html) => {\n console.log(html);\n },\n });\n const { editableProps } = useEditable(editor);\n\n return (\n <EditorProvider editor={editor}>\n <FormattingToolbar />\n <div {...editableProps} style={{ whiteSpace: "pre-wrap" }} />\n </EditorProvider>\n );\n}\n```\n\nThe headless API is split into these parts:\n\n| API | Purpose |\n| ------------------ | ------------------------------------------------------------------------ |\n| `useEditor` | Creates one rich-text editor instance and returns the `EditorState` API. |\n| `useEditable` | Attaches an `EditorState` to a `contenteditable` element. |\n| `EditorProvider` | Provides an editor instance to nested toolbar controls. |\n| `useEditorContext` | Reads the nearest provided editor instance. |\n| `EditorCore` | Framework-free engine escape hatch for advanced integrations. |\n\n`EditorState` exposes reactive state (`value`, `isEmpty`, `selectionState`, `canUndo`, `canRedo`, `isDisabled`) and imperative methods (`focus`, `setValue`, `getValue`, `undo`, `redo`, `exec`, `toggleMark`, `setMark`). For custom keyboard behavior, pass `onKeyDown` to `useEditable`; return `true` when you handled the event to skip the built-in shortcuts.\n\nIn `selectionState.marks`, `bold`, `italic` and `underline` are `true` when every selected text run has the mark, `false` when none does, and absent when the selection mixes both. At a collapsed caret, and when there is no selection, they are always `true` or `false`, including a mark toggled for the next typed text. `color`, `backgroundColor`, `fontFamily` and `fontSize` hold the value every selected run shares, are absent when no run sets one, and are `null` when the runs differ.\n\n`select(range)` selects a `ModelRange`, and `getSelectionState()` returns the selection state computed at that moment. Unlike the reactive `selectionState`, which updates on the next render, it reflects a selection made in the same tick. `select` also calls `onSelectionChange` when the selection differs from the current one.\n\n`getDocPlainText(doc)` returns a document as plain text, and `docStart(doc)`, `docEnd(doc)` and `comparePoints(a, b)` build and order the points `select` takes.\n\n`EditorState` also exposes the document model directly. `getDoc(range?)` returns the whole document, or a copy of the selected fragment when given a range. `setDoc(doc)` replaces the document and clears undo history; it does nothing when given the current document or one with the same content, and emits `onChange`/`onDocChange` only with `{ emit: true }`. `selectAll()` selects the full document.\n\n`useEditor` accepts `doc` and `defaultDoc` as an alternative to `value` and `defaultValue`, and `onDocChange` receives the document after every change alongside `onChange`. Pass either the document form or the HTML form: `useEditor` throws when a document form is combined with `value` or `defaultValue`, or when `doc` and `defaultDoc` are both given.\n\n`setMark` accepts `color`, `backgroundColor`, `fontFamily` and `fontSize`. Text nodes carry `fontFamily` and `fontSize`, and paragraphs carry `textAlign`. All three are opaque strings: the editor stores, renders and serializes them as given (`font-family`, `font-size` and `text-align` styles) and does not validate or convert units. A value the browser cannot parse is dropped from the rendered style, so the first native edit anywhere in the editor drops it from the document too. With a collapsed selection, `setMark` applies to the next typed text. A soft line break continues the formatting you were writing in: the marks active at the caret, replaced by any pending marks set or cleared with `setMark` or `toggleMark`, so the text typed after the break keeps them.\n\n`htmlStyles` lists the CSS properties the editor keeps when it parses `value`, `defaultValue` and `setValue` HTML. It defaults to `["color", "backgroundColor"]`, so `fontFamily`, `fontSize` and paragraph `textAlign` in that HTML survive only when you list them. Everything the editor renders itself is unaffected: a `doc` or `defaultDoc`, marks set with `setMark`, anything inserted through `exec` and text typed or edited natively keep every style the document carries. Pasted and dropped HTML always keeps only `color` and `backgroundColor`: HTML copied from other apps carries their fonts and sizes, which would override your own typography. Return a document from `onPaste` to keep more.\n\nEnter inserts a soft line break by default. Pass `enterInsertsParagraph` to `useEditor` and Enter splits the paragraph at the caret instead, keeping the paragraph\'s `textAlign` on both halves and carrying the marks at the caret into the new paragraph; Shift+Enter still inserts a soft break. `exec("insertParagraph")` does the same from code: it deletes the selection, splits the paragraph in one undo step and counts the paragraph break towards `maxLength`.\n\n`exec("insertText", text)` applies the pending marks at the caret to the inserted text, as typing does, and then clears them. When an edit leaves the document empty, such as deleting a selection that covers everything or selecting all and pressing Backspace, the formatting of the first deleted character stays pending, so the next text typed or inserted keeps it and `selectionState.marks` reports it.\n\n`onPaste(event)` runs before the default paste handling. Return a document to insert it as a fragment at the selection, `null` to swallow the paste, or `undefined` to fall through to the default behavior. Pasted HTML always drops its font family, font size and text alignment, so return a document from `onPaste` to keep them. A returned document, like any fragment inserted with `exec("insertFragment")`, merges into the paragraph at the caret, so its first and last paragraphs take that paragraph\'s `textAlign`. Drops do not go through `onPaste`. If `onPaste` throws, the paste is swallowed and the error is rethrown asynchronously.\n\n`onCopy(event, fragment)` receives the selected fragment as a document. It runs for copy and cut, including when the selection starts on a mention. With a collapsed selection `fragment` is an empty document, so you can copy the whole document with `getDoc()` instead; cut then deletes nothing. Return `true` once you have written the clipboard yourself, which prevents the default copy. For cut, the selected content is then deleted unless the editor is read-only.\n\n`maxLength` caps the document length and must be a finite integer of at least 0; anything else throws. A mention that would exceed it is not inserted. A paragraph break counts as one character. Typed and pasted text is cut at the insertion point, soft breaks and paragraph splits are refused at the limit, and IME input that overflows is cut just before the caret. A selection that is being replaced frees up its own capacity, and a document that is already over the limit is kept but cannot grow.\n\nStyle the editable element with `white-space: pre-wrap` (the built-in `Editor` does this internally). This preserves significant whitespace \u2014 leading, trailing, and consecutive spaces \u2014 which would otherwise collapse when the editor re-renders from its model, making a trailing space appear not to be inserted.\n\n| Selector | Description |\n| ------------------------------------------- | ----------------------------------------- |\n| `.BaselineUI-Editor` | Root container element |\n| `.BaselineUI-Editor-Save` | Save/submit button |\n| `.BaselineUI-Editor-Cancel` | Cancel button |\n| `.BaselineUI-Editor-Footer` | Footer toolbar containing action buttons |\n| `.BaselineUI-Editor-Mention` | Mention (@) button in footer |\n| `.BaselineUI-Editor-RichEditorToolbar` | Rich text formatting toolbar |\n| `.BaselineUI-Editor-RichEditorEditingArea` | Rich text contenteditable area |\n| `.BaselineUI-Editor-RichEditorPlaceholder` | Rich text empty-state placeholder overlay |\n| `.BaselineUI-Editor-PlainEditorEditingArea` | Plain text textarea element |\n\nThe rich text content carries stable data attributes, so you can style or query it without relying on its element structure. Every text run renders in its own `span`, including runs without any formatting, and an empty line renders a `span` too, so each line has a box you can measure.\n\n| Selector | Marks |\n| ------------------------------------ | ----------------------------------------------------------------- |\n| `[data-editor-root]` | The editable element |\n| `[data-editor-node="paragraph"]` | A paragraph |\n| `[data-editor-node="text"]` | A run of text; bold, italic and underline wrap the text inside it |\n| `[data-editor-node="break"]` | A soft line break |\n| `[data-editor-node="link"]` | A link |\n| `[data-editor-node="mention"]` | A mention |\n| `[data-editor-node="mention-input"]` | The mention being typed |\n\nAn extra `<br data-editor-filler="true">` keeps an empty line, or the line after a trailing break, reachable by the caret. It is not part of the document.\n\n`@baseline-ui/test-utils` ships a Playwright tester for the Editor so component and E2E specs don\'t have to relearn its markup. Build one from a frame and use its locators instead of hand-rolled selectors or translated labels:\n\n```ts\nimport { testers } from "@baseline-ui/test-utils";\n\nconst editor = testers(frame).editor();\n\nawait editor.textbox.fill("Hello");\nawait editor.boldButton.click();\nawait editor.openLinkDialog();\nawait editor.linkInput.fill("https://example.com");\nawait editor.linkAddButton.click();\nawait editor.startMention();\nawait editor.mentionOption("John Doe").click();\n```\n\nThe tester works in both modes \u2014 `textbox` resolves to the rich text contenteditable or the plain-mode `<textarea>` (both expose `role="textbox"`), and the rich-text-only surface (toolbar, link dialog, mention dropdown, help dialog) simply won\'t match when `enableRichText` is off. Pass a `root` locator when more than one Editor is mounted in the same frame:\n\n```ts\nconst editor = testers(frame).editor({\n root: frame.locator(".BaselineUI-Editor").first(),\n});\n```\n\nLocators are backed by stable `data-testid`s on the component (e.g. `editor-bold-button`, `editor-link-input`, `editor-help-dialog-close-button`) rather than accessible names, so they stay reliable across translations. The disclosure helpers (`openFontColorPicker`, `openBackgroundColorPicker`, `openLinkDialog`, `openHelpDialog`, `startMention`) are idempotent and no-op when the target surface is already open.',props:`interface EditorProps {
7933
8150
  /**
7934
8151
  * @deprecated Do not use in new components. This is a legacy block
7935
8152
  * identifier; new components should exclude it via
@@ -8316,7 +8533,7 @@ linkCancelLabel?: string
8316
8533
  * Message id: \`bui.editor.save\`. Defaults to \`"Save"\`.
8317
8534
  */
8318
8535
  linkSaveLabel?: string
8319
- }`,stories:{usage:[{id:"core-miscellaneous-editor--basic",name:"Basic",snippet:'const Basic = () => <Editor placeholder="Placeholder" aria-label="Editor" />;'},{id:"core-miscellaneous-editor--headless-custom",name:"Headless Custom Editor",snippet:"const HeadlessCustom = () => <HeadlessCustomEditor />;"},{id:"core-miscellaneous-editor-plain--controlled",name:"Controlled",snippet:`const Controlled = () => {
8536
+ }`,stories:{usage:[{id:"core-miscellaneous-editor--basic",name:"Basic",snippet:'const Basic = () => <Editor placeholder="Placeholder" aria-label="Editor" />;'},{id:"core-miscellaneous-editor--headless-custom",name:"Headless Custom Editor",snippet:"const HeadlessCustom = () => <HeadlessCustomEditor />;"},{id:"core-miscellaneous-editor--headless-document-model",name:"Headless Document Model",snippet:"const HeadlessDocumentModel = () => <HeadlessDocumentModelDemo />;"},{id:"core-miscellaneous-editor--headless-paragraphs",name:"Headless Paragraphs",snippet:"const HeadlessParagraphs = () => <HeadlessParagraphsDemo />;"},{id:"core-miscellaneous-editor--headless-clipboard-hooks",name:"Headless Clipboard Hooks",snippet:"const HeadlessClipboardHooks = () => <HeadlessClipboardHooksDemo />;"},{id:"core-miscellaneous-editor--headless-max-length",name:"Headless Max Length",snippet:"const HeadlessMaxLength = () => <HeadlessMaxLengthDemo />;"},{id:"core-miscellaneous-editor--headless-styles",name:"Headless Styles",snippet:"const HeadlessStyles = () => <HeadlessHtmlStylesDemo />;"},{id:"core-miscellaneous-editor-plain--controlled",name:"Controlled",snippet:`const Controlled = () => {
8320
8537
  const [value, setValue] = React.useState(args.value);
8321
8538
 
8322
8539
  return (
@@ -8545,6 +8762,7 @@ import { ToggleIconButton } from "../../ToggleIconButton";
8545
8762
  import { Editor } from "../Editor";
8546
8763
  import {
8547
8764
  EditorProvider,
8765
+ getDocPlainText,
8548
8766
  useEditable,
8549
8767
  useEditor,
8550
8768
  useEditorContext,
@@ -8559,6 +8777,7 @@ import type {
8559
8777
  EditorProps,
8560
8778
  MentionableUser,
8561
8779
  } from "../Editor.types";
8780
+ import type { RichTextEditorDoc, UseEditorOptions } from "../headless";
8562
8781
 
8563
8782
  export const EditorWithSetCaretButton = ({
8564
8783
  caretIndex,
@@ -8734,6 +8953,45 @@ const HeadlessMarkButtons: React.FC<{ idPrefix: string }> = ({ idPrefix }) => {
8734
8953
  );
8735
8954
  };
8736
8955
 
8956
+ const HeadlessFontSizeButton: React.FC<{ idPrefix: string }> = ({
8957
+ idPrefix,
8958
+ }) => {
8959
+ const editor = useEditorContext();
8960
+
8961
+ return (
8962
+ <ActionButton
8963
+ size="sm"
8964
+ variant="secondary"
8965
+ label="24pt"
8966
+ data-testid={\`\${idPrefix}-fontSize\`}
8967
+ preventFocusOnPress={true}
8968
+ onPress={() => {
8969
+ editor.setMark("fontSize", "24pt");
8970
+ editor.focus();
8971
+ }}
8972
+ />
8973
+ );
8974
+ };
8975
+
8976
+ const HeadlessSelectAllButton: React.FC<{ idPrefix: string }> = ({
8977
+ idPrefix,
8978
+ }) => {
8979
+ const editor = useEditorContext();
8980
+
8981
+ return (
8982
+ <ActionButton
8983
+ size="sm"
8984
+ variant="secondary"
8985
+ label="Select all"
8986
+ data-testid={\`\${idPrefix}-selectAll\`}
8987
+ preventFocusOnPress={true}
8988
+ onPress={() => {
8989
+ editor.selectAll();
8990
+ }}
8991
+ />
8992
+ );
8993
+ };
8994
+
8737
8995
  const HEADLESS_TEXT_COLOR_PRESETS: ColorPreset[] = [
8738
8996
  { label: "Crimson", color: HEADLESS_TEXT_COLOR },
8739
8997
  { label: "Ink", color: "#1a1a2e" },
@@ -8792,12 +9050,35 @@ const HeadlessColorInput: React.FC<{
8792
9050
  );
8793
9051
  };
8794
9052
 
8795
- const HeadlessCustomEditorInstance: React.FC<{
9053
+ type HeadlessEditorKnobs = Pick<
9054
+ UseEditorOptions,
9055
+ | "htmlStyles"
9056
+ | "maxLength"
9057
+ | "defaultDoc"
9058
+ | "onDocChange"
9059
+ | "onPaste"
9060
+ | "onCopy"
9061
+ | "enterInsertsParagraph"
9062
+ > & { showDocumentControls?: boolean };
9063
+
9064
+ const HeadlessCustomEditorInstance: React.FC<
9065
+ HeadlessEditorKnobs & {
8796
9066
  idPrefix: string;
8797
9067
  label: string;
8798
9068
  defaultValue?: string;
8799
- }> = ({ idPrefix, label, defaultValue }) => {
8800
- const editor = useEditor({ defaultValue });
9069
+ }
9070
+ > = ({
9071
+ idPrefix,
9072
+ label,
9073
+ defaultValue,
9074
+ showDocumentControls,
9075
+ ...editorOptions
9076
+ }) => {
9077
+ const editor = useEditor(
9078
+ editorOptions.defaultDoc
9079
+ ? editorOptions
9080
+ : { defaultValue, ...editorOptions },
9081
+ );
8801
9082
  const { editableProps } = useEditable(editor);
8802
9083
 
8803
9084
  return (
@@ -8816,6 +9097,12 @@ const HeadlessCustomEditorInstance: React.FC<{
8816
9097
  </Text>
8817
9098
  <Box display="flex" gap="xs" alignItems="center">
8818
9099
  <HeadlessMarkButtons idPrefix={idPrefix} />
9100
+ {showDocumentControls ? (
9101
+ <>
9102
+ <HeadlessFontSizeButton idPrefix={idPrefix} />
9103
+ <HeadlessSelectAllButton idPrefix={idPrefix} />
9104
+ </>
9105
+ ) : null}
8819
9106
  <HeadlessColorInput
8820
9107
  idPrefix={idPrefix}
8821
9108
  colorKey="color"
@@ -8850,15 +9137,17 @@ const HeadlessCustomEditorInstance: React.FC<{
8850
9137
  );
8851
9138
  };
8852
9139
 
8853
- export const HeadlessCustomEditor: React.FC = () => {
9140
+ export const HeadlessCustomEditor: React.FC<HeadlessEditorKnobs> = (knobs) => {
8854
9141
  return (
8855
9142
  <Box display="flex" gap="2xl" flexDirection="column">
8856
9143
  <HeadlessCustomEditorInstance
9144
+ {...knobs}
8857
9145
  idPrefix="headless-a"
8858
9146
  label="Unformatted rich text"
8859
9147
  defaultValue="<p>Unformatted rich text preview with no active marks.</p>"
8860
9148
  />
8861
9149
  <HeadlessCustomEditorInstance
9150
+ {...knobs}
8862
9151
  idPrefix="headless-b"
8863
9152
  label="Formatted rich text"
8864
9153
  defaultValue={\`<p><b>Bold text</b>, <i>italic text</i>, <u>underlined text</u>, and <span style="color:\${HEADLESS_TEXT_COLOR};background-color:\${HEADLESS_BACKGROUND_COLOR}">colored text</span> are visible here.</p>\`}
@@ -9036,6 +9325,292 @@ export const EditorInModalExample = ({
9036
9325
  </Dialog>
9037
9326
  </ModalContent>
9038
9327
  </Modal>
9328
+ );
9329
+
9330
+ const HeadlessInfoPanel: React.FC<{
9331
+ title: string;
9332
+ children: React.ReactNode;
9333
+ testId?: string;
9334
+ }> = ({ title, children, testId }) => (
9335
+ <Box
9336
+ display="flex"
9337
+ flexDirection="column"
9338
+ gap="xs"
9339
+ padding="md"
9340
+ borderRadius="md"
9341
+ borderWidth={1}
9342
+ borderStyle="solid"
9343
+ borderColor="border.medium"
9344
+ data-testid={testId}
9345
+ >
9346
+ <Text type="helper" size="sm" color="text.secondary">
9347
+ {title}
9348
+ </Text>
9349
+ {children}
9350
+ </Box>
9351
+ );
9352
+
9353
+ const HeadlessCode: React.FC<{ children: string }> = ({ children }) => (
9354
+ <Box
9355
+ elementType="pre"
9356
+ color="text.primary"
9357
+ style={{
9358
+ margin: 0,
9359
+ maxHeight: 220,
9360
+ overflow: "auto",
9361
+ fontFamily: "ui-monospace, monospace",
9362
+ fontSize: 11,
9363
+ lineHeight: 1.4,
9364
+ whiteSpace: "pre",
9365
+ }}
9366
+ >
9367
+ {children}
9368
+ </Box>
9369
+ );
9370
+
9371
+ const HeadlessDemo: React.FC<
9372
+ Omit<UseEditorOptions, "onDocChange"> & {
9373
+ idPrefix: string;
9374
+ title: string;
9375
+ description: string;
9376
+ showDocumentControls?: boolean;
9377
+ renderInfo?: (doc: RichTextEditorDoc) => React.ReactNode;
9378
+ }
9379
+ > = ({
9380
+ idPrefix,
9381
+ title,
9382
+ description,
9383
+ showDocumentControls,
9384
+ renderInfo,
9385
+ ...options
9386
+ }) => {
9387
+ const [doc, setDoc] = React.useState<RichTextEditorDoc>([]);
9388
+ const editor = useEditor({ ...options, onDocChange: setDoc });
9389
+ const { editableProps } = useEditable(editor);
9390
+ // Applying the initial content emits no onDocChange.
9391
+ React.useEffect(() => {
9392
+ setDoc(editor.core.getDoc());
9393
+ }, [editor.core]);
9394
+
9395
+ return (
9396
+ <EditorProvider editor={editor}>
9397
+ <Box
9398
+ display="flex"
9399
+ flexDirection="column"
9400
+ gap="md"
9401
+ padding="lg"
9402
+ borderRadius="lg"
9403
+ backgroundColor="background.primary.subtle"
9404
+ style={{ width: 320 }}
9405
+ >
9406
+ <Box display="flex" flexDirection="column" gap="xs">
9407
+ <Text type="label" size="md">
9408
+ {title}
9409
+ </Text>
9410
+ <Text type="helper" size="sm" color="text.secondary">
9411
+ {description}
9412
+ </Text>
9413
+ </Box>
9414
+ <Box display="flex" gap="xs" alignItems="center" flexWrap="wrap">
9415
+ <HeadlessMarkButtons idPrefix={idPrefix} />
9416
+ {showDocumentControls ? (
9417
+ <>
9418
+ <HeadlessFontSizeButton idPrefix={idPrefix} />
9419
+ <HeadlessSelectAllButton idPrefix={idPrefix} />
9420
+ </>
9421
+ ) : null}
9422
+ </Box>
9423
+ <Box
9424
+ {...editableProps}
9425
+ data-testid={\`\${idPrefix}-editable\`}
9426
+ aria-label={\`\${title} editor\`}
9427
+ padding="lg"
9428
+ borderRadius="lg"
9429
+ backgroundColor="background.secondary.subtle"
9430
+ color="text.primary"
9431
+ typography="body.md.regular"
9432
+ style={{ minHeight: 80, whiteSpace: "pre-wrap" }}
9433
+ />
9434
+ {renderInfo?.(doc)}
9435
+ </Box>
9436
+ </EditorProvider>
9437
+ );
9438
+ };
9439
+
9440
+ const HeadlessDemoRow: React.FC<{ children: React.ReactNode }> = ({
9441
+ children,
9442
+ }) => (
9443
+ <Box display="flex" gap="xl" flexWrap="wrap" alignItems="flex-start">
9444
+ {children}
9445
+ </Box>
9446
+ );
9447
+
9448
+ const formatDoc = (doc: RichTextEditorDoc) =>
9449
+ doc
9450
+ .map(({ children, ...paragraph }) =>
9451
+ [
9452
+ JSON.stringify(paragraph),
9453
+ ...children.map((child) => \` \${JSON.stringify(child)}\`),
9454
+ ].join("\\n"),
9455
+ )
9456
+ .join("\\n");
9457
+
9458
+ export const HeadlessDocumentModelDemo: React.FC = () => (
9459
+ <HeadlessDemo
9460
+ idPrefix="doc-model"
9461
+ title="Document model"
9462
+ description="The editor's content is plain data: paragraphs of text runs with their marks. Edit, format or resize the text and watch the document update."
9463
+ showDocumentControls={true}
9464
+ defaultDoc={[
9465
+ {
9466
+ type: "p",
9467
+ children: [
9468
+ { text: "Plain, " },
9469
+ { text: "bold", bold: true },
9470
+ { text: " and " },
9471
+ { text: "large", fontSize: "20px" },
9472
+ { text: " text." },
9473
+ ],
9474
+ },
9475
+ { type: "p", textAlign: "center", children: [{ text: "Centered" }] },
9476
+ ]}
9477
+ renderInfo={(doc) => (
9478
+ <HeadlessInfoPanel title="getDoc()" testId="doc-model-json">
9479
+ <HeadlessCode>{formatDoc(doc)}</HeadlessCode>
9480
+ </HeadlessInfoPanel>
9481
+ )}
9482
+ />
9483
+ );
9484
+
9485
+ const HeadlessParagraphOutline: React.FC<{ doc: RichTextEditorDoc }> = ({
9486
+ doc,
9487
+ }) => (
9488
+ <HeadlessInfoPanel
9489
+ title={\`\${doc.length} paragraph\${doc.length === 1 ? "" : "s"}\`}
9490
+ >
9491
+ {doc.map((paragraph, index) => (
9492
+ <Box
9493
+ key={index}
9494
+ padding="xs"
9495
+ borderRadius="sm"
9496
+ backgroundColor="background.primary.subtle"
9497
+ >
9498
+ <HeadlessCode>
9499
+ {\`\xB6 \${getDocPlainText([paragraph]).replaceAll("\\n", "\u21B5")}\`}
9500
+ </HeadlessCode>
9501
+ </Box>
9502
+ ))}
9503
+ </HeadlessInfoPanel>
9504
+ );
9505
+
9506
+ export const HeadlessParagraphsDemo: React.FC = () => (
9507
+ <HeadlessDemoRow>
9508
+ <HeadlessDemo
9509
+ idPrefix="enter-line-break"
9510
+ title="Enter inserts a line break"
9511
+ description="The default: Enter and Shift+Enter add a line break inside the current paragraph."
9512
+ defaultDoc={[
9513
+ { type: "p", children: [{ text: "First line\\nSecond line" }] },
9514
+ ]}
9515
+ renderInfo={(doc) => <HeadlessParagraphOutline doc={doc} />}
9516
+ />
9517
+ <HeadlessDemo
9518
+ idPrefix="enter-paragraph"
9519
+ title="Enter starts a paragraph"
9520
+ description="With enterInsertsParagraph, Enter splits the paragraph at the caret; Shift+Enter still adds a line break."
9521
+ enterInsertsParagraph={true}
9522
+ defaultDoc={[
9523
+ { type: "p", children: [{ text: "First paragraph" }] },
9524
+ { type: "p", children: [{ text: "Second paragraph" }] },
9525
+ ]}
9526
+ renderInfo={(doc) => <HeadlessParagraphOutline doc={doc} />}
9527
+ />
9528
+ </HeadlessDemoRow>
9529
+ );
9530
+
9531
+ export const HeadlessMaxLengthDemo: React.FC = () => (
9532
+ <HeadlessDemo
9533
+ idPrefix="max-length"
9534
+ title="Character limit"
9535
+ description="maxLength is 40. Typing, pasting and composed input stop at the limit."
9536
+ maxLength={40}
9537
+ defaultDoc={[
9538
+ { type: "p", children: [{ text: "Only a few characters are left." }] },
9539
+ ]}
9540
+ renderInfo={(doc) => (
9541
+ <Text
9542
+ type="helper"
9543
+ size="sm"
9544
+ color="text.secondary"
9545
+ data-testid="max-length-count"
9546
+ >
9547
+ {\`\${getDocPlainText(doc).length} / 40 characters\`}
9548
+ </Text>
9549
+ )}
9550
+ />
9551
+ );
9552
+
9553
+ const toUpperCaseText = (fragment: RichTextEditorDoc) =>
9554
+ getDocPlainText(fragment).toUpperCase();
9555
+
9556
+ export const HeadlessClipboardHooksDemo: React.FC = () => {
9557
+ const [copied, setCopied] = React.useState<string | null>(null);
9558
+
9559
+ return (
9560
+ <HeadlessDemo
9561
+ idPrefix="clipboard"
9562
+ title="Clipboard hooks"
9563
+ description="onPaste inserts pasted text in bold. onCopy puts the selection on the clipboard in upper case."
9564
+ defaultValue="<p>Copy part of this sentence, then paste it back.</p>"
9565
+ onPaste={(event) => {
9566
+ const text = event.clipboardData?.getData("text/plain");
9567
+ return text ? [{ type: "p", children: [{ text, bold: true }] }] : null;
9568
+ }}
9569
+ onCopy={(event, fragment) => {
9570
+ const text = toUpperCaseText(fragment);
9571
+ event.clipboardData?.setData("text/plain", text);
9572
+ setCopied(text);
9573
+ return true;
9574
+ }}
9575
+ renderInfo={() => (
9576
+ <HeadlessInfoPanel title="Last copied" testId="clipboard-last-copied">
9577
+ <HeadlessCode>{copied ?? "Nothing copied yet"}</HeadlessCode>
9578
+ </HeadlessInfoPanel>
9579
+ )}
9580
+ />
9581
+ );
9582
+ };
9583
+
9584
+ const HEADLESS_STYLED_HTML =
9585
+ '<p style="text-align:center"><span style="font-family:Georgia, serif;font-size:24px">Serif heading</span></p><p>Body text</p>';
9586
+
9587
+ export const HeadlessHtmlStylesDemo: React.FC = () => (
9588
+ <Box display="flex" flexDirection="column" gap="lg">
9589
+ <HeadlessInfoPanel title="Both editors parse the same defaultValue">
9590
+ <HeadlessCode>{HEADLESS_STYLED_HTML}</HeadlessCode>
9591
+ </HeadlessInfoPanel>
9592
+ <HeadlessDemoRow>
9593
+ <HeadlessDemo
9594
+ idPrefix="html-styles-default"
9595
+ title="Default htmlStyles"
9596
+ description="Only color and backgroundColor survive parsing; the font and alignment are dropped."
9597
+ defaultValue={HEADLESS_STYLED_HTML}
9598
+ />
9599
+ <HeadlessDemo
9600
+ idPrefix="html-styles-all"
9601
+ title="htmlStyles with fonts and alignment"
9602
+ description='htmlStyles={["color", "backgroundColor", "fontFamily", "fontSize", "textAlign"]}'
9603
+ htmlStyles={[
9604
+ "color",
9605
+ "backgroundColor",
9606
+ "fontFamily",
9607
+ "fontSize",
9608
+ "textAlign",
9609
+ ]}
9610
+ defaultValue={HEADLESS_STYLED_HTML}
9611
+ />
9612
+ </HeadlessDemoRow>
9613
+ </Box>
9039
9614
  );`},similarTo:[],figmaUrl:null},FileInput:{id:"core-forms-fileinput",breadcrumb:"Core/Forms/FileInput",importStatement:'import { FileInput, VariantViewer } from "@baseline-ui/core";',description:"`FileInput` is a form control for selecting one or more files from the user's device. It pairs a primary button with a read-only display of the chosen file name and supports labels, helper text, validation states, and accessibility hooks consistent with `TextInput`.",documentation:'`FileInput` is a form control for selecting one or more files from the user\'s device. It pairs a primary button with a read-only display of the chosen file name and supports labels, helper text, validation states, and accessibility hooks consistent with `TextInput`.\n\n* Built on top of [React Aria\'s `FileTrigger`](https://react-spectrum.adobe.com/react-aria/FileTrigger.html), so it works with mouse, touch, and keyboard.\n* Only the button is interactive \u2014 the label, file name, and helper text are visual and wired into the button via `aria-describedby` for assistive technology.\n* Accepts an array of MIME types or file extensions via `acceptedFileTypes`, and an `allowsMultiple` flag for selecting more than one file.\n* Supports directory selection ([`acceptDirectory`](https://react-spectrum.adobe.com/react-aria/FileTrigger.html#directory-selection)) and mobile capture ([`defaultCamera`](https://react-spectrum.adobe.com/react-aria/FileTrigger.html#media-capture)) via the underlying `FileTrigger`.\n* Renders helper, warning, and error messages with the same precedence rules as the rest of the form components: error > warning > description.\n\n```jsx\nimport { FileInput } from "@baseline-ui/core";\n\n<FileInput\n label="Attachment"\n description="Supports .mov and .mp4"\n acceptedFileTypes={[".mov", ".mp4"]}\n onValueChange={(files) => console.log(files)}\n/>;\n```\n\nIf you need a drag-and-drop drop zone instead of a button trigger, use [`ImageDropZone`](/story/core-forms-imagedropzone--basic) or [`FileUploader`](/story/core-forms-fileuploader--default).\n\nPass a visible `label` for sighted users; the label is wired into the button\'s accessible description so it is announced on focus.\n\n```jsx\n<FileInput label="Attachment" description="Supports .mov and .mp4" />\n```\n\nBy default the label sits above the field. Pass `labelPosition="start"` to align it inline.\n\n```jsx\n<FileInput label="Attachment" labelPosition="start" />\n```\n\nIf the field is described by surrounding context, omit `label`. The button\'s intrinsic name (`buttonLabel`, "Choose file" by default) is still announced.\n\n```jsx\n<FileInput aria-label="Upload a file" />\n```\n\nSet `allowsMultiple` to allow more than one file. The display switches to an aggregate `"N files"` count once more than one file is selected.\n\n```jsx\n<FileInput label="Attachments" allowsMultiple onValueChange={setFiles} />\n```\n\nPass an array of MIME types or file extensions to `acceptedFileTypes`.\n\n```jsx\n<FileInput\n label="Avatar"\n acceptedFileTypes={["image/png", "image/jpeg"]}\n onValueChange={setAvatar}\n/>\n```\n\nSet `acceptDirectory` to let users pick a folder. The browser forwards every file inside the chosen directory to `onValueChange`.\n\n```jsx\n<FileInput label="Upload folder" acceptDirectory onValueChange={setFiles} />\n```\n\nSet `defaultCamera="user"` (front-facing) or `"environment"` (rear-facing) to hint that the picker should open the device\'s camera on mobile.\n\n```jsx\n<FileInput\n label="Take a photo"\n acceptedFileTypes={["image/*"]}\n defaultCamera="environment"\n/>\n```\n\nSet `autoFocus` to focus the button on mount \u2014 useful in dialogs or multi-step flows.\n\n```jsx\n<FileInput label="Attachment" autoFocus />\n```\n\nOverride `buttonLabel` and `placeholder` for non-English copy or domain-specific wording.\n\n```jsx\n<FileInput\n label="Avatar"\n buttonLabel="Browse..."\n placeholder="Drop an image here"\n/>\n```\n\nPass `validationState="warning"` and a `warningMessage` to show a non-blocking advisory.\n\n```jsx\n<FileInput\n label="Attachment"\n validationState="warning"\n warningMessage="This file format is uncommon \u2014 make sure it is supported."\n/>\n```\n\nSetting `errorMessage` flips the field into the error state and replaces the helper text. The error message takes precedence over both `description` and `warningMessage`.\n\n```jsx\n<FileInput label="Attachment" errorMessage="Please choose a supported file." />\n```\n\nDisable the field with `isDisabled`. The button cannot be activated and the displayed file name uses the disabled text color.\n\n```jsx\n<FileInput label="Attachment" isDisabled />\n```\n\n`FileInput` exposes a single callback for handling the selection:\n\n| Prop | Signature | When to use |\n| --------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `onValueChange` | `(files: File[]) => void` | Receives the parsed file list directly. When `allowsMultiple` is not set, the array has at most one entry. An empty array means the user opened and dismissed the file picker. |\n\n`FileInput` sets the following data attributes on the field wrapper. Use them to scope your custom styles.\n\n| Selector | Description |\n| ----------------------------------- | ---------------------------------------------------- |\n| `[data-disabled]` | Present when `isDisabled` is true. |\n| `[data-validation-state="error"]` | Present when an error message or error state is set. |\n| `[data-validation-state="warning"]` | Present when `validationState="warning"`. |\n| `.BaselineUI-FileInput` | Root element of the component. |\n\nTo style the button itself, target `.BaselineUI-FileInput button` or pass a class via `buttonClassName` / inline styles via `buttonStyle`.\n\n* Only the button is interactive; the label, file name, and helper text are visual elements wired into the button via `aria-describedby`.\n* The button keeps its own accessible name (`"Choose file"` by default), so screen readers announce the action on focus.\n* The visible `label`, the selected file name, and any helper/warning/error message are all referenced from the button\'s `aria-describedby`, so they are announced after the action label.\n* An externally supplied `aria-describedby` is merged with the internal IDs rather than replacing them.\n\n| Key | Action |\n| ----------------- | ----------------------------- |\n| `Tab` | Moves focus to the button. |\n| `Shift + Tab` | Moves focus out of the field. |\n| `Space` / `Enter` | Opens the system file picker. |',props:`interface FileInputProps {
9040
9615
  /**
9041
9616
  * The description to display below the input.
@@ -9198,7 +9773,7 @@ labelPosition?: any
9198
9773
  ],
9199
9774
  }}
9200
9775
  />
9201
- );`}],implementation:""},similarTo:[],figmaUrl:null},FileList:{id:"core-collections-filelist",breadcrumb:"Core/Collections/FileList",importStatement:'import { FileList } from "@baseline-ui/core";',description:"FileList renders a vertical list of uploaded or attached files. Each row shows the file name, an upload-progress spinner or remove button, and an optional error state. Use it to surface attachments inside forms, drawers, or upload flows.",documentation:'FileList renders a vertical list of uploaded or attached files. Each row shows the file name, an upload-progress spinner or remove button, and an optional error state. Use it to surface attachments inside forms, drawers, or upload flows.\n\nFor collecting files, pair this with `FileUploader` or `ImageDropZone`.\n\n* Built on `UNSAFE_ListBox`, so rows are keyboard navigable and announced as listbox options\n* Per-row remove button, plus `Delete` / `Backspace` keyboard removal on the focused row\n* Loading state replaces the remove button with a `ProgressSpinner`\n* Error state with a red border, error message, and optional explanation\n* Long file names truncate with an ellipsis; the full name is exposed via `title`\n* Disabled state propagates to every remove button and blocks keyboard removal\n\n```jsx\nimport { FileList } from "@baseline-ui/core";\n\nconst items = [\n { id: "1", name: "report.pdf" },\n { id: "2", name: "photo.png" },\n];\n\nexport default function App() {\n return (\n <FileList\n aria-label="Uploaded files"\n items={items}\n onRemove={(id) => console.log("remove", id)}\n />\n );\n}\n```\n\nWhen `items` is empty, FileList renders nothing \u2014 render an empty-state component yourself if you need one.\n\nA FileList row can appear in three primary states: default, loading, and error. The states can be mixed across items in a single list.\n\nSet `isLoading` on an item to show a spinner instead of the remove button while the upload is in flight. Keyboard removal (`Delete` / `Backspace`) is suppressed on loading rows.\n\n```jsx\n<FileList\n aria-label="Uploaded files"\n items={[\n { id: "1", name: "uploading.zip", isLoading: true },\n { id: "2", name: "done.pdf" },\n ]}\n onRemove={handleRemove}\n/>\n```\n\nSet `errorMessage` (and optionally `errorExplanation`) on an item to render the row in the error state. The row gets a red border and the messages appear below the file name. The remove button stays visible so the user can clear the failed item.\n\n```jsx\n<FileList\n aria-label="Uploaded files"\n items={[\n {\n id: "1",\n name: "too-large.mp4",\n errorMessage: "Upload failed",\n errorExplanation: "File exceeds the 50 MB limit.",\n },\n ]}\n onRemove={handleRemove}\n/>\n```\n\nPass `disabledKeys="all"` to disable removal across every row, or an iterable of item ids to disable specific rows. Both the per-row remove button and `Delete` / `Backspace` keyboard removal are suppressed for disabled rows; loading rows keep their spinner.\n\n```jsx\n<FileList aria-label="Uploaded files" items={items} disabledKeys="all" />\n```\n\nFile names that exceed the row width truncate with an ellipsis. The full name is exposed via the `title` attribute and read by assistive technologies, so it is recoverable on hover and through screen readers.\n\nProvide `aria-label` or `aria-labelledby` so the listbox has an accessible name. `aria-labelledby` points to the id of an existing visible label.\n\n```jsx\n<>\n <span id="attachments-label">Attached files</span>\n <FileList aria-labelledby="attachments-label" items={items} />\n</>\n```\n\n| Selector | Description |\n| ----------------------------- | ------------------------------------------ |\n| `.BaselineUI-FileList` | Root element wrapping the listbox. |\n| `[role="option"][data-key]` | A row. `data-key` matches the item\'s `id`. |\n| `[data-focus-visible="true"]` | Row currently showing the focus ring. |\n| `[data-disabled="true"]` | Row that is currently disabled. |\n\n| Key | Function |\n| ----------------------- | ------------------------------------------- |\n| `Tab` / `Shift+Tab` | Moves focus into and out of the list. |\n| `ArrowUp` / `ArrowDown` | Moves focus between rows. |\n| `Home` / `End` | Moves focus to the first or last row. |\n| `Delete` | Removes the focused row (calls `onRemove`). |\n| `Backspace` | Removes the focused row (calls `onRemove`). |\n\nThe remove button is excluded from the tab order \u2014 keyboard users delete rows by focusing the row and pressing `Delete` or `Backspace`, while pointer users click the row\'s remove button. `Delete` / `Backspace` are suppressed when the focused item is disabled (via `disabledKeys`) or loading.\n\n* `FileUploader` \u2014 picker / drop target that produces files to render here.\n* `ImageDropZone` \u2014 a dedicated drop target specialized for images.\n* `UNSAFE_ListBox` \u2014 the underlying listbox primitive.',props:`interface FileListProps {
9776
+ );`}],implementation:""},similarTo:[],figmaUrl:null},FileList:{id:"core-collections-filelist",breadcrumb:"Core/Collections/FileList",importStatement:'import { FileList, Image } from "@baseline-ui/core";',description:"FileList renders a list of files. The default `compact` variant shows each uploaded or attached file with its name, an upload-progress spinner or remove button, and an optional error state; use it to surface attachments inside forms, drawers, or upload flows. The `expanded` and `grid` variants offer files to pick instead, such as samples next to a `FileUploader`.",documentation:'FileList renders a list of files. The default `compact` variant shows each uploaded or attached file with its name, an upload-progress spinner or remove button, and an optional error state; use it to surface attachments inside forms, drawers, or upload flows. The `expanded` and `grid` variants offer files to pick instead, such as samples next to a `FileUploader`.\n\nFor collecting files, pair this with `FileUploader` or `ImageDropZone`.\n\n* Built on `UNSAFE_ListBox`, so rows are keyboard navigable and announced as listbox options\n* Per-row remove button, plus `Delete` / `Backspace` keyboard removal on the focused row\n* Loading state replaces the remove button with a `ProgressSpinner`\n* Error state with a red border, error message, and optional explanation\n* Long file names truncate with an ellipsis; the full name is exposed via `title`\n* Disabled state propagates to every remove button and blocks keyboard removal\n\n```jsx\nimport { FileList } from "@baseline-ui/core";\n\nconst items = [\n { id: "1", name: "report.pdf" },\n { id: "2", name: "photo.png" },\n];\n\nexport default function App() {\n return (\n <FileList\n aria-label="Uploaded files"\n items={items}\n onRemove={(id) => console.log("remove", id)}\n />\n );\n}\n```\n\nWhen `items` is empty, FileList renders nothing \u2014 render an empty-state component yourself if you need one.\n\nA `compact` row can appear in three primary states: default, loading, and error. The states can be mixed across items in a single list.\n\nSet `isLoading` on an item to show a spinner instead of the remove button while the upload is in flight. Keyboard removal (`Delete` / `Backspace`) is suppressed on loading rows.\n\n```jsx\n<FileList\n aria-label="Uploaded files"\n items={[\n { id: "1", name: "uploading.zip", isLoading: true },\n { id: "2", name: "done.pdf" },\n ]}\n onRemove={handleRemove}\n/>\n```\n\nSet `errorMessage` (and optionally `errorExplanation`) on an item to render the row in the error state. The row gets a red border and the messages appear below the file name. The remove button stays visible so the user can clear the failed item.\n\n```jsx\n<FileList\n aria-label="Uploaded files"\n items={[\n {\n id: "1",\n name: "too-large.mp4",\n errorMessage: "Upload failed",\n errorExplanation: "File exceeds the 50 MB limit.",\n },\n ]}\n onRemove={handleRemove}\n/>\n```\n\nPass `disabledKeys="all"` to disable removal across every row, or an iterable of item ids to disable specific rows. Both the per-row remove button and `Delete` / `Backspace` keyboard removal are suppressed for disabled rows; loading rows keep their spinner. In the `expanded` and `grid` variants, disabled items are dimmed and cannot be picked with `onAction`.\n\n```jsx\n<FileList aria-label="Uploaded files" items={items} disabledKeys="all" />\n```\n\nFile names that exceed the row width truncate with an ellipsis. The full name is exposed via the `title` attribute and read by assistive technologies, so it is recoverable on hover and through screen readers.\n\n`variant="expanded"` renders each item as a card with a file icon, its name, a\n`description` and an optional `tag`; `variant="grid"` renders preview tiles with\nthe item\'s `preview` (typically an `Image`), name and `description`. Use them to\noffer files to pick, such as samples next to a `FileUploader`, and handle the\npick in `onAction`. They do not render the remove button, spinner or error\nmessages of the default `compact` variant.\n\n```jsx\n<FileList\n variant="grid"\n label="Or start from a sample"\n items={[\n { id: "invoice", name: "Invoice", description: "2 pages" },\n {\n id: "medical-bill",\n name: "Medical bill",\n preview: <Image src="/medical-bill.png" alt="Medical bill preview" />,\n },\n ]}\n onAction={loadSample}\n/>\n```\n\nA `tag` is a `label` and an optional `variant`, such as\n`{ label: "Compliant", variant: "green" }`. An `Image` preview that fails to load shows the file\nicon. `label` renders a title above the list that also names it for assistive\ntechnology.\n\nLong lists scroll so the content around them stays in view: `expanded` shows\nabout five rows, and `grid` about two, with up to six tiles per row.\n\nEach item is named by its file name and described by its `description` and\n`tag`. In `grid`, `ArrowLeft` and `ArrowRight` move between tiles in a row, and\n`ArrowUp` and `ArrowDown` move between rows.\n\nProvide `label`, `aria-label` or `aria-labelledby` so the listbox has an accessible name. `aria-labelledby` points to the id of an existing visible label.\n\n```jsx\n<>\n <span id="attachments-label">Attached files</span>\n <FileList aria-labelledby="attachments-label" items={items} />\n</>\n```\n\n| Selector | Description |\n| ----------------------------- | ------------------------------------------ |\n| `.BaselineUI-FileList` | Root element wrapping the listbox. |\n| `[role="option"][data-key]` | A row. `data-key` matches the item\'s `id`. |\n| `[data-focus-visible="true"]` | Row currently showing the focus ring. |\n| `[data-disabled="true"]` | Row that is currently disabled. |\n\n| Key | Function |\n| -------------------------- | ---------------------------------------------- |\n| `Tab` / `Shift+Tab` | Moves focus into and out of the list. |\n| `ArrowUp` / `ArrowDown` | Moves focus between rows. |\n| `ArrowLeft` / `ArrowRight` | In `grid`, moves focus between tiles in a row. |\n| `Home` / `End` | Moves focus to the first or last row. |\n| `Delete` | Removes the focused row (calls `onRemove`). |\n| `Backspace` | Removes the focused row (calls `onRemove`). |\n\nThe remove button is excluded from the tab order \u2014 keyboard users delete rows by focusing the row and pressing `Delete` or `Backspace`, while pointer users click the row\'s remove button. `Delete` / `Backspace` are suppressed when the focused item is disabled (via `disabledKeys`) or loading.\n\n* `FileUploader` \u2014 picker / drop target that produces files to render here.\n* `ImageDropZone` \u2014 a dedicated drop target specialized for images.\n* `UNSAFE_ListBox` \u2014 the underlying listbox primitive.',props:`interface FileListProps {
9202
9777
  /**
9203
9778
  * The className applied to the root element.
9204
9779
  */
@@ -9207,6 +9782,30 @@ className?: string
9207
9782
  * The style applied to the root element.
9208
9783
  */
9209
9784
  style?: React.CSSProperties
9785
+ /**
9786
+ * How the items are rendered.
9787
+ *
9788
+ * - \`compact\` (default): divided rows with a file icon and name, for files
9789
+ * the user has added. The only variant that renders the remove button,
9790
+ * the loading spinner and error messages.
9791
+ * - \`expanded\`: bordered cards with the name, \`description\` and \`tag\`.
9792
+ * Past about five rows the list scrolls.
9793
+ * - \`grid\`: preview tiles with the \`preview\`, name and \`description\`, up to
9794
+ * six per row. Past about two rows the grid scrolls.
9795
+ *
9796
+ * @default "compact"
9797
+ */
9798
+ variant?: "compact" | "expanded" | "grid"
9799
+ /**
9800
+ * A title rendered above the list that also labels it for assistive
9801
+ * technology.
9802
+ */
9803
+ label?: React.ReactNode
9804
+ /**
9805
+ * Called with the \`id\` of the item the user picks by clicking it or
9806
+ * pressing Enter.
9807
+ */
9808
+ onAction?: (id: string) => void
9210
9809
  /**
9211
9810
  * The items rendered in the list. Pass a stable reference (e.g. memoize
9212
9811
  * or hoist) when possible \u2014 every new array identity rebuilds the
@@ -9214,18 +9813,19 @@ style?: React.CSSProperties
9214
9813
  */
9215
9814
  items: FileListItem[]
9216
9815
  /**
9217
- * Called when the user removes an item via the row button or Delete.
9816
+ * Called when the user removes an item via the row button, Delete or
9817
+ * Backspace. Only the \`compact\` variant supports removal.
9218
9818
  */
9219
9819
  onRemove?: (id: string) => void
9220
9820
  /**
9221
9821
  * Keys of items that should be disabled individually, or \`"all"\` to
9222
9822
  * disable every item. Disabled items cannot be removed via the row
9223
- * button or keyboard.
9823
+ * button or keyboard, or picked with \`onAction\`.
9224
9824
  */
9225
9825
  disabledKeys?: Iterable<string> | "all"
9226
9826
  /**
9227
9827
  * Overrides the accessible name of a file row while it is loading, and of
9228
- * its spinner.
9828
+ * its spinner. Used in the \`compact\` variant only.
9229
9829
  *
9230
9830
  * Message id: \`bui.fileList.loading\`. Defaults to \`"Loading {fileName}"\`.
9231
9831
  * A string is used as-is, with no placeholder substitution. To include
@@ -9235,7 +9835,7 @@ disabledKeys?: Iterable<string> | "all"
9235
9835
  loadingLabel?: string | ((values: { fileName: string }) => string)
9236
9836
  /**
9237
9837
  * Overrides the accessible name of a removable file row, telling keyboard
9238
- * users how to delete it.
9838
+ * users how to delete it. Used in the \`compact\` variant only.
9239
9839
  *
9240
9840
  * Message id: \`bui.fileList.removeHint\`. Defaults to
9241
9841
  * \`"{fileName}, press Delete or Backspace to remove"\`. A string is used
@@ -9367,9 +9967,90 @@ removeHintLabel?: string | ((values: { fileName: string }) => string)
9367
9967
  setItems((current) => current.filter((item) => item.id !== id));
9368
9968
  }} />
9369
9969
  );
9970
+ };`},{id:"core-collections-filelist--expanded",name:"Expanded",snippet:`const Expanded = () => {
9971
+ const [items, setItems] = React.useState(args.items);
9972
+ React.useEffect(() => {
9973
+ setItems(args.items);
9974
+ }, [args.items]);
9975
+
9976
+ return (
9977
+ <FileList
9978
+ aria-label={undefined}
9979
+ variant="expanded"
9980
+ label="Or start from a sample"
9981
+ onAction={fn()}
9982
+ items={items}
9983
+ onRemove={(id) => {
9984
+ args.onRemove?.(id);
9985
+ setItems((current) => current.filter((item) => item.id !== id));
9986
+ }} />
9987
+ );
9988
+ };`},{id:"core-collections-filelist--grid",name:"Grid",snippet:`const Grid = () => {
9989
+ const [items, setItems] = React.useState(args.items);
9990
+ React.useEffect(() => {
9991
+ setItems(args.items);
9992
+ }, [args.items]);
9993
+
9994
+ return (
9995
+ <FileList
9996
+ aria-label="Uploaded files"
9997
+ variant="grid"
9998
+ items={items}
9999
+ onRemove={(id) => {
10000
+ args.onRemove?.(id);
10001
+ setItems((current) => current.filter((item) => item.id !== id));
10002
+ }} />
10003
+ );
10004
+ };`},{id:"core-collections-filelist--many-expanded",name:"Many Expanded",snippet:`const ManyExpanded = () => {
10005
+ const [items, setItems] = React.useState(args.items);
10006
+ React.useEffect(() => {
10007
+ setItems(args.items);
10008
+ }, [args.items]);
10009
+
10010
+ return (
10011
+ <FileList
10012
+ aria-label="Uploaded files"
10013
+ items={items}
10014
+ onRemove={(id) => {
10015
+ args.onRemove?.(id);
10016
+ setItems((current) => current.filter((item) => item.id !== id));
10017
+ }} />
10018
+ );
10019
+ };`},{id:"core-collections-filelist--many-grid",name:"Many Grid",snippet:`const ManyGrid = () => {
10020
+ const [items, setItems] = React.useState(args.items);
10021
+ React.useEffect(() => {
10022
+ setItems(args.items);
10023
+ }, [args.items]);
10024
+
10025
+ return (
10026
+ <FileList
10027
+ aria-label="Uploaded files"
10028
+ items={items}
10029
+ onRemove={(id) => {
10030
+ args.onRemove?.(id);
10031
+ setItems((current) => current.filter((item) => item.id !== id));
10032
+ }} />
10033
+ );
10034
+ };`},{id:"core-collections-filelist--expanded-disabled",name:"Expanded Disabled",snippet:`const ExpandedDisabled = () => {
10035
+ const [items, setItems] = React.useState(args.items);
10036
+ React.useEffect(() => {
10037
+ setItems(args.items);
10038
+ }, [args.items]);
10039
+
10040
+ return (
10041
+ <FileList
10042
+ aria-label="Uploaded files"
10043
+ disabledKeys="all"
10044
+ items={items}
10045
+ onRemove={(id) => {
10046
+ args.onRemove?.(id);
10047
+ setItems((current) => current.filter((item) => item.id !== id));
10048
+ }} />
10049
+ );
9370
10050
  };`}],implementation:`import React from "react";
9371
10051
 
9372
10052
  import { ActionButton } from "../../ActionButton";
10053
+ import { Image } from "../../Image/Image";
9373
10054
  import { FileList } from "../FileList";
9374
10055
 
9375
10056
  import type { FileListItem, FileListProps } from "../FileList.types";
@@ -9426,9 +10107,11 @@ export const manyItems: FileListItem[] = Array.from({ length: 12 }, (_, i) => ({
9426
10107
 
9427
10108
  // Swaps in a new array whose items carry new content, which is the only way a caller can
9428
10109
  // legitimately invalidate the memoised options.
9429
- export const UploadingFileList: React.FC<{ errorMessage?: string }> = ({
9430
- errorMessage,
9431
- }) => {
10110
+ export const UploadingFileList: React.FC<{
10111
+ errorMessage?: string;
10112
+ description?: string;
10113
+ variant?: FileListProps["variant"];
10114
+ }> = ({ errorMessage, description, variant }) => {
9432
10115
  const [items, setItems] = React.useState<FileListItem[]>(loadingItems);
9433
10116
 
9434
10117
  return (
@@ -9437,12 +10120,18 @@ export const UploadingFileList: React.FC<{ errorMessage?: string }> = ({
9437
10120
  label="Finish upload"
9438
10121
  onPress={() => {
9439
10122
  setItems((prev) =>
9440
- prev.map((item) => ({ ...item, isLoading: false, errorMessage })),
10123
+ prev.map((item) => ({
10124
+ ...item,
10125
+ isLoading: false,
10126
+ errorMessage,
10127
+ description,
10128
+ })),
9441
10129
  );
9442
10130
  }}
9443
10131
  />
9444
10132
  <FileList
9445
10133
  aria-label="Uploaded files"
10134
+ variant={variant}
9446
10135
  items={items}
9447
10136
  onRemove={(id) => {
9448
10137
  setItems((prev) => prev.filter((item) => item.id !== id));
@@ -9593,23 +10282,79 @@ export const AriaDetailsFileList: React.FC = () => (
9593
10282
  items={defaultItems}
9594
10283
  />
9595
10284
  </>
9596
- );`},similarTo:["FileUploader","ImageDropZone"],figmaUrl:null},FileUploader:{id:"core-forms-fileuploader",breadcrumb:"Core/Forms/FileUploader",importStatement:'import { Box, FileList, FileUploader, VariantViewer } from "@baseline-ui/core";',description:"`FileUploader` lets users select files via the native file picker or by\ndragging and dropping them onto a drop area. It reports the selected files\nthrough `onAdd`; it does not own any `files` state and does not perform the\nupload itself. Because the uploader is stateless, you pair it with `FileList`\nto display (and remove) the files the user has added \u2014 every example below\ndoes exactly that.",documentation:'`FileUploader` lets users select files via the native file picker or by\ndragging and dropping them onto a drop area. It reports the selected files\nthrough `onAdd`; it does not own any `files` state and does not perform the\nupload itself. Because the uploader is stateless, you pair it with `FileList`\nto display (and remove) the files the user has added \u2014 every example below\ndoes exactly that.\n\n* Native file picker triggered by clicking anywhere in the drop area (or the\n button, in the `button` variant)\n* Drag-and-drop and paste support in the `dropzone` variant, built on React\n Aria\'s `DropZone`\n* MIME-type filtering through the `accept` prop\n* Single- or multiple-file selection via `allowsMultiple`\n* Keyboard focus management with visible focus rings, and an error message\n wired to the trigger via `aria-describedby`\n\n`FileUploader` only emits files; it never renders them. Keep the file\ncollection in your own state, append to it in `onAdd`, and render it with a\nsibling `FileList`:\n\n```tsx\nimport { FileUploader, FileList } from "@baseline-ui/core";\nimport type { FileListItem } from "@baseline-ui/core";\n\nconst [items, setItems] = React.useState<FileListItem[]>([]);\n\n<FileUploader\n label="Attachments"\n onAdd={(files) =>\n setItems((current) => [\n ...current,\n ...files.map((file) => ({ id: crypto.randomUUID(), name: file.name })),\n ])\n }\n/>\n<FileList\n aria-label="Uploaded files"\n items={items}\n onRemove={(id) => setItems((c) => c.filter((item) => item.id !== id))}\n/>;\n```\n\nThere are three visual treatments: the default `dropzone`, the `dropzone` with\n`isInline`, and the `button` variant.\n\n* The `dropzone` variant (default) renders a filled drop area that accepts\n dragged and pasted files. Clicking anywhere in the area opens the native file\n picker.\n* Set `isInline` to outline the drop area with a dashed border and rounded\n corners instead of rendering it as a plain filled box.\n* The `button` variant renders a single `ActionButton` that opens the file\n picker, with no drop area. Use it when drag-and-drop is not appropriate for\n the surrounding layout.\n\n```tsx\n<FileUploader label="Dropzone" />\n<FileUploader isInline label="Inline" />\n<FileUploader variant="button" buttonLabel="Upload" />\n```\n\nSee the [Variants story](?path=/story/core-forms-fileuploader--variants) for\nevery variant in every state laid out as a grid.\n\nSet `errorMessage` to show an error below the control; in the `dropzone`\nvariant the drop area is also outlined in the error color. Set `isDisabled` to\nblock all interaction.\n\n```tsx\n<FileUploader label="Error" errorMessage="Upload failed." />\n<FileUploader label="Disabled" isDisabled />\n```\n\nPass `accept` to restrict the picker to specific MIME types, and\n`allowsMultiple={false}` to limit selection to a single file.\n\n```tsx\n<FileUploader accept="image/png" allowsMultiple={false} />\n```\n\nThe root element exposes the current variant; the drop area (in the `dropzone`\nvariant) exposes the React Aria `DropZone` state attributes.\n\n| Selector | Description |\n| ---------------------- | -------------------------------------------------------- |\n| `[data-variant]` | The active variant (`"dropzone"` or `"button"`). |\n| `[data-drop-target]` | Whether files are currently being dragged over the area. |\n| `[data-disabled]` | Whether the uploader is disabled. |\n| `[data-focused]` | Whether the drop area is focused. |\n| `[data-focus-visible]` | Whether the drop area is keyboard focused. |\n| `[data-hovered]` | Whether the drop area is hovered with a mouse. |\n\n| Key | Function |\n| -------------- | ------------------------------------------------------------- |\n| `Tab` | Moves focus between the drop area and the upload button. |\n| `Enter` | Activates the upload button and opens the native file picker. |\n| `Space` | Activates the upload button and opens the native file picker. |\n| Paste shortcut | With the drop area focused, pastes files from the clipboard. |\n\n`errorMessage` is announced to assistive technology and is referenced by the\ntrigger via `aria-describedby`.\n\n* [`FileList`](?path=/docs/core-collections-filelist--docs) \u2014 displays and removes the\n files emitted by `onAdd`.\n* [`ActionButton`](?path=/docs/core-buttons-actionbutton--docs) \u2014 the button\n rendered by the `button` variant.',props:`interface FileUploaderProps {
10285
+ );
10286
+
10287
+ const LOADABLE_IMAGE =
10288
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==";
10289
+
10290
+ const sampleItems: FileListItem[] = [
10291
+ {
10292
+ id: "annual-report",
10293
+ name: "annual-report-2024.pdf",
10294
+ description: "12 pages \xB7 untagged",
10295
+ tag: { label: "Non-compliant", variant: "red" },
10296
+ preview: (
10297
+ <Image src={LOADABLE_IMAGE} alt="" data-testid="annual-report-preview" />
10298
+ ),
10299
+ },
10300
+ {
10301
+ id: "invoice",
10302
+ name: "invoice-tagged.pdf",
10303
+ description: "3 pages \xB7 fully tagged",
10304
+ tag: { label: "Compliant", variant: "green" },
10305
+ },
10306
+ ];
10307
+
10308
+ export const SampleFileList: React.FC<Partial<FileListProps>> = (props) => (
10309
+ <FileList
10310
+ variant="expanded"
10311
+ label="Or start from a sample"
10312
+ items={sampleItems}
10313
+ {...props}
10314
+ />
10315
+ );
10316
+
10317
+ export const BrokenPreviewFileList: React.FC = () => (
10318
+ <FileList
10319
+ variant="grid"
10320
+ aria-label="Samples"
10321
+ items={[
10322
+ {
10323
+ id: "scan",
10324
+ name: "scan.pdf",
10325
+ preview: <Image src="http://localhost:1/missing.png" alt="" />,
10326
+ },
10327
+ ]}
10328
+ />
10329
+ );`},similarTo:["FileUploader","ImageDropZone"],figmaUrl:null},FileUploader:{id:"core-forms-fileuploader",breadcrumb:"Core/Forms/FileUploader",importStatement:'import { Box, FileList, FileUploader, Image, VariantViewer } from "@baseline-ui/core";',description:"`FileUploader` lets users select files via the native file picker or by\ndragging and dropping them onto a drop area. It reports the selected files\nthrough `onAdd`; it does not own any `files` state and does not perform the\nupload itself. Because the uploader is stateless, you pair it with `FileList`\nto display (and remove) the files the user has added \u2014 every example below\ndoes exactly that.",documentation:'`FileUploader` lets users select files via the native file picker or by\ndragging and dropping them onto a drop area. It reports the selected files\nthrough `onAdd`; it does not own any `files` state and does not perform the\nupload itself. Because the uploader is stateless, you pair it with `FileList`\nto display (and remove) the files the user has added \u2014 every example below\ndoes exactly that.\n\n* Native file picker triggered by clicking blank space in the drop area (or the\n button, in the `button` variant)\n* Drag-and-drop and paste support in the `dropzone-*` variants\n* MIME-type filtering through the `accept` prop\n* Single- or multiple-file selection via `allowsMultiple`\n* Keyboard focus management with visible focus rings, and an error message\n wired to the trigger via `aria-describedby`\n\n`FileUploader` only emits files; it never renders them. Keep the file\ncollection in your own state, append to it in `onAdd`, and render it with a\nsibling `FileList`:\n\n```tsx\nimport { FileUploader, FileList } from "@baseline-ui/core";\nimport type { FileListItem } from "@baseline-ui/core";\n\nconst [items, setItems] = React.useState<FileListItem[]>([]);\n\n<FileUploader\n label="Attachments"\n onAdd={(files) =>\n setItems((current) => [\n ...current,\n ...files.map((file) => ({ id: crypto.randomUUID(), name: file.name })),\n ])\n }\n/>\n<FileList\n aria-label="Uploaded files"\n items={items}\n onRemove={(id) => setItems((c) => c.filter((item) => item.id !== id))}\n/>;\n```\n\nThere are four visual treatments, chosen with `variant`.\n\n* `dropzone-box` (default) renders a filled drop area that accepts dragged and\n pasted files. Clicking blank space in the area opens the native file picker.\n* `dropzone-inline` outlines the drop area with a dashed border and rounded\n corners instead of rendering it as a plain filled box.\n* `dropzone-compact` renders a one-line dashed bar with the upload icon, the\n action text and the `description` side by side. The text truncates with an\n ellipsis instead of wrapping, so it suits tight layouts; keep the\n `description` plain text, since a link in it can be cut off. The `children`\n render below the bar, outside the drop area.\n* `button` renders a single `ActionButton` that opens the file picker, with no\n drop area. Use it when drag-and-drop is not appropriate for the surrounding\n layout.\n\n`variant="dropzone"` and `isInline` still work but are deprecated: `"dropzone"`\nis `dropzone-box`, or `dropzone-inline` with `isInline`. Use `dropzone-box` and\n`dropzone-inline` instead.\n\n```tsx\n<FileUploader label="Box" />\n<FileUploader variant="dropzone-inline" label="Inline" />\n<FileUploader variant="dropzone-compact" description="Supports .mov and .mp4" />\n<FileUploader variant="button" buttonLabel="Upload" />\n```\n\nSee the [Variants story](?path=/story/core-forms-fileuploader--variants) for\nevery variant in every state laid out as a grid.\n\nSet `errorMessage` to show an error below the control; in the `dropzone-*`\nvariants the drop area is also outlined in the error color. Set `isDisabled` to\nblock all interaction.\n\n```tsx\n<FileUploader label="Error" errorMessage="Upload failed." />\n<FileUploader label="Disabled" isDisabled />\n```\n\nPass `accept` to restrict the picker to specific MIME types, and\n`allowsMultiple={false}` to limit selection to a single file.\n\n```tsx\n<FileUploader accept="image/png" allowsMultiple={false} />\n```\n\nTo offer sample files the user can start from instead of uploading their own,\nrender a `FileList` with the `expanded` or `grid` variant and handle its\n`onAction`. The uploader neither loads the sample nor calls `onAdd`; fetching it\nis up to you.\n\nTo show the samples below the drop area, render the `FileList` next to the\nuploader:\n\nTo put them inside the drop area, which suits large empty states, pass a\n`grid` `FileList` as the uploader\'s children; an `expanded` list there shrinks\nto its widest card. A file dropped anywhere on the area is\nstill added, and clicking blank space in it opens the file picker, while\nclicking a sample only picks it. Anything clickable among the children should\nbe a Baseline component: a native `<button>`, `<a>` or `<input>` also opens\nthe picker. `isDisabled` disables every sample too. The\n`button` and `dropzone-compact` variants render the children below the\ncontrol instead.\n\n```tsx\n<FileUploader onAdd={handleAdd}>\n <FileList\n variant="grid"\n label="Or start from a sample"\n items={[\n { id: "invoice", name: "Invoice" },\n {\n id: "medical-bill",\n name: "Medical bill",\n preview: <Image src="/medical-bill.png" alt="Medical bill preview" />,\n },\n ]}\n onAction={loadSample}\n />\n</FileUploader>\n```\n\nSee [`FileList`](?path=/docs/core-collections-filelist--docs) for its variants,\nscrolling and keyboard interaction.\n\nThe root element exposes the current variant.\n\n| Selector | Description |\n| ---------------- | ----------------------------------------------------------------------------------------------- |\n| `[data-variant]` | The active variant (`"dropzone-box"`, `"dropzone-inline"`, `"dropzone-compact"` or `"button"`). |\n\n| Key | Function |\n| -------------- | ------------------------------------------------------------------------------------------- |\n| `Tab` | Moves focus to the upload trigger, then to any link in the description and to the children. |\n| `Enter` | Activates the upload trigger and opens the native file picker. |\n| `Space` | Activates the upload trigger and opens the native file picker. |\n| Paste shortcut | With the upload trigger focused, pastes files from the clipboard. |\n\n`errorMessage` is announced to assistive technology and is referenced by the\ntrigger via `aria-describedby`.\n\n* [`FileList`](?path=/docs/core-collections-filelist--docs) \u2014 displays and removes the\n files emitted by `onAdd`.\n* [`ActionButton`](?path=/docs/core-buttons-actionbutton--docs) \u2014 the button\n rendered by the `button` variant.',props:`interface FileUploaderProps {
9597
10330
  /**
9598
10331
  * The visual variant.
9599
10332
  *
9600
- * - \`dropzone\` (default): renders a drop area that accepts dragged and
9601
- * pasted files. Clicking anywhere in the area opens the file picker.
9602
- * - \`button\`: renders an \`ActionButton\` that opens the file picker. No
9603
- * drop target is rendered.
9604
- *
9605
- * @default "dropzone"
9606
- */
9607
- variant?: "dropzone" | "button"
9608
- /**
9609
- * Whether the \`dropzone\` drop area is rendered inline \u2014 outlined with a
9610
- * dashed border and rounded corners \u2014 instead of as a plain filled box.
9611
- * Has no effect on the \`button\` variant.
9612
- *
10333
+ * - \`dropzone-box\` (default): a filled drop area that accepts dragged and
10334
+ * pasted files. Clicking blank space in the area opens the file picker.
10335
+ * - \`dropzone-inline\`: the same drop area outlined with a dashed border and
10336
+ * rounded corners instead of a filled box.
10337
+ * - \`dropzone-compact\`: a one-line dashed bar with the upload icon, the
10338
+ * action text and the \`description\` side by side. The action text and the
10339
+ * description truncate with an ellipsis rather than wrap. The \`children\`
10340
+ * render below the bar, outside the drop area.
10341
+ * - \`button\`: an \`ActionButton\` that opens the file picker. No drop target
10342
+ * is rendered.
10343
+ * - \`dropzone\` (deprecated): an alias for \`dropzone-box\`, or for
10344
+ * \`dropzone-inline\` when \`isInline\` is set. Use one of the values above.
10345
+ *
10346
+ * @default "dropzone-box"
10347
+ */
10348
+ variant?: | "dropzone-box"
10349
+ | "dropzone-inline"
10350
+ | "dropzone-compact"
10351
+ | "button"
10352
+ | "dropzone"
10353
+ /**
10354
+ * Whether the drop area is rendered inline. Only honoured when \`variant\` is
10355
+ * omitted or the deprecated \`"dropzone"\`; any other \`variant\` ignores it.
10356
+ *
10357
+ * @deprecated Use \`variant="dropzone-inline"\`.
9613
10358
  * @default false
9614
10359
  */
9615
10360
  isInline?: boolean
@@ -9618,7 +10363,13 @@ isInline?: boolean
9618
10363
  */
9619
10364
  label?: React.ReactNode
9620
10365
  /**
9621
- * Optional description rendered below the label.
10366
+ * Optional description. The dropzone variants render it inside the drop
10367
+ * area, under the action text (beside it in \`dropzone-compact\`), where
10368
+ * clicking it opens the file picker; a link in it should be a Baseline
10369
+ * \`Link\`, since a native \`<a>\` also opens the picker. Keep it plain text in
10370
+ * \`dropzone-compact\`: it truncates there, so a link can be cut off while
10371
+ * still taking keyboard focus. The \`button\` variant renders it below the
10372
+ * label.
9622
10373
  */
9623
10374
  description?: React.ReactNode
9624
10375
  /**
@@ -9656,12 +10407,26 @@ errorMessage?: string
9656
10407
  */
9657
10408
  buttonLabel?: string
9658
10409
  /**
9659
- * The text rendered inside the clickable drop area in the \`dropzone\`
9660
- * variant.
10410
+ * The text rendered inside the clickable drop area in the dropzone
10411
+ * variants.
9661
10412
  *
9662
10413
  * @default "Drop files here or click to upload"
9663
10414
  */
9664
10415
  dropzoneLabel?: string
10416
+ /**
10417
+ * Content offered alongside the drop area, typically a \`FileList\` of sample
10418
+ * files the user can pick instead of uploading one. In the \`dropzone-box\`
10419
+ * and \`dropzone-inline\` variants it renders inside the drop area, centered,
10420
+ * so a file dropped on it is still added; clicking blank space in the drop
10421
+ * area opens the file picker, and clicking an item, button or link does not.
10422
+ * Use Baseline components for anything clickable here: a native \`<button>\`,
10423
+ * \`<a>\` or \`<input>\` also opens the picker. Use the \`grid\` \`FileList\`
10424
+ * variant here; an \`expanded\` list shrinks to its widest card. The \`button\`
10425
+ * and \`dropzone-compact\` variants render it below the control. Disabling the
10426
+ * uploader disables a \`FileList\` passed here. To show samples outside the
10427
+ * drop area, render the \`FileList\` next to the uploader instead.
10428
+ */
10429
+ children?: React.ReactNode
9665
10430
  }`,stories:{usage:[{id:"core-forms-fileuploader--default",name:"Default",snippet:`const Default = () => <Box style={{ width: 240 }}>
9666
10431
  <UploaderWithFileList label="Label" description="Supports .mov and .mp4" onAdd={fn()} />
9667
10432
  </Box>;`},{id:"core-forms-fileuploader--variants",name:"Variants",snippet:`const Variants = (args) => (
@@ -9671,15 +10436,20 @@ dropzoneLabel?: string
9671
10436
  defaultProps={args}
9672
10437
  cellStyle={{ width: 240 }}
9673
10438
  variants={{
9674
- Dropzone: [
9675
- { variant: "dropzone" },
9676
- { variant: "dropzone", ...ERROR_PROPS },
9677
- { variant: "dropzone", ...DISABLED_PROPS },
10439
+ Box: [
10440
+ { variant: "dropzone-box" },
10441
+ { variant: "dropzone-box", ...ERROR_PROPS },
10442
+ { variant: "dropzone-box", ...DISABLED_PROPS },
9678
10443
  ],
9679
10444
  Inline: [
9680
- { isInline: true },
9681
- { isInline: true, ...ERROR_PROPS },
9682
- { isInline: true, ...DISABLED_PROPS },
10445
+ { variant: "dropzone-inline" },
10446
+ { variant: "dropzone-inline", ...ERROR_PROPS },
10447
+ { variant: "dropzone-inline", ...DISABLED_PROPS },
10448
+ ],
10449
+ Compact: [
10450
+ { variant: "dropzone-compact" },
10451
+ { variant: "dropzone-compact", ...ERROR_PROPS },
10452
+ { variant: "dropzone-compact", ...DISABLED_PROPS },
9683
10453
  ],
9684
10454
  Button: [
9685
10455
  { variant: "button" },
@@ -9696,7 +10466,17 @@ dropzoneLabel?: string
9696
10466
  variant="button"
9697
10467
  buttonLabel="Upload" />
9698
10468
  </Box>;`},{id:"core-forms-fileuploader--inline",name:"Inline",snippet:`const Inline = () => <Box style={{ width: 240 }}>
9699
- <UploaderWithFileList label="Label" description="Supports .mov and .mp4" onAdd={fn()} isInline />
10469
+ <UploaderWithFileList
10470
+ label="Label"
10471
+ description="Supports .mov and .mp4"
10472
+ onAdd={fn()}
10473
+ variant="dropzone-inline" />
10474
+ </Box>;`},{id:"core-forms-fileuploader--compact",name:"Compact",snippet:`const Compact = () => <Box style={{ width: 480 }}>
10475
+ <UploaderWithFileList
10476
+ label="Label"
10477
+ description="Supports .mov and .mp4"
10478
+ onAdd={fn()}
10479
+ variant="dropzone-compact" />
9700
10480
  </Box>;`},{id:"core-forms-fileuploader--error-dropzone",name:"Error Dropzone",snippet:`const ErrorDropzone = () => <Box style={{ width: 240 }}>
9701
10481
  <UploaderWithFileList
9702
10482
  label="Label"
@@ -9710,11 +10490,40 @@ dropzoneLabel?: string
9710
10490
  onAdd={fn()}
9711
10491
  isDisabled />
9712
10492
  </Box>;`},{id:"core-forms-fileuploader--no-label",name:"No Label",snippet:`const NoLabel = () => <Box style={{ width: 240 }}>
9713
- <UploaderWithFileList label={undefined} description={undefined} onAdd={fn()} />
9714
- </Box>;`}],implementation:`import React from "react";
10493
+ <UploaderWithFileList label={undefined} description="Supports .mov and .mp4" onAdd={fn()} />
10494
+ </Box>;`},{id:"core-forms-fileuploader--samples-outside",name:"Samples Outside",snippet:`const SamplesOutside = () => <Box display="flex" flexDirection="column" gap="xl" style={{ width: 480 }}>
10495
+ <FileUploader
10496
+ label={undefined}
10497
+ description="Supports .mov and .mp4"
10498
+ onAdd={fn()}
10499
+ variant="dropzone-inline" />
10500
+ <FileList
10501
+ variant="expanded"
10502
+ label={SAMPLES_LABEL}
10503
+ items={expandedSamples}
10504
+ disabledKeys={args.isDisabled ? "all" : undefined}
10505
+ onAction={fn()} />
10506
+ </Box>;`},{id:"core-forms-fileuploader--samples-inside-grid",name:"Samples Inside Grid",snippet:`const SamplesInsideGrid = () => <Box style={{ width: 720 }}>
10507
+ <FileUploader label="Label" description="Supports .mov and .mp4" onAdd={fn()}><FileList variant="grid" label={SAMPLES_LABEL} items={gridSamples} onAction={fn()} /></FileUploader>
10508
+ </Box>;`},{id:"core-forms-fileuploader--samples-inside-disabled",name:"Samples Inside Disabled",error:{name:"SyntaxError",message:`Expected render to be an arrow function or function expression
10509
+ 239 | isDisabled: true,
10510
+ 240 | },
10511
+ > 241 | render: SamplesInsideGrid.render,
10512
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
10513
+ 242 | };
10514
+ 243 |`}}],implementation:`import React from "react";
10515
+ import { useDrag } from "react-aria/useDrag";
10516
+ import { createPortal } from "react-dom";
9715
10517
 
10518
+ import { ActionButton } from "../../ActionButton";
10519
+ import { Box } from "../../Box";
10520
+ import { Checkbox } from "../../Checkbox";
10521
+ import { SampleFileList } from "../../FileList/__tests__/testComponents";
10522
+ import { FileList } from "../../FileList/FileList";
10523
+ import { Link } from "../../Link";
9716
10524
  import { FileUploader } from "../FileUploader";
9717
10525
 
10526
+ import type { FileListProps } from "../../FileList/FileList.types";
9718
10527
  import type { FileUploaderProps } from "../FileUploader.types";
9719
10528
 
9720
10529
  export const ToggleDisabledFileUploaderExample: React.FC<FileUploaderProps> = (
@@ -9735,6 +10544,130 @@ export const ToggleDisabledFileUploaderExample: React.FC<FileUploaderProps> = (
9735
10544
  <FileUploader label="Upload" isDisabled={isDisabled} {...props} />
9736
10545
  </>
9737
10546
  );
10547
+ };
10548
+
10549
+ interface SampleFileUploaderProps extends Partial<FileUploaderProps> {
10550
+ listVariant?: FileListProps["variant"];
10551
+ onAction?: FileListProps["onAction"];
10552
+ disabledKeys?: FileListProps["disabledKeys"];
10553
+ }
10554
+
10555
+ export const SampleFileUploader: React.FC<SampleFileUploaderProps> = ({
10556
+ listVariant = "expanded",
10557
+ onAction,
10558
+ disabledKeys,
10559
+ ...props
10560
+ }) => (
10561
+ <FileUploader label="Upload" {...props}>
10562
+ <SampleFileList
10563
+ variant={listVariant}
10564
+ onAction={onAction}
10565
+ disabledKeys={disabledKeys}
10566
+ />
10567
+ </FileUploader>
10568
+ );
10569
+
10570
+ export const DisabledAncestorFileUploader: React.FC = () => (
10571
+ <div aria-disabled="true">
10572
+ <SampleFileUploader />
10573
+ </div>
10574
+ );
10575
+
10576
+ export const NarrowSampleGridFileUploader: React.FC = () => (
10577
+ <Box style={{ width: 240 }}>
10578
+ <SampleFileUploader listVariant="grid" />
10579
+ </Box>
10580
+ );
10581
+
10582
+ export const CompactGridCellFileUploader: React.FC = () => (
10583
+ <Box display="grid" style={{ width: 300, gridTemplateColumns: "1fr" }}>
10584
+ <FileUploader
10585
+ variant="dropzone-compact"
10586
+ description="Supports .mov, .mp4, .avi, .mkv and .webm up to 2 GB"
10587
+ />
10588
+ </Box>
10589
+ );
10590
+
10591
+ export const CenteredGridFileUploader: React.FC = () => (
10592
+ <Box style={{ width: 640 }}>
10593
+ <FileUploader label="Upload">
10594
+ <FileList
10595
+ variant="grid"
10596
+ aria-label="Samples"
10597
+ items={["a", "b", "c", "d", "e"].map((id) => ({
10598
+ id,
10599
+ name: \`\${id}.pdf\`,
10600
+ }))}
10601
+ onAction={() => {}}
10602
+ />
10603
+ </FileUploader>
10604
+ </Box>
10605
+ );
10606
+
10607
+ export const DescriptionLinkFileUploader: React.FC<{
10608
+ onPress?: () => void;
10609
+ }> = ({ onPress }) => (
10610
+ <FileUploader
10611
+ label="Upload"
10612
+ description={
10613
+ <>
10614
+ PDF up to 10 MB. <Link onPress={onPress}>Supported formats</Link>
10615
+ </>
10616
+ }
10617
+ />
10618
+ );
10619
+
10620
+ export const SamplesOnFocusFileUploader: React.FC = () => {
10621
+ const [hasSamples, setHasSamples] = React.useState(false);
10622
+
10623
+ return (
10624
+ <div
10625
+ onFocus={() => {
10626
+ setHasSamples(true);
10627
+ }}
10628
+ >
10629
+ <FileUploader label="Upload">
10630
+ {hasSamples ? <SampleFileList /> : null}
10631
+ </FileUploader>
10632
+ </div>
10633
+ );
10634
+ };
10635
+
10636
+ export const KeyboardDragFileUploader: React.FC = () => {
10637
+ const { dragProps } = useDrag({
10638
+ getItems: () => [{ "text/plain": "hello" }],
10639
+ });
10640
+
10641
+ return (
10642
+ <>
10643
+ <div {...dragProps} role="button" tabIndex={0}>
10644
+ Draggable
10645
+ </div>
10646
+ <SampleFileUploader />
10647
+ </>
10648
+ );
10649
+ };
10650
+
10651
+ export const InteractiveChildrenFileUploader: React.FC<{
10652
+ onPress?: () => void;
10653
+ onToggle?: (isSelected: boolean) => void;
10654
+ }> = ({ onPress, onToggle }) => {
10655
+ const [portalContainer, setPortalContainer] =
10656
+ React.useState<HTMLDivElement | null>(null);
10657
+
10658
+ return (
10659
+ <>
10660
+ <FileUploader label="Upload">
10661
+ <ActionButton label="Load sample" onPress={onPress} />
10662
+ <Link onPress={() => {}}>Sample link</Link>
10663
+ <Checkbox label="Run text recognition" onChange={onToggle} />
10664
+ {portalContainer
10665
+ ? createPortal(<span>Portaled sample preview</span>, portalContainer)
10666
+ : null}
10667
+ </FileUploader>
10668
+ <div ref={setPortalContainer} />
10669
+ </>
10670
+ );
9738
10671
  };`},similarTo:[],figmaUrl:null},FrameProvider:{id:"core-utilities-frameprovider",breadcrumb:"Core/Utilities/FrameProvider",importStatement:`import {
9739
10672
  Box,
9740
10673
  FrameProvider,
@@ -10356,10 +11289,10 @@ export const PopoverWithFrameBoundaryExample: React.FC<{
10356
11289
  </FrameProvider>
10357
11290
  </Box>
10358
11291
  );
10359
- };`},similarTo:[],figmaUrl:null},FreehandCanvas:{id:"core-miscellaneous-freehandcanvas",breadcrumb:"Core/Miscellaneous/FreehandCanvas",importStatement:'import { ControlledFreehandCanvas, FreehandCanvas } from "@baseline-ui/core";',description:"`FreehandCanvas` is a drawing surface that captures freehand strokes from mouse, pen, or touch input, with built-in undo, redo, and clear. Use it for signatures, sketches, annotations, or any input that requires hand-drawn shapes.",documentation:`\`FreehandCanvas\` is a drawing surface that captures freehand strokes from mouse, pen, or touch input, with built-in undo, redo, and clear. Use it for signatures, sketches, annotations, or any input that requires hand-drawn shapes.
11292
+ };`},similarTo:[],figmaUrl:null},FreehandCanvas:{id:"core-miscellaneous-freehandcanvas",breadcrumb:"Core/Miscellaneous/FreehandCanvas",importStatement:'import { ControlledFreehandCanvas, FreehandCanvas } from "@baseline-ui/core";',description:"`FreehandCanvas` is a drawing surface that captures freehand strokes from mouse, pen, or touch input, with built-in clear and optional undo and redo. Use it for signatures, sketches, annotations, or any input that requires hand-drawn shapes.",documentation:`\`FreehandCanvas\` is a drawing surface that captures freehand strokes from mouse, pen, or touch input, with built-in clear and optional undo and redo. Use it for signatures, sketches, annotations, or any input that requires hand-drawn shapes.
10360
11293
 
10361
11294
  * Draw on the canvas with your mouse or pointer
10362
- * Undo and redo your drawings via keyboard shortcuts
11295
+ * Undo and redo your drawings (opt-in via \`enableHistory\`)
10363
11296
  * Clear the canvas via keyboard shortcut (or button)
10364
11297
 
10365
11298
  \`\`\`jsx
@@ -10369,7 +11302,7 @@ import { FreehandCanvas } from "@baseline-ui/core";
10369
11302
  \`\`\`
10370
11303
 
10371
11304
  You can listen for events on the canvas by passing an \`onChange\` prop. The \`onChange\` prop is a function that receives the points that have been drawn on the canvas.
10372
- You can also use \`onChaneEnd\` to listen for the end of a drawing. This is useful if you want to save the drawing to a database or something similar.
11305
+ You can also use \`onChangeEnd\` to listen for the end of a drawing. This is useful if you want to save the drawing to a database or something similar.
10373
11306
 
10374
11307
  \`\`\`jsx
10375
11308
  import { FreehandCanvas } from "@baseline-ui/core";
@@ -10387,13 +11320,12 @@ const handleChangeEnd = (points) => {
10387
11320
 
10388
11321
  You can render the canvas with a default value by passing a \`defaultValue\` prop.
10389
11322
 
10390
- By default, the component supports undo and redo via keyboard shortcuts. You can disable this behavior by passing a \`enableHistory\` prop with a value of \`false\`.
11323
+ Undo and redo are off by default. Pass \`enableHistory\` to turn them on: the canvas then shows undo and redo buttons, and \`Cmd\` or \`Ctrl\` + \`Z\` undoes.
10391
11324
 
10392
11325
  | Key | Action |
10393
- | ---------------------- | ------ |
10394
- | \`Ctrl\` + \`Z\` | Undo |
10395
- | \`Ctrl\` + \`Shift\` + \`Z\` | Redo |
10396
- | \`Delete\` | Clear |
11326
+ | --------------------- | --------------------------- |
11327
+ | \`Cmd\` or \`Ctrl\` + \`Z\` | Undo (with \`enableHistory\`) |
11328
+ | \`Backspace\` | Clear |
10397
11329
 
10398
11330
  The following strings are used by the \`FreehandCanvas\` component and can be overridden via \`I18nProvider\`:
10399
11331
 
@@ -10553,6 +11485,11 @@ value?: FreehandCanvasLine[]
10553
11485
  * The label for the canvas.
10554
11486
  */
10555
11487
  label?: string
11488
+ /**
11489
+ * The accessible name of the canvas. Without it, the canvas is named by
11490
+ * \`label\` or \`aria-labelledby\`, and by "Drawing canvas" when neither is set.
11491
+ */
11492
+ aria-label?: string
10556
11493
  /**
10557
11494
  * Whether to enable history for undo/redo.
10558
11495
  *
@@ -10589,7 +11526,6 @@ redoLabel?: string
10589
11526
  * Description for the canvas.
10590
11527
  */
10591
11528
  description?: string
10592
- aria-label?: any
10593
11529
  }`,stories:{usage:[{id:"core-miscellaneous-freehandcanvas--basic",name:"Basic",snippet:`const Basic = () => <FreehandCanvas
10594
11530
  style={{
10595
11531
  width: 240,
@@ -10713,14 +11649,17 @@ export const ControlledFreehandCanvas = ({
10713
11649
  export const TrackedControlledFreehandCanvas = ({
10714
11650
  onChange,
10715
11651
  onChangeEnd,
11652
+ clearLabel,
10716
11653
  }: {
10717
11654
  onChange?: (value: FreehandCanvasProps["value"]) => void;
10718
11655
  onChangeEnd?: (value: FreehandCanvasProps["value"]) => void;
11656
+ clearLabel?: string;
10719
11657
  }) => {
10720
11658
  const [value, setValue] = useState<FreehandCanvasProps["value"]>([]);
10721
11659
 
10722
11660
  return (
10723
11661
  <FreehandCanvas
11662
+ clearLabel={clearLabel}
10724
11663
  value={value}
10725
11664
  onChange={(value) => {
10726
11665
  setValue(value);
@@ -10732,7 +11671,14 @@ export const TrackedControlledFreehandCanvas = ({
10732
11671
  }}
10733
11672
  />
10734
11673
  );
10735
- };`},similarTo:[],figmaUrl:null},GridList:{id:"core-collections-gridlist",breadcrumb:"Core/Collections/GridList",importStatement:'import { DynamicGridListExample, GridList } from "@baseline-ui/core";',description:"`GridList` displays a collection of items in a single column or row with support for selection, interactive children, and arrow-key navigation. Use it when you need a keyboard-navigable list whose rows can contain buttons, checkboxes, or other controls.",documentation:`\`GridList\` displays a collection of items in a single column or row with support for selection, interactive children, and arrow-key navigation. Use it when you need a keyboard-navigable list whose rows can contain buttons, checkboxes, or other controls.
11674
+ };
11675
+
11676
+ export const FreehandCanvasWithHint = (props: FreehandCanvasProps) => (
11677
+ <>
11678
+ <p id="freehand-canvas-hint">Sign inside the box.</p>
11679
+ <FreehandCanvas {...props} />
11680
+ </>
11681
+ );`},similarTo:[],figmaUrl:null},GridList:{id:"core-collections-gridlist",breadcrumb:"Core/Collections/GridList",importStatement:'import { DynamicGridListExample, GridList } from "@baseline-ui/core";',description:"`GridList` displays a collection of items in a single column or row with support for selection, interactive children, and arrow-key navigation. Use it when you need a keyboard-navigable list whose rows can contain buttons, checkboxes, or other controls.",documentation:`\`GridList\` displays a collection of items in a single column or row with support for selection, interactive children, and arrow-key navigation. Use it when you need a keyboard-navigable list whose rows can contain buttons, checkboxes, or other controls.
10736
11682
 
10737
11683
  * **Item Selection**: Single or multiple selections with optional checkboxes.
10738
11684
  * **Interactive Children**: Supports buttons, checkboxes, and menus within list items.
@@ -11128,9 +12074,12 @@ export const GridListDragHandle = ({
11128
12074
  );
11129
12075
  };
11130
12076
 
11131
- export const EditableGridListExample: React.FC<GridListExampleProps> = (
11132
- props,
11133
- ) => {
12077
+ export const EditableGridListExample: React.FC<
12078
+ GridListExampleProps & {
12079
+ onInputKeyDown?: (key: string) => void;
12080
+ onAncestorKeyDown?: (key: string) => void;
12081
+ }
12082
+ > = ({ onInputKeyDown, onAncestorKeyDown, ...props }) => {
11134
12083
  const [isEditing, setIsEditing] = useState(false);
11135
12084
  const [selectedKey, setSelectedKey] = useState("1");
11136
12085
 
@@ -11173,6 +12122,14 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
11173
12122
  className="edit-item-input"
11174
12123
  autoFocus={true}
11175
12124
  defaultValue={textValue}
12125
+ onKeyDown={
12126
+ onInputKeyDown
12127
+ ? (e) => {
12128
+ onInputKeyDown(e.key);
12129
+ e.continuePropagation();
12130
+ }
12131
+ : undefined
12132
+ }
11176
12133
  onBlur={(e) => {
11177
12134
  const blurEvent = e;
11178
12135
  onItemUpdate(value?.id, blurEvent.currentTarget.value);
@@ -11188,11 +12145,11 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
11188
12145
  </li>
11189
12146
  );
11190
12147
  },
11191
- [selectedKey, isEditing, onItemUpdate],
12148
+ [selectedKey, isEditing, onItemUpdate, onInputKeyDown],
11192
12149
  );
11193
12150
 
11194
12151
  return (
11195
- <>
12152
+ <div onKeyDown={(e) => onAncestorKeyDown?.(e.key)}>
11196
12153
  <GridList
11197
12154
  items={itemList.items}
11198
12155
  renderGridItem={renderGridItem}
@@ -11213,7 +12170,7 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
11213
12170
  >
11214
12171
  Edit selected item
11215
12172
  </button>
11216
- </>
12173
+ </div>
11217
12174
  );
11218
12175
  };`},similarTo:[],figmaUrl:null},Group:{id:"core-utilities-group",breadcrumb:"Core/Utilities/Group",importStatement:'import { ActionButton, Group } from "@baseline-ui/core";',description:"`Group` is a container that exposes a set of related UI controls as a single labelled unit to assistive technology. Use it to associate adjacent controls like toolbars or button clusters under a shared accessible label.",documentation:'`Group` is a container that exposes a set of related UI controls as a single labelled unit to assistive technology. Use it to associate adjacent controls like toolbars or button clusters under a shared accessible label.\n\n```jsx\nimport { Group, ActionButton } from "@baseline-ui/core";\n\n<Group>\n <ActionButton label="Label 1" />\n <ActionButton label="Label 2" />\n <ActionButton label="Label 3" />\n</Group>;\n```\n\nThe Group component in the given file path accepts the `aria-label` and `aria-labelledby` attributes to provide an accessible label to the group as a whole. These attributes are read by assistive technology when navigating into the group from outside. It is recommended to use an additional label for the group when the labels of each child element do not provide sufficient context on their own.\n\n```jsx\n<span id="label-id">Label</span>\n<Group aria-labelledby="label-id">\n {/* ... */}\n</Group>\n```\n\nBy default, `Group` uses the `group` ARIA role. If the contents of the group is important enough to be included in the page table of contents, use `role="region"` instead, and ensure that an aria-label or `aria-labelledby` prop is assigned.\n\n```jsx\n<Group role="region" aria-label="Object details">\n {/* ... */}\n</Group>\n```\n\n| Selector | Description |\n| --------------- | ---------------------------------------------------- |\n| \\[data-disabled] | Whether the group is disabled. |\n| \\[data-hovered] | Whether the group is currently hovered with a mouse. |',props:`interface GroupProps {
11219
12176
  /**
@@ -11429,7 +12386,116 @@ export const OverridePrecedenceExample: React.FC = () => (
11429
12386
  pageXofYLabel="Prop position"
11430
12387
  />
11431
12388
  </I18nProvider>
11432
- );`},similarTo:[],figmaUrl:null},ImageDropZone:{id:"core-forms-imagedropzone",breadcrumb:"Core/Forms/ImageDropZone",importStatement:'import { ImageDropZone, VariantViewer } from "@baseline-ui/core";',description:"`ImageDropZone` is a single-image input that accepts a file via drag-and-drop, paste, or the native picker and previews it in place. Use it when collecting one representative image, such as an avatar, logo, or thumbnail, with an optional replace and remove flow.",documentation:`\`ImageDropZone\` is a single-image input that accepts a file via drag-and-drop, paste, or the native picker and previews it in place. Use it when collecting one representative image, such as an avatar, logo, or thumbnail, with an optional replace and remove flow.
12389
+ );`},similarTo:[],figmaUrl:null},Image:{id:"core-content-image",breadcrumb:"Core/Content/Image",importStatement:'import { Box, Image } from "@baseline-ui/core";',description:"`Image` displays a picture that fills its container, with control over how it is cropped and what shows when it cannot be loaded. Use it for previews and thumbnails.",documentation:'`Image` displays a picture that fills its container, with control over how it is cropped and what shows when it cannot be loaded. Use it for previews and thumbnails.\n\n```jsx\nimport { Image } from "@baseline-ui/core";\n\n<Image src="/photo.png" alt="A mountain at sunrise" />;\n```\n\n`alt` is required. Pass an empty string when the image is decorative.\n\nThe image takes the full width and height of its container, so size the container, not the image. Set `loading="lazy"` to defer loading until the image nears the viewport, for example for thumbnails in a long list. Other `<img>` attributes such as `srcSet` and `sizes` pass through to the underlying element.\n\n`fit` chooses how the image fills its container. `cover` (the default) crops the image to fill it, and `contain` shows the whole image inside it.\n\n```jsx\n<Image src="/photo.png" alt="A mountain at sunrise" fit="contain" />\n```\n\nPass `fallback` to show other content in place of the image when it fails to load, including a server-rendered image that failed before hydration, or when `src` is empty. Without it, the browser\'s broken-image rendering stays. The image is tried again when `src` changes. The fallback replaces the `<img>`, so give meaningful fallback content its own accessible name.\n\n```jsx\n<Image src="/photo.png" alt="A mountain at sunrise" fallback={<Icon />} />\n```\n\nAs a `FileList` item\'s `preview`, an `Image` without a `fallback` shows the file icon.',props:`interface ImageProps {
12390
+ /**
12391
+ * The URL of the image to display.
12392
+ */
12393
+ src: string
12394
+ /**
12395
+ * The text alternative of the image. Pass an empty string when the image is
12396
+ * purely decorative.
12397
+ */
12398
+ alt: string
12399
+ /**
12400
+ * How the image fills its container. \`cover\` crops the image to fill the
12401
+ * container; \`contain\` shows the whole image inside it.
12402
+ *
12403
+ * @default "cover"
12404
+ */
12405
+ fit?: "cover" | "contain"
12406
+ /**
12407
+ * When the browser loads the image. \`lazy\` defers it until the image is near
12408
+ * the viewport, which suits thumbnails in long lists; \`eager\` loads it right
12409
+ * away.
12410
+ *
12411
+ * @default "eager"
12412
+ */
12413
+ loading?: "lazy" | "eager"
12414
+ /**
12415
+ * Content rendered in place of the image when it fails to load or \`src\` is
12416
+ * empty. Without it, the browser's broken-image rendering stays. The
12417
+ * fallback replaces the \`<img>\`, so \`alt\`, \`className\`, \`style\` and the ref
12418
+ * do not apply to it; give a meaningful fallback its own accessible name.
12419
+ */
12420
+ fallback?: React.ReactNode
12421
+ }`,stories:{usage:[{id:"core-content-image--basic",name:"Basic",snippet:'const Basic = () => <Image src="avatar.png" alt="A profile picture" />;'},{id:"core-content-image--contain",name:"Contain",snippet:'const Contain = () => <Image fit="contain" />;'},{id:"core-content-image--fallback",name:"Fallback",snippet:`const Fallback = () => <Image
12422
+ src="missing.png"
12423
+ alt="A profile picture"
12424
+ fallback={(<Box padding="md" typography="body.md.regular" color="text.primary">The image could not be loaded.
12425
+ </Box>)} />;`}],implementation:`import React from "react";
12426
+ import { hydrateRoot } from "react-dom/client";
12427
+ import { renderToString } from "react-dom/server";
12428
+
12429
+ import { ActionButton } from "../../ActionButton";
12430
+ import { Image } from "../Image";
12431
+
12432
+ import type { Root } from "react-dom/client";
12433
+
12434
+ export const ImageFallbackExample: React.FC<{ src: string }> = ({ src }) => (
12435
+ <Image src={src} alt="Sample" fallback={<span>Fallback content</span>} />
12436
+ );
12437
+
12438
+ /** Hydrates after the server-rendered image settles, so its error fires before React listens. */
12439
+ export const HydratedImageFallbackExample: React.FC<{ src: string }> = ({
12440
+ src,
12441
+ }) => {
12442
+ const containerRef = React.useRef<HTMLDivElement>(null);
12443
+
12444
+ React.useEffect(() => {
12445
+ const container = containerRef.current;
12446
+ if (!container) return;
12447
+ const element = <ImageFallbackExample src={src} />;
12448
+ // eslint-disable-next-line no-unsanitized/property
12449
+ container.innerHTML = renderToString(element);
12450
+ const image = container.querySelector("img");
12451
+ let root: Root | undefined;
12452
+ const hydrate = () => {
12453
+ root = hydrateRoot(container, element);
12454
+ };
12455
+ if (!image || image.complete) {
12456
+ hydrate();
12457
+ } else {
12458
+ image.addEventListener("error", hydrate, { once: true });
12459
+ image.addEventListener("load", hydrate, { once: true });
12460
+ }
12461
+ return () => {
12462
+ root?.unmount();
12463
+ };
12464
+ }, [src]);
12465
+
12466
+ return <div ref={containerRef} />;
12467
+ };
12468
+
12469
+ export const EmptySourceImageExample: React.FC = () => (
12470
+ <Image src="" alt="Sample" fallback={<span>Fallback content</span>} />
12471
+ );
12472
+
12473
+ export const ImageWithoutFallbackExample: React.FC<{
12474
+ src: string;
12475
+ loading?: "lazy" | "eager";
12476
+ }> = ({ src, loading }) => <Image src={src} alt="Sample" loading={loading} />;
12477
+
12478
+ export const ImageSourcesExample: React.FC<{ sources: string[] }> = ({
12479
+ sources,
12480
+ }) => {
12481
+ const [index, setIndex] = React.useState(0);
12482
+
12483
+ return (
12484
+ <>
12485
+ <Image
12486
+ src={sources[index]}
12487
+ alt="Sample"
12488
+ fallback={<span>Fallback content</span>}
12489
+ />
12490
+ <ActionButton
12491
+ label="Next source"
12492
+ onPress={() => {
12493
+ setIndex((i) => (i + 1) % sources.length);
12494
+ }}
12495
+ />
12496
+ </>
12497
+ );
12498
+ };`},similarTo:[],figmaUrl:null},ImageDropZone:{id:"core-forms-imagedropzone",breadcrumb:"Core/Forms/ImageDropZone",importStatement:'import { ImageDropZone, VariantViewer } from "@baseline-ui/core";',description:"`ImageDropZone` is a single-image input that accepts a file via drag-and-drop, paste, or the native picker and previews it in place. Use it when collecting one representative image, such as an avatar, logo, or thumbnail, with an optional replace and remove flow.",documentation:`\`ImageDropZone\` is a single-image input that accepts a file via drag-and-drop, paste, or the native picker and previews it in place. Use it when collecting one representative image, such as an avatar, logo, or thumbnail, with an optional replace and remove flow.
11433
12499
 
11434
12500
  * Automatic handling of Keyboard focus management and cross browser normalization
11435
12501
  * Labeling support for screen readers (aria-describedby)
@@ -11918,7 +12984,7 @@ imageWidth?: number | "sm" | "md"
11918
12984
  /**
11919
12985
  * The aspect ratio of the images.
11920
12986
  *
11921
- * @default 16 / 9
12987
+ * @default 3 / 4
11922
12988
  */
11923
12989
  aspectRatio?: number
11924
12990
  /**
@@ -11987,11 +13053,12 @@ imageDimensions?: | Dimension
11987
13053
  */
11988
13054
  layoutTransition?: Transition | boolean
11989
13055
  /**
11990
- * The title of the delete confirmation modal.
13056
+ * The title of the delete confirmation modal. A function receives the keys
13057
+ * about to be deleted, or \`"all"\` when the delete comes from Select All.
11991
13058
  *
11992
13059
  * @default "Are you sure you want to delete this item?"
11993
13060
  */
11994
- deleteConfirmationTitle?: string | ((selectedKeys: Selection) => string)
13061
+ deleteConfirmationTitle?: string | ((keys: Selection) => string)
11995
13062
  /**
11996
13063
  * Overrides the label of the button that permanently deletes the selected
11997
13064
  * image(s), and the accessible label of each image's individual delete
@@ -12034,6 +13101,11 @@ loadingLabel?: string
12034
13101
  fit="cover"
12035
13102
  aria-label="Image gallery"
12036
13103
  defaultItems={items}
13104
+ onDelete={fn()} />;`},{id:"core-collections-imagegallery--with-disabled-deletion",name:"With Disabled Deletion",snippet:`const WithDisabledDeletion = () => <ImageGallery
13105
+ fit="cover"
13106
+ aria-label="Image gallery"
13107
+ defaultItems={items.slice(0, 4)}
13108
+ disabledKeys={["2"]}
12037
13109
  onDelete={fn()} />;`},{id:"core-collections-imagegallery--with-reordering",name:"With Reordering",snippet:`const WithReordering = () => <ImageGallery
12038
13110
  fit="cover"
12039
13111
  aria-label="Image gallery"
@@ -12188,14 +13260,41 @@ const SCALE_FACTOR = 1.5;
12188
13260
 
12189
13261
  export function ImageGalleryExample({
12190
13262
  onDelete,
13263
+ onSelectedKeysChange,
12191
13264
  ancestorKey,
13265
+ describeDeletedKeys,
13266
+ customDeleteButton,
12192
13267
  ...props
12193
13268
  }: Omit<React.ComponentProps<typeof ImageGallery>, "onDelete"> & {
12194
13269
  onDelete?: (keys: Key[]) => void;
13270
+ /** \`onSelectionChange\` as an array, since a \`Set\` does not survive the CT bridge. */
13271
+ onSelectedKeysChange?: (keys: Key[] | "all") => void;
12195
13272
  ancestorKey?: string;
13273
+ describeDeletedKeys?: boolean;
13274
+ /** Renders each item through \`renderImage\` with its own button wired to \`onDelete\`. */
13275
+ customDeleteButton?: boolean;
12196
13276
  }) {
12197
13277
  const gallery = (
12198
13278
  <ImageGallery
13279
+ deleteConfirmationTitle={
13280
+ describeDeletedKeys
13281
+ ? (keys) =>
13282
+ keys === "all" ? "Delete all" : \`Delete \${[...keys].join(", ")}\`
13283
+ : undefined
13284
+ }
13285
+ renderImage={
13286
+ customDeleteButton
13287
+ ? (item, { onDelete: deleteItem }) => (
13288
+ <button
13289
+ onClick={() => {
13290
+ deleteItem?.(item.id);
13291
+ }}
13292
+ >
13293
+ Remove {item.label}
13294
+ </button>
13295
+ )
13296
+ : undefined
13297
+ }
12199
13298
  {...props}
12200
13299
  onDelete={
12201
13300
  onDelete
@@ -12204,6 +13303,13 @@ export function ImageGalleryExample({
12204
13303
  }
12205
13304
  : undefined
12206
13305
  }
13306
+ onSelectionChange={
13307
+ onSelectedKeysChange
13308
+ ? (keys) => {
13309
+ onSelectedKeysChange(keys === "all" ? "all" : [...keys]);
13310
+ }
13311
+ : props.onSelectionChange
13312
+ }
12207
13313
  />
12208
13314
  );
12209
13315
 
@@ -12332,9 +13438,14 @@ export function DynamicImageGalleryExample({
12332
13438
  );
12333
13439
  }
12334
13440
 
12335
- export function ControlledImageGalleryExample(
12336
- props: Omit<React.ComponentProps<typeof ImageGallery>, "onDelete" | "items">,
12337
- ) {
13441
+ export function ControlledImageGalleryExample({
13442
+ reselectFirstOnDelete,
13443
+ reselectFirstOnListChange,
13444
+ ...props
13445
+ }: Omit<React.ComponentProps<typeof ImageGallery>, "onDelete" | "items"> & {
13446
+ reselectFirstOnDelete?: boolean;
13447
+ reselectFirstOnListChange?: boolean;
13448
+ }) {
12338
13449
  const [dynamicItems, setDynamicItems] = React.useState(items.slice(0, 4));
12339
13450
 
12340
13451
  const [selectedIndex, setSelectedIndex] = React.useState(0);
@@ -12354,6 +13465,9 @@ export function ControlledImageGalleryExample(
12354
13465
  setDynamicItems((prevItems) => {
12355
13466
  return prevItems.filter((item) => item.id !== keys[0]);
12356
13467
  });
13468
+ if (reselectFirstOnDelete) {
13469
+ setSelectedIndex(0);
13470
+ }
12357
13471
  };
12358
13472
 
12359
13473
  return (
@@ -12392,6 +13506,12 @@ export function ControlledImageGalleryExample(
12392
13506
  );
12393
13507
  }}
12394
13508
  onDelete={handleDelete}
13509
+ onListChange={(list) => {
13510
+ props.onListChange?.(list);
13511
+ if (reselectFirstOnListChange) {
13512
+ setSelectedIndex(0);
13513
+ }
13514
+ }}
12395
13515
  />
12396
13516
  </Box>
12397
13517
  );
@@ -13437,6 +14557,33 @@ className?: string
13437
14557
  * The style applied to the root element of the component.
13438
14558
  */
13439
14559
  style?: React.CSSProperties
14560
+ /**
14561
+ * The placement of the toolbar relative to the selected text.
14562
+ *
14563
+ * @default "top"
14564
+ */
14565
+ placement?: | 'bottom'
14566
+ | 'bottom left'
14567
+ | 'bottom right'
14568
+ | 'bottom start'
14569
+ | 'bottom end'
14570
+ | 'top'
14571
+ | 'top left'
14572
+ | 'top right'
14573
+ | 'top start'
14574
+ | 'top end'
14575
+ | 'left'
14576
+ | 'left top'
14577
+ | 'left bottom'
14578
+ | 'start'
14579
+ | 'start top'
14580
+ | 'start bottom'
14581
+ | 'right'
14582
+ | 'right top'
14583
+ | 'right bottom'
14584
+ | 'end'
14585
+ | 'end top'
14586
+ | 'end bottom'
13440
14587
  /**
13441
14588
  * The children of the InlineToolbar component. This should be a single
13442
14589
  * element that will be used as the trigger for the InlineToolbar. Any text
@@ -13487,7 +14634,6 @@ isDisabled?: boolean
13487
14634
  * \`anchorRect\` instead of the selection.
13488
14635
  */
13489
14636
  anchorRect?: Rect
13490
- placement?: any
13491
14637
  }`,stories:{usage:[{id:"core-overlays-inlinetoolbar--basic",name:"Basic",snippet:`const Basic = () => <InlineToolbar
13492
14638
  onAction={(id: string, selection: Selection) => {
13493
14639
  alert(\`Action \${id} clicked with selection "\${selection.toString()}"\`);
@@ -13552,6 +14698,7 @@ placement?: any
13552
14698
  </Text>
13553
14699
  <ActionButton label="Save" />
13554
14700
  </Box>)</InlineToolbar>;`}],implementation:`import { TrashIcon } from "@baseline-ui/icons/24";
14701
+ import { ShadowRoot } from "@baseline-ui/test-utils/client";
13555
14702
  import React from "react";
13556
14703
 
13557
14704
  import { InlineToolbar } from "../InlineToolbar";
@@ -13594,7 +14741,13 @@ export const InlineToolbarExample = ({
13594
14741
  )}
13595
14742
  </InlineToolbar>
13596
14743
  );
13597
- };`},similarTo:[],figmaUrl:null},Kbd:{id:"core-content-kbd",breadcrumb:"Core/Content/Kbd",importStatement:'import { Box, Kbd } from "@baseline-ui/core";',description:"`Kbd` renders a key or keyboard shortcut as a styled keycap and adapts modifier names to the user's operating system. Use it to display hotkeys inline with text, in menus, or in help documentation.",documentation:`\`Kbd\` renders a key or keyboard shortcut as a styled keycap and adapts modifier names to the user's operating system. Use it to display hotkeys inline with text, in menus, or in help documentation.
14744
+ };
14745
+
14746
+ export const InlineToolbarInShadowRootExample = () => (
14747
+ <ShadowRoot style={{ width: 400, height: 200 }}>
14748
+ <InlineToolbarExample />
14749
+ </ShadowRoot>
14750
+ );`},similarTo:[],figmaUrl:null},Kbd:{id:"core-content-kbd",breadcrumb:"Core/Content/Kbd",importStatement:'import { Box, Kbd } from "@baseline-ui/core";',description:"`Kbd` renders a key or keyboard shortcut as a styled keycap and adapts modifier names to the user's operating system. Use it to display hotkeys inline with text, in menus, or in help documentation.",documentation:`\`Kbd\` renders a key or keyboard shortcut as a styled keycap and adapts modifier names to the user's operating system. Use it to display hotkeys inline with text, in menus, or in help documentation.
13598
14751
 
13599
14752
  * Keycap-styled visual appearance
13600
14753
  * OS-aware shortcut conversion (Ctrl becomes Cmd on Mac)
@@ -14434,7 +15587,7 @@ export const DynamicListBoxExample: React.FC<
14434
15587
  >
14435
15588
  <Box
14436
15589
  color={
14437
- isSelected ? "icon.interactive.enabled" : "icon.primary"
15590
+ isSelected ? "text.interactive.enabled" : "icon.primary"
14438
15591
  }
14439
15592
  typography="label.md.medium"
14440
15593
  paddingY="md"
@@ -14915,6 +16068,33 @@ optionStyle?: | React.CSSProperties
14915
16068
  item: TOption,
14916
16069
  renderProps: TRenderProps,
14917
16070
  ) => React.CSSProperties | undefined)
16071
+ /**
16072
+ * The placement of the menu relative to its trigger.
16073
+ *
16074
+ * @default "bottom start"
16075
+ */
16076
+ placement?: | 'bottom'
16077
+ | 'bottom left'
16078
+ | 'bottom right'
16079
+ | 'bottom start'
16080
+ | 'bottom end'
16081
+ | 'top'
16082
+ | 'top left'
16083
+ | 'top right'
16084
+ | 'top start'
16085
+ | 'top end'
16086
+ | 'left'
16087
+ | 'left top'
16088
+ | 'left bottom'
16089
+ | 'start'
16090
+ | 'start top'
16091
+ | 'start bottom'
16092
+ | 'right'
16093
+ | 'right top'
16094
+ | 'right bottom'
16095
+ | 'end'
16096
+ | 'end top'
16097
+ | 'end bottom'
14918
16098
  /**
14919
16099
  * How the menu is opened from its trigger. With \`"longPress"\`, a long press
14920
16100
  * or \`Alt\` + \`ArrowDown\` / \`ArrowUp\` / \`Enter\` / \`Space\` opens the menu.
@@ -14922,10 +16102,6 @@ optionStyle?: | React.CSSProperties
14922
16102
  * @default "press"
14923
16103
  */
14924
16104
  trigger?: "press" | "longPress"
14925
- /**
14926
- * The \`className\` property assigned to the root element of the component.
14927
- */
14928
- className?: string
14929
16105
  /**
14930
16106
  * The \`className\` property assigned to the content element of the component.
14931
16107
  */
@@ -14984,7 +16160,6 @@ defaultSelectedKeys?: | "all"
14984
16160
  * assignable.
14985
16161
  */
14986
16162
  onSelectionChange?: (keys: Selection, meta?: { sectionId: string }) => void
14987
- placement?: any
14988
16163
  }`,stories:{usage:[{id:"core-collections-menu--basic",name:"Basic",snippet:'const Basic = () => <Menu triggerLabel="Menu Trigger" items={items} />;'},{id:"core-collections-menu--with-sections",name:"With Sections",snippet:'const WithSections = () => <Menu triggerLabel="Menu Trigger" items={itemsWithSections} />;'},{id:"core-collections-menu--controlled-open",name:"Controlled Open",snippet:'const ControlledOpen = () => <Menu triggerLabel="Menu Trigger" items={items} isOpen />;'},{id:"core-collections-menu--disabled",name:"Disabled",snippet:'const Disabled = () => <Menu triggerLabel="Menu Trigger" items={items} isDisabled />;'},{id:"core-collections-menu--with-disabled-keys",name:"With Disabled Keys",snippet:'const WithDisabledKeys = () => <Menu triggerLabel="Menu Trigger" items={items} disabledKeys={["paste"]} />;'},{id:"core-collections-menu--single-selection",name:"Single Selection",snippet:`const SingleSelection = () => {
14989
16164
  const [selectedKey, setSelectedKey] = React.useState(
14990
16165
  new Set<string | number>(["light"]),
@@ -15501,9 +16676,10 @@ onOpenChange?: (isOpen: boolean) => void
15501
16676
  children: React.ReactNode
15502
16677
  }`,stories:{usage:[{id:"core-overlays-modal--basic",name:"Basic",snippet:"const Basic = (args) => <DialogExample modalProps={args} />;"},{id:"core-overlays-modal--default-open",name:"Default Open",snippet:"const DefaultOpen = (args) => <DialogExample modalProps={args} />;"},{id:"core-overlays-modal--controlled",name:"Controlled",snippet:"const Controlled = (args) => <DialogExample modalProps={args} />;"}],implementation:`import { IFrame, ShadowRoot } from "@baseline-ui/test-utils/client";
15503
16678
  import { sprinkles } from "@baseline-ui/tokens";
15504
- import { getOwnerDocument } from "@react-aria/utils";
15505
- import React, { useEffect, useRef, useState } from "react";
16679
+ import { getOwnerDocument, isShadowRoot } from "@react-aria/utils";
16680
+ import React, { useCallback, useEffect, useRef, useState } from "react";
15506
16681
  import { VisuallyHidden, useId } from "react-aria";
16682
+ import { createPortal } from "react-dom";
15507
16683
 
15508
16684
  import { ActionButton } from "../../ActionButton";
15509
16685
  import { Box } from "../../Box";
@@ -15969,7 +17145,101 @@ export const ModalLateBodyContainerExample: React.FC<
15969
17145
  )}
15970
17146
  </Box>
15971
17147
  );
15972
- };`},similarTo:[],figmaUrl:null},NumberFormat:{id:"core-utilities-numberformat",breadcrumb:"Core/Utilities/NumberFormat",importStatement:'import { NumberFormat } from "@baseline-ui/core";',description:"`NumberFormat` provides localized number formatting for the current locale. It automatically updates when the locale changes, and handles caching of the number formatter for performance.\nIt is a wrapper around the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) API.",documentation:`\`NumberFormat\` provides localized number formatting for the current locale. It automatically updates when the locale changes, and handles caching of the number formatter for performance.
17148
+ };
17149
+
17150
+ const NestedShadowButton: React.FC<{ testId: string }> = ({ testId }) => {
17151
+ const [hostRoot, setHostRoot] = useState<Element["shadowRoot"]>(null);
17152
+ const hostRef = useCallback((host: HTMLDivElement | null) => {
17153
+ if (host)
17154
+ setHostRoot(host.shadowRoot ?? host.attachShadow({ mode: "open" }));
17155
+ }, []);
17156
+
17157
+ return (
17158
+ // Stacked above the underlay so the click reaches the nested shadow root.
17159
+ <div ref={hostRef} style={{ position: "relative", zIndex: 2000 }}>
17160
+ {hostRoot
17161
+ ? createPortal(<button data-testid={testId}>Nested</button>, hostRoot)
17162
+ : null}
17163
+ </div>
17164
+ );
17165
+ };
17166
+
17167
+ const ContainedModalContent: React.FC = () => {
17168
+ const [container, setContainer] = useState<HTMLElement | null>(null);
17169
+ const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(
17170
+ null,
17171
+ );
17172
+ const [isOpen, setIsOpen] = useState(true);
17173
+ const [outsideClicks, setOutsideClicks] = useState(0);
17174
+
17175
+ // A light-DOM child of the outer host, rendered by the <slot> in the container.
17176
+ useEffect(() => {
17177
+ const root = container?.getRootNode();
17178
+ if (!root || !isShadowRoot(root)) return;
17179
+ const host = root.host;
17180
+ const button = host.ownerDocument.createElement("button");
17181
+ button.slot = "slotted";
17182
+ button.dataset.testid = "slotted-button";
17183
+ button.textContent = "Slotted";
17184
+ host.append(button);
17185
+ return () => {
17186
+ button.remove();
17187
+ };
17188
+ }, [container]);
17189
+
17190
+ return (
17191
+ <>
17192
+ <button
17193
+ data-testid="outside-button"
17194
+ onClick={() => {
17195
+ setOutsideClicks((count) => count + 1);
17196
+ }}
17197
+ >
17198
+ Outside
17199
+ </button>
17200
+ <span data-testid="outside-clicks">{outsideClicks}</span>
17201
+ <span data-testid="modal-state">{isOpen ? "open" : "closed"}</span>
17202
+ <div ref={setPortalContainer}>
17203
+ <NestedShadowButton testId="portal-nested-shadow-button" />
17204
+ </div>
17205
+ <FrameProvider
17206
+ container={container}
17207
+ portalContainer={portalContainer}
17208
+ shouldContainOverlays="always"
17209
+ >
17210
+ <Box
17211
+ ref={setContainer}
17212
+ data-testid="container"
17213
+ style={{ width: 400, height: 200 }}
17214
+ display="flex"
17215
+ flexDirection="column"
17216
+ alignItems="center"
17217
+ justifyContent="flex-end"
17218
+ >
17219
+ <NestedShadowButton testId="nested-shadow-button" />
17220
+ <div style={{ position: "relative", zIndex: 2000 }}>
17221
+ <slot name="slotted" />
17222
+ </div>
17223
+ <Modal defaultOpen={true} onOpenChange={setIsOpen}>
17224
+ <ModalContent>
17225
+ <Dialog aria-label="Contained modal">
17226
+ <Box padding="xl">
17227
+ <Text>Contained in a shadow root</Text>
17228
+ </Box>
17229
+ </Dialog>
17230
+ </ModalContent>
17231
+ </Modal>
17232
+ </Box>
17233
+ </FrameProvider>
17234
+ </>
17235
+ );
17236
+ };
17237
+
17238
+ export const ContainedModalInShadowRootExample: React.FC = () => (
17239
+ <ShadowRoot style={{ position: "relative", width: 700, height: 450 }}>
17240
+ <ContainedModalContent />
17241
+ </ShadowRoot>
17242
+ );`},similarTo:[],figmaUrl:null},NumberFormat:{id:"core-utilities-numberformat",breadcrumb:"Core/Utilities/NumberFormat",importStatement:'import { NumberFormat } from "@baseline-ui/core";',description:"`NumberFormat` provides localized number formatting for the current locale. It automatically updates when the locale changes, and handles caching of the number formatter for performance.\nIt is a wrapper around the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) API.",documentation:`\`NumberFormat\` provides localized number formatting for the current locale. It automatically updates when the locale changes, and handles caching of the number formatter for performance.
15973
17243
  It is a wrapper around the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) API.
15974
17244
 
15975
17245
  \`\`\`jsx
@@ -19615,7 +20885,23 @@ className?: string
19615
20885
  * The style applied to the root element of the component.
19616
20886
  */
19617
20887
  style?: React.CSSProperties
19618
- }`,stories:{usage:[{id:"core-utilities-portal--basic",name:"Basic",snippet:"const Basic = () => <Portal>I am in a portal</Portal>;"}],implementation:""},similarTo:[],figmaUrl:null},Preview:{id:"core-content-preview",breadcrumb:"Core/Content/Preview",importStatement:'import { InkSvg, Preview, VariantViewer } from "@baseline-ui/core";',description:"`Preview` renders a thumbnail of an image, SVG, or text snippet with optional action buttons overlaid on it. Use it to surface a visual sample of an asset that the user can inspect or act on without opening the full item.",documentation:'`Preview` renders a thumbnail of an image, SVG, or text snippet with optional action buttons overlaid on it. Use it to surface a visual sample of an asset that the user can inspect or act on without opening the full item.\n\n* Supports SVG, images and text\n* Supports custom action buttons to interact with the preview\n* Exposed to assistive technologies using ARIA attributes\n* Supports keyboard, mouse and touch interactions\n\n```jsx\nimport { Preview } from "@baseline-ui/core";\n\n<Preview imageSrc="/portrait.png" />;\n```\n\n`svgSrc` accepts a React element or an SVG string. A string is sanitized before it is rendered: scripts, event handlers and `javascript:` URLs are removed, along with elements such as `use`, `animate`, `set` and `foreignObject`. Sprite icons that reference a symbol with `<use href="#id">` therefore render blank; pass a React element to render them. A string SVG is rendered after the component mounts, so server-rendered HTML contains an empty preview that fills in on the client.\n\nThe `Preview` component has two variants. The two variants only differ in styling. It can be controlled using the `isInline` prop.\n\nThe `Preview` component can be disabled. When disabled, the preview is not interactive and the action buttons are not rendered.\n\n| Selector | Description |\n| -------------------- | ----------------------------------------------------------------- |\n| \\[data-disabled] | Whether the component is disabled. |\n| \\[data-focused] | Whether the component is focused, either via a mouse or keyboard. |\n| \\[data-hovered] | Whether the component is currently hovered with a mouse. |\n| \\[data-focus-visible] | Whether the component is keyboard focused. |\n\n| Key | Function |\n| ------------ | -------------------------------- |\n| `Tab` | Focus the preview |\n| `ArrowLeft` | Focus the previous action button |\n| `ArrowRight` | Focus the next action button |',props:`interface PreviewProps {
20888
+ }`,stories:{usage:[{id:"core-utilities-portal--basic",name:"Basic",snippet:"const Basic = () => <Portal>I am in a portal</Portal>;"}],implementation:`import React from "react";
20889
+
20890
+ import { ThemeProvider } from "../../ThemeProvider/ThemeProvider";
20891
+ import { minTouchTargetSizeVar } from "../../ThemeProvider/ThemeProvider.css";
20892
+ import { Portal } from "../Portal";
20893
+
20894
+ // "never", not "always": the CT config emulates prefers-reduced-motion, so the "user" default already resolves to true.
20895
+ export const PortalInsideThemeProviderExample = () => (
20896
+ <ThemeProvider theme="dark" reducedMotion="never" minTouchTargetSize={44}>
20897
+ <Portal>
20898
+ <div
20899
+ data-testid="touch-target"
20900
+ style={{ width: minTouchTargetSizeVar }}
20901
+ />
20902
+ </Portal>
20903
+ </ThemeProvider>
20904
+ );`},similarTo:[],figmaUrl:null},Preview:{id:"core-content-preview",breadcrumb:"Core/Content/Preview",importStatement:'import { InkSvg, Preview, VariantViewer } from "@baseline-ui/core";',description:"`Preview` renders a thumbnail of an image, SVG, or text snippet with optional action buttons overlaid on it. Use it to surface a visual sample of an asset that the user can inspect or act on without opening the full item.",documentation:'`Preview` renders a thumbnail of an image, SVG, or text snippet with optional action buttons overlaid on it. Use it to surface a visual sample of an asset that the user can inspect or act on without opening the full item.\n\n* Supports SVG, images and text\n* Supports custom action buttons to interact with the preview\n* Exposed to assistive technologies using ARIA attributes\n* Supports keyboard, mouse and touch interactions\n\n```jsx\nimport { Preview } from "@baseline-ui/core";\n\n<Preview imageSrc="/portrait.png" />;\n```\n\n`svgSrc` accepts a React element or an SVG string. A string is sanitized before it is rendered: scripts, event handlers and `javascript:` URLs are removed, along with elements such as `use`, `animate`, `set` and `foreignObject`. Sprite icons that reference a symbol with `<use href="#id">` therefore render blank; pass a React element to render them. A string SVG is rendered after the component mounts, so server-rendered HTML contains an empty preview that fills in on the client.\n\nThe `Preview` component has two variants. The two variants only differ in styling. It can be controlled using the `isInline` prop.\n\nThe `Preview` component can be disabled. When disabled, the preview is not interactive and the action buttons are not rendered.\n\n| Selector | Description |\n| -------------------- | ----------------------------------------------------------------- |\n| \\[data-disabled] | Whether the component is disabled. |\n| \\[data-focused] | Whether the component is focused, either via a mouse or keyboard. |\n| \\[data-hovered] | Whether the component is currently hovered with a mouse. |\n| \\[data-focus-visible] | Whether the component is keyboard focused. |\n\n| Key | Function |\n| ------------ | -------------------------------- |\n| `Tab` | Focus the preview |\n| `ArrowLeft` | Focus the previous action button |\n| `ArrowRight` | Focus the next action button |',props:`interface PreviewProps {
19619
20905
  /**
19620
20906
  * @deprecated Do not use in new components. This is a legacy block
19621
20907
  * identifier; new components should exclude it via
@@ -19714,7 +21000,7 @@ addAriaLabel?: string
19714
21000
  * - "positive": Represents a positive accent color that doesn't change with
19715
21001
  * theme.
19716
21002
  *
19717
- * @default "theme"
21003
+ * @default "positive"
19718
21004
  */
19719
21005
  accent?: "theme" | "positive"
19720
21006
  }`,stories:{usage:[{id:"core-content-preview--svg-preview",name:"SVG Preview",snippet:`const SVGPreview = () => <Preview
@@ -20311,11 +21597,19 @@ const colorRenderItem: RadioGroupProps["renderOption"] = (
20311
21597
  );
20312
21598
  };
20313
21599
 
20314
- export const CustomRenderItem: React.FC<Omit<RadioGroupProps, "items">> = (
20315
- props,
20316
- ) => {
21600
+ export const CustomRenderItem: React.FC<
21601
+ Omit<RadioGroupProps, "items"> & { withDescriptions?: boolean }
21602
+ > = ({ withDescriptions, ...props }) => {
20317
21603
  return (
20318
- <RadioGroup items={colorItems} renderOption={colorRenderItem} {...props} />
21604
+ <RadioGroup
21605
+ items={
21606
+ withDescriptions
21607
+ ? colorItems.map((item) => ({ ...item, description: item.id }))
21608
+ : colorItems
21609
+ }
21610
+ renderOption={colorRenderItem}
21611
+ {...props}
21612
+ />
20319
21613
  );
20320
21614
  };
20321
21615
 
@@ -21277,6 +22571,33 @@ className?: string
21277
22571
  * The style applied to the root element of the component.
21278
22572
  */
21279
22573
  style?: React.CSSProperties
22574
+ /**
22575
+ * The placement of the popover relative to the trigger.
22576
+ *
22577
+ * @default "bottom start"
22578
+ */
22579
+ placement?: | 'bottom'
22580
+ | 'bottom left'
22581
+ | 'bottom right'
22582
+ | 'bottom start'
22583
+ | 'bottom end'
22584
+ | 'top'
22585
+ | 'top left'
22586
+ | 'top right'
22587
+ | 'top start'
22588
+ | 'top end'
22589
+ | 'left'
22590
+ | 'left top'
22591
+ | 'left bottom'
22592
+ | 'start'
22593
+ | 'start top'
22594
+ | 'start bottom'
22595
+ | 'right'
22596
+ | 'right top'
22597
+ | 'right bottom'
22598
+ | 'end'
22599
+ | 'end top'
22600
+ | 'end bottom'
21280
22601
  /**
21281
22602
  * The position of the label.
21282
22603
  *
@@ -21743,8 +23064,12 @@ import { Autocomplete, Virtualizer } from "react-aria-components";
21743
23064
  import { useListData } from "react-stately";
21744
23065
 
21745
23066
  import { ActionButton } from "../../ActionButton";
23067
+ import { Box } from "../../Box/Box";
21746
23068
  import { items } from "../../ListBox/__tests__/testComponents";
21747
- import { virtualizeAutocompleteItems } from "../../Menu/__tests__/data";
23069
+ import {
23070
+ longListItems,
23071
+ virtualizeAutocompleteItems,
23072
+ } from "../../Menu/__tests__/data";
21748
23073
  import { itemsWithSectionTitles } from "../../UNSAFE_ListBox/__tests__/testComponents";
21749
23074
  import {
21750
23075
  ListLayout,
@@ -21775,6 +23100,21 @@ export const SelectExample: React.FC<
21775
23100
  );
21776
23101
  };
21777
23102
 
23103
+ export const SelectNearViewportBottomExample: React.FC<
23104
+ Omit<React.ComponentProps<typeof Select>, "items">
23105
+ > = (args) => {
23106
+ return (
23107
+ <Box style={{ height: 3000, paddingTop: "calc(100vh - 120px)" }}>
23108
+ <Select
23109
+ aria-label="Choose an item"
23110
+ placeholder="Choose an item"
23111
+ {...args}
23112
+ items={longListItems}
23113
+ />
23114
+ </Box>
23115
+ );
23116
+ };
23117
+
21778
23118
  // "Apples" is a substring of "Pineapples" \u2014 exercises exact string matching
21779
23119
  // in the tester's option() locator.
21780
23120
  const substringItems = [
@@ -23005,7 +24345,13 @@ completedLabel?: string
23005
24345
  ]}
23006
24346
  aria-label="Checkout"
23007
24347
  defaultSelectedStep="a"
23008
- defaultLastCompletedStep={undefined} />;`},{id:"core-navigation-stepper--indicator-only",name:"Indicator Only",snippet:`const IndicatorOnly = () => <Stepper
24348
+ defaultLastCompletedStep={undefined} />;`},{id:"core-navigation-stepper--with-disabled-completed-step",name:"With Disabled Completed Step",snippet:`const WithDisabledCompletedStep = () => <Stepper
24349
+ items={items.map((i) =>
24350
+ i.key === "cart" ? { ...i, isDisabled: true } : i,
24351
+ )}
24352
+ aria-label="Checkout"
24353
+ defaultSelectedStep="shipping"
24354
+ defaultLastCompletedStep="cart" />;`},{id:"core-navigation-stepper--indicator-only",name:"Indicator Only",snippet:`const IndicatorOnly = () => <Stepper
23009
24355
  items={items.map((i) => ({ key: i.key }))}
23010
24356
  aria-label="Checkout"
23011
24357
  defaultSelectedStep="shipping"
@@ -23403,6 +24749,14 @@ import { Switch, Separator } from "@baseline-ui/core";
23403
24749
 
23404
24750
  The status labels can improve the accessibility of the Switch. However, they are not required. If you don't pass the \`statusLabel\` prop, the Switch will use the \`label\` prop to convey the meaning of the different states.
23405
24751
 
24752
+ Pass the \`description\` prop to show helper text below the label. It is announced by screen readers as the description of the Switch and is not part of its name.
24753
+
24754
+ \`\`\`jsx
24755
+ import { Switch } from "@baseline-ui/core";
24756
+
24757
+ <Switch label="Label" labelPosition="left" description="Helper text" />;
24758
+ \`\`\`
24759
+
23406
24760
  | Selector | Description |
23407
24761
  | -------------------- | ----------------------------------------------------------------- |
23408
24762
  | \\[data-disabled] | Whether the component is disabled. |
@@ -23453,6 +24807,10 @@ style?: React.CSSProperties
23453
24807
  * The label to display next to the switch.
23454
24808
  */
23455
24809
  label?: React.ReactNode
24810
+ /**
24811
+ * Helper text shown below the label and announced as its accessible description.
24812
+ */
24813
+ description?: string
23456
24814
  /**
23457
24815
  * The position of the label.
23458
24816
  */
@@ -23475,7 +24833,54 @@ statusLabel?: {
23475
24833
  on: "On",
23476
24834
  off: "Off",
23477
24835
  }}
23478
- labelPosition="left" />;`}],implementation:""},similarTo:[],figmaUrl:null},Table:{id:"core-collections-table",breadcrumb:"Core/Collections/Table",importStatement:`import {
24836
+ labelPosition="left" />;`},{id:"core-forms-switch--with-label-in-left-and-status-disabled",name:"With Label In Left And Status Disabled",snippet:`const WithLabelInLeftAndStatusDisabled = () => <Switch
24837
+ label="Label"
24838
+ statusLabel={{
24839
+ on: "On",
24840
+ off: "Off",
24841
+ }}
24842
+ labelPosition="left"
24843
+ isDisabled />;`},{id:"core-forms-switch--with-description",name:"With Description",snippet:'const WithDescription = () => <Switch label="Label" description="Helper text" labelPosition="left" />;'},{id:"core-forms-switch--with-description-in-left-and-status",name:"With Description In Left And Status",snippet:`const WithDescriptionInLeftAndStatus = () => <Switch
24844
+ label="Label"
24845
+ description="Helper text"
24846
+ statusLabel={{
24847
+ on: "On",
24848
+ off: "Off",
24849
+ }}
24850
+ labelPosition="left" />;`},{id:"core-forms-switch--with-description-in-left-long-label",name:"With Description In Left Long Label",snippet:`const WithDescriptionInLeftLongLabel = () => <Switch
24851
+ label="A long label that wraps beside the switch"
24852
+ description="A long description that wraps below the label"
24853
+ labelPosition="left" />;`},{id:"core-forms-switch--with-description-on-top",name:"With Description On Top",snippet:`const WithDescriptionOnTop = () => <Switch
24854
+ label="Label"
24855
+ description="Helper text"
24856
+ statusLabel={{
24857
+ on: "On",
24858
+ off: "Off",
24859
+ }} />;`},{id:"core-forms-switch--with-description-disabled",name:"With Description Disabled",snippet:'const WithDescriptionDisabled = () => <Switch label="Label" description="Helper text" isDisabled labelPosition="left" />;'}],implementation:`import React from "react";
24860
+
24861
+ import { Switch } from "../Switch";
24862
+
24863
+ export const SwitchWithExternalDescriptionExample: React.FC = () => (
24864
+ <>
24865
+ <p id="external-help">Extra help</p>
24866
+ <Switch
24867
+ label="Wi-Fi"
24868
+ description="Connect automatically"
24869
+ aria-describedby="external-help"
24870
+ />
24871
+ </>
24872
+ );
24873
+
24874
+ export const SwitchWithExternalLabelExample: React.FC = () => (
24875
+ <>
24876
+ <p id="external-label">Notifications</p>
24877
+ <Switch
24878
+ label="Wi-Fi"
24879
+ description="Connect automatically"
24880
+ aria-labelledby="external-label"
24881
+ />
24882
+ </>
24883
+ );`},similarTo:[],figmaUrl:null},Table:{id:"core-collections-table",breadcrumb:"Core/Collections/Table",importStatement:`import {
23479
24884
  ActionButton,
23480
24885
  ActionIconButton,
23481
24886
  AsyncLoadingTableExample,
@@ -25613,7 +27018,11 @@ tabHeaderStyle?: React.CSSProperties
25613
27018
  }`,stories:{usage:[{id:"core-navigation-tabs--basic",name:"Basic",snippet:"const Basic = () => <BasicExample onRemove={undefined}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--controlled",name:"Controlled",snippet:'const Controlled = () => <BasicExample selectedValue="item-2" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--ghost",name:"Ghost",snippet:'const Ghost = () => <BasicExample variant="ghost" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-close-button",name:"With Close Button",snippet:`const WithCloseButton = () => <BasicExample
25614
27019
  onRemove={() => {
25615
27020
  alert("Delete");
25616
- }}>{undefined}</BasicExample>;`},{id:"core-navigation-tabs--with-default-selected",name:"With Default Selected",snippet:'const WithDefaultSelected = () => <BasicExample defaultSelectedValue="item-2" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-disabled",name:"With Disabled",snippet:"const WithDisabled = () => <BasicExample isDisabled onRemove={undefined}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-specific-disabled",name:"With Specific Disabled",snippet:'const WithSpecificDisabled = () => <BasicExample disabledValues={new Set(["item-2"])} onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-focusable-content",name:"With Focusable Content",snippet:"const WithFocusableContent = () => <BasicExample onRemove={undefined} includeFocusableContent={true}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-action-button",name:"With Action Button",snippet:"const WithActionButton = () => <AddButtonExample onRemove={undefined}>{undefined}</AddButtonExample>;"}],implementation:`import { PlusIcon } from "@baseline-ui/icons/16";
27021
+ }}>{undefined}</BasicExample>;`},{id:"core-navigation-tabs--with-default-selected",name:"With Default Selected",snippet:'const WithDefaultSelected = () => <BasicExample defaultSelectedValue="item-2" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-disabled",name:"With Disabled",snippet:"const WithDisabled = () => <BasicExample isDisabled onRemove={undefined}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-disabled-and-close-button",name:"With Disabled And Close Button",snippet:`const WithDisabledAndCloseButton = () => <BasicExample
27022
+ isDisabled
27023
+ onRemove={() => {
27024
+ alert("Delete");
27025
+ }}>{undefined}</BasicExample>;`},{id:"core-navigation-tabs--with-specific-disabled",name:"With Specific Disabled",snippet:'const WithSpecificDisabled = () => <BasicExample disabledValues={new Set(["item-2"])} onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-focusable-content",name:"With Focusable Content",snippet:"const WithFocusableContent = () => <BasicExample onRemove={undefined} includeFocusableContent={true}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-action-button",name:"With Action Button",snippet:"const WithActionButton = () => <AddButtonExample />;"}],implementation:`import { PlusIcon } from "@baseline-ui/icons/16";
25617
27026
  import { themeVars } from "@baseline-ui/tokens";
25618
27027
  import React from "react";
25619
27028
 
@@ -25709,7 +27118,11 @@ export const TabItemExample: React.FC<
25709
27118
  );
25710
27119
  };
25711
27120
 
25712
- export const AddButtonExample = () => {
27121
+ export const AddButtonExample: React.FC<{
27122
+ disabledValues?: string[];
27123
+ isDisabled?: boolean;
27124
+ titleStyle?: React.CSSProperties;
27125
+ }> = ({ disabledValues, isDisabled, titleStyle }) => {
25713
27126
  const [items, setItems] = React.useState([1, 2, 3]);
25714
27127
 
25715
27128
  return (
@@ -25731,11 +27144,14 @@ export const AddButtonExample = () => {
25731
27144
  icon: PlusIcon,
25732
27145
  },
25733
27146
  ]}
27147
+ disabledValues={disabledValues ? new Set(disabledValues) : undefined}
27148
+ isDisabled={isDisabled}
25734
27149
  >
25735
27150
  {items.map((item) => (
25736
27151
  <TabItem
25737
27152
  style={contentStyle}
25738
27153
  title={\`Item \${item}\`}
27154
+ titleStyle={titleStyle}
25739
27155
  value={\`item-\${item}\`}
25740
27156
  key={\`item-\${item}\`}
25741
27157
  >
@@ -25744,7 +27160,7 @@ export const AddButtonExample = () => {
25744
27160
  ))}
25745
27161
  </Tabs>
25746
27162
  );
25747
- };`},similarTo:[],figmaUrl:null},Tag:{id:"core-content-tag",breadcrumb:"Core/Content/Tag",importStatement:'import { Tag } from "@baseline-ui/core";',description:"`Tag` is a compact, color-coded label that can be selected, removed, or paired with an icon. Use it to mark items with a category, attribute, or filter value, either on its own or within a `TagGroup`.",documentation:'`Tag` is a compact, color-coded label that can be selected, removed, or paired with an icon. Use it to mark items with a category, attribute, or filter value, either on its own or within a `TagGroup`.\n\n* Five visual variants: `neutral`, `red`, `green`, `blue`, and `high-contrast`\n* Two sizes: `md` (default) and `sm`\n* Optional leading icon (replaced by a checkmark when selected)\n* Optional remove button via `onRemove`\n* Selected and disabled states\n* Focus ring support\n* Works standalone or inside a `TagGroup` for collection behavior\n\n```jsx\nimport { Tag } from "@baseline-ui/core";\n\n<Tag>Label</Tag>;\n```\n\nFor collection behavior with keyboard navigation and selection, use `Tag` inside a `TagGroup`. See the <a href="?path=/docs/core-content-taggroup--docs">TagGroup documentation</a> for details.\n\n`Tag` supports five visual variants: `neutral`, `red`, `green`, `blue`, and\n`high-contrast`.\n\n```jsx\n<Tag>Neutral</Tag>\n<Tag variant="red">Red</Tag>\n<Tag variant="green">Green</Tag>\n<Tag variant="blue">Blue</Tag>\n<Tag variant="high-contrast">High Contrast</Tag>\n```\n\nPass an `icon` prop to display a leading icon. Use `@baseline-ui/icons/16` for `md` size and `@baseline-ui/icons/12` for `sm` size. When the tag is selected, the custom icon is replaced by a checkmark.\n\n```jsx\nimport { EllipseIcon } from "@baseline-ui/icons/16";\n\n<Tag icon={EllipseIcon}>With Icon</Tag>;\n```\n\nPass `onRemove` to render a remove button. When the tag is disabled, the remove button is present but non-interactive.\n\n```jsx\n<Tag onRemove={() => console.log("removed")}>Removable</Tag>\n```\n\nWhen selected, the tag displays a checkmark icon and uses the interactive color scheme. If a custom `icon` is provided, the checkmark replaces it.\n\n```jsx\n<Tag isSelected>Selected</Tag>\n```\n\n```jsx\n<Tag isDisabled>Disabled</Tag>\n```\n\n```jsx\n<Tag size="sm">Small</Tag>\n```\n\n| Selector | Description |\n| ---------------------- | -------------------------------------------- |\n| `.BaselineUI-Tag` | The root tag element. |\n| `.BaselineUI-Tag-Icon` | The icon element (custom icon or checkmark). |\n\nWhen the tag has a remove button:\n\n| Key | Function |\n| ------- | --------------------------------- |\n| `Tab` | Moves focus to the remove button. |\n| `Enter` | Activates the remove button. |\n| `Space` | Activates the remove button. |\n\n* <a href="?path=/docs/core-content-taggroup--docs">TagGroup</a> \u2014 Use for\n collections of tags with keyboard navigation, selection, and removal.\n* <a href="?path=/docs/core-content-badge--docs">Badge</a> \u2014 Use for numeric or\n status indicators that don\'t need interaction.',props:`interface TagProps {
27163
+ };`},similarTo:[],figmaUrl:null},Tag:{id:"core-content-tag",breadcrumb:"Core/Content/Tag",importStatement:'import { Tag } from "@baseline-ui/core";',description:"`Tag` is a compact, color-coded label that can be selected, removed, or paired with an icon. Use it to mark items with a category, attribute, or filter value, either on its own or within a `TagGroup`.",documentation:'`Tag` is a compact, color-coded label that can be selected, removed, or paired with an icon. Use it to mark items with a category, attribute, or filter value, either on its own or within a `TagGroup`.\n\n* Five visual variants: `neutral`, `red`, `green`, `blue`, and `high-contrast`\n* Two sizes: `md` (default) and `sm`\n* Optional leading icon (replaced by a checkmark when selected)\n* Optional remove button via `onRemove`\n* Selected and disabled states\n* Focus ring support\n* Works standalone or inside a `TagGroup` for collection behavior\n\n```jsx\nimport { Tag } from "@baseline-ui/core";\n\n<Tag>Label</Tag>;\n```\n\nFor collection behavior with keyboard navigation and selection, use `Tag` inside a `TagGroup`. See the <a href="?path=/docs/core-content-taggroup--docs">TagGroup documentation</a> for details.\n\n`Tag` supports five visual variants: `neutral`, `red`, `green`, `blue`, and\n`high-contrast`.\n\n```jsx\n<Tag>Neutral</Tag>\n<Tag variant="red">Red</Tag>\n<Tag variant="green">Green</Tag>\n<Tag variant="blue">Blue</Tag>\n<Tag variant="high-contrast">High Contrast</Tag>\n```\n\nPass an `icon` prop to display a leading icon. Use `@baseline-ui/icons/16` for `md` size and `@baseline-ui/icons/12` for `sm` size. When the tag is selected, the custom icon is replaced by a checkmark.\n\n```jsx\nimport { EllipseIcon } from "@baseline-ui/icons/16";\n\n<Tag icon={EllipseIcon}>With Icon</Tag>;\n```\n\nPass `onRemove` to render a remove button. When the tag is disabled, the remove button is present but non-interactive.\n\n```jsx\n<Tag onRemove={() => console.log("removed")}>Removable</Tag>\n```\n\nWhen selected, the tag displays a checkmark icon and uses the interactive color scheme. If a custom `icon` is provided, the checkmark replaces it.\n\n```jsx\n<Tag isSelected>Selected</Tag>\n```\n\n```jsx\n<Tag isDisabled>Disabled</Tag>\n```\n\n```jsx\n<Tag size="sm">Small</Tag>\n```\n\nSet `elementType="span"` to render the tag as a `span` so it can sit inside a button or other inline content, where a `div` is not valid HTML. The tag still lays out as a block, so make its container a flex row to keep it on the same line as the text.\n\n```jsx\n<button\n type="button"\n style={{ display: "inline-flex", alignItems: "center", gap: 8 }}\n>\n Report.pdf <Tag elementType="span">Draft</Tag>\n</button>\n```\n\n| Selector | Description |\n| ---------------------- | -------------------------------------------- |\n| `.BaselineUI-Tag` | The root tag element. |\n| `.BaselineUI-Tag-Icon` | The icon element (custom icon or checkmark). |\n\nWhen the tag has a remove button:\n\n| Key | Function |\n| ------- | --------------------------------- |\n| `Tab` | Moves focus to the remove button. |\n| `Enter` | Activates the remove button. |\n| `Space` | Activates the remove button. |\n\n* <a href="?path=/docs/core-content-taggroup--docs">TagGroup</a> \u2014 Use for\n collections of tags with keyboard navigation, selection, and removal.\n* <a href="?path=/docs/core-content-badge--docs">Badge</a> \u2014 Use for numeric or\n status indicators that don\'t need interaction.',props:`interface TagProps {
25748
27164
  /**
25749
27165
  * @deprecated Do not use in new components. This is a legacy block
25750
27166
  * identifier; new components should exclude it via
@@ -25794,6 +27210,14 @@ variant?: "neutral" | "red" | "green" | "blue" | "high-contrast"
25794
27210
  * @default "md"
25795
27211
  */
25796
27212
  size?: "sm" | "md"
27213
+ /**
27214
+ * The element the tag renders as. Use \`span\` to place a tag without
27215
+ * \`onRemove\` inside a button or other inline content, where a \`div\` is not
27216
+ * valid HTML. Has no effect inside a \`TagGroup\`.
27217
+ *
27218
+ * @default "div"
27219
+ */
27220
+ elementType?: "div" | "span"
25797
27221
  /**
25798
27222
  * An optional icon to display before the tag content.
25799
27223
  */
@@ -25822,7 +27246,10 @@ onRemove?: () => void
25822
27246
  * Message id: \`bui.tag.remove\`. Defaults to \`"Remove"\`.
25823
27247
  */
25824
27248
  removeLabel?: string
25825
- }`,stories:{usage:[{id:"core-content-tag--basic",name:"Basic",snippet:"const Basic = () => <Tag>Tag</Tag>;"},{id:"core-content-tag--with-icon",name:"With Icon",snippet:"const WithIcon = () => <Tag icon={EllipseIcon}>Tag</Tag>;"},{id:"core-content-tag--removable",name:"Removable",snippet:"const Removable = () => <Tag onRemove={fn()}>Tag</Tag>;"},{id:"core-content-tag--selected",name:"Selected",snippet:"const Selected = () => <Tag isSelected>Tag</Tag>;"},{id:"core-content-tag--selected-with-icon",name:"Selected With Icon",snippet:"const SelectedWithIcon = () => <Tag isSelected icon={EllipseIcon}>Tag</Tag>;"},{id:"core-content-tag--disabled",name:"Disabled",snippet:"const Disabled = () => <Tag isDisabled>Tag</Tag>;"},{id:"core-content-tag--disabled-removable",name:"Disabled Removable",snippet:"const DisabledRemovable = () => <Tag isDisabled onRemove={fn()}>Tag</Tag>;"},{id:"core-content-tag--small",name:"Small",snippet:'const Small = () => <Tag size="sm">Tag</Tag>;'},{id:"core-content-tag--small-with-icon",name:"Small With Icon",snippet:'const SmallWithIcon = () => <Tag size="sm" icon={EllipseIcon12}>Tag</Tag>;'},{id:"core-content-tag--long-text",name:"Long Text",snippet:"const LongText = () => <Tag>This is a very long tag label that might overflow or cause layout issues</Tag>;"}],implementation:`import { EllipseIcon } from "@baseline-ui/icons/16";
27249
+ }`,stories:{usage:[{id:"core-content-tag--basic",name:"Basic",snippet:"const Basic = () => <Tag>Tag</Tag>;"},{id:"core-content-tag--with-icon",name:"With Icon",snippet:"const WithIcon = () => <Tag icon={EllipseIcon}>Tag</Tag>;"},{id:"core-content-tag--removable",name:"Removable",snippet:"const Removable = () => <Tag onRemove={fn()}>Tag</Tag>;"},{id:"core-content-tag--selected",name:"Selected",snippet:"const Selected = () => <Tag isSelected>Tag</Tag>;"},{id:"core-content-tag--selected-with-icon",name:"Selected With Icon",snippet:"const SelectedWithIcon = () => <Tag isSelected icon={EllipseIcon}>Tag</Tag>;"},{id:"core-content-tag--disabled",name:"Disabled",snippet:"const Disabled = () => <Tag isDisabled>Tag</Tag>;"},{id:"core-content-tag--disabled-removable",name:"Disabled Removable",snippet:"const DisabledRemovable = () => <Tag isDisabled onRemove={fn()}>Tag</Tag>;"},{id:"core-content-tag--small",name:"Small",snippet:'const Small = () => <Tag size="sm">Tag</Tag>;'},{id:"core-content-tag--small-with-icon",name:"Small With Icon",snippet:'const SmallWithIcon = () => <Tag size="sm" icon={EllipseIcon12}>Tag</Tag>;'},{id:"core-content-tag--inline-content",name:"Inline Content",snippet:`const InlineContent = () => <button
27250
+ type="button"
27251
+ style={{ display: "inline-flex", alignItems: "center", gap: 8 }}>Report.pdf <Tag elementType="span">Draft</Tag>
27252
+ </button>;`},{id:"core-content-tag--long-text",name:"Long Text",snippet:"const LongText = () => <Tag>This is a very long tag label that might overflow or cause layout issues</Tag>;"}],implementation:`import { EllipseIcon } from "@baseline-ui/icons/16";
25826
27253
  import React from "react";
25827
27254
 
25828
27255
  import { Tag } from "../Tag";
@@ -26156,7 +27583,34 @@ Pass \`defaultValue\` to set the starting page, or control it with \`value\` and
26156
27583
  | ----------- | ---------------------------------------------------------------- |
26157
27584
  | \`ArrowDown\` | Decrement the current page. |
26158
27585
  | \`ArrowUp\` | Increment the current page. |
26159
- | \`Enter\` | Change the current page to the value entered in the input field. |`,props:`interface TaggedPaginationProps {
27586
+ | \`Enter\` | Change the current page to the value entered in the input field. |
27587
+
27588
+ Other keys reach ancestor handlers, so Tab leaves an enclosing \`Toolbar\` and Escape closes an enclosing overlay. When the field is read-only, every key does.
27589
+
27590
+ The stepper buttons are named "Previous Page" and "Next Page" unless \`decrementAriaLabel\` and \`incrementAriaLabel\` say otherwise.
27591
+
27592
+ The following strings are used by the \`TaggedPagination\` component and can be overridden via \`I18nProvider\`:
27593
+
27594
+ | Key | Default (en) |
27595
+ | ------------------------------- | ------------- |
27596
+ | \`bui.taggedPagination.nextPage\` | Next Page |
27597
+ | \`bui.taggedPagination.prevPage\` | Previous Page |
27598
+
27599
+ \`\`\`jsx
27600
+ import { I18nProvider, TaggedPagination } from "@baseline-ui/core";
27601
+
27602
+ <I18nProvider
27603
+ locale="en"
27604
+ messages={{
27605
+ en: {
27606
+ "bui.taggedPagination.nextPage": "Forward",
27607
+ "bui.taggedPagination.prevPage": "Back",
27608
+ },
27609
+ }}
27610
+ >
27611
+ <TaggedPagination label="Page" minValue={1} maxValue={4} />
27612
+ </I18nProvider>;
27613
+ \`\`\``,props:`interface TaggedPaginationProps {
26160
27614
  /**
26161
27615
  * @deprecated Do not use in new components. This is a legacy block
26162
27616
  * identifier; new components should exclude it via
@@ -26191,13 +27645,25 @@ className?: string
26191
27645
  */
26192
27646
  style?: React.CSSProperties
26193
27647
  /**
26194
- * Whether the decrement button is disabled.
27648
+ * Whether the decrement button and ArrowDown are disabled.
26195
27649
  */
26196
27650
  isDecrementButtonDisabled?: boolean
26197
27651
  /**
26198
- * Whether the increment button is disabled.
27652
+ * Whether the increment button and ArrowUp are disabled.
26199
27653
  */
26200
27654
  isIncrementButtonDisabled?: boolean
27655
+ /**
27656
+ * The accessible name and tooltip of the decrement button.
27657
+ *
27658
+ * @default "Previous Page"
27659
+ */
27660
+ decrementAriaLabel?: string
27661
+ /**
27662
+ * The accessible name and tooltip of the increment button.
27663
+ *
27664
+ * @default "Next Page"
27665
+ */
27666
+ incrementAriaLabel?: string
26201
27667
  /**
26202
27668
  * Determines the size of the component.
26203
27669
  *
@@ -26210,12 +27676,14 @@ size?: "xs" | "sm" | "md"
26210
27676
  label?: React.ReactNode
26211
27677
  /**
26212
27678
  * The aria-label for the description.
27679
+ *
27680
+ * @deprecated Has no effect.
26213
27681
  */
26214
27682
  descriptionAriaLabel?: string
26215
27683
  /**
26216
27684
  * The type of the input field.
26217
27685
  *
26218
- * @default "number"
27686
+ * @default "text"
26219
27687
  */
26220
27688
  type?: "number" | "text"
26221
27689
  /**
@@ -26283,7 +27751,11 @@ valueToLabelMap?: Map<number, string>
26283
27751
  }}
26284
27752
  defaultProps={args}
26285
27753
  />
26286
- );`},{id:"core-forms-taggedpagination--read-only",name:"Read Only",snippet:'const ReadOnly = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isReadOnly />;'},{id:"core-forms-taggedpagination--disabled",name:"Disabled",snippet:'const Disabled = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isDisabled />;'},{id:"core-forms-taggedpagination--with-page-label",name:"With Page Label",snippet:`const WithPageLabel = () => {
27754
+ );`},{id:"core-forms-taggedpagination--read-only",name:"Read Only",snippet:'const ReadOnly = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isReadOnly />;'},{id:"core-forms-taggedpagination--disabled",name:"Disabled",snippet:'const Disabled = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isDisabled />;'},{id:"core-forms-taggedpagination--disabled-steppers",name:"Disabled Steppers",snippet:`const DisabledSteppers = () => <TaggedPaginationExample
27755
+ decrementAriaLabel="Decrement"
27756
+ incrementAriaLabel="Increment"
27757
+ isDecrementButtonDisabled
27758
+ isIncrementButtonDisabled />;`},{id:"core-forms-taggedpagination--with-page-label",name:"With Page Label",snippet:`const WithPageLabel = () => {
26287
27759
  return (
26288
27760
  <Box display="flex" flexDirection="column" gap="xl">
26289
27761
  <TaggedPaginationExample
@@ -26318,12 +27790,17 @@ valueToLabelMap?: Map<number, string>
26318
27790
  );
26319
27791
  };`}],implementation:`import React from "react";
26320
27792
 
27793
+ import { ActionButton } from "../../ActionButton";
27794
+ import { Toolbar } from "../../Toolbar";
26321
27795
  import { TaggedPagination } from "../TaggedPagination";
26322
27796
 
26323
27797
  export const TaggedPaginationExample: React.FC<
26324
- React.ComponentProps<typeof TaggedPagination>
26325
- > = (props) => {
26326
- return (
27798
+ React.ComponentProps<typeof TaggedPagination> & {
27799
+ onAncestorKeyDown?: React.KeyboardEventHandler;
27800
+ descriptionByValue?: Record<number, string>;
27801
+ }
27802
+ > = ({ onAncestorKeyDown, descriptionByValue, ...props }) => {
27803
+ const pagination = (
26327
27804
  <TaggedPagination
26328
27805
  valueToLabelMap={
26329
27806
  new Map([
@@ -26339,10 +27816,32 @@ export const TaggedPaginationExample: React.FC<
26339
27816
  incrementAriaLabel="Increment"
26340
27817
  minValue={1}
26341
27818
  maxValue={4}
27819
+ {...(descriptionByValue && {
27820
+ description: (value: number) => descriptionByValue[value] ?? "",
27821
+ })}
26342
27822
  {...props}
26343
27823
  />
26344
27824
  );
26345
- };`},similarTo:[],figmaUrl:null},Text:{id:"core-content-text",breadcrumb:"Core/Content/Text",importStatement:'import { Input, Label, Text, TextField, VariantViewer } from "@baseline-ui/core";',description:"`Text` is a typography primitive that renders strings with consistent type, size, and weight from the design system. Use it whenever you need to display textual content so that headings, body copy, values, and helper text stay visually aligned.",documentation:'`Text` is a typography primitive that renders strings with consistent type, size, and weight from the design system. Use it whenever you need to display textual content so that headings, body copy, values, and helper text stay visually aligned.\n\n* Consistent type, size, and weight pulled from the design system\n* Renders as any HTML element via the `elementType` prop\n* Opt-in integration with a container\'s context through the `slot` prop for automatic `aria-describedby` / `aria-labelledby` wiring\n\n```jsx\nimport { Text } from "@baseline-ui/core";\n\n<Text type="subtitle" size="sm">\n Text\n</Text>;\n```\n\nThe `Text` component supports the following types: `title`, `subtitle`, `body`, `label`, `value`, and `helper`. It\nalso supports the following sizes: `sm`, `md`, and `lg`.\n\n`Text` can integrate with a container component\'s context. Pass a `slot` name\nand the text picks up the `id` the container provides for that slot, so it gets\nassociated via `aria-describedby` / `aria-labelledby` without manually wiring an\n`id`.\n\n```jsx\n<Text slot="description">\n This description is linked to its field automatically.\n</Text>\n```\n\nSlot integration is **opt-in**: a `Text` without a `slot` never inherits an\nambient context, so it renders identically whether or not a container is\npresent. Naming a `slot` the surrounding container does not define will throw \u2014\nonly pass slots you know the container exposes.\n\nNo Baseline container currently provides a slotted `TextContext`, so this is\ngroundwork today: the mechanism is exercisable against raw React Aria containers\n(`TextField`, `Select`, `TagGroup`, etc.) but no Baseline component wires it up yet.\n\n`Text` always emits a stable class name you can target for styling.\n\n| Selector | Description |\n| ------------------ | ------------------------------------- |\n| `.BaselineUI-Text` | Applied to the rendered text element. |',props:`interface TextProps {
27825
+
27826
+ return onAncestorKeyDown ? (
27827
+ <div onKeyDown={onAncestorKeyDown}>{pagination}</div>
27828
+ ) : (
27829
+ pagination
27830
+ );
27831
+ };
27832
+
27833
+ export const TaggedPaginationInToolbarExample: React.FC<
27834
+ React.ComponentProps<typeof TaggedPagination>
27835
+ > = (props) => (
27836
+ <div>
27837
+ <Toolbar>
27838
+ <ActionButton label="First" />
27839
+ <TaggedPaginationExample {...props} />
27840
+ <ActionButton label="Last" />
27841
+ </Toolbar>
27842
+ <ActionButton label="Outside" />
27843
+ </div>
27844
+ );`},similarTo:[],figmaUrl:null},Text:{id:"core-content-text",breadcrumb:"Core/Content/Text",importStatement:'import { Input, Label, Text, TextField, VariantViewer } from "@baseline-ui/core";',description:"`Text` is a typography primitive that renders strings with consistent type, size, and weight from the design system. Use it whenever you need to display textual content so that headings, body copy, values, and helper text stay visually aligned.",documentation:'`Text` is a typography primitive that renders strings with consistent type, size, and weight from the design system. Use it whenever you need to display textual content so that headings, body copy, values, and helper text stay visually aligned.\n\n* Consistent type, size, and weight pulled from the design system\n* Renders as any HTML element via the `elementType` prop\n* Opt-in integration with a container\'s context through the `slot` prop for automatic `aria-describedby` / `aria-labelledby` wiring\n\n```jsx\nimport { Text } from "@baseline-ui/core";\n\n<Text type="subtitle" size="sm">\n Text\n</Text>;\n```\n\nThe `Text` component supports the following types: `title`, `subtitle`, `body`, `label`, `value`, and `helper`. It\nalso supports the following sizes: `sm`, `md`, and `lg`.\n\n`Text` can integrate with a container component\'s context. Pass a `slot` name\nand the text picks up the `id` the container provides for that slot, so it gets\nassociated via `aria-describedby` / `aria-labelledby` without manually wiring an\n`id`.\n\n```jsx\n<Text slot="description">\n This description is linked to its field automatically.\n</Text>\n```\n\nSlot integration is **opt-in**: a `Text` without a `slot` never inherits an\nambient context, so it renders identically whether or not a container is\npresent. Naming a `slot` the surrounding container does not define will throw \u2014\nonly pass slots you know the container exposes.\n\nNo Baseline container currently provides a slotted `TextContext`, so this is\ngroundwork today: the mechanism is exercisable against raw React Aria containers\n(`TextField`, `Select`, `TagGroup`, etc.) but no Baseline component wires it up yet.\n\n`Text` always emits a stable class name you can target for styling.\n\n| Selector | Description |\n| ------------------ | ------------------------------------- |\n| `.BaselineUI-Text` | Applied to the rendered text element. |',props:`interface TextProps {
26346
27845
  /**
26347
27846
  * @deprecated Do not use in new components. This is a legacy block
26348
27847
  * identifier; new components should exclude it via
@@ -29409,6 +30908,20 @@ includeArrow?: boolean
29409
30908
  * @default document.body
29410
30909
  */
29411
30910
  portalContainer?: HTMLElement
30911
+ /**
30912
+ * The distance in pixels between the tooltip and its trigger along the main
30913
+ * axis. Defaults to 2 when \`includeArrow\` is false.
30914
+ *
30915
+ * @default 12
30916
+ */
30917
+ offset?: number
30918
+ /**
30919
+ * The minimum distance in pixels of the arrow from the edge of the tooltip. It
30920
+ * defaults to 0 when \`includeArrow\` is false.
30921
+ *
30922
+ * @default 8
30923
+ */
30924
+ arrowBoundaryOffset?: number
29412
30925
  placement?: any
29413
30926
  }`,stories:{usage:[{id:"core-overlays-tooltip--basic",name:"Basic",snippet:'const Basic = () => <Tooltip text="Tooltip text" delay={0} closeDelay={0}><ActionButton label="Label" /></Tooltip>;'},{id:"core-overlays-tooltip--variants",name:"Variants",snippet:`const Variants = (args) => (
29414
30927
  <VariantViewer
@@ -29742,12 +31255,14 @@ onPrimaryAction?: (key: Key) => void
29742
31255
  */
29743
31256
  onSecondaryAction?: (key: Key) => void
29744
31257
  /**
29745
- * The icon to use for the primary action.
31258
+ * The icon to use for the primary action. The action is a plain button, so
31259
+ * a \`{ selected, unselected }\` pair renders \`unselected\`.
29746
31260
  */
29747
31261
  primaryActionIcon?: | ToggleIconButtonProps["icon"]
29748
31262
  | ((key: Key) => ToggleIconButtonProps["icon"])
29749
31263
  /**
29750
- * The icon to use for the secondary action.
31264
+ * The icon to use for the secondary action. The action is a plain button,
31265
+ * so a \`{ selected, unselected }\` pair renders \`unselected\`.
29751
31266
  */
29752
31267
  secondaryActionIcon?: | ToggleIconButtonProps["icon"]
29753
31268
  | ((key: Key) => ToggleIconButtonProps["icon"])
@@ -30017,6 +31532,7 @@ import {
30017
31532
  import { TreeView } from "../TreeView";
30018
31533
  import { generateLargeTree, getTreeItems } from "./data";
30019
31534
 
31535
+ import type { IconProps } from "../../Icon";
30020
31536
  import type {
30021
31537
  TreeItemRenderState,
30022
31538
  TreeListItem,
@@ -30024,15 +31540,31 @@ import type {
30024
31540
  } from "../TreeView.types";
30025
31541
  import type { DropPosition, Key } from "@react-types/shared";
30026
31542
 
31543
+ const SelectedPairIcon: React.FC<IconProps> = () => (
31544
+ <svg width={16} height={16} data-testid="tree-view-action-icon-selected" />
31545
+ );
31546
+ const UnselectedPairIcon: React.FC<IconProps> = () => (
31547
+ <svg width={16} height={16} data-testid="tree-view-action-icon-unselected" />
31548
+ );
31549
+ // The prop type does not spell out a falsy return, but TreeView hides the action for one.
31550
+ const noIcon = null as unknown as React.FC<IconProps>;
31551
+ const pairIconFor = (key: React.Key) =>
31552
+ key === "documents"
31553
+ ? { selected: SelectedPairIcon, unselected: UnselectedPairIcon }
31554
+ : noIcon;
31555
+
30027
31556
  export function TreeViewWithPrimaryAction({
30028
- onPrimaryAction,
30029
- }: Pick<TreeViewProps, "onPrimaryAction">): React.JSX.Element {
31557
+ iconPair = false,
31558
+ ...props
31559
+ }: Pick<TreeViewProps, "onPrimaryAction"> & {
31560
+ iconPair?: boolean;
31561
+ }): React.JSX.Element {
30030
31562
  return (
30031
31563
  <TreeView
30032
31564
  items={getTreeItems({})}
30033
- onPrimaryAction={onPrimaryAction}
30034
- primaryActionIcon={PlusIcon}
31565
+ primaryActionIcon={iconPair ? pairIconFor : PlusIcon}
30035
31566
  primaryActionAriaLabel="Primary Action"
31567
+ {...props}
30036
31568
  />
30037
31569
  );
30038
31570
  }
@@ -31342,7 +32874,7 @@ export const DynamicListBoxExample: React.FC<
31342
32874
  >
31343
32875
  <Box
31344
32876
  color={
31345
- isSelected ? "icon.interactive.enabled" : "icon.primary"
32877
+ isSelected ? "text.interactive.enabled" : "icon.primary"
31346
32878
  }
31347
32879
  typography="label.md.medium"
31348
32880
  paddingY="md"
@@ -32394,10 +33926,13 @@ import { presets } from "./data";
32394
33926
 
32395
33927
  import type { ColorInputProps, IconColorInputProps } from "../ColorInput.types";
32396
33928
 
32397
- export const CustomTriggerButton = () => {
33929
+ export const CustomTriggerButton: React.FC<
33930
+ Omit<ColorInputProps, "renderTriggerButton">
33931
+ > = (props) => {
32398
33932
  return (
32399
33933
  <ColorInput
32400
33934
  label="label"
33935
+ presets={presets}
32401
33936
  renderTriggerButton={({ colorName, ref, triggerProps }) => (
32402
33937
  <ActionIconButton
32403
33938
  {...triggerProps}
@@ -32407,6 +33942,7 @@ export const CustomTriggerButton = () => {
32407
33942
  aria-haspopup="true"
32408
33943
  />
32409
33944
  )}
33945
+ {...props}
32410
33946
  />
32411
33947
  );
32412
33948
  };
@@ -32507,6 +34043,10 @@ export const StoredCustomColorsExample: React.FC<{ storageKey: string }> = ({
32507
34043
  />
32508
34044
  );
32509
34045
 
34046
+ export const RedPresetColorInput: React.FC<ColorInputProps> = (props) => (
34047
+ <ColorInput presets={presets} defaultValue="#ff0000" {...props} />
34048
+ );
34049
+
32510
34050
  export const IconColorInputExample: React.FC<
32511
34051
  Omit<IconColorInputProps, "icon">
32512
34052
  > = (props) => <IconColorInput icon={BorderColorIcon} {...props} />;
@@ -32708,9 +34248,10 @@ UNSAFE_enableInert?: boolean | ((isDrawer: boolean) => boolean)
32708
34248
  />
32709
34249
  );`},{id:"core-overlays-modal-modalcontent--drawer-mobile",name:"Drawer Mobile",snippet:"const DrawerMobile = () => <ModalDrawerExample />;"},{id:"core-overlays-modal-modalcontent--drawer-mobile-with-nested-popover",name:"Drawer Mobile With Nested Popover",snippet:"const DrawerMobileWithNestedPopover = () => <SelectInsideModalExample />;"},{id:"core-overlays-modal-modalcontent--uncontrolled-interaction-outside",name:"Uncontrolled Interaction Outside",snippet:"const UncontrolledInteractionOutside = () => <UncontrolledInteractionOutsideExample />;"},{id:"core-overlays-modal-modalcontent--long-content",name:"Long Content",snippet:"const LongContent = () => <LongModalExample />;"},{id:"core-overlays-modal-modalcontent--form-controls",name:"Form Controls",snippet:"const FormControls = () => <FormControlsInModalExample defaultOpen={true} />;"},{id:"core-overlays-modal-modalcontent--with-inert",name:"With Inert",snippet:"const WithInert = () => <FormControlsInModalExample enableInert={true} />;",description:"Experimental: Uses the HTML `inert` attribute instead of `aria-hidden` to hide elements outside the modal. This makes elements truly non-interactive (not just hidden from screen readers) which can improve performance and accessibility. Note: With inert enabled, elements outside the modal cannot be clicked or focused. Try interacting with the background elements when the modal is open vs closed."},{id:"core-overlays-modal-modalcontent--with-disabled-focus-management",name:"With Disabled Focus Management",snippet:"const WithDisabledFocusManagement = () => <DisabledFocusManagementExample />;",description:"Demonstrates `disableFocusManagement` with a FrameProvider. When the modal is open, the text input outside the FrameProvider container remains interactive because focus trapping and restoration are disabled."}],implementation:`import { IFrame, ShadowRoot } from "@baseline-ui/test-utils/client";
32710
34250
  import { sprinkles } from "@baseline-ui/tokens";
32711
- import { getOwnerDocument } from "@react-aria/utils";
32712
- import React, { useEffect, useRef, useState } from "react";
34251
+ import { getOwnerDocument, isShadowRoot } from "@react-aria/utils";
34252
+ import React, { useCallback, useEffect, useRef, useState } from "react";
32713
34253
  import { VisuallyHidden, useId } from "react-aria";
34254
+ import { createPortal } from "react-dom";
32714
34255
 
32715
34256
  import { ActionButton } from "../../ActionButton";
32716
34257
  import { Box } from "../../Box";
@@ -33176,7 +34717,101 @@ export const ModalLateBodyContainerExample: React.FC<
33176
34717
  )}
33177
34718
  </Box>
33178
34719
  );
33179
- };`},similarTo:[],figmaUrl:null},PointPickerContent:{id:"core-content-pointpicker-pointpickercontent",importStatement:`import {
34720
+ };
34721
+
34722
+ const NestedShadowButton: React.FC<{ testId: string }> = ({ testId }) => {
34723
+ const [hostRoot, setHostRoot] = useState<Element["shadowRoot"]>(null);
34724
+ const hostRef = useCallback((host: HTMLDivElement | null) => {
34725
+ if (host)
34726
+ setHostRoot(host.shadowRoot ?? host.attachShadow({ mode: "open" }));
34727
+ }, []);
34728
+
34729
+ return (
34730
+ // Stacked above the underlay so the click reaches the nested shadow root.
34731
+ <div ref={hostRef} style={{ position: "relative", zIndex: 2000 }}>
34732
+ {hostRoot
34733
+ ? createPortal(<button data-testid={testId}>Nested</button>, hostRoot)
34734
+ : null}
34735
+ </div>
34736
+ );
34737
+ };
34738
+
34739
+ const ContainedModalContent: React.FC = () => {
34740
+ const [container, setContainer] = useState<HTMLElement | null>(null);
34741
+ const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(
34742
+ null,
34743
+ );
34744
+ const [isOpen, setIsOpen] = useState(true);
34745
+ const [outsideClicks, setOutsideClicks] = useState(0);
34746
+
34747
+ // A light-DOM child of the outer host, rendered by the <slot> in the container.
34748
+ useEffect(() => {
34749
+ const root = container?.getRootNode();
34750
+ if (!root || !isShadowRoot(root)) return;
34751
+ const host = root.host;
34752
+ const button = host.ownerDocument.createElement("button");
34753
+ button.slot = "slotted";
34754
+ button.dataset.testid = "slotted-button";
34755
+ button.textContent = "Slotted";
34756
+ host.append(button);
34757
+ return () => {
34758
+ button.remove();
34759
+ };
34760
+ }, [container]);
34761
+
34762
+ return (
34763
+ <>
34764
+ <button
34765
+ data-testid="outside-button"
34766
+ onClick={() => {
34767
+ setOutsideClicks((count) => count + 1);
34768
+ }}
34769
+ >
34770
+ Outside
34771
+ </button>
34772
+ <span data-testid="outside-clicks">{outsideClicks}</span>
34773
+ <span data-testid="modal-state">{isOpen ? "open" : "closed"}</span>
34774
+ <div ref={setPortalContainer}>
34775
+ <NestedShadowButton testId="portal-nested-shadow-button" />
34776
+ </div>
34777
+ <FrameProvider
34778
+ container={container}
34779
+ portalContainer={portalContainer}
34780
+ shouldContainOverlays="always"
34781
+ >
34782
+ <Box
34783
+ ref={setContainer}
34784
+ data-testid="container"
34785
+ style={{ width: 400, height: 200 }}
34786
+ display="flex"
34787
+ flexDirection="column"
34788
+ alignItems="center"
34789
+ justifyContent="flex-end"
34790
+ >
34791
+ <NestedShadowButton testId="nested-shadow-button" />
34792
+ <div style={{ position: "relative", zIndex: 2000 }}>
34793
+ <slot name="slotted" />
34794
+ </div>
34795
+ <Modal defaultOpen={true} onOpenChange={setIsOpen}>
34796
+ <ModalContent>
34797
+ <Dialog aria-label="Contained modal">
34798
+ <Box padding="xl">
34799
+ <Text>Contained in a shadow root</Text>
34800
+ </Box>
34801
+ </Dialog>
34802
+ </ModalContent>
34803
+ </Modal>
34804
+ </Box>
34805
+ </FrameProvider>
34806
+ </>
34807
+ );
34808
+ };
34809
+
34810
+ export const ContainedModalInShadowRootExample: React.FC = () => (
34811
+ <ShadowRoot style={{ position: "relative", width: 700, height: 450 }}>
34812
+ <ContainedModalContent />
34813
+ </ShadowRoot>
34814
+ );`},similarTo:[],figmaUrl:null},PointPickerContent:{id:"core-content-pointpicker-pointpickercontent",importStatement:`import {
33180
34815
  Box,
33181
34816
  MultiplePointPickersExample,
33182
34817
  PointPickerContent,
@@ -34779,6 +36414,20 @@ boundaryAxis?: 'horizontal' | 'vertical' | 'both'
34779
36414
  * @default "shift"
34780
36415
  */
34781
36416
  horizontalBoundaryBehavior?: "shift" | "anchor"
36417
+ /**
36418
+ * The distance in pixels between the popover and its trigger along the main
36419
+ * axis. When \`includeArrow\` is set, the arrow's 8px is added on top.
36420
+ *
36421
+ * @default 2
36422
+ */
36423
+ offset?: number
36424
+ /**
36425
+ * The minimum distance in pixels kept between the popover and the edge of its
36426
+ * boundary.
36427
+ *
36428
+ * @default 0
36429
+ */
36430
+ containerPadding?: number
34782
36431
  }`,stories:{usage:[{id:"core-overlays-popover-popovercontent--basic",name:"Basic",snippet:"const Basic = (args) => <PopoverCustomTargetExample popoverContentProps={args} />;"},{id:"core-overlays-popover-popovercontent--default-open-with-arrow",name:"Default Open With Arrow",snippet:"const DefaultOpenWithArrow = () => <PopoverDefaultOpenWithArrowExample />;"},{id:"core-overlays-popover-popovercontent--contained-focus",name:"Contained Focus",snippet:"const ContainedFocus = () => <PopoverContainedFocusExample />;"},{id:"core-overlays-popover-popovercontent--disable-animation",name:"Disable Animation",snippet:`const DisableAnimation = () => (
34783
36432
  <PopoverExample
34784
36433
  popoverProps={{ type: "dialog" }}
@@ -37392,8 +39041,12 @@ import { Autocomplete, Virtualizer } from "react-aria-components";
37392
39041
  import { useListData } from "react-stately";
37393
39042
 
37394
39043
  import { ActionButton } from "../../ActionButton";
39044
+ import { Box } from "../../Box/Box";
37395
39045
  import { items } from "../../ListBox/__tests__/testComponents";
37396
- import { virtualizeAutocompleteItems } from "../../Menu/__tests__/data";
39046
+ import {
39047
+ longListItems,
39048
+ virtualizeAutocompleteItems,
39049
+ } from "../../Menu/__tests__/data";
37397
39050
  import { itemsWithSectionTitles } from "../../UNSAFE_ListBox/__tests__/testComponents";
37398
39051
  import {
37399
39052
  ListLayout,
@@ -37424,6 +39077,21 @@ export const SelectExample: React.FC<
37424
39077
  );
37425
39078
  };
37426
39079
 
39080
+ export const SelectNearViewportBottomExample: React.FC<
39081
+ Omit<React.ComponentProps<typeof Select>, "items">
39082
+ > = (args) => {
39083
+ return (
39084
+ <Box style={{ height: 3000, paddingTop: "calc(100vh - 120px)" }}>
39085
+ <Select
39086
+ aria-label="Choose an item"
39087
+ placeholder="Choose an item"
39088
+ {...args}
39089
+ items={longListItems}
39090
+ />
39091
+ </Box>
39092
+ );
39093
+ };
39094
+
37427
39095
  // "Apples" is a substring of "Pineapples" \u2014 exercises exact string matching
37428
39096
  // in the tester's option() locator.
37429
39097
  const substringItems = [
@@ -38530,8 +40198,8 @@ the built-in English default. For most props an empty string is a real override:
38530
40198
  \`closeLabel=""\` renders an empty label rather than falling back to \`"Close"\`.
38531
40199
 
38532
40200
  The props that pre-date this feature keep their existing behaviour and treat \`""\` as
38533
- unset: \`aria-label\` on \`Pagination\` and \`Stepper\`, \`Pagination\`'s \`incrementAriaLabel\` and
38534
- \`decrementAriaLabel\`, \`ButtonSelect\`'s \`moreAriaLabel\`, \`ColorInput\`'s
40201
+ unset: \`aria-label\` on \`Pagination\` and \`Stepper\`, \`Pagination\`'s and \`TaggedPagination\`'s
40202
+ \`incrementAriaLabel\` and \`decrementAriaLabel\`, \`ButtonSelect\`'s \`moreAriaLabel\`, \`ColorInput\`'s
38535
40203
  \`addColorButtonLabel\`, \`removeColorButtonLabel\` and \`customColorsLabel\`, \`Editor\`'s
38536
40204
  \`submitButtonAriaLabel\` and \`cancelButtonAriaLabel\`, \`FreehandCanvas\`'s \`undoLabel\` and
38537
40205
  \`redoLabel\`, and \`ImageDropZone\`'s \`pickerButtonLabel\`.
@@ -38559,6 +40227,7 @@ are not overridable this way.
38559
40227
  Each component's documentation lists its overridable keys and shows an example. See:
38560
40228
 
38561
40229
  * [Pagination](?path=/docs/core-forms-pagination--docs#translations)
40230
+ * [TaggedPagination](?path=/docs/core-forms-taggedpagination--docs#translations)
38562
40231
  * [ColorInput](?path=/docs/core-forms-colorinput--docs#translations)
38563
40232
  * [ImageDropZone](?path=/docs/core-forms-imagedropzone--docs#translations)
38564
40233
  * [FreehandCanvas](?path=/docs/core-miscellaneous-freehandcanvas--docs#translations)
@@ -38598,7 +40267,9 @@ Review the ambiguous ones by hand \u2014 each deserves its own translation:
38598
40267
  | \`redo\` | \`bui.editor.redo\`, \`bui.freehandCanvas.redo\` |
38599
40268
  | \`selectAll\` | \`bui.editor.selectAll\`, \`bui.select.selectAll\` |
38600
40269
  | \`undo\` | \`bui.editor.undo\`, \`bui.freehandCanvas.undo\` |
38601
- | \`loading\` | \`bui.fileList.loading\`, \`bui.imageGallery.loading\`, \`bui.table.loading\` |`,styling:`# Styling with Sprinkles
40270
+ | \`loading\` | \`bui.fileList.loading\`, \`bui.imageGallery.loading\`, \`bui.table.loading\` |
40271
+ | \`nextPage\` | \`bui.pagination.nextPage\`, \`bui.taggedPagination.nextPage\` |
40272
+ | \`prevPage\` | \`bui.pagination.prevPage\`, \`bui.taggedPagination.prevPage\` |`,styling:`# Styling with Sprinkles
38602
40273
 
38603
40274
  Baseline UI provides a powerful, type-safe styling system built on top of [vanilla-extract sprinkles](https://vanilla-extract.style/documentation/packages/sprinkles/).
38604
40275
 
@@ -39521,7 +41192,7 @@ padding={[null, "lg", "xl"]}
39521
41192
 
39522
41193
  * [vanilla-extract sprinkles documentation](https://vanilla-extract.style/documentation/packages/sprinkles/) - Learn about the underlying sprinkles framework
39523
41194
  * [Box component documentation](/docs/core-utilities-box--docs) - Detailed information about the Box component
39524
- * [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var m={"8":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","ChevronRightFilledIcon","ChevronRightIcon","EllipseIcon","MinusIcon","PlusIcon","XIcon"],"12":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","EditIcon","EllipseIcon","EnterKeyIcon","LockFilledIcon","LockIcon","MinusIcon","MoreVIcon","MoreIcon","PlaceholderIcon","PlusIcon","SearchIcon","SizeIcon","TrashIcon","XIcon","ZoomIcon"],"16":["AlignBottomIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDiagonalTopLeftBottomRightIcon","ArrowDownCircleFilledIcon","ArrowDownIcon","ArrowIcon","ArrowLeftRightIcon","ArrowRightIcon","ArrowUpArrowDownIcon","ArrowUpIcon","AtIcon","AttachmentsIcon","AvatarIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BulletListIcon","CalendarIcon","CaretLeftIcon","CaretRightIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","CircleFilledIcon","ClockIcon","CopyIcon","CustomizeIcon","DocumentEditIcon","DownloadIcon","DuplicateIcon","EditIcon","ElipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FilterAltIcon","FolderIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FullScreenIcon","HelpCircleIcon","HelpIcon","HereIcon","HideIcon","HighlightTextAltIcon","HighlightTextIcon","HorizontalScrollIcon","ImageIcon","InfoCircleFilledIcon","InsertIcon","ItalicIcon","LightBulbIcon","LineIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MeasureIcon","MinusIcon","MoreIcon","MoreVerticalIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","NumberedListIcon","OpenIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageVerticalScrollIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PlaceholderIcon","PlayIcon","PlusIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","ReadOnlyIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedoIcon","RemoveFormattingIcon","ReorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RulerIcon","SearchIcon","SettingsIcon","ShowIcon","SlashCommandsIcon","SoundRecordIcon","StampIcon","StarFilledIcon","StarIcon","StrikeoutTextAltIcon","TableCellIcon","TableColumnIcon","TableHeaderIcon","TableIcon","TableRowIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextDecreaseIndentIcon","TextIcon","TextIncreaseIndentIcon","TextMarkIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UndoIcon","UnlockIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WindowedIcon","WorkflowIcon","XCircleFilledIcon","XIcon"],"20":["AddPageIcon","AnonymousIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpCircleFilledIcon","AtIcon","AvatarFilledIcon","BoldIcon","CalloutIcon","CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ClockIcon","CollapseIcon","CommentIcon","CopyIcon","CutIcon","DistanceIcon","DownloadIcon","DuplicateIcon","EditIcon","EllipseIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorAlternativeCircleIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FormDateIcon","FormSignatureIcon","FormTextFieldIcon","HelpCircleIcon","HighlightTextIcon","HomeIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","ItalicIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MinusIcon","MoreIcon","MoreVerticalIcon","MoveIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OpenIcon","PageMoveLeftIcon","PageMoveRightIcon","PagesInsertIcon","PasteIcon","PipetteIcon","PlusIcon","PrintIcon","RotateClockwiseIcon","SearchIcon","SettingsIcon","ShapeIcon","ShareIcon","SoundIcon","SoundRecordIcon","StarFilledIcon","StarIcon","StyleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UploadIcon","WarningFilledIcon","WarningIcon","XCircleFilledIcon","XCircleIcon","XIcon"],"24":["AddNoteCloudIcon","AddNoteIcon","AddTextSerifIcon","AiIcon","AirplaneIcon","AlignBottomIcon","AlignHorizontalCenterIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDownIcon","ArrowIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","AtIcon","AttachmentIcon","AvatarFilledIcon","AvatarIcon","BlendModeIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BorderColorIcon","BottomBorderIcon","BulletListIcon","CalibrateIcon","CaptureAddIcon","CaretDownIcon","CaretIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ChevronListIcon","ClockIcon","CloudyBorderIcon","CollapseIcon","ColorPaletteIcon","ColorSwatchIcon","CommentIcon","CommentInSidebarIcon","CommentOnPageIcon","CompareDocumentsIcon","CopyIcon","CopyPageIcon","CropIcon","CustomizeIcon","CutIcon","DateModifiedIcon","DatePlusIcon","DebugIcon","DocumentArrowDownCircleIcon","DocumentArrowDownIcon","DocumentArrowRightIcon","DocumentFilledIcon","DocumentLockIcon","DocumentPdfIcon","DownloadIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","DuplicateIcon","EditAnnotationsIcon","EditContentIcon","EditDocumentIcon","EditIcon","EditThumbnailsIcon","EllipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","EndCapArrowFilledIcon","EndCapArrowIcon","EndCapChevronFilledIcon","EndCapChevronIcon","EndCapCircleIcon","EndCapDiamondIcon","EndCapNoneIcon","EndCapSlantedIcon","EndCapSquareIcon","EndCapStraightIcon","EraserIcon","ErrorAltCircleFilledIcon","ErrorAltIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","ExpandVerticalIcon","FillColorIcon","FilterIcon","FitToHeightIcon","FivePagesHorizontalFilledIcon","FivePagesVerticalFilledIcon","FolderAddIcon","FolderIcon","FontListIcon","FontSizeIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormPageIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FormTwoRadioButtonsIcon","FourPagesGridFilledIcon","FourPagesHorizontalFilledIcon","FourPagesStackedFilledIcon","FourPagesVerticalFilledIcon","GroupIcon","HamburgerMenuIcon","HandIcon","HeartIcon","HideIcon","HideRevealIcon","HighlightTextIcon","HomeIcon","HorizontalScollIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","InitialsIcon","InnerHorizontalBorderIcon","InnerVerticalBorderIcon","InsertIcon","ItalicIcon","LayerBottomIcon","LayerDownIcon","LayerTopIcon","LayerUpIcon","LayersIcon","LeftBindingIcon","LeftBorderIcon","LineCapsIcon","LineIcon","LineSpacingIcon","LineStyleCloudyIcon","LineStyleDashedDoubleDashIcon","LineStyleDashedDoubleGapIcon","LineStyleDashedQuadrupleDashIcon","LineStyleDashedSingleGapIcon","LineStyleIcon","LineStyleSolidIcon","LineWidthIcon","LinkIcon","LockFilledIcon","LockIcon","MagicIcon","MagicPenIcon","MailIcon","MarkupIcon","MarqueeZoomIcon","MeasureIcon","MergeIcon","MessageCloudIcon","MinusIcon","MoonIcon","MoreCircleIcon","MoreIcon","MoreVerticalIcon","MoveAllDirectionsIcon","MoveLeftIcon","MoveLeftRightIcon","MoveRightIcon","MultiplePagesIcon","NonEditableIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OcrIcon","OpacityIcon","PageAddIcon","PageCurlIcon","PageDuplicateIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLandscapeIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageMoveLeftIcon","PageMoveRightIcon","PageNumberCircleIcon","PageNumberIcon","PagePortraitIcon","PageRemoveIcon","PageVerticalScrollIcon","PagesInsertAltIcon","PagesInsertIcon","PagesNewFromSelectionAltIcon","PagesNewFromSelectionIcon","PagesSelectAllIcon","PagesSelectNoneIcon","PasteBoardIcon","PastePageIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PinDropFilledIcon","PinDropIcon","PipetteIcon","PlayIcon","PlusCircleFilledIcon","PlusCircleIcon","PlusIcon","PointerIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","PrecisionIcon","PrintIcon","PrivateModeIcon","PushPinIcon","QuestionmarkCircleIcon","ReaderViewIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedactIcon","RedactRectangleIcon","RedactTextHighlighterIcon","RedactionTextRepeatingIcon","RedactionTextSingleIcon","RedoAllIcon","RedoIcon","RegexIcon","ReplaceIcon","RightBindingIcon","RightBorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RotateObjectClockwiseIcon","RotateObjectCounterClockwiseIcon","RulerIcon","ScaleIcon","SearchCircleIcon","SearchIcon","SearchSelectionIcon","SelectAllIcon","SelectionToolIcon","SettingsIcon","ShapesIcon","ShareAltIcon","ShareIcon","ShieldAddIcon","ShieldCheckmarkIcon","ShieldWarningIcon","ShieldXIcon","ShowIcon","SidebarIcon","SignOutIcon","SignatureDigitalIcon","SignatureIcon","SinglePageFilledIcon","SoundIcon","SquigglyTextIcon","StampAddIcon","StampIcon","StarFilledIcon","StarIcon","StartCapArrowFilledIcon","StartCapArrowIcon","StartCapChevronFilledIcon","StartCapChevronIcon","StartCapCircleIcon","StartCapDiamondIcon","StartCapNoneIcon","StartCapSlantedIcon","StartCapSquareIcon","StartCapStraightIcon","StrikeoutTextIcon","StyleFilledIcon","StyleIcon","StylusFilledIcon","StylusIcon","SunIcon","TableCellIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextColorIcon","TextIcon","TextPropertiesHideIcon","TextPropertiesShowIcon","TextSerifIcon","TextSmallerIcon","ThreePagesHorizontalFilledIcon","ThreePagesStackedFilledIcon","ThreePagesVerticalFilledIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TopBorderIcon","TrashIcon","TwoPagesHorizontalFilledIcon","TwoPagesVerticalFilledIcon","TypeTextIcon","UnderlineIcon","UnderlineTextIcon","UndoAllIcon","UndoIcon","UndoRedoIcon","UngroupIcon","UnlockIcon","UploadIcon","UserIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WidgetIcon","WorkflowIcon","XCircleFilledIcon","XCircleIcon","XIcon","ZoomInIcon","ZoomOutIcon"],"36":["ArrowRight","Check","Circle","Cross","Help","Inset","Key","NewParagraphAlt","NewParagraph","Note","PointerRight","SpeechBubble","Star"]};var r=["charts-barchart--basic","charts-barchart--custom-colors","charts-barchart--formatted","charts-barchart--hidden-axes","charts-barchart--many-series","charts-barchart--mixed-stacking","charts-barchart--single-series","charts-barchart--stacked","charts-barchart--stacked-with-three-series","charts-barchart--thicker-bars","charts-barchart--with-legend","charts-linechart--basic","charts-linechart--custom-colors","charts-linechart--formatted","charts-linechart--hidden-axes","charts-linechart--linear-curve","charts-linechart--many-lines","charts-linechart--single-line","charts-linechart--sparkline","charts-linechart--with-dots","charts-linechart--with-legend","charts-piechart--basic","charts-piechart--custom-colors","charts-piechart--donut","charts-piechart--long-legend-names","charts-piechart--many-slices","charts-piechart--no-labels","charts-piechart--no-legend","charts-piechart--no-tooltip","charts-piechart--small-slices-below-five-percent","core-buttons-actionbutton--as-div","core-buttons-actionbutton--basic","core-buttons-actionbutton--disabled","core-buttons-actionbutton--variants","core-buttons-actionbutton--with-both-icons","core-buttons-actionbutton--with-icon","core-buttons-actionbutton--with-popover","core-buttons-actiongroup--basic","core-buttons-actiongroup--default-selected","core-buttons-actiongroup--disabled","core-buttons-actiongroup--disabled-items","core-buttons-actiongroup--disabled-items-multi-select","core-buttons-actiongroup--disabled-with-selection","core-buttons-actiongroup--multi-select","core-buttons-actiongroup--multiple-default-selected","core-buttons-actiongroup--multiple-selected-items","core-buttons-actiongroup--single-item","core-buttons-actiongroup--single-select","core-buttons-actiongroup--with-custom-action-item","core-buttons-actiongroup--with-icon","core-buttons-actiongroup--with-icon-disabled","core-buttons-actiongroup--with-icon-multi-select","core-buttons-actiongroup--without-tooltip","core-buttons-actioniconbutton--basic","core-buttons-actioniconbutton--disabled","core-buttons-actioniconbutton--variants","core-buttons-actioniconbutton--with-popover","core-buttons-actioniconbutton--with-tooltip","core-buttons-reaction--basic","core-buttons-reaction--disabled","core-buttons-reaction--read-only","core-buttons-reaction--selected","core-buttons-reaction--variants","core-buttons-scrollcontrolbutton--basic","core-buttons-scrollcontrolbutton--hide-for-keyboard","core-buttons-scrollcontrolbutton--with-custom-delay","core-buttons-scrollcontrolbutton--with-reversed-items","core-buttons-scrollcontrolbutton--without-smooth-scroll","core-buttons-togglebutton--basic","core-buttons-togglebutton--controlled","core-buttons-togglebutton--default-selected","core-buttons-togglebutton--disabled","core-buttons-togglebutton--variants","core-buttons-togglebutton--with-icon","core-buttons-toggleiconbutton--basic","core-buttons-toggleiconbutton--primary-variants","core-buttons-toggleiconbutton--secondary-variants","core-buttons-toggleiconbutton--state-specific-icons","core-buttons-toggleiconbutton--teritary-variants","core-buttons-toggleiconbutton--toolbar-variants","core-buttons-toggleiconbutton--with-tooltip","core-collections-filelist--basic","core-collections-filelist--disabled","core-collections-filelist--disabled-items","core-collections-filelist--loading","core-collections-filelist--long-filename","core-collections-filelist--many-items","core-collections-filelist--mixed-states","core-collections-filelist--with-error","core-collections-gridlist--basic","core-collections-gridlist--default-selected-keys","core-collections-gridlist--disabled","core-collections-gridlist--disabled-rows","core-collections-gridlist--disallow-empty-selection","core-collections-gridlist--with-drag-and-drop","core-collections-gridlist--with-multiple-selection","core-collections-gridlist--with-single-selection","core-collections-imagegallery--basic","core-collections-imagegallery--more-items","core-collections-imagegallery--rtl-with-virtualization","core-collections-imagegallery--scrollable","core-collections-imagegallery--with-controlled-list","core-collections-imagegallery--with-custom-aspect-ratio","core-collections-imagegallery--with-custom-fit","core-collections-imagegallery--with-custom-image-dimensions","core-collections-imagegallery--with-custom-image-renderer","core-collections-imagegallery--with-custom-size","core-collections-imagegallery--with-deletion","core-collections-imagegallery--with-dynamic-list","core-collections-imagegallery--with-long-labels","core-collections-imagegallery--with-medium-size","core-collections-imagegallery--with-multiple-selection","core-collections-imagegallery--with-reordering","core-collections-imagegallery--with-single-selection","core-collections-imagegallery--with-single-selection-and-deletion","core-collections-imagegallery--with-virtualization","core-collections-listbox--basic","core-collections-listbox--controlled-auto-scroll","core-collections-listbox--drag-and-drop-custom-preview","core-collections-listbox--drag-and-drop-grid","core-collections-listbox--drag-and-drop-horizontal","core-collections-listbox--drag-and-drop-multiple","core-collections-listbox--drag-and-drop-single","core-collections-listbox--dynamic-items","core-collections-listbox--with-custom-option-style","core-collections-listbox--with-customized-section-titles","core-collections-listbox--with-default-selected","core-collections-listbox--with-disabled-items","core-collections-listbox--with-focus-loop","core-collections-listbox--with-padded-section-titles","core-collections-listbox--with-section-titles","core-collections-listbox--with-sections","core-collections-listbox--with-selected","core-collections-menu--basic","core-collections-menu--controlled-open","core-collections-menu--disabled","core-collections-menu--long-menu","core-collections-menu--multiple-selection","core-collections-menu--section-level-selection","core-collections-menu--single-selection","core-collections-menu--with-custom-options","core-collections-menu--with-custom-trigger","core-collections-menu--with-disabled-keys","core-collections-menu--with-disabled-submenu","core-collections-menu--with-icons","core-collections-menu--with-long-labels","core-collections-menu--with-sections","core-collections-menu--with-selected-keys-controlled","core-collections-menu--with-submenu","core-collections-table--async-loading","core-collections-table--default","core-collections-table--disabled-rows","core-collections-table--drag-and-drop","core-collections-table--empty","core-collections-table--long-text-content","core-collections-table--multiple-selection","core-collections-table--row-action","core-collections-table--selection-with-row-action","core-collections-table--single-selection","core-collections-table--sorting","core-collections-table--virtualized","core-collections-table--with-tag-and-menu","core-collections-table--with-toolbar","core-collections-taggroup--basic","core-collections-taggroup--disabled","core-collections-taggroup--disabled-items","core-collections-taggroup--group-variants","core-collections-taggroup--multi-select","core-collections-taggroup--removable","core-collections-taggroup--single-select","core-collections-taggroup--small-variants","core-collections-taggroup--variants","core-collections-treeview--basic","core-collections-treeview--custom-row","core-collections-treeview--custom-row-drag-and-drop","core-collections-treeview--deeply-nested","core-collections-treeview--drag-and-drop","core-collections-treeview--empty-tree","core-collections-treeview--flat-tree","core-collections-treeview--handle-only-drag-and-drop","core-collections-treeview--interactive-fields-drag-and-drop","core-collections-treeview--long-labels","core-collections-treeview--single-item","core-collections-treeview--virtualized-drag-and-drop","core-collections-treeview--virtualized-with-actions","core-collections-treeview--virtualized-with-descriptions","core-collections-treeview--virtualized-with-expand-control","core-collections-treeview--virtualized-with-rename","core-collections-treeview--with-actions-at-end","core-collections-treeview--with-controlled-expanded-keys","core-collections-treeview--with-custom-render-icons","core-collections-treeview--with-custom-render-item-title","core-collections-treeview--with-default-expanded-keys","core-collections-treeview--with-description","core-collections-treeview--with-icons","core-collections-treeview--with-primary-action","core-collections-treeview--with-primary-and-secondary-action","core-collections-treeview--with-primary-secondary-and-description-action","core-collections-treeview--with-rename","core-collections-treeview--with-selected-items","core-collections-treeview--with-virtualization","core-collections-unsafe-listbox--basic","core-collections-unsafe-listbox--controlled-auto-scroll","core-collections-unsafe-listbox--drag-and-drop-custom-preview","core-collections-unsafe-listbox--drag-and-drop-grid","core-collections-unsafe-listbox--drag-and-drop-horizontal","core-collections-unsafe-listbox--drag-and-drop-multiple","core-collections-unsafe-listbox--drag-and-drop-single","core-collections-unsafe-listbox--dynamic-items","core-collections-unsafe-listbox--virtualized-horizontal","core-collections-unsafe-listbox--virtualized-scroll-into-view","core-collections-unsafe-listbox--virtualized-vertical","core-collections-unsafe-listbox--virtualized-with-section-separators","core-collections-unsafe-listbox--virtualized-with-sections","core-collections-unsafe-listbox--with-custom-option-style","core-collections-unsafe-listbox--with-customized-section-titles","core-collections-unsafe-listbox--with-default-selected","core-collections-unsafe-listbox--with-disabled-items","core-collections-unsafe-listbox--with-focus-loop","core-collections-unsafe-listbox--with-padded-section-titles","core-collections-unsafe-listbox--with-section-titles","core-collections-unsafe-listbox--with-sections","core-collections-unsafe-listbox--with-selected","core-collections-virtualizer--grid-layout-example","core-collections-virtualizer--list-layout-example","core-collections-virtualizer--rtl-image-gallery-preset-example","core-collections-virtualizer--tree-view-preset-example","core-content-avatar--basic","core-content-avatar--disabled","core-content-avatar--variants","core-content-avatar--with-image","core-content-avatar--with-initials","core-content-avatar--with-notification","core-content-code--basic","core-content-code--with-scroll","core-content-colorswatch--basic","core-content-colorswatch--disabled","core-content-colorswatch--full-transparency","core-content-colorswatch--indeterminate","core-content-colorswatch--interactive","core-content-colorswatch--none","core-content-colorswatch--variants","core-content-colorswatch--with-custom-label","core-content-colorswatch--with-tooltip","core-content-colorswatch--with-transparency","core-content-kbd--common-shortcuts","core-content-kbd--complex-shortcut","core-content-kbd--key-combination","core-content-kbd--key-combination-with-symbols","core-content-kbd--modifier-key","core-content-kbd--single-key","core-content-kbd--symbols-showcase","core-content-markdown--basic","core-content-markdown--with-caret","core-content-pointpicker--basic","core-content-pointpicker--disabled","core-content-pointpicker-pointpickercontent--custom-cursor","core-content-pointpicker-pointpickercontent--custom-cursor-without-default","core-content-pointpicker-pointpickercontent--default","core-content-pointpicker-pointpickercontent--multiple-point-pickers","core-content-pointpicker-pointpickercontent--points-within-radius","core-content-pointpicker-pointpickercontent--programmatic-focus","core-content-pointpicker-pointpickercontent--snap-to-point","core-content-pointpicker-pointpickercontent--trailing-element","core-content-pointpicker-pointpickercontent--without-grid-lines","core-content-pointpicker-pointpickerdisplay--with-custom-scale","core-content-pointpicker-pointpickerdisplay--with-description","core-content-pointpicker-pointpickerdisplay--with-floating-display","core-content-preview--disabled","core-content-preview--image-preview","core-content-preview--svg-preview","core-content-preview--text-preview","core-content-preview--variants","core-content-preview--without-delete-button","core-content-separator--basic","core-content-separator--secondary","core-content-separator--secondary-vertical","core-content-separator--vertical","core-content-statuscard--basic","core-content-statuscard--interactive","core-content-statuscard--long-content","core-content-statuscard--truncated-title","core-content-statuscard--variants","core-content-statuscard--with-custom-icon","core-content-statuscard--with-trailing-element","core-content-statuscard--without-description","core-content-tag--basic","core-content-tag--disabled","core-content-tag--disabled-removable","core-content-tag--long-text","core-content-tag--removable","core-content-tag--selected","core-content-tag--selected-with-icon","core-content-tag--small","core-content-tag--small-with-icon","core-content-tag--with-icon","core-content-text--basic","core-content-text--slots","core-content-text--variants","core-feedback-skeleton--circle","core-feedback-skeleton--composed-example","core-feedback-skeleton--custom-shape","core-feedback-skeleton--document-view-area","core-feedback-skeleton--rectangle","core-feedback-skeleton--text-line","core-forms-buttonselect--basic","core-forms-buttonselect--controlled","core-forms-buttonselect--controlled-button-selection","core-forms-buttonselect--default-button-selected-value","core-forms-buttonselect--default-select-selected-value","core-forms-buttonselect--disabled","core-forms-buttonselect--exclude-from-tab-order","core-forms-buttonselect--items-without-icons","core-forms-buttonselect--long-text-labels","core-forms-buttonselect--many-items","core-forms-buttonselect--variants","core-forms-buttonselect--with-action-behaviour","core-forms-buttonselect--with-button-disabled-key","core-forms-buttonselect--with-callbacks","core-forms-buttonselect--with-default-open","core-forms-buttonselect--with-disabled-keys","core-forms-buttonselect--with-disabled-keys-and-default-selected","core-forms-buttonselect--with-hidden-label","core-forms-buttonselect--with-individual-button-behaviour","core-forms-buttonselect--with-multiple-disabled-keys","core-forms-buttonselect--with-validation-error","core-forms-buttonselect--without-tooltip","core-forms-calendar--default","core-forms-calendar--disabled","core-forms-calendar--extra-small","core-forms-calendar--extra-small-no-title","core-forms-calendar--fixed-weeks","core-forms-calendar--international-calendar","core-forms-calendar--read-only","core-forms-calendar--select-month","core-forms-calendar--select-month-and-year","core-forms-calendar--select-month-and-year-extra-small","core-forms-calendar--select-month-and-year-with-title","core-forms-calendar--select-month-extra-small","core-forms-calendar--select-month-with-title","core-forms-calendar--unavailable-dates","core-forms-calendar--with-default-value","core-forms-calendar--with-min-max","core-forms-calendar--with-title","core-forms-checkbox--checked","core-forms-checkbox--indeterminate","core-forms-checkbox--primary","core-forms-checkbox--with-error","core-forms-checkbox--with-label-at-end","core-forms-checkbox--with-label-at-start","core-forms-colorinput--basic","core-forms-colorinput--color-presets-only","core-forms-colorinput--controlled","core-forms-colorinput--disabled","core-forms-colorinput--indeterminate","core-forms-colorinput--lazy-picker","core-forms-colorinput--lazy-picker-mobile","core-forms-colorinput--with-alpha","core-forms-colorinput--with-controlled-open","core-forms-colorinput--with-custom-trigger","core-forms-colorinput--with-default-open","core-forms-colorinput--with-default-value","core-forms-colorinput--with-label","core-forms-colorinput--with-label-at-start","core-forms-colorinput--with-removal","core-forms-colorinput--without-alpha","core-forms-colorinput--without-color-label","core-forms-colorinput--without-color-presets","core-forms-colorinput-iconcolorinput--compact","core-forms-colorinput-iconcolorinput--compact-disabled","core-forms-colorinput-iconcolorinput--compact-indeterminate","core-forms-colorinput-iconcolorinput--disabled","core-forms-colorinput-iconcolorinput--indeterminate","core-forms-colorinput-iconcolorinput--standard","core-forms-colorinput-iconcolorinput--without-tooltip","core-forms-colorswatchpicker--basic","core-forms-colorswatchpicker--controlled","core-forms-colorswatchpicker--default-value","core-forms-colorswatchpicker--disabled","core-forms-colorswatchpicker--with-icon","core-forms-colorswatchpicker--with-label","core-forms-colorswatchpicker--with-label-at-start","core-forms-combobox--basic","core-forms-combobox--disabled","core-forms-combobox--dynamic-collections","core-forms-combobox--ghost-variant","core-forms-combobox--items-with-icon","core-forms-combobox--read-only","core-forms-combobox--variants","core-forms-combobox--with-custom-filter","core-forms-combobox--with-custom-number-value","core-forms-combobox--with-custom-value","core-forms-combobox--with-description","core-forms-combobox--with-error-message","core-forms-combobox--with-focus-menu-trigger","core-forms-combobox--with-label-at-start","core-forms-combobox--with-manual-menu-trigger","core-forms-combobox--with-min-max-value","core-forms-combobox--with-render-option","core-forms-combobox--with-tooltip","core-forms-combobox--with-warning-message","core-forms-datefield--basic","core-forms-datefield--controlled","core-forms-datefield--default-value","core-forms-datefield--different-granularity","core-forms-datefield--disabled","core-forms-datefield--ghost-variant","core-forms-datefield--html-forms","core-forms-datefield--placeholder-value","core-forms-datefield--read-only","core-forms-datefield--variants","core-forms-datefield--with-calendar-icon","core-forms-datefield--with-calendar-picker","core-forms-datefield--with-calendar-picker-and-default-value","core-forms-datefield--with-calendar-picker-and-min-max","core-forms-datefield--with-calendar-picker-disabled","core-forms-datefield--with-calendar-picker-error","core-forms-datefield--with-calendar-picker-ghost","core-forms-datefield--with-calendar-picker-read-only","core-forms-datefield--with-error-message","core-forms-datefield--with-error-message-only","core-forms-datefield--with-label","core-forms-datefield--with-label-at-start","core-forms-datefield--with-min-and-max-value","core-forms-datefield--with-warning-message","core-forms-fileinput--basic","core-forms-fileinput--custom-labels","core-forms-fileinput--directory","core-forms-fileinput--disabled","core-forms-fileinput--label-position-start","core-forms-fileinput--multiple","core-forms-fileinput--variants","core-forms-fileinput--with-error","core-forms-fileinput--with-warning","core-forms-fileinput--without-label","core-forms-fileuploader--button-variant","core-forms-fileuploader--default","core-forms-fileuploader--disabled","core-forms-fileuploader--error-dropzone","core-forms-fileuploader--inline","core-forms-fileuploader--no-label","core-forms-fileuploader--variants","core-forms-imagedropzone--basic","core-forms-imagedropzone--controlled","core-forms-imagedropzone--disabled","core-forms-imagedropzone--variants","core-forms-imagedropzone--with-default-image","core-forms-imagedropzone--with-file-size-limit","core-forms-imagedropzone--with-file-type-restriction","core-forms-numberinput--basic","core-forms-numberinput--controlled","core-forms-numberinput--disabled","core-forms-numberinput--ghost-variant","core-forms-numberinput--read-only","core-forms-numberinput--variants","core-forms-numberinput--with-custom-step","core-forms-numberinput--with-description","core-forms-numberinput--with-error","core-forms-numberinput--with-error-and-error-message","core-forms-numberinput--with-label","core-forms-numberinput--with-label-at-start","core-forms-numberinput--with-min-and-max","core-forms-numberinput--without-stepper","core-forms-pagination--controlled","core-forms-pagination--disabled","core-forms-pagination--primary","core-forms-pagination--read-only","core-forms-pagination--variants","core-forms-pagination--with-custom-messages","core-forms-pagination--with-default-value","core-forms-pagination--with-large-numbers","core-forms-pagination--with-step","core-forms-pagination--without-actions","core-forms-radiogroup--basic","core-forms-radiogroup--controlled","core-forms-radiogroup--custom-render-option","core-forms-radiogroup--default-value","core-forms-radiogroup--disabled","core-forms-radiogroup--disabled-values","core-forms-radiogroup--horizontal","core-forms-radiogroup--read-only","core-forms-radiogroup--with-group-label","core-forms-radiogroup--with-group-label-at-start","core-forms-radiogroup--with-option-description","core-forms-radiogroup--with-option-label-at-start","core-forms-rangecalendar--default","core-forms-rangecalendar--disabled","core-forms-rangecalendar--extra-small","core-forms-rangecalendar--extra-small-no-title","core-forms-rangecalendar--fixed-weeks","core-forms-rangecalendar--international-calendar","core-forms-rangecalendar--read-only","core-forms-rangecalendar--select-month","core-forms-rangecalendar--select-month-and-year","core-forms-rangecalendar--select-month-and-year-with-title","core-forms-rangecalendar--select-month-with-title","core-forms-rangecalendar--unavailable-dates","core-forms-rangecalendar--with-default-value","core-forms-rangecalendar--with-min-max","core-forms-rangecalendar--with-title","core-forms-searchinput--basic","core-forms-searchinput--clear-button-focusable","core-forms-searchinput--disabled","core-forms-searchinput--variants","core-forms-select--basic","core-forms-select--controlled","core-forms-select--empty-items","core-forms-select--ghost","core-forms-select--long-labels","core-forms-select--long-list","core-forms-select--read-only","core-forms-select--scrollable","core-forms-select--with-autocomplete","core-forms-select--with-controlled-open","core-forms-select--with-custom-trigger","core-forms-select--with-default-open","core-forms-select--with-default-selected-item","core-forms-select--with-description","core-forms-select--with-disabled","core-forms-select--with-disabled-items","core-forms-select--with-error","core-forms-select--with-error-and-error-message","core-forms-select--with-label","core-forms-select--with-label-at-start","core-forms-select--with-section-headers","core-forms-select--with-sections","core-forms-select--with-virtualized-section-headers","core-forms-select--with-warning","core-forms-select--with-warning-and-warning-message","core-forms-select-iconselect--basic","core-forms-select-iconselect--disabled","core-forms-select-iconselect--read-only","core-forms-select-iconselect--with-default-open","core-forms-select-iconselect--with-error","core-forms-select-iconselect--with-warning","core-forms-select-iconselect--without-icon","core-forms-select-iconselect--without-tooltip","core-forms-select-multiselect--basic","core-forms-select-multiselect--controlled","core-forms-select-multiselect--ghost","core-forms-select-multiselect--hide-clear","core-forms-select-multiselect--hide-select-all","core-forms-select-multiselect--hide-select-all-and-clear","core-forms-select-multiselect--long-labels-as-tags","core-forms-select-multiselect--long-list","core-forms-select-multiselect--max-count-1","core-forms-select-multiselect--max-count-3","core-forms-select-multiselect--read-only","core-forms-select-multiselect--read-only-with-tags-open","core-forms-select-multiselect--scrollable","core-forms-select-multiselect--with-autocomplete","core-forms-select-multiselect--with-controlled-open","core-forms-select-multiselect--with-custom-trigger","core-forms-select-multiselect--with-default-open","core-forms-select-multiselect--with-default-selected-item","core-forms-select-multiselect--with-description","core-forms-select-multiselect--with-disabled","core-forms-select-multiselect--with-disabled-items","core-forms-select-multiselect--with-error","core-forms-select-multiselect--with-error-and-error-message","core-forms-select-multiselect--with-error-and-tags","core-forms-select-multiselect--with-label","core-forms-select-multiselect--with-label-at-start","core-forms-select-multiselect--with-sections","core-forms-select-multiselect--with-warning","core-forms-select-multiselect--with-warning-and-warning-message","core-forms-slider--basic","core-forms-slider--controlled","core-forms-slider--disabled","core-forms-slider--read-only","core-forms-slider--read-only-with-number-input","core-forms-slider--with-description","core-forms-slider--with-label","core-forms-slider--with-label-and-number-input","core-forms-slider--with-min-and-max","core-forms-slider--with-number-input","core-forms-slider--with-step","core-forms-slider-iconslider--basic","core-forms-slider-iconslider--disabled","core-forms-slider-iconslider--with-number-input","core-forms-slider-iconslider--without-tooltip","core-forms-switch--basic","core-forms-switch--disabled","core-forms-switch--selected","core-forms-switch--selected-disabled","core-forms-switch--with-label","core-forms-switch--with-label-and-status","core-forms-switch--with-label-in-left-and-status","core-forms-taggedpagination--basic","core-forms-taggedpagination--disabled","core-forms-taggedpagination--read-only","core-forms-taggedpagination--variant","core-forms-taggedpagination--with-page-label","core-forms-textinput--basic","core-forms-textinput--controlled","core-forms-textinput--disabled","core-forms-textinput--focusing-the-input","core-forms-textinput--ghost-variant","core-forms-textinput--html-forms","core-forms-textinput--multiline","core-forms-textinput--multiline-variants","core-forms-textinput--multiline-with-rows","core-forms-textinput--read-only","core-forms-textinput--variants","core-forms-textinput--with-description","core-forms-textinput--with-error-message","core-forms-textinput--with-label","core-forms-textinput--with-label-at-start","core-forms-textinput--with-warning-message","core-forms-timefield--basic","core-forms-timefield--controlled","core-forms-timefield--default-value","core-forms-timefield--disabled","core-forms-timefield--ghost-variant","core-forms-timefield--html-forms","core-forms-timefield--placeholder-value","core-forms-timefield--read-only","core-forms-timefield--variants","core-forms-timefield--with-error-message","core-forms-timefield--with-error-message-only","core-forms-timefield--with-label","core-forms-timefield--with-label-at-start","core-forms-timefield--with-min-and-max-value","core-forms-timefield--with-warning-message","core-media-audioplayer--basic","core-media-audioplayer--small","core-miscellaneous-editor--basic","core-miscellaneous-editor--headless-custom","core-miscellaneous-editor-plain--auto-focus","core-miscellaneous-editor-plain--auto-focus-at-end","core-miscellaneous-editor-plain--auto-focus-at-start","core-miscellaneous-editor-plain--clear-on-cancel","core-miscellaneous-editor-plain--clear-on-save","core-miscellaneous-editor-plain--controlled","core-miscellaneous-editor-plain--custom-submit-icon","core-miscellaneous-editor-plain--default-save-disabled","core-miscellaneous-editor-plain--disabled","core-miscellaneous-editor-plain--minimal","core-miscellaneous-editor-plain--minimal-disabled","core-miscellaneous-editor-plain--minimal-multiline","core-miscellaneous-editor-plain--minimal-save-disabled","core-miscellaneous-editor-plain--not-inline","core-miscellaneous-editor-plain--save-on-enter","core-miscellaneous-editor-plain--variants","core-miscellaneous-editor-plain--with-cancel","core-miscellaneous-editor-plain--with-dynamic-caret-position","core-miscellaneous-editor-rich-text--auto-focus","core-miscellaneous-editor-rich-text--auto-focus-at-end","core-miscellaneous-editor-rich-text--clear-on-cancel","core-miscellaneous-editor-rich-text--clear-on-save","core-miscellaneous-editor-rich-text--controlled","core-miscellaneous-editor-rich-text--default","core-miscellaneous-editor-rich-text--disabled","core-miscellaneous-editor-rich-text--long-content","core-miscellaneous-editor-rich-text--mentions","core-miscellaneous-editor-rich-text--mentions-max-suggestions","core-miscellaneous-editor-rich-text--not-inline","core-miscellaneous-editor-rich-text--save-disabled","core-miscellaneous-editor-rich-text--save-on-enter","core-miscellaneous-editor-rich-text--variants","core-miscellaneous-editor-rich-text--with-cancel","core-miscellaneous-editor-rich-text--with-custom-footer-buttons","core-miscellaneous-editor-rich-text--with-placeholder","core-miscellaneous-freehandcanvas--basic","core-miscellaneous-freehandcanvas--clear-button","core-miscellaneous-freehandcanvas--controlled","core-miscellaneous-freehandcanvas--default-value","core-miscellaneous-freehandcanvas--disabled","core-miscellaneous-freehandcanvas--history-enabled","core-miscellaneous-freehandcanvas--label","core-miscellaneous-freehandcanvas--streamlining","core-miscellaneous-icon--basic","core-miscellaneous-toolbar--basic","core-miscellaneous-toolbar--collapsible","core-miscellaneous-toolbar--vertical","core-miscellaneous-toolbar--with-inputs","core-miscellaneous-toolbar--with-over-flow","core-miscellaneous-toolbar--with-tabbing-within","core-miscellaneous-toolbar--with-tooltip","core-navigation-accordion--basic","core-navigation-accordion--controlled","core-navigation-accordion--default-expanded-keys","core-navigation-accordion--disabled","core-navigation-accordion--single-expansion","core-navigation-accordion-accordionitem--force-mount","core-navigation-accordion-accordionitem--show-actions-on-trigger-only","core-navigation-accordion-accordionitem--with-buttons","core-navigation-accordion-accordionitem--with-sub-labels","core-navigation-accordion-accordionitem--with-tabbable-content","core-navigation-disclosure--basic","core-navigation-disclosure--controlled","core-navigation-disclosure--truncated-title","core-navigation-disclosure--variants","core-navigation-disclosure--with-custom-icon","core-navigation-disclosure--with-interactive-content","core-navigation-disclosure--with-long-content","core-navigation-disclosure--without-description","core-navigation-link--basic","core-navigation-link--client-side-action","core-navigation-link--variants","core-navigation-stepper--all-complete","core-navigation-stepper--all-states","core-navigation-stepper--condensed","core-navigation-stepper--controlled","core-navigation-stepper--default","core-navigation-stepper--expanded-without-descriptions","core-navigation-stepper--frontier-ahead-of-selection","core-navigation-stepper--indicator-only","core-navigation-stepper--indicator-only-expanded","core-navigation-stepper--is-disabled","core-navigation-stepper--long-title-and-description","core-navigation-stepper--mixed-indicator-and-titled-items","core-navigation-stepper--per-item-aria-label-overrides-title","core-navigation-stepper--single-item","core-navigation-stepper--size-small-condensed","core-navigation-stepper--size-small-expanded","core-navigation-stepper--two-steps","core-navigation-stepper--with-disabled-step","core-navigation-tabs--basic","core-navigation-tabs--controlled","core-navigation-tabs--ghost","core-navigation-tabs--with-action-button","core-navigation-tabs--with-close-button","core-navigation-tabs--with-default-selected","core-navigation-tabs--with-disabled","core-navigation-tabs--with-focusable-content","core-navigation-tabs--with-specific-disabled","core-navigation-tabs-tabitem--with-icon","core-overlays-alertdialog--auto-focus-cancel-button","core-overlays-alertdialog--basic","core-overlays-alertdialog--custom-focused-button","core-overlays-alertdialog--default-open","core-overlays-alertdialog--long-content","core-overlays-alertdialog--only-cancel-button","core-overlays-alertdialog--only-primary-action","core-overlays-alertdialog--primary-action-disabled","core-overlays-alertdialog--separate-close-handler","core-overlays-alertdialog--with-text-input","core-overlays-alertdialog--with-title-only","core-overlays-alertdialog--without-close-button","core-overlays-alertdialog--without-icon","core-overlays-alertdialog--without-message-and-actions","core-overlays-dialog--basic","core-overlays-dialog--default-open","core-overlays-dialog--different-sizes","core-overlays-dialog--ghost","core-overlays-drawer--basic","core-overlays-drawer--with-action","core-overlays-inlinetoolbar--basic","core-overlays-inlinetoolbar--controlled","core-overlays-inlinetoolbar--disabled","core-overlays-inlinetoolbar--disabled-keys","core-overlays-inlinetoolbar--with-interactive-element","core-overlays-inlinetoolbar--with-scroll","core-overlays-modal--basic","core-overlays-modal--controlled","core-overlays-modal--default-open","core-overlays-modal-modalcontent--disabled-animation","core-overlays-modal-modalcontent--drawer-mobile","core-overlays-modal-modalcontent--drawer-mobile-with-nested-popover","core-overlays-modal-modalcontent--form-controls","core-overlays-modal-modalcontent--long-content","core-overlays-modal-modalcontent--not-dismissable","core-overlays-modal-modalcontent--uncontrolled-interaction-outside","core-overlays-modal-modalcontent--with-disabled-focus-management","core-overlays-modal-modalcontent--with-inert","core-overlays-popover--basic","core-overlays-popover--event-leak-fix","core-overlays-popover--with-arrow","core-overlays-popover--with-boundary-element","core-overlays-popover--with-custom-target","core-overlays-popover--with-dynamic-trigger-width","core-overlays-popover--with-no-boundary","core-overlays-popover--with-scrollable-content","core-overlays-popover--with-scrollable-content-non-modal","core-overlays-popover--with-scrollable-viewport","core-overlays-popover--with-tooltip","core-overlays-popover-popovercontent--basic","core-overlays-popover-popovercontent--contained-focus","core-overlays-popover-popovercontent--default-open-with-arrow","core-overlays-popover-popovercontent--disable-animation","core-overlays-popover-popovercontent--manual-repositioning","core-overlays-popover-popovercontent--nested-scrollable-containers","core-overlays-popover-popovercontent--scroll-repositioning","core-overlays-popover-popovercontent--with-boundary-axis","core-overlays-popover-popovercontent--with-horizontal-boundary-behavior","core-overlays-popover-popovertrigger--basic","core-overlays-popover-popovertrigger--function-children","core-overlays-popover-popovertrigger--with-updated-position","core-overlays-tooltip--basic","core-overlays-tooltip--controlled-open","core-overlays-tooltip--disabled","core-overlays-tooltip--focus-trigger","core-overlays-tooltip--no-text","core-overlays-tooltip--placement","core-overlays-tooltip--variants","core-overlays-tooltip--variants-size","core-overlays-tooltip--with-cross-offset","core-overlays-tooltip--with-focusable","core-overlays-tooltip--with-offset","core-overlays-tooltip--with-on-open-change","core-status-inlinealert--basic","core-status-inlinealert--compact","core-status-inlinealert--compact-with-action","core-status-inlinealert--compact-with-action-and-close","core-status-inlinealert--multi-line","core-status-inlinealert--multi-line-with-action","core-status-inlinealert--multi-line-with-action-and-close","core-status-inlinealert--sizes","core-status-inlinealert--variants","core-status-inlinealert--with-action","core-status-inlinealert--with-action-and-close","core-status-progressbar--basic","core-status-progressbar--variants","core-status-progressbar--with-custom-number-formatter","core-status-progressbar--with-custom-value-label","core-status-progressbar--with-error","core-status-progressbar--with-max-value","core-status-progressbar--with-min-and-max-value","core-status-progressbar--with-min-value","core-status-progressbar--with-no-description","core-status-progressbar--with-no-label","core-status-progressbar--with-show-value","core-status-progressspinner--error","core-status-progressspinner--primary","core-status-progressspinner--success","core-status-progressspinner--variants","core-status-progressspinner--without-label","core-status-toast--basic","core-status-toast--timeout","core-status-toast--variants-with-action","core-status-toast--variants-without-action","core-status-toast--with-action","core-utilities-actionable--basic","core-utilities-actionable--disabled","core-utilities-actionable--with-complex-content","core-utilities-actionable--with-div","core-utilities-actionable--with-dynamic-button-styling","core-utilities-actionable--with-dynamic-child-styling","core-utilities-box--basic","core-utilities-box--element-type","core-utilities-box--flex-layout","core-utilities-box--media-queries","core-utilities-box--nested-boxes","core-utilities-dateformat--basic","core-utilities-dateformat--time-only","core-utilities-dateformat--time-only-with-time-zone","core-utilities-dateformat--time-zone-24-hour","core-utilities-dateformat--with-date-and-time","core-utilities-deviceprovider--always-desktop","core-utilities-deviceprovider--always-mobile","core-utilities-deviceprovider--basic","core-utilities-deviceprovider--custom-breakpoints","core-utilities-frameprovider--always-contained","core-utilities-frameprovider--basic","core-utilities-frameprovider--custom-portal-container","core-utilities-frameprovider--inside-shadow-root","core-utilities-frameprovider--nested-containers","core-utilities-frameprovider--never-contained","core-utilities-frameprovider--popover-with-frame-boundary","core-utilities-frameprovider--portal-container-outside-container","core-utilities-frameprovider--with-interactive-elements-outside-of-container","core-utilities-group--basic","core-utilities-i18nprovider--string-format","core-utilities-messageformat--basic","core-utilities-numberformat--basic","core-utilities-numberformat--currency","core-utilities-numberformat--currency-with-fraction-digits","core-utilities-numberformat--currency-with-fraction-digits-and-currency-display","core-utilities-numberformat--percent","core-utilities-numberformat--percent-with-fraction-digits","core-utilities-panel--basic","core-utilities-panel--collapsible","core-utilities-panel--conditional","core-utilities-panel--controlled","core-utilities-panel--disabled-handle","core-utilities-panel--max-size","core-utilities-panel--multiple","core-utilities-panel--nested","core-utilities-panel--persistent","core-utilities-panel--vertical","core-utilities-portal--basic","core-utilities-themeprovider--basic","json-render-examples--dashboard","json-render-examples--data-table","json-render-examples--login-form","json-render-examples--settings-panel"];var h={version:"3.5.0"};var b=`
41195
+ * [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var m={"8":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","ChevronRightFilledIcon","ChevronRightIcon","EllipseIcon","MinusIcon","PlusIcon","XIcon"],"12":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","EditIcon","EllipseIcon","EnterKeyIcon","LockFilledIcon","LockIcon","MinusIcon","MoreVIcon","MoreIcon","PlaceholderIcon","PlusIcon","SearchIcon","SizeIcon","TrashIcon","XIcon","ZoomIcon"],"16":["AlignBottomIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDiagonalTopLeftBottomRightIcon","ArrowDownCircleFilledIcon","ArrowDownIcon","ArrowIcon","ArrowLeftRightIcon","ArrowRightIcon","ArrowUpArrowDownIcon","ArrowUpIcon","AtIcon","AttachmentsIcon","AvatarIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BulletListIcon","CalendarIcon","CaretLeftIcon","CaretRightIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","CircleFilledIcon","ClockIcon","CopyIcon","CustomizeIcon","DocumentEditIcon","DownloadIcon","DuplicateIcon","EditIcon","ElipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FilterAltIcon","FolderIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FullScreenIcon","HelpCircleIcon","HelpIcon","HereIcon","HideIcon","HighlightTextAltIcon","HighlightTextIcon","HorizontalScrollIcon","ImageIcon","InfoCircleFilledIcon","InsertIcon","ItalicIcon","LightBulbIcon","LineIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MeasureIcon","MinusIcon","MoreIcon","MoreVerticalIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","NumberedListIcon","OpenIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageVerticalScrollIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PlaceholderIcon","PlayIcon","PlusIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","ReadOnlyIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedoIcon","RemoveFormattingIcon","ReorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RulerIcon","SearchIcon","SettingsIcon","ShowIcon","SlashCommandsIcon","SoundRecordIcon","StampIcon","StarFilledIcon","StarIcon","StrikeoutTextAltIcon","TableCellIcon","TableColumnIcon","TableHeaderIcon","TableIcon","TableRowIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextDecreaseIndentIcon","TextIcon","TextIncreaseIndentIcon","TextMarkIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UndoIcon","UnlockIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WindowedIcon","WorkflowIcon","XCircleFilledIcon","XIcon"],"20":["AddPageIcon","AnonymousIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpCircleFilledIcon","AtIcon","AvatarFilledIcon","BoldIcon","CalloutIcon","CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ClockIcon","CollapseIcon","CommentIcon","CopyIcon","CutIcon","DistanceIcon","DownloadIcon","DuplicateIcon","EditIcon","EllipseIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorAlternativeCircleIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FormDateIcon","FormSignatureIcon","FormTextFieldIcon","HelpCircleIcon","HighlightTextIcon","HomeIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","ItalicIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MinusIcon","MoreIcon","MoreVerticalIcon","MoveIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OpenIcon","PageMoveLeftIcon","PageMoveRightIcon","PagesInsertIcon","PasteIcon","PipetteIcon","PlusIcon","PrintIcon","RotateClockwiseIcon","SearchIcon","SettingsIcon","ShapeIcon","ShareIcon","SoundIcon","SoundRecordIcon","StarFilledIcon","StarIcon","StyleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UploadIcon","WarningFilledIcon","WarningIcon","XCircleFilledIcon","XCircleIcon","XIcon"],"24":["AddNoteCloudIcon","AddNoteIcon","AddTextSerifIcon","AiIcon","AirplaneIcon","AlignBottomIcon","AlignHorizontalCenterIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDownIcon","ArrowIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","AtIcon","AttachmentIcon","AvatarFilledIcon","AvatarIcon","BlendModeIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BorderColorIcon","BottomBorderIcon","BulletListIcon","CalibrateIcon","CaptureAddIcon","CaretDownIcon","CaretIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ChevronListIcon","ClockIcon","CloudyBorderIcon","CollapseIcon","ColorPaletteIcon","ColorSwatchIcon","CommentIcon","CommentInSidebarIcon","CommentOnPageIcon","CompareDocumentsIcon","CopyIcon","CopyPageIcon","CropIcon","CustomizeIcon","CutIcon","DateModifiedIcon","DatePlusIcon","DebugIcon","DocumentArrowDownCircleIcon","DocumentArrowDownIcon","DocumentArrowRightIcon","DocumentFilledIcon","DocumentLockIcon","DocumentPdfIcon","DownloadIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","DuplicateIcon","EditAnnotationsIcon","EditContentIcon","EditDocumentIcon","EditIcon","EditThumbnailsIcon","EllipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","EndCapArrowFilledIcon","EndCapArrowIcon","EndCapChevronFilledIcon","EndCapChevronIcon","EndCapCircleIcon","EndCapDiamondIcon","EndCapNoneIcon","EndCapSlantedIcon","EndCapSquareIcon","EndCapStraightIcon","EraserIcon","ErrorAltCircleFilledIcon","ErrorAltIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","ExpandVerticalIcon","FillColorIcon","FilterIcon","FitToHeightIcon","FivePagesHorizontalFilledIcon","FivePagesVerticalFilledIcon","FolderAddIcon","FolderIcon","FontListIcon","FontSizeIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormPageIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FormTwoRadioButtonsIcon","FourPagesGridFilledIcon","FourPagesHorizontalFilledIcon","FourPagesStackedFilledIcon","FourPagesVerticalFilledIcon","GroupIcon","HamburgerMenuIcon","HandIcon","HeartIcon","HideIcon","HideRevealIcon","HighlightTextIcon","HomeIcon","HorizontalScollIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","InitialsIcon","InnerHorizontalBorderIcon","InnerVerticalBorderIcon","InsertIcon","ItalicIcon","LayerBottomIcon","LayerDownIcon","LayerTopIcon","LayerUpIcon","LayersIcon","LeftBindingIcon","LeftBorderIcon","LineCapsIcon","LineIcon","LineSpacingIcon","LineStyleCloudyIcon","LineStyleDashedDoubleDashIcon","LineStyleDashedDoubleGapIcon","LineStyleDashedQuadrupleDashIcon","LineStyleDashedSingleGapIcon","LineStyleIcon","LineStyleSolidIcon","LineWidthIcon","LinkIcon","LockFilledIcon","LockIcon","MagicIcon","MagicPenIcon","MailIcon","MarkupIcon","MarqueeZoomIcon","MeasureIcon","MergeIcon","MessageCloudIcon","MinusIcon","MoonIcon","MoreCircleIcon","MoreIcon","MoreVerticalIcon","MoveAllDirectionsIcon","MoveLeftIcon","MoveLeftRightIcon","MoveRightIcon","MultiplePagesIcon","NonEditableIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OcrIcon","OpacityIcon","PageAddIcon","PageCurlIcon","PageDuplicateIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLandscapeIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageMoveLeftIcon","PageMoveRightIcon","PageNumberCircleIcon","PageNumberIcon","PagePortraitIcon","PageRemoveIcon","PageVerticalScrollIcon","PagesInsertAltIcon","PagesInsertIcon","PagesNewFromSelectionAltIcon","PagesNewFromSelectionIcon","PagesSelectAllIcon","PagesSelectNoneIcon","PasteBoardIcon","PastePageIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PinDropFilledIcon","PinDropIcon","PipetteIcon","PlayIcon","PlusCircleFilledIcon","PlusCircleIcon","PlusIcon","PointerIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","PrecisionIcon","PrintIcon","PrivateModeIcon","PushPinIcon","QuestionmarkCircleIcon","ReaderViewIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedactIcon","RedactRectangleIcon","RedactTextHighlighterIcon","RedactionTextRepeatingIcon","RedactionTextSingleIcon","RedoAllIcon","RedoIcon","RegexIcon","ReplaceIcon","RightBindingIcon","RightBorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RotateObjectClockwiseIcon","RotateObjectCounterClockwiseIcon","RulerIcon","ScaleIcon","SearchCircleIcon","SearchIcon","SearchSelectionIcon","SelectAllIcon","SelectionToolIcon","SettingsIcon","ShapesIcon","ShareAltIcon","ShareIcon","ShieldAddIcon","ShieldCheckmarkIcon","ShieldWarningIcon","ShieldXIcon","ShowIcon","SidebarIcon","SignOutIcon","SignatureDigitalIcon","SignatureIcon","SinglePageFilledIcon","SoundIcon","SquigglyTextIcon","StampAddIcon","StampIcon","StarFilledIcon","StarIcon","StartCapArrowFilledIcon","StartCapArrowIcon","StartCapChevronFilledIcon","StartCapChevronIcon","StartCapCircleIcon","StartCapDiamondIcon","StartCapNoneIcon","StartCapSlantedIcon","StartCapSquareIcon","StartCapStraightIcon","StrikeoutTextIcon","StyleFilledIcon","StyleIcon","StylusFilledIcon","StylusIcon","SunIcon","TableCellIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextColorIcon","TextIcon","TextPropertiesHideIcon","TextPropertiesShowIcon","TextSerifIcon","TextSmallerIcon","ThreePagesHorizontalFilledIcon","ThreePagesStackedFilledIcon","ThreePagesVerticalFilledIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TopBorderIcon","TrashIcon","TwoPagesHorizontalFilledIcon","TwoPagesVerticalFilledIcon","TypeTextIcon","UnderlineIcon","UnderlineTextIcon","UndoAllIcon","UndoIcon","UndoRedoIcon","UngroupIcon","UnlockIcon","UploadIcon","UserIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WidgetIcon","WorkflowIcon","XCircleFilledIcon","XCircleIcon","XIcon","ZoomInIcon","ZoomOutIcon"],"36":["ArrowRight","Check","Circle","Cross","Help","Inset","Key","NewParagraphAlt","NewParagraph","Note","PointerRight","SpeechBubble","Star"]};var r=["charts-barchart--basic","charts-barchart--custom-colors","charts-barchart--formatted","charts-barchart--hidden-axes","charts-barchart--many-series","charts-barchart--mixed-stacking","charts-barchart--single-series","charts-barchart--stacked","charts-barchart--stacked-with-three-series","charts-barchart--thicker-bars","charts-barchart--with-legend","charts-linechart--basic","charts-linechart--custom-colors","charts-linechart--formatted","charts-linechart--hidden-axes","charts-linechart--linear-curve","charts-linechart--many-lines","charts-linechart--single-line","charts-linechart--sparkline","charts-linechart--with-dots","charts-linechart--with-legend","charts-piechart--basic","charts-piechart--custom-colors","charts-piechart--donut","charts-piechart--long-legend-names","charts-piechart--many-slices","charts-piechart--no-labels","charts-piechart--no-legend","charts-piechart--no-tooltip","charts-piechart--small-slices-below-five-percent","core-buttons-actionbutton--as-div","core-buttons-actionbutton--basic","core-buttons-actionbutton--disabled","core-buttons-actionbutton--variants","core-buttons-actionbutton--with-both-icons","core-buttons-actionbutton--with-icon","core-buttons-actionbutton--with-popover","core-buttons-actiongroup--basic","core-buttons-actiongroup--default-selected","core-buttons-actiongroup--disabled","core-buttons-actiongroup--disabled-items","core-buttons-actiongroup--disabled-items-multi-select","core-buttons-actiongroup--disabled-with-selection","core-buttons-actiongroup--multi-select","core-buttons-actiongroup--multiple-default-selected","core-buttons-actiongroup--multiple-selected-items","core-buttons-actiongroup--single-item","core-buttons-actiongroup--single-select","core-buttons-actiongroup--with-custom-action-item","core-buttons-actiongroup--with-icon","core-buttons-actiongroup--with-icon-disabled","core-buttons-actiongroup--with-icon-multi-select","core-buttons-actiongroup--without-tooltip","core-buttons-actioniconbutton--basic","core-buttons-actioniconbutton--disabled","core-buttons-actioniconbutton--variants","core-buttons-actioniconbutton--with-popover","core-buttons-actioniconbutton--with-tooltip","core-buttons-reaction--basic","core-buttons-reaction--disabled","core-buttons-reaction--read-only","core-buttons-reaction--selected","core-buttons-reaction--variants","core-buttons-scrollcontrolbutton--basic","core-buttons-scrollcontrolbutton--hide-for-keyboard","core-buttons-scrollcontrolbutton--with-custom-delay","core-buttons-scrollcontrolbutton--with-reversed-items","core-buttons-scrollcontrolbutton--without-smooth-scroll","core-buttons-togglebutton--basic","core-buttons-togglebutton--controlled","core-buttons-togglebutton--default-selected","core-buttons-togglebutton--disabled","core-buttons-togglebutton--variants","core-buttons-togglebutton--with-icon","core-buttons-toggleiconbutton--basic","core-buttons-toggleiconbutton--primary-variants","core-buttons-toggleiconbutton--secondary-variants","core-buttons-toggleiconbutton--state-specific-icons","core-buttons-toggleiconbutton--teritary-variants","core-buttons-toggleiconbutton--toolbar-variants","core-buttons-toggleiconbutton--with-tooltip","core-collections-filelist--basic","core-collections-filelist--disabled","core-collections-filelist--disabled-items","core-collections-filelist--expanded","core-collections-filelist--expanded-disabled","core-collections-filelist--grid","core-collections-filelist--loading","core-collections-filelist--long-filename","core-collections-filelist--many-expanded","core-collections-filelist--many-grid","core-collections-filelist--many-items","core-collections-filelist--mixed-states","core-collections-filelist--with-error","core-collections-gridlist--basic","core-collections-gridlist--default-selected-keys","core-collections-gridlist--disabled","core-collections-gridlist--disabled-rows","core-collections-gridlist--disallow-empty-selection","core-collections-gridlist--with-drag-and-drop","core-collections-gridlist--with-multiple-selection","core-collections-gridlist--with-single-selection","core-collections-imagegallery--basic","core-collections-imagegallery--more-items","core-collections-imagegallery--rtl-with-virtualization","core-collections-imagegallery--scrollable","core-collections-imagegallery--with-controlled-list","core-collections-imagegallery--with-custom-aspect-ratio","core-collections-imagegallery--with-custom-fit","core-collections-imagegallery--with-custom-image-dimensions","core-collections-imagegallery--with-custom-image-renderer","core-collections-imagegallery--with-custom-size","core-collections-imagegallery--with-deletion","core-collections-imagegallery--with-disabled-deletion","core-collections-imagegallery--with-dynamic-list","core-collections-imagegallery--with-long-labels","core-collections-imagegallery--with-medium-size","core-collections-imagegallery--with-multiple-selection","core-collections-imagegallery--with-reordering","core-collections-imagegallery--with-single-selection","core-collections-imagegallery--with-single-selection-and-deletion","core-collections-imagegallery--with-virtualization","core-collections-listbox--basic","core-collections-listbox--controlled-auto-scroll","core-collections-listbox--drag-and-drop-custom-preview","core-collections-listbox--drag-and-drop-grid","core-collections-listbox--drag-and-drop-horizontal","core-collections-listbox--drag-and-drop-multiple","core-collections-listbox--drag-and-drop-single","core-collections-listbox--dynamic-items","core-collections-listbox--with-custom-option-style","core-collections-listbox--with-customized-section-titles","core-collections-listbox--with-default-selected","core-collections-listbox--with-disabled-items","core-collections-listbox--with-focus-loop","core-collections-listbox--with-padded-section-titles","core-collections-listbox--with-section-titles","core-collections-listbox--with-sections","core-collections-listbox--with-selected","core-collections-menu--basic","core-collections-menu--controlled-open","core-collections-menu--disabled","core-collections-menu--long-menu","core-collections-menu--multiple-selection","core-collections-menu--section-level-selection","core-collections-menu--single-selection","core-collections-menu--with-custom-options","core-collections-menu--with-custom-trigger","core-collections-menu--with-disabled-keys","core-collections-menu--with-disabled-submenu","core-collections-menu--with-icons","core-collections-menu--with-long-labels","core-collections-menu--with-sections","core-collections-menu--with-selected-keys-controlled","core-collections-menu--with-submenu","core-collections-table--async-loading","core-collections-table--default","core-collections-table--disabled-rows","core-collections-table--drag-and-drop","core-collections-table--empty","core-collections-table--long-text-content","core-collections-table--multiple-selection","core-collections-table--row-action","core-collections-table--selection-with-row-action","core-collections-table--single-selection","core-collections-table--sorting","core-collections-table--virtualized","core-collections-table--with-tag-and-menu","core-collections-table--with-toolbar","core-collections-taggroup--basic","core-collections-taggroup--disabled","core-collections-taggroup--disabled-items","core-collections-taggroup--group-variants","core-collections-taggroup--multi-select","core-collections-taggroup--removable","core-collections-taggroup--single-select","core-collections-taggroup--small-variants","core-collections-taggroup--variants","core-collections-treeview--basic","core-collections-treeview--custom-row","core-collections-treeview--custom-row-drag-and-drop","core-collections-treeview--deeply-nested","core-collections-treeview--drag-and-drop","core-collections-treeview--empty-tree","core-collections-treeview--flat-tree","core-collections-treeview--handle-only-drag-and-drop","core-collections-treeview--interactive-fields-drag-and-drop","core-collections-treeview--long-labels","core-collections-treeview--single-item","core-collections-treeview--virtualized-drag-and-drop","core-collections-treeview--virtualized-with-actions","core-collections-treeview--virtualized-with-descriptions","core-collections-treeview--virtualized-with-expand-control","core-collections-treeview--virtualized-with-rename","core-collections-treeview--with-actions-at-end","core-collections-treeview--with-controlled-expanded-keys","core-collections-treeview--with-custom-render-icons","core-collections-treeview--with-custom-render-item-title","core-collections-treeview--with-default-expanded-keys","core-collections-treeview--with-description","core-collections-treeview--with-icons","core-collections-treeview--with-primary-action","core-collections-treeview--with-primary-and-secondary-action","core-collections-treeview--with-primary-secondary-and-description-action","core-collections-treeview--with-rename","core-collections-treeview--with-selected-items","core-collections-treeview--with-virtualization","core-collections-unsafe-listbox--basic","core-collections-unsafe-listbox--controlled-auto-scroll","core-collections-unsafe-listbox--drag-and-drop-custom-preview","core-collections-unsafe-listbox--drag-and-drop-grid","core-collections-unsafe-listbox--drag-and-drop-horizontal","core-collections-unsafe-listbox--drag-and-drop-multiple","core-collections-unsafe-listbox--drag-and-drop-single","core-collections-unsafe-listbox--dynamic-items","core-collections-unsafe-listbox--virtualized-horizontal","core-collections-unsafe-listbox--virtualized-scroll-into-view","core-collections-unsafe-listbox--virtualized-vertical","core-collections-unsafe-listbox--virtualized-with-section-separators","core-collections-unsafe-listbox--virtualized-with-sections","core-collections-unsafe-listbox--with-custom-option-style","core-collections-unsafe-listbox--with-customized-section-titles","core-collections-unsafe-listbox--with-default-selected","core-collections-unsafe-listbox--with-disabled-items","core-collections-unsafe-listbox--with-focus-loop","core-collections-unsafe-listbox--with-padded-section-titles","core-collections-unsafe-listbox--with-section-titles","core-collections-unsafe-listbox--with-sections","core-collections-unsafe-listbox--with-selected","core-collections-virtualizer--grid-layout-example","core-collections-virtualizer--list-layout-example","core-collections-virtualizer--rtl-image-gallery-preset-example","core-collections-virtualizer--tree-view-preset-example","core-content-avatar--basic","core-content-avatar--disabled","core-content-avatar--variants","core-content-avatar--with-image","core-content-avatar--with-initials","core-content-avatar--with-notification","core-content-code--basic","core-content-code--with-scroll","core-content-colorswatch--basic","core-content-colorswatch--disabled","core-content-colorswatch--full-transparency","core-content-colorswatch--indeterminate","core-content-colorswatch--interactive","core-content-colorswatch--none","core-content-colorswatch--variants","core-content-colorswatch--with-custom-label","core-content-colorswatch--with-tooltip","core-content-colorswatch--with-transparency","core-content-image--basic","core-content-image--contain","core-content-image--fallback","core-content-kbd--common-shortcuts","core-content-kbd--complex-shortcut","core-content-kbd--key-combination","core-content-kbd--key-combination-with-symbols","core-content-kbd--modifier-key","core-content-kbd--single-key","core-content-kbd--symbols-showcase","core-content-markdown--basic","core-content-markdown--with-caret","core-content-pointpicker--basic","core-content-pointpicker--disabled","core-content-pointpicker-pointpickercontent--custom-cursor","core-content-pointpicker-pointpickercontent--custom-cursor-without-default","core-content-pointpicker-pointpickercontent--default","core-content-pointpicker-pointpickercontent--multiple-point-pickers","core-content-pointpicker-pointpickercontent--points-within-radius","core-content-pointpicker-pointpickercontent--programmatic-focus","core-content-pointpicker-pointpickercontent--snap-to-point","core-content-pointpicker-pointpickercontent--trailing-element","core-content-pointpicker-pointpickercontent--without-grid-lines","core-content-pointpicker-pointpickerdisplay--with-custom-scale","core-content-pointpicker-pointpickerdisplay--with-description","core-content-pointpicker-pointpickerdisplay--with-floating-display","core-content-preview--disabled","core-content-preview--image-preview","core-content-preview--svg-preview","core-content-preview--text-preview","core-content-preview--variants","core-content-preview--without-delete-button","core-content-separator--basic","core-content-separator--secondary","core-content-separator--secondary-vertical","core-content-separator--vertical","core-content-statuscard--basic","core-content-statuscard--interactive","core-content-statuscard--long-content","core-content-statuscard--truncated-title","core-content-statuscard--variants","core-content-statuscard--with-custom-icon","core-content-statuscard--with-trailing-element","core-content-statuscard--without-description","core-content-tag--basic","core-content-tag--disabled","core-content-tag--disabled-removable","core-content-tag--inline-content","core-content-tag--long-text","core-content-tag--removable","core-content-tag--selected","core-content-tag--selected-with-icon","core-content-tag--small","core-content-tag--small-with-icon","core-content-tag--with-icon","core-content-text--basic","core-content-text--slots","core-content-text--variants","core-feedback-skeleton--circle","core-feedback-skeleton--composed-example","core-feedback-skeleton--custom-shape","core-feedback-skeleton--document-view-area","core-feedback-skeleton--rectangle","core-feedback-skeleton--text-line","core-forms-buttonselect--basic","core-forms-buttonselect--controlled","core-forms-buttonselect--controlled-button-selection","core-forms-buttonselect--default-button-selected-value","core-forms-buttonselect--default-select-selected-value","core-forms-buttonselect--disabled","core-forms-buttonselect--exclude-from-tab-order","core-forms-buttonselect--items-without-icons","core-forms-buttonselect--long-text-labels","core-forms-buttonselect--many-items","core-forms-buttonselect--variants","core-forms-buttonselect--with-action-behaviour","core-forms-buttonselect--with-button-disabled-key","core-forms-buttonselect--with-callbacks","core-forms-buttonselect--with-default-open","core-forms-buttonselect--with-disabled-keys","core-forms-buttonselect--with-disabled-keys-and-default-selected","core-forms-buttonselect--with-hidden-label","core-forms-buttonselect--with-individual-button-behaviour","core-forms-buttonselect--with-multiple-disabled-keys","core-forms-buttonselect--with-validation-error","core-forms-buttonselect--without-tooltip","core-forms-calendar--default","core-forms-calendar--disabled","core-forms-calendar--extra-small","core-forms-calendar--extra-small-no-title","core-forms-calendar--fixed-weeks","core-forms-calendar--international-calendar","core-forms-calendar--read-only","core-forms-calendar--select-month","core-forms-calendar--select-month-and-year","core-forms-calendar--select-month-and-year-extra-small","core-forms-calendar--select-month-and-year-with-title","core-forms-calendar--select-month-extra-small","core-forms-calendar--select-month-with-title","core-forms-calendar--unavailable-dates","core-forms-calendar--with-default-value","core-forms-calendar--with-min-max","core-forms-calendar--with-title","core-forms-checkbox--checked","core-forms-checkbox--indeterminate","core-forms-checkbox--primary","core-forms-checkbox--with-error","core-forms-checkbox--with-label-at-end","core-forms-checkbox--with-label-at-start","core-forms-colorinput--basic","core-forms-colorinput--color-presets-only","core-forms-colorinput--controlled","core-forms-colorinput--disabled","core-forms-colorinput--indeterminate","core-forms-colorinput--lazy-picker","core-forms-colorinput--lazy-picker-mobile","core-forms-colorinput--with-alpha","core-forms-colorinput--with-controlled-open","core-forms-colorinput--with-custom-trigger","core-forms-colorinput--with-default-open","core-forms-colorinput--with-default-value","core-forms-colorinput--with-label","core-forms-colorinput--with-label-at-start","core-forms-colorinput--with-removal","core-forms-colorinput--without-alpha","core-forms-colorinput--without-color-label","core-forms-colorinput--without-color-presets","core-forms-colorinput-iconcolorinput--compact","core-forms-colorinput-iconcolorinput--compact-disabled","core-forms-colorinput-iconcolorinput--compact-indeterminate","core-forms-colorinput-iconcolorinput--disabled","core-forms-colorinput-iconcolorinput--indeterminate","core-forms-colorinput-iconcolorinput--standard","core-forms-colorinput-iconcolorinput--without-tooltip","core-forms-colorswatchpicker--basic","core-forms-colorswatchpicker--controlled","core-forms-colorswatchpicker--default-value","core-forms-colorswatchpicker--disabled","core-forms-colorswatchpicker--with-icon","core-forms-colorswatchpicker--with-label","core-forms-colorswatchpicker--with-label-at-start","core-forms-combobox--basic","core-forms-combobox--disabled","core-forms-combobox--dynamic-collections","core-forms-combobox--ghost-variant","core-forms-combobox--items-with-icon","core-forms-combobox--read-only","core-forms-combobox--variants","core-forms-combobox--with-custom-filter","core-forms-combobox--with-custom-number-value","core-forms-combobox--with-custom-value","core-forms-combobox--with-description","core-forms-combobox--with-error-message","core-forms-combobox--with-focus-menu-trigger","core-forms-combobox--with-label-at-start","core-forms-combobox--with-manual-menu-trigger","core-forms-combobox--with-min-max-value","core-forms-combobox--with-render-option","core-forms-combobox--with-tooltip","core-forms-combobox--with-warning-message","core-forms-datefield--basic","core-forms-datefield--controlled","core-forms-datefield--default-value","core-forms-datefield--different-granularity","core-forms-datefield--disabled","core-forms-datefield--ghost-variant","core-forms-datefield--html-forms","core-forms-datefield--placeholder-value","core-forms-datefield--read-only","core-forms-datefield--variants","core-forms-datefield--with-calendar-icon","core-forms-datefield--with-calendar-picker","core-forms-datefield--with-calendar-picker-and-default-value","core-forms-datefield--with-calendar-picker-and-min-max","core-forms-datefield--with-calendar-picker-disabled","core-forms-datefield--with-calendar-picker-error","core-forms-datefield--with-calendar-picker-ghost","core-forms-datefield--with-calendar-picker-read-only","core-forms-datefield--with-error-message","core-forms-datefield--with-error-message-only","core-forms-datefield--with-label","core-forms-datefield--with-label-at-start","core-forms-datefield--with-min-and-max-value","core-forms-datefield--with-warning-message","core-forms-fileinput--basic","core-forms-fileinput--custom-labels","core-forms-fileinput--directory","core-forms-fileinput--disabled","core-forms-fileinput--label-position-start","core-forms-fileinput--multiple","core-forms-fileinput--variants","core-forms-fileinput--with-error","core-forms-fileinput--with-warning","core-forms-fileinput--without-label","core-forms-fileuploader--button-variant","core-forms-fileuploader--compact","core-forms-fileuploader--default","core-forms-fileuploader--disabled","core-forms-fileuploader--error-dropzone","core-forms-fileuploader--inline","core-forms-fileuploader--no-label","core-forms-fileuploader--samples-inside-disabled","core-forms-fileuploader--samples-inside-grid","core-forms-fileuploader--samples-outside","core-forms-fileuploader--variants","core-forms-imagedropzone--basic","core-forms-imagedropzone--controlled","core-forms-imagedropzone--disabled","core-forms-imagedropzone--variants","core-forms-imagedropzone--with-default-image","core-forms-imagedropzone--with-file-size-limit","core-forms-imagedropzone--with-file-type-restriction","core-forms-numberinput--basic","core-forms-numberinput--controlled","core-forms-numberinput--disabled","core-forms-numberinput--ghost-variant","core-forms-numberinput--read-only","core-forms-numberinput--variants","core-forms-numberinput--with-custom-step","core-forms-numberinput--with-description","core-forms-numberinput--with-error","core-forms-numberinput--with-error-and-error-message","core-forms-numberinput--with-label","core-forms-numberinput--with-label-at-start","core-forms-numberinput--with-min-and-max","core-forms-numberinput--without-stepper","core-forms-pagination--controlled","core-forms-pagination--disabled","core-forms-pagination--primary","core-forms-pagination--read-only","core-forms-pagination--variants","core-forms-pagination--with-custom-messages","core-forms-pagination--with-default-value","core-forms-pagination--with-large-numbers","core-forms-pagination--with-step","core-forms-pagination--without-actions","core-forms-radiogroup--basic","core-forms-radiogroup--controlled","core-forms-radiogroup--custom-render-option","core-forms-radiogroup--default-value","core-forms-radiogroup--disabled","core-forms-radiogroup--disabled-values","core-forms-radiogroup--horizontal","core-forms-radiogroup--read-only","core-forms-radiogroup--with-group-label","core-forms-radiogroup--with-group-label-at-start","core-forms-radiogroup--with-option-description","core-forms-radiogroup--with-option-label-at-start","core-forms-rangecalendar--default","core-forms-rangecalendar--disabled","core-forms-rangecalendar--extra-small","core-forms-rangecalendar--extra-small-no-title","core-forms-rangecalendar--fixed-weeks","core-forms-rangecalendar--international-calendar","core-forms-rangecalendar--read-only","core-forms-rangecalendar--select-month","core-forms-rangecalendar--select-month-and-year","core-forms-rangecalendar--select-month-and-year-with-title","core-forms-rangecalendar--select-month-with-title","core-forms-rangecalendar--unavailable-dates","core-forms-rangecalendar--with-default-value","core-forms-rangecalendar--with-min-max","core-forms-rangecalendar--with-title","core-forms-searchinput--basic","core-forms-searchinput--clear-button-focusable","core-forms-searchinput--disabled","core-forms-searchinput--variants","core-forms-select--basic","core-forms-select--controlled","core-forms-select--empty-items","core-forms-select--ghost","core-forms-select--long-labels","core-forms-select--long-list","core-forms-select--read-only","core-forms-select--scrollable","core-forms-select--with-autocomplete","core-forms-select--with-controlled-open","core-forms-select--with-custom-trigger","core-forms-select--with-default-open","core-forms-select--with-default-selected-item","core-forms-select--with-description","core-forms-select--with-disabled","core-forms-select--with-disabled-items","core-forms-select--with-error","core-forms-select--with-error-and-error-message","core-forms-select--with-label","core-forms-select--with-label-at-start","core-forms-select--with-section-headers","core-forms-select--with-sections","core-forms-select--with-virtualized-section-headers","core-forms-select--with-warning","core-forms-select--with-warning-and-warning-message","core-forms-select-iconselect--basic","core-forms-select-iconselect--disabled","core-forms-select-iconselect--read-only","core-forms-select-iconselect--with-default-open","core-forms-select-iconselect--with-error","core-forms-select-iconselect--with-warning","core-forms-select-iconselect--without-icon","core-forms-select-iconselect--without-tooltip","core-forms-select-multiselect--basic","core-forms-select-multiselect--controlled","core-forms-select-multiselect--ghost","core-forms-select-multiselect--hide-clear","core-forms-select-multiselect--hide-select-all","core-forms-select-multiselect--hide-select-all-and-clear","core-forms-select-multiselect--long-labels-as-tags","core-forms-select-multiselect--long-list","core-forms-select-multiselect--max-count-1","core-forms-select-multiselect--max-count-3","core-forms-select-multiselect--read-only","core-forms-select-multiselect--read-only-with-tags-open","core-forms-select-multiselect--scrollable","core-forms-select-multiselect--with-autocomplete","core-forms-select-multiselect--with-controlled-open","core-forms-select-multiselect--with-custom-trigger","core-forms-select-multiselect--with-default-open","core-forms-select-multiselect--with-default-selected-item","core-forms-select-multiselect--with-description","core-forms-select-multiselect--with-disabled","core-forms-select-multiselect--with-disabled-items","core-forms-select-multiselect--with-error","core-forms-select-multiselect--with-error-and-error-message","core-forms-select-multiselect--with-error-and-tags","core-forms-select-multiselect--with-label","core-forms-select-multiselect--with-label-at-start","core-forms-select-multiselect--with-sections","core-forms-select-multiselect--with-warning","core-forms-select-multiselect--with-warning-and-warning-message","core-forms-slider--basic","core-forms-slider--controlled","core-forms-slider--disabled","core-forms-slider--read-only","core-forms-slider--read-only-with-number-input","core-forms-slider--with-description","core-forms-slider--with-label","core-forms-slider--with-label-and-number-input","core-forms-slider--with-min-and-max","core-forms-slider--with-number-input","core-forms-slider--with-step","core-forms-slider-iconslider--basic","core-forms-slider-iconslider--disabled","core-forms-slider-iconslider--with-number-input","core-forms-slider-iconslider--without-tooltip","core-forms-switch--basic","core-forms-switch--disabled","core-forms-switch--selected","core-forms-switch--selected-disabled","core-forms-switch--with-description","core-forms-switch--with-description-disabled","core-forms-switch--with-description-in-left-and-status","core-forms-switch--with-description-in-left-long-label","core-forms-switch--with-description-on-top","core-forms-switch--with-label","core-forms-switch--with-label-and-status","core-forms-switch--with-label-in-left-and-status","core-forms-switch--with-label-in-left-and-status-disabled","core-forms-taggedpagination--basic","core-forms-taggedpagination--disabled","core-forms-taggedpagination--disabled-steppers","core-forms-taggedpagination--read-only","core-forms-taggedpagination--variant","core-forms-taggedpagination--with-page-label","core-forms-textinput--basic","core-forms-textinput--controlled","core-forms-textinput--disabled","core-forms-textinput--focusing-the-input","core-forms-textinput--ghost-variant","core-forms-textinput--html-forms","core-forms-textinput--multiline","core-forms-textinput--multiline-variants","core-forms-textinput--multiline-with-rows","core-forms-textinput--read-only","core-forms-textinput--variants","core-forms-textinput--with-description","core-forms-textinput--with-error-message","core-forms-textinput--with-label","core-forms-textinput--with-label-at-start","core-forms-textinput--with-warning-message","core-forms-timefield--basic","core-forms-timefield--controlled","core-forms-timefield--default-value","core-forms-timefield--disabled","core-forms-timefield--ghost-variant","core-forms-timefield--html-forms","core-forms-timefield--placeholder-value","core-forms-timefield--read-only","core-forms-timefield--variants","core-forms-timefield--with-error-message","core-forms-timefield--with-error-message-only","core-forms-timefield--with-label","core-forms-timefield--with-label-at-start","core-forms-timefield--with-min-and-max-value","core-forms-timefield--with-warning-message","core-media-audioplayer--basic","core-media-audioplayer--small","core-miscellaneous-editor--basic","core-miscellaneous-editor--headless-clipboard-hooks","core-miscellaneous-editor--headless-custom","core-miscellaneous-editor--headless-document-model","core-miscellaneous-editor--headless-max-length","core-miscellaneous-editor--headless-paragraphs","core-miscellaneous-editor--headless-styles","core-miscellaneous-editor-plain--auto-focus","core-miscellaneous-editor-plain--auto-focus-at-end","core-miscellaneous-editor-plain--auto-focus-at-start","core-miscellaneous-editor-plain--clear-on-cancel","core-miscellaneous-editor-plain--clear-on-save","core-miscellaneous-editor-plain--controlled","core-miscellaneous-editor-plain--custom-submit-icon","core-miscellaneous-editor-plain--default-save-disabled","core-miscellaneous-editor-plain--disabled","core-miscellaneous-editor-plain--minimal","core-miscellaneous-editor-plain--minimal-disabled","core-miscellaneous-editor-plain--minimal-multiline","core-miscellaneous-editor-plain--minimal-save-disabled","core-miscellaneous-editor-plain--not-inline","core-miscellaneous-editor-plain--save-on-enter","core-miscellaneous-editor-plain--variants","core-miscellaneous-editor-plain--with-cancel","core-miscellaneous-editor-plain--with-dynamic-caret-position","core-miscellaneous-editor-rich-text--auto-focus","core-miscellaneous-editor-rich-text--auto-focus-at-end","core-miscellaneous-editor-rich-text--clear-on-cancel","core-miscellaneous-editor-rich-text--clear-on-save","core-miscellaneous-editor-rich-text--controlled","core-miscellaneous-editor-rich-text--default","core-miscellaneous-editor-rich-text--disabled","core-miscellaneous-editor-rich-text--long-content","core-miscellaneous-editor-rich-text--mentions","core-miscellaneous-editor-rich-text--mentions-max-suggestions","core-miscellaneous-editor-rich-text--not-inline","core-miscellaneous-editor-rich-text--save-disabled","core-miscellaneous-editor-rich-text--save-on-enter","core-miscellaneous-editor-rich-text--variants","core-miscellaneous-editor-rich-text--with-cancel","core-miscellaneous-editor-rich-text--with-custom-footer-buttons","core-miscellaneous-editor-rich-text--with-placeholder","core-miscellaneous-freehandcanvas--basic","core-miscellaneous-freehandcanvas--clear-button","core-miscellaneous-freehandcanvas--controlled","core-miscellaneous-freehandcanvas--default-value","core-miscellaneous-freehandcanvas--disabled","core-miscellaneous-freehandcanvas--history-enabled","core-miscellaneous-freehandcanvas--label","core-miscellaneous-freehandcanvas--streamlining","core-miscellaneous-icon--basic","core-miscellaneous-toolbar--basic","core-miscellaneous-toolbar--collapsible","core-miscellaneous-toolbar--vertical","core-miscellaneous-toolbar--with-inputs","core-miscellaneous-toolbar--with-over-flow","core-miscellaneous-toolbar--with-tabbing-within","core-miscellaneous-toolbar--with-tooltip","core-navigation-accordion--basic","core-navigation-accordion--controlled","core-navigation-accordion--default-expanded-keys","core-navigation-accordion--disabled","core-navigation-accordion--single-expansion","core-navigation-accordion-accordionitem--force-mount","core-navigation-accordion-accordionitem--show-actions-on-trigger-only","core-navigation-accordion-accordionitem--with-buttons","core-navigation-accordion-accordionitem--with-sub-labels","core-navigation-accordion-accordionitem--with-tabbable-content","core-navigation-breadcrumbs--basic","core-navigation-breadcrumbs--collapsed","core-navigation-breadcrumbs--custom-separator","core-navigation-breadcrumbs--disabled","core-navigation-breadcrumbs--variants","core-navigation-breadcrumbs--with-icons","core-navigation-breadcrumbs--with-select","core-navigation-disclosure--basic","core-navigation-disclosure--controlled","core-navigation-disclosure--truncated-title","core-navigation-disclosure--variants","core-navigation-disclosure--with-custom-icon","core-navigation-disclosure--with-interactive-content","core-navigation-disclosure--with-long-content","core-navigation-disclosure--without-description","core-navigation-link--basic","core-navigation-link--client-side-action","core-navigation-link--variants","core-navigation-stepper--all-complete","core-navigation-stepper--all-states","core-navigation-stepper--condensed","core-navigation-stepper--controlled","core-navigation-stepper--default","core-navigation-stepper--expanded-without-descriptions","core-navigation-stepper--frontier-ahead-of-selection","core-navigation-stepper--indicator-only","core-navigation-stepper--indicator-only-expanded","core-navigation-stepper--is-disabled","core-navigation-stepper--long-title-and-description","core-navigation-stepper--mixed-indicator-and-titled-items","core-navigation-stepper--per-item-aria-label-overrides-title","core-navigation-stepper--single-item","core-navigation-stepper--size-small-condensed","core-navigation-stepper--size-small-expanded","core-navigation-stepper--two-steps","core-navigation-stepper--with-disabled-completed-step","core-navigation-stepper--with-disabled-step","core-navigation-tabs--basic","core-navigation-tabs--controlled","core-navigation-tabs--ghost","core-navigation-tabs--with-action-button","core-navigation-tabs--with-close-button","core-navigation-tabs--with-default-selected","core-navigation-tabs--with-disabled","core-navigation-tabs--with-disabled-and-close-button","core-navigation-tabs--with-focusable-content","core-navigation-tabs--with-specific-disabled","core-navigation-tabs-tabitem--with-icon","core-overlays-alertdialog--auto-focus-cancel-button","core-overlays-alertdialog--basic","core-overlays-alertdialog--custom-focused-button","core-overlays-alertdialog--default-open","core-overlays-alertdialog--long-content","core-overlays-alertdialog--only-cancel-button","core-overlays-alertdialog--only-primary-action","core-overlays-alertdialog--primary-action-disabled","core-overlays-alertdialog--separate-close-handler","core-overlays-alertdialog--with-text-input","core-overlays-alertdialog--with-title-only","core-overlays-alertdialog--without-close-button","core-overlays-alertdialog--without-icon","core-overlays-alertdialog--without-message-and-actions","core-overlays-dialog--basic","core-overlays-dialog--default-open","core-overlays-dialog--different-sizes","core-overlays-dialog--ghost","core-overlays-drawer--basic","core-overlays-drawer--with-action","core-overlays-inlinetoolbar--basic","core-overlays-inlinetoolbar--controlled","core-overlays-inlinetoolbar--disabled","core-overlays-inlinetoolbar--disabled-keys","core-overlays-inlinetoolbar--with-interactive-element","core-overlays-inlinetoolbar--with-scroll","core-overlays-modal--basic","core-overlays-modal--controlled","core-overlays-modal--default-open","core-overlays-modal-modalcontent--disabled-animation","core-overlays-modal-modalcontent--drawer-mobile","core-overlays-modal-modalcontent--drawer-mobile-with-nested-popover","core-overlays-modal-modalcontent--form-controls","core-overlays-modal-modalcontent--long-content","core-overlays-modal-modalcontent--not-dismissable","core-overlays-modal-modalcontent--uncontrolled-interaction-outside","core-overlays-modal-modalcontent--with-disabled-focus-management","core-overlays-modal-modalcontent--with-inert","core-overlays-popover--basic","core-overlays-popover--event-leak-fix","core-overlays-popover--with-arrow","core-overlays-popover--with-boundary-element","core-overlays-popover--with-custom-target","core-overlays-popover--with-dynamic-trigger-width","core-overlays-popover--with-no-boundary","core-overlays-popover--with-scrollable-content","core-overlays-popover--with-scrollable-content-non-modal","core-overlays-popover--with-scrollable-viewport","core-overlays-popover--with-tooltip","core-overlays-popover-popovercontent--basic","core-overlays-popover-popovercontent--contained-focus","core-overlays-popover-popovercontent--default-open-with-arrow","core-overlays-popover-popovercontent--disable-animation","core-overlays-popover-popovercontent--manual-repositioning","core-overlays-popover-popovercontent--nested-scrollable-containers","core-overlays-popover-popovercontent--scroll-repositioning","core-overlays-popover-popovercontent--with-boundary-axis","core-overlays-popover-popovercontent--with-horizontal-boundary-behavior","core-overlays-popover-popovertrigger--basic","core-overlays-popover-popovertrigger--function-children","core-overlays-popover-popovertrigger--with-updated-position","core-overlays-tooltip--basic","core-overlays-tooltip--controlled-open","core-overlays-tooltip--disabled","core-overlays-tooltip--focus-trigger","core-overlays-tooltip--no-text","core-overlays-tooltip--placement","core-overlays-tooltip--variants","core-overlays-tooltip--variants-size","core-overlays-tooltip--with-cross-offset","core-overlays-tooltip--with-focusable","core-overlays-tooltip--with-offset","core-overlays-tooltip--with-on-open-change","core-status-inlinealert--basic","core-status-inlinealert--compact","core-status-inlinealert--compact-with-action","core-status-inlinealert--compact-with-action-and-close","core-status-inlinealert--multi-line","core-status-inlinealert--multi-line-with-action","core-status-inlinealert--multi-line-with-action-and-close","core-status-inlinealert--sizes","core-status-inlinealert--variants","core-status-inlinealert--with-action","core-status-inlinealert--with-action-and-close","core-status-progressbar--basic","core-status-progressbar--variants","core-status-progressbar--with-custom-number-formatter","core-status-progressbar--with-custom-value-label","core-status-progressbar--with-error","core-status-progressbar--with-max-value","core-status-progressbar--with-min-and-max-value","core-status-progressbar--with-min-value","core-status-progressbar--with-no-description","core-status-progressbar--with-no-label","core-status-progressbar--with-show-value","core-status-progressspinner--error","core-status-progressspinner--primary","core-status-progressspinner--success","core-status-progressspinner--variants","core-status-progressspinner--without-label","core-status-toast--basic","core-status-toast--timeout","core-status-toast--variants-with-action","core-status-toast--variants-without-action","core-status-toast--with-action","core-utilities-actionable--basic","core-utilities-actionable--disabled","core-utilities-actionable--with-complex-content","core-utilities-actionable--with-div","core-utilities-actionable--with-dynamic-button-styling","core-utilities-actionable--with-dynamic-child-styling","core-utilities-box--basic","core-utilities-box--element-type","core-utilities-box--flex-layout","core-utilities-box--media-queries","core-utilities-box--nested-boxes","core-utilities-dateformat--basic","core-utilities-dateformat--time-only","core-utilities-dateformat--time-only-with-time-zone","core-utilities-dateformat--time-zone-24-hour","core-utilities-dateformat--with-date-and-time","core-utilities-deviceprovider--always-desktop","core-utilities-deviceprovider--always-mobile","core-utilities-deviceprovider--basic","core-utilities-deviceprovider--custom-breakpoints","core-utilities-frameprovider--always-contained","core-utilities-frameprovider--basic","core-utilities-frameprovider--custom-portal-container","core-utilities-frameprovider--inside-shadow-root","core-utilities-frameprovider--nested-containers","core-utilities-frameprovider--never-contained","core-utilities-frameprovider--popover-with-frame-boundary","core-utilities-frameprovider--portal-container-outside-container","core-utilities-frameprovider--with-interactive-elements-outside-of-container","core-utilities-group--basic","core-utilities-i18nprovider--string-format","core-utilities-messageformat--basic","core-utilities-numberformat--basic","core-utilities-numberformat--currency","core-utilities-numberformat--currency-with-fraction-digits","core-utilities-numberformat--currency-with-fraction-digits-and-currency-display","core-utilities-numberformat--percent","core-utilities-numberformat--percent-with-fraction-digits","core-utilities-panel--basic","core-utilities-panel--collapsible","core-utilities-panel--conditional","core-utilities-panel--controlled","core-utilities-panel--disabled-handle","core-utilities-panel--max-size","core-utilities-panel--multiple","core-utilities-panel--nested","core-utilities-panel--persistent","core-utilities-panel--vertical","core-utilities-portal--basic","core-utilities-themeprovider--basic","json-render-examples--dashboard","json-render-examples--data-table","json-render-examples--login-form","json-render-examples--settings-panel"];var h={version:"3.8.0"};var b=`
39525
41196
  # Baseline UI MCP Server Guidelines
39526
41197
 
39527
41198
  This MCP server provides AI assistants with structured access to Baseline UI's comprehensive component documentation, icon library, theming resources, and design guidelines.
@@ -39572,7 +41243,7 @@ A component can be imported using:
39572
41243
  \`\`\`tsx
39573
41244
  import { ComponentName } from "@baseline-ui/core";
39574
41245
  \`\`\`
39575
- `,c=`
41246
+ `,d=`
39576
41247
  A complete icon library organized by size with import instructions. The icons are organized by size and can be imported using the import statement provided.
39577
41248
 
39578
41249
  An icon can be imported using:
@@ -39628,7 +41299,7 @@ import { ComponentName } from "@baseline-ui/core";
39628
41299
  Generate a live demo URL for a Baseline UI story. Use a story ID from the Storybook index; the component info tool lists them for each component. The response is the URL, or an error result with suggestions when the story id is unknown. You can use this URL to understand the structure of the component and how to customize it.
39629
41300
  `,y=`
39630
41301
  Get the Figma URL for a given component. The response is the URL, or an error result when the component has no linked Figma design. You can use this URL to understand the structure of the component and how it looks. The actual component's HTML structure might be slightly different from the Figma design but the overall structure and design should be the same including the design tokens.
39631
- `,d=`
41302
+ `,c=`
39632
41303
  Best practices and guidelines for using Baseline UI components, styling, and design tokens. READ THIS BEFORE DOING ANYTHING.
39633
41304
 
39634
41305
  ## Usage
@@ -39686,5 +41357,5 @@ ${Object.entries(o).sort(([n],[e])=>n.localeCompare(e)).map(([n,{description:e,s
39686
41357
  ${e.map(t=>"- "+t).join(`
39687
41358
  `)}`).join(`
39688
41359
 
39689
- `),D=new Set(r);function B(n){let e=n.toLowerCase();if(!e)return [];let t=r.filter(s=>s.includes(e));if(t.length>0)return t.slice(0,5);let a=e.split("--")[0];return a?r.filter(s=>s.includes(a)).slice(0,5):[]}function K(){let n=new mcp_js.McpServer({name:"baseline-ui",version:h.version});return n.registerResource("list_components","resource://baseline-ui/list_components.md",{description:l,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:k}]})),n.registerResource("list_icons","resource://baseline-ui/list_icons.md",{description:c,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:P}]})),n.registerResource("getting_started","resource://baseline-ui/getting_started.md",{description:"Quick start guide for integrating Baseline UI into new projects",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.gettingStarted}]})),n.registerResource("nutrient_web_viewer_theming","resource://baseline-ui/nutrient_web_viewer_theming.md",{description:"Specialized theming guide for customizing Baseline UI in Nutrient Web Viewer. This is not applicable if you are not theming the Nutrient Web Viewer SDK.",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.nutrientWebViewerTheming}]})),n.registerResource("theming","resource://baseline-ui/theming.md",{description:"Comprehensive guide for implementing custom themes and color schemes in Baseline UI",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.theming}]})),n.registerResource("internationalization","resource://baseline-ui/internationalization.md",{description:"Guide for implementing multi-language support and localization in Baseline UI",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.internationalization}]})),n.registerResource("styling","resource://baseline-ui/styling.md",{description:p,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.styling}]})),n.registerResource("guidelines","resource://baseline-ui/guidelines.md",{description:d,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:b}]})),n.registerTool("get_component_info",{title:"Get component info",description:g,inputSchema:{componentName:zod.z.enum(Object.keys(o))}},({componentName:e})=>({content:[{type:"text",text:JSON.stringify(Object.fromEntries(Object.entries(o[e]).filter(([t])=>!["description","similarTo","figmaUrl"].includes(t))),null,2)}]})),n.registerTool("get_story_url",{title:"Get story demo URL",description:f,inputSchema:{storyId:zod.z.string()}},({storyId:e})=>{let t=e.toLowerCase();if(!D.has(t)){let a=B(e);return {isError:true,content:[{type:"text",text:`Unknown story id "${e}".`+(a.length>0?` Did you mean: ${a.join(", ")}?`:"")+" Story ids come from the Storybook index; get_component_info lists them under `stories.usage[].id`."}]}}return {content:[{type:"text",text:`https://nutrient.io/baseline-ui/iframe.html?id=${t}`}]}}),n.registerTool("get_figma_url",{title:"Get Figma URL",description:y,inputSchema:{componentName:zod.z.enum(Object.keys(o))}},({componentName:e})=>{let{figmaUrl:t}=o[e];return t?{content:[{type:"text",text:t}]}:{isError:true,content:[{type:"text",text:`No Figma URL is available for ${e}.`}]}}),n.registerTool("list_available_resources",{title:"List Available Resources",description:v,inputSchema:{}},()=>({content:[{type:"text",text:JSON.stringify([{name:"list_components",uri:"resource://baseline-ui/list_components.md",description:l,mimeType:"text/markdown"},{name:"list_icons",uri:"resource://baseline-ui/list_icons.md",description:c,mimeType:"text/markdown"},{name:"getting_started",uri:"resource://baseline-ui/getting_started.md",description:"Quick start guide for integrating Baseline UI into new projects",mimeType:"text/markdown"},{name:"nutrient_web_viewer_theming",uri:"resource://baseline-ui/nutrient_web_viewer_theming.md",description:"Specialized theming guide for customizing Baseline UI in Nutrient Web Viewer. This is not applicable if you are not theming the Nutrient Web Viewer SDK.",mimeType:"text/markdown"},{name:"theming",uri:"resource://baseline-ui/theming.md",description:"Comprehensive guide for implementing custom themes and color schemes in Baseline UI",mimeType:"text/markdown"},{name:"internationalization",uri:"resource://baseline-ui/internationalization.md",description:"Guide for implementing multi-language support and localization in Baseline UI",mimeType:"text/markdown"},{name:"styling",uri:"resource://baseline-ui/styling.md",description:p,mimeType:"text/markdown"},{name:"guidelines",uri:"resource://baseline-ui/guidelines.md",description:d,mimeType:"text/markdown"}],null,2)}]})),n}
39690
- exports.createServer=K;
41360
+ `),D=new Set(r);function B(n){let e=n.toLowerCase();if(!e)return [];let t=r.filter(s=>s.includes(e));if(t.length>0)return t.slice(0,5);let a=e.split("--")[0];return a?r.filter(s=>s.includes(a)).slice(0,5):[]}function j(){let n=new mcp_js.McpServer({name:"baseline-ui",version:h.version});return n.registerResource("list_components","resource://baseline-ui/list_components.md",{description:l,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:k}]})),n.registerResource("list_icons","resource://baseline-ui/list_icons.md",{description:d,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:P}]})),n.registerResource("getting_started","resource://baseline-ui/getting_started.md",{description:"Quick start guide for integrating Baseline UI into new projects",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.gettingStarted}]})),n.registerResource("nutrient_web_viewer_theming","resource://baseline-ui/nutrient_web_viewer_theming.md",{description:"Specialized theming guide for customizing Baseline UI in Nutrient Web Viewer. This is not applicable if you are not theming the Nutrient Web Viewer SDK.",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.nutrientWebViewerTheming}]})),n.registerResource("theming","resource://baseline-ui/theming.md",{description:"Comprehensive guide for implementing custom themes and color schemes in Baseline UI",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.theming}]})),n.registerResource("internationalization","resource://baseline-ui/internationalization.md",{description:"Guide for implementing multi-language support and localization in Baseline UI",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.internationalization}]})),n.registerResource("styling","resource://baseline-ui/styling.md",{description:p,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.styling}]})),n.registerResource("guidelines","resource://baseline-ui/guidelines.md",{description:c,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:b}]})),n.registerTool("get_component_info",{title:"Get component info",description:g,inputSchema:{componentName:zod.z.enum(Object.keys(o))}},({componentName:e})=>({content:[{type:"text",text:JSON.stringify(Object.fromEntries(Object.entries(o[e]).filter(([t])=>!["description","similarTo","figmaUrl"].includes(t))),null,2)}]})),n.registerTool("get_story_url",{title:"Get story demo URL",description:f,inputSchema:{storyId:zod.z.string()}},({storyId:e})=>{let t=e.toLowerCase();if(!D.has(t)){let a=B(e);return {isError:true,content:[{type:"text",text:`Unknown story id "${e}".`+(a.length>0?` Did you mean: ${a.join(", ")}?`:"")+" Story ids come from the Storybook index; get_component_info lists them under `stories.usage[].id`."}]}}return {content:[{type:"text",text:`https://nutrient.io/baseline-ui/iframe.html?id=${t}`}]}}),n.registerTool("get_figma_url",{title:"Get Figma URL",description:y,inputSchema:{componentName:zod.z.enum(Object.keys(o))}},({componentName:e})=>{let{figmaUrl:t}=o[e];return t?{content:[{type:"text",text:t}]}:{isError:true,content:[{type:"text",text:`No Figma URL is available for ${e}.`}]}}),n.registerTool("list_available_resources",{title:"List Available Resources",description:v,inputSchema:{}},()=>({content:[{type:"text",text:JSON.stringify([{name:"list_components",uri:"resource://baseline-ui/list_components.md",description:l,mimeType:"text/markdown"},{name:"list_icons",uri:"resource://baseline-ui/list_icons.md",description:d,mimeType:"text/markdown"},{name:"getting_started",uri:"resource://baseline-ui/getting_started.md",description:"Quick start guide for integrating Baseline UI into new projects",mimeType:"text/markdown"},{name:"nutrient_web_viewer_theming",uri:"resource://baseline-ui/nutrient_web_viewer_theming.md",description:"Specialized theming guide for customizing Baseline UI in Nutrient Web Viewer. This is not applicable if you are not theming the Nutrient Web Viewer SDK.",mimeType:"text/markdown"},{name:"theming",uri:"resource://baseline-ui/theming.md",description:"Comprehensive guide for implementing custom themes and color schemes in Baseline UI",mimeType:"text/markdown"},{name:"internationalization",uri:"resource://baseline-ui/internationalization.md",description:"Guide for implementing multi-language support and localization in Baseline UI",mimeType:"text/markdown"},{name:"styling",uri:"resource://baseline-ui/styling.md",description:p,mimeType:"text/markdown"},{name:"guidelines",uri:"resource://baseline-ui/guidelines.md",description:c,mimeType:"text/markdown"}],null,2)}]})),n}
41361
+ exports.createServer=j;