@astryxdesign/core 0.7.6-canary.1ffa166 → 0.7.6-canary.2224fa8
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/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +4 -4
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +5 -1
- package/dist/Chat/useTriggerMenu.d.ts +1 -1
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +13 -28
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +24 -5
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +23 -3
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.js +1 -0
- package/dist/ContextMenu/ContextMenu.d.ts +6 -0
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +31 -7
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +6 -61
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +3 -2
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +4 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +4 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +9 -5
- package/dist/Field/inputDisabledFocus.d.ts +5 -1
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +6 -1
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +1 -0
- package/dist/Grid/Grid.d.ts +6 -4
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/GridSpan.d.ts +2 -0
- package/dist/Grid/GridSpan.d.ts.map +1 -1
- package/dist/Grid/GridSpan.js +2 -0
- package/dist/Heading/Heading.d.ts +5 -3
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +5 -3
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +7 -0
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +6 -2
- package/dist/Layer/layerStructureReset.stylex.d.ts +1 -0
- package/dist/Layer/layerStructureReset.stylex.d.ts.map +1 -1
- package/dist/Layer/layerStructureReset.stylex.js +1 -0
- package/dist/Layer/layerSurfacePress.d.ts +9 -0
- package/dist/Layer/layerSurfacePress.d.ts.map +1 -0
- package/dist/Layer/layerSurfacePress.js +39 -0
- package/dist/Layer/useLayer.d.ts +8 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +6 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +3 -1
- package/dist/Resizable/resizableModel.d.ts +64 -0
- package/dist/Resizable/resizableModel.d.ts.map +1 -0
- package/dist/Resizable/resizableModel.js +287 -0
- package/dist/Resizable/useResizable.d.ts +2 -2
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +1 -284
- package/dist/SegmentedControl/SegmentedControl.d.ts +7 -5
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +13 -20
- package/dist/SegmentedControl/SegmentedControlContext.d.ts +2 -9
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +4 -14
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +142 -14
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +11 -2
- package/dist/SideNav/SideNavFocusTargetsContext.d.ts +11 -0
- package/dist/SideNav/SideNavFocusTargetsContext.d.ts.map +1 -0
- package/dist/SideNav/SideNavFocusTargetsContext.js +16 -0
- package/dist/SideNav/SideNavHeading.js +6 -2
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +13 -1
- package/dist/Text/text.stylex.d.ts +2 -0
- package/dist/Text/text.stylex.d.ts.map +1 -1
- package/dist/Text/text.stylex.js +11 -0
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +8 -1
- package/dist/Token/TokenLink.d.ts +9 -2
- package/dist/Token/TokenLink.d.ts.map +1 -1
- package/dist/Token/TokenLink.js +2 -0
- package/dist/Tokenizer/Tokenizer.d.ts +9 -3
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +8 -3
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +11 -1
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +8 -2
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +9 -2
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +62 -4
- package/dist/Typeahead/BaseTypeahead.d.ts +4 -4
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +28 -0
- package/dist/Typeahead/Typeahead.d.ts +10 -6
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.disabled.a11y.chromium.spec.d.ts.map +1 -0
- package/dist/Typeahead/Typeahead.js +9 -7
- package/dist/astryx.css +6 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts +2 -2
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -1
- package/dist/hooks/ModalAnnounceProvider.js +9 -7
- package/dist/hooks/useClickableContainer.d.ts +3 -0
- package/dist/hooks/useClickableContainer.d.ts.map +1 -1
- package/dist/hooks/useClickableContainer.js +11 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +2 -3
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +7 -1
- package/dist/hooks/useListFocus.d.ts +18 -7
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +37 -19
- package/dist/hooks/useTreeFocus.d.ts +11 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +19 -3
- package/dist/i18n/generated-locales/af-ZA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/af-ZA.generated.js +2 -2
- package/dist/i18n/generated-locales/ar-SA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ar-SA.generated.js +2 -2
- package/dist/i18n/generated-locales/ca-ES.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ca-ES.generated.js +2 -2
- package/dist/i18n/generated-locales/cs-CZ.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/cs-CZ.generated.js +2 -2
- package/dist/i18n/generated-locales/da-DK.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/da-DK.generated.js +2 -2
- package/dist/i18n/generated-locales/de-DE.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/de-DE.generated.js +2 -2
- package/dist/i18n/generated-locales/el-GR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/el-GR.generated.js +2 -2
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +2 -2
- package/dist/i18n/generated-locales/es-ES.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/es-ES.generated.js +2 -2
- package/dist/i18n/generated-locales/fi-FI.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/fi-FI.generated.js +2 -2
- package/dist/i18n/generated-locales/fr-FR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/fr-FR.generated.js +2 -2
- package/dist/i18n/generated-locales/he-IL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/he-IL.generated.js +2 -2
- package/dist/i18n/generated-locales/hu-HU.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/hu-HU.generated.js +2 -2
- package/dist/i18n/generated-locales/it-IT.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/it-IT.generated.js +2 -2
- package/dist/i18n/generated-locales/ja-JP.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ja-JP.generated.js +2 -2
- package/dist/i18n/generated-locales/ko-KR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ko-KR.generated.js +2 -2
- package/dist/i18n/generated-locales/nl-NL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/nl-NL.generated.js +2 -2
- package/dist/i18n/generated-locales/no-NO.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/no-NO.generated.js +2 -2
- package/dist/i18n/generated-locales/pl-PL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pl-PL.generated.js +2 -2
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +2 -2
- package/dist/i18n/generated-locales/pt-BR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pt-BR.generated.js +2 -2
- package/dist/i18n/generated-locales/pt-PT.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pt-PT.generated.js +2 -2
- package/dist/i18n/generated-locales/ro-RO.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ro-RO.generated.js +2 -2
- package/dist/i18n/generated-locales/ru-RU.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ru-RU.generated.js +2 -2
- package/dist/i18n/generated-locales/sr-SP.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/sr-SP.generated.js +2 -2
- package/dist/i18n/generated-locales/sv-SE.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/sv-SE.generated.js +2 -2
- package/dist/i18n/generated-locales/tr-TR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/tr-TR.generated.js +2 -2
- package/dist/i18n/generated-locales/uk-UA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/uk-UA.generated.js +2 -2
- package/dist/i18n/generated-locales/vi-VN.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/vi-VN.generated.js +2 -2
- package/dist/i18n/generated-locales/zh-CN.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/zh-CN.generated.js +2 -2
- package/dist/i18n/generated-locales/zh-TW.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/zh-TW.generated.js +2 -2
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +96 -3
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +69 -3
- package/dist/utils/accessibleName.d.ts +8 -0
- package/dist/utils/accessibleName.d.ts.map +1 -0
- package/dist/utils/accessibleName.js +72 -0
- package/dist/utils/focusReturn.d.ts +35 -2
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +53 -2
- package/dist/utils/sharedMutationObserver.d.ts +2 -2
- package/dist/utils/sharedMutationObserver.js +2 -2
- package/dist/utils/useFocusLeavingChange.d.ts +13 -0
- package/dist/utils/useFocusLeavingChange.d.ts.map +1 -0
- package/dist/utils/useFocusLeavingChange.js +48 -0
- package/locales/af-ZA.json +2 -2
- package/locales/ar-SA.json +2 -2
- package/locales/ca-ES.json +2 -2
- package/locales/cs-CZ.json +2 -2
- package/locales/da-DK.json +2 -2
- package/locales/de-DE.json +2 -2
- package/locales/el-GR.json +2 -2
- package/locales/en.json +4 -4
- package/locales/es-ES.json +2 -2
- package/locales/fi-FI.json +2 -2
- package/locales/fr-FR.json +2 -2
- package/locales/he-IL.json +2 -2
- package/locales/hu-HU.json +2 -2
- package/locales/it-IT.json +2 -2
- package/locales/ja-JP.json +2 -2
- package/locales/ko-KR.json +2 -2
- package/locales/nl-NL.json +2 -2
- package/locales/no-NO.json +2 -2
- package/locales/pl-PL.json +2 -2
- package/locales/pseudo.json +2 -2
- package/locales/pt-BR.json +2 -2
- package/locales/pt-PT.json +2 -2
- package/locales/ro-RO.json +2 -2
- package/locales/ru-RU.json +2 -2
- package/locales/sr-SP.json +2 -2
- package/locales/sv-SE.json +2 -2
- package/locales/tr-TR.json +2 -2
- package/locales/uk-UA.json +2 -2
- package/locales/vi-VN.json +2 -2
- package/locales/zh-CN.json +2 -2
- package/locales/zh-TW.json +2 -2
- package/package.json +4 -4
- package/src/Banner/Banner.tsx +4 -0
- package/src/Chat/ChatComposer.tsx +6 -1
- package/src/Chat/useTriggerMenu.tsx +17 -27
- package/src/CodeBlock/CodeBlock.tsx +6 -2
- package/src/Collapsible/Collapsible.tsx +33 -4
- package/src/CommandPalette/CommandPaletteEmpty.tsx +2 -0
- package/src/ContextMenu/ContextMenu.tsx +30 -6
- package/src/DropdownMenu/DropdownMenu.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenu.tsx +5 -75
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +15 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +7 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +16 -6
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +8 -3
- package/src/Field/inputDisabledFocus.ts +15 -1
- package/src/FieldStatus/FieldStatus.tsx +2 -0
- package/src/Grid/Grid.doc.mjs +4 -4
- package/src/Grid/Grid.tsx +6 -4
- package/src/Grid/GridSpan.doc.mjs +51 -2
- package/src/Grid/GridSpan.tsx +2 -0
- package/src/Heading/Heading.tsx +5 -3
- package/src/HoverCard/useHoverCard.tsx +7 -0
- package/src/Item/Item.tsx +11 -2
- package/src/Layer/layerStructureReset.stylex.ts +5 -0
- package/src/Layer/layerSurfacePress.ts +39 -0
- package/src/Layer/useLayer.tsx +23 -4
- package/src/ProgressBar/ProgressBar.tsx +3 -1
- package/src/Resizable/resizableModel.ts +364 -0
- package/src/Resizable/useResizable.ts +17 -348
- package/src/SegmentedControl/SegmentedControl.doc.mjs +5 -5
- package/src/SegmentedControl/SegmentedControl.tsx +23 -30
- package/src/SegmentedControl/SegmentedControlContext.ts +2 -9
- package/src/SegmentedControl/SegmentedControlItem.doc.mjs +1 -1
- package/src/SegmentedControl/SegmentedControlItem.tsx +4 -17
- package/src/SideNav/SideNav.tsx +213 -25
- package/src/SideNav/SideNavCollapseButton.tsx +18 -2
- package/src/SideNav/SideNavFocusTargetsContext.ts +29 -0
- package/src/SideNav/SideNavHeading.tsx +2 -2
- package/src/SideNav/SideNavItem.tsx +19 -3
- package/src/Text/Heading.doc.mjs +52 -3
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/text.stylex.ts +12 -0
- package/src/Toast/Toast.tsx +2 -0
- package/src/Token/Token.tsx +10 -1
- package/src/Token/TokenLink.tsx +16 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +4 -3
- package/src/Tokenizer/Tokenizer.tsx +17 -4
- package/src/Tooltip/useTooltip.tsx +10 -1
- package/src/TopNav/TopNavHeading.tsx +8 -2
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +9 -2
- package/src/TreeList/TreeList.tsx +85 -8
- package/src/Typeahead/BaseTypeahead.tsx +32 -4
- package/src/Typeahead/Typeahead.doc.mjs +3 -2
- package/src/Typeahead/Typeahead.tsx +17 -11
- package/src/hooks/ModalAnnounceProvider.tsx +12 -9
- package/src/hooks/useClickableContainer.ts +11 -1
- package/src/hooks/useFocusTrap.ts +2 -8
- package/src/hooks/useKeyboardHint.tsx +7 -1
- package/src/hooks/useListFocus.ts +66 -23
- package/src/hooks/useTreeFocus.ts +33 -3
- package/src/i18n/generated-locales/af-ZA.generated.ts +3 -2
- package/src/i18n/generated-locales/ar-SA.generated.ts +3 -2
- package/src/i18n/generated-locales/ca-ES.generated.ts +3 -2
- package/src/i18n/generated-locales/cs-CZ.generated.ts +3 -2
- package/src/i18n/generated-locales/da-DK.generated.ts +3 -2
- package/src/i18n/generated-locales/de-DE.generated.ts +3 -2
- package/src/i18n/generated-locales/el-GR.generated.ts +3 -2
- package/src/i18n/generated-locales/en.generated.ts +3 -2
- package/src/i18n/generated-locales/es-ES.generated.ts +3 -2
- package/src/i18n/generated-locales/fi-FI.generated.ts +3 -2
- package/src/i18n/generated-locales/fr-FR.generated.ts +3 -2
- package/src/i18n/generated-locales/he-IL.generated.ts +3 -2
- package/src/i18n/generated-locales/hu-HU.generated.ts +3 -2
- package/src/i18n/generated-locales/it-IT.generated.ts +3 -2
- package/src/i18n/generated-locales/ja-JP.generated.ts +3 -2
- package/src/i18n/generated-locales/ko-KR.generated.ts +3 -2
- package/src/i18n/generated-locales/nl-NL.generated.ts +3 -2
- package/src/i18n/generated-locales/no-NO.generated.ts +3 -2
- package/src/i18n/generated-locales/pl-PL.generated.ts +3 -2
- package/src/i18n/generated-locales/pseudo.generated.ts +3 -2
- package/src/i18n/generated-locales/pt-BR.generated.ts +3 -2
- package/src/i18n/generated-locales/pt-PT.generated.ts +3 -2
- package/src/i18n/generated-locales/ro-RO.generated.ts +3 -2
- package/src/i18n/generated-locales/ru-RU.generated.ts +3 -2
- package/src/i18n/generated-locales/sr-SP.generated.ts +3 -2
- package/src/i18n/generated-locales/sv-SE.generated.ts +3 -2
- package/src/i18n/generated-locales/tr-TR.generated.ts +3 -2
- package/src/i18n/generated-locales/uk-UA.generated.ts +3 -2
- package/src/i18n/generated-locales/vi-VN.generated.ts +3 -2
- package/src/i18n/generated-locales/zh-CN.generated.ts +3 -2
- package/src/i18n/generated-locales/zh-TW.generated.ts +3 -2
- package/src/motion/animatedLayout.ts +102 -3
- package/src/motion/animator.ts +81 -11
- package/src/utils/accessibleName.ts +87 -0
- package/src/utils/focusReturn.ts +67 -2
- package/src/utils/sharedMutationObserver.ts +2 -2
- package/src/utils/useFocusLeavingChange.ts +53 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAA0B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgB5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAI9C,OAAO,KAAK,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAMjE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC5D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC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471
|
children: [/*#__PURE__*/_jsx("div", {
|
|
472
472
|
...{
|
|
473
473
|
0: {
|
|
474
|
-
className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0 xj0a0fe"
|
|
474
|
+
className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0 xj0a0fe x5ujdhh"
|
|
475
475
|
},
|
|
476
476
|
1: {
|
|
477
|
-
className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og xj0a0fe x1heor9g"
|
|
477
|
+
className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og xj0a0fe x5ujdhh x1heor9g"
|
|
478
478
|
}
|
|
479
479
|
}[!!hasStatusStyle(status) << 0],
|
|
480
480
|
children: title
|
|
481
481
|
}), isRenderable(description) && /*#__PURE__*/_jsx("div", {
|
|
482
482
|
...mergeProps(themeProps('banner-description'), {
|
|
483
483
|
0: {
|
|
484
|
-
className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe"
|
|
484
|
+
className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe x5ujdhh"
|
|
485
485
|
},
|
|
486
486
|
1: {
|
|
487
|
-
className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xj0a0fe x1heor9g"
|
|
487
|
+
className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xj0a0fe x5ujdhh x1heor9g"
|
|
488
488
|
}
|
|
489
489
|
}[!!hasStatusStyle(status) << 0]),
|
|
490
490
|
children: description
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AACf,OAAO,KA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S,CAAC;IACnB,yHAAyH;IACzH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,yGAAyG;IACzG,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gHAAgH;IAChH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,gHAAgH;IAChH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iEAAiE;IACjE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oDAAoD;IACpD,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CACnC;AAoOD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAuOpD;yBAvOe,YAAY"}
|
|
@@ -35,6 +35,8 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
35
35
|
import { useTranslator } from "../i18n/index.js";
|
|
36
36
|
import { useAnnounceRenderedText } from "../hooks/useAnnounceRenderedText.js";
|
|
37
37
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
38
|
+
import { innermostInteractive } from "../hooks/useClickableContainer.js";
|
|
39
|
+
import { isLayerSurface } from "../Layer/layerSurfacePress.js";
|
|
38
40
|
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
39
41
|
import { useInteractionModalityTracking } from "../utils/interactionModality.js";
|
|
40
42
|
|
|
@@ -174,8 +176,10 @@ export function ChatComposer(props) {
|
|
|
174
176
|
const handleBodyClick = useCallback(e => {
|
|
175
177
|
// Focus the input when clicking empty space in the body.
|
|
176
178
|
// Skip if the click target is a button, link, or interactive element.
|
|
179
|
+
// A press inside an open Tooltip or HoverCard stays in that surface
|
|
180
|
+
// (component:Tooltip FR11, component:HoverCard FR11).
|
|
177
181
|
const target = e.target;
|
|
178
|
-
if (target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]')) {
|
|
182
|
+
if (target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]') || innermostInteractive(target, e.currentTarget, isLayerSurface) != null) {
|
|
179
183
|
return;
|
|
180
184
|
}
|
|
181
185
|
// Prefer the input's registered control (works for any input shape,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file useTriggerMenu.tsx
|
|
3
|
-
* @input Uses React, usePopover, SearchSource
|
|
3
|
+
* @input Uses React, usePopover, SearchSource, useBusyAnnouncement
|
|
4
4
|
* @output Exports useTriggerMenu hook for trigger-based menus in contentEditable
|
|
5
5
|
* @position Internal hook; consumed by ChatComposerInput
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTriggerMenu.d.ts","sourceRoot":"","sources":["../../src/Chat/useTriggerMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAGvD,OAAO,KAAK,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAMhF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACpD,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAi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
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useTriggerMenu.tsx
|
|
7
|
-
* @input Uses React, usePopover, SearchSource
|
|
7
|
+
* @input Uses React, usePopover, SearchSource, useBusyAnnouncement
|
|
8
8
|
* @output Exports useTriggerMenu hook for trigger-based menus in contentEditable
|
|
9
9
|
* @position Internal hook; consumed by ChatComposerInput
|
|
10
10
|
*
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { useState, useCallback, useRef, useEffect, useId } from 'react';
|
|
25
25
|
import * as stylex from '@stylexjs/stylex';
|
|
26
26
|
import { usePopover } from "../Popover/usePopover.js";
|
|
27
|
-
import {
|
|
27
|
+
import { useBusyAnnouncement } from "../hooks/useBusyAnnouncement.js";
|
|
28
28
|
import { useHighlightedOptionScroll } from "../hooks/useHighlightedOptionScroll.js";
|
|
29
29
|
import "../theme/tokens.stylex.js";
|
|
30
30
|
import { colorVars, spacingVars, radiusVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
|
|
@@ -194,34 +194,16 @@ export function useTriggerMenu(options) {
|
|
|
194
194
|
});
|
|
195
195
|
|
|
196
196
|
// The loading row carries no live role: it mounts already holding its text
|
|
197
|
-
// and is removed when results arrive, so it would be skipped.
|
|
198
|
-
//
|
|
199
|
-
//
|
|
200
|
-
//
|
|
201
|
-
// the
|
|
202
|
-
// row goes away, so the next search is a new occasion.
|
|
203
|
-
const announce = useAnnounce();
|
|
204
|
-
const hasAnnouncedLoadingRef = useRef(false);
|
|
197
|
+
// and is removed when results arrive, so it would be skipped. "Searching…"
|
|
198
|
+
// is the menu's busy state, so the shared busy path announces each loading
|
|
199
|
+
// episode once (spec:AST-086 FR6, FR8): rerenders and further keystrokes
|
|
200
|
+
// while loading do not repeat it, results arriving re-arm it, and a search
|
|
201
|
+
// that settles before the announcement goes out announces nothing.
|
|
205
202
|
// Mirrors renderMenu: no row exists without an active trigger or while hidden.
|
|
206
203
|
const isLoadingRowShown = state.isLoading && !state.isHidden && state.activeTrigger !== null;
|
|
207
204
|
// One catalog string serves the row and the announcement (FR7).
|
|
208
205
|
const loadingText = state.activeTrigger?.loadingText ?? t('@astryx.chatTriggerMenu.searching');
|
|
209
|
-
|
|
210
|
-
if (!isLoadingRowShown) {
|
|
211
|
-
hasAnnouncedLoadingRef.current = false;
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
if (hasAnnouncedLoadingRef.current) {
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
let frame = requestAnimationFrame(() => {
|
|
218
|
-
frame = requestAnimationFrame(() => {
|
|
219
|
-
hasAnnouncedLoadingRef.current = true;
|
|
220
|
-
announce(loadingText, 'polite');
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
return () => cancelAnimationFrame(frame);
|
|
224
|
-
}, [announce, isLoadingRowShown, loadingText]);
|
|
206
|
+
const settleBusyAnnouncement = useBusyAnnouncement(isLoadingRowShown, loadingText, editableRef);
|
|
225
207
|
const triggerStartRef = useRef(-1);
|
|
226
208
|
const searchTimeoutRef = useRef(null);
|
|
227
209
|
const searchRequestIdRef = useRef(0);
|
|
@@ -374,6 +356,9 @@ export function useTriggerMenu(options) {
|
|
|
374
356
|
return true;
|
|
375
357
|
};
|
|
376
358
|
const applyResults = items => {
|
|
359
|
+
// Results that arrive before the busy start is heard withdraw it, so a
|
|
360
|
+
// search that settles on its first frame announces nothing (FR8).
|
|
361
|
+
settleBusyAnnouncement();
|
|
377
362
|
const isHidden = isUnmatchedMultiWordQuery(trigger, items, false);
|
|
378
363
|
setState(prev => ({
|
|
379
364
|
...prev,
|
|
@@ -399,7 +384,7 @@ export function useTriggerMenu(options) {
|
|
|
399
384
|
trigger.searchSource.cancel?.();
|
|
400
385
|
const result = trigger.searchSource.search(query);
|
|
401
386
|
// A synchronous source already has its results, so it never shows
|
|
402
|
-
// or announces the loading row
|
|
387
|
+
// or announces the loading row.
|
|
403
388
|
if (!Array.isArray(result)) {
|
|
404
389
|
setState(prev => ({
|
|
405
390
|
...prev,
|
|
@@ -435,7 +420,7 @@ export function useTriggerMenu(options) {
|
|
|
435
420
|
doSearch();
|
|
436
421
|
}
|
|
437
422
|
}
|
|
438
|
-
}, [debounceMs, editableRef, triggers, reset, setAnchor, hidePopover, showPopover]);
|
|
423
|
+
}, [debounceMs, editableRef, triggers, reset, setAnchor, hidePopover, showPopover, settleBusyAnnouncement]);
|
|
439
424
|
const selectItem = useCallback(item => {
|
|
440
425
|
const trigger = state.activeTrigger;
|
|
441
426
|
if (!trigger) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2B5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAY5C,OAAO,EAAc,KAAK,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AAuexE,MAAM,WAAW,cAAe,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,C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CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC;AAgUD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAsB,EACtB,KAAK,EACL,gBAAuB,EACvB,cAAsB,EACtB,cAAc,EACd,MAAc,EACd,aAAoB,EACpB,MAAM,EACN,UAAU,EACV,SAAiB,EACjB,SAAS,EACT,aAAqB,EACrB,oBAAyB,EACzB,IAAW,EACX,KAAK,EAAE,SAAyB,EAChC,SAAkB,EAClB,SAAS,EAAE,eAAe,EAC1B,aAAsB,EACtB,WAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,cAAc,qBAkThB;yBA5Ue,SAAS"}
|
|
@@ -13,7 +13,7 @@ import * as React from 'react';
|
|
|
13
13
|
import * as stylex from '@stylexjs/stylex';
|
|
14
14
|
import "../theme/tokens.stylex.js";
|
|
15
15
|
import { colorVars, spacingVars, radiusVars, typographyVars, fontWeightVars, typeScaleVars, borderVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
16
|
-
import { isRenderable, mergeProps } from "../utils/index.js";
|
|
16
|
+
import { isRenderable, mergeProps, rtlStyles } from "../utils/index.js";
|
|
17
17
|
import { useClipboard } from "../hooks/useClipboard.js";
|
|
18
18
|
import { useScrollableArea } from "../hooks/useScrollableArea.js";
|
|
19
19
|
import { Icon } from "../Icon/index.js";
|
|
@@ -104,6 +104,21 @@ const styles = {
|
|
|
104
104
|
k9WMMc: "x1yc453h",
|
|
105
105
|
$$css: true
|
|
106
106
|
},
|
|
107
|
+
collapseChevron: {
|
|
108
|
+
k1xSpc: "x3nfvp2",
|
|
109
|
+
kGNEyG: "x6s0dn4",
|
|
110
|
+
kjj79g: "xl56j7k",
|
|
111
|
+
kmuXW: "x2lah0s",
|
|
112
|
+
kzqmXN: "x6jxa94",
|
|
113
|
+
kZKoxP: "x1v9usgg",
|
|
114
|
+
k71WvV: "xnur1sd",
|
|
115
|
+
kVQacm: "xb3r6kr",
|
|
116
|
+
kMwMTN: "x1mjzq1q",
|
|
117
|
+
kKVMdj: "x1gbn2au x1aquc0h",
|
|
118
|
+
k44tkh: "x12wqnr7",
|
|
119
|
+
kyAemX: "x128ha8g",
|
|
120
|
+
$$css: true
|
|
121
|
+
},
|
|
107
122
|
collapseChevronIcon: {
|
|
108
123
|
k1ekBW: "x11xpdln",
|
|
109
124
|
kIyJzY: "xuedmi6",
|
|
@@ -714,10 +729,14 @@ export function CodeBlock({
|
|
|
714
729
|
}), {
|
|
715
730
|
className: "x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j"
|
|
716
731
|
}),
|
|
717
|
-
children: [canCollapse &&
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
732
|
+
children: [canCollapse &&
|
|
733
|
+
/*#__PURE__*/
|
|
734
|
+
// The collapsed chevron points toward the inline end, so it mirrors
|
|
735
|
+
// in RTL (design:bidirectionality DR4). The mirror sits on this box
|
|
736
|
+
// so the glyph's own rotation still eases: rotated down when
|
|
737
|
+
// expanded, a mirrored glyph still points down.
|
|
738
|
+
_jsx("span", {
|
|
739
|
+
...stylex.props(styles.collapseChevron, rtlStyles.mirror),
|
|
721
740
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
722
741
|
icon: "chevronRight",
|
|
723
742
|
size: "xsm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/Collapsible/Collapsible.tsx"],"names":[],"mappings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Qe,WAAW"}
|
|
@@ -32,6 +32,10 @@ import "../theme/tokens.stylex.js";
|
|
|
32
32
|
import { borderVars, colorVars, typographyVars, fontWeightVars, spacingVars, typeScaleVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
33
33
|
import { useCollapsible } from "./useCollapsible.js";
|
|
34
34
|
import { LayoutChangeSnapshot } from "../motion/LayoutChangeSnapshot.js";
|
|
35
|
+
import { moveFocusLeftBehind, noteFocusWithin } from "../utils/focusReturn.js";
|
|
36
|
+
import { useInteractionModalityTracking } from "../utils/interactionModality.js";
|
|
37
|
+
import { useFocusLeavingChange } from "../utils/useFocusLeavingChange.js";
|
|
38
|
+
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
35
39
|
import { applyLayoutChangeTransition, holdLayoutExit, playLayoutChange, releaseLayoutExit, reportLayoutChange } from "../motion/animatedLayout.js";
|
|
36
40
|
import { CollapsibleGroupPresentationContext } from "./CollapsibleGroupContext.js";
|
|
37
41
|
import { Icon } from "../Icon/index.js";
|
|
@@ -303,6 +307,22 @@ export function Collapsible({
|
|
|
303
307
|
}
|
|
304
308
|
}, [isOpen, isExiting]);
|
|
305
309
|
|
|
310
|
+
// Focus inside the content when it closes would be lost to the page once
|
|
311
|
+
// the content hides. It moves to the trigger that closes it (AR4); focus
|
|
312
|
+
// anywhere else is not moved. The shared sequence notes it in the commit
|
|
313
|
+
// before the DOM changes and moves it once the close has committed.
|
|
314
|
+
// The trigger's own document's last input decides the moved focus's ring.
|
|
315
|
+
const {
|
|
316
|
+
ref: modalityRef
|
|
317
|
+
} = useInteractionModalityTracking();
|
|
318
|
+
const mergedTriggerRef = useMergedRefs(triggerRef, modalityRef);
|
|
319
|
+
const noteClosingFocus = useFocusLeavingChange(isOpen, wasOpen => wasOpen ? noteFocusWithin(contentRef.current) : null, focus => moveFocusLeftBehind(focus, triggerRef.current, contentRef.current));
|
|
320
|
+
const beforeOpenChange = useCallback(wasOpen => {
|
|
321
|
+
noteClosingFocus(wasOpen);
|
|
322
|
+
if (animatedLayout != null) {
|
|
323
|
+
measureChange();
|
|
324
|
+
}
|
|
325
|
+
}, [animatedLayout, measureChange, noteClosingFocus]);
|
|
306
326
|
// Activation is blocked by this guard rather than the native `disabled`
|
|
307
327
|
// attribute, so the trigger keeps `aria-disabled` semantics and stays
|
|
308
328
|
// discoverable. A native `disabled` button would silently swallow events
|
|
@@ -349,7 +369,7 @@ export function Collapsible({
|
|
|
349
369
|
}), stylex.props(styles.root, isDivided && styles.divided, xstyle), className, style),
|
|
350
370
|
...props,
|
|
351
371
|
children: [/*#__PURE__*/_jsxs("button", {
|
|
352
|
-
ref:
|
|
372
|
+
ref: mergedTriggerRef,
|
|
353
373
|
type: "button",
|
|
354
374
|
onClick: handleToggle,
|
|
355
375
|
"aria-disabled": isDisabled || undefined,
|
|
@@ -379,9 +399,9 @@ export function Collapsible({
|
|
|
379
399
|
},
|
|
380
400
|
children: trigger
|
|
381
401
|
}), !isChevronAtStart && chevron]
|
|
382
|
-
}),
|
|
402
|
+
}), /*#__PURE__*/_jsx(LayoutChangeSnapshot, {
|
|
383
403
|
value: isOpen,
|
|
384
|
-
onBeforeChange:
|
|
404
|
+
onBeforeChange: beforeOpenChange
|
|
385
405
|
}), /*#__PURE__*/_jsx("div", {
|
|
386
406
|
ref: contentRef,
|
|
387
407
|
id: contentId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteEmpty.d.ts","sourceRoot":"","sources":["../../src/CommandPalette/CommandPaletteEmpty.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAS5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"CommandPaletteEmpty.d.ts","sourceRoot":"","sources":["../../src/CommandPalette/CommandPaletteEmpty.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAS5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAwB5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACzE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,yCAAyC;IACzC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,wBAAwB,qBAc1B;yBArBe,mBAAmB"}
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Both modes use useListFocus for DOM-based keyboard navigation.
|
|
21
21
|
* Open state is managed internally — right-click opens, click-outside/Escape closes.
|
|
22
|
+
* The menu's layer mounts at its first open, and shows as it attaches
|
|
23
|
+
* (`useLayer`'s `lazyMount`, kept mounted after the first show): a closed
|
|
24
|
+
* context menu that was never opened adds no popover element to the page (a
|
|
25
|
+
* table with a menu on every cell would otherwise carry one per cell). Once
|
|
26
|
+
* mounted it stays, so every later open and close, its exit animation
|
|
27
|
+
* included, runs as before.
|
|
22
28
|
* The trigger wrapper is a `div` by default; `triggerAs` makes it an inline
|
|
23
29
|
* `span`, so a reference inside prose can own a context menu without
|
|
24
30
|
* breaking the text flow.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,KAA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AED,UAAU,oBAAqB,SAAQ,oBAAoB;IACzD,gDAAgD;IAChD,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,WAAW,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAM/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,IAAW,EACX,KAAK,EAAE,cAAc,EACrB,UAAkB,EAClB,YAAY,EACZ,YAAwB,EACxB,SAAiB,EACjB,GAAG,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,aAAa,EACb,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,gBAAgB,EAC9B,WAAW,EAAE,eAAe,EAC5B,UAAU,EAAE,cAAc,EAC1B,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAgjBlB;yBArkBe,WAAW"}
|
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
*
|
|
23
23
|
* Both modes use useListFocus for DOM-based keyboard navigation.
|
|
24
24
|
* Open state is managed internally — right-click opens, click-outside/Escape closes.
|
|
25
|
+
* The menu's layer mounts at its first open, and shows as it attaches
|
|
26
|
+
* (`useLayer`'s `lazyMount`, kept mounted after the first show): a closed
|
|
27
|
+
* context menu that was never opened adds no popover element to the page (a
|
|
28
|
+
* table with a menu on every cell would otherwise carry one per cell). Once
|
|
29
|
+
* mounted it stays, so every later open and close, its exit animation
|
|
30
|
+
* included, runs as before.
|
|
25
31
|
* The trigger wrapper is a `div` by default; `triggerAs` makes it an inline
|
|
26
32
|
* `span`, so a reference inside prose can own a context menu without
|
|
27
33
|
* breaking the text flow.
|
|
@@ -38,7 +44,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
38
44
|
import { Button } from "../Button/index.js";
|
|
39
45
|
import { Heading } from "../Heading/index.js";
|
|
40
46
|
import { Icon } from "../Icon/index.js";
|
|
41
|
-
import {
|
|
47
|
+
import { useLayerInternal } from "../Layer/useLayer.js";
|
|
42
48
|
import { LayerDepthProvider } from "../Layer/LayerDepthContext.js";
|
|
43
49
|
import { useLayerDismissal } from "../Layer/useLayerDismissal.js";
|
|
44
50
|
import { currentGesture } from "../Layer/gestureCounter.js";
|
|
@@ -49,7 +55,7 @@ import { DropdownMenuContext, DropdownMenuRootOpenContext } from "../DropdownMen
|
|
|
49
55
|
import { MENU_ITEM_ROLES, MENU_ITEM_SELECTOR, MENU_BOUNDARY_SELECTOR, activateMenuItem } from "../DropdownMenu/menuItemRoles.js";
|
|
50
56
|
import { useMenuOverflow } from "../DropdownMenu/useMenuOverflow.js";
|
|
51
57
|
import { useMenuDrillIn } from "../DropdownMenu/useMenuDrillIn.js";
|
|
52
|
-
import {
|
|
58
|
+
import { useInternalListFocus } from "../hooks/useListFocus.js";
|
|
53
59
|
import { useMenuPress } from "../hooks/useMenuPress.js";
|
|
54
60
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
55
61
|
import { useLongPress } from "../hooks/useLongPress.js";
|
|
@@ -251,6 +257,10 @@ export function ContextMenu({
|
|
|
251
257
|
// outside.
|
|
252
258
|
const openingGestureRef = useRef(null);
|
|
253
259
|
const [isOpen, setIsOpen] = useState(false);
|
|
260
|
+
// An open from the trigger moves focus into the menu once it shows: a frame
|
|
261
|
+
// after the show, which for a first open comes as its layer attaches.
|
|
262
|
+
const focusOnShowRef = useRef(false);
|
|
263
|
+
const focusFirstRef = useRef(() => {});
|
|
254
264
|
const [submenuPath, setSubmenuPath] = useState([]);
|
|
255
265
|
const currentSubmenu = submenuPath.at(-1);
|
|
256
266
|
const currentItems = currentSubmenu?.items ?? items;
|
|
@@ -263,8 +273,11 @@ export function ContextMenu({
|
|
|
263
273
|
setIsOpen(nextIsOpen);
|
|
264
274
|
onOpenChange?.(nextIsOpen);
|
|
265
275
|
}, [onOpenChange]);
|
|
266
|
-
const layer =
|
|
276
|
+
const layer = useLayerInternal({
|
|
267
277
|
mode: 'context',
|
|
278
|
+
// Mounted at the first open and kept (see the file header).
|
|
279
|
+
lazyMount: true,
|
|
280
|
+
keepsMountAfterShow: true,
|
|
268
281
|
onHide: useCallback(() => {
|
|
269
282
|
setIsOpen(false);
|
|
270
283
|
onOpenChange?.(false);
|
|
@@ -278,6 +291,10 @@ export function ContextMenu({
|
|
|
278
291
|
onShow: useCallback(() => {
|
|
279
292
|
setIsOpen(true);
|
|
280
293
|
onOpenChange?.(true);
|
|
294
|
+
if (focusOnShowRef.current) {
|
|
295
|
+
focusOnShowRef.current = false;
|
|
296
|
+
requestAnimationFrame(() => focusFirstRef.current());
|
|
297
|
+
}
|
|
281
298
|
}, [onOpenChange]),
|
|
282
299
|
lightDismiss: false
|
|
283
300
|
});
|
|
@@ -311,13 +328,17 @@ export function ContextMenu({
|
|
|
311
328
|
focusItem,
|
|
312
329
|
ownsEvent,
|
|
313
330
|
getItems: getMenuItems
|
|
314
|
-
} =
|
|
331
|
+
} = useInternalListFocus({
|
|
315
332
|
itemSelector: MENU_ITEM_SELECTOR,
|
|
316
333
|
boundarySelector: MENU_BOUNDARY_SELECTOR,
|
|
317
334
|
// Menus wrap from the last row to the first and back.
|
|
318
335
|
wrap: true,
|
|
319
|
-
hasPaging: true
|
|
336
|
+
hasPaging: true,
|
|
337
|
+
// A right-click or long-press focuses the first row without the keyboard
|
|
338
|
+
// ring; the context-menu key or Shift+F10 shows it.
|
|
339
|
+
focusFollowsLastInput: true
|
|
320
340
|
});
|
|
341
|
+
focusFirstRef.current = focusFirst;
|
|
321
342
|
|
|
322
343
|
// Join the shared stack so an Escape press dismisses exactly one top-most
|
|
323
344
|
// surface. BottomSheet owns its own dismissal path.
|
|
@@ -433,10 +454,13 @@ export function ContextMenu({
|
|
|
433
454
|
if (usesBottomSheet) {
|
|
434
455
|
updateOpenState(true);
|
|
435
456
|
} else {
|
|
457
|
+
// A first open mounts the layer, and the show runs from the popover
|
|
458
|
+
// element's callback ref as it attaches, in the same commit, before
|
|
459
|
+
// the browser paints; a later one shows at once.
|
|
460
|
+
focusOnShowRef.current = true;
|
|
436
461
|
layer.show();
|
|
437
|
-
requestAnimationFrame(() => focusFirst());
|
|
438
462
|
}
|
|
439
|
-
}, [layer,
|
|
463
|
+
}, [layer, updateOpenState, usesBottomSheet]);
|
|
440
464
|
|
|
441
465
|
// The box the cursor anchor's offsets are measured from: the trigger, which
|
|
442
466
|
// is its containing block.
|
|
@@ -80,7 +80,7 @@ export type DropdownMenuOption = DropdownMenuItemData | DropdownMenuDividerData
|
|
|
80
80
|
export type DropdownMenuButtonProps = Omit<ButtonProps, 'onClick'>;
|
|
81
81
|
export type DropdownMenuPresentation = AdaptivePresentation;
|
|
82
82
|
/**
|
|
83
|
-
* The props
|
|
83
|
+
* The props `renderTrigger` spreads onto the control that opens the menu.
|
|
84
84
|
* They carry the press model — a mouse opens on press-down, a held finger
|
|
85
85
|
* opens with the finger down — the keyboard opens (Enter, Space, ArrowDown,
|
|
86
86
|
* ArrowUp), the toggle click, and the ARIA wiring that names the menu after
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,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AC;IACrB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,qBAAsB,SAAQ,qBAAqB;IAC3D;;;;;OAKG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,yBAA0B,SAAQ,qBAAqB;IAC/D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAC3B,qBAAqB,GAAG,yBAAyB,CAAC;AA+tCpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA4CpD;yBA5Ce,YAAY"}
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
* - /packages/cli/assets/templates/blocks/components/DropdownMenu/ (showcase blocks)
|
|
36
36
|
*/
|
|
37
37
|
import React, { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
38
|
+
import { readAccessibleName } from "../utils/accessibleName.js";
|
|
38
39
|
import * as stylex from '@stylexjs/stylex';
|
|
39
40
|
import { usePopover } from "../Popover/usePopover.js";
|
|
40
41
|
import { Button } from "../Button/index.js";
|
|
@@ -216,7 +217,7 @@ const bottomSheetStyles = {
|
|
|
216
217
|
// =============================================================================
|
|
217
218
|
|
|
218
219
|
/**
|
|
219
|
-
* The props
|
|
220
|
+
* The props `renderTrigger` spreads onto the control that opens the menu.
|
|
220
221
|
* They carry the press model — a mouse opens on press-down, a held finger
|
|
221
222
|
* opens with the finger down — the keyboard opens (Enter, Space, ArrowDown,
|
|
222
223
|
* ArrowUp), the toggle click, and the ARIA wiring that names the menu after
|
|
@@ -276,64 +277,6 @@ function holdInvokerThroughPress(control, popoverId) {
|
|
|
276
277
|
doc.addEventListener('pointerup', onPressEnd, true);
|
|
277
278
|
doc.addEventListener('pointercancel', onPressEnd, true);
|
|
278
279
|
}
|
|
279
|
-
|
|
280
|
-
/** Text an assistive technology reads from `element`, `aria-hidden` left out. */
|
|
281
|
-
function visibleText(element) {
|
|
282
|
-
const copy = element.cloneNode(true);
|
|
283
|
-
for (const hidden of copy.querySelectorAll('[aria-hidden="true"]')) {
|
|
284
|
-
hidden.remove();
|
|
285
|
-
}
|
|
286
|
-
// An icon-only control is named by its image's alt, an inner aria-label, or
|
|
287
|
-
// an svg title rather than by text, so those count as its contents too.
|
|
288
|
-
for (const named of copy.querySelectorAll('img[alt], [aria-label]')) {
|
|
289
|
-
const name = named.getAttribute(named.tagName === 'IMG' ? 'alt' : 'aria-label') ?? '';
|
|
290
|
-
named.replaceWith(copy.ownerDocument.createTextNode(` ${name} `));
|
|
291
|
-
}
|
|
292
|
-
for (const svg of copy.querySelectorAll('svg')) {
|
|
293
|
-
const title = svg.querySelector('title')?.textContent ?? '';
|
|
294
|
-
svg.replaceWith(copy.ownerDocument.createTextNode(` ${title} `));
|
|
295
|
-
}
|
|
296
|
-
return (copy.textContent ?? '').replace(/\s+/g, ' ').trim();
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* The name a custom trigger gives the menu it labels (`aria-labelledby` on
|
|
301
|
-
* the menu points at it): its own `aria-labelledby` targets, its
|
|
302
|
-
* `aria-label`, its text, or its `title`, in that order.
|
|
303
|
-
*/
|
|
304
|
-
function readAccessibleName(element) {
|
|
305
|
-
if (element == null) {
|
|
306
|
-
return undefined;
|
|
307
|
-
}
|
|
308
|
-
const labelledBy = element.getAttribute('aria-labelledby');
|
|
309
|
-
if (labelledBy != null && labelledBy.trim() !== '') {
|
|
310
|
-
const text = labelledBy.split(/\s+/).map(id => element.ownerDocument.getElementById(id)).filter(node => node != null).map(visibleText).join(' ').trim();
|
|
311
|
-
if (text !== '') {
|
|
312
|
-
return text;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
const label = element.getAttribute('aria-label')?.trim();
|
|
316
|
-
if (label) {
|
|
317
|
-
return label;
|
|
318
|
-
}
|
|
319
|
-
// A form control is named by its own <label>s; an input button by its value.
|
|
320
|
-
const labels = 'labels' in element ? Array.from(element.labels ?? []) : [];
|
|
321
|
-
const labelText = labels.map(visibleText).join(' ').trim();
|
|
322
|
-
if (labelText !== '') {
|
|
323
|
-
return labelText;
|
|
324
|
-
}
|
|
325
|
-
if (element instanceof HTMLInputElement && ['button', 'submit', 'reset'].includes(element.getAttribute('type') ?? '')) {
|
|
326
|
-
const value = element.value.trim();
|
|
327
|
-
if (value !== '') {
|
|
328
|
-
return value;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
const text = visibleText(element);
|
|
332
|
-
if (text !== '') {
|
|
333
|
-
return text;
|
|
334
|
-
}
|
|
335
|
-
return element.getAttribute('title')?.trim() || undefined;
|
|
336
|
-
}
|
|
337
280
|
function DropdownMenuBottomSheet({
|
|
338
281
|
button: buttonFromProps,
|
|
339
282
|
renderTrigger,
|
|
@@ -1286,7 +1229,9 @@ function DropdownMenuPopover({
|
|
|
1286
1229
|
}
|
|
1287
1230
|
},
|
|
1288
1231
|
...menuPress.menuProps,
|
|
1289
|
-
...mergeProps(themeProps('dropdown-menu'
|
|
1232
|
+
...mergeProps(themeProps('dropdown-menu', {
|
|
1233
|
+
presentation: 'popover'
|
|
1234
|
+
}), stylex.props(styles.dropdown, resolvedMaxHeight != null && dynamicStyles.menuMaxHeight(resolvedMaxHeight), hasOverflow ? menuTouchActionStyles.scrolls : menuTouchActionStyles.fits, hasOverflow && styles.scrollable, hasRegions && styles.menuInFrame,
|
|
1290
1235
|
// Between a header and a footer the menu is a Tab stop, so
|
|
1291
1236
|
// keyboard focus on it must be visible (the base style removes
|
|
1292
1237
|
// the ring for the pointer-open focus target).
|
|
@@ -1317,7 +1262,7 @@ export function DropdownMenu(props) {
|
|
|
1317
1262
|
onOpenChange
|
|
1318
1263
|
} = props;
|
|
1319
1264
|
// Both presentations hang the menu off ONE control.
|
|
1320
|
-
useDevWarning('DropdownMenu', '`button` and `
|
|
1265
|
+
useDevWarning('DropdownMenu', '`button` and `renderTrigger` are mutually exclusive: the menu hangs ' + 'off one control. `renderTrigger` wins; drop `button`.', props.button != null && props.renderTrigger != null);
|
|
1321
1266
|
const requestedPresentation = 'items' in props ? props.presentation ?? 'popover' : 'popover';
|
|
1322
1267
|
const resolvedPresentation = useAdaptivePresentation(requestedPresentation);
|
|
1323
1268
|
const isControlled = props.isMenuOpen !== undefined;
|
|
@@ -47,8 +47,9 @@ export interface DropdownMenuCheckboxItemProps extends Omit<BaseProps, 'onChange
|
|
|
47
47
|
*/
|
|
48
48
|
onChange?: (checked: boolean) => void;
|
|
49
49
|
/**
|
|
50
|
-
* Whether the item is disabled.
|
|
51
|
-
*
|
|
50
|
+
* Whether the item is disabled. A disabled item stays in the accessibility
|
|
51
|
+
* tree as disabled (`aria-disabled`) but takes no focus: the arrow keys,
|
|
52
|
+
* typeahead, and the pointer highlight skip it, and activation is blocked.
|
|
52
53
|
* @default false
|
|
53
54
|
*/
|
|
54
55
|
isDisabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuCheckboxItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuCheckboxItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenuCheckboxItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuCheckboxItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAQtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA+C5C,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CACzD,SAAS,EACT,UAAU,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,CAClD;IACC;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sFAAsF;IACtF,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,WAAW,EACX,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAkB,EAClB,gBAAwB,EACxB,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,IAAI,EACR,EAAE,6BAA6B,+BAoE/B;yBAnFe,wBAAwB"}
|
|
@@ -31,9 +31,10 @@ import { renderIconSlot } from "../Icon/index.js";
|
|
|
31
31
|
import { useIndicator } from "../Indicator/index.js";
|
|
32
32
|
import { Item } from "../Item/index.js";
|
|
33
33
|
import { useDropdownMenuContext } from "./DropdownMenuContext.js";
|
|
34
|
+
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
34
35
|
import { focusMenuItemOnHover } from "./menuItemHover.js";
|
|
35
36
|
import "../theme/tokens.stylex.js";
|
|
36
|
-
import { colorVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
37
|
+
import { colorVars, focusVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
37
38
|
import { composeEventHandlers, mergeProps, themeProps } from "../utils/index.js";
|
|
38
39
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
39
40
|
const styles = {
|
|
@@ -43,7 +44,7 @@ const styles = {
|
|
|
43
44
|
kMwMTN: "x1tgivj0",
|
|
44
45
|
kWkggS: "xjbqb8w x1c52tdz",
|
|
45
46
|
kkrTdU: "x1ypdohk x16khyan",
|
|
46
|
-
|
|
47
|
+
kInvED: "x1c097ug",
|
|
47
48
|
$$css: true
|
|
48
49
|
},
|
|
49
50
|
disabled: {
|
|
@@ -143,7 +144,7 @@ export function DropdownMenuCheckboxItem({
|
|
|
143
144
|
endContent: endContent,
|
|
144
145
|
onClick: handleClick,
|
|
145
146
|
isDisabled: isDisabled,
|
|
146
|
-
xstyle: [styles.root, isDisabled && styles.disabled, xstyle],
|
|
147
|
+
xstyle: [focusOutlineStyles.focusVisible, styles.root, isDisabled && styles.disabled, xstyle],
|
|
147
148
|
...mergeProps(themeProps('dropdown-menu-item', {
|
|
148
149
|
size: menuSize
|
|
149
150
|
}), {
|