@baseline-ui/mcp 3.0.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.cjs CHANGED
@@ -11809,6 +11809,39 @@ export function ScrollIntoViewImageGalleryExample() {
11809
11809
  );
11810
11810
  }
11811
11811
 
11812
+ export function MountEffectScrollIntoViewImageGalleryExample() {
11813
+ const listBoxHandle = React.useRef<ListHandle>(null);
11814
+ const galleryItems = Array.from({ length: 20 }, (_, i) => {
11815
+ const index = i + 1;
11816
+ return {
11817
+ id: \`image-\${i}\`,
11818
+ src: resolvePublicUrl(\`gallery/\${(index % 10) + 1}.jpg\`),
11819
+ alt: \`Image \${index}\`,
11820
+ label: index.toString(),
11821
+ };
11822
+ });
11823
+
11824
+ // Scrolls from the consumer's own mount effect, which runs before the list box's
11825
+ // collection has rendered any options.
11826
+ React.useEffect(() => {
11827
+ listBoxHandle.current?.scrollIntoView("image-15");
11828
+ }, []);
11829
+
11830
+ return (
11831
+ <Box display="flex" flexDirection="column" gap="md" style={{ width: 500 }}>
11832
+ <div
11833
+ style={{
11834
+ maxHeight: 300,
11835
+ overflow: "auto",
11836
+ border: "1px solid #ccc",
11837
+ }}
11838
+ >
11839
+ <ImageGallery items={galleryItems} listBoxHandle={listBoxHandle} />
11840
+ </div>
11841
+ </Box>
11842
+ );
11843
+ }
11844
+
11812
11845
  // Counts \`renderImage\` calls so a spec can prove that a re-render which changes nothing
11813
11846
  // the gallery reads does not throw away the list box's cached options. \`Report\` publishes
11814
11847
  // the tally taken *before* its own render, so two clicks bracket exactly one re-render.
@@ -13879,7 +13912,8 @@ console.log(greet('Markdown Maverick'));
13879
13912
  | Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |
13880
13913
  | Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |
13881
13914
  | Row 3, Col 1 | Row 3, Col 2 | Row 3, Col 3 |
13882
- \`}</Markdown>;`},{id:"core-content-markdown--with-caret",name:"With Caret",snippet:'const WithCaret = () => <div style={{ width: "150px" }}>\n <Markdown showCaret>{`This is a long sentence that showcases how Markdown component looks with a caret at the end.`}</Markdown>\n</div>;'}],implementation:""},similarTo:[],figmaUrl:null},Menu:{id:"core-collections-menu",breadcrumb:"Core/Collections/Menu",importStatement:'import { ActionButton, Menu } from "@baseline-ui/core";',description:"`Menu` is a popup list of actions or options revealed by a trigger, with support for sections, selection, and keyboard typeahead. Use it for contextual command lists, overflow actions, or selecting a value from a moderate set of choices.",documentation:`\`Menu\` is a popup list of actions or options revealed by a trigger, with support for sections, selection, and keyboard typeahead. Use it for contextual command lists, overflow actions, or selecting a value from a moderate set of choices.
13915
+ \`}</Markdown>;`},{id:"core-content-markdown--with-caret",name:"With Caret",snippet:'const WithCaret = () => <div style={{ width: "150px" }}>\n <Markdown showCaret>{`This is a long sentence that showcases how Markdown component looks with a caret at the end.`}</Markdown>\n</div>;'}],implementation:""},similarTo:[],figmaUrl:null},Menu:{id:"core-collections-menu",breadcrumb:"Core/Collections/Menu",importStatement:`import { ActionButton, Avatar, Box, Menu } from "@baseline-ui/core";
13916
+ import { CheckmarkIcon } from "@baseline-ui/icons/16";`,description:"`Menu` is a popup list of actions or options revealed by a trigger, with support for sections, selection, and keyboard typeahead. Use it for contextual command lists, overflow actions, or selecting a value from a moderate set of choices.",documentation:`\`Menu\` is a popup list of actions or options revealed by a trigger, with support for sections, selection, and keyboard typeahead. Use it for contextual command lists, overflow actions, or selecting a value from a moderate set of choices.
13883
13917
 
13884
13918
  1. ARIA compliant: Ensures the \`Menu\` component is accessible to users with disabilities.
13885
13919
  2. Selection options: The component can be configured to allow single, multiple, or no selection.
@@ -13891,6 +13925,7 @@ console.log(greet('Markdown Maverick'));
13891
13925
  8. Keyboard menu opening: The menu can be opened using the keyboard, and automatically focuses on the first or last item.
13892
13926
  9. Typeahead: Users can quickly navigate to a menu item by typing the first few letters of the item's label.
13893
13927
  10. Virtualized scrolling: For long lists, performance is improved by only rendering the visible items.
13928
+ 11. Per-item customization: Options can take a class, an inline style, or a completely custom body.
13894
13929
 
13895
13930
  Pass the list of options via \`items\` and a \`triggerLabel\` for the default
13896
13931
  \`ActionButton\` trigger. \`Menu\` renders its own trigger and popover \u2014 it does not
@@ -13915,7 +13950,8 @@ you need on/off state rather than a command list, use \`ToggleButton\`; to pick
13915
13950
  value from a set with an always-visible field, use \`Select\`.
13916
13951
 
13917
13952
  Each option accepts an optional leading \`icon\` (a \`@baseline-ui/icons\` component)
13918
- and a \`keyboardShortcut\` string rendered at the trailing edge of the item.
13953
+ and a \`keyboardShortcut\` string rendered at the trailing edge of the item. An
13954
+ option with a submenu spends that slot on its chevron instead.
13919
13955
 
13920
13956
  \`\`\`jsx
13921
13957
  import { CopyIcon, TrashIcon } from "@baseline-ui/icons/16";
@@ -13926,6 +13962,110 @@ const items = [
13926
13962
  ];
13927
13963
  \`\`\`
13928
13964
 
13965
+ \`optionClassName\`, \`optionStyle\` and \`renderOption\` are props on \`Menu\`, not
13966
+ fields on an item. \`optionClassName\` and \`optionStyle\` take either a plain value
13967
+ or a function of the option and its current state; \`renderOption\` is always such
13968
+ a function. One row is styled by branching inside that function rather than by
13969
+ annotating the item.
13970
+
13971
+ \`renderOption\` replaces an option's contents outright, which is how an item
13972
+ holds a badge, an avatar, or a two-line body. Keyboard navigation and selection
13973
+ behavior are unchanged, but the row's own presentation is not: the hover, focus
13974
+ and disabled styling and the trailing \`keyboardShortcut\` all live in the default
13975
+ body you are replacing, so draw whatever of them you need from the render state.
13976
+ Keep a text label in the output \u2014 it is what names the option to a screen
13977
+ reader.
13978
+
13979
+ An assignee picker is the shape that needs all of this at once: each row carries
13980
+ an avatar and a trailing presence label the default body has no slot for, offline
13981
+ people are muted, and the row redraws the focus ring and the selection check
13982
+ that came with the body \`renderOption\` replaced, while \`optionStyle\` carries the
13983
+ row-level background and text colour. Anything an
13984
+ option needs beyond \`label\` rides along in its \`data\`.
13985
+
13986
+ \`\`\`jsx
13987
+ import { Avatar, Box } from "@baseline-ui/core";
13988
+ import { CheckmarkIcon } from "@baseline-ui/icons/16";
13989
+ import { themeVars } from "@baseline-ui/tokens";
13990
+
13991
+ const assignees = [
13992
+ { id: "ana", label: "Ana Silva", data: { status: "Online" } },
13993
+ { id: "sam", label: "Sam Ortiz", data: { status: "Offline" } },
13994
+ ];
13995
+
13996
+ const PRESENCE_COLOR = {
13997
+ Online: themeVars.color.support.success.medium,
13998
+ Away: themeVars.color.support.warning.medium,
13999
+ Offline: themeVars.color.icon.secondary,
14000
+ };
14001
+
14002
+ <Menu
14003
+ items={assignees}
14004
+ triggerLabel="Assign to"
14005
+ selectionMode="single"
14006
+ defaultSelectedKeys={["ana"]}
14007
+ optionClassName="MyApp-AssigneeOption"
14008
+ optionStyle={(item, { isHovered }) => ({
14009
+ backgroundColor: isHovered
14010
+ ? themeVars.color.background.primary.medium
14011
+ : themeVars.color.background.primary.subtle,
14012
+ color:
14013
+ item.data?.status === "Offline"
14014
+ ? themeVars.color.text.secondary
14015
+ : themeVars.color.text.primary,
14016
+ })}
14017
+ renderOption={(item, { isSelected, isFocusVisible }) => (
14018
+ <Box
14019
+ display="flex"
14020
+ alignItems="center"
14021
+ gap="lg"
14022
+ width="full"
14023
+ paddingX="lg"
14024
+ style={{ height: 36 }}
14025
+ outlineColor={isFocusVisible ? "focused.default" : "transparent"}
14026
+ outlineWidth={2}
14027
+ outlineStyle="solid"
14028
+ outlineOffset={-2}
14029
+ >
14030
+ <Box aria-hidden={true} display="flex">
14031
+ <Avatar name={item.label} size="sm" showInitials={true} />
14032
+ </Box>
14033
+ <Box flex={1}>{item.label}</Box>
14034
+ <Box display="flex" alignItems="center" gap="sm" style={{ width: 72 }}>
14035
+ <Box
14036
+ aria-hidden={true}
14037
+ style={{
14038
+ width: 8,
14039
+ height: 8,
14040
+ borderRadius: "50%",
14041
+ backgroundColor: PRESENCE_COLOR[item.data?.status],
14042
+ }}
14043
+ />
14044
+ <Box color="text.secondary">{item.data?.status}</Box>
14045
+ </Box>
14046
+ <Box display="flex" style={{ width: 16 }}>
14047
+ {isSelected ? <CheckmarkIcon size={16} /> : null}
14048
+ </Box>
14049
+ </Box>
14050
+ )}
14051
+ />;
14052
+ \`\`\`
14053
+
14054
+ The avatar and the presence dot are \`aria-hidden\` because each only restates
14055
+ something already beside it; the status word is not, because it is what carries
14056
+ presence to a screen reader. Colour is never the only cue.
14057
+
14058
+ \`renderOption\` replaces the row's contents \u2014 the default selection indicator and a
14059
+ submenu option's chevron included \u2014 so draw your own from the \`isSelected\` and
14060
+ \`hasSubmenu\` render state when you need them, as the check above does. A submenu
14061
+ chevron has to mirror itself under RTL; the built-in one already does. A function
14062
+ given to any of these three props is compared by identity, so an inline one can
14063
+ rebuild cached options on each render; memoize it for long or sectioned menus.
14064
+
14065
+ \`itemClassName\` is the older string-only form of \`optionClassName\` and is
14066
+ deprecated. It applies to the item element, and both classes are added when both
14067
+ are set, but prefer \`optionClassName\`.
14068
+
13929
14069
  The \`Menu\` component can be configured to allow single, multiple, or no selection. The default is no selection. To allow single selection, set the \`selectionMode\` prop to \`single\`. To allow multiple selection, set the \`selectionMode\` prop to \`multiple\`.
13930
14070
  Use \`defaultSelectedKeys\` to provide a default set of selected items (uncontrolled) and \`selectedKeys\` to set the selected items (controlled).
13931
14071
  The value of the selected keys must match the \`id\` prop of the items.
@@ -14056,6 +14196,39 @@ onOpenChange?: (isOpen: boolean) => void
14056
14196
  * @default 'press'
14057
14197
  */
14058
14198
  trigger?: 'press' | 'longPress'
14199
+ /**
14200
+ * The custom render function for the collection's options.
14201
+ *
14202
+ * Replaces the option's entire contents, the default selection indicator
14203
+ * included, so render your own affordance from \`options\` when you need one.
14204
+ * The hover, focus and disabled styling lives in that default body too \u2014
14205
+ * only selection and keyboard behavior are unaffected. Keep a text label in
14206
+ * the output; it is what names the option to a screen reader.
14207
+ *
14208
+ * Reading component state here works, at the cost of rebuilding every cached option and
14209
+ * section whenever the function's identity changes \u2014 see {@link UNSAFE_ListBoxProps.items}
14210
+ * for when that cost applies.
14211
+ */
14212
+ renderOption?: (item: TOption, options: TRenderProps) => React.ReactNode
14213
+ /**
14214
+ * A CSS class name added to the option's built-in classes.
14215
+ *
14216
+ * Compared by identity, so an inline function or an unmemoized value rebuilds every
14217
+ * cached option and section on each render. A plain string is compared by value.
14218
+ */
14219
+ optionClassName?: | string
14220
+ | ((item: TOption, renderProps: TRenderProps) => string | undefined)
14221
+ /**
14222
+ * The style of the option.
14223
+ *
14224
+ * Compared by identity, so an inline function or object literal rebuilds every cached
14225
+ * option and section on each render \u2014 memoize it to avoid that.
14226
+ */
14227
+ optionStyle?: | React.CSSProperties
14228
+ | ((
14229
+ item: TOption,
14230
+ renderProps: TRenderProps,
14231
+ ) => React.CSSProperties | undefined)
14059
14232
  /**
14060
14233
  * The \`className\` property assigned to the root element of the component.
14061
14234
  */
@@ -14066,6 +14239,9 @@ className?: string
14066
14239
  contentClassName?: string
14067
14240
  /**
14068
14241
  * The \`className\` property assigned to the item element of the component.
14242
+ *
14243
+ * @deprecated Use \`optionClassName\`, which also accepts a function of the item
14244
+ * and its render state. Both are applied when set.
14069
14245
  */
14070
14246
  itemClassName?: string
14071
14247
  /**
@@ -14184,14 +14360,68 @@ placement?: any
14184
14360
  if (meta) setSel((prev) => ({ ...prev, [meta.sectionId]: keys }));
14185
14361
  }} />
14186
14362
  );
14187
- };`}],implementation:`import React from "react";
14363
+ };`},{id:"core-collections-menu--with-custom-options",name:"With Custom Options",snippet:`const WithCustomOptions = () => <Menu
14364
+ triggerLabel="Menu Trigger"
14365
+ items={assigneeItems}
14366
+ defaultOpen
14367
+ selectionMode="single"
14368
+ defaultSelectedKeys={["jo"]}
14369
+ optionStyle={(item, { isHovered }) => ({
14370
+ backgroundColor: isHovered
14371
+ ? themeVars.color.background.primary.medium
14372
+ : themeVars.color.background.primary.subtle,
14373
+ color:
14374
+ item.data?.status === "Offline"
14375
+ ? themeVars.color.text.secondary
14376
+ : themeVars.color.text.primary,
14377
+ })}
14378
+ renderOption={(item, { isSelected, isFocusVisible }) => (
14379
+ <Box
14380
+ display="flex"
14381
+ alignItems="center"
14382
+ gap="lg"
14383
+ width="full"
14384
+ paddingX="lg"
14385
+ style={{ height: 36 }}
14386
+ outlineColor={isFocusVisible ? "focused.default" : "transparent"}
14387
+ outlineWidth={2}
14388
+ outlineStyle="solid"
14389
+ outlineOffset={-2}
14390
+ >
14391
+ <Box aria-hidden={true} display="flex">
14392
+ <Avatar name={item.label} size="sm" showInitials={true} />
14393
+ </Box>
14394
+ <Box flex={1} typography="body.md.regular">
14395
+ {item.label}
14396
+ </Box>
14397
+ <Box display="flex" alignItems="center" gap="sm" style={{ width: 72 }}>
14398
+ <Box
14399
+ aria-hidden={true}
14400
+ style={{
14401
+ width: 8,
14402
+ height: 8,
14403
+ borderRadius: "50%",
14404
+ backgroundColor: PRESENCE_COLOR[item.data?.status ?? "Offline"],
14405
+ }}
14406
+ />
14407
+ <Box color="text.secondary" typography="label.sm.regular">
14408
+ {item.data?.status}
14409
+ </Box>
14410
+ </Box>
14411
+ <Box display="flex" style={{ width: 16 }}>
14412
+ {isSelected ? <CheckmarkIcon size={16} /> : null}
14413
+ </Box>
14414
+ </Box>
14415
+ )} />;`}],implementation:`import React from "react";
14188
14416
 
14417
+ import { ActionButton } from "../../ActionButton/ActionButton";
14189
14418
  import { I18nProvider } from "../../I18nProvider/I18nProvider";
14190
14419
  import { Menu } from "../Menu";
14191
14420
  import { items, itemsWithSections, itemsWithSubmenu } from "./data";
14192
14421
 
14193
- import type { MenuProps } from "../Menu.types";
14422
+ import type { MenuOption, MenuProps } from "../Menu.types";
14194
14423
  import type { Key } from "react-aria";
14424
+ import type { MenuItemRenderProps } from "react-aria-components";
14195
14425
  import type { Selection } from "react-stately";
14196
14426
 
14197
14427
  export const MenuExample: React.FC<
@@ -14396,6 +14626,78 @@ export const MenuPartialSectionSelectionExample: React.FC<{
14396
14626
  <div data-testid="menu-partial-action">{action}</div>
14397
14627
  </>
14398
14628
  );
14629
+ };
14630
+
14631
+ const optionClassNames = {
14632
+ perItem: (item: MenuOption) => \`option-\${item.id}\`,
14633
+ perRenderState: (item: MenuOption, { isFocusVisible }: MenuItemRenderProps) =>
14634
+ isFocusVisible ? \`option-\${item.id} focus-visible\` : \`option-\${item.id}\`,
14635
+ };
14636
+
14637
+ const renderCustomOption = (
14638
+ item: MenuOption,
14639
+ { hasSubmenu, isSelected }: MenuItemRenderProps,
14640
+ ) => (
14641
+ <span data-testid={\`custom-\${item.id}\`} data-selected={isSelected}>
14642
+ {item.label}
14643
+ {hasSubmenu ? " (submenu)" : ""}
14644
+ </span>
14645
+ );
14646
+
14647
+ // Callbacks can't cross the CT mount boundary, so they are selected by name.
14648
+ export const MenuOptionCustomisationExample: React.FC<{
14649
+ label: string;
14650
+ items?: MenuProps["items"];
14651
+ itemClassName?: string;
14652
+ optionClassName?: keyof typeof optionClassNames;
14653
+ withRenderOption?: boolean;
14654
+ selectionMode?: "single" | "multiple";
14655
+ }> = ({
14656
+ label,
14657
+ items: menuItems = items,
14658
+ itemClassName,
14659
+ optionClassName = "perItem",
14660
+ withRenderOption = false,
14661
+ selectionMode,
14662
+ }) => (
14663
+ <Menu
14664
+ items={menuItems}
14665
+ triggerLabel={label}
14666
+ defaultOpen={true}
14667
+ selectionMode={selectionMode}
14668
+ itemClassName={itemClassName}
14669
+ optionClassName={optionClassNames[optionClassName]}
14670
+ renderOption={withRenderOption ? renderCustomOption : undefined}
14671
+ />
14672
+ );
14673
+
14674
+ export const MenuSectionOptionClassToggleExample: React.FC<{
14675
+ label: string;
14676
+ }> = ({ label }) => {
14677
+ const [flagged, setFlagged] = React.useState(false);
14678
+ const optionClassName = React.useCallback(
14679
+ () => (flagged ? "flagged" : "unflagged"),
14680
+ [flagged],
14681
+ );
14682
+
14683
+ return (
14684
+ <>
14685
+ <ActionButton
14686
+ label="Toggle"
14687
+ onPress={() => {
14688
+ setFlagged((v) => !v);
14689
+ }}
14690
+ />
14691
+ <Menu
14692
+ items={itemsWithSections}
14693
+ triggerLabel={label}
14694
+ // Keep the menu mounted while the outside toggle changes the callback.
14695
+ isOpen={true}
14696
+ isNonModal={true}
14697
+ optionClassName={optionClassName}
14698
+ />
14699
+ </>
14700
+ );
14399
14701
  };`},similarTo:[],figmaUrl:null},MessageFormat:{id:"core-utilities-messageformat",breadcrumb:"Core/Utilities/MessageFormat",importStatement:'import { MessageFormat } from "@baseline-ui/core";',description:"`MessageFormat` renders a single message from the catalog supplied to `I18nProvider`. When the catalog has no entry for `id`, it renders `defaultMessage` \u2014 and when it was given no `defaultMessage` either, the `id` itself. Unlike the rest of the library, it has no English of its own to fall back on: `id` arrives at runtime, so pass a catalog covering it or a `defaultMessage` beside it.",documentation:'`MessageFormat` renders a single message from the catalog supplied to `I18nProvider`. When the catalog has no entry for `id`, it renders `defaultMessage` \u2014 and when it was given no `defaultMessage` either, the `id` itself. Unlike the rest of the library, it has no English of its own to fall back on: `id` arrives at runtime, so pass a catalog covering it or a `defaultMessage` beside it.\n\nBecause it is a component rather than a hook, it is also how a class component reaches a translation \u2014 see [From a class component](/?path=/docs/internationalization--docs#from-a-class-component).\n\n```jsx\nimport { I18nProvider, MessageFormat } from "@baseline-ui/core";\nimport en from "@baseline-ui/core/intl/en.json";\nimport fr from "@baseline-ui/core/intl/fr.json";\n\nconst App = () => (\n <I18nProvider locale="en" messages={{ en, fr }}>\n <MessageFormat id="bui.calendar.previousMonth" />\n <MessageFormat id="myApp.hello" defaultMessage="Hello!" />\n </I18nProvider>\n);\n```\n\nPassing `id` and `defaultMessage` as separate props leaves `defaultMessage` easy to omit, and an `id` nothing answers for renders as itself. Declaring the message with `defineMessages` and spreading the descriptor keeps the two together, so there is no way to pass one without the other \u2014 and the same descriptor is what the extraction pipeline reads:\n\n```jsx\nimport { defineMessages, MessageFormat } from "@baseline-ui/core";\n\nconst messages = defineMessages({\n hello: {\n id: "myApp.hello",\n defaultMessage: "Hello, {name}!",\n description: "Greeting shown at the top of the dashboard.",\n },\n});\n\n<MessageFormat {...messages.hello} values={{ name: "Ada" }} />;\n```\n\n`description` is translator context; it is ignored at render time and never reaches the DOM.\n\nWrite every `defaultMessage` as a literal, whether it comes from a descriptor or the prop. Each distinct template is compiled once and cached, so a message built per render \u2014 interpolating a file name or a row into the template itself rather than passing it through `values` \u2014 churns that cache and recompiles the templates it displaces.\n\nMessages that carry ICU placeholders take their substitutions through `values`:\n\n```jsx\nconst messages = defineMessages({\n pageXofY: {\n id: "myApp.pageXofY",\n defaultMessage: "Page {current} of {total}",\n description:\n "Pagination status. `current` is the current page, `total` the last.",\n },\n});\n\n<MessageFormat {...messages.pageXofY} values={{ current: 2, total: 10 }} />;\n// \u2192 "Page 2 of 10"\n```\n\nSpreading the descriptor is what makes that true on its own. With a bare\n`id`, the same line renders `"Page 2 of 10"` only where a supplied catalog\ncovers the active locale, and the id itself everywhere else.',props:`interface MessageFormatProps {
14400
14702
  /**
14401
14703
  * By default \`<MessageFormat>\` will render the formatted string into a
@@ -14490,7 +14792,8 @@ onOpenChange?: (isOpen: boolean) => void
14490
14792
  children: React.ReactNode
14491
14793
  }`,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";
14492
14794
  import { sprinkles } from "@baseline-ui/tokens";
14493
- import React, { useState } from "react";
14795
+ import { getOwnerDocument } from "@react-aria/utils";
14796
+ import React, { useEffect, useRef, useState } from "react";
14494
14797
  import { VisuallyHidden, useId } from "react-aria";
14495
14798
 
14496
14799
  import { ActionButton } from "../../ActionButton";
@@ -14501,6 +14804,7 @@ import { Editor } from "../../Editor";
14501
14804
  import { FrameProvider } from "../../FrameProvider";
14502
14805
  import { ListBox } from "../../ListBox";
14503
14806
  import { NumberInput } from "../../NumberInput";
14807
+ import { PortalContainerProvider } from "../../PortalContainerProvider";
14504
14808
  import { RadioGroup } from "../../RadioGroup";
14505
14809
  import { Select } from "../../Select";
14506
14810
  import { Slider } from "../../Slider";
@@ -14903,6 +15207,59 @@ export const DisabledFocusManagementExample: React.FC<{
14903
15207
  )}
14904
15208
  </Box>
14905
15209
  );
15210
+ };
15211
+
15212
+ /**
15213
+ * A \`defaultOpen\` Modal whose portal container only resolves to \`document.body\`
15214
+ * in a mount effect, through either \`ModalContent.portalContainer\` or
15215
+ * \`PortalContainerProvider\`. The portal target is \`document.body\` before and
15216
+ * after, so nothing remounts when the container arrives \u2014 only its identity
15217
+ * changes.
15218
+ */
15219
+ export const ModalLateBodyContainerExample: React.FC<
15220
+ TestComponentProps & { via: "prop" | "provider" }
15221
+ > = ({ enableInert, via }) => {
15222
+ const rootRef = useRef<HTMLDivElement>(null);
15223
+ const [container, setContainer] = useState<HTMLElement>();
15224
+
15225
+ // The body of the tree's own document, not this module's: under the iframe
15226
+ // fixture the component renders into the frame while the module still
15227
+ // evaluates in the top-level realm.
15228
+ useEffect(() => {
15229
+ setContainer(getOwnerDocument(rootRef.current).body);
15230
+ }, []);
15231
+
15232
+ const modal = (
15233
+ <Modal defaultOpen={true}>
15234
+ <ModalContent
15235
+ portalContainer={via === "prop" ? container : undefined}
15236
+ UNSAFE_enableInert={enableInert}
15237
+ >
15238
+ <Dialog aria-label="Late container">
15239
+ <Text>Modal content</Text>
15240
+ </Dialog>
15241
+ </ModalContent>
15242
+ </Modal>
15243
+ );
15244
+
15245
+ return (
15246
+ <Box
15247
+ ref={rootRef}
15248
+ display="flex"
15249
+ flexDirection="column"
15250
+ gap="md"
15251
+ padding="lg"
15252
+ >
15253
+ <ActionButton label="Background button" variant="secondary" />
15254
+ {via === "provider" ? (
15255
+ <PortalContainerProvider portalContainer={container}>
15256
+ {modal}
15257
+ </PortalContainerProvider>
15258
+ ) : (
15259
+ modal
15260
+ )}
15261
+ </Box>
15262
+ );
14906
15263
  };`},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.
14907
15264
  It is a wrapper around the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) API.
14908
15265
 
@@ -17167,7 +17524,7 @@ children: React.ReactNode
17167
17524
  />
17168
17525
  );`},{id:"core-overlays-popover--with-boundary-element",name:"With Boundary Element",snippet:"const WithBoundaryElement = (args) => <PopoverBoundaryElementExample popoverProps={args} />;"},{id:"core-overlays-popover--with-no-boundary",name:"With No Boundary",snippet:"const WithNoBoundary = () => <PopoverNoBoundaryExample />;"},{id:"core-overlays-popover--with-dynamic-trigger-width",name:"With Dynamic Trigger Width",snippet:"const WithDynamicTriggerWidth = (args) => <PopoverTriggerWidthExample popoverProps={args} />;"}],implementation:`import { sprinkles, themeVars } from "@baseline-ui/tokens";
17169
17526
  import { ScrollBox } from "@pw/utils/components";
17170
- import { mergeRefs } from "@react-aria/utils";
17527
+ import { getOwnerDocument, mergeRefs } from "@react-aria/utils";
17171
17528
  import React, { useEffect, useRef, useState } from "react";
17172
17529
  import { useButton, useInteractOutside } from "react-aria";
17173
17530
  import { flushSync } from "react-dom";
@@ -17176,6 +17533,7 @@ import { ActionButton } from "../../ActionButton";
17176
17533
  import { Box } from "../../Box";
17177
17534
  import { Dialog } from "../../Dialog";
17178
17535
  import { ListBoxExample, items } from "../../ListBox/__tests__/testComponents";
17536
+ import { PortalContainerProvider } from "../../PortalContainerProvider";
17179
17537
  import { Select } from "../../Select";
17180
17538
  import { popoverContentCn } from "../../Select/Select.css";
17181
17539
  import { Switch } from "../../Switch";
@@ -18329,6 +18687,60 @@ export const PopoverHorizontalBoundaryBehaviorDemo: React.FC<{
18329
18687
  </Box>
18330
18688
  </Box>
18331
18689
  );
18690
+ };
18691
+
18692
+ /**
18693
+ * A \`defaultOpen\` Popover whose portal container only resolves to \`document.body\`
18694
+ * in a mount effect, through either \`PopoverContent.portalContainer\` or
18695
+ * \`PortalContainerProvider\`. The portal target is \`document.body\` before and
18696
+ * after, so nothing remounts when the container arrives \u2014 only its identity
18697
+ * changes.
18698
+ */
18699
+ export const PopoverLateBodyContainerExample: React.FC<{
18700
+ via: "prop" | "provider";
18701
+ }> = ({ via }) => {
18702
+ const rootRef = useRef<HTMLDivElement>(null);
18703
+ const [container, setContainer] = useState<HTMLElement>();
18704
+
18705
+ // The body of the tree's own document, not this module's: under the iframe
18706
+ // fixture the component renders into the frame while the module still
18707
+ // evaluates in the top-level realm.
18708
+ useEffect(() => {
18709
+ setContainer(getOwnerDocument(rootRef.current).body);
18710
+ }, []);
18711
+
18712
+ const popover = (
18713
+ <Popover type="listbox" defaultOpen={true}>
18714
+ <PopoverTrigger>
18715
+ <ActionButton label="Open" />
18716
+ </PopoverTrigger>
18717
+ <PopoverContent
18718
+ offset={4}
18719
+ portalContainer={via === "prop" ? container : undefined}
18720
+ >
18721
+ <ListBoxExample className={popoverContentCn} autoFocus="first" />
18722
+ </PopoverContent>
18723
+ </Popover>
18724
+ );
18725
+
18726
+ return (
18727
+ <Box
18728
+ ref={rootRef}
18729
+ display="flex"
18730
+ flexDirection="column"
18731
+ gap="md"
18732
+ padding="lg"
18733
+ >
18734
+ <ActionButton label="Background button" variant="secondary" />
18735
+ {via === "provider" ? (
18736
+ <PortalContainerProvider portalContainer={container}>
18737
+ {popover}
18738
+ </PortalContainerProvider>
18739
+ ) : (
18740
+ popover
18741
+ )}
18742
+ </Box>
18743
+ );
18332
18744
  };`},similarTo:[],figmaUrl:null},Portal:{id:"core-utilities-portal",breadcrumb:"Core/Utilities/Portal",importStatement:'import { Portal } from "@baseline-ui/core";',description:"`Portal` renders its children into an overlay portal outside the normal React DOM hierarchy. It integrates with `ThemeProvider` so that the portal content inherits the current theme and virtual keyboard handling configuration.",documentation:'`Portal` renders its children into an overlay portal outside the normal React DOM hierarchy. It integrates with `ThemeProvider` so that the portal content inherits the current theme and virtual keyboard handling configuration.\n\n* Renders children into an overlay container managed by React Aria\n* Automatically wraps children in a `ThemeProvider` to propagate the active theme into the portal\n* Respects a custom `portalContainer` provided via prop or the nearest `PortalContainerProvider` in context\n* Supports all standard `StylingProps` (`className`, `style`, `data-block-id`, `data-block-class`)\n\n```jsx\nimport { Portal } from "@baseline-ui/core";\n\nexport default function App() {\n return (\n <Portal>\n <div>I am rendered in a portal</div>\n </Portal>\n );\n}\n```\n\nPass a `portalContainer` element to render the portal inside a specific DOM node instead of the default overlay container. This is useful when rendering inside Shadow DOM or other isolated subtrees.\n\n```jsx\nimport { Portal } from "@baseline-ui/core";\n\nconst shadowRoot = document.querySelector("#shadow-host").shadowRoot;\nconst container = shadowRoot.querySelector(".portal-root");\n\nexport default function App() {\n return (\n <Portal portalContainer={container}>\n <div>Rendered inside shadow DOM</div>\n </Portal>\n );\n}\n```',props:`interface PortalProps {
18333
18745
  /**
18334
18746
  * The container element in which the overlay portal will be placed.
@@ -28746,23 +29158,19 @@ className?: string
28746
29158
  */
28747
29159
  style?: React.CSSProperties
28748
29160
  /**
28749
- * The custom render function for the listbox options.
29161
+ * The custom render function for the collection's options.
28750
29162
  *
28751
- * Replaces the option's entire contents, including the default selection
28752
- * indicator \u2014 render your own affordance from \`options.isSelected\` if you
28753
- * need one. Selection and keyboard behavior are unaffected.
29163
+ * Replaces the option's entire contents, the default selection indicator
29164
+ * included, so render your own affordance from \`options\` when you need one.
29165
+ * The hover, focus and disabled styling lives in that default body too \u2014
29166
+ * only selection and keyboard behavior are unaffected. Keep a text label in
29167
+ * the output; it is what names the option to a screen reader.
28754
29168
  *
28755
29169
  * Reading component state here works, at the cost of rebuilding every cached option and
28756
29170
  * section whenever the function's identity changes \u2014 see {@link UNSAFE_ListBoxProps.items}
28757
29171
  * for when that cost applies.
28758
- *
28759
- * @param item ListOption
28760
- * @param options ListBoxItemRenderProps
28761
29172
  */
28762
- renderOption?: (
28763
- item: ListOption,
28764
- options: ListBoxItemRenderProps,
28765
- ) => React.ReactNode
29173
+ renderOption?: (item: TOption, options: TRenderProps) => React.ReactNode
28766
29174
  /**
28767
29175
  * A CSS class name added to the option's built-in classes.
28768
29176
  *
@@ -28770,10 +29178,7 @@ renderOption?: (
28770
29178
  * cached option and section on each render. A plain string is compared by value.
28771
29179
  */
28772
29180
  optionClassName?: | string
28773
- | ((
28774
- item: ListOption,
28775
- renderProps: ListBoxItemRenderProps,
28776
- ) => string | undefined)
29181
+ | ((item: TOption, renderProps: TRenderProps) => string | undefined)
28777
29182
  /**
28778
29183
  * The style of the option.
28779
29184
  *
@@ -28782,8 +29187,8 @@ optionClassName?: | string
28782
29187
  */
28783
29188
  optionStyle?: | React.CSSProperties
28784
29189
  | ((
28785
- item: ListOption,
28786
- renderProps: ListBoxItemRenderProps,
29190
+ item: TOption,
29191
+ renderProps: TRenderProps,
28787
29192
  ) => React.CSSProperties | undefined)
28788
29193
  /**
28789
29194
  * The custom render function for the listbox sections.
@@ -29497,6 +29902,45 @@ export const ScrollIntoViewExample: React.FC = () => {
29497
29902
  );
29498
29903
  };
29499
29904
 
29905
+ export const SupersededScrollIntoViewExample: React.FC = () => {
29906
+ const listBoxHandle = React.useRef<ListHandle>(null);
29907
+ const [itemCount, setItemCount] = React.useState(5);
29908
+
29909
+ return (
29910
+ <Box display="flex" flexDirection="column" gap="md" style={{ width: 300 }}>
29911
+ <ActionButton
29912
+ label="Grow then scroll to Item 0"
29913
+ onPress={() => {
29914
+ // Item 19 only renders once this handler returns, so the first call finds
29915
+ // nothing and schedules a retry. The second call succeeds against the options
29916
+ // already on screen, and must cancel that retry instead of letting it scroll
29917
+ // back to Item 19 a frame later.
29918
+ setItemCount(20);
29919
+ listBoxHandle.current?.scrollIntoView("item-19");
29920
+ listBoxHandle.current?.scrollIntoView("item-0");
29921
+ }}
29922
+ />
29923
+
29924
+ <div
29925
+ style={{
29926
+ maxHeight: 200,
29927
+ overflow: "auto",
29928
+ border: "1px solid #ccc",
29929
+ }}
29930
+ >
29931
+ <ListBox
29932
+ items={Array.from({ length: itemCount }).map((_, i) => ({
29933
+ id: \`item-\${i}\`,
29934
+ label: \`Item \${i}\`,
29935
+ }))}
29936
+ listBoxHandle={listBoxHandle}
29937
+ aria-label="Superseded scroll list"
29938
+ />
29939
+ </div>
29940
+ </Box>
29941
+ );
29942
+ };
29943
+
29500
29944
  const virtualSections = Array.from({ length: 10 }).map((_, sectionIndex) => ({
29501
29945
  id: \`section-\${sectionIndex}\`,
29502
29946
  title: \`Section \${sectionIndex + 1}\`,
@@ -29690,6 +30134,35 @@ export const VirtualizedScrollIntoViewExample: React.FC = () => {
29690
30134
  );
29691
30135
  };
29692
30136
 
30137
+ export const MountEffectVirtualizedScrollIntoViewExample: React.FC = () => {
30138
+ const listBoxHandle = React.useRef<ListHandle>(null);
30139
+ const items = Array.from({ length: 10_000 }).map((_, i) => ({
30140
+ id: \`item-\${i}\`,
30141
+ label: \`Item \${i}\`,
30142
+ }));
30143
+
30144
+ // Scrolls from the consumer's own mount effect, which runs before the virtualizer has
30145
+ // rendered any options.
30146
+ useEffect(() => {
30147
+ listBoxHandle.current?.scrollIntoView("item-5000");
30148
+ }, []);
30149
+
30150
+ return (
30151
+ <Virtualizer {...VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS.LIST_BOX}>
30152
+ <ListBox
30153
+ items={items}
30154
+ listBoxHandle={listBoxHandle}
30155
+ style={{
30156
+ height: 300,
30157
+ width: 300,
30158
+ overflow: "auto",
30159
+ }}
30160
+ aria-label="Virtualized mount effect list"
30161
+ />
30162
+ </Virtualizer>
30163
+ );
30164
+ };
30165
+
29693
30166
  // Each example varies exactly one prop off \`count\` and keeps the rest at stable
29694
30167
  // module-level identity; varying several at once would let one invalidate the cache for
29695
30168
  // the others, hiding a missing \`dependencies\` entry.
@@ -30452,7 +30925,8 @@ UNSAFE_enableInert?: boolean | ((isDrawer: boolean) => boolean)
30452
30925
  />
30453
30926
  );`},{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";
30454
30927
  import { sprinkles } from "@baseline-ui/tokens";
30455
- import React, { useState } from "react";
30928
+ import { getOwnerDocument } from "@react-aria/utils";
30929
+ import React, { useEffect, useRef, useState } from "react";
30456
30930
  import { VisuallyHidden, useId } from "react-aria";
30457
30931
 
30458
30932
  import { ActionButton } from "../../ActionButton";
@@ -30463,6 +30937,7 @@ import { Editor } from "../../Editor";
30463
30937
  import { FrameProvider } from "../../FrameProvider";
30464
30938
  import { ListBox } from "../../ListBox";
30465
30939
  import { NumberInput } from "../../NumberInput";
30940
+ import { PortalContainerProvider } from "../../PortalContainerProvider";
30466
30941
  import { RadioGroup } from "../../RadioGroup";
30467
30942
  import { Select } from "../../Select";
30468
30943
  import { Slider } from "../../Slider";
@@ -30865,6 +31340,59 @@ export const DisabledFocusManagementExample: React.FC<{
30865
31340
  )}
30866
31341
  </Box>
30867
31342
  );
31343
+ };
31344
+
31345
+ /**
31346
+ * A \`defaultOpen\` Modal whose portal container only resolves to \`document.body\`
31347
+ * in a mount effect, through either \`ModalContent.portalContainer\` or
31348
+ * \`PortalContainerProvider\`. The portal target is \`document.body\` before and
31349
+ * after, so nothing remounts when the container arrives \u2014 only its identity
31350
+ * changes.
31351
+ */
31352
+ export const ModalLateBodyContainerExample: React.FC<
31353
+ TestComponentProps & { via: "prop" | "provider" }
31354
+ > = ({ enableInert, via }) => {
31355
+ const rootRef = useRef<HTMLDivElement>(null);
31356
+ const [container, setContainer] = useState<HTMLElement>();
31357
+
31358
+ // The body of the tree's own document, not this module's: under the iframe
31359
+ // fixture the component renders into the frame while the module still
31360
+ // evaluates in the top-level realm.
31361
+ useEffect(() => {
31362
+ setContainer(getOwnerDocument(rootRef.current).body);
31363
+ }, []);
31364
+
31365
+ const modal = (
31366
+ <Modal defaultOpen={true}>
31367
+ <ModalContent
31368
+ portalContainer={via === "prop" ? container : undefined}
31369
+ UNSAFE_enableInert={enableInert}
31370
+ >
31371
+ <Dialog aria-label="Late container">
31372
+ <Text>Modal content</Text>
31373
+ </Dialog>
31374
+ </ModalContent>
31375
+ </Modal>
31376
+ );
31377
+
31378
+ return (
31379
+ <Box
31380
+ ref={rootRef}
31381
+ display="flex"
31382
+ flexDirection="column"
31383
+ gap="md"
31384
+ padding="lg"
31385
+ >
31386
+ <ActionButton label="Background button" variant="secondary" />
31387
+ {via === "provider" ? (
31388
+ <PortalContainerProvider portalContainer={container}>
31389
+ {modal}
31390
+ </PortalContainerProvider>
31391
+ ) : (
31392
+ modal
31393
+ )}
31394
+ </Box>
31395
+ );
30868
31396
  };`},similarTo:[],figmaUrl:null},PointPickerContent:{id:"core-content-pointpicker-pointpickercontent",importStatement:`import {
30869
31397
  Box,
30870
31398
  MultiplePointPickersExample,
@@ -32392,7 +32920,7 @@ horizontalBoundaryBehavior?: "shift" | "anchor"
32392
32920
  boundaryWidth={360}
32393
32921
  boundaryHeight={300} />;`}],implementation:`import { sprinkles, themeVars } from "@baseline-ui/tokens";
32394
32922
  import { ScrollBox } from "@pw/utils/components";
32395
- import { mergeRefs } from "@react-aria/utils";
32923
+ import { getOwnerDocument, mergeRefs } from "@react-aria/utils";
32396
32924
  import React, { useEffect, useRef, useState } from "react";
32397
32925
  import { useButton, useInteractOutside } from "react-aria";
32398
32926
  import { flushSync } from "react-dom";
@@ -32401,6 +32929,7 @@ import { ActionButton } from "../../ActionButton";
32401
32929
  import { Box } from "../../Box";
32402
32930
  import { Dialog } from "../../Dialog";
32403
32931
  import { ListBoxExample, items } from "../../ListBox/__tests__/testComponents";
32932
+ import { PortalContainerProvider } from "../../PortalContainerProvider";
32404
32933
  import { Select } from "../../Select";
32405
32934
  import { popoverContentCn } from "../../Select/Select.css";
32406
32935
  import { Switch } from "../../Switch";
@@ -33554,6 +34083,60 @@ export const PopoverHorizontalBoundaryBehaviorDemo: React.FC<{
33554
34083
  </Box>
33555
34084
  </Box>
33556
34085
  );
34086
+ };
34087
+
34088
+ /**
34089
+ * A \`defaultOpen\` Popover whose portal container only resolves to \`document.body\`
34090
+ * in a mount effect, through either \`PopoverContent.portalContainer\` or
34091
+ * \`PortalContainerProvider\`. The portal target is \`document.body\` before and
34092
+ * after, so nothing remounts when the container arrives \u2014 only its identity
34093
+ * changes.
34094
+ */
34095
+ export const PopoverLateBodyContainerExample: React.FC<{
34096
+ via: "prop" | "provider";
34097
+ }> = ({ via }) => {
34098
+ const rootRef = useRef<HTMLDivElement>(null);
34099
+ const [container, setContainer] = useState<HTMLElement>();
34100
+
34101
+ // The body of the tree's own document, not this module's: under the iframe
34102
+ // fixture the component renders into the frame while the module still
34103
+ // evaluates in the top-level realm.
34104
+ useEffect(() => {
34105
+ setContainer(getOwnerDocument(rootRef.current).body);
34106
+ }, []);
34107
+
34108
+ const popover = (
34109
+ <Popover type="listbox" defaultOpen={true}>
34110
+ <PopoverTrigger>
34111
+ <ActionButton label="Open" />
34112
+ </PopoverTrigger>
34113
+ <PopoverContent
34114
+ offset={4}
34115
+ portalContainer={via === "prop" ? container : undefined}
34116
+ >
34117
+ <ListBoxExample className={popoverContentCn} autoFocus="first" />
34118
+ </PopoverContent>
34119
+ </Popover>
34120
+ );
34121
+
34122
+ return (
34123
+ <Box
34124
+ ref={rootRef}
34125
+ display="flex"
34126
+ flexDirection="column"
34127
+ gap="md"
34128
+ padding="lg"
34129
+ >
34130
+ <ActionButton label="Background button" variant="secondary" />
34131
+ {via === "provider" ? (
34132
+ <PortalContainerProvider portalContainer={container}>
34133
+ {popover}
34134
+ </PortalContainerProvider>
34135
+ ) : (
34136
+ popover
34137
+ )}
34138
+ </Box>
34139
+ );
33557
34140
  };`},similarTo:[],figmaUrl:null},PopoverTrigger:{id:"core-overlays-popover-popovertrigger",importStatement:`import {
33558
34141
  ActionButton,
33559
34142
  PopoverFunctionChildrenExample,
@@ -33585,7 +34168,7 @@ anchorRect?: Rect
33585
34168
  <PopoverWithCustomPositionExample anchorRect={anchorRect} />
33586
34169
  );`},{id:"core-overlays-popover-popovertrigger--function-children",name:"Function Children",snippet:"const FunctionChildren = () => <PopoverFunctionChildrenExample />;"}],implementation:`import { sprinkles, themeVars } from "@baseline-ui/tokens";
33587
34170
  import { ScrollBox } from "@pw/utils/components";
33588
- import { mergeRefs } from "@react-aria/utils";
34171
+ import { getOwnerDocument, mergeRefs } from "@react-aria/utils";
33589
34172
  import React, { useEffect, useRef, useState } from "react";
33590
34173
  import { useButton, useInteractOutside } from "react-aria";
33591
34174
  import { flushSync } from "react-dom";
@@ -33594,6 +34177,7 @@ import { ActionButton } from "../../ActionButton";
33594
34177
  import { Box } from "../../Box";
33595
34178
  import { Dialog } from "../../Dialog";
33596
34179
  import { ListBoxExample, items } from "../../ListBox/__tests__/testComponents";
34180
+ import { PortalContainerProvider } from "../../PortalContainerProvider";
33597
34181
  import { Select } from "../../Select";
33598
34182
  import { popoverContentCn } from "../../Select/Select.css";
33599
34183
  import { Switch } from "../../Switch";
@@ -34747,6 +35331,60 @@ export const PopoverHorizontalBoundaryBehaviorDemo: React.FC<{
34747
35331
  </Box>
34748
35332
  </Box>
34749
35333
  );
35334
+ };
35335
+
35336
+ /**
35337
+ * A \`defaultOpen\` Popover whose portal container only resolves to \`document.body\`
35338
+ * in a mount effect, through either \`PopoverContent.portalContainer\` or
35339
+ * \`PortalContainerProvider\`. The portal target is \`document.body\` before and
35340
+ * after, so nothing remounts when the container arrives \u2014 only its identity
35341
+ * changes.
35342
+ */
35343
+ export const PopoverLateBodyContainerExample: React.FC<{
35344
+ via: "prop" | "provider";
35345
+ }> = ({ via }) => {
35346
+ const rootRef = useRef<HTMLDivElement>(null);
35347
+ const [container, setContainer] = useState<HTMLElement>();
35348
+
35349
+ // The body of the tree's own document, not this module's: under the iframe
35350
+ // fixture the component renders into the frame while the module still
35351
+ // evaluates in the top-level realm.
35352
+ useEffect(() => {
35353
+ setContainer(getOwnerDocument(rootRef.current).body);
35354
+ }, []);
35355
+
35356
+ const popover = (
35357
+ <Popover type="listbox" defaultOpen={true}>
35358
+ <PopoverTrigger>
35359
+ <ActionButton label="Open" />
35360
+ </PopoverTrigger>
35361
+ <PopoverContent
35362
+ offset={4}
35363
+ portalContainer={via === "prop" ? container : undefined}
35364
+ >
35365
+ <ListBoxExample className={popoverContentCn} autoFocus="first" />
35366
+ </PopoverContent>
35367
+ </Popover>
35368
+ );
35369
+
35370
+ return (
35371
+ <Box
35372
+ ref={rootRef}
35373
+ display="flex"
35374
+ flexDirection="column"
35375
+ gap="md"
35376
+ padding="lg"
35377
+ >
35378
+ <ActionButton label="Background button" variant="secondary" />
35379
+ {via === "provider" ? (
35380
+ <PortalContainerProvider portalContainer={container}>
35381
+ {popover}
35382
+ </PortalContainerProvider>
35383
+ ) : (
35384
+ popover
35385
+ )}
35386
+ </Box>
35387
+ );
34750
35388
  };`},similarTo:[],figmaUrl:null},IconSelect:{id:"core-forms-select-iconselect",importStatement:'import { IconSelect } from "@baseline-ui/core";',description:"",documentation:null,props:`interface IconSelectProps {
34751
35389
  /**
34752
35390
  * The icon to show at the start of the color input.
@@ -36895,7 +37533,7 @@ padding={[null, "lg", "xl"]}
36895
37533
 
36896
37534
  * [vanilla-extract sprinkles documentation](https://vanilla-extract.style/documentation/packages/sprinkles/) - Learn about the underlying sprinkles framework
36897
37535
  * [Box component documentation](/docs/core-utilities-box--docs) - Detailed information about the Box component
36898
- * [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var c={"8":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","ChevronRightFilledIcon","ChevronRightIcon","EllipseIcon","MinusIcon","PlusIcon","XIcon"],"12":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","EditIcon","EllipseIcon","EnterKeyIcon","LockFilledIcon","LockIcon","MinusIcon","MoreVIcon","MoreIcon","PlaceholderIcon","PlusIcon","SearchIcon","SizeIcon","TrashIcon","XIcon","ZoomIcon"],"16":["AlignBottomIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDiagonalTopLeftBottomRightIcon","ArrowDownCircleFilledIcon","ArrowDownIcon","ArrowIcon","ArrowLeftRightIcon","ArrowRightIcon","ArrowUpArrowDownIcon","ArrowUpIcon","AtIcon","AttachmentsIcon","AvatarIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BulletListIcon","CalendarIcon","CaretLeftIcon","CaretRightIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","CircleFilledIcon","ClockIcon","CopyIcon","CustomizeIcon","DocumentEditIcon","DownloadIcon","DuplicateIcon","EditIcon","ElipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FilterAltIcon","FolderIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FullScreenIcon","HelpCircleIcon","HelpIcon","HereIcon","HideIcon","HighlightTextAltIcon","HighlightTextIcon","HorizontalScrollIcon","ImageIcon","InfoCircleFilledIcon","InsertIcon","ItalicIcon","LightBulbIcon","LineIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MeasureIcon","MinusIcon","MoreIcon","MoreVerticalIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","NumberedListIcon","OpenIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageVerticalScrollIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PlaceholderIcon","PlayIcon","PlusIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","ReadOnlyIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedoIcon","RemoveFormattingIcon","ReorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RulerIcon","SearchIcon","SettingsIcon","ShowIcon","SlashCommandsIcon","SoundRecordIcon","StampIcon","StarFilledIcon","StarIcon","StrikeoutTextAltIcon","TableCellIcon","TableColumnIcon","TableHeaderIcon","TableIcon","TableRowIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextDecreaseIndentIcon","TextIcon","TextIncreaseIndentIcon","TextMarkIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UndoIcon","UnlockIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WindowedIcon","WorkflowIcon","XCircleFilledIcon","XIcon"],"20":["AddPageIcon","AnonymousIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpCircleFilledIcon","AtIcon","AvatarFilledIcon","BoldIcon","CalloutIcon","CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ClockIcon","CollapseIcon","CommentIcon","CopyIcon","CutIcon","DistanceIcon","DownloadIcon","DuplicateIcon","EditIcon","EllipseIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorAlternativeCircleIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FormDateIcon","FormSignatureIcon","FormTextFieldIcon","HelpCircleIcon","HighlightTextIcon","HomeIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","ItalicIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MinusIcon","MoreIcon","MoreVerticalIcon","MoveIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OpenIcon","PageMoveLeftIcon","PageMoveRightIcon","PagesInsertIcon","PasteIcon","PipetteIcon","PlusIcon","PrintIcon","RotateClockwiseIcon","SearchIcon","SettingsIcon","ShapeIcon","ShareIcon","SoundIcon","SoundRecordIcon","StarFilledIcon","StarIcon","StyleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UploadIcon","WarningFilledIcon","WarningIcon","XCircleFilledIcon","XCircleIcon","XIcon"],"24":["AddNoteCloudIcon","AddNoteIcon","AddTextSerifIcon","AiIcon","AirplaneIcon","AlignBottomIcon","AlignHorizontalCenterIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDownIcon","ArrowIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","AtIcon","AttachmentIcon","AvatarFilledIcon","AvatarIcon","BlendModeIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BorderColorIcon","BottomBorderIcon","BulletListIcon","CalibrateIcon","CaptureAddIcon","CaretDownIcon","CaretIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ChevronListIcon","ClockIcon","CloudyBorderIcon","CollapseIcon","ColorPaletteIcon","ColorSwatchIcon","CommentIcon","CommentInSidebarIcon","CommentOnPageIcon","CompareDocumentsIcon","CopyIcon","CopyPageIcon","CropIcon","CustomizeIcon","CutIcon","DateModifiedIcon","DatePlusIcon","DebugIcon","DocumentArrowDownCircleIcon","DocumentArrowDownIcon","DocumentArrowRightIcon","DocumentFilledIcon","DocumentLockIcon","DocumentPdfIcon","DownloadIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","DuplicateIcon","EditAnnotationsIcon","EditContentIcon","EditDocumentIcon","EditIcon","EditThumbnailsIcon","EllipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","EndCapArrowFilledIcon","EndCapArrowIcon","EndCapChevronFilledIcon","EndCapChevronIcon","EndCapCircleIcon","EndCapDiamondIcon","EndCapNoneIcon","EndCapSlantedIcon","EndCapSquareIcon","EndCapStraightIcon","EraserIcon","ErrorAltCircleFilledIcon","ErrorAltIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","ExpandVerticalIcon","FillColorIcon","FilterIcon","FitToHeightIcon","FivePagesHorizontalFilledIcon","FivePagesVerticalFilledIcon","FolderAddIcon","FolderIcon","FontListIcon","FontSizeIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormPageIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FormTwoRadioButtonsIcon","FourPagesGridFilledIcon","FourPagesHorizontalFilledIcon","FourPagesStackedFilledIcon","FourPagesVerticalFilledIcon","GroupIcon","HamburgerMenuIcon","HandIcon","HeartIcon","HideIcon","HideRevealIcon","HighlightTextIcon","HomeIcon","HorizontalScollIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","InitialsIcon","InnerHorizontalBorderIcon","InnerVerticalBorderIcon","InsertIcon","ItalicIcon","LayerBottomIcon","LayerDownIcon","LayerTopIcon","LayerUpIcon","LayersIcon","LeftBindingIcon","LeftBorderIcon","LineCapsIcon","LineIcon","LineSpacingIcon","LineStyleCloudyIcon","LineStyleDashedDoubleDashIcon","LineStyleDashedDoubleGapIcon","LineStyleDashedQuadrupleDashIcon","LineStyleDashedSingleGapIcon","LineStyleIcon","LineStyleSolidIcon","LineWidthIcon","LinkIcon","LockFilledIcon","LockIcon","MagicIcon","MagicPenIcon","MailIcon","MarkupIcon","MarqueeZoomIcon","MeasureIcon","MergeIcon","MessageCloudIcon","MinusIcon","MoonIcon","MoreCircleIcon","MoreIcon","MoreVerticalIcon","MoveAllDirectionsIcon","MoveLeftIcon","MoveLeftRightIcon","MoveRightIcon","MultiplePagesIcon","NonEditableIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OcrIcon","OpacityIcon","PageAddIcon","PageCurlIcon","PageDuplicateIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLandscapeIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageMoveLeftIcon","PageMoveRightIcon","PageNumberCircleIcon","PageNumberIcon","PagePortraitIcon","PageRemoveIcon","PageVerticalScrollIcon","PagesInsertAltIcon","PagesInsertIcon","PagesNewFromSelectionAltIcon","PagesNewFromSelectionIcon","PagesSelectAllIcon","PagesSelectNoneIcon","PasteBoardIcon","PastePageIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PinDropFilledIcon","PinDropIcon","PipetteIcon","PlayIcon","PlusCircleFilledIcon","PlusCircleIcon","PlusIcon","PointerIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","PrecisionIcon","PrintIcon","PrivateModeIcon","PushPinIcon","QuestionmarkCircleIcon","ReaderViewIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedactIcon","RedactRectangleIcon","RedactTextHighlighterIcon","RedactionTextRepeatingIcon","RedactionTextSingleIcon","RedoAllIcon","RedoIcon","RegexIcon","ReplaceIcon","RightBindingIcon","RightBorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RotateObjectClockwiseIcon","RotateObjectCounterClockwiseIcon","RulerIcon","ScaleIcon","SearchCircleIcon","SearchIcon","SearchSelectionIcon","SelectAllIcon","SelectionToolIcon","SettingsIcon","ShapesIcon","ShareAltIcon","ShareIcon","ShieldAddIcon","ShieldCheckmarkIcon","ShieldWarningIcon","ShieldXIcon","ShowIcon","SidebarIcon","SignOutIcon","SignatureDigitalIcon","SignatureIcon","SinglePageFilledIcon","SoundIcon","SquigglyTextIcon","StampAddIcon","StampIcon","StarFilledIcon","StarIcon","StartCapArrowFilledIcon","StartCapArrowIcon","StartCapChevronFilledIcon","StartCapChevronIcon","StartCapCircleIcon","StartCapDiamondIcon","StartCapNoneIcon","StartCapSlantedIcon","StartCapSquareIcon","StartCapStraightIcon","StrikeoutTextIcon","StyleFilledIcon","StyleIcon","StylusFilledIcon","StylusIcon","SunIcon","TableCellIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextColorIcon","TextIcon","TextPropertiesHideIcon","TextPropertiesShowIcon","TextSerifIcon","TextSmallerIcon","ThreePagesHorizontalFilledIcon","ThreePagesStackedFilledIcon","ThreePagesVerticalFilledIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TopBorderIcon","TrashIcon","TwoPagesHorizontalFilledIcon","TwoPagesVerticalFilledIcon","TypeTextIcon","UnderlineIcon","UnderlineTextIcon","UndoAllIcon","UndoIcon","UndoRedoIcon","UngroupIcon","UnlockIcon","UploadIcon","UserIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WidgetIcon","WorkflowIcon","XCircleFilledIcon","XCircleIcon","XIcon","ZoomInIcon","ZoomOutIcon"],"36":["ArrowRight","Check","Circle","Cross","Help","Inset","Key","NewParagraphAlt","NewParagraph","Note","PointerRight","SpeechBubble","Star"]};var p={version:"3.0.1"};var u=`
37536
+ * [Theme documentation](/docs/theming--docs) - Learn about Baseline UI's theming system`};var c={"8":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","ChevronRightFilledIcon","ChevronRightIcon","EllipseIcon","MinusIcon","PlusIcon","XIcon"],"12":["CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","EditIcon","EllipseIcon","EnterKeyIcon","LockFilledIcon","LockIcon","MinusIcon","MoreVIcon","MoreIcon","PlaceholderIcon","PlusIcon","SearchIcon","SizeIcon","TrashIcon","XIcon","ZoomIcon"],"16":["AlignBottomIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDiagonalTopLeftBottomRightIcon","ArrowDownCircleFilledIcon","ArrowDownIcon","ArrowIcon","ArrowLeftRightIcon","ArrowRightIcon","ArrowUpArrowDownIcon","ArrowUpIcon","AtIcon","AttachmentsIcon","AvatarIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BulletListIcon","CalendarIcon","CaretLeftIcon","CaretRightIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","CircleFilledIcon","ClockIcon","CopyIcon","CustomizeIcon","DocumentEditIcon","DownloadIcon","DuplicateIcon","EditIcon","ElipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FilterAltIcon","FolderIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FullScreenIcon","HelpCircleIcon","HelpIcon","HereIcon","HideIcon","HighlightTextAltIcon","HighlightTextIcon","HorizontalScrollIcon","ImageIcon","InfoCircleFilledIcon","InsertIcon","ItalicIcon","LightBulbIcon","LineIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MeasureIcon","MinusIcon","MoreIcon","MoreVerticalIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","NumberedListIcon","OpenIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageVerticalScrollIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PlaceholderIcon","PlayIcon","PlusIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","ReadOnlyIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedoIcon","RemoveFormattingIcon","ReorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RulerIcon","SearchIcon","SettingsIcon","ShowIcon","SlashCommandsIcon","SoundRecordIcon","StampIcon","StarFilledIcon","StarIcon","StrikeoutTextAltIcon","TableCellIcon","TableColumnIcon","TableHeaderIcon","TableIcon","TableRowIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextDecreaseIndentIcon","TextIcon","TextIncreaseIndentIcon","TextMarkIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UndoIcon","UnlockIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WindowedIcon","WorkflowIcon","XCircleFilledIcon","XIcon"],"20":["AddPageIcon","AnonymousIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpCircleFilledIcon","AtIcon","AvatarFilledIcon","BoldIcon","CalloutIcon","CaretDownIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ClockIcon","CollapseIcon","CommentIcon","CopyIcon","CutIcon","DistanceIcon","DownloadIcon","DuplicateIcon","EditIcon","EllipseIcon","EmojiSmileIcon","ErrorAltCircleFilledIcon","ErrorAlternativeCircleIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","FormDateIcon","FormSignatureIcon","FormTextFieldIcon","HelpCircleIcon","HighlightTextIcon","HomeIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","ItalicIcon","LinkIcon","ListIcon","LockIcon","MagicIcon","MinusIcon","MoreIcon","MoreVerticalIcon","MoveIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCrossIcon","NoteHelpIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OpenIcon","PageMoveLeftIcon","PageMoveRightIcon","PagesInsertIcon","PasteIcon","PipetteIcon","PlusIcon","PrintIcon","RotateClockwiseIcon","SearchIcon","SettingsIcon","ShapeIcon","ShareIcon","SoundIcon","SoundRecordIcon","StarFilledIcon","StarIcon","StyleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TrashIcon","TypeTextIcon","UnderlineIcon","UploadIcon","WarningFilledIcon","WarningIcon","XCircleFilledIcon","XCircleIcon","XIcon"],"24":["AddNoteCloudIcon","AddNoteIcon","AddTextSerifIcon","AiIcon","AirplaneIcon","AlignBottomIcon","AlignHorizontalCenterIcon","AlignMiddleIcon","AlignTopIcon","AnonymousIcon","ArrowDownIcon","ArrowIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","AtIcon","AttachmentIcon","AvatarFilledIcon","AvatarIcon","BlendModeIcon","BoldIcon","BookmarkFilledIcon","BookmarkIcon","BorderColorIcon","BottomBorderIcon","BulletListIcon","CalibrateIcon","CaptureAddIcon","CaretDownIcon","CaretIcon","CaretLeftIcon","CaretRightIcon","CaretUpIcon","CheckmarkCircleFilledIcon","CheckmarkCircleIcon","CheckmarkIcon","ChevronListIcon","ClockIcon","CloudyBorderIcon","CollapseIcon","ColorPaletteIcon","ColorSwatchIcon","CommentIcon","CommentInSidebarIcon","CommentOnPageIcon","CompareDocumentsIcon","CopyIcon","CopyPageIcon","CropIcon","CustomizeIcon","CutIcon","DateModifiedIcon","DatePlusIcon","DebugIcon","DocumentArrowDownCircleIcon","DocumentArrowDownIcon","DocumentArrowRightIcon","DocumentFilledIcon","DocumentLockIcon","DocumentPdfIcon","DownloadIcon","DragIndicatorIcon","DragIndicatorVerticalIcon","DuplicateIcon","EditAnnotationsIcon","EditContentIcon","EditDocumentIcon","EditIcon","EditThumbnailsIcon","EllipseAreaIcon","EllipseCloudyIcon","EllipseDashedIcon","EllipseIcon","EmbedIcon","EmojiSmileIcon","EndCapArrowFilledIcon","EndCapArrowIcon","EndCapChevronFilledIcon","EndCapChevronIcon","EndCapCircleIcon","EndCapDiamondIcon","EndCapNoneIcon","EndCapSlantedIcon","EndCapSquareIcon","EndCapStraightIcon","EraserIcon","ErrorAltCircleFilledIcon","ErrorAltIcon","ErrorCircleFilledIcon","ErrorCircleIcon","ExpandIcon","ExpandVerticalIcon","FillColorIcon","FilterIcon","FitToHeightIcon","FivePagesHorizontalFilledIcon","FivePagesVerticalFilledIcon","FolderAddIcon","FolderIcon","FontListIcon","FontSizeIcon","FormButtonIcon","FormChoiceIcon","FormComboboxIcon","FormDateIcon","FormListboxIcon","FormPageIcon","FormRadioButtonIcon","FormSignatureIcon","FormTextFieldIcon","FormTwoRadioButtonsIcon","FourPagesGridFilledIcon","FourPagesHorizontalFilledIcon","FourPagesStackedFilledIcon","FourPagesVerticalFilledIcon","GroupIcon","HamburgerMenuIcon","HandIcon","HeartIcon","HideIcon","HideRevealIcon","HighlightTextIcon","HomeIcon","HorizontalScollIcon","ImageIcon","InfoCircleFilledIcon","InfoCircleIcon","InitialsIcon","InnerHorizontalBorderIcon","InnerVerticalBorderIcon","InsertIcon","ItalicIcon","LayerBottomIcon","LayerDownIcon","LayerTopIcon","LayerUpIcon","LayersIcon","LeftBindingIcon","LeftBorderIcon","LineCapsIcon","LineIcon","LineSpacingIcon","LineStyleCloudyIcon","LineStyleDashedDoubleDashIcon","LineStyleDashedDoubleGapIcon","LineStyleDashedQuadrupleDashIcon","LineStyleDashedSingleGapIcon","LineStyleIcon","LineStyleSolidIcon","LineWidthIcon","LinkIcon","LockFilledIcon","LockIcon","MagicIcon","MagicPenIcon","MailIcon","MarkupIcon","MarqueeZoomIcon","MeasureIcon","MergeIcon","MessageCloudIcon","MinusIcon","MoonIcon","MoreCircleIcon","MoreIcon","MoreVerticalIcon","MoveAllDirectionsIcon","MoveLeftIcon","MoveLeftRightIcon","MoveRightIcon","MultiplePagesIcon","NonEditableIcon","NoteArrowRightIcon","NoteCheckIcon","NoteCircleIcon","NoteCloudIcon","NoteCrossIcon","NoteHelpIcon","NoteIcon","NoteInsetIcon","NoteKeyIcon","NoteNewParagraphAltIcon","NoteNewParagraphIcon","NoteNoteIcon","NotePointerRightIcon","NoteSpeechBubbleIcon","NoteStarIcon","OcrIcon","OpacityIcon","PageAddIcon","PageCurlIcon","PageDuplicateIcon","PageFittingFillIcon","PageFittingFitIcon","PageHorizontalScrollIcon","PageLandscapeIcon","PageLayoutDoubleIcon","PageLayoutSingleIcon","PageMoveLeftIcon","PageMoveRightIcon","PageNumberCircleIcon","PageNumberIcon","PagePortraitIcon","PageRemoveIcon","PageVerticalScrollIcon","PagesInsertAltIcon","PagesInsertIcon","PagesNewFromSelectionAltIcon","PagesNewFromSelectionIcon","PagesSelectAllIcon","PagesSelectNoneIcon","PasteBoardIcon","PastePageIcon","PauseIcon","PenHighlighterIcon","PenIcon","PerimeterIcon","PinDropFilledIcon","PinDropIcon","PipetteIcon","PlayIcon","PlusCircleFilledIcon","PlusCircleIcon","PlusIcon","PointerIcon","PolygonAreaIcon","PolygonCloudyIcon","PolygonDashedIcon","PolygonIcon","PolylineIcon","PrecisionIcon","PrintIcon","PrivateModeIcon","PushPinIcon","QuestionmarkCircleIcon","ReaderViewIcon","RectangleAreaIcon","RectangleCloudyIcon","RectangleDashedIcon","RectangleIcon","RedactIcon","RedactRectangleIcon","RedactTextHighlighterIcon","RedactionTextRepeatingIcon","RedactionTextSingleIcon","RedoAllIcon","RedoIcon","RegexIcon","ReplaceIcon","RightBindingIcon","RightBorderIcon","RotateClockwiseIcon","RotateCounterClockwiseIcon","RotateObjectClockwiseIcon","RotateObjectCounterClockwiseIcon","RulerIcon","ScaleIcon","SearchCircleIcon","SearchIcon","SearchSelectionIcon","SelectAllIcon","SelectionToolIcon","SettingsIcon","ShapesIcon","ShareAltIcon","ShareIcon","ShieldAddIcon","ShieldCheckmarkIcon","ShieldWarningIcon","ShieldXIcon","ShowIcon","SidebarIcon","SignOutIcon","SignatureDigitalIcon","SignatureIcon","SinglePageFilledIcon","SoundIcon","SquigglyTextIcon","StampAddIcon","StampIcon","StarFilledIcon","StarIcon","StartCapArrowFilledIcon","StartCapArrowIcon","StartCapChevronFilledIcon","StartCapChevronIcon","StartCapCircleIcon","StartCapDiamondIcon","StartCapNoneIcon","StartCapSlantedIcon","StartCapSquareIcon","StartCapStraightIcon","StrikeoutTextIcon","StyleFilledIcon","StyleIcon","StylusFilledIcon","StylusIcon","SunIcon","TableCellIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextCalloutIcon","TextColorIcon","TextIcon","TextPropertiesHideIcon","TextPropertiesShowIcon","TextSerifIcon","TextSmallerIcon","ThreePagesHorizontalFilledIcon","ThreePagesStackedFilledIcon","ThreePagesVerticalFilledIcon","ThumbnailsIcon","ThumbsDownIcon","ThumbsUpIcon","TopBorderIcon","TrashIcon","TwoPagesHorizontalFilledIcon","TwoPagesVerticalFilledIcon","TypeTextIcon","UnderlineIcon","UnderlineTextIcon","UndoAllIcon","UndoIcon","UndoRedoIcon","UngroupIcon","UnlockIcon","UploadIcon","UserIcon","VerticalScrollIcon","VideoIcon","WarningFilledIcon","WarningIcon","WidgetIcon","WorkflowIcon","XCircleFilledIcon","XCircleIcon","XIcon","ZoomInIcon","ZoomOutIcon"],"36":["ArrowRight","Check","Circle","Cross","Help","Inset","Key","NewParagraphAlt","NewParagraph","Note","PointerRight","SpeechBubble","Star"]};var p={version:"3.2.0"};var u=`
36899
37537
  # Baseline UI MCP Server Guidelines
36900
37538
 
36901
37539
  This MCP server provides AI assistants with structured access to Baseline UI's comprehensive component documentation, icon library, theming resources, and design guidelines.