@astryxdesign/core 0.6.2 → 0.6.3-canary.0899f21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +81 -0
- package/dist/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts +7 -5
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +56 -19
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +13 -28
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +10 -5
- package/dist/Chat/ChatComposerDrawer.d.ts +19 -5
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +48 -23
- package/dist/Chat/ChatComposerInput.d.ts +11 -3
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +63 -16
- package/dist/Chat/ChatDictationButton.d.ts +3 -2
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +6 -4
- package/dist/Chat/ChatLayout.d.ts +19 -0
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +19 -0
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +44 -34
- package/dist/Chat/ChatMessageBubble.d.ts +2 -0
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +5 -3
- package/dist/Chat/ChatMessageList.d.ts +2 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +4 -3
- package/dist/Chat/ChatMessageMetadata.d.ts +5 -4
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +12 -9
- package/dist/Chat/ChatSendButton.js +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +12 -2
- package/dist/Citation/Citation.d.ts +1 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +3 -2
- package/dist/CodeBlock/highlightRanges.d.ts.map +1 -1
- package/dist/CodeBlock/highlightRanges.js +14 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +6 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +1 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +4 -4
- package/dist/DateInput/NativeDateField.d.ts.map +1 -1
- package/dist/DateInput/NativeDateField.js +16 -16
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +4 -4
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +8 -8
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +4 -4
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +9 -3
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts.map +1 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.js +3 -3
- package/dist/Dialog/DialogHeader.d.ts +8 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +13 -4
- package/dist/Field/InputClearButton.d.ts +4 -2
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +4 -2
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +1 -1
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +7 -7
- package/dist/Icon/Icon.d.ts +6 -31
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +8 -71
- package/dist/Icon/IconDefaultSizeContext.d.ts +4 -0
- package/dist/Icon/IconDefaultSizeContext.d.ts.map +1 -0
- package/dist/Icon/IconDefaultSizeContext.js +18 -0
- package/dist/Icon/IconSize.stylex.d.ts +65 -0
- package/dist/Icon/IconSize.stylex.d.ts.map +1 -0
- package/dist/Icon/IconSize.stylex.js +75 -0
- package/dist/Item/Item.d.ts +1 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +4 -3
- package/dist/Kbd/Kbd.d.ts +5 -3
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +36 -42
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +6 -2
- package/dist/Link/useLinkComponent.d.ts +5 -15
- package/dist/Link/useLinkComponent.d.ts.map +1 -1
- package/dist/Link/useLinkComponent.js +34 -51
- package/dist/List/List.d.ts +19 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +9 -2
- package/dist/List/ListContext.d.ts +1 -0
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +2 -1
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +9 -2
- package/dist/Markdown/Markdown.d.ts +8 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.bench.d.ts +2 -0
- package/dist/Markdown/Markdown.fr23.bench.d.ts.map +1 -0
- package/dist/Markdown/Markdown.fr23.bench.js +150 -0
- package/dist/Markdown/Markdown.fr23.sampling.d.ts +2 -0
- package/dist/Markdown/Markdown.fr23.sampling.d.ts.map +1 -0
- package/dist/Markdown/Markdown.fr23.sampling.js +43 -0
- package/dist/Markdown/Markdown.js +262 -109
- package/dist/Markdown/ast.d.ts +162 -0
- package/dist/Markdown/ast.d.ts.map +1 -0
- package/dist/Markdown/ast.js +74 -0
- package/dist/Markdown/index.d.ts +5 -3
- package/dist/Markdown/index.d.ts.map +1 -1
- package/dist/Markdown/index.js +3 -2
- package/dist/Markdown/parser/index.d.ts +10 -0
- package/dist/Markdown/parser/index.d.ts.map +1 -0
- package/dist/Markdown/parser/index.js +10 -0
- package/dist/Markdown/parser.d.ts +126 -58
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +716 -167
- package/dist/Markdown/plugins/frontmatter.d.ts +32 -0
- package/dist/Markdown/plugins/frontmatter.d.ts.map +1 -0
- package/dist/Markdown/plugins/frontmatter.js +132 -0
- package/dist/Markdown/plugins/index.d.ts +17 -0
- package/dist/Markdown/plugins/index.d.ts.map +1 -0
- package/dist/Markdown/plugins/index.js +14 -0
- package/dist/Markdown/plugins/protocol.d.ts +191 -0
- package/dist/Markdown/plugins/protocol.d.ts.map +1 -0
- package/dist/Markdown/plugins/protocol.js +957 -0
- package/dist/Markdown/plugins/semanticFence.d.ts +36 -0
- package/dist/Markdown/plugins/semanticFence.d.ts.map +1 -0
- package/dist/Markdown/plugins/semanticFence.js +213 -0
- package/dist/Markdown/plugins/softBreaks.d.ts +3 -0
- package/dist/Markdown/plugins/softBreaks.d.ts.map +1 -0
- package/dist/Markdown/plugins/softBreaks.js +172 -0
- package/dist/Markdown/plugins/sourceDecoration.d.ts +76 -0
- package/dist/Markdown/plugins/sourceDecoration.d.ts.map +1 -0
- package/dist/Markdown/plugins/sourceDecoration.js +393 -0
- package/dist/Markdown/plugins/textTransform.d.ts +30 -0
- package/dist/Markdown/plugins/textTransform.d.ts.map +1 -0
- package/dist/Markdown/plugins/textTransform.js +374 -0
- package/dist/Markdown/remark.d.ts +196 -0
- package/dist/Markdown/remark.d.ts.map +1 -0
- package/dist/Markdown/remark.js +1062 -0
- package/dist/Markdown/url.d.ts +6 -0
- package/dist/Markdown/url.d.ts.map +1 -0
- package/dist/Markdown/url.js +31 -0
- package/dist/Markdown/utils.d.ts +4 -2
- package/dist/Markdown/utils.d.ts.map +1 -1
- package/dist/Markdown/utils.js +2 -1
- package/dist/MetadataList/MetadataList.js +3 -3
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +4 -4
- package/dist/Outline/index.d.ts +1 -0
- package/dist/Outline/index.d.ts.map +1 -1
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +7 -1
- package/dist/Outline/parseOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/parseOutlineFromMarkdown.js +14 -8
- package/dist/Outline/useOutlineFromMarkdown.d.ts +3 -1
- package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromMarkdown.js +8 -3
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +46 -30
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +5 -0
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +36 -31
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +13 -1
- package/dist/ScrollableArea/ScrollableArea.d.ts +1 -0
- package/dist/ScrollableArea/ScrollableArea.d.ts.map +1 -1
- package/dist/ScrollableArea/ScrollableArea.js +1 -0
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +5 -5
- package/dist/Selector/Selector.d.ts +9 -7
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +16 -7
- package/dist/SideNav/SideNav.d.ts +2 -1
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +9 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +28 -12
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +23 -7
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +11 -0
- package/dist/TabList/Tab.d.ts +1 -1
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +20 -7
- package/dist/Table/Table.d.ts +1 -0
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +29 -13
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +1 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +2 -2
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +4 -4
- package/dist/Timer/Timer.d.ts +49 -0
- package/dist/Timer/Timer.d.ts.map +1 -0
- package/dist/Timer/Timer.js +158 -0
- package/dist/Timer/index.d.ts +9 -0
- package/dist/Timer/index.d.ts.map +1 -0
- package/dist/Timer/index.js +10 -0
- package/dist/ToggleButton/ToggleButton.d.ts +9 -6
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +15 -27
- package/dist/TopNav/TopNavMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +3 -2
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +3 -0
- package/dist/TreeList/TreeListItem.d.ts +6 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +12 -2
- package/dist/TreeList/TreeListTypes.d.ts +8 -1
- package/dist/TreeList/TreeListTypes.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +16 -7
- package/dist/astryx.css +27 -11
- package/dist/hooks/scrollKeyboardDelegation.d.ts +3 -0
- package/dist/hooks/scrollKeyboardDelegation.d.ts.map +1 -0
- package/dist/hooks/scrollKeyboardDelegation.js +146 -0
- package/dist/hooks/useClickableContainer.d.ts +10 -1
- package/dist/hooks/useClickableContainer.d.ts.map +1 -1
- package/dist/hooks/useClickableContainer.js +15 -4
- package/dist/hooks/useScrollableArea.d.ts +6 -2
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +17 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/theme/declarationBoundary.d.ts +17 -0
- package/dist/theme/declarationBoundary.d.ts.map +1 -0
- package/dist/theme/declarationBoundary.js +343 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +4 -0
- package/dist/theme/generateThemeRules.d.ts +13 -7
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +140 -34
- package/dist/utils/interactionOverlay.stylex.d.ts +8 -0
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +9 -0
- package/dist/utils/safeUrl.d.ts +11 -0
- package/dist/utils/safeUrl.d.ts.map +1 -0
- package/dist/utils/safeUrl.js +78 -0
- package/locales/af-ZA.json +530 -1
- package/locales/ar-SA.json +490 -1
- package/locales/ca-ES.json +514 -1
- package/locales/cs-CZ.json +498 -1
- package/locales/da-DK.json +522 -1
- package/locales/de-DE.json +522 -1
- package/locales/el-GR.json +498 -1
- package/locales/es-ES.json +510 -1
- package/locales/fi-FI.json +498 -1
- package/locales/fr-FR.json +534 -1
- package/locales/he-IL.json +498 -1
- package/locales/hu-HU.json +498 -1
- package/locales/it-IT.json +510 -1
- package/locales/ja-JP.json +490 -1
- package/locales/ko-KR.json +498 -1
- package/locales/nl-NL.json +534 -1
- package/locales/no-NO.json +510 -1
- package/locales/pl-PL.json +506 -1
- package/locales/pt-BR.json +506 -1
- package/locales/pt-PT.json +506 -1
- package/locales/ro-RO.json +506 -1
- package/locales/ru-RU.json +498 -1
- package/locales/sr-SP.json +498 -1
- package/locales/sv-SE.json +502 -1
- package/locales/tr-TR.json +498 -1
- package/locales/uk-UA.json +498 -1
- package/locales/vi-VN.json +502 -1
- package/locales/zh-CN.json +490 -1
- package/locales/zh-TW.json +490 -1
- package/package.json +24 -4
- package/src/BottomSheet/BottomSheet.doc.mjs +8 -1
- package/src/BottomSheet/BottomSheet.spec.md +46 -20
- package/src/BottomSheet/BottomSheet.test.tsx +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -1
- package/src/BottomSheet/BottomSheetKeyboard.test.tsx +195 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +11 -1
- package/src/BottomSheet/BottomSheetPanel.tsx +49 -16
- package/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts +344 -0
- package/src/Button/Button.doc.mjs +5 -5
- package/src/Button/Button.tsx +15 -13
- package/src/Button/__tests__/Button.a11y.chromium.spec.ts +17 -1
- package/src/Button/__tests__/Button.a11y.known-failures.ts +0 -29
- package/src/Button/__tests__/Button.a11y.renders.tsx +9 -2
- package/src/Button/__tests__/Button.a11y.states.ts +9 -0
- package/src/Chat/ChatComposer.doc.mjs +14 -0
- package/src/Chat/ChatComposer.spec.md +230 -0
- package/src/Chat/ChatComposer.test.tsx +57 -0
- package/src/Chat/ChatComposer.tsx +21 -9
- package/src/Chat/ChatComposerDrawer.doc.mjs +63 -5
- package/src/Chat/ChatComposerDrawer.spec.md +267 -0
- package/src/Chat/ChatComposerDrawer.test.tsx +81 -12
- package/src/Chat/ChatComposerDrawer.tsx +38 -9
- package/src/Chat/ChatComposerInput.doc.mjs +114 -26
- package/src/Chat/ChatComposerInput.spec.md +185 -0
- package/src/Chat/ChatComposerInput.test.tsx +113 -3
- package/src/Chat/ChatComposerInput.tsx +78 -13
- package/src/Chat/ChatComposerTokenElement.spec.md +152 -0
- package/src/Chat/ChatComposerTokenElement.test.tsx +85 -0
- package/src/Chat/ChatDictationButton.doc.mjs +3 -3
- package/src/Chat/ChatDictationButton.spec.md +160 -0
- package/src/Chat/ChatDictationButton.test.tsx +92 -27
- package/src/Chat/ChatDictationButton.tsx +8 -6
- package/src/Chat/ChatLayout.doc.mjs +12 -4
- package/src/Chat/ChatLayout.spec.md +271 -0
- package/src/Chat/ChatLayout.test.tsx +28 -0
- package/src/Chat/ChatLayout.tsx +19 -0
- package/src/Chat/ChatLayoutScrollButton.spec.md +338 -0
- package/src/Chat/ChatLayoutScrollButton.test.tsx +31 -0
- package/src/Chat/ChatLayoutScrollButton.tsx +31 -14
- package/src/Chat/ChatMessageBubble.doc.mjs +28 -15
- package/src/Chat/ChatMessageBubble.spec.md +263 -0
- package/src/Chat/ChatMessageBubble.test.tsx +93 -0
- package/src/Chat/ChatMessageBubble.tsx +8 -3
- package/src/Chat/ChatMessageList.spec.md +222 -0
- package/src/Chat/ChatMessageList.test.tsx +64 -2
- package/src/Chat/ChatMessageList.tsx +4 -3
- package/src/Chat/ChatMessageMetadata.doc.mjs +57 -3
- package/src/Chat/ChatMessageMetadata.spec.md +220 -0
- package/src/Chat/ChatMessageMetadata.test.tsx +34 -0
- package/src/Chat/ChatMessageMetadata.tsx +13 -13
- package/src/Chat/ChatSendButton.test.tsx +1 -4
- package/src/Chat/ChatSendButton.tsx +1 -1
- package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +514 -0
- package/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts +740 -0
- package/src/Chat/__tests__/ChatMessageBubble.a11y.chromium.spec.ts +457 -0
- package/src/Chat/__tests__/ChatMessageBubble.auditProvenance.test.ts +91 -0
- package/src/Chat/__tests__/ChatMessageBubble.auditProvenance.ts +91 -0
- package/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts +456 -0
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +413 -0
- package/src/Chat/index.ts +1 -0
- package/src/CheckboxInput/CheckboxInput.doc.mjs +11 -0
- package/src/CheckboxInput/CheckboxInput.test.tsx +34 -0
- package/src/CheckboxInput/CheckboxInput.tsx +21 -1
- package/src/Citation/Citation.doc.mjs +2 -2
- package/src/Citation/Citation.test.tsx +17 -0
- package/src/Citation/Citation.tsx +4 -2
- package/src/ClickableCard/ClickableCard.doc.mjs +2 -2
- package/src/ClickableCard/ClickableCard.test.tsx +102 -5
- package/src/CodeBlock/highlightRanges.test.ts +143 -1
- package/src/CodeBlock/highlightRanges.ts +15 -5
- package/src/Collapsible/Collapsible.doc.mjs +11 -0
- package/src/Collapsible/Collapsible.test.tsx +21 -0
- package/src/Collapsible/Collapsible.tsx +5 -0
- package/src/CommandPalette/CommandPaletteInput.tsx +6 -1
- package/src/ComplexSelector/ComplexSelector.tsx +6 -1
- package/src/DateInput/DateInput.tsx +6 -1
- package/src/DateInput/NativeDateField.tsx +24 -8
- package/src/DateInput/TouchDateField.tsx +6 -2
- package/src/DateRangeInput/DateRangeInput.tsx +6 -1
- package/src/DateTimeInput/DateTimeInput.tsx +6 -1
- package/src/DateTimeInput/TouchDateTimeField.tsx +6 -1
- package/src/DateTimeInput/nativePickerSegmentStyles.ts +24 -8
- package/src/Dialog/Dialog.doc.mjs +2 -0
- package/src/Dialog/DialogHeader.doc.mjs +22 -0
- package/src/Dialog/DialogHeader.test.tsx +167 -3
- package/src/Dialog/DialogHeader.tsx +37 -6
- package/src/Dialog/modules/DialogHeader.spec.md +101 -42
- package/src/DropdownMenu/DropdownMenu.test.tsx +5 -2
- package/src/Field/InputClearButton.test.tsx +17 -3
- package/src/Field/InputClearButton.tsx +5 -2
- package/src/Field/PanelSearchInput.tsx +5 -2
- package/src/FieldStatus/__tests__/StatusMessage.a11y.states.ts +1 -1
- package/src/FileInput/FileInput.tsx +11 -2
- package/src/Icon/Icon.doc.mjs +7 -5
- package/src/Icon/Icon.spec.md +81 -40
- package/src/Icon/Icon.test.tsx +6 -3
- package/src/Icon/Icon.tsx +20 -68
- package/src/Icon/IconDefaultSizeContext.ts +23 -0
- package/src/Icon/IconSize.stylex.ts +70 -0
- package/src/IconButton/IconButton.doc.mjs +3 -3
- package/src/IconButton/IconButton.test.tsx +40 -0
- package/src/Item/Item.doc.mjs +6 -2
- package/src/Item/Item.tsx +9 -3
- package/src/Kbd/Kbd.doc.mjs +3 -3
- package/src/Kbd/Kbd.test.tsx +57 -1
- package/src/Kbd/Kbd.tsx +57 -37
- package/src/Layout/LayoutFooter.doc.mjs +17 -0
- package/src/Link/Link.doc.mjs +17 -4
- package/src/Link/Link.test.tsx +24 -0
- package/src/Link/Link.tsx +5 -0
- package/src/Link/LinkProvider.doc.mjs +2 -2
- package/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts +261 -0
- package/src/Link/useLinkComponent.test.tsx +333 -0
- package/src/Link/useLinkComponent.ts +29 -57
- package/src/List/List.doc.mjs +6 -0
- package/src/List/List.spec.md +200 -0
- package/src/List/List.test.tsx +117 -1
- package/src/List/List.tsx +22 -2
- package/src/List/ListContext.tsx +3 -1
- package/src/List/ListItem.doc.mjs +2 -2
- package/src/List/ListItem.source-build.test.mjs +41 -0
- package/src/List/ListItem.tsx +26 -2
- package/src/Markdown/Markdown.doc.mjs +300 -2
- package/src/Markdown/Markdown.fr23.bench.ts +174 -0
- package/src/Markdown/Markdown.fr23.perf.test.ts +249 -0
- package/src/Markdown/Markdown.fr23.sampling.ts +49 -0
- package/src/Markdown/Markdown.helpers.perf.test.ts +489 -0
- package/src/Markdown/Markdown.public.test.ts +130 -3
- package/src/Markdown/Markdown.renderBoundary.test.tsx +72 -0
- package/src/Markdown/Markdown.spec.md +203 -45
- package/src/Markdown/Markdown.test.tsx +63 -0
- package/src/Markdown/Markdown.tsx +414 -135
- package/src/Markdown/ast.test.ts +307 -0
- package/src/Markdown/ast.ts +337 -0
- package/src/Markdown/incremental.test.ts +12 -0
- package/src/Markdown/index.ts +37 -1
- package/src/Markdown/modules/remark.spec.md +269 -0
- package/src/Markdown/modules/softBreaks.spec.md +137 -0
- package/src/Markdown/parser/index.ts +64 -0
- package/src/Markdown/parser.public.test.ts +103 -0
- package/src/Markdown/parser.test.ts +20 -0
- package/src/Markdown/parser.ts +1180 -235
- package/src/Markdown/plugins/frontmatter.test.tsx +125 -0
- package/src/Markdown/plugins/frontmatter.ts +198 -0
- package/src/Markdown/plugins/index.ts +54 -0
- package/src/Markdown/plugins/protocol.test.tsx +1022 -0
- package/src/Markdown/plugins/protocol.ts +1618 -0
- package/src/Markdown/plugins/semanticFence.test.tsx +546 -0
- package/src/Markdown/plugins/semanticFence.ts +424 -0
- package/src/Markdown/plugins/softBreaks.test.tsx +172 -0
- package/src/Markdown/plugins/softBreaks.ts +169 -0
- package/src/Markdown/plugins/sourceDecoration.test.tsx +799 -0
- package/src/Markdown/plugins/sourceDecoration.ts +539 -0
- package/src/Markdown/plugins/textTransform.test.ts +467 -0
- package/src/Markdown/plugins/textTransform.ts +554 -0
- package/src/Markdown/remark.test.tsx +1877 -0
- package/src/Markdown/remark.ts +1574 -0
- package/src/Markdown/url.ts +36 -0
- package/src/Markdown/utils.ts +13 -1
- package/src/MetadataList/MetadataList.test.tsx +4 -2
- package/src/MetadataList/MetadataList.tsx +3 -3
- package/src/MultiSelector/MultiSelector.test.tsx +1 -35
- package/src/MultiSelector/__tests__/MultiSelector.listbox.a11y.test.tsx +128 -0
- package/src/NumberInput/NumberInput.tsx +6 -1
- package/src/Outline/Outline.doc.mjs +7 -5
- package/src/Outline/Outline.spec.md +1 -1
- package/src/Outline/index.ts +1 -0
- package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +142 -0
- package/src/Outline/parseOutlineFromMarkdown.ts +40 -10
- package/src/Outline/useOutlineFromMarkdown.ts +15 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +2 -2
- package/src/PowerSearch/PowerSearchEditPopover.test.tsx +150 -1
- package/src/PowerSearch/PowerSearchEditPopover.tsx +51 -28
- package/src/PowerSearch/PowerSearchValueEditor.test.tsx +51 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +4 -0
- package/src/ProgressBar/ProgressBar.test.tsx +29 -11
- package/src/ProgressBar/ProgressBar.tsx +59 -72
- package/src/RadioList/RadioList.doc.mjs +11 -0
- package/src/RadioList/RadioList.test.tsx +32 -0
- package/src/RadioList/RadioListItem.tsx +25 -1
- package/src/ScrollableArea/ScrollableArea.tsx +1 -0
- package/src/ScrollableArea/modules/useScrollableArea.spec.md +50 -22
- package/src/SegmentedControl/SegmentedControl.doc.mjs +2 -2
- package/src/SegmentedControl/SegmentedControl.test.tsx +31 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +6 -9
- package/src/Selector/Selector.doc.mjs +2 -2
- package/src/Selector/Selector.spec.md +51 -49
- package/src/Selector/Selector.test.tsx +61 -55
- package/src/Selector/Selector.tsx +34 -15
- package/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts +130 -0
- package/src/Selector/__tests__/Listbox.a11y.dom.ts +38 -0
- package/src/Selector/__tests__/Listbox.a11y.inventory.test.ts +63 -0
- package/src/Selector/__tests__/Listbox.a11y.known-failures.ts +37 -0
- package/src/Selector/__tests__/Listbox.a11y.states.ts +232 -0
- package/src/Selector/__tests__/Selector.a11y.chromium.spec.ts +45 -0
- package/src/Selector/__tests__/Selector.listbox.a11y.test.tsx +121 -0
- package/src/SideNav/SideNav.doc.mjs +1 -1
- package/src/SideNav/SideNav.test.tsx +10 -0
- package/src/SideNav/SideNav.tsx +14 -2
- package/src/Slider/Slider.doc.mjs +17 -3
- package/src/Slider/Slider.test.tsx +221 -0
- package/src/Slider/Slider.tsx +40 -9
- package/src/Spinner/Spinner.test.tsx +4 -0
- package/src/Spinner/Spinner.tsx +31 -18
- package/src/Switch/Switch.doc.mjs +11 -0
- package/src/Switch/Switch.test.tsx +16 -0
- package/src/Switch/Switch.tsx +28 -0
- package/src/TabList/Tab.tsx +35 -7
- package/src/TabList/TabList.doc.mjs +11 -0
- package/src/TabList/TabList.spec.md +204 -0
- package/src/TabList/TabList.test.tsx +66 -0
- package/src/TabList/__tests__/Tabs.a11y.known-failures.ts +1 -34
- package/src/Table/Table.doc.mjs +1 -1
- package/src/Table/Table.spec.md +54 -40
- package/src/Table/Table.test.tsx +83 -10
- package/src/Table/Table.tsx +30 -22
- package/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts +137 -0
- package/src/TextArea/TextArea.tsx +6 -1
- package/src/TextInput/TextInput.test.tsx +20 -1
- package/src/TextInput/TextInput.tsx +6 -1
- package/src/TimeInput/TimeInput.tsx +6 -1
- package/src/Timer/Timer.doc.mjs +183 -0
- package/src/Timer/Timer.spec.md +215 -0
- package/src/Timer/Timer.test.tsx +302 -0
- package/src/Timer/Timer.tsx +258 -0
- package/src/Timer/index.ts +11 -0
- package/src/ToggleButton/ToggleButton.doc.mjs +3 -3
- package/src/ToggleButton/ToggleButton.test.tsx +299 -4
- package/src/ToggleButton/ToggleButton.tsx +26 -33
- package/src/ToggleButton/ToggleButtonGroup.doc.mjs +3 -3
- package/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts +209 -0
- package/src/Token/Token.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.spec.md +142 -75
- package/src/TopNav/TopNavMenu.doc.mjs +2 -2
- package/src/TopNav/TopNavMenu.test.tsx +30 -0
- package/src/TopNav/TopNavMenu.tsx +7 -2
- package/src/TreeList/TreeList.doc.mjs +3 -3
- package/src/TreeList/TreeList.spec.md +123 -75
- package/src/TreeList/TreeList.test.tsx +29 -0
- package/src/TreeList/TreeList.tsx +3 -0
- package/src/TreeList/TreeListItem.tsx +15 -1
- package/src/TreeList/TreeListTypes.ts +11 -1
- package/src/Typeahead/BaseTypeahead.spec.md +4 -3
- package/src/Typeahead/BaseTypeahead.tsx +21 -7
- package/src/Typeahead/Typeahead.test.tsx +53 -0
- package/src/__tests__/PressedState.a11y.chromium.spec.ts +813 -0
- package/src/__tests__/pressState.ts +93 -0
- package/src/hooks/scrollKeyboardDelegation.test.ts +155 -0
- package/src/hooks/scrollKeyboardDelegation.ts +233 -0
- package/src/hooks/useClickableContainer.test.tsx +236 -0
- package/src/hooks/useClickableContainer.ts +20 -4
- package/src/hooks/useScrollableArea.doc.mjs +15 -3
- package/src/hooks/useScrollableArea.test.tsx +59 -1
- package/src/hooks/useScrollableArea.ts +34 -10
- package/src/index.ts +3 -0
- package/src/inputFontFloor.test.ts +106 -0
- package/src/tailwind-theme.css +0 -6
- package/src/theme/Theme.test.tsx +32 -0
- package/src/theme/declarationBoundary.test.ts +126 -0
- package/src/theme/declarationBoundary.ts +347 -0
- package/src/theme/derivedVarRegistry.test.ts +7 -0
- package/src/theme/derivedVarRegistry.ts +1 -0
- package/src/theme/generateThemeRules.test.ts +526 -1
- package/src/theme/generateThemeRules.ts +228 -50
- package/src/theme/tokenValueCompat.test.ts +4 -1
- package/src/utils/interactionOverlay.stylex.ts +20 -0
- package/src/utils/safeUrl.test.ts +88 -0
- package/src/utils/safeUrl.ts +85 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,86 @@
|
|
|
1
1
|
# @xds/core
|
|
2
2
|
|
|
3
|
+
# 0.6.3
|
|
4
|
+
|
|
5
|
+
#### New Features
|
|
6
|
+
|
|
7
|
+
- Show each shared InputClearButton's contextual action label in a tooltip. Clearable inputs now give sighted users the same specific action name already available to assistive technology. (#6354)
|
|
8
|
+
- ChatComposerDrawer: add a `collapsedSummary` composition slot that replaces the complete Collapsed summary anatomy part when provided. Omitting it preserves the existing neutral Badge and label. (#5399)
|
|
9
|
+
- DialogHeader: add end-content edge compensation control (#6465)
|
|
10
|
+
DialogHeader now accepts `endContentEdgeCompensation="inline" | "block" | "all"` to select which axes of its existing end-content wrapper receive fixed compensation. Omitting the prop preserves the current automatic compensation whenever the close action renders.
|
|
11
|
+
- Markdown: add native typed frontmatter metadata (#6381)
|
|
12
|
+
Use `createMarkdownFrontmatter()` from `@astryxdesign/core/Markdown/plugins` to decode a document-start key/value block into typed metadata, keep unfinished streaming metadata hidden, and remove completed metadata syntax from rendered Markdown.
|
|
13
|
+
- Markdown: add the core plugin protocol (#6340)
|
|
14
|
+
Use `createMarkdownPlugin()` and Markdown's `plugins` prop to compose bounded source syntax, immutable typed AST transforms, and extension renderers. Import `parseMarkdownAst()` or `parseInlineAst()` from `@astryxdesign/core/Markdown/parser` when server code needs the canonical tree. The same ordered plugins work with parser entry points and Markdown-derived Outline items, while omitted or empty plugin lists preserve existing behavior.
|
|
15
|
+
- Markdown: add a limited Remark compatibility adapter (#6345)
|
|
16
|
+
Import `createMarkdownRemarkTransform()` from `@astryxdesign/core/Markdown/remark` to run one synchronous transform-only Remark plugin over the documented MDAST subset. Every invocation gets a fresh mutable tree and an isolated file, and each plugin's compatibility is proven by fixtures rather than assumed: async work, parser or compiler plugins, processor state, raw HTML, unsupported nodes, forged positions, and metadata Astryx cannot represent keep the last valid readable document and report one diagnostic. The adapter is a separate entry point, so it stays out of every bundle that does not import it.
|
|
17
|
+
- Markdown: add a semantic code-fence transform helper (#6343)
|
|
18
|
+
Use `createMarkdownFenceTransform()` to annotate declared fenced-code languages with typed extension data while standard plugin `renderers` own presentation and text projection. `components.code` retains precedence, and declined, missing, or failed proposals preserve Markdown's accessible, copyable `CodeBlock` fallback.
|
|
19
|
+
- Markdown: add an immutable source-decoration helper (#6344)
|
|
20
|
+
Use `createMarkdownSourceDecoration()` to attach non-visual metadata to every block a validated UTF-16 source range touches, and `getMarkdownSourceDecorations()` to read it back in a later plugin. It works through `<Markdown>` and Outline with no extra parser options, resolves independently of the order earlier transforms left blocks in, and appears on the settled document rather than on partial streaming chunks, so a decoration never appears and then vanishes. Metadata lives in one versioned Astryx-owned envelope that never merges foreign node data. Rendered output, copyable text, accessible names, heading ids, focus order, navigation, and source provenance are unchanged.
|
|
21
|
+
|
|
22
|
+
Markdown transforms also got faster, and a plugin now always observes a fully immutable tree — including blocks a Core helper carried over untouched. Core-authored helpers now validate the nodes a caller's callback produced and run on a trusted path that skips the whole-tree validation and freezing applied to plugin-authored output, freezing walks only what a transform changed, a plugin list that contributes no inline syntax no longer costs anything per source character, and the helpers' per-match allocations and rebuilds are gone. The representative three-helper set now adds about 20 percent over an empty pipeline, inside its 25 percent budget, down from roughly 3.3x.
|
|
23
|
+
|
|
24
|
+
- Markdown: add an immutable text-transform helper (#6342)
|
|
25
|
+
Use `createMarkdownTextTransform()` to replace matching prose with typed Markdown nodes while preserving links, images, code, math, citations, and existing extension syntax as protected contexts.
|
|
26
|
+
- Add pressed feedback to CheckboxInput, Collapsible, Link, Slider, Switch, TabList, RadioList, and unselected SegmentedControl items. Enabled controls paint `--color-overlay-pressed` on their interaction surface during pointer hold or drag; disabled controls and selected SegmentedControl items keep their existing surfaces. (#6380)
|
|
27
|
+
- Let a TreeList item carry row styles (#6238)
|
|
28
|
+
`TreeListItemData` gains `xstyle`, `className`, and `style`, applied to the item's row element, as the TreeList contract's per-item styling seam requires.
|
|
29
|
+
|
|
30
|
+
`TreeList` takes rows as data, so nothing previously handed back the row's element. That prevents row-scoped primitives such as `useContainerReveal` from installing the class and inline custom properties that jointly isolate each row's hover and focus state; applying the reveal to the whole tree would expose every row action at once.
|
|
31
|
+
|
|
32
|
+
`Item` already accepts the same row styling props, so a list converting to a tree keeps its reveal wiring instead of having to mark the whole tree.
|
|
33
|
+
|
|
34
|
+
#### Fixes
|
|
35
|
+
|
|
36
|
+
- Make overflowing BottomSheet text keyboard reachable with a named scroll-body tab stop. Add shared focus-time keyboard delegation to `useScrollableArea`: forward Tab may enter the first native link/button directly, while inputs, composite widgets, and nested scroll owners retain the viewport stop. Reverse traversal skips the delegated viewport; pointer/programmatic focus and content changes never trigger delegation. Sheet scroll containment now applies only while content overflows and uses the shared `contain` policy, which permits native edge feedback. (#6301)
|
|
37
|
+
- Keep ChatComposer's public composition contracts aligned: custom inputs now submit the value they supply, disabled default editors expose their state to assistive technology, and an explicitly shown Stop action remains pointer-operable while editing is disabled. (#6398)
|
|
38
|
+
- Keep collapsed `ChatComposerDrawer` content out of keyboard and assistive-technology navigation, and show the shared focus indicator on its disclosure control. (#6416)
|
|
39
|
+
- Keep programmatic ChatComposerInput edits observable, deliver dropped files through `onFiles`, and let `onPaste` intercept text before default token conversion. (#6419)
|
|
40
|
+
- Export `ChatComposerTokenElementProps` and forward supported span props and refs from `ChatComposerTokenElement` (#6443).
|
|
41
|
+
- Keep the chat dictation control disabled when speech recognition is unavailable, and preserve theme control over its clipping feedback (#6444).
|
|
42
|
+
- Clip the resizable SideNav handle within the sidebar bounds (#6196)
|
|
43
|
+
- scope the 16px text-control font-size floor to iOS with `@supports (-webkit-touch-callout: none)` inside the coarse-pointer query, so Android and touch-screen laptops keep the theme's type scale instead of an inflated 16px (#6085; fixes #6015)
|
|
44
|
+
- Kbd: render the `esc` and `return` aliases with the same glyphs and accessible names as `escape` and `enter` (#5657)
|
|
45
|
+
This partial fix for #5403 normalizes the two unambiguous aliases already accepted by `useHotkeys`. Kbd now renders `esc` as `Esc` with the accessible name `Escape`, and `return` as `↵` with the accessible name `Enter`. Its lookup tables now also avoid prototype-chain collisions when rendering arbitrary key names. The platform-specific rendering contract for `meta` and display choice for `space` remain unresolved in #5403 pending separate API and design decisions.
|
|
46
|
+
- LayoutFooter: add playground wrapper and default children for docsite preview (#6341)
|
|
47
|
+
Prevents the properties-tab preview on the docsite from rendering an empty stage by wrapping LayoutFooter inside a Layout scaffold with representative footer content in the footer slot.
|
|
48
|
+
- PowerSearch: switching the field or operator while the value menu is open now shows the new field's options instead of the old ones. (#6357)
|
|
49
|
+
- Move focusable ProgressBar target marks outside the `progressbar` subtree (#6248)
|
|
50
|
+
- Selector: collapse an option's mark column when its resolved selection indicator renders nothing. (#5619)
|
|
51
|
+
Unselected rows using the default check indicator no longer lose label width to an empty wrapper. Selected marks and themed indicators that render an unselected state keep their space at the configured logical edge.
|
|
52
|
+
- Slider marks inside the filled region use the fill color: marks at or behind the thumb in single mode, and marks between the thumbs in range mode, now paint with the accent fill color instead of the default mark color. Marks on the unfilled side are unchanged. (#6455)
|
|
53
|
+
- Slider uses the track token for unfilled tick marks so marks and rails stay aligned across themes (#6461)
|
|
54
|
+
- Spinner: animate the arc's dash offset instead of rotating the ring, fixing residual wobble on iOS Safari (#6311; fixes #6253)
|
|
55
|
+
The earlier fix for #3617 added `willChange: 'transform'` to the rotating `<svg>`, which smooths the rotation's motion but does nothing about how WebKit rasterizes a rotating stroked shape's rounded cap on each frame. Rotating the whole ring still visibly wobbled on iOS Safari.
|
|
56
|
+
|
|
57
|
+
Animates `stroke-dashoffset` on the stationary arc `<circle>` instead of rotating the `<svg>`, so the shape never rotates and WebKit never re-rasterizes the cap at an intermediate angle. Confirmed against a real iOS Safari device by the issue reporter.
|
|
58
|
+
|
|
59
|
+
- Table: contain overscroll only while its inner viewport can scroll, so a fitting table no longer creates a dead scroll zone in its parent. (#6410)
|
|
60
|
+
- Apply the theme's body font to the theme scope root. Generated theme CSS set `font-family` on headings, paragraphs, and code elements but never established a base font on the page, so components styled with `font-family: inherit` (SideNav items, Buttons) fell back to the browser default serif. The generator now emits `font-family: var(--font-family-body)` on `:scope`, which inherits through the tree. (#6450)
|
|
61
|
+
- Keep ToggleButton callbacks synchronous and run pressed Actions through Button’s clickAction pathway, preserving callback cancellation and optimistic pending feedback. Omit the Action pathway for callback-only toggles and value-identified ToggleButtonGroup members, whose selection remains group-owned. (#6463)
|
|
62
|
+
- Keep a ToggleButton's own `isDisabled` when its ToggleButtonGroup does not disable anything. The group always supplies an `isDisabled` boolean, so the previous `??` fallback never ran and an enabled group re-enabled a member that had disabled itself — the member selected on click, and a member carrying a `tooltip` stayed operable while looking unavailable. A disabled group still disables every member; it just cannot re-enable one. (#6356)
|
|
63
|
+
|
|
64
|
+
#### Contributors
|
|
65
|
+
|
|
66
|
+
Thanks to everyone who contributed to this release:
|
|
67
|
+
|
|
68
|
+
- @aldentan
|
|
69
|
+
- @athz
|
|
70
|
+
- @cixzhang
|
|
71
|
+
- @ernestt
|
|
72
|
+
- @harjothkhara
|
|
73
|
+
- @HelloOjasMutreja
|
|
74
|
+
- @jiunshinn
|
|
75
|
+
- @kentonquatman
|
|
76
|
+
- @korkt-kim
|
|
77
|
+
- @ManoharPaturi
|
|
78
|
+
- @nynexman4464
|
|
79
|
+
- @rupesh-kumar-sah
|
|
80
|
+
- @vjeux
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
3
84
|
# 0.6.2
|
|
4
85
|
|
|
5
86
|
#### New Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file BottomSheet.tsx
|
|
3
|
-
* @input Uses React, StyleX, core hooks/utils, BottomSheetPanel, BottomSheetSwitcherContext
|
|
3
|
+
* @input Uses React, StyleX, core hooks/utils, named BottomSheetPanel, BottomSheetSwitcherContext
|
|
4
4
|
* @output Exports BottomSheet component and BottomSheetProps
|
|
5
5
|
* @position Public BottomSheet router plus private standalone/switcher hosts
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAgB7C,YAAY,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAC,iBAAiB,EAAE,oBAAoB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AC,KAAK,EAAE,gBAAgB,+BA6BlD;yBA7Be,WAAW"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file BottomSheet.tsx
|
|
7
|
-
* @input Uses React, StyleX, core hooks/utils, BottomSheetPanel, BottomSheetSwitcherContext
|
|
7
|
+
* @input Uses React, StyleX, core hooks/utils, named BottomSheetPanel, BottomSheetSwitcherContext
|
|
8
8
|
* @output Exports BottomSheet component and BottomSheetProps
|
|
9
9
|
* @position Public BottomSheet router plus private standalone/switcher hosts
|
|
10
10
|
*
|
|
@@ -266,6 +266,7 @@ function StandaloneBottomSheet({
|
|
|
266
266
|
ref: ref,
|
|
267
267
|
state: panelState,
|
|
268
268
|
height: height,
|
|
269
|
+
label: label,
|
|
269
270
|
snapPoints: snapPoints,
|
|
270
271
|
isSwipeDismissAllowed: purpose === 'info',
|
|
271
272
|
isPageScrollLocked: shouldPresent && hasScrim,
|
|
@@ -397,6 +398,7 @@ function SwitcherBottomSheetItem({
|
|
|
397
398
|
ref: ref,
|
|
398
399
|
state: panelState,
|
|
399
400
|
height: height,
|
|
401
|
+
label: label,
|
|
400
402
|
snapPoints: snapPoints,
|
|
401
403
|
isSwipeDismissAllowed: purpose === 'info',
|
|
402
404
|
isPageScrollLocked: hasScrim,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file BottomSheetPanel.tsx
|
|
3
|
-
* @input Uses React, StyleX, theme tokens,
|
|
4
|
-
* @output Internal BottomSheetPanel
|
|
3
|
+
* @input Uses React, StyleX, theme tokens, sheet gestures, shared scroll behavior, and the host label
|
|
4
|
+
* @output Internal BottomSheetPanel with a keyboard-reachable scrolling body and motion-state types
|
|
5
5
|
* @position Shared presentation layer for standalone and switcher BottomSheets
|
|
6
6
|
*
|
|
7
7
|
* This component owns everything intrinsic to a sheet surface: height budgets,
|
|
8
8
|
* drag and snap gestures, the handle and scrolling body, motion styles, and
|
|
9
|
-
* transition completion. It
|
|
10
|
-
* state,
|
|
9
|
+
* transition completion. It owns the body's keyboard access; dialog focus
|
|
10
|
+
* entry/return, inert state, and switcher registration belong to the host.
|
|
11
11
|
*
|
|
12
12
|
* SYNC: When modified, update these files to stay in sync:
|
|
13
13
|
* - /packages/core/src/BottomSheet/BottomSheet.tsx
|
|
@@ -44,6 +44,8 @@ interface BottomSheetPanelProps extends BaseProps<HTMLDivElement> {
|
|
|
44
44
|
ref?: React.Ref<HTMLDivElement>;
|
|
45
45
|
state: BottomSheetPanelState;
|
|
46
46
|
height: BottomSheetHeight | number | string;
|
|
47
|
+
/** Existing host name, reused for the keyboard scrolling group. */
|
|
48
|
+
label: string;
|
|
47
49
|
children: ReactNode;
|
|
48
50
|
snapPoints?: ReadonlyArray<BottomSheetSnapPoint>;
|
|
49
51
|
isSwipeDismissAllowed?: boolean;
|
|
@@ -56,7 +58,7 @@ interface BottomSheetPanelProps extends BaseProps<HTMLDivElement> {
|
|
|
56
58
|
onMotionComplete?: (motion: BottomSheetPanelMotion) => void;
|
|
57
59
|
}
|
|
58
60
|
/** Internal visual and gesture surface shared by every BottomSheet host. */
|
|
59
|
-
export declare function BottomSheetPanel({ ref, state, height, children, snapPoints, className, style, tabIndex, xstyle, isSwipeDismissAllowed, isPageScrollLocked, onDismiss, onScrimOpacity, onElementChange, onMotionStart, onMotionComplete, ...props }: BottomSheetPanelProps): import("react").JSX.Element;
|
|
61
|
+
export declare function BottomSheetPanel({ ref, state, height, label, children, snapPoints, className, style, tabIndex, xstyle, isSwipeDismissAllowed, isPageScrollLocked, onDismiss, onScrimOpacity, onElementChange, onMotionStart, onMotionComplete, ...props }: BottomSheetPanelProps): import("react").JSX.Element;
|
|
60
62
|
export declare namespace BottomSheetPanel {
|
|
61
63
|
var displayName: string;
|
|
62
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetPanel.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheetPanel.tsx"],"names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AmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACjD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3D,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACzD,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC7D;AA+GD,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,qBAA4B,EAC5B,kBAA0B,EAC1B,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,qBAAqB,+BAyRvB;yBA5Se,gBAAgB"}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file BottomSheetPanel.tsx
|
|
7
|
-
* @input Uses React, StyleX, theme tokens,
|
|
8
|
-
* @output Internal BottomSheetPanel
|
|
7
|
+
* @input Uses React, StyleX, theme tokens, sheet gestures, shared scroll behavior, and the host label
|
|
8
|
+
* @output Internal BottomSheetPanel with a keyboard-reachable scrolling body and motion-state types
|
|
9
9
|
* @position Shared presentation layer for standalone and switcher BottomSheets
|
|
10
10
|
*
|
|
11
11
|
* This component owns everything intrinsic to a sheet surface: height budgets,
|
|
12
12
|
* drag and snap gestures, the handle and scrolling body, motion styles, and
|
|
13
|
-
* transition completion. It
|
|
14
|
-
* state,
|
|
13
|
+
* transition completion. It owns the body's keyboard access; dialog focus
|
|
14
|
+
* entry/return, inert state, and switcher registration belong to the host.
|
|
15
15
|
*
|
|
16
16
|
* SYNC: When modified, update these files to stay in sync:
|
|
17
17
|
* - /packages/core/src/BottomSheet/BottomSheet.tsx
|
|
@@ -23,9 +23,11 @@
|
|
|
23
23
|
import { useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef } from 'react';
|
|
24
24
|
import * as stylex from '@stylexjs/stylex';
|
|
25
25
|
import { useDevWarning } from "../hooks/index.js";
|
|
26
|
+
import { useScrollableArea } from "../hooks/useScrollableArea.js";
|
|
26
27
|
import "../theme/tokens.stylex.js";
|
|
27
|
-
import { borderVars, colorVars, durationVars, easeVars, radiusVars, shadowVars, sizeVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
28
|
+
import { borderVars, colorVars, durationVars, easeVars, focusVars, radiusVars, shadowVars, sizeVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
28
29
|
import { mergeProps, themeProps } from "../utils/index.js";
|
|
30
|
+
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
29
31
|
import { overlayPaddingReset } from "../Layout/padding.stylex.js";
|
|
30
32
|
import { isValidSnapPoint, resolveSnapPoints } from "./snapOffsets.js";
|
|
31
33
|
import { useMobileKeyboard } from "./useMobileKeyboard.js";
|
|
@@ -120,6 +122,24 @@ const styles = {
|
|
|
120
122
|
kfzvcC: "x47corl",
|
|
121
123
|
$$css: true
|
|
122
124
|
},
|
|
125
|
+
body: {
|
|
126
|
+
kzQI83: "x1iyjqo2",
|
|
127
|
+
kAzted: "x2lwn1j",
|
|
128
|
+
kB7OPa: "x9f619",
|
|
129
|
+
kFalU9: "xx69xxh",
|
|
130
|
+
kInvED: "x1wfwxd8 x1nw7mhf",
|
|
131
|
+
kWkggS: "x10xzikg",
|
|
132
|
+
kGO01o: "x18d9i69",
|
|
133
|
+
$$css: true
|
|
134
|
+
},
|
|
135
|
+
tallKeyboardBody: {
|
|
136
|
+
kFlMNQ: "xrw9175",
|
|
137
|
+
k5JduY: "x1s928wv",
|
|
138
|
+
kc3QkE: "xhkezso",
|
|
139
|
+
k4zj60: "xu6fald",
|
|
140
|
+
kloYau: "x2q1x1w",
|
|
141
|
+
$$css: true
|
|
142
|
+
},
|
|
123
143
|
budget: {
|
|
124
144
|
kZKoxP: "x1tpcejd",
|
|
125
145
|
$$css: true
|
|
@@ -222,6 +242,7 @@ export function BottomSheetPanel({
|
|
|
222
242
|
ref,
|
|
223
243
|
state,
|
|
224
244
|
height,
|
|
245
|
+
label,
|
|
225
246
|
children,
|
|
226
247
|
snapPoints,
|
|
227
248
|
className,
|
|
@@ -312,6 +333,22 @@ export function BottomSheetPanel({
|
|
|
312
333
|
snapHeights,
|
|
313
334
|
onScrimOpacity
|
|
314
335
|
});
|
|
336
|
+
const {
|
|
337
|
+
getViewportProps,
|
|
338
|
+
getContentProps
|
|
339
|
+
} = useScrollableArea({
|
|
340
|
+
// The previous overflow-y:auto also computed overflow-x:auto. Keep wide
|
|
341
|
+
// content reachable instead of clipping that existing inline scroll path.
|
|
342
|
+
axis: 'both',
|
|
343
|
+
keyboardAccess: {
|
|
344
|
+
owner: 'contentOrViewport',
|
|
345
|
+
label
|
|
346
|
+
},
|
|
347
|
+
overscroll: 'contain',
|
|
348
|
+
// The sheet body deliberately remains the boundary for sheet-local sticky
|
|
349
|
+
// content while fitting, as it was before shared scroll adoption.
|
|
350
|
+
stickyContainment: 'always'
|
|
351
|
+
});
|
|
315
352
|
const setElement = useCallback(element => {
|
|
316
353
|
sheetRef(element);
|
|
317
354
|
elementRef.current = element;
|
|
@@ -438,20 +475,20 @@ export function BottomSheetPanel({
|
|
|
438
475
|
}
|
|
439
476
|
})
|
|
440
477
|
}), /*#__PURE__*/_jsx("div", {
|
|
441
|
-
...
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
478
|
+
...getViewportProps({
|
|
479
|
+
...bodyProps,
|
|
480
|
+
...mergeProps(stylex.props(focusOutlineStyles.focusVisible, styles.body, height === 'tall' && styles.tallKeyboardBody), scrollPreservationInset > 0 ? {
|
|
481
|
+
style: {
|
|
482
|
+
paddingBlockEnd: `${scrollPreservationInset}px`
|
|
483
|
+
}
|
|
484
|
+
} : {})
|
|
485
|
+
}),
|
|
486
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
487
|
+
...getContentProps({
|
|
488
|
+
className: "xufnvkl x9f619 x5yr21d x121v3j4"
|
|
489
|
+
}),
|
|
490
|
+
children: children
|
|
491
|
+
})
|
|
455
492
|
})]
|
|
456
493
|
});
|
|
457
494
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACz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,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KACnC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAuJD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAqB,EACrB,IAAI,EAAE,QAAQ,EACd,IAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,eAAuB,EACvB,WAAW,EACX,IAAI,EACJ,UAAkB,EAClB,KAAK,EACL,SAAkB,EAClB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,SAAS,CA8PzB;yBAvRe,MAAM"}
|
package/dist/Button/Button.js
CHANGED
|
@@ -24,6 +24,8 @@ import "../theme/tokens.stylex.js";
|
|
|
24
24
|
import { colorVars, sizeVars, spacingVars, radiusVars, borderVars, durationVars, easeVars, fontWeightVars, typeScaleVars, shadowVars, focusVars } from "../theme/tokens.stylex.js";
|
|
25
25
|
import { Spinner } from "../Spinner/index.js";
|
|
26
26
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
27
|
+
import { IconDefaultSizeProvider } from "../Icon/IconDefaultSizeContext.js";
|
|
28
|
+
import { iconBoxSizeStyles } from "../Icon/IconSize.stylex.js";
|
|
27
29
|
import { EDGE_COMP_ATTR } from "../Layout/edgeCompensation.stylex.js";
|
|
28
30
|
import { useSize } from "../SizeContext/SizeContext.js";
|
|
29
31
|
import { useButtonGroup } from "../ButtonGroup/ButtonGroupContext.js";
|
|
@@ -132,32 +134,6 @@ const sizeStyles = {
|
|
|
132
134
|
}
|
|
133
135
|
};
|
|
134
136
|
|
|
135
|
-
/**
|
|
136
|
-
* Icon size per button size.
|
|
137
|
-
* Matches Icon sizing: sm/md=16px, lg=20px.
|
|
138
|
-
* fontSize is set so emoji and text-based icons scale correctly.
|
|
139
|
-
*/
|
|
140
|
-
const iconSizeStyles = {
|
|
141
|
-
sm: {
|
|
142
|
-
kzqmXN: "x1kky2od",
|
|
143
|
-
kZKoxP: "xlup9mm",
|
|
144
|
-
kGuDYH: "x1j61zf2",
|
|
145
|
-
$$css: true
|
|
146
|
-
},
|
|
147
|
-
md: {
|
|
148
|
-
kzqmXN: "x1kky2od",
|
|
149
|
-
kZKoxP: "xlup9mm",
|
|
150
|
-
kGuDYH: "x1j61zf2",
|
|
151
|
-
$$css: true
|
|
152
|
-
},
|
|
153
|
-
lg: {
|
|
154
|
-
kzqmXN: "xw4jnvo",
|
|
155
|
-
kZKoxP: "x1qx5ct2",
|
|
156
|
-
kGuDYH: "xwsyq91",
|
|
157
|
-
$$css: true
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
|
|
161
137
|
/**
|
|
162
138
|
* Resting elevation for floating buttons (e.g. a FAB). `none` is the default
|
|
163
139
|
* flat button; `low`/`med`/`high` map to the shadow token scale. 'none' stays
|
|
@@ -221,6 +197,11 @@ const variants = {
|
|
|
221
197
|
* Button size type derived from the sizeStyles StyleX object
|
|
222
198
|
*/
|
|
223
199
|
|
|
200
|
+
const iconSizeByButtonSize = {
|
|
201
|
+
sm: 'sm',
|
|
202
|
+
md: 'sm',
|
|
203
|
+
lg: 'md'
|
|
204
|
+
};
|
|
224
205
|
const spinnerReveal = "x18re5ia-B";
|
|
225
206
|
const contentHide = "x188b6p3-B";
|
|
226
207
|
|
|
@@ -457,6 +438,7 @@ export function Button({
|
|
|
457
438
|
size,
|
|
458
439
|
elevation: buttonGroup ? 'none' : elevation
|
|
459
440
|
}), sharedStylexProps, className, style);
|
|
441
|
+
const iconSize = iconSizeByButtonSize[size];
|
|
460
442
|
const buttonContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
461
443
|
children: [isLoadingState && /*#__PURE__*/_jsx("span", {
|
|
462
444
|
...{
|
|
@@ -476,8 +458,11 @@ export function Button({
|
|
|
476
458
|
...stylex.props(styles.contentWrapper, isLoadingState && (delaySpinner ? loadingStyles.hiddenContentDelayed : loadingStyles.hiddenContent)),
|
|
477
459
|
"aria-hidden": isLoadingState || undefined,
|
|
478
460
|
children: [icon && /*#__PURE__*/_jsx("span", {
|
|
479
|
-
...stylex.props(styles.iconWrapper,
|
|
480
|
-
children:
|
|
461
|
+
...stylex.props(styles.iconWrapper, iconBoxSizeStyles[iconSize]),
|
|
462
|
+
children: /*#__PURE__*/_jsx(IconDefaultSizeProvider, {
|
|
463
|
+
value: iconSize,
|
|
464
|
+
children: icon
|
|
465
|
+
})
|
|
481
466
|
}), isIconOnly ? null : /*#__PURE__*/_jsx("span", {
|
|
482
467
|
...{
|
|
483
468
|
className: "xb3r6kr xlyipyv xeuugli"
|
|
@@ -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,KAAK,EAAC,SAAS,EA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AC,EAAE,mBAAmB,CAAC;IAC9B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAI3B,6GAA6G;IAC7G,MAAM,CAAC,EAAE,SAAS,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;AAmND;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAkNpD;yBAlNe,YAAY"}
|
|
@@ -150,14 +150,14 @@ export function ChatComposer(props) {
|
|
|
150
150
|
}
|
|
151
151
|
onChange?.(newValue);
|
|
152
152
|
}, [isControlled, onChange]);
|
|
153
|
-
const handleSubmit = useCallback(
|
|
154
|
-
const trimmed =
|
|
153
|
+
const handleSubmit = useCallback(value => {
|
|
154
|
+
const trimmed = value.trim();
|
|
155
155
|
if (!trimmed || isDisabled) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
onSubmit(trimmed);
|
|
159
159
|
updateValue('');
|
|
160
|
-
}, [
|
|
160
|
+
}, [isDisabled, onSubmit, updateValue]);
|
|
161
161
|
const canSend = currentValue.trim().length > 0 && !isDisabled;
|
|
162
162
|
const bodyRef = useRef(null);
|
|
163
163
|
|
|
@@ -289,8 +289,13 @@ export function ChatComposer(props) {
|
|
|
289
289
|
children: footerActions
|
|
290
290
|
}), /*#__PURE__*/_jsxs("div", {
|
|
291
291
|
...{
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
0: {
|
|
293
|
+
className: "x78zum5 x6s0dn4 xzye2dw"
|
|
294
|
+
},
|
|
295
|
+
1: {
|
|
296
|
+
className: "x78zum5 x6s0dn4 xzye2dw x67bb7w"
|
|
297
|
+
}
|
|
298
|
+
}[!!(isDisabled && isStopShown) << 0],
|
|
294
299
|
children: [sendActions, sendButton ?? /*#__PURE__*/_jsx(ChatSendButton, {})]
|
|
295
300
|
})]
|
|
296
301
|
})]
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
* @input Uses React, StyleX, theme tokens
|
|
4
4
|
* @output Exports ChatComposerDrawer component
|
|
5
5
|
* @position Collapsible drawer panel for ChatComposer.
|
|
6
|
-
* Supports expanded (full content) and collapsed (
|
|
7
|
-
* with fade animation and grid-template-rows height transition.
|
|
6
|
+
* Supports expanded (full content) and collapsed (default or caller-composed
|
|
7
|
+
* summary) states with fade animation and grid-template-rows height transition.
|
|
8
8
|
* The collapse toggle exposes aria-expanded + aria-controls linking it to
|
|
9
9
|
* the content region (disclosure pattern).
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update:
|
|
12
|
+
* - /packages/core/src/Chat/ChatComposerDrawer.test.tsx
|
|
13
|
+
* - /packages/core/src/Chat/ChatComposerDrawer.doc.mjs
|
|
14
|
+
* - /packages/core/src/Chat/ChatComposerDrawer.spec.md
|
|
15
|
+
* - /apps/storybook/stories/ChatComposerDrawer.stories.tsx
|
|
12
16
|
* - /packages/core/src/Chat/index.ts (exports)
|
|
13
17
|
* - /packages/cli/assets/templates/blocks/components/ChatComposerDrawer/ (block examples)
|
|
14
18
|
*/
|
|
@@ -27,10 +31,18 @@ export interface ChatComposerDrawerProps extends BaseProps<HTMLDivElement> {
|
|
|
27
31
|
*/
|
|
28
32
|
count?: number;
|
|
29
33
|
/**
|
|
30
|
-
* Label shown next to the count in collapsed
|
|
34
|
+
* Label shown next to the count in the default collapsed summary and used to
|
|
35
|
+
* name the expand/collapse action.
|
|
31
36
|
* @default 'Items'
|
|
32
37
|
*/
|
|
33
38
|
label?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Visual content for the canonical Collapsed summary anatomy part. Replaces
|
|
41
|
+
* the complete default Badge and label when count enables collapse. The
|
|
42
|
+
* component keeps this content presentation-only and owns disclosure
|
|
43
|
+
* semantics and accessible naming.
|
|
44
|
+
*/
|
|
45
|
+
collapsedSummary?: ReactNode;
|
|
34
46
|
/**
|
|
35
47
|
* Whether the drawer is collapsed.
|
|
36
48
|
* Uncontrolled by default (internal toggle).
|
|
@@ -52,7 +64,9 @@ export interface ChatComposerDrawerProps extends BaseProps<HTMLDivElement> {
|
|
|
52
64
|
* @example
|
|
53
65
|
* ```
|
|
54
66
|
* const styles = stylex.create({ wrapper: { marginTop: 8 } });
|
|
55
|
-
* <ChatComposerDrawer xstyle={styles.wrapper}
|
|
67
|
+
* <ChatComposerDrawer xstyle={styles.wrapper}>
|
|
68
|
+
* <AttachmentThumbnail />
|
|
69
|
+
* </ChatComposerDrawer>
|
|
56
70
|
* ```
|
|
57
71
|
*/
|
|
58
72
|
xstyle?: StyleXStyles;
|
|
@@ -72,7 +86,7 @@ export interface ChatComposerDrawerProps extends BaseProps<HTMLDivElement> {
|
|
|
72
86
|
* </ChatComposerDrawer>
|
|
73
87
|
* ```
|
|
74
88
|
*/
|
|
75
|
-
export declare function ChatComposerDrawer({ ref, children, count, label: labelFromProps, isCollapsed: controlledCollapsed, defaultIsCollapsed, onCollapsedChange, xstyle, className, style, 'data-testid': testId, ...htmlProps }: ChatComposerDrawerProps): React.ReactElement;
|
|
89
|
+
export declare function ChatComposerDrawer({ ref, children, count, label: labelFromProps, collapsedSummary, isCollapsed: controlledCollapsed, defaultIsCollapsed, onCollapsedChange, xstyle, className, style, 'data-testid': testId, ...htmlProps }: ChatComposerDrawerProps): React.ReactElement;
|
|
76
90
|
export declare namespace ChatComposerDrawer {
|
|
77
91
|
var displayName: string;
|
|
78
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposerDrawer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerDrawer.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"ChatComposerDrawer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerDrawer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAYnD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,uBAAwB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACxE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAEnD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAoID;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,QAAQ,EACR,KAAK,EACL,KAAK,EAAE,cAAc,EACrB,gBAAgB,EAChB,WAAW,EAAE,mBAAmB,EAChC,kBAA0B,EAC1B,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAyG9C;yBAvHe,kBAAkB"}
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
* @input Uses React, StyleX, theme tokens
|
|
8
8
|
* @output Exports ChatComposerDrawer component
|
|
9
9
|
* @position Collapsible drawer panel for ChatComposer.
|
|
10
|
-
* Supports expanded (full content) and collapsed (
|
|
11
|
-
* with fade animation and grid-template-rows height transition.
|
|
10
|
+
* Supports expanded (full content) and collapsed (default or caller-composed
|
|
11
|
+
* summary) states with fade animation and grid-template-rows height transition.
|
|
12
12
|
* The collapse toggle exposes aria-expanded + aria-controls linking it to
|
|
13
13
|
* the content region (disclosure pattern).
|
|
14
14
|
*
|
|
15
15
|
* SYNC: When modified, update:
|
|
16
|
+
* - /packages/core/src/Chat/ChatComposerDrawer.test.tsx
|
|
17
|
+
* - /packages/core/src/Chat/ChatComposerDrawer.doc.mjs
|
|
18
|
+
* - /packages/core/src/Chat/ChatComposerDrawer.spec.md
|
|
19
|
+
* - /apps/storybook/stories/ChatComposerDrawer.stories.tsx
|
|
16
20
|
* - /packages/core/src/Chat/index.ts (exports)
|
|
17
21
|
* - /packages/cli/assets/templates/blocks/components/ChatComposerDrawer/ (block examples)
|
|
18
22
|
*/
|
|
@@ -23,8 +27,9 @@ import { colorVars, spacingVars, radiusVars, durationVars, easeVars, typeScaleVa
|
|
|
23
27
|
import { Badge } from "../Badge/index.js";
|
|
24
28
|
import { mergeProps } from "../utils/index.js";
|
|
25
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
30
|
+
import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
26
31
|
import { useTranslator } from "../i18n/index.js";
|
|
27
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
33
|
const styles = {
|
|
29
34
|
root: {
|
|
30
35
|
kVAEAm: "x1n2onr6",
|
|
@@ -41,6 +46,20 @@ const styles = {
|
|
|
41
46
|
krdFHd: "x1n70msy",
|
|
42
47
|
kfmiAY: "xg0tfu",
|
|
43
48
|
$$css: true
|
|
49
|
+
},
|
|
50
|
+
toggleRow: {
|
|
51
|
+
k1xSpc: "xrvj5dj",
|
|
52
|
+
kumcoG: "x1y6fwsi",
|
|
53
|
+
kGNEyG: "x6s0dn4",
|
|
54
|
+
kZKoxP: "x1grt7ep",
|
|
55
|
+
kg3NbH: "x1pzlopt",
|
|
56
|
+
kUOVxO: "x1ng9b9t",
|
|
57
|
+
kkrTdU: "x1ypdohk x16khyan",
|
|
58
|
+
kfSwDN: "x87ps6o",
|
|
59
|
+
$$css: true
|
|
60
|
+
},
|
|
61
|
+
toggleCollapsed: {
|
|
62
|
+
$$css: true
|
|
44
63
|
}
|
|
45
64
|
};
|
|
46
65
|
|
|
@@ -61,6 +80,7 @@ export function ChatComposerDrawer({
|
|
|
61
80
|
children,
|
|
62
81
|
count,
|
|
63
82
|
label: labelFromProps,
|
|
83
|
+
collapsedSummary,
|
|
64
84
|
isCollapsed: controlledCollapsed,
|
|
65
85
|
defaultIsCollapsed = false,
|
|
66
86
|
onCollapsedChange,
|
|
@@ -97,14 +117,10 @@ export function ChatComposerDrawer({
|
|
|
97
117
|
}), stylex.props(styles.root, xstyle), className, style),
|
|
98
118
|
...htmlProps,
|
|
99
119
|
children: [canCollapse && /*#__PURE__*/_jsxs("div", {
|
|
100
|
-
...{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
1: {
|
|
105
|
-
className: "xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x16khyan x87ps6o x-default-marker"
|
|
106
|
-
}
|
|
107
|
-
}[!!isCollapsed << 0],
|
|
120
|
+
...focusOutlineProps.focusVisible(styles.toggleRow, isCollapsed && styles.toggleCollapsed, {
|
|
121
|
+
"x-default-marker": "x-default-marker",
|
|
122
|
+
$$css: true
|
|
123
|
+
}),
|
|
108
124
|
role: "button",
|
|
109
125
|
tabIndex: 0,
|
|
110
126
|
"aria-expanded": !isCollapsed,
|
|
@@ -121,24 +137,28 @@ export function ChatComposerDrawer({
|
|
|
121
137
|
toggle();
|
|
122
138
|
}
|
|
123
139
|
},
|
|
124
|
-
children: [/*#__PURE__*/
|
|
140
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
141
|
+
"aria-hidden": "true",
|
|
142
|
+
inert: true,
|
|
125
143
|
...{
|
|
126
144
|
0: {
|
|
127
|
-
className: "x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x1hc1fzr x19991ni xuedmi6 xlr8y92"
|
|
145
|
+
className: "x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x47corl x1grt7ep x1txdalj xjspbzw x1hc1fzr x19991ni xuedmi6 xlr8y92"
|
|
128
146
|
},
|
|
129
147
|
1: {
|
|
130
148
|
className: "x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x19991ni xuedmi6 xlr8y92 xg01cxk x47corl"
|
|
131
149
|
}
|
|
132
150
|
}[!!!isCollapsed << 0],
|
|
133
|
-
children:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
151
|
+
children: collapsedSummary === undefined ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
152
|
+
children: [/*#__PURE__*/_jsx(Badge, {
|
|
153
|
+
variant: "neutral",
|
|
154
|
+
label: count
|
|
155
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
156
|
+
...{
|
|
157
|
+
className: "xv1l7n4 x1t9gxa6 xjm74w1 x7acx1w xt3l3uh xuedmi6 xlr8y92"
|
|
158
|
+
},
|
|
159
|
+
children: label
|
|
160
|
+
})]
|
|
161
|
+
}) : collapsedSummary
|
|
142
162
|
}), /*#__PURE__*/_jsx("div", {
|
|
143
163
|
...{
|
|
144
164
|
0: {
|
|
@@ -150,7 +170,12 @@ export function ChatComposerDrawer({
|
|
|
150
170
|
}[!!isCollapsed << 0]
|
|
151
171
|
})]
|
|
152
172
|
}), /*#__PURE__*/_jsx("div", {
|
|
153
|
-
id: contentId
|
|
173
|
+
id: contentId
|
|
174
|
+
// The 0fr row keeps the collapse animation in place. `inert` also
|
|
175
|
+
// removes visually hidden descendants from keyboard and assistive-
|
|
176
|
+
// technology navigation until the drawer expands again.
|
|
177
|
+
,
|
|
178
|
+
inert: canCollapse && isCollapsed ? true : undefined,
|
|
154
179
|
...{
|
|
155
180
|
0: {
|
|
156
181
|
className: "xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"
|