@astryxdesign/core 0.7.2-canary.9fa2213 → 0.7.2-canary.a44ebd5
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/README.md +4 -4
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +40 -1
- package/dist/AspectRatio/AspectRatio.d.ts +6 -8
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/AspectRatio/AspectRatio.js +44 -3
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +4 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -2
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +1 -0
- package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +3 -1
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +6 -2
- package/dist/CheckboxList/CheckboxListItem.d.ts +9 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +4 -2
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +37 -5
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Drawer/Drawer.d.ts +191 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -0
- package/dist/Drawer/Drawer.js +382 -0
- package/dist/Drawer/DrawerHeader.d.ts +85 -0
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -0
- package/dist/Drawer/DrawerHeader.js +134 -0
- package/dist/Drawer/index.d.ts +11 -0
- package/dist/Drawer/index.d.ts.map +1 -0
- package/dist/Drawer/index.js +11 -0
- package/dist/Drawer/useDrawerDialogPresence.d.ts +42 -0
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -0
- package/dist/Drawer/useDrawerDialogPresence.js +236 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +83 -11
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.d.ts +17 -0
- package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.js +21 -0
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +5 -3
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuDivider.js +7 -3
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts +6 -4
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuGroup.js +4 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -8
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +24 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +46 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +4 -10
- package/dist/Field/Field.d.ts +1 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +8 -4
- package/dist/FormLayout/FormLayout.d.ts +5 -4
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/FormLayout/FormLayout.js +1 -1
- package/dist/FormLayout/FormLayoutContext.d.ts +3 -3
- package/dist/FormLayout/FormLayoutContext.js +3 -3
- package/dist/Grid/Grid.js +1 -1
- package/dist/Grid/GridSpan.d.ts.map +1 -1
- package/dist/Grid/GridSpan.js +1 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +4 -2
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +19 -4
- package/dist/Layer/layerViewportInset.stylex.d.ts +6 -2
- package/dist/Layer/layerViewportInset.stylex.d.ts.map +1 -1
- package/dist/Layer/layerViewportInset.stylex.js +6 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +13 -7
- package/dist/Layer/useLayerDismissal.d.ts +1 -1
- package/dist/Layer/useLayerDismissal.js +1 -1
- package/dist/Layout/container.stylex.d.ts +5 -5
- package/dist/Layout/container.stylex.js +4 -4
- package/dist/List/List.d.ts +46 -19
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +28 -10
- package/dist/List/ListContext.d.ts +8 -3
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +7 -2
- package/dist/List/ListItem.d.ts +13 -5
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +21 -8
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.d.ts.map +1 -1
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +8 -1
- package/dist/Markdown/plugins/frontmatter.d.ts.map +1 -1
- package/dist/Markdown/plugins/frontmatter.js +7 -3
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +5 -1
- package/dist/MetadataList/MetadataListContext.d.ts +1 -1
- package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.d.ts +9 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +30 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +22 -8
- package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +100 -2
- package/dist/Popover/Popover.js +2 -2
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +45 -11
- package/dist/RadioList/RadioList.d.ts +1 -1
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +6 -2
- package/dist/RadioList/RadioListItem.d.ts +9 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +2 -0
- package/dist/SideNav/SideNavItem.d.ts +8 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +76 -10
- package/dist/TabList/TabMenu.d.ts +2 -2
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +6 -3
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +4 -2
- package/dist/ToggleButton/ToggleButton.d.ts +3 -2
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +12 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +3 -3
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +3 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +2 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +57 -9
- package/dist/astryx.css +46 -13
- package/dist/hooks/useEntryAnimation.d.ts +2 -1
- package/dist/hooks/useEntryAnimation.d.ts.map +1 -1
- package/dist/hooks/useEntryAnimation.js +14 -12
- package/dist/hooks/useIsHydrating.d.ts +6 -0
- package/dist/hooks/useIsHydrating.d.ts.map +1 -0
- package/dist/hooks/useIsHydrating.js +30 -0
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +18 -13
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +77 -1
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +77 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +0 -3
- package/dist/utils/focusOutline.stylex.d.ts +4 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +4 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +15 -9
- package/docs.mjs +4 -4
- package/locales/en.json +304 -0
- package/locales/pseudo.json +228 -0
- package/package.json +8 -3
- package/scripts/agent-doc-state.mjs +66 -6
- package/scripts/postinstall.mjs +44 -3
- package/src/AppShell/AppShell.tsx +45 -1
- package/src/AspectRatio/AspectRatio.test.tsx +44 -43
- package/src/AspectRatio/AspectRatio.tsx +38 -18
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +157 -0
- package/src/Avatar/Avatar.doc.mjs +5 -3
- package/src/AvatarGroup/AvatarGroup.doc.mjs +3 -2
- package/src/AvatarGroup/AvatarGroupOverflow.test.tsx +24 -1
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +2 -0
- package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +30 -1
- package/src/Card/Card.doc.mjs +1 -1
- package/src/Chat/ChatLayoutScrollButton.test.tsx +13 -0
- package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
- package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +64 -19
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +3 -1
- package/src/CheckboxInput/CheckboxInput.test.tsx +34 -0
- package/src/CheckboxInput/CheckboxInput.tsx +3 -1
- package/src/CheckboxList/CheckboxList.fr10.test.tsx +29 -2
- package/src/CheckboxList/CheckboxList.test.tsx +22 -0
- package/src/CheckboxList/CheckboxList.tsx +4 -1
- package/src/CheckboxList/CheckboxListItem.doc.mjs +16 -0
- package/src/CheckboxList/CheckboxListItem.tsx +10 -0
- package/src/Code/Code.doc.mjs +1 -0
- package/src/CommandPalette/CommandPalette.doc.mjs +2 -0
- package/src/CommandPalette/CommandPaletteInput.test.tsx +53 -4
- package/src/CommandPalette/CommandPaletteInput.tsx +33 -3
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +335 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +292 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +2 -3
- package/src/ContextMenu/ContextMenu.test.tsx +6 -1
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +438 -0
- package/src/Dialog/Dialog.test.tsx +46 -0
- package/src/Dialog/Dialog.tsx +20 -7
- package/src/Dialog/__tests__/Dialog.a11y.known-failures.ts +0 -14
- package/src/Drawer/Drawer.doc.mjs +473 -0
- package/src/Drawer/Drawer.spec.md +357 -0
- package/src/Drawer/Drawer.test.tsx +1300 -0
- package/src/Drawer/Drawer.tsx +613 -0
- package/src/Drawer/DrawerDirection.test.tsx +127 -0
- package/src/Drawer/DrawerHeader.doc.mjs +293 -0
- package/src/Drawer/DrawerHeader.test.tsx +102 -0
- package/src/Drawer/DrawerHeader.tsx +235 -0
- package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +401 -0
- package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +297 -0
- package/src/Drawer/index.ts +13 -0
- package/src/Drawer/useDrawerDialogPresence.ts +284 -0
- package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +57 -0
- package/src/DropdownMenu/DropdownMenu.test.tsx +79 -18
- package/src/DropdownMenu/DropdownMenu.tsx +83 -12
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +1 -1
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +1 -1
- package/src/DropdownMenu/DropdownMenuContext.tsx +24 -0
- package/src/DropdownMenu/DropdownMenuDivider.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +192 -0
- package/src/DropdownMenu/DropdownMenuDivider.tsx +9 -5
- package/src/DropdownMenu/DropdownMenuGroup.doc.mjs +169 -10
- package/src/DropdownMenu/DropdownMenuGroup.tsx +6 -4
- package/src/DropdownMenu/DropdownMenuLazySheet.test.tsx +126 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +1 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +1 -1
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +185 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +19 -5
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +280 -0
- package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +334 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +145 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.known-failures.ts +26 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.renders.tsx +65 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.states.ts +138 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.test.tsx +136 -0
- package/src/DropdownMenu/__tests__/warmMenuBottomSheet.tsx +43 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +71 -0
- package/src/EmptyState/EmptyState.doc.mjs +3 -2
- package/src/EmptyState/EmptyState.spec.md +189 -0
- package/src/EmptyState/EmptyState.test.tsx +74 -3
- package/src/EmptyState/EmptyState.tsx +4 -8
- package/src/Field/Field.doc.mjs +14 -8
- package/src/Field/Field.spec.md +217 -0
- package/src/Field/Field.test.tsx +60 -2
- package/src/Field/Field.tsx +17 -8
- package/src/Field/FieldLabel.doc.mjs +133 -26
- package/src/Field/FieldLabel.spec.md +172 -0
- package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +296 -0
- package/src/FormLayout/FormLayout.doc.mjs +6 -3
- package/src/FormLayout/FormLayout.spec.md +192 -0
- package/src/FormLayout/FormLayout.test.tsx +15 -0
- package/src/FormLayout/FormLayout.tsx +7 -6
- package/src/FormLayout/FormLayoutContext.ts +3 -3
- package/src/Grid/Grid.test.tsx +22 -0
- package/src/Grid/Grid.tsx +2 -2
- package/src/Grid/GridSpan.tsx +3 -0
- package/src/Heading/Heading.test.tsx +57 -0
- package/src/Heading/Heading.tsx +6 -2
- package/src/Icon/Icon.doc.mjs +36 -0
- package/src/Indicator/Indicator.doc.mjs +3 -3
- package/src/Item/Item.doc.mjs +12 -8
- package/src/Item/Item.spec.md +226 -0
- package/src/Item/Item.test.tsx +61 -0
- package/src/Item/Item.tsx +40 -4
- package/src/Layer/layerViewportInset.source-build.test.mjs +90 -0
- package/src/Layer/layerViewportInset.stylex.ts +6 -2
- package/src/Layer/layerViewportInset.test.ts +1 -0
- package/src/Layer/useLayer.tsx +24 -13
- package/src/Layer/useLayerDismissal.ts +1 -1
- package/src/Layout/LayoutHeader.doc.mjs +5 -0
- package/src/Layout/container.stylex.ts +6 -6
- package/src/List/List.doc.mjs +14 -1
- package/src/List/List.spec.md +129 -77
- package/src/List/List.test.tsx +163 -94
- package/src/List/List.tsx +74 -18
- package/src/List/ListContext.tsx +9 -3
- package/src/List/ListItem.doc.mjs +16 -0
- package/src/List/ListItem.tsx +56 -27
- package/src/List/index.ts +1 -1
- package/src/Markdown/Markdown.tsx +14 -1
- package/src/Markdown/plugins/frontmatter.test.tsx +25 -0
- package/src/Markdown/plugins/frontmatter.ts +7 -3
- package/src/MetadataList/MetadataList.doc.mjs +3 -3
- package/src/MetadataList/MetadataList.test.tsx +38 -0
- package/src/MetadataList/MetadataList.tsx +8 -1
- package/src/MetadataList/MetadataListContext.tsx +1 -1
- package/src/MobileNav/MobileNav.tsx +30 -3
- package/src/MobileNav/MobileNavCloseEdgeCases.test.tsx +173 -15
- package/src/MoreMenu/MoreMenu.test.tsx +5 -1
- package/src/MultiSelector/MultiSelector.test.tsx +159 -0
- package/src/MultiSelector/MultiSelector.tsx +40 -7
- package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +112 -2
- package/src/Popover/Popover.test.tsx +2 -2
- package/src/Popover/Popover.tsx +4 -4
- package/src/PowerSearch/PowerSearchValueEditor.test.tsx +71 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +45 -0
- package/src/ProgressBar/ProgressBar.doc.mjs +1 -0
- package/src/RadioList/RadioList.fr10.test.tsx +45 -2
- package/src/RadioList/RadioList.test.tsx +22 -0
- package/src/RadioList/RadioList.tsx +4 -1
- package/src/RadioList/RadioListItem.doc.mjs +16 -0
- package/src/RadioList/RadioListItem.tsx +10 -1
- package/src/Resizable/useResizable.doc.mjs +2 -0
- package/src/ScrollableArea/ScrollableArea.doc.mjs +1 -1
- package/src/SideNav/SideNav.spec.md +227 -0
- package/src/SideNav/SideNav.test.tsx +220 -0
- package/src/SideNav/SideNavItem.doc.mjs +2 -2
- package/src/SideNav/SideNavItem.tsx +99 -17
- package/src/Slider/Slider.spec.md +39 -18
- package/src/Spinner/Spinner.doc.mjs +1 -1
- package/src/TabList/TabList.spec.md +57 -44
- package/src/TabList/TabList.test.tsx +67 -0
- package/src/TabList/TabMenu.doc.mjs +4 -3
- package/src/TabList/TabMenu.tsx +7 -4
- package/src/Table/Table.spec.md +6 -1
- package/src/Table/plugins/activation/useTableActivation.spec.md +254 -0
- package/src/Text/Text.test.tsx +57 -0
- package/src/Text/Text.tsx +6 -2
- package/src/TimeInput/TimeInput.fr10.test.tsx +15 -0
- package/src/Timestamp/Timestamp.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.test.tsx +95 -0
- package/src/ToggleButton/ToggleButton.tsx +12 -1
- package/src/ToggleButton/ToggleButtonGroup.doc.mjs +4 -0
- package/src/Toolbar/Toolbar.test.tsx +0 -8
- package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +163 -0
- package/src/Toolbar/__tests__/Toolbar.a11y.renders.tsx +63 -0
- package/src/Toolbar/__tests__/Toolbar.a11y.states.ts +142 -0
- package/src/Toolbar/__tests__/Toolbar.a11y.test.tsx +126 -0
- package/src/Tooltip/Tooltip.test.tsx +31 -0
- package/src/TopNav/TopNavMegaMenu.test.tsx +22 -0
- package/src/TopNav/TopNavMegaMenu.tsx +7 -3
- package/src/TopNav/TopNavMenu.test.tsx +19 -0
- package/src/TopNav/TopNavMenu.tsx +11 -3
- package/src/TreeList/TreeList.doc.mjs +1 -0
- package/src/TreeList/TreeList.spec.md +29 -17
- package/src/TreeList/TreeList.test.tsx +327 -6
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListBranches.tsx +6 -0
- package/src/TreeList/TreeListItem.tsx +88 -13
- package/src/docPropLiterals.test.ts +36 -10
- package/src/hooks/useEntryAnimation.doc.mjs +4 -4
- package/src/hooks/useEntryAnimation.ssr.test.tsx +143 -0
- package/src/hooks/useEntryAnimation.ts +15 -16
- package/src/hooks/useIsHydrating.test.tsx +70 -0
- package/src/hooks/useIsHydrating.ts +31 -0
- package/src/hooks/useMenuHover.ts +18 -13
- package/src/i18n/generated-locales/en.generated.ts +84 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +84 -0
- package/src/index.ts +1 -0
- package/src/postinstall.test.mjs +79 -0
- package/src/reset.css +0 -29
- package/src/theme/derivedVarRegistry.test.ts +7 -3
- package/src/theme/derivedVarRegistry.ts +0 -3
- package/src/utils/focusOutline.stylex.ts +4 -0
- package/src/utils/plainDate.test.ts +37 -1
- package/src/utils/plainDate.ts +15 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearchValueEditor.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchValueEditor.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAIZ,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAqBxD,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"PowerSearchValueEditor.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchValueEditor.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAIZ,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAqBxD,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA4rBD,wBAAgB,sBAAsB,CAAC,EACrC,aAAa,EACb,WAAW,EACX,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,GACX,EAAE,2BAA2B,4BA0I7B"}
|
|
@@ -59,7 +59,8 @@ function StringEditor({
|
|
|
59
59
|
filterValue,
|
|
60
60
|
onChange,
|
|
61
61
|
onEnter: _onEnter,
|
|
62
|
-
maxMenuItems
|
|
62
|
+
maxMenuItems,
|
|
63
|
+
isDisabled
|
|
63
64
|
}) {
|
|
64
65
|
const t = useTranslator();
|
|
65
66
|
const currentValue = filterValue?.type === 'string' ? filterValue.value : '';
|
|
@@ -74,6 +75,7 @@ function StringEditor({
|
|
|
74
75
|
return /*#__PURE__*/_jsx(Typeahead, {
|
|
75
76
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
76
77
|
isLabelHidden: true,
|
|
78
|
+
isDisabled: isDisabled,
|
|
77
79
|
searchSource: operatorValue.searchSource,
|
|
78
80
|
value: selectedItem,
|
|
79
81
|
onChange: item => {
|
|
@@ -97,6 +99,7 @@ function StringEditor({
|
|
|
97
99
|
return /*#__PURE__*/_jsx(TextInput, {
|
|
98
100
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
99
101
|
isLabelHidden: true,
|
|
102
|
+
isDisabled: isDisabled,
|
|
100
103
|
value: currentValue,
|
|
101
104
|
placeholder: t('@astryx.powersearch.valueEditor.enterValuePlaceholder'),
|
|
102
105
|
onChange: value => {
|
|
@@ -111,7 +114,8 @@ function StringListEditor({
|
|
|
111
114
|
operatorValue,
|
|
112
115
|
filterValue,
|
|
113
116
|
onChange,
|
|
114
|
-
maxMenuItems
|
|
117
|
+
maxMenuItems,
|
|
118
|
+
isDisabled
|
|
115
119
|
}) {
|
|
116
120
|
const t = useTranslator();
|
|
117
121
|
const currentValue = useMemo(() => {
|
|
@@ -140,6 +144,7 @@ function StringListEditor({
|
|
|
140
144
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
141
145
|
label: t('@astryx.powersearch.valueEditor.values'),
|
|
142
146
|
isLabelHidden: true,
|
|
147
|
+
isDisabled: isDisabled,
|
|
143
148
|
searchSource: source,
|
|
144
149
|
value: currentValue,
|
|
145
150
|
onChange: items => {
|
|
@@ -212,7 +217,8 @@ function IntegerEditor({
|
|
|
212
217
|
operatorValue,
|
|
213
218
|
filterValue,
|
|
214
219
|
onChange,
|
|
215
|
-
onEnter
|
|
220
|
+
onEnter,
|
|
221
|
+
isDisabled
|
|
216
222
|
}) {
|
|
217
223
|
const t = useTranslator();
|
|
218
224
|
const currentValue = filterValue?.type === 'integer' ? filterValue.value : undefined;
|
|
@@ -227,6 +233,7 @@ function IntegerEditor({
|
|
|
227
233
|
return /*#__PURE__*/_jsx(NumberInput, {
|
|
228
234
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
229
235
|
isLabelHidden: true,
|
|
236
|
+
isDisabled: isDisabled,
|
|
230
237
|
value: currentValue ?? null,
|
|
231
238
|
onChange: handlers.handleChange,
|
|
232
239
|
onFocus: handlers.handleFocus,
|
|
@@ -244,7 +251,8 @@ function FloatEditor({
|
|
|
244
251
|
operatorValue,
|
|
245
252
|
filterValue,
|
|
246
253
|
onChange,
|
|
247
|
-
onEnter
|
|
254
|
+
onEnter,
|
|
255
|
+
isDisabled
|
|
248
256
|
}) {
|
|
249
257
|
const t = useTranslator();
|
|
250
258
|
const currentValue = filterValue?.type === 'float' ? filterValue.value : undefined;
|
|
@@ -259,6 +267,7 @@ function FloatEditor({
|
|
|
259
267
|
return /*#__PURE__*/_jsx(NumberInput, {
|
|
260
268
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
261
269
|
isLabelHidden: true,
|
|
270
|
+
isDisabled: isDisabled,
|
|
262
271
|
value: currentValue ?? null,
|
|
263
272
|
onChange: handlers.handleChange,
|
|
264
273
|
onFocus: handlers.handleFocus,
|
|
@@ -274,13 +283,15 @@ function FloatEditor({
|
|
|
274
283
|
function TimeEditor({
|
|
275
284
|
operatorValue,
|
|
276
285
|
filterValue,
|
|
277
|
-
onChange
|
|
286
|
+
onChange,
|
|
287
|
+
isDisabled
|
|
278
288
|
}) {
|
|
279
289
|
const t = useTranslator();
|
|
280
290
|
const currentValue = filterValue?.type === 'time' ? filterValue.value : undefined;
|
|
281
291
|
return /*#__PURE__*/_jsx(TimeInput, {
|
|
282
292
|
label: t('@astryx.powersearch.valueEditor.time'),
|
|
283
293
|
isLabelHidden: true,
|
|
294
|
+
isDisabled: isDisabled,
|
|
284
295
|
value: currentValue,
|
|
285
296
|
onChange: value => {
|
|
286
297
|
if (value != null) {
|
|
@@ -296,7 +307,8 @@ function TimeEditor({
|
|
|
296
307
|
}
|
|
297
308
|
function DateAbsoluteEditor({
|
|
298
309
|
filterValue,
|
|
299
|
-
onChange
|
|
310
|
+
onChange,
|
|
311
|
+
isDisabled
|
|
300
312
|
}) {
|
|
301
313
|
const t = useTranslator();
|
|
302
314
|
// Convert unixSeconds to ISO date string for the date input
|
|
@@ -310,6 +322,7 @@ function DateAbsoluteEditor({
|
|
|
310
322
|
return /*#__PURE__*/_jsx(DateInput, {
|
|
311
323
|
label: t('@astryx.powersearch.valueEditor.date'),
|
|
312
324
|
isLabelHidden: true,
|
|
325
|
+
isDisabled: isDisabled,
|
|
313
326
|
value: currentValue,
|
|
314
327
|
onChange: value => {
|
|
315
328
|
if (value != null) {
|
|
@@ -325,7 +338,8 @@ function DateAbsoluteEditor({
|
|
|
325
338
|
function DateRelativeEditor({
|
|
326
339
|
operatorValue,
|
|
327
340
|
filterValue,
|
|
328
|
-
onChange
|
|
341
|
+
onChange,
|
|
342
|
+
isDisabled
|
|
329
343
|
}) {
|
|
330
344
|
const t = useTranslator();
|
|
331
345
|
const currentValue = filterValue?.type === 'date_relative' ? filterValue.value : undefined;
|
|
@@ -366,6 +380,7 @@ function DateRelativeEditor({
|
|
|
366
380
|
return /*#__PURE__*/_jsx(Selector, {
|
|
367
381
|
label: t('@astryx.powersearch.valueEditor.relativeDate'),
|
|
368
382
|
isLabelHidden: true,
|
|
383
|
+
isDisabled: isDisabled,
|
|
369
384
|
options: options,
|
|
370
385
|
value: currentValue,
|
|
371
386
|
onChange: value => {
|
|
@@ -378,7 +393,8 @@ function DateRelativeEditor({
|
|
|
378
393
|
}
|
|
379
394
|
function DateRangeEditor({
|
|
380
395
|
filterValue,
|
|
381
|
-
onChange
|
|
396
|
+
onChange,
|
|
397
|
+
isDisabled
|
|
382
398
|
}) {
|
|
383
399
|
const t = useTranslator();
|
|
384
400
|
const currentValue = useMemo(() => {
|
|
@@ -425,6 +441,7 @@ function DateRangeEditor({
|
|
|
425
441
|
children: /*#__PURE__*/_jsx(DateRangeInput, {
|
|
426
442
|
label: t('@astryx.powersearch.valueEditor.dateRange'),
|
|
427
443
|
isLabelHidden: true,
|
|
444
|
+
isDisabled: isDisabled,
|
|
428
445
|
value: currentValue,
|
|
429
446
|
onChange: handleChange,
|
|
430
447
|
hasClear: false
|
|
@@ -434,7 +451,8 @@ function DateRangeEditor({
|
|
|
434
451
|
function EnumEditor({
|
|
435
452
|
operatorValue,
|
|
436
453
|
filterValue,
|
|
437
|
-
onChange
|
|
454
|
+
onChange,
|
|
455
|
+
isDisabled
|
|
438
456
|
}) {
|
|
439
457
|
const t = useTranslator();
|
|
440
458
|
const currentValue = filterValue?.type === 'enum' ? filterValue.value : undefined;
|
|
@@ -445,6 +463,7 @@ function EnumEditor({
|
|
|
445
463
|
return /*#__PURE__*/_jsx(Selector, {
|
|
446
464
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
447
465
|
isLabelHidden: true,
|
|
466
|
+
isDisabled: isDisabled,
|
|
448
467
|
options: options,
|
|
449
468
|
value: currentValue,
|
|
450
469
|
onChange: value => {
|
|
@@ -458,7 +477,8 @@ function EnumEditor({
|
|
|
458
477
|
function EnumListEditor({
|
|
459
478
|
operatorValue,
|
|
460
479
|
filterValue,
|
|
461
|
-
onChange
|
|
480
|
+
onChange,
|
|
481
|
+
isDisabled
|
|
462
482
|
}) {
|
|
463
483
|
const t = useTranslator();
|
|
464
484
|
const items = useMemo(() => enumItemsToSearchableItems(operatorValue.values), [operatorValue.values]);
|
|
@@ -478,6 +498,7 @@ function EnumListEditor({
|
|
|
478
498
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
479
499
|
label: t('@astryx.powersearch.valueEditor.values'),
|
|
480
500
|
isLabelHidden: true,
|
|
501
|
+
isDisabled: isDisabled,
|
|
481
502
|
searchSource: source,
|
|
482
503
|
value: currentValue,
|
|
483
504
|
onChange: selectedItems => {
|
|
@@ -500,7 +521,8 @@ function EntityListEditor({
|
|
|
500
521
|
operatorValue,
|
|
501
522
|
filterValue,
|
|
502
523
|
onChange,
|
|
503
|
-
maxMenuItems
|
|
524
|
+
maxMenuItems,
|
|
525
|
+
isDisabled
|
|
504
526
|
}) {
|
|
505
527
|
const t = useTranslator();
|
|
506
528
|
const source = useMemo(() => {
|
|
@@ -529,6 +551,7 @@ function EntityListEditor({
|
|
|
529
551
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
530
552
|
label: t('@astryx.powersearch.valueEditor.entities'),
|
|
531
553
|
isLabelHidden: true,
|
|
554
|
+
isDisabled: isDisabled,
|
|
532
555
|
searchSource: source,
|
|
533
556
|
value: currentValue,
|
|
534
557
|
onChange: items => {
|
|
@@ -594,6 +617,7 @@ export function PowerSearchValueEditor({
|
|
|
594
617
|
return null;
|
|
595
618
|
case 'string':
|
|
596
619
|
return /*#__PURE__*/_jsx(StringEditor, {
|
|
620
|
+
isDisabled: isDisabled,
|
|
597
621
|
operatorValue: operatorValue,
|
|
598
622
|
filterValue: filterValue,
|
|
599
623
|
onChange: onChange,
|
|
@@ -602,6 +626,7 @@ export function PowerSearchValueEditor({
|
|
|
602
626
|
});
|
|
603
627
|
case 'string_list':
|
|
604
628
|
return /*#__PURE__*/_jsx(StringListEditor, {
|
|
629
|
+
isDisabled: isDisabled,
|
|
605
630
|
operatorValue: operatorValue,
|
|
606
631
|
filterValue: filterValue,
|
|
607
632
|
onChange: onChange,
|
|
@@ -609,6 +634,7 @@ export function PowerSearchValueEditor({
|
|
|
609
634
|
});
|
|
610
635
|
case 'integer':
|
|
611
636
|
return /*#__PURE__*/_jsx(IntegerEditor, {
|
|
637
|
+
isDisabled: isDisabled,
|
|
612
638
|
operatorValue: operatorValue,
|
|
613
639
|
filterValue: filterValue,
|
|
614
640
|
onChange: onChange,
|
|
@@ -616,6 +642,7 @@ export function PowerSearchValueEditor({
|
|
|
616
642
|
});
|
|
617
643
|
case 'float':
|
|
618
644
|
return /*#__PURE__*/_jsx(FloatEditor, {
|
|
645
|
+
isDisabled: isDisabled,
|
|
619
646
|
operatorValue: operatorValue,
|
|
620
647
|
filterValue: filterValue,
|
|
621
648
|
onChange: onChange,
|
|
@@ -623,42 +650,49 @@ export function PowerSearchValueEditor({
|
|
|
623
650
|
});
|
|
624
651
|
case 'time':
|
|
625
652
|
return /*#__PURE__*/_jsx(TimeEditor, {
|
|
653
|
+
isDisabled: isDisabled,
|
|
626
654
|
operatorValue: operatorValue,
|
|
627
655
|
filterValue: filterValue,
|
|
628
656
|
onChange: onChange
|
|
629
657
|
});
|
|
630
658
|
case 'date_absolute':
|
|
631
659
|
return /*#__PURE__*/_jsx(DateAbsoluteEditor, {
|
|
660
|
+
isDisabled: isDisabled,
|
|
632
661
|
operatorValue: operatorValue,
|
|
633
662
|
filterValue: filterValue,
|
|
634
663
|
onChange: onChange
|
|
635
664
|
});
|
|
636
665
|
case 'date_relative':
|
|
637
666
|
return /*#__PURE__*/_jsx(DateRelativeEditor, {
|
|
667
|
+
isDisabled: isDisabled,
|
|
638
668
|
operatorValue: operatorValue,
|
|
639
669
|
filterValue: filterValue,
|
|
640
670
|
onChange: onChange
|
|
641
671
|
});
|
|
642
672
|
case 'date_range':
|
|
643
673
|
return /*#__PURE__*/_jsx(DateRangeEditor, {
|
|
674
|
+
isDisabled: isDisabled,
|
|
644
675
|
operatorValue: operatorValue,
|
|
645
676
|
filterValue: filterValue,
|
|
646
677
|
onChange: onChange
|
|
647
678
|
});
|
|
648
679
|
case 'enum':
|
|
649
680
|
return /*#__PURE__*/_jsx(EnumEditor, {
|
|
681
|
+
isDisabled: isDisabled,
|
|
650
682
|
operatorValue: operatorValue,
|
|
651
683
|
filterValue: filterValue,
|
|
652
684
|
onChange: onChange
|
|
653
685
|
});
|
|
654
686
|
case 'enum_list':
|
|
655
687
|
return /*#__PURE__*/_jsx(EnumListEditor, {
|
|
688
|
+
isDisabled: isDisabled,
|
|
656
689
|
operatorValue: operatorValue,
|
|
657
690
|
filterValue: filterValue,
|
|
658
691
|
onChange: onChange
|
|
659
692
|
});
|
|
660
693
|
case 'entity_list':
|
|
661
694
|
return /*#__PURE__*/_jsx(EntityListEditor, {
|
|
695
|
+
isDisabled: isDisabled,
|
|
662
696
|
operatorValue: operatorValue,
|
|
663
697
|
filterValue: filterValue,
|
|
664
698
|
onChange: onChange,
|
|
@@ -130,7 +130,7 @@ export interface RadioListProps extends Omit<FieldInputBaseProps<HTMLDivElement>
|
|
|
130
130
|
* </RadioList>
|
|
131
131
|
* ```
|
|
132
132
|
*/
|
|
133
|
-
export declare function RadioList({ ref, label, isLabelHidden, description, value, onChange, orientation, isDisabled, disabledMessage, isRequired, isOptional, size, status, labelTooltip, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, htmlName, children, onFocus, 'aria-describedby': ariaDescribedByProp, ...restProps }: RadioListProps): React.JSX.Element;
|
|
133
|
+
export declare function RadioList({ ref, label, isLabelHidden, description, value, onChange, orientation, isDisabled, disabledMessage, isRequired, isOptional, size, status, labelTooltip, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, htmlName, children, onFocus, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, ...restProps }: RadioListProps): React.JSX.Element;
|
|
134
134
|
export declare namespace RadioList {
|
|
135
135
|
var displayName: string;
|
|
136
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAKhD,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,E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EACX,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,MAAM,EACN,YAAY,EACZ,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EAAE,kBAAkB,EACrC,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,cAAc,qBAoNhB;yBAhPe,SAAS"}
|
|
@@ -24,6 +24,7 @@ import { Field } from "../Field/Field.js";
|
|
|
24
24
|
import { useTooltip } from "../Tooltip/index.js";
|
|
25
25
|
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
26
26
|
import { composeEventHandlers, mergeProps } from "../utils/index.js";
|
|
27
|
+
import { joinAriaIDs } from "../utils/inputAria.js";
|
|
27
28
|
import { useFieldInputStyling } from "../Field/fieldParts.js";
|
|
28
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
29
30
|
|
|
@@ -89,6 +90,7 @@ export function RadioList({
|
|
|
89
90
|
htmlName,
|
|
90
91
|
children,
|
|
91
92
|
onFocus,
|
|
93
|
+
'aria-labelledby': ariaLabelledByProp,
|
|
92
94
|
'aria-describedby': ariaDescribedByProp,
|
|
93
95
|
...restProps
|
|
94
96
|
}) {
|
|
@@ -242,8 +244,10 @@ export function RadioList({
|
|
|
242
244
|
// unconditionally is safe.
|
|
243
245
|
disabledMessageTooltip.ref(el);
|
|
244
246
|
},
|
|
245
|
-
role: "radiogroup"
|
|
246
|
-
|
|
247
|
+
role: "radiogroup"
|
|
248
|
+
// A caller aria-labelledby names the group together with its label.
|
|
249
|
+
,
|
|
250
|
+
"aria-labelledby": joinAriaIDs(labelID, ariaLabelledByProp),
|
|
247
251
|
onFocus: composeEventHandlers(handleFocus, onFocus),
|
|
248
252
|
"aria-describedby": [ariaDescribedByProp, description ? descriptionID : null, status?.message ? statusMessageID : null, showsDisabledMessage ? disabledMessageTooltip.describedBy : null].filter(Boolean).join(' ') || undefined,
|
|
249
253
|
"aria-invalid": status?.type === 'error' ? true : undefined,
|
|
@@ -15,8 +15,16 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import React, { type ReactNode } from 'react';
|
|
17
17
|
import type { BaseProps } from '../BaseProps';
|
|
18
|
+
import { type ItemAlign } from '../Item';
|
|
18
19
|
export interface RadioListItemProps extends BaseProps<HTMLDivElement> {
|
|
19
20
|
ref?: React.Ref<HTMLDivElement>;
|
|
21
|
+
/**
|
|
22
|
+
* Vertical alignment of the start and end content against the label,
|
|
23
|
+
* forwarded to Item. Use `first-line` to keep the radio level with the
|
|
24
|
+
* first line of a wrapped label.
|
|
25
|
+
* @default 'center'
|
|
26
|
+
*/
|
|
27
|
+
align?: ItemAlign;
|
|
20
28
|
/**
|
|
21
29
|
* Primary label for the radio item.
|
|
22
30
|
*
|
|
@@ -83,7 +91,7 @@ export interface RadioListItemProps extends BaseProps<HTMLDivElement> {
|
|
|
83
91
|
* />
|
|
84
92
|
* ```
|
|
85
93
|
*/
|
|
86
|
-
export declare function RadioListItem({ ref, label, 'aria-label': ariaLabel, value, description, isDisabled: isItemDisabled, startContent, endContent, xstyle, className, style, onClick, ...rest }: RadioListItemProps): React.JSX.Element;
|
|
94
|
+
export declare function RadioListItem({ ref, label, 'aria-label': ariaLabel, value, description, isDisabled: isItemDisabled, startContent, endContent, align, xstyle, className, style, onClick, ...rest }: RadioListItemProps): React.JSX.Element;
|
|
87
95
|
export declare namespace RadioListItem {
|
|
88
96
|
var displayName: string;
|
|
89
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,SAAS,CAAC;AA6H7C,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;;;;OAUG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,WAAW,EACX,UAAU,EAAE,cAAsB,EAClC,YAAY,EACZ,UAAU,EACV,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,kBAAkB,qBAoKpB;yBAnLe,aAAa"}
|
|
@@ -122,6 +122,7 @@ export function RadioListItem({
|
|
|
122
122
|
isDisabled: isItemDisabled = false,
|
|
123
123
|
startContent,
|
|
124
124
|
endContent,
|
|
125
|
+
align,
|
|
125
126
|
xstyle,
|
|
126
127
|
className,
|
|
127
128
|
style,
|
|
@@ -244,6 +245,7 @@ export function RadioListItem({
|
|
|
244
245
|
children: description
|
|
245
246
|
}) : undefined,
|
|
246
247
|
endContent: endContent,
|
|
248
|
+
align: align,
|
|
247
249
|
xstyle: [
|
|
248
250
|
// Hover reaches the radio visual through this ancestor marker rather
|
|
249
251
|
// than props, so hovering the row tints the control. The marker rides
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
* `TopNavMenu` use). Hover is a progressive enhancement over the popover's
|
|
14
14
|
* click behavior and is inert on coarse pointers.
|
|
15
15
|
*
|
|
16
|
+
* Nested rows span the full width of the nav list, like top-level rows, so
|
|
17
|
+
* their hover and selected fill lines up with the rows above them. The
|
|
18
|
+
* nesting indent sits inside the row as extra inline-start padding, one step
|
|
19
|
+
* per level, tracked through a private depth context.
|
|
20
|
+
*
|
|
16
21
|
* SYNC: When modified, update these files to stay in sync:
|
|
17
22
|
* - /packages/core/src/SideNav/SideNav.doc.mjs
|
|
18
23
|
* - /packages/core/src/SideNav/SideNav.test.tsx
|
|
@@ -84,7 +89,9 @@ export interface SideNavItemProps extends BaseProps<HTMLElement> {
|
|
|
84
89
|
*/
|
|
85
90
|
actions?: ReactNode;
|
|
86
91
|
/**
|
|
87
|
-
* Sub-items for nesting.
|
|
92
|
+
* Sub-items for nesting. Nested items span the full width of the nav
|
|
93
|
+
* list, like top-level items; their content is indented one step per
|
|
94
|
+
* nesting level.
|
|
88
95
|
*/
|
|
89
96
|
children?: ReactNode;
|
|
90
97
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavItem.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavItem.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"SideNavItem.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavItem.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QACtB,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;KACpD,CAAC;IACN;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,UAAkB,EAClB,UAAkB,EAClB,IAAI,EACJ,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EAAE,eAAe,EAC5B,IAAW,EACX,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,MAAM,EACN,GAAG,IAAI,EACR,EAAE,gBAAgB,sCAqalB;yBAvbe,WAAW"}
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
* `TopNavMenu` use). Hover is a progressive enhancement over the popover's
|
|
18
18
|
* click behavior and is inert on coarse pointers.
|
|
19
19
|
*
|
|
20
|
+
* Nested rows span the full width of the nav list, like top-level rows, so
|
|
21
|
+
* their hover and selected fill lines up with the rows above them. The
|
|
22
|
+
* nesting indent sits inside the row as extra inline-start padding, one step
|
|
23
|
+
* per level, tracked through a private depth context.
|
|
24
|
+
*
|
|
20
25
|
* SYNC: When modified, update these files to stay in sync:
|
|
21
26
|
* - /packages/core/src/SideNav/SideNav.doc.mjs
|
|
22
27
|
* - /packages/core/src/SideNav/SideNav.test.tsx
|
|
@@ -24,7 +29,7 @@
|
|
|
24
29
|
* - /apps/storybook/stories/SideNav.stories.tsx
|
|
25
30
|
* - /packages/cli/assets/templates/blocks/components/SideNav/ (showcase blocks)
|
|
26
31
|
*/
|
|
27
|
-
import { useCallback, useId, useMemo, useRef, useState } from 'react';
|
|
32
|
+
import { createContext, use, useCallback, useId, useMemo, useRef, useState } from 'react';
|
|
28
33
|
import * as stylex from '@stylexjs/stylex';
|
|
29
34
|
import "../theme/tokens.stylex.js";
|
|
30
35
|
import { colorVars, spacingVars, sizeVars, fontWeightVars, typeScaleVars, durationVars, easeVars, radiusVars } from "../theme/tokens.stylex.js";
|
|
@@ -133,6 +138,47 @@ const styles = {
|
|
|
133
138
|
}
|
|
134
139
|
};
|
|
135
140
|
|
|
141
|
+
// Nesting indent, drawn inside the row: one `--spacing-6` step per nesting
|
|
142
|
+
// level. The row itself stays full width, so its hover and selected fill
|
|
143
|
+
// matches a top-level row's.
|
|
144
|
+
// - `sm` / `md` — the ordinary row, where the row element is the link or
|
|
145
|
+
// button: its own inline-start padding plus the steps.
|
|
146
|
+
// SYNC: the base padding matches navItemStyles.sm / .md / .lg.
|
|
147
|
+
// - `primary` — the row-wrapper path: the wrapper keeps its base padding and
|
|
148
|
+
// the steps go on the primary link or button, so the whole indent is part
|
|
149
|
+
// of the click target rather than dead space that still shows feedback.
|
|
150
|
+
const _temp = {
|
|
151
|
+
kZCmMZ: "xnvo3vl",
|
|
152
|
+
"$$css": true
|
|
153
|
+
};
|
|
154
|
+
const _temp2 = {
|
|
155
|
+
kZCmMZ: "xnvo3vl",
|
|
156
|
+
"$$css": true
|
|
157
|
+
};
|
|
158
|
+
const _temp3 = {
|
|
159
|
+
kZCmMZ: "xnvo3vl",
|
|
160
|
+
"$$css": true
|
|
161
|
+
};
|
|
162
|
+
const indentStyles = {
|
|
163
|
+
sm: depth => [_temp, {
|
|
164
|
+
"--x-paddingInlineStart": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`calc(${spacingVars['--spacing-1']} + ${depth} * ${spacingVars['--spacing-6']})`)
|
|
165
|
+
}],
|
|
166
|
+
md: depth => [_temp2, {
|
|
167
|
+
"--x-paddingInlineStart": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`calc(${spacingVars['--spacing-2']} + ${depth} * ${spacingVars['--spacing-6']})`)
|
|
168
|
+
}],
|
|
169
|
+
primary: depth => [_temp3, {
|
|
170
|
+
"--x-paddingInlineStart": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`calc(${depth} * ${spacingVars['--spacing-6']})`)
|
|
171
|
+
}]
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* How many SideNavItems deep the current item sits: 0 at the top level,
|
|
176
|
+
* 1 inside one parent, and so on. A collapsed rail's flyout resets it to 0,
|
|
177
|
+
* since the flyout lists a parent's children as its own top level.
|
|
178
|
+
*/
|
|
179
|
+
const SideNavItemDepthContext = /*#__PURE__*/createContext(0);
|
|
180
|
+
SideNavItemDepthContext.displayName = 'SideNavItemDepthContext';
|
|
181
|
+
|
|
136
182
|
/**
|
|
137
183
|
* Cascaded to the `actions` slot through `SizeContext` so a consumer's row
|
|
138
184
|
* controls come out the same height as the built-in expand/collapse toggle,
|
|
@@ -259,6 +305,7 @@ export function SideNavItem({
|
|
|
259
305
|
const id = useId();
|
|
260
306
|
const hasChildren = !!children;
|
|
261
307
|
const itemRef = useRef(null);
|
|
308
|
+
const depth = use(SideNavItemDepthContext);
|
|
262
309
|
|
|
263
310
|
// Popover for collapsed items with children
|
|
264
311
|
const popover = usePopover({
|
|
@@ -358,7 +405,9 @@ export function SideNavItem({
|
|
|
358
405
|
size,
|
|
359
406
|
selected: isSelected ? 'selected' : null,
|
|
360
407
|
disabled: isDisabled ? 'disabled' : null
|
|
361
|
-
}), focusOutlineProps.focusVisible(navItemStyles.item, interactionOverlayStyles.backgroundColor, navItemStyles[size], styles.itemCollapsed, size === 'sm' && styles.itemCollapsedSm, size === 'lg' && styles.itemCollapsedLg, isSelected && navItemStyles.selected, isDisabled && navItemStyles.disabled)
|
|
408
|
+
}), focusOutlineProps.focusVisible(navItemStyles.item, interactionOverlayStyles.backgroundColor, navItemStyles[size], styles.itemCollapsed, size === 'sm' && styles.itemCollapsedSm, size === 'lg' && styles.itemCollapsedLg, isSelected && navItemStyles.selected, isDisabled && navItemStyles.disabled),
|
|
409
|
+
// Spread after `rest`, so keep the caller's class beside these.
|
|
410
|
+
rest.className),
|
|
362
411
|
...pressable
|
|
363
412
|
};
|
|
364
413
|
const collapsedAccessibleLabel = rest['aria-label'] != null && rest['aria-label'].trim() !== '' ? rest['aria-label'] : label;
|
|
@@ -391,7 +440,10 @@ export function SideNavItem({
|
|
|
391
440
|
children: label
|
|
392
441
|
}), /*#__PURE__*/_jsx(SideNavCollapseContext, {
|
|
393
442
|
value: EXPANDED_COLLAPSE_STATE,
|
|
394
|
-
children:
|
|
443
|
+
children: /*#__PURE__*/_jsx(SideNavItemDepthContext, {
|
|
444
|
+
value: 0,
|
|
445
|
+
children: children
|
|
446
|
+
})
|
|
395
447
|
})]
|
|
396
448
|
}), {
|
|
397
449
|
placement: 'end',
|
|
@@ -457,6 +509,17 @@ export function SideNavItem({
|
|
|
457
509
|
disabled: isDisabled ? 'disabled' : null
|
|
458
510
|
});
|
|
459
511
|
const itemStyleArgs = [navItemStyles.item, interactionOverlayStyles.backgroundColor, navItemStyles[size], isSelected && navItemStyles.selected, isDisabled && navItemStyles.disabled];
|
|
512
|
+
const rowIndent = depth > 0 && indentStyles[size === 'sm' ? 'sm' : 'md'](depth);
|
|
513
|
+
const primaryIndent = depth > 0 && indentStyles.primary(depth);
|
|
514
|
+
|
|
515
|
+
// The indent is a runtime value, so it reaches the element as an inline
|
|
516
|
+
// style. These props are spread after `rest`, so fold the caller's `style`
|
|
517
|
+
// back in (caller wins) rather than letting the indent replace it, and the
|
|
518
|
+
// caller's `className` beside the row's own classes.
|
|
519
|
+
const callerStyle = {
|
|
520
|
+
className: rest.className,
|
|
521
|
+
style: rest.style
|
|
522
|
+
};
|
|
460
523
|
|
|
461
524
|
// Three shapes of the same row appearance:
|
|
462
525
|
// - `rowProps` — split-action path (toggle, no actions): presentational
|
|
@@ -471,7 +534,7 @@ export function SideNavItem({
|
|
|
471
534
|
...pressable
|
|
472
535
|
};
|
|
473
536
|
const focusableRowProps = {
|
|
474
|
-
...mergeProps(itemThemeProps, focusOutlineProps.focusVisible(...itemStyleArgs)),
|
|
537
|
+
...mergeProps(itemThemeProps, mergeProps(focusOutlineProps.focusVisible(...itemStyleArgs, rowIndent), callerStyle)),
|
|
475
538
|
...pressable
|
|
476
539
|
};
|
|
477
540
|
const actionsRowProps = {
|
|
@@ -511,10 +574,10 @@ export function SideNavItem({
|
|
|
511
574
|
onClick: handleClick,
|
|
512
575
|
...rest,
|
|
513
576
|
...rowPrimaryAriaProps,
|
|
514
|
-
...(hasActions ?
|
|
577
|
+
...mergeProps(hasActions ?
|
|
515
578
|
// The wrapper rings for this element; suppressing here is what
|
|
516
579
|
// keeps the UA's own ring from painting inside that one.
|
|
517
|
-
focusOutlineProps.suppressed(styles.splitAction) : focusOutlineProps.focusVisible(styles.splitAction)),
|
|
580
|
+
focusOutlineProps.suppressed(styles.splitAction, primaryIndent) : focusOutlineProps.focusVisible(styles.splitAction, primaryIndent), callerStyle),
|
|
518
581
|
children: itemContent
|
|
519
582
|
}), hasIndependentToggle && /*#__PURE__*/_jsx("button", {
|
|
520
583
|
type: "button",
|
|
@@ -575,21 +638,24 @@ export function SideNavItem({
|
|
|
575
638
|
inert: isItemCollapsed ? true : undefined,
|
|
576
639
|
...{
|
|
577
640
|
0: {
|
|
578
|
-
className: "xrvj5dj x1tu4anv
|
|
641
|
+
className: "xrvj5dj x1tu4anv x1rea2x4 x6kj92 xd00j3c x1eizr8u xsr0bmt xostmdb x1k6wr6r xlr8y92"
|
|
579
642
|
},
|
|
580
643
|
1: {
|
|
581
|
-
className: "xrvj5dj
|
|
644
|
+
className: "xrvj5dj x6kj92 xd00j3c x1eizr8u xsr0bmt xlr8y92 xihq33y xb3r6kr xf1rc6"
|
|
582
645
|
}
|
|
583
646
|
}[!!isItemCollapsed << 0],
|
|
584
647
|
children: /*#__PURE__*/_jsxs("div", {
|
|
585
648
|
...{
|
|
586
|
-
className: "
|
|
649
|
+
className: "x2lwn1j"
|
|
587
650
|
},
|
|
588
651
|
children: [/*#__PURE__*/_jsx("span", {
|
|
589
652
|
id: `${id}-label`,
|
|
590
653
|
hidden: true,
|
|
591
654
|
children: label
|
|
592
|
-
}),
|
|
655
|
+
}), /*#__PURE__*/_jsx(SideNavItemDepthContext, {
|
|
656
|
+
value: depth + 1,
|
|
657
|
+
children: children
|
|
658
|
+
})]
|
|
593
659
|
})
|
|
594
660
|
})]
|
|
595
661
|
});
|
|
@@ -22,7 +22,7 @@ export interface TabMenuOption {
|
|
|
22
22
|
*/
|
|
23
23
|
icon?: ReactNode | IconType;
|
|
24
24
|
}
|
|
25
|
-
export interface TabMenuProps extends
|
|
25
|
+
export interface TabMenuProps extends Omit<BaseProps<HTMLButtonElement>, 'role' | 'tabIndex' | 'aria-haspopup' | 'aria-expanded' | 'aria-controls'> {
|
|
26
26
|
ref?: React.Ref<HTMLButtonElement>;
|
|
27
27
|
/**
|
|
28
28
|
* Label for the trigger button and dropdown heading.
|
|
@@ -50,7 +50,7 @@ export interface TabMenuProps extends Pick<BaseProps<HTMLButtonElement>, 'xstyle
|
|
|
50
50
|
* </TabList>
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
export declare function TabMenu({ ref, label, options, xstyle, className, style, }: TabMenuProps): React.JSX.Element;
|
|
53
|
+
export declare function TabMenu({ ref, label, options, xstyle, className, style, onClick, ...rest }: TabMenuProps): React.JSX.Element;
|
|
54
54
|
export declare namespace TabMenu {
|
|
55
55
|
var displayName: string;
|
|
56
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabMenu.d.ts","sourceRoot":"","sources":["../../src/TabList/TabMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAA6B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAoBtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,SAAS,CAAC,iBAAiB,CAAC,EAC5B,
|
|
1
|
+
{"version":3,"file":"TabMenu.d.ts","sourceRoot":"","sources":["../../src/TabList/TabMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAA6B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAoBtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,SAAS,CAAC,iBAAiB,CAAC,EAC5B,MAAM,GAAG,UAAU,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,CAC1E;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AA+KD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,EACtB,GAAG,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,YAAY,qBA6Ld;yBAtMe,OAAO"}
|
package/dist/TabList/TabMenu.js
CHANGED
|
@@ -28,7 +28,7 @@ import { useListFocus } from "../hooks/useListFocus.js";
|
|
|
28
28
|
import { useTabListContext } from "./TabListContext.js";
|
|
29
29
|
import "./tab.markers.stylex.js";
|
|
30
30
|
import { tabScope } from "./tab.markers.stylex.js";
|
|
31
|
-
import { mergeProps } from "../utils/index.js";
|
|
31
|
+
import { composeEventHandlers, mergeProps } from "../utils/index.js";
|
|
32
32
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
33
33
|
import { themeProps } from "../utils/themeProps.js";
|
|
34
34
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -166,7 +166,9 @@ export function TabMenu({
|
|
|
166
166
|
options,
|
|
167
167
|
xstyle,
|
|
168
168
|
className,
|
|
169
|
-
style
|
|
169
|
+
style,
|
|
170
|
+
onClick,
|
|
171
|
+
...rest
|
|
170
172
|
}) {
|
|
171
173
|
const tabListCtx = useTabListContext();
|
|
172
174
|
const menuId = useId();
|
|
@@ -231,6 +233,7 @@ export function TabMenu({
|
|
|
231
233
|
const setButtonRef = useMergedRefs(popover.triggerRef, buttonRef, ref);
|
|
232
234
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
233
235
|
children: [/*#__PURE__*/_jsxs("button", {
|
|
236
|
+
...rest,
|
|
234
237
|
ref: setButtonRef,
|
|
235
238
|
type: "button",
|
|
236
239
|
"aria-haspopup": "menu",
|
|
@@ -238,7 +241,7 @@ export function TabMenu({
|
|
|
238
241
|
"aria-controls": menuId,
|
|
239
242
|
"data-tab-menu": "",
|
|
240
243
|
tabIndex: hasSelectedOption ? 0 : -1,
|
|
241
|
-
onClick: handleToggle,
|
|
244
|
+
onClick: composeEventHandlers(handleToggle, onClick),
|
|
242
245
|
...mergeProps(themeProps('tab-menu'), focusOutlineProps.focusVisible(styles.trigger, sizeStyles[size], hasSelectedOption && styles.triggerSelected, tabScope, xstyle), className, style),
|
|
243
246
|
children: [/*#__PURE__*/_jsx("span", {
|
|
244
247
|
"aria-hidden": "true",
|
package/dist/Text/Text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/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