@baseline-ui/mcp 3.5.0 → 3.7.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 +8 -0
- package/dist/{chunk-IMFQXPWD.js → chunk-4XINYV7P.js} +1091 -62
- package/dist/index.js +1 -1
- package/dist/server.cjs +1091 -62
- package/dist/server.js +1 -1
- package/package.json +2 -2
- package/sbom.json +13 -13
package/dist/server.cjs
CHANGED
|
@@ -386,6 +386,26 @@ export function ArabicLocaleLtrOverrideBarChart() {
|
|
|
386
386
|
/>
|
|
387
387
|
</I18nProvider>
|
|
388
388
|
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const manyCategories = Array.from({ length: 40 }, (_, index) => ({
|
|
392
|
+
label: \`C\${index}\`,
|
|
393
|
+
a: 10 + (index % 7),
|
|
394
|
+
b: 5 + (index % 5),
|
|
395
|
+
}));
|
|
396
|
+
|
|
397
|
+
/** Many categories in a narrow chart without a grid. */
|
|
398
|
+
export function ManyCategoriesNoGridBarChart() {
|
|
399
|
+
return (
|
|
400
|
+
<BarChart
|
|
401
|
+
data={manyCategories}
|
|
402
|
+
bars={[{ dataKey: "a" }, { dataKey: "b" }]}
|
|
403
|
+
barSize={32}
|
|
404
|
+
showGrid={false}
|
|
405
|
+
width={480}
|
|
406
|
+
xAxisDataKey="label"
|
|
407
|
+
/>
|
|
408
|
+
);
|
|
389
409
|
}`},similarTo:[],figmaUrl:null},LineChart:{id:"charts-linechart",breadcrumb:"Charts/LineChart",importStatement:`import { Box } from "@baseline-ui/core";
|
|
390
410
|
import { LineChart } from "@baseline-ui/charts";`,description:"The `LineChart` component renders a responsive line chart for time series or other ordered data. It is built on top of [Recharts](https://recharts.org/) and styled with Baseline UI design tokens so it picks up the active theme automatically.",documentation:'The `LineChart` component renders a responsive line chart for time series or other ordered data. It is built on top of [Recharts](https://recharts.org/) and styled with Baseline UI design tokens so it picks up the active theme automatically.\n\n* Renders one or more lines from a single dataset, keyed by `xAxisDataKey` and the per-line `dataKey`.\n* Themed axes, grid, tooltip, and legend styled with Baseline UI tokens \u2014 adapts to light, dark, and high-contrast themes.\n* Default line colors cycle through theme support colors (`info`, `success`, `warning`, `error`); each line can override with a custom `color`.\n* Toggleable tooltip, legend, grid, and axes for compact or sparkline-style charts.\n* Configurable curve interpolation (`monotone`, `linear`, etc.) and per-line stroke width.\n* Responsive by default \u2014 fills the parent container width while preserving the configured `height`.\n* Built-in keyboard navigation across data points via Recharts\' accessibility layer.\n\n```jsx\nimport { LineChart } from "@baseline-ui/charts";\n\nconst data = [\n { month: "Jan", revenue: 4000, expenses: 2400 },\n { month: "Feb", revenue: 3000, expenses: 1398 },\n { month: "Mar", revenue: 5000, expenses: 3200 },\n];\n\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue" },\n { dataKey: "expenses", name: "Expenses" },\n ]}\n/>;\n```\n\nThe default variant renders a full-width line chart with grid, axes, and tooltip enabled. Use `showLegend` to also render a legend above the chart.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue" },\n { dataKey: "expenses", name: "Expenses" },\n ]}\n showLegend\n/>\n```\n\nSet `variant="sparkline"` for a compact 40\xD720 inline trend indicator. Grid, axes, tooltip, and legend are hidden by default, the stroke is thinner, and chart margins are reduced to a 1px inset (just enough to prevent stroke clipping) so the line fills the box. Each chrome flag can still be re-enabled individually \u2014 for example, `showTooltip` re-enables the tooltip on a sparkline.\n\n```jsx\n<LineChart\n variant="sparkline"\n data={data}\n xAxisDataKey="month"\n lines={[{ dataKey: "revenue" }]}\n/>\n```\n\nPass a single entry in `lines` to render a single-series chart.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[{ dataKey: "revenue", name: "Revenue" }]}\n/>\n```\n\nDefault line colors cycle through `info` \u2192 `success` \u2192 `warning` \u2192 `error` and wrap modulo four. Provide a `color` per line to override the default.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue" },\n { dataKey: "expenses", name: "Expenses" },\n { dataKey: "profit", name: "Profit" },\n { dataKey: "tax", name: "Tax" },\n { dataKey: "fees", name: "Fees" },\n ]}\n showLegend\n/>\n```\n\nSet `dot` to `true` on a line to render a marker at each data point.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue", dot: true },\n { dataKey: "expenses", name: "Expenses", dot: true },\n ]}\n/>\n```\n\nThe `type` prop on each line controls the curve interpolation. The default is `monotone`; use `linear` for straight segments between points. Any [Recharts curve type](https://recharts.org/en-US/api/Line#type) is supported.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue", type: "linear" },\n { dataKey: "expenses", name: "Expenses", type: "linear" },\n ]}\n/>\n```\n\nOverride the default theme colors by passing `color` and `strokeWidth` per line.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[\n { dataKey: "revenue", name: "Revenue", color: "#7c3aed", strokeWidth: 3 },\n { dataKey: "expenses", name: "Expenses", color: "#f59e0b", strokeWidth: 3 },\n ]}\n showLegend\n/>\n```\n\n`showTooltip`, `showGrid`, `showXAxis`, and `showYAxis` toggle the corresponding chart chrome individually. They default to `true` for the default variant and `false` for the `sparkline` variant. Pass an explicit value to override the variant default.\n\n```jsx\n<LineChart\n data={data}\n xAxisDataKey="month"\n lines={[...]}\n showXAxis={false}\n showYAxis={false}\n showGrid={false}\n/>\n```\n\nThe chart surface is keyboard-focusable on the default variant. When focused via keyboard, the surface shows a focus ring and arrow keys move an indicator across data points, opening the tooltip at each step. The `sparkline` variant disables the accessibility layer and is not focusable.\n\n| Key | Function |\n| ------------- | --------------------------------------------------------------------------- |\n| `Tab` | Moves focus to the chart surface (default variant only). |\n| `Arrow Right` | Advances the active data point one step to the right and shows the tooltip. |\n| `Arrow Left` | Advances the active data point one step to the left and shows the tooltip. |\n| `Escape` | Dismisses the tooltip and clears the active data point. |\n\nThe `sparkline` variant disables the accessibility layer and is not keyboard-navigable.\n\nLineChart shares its legend, tooltip, and surface markup with every other chart in the package. The `BaselineUI-Chart-*` selectors are stable shared hooks; the kind-specific `BaselineUI-LineChart` class lets you scope styles to line charts only. Internal Recharts class names are not part of the public API.\n\n| Selector | Description |\n| ------------------------------------------------- | ------------------------------------------------------------------- |\n| `.BaselineUI-LineChart` | The line-chart root identifier. |\n| `.BaselineUI-LineChart[data-variant="default"]` | Targets only the default variant. |\n| `.BaselineUI-LineChart[data-variant="sparkline"]` | Targets only the sparkline variant. |\n| `.BaselineUI-Chart-Surface` | The chart drawing area that wraps the SVG. |\n| `.BaselineUI-Chart-Legend` | The legend list element. Only rendered when `showLegend` is `true`. |\n| `.BaselineUI-Chart-LegendItem` | A single legend entry \u2014 one per series. |\n| `.BaselineUI-Chart-LegendSwatch` | The colored swatch in a legend entry. |\n| `.BaselineUI-Chart-Tooltip` | The hover/focus tooltip container. |\n| `.BaselineUI-Chart-TooltipItem` | A single series entry in the tooltip. |\n| `.BaselineUI-Chart-TooltipSwatch` | The colored swatch in a tooltip entry. |',props:`interface LineChartProps {
|
|
391
411
|
/**
|
|
@@ -3097,7 +3117,172 @@ children?: ReactNode
|
|
|
3097
3117
|
Nested Box
|
|
3098
3118
|
</Box>
|
|
3099
3119
|
</Box>
|
|
3100
|
-
);`}],implementation:""},similarTo:[],figmaUrl:null},
|
|
3120
|
+
);`}],implementation:""},similarTo:[],figmaUrl:null},Breadcrumbs:{id:"core-navigation-breadcrumbs",breadcrumb:"Core/Navigation/Breadcrumbs",importStatement:'import { ActionIconButton, Breadcrumb, Breadcrumbs, Menu, Select, VariantViewer } from "@baseline-ui/core";',description:"`Breadcrumbs` shows the path to the current page or resource as a trail of links, so people can see where they are and jump back to a parent.",documentation:'`Breadcrumbs` shows the path to the current page or resource as a trail of links, so people can see where they are and jump back to a parent.\n\n* Text, icon and icon-only breadcrumbs\n* Custom content, such as a `Select`, in place of a link\n* Individually or fully disabled breadcrumbs\n* Custom or no separator\n* Breadcrumbs that are real links with `href`\n\n```jsx\nimport { Breadcrumb, Breadcrumbs } from "@baseline-ui/core";\n\n<Breadcrumbs aria-label="File location" onAction={(id) => navigate(id)}>\n <Breadcrumb id="home" label="Home" />\n <Breadcrumb id="documents" label="Documents" />\n <Breadcrumb id="report" label="Report.pdf" />\n</Breadcrumbs>;\n```\n\nEach `Breadcrumb` needs a unique `id`, which is passed to `onAction` when it is pressed. Pass `href` to render the breadcrumb as a regular link; `onAction` is still called when it is pressed. The current breadcrumb and disabled breadcrumbs are not links, even with an `href`. The last breadcrumb is the current page: it is exposed with `aria-current="page"` and cannot be pressed.\n\nAdd an `icon` next to the `label`, or use `icon` with an `aria-label` and no `label` for an icon-only breadcrumb.\n\nPass the `id`s of the breadcrumbs to disable in `disabledKeys`, or set `isDisabled` to disable all of them.\n\nUse `separator` to replace the default caret, or pass `null` to render none. The separator is hidden from assistive technology and only appears between breadcrumbs.\n\nChildren of a `Breadcrumb` replace its link and render as is, so you can put a `Select` or a `Menu` in the trail. `onAction` is not called for them. Custom content stays interactive even when it is the last breadcrumb. It does not receive `disabledKeys`, `isDisabled` or the current-page marking, so handle those in the content itself.\n\n`Breadcrumbs` does not collapse on its own. To shorten a long trail, put the hidden levels in a `Menu` whose trigger is an ellipsis button.\n\nThe trail is rendered inside a `nav` landmark with an ordered list of breadcrumbs. Give it an `aria-label` that describes what the trail is for, such as "File location".\n\n* The current page has `aria-current="page"`.\n* Icon-only breadcrumbs need an `aria-label`.\n* Separators are decorative and hidden from assistive technology.\n\n| Key | Function |\n| ----- | ------------------------------------- |\n| Tab | Moves focus to the next enabled link. |\n| Enter | Activates the focused breadcrumb. |',props:`interface BreadcrumbsProps {
|
|
3121
|
+
/**
|
|
3122
|
+
* The \`id\` of the root element.
|
|
3123
|
+
*/
|
|
3124
|
+
id?: string
|
|
3125
|
+
/**
|
|
3126
|
+
* The \`Breadcrumb\` items to render, from the root to the current page.
|
|
3127
|
+
*/
|
|
3128
|
+
children: React.ReactNode
|
|
3129
|
+
/**
|
|
3130
|
+
* Handler that is called with the \`id\` of a breadcrumb when it is pressed.
|
|
3131
|
+
*/
|
|
3132
|
+
onAction?: (key: Key) => void
|
|
3133
|
+
/**
|
|
3134
|
+
* The \`id\`s of the breadcrumbs that are disabled. Only the link is disabled:
|
|
3135
|
+
* unlike \`isDisabled\`, the list item gets no \`data-disabled\` attribute.
|
|
3136
|
+
*/
|
|
3137
|
+
disabledKeys?: Iterable<Key>
|
|
3138
|
+
/**
|
|
3139
|
+
* Whether every breadcrumb is disabled.
|
|
3140
|
+
*
|
|
3141
|
+
* @default false
|
|
3142
|
+
*/
|
|
3143
|
+
isDisabled?: boolean
|
|
3144
|
+
/**
|
|
3145
|
+
* The element rendered between breadcrumbs. It is hidden from assistive
|
|
3146
|
+
* technology. Pass \`null\`, \`false\` or \`""\` to render no separator.
|
|
3147
|
+
*
|
|
3148
|
+
* @default A caret icon pointing toward the current page
|
|
3149
|
+
*/
|
|
3150
|
+
separator?: React.ReactNode
|
|
3151
|
+
}`,stories:{usage:[{id:"core-navigation-breadcrumbs--basic",name:"Basic",snippet:`const Basic = () => <Breadcrumbs aria-label="File location">
|
|
3152
|
+
<Breadcrumb id="home" label="Home" />
|
|
3153
|
+
<Breadcrumb id="documents" label="Documents" />
|
|
3154
|
+
<Breadcrumb id="report" label="Report.pdf" />
|
|
3155
|
+
</Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--with-icons",name:"With Icons",snippet:`const WithIcons = () => <Breadcrumbs aria-label="File location">
|
|
3156
|
+
<Breadcrumb id="folders" icon={FolderIcon} aria-label="Folders" />
|
|
3157
|
+
<Breadcrumb id="documents" label="Documents" icon={FolderIcon} />
|
|
3158
|
+
<Breadcrumb id="report" label="Report.pdf" />
|
|
3159
|
+
</Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--disabled",name:"Disabled",snippet:`const Disabled = () => <Breadcrumbs aria-label="File location" disabledKeys={["documents"]}>
|
|
3160
|
+
<Breadcrumb id="home" label="Home" />
|
|
3161
|
+
<Breadcrumb id="documents" label="Documents" />
|
|
3162
|
+
<Breadcrumb id="report" label="Report.pdf" />
|
|
3163
|
+
</Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--custom-separator",name:"Custom Separator",snippet:`const CustomSeparator = () => <Breadcrumbs aria-label="File location" separator="/">
|
|
3164
|
+
<Breadcrumb id="home" label="Home" />
|
|
3165
|
+
<Breadcrumb id="documents" label="Documents" />
|
|
3166
|
+
<Breadcrumb id="report" label="Report.pdf" />
|
|
3167
|
+
</Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--with-select",name:"With Select",snippet:`const WithSelect = () => <Breadcrumbs aria-label="File location">
|
|
3168
|
+
<Breadcrumb id="home" label="Home" />
|
|
3169
|
+
<Breadcrumb id="folder">
|
|
3170
|
+
<Select
|
|
3171
|
+
aria-label="Folder"
|
|
3172
|
+
variant="ghost"
|
|
3173
|
+
items={folderItems}
|
|
3174
|
+
defaultSelectedKey="design" />
|
|
3175
|
+
</Breadcrumb>
|
|
3176
|
+
<Breadcrumb id="report" label="Report.pdf" />
|
|
3177
|
+
</Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--collapsed",name:"Collapsed",snippet:`const Collapsed = () => <Breadcrumbs aria-label="File location">
|
|
3178
|
+
<Breadcrumb id="home" label="Home" />
|
|
3179
|
+
<Breadcrumb id="more">
|
|
3180
|
+
<Menu
|
|
3181
|
+
items={hiddenItems}
|
|
3182
|
+
triggerLabel="More"
|
|
3183
|
+
renderTrigger={({ buttonProps, ref }) => (
|
|
3184
|
+
<ActionIconButton
|
|
3185
|
+
{...buttonProps}
|
|
3186
|
+
ref={ref}
|
|
3187
|
+
icon={MoreIcon}
|
|
3188
|
+
aria-label="More"
|
|
3189
|
+
variant="tertiary"
|
|
3190
|
+
/>
|
|
3191
|
+
)} />
|
|
3192
|
+
</Breadcrumb>
|
|
3193
|
+
<Breadcrumb id="documents" label="Documents" />
|
|
3194
|
+
<Breadcrumb id="report" label="Report.pdf" />
|
|
3195
|
+
</Breadcrumbs>;`},{id:"core-navigation-breadcrumbs--variants",name:"Variants",snippet:`const Variants = () => (
|
|
3196
|
+
<VariantViewer<React.ComponentProps<typeof BreadcrumbsRow>>
|
|
3197
|
+
header={["Enabled", "Item disabled", "All disabled"]}
|
|
3198
|
+
variants={{
|
|
3199
|
+
"Text only": [
|
|
3200
|
+
{ kind: "text" },
|
|
3201
|
+
{ kind: "text", disabledKeys: ["home", "documents"] },
|
|
3202
|
+
{ kind: "text", isDisabled: true },
|
|
3203
|
+
],
|
|
3204
|
+
"Icon only": [
|
|
3205
|
+
{ kind: "icon-only" },
|
|
3206
|
+
{ kind: "icon-only", disabledKeys: ["home", "documents"] },
|
|
3207
|
+
{ kind: "icon-only", isDisabled: true },
|
|
3208
|
+
],
|
|
3209
|
+
"Icon and text": [
|
|
3210
|
+
{ kind: "icon-and-text" },
|
|
3211
|
+
{ kind: "icon-and-text", disabledKeys: ["home", "documents"] },
|
|
3212
|
+
{ kind: "icon-and-text", isDisabled: true },
|
|
3213
|
+
],
|
|
3214
|
+
}}
|
|
3215
|
+
component={BreadcrumbsRow}
|
|
3216
|
+
/>
|
|
3217
|
+
);`}],implementation:`import { FolderIcon } from "@baseline-ui/icons/16";
|
|
3218
|
+
import React from "react";
|
|
3219
|
+
|
|
3220
|
+
import { items } from "../../ListBox/__tests__/testComponents";
|
|
3221
|
+
import { Select } from "../../Select/Select";
|
|
3222
|
+
import { Breadcrumb, Breadcrumbs } from "../Breadcrumbs";
|
|
3223
|
+
|
|
3224
|
+
import type { BreadcrumbsProps } from "../Breadcrumbs.types";
|
|
3225
|
+
|
|
3226
|
+
export const BreadcrumbsExample: React.FC<
|
|
3227
|
+
Partial<BreadcrumbsProps> & {
|
|
3228
|
+
homeTestId?: string;
|
|
3229
|
+
unlabeled?: boolean;
|
|
3230
|
+
withTrailingButton?: boolean;
|
|
3231
|
+
}
|
|
3232
|
+
> = ({ homeTestId, unlabeled, withTrailingButton, ...props }) => (
|
|
3233
|
+
<>
|
|
3234
|
+
<Breadcrumbs aria-label={unlabeled ? undefined : "Trail"} {...props}>
|
|
3235
|
+
<Breadcrumb id="home" label="Home" data-testid={homeTestId} />
|
|
3236
|
+
<Breadcrumb id="docs" label="Documents" />
|
|
3237
|
+
<Breadcrumb id="file" label="Report.pdf" />
|
|
3238
|
+
</Breadcrumbs>
|
|
3239
|
+
{withTrailingButton ? (
|
|
3240
|
+
<button type="button" onClick={() => props.onAction?.("after")}>
|
|
3241
|
+
After
|
|
3242
|
+
</button>
|
|
3243
|
+
) : null}
|
|
3244
|
+
</>
|
|
3245
|
+
);
|
|
3246
|
+
|
|
3247
|
+
export const BreadcrumbsIconExample: React.FC<Partial<BreadcrumbsProps>> = (
|
|
3248
|
+
props,
|
|
3249
|
+
) => (
|
|
3250
|
+
<Breadcrumbs aria-label="Trail" {...props}>
|
|
3251
|
+
<Breadcrumb id="folders" icon={FolderIcon} aria-label="Folders" />
|
|
3252
|
+
<Breadcrumb id="docs" label="Documents" icon={FolderIcon} />
|
|
3253
|
+
<Breadcrumb id="file" label="Report.pdf" />
|
|
3254
|
+
</Breadcrumbs>
|
|
3255
|
+
);
|
|
3256
|
+
|
|
3257
|
+
export const BreadcrumbsSelectExample: React.FC<{ last?: boolean }> = ({
|
|
3258
|
+
last = false,
|
|
3259
|
+
}) => {
|
|
3260
|
+
const select = (
|
|
3261
|
+
<Select
|
|
3262
|
+
aria-label="Shape"
|
|
3263
|
+
variant="ghost"
|
|
3264
|
+
items={items}
|
|
3265
|
+
defaultSelectedKey="ellipse"
|
|
3266
|
+
/>
|
|
3267
|
+
);
|
|
3268
|
+
|
|
3269
|
+
return (
|
|
3270
|
+
<Breadcrumbs aria-label="Trail">
|
|
3271
|
+
<Breadcrumb id="home" label="Home" />
|
|
3272
|
+
<Breadcrumb id="shape">{select}</Breadcrumb>
|
|
3273
|
+
{!last && <Breadcrumb id="file" label="Report.pdf" />}
|
|
3274
|
+
</Breadcrumbs>
|
|
3275
|
+
);
|
|
3276
|
+
};
|
|
3277
|
+
|
|
3278
|
+
export const BreadcrumbsHrefExample: React.FC<Partial<BreadcrumbsProps>> = (
|
|
3279
|
+
props,
|
|
3280
|
+
) => (
|
|
3281
|
+
<Breadcrumbs aria-label="Trail" {...props}>
|
|
3282
|
+
<Breadcrumb id="home" label="Home" href="#home" />
|
|
3283
|
+
<Breadcrumb id="file" label="Report.pdf" href="#file" />
|
|
3284
|
+
</Breadcrumbs>
|
|
3285
|
+
);`},similarTo:[],figmaUrl:"https://www.figma.com/design/7Ft0mFZCq8fTVnTkXjTSZR/Baseline-UI?node-id=19605-113450&m=dev"},ButtonSelect:{id:"core-forms-buttonselect",breadcrumb:"Core/Forms/ButtonSelect",importStatement:'import { Box, ButtonSelect, VariantViewer } from "@baseline-ui/core";',description:"`ButtonSelect` pairs a primary action button with an adjacent dropdown trigger that opens a list of options. Use it when a single action has multiple related variants the user can switch between, such as picking the active shape tool from a set.",documentation:'`ButtonSelect` pairs a primary action button with an adjacent dropdown trigger that opens a list of options. Use it when a single action has multiple related variants the user can switch between, such as picking the active shape tool from a set.\n\n* Combines a button (toggle/action) with a select dropdown menu\n* Button can toggle current selection or trigger an action\n* Supports icons, optional labels, and tooltips for better UX\n* Configurable with different sizes, states (disabled/enabled), and behaviors\n* Full keyboard navigation and screen reader support\n* Customizable styling through `optionClassName`, `optionStyle`, `triggerClassName`, and `triggerStyle` props\n* Individual button behaviour per option via `buttonBehaviour` function\n* Validation state support\n\n```jsx\nimport { ButtonSelect } from "@baseline-ui/core";\nimport { EllipseIcon, RectangleIcon, PolygonIcon } from "@baseline-ui/icons/24";\n\nconst items = [\n { id: "ellipse", icon: EllipseIcon, label: "Ellipse" },\n { id: "square", icon: RectangleIcon, label: "Square" },\n { id: "polygon", icon: PolygonIcon, label: "Polygon" },\n];\n\n<ButtonSelect items={items} aria-label="Shape Options" />;\n```\n\nYou can hide the label in the button and just show the icon by setting the `hideLabel` prop to true.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" hideLabel />\n```\n\nBy default, ButtonSelect displays a tooltip on the dropdown trigger. When `hideLabel` is `true`, the main button also receives a tooltip showing the selected item\'s label. You can disable tooltips by setting `tooltipProps` with `isDisabled: true`.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n tooltipProps={{ isDisabled: true }}\n/>\n```\n\nYou can also pass `tooltipProps` as a function to customize tooltips per trigger:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n tooltipProps={(trigger) => ({\n text: trigger === "button" ? "Toggle shape" : "More shapes",\n })}\n/>\n```\n\nYou can set the default selected item in the dropdown by using the `defaultSelectedKey` prop.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n defaultSelectedKey="polygon"\n/>\n```\n\nYou can set the default button selection state using the `defaultSelected` prop.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" defaultSelected={true} />\n```\n\nYou can control the selected item by using the `selectedKey` prop. Use `isSelected` and `onButtonSelectionChange` to control the button toggle state.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n selectedKey={selectedKey}\n onSelectionChange={setSelectedKey}\n isSelected={isSelected}\n onButtonSelectionChange={({ isSelected }) => setIsSelected(isSelected)}\n/>\n```\n\nYou can disable the entire component using the `isDisabled` prop. Use `disabledKeys` to disable individual options in the dropdown.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" isDisabled />\n```\n\nYou can disable specific options in the dropdown using `disabledKeys`. If the currently selected item\'s key is in `disabledKeys`, the main button is also disabled.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n disabledKeys={["square"]}\n/>\n```\n\nBy default, the button uses a `"toggle"` behavior, which means it can be toggled on/off. You can change it to `"action"` behavior, which means it will trigger an action when pressed but won\'t toggle a state.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n buttonBehaviour="action"\n onPress={(e) => console.log("Button pressed", e)}\n/>\n```\n\nYou can also pass `buttonBehaviour` as a function to assign different behaviors per option:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n buttonBehaviour={(activeKey) =>\n activeKey === "ellipse" ? "action" : "toggle"\n }\n/>\n```\n\nButtonSelect provides several callbacks:\n\n* **`onPress`** \u2014 Called when the main button is pressed\n* **`onButtonAction`** \u2014 Called with `{ isSelected, selectedKey, buttonBehaviour }` when the button is pressed\n* **`onButtonSelectionChange`** \u2014 Called with `{ isSelected, selectedKey }` when toggle state changes\n* **`onSelectionChange`** \u2014 Called with the new key when a dropdown option is selected\n* **`onOptionPress`** \u2014 Called with `(pressEvent, key)` when any dropdown option is pressed\n\nUse `validationState` to indicate a validation state. Supported values are `"error"` and `"warning"`.\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n validationState="error"\n/>\n```\n\nButtonSelect comes in two sizes: `md` (default) and `lg`.\n\n```jsx\n<ButtonSelect items={items} aria-label="Shape Options" size="lg" />\n```\n\nUse `optionClassName`, `optionStyle`, `triggerClassName`, and `triggerStyle` to customize the appearance. These accept either static values or functions for dynamic styling:\n\n```jsx\n<ButtonSelect\n items={items}\n aria-label="Shape Options"\n optionClassName={(item, { isButton, isSelected }) =>\n isButton && isSelected ? "active-button" : ""\n }\n optionStyle={(item, { isButton }) => ({\n backgroundColor: isButton ? "lightblue" : undefined,\n })}\n triggerClassName="custom-trigger"\n/>\n```\n\n| Selector | Description |\n| ---------------------------------- | ----------------------------------------------------------- |\n| `.BaselineUI-ButtonSelect` | The root container element. |\n| `.BaselineUI-ButtonSelect-Button` | The main action/toggle button. |\n| `.BaselineUI-ButtonSelect-Trigger` | The dropdown trigger (caret) button. |\n| `.BaselineUI-ButtonSelect-Select` | The select/dropdown wrapper. |\n| `[data-hovered]` | Present when the component is hovered. |\n| `[data-selected]` | Present when the button is in the selected (toggled) state. |\n| `[data-disabled]` | Present when the component is disabled. |\n| `[data-expanded]` | Present when the dropdown is open. |\n| `[data-button-behaviour]` | The current button behaviour (`"toggle"` or `"action"`). |\n\n> **Note:** Boolean data attributes (`data-hovered`, `data-selected`, `data-disabled`, `data-expanded`) are only present in the DOM when `true`.\n\n| Key | Function |\n| ----------- | ------------------------------------------------------------------------ |\n| `Space` | Toggles the button if focused, or activates the selected dropdown option |\n| `Enter` | Toggles the button if focused, or activates the selected dropdown option |\n| `Tab` | Moves focus to the next focusable element |\n| `Shift+Tab` | Moves focus to the previous focusable element |\n| `ArrowDown` | Opens the dropdown if trigger is focused; navigates down within dropdown |\n| `ArrowUp` | Navigates up within the dropdown |\n| `Home` | Moves to the first option in the dropdown |\n| `End` | Moves to the last option in the dropdown |\n| `Escape` | Closes the dropdown if open |\n\n* **Select** \u2014 Use when you only need a dropdown without a primary action button.\n* **ToggleButton** \u2014 Use when you need a standalone toggle button without a dropdown.\n* **ActionButton** \u2014 Use when you need a standalone action button.\n* **ListBox** \u2014 The underlying list component used in the dropdown.',props:`interface ButtonSelectProps {
|
|
3101
3286
|
/**
|
|
3102
3287
|
* @deprecated Do not use in new components. This is a legacy block
|
|
3103
3288
|
* identifier; new components should exclude it via
|
|
@@ -3570,14 +3755,21 @@ export const UnavailableCalendarExample: React.FC<
|
|
|
3570
3755
|
export const InternationalCalendarExample: React.FC<
|
|
3571
3756
|
Omit<CalendarProps, "defaultValue" | "value"> & {
|
|
3572
3757
|
defaultValue?: string;
|
|
3758
|
+
/** Era of \`defaultValue\`, e.g. \`"BC"\`, which an ISO date string cannot express. */
|
|
3759
|
+
defaultValueEra?: string;
|
|
3573
3760
|
locale: string;
|
|
3574
3761
|
}
|
|
3575
|
-
> = ({ defaultValue, locale, ...rest }) => {
|
|
3762
|
+
> = ({ defaultValue, defaultValueEra, locale, ...rest }) => {
|
|
3763
|
+
const date = defaultValue ? parseDate(defaultValue) : undefined;
|
|
3576
3764
|
return (
|
|
3577
3765
|
<I18nProvider locale={locale}>
|
|
3578
3766
|
<Calendar
|
|
3579
3767
|
{...rest}
|
|
3580
|
-
defaultValue={
|
|
3768
|
+
defaultValue={
|
|
3769
|
+
date && defaultValueEra
|
|
3770
|
+
? new CalendarDate(defaultValueEra, date.year, date.month, date.day)
|
|
3771
|
+
: date
|
|
3772
|
+
}
|
|
3581
3773
|
/>
|
|
3582
3774
|
</I18nProvider>
|
|
3583
3775
|
);
|
|
@@ -4078,14 +4270,21 @@ export const UnavailableCalendarExample: React.FC<
|
|
|
4078
4270
|
export const InternationalCalendarExample: React.FC<
|
|
4079
4271
|
Omit<CalendarProps, "defaultValue" | "value"> & {
|
|
4080
4272
|
defaultValue?: string;
|
|
4273
|
+
/** Era of \`defaultValue\`, e.g. \`"BC"\`, which an ISO date string cannot express. */
|
|
4274
|
+
defaultValueEra?: string;
|
|
4081
4275
|
locale: string;
|
|
4082
4276
|
}
|
|
4083
|
-
> = ({ defaultValue, locale, ...rest }) => {
|
|
4277
|
+
> = ({ defaultValue, defaultValueEra, locale, ...rest }) => {
|
|
4278
|
+
const date = defaultValue ? parseDate(defaultValue) : undefined;
|
|
4084
4279
|
return (
|
|
4085
4280
|
<I18nProvider locale={locale}>
|
|
4086
4281
|
<Calendar
|
|
4087
4282
|
{...rest}
|
|
4088
|
-
defaultValue={
|
|
4283
|
+
defaultValue={
|
|
4284
|
+
date && defaultValueEra
|
|
4285
|
+
? new CalendarDate(defaultValueEra, date.year, date.month, date.day)
|
|
4286
|
+
: date
|
|
4287
|
+
}
|
|
4089
4288
|
/>
|
|
4090
4289
|
</I18nProvider>
|
|
4091
4290
|
);
|
|
@@ -7929,7 +8128,15 @@ export const DrawerWithActionExample: React.FC<{
|
|
|
7929
8128
|
Drawer Content
|
|
7930
8129
|
</Drawer>
|
|
7931
8130
|
);
|
|
7932
|
-
};`},similarTo:[],figmaUrl:null},Editor:{id:"core-miscellaneous-editor",breadcrumb:"Core/Miscellaneous/Editor",importStatement:'import { Editor, HeadlessCustomEditor } from "@baseline-ui/core";',description:"`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.",documentation:'`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.\n\n* supports rich text editing, including bold, italic and underline formatting.\n* supports font color and background color formatting\n* supports link creation, editing and removal\n* supports plain text editing\n* supports mouse, keyboard and touch interactions.\n* Exposed to the screen-readers and other assistive technologies using ARIA.\n* Mention support with user search and keyboard navigation\n* Keyboard shortcuts for common actions (submit, toolbar focus, help)\n* Imperative handle API (`editorHandle`) for programmatic focus and caret positioning\n* Custom footer buttons (action and toggle types)\n* Clear on save/cancel behavior\n* Auto-focus with configurable caret position\n\nYou can import the Editor component like so:\n\n```jsx\nimport { Editor } from "@baseline-ui/core";\n\nexport default function App() {\n return (\n <Editor\n aria-label="Comment"\n placeholder="Write a comment..."\n onSave={(value) => {\n console.log(value);\n }}\n />\n );\n}\n```\n\nIf you only need a single-line plain text input, use the `TextInput` component instead.\n\nThe `Editor` component has multiple variants that can be used to customize the appearance and behavior of the component.\n\n* `default` - the default variant\n* `minimal` - a minimal variant that removes the toolbar and only allows plain text editing.\n\n```jsx\n<Editor\n aria-label="Editor"\n variant="minimal"\n avatarName="John Doe"\n spellCheck={false}\n placeholder="Type something..."\n defaultValue="This is a minimal editor"\n/>\n```\n\nIn the example above, the `variant` prop is used to set the variant to `minimal`. This removes the toolbar and only allows plain text editing.\nThe first editor passes `isInline={false}`; the second one keeps the default inline rendering, which shows the avatar (set via `avatarName`) next to the input.\n\nYou can enable rich text editing by setting the `enableRichText` prop to `true`. This will enable the rich text toolbar and allow users to format the text. The default value is `false`.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="<p>This is a rich editor. It supports <b>bold</b>, <i>italic</i>, and <u>underline</u>. <a href=\'https://example.com\'>Links</a> are also supported.</p><br/><p>You can set both <span style=\'color: #ac0000; background-color: #ffffff;\'>font color</span> and <span style=\'background-color: #ffff00; color: #000000;\'>background color</span>.</p>"\n/>\n```\n\nYou can set a placeholder for the editor by using the `placeholder` prop. This will display a placeholder when the editor is empty.\n\nThe `Editor` component can be controlled by using the `value` and `onChange` props together. This allows you to control the value of the editor from the parent component, in both plain text and rich text mode.\n\nFor uncontrolled usage, set the initial content with `defaultValue` and read edits via `onChange` or `onSave` \u2014 the editor manages its own state afterwards.\n\nFor backwards compatibility, passing `value` without `onChange` in rich text mode sets the initial content only (it behaves like `defaultValue`), matching the behavior of earlier versions.\n\nThe same pattern works in rich text mode \u2014 controlled rich text requires both `value` and `onChange`:\n\n```jsx\nfunction ControlledRichTextEditor() {\n const [value, setValue] = React.useState(\n "<p>This is a <b>controlled</b> rich text editor</p>",\n );\n\n return (\n <Editor\n aria-label="Editor"\n enableRichText\n placeholder="Type something..."\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n }}\n />\n );\n}\n```\n\nThe `Editor` component can be disabled by using the `isDisabled` prop. This will disable the editor and prevent users from editing the content.\n\nThe `Editor` component supports mentions. You can enable mentions by passing the `mentionableUsers` prop, an array of `MentionableUser` objects with required `id`, `name`, and `displayName` properties, plus optional `avatar` and `description`. The `id` should be unique for each user, `name` is the username matched while typing, and `displayName` is the label rendered for the mention.\nThe mentions feature only works when `enableRichText` is set to `true`. Users can start a mention by typing `@` in the editor or by pressing the mention (@) button in the footer.\nPasted or dropped mentions are checked against `mentionableUsers`: a mention of a listed user takes that user\'s label, and any other mention, including every mention while `mentionableUsers` is undefined, becomes plain `@Name` text. This also applies when users cut and paste or drag a mention within the editor.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="Mentioning <span data-user-id=\'john-doe\'>John Doe</span>."\n mentionableUsers={[\n {\n id: "1",\n name: "john.doe",\n displayName: "John Doe",\n description: "john@gmail.com",\n },\n {\n id: "2",\n name: "jane.doe",\n displayName: "Jane Doe",\n description: "jane@gmail.com",\n },\n ]}\n/>\n```\n\nYou can add custom buttons to the footer by using the `footerButtons` prop. This prop is an array of objects of the shape `{ type: "action" | "toggle", props: {...} }`, where `props` accepts the `ActionIconButton` props (for `type: "action"`) or the `ToggleIconButton` props (for `type: "toggle"`), except `size` and `variant`, which are set by the editor.\n\n```jsx\nimport { AnonymousIcon } from "@baseline-ui/icons/16";\n\n<Editor\n aria-label="Editor"\n enableRichText\n footerButtons={[\n {\n type: "toggle",\n props: {\n "aria-label": "Save",\n icon: AnonymousIcon,\n onPress: () => {\n alert("Save");\n },\n },\n },\n ]}\n/>;\n```\n\n| Key | Function |\n| ------------------------------ | -------------------------------------------------------- |\n| `Ctrl+B` / `Cmd+B` | Toggle bold (rich text mode) |\n| `Ctrl+I` / `Cmd+I` | Toggle italic (rich text mode) |\n| `Ctrl+U` / `Cmd+U` | Toggle underline (rich text mode) |\n| `Ctrl+Z` / `Cmd+Z` | Undo (rich text mode) |\n| `Ctrl+Shift+Z` / `Cmd+Shift+Z` | Redo (rich text mode) |\n| `Ctrl+Y` | Redo (rich text mode) |\n| `@` | Start a mention (rich text mode with `mentionableUsers`) |\n| `Alt+F10` | Focus toolbar (rich text mode) |\n| `Ctrl+Enter` / `Cmd+Enter` | Submit (always) |\n| `Enter` | Submit (when `saveOnEnter` is true) |\n| `Shift+Enter` | New line |\n| `Ctrl+Shift+H` / `Cmd+Shift+H` | Open help dialog (rich text mode) |\n| `Escape` | Close mention input / help dialog |\n| `Tab` | Focus next |\n| `Shift+Tab` | Focus previous |\n\nWhen `saveOnEnter` is set to `true`, pressing the `Enter` key will submit the editor instead of creating a new line. This is useful for single-line text inputs or quick note-taking scenarios.\n\nThe `clearOnSave` and `clearOnCancel` props clear the editor content after the respective action completes. These are useful for resetting the editor after submission or cancellation.\n\nThe `autoFocus` prop allows you to focus the editor on mount with optional caret positioning:\n\n* `true` - Focus on mount, caret at default position\n* `"start"` - Focus on mount, caret at position 0\n* `"end"` - Focus on mount, caret at end of text\n\nThe `editorHandle` ref provides imperative methods for programmatic control:\n\n* `focus()` - Focus the editor\n* `setCaretPosition(index)` - Position the caret at a specific index\n\nThe `isSaveDisabled` prop disables only the save button while keeping the editor content functional. This is different from `isDisabled`, which disables both the editor and buttons.\n\nThe `maxMentionableUsersSuggestions` prop controls how many mention suggestions are displayed when the user types `@`. This is useful for large user lists where you want to limit the visible suggestions.\n\nThe `spellCheck` prop enables or disables browser spell checking in the editor.\n\nIn rich text mode, the editor includes a built-in help dialog that lists all available keyboard shortcuts (formatting, clipboard, undo/redo, submit). It opens as a modal overlay when the user presses `Ctrl+Shift+H` / `Cmd+Shift+H` while the editor has focus, and closes with `Escape` or the close button.\n\nUse the headless editor APIs when you need the rich-text engine without the default `Editor` chrome. This is useful for custom toolbars, inline editors embedded in other components, or experiences that need to render their own controls while reusing Baseline UI\'s rich-text model, keyboard shortcuts, selection handling, undo/redo, and HTML serialization.\n\n```jsx\nimport {\n EditorProvider,\n useEditable,\n useEditor,\n useEditorContext,\n} from "@baseline-ui/core";\n\nfunction FormattingToolbar() {\n const editor = useEditorContext();\n\n return (\n <button\n aria-pressed={editor.isMarkActive("bold")}\n onClick={() => editor.toggleMark("bold")}\n type="button"\n >\n Bold\n </button>\n );\n}\n\nfunction CustomRichTextEditor() {\n const editor = useEditor({\n defaultValue: "<p>Hello <b>world</b></p>",\n onChange: (html) => {\n console.log(html);\n },\n });\n const { editableProps } = useEditable(editor);\n\n return (\n <EditorProvider editor={editor}>\n <FormattingToolbar />\n <div {...editableProps} style={{ whiteSpace: "pre-wrap" }} />\n </EditorProvider>\n );\n}\n```\n\nThe headless API is split into these parts:\n\n| API | Purpose |\n| ------------------ | ------------------------------------------------------------------------ |\n| `useEditor` | Creates one rich-text editor instance and returns the `EditorState` API. |\n| `useEditable` | Attaches an `EditorState` to a `contenteditable` element. |\n| `EditorProvider` | Provides an editor instance to nested toolbar controls. |\n| `useEditorContext` | Reads the nearest provided editor instance. |\n| `EditorCore` | Framework-free engine escape hatch for advanced integrations. |\n\n`EditorState` exposes reactive state (`value`, `isEmpty`, `selectionState`, `canUndo`, `canRedo`, `isDisabled`) and imperative methods (`focus`, `setValue`, `getValue`, `undo`, `redo`, `exec`, `toggleMark`, `setMark`). For custom keyboard behavior, pass `onKeyDown` to `useEditable`; return `true` when you handled the event to skip the built-in shortcuts.\n\nStyle the editable element with `white-space: pre-wrap` (the built-in `Editor` does this internally). This preserves significant whitespace \u2014 leading, trailing, and consecutive spaces \u2014 which would otherwise collapse when the editor re-renders from its model, making a trailing space appear not to be inserted.\n\n| Selector | Description |\n| ------------------------------------------- | ----------------------------------------- |\n| `.BaselineUI-Editor` | Root container element |\n| `.BaselineUI-Editor-Save` | Save/submit button |\n| `.BaselineUI-Editor-Cancel` | Cancel button |\n| `.BaselineUI-Editor-Footer` | Footer toolbar containing action buttons |\n| `.BaselineUI-Editor-Mention` | Mention (@) button in footer |\n| `.BaselineUI-Editor-RichEditorToolbar` | Rich text formatting toolbar |\n| `.BaselineUI-Editor-RichEditorEditingArea` | Rich text contenteditable area |\n| `.BaselineUI-Editor-RichEditorPlaceholder` | Rich text empty-state placeholder overlay |\n| `.BaselineUI-Editor-PlainEditorEditingArea` | Plain text textarea element |\n\n`@baseline-ui/test-utils` ships a Playwright tester for the Editor so component and E2E specs don\'t have to relearn its markup. Build one from a frame and use its locators instead of hand-rolled selectors or translated labels:\n\n```ts\nimport { testers } from "@baseline-ui/test-utils";\n\nconst editor = testers(frame).editor();\n\nawait editor.textbox.fill("Hello");\nawait editor.boldButton.click();\nawait editor.openLinkDialog();\nawait editor.linkInput.fill("https://example.com");\nawait editor.linkAddButton.click();\nawait editor.startMention();\nawait editor.mentionOption("John Doe").click();\n```\n\nThe tester works in both modes \u2014 `textbox` resolves to the rich text contenteditable or the plain-mode `<textarea>` (both expose `role="textbox"`), and the rich-text-only surface (toolbar, link dialog, mention dropdown, help dialog) simply won\'t match when `enableRichText` is off. Pass a `root` locator when more than one Editor is mounted in the same frame:\n\n```ts\nconst editor = testers(frame).editor({\n root: frame.locator(".BaselineUI-Editor").first(),\n});\n```\n\nLocators are backed by stable `data-testid`s on the component (e.g. `editor-bold-button`, `editor-link-input`, `editor-help-dialog-close-button`) rather than accessible names, so they stay reliable across translations. The disclosure helpers (`openFontColorPicker`, `openBackgroundColorPicker`, `openLinkDialog`, `openHelpDialog`, `startMention`) are idempotent and no-op when the target surface is already open.',props:`interface EditorProps {
|
|
8131
|
+
};`},similarTo:[],figmaUrl:null},Editor:{id:"core-miscellaneous-editor",breadcrumb:"Core/Miscellaneous/Editor",importStatement:`import {
|
|
8132
|
+
Editor,
|
|
8133
|
+
HeadlessClipboardHooksDemo,
|
|
8134
|
+
HeadlessCustomEditor,
|
|
8135
|
+
HeadlessDocumentModelDemo,
|
|
8136
|
+
HeadlessHtmlStylesDemo,
|
|
8137
|
+
HeadlessMaxLengthDemo,
|
|
8138
|
+
HeadlessParagraphsDemo,
|
|
8139
|
+
} from "@baseline-ui/core";`,description:"`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.",documentation:'`Editor` is a text input area that supports either plain text or rich text with formatting, links, and @-mentions. Use it for comments, notes, descriptions, or any free-form content where users need more than a single-line input.\n\n* supports rich text editing, including bold, italic and underline formatting.\n* supports font color and background color formatting\n* supports link creation, editing and removal\n* supports plain text editing\n* supports mouse, keyboard and touch interactions.\n* Exposed to the screen-readers and other assistive technologies using ARIA.\n* Mention support with user search and keyboard navigation\n* Keyboard shortcuts for common actions (submit, toolbar focus, help)\n* Imperative handle API (`editorHandle`) for programmatic focus and caret positioning\n* Custom footer buttons (action and toggle types)\n* Clear on save/cancel behavior\n* Auto-focus with configurable caret position\n\nYou can import the Editor component like so:\n\n```jsx\nimport { Editor } from "@baseline-ui/core";\n\nexport default function App() {\n return (\n <Editor\n aria-label="Comment"\n placeholder="Write a comment..."\n onSave={(value) => {\n console.log(value);\n }}\n />\n );\n}\n```\n\nIf you only need a single-line plain text input, use the `TextInput` component instead.\n\nThe `Editor` component has multiple variants that can be used to customize the appearance and behavior of the component.\n\n* `default` - the default variant\n* `minimal` - a minimal variant that removes the toolbar and only allows plain text editing.\n\n```jsx\n<Editor\n aria-label="Editor"\n variant="minimal"\n avatarName="John Doe"\n spellCheck={false}\n placeholder="Type something..."\n defaultValue="This is a minimal editor"\n/>\n```\n\nIn the example above, the `variant` prop is used to set the variant to `minimal`. This removes the toolbar and only allows plain text editing.\nThe first editor passes `isInline={false}`; the second one keeps the default inline rendering, which shows the avatar (set via `avatarName`) next to the input.\n\nYou can enable rich text editing by setting the `enableRichText` prop to `true`. This will enable the rich text toolbar and allow users to format the text. The default value is `false`.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="<p>This is a rich editor. It supports <b>bold</b>, <i>italic</i>, and <u>underline</u>. <a href=\'https://example.com\'>Links</a> are also supported.</p><br/><p>You can set both <span style=\'color: #ac0000; background-color: #ffffff;\'>font color</span> and <span style=\'background-color: #ffff00; color: #000000;\'>background color</span>.</p>"\n/>\n```\n\nYou can set a placeholder for the editor by using the `placeholder` prop. This will display a placeholder when the editor is empty.\n\nThe `Editor` component can be controlled by using the `value` and `onChange` props together. This allows you to control the value of the editor from the parent component, in both plain text and rich text mode.\n\nFor uncontrolled usage, set the initial content with `defaultValue` and read edits via `onChange` or `onSave` \u2014 the editor manages its own state afterwards.\n\nFor backwards compatibility, passing `value` without `onChange` in rich text mode sets the initial content only (it behaves like `defaultValue`), matching the behavior of earlier versions.\n\nThe same pattern works in rich text mode \u2014 controlled rich text requires both `value` and `onChange`:\n\n```jsx\nfunction ControlledRichTextEditor() {\n const [value, setValue] = React.useState(\n "<p>This is a <b>controlled</b> rich text editor</p>",\n );\n\n return (\n <Editor\n aria-label="Editor"\n enableRichText\n placeholder="Type something..."\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n }}\n />\n );\n}\n```\n\nThe `Editor` component can be disabled by using the `isDisabled` prop. This will disable the editor and prevent users from editing the content.\n\nThe `Editor` component supports mentions. You can enable mentions by passing the `mentionableUsers` prop, an array of `MentionableUser` objects with required `id`, `name`, and `displayName` properties, plus optional `avatar` and `description`. The `id` should be unique for each user, `name` is the username matched while typing, and `displayName` is the label rendered for the mention.\nThe mentions feature only works when `enableRichText` is set to `true`. Users can start a mention by typing `@` in the editor or by pressing the mention (@) button in the footer.\nPasted or dropped mentions are checked against `mentionableUsers`: a mention of a listed user takes that user\'s label, and any other mention, including every mention while `mentionableUsers` is undefined, becomes plain `@Name` text. This also applies when users cut and paste or drag a mention within the editor.\n\n```jsx\n<Editor\n aria-label="Editor"\n placeholder="Placeholder"\n enableRichText\n defaultValue="Mentioning <span data-user-id=\'john-doe\'>John Doe</span>."\n mentionableUsers={[\n {\n id: "1",\n name: "john.doe",\n displayName: "John Doe",\n description: "john@gmail.com",\n },\n {\n id: "2",\n name: "jane.doe",\n displayName: "Jane Doe",\n description: "jane@gmail.com",\n },\n ]}\n/>\n```\n\nYou can add custom buttons to the footer by using the `footerButtons` prop. This prop is an array of objects of the shape `{ type: "action" | "toggle", props: {...} }`, where `props` accepts the `ActionIconButton` props (for `type: "action"`) or the `ToggleIconButton` props (for `type: "toggle"`), except `size` and `variant`, which are set by the editor.\n\n```jsx\nimport { AnonymousIcon } from "@baseline-ui/icons/16";\n\n<Editor\n aria-label="Editor"\n enableRichText\n footerButtons={[\n {\n type: "toggle",\n props: {\n "aria-label": "Save",\n icon: AnonymousIcon,\n onPress: () => {\n alert("Save");\n },\n },\n },\n ]}\n/>;\n```\n\n| Key | Function |\n| ------------------------------ | -------------------------------------------------------- |\n| `Ctrl+B` / `Cmd+B` | Toggle bold (rich text mode) |\n| `Ctrl+I` / `Cmd+I` | Toggle italic (rich text mode) |\n| `Ctrl+U` / `Cmd+U` | Toggle underline (rich text mode) |\n| `Ctrl+Z` / `Cmd+Z` | Undo (rich text mode) |\n| `Ctrl+Shift+Z` / `Cmd+Shift+Z` | Redo (rich text mode) |\n| `Ctrl+Y` | Redo (rich text mode) |\n| `@` | Start a mention (rich text mode with `mentionableUsers`) |\n| `Alt+F10` | Focus toolbar (rich text mode) |\n| `Ctrl+Enter` / `Cmd+Enter` | Submit (always) |\n| `Enter` | Submit (when `saveOnEnter` is true) |\n| `Shift+Enter` | New line |\n| `Ctrl+Shift+H` / `Cmd+Shift+H` | Open help dialog (rich text mode) |\n| `Escape` | Close mention input / help dialog |\n| `Tab` | Focus next |\n| `Shift+Tab` | Focus previous |\n\nWhen `saveOnEnter` is set to `true`, pressing the `Enter` key will submit the editor instead of creating a new line. This is useful for single-line text inputs or quick note-taking scenarios.\n\nThe `clearOnSave` and `clearOnCancel` props clear the editor content after the respective action completes. These are useful for resetting the editor after submission or cancellation.\n\nThe `autoFocus` prop allows you to focus the editor on mount with optional caret positioning:\n\n* `true` - Focus on mount, caret at default position\n* `"start"` - Focus on mount, caret at position 0\n* `"end"` - Focus on mount, caret at end of text\n\nThe `editorHandle` ref provides imperative methods for programmatic control:\n\n* `focus()` - Focus the editor\n* `setCaretPosition(index)` - Position the caret at a specific index\n\nThe `isSaveDisabled` prop disables only the save button while keeping the editor content functional. This is different from `isDisabled`, which disables both the editor and buttons.\n\nThe `maxMentionableUsersSuggestions` prop controls how many mention suggestions are displayed when the user types `@`. This is useful for large user lists where you want to limit the visible suggestions.\n\nThe `spellCheck` prop enables or disables browser spell checking in the editor.\n\nIn rich text mode, the editor includes a built-in help dialog that lists all available keyboard shortcuts (formatting, clipboard, undo/redo, submit). It opens as a modal overlay when the user presses `Ctrl+Shift+H` / `Cmd+Shift+H` while the editor has focus, and closes with `Escape` or the close button.\n\nUse the headless editor APIs when you need the rich-text engine without the default `Editor` chrome. This is useful for custom toolbars, inline editors embedded in other components, or experiences that need to render their own controls while reusing Baseline UI\'s rich-text model, keyboard shortcuts, selection handling, undo/redo, and HTML serialization.\n\n```jsx\nimport {\n EditorProvider,\n useEditable,\n useEditor,\n useEditorContext,\n} from "@baseline-ui/core";\n\nfunction FormattingToolbar() {\n const editor = useEditorContext();\n\n return (\n <button\n aria-pressed={editor.isMarkActive("bold")}\n onClick={() => editor.toggleMark("bold")}\n type="button"\n >\n Bold\n </button>\n );\n}\n\nfunction CustomRichTextEditor() {\n const editor = useEditor({\n defaultValue: "<p>Hello <b>world</b></p>",\n onChange: (html) => {\n console.log(html);\n },\n });\n const { editableProps } = useEditable(editor);\n\n return (\n <EditorProvider editor={editor}>\n <FormattingToolbar />\n <div {...editableProps} style={{ whiteSpace: "pre-wrap" }} />\n </EditorProvider>\n );\n}\n```\n\nThe headless API is split into these parts:\n\n| API | Purpose |\n| ------------------ | ------------------------------------------------------------------------ |\n| `useEditor` | Creates one rich-text editor instance and returns the `EditorState` API. |\n| `useEditable` | Attaches an `EditorState` to a `contenteditable` element. |\n| `EditorProvider` | Provides an editor instance to nested toolbar controls. |\n| `useEditorContext` | Reads the nearest provided editor instance. |\n| `EditorCore` | Framework-free engine escape hatch for advanced integrations. |\n\n`EditorState` exposes reactive state (`value`, `isEmpty`, `selectionState`, `canUndo`, `canRedo`, `isDisabled`) and imperative methods (`focus`, `setValue`, `getValue`, `undo`, `redo`, `exec`, `toggleMark`, `setMark`). For custom keyboard behavior, pass `onKeyDown` to `useEditable`; return `true` when you handled the event to skip the built-in shortcuts.\n\nIn `selectionState.marks`, `bold`, `italic` and `underline` are `true` when every selected text run has the mark, `false` when none does, and absent when the selection mixes both. At a collapsed caret, and when there is no selection, they are always `true` or `false`, including a mark toggled for the next typed text. `color`, `backgroundColor`, `fontFamily` and `fontSize` hold the value every selected run shares, are absent when no run sets one, and are `null` when the runs differ.\n\n`select(range)` selects a `ModelRange`, and `getSelectionState()` returns the selection state computed at that moment. Unlike the reactive `selectionState`, which updates on the next render, it reflects a selection made in the same tick. `select` also calls `onSelectionChange` when the selection differs from the current one.\n\n`getDocPlainText(doc)` returns a document as plain text, and `docStart(doc)`, `docEnd(doc)` and `comparePoints(a, b)` build and order the points `select` takes.\n\n`EditorState` also exposes the document model directly. `getDoc(range?)` returns the whole document, or a copy of the selected fragment when given a range. `setDoc(doc)` replaces the document and clears undo history; it does nothing when given the current document or one with the same content, and emits `onChange`/`onDocChange` only with `{ emit: true }`. `selectAll()` selects the full document.\n\n`useEditor` accepts `doc` and `defaultDoc` as an alternative to `value` and `defaultValue`, and `onDocChange` receives the document after every change alongside `onChange`. Pass either the document form or the HTML form: `useEditor` throws when a document form is combined with `value` or `defaultValue`, or when `doc` and `defaultDoc` are both given.\n\n`setMark` accepts `color`, `backgroundColor`, `fontFamily` and `fontSize`. Text nodes carry `fontFamily` and `fontSize`, and paragraphs carry `textAlign`. All three are opaque strings: the editor stores, renders and serializes them as given (`font-family`, `font-size` and `text-align` styles) and does not validate or convert units. A value the browser cannot parse is dropped from the rendered style, so the first native edit anywhere in the editor drops it from the document too. With a collapsed selection, `setMark` applies to the next typed text. A soft line break continues the formatting you were writing in: the marks active at the caret, replaced by any pending marks set or cleared with `setMark` or `toggleMark`, so the text typed after the break keeps them.\n\n`htmlStyles` lists the CSS properties the editor keeps when it parses `value`, `defaultValue` and `setValue` HTML. It defaults to `["color", "backgroundColor"]`, so `fontFamily`, `fontSize` and paragraph `textAlign` in that HTML survive only when you list them. Everything the editor renders itself is unaffected: a `doc` or `defaultDoc`, marks set with `setMark`, anything inserted through `exec` and text typed or edited natively keep every style the document carries. Pasted and dropped HTML always keeps only `color` and `backgroundColor`: HTML copied from other apps carries their fonts and sizes, which would override your own typography. Return a document from `onPaste` to keep more.\n\nEnter inserts a soft line break by default. Pass `enterInsertsParagraph` to `useEditor` and Enter splits the paragraph at the caret instead, keeping the paragraph\'s `textAlign` on both halves and carrying the marks at the caret into the new paragraph; Shift+Enter still inserts a soft break. `exec("insertParagraph")` does the same from code: it deletes the selection, splits the paragraph in one undo step and counts the paragraph break towards `maxLength`.\n\n`exec("insertText", text)` applies the pending marks at the caret to the inserted text, as typing does, and then clears them. When an edit leaves the document empty, such as deleting a selection that covers everything or selecting all and pressing Backspace, the formatting of the first deleted character stays pending, so the next text typed or inserted keeps it and `selectionState.marks` reports it.\n\n`onPaste(event)` runs before the default paste handling. Return a document to insert it as a fragment at the selection, `null` to swallow the paste, or `undefined` to fall through to the default behavior. Pasted HTML always drops its font family, font size and text alignment, so return a document from `onPaste` to keep them. A returned document, like any fragment inserted with `exec("insertFragment")`, merges into the paragraph at the caret, so its first and last paragraphs take that paragraph\'s `textAlign`. Drops do not go through `onPaste`. If `onPaste` throws, the paste is swallowed and the error is rethrown asynchronously.\n\n`onCopy(event, fragment)` receives the selected fragment as a document. It runs for copy and cut, including when the selection starts on a mention. With a collapsed selection `fragment` is an empty document, so you can copy the whole document with `getDoc()` instead; cut then deletes nothing. Return `true` once you have written the clipboard yourself, which prevents the default copy. For cut, the selected content is then deleted unless the editor is read-only.\n\n`maxLength` caps the document length and must be a finite integer of at least 0; anything else throws. A mention that would exceed it is not inserted. A paragraph break counts as one character. Typed and pasted text is cut at the insertion point, soft breaks and paragraph splits are refused at the limit, and IME input that overflows is cut just before the caret. A selection that is being replaced frees up its own capacity, and a document that is already over the limit is kept but cannot grow.\n\nStyle the editable element with `white-space: pre-wrap` (the built-in `Editor` does this internally). This preserves significant whitespace \u2014 leading, trailing, and consecutive spaces \u2014 which would otherwise collapse when the editor re-renders from its model, making a trailing space appear not to be inserted.\n\n| Selector | Description |\n| ------------------------------------------- | ----------------------------------------- |\n| `.BaselineUI-Editor` | Root container element |\n| `.BaselineUI-Editor-Save` | Save/submit button |\n| `.BaselineUI-Editor-Cancel` | Cancel button |\n| `.BaselineUI-Editor-Footer` | Footer toolbar containing action buttons |\n| `.BaselineUI-Editor-Mention` | Mention (@) button in footer |\n| `.BaselineUI-Editor-RichEditorToolbar` | Rich text formatting toolbar |\n| `.BaselineUI-Editor-RichEditorEditingArea` | Rich text contenteditable area |\n| `.BaselineUI-Editor-RichEditorPlaceholder` | Rich text empty-state placeholder overlay |\n| `.BaselineUI-Editor-PlainEditorEditingArea` | Plain text textarea element |\n\nThe rich text content carries stable data attributes, so you can style or query it without relying on its element structure. Every text run renders in its own `span`, including runs without any formatting, and an empty line renders a `span` too, so each line has a box you can measure.\n\n| Selector | Marks |\n| ------------------------------------ | ----------------------------------------------------------------- |\n| `[data-editor-root]` | The editable element |\n| `[data-editor-node="paragraph"]` | A paragraph |\n| `[data-editor-node="text"]` | A run of text; bold, italic and underline wrap the text inside it |\n| `[data-editor-node="break"]` | A soft line break |\n| `[data-editor-node="link"]` | A link |\n| `[data-editor-node="mention"]` | A mention |\n| `[data-editor-node="mention-input"]` | The mention being typed |\n\nAn extra `<br data-editor-filler="true">` keeps an empty line, or the line after a trailing break, reachable by the caret. It is not part of the document.\n\n`@baseline-ui/test-utils` ships a Playwright tester for the Editor so component and E2E specs don\'t have to relearn its markup. Build one from a frame and use its locators instead of hand-rolled selectors or translated labels:\n\n```ts\nimport { testers } from "@baseline-ui/test-utils";\n\nconst editor = testers(frame).editor();\n\nawait editor.textbox.fill("Hello");\nawait editor.boldButton.click();\nawait editor.openLinkDialog();\nawait editor.linkInput.fill("https://example.com");\nawait editor.linkAddButton.click();\nawait editor.startMention();\nawait editor.mentionOption("John Doe").click();\n```\n\nThe tester works in both modes \u2014 `textbox` resolves to the rich text contenteditable or the plain-mode `<textarea>` (both expose `role="textbox"`), and the rich-text-only surface (toolbar, link dialog, mention dropdown, help dialog) simply won\'t match when `enableRichText` is off. Pass a `root` locator when more than one Editor is mounted in the same frame:\n\n```ts\nconst editor = testers(frame).editor({\n root: frame.locator(".BaselineUI-Editor").first(),\n});\n```\n\nLocators are backed by stable `data-testid`s on the component (e.g. `editor-bold-button`, `editor-link-input`, `editor-help-dialog-close-button`) rather than accessible names, so they stay reliable across translations. The disclosure helpers (`openFontColorPicker`, `openBackgroundColorPicker`, `openLinkDialog`, `openHelpDialog`, `startMention`) are idempotent and no-op when the target surface is already open.',props:`interface EditorProps {
|
|
7933
8140
|
/**
|
|
7934
8141
|
* @deprecated Do not use in new components. This is a legacy block
|
|
7935
8142
|
* identifier; new components should exclude it via
|
|
@@ -8316,7 +8523,7 @@ linkCancelLabel?: string
|
|
|
8316
8523
|
* Message id: \`bui.editor.save\`. Defaults to \`"Save"\`.
|
|
8317
8524
|
*/
|
|
8318
8525
|
linkSaveLabel?: string
|
|
8319
|
-
}`,stories:{usage:[{id:"core-miscellaneous-editor--basic",name:"Basic",snippet:'const Basic = () => <Editor placeholder="Placeholder" aria-label="Editor" />;'},{id:"core-miscellaneous-editor--headless-custom",name:"Headless Custom Editor",snippet:"const HeadlessCustom = () => <HeadlessCustomEditor />;"},{id:"core-miscellaneous-editor-plain--controlled",name:"Controlled",snippet:`const Controlled = () => {
|
|
8526
|
+
}`,stories:{usage:[{id:"core-miscellaneous-editor--basic",name:"Basic",snippet:'const Basic = () => <Editor placeholder="Placeholder" aria-label="Editor" />;'},{id:"core-miscellaneous-editor--headless-custom",name:"Headless Custom Editor",snippet:"const HeadlessCustom = () => <HeadlessCustomEditor />;"},{id:"core-miscellaneous-editor--headless-document-model",name:"Headless Document Model",snippet:"const HeadlessDocumentModel = () => <HeadlessDocumentModelDemo />;"},{id:"core-miscellaneous-editor--headless-paragraphs",name:"Headless Paragraphs",snippet:"const HeadlessParagraphs = () => <HeadlessParagraphsDemo />;"},{id:"core-miscellaneous-editor--headless-clipboard-hooks",name:"Headless Clipboard Hooks",snippet:"const HeadlessClipboardHooks = () => <HeadlessClipboardHooksDemo />;"},{id:"core-miscellaneous-editor--headless-max-length",name:"Headless Max Length",snippet:"const HeadlessMaxLength = () => <HeadlessMaxLengthDemo />;"},{id:"core-miscellaneous-editor--headless-styles",name:"Headless Styles",snippet:"const HeadlessStyles = () => <HeadlessHtmlStylesDemo />;"},{id:"core-miscellaneous-editor-plain--controlled",name:"Controlled",snippet:`const Controlled = () => {
|
|
8320
8527
|
const [value, setValue] = React.useState(args.value);
|
|
8321
8528
|
|
|
8322
8529
|
return (
|
|
@@ -8545,6 +8752,7 @@ import { ToggleIconButton } from "../../ToggleIconButton";
|
|
|
8545
8752
|
import { Editor } from "../Editor";
|
|
8546
8753
|
import {
|
|
8547
8754
|
EditorProvider,
|
|
8755
|
+
getDocPlainText,
|
|
8548
8756
|
useEditable,
|
|
8549
8757
|
useEditor,
|
|
8550
8758
|
useEditorContext,
|
|
@@ -8559,6 +8767,7 @@ import type {
|
|
|
8559
8767
|
EditorProps,
|
|
8560
8768
|
MentionableUser,
|
|
8561
8769
|
} from "../Editor.types";
|
|
8770
|
+
import type { RichTextEditorDoc, UseEditorOptions } from "../headless";
|
|
8562
8771
|
|
|
8563
8772
|
export const EditorWithSetCaretButton = ({
|
|
8564
8773
|
caretIndex,
|
|
@@ -8734,6 +8943,45 @@ const HeadlessMarkButtons: React.FC<{ idPrefix: string }> = ({ idPrefix }) => {
|
|
|
8734
8943
|
);
|
|
8735
8944
|
};
|
|
8736
8945
|
|
|
8946
|
+
const HeadlessFontSizeButton: React.FC<{ idPrefix: string }> = ({
|
|
8947
|
+
idPrefix,
|
|
8948
|
+
}) => {
|
|
8949
|
+
const editor = useEditorContext();
|
|
8950
|
+
|
|
8951
|
+
return (
|
|
8952
|
+
<ActionButton
|
|
8953
|
+
size="sm"
|
|
8954
|
+
variant="secondary"
|
|
8955
|
+
label="24pt"
|
|
8956
|
+
data-testid={\`\${idPrefix}-fontSize\`}
|
|
8957
|
+
preventFocusOnPress={true}
|
|
8958
|
+
onPress={() => {
|
|
8959
|
+
editor.setMark("fontSize", "24pt");
|
|
8960
|
+
editor.focus();
|
|
8961
|
+
}}
|
|
8962
|
+
/>
|
|
8963
|
+
);
|
|
8964
|
+
};
|
|
8965
|
+
|
|
8966
|
+
const HeadlessSelectAllButton: React.FC<{ idPrefix: string }> = ({
|
|
8967
|
+
idPrefix,
|
|
8968
|
+
}) => {
|
|
8969
|
+
const editor = useEditorContext();
|
|
8970
|
+
|
|
8971
|
+
return (
|
|
8972
|
+
<ActionButton
|
|
8973
|
+
size="sm"
|
|
8974
|
+
variant="secondary"
|
|
8975
|
+
label="Select all"
|
|
8976
|
+
data-testid={\`\${idPrefix}-selectAll\`}
|
|
8977
|
+
preventFocusOnPress={true}
|
|
8978
|
+
onPress={() => {
|
|
8979
|
+
editor.selectAll();
|
|
8980
|
+
}}
|
|
8981
|
+
/>
|
|
8982
|
+
);
|
|
8983
|
+
};
|
|
8984
|
+
|
|
8737
8985
|
const HEADLESS_TEXT_COLOR_PRESETS: ColorPreset[] = [
|
|
8738
8986
|
{ label: "Crimson", color: HEADLESS_TEXT_COLOR },
|
|
8739
8987
|
{ label: "Ink", color: "#1a1a2e" },
|
|
@@ -8792,12 +9040,35 @@ const HeadlessColorInput: React.FC<{
|
|
|
8792
9040
|
);
|
|
8793
9041
|
};
|
|
8794
9042
|
|
|
8795
|
-
|
|
9043
|
+
type HeadlessEditorKnobs = Pick<
|
|
9044
|
+
UseEditorOptions,
|
|
9045
|
+
| "htmlStyles"
|
|
9046
|
+
| "maxLength"
|
|
9047
|
+
| "defaultDoc"
|
|
9048
|
+
| "onDocChange"
|
|
9049
|
+
| "onPaste"
|
|
9050
|
+
| "onCopy"
|
|
9051
|
+
| "enterInsertsParagraph"
|
|
9052
|
+
> & { showDocumentControls?: boolean };
|
|
9053
|
+
|
|
9054
|
+
const HeadlessCustomEditorInstance: React.FC<
|
|
9055
|
+
HeadlessEditorKnobs & {
|
|
8796
9056
|
idPrefix: string;
|
|
8797
9057
|
label: string;
|
|
8798
9058
|
defaultValue?: string;
|
|
8799
|
-
|
|
8800
|
-
|
|
9059
|
+
}
|
|
9060
|
+
> = ({
|
|
9061
|
+
idPrefix,
|
|
9062
|
+
label,
|
|
9063
|
+
defaultValue,
|
|
9064
|
+
showDocumentControls,
|
|
9065
|
+
...editorOptions
|
|
9066
|
+
}) => {
|
|
9067
|
+
const editor = useEditor(
|
|
9068
|
+
editorOptions.defaultDoc
|
|
9069
|
+
? editorOptions
|
|
9070
|
+
: { defaultValue, ...editorOptions },
|
|
9071
|
+
);
|
|
8801
9072
|
const { editableProps } = useEditable(editor);
|
|
8802
9073
|
|
|
8803
9074
|
return (
|
|
@@ -8816,6 +9087,12 @@ const HeadlessCustomEditorInstance: React.FC<{
|
|
|
8816
9087
|
</Text>
|
|
8817
9088
|
<Box display="flex" gap="xs" alignItems="center">
|
|
8818
9089
|
<HeadlessMarkButtons idPrefix={idPrefix} />
|
|
9090
|
+
{showDocumentControls ? (
|
|
9091
|
+
<>
|
|
9092
|
+
<HeadlessFontSizeButton idPrefix={idPrefix} />
|
|
9093
|
+
<HeadlessSelectAllButton idPrefix={idPrefix} />
|
|
9094
|
+
</>
|
|
9095
|
+
) : null}
|
|
8819
9096
|
<HeadlessColorInput
|
|
8820
9097
|
idPrefix={idPrefix}
|
|
8821
9098
|
colorKey="color"
|
|
@@ -8850,15 +9127,17 @@ const HeadlessCustomEditorInstance: React.FC<{
|
|
|
8850
9127
|
);
|
|
8851
9128
|
};
|
|
8852
9129
|
|
|
8853
|
-
export const HeadlessCustomEditor: React.FC = () => {
|
|
9130
|
+
export const HeadlessCustomEditor: React.FC<HeadlessEditorKnobs> = (knobs) => {
|
|
8854
9131
|
return (
|
|
8855
9132
|
<Box display="flex" gap="2xl" flexDirection="column">
|
|
8856
9133
|
<HeadlessCustomEditorInstance
|
|
9134
|
+
{...knobs}
|
|
8857
9135
|
idPrefix="headless-a"
|
|
8858
9136
|
label="Unformatted rich text"
|
|
8859
9137
|
defaultValue="<p>Unformatted rich text preview with no active marks.</p>"
|
|
8860
9138
|
/>
|
|
8861
9139
|
<HeadlessCustomEditorInstance
|
|
9140
|
+
{...knobs}
|
|
8862
9141
|
idPrefix="headless-b"
|
|
8863
9142
|
label="Formatted rich text"
|
|
8864
9143
|
defaultValue={\`<p><b>Bold text</b>, <i>italic text</i>, <u>underlined text</u>, and <span style="color:\${HEADLESS_TEXT_COLOR};background-color:\${HEADLESS_BACKGROUND_COLOR}">colored text</span> are visible here.</p>\`}
|
|
@@ -9036,6 +9315,292 @@ export const EditorInModalExample = ({
|
|
|
9036
9315
|
</Dialog>
|
|
9037
9316
|
</ModalContent>
|
|
9038
9317
|
</Modal>
|
|
9318
|
+
);
|
|
9319
|
+
|
|
9320
|
+
const HeadlessInfoPanel: React.FC<{
|
|
9321
|
+
title: string;
|
|
9322
|
+
children: React.ReactNode;
|
|
9323
|
+
testId?: string;
|
|
9324
|
+
}> = ({ title, children, testId }) => (
|
|
9325
|
+
<Box
|
|
9326
|
+
display="flex"
|
|
9327
|
+
flexDirection="column"
|
|
9328
|
+
gap="xs"
|
|
9329
|
+
padding="md"
|
|
9330
|
+
borderRadius="md"
|
|
9331
|
+
borderWidth={1}
|
|
9332
|
+
borderStyle="solid"
|
|
9333
|
+
borderColor="border.medium"
|
|
9334
|
+
data-testid={testId}
|
|
9335
|
+
>
|
|
9336
|
+
<Text type="helper" size="sm" color="text.secondary">
|
|
9337
|
+
{title}
|
|
9338
|
+
</Text>
|
|
9339
|
+
{children}
|
|
9340
|
+
</Box>
|
|
9341
|
+
);
|
|
9342
|
+
|
|
9343
|
+
const HeadlessCode: React.FC<{ children: string }> = ({ children }) => (
|
|
9344
|
+
<Box
|
|
9345
|
+
elementType="pre"
|
|
9346
|
+
color="text.primary"
|
|
9347
|
+
style={{
|
|
9348
|
+
margin: 0,
|
|
9349
|
+
maxHeight: 220,
|
|
9350
|
+
overflow: "auto",
|
|
9351
|
+
fontFamily: "ui-monospace, monospace",
|
|
9352
|
+
fontSize: 11,
|
|
9353
|
+
lineHeight: 1.4,
|
|
9354
|
+
whiteSpace: "pre",
|
|
9355
|
+
}}
|
|
9356
|
+
>
|
|
9357
|
+
{children}
|
|
9358
|
+
</Box>
|
|
9359
|
+
);
|
|
9360
|
+
|
|
9361
|
+
const HeadlessDemo: React.FC<
|
|
9362
|
+
Omit<UseEditorOptions, "onDocChange"> & {
|
|
9363
|
+
idPrefix: string;
|
|
9364
|
+
title: string;
|
|
9365
|
+
description: string;
|
|
9366
|
+
showDocumentControls?: boolean;
|
|
9367
|
+
renderInfo?: (doc: RichTextEditorDoc) => React.ReactNode;
|
|
9368
|
+
}
|
|
9369
|
+
> = ({
|
|
9370
|
+
idPrefix,
|
|
9371
|
+
title,
|
|
9372
|
+
description,
|
|
9373
|
+
showDocumentControls,
|
|
9374
|
+
renderInfo,
|
|
9375
|
+
...options
|
|
9376
|
+
}) => {
|
|
9377
|
+
const [doc, setDoc] = React.useState<RichTextEditorDoc>([]);
|
|
9378
|
+
const editor = useEditor({ ...options, onDocChange: setDoc });
|
|
9379
|
+
const { editableProps } = useEditable(editor);
|
|
9380
|
+
// Applying the initial content emits no onDocChange.
|
|
9381
|
+
React.useEffect(() => {
|
|
9382
|
+
setDoc(editor.core.getDoc());
|
|
9383
|
+
}, [editor.core]);
|
|
9384
|
+
|
|
9385
|
+
return (
|
|
9386
|
+
<EditorProvider editor={editor}>
|
|
9387
|
+
<Box
|
|
9388
|
+
display="flex"
|
|
9389
|
+
flexDirection="column"
|
|
9390
|
+
gap="md"
|
|
9391
|
+
padding="lg"
|
|
9392
|
+
borderRadius="lg"
|
|
9393
|
+
backgroundColor="background.primary.subtle"
|
|
9394
|
+
style={{ width: 320 }}
|
|
9395
|
+
>
|
|
9396
|
+
<Box display="flex" flexDirection="column" gap="xs">
|
|
9397
|
+
<Text type="label" size="md">
|
|
9398
|
+
{title}
|
|
9399
|
+
</Text>
|
|
9400
|
+
<Text type="helper" size="sm" color="text.secondary">
|
|
9401
|
+
{description}
|
|
9402
|
+
</Text>
|
|
9403
|
+
</Box>
|
|
9404
|
+
<Box display="flex" gap="xs" alignItems="center" flexWrap="wrap">
|
|
9405
|
+
<HeadlessMarkButtons idPrefix={idPrefix} />
|
|
9406
|
+
{showDocumentControls ? (
|
|
9407
|
+
<>
|
|
9408
|
+
<HeadlessFontSizeButton idPrefix={idPrefix} />
|
|
9409
|
+
<HeadlessSelectAllButton idPrefix={idPrefix} />
|
|
9410
|
+
</>
|
|
9411
|
+
) : null}
|
|
9412
|
+
</Box>
|
|
9413
|
+
<Box
|
|
9414
|
+
{...editableProps}
|
|
9415
|
+
data-testid={\`\${idPrefix}-editable\`}
|
|
9416
|
+
aria-label={\`\${title} editor\`}
|
|
9417
|
+
padding="lg"
|
|
9418
|
+
borderRadius="lg"
|
|
9419
|
+
backgroundColor="background.secondary.subtle"
|
|
9420
|
+
color="text.primary"
|
|
9421
|
+
typography="body.md.regular"
|
|
9422
|
+
style={{ minHeight: 80, whiteSpace: "pre-wrap" }}
|
|
9423
|
+
/>
|
|
9424
|
+
{renderInfo?.(doc)}
|
|
9425
|
+
</Box>
|
|
9426
|
+
</EditorProvider>
|
|
9427
|
+
);
|
|
9428
|
+
};
|
|
9429
|
+
|
|
9430
|
+
const HeadlessDemoRow: React.FC<{ children: React.ReactNode }> = ({
|
|
9431
|
+
children,
|
|
9432
|
+
}) => (
|
|
9433
|
+
<Box display="flex" gap="xl" flexWrap="wrap" alignItems="flex-start">
|
|
9434
|
+
{children}
|
|
9435
|
+
</Box>
|
|
9436
|
+
);
|
|
9437
|
+
|
|
9438
|
+
const formatDoc = (doc: RichTextEditorDoc) =>
|
|
9439
|
+
doc
|
|
9440
|
+
.map(({ children, ...paragraph }) =>
|
|
9441
|
+
[
|
|
9442
|
+
JSON.stringify(paragraph),
|
|
9443
|
+
...children.map((child) => \` \${JSON.stringify(child)}\`),
|
|
9444
|
+
].join("\\n"),
|
|
9445
|
+
)
|
|
9446
|
+
.join("\\n");
|
|
9447
|
+
|
|
9448
|
+
export const HeadlessDocumentModelDemo: React.FC = () => (
|
|
9449
|
+
<HeadlessDemo
|
|
9450
|
+
idPrefix="doc-model"
|
|
9451
|
+
title="Document model"
|
|
9452
|
+
description="The editor's content is plain data: paragraphs of text runs with their marks. Edit, format or resize the text and watch the document update."
|
|
9453
|
+
showDocumentControls={true}
|
|
9454
|
+
defaultDoc={[
|
|
9455
|
+
{
|
|
9456
|
+
type: "p",
|
|
9457
|
+
children: [
|
|
9458
|
+
{ text: "Plain, " },
|
|
9459
|
+
{ text: "bold", bold: true },
|
|
9460
|
+
{ text: " and " },
|
|
9461
|
+
{ text: "large", fontSize: "20px" },
|
|
9462
|
+
{ text: " text." },
|
|
9463
|
+
],
|
|
9464
|
+
},
|
|
9465
|
+
{ type: "p", textAlign: "center", children: [{ text: "Centered" }] },
|
|
9466
|
+
]}
|
|
9467
|
+
renderInfo={(doc) => (
|
|
9468
|
+
<HeadlessInfoPanel title="getDoc()" testId="doc-model-json">
|
|
9469
|
+
<HeadlessCode>{formatDoc(doc)}</HeadlessCode>
|
|
9470
|
+
</HeadlessInfoPanel>
|
|
9471
|
+
)}
|
|
9472
|
+
/>
|
|
9473
|
+
);
|
|
9474
|
+
|
|
9475
|
+
const HeadlessParagraphOutline: React.FC<{ doc: RichTextEditorDoc }> = ({
|
|
9476
|
+
doc,
|
|
9477
|
+
}) => (
|
|
9478
|
+
<HeadlessInfoPanel
|
|
9479
|
+
title={\`\${doc.length} paragraph\${doc.length === 1 ? "" : "s"}\`}
|
|
9480
|
+
>
|
|
9481
|
+
{doc.map((paragraph, index) => (
|
|
9482
|
+
<Box
|
|
9483
|
+
key={index}
|
|
9484
|
+
padding="xs"
|
|
9485
|
+
borderRadius="sm"
|
|
9486
|
+
backgroundColor="background.primary.subtle"
|
|
9487
|
+
>
|
|
9488
|
+
<HeadlessCode>
|
|
9489
|
+
{\`\xB6 \${getDocPlainText([paragraph]).replaceAll("\\n", "\u21B5")}\`}
|
|
9490
|
+
</HeadlessCode>
|
|
9491
|
+
</Box>
|
|
9492
|
+
))}
|
|
9493
|
+
</HeadlessInfoPanel>
|
|
9494
|
+
);
|
|
9495
|
+
|
|
9496
|
+
export const HeadlessParagraphsDemo: React.FC = () => (
|
|
9497
|
+
<HeadlessDemoRow>
|
|
9498
|
+
<HeadlessDemo
|
|
9499
|
+
idPrefix="enter-line-break"
|
|
9500
|
+
title="Enter inserts a line break"
|
|
9501
|
+
description="The default: Enter and Shift+Enter add a line break inside the current paragraph."
|
|
9502
|
+
defaultDoc={[
|
|
9503
|
+
{ type: "p", children: [{ text: "First line\\nSecond line" }] },
|
|
9504
|
+
]}
|
|
9505
|
+
renderInfo={(doc) => <HeadlessParagraphOutline doc={doc} />}
|
|
9506
|
+
/>
|
|
9507
|
+
<HeadlessDemo
|
|
9508
|
+
idPrefix="enter-paragraph"
|
|
9509
|
+
title="Enter starts a paragraph"
|
|
9510
|
+
description="With enterInsertsParagraph, Enter splits the paragraph at the caret; Shift+Enter still adds a line break."
|
|
9511
|
+
enterInsertsParagraph={true}
|
|
9512
|
+
defaultDoc={[
|
|
9513
|
+
{ type: "p", children: [{ text: "First paragraph" }] },
|
|
9514
|
+
{ type: "p", children: [{ text: "Second paragraph" }] },
|
|
9515
|
+
]}
|
|
9516
|
+
renderInfo={(doc) => <HeadlessParagraphOutline doc={doc} />}
|
|
9517
|
+
/>
|
|
9518
|
+
</HeadlessDemoRow>
|
|
9519
|
+
);
|
|
9520
|
+
|
|
9521
|
+
export const HeadlessMaxLengthDemo: React.FC = () => (
|
|
9522
|
+
<HeadlessDemo
|
|
9523
|
+
idPrefix="max-length"
|
|
9524
|
+
title="Character limit"
|
|
9525
|
+
description="maxLength is 40. Typing, pasting and composed input stop at the limit."
|
|
9526
|
+
maxLength={40}
|
|
9527
|
+
defaultDoc={[
|
|
9528
|
+
{ type: "p", children: [{ text: "Only a few characters are left." }] },
|
|
9529
|
+
]}
|
|
9530
|
+
renderInfo={(doc) => (
|
|
9531
|
+
<Text
|
|
9532
|
+
type="helper"
|
|
9533
|
+
size="sm"
|
|
9534
|
+
color="text.secondary"
|
|
9535
|
+
data-testid="max-length-count"
|
|
9536
|
+
>
|
|
9537
|
+
{\`\${getDocPlainText(doc).length} / 40 characters\`}
|
|
9538
|
+
</Text>
|
|
9539
|
+
)}
|
|
9540
|
+
/>
|
|
9541
|
+
);
|
|
9542
|
+
|
|
9543
|
+
const toUpperCaseText = (fragment: RichTextEditorDoc) =>
|
|
9544
|
+
getDocPlainText(fragment).toUpperCase();
|
|
9545
|
+
|
|
9546
|
+
export const HeadlessClipboardHooksDemo: React.FC = () => {
|
|
9547
|
+
const [copied, setCopied] = React.useState<string | null>(null);
|
|
9548
|
+
|
|
9549
|
+
return (
|
|
9550
|
+
<HeadlessDemo
|
|
9551
|
+
idPrefix="clipboard"
|
|
9552
|
+
title="Clipboard hooks"
|
|
9553
|
+
description="onPaste inserts pasted text in bold. onCopy puts the selection on the clipboard in upper case."
|
|
9554
|
+
defaultValue="<p>Copy part of this sentence, then paste it back.</p>"
|
|
9555
|
+
onPaste={(event) => {
|
|
9556
|
+
const text = event.clipboardData?.getData("text/plain");
|
|
9557
|
+
return text ? [{ type: "p", children: [{ text, bold: true }] }] : null;
|
|
9558
|
+
}}
|
|
9559
|
+
onCopy={(event, fragment) => {
|
|
9560
|
+
const text = toUpperCaseText(fragment);
|
|
9561
|
+
event.clipboardData?.setData("text/plain", text);
|
|
9562
|
+
setCopied(text);
|
|
9563
|
+
return true;
|
|
9564
|
+
}}
|
|
9565
|
+
renderInfo={() => (
|
|
9566
|
+
<HeadlessInfoPanel title="Last copied" testId="clipboard-last-copied">
|
|
9567
|
+
<HeadlessCode>{copied ?? "Nothing copied yet"}</HeadlessCode>
|
|
9568
|
+
</HeadlessInfoPanel>
|
|
9569
|
+
)}
|
|
9570
|
+
/>
|
|
9571
|
+
);
|
|
9572
|
+
};
|
|
9573
|
+
|
|
9574
|
+
const HEADLESS_STYLED_HTML =
|
|
9575
|
+
'<p style="text-align:center"><span style="font-family:Georgia, serif;font-size:24px">Serif heading</span></p><p>Body text</p>';
|
|
9576
|
+
|
|
9577
|
+
export const HeadlessHtmlStylesDemo: React.FC = () => (
|
|
9578
|
+
<Box display="flex" flexDirection="column" gap="lg">
|
|
9579
|
+
<HeadlessInfoPanel title="Both editors parse the same defaultValue">
|
|
9580
|
+
<HeadlessCode>{HEADLESS_STYLED_HTML}</HeadlessCode>
|
|
9581
|
+
</HeadlessInfoPanel>
|
|
9582
|
+
<HeadlessDemoRow>
|
|
9583
|
+
<HeadlessDemo
|
|
9584
|
+
idPrefix="html-styles-default"
|
|
9585
|
+
title="Default htmlStyles"
|
|
9586
|
+
description="Only color and backgroundColor survive parsing; the font and alignment are dropped."
|
|
9587
|
+
defaultValue={HEADLESS_STYLED_HTML}
|
|
9588
|
+
/>
|
|
9589
|
+
<HeadlessDemo
|
|
9590
|
+
idPrefix="html-styles-all"
|
|
9591
|
+
title="htmlStyles with fonts and alignment"
|
|
9592
|
+
description='htmlStyles={["color", "backgroundColor", "fontFamily", "fontSize", "textAlign"]}'
|
|
9593
|
+
htmlStyles={[
|
|
9594
|
+
"color",
|
|
9595
|
+
"backgroundColor",
|
|
9596
|
+
"fontFamily",
|
|
9597
|
+
"fontSize",
|
|
9598
|
+
"textAlign",
|
|
9599
|
+
]}
|
|
9600
|
+
defaultValue={HEADLESS_STYLED_HTML}
|
|
9601
|
+
/>
|
|
9602
|
+
</HeadlessDemoRow>
|
|
9603
|
+
</Box>
|
|
9039
9604
|
);`},similarTo:[],figmaUrl:null},FileInput:{id:"core-forms-fileinput",breadcrumb:"Core/Forms/FileInput",importStatement:'import { FileInput, VariantViewer } from "@baseline-ui/core";',description:"`FileInput` is a form control for selecting one or more files from the user's device. It pairs a primary button with a read-only display of the chosen file name and supports labels, helper text, validation states, and accessibility hooks consistent with `TextInput`.",documentation:'`FileInput` is a form control for selecting one or more files from the user\'s device. It pairs a primary button with a read-only display of the chosen file name and supports labels, helper text, validation states, and accessibility hooks consistent with `TextInput`.\n\n* Built on top of [React Aria\'s `FileTrigger`](https://react-spectrum.adobe.com/react-aria/FileTrigger.html), so it works with mouse, touch, and keyboard.\n* Only the button is interactive \u2014 the label, file name, and helper text are visual and wired into the button via `aria-describedby` for assistive technology.\n* Accepts an array of MIME types or file extensions via `acceptedFileTypes`, and an `allowsMultiple` flag for selecting more than one file.\n* Supports directory selection ([`acceptDirectory`](https://react-spectrum.adobe.com/react-aria/FileTrigger.html#directory-selection)) and mobile capture ([`defaultCamera`](https://react-spectrum.adobe.com/react-aria/FileTrigger.html#media-capture)) via the underlying `FileTrigger`.\n* Renders helper, warning, and error messages with the same precedence rules as the rest of the form components: error > warning > description.\n\n```jsx\nimport { FileInput } from "@baseline-ui/core";\n\n<FileInput\n label="Attachment"\n description="Supports .mov and .mp4"\n acceptedFileTypes={[".mov", ".mp4"]}\n onValueChange={(files) => console.log(files)}\n/>;\n```\n\nIf you need a drag-and-drop drop zone instead of a button trigger, use [`ImageDropZone`](/story/core-forms-imagedropzone--basic) or [`FileUploader`](/story/core-forms-fileuploader--default).\n\nPass a visible `label` for sighted users; the label is wired into the button\'s accessible description so it is announced on focus.\n\n```jsx\n<FileInput label="Attachment" description="Supports .mov and .mp4" />\n```\n\nBy default the label sits above the field. Pass `labelPosition="start"` to align it inline.\n\n```jsx\n<FileInput label="Attachment" labelPosition="start" />\n```\n\nIf the field is described by surrounding context, omit `label`. The button\'s intrinsic name (`buttonLabel`, "Choose file" by default) is still announced.\n\n```jsx\n<FileInput aria-label="Upload a file" />\n```\n\nSet `allowsMultiple` to allow more than one file. The display switches to an aggregate `"N files"` count once more than one file is selected.\n\n```jsx\n<FileInput label="Attachments" allowsMultiple onValueChange={setFiles} />\n```\n\nPass an array of MIME types or file extensions to `acceptedFileTypes`.\n\n```jsx\n<FileInput\n label="Avatar"\n acceptedFileTypes={["image/png", "image/jpeg"]}\n onValueChange={setAvatar}\n/>\n```\n\nSet `acceptDirectory` to let users pick a folder. The browser forwards every file inside the chosen directory to `onValueChange`.\n\n```jsx\n<FileInput label="Upload folder" acceptDirectory onValueChange={setFiles} />\n```\n\nSet `defaultCamera="user"` (front-facing) or `"environment"` (rear-facing) to hint that the picker should open the device\'s camera on mobile.\n\n```jsx\n<FileInput\n label="Take a photo"\n acceptedFileTypes={["image/*"]}\n defaultCamera="environment"\n/>\n```\n\nSet `autoFocus` to focus the button on mount \u2014 useful in dialogs or multi-step flows.\n\n```jsx\n<FileInput label="Attachment" autoFocus />\n```\n\nOverride `buttonLabel` and `placeholder` for non-English copy or domain-specific wording.\n\n```jsx\n<FileInput\n label="Avatar"\n buttonLabel="Browse..."\n placeholder="Drop an image here"\n/>\n```\n\nPass `validationState="warning"` and a `warningMessage` to show a non-blocking advisory.\n\n```jsx\n<FileInput\n label="Attachment"\n validationState="warning"\n warningMessage="This file format is uncommon \u2014 make sure it is supported."\n/>\n```\n\nSetting `errorMessage` flips the field into the error state and replaces the helper text. The error message takes precedence over both `description` and `warningMessage`.\n\n```jsx\n<FileInput label="Attachment" errorMessage="Please choose a supported file." />\n```\n\nDisable the field with `isDisabled`. The button cannot be activated and the displayed file name uses the disabled text color.\n\n```jsx\n<FileInput label="Attachment" isDisabled />\n```\n\n`FileInput` exposes a single callback for handling the selection:\n\n| Prop | Signature | When to use |\n| --------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `onValueChange` | `(files: File[]) => void` | Receives the parsed file list directly. When `allowsMultiple` is not set, the array has at most one entry. An empty array means the user opened and dismissed the file picker. |\n\n`FileInput` sets the following data attributes on the field wrapper. Use them to scope your custom styles.\n\n| Selector | Description |\n| ----------------------------------- | ---------------------------------------------------- |\n| `[data-disabled]` | Present when `isDisabled` is true. |\n| `[data-validation-state="error"]` | Present when an error message or error state is set. |\n| `[data-validation-state="warning"]` | Present when `validationState="warning"`. |\n| `.BaselineUI-FileInput` | Root element of the component. |\n\nTo style the button itself, target `.BaselineUI-FileInput button` or pass a class via `buttonClassName` / inline styles via `buttonStyle`.\n\n* Only the button is interactive; the label, file name, and helper text are visual elements wired into the button via `aria-describedby`.\n* The button keeps its own accessible name (`"Choose file"` by default), so screen readers announce the action on focus.\n* The visible `label`, the selected file name, and any helper/warning/error message are all referenced from the button\'s `aria-describedby`, so they are announced after the action label.\n* An externally supplied `aria-describedby` is merged with the internal IDs rather than replacing them.\n\n| Key | Action |\n| ----------------- | ----------------------------- |\n| `Tab` | Moves focus to the button. |\n| `Shift + Tab` | Moves focus out of the field. |\n| `Space` / `Enter` | Opens the system file picker. |',props:`interface FileInputProps {
|
|
9040
9605
|
/**
|
|
9041
9606
|
* The description to display below the input.
|
|
@@ -10713,14 +11278,17 @@ export const ControlledFreehandCanvas = ({
|
|
|
10713
11278
|
export const TrackedControlledFreehandCanvas = ({
|
|
10714
11279
|
onChange,
|
|
10715
11280
|
onChangeEnd,
|
|
11281
|
+
clearLabel,
|
|
10716
11282
|
}: {
|
|
10717
11283
|
onChange?: (value: FreehandCanvasProps["value"]) => void;
|
|
10718
11284
|
onChangeEnd?: (value: FreehandCanvasProps["value"]) => void;
|
|
11285
|
+
clearLabel?: string;
|
|
10719
11286
|
}) => {
|
|
10720
11287
|
const [value, setValue] = useState<FreehandCanvasProps["value"]>([]);
|
|
10721
11288
|
|
|
10722
11289
|
return (
|
|
10723
11290
|
<FreehandCanvas
|
|
11291
|
+
clearLabel={clearLabel}
|
|
10724
11292
|
value={value}
|
|
10725
11293
|
onChange={(value) => {
|
|
10726
11294
|
setValue(value);
|
|
@@ -11128,9 +11696,12 @@ export const GridListDragHandle = ({
|
|
|
11128
11696
|
);
|
|
11129
11697
|
};
|
|
11130
11698
|
|
|
11131
|
-
export const EditableGridListExample: React.FC<
|
|
11132
|
-
|
|
11133
|
-
) =>
|
|
11699
|
+
export const EditableGridListExample: React.FC<
|
|
11700
|
+
GridListExampleProps & {
|
|
11701
|
+
onInputKeyDown?: (key: string) => void;
|
|
11702
|
+
onAncestorKeyDown?: (key: string) => void;
|
|
11703
|
+
}
|
|
11704
|
+
> = ({ onInputKeyDown, onAncestorKeyDown, ...props }) => {
|
|
11134
11705
|
const [isEditing, setIsEditing] = useState(false);
|
|
11135
11706
|
const [selectedKey, setSelectedKey] = useState("1");
|
|
11136
11707
|
|
|
@@ -11173,6 +11744,14 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
11173
11744
|
className="edit-item-input"
|
|
11174
11745
|
autoFocus={true}
|
|
11175
11746
|
defaultValue={textValue}
|
|
11747
|
+
onKeyDown={
|
|
11748
|
+
onInputKeyDown
|
|
11749
|
+
? (e) => {
|
|
11750
|
+
onInputKeyDown(e.key);
|
|
11751
|
+
e.continuePropagation();
|
|
11752
|
+
}
|
|
11753
|
+
: undefined
|
|
11754
|
+
}
|
|
11176
11755
|
onBlur={(e) => {
|
|
11177
11756
|
const blurEvent = e;
|
|
11178
11757
|
onItemUpdate(value?.id, blurEvent.currentTarget.value);
|
|
@@ -11188,11 +11767,11 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
11188
11767
|
</li>
|
|
11189
11768
|
);
|
|
11190
11769
|
},
|
|
11191
|
-
[selectedKey, isEditing, onItemUpdate],
|
|
11770
|
+
[selectedKey, isEditing, onItemUpdate, onInputKeyDown],
|
|
11192
11771
|
);
|
|
11193
11772
|
|
|
11194
11773
|
return (
|
|
11195
|
-
|
|
11774
|
+
<div onKeyDown={(e) => onAncestorKeyDown?.(e.key)}>
|
|
11196
11775
|
<GridList
|
|
11197
11776
|
items={itemList.items}
|
|
11198
11777
|
renderGridItem={renderGridItem}
|
|
@@ -11213,7 +11792,7 @@ export const EditableGridListExample: React.FC<GridListExampleProps> = (
|
|
|
11213
11792
|
>
|
|
11214
11793
|
Edit selected item
|
|
11215
11794
|
</button>
|
|
11216
|
-
|
|
11795
|
+
</div>
|
|
11217
11796
|
);
|
|
11218
11797
|
};`},similarTo:[],figmaUrl:null},Group:{id:"core-utilities-group",breadcrumb:"Core/Utilities/Group",importStatement:'import { ActionButton, Group } from "@baseline-ui/core";',description:"`Group` is a container that exposes a set of related UI controls as a single labelled unit to assistive technology. Use it to associate adjacent controls like toolbars or button clusters under a shared accessible label.",documentation:'`Group` is a container that exposes a set of related UI controls as a single labelled unit to assistive technology. Use it to associate adjacent controls like toolbars or button clusters under a shared accessible label.\n\n```jsx\nimport { Group, ActionButton } from "@baseline-ui/core";\n\n<Group>\n <ActionButton label="Label 1" />\n <ActionButton label="Label 2" />\n <ActionButton label="Label 3" />\n</Group>;\n```\n\nThe Group component in the given file path accepts the `aria-label` and `aria-labelledby` attributes to provide an accessible label to the group as a whole. These attributes are read by assistive technology when navigating into the group from outside. It is recommended to use an additional label for the group when the labels of each child element do not provide sufficient context on their own.\n\n```jsx\n<span id="label-id">Label</span>\n<Group aria-labelledby="label-id">\n {/* ... */}\n</Group>\n```\n\nBy default, `Group` uses the `group` ARIA role. If the contents of the group is important enough to be included in the page table of contents, use `role="region"` instead, and ensure that an aria-label or `aria-labelledby` prop is assigned.\n\n```jsx\n<Group role="region" aria-label="Object details">\n {/* ... */}\n</Group>\n```\n\n| Selector | Description |\n| --------------- | ---------------------------------------------------- |\n| \\[data-disabled] | Whether the group is disabled. |\n| \\[data-hovered] | Whether the group is currently hovered with a mouse. |',props:`interface GroupProps {
|
|
11219
11798
|
/**
|
|
@@ -11918,7 +12497,7 @@ imageWidth?: number | "sm" | "md"
|
|
|
11918
12497
|
/**
|
|
11919
12498
|
* The aspect ratio of the images.
|
|
11920
12499
|
*
|
|
11921
|
-
* @default
|
|
12500
|
+
* @default 3 / 4
|
|
11922
12501
|
*/
|
|
11923
12502
|
aspectRatio?: number
|
|
11924
12503
|
/**
|
|
@@ -11987,11 +12566,12 @@ imageDimensions?: | Dimension
|
|
|
11987
12566
|
*/
|
|
11988
12567
|
layoutTransition?: Transition | boolean
|
|
11989
12568
|
/**
|
|
11990
|
-
* The title of the delete confirmation modal.
|
|
12569
|
+
* The title of the delete confirmation modal. A function receives the keys
|
|
12570
|
+
* about to be deleted, or \`"all"\` when the delete comes from Select All.
|
|
11991
12571
|
*
|
|
11992
12572
|
* @default "Are you sure you want to delete this item?"
|
|
11993
12573
|
*/
|
|
11994
|
-
deleteConfirmationTitle?: string | ((
|
|
12574
|
+
deleteConfirmationTitle?: string | ((keys: Selection) => string)
|
|
11995
12575
|
/**
|
|
11996
12576
|
* Overrides the label of the button that permanently deletes the selected
|
|
11997
12577
|
* image(s), and the accessible label of each image's individual delete
|
|
@@ -12034,6 +12614,11 @@ loadingLabel?: string
|
|
|
12034
12614
|
fit="cover"
|
|
12035
12615
|
aria-label="Image gallery"
|
|
12036
12616
|
defaultItems={items}
|
|
12617
|
+
onDelete={fn()} />;`},{id:"core-collections-imagegallery--with-disabled-deletion",name:"With Disabled Deletion",snippet:`const WithDisabledDeletion = () => <ImageGallery
|
|
12618
|
+
fit="cover"
|
|
12619
|
+
aria-label="Image gallery"
|
|
12620
|
+
defaultItems={items.slice(0, 4)}
|
|
12621
|
+
disabledKeys={["2"]}
|
|
12037
12622
|
onDelete={fn()} />;`},{id:"core-collections-imagegallery--with-reordering",name:"With Reordering",snippet:`const WithReordering = () => <ImageGallery
|
|
12038
12623
|
fit="cover"
|
|
12039
12624
|
aria-label="Image gallery"
|
|
@@ -12188,14 +12773,41 @@ const SCALE_FACTOR = 1.5;
|
|
|
12188
12773
|
|
|
12189
12774
|
export function ImageGalleryExample({
|
|
12190
12775
|
onDelete,
|
|
12776
|
+
onSelectedKeysChange,
|
|
12191
12777
|
ancestorKey,
|
|
12778
|
+
describeDeletedKeys,
|
|
12779
|
+
customDeleteButton,
|
|
12192
12780
|
...props
|
|
12193
12781
|
}: Omit<React.ComponentProps<typeof ImageGallery>, "onDelete"> & {
|
|
12194
12782
|
onDelete?: (keys: Key[]) => void;
|
|
12783
|
+
/** \`onSelectionChange\` as an array, since a \`Set\` does not survive the CT bridge. */
|
|
12784
|
+
onSelectedKeysChange?: (keys: Key[] | "all") => void;
|
|
12195
12785
|
ancestorKey?: string;
|
|
12786
|
+
describeDeletedKeys?: boolean;
|
|
12787
|
+
/** Renders each item through \`renderImage\` with its own button wired to \`onDelete\`. */
|
|
12788
|
+
customDeleteButton?: boolean;
|
|
12196
12789
|
}) {
|
|
12197
12790
|
const gallery = (
|
|
12198
12791
|
<ImageGallery
|
|
12792
|
+
deleteConfirmationTitle={
|
|
12793
|
+
describeDeletedKeys
|
|
12794
|
+
? (keys) =>
|
|
12795
|
+
keys === "all" ? "Delete all" : \`Delete \${[...keys].join(", ")}\`
|
|
12796
|
+
: undefined
|
|
12797
|
+
}
|
|
12798
|
+
renderImage={
|
|
12799
|
+
customDeleteButton
|
|
12800
|
+
? (item, { onDelete: deleteItem }) => (
|
|
12801
|
+
<button
|
|
12802
|
+
onClick={() => {
|
|
12803
|
+
deleteItem?.(item.id);
|
|
12804
|
+
}}
|
|
12805
|
+
>
|
|
12806
|
+
Remove {item.label}
|
|
12807
|
+
</button>
|
|
12808
|
+
)
|
|
12809
|
+
: undefined
|
|
12810
|
+
}
|
|
12199
12811
|
{...props}
|
|
12200
12812
|
onDelete={
|
|
12201
12813
|
onDelete
|
|
@@ -12204,6 +12816,13 @@ export function ImageGalleryExample({
|
|
|
12204
12816
|
}
|
|
12205
12817
|
: undefined
|
|
12206
12818
|
}
|
|
12819
|
+
onSelectionChange={
|
|
12820
|
+
onSelectedKeysChange
|
|
12821
|
+
? (keys) => {
|
|
12822
|
+
onSelectedKeysChange(keys === "all" ? "all" : [...keys]);
|
|
12823
|
+
}
|
|
12824
|
+
: props.onSelectionChange
|
|
12825
|
+
}
|
|
12207
12826
|
/>
|
|
12208
12827
|
);
|
|
12209
12828
|
|
|
@@ -12332,9 +12951,14 @@ export function DynamicImageGalleryExample({
|
|
|
12332
12951
|
);
|
|
12333
12952
|
}
|
|
12334
12953
|
|
|
12335
|
-
export function ControlledImageGalleryExample(
|
|
12336
|
-
|
|
12337
|
-
|
|
12954
|
+
export function ControlledImageGalleryExample({
|
|
12955
|
+
reselectFirstOnDelete,
|
|
12956
|
+
reselectFirstOnListChange,
|
|
12957
|
+
...props
|
|
12958
|
+
}: Omit<React.ComponentProps<typeof ImageGallery>, "onDelete" | "items"> & {
|
|
12959
|
+
reselectFirstOnDelete?: boolean;
|
|
12960
|
+
reselectFirstOnListChange?: boolean;
|
|
12961
|
+
}) {
|
|
12338
12962
|
const [dynamicItems, setDynamicItems] = React.useState(items.slice(0, 4));
|
|
12339
12963
|
|
|
12340
12964
|
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
@@ -12354,6 +12978,9 @@ export function ControlledImageGalleryExample(
|
|
|
12354
12978
|
setDynamicItems((prevItems) => {
|
|
12355
12979
|
return prevItems.filter((item) => item.id !== keys[0]);
|
|
12356
12980
|
});
|
|
12981
|
+
if (reselectFirstOnDelete) {
|
|
12982
|
+
setSelectedIndex(0);
|
|
12983
|
+
}
|
|
12357
12984
|
};
|
|
12358
12985
|
|
|
12359
12986
|
return (
|
|
@@ -12392,6 +13019,12 @@ export function ControlledImageGalleryExample(
|
|
|
12392
13019
|
);
|
|
12393
13020
|
}}
|
|
12394
13021
|
onDelete={handleDelete}
|
|
13022
|
+
onListChange={(list) => {
|
|
13023
|
+
props.onListChange?.(list);
|
|
13024
|
+
if (reselectFirstOnListChange) {
|
|
13025
|
+
setSelectedIndex(0);
|
|
13026
|
+
}
|
|
13027
|
+
}}
|
|
12395
13028
|
/>
|
|
12396
13029
|
</Box>
|
|
12397
13030
|
);
|
|
@@ -13552,6 +14185,7 @@ placement?: any
|
|
|
13552
14185
|
</Text>
|
|
13553
14186
|
<ActionButton label="Save" />
|
|
13554
14187
|
</Box>)</InlineToolbar>;`}],implementation:`import { TrashIcon } from "@baseline-ui/icons/24";
|
|
14188
|
+
import { ShadowRoot } from "@baseline-ui/test-utils/client";
|
|
13555
14189
|
import React from "react";
|
|
13556
14190
|
|
|
13557
14191
|
import { InlineToolbar } from "../InlineToolbar";
|
|
@@ -13594,7 +14228,13 @@ export const InlineToolbarExample = ({
|
|
|
13594
14228
|
)}
|
|
13595
14229
|
</InlineToolbar>
|
|
13596
14230
|
);
|
|
13597
|
-
}
|
|
14231
|
+
};
|
|
14232
|
+
|
|
14233
|
+
export const InlineToolbarInShadowRootExample = () => (
|
|
14234
|
+
<ShadowRoot style={{ width: 400, height: 200 }}>
|
|
14235
|
+
<InlineToolbarExample />
|
|
14236
|
+
</ShadowRoot>
|
|
14237
|
+
);`},similarTo:[],figmaUrl:null},Kbd:{id:"core-content-kbd",breadcrumb:"Core/Content/Kbd",importStatement:'import { Box, Kbd } from "@baseline-ui/core";',description:"`Kbd` renders a key or keyboard shortcut as a styled keycap and adapts modifier names to the user's operating system. Use it to display hotkeys inline with text, in menus, or in help documentation.",documentation:`\`Kbd\` renders a key or keyboard shortcut as a styled keycap and adapts modifier names to the user's operating system. Use it to display hotkeys inline with text, in menus, or in help documentation.
|
|
13598
14238
|
|
|
13599
14239
|
* Keycap-styled visual appearance
|
|
13600
14240
|
* OS-aware shortcut conversion (Ctrl becomes Cmd on Mac)
|
|
@@ -14434,7 +15074,7 @@ export const DynamicListBoxExample: React.FC<
|
|
|
14434
15074
|
>
|
|
14435
15075
|
<Box
|
|
14436
15076
|
color={
|
|
14437
|
-
isSelected ? "
|
|
15077
|
+
isSelected ? "text.interactive.enabled" : "icon.primary"
|
|
14438
15078
|
}
|
|
14439
15079
|
typography="label.md.medium"
|
|
14440
15080
|
paddingY="md"
|
|
@@ -14922,10 +15562,6 @@ optionStyle?: | React.CSSProperties
|
|
|
14922
15562
|
* @default "press"
|
|
14923
15563
|
*/
|
|
14924
15564
|
trigger?: "press" | "longPress"
|
|
14925
|
-
/**
|
|
14926
|
-
* The \`className\` property assigned to the root element of the component.
|
|
14927
|
-
*/
|
|
14928
|
-
className?: string
|
|
14929
15565
|
/**
|
|
14930
15566
|
* The \`className\` property assigned to the content element of the component.
|
|
14931
15567
|
*/
|
|
@@ -15501,9 +16137,10 @@ onOpenChange?: (isOpen: boolean) => void
|
|
|
15501
16137
|
children: React.ReactNode
|
|
15502
16138
|
}`,stories:{usage:[{id:"core-overlays-modal--basic",name:"Basic",snippet:"const Basic = (args) => <DialogExample modalProps={args} />;"},{id:"core-overlays-modal--default-open",name:"Default Open",snippet:"const DefaultOpen = (args) => <DialogExample modalProps={args} />;"},{id:"core-overlays-modal--controlled",name:"Controlled",snippet:"const Controlled = (args) => <DialogExample modalProps={args} />;"}],implementation:`import { IFrame, ShadowRoot } from "@baseline-ui/test-utils/client";
|
|
15503
16139
|
import { sprinkles } from "@baseline-ui/tokens";
|
|
15504
|
-
import { getOwnerDocument } from "@react-aria/utils";
|
|
15505
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
16140
|
+
import { getOwnerDocument, isShadowRoot } from "@react-aria/utils";
|
|
16141
|
+
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
15506
16142
|
import { VisuallyHidden, useId } from "react-aria";
|
|
16143
|
+
import { createPortal } from "react-dom";
|
|
15507
16144
|
|
|
15508
16145
|
import { ActionButton } from "../../ActionButton";
|
|
15509
16146
|
import { Box } from "../../Box";
|
|
@@ -15969,7 +16606,101 @@ export const ModalLateBodyContainerExample: React.FC<
|
|
|
15969
16606
|
)}
|
|
15970
16607
|
</Box>
|
|
15971
16608
|
);
|
|
15972
|
-
}
|
|
16609
|
+
};
|
|
16610
|
+
|
|
16611
|
+
const NestedShadowButton: React.FC<{ testId: string }> = ({ testId }) => {
|
|
16612
|
+
const [hostRoot, setHostRoot] = useState<Element["shadowRoot"]>(null);
|
|
16613
|
+
const hostRef = useCallback((host: HTMLDivElement | null) => {
|
|
16614
|
+
if (host)
|
|
16615
|
+
setHostRoot(host.shadowRoot ?? host.attachShadow({ mode: "open" }));
|
|
16616
|
+
}, []);
|
|
16617
|
+
|
|
16618
|
+
return (
|
|
16619
|
+
// Stacked above the underlay so the click reaches the nested shadow root.
|
|
16620
|
+
<div ref={hostRef} style={{ position: "relative", zIndex: 2000 }}>
|
|
16621
|
+
{hostRoot
|
|
16622
|
+
? createPortal(<button data-testid={testId}>Nested</button>, hostRoot)
|
|
16623
|
+
: null}
|
|
16624
|
+
</div>
|
|
16625
|
+
);
|
|
16626
|
+
};
|
|
16627
|
+
|
|
16628
|
+
const ContainedModalContent: React.FC = () => {
|
|
16629
|
+
const [container, setContainer] = useState<HTMLElement | null>(null);
|
|
16630
|
+
const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(
|
|
16631
|
+
null,
|
|
16632
|
+
);
|
|
16633
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
16634
|
+
const [outsideClicks, setOutsideClicks] = useState(0);
|
|
16635
|
+
|
|
16636
|
+
// A light-DOM child of the outer host, rendered by the <slot> in the container.
|
|
16637
|
+
useEffect(() => {
|
|
16638
|
+
const root = container?.getRootNode();
|
|
16639
|
+
if (!root || !isShadowRoot(root)) return;
|
|
16640
|
+
const host = root.host;
|
|
16641
|
+
const button = host.ownerDocument.createElement("button");
|
|
16642
|
+
button.slot = "slotted";
|
|
16643
|
+
button.dataset.testid = "slotted-button";
|
|
16644
|
+
button.textContent = "Slotted";
|
|
16645
|
+
host.append(button);
|
|
16646
|
+
return () => {
|
|
16647
|
+
button.remove();
|
|
16648
|
+
};
|
|
16649
|
+
}, [container]);
|
|
16650
|
+
|
|
16651
|
+
return (
|
|
16652
|
+
<>
|
|
16653
|
+
<button
|
|
16654
|
+
data-testid="outside-button"
|
|
16655
|
+
onClick={() => {
|
|
16656
|
+
setOutsideClicks((count) => count + 1);
|
|
16657
|
+
}}
|
|
16658
|
+
>
|
|
16659
|
+
Outside
|
|
16660
|
+
</button>
|
|
16661
|
+
<span data-testid="outside-clicks">{outsideClicks}</span>
|
|
16662
|
+
<span data-testid="modal-state">{isOpen ? "open" : "closed"}</span>
|
|
16663
|
+
<div ref={setPortalContainer}>
|
|
16664
|
+
<NestedShadowButton testId="portal-nested-shadow-button" />
|
|
16665
|
+
</div>
|
|
16666
|
+
<FrameProvider
|
|
16667
|
+
container={container}
|
|
16668
|
+
portalContainer={portalContainer}
|
|
16669
|
+
shouldContainOverlays="always"
|
|
16670
|
+
>
|
|
16671
|
+
<Box
|
|
16672
|
+
ref={setContainer}
|
|
16673
|
+
data-testid="container"
|
|
16674
|
+
style={{ width: 400, height: 200 }}
|
|
16675
|
+
display="flex"
|
|
16676
|
+
flexDirection="column"
|
|
16677
|
+
alignItems="center"
|
|
16678
|
+
justifyContent="flex-end"
|
|
16679
|
+
>
|
|
16680
|
+
<NestedShadowButton testId="nested-shadow-button" />
|
|
16681
|
+
<div style={{ position: "relative", zIndex: 2000 }}>
|
|
16682
|
+
<slot name="slotted" />
|
|
16683
|
+
</div>
|
|
16684
|
+
<Modal defaultOpen={true} onOpenChange={setIsOpen}>
|
|
16685
|
+
<ModalContent>
|
|
16686
|
+
<Dialog aria-label="Contained modal">
|
|
16687
|
+
<Box padding="xl">
|
|
16688
|
+
<Text>Contained in a shadow root</Text>
|
|
16689
|
+
</Box>
|
|
16690
|
+
</Dialog>
|
|
16691
|
+
</ModalContent>
|
|
16692
|
+
</Modal>
|
|
16693
|
+
</Box>
|
|
16694
|
+
</FrameProvider>
|
|
16695
|
+
</>
|
|
16696
|
+
);
|
|
16697
|
+
};
|
|
16698
|
+
|
|
16699
|
+
export const ContainedModalInShadowRootExample: React.FC = () => (
|
|
16700
|
+
<ShadowRoot style={{ position: "relative", width: 700, height: 450 }}>
|
|
16701
|
+
<ContainedModalContent />
|
|
16702
|
+
</ShadowRoot>
|
|
16703
|
+
);`},similarTo:[],figmaUrl:null},NumberFormat:{id:"core-utilities-numberformat",breadcrumb:"Core/Utilities/NumberFormat",importStatement:'import { NumberFormat } from "@baseline-ui/core";',description:"`NumberFormat` provides localized number formatting for the current locale. It automatically updates when the locale changes, and handles caching of the number formatter for performance.\nIt is a wrapper around the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) API.",documentation:`\`NumberFormat\` provides localized number formatting for the current locale. It automatically updates when the locale changes, and handles caching of the number formatter for performance.
|
|
15973
16704
|
It is a wrapper around the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) API.
|
|
15974
16705
|
|
|
15975
16706
|
\`\`\`jsx
|
|
@@ -19615,7 +20346,23 @@ className?: string
|
|
|
19615
20346
|
* The style applied to the root element of the component.
|
|
19616
20347
|
*/
|
|
19617
20348
|
style?: React.CSSProperties
|
|
19618
|
-
}`,stories:{usage:[{id:"core-utilities-portal--basic",name:"Basic",snippet:"const Basic = () => <Portal>I am in a portal</Portal>;"}],implementation
|
|
20349
|
+
}`,stories:{usage:[{id:"core-utilities-portal--basic",name:"Basic",snippet:"const Basic = () => <Portal>I am in a portal</Portal>;"}],implementation:`import React from "react";
|
|
20350
|
+
|
|
20351
|
+
import { ThemeProvider } from "../../ThemeProvider/ThemeProvider";
|
|
20352
|
+
import { minTouchTargetSizeVar } from "../../ThemeProvider/ThemeProvider.css";
|
|
20353
|
+
import { Portal } from "../Portal";
|
|
20354
|
+
|
|
20355
|
+
// "never", not "always": the CT config emulates prefers-reduced-motion, so the "user" default already resolves to true.
|
|
20356
|
+
export const PortalInsideThemeProviderExample = () => (
|
|
20357
|
+
<ThemeProvider theme="dark" reducedMotion="never" minTouchTargetSize={44}>
|
|
20358
|
+
<Portal>
|
|
20359
|
+
<div
|
|
20360
|
+
data-testid="touch-target"
|
|
20361
|
+
style={{ width: minTouchTargetSizeVar }}
|
|
20362
|
+
/>
|
|
20363
|
+
</Portal>
|
|
20364
|
+
</ThemeProvider>
|
|
20365
|
+
);`},similarTo:[],figmaUrl:null},Preview:{id:"core-content-preview",breadcrumb:"Core/Content/Preview",importStatement:'import { InkSvg, Preview, VariantViewer } from "@baseline-ui/core";',description:"`Preview` renders a thumbnail of an image, SVG, or text snippet with optional action buttons overlaid on it. Use it to surface a visual sample of an asset that the user can inspect or act on without opening the full item.",documentation:'`Preview` renders a thumbnail of an image, SVG, or text snippet with optional action buttons overlaid on it. Use it to surface a visual sample of an asset that the user can inspect or act on without opening the full item.\n\n* Supports SVG, images and text\n* Supports custom action buttons to interact with the preview\n* Exposed to assistive technologies using ARIA attributes\n* Supports keyboard, mouse and touch interactions\n\n```jsx\nimport { Preview } from "@baseline-ui/core";\n\n<Preview imageSrc="/portrait.png" />;\n```\n\n`svgSrc` accepts a React element or an SVG string. A string is sanitized before it is rendered: scripts, event handlers and `javascript:` URLs are removed, along with elements such as `use`, `animate`, `set` and `foreignObject`. Sprite icons that reference a symbol with `<use href="#id">` therefore render blank; pass a React element to render them. A string SVG is rendered after the component mounts, so server-rendered HTML contains an empty preview that fills in on the client.\n\nThe `Preview` component has two variants. The two variants only differ in styling. It can be controlled using the `isInline` prop.\n\nThe `Preview` component can be disabled. When disabled, the preview is not interactive and the action buttons are not rendered.\n\n| Selector | Description |\n| -------------------- | ----------------------------------------------------------------- |\n| \\[data-disabled] | Whether the component is disabled. |\n| \\[data-focused] | Whether the component is focused, either via a mouse or keyboard. |\n| \\[data-hovered] | Whether the component is currently hovered with a mouse. |\n| \\[data-focus-visible] | Whether the component is keyboard focused. |\n\n| Key | Function |\n| ------------ | -------------------------------- |\n| `Tab` | Focus the preview |\n| `ArrowLeft` | Focus the previous action button |\n| `ArrowRight` | Focus the next action button |',props:`interface PreviewProps {
|
|
19619
20366
|
/**
|
|
19620
20367
|
* @deprecated Do not use in new components. This is a legacy block
|
|
19621
20368
|
* identifier; new components should exclude it via
|
|
@@ -20311,11 +21058,19 @@ const colorRenderItem: RadioGroupProps["renderOption"] = (
|
|
|
20311
21058
|
);
|
|
20312
21059
|
};
|
|
20313
21060
|
|
|
20314
|
-
export const CustomRenderItem: React.FC<
|
|
20315
|
-
|
|
20316
|
-
) => {
|
|
21061
|
+
export const CustomRenderItem: React.FC<
|
|
21062
|
+
Omit<RadioGroupProps, "items"> & { withDescriptions?: boolean }
|
|
21063
|
+
> = ({ withDescriptions, ...props }) => {
|
|
20317
21064
|
return (
|
|
20318
|
-
<RadioGroup
|
|
21065
|
+
<RadioGroup
|
|
21066
|
+
items={
|
|
21067
|
+
withDescriptions
|
|
21068
|
+
? colorItems.map((item) => ({ ...item, description: item.id }))
|
|
21069
|
+
: colorItems
|
|
21070
|
+
}
|
|
21071
|
+
renderOption={colorRenderItem}
|
|
21072
|
+
{...props}
|
|
21073
|
+
/>
|
|
20319
21074
|
);
|
|
20320
21075
|
};
|
|
20321
21076
|
|
|
@@ -21743,8 +22498,12 @@ import { Autocomplete, Virtualizer } from "react-aria-components";
|
|
|
21743
22498
|
import { useListData } from "react-stately";
|
|
21744
22499
|
|
|
21745
22500
|
import { ActionButton } from "../../ActionButton";
|
|
22501
|
+
import { Box } from "../../Box/Box";
|
|
21746
22502
|
import { items } from "../../ListBox/__tests__/testComponents";
|
|
21747
|
-
import {
|
|
22503
|
+
import {
|
|
22504
|
+
longListItems,
|
|
22505
|
+
virtualizeAutocompleteItems,
|
|
22506
|
+
} from "../../Menu/__tests__/data";
|
|
21748
22507
|
import { itemsWithSectionTitles } from "../../UNSAFE_ListBox/__tests__/testComponents";
|
|
21749
22508
|
import {
|
|
21750
22509
|
ListLayout,
|
|
@@ -21775,6 +22534,21 @@ export const SelectExample: React.FC<
|
|
|
21775
22534
|
);
|
|
21776
22535
|
};
|
|
21777
22536
|
|
|
22537
|
+
export const SelectNearViewportBottomExample: React.FC<
|
|
22538
|
+
Omit<React.ComponentProps<typeof Select>, "items">
|
|
22539
|
+
> = (args) => {
|
|
22540
|
+
return (
|
|
22541
|
+
<Box style={{ height: 3000, paddingTop: "calc(100vh - 120px)" }}>
|
|
22542
|
+
<Select
|
|
22543
|
+
aria-label="Choose an item"
|
|
22544
|
+
placeholder="Choose an item"
|
|
22545
|
+
{...args}
|
|
22546
|
+
items={longListItems}
|
|
22547
|
+
/>
|
|
22548
|
+
</Box>
|
|
22549
|
+
);
|
|
22550
|
+
};
|
|
22551
|
+
|
|
21778
22552
|
// "Apples" is a substring of "Pineapples" \u2014 exercises exact string matching
|
|
21779
22553
|
// in the tester's option() locator.
|
|
21780
22554
|
const substringItems = [
|
|
@@ -23403,6 +24177,14 @@ import { Switch, Separator } from "@baseline-ui/core";
|
|
|
23403
24177
|
|
|
23404
24178
|
The status labels can improve the accessibility of the Switch. However, they are not required. If you don't pass the \`statusLabel\` prop, the Switch will use the \`label\` prop to convey the meaning of the different states.
|
|
23405
24179
|
|
|
24180
|
+
Pass the \`description\` prop to show helper text below the label. It is announced by screen readers as the description of the Switch and is not part of its name.
|
|
24181
|
+
|
|
24182
|
+
\`\`\`jsx
|
|
24183
|
+
import { Switch } from "@baseline-ui/core";
|
|
24184
|
+
|
|
24185
|
+
<Switch label="Label" labelPosition="left" description="Helper text" />;
|
|
24186
|
+
\`\`\`
|
|
24187
|
+
|
|
23406
24188
|
| Selector | Description |
|
|
23407
24189
|
| -------------------- | ----------------------------------------------------------------- |
|
|
23408
24190
|
| \\[data-disabled] | Whether the component is disabled. |
|
|
@@ -23453,6 +24235,10 @@ style?: React.CSSProperties
|
|
|
23453
24235
|
* The label to display next to the switch.
|
|
23454
24236
|
*/
|
|
23455
24237
|
label?: React.ReactNode
|
|
24238
|
+
/**
|
|
24239
|
+
* Helper text shown below the label and announced as its accessible description.
|
|
24240
|
+
*/
|
|
24241
|
+
description?: string
|
|
23456
24242
|
/**
|
|
23457
24243
|
* The position of the label.
|
|
23458
24244
|
*/
|
|
@@ -23475,7 +24261,54 @@ statusLabel?: {
|
|
|
23475
24261
|
on: "On",
|
|
23476
24262
|
off: "Off",
|
|
23477
24263
|
}}
|
|
23478
|
-
labelPosition="left" />;`}
|
|
24264
|
+
labelPosition="left" />;`},{id:"core-forms-switch--with-label-in-left-and-status-disabled",name:"With Label In Left And Status Disabled",snippet:`const WithLabelInLeftAndStatusDisabled = () => <Switch
|
|
24265
|
+
label="Label"
|
|
24266
|
+
statusLabel={{
|
|
24267
|
+
on: "On",
|
|
24268
|
+
off: "Off",
|
|
24269
|
+
}}
|
|
24270
|
+
labelPosition="left"
|
|
24271
|
+
isDisabled />;`},{id:"core-forms-switch--with-description",name:"With Description",snippet:'const WithDescription = () => <Switch label="Label" description="Helper text" labelPosition="left" />;'},{id:"core-forms-switch--with-description-in-left-and-status",name:"With Description In Left And Status",snippet:`const WithDescriptionInLeftAndStatus = () => <Switch
|
|
24272
|
+
label="Label"
|
|
24273
|
+
description="Helper text"
|
|
24274
|
+
statusLabel={{
|
|
24275
|
+
on: "On",
|
|
24276
|
+
off: "Off",
|
|
24277
|
+
}}
|
|
24278
|
+
labelPosition="left" />;`},{id:"core-forms-switch--with-description-in-left-long-label",name:"With Description In Left Long Label",snippet:`const WithDescriptionInLeftLongLabel = () => <Switch
|
|
24279
|
+
label="A long label that wraps beside the switch"
|
|
24280
|
+
description="A long description that wraps below the label"
|
|
24281
|
+
labelPosition="left" />;`},{id:"core-forms-switch--with-description-on-top",name:"With Description On Top",snippet:`const WithDescriptionOnTop = () => <Switch
|
|
24282
|
+
label="Label"
|
|
24283
|
+
description="Helper text"
|
|
24284
|
+
statusLabel={{
|
|
24285
|
+
on: "On",
|
|
24286
|
+
off: "Off",
|
|
24287
|
+
}} />;`},{id:"core-forms-switch--with-description-disabled",name:"With Description Disabled",snippet:'const WithDescriptionDisabled = () => <Switch label="Label" description="Helper text" isDisabled labelPosition="left" />;'}],implementation:`import React from "react";
|
|
24288
|
+
|
|
24289
|
+
import { Switch } from "../Switch";
|
|
24290
|
+
|
|
24291
|
+
export const SwitchWithExternalDescriptionExample: React.FC = () => (
|
|
24292
|
+
<>
|
|
24293
|
+
<p id="external-help">Extra help</p>
|
|
24294
|
+
<Switch
|
|
24295
|
+
label="Wi-Fi"
|
|
24296
|
+
description="Connect automatically"
|
|
24297
|
+
aria-describedby="external-help"
|
|
24298
|
+
/>
|
|
24299
|
+
</>
|
|
24300
|
+
);
|
|
24301
|
+
|
|
24302
|
+
export const SwitchWithExternalLabelExample: React.FC = () => (
|
|
24303
|
+
<>
|
|
24304
|
+
<p id="external-label">Notifications</p>
|
|
24305
|
+
<Switch
|
|
24306
|
+
label="Wi-Fi"
|
|
24307
|
+
description="Connect automatically"
|
|
24308
|
+
aria-labelledby="external-label"
|
|
24309
|
+
/>
|
|
24310
|
+
</>
|
|
24311
|
+
);`},similarTo:[],figmaUrl:null},Table:{id:"core-collections-table",breadcrumb:"Core/Collections/Table",importStatement:`import {
|
|
23479
24312
|
ActionButton,
|
|
23480
24313
|
ActionIconButton,
|
|
23481
24314
|
AsyncLoadingTableExample,
|
|
@@ -25613,7 +26446,11 @@ tabHeaderStyle?: React.CSSProperties
|
|
|
25613
26446
|
}`,stories:{usage:[{id:"core-navigation-tabs--basic",name:"Basic",snippet:"const Basic = () => <BasicExample onRemove={undefined}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--controlled",name:"Controlled",snippet:'const Controlled = () => <BasicExample selectedValue="item-2" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--ghost",name:"Ghost",snippet:'const Ghost = () => <BasicExample variant="ghost" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-close-button",name:"With Close Button",snippet:`const WithCloseButton = () => <BasicExample
|
|
25614
26447
|
onRemove={() => {
|
|
25615
26448
|
alert("Delete");
|
|
25616
|
-
}}>{undefined}</BasicExample>;`},{id:"core-navigation-tabs--with-default-selected",name:"With Default Selected",snippet:'const WithDefaultSelected = () => <BasicExample defaultSelectedValue="item-2" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-disabled",name:"With Disabled",snippet:"const WithDisabled = () => <BasicExample isDisabled onRemove={undefined}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-
|
|
26449
|
+
}}>{undefined}</BasicExample>;`},{id:"core-navigation-tabs--with-default-selected",name:"With Default Selected",snippet:'const WithDefaultSelected = () => <BasicExample defaultSelectedValue="item-2" onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-disabled",name:"With Disabled",snippet:"const WithDisabled = () => <BasicExample isDisabled onRemove={undefined}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-disabled-and-close-button",name:"With Disabled And Close Button",snippet:`const WithDisabledAndCloseButton = () => <BasicExample
|
|
26450
|
+
isDisabled
|
|
26451
|
+
onRemove={() => {
|
|
26452
|
+
alert("Delete");
|
|
26453
|
+
}}>{undefined}</BasicExample>;`},{id:"core-navigation-tabs--with-specific-disabled",name:"With Specific Disabled",snippet:'const WithSpecificDisabled = () => <BasicExample disabledValues={new Set(["item-2"])} onRemove={undefined}>{undefined}</BasicExample>;'},{id:"core-navigation-tabs--with-focusable-content",name:"With Focusable Content",snippet:"const WithFocusableContent = () => <BasicExample onRemove={undefined} includeFocusableContent={true}>{undefined}</BasicExample>;"},{id:"core-navigation-tabs--with-action-button",name:"With Action Button",snippet:"const WithActionButton = () => <AddButtonExample />;"}],implementation:`import { PlusIcon } from "@baseline-ui/icons/16";
|
|
25617
26454
|
import { themeVars } from "@baseline-ui/tokens";
|
|
25618
26455
|
import React from "react";
|
|
25619
26456
|
|
|
@@ -25709,7 +26546,11 @@ export const TabItemExample: React.FC<
|
|
|
25709
26546
|
);
|
|
25710
26547
|
};
|
|
25711
26548
|
|
|
25712
|
-
export const AddButtonExample
|
|
26549
|
+
export const AddButtonExample: React.FC<{
|
|
26550
|
+
disabledValues?: string[];
|
|
26551
|
+
isDisabled?: boolean;
|
|
26552
|
+
titleStyle?: React.CSSProperties;
|
|
26553
|
+
}> = ({ disabledValues, isDisabled, titleStyle }) => {
|
|
25713
26554
|
const [items, setItems] = React.useState([1, 2, 3]);
|
|
25714
26555
|
|
|
25715
26556
|
return (
|
|
@@ -25731,11 +26572,14 @@ export const AddButtonExample = () => {
|
|
|
25731
26572
|
icon: PlusIcon,
|
|
25732
26573
|
},
|
|
25733
26574
|
]}
|
|
26575
|
+
disabledValues={disabledValues ? new Set(disabledValues) : undefined}
|
|
26576
|
+
isDisabled={isDisabled}
|
|
25734
26577
|
>
|
|
25735
26578
|
{items.map((item) => (
|
|
25736
26579
|
<TabItem
|
|
25737
26580
|
style={contentStyle}
|
|
25738
26581
|
title={\`Item \${item}\`}
|
|
26582
|
+
titleStyle={titleStyle}
|
|
25739
26583
|
value={\`item-\${item}\`}
|
|
25740
26584
|
key={\`item-\${item}\`}
|
|
25741
26585
|
>
|
|
@@ -26156,7 +27000,34 @@ Pass \`defaultValue\` to set the starting page, or control it with \`value\` and
|
|
|
26156
27000
|
| ----------- | ---------------------------------------------------------------- |
|
|
26157
27001
|
| \`ArrowDown\` | Decrement the current page. |
|
|
26158
27002
|
| \`ArrowUp\` | Increment the current page. |
|
|
26159
|
-
| \`Enter\` | Change the current page to the value entered in the input field.
|
|
27003
|
+
| \`Enter\` | Change the current page to the value entered in the input field. |
|
|
27004
|
+
|
|
27005
|
+
Other keys reach ancestor handlers, so Tab leaves an enclosing \`Toolbar\` and Escape closes an enclosing overlay. When the field is read-only, every key does.
|
|
27006
|
+
|
|
27007
|
+
The stepper buttons are named "Previous Page" and "Next Page" unless \`decrementAriaLabel\` and \`incrementAriaLabel\` say otherwise.
|
|
27008
|
+
|
|
27009
|
+
The following strings are used by the \`TaggedPagination\` component and can be overridden via \`I18nProvider\`:
|
|
27010
|
+
|
|
27011
|
+
| Key | Default (en) |
|
|
27012
|
+
| ------------------------------- | ------------- |
|
|
27013
|
+
| \`bui.taggedPagination.nextPage\` | Next Page |
|
|
27014
|
+
| \`bui.taggedPagination.prevPage\` | Previous Page |
|
|
27015
|
+
|
|
27016
|
+
\`\`\`jsx
|
|
27017
|
+
import { I18nProvider, TaggedPagination } from "@baseline-ui/core";
|
|
27018
|
+
|
|
27019
|
+
<I18nProvider
|
|
27020
|
+
locale="en"
|
|
27021
|
+
messages={{
|
|
27022
|
+
en: {
|
|
27023
|
+
"bui.taggedPagination.nextPage": "Forward",
|
|
27024
|
+
"bui.taggedPagination.prevPage": "Back",
|
|
27025
|
+
},
|
|
27026
|
+
}}
|
|
27027
|
+
>
|
|
27028
|
+
<TaggedPagination label="Page" minValue={1} maxValue={4} />
|
|
27029
|
+
</I18nProvider>;
|
|
27030
|
+
\`\`\``,props:`interface TaggedPaginationProps {
|
|
26160
27031
|
/**
|
|
26161
27032
|
* @deprecated Do not use in new components. This is a legacy block
|
|
26162
27033
|
* identifier; new components should exclude it via
|
|
@@ -26191,13 +27062,25 @@ className?: string
|
|
|
26191
27062
|
*/
|
|
26192
27063
|
style?: React.CSSProperties
|
|
26193
27064
|
/**
|
|
26194
|
-
* Whether the decrement button
|
|
27065
|
+
* Whether the decrement button and ArrowDown are disabled.
|
|
26195
27066
|
*/
|
|
26196
27067
|
isDecrementButtonDisabled?: boolean
|
|
26197
27068
|
/**
|
|
26198
|
-
* Whether the increment button
|
|
27069
|
+
* Whether the increment button and ArrowUp are disabled.
|
|
26199
27070
|
*/
|
|
26200
27071
|
isIncrementButtonDisabled?: boolean
|
|
27072
|
+
/**
|
|
27073
|
+
* The accessible name and tooltip of the decrement button.
|
|
27074
|
+
*
|
|
27075
|
+
* @default "Previous Page"
|
|
27076
|
+
*/
|
|
27077
|
+
decrementAriaLabel?: string
|
|
27078
|
+
/**
|
|
27079
|
+
* The accessible name and tooltip of the increment button.
|
|
27080
|
+
*
|
|
27081
|
+
* @default "Next Page"
|
|
27082
|
+
*/
|
|
27083
|
+
incrementAriaLabel?: string
|
|
26201
27084
|
/**
|
|
26202
27085
|
* Determines the size of the component.
|
|
26203
27086
|
*
|
|
@@ -26210,12 +27093,14 @@ size?: "xs" | "sm" | "md"
|
|
|
26210
27093
|
label?: React.ReactNode
|
|
26211
27094
|
/**
|
|
26212
27095
|
* The aria-label for the description.
|
|
27096
|
+
*
|
|
27097
|
+
* @deprecated Has no effect.
|
|
26213
27098
|
*/
|
|
26214
27099
|
descriptionAriaLabel?: string
|
|
26215
27100
|
/**
|
|
26216
27101
|
* The type of the input field.
|
|
26217
27102
|
*
|
|
26218
|
-
* @default "
|
|
27103
|
+
* @default "text"
|
|
26219
27104
|
*/
|
|
26220
27105
|
type?: "number" | "text"
|
|
26221
27106
|
/**
|
|
@@ -26283,7 +27168,11 @@ valueToLabelMap?: Map<number, string>
|
|
|
26283
27168
|
}}
|
|
26284
27169
|
defaultProps={args}
|
|
26285
27170
|
/>
|
|
26286
|
-
);`},{id:"core-forms-taggedpagination--read-only",name:"Read Only",snippet:'const ReadOnly = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isReadOnly />;'},{id:"core-forms-taggedpagination--disabled",name:"Disabled",snippet:'const Disabled = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isDisabled />;'},{id:"core-forms-taggedpagination--
|
|
27171
|
+
);`},{id:"core-forms-taggedpagination--read-only",name:"Read Only",snippet:'const ReadOnly = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isReadOnly />;'},{id:"core-forms-taggedpagination--disabled",name:"Disabled",snippet:'const Disabled = () => <TaggedPaginationExample decrementAriaLabel="Decrement" incrementAriaLabel="Increment" isDisabled />;'},{id:"core-forms-taggedpagination--disabled-steppers",name:"Disabled Steppers",snippet:`const DisabledSteppers = () => <TaggedPaginationExample
|
|
27172
|
+
decrementAriaLabel="Decrement"
|
|
27173
|
+
incrementAriaLabel="Increment"
|
|
27174
|
+
isDecrementButtonDisabled
|
|
27175
|
+
isIncrementButtonDisabled />;`},{id:"core-forms-taggedpagination--with-page-label",name:"With Page Label",snippet:`const WithPageLabel = () => {
|
|
26287
27176
|
return (
|
|
26288
27177
|
<Box display="flex" flexDirection="column" gap="xl">
|
|
26289
27178
|
<TaggedPaginationExample
|
|
@@ -26318,12 +27207,16 @@ valueToLabelMap?: Map<number, string>
|
|
|
26318
27207
|
);
|
|
26319
27208
|
};`}],implementation:`import React from "react";
|
|
26320
27209
|
|
|
27210
|
+
import { ActionButton } from "../../ActionButton";
|
|
27211
|
+
import { Toolbar } from "../../Toolbar";
|
|
26321
27212
|
import { TaggedPagination } from "../TaggedPagination";
|
|
26322
27213
|
|
|
26323
27214
|
export const TaggedPaginationExample: React.FC<
|
|
26324
|
-
React.ComponentProps<typeof TaggedPagination>
|
|
26325
|
-
|
|
26326
|
-
|
|
27215
|
+
React.ComponentProps<typeof TaggedPagination> & {
|
|
27216
|
+
onAncestorKeyDown?: React.KeyboardEventHandler;
|
|
27217
|
+
}
|
|
27218
|
+
> = ({ onAncestorKeyDown, ...props }) => {
|
|
27219
|
+
const pagination = (
|
|
26327
27220
|
<TaggedPagination
|
|
26328
27221
|
valueToLabelMap={
|
|
26329
27222
|
new Map([
|
|
@@ -26342,7 +27235,26 @@ export const TaggedPaginationExample: React.FC<
|
|
|
26342
27235
|
{...props}
|
|
26343
27236
|
/>
|
|
26344
27237
|
);
|
|
26345
|
-
|
|
27238
|
+
|
|
27239
|
+
return onAncestorKeyDown ? (
|
|
27240
|
+
<div onKeyDown={onAncestorKeyDown}>{pagination}</div>
|
|
27241
|
+
) : (
|
|
27242
|
+
pagination
|
|
27243
|
+
);
|
|
27244
|
+
};
|
|
27245
|
+
|
|
27246
|
+
export const TaggedPaginationInToolbarExample: React.FC<
|
|
27247
|
+
React.ComponentProps<typeof TaggedPagination>
|
|
27248
|
+
> = (props) => (
|
|
27249
|
+
<div>
|
|
27250
|
+
<Toolbar>
|
|
27251
|
+
<ActionButton label="First" />
|
|
27252
|
+
<TaggedPaginationExample {...props} />
|
|
27253
|
+
<ActionButton label="Last" />
|
|
27254
|
+
</Toolbar>
|
|
27255
|
+
<ActionButton label="Outside" />
|
|
27256
|
+
</div>
|
|
27257
|
+
);`},similarTo:[],figmaUrl:null},Text:{id:"core-content-text",breadcrumb:"Core/Content/Text",importStatement:'import { Input, Label, Text, TextField, VariantViewer } from "@baseline-ui/core";',description:"`Text` is a typography primitive that renders strings with consistent type, size, and weight from the design system. Use it whenever you need to display textual content so that headings, body copy, values, and helper text stay visually aligned.",documentation:'`Text` is a typography primitive that renders strings with consistent type, size, and weight from the design system. Use it whenever you need to display textual content so that headings, body copy, values, and helper text stay visually aligned.\n\n* Consistent type, size, and weight pulled from the design system\n* Renders as any HTML element via the `elementType` prop\n* Opt-in integration with a container\'s context through the `slot` prop for automatic `aria-describedby` / `aria-labelledby` wiring\n\n```jsx\nimport { Text } from "@baseline-ui/core";\n\n<Text type="subtitle" size="sm">\n Text\n</Text>;\n```\n\nThe `Text` component supports the following types: `title`, `subtitle`, `body`, `label`, `value`, and `helper`. It\nalso supports the following sizes: `sm`, `md`, and `lg`.\n\n`Text` can integrate with a container component\'s context. Pass a `slot` name\nand the text picks up the `id` the container provides for that slot, so it gets\nassociated via `aria-describedby` / `aria-labelledby` without manually wiring an\n`id`.\n\n```jsx\n<Text slot="description">\n This description is linked to its field automatically.\n</Text>\n```\n\nSlot integration is **opt-in**: a `Text` without a `slot` never inherits an\nambient context, so it renders identically whether or not a container is\npresent. Naming a `slot` the surrounding container does not define will throw \u2014\nonly pass slots you know the container exposes.\n\nNo Baseline container currently provides a slotted `TextContext`, so this is\ngroundwork today: the mechanism is exercisable against raw React Aria containers\n(`TextField`, `Select`, `TagGroup`, etc.) but no Baseline component wires it up yet.\n\n`Text` always emits a stable class name you can target for styling.\n\n| Selector | Description |\n| ------------------ | ------------------------------------- |\n| `.BaselineUI-Text` | Applied to the rendered text element. |',props:`interface TextProps {
|
|
26346
27258
|
/**
|
|
26347
27259
|
* @deprecated Do not use in new components. This is a legacy block
|
|
26348
27260
|
* identifier; new components should exclude it via
|
|
@@ -31342,7 +32254,7 @@ export const DynamicListBoxExample: React.FC<
|
|
|
31342
32254
|
>
|
|
31343
32255
|
<Box
|
|
31344
32256
|
color={
|
|
31345
|
-
isSelected ? "
|
|
32257
|
+
isSelected ? "text.interactive.enabled" : "icon.primary"
|
|
31346
32258
|
}
|
|
31347
32259
|
typography="label.md.medium"
|
|
31348
32260
|
paddingY="md"
|
|
@@ -32708,9 +33620,10 @@ UNSAFE_enableInert?: boolean | ((isDrawer: boolean) => boolean)
|
|
|
32708
33620
|
/>
|
|
32709
33621
|
);`},{id:"core-overlays-modal-modalcontent--drawer-mobile",name:"Drawer Mobile",snippet:"const DrawerMobile = () => <ModalDrawerExample />;"},{id:"core-overlays-modal-modalcontent--drawer-mobile-with-nested-popover",name:"Drawer Mobile With Nested Popover",snippet:"const DrawerMobileWithNestedPopover = () => <SelectInsideModalExample />;"},{id:"core-overlays-modal-modalcontent--uncontrolled-interaction-outside",name:"Uncontrolled Interaction Outside",snippet:"const UncontrolledInteractionOutside = () => <UncontrolledInteractionOutsideExample />;"},{id:"core-overlays-modal-modalcontent--long-content",name:"Long Content",snippet:"const LongContent = () => <LongModalExample />;"},{id:"core-overlays-modal-modalcontent--form-controls",name:"Form Controls",snippet:"const FormControls = () => <FormControlsInModalExample defaultOpen={true} />;"},{id:"core-overlays-modal-modalcontent--with-inert",name:"With Inert",snippet:"const WithInert = () => <FormControlsInModalExample enableInert={true} />;",description:"Experimental: Uses the HTML `inert` attribute instead of `aria-hidden` to hide elements outside the modal. This makes elements truly non-interactive (not just hidden from screen readers) which can improve performance and accessibility. Note: With inert enabled, elements outside the modal cannot be clicked or focused. Try interacting with the background elements when the modal is open vs closed."},{id:"core-overlays-modal-modalcontent--with-disabled-focus-management",name:"With Disabled Focus Management",snippet:"const WithDisabledFocusManagement = () => <DisabledFocusManagementExample />;",description:"Demonstrates `disableFocusManagement` with a FrameProvider. When the modal is open, the text input outside the FrameProvider container remains interactive because focus trapping and restoration are disabled."}],implementation:`import { IFrame, ShadowRoot } from "@baseline-ui/test-utils/client";
|
|
32710
33622
|
import { sprinkles } from "@baseline-ui/tokens";
|
|
32711
|
-
import { getOwnerDocument } from "@react-aria/utils";
|
|
32712
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
33623
|
+
import { getOwnerDocument, isShadowRoot } from "@react-aria/utils";
|
|
33624
|
+
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
32713
33625
|
import { VisuallyHidden, useId } from "react-aria";
|
|
33626
|
+
import { createPortal } from "react-dom";
|
|
32714
33627
|
|
|
32715
33628
|
import { ActionButton } from "../../ActionButton";
|
|
32716
33629
|
import { Box } from "../../Box";
|
|
@@ -33176,7 +34089,101 @@ export const ModalLateBodyContainerExample: React.FC<
|
|
|
33176
34089
|
)}
|
|
33177
34090
|
</Box>
|
|
33178
34091
|
);
|
|
33179
|
-
}
|
|
34092
|
+
};
|
|
34093
|
+
|
|
34094
|
+
const NestedShadowButton: React.FC<{ testId: string }> = ({ testId }) => {
|
|
34095
|
+
const [hostRoot, setHostRoot] = useState<Element["shadowRoot"]>(null);
|
|
34096
|
+
const hostRef = useCallback((host: HTMLDivElement | null) => {
|
|
34097
|
+
if (host)
|
|
34098
|
+
setHostRoot(host.shadowRoot ?? host.attachShadow({ mode: "open" }));
|
|
34099
|
+
}, []);
|
|
34100
|
+
|
|
34101
|
+
return (
|
|
34102
|
+
// Stacked above the underlay so the click reaches the nested shadow root.
|
|
34103
|
+
<div ref={hostRef} style={{ position: "relative", zIndex: 2000 }}>
|
|
34104
|
+
{hostRoot
|
|
34105
|
+
? createPortal(<button data-testid={testId}>Nested</button>, hostRoot)
|
|
34106
|
+
: null}
|
|
34107
|
+
</div>
|
|
34108
|
+
);
|
|
34109
|
+
};
|
|
34110
|
+
|
|
34111
|
+
const ContainedModalContent: React.FC = () => {
|
|
34112
|
+
const [container, setContainer] = useState<HTMLElement | null>(null);
|
|
34113
|
+
const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(
|
|
34114
|
+
null,
|
|
34115
|
+
);
|
|
34116
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
34117
|
+
const [outsideClicks, setOutsideClicks] = useState(0);
|
|
34118
|
+
|
|
34119
|
+
// A light-DOM child of the outer host, rendered by the <slot> in the container.
|
|
34120
|
+
useEffect(() => {
|
|
34121
|
+
const root = container?.getRootNode();
|
|
34122
|
+
if (!root || !isShadowRoot(root)) return;
|
|
34123
|
+
const host = root.host;
|
|
34124
|
+
const button = host.ownerDocument.createElement("button");
|
|
34125
|
+
button.slot = "slotted";
|
|
34126
|
+
button.dataset.testid = "slotted-button";
|
|
34127
|
+
button.textContent = "Slotted";
|
|
34128
|
+
host.append(button);
|
|
34129
|
+
return () => {
|
|
34130
|
+
button.remove();
|
|
34131
|
+
};
|
|
34132
|
+
}, [container]);
|
|
34133
|
+
|
|
34134
|
+
return (
|
|
34135
|
+
<>
|
|
34136
|
+
<button
|
|
34137
|
+
data-testid="outside-button"
|
|
34138
|
+
onClick={() => {
|
|
34139
|
+
setOutsideClicks((count) => count + 1);
|
|
34140
|
+
}}
|
|
34141
|
+
>
|
|
34142
|
+
Outside
|
|
34143
|
+
</button>
|
|
34144
|
+
<span data-testid="outside-clicks">{outsideClicks}</span>
|
|
34145
|
+
<span data-testid="modal-state">{isOpen ? "open" : "closed"}</span>
|
|
34146
|
+
<div ref={setPortalContainer}>
|
|
34147
|
+
<NestedShadowButton testId="portal-nested-shadow-button" />
|
|
34148
|
+
</div>
|
|
34149
|
+
<FrameProvider
|
|
34150
|
+
container={container}
|
|
34151
|
+
portalContainer={portalContainer}
|
|
34152
|
+
shouldContainOverlays="always"
|
|
34153
|
+
>
|
|
34154
|
+
<Box
|
|
34155
|
+
ref={setContainer}
|
|
34156
|
+
data-testid="container"
|
|
34157
|
+
style={{ width: 400, height: 200 }}
|
|
34158
|
+
display="flex"
|
|
34159
|
+
flexDirection="column"
|
|
34160
|
+
alignItems="center"
|
|
34161
|
+
justifyContent="flex-end"
|
|
34162
|
+
>
|
|
34163
|
+
<NestedShadowButton testId="nested-shadow-button" />
|
|
34164
|
+
<div style={{ position: "relative", zIndex: 2000 }}>
|
|
34165
|
+
<slot name="slotted" />
|
|
34166
|
+
</div>
|
|
34167
|
+
<Modal defaultOpen={true} onOpenChange={setIsOpen}>
|
|
34168
|
+
<ModalContent>
|
|
34169
|
+
<Dialog aria-label="Contained modal">
|
|
34170
|
+
<Box padding="xl">
|
|
34171
|
+
<Text>Contained in a shadow root</Text>
|
|
34172
|
+
</Box>
|
|
34173
|
+
</Dialog>
|
|
34174
|
+
</ModalContent>
|
|
34175
|
+
</Modal>
|
|
34176
|
+
</Box>
|
|
34177
|
+
</FrameProvider>
|
|
34178
|
+
</>
|
|
34179
|
+
);
|
|
34180
|
+
};
|
|
34181
|
+
|
|
34182
|
+
export const ContainedModalInShadowRootExample: React.FC = () => (
|
|
34183
|
+
<ShadowRoot style={{ position: "relative", width: 700, height: 450 }}>
|
|
34184
|
+
<ContainedModalContent />
|
|
34185
|
+
</ShadowRoot>
|
|
34186
|
+
);`},similarTo:[],figmaUrl:null},PointPickerContent:{id:"core-content-pointpicker-pointpickercontent",importStatement:`import {
|
|
33180
34187
|
Box,
|
|
33181
34188
|
MultiplePointPickersExample,
|
|
33182
34189
|
PointPickerContent,
|
|
@@ -37392,8 +38399,12 @@ import { Autocomplete, Virtualizer } from "react-aria-components";
|
|
|
37392
38399
|
import { useListData } from "react-stately";
|
|
37393
38400
|
|
|
37394
38401
|
import { ActionButton } from "../../ActionButton";
|
|
38402
|
+
import { Box } from "../../Box/Box";
|
|
37395
38403
|
import { items } from "../../ListBox/__tests__/testComponents";
|
|
37396
|
-
import {
|
|
38404
|
+
import {
|
|
38405
|
+
longListItems,
|
|
38406
|
+
virtualizeAutocompleteItems,
|
|
38407
|
+
} from "../../Menu/__tests__/data";
|
|
37397
38408
|
import { itemsWithSectionTitles } from "../../UNSAFE_ListBox/__tests__/testComponents";
|
|
37398
38409
|
import {
|
|
37399
38410
|
ListLayout,
|
|
@@ -37424,6 +38435,21 @@ export const SelectExample: React.FC<
|
|
|
37424
38435
|
);
|
|
37425
38436
|
};
|
|
37426
38437
|
|
|
38438
|
+
export const SelectNearViewportBottomExample: React.FC<
|
|
38439
|
+
Omit<React.ComponentProps<typeof Select>, "items">
|
|
38440
|
+
> = (args) => {
|
|
38441
|
+
return (
|
|
38442
|
+
<Box style={{ height: 3000, paddingTop: "calc(100vh - 120px)" }}>
|
|
38443
|
+
<Select
|
|
38444
|
+
aria-label="Choose an item"
|
|
38445
|
+
placeholder="Choose an item"
|
|
38446
|
+
{...args}
|
|
38447
|
+
items={longListItems}
|
|
38448
|
+
/>
|
|
38449
|
+
</Box>
|
|
38450
|
+
);
|
|
38451
|
+
};
|
|
38452
|
+
|
|
37427
38453
|
// "Apples" is a substring of "Pineapples" \u2014 exercises exact string matching
|
|
37428
38454
|
// in the tester's option() locator.
|
|
37429
38455
|
const substringItems = [
|
|
@@ -38530,8 +39556,8 @@ the built-in English default. For most props an empty string is a real override:
|
|
|
38530
39556
|
\`closeLabel=""\` renders an empty label rather than falling back to \`"Close"\`.
|
|
38531
39557
|
|
|
38532
39558
|
The props that pre-date this feature keep their existing behaviour and treat \`""\` as
|
|
38533
|
-
unset: \`aria-label\` on \`Pagination\` and \`Stepper\`, \`Pagination\`'s \`
|
|
38534
|
-
\`decrementAriaLabel\`, \`ButtonSelect\`'s \`moreAriaLabel\`, \`ColorInput\`'s
|
|
39559
|
+
unset: \`aria-label\` on \`Pagination\` and \`Stepper\`, \`Pagination\`'s and \`TaggedPagination\`'s
|
|
39560
|
+
\`incrementAriaLabel\` and \`decrementAriaLabel\`, \`ButtonSelect\`'s \`moreAriaLabel\`, \`ColorInput\`'s
|
|
38535
39561
|
\`addColorButtonLabel\`, \`removeColorButtonLabel\` and \`customColorsLabel\`, \`Editor\`'s
|
|
38536
39562
|
\`submitButtonAriaLabel\` and \`cancelButtonAriaLabel\`, \`FreehandCanvas\`'s \`undoLabel\` and
|
|
38537
39563
|
\`redoLabel\`, and \`ImageDropZone\`'s \`pickerButtonLabel\`.
|
|
@@ -38559,6 +39585,7 @@ are not overridable this way.
|
|
|
38559
39585
|
Each component's documentation lists its overridable keys and shows an example. See:
|
|
38560
39586
|
|
|
38561
39587
|
* [Pagination](?path=/docs/core-forms-pagination--docs#translations)
|
|
39588
|
+
* [TaggedPagination](?path=/docs/core-forms-taggedpagination--docs#translations)
|
|
38562
39589
|
* [ColorInput](?path=/docs/core-forms-colorinput--docs#translations)
|
|
38563
39590
|
* [ImageDropZone](?path=/docs/core-forms-imagedropzone--docs#translations)
|
|
38564
39591
|
* [FreehandCanvas](?path=/docs/core-miscellaneous-freehandcanvas--docs#translations)
|
|
@@ -38598,7 +39625,9 @@ Review the ambiguous ones by hand \u2014 each deserves its own translation:
|
|
|
38598
39625
|
| \`redo\` | \`bui.editor.redo\`, \`bui.freehandCanvas.redo\` |
|
|
38599
39626
|
| \`selectAll\` | \`bui.editor.selectAll\`, \`bui.select.selectAll\` |
|
|
38600
39627
|
| \`undo\` | \`bui.editor.undo\`, \`bui.freehandCanvas.undo\` |
|
|
38601
|
-
| \`loading\` | \`bui.fileList.loading\`, \`bui.imageGallery.loading\`, \`bui.table.loading\`
|
|
39628
|
+
| \`loading\` | \`bui.fileList.loading\`, \`bui.imageGallery.loading\`, \`bui.table.loading\` |
|
|
39629
|
+
| \`nextPage\` | \`bui.pagination.nextPage\`, \`bui.taggedPagination.nextPage\` |
|
|
39630
|
+
| \`prevPage\` | \`bui.pagination.prevPage\`, \`bui.taggedPagination.prevPage\` |`,styling:`# Styling with Sprinkles
|
|
38602
39631
|
|
|
38603
39632
|
Baseline UI provides a powerful, type-safe styling system built on top of [vanilla-extract sprinkles](https://vanilla-extract.style/documentation/packages/sprinkles/).
|
|
38604
39633
|
|
|
@@ -39521,7 +40550,7 @@ padding={[null, "lg", "xl"]}
|
|
|
39521
40550
|
|
|
39522
40551
|
* [vanilla-extract sprinkles documentation](https://vanilla-extract.style/documentation/packages/sprinkles/) - Learn about the underlying sprinkles framework
|
|
39523
40552
|
* [Box component documentation](/docs/core-utilities-box--docs) - Detailed information about the Box component
|
|
39524
|
-
* [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var m={"8":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","ChevronRightFilledIcon","ChevronRightIcon","EllipseIcon","MinusIcon","PlusIcon","XIcon"],"12":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","EditIcon","EllipseIcon","EnterKeyIcon","LockFilledIcon","LockIcon","MinusIcon","MoreVIcon","MoreIcon","PlaceholderIcon","PlusIcon","SearchIcon","SizeIcon","TrashIcon","XIcon","ZoomIcon"],"16":["AlignBottomIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDiagonalTopLeftBottomRightIcon","ArrowDownCircleFilledIcon","ArrowDownIcon","ArrowIcon","ArrowLeftRightIcon","ArrowRightIcon","ArrowUpArrowDownIcon","ArrowUpIcon","AtIcon","AttachmentsIcon","AvatarIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BulletListIcon","CalendarIcon","CaretLeftIcon","CaretRightIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","CircleFilledIcon","ClockIcon","CopyIcon","CustomizeIcon","DocumentEditIcon","DownloadIcon","DuplicateIcon","EditIcon","ElipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FilterAltIcon","FolderIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FullScreenIcon","HelpCircleIcon","HelpIcon","HereIcon","HideIcon","HighlightTextAltIcon","HighlightTextIcon","HorizontalScrollIcon","ImageIcon","InfoCircleFilledIcon","InsertIcon","ItalicIcon","LightBulbIcon","LineIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MeasureIcon","MinusIcon","MoreIcon","MoreVerticalIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","NumberedListIcon","OpenIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageVerticalScrollIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PlaceholderIcon","PlayIcon","PlusIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","ReadOnlyIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedoIcon","RemoveFormattingIcon","ReorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RulerIcon","SearchIcon","SettingsIcon","ShowIcon","SlashCommandsIcon","SoundRecordIcon","StampIcon","StarFilledIcon","StarIcon","StrikeoutTextAltIcon","TableCellIcon","TableColumnIcon","TableHeaderIcon","TableIcon","TableRowIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextDecreaseIndentIcon","TextIcon","TextIncreaseIndentIcon","TextMarkIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UndoIcon","UnlockIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WindowedIcon","WorkflowIcon","XCircleFilledIcon","XIcon"],"20":["AddPageIcon","AnonymousIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpCircleFilledIcon","AtIcon","AvatarFilledIcon","BoldIcon","CalloutIcon","CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ClockIcon","CollapseIcon","CommentIcon","CopyIcon","CutIcon","DistanceIcon","DownloadIcon","DuplicateIcon","EditIcon","EllipseIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorAlternativeCircleIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FormDateIcon","FormSignatureIcon","FormTextFieldIcon","HelpCircleIcon","HighlightTextIcon","HomeIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","ItalicIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MinusIcon","MoreIcon","MoreVerticalIcon","MoveIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OpenIcon","PageMoveLeftIcon","PageMoveRightIcon","PagesInsertIcon","PasteIcon","PipetteIcon","PlusIcon","PrintIcon","RotateClockwiseIcon","SearchIcon","SettingsIcon","ShapeIcon","ShareIcon","SoundIcon","SoundRecordIcon","StarFilledIcon","StarIcon","StyleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UploadIcon","WarningFilledIcon","WarningIcon","XCircleFilledIcon","XCircleIcon","XIcon"],"24":["AddNoteCloudIcon","AddNoteIcon","AddTextSerifIcon","AiIcon","AirplaneIcon","AlignBottomIcon","AlignHorizontalCenterIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDownIcon","ArrowIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","AtIcon","AttachmentIcon","AvatarFilledIcon","AvatarIcon","BlendModeIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BorderColorIcon","BottomBorderIcon","BulletListIcon","CalibrateIcon","CaptureAddIcon","CaretDownIcon","CaretIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ChevronListIcon","ClockIcon","CloudyBorderIcon","CollapseIcon","ColorPaletteIcon","ColorSwatchIcon","CommentIcon","CommentInSidebarIcon","CommentOnPageIcon","CompareDocumentsIcon","CopyIcon","CopyPageIcon","CropIcon","CustomizeIcon","CutIcon","DateModifiedIcon","DatePlusIcon","DebugIcon","DocumentArrowDownCircleIcon","DocumentArrowDownIcon","DocumentArrowRightIcon","DocumentFilledIcon","DocumentLockIcon","DocumentPdfIcon","DownloadIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","DuplicateIcon","EditAnnotationsIcon","EditContentIcon","EditDocumentIcon","EditIcon","EditThumbnailsIcon","EllipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","EndCapArrowFilledIcon","EndCapArrowIcon","EndCapChevronFilledIcon","EndCapChevronIcon","EndCapCircleIcon","EndCapDiamondIcon","EndCapNoneIcon","EndCapSlantedIcon","EndCapSquareIcon","EndCapStraightIcon","EraserIcon","ErrorAltCircleFilledIcon","ErrorAltIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","ExpandVerticalIcon","FillColorIcon","FilterIcon","FitToHeightIcon","FivePagesHorizontalFilledIcon","FivePagesVerticalFilledIcon","FolderAddIcon","FolderIcon","FontListIcon","FontSizeIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormPageIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FormTwoRadioButtonsIcon","FourPagesGridFilledIcon","FourPagesHorizontalFilledIcon","FourPagesStackedFilledIcon","FourPagesVerticalFilledIcon","GroupIcon","HamburgerMenuIcon","HandIcon","HeartIcon","HideIcon","HideRevealIcon","HighlightTextIcon","HomeIcon","HorizontalScollIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","InitialsIcon","InnerHorizontalBorderIcon","InnerVerticalBorderIcon","InsertIcon","ItalicIcon","LayerBottomIcon","LayerDownIcon","LayerTopIcon","LayerUpIcon","LayersIcon","LeftBindingIcon","LeftBorderIcon","LineCapsIcon","LineIcon","LineSpacingIcon","LineStyleCloudyIcon","LineStyleDashedDoubleDashIcon","LineStyleDashedDoubleGapIcon","LineStyleDashedQuadrupleDashIcon","LineStyleDashedSingleGapIcon","LineStyleIcon","LineStyleSolidIcon","LineWidthIcon","LinkIcon","LockFilledIcon","LockIcon","MagicIcon","MagicPenIcon","MailIcon","MarkupIcon","MarqueeZoomIcon","MeasureIcon","MergeIcon","MessageCloudIcon","MinusIcon","MoonIcon","MoreCircleIcon","MoreIcon","MoreVerticalIcon","MoveAllDirectionsIcon","MoveLeftIcon","MoveLeftRightIcon","MoveRightIcon","MultiplePagesIcon","NonEditableIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OcrIcon","OpacityIcon","PageAddIcon","PageCurlIcon","PageDuplicateIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLandscapeIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageMoveLeftIcon","PageMoveRightIcon","PageNumberCircleIcon","PageNumberIcon","PagePortraitIcon","PageRemoveIcon","PageVerticalScrollIcon","PagesInsertAltIcon","PagesInsertIcon","PagesNewFromSelectionAltIcon","PagesNewFromSelectionIcon","PagesSelectAllIcon","PagesSelectNoneIcon","PasteBoardIcon","PastePageIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PinDropFilledIcon","PinDropIcon","PipetteIcon","PlayIcon","PlusCircleFilledIcon","PlusCircleIcon","PlusIcon","PointerIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","PrecisionIcon","PrintIcon","PrivateModeIcon","PushPinIcon","QuestionmarkCircleIcon","ReaderViewIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedactIcon","RedactRectangleIcon","RedactTextHighlighterIcon","RedactionTextRepeatingIcon","RedactionTextSingleIcon","RedoAllIcon","RedoIcon","RegexIcon","ReplaceIcon","RightBindingIcon","RightBorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RotateObjectClockwiseIcon","RotateObjectCounterClockwiseIcon","RulerIcon","ScaleIcon","SearchCircleIcon","SearchIcon","SearchSelectionIcon","SelectAllIcon","SelectionToolIcon","SettingsIcon","ShapesIcon","ShareAltIcon","ShareIcon","ShieldAddIcon","ShieldCheckmarkIcon","ShieldWarningIcon","ShieldXIcon","ShowIcon","SidebarIcon","SignOutIcon","SignatureDigitalIcon","SignatureIcon","SinglePageFilledIcon","SoundIcon","SquigglyTextIcon","StampAddIcon","StampIcon","StarFilledIcon","StarIcon","StartCapArrowFilledIcon","StartCapArrowIcon","StartCapChevronFilledIcon","StartCapChevronIcon","StartCapCircleIcon","StartCapDiamondIcon","StartCapNoneIcon","StartCapSlantedIcon","StartCapSquareIcon","StartCapStraightIcon","StrikeoutTextIcon","StyleFilledIcon","StyleIcon","StylusFilledIcon","StylusIcon","SunIcon","TableCellIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextColorIcon","TextIcon","TextPropertiesHideIcon","TextPropertiesShowIcon","TextSerifIcon","TextSmallerIcon","ThreePagesHorizontalFilledIcon","ThreePagesStackedFilledIcon","ThreePagesVerticalFilledIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TopBorderIcon","TrashIcon","TwoPagesHorizontalFilledIcon","TwoPagesVerticalFilledIcon","TypeTextIcon","UnderlineIcon","UnderlineTextIcon","UndoAllIcon","UndoIcon","UndoRedoIcon","UngroupIcon","UnlockIcon","UploadIcon","UserIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WidgetIcon","WorkflowIcon","XCircleFilledIcon","XCircleIcon","XIcon","ZoomInIcon","ZoomOutIcon"],"36":["ArrowRight","Check","Circle","Cross","Help","Inset","Key","NewParagraphAlt","NewParagraph","Note","PointerRight","SpeechBubble","Star"]};var r=["charts-barchart--basic","charts-barchart--custom-colors","charts-barchart--formatted","charts-barchart--hidden-axes","charts-barchart--many-series","charts-barchart--mixed-stacking","charts-barchart--single-series","charts-barchart--stacked","charts-barchart--stacked-with-three-series","charts-barchart--thicker-bars","charts-barchart--with-legend","charts-linechart--basic","charts-linechart--custom-colors","charts-linechart--formatted","charts-linechart--hidden-axes","charts-linechart--linear-curve","charts-linechart--many-lines","charts-linechart--single-line","charts-linechart--sparkline","charts-linechart--with-dots","charts-linechart--with-legend","charts-piechart--basic","charts-piechart--custom-colors","charts-piechart--donut","charts-piechart--long-legend-names","charts-piechart--many-slices","charts-piechart--no-labels","charts-piechart--no-legend","charts-piechart--no-tooltip","charts-piechart--small-slices-below-five-percent","core-buttons-actionbutton--as-div","core-buttons-actionbutton--basic","core-buttons-actionbutton--disabled","core-buttons-actionbutton--variants","core-buttons-actionbutton--with-both-icons","core-buttons-actionbutton--with-icon","core-buttons-actionbutton--with-popover","core-buttons-actiongroup--basic","core-buttons-actiongroup--default-selected","core-buttons-actiongroup--disabled","core-buttons-actiongroup--disabled-items","core-buttons-actiongroup--disabled-items-multi-select","core-buttons-actiongroup--disabled-with-selection","core-buttons-actiongroup--multi-select","core-buttons-actiongroup--multiple-default-selected","core-buttons-actiongroup--multiple-selected-items","core-buttons-actiongroup--single-item","core-buttons-actiongroup--single-select","core-buttons-actiongroup--with-custom-action-item","core-buttons-actiongroup--with-icon","core-buttons-actiongroup--with-icon-disabled","core-buttons-actiongroup--with-icon-multi-select","core-buttons-actiongroup--without-tooltip","core-buttons-actioniconbutton--basic","core-buttons-actioniconbutton--disabled","core-buttons-actioniconbutton--variants","core-buttons-actioniconbutton--with-popover","core-buttons-actioniconbutton--with-tooltip","core-buttons-reaction--basic","core-buttons-reaction--disabled","core-buttons-reaction--read-only","core-buttons-reaction--selected","core-buttons-reaction--variants","core-buttons-scrollcontrolbutton--basic","core-buttons-scrollcontrolbutton--hide-for-keyboard","core-buttons-scrollcontrolbutton--with-custom-delay","core-buttons-scrollcontrolbutton--with-reversed-items","core-buttons-scrollcontrolbutton--without-smooth-scroll","core-buttons-togglebutton--basic","core-buttons-togglebutton--controlled","core-buttons-togglebutton--default-selected","core-buttons-togglebutton--disabled","core-buttons-togglebutton--variants","core-buttons-togglebutton--with-icon","core-buttons-toggleiconbutton--basic","core-buttons-toggleiconbutton--primary-variants","core-buttons-toggleiconbutton--secondary-variants","core-buttons-toggleiconbutton--state-specific-icons","core-buttons-toggleiconbutton--teritary-variants","core-buttons-toggleiconbutton--toolbar-variants","core-buttons-toggleiconbutton--with-tooltip","core-collections-filelist--basic","core-collections-filelist--disabled","core-collections-filelist--disabled-items","core-collections-filelist--loading","core-collections-filelist--long-filename","core-collections-filelist--many-items","core-collections-filelist--mixed-states","core-collections-filelist--with-error","core-collections-gridlist--basic","core-collections-gridlist--default-selected-keys","core-collections-gridlist--disabled","core-collections-gridlist--disabled-rows","core-collections-gridlist--disallow-empty-selection","core-collections-gridlist--with-drag-and-drop","core-collections-gridlist--with-multiple-selection","core-collections-gridlist--with-single-selection","core-collections-imagegallery--basic","core-collections-imagegallery--more-items","core-collections-imagegallery--rtl-with-virtualization","core-collections-imagegallery--scrollable","core-collections-imagegallery--with-controlled-list","core-collections-imagegallery--with-custom-aspect-ratio","core-collections-imagegallery--with-custom-fit","core-collections-imagegallery--with-custom-image-dimensions","core-collections-imagegallery--with-custom-image-renderer","core-collections-imagegallery--with-custom-size","core-collections-imagegallery--with-deletion","core-collections-imagegallery--with-dynamic-list","core-collections-imagegallery--with-long-labels","core-collections-imagegallery--with-medium-size","core-collections-imagegallery--with-multiple-selection","core-collections-imagegallery--with-reordering","core-collections-imagegallery--with-single-selection","core-collections-imagegallery--with-single-selection-and-deletion","core-collections-imagegallery--with-virtualization","core-collections-listbox--basic","core-collections-listbox--controlled-auto-scroll","core-collections-listbox--drag-and-drop-custom-preview","core-collections-listbox--drag-and-drop-grid","core-collections-listbox--drag-and-drop-horizontal","core-collections-listbox--drag-and-drop-multiple","core-collections-listbox--drag-and-drop-single","core-collections-listbox--dynamic-items","core-collections-listbox--with-custom-option-style","core-collections-listbox--with-customized-section-titles","core-collections-listbox--with-default-selected","core-collections-listbox--with-disabled-items","core-collections-listbox--with-focus-loop","core-collections-listbox--with-padded-section-titles","core-collections-listbox--with-section-titles","core-collections-listbox--with-sections","core-collections-listbox--with-selected","core-collections-menu--basic","core-collections-menu--controlled-open","core-collections-menu--disabled","core-collections-menu--long-menu","core-collections-menu--multiple-selection","core-collections-menu--section-level-selection","core-collections-menu--single-selection","core-collections-menu--with-custom-options","core-collections-menu--with-custom-trigger","core-collections-menu--with-disabled-keys","core-collections-menu--with-disabled-submenu","core-collections-menu--with-icons","core-collections-menu--with-long-labels","core-collections-menu--with-sections","core-collections-menu--with-selected-keys-controlled","core-collections-menu--with-submenu","core-collections-table--async-loading","core-collections-table--default","core-collections-table--disabled-rows","core-collections-table--drag-and-drop","core-collections-table--empty","core-collections-table--long-text-content","core-collections-table--multiple-selection","core-collections-table--row-action","core-collections-table--selection-with-row-action","core-collections-table--single-selection","core-collections-table--sorting","core-collections-table--virtualized","core-collections-table--with-tag-and-menu","core-collections-table--with-toolbar","core-collections-taggroup--basic","core-collections-taggroup--disabled","core-collections-taggroup--disabled-items","core-collections-taggroup--group-variants","core-collections-taggroup--multi-select","core-collections-taggroup--removable","core-collections-taggroup--single-select","core-collections-taggroup--small-variants","core-collections-taggroup--variants","core-collections-treeview--basic","core-collections-treeview--custom-row","core-collections-treeview--custom-row-drag-and-drop","core-collections-treeview--deeply-nested","core-collections-treeview--drag-and-drop","core-collections-treeview--empty-tree","core-collections-treeview--flat-tree","core-collections-treeview--handle-only-drag-and-drop","core-collections-treeview--interactive-fields-drag-and-drop","core-collections-treeview--long-labels","core-collections-treeview--single-item","core-collections-treeview--virtualized-drag-and-drop","core-collections-treeview--virtualized-with-actions","core-collections-treeview--virtualized-with-descriptions","core-collections-treeview--virtualized-with-expand-control","core-collections-treeview--virtualized-with-rename","core-collections-treeview--with-actions-at-end","core-collections-treeview--with-controlled-expanded-keys","core-collections-treeview--with-custom-render-icons","core-collections-treeview--with-custom-render-item-title","core-collections-treeview--with-default-expanded-keys","core-collections-treeview--with-description","core-collections-treeview--with-icons","core-collections-treeview--with-primary-action","core-collections-treeview--with-primary-and-secondary-action","core-collections-treeview--with-primary-secondary-and-description-action","core-collections-treeview--with-rename","core-collections-treeview--with-selected-items","core-collections-treeview--with-virtualization","core-collections-unsafe-listbox--basic","core-collections-unsafe-listbox--controlled-auto-scroll","core-collections-unsafe-listbox--drag-and-drop-custom-preview","core-collections-unsafe-listbox--drag-and-drop-grid","core-collections-unsafe-listbox--drag-and-drop-horizontal","core-collections-unsafe-listbox--drag-and-drop-multiple","core-collections-unsafe-listbox--drag-and-drop-single","core-collections-unsafe-listbox--dynamic-items","core-collections-unsafe-listbox--virtualized-horizontal","core-collections-unsafe-listbox--virtualized-scroll-into-view","core-collections-unsafe-listbox--virtualized-vertical","core-collections-unsafe-listbox--virtualized-with-section-separators","core-collections-unsafe-listbox--virtualized-with-sections","core-collections-unsafe-listbox--with-custom-option-style","core-collections-unsafe-listbox--with-customized-section-titles","core-collections-unsafe-listbox--with-default-selected","core-collections-unsafe-listbox--with-disabled-items","core-collections-unsafe-listbox--with-focus-loop","core-collections-unsafe-listbox--with-padded-section-titles","core-collections-unsafe-listbox--with-section-titles","core-collections-unsafe-listbox--with-sections","core-collections-unsafe-listbox--with-selected","core-collections-virtualizer--grid-layout-example","core-collections-virtualizer--list-layout-example","core-collections-virtualizer--rtl-image-gallery-preset-example","core-collections-virtualizer--tree-view-preset-example","core-content-avatar--basic","core-content-avatar--disabled","core-content-avatar--variants","core-content-avatar--with-image","core-content-avatar--with-initials","core-content-avatar--with-notification","core-content-code--basic","core-content-code--with-scroll","core-content-colorswatch--basic","core-content-colorswatch--disabled","core-content-colorswatch--full-transparency","core-content-colorswatch--indeterminate","core-content-colorswatch--interactive","core-content-colorswatch--none","core-content-colorswatch--variants","core-content-colorswatch--with-custom-label","core-content-colorswatch--with-tooltip","core-content-colorswatch--with-transparency","core-content-kbd--common-shortcuts","core-content-kbd--complex-shortcut","core-content-kbd--key-combination","core-content-kbd--key-combination-with-symbols","core-content-kbd--modifier-key","core-content-kbd--single-key","core-content-kbd--symbols-showcase","core-content-markdown--basic","core-content-markdown--with-caret","core-content-pointpicker--basic","core-content-pointpicker--disabled","core-content-pointpicker-pointpickercontent--custom-cursor","core-content-pointpicker-pointpickercontent--custom-cursor-without-default","core-content-pointpicker-pointpickercontent--default","core-content-pointpicker-pointpickercontent--multiple-point-pickers","core-content-pointpicker-pointpickercontent--points-within-radius","core-content-pointpicker-pointpickercontent--programmatic-focus","core-content-pointpicker-pointpickercontent--snap-to-point","core-content-pointpicker-pointpickercontent--trailing-element","core-content-pointpicker-pointpickercontent--without-grid-lines","core-content-pointpicker-pointpickerdisplay--with-custom-scale","core-content-pointpicker-pointpickerdisplay--with-description","core-content-pointpicker-pointpickerdisplay--with-floating-display","core-content-preview--disabled","core-content-preview--image-preview","core-content-preview--svg-preview","core-content-preview--text-preview","core-content-preview--variants","core-content-preview--without-delete-button","core-content-separator--basic","core-content-separator--secondary","core-content-separator--secondary-vertical","core-content-separator--vertical","core-content-statuscard--basic","core-content-statuscard--interactive","core-content-statuscard--long-content","core-content-statuscard--truncated-title","core-content-statuscard--variants","core-content-statuscard--with-custom-icon","core-content-statuscard--with-trailing-element","core-content-statuscard--without-description","core-content-tag--basic","core-content-tag--disabled","core-content-tag--disabled-removable","core-content-tag--long-text","core-content-tag--removable","core-content-tag--selected","core-content-tag--selected-with-icon","core-content-tag--small","core-content-tag--small-with-icon","core-content-tag--with-icon","core-content-text--basic","core-content-text--slots","core-content-text--variants","core-feedback-skeleton--circle","core-feedback-skeleton--composed-example","core-feedback-skeleton--custom-shape","core-feedback-skeleton--document-view-area","core-feedback-skeleton--rectangle","core-feedback-skeleton--text-line","core-forms-buttonselect--basic","core-forms-buttonselect--controlled","core-forms-buttonselect--controlled-button-selection","core-forms-buttonselect--default-button-selected-value","core-forms-buttonselect--default-select-selected-value","core-forms-buttonselect--disabled","core-forms-buttonselect--exclude-from-tab-order","core-forms-buttonselect--items-without-icons","core-forms-buttonselect--long-text-labels","core-forms-buttonselect--many-items","core-forms-buttonselect--variants","core-forms-buttonselect--with-action-behaviour","core-forms-buttonselect--with-button-disabled-key","core-forms-buttonselect--with-callbacks","core-forms-buttonselect--with-default-open","core-forms-buttonselect--with-disabled-keys","core-forms-buttonselect--with-disabled-keys-and-default-selected","core-forms-buttonselect--with-hidden-label","core-forms-buttonselect--with-individual-button-behaviour","core-forms-buttonselect--with-multiple-disabled-keys","core-forms-buttonselect--with-validation-error","core-forms-buttonselect--without-tooltip","core-forms-calendar--default","core-forms-calendar--disabled","core-forms-calendar--extra-small","core-forms-calendar--extra-small-no-title","core-forms-calendar--fixed-weeks","core-forms-calendar--international-calendar","core-forms-calendar--read-only","core-forms-calendar--select-month","core-forms-calendar--select-month-and-year","core-forms-calendar--select-month-and-year-extra-small","core-forms-calendar--select-month-and-year-with-title","core-forms-calendar--select-month-extra-small","core-forms-calendar--select-month-with-title","core-forms-calendar--unavailable-dates","core-forms-calendar--with-default-value","core-forms-calendar--with-min-max","core-forms-calendar--with-title","core-forms-checkbox--checked","core-forms-checkbox--indeterminate","core-forms-checkbox--primary","core-forms-checkbox--with-error","core-forms-checkbox--with-label-at-end","core-forms-checkbox--with-label-at-start","core-forms-colorinput--basic","core-forms-colorinput--color-presets-only","core-forms-colorinput--controlled","core-forms-colorinput--disabled","core-forms-colorinput--indeterminate","core-forms-colorinput--lazy-picker","core-forms-colorinput--lazy-picker-mobile","core-forms-colorinput--with-alpha","core-forms-colorinput--with-controlled-open","core-forms-colorinput--with-custom-trigger","core-forms-colorinput--with-default-open","core-forms-colorinput--with-default-value","core-forms-colorinput--with-label","core-forms-colorinput--with-label-at-start","core-forms-colorinput--with-removal","core-forms-colorinput--without-alpha","core-forms-colorinput--without-color-label","core-forms-colorinput--without-color-presets","core-forms-colorinput-iconcolorinput--compact","core-forms-colorinput-iconcolorinput--compact-disabled","core-forms-colorinput-iconcolorinput--compact-indeterminate","core-forms-colorinput-iconcolorinput--disabled","core-forms-colorinput-iconcolorinput--indeterminate","core-forms-colorinput-iconcolorinput--standard","core-forms-colorinput-iconcolorinput--without-tooltip","core-forms-colorswatchpicker--basic","core-forms-colorswatchpicker--controlled","core-forms-colorswatchpicker--default-value","core-forms-colorswatchpicker--disabled","core-forms-colorswatchpicker--with-icon","core-forms-colorswatchpicker--with-label","core-forms-colorswatchpicker--with-label-at-start","core-forms-combobox--basic","core-forms-combobox--disabled","core-forms-combobox--dynamic-collections","core-forms-combobox--ghost-variant","core-forms-combobox--items-with-icon","core-forms-combobox--read-only","core-forms-combobox--variants","core-forms-combobox--with-custom-filter","core-forms-combobox--with-custom-number-value","core-forms-combobox--with-custom-value","core-forms-combobox--with-description","core-forms-combobox--with-error-message","core-forms-combobox--with-focus-menu-trigger","core-forms-combobox--with-label-at-start","core-forms-combobox--with-manual-menu-trigger","core-forms-combobox--with-min-max-value","core-forms-combobox--with-render-option","core-forms-combobox--with-tooltip","core-forms-combobox--with-warning-message","core-forms-datefield--basic","core-forms-datefield--controlled","core-forms-datefield--default-value","core-forms-datefield--different-granularity","core-forms-datefield--disabled","core-forms-datefield--ghost-variant","core-forms-datefield--html-forms","core-forms-datefield--placeholder-value","core-forms-datefield--read-only","core-forms-datefield--variants","core-forms-datefield--with-calendar-icon","core-forms-datefield--with-calendar-picker","core-forms-datefield--with-calendar-picker-and-default-value","core-forms-datefield--with-calendar-picker-and-min-max","core-forms-datefield--with-calendar-picker-disabled","core-forms-datefield--with-calendar-picker-error","core-forms-datefield--with-calendar-picker-ghost","core-forms-datefield--with-calendar-picker-read-only","core-forms-datefield--with-error-message","core-forms-datefield--with-error-message-only","core-forms-datefield--with-label","core-forms-datefield--with-label-at-start","core-forms-datefield--with-min-and-max-value","core-forms-datefield--with-warning-message","core-forms-fileinput--basic","core-forms-fileinput--custom-labels","core-forms-fileinput--directory","core-forms-fileinput--disabled","core-forms-fileinput--label-position-start","core-forms-fileinput--multiple","core-forms-fileinput--variants","core-forms-fileinput--with-error","core-forms-fileinput--with-warning","core-forms-fileinput--without-label","core-forms-fileuploader--button-variant","core-forms-fileuploader--default","core-forms-fileuploader--disabled","core-forms-fileuploader--error-dropzone","core-forms-fileuploader--inline","core-forms-fileuploader--no-label","core-forms-fileuploader--variants","core-forms-imagedropzone--basic","core-forms-imagedropzone--controlled","core-forms-imagedropzone--disabled","core-forms-imagedropzone--variants","core-forms-imagedropzone--with-default-image","core-forms-imagedropzone--with-file-size-limit","core-forms-imagedropzone--with-file-type-restriction","core-forms-numberinput--basic","core-forms-numberinput--controlled","core-forms-numberinput--disabled","core-forms-numberinput--ghost-variant","core-forms-numberinput--read-only","core-forms-numberinput--variants","core-forms-numberinput--with-custom-step","core-forms-numberinput--with-description","core-forms-numberinput--with-error","core-forms-numberinput--with-error-and-error-message","core-forms-numberinput--with-label","core-forms-numberinput--with-label-at-start","core-forms-numberinput--with-min-and-max","core-forms-numberinput--without-stepper","core-forms-pagination--controlled","core-forms-pagination--disabled","core-forms-pagination--primary","core-forms-pagination--read-only","core-forms-pagination--variants","core-forms-pagination--with-custom-messages","core-forms-pagination--with-default-value","core-forms-pagination--with-large-numbers","core-forms-pagination--with-step","core-forms-pagination--without-actions","core-forms-radiogroup--basic","core-forms-radiogroup--controlled","core-forms-radiogroup--custom-render-option","core-forms-radiogroup--default-value","core-forms-radiogroup--disabled","core-forms-radiogroup--disabled-values","core-forms-radiogroup--horizontal","core-forms-radiogroup--read-only","core-forms-radiogroup--with-group-label","core-forms-radiogroup--with-group-label-at-start","core-forms-radiogroup--with-option-description","core-forms-radiogroup--with-option-label-at-start","core-forms-rangecalendar--default","core-forms-rangecalendar--disabled","core-forms-rangecalendar--extra-small","core-forms-rangecalendar--extra-small-no-title","core-forms-rangecalendar--fixed-weeks","core-forms-rangecalendar--international-calendar","core-forms-rangecalendar--read-only","core-forms-rangecalendar--select-month","core-forms-rangecalendar--select-month-and-year","core-forms-rangecalendar--select-month-and-year-with-title","core-forms-rangecalendar--select-month-with-title","core-forms-rangecalendar--unavailable-dates","core-forms-rangecalendar--with-default-value","core-forms-rangecalendar--with-min-max","core-forms-rangecalendar--with-title","core-forms-searchinput--basic","core-forms-searchinput--clear-button-focusable","core-forms-searchinput--disabled","core-forms-searchinput--variants","core-forms-select--basic","core-forms-select--controlled","core-forms-select--empty-items","core-forms-select--ghost","core-forms-select--long-labels","core-forms-select--long-list","core-forms-select--read-only","core-forms-select--scrollable","core-forms-select--with-autocomplete","core-forms-select--with-controlled-open","core-forms-select--with-custom-trigger","core-forms-select--with-default-open","core-forms-select--with-default-selected-item","core-forms-select--with-description","core-forms-select--with-disabled","core-forms-select--with-disabled-items","core-forms-select--with-error","core-forms-select--with-error-and-error-message","core-forms-select--with-label","core-forms-select--with-label-at-start","core-forms-select--with-section-headers","core-forms-select--with-sections","core-forms-select--with-virtualized-section-headers","core-forms-select--with-warning","core-forms-select--with-warning-and-warning-message","core-forms-select-iconselect--basic","core-forms-select-iconselect--disabled","core-forms-select-iconselect--read-only","core-forms-select-iconselect--with-default-open","core-forms-select-iconselect--with-error","core-forms-select-iconselect--with-warning","core-forms-select-iconselect--without-icon","core-forms-select-iconselect--without-tooltip","core-forms-select-multiselect--basic","core-forms-select-multiselect--controlled","core-forms-select-multiselect--ghost","core-forms-select-multiselect--hide-clear","core-forms-select-multiselect--hide-select-all","core-forms-select-multiselect--hide-select-all-and-clear","core-forms-select-multiselect--long-labels-as-tags","core-forms-select-multiselect--long-list","core-forms-select-multiselect--max-count-1","core-forms-select-multiselect--max-count-3","core-forms-select-multiselect--read-only","core-forms-select-multiselect--read-only-with-tags-open","core-forms-select-multiselect--scrollable","core-forms-select-multiselect--with-autocomplete","core-forms-select-multiselect--with-controlled-open","core-forms-select-multiselect--with-custom-trigger","core-forms-select-multiselect--with-default-open","core-forms-select-multiselect--with-default-selected-item","core-forms-select-multiselect--with-description","core-forms-select-multiselect--with-disabled","core-forms-select-multiselect--with-disabled-items","core-forms-select-multiselect--with-error","core-forms-select-multiselect--with-error-and-error-message","core-forms-select-multiselect--with-error-and-tags","core-forms-select-multiselect--with-label","core-forms-select-multiselect--with-label-at-start","core-forms-select-multiselect--with-sections","core-forms-select-multiselect--with-warning","core-forms-select-multiselect--with-warning-and-warning-message","core-forms-slider--basic","core-forms-slider--controlled","core-forms-slider--disabled","core-forms-slider--read-only","core-forms-slider--read-only-with-number-input","core-forms-slider--with-description","core-forms-slider--with-label","core-forms-slider--with-label-and-number-input","core-forms-slider--with-min-and-max","core-forms-slider--with-number-input","core-forms-slider--with-step","core-forms-slider-iconslider--basic","core-forms-slider-iconslider--disabled","core-forms-slider-iconslider--with-number-input","core-forms-slider-iconslider--without-tooltip","core-forms-switch--basic","core-forms-switch--disabled","core-forms-switch--selected","core-forms-switch--selected-disabled","core-forms-switch--with-label","core-forms-switch--with-label-and-status","core-forms-switch--with-label-in-left-and-status","core-forms-taggedpagination--basic","core-forms-taggedpagination--disabled","core-forms-taggedpagination--read-only","core-forms-taggedpagination--variant","core-forms-taggedpagination--with-page-label","core-forms-textinput--basic","core-forms-textinput--controlled","core-forms-textinput--disabled","core-forms-textinput--focusing-the-input","core-forms-textinput--ghost-variant","core-forms-textinput--html-forms","core-forms-textinput--multiline","core-forms-textinput--multiline-variants","core-forms-textinput--multiline-with-rows","core-forms-textinput--read-only","core-forms-textinput--variants","core-forms-textinput--with-description","core-forms-textinput--with-error-message","core-forms-textinput--with-label","core-forms-textinput--with-label-at-start","core-forms-textinput--with-warning-message","core-forms-timefield--basic","core-forms-timefield--controlled","core-forms-timefield--default-value","core-forms-timefield--disabled","core-forms-timefield--ghost-variant","core-forms-timefield--html-forms","core-forms-timefield--placeholder-value","core-forms-timefield--read-only","core-forms-timefield--variants","core-forms-timefield--with-error-message","core-forms-timefield--with-error-message-only","core-forms-timefield--with-label","core-forms-timefield--with-label-at-start","core-forms-timefield--with-min-and-max-value","core-forms-timefield--with-warning-message","core-media-audioplayer--basic","core-media-audioplayer--small","core-miscellaneous-editor--basic","core-miscellaneous-editor--headless-custom","core-miscellaneous-editor-plain--auto-focus","core-miscellaneous-editor-plain--auto-focus-at-end","core-miscellaneous-editor-plain--auto-focus-at-start","core-miscellaneous-editor-plain--clear-on-cancel","core-miscellaneous-editor-plain--clear-on-save","core-miscellaneous-editor-plain--controlled","core-miscellaneous-editor-plain--custom-submit-icon","core-miscellaneous-editor-plain--default-save-disabled","core-miscellaneous-editor-plain--disabled","core-miscellaneous-editor-plain--minimal","core-miscellaneous-editor-plain--minimal-disabled","core-miscellaneous-editor-plain--minimal-multiline","core-miscellaneous-editor-plain--minimal-save-disabled","core-miscellaneous-editor-plain--not-inline","core-miscellaneous-editor-plain--save-on-enter","core-miscellaneous-editor-plain--variants","core-miscellaneous-editor-plain--with-cancel","core-miscellaneous-editor-plain--with-dynamic-caret-position","core-miscellaneous-editor-rich-text--auto-focus","core-miscellaneous-editor-rich-text--auto-focus-at-end","core-miscellaneous-editor-rich-text--clear-on-cancel","core-miscellaneous-editor-rich-text--clear-on-save","core-miscellaneous-editor-rich-text--controlled","core-miscellaneous-editor-rich-text--default","core-miscellaneous-editor-rich-text--disabled","core-miscellaneous-editor-rich-text--long-content","core-miscellaneous-editor-rich-text--mentions","core-miscellaneous-editor-rich-text--mentions-max-suggestions","core-miscellaneous-editor-rich-text--not-inline","core-miscellaneous-editor-rich-text--save-disabled","core-miscellaneous-editor-rich-text--save-on-enter","core-miscellaneous-editor-rich-text--variants","core-miscellaneous-editor-rich-text--with-cancel","core-miscellaneous-editor-rich-text--with-custom-footer-buttons","core-miscellaneous-editor-rich-text--with-placeholder","core-miscellaneous-freehandcanvas--basic","core-miscellaneous-freehandcanvas--clear-button","core-miscellaneous-freehandcanvas--controlled","core-miscellaneous-freehandcanvas--default-value","core-miscellaneous-freehandcanvas--disabled","core-miscellaneous-freehandcanvas--history-enabled","core-miscellaneous-freehandcanvas--label","core-miscellaneous-freehandcanvas--streamlining","core-miscellaneous-icon--basic","core-miscellaneous-toolbar--basic","core-miscellaneous-toolbar--collapsible","core-miscellaneous-toolbar--vertical","core-miscellaneous-toolbar--with-inputs","core-miscellaneous-toolbar--with-over-flow","core-miscellaneous-toolbar--with-tabbing-within","core-miscellaneous-toolbar--with-tooltip","core-navigation-accordion--basic","core-navigation-accordion--controlled","core-navigation-accordion--default-expanded-keys","core-navigation-accordion--disabled","core-navigation-accordion--single-expansion","core-navigation-accordion-accordionitem--force-mount","core-navigation-accordion-accordionitem--show-actions-on-trigger-only","core-navigation-accordion-accordionitem--with-buttons","core-navigation-accordion-accordionitem--with-sub-labels","core-navigation-accordion-accordionitem--with-tabbable-content","core-navigation-disclosure--basic","core-navigation-disclosure--controlled","core-navigation-disclosure--truncated-title","core-navigation-disclosure--variants","core-navigation-disclosure--with-custom-icon","core-navigation-disclosure--with-interactive-content","core-navigation-disclosure--with-long-content","core-navigation-disclosure--without-description","core-navigation-link--basic","core-navigation-link--client-side-action","core-navigation-link--variants","core-navigation-stepper--all-complete","core-navigation-stepper--all-states","core-navigation-stepper--condensed","core-navigation-stepper--controlled","core-navigation-stepper--default","core-navigation-stepper--expanded-without-descriptions","core-navigation-stepper--frontier-ahead-of-selection","core-navigation-stepper--indicator-only","core-navigation-stepper--indicator-only-expanded","core-navigation-stepper--is-disabled","core-navigation-stepper--long-title-and-description","core-navigation-stepper--mixed-indicator-and-titled-items","core-navigation-stepper--per-item-aria-label-overrides-title","core-navigation-stepper--single-item","core-navigation-stepper--size-small-condensed","core-navigation-stepper--size-small-expanded","core-navigation-stepper--two-steps","core-navigation-stepper--with-disabled-step","core-navigation-tabs--basic","core-navigation-tabs--controlled","core-navigation-tabs--ghost","core-navigation-tabs--with-action-button","core-navigation-tabs--with-close-button","core-navigation-tabs--with-default-selected","core-navigation-tabs--with-disabled","core-navigation-tabs--with-focusable-content","core-navigation-tabs--with-specific-disabled","core-navigation-tabs-tabitem--with-icon","core-overlays-alertdialog--auto-focus-cancel-button","core-overlays-alertdialog--basic","core-overlays-alertdialog--custom-focused-button","core-overlays-alertdialog--default-open","core-overlays-alertdialog--long-content","core-overlays-alertdialog--only-cancel-button","core-overlays-alertdialog--only-primary-action","core-overlays-alertdialog--primary-action-disabled","core-overlays-alertdialog--separate-close-handler","core-overlays-alertdialog--with-text-input","core-overlays-alertdialog--with-title-only","core-overlays-alertdialog--without-close-button","core-overlays-alertdialog--without-icon","core-overlays-alertdialog--without-message-and-actions","core-overlays-dialog--basic","core-overlays-dialog--default-open","core-overlays-dialog--different-sizes","core-overlays-dialog--ghost","core-overlays-drawer--basic","core-overlays-drawer--with-action","core-overlays-inlinetoolbar--basic","core-overlays-inlinetoolbar--controlled","core-overlays-inlinetoolbar--disabled","core-overlays-inlinetoolbar--disabled-keys","core-overlays-inlinetoolbar--with-interactive-element","core-overlays-inlinetoolbar--with-scroll","core-overlays-modal--basic","core-overlays-modal--controlled","core-overlays-modal--default-open","core-overlays-modal-modalcontent--disabled-animation","core-overlays-modal-modalcontent--drawer-mobile","core-overlays-modal-modalcontent--drawer-mobile-with-nested-popover","core-overlays-modal-modalcontent--form-controls","core-overlays-modal-modalcontent--long-content","core-overlays-modal-modalcontent--not-dismissable","core-overlays-modal-modalcontent--uncontrolled-interaction-outside","core-overlays-modal-modalcontent--with-disabled-focus-management","core-overlays-modal-modalcontent--with-inert","core-overlays-popover--basic","core-overlays-popover--event-leak-fix","core-overlays-popover--with-arrow","core-overlays-popover--with-boundary-element","core-overlays-popover--with-custom-target","core-overlays-popover--with-dynamic-trigger-width","core-overlays-popover--with-no-boundary","core-overlays-popover--with-scrollable-content","core-overlays-popover--with-scrollable-content-non-modal","core-overlays-popover--with-scrollable-viewport","core-overlays-popover--with-tooltip","core-overlays-popover-popovercontent--basic","core-overlays-popover-popovercontent--contained-focus","core-overlays-popover-popovercontent--default-open-with-arrow","core-overlays-popover-popovercontent--disable-animation","core-overlays-popover-popovercontent--manual-repositioning","core-overlays-popover-popovercontent--nested-scrollable-containers","core-overlays-popover-popovercontent--scroll-repositioning","core-overlays-popover-popovercontent--with-boundary-axis","core-overlays-popover-popovercontent--with-horizontal-boundary-behavior","core-overlays-popover-popovertrigger--basic","core-overlays-popover-popovertrigger--function-children","core-overlays-popover-popovertrigger--with-updated-position","core-overlays-tooltip--basic","core-overlays-tooltip--controlled-open","core-overlays-tooltip--disabled","core-overlays-tooltip--focus-trigger","core-overlays-tooltip--no-text","core-overlays-tooltip--placement","core-overlays-tooltip--variants","core-overlays-tooltip--variants-size","core-overlays-tooltip--with-cross-offset","core-overlays-tooltip--with-focusable","core-overlays-tooltip--with-offset","core-overlays-tooltip--with-on-open-change","core-status-inlinealert--basic","core-status-inlinealert--compact","core-status-inlinealert--compact-with-action","core-status-inlinealert--compact-with-action-and-close","core-status-inlinealert--multi-line","core-status-inlinealert--multi-line-with-action","core-status-inlinealert--multi-line-with-action-and-close","core-status-inlinealert--sizes","core-status-inlinealert--variants","core-status-inlinealert--with-action","core-status-inlinealert--with-action-and-close","core-status-progressbar--basic","core-status-progressbar--variants","core-status-progressbar--with-custom-number-formatter","core-status-progressbar--with-custom-value-label","core-status-progressbar--with-error","core-status-progressbar--with-max-value","core-status-progressbar--with-min-and-max-value","core-status-progressbar--with-min-value","core-status-progressbar--with-no-description","core-status-progressbar--with-no-label","core-status-progressbar--with-show-value","core-status-progressspinner--error","core-status-progressspinner--primary","core-status-progressspinner--success","core-status-progressspinner--variants","core-status-progressspinner--without-label","core-status-toast--basic","core-status-toast--timeout","core-status-toast--variants-with-action","core-status-toast--variants-without-action","core-status-toast--with-action","core-utilities-actionable--basic","core-utilities-actionable--disabled","core-utilities-actionable--with-complex-content","core-utilities-actionable--with-div","core-utilities-actionable--with-dynamic-button-styling","core-utilities-actionable--with-dynamic-child-styling","core-utilities-box--basic","core-utilities-box--element-type","core-utilities-box--flex-layout","core-utilities-box--media-queries","core-utilities-box--nested-boxes","core-utilities-dateformat--basic","core-utilities-dateformat--time-only","core-utilities-dateformat--time-only-with-time-zone","core-utilities-dateformat--time-zone-24-hour","core-utilities-dateformat--with-date-and-time","core-utilities-deviceprovider--always-desktop","core-utilities-deviceprovider--always-mobile","core-utilities-deviceprovider--basic","core-utilities-deviceprovider--custom-breakpoints","core-utilities-frameprovider--always-contained","core-utilities-frameprovider--basic","core-utilities-frameprovider--custom-portal-container","core-utilities-frameprovider--inside-shadow-root","core-utilities-frameprovider--nested-containers","core-utilities-frameprovider--never-contained","core-utilities-frameprovider--popover-with-frame-boundary","core-utilities-frameprovider--portal-container-outside-container","core-utilities-frameprovider--with-interactive-elements-outside-of-container","core-utilities-group--basic","core-utilities-i18nprovider--string-format","core-utilities-messageformat--basic","core-utilities-numberformat--basic","core-utilities-numberformat--currency","core-utilities-numberformat--currency-with-fraction-digits","core-utilities-numberformat--currency-with-fraction-digits-and-currency-display","core-utilities-numberformat--percent","core-utilities-numberformat--percent-with-fraction-digits","core-utilities-panel--basic","core-utilities-panel--collapsible","core-utilities-panel--conditional","core-utilities-panel--controlled","core-utilities-panel--disabled-handle","core-utilities-panel--max-size","core-utilities-panel--multiple","core-utilities-panel--nested","core-utilities-panel--persistent","core-utilities-panel--vertical","core-utilities-portal--basic","core-utilities-themeprovider--basic","json-render-examples--dashboard","json-render-examples--data-table","json-render-examples--login-form","json-render-examples--settings-panel"];var h={version:"3.5.0"};var b=`
|
|
40553
|
+
* [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var m={"8":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","ChevronRightFilledIcon","ChevronRightIcon","EllipseIcon","MinusIcon","PlusIcon","XIcon"],"12":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","EditIcon","EllipseIcon","EnterKeyIcon","LockFilledIcon","LockIcon","MinusIcon","MoreVIcon","MoreIcon","PlaceholderIcon","PlusIcon","SearchIcon","SizeIcon","TrashIcon","XIcon","ZoomIcon"],"16":["AlignBottomIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDiagonalTopLeftBottomRightIcon","ArrowDownCircleFilledIcon","ArrowDownIcon","ArrowIcon","ArrowLeftRightIcon","ArrowRightIcon","ArrowUpArrowDownIcon","ArrowUpIcon","AtIcon","AttachmentsIcon","AvatarIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BulletListIcon","CalendarIcon","CaretLeftIcon","CaretRightIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","CircleFilledIcon","ClockIcon","CopyIcon","CustomizeIcon","DocumentEditIcon","DownloadIcon","DuplicateIcon","EditIcon","ElipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FilterAltIcon","FolderIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FullScreenIcon","HelpCircleIcon","HelpIcon","HereIcon","HideIcon","HighlightTextAltIcon","HighlightTextIcon","HorizontalScrollIcon","ImageIcon","InfoCircleFilledIcon","InsertIcon","ItalicIcon","LightBulbIcon","LineIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MeasureIcon","MinusIcon","MoreIcon","MoreVerticalIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","NumberedListIcon","OpenIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageVerticalScrollIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PlaceholderIcon","PlayIcon","PlusIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","ReadOnlyIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedoIcon","RemoveFormattingIcon","ReorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RulerIcon","SearchIcon","SettingsIcon","ShowIcon","SlashCommandsIcon","SoundRecordIcon","StampIcon","StarFilledIcon","StarIcon","StrikeoutTextAltIcon","TableCellIcon","TableColumnIcon","TableHeaderIcon","TableIcon","TableRowIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextDecreaseIndentIcon","TextIcon","TextIncreaseIndentIcon","TextMarkIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UndoIcon","UnlockIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WindowedIcon","WorkflowIcon","XCircleFilledIcon","XIcon"],"20":["AddPageIcon","AnonymousIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpCircleFilledIcon","AtIcon","AvatarFilledIcon","BoldIcon","CalloutIcon","CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ClockIcon","CollapseIcon","CommentIcon","CopyIcon","CutIcon","DistanceIcon","DownloadIcon","DuplicateIcon","EditIcon","EllipseIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorAlternativeCircleIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FormDateIcon","FormSignatureIcon","FormTextFieldIcon","HelpCircleIcon","HighlightTextIcon","HomeIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","ItalicIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MinusIcon","MoreIcon","MoreVerticalIcon","MoveIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OpenIcon","PageMoveLeftIcon","PageMoveRightIcon","PagesInsertIcon","PasteIcon","PipetteIcon","PlusIcon","PrintIcon","RotateClockwiseIcon","SearchIcon","SettingsIcon","ShapeIcon","ShareIcon","SoundIcon","SoundRecordIcon","StarFilledIcon","StarIcon","StyleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UploadIcon","WarningFilledIcon","WarningIcon","XCircleFilledIcon","XCircleIcon","XIcon"],"24":["AddNoteCloudIcon","AddNoteIcon","AddTextSerifIcon","AiIcon","AirplaneIcon","AlignBottomIcon","AlignHorizontalCenterIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDownIcon","ArrowIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","AtIcon","AttachmentIcon","AvatarFilledIcon","AvatarIcon","BlendModeIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BorderColorIcon","BottomBorderIcon","BulletListIcon","CalibrateIcon","CaptureAddIcon","CaretDownIcon","CaretIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ChevronListIcon","ClockIcon","CloudyBorderIcon","CollapseIcon","ColorPaletteIcon","ColorSwatchIcon","CommentIcon","CommentInSidebarIcon","CommentOnPageIcon","CompareDocumentsIcon","CopyIcon","CopyPageIcon","CropIcon","CustomizeIcon","CutIcon","DateModifiedIcon","DatePlusIcon","DebugIcon","DocumentArrowDownCircleIcon","DocumentArrowDownIcon","DocumentArrowRightIcon","DocumentFilledIcon","DocumentLockIcon","DocumentPdfIcon","DownloadIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","DuplicateIcon","EditAnnotationsIcon","EditContentIcon","EditDocumentIcon","EditIcon","EditThumbnailsIcon","EllipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","EndCapArrowFilledIcon","EndCapArrowIcon","EndCapChevronFilledIcon","EndCapChevronIcon","EndCapCircleIcon","EndCapDiamondIcon","EndCapNoneIcon","EndCapSlantedIcon","EndCapSquareIcon","EndCapStraightIcon","EraserIcon","ErrorAltCircleFilledIcon","ErrorAltIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","ExpandVerticalIcon","FillColorIcon","FilterIcon","FitToHeightIcon","FivePagesHorizontalFilledIcon","FivePagesVerticalFilledIcon","FolderAddIcon","FolderIcon","FontListIcon","FontSizeIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormPageIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FormTwoRadioButtonsIcon","FourPagesGridFilledIcon","FourPagesHorizontalFilledIcon","FourPagesStackedFilledIcon","FourPagesVerticalFilledIcon","GroupIcon","HamburgerMenuIcon","HandIcon","HeartIcon","HideIcon","HideRevealIcon","HighlightTextIcon","HomeIcon","HorizontalScollIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","InitialsIcon","InnerHorizontalBorderIcon","InnerVerticalBorderIcon","InsertIcon","ItalicIcon","LayerBottomIcon","LayerDownIcon","LayerTopIcon","LayerUpIcon","LayersIcon","LeftBindingIcon","LeftBorderIcon","LineCapsIcon","LineIcon","LineSpacingIcon","LineStyleCloudyIcon","LineStyleDashedDoubleDashIcon","LineStyleDashedDoubleGapIcon","LineStyleDashedQuadrupleDashIcon","LineStyleDashedSingleGapIcon","LineStyleIcon","LineStyleSolidIcon","LineWidthIcon","LinkIcon","LockFilledIcon","LockIcon","MagicIcon","MagicPenIcon","MailIcon","MarkupIcon","MarqueeZoomIcon","MeasureIcon","MergeIcon","MessageCloudIcon","MinusIcon","MoonIcon","MoreCircleIcon","MoreIcon","MoreVerticalIcon","MoveAllDirectionsIcon","MoveLeftIcon","MoveLeftRightIcon","MoveRightIcon","MultiplePagesIcon","NonEditableIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OcrIcon","OpacityIcon","PageAddIcon","PageCurlIcon","PageDuplicateIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLandscapeIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageMoveLeftIcon","PageMoveRightIcon","PageNumberCircleIcon","PageNumberIcon","PagePortraitIcon","PageRemoveIcon","PageVerticalScrollIcon","PagesInsertAltIcon","PagesInsertIcon","PagesNewFromSelectionAltIcon","PagesNewFromSelectionIcon","PagesSelectAllIcon","PagesSelectNoneIcon","PasteBoardIcon","PastePageIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PinDropFilledIcon","PinDropIcon","PipetteIcon","PlayIcon","PlusCircleFilledIcon","PlusCircleIcon","PlusIcon","PointerIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","PrecisionIcon","PrintIcon","PrivateModeIcon","PushPinIcon","QuestionmarkCircleIcon","ReaderViewIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedactIcon","RedactRectangleIcon","RedactTextHighlighterIcon","RedactionTextRepeatingIcon","RedactionTextSingleIcon","RedoAllIcon","RedoIcon","RegexIcon","ReplaceIcon","RightBindingIcon","RightBorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RotateObjectClockwiseIcon","RotateObjectCounterClockwiseIcon","RulerIcon","ScaleIcon","SearchCircleIcon","SearchIcon","SearchSelectionIcon","SelectAllIcon","SelectionToolIcon","SettingsIcon","ShapesIcon","ShareAltIcon","ShareIcon","ShieldAddIcon","ShieldCheckmarkIcon","ShieldWarningIcon","ShieldXIcon","ShowIcon","SidebarIcon","SignOutIcon","SignatureDigitalIcon","SignatureIcon","SinglePageFilledIcon","SoundIcon","SquigglyTextIcon","StampAddIcon","StampIcon","StarFilledIcon","StarIcon","StartCapArrowFilledIcon","StartCapArrowIcon","StartCapChevronFilledIcon","StartCapChevronIcon","StartCapCircleIcon","StartCapDiamondIcon","StartCapNoneIcon","StartCapSlantedIcon","StartCapSquareIcon","StartCapStraightIcon","StrikeoutTextIcon","StyleFilledIcon","StyleIcon","StylusFilledIcon","StylusIcon","SunIcon","TableCellIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextColorIcon","TextIcon","TextPropertiesHideIcon","TextPropertiesShowIcon","TextSerifIcon","TextSmallerIcon","ThreePagesHorizontalFilledIcon","ThreePagesStackedFilledIcon","ThreePagesVerticalFilledIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TopBorderIcon","TrashIcon","TwoPagesHorizontalFilledIcon","TwoPagesVerticalFilledIcon","TypeTextIcon","UnderlineIcon","UnderlineTextIcon","UndoAllIcon","UndoIcon","UndoRedoIcon","UngroupIcon","UnlockIcon","UploadIcon","UserIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WidgetIcon","WorkflowIcon","XCircleFilledIcon","XCircleIcon","XIcon","ZoomInIcon","ZoomOutIcon"],"36":["ArrowRight","Check","Circle","Cross","Help","Inset","Key","NewParagraphAlt","NewParagraph","Note","PointerRight","SpeechBubble","Star"]};var r=["charts-barchart--basic","charts-barchart--custom-colors","charts-barchart--formatted","charts-barchart--hidden-axes","charts-barchart--many-series","charts-barchart--mixed-stacking","charts-barchart--single-series","charts-barchart--stacked","charts-barchart--stacked-with-three-series","charts-barchart--thicker-bars","charts-barchart--with-legend","charts-linechart--basic","charts-linechart--custom-colors","charts-linechart--formatted","charts-linechart--hidden-axes","charts-linechart--linear-curve","charts-linechart--many-lines","charts-linechart--single-line","charts-linechart--sparkline","charts-linechart--with-dots","charts-linechart--with-legend","charts-piechart--basic","charts-piechart--custom-colors","charts-piechart--donut","charts-piechart--long-legend-names","charts-piechart--many-slices","charts-piechart--no-labels","charts-piechart--no-legend","charts-piechart--no-tooltip","charts-piechart--small-slices-below-five-percent","core-buttons-actionbutton--as-div","core-buttons-actionbutton--basic","core-buttons-actionbutton--disabled","core-buttons-actionbutton--variants","core-buttons-actionbutton--with-both-icons","core-buttons-actionbutton--with-icon","core-buttons-actionbutton--with-popover","core-buttons-actiongroup--basic","core-buttons-actiongroup--default-selected","core-buttons-actiongroup--disabled","core-buttons-actiongroup--disabled-items","core-buttons-actiongroup--disabled-items-multi-select","core-buttons-actiongroup--disabled-with-selection","core-buttons-actiongroup--multi-select","core-buttons-actiongroup--multiple-default-selected","core-buttons-actiongroup--multiple-selected-items","core-buttons-actiongroup--single-item","core-buttons-actiongroup--single-select","core-buttons-actiongroup--with-custom-action-item","core-buttons-actiongroup--with-icon","core-buttons-actiongroup--with-icon-disabled","core-buttons-actiongroup--with-icon-multi-select","core-buttons-actiongroup--without-tooltip","core-buttons-actioniconbutton--basic","core-buttons-actioniconbutton--disabled","core-buttons-actioniconbutton--variants","core-buttons-actioniconbutton--with-popover","core-buttons-actioniconbutton--with-tooltip","core-buttons-reaction--basic","core-buttons-reaction--disabled","core-buttons-reaction--read-only","core-buttons-reaction--selected","core-buttons-reaction--variants","core-buttons-scrollcontrolbutton--basic","core-buttons-scrollcontrolbutton--hide-for-keyboard","core-buttons-scrollcontrolbutton--with-custom-delay","core-buttons-scrollcontrolbutton--with-reversed-items","core-buttons-scrollcontrolbutton--without-smooth-scroll","core-buttons-togglebutton--basic","core-buttons-togglebutton--controlled","core-buttons-togglebutton--default-selected","core-buttons-togglebutton--disabled","core-buttons-togglebutton--variants","core-buttons-togglebutton--with-icon","core-buttons-toggleiconbutton--basic","core-buttons-toggleiconbutton--primary-variants","core-buttons-toggleiconbutton--secondary-variants","core-buttons-toggleiconbutton--state-specific-icons","core-buttons-toggleiconbutton--teritary-variants","core-buttons-toggleiconbutton--toolbar-variants","core-buttons-toggleiconbutton--with-tooltip","core-collections-filelist--basic","core-collections-filelist--disabled","core-collections-filelist--disabled-items","core-collections-filelist--loading","core-collections-filelist--long-filename","core-collections-filelist--many-items","core-collections-filelist--mixed-states","core-collections-filelist--with-error","core-collections-gridlist--basic","core-collections-gridlist--default-selected-keys","core-collections-gridlist--disabled","core-collections-gridlist--disabled-rows","core-collections-gridlist--disallow-empty-selection","core-collections-gridlist--with-drag-and-drop","core-collections-gridlist--with-multiple-selection","core-collections-gridlist--with-single-selection","core-collections-imagegallery--basic","core-collections-imagegallery--more-items","core-collections-imagegallery--rtl-with-virtualization","core-collections-imagegallery--scrollable","core-collections-imagegallery--with-controlled-list","core-collections-imagegallery--with-custom-aspect-ratio","core-collections-imagegallery--with-custom-fit","core-collections-imagegallery--with-custom-image-dimensions","core-collections-imagegallery--with-custom-image-renderer","core-collections-imagegallery--with-custom-size","core-collections-imagegallery--with-deletion","core-collections-imagegallery--with-disabled-deletion","core-collections-imagegallery--with-dynamic-list","core-collections-imagegallery--with-long-labels","core-collections-imagegallery--with-medium-size","core-collections-imagegallery--with-multiple-selection","core-collections-imagegallery--with-reordering","core-collections-imagegallery--with-single-selection","core-collections-imagegallery--with-single-selection-and-deletion","core-collections-imagegallery--with-virtualization","core-collections-listbox--basic","core-collections-listbox--controlled-auto-scroll","core-collections-listbox--drag-and-drop-custom-preview","core-collections-listbox--drag-and-drop-grid","core-collections-listbox--drag-and-drop-horizontal","core-collections-listbox--drag-and-drop-multiple","core-collections-listbox--drag-and-drop-single","core-collections-listbox--dynamic-items","core-collections-listbox--with-custom-option-style","core-collections-listbox--with-customized-section-titles","core-collections-listbox--with-default-selected","core-collections-listbox--with-disabled-items","core-collections-listbox--with-focus-loop","core-collections-listbox--with-padded-section-titles","core-collections-listbox--with-section-titles","core-collections-listbox--with-sections","core-collections-listbox--with-selected","core-collections-menu--basic","core-collections-menu--controlled-open","core-collections-menu--disabled","core-collections-menu--long-menu","core-collections-menu--multiple-selection","core-collections-menu--section-level-selection","core-collections-menu--single-selection","core-collections-menu--with-custom-options","core-collections-menu--with-custom-trigger","core-collections-menu--with-disabled-keys","core-collections-menu--with-disabled-submenu","core-collections-menu--with-icons","core-collections-menu--with-long-labels","core-collections-menu--with-sections","core-collections-menu--with-selected-keys-controlled","core-collections-menu--with-submenu","core-collections-table--async-loading","core-collections-table--default","core-collections-table--disabled-rows","core-collections-table--drag-and-drop","core-collections-table--empty","core-collections-table--long-text-content","core-collections-table--multiple-selection","core-collections-table--row-action","core-collections-table--selection-with-row-action","core-collections-table--single-selection","core-collections-table--sorting","core-collections-table--virtualized","core-collections-table--with-tag-and-menu","core-collections-table--with-toolbar","core-collections-taggroup--basic","core-collections-taggroup--disabled","core-collections-taggroup--disabled-items","core-collections-taggroup--group-variants","core-collections-taggroup--multi-select","core-collections-taggroup--removable","core-collections-taggroup--single-select","core-collections-taggroup--small-variants","core-collections-taggroup--variants","core-collections-treeview--basic","core-collections-treeview--custom-row","core-collections-treeview--custom-row-drag-and-drop","core-collections-treeview--deeply-nested","core-collections-treeview--drag-and-drop","core-collections-treeview--empty-tree","core-collections-treeview--flat-tree","core-collections-treeview--handle-only-drag-and-drop","core-collections-treeview--interactive-fields-drag-and-drop","core-collections-treeview--long-labels","core-collections-treeview--single-item","core-collections-treeview--virtualized-drag-and-drop","core-collections-treeview--virtualized-with-actions","core-collections-treeview--virtualized-with-descriptions","core-collections-treeview--virtualized-with-expand-control","core-collections-treeview--virtualized-with-rename","core-collections-treeview--with-actions-at-end","core-collections-treeview--with-controlled-expanded-keys","core-collections-treeview--with-custom-render-icons","core-collections-treeview--with-custom-render-item-title","core-collections-treeview--with-default-expanded-keys","core-collections-treeview--with-description","core-collections-treeview--with-icons","core-collections-treeview--with-primary-action","core-collections-treeview--with-primary-and-secondary-action","core-collections-treeview--with-primary-secondary-and-description-action","core-collections-treeview--with-rename","core-collections-treeview--with-selected-items","core-collections-treeview--with-virtualization","core-collections-unsafe-listbox--basic","core-collections-unsafe-listbox--controlled-auto-scroll","core-collections-unsafe-listbox--drag-and-drop-custom-preview","core-collections-unsafe-listbox--drag-and-drop-grid","core-collections-unsafe-listbox--drag-and-drop-horizontal","core-collections-unsafe-listbox--drag-and-drop-multiple","core-collections-unsafe-listbox--drag-and-drop-single","core-collections-unsafe-listbox--dynamic-items","core-collections-unsafe-listbox--virtualized-horizontal","core-collections-unsafe-listbox--virtualized-scroll-into-view","core-collections-unsafe-listbox--virtualized-vertical","core-collections-unsafe-listbox--virtualized-with-section-separators","core-collections-unsafe-listbox--virtualized-with-sections","core-collections-unsafe-listbox--with-custom-option-style","core-collections-unsafe-listbox--with-customized-section-titles","core-collections-unsafe-listbox--with-default-selected","core-collections-unsafe-listbox--with-disabled-items","core-collections-unsafe-listbox--with-focus-loop","core-collections-unsafe-listbox--with-padded-section-titles","core-collections-unsafe-listbox--with-section-titles","core-collections-unsafe-listbox--with-sections","core-collections-unsafe-listbox--with-selected","core-collections-virtualizer--grid-layout-example","core-collections-virtualizer--list-layout-example","core-collections-virtualizer--rtl-image-gallery-preset-example","core-collections-virtualizer--tree-view-preset-example","core-content-avatar--basic","core-content-avatar--disabled","core-content-avatar--variants","core-content-avatar--with-image","core-content-avatar--with-initials","core-content-avatar--with-notification","core-content-code--basic","core-content-code--with-scroll","core-content-colorswatch--basic","core-content-colorswatch--disabled","core-content-colorswatch--full-transparency","core-content-colorswatch--indeterminate","core-content-colorswatch--interactive","core-content-colorswatch--none","core-content-colorswatch--variants","core-content-colorswatch--with-custom-label","core-content-colorswatch--with-tooltip","core-content-colorswatch--with-transparency","core-content-kbd--common-shortcuts","core-content-kbd--complex-shortcut","core-content-kbd--key-combination","core-content-kbd--key-combination-with-symbols","core-content-kbd--modifier-key","core-content-kbd--single-key","core-content-kbd--symbols-showcase","core-content-markdown--basic","core-content-markdown--with-caret","core-content-pointpicker--basic","core-content-pointpicker--disabled","core-content-pointpicker-pointpickercontent--custom-cursor","core-content-pointpicker-pointpickercontent--custom-cursor-without-default","core-content-pointpicker-pointpickercontent--default","core-content-pointpicker-pointpickercontent--multiple-point-pickers","core-content-pointpicker-pointpickercontent--points-within-radius","core-content-pointpicker-pointpickercontent--programmatic-focus","core-content-pointpicker-pointpickercontent--snap-to-point","core-content-pointpicker-pointpickercontent--trailing-element","core-content-pointpicker-pointpickercontent--without-grid-lines","core-content-pointpicker-pointpickerdisplay--with-custom-scale","core-content-pointpicker-pointpickerdisplay--with-description","core-content-pointpicker-pointpickerdisplay--with-floating-display","core-content-preview--disabled","core-content-preview--image-preview","core-content-preview--svg-preview","core-content-preview--text-preview","core-content-preview--variants","core-content-preview--without-delete-button","core-content-separator--basic","core-content-separator--secondary","core-content-separator--secondary-vertical","core-content-separator--vertical","core-content-statuscard--basic","core-content-statuscard--interactive","core-content-statuscard--long-content","core-content-statuscard--truncated-title","core-content-statuscard--variants","core-content-statuscard--with-custom-icon","core-content-statuscard--with-trailing-element","core-content-statuscard--without-description","core-content-tag--basic","core-content-tag--disabled","core-content-tag--disabled-removable","core-content-tag--long-text","core-content-tag--removable","core-content-tag--selected","core-content-tag--selected-with-icon","core-content-tag--small","core-content-tag--small-with-icon","core-content-tag--with-icon","core-content-text--basic","core-content-text--slots","core-content-text--variants","core-feedback-skeleton--circle","core-feedback-skeleton--composed-example","core-feedback-skeleton--custom-shape","core-feedback-skeleton--document-view-area","core-feedback-skeleton--rectangle","core-feedback-skeleton--text-line","core-forms-buttonselect--basic","core-forms-buttonselect--controlled","core-forms-buttonselect--controlled-button-selection","core-forms-buttonselect--default-button-selected-value","core-forms-buttonselect--default-select-selected-value","core-forms-buttonselect--disabled","core-forms-buttonselect--exclude-from-tab-order","core-forms-buttonselect--items-without-icons","core-forms-buttonselect--long-text-labels","core-forms-buttonselect--many-items","core-forms-buttonselect--variants","core-forms-buttonselect--with-action-behaviour","core-forms-buttonselect--with-button-disabled-key","core-forms-buttonselect--with-callbacks","core-forms-buttonselect--with-default-open","core-forms-buttonselect--with-disabled-keys","core-forms-buttonselect--with-disabled-keys-and-default-selected","core-forms-buttonselect--with-hidden-label","core-forms-buttonselect--with-individual-button-behaviour","core-forms-buttonselect--with-multiple-disabled-keys","core-forms-buttonselect--with-validation-error","core-forms-buttonselect--without-tooltip","core-forms-calendar--default","core-forms-calendar--disabled","core-forms-calendar--extra-small","core-forms-calendar--extra-small-no-title","core-forms-calendar--fixed-weeks","core-forms-calendar--international-calendar","core-forms-calendar--read-only","core-forms-calendar--select-month","core-forms-calendar--select-month-and-year","core-forms-calendar--select-month-and-year-extra-small","core-forms-calendar--select-month-and-year-with-title","core-forms-calendar--select-month-extra-small","core-forms-calendar--select-month-with-title","core-forms-calendar--unavailable-dates","core-forms-calendar--with-default-value","core-forms-calendar--with-min-max","core-forms-calendar--with-title","core-forms-checkbox--checked","core-forms-checkbox--indeterminate","core-forms-checkbox--primary","core-forms-checkbox--with-error","core-forms-checkbox--with-label-at-end","core-forms-checkbox--with-label-at-start","core-forms-colorinput--basic","core-forms-colorinput--color-presets-only","core-forms-colorinput--controlled","core-forms-colorinput--disabled","core-forms-colorinput--indeterminate","core-forms-colorinput--lazy-picker","core-forms-colorinput--lazy-picker-mobile","core-forms-colorinput--with-alpha","core-forms-colorinput--with-controlled-open","core-forms-colorinput--with-custom-trigger","core-forms-colorinput--with-default-open","core-forms-colorinput--with-default-value","core-forms-colorinput--with-label","core-forms-colorinput--with-label-at-start","core-forms-colorinput--with-removal","core-forms-colorinput--without-alpha","core-forms-colorinput--without-color-label","core-forms-colorinput--without-color-presets","core-forms-colorinput-iconcolorinput--compact","core-forms-colorinput-iconcolorinput--compact-disabled","core-forms-colorinput-iconcolorinput--compact-indeterminate","core-forms-colorinput-iconcolorinput--disabled","core-forms-colorinput-iconcolorinput--indeterminate","core-forms-colorinput-iconcolorinput--standard","core-forms-colorinput-iconcolorinput--without-tooltip","core-forms-colorswatchpicker--basic","core-forms-colorswatchpicker--controlled","core-forms-colorswatchpicker--default-value","core-forms-colorswatchpicker--disabled","core-forms-colorswatchpicker--with-icon","core-forms-colorswatchpicker--with-label","core-forms-colorswatchpicker--with-label-at-start","core-forms-combobox--basic","core-forms-combobox--disabled","core-forms-combobox--dynamic-collections","core-forms-combobox--ghost-variant","core-forms-combobox--items-with-icon","core-forms-combobox--read-only","core-forms-combobox--variants","core-forms-combobox--with-custom-filter","core-forms-combobox--with-custom-number-value","core-forms-combobox--with-custom-value","core-forms-combobox--with-description","core-forms-combobox--with-error-message","core-forms-combobox--with-focus-menu-trigger","core-forms-combobox--with-label-at-start","core-forms-combobox--with-manual-menu-trigger","core-forms-combobox--with-min-max-value","core-forms-combobox--with-render-option","core-forms-combobox--with-tooltip","core-forms-combobox--with-warning-message","core-forms-datefield--basic","core-forms-datefield--controlled","core-forms-datefield--default-value","core-forms-datefield--different-granularity","core-forms-datefield--disabled","core-forms-datefield--ghost-variant","core-forms-datefield--html-forms","core-forms-datefield--placeholder-value","core-forms-datefield--read-only","core-forms-datefield--variants","core-forms-datefield--with-calendar-icon","core-forms-datefield--with-calendar-picker","core-forms-datefield--with-calendar-picker-and-default-value","core-forms-datefield--with-calendar-picker-and-min-max","core-forms-datefield--with-calendar-picker-disabled","core-forms-datefield--with-calendar-picker-error","core-forms-datefield--with-calendar-picker-ghost","core-forms-datefield--with-calendar-picker-read-only","core-forms-datefield--with-error-message","core-forms-datefield--with-error-message-only","core-forms-datefield--with-label","core-forms-datefield--with-label-at-start","core-forms-datefield--with-min-and-max-value","core-forms-datefield--with-warning-message","core-forms-fileinput--basic","core-forms-fileinput--custom-labels","core-forms-fileinput--directory","core-forms-fileinput--disabled","core-forms-fileinput--label-position-start","core-forms-fileinput--multiple","core-forms-fileinput--variants","core-forms-fileinput--with-error","core-forms-fileinput--with-warning","core-forms-fileinput--without-label","core-forms-fileuploader--button-variant","core-forms-fileuploader--default","core-forms-fileuploader--disabled","core-forms-fileuploader--error-dropzone","core-forms-fileuploader--inline","core-forms-fileuploader--no-label","core-forms-fileuploader--variants","core-forms-imagedropzone--basic","core-forms-imagedropzone--controlled","core-forms-imagedropzone--disabled","core-forms-imagedropzone--variants","core-forms-imagedropzone--with-default-image","core-forms-imagedropzone--with-file-size-limit","core-forms-imagedropzone--with-file-type-restriction","core-forms-numberinput--basic","core-forms-numberinput--controlled","core-forms-numberinput--disabled","core-forms-numberinput--ghost-variant","core-forms-numberinput--read-only","core-forms-numberinput--variants","core-forms-numberinput--with-custom-step","core-forms-numberinput--with-description","core-forms-numberinput--with-error","core-forms-numberinput--with-error-and-error-message","core-forms-numberinput--with-label","core-forms-numberinput--with-label-at-start","core-forms-numberinput--with-min-and-max","core-forms-numberinput--without-stepper","core-forms-pagination--controlled","core-forms-pagination--disabled","core-forms-pagination--primary","core-forms-pagination--read-only","core-forms-pagination--variants","core-forms-pagination--with-custom-messages","core-forms-pagination--with-default-value","core-forms-pagination--with-large-numbers","core-forms-pagination--with-step","core-forms-pagination--without-actions","core-forms-radiogroup--basic","core-forms-radiogroup--controlled","core-forms-radiogroup--custom-render-option","core-forms-radiogroup--default-value","core-forms-radiogroup--disabled","core-forms-radiogroup--disabled-values","core-forms-radiogroup--horizontal","core-forms-radiogroup--read-only","core-forms-radiogroup--with-group-label","core-forms-radiogroup--with-group-label-at-start","core-forms-radiogroup--with-option-description","core-forms-radiogroup--with-option-label-at-start","core-forms-rangecalendar--default","core-forms-rangecalendar--disabled","core-forms-rangecalendar--extra-small","core-forms-rangecalendar--extra-small-no-title","core-forms-rangecalendar--fixed-weeks","core-forms-rangecalendar--international-calendar","core-forms-rangecalendar--read-only","core-forms-rangecalendar--select-month","core-forms-rangecalendar--select-month-and-year","core-forms-rangecalendar--select-month-and-year-with-title","core-forms-rangecalendar--select-month-with-title","core-forms-rangecalendar--unavailable-dates","core-forms-rangecalendar--with-default-value","core-forms-rangecalendar--with-min-max","core-forms-rangecalendar--with-title","core-forms-searchinput--basic","core-forms-searchinput--clear-button-focusable","core-forms-searchinput--disabled","core-forms-searchinput--variants","core-forms-select--basic","core-forms-select--controlled","core-forms-select--empty-items","core-forms-select--ghost","core-forms-select--long-labels","core-forms-select--long-list","core-forms-select--read-only","core-forms-select--scrollable","core-forms-select--with-autocomplete","core-forms-select--with-controlled-open","core-forms-select--with-custom-trigger","core-forms-select--with-default-open","core-forms-select--with-default-selected-item","core-forms-select--with-description","core-forms-select--with-disabled","core-forms-select--with-disabled-items","core-forms-select--with-error","core-forms-select--with-error-and-error-message","core-forms-select--with-label","core-forms-select--with-label-at-start","core-forms-select--with-section-headers","core-forms-select--with-sections","core-forms-select--with-virtualized-section-headers","core-forms-select--with-warning","core-forms-select--with-warning-and-warning-message","core-forms-select-iconselect--basic","core-forms-select-iconselect--disabled","core-forms-select-iconselect--read-only","core-forms-select-iconselect--with-default-open","core-forms-select-iconselect--with-error","core-forms-select-iconselect--with-warning","core-forms-select-iconselect--without-icon","core-forms-select-iconselect--without-tooltip","core-forms-select-multiselect--basic","core-forms-select-multiselect--controlled","core-forms-select-multiselect--ghost","core-forms-select-multiselect--hide-clear","core-forms-select-multiselect--hide-select-all","core-forms-select-multiselect--hide-select-all-and-clear","core-forms-select-multiselect--long-labels-as-tags","core-forms-select-multiselect--long-list","core-forms-select-multiselect--max-count-1","core-forms-select-multiselect--max-count-3","core-forms-select-multiselect--read-only","core-forms-select-multiselect--read-only-with-tags-open","core-forms-select-multiselect--scrollable","core-forms-select-multiselect--with-autocomplete","core-forms-select-multiselect--with-controlled-open","core-forms-select-multiselect--with-custom-trigger","core-forms-select-multiselect--with-default-open","core-forms-select-multiselect--with-default-selected-item","core-forms-select-multiselect--with-description","core-forms-select-multiselect--with-disabled","core-forms-select-multiselect--with-disabled-items","core-forms-select-multiselect--with-error","core-forms-select-multiselect--with-error-and-error-message","core-forms-select-multiselect--with-error-and-tags","core-forms-select-multiselect--with-label","core-forms-select-multiselect--with-label-at-start","core-forms-select-multiselect--with-sections","core-forms-select-multiselect--with-warning","core-forms-select-multiselect--with-warning-and-warning-message","core-forms-slider--basic","core-forms-slider--controlled","core-forms-slider--disabled","core-forms-slider--read-only","core-forms-slider--read-only-with-number-input","core-forms-slider--with-description","core-forms-slider--with-label","core-forms-slider--with-label-and-number-input","core-forms-slider--with-min-and-max","core-forms-slider--with-number-input","core-forms-slider--with-step","core-forms-slider-iconslider--basic","core-forms-slider-iconslider--disabled","core-forms-slider-iconslider--with-number-input","core-forms-slider-iconslider--without-tooltip","core-forms-switch--basic","core-forms-switch--disabled","core-forms-switch--selected","core-forms-switch--selected-disabled","core-forms-switch--with-description","core-forms-switch--with-description-disabled","core-forms-switch--with-description-in-left-and-status","core-forms-switch--with-description-in-left-long-label","core-forms-switch--with-description-on-top","core-forms-switch--with-label","core-forms-switch--with-label-and-status","core-forms-switch--with-label-in-left-and-status","core-forms-switch--with-label-in-left-and-status-disabled","core-forms-taggedpagination--basic","core-forms-taggedpagination--disabled","core-forms-taggedpagination--disabled-steppers","core-forms-taggedpagination--read-only","core-forms-taggedpagination--variant","core-forms-taggedpagination--with-page-label","core-forms-textinput--basic","core-forms-textinput--controlled","core-forms-textinput--disabled","core-forms-textinput--focusing-the-input","core-forms-textinput--ghost-variant","core-forms-textinput--html-forms","core-forms-textinput--multiline","core-forms-textinput--multiline-variants","core-forms-textinput--multiline-with-rows","core-forms-textinput--read-only","core-forms-textinput--variants","core-forms-textinput--with-description","core-forms-textinput--with-error-message","core-forms-textinput--with-label","core-forms-textinput--with-label-at-start","core-forms-textinput--with-warning-message","core-forms-timefield--basic","core-forms-timefield--controlled","core-forms-timefield--default-value","core-forms-timefield--disabled","core-forms-timefield--ghost-variant","core-forms-timefield--html-forms","core-forms-timefield--placeholder-value","core-forms-timefield--read-only","core-forms-timefield--variants","core-forms-timefield--with-error-message","core-forms-timefield--with-error-message-only","core-forms-timefield--with-label","core-forms-timefield--with-label-at-start","core-forms-timefield--with-min-and-max-value","core-forms-timefield--with-warning-message","core-media-audioplayer--basic","core-media-audioplayer--small","core-miscellaneous-editor--basic","core-miscellaneous-editor--headless-clipboard-hooks","core-miscellaneous-editor--headless-custom","core-miscellaneous-editor--headless-document-model","core-miscellaneous-editor--headless-max-length","core-miscellaneous-editor--headless-paragraphs","core-miscellaneous-editor--headless-styles","core-miscellaneous-editor-plain--auto-focus","core-miscellaneous-editor-plain--auto-focus-at-end","core-miscellaneous-editor-plain--auto-focus-at-start","core-miscellaneous-editor-plain--clear-on-cancel","core-miscellaneous-editor-plain--clear-on-save","core-miscellaneous-editor-plain--controlled","core-miscellaneous-editor-plain--custom-submit-icon","core-miscellaneous-editor-plain--default-save-disabled","core-miscellaneous-editor-plain--disabled","core-miscellaneous-editor-plain--minimal","core-miscellaneous-editor-plain--minimal-disabled","core-miscellaneous-editor-plain--minimal-multiline","core-miscellaneous-editor-plain--minimal-save-disabled","core-miscellaneous-editor-plain--not-inline","core-miscellaneous-editor-plain--save-on-enter","core-miscellaneous-editor-plain--variants","core-miscellaneous-editor-plain--with-cancel","core-miscellaneous-editor-plain--with-dynamic-caret-position","core-miscellaneous-editor-rich-text--auto-focus","core-miscellaneous-editor-rich-text--auto-focus-at-end","core-miscellaneous-editor-rich-text--clear-on-cancel","core-miscellaneous-editor-rich-text--clear-on-save","core-miscellaneous-editor-rich-text--controlled","core-miscellaneous-editor-rich-text--default","core-miscellaneous-editor-rich-text--disabled","core-miscellaneous-editor-rich-text--long-content","core-miscellaneous-editor-rich-text--mentions","core-miscellaneous-editor-rich-text--mentions-max-suggestions","core-miscellaneous-editor-rich-text--not-inline","core-miscellaneous-editor-rich-text--save-disabled","core-miscellaneous-editor-rich-text--save-on-enter","core-miscellaneous-editor-rich-text--variants","core-miscellaneous-editor-rich-text--with-cancel","core-miscellaneous-editor-rich-text--with-custom-footer-buttons","core-miscellaneous-editor-rich-text--with-placeholder","core-miscellaneous-freehandcanvas--basic","core-miscellaneous-freehandcanvas--clear-button","core-miscellaneous-freehandcanvas--controlled","core-miscellaneous-freehandcanvas--default-value","core-miscellaneous-freehandcanvas--disabled","core-miscellaneous-freehandcanvas--history-enabled","core-miscellaneous-freehandcanvas--label","core-miscellaneous-freehandcanvas--streamlining","core-miscellaneous-icon--basic","core-miscellaneous-toolbar--basic","core-miscellaneous-toolbar--collapsible","core-miscellaneous-toolbar--vertical","core-miscellaneous-toolbar--with-inputs","core-miscellaneous-toolbar--with-over-flow","core-miscellaneous-toolbar--with-tabbing-within","core-miscellaneous-toolbar--with-tooltip","core-navigation-accordion--basic","core-navigation-accordion--controlled","core-navigation-accordion--default-expanded-keys","core-navigation-accordion--disabled","core-navigation-accordion--single-expansion","core-navigation-accordion-accordionitem--force-mount","core-navigation-accordion-accordionitem--show-actions-on-trigger-only","core-navigation-accordion-accordionitem--with-buttons","core-navigation-accordion-accordionitem--with-sub-labels","core-navigation-accordion-accordionitem--with-tabbable-content","core-navigation-breadcrumbs--basic","core-navigation-breadcrumbs--collapsed","core-navigation-breadcrumbs--custom-separator","core-navigation-breadcrumbs--disabled","core-navigation-breadcrumbs--variants","core-navigation-breadcrumbs--with-icons","core-navigation-breadcrumbs--with-select","core-navigation-disclosure--basic","core-navigation-disclosure--controlled","core-navigation-disclosure--truncated-title","core-navigation-disclosure--variants","core-navigation-disclosure--with-custom-icon","core-navigation-disclosure--with-interactive-content","core-navigation-disclosure--with-long-content","core-navigation-disclosure--without-description","core-navigation-link--basic","core-navigation-link--client-side-action","core-navigation-link--variants","core-navigation-stepper--all-complete","core-navigation-stepper--all-states","core-navigation-stepper--condensed","core-navigation-stepper--controlled","core-navigation-stepper--default","core-navigation-stepper--expanded-without-descriptions","core-navigation-stepper--frontier-ahead-of-selection","core-navigation-stepper--indicator-only","core-navigation-stepper--indicator-only-expanded","core-navigation-stepper--is-disabled","core-navigation-stepper--long-title-and-description","core-navigation-stepper--mixed-indicator-and-titled-items","core-navigation-stepper--per-item-aria-label-overrides-title","core-navigation-stepper--single-item","core-navigation-stepper--size-small-condensed","core-navigation-stepper--size-small-expanded","core-navigation-stepper--two-steps","core-navigation-stepper--with-disabled-step","core-navigation-tabs--basic","core-navigation-tabs--controlled","core-navigation-tabs--ghost","core-navigation-tabs--with-action-button","core-navigation-tabs--with-close-button","core-navigation-tabs--with-default-selected","core-navigation-tabs--with-disabled","core-navigation-tabs--with-disabled-and-close-button","core-navigation-tabs--with-focusable-content","core-navigation-tabs--with-specific-disabled","core-navigation-tabs-tabitem--with-icon","core-overlays-alertdialog--auto-focus-cancel-button","core-overlays-alertdialog--basic","core-overlays-alertdialog--custom-focused-button","core-overlays-alertdialog--default-open","core-overlays-alertdialog--long-content","core-overlays-alertdialog--only-cancel-button","core-overlays-alertdialog--only-primary-action","core-overlays-alertdialog--primary-action-disabled","core-overlays-alertdialog--separate-close-handler","core-overlays-alertdialog--with-text-input","core-overlays-alertdialog--with-title-only","core-overlays-alertdialog--without-close-button","core-overlays-alertdialog--without-icon","core-overlays-alertdialog--without-message-and-actions","core-overlays-dialog--basic","core-overlays-dialog--default-open","core-overlays-dialog--different-sizes","core-overlays-dialog--ghost","core-overlays-drawer--basic","core-overlays-drawer--with-action","core-overlays-inlinetoolbar--basic","core-overlays-inlinetoolbar--controlled","core-overlays-inlinetoolbar--disabled","core-overlays-inlinetoolbar--disabled-keys","core-overlays-inlinetoolbar--with-interactive-element","core-overlays-inlinetoolbar--with-scroll","core-overlays-modal--basic","core-overlays-modal--controlled","core-overlays-modal--default-open","core-overlays-modal-modalcontent--disabled-animation","core-overlays-modal-modalcontent--drawer-mobile","core-overlays-modal-modalcontent--drawer-mobile-with-nested-popover","core-overlays-modal-modalcontent--form-controls","core-overlays-modal-modalcontent--long-content","core-overlays-modal-modalcontent--not-dismissable","core-overlays-modal-modalcontent--uncontrolled-interaction-outside","core-overlays-modal-modalcontent--with-disabled-focus-management","core-overlays-modal-modalcontent--with-inert","core-overlays-popover--basic","core-overlays-popover--event-leak-fix","core-overlays-popover--with-arrow","core-overlays-popover--with-boundary-element","core-overlays-popover--with-custom-target","core-overlays-popover--with-dynamic-trigger-width","core-overlays-popover--with-no-boundary","core-overlays-popover--with-scrollable-content","core-overlays-popover--with-scrollable-content-non-modal","core-overlays-popover--with-scrollable-viewport","core-overlays-popover--with-tooltip","core-overlays-popover-popovercontent--basic","core-overlays-popover-popovercontent--contained-focus","core-overlays-popover-popovercontent--default-open-with-arrow","core-overlays-popover-popovercontent--disable-animation","core-overlays-popover-popovercontent--manual-repositioning","core-overlays-popover-popovercontent--nested-scrollable-containers","core-overlays-popover-popovercontent--scroll-repositioning","core-overlays-popover-popovercontent--with-boundary-axis","core-overlays-popover-popovercontent--with-horizontal-boundary-behavior","core-overlays-popover-popovertrigger--basic","core-overlays-popover-popovertrigger--function-children","core-overlays-popover-popovertrigger--with-updated-position","core-overlays-tooltip--basic","core-overlays-tooltip--controlled-open","core-overlays-tooltip--disabled","core-overlays-tooltip--focus-trigger","core-overlays-tooltip--no-text","core-overlays-tooltip--placement","core-overlays-tooltip--variants","core-overlays-tooltip--variants-size","core-overlays-tooltip--with-cross-offset","core-overlays-tooltip--with-focusable","core-overlays-tooltip--with-offset","core-overlays-tooltip--with-on-open-change","core-status-inlinealert--basic","core-status-inlinealert--compact","core-status-inlinealert--compact-with-action","core-status-inlinealert--compact-with-action-and-close","core-status-inlinealert--multi-line","core-status-inlinealert--multi-line-with-action","core-status-inlinealert--multi-line-with-action-and-close","core-status-inlinealert--sizes","core-status-inlinealert--variants","core-status-inlinealert--with-action","core-status-inlinealert--with-action-and-close","core-status-progressbar--basic","core-status-progressbar--variants","core-status-progressbar--with-custom-number-formatter","core-status-progressbar--with-custom-value-label","core-status-progressbar--with-error","core-status-progressbar--with-max-value","core-status-progressbar--with-min-and-max-value","core-status-progressbar--with-min-value","core-status-progressbar--with-no-description","core-status-progressbar--with-no-label","core-status-progressbar--with-show-value","core-status-progressspinner--error","core-status-progressspinner--primary","core-status-progressspinner--success","core-status-progressspinner--variants","core-status-progressspinner--without-label","core-status-toast--basic","core-status-toast--timeout","core-status-toast--variants-with-action","core-status-toast--variants-without-action","core-status-toast--with-action","core-utilities-actionable--basic","core-utilities-actionable--disabled","core-utilities-actionable--with-complex-content","core-utilities-actionable--with-div","core-utilities-actionable--with-dynamic-button-styling","core-utilities-actionable--with-dynamic-child-styling","core-utilities-box--basic","core-utilities-box--element-type","core-utilities-box--flex-layout","core-utilities-box--media-queries","core-utilities-box--nested-boxes","core-utilities-dateformat--basic","core-utilities-dateformat--time-only","core-utilities-dateformat--time-only-with-time-zone","core-utilities-dateformat--time-zone-24-hour","core-utilities-dateformat--with-date-and-time","core-utilities-deviceprovider--always-desktop","core-utilities-deviceprovider--always-mobile","core-utilities-deviceprovider--basic","core-utilities-deviceprovider--custom-breakpoints","core-utilities-frameprovider--always-contained","core-utilities-frameprovider--basic","core-utilities-frameprovider--custom-portal-container","core-utilities-frameprovider--inside-shadow-root","core-utilities-frameprovider--nested-containers","core-utilities-frameprovider--never-contained","core-utilities-frameprovider--popover-with-frame-boundary","core-utilities-frameprovider--portal-container-outside-container","core-utilities-frameprovider--with-interactive-elements-outside-of-container","core-utilities-group--basic","core-utilities-i18nprovider--string-format","core-utilities-messageformat--basic","core-utilities-numberformat--basic","core-utilities-numberformat--currency","core-utilities-numberformat--currency-with-fraction-digits","core-utilities-numberformat--currency-with-fraction-digits-and-currency-display","core-utilities-numberformat--percent","core-utilities-numberformat--percent-with-fraction-digits","core-utilities-panel--basic","core-utilities-panel--collapsible","core-utilities-panel--conditional","core-utilities-panel--controlled","core-utilities-panel--disabled-handle","core-utilities-panel--max-size","core-utilities-panel--multiple","core-utilities-panel--nested","core-utilities-panel--persistent","core-utilities-panel--vertical","core-utilities-portal--basic","core-utilities-themeprovider--basic","json-render-examples--dashboard","json-render-examples--data-table","json-render-examples--login-form","json-render-examples--settings-panel"];var h={version:"3.7.0"};var b=`
|
|
39525
40554
|
# Baseline UI MCP Server Guidelines
|
|
39526
40555
|
|
|
39527
40556
|
This MCP server provides AI assistants with structured access to Baseline UI's comprehensive component documentation, icon library, theming resources, and design guidelines.
|
|
@@ -39676,7 +40705,7 @@ Use this tool to:
|
|
|
39676
40705
|
- Consult **list_components** to find the right component for your needs
|
|
39677
40706
|
- Reference **theming** for custom design systems
|
|
39678
40707
|
- Check **styling** for CSS and design token guidance
|
|
39679
|
-
`;var
|
|
40708
|
+
`;var I=`# List of available components in Baseline UI design system
|
|
39680
40709
|
| Name | Description | Similar To |
|
|
39681
40710
|
| --- | --- | --- |
|
|
39682
40711
|
${Object.entries(o).sort(([n],[e])=>n.localeCompare(e)).map(([n,{description:e,similarTo:t}])=>`|${n}|${e}|${t?.join(", ")||""}|`).join(`
|
|
@@ -39686,5 +40715,5 @@ ${Object.entries(o).sort(([n],[e])=>n.localeCompare(e)).map(([n,{description:e,s
|
|
|
39686
40715
|
${e.map(t=>"- "+t).join(`
|
|
39687
40716
|
`)}`).join(`
|
|
39688
40717
|
|
|
39689
|
-
`),D=new Set(r);function B(n){let e=n.toLowerCase();if(!e)return [];let t=r.filter(s=>s.includes(e));if(t.length>0)return t.slice(0,5);let a=e.split("--")[0];return a?r.filter(s=>s.includes(a)).slice(0,5):[]}function
|
|
39690
|
-
exports.createServer=
|
|
40718
|
+
`),D=new Set(r);function B(n){let e=n.toLowerCase();if(!e)return [];let t=r.filter(s=>s.includes(e));if(t.length>0)return t.slice(0,5);let a=e.split("--")[0];return a?r.filter(s=>s.includes(a)).slice(0,5):[]}function j(){let n=new mcp_js.McpServer({name:"baseline-ui",version:h.version});return n.registerResource("list_components","resource://baseline-ui/list_components.md",{description:l,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:I}]})),n.registerResource("list_icons","resource://baseline-ui/list_icons.md",{description:c,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:P}]})),n.registerResource("getting_started","resource://baseline-ui/getting_started.md",{description:"Quick start guide for integrating Baseline UI into new projects",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.gettingStarted}]})),n.registerResource("nutrient_web_viewer_theming","resource://baseline-ui/nutrient_web_viewer_theming.md",{description:"Specialized theming guide for customizing Baseline UI in Nutrient Web Viewer. This is not applicable if you are not theming the Nutrient Web Viewer SDK.",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.nutrientWebViewerTheming}]})),n.registerResource("theming","resource://baseline-ui/theming.md",{description:"Comprehensive guide for implementing custom themes and color schemes in Baseline UI",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.theming}]})),n.registerResource("internationalization","resource://baseline-ui/internationalization.md",{description:"Guide for implementing multi-language support and localization in Baseline UI",mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.internationalization}]})),n.registerResource("styling","resource://baseline-ui/styling.md",{description:p,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:i.styling}]})),n.registerResource("guidelines","resource://baseline-ui/guidelines.md",{description:d,mimeType:"text/markdown"},e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:b}]})),n.registerTool("get_component_info",{title:"Get component info",description:g,inputSchema:{componentName:zod.z.enum(Object.keys(o))}},({componentName:e})=>({content:[{type:"text",text:JSON.stringify(Object.fromEntries(Object.entries(o[e]).filter(([t])=>!["description","similarTo","figmaUrl"].includes(t))),null,2)}]})),n.registerTool("get_story_url",{title:"Get story demo URL",description:f,inputSchema:{storyId:zod.z.string()}},({storyId:e})=>{let t=e.toLowerCase();if(!D.has(t)){let a=B(e);return {isError:true,content:[{type:"text",text:`Unknown story id "${e}".`+(a.length>0?` Did you mean: ${a.join(", ")}?`:"")+" Story ids come from the Storybook index; get_component_info lists them under `stories.usage[].id`."}]}}return {content:[{type:"text",text:`https://nutrient.io/baseline-ui/iframe.html?id=${t}`}]}}),n.registerTool("get_figma_url",{title:"Get Figma URL",description:y,inputSchema:{componentName:zod.z.enum(Object.keys(o))}},({componentName:e})=>{let{figmaUrl:t}=o[e];return t?{content:[{type:"text",text:t}]}:{isError:true,content:[{type:"text",text:`No Figma URL is available for ${e}.`}]}}),n.registerTool("list_available_resources",{title:"List Available Resources",description:v,inputSchema:{}},()=>({content:[{type:"text",text:JSON.stringify([{name:"list_components",uri:"resource://baseline-ui/list_components.md",description:l,mimeType:"text/markdown"},{name:"list_icons",uri:"resource://baseline-ui/list_icons.md",description:c,mimeType:"text/markdown"},{name:"getting_started",uri:"resource://baseline-ui/getting_started.md",description:"Quick start guide for integrating Baseline UI into new projects",mimeType:"text/markdown"},{name:"nutrient_web_viewer_theming",uri:"resource://baseline-ui/nutrient_web_viewer_theming.md",description:"Specialized theming guide for customizing Baseline UI in Nutrient Web Viewer. This is not applicable if you are not theming the Nutrient Web Viewer SDK.",mimeType:"text/markdown"},{name:"theming",uri:"resource://baseline-ui/theming.md",description:"Comprehensive guide for implementing custom themes and color schemes in Baseline UI",mimeType:"text/markdown"},{name:"internationalization",uri:"resource://baseline-ui/internationalization.md",description:"Guide for implementing multi-language support and localization in Baseline UI",mimeType:"text/markdown"},{name:"styling",uri:"resource://baseline-ui/styling.md",description:p,mimeType:"text/markdown"},{name:"guidelines",uri:"resource://baseline-ui/guidelines.md",description:d,mimeType:"text/markdown"}],null,2)}]})),n}
|
|
40719
|
+
exports.createServer=j;
|