@astryxdesign/core 0.7.6-canary.d29d841 → 0.7.6-canary.d4b2d76
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/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +0 -6
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +1 -1
- package/dist/BottomSheet/useMobileKeyboard.d.ts.map +1 -1
- package/dist/BottomSheet/useMobileKeyboard.js +44 -8
- package/dist/Center/Center.d.ts +1 -1
- package/dist/Center/Center.js +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.js +1 -1
- package/dist/Chat/ChatComposerInput.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.js +1 -1
- package/dist/Code/Code.d.ts +1 -1
- package/dist/Code/Code.js +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +24 -5
- package/dist/ComplexSelector/ComplexSelector.d.ts +2 -2
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +1 -2
- 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/DateInput/DateInput.d.ts +3 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts +3 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/Drawer/Drawer.d.ts +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +5 -3
- 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/Field.d.ts +2 -2
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/fieldStatusPlacement.d.ts +15 -0
- package/dist/Field/fieldStatusPlacement.d.ts.map +1 -0
- package/dist/Field/fieldStatusPlacement.js +1 -0
- 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 +13 -28
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +24 -3
- package/dist/FieldStatus/index.d.ts +7 -0
- package/dist/FieldStatus/index.d.ts.map +1 -1
- package/dist/FileInput/FileInput.d.ts +7 -2
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- 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/MultiSelector/MultiSelector.d.ts +2 -2
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +1 -2
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +4 -2
- package/dist/NumberInput/NumberInput.d.ts +3 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +2 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts +3 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +4 -2
- 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/Selector/Selector.d.ts +3 -3
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +1 -1
- package/dist/SideNav/railMotion.d.ts +5 -5
- package/dist/SideNav/railMotion.d.ts.map +1 -1
- package/dist/SideNav/railMotion.js +69 -177
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +7 -6
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/TextArea/TextArea.d.ts +2 -2
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextInput/TextInput.d.ts +3 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.d.ts +3 -2
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/Timer/Timer.js +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +3 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +2 -0
- 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 +12 -5
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +8 -3
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +1 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +4 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +6 -3
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +4 -3
- 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 +13 -8
- 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 +3 -0
- package/dist/hooks/useInputStatusIcon.d.ts +2 -2
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +1 -2
- package/dist/hooks/useListFocus.d.ts +8 -0
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +9 -3
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +13 -5
- package/dist/hooks/useTypeahead.d.ts +3 -1
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +21 -15
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +6 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +6 -0
- package/dist/motion/animatedLayout.d.ts +130 -5
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +771 -44
- package/dist/utils/getNodeText.d.ts.map +1 -1
- package/dist/utils/getNodeText.js +2 -1
- package/dist/utils/typeaheadMatch.d.ts +24 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -0
- package/dist/utils/typeaheadMatch.js +112 -0
- package/locales/en.json +25 -1
- package/locales/pseudo.json +18 -0
- package/package.json +4 -4
- package/src/AppShell/AppShell.tsx +0 -9
- package/src/BottomSheet/BottomSheetSwitcher.tsx +1 -1
- package/src/BottomSheet/useMobileKeyboard.ts +51 -10
- package/src/Center/Center.tsx +1 -1
- package/src/Chat/ChatComposerDrawer.tsx +1 -1
- package/src/Chat/ChatComposerInput.tsx +1 -1
- package/src/Code/Code.tsx +1 -1
- package/src/CodeBlock/CodeBlock.tsx +6 -2
- package/src/ComplexSelector/ComplexSelector.tsx +3 -2
- package/src/ContextMenu/ContextMenu.tsx +30 -6
- package/src/DateInput/DateInput.tsx +2 -2
- package/src/DateRangeInput/DateRangeInput.tsx +2 -2
- package/src/Drawer/Drawer.tsx +1 -1
- package/src/DropdownMenu/DropdownMenu.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenu.tsx +4 -4
- 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/Field.tsx +2 -2
- package/src/Field/fieldStatusPlacement.ts +18 -0
- package/src/Field/inputDisabledFocus.ts +15 -1
- package/src/FieldStatus/FieldStatus.tsx +26 -3
- package/src/FieldStatus/index.ts +7 -0
- package/src/FileInput/FileInput.doc.mjs +3 -3
- package/src/FileInput/FileInput.tsx +8 -10
- package/src/Layer/useLayer.tsx +23 -4
- package/src/MultiSelector/MultiSelector.tsx +2 -2
- package/src/MultiSelector/hooks.ts +7 -5
- package/src/NumberInput/NumberInput.tsx +2 -2
- package/src/OverflowList/OverflowList.tsx +2 -1
- package/src/Pagination/Pagination.tsx +1 -0
- package/src/PowerSearch/PowerSearch.tsx +4 -2
- package/src/Resizable/resizableModel.ts +364 -0
- package/src/Resizable/useResizable.ts +17 -348
- package/src/Selector/Selector.tsx +3 -3
- package/src/SideNav/railMotion.ts +73 -179
- package/src/Table/BaseTable.tsx +10 -6
- package/src/Table/plugins/sortable/useTableSortable.tsx +2 -0
- package/src/TextArea/TextArea.tsx +3 -2
- package/src/TextInput/TextInput.tsx +2 -2
- package/src/TimeInput/TimeInput.tsx +2 -2
- package/src/Timer/Timer.tsx +1 -1
- package/src/ToggleButton/ToggleButton.tsx +1 -0
- package/src/Token/Token.tsx +2 -0
- package/src/Token/TokenLink.tsx +16 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +4 -3
- package/src/Tokenizer/Tokenizer.tsx +19 -6
- package/src/Tokenizer/TokenizerBottomSheet.tsx +1 -1
- package/src/TopNav/TopNavMegaMenu.tsx +4 -3
- package/src/TreeList/TreeList.tsx +6 -3
- package/src/TreeList/TreeListItem.tsx +5 -3
- package/src/Typeahead/BaseTypeahead.tsx +32 -4
- package/src/Typeahead/Typeahead.doc.mjs +3 -2
- package/src/Typeahead/Typeahead.tsx +19 -13
- package/src/hooks/useInputStatusIcon.tsx +2 -2
- package/src/hooks/useListFocus.ts +16 -2
- package/src/hooks/useTreeFocus.doc.mjs +2 -2
- package/src/hooks/useTreeFocus.ts +16 -10
- package/src/hooks/useTypeahead.doc.mjs +2 -2
- package/src/hooks/useTypeahead.ts +21 -20
- package/src/i18n/generated-locales/en.generated.ts +8 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +8 -0
- package/src/motion/animatedLayout.ts +977 -45
- package/src/utils/getNodeText.ts +2 -1
- package/src/utils/typeaheadMatch.ts +141 -0
- package/src/AlertDialog/AlertDialog.spec.md +0 -259
- package/src/AppShell/AppShell.spec.md +0 -331
- package/src/AspectRatio/AspectRatio.spec.md +0 -179
- package/src/Avatar/Avatar.spec.md +0 -253
- package/src/Avatar/AvatarStatusDot.spec.md +0 -208
- package/src/AvatarGroup/AvatarGroup.spec.md +0 -205
- package/src/AvatarGroup/AvatarGroupOverflow.spec.md +0 -210
- package/src/Badge/Badge.spec.md +0 -207
- package/src/Banner/Banner.spec.md +0 -282
- package/src/Blockquote/Blockquote.spec.md +0 -171
- package/src/BottomSheet/BottomSheet.spec.md +0 -457
- package/src/BottomSheet/BottomSheetSwitcher.spec.md +0 -367
- package/src/Breadcrumbs/BreadcrumbItem.spec.md +0 -269
- package/src/Breadcrumbs/Breadcrumbs.spec.md +0 -165
- package/src/Button/Button.spec.md +0 -322
- package/src/ButtonGroup/ButtonGroup.spec.md +0 -220
- package/src/Calendar/Calendar.spec.md +0 -248
- package/src/Card/Card.spec.md +0 -205
- package/src/Carousel/Carousel.spec.md +0 -146
- package/src/Center/Center.spec.md +0 -205
- package/src/Chat/ChatComposer.spec.md +0 -246
- package/src/Chat/ChatComposerDrawer.spec.md +0 -267
- package/src/Chat/ChatComposerInput.spec.md +0 -224
- package/src/Chat/ChatComposerTokenElement.spec.md +0 -164
- package/src/Chat/ChatDictationButton.spec.md +0 -205
- package/src/Chat/ChatLayout.spec.md +0 -276
- package/src/Chat/ChatLayoutScrollButton.spec.md +0 -322
- package/src/Chat/ChatMessage.spec.md +0 -264
- package/src/Chat/ChatMessageBubble.spec.md +0 -263
- package/src/Chat/ChatMessageList.spec.md +0 -222
- package/src/Chat/ChatMessageMetadata.spec.md +0 -220
- package/src/Chat/ChatSendButton.spec.md +0 -238
- package/src/Chat/ChatSystemMessage.spec.md +0 -224
- package/src/Chat/ChatTokenizedText.spec.md +0 -190
- package/src/Chat/ChatToolCalls.spec.md +0 -194
- package/src/CheckboxInput/CheckboxInput.spec.md +0 -218
- package/src/CheckboxList/CheckboxList.spec.md +0 -332
- package/src/CheckboxList/CheckboxListItem.spec.md +0 -302
- package/src/Citation/Citation.spec.md +0 -192
- package/src/ClickableCard/ClickableCard.spec.md +0 -241
- package/src/Code/Code.spec.md +0 -170
- package/src/CodeBlock/CodeBlock.spec.md +0 -243
- package/src/Collapsible/Collapsible.spec.md +0 -247
- package/src/Collapsible/CollapsibleGroup.spec.md +0 -229
- package/src/CommandPalette/CommandPalette.spec.md +0 -278
- package/src/CommandPalette/CommandPaletteEmpty.spec.md +0 -190
- package/src/CommandPalette/CommandPaletteInput.spec.md +0 -215
- package/src/CommandPalette/CommandPaletteItem.spec.md +0 -223
- package/src/CommandPalette/CommandPaletteList.spec.md +0 -194
- package/src/ComplexSelector/ComplexSelector.spec.md +0 -266
- package/src/ContextMenu/ContextMenu.spec.md +0 -279
- package/src/ContextMenu/ContextMenuItem.spec.md +0 -132
- package/src/DateInput/DateInput.spec.md +0 -336
- package/src/DateRangeInput/DateRangeInput.spec.md +0 -203
- package/src/DateTimeInput/DateTimeInput.spec.md +0 -270
- package/src/Dialog/Dialog.spec.md +0 -189
- package/src/Dialog/modules/DialogHeader.spec.md +0 -211
- package/src/Divider/Divider.spec.md +0 -252
- package/src/Drawer/Drawer.spec.md +0 -388
- package/src/Drawer/DrawerHeader.spec.md +0 -181
- package/src/DropdownMenu/DropdownMenu.spec.md +0 -562
- package/src/DropdownMenu/DropdownMenuCheckboxItem.spec.md +0 -192
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +0 -186
- package/src/DropdownMenu/DropdownMenuGroup.spec.md +0 -145
- package/src/DropdownMenu/DropdownMenuItem.spec.md +0 -215
- package/src/DropdownMenu/DropdownMenuRadioGroup.spec.md +0 -187
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +0 -227
- package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +0 -231
- package/src/DropdownMenu/modules/useMenuHover.spec.md +0 -283
- package/src/DropdownMenu/modules/useMenuPress.spec.md +0 -348
- package/src/EmptyState/EmptyState.spec.md +0 -203
- package/src/Field/Field.spec.md +0 -226
- package/src/Field/FieldLabel.spec.md +0 -200
- package/src/FieldStatus/FieldStatus.spec.md +0 -224
- package/src/FileInput/FileInput.spec.md +0 -199
- package/src/FormLayout/FormLayout.spec.md +0 -201
- package/src/Grid/Grid.spec.md +0 -193
- package/src/Grid/GridSpan.spec.md +0 -158
- package/src/Heading/Heading.spec.md +0 -198
- package/src/HoverCard/HoverCard.spec.md +0 -303
- package/src/Icon/Icon.spec.md +0 -244
- package/src/IconButton/IconButton.spec.md +0 -197
- package/src/Indicator/CheckIndicator.spec.md +0 -164
- package/src/Indicator/CheckboxIndicator.spec.md +0 -164
- package/src/Indicator/Indicator.spec.md +0 -188
- package/src/InfoTip/InfoTip.spec.md +0 -193
- package/src/InputGroup/InputGroup.spec.md +0 -199
- package/src/InputGroup/InputGroupText.spec.md +0 -139
- package/src/Item/Item.spec.md +0 -226
- package/src/Kbd/Kbd.spec.md +0 -185
- package/src/Layer/LayerProvider.spec.md +0 -149
- package/src/Layout/Layout.spec.md +0 -243
- package/src/Layout/LayoutContent.spec.md +0 -205
- package/src/Layout/LayoutFooter.spec.md +0 -190
- package/src/Layout/LayoutHeader.spec.md +0 -193
- package/src/Layout/LayoutPanel.spec.md +0 -216
- package/src/Lightbox/Lightbox.spec.md +0 -387
- package/src/Link/Link.spec.md +0 -230
- package/src/Link/LinkProvider.spec.md +0 -167
- package/src/List/List.spec.md +0 -336
- package/src/List/ListItem.spec.md +0 -205
- package/src/Markdown/Markdown.spec.md +0 -595
- package/src/Markdown/modules/headingLinks.spec.md +0 -262
- package/src/Markdown/modules/remark.spec.md +0 -269
- package/src/Markdown/modules/softBreaks.spec.md +0 -137
- package/src/Markdown/modules/sourceLines.spec.md +0 -162
- package/src/MetadataList/MetadataList.spec.md +0 -187
- package/src/MetadataList/MetadataListItem.spec.md +0 -165
- package/src/MobileNav/MobileNav.spec.md +0 -306
- package/src/MoreMenu/MoreMenu.spec.md +0 -268
- package/src/MultiSelector/MultiSelector.spec.md +0 -364
- package/src/NavIcon/NavIcon.spec.md +0 -158
- package/src/NavMenu/NavHeadingMenu.spec.md +0 -264
- package/src/NumberInput/NumberInput.spec.md +0 -270
- package/src/Outline/Outline.spec.md +0 -258
- package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +0 -150
- package/src/OverflowList/OverflowList.spec.md +0 -204
- package/src/Overlay/Overlay.spec.md +0 -304
- package/src/Pagination/Pagination.spec.md +0 -300
- package/src/Popover/Popover.spec.md +0 -525
- package/src/PowerSearch/PowerSearch.spec.md +0 -661
- package/src/ProgressBar/ProgressBar.spec.md +0 -285
- package/src/RadioList/RadioList.spec.md +0 -227
- package/src/RadioList/RadioListItem.spec.md +0 -223
- package/src/Resizable/Resizable.spec.md +0 -306
- package/src/ScrollableArea/ScrollableArea.spec.md +0 -190
- package/src/ScrollableArea/modules/useScrollableArea.spec.md +0 -149
- package/src/Section/Section.spec.md +0 -197
- package/src/SegmentedControl/SegmentedControl.spec.md +0 -258
- package/src/SegmentedControl/SegmentedControlItem.spec.md +0 -206
- package/src/SelectableCard/SelectableCard.spec.md +0 -230
- package/src/Selector/Selector.spec.md +0 -379
- package/src/SideNav/SideNav.spec.md +0 -247
- package/src/SideNav/SideNavCollapseButton.spec.md +0 -161
- package/src/SideNav/SideNavHeading.spec.md +0 -226
- package/src/SideNav/SideNavItem.spec.md +0 -236
- package/src/SideNav/SideNavSection.spec.md +0 -153
- package/src/Skeleton/Skeleton.spec.md +0 -184
- package/src/Slider/Slider.spec.md +0 -287
- package/src/Spinner/Spinner.spec.md +0 -231
- package/src/Stack/Stack.spec.md +0 -203
- package/src/StatusDot/StatusDot.spec.md +0 -247
- package/src/Stepper/Step.spec.md +0 -200
- package/src/Stepper/Stepper.spec.md +0 -327
- package/src/Switch/Switch.spec.md +0 -277
- package/src/TabList/Tab.spec.md +0 -201
- package/src/TabList/TabList.spec.md +0 -217
- package/src/TabList/TabMenu.spec.md +0 -198
- package/src/Table/Table.spec.md +0 -395
- package/src/Table/plugins/activation/useTableActivation.spec.md +0 -254
- package/src/Table/plugins/columnResize/useTableColumnResize.spec.md +0 -373
- package/src/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md +0 -244
- package/src/Table/plugins/rowStatus/useTableRowStatus.spec.md +0 -355
- package/src/Table/plugins/virtualization/useTableVirtualization.spec.md +0 -266
- package/src/Text/Text.spec.md +0 -193
- package/src/TextArea/TextArea.spec.md +0 -300
- package/src/TextInput/TextInput.spec.md +0 -260
- package/src/Thumbnail/Thumbnail.spec.md +0 -244
- package/src/TimeInput/TimeInput.spec.md +0 -270
- package/src/Timer/Timer.spec.md +0 -215
- package/src/Timestamp/Timestamp.spec.md +0 -246
- package/src/Toast/Toast.spec.md +0 -291
- package/src/ToggleButton/ToggleButton.spec.md +0 -256
- package/src/ToggleButton/ToggleButtonGroup.spec.md +0 -195
- package/src/Token/Token.spec.md +0 -262
- package/src/Tokenizer/Tokenizer.spec.md +0 -615
- package/src/Toolbar/Toolbar.spec.md +0 -227
- package/src/Tooltip/Tooltip.spec.md +0 -365
- package/src/TopNav/TopNav.spec.md +0 -190
- package/src/TopNav/TopNavHeading.spec.md +0 -211
- package/src/TopNav/TopNavItem.spec.md +0 -189
- package/src/TopNav/TopNavMegaMenu.spec.md +0 -190
- package/src/TopNav/TopNavMegaMenuFeaturedCard.spec.md +0 -150
- package/src/TopNav/TopNavMegaMenuItem.spec.md +0 -155
- package/src/TopNav/TopNavMenu.spec.md +0 -202
- package/src/TreeList/TreeList.spec.md +0 -328
- package/src/Typeahead/BaseTypeahead.spec.md +0 -270
- package/src/Typeahead/Typeahead.spec.md +0 -257
- package/src/VisuallyHidden/VisuallyHidden.spec.md +0 -170
- package/src/i18n/InternationalizationProvider.spec.md +0 -252
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiCf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB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;OAMG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,eAAe,GAAG,SAAS,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAuOD,wBAAgB,QAAQ,CAAC,EACvB,OAAoB,EACpB,MAAM,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBAowBf;yBAnxBe,QAAQ"}
|
|
@@ -416,12 +416,6 @@ export function AppShell({
|
|
|
416
416
|
isMainScrollRegionRef.current = isMainScrollRegion;
|
|
417
417
|
syncMainDelegation();
|
|
418
418
|
}, [isMainScrollRegion, syncMainDelegation]);
|
|
419
|
-
useEffect(() => () => {
|
|
420
|
-
mainOverflowRef.current?.stop();
|
|
421
|
-
mainOverflowRef.current = null;
|
|
422
|
-
mainDelegationRef.current?.release();
|
|
423
|
-
mainDelegationRef.current = null;
|
|
424
|
-
}, []);
|
|
425
419
|
|
|
426
420
|
// Nav style derived values
|
|
427
421
|
const hasBanner = isRenderable(banner);
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* - /packages/core/src/BottomSheet/BottomSheetStacking.test.tsx
|
|
64
64
|
* - /packages/core/src/BottomSheet/BottomSheetSwitcherContext.ts
|
|
65
65
|
* - /packages/core/src/BottomSheet/BottomSheetSwitcher.doc.mjs
|
|
66
|
-
* - /
|
|
66
|
+
* - /docs/specs/components/BottomSheet/BottomSheetSwitcher.spec.md
|
|
67
67
|
* - /packages/core/src/BottomSheet/BottomSheetSwitcher.test.tsx
|
|
68
68
|
* - /packages/core/src/BottomSheet/index.ts
|
|
69
69
|
* - /apps/storybook/stories/BottomSheetSwitcher.stories.tsx
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
* - /packages/core/src/BottomSheet/BottomSheetStacking.test.tsx
|
|
68
68
|
* - /packages/core/src/BottomSheet/BottomSheetSwitcherContext.ts
|
|
69
69
|
* - /packages/core/src/BottomSheet/BottomSheetSwitcher.doc.mjs
|
|
70
|
-
* - /
|
|
70
|
+
* - /docs/specs/components/BottomSheet/BottomSheetSwitcher.spec.md
|
|
71
71
|
* - /packages/core/src/BottomSheet/BottomSheetSwitcher.test.tsx
|
|
72
72
|
* - /packages/core/src/BottomSheet/index.ts
|
|
73
73
|
* - /apps/storybook/stories/BottomSheetSwitcher.stories.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMobileKeyboard.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/useMobileKeyboard.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAgBxD,UAAU,wBAAwB;IAChC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC5C;AA8DD,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,eAAe,EACf,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,QAAQ,GACT,EAAE,wBAAwB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"useMobileKeyboard.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/useMobileKeyboard.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAgBxD,UAAU,wBAAwB;IAChC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC5C;AA8DD,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,eAAe,EACf,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,QAAQ,GACT,EAAE,wBAAwB,GAAG,IAAI,CAgajC"}
|
|
@@ -110,11 +110,18 @@ export function useMobileKeyboard({
|
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
let keyboardGeometry = null;
|
|
113
|
+
let keyboardObstructionTop = null;
|
|
114
|
+
let bodyScrollTopAtKeyboard = null;
|
|
113
115
|
let documentScrollAtKeyboard = null;
|
|
114
116
|
const ownsFocusTransitions = isIOSWebKit();
|
|
115
117
|
const clearKeyboardLayout = () => {
|
|
116
118
|
body.style.setProperty(MOBILE_KEYBOARD_INSET_VAR, '0px');
|
|
119
|
+
if (bodyScrollTopAtKeyboard != null) {
|
|
120
|
+
body.scrollTop = bodyScrollTopAtKeyboard;
|
|
121
|
+
}
|
|
117
122
|
keyboardGeometry = null;
|
|
123
|
+
keyboardObstructionTop = null;
|
|
124
|
+
bodyScrollTopAtKeyboard = null;
|
|
118
125
|
documentScrollAtKeyboard = null;
|
|
119
126
|
hasKeyboardLayoutRef.current = false;
|
|
120
127
|
retainKeyboardLayoutRef.current = false;
|
|
@@ -214,8 +221,23 @@ export function useMobileKeyboard({
|
|
|
214
221
|
}
|
|
215
222
|
};
|
|
216
223
|
const revealFocusedControl = () => {
|
|
224
|
+
const obstructionTop = getObstructionTop();
|
|
217
225
|
const activeElement = document.activeElement;
|
|
218
|
-
|
|
226
|
+
const focusedControl = activeElement instanceof HTMLElement && body.contains(activeElement) && isTextEntryControl(activeElement) ? activeElement : null;
|
|
227
|
+
// The keyboard may close while the text field remains focused (for
|
|
228
|
+
// example, a downward keyboard dismissal gesture on iOS). Run the full
|
|
229
|
+
// cleanup path so the temporary spacer and the body scroll it enabled
|
|
230
|
+
// are both restored. Then reveal the still-focused control against the
|
|
231
|
+
// recovered sheet, because it may not be the field that opened the
|
|
232
|
+
// keyboard and therefore may sit outside the restored scroll position.
|
|
233
|
+
if (hasKeyboardLayoutRef.current && isVisualViewportRecovered()) {
|
|
234
|
+
clearKeyboardLayout();
|
|
235
|
+
if (isFullyExpandedRef.current && focusedControl) {
|
|
236
|
+
scrollControlIntoSafeArea(focusedControl, false);
|
|
237
|
+
}
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (!isFullyExpandedRef.current || focusedControl == null) {
|
|
219
241
|
if (retainKeyboardLayoutRef.current && keyboardGeometry) {
|
|
220
242
|
applyKeyboardGeometry(keyboardGeometry);
|
|
221
243
|
return;
|
|
@@ -223,9 +245,19 @@ export function useMobileKeyboard({
|
|
|
223
245
|
clearKeyboardLayout();
|
|
224
246
|
return;
|
|
225
247
|
}
|
|
248
|
+
|
|
249
|
+
// An interactively dismissed iOS keyboard can leave the accessory bar
|
|
250
|
+
// visible, so the visual viewport grows without reaching full height.
|
|
251
|
+
// Restore the pre-keyboard body position as soon as that recovery starts;
|
|
252
|
+
// the ordinary safe-area pass below may still scroll a low focused field
|
|
253
|
+
// just enough for whatever obstruction remains. Advance the remembered
|
|
254
|
+
// obstruction so later content mutations do not repeat this recovery.
|
|
255
|
+
if (hasKeyboardLayoutRef.current && keyboardObstructionTop != null && obstructionTop > keyboardObstructionTop + 0.5 && bodyScrollTopAtKeyboard != null) {
|
|
256
|
+
body.scrollTop = bodyScrollTopAtKeyboard;
|
|
257
|
+
keyboardObstructionTop = obstructionTop;
|
|
258
|
+
}
|
|
226
259
|
retainKeyboardLayoutRef.current = false;
|
|
227
260
|
const measuredBodyRect = body.getBoundingClientRect();
|
|
228
|
-
const obstructionTop = getObstructionTop();
|
|
229
261
|
const overlap = Math.max(0, measuredBodyRect.bottom - obstructionTop);
|
|
230
262
|
// The extra clearance leaves room for mobile suggestion UI, but only
|
|
231
263
|
// while the visual viewport actually overlaps the sheet. With no
|
|
@@ -239,16 +271,20 @@ export function useMobileKeyboard({
|
|
|
239
271
|
// the position handleDocumentScroll returns to. Captured on the
|
|
240
272
|
// transition only — a reveal that runs after the browser has already
|
|
241
273
|
// scrolled would otherwise record the shifted position as correct.
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
274
|
+
if (overlap > 0 && !hasKeyboardLayoutRef.current) {
|
|
275
|
+
keyboardObstructionTop = obstructionTop;
|
|
276
|
+
bodyScrollTopAtKeyboard = body.scrollTop;
|
|
277
|
+
if (isPageScrollLocked) {
|
|
278
|
+
documentScrollAtKeyboard = {
|
|
279
|
+
x: window.scrollX,
|
|
280
|
+
y: window.scrollY
|
|
281
|
+
};
|
|
282
|
+
}
|
|
247
283
|
}
|
|
248
284
|
hasKeyboardLayoutRef.current = overlap > 0;
|
|
249
285
|
const inset = overlap > 0 ? Math.max(0, measuredBodyRect.bottom - (obstructionTop - clearance)) : 0;
|
|
250
286
|
body.style.setProperty(MOBILE_KEYBOARD_INSET_VAR, `${inset}px`);
|
|
251
|
-
scrollControlIntoSafeArea(
|
|
287
|
+
scrollControlIntoSafeArea(focusedControl, overlap > 0);
|
|
252
288
|
};
|
|
253
289
|
let animationFrame = 0;
|
|
254
290
|
const scheduleReveal = () => {
|
package/dist/Center/Center.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update these files to stay in sync:
|
|
8
8
|
* - /packages/core/src/Center/Center.doc.mjs
|
|
9
|
-
* - /
|
|
9
|
+
* - /docs/specs/components/Center/Center.spec.md
|
|
10
10
|
* - /packages/core/src/Center/Center.test.tsx
|
|
11
11
|
* - /apps/storybook/stories/Center.stories.tsx
|
|
12
12
|
* - /packages/cli/assets/templates/blocks/components/Center/ (showcase blocks)
|
package/dist/Center/Center.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* SYNC: When modified, update these files to stay in sync:
|
|
10
10
|
* - /packages/core/src/Center/Center.doc.mjs
|
|
11
|
-
* - /
|
|
11
|
+
* - /docs/specs/components/Center/Center.spec.md
|
|
12
12
|
* - /packages/core/src/Center/Center.test.tsx
|
|
13
13
|
* - /apps/storybook/stories/Center.stories.tsx
|
|
14
14
|
* - /packages/cli/assets/templates/blocks/components/Center/ (showcase blocks)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* SYNC: When modified, update:
|
|
12
12
|
* - /packages/core/src/Chat/ChatComposerDrawer.test.tsx
|
|
13
13
|
* - /packages/core/src/Chat/ChatComposerDrawer.doc.mjs
|
|
14
|
-
* - /
|
|
14
|
+
* - /docs/specs/components/Chat/ChatComposerDrawer.spec.md
|
|
15
15
|
* - /apps/storybook/stories/ChatComposerDrawer.stories.tsx
|
|
16
16
|
* - /packages/core/src/Chat/index.ts (exports)
|
|
17
17
|
* - /packages/cli/assets/templates/blocks/components/ChatComposerDrawer/ (block examples)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* SYNC: When modified, update:
|
|
16
16
|
* - /packages/core/src/Chat/ChatComposerDrawer.test.tsx
|
|
17
17
|
* - /packages/core/src/Chat/ChatComposerDrawer.doc.mjs
|
|
18
|
-
* - /
|
|
18
|
+
* - /docs/specs/components/Chat/ChatComposerDrawer.spec.md
|
|
19
19
|
* - /apps/storybook/stories/ChatComposerDrawer.stories.tsx
|
|
20
20
|
* - /packages/core/src/Chat/index.ts (exports)
|
|
21
21
|
* - /packages/cli/assets/templates/blocks/components/ChatComposerDrawer/ (block examples)
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* SYNC: When modified, update:
|
|
17
17
|
* - /packages/core/src/Chat/ChatComposerInput.test.tsx
|
|
18
18
|
* - /packages/core/src/Chat/ChatComposerInput.doc.mjs
|
|
19
|
-
* - /
|
|
19
|
+
* - /docs/specs/components/Chat/ChatComposerInput.spec.md
|
|
20
20
|
* - /apps/storybook/stories/ChatComposerInput.stories.tsx
|
|
21
21
|
* - /packages/core/src/Chat/index.ts
|
|
22
22
|
* - /apps/storybook/stories/ChatComposer.stories.tsx
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* SYNC: When modified, update:
|
|
21
21
|
* - /packages/core/src/Chat/ChatComposerInput.test.tsx
|
|
22
22
|
* - /packages/core/src/Chat/ChatComposerInput.doc.mjs
|
|
23
|
-
* - /
|
|
23
|
+
* - /docs/specs/components/Chat/ChatComposerInput.spec.md
|
|
24
24
|
* - /apps/storybook/stories/ChatComposerInput.stories.tsx
|
|
25
25
|
* - /packages/core/src/Chat/index.ts
|
|
26
26
|
* - /apps/storybook/stories/ChatComposer.stories.tsx
|
package/dist/Code/Code.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update:
|
|
8
8
|
* - /packages/core/src/Code/Code.doc.mjs (consumer API and theming metadata)
|
|
9
|
-
* - /
|
|
9
|
+
* - /docs/specs/components/Code/Code.spec.md (behavior and verification map)
|
|
10
10
|
* - /packages/core/src/CodeBlock/index.ts (compatibility re-exports if types change)
|
|
11
11
|
* - /packages/cli/assets/templates/blocks/components/Code/ (showcase blocks)
|
|
12
12
|
* - /packages/cli/assets/templates/blocks/components/CodeBlock/ (showcase blocks)
|
package/dist/Code/Code.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* SYNC: When modified, update:
|
|
10
10
|
* - /packages/core/src/Code/Code.doc.mjs (consumer API and theming metadata)
|
|
11
|
-
* - /
|
|
11
|
+
* - /docs/specs/components/Code/Code.spec.md (behavior and verification map)
|
|
12
12
|
* - /packages/core/src/CodeBlock/index.ts (compatibility re-exports if types change)
|
|
13
13
|
* - /packages/cli/assets/templates/blocks/components/Code/ (showcase blocks)
|
|
14
14
|
* - /packages/cli/assets/templates/blocks/components/CodeBlock/ (showcase blocks)
|
|
@@ -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,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;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,KACb;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAClD,aAAa,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",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
import React, { type ReactNode } from 'react';
|
|
15
15
|
import type { StyleXStyles } from '@stylexjs/stylex';
|
|
16
16
|
import { type FieldInputBaseProps, type FieldPartStyleProps } from '../Field/fieldParts.js';
|
|
17
|
-
import { type FieldStatusVariant } from '../Field/index.js';
|
|
18
17
|
import { type IconType } from '../Icon/index.js';
|
|
19
18
|
import type { LayerAlignment, LayerPlacement } from '../Layer/useLayer.js';
|
|
20
19
|
import type { SizeValue } from '../utils/types.js';
|
|
20
|
+
import type { FieldStatusPlacement } from '../Field/fieldStatusPlacement.js';
|
|
21
21
|
export type ComplexSelectorVariant = 'input' | 'secondary' | 'ghost';
|
|
22
22
|
export type ComplexSelectorSize = 'sm' | 'md' | 'lg';
|
|
23
23
|
/**
|
|
@@ -149,7 +149,7 @@ export interface ComplexSelectorProps<Value> extends Omit<FieldInputBaseProps, '
|
|
|
149
149
|
* - 'tooltip': no message box; the status icon becomes a focusable info-tip button that reveals the message on hover, keyboard focus, or tap
|
|
150
150
|
* @default 'attached' for input selectors; 'detached' for secondary and ghost selectors
|
|
151
151
|
*/
|
|
152
|
-
statusVariant?:
|
|
152
|
+
statusVariant?: FieldStatusPlacement;
|
|
153
153
|
/** Tooltip text displayed next to the label. */
|
|
154
154
|
labelTooltip?: string;
|
|
155
155
|
/** Trigger and field size. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComplexSelector.d.ts","sourceRoot":"","sources":["../../src/ComplexSelector/ComplexSelector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAQZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ComplexSelector.d.ts","sourceRoot":"","sources":["../../src/ComplexSelector/ComplexSelector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAQZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAI5D,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAoBtE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AA8LxE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAMrD;;;;;GAKG;AACH,MAAM,WAAW,iCAAkC,SAAQ,IAAI,CAC7D,mBAAmB,EACjB,MAAM,mBAAmB,GACzB,IAAI,GACJ,SAAS,GACT,WAAW,GACX,MAAM,GACN,YAAY,GACZ,eAAe,GACf,eAAe,GACf,eAAe,GACf,WAAW,GACX,eAAe,GACf,eAAe,CAClB;IACC;;;OAGG;IACH,GAAG,EAAE,CAAC,OAAO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AAa,EACb,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,EAAE,EACF,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,oBAAoB,CAAC,KAAK,CAAC,qBA0Z7B;yBAjce,eAAe"}
|
|
@@ -40,10 +40,9 @@ import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
|
40
40
|
import { themeProps } from "../utils/themeProps.js";
|
|
41
41
|
import "../Layer/layerViewportInset.stylex.js";
|
|
42
42
|
import { layerViewportInset } from "../Layer/layerViewportInset.stylex.js";
|
|
43
|
-
|
|
43
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
44
44
|
// The popup content's own block-size cap; the viewport cap is the layer
|
|
45
45
|
// runtime's.
|
|
46
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
47
46
|
const CONTENT_BLOCK_CAP = '480px';
|
|
48
47
|
const styles = {
|
|
49
48
|
statusTip: {
|
|
@@ -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,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAuCrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAyH1C,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAMnD,UAAU,oBAAqB,SAAQ,SAAS;IAC9C,oDAAoD;IACpD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAC9C,+DAA+D;IAC/D,QAAQ,EAAE,SAAS,CAAC;IACpB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,wCAAwC;IACxC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as stylex from '@stylexjs/stylex';
|
|
2
|
-
import { type InputStatus
|
|
2
|
+
import { type InputStatus } from '../Field/index.js';
|
|
3
3
|
import { type ISODateString, type DayOfWeek, type DayOfWeekName } from '../Calendar/index.js';
|
|
4
4
|
import type { TimestampFormat } from '../Timestamp/index.js';
|
|
5
5
|
import { type PickerPresentation } from '../utils/inputPresentation.js';
|
|
@@ -49,6 +49,7 @@ export type DateInputFormat = Extract<TimestampFormat, 'date' | 'date_long' | 'd
|
|
|
49
49
|
export type { InputStatus as DateInputStatus, InputStatusType as DateInputStatusType, } from '../Field/index.js';
|
|
50
50
|
import { type FieldInputBaseProps } from '../Field/fieldParts.js';
|
|
51
51
|
import type { SizeValue } from '../utils/types.js';
|
|
52
|
+
import type { FieldStatusPlacement } from '../Field/fieldStatusPlacement.js';
|
|
52
53
|
export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElement>, 'onChange' | 'defaultValue'> {
|
|
53
54
|
/** Ref forwarded to the date input (the field's semantic control) */
|
|
54
55
|
ref?: React.Ref<HTMLInputElement>;
|
|
@@ -159,7 +160,7 @@ export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElemen
|
|
|
159
160
|
* - 'tooltip': no message box; the status icon becomes a focusable info-tip button that reveals the message on hover, keyboard focus, or tap
|
|
160
161
|
* @default 'attached'
|
|
161
162
|
*/
|
|
162
|
-
statusVariant?:
|
|
163
|
+
statusVariant?: FieldStatusPlacement;
|
|
163
164
|
/**
|
|
164
165
|
* Width of the field. Numbers are treated as pixels, strings are used as-is
|
|
165
166
|
* (e.g. `'100%'`). Sizes the whole field (label, control, and status) so they
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/DateInput/DateInput.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAQ3C,OAAO,EAGL,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/DateInput/DateInput.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAQ3C,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAQlB,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAiBrB,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAoEpC,QAAA,MAAM,UAAU;;;;;;;;;;;;;EAad,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC;AA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;;GA6CG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BA0B9C;yBA1Be,SAAS"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type InputStatus
|
|
1
|
+
import { type InputStatus } from '../Field/index.js';
|
|
2
2
|
import { type ISODateString, type DateRange, type DayOfWeek, type DayOfWeekName } from '../Calendar/index.js';
|
|
3
3
|
import { type FieldInputBaseProps } from '../Field/fieldParts.js';
|
|
4
4
|
import type { SizeValue } from '../utils/types.js';
|
|
5
|
+
import type { FieldStatusPlacement } from '../Field/fieldStatusPlacement.js';
|
|
5
6
|
export type { DateRange } from '../Calendar/index.js';
|
|
6
7
|
export interface DateRangePreset {
|
|
7
8
|
label: string;
|
|
@@ -150,7 +151,7 @@ export interface DateRangeInputProps extends Omit<FieldInputBaseProps<HTMLButton
|
|
|
150
151
|
* - 'tooltip': no message box; the status icon becomes a focusable info-tip button that reveals the message on hover, keyboard focus, or tap
|
|
151
152
|
* @default 'attached'
|
|
152
153
|
*/
|
|
153
|
-
statusVariant?:
|
|
154
|
+
statusVariant?: FieldStatusPlacement;
|
|
154
155
|
/**
|
|
155
156
|
* Width of the field. Numbers are treated as pixels, strings are used as-is
|
|
156
157
|
* (e.g. `'100%'`). Sizes the whole field (label, control, and status) so they
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../src/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAGL,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../src/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAEL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Z,OAAO,EACP,QAAe,EACf,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,QAAQ,EACd,MAAM,EACN,aAA0B,EAC1B,YAAY,EACZ,cAAkB,EAClB,YAAY,EACZ,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,GAAG,SAAS,EACb,EAAE,mBAAmB,+BA2WrB;yBA9Ye,cAAc"}
|
package/dist/Drawer/Drawer.d.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
* - /packages/core/src/Drawer/Drawer.doc.mjs (props table, features, usage)
|
|
50
50
|
* - /packages/core/src/Drawer/Drawer.test.tsx (tests for new/changed behavior)
|
|
51
51
|
* - /packages/core/src/Drawer/__tests__/DrawerNonModalPageScroll.a11y.chromium.spec.ts (the page beside a non-modal drawer scrolls)
|
|
52
|
-
* - /
|
|
52
|
+
* - /docs/specs/components/Drawer/Drawer.spec.md (component contract)
|
|
53
53
|
* - /packages/core/src/Drawer/index.ts (exports if types change)
|
|
54
54
|
* - /packages/cli/assets/templates/blocks/components/Drawer/ (showcase blocks)
|
|
55
55
|
* - /apps/storybook/stories/Drawer.stories.tsx (examples and visual coverage)
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* - /packages/core/src/Drawer/Drawer.doc.mjs (props table, features, usage)
|
|
54
54
|
* - /packages/core/src/Drawer/Drawer.test.tsx (tests for new/changed behavior)
|
|
55
55
|
* - /packages/core/src/Drawer/__tests__/DrawerNonModalPageScroll.a11y.chromium.spec.ts (the page beside a non-modal drawer scrolls)
|
|
56
|
-
* - /
|
|
56
|
+
* - /docs/specs/components/Drawer/Drawer.spec.md (component contract)
|
|
57
57
|
* - /packages/core/src/Drawer/index.ts (exports if types change)
|
|
58
58
|
* - /packages/cli/assets/templates/blocks/components/Drawer/ (showcase blocks)
|
|
59
59
|
* - /apps/storybook/stories/Drawer.stories.tsx (examples and visual coverage)
|
|
@@ -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
|
|
@@ -216,7 +216,7 @@ const bottomSheetStyles = {
|
|
|
216
216
|
// =============================================================================
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
|
-
* The props
|
|
219
|
+
* The props `renderTrigger` spreads onto the control that opens the menu.
|
|
220
220
|
* They carry the press model — a mouse opens on press-down, a held finger
|
|
221
221
|
* opens with the finger down — the keyboard opens (Enter, Space, ArrowDown,
|
|
222
222
|
* ArrowUp), the toggle click, and the ARIA wiring that names the menu after
|
|
@@ -1286,7 +1286,9 @@ function DropdownMenuPopover({
|
|
|
1286
1286
|
}
|
|
1287
1287
|
},
|
|
1288
1288
|
...menuPress.menuProps,
|
|
1289
|
-
...mergeProps(themeProps('dropdown-menu'
|
|
1289
|
+
...mergeProps(themeProps('dropdown-menu', {
|
|
1290
|
+
presentation: 'popover'
|
|
1291
|
+
}), stylex.props(styles.dropdown, resolvedMaxHeight != null && dynamicStyles.menuMaxHeight(resolvedMaxHeight), hasOverflow ? menuTouchActionStyles.scrolls : menuTouchActionStyles.fits, hasOverflow && styles.scrollable, hasRegions && styles.menuInFrame,
|
|
1290
1292
|
// Between a header and a footer the menu is a Tab stop, so
|
|
1291
1293
|
// keyboard focus on it must be visible (the base style removes
|
|
1292
1294
|
// the ring for the pointer-open focus target).
|
|
@@ -1317,7 +1319,7 @@ export function DropdownMenu(props) {
|
|
|
1317
1319
|
onOpenChange
|
|
1318
1320
|
} = props;
|
|
1319
1321
|
// Both presentations hang the menu off ONE control.
|
|
1320
|
-
useDevWarning('DropdownMenu', '`button` and `
|
|
1322
|
+
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
1323
|
const requestedPresentation = 'items' in props ? props.presentation ?? 'popover' : 'popover';
|
|
1322
1324
|
const resolvedPresentation = useAdaptivePresentation(requestedPresentation);
|
|
1323
1325
|
const isControlled = props.isMenuOpen !== undefined;
|