@baseline-ui/mcp 0.63.0 → 1.1.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 +4 -0
- package/dist/index.cjs +1837 -151
- package/dist/index.js +1837 -151
- package/package.json +1 -1
- package/sbom.json +15 -15
package/dist/index.cjs
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
|
|
@@ -3015,7 +3085,11 @@ headerVariant?: | "title"
|
|
|
3015
3085
|
size="sm"
|
|
3016
3086
|
aria-label="Event date"
|
|
3017
3087
|
headerVariant="selectMonthAndYear"
|
|
3018
|
-
title="Date" />;`},{id:"core-forms-calendar--select-month-and-year-extra-small",name:"Select Month And Year Extra Small",snippet:'const SelectMonthAndYearExtraSmall = () => <Calendar size="xs" aria-label="Event date" headerVariant="selectMonthAndYear" />;'},{id:"core-forms-calendar--
|
|
3088
|
+
title="Date" />;`},{id:"core-forms-calendar--select-month-and-year-extra-small",name:"Select Month And Year Extra Small",snippet:'const SelectMonthAndYearExtraSmall = () => <Calendar size="xs" aria-label="Event date" headerVariant="selectMonthAndYear" />;'},{id:"core-forms-calendar--fixed-weeks",name:"Fixed Weeks",snippet:`const FixedWeeks = () => <Calendar
|
|
3089
|
+
size="sm"
|
|
3090
|
+
aria-label="Event date"
|
|
3091
|
+
defaultValue={parseDate("2024-09-15")}
|
|
3092
|
+
weeksInMonth={6} />;`},{id:"core-forms-calendar--international-calendar",name:"International Calendar",snippet:`const InternationalCalendar = () => {
|
|
3019
3093
|
const [locale, setLocale] = React.useState("th-TH");
|
|
3020
3094
|
|
|
3021
3095
|
return (
|
|
@@ -3071,6 +3145,23 @@ export const MinMaxCalendarExample: React.FC<
|
|
|
3071
3145
|
);
|
|
3072
3146
|
};
|
|
3073
3147
|
|
|
3148
|
+
export const HeaderCalendarExample: React.FC<
|
|
3149
|
+
Omit<CalendarProps, "defaultValue" | "value" | "minValue" | "maxValue"> & {
|
|
3150
|
+
defaultValue?: string;
|
|
3151
|
+
minValue?: string;
|
|
3152
|
+
maxValue?: string;
|
|
3153
|
+
}
|
|
3154
|
+
> = ({ defaultValue, minValue, maxValue, ...rest }) => {
|
|
3155
|
+
return (
|
|
3156
|
+
<Calendar
|
|
3157
|
+
{...rest}
|
|
3158
|
+
defaultValue={defaultValue ? parseDate(defaultValue) : undefined}
|
|
3159
|
+
minValue={minValue ? parseDate(minValue) : undefined}
|
|
3160
|
+
maxValue={maxValue ? parseDate(maxValue) : undefined}
|
|
3161
|
+
/>
|
|
3162
|
+
);
|
|
3163
|
+
};
|
|
3164
|
+
|
|
3074
3165
|
export const UnavailableCalendarExample: React.FC<
|
|
3075
3166
|
Omit<CalendarProps, "defaultValue" | "value" | "isDateUnavailable"> & {
|
|
3076
3167
|
defaultValue?: string;
|
|
@@ -3124,6 +3215,32 @@ export const InternationalRangeCalendarExample: React.FC<
|
|
|
3124
3215
|
);
|
|
3125
3216
|
};
|
|
3126
3217
|
|
|
3218
|
+
export const AnchorDateRangeCalendarExample: React.FC<
|
|
3219
|
+
Omit<RangeCalendarProps, "defaultValue" | "value" | "isDateUnavailable"> & {
|
|
3220
|
+
defaultValue?: { start: string; end: string };
|
|
3221
|
+
}
|
|
3222
|
+
> = ({ defaultValue, ...rest }) => {
|
|
3223
|
+
return (
|
|
3224
|
+
<RangeCalendar
|
|
3225
|
+
{...rest}
|
|
3226
|
+
defaultValue={
|
|
3227
|
+
defaultValue
|
|
3228
|
+
? {
|
|
3229
|
+
start: parseDate(defaultValue.start),
|
|
3230
|
+
end: parseDate(defaultValue.end),
|
|
3231
|
+
}
|
|
3232
|
+
: undefined
|
|
3233
|
+
}
|
|
3234
|
+
// Marks dates more than a week from the in-progress selection anchor as
|
|
3235
|
+
// unavailable. \`anchorDate\` is null until a start date is picked, so this
|
|
3236
|
+
// exercises the second argument react-aria passes to \`isDateUnavailable\`.
|
|
3237
|
+
isDateUnavailable={(date, anchorDate) =>
|
|
3238
|
+
anchorDate ? Math.abs(date.compare(anchorDate)) > 7 : false
|
|
3239
|
+
}
|
|
3240
|
+
/>
|
|
3241
|
+
);
|
|
3242
|
+
};
|
|
3243
|
+
|
|
3127
3244
|
export const RangeCalendarExample: React.FC<
|
|
3128
3245
|
Omit<RangeCalendarProps, "defaultValue" | "value"> & {
|
|
3129
3246
|
defaultValue?: { start: string; end: string };
|
|
@@ -3331,6 +3448,11 @@ When the \`title\` prop is set, it is automatically linked via \`aria-labelledby
|
|
|
3331
3448
|
* **[Calendar](/docs/core-forms-calendar--docs)** \u2013 For selecting a single date instead of a range
|
|
3332
3449
|
* **[DateField](/docs/core-forms-datefield--docs)** \u2013 For keyboard-based date input with individual editable segments`,props:`interface RangeCalendarProps {
|
|
3333
3450
|
/**
|
|
3451
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3452
|
+
* identifier; new components should exclude it via
|
|
3453
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3454
|
+
* Retained on existing components for backward compatibility.
|
|
3455
|
+
*
|
|
3334
3456
|
* The unique identifier for the block. This is used to identify the block in
|
|
3335
3457
|
* the DOM and in the block map. It is added as a data attribute
|
|
3336
3458
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -3338,6 +3460,11 @@ When the \`title\` prop is set, it is automatically linked via \`aria-labelledby
|
|
|
3338
3460
|
*/
|
|
3339
3461
|
data-block-id?: string
|
|
3340
3462
|
/**
|
|
3463
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3464
|
+
* marker; new components should exclude it via
|
|
3465
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3466
|
+
* Retained on existing components for backward compatibility.
|
|
3467
|
+
*
|
|
3341
3468
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
3342
3469
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
3343
3470
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3396,7 +3523,14 @@ headerVariant?: | "title"
|
|
|
3396
3523
|
size="sm"
|
|
3397
3524
|
aria-label="Trip dates"
|
|
3398
3525
|
minValue={today(getLocalTimeZone())}
|
|
3399
|
-
maxValue={today(getLocalTimeZone()).add({ months: 1 })} />;`},{id:"core-forms-rangecalendar--
|
|
3526
|
+
maxValue={today(getLocalTimeZone()).add({ months: 1 })} />;`},{id:"core-forms-rangecalendar--fixed-weeks",name:"Fixed Weeks",snippet:`const FixedWeeks = () => <RangeCalendar
|
|
3527
|
+
size="sm"
|
|
3528
|
+
aria-label="Trip dates"
|
|
3529
|
+
defaultValue={{
|
|
3530
|
+
start: parseDate("2024-09-02"),
|
|
3531
|
+
end: parseDate("2024-09-11"),
|
|
3532
|
+
}}
|
|
3533
|
+
weeksInMonth={6} />;`},{id:"core-forms-rangecalendar--unavailable-dates",name:"Unavailable Dates",snippet:`const UnavailableDates = () => <RangeCalendar
|
|
3400
3534
|
size="sm"
|
|
3401
3535
|
aria-label="Trip dates"
|
|
3402
3536
|
defaultValue={{
|
|
@@ -3473,6 +3607,23 @@ export const MinMaxCalendarExample: React.FC<
|
|
|
3473
3607
|
);
|
|
3474
3608
|
};
|
|
3475
3609
|
|
|
3610
|
+
export const HeaderCalendarExample: React.FC<
|
|
3611
|
+
Omit<CalendarProps, "defaultValue" | "value" | "minValue" | "maxValue"> & {
|
|
3612
|
+
defaultValue?: string;
|
|
3613
|
+
minValue?: string;
|
|
3614
|
+
maxValue?: string;
|
|
3615
|
+
}
|
|
3616
|
+
> = ({ defaultValue, minValue, maxValue, ...rest }) => {
|
|
3617
|
+
return (
|
|
3618
|
+
<Calendar
|
|
3619
|
+
{...rest}
|
|
3620
|
+
defaultValue={defaultValue ? parseDate(defaultValue) : undefined}
|
|
3621
|
+
minValue={minValue ? parseDate(minValue) : undefined}
|
|
3622
|
+
maxValue={maxValue ? parseDate(maxValue) : undefined}
|
|
3623
|
+
/>
|
|
3624
|
+
);
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3476
3627
|
export const UnavailableCalendarExample: React.FC<
|
|
3477
3628
|
Omit<CalendarProps, "defaultValue" | "value" | "isDateUnavailable"> & {
|
|
3478
3629
|
defaultValue?: string;
|
|
@@ -3526,6 +3677,32 @@ export const InternationalRangeCalendarExample: React.FC<
|
|
|
3526
3677
|
);
|
|
3527
3678
|
};
|
|
3528
3679
|
|
|
3680
|
+
export const AnchorDateRangeCalendarExample: React.FC<
|
|
3681
|
+
Omit<RangeCalendarProps, "defaultValue" | "value" | "isDateUnavailable"> & {
|
|
3682
|
+
defaultValue?: { start: string; end: string };
|
|
3683
|
+
}
|
|
3684
|
+
> = ({ defaultValue, ...rest }) => {
|
|
3685
|
+
return (
|
|
3686
|
+
<RangeCalendar
|
|
3687
|
+
{...rest}
|
|
3688
|
+
defaultValue={
|
|
3689
|
+
defaultValue
|
|
3690
|
+
? {
|
|
3691
|
+
start: parseDate(defaultValue.start),
|
|
3692
|
+
end: parseDate(defaultValue.end),
|
|
3693
|
+
}
|
|
3694
|
+
: undefined
|
|
3695
|
+
}
|
|
3696
|
+
// Marks dates more than a week from the in-progress selection anchor as
|
|
3697
|
+
// unavailable. \`anchorDate\` is null until a start date is picked, so this
|
|
3698
|
+
// exercises the second argument react-aria passes to \`isDateUnavailable\`.
|
|
3699
|
+
isDateUnavailable={(date, anchorDate) =>
|
|
3700
|
+
anchorDate ? Math.abs(date.compare(anchorDate)) > 7 : false
|
|
3701
|
+
}
|
|
3702
|
+
/>
|
|
3703
|
+
);
|
|
3704
|
+
};
|
|
3705
|
+
|
|
3529
3706
|
export const RangeCalendarExample: React.FC<
|
|
3530
3707
|
Omit<RangeCalendarProps, "defaultValue" | "value"> & {
|
|
3531
3708
|
defaultValue?: { start: string; end: string };
|
|
@@ -3552,6 +3729,11 @@ export const RangeCalendarExample: React.FC<
|
|
|
3552
3729
|
);
|
|
3553
3730
|
};`},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
3731
|
/**
|
|
3732
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3733
|
+
* identifier; new components should exclude it via
|
|
3734
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3735
|
+
* Retained on existing components for backward compatibility.
|
|
3736
|
+
*
|
|
3555
3737
|
* The unique identifier for the block. This is used to identify the block in
|
|
3556
3738
|
* the DOM and in the block map. It is added as a data attribute
|
|
3557
3739
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -3559,6 +3741,11 @@ export const RangeCalendarExample: React.FC<
|
|
|
3559
3741
|
*/
|
|
3560
3742
|
data-block-id?: string
|
|
3561
3743
|
/**
|
|
3744
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3745
|
+
* marker; new components should exclude it via
|
|
3746
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3747
|
+
* Retained on existing components for backward compatibility.
|
|
3748
|
+
*
|
|
3562
3749
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
3563
3750
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
3564
3751
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3654,6 +3841,11 @@ defaultOpen?: boolean
|
|
|
3654
3841
|
*/
|
|
3655
3842
|
onOpenChange?: (isOpen: boolean) => void
|
|
3656
3843
|
/**
|
|
3844
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
3845
|
+
* identifier; new components should exclude it via
|
|
3846
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3847
|
+
* Retained on existing components for backward compatibility.
|
|
3848
|
+
*
|
|
3657
3849
|
* The unique identifier for the block. This is used to identify the block in
|
|
3658
3850
|
* the DOM and in the block map. It is added as a data attribute
|
|
3659
3851
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -3661,6 +3853,11 @@ onOpenChange?: (isOpen: boolean) => void
|
|
|
3661
3853
|
*/
|
|
3662
3854
|
data-block-id?: string
|
|
3663
3855
|
/**
|
|
3856
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
3857
|
+
* marker; new components should exclude it via
|
|
3858
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
3859
|
+
* Retained on existing components for backward compatibility.
|
|
3860
|
+
*
|
|
3664
3861
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
3665
3862
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
3666
3863
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -3993,6 +4190,11 @@ The indeterminate state is useful for representing a mixed color value, such as
|
|
|
3993
4190
|
/>
|
|
3994
4191
|
\`\`\``,props:`interface ColorSwatchProps {
|
|
3995
4192
|
/**
|
|
4193
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
4194
|
+
* identifier; new components should exclude it via
|
|
4195
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4196
|
+
* Retained on existing components for backward compatibility.
|
|
4197
|
+
*
|
|
3996
4198
|
* The unique identifier for the block. This is used to identify the block in
|
|
3997
4199
|
* the DOM and in the block map. It is added as a data attribute
|
|
3998
4200
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -4000,6 +4202,11 @@ The indeterminate state is useful for representing a mixed color value, such as
|
|
|
4000
4202
|
*/
|
|
4001
4203
|
data-block-id?: string
|
|
4002
4204
|
/**
|
|
4205
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
4206
|
+
* marker; new components should exclude it via
|
|
4207
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4208
|
+
* Retained on existing components for backward compatibility.
|
|
4209
|
+
*
|
|
4003
4210
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
4004
4211
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
4005
4212
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -4134,6 +4341,11 @@ import { ColorSwatchPicker } from "../../utils";
|
|
|
4134
4341
|
\`\`\`
|
|
4135
4342
|
\`\`\``,props:`interface ColorSwatchPickerProps {
|
|
4136
4343
|
/**
|
|
4344
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
4345
|
+
* identifier; new components should exclude it via
|
|
4346
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4347
|
+
* Retained on existing components for backward compatibility.
|
|
4348
|
+
*
|
|
4137
4349
|
* The unique identifier for the block. This is used to identify the block in
|
|
4138
4350
|
* the DOM and in the block map. It is added as a data attribute
|
|
4139
4351
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -4141,6 +4353,11 @@ import { ColorSwatchPicker } from "../../utils";
|
|
|
4141
4353
|
*/
|
|
4142
4354
|
data-block-id?: string
|
|
4143
4355
|
/**
|
|
4356
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
4357
|
+
* marker; new components should exclude it via
|
|
4358
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4359
|
+
* Retained on existing components for backward compatibility.
|
|
4360
|
+
*
|
|
4144
4361
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
4145
4362
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
4146
4363
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -4399,6 +4616,11 @@ When the dropdown list is open, the following keyboard interactions are supporte
|
|
|
4399
4616
|
| \`End\` | Moves focus to the last item. |
|
|
4400
4617
|
| \`Esc\` | Closes the dropdown. |`,props:`interface ComboBoxProps {
|
|
4401
4618
|
/**
|
|
4619
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
4620
|
+
* identifier; new components should exclude it via
|
|
4621
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4622
|
+
* Retained on existing components for backward compatibility.
|
|
4623
|
+
*
|
|
4402
4624
|
* The unique identifier for the block. This is used to identify the block in
|
|
4403
4625
|
* the DOM and in the block map. It is added as a data attribute
|
|
4404
4626
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -4406,6 +4628,11 @@ When the dropdown list is open, the following keyboard interactions are supporte
|
|
|
4406
4628
|
*/
|
|
4407
4629
|
data-block-id?: string
|
|
4408
4630
|
/**
|
|
4631
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
4632
|
+
* marker; new components should exclude it via
|
|
4633
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
4634
|
+
* Retained on existing components for backward compatibility.
|
|
4635
|
+
*
|
|
4409
4636
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
4410
4637
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
4411
4638
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -5075,6 +5302,11 @@ import { CalendarDate } from "@internationalized/date";
|
|
|
5075
5302
|
| \`ArrowLeft/Right\` | Navigate between date segments |
|
|
5076
5303
|
| \`ArrowUp/Down\` | Increment/decrement the selected segment |`,props:`interface DateFieldProps {
|
|
5077
5304
|
/**
|
|
5305
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
5306
|
+
* identifier; new components should exclude it via
|
|
5307
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5308
|
+
* Retained on existing components for backward compatibility.
|
|
5309
|
+
*
|
|
5078
5310
|
* The unique identifier for the block. This is used to identify the block in
|
|
5079
5311
|
* the DOM and in the block map. It is added as a data attribute
|
|
5080
5312
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -5082,6 +5314,11 @@ import { CalendarDate } from "@internationalized/date";
|
|
|
5082
5314
|
*/
|
|
5083
5315
|
data-block-id?: string
|
|
5084
5316
|
/**
|
|
5317
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
5318
|
+
* marker; new components should exclude it via
|
|
5319
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5320
|
+
* Retained on existing components for backward compatibility.
|
|
5321
|
+
*
|
|
5085
5322
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
5086
5323
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
5087
5324
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -5682,6 +5919,11 @@ The \`useDevice\` hook returns a string indicating the current device type:
|
|
|
5682
5919
|
| \`"tablet"\` | Screen width is greater than or equal to the tablet breakpoint but less than the desktop breakpoint |
|
|
5683
5920
|
| \`"desktop"\` | Screen width is greater than or equal to the desktop breakpoint |`,props:`interface DeviceProviderProps {
|
|
5684
5921
|
/**
|
|
5922
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
5923
|
+
* identifier; new components should exclude it via
|
|
5924
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5925
|
+
* Retained on existing components for backward compatibility.
|
|
5926
|
+
*
|
|
5685
5927
|
* The unique identifier for the block. This is used to identify the block in
|
|
5686
5928
|
* the DOM and in the block map. It is added as a data attribute
|
|
5687
5929
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -5689,6 +5931,11 @@ The \`useDevice\` hook returns a string indicating the current device type:
|
|
|
5689
5931
|
*/
|
|
5690
5932
|
data-block-id?: string
|
|
5691
5933
|
/**
|
|
5934
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
5935
|
+
* marker; new components should exclude it via
|
|
5936
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
5937
|
+
* Retained on existing components for backward compatibility.
|
|
5938
|
+
*
|
|
5692
5939
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
5693
5940
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
5694
5941
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -5856,10 +6103,16 @@ By default, the \`Dialog\` component traps focus within the dialog. This means t
|
|
|
5856
6103
|
| <kbd>Tab</kbd> | Move focus to the next focusable element in the dialog. If focus is on the last element, move focus to the first focusable element. |`,props:`interface DialogProps {
|
|
5857
6104
|
/**
|
|
5858
6105
|
* The accessibility role for the dialog.
|
|
6106
|
+
*
|
|
5859
6107
|
* @default 'dialog'
|
|
5860
6108
|
*/
|
|
5861
6109
|
role?: 'dialog' | 'alertdialog'
|
|
5862
6110
|
/**
|
|
6111
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
6112
|
+
* identifier; new components should exclude it via
|
|
6113
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6114
|
+
* Retained on existing components for backward compatibility.
|
|
6115
|
+
*
|
|
5863
6116
|
* The unique identifier for the block. This is used to identify the block in
|
|
5864
6117
|
* the DOM and in the block map. It is added as a data attribute
|
|
5865
6118
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -5867,6 +6120,11 @@ role?: 'dialog' | 'alertdialog'
|
|
|
5867
6120
|
*/
|
|
5868
6121
|
data-block-id?: string
|
|
5869
6122
|
/**
|
|
6123
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
6124
|
+
* marker; new components should exclude it via
|
|
6125
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6126
|
+
* Retained on existing components for backward compatibility.
|
|
6127
|
+
*
|
|
5870
6128
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
5871
6129
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
5872
6130
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -6617,6 +6875,11 @@ export const TruncatedTitleDisclosure: React.FC = () => {
|
|
|
6617
6875
|
);
|
|
6618
6876
|
};`},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
6877
|
/**
|
|
6878
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
6879
|
+
* identifier; new components should exclude it via
|
|
6880
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6881
|
+
* Retained on existing components for backward compatibility.
|
|
6882
|
+
*
|
|
6620
6883
|
* The unique identifier for the block. This is used to identify the block in
|
|
6621
6884
|
* the DOM and in the block map. It is added as a data attribute
|
|
6622
6885
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -6624,6 +6887,11 @@ export const TruncatedTitleDisclosure: React.FC = () => {
|
|
|
6624
6887
|
*/
|
|
6625
6888
|
data-block-id?: string
|
|
6626
6889
|
/**
|
|
6890
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
6891
|
+
* marker; new components should exclude it via
|
|
6892
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6893
|
+
* Retained on existing components for backward compatibility.
|
|
6894
|
+
*
|
|
6627
6895
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
6628
6896
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
6629
6897
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -6641,6 +6909,7 @@ className?: string
|
|
|
6641
6909
|
style?: React.CSSProperties
|
|
6642
6910
|
/**
|
|
6643
6911
|
* The accessibility role for the dialog.
|
|
6912
|
+
*
|
|
6644
6913
|
* @default 'dialog'
|
|
6645
6914
|
*/
|
|
6646
6915
|
role?: 'dialog' | 'alertdialog'
|
|
@@ -6698,6 +6967,11 @@ export const DrawerWithActionExample: React.FC<{
|
|
|
6698
6967
|
);
|
|
6699
6968
|
};`},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
6969
|
/**
|
|
6970
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
6971
|
+
* identifier; new components should exclude it via
|
|
6972
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6973
|
+
* Retained on existing components for backward compatibility.
|
|
6974
|
+
*
|
|
6701
6975
|
* The unique identifier for the block. This is used to identify the block in
|
|
6702
6976
|
* the DOM and in the block map. It is added as a data attribute
|
|
6703
6977
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -6705,6 +6979,11 @@ export const DrawerWithActionExample: React.FC<{
|
|
|
6705
6979
|
*/
|
|
6706
6980
|
data-block-id?: string
|
|
6707
6981
|
/**
|
|
6982
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
6983
|
+
* marker; new components should exclude it via
|
|
6984
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
6985
|
+
* Retained on existing components for backward compatibility.
|
|
6986
|
+
*
|
|
6708
6987
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
6709
6988
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
6710
6989
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -6886,6 +7165,15 @@ autoFocus?: boolean | "start" | "end"
|
|
|
6886
7165
|
* @default false
|
|
6887
7166
|
*/
|
|
6888
7167
|
saveOnEnter?: boolean
|
|
7168
|
+
/**
|
|
7169
|
+
* Whether URL-shaped text is automatically converted into links: typing a
|
|
7170
|
+
* space or Enter after a URL, pasting text that contains URLs, and pasting a
|
|
7171
|
+
* lone URL over a selection (wraps the selection as a link). Only applies
|
|
7172
|
+
* when \`enableRichText\` is \`true\`.
|
|
7173
|
+
*
|
|
7174
|
+
* @default true
|
|
7175
|
+
*/
|
|
7176
|
+
autoLink?: boolean
|
|
6889
7177
|
}`,stories:{usage:[{id:"core-miscellaneous-editor-rich-text--default",name:"Default",snippet:`const Default = () => <Editor
|
|
6890
7178
|
placeholder="Placeholder"
|
|
6891
7179
|
aria-label="Editor"
|
|
@@ -7385,7 +7673,7 @@ export const EditorWithAutoFocusAndCaretAtEnd = ({
|
|
|
7385
7673
|
editorHandle={editorHandleRef}
|
|
7386
7674
|
/>
|
|
7387
7675
|
);
|
|
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 [`
|
|
7676
|
+
};`},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
7677
|
/**
|
|
7390
7678
|
* The description to display below the input.
|
|
7391
7679
|
*/
|
|
@@ -7567,7 +7855,7 @@ labelPosition?: any
|
|
|
7567
7855
|
],
|
|
7568
7856
|
}}
|
|
7569
7857
|
/>
|
|
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 `
|
|
7858
|
+
);`}],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
7859
|
/**
|
|
7572
7860
|
* The className applied to the root element.
|
|
7573
7861
|
*/
|
|
@@ -7885,7 +8173,125 @@ export const AriaDetailsFileList: React.FC = () => (
|
|
|
7885
8173
|
items={defaultItems}
|
|
7886
8174
|
/>
|
|
7887
8175
|
</>
|
|
7888
|
-
);`},similarTo:["
|
|
8176
|
+
);`},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 {
|
|
8177
|
+
/**
|
|
8178
|
+
* The visual variant.
|
|
8179
|
+
*
|
|
8180
|
+
* - \`dropzone\` (default): renders a drop area that accepts dragged and
|
|
8181
|
+
* pasted files. Clicking anywhere in the area opens the file picker.
|
|
8182
|
+
* - \`button\`: renders an \`ActionButton\` that opens the file picker. No
|
|
8183
|
+
* drop target is rendered.
|
|
8184
|
+
*
|
|
8185
|
+
* @default "dropzone"
|
|
8186
|
+
*/
|
|
8187
|
+
variant?: "dropzone" | "button"
|
|
8188
|
+
/**
|
|
8189
|
+
* Whether the \`dropzone\` drop area is rendered inline \u2014 outlined with a
|
|
8190
|
+
* dashed border and rounded corners \u2014 instead of as a plain filled box.
|
|
8191
|
+
* Has no effect on the \`button\` variant.
|
|
8192
|
+
*
|
|
8193
|
+
* @default false
|
|
8194
|
+
*/
|
|
8195
|
+
isInline?: boolean
|
|
8196
|
+
/**
|
|
8197
|
+
* Optional label rendered above the trigger.
|
|
8198
|
+
*/
|
|
8199
|
+
label?: React.ReactNode
|
|
8200
|
+
/**
|
|
8201
|
+
* Optional description rendered below the label.
|
|
8202
|
+
*/
|
|
8203
|
+
description?: React.ReactNode
|
|
8204
|
+
/**
|
|
8205
|
+
* Called when the user selects or drops new files.
|
|
8206
|
+
*/
|
|
8207
|
+
onAdd?: (files: File[]) => void
|
|
8208
|
+
/**
|
|
8209
|
+
* The file types the uploader accepts, as a comma-separated list of file
|
|
8210
|
+
* extensions (\`.png\`), MIME types (\`image/png\`), or wildcard MIME types
|
|
8211
|
+
* (\`image/*\`). Passed through to the underlying \`<input type="file">\`
|
|
8212
|
+
* \`accept\` attribute, and also used to filter dropped and pasted files so
|
|
8213
|
+
* the drop/paste path enforces the same restriction as the native picker.
|
|
8214
|
+
*/
|
|
8215
|
+
accept?: string
|
|
8216
|
+
/**
|
|
8217
|
+
* Whether multiple files can be selected at once.
|
|
8218
|
+
*
|
|
8219
|
+
* @default true
|
|
8220
|
+
*/
|
|
8221
|
+
allowsMultiple?: boolean
|
|
8222
|
+
/**
|
|
8223
|
+
* Whether the entire uploader is disabled.
|
|
8224
|
+
*/
|
|
8225
|
+
isDisabled?: boolean
|
|
8226
|
+
/**
|
|
8227
|
+
* Top-level error message. When provided, the dropzone is rendered with
|
|
8228
|
+
* the error border and the message is wired to the trigger via
|
|
8229
|
+
* \`aria-describedby\`, so it must be plain text.
|
|
8230
|
+
*/
|
|
8231
|
+
errorMessage?: string
|
|
8232
|
+
/**
|
|
8233
|
+
* The label of the button rendered in the \`button\` variant.
|
|
8234
|
+
*
|
|
8235
|
+
* @default "Upload"
|
|
8236
|
+
*/
|
|
8237
|
+
buttonLabel?: string
|
|
8238
|
+
/**
|
|
8239
|
+
* The text rendered inside the clickable drop area in the \`dropzone\`
|
|
8240
|
+
* variant.
|
|
8241
|
+
*
|
|
8242
|
+
* @default "Drop files here or click to upload"
|
|
8243
|
+
*/
|
|
8244
|
+
dropzoneLabel?: string
|
|
8245
|
+
}`,stories:{usage:[{id:"core-forms-fileuploader--default",name:"Default",snippet:`const Default = () => <Box style={{ width: 240 }}>
|
|
8246
|
+
<UploaderWithFileList label="Label" description="Supports .mov and .mp4" onAdd={fn()} />
|
|
8247
|
+
</Box>;`},{id:"core-forms-fileuploader--variants",name:"Variants",snippet:`const Variants = (args) => (
|
|
8248
|
+
<VariantViewer<FileUploaderProps>
|
|
8249
|
+
header={["Default", "Error", "Disabled"]}
|
|
8250
|
+
component={UploaderWithFileList}
|
|
8251
|
+
defaultProps={args}
|
|
8252
|
+
cellStyle={{ width: 240 }}
|
|
8253
|
+
variants={{
|
|
8254
|
+
Dropzone: [
|
|
8255
|
+
{ variant: "dropzone" },
|
|
8256
|
+
{ variant: "dropzone", ...ERROR_PROPS },
|
|
8257
|
+
{ variant: "dropzone", ...DISABLED_PROPS },
|
|
8258
|
+
],
|
|
8259
|
+
Inline: [
|
|
8260
|
+
{ isInline: true },
|
|
8261
|
+
{ isInline: true, ...ERROR_PROPS },
|
|
8262
|
+
{ isInline: true, ...DISABLED_PROPS },
|
|
8263
|
+
],
|
|
8264
|
+
Button: [
|
|
8265
|
+
{ variant: "button" },
|
|
8266
|
+
{ variant: "button", ...ERROR_PROPS },
|
|
8267
|
+
{ variant: "button", ...DISABLED_PROPS },
|
|
8268
|
+
],
|
|
8269
|
+
}}
|
|
8270
|
+
/>
|
|
8271
|
+
);`},{id:"core-forms-fileuploader--button-variant",name:"Button Variant",snippet:`const ButtonVariant = () => <Box style={{ width: 240 }}>
|
|
8272
|
+
<UploaderWithFileList
|
|
8273
|
+
label="Label"
|
|
8274
|
+
description="Supports .mov and .mp4"
|
|
8275
|
+
onAdd={fn()}
|
|
8276
|
+
variant="button"
|
|
8277
|
+
buttonLabel="Upload" />
|
|
8278
|
+
</Box>;`},{id:"core-forms-fileuploader--inline",name:"Inline",snippet:`const Inline = () => <Box style={{ width: 240 }}>
|
|
8279
|
+
<UploaderWithFileList label="Label" description="Supports .mov and .mp4" onAdd={fn()} isInline />
|
|
8280
|
+
</Box>;`},{id:"core-forms-fileuploader--error-dropzone",name:"Error Dropzone",snippet:`const ErrorDropzone = () => <Box style={{ width: 240 }}>
|
|
8281
|
+
<UploaderWithFileList
|
|
8282
|
+
label="Label"
|
|
8283
|
+
description="Supports .mov and .mp4"
|
|
8284
|
+
onAdd={fn()}
|
|
8285
|
+
errorMessage="Upload failed." />
|
|
8286
|
+
</Box>;`},{id:"core-forms-fileuploader--disabled",name:"Disabled",snippet:`const Disabled = () => <Box style={{ width: 240 }}>
|
|
8287
|
+
<UploaderWithFileList
|
|
8288
|
+
label="Label"
|
|
8289
|
+
description="Supports .mov and .mp4"
|
|
8290
|
+
onAdd={fn()}
|
|
8291
|
+
isDisabled />
|
|
8292
|
+
</Box>;`},{id:"core-forms-fileuploader--no-label",name:"No Label",snippet:`const NoLabel = () => <Box style={{ width: 240 }}>
|
|
8293
|
+
<UploaderWithFileList label={undefined} description={undefined} onAdd={fn()} />
|
|
8294
|
+
</Box>;`}],implementation:""},similarTo:[],figmaUrl:null},FrameProvider:{id:"core-utilities-frameprovider",breadcrumb:"Core/Utilities/FrameProvider",importStatement:`import {
|
|
7889
8295
|
Box,
|
|
7890
8296
|
FrameProvider,
|
|
7891
8297
|
NestedTestFrameProvider,
|
|
@@ -7998,6 +8404,11 @@ function App() {
|
|
|
7998
8404
|
2. The container must have non-zero dimensions for proper overlay positioning.
|
|
7999
8405
|
3. On mobile devices, overlays are typically rendered at the document body level for better user experience.`,props:`interface FrameProviderProps {
|
|
8000
8406
|
/**
|
|
8407
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
8408
|
+
* identifier; new components should exclude it via
|
|
8409
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8410
|
+
* Retained on existing components for backward compatibility.
|
|
8411
|
+
*
|
|
8001
8412
|
* The unique identifier for the block. This is used to identify the block in
|
|
8002
8413
|
* the DOM and in the block map. It is added as a data attribute
|
|
8003
8414
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -8005,6 +8416,11 @@ function App() {
|
|
|
8005
8416
|
*/
|
|
8006
8417
|
data-block-id?: string
|
|
8007
8418
|
/**
|
|
8419
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
8420
|
+
* marker; new components should exclude it via
|
|
8421
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8422
|
+
* Retained on existing components for backward compatibility.
|
|
8423
|
+
*
|
|
8008
8424
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
8009
8425
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
8010
8426
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -8558,6 +8974,11 @@ import { I18nProvider, FreehandCanvas } from "@baseline-ui/core";
|
|
|
8558
8974
|
</I18nProvider>;
|
|
8559
8975
|
\`\`\``,props:`interface FreehandCanvasProps {
|
|
8560
8976
|
/**
|
|
8977
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
8978
|
+
* identifier; new components should exclude it via
|
|
8979
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8980
|
+
* Retained on existing components for backward compatibility.
|
|
8981
|
+
*
|
|
8561
8982
|
* The unique identifier for the block. This is used to identify the block in
|
|
8562
8983
|
* the DOM and in the block map. It is added as a data attribute
|
|
8563
8984
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -8565,6 +8986,11 @@ import { I18nProvider, FreehandCanvas } from "@baseline-ui/core";
|
|
|
8565
8986
|
*/
|
|
8566
8987
|
data-block-id?: string
|
|
8567
8988
|
/**
|
|
8989
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
8990
|
+
* marker; new components should exclude it via
|
|
8991
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
8992
|
+
* Retained on existing components for backward compatibility.
|
|
8993
|
+
*
|
|
8568
8994
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
8569
8995
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
8570
8996
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -9079,6 +9505,22 @@ export const GridListExample: React.FC<GridListExampleProps> = (props) => {
|
|
|
9079
9505
|
);
|
|
9080
9506
|
};
|
|
9081
9507
|
|
|
9508
|
+
// Renders a focusable element before the grid so a spec can Tab into the grid
|
|
9509
|
+
// from a known in-frame origin (reliable across normal/shadow/iframe DOM
|
|
9510
|
+
// modes), exercising the keyboard-entry behavior of \`UNSTABLE_focusOnEntry\`.
|
|
9511
|
+
export const GridListFocusOnEntryExample: React.FC<GridListExampleProps> = (
|
|
9512
|
+
props,
|
|
9513
|
+
) => {
|
|
9514
|
+
return (
|
|
9515
|
+
<>
|
|
9516
|
+
<button type="button" data-testid="before-grid">
|
|
9517
|
+
before
|
|
9518
|
+
</button>
|
|
9519
|
+
<GridListExample {...props} />
|
|
9520
|
+
</>
|
|
9521
|
+
);
|
|
9522
|
+
};
|
|
9523
|
+
|
|
9082
9524
|
export const GridListControlledExample: React.FC<GridListExampleProps> = (
|
|
9083
9525
|
props,
|
|
9084
9526
|
) => {
|
|
@@ -9315,6 +9757,11 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
9315
9757
|
);
|
|
9316
9758
|
};`},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
9759
|
/**
|
|
9760
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
9761
|
+
* identifier; new components should exclude it via
|
|
9762
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
9763
|
+
* Retained on existing components for backward compatibility.
|
|
9764
|
+
*
|
|
9318
9765
|
* The unique identifier for the block. This is used to identify the block in
|
|
9319
9766
|
* the DOM and in the block map. It is added as a data attribute
|
|
9320
9767
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -9322,6 +9769,11 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
9322
9769
|
*/
|
|
9323
9770
|
data-block-id?: string
|
|
9324
9771
|
/**
|
|
9772
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
9773
|
+
* marker; new components should exclude it via
|
|
9774
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
9775
|
+
* Retained on existing components for backward compatibility.
|
|
9776
|
+
*
|
|
9325
9777
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
9326
9778
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
9327
9779
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -9552,6 +10004,71 @@ import { I18nProvider, ImageDropZone } from "@baseline-ui/core";
|
|
|
9552
10004
|
<ImageDropZone onValueChange={console.log} />
|
|
9553
10005
|
</I18nProvider>;
|
|
9554
10006
|
\`\`\``,props:`interface ImageDropZoneProps {
|
|
10007
|
+
/**
|
|
10008
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
10009
|
+
* identifier; new components should exclude it via
|
|
10010
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10011
|
+
* Retained on existing components for backward compatibility.
|
|
10012
|
+
*
|
|
10013
|
+
* The unique identifier for the block. This is used to identify the block in
|
|
10014
|
+
* the DOM and in the block map. It is added as a data attribute
|
|
10015
|
+
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
10016
|
+
* rendered.
|
|
10017
|
+
*/
|
|
10018
|
+
data-block-id?: string
|
|
10019
|
+
/**
|
|
10020
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
10021
|
+
* marker; new components should exclude it via
|
|
10022
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10023
|
+
* Retained on existing components for backward compatibility.
|
|
10024
|
+
*
|
|
10025
|
+
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
10026
|
+
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
10027
|
+
* together in the DOM and in the block map. It is added as a data attribute
|
|
10028
|
+
* \`data-block-class\` to the root element of the block if a DOM node is
|
|
10029
|
+
* rendered.
|
|
10030
|
+
*/
|
|
10031
|
+
data-block-class?: string
|
|
10032
|
+
/**
|
|
10033
|
+
* The className applied to the root element of the component.
|
|
10034
|
+
*/
|
|
10035
|
+
className?: string
|
|
10036
|
+
/**
|
|
10037
|
+
* The style applied to the root element of the component.
|
|
10038
|
+
*/
|
|
10039
|
+
style?: React.CSSProperties
|
|
10040
|
+
/**
|
|
10041
|
+
* Whether the component is disabled.
|
|
10042
|
+
*/
|
|
10043
|
+
isDisabled?: boolean
|
|
10044
|
+
/**
|
|
10045
|
+
* The description to display.
|
|
10046
|
+
*/
|
|
10047
|
+
description?: string
|
|
10048
|
+
/**
|
|
10049
|
+
* The accepted file types, passed through to the underlying
|
|
10050
|
+
* \`<input type="file">\` \`accept\` attribute \u2014 a comma-separated list of MIME
|
|
10051
|
+
* types and/or extensions (e.g. \`"image/png,image/jpeg"\` or \`"image/*"\`).
|
|
10052
|
+
*/
|
|
10053
|
+
accept?: string
|
|
10054
|
+
/**
|
|
10055
|
+
* The name of the input.
|
|
10056
|
+
*/
|
|
10057
|
+
name?: string
|
|
10058
|
+
/**
|
|
10059
|
+
* The callback function that is fired when the value changes.
|
|
10060
|
+
*/
|
|
10061
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void
|
|
10062
|
+
/**
|
|
10063
|
+
* The callback function that is fired when the value changes and the value is
|
|
10064
|
+
* valid.
|
|
10065
|
+
*/
|
|
10066
|
+
onValueChange?: (files: File[]) => void
|
|
10067
|
+
/**
|
|
10068
|
+
* Identifies the element (or elements) that provide a detailed, extended
|
|
10069
|
+
* description for the object.
|
|
10070
|
+
*/
|
|
10071
|
+
aria-describedby?: string
|
|
9555
10072
|
/**
|
|
9556
10073
|
* The initial image to display. This will be used as the \`src\` attribute of
|
|
9557
10074
|
* the \`<img>\` element. You will be able to choose a new image.
|
|
@@ -9609,7 +10126,11 @@ maxFileSize?: number
|
|
|
9609
10126
|
* Callback fired when a dropped/pasted/selected file exceeds \`maxFileSize\`.
|
|
9610
10127
|
*/
|
|
9611
10128
|
onFileSizeError?: (file: File) => void
|
|
9612
|
-
|
|
10129
|
+
/**
|
|
10130
|
+
* Callback fired when a dropped/pasted/selected file's type does not match
|
|
10131
|
+
* \`accept\`.
|
|
10132
|
+
*/
|
|
10133
|
+
onFileTypeError?: (file: File) => void
|
|
9613
10134
|
}`,stories:{usage:[{id:"core-forms-imagedropzone--basic",name:"Basic",snippet:`const Basic = () => <ImageDropZone
|
|
9614
10135
|
style={{ width: 208, height: 100 }}
|
|
9615
10136
|
placeholder="Upload Image Above"
|
|
@@ -9691,6 +10212,14 @@ accept?: any
|
|
|
9691
10212
|
alert(
|
|
9692
10213
|
\`File "\${file.name}" (\${(file.size / 1024).toFixed(1)}KB) exceeds the 100KB limit.\`,
|
|
9693
10214
|
);
|
|
10215
|
+
}} />;`},{id:"core-forms-imagedropzone--with-file-type-restriction",name:"With File Type Restriction",snippet:`const WithFileTypeRestriction = () => <ImageDropZone
|
|
10216
|
+
style={{ width: 208, height: 100 }}
|
|
10217
|
+
placeholder="Upload Image Above"
|
|
10218
|
+
clearLabel="Clear Image"
|
|
10219
|
+
aria-label="Image Uploader"
|
|
10220
|
+
accept="image/png"
|
|
10221
|
+
onFileTypeError={(file: File) => {
|
|
10222
|
+
alert(\`File "\${file.name}" (\${file.type}) is not an accepted PNG image.\`);
|
|
9694
10223
|
}} />;`}],implementation:""},similarTo:[],figmaUrl:null},ImageGallery:{id:"core-collections-imagegallery",breadcrumb:"Core/Collections/ImageGallery",importStatement:`import {
|
|
9695
10224
|
Box,
|
|
9696
10225
|
ControlledImageGalleryExample,
|
|
@@ -9757,6 +10286,11 @@ The \`ImageGallery\` component optimizes long labels for touch and non-touch dev
|
|
|
9757
10286
|
| \`Shift + Space\` | Add current image to Selected Images |
|
|
9758
10287
|
| \`Enter\` | Select the current image for reorder |`,props:`interface ImageGalleryProps {
|
|
9759
10288
|
/**
|
|
10289
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
10290
|
+
* identifier; new components should exclude it via
|
|
10291
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10292
|
+
* Retained on existing components for backward compatibility.
|
|
10293
|
+
*
|
|
9760
10294
|
* The unique identifier for the block. This is used to identify the block in
|
|
9761
10295
|
* the DOM and in the block map. It is added as a data attribute
|
|
9762
10296
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -9764,6 +10298,11 @@ The \`ImageGallery\` component optimizes long labels for touch and non-touch dev
|
|
|
9764
10298
|
*/
|
|
9765
10299
|
data-block-id?: string
|
|
9766
10300
|
/**
|
|
10301
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
10302
|
+
* marker; new components should exclude it via
|
|
10303
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
10304
|
+
* Retained on existing components for backward compatibility.
|
|
10305
|
+
*
|
|
9767
10306
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
9768
10307
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
9769
10308
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -10457,6 +10996,11 @@ import { I18nProvider, InlineAlert } from "@baseline-ui/core";
|
|
|
10457
10996
|
</I18nProvider>;
|
|
10458
10997
|
\`\`\``,props:`interface InlineAlertProps {
|
|
10459
10998
|
/**
|
|
10999
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
11000
|
+
* identifier; new components should exclude it via
|
|
11001
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11002
|
+
* Retained on existing components for backward compatibility.
|
|
11003
|
+
*
|
|
10460
11004
|
* The unique identifier for the block. This is used to identify the block in
|
|
10461
11005
|
* the DOM and in the block map. It is added as a data attribute
|
|
10462
11006
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -10464,6 +11008,11 @@ import { I18nProvider, InlineAlert } from "@baseline-ui/core";
|
|
|
10464
11008
|
*/
|
|
10465
11009
|
data-block-id?: string
|
|
10466
11010
|
/**
|
|
11011
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
11012
|
+
* marker; new components should exclude it via
|
|
11013
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11014
|
+
* Retained on existing components for backward compatibility.
|
|
11015
|
+
*
|
|
10467
11016
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
10468
11017
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
10469
11018
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -11158,6 +11707,11 @@ const items = [
|
|
|
11158
11707
|
</InlineToolbar>;
|
|
11159
11708
|
\`\`\``,props:`interface InlineToolbarProps {
|
|
11160
11709
|
/**
|
|
11710
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
11711
|
+
* identifier; new components should exclude it via
|
|
11712
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11713
|
+
* Retained on existing components for backward compatibility.
|
|
11714
|
+
*
|
|
11161
11715
|
* The unique identifier for the block. This is used to identify the block in
|
|
11162
11716
|
* the DOM and in the block map. It is added as a data attribute
|
|
11163
11717
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -11165,6 +11719,11 @@ const items = [
|
|
|
11165
11719
|
*/
|
|
11166
11720
|
data-block-id?: string
|
|
11167
11721
|
/**
|
|
11722
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
11723
|
+
* marker; new components should exclude it via
|
|
11724
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11725
|
+
* Retained on existing components for backward compatibility.
|
|
11726
|
+
*
|
|
11168
11727
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
11169
11728
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
11170
11729
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -11418,10 +11977,16 @@ shouldUseSymbol?: boolean
|
|
|
11418
11977
|
isDisabled?: boolean
|
|
11419
11978
|
/**
|
|
11420
11979
|
* The HTML element used to render the link, e.g. 'a', or 'span'.
|
|
11980
|
+
*
|
|
11421
11981
|
* @default 'a'
|
|
11422
11982
|
*/
|
|
11423
11983
|
elementType?: string
|
|
11424
11984
|
/**
|
|
11985
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
11986
|
+
* identifier; new components should exclude it via
|
|
11987
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
11988
|
+
* Retained on existing components for backward compatibility.
|
|
11989
|
+
*
|
|
11425
11990
|
* The unique identifier for the block. This is used to identify the block in
|
|
11426
11991
|
* the DOM and in the block map. It is added as a data attribute
|
|
11427
11992
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -11429,6 +11994,11 @@ elementType?: string
|
|
|
11429
11994
|
*/
|
|
11430
11995
|
data-block-id?: string
|
|
11431
11996
|
/**
|
|
11997
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
11998
|
+
* marker; new components should exclude it via
|
|
11999
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12000
|
+
* Retained on existing components for backward compatibility.
|
|
12001
|
+
*
|
|
11432
12002
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
11433
12003
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
11434
12004
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -11522,6 +12092,11 @@ role?: AriaRole
|
|
|
11522
12092
|
}}
|
|
11523
12093
|
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
12094
|
/**
|
|
12095
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
12096
|
+
* identifier; new components should exclude it via
|
|
12097
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12098
|
+
* Retained on existing components for backward compatibility.
|
|
12099
|
+
*
|
|
11525
12100
|
* The unique identifier for the block. This is used to identify the block in
|
|
11526
12101
|
* the DOM and in the block map. It is added as a data attribute
|
|
11527
12102
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -11529,6 +12104,11 @@ role?: AriaRole
|
|
|
11529
12104
|
*/
|
|
11530
12105
|
data-block-id?: string
|
|
11531
12106
|
/**
|
|
12107
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
12108
|
+
* marker; new components should exclude it via
|
|
12109
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12110
|
+
* Retained on existing components for backward compatibility.
|
|
12111
|
+
*
|
|
11532
12112
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
11533
12113
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
11534
12114
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -12185,6 +12765,11 @@ This is will be rendered as HTML.
|
|
|
12185
12765
|
};
|
|
12186
12766
|
\`\`\``,props:`interface MarkdownProps {
|
|
12187
12767
|
/**
|
|
12768
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
12769
|
+
* identifier; new components should exclude it via
|
|
12770
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12771
|
+
* Retained on existing components for backward compatibility.
|
|
12772
|
+
*
|
|
12188
12773
|
* The unique identifier for the block. This is used to identify the block in
|
|
12189
12774
|
* the DOM and in the block map. It is added as a data attribute
|
|
12190
12775
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -12192,6 +12777,11 @@ This is will be rendered as HTML.
|
|
|
12192
12777
|
*/
|
|
12193
12778
|
data-block-id?: string
|
|
12194
12779
|
/**
|
|
12780
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
12781
|
+
* marker; new components should exclude it via
|
|
12782
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
12783
|
+
* Retained on existing components for backward compatibility.
|
|
12784
|
+
*
|
|
12195
12785
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
12196
12786
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
12197
12787
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -12354,6 +12944,7 @@ defaultOpen?: boolean
|
|
|
12354
12944
|
onOpenChange?: (isOpen: boolean) => void
|
|
12355
12945
|
/**
|
|
12356
12946
|
* How the menu is triggered.
|
|
12947
|
+
*
|
|
12357
12948
|
* @default 'press'
|
|
12358
12949
|
*/
|
|
12359
12950
|
trigger?: 'press' | 'longPress'
|
|
@@ -12461,6 +13052,7 @@ placement?: any
|
|
|
12461
13052
|
)} />;`}],implementation:`import React from "react";
|
|
12462
13053
|
|
|
12463
13054
|
import { Menu } from "../Menu";
|
|
13055
|
+
import { items } from "./data";
|
|
12464
13056
|
|
|
12465
13057
|
import type { MenuProps } from "../Menu.types";
|
|
12466
13058
|
|
|
@@ -12470,6 +13062,28 @@ export const MenuExample: React.FC<
|
|
|
12470
13062
|
}
|
|
12471
13063
|
> = ({ label, ...props }) => {
|
|
12472
13064
|
return <Menu {...props} triggerLabel={label} />;
|
|
13065
|
+
};
|
|
13066
|
+
|
|
13067
|
+
// Renders the (key, value) pair react-aria now passes to \`onAction\` so a spec
|
|
13068
|
+
// can assert the activated item's value is forwarded alongside its key.
|
|
13069
|
+
export const MenuActionValueExample: React.FC<{ label: string }> = ({
|
|
13070
|
+
label,
|
|
13071
|
+
}) => {
|
|
13072
|
+
const [received, setReceived] = React.useState("");
|
|
13073
|
+
return (
|
|
13074
|
+
<>
|
|
13075
|
+
<Menu
|
|
13076
|
+
items={items}
|
|
13077
|
+
triggerLabel={label}
|
|
13078
|
+
onAction={(key, value) => {
|
|
13079
|
+
setReceived(
|
|
13080
|
+
\`\${String(key)}:\${value && "label" in value ? value.label : ""}\`,
|
|
13081
|
+
);
|
|
13082
|
+
}}
|
|
13083
|
+
/>
|
|
13084
|
+
<div data-testid="menu-action-value">{received}</div>
|
|
13085
|
+
</>
|
|
13086
|
+
);
|
|
12473
13087
|
};`},similarTo:[],figmaUrl:null},MessageFormat:{id:"core-utilities-messageformat",breadcrumb:"Core/Utilities/MessageFormat",importStatement:'import { MessageFormat } from "@baseline-ui/core";',description:"`MessageFormat` is a component for formatting messages. This is built on top of [react-intl](https://formatjs.io/docs/react-intl/).",documentation:`\`MessageFormat\` is a component for formatting messages. This is built on top of [react-intl](https://formatjs.io/docs/react-intl/).
|
|
12474
13088
|
|
|
12475
13089
|
\`\`\`jsx
|
|
@@ -12767,20 +13381,44 @@ export const LongModalExample: React.FC<
|
|
|
12767
13381
|
);
|
|
12768
13382
|
};
|
|
12769
13383
|
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
export const FormControlsInModalExample: React.FC<
|
|
12775
|
-
TestComponentProps & { defaultOpen?: boolean }
|
|
12776
|
-
> = ({ enableInert, defaultOpen = false }) => {
|
|
13384
|
+
export const DisableAnimationModalExample: React.FC<
|
|
13385
|
+
TestComponentProps & { defaultOpen?: boolean; disableAnimation?: boolean }
|
|
13386
|
+
> = ({ enableInert, defaultOpen = true, disableAnimation }) => {
|
|
13387
|
+
const id = useId();
|
|
12777
13388
|
return (
|
|
12778
|
-
<
|
|
12779
|
-
<
|
|
12780
|
-
|
|
12781
|
-
</
|
|
12782
|
-
<
|
|
12783
|
-
|
|
13389
|
+
<Modal defaultOpen={defaultOpen}>
|
|
13390
|
+
<ModalTrigger>
|
|
13391
|
+
<ActionButton label="Open Modal" />
|
|
13392
|
+
</ModalTrigger>
|
|
13393
|
+
<ModalContent
|
|
13394
|
+
disableAnimation={disableAnimation}
|
|
13395
|
+
UNSAFE_enableInert={enableInert}
|
|
13396
|
+
>
|
|
13397
|
+
<Dialog aria-labelledby={id}>
|
|
13398
|
+
<VisuallyHidden>
|
|
13399
|
+
<Text id={id}>Animation example</Text>
|
|
13400
|
+
</VisuallyHidden>
|
|
13401
|
+
<Text>Modal body</Text>
|
|
13402
|
+
</Dialog>
|
|
13403
|
+
</ModalContent>
|
|
13404
|
+
</Modal>
|
|
13405
|
+
);
|
|
13406
|
+
};
|
|
13407
|
+
|
|
13408
|
+
/**
|
|
13409
|
+
* Example with form controls inside a Modal. Used to verify pointer
|
|
13410
|
+
* interactions work correctly with all input devices.
|
|
13411
|
+
*/
|
|
13412
|
+
export const FormControlsInModalExample: React.FC<
|
|
13413
|
+
TestComponentProps & { defaultOpen?: boolean }
|
|
13414
|
+
> = ({ enableInert, defaultOpen = false }) => {
|
|
13415
|
+
return (
|
|
13416
|
+
<Box display="flex" flexDirection="column" gap="lg" padding="lg">
|
|
13417
|
+
<Text>
|
|
13418
|
+
Background controls (non-interactive when modal is open with inert):
|
|
13419
|
+
</Text>
|
|
13420
|
+
<Box display="flex" flexDirection="column" gap="md">
|
|
13421
|
+
<TextInput label="Background input" placeholder="Try typing here..." />
|
|
12784
13422
|
<Checkbox label="Background checkbox" />
|
|
12785
13423
|
<ActionButton
|
|
12786
13424
|
label="Background button"
|
|
@@ -13054,6 +13692,11 @@ value: number
|
|
|
13054
13692
|
);
|
|
13055
13693
|
};`}],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
13694
|
/**
|
|
13695
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
13696
|
+
* identifier; new components should exclude it via
|
|
13697
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
13698
|
+
* Retained on existing components for backward compatibility.
|
|
13699
|
+
*
|
|
13057
13700
|
* The unique identifier for the block. This is used to identify the block in
|
|
13058
13701
|
* the DOM and in the block map. It is added as a data attribute
|
|
13059
13702
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -13061,6 +13704,11 @@ value: number
|
|
|
13061
13704
|
*/
|
|
13062
13705
|
data-block-id?: string
|
|
13063
13706
|
/**
|
|
13707
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
13708
|
+
* marker; new components should exclude it via
|
|
13709
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
13710
|
+
* Retained on existing components for backward compatibility.
|
|
13711
|
+
*
|
|
13064
13712
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
13065
13713
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
13066
13714
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -13484,6 +14132,11 @@ import { I18nProvider, Pagination } from "@baseline-ui/core";
|
|
|
13484
14132
|
</I18nProvider>;
|
|
13485
14133
|
\`\`\``,props:`interface PaginationProps {
|
|
13486
14134
|
/**
|
|
14135
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
14136
|
+
* identifier; new components should exclude it via
|
|
14137
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14138
|
+
* Retained on existing components for backward compatibility.
|
|
14139
|
+
*
|
|
13487
14140
|
* The unique identifier for the block. This is used to identify the block in
|
|
13488
14141
|
* the DOM and in the block map. It is added as a data attribute
|
|
13489
14142
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -13491,6 +14144,11 @@ import { I18nProvider, Pagination } from "@baseline-ui/core";
|
|
|
13491
14144
|
*/
|
|
13492
14145
|
data-block-id?: string
|
|
13493
14146
|
/**
|
|
14147
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
14148
|
+
* marker; new components should exclude it via
|
|
14149
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14150
|
+
* Retained on existing components for backward compatibility.
|
|
14151
|
+
*
|
|
13494
14152
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
13495
14153
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
13496
14154
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -13766,6 +14424,11 @@ Panels can be conditionally rendered:
|
|
|
13766
14424
|
|
|
13767
14425
|
* **Separator** \u2014 use for a visual divider that is not resizable.`,props:`interface PanelProps {
|
|
13768
14426
|
/**
|
|
14427
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
14428
|
+
* identifier; new components should exclude it via
|
|
14429
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14430
|
+
* Retained on existing components for backward compatibility.
|
|
14431
|
+
*
|
|
13769
14432
|
* The unique identifier for the block. This is used to identify the block in
|
|
13770
14433
|
* the DOM and in the block map. It is added as a data attribute
|
|
13771
14434
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -13773,6 +14436,11 @@ Panels can be conditionally rendered:
|
|
|
13773
14436
|
*/
|
|
13774
14437
|
data-block-id?: string
|
|
13775
14438
|
/**
|
|
14439
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
14440
|
+
* marker; new components should exclude it via
|
|
14441
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
14442
|
+
* Retained on existing components for backward compatibility.
|
|
14443
|
+
*
|
|
13776
14444
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
13777
14445
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
13778
14446
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -14945,6 +15613,7 @@ export const TrailingElementExample = () => {
|
|
|
14945
15613
|
PopoverEventLeakFixExample,
|
|
14946
15614
|
PopoverExample,
|
|
14947
15615
|
PopoverNoBoundaryExample,
|
|
15616
|
+
PopoverTriggerWidthExample,
|
|
14948
15617
|
PopoverWithScrollableContentExample,
|
|
14949
15618
|
PopoverWithScrollableViewportExample,
|
|
14950
15619
|
Tooltip,
|
|
@@ -15066,6 +15735,11 @@ defaultOpen?: boolean
|
|
|
15066
15735
|
*/
|
|
15067
15736
|
onOpenChange?: (isOpen: boolean) => void
|
|
15068
15737
|
/**
|
|
15738
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
15739
|
+
* identifier; new components should exclude it via
|
|
15740
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
15741
|
+
* Retained on existing components for backward compatibility.
|
|
15742
|
+
*
|
|
15069
15743
|
* The unique identifier for the block. This is used to identify the block in
|
|
15070
15744
|
* the DOM and in the block map. It is added as a data attribute
|
|
15071
15745
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -15073,6 +15747,11 @@ onOpenChange?: (isOpen: boolean) => void
|
|
|
15073
15747
|
*/
|
|
15074
15748
|
data-block-id?: string
|
|
15075
15749
|
/**
|
|
15750
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
15751
|
+
* marker; new components should exclude it via
|
|
15752
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
15753
|
+
* Retained on existing components for backward compatibility.
|
|
15754
|
+
*
|
|
15076
15755
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
15077
15756
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
15078
15757
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -15146,7 +15825,7 @@ children: React.ReactNode
|
|
|
15146
15825
|
placement: "bottom start",
|
|
15147
15826
|
}}
|
|
15148
15827
|
/>
|
|
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";
|
|
15828
|
+
);`},{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
15829
|
import { ScrollBox } from "@pw/utils/components";
|
|
15151
15830
|
import { mergeRefs } from "@react-aria/utils";
|
|
15152
15831
|
import React, { useEffect, useRef, useState } from "react";
|
|
@@ -15207,6 +15886,31 @@ export const PopoverExample: React.FC<{
|
|
|
15207
15886
|
);
|
|
15208
15887
|
};
|
|
15209
15888
|
|
|
15889
|
+
export const PopoverGetTargetRectExample: React.FC = () => {
|
|
15890
|
+
const [called, setCalled] = useState(false);
|
|
15891
|
+
|
|
15892
|
+
return (
|
|
15893
|
+
<Popover type="dialog" defaultOpen={true}>
|
|
15894
|
+
<PopoverTrigger>
|
|
15895
|
+
<ActionButton label="Open" />
|
|
15896
|
+
</PopoverTrigger>
|
|
15897
|
+
<PopoverContent
|
|
15898
|
+
// Returns the trigger's own rect (so positioning is unchanged) while
|
|
15899
|
+
// recording that react-aria invoked the forwarded callback.
|
|
15900
|
+
getTargetRect={(target) => {
|
|
15901
|
+
setCalled(true);
|
|
15902
|
+
return target.getBoundingClientRect();
|
|
15903
|
+
}}
|
|
15904
|
+
>
|
|
15905
|
+
<Dialog size="content" aria-label="content">
|
|
15906
|
+
<Text type="label">getTargetRect content</Text>
|
|
15907
|
+
{called ? <span data-testid="popover-target-rect-called" /> : null}
|
|
15908
|
+
</Dialog>
|
|
15909
|
+
</PopoverContent>
|
|
15910
|
+
</Popover>
|
|
15911
|
+
);
|
|
15912
|
+
};
|
|
15913
|
+
|
|
15210
15914
|
export const PopoverWithScrollableContentExample: React.FC<{
|
|
15211
15915
|
popoverProps: Omit<PopoverProps, "children">;
|
|
15212
15916
|
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
@@ -15260,6 +15964,61 @@ export const PopoverCustomTargetExample = ({
|
|
|
15260
15964
|
);
|
|
15261
15965
|
};
|
|
15262
15966
|
|
|
15967
|
+
export const PopoverTriggerWidthExample: React.FC<{
|
|
15968
|
+
popoverProps?: Omit<PopoverProps, "children">;
|
|
15969
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
15970
|
+
initialWidth?: number;
|
|
15971
|
+
}> = ({
|
|
15972
|
+
popoverProps = { type: "dialog" },
|
|
15973
|
+
popoverContentProps,
|
|
15974
|
+
initialWidth = 240,
|
|
15975
|
+
}) => {
|
|
15976
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
15977
|
+
const [width, setWidth] = useState(initialWidth);
|
|
15978
|
+
|
|
15979
|
+
return (
|
|
15980
|
+
<Box
|
|
15981
|
+
display="flex"
|
|
15982
|
+
flexDirection="column"
|
|
15983
|
+
gap="lg"
|
|
15984
|
+
padding="xl"
|
|
15985
|
+
alignItems="flex-start"
|
|
15986
|
+
>
|
|
15987
|
+
<ActionButton
|
|
15988
|
+
label="Grow trigger"
|
|
15989
|
+
onPress={() => {
|
|
15990
|
+
setWidth((w) => w + 80);
|
|
15991
|
+
}}
|
|
15992
|
+
/>
|
|
15993
|
+
<Popover {...popoverProps}>
|
|
15994
|
+
<Box ref={triggerRef} data-testid="width-trigger" style={{ width }}>
|
|
15995
|
+
<PopoverTrigger>
|
|
15996
|
+
<ActionButton label="Open" style={{ width: "100%" }} />
|
|
15997
|
+
</PopoverTrigger>
|
|
15998
|
+
</Box>
|
|
15999
|
+
<PopoverContent
|
|
16000
|
+
placement="bottom"
|
|
16001
|
+
triggerRef={triggerRef}
|
|
16002
|
+
isNonModal={true}
|
|
16003
|
+
shouldCloseOnInteractOutside={() => false}
|
|
16004
|
+
{...popoverContentProps}
|
|
16005
|
+
>
|
|
16006
|
+
<Dialog
|
|
16007
|
+
size="content"
|
|
16008
|
+
aria-label="content"
|
|
16009
|
+
className={sprinkles({ padding: "md" })}
|
|
16010
|
+
// Fill the trigger-matched container so the bordered content spans
|
|
16011
|
+
// the full width instead of hugging its text.
|
|
16012
|
+
style={{ width: "100%" }}
|
|
16013
|
+
>
|
|
16014
|
+
<Text type="label">Width-matched popover</Text>
|
|
16015
|
+
</Dialog>
|
|
16016
|
+
</PopoverContent>
|
|
16017
|
+
</Popover>
|
|
16018
|
+
</Box>
|
|
16019
|
+
);
|
|
16020
|
+
};
|
|
16021
|
+
|
|
15263
16022
|
export const PopoverArrowExample: React.FC<
|
|
15264
16023
|
Omit<
|
|
15265
16024
|
PopoverProps & {
|
|
@@ -16200,6 +16959,7 @@ export const PopoverHorizontalBoundaryBehaviorDemo: React.FC<{
|
|
|
16200
16959
|
};`},similarTo:[],figmaUrl:null},Portal:{id:"core-utilities-portal",breadcrumb:"Core/Utilities/Portal",importStatement:'import { Portal } from "@baseline-ui/core";',description:"`Portal` renders its children into an overlay portal outside the normal React DOM hierarchy. It integrates with `ThemeProvider` so that the portal content inherits the current theme and virtual keyboard handling configuration.",documentation:'`Portal` renders its children into an overlay portal outside the normal React DOM hierarchy. It integrates with `ThemeProvider` so that the portal content inherits the current theme and virtual keyboard handling configuration.\n\n* Renders children into an overlay container managed by React Aria\n* Automatically wraps children in a `ThemeProvider` to propagate the active theme into the portal\n* Respects a custom `portalContainer` provided via prop or the nearest `PortalContainerProvider` in context\n* Supports all standard `StylingProps` (`className`, `style`, `data-block-id`, `data-block-class`)\n\n```jsx\nimport { Portal } from "@baseline-ui/core";\n\nexport default function App() {\n return (\n <Portal>\n <div>I am rendered in a portal</div>\n </Portal>\n );\n}\n```\n\nPass a `portalContainer` element to render the portal inside a specific DOM node instead of the default overlay container. This is useful when rendering inside Shadow DOM or other isolated subtrees.\n\n```jsx\nimport { Portal } from "@baseline-ui/core";\n\nconst shadowRoot = document.querySelector("#shadow-host").shadowRoot;\nconst container = shadowRoot.querySelector(".portal-root");\n\nexport default function App() {\n return (\n <Portal portalContainer={container}>\n <div>Rendered inside shadow DOM</div>\n </Portal>\n );\n}\n```',props:`interface PortalProps {
|
|
16201
16960
|
/**
|
|
16202
16961
|
* The container element in which the overlay portal will be placed.
|
|
16962
|
+
*
|
|
16203
16963
|
* @default document.body
|
|
16204
16964
|
*/
|
|
16205
16965
|
portalContainer?: Element
|
|
@@ -16223,6 +16983,11 @@ shouldContainFocus?: boolean
|
|
|
16223
16983
|
*/
|
|
16224
16984
|
isExiting?: boolean
|
|
16225
16985
|
/**
|
|
16986
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
16987
|
+
* identifier; new components should exclude it via
|
|
16988
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
16989
|
+
* Retained on existing components for backward compatibility.
|
|
16990
|
+
*
|
|
16226
16991
|
* The unique identifier for the block. This is used to identify the block in
|
|
16227
16992
|
* the DOM and in the block map. It is added as a data attribute
|
|
16228
16993
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16230,6 +16995,11 @@ isExiting?: boolean
|
|
|
16230
16995
|
*/
|
|
16231
16996
|
data-block-id?: string
|
|
16232
16997
|
/**
|
|
16998
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
16999
|
+
* marker; new components should exclude it via
|
|
17000
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17001
|
+
* Retained on existing components for backward compatibility.
|
|
17002
|
+
*
|
|
16233
17003
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16234
17004
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16235
17005
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16278,6 +17048,11 @@ The \`Preview\` component can be disabled. When disabled, the preview is not int
|
|
|
16278
17048
|
\`\`\`
|
|
16279
17049
|
\`\`\``,props:`interface PreviewProps {
|
|
16280
17050
|
/**
|
|
17051
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17052
|
+
* identifier; new components should exclude it via
|
|
17053
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17054
|
+
* Retained on existing components for backward compatibility.
|
|
17055
|
+
*
|
|
16281
17056
|
* The unique identifier for the block. This is used to identify the block in
|
|
16282
17057
|
* the DOM and in the block map. It is added as a data attribute
|
|
16283
17058
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16285,6 +17060,11 @@ The \`Preview\` component can be disabled. When disabled, the preview is not int
|
|
|
16285
17060
|
*/
|
|
16286
17061
|
data-block-id?: string
|
|
16287
17062
|
/**
|
|
17063
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17064
|
+
* marker; new components should exclude it via
|
|
17065
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17066
|
+
* Retained on existing components for backward compatibility.
|
|
17067
|
+
*
|
|
16288
17068
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16289
17069
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16290
17070
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16467,6 +17247,11 @@ accent?: "theme" | "positive"
|
|
|
16467
17247
|
isDisabled
|
|
16468
17248
|
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
17249
|
/**
|
|
17250
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17251
|
+
* identifier; new components should exclude it via
|
|
17252
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17253
|
+
* Retained on existing components for backward compatibility.
|
|
17254
|
+
*
|
|
16470
17255
|
* The unique identifier for the block. This is used to identify the block in
|
|
16471
17256
|
* the DOM and in the block map. It is added as a data attribute
|
|
16472
17257
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16474,6 +17259,11 @@ accent?: "theme" | "positive"
|
|
|
16474
17259
|
*/
|
|
16475
17260
|
data-block-id?: string
|
|
16476
17261
|
/**
|
|
17262
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17263
|
+
* marker; new components should exclude it via
|
|
17264
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17265
|
+
* Retained on existing components for backward compatibility.
|
|
17266
|
+
*
|
|
16477
17267
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16478
17268
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16479
17269
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16589,6 +17379,11 @@ errorMessage?: string
|
|
|
16589
17379
|
formatOptions={{ style: "currency", currency: "USD" }}
|
|
16590
17380
|
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
17381
|
/**
|
|
17382
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17383
|
+
* identifier; new components should exclude it via
|
|
17384
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17385
|
+
* Retained on existing components for backward compatibility.
|
|
17386
|
+
*
|
|
16592
17387
|
* The unique identifier for the block. This is used to identify the block in
|
|
16593
17388
|
* the DOM and in the block map. It is added as a data attribute
|
|
16594
17389
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16596,6 +17391,11 @@ errorMessage?: string
|
|
|
16596
17391
|
*/
|
|
16597
17392
|
data-block-id?: string
|
|
16598
17393
|
/**
|
|
17394
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17395
|
+
* marker; new components should exclude it via
|
|
17396
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17397
|
+
* Retained on existing components for backward compatibility.
|
|
17398
|
+
*
|
|
16599
17399
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16600
17400
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16601
17401
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16749,6 +17549,11 @@ Use the \`renderOption\` prop to fully customize how each radio option looks. Th
|
|
|
16749
17549
|
|
|
16750
17550
|
* **[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
17551
|
/**
|
|
17552
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17553
|
+
* identifier; new components should exclude it via
|
|
17554
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17555
|
+
* Retained on existing components for backward compatibility.
|
|
17556
|
+
*
|
|
16752
17557
|
* The unique identifier for the block. This is used to identify the block in
|
|
16753
17558
|
* the DOM and in the block map. It is added as a data attribute
|
|
16754
17559
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16756,6 +17561,11 @@ Use the \`renderOption\` prop to fully customize how each radio option looks. Th
|
|
|
16756
17561
|
*/
|
|
16757
17562
|
data-block-id?: string
|
|
16758
17563
|
/**
|
|
17564
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17565
|
+
* marker; new components should exclude it via
|
|
17566
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17567
|
+
* Retained on existing components for backward compatibility.
|
|
17568
|
+
*
|
|
16759
17569
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16760
17570
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16761
17571
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -16979,6 +17789,11 @@ import { Reaction } from "../../utils";
|
|
|
16979
17789
|
| ------- | -------------------- |
|
|
16980
17790
|
| \`Space\` | Toggles the reaction |`,props:`interface ReactionProps {
|
|
16981
17791
|
/**
|
|
17792
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17793
|
+
* identifier; new components should exclude it via
|
|
17794
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17795
|
+
* Retained on existing components for backward compatibility.
|
|
17796
|
+
*
|
|
16982
17797
|
* The unique identifier for the block. This is used to identify the block in
|
|
16983
17798
|
* the DOM and in the block map. It is added as a data attribute
|
|
16984
17799
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -16986,6 +17801,11 @@ import { Reaction } from "../../utils";
|
|
|
16986
17801
|
*/
|
|
16987
17802
|
data-block-id?: string
|
|
16988
17803
|
/**
|
|
17804
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17805
|
+
* marker; new components should exclude it via
|
|
17806
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17807
|
+
* Retained on existing components for backward compatibility.
|
|
17808
|
+
*
|
|
16989
17809
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
16990
17810
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
16991
17811
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -17123,6 +17943,11 @@ The \`smoothScroll\` prop can be used to disable smooth scrolling.
|
|
|
17123
17943
|
| \`Enter\` | Scrolls to bottom |
|
|
17124
17944
|
| \`Space\` | Scrolls to bottom |`,props:`interface ScrollControlButtonProps {
|
|
17125
17945
|
/**
|
|
17946
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
17947
|
+
* identifier; new components should exclude it via
|
|
17948
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17949
|
+
* Retained on existing components for backward compatibility.
|
|
17950
|
+
*
|
|
17126
17951
|
* The unique identifier for the block. This is used to identify the block in
|
|
17127
17952
|
* the DOM and in the block map. It is added as a data attribute
|
|
17128
17953
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -17130,6 +17955,11 @@ The \`smoothScroll\` prop can be used to disable smooth scrolling.
|
|
|
17130
17955
|
*/
|
|
17131
17956
|
data-block-id?: string
|
|
17132
17957
|
/**
|
|
17958
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
17959
|
+
* marker; new components should exclude it via
|
|
17960
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
17961
|
+
* Retained on existing components for backward compatibility.
|
|
17962
|
+
*
|
|
17133
17963
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
17134
17964
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
17135
17965
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -17333,6 +18163,11 @@ export const ScrollControlButtonReversedExample: React.FC<
|
|
|
17333
18163
|
);
|
|
17334
18164
|
};`},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
18165
|
/**
|
|
18166
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
18167
|
+
* identifier; new components should exclude it via
|
|
18168
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18169
|
+
* Retained on existing components for backward compatibility.
|
|
18170
|
+
*
|
|
17336
18171
|
* The unique identifier for the block. This is used to identify the block in
|
|
17337
18172
|
* the DOM and in the block map. It is added as a data attribute
|
|
17338
18173
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -17340,6 +18175,11 @@ export const ScrollControlButtonReversedExample: React.FC<
|
|
|
17340
18175
|
*/
|
|
17341
18176
|
data-block-id?: string
|
|
17342
18177
|
/**
|
|
18178
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
18179
|
+
* marker; new components should exclude it via
|
|
18180
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18181
|
+
* Retained on existing components for backward compatibility.
|
|
18182
|
+
*
|
|
17343
18183
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
17344
18184
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
17345
18185
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -17780,6 +18620,11 @@ import { EllipseIcon } from "@baseline-ui/icons/24";
|
|
|
17780
18620
|
|
|
17781
18621
|
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
18622
|
/**
|
|
18623
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
18624
|
+
* identifier; new components should exclude it via
|
|
18625
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18626
|
+
* Retained on existing components for backward compatibility.
|
|
18627
|
+
*
|
|
17783
18628
|
* The unique identifier for the block. This is used to identify the block in
|
|
17784
18629
|
* the DOM and in the block map. It is added as a data attribute
|
|
17785
18630
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -17787,6 +18632,11 @@ The \`IconSelect\` component supports adding a tooltip to the trigger button whi
|
|
|
17787
18632
|
*/
|
|
17788
18633
|
data-block-id?: string
|
|
17789
18634
|
/**
|
|
18635
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
18636
|
+
* marker; new components should exclude it via
|
|
18637
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
18638
|
+
* Retained on existing components for backward compatibility.
|
|
18639
|
+
*
|
|
17790
18640
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
17791
18641
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
17792
18642
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -18095,6 +18945,28 @@ export const SelectExample: React.FC<
|
|
|
18095
18945
|
);
|
|
18096
18946
|
};
|
|
18097
18947
|
|
|
18948
|
+
export const SelectGetTargetRectExample: React.FC = () => {
|
|
18949
|
+
const [called, setCalled] = React.useState(false);
|
|
18950
|
+
|
|
18951
|
+
return (
|
|
18952
|
+
<>
|
|
18953
|
+
<Select
|
|
18954
|
+
aria-label="Choose an item"
|
|
18955
|
+
placeholder="Choose an item"
|
|
18956
|
+
items={items}
|
|
18957
|
+
defaultOpen={true}
|
|
18958
|
+
// Returns the trigger's own rect (so positioning is unchanged) while
|
|
18959
|
+
// recording that the popover invoked the forwarded callback.
|
|
18960
|
+
getTargetRect={(target) => {
|
|
18961
|
+
setCalled(true);
|
|
18962
|
+
return target.getBoundingClientRect();
|
|
18963
|
+
}}
|
|
18964
|
+
/>
|
|
18965
|
+
{called ? <span data-testid="select-target-rect-called" /> : null}
|
|
18966
|
+
</>
|
|
18967
|
+
);
|
|
18968
|
+
};
|
|
18969
|
+
|
|
18098
18970
|
export const SelectCustomTriggerExample: React.FC<
|
|
18099
18971
|
Omit<React.ComponentProps<typeof Select>, "items">
|
|
18100
18972
|
> = (args) => {
|
|
@@ -18202,6 +19074,7 @@ import { Separator } from "../../utils";
|
|
|
18202
19074
|
| \\[data-orientation] | The orientation of the separator. It can be \`horizontal\` or \`vertical\`. |`,props:`interface SeparatorProps {
|
|
18203
19075
|
/**
|
|
18204
19076
|
* The orientation of the separator.
|
|
19077
|
+
*
|
|
18205
19078
|
* @default 'horizontal'
|
|
18206
19079
|
*/
|
|
18207
19080
|
orientation?: "horizontal" | "vertical"
|
|
@@ -18210,6 +19083,11 @@ orientation?: "horizontal" | "vertical"
|
|
|
18210
19083
|
*/
|
|
18211
19084
|
elementType?: string
|
|
18212
19085
|
/**
|
|
19086
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
19087
|
+
* identifier; new components should exclude it via
|
|
19088
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19089
|
+
* Retained on existing components for backward compatibility.
|
|
19090
|
+
*
|
|
18213
19091
|
* The unique identifier for the block. This is used to identify the block in
|
|
18214
19092
|
* the DOM and in the block map. It is added as a data attribute
|
|
18215
19093
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -18217,6 +19095,11 @@ elementType?: string
|
|
|
18217
19095
|
*/
|
|
18218
19096
|
data-block-id?: string
|
|
18219
19097
|
/**
|
|
19098
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
19099
|
+
* marker; new components should exclude it via
|
|
19100
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19101
|
+
* Retained on existing components for backward compatibility.
|
|
19102
|
+
*
|
|
18220
19103
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
18221
19104
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
18222
19105
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -18447,6 +19330,11 @@ style?: React.CSSProperties
|
|
|
18447
19330
|
</Box>
|
|
18448
19331
|
);`}],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
19332
|
/**
|
|
19333
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
19334
|
+
* identifier; new components should exclude it via
|
|
19335
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19336
|
+
* Retained on existing components for backward compatibility.
|
|
19337
|
+
*
|
|
18450
19338
|
* The unique identifier for the block. This is used to identify the block in
|
|
18451
19339
|
* the DOM and in the block map. It is added as a data attribute
|
|
18452
19340
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -18454,6 +19342,11 @@ style?: React.CSSProperties
|
|
|
18454
19342
|
*/
|
|
18455
19343
|
data-block-id?: string
|
|
18456
19344
|
/**
|
|
19345
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
19346
|
+
* marker; new components should exclude it via
|
|
19347
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19348
|
+
* Retained on existing components for backward compatibility.
|
|
19349
|
+
*
|
|
18457
19350
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
18458
19351
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
18459
19352
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -18936,6 +19829,11 @@ export const CustomTrailingElementTestComponent: React.FC = () => {
|
|
|
18936
19829
|
);
|
|
18937
19830
|
};`},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
19831
|
/**
|
|
19832
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
19833
|
+
* identifier; new components should exclude it via
|
|
19834
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19835
|
+
* Retained on existing components for backward compatibility.
|
|
19836
|
+
*
|
|
18939
19837
|
* The unique identifier for the block. This is used to identify the block in
|
|
18940
19838
|
* the DOM and in the block map. It is added as a data attribute
|
|
18941
19839
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -18943,6 +19841,11 @@ export const CustomTrailingElementTestComponent: React.FC = () => {
|
|
|
18943
19841
|
*/
|
|
18944
19842
|
data-block-id?: string
|
|
18945
19843
|
/**
|
|
19844
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
19845
|
+
* marker; new components should exclude it via
|
|
19846
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
19847
|
+
* Retained on existing components for backward compatibility.
|
|
19848
|
+
*
|
|
18946
19849
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
18947
19850
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
18948
19851
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -19469,6 +20372,11 @@ The status labels can improve the accessibility of the Switch. However, they are
|
|
|
19469
20372
|
\`\`\`
|
|
19470
20373
|
\`\`\``,props:`interface SwitchProps {
|
|
19471
20374
|
/**
|
|
20375
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
20376
|
+
* identifier; new components should exclude it via
|
|
20377
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
20378
|
+
* Retained on existing components for backward compatibility.
|
|
20379
|
+
*
|
|
19472
20380
|
* The unique identifier for the block. This is used to identify the block in
|
|
19473
20381
|
* the DOM and in the block map. It is added as a data attribute
|
|
19474
20382
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -19476,6 +20384,11 @@ The status labels can improve the accessibility of the Switch. However, they are
|
|
|
19476
20384
|
*/
|
|
19477
20385
|
data-block-id?: string
|
|
19478
20386
|
/**
|
|
20387
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
20388
|
+
* marker; new components should exclude it via
|
|
20389
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
20390
|
+
* Retained on existing components for backward compatibility.
|
|
20391
|
+
*
|
|
19479
20392
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
19480
20393
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
19481
20394
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -20023,22 +20936,32 @@ Use the \`renderEmptyState\` prop on \`TableBody\` to display a message when the
|
|
|
20023
20936
|
*
|
|
20024
20937
|
* Requirements:
|
|
20025
20938
|
*
|
|
20026
|
-
*
|
|
20027
|
-
*
|
|
20028
|
-
*
|
|
20939
|
+
* - You must render the expected element type (e.g. if \`<button>\` is expected, you cannot render an
|
|
20940
|
+
* \`<a>\`).
|
|
20941
|
+
* - Only a single root DOM element can be rendered (no fragments).
|
|
20942
|
+
* - You must pass through props and ref to the underlying DOM element, merging with your own prop
|
|
20943
|
+
* as appropriate.
|
|
20029
20944
|
*/
|
|
20030
|
-
render?: (
|
|
20945
|
+
render?: (
|
|
20946
|
+
props: React.JSX.IntrinsicElements[E],
|
|
20947
|
+
renderProps: T
|
|
20948
|
+
) => ReactElement
|
|
20031
20949
|
/**
|
|
20032
|
-
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the
|
|
20950
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the
|
|
20951
|
+
* element. A function may be provided to compute the class based on component state.
|
|
20033
20952
|
*/
|
|
20034
|
-
className?:
|
|
20953
|
+
className?: | string
|
|
20954
|
+
| ((values: T & {defaultClassName: string | undefined}) => string)
|
|
20035
20955
|
/**
|
|
20036
|
-
* The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the
|
|
20956
|
+
* The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the
|
|
20957
|
+
* element. A function may be provided to compute the style based on component state.
|
|
20037
20958
|
*/
|
|
20038
|
-
style?:
|
|
20959
|
+
style?: | CSSProperties
|
|
20960
|
+
| ((values: T & {defaultStyle: CSSProperties}) => CSSProperties | undefined)
|
|
20039
20961
|
/**
|
|
20040
|
-
* A slot name for the component. Slots allow the component to receive props from a parent
|
|
20041
|
-
* An explicit \`null\` value indicates that the local props completely override all
|
|
20962
|
+
* A slot name for the component. Slots allow the component to receive props from a parent
|
|
20963
|
+
* component. An explicit \`null\` value indicates that the local props completely override all
|
|
20964
|
+
* props received from a parent.
|
|
20042
20965
|
*/
|
|
20043
20966
|
slot?: string | null
|
|
20044
20967
|
/**
|
|
@@ -20047,12 +20970,14 @@ slot?: string | null
|
|
|
20047
20970
|
children?: ReactNode
|
|
20048
20971
|
/**
|
|
20049
20972
|
* How multiple selection should behave in the collection.
|
|
20050
|
-
*
|
|
20973
|
+
*
|
|
20974
|
+
* @default 'toggle'
|
|
20051
20975
|
*/
|
|
20052
20976
|
selectionBehavior?: SelectionBehavior
|
|
20053
20977
|
/**
|
|
20054
20978
|
* Whether \`disabledKeys\` applies to all interactions, or only selection.
|
|
20055
|
-
*
|
|
20979
|
+
*
|
|
20980
|
+
* @default 'all'
|
|
20056
20981
|
*/
|
|
20057
20982
|
disabledBehavior?: DisabledBehavior
|
|
20058
20983
|
/**
|
|
@@ -20060,7 +20985,8 @@ disabledBehavior?: DisabledBehavior
|
|
|
20060
20985
|
*/
|
|
20061
20986
|
onRowAction?: (key: Key) => void
|
|
20062
20987
|
/**
|
|
20063
|
-
* The drag and drop hooks returned by \`useDragAndDrop\` used to enable drag and drop behavior for
|
|
20988
|
+
* The drag and drop hooks returned by \`useDragAndDrop\` used to enable drag and drop behavior for
|
|
20989
|
+
* the Table.
|
|
20064
20990
|
*/
|
|
20065
20991
|
dragAndDropHooks?: DragHooks<T> & DropHooks
|
|
20066
20992
|
}`,stories:{usage:[{id:"core-collections-table--default",name:"Default",snippet:"const Default = () => <BasicTableExample />;",description:"Basic table with columns and rows, no interactivity"},{id:"core-collections-table--single-selection",name:"Single Selection",snippet:"const SingleSelection = () => <SingleSelectionTableExample />;",description:"Single selection mode with controlled state"},{id:"core-collections-table--multiple-selection",name:"Multiple Selection",snippet:"const MultipleSelection = () => <MultipleSelectionTableExample />;",description:"Multiple selection mode with checkbox column and select-all header"},{id:"core-collections-table--sorting",name:"Sorting",snippet:"const Sorting = () => <SortableTableExample />;",description:"Sortable columns with sort descriptor and client-side sorting"},{id:"core-collections-table--empty",name:"Empty",snippet:"const Empty = () => <EmptyTableExample />;",description:"Empty table with no rows"},{id:"core-collections-table--row-action",name:"Row Action",snippet:`const RowAction = () => (
|
|
@@ -21797,6 +22723,11 @@ export const AddButtonExample = () => {
|
|
|
21797
22723
|
);
|
|
21798
22724
|
};`},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
22725
|
/**
|
|
22726
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
22727
|
+
* identifier; new components should exclude it via
|
|
22728
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22729
|
+
* Retained on existing components for backward compatibility.
|
|
22730
|
+
*
|
|
21800
22731
|
* The unique identifier for the block. This is used to identify the block in
|
|
21801
22732
|
* the DOM and in the block map. It is added as a data attribute
|
|
21802
22733
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -21804,6 +22735,11 @@ export const AddButtonExample = () => {
|
|
|
21804
22735
|
*/
|
|
21805
22736
|
data-block-id?: string
|
|
21806
22737
|
/**
|
|
22738
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
22739
|
+
* marker; new components should exclude it via
|
|
22740
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22741
|
+
* Retained on existing components for backward compatibility.
|
|
22742
|
+
*
|
|
21807
22743
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
21808
22744
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
21809
22745
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -21946,6 +22882,11 @@ const items = [
|
|
|
21946
22882
|
| Space | Selects the focused tag |
|
|
21947
22883
|
| Enter | Selects the focused tag |`,props:`interface TagGroupProps {
|
|
21948
22884
|
/**
|
|
22885
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
22886
|
+
* identifier; new components should exclude it via
|
|
22887
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22888
|
+
* Retained on existing components for backward compatibility.
|
|
22889
|
+
*
|
|
21949
22890
|
* The unique identifier for the block. This is used to identify the block in
|
|
21950
22891
|
* the DOM and in the block map. It is added as a data attribute
|
|
21951
22892
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -21953,6 +22894,11 @@ const items = [
|
|
|
21953
22894
|
*/
|
|
21954
22895
|
data-block-id?: string
|
|
21955
22896
|
/**
|
|
22897
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
22898
|
+
* marker; new components should exclude it via
|
|
22899
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
22900
|
+
* Retained on existing components for backward compatibility.
|
|
22901
|
+
*
|
|
21956
22902
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
21957
22903
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
21958
22904
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22163,6 +23109,11 @@ This component is a controlled component and requires the \`value\` prop to be c
|
|
|
22163
23109
|
| \`ArrowUp\` | Increment the current page. |
|
|
22164
23110
|
| \`Enter\` | Change the current page to the value entered in the input field. |`,props:`interface TaggedPaginationProps {
|
|
22165
23111
|
/**
|
|
23112
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
23113
|
+
* identifier; new components should exclude it via
|
|
23114
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23115
|
+
* Retained on existing components for backward compatibility.
|
|
23116
|
+
*
|
|
22166
23117
|
* The unique identifier for the block. This is used to identify the block in
|
|
22167
23118
|
* the DOM and in the block map. It is added as a data attribute
|
|
22168
23119
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22170,6 +23121,11 @@ This component is a controlled component and requires the \`value\` prop to be c
|
|
|
22170
23121
|
*/
|
|
22171
23122
|
data-block-id?: string
|
|
22172
23123
|
/**
|
|
23124
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
23125
|
+
* marker; new components should exclude it via
|
|
23126
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23127
|
+
* Retained on existing components for backward compatibility.
|
|
23128
|
+
*
|
|
22173
23129
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22174
23130
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22175
23131
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22339,6 +23295,11 @@ export const TaggedPaginationExample: React.FC<
|
|
|
22339
23295
|
);
|
|
22340
23296
|
};`},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
23297
|
/**
|
|
23298
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
23299
|
+
* identifier; new components should exclude it via
|
|
23300
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23301
|
+
* Retained on existing components for backward compatibility.
|
|
23302
|
+
*
|
|
22342
23303
|
* The unique identifier for the block. This is used to identify the block in
|
|
22343
23304
|
* the DOM and in the block map. It is added as a data attribute
|
|
22344
23305
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22346,6 +23307,11 @@ export const TaggedPaginationExample: React.FC<
|
|
|
22346
23307
|
*/
|
|
22347
23308
|
data-block-id?: string
|
|
22348
23309
|
/**
|
|
23310
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
23311
|
+
* marker; new components should exclude it via
|
|
23312
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23313
|
+
* Retained on existing components for backward compatibility.
|
|
23314
|
+
*
|
|
22349
23315
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22350
23316
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22351
23317
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22439,8 +23405,13 @@ export function TextWithRef() {
|
|
|
22439
23405
|
<span data-testid="tag-name">{tag}</span>
|
|
22440
23406
|
</>
|
|
22441
23407
|
);
|
|
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
|
|
23408
|
+
}`},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
23409
|
/**
|
|
23410
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
23411
|
+
* identifier; new components should exclude it via
|
|
23412
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23413
|
+
* Retained on existing components for backward compatibility.
|
|
23414
|
+
*
|
|
22444
23415
|
* The unique identifier for the block. This is used to identify the block in
|
|
22445
23416
|
* the DOM and in the block map. It is added as a data attribute
|
|
22446
23417
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22448,6 +23419,11 @@ export function TextWithRef() {
|
|
|
22448
23419
|
*/
|
|
22449
23420
|
data-block-id?: string
|
|
22450
23421
|
/**
|
|
23422
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
23423
|
+
* marker; new components should exclude it via
|
|
23424
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
23425
|
+
* Retained on existing components for backward compatibility.
|
|
23426
|
+
*
|
|
22451
23427
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22452
23428
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22453
23429
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -22483,8 +23459,14 @@ inputStyle?: React.CSSProperties
|
|
|
22483
23459
|
* The class name to apply to the input element
|
|
22484
23460
|
*/
|
|
22485
23461
|
inputClassName?: string
|
|
23462
|
+
/**
|
|
23463
|
+
* The number of visible text rows for the multi-line input. Only applies when
|
|
23464
|
+
* \`isMultiLine\` is set.
|
|
23465
|
+
*/
|
|
23466
|
+
rows?: number
|
|
22486
23467
|
variant?: any
|
|
22487
23468
|
labelPosition?: any
|
|
23469
|
+
isMultiLine?: any
|
|
22488
23470
|
}`,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
23471
|
<VariantViewer<React.ComponentProps<typeof TextInput>>
|
|
22490
23472
|
cellStyle={{ minWidth: 300 }}
|
|
@@ -22746,114 +23728,453 @@ labelPosition?: any
|
|
|
22746
23728
|
label="Label"
|
|
22747
23729
|
name="text-input"
|
|
22748
23730
|
placeholder="Placeholder"
|
|
22749
|
-
description="Description" />;`}
|
|
22750
|
-
|
|
22751
|
-
|
|
22752
|
-
|
|
22753
|
-
|
|
22754
|
-
|
|
22755
|
-
|
|
22756
|
-
|
|
22757
|
-
|
|
22758
|
-
|
|
22759
|
-
|
|
22760
|
-
|
|
22761
|
-
|
|
22762
|
-
|
|
22763
|
-
|
|
22764
|
-
|
|
22765
|
-
|
|
22766
|
-
|
|
22767
|
-
|
|
22768
|
-
|
|
22769
|
-
|
|
22770
|
-
|
|
22771
|
-
|
|
22772
|
-
|
|
22773
|
-
|
|
22774
|
-
|
|
22775
|
-
|
|
22776
|
-
|
|
22777
|
-
|
|
22778
|
-
|
|
22779
|
-
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
|
|
22783
|
-
|
|
22784
|
-
|
|
22785
|
-
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
22789
|
-
|
|
22790
|
-
|
|
22791
|
-
|
|
22792
|
-
|
|
22793
|
-
|
|
22794
|
-
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22800
|
-
|
|
22801
|
-
|
|
22802
|
-
|
|
22803
|
-
|
|
22804
|
-
|
|
22805
|
-
|
|
22806
|
-
|
|
22807
|
-
|
|
22808
|
-
|
|
22809
|
-
|
|
22810
|
-
|
|
22811
|
-
|
|
22812
|
-
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
|
|
22816
|
-
|
|
22817
|
-
|
|
22818
|
-
|
|
22819
|
-
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
|
|
22829
|
-
|
|
22830
|
-
|
|
22831
|
-
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
|
|
22837
|
-
|
|
22838
|
-
|
|
22839
|
-
|
|
22840
|
-
|
|
22841
|
-
|
|
22842
|
-
|
|
22843
|
-
|
|
22844
|
-
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
|
|
23731
|
+
description="Description" />;`},{id:"core-forms-textinput--multiline",name:"Multiline",snippet:`const Multiline = () => <TextInput
|
|
23732
|
+
label="Label"
|
|
23733
|
+
isMultiLine
|
|
23734
|
+
defaultValue="Lorem ipsum"
|
|
23735
|
+
description="Helper text" />;`},{id:"core-forms-textinput--multiline-with-rows",name:"Multiline With Rows",snippet:`const MultilineWithRows = () => <TextInput
|
|
23736
|
+
label="Label"
|
|
23737
|
+
isMultiLine
|
|
23738
|
+
rows={5}
|
|
23739
|
+
placeholder="Placeholder"
|
|
23740
|
+
description="Helper text" />;`},{id:"core-forms-textinput--multiline-variants",name:"Multiline Variants",snippet:`const MultilineVariants = (args) => (
|
|
23741
|
+
<VariantViewer<React.ComponentProps<typeof TextInput>>
|
|
23742
|
+
cellStyle={{ minWidth: 300 }}
|
|
23743
|
+
header={[
|
|
23744
|
+
"No Label + No Helper Text",
|
|
23745
|
+
"No Label + Helper Text",
|
|
23746
|
+
"Label + No Helper Text",
|
|
23747
|
+
"Label + Helper Text",
|
|
23748
|
+
]}
|
|
23749
|
+
component={TextInput}
|
|
23750
|
+
variants={{
|
|
23751
|
+
"Primary Placeholder": [
|
|
23752
|
+
{ isMultiLine: true, placeholder: "Placeholder" },
|
|
23753
|
+
{
|
|
23754
|
+
isMultiLine: true,
|
|
23755
|
+
placeholder: "Placeholder",
|
|
23756
|
+
description: "Helper text",
|
|
23757
|
+
},
|
|
23758
|
+
{ isMultiLine: true, label: "Label", placeholder: "Placeholder" },
|
|
23759
|
+
{
|
|
23760
|
+
isMultiLine: true,
|
|
23761
|
+
label: "Label",
|
|
23762
|
+
placeholder: "Placeholder",
|
|
23763
|
+
description: "Helper text",
|
|
23764
|
+
},
|
|
23765
|
+
],
|
|
23766
|
+
"Primary Filled": [
|
|
23767
|
+
{ isMultiLine: true, defaultValue: "Lorem ipsum" },
|
|
23768
|
+
{
|
|
23769
|
+
isMultiLine: true,
|
|
23770
|
+
defaultValue: "Lorem ipsum",
|
|
23771
|
+
description: "Helper text",
|
|
23772
|
+
},
|
|
23773
|
+
{ isMultiLine: true, label: "Label", defaultValue: "Lorem ipsum" },
|
|
23774
|
+
{
|
|
23775
|
+
isMultiLine: true,
|
|
23776
|
+
label: "Label",
|
|
23777
|
+
defaultValue: "Lorem ipsum",
|
|
23778
|
+
description: "Helper text",
|
|
23779
|
+
},
|
|
23780
|
+
],
|
|
23781
|
+
"Primary With Error": [
|
|
23782
|
+
{
|
|
23783
|
+
isMultiLine: true,
|
|
23784
|
+
defaultValue: "Lorem ipsum",
|
|
23785
|
+
validationState: "error",
|
|
23786
|
+
},
|
|
23787
|
+
{
|
|
23788
|
+
isMultiLine: true,
|
|
23789
|
+
defaultValue: "Lorem ipsum",
|
|
23790
|
+
validationState: "error",
|
|
23791
|
+
errorMessage: "Error message",
|
|
23792
|
+
},
|
|
23793
|
+
{
|
|
23794
|
+
isMultiLine: true,
|
|
23795
|
+
label: "Label",
|
|
23796
|
+
defaultValue: "Lorem ipsum",
|
|
23797
|
+
validationState: "error",
|
|
23798
|
+
},
|
|
23799
|
+
{
|
|
23800
|
+
isMultiLine: true,
|
|
23801
|
+
label: "Label",
|
|
23802
|
+
defaultValue: "Lorem ipsum",
|
|
23803
|
+
validationState: "error",
|
|
23804
|
+
errorMessage: "Error message",
|
|
23805
|
+
},
|
|
23806
|
+
],
|
|
23807
|
+
"Primary With Warning": [
|
|
23808
|
+
{
|
|
23809
|
+
isMultiLine: true,
|
|
23810
|
+
defaultValue: "Lorem ipsum",
|
|
23811
|
+
validationState: "warning",
|
|
23812
|
+
},
|
|
23813
|
+
{
|
|
23814
|
+
isMultiLine: true,
|
|
23815
|
+
defaultValue: "Lorem ipsum",
|
|
23816
|
+
validationState: "warning",
|
|
23817
|
+
warningMessage: "Warning message",
|
|
23818
|
+
},
|
|
23819
|
+
{
|
|
23820
|
+
isMultiLine: true,
|
|
23821
|
+
label: "Label",
|
|
23822
|
+
defaultValue: "Lorem ipsum",
|
|
23823
|
+
validationState: "warning",
|
|
23824
|
+
},
|
|
23825
|
+
{
|
|
23826
|
+
isMultiLine: true,
|
|
23827
|
+
label: "Label",
|
|
23828
|
+
defaultValue: "Lorem ipsum",
|
|
23829
|
+
validationState: "warning",
|
|
23830
|
+
warningMessage: "Warning message",
|
|
23831
|
+
},
|
|
23832
|
+
],
|
|
23833
|
+
"Primary Disabled": [
|
|
23834
|
+
{ isMultiLine: true, defaultValue: "Lorem ipsum", isDisabled: true },
|
|
23835
|
+
{
|
|
23836
|
+
isMultiLine: true,
|
|
23837
|
+
defaultValue: "Lorem ipsum",
|
|
23838
|
+
isDisabled: true,
|
|
23839
|
+
description: "Helper text",
|
|
23840
|
+
},
|
|
23841
|
+
{
|
|
23842
|
+
isMultiLine: true,
|
|
23843
|
+
label: "Label",
|
|
23844
|
+
defaultValue: "Lorem ipsum",
|
|
23845
|
+
isDisabled: true,
|
|
23846
|
+
},
|
|
23847
|
+
{
|
|
23848
|
+
isMultiLine: true,
|
|
23849
|
+
label: "Label",
|
|
23850
|
+
defaultValue: "Lorem ipsum",
|
|
23851
|
+
isDisabled: true,
|
|
23852
|
+
description: "Helper text",
|
|
23853
|
+
},
|
|
23854
|
+
],
|
|
23855
|
+
"Primary Read Only": [
|
|
23856
|
+
{ isMultiLine: true, defaultValue: "Lorem ipsum", isReadOnly: true },
|
|
23857
|
+
{
|
|
23858
|
+
isMultiLine: true,
|
|
23859
|
+
defaultValue: "Lorem ipsum",
|
|
23860
|
+
isReadOnly: true,
|
|
23861
|
+
description: "Helper text",
|
|
23862
|
+
},
|
|
23863
|
+
{
|
|
23864
|
+
isMultiLine: true,
|
|
23865
|
+
label: "Label",
|
|
23866
|
+
defaultValue: "Lorem ipsum",
|
|
23867
|
+
isReadOnly: true,
|
|
23868
|
+
},
|
|
23869
|
+
{
|
|
23870
|
+
isMultiLine: true,
|
|
23871
|
+
label: "Label",
|
|
23872
|
+
defaultValue: "Lorem ipsum",
|
|
23873
|
+
isReadOnly: true,
|
|
23874
|
+
description: "Helper text",
|
|
23875
|
+
},
|
|
23876
|
+
],
|
|
23877
|
+
"Ghost Placeholder": [
|
|
23878
|
+
{ isMultiLine: true, placeholder: "Placeholder", variant: "ghost" },
|
|
23879
|
+
{
|
|
23880
|
+
isMultiLine: true,
|
|
23881
|
+
placeholder: "Placeholder",
|
|
23882
|
+
variant: "ghost",
|
|
23883
|
+
description: "Helper text",
|
|
23884
|
+
},
|
|
23885
|
+
{
|
|
23886
|
+
isMultiLine: true,
|
|
23887
|
+
label: "Label",
|
|
23888
|
+
placeholder: "Placeholder",
|
|
23889
|
+
variant: "ghost",
|
|
23890
|
+
labelPosition: "start",
|
|
23891
|
+
},
|
|
23892
|
+
{
|
|
23893
|
+
isMultiLine: true,
|
|
23894
|
+
label: "Label",
|
|
23895
|
+
placeholder: "Placeholder",
|
|
23896
|
+
variant: "ghost",
|
|
23897
|
+
description: "Helper text",
|
|
23898
|
+
labelPosition: "start",
|
|
23899
|
+
},
|
|
23900
|
+
],
|
|
23901
|
+
"Ghost Filled": [
|
|
23902
|
+
{
|
|
23903
|
+
isMultiLine: true,
|
|
23904
|
+
defaultValue: "Lorem ipsum",
|
|
23905
|
+
variant: "ghost",
|
|
23906
|
+
},
|
|
23907
|
+
{
|
|
23908
|
+
isMultiLine: true,
|
|
23909
|
+
defaultValue: "Lorem ipsum",
|
|
23910
|
+
variant: "ghost",
|
|
23911
|
+
description: "Helper text",
|
|
23912
|
+
},
|
|
23913
|
+
{
|
|
23914
|
+
isMultiLine: true,
|
|
23915
|
+
label: "Label",
|
|
23916
|
+
defaultValue: "Lorem ipsum",
|
|
23917
|
+
variant: "ghost",
|
|
23918
|
+
labelPosition: "start",
|
|
23919
|
+
},
|
|
23920
|
+
{
|
|
23921
|
+
isMultiLine: true,
|
|
23922
|
+
label: "Label",
|
|
23923
|
+
defaultValue: "Lorem ipsum",
|
|
23924
|
+
variant: "ghost",
|
|
23925
|
+
description: "Helper text",
|
|
23926
|
+
labelPosition: "start",
|
|
23927
|
+
},
|
|
23928
|
+
],
|
|
23929
|
+
"Ghost With Error": [
|
|
23930
|
+
{
|
|
23931
|
+
isMultiLine: true,
|
|
23932
|
+
defaultValue: "Lorem ipsum",
|
|
23933
|
+
validationState: "error",
|
|
23934
|
+
variant: "ghost",
|
|
23935
|
+
},
|
|
23936
|
+
{
|
|
23937
|
+
isMultiLine: true,
|
|
23938
|
+
defaultValue: "Lorem ipsum",
|
|
23939
|
+
validationState: "error",
|
|
23940
|
+
errorMessage: "Error message",
|
|
23941
|
+
variant: "ghost",
|
|
23942
|
+
},
|
|
23943
|
+
{
|
|
23944
|
+
isMultiLine: true,
|
|
23945
|
+
label: "Label",
|
|
23946
|
+
defaultValue: "Lorem ipsum",
|
|
23947
|
+
validationState: "error",
|
|
23948
|
+
variant: "ghost",
|
|
23949
|
+
labelPosition: "start",
|
|
23950
|
+
},
|
|
23951
|
+
{
|
|
23952
|
+
isMultiLine: true,
|
|
23953
|
+
label: "Label",
|
|
23954
|
+
defaultValue: "Lorem ipsum",
|
|
23955
|
+
validationState: "error",
|
|
23956
|
+
errorMessage: "Error message",
|
|
23957
|
+
variant: "ghost",
|
|
23958
|
+
labelPosition: "start",
|
|
23959
|
+
},
|
|
23960
|
+
],
|
|
23961
|
+
"Ghost With Warning": [
|
|
23962
|
+
{
|
|
23963
|
+
isMultiLine: true,
|
|
23964
|
+
defaultValue: "Lorem ipsum",
|
|
23965
|
+
validationState: "warning",
|
|
23966
|
+
variant: "ghost",
|
|
23967
|
+
},
|
|
23968
|
+
{
|
|
23969
|
+
isMultiLine: true,
|
|
23970
|
+
defaultValue: "Lorem ipsum",
|
|
23971
|
+
validationState: "warning",
|
|
23972
|
+
warningMessage: "Warning message",
|
|
23973
|
+
variant: "ghost",
|
|
23974
|
+
},
|
|
23975
|
+
{
|
|
23976
|
+
isMultiLine: true,
|
|
23977
|
+
label: "Label",
|
|
23978
|
+
defaultValue: "Lorem ipsum",
|
|
23979
|
+
validationState: "warning",
|
|
23980
|
+
variant: "ghost",
|
|
23981
|
+
labelPosition: "start",
|
|
23982
|
+
},
|
|
23983
|
+
{
|
|
23984
|
+
isMultiLine: true,
|
|
23985
|
+
label: "Label",
|
|
23986
|
+
defaultValue: "Lorem ipsum",
|
|
23987
|
+
validationState: "warning",
|
|
23988
|
+
warningMessage: "Warning message",
|
|
23989
|
+
variant: "ghost",
|
|
23990
|
+
labelPosition: "start",
|
|
23991
|
+
},
|
|
23992
|
+
],
|
|
23993
|
+
"Ghost Disabled": [
|
|
23994
|
+
{
|
|
23995
|
+
isMultiLine: true,
|
|
23996
|
+
defaultValue: "Lorem ipsum",
|
|
23997
|
+
isDisabled: true,
|
|
23998
|
+
variant: "ghost",
|
|
23999
|
+
},
|
|
24000
|
+
{
|
|
24001
|
+
isMultiLine: true,
|
|
24002
|
+
defaultValue: "Lorem ipsum",
|
|
24003
|
+
isDisabled: true,
|
|
24004
|
+
description: "Helper text",
|
|
24005
|
+
variant: "ghost",
|
|
24006
|
+
},
|
|
24007
|
+
{
|
|
24008
|
+
isMultiLine: true,
|
|
24009
|
+
label: "Label",
|
|
24010
|
+
defaultValue: "Lorem ipsum",
|
|
24011
|
+
isDisabled: true,
|
|
24012
|
+
variant: "ghost",
|
|
24013
|
+
labelPosition: "start",
|
|
24014
|
+
},
|
|
24015
|
+
{
|
|
24016
|
+
isMultiLine: true,
|
|
24017
|
+
label: "Label",
|
|
24018
|
+
defaultValue: "Lorem ipsum",
|
|
24019
|
+
isDisabled: true,
|
|
24020
|
+
description: "Helper text",
|
|
24021
|
+
variant: "ghost",
|
|
24022
|
+
labelPosition: "start",
|
|
24023
|
+
},
|
|
24024
|
+
],
|
|
24025
|
+
"Ghost Read Only": [
|
|
24026
|
+
{
|
|
24027
|
+
isMultiLine: true,
|
|
24028
|
+
defaultValue: "Lorem ipsum",
|
|
24029
|
+
isReadOnly: true,
|
|
24030
|
+
variant: "ghost",
|
|
24031
|
+
},
|
|
24032
|
+
{
|
|
24033
|
+
isMultiLine: true,
|
|
24034
|
+
defaultValue: "Lorem ipsum",
|
|
24035
|
+
isReadOnly: true,
|
|
24036
|
+
description: "Helper text",
|
|
24037
|
+
variant: "ghost",
|
|
24038
|
+
},
|
|
24039
|
+
{
|
|
24040
|
+
isMultiLine: true,
|
|
24041
|
+
label: "Label",
|
|
24042
|
+
defaultValue: "Lorem ipsum",
|
|
24043
|
+
isReadOnly: true,
|
|
24044
|
+
variant: "ghost",
|
|
24045
|
+
labelPosition: "start",
|
|
24046
|
+
},
|
|
24047
|
+
{
|
|
24048
|
+
isMultiLine: true,
|
|
24049
|
+
label: "Label",
|
|
24050
|
+
defaultValue: "Lorem ipsum",
|
|
24051
|
+
isReadOnly: true,
|
|
24052
|
+
description: "Helper text",
|
|
24053
|
+
variant: "ghost",
|
|
24054
|
+
labelPosition: "start",
|
|
24055
|
+
},
|
|
24056
|
+
],
|
|
24057
|
+
}}
|
|
24058
|
+
defaultProps={args}
|
|
24059
|
+
/>
|
|
24060
|
+
);`}],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 {
|
|
24061
|
+
/**
|
|
24062
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
24063
|
+
* identifier; new components should exclude it via
|
|
24064
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24065
|
+
* Retained on existing components for backward compatibility.
|
|
24066
|
+
*
|
|
24067
|
+
* The unique identifier for the block. This is used to identify the block in
|
|
24068
|
+
* the DOM and in the block map. It is added as a data attribute
|
|
24069
|
+
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
24070
|
+
* rendered.
|
|
24071
|
+
*/
|
|
24072
|
+
data-block-id?: string
|
|
24073
|
+
/**
|
|
24074
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
24075
|
+
* marker; new components should exclude it via
|
|
24076
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24077
|
+
* Retained on existing components for backward compatibility.
|
|
24078
|
+
*
|
|
24079
|
+
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24080
|
+
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24081
|
+
* together in the DOM and in the block map. It is added as a data attribute
|
|
24082
|
+
* \`data-block-class\` to the root element of the block if a DOM node is
|
|
24083
|
+
* rendered.
|
|
24084
|
+
*/
|
|
24085
|
+
data-block-class?: string
|
|
24086
|
+
/**
|
|
24087
|
+
* The className applied to the root element of the component.
|
|
24088
|
+
*/
|
|
24089
|
+
className?: string
|
|
24090
|
+
/**
|
|
24091
|
+
* The style applied to the root element of the component.
|
|
24092
|
+
*/
|
|
24093
|
+
style?: React.CSSProperties
|
|
24094
|
+
/**
|
|
24095
|
+
* The theme to use. If not provided, the theme will be inherited from the
|
|
24096
|
+
* parent ThemeProvider. If there is no parent ThemeProvider, the default
|
|
24097
|
+
* theme will be used.
|
|
24098
|
+
*
|
|
24099
|
+
* @default "system"
|
|
24100
|
+
*/
|
|
24101
|
+
theme?: Theme | "light" | "dark" | "system"
|
|
24102
|
+
/**
|
|
24103
|
+
* The children to render.
|
|
24104
|
+
*/
|
|
24105
|
+
children: React.ReactNode
|
|
24106
|
+
/**
|
|
24107
|
+
* A function that will be called when the theme changes from any of the child
|
|
24108
|
+
* components.
|
|
24109
|
+
*
|
|
24110
|
+
* @deprecated This prop is deprecated and will be removed in a future
|
|
24111
|
+
* version. Please use the \`onThemeChange\` prop instead.
|
|
24112
|
+
*/
|
|
24113
|
+
setTheme?: (theme: ThemeProviderTheme) => void
|
|
24114
|
+
/**
|
|
24115
|
+
* @private
|
|
24116
|
+
* @internal
|
|
24117
|
+
*/
|
|
24118
|
+
UNSAFE_domProps?: DOMProps
|
|
24119
|
+
/**
|
|
24120
|
+
* The reduced motion setting to use. By default, the reduced motion is set to
|
|
24121
|
+
* the user's system setting.
|
|
24122
|
+
*
|
|
24123
|
+
* @default "user"
|
|
24124
|
+
* @internal
|
|
24125
|
+
*/
|
|
24126
|
+
reducedMotion?: "user" | "always" | "never"
|
|
24127
|
+
/**
|
|
24128
|
+
* A function that will be called when the theme changes from any of the child
|
|
24129
|
+
* components.
|
|
24130
|
+
*/
|
|
24131
|
+
onThemeChange?: (theme: ThemeProviderTheme) => void
|
|
24132
|
+
/**
|
|
24133
|
+
* Whether to handle virtual keyboard opening on mobile
|
|
24134
|
+
*
|
|
24135
|
+
* @default true
|
|
24136
|
+
* @internal
|
|
24137
|
+
*/
|
|
24138
|
+
shouldHandleVirtualKeyboard?: boolean
|
|
24139
|
+
/**
|
|
24140
|
+
* The minimum size of the touch target.
|
|
24141
|
+
*
|
|
24142
|
+
* @default 24
|
|
24143
|
+
* @internal
|
|
24144
|
+
*/
|
|
24145
|
+
minTouchTargetSize?: number
|
|
24146
|
+
}`,stories:{usage:[{id:"core-utilities-themeprovider--basic",name:"Basic",snippet:"const Basic = () => <ThemeProviderExample />;"}],implementation:`import { themes } from "@baseline-ui/tokens";
|
|
24147
|
+
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
24148
|
+
|
|
24149
|
+
import { ActionButton } from "../../ActionButton";
|
|
24150
|
+
import { Box } from "../../Box";
|
|
24151
|
+
import { Select } from "../../Select";
|
|
24152
|
+
import { ThemeProvider } from "../ThemeProvider";
|
|
24153
|
+
import { ThemeProviderContext } from "../ThemeProvider.context";
|
|
24154
|
+
|
|
24155
|
+
export const ThemeProviderExample = () => {
|
|
24156
|
+
const [theme, setTheme] = useState<string>("base");
|
|
24157
|
+
|
|
24158
|
+
return (
|
|
24159
|
+
<Box display="flex" flexDirection="column" gap="md">
|
|
24160
|
+
<ThemeProvider theme={themes[theme as keyof typeof themes].light}>
|
|
24161
|
+
<Box
|
|
24162
|
+
borderRadius="md"
|
|
24163
|
+
padding="2xl"
|
|
24164
|
+
typography="label.md.medium"
|
|
24165
|
+
color="text.primary"
|
|
24166
|
+
backgroundColor="background.primary.medium"
|
|
24167
|
+
borderColor="border.medium"
|
|
24168
|
+
borderStyle="solid"
|
|
24169
|
+
borderWidth={1}
|
|
24170
|
+
>
|
|
24171
|
+
This is theme aware text
|
|
24172
|
+
</Box>
|
|
24173
|
+
|
|
24174
|
+
<Select
|
|
24175
|
+
label="Select Theme"
|
|
24176
|
+
items={[
|
|
24177
|
+
{
|
|
22857
24178
|
label: "Base",
|
|
22858
24179
|
id: "base",
|
|
22859
24180
|
},
|
|
@@ -22984,6 +24305,11 @@ The TimeField supports error and warning states with associated messages.
|
|
|
22984
24305
|
| \`Home/End\` | Go to minimum/maximum value for the selected segment |
|
|
22985
24306
|
| \`Numbers\` | Type numbers to edit the selected segment |`,props:`interface TimeFieldProps {
|
|
22986
24307
|
/**
|
|
24308
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
24309
|
+
* identifier; new components should exclude it via
|
|
24310
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24311
|
+
* Retained on existing components for backward compatibility.
|
|
24312
|
+
*
|
|
22987
24313
|
* The unique identifier for the block. This is used to identify the block in
|
|
22988
24314
|
* the DOM and in the block map. It is added as a data attribute
|
|
22989
24315
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -22991,6 +24317,11 @@ The TimeField supports error and warning states with associated messages.
|
|
|
22991
24317
|
*/
|
|
22992
24318
|
data-block-id?: string
|
|
22993
24319
|
/**
|
|
24320
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
24321
|
+
* marker; new components should exclude it via
|
|
24322
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24323
|
+
* Retained on existing components for backward compatibility.
|
|
24324
|
+
*
|
|
22994
24325
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
22995
24326
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
22996
24327
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -23350,6 +24681,11 @@ You can pass a \`timeout\` prop to the \`toastQueue.add\` method to set the time
|
|
|
23350
24681
|
toastQueue.add(alertProps, { timeout: 1000 });
|
|
23351
24682
|
\`\`\``,props:`interface ToastProps {
|
|
23352
24683
|
/**
|
|
24684
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
24685
|
+
* identifier; new components should exclude it via
|
|
24686
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24687
|
+
* Retained on existing components for backward compatibility.
|
|
24688
|
+
*
|
|
23353
24689
|
* The unique identifier for the block. This is used to identify the block in
|
|
23354
24690
|
* the DOM and in the block map. It is added as a data attribute
|
|
23355
24691
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -23357,6 +24693,11 @@ toastQueue.add(alertProps, { timeout: 1000 });
|
|
|
23357
24693
|
*/
|
|
23358
24694
|
data-block-id?: string
|
|
23359
24695
|
/**
|
|
24696
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
24697
|
+
* marker; new components should exclude it via
|
|
24698
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
24699
|
+
* Retained on existing components for backward compatibility.
|
|
24700
|
+
*
|
|
23360
24701
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
23361
24702
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
23362
24703
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -24140,6 +25481,11 @@ In case of Popover, when the popover trigger has moved to the menu:
|
|
|
24140
25481
|
| Tab | Focus the next interactive child outside the toolbar |
|
|
24141
25482
|
| Tab without \`isSingleTabStop\` | Focus the next interactive child within the toolbar |`,props:`interface ToolbarProps {
|
|
24142
25483
|
/**
|
|
25484
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
25485
|
+
* identifier; new components should exclude it via
|
|
25486
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25487
|
+
* Retained on existing components for backward compatibility.
|
|
25488
|
+
*
|
|
24143
25489
|
* The unique identifier for the block. This is used to identify the block in
|
|
24144
25490
|
* the DOM and in the block map. It is added as a data attribute
|
|
24145
25491
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -24147,6 +25493,11 @@ In case of Popover, when the popover trigger has moved to the menu:
|
|
|
24147
25493
|
*/
|
|
24148
25494
|
data-block-id?: string
|
|
24149
25495
|
/**
|
|
25496
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
25497
|
+
* marker; new components should exclude it via
|
|
25498
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25499
|
+
* Retained on existing components for backward compatibility.
|
|
25500
|
+
*
|
|
24150
25501
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24151
25502
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24152
25503
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -24563,6 +25914,11 @@ The \`data-placement\` attribute is applied to the tooltip's outer wrapper eleme
|
|
|
24563
25914
|
| \`[data-placement="left"]\` | Applied when tooltip is positioned to the left of the trigger |
|
|
24564
25915
|
| \`[data-placement="right"]\` | Applied when tooltip is positioned to the right of the trigger |`,props:`interface TooltipProps {
|
|
24565
25916
|
/**
|
|
25917
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
25918
|
+
* identifier; new components should exclude it via
|
|
25919
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25920
|
+
* Retained on existing components for backward compatibility.
|
|
25921
|
+
*
|
|
24566
25922
|
* The unique identifier for the block. This is used to identify the block in
|
|
24567
25923
|
* the DOM and in the block map. It is added as a data attribute
|
|
24568
25924
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -24570,6 +25926,11 @@ The \`data-placement\` attribute is applied to the tooltip's outer wrapper eleme
|
|
|
24570
25926
|
*/
|
|
24571
25927
|
data-block-id?: string
|
|
24572
25928
|
/**
|
|
25929
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
25930
|
+
* marker; new components should exclude it via
|
|
25931
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
25932
|
+
* Retained on existing components for backward compatibility.
|
|
25933
|
+
*
|
|
24573
25934
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24574
25935
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24575
25936
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -24602,22 +25963,28 @@ onOpenChange?: (isOpen: boolean) => void
|
|
|
24602
25963
|
*/
|
|
24603
25964
|
isDisabled?: boolean
|
|
24604
25965
|
/**
|
|
24605
|
-
* The delay time for the tooltip to show up. [See
|
|
25966
|
+
* The delay time for the tooltip to show up. [See
|
|
25967
|
+
* guidelines](https://spectrum.adobe.com/page/tooltip/#Immediate-or-delayed-appearance).
|
|
25968
|
+
*
|
|
24606
25969
|
* @default 1500
|
|
24607
25970
|
*/
|
|
24608
25971
|
delay?: number
|
|
24609
25972
|
/**
|
|
24610
|
-
* The delay time for the tooltip to close. [See
|
|
25973
|
+
* The delay time for the tooltip to close. [See
|
|
25974
|
+
* guidelines](https://spectrum.adobe.com/page/tooltip/#Warmup-and-cooldown).
|
|
25975
|
+
*
|
|
24611
25976
|
* @default 500
|
|
24612
25977
|
*/
|
|
24613
25978
|
closeDelay?: number
|
|
24614
25979
|
/**
|
|
24615
25980
|
* By default, opens for both focus and hover. Can be made to open only for focus.
|
|
25981
|
+
*
|
|
24616
25982
|
* @default 'hover'
|
|
24617
25983
|
*/
|
|
24618
25984
|
trigger?: 'hover' | 'focus'
|
|
24619
25985
|
/**
|
|
24620
25986
|
* Whether the tooltip should close when the trigger is pressed.
|
|
25987
|
+
*
|
|
24621
25988
|
* @default true
|
|
24622
25989
|
*/
|
|
24623
25990
|
shouldCloseOnPress?: boolean
|
|
@@ -24738,9 +26105,10 @@ placement?: any
|
|
|
24738
26105
|
<Text>Tooltip is: {isOpen ? "open" : "closed"}</Text>
|
|
24739
26106
|
</div>
|
|
24740
26107
|
);
|
|
24741
|
-
};`}],implementation:`import {
|
|
26108
|
+
};`}],implementation:`import React, { useState } from "react";
|
|
24742
26109
|
|
|
24743
|
-
import
|
|
26110
|
+
import { ActionButton } from "../../ActionButton";
|
|
26111
|
+
import { Tooltip } from "../Tooltip";
|
|
24744
26112
|
|
|
24745
26113
|
export const CustomElementTooltip = () => (
|
|
24746
26114
|
<Tooltip text="Tooltip content" delay={0}>
|
|
@@ -24751,7 +26119,29 @@ export const CustomElementTooltip = () => (
|
|
|
24751
26119
|
/>
|
|
24752
26120
|
)}
|
|
24753
26121
|
</Tooltip>
|
|
24754
|
-
)
|
|
26122
|
+
);
|
|
26123
|
+
|
|
26124
|
+
export const TooltipGetTargetRectExample = () => {
|
|
26125
|
+
const [called, setCalled] = useState(false);
|
|
26126
|
+
|
|
26127
|
+
return (
|
|
26128
|
+
<>
|
|
26129
|
+
<Tooltip
|
|
26130
|
+
text="Tooltip content"
|
|
26131
|
+
delay={0}
|
|
26132
|
+
// Returns the trigger's own rect (so positioning is unchanged) while
|
|
26133
|
+
// recording that react-aria invoked the forwarded callback.
|
|
26134
|
+
getTargetRect={(target) => {
|
|
26135
|
+
setCalled(true);
|
|
26136
|
+
return target.getBoundingClientRect();
|
|
26137
|
+
}}
|
|
26138
|
+
>
|
|
26139
|
+
<ActionButton label="Show Tooltip" />
|
|
26140
|
+
</Tooltip>
|
|
26141
|
+
{called ? <span data-testid="tooltip-target-rect-called" /> : null}
|
|
26142
|
+
</>
|
|
26143
|
+
);
|
|
26144
|
+
};`},similarTo:[],figmaUrl:null},TreeView:{id:"core-collections-treeview",breadcrumb:"Core/Collections/TreeView",importStatement:`import {
|
|
24755
26145
|
TreeView,
|
|
24756
26146
|
VirtualizedTreeViewExample,
|
|
24757
26147
|
VirtualizedTreeViewWithActionsExample,
|
|
@@ -24907,6 +26297,11 @@ Without virtualization:
|
|
|
24907
26297
|
* Performance degrades beyond ~500 items
|
|
24908
26298
|
* Memory usage grows with tree size`,props:`interface TreeViewProps {
|
|
24909
26299
|
/**
|
|
26300
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
26301
|
+
* identifier; new components should exclude it via
|
|
26302
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26303
|
+
* Retained on existing components for backward compatibility.
|
|
26304
|
+
*
|
|
24910
26305
|
* The unique identifier for the block. This is used to identify the block in
|
|
24911
26306
|
* the DOM and in the block map. It is added as a data attribute
|
|
24912
26307
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -24914,6 +26309,11 @@ Without virtualization:
|
|
|
24914
26309
|
*/
|
|
24915
26310
|
data-block-id?: string
|
|
24916
26311
|
/**
|
|
26312
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
26313
|
+
* marker; new components should exclude it via
|
|
26314
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26315
|
+
* Retained on existing components for backward compatibility.
|
|
26316
|
+
*
|
|
24917
26317
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
24918
26318
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
24919
26319
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -25564,6 +26964,11 @@ function App() {
|
|
|
25564
26964
|
}
|
|
25565
26965
|
\`\`\``,props:`interface UNSAFE_ListBoxProps {
|
|
25566
26966
|
/**
|
|
26967
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
26968
|
+
* identifier; new components should exclude it via
|
|
26969
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26970
|
+
* Retained on existing components for backward compatibility.
|
|
26971
|
+
*
|
|
25567
26972
|
* The unique identifier for the block. This is used to identify the block in
|
|
25568
26973
|
* the DOM and in the block map. It is added as a data attribute
|
|
25569
26974
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -25571,6 +26976,11 @@ function App() {
|
|
|
25571
26976
|
*/
|
|
25572
26977
|
data-block-id?: string
|
|
25573
26978
|
/**
|
|
26979
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
26980
|
+
* marker; new components should exclude it via
|
|
26981
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
26982
|
+
* Retained on existing components for backward compatibility.
|
|
26983
|
+
*
|
|
25574
26984
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
25575
26985
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
25576
26986
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -26512,6 +27922,11 @@ layoutOptions?: O
|
|
|
26512
27922
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
26513
27923
|
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
27924
|
/**
|
|
27925
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
27926
|
+
* identifier; new components should exclude it via
|
|
27927
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
27928
|
+
* Retained on existing components for backward compatibility.
|
|
27929
|
+
*
|
|
26515
27930
|
* The unique identifier for the block. This is used to identify the block in
|
|
26516
27931
|
* the DOM and in the block map. It is added as a data attribute
|
|
26517
27932
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -26519,6 +27934,11 @@ layoutOptions?: O
|
|
|
26519
27934
|
*/
|
|
26520
27935
|
data-block-id?: string
|
|
26521
27936
|
/**
|
|
27937
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
27938
|
+
* marker; new components should exclude it via
|
|
27939
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
27940
|
+
* Retained on existing components for backward compatibility.
|
|
27941
|
+
*
|
|
26522
27942
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
26523
27943
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
26524
27944
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -26690,6 +28110,11 @@ export const AccordionWithDisabledItemsExample: React.FC<
|
|
|
26690
28110
|
return <AccordionExample {...props} disabledKeys={new Set(["item-1"])} />;
|
|
26691
28111
|
};`},similarTo:[],figmaUrl:null},IconColorInput:{id:"core-forms-colorinput-iconcolorinput",importStatement:'import { Box, IconColorInput } from "@baseline-ui/core";',description:"",documentation:null,props:`interface IconColorInputProps {
|
|
26692
28112
|
/**
|
|
28113
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
28114
|
+
* identifier; new components should exclude it via
|
|
28115
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28116
|
+
* Retained on existing components for backward compatibility.
|
|
28117
|
+
*
|
|
26693
28118
|
* The unique identifier for the block. This is used to identify the block in
|
|
26694
28119
|
* the DOM and in the block map. It is added as a data attribute
|
|
26695
28120
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -26697,6 +28122,11 @@ export const AccordionWithDisabledItemsExample: React.FC<
|
|
|
26697
28122
|
*/
|
|
26698
28123
|
data-block-id?: string
|
|
26699
28124
|
/**
|
|
28125
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
28126
|
+
* marker; new components should exclude it via
|
|
28127
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28128
|
+
* Retained on existing components for backward compatibility.
|
|
28129
|
+
*
|
|
26700
28130
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
26701
28131
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
26702
28132
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -26946,6 +28376,11 @@ svg: string
|
|
|
26946
28376
|
UncontrolledInteractionOutsideExample,
|
|
26947
28377
|
} from "@baseline-ui/core";`,description:"",documentation:null,props:`interface ModalContentProps {
|
|
26948
28378
|
/**
|
|
28379
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
28380
|
+
* identifier; new components should exclude it via
|
|
28381
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28382
|
+
* Retained on existing components for backward compatibility.
|
|
28383
|
+
*
|
|
26949
28384
|
* The unique identifier for the block. This is used to identify the block in
|
|
26950
28385
|
* the DOM and in the block map. It is added as a data attribute
|
|
26951
28386
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -26953,6 +28388,11 @@ svg: string
|
|
|
26953
28388
|
*/
|
|
26954
28389
|
data-block-id?: string
|
|
26955
28390
|
/**
|
|
28391
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
28392
|
+
* marker; new components should exclude it via
|
|
28393
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28394
|
+
* Retained on existing components for backward compatibility.
|
|
28395
|
+
*
|
|
26956
28396
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
26957
28397
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
26958
28398
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -27237,6 +28677,30 @@ export const LongModalExample: React.FC<
|
|
|
27237
28677
|
);
|
|
27238
28678
|
};
|
|
27239
28679
|
|
|
28680
|
+
export const DisableAnimationModalExample: React.FC<
|
|
28681
|
+
TestComponentProps & { defaultOpen?: boolean; disableAnimation?: boolean }
|
|
28682
|
+
> = ({ enableInert, defaultOpen = true, disableAnimation }) => {
|
|
28683
|
+
const id = useId();
|
|
28684
|
+
return (
|
|
28685
|
+
<Modal defaultOpen={defaultOpen}>
|
|
28686
|
+
<ModalTrigger>
|
|
28687
|
+
<ActionButton label="Open Modal" />
|
|
28688
|
+
</ModalTrigger>
|
|
28689
|
+
<ModalContent
|
|
28690
|
+
disableAnimation={disableAnimation}
|
|
28691
|
+
UNSAFE_enableInert={enableInert}
|
|
28692
|
+
>
|
|
28693
|
+
<Dialog aria-labelledby={id}>
|
|
28694
|
+
<VisuallyHidden>
|
|
28695
|
+
<Text id={id}>Animation example</Text>
|
|
28696
|
+
</VisuallyHidden>
|
|
28697
|
+
<Text>Modal body</Text>
|
|
28698
|
+
</Dialog>
|
|
28699
|
+
</ModalContent>
|
|
28700
|
+
</Modal>
|
|
28701
|
+
);
|
|
28702
|
+
};
|
|
28703
|
+
|
|
27240
28704
|
/**
|
|
27241
28705
|
* Example with form controls inside a Modal. Used to verify pointer
|
|
27242
28706
|
* interactions work correctly with all input devices.
|
|
@@ -27440,6 +28904,11 @@ export const DisabledFocusManagementExample: React.FC<{
|
|
|
27440
28904
|
TrailingElementExample,
|
|
27441
28905
|
} from "@baseline-ui/core";`,description:"",documentation:null,props:`interface PointPickerContentProps {
|
|
27442
28906
|
/**
|
|
28907
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
28908
|
+
* identifier; new components should exclude it via
|
|
28909
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28910
|
+
* Retained on existing components for backward compatibility.
|
|
28911
|
+
*
|
|
27443
28912
|
* The unique identifier for the block. This is used to identify the block in
|
|
27444
28913
|
* the DOM and in the block map. It is added as a data attribute
|
|
27445
28914
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -27447,6 +28916,11 @@ export const DisabledFocusManagementExample: React.FC<{
|
|
|
27447
28916
|
*/
|
|
27448
28917
|
data-block-id?: string
|
|
27449
28918
|
/**
|
|
28919
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
28920
|
+
* marker; new components should exclude it via
|
|
28921
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
28922
|
+
* Retained on existing components for backward compatibility.
|
|
28923
|
+
*
|
|
27450
28924
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
27451
28925
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
27452
28926
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -28126,6 +29600,11 @@ export const TrailingElementExample = () => {
|
|
|
28126
29600
|
);
|
|
28127
29601
|
};`},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
29602
|
/**
|
|
29603
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
29604
|
+
* identifier; new components should exclude it via
|
|
29605
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
29606
|
+
* Retained on existing components for backward compatibility.
|
|
29607
|
+
*
|
|
28129
29608
|
* The unique identifier for the block. This is used to identify the block in
|
|
28130
29609
|
* the DOM and in the block map. It is added as a data attribute
|
|
28131
29610
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -28133,6 +29612,11 @@ export const TrailingElementExample = () => {
|
|
|
28133
29612
|
*/
|
|
28134
29613
|
data-block-id?: string
|
|
28135
29614
|
/**
|
|
29615
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
29616
|
+
* marker; new components should exclude it via
|
|
29617
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
29618
|
+
* Retained on existing components for backward compatibility.
|
|
29619
|
+
*
|
|
28136
29620
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
28137
29621
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
28138
29622
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -28768,6 +30252,11 @@ export const TrailingElementExample = () => {
|
|
|
28768
30252
|
PopoverWithScrollableContentExample,
|
|
28769
30253
|
} from "@baseline-ui/core";`,description:"",documentation:null,props:`interface PopoverContentProps {
|
|
28770
30254
|
/**
|
|
30255
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
30256
|
+
* identifier; new components should exclude it via
|
|
30257
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
30258
|
+
* Retained on existing components for backward compatibility.
|
|
30259
|
+
*
|
|
28771
30260
|
* The unique identifier for the block. This is used to identify the block in
|
|
28772
30261
|
* the DOM and in the block map. It is added as a data attribute
|
|
28773
30262
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -28775,6 +30264,11 @@ export const TrailingElementExample = () => {
|
|
|
28775
30264
|
*/
|
|
28776
30265
|
data-block-id?: string
|
|
28777
30266
|
/**
|
|
30267
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
30268
|
+
* marker; new components should exclude it via
|
|
30269
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
30270
|
+
* Retained on existing components for backward compatibility.
|
|
30271
|
+
*
|
|
28778
30272
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
28779
30273
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
28780
30274
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -28985,6 +30479,31 @@ export const PopoverExample: React.FC<{
|
|
|
28985
30479
|
);
|
|
28986
30480
|
};
|
|
28987
30481
|
|
|
30482
|
+
export const PopoverGetTargetRectExample: React.FC = () => {
|
|
30483
|
+
const [called, setCalled] = useState(false);
|
|
30484
|
+
|
|
30485
|
+
return (
|
|
30486
|
+
<Popover type="dialog" defaultOpen={true}>
|
|
30487
|
+
<PopoverTrigger>
|
|
30488
|
+
<ActionButton label="Open" />
|
|
30489
|
+
</PopoverTrigger>
|
|
30490
|
+
<PopoverContent
|
|
30491
|
+
// Returns the trigger's own rect (so positioning is unchanged) while
|
|
30492
|
+
// recording that react-aria invoked the forwarded callback.
|
|
30493
|
+
getTargetRect={(target) => {
|
|
30494
|
+
setCalled(true);
|
|
30495
|
+
return target.getBoundingClientRect();
|
|
30496
|
+
}}
|
|
30497
|
+
>
|
|
30498
|
+
<Dialog size="content" aria-label="content">
|
|
30499
|
+
<Text type="label">getTargetRect content</Text>
|
|
30500
|
+
{called ? <span data-testid="popover-target-rect-called" /> : null}
|
|
30501
|
+
</Dialog>
|
|
30502
|
+
</PopoverContent>
|
|
30503
|
+
</Popover>
|
|
30504
|
+
);
|
|
30505
|
+
};
|
|
30506
|
+
|
|
28988
30507
|
export const PopoverWithScrollableContentExample: React.FC<{
|
|
28989
30508
|
popoverProps: Omit<PopoverProps, "children">;
|
|
28990
30509
|
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
@@ -29038,6 +30557,61 @@ export const PopoverCustomTargetExample = ({
|
|
|
29038
30557
|
);
|
|
29039
30558
|
};
|
|
29040
30559
|
|
|
30560
|
+
export const PopoverTriggerWidthExample: React.FC<{
|
|
30561
|
+
popoverProps?: Omit<PopoverProps, "children">;
|
|
30562
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
30563
|
+
initialWidth?: number;
|
|
30564
|
+
}> = ({
|
|
30565
|
+
popoverProps = { type: "dialog" },
|
|
30566
|
+
popoverContentProps,
|
|
30567
|
+
initialWidth = 240,
|
|
30568
|
+
}) => {
|
|
30569
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
30570
|
+
const [width, setWidth] = useState(initialWidth);
|
|
30571
|
+
|
|
30572
|
+
return (
|
|
30573
|
+
<Box
|
|
30574
|
+
display="flex"
|
|
30575
|
+
flexDirection="column"
|
|
30576
|
+
gap="lg"
|
|
30577
|
+
padding="xl"
|
|
30578
|
+
alignItems="flex-start"
|
|
30579
|
+
>
|
|
30580
|
+
<ActionButton
|
|
30581
|
+
label="Grow trigger"
|
|
30582
|
+
onPress={() => {
|
|
30583
|
+
setWidth((w) => w + 80);
|
|
30584
|
+
}}
|
|
30585
|
+
/>
|
|
30586
|
+
<Popover {...popoverProps}>
|
|
30587
|
+
<Box ref={triggerRef} data-testid="width-trigger" style={{ width }}>
|
|
30588
|
+
<PopoverTrigger>
|
|
30589
|
+
<ActionButton label="Open" style={{ width: "100%" }} />
|
|
30590
|
+
</PopoverTrigger>
|
|
30591
|
+
</Box>
|
|
30592
|
+
<PopoverContent
|
|
30593
|
+
placement="bottom"
|
|
30594
|
+
triggerRef={triggerRef}
|
|
30595
|
+
isNonModal={true}
|
|
30596
|
+
shouldCloseOnInteractOutside={() => false}
|
|
30597
|
+
{...popoverContentProps}
|
|
30598
|
+
>
|
|
30599
|
+
<Dialog
|
|
30600
|
+
size="content"
|
|
30601
|
+
aria-label="content"
|
|
30602
|
+
className={sprinkles({ padding: "md" })}
|
|
30603
|
+
// Fill the trigger-matched container so the bordered content spans
|
|
30604
|
+
// the full width instead of hugging its text.
|
|
30605
|
+
style={{ width: "100%" }}
|
|
30606
|
+
>
|
|
30607
|
+
<Text type="label">Width-matched popover</Text>
|
|
30608
|
+
</Dialog>
|
|
30609
|
+
</PopoverContent>
|
|
30610
|
+
</Popover>
|
|
30611
|
+
</Box>
|
|
30612
|
+
);
|
|
30613
|
+
};
|
|
30614
|
+
|
|
29041
30615
|
export const PopoverArrowExample: React.FC<
|
|
29042
30616
|
Omit<
|
|
29043
30617
|
PopoverProps & {
|
|
@@ -30065,6 +31639,31 @@ export const PopoverExample: React.FC<{
|
|
|
30065
31639
|
);
|
|
30066
31640
|
};
|
|
30067
31641
|
|
|
31642
|
+
export const PopoverGetTargetRectExample: React.FC = () => {
|
|
31643
|
+
const [called, setCalled] = useState(false);
|
|
31644
|
+
|
|
31645
|
+
return (
|
|
31646
|
+
<Popover type="dialog" defaultOpen={true}>
|
|
31647
|
+
<PopoverTrigger>
|
|
31648
|
+
<ActionButton label="Open" />
|
|
31649
|
+
</PopoverTrigger>
|
|
31650
|
+
<PopoverContent
|
|
31651
|
+
// Returns the trigger's own rect (so positioning is unchanged) while
|
|
31652
|
+
// recording that react-aria invoked the forwarded callback.
|
|
31653
|
+
getTargetRect={(target) => {
|
|
31654
|
+
setCalled(true);
|
|
31655
|
+
return target.getBoundingClientRect();
|
|
31656
|
+
}}
|
|
31657
|
+
>
|
|
31658
|
+
<Dialog size="content" aria-label="content">
|
|
31659
|
+
<Text type="label">getTargetRect content</Text>
|
|
31660
|
+
{called ? <span data-testid="popover-target-rect-called" /> : null}
|
|
31661
|
+
</Dialog>
|
|
31662
|
+
</PopoverContent>
|
|
31663
|
+
</Popover>
|
|
31664
|
+
);
|
|
31665
|
+
};
|
|
31666
|
+
|
|
30068
31667
|
export const PopoverWithScrollableContentExample: React.FC<{
|
|
30069
31668
|
popoverProps: Omit<PopoverProps, "children">;
|
|
30070
31669
|
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
@@ -30118,6 +31717,61 @@ export const PopoverCustomTargetExample = ({
|
|
|
30118
31717
|
);
|
|
30119
31718
|
};
|
|
30120
31719
|
|
|
31720
|
+
export const PopoverTriggerWidthExample: React.FC<{
|
|
31721
|
+
popoverProps?: Omit<PopoverProps, "children">;
|
|
31722
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
31723
|
+
initialWidth?: number;
|
|
31724
|
+
}> = ({
|
|
31725
|
+
popoverProps = { type: "dialog" },
|
|
31726
|
+
popoverContentProps,
|
|
31727
|
+
initialWidth = 240,
|
|
31728
|
+
}) => {
|
|
31729
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
31730
|
+
const [width, setWidth] = useState(initialWidth);
|
|
31731
|
+
|
|
31732
|
+
return (
|
|
31733
|
+
<Box
|
|
31734
|
+
display="flex"
|
|
31735
|
+
flexDirection="column"
|
|
31736
|
+
gap="lg"
|
|
31737
|
+
padding="xl"
|
|
31738
|
+
alignItems="flex-start"
|
|
31739
|
+
>
|
|
31740
|
+
<ActionButton
|
|
31741
|
+
label="Grow trigger"
|
|
31742
|
+
onPress={() => {
|
|
31743
|
+
setWidth((w) => w + 80);
|
|
31744
|
+
}}
|
|
31745
|
+
/>
|
|
31746
|
+
<Popover {...popoverProps}>
|
|
31747
|
+
<Box ref={triggerRef} data-testid="width-trigger" style={{ width }}>
|
|
31748
|
+
<PopoverTrigger>
|
|
31749
|
+
<ActionButton label="Open" style={{ width: "100%" }} />
|
|
31750
|
+
</PopoverTrigger>
|
|
31751
|
+
</Box>
|
|
31752
|
+
<PopoverContent
|
|
31753
|
+
placement="bottom"
|
|
31754
|
+
triggerRef={triggerRef}
|
|
31755
|
+
isNonModal={true}
|
|
31756
|
+
shouldCloseOnInteractOutside={() => false}
|
|
31757
|
+
{...popoverContentProps}
|
|
31758
|
+
>
|
|
31759
|
+
<Dialog
|
|
31760
|
+
size="content"
|
|
31761
|
+
aria-label="content"
|
|
31762
|
+
className={sprinkles({ padding: "md" })}
|
|
31763
|
+
// Fill the trigger-matched container so the bordered content spans
|
|
31764
|
+
// the full width instead of hugging its text.
|
|
31765
|
+
style={{ width: "100%" }}
|
|
31766
|
+
>
|
|
31767
|
+
<Text type="label">Width-matched popover</Text>
|
|
31768
|
+
</Dialog>
|
|
31769
|
+
</PopoverContent>
|
|
31770
|
+
</Popover>
|
|
31771
|
+
</Box>
|
|
31772
|
+
);
|
|
31773
|
+
};
|
|
31774
|
+
|
|
30121
31775
|
export const PopoverArrowExample: React.FC<
|
|
30122
31776
|
Omit<
|
|
30123
31777
|
PopoverProps & {
|
|
@@ -31130,6 +32784,28 @@ export const SelectExample: React.FC<
|
|
|
31130
32784
|
);
|
|
31131
32785
|
};
|
|
31132
32786
|
|
|
32787
|
+
export const SelectGetTargetRectExample: React.FC = () => {
|
|
32788
|
+
const [called, setCalled] = React.useState(false);
|
|
32789
|
+
|
|
32790
|
+
return (
|
|
32791
|
+
<>
|
|
32792
|
+
<Select
|
|
32793
|
+
aria-label="Choose an item"
|
|
32794
|
+
placeholder="Choose an item"
|
|
32795
|
+
items={items}
|
|
32796
|
+
defaultOpen={true}
|
|
32797
|
+
// Returns the trigger's own rect (so positioning is unchanged) while
|
|
32798
|
+
// recording that the popover invoked the forwarded callback.
|
|
32799
|
+
getTargetRect={(target) => {
|
|
32800
|
+
setCalled(true);
|
|
32801
|
+
return target.getBoundingClientRect();
|
|
32802
|
+
}}
|
|
32803
|
+
/>
|
|
32804
|
+
{called ? <span data-testid="select-target-rect-called" /> : null}
|
|
32805
|
+
</>
|
|
32806
|
+
);
|
|
32807
|
+
};
|
|
32808
|
+
|
|
31133
32809
|
export const SelectCustomTriggerExample: React.FC<
|
|
31134
32810
|
Omit<React.ComponentProps<typeof Select>, "items">
|
|
31135
32811
|
> = (args) => {
|
|
@@ -31202,6 +32878,11 @@ export const SelectWithVirtualizeAutocompleteExample: React.FC<
|
|
|
31202
32878
|
);
|
|
31203
32879
|
};`},similarTo:[],figmaUrl:null},IconSlider:{id:"core-forms-slider-iconslider",importStatement:'import { IconSlider } from "@baseline-ui/core";',description:"",documentation:null,props:`interface IconSliderProps {
|
|
31204
32880
|
/**
|
|
32881
|
+
* @deprecated Do not use in new components. This is a legacy block
|
|
32882
|
+
* identifier; new components should exclude it via
|
|
32883
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
32884
|
+
* Retained on existing components for backward compatibility.
|
|
32885
|
+
*
|
|
31205
32886
|
* The unique identifier for the block. This is used to identify the block in
|
|
31206
32887
|
* the DOM and in the block map. It is added as a data attribute
|
|
31207
32888
|
* \`data-block-id\` to the root element of the block if a DOM node is
|
|
@@ -31209,6 +32890,11 @@ export const SelectWithVirtualizeAutocompleteExample: React.FC<
|
|
|
31209
32890
|
*/
|
|
31210
32891
|
data-block-id?: string
|
|
31211
32892
|
/**
|
|
32893
|
+
* @deprecated Do not use in new components. This is a legacy block group
|
|
32894
|
+
* marker; new components should exclude it via
|
|
32895
|
+
* \`Omit<StylingProps, keyof BlockProps>\` (see \`StatusCard\` / \`Code\`).
|
|
32896
|
+
* Retained on existing components for backward compatibility.
|
|
32897
|
+
*
|
|
31212
32898
|
* Represents a data block group. This is similar to \`data-block-id\` but it
|
|
31213
32899
|
* doesn't have to be unique just like \`class\`. This is used to group blocks
|
|
31214
32900
|
* together in the DOM and in the block map. It is added as a data attribute
|
|
@@ -32537,7 +34223,7 @@ padding={[null, "lg", "xl"]}
|
|
|
32537
34223
|
|
|
32538
34224
|
* [vanilla-extract sprinkles documentation](https://vanilla-extract.style/documentation/packages/sprinkles/) - Learn about the underlying sprinkles framework
|
|
32539
34225
|
* [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=`
|
|
34226
|
+
* [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.1.0"};var u=`
|
|
32541
34227
|
# Baseline UI MCP Server Guidelines
|
|
32542
34228
|
|
|
32543
34229
|
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 +34378,13 @@ Use this tool to:
|
|
|
32692
34378
|
- Consult **list_components** to find the right component for your needs
|
|
32693
34379
|
- Reference **theming** for custom design systems
|
|
32694
34380
|
- Check **styling** for CSS and design token guidance
|
|
32695
|
-
`;var
|
|
34381
|
+
`;var S=`# List of available components in Baseline UI design system
|
|
32696
34382
|
| Name | Description | Similar To |
|
|
32697
34383
|
| --- | --- | --- |
|
|
32698
34384
|
${Object.entries(o).toSorted(([n],[t])=>n.localeCompare(t)).map(([n,{description:t,similarTo:e}])=>`|${n}|${t}|${e?.join(", ")||""}|`).join(`
|
|
32699
34385
|
`)}
|
|
32700
|
-
`,
|
|
34386
|
+
`,P=Object.entries(c).map(([n,t])=>`${n}
|
|
32701
34387
|
|
|
32702
34388
|
${t.map(e=>"- "+e).join(`
|
|
32703
34389
|
`)}`).join(`
|
|
32704
|
-
`);async function
|
|
34390
|
+
`);async function k(){let n=new mcp_js.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:zod.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:zod.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:zod.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 stdio_js.StdioServerTransport;await n.connect(t);}(async()=>await k())();
|