@baseline-ui/mcp 0.63.0 → 1.0.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/CHANGELOG.md +2 -0
- package/dist/index.cjs +1397 -14
- package/dist/index.js +1397 -14
- package/package.json +1 -1
- package/sbom.json +15 -15
package/dist/index.js
CHANGED
|
@@ -841,6 +841,11 @@ You can add sublabels to the header of the \`AccordionItem\` component using the
|
|
|
841
841
|
| \`Right\` | If focus is on an item header and it contains action buttons, moves focus to the next action button. |
|
|
842
842
|
| \`Left\` | If focus is on an item header and it contains action buttons, moves focus to the previous action button. |`,props:`interface AccordionProps {
|
|
843
843
|
/**
|
|
844
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
845
|
+
* identifier; new components should exclude it via
|
|
846
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
847
|
+
* Retained on existing components for backward compatibility.
|
|
848
|
+
*
|
|
844
849
|
* The unique identifier for the block. This is used to identify the block in
|
|
845
850
|
* the DOM and in the block map. It is added as a data attribute
|
|
846
851
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -848,6 +853,11 @@ You can add sublabels to the header of the \`AccordionItem\` component using the
|
|
|
848
853
|
*/
|
|
849
854
|
data-block-id?: string
|
|
850
855
|
/**
|
|
856
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
857
|
+
* marker; new components should exclude it via
|
|
858
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
859
|
+
* Retained on existing components for backward compatibility.
|
|
860
|
+
*
|
|
851
861
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
852
862
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
853
863
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -1340,6 +1350,11 @@ You can customize the appearance of the action items by providing a \`renderActi
|
|
|
1340
1350
|
* **ActionIconButton** \u2014 a single icon button used internally by ActionGroup.
|
|
1341
1351
|
* **ToggleIconButton** \u2014 a toggle icon button, useful with \`renderActionItem\` for custom toggle behavior.`,props:`interface ActionGroupProps {
|
|
1342
1352
|
/**
|
|
1353
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
1354
|
+
* identifier; new components should exclude it via
|
|
1355
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
1356
|
+
* Retained on existing components for backward compatibility.
|
|
1357
|
+
*
|
|
1343
1358
|
* The unique identifier for the block. This is used to identify the block in
|
|
1344
1359
|
* the DOM and in the block map. It is added as a data attribute
|
|
1345
1360
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -1347,6 +1362,11 @@ You can customize the appearance of the action items by providing a \`renderActi
|
|
|
1347
1362
|
*/
|
|
1348
1363
|
data-block-id?: string
|
|
1349
1364
|
/**
|
|
1365
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
1366
|
+
* marker; new components should exclude it via
|
|
1367
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
1368
|
+
* Retained on existing components for backward compatibility.
|
|
1369
|
+
*
|
|
1350
1370
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
1351
1371
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
1352
1372
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -2111,6 +2131,11 @@ AlertDialog exposes className props for its inner elements:
|
|
|
2111
2131
|
* **Modal** -- Container component required to display AlertDialog.
|
|
2112
2132
|
* **Dialog** -- Non-alert dialog for general content. AlertDialog is built on top of Dialog.`,props:`interface AlertDialogProps {
|
|
2113
2133
|
/**
|
|
2134
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
2135
|
+
* identifier; new components should exclude it via
|
|
2136
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2137
|
+
* Retained on existing components for backward compatibility.
|
|
2138
|
+
*
|
|
2114
2139
|
* The unique identifier for the block. This is used to identify the block in
|
|
2115
2140
|
* the DOM and in the block map. It is added as a data attribute
|
|
2116
2141
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -2118,6 +2143,11 @@ AlertDialog exposes className props for its inner elements:
|
|
|
2118
2143
|
*/
|
|
2119
2144
|
data-block-id?: string
|
|
2120
2145
|
/**
|
|
2146
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
2147
|
+
* marker; new components should exclude it via
|
|
2148
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2149
|
+
* Retained on existing components for backward compatibility.
|
|
2150
|
+
*
|
|
2121
2151
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
2122
2152
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
2123
2153
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -2339,6 +2369,11 @@ function App() {
|
|
|
2339
2369
|
\`\`\`
|
|
2340
2370
|
\`\`\``,props:`interface AudioPlayerProps {
|
|
2341
2371
|
/**
|
|
2372
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
2373
|
+
* identifier; new components should exclude it via
|
|
2374
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2375
|
+
* Retained on existing components for backward compatibility.
|
|
2376
|
+
*
|
|
2342
2377
|
* The unique identifier for the block. This is used to identify the block in
|
|
2343
2378
|
* the DOM and in the block map. It is added as a data attribute
|
|
2344
2379
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -2346,6 +2381,11 @@ function App() {
|
|
|
2346
2381
|
*/
|
|
2347
2382
|
data-block-id?: string
|
|
2348
2383
|
/**
|
|
2384
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
2385
|
+
* marker; new components should exclude it via
|
|
2386
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2387
|
+
* Retained on existing components for backward compatibility.
|
|
2388
|
+
*
|
|
2349
2389
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
2350
2390
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
2351
2391
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -2435,6 +2475,11 @@ The \`hasNotifications\` prop can be used to show a notification indicator.
|
|
|
2435
2475
|
| --------------- | ---------------------------------- |
|
|
2436
2476
|
| \\[data-disabled] | Whether the component is disabled. |`,props:`interface AvatarProps {
|
|
2437
2477
|
/**
|
|
2478
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
2479
|
+
* identifier; new components should exclude it via
|
|
2480
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2481
|
+
* Retained on existing components for backward compatibility.
|
|
2482
|
+
*
|
|
2438
2483
|
* The unique identifier for the block. This is used to identify the block in
|
|
2439
2484
|
* the DOM and in the block map. It is added as a data attribute
|
|
2440
2485
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -2442,6 +2487,11 @@ The \`hasNotifications\` prop can be used to show a notification indicator.
|
|
|
2442
2487
|
*/
|
|
2443
2488
|
data-block-id?: string
|
|
2444
2489
|
/**
|
|
2490
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
2491
|
+
* marker; new components should exclude it via
|
|
2492
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2493
|
+
* Retained on existing components for backward compatibility.
|
|
2494
|
+
*
|
|
2445
2495
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
2446
2496
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
2447
2497
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -2699,6 +2749,11 @@ children?: ReactNode
|
|
|
2699
2749
|
</Box>
|
|
2700
2750
|
);`}],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 {
|
|
2701
2751
|
/**
|
|
2752
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
2753
|
+
* identifier; new components should exclude it via
|
|
2754
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2755
|
+
* Retained on existing components for backward compatibility.
|
|
2756
|
+
*
|
|
2702
2757
|
* The unique identifier for the block. This is used to identify the block in
|
|
2703
2758
|
* the DOM and in the block map. It is added as a data attribute
|
|
2704
2759
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -2706,6 +2761,11 @@ children?: ReactNode
|
|
|
2706
2761
|
*/
|
|
2707
2762
|
data-block-id?: string
|
|
2708
2763
|
/**
|
|
2764
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
2765
|
+
* marker; new components should exclude it via
|
|
2766
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
2767
|
+
* Retained on existing components for backward compatibility.
|
|
2768
|
+
*
|
|
2709
2769
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
2710
2770
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
2711
2771
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -2950,6 +3010,11 @@ export const ButtonSelectWithOptionStyleFn: React.FC<
|
|
|
2950
3010
|
);
|
|
2951
3011
|
};`},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 {
|
|
2952
3012
|
/**
|
|
3013
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3014
|
+
* identifier; new components should exclude it via
|
|
3015
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3016
|
+
* Retained on existing components for backward compatibility.
|
|
3017
|
+
*
|
|
2953
3018
|
* The unique identifier for the block. This is used to identify the block in
|
|
2954
3019
|
* the DOM and in the block map. It is added as a data attribute
|
|
2955
3020
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -2957,6 +3022,11 @@ export const ButtonSelectWithOptionStyleFn: React.FC<
|
|
|
2957
3022
|
*/
|
|
2958
3023
|
data-block-id?: string
|
|
2959
3024
|
/**
|
|
3025
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3026
|
+
* marker; new components should exclude it via
|
|
3027
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3028
|
+
* Retained on existing components for backward compatibility.
|
|
3029
|
+
*
|
|
2960
3030
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
2961
3031
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
2962
3032
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3331,6 +3401,11 @@ When the \`title\` prop is set, it is automatically linked via \`aria-labelledby
|
|
|
3331
3401
|
* **[Calendar](/docs/core-forms-calendar--docs)** \u2013 For selecting a single date instead of a range
|
|
3332
3402
|
* **[DateField](/docs/core-forms-datefield--docs)** \u2013 For keyboard-based date input with individual editable segments`,props:`interface RangeCalendarProps {
|
|
3333
3403
|
/**
|
|
3404
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3405
|
+
* identifier; new components should exclude it via
|
|
3406
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3407
|
+
* Retained on existing components for backward compatibility.
|
|
3408
|
+
*
|
|
3334
3409
|
* The unique identifier for the block. This is used to identify the block in
|
|
3335
3410
|
* the DOM and in the block map. It is added as a data attribute
|
|
3336
3411
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -3338,6 +3413,11 @@ When the \`title\` prop is set, it is automatically linked via \`aria-labelledby
|
|
|
3338
3413
|
*/
|
|
3339
3414
|
data-block-id?: string
|
|
3340
3415
|
/**
|
|
3416
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3417
|
+
* marker; new components should exclude it via
|
|
3418
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3419
|
+
* Retained on existing components for backward compatibility.
|
|
3420
|
+
*
|
|
3341
3421
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
3342
3422
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
3343
3423
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3552,6 +3632,11 @@ export const RangeCalendarExample: React.FC<
|
|
|
3552
3632
|
);
|
|
3553
3633
|
};`},similarTo:[],figmaUrl:null},Checkbox:{id:"core-forms-checkbox",breadcrumb:"Core/Forms/Checkbox",importStatement:'import { Checkbox } from "@baseline-ui/core";',description:"`Checkbox` is a binary control that lets a user turn an individual option on or off, with support for an indeterminate third state. Use it for independent boolean choices in forms, settings, or when selecting any number of items from a list.",documentation:'`Checkbox` is a binary control that lets a user turn an individual option on or off, with support for an indeterminate third state. Use it for independent boolean choices in forms, settings, or when selecting any number of items from a list.\n\n* Built on [React Aria Checkbox](https://react-spectrum.adobe.com/react-aria/Checkbox.html)\n* Full support for form autofill\n* Keyboard focus management and cross browser normalization\n* Labeling support for assistive technology via aria-\\* props\n* Indeterminate state support\n\n```jsx\nimport { Checkbox } from "@baseline-ui/core";\n\n<Checkbox label="Label" onChange={console.log} />;\n```\n\nThe `defaultSelected` prop allows the checkbox to be uncontrolled. This is useful when the checkbox is not part of a group and the checked state is managed by the checkbox itself.\n\n```jsx\n<Checkbox label="Label" defaultSelected onChange={console.log} />\n```\n\nThe `isSelected` prop allows the checkbox to be controlled. This is useful when the checkbox is part of a group and the checked state is managed by a parent component.\n\n```jsx\n<Checkbox label="Label" isSelected onChange={console.log} />\n```\n\nThe `isIndeterminate` prop allows the checkbox to be in an indeterminate state. This is useful when the checkbox is part of a group and some, but not all, of the checkboxes are checked.\n\n```jsx\n<Checkbox label="Label" isIndeterminate onChange={console.log} />\n```\n\nThe `isReadOnly` prop allows the checkbox to be readonly. This mode is useful when you want the checkbox to be focusable, but not editable.\n\n```jsx\n<Checkbox label="Label" isReadOnly isSelected onChange={console.log} />\n```\n\nThe `isDisabled` prop allows the checkbox to be disabled.\n\n```jsx\n<Checkbox label="Label" isDisabled onChange={console.log} />\n```\n\nThe `name` and `value` props allow the checkbox to be used in an HTML form.\n\n```jsx\n<Checkbox label="Label" name="name" value="value" onChange={console.log} />\n```\n\nThe `labelPosition` prop controls whether the label appears before or after the checkbox.\n\n```jsx\n<Checkbox label="Label" labelPosition="start" onChange={console.log} />\n```\n\nThe `isInvalid` prop marks the checkbox as having a validation error.\n\n```jsx\n<Checkbox label="Label" isInvalid onChange={console.log} />\n```\n\nThe `onChange` callback receives a `boolean` indicating the new checked state.\n\n```jsx\n<Checkbox\n label="Label"\n onChange={(isSelected) => {\n console.log("Checked:", isSelected);\n }}\n/>\n```\n\nWhen `isIndeterminate` is `true`, the checkbox displays a minus icon regardless of the `isSelected` state. Clicking an indeterminate checkbox will call `onChange` with `true`.\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| \\[data-selected] | Whether the component is selected. |\n| \\[data-readonly] | Whether the component is read-only. |\n| \\[data-pressed] | Whether the component is currently pressed. |\n| \\[data-indeterminate] | Whether the component is in an indeterminate state. |\n| \\[data-invalid] | Whether the component has a validation error. |\n\n| Key | Function |\n| ------- | ------------------- |\n| `Space` | Toggle the checkbox |',props:`interface CheckboxProps {
|
|
3554
3634
|
/**
|
|
3635
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3636
|
+
* identifier; new components should exclude it via
|
|
3637
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3638
|
+
* Retained on existing components for backward compatibility.
|
|
3639
|
+
*
|
|
3555
3640
|
* The unique identifier for the block. This is used to identify the block in
|
|
3556
3641
|
* the DOM and in the block map. It is added as a data attribute
|
|
3557
3642
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -3559,6 +3644,11 @@ export const RangeCalendarExample: React.FC<
|
|
|
3559
3644
|
*/
|
|
3560
3645
|
data-block-id?: string
|
|
3561
3646
|
/**
|
|
3647
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3648
|
+
* marker; new components should exclude it via
|
|
3649
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3650
|
+
* Retained on existing components for backward compatibility.
|
|
3651
|
+
*
|
|
3562
3652
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
3563
3653
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
3564
3654
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3654,6 +3744,11 @@ defaultOpen?: boolean
|
|
|
3654
3744
|
*/
|
|
3655
3745
|
onOpenChange?: (isOpen: boolean) => void
|
|
3656
3746
|
/**
|
|
3747
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3748
|
+
* identifier; new components should exclude it via
|
|
3749
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3750
|
+
* Retained on existing components for backward compatibility.
|
|
3751
|
+
*
|
|
3657
3752
|
* The unique identifier for the block. This is used to identify the block in
|
|
3658
3753
|
* the DOM and in the block map. It is added as a data attribute
|
|
3659
3754
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -3661,6 +3756,11 @@ onOpenChange?: (isOpen: boolean) => void
|
|
|
3661
3756
|
*/
|
|
3662
3757
|
data-block-id?: string
|
|
3663
3758
|
/**
|
|
3759
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3760
|
+
* marker; new components should exclude it via
|
|
3761
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3762
|
+
* Retained on existing components for backward compatibility.
|
|
3763
|
+
*
|
|
3664
3764
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
3665
3765
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
3666
3766
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3993,6 +4093,11 @@ The indeterminate state is useful for representing a mixed color value, such as
|
|
|
3993
4093
|
/>
|
|
3994
4094
|
\`\`\``,props:`interface ColorSwatchProps {
|
|
3995
4095
|
/**
|
|
4096
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
4097
|
+
* identifier; new components should exclude it via
|
|
4098
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4099
|
+
* Retained on existing components for backward compatibility.
|
|
4100
|
+
*
|
|
3996
4101
|
* The unique identifier for the block. This is used to identify the block in
|
|
3997
4102
|
* the DOM and in the block map. It is added as a data attribute
|
|
3998
4103
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -4000,6 +4105,11 @@ The indeterminate state is useful for representing a mixed color value, such as
|
|
|
4000
4105
|
*/
|
|
4001
4106
|
data-block-id?: string
|
|
4002
4107
|
/**
|
|
4108
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
4109
|
+
* marker; new components should exclude it via
|
|
4110
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4111
|
+
* Retained on existing components for backward compatibility.
|
|
4112
|
+
*
|
|
4003
4113
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
4004
4114
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
4005
4115
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -4134,6 +4244,11 @@ import { ColorSwatchPicker } from "../../utils";
|
|
|
4134
4244
|
\`\`\`
|
|
4135
4245
|
\`\`\``,props:`interface ColorSwatchPickerProps {
|
|
4136
4246
|
/**
|
|
4247
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
4248
|
+
* identifier; new components should exclude it via
|
|
4249
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4250
|
+
* Retained on existing components for backward compatibility.
|
|
4251
|
+
*
|
|
4137
4252
|
* The unique identifier for the block. This is used to identify the block in
|
|
4138
4253
|
* the DOM and in the block map. It is added as a data attribute
|
|
4139
4254
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -4141,6 +4256,11 @@ import { ColorSwatchPicker } from "../../utils";
|
|
|
4141
4256
|
*/
|
|
4142
4257
|
data-block-id?: string
|
|
4143
4258
|
/**
|
|
4259
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
4260
|
+
* marker; new components should exclude it via
|
|
4261
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4262
|
+
* Retained on existing components for backward compatibility.
|
|
4263
|
+
*
|
|
4144
4264
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
4145
4265
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
4146
4266
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -4399,6 +4519,11 @@ When the dropdown list is open, the following keyboard interactions are supporte
|
|
|
4399
4519
|
| \`End\` | Moves focus to the last item. |
|
|
4400
4520
|
| \`Esc\` | Closes the dropdown. |`,props:`interface ComboBoxProps {
|
|
4401
4521
|
/**
|
|
4522
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
4523
|
+
* identifier; new components should exclude it via
|
|
4524
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4525
|
+
* Retained on existing components for backward compatibility.
|
|
4526
|
+
*
|
|
4402
4527
|
* The unique identifier for the block. This is used to identify the block in
|
|
4403
4528
|
* the DOM and in the block map. It is added as a data attribute
|
|
4404
4529
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -4406,6 +4531,11 @@ When the dropdown list is open, the following keyboard interactions are supporte
|
|
|
4406
4531
|
*/
|
|
4407
4532
|
data-block-id?: string
|
|
4408
4533
|
/**
|
|
4534
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
4535
|
+
* marker; new components should exclude it via
|
|
4536
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4537
|
+
* Retained on existing components for backward compatibility.
|
|
4538
|
+
*
|
|
4409
4539
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
4410
4540
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
4411
4541
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -5075,6 +5205,11 @@ import { CalendarDate } from "@internationalized/date";
|
|
|
5075
5205
|
| \`ArrowLeft/Right\` | Navigate between date segments |
|
|
5076
5206
|
| \`ArrowUp/Down\` | Increment/decrement the selected segment |`,props:`interface DateFieldProps {
|
|
5077
5207
|
/**
|
|
5208
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
5209
|
+
* identifier; new components should exclude it via
|
|
5210
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5211
|
+
* Retained on existing components for backward compatibility.
|
|
5212
|
+
*
|
|
5078
5213
|
* The unique identifier for the block. This is used to identify the block in
|
|
5079
5214
|
* the DOM and in the block map. It is added as a data attribute
|
|
5080
5215
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -5082,6 +5217,11 @@ import { CalendarDate } from "@internationalized/date";
|
|
|
5082
5217
|
*/
|
|
5083
5218
|
data-block-id?: string
|
|
5084
5219
|
/**
|
|
5220
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
5221
|
+
* marker; new components should exclude it via
|
|
5222
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5223
|
+
* Retained on existing components for backward compatibility.
|
|
5224
|
+
*
|
|
5085
5225
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
5086
5226
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
5087
5227
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -5682,6 +5822,11 @@ The \`useDevice\` hook returns a string indicating the current device type:
|
|
|
5682
5822
|
| \`"tablet"\` | Screen width is greater than or equal to the tablet breakpoint but less than the desktop breakpoint |
|
|
5683
5823
|
| \`"desktop"\` | Screen width is greater than or equal to the desktop breakpoint |`,props:`interface DeviceProviderProps {
|
|
5684
5824
|
/**
|
|
5825
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
5826
|
+
* identifier; new components should exclude it via
|
|
5827
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5828
|
+
* Retained on existing components for backward compatibility.
|
|
5829
|
+
*
|
|
5685
5830
|
* The unique identifier for the block. This is used to identify the block in
|
|
5686
5831
|
* the DOM and in the block map. It is added as a data attribute
|
|
5687
5832
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -5689,6 +5834,11 @@ The \`useDevice\` hook returns a string indicating the current device type:
|
|
|
5689
5834
|
*/
|
|
5690
5835
|
data-block-id?: string
|
|
5691
5836
|
/**
|
|
5837
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
5838
|
+
* marker; new components should exclude it via
|
|
5839
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5840
|
+
* Retained on existing components for backward compatibility.
|
|
5841
|
+
*
|
|
5692
5842
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
5693
5843
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
5694
5844
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -5860,6 +6010,11 @@ By default, the \`Dialog\` component traps focus within the dialog. This means t
|
|
|
5860
6010
|
*/
|
|
5861
6011
|
role?: 'dialog' | 'alertdialog'
|
|
5862
6012
|
/**
|
|
6013
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
6014
|
+
* identifier; new components should exclude it via
|
|
6015
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6016
|
+
* Retained on existing components for backward compatibility.
|
|
6017
|
+
*
|
|
5863
6018
|
* The unique identifier for the block. This is used to identify the block in
|
|
5864
6019
|
* the DOM and in the block map. It is added as a data attribute
|
|
5865
6020
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -5867,6 +6022,11 @@ role?: 'dialog' | 'alertdialog'
|
|
|
5867
6022
|
*/
|
|
5868
6023
|
data-block-id?: string
|
|
5869
6024
|
/**
|
|
6025
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
6026
|
+
* marker; new components should exclude it via
|
|
6027
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6028
|
+
* Retained on existing components for backward compatibility.
|
|
6029
|
+
*
|
|
5870
6030
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
5871
6031
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
5872
6032
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -6617,6 +6777,11 @@ export const TruncatedTitleDisclosure: React.FC = () => {
|
|
|
6617
6777
|
);
|
|
6618
6778
|
};`},similarTo:[],figmaUrl:null},Drawer:{id:"core-overlays-drawer",breadcrumb:"Core/Overlays/Drawer",importStatement:'import { Drawer } from "@baseline-ui/core";',description:"`Drawer` is a modal panel that slides in from the edge of the screen to host secondary content or actions. Use it for tasks like editing details, viewing settings, or filtering, where the user should stay anchored to the main view.",documentation:'`Drawer` is a modal panel that slides in from the edge of the screen to host secondary content or actions. Use it for tasks like editing details, viewing settings, or filtering, where the user should stay anchored to the main view.\n\n* Exposed to assistive technologies as a `dialog` using ARIA `role="dialog"`. The content outside the dialog is hidden from assistive technologies to prevent it from being read while the dialog is open.\n* Focus is moved into the dialog on mount, and restored to the trigger element on unmount. While open, focus is contained within the dialog, preventing the user from tabbing outside.\n\n```jsx\nimport { Drawer } from "../../utils";\n\n<Drawer title="Drawer Title" onCloseRequest={() => {}}>\n <div>Drawer Content</div>\n</Drawer>;\n```\n\nThis component has two background variants: `medium` and `subtle`. The `medium` variant is used for the default background, and the `subtle` variant is used for the background.\n\nThe `Drawer` component can have an additional action button that is displayed at the top of the drawer. This button is used to perform an action, such as saving or submitting the content in the drawer.\n\nThe `Drawer` component can have different types of dialogs, such as `dialog` and `alertdialog`. The `dialog` type is used for dialogs that require user input, and the `alertdialog` type is used for dialogs that require user attention. The default\ntype is `dialog`.\n\n```jsx\n<Drawer title="Drawer Title" type="alertdialog" onCloseRequest={() => {}}>\n <div>Dialog Content</div>\n</Drawer>\n```',props:`interface DrawerProps {
|
|
6619
6779
|
/**
|
|
6780
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
6781
|
+
* identifier; new components should exclude it via
|
|
6782
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6783
|
+
* Retained on existing components for backward compatibility.
|
|
6784
|
+
*
|
|
6620
6785
|
* The unique identifier for the block. This is used to identify the block in
|
|
6621
6786
|
* the DOM and in the block map. It is added as a data attribute
|
|
6622
6787
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -6624,6 +6789,11 @@ export const TruncatedTitleDisclosure: React.FC = () => {
|
|
|
6624
6789
|
*/
|
|
6625
6790
|
data-block-id?: string
|
|
6626
6791
|
/**
|
|
6792
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
6793
|
+
* marker; new components should exclude it via
|
|
6794
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6795
|
+
* Retained on existing components for backward compatibility.
|
|
6796
|
+
*
|
|
6627
6797
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
6628
6798
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
6629
6799
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -6698,6 +6868,11 @@ export const DrawerWithActionExample: React.FC<{
|
|
|
6698
6868
|
);
|
|
6699
6869
|
};`},similarTo:[],figmaUrl:null},Editor:{id:"core-miscellaneous-editor-rich-text",breadcrumb:"Core/Miscellaneous/Editor",importStatement:'import { Box, Editor, EditorAutoFocusOnMount, Separator } 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.\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 {
|
|
6700
6870
|
/**
|
|
6871
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
6872
|
+
* identifier; new components should exclude it via
|
|
6873
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6874
|
+
* Retained on existing components for backward compatibility.
|
|
6875
|
+
*
|
|
6701
6876
|
* The unique identifier for the block. This is used to identify the block in
|
|
6702
6877
|
* the DOM and in the block map. It is added as a data attribute
|
|
6703
6878
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -6705,6 +6880,11 @@ export const DrawerWithActionExample: React.FC<{
|
|
|
6705
6880
|
*/
|
|
6706
6881
|
data-block-id?: string
|
|
6707
6882
|
/**
|
|
6883
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
6884
|
+
* marker; new components should exclude it via
|
|
6885
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6886
|
+
* Retained on existing components for backward compatibility.
|
|
6887
|
+
*
|
|
6708
6888
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
6709
6889
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
6710
6890
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -6886,6 +7066,15 @@ autoFocus?: boolean | "start" | "end"
|
|
|
6886
7066
|
* @default false
|
|
6887
7067
|
*/
|
|
6888
7068
|
saveOnEnter?: boolean
|
|
7069
|
+
/**
|
|
7070
|
+
* Whether URL-shaped text is automatically converted into links: typing a
|
|
7071
|
+
* space or Enter after a URL, pasting text that contains URLs, and pasting a
|
|
7072
|
+
* lone URL over a selection (wraps the selection as a link). Only applies
|
|
7073
|
+
* when \`enableRichText\` is \`true\`.
|
|
7074
|
+
*
|
|
7075
|
+
* @default true
|
|
7076
|
+
*/
|
|
7077
|
+
autoLink?: boolean
|
|
6889
7078
|
}`,stories:{usage:[{id:"core-miscellaneous-editor-rich-text--default",name:"Default",snippet:`const Default = () => <Editor
|
|
6890
7079
|
placeholder="Placeholder"
|
|
6891
7080
|
aria-label="Editor"
|
|
@@ -7385,7 +7574,7 @@ export const EditorWithAutoFocusAndCaretAtEnd = ({
|
|
|
7385
7574
|
editorHandle={editorHandleRef}
|
|
7386
7575
|
/>
|
|
7387
7576
|
);
|
|
7388
|
-
};`},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 [`
|
|
7577
|
+
};`},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 {
|
|
7389
7578
|
/**
|
|
7390
7579
|
* The description to display below the input.
|
|
7391
7580
|
*/
|
|
@@ -7567,7 +7756,7 @@ labelPosition?: any
|
|
|
7567
7756
|
],
|
|
7568
7757
|
}}
|
|
7569
7758
|
/>
|
|
7570
|
-
);`}],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 `
|
|
7759
|
+
);`}],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 {
|
|
7571
7760
|
/**
|
|
7572
7761
|
* The className applied to the root element.
|
|
7573
7762
|
*/
|
|
@@ -7885,7 +8074,125 @@ export const AriaDetailsFileList: React.FC = () => (
|
|
|
7885
8074
|
items={defaultItems}
|
|
7886
8075
|
/>
|
|
7887
8076
|
</>
|
|
7888
|
-
);`},similarTo:["
|
|
8077
|
+
);`},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 {
|
|
8078
|
+
/**
|
|
8079
|
+
* The visual variant.
|
|
8080
|
+
*
|
|
8081
|
+
* - \`dropzone\` (default): renders a drop area that accepts dragged and
|
|
8082
|
+
* pasted files. Clicking anywhere in the area opens the file picker.
|
|
8083
|
+
* - \`button\`: renders an \`ActionButton\` that opens the file picker. No
|
|
8084
|
+
* drop target is rendered.
|
|
8085
|
+
*
|
|
8086
|
+
* @default "dropzone"
|
|
8087
|
+
*/
|
|
8088
|
+
variant?: "dropzone" | "button"
|
|
8089
|
+
/**
|
|
8090
|
+
* Whether the \`dropzone\` drop area is rendered inline \u2014 outlined with a
|
|
8091
|
+
* dashed border and rounded corners \u2014 instead of as a plain filled box.
|
|
8092
|
+
* Has no effect on the \`button\` variant.
|
|
8093
|
+
*
|
|
8094
|
+
* @default false
|
|
8095
|
+
*/
|
|
8096
|
+
isInline?: boolean
|
|
8097
|
+
/**
|
|
8098
|
+
* Optional label rendered above the trigger.
|
|
8099
|
+
*/
|
|
8100
|
+
label?: React.ReactNode
|
|
8101
|
+
/**
|
|
8102
|
+
* Optional description rendered below the label.
|
|
8103
|
+
*/
|
|
8104
|
+
description?: React.ReactNode
|
|
8105
|
+
/**
|
|
8106
|
+
* Called when the user selects or drops new files.
|
|
8107
|
+
*/
|
|
8108
|
+
onAdd?: (files: File[]) => void
|
|
8109
|
+
/**
|
|
8110
|
+
* The file types the uploader accepts, as a comma-separated list of file
|
|
8111
|
+
* extensions (\`.png\`), MIME types (\`image/png\`), or wildcard MIME types
|
|
8112
|
+
* (\`image/*\`). Passed through to the underlying \`<input type="file">\`
|
|
8113
|
+
* \`accept\` attribute, and also used to filter dropped and pasted files so
|
|
8114
|
+
* the drop/paste path enforces the same restriction as the native picker.
|
|
8115
|
+
*/
|
|
8116
|
+
accept?: string
|
|
8117
|
+
/**
|
|
8118
|
+
* Whether multiple files can be selected at once.
|
|
8119
|
+
*
|
|
8120
|
+
* @default true
|
|
8121
|
+
*/
|
|
8122
|
+
allowsMultiple?: boolean
|
|
8123
|
+
/**
|
|
8124
|
+
* Whether the entire uploader is disabled.
|
|
8125
|
+
*/
|
|
8126
|
+
isDisabled?: boolean
|
|
8127
|
+
/**
|
|
8128
|
+
* Top-level error message. When provided, the dropzone is rendered with
|
|
8129
|
+
* the error border and the message is wired to the trigger via
|
|
8130
|
+
* \`aria-describedby\`, so it must be plain text.
|
|
8131
|
+
*/
|
|
8132
|
+
errorMessage?: string
|
|
8133
|
+
/**
|
|
8134
|
+
* The label of the button rendered in the \`button\` variant.
|
|
8135
|
+
*
|
|
8136
|
+
* @default "Upload"
|
|
8137
|
+
*/
|
|
8138
|
+
buttonLabel?: string
|
|
8139
|
+
/**
|
|
8140
|
+
* The text rendered inside the clickable drop area in the \`dropzone\`
|
|
8141
|
+
* variant.
|
|
8142
|
+
*
|
|
8143
|
+
* @default "Drop files here or click to upload"
|
|
8144
|
+
*/
|
|
8145
|
+
dropzoneLabel?: string
|
|
8146
|
+
}`,stories:{usage:[{id:"core-forms-fileuploader--default",name:"Default",snippet:`const Default = () => <Box style={{ width: 240 }}>
|
|
8147
|
+
<UploaderWithFileList label="Label" description="Supports .mov and .mp4" onAdd={fn()} />
|
|
8148
|
+
</Box>;`},{id:"core-forms-fileuploader--variants",name:"Variants",snippet:`const Variants = (args) => (
|
|
8149
|
+
<VariantViewer<FileUploaderProps>
|
|
8150
|
+
header={["Default", "Error", "Disabled"]}
|
|
8151
|
+
component={UploaderWithFileList}
|
|
8152
|
+
defaultProps={args}
|
|
8153
|
+
cellStyle={{ width: 240 }}
|
|
8154
|
+
variants={{
|
|
8155
|
+
Dropzone: [
|
|
8156
|
+
{ variant: "dropzone" },
|
|
8157
|
+
{ variant: "dropzone", ...ERROR_PROPS },
|
|
8158
|
+
{ variant: "dropzone", ...DISABLED_PROPS },
|
|
8159
|
+
],
|
|
8160
|
+
Inline: [
|
|
8161
|
+
{ isInline: true },
|
|
8162
|
+
{ isInline: true, ...ERROR_PROPS },
|
|
8163
|
+
{ isInline: true, ...DISABLED_PROPS },
|
|
8164
|
+
],
|
|
8165
|
+
Button: [
|
|
8166
|
+
{ variant: "button" },
|
|
8167
|
+
{ variant: "button", ...ERROR_PROPS },
|
|
8168
|
+
{ variant: "button", ...DISABLED_PROPS },
|
|
8169
|
+
],
|
|
8170
|
+
}}
|
|
8171
|
+
/>
|
|
8172
|
+
);`},{id:"core-forms-fileuploader--button-variant",name:"Button Variant",snippet:`const ButtonVariant = () => <Box style={{ width: 240 }}>
|
|
8173
|
+
<UploaderWithFileList
|
|
8174
|
+
label="Label"
|
|
8175
|
+
description="Supports .mov and .mp4"
|
|
8176
|
+
onAdd={fn()}
|
|
8177
|
+
variant="button"
|
|
8178
|
+
buttonLabel="Upload" />
|
|
8179
|
+
</Box>;`},{id:"core-forms-fileuploader--inline",name:"Inline",snippet:`const Inline = () => <Box style={{ width: 240 }}>
|
|
8180
|
+
<UploaderWithFileList label="Label" description="Supports .mov and .mp4" onAdd={fn()} isInline />
|
|
8181
|
+
</Box>;`},{id:"core-forms-fileuploader--error-dropzone",name:"Error Dropzone",snippet:`const ErrorDropzone = () => <Box style={{ width: 240 }}>
|
|
8182
|
+
<UploaderWithFileList
|
|
8183
|
+
label="Label"
|
|
8184
|
+
description="Supports .mov and .mp4"
|
|
8185
|
+
onAdd={fn()}
|
|
8186
|
+
errorMessage="Upload failed." />
|
|
8187
|
+
</Box>;`},{id:"core-forms-fileuploader--disabled",name:"Disabled",snippet:`const Disabled = () => <Box style={{ width: 240 }}>
|
|
8188
|
+
<UploaderWithFileList
|
|
8189
|
+
label="Label"
|
|
8190
|
+
description="Supports .mov and .mp4"
|
|
8191
|
+
onAdd={fn()}
|
|
8192
|
+
isDisabled />
|
|
8193
|
+
</Box>;`},{id:"core-forms-fileuploader--no-label",name:"No Label",snippet:`const NoLabel = () => <Box style={{ width: 240 }}>
|
|
8194
|
+
<UploaderWithFileList label={undefined} description={undefined} onAdd={fn()} />
|
|
8195
|
+
</Box>;`}],implementation:""},similarTo:[],figmaUrl:null},FrameProvider:{id:"core-utilities-frameprovider",breadcrumb:"Core/Utilities/FrameProvider",importStatement:`import {
|
|
7889
8196
|
Box,
|
|
7890
8197
|
FrameProvider,
|
|
7891
8198
|
NestedTestFrameProvider,
|
|
@@ -7998,6 +8305,11 @@ function App() {
|
|
|
7998
8305
|
2. The container must have non-zero dimensions for proper overlay positioning.
|
|
7999
8306
|
3. On mobile devices, overlays are typically rendered at the document body level for better user experience.`,props:`interface FrameProviderProps {
|
|
8000
8307
|
/**
|
|
8308
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
8309
|
+
* identifier; new components should exclude it via
|
|
8310
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8311
|
+
* Retained on existing components for backward compatibility.
|
|
8312
|
+
*
|
|
8001
8313
|
* The unique identifier for the block. This is used to identify the block in
|
|
8002
8314
|
* the DOM and in the block map. It is added as a data attribute
|
|
8003
8315
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -8005,6 +8317,11 @@ function App() {
|
|
|
8005
8317
|
*/
|
|
8006
8318
|
data-block-id?: string
|
|
8007
8319
|
/**
|
|
8320
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
8321
|
+
* marker; new components should exclude it via
|
|
8322
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8323
|
+
* Retained on existing components for backward compatibility.
|
|
8324
|
+
*
|
|
8008
8325
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
8009
8326
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
8010
8327
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -8558,6 +8875,11 @@ import { I18nProvider, FreehandCanvas } from "@baseline-ui/core";
|
|
|
8558
8875
|
</I18nProvider>;
|
|
8559
8876
|
\`\`\``,props:`interface FreehandCanvasProps {
|
|
8560
8877
|
/**
|
|
8878
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
8879
|
+
* identifier; new components should exclude it via
|
|
8880
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8881
|
+
* Retained on existing components for backward compatibility.
|
|
8882
|
+
*
|
|
8561
8883
|
* The unique identifier for the block. This is used to identify the block in
|
|
8562
8884
|
* the DOM and in the block map. It is added as a data attribute
|
|
8563
8885
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -8565,6 +8887,11 @@ import { I18nProvider, FreehandCanvas } from "@baseline-ui/core";
|
|
|
8565
8887
|
*/
|
|
8566
8888
|
data-block-id?: string
|
|
8567
8889
|
/**
|
|
8890
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
8891
|
+
* marker; new components should exclude it via
|
|
8892
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8893
|
+
* Retained on existing components for backward compatibility.
|
|
8894
|
+
*
|
|
8568
8895
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
8569
8896
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
8570
8897
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -9315,6 +9642,11 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
9315
9642
|
);
|
|
9316
9643
|
};`},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 "../../utils";\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```\n```',props:`interface GroupProps {
|
|
9317
9644
|
/**
|
|
9645
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
9646
|
+
* identifier; new components should exclude it via
|
|
9647
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
9648
|
+
* Retained on existing components for backward compatibility.
|
|
9649
|
+
*
|
|
9318
9650
|
* The unique identifier for the block. This is used to identify the block in
|
|
9319
9651
|
* the DOM and in the block map. It is added as a data attribute
|
|
9320
9652
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -9322,6 +9654,11 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
9322
9654
|
*/
|
|
9323
9655
|
data-block-id?: string
|
|
9324
9656
|
/**
|
|
9657
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
9658
|
+
* marker; new components should exclude it via
|
|
9659
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
9660
|
+
* Retained on existing components for backward compatibility.
|
|
9661
|
+
*
|
|
9325
9662
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
9326
9663
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
9327
9664
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -9552,6 +9889,71 @@ import { I18nProvider, ImageDropZone } from "@baseline-ui/core";
|
|
|
9552
9889
|
<ImageDropZone onValueChange={console.log} />
|
|
9553
9890
|
</I18nProvider>;
|
|
9554
9891
|
\`\`\``,props:`interface ImageDropZoneProps {
|
|
9892
|
+
/**
|
|
9893
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
9894
|
+
* identifier; new components should exclude it via
|
|
9895
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
9896
|
+
* Retained on existing components for backward compatibility.
|
|
9897
|
+
*
|
|
9898
|
+
* The unique identifier for the block. This is used to identify the block in
|
|
9899
|
+
* the DOM and in the block map. It is added as a data attribute
|
|
9900
|
+
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
9901
|
+
* rendered.
|
|
9902
|
+
*/
|
|
9903
|
+
data-block-id?: string
|
|
9904
|
+
/**
|
|
9905
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
9906
|
+
* marker; new components should exclude it via
|
|
9907
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
9908
|
+
* Retained on existing components for backward compatibility.
|
|
9909
|
+
*
|
|
9910
|
+
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
9911
|
+
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
9912
|
+
* together in the DOM and in the block map. It is added as a data attribute
|
|
9913
|
+
* \`data-block-class\` to the root element of the block if a DOM node is
|
|
9914
|
+
* rendered.
|
|
9915
|
+
*/
|
|
9916
|
+
data-block-class?: string
|
|
9917
|
+
/**
|
|
9918
|
+
* The className applied to the root element of the component.
|
|
9919
|
+
*/
|
|
9920
|
+
className?: string
|
|
9921
|
+
/**
|
|
9922
|
+
* The style applied to the root element of the component.
|
|
9923
|
+
*/
|
|
9924
|
+
style?: React.CSSProperties
|
|
9925
|
+
/**
|
|
9926
|
+
* Whether the component is disabled.
|
|
9927
|
+
*/
|
|
9928
|
+
isDisabled?: boolean
|
|
9929
|
+
/**
|
|
9930
|
+
* The description to display.
|
|
9931
|
+
*/
|
|
9932
|
+
description?: string
|
|
9933
|
+
/**
|
|
9934
|
+
* The accepted file types, passed through to the underlying
|
|
9935
|
+
* \`<input type="file">\` \`accept\` attribute \u2014 a comma-separated list of MIME
|
|
9936
|
+
* types and/or extensions (e.g. \`"image/png,image/jpeg"\` or \`"image/*"\`).
|
|
9937
|
+
*/
|
|
9938
|
+
accept?: string
|
|
9939
|
+
/**
|
|
9940
|
+
* The name of the input.
|
|
9941
|
+
*/
|
|
9942
|
+
name?: string
|
|
9943
|
+
/**
|
|
9944
|
+
* The callback function that is fired when the value changes.
|
|
9945
|
+
*/
|
|
9946
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void
|
|
9947
|
+
/**
|
|
9948
|
+
* The callback function that is fired when the value changes and the value is
|
|
9949
|
+
* valid.
|
|
9950
|
+
*/
|
|
9951
|
+
onValueChange?: (files: File[]) => void
|
|
9952
|
+
/**
|
|
9953
|
+
* Identifies the element (or elements) that provide a detailed, extended
|
|
9954
|
+
* description for the object.
|
|
9955
|
+
*/
|
|
9956
|
+
aria-describedby?: string
|
|
9555
9957
|
/**
|
|
9556
9958
|
* The initial image to display. This will be used as the \`src\` attribute of
|
|
9557
9959
|
* the \`<img>\` element. You will be able to choose a new image.
|
|
@@ -9609,7 +10011,11 @@ maxFileSize?: number
|
|
|
9609
10011
|
* Callback fired when a dropped/pasted/selected file exceeds \`maxFileSize\`.
|
|
9610
10012
|
*/
|
|
9611
10013
|
onFileSizeError?: (file: File) => void
|
|
9612
|
-
|
|
10014
|
+
/**
|
|
10015
|
+
* Callback fired when a dropped/pasted/selected file's type does not match
|
|
10016
|
+
* \`accept\`.
|
|
10017
|
+
*/
|
|
10018
|
+
onFileTypeError?: (file: File) => void
|
|
9613
10019
|
}`,stories:{usage:[{id:"core-forms-imagedropzone--basic",name:"Basic",snippet:`const Basic = () => <ImageDropZone
|
|
9614
10020
|
style={{ width: 208, height: 100 }}
|
|
9615
10021
|
placeholder="Upload Image Above"
|
|
@@ -9691,6 +10097,14 @@ accept?: any
|
|
|
9691
10097
|
alert(
|
|
9692
10098
|
\`File "\${file.name}" (\${(file.size / 1024).toFixed(1)}KB) exceeds the 100KB limit.\`,
|
|
9693
10099
|
);
|
|
10100
|
+
}} />;`},{id:"core-forms-imagedropzone--with-file-type-restriction",name:"With File Type Restriction",snippet:`const WithFileTypeRestriction = () => <ImageDropZone
|
|
10101
|
+
style={{ width: 208, height: 100 }}
|
|
10102
|
+
placeholder="Upload Image Above"
|
|
10103
|
+
clearLabel="Clear Image"
|
|
10104
|
+
aria-label="Image Uploader"
|
|
10105
|
+
accept="image/png"
|
|
10106
|
+
onFileTypeError={(file: File) => {
|
|
10107
|
+
alert(\`File "\${file.name}" (\${file.type}) is not an accepted PNG image.\`);
|
|
9694
10108
|
}} />;`}],implementation:""},similarTo:[],figmaUrl:null},ImageGallery:{id:"core-collections-imagegallery",breadcrumb:"Core/Collections/ImageGallery",importStatement:`import {
|
|
9695
10109
|
Box,
|
|
9696
10110
|
ControlledImageGalleryExample,
|
|
@@ -9757,6 +10171,11 @@ The \`ImageGallery\` component optimizes long labels for touch and non-touch dev
|
|
|
9757
10171
|
| \`Shift + Space\` | Add current image to Selected Images |
|
|
9758
10172
|
| \`Enter\` | Select the current image for reorder |`,props:`interface ImageGalleryProps {
|
|
9759
10173
|
/**
|
|
10174
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
10175
|
+
* identifier; new components should exclude it via
|
|
10176
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10177
|
+
* Retained on existing components for backward compatibility.
|
|
10178
|
+
*
|
|
9760
10179
|
* The unique identifier for the block. This is used to identify the block in
|
|
9761
10180
|
* the DOM and in the block map. It is added as a data attribute
|
|
9762
10181
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -9764,6 +10183,11 @@ The \`ImageGallery\` component optimizes long labels for touch and non-touch dev
|
|
|
9764
10183
|
*/
|
|
9765
10184
|
data-block-id?: string
|
|
9766
10185
|
/**
|
|
10186
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
10187
|
+
* marker; new components should exclude it via
|
|
10188
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10189
|
+
* Retained on existing components for backward compatibility.
|
|
10190
|
+
*
|
|
9767
10191
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
9768
10192
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
9769
10193
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -10457,6 +10881,11 @@ import { I18nProvider, InlineAlert } from "@baseline-ui/core";
|
|
|
10457
10881
|
</I18nProvider>;
|
|
10458
10882
|
\`\`\``,props:`interface InlineAlertProps {
|
|
10459
10883
|
/**
|
|
10884
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
10885
|
+
* identifier; new components should exclude it via
|
|
10886
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10887
|
+
* Retained on existing components for backward compatibility.
|
|
10888
|
+
*
|
|
10460
10889
|
* The unique identifier for the block. This is used to identify the block in
|
|
10461
10890
|
* the DOM and in the block map. It is added as a data attribute
|
|
10462
10891
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -10464,6 +10893,11 @@ import { I18nProvider, InlineAlert } from "@baseline-ui/core";
|
|
|
10464
10893
|
*/
|
|
10465
10894
|
data-block-id?: string
|
|
10466
10895
|
/**
|
|
10896
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
10897
|
+
* marker; new components should exclude it via
|
|
10898
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10899
|
+
* Retained on existing components for backward compatibility.
|
|
10900
|
+
*
|
|
10467
10901
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
10468
10902
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
10469
10903
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -11158,6 +11592,11 @@ const items = [
|
|
|
11158
11592
|
</InlineToolbar>;
|
|
11159
11593
|
\`\`\``,props:`interface InlineToolbarProps {
|
|
11160
11594
|
/**
|
|
11595
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
11596
|
+
* identifier; new components should exclude it via
|
|
11597
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11598
|
+
* Retained on existing components for backward compatibility.
|
|
11599
|
+
*
|
|
11161
11600
|
* The unique identifier for the block. This is used to identify the block in
|
|
11162
11601
|
* the DOM and in the block map. It is added as a data attribute
|
|
11163
11602
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -11165,6 +11604,11 @@ const items = [
|
|
|
11165
11604
|
*/
|
|
11166
11605
|
data-block-id?: string
|
|
11167
11606
|
/**
|
|
11607
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
11608
|
+
* marker; new components should exclude it via
|
|
11609
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11610
|
+
* Retained on existing components for backward compatibility.
|
|
11611
|
+
*
|
|
11168
11612
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
11169
11613
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
11170
11614
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -11422,6 +11866,11 @@ isDisabled?: boolean
|
|
|
11422
11866
|
*/
|
|
11423
11867
|
elementType?: string
|
|
11424
11868
|
/**
|
|
11869
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
11870
|
+
* identifier; new components should exclude it via
|
|
11871
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11872
|
+
* Retained on existing components for backward compatibility.
|
|
11873
|
+
*
|
|
11425
11874
|
* The unique identifier for the block. This is used to identify the block in
|
|
11426
11875
|
* the DOM and in the block map. It is added as a data attribute
|
|
11427
11876
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -11429,6 +11878,11 @@ elementType?: string
|
|
|
11429
11878
|
*/
|
|
11430
11879
|
data-block-id?: string
|
|
11431
11880
|
/**
|
|
11881
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
11882
|
+
* marker; new components should exclude it via
|
|
11883
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11884
|
+
* Retained on existing components for backward compatibility.
|
|
11885
|
+
*
|
|
11432
11886
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
11433
11887
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
11434
11888
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -11522,6 +11976,11 @@ role?: AriaRole
|
|
|
11522
11976
|
}}
|
|
11523
11977
|
elementType="span">Client side Link</Link>;`}],implementation:""},similarTo:[],figmaUrl:null},ListBox:{id:"core-collections-listbox",breadcrumb:"Core/Collections/ListBox",importStatement:'import { Box, DragAndDropListBoxExample, DynamicListBoxExample, ListBox, Text } from "@baseline-ui/core";',description:"`ListBox` presents a scrollable list of options that users can select with a pointer or keyboard. Use it when selection should happen inline rather than inside a dropdown, such as in a sidebar or settings panel.",documentation:"`ListBox` presents a scrollable list of options that users can select with a pointer or keyboard. Use it when selection should happen inline rather than inside a dropdown, such as in a sidebar or settings panel.",props:`interface ListBoxProps {
|
|
11524
11978
|
/**
|
|
11979
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
11980
|
+
* identifier; new components should exclude it via
|
|
11981
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11982
|
+
* Retained on existing components for backward compatibility.
|
|
11983
|
+
*
|
|
11525
11984
|
* The unique identifier for the block. This is used to identify the block in
|
|
11526
11985
|
* the DOM and in the block map. It is added as a data attribute
|
|
11527
11986
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -11529,6 +11988,11 @@ role?: AriaRole
|
|
|
11529
11988
|
*/
|
|
11530
11989
|
data-block-id?: string
|
|
11531
11990
|
/**
|
|
11991
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
11992
|
+
* marker; new components should exclude it via
|
|
11993
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11994
|
+
* Retained on existing components for backward compatibility.
|
|
11995
|
+
*
|
|
11532
11996
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
11533
11997
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
11534
11998
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -12185,6 +12649,11 @@ This is will be rendered as HTML.
|
|
|
12185
12649
|
};
|
|
12186
12650
|
\`\`\``,props:`interface MarkdownProps {
|
|
12187
12651
|
/**
|
|
12652
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
12653
|
+
* identifier; new components should exclude it via
|
|
12654
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12655
|
+
* Retained on existing components for backward compatibility.
|
|
12656
|
+
*
|
|
12188
12657
|
* The unique identifier for the block. This is used to identify the block in
|
|
12189
12658
|
* the DOM and in the block map. It is added as a data attribute
|
|
12190
12659
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -12192,6 +12661,11 @@ This is will be rendered as HTML.
|
|
|
12192
12661
|
*/
|
|
12193
12662
|
data-block-id?: string
|
|
12194
12663
|
/**
|
|
12664
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
12665
|
+
* marker; new components should exclude it via
|
|
12666
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12667
|
+
* Retained on existing components for backward compatibility.
|
|
12668
|
+
*
|
|
12195
12669
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
12196
12670
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
12197
12671
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -12767,6 +13241,30 @@ export const LongModalExample: React.FC<
|
|
|
12767
13241
|
);
|
|
12768
13242
|
};
|
|
12769
13243
|
|
|
13244
|
+
export const DisableAnimationModalExample: React.FC<
|
|
13245
|
+
TestComponentProps & { defaultOpen?: boolean; disableAnimation?: boolean }
|
|
13246
|
+
> = ({ enableInert, defaultOpen = true, disableAnimation }) => {
|
|
13247
|
+
const id = useId();
|
|
13248
|
+
return (
|
|
13249
|
+
<Modal defaultOpen={defaultOpen}>
|
|
13250
|
+
<ModalTrigger>
|
|
13251
|
+
<ActionButton label="Open Modal" />
|
|
13252
|
+
</ModalTrigger>
|
|
13253
|
+
<ModalContent
|
|
13254
|
+
disableAnimation={disableAnimation}
|
|
13255
|
+
UNSAFE_enableInert={enableInert}
|
|
13256
|
+
>
|
|
13257
|
+
<Dialog aria-labelledby={id}>
|
|
13258
|
+
<VisuallyHidden>
|
|
13259
|
+
<Text id={id}>Animation example</Text>
|
|
13260
|
+
</VisuallyHidden>
|
|
13261
|
+
<Text>Modal body</Text>
|
|
13262
|
+
</Dialog>
|
|
13263
|
+
</ModalContent>
|
|
13264
|
+
</Modal>
|
|
13265
|
+
);
|
|
13266
|
+
};
|
|
13267
|
+
|
|
12770
13268
|
/**
|
|
12771
13269
|
* Example with form controls inside a Modal. Used to verify pointer
|
|
12772
13270
|
* interactions work correctly with all input devices.
|
|
@@ -13054,6 +13552,11 @@ value: number
|
|
|
13054
13552
|
);
|
|
13055
13553
|
};`}],implementation:""},similarTo:[],figmaUrl:null},NumberInput:{id:"core-forms-numberinput",breadcrumb:"Core/Forms/NumberInput",importStatement:'import { NumberInput, VariantViewer } from "@baseline-ui/core";',description:"`NumberInput` is a text field for entering numeric values, with stepper buttons, min/max clamping, and locale-aware formatting. Use it when collecting a single number such as a quantity, price, or measurement.",documentation:'`NumberInput` is a text field for entering numeric values, with stepper buttons, min/max clamping, and locale-aware formatting. Use it when collecting a single number such as a quantity, price, or measurement.\n\n* Formatting and parsing of internationalised numbers, such as decimals, percentages, currency values, and units\n* Automatically finds the numbering system being used and can parse numbers that are not in the default numbering system for the locale.\n* Checks the user\'s keystrokes as they type to make sure they are valid numbers according to the locale and numbering system.\n* Chooses an appropriate software keyboard for mobile based on the current platform and allowed values.\n* Supports rounding to a configurable number of fraction digits. Supports clamping the value between a configurable minimum and maximum and snapping to a step value.\n* Allows you to keep going up or down by pressing and holding the stepper buttons. - Allows you to go up or down by using the scroll wheel.\n* Exposed to assistive technology as a text field with a custom, locally-tailored role description using ARIA\n* Follows the [spinbutton](https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/) ARIA pattern. Gets around bugs in VoiceOver with the spinbutton role.\n* Uses an ARIA live region to make sure that value changes are announced.\n* Supports description and error message help text linked to the input via ARIA.\n\n```jsx\nimport { NumberInput } from "../../utils";\n\n<NumberInput placeholder="Placeholder" />;\n```\n\nThe `NumberInput` component supports the following variants: `primary` and `ghost`.\n\n```jsx\n<NumberInput placeholder="Placeholder" variant="primary" />\n<NumberInput placeholder="Placeholder" variant="ghost" />\n```\n\nThe `NumberInput` component supports the `isReadOnly` prop to make the input read-only.\n\n```jsx\n<NumberInput placeholder="Placeholder" isReadOnly value={5} />\n```\n\nThe `NumberInput` component supports the `isDisabled` prop to disable the input.\n\n```jsx\n<NumberInput placeholder="Placeholder" isDisabled value={5} />\n```\n\nThe `NumberInput` component supports the `value` prop to control the value of the input. The `onChange` event is triggered when the value changes. This happens when the user types a value and blurs the input, or when incrementing or decrementing the value. It does not happen as the user types because partial input may not be parseable to a valid number.\n\n```jsx\n<NumberInput placeholder="Placeholder" value={5} onChange={console.log} />\n```\n\nTo clamp the value between a minimum and maximum value, the `minValue` and `maxValue` props are supported by the `NumberInput` component. If you provide either `maxValue` or `minValue` instead of both, you can make ranges open ended.\n\nIt is a good idea to give NumberField the valid range in advance so that it can optimise the experience. For example, on iOS, you can use a numeric keyboard instead of a full text keyboard (which requires you to enter a minus sign) when the minimum value is greater than or equal to zero.\n\n```jsx\n<NumberInput placeholder="Placeholder" minValue={0} maxValue={10} />\n```\n\nYou can use the `step` prop to snap the value to certain steps. If a `minValue` is set, the steps are worked out starting from the lowest value. For example, if `minValue` is set to 2 and step is set to 3, the valid step values are 2, 5, 8, 11, etc. If no `minValue` is set, the steps are calculated from zero in both directions if there is no `minValue`. To put it another way, so that the values are evenly divided by the step. If no step is set, any decimal value can be typed, but incrementing or decrementing the value changes it to a whole number.\n\nIf the user types a value that is between two steps and then blurs the input, the value will be snapped to the nearest step. When you increase or decrease a value, it jumps to the next step that is either higher or lower. When starting with an empty field and going up or down, the value starts at the `minValue` or `maxValue`, if they are set. If not, the number starts at 0.\n\n```jsx\n<NumberInput\n placeholder="Placeholder"\n step={3}\n defaultValue={2}\n minValue={2}\n formatOptions={{ style: "decimal", maximumFractionDigits: 1 }}\n/>\n```\n\nThe `NumberInput` component supports the `errorMessage` prop to display an error message below the input. The `isInvalid` prop can be used to indicate that the input is invalid. If the `isInvalid` prop is set to `true`, the input will be styled with an error state.\n\n```jsx\n<NumberInput placeholder="Placeholder" errorMessage="Error Message" isInvalid />\n```\n\n`NumberInput` automatically takes care of many parts of internationalisation, such as formatting and parsing numbers based on the current locale and numbering system. Also, the "increment" and "decrement" buttons have ARIA labels that are localised for each language.\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| \\[data-invalid] | Whether the component is invalid. |\n\n| Key | Function |\n| --------------- | ------------------------------------- |\n| <kbd>Up</kbd> | Increment the value by the step value |\n| <kbd>Down</kbd> | Decrement the value by the step value |\n\n```\n```',props:`interface NumberInputProps {
|
|
13056
13554
|
/**
|
|
13555
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
13556
|
+
* identifier; new components should exclude it via
|
|
13557
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
13558
|
+
* Retained on existing components for backward compatibility.
|
|
13559
|
+
*
|
|
13057
13560
|
* The unique identifier for the block. This is used to identify the block in
|
|
13058
13561
|
* the DOM and in the block map. It is added as a data attribute
|
|
13059
13562
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -13061,6 +13564,11 @@ value: number
|
|
|
13061
13564
|
*/
|
|
13062
13565
|
data-block-id?: string
|
|
13063
13566
|
/**
|
|
13567
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
13568
|
+
* marker; new components should exclude it via
|
|
13569
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
13570
|
+
* Retained on existing components for backward compatibility.
|
|
13571
|
+
*
|
|
13064
13572
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
13065
13573
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
13066
13574
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -13484,6 +13992,11 @@ import { I18nProvider, Pagination } from "@baseline-ui/core";
|
|
|
13484
13992
|
</I18nProvider>;
|
|
13485
13993
|
\`\`\``,props:`interface PaginationProps {
|
|
13486
13994
|
/**
|
|
13995
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
13996
|
+
* identifier; new components should exclude it via
|
|
13997
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
13998
|
+
* Retained on existing components for backward compatibility.
|
|
13999
|
+
*
|
|
13487
14000
|
* The unique identifier for the block. This is used to identify the block in
|
|
13488
14001
|
* the DOM and in the block map. It is added as a data attribute
|
|
13489
14002
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -13491,6 +14004,11 @@ import { I18nProvider, Pagination } from "@baseline-ui/core";
|
|
|
13491
14004
|
*/
|
|
13492
14005
|
data-block-id?: string
|
|
13493
14006
|
/**
|
|
14007
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
14008
|
+
* marker; new components should exclude it via
|
|
14009
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14010
|
+
* Retained on existing components for backward compatibility.
|
|
14011
|
+
*
|
|
13494
14012
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
13495
14013
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
13496
14014
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -13766,6 +14284,11 @@ Panels can be conditionally rendered:
|
|
|
13766
14284
|
|
|
13767
14285
|
* **Separator** \u2014 use for a visual divider that is not resizable.`,props:`interface PanelProps {
|
|
13768
14286
|
/**
|
|
14287
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
14288
|
+
* identifier; new components should exclude it via
|
|
14289
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14290
|
+
* Retained on existing components for backward compatibility.
|
|
14291
|
+
*
|
|
13769
14292
|
* The unique identifier for the block. This is used to identify the block in
|
|
13770
14293
|
* the DOM and in the block map. It is added as a data attribute
|
|
13771
14294
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -13773,6 +14296,11 @@ Panels can be conditionally rendered:
|
|
|
13773
14296
|
*/
|
|
13774
14297
|
data-block-id?: string
|
|
13775
14298
|
/**
|
|
14299
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
14300
|
+
* marker; new components should exclude it via
|
|
14301
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14302
|
+
* Retained on existing components for backward compatibility.
|
|
14303
|
+
*
|
|
13776
14304
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
13777
14305
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
13778
14306
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -14945,6 +15473,7 @@ export const TrailingElementExample = () => {
|
|
|
14945
15473
|
PopoverEventLeakFixExample,
|
|
14946
15474
|
PopoverExample,
|
|
14947
15475
|
PopoverNoBoundaryExample,
|
|
15476
|
+
PopoverTriggerWidthExample,
|
|
14948
15477
|
PopoverWithScrollableContentExample,
|
|
14949
15478
|
PopoverWithScrollableViewportExample,
|
|
14950
15479
|
Tooltip,
|
|
@@ -15066,6 +15595,11 @@ defaultOpen?: boolean
|
|
|
15066
15595
|
*/
|
|
15067
15596
|
onOpenChange?: (isOpen: boolean) => void
|
|
15068
15597
|
/**
|
|
15598
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
15599
|
+
* identifier; new components should exclude it via
|
|
15600
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
15601
|
+
* Retained on existing components for backward compatibility.
|
|
15602
|
+
*
|
|
15069
15603
|
* The unique identifier for the block. This is used to identify the block in
|
|
15070
15604
|
* the DOM and in the block map. It is added as a data attribute
|
|
15071
15605
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -15073,6 +15607,11 @@ onOpenChange?: (isOpen: boolean) => void
|
|
|
15073
15607
|
*/
|
|
15074
15608
|
data-block-id?: string
|
|
15075
15609
|
/**
|
|
15610
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
15611
|
+
* marker; new components should exclude it via
|
|
15612
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
15613
|
+
* Retained on existing components for backward compatibility.
|
|
15614
|
+
*
|
|
15076
15615
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
15077
15616
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
15078
15617
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -15146,7 +15685,7 @@ children: React.ReactNode
|
|
|
15146
15685
|
placement: "bottom start",
|
|
15147
15686
|
}}
|
|
15148
15687
|
/>
|
|
15149
|
-
);`},{id:"core-overlays-popover--with-boundary-element",name:"With Boundary Element",snippet:"const WithBoundaryElement = (args) => <PopoverBoundaryElementExample popoverProps={args} />;"},{id:"core-overlays-popover--with-no-boundary",name:"With No Boundary",snippet:"const WithNoBoundary = () => <PopoverNoBoundaryExample />;"}],implementation:`import { sprinkles, themeVars } from "@baseline-ui/tokens";
|
|
15688
|
+
);`},{id:"core-overlays-popover--with-boundary-element",name:"With Boundary Element",snippet:"const WithBoundaryElement = (args) => <PopoverBoundaryElementExample popoverProps={args} />;"},{id:"core-overlays-popover--with-no-boundary",name:"With No Boundary",snippet:"const WithNoBoundary = () => <PopoverNoBoundaryExample />;"},{id:"core-overlays-popover--with-dynamic-trigger-width",name:"With Dynamic Trigger Width",snippet:"const WithDynamicTriggerWidth = (args) => <PopoverTriggerWidthExample popoverProps={args} />;"}],implementation:`import { sprinkles, themeVars } from "@baseline-ui/tokens";
|
|
15150
15689
|
import { ScrollBox } from "@pw/utils/components";
|
|
15151
15690
|
import { mergeRefs } from "@react-aria/utils";
|
|
15152
15691
|
import React, { useEffect, useRef, useState } from "react";
|
|
@@ -15260,6 +15799,61 @@ export const PopoverCustomTargetExample = ({
|
|
|
15260
15799
|
);
|
|
15261
15800
|
};
|
|
15262
15801
|
|
|
15802
|
+
export const PopoverTriggerWidthExample: React.FC<{
|
|
15803
|
+
popoverProps?: Omit<PopoverProps, "children">;
|
|
15804
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
15805
|
+
initialWidth?: number;
|
|
15806
|
+
}> = ({
|
|
15807
|
+
popoverProps = { type: "dialog" },
|
|
15808
|
+
popoverContentProps,
|
|
15809
|
+
initialWidth = 240,
|
|
15810
|
+
}) => {
|
|
15811
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
15812
|
+
const [width, setWidth] = useState(initialWidth);
|
|
15813
|
+
|
|
15814
|
+
return (
|
|
15815
|
+
<Box
|
|
15816
|
+
display="flex"
|
|
15817
|
+
flexDirection="column"
|
|
15818
|
+
gap="lg"
|
|
15819
|
+
padding="xl"
|
|
15820
|
+
alignItems="flex-start"
|
|
15821
|
+
>
|
|
15822
|
+
<ActionButton
|
|
15823
|
+
label="Grow trigger"
|
|
15824
|
+
onPress={() => {
|
|
15825
|
+
setWidth((w) => w + 80);
|
|
15826
|
+
}}
|
|
15827
|
+
/>
|
|
15828
|
+
<Popover {...popoverProps}>
|
|
15829
|
+
<Box ref={triggerRef} data-testid="width-trigger" style={{ width }}>
|
|
15830
|
+
<PopoverTrigger>
|
|
15831
|
+
<ActionButton label="Open" style={{ width: "100%" }} />
|
|
15832
|
+
</PopoverTrigger>
|
|
15833
|
+
</Box>
|
|
15834
|
+
<PopoverContent
|
|
15835
|
+
placement="bottom"
|
|
15836
|
+
triggerRef={triggerRef}
|
|
15837
|
+
isNonModal={true}
|
|
15838
|
+
shouldCloseOnInteractOutside={() => false}
|
|
15839
|
+
{...popoverContentProps}
|
|
15840
|
+
>
|
|
15841
|
+
<Dialog
|
|
15842
|
+
size="content"
|
|
15843
|
+
aria-label="content"
|
|
15844
|
+
className={sprinkles({ padding: "md" })}
|
|
15845
|
+
// Fill the trigger-matched container so the bordered content spans
|
|
15846
|
+
// the full width instead of hugging its text.
|
|
15847
|
+
style={{ width: "100%" }}
|
|
15848
|
+
>
|
|
15849
|
+
<Text type="label">Width-matched popover</Text>
|
|
15850
|
+
</Dialog>
|
|
15851
|
+
</PopoverContent>
|
|
15852
|
+
</Popover>
|
|
15853
|
+
</Box>
|
|
15854
|
+
);
|
|
15855
|
+
};
|
|
15856
|
+
|
|
15263
15857
|
export const PopoverArrowExample: React.FC<
|
|
15264
15858
|
Omit<
|
|
15265
15859
|
PopoverProps & {
|
|
@@ -16223,6 +16817,11 @@ shouldContainFocus?: boolean
|
|
|
16223
16817
|
*/
|
|
16224
16818
|
isExiting?: boolean
|
|
16225
16819
|
/**
|
|
16820
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
16821
|
+
* identifier; new components should exclude it via
|
|
16822
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
16823
|
+
* Retained on existing components for backward compatibility.
|
|
16824
|
+
*
|
|
16226
16825
|
* The unique identifier for the block. This is used to identify the block in
|
|
16227
16826
|
* the DOM and in the block map. It is added as a data attribute
|
|
16228
16827
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16230,6 +16829,11 @@ isExiting?: boolean
|
|
|
16230
16829
|
*/
|
|
16231
16830
|
data-block-id?: string
|
|
16232
16831
|
/**
|
|
16832
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
16833
|
+
* marker; new components should exclude it via
|
|
16834
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
16835
|
+
* Retained on existing components for backward compatibility.
|
|
16836
|
+
*
|
|
16233
16837
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16234
16838
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16235
16839
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16278,6 +16882,11 @@ The \`Preview\` component can be disabled. When disabled, the preview is not int
|
|
|
16278
16882
|
\`\`\`
|
|
16279
16883
|
\`\`\``,props:`interface PreviewProps {
|
|
16280
16884
|
/**
|
|
16885
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
16886
|
+
* identifier; new components should exclude it via
|
|
16887
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
16888
|
+
* Retained on existing components for backward compatibility.
|
|
16889
|
+
*
|
|
16281
16890
|
* The unique identifier for the block. This is used to identify the block in
|
|
16282
16891
|
* the DOM and in the block map. It is added as a data attribute
|
|
16283
16892
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16285,6 +16894,11 @@ The \`Preview\` component can be disabled. When disabled, the preview is not int
|
|
|
16285
16894
|
*/
|
|
16286
16895
|
data-block-id?: string
|
|
16287
16896
|
/**
|
|
16897
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
16898
|
+
* marker; new components should exclude it via
|
|
16899
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
16900
|
+
* Retained on existing components for backward compatibility.
|
|
16901
|
+
*
|
|
16288
16902
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16289
16903
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16290
16904
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16467,6 +17081,11 @@ accent?: "theme" | "positive"
|
|
|
16467
17081
|
isDisabled
|
|
16468
17082
|
svgSrc={svgComponent} />;`}],implementation:""},similarTo:[],figmaUrl:null},ProgressBar:{id:"core-status-progressbar",breadcrumb:"Core/Status/ProgressBar",importStatement:'import { ProgressBar, VariantViewer } from "@baseline-ui/core";',description:"`ProgressBar` is a horizontal indicator that fills to reflect how much of a determinate task has completed. Use it for operations with measurable progress such as file uploads, downloads, or installations.",documentation:'`ProgressBar` is a horizontal indicator that fills to reflect how much of a determinate task has completed. Use it for operations with measurable progress such as file uploads, downloads, or installations.\n\n* The component is exposed to the assistive technology as a progress bar.\n* It includes labels that improve accessibility and provide a visual indication of the progress.\n* It supports international number formatting of numbers.\n\n```jsx\nimport { ProgressBar } from "../../utils";\n\n<ProgressBar aria-label="Progress" value={50} />;\n```\n\nThe progress bar component has three variants: `active`, `success`, and `error`. The `active` variant is the default.\n\n```jsx\n<ProgressBar label="Label" value={50} />\n<ProgressBar label="Label" value={50} variant="success" />\n<ProgressBar label="Label" value={50} variant="error" />\n```\n\nYou can customize the scale of the progress bar by passing the `minValue` and `maxValue` props.\n\nYou can customize the number formatter by passing the `formatOptions` prop. In the example below, we are formatting the number as currency (USD).\n\nYou can customize the value label by passing the `valueLabel` prop. In the example below, we are using a custom value label that displays the value as "50 out of 100".',props:`interface ProgressBarProps {
|
|
16469
17083
|
/**
|
|
17084
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17085
|
+
* identifier; new components should exclude it via
|
|
17086
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17087
|
+
* Retained on existing components for backward compatibility.
|
|
17088
|
+
*
|
|
16470
17089
|
* The unique identifier for the block. This is used to identify the block in
|
|
16471
17090
|
* the DOM and in the block map. It is added as a data attribute
|
|
16472
17091
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16474,6 +17093,11 @@ accent?: "theme" | "positive"
|
|
|
16474
17093
|
*/
|
|
16475
17094
|
data-block-id?: string
|
|
16476
17095
|
/**
|
|
17096
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17097
|
+
* marker; new components should exclude it via
|
|
17098
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17099
|
+
* Retained on existing components for backward compatibility.
|
|
17100
|
+
*
|
|
16477
17101
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16478
17102
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16479
17103
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16589,6 +17213,11 @@ errorMessage?: string
|
|
|
16589
17213
|
formatOptions={{ style: "currency", currency: "USD" }}
|
|
16590
17214
|
showValue />;`},{id:"core-status-progressbar--with-custom-value-label",name:"With Custom Value Label",snippet:'const WithCustomValueLabel = () => <ProgressBar label="Label" value={50} valueLabel="50 out of 100" showValue />;'}],implementation:""},similarTo:[],figmaUrl:null},ProgressSpinner:{id:"core-status-progressspinner",breadcrumb:"Core/Status/ProgressSpinner",importStatement:'import { ProgressSpinner, VariantViewer } from "@baseline-ui/core";',description:"`ProgressSpinner` is an animated indicator that signals an ongoing operation of indeterminate duration. Use it when the user is waiting on a task and you can't report a meaningful percentage of completion.",documentation:'`ProgressSpinner` is an animated indicator that signals an ongoing operation of indeterminate duration. Use it when the user is waiting on a task and you can\'t report a meaningful percentage of completion.\n\n```jsx\nimport { ProgressSpinner } from "../../utils";\n\n<ProgressSpinner aria-label={"Label"} />;\n```\n\nThe `ProgressSpinner` component comes in four variants: `active`, `inactive`, `success` and `error`. The default variant is `active`.\n\n```jsx\nimport { ProgressSpinner } from "../../utils";\n\n<ProgressSpinner aria-label={"Label"} />\n<ProgressSpinner aria-label={"Label"} variant={"inactive"} />\n<ProgressSpinner aria-label={"Label"} variant={"success"} />\n<ProgressSpinner aria-label={"Label"} variant={"error"} />\n```\n\nThe `ProgressSpinner` component comes in two sizes: `sm` and `md`. The default size is `md`.\n\n```jsx\nimport { ProgressSpinner } from "../../utils";\n\n<ProgressSpinner aria-label={"Label"} size={"sm"} />\n<ProgressSpinner aria-label={"Label"} size={"md"} />\n```\n\nYou can provide a label to the `ProgressSpinner` component using the `label` prop.\n\n```jsx\nimport { ProgressSpinner } from "../../utils";\n\n<ProgressSpinner aria-label={"Label"} label={"Label"} />;\n<ProgressSpinner aria-label={"Label"} label={"Label"} size={"sm"} />;\n```',props:`interface ProgressSpinnerProps {
|
|
16591
17215
|
/**
|
|
17216
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17217
|
+
* identifier; new components should exclude it via
|
|
17218
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17219
|
+
* Retained on existing components for backward compatibility.
|
|
17220
|
+
*
|
|
16592
17221
|
* The unique identifier for the block. This is used to identify the block in
|
|
16593
17222
|
* the DOM and in the block map. It is added as a data attribute
|
|
16594
17223
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16596,6 +17225,11 @@ errorMessage?: string
|
|
|
16596
17225
|
*/
|
|
16597
17226
|
data-block-id?: string
|
|
16598
17227
|
/**
|
|
17228
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17229
|
+
* marker; new components should exclude it via
|
|
17230
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17231
|
+
* Retained on existing components for backward compatibility.
|
|
17232
|
+
*
|
|
16599
17233
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16600
17234
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16601
17235
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16749,6 +17383,11 @@ Use the \`renderOption\` prop to fully customize how each radio option looks. Th
|
|
|
16749
17383
|
|
|
16750
17384
|
* **[Select](/story/core-forms-select--basic)** \u2014 Use for long lists of options where a dropdown is more space-efficient than a list of visible radio buttons.`,props:`interface RadioGroupProps {
|
|
16751
17385
|
/**
|
|
17386
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17387
|
+
* identifier; new components should exclude it via
|
|
17388
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17389
|
+
* Retained on existing components for backward compatibility.
|
|
17390
|
+
*
|
|
16752
17391
|
* The unique identifier for the block. This is used to identify the block in
|
|
16753
17392
|
* the DOM and in the block map. It is added as a data attribute
|
|
16754
17393
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16756,6 +17395,11 @@ Use the \`renderOption\` prop to fully customize how each radio option looks. Th
|
|
|
16756
17395
|
*/
|
|
16757
17396
|
data-block-id?: string
|
|
16758
17397
|
/**
|
|
17398
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17399
|
+
* marker; new components should exclude it via
|
|
17400
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17401
|
+
* Retained on existing components for backward compatibility.
|
|
17402
|
+
*
|
|
16759
17403
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16760
17404
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16761
17405
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16979,6 +17623,11 @@ import { Reaction } from "../../utils";
|
|
|
16979
17623
|
| ------- | -------------------- |
|
|
16980
17624
|
| \`Space\` | Toggles the reaction |`,props:`interface ReactionProps {
|
|
16981
17625
|
/**
|
|
17626
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17627
|
+
* identifier; new components should exclude it via
|
|
17628
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17629
|
+
* Retained on existing components for backward compatibility.
|
|
17630
|
+
*
|
|
16982
17631
|
* The unique identifier for the block. This is used to identify the block in
|
|
16983
17632
|
* the DOM and in the block map. It is added as a data attribute
|
|
16984
17633
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16986,6 +17635,11 @@ import { Reaction } from "../../utils";
|
|
|
16986
17635
|
*/
|
|
16987
17636
|
data-block-id?: string
|
|
16988
17637
|
/**
|
|
17638
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17639
|
+
* marker; new components should exclude it via
|
|
17640
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17641
|
+
* Retained on existing components for backward compatibility.
|
|
17642
|
+
*
|
|
16989
17643
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16990
17644
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16991
17645
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -17123,6 +17777,11 @@ The \`smoothScroll\` prop can be used to disable smooth scrolling.
|
|
|
17123
17777
|
| \`Enter\` | Scrolls to bottom |
|
|
17124
17778
|
| \`Space\` | Scrolls to bottom |`,props:`interface ScrollControlButtonProps {
|
|
17125
17779
|
/**
|
|
17780
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17781
|
+
* identifier; new components should exclude it via
|
|
17782
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17783
|
+
* Retained on existing components for backward compatibility.
|
|
17784
|
+
*
|
|
17126
17785
|
* The unique identifier for the block. This is used to identify the block in
|
|
17127
17786
|
* the DOM and in the block map. It is added as a data attribute
|
|
17128
17787
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -17130,6 +17789,11 @@ The \`smoothScroll\` prop can be used to disable smooth scrolling.
|
|
|
17130
17789
|
*/
|
|
17131
17790
|
data-block-id?: string
|
|
17132
17791
|
/**
|
|
17792
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17793
|
+
* marker; new components should exclude it via
|
|
17794
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17795
|
+
* Retained on existing components for backward compatibility.
|
|
17796
|
+
*
|
|
17133
17797
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
17134
17798
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
17135
17799
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -17333,6 +17997,11 @@ export const ScrollControlButtonReversedExample: React.FC<
|
|
|
17333
17997
|
);
|
|
17334
17998
|
};`},similarTo:[],figmaUrl:null},SearchInput:{id:"core-forms-searchinput",breadcrumb:"Core/Forms/SearchInput",importStatement:'import { SearchInput, VariantViewer } from "@baseline-ui/core";',description:"`SearchInput` is a single-line text field with a search icon and clear button for entering and submitting queries. Use it when users need to filter a list or search for content within a page.",documentation:'`SearchInput` is a single-line text field with a search icon and clear button for entering and submitting queries. Use it when users need to filter a list or search for content within a page.\n\n* Built with a native `<input type="search">` element\n* Visual and ARIA labeling support\n* Custom clear button support with internationalized label for accessibility\n* Support for description and error message help text linked to the input via ARIA\n\n```jsx\nimport { SearchInput } from "../../utils";\n\n<SearchInput aria-label="Label" />;\n```\n\nThe `SearchInput` component has two variants: `primary` and `ghost`.\n\n```jsx\nimport { SearchInput } from "../../utils";\n\n<SearchInput aria-label="Label" placeholder="Search" variant="primary" />\n<SearchInput aria-label="Label" placeholder="Search" variant="ghost" />\n```\n\nThe `SearchInput` component has three sizes: `sm`, `md`, and `lg`. The default size is `md`.\n\n```jsx\nimport { SearchInput } from "../../utils";\n\n<SearchInput aria-label="Label" placeholder="Search" size="sm" />\n<SearchInput aria-label="Label" placeholder="Search" size="md" />\n<SearchInput aria-label="Label" placeholder="Search" size="lg" />\n```\n\nThe `SearchInput` component can be disabled by setting the `isDisabled` prop to `true`.\n\n```jsx\nimport { SearchInput } from "../../utils";\n\n<SearchInput aria-label="Label" placeholder="Search" isDisabled />;\n```\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-focus-visible] | Whether the component is keyboard focused. |\n\n| Key | Function |\n| ------- | ------------------------ |\n| `Enter` | Submits the search query |\n| `Esc` | Clears the search query |',props:`interface SearchInputProps {
|
|
17335
17999
|
/**
|
|
18000
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
18001
|
+
* identifier; new components should exclude it via
|
|
18002
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18003
|
+
* Retained on existing components for backward compatibility.
|
|
18004
|
+
*
|
|
17336
18005
|
* The unique identifier for the block. This is used to identify the block in
|
|
17337
18006
|
* the DOM and in the block map. It is added as a data attribute
|
|
17338
18007
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -17340,6 +18009,11 @@ export const ScrollControlButtonReversedExample: React.FC<
|
|
|
17340
18009
|
*/
|
|
17341
18010
|
data-block-id?: string
|
|
17342
18011
|
/**
|
|
18012
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
18013
|
+
* marker; new components should exclude it via
|
|
18014
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18015
|
+
* Retained on existing components for backward compatibility.
|
|
18016
|
+
*
|
|
17343
18017
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
17344
18018
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
17345
18019
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -17780,6 +18454,11 @@ import { EllipseIcon } from "@baseline-ui/icons/24";
|
|
|
17780
18454
|
|
|
17781
18455
|
The \`IconSelect\` component supports adding a tooltip to the trigger button which is enabled by default. The tooltip will be the same as the \`aria-label\` of the trigger button. If you want to disable the tooltip, you can set the \`tooltip\` prop to \`false\`. You can also disable the icon tooltip separately by setting \`iconTooltip\` to \`false\`.`,props:`interface SelectProps {
|
|
17782
18456
|
/**
|
|
18457
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
18458
|
+
* identifier; new components should exclude it via
|
|
18459
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18460
|
+
* Retained on existing components for backward compatibility.
|
|
18461
|
+
*
|
|
17783
18462
|
* The unique identifier for the block. This is used to identify the block in
|
|
17784
18463
|
* the DOM and in the block map. It is added as a data attribute
|
|
17785
18464
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -17787,6 +18466,11 @@ The \`IconSelect\` component supports adding a tooltip to the trigger button whi
|
|
|
17787
18466
|
*/
|
|
17788
18467
|
data-block-id?: string
|
|
17789
18468
|
/**
|
|
18469
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
18470
|
+
* marker; new components should exclude it via
|
|
18471
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18472
|
+
* Retained on existing components for backward compatibility.
|
|
18473
|
+
*
|
|
17790
18474
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
17791
18475
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
17792
18476
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -18210,6 +18894,11 @@ orientation?: "horizontal" | "vertical"
|
|
|
18210
18894
|
*/
|
|
18211
18895
|
elementType?: string
|
|
18212
18896
|
/**
|
|
18897
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
18898
|
+
* identifier; new components should exclude it via
|
|
18899
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18900
|
+
* Retained on existing components for backward compatibility.
|
|
18901
|
+
*
|
|
18213
18902
|
* The unique identifier for the block. This is used to identify the block in
|
|
18214
18903
|
* the DOM and in the block map. It is added as a data attribute
|
|
18215
18904
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -18217,6 +18906,11 @@ elementType?: string
|
|
|
18217
18906
|
*/
|
|
18218
18907
|
data-block-id?: string
|
|
18219
18908
|
/**
|
|
18909
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
18910
|
+
* marker; new components should exclude it via
|
|
18911
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18912
|
+
* Retained on existing components for backward compatibility.
|
|
18913
|
+
*
|
|
18220
18914
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
18221
18915
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
18222
18916
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -18447,6 +19141,11 @@ style?: React.CSSProperties
|
|
|
18447
19141
|
</Box>
|
|
18448
19142
|
);`}],implementation:""},similarTo:[],figmaUrl:null},Slider:{id:"core-forms-slider",breadcrumb:"Core/Forms/Slider",importStatement:'import { Slider } from "@baseline-ui/core";',description:"`Slider` is a draggable thumb on a track that lets users pick a numeric value between a minimum and maximum. Use it for continuous or stepped settings such as volume, opacity, or zoom level where approximate selection is acceptable.",documentation:'`Slider` is a draggable thumb on a track that lets users pick a numeric value between a minimum and maximum. Use it for continuous or stepped settings such as volume, opacity, or zoom level where approximate selection is acceptable.\n\n* Supports keyboard, mouse, and touch interactions.\n* Pressing on the track will move the thumb to that position.\n* Supports a number input that allows users to enter a value directly.\n* Supports a read only state.\n* Supports a disabled state.\n* Supports using the arrow keys, as well as page up/down, home, and end keys\n* Supports using the shift key to increment/decrement by ~10% of the range (page step).\n* Support for custom min, max, and step values with handling for rounding errors\n* Prevents text selection while dragging\n* Exposed to assistive technology as a group of slider elements via ARIA\n* Slider thumbs use hidden native input elements to support touch screen readers\n* Support for labeling the slider\n* Internationalized number formatting as a percentage or value\n\nYou can use the Slider component in your code like this:\n\n```jsx\nimport { Slider } from "@baseline-ui/core";\n\n<Slider\n aria-label="Opacity"\n value={50}\n minValue={0}\n maxValue={100}\n onChange={(value) => console.log(value)}\n/>;\n```\n\nYou can set the `step` prop to control the increment/decrement amount when using the keyboard to change the value. The default value is `1`. The below example shows how to set the `step` prop to `10`.\n\nYou can set the `minValue` and `maxValue` props to control the minimum and maximum allowed values. The default values are `0` and `100` respectively. The below example shows how to set `minValue` to `-100` and `maxValue` to `100`.\n\nYou can include a number input by setting the `includeNumberInput` prop to `true`. This will render a number input next to the slider that will allow users to enter a value directly.\n\nThe `Slider` component can be used in a read only state by setting the `isReadOnly` prop to `true`.\n\nIf you include a number input, the read-only state is applied to that input as well.\n\nThe `Slider` component can be used in a disabled state by setting the `isDisabled` prop to `true`.\n\nThe `value` prop can be used to control the value of the `Slider` component from outside of the component.\n\n```jsx\nimport React, { useState } from "react";\nimport { Slider } from "@baseline-ui/core";\n\nfunction App() {\n const [value, setValue] = useState(50);\n\n return (\n <Slider\n aria-label="Opacity"\n value={value}\n minValue={0}\n maxValue={100}\n onChange={(value) => setValue(value)}\n />\n );\n}\n```\n\nYou can also use `onChangeEnd` to only update state when the user finishes interacting (e.g., on mouse-up), which is useful for expensive state updates.\n\nThe Slider component is built with accessibility in mind. It supports keyboard interactions and is fully accessible to screen readers.\nIt follows the [WAI-ARIA Slider Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/slider/).\n\n| Keyboard Shortcuts | Description |\n| --------------------- | ----------------------------------------------- |\n| `Left Arrow` | Decrease value by `step` amount |\n| `Right Arrow` | Increase value by `step` amount |\n| `Up Arrow` | Increase value by `step` amount |\n| `Down Arrow` | Decrease value by `step` amount |\n| `Shift + Left Arrow` | Decrease value by ~10% of the range (page step) |\n| `Shift + Right Arrow` | Increase value by ~10% of the range (page step) |\n| `Shift + Up Arrow` | Increase value by ~10% of the range (page step) |\n| `Shift + Down Arrow` | Decrease value by ~10% of the range (page step) |\n| `Home` | Set value to the minimum allowed value |\n| `End` | Set value to the maximum allowed value |\n\nThe following data attributes are available on the thumb handle element (`.BaselineUI-Slider-ThumbHandle`):\n\n| Selector | Description |\n| ---------------------- | ---------------------------------------- |\n| `[data-disabled]` | Whether the slider is disabled. |\n| `[data-readonly]` | Whether the slider is read-only. |\n| `[data-hovered]` | Whether the thumb is currently hovered. |\n| `[data-focused]` | Whether the thumb is focused. |\n| `[data-focus-visible]` | Whether the thumb has keyboard focus. |\n| `[data-dragging]` | Whether the thumb is currently dragging. |\n\nThe `IconSlider` component displays an icon and a value button. Clicking the button opens a popover containing a `Slider` for adjusting the value.\n\n```jsx\nimport { LineWidthIcon } from "@baseline-ui/icons/24";\nimport { IconSlider } from "@baseline-ui/core";\n\n<IconSlider\n aria-label="Line width"\n value={50}\n minValue={0}\n maxValue={100}\n onChange={(value) => console.log(value)}\n icon={LineWidthIcon}\n/>;\n```\n\nYou can disable the trigger tooltip and icon tooltip by setting `tooltip={false}` and `iconTooltip={false}`.\n\n`IconSlider` passes `includeNumberInput` through to the inner `Slider`, which lets users adjust the value with either the slider thumb or a numeric field inside the popover.',props:`interface SliderProps {
|
|
18449
19143
|
/**
|
|
19144
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
19145
|
+
* identifier; new components should exclude it via
|
|
19146
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19147
|
+
* Retained on existing components for backward compatibility.
|
|
19148
|
+
*
|
|
18450
19149
|
* The unique identifier for the block. This is used to identify the block in
|
|
18451
19150
|
* the DOM and in the block map. It is added as a data attribute
|
|
18452
19151
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -18454,6 +19153,11 @@ style?: React.CSSProperties
|
|
|
18454
19153
|
*/
|
|
18455
19154
|
data-block-id?: string
|
|
18456
19155
|
/**
|
|
19156
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
19157
|
+
* marker; new components should exclude it via
|
|
19158
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19159
|
+
* Retained on existing components for backward compatibility.
|
|
19160
|
+
*
|
|
18457
19161
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
18458
19162
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
18459
19163
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -18936,6 +19640,11 @@ export const CustomTrailingElementTestComponent: React.FC = () => {
|
|
|
18936
19640
|
);
|
|
18937
19641
|
};`},similarTo:[],figmaUrl:null},Stepper:{id:"core-navigation-stepper",breadcrumb:"Core/Navigation/Stepper",importStatement:'import { Box, CheckoutWizard, Stepper, Text } from "@baseline-ui/core";',description:"The `Stepper` visualizes user progress through a sequence of discrete, ordered\nsteps. Use it for multi-step flows like checkout, onboarding, or wizards where\nthe user must complete steps in order.",documentation:'The `Stepper` visualizes user progress through a sequence of discrete, ordered\nsteps. Use it for multi-step flows like checkout, onboarding, or wizards where\nthe user must complete steps in order.\n\n* Sequential progress model: only completed steps and the next-uncompleted step are selectable.\n* Active step is announced to assistive technology via `aria-current="step"`.\n* Completed steps include a visually hidden "Completed" label for screen readers.\n* Each selectable step is independently tabbable \u2014 no roving tabindex.\n* Controlled and uncontrolled APIs for both the selected step and the completion frontier.\n* Two layout variants (`condensed`, `expanded`) and two sizes (`sm`, `md`).\n* Supports indicator-only steps (omit `title`) and disabling individual steps or the whole stepper.\n\nYou can import the `Stepper` component like so:\n\n```jsx\nimport { Stepper } from "@baseline-ui/core";\n\nconst items = [\n { key: "cart", title: "Cart", description: "Review items" },\n { key: "shipping", title: "Shipping", description: "Enter address" },\n { key: "payment", title: "Payment", description: "Pay securely" },\n];\n\nexport default function Checkout() {\n return (\n <Stepper\n items={items}\n defaultSelectedStep="shipping"\n defaultLastCompletedStep="cart"\n aria-label="Checkout"\n />\n );\n}\n```\n\nIf you need parallel views without order or completion semantics, use\n[`Tabs`](?path=/docs/core-tabs--docs). For non-discrete or determinate progress,\nuse [`ProgressBar`](?path=/docs/core-progressbar--docs).\n\nThe `Stepper` supports two variants: `condensed` and `expanded`. The\n`expanded` variant is the default.\n\n* `condensed` \u2014 indicator-only layout with a short connector. Compact and ideal for narrow contexts.\n* `expanded` \u2014 indicator with title and description; the connector grows to fill the available width between steps.\n\n```jsx\n<Stepper items={items} variant="expanded" aria-label="Checkout" />\n<Stepper items={items} variant="condensed" aria-label="Checkout" />\n```\n\nThe `Stepper` supports two sizes: `sm` (20px indicator) and `md` (24px\nindicator). The `md` size is the default.\n\n```jsx\n<Stepper items={items} size="sm" aria-label="Checkout" />\n<Stepper items={items} size="md" aria-label="Checkout" />\n```\n\nEach step renders in one of three statuses, derived from the current selection\nand the completion frontier:\n\n* **complete** \u2014 step appears before `lastCompletedStep` (inclusive); shown with a checkmark.\n* **active** \u2014 step matches `selectedStep`; highlighted indicator with `aria-current="step"`.\n* **incomplete** \u2014 step appears after the active step; numbered indicator with muted styling.\n\nDisable individual steps by setting `isDisabled` on the item. Disabled steps\ncannot be selected and are removed from the tab sequence.\n\n```jsx\n<Stepper\n items={[\n { key: "a", title: "A" },\n { key: "b", title: "B", isDisabled: true },\n { key: "c", title: "C" },\n ]}\n aria-label="Checkout"\n/>\n```\n\nPass `isDisabled` on the `Stepper` itself to disable every step at once \u2014 useful\nwhile a flow is loading or otherwise temporarily inert.\n\n```jsx\n<Stepper items={items} isDisabled aria-label="Checkout" />\n```\n\nTwo independent ways to hide step text:\n\n* Set `variant="condensed"` on the stepper \u2014 hides title and description for every step regardless of whether they were provided.\n* Omit `title` on individual items in the default `expanded` variant \u2014 those specific steps render as indicator-only while others keep their text.\n\n```jsx\n<Stepper\n items={[{ key: "cart" }, { key: "shipping" }, { key: "payment" }]}\n variant="condensed"\n aria-label="Checkout"\n/>\n```\n\nThe `Stepper` can be used uncontrolled by providing `defaultSelectedStep` and\n`defaultLastCompletedStep`.\n\n```jsx\n<Stepper\n items={items}\n defaultSelectedStep="shipping"\n defaultLastCompletedStep="cart"\n aria-label="Checkout"\n/>\n```\n\nFor full control, supply `selectedStep` and `lastCompletedStep` together with\nthe `onSelectionChange` and `onLastCompletedStepChange` callbacks.\n`onLastCompletedStepChange` receives `null` when the frontier resets to "no\nsteps completed yet".\n\n```jsx\nconst [selected, setSelected] = useState("cart");\nconst [lastCompleted, setLastCompleted] = useState(null);\n\n<Stepper\n items={items}\n selectedStep={selected}\n lastCompletedStep={lastCompleted ?? undefined}\n onSelectionChange={setSelected}\n onLastCompletedStepChange={setLastCompleted}\n aria-label="Checkout"\n/>;\n```\n\n* Always supply an `aria-label` that names the flow (e.g. `"Checkout"`). A localized fallback ("Progress") is used if omitted, but a flow-specific label is strongly preferred.\n* The active step is marked with `aria-current="step"`.\n* Completed steps include a visually hidden "Completed" label so screen reader users hear the progress state.\n* Only completed steps and the next-uncompleted step are selectable; future steps are exposed with `aria-disabled="true"`.\n* Per-item `aria-label` has two roles. When set **without** `description`, the step renders in indicator-only mode and the label becomes the accessible name. When set **with** `description`, the step renders normally and the label overrides `title` for assistive technology \u2014 use it to expose a longer or more descriptive name to screen readers without changing the visible text.\n\n| Selector | Description |\n| --------------------------------- | ----------------------------------------------------------- |\n| `[data-variant]` | Layout variant: `condensed` or `expanded`. |\n| `[data-size]` | Size of the indicator: `sm` or `md`. |\n| `[data-status]` | Step status: `complete`, `active`, or `incomplete`. |\n| `[data-disabled]` | Whether the step is disabled. |\n| `[data-hovered]` | Whether the step is currently hovered. |\n| `[data-focused]` | Whether the step is focused (mouse or keyboard). |\n| `[data-focus-visible]` | Whether the step is keyboard focused. |\n| `[aria-current="step"]` | The currently active step. |\n| `[aria-disabled="true"]` | The step is not selectable (future or explicitly disabled). |\n| `.BaselineUI-Stepper` | Root `<ol>` element. |\n| `.BaselineUI-Stepper-Item` | Each step `<li>`. |\n| `.BaselineUI-Stepper-StepLink` | Interactive step `<a>` element. |\n| `.BaselineUI-Stepper-Indicator` | Indicator circle (number or checkmark). |\n| `.BaselineUI-Stepper-Text` | Wrapper around title and description. |\n| `.BaselineUI-Stepper-Title` | Step title text. |\n| `.BaselineUI-Stepper-Description` | Step description text. |\n| `.BaselineUI-Stepper-Connector` | Connector line between steps. |\n\nEach selectable step is a regular focusable link \u2014 the Stepper does not use a\nroving tabindex, so steps are reached individually via `Tab`.\n\n| Key | Function |\n| ------- | ------------------------------------------- |\n| `Tab` | Moves focus to the next selectable step. |\n| `Enter` | Activates the focused step (if selectable). |',props:`interface StepperProps {
|
|
18938
19642
|
/**
|
|
19643
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
19644
|
+
* identifier; new components should exclude it via
|
|
19645
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19646
|
+
* Retained on existing components for backward compatibility.
|
|
19647
|
+
*
|
|
18939
19648
|
* The unique identifier for the block. This is used to identify the block in
|
|
18940
19649
|
* the DOM and in the block map. It is added as a data attribute
|
|
18941
19650
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -18943,6 +19652,11 @@ export const CustomTrailingElementTestComponent: React.FC = () => {
|
|
|
18943
19652
|
*/
|
|
18944
19653
|
data-block-id?: string
|
|
18945
19654
|
/**
|
|
19655
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
19656
|
+
* marker; new components should exclude it via
|
|
19657
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19658
|
+
* Retained on existing components for backward compatibility.
|
|
19659
|
+
*
|
|
18946
19660
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
18947
19661
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
18948
19662
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -19469,6 +20183,11 @@ The status labels can improve the accessibility of the Switch. However, they are
|
|
|
19469
20183
|
\`\`\`
|
|
19470
20184
|
\`\`\``,props:`interface SwitchProps {
|
|
19471
20185
|
/**
|
|
20186
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
20187
|
+
* identifier; new components should exclude it via
|
|
20188
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
20189
|
+
* Retained on existing components for backward compatibility.
|
|
20190
|
+
*
|
|
19472
20191
|
* The unique identifier for the block. This is used to identify the block in
|
|
19473
20192
|
* the DOM and in the block map. It is added as a data attribute
|
|
19474
20193
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -19476,6 +20195,11 @@ The status labels can improve the accessibility of the Switch. However, they are
|
|
|
19476
20195
|
*/
|
|
19477
20196
|
data-block-id?: string
|
|
19478
20197
|
/**
|
|
20198
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
20199
|
+
* marker; new components should exclude it via
|
|
20200
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
20201
|
+
* Retained on existing components for backward compatibility.
|
|
20202
|
+
*
|
|
19479
20203
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
19480
20204
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
19481
20205
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -21797,6 +22521,11 @@ export const AddButtonExample = () => {
|
|
|
21797
22521
|
);
|
|
21798
22522
|
};`},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 {
|
|
21799
22523
|
/**
|
|
22524
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
22525
|
+
* identifier; new components should exclude it via
|
|
22526
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22527
|
+
* Retained on existing components for backward compatibility.
|
|
22528
|
+
*
|
|
21800
22529
|
* The unique identifier for the block. This is used to identify the block in
|
|
21801
22530
|
* the DOM and in the block map. It is added as a data attribute
|
|
21802
22531
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -21804,6 +22533,11 @@ export const AddButtonExample = () => {
|
|
|
21804
22533
|
*/
|
|
21805
22534
|
data-block-id?: string
|
|
21806
22535
|
/**
|
|
22536
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
22537
|
+
* marker; new components should exclude it via
|
|
22538
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22539
|
+
* Retained on existing components for backward compatibility.
|
|
22540
|
+
*
|
|
21807
22541
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
21808
22542
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
21809
22543
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -21946,6 +22680,11 @@ const items = [
|
|
|
21946
22680
|
| Space | Selects the focused tag |
|
|
21947
22681
|
| Enter | Selects the focused tag |`,props:`interface TagGroupProps {
|
|
21948
22682
|
/**
|
|
22683
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
22684
|
+
* identifier; new components should exclude it via
|
|
22685
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22686
|
+
* Retained on existing components for backward compatibility.
|
|
22687
|
+
*
|
|
21949
22688
|
* The unique identifier for the block. This is used to identify the block in
|
|
21950
22689
|
* the DOM and in the block map. It is added as a data attribute
|
|
21951
22690
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -21953,6 +22692,11 @@ const items = [
|
|
|
21953
22692
|
*/
|
|
21954
22693
|
data-block-id?: string
|
|
21955
22694
|
/**
|
|
22695
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
22696
|
+
* marker; new components should exclude it via
|
|
22697
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22698
|
+
* Retained on existing components for backward compatibility.
|
|
22699
|
+
*
|
|
21956
22700
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
21957
22701
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
21958
22702
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22163,6 +22907,11 @@ This component is a controlled component and requires the \`value\` prop to be c
|
|
|
22163
22907
|
| \`ArrowUp\` | Increment the current page. |
|
|
22164
22908
|
| \`Enter\` | Change the current page to the value entered in the input field. |`,props:`interface TaggedPaginationProps {
|
|
22165
22909
|
/**
|
|
22910
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
22911
|
+
* identifier; new components should exclude it via
|
|
22912
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22913
|
+
* Retained on existing components for backward compatibility.
|
|
22914
|
+
*
|
|
22166
22915
|
* The unique identifier for the block. This is used to identify the block in
|
|
22167
22916
|
* the DOM and in the block map. It is added as a data attribute
|
|
22168
22917
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22170,6 +22919,11 @@ This component is a controlled component and requires the \`value\` prop to be c
|
|
|
22170
22919
|
*/
|
|
22171
22920
|
data-block-id?: string
|
|
22172
22921
|
/**
|
|
22922
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
22923
|
+
* marker; new components should exclude it via
|
|
22924
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22925
|
+
* Retained on existing components for backward compatibility.
|
|
22926
|
+
*
|
|
22173
22927
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22174
22928
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22175
22929
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22339,6 +23093,11 @@ export const TaggedPaginationExample: React.FC<
|
|
|
22339
23093
|
);
|
|
22340
23094
|
};`},similarTo:[],figmaUrl:null},Text:{id:"core-content-text",breadcrumb:"Core/Content/Text",importStatement:'import { Text, 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```jsx\nimport { Text } from "@storybook/addon-docs/blocks";\n\n<Text type="subtitle" size="sm">\n Text\n</Text>;\n```\n\nThe `Text` component supports the following types: `title`, `subtitle`, `body`, `value` and `helper`. It\nalso supports the following sizes: `sm`, `md`, and `lg`. You can see all the variants [here](/story/core-text--variants)',props:`interface TextProps {
|
|
22341
23095
|
/**
|
|
23096
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
23097
|
+
* identifier; new components should exclude it via
|
|
23098
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23099
|
+
* Retained on existing components for backward compatibility.
|
|
23100
|
+
*
|
|
22342
23101
|
* The unique identifier for the block. This is used to identify the block in
|
|
22343
23102
|
* the DOM and in the block map. It is added as a data attribute
|
|
22344
23103
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22346,6 +23105,11 @@ export const TaggedPaginationExample: React.FC<
|
|
|
22346
23105
|
*/
|
|
22347
23106
|
data-block-id?: string
|
|
22348
23107
|
/**
|
|
23108
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
23109
|
+
* marker; new components should exclude it via
|
|
23110
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23111
|
+
* Retained on existing components for backward compatibility.
|
|
23112
|
+
*
|
|
22349
23113
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22350
23114
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22351
23115
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22439,8 +23203,13 @@ export function TextWithRef() {
|
|
|
22439
23203
|
<span data-testid="tag-name">{tag}</span>
|
|
22440
23204
|
</>
|
|
22441
23205
|
);
|
|
22442
|
-
}`},similarTo:[],figmaUrl:null},TextInput:{id:"core-forms-textinput",breadcrumb:"Core/Forms/TextInput",importStatement:'import { TextInput, VariantViewer } from "@baseline-ui/core";',description:"`TextInput` is a
|
|
23206
|
+
}`},similarTo:[],figmaUrl:null},TextInput:{id:"core-forms-textinput",breadcrumb:"Core/Forms/TextInput",importStatement:'import { TextInput, VariantViewer } from "@baseline-ui/core";',description:"`TextInput` is a field for capturing free-form text \u2014 a single-line `<input>` by default, or a resizable multi-line `<textarea>` when `isMultiLine` is set. Use it for values such as names, emails, or longer notes.",documentation:'`TextInput` is a field for capturing free-form text \u2014 a single-line `<input>` by default, or a resizable multi-line `<textarea>` when `isMultiLine` is set. Use it for values such as names, emails, or longer notes.\n\n* This component is built on top of the `input` element (or `textarea` in multi-line mode).\n* It provides visual and ARIA labels to the input element to make it more accessible.\n* It supports events for change, clipboard, composition, focus, and keyboard.\n* It exposes invalid states to assistive technology via ARIA.\n* It supports description and other state messages which are linked to the input element via ARIA.\n\n```jsx\nimport { TextInput } from "@baseline-ui/core";\n\n<TextInput placeholder="Enter Text" />;\n```\n\nFor numeric entry use `NumberInput`, for search fields use `SearchInput`, and for color values use `ColorInput`.\n\n`TextInput` supports two variants: `primary` (default) and `ghost`. Set the variant with the `variant` prop.\n\n```jsx\n<TextInput placeholder="Placeholder" variant="primary" />\n<TextInput placeholder="Placeholder" variant="ghost" />\n```\n\nYou can add a label to the `TextInput` by passing a `label` prop.\n\n```jsx\n<TextInput label="Label" placeholder="Placeholder" />\n```\n\nBy default, the label is positioned above the `TextInput`. You can change the\nposition of the label by passing a `labelPosition` prop.\n\n```jsx\n<TextInput\n label="Label"\n labelPosition="start"\n description="Description"\n placeholder="Placeholder"\n/>\n```\n\nYou can add a description to the `TextInput` by passing a `description` prop. A\ndescription is used to provide additional information about the `TextInput`.\n\n```jsx\n<TextInput label="Label" description="Description" placeholder="Placeholder" />\n```\n\nYou can put the `TextInput` into an error state by setting `validationState` to\n`"error"`. You can also pass `errorMessage` to provide additional information\nabout the error; passing `errorMessage` on its own is enough to render the error\nstate. When `description` is also present, it takes precedence and the error\nmessage is not shown.\n\n```jsx\n<TextInput\n label="Label"\n validationState="error"\n errorMessage="Error message"\n placeholder="Placeholder"\n/>\n```\n\nYou can put the `TextInput` into a warning state by setting `validationState` to\n`"warning"`. You can also pass `warningMessage` to provide additional\ninformation about the warning.\n\n```jsx\n<TextInput\n label="Label"\n validationState="warning"\n warningMessage="Warning message"\n placeholder="Placeholder"\n/>\n```\n\nYou can make the `TextInput` read only by passing an `isReadOnly` prop.\n\n```jsx\n<TextInput label="Label" isReadOnly defaultValue="Read-only value" />\n```\n\nYou can disable the `TextInput` by passing an `isDisabled` prop.\n\n```jsx\n<TextInput\n label="Label"\n isDisabled\n defaultValue="Disabled value"\n description="Description"\n placeholder="Placeholder"\n/>\n```\n\nYou can control the `TextInput` by passing a `value` prop together with an\n`onChange` prop. `onChange` is called with the new string value (not a DOM\nevent).\n\n```jsx\nconst [value, setValue] = useState("Controlled value");\n\n<TextInput\n label="Label"\n value={value}\n onChange={(value) => setValue(value)}\n placeholder="Placeholder"\n/>;\n```\n\nSet `isMultiLine` to render the field as a resizable `<textarea>` instead of a\nsingle-line `<input>`. The field starts at a minimum height and can be dragged\nto resize in both directions, except when it is read only or disabled. All\nstates (error, warning, disabled, read only, ghost) are supported, just like the\nsingle-line input.\n\n```jsx\n<TextInput\n label="Label"\n isMultiLine\n defaultValue="Lorem ipsum"\n description="Helper text"\n/>\n```\n\nUse the `rows` prop to set the initial number of visible text rows.\n\n```jsx\n<TextInput label="Label" isMultiLine rows={5} placeholder="Placeholder" />\n```\n\nYou can use the `TextInput` in a HTML form by passing a `name` prop. In addition, attributes such as `type`, `pattern`, `inputMode`, and others are passed through to the underlying input element.\n\n```jsx\n<form>\n <TextInput\n name="text-input"\n type="text"\n placeholder="Placeholder"\n description="Description"\n />\n</form>\n```\n\nThese selectors are applied to the underlying `<input>` / `<textarea>` element. The root wrapper is also exposed via the `BaselineUI-TextInput` class and the field element via the `BaselineUI-TextInput-Input` class.\n\n| Selector | Description |\n| ------------------------- | ------------------------------------------------------------------- |\n| `[data-readonly]` | Whether the input is read only. |\n| `[data-disabled]` | Whether the input is disabled. |\n| `[data-validation-state]` | The validation state of the input (`error`, `warning`, or `valid`). |\n| `[data-focused]` | Whether the input is focused, either via a mouse or keyboard. |\n| `[data-focus-visible]` | Whether the input is keyboard focused. |\n\n| Key | Function |\n| ---------------- | ---------------------------------------------------------------------------- |\n| <kbd>Enter</kbd> | Submits the form in single-line mode; inserts a new line in multi-line mode. |',props:`interface TextInputProps {
|
|
22443
23207
|
/**
|
|
23208
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
23209
|
+
* identifier; new components should exclude it via
|
|
23210
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23211
|
+
* Retained on existing components for backward compatibility.
|
|
23212
|
+
*
|
|
22444
23213
|
* The unique identifier for the block. This is used to identify the block in
|
|
22445
23214
|
* the DOM and in the block map. It is added as a data attribute
|
|
22446
23215
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22448,6 +23217,11 @@ export function TextWithRef() {
|
|
|
22448
23217
|
*/
|
|
22449
23218
|
data-block-id?: string
|
|
22450
23219
|
/**
|
|
23220
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
23221
|
+
* marker; new components should exclude it via
|
|
23222
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23223
|
+
* Retained on existing components for backward compatibility.
|
|
23224
|
+
*
|
|
22451
23225
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22452
23226
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22453
23227
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22483,8 +23257,14 @@ inputStyle?: React.CSSProperties
|
|
|
22483
23257
|
* The class name to apply to the input element
|
|
22484
23258
|
*/
|
|
22485
23259
|
inputClassName?: string
|
|
23260
|
+
/**
|
|
23261
|
+
* The number of visible text rows for the multi-line input. Only applies when
|
|
23262
|
+
* \`isMultiLine\` is set.
|
|
23263
|
+
*/
|
|
23264
|
+
rows?: number
|
|
22486
23265
|
variant?: any
|
|
22487
23266
|
labelPosition?: any
|
|
23267
|
+
isMultiLine?: any
|
|
22488
23268
|
}`,stories:{usage:[{id:"core-forms-textinput--basic",name:"Basic",snippet:'const Basic = () => <TextInput placeholder="Placeholder" aria-label="Text Input" />;'},{id:"core-forms-textinput--variants",name:"Variants",snippet:`const Variants = (args) => (
|
|
22489
23269
|
<VariantViewer<React.ComponentProps<typeof TextInput>>
|
|
22490
23270
|
cellStyle={{ minWidth: 300 }}
|
|
@@ -22746,15 +23526,354 @@ labelPosition?: any
|
|
|
22746
23526
|
label="Label"
|
|
22747
23527
|
name="text-input"
|
|
22748
23528
|
placeholder="Placeholder"
|
|
22749
|
-
description="Description" />;`}
|
|
22750
|
-
|
|
22751
|
-
|
|
22752
|
-
|
|
23529
|
+
description="Description" />;`},{id:"core-forms-textinput--multiline",name:"Multiline",snippet:`const Multiline = () => <TextInput
|
|
23530
|
+
label="Label"
|
|
23531
|
+
isMultiLine
|
|
23532
|
+
defaultValue="Lorem ipsum"
|
|
23533
|
+
description="Helper text" />;`},{id:"core-forms-textinput--multiline-with-rows",name:"Multiline With Rows",snippet:`const MultilineWithRows = () => <TextInput
|
|
23534
|
+
label="Label"
|
|
23535
|
+
isMultiLine
|
|
23536
|
+
rows={5}
|
|
23537
|
+
placeholder="Placeholder"
|
|
23538
|
+
description="Helper text" />;`},{id:"core-forms-textinput--multiline-variants",name:"Multiline Variants",snippet:`const MultilineVariants = (args) => (
|
|
23539
|
+
<VariantViewer<React.ComponentProps<typeof TextInput>>
|
|
23540
|
+
cellStyle={{ minWidth: 300 }}
|
|
23541
|
+
header={[
|
|
23542
|
+
"No Label + No Helper Text",
|
|
23543
|
+
"No Label + Helper Text",
|
|
23544
|
+
"Label + No Helper Text",
|
|
23545
|
+
"Label + Helper Text",
|
|
23546
|
+
]}
|
|
23547
|
+
component={TextInput}
|
|
23548
|
+
variants={{
|
|
23549
|
+
"Primary Placeholder": [
|
|
23550
|
+
{ isMultiLine: true, placeholder: "Placeholder" },
|
|
23551
|
+
{
|
|
23552
|
+
isMultiLine: true,
|
|
23553
|
+
placeholder: "Placeholder",
|
|
23554
|
+
description: "Helper text",
|
|
23555
|
+
},
|
|
23556
|
+
{ isMultiLine: true, label: "Label", placeholder: "Placeholder" },
|
|
23557
|
+
{
|
|
23558
|
+
isMultiLine: true,
|
|
23559
|
+
label: "Label",
|
|
23560
|
+
placeholder: "Placeholder",
|
|
23561
|
+
description: "Helper text",
|
|
23562
|
+
},
|
|
23563
|
+
],
|
|
23564
|
+
"Primary Filled": [
|
|
23565
|
+
{ isMultiLine: true, defaultValue: "Lorem ipsum" },
|
|
23566
|
+
{
|
|
23567
|
+
isMultiLine: true,
|
|
23568
|
+
defaultValue: "Lorem ipsum",
|
|
23569
|
+
description: "Helper text",
|
|
23570
|
+
},
|
|
23571
|
+
{ isMultiLine: true, label: "Label", defaultValue: "Lorem ipsum" },
|
|
23572
|
+
{
|
|
23573
|
+
isMultiLine: true,
|
|
23574
|
+
label: "Label",
|
|
23575
|
+
defaultValue: "Lorem ipsum",
|
|
23576
|
+
description: "Helper text",
|
|
23577
|
+
},
|
|
23578
|
+
],
|
|
23579
|
+
"Primary With Error": [
|
|
23580
|
+
{
|
|
23581
|
+
isMultiLine: true,
|
|
23582
|
+
defaultValue: "Lorem ipsum",
|
|
23583
|
+
validationState: "error",
|
|
23584
|
+
},
|
|
23585
|
+
{
|
|
23586
|
+
isMultiLine: true,
|
|
23587
|
+
defaultValue: "Lorem ipsum",
|
|
23588
|
+
validationState: "error",
|
|
23589
|
+
errorMessage: "Error message",
|
|
23590
|
+
},
|
|
23591
|
+
{
|
|
23592
|
+
isMultiLine: true,
|
|
23593
|
+
label: "Label",
|
|
23594
|
+
defaultValue: "Lorem ipsum",
|
|
23595
|
+
validationState: "error",
|
|
23596
|
+
},
|
|
23597
|
+
{
|
|
23598
|
+
isMultiLine: true,
|
|
23599
|
+
label: "Label",
|
|
23600
|
+
defaultValue: "Lorem ipsum",
|
|
23601
|
+
validationState: "error",
|
|
23602
|
+
errorMessage: "Error message",
|
|
23603
|
+
},
|
|
23604
|
+
],
|
|
23605
|
+
"Primary With Warning": [
|
|
23606
|
+
{
|
|
23607
|
+
isMultiLine: true,
|
|
23608
|
+
defaultValue: "Lorem ipsum",
|
|
23609
|
+
validationState: "warning",
|
|
23610
|
+
},
|
|
23611
|
+
{
|
|
23612
|
+
isMultiLine: true,
|
|
23613
|
+
defaultValue: "Lorem ipsum",
|
|
23614
|
+
validationState: "warning",
|
|
23615
|
+
warningMessage: "Warning message",
|
|
23616
|
+
},
|
|
23617
|
+
{
|
|
23618
|
+
isMultiLine: true,
|
|
23619
|
+
label: "Label",
|
|
23620
|
+
defaultValue: "Lorem ipsum",
|
|
23621
|
+
validationState: "warning",
|
|
23622
|
+
},
|
|
23623
|
+
{
|
|
23624
|
+
isMultiLine: true,
|
|
23625
|
+
label: "Label",
|
|
23626
|
+
defaultValue: "Lorem ipsum",
|
|
23627
|
+
validationState: "warning",
|
|
23628
|
+
warningMessage: "Warning message",
|
|
23629
|
+
},
|
|
23630
|
+
],
|
|
23631
|
+
"Primary Disabled": [
|
|
23632
|
+
{ isMultiLine: true, defaultValue: "Lorem ipsum", isDisabled: true },
|
|
23633
|
+
{
|
|
23634
|
+
isMultiLine: true,
|
|
23635
|
+
defaultValue: "Lorem ipsum",
|
|
23636
|
+
isDisabled: true,
|
|
23637
|
+
description: "Helper text",
|
|
23638
|
+
},
|
|
23639
|
+
{
|
|
23640
|
+
isMultiLine: true,
|
|
23641
|
+
label: "Label",
|
|
23642
|
+
defaultValue: "Lorem ipsum",
|
|
23643
|
+
isDisabled: true,
|
|
23644
|
+
},
|
|
23645
|
+
{
|
|
23646
|
+
isMultiLine: true,
|
|
23647
|
+
label: "Label",
|
|
23648
|
+
defaultValue: "Lorem ipsum",
|
|
23649
|
+
isDisabled: true,
|
|
23650
|
+
description: "Helper text",
|
|
23651
|
+
},
|
|
23652
|
+
],
|
|
23653
|
+
"Primary Read Only": [
|
|
23654
|
+
{ isMultiLine: true, defaultValue: "Lorem ipsum", isReadOnly: true },
|
|
23655
|
+
{
|
|
23656
|
+
isMultiLine: true,
|
|
23657
|
+
defaultValue: "Lorem ipsum",
|
|
23658
|
+
isReadOnly: true,
|
|
23659
|
+
description: "Helper text",
|
|
23660
|
+
},
|
|
23661
|
+
{
|
|
23662
|
+
isMultiLine: true,
|
|
23663
|
+
label: "Label",
|
|
23664
|
+
defaultValue: "Lorem ipsum",
|
|
23665
|
+
isReadOnly: true,
|
|
23666
|
+
},
|
|
23667
|
+
{
|
|
23668
|
+
isMultiLine: true,
|
|
23669
|
+
label: "Label",
|
|
23670
|
+
defaultValue: "Lorem ipsum",
|
|
23671
|
+
isReadOnly: true,
|
|
23672
|
+
description: "Helper text",
|
|
23673
|
+
},
|
|
23674
|
+
],
|
|
23675
|
+
"Ghost Placeholder": [
|
|
23676
|
+
{ isMultiLine: true, placeholder: "Placeholder", variant: "ghost" },
|
|
23677
|
+
{
|
|
23678
|
+
isMultiLine: true,
|
|
23679
|
+
placeholder: "Placeholder",
|
|
23680
|
+
variant: "ghost",
|
|
23681
|
+
description: "Helper text",
|
|
23682
|
+
},
|
|
23683
|
+
{
|
|
23684
|
+
isMultiLine: true,
|
|
23685
|
+
label: "Label",
|
|
23686
|
+
placeholder: "Placeholder",
|
|
23687
|
+
variant: "ghost",
|
|
23688
|
+
labelPosition: "start",
|
|
23689
|
+
},
|
|
23690
|
+
{
|
|
23691
|
+
isMultiLine: true,
|
|
23692
|
+
label: "Label",
|
|
23693
|
+
placeholder: "Placeholder",
|
|
23694
|
+
variant: "ghost",
|
|
23695
|
+
description: "Helper text",
|
|
23696
|
+
labelPosition: "start",
|
|
23697
|
+
},
|
|
23698
|
+
],
|
|
23699
|
+
"Ghost Filled": [
|
|
23700
|
+
{
|
|
23701
|
+
isMultiLine: true,
|
|
23702
|
+
defaultValue: "Lorem ipsum",
|
|
23703
|
+
variant: "ghost",
|
|
23704
|
+
},
|
|
23705
|
+
{
|
|
23706
|
+
isMultiLine: true,
|
|
23707
|
+
defaultValue: "Lorem ipsum",
|
|
23708
|
+
variant: "ghost",
|
|
23709
|
+
description: "Helper text",
|
|
23710
|
+
},
|
|
23711
|
+
{
|
|
23712
|
+
isMultiLine: true,
|
|
23713
|
+
label: "Label",
|
|
23714
|
+
defaultValue: "Lorem ipsum",
|
|
23715
|
+
variant: "ghost",
|
|
23716
|
+
labelPosition: "start",
|
|
23717
|
+
},
|
|
23718
|
+
{
|
|
23719
|
+
isMultiLine: true,
|
|
23720
|
+
label: "Label",
|
|
23721
|
+
defaultValue: "Lorem ipsum",
|
|
23722
|
+
variant: "ghost",
|
|
23723
|
+
description: "Helper text",
|
|
23724
|
+
labelPosition: "start",
|
|
23725
|
+
},
|
|
23726
|
+
],
|
|
23727
|
+
"Ghost With Error": [
|
|
23728
|
+
{
|
|
23729
|
+
isMultiLine: true,
|
|
23730
|
+
defaultValue: "Lorem ipsum",
|
|
23731
|
+
validationState: "error",
|
|
23732
|
+
variant: "ghost",
|
|
23733
|
+
},
|
|
23734
|
+
{
|
|
23735
|
+
isMultiLine: true,
|
|
23736
|
+
defaultValue: "Lorem ipsum",
|
|
23737
|
+
validationState: "error",
|
|
23738
|
+
errorMessage: "Error message",
|
|
23739
|
+
variant: "ghost",
|
|
23740
|
+
},
|
|
23741
|
+
{
|
|
23742
|
+
isMultiLine: true,
|
|
23743
|
+
label: "Label",
|
|
23744
|
+
defaultValue: "Lorem ipsum",
|
|
23745
|
+
validationState: "error",
|
|
23746
|
+
variant: "ghost",
|
|
23747
|
+
labelPosition: "start",
|
|
23748
|
+
},
|
|
23749
|
+
{
|
|
23750
|
+
isMultiLine: true,
|
|
23751
|
+
label: "Label",
|
|
23752
|
+
defaultValue: "Lorem ipsum",
|
|
23753
|
+
validationState: "error",
|
|
23754
|
+
errorMessage: "Error message",
|
|
23755
|
+
variant: "ghost",
|
|
23756
|
+
labelPosition: "start",
|
|
23757
|
+
},
|
|
23758
|
+
],
|
|
23759
|
+
"Ghost With Warning": [
|
|
23760
|
+
{
|
|
23761
|
+
isMultiLine: true,
|
|
23762
|
+
defaultValue: "Lorem ipsum",
|
|
23763
|
+
validationState: "warning",
|
|
23764
|
+
variant: "ghost",
|
|
23765
|
+
},
|
|
23766
|
+
{
|
|
23767
|
+
isMultiLine: true,
|
|
23768
|
+
defaultValue: "Lorem ipsum",
|
|
23769
|
+
validationState: "warning",
|
|
23770
|
+
warningMessage: "Warning message",
|
|
23771
|
+
variant: "ghost",
|
|
23772
|
+
},
|
|
23773
|
+
{
|
|
23774
|
+
isMultiLine: true,
|
|
23775
|
+
label: "Label",
|
|
23776
|
+
defaultValue: "Lorem ipsum",
|
|
23777
|
+
validationState: "warning",
|
|
23778
|
+
variant: "ghost",
|
|
23779
|
+
labelPosition: "start",
|
|
23780
|
+
},
|
|
23781
|
+
{
|
|
23782
|
+
isMultiLine: true,
|
|
23783
|
+
label: "Label",
|
|
23784
|
+
defaultValue: "Lorem ipsum",
|
|
23785
|
+
validationState: "warning",
|
|
23786
|
+
warningMessage: "Warning message",
|
|
23787
|
+
variant: "ghost",
|
|
23788
|
+
labelPosition: "start",
|
|
23789
|
+
},
|
|
23790
|
+
],
|
|
23791
|
+
"Ghost Disabled": [
|
|
23792
|
+
{
|
|
23793
|
+
isMultiLine: true,
|
|
23794
|
+
defaultValue: "Lorem ipsum",
|
|
23795
|
+
isDisabled: true,
|
|
23796
|
+
variant: "ghost",
|
|
23797
|
+
},
|
|
23798
|
+
{
|
|
23799
|
+
isMultiLine: true,
|
|
23800
|
+
defaultValue: "Lorem ipsum",
|
|
23801
|
+
isDisabled: true,
|
|
23802
|
+
description: "Helper text",
|
|
23803
|
+
variant: "ghost",
|
|
23804
|
+
},
|
|
23805
|
+
{
|
|
23806
|
+
isMultiLine: true,
|
|
23807
|
+
label: "Label",
|
|
23808
|
+
defaultValue: "Lorem ipsum",
|
|
23809
|
+
isDisabled: true,
|
|
23810
|
+
variant: "ghost",
|
|
23811
|
+
labelPosition: "start",
|
|
23812
|
+
},
|
|
23813
|
+
{
|
|
23814
|
+
isMultiLine: true,
|
|
23815
|
+
label: "Label",
|
|
23816
|
+
defaultValue: "Lorem ipsum",
|
|
23817
|
+
isDisabled: true,
|
|
23818
|
+
description: "Helper text",
|
|
23819
|
+
variant: "ghost",
|
|
23820
|
+
labelPosition: "start",
|
|
23821
|
+
},
|
|
23822
|
+
],
|
|
23823
|
+
"Ghost Read Only": [
|
|
23824
|
+
{
|
|
23825
|
+
isMultiLine: true,
|
|
23826
|
+
defaultValue: "Lorem ipsum",
|
|
23827
|
+
isReadOnly: true,
|
|
23828
|
+
variant: "ghost",
|
|
23829
|
+
},
|
|
23830
|
+
{
|
|
23831
|
+
isMultiLine: true,
|
|
23832
|
+
defaultValue: "Lorem ipsum",
|
|
23833
|
+
isReadOnly: true,
|
|
23834
|
+
description: "Helper text",
|
|
23835
|
+
variant: "ghost",
|
|
23836
|
+
},
|
|
23837
|
+
{
|
|
23838
|
+
isMultiLine: true,
|
|
23839
|
+
label: "Label",
|
|
23840
|
+
defaultValue: "Lorem ipsum",
|
|
23841
|
+
isReadOnly: true,
|
|
23842
|
+
variant: "ghost",
|
|
23843
|
+
labelPosition: "start",
|
|
23844
|
+
},
|
|
23845
|
+
{
|
|
23846
|
+
isMultiLine: true,
|
|
23847
|
+
label: "Label",
|
|
23848
|
+
defaultValue: "Lorem ipsum",
|
|
23849
|
+
isReadOnly: true,
|
|
23850
|
+
description: "Helper text",
|
|
23851
|
+
variant: "ghost",
|
|
23852
|
+
labelPosition: "start",
|
|
23853
|
+
},
|
|
23854
|
+
],
|
|
23855
|
+
}}
|
|
23856
|
+
defaultProps={args}
|
|
23857
|
+
/>
|
|
23858
|
+
);`}],implementation:""},similarTo:[],figmaUrl:null},ThemeProvider:{id:"core-utilities-themeprovider",breadcrumb:"Core/Utilities/ThemeProvider",importStatement:'import { ThemeProvider, ThemeProviderExample } from "@baseline-ui/core";',description:"`ThemeProvider` is a context provider that applies a Baseline UI theme \u2014 colors, typography, and spacing \u2014 to its descendants. Use it at the root of your application, or around a subtree, to switch between light, dark, or branded themes.",documentation:'`ThemeProvider` is a context provider that applies a Baseline UI theme \u2014 colors, typography, and spacing \u2014 to its descendants. Use it at the root of your application, or around a subtree, to switch between light, dark, or branded themes.\n\n```tsx\nimport { ThemeProvider, ActionButton } from "../../utils";\nimport { themes } from "@baseline-ui/tokens";\n\n<ThemeProvider theme={themes.base.light}>\n <ActionButton label="Click me" />\n</ThemeProvider>;\n```\n\nThe `theme` prop accepts a `Theme` object. The `Theme` type has the following structure:',props:`interface ThemeProviderProps {
|
|
23859
|
+
/**
|
|
23860
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
23861
|
+
* identifier; new components should exclude it via
|
|
23862
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23863
|
+
* Retained on existing components for backward compatibility.
|
|
23864
|
+
*
|
|
23865
|
+
* The unique identifier for the block. This is used to identify the block in
|
|
23866
|
+
* the DOM and in the block map. It is added as a data attribute
|
|
22753
23867
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
22754
23868
|
* rendered.
|
|
22755
23869
|
*/
|
|
22756
23870
|
data-block-id?: string
|
|
22757
23871
|
/**
|
|
23872
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
23873
|
+
* marker; new components should exclude it via
|
|
23874
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23875
|
+
* Retained on existing components for backward compatibility.
|
|
23876
|
+
*
|
|
22758
23877
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22759
23878
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22760
23879
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22984,6 +24103,11 @@ The TimeField supports error and warning states with associated messages.
|
|
|
22984
24103
|
| \`Home/End\` | Go to minimum/maximum value for the selected segment |
|
|
22985
24104
|
| \`Numbers\` | Type numbers to edit the selected segment |`,props:`interface TimeFieldProps {
|
|
22986
24105
|
/**
|
|
24106
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
24107
|
+
* identifier; new components should exclude it via
|
|
24108
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24109
|
+
* Retained on existing components for backward compatibility.
|
|
24110
|
+
*
|
|
22987
24111
|
* The unique identifier for the block. This is used to identify the block in
|
|
22988
24112
|
* the DOM and in the block map. It is added as a data attribute
|
|
22989
24113
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22991,6 +24115,11 @@ The TimeField supports error and warning states with associated messages.
|
|
|
22991
24115
|
*/
|
|
22992
24116
|
data-block-id?: string
|
|
22993
24117
|
/**
|
|
24118
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
24119
|
+
* marker; new components should exclude it via
|
|
24120
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24121
|
+
* Retained on existing components for backward compatibility.
|
|
24122
|
+
*
|
|
22994
24123
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22995
24124
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22996
24125
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -23350,6 +24479,11 @@ You can pass a \`timeout\` prop to the \`toastQueue.add\` method to set the time
|
|
|
23350
24479
|
toastQueue.add(alertProps, { timeout: 1000 });
|
|
23351
24480
|
\`\`\``,props:`interface ToastProps {
|
|
23352
24481
|
/**
|
|
24482
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
24483
|
+
* identifier; new components should exclude it via
|
|
24484
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24485
|
+
* Retained on existing components for backward compatibility.
|
|
24486
|
+
*
|
|
23353
24487
|
* The unique identifier for the block. This is used to identify the block in
|
|
23354
24488
|
* the DOM and in the block map. It is added as a data attribute
|
|
23355
24489
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -23357,6 +24491,11 @@ toastQueue.add(alertProps, { timeout: 1000 });
|
|
|
23357
24491
|
*/
|
|
23358
24492
|
data-block-id?: string
|
|
23359
24493
|
/**
|
|
24494
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
24495
|
+
* marker; new components should exclude it via
|
|
24496
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24497
|
+
* Retained on existing components for backward compatibility.
|
|
24498
|
+
*
|
|
23360
24499
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
23361
24500
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
23362
24501
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -24140,6 +25279,11 @@ In case of Popover, when the popover trigger has moved to the menu:
|
|
|
24140
25279
|
| Tab | Focus the next interactive child outside the toolbar |
|
|
24141
25280
|
| Tab without \`isSingleTabStop\` | Focus the next interactive child within the toolbar |`,props:`interface ToolbarProps {
|
|
24142
25281
|
/**
|
|
25282
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
25283
|
+
* identifier; new components should exclude it via
|
|
25284
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25285
|
+
* Retained on existing components for backward compatibility.
|
|
25286
|
+
*
|
|
24143
25287
|
* The unique identifier for the block. This is used to identify the block in
|
|
24144
25288
|
* the DOM and in the block map. It is added as a data attribute
|
|
24145
25289
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -24147,6 +25291,11 @@ In case of Popover, when the popover trigger has moved to the menu:
|
|
|
24147
25291
|
*/
|
|
24148
25292
|
data-block-id?: string
|
|
24149
25293
|
/**
|
|
25294
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
25295
|
+
* marker; new components should exclude it via
|
|
25296
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25297
|
+
* Retained on existing components for backward compatibility.
|
|
25298
|
+
*
|
|
24150
25299
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24151
25300
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24152
25301
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -24563,6 +25712,11 @@ The \`data-placement\` attribute is applied to the tooltip's outer wrapper eleme
|
|
|
24563
25712
|
| \`[data-placement="left"]\` | Applied when tooltip is positioned to the left of the trigger |
|
|
24564
25713
|
| \`[data-placement="right"]\` | Applied when tooltip is positioned to the right of the trigger |`,props:`interface TooltipProps {
|
|
24565
25714
|
/**
|
|
25715
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
25716
|
+
* identifier; new components should exclude it via
|
|
25717
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25718
|
+
* Retained on existing components for backward compatibility.
|
|
25719
|
+
*
|
|
24566
25720
|
* The unique identifier for the block. This is used to identify the block in
|
|
24567
25721
|
* the DOM and in the block map. It is added as a data attribute
|
|
24568
25722
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -24570,6 +25724,11 @@ The \`data-placement\` attribute is applied to the tooltip's outer wrapper eleme
|
|
|
24570
25724
|
*/
|
|
24571
25725
|
data-block-id?: string
|
|
24572
25726
|
/**
|
|
25727
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
25728
|
+
* marker; new components should exclude it via
|
|
25729
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25730
|
+
* Retained on existing components for backward compatibility.
|
|
25731
|
+
*
|
|
24573
25732
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24574
25733
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24575
25734
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -24907,6 +26066,11 @@ Without virtualization:
|
|
|
24907
26066
|
* Performance degrades beyond ~500 items
|
|
24908
26067
|
* Memory usage grows with tree size`,props:`interface TreeViewProps {
|
|
24909
26068
|
/**
|
|
26069
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
26070
|
+
* identifier; new components should exclude it via
|
|
26071
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26072
|
+
* Retained on existing components for backward compatibility.
|
|
26073
|
+
*
|
|
24910
26074
|
* The unique identifier for the block. This is used to identify the block in
|
|
24911
26075
|
* the DOM and in the block map. It is added as a data attribute
|
|
24912
26076
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -24914,6 +26078,11 @@ Without virtualization:
|
|
|
24914
26078
|
*/
|
|
24915
26079
|
data-block-id?: string
|
|
24916
26080
|
/**
|
|
26081
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
26082
|
+
* marker; new components should exclude it via
|
|
26083
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26084
|
+
* Retained on existing components for backward compatibility.
|
|
26085
|
+
*
|
|
24917
26086
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24918
26087
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24919
26088
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -25564,6 +26733,11 @@ function App() {
|
|
|
25564
26733
|
}
|
|
25565
26734
|
\`\`\``,props:`interface UNSAFE_ListBoxProps {
|
|
25566
26735
|
/**
|
|
26736
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
26737
|
+
* identifier; new components should exclude it via
|
|
26738
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26739
|
+
* Retained on existing components for backward compatibility.
|
|
26740
|
+
*
|
|
25567
26741
|
* The unique identifier for the block. This is used to identify the block in
|
|
25568
26742
|
* the DOM and in the block map. It is added as a data attribute
|
|
25569
26743
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -25571,6 +26745,11 @@ function App() {
|
|
|
25571
26745
|
*/
|
|
25572
26746
|
data-block-id?: string
|
|
25573
26747
|
/**
|
|
26748
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
26749
|
+
* marker; new components should exclude it via
|
|
26750
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26751
|
+
* Retained on existing components for backward compatibility.
|
|
26752
|
+
*
|
|
25574
26753
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
25575
26754
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
25576
26755
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -26512,6 +27691,11 @@ layoutOptions?: O
|
|
|
26512
27691
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
26513
27692
|
16 |`}}],implementation:""},similarTo:[],figmaUrl:null},AccordionItem:{id:"core-navigation-accordion-accordionitem",importStatement:'import { Accordion, AccordionItem, AccordionItemExample, Checkbox } from "@baseline-ui/core";',description:"",documentation:null,props:`interface AccordionItemProps {
|
|
26514
27693
|
/**
|
|
27694
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
27695
|
+
* identifier; new components should exclude it via
|
|
27696
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
27697
|
+
* Retained on existing components for backward compatibility.
|
|
27698
|
+
*
|
|
26515
27699
|
* The unique identifier for the block. This is used to identify the block in
|
|
26516
27700
|
* the DOM and in the block map. It is added as a data attribute
|
|
26517
27701
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -26519,6 +27703,11 @@ layoutOptions?: O
|
|
|
26519
27703
|
*/
|
|
26520
27704
|
data-block-id?: string
|
|
26521
27705
|
/**
|
|
27706
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
27707
|
+
* marker; new components should exclude it via
|
|
27708
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
27709
|
+
* Retained on existing components for backward compatibility.
|
|
27710
|
+
*
|
|
26522
27711
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
26523
27712
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
26524
27713
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -26690,6 +27879,11 @@ export const AccordionWithDisabledItemsExample: React.FC<
|
|
|
26690
27879
|
return <AccordionExample {...props} disabledKeys={new Set(["item-1"])} />;
|
|
26691
27880
|
};`},similarTo:[],figmaUrl:null},IconColorInput:{id:"core-forms-colorinput-iconcolorinput",importStatement:'import { Box, IconColorInput } from "@baseline-ui/core";',description:"",documentation:null,props:`interface IconColorInputProps {
|
|
26692
27881
|
/**
|
|
27882
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
27883
|
+
* identifier; new components should exclude it via
|
|
27884
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
27885
|
+
* Retained on existing components for backward compatibility.
|
|
27886
|
+
*
|
|
26693
27887
|
* The unique identifier for the block. This is used to identify the block in
|
|
26694
27888
|
* the DOM and in the block map. It is added as a data attribute
|
|
26695
27889
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -26697,6 +27891,11 @@ export const AccordionWithDisabledItemsExample: React.FC<
|
|
|
26697
27891
|
*/
|
|
26698
27892
|
data-block-id?: string
|
|
26699
27893
|
/**
|
|
27894
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
27895
|
+
* marker; new components should exclude it via
|
|
27896
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
27897
|
+
* Retained on existing components for backward compatibility.
|
|
27898
|
+
*
|
|
26700
27899
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
26701
27900
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
26702
27901
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -26946,6 +28145,11 @@ svg: string
|
|
|
26946
28145
|
UncontrolledInteractionOutsideExample,
|
|
26947
28146
|
} from "@baseline-ui/core";`,description:"",documentation:null,props:`interface ModalContentProps {
|
|
26948
28147
|
/**
|
|
28148
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
28149
|
+
* identifier; new components should exclude it via
|
|
28150
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28151
|
+
* Retained on existing components for backward compatibility.
|
|
28152
|
+
*
|
|
26949
28153
|
* The unique identifier for the block. This is used to identify the block in
|
|
26950
28154
|
* the DOM and in the block map. It is added as a data attribute
|
|
26951
28155
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -26953,6 +28157,11 @@ svg: string
|
|
|
26953
28157
|
*/
|
|
26954
28158
|
data-block-id?: string
|
|
26955
28159
|
/**
|
|
28160
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
28161
|
+
* marker; new components should exclude it via
|
|
28162
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28163
|
+
* Retained on existing components for backward compatibility.
|
|
28164
|
+
*
|
|
26956
28165
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
26957
28166
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
26958
28167
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -27237,6 +28446,30 @@ export const LongModalExample: React.FC<
|
|
|
27237
28446
|
);
|
|
27238
28447
|
};
|
|
27239
28448
|
|
|
28449
|
+
export const DisableAnimationModalExample: React.FC<
|
|
28450
|
+
TestComponentProps & { defaultOpen?: boolean; disableAnimation?: boolean }
|
|
28451
|
+
> = ({ enableInert, defaultOpen = true, disableAnimation }) => {
|
|
28452
|
+
const id = useId();
|
|
28453
|
+
return (
|
|
28454
|
+
<Modal defaultOpen={defaultOpen}>
|
|
28455
|
+
<ModalTrigger>
|
|
28456
|
+
<ActionButton label="Open Modal" />
|
|
28457
|
+
</ModalTrigger>
|
|
28458
|
+
<ModalContent
|
|
28459
|
+
disableAnimation={disableAnimation}
|
|
28460
|
+
UNSAFE_enableInert={enableInert}
|
|
28461
|
+
>
|
|
28462
|
+
<Dialog aria-labelledby={id}>
|
|
28463
|
+
<VisuallyHidden>
|
|
28464
|
+
<Text id={id}>Animation example</Text>
|
|
28465
|
+
</VisuallyHidden>
|
|
28466
|
+
<Text>Modal body</Text>
|
|
28467
|
+
</Dialog>
|
|
28468
|
+
</ModalContent>
|
|
28469
|
+
</Modal>
|
|
28470
|
+
);
|
|
28471
|
+
};
|
|
28472
|
+
|
|
27240
28473
|
/**
|
|
27241
28474
|
* Example with form controls inside a Modal. Used to verify pointer
|
|
27242
28475
|
* interactions work correctly with all input devices.
|
|
@@ -27440,6 +28673,11 @@ export const DisabledFocusManagementExample: React.FC<{
|
|
|
27440
28673
|
TrailingElementExample,
|
|
27441
28674
|
} from "@baseline-ui/core";`,description:"",documentation:null,props:`interface PointPickerContentProps {
|
|
27442
28675
|
/**
|
|
28676
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
28677
|
+
* identifier; new components should exclude it via
|
|
28678
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28679
|
+
* Retained on existing components for backward compatibility.
|
|
28680
|
+
*
|
|
27443
28681
|
* The unique identifier for the block. This is used to identify the block in
|
|
27444
28682
|
* the DOM and in the block map. It is added as a data attribute
|
|
27445
28683
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -27447,6 +28685,11 @@ export const DisabledFocusManagementExample: React.FC<{
|
|
|
27447
28685
|
*/
|
|
27448
28686
|
data-block-id?: string
|
|
27449
28687
|
/**
|
|
28688
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
28689
|
+
* marker; new components should exclude it via
|
|
28690
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28691
|
+
* Retained on existing components for backward compatibility.
|
|
28692
|
+
*
|
|
27450
28693
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
27451
28694
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
27452
28695
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -28126,6 +29369,11 @@ export const TrailingElementExample = () => {
|
|
|
28126
29369
|
);
|
|
28127
29370
|
};`},similarTo:[],figmaUrl:null},PointPickerDisplay:{id:"core-content-pointpicker-pointpickerdisplay",importStatement:'import { Box, PointPickerDisplay, RichContentExample } from "@baseline-ui/core";',description:"",documentation:null,props:`interface PointPickerDisplayProps {
|
|
28128
29371
|
/**
|
|
29372
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
29373
|
+
* identifier; new components should exclude it via
|
|
29374
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
29375
|
+
* Retained on existing components for backward compatibility.
|
|
29376
|
+
*
|
|
28129
29377
|
* The unique identifier for the block. This is used to identify the block in
|
|
28130
29378
|
* the DOM and in the block map. It is added as a data attribute
|
|
28131
29379
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -28133,6 +29381,11 @@ export const TrailingElementExample = () => {
|
|
|
28133
29381
|
*/
|
|
28134
29382
|
data-block-id?: string
|
|
28135
29383
|
/**
|
|
29384
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
29385
|
+
* marker; new components should exclude it via
|
|
29386
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
29387
|
+
* Retained on existing components for backward compatibility.
|
|
29388
|
+
*
|
|
28136
29389
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
28137
29390
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
28138
29391
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -28768,6 +30021,11 @@ export const TrailingElementExample = () => {
|
|
|
28768
30021
|
PopoverWithScrollableContentExample,
|
|
28769
30022
|
} from "@baseline-ui/core";`,description:"",documentation:null,props:`interface PopoverContentProps {
|
|
28770
30023
|
/**
|
|
30024
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
30025
|
+
* identifier; new components should exclude it via
|
|
30026
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
30027
|
+
* Retained on existing components for backward compatibility.
|
|
30028
|
+
*
|
|
28771
30029
|
* The unique identifier for the block. This is used to identify the block in
|
|
28772
30030
|
* the DOM and in the block map. It is added as a data attribute
|
|
28773
30031
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -28775,6 +30033,11 @@ export const TrailingElementExample = () => {
|
|
|
28775
30033
|
*/
|
|
28776
30034
|
data-block-id?: string
|
|
28777
30035
|
/**
|
|
30036
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
30037
|
+
* marker; new components should exclude it via
|
|
30038
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
30039
|
+
* Retained on existing components for backward compatibility.
|
|
30040
|
+
*
|
|
28778
30041
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
28779
30042
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
28780
30043
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -29038,6 +30301,61 @@ export const PopoverCustomTargetExample = ({
|
|
|
29038
30301
|
);
|
|
29039
30302
|
};
|
|
29040
30303
|
|
|
30304
|
+
export const PopoverTriggerWidthExample: React.FC<{
|
|
30305
|
+
popoverProps?: Omit<PopoverProps, "children">;
|
|
30306
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
30307
|
+
initialWidth?: number;
|
|
30308
|
+
}> = ({
|
|
30309
|
+
popoverProps = { type: "dialog" },
|
|
30310
|
+
popoverContentProps,
|
|
30311
|
+
initialWidth = 240,
|
|
30312
|
+
}) => {
|
|
30313
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
30314
|
+
const [width, setWidth] = useState(initialWidth);
|
|
30315
|
+
|
|
30316
|
+
return (
|
|
30317
|
+
<Box
|
|
30318
|
+
display="flex"
|
|
30319
|
+
flexDirection="column"
|
|
30320
|
+
gap="lg"
|
|
30321
|
+
padding="xl"
|
|
30322
|
+
alignItems="flex-start"
|
|
30323
|
+
>
|
|
30324
|
+
<ActionButton
|
|
30325
|
+
label="Grow trigger"
|
|
30326
|
+
onPress={() => {
|
|
30327
|
+
setWidth((w) => w + 80);
|
|
30328
|
+
}}
|
|
30329
|
+
/>
|
|
30330
|
+
<Popover {...popoverProps}>
|
|
30331
|
+
<Box ref={triggerRef} data-testid="width-trigger" style={{ width }}>
|
|
30332
|
+
<PopoverTrigger>
|
|
30333
|
+
<ActionButton label="Open" style={{ width: "100%" }} />
|
|
30334
|
+
</PopoverTrigger>
|
|
30335
|
+
</Box>
|
|
30336
|
+
<PopoverContent
|
|
30337
|
+
placement="bottom"
|
|
30338
|
+
triggerRef={triggerRef}
|
|
30339
|
+
isNonModal={true}
|
|
30340
|
+
shouldCloseOnInteractOutside={() => false}
|
|
30341
|
+
{...popoverContentProps}
|
|
30342
|
+
>
|
|
30343
|
+
<Dialog
|
|
30344
|
+
size="content"
|
|
30345
|
+
aria-label="content"
|
|
30346
|
+
className={sprinkles({ padding: "md" })}
|
|
30347
|
+
// Fill the trigger-matched container so the bordered content spans
|
|
30348
|
+
// the full width instead of hugging its text.
|
|
30349
|
+
style={{ width: "100%" }}
|
|
30350
|
+
>
|
|
30351
|
+
<Text type="label">Width-matched popover</Text>
|
|
30352
|
+
</Dialog>
|
|
30353
|
+
</PopoverContent>
|
|
30354
|
+
</Popover>
|
|
30355
|
+
</Box>
|
|
30356
|
+
);
|
|
30357
|
+
};
|
|
30358
|
+
|
|
29041
30359
|
export const PopoverArrowExample: React.FC<
|
|
29042
30360
|
Omit<
|
|
29043
30361
|
PopoverProps & {
|
|
@@ -30118,6 +31436,61 @@ export const PopoverCustomTargetExample = ({
|
|
|
30118
31436
|
);
|
|
30119
31437
|
};
|
|
30120
31438
|
|
|
31439
|
+
export const PopoverTriggerWidthExample: React.FC<{
|
|
31440
|
+
popoverProps?: Omit<PopoverProps, "children">;
|
|
31441
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
31442
|
+
initialWidth?: number;
|
|
31443
|
+
}> = ({
|
|
31444
|
+
popoverProps = { type: "dialog" },
|
|
31445
|
+
popoverContentProps,
|
|
31446
|
+
initialWidth = 240,
|
|
31447
|
+
}) => {
|
|
31448
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
31449
|
+
const [width, setWidth] = useState(initialWidth);
|
|
31450
|
+
|
|
31451
|
+
return (
|
|
31452
|
+
<Box
|
|
31453
|
+
display="flex"
|
|
31454
|
+
flexDirection="column"
|
|
31455
|
+
gap="lg"
|
|
31456
|
+
padding="xl"
|
|
31457
|
+
alignItems="flex-start"
|
|
31458
|
+
>
|
|
31459
|
+
<ActionButton
|
|
31460
|
+
label="Grow trigger"
|
|
31461
|
+
onPress={() => {
|
|
31462
|
+
setWidth((w) => w + 80);
|
|
31463
|
+
}}
|
|
31464
|
+
/>
|
|
31465
|
+
<Popover {...popoverProps}>
|
|
31466
|
+
<Box ref={triggerRef} data-testid="width-trigger" style={{ width }}>
|
|
31467
|
+
<PopoverTrigger>
|
|
31468
|
+
<ActionButton label="Open" style={{ width: "100%" }} />
|
|
31469
|
+
</PopoverTrigger>
|
|
31470
|
+
</Box>
|
|
31471
|
+
<PopoverContent
|
|
31472
|
+
placement="bottom"
|
|
31473
|
+
triggerRef={triggerRef}
|
|
31474
|
+
isNonModal={true}
|
|
31475
|
+
shouldCloseOnInteractOutside={() => false}
|
|
31476
|
+
{...popoverContentProps}
|
|
31477
|
+
>
|
|
31478
|
+
<Dialog
|
|
31479
|
+
size="content"
|
|
31480
|
+
aria-label="content"
|
|
31481
|
+
className={sprinkles({ padding: "md" })}
|
|
31482
|
+
// Fill the trigger-matched container so the bordered content spans
|
|
31483
|
+
// the full width instead of hugging its text.
|
|
31484
|
+
style={{ width: "100%" }}
|
|
31485
|
+
>
|
|
31486
|
+
<Text type="label">Width-matched popover</Text>
|
|
31487
|
+
</Dialog>
|
|
31488
|
+
</PopoverContent>
|
|
31489
|
+
</Popover>
|
|
31490
|
+
</Box>
|
|
31491
|
+
);
|
|
31492
|
+
};
|
|
31493
|
+
|
|
30121
31494
|
export const PopoverArrowExample: React.FC<
|
|
30122
31495
|
Omit<
|
|
30123
31496
|
PopoverProps & {
|
|
@@ -31202,6 +32575,11 @@ export const SelectWithVirtualizeAutocompleteExample: React.FC<
|
|
|
31202
32575
|
);
|
|
31203
32576
|
};`},similarTo:[],figmaUrl:null},IconSlider:{id:"core-forms-slider-iconslider",importStatement:'import { IconSlider } from "@baseline-ui/core";',description:"",documentation:null,props:`interface IconSliderProps {
|
|
31204
32577
|
/**
|
|
32578
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
32579
|
+
* identifier; new components should exclude it via
|
|
32580
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
32581
|
+
* Retained on existing components for backward compatibility.
|
|
32582
|
+
*
|
|
31205
32583
|
* The unique identifier for the block. This is used to identify the block in
|
|
31206
32584
|
* the DOM and in the block map. It is added as a data attribute
|
|
31207
32585
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -31209,6 +32587,11 @@ export const SelectWithVirtualizeAutocompleteExample: React.FC<
|
|
|
31209
32587
|
*/
|
|
31210
32588
|
data-block-id?: string
|
|
31211
32589
|
/**
|
|
32590
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
32591
|
+
* marker; new components should exclude it via
|
|
32592
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
32593
|
+
* Retained on existing components for backward compatibility.
|
|
32594
|
+
*
|
|
31212
32595
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
31213
32596
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
31214
32597
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -32537,7 +33920,7 @@ padding={[null, "lg", "xl"]}
|
|
|
32537
33920
|
|
|
32538
33921
|
* [vanilla-extract sprinkles documentation](https://vanilla-extract.style/documentation/packages/sprinkles/) - Learn about the underlying sprinkles framework
|
|
32539
33922
|
* [Box component documentation](/docs/core-utilities-box--docs) - Detailed information about the Box component
|
|
32540
|
-
* [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var c={"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 p={version:"0.63.0"};var u=`
|
|
33923
|
+
* [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var c={"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 p={version:"1.0.0"};var u=`
|
|
32541
33924
|
# Baseline UI MCP Server Guidelines
|
|
32542
33925
|
|
|
32543
33926
|
This MCP server provides AI assistants with structured access to Baseline UI's comprehensive component documentation, icon library, theming resources, and design guidelines.
|
|
@@ -32692,13 +34075,13 @@ Use this tool to:
|
|
|
32692
34075
|
- Consult **list_components** to find the right component for your needs
|
|
32693
34076
|
- Reference **theming** for custom design systems
|
|
32694
34077
|
- Check **styling** for CSS and design token guidance
|
|
32695
|
-
`;var
|
|
34078
|
+
`;var S=`# List of available components in Baseline UI design system
|
|
32696
34079
|
| Name | Description | Similar To |
|
|
32697
34080
|
| --- | --- | --- |
|
|
32698
34081
|
${Object.entries(o).toSorted(([n],[t])=>n.localeCompare(t)).map(([n,{description:t,similarTo:e}])=>`|${n}|${t}|${e?.join(", ")||""}|`).join(`
|
|
32699
34082
|
`)}
|
|
32700
|
-
`,
|
|
34083
|
+
`,P=Object.entries(c).map(([n,t])=>`${n}
|
|
32701
34084
|
|
|
32702
34085
|
${t.map(e=>"- "+e).join(`
|
|
32703
34086
|
`)}`).join(`
|
|
32704
|
-
`);async function
|
|
34087
|
+
`);async function k(){let n=new McpServer({name:"baseline-ui",version:p.version});n.registerResource("list_components","resource://baseline-ui/list_components.md",{description:a,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:S}]})),n.registerResource("list_icons","resource://baseline-ui/list_icons.md",{description:r,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:l,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.styling}]})),n.registerResource("guidelines","resource://baseline-ui/guidelines.md",{description:s,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:u}]})),n.registerTool("get_component_info",{title:"Get component info",description:m,inputSchema:{componentName:z.enum(Object.keys(o))}},({componentName:e})=>({content:[{type:"text",text:JSON.stringify(Object.fromEntries(Object.entries(o[e]).filter(([f])=>!["description","similarTo","figmaUrl"].includes(f))),null,2)}]})),n.registerTool("get_story_url",{title:"Get story demo URL",description:h,inputSchema:{storyId:z.string()}},({storyId:e})=>({content:[{type:"text",text:`https://nutrient.io/baseline-ui/iframe.html?id=${e}`}]})),n.registerTool("get_figma_url",{title:"Get Figma URL",description:b,inputSchema:{componentName:z.enum(Object.keys(o))}},({componentName:e})=>({content:[{type:"text",text:o[e].figmaUrl}]})),n.registerTool("list_available_resources",{title:"List Available Resources",description:g,inputSchema:{}},()=>({content:[{type:"text",text:JSON.stringify([{name:"list_components",uri:"resource://baseline-ui/list_components.md",description:a,mimeType:"text/markdown"},{name:"list_icons",uri:"resource://baseline-ui/list_icons.md",description:r,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:l,mimeType:"text/markdown"},{name:"guidelines",uri:"resource://baseline-ui/guidelines.md",description:s,mimeType:"text/markdown"}],null,2)}]}));let t=new StdioServerTransport;await n.connect(t);}(async()=>await k())();
|