@astryxdesign/core 0.7.4 → 0.7.5-canary.0418c47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/dist/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/AlertDialog/AlertDialog.js +1 -1
- package/dist/AlertDialog/index.d.ts +4 -4
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +1 -1
- package/dist/AppShell/AppShell.d.ts +4 -4
- package/dist/AppShell/index.d.ts +4 -4
- package/dist/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/AspectRatio/index.d.ts +2 -2
- package/dist/Avatar/Avatar.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.js +2 -2
- package/dist/Avatar/index.d.ts +4 -4
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/dist/AvatarGroup/AvatarGroupContext.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/index.d.ts +6 -6
- package/dist/Badge/Badge.d.ts +2 -2
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +18 -2
- package/dist/Badge/index.d.ts +2 -2
- package/dist/Banner/Banner.d.ts +5 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +64 -9
- package/dist/Banner/index.d.ts +2 -2
- package/dist/Blockquote/Blockquote.d.ts +1 -1
- package/dist/Blockquote/index.d.ts +2 -2
- package/dist/BottomSheet/BottomSheet.d.ts +58 -10
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +435 -198
- package/dist/BottomSheet/BottomSheetHostContext.d.ts +8 -0
- package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -0
- package/dist/BottomSheet/BottomSheetHostContext.js +35 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +12 -4
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +76 -22
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts +54 -15
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +229 -27
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +8 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetEscape.d.ts +3 -0
- package/dist/BottomSheet/bottomSheetEscape.d.ts.map +1 -0
- package/dist/BottomSheet/bottomSheetEscape.js +20 -0
- package/dist/BottomSheet/bottomSheetStack.d.ts +262 -0
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -0
- package/dist/BottomSheet/bottomSheetStack.js +1652 -0
- package/dist/BottomSheet/index.d.ts +4 -4
- package/dist/BottomSheet/useSheetGestures.d.ts +19 -3
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +43 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +4 -4
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/Breadcrumbs/index.d.ts +12 -12
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +18 -7
- package/dist/Button/index.d.ts +2 -2
- package/dist/ButtonGroup/ButtonGroup.d.ts +4 -4
- package/dist/ButtonGroup/index.d.ts +4 -4
- package/dist/Calendar/Calendar.d.ts +3 -3
- package/dist/Calendar/dayCellUtils.d.ts +1 -1
- package/dist/Calendar/getInitialFocusDate.d.ts +2 -2
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +1 -1
- package/dist/Calendar/hooks/index.d.ts +6 -6
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarDays.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts +2 -2
- package/dist/Calendar/index.d.ts +5 -5
- package/dist/Calendar/utils.d.ts +1 -1
- package/dist/Card/Card.d.ts +4 -4
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/Carousel/index.d.ts +2 -2
- package/dist/Center/Center.d.ts +2 -2
- package/dist/Center/index.d.ts +2 -2
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +25 -32
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.d.ts +4 -4
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +55 -16
- package/dist/Chat/ChatDictationButton.d.ts +2 -2
- package/dist/Chat/ChatLayout.d.ts +1 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts +2 -2
- package/dist/Chat/ChatMessageBubble.d.ts +2 -2
- package/dist/Chat/ChatMessageList.d.ts +3 -3
- package/dist/Chat/ChatMessageMetadata.d.ts +1 -1
- package/dist/Chat/ChatMessageMetadata.js +2 -2
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +7 -6
- package/dist/Chat/ChatSendButton.d.ts +1 -1
- package/dist/Chat/ChatSystemMessage.d.ts +1 -1
- package/dist/Chat/ChatTokenizedText.d.ts +2 -2
- package/dist/Chat/ChatToolCalls.d.ts +1 -1
- package/dist/Chat/ChatToolCalls.js +4 -4
- package/dist/Chat/index.d.ts +43 -43
- package/dist/Chat/useChatComposerTokens.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatPasteAsToken.d.ts +1 -1
- package/dist/Chat/useTriggerMenu.d.ts +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts +4 -4
- package/dist/CheckboxInput/index.d.ts +2 -2
- package/dist/CheckboxList/CheckboxList.d.ts +4 -4
- package/dist/CheckboxList/CheckboxListItem.d.ts +2 -2
- package/dist/CheckboxList/index.d.ts +4 -4
- package/dist/Citation/Citation.d.ts +1 -1
- package/dist/Citation/index.d.ts +2 -2
- package/dist/ClickableCard/ClickableCard.d.ts +3 -3
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +10 -6
- package/dist/ClickableCard/index.d.ts +2 -2
- package/dist/Code/Code.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts +27 -4
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +58 -19
- package/dist/CodeBlock/grammar.d.ts +134 -0
- package/dist/CodeBlock/grammar.d.ts.map +1 -0
- package/dist/CodeBlock/grammar.js +219 -0
- package/dist/CodeBlock/highlightRanges.d.ts +1 -1
- package/dist/CodeBlock/index.d.ts +10 -8
- package/dist/CodeBlock/index.d.ts.map +1 -1
- package/dist/CodeBlock/index.js +1 -0
- package/dist/CodeBlock/languages/dockerfile.d.ts +3 -0
- package/dist/CodeBlock/languages/dockerfile.d.ts.map +1 -0
- package/dist/CodeBlock/languages/dockerfile.js +45 -0
- package/dist/CodeBlock/languages/graphql.d.ts +3 -0
- package/dist/CodeBlock/languages/graphql.d.ts.map +1 -0
- package/dist/CodeBlock/languages/graphql.js +27 -0
- package/dist/CodeBlock/languages/java.d.ts +3 -0
- package/dist/CodeBlock/languages/java.d.ts.map +1 -0
- package/dist/CodeBlock/languages/java.js +24 -0
- package/dist/CodeBlock/languages/lua.d.ts +3 -0
- package/dist/CodeBlock/languages/lua.d.ts.map +1 -0
- package/dist/CodeBlock/languages/lua.js +21 -0
- package/dist/CodeBlock/languages/objective-c.d.ts +3 -0
- package/dist/CodeBlock/languages/objective-c.d.ts.map +1 -0
- package/dist/CodeBlock/languages/objective-c.js +27 -0
- package/dist/CodeBlock/languages/powershell.d.ts +3 -0
- package/dist/CodeBlock/languages/powershell.d.ts.map +1 -0
- package/dist/CodeBlock/languages/powershell.js +30 -0
- package/dist/CodeBlock/languages/ruby.d.ts +3 -0
- package/dist/CodeBlock/languages/ruby.d.ts.map +1 -0
- package/dist/CodeBlock/languages/ruby.js +24 -0
- package/dist/CodeBlock/languages/thrift.d.ts +3 -0
- package/dist/CodeBlock/languages/thrift.d.ts.map +1 -0
- package/dist/CodeBlock/languages/thrift.js +18 -0
- package/dist/CodeBlock/languages/toml.d.ts +3 -0
- package/dist/CodeBlock/languages/toml.d.ts.map +1 -0
- package/dist/CodeBlock/languages/toml.js +53 -0
- package/dist/CodeBlock/tokenizer.d.ts +8 -4
- package/dist/CodeBlock/tokenizer.d.ts.map +1 -1
- package/dist/CodeBlock/tokenizer.js +158 -8
- package/dist/Collapsible/Collapsible.d.ts +10 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +84 -2
- package/dist/Collapsible/CollapsibleGroup.d.ts +2 -2
- package/dist/Collapsible/index.d.ts +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +2 -2
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +15 -1
- package/dist/CommandPalette/CommandPaletteContext.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.js +1 -0
- package/dist/CommandPalette/CommandPaletteFooter.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteGroup.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +14 -2
- package/dist/CommandPalette/CommandPaletteItem.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/busyStartSettle.d.ts +4 -0
- package/dist/CommandPalette/busyStartSettle.d.ts.map +1 -0
- package/dist/CommandPalette/busyStartSettle.js +23 -0
- package/dist/CommandPalette/index.d.ts +16 -16
- package/dist/ComplexSelector/ComplexSelector.d.ts +25 -7
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +42 -7
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts +4 -4
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +48 -13
- package/dist/ContextMenu/index.d.ts +9 -9
- package/dist/DateInput/DateInput.d.ts +7 -7
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +12 -5
- package/dist/DateInput/MonthScroller.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts.map +1 -1
- package/dist/DateInput/NativeDateField.js +2 -1
- package/dist/DateInput/TouchDateField.d.ts +1 -1
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +1 -1
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/monthGeometry.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts +6 -6
- package/dist/DateRangeInput/index.d.ts +2 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts +6 -6
- package/dist/DateTimeInput/NativeDateSegment.d.ts +3 -3
- package/dist/DateTimeInput/NativeTimeSegment.d.ts +4 -4
- package/dist/DateTimeInput/TouchDateTimeField.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts +7 -3
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/index.d.ts +6 -6
- package/dist/Dialog/useImperativeDialog.d.ts +1 -1
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/index.d.ts +2 -2
- package/dist/Drawer/Drawer.d.ts +3 -3
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +18 -13
- package/dist/Drawer/DrawerHeader.d.ts +1 -1
- package/dist/Drawer/index.d.ts +4 -4
- package/dist/DropdownMenu/DropdownMenu.d.ts +5 -5
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +32 -20
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +12 -7
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +13 -5
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +8 -8
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +0 -3
- package/dist/DropdownMenu/MenuBottomSheet.d.ts +11 -4
- package/dist/DropdownMenu/MenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/MenuBottomSheet.js +35 -9
- package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts +1 -1
- package/dist/DropdownMenu/MenuBottomSheetActionList.js +3 -3
- package/dist/DropdownMenu/index.d.ts +10 -10
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +4 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +25 -3
- package/dist/DropdownMenu/menuBottomSheet.stylex.d.ts +23 -0
- package/dist/DropdownMenu/menuBottomSheet.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuBottomSheet.stylex.js +29 -0
- package/dist/DropdownMenu/menuItemHover.d.ts +3 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -1
- package/dist/DropdownMenu/menuItemHover.js +14 -1
- package/dist/DropdownMenu/renderDropdownItems.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts.map +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.js +7 -5
- package/dist/EmptyState/EmptyState.d.ts +5 -3
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +6 -4
- package/dist/EmptyState/index.d.ts +2 -2
- package/dist/Field/Field.d.ts +5 -5
- package/dist/Field/Field.js +1 -1
- package/dist/Field/FieldLabel.d.ts +2 -2
- package/dist/Field/FieldLabel.js +1 -1
- package/dist/Field/PanelSearchInput.d.ts +10 -2
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +31 -22
- package/dist/Field/fieldInputFamily.testing.d.ts +1 -1
- package/dist/Field/fieldParts.d.ts +1 -1
- package/dist/Field/index.d.ts +10 -10
- package/dist/Field/inputDisabledFocus.d.ts +14 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -0
- package/dist/Field/inputDisabledFocus.js +19 -0
- package/dist/Field/inputStyles.stylex.d.ts +9 -9
- package/dist/Field/inputStyles.stylex.js +9 -9
- package/dist/FieldStatus/FieldStatus.d.ts +3 -3
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +7 -3
- package/dist/FieldStatus/index.d.ts +2 -2
- package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts +1 -1
- package/dist/FileInput/FileInput.d.ts +4 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +15 -9
- package/dist/FileInput/index.d.ts +2 -2
- package/dist/FormLayout/FormLayout.d.ts +2 -2
- package/dist/FormLayout/index.d.ts +4 -4
- package/dist/Grid/Grid.d.ts +3 -3
- package/dist/Grid/GridSpan.d.ts +1 -1
- package/dist/Grid/index.d.ts +4 -4
- package/dist/HStack/HStack.d.ts +2 -2
- package/dist/HStack/index.d.ts +1 -1
- package/dist/Heading/Heading.d.ts +4 -4
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/HoverCard.d.ts +4 -4
- package/dist/HoverCard/index.d.ts +4 -4
- package/dist/HoverCard/useHoverCard.d.ts +2 -2
- package/dist/Icon/Icon.d.ts +18 -6
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +55 -9
- package/dist/Icon/IconDefaultSizeContext.d.ts +1 -1
- package/dist/Icon/IconSize.stylex.d.ts +16 -11
- package/dist/Icon/IconSize.stylex.d.ts.map +1 -1
- package/dist/Icon/IconSize.stylex.js +27 -11
- package/dist/Icon/defaultIcons.d.ts +1 -1
- package/dist/Icon/globalIconRegistry.d.ts +69 -5
- package/dist/Icon/globalIconRegistry.d.ts.map +1 -1
- package/dist/Icon/globalIconRegistry.js +108 -24
- package/dist/Icon/index.d.ts +30 -6
- package/dist/Icon/index.d.ts.map +1 -1
- package/dist/Icon/index.js +24 -1
- package/dist/Icon/useIcon.d.ts +6 -2
- package/dist/Icon/useIcon.d.ts.map +1 -1
- package/dist/Icon/useIcon.js +5 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/index.d.ts +2 -2
- package/dist/Indicator/CheckIndicator.d.ts +1 -1
- package/dist/Indicator/CheckboxIndicator.d.ts +1 -1
- package/dist/Indicator/RadioIndicator.d.ts +1 -1
- package/dist/Indicator/index.d.ts +8 -8
- package/dist/Indicator/indicatorRegistry.d.ts +2 -2
- package/dist/Indicator/types.d.ts +1 -1
- package/dist/Indicator/useIndicator.d.ts +2 -2
- package/dist/InputGroup/InputGroup.d.ts +3 -3
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +46 -36
- package/dist/InputGroup/InputGroupInternalContext.d.ts +4 -0
- package/dist/InputGroup/InputGroupInternalContext.d.ts.map +1 -0
- package/dist/InputGroup/InputGroupInternalContext.js +15 -0
- package/dist/InputGroup/InputGroupText.d.ts +1 -1
- package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupText.js +2 -0
- package/dist/InputGroup/groupStyles.d.ts +9 -0
- package/dist/InputGroup/groupStyles.d.ts.map +1 -1
- package/dist/InputGroup/groupStyles.js +28 -14
- package/dist/InputGroup/index.d.ts +6 -6
- package/dist/InteractiveRoleContext/InteractiveRoleContext.d.ts +1 -1
- package/dist/InteractiveRoleContext/index.d.ts +1 -1
- package/dist/Item/Item.d.ts +1 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +1 -1
- package/dist/Item/ItemSwipeLayer.d.ts +2 -2
- package/dist/Item/ItemSwipeLayer.d.ts.map +1 -1
- package/dist/Item/ItemSwipeLayer.js +3 -0
- package/dist/Item/index.d.ts +2 -2
- package/dist/Item/useSwipeAction.d.ts.map +1 -1
- package/dist/Item/useSwipeAction.js +60 -5
- package/dist/Kbd/Kbd.d.ts +3 -3
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +18 -11
- package/dist/Kbd/index.d.ts +2 -2
- package/dist/Layer/LayerProvider.d.ts +1 -1
- package/dist/Layer/index.d.ts +18 -18
- package/dist/Layer/layerAnimations.stylex.d.ts +9 -5
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +23 -10
- package/dist/Layer/layerInset.d.ts +1 -1
- package/dist/Layer/layerSlideRules.d.ts +63 -3
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +124 -3
- package/dist/Layer/layerStack.d.ts +12 -9
- package/dist/Layer/layerStack.d.ts.map +1 -1
- package/dist/Layer/layerStack.js +116 -53
- package/dist/Layer/modalOutlet.d.ts +44 -6
- package/dist/Layer/modalOutlet.d.ts.map +1 -1
- package/dist/Layer/modalOutlet.js +150 -14
- package/dist/Layer/preserveAnimations.d.ts +11 -0
- package/dist/Layer/preserveAnimations.d.ts.map +1 -0
- package/dist/Layer/preserveAnimations.js +245 -0
- package/dist/Layer/useLayer.d.ts +19 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +500 -43
- package/dist/Layer/useLayerDismissal.d.ts +11 -8
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +8 -8
- package/dist/Layer/useTouchTrigger.d.ts +14 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +72 -17
- package/dist/Layout/Layout.d.ts +2 -2
- package/dist/Layout/Layout.d.ts.map +1 -1
- package/dist/Layout/Layout.js +4 -0
- package/dist/Layout/LayoutContent.d.ts +2 -2
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +2 -2
- package/dist/Layout/LayoutFooter.d.ts +2 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +2 -1
- package/dist/Layout/LayoutHeader.d.ts +2 -2
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +2 -1
- package/dist/Layout/LayoutPanel.d.ts +3 -3
- package/dist/Layout/index.d.ts +29 -29
- package/dist/Layout/layoutEdges.stylex.d.ts +20 -0
- package/dist/Layout/layoutEdges.stylex.d.ts.map +1 -0
- package/dist/Layout/layoutEdges.stylex.js +28 -0
- package/dist/Layout/padding.stylex.d.ts +1 -1
- package/dist/Lightbox/Lightbox.d.ts +6 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +111 -89
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.d.ts +2 -0
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.d.ts.map +1 -0
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.js +78 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.d.ts +2 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.d.ts.map +1 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.js +65 -0
- package/dist/Lightbox/index.d.ts +4 -4
- package/dist/Lightbox/useLightbox.d.ts +1 -1
- package/dist/Link/Link.d.ts +3 -3
- package/dist/Link/LinkContext.d.ts +1 -1
- package/dist/Link/LinkProvider.d.ts +1 -1
- package/dist/Link/index.d.ts +8 -8
- package/dist/Link/useLinkComponent.d.ts +1 -1
- package/dist/List/List.d.ts +3 -3
- package/dist/List/ListItem.d.ts +2 -2
- package/dist/List/index.d.ts +4 -4
- package/dist/Markdown/Markdown.d.ts +15 -5
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.bench.js +3 -1
- package/dist/Markdown/Markdown.fr23.sampling.d.ts +16 -0
- package/dist/Markdown/Markdown.fr23.sampling.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.sampling.js +13 -4
- package/dist/Markdown/Markdown.js +23 -9
- package/dist/Markdown/MarkdownTable.a11y.chromium.spec.js +1 -0
- package/dist/Markdown/headingProjection.d.ts +3 -3
- package/dist/Markdown/index.d.ts +7 -7
- package/dist/Markdown/parser/index.d.ts +3 -3
- package/dist/Markdown/parser.d.ts +3 -3
- package/dist/Markdown/plugin-renderer/MarkdownPluginNodeRenderer.d.ts +1 -1
- package/dist/Markdown/plugin-renderer/index.d.ts +2 -2
- package/dist/Markdown/plugins/frontmatter.d.ts +2 -2
- package/dist/Markdown/plugins/headingLinks.d.ts +2 -2
- package/dist/Markdown/plugins/index.d.ts +14 -14
- package/dist/Markdown/plugins/protocol.d.ts +1 -1
- package/dist/Markdown/plugins/semanticFence.d.ts +2 -2
- package/dist/Markdown/plugins/softBreaks.d.ts +1 -1
- package/dist/Markdown/plugins/sourceDecoration.d.ts +2 -2
- package/dist/Markdown/plugins/sourceLines.d.ts +1 -1
- package/dist/Markdown/plugins/textTransform.d.ts +2 -2
- package/dist/Markdown/remark.d.ts +1 -1
- package/dist/Markdown/utils.d.ts +4 -4
- package/dist/MetadataList/MetadataList.d.ts +2 -2
- package/dist/MetadataList/MetadataListItem.d.ts +1 -1
- package/dist/MetadataList/index.d.ts +5 -5
- package/dist/MobileNav/MobileNav.d.ts +3 -2
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +46 -37
- package/dist/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.js +1 -0
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/index.d.ts +4 -4
- package/dist/MoreMenu/MoreMenu.d.ts +4 -4
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/CreateRow.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/MultiSelector.d.ts +8 -8
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/MultiSelector.js +21 -5
- package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/hooks.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +3 -3
- package/dist/MultiSelector/types.d.ts +1 -1
- package/dist/NavIcon/NavIcon.d.ts +1 -1
- package/dist/NavIcon/index.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenu.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +46 -7
- package/dist/NavMenu/index.d.ts +6 -6
- package/dist/NumberInput/NumberInput.d.ts +9 -9
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +61 -24
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/numberInputCommit.d.ts +1 -1
- package/dist/NumberInput/numberParser.d.ts +1 -1
- package/dist/Outline/Outline.d.ts +3 -3
- package/dist/Outline/index.d.ts +7 -7
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -2
- package/dist/Outline/useOutlineFromDOM.d.ts +1 -1
- package/dist/Outline/useOutlineFromMarkdown.d.ts +3 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/OverflowList/OverflowList.d.ts +2 -2
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/Overlay/Overlay.d.ts +2 -2
- package/dist/Overlay/index.d.ts +5 -5
- package/dist/Overlay/useOverlay.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts +2 -2
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Popover/Popover.d.ts +44 -5
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +276 -44
- package/dist/Popover/index.d.ts +4 -4
- package/dist/Popover/index.d.ts.map +1 -1
- package/dist/Popover/lazyPopoverBottomSheet.d.ts +23 -0
- package/dist/Popover/lazyPopoverBottomSheet.d.ts.map +1 -0
- package/dist/Popover/lazyPopoverBottomSheet.js +40 -0
- package/dist/Popover/usePopover.d.ts +2 -2
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -5
- package/dist/PowerSearch/PowerSearch.d.ts +5 -5
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +7 -5
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +2 -2
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -2
- package/dist/PowerSearch/formatFilterValue.d.ts +3 -3
- package/dist/PowerSearch/index.d.ts +8 -8
- package/dist/PowerSearch/resolveDateTimeRangePart.d.ts +1 -1
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +2 -2
- package/dist/PowerSearch/types.d.ts +1 -1
- package/dist/PowerSearch/useInternalConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchSource.d.ts +3 -3
- package/dist/PowerSearch/utils.d.ts +3 -3
- package/dist/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +8 -0
- package/dist/ProgressBar/index.d.ts +2 -2
- package/dist/RadioList/RadioList.d.ts +3 -3
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +10 -2
- package/dist/RadioList/index.d.ts +4 -4
- package/dist/Resizable/ResizeHandle.d.ts +2 -2
- package/dist/Resizable/index.d.ts +6 -6
- package/dist/Resizable/useResizable.d.ts +2 -2
- package/dist/Resizable/utils.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts.map +1 -1
- package/dist/ScrollableArea/ScrollableArea.js +1 -1
- package/dist/ScrollableArea/index.d.ts +4 -4
- package/dist/Section/Section.d.ts +3 -3
- package/dist/Section/index.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +5 -5
- package/dist/SelectableCard/SelectableCard.d.ts +8 -8
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +15 -11
- package/dist/SelectableCard/index.d.ts +2 -2
- package/dist/Selector/Selector.d.ts +8 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +16 -5
- package/dist/Selector/SelectorOption.d.ts +1 -1
- package/dist/Selector/hooks.d.ts +1 -1
- package/dist/Selector/index.d.ts +4 -4
- package/dist/Selector/types.d.ts +1 -1
- package/dist/Selector/useSelectorPresentation.d.ts +2 -2
- package/dist/Selector/utils.d.ts +1 -1
- package/dist/SideNav/SideNav.d.ts +3 -3
- package/dist/SideNav/SideNavCollapseButton.d.ts +3 -3
- package/dist/SideNav/SideNavHeading.d.ts +2 -2
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +34 -0
- package/dist/SideNav/SideNavItem.d.ts +9 -5
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +36 -13
- package/dist/SideNav/SideNavSection.d.ts +1 -1
- package/dist/SideNav/index.d.ts +14 -14
- package/dist/SizeContext/index.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +12 -3
- package/dist/Skeleton/index.d.ts +2 -2
- package/dist/Slider/Slider.d.ts +3 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +45 -12
- package/dist/Slider/index.d.ts +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Stack/Stack.d.ts +3 -3
- package/dist/Stack/StackItem.d.ts +2 -2
- package/dist/Stack/index.d.ts +6 -6
- package/dist/Stack/stack.stylex.d.ts +1 -1
- package/dist/StatusDot/StatusDot.d.ts +2 -2
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +12 -0
- package/dist/StatusDot/index.d.ts +2 -2
- package/dist/Stepper/Step.d.ts +2 -2
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +10 -6
- package/dist/Stepper/Stepper.d.ts +2 -2
- package/dist/Stepper/index.d.ts +7 -7
- package/dist/Switch/Switch.d.ts +4 -4
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +5 -5
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/switch.markers.stylex.d.ts +7 -2
- package/dist/Switch/switch.markers.stylex.d.ts.map +1 -1
- package/dist/Switch/switch.markers.stylex.js +8 -3
- package/dist/TabList/Tab.d.ts +2 -2
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +5 -1
- package/dist/TabList/TabList.d.ts +3 -3
- package/dist/TabList/TabMenu.d.ts +2 -2
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +1 -0
- package/dist/TabList/index.d.ts +8 -8
- package/dist/Table/BaseTable.d.ts +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/TableBody.d.ts +1 -1
- package/dist/Table/TableCell.d.ts +3 -3
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +1 -0
- package/dist/Table/TableContext.d.ts +1 -1
- package/dist/Table/TableFooter.d.ts +1 -1
- package/dist/Table/TableHeader.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts +3 -3
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +1 -0
- package/dist/Table/TableRow.d.ts +2 -2
- package/dist/Table/TableSelectionToolbar.d.ts +2 -2
- package/dist/Table/columnUtils.d.ts +1 -1
- package/dist/Table/index.d.ts +54 -54
- package/dist/Table/plugins/columnResize/index.d.ts +2 -2
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +11 -2
- package/dist/Table/plugins/columnSettings/index.d.ts +4 -4
- package/dist/Table/plugins/columnSettings/useTableColumnSettings.d.ts +2 -2
- package/dist/Table/plugins/columnSettings/useTableColumnSettingsState.d.ts +1 -1
- package/dist/Table/plugins/filtering/index.d.ts +4 -4
- package/dist/Table/plugins/filtering/useTableFilterState.d.ts +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/index.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
- package/dist/Table/plugins/pagination/index.d.ts +3 -3
- package/dist/Table/plugins/pagination/useTablePagination.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/index.d.ts +2 -2
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +103 -4
- package/dist/Table/plugins/rowIndex/index.d.ts +2 -2
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +1 -1
- package/dist/Table/plugins/rowStatus/index.d.ts +2 -2
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +2 -2
- package/dist/Table/plugins/selection/index.d.ts +4 -4
- package/dist/Table/plugins/selection/useTableSelection.d.ts +1 -1
- package/dist/Table/plugins/selection/useTableSelectionState.d.ts +1 -1
- package/dist/Table/plugins/sortable/index.d.ts +4 -4
- package/dist/Table/plugins/sortable/useTableSortable.d.ts +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/index.d.ts +2 -2
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +233 -6
- package/dist/Table/plugins/tree/index.d.ts +4 -4
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +1 -1
- package/dist/Table/plugins/tree/useTableTreeState.d.ts +1 -1
- package/dist/Table/rowDivider.d.ts +34 -0
- package/dist/Table/rowDivider.d.ts.map +1 -0
- package/dist/Table/rowDivider.js +118 -0
- package/dist/Table/tableContextMenu.d.ts +2 -2
- package/dist/Table/types.d.ts +3 -3
- package/dist/Table/useBaseTablePlugins.d.ts +1 -1
- package/dist/Table/useTableCellStyles.d.ts +2 -2
- package/dist/Table/utils.d.ts +2 -2
- package/dist/Text/Text.d.ts +3 -3
- package/dist/Text/index.d.ts +4 -4
- package/dist/TextArea/TextArea.d.ts +10 -8
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -12
- package/dist/TextArea/index.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts +12 -10
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +35 -21
- package/dist/TextInput/index.d.ts +2 -2
- package/dist/Thumbnail/Thumbnail.d.ts +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +45 -11
- package/dist/Thumbnail/index.d.ts +2 -2
- package/dist/TimeInput/TimeInput.d.ts +6 -6
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +12 -4
- package/dist/TimeInput/TouchTimeField.d.ts +1 -1
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +2 -1
- package/dist/TimeInput/index.d.ts +3 -3
- package/dist/Timer/Timer.d.ts +2 -2
- package/dist/Timer/index.d.ts +2 -2
- package/dist/Timestamp/Timestamp.d.ts +3 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts +1 -1
- package/dist/Timestamp/formatInstant.d.ts +2 -2
- package/dist/Timestamp/formatRelativeTime.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +3 -3
- package/dist/Timestamp/tooltipEntries.d.ts +2 -2
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/ToastContext.d.ts +1 -1
- package/dist/Toast/ToastViewport.d.ts +2 -2
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +28 -2
- package/dist/Toast/index.d.ts +6 -6
- package/dist/Toast/useToast.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/ToggleButton/index.d.ts +4 -4
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/index.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts +77 -10
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +474 -85
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +98 -0
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -0
- package/dist/Tokenizer/TokenizerBottomSheet.js +721 -0
- package/dist/Tokenizer/index.d.ts +2 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts +3 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts.map +1 -1
- package/dist/Tokenizer/useEndLaneReserve.js +3 -2
- package/dist/Toolbar/Toolbar.d.ts +4 -4
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/index.d.ts +4 -4
- package/dist/Tooltip/useTooltip.d.ts +2 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +9 -3
- package/dist/TopNav/TopNav.d.ts +1 -1
- package/dist/TopNav/TopNavHeading.d.ts +2 -2
- package/dist/TopNav/TopNavItem.d.ts +3 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +4 -4
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.d.ts +2 -2
- package/dist/TopNav/TopNavMenu.d.ts +1 -1
- package/dist/TopNav/index.d.ts +16 -16
- package/dist/TreeList/TreeList.d.ts +11 -26
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +175 -3
- package/dist/TreeList/TreeListItem.d.ts +8 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +3 -1
- package/dist/TreeList/TreeListTypes.d.ts +1 -1
- package/dist/TreeList/index.d.ts +3 -3
- package/dist/Typeahead/BaseTypeahead.d.ts +2 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +16 -4
- package/dist/Typeahead/Typeahead.d.ts +7 -7
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +31 -14
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -2
- package/dist/Typeahead/createStaticSource.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +9 -9
- package/dist/Typeahead/utils.d.ts +3 -3
- package/dist/VStack/VStack.d.ts +2 -2
- package/dist/VStack/index.d.ts +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +24 -6
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +24 -5
- package/dist/VisuallyHidden/index.d.ts +2 -2
- package/dist/astryx.css +138 -51
- package/dist/gestures/GestureArena.d.ts +175 -0
- package/dist/gestures/GestureArena.d.ts.map +1 -0
- package/dist/gestures/GestureArena.js +816 -0
- package/dist/gestures/GestureRecognizer.d.ts +239 -0
- package/dist/gestures/GestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/GestureRecognizer.js +487 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts +32 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/LongPressGestureRecognizer.js +135 -0
- package/dist/gestures/PanGestureRecognizer.d.ts +117 -0
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/PanGestureRecognizer.js +349 -0
- package/dist/gestures/TapGestureRecognizer.d.ts +39 -0
- package/dist/gestures/TapGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/TapGestureRecognizer.js +151 -0
- package/dist/gestures/VelocityTracker.d.ts +51 -0
- package/dist/gestures/VelocityTracker.d.ts.map +1 -0
- package/dist/gestures/VelocityTracker.js +186 -0
- package/dist/gestures/geometry.d.ts +17 -0
- package/dist/gestures/geometry.d.ts.map +1 -0
- package/dist/gestures/geometry.js +55 -0
- package/dist/gestures/types.d.ts +139 -0
- package/dist/gestures/types.d.ts.map +1 -0
- package/dist/gestures/types.js +67 -0
- package/dist/hooks/AnnounceRenderedText.d.ts +17 -0
- package/dist/hooks/AnnounceRenderedText.d.ts.map +1 -0
- package/dist/hooks/AnnounceRenderedText.js +32 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts +41 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -0
- package/dist/hooks/ModalAnnounceProvider.js +133 -0
- package/dist/hooks/actionGroupTracker.d.ts +98 -0
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -0
- package/dist/hooks/actionGroupTracker.js +338 -0
- package/dist/hooks/index.d.ts +54 -52
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/modalAnnounce.d.ts +18 -0
- package/dist/hooks/modalAnnounce.d.ts.map +1 -0
- package/dist/hooks/modalAnnounce.js +382 -0
- package/dist/hooks/useAdaptivePresentation.d.ts +9 -1
- package/dist/hooks/useAdaptivePresentation.d.ts.map +1 -1
- package/dist/hooks/useAdaptivePresentation.js +33 -8
- package/dist/hooks/useAnimatedLayout.d.ts +42 -0
- package/dist/hooks/useAnimatedLayout.d.ts.map +1 -0
- package/dist/hooks/useAnimatedLayout.js +46 -0
- package/dist/hooks/useAnnounce.d.ts +132 -1
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +356 -27
- package/dist/hooks/useAnnounceRenderedText.d.ts +19 -2
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +52 -11
- package/dist/hooks/useAutoMediaMode.d.ts +1 -1
- package/dist/hooks/useBusyAnnouncement.d.ts +9 -5
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +58 -46
- package/dist/hooks/useFocusTrap.d.ts +1 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +57 -26
- package/dist/hooks/useInputContainer.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts +3 -3
- package/dist/hooks/useMenuPress.d.ts +5 -3
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +58 -33
- package/dist/hooks/usePressFeedback.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +37 -5
- package/dist/i18n/InternationalizationContext.d.ts +2 -2
- package/dist/i18n/InternationalizationProvider.d.ts +1 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +33 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +33 -0
- package/dist/i18n/index.d.ts +12 -12
- package/dist/i18n/resolve.d.ts +1 -1
- package/dist/i18n/useLocale.d.ts +1 -1
- package/dist/index.d.ts +111 -111
- package/dist/internal/tokenizer-presentation.d.ts +21 -0
- package/dist/internal/tokenizer-presentation.d.ts.map +1 -0
- package/dist/internal/tokenizer-presentation.js +21 -0
- package/dist/internal/touch.d.ts +26 -0
- package/dist/internal/touch.d.ts.map +1 -0
- package/dist/internal/touch.js +28 -0
- package/dist/motion/LayoutChangeSnapshot.d.ts +33 -0
- package/dist/motion/LayoutChangeSnapshot.d.ts.map +1 -0
- package/dist/motion/LayoutChangeSnapshot.js +37 -0
- package/dist/motion/animatedLayout.d.ts +94 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -0
- package/dist/motion/animatedLayout.js +1096 -0
- package/dist/motion/animator.d.ts +240 -0
- package/dist/motion/animator.d.ts.map +1 -0
- package/dist/motion/animator.js +2203 -0
- package/dist/motion/bezier.d.ts +18 -0
- package/dist/motion/bezier.d.ts.map +1 -0
- package/dist/motion/bezier.js +60 -0
- package/dist/motion/coast.d.ts +61 -0
- package/dist/motion/coast.d.ts.map +1 -0
- package/dist/motion/coast.js +107 -0
- package/dist/motion/decay.d.ts +41 -0
- package/dist/motion/decay.d.ts.map +1 -0
- package/dist/motion/decay.js +90 -0
- package/dist/motion/projection.d.ts +36 -0
- package/dist/motion/projection.d.ts.map +1 -0
- package/dist/motion/projection.js +92 -0
- package/dist/motion/reducedMotion.d.ts +25 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -0
- package/dist/motion/reducedMotion.js +85 -0
- package/dist/motion/reducedMotion.stylex.d.ts +19 -0
- package/dist/motion/reducedMotion.stylex.d.ts.map +1 -0
- package/dist/motion/reducedMotion.stylex.js +37 -0
- package/dist/motion/reducedMotionPlan.d.ts +89 -0
- package/dist/motion/reducedMotionPlan.d.ts.map +1 -0
- package/dist/motion/reducedMotionPlan.js +194 -0
- package/dist/motion/resolveSnapPoint.d.ts +52 -0
- package/dist/motion/resolveSnapPoint.d.ts.map +1 -0
- package/dist/motion/resolveSnapPoint.js +135 -0
- package/dist/motion/roleValue.d.ts +33 -0
- package/dist/motion/roleValue.d.ts.map +1 -0
- package/dist/motion/roleValue.js +84 -0
- package/dist/motion/roles.d.ts +79 -0
- package/dist/motion/roles.d.ts.map +1 -0
- package/dist/motion/roles.js +199 -0
- package/dist/motion/rubberBand.d.ts +20 -0
- package/dist/motion/rubberBand.d.ts.map +1 -0
- package/dist/motion/rubberBand.js +91 -0
- package/dist/motion/selectPage.d.ts +26 -0
- package/dist/motion/selectPage.d.ts.map +1 -0
- package/dist/motion/selectPage.js +55 -0
- package/dist/motion/spring.d.ts +193 -0
- package/dist/motion/spring.d.ts.map +1 -0
- package/dist/motion/spring.js +442 -0
- package/dist/motion/uikit/gestures.d.ts +642 -0
- package/dist/motion/uikit/gestures.d.ts.map +1 -0
- package/dist/motion/uikit/gestures.js +428 -0
- package/dist/motion/uikit/index.d.ts +24 -0
- package/dist/motion/uikit/index.d.ts.map +1 -0
- package/dist/motion/uikit/index.js +26 -0
- package/dist/motion/uikit/navigation.d.ts +54 -0
- package/dist/motion/uikit/navigation.d.ts.map +1 -0
- package/dist/motion/uikit/navigation.js +83 -0
- package/dist/motion/uikit/scroll.d.ts +116 -0
- package/dist/motion/uikit/scroll.d.ts.map +1 -0
- package/dist/motion/uikit/scroll.js +146 -0
- package/dist/motion/uikit/springs.d.ts +545 -0
- package/dist/motion/uikit/springs.d.ts.map +1 -0
- package/dist/motion/uikit/springs.js +548 -0
- package/dist/motion/uikit/timing.d.ts +202 -0
- package/dist/motion/uikit/timing.d.ts.map +1 -0
- package/dist/motion/uikit/timing.js +201 -0
- package/dist/reset.a11y.chromium.spec.js +1 -0
- package/dist/reset.until-found.a11y.browser.spec.js +1 -0
- package/dist/theme/Theme.d.ts +2 -2
- package/dist/theme/contrast.d.ts +1 -1
- package/dist/theme/declarationBoundary.d.ts +13 -0
- package/dist/theme/declarationBoundary.d.ts.map +1 -1
- package/dist/theme/declarationBoundary.js +264 -1
- package/dist/theme/defineTheme.d.ts +113 -22
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +66 -7
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +9 -0
- package/dist/theme/domainTokens/index.d.ts +6 -6
- package/dist/theme/generateThemeRules.d.ts +7 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +468 -24
- package/dist/theme/index.d.ts +31 -31
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/localTokens.d.ts +1 -1
- package/dist/theme/mergeComponents.d.ts +1 -1
- package/dist/theme/onMediaTokens.d.ts +1 -1
- package/dist/theme/resolveThemeValues.d.ts +7 -7
- package/dist/theme/statusColor.d.ts +48 -0
- package/dist/theme/statusColor.d.ts.map +1 -0
- package/dist/theme/statusColor.js +203 -0
- package/dist/theme/statusRoleDerivation.d.ts +11 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -0
- package/dist/theme/statusRoleDerivation.js +236 -0
- package/dist/theme/syntax/SyntaxTheme.d.ts +1 -1
- package/dist/theme/syntax/index.d.ts +7 -7
- package/dist/theme/syntax/presets.d.ts +1 -1
- package/dist/theme/themeAdaptations.d.ts +30 -6
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +30 -1
- package/dist/theme/themeRegistry.d.ts +1 -1
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +16 -1
- package/dist/theme/tokens.stylex.d.ts +40 -2
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +47 -2
- package/dist/theme/types.d.ts +1 -1
- package/dist/theme/useTheme.d.ts +6 -4
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +10 -4
- package/dist/utils/dateParser.d.ts +3 -3
- package/dist/utils/edgeAutoscroll.d.ts +53 -0
- package/dist/utils/edgeAutoscroll.d.ts.map +1 -0
- package/dist/utils/edgeAutoscroll.js +81 -0
- package/dist/utils/groupItems.d.ts +1 -1
- package/dist/utils/hitArea.d.ts +72 -0
- package/dist/utils/hitArea.d.ts.map +1 -0
- package/dist/utils/hitArea.js +681 -0
- package/dist/utils/index.d.ts +29 -29
- package/dist/utils/plainDate.d.ts +3 -3
- package/dist/utils/touchPresentation.d.ts +48 -0
- package/dist/utils/touchPresentation.d.ts.map +1 -0
- package/dist/utils/touchPresentation.js +133 -0
- package/locales/af-ZA.json +1 -1
- package/locales/ar-SA.json +1 -1
- package/locales/ca-ES.json +1 -1
- package/locales/cs-CZ.json +1 -1
- package/locales/da-DK.json +1 -1
- package/locales/de-DE.json +1 -1
- package/locales/el-GR.json +1 -1
- package/locales/en.json +132 -0
- package/locales/es-ES.json +1 -1
- package/locales/fi-FI.json +1 -1
- package/locales/fr-FR.json +1 -1
- package/locales/he-IL.json +1 -1
- package/locales/hu-HU.json +1 -1
- package/locales/it-IT.json +1 -1
- package/locales/ja-JP.json +1 -1
- package/locales/ko-KR.json +1 -1
- package/locales/nl-NL.json +1 -1
- package/locales/no-NO.json +1 -1
- package/locales/pl-PL.json +1 -1
- package/locales/pseudo.json +99 -0
- package/locales/pt-BR.json +1 -1
- package/locales/pt-PT.json +1 -1
- package/locales/ro-RO.json +1 -1
- package/locales/ru-RU.json +1 -1
- package/locales/sr-SP.json +1 -1
- package/locales/sv-SE.json +1 -1
- package/locales/tr-TR.json +1 -1
- package/locales/uk-UA.json +1 -1
- package/locales/vi-VN.json +1 -1
- package/locales/zh-CN.json +1 -1
- package/locales/zh-TW.json +1 -1
- package/package.json +61 -6
- package/src/AlertDialog/AlertDialog.tsx +1 -1
- package/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts +1 -0
- package/src/AppShell/AppShell.spec.md +337 -0
- package/src/AspectRatio/AspectRatio.spec.md +179 -0
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +1 -0
- package/src/Avatar/Avatar.spec.md +253 -0
- package/src/Avatar/AvatarStatusDot.spec.md +93 -79
- package/src/Avatar/AvatarStatusDot.test.tsx +22 -0
- package/src/Avatar/AvatarStatusDot.tsx +2 -2
- package/src/AvatarGroup/AvatarGroup.spec.md +205 -0
- package/src/AvatarGroup/AvatarGroupOverflow.spec.md +123 -120
- package/src/Badge/Badge.doc.mjs +2 -1
- package/src/Badge/Badge.spec.md +207 -0
- package/src/Badge/Badge.test.tsx +13 -0
- package/src/Badge/Badge.tsx +38 -2
- package/src/Banner/Banner.spec.md +38 -27
- package/src/Banner/Banner.test.tsx +118 -16
- package/src/Banner/Banner.tsx +94 -7
- package/src/Blockquote/Blockquote.spec.md +171 -0
- package/src/BottomSheet/BottomSheet.doc.mjs +106 -24
- package/src/BottomSheet/BottomSheet.spec.md +269 -40
- package/src/BottomSheet/BottomSheet.test.tsx +491 -5
- package/src/BottomSheet/BottomSheet.tsx +544 -145
- package/src/BottomSheet/BottomSheetHostContext.ts +44 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +21 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +166 -57
- package/src/BottomSheet/BottomSheetReplace.test.tsx +1526 -0
- package/src/BottomSheet/BottomSheetStacking.announce.test.tsx +246 -0
- package/src/BottomSheet/BottomSheetStacking.test.tsx +3184 -0
- package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +27 -31
- package/src/BottomSheet/BottomSheetSwitcher.spec.md +138 -43
- package/src/BottomSheet/BottomSheetSwitcher.tsx +275 -26
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +6 -0
- package/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts +83 -0
- package/src/BottomSheet/bottomSheetEscape.ts +21 -0
- package/src/BottomSheet/bottomSheetStack.ts +2031 -0
- package/src/BottomSheet/useSheetGestures.ts +68 -12
- package/src/Breadcrumbs/BreadcrumbItem.spec.md +96 -59
- package/src/Breadcrumbs/BreadcrumbItem.tsx +5 -0
- package/src/Breadcrumbs/Breadcrumbs.spec.md +165 -0
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +22 -0
- package/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts +1 -0
- package/src/Button/Button.spec.md +322 -0
- package/src/Button/Button.test.tsx +8 -1
- package/src/Button/Button.tsx +36 -7
- package/src/Button/__tests__/Button.a11y.chromium.spec.ts +1 -0
- package/src/ButtonGroup/ButtonGroup.spec.md +218 -0
- package/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts +1 -0
- package/src/Card/Card.spec.md +205 -0
- package/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts +1 -0
- package/src/Chat/ChatComposer.test.tsx +54 -0
- package/src/Chat/ChatComposer.tsx +41 -27
- package/src/Chat/ChatComposerInput.test.tsx +165 -21
- package/src/Chat/ChatComposerInput.tsx +73 -16
- package/src/Chat/ChatMessageMetadata.tsx +1 -1
- package/src/Chat/ChatPastedTextToken.test.tsx +71 -0
- package/src/Chat/ChatPastedTextToken.tsx +8 -7
- package/src/Chat/ChatToolCalls.tsx +5 -5
- package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts +1 -0
- package/src/CheckboxInput/CheckboxInput.spec.md +97 -66
- package/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts +1 -0
- package/src/CheckboxList/CheckboxList.spec.md +92 -78
- package/src/CheckboxList/CheckboxListItem.spec.md +86 -60
- package/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts +1 -0
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -2
- package/src/ClickableCard/ClickableCard.test.tsx +14 -3
- package/src/ClickableCard/ClickableCard.tsx +44 -28
- package/src/Code/Code.spec.md +30 -32
- package/src/CodeBlock/CodeBlock.doc.mjs +21 -4
- package/src/CodeBlock/CodeBlock.spec.md +96 -61
- package/src/CodeBlock/CodeBlock.test.tsx +97 -1
- package/src/CodeBlock/CodeBlock.tsx +132 -22
- package/src/CodeBlock/CodeLanguage.test.tsx +173 -0
- package/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts +290 -0
- package/src/CodeBlock/__tests__/CodeBlockLanguages.a11y.chromium.spec.ts +64 -0
- package/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts +1 -0
- package/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts +1 -0
- package/src/CodeBlock/grammar.ts +291 -0
- package/src/CodeBlock/index.ts +7 -0
- package/src/CodeBlock/languages/dockerfile.ts +43 -0
- package/src/CodeBlock/languages/graphql.ts +30 -0
- package/src/CodeBlock/languages/java.ts +28 -0
- package/src/CodeBlock/languages/lua.ts +21 -0
- package/src/CodeBlock/languages/objective-c.ts +26 -0
- package/src/CodeBlock/languages/powershell.ts +31 -0
- package/src/CodeBlock/languages/ruby.ts +29 -0
- package/src/CodeBlock/languages/thrift.ts +32 -0
- package/src/CodeBlock/languages/toml.ts +36 -0
- package/src/CodeBlock/languages.test.ts +402 -0
- package/src/CodeBlock/tokenizer.ts +176 -16
- package/src/CodeBlock/tokenizerBudget.test.ts +112 -0
- package/src/Collapsible/Collapsible.doc.mjs +6 -0
- package/src/Collapsible/Collapsible.spec.md +26 -23
- package/src/Collapsible/Collapsible.tsx +121 -2
- package/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts +1 -0
- package/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts +1 -0
- package/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/CommandPalette.perf.test.ts +8 -4
- package/src/CommandPalette/CommandPalette.tsx +17 -1
- package/src/CommandPalette/CommandPaletteEmpty.doc.mjs +6 -3
- package/src/CommandPalette/CommandPaletteEmpty.spec.md +190 -0
- package/src/CommandPalette/CommandPaletteEmpty.tsx +4 -0
- package/src/CommandPalette/CommandPaletteInput.tsx +21 -2
- package/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteEmptyAudit.a11y.chromium.spec.ts +715 -0
- package/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/busyStartSettle.ts +26 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +1 -1
- package/src/ComplexSelector/ComplexSelector.focusableDisabled.test.tsx +1 -1
- package/src/ComplexSelector/ComplexSelector.fr10.test.tsx +9 -9
- package/src/ComplexSelector/ComplexSelector.spec.md +161 -107
- package/src/ComplexSelector/ComplexSelector.test.tsx +236 -17
- package/src/ComplexSelector/ComplexSelector.tsx +69 -4
- package/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts +965 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +1 -1
- package/src/ContextMenu/ContextMenu.spec.md +38 -30
- package/src/ContextMenu/ContextMenu.test.tsx +189 -11
- package/src/ContextMenu/ContextMenu.tsx +75 -17
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +1 -0
- package/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts +1 -0
- package/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts +117 -0
- package/src/DateInput/DateInput.tsx +9 -4
- package/src/DateInput/DateInputTouch.test.tsx +10 -1
- package/src/DateInput/NativeDateField.tsx +2 -1
- package/src/DateInput/TouchDateField.tsx +2 -1
- package/src/DateInput/Wheel.tsx +4 -1
- package/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts +1 -0
- package/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts +171 -0
- package/src/Dialog/Dialog.doc.mjs +201 -47
- package/src/Dialog/Dialog.tsx +37 -10
- package/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts +1 -0
- package/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts +1 -0
- package/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts +191 -0
- package/src/Divider/Divider.spec.md +79 -70
- package/src/Drawer/Drawer.tsx +38 -35
- package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +1 -0
- package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/DropdownMenu.spec.md +14 -6
- package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +44 -8
- package/src/DropdownMenu/DropdownMenu.test.tsx +64 -5
- package/src/DropdownMenu/DropdownMenu.tsx +47 -21
- package/src/DropdownMenu/DropdownMenuItem.tsx +5 -5
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +5 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +226 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +32 -16
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +158 -0
- package/src/DropdownMenu/DropdownMenuSheetFirstOpen.test.tsx +72 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +9 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +225 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +105 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +6 -6
- package/src/DropdownMenu/MenuBottomSheet.tsx +42 -7
- package/src/DropdownMenu/MenuBottomSheetActionList.tsx +3 -3
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts +540 -0
- package/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts +671 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts +238 -0
- package/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +28 -2
- package/src/DropdownMenu/menuBottomSheet.stylex.ts +33 -0
- package/src/DropdownMenu/menuItemHover.ts +13 -1
- package/src/DropdownMenu/modules/useMenuPress.spec.md +90 -62
- package/src/DropdownMenu/useMenuDrillIn.tsx +7 -5
- package/src/EmptyState/EmptyState.announce.test.tsx +227 -0
- package/src/EmptyState/EmptyState.doc.mjs +1 -1
- package/src/EmptyState/EmptyState.spec.md +22 -14
- package/src/EmptyState/EmptyState.test.tsx +8 -8
- package/src/EmptyState/EmptyState.tsx +7 -5
- package/src/Field/Field.tsx +1 -1
- package/src/Field/FieldLabel.tsx +1 -1
- package/src/Field/PanelSearchInput.tsx +23 -13
- package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +1 -0
- package/src/Field/inputDisabledFocus.ts +28 -0
- package/src/Field/inputStyles.stylex.ts +15 -15
- package/src/FieldStatus/FieldStatus.test.tsx +12 -0
- package/src/FieldStatus/FieldStatus.tsx +12 -3
- package/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts +1 -0
- package/src/FileInput/FileInput.test.tsx +78 -0
- package/src/FileInput/FileInput.tsx +11 -9
- package/src/Heading/Heading.spec.md +198 -0
- package/src/HoverCard/HoverCard.test.tsx +93 -3
- package/src/Icon/Icon.doc.mjs +53 -5
- package/src/Icon/Icon.spec.md +40 -29
- package/src/Icon/Icon.test.tsx +266 -9
- package/src/Icon/Icon.tsx +51 -13
- package/src/Icon/IconSize.stylex.ts +27 -11
- package/src/Icon/globalIconRegistry.test.tsx +326 -3
- package/src/Icon/globalIconRegistry.tsx +137 -36
- package/src/Icon/index.ts +29 -1
- package/src/Icon/useIcon.ts +5 -1
- package/src/IconButton/IconButton.spec.md +197 -0
- package/src/IconButton/IconButton.test.tsx +5 -2
- package/src/InputGroup/InputGroup.spec.md +199 -0
- package/src/InputGroup/InputGroup.test.tsx +120 -0
- package/src/InputGroup/InputGroup.tsx +59 -52
- package/src/InputGroup/InputGroupInternalContext.ts +15 -0
- package/src/InputGroup/InputGroupText.spec.md +139 -0
- package/src/InputGroup/InputGroupText.tsx +2 -0
- package/src/InputGroup/groupStyles.ts +22 -11
- package/src/Item/Item.test.tsx +118 -0
- package/src/Item/Item.tsx +5 -3
- package/src/Item/ItemSwipeLayer.tsx +9 -0
- package/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts +1 -0
- package/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts +186 -0
- package/src/Item/useSwipeAction.ts +71 -5
- package/src/Kbd/Kbd.test.tsx +95 -0
- package/src/Kbd/Kbd.tsx +30 -23
- package/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts +176 -0
- package/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts +200 -0
- package/src/Layer/layerAnimations.stylex.ts +22 -2
- package/src/Layer/layerDismissalInvariants.test.tsx +9 -0
- package/src/Layer/layerSlideRules.ts +141 -8
- package/src/Layer/layerStack.ts +129 -62
- package/src/Layer/modalOutlet.ts +156 -15
- package/src/Layer/preserveAnimations.ts +304 -0
- package/src/Layer/useLayer.doc.mjs +1 -1
- package/src/Layer/useLayer.test.tsx +743 -0
- package/src/Layer/useLayer.tsx +592 -53
- package/src/Layer/useLayerDismissal.test.tsx +85 -2
- package/src/Layer/useLayerDismissal.ts +12 -9
- package/src/Layer/useTouchTrigger.ts +95 -41
- package/src/Layout/Layout.tsx +18 -0
- package/src/Layout/LayoutContent.tsx +5 -14
- package/src/Layout/LayoutFooter.tsx +2 -0
- package/src/Layout/LayoutHeader.tsx +2 -0
- package/src/Layout/__tests__/Layout.a11y.chromium.spec.ts +1 -0
- package/src/Layout/layoutEdges.stylex.ts +25 -0
- package/src/Lightbox/Lightbox.test.tsx +83 -0
- package/src/Lightbox/Lightbox.tsx +149 -125
- package/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts +78 -0
- package/src/Lightbox/LightboxViewport.a11y.browser.spec.ts +70 -0
- package/src/Link/Link.spec.md +229 -0
- package/src/Link/LinkProvider.spec.md +167 -0
- package/src/Link/__tests__/Link.a11y.chromium.spec.ts +1 -0
- package/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts +1 -0
- package/src/List/List.spec.md +90 -33
- package/src/List/ListItem.doc.mjs +3 -3
- package/src/Markdown/Markdown.codeLanguages.test.tsx +137 -0
- package/src/Markdown/Markdown.doc.mjs +12 -0
- package/src/Markdown/Markdown.fr23.bench.ts +3 -1
- package/src/Markdown/Markdown.fr23.perf.test.ts +45 -3
- package/src/Markdown/Markdown.fr23.sampling.ts +13 -4
- package/src/Markdown/Markdown.spec.md +71 -59
- package/src/Markdown/Markdown.tsx +32 -2
- package/src/Markdown/MarkdownTable.a11y.chromium.spec.ts +1 -0
- package/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts +1 -0
- package/src/MobileNav/MobileNav.spec.md +161 -64
- package/src/MobileNav/MobileNav.test.tsx +27 -10
- package/src/MobileNav/MobileNav.tsx +51 -38
- package/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts +103 -0
- package/src/MoreMenu/MoreMenu.doc.mjs +2 -2
- package/src/MoreMenu/MoreMenu.spec.md +88 -53
- package/src/MultiSelector/CreateRow.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/MultiSelector.test.tsx +122 -10
- package/src/MultiSelector/MultiSelector.tsx +24 -4
- package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts +1 -0
- package/src/NavIcon/NavIcon.spec.md +66 -38
- package/src/NavMenu/NavHeadingMenu.spec.md +100 -44
- package/src/NavMenu/NavHeadingMenu.test.tsx +199 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +54 -6
- package/src/NumberInput/NumberInput.doc.mjs +6 -6
- package/src/NumberInput/NumberInput.spec.md +248 -0
- package/src/NumberInput/NumberInput.test.tsx +187 -14
- package/src/NumberInput/NumberInput.tsx +86 -24
- package/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts +1 -0
- package/src/Pagination/Pagination.test.tsx +2 -2
- package/src/Popover/Popover.doc.mjs +38 -2
- package/src/Popover/Popover.spec.md +89 -10
- package/src/Popover/Popover.test.tsx +340 -2
- package/src/Popover/Popover.tsx +401 -35
- package/src/Popover/PopoverPresentation.test.tsx +952 -0
- package/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts +205 -0
- package/src/Popover/index.ts +5 -1
- package/src/Popover/lazyPopoverBottomSheet.ts +57 -0
- package/src/Popover/usePopover.tsx +11 -5
- package/src/PowerSearch/PowerSearch.spec.md +423 -53
- package/src/PowerSearch/PowerSearch.test.tsx +77 -1
- package/src/PowerSearch/PowerSearch.tsx +7 -5
- package/src/ProgressBar/ProgressBar.test.tsx +12 -0
- package/src/ProgressBar/ProgressBar.tsx +18 -0
- package/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts +1 -0
- package/src/RadioList/RadioList.test.tsx +34 -7
- package/src/RadioList/RadioListItem.press.source-build.test.mjs +80 -0
- package/src/RadioList/RadioListItem.tsx +26 -12
- package/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts +1 -0
- package/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts +1 -0
- package/src/ScrollableArea/ScrollableArea.spec.md +6 -5
- package/src/ScrollableArea/ScrollableArea.test.tsx +5 -0
- package/src/ScrollableArea/ScrollableArea.tsx +4 -0
- package/src/SelectableCard/SelectableCard.doc.mjs +7 -6
- package/src/SelectableCard/SelectableCard.test.tsx +11 -1
- package/src/SelectableCard/SelectableCard.tsx +49 -33
- package/src/Selector/Selector.spec.md +12 -4
- package/src/Selector/Selector.test.tsx +114 -8
- package/src/Selector/Selector.tsx +19 -4
- package/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Selector.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts +1 -0
- package/src/SideNav/SideNav.spec.md +51 -30
- package/src/SideNav/SideNav.test.tsx +290 -25
- package/src/SideNav/SideNavCollapseButton.spec.md +161 -0
- package/src/SideNav/SideNavHeading.spec.md +219 -0
- package/src/SideNav/SideNavHeading.tsx +41 -0
- package/src/SideNav/SideNavItem.spec.md +246 -0
- package/src/SideNav/SideNavItem.tsx +40 -9
- package/src/SideNav/SideNavSection.spec.md +153 -0
- package/src/Skeleton/Skeleton.spec.md +99 -42
- package/src/Skeleton/Skeleton.test.tsx +108 -1
- package/src/Skeleton/Skeleton.tsx +30 -2
- package/src/Slider/Slider.test.tsx +172 -0
- package/src/Slider/Slider.tsx +60 -12
- package/src/Slider/__tests__/Slider.a11y.chromium.spec.ts +1 -0
- package/src/Spinner/Spinner.spec.md +231 -0
- package/src/StatusDot/StatusDot.spec.md +139 -51
- package/src/StatusDot/StatusDot.test.tsx +13 -0
- package/src/StatusDot/StatusDot.tsx +27 -0
- package/src/Stepper/Step.spec.md +206 -0
- package/src/Stepper/Step.tsx +19 -3
- package/src/Stepper/Stepper.test.tsx +50 -0
- package/src/Switch/Switch.focusRing.source-build.test.mjs +81 -0
- package/src/Switch/Switch.tsx +11 -9
- package/src/Switch/__tests__/Switch.a11y.chromium.spec.ts +1 -0
- package/src/Switch/switch.markers.stylex.ts +7 -2
- package/src/TabList/Tab.spec.md +201 -0
- package/src/TabList/Tab.tsx +7 -1
- package/src/TabList/TabList.doc.mjs +3 -3
- package/src/TabList/TabMenu.spec.md +196 -0
- package/src/TabList/TabMenu.tsx +2 -0
- package/src/TabList/__tests__/TabListOverflow.interaction.browser.spec.ts +99 -0
- package/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts +1 -0
- package/src/Table/Table.spec.md +54 -30
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +2 -0
- package/src/Table/__tests__/Table.a11y.chromium.spec.ts +129 -0
- package/src/Table/__tests__/Table.a11y.contracts.ts +35 -0
- package/src/Table/__tests__/Table.a11y.renders.tsx +112 -0
- package/src/Table/__tests__/Table.a11y.states.ts +140 -0
- package/src/Table/__tests__/Table.a11y.test.tsx +198 -0
- package/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts +1 -0
- package/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts +1 -0
- package/src/Table/__tests__/TableStickyDividers.a11y.browser.spec.ts +560 -0
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +23 -8
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +91 -9
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +120 -5
- package/src/Table/plugins/sortable/__tests__/useTableSortable.a11y.test.tsx +174 -0
- package/src/Table/plugins/sortable/__tests__/useTableSortable.a11y.ts +86 -0
- package/src/Table/plugins/sortable/useTableSortable.test.tsx +0 -12
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.test.tsx +51 -1
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +291 -12
- package/src/Table/rowDivider.ts +154 -0
- package/src/Text/Text.spec.md +114 -127
- package/src/TextArea/TextArea.doc.mjs +6 -6
- package/src/TextArea/TextArea.spec.md +164 -64
- package/src/TextArea/TextArea.test.tsx +65 -6
- package/src/TextArea/TextArea.tsx +27 -15
- package/src/TextInput/TextInput.doc.mjs +8 -8
- package/src/TextInput/TextInput.spec.md +258 -0
- package/src/TextInput/TextInput.test.tsx +83 -10
- package/src/TextInput/TextInput.tsx +46 -22
- package/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts +1 -0
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -2
- package/src/Thumbnail/Thumbnail.spec.md +244 -0
- package/src/Thumbnail/Thumbnail.test.tsx +120 -7
- package/src/Thumbnail/Thumbnail.tsx +77 -31
- package/src/TimeInput/TimeInput.spec.md +273 -0
- package/src/TimeInput/TimeInput.tsx +12 -4
- package/src/TimeInput/TouchTimeField.tsx +2 -1
- package/src/Timestamp/Timestamp.spec.md +252 -0
- package/src/Toast/ToastViewport.modalHost.test.tsx +630 -5
- package/src/Toast/ToastViewport.tsx +27 -2
- package/src/ToggleButton/ToggleButton.spec.md +256 -0
- package/src/ToggleButton/ToggleButtonGroup.spec.md +194 -0
- package/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts +1 -0
- package/src/Token/Token.spec.md +271 -0
- package/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts +1 -0
- package/src/Tokenizer/Tokenizer.props-type.test.tsx +126 -0
- package/src/Tokenizer/Tokenizer.spec.md +312 -71
- package/src/Tokenizer/Tokenizer.ssr.test.tsx +196 -0
- package/src/Tokenizer/Tokenizer.test.tsx +70 -16
- package/src/Tokenizer/Tokenizer.tsx +651 -113
- package/src/Tokenizer/TokenizerBottomSheet.test.tsx +2719 -0
- package/src/Tokenizer/TokenizerBottomSheet.tsx +957 -0
- package/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts +505 -0
- package/src/Tokenizer/useEndLaneReserve.ts +3 -2
- package/src/Toolbar/Toolbar.spec.md +101 -48
- package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/Tooltip.test.tsx +171 -3
- package/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/Tooltip.a11y.states.ts +2 -2
- package/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/TooltipTallContent.a11y.browser.spec.ts +646 -0
- package/src/Tooltip/__tests__/TooltipTallContentTracking.a11y.browser.spec.ts +1162 -0
- package/src/Tooltip/useTooltip.tsx +7 -2
- package/src/TopNav/TopNav.spec.md +190 -0
- package/src/TopNav/TopNavHeading.spec.md +204 -0
- package/src/TopNav/TopNavItem.spec.md +189 -0
- package/src/TopNav/TopNavMegaMenu.reduced-motion.source-build.test.mjs +83 -0
- package/src/TopNav/TopNavMegaMenu.spec.md +190 -0
- package/src/TopNav/TopNavMegaMenu.tsx +21 -4
- package/src/TopNav/TopNavMegaMenuFeaturedCard.spec.md +150 -0
- package/src/TopNav/TopNavMegaMenuItem.spec.md +155 -0
- package/src/TopNav/TopNavMenu.spec.md +195 -0
- package/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts +1 -0
- package/src/TreeList/TreeList.doc.mjs +13 -0
- package/src/TreeList/TreeList.spec.md +51 -35
- package/src/TreeList/TreeList.tsx +234 -2
- package/src/TreeList/TreeListItem.tsx +12 -2
- package/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts +1 -0
- package/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts +1 -0
- package/src/Typeahead/BaseTypeahead.tsx +14 -2
- package/src/Typeahead/Typeahead.test.tsx +114 -1
- package/src/Typeahead/Typeahead.tsx +34 -16
- package/src/VisuallyHidden/VisuallyHidden.doc.mjs +1 -1
- package/src/VisuallyHidden/VisuallyHidden.spec.md +170 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +39 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +38 -5
- package/src/__tests__/BusyOwnerAnnouncement.test.tsx +66 -5
- package/src/__tests__/CardPress.a11y.chromium.spec.ts +353 -0
- package/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts +2 -1
- package/src/__tests__/PressedState.a11y.chromium.spec.ts +1 -0
- package/src/__tests__/pressState.ts +43 -1
- package/src/__tests__/unthemedLength.ts +34 -0
- package/src/gestures/GestureArena.ts +966 -0
- package/src/gestures/GestureRecognizer.ts +626 -0
- package/src/gestures/LongPressGestureRecognizer.ts +186 -0
- package/src/gestures/PanGestureRecognizer.ts +410 -0
- package/src/gestures/TapGestureRecognizer.ts +192 -0
- package/src/gestures/VelocityTracker.ts +194 -0
- package/src/gestures/__tests__/LongPressGestureRecognizer.test.ts +141 -0
- package/src/gestures/__tests__/PanGestureRecognizer.test.ts +327 -0
- package/src/gestures/__tests__/TapGestureRecognizer.test.ts +154 -0
- package/src/gestures/__tests__/VelocityTracker.test.ts +261 -0
- package/src/gestures/__tests__/arena.test.ts +824 -0
- package/src/gestures/__tests__/arenaContinuous.test.ts +207 -0
- package/src/gestures/__tests__/arenaTapLongPress.test.ts +211 -0
- package/src/gestures/__tests__/harness.ts +204 -0
- package/src/gestures/geometry.ts +55 -0
- package/src/gestures/types.ts +161 -0
- package/src/hooks/AnnounceRenderedText.tsx +27 -0
- package/src/hooks/ModalAnnounceProvider.tsx +155 -0
- package/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts +98 -4
- package/src/hooks/actionGroupTracker.exports.test.ts +28 -0
- package/src/hooks/actionGroupTracker.test.ts +510 -0
- package/src/hooks/actionGroupTracker.ts +449 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/modalAnnounce.ts +439 -0
- package/src/hooks/useAdaptivePresentation.ts +46 -9
- package/src/hooks/useAnimatedLayout.doc.mjs +101 -0
- package/src/hooks/useAnimatedLayout.ts +61 -0
- package/src/hooks/useAnnounce.doc.mjs +4 -4
- package/src/hooks/useAnnounce.modal.test.tsx +1291 -0
- package/src/hooks/useAnnounce.test.tsx +64 -4
- package/src/hooks/useAnnounce.ts +452 -28
- package/src/hooks/useAnnounceRenderedText.adopters.test.tsx +226 -0
- package/src/hooks/useAnnounceRenderedText.ts +81 -11
- package/src/hooks/useBusyAnnouncement.adopters.test.tsx +69 -0
- package/src/hooks/useBusyAnnouncement.test.tsx +112 -0
- package/src/hooks/useBusyAnnouncement.ts +64 -54
- package/src/hooks/useFocusTrap.doc.mjs +3 -3
- package/src/hooks/useFocusTrap.test.tsx +135 -2
- package/src/hooks/useFocusTrap.ts +59 -27
- package/src/hooks/useMenuPress.doc.mjs +2 -2
- package/src/hooks/useMenuPress.test.tsx +5 -2
- package/src/hooks/useMenuPress.ts +72 -37
- package/src/hooks/useScrollableArea.test.tsx +159 -0
- package/src/hooks/useScrollableArea.ts +39 -5
- package/src/i18n/generated-locales/en.generated.ts +35 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +37 -0
- package/src/internal/tokenizer-presentation.test.ts +29 -0
- package/src/internal/tokenizer-presentation.ts +25 -0
- package/src/internal/touch.test.ts +44 -0
- package/src/internal/touch.ts +41 -0
- package/src/motion/LayoutChangeSnapshot.tsx +50 -0
- package/src/motion/MEASUREMENTS.md +271 -0
- package/src/motion/README.md +218 -0
- package/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts +1507 -0
- package/src/motion/__tests__/animatedLayoutAdopters.interaction.browser.spec.ts +217 -0
- package/src/motion/__tests__/animatedLayoutBundle.ts +17 -0
- package/src/motion/animatedLayout.boundary.test.ts +139 -0
- package/src/motion/animatedLayout.test.ts +965 -0
- package/src/motion/animatedLayout.ts +1322 -0
- package/src/motion/animatedLayoutAdopters.test.tsx +500 -0
- package/src/motion/animator.test.ts +2653 -0
- package/src/motion/animator.ts +2794 -0
- package/src/motion/bezier.test.ts +52 -0
- package/src/motion/bezier.ts +64 -0
- package/src/motion/coast.test.ts +99 -0
- package/src/motion/coast.ts +150 -0
- package/src/motion/decay.test.ts +120 -0
- package/src/motion/decay.ts +126 -0
- package/src/motion/projection.test.ts +107 -0
- package/src/motion/projection.ts +116 -0
- package/src/motion/reducedMotion.stylex.ts +41 -0
- package/src/motion/reducedMotion.test.ts +129 -0
- package/src/motion/reducedMotion.ts +94 -0
- package/src/motion/reducedMotionPlan.test.ts +182 -0
- package/src/motion/reducedMotionPlan.ts +263 -0
- package/src/motion/resolveSnapPoint.test.ts +189 -0
- package/src/motion/resolveSnapPoint.ts +169 -0
- package/src/motion/roleValue.ts +105 -0
- package/src/motion/roles.test.ts +256 -0
- package/src/motion/roles.ts +262 -0
- package/src/motion/rubberBand.test.ts +88 -0
- package/src/motion/rubberBand.ts +115 -0
- package/src/motion/selectPage.test.ts +31 -0
- package/src/motion/selectPage.ts +55 -0
- package/src/motion/spring.test.ts +650 -0
- package/src/motion/spring.ts +551 -0
- package/src/motion/uikit/gestures.test.ts +89 -0
- package/src/motion/uikit/gestures.ts +359 -0
- package/src/motion/uikit/index.ts +80 -0
- package/src/motion/uikit/navigation.ts +83 -0
- package/src/motion/uikit/scroll.ts +141 -0
- package/src/motion/uikit/springRows.test.ts +71 -0
- package/src/motion/uikit/springs.ts +514 -0
- package/src/motion/uikit/timing.ts +210 -0
- package/src/motion/uikit/uikit.test.ts +364 -0
- package/src/motion/uikit/values.test.ts +110 -0
- package/src/reset.a11y.chromium.spec.ts +1 -0
- package/src/reset.until-found.a11y.browser.spec.ts +1 -0
- package/src/serverSafeComponents.test.ts +10 -0
- package/src/tailwind-theme.css +51 -1
- package/src/tailwind-theme.test.ts +51 -0
- package/src/theme/Theme.test.tsx +28 -0
- package/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts +1 -0
- package/src/theme/declarationBoundary.ts +282 -1
- package/src/theme/defineTheme.test.ts +529 -12
- package/src/theme/defineTheme.ts +175 -19
- package/src/theme/derivedVarRegistry.test.ts +28 -5
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/expandMotionScale.test.ts +17 -0
- package/src/theme/generateThemeRules.ts +772 -35
- package/src/theme/index.ts +3 -0
- package/src/theme/onMediaTokens.test.ts +186 -0
- package/src/theme/statusColor.ts +189 -0
- package/src/theme/statusRoleDerivation.ts +289 -0
- package/src/theme/themeAdaptations.test.ts +412 -0
- package/src/theme/themeAdaptations.ts +43 -1
- package/src/theme/tokens.stylex.ts +31 -2
- package/src/theme/tokens.test.ts +96 -1
- package/src/theme/tokens.ts +23 -1
- package/src/theme/useTheme.ts +10 -4
- package/src/utils/customPropertyArmLayering.test.ts +131 -0
- package/src/utils/edgeAutoscroll.test.ts +192 -0
- package/src/utils/edgeAutoscroll.ts +111 -0
- package/src/utils/hitArea.test.ts +628 -0
- package/src/utils/hitArea.ts +770 -0
- package/src/utils/touchPresentation.test.ts +323 -0
- package/src/utils/touchPresentation.ts +153 -0
|
@@ -4,24 +4,37 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file Tokenizer.tsx
|
|
7
|
-
* @input Uses React, BaseTypeahead, Field, Token, useAnnounce
|
|
8
|
-
*
|
|
7
|
+
* @input Uses React, BaseTypeahead, Field, Token, useAnnounce,
|
|
8
|
+
* useAdaptivePresentation, and TokenizerBottomSheet (lazy)
|
|
9
|
+
* @output Exports Tokenizer multi-select typeahead component, and the
|
|
10
|
+
* internal TokenizerWithPresentation signature the `internal/tokenizer-presentation`
|
|
11
|
+
* entry re-exports
|
|
9
12
|
* @position Composed component; forwards DOM ref and exposes focus control via
|
|
10
|
-
* handleRef
|
|
13
|
+
* handleRef. The sheet presentation — a trigger that opens
|
|
14
|
+
* TokenizerBottomSheet — is implemented but not exposed: `TokenizerProps`
|
|
15
|
+
* offers no `experimental.presentation` while its user experience is being
|
|
16
|
+
* finished (`component:Tokenizer` DEC-3, implementation gap), and only
|
|
17
|
+
* Astryx's own packages reach it through the internal entry
|
|
18
|
+
* (`architecture:react-component-runtime` INV13).
|
|
11
19
|
*
|
|
12
20
|
* SYNC: When modified, update:
|
|
13
21
|
* - /packages/core/src/Tokenizer/index.ts
|
|
22
|
+
* - /packages/core/src/Tokenizer/TokenizerBottomSheet.tsx (sheet presentation)
|
|
14
23
|
* - /apps/storybook/stories/Tokenizer.stories.tsx
|
|
15
24
|
* - /packages/cli/assets/templates/blocks/components/Tokenizer/ (showcase blocks)
|
|
16
25
|
*/
|
|
17
26
|
|
|
18
27
|
import React, {
|
|
28
|
+
lazy,
|
|
29
|
+
Suspense,
|
|
19
30
|
useCallback,
|
|
31
|
+
useEffect,
|
|
20
32
|
useId,
|
|
21
33
|
useImperativeHandle,
|
|
22
34
|
useMemo,
|
|
23
35
|
useRef,
|
|
24
36
|
useState,
|
|
37
|
+
type ComponentType,
|
|
25
38
|
type ReactNode,
|
|
26
39
|
type RefObject,
|
|
27
40
|
} from 'react';
|
|
@@ -39,6 +52,10 @@ import {
|
|
|
39
52
|
} from '../Field/fieldParts';
|
|
40
53
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
41
54
|
import {useBusyAnnouncement} from '../hooks/useBusyAnnouncement';
|
|
55
|
+
import {useAdaptivePresentation} from '../hooks/useAdaptivePresentation';
|
|
56
|
+
import {useIsHydrating} from '../hooks/useIsHydrating';
|
|
57
|
+
import {VisuallyHidden} from '../VisuallyHidden';
|
|
58
|
+
import {warnOnce} from '../utils/devWarning';
|
|
42
59
|
import type {SizeValue} from '../utils/types';
|
|
43
60
|
import {BaseTypeahead} from '../Typeahead/BaseTypeahead';
|
|
44
61
|
import {useSize} from '../SizeContext/SizeContext';
|
|
@@ -67,9 +84,10 @@ import {
|
|
|
67
84
|
typeScaleVars,
|
|
68
85
|
} from '../theme/tokens.stylex';
|
|
69
86
|
import type {SearchableItem, SearchSource} from '../Typeahead/types';
|
|
70
|
-
import {mergeProps} from '../utils';
|
|
87
|
+
import {composeEventHandlers, mergeProps} from '../utils';
|
|
71
88
|
import {themeProps} from '../utils/themeProps';
|
|
72
89
|
import {useTranslator} from '../i18n';
|
|
90
|
+
import type {TokenizerBottomSheetProps} from './TokenizerBottomSheet';
|
|
73
91
|
|
|
74
92
|
// Re-export status types for convenience
|
|
75
93
|
export type {
|
|
@@ -111,6 +129,36 @@ export interface TokenizerHandle {
|
|
|
111
129
|
blur(): void;
|
|
112
130
|
}
|
|
113
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The presentation options the sheet-capable signature admits. Not public:
|
|
134
|
+
* `TokenizerProps` has no `experimental` while the sheet's user experience is
|
|
135
|
+
* being finished; Astryx's own packages reach the sheet through
|
|
136
|
+
* `@astryxdesign/core/internal/tokenizer-presentation`.
|
|
137
|
+
*/
|
|
138
|
+
export interface TokenizerPresentationOptions {
|
|
139
|
+
/**
|
|
140
|
+
* How the field presents its choices.
|
|
141
|
+
* - `'popover'`: the inline combobox with its anchored suggestion menu —
|
|
142
|
+
* the stable behavior.
|
|
143
|
+
* - `'bottom-sheet'`: a trigger showing the selected tokens that opens one
|
|
144
|
+
* tall modal sheet: a search row on top, full-width checkbox rows that
|
|
145
|
+
* keep their place while the sheet is open, a create row with
|
|
146
|
+
* `hasCreate`, and a footer with a confirmed Clear all and Done. Suited
|
|
147
|
+
* to compact touch screens, where the inline combobox competes with the
|
|
148
|
+
* software keyboard.
|
|
149
|
+
* - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
|
|
150
|
+
* otherwise the popover — the same resolution Selector uses.
|
|
151
|
+
*
|
|
152
|
+
* In the sheet presentation the trigger is the control: `ref`, `id`,
|
|
153
|
+
* `aria-*`, and `data-*` reach it. `renderItem`, `renderToken`,
|
|
154
|
+
* `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`,
|
|
155
|
+
* `tokenOverflowBehavior`, and `hasAutoFocus` have no surface to act on
|
|
156
|
+
* and warn once in development.
|
|
157
|
+
* @default 'popover'
|
|
158
|
+
*/
|
|
159
|
+
presentation?: 'popover' | 'bottom-sheet' | 'adaptive';
|
|
160
|
+
}
|
|
161
|
+
|
|
114
162
|
export interface TokenizerProps<T extends SearchableItem> extends Omit<
|
|
115
163
|
FieldInputBaseProps<HTMLInputElement>,
|
|
116
164
|
'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown'
|
|
@@ -264,6 +312,28 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<
|
|
|
264
312
|
handleRef?: React.Ref<TokenizerHandle>;
|
|
265
313
|
}
|
|
266
314
|
|
|
315
|
+
/**
|
|
316
|
+
* The props of the sheet-capable signature: `TokenizerProps` plus the
|
|
317
|
+
* presentation options and a `ref` that also accepts the sheet presentation's
|
|
318
|
+
* trigger button, the control it stands for there. Not public: reached only
|
|
319
|
+
* as `TokenizerWithPresentation` through the internal entry, so the released
|
|
320
|
+
* `TokenizerProps` — an interface, so `interface X extends TokenizerProps<T>`,
|
|
321
|
+
* `Omit<TokenizerProps<T>, …>` and `ComponentProps<typeof Tokenizer>` keep
|
|
322
|
+
* their released shapes — names no presentation.
|
|
323
|
+
*/
|
|
324
|
+
export type TokenizerWithPresentationProps<T extends SearchableItem> = Omit<
|
|
325
|
+
TokenizerProps<T>,
|
|
326
|
+
'ref'
|
|
327
|
+
> & {
|
|
328
|
+
/** How the field presents its choices; see `TokenizerPresentationOptions`. */
|
|
329
|
+
experimental?: TokenizerPresentationOptions;
|
|
330
|
+
/**
|
|
331
|
+
* Ref forwarded to the control: the combobox input in the popover
|
|
332
|
+
* presentation, the trigger button in the sheet presentation.
|
|
333
|
+
*/
|
|
334
|
+
ref?: React.Ref<HTMLInputElement | HTMLButtonElement>;
|
|
335
|
+
};
|
|
336
|
+
|
|
267
337
|
// =============================================================================
|
|
268
338
|
// Styles
|
|
269
339
|
// =============================================================================
|
|
@@ -272,11 +342,8 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<
|
|
|
272
342
|
// because the input's reserve is derived from the same value.
|
|
273
343
|
const END_LANE_INSET = spacingVars['--spacing-2'];
|
|
274
344
|
const TOKEN_ROW_INSET = `calc(${spacingVars['--spacing-1']} - 1px)`;
|
|
275
|
-
//
|
|
276
|
-
//
|
|
277
|
-
const INPUT_CLEAR_COARSE_POINTER_OUTSET = '2px';
|
|
278
|
-
// Kept in sync with useEndLaneReserve: inputCompact reads the custom property
|
|
279
|
-
// directly so its empty-query pseudo-class can suppress the inner reserve.
|
|
345
|
+
// Kept in sync with useEndLaneReserve: wrapperWithTokens reads the custom
|
|
346
|
+
// property directly, to keep token rows and the input short of the lane.
|
|
280
347
|
const END_LANE_RESERVE_VAR = '--_tokenizer-end-lane-reserve';
|
|
281
348
|
|
|
282
349
|
const styles = stylex.create({
|
|
@@ -297,6 +364,10 @@ const styles = stylex.create({
|
|
|
297
364
|
// = 8 - 4 - 1 = 3px.
|
|
298
365
|
paddingBlock: TOKEN_ROW_INSET,
|
|
299
366
|
paddingInline: TOKEN_ROW_INSET,
|
|
367
|
+
// The end lane is out of flow, so tokens would wrap under it. Every row
|
|
368
|
+
// stops short of the measured lane instead; with no lane up the variable
|
|
369
|
+
// is absent and this is the ordinary inset.
|
|
370
|
+
paddingInlineEnd: `calc(${TOKEN_ROW_INSET} + var(${END_LANE_RESERVE_VAR}, 0px))`,
|
|
300
371
|
// Row gap must match paddingBlock so wrapped rows look evenly spaced.
|
|
301
372
|
rowGap: TOKEN_ROW_INSET,
|
|
302
373
|
},
|
|
@@ -310,6 +381,9 @@ const styles = stylex.create({
|
|
|
310
381
|
token: {
|
|
311
382
|
display: 'flex',
|
|
312
383
|
flexShrink: 0,
|
|
384
|
+
// A renderToken wrapper sizes to its content; cap it at the row so the
|
|
385
|
+
// pill inside truncates instead of running past the field.
|
|
386
|
+
maxWidth: '100%',
|
|
313
387
|
position: 'relative',
|
|
314
388
|
zIndex: 1,
|
|
315
389
|
},
|
|
@@ -325,6 +399,14 @@ const styles = stylex.create({
|
|
|
325
399
|
flexShrink: 0,
|
|
326
400
|
zIndex: 1,
|
|
327
401
|
},
|
|
402
|
+
idleSpinner: {
|
|
403
|
+
// Hides the Spinner's own box too, which a theme may paint, and covers
|
|
404
|
+
// engines without content-visibility. Both keep the box's size.
|
|
405
|
+
visibility: 'hidden',
|
|
406
|
+
// Skips the ring's rendering, and with it the infinite arc animation,
|
|
407
|
+
// while the root keeps its own explicit, themed width and height.
|
|
408
|
+
contentVisibility: 'hidden',
|
|
409
|
+
},
|
|
328
410
|
inputAtMax: {
|
|
329
411
|
width: 0,
|
|
330
412
|
minWidth: 0,
|
|
@@ -334,46 +416,36 @@ const styles = stylex.create({
|
|
|
334
416
|
position: 'absolute',
|
|
335
417
|
},
|
|
336
418
|
inputCompact: {
|
|
337
|
-
position:
|
|
338
|
-
default: 'relative',
|
|
339
|
-
':placeholder-shown': 'absolute',
|
|
340
|
-
},
|
|
419
|
+
position: 'relative',
|
|
341
420
|
boxSizing: 'border-box',
|
|
342
|
-
insetInlineStart: {
|
|
343
|
-
default: 'auto',
|
|
344
|
-
':placeholder-shown': TOKEN_ROW_INSET,
|
|
345
|
-
},
|
|
346
421
|
zIndex: 0,
|
|
422
|
+
// The input follows the last token in flow, so a focused empty input's
|
|
423
|
+
// caret sits where typed text will start. Empty, it asks only for that
|
|
424
|
+
// inset, and only while focused and editable: blurred or read-only (a
|
|
425
|
+
// disabled field with a disabledMessage stays focusable), it claims no
|
|
426
|
+
// room at all, not even the column gap, so it never grows the field a
|
|
427
|
+
// blank row. Typing restores the full editing width, which may wrap.
|
|
347
428
|
minWidth: {
|
|
348
429
|
default: '40px',
|
|
349
|
-
':placeholder-shown':
|
|
430
|
+
':placeholder-shown': 0,
|
|
350
431
|
},
|
|
351
432
|
flex: {
|
|
352
433
|
default: '1 1 40px',
|
|
353
|
-
':placeholder-shown': '
|
|
434
|
+
':placeholder-shown': '1 1 0px',
|
|
354
435
|
},
|
|
355
|
-
width:
|
|
436
|
+
width: 0,
|
|
437
|
+
marginInlineStart: {
|
|
356
438
|
default: 0,
|
|
357
|
-
':placeholder-shown': `calc(
|
|
439
|
+
':placeholder-shown:is(:not(:focus), :read-only)': `calc(-1 * ${spacingVars['--spacing-1']})`,
|
|
358
440
|
},
|
|
359
|
-
//
|
|
360
|
-
//
|
|
361
|
-
// with the pills for width. Logical insets stop it before the measured end
|
|
362
|
-
// lane plus InputClearButton's maximum invisible pointer outset; tokens and
|
|
363
|
-
// controls sit above it, leaving only genuine whitespace clickable as
|
|
364
|
-
// search. Typing restores the ordinary in-flow input.
|
|
441
|
+
// Restore normal text inset when input follows tokens, since the
|
|
442
|
+
// wrapper padding is reduced for border concentricity.
|
|
365
443
|
paddingInlineStart: {
|
|
366
444
|
default: `calc(${spacingVars['--spacing-2']} - ${spacingVars['--spacing-1']} + 1px)`,
|
|
367
|
-
':placeholder-shown': 0,
|
|
368
|
-
},
|
|
369
|
-
paddingInlineEnd: {
|
|
370
|
-
default: `var(${END_LANE_RESERVE_VAR}, 0px)`,
|
|
371
|
-
':placeholder-shown': spacingVars['--spacing-1'],
|
|
372
|
-
},
|
|
373
|
-
textAlign: {
|
|
374
|
-
default: 'start',
|
|
375
|
-
':placeholder-shown': 'end',
|
|
445
|
+
':placeholder-shown:is(:not(:focus), :read-only)': 0,
|
|
376
446
|
},
|
|
447
|
+
// wrapperWithTokens already keeps the in-flow input short of the lane.
|
|
448
|
+
paddingInlineEnd: 0,
|
|
377
449
|
},
|
|
378
450
|
truncatedWrapper: {
|
|
379
451
|
flexWrap: 'nowrap',
|
|
@@ -392,6 +464,55 @@ const styles = stylex.create({
|
|
|
392
464
|
color: colorVars['--color-text-secondary'],
|
|
393
465
|
paddingInline: spacingVars['--spacing-1'],
|
|
394
466
|
},
|
|
467
|
+
// The sheet presentation's trigger: the field's own control box, as a
|
|
468
|
+
// button. It wraps tokens like the inline field, but there is no input to
|
|
469
|
+
// type into, so the cursor says "press".
|
|
470
|
+
sheetTrigger: {
|
|
471
|
+
width: '100%',
|
|
472
|
+
fontFamily: 'inherit',
|
|
473
|
+
fontSize: 'inherit',
|
|
474
|
+
color: 'inherit',
|
|
475
|
+
textAlign: 'start',
|
|
476
|
+
appearance: 'none',
|
|
477
|
+
cursor: {
|
|
478
|
+
default: 'pointer',
|
|
479
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
// An aria-disabled button gets no system disabled paint in forced colors;
|
|
483
|
+
// GrayText is the platform's disabled affordance there. Defaults repeat the
|
|
484
|
+
// base values, since StyleX merges per property.
|
|
485
|
+
sheetTriggerDisabled: {
|
|
486
|
+
borderColor: {
|
|
487
|
+
default: colorVars['--color-border-emphasized'],
|
|
488
|
+
'@media (forced-colors: active)': 'GrayText',
|
|
489
|
+
},
|
|
490
|
+
color: {
|
|
491
|
+
default: null,
|
|
492
|
+
'@media (forced-colors: active)': 'GrayText',
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
sheetTriggerPlaceholder: {
|
|
496
|
+
color: colorVars['--color-text-secondary'],
|
|
497
|
+
// Match the input's text inset so the placeholder sits where the typed
|
|
498
|
+
// query would.
|
|
499
|
+
paddingInline: spacingVars['--spacing-1'],
|
|
500
|
+
},
|
|
501
|
+
sheetTriggerPlaceholderDisabled: {
|
|
502
|
+
color: {
|
|
503
|
+
default: colorVars['--color-text-secondary'],
|
|
504
|
+
'@media (forced-colors: active)': 'GrayText',
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
// A Token authors its own color, which forced colors replace with
|
|
508
|
+
// CanvasText; GrayText marks the tokens of a disabled trigger as disabled.
|
|
509
|
+
// The default repeats Token's own default color.
|
|
510
|
+
sheetTokenDisabled: {
|
|
511
|
+
color: {
|
|
512
|
+
default: colorVars['--color-text-primary'],
|
|
513
|
+
'@media (forced-colors: active)': 'GrayText',
|
|
514
|
+
},
|
|
515
|
+
},
|
|
395
516
|
});
|
|
396
517
|
|
|
397
518
|
const sizeStyles = stylex.create({
|
|
@@ -415,39 +536,6 @@ const endSectionSizeStyles = stylex.create({
|
|
|
415
536
|
},
|
|
416
537
|
});
|
|
417
538
|
|
|
418
|
-
const compactInputSizeStyles = stylex.create({
|
|
419
|
-
sm: {
|
|
420
|
-
insetBlockStart: {
|
|
421
|
-
default: 'auto',
|
|
422
|
-
':placeholder-shown': `calc(${sizeVars['--size-element-sm']} / 2 - 1px)`,
|
|
423
|
-
},
|
|
424
|
-
transform: {
|
|
425
|
-
default: 'none',
|
|
426
|
-
':placeholder-shown': 'translateY(-50%)',
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
md: {
|
|
430
|
-
insetBlockStart: {
|
|
431
|
-
default: 'auto',
|
|
432
|
-
':placeholder-shown': `calc(${sizeVars['--size-element-md']} / 2 - 1px)`,
|
|
433
|
-
},
|
|
434
|
-
transform: {
|
|
435
|
-
default: 'none',
|
|
436
|
-
':placeholder-shown': 'translateY(-50%)',
|
|
437
|
-
},
|
|
438
|
-
},
|
|
439
|
-
lg: {
|
|
440
|
-
insetBlockStart: {
|
|
441
|
-
default: 'auto',
|
|
442
|
-
':placeholder-shown': `calc(${sizeVars['--size-element-lg']} / 2 - 1px)`,
|
|
443
|
-
},
|
|
444
|
-
transform: {
|
|
445
|
-
default: 'none',
|
|
446
|
-
':placeholder-shown': 'translateY(-50%)',
|
|
447
|
-
},
|
|
448
|
-
},
|
|
449
|
-
});
|
|
450
|
-
|
|
451
539
|
const truncatedSizeStyles = stylex.create({
|
|
452
540
|
sm: {height: sizeVars['--size-element-sm']},
|
|
453
541
|
md: {height: sizeVars['--size-element-md']},
|
|
@@ -468,6 +556,46 @@ const layerPlaceholderSizeStyles = stylex.create({
|
|
|
468
556
|
// "Create: X" suggestions from real search results.
|
|
469
557
|
const CREATABLE_ID_PREFIX = '__xds_create__';
|
|
470
558
|
|
|
559
|
+
// The touch sheet (BottomSheet, its gestures, the confirmation dialog, and
|
|
560
|
+
// the empty state) only renders for the bottom-sheet presentation. Loading it
|
|
561
|
+
// on demand keeps it out of pages whose tokenizers stay inline combobox fields
|
|
562
|
+
// (`component:Tokenizer` PR6).
|
|
563
|
+
// One import promise, shared by the preload and the lazy element: the sheet
|
|
564
|
+
// presentation loads its chunk as soon as it is active, so the first press
|
|
565
|
+
// does not wait for the network, while nothing of the sheet is rendered until
|
|
566
|
+
// a press (`architecture:component-style-authoring` INV7).
|
|
567
|
+
const loadTokenizerBottomSheet = async () => import('./TokenizerBottomSheet');
|
|
568
|
+
const LazyTokenizerBottomSheet = lazy(async () =>
|
|
569
|
+
loadTokenizerBottomSheet().then(module => ({
|
|
570
|
+
default: module.TokenizerBottomSheet,
|
|
571
|
+
})),
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Hosts the lazily loaded sheet. Renders nothing on the server or in the
|
|
576
|
+
* render that hydrates server HTML: a lazy component that has not loaded yet
|
|
577
|
+
* would leave server markup incomplete and abort hydration. The closed sheet
|
|
578
|
+
* has no visible markup, so it first renders right after hydration.
|
|
579
|
+
*/
|
|
580
|
+
function TokenizerSheetHost<T extends SearchableItem>(
|
|
581
|
+
props: TokenizerBottomSheetProps<T>,
|
|
582
|
+
) {
|
|
583
|
+
const isHydrating = useIsHydrating();
|
|
584
|
+
if (isHydrating) {
|
|
585
|
+
return null;
|
|
586
|
+
}
|
|
587
|
+
// `lazy` erases the component's type parameter; the module exports the
|
|
588
|
+
// generic component this props type belongs to.
|
|
589
|
+
const Sheet = LazyTokenizerBottomSheet as unknown as ComponentType<
|
|
590
|
+
TokenizerBottomSheetProps<T>
|
|
591
|
+
>;
|
|
592
|
+
return (
|
|
593
|
+
<Suspense fallback={null}>
|
|
594
|
+
<Sheet {...props} />
|
|
595
|
+
</Suspense>
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
|
|
471
599
|
/**
|
|
472
600
|
* Multi-select input with token chips and typeahead search.
|
|
473
601
|
*
|
|
@@ -517,6 +645,13 @@ const CREATABLE_ID_PREFIX = '__xds_create__';
|
|
|
517
645
|
*
|
|
518
646
|
* Renders nothing when the lane would be empty, so `useEndLaneReserve` sees no
|
|
519
647
|
* element, publishes no width, and the input keeps its full content box.
|
|
648
|
+
*
|
|
649
|
+
* With `hasBusySlot` the Spinner stays mounted while idle, unrendered, not
|
|
650
|
+
* animating and out of the accessibility tree, so its box keeps the themed
|
|
651
|
+
* Spinner's own size.
|
|
652
|
+
* Token rows reserve the lane's measured width, so a Spinner that came and
|
|
653
|
+
* went with the search would re-wrap them, and widen a content-sized field,
|
|
654
|
+
* on every search.
|
|
520
655
|
*/
|
|
521
656
|
function EndLane({
|
|
522
657
|
lane,
|
|
@@ -525,6 +660,7 @@ function EndLane({
|
|
|
525
660
|
loadingLabel,
|
|
526
661
|
anchorRef,
|
|
527
662
|
hasStaticContent,
|
|
663
|
+
hasBusySlot,
|
|
528
664
|
children,
|
|
529
665
|
}: {
|
|
530
666
|
lane: BusyIndicatorLane;
|
|
@@ -533,6 +669,7 @@ function EndLane({
|
|
|
533
669
|
loadingLabel: string;
|
|
534
670
|
anchorRef: RefObject<Element | null>;
|
|
535
671
|
hasStaticContent: boolean;
|
|
672
|
+
hasBusySlot: boolean;
|
|
536
673
|
children: ReactNode;
|
|
537
674
|
}) {
|
|
538
675
|
const isBusy = useIsBusy(lane);
|
|
@@ -540,17 +677,35 @@ function EndLane({
|
|
|
540
677
|
// live region; the field announces each search's busy start instead
|
|
541
678
|
// (spec:AST-086 FR8).
|
|
542
679
|
useBusyAnnouncement(isBusy, loadingLabel, anchorRef);
|
|
543
|
-
if (!isBusy && !hasStaticContent) {
|
|
680
|
+
if (!isBusy && !hasStaticContent && !hasBusySlot) {
|
|
544
681
|
return null;
|
|
545
682
|
}
|
|
546
683
|
return (
|
|
547
684
|
<div ref={laneRef} {...stylex.props(laneXStyle)}>
|
|
548
|
-
{isBusy
|
|
685
|
+
{(isBusy || hasBusySlot) && (
|
|
686
|
+
<Spinner
|
|
687
|
+
// Remounts when a search starts, so the ring syncs its phase on
|
|
688
|
+
// mount exactly as a newly shown Spinner did before.
|
|
689
|
+
key={isBusy ? 'busy' : 'idle'}
|
|
690
|
+
size="sm"
|
|
691
|
+
aria-label={loadingLabel}
|
|
692
|
+
role="img"
|
|
693
|
+
aria-hidden={isBusy ? undefined : true}
|
|
694
|
+
xstyle={isBusy ? undefined : styles.idleSpinner}
|
|
695
|
+
/>
|
|
696
|
+
)}
|
|
549
697
|
{children}
|
|
550
698
|
</div>
|
|
551
699
|
);
|
|
552
700
|
}
|
|
553
701
|
|
|
702
|
+
// The public signature names no presentation: `ComponentProps<typeof
|
|
703
|
+
// Tokenizer>` and every public call resolve against `TokenizerProps`. The
|
|
704
|
+
// implementation also reads the presentation options, reached only through
|
|
705
|
+
// `TokenizerWithPresentation` below.
|
|
706
|
+
export function Tokenizer<T extends SearchableItem>(
|
|
707
|
+
props: TokenizerProps<T>,
|
|
708
|
+
): React.JSX.Element;
|
|
554
709
|
export function Tokenizer<T extends SearchableItem>({
|
|
555
710
|
label,
|
|
556
711
|
isLabelHidden = false,
|
|
@@ -596,15 +751,19 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
596
751
|
ref,
|
|
597
752
|
handleRef,
|
|
598
753
|
onKeyDown,
|
|
754
|
+
experimental,
|
|
599
755
|
id: idProp,
|
|
600
756
|
'aria-describedby': ariaDescribedByProp,
|
|
601
757
|
...restProps
|
|
602
|
-
}:
|
|
758
|
+
}: TokenizerWithPresentationProps<T>): React.JSX.Element {
|
|
603
759
|
const {rest, container} = useFieldInputStyling('Tokenizer', restProps, {
|
|
604
760
|
containerXstyle,
|
|
605
761
|
containerClassName,
|
|
606
762
|
containerStyle,
|
|
607
763
|
});
|
|
764
|
+
// A caller's onClick arrives through the base props; the sheet trigger
|
|
765
|
+
// composes it with its own open handler rather than letting either win.
|
|
766
|
+
const {onClick: callerOnClick, ...restWithoutClick} = rest;
|
|
608
767
|
const t = useTranslator();
|
|
609
768
|
const size = useSize(sizeProp, 'md');
|
|
610
769
|
const generatedInputId = useId();
|
|
@@ -614,10 +773,159 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
614
773
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
615
774
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
616
775
|
|
|
617
|
-
//
|
|
618
|
-
//
|
|
619
|
-
//
|
|
620
|
-
//
|
|
776
|
+
// Experimental presentation (`component:Tokenizer` DEC-3). `adaptive`
|
|
777
|
+
// resolves through the policy the selection controls share; an open sheet
|
|
778
|
+
// keeps its presentation until it closes, so a resolution change mid-task
|
|
779
|
+
// cannot pull the surface out from under the person.
|
|
780
|
+
const presentation = experimental?.presentation ?? 'popover';
|
|
781
|
+
const resolvedPresentation = useAdaptivePresentation(presentation);
|
|
782
|
+
const [isSheetOpen, setIsSheetOpen] = useState(false);
|
|
783
|
+
// Latched for the sheet's lifetime: a sheet stays presented after it closes
|
|
784
|
+
// until BottomSheet has run its exit and handed focus back to the trigger.
|
|
785
|
+
// Without the latch, `adaptive` resolving to `popover` mid-session (a phone
|
|
786
|
+
// turned to landscape) would unmount the sheet and the trigger it returns
|
|
787
|
+
// focus to in the same render, dropping focus to the page body
|
|
788
|
+
// (`component:Tokenizer` FR16).
|
|
789
|
+
const [isSheetPresented, setIsSheetPresented] = useState(false);
|
|
790
|
+
const isSheetPresentation =
|
|
791
|
+
isSheetOpen || isSheetPresented || resolvedPresentation === 'bottom-sheet';
|
|
792
|
+
// Preload the sheet's chunk while the sheet presentation is active, so the
|
|
793
|
+
// first press opens without waiting for the network; nothing renders.
|
|
794
|
+
useEffect(() => {
|
|
795
|
+
if (isSheetPresentation) {
|
|
796
|
+
void loadTokenizerBottomSheet();
|
|
797
|
+
}
|
|
798
|
+
}, [isSheetPresentation]);
|
|
799
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
800
|
+
// The sheet's query between presentations: the sheet is in the DOM only
|
|
801
|
+
// from a press until its exit completes, and a close the field forces
|
|
802
|
+
// keeps the query (FR18). The ref follows every report; the press
|
|
803
|
+
// snapshots it into the state the next presentation starts from.
|
|
804
|
+
const sheetQueryRef = useRef('');
|
|
805
|
+
const [sheetInitialQuery, setSheetInitialQuery] = useState('');
|
|
806
|
+
const handleSheetQueryChange = useCallback(
|
|
807
|
+
(query: string) => {
|
|
808
|
+
sheetQueryRef.current = query;
|
|
809
|
+
onChangeQuery?.(query);
|
|
810
|
+
},
|
|
811
|
+
[onChangeQuery],
|
|
812
|
+
);
|
|
813
|
+
// Whether the field's control — the inline input or the trigger — holds
|
|
814
|
+
// focus. Kept in a ref by the focus and blur handlers of both, because a
|
|
815
|
+
// control unmounted while focused fires no blur: when a presentation swap
|
|
816
|
+
// removes the focused control (the latch releasing into the popover, or
|
|
817
|
+
// `adaptive` changing while the sheet is closed), the new presentation's
|
|
818
|
+
// control takes the focus over once it has mounted, so focus never lands on
|
|
819
|
+
// the page body (`component:Tokenizer` FR16, `spec:AST-085` FR4).
|
|
820
|
+
const isControlFocusedRef = useRef(false);
|
|
821
|
+
// Set around a focus move the field makes itself — a presentation swap
|
|
822
|
+
// handing focus from one control to the other — so the receiving control
|
|
823
|
+
// does not report it as focus entering from outside.
|
|
824
|
+
const isHandingOffFocusRef = useRef(false);
|
|
825
|
+
// Whether the caller has been told focus entered the field in this visit,
|
|
826
|
+
// so `onBlur` is never reported without its `onFocus`: in Safari a click
|
|
827
|
+
// or tap does not focus a button, so a pointer-opened sheet reports no
|
|
828
|
+
// entry, and the one focus the trigger then gets — BottomSheet's return
|
|
829
|
+
// focus — is the entry to report.
|
|
830
|
+
const hasReportedFocusRef = useRef(false);
|
|
831
|
+
// A control can hold focus without the field having seen a focus event:
|
|
832
|
+
// the inline input server-rendered with `autofocus` (`hasAutoFocus`) is
|
|
833
|
+
// focused before hydration, and the swap to the trigger in the first
|
|
834
|
+
// render after it removes that input. React detaches the old control
|
|
835
|
+
// before any effect of the swapping commit runs, so the live focus is
|
|
836
|
+
// read during that render, while the control is still in the document —
|
|
837
|
+
// a read of `document.activeElement` only, with no update made in render.
|
|
838
|
+
const previousPresentationRef = useRef(isSheetPresentation);
|
|
839
|
+
if (previousPresentationRef.current !== isSheetPresentation) {
|
|
840
|
+
previousPresentationRef.current = isSheetPresentation;
|
|
841
|
+
if (typeof document !== 'undefined') {
|
|
842
|
+
const active = document.activeElement;
|
|
843
|
+
if (
|
|
844
|
+
active != null &&
|
|
845
|
+
(active === inputRef.current || active === triggerRef.current)
|
|
846
|
+
) {
|
|
847
|
+
isControlFocusedRef.current = true;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
useEffect(() => {
|
|
852
|
+
if (!isControlFocusedRef.current) {
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
const active = document.activeElement;
|
|
856
|
+
if (active != null && active !== document.body) {
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
isHandingOffFocusRef.current = true;
|
|
860
|
+
(isSheetPresentation ? triggerRef.current : inputRef.current)?.focus();
|
|
861
|
+
isHandingOffFocusRef.current = false;
|
|
862
|
+
}, [isSheetPresentation]);
|
|
863
|
+
// The trigger's accessible description names the selected tokens: the
|
|
864
|
+
// button's children are tokens whose own content assistive technology
|
|
865
|
+
// leaves out of a button's name (`spec:AST-020` FR1).
|
|
866
|
+
const triggerTokensId = useId();
|
|
867
|
+
// Each rendered token's id, for the trigger's description; the item id is
|
|
868
|
+
// an arbitrary string, so it is encoded rather than used as is.
|
|
869
|
+
const tokenElementId = (itemId: string) =>
|
|
870
|
+
`${triggerTokensId}-${encodeURIComponent(itemId)}`;
|
|
871
|
+
// Props that describe the inline combobox have no surface in the sheet
|
|
872
|
+
// presentation. Say so once in development rather than dropping them
|
|
873
|
+
// silently (`architecture:public-component-api` INV3).
|
|
874
|
+
const inertSheetProps = isSheetPresentation
|
|
875
|
+
? (
|
|
876
|
+
[
|
|
877
|
+
['renderItem', renderItem],
|
|
878
|
+
['renderToken', renderToken],
|
|
879
|
+
['endContent', endContent],
|
|
880
|
+
['hasClear', hasClear || undefined],
|
|
881
|
+
['hasEntriesOnFocus', hasEntriesOnFocus || undefined],
|
|
882
|
+
['menuWidth', menuWidth],
|
|
883
|
+
['tokenOverflowBehavior', tokenOverflowBehavior],
|
|
884
|
+
['hasAutoFocus', hasAutoFocus || undefined],
|
|
885
|
+
] as const
|
|
886
|
+
)
|
|
887
|
+
.filter(([, v]) => v !== undefined && v !== 'none')
|
|
888
|
+
.map(([name]) => name)
|
|
889
|
+
: [];
|
|
890
|
+
const inertSheetPropsKey = inertSheetProps.join(',');
|
|
891
|
+
useEffect(() => {
|
|
892
|
+
if (inertSheetPropsKey === '') {
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
warnOnce(
|
|
896
|
+
`tokenizer:sheet-inert:${inertSheetPropsKey}`,
|
|
897
|
+
'Tokenizer',
|
|
898
|
+
`\`${inertSheetProps.join('`, `')}\` ${
|
|
899
|
+
inertSheetProps.length === 1 ? 'has' : 'have'
|
|
900
|
+
} no surface in the bottom-sheet presentation and ${
|
|
901
|
+
inertSheetProps.length === 1 ? 'is' : 'are'
|
|
902
|
+
} not rendered there.`,
|
|
903
|
+
);
|
|
904
|
+
// eslint-disable-next-line @eslint-react/exhaustive-deps -- keyed by the joined names
|
|
905
|
+
}, [inertSheetPropsKey]);
|
|
906
|
+
// A field that becomes disabled cannot keep its sheet open, and must not
|
|
907
|
+
// reopen it when re-enabled (`component:Tokenizer` FR17). Adjusted in the
|
|
908
|
+
// render that sees the change, not an effect, so no frame shows both.
|
|
909
|
+
const [wasDisabled, setWasDisabled] = useState(isDisabled);
|
|
910
|
+
// A sheet that was open when the field became disabled stays mounted,
|
|
911
|
+
// closed, so it runs its exit and hands focus back to the trigger; a field
|
|
912
|
+
// that is disabled from the start mounts no sheet.
|
|
913
|
+
const [keepsSheetWhileDisabled, setKeepsSheetWhileDisabled] = useState(false);
|
|
914
|
+
if (isDisabled !== wasDisabled) {
|
|
915
|
+
setWasDisabled(isDisabled);
|
|
916
|
+
if (isDisabled && isSheetOpen) {
|
|
917
|
+
setIsSheetOpen(false);
|
|
918
|
+
setKeepsSheetWhileDisabled(true);
|
|
919
|
+
}
|
|
920
|
+
if (!isDisabled) {
|
|
921
|
+
setKeepsSheetWhileDisabled(false);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
// Disabled-reason tooltip. The tooltip listeners attach to the input wrapper
|
|
926
|
+
// and the typeahead input stays perceivable via aria-disabled instead of the
|
|
927
|
+
// disabled attribute. Input is blocked by the isDisabled guards in
|
|
928
|
+
// BaseTypeahead and handleWrapperClick.
|
|
621
929
|
const showsDisabledMessage = isDisabled && !!disabledMessage;
|
|
622
930
|
const disabledMessageTooltip = useTooltip({
|
|
623
931
|
placement: 'above',
|
|
@@ -627,12 +935,20 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
627
935
|
isEnabled: showsDisabledMessage,
|
|
628
936
|
});
|
|
629
937
|
|
|
938
|
+
// The sheet presentation has no input; the public ref reaches the trigger,
|
|
939
|
+
// the control it stands for (`family:input-fields` FR10).
|
|
940
|
+
const triggerMergedRef = useMergedRefs<HTMLButtonElement>(
|
|
941
|
+
triggerRef,
|
|
942
|
+
ref as React.Ref<HTMLButtonElement> | undefined,
|
|
943
|
+
disabledMessageTooltip.ref,
|
|
944
|
+
);
|
|
945
|
+
|
|
630
946
|
useImperativeHandle(handleRef, () => ({
|
|
631
947
|
focus() {
|
|
632
|
-
inputRef.current?.focus();
|
|
948
|
+
(isSheetPresentation ? triggerRef : inputRef).current?.focus();
|
|
633
949
|
},
|
|
634
950
|
blur() {
|
|
635
|
-
inputRef.current?.blur();
|
|
951
|
+
(isSheetPresentation ? triggerRef : inputRef).current?.blur();
|
|
636
952
|
},
|
|
637
953
|
}));
|
|
638
954
|
|
|
@@ -705,7 +1021,11 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
705
1021
|
layer.show();
|
|
706
1022
|
}
|
|
707
1023
|
if (comingFromOutside) {
|
|
708
|
-
|
|
1024
|
+
isControlFocusedRef.current = true;
|
|
1025
|
+
if (!isHandingOffFocusRef.current) {
|
|
1026
|
+
hasReportedFocusRef.current = true;
|
|
1027
|
+
onFocus?.(e);
|
|
1028
|
+
}
|
|
709
1029
|
// Redirect to the input so the user doesn't have to tab through
|
|
710
1030
|
// every token remove button.
|
|
711
1031
|
if (e.target !== inputRef.current) {
|
|
@@ -719,6 +1039,8 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
719
1039
|
const handleBlurCapture = useCallback(
|
|
720
1040
|
(e: React.FocusEvent) => {
|
|
721
1041
|
if (!isFocusInTokenizer(e.relatedTarget)) {
|
|
1042
|
+
isControlFocusedRef.current = false;
|
|
1043
|
+
hasReportedFocusRef.current = false;
|
|
722
1044
|
setIsFocusedWithin(false);
|
|
723
1045
|
onBlur?.(e);
|
|
724
1046
|
if (isLayerMode) {
|
|
@@ -805,20 +1127,22 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
805
1127
|
[],
|
|
806
1128
|
);
|
|
807
1129
|
|
|
808
|
-
// Announce token add/remove politely via
|
|
809
|
-
//
|
|
810
|
-
//
|
|
811
|
-
//
|
|
1130
|
+
// Announce token add/remove politely via a persistent live region.
|
|
1131
|
+
// Announce token add/remove politely. `useAnnounce` follows where this
|
|
1132
|
+
// call is made (`spec:AST-086` FR14): the inline field's words go to the
|
|
1133
|
+
// shared channel, or into the modal that encloses the field. The sheet's
|
|
1134
|
+
// own changes are announced from inside the sheet, where FR14 routes them
|
|
1135
|
+
// into the sheet's dialog; the handlers below stay silent for those.
|
|
812
1136
|
const announce = useAnnounce();
|
|
813
1137
|
|
|
814
1138
|
// Handle adding an item — detect creatable synthetic items
|
|
815
1139
|
const handleAdd = useCallback(
|
|
816
|
-
(item: T | null) => {
|
|
817
|
-
if (!item) {
|
|
818
|
-
return;
|
|
1140
|
+
(item: T | null, options?: {silent?: boolean}): boolean => {
|
|
1141
|
+
if (isDisabled || !item) {
|
|
1142
|
+
return false;
|
|
819
1143
|
}
|
|
820
1144
|
if (isAtMax) {
|
|
821
|
-
return;
|
|
1145
|
+
return false;
|
|
822
1146
|
}
|
|
823
1147
|
|
|
824
1148
|
// Detect "Create: X" synthetic items from the creatable source
|
|
@@ -835,26 +1159,32 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
835
1159
|
selectedIds.has(createdValue) ||
|
|
836
1160
|
selectedLabels.has(createdValue.toLowerCase())
|
|
837
1161
|
) {
|
|
838
|
-
return;
|
|
1162
|
+
return false;
|
|
839
1163
|
}
|
|
840
1164
|
const base = {id: createdValue, label: createdValue};
|
|
841
1165
|
const realItem = base as T;
|
|
842
1166
|
const newItems = [...value, realItem];
|
|
843
1167
|
onChange(newItems, {item: realItem, type: 'create'});
|
|
844
|
-
|
|
845
|
-
|
|
1168
|
+
if (!options?.silent) {
|
|
1169
|
+
announce(t('@astryx.tokenizer.tokenAdded', {label: createdValue}));
|
|
1170
|
+
}
|
|
1171
|
+
return true;
|
|
846
1172
|
}
|
|
847
1173
|
|
|
848
1174
|
if (selectedIds.has(item.id)) {
|
|
849
|
-
return;
|
|
1175
|
+
return false;
|
|
850
1176
|
}
|
|
851
1177
|
const newItems = [...value, item];
|
|
852
1178
|
onChange(newItems, {item, type: 'add'});
|
|
853
|
-
|
|
1179
|
+
if (!options?.silent) {
|
|
1180
|
+
announce(t('@astryx.tokenizer.tokenAdded', {label: item.label}));
|
|
1181
|
+
}
|
|
1182
|
+
return true;
|
|
854
1183
|
},
|
|
855
1184
|
[
|
|
856
1185
|
value,
|
|
857
1186
|
onChange,
|
|
1187
|
+
isDisabled,
|
|
858
1188
|
isAtMax,
|
|
859
1189
|
selectedIds,
|
|
860
1190
|
selectedLabels,
|
|
@@ -868,25 +1198,31 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
868
1198
|
// input and the per-token remove buttons route through here, so the
|
|
869
1199
|
// announcement covers both.
|
|
870
1200
|
const handleRemove = useCallback(
|
|
871
|
-
(item: T) => {
|
|
1201
|
+
(item: T, options?: {silent?: boolean}): boolean => {
|
|
1202
|
+
if (isDisabled) {
|
|
1203
|
+
return false;
|
|
1204
|
+
}
|
|
872
1205
|
const newItems = value.filter(v => v.id !== item.id);
|
|
873
1206
|
onChange(newItems, {item, type: 'remove'});
|
|
874
|
-
|
|
1207
|
+
if (!options?.silent) {
|
|
1208
|
+
announce(t('@astryx.tokenizer.tokenRemoved', {label: item.label}));
|
|
1209
|
+
}
|
|
875
1210
|
inputRef.current?.focus();
|
|
1211
|
+
return true;
|
|
876
1212
|
},
|
|
877
|
-
[value, onChange, announce, t],
|
|
1213
|
+
[value, onChange, isDisabled, announce, t],
|
|
878
1214
|
);
|
|
879
1215
|
|
|
880
1216
|
// Handle clearing all items
|
|
881
1217
|
const handleClearAll = useCallback(() => {
|
|
882
|
-
if (value.length === 0) {
|
|
1218
|
+
if (isDisabled || value.length === 0) {
|
|
883
1219
|
return;
|
|
884
1220
|
}
|
|
885
1221
|
// Report the last item as removed (convention)
|
|
886
1222
|
const lastItem = value[value.length - 1];
|
|
887
1223
|
onChange([], {item: lastItem, type: 'remove'});
|
|
888
1224
|
inputRef.current?.focus();
|
|
889
|
-
}, [value, onChange]);
|
|
1225
|
+
}, [value, onChange, isDisabled]);
|
|
890
1226
|
|
|
891
1227
|
// Handle backspace on empty input — remove last token
|
|
892
1228
|
const handleKeyDown = useCallback(
|
|
@@ -1033,7 +1369,12 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1033
1369
|
<TrailingKeyDownContext value={onKeyDown}>
|
|
1034
1370
|
<BaseTypeahead
|
|
1035
1371
|
{...rest}
|
|
1036
|
-
ref={useMergedRefs(
|
|
1372
|
+
ref={useMergedRefs(
|
|
1373
|
+
inputRef,
|
|
1374
|
+
// With `experimental`, the ref type admits the trigger too; in
|
|
1375
|
+
// this presentation it receives the input.
|
|
1376
|
+
ref as React.Ref<HTMLInputElement> | undefined,
|
|
1377
|
+
)}
|
|
1037
1378
|
searchSource={isAtMax ? emptySource : filteredSource}
|
|
1038
1379
|
value={null}
|
|
1039
1380
|
onChange={handleAdd}
|
|
@@ -1065,27 +1406,20 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1065
1406
|
isAtMax || isTruncated
|
|
1066
1407
|
? styles.inputAtMax
|
|
1067
1408
|
: value.length > 0
|
|
1068
|
-
?
|
|
1409
|
+
? styles.inputCompact
|
|
1069
1410
|
: undefined,
|
|
1070
|
-
//
|
|
1071
|
-
//
|
|
1072
|
-
//
|
|
1411
|
+
// With tokens, wrapperWithTokens reserves the lane for every row.
|
|
1412
|
+
// This rule is only for an empty Tokenizer; it still resolves to
|
|
1413
|
+
// zero until the lane publishes a width.
|
|
1073
1414
|
!(isAtMax || isTruncated || value.length > 0) && laneReserve,
|
|
1074
1415
|
]}
|
|
1075
1416
|
/>
|
|
1076
1417
|
</TrailingKeyDownContext>
|
|
1077
1418
|
</BusyIndicatorLaneProvider>
|
|
1078
1419
|
{htmlName != null &&
|
|
1420
|
+
!isDisabled &&
|
|
1079
1421
|
value.map(item => (
|
|
1080
|
-
<input
|
|
1081
|
-
key={item.id}
|
|
1082
|
-
type="hidden"
|
|
1083
|
-
name={htmlName}
|
|
1084
|
-
value={item.id}
|
|
1085
|
-
// Disabled native controls are excluded from form submission;
|
|
1086
|
-
// mirror that for the hidden carriers.
|
|
1087
|
-
disabled={isDisabled}
|
|
1088
|
-
/>
|
|
1422
|
+
<input key={item.id} type="hidden" name={htmlName} value={item.id} />
|
|
1089
1423
|
))}
|
|
1090
1424
|
<EndLane
|
|
1091
1425
|
lane={busyLane}
|
|
@@ -1093,7 +1427,11 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1093
1427
|
laneXStyle={[styles.endSection, endSectionSizeStyles[size]]}
|
|
1094
1428
|
loadingLabel={t('@astryx.typeahead.loading')}
|
|
1095
1429
|
anchorRef={wrapperRef}
|
|
1096
|
-
hasStaticContent={hasStaticEndLane}
|
|
1430
|
+
hasStaticContent={hasStaticEndLane}
|
|
1431
|
+
// Wherever a search can run beside tokens: enabled and below
|
|
1432
|
+
// maxEntries. A collapsed overflow row keeps it too, since a search
|
|
1433
|
+
// started while focused can settle after focus leaves.
|
|
1434
|
+
hasBusySlot={value.length > 0 && !isDisabled && !isAtMax}>
|
|
1097
1435
|
{endContent}
|
|
1098
1436
|
{hasClearButton && (
|
|
1099
1437
|
<InputClearButton
|
|
@@ -1109,7 +1447,191 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1109
1447
|
);
|
|
1110
1448
|
|
|
1111
1449
|
let tokenizerContent: ReactNode;
|
|
1112
|
-
if (
|
|
1450
|
+
if (isSheetPresentation) {
|
|
1451
|
+
tokenizerContent = (
|
|
1452
|
+
<>
|
|
1453
|
+
<button
|
|
1454
|
+
// The field-level pass-through props (`data-*`, `aria-*`) were typed
|
|
1455
|
+
// for the inline input; here the control is a button.
|
|
1456
|
+
{...(restWithoutClick as React.ButtonHTMLAttributes<HTMLButtonElement>)}
|
|
1457
|
+
ref={triggerMergedRef}
|
|
1458
|
+
type="button"
|
|
1459
|
+
id={inputId}
|
|
1460
|
+
aria-haspopup="dialog"
|
|
1461
|
+
aria-expanded={isSheetOpen}
|
|
1462
|
+
aria-disabled={isDisabled || undefined}
|
|
1463
|
+
// The description is what the inline input's is, in its order —
|
|
1464
|
+
// the caller's ids, the field description, the status message, the
|
|
1465
|
+
// disabled reason (`spec:AST-085` FR5: a disabled control exposes
|
|
1466
|
+
// its description and reason on itself) — then the hidden count and
|
|
1467
|
+
// the rendered tokens themselves, each by id: the
|
|
1468
|
+
// accessible-description algorithm reads the referenced elements in
|
|
1469
|
+
// order and separates them, so every label renders once
|
|
1470
|
+
// (`architecture:component-style-authoring` INV7) and no locale's
|
|
1471
|
+
// list punctuation is written here (AR6).
|
|
1472
|
+
aria-describedby={
|
|
1473
|
+
[
|
|
1474
|
+
ariaDescribedByProp,
|
|
1475
|
+
ariaDescribedBy,
|
|
1476
|
+
value.length > 0 ? triggerTokensId : null,
|
|
1477
|
+
...value.map(item => tokenElementId(item.id)),
|
|
1478
|
+
]
|
|
1479
|
+
.filter(Boolean)
|
|
1480
|
+
.join(' ') || undefined
|
|
1481
|
+
}
|
|
1482
|
+
// The open runs first and the caller's onClick after it, as the
|
|
1483
|
+
// inline input composes its click: a caller observes the click but
|
|
1484
|
+
// cannot cancel the field's own handling
|
|
1485
|
+
// (`family:input-fields` FR10).
|
|
1486
|
+
onClick={composeEventHandlers<React.MouseEvent<HTMLButtonElement>>(
|
|
1487
|
+
() => {
|
|
1488
|
+
if (isDisabled) {
|
|
1489
|
+
return;
|
|
1490
|
+
}
|
|
1491
|
+
setIsSheetPresented(true);
|
|
1492
|
+
setSheetInitialQuery(sheetQueryRef.current);
|
|
1493
|
+
setIsSheetOpen(true);
|
|
1494
|
+
},
|
|
1495
|
+
// Typed for the input by the base props; here the control is the
|
|
1496
|
+
// trigger button, and the handler only reads the event.
|
|
1497
|
+
callerOnClick as unknown as
|
|
1498
|
+
React.MouseEventHandler<HTMLButtonElement> | undefined,
|
|
1499
|
+
)}
|
|
1500
|
+
onFocus={event => {
|
|
1501
|
+
isControlFocusedRef.current = true;
|
|
1502
|
+
// BottomSheet focuses the trigger only after its exit completes;
|
|
1503
|
+
// that focus is the signal that the retained sheet can leave. If
|
|
1504
|
+
// the resolution moved to the popover meanwhile, the inline input
|
|
1505
|
+
// takes the focus over once it mounts. The field's own sheet is
|
|
1506
|
+
// part of the field: focus coming back from it, or handed over by
|
|
1507
|
+
// a presentation swap, is not focus entering from outside, so the
|
|
1508
|
+
// caller's onFocus — "when focus enters the tokenizer from
|
|
1509
|
+
// outside" — stays quiet for it (`family:input-fields` FR10).
|
|
1510
|
+
const isReturningFromSheet = !isSheetOpen && isSheetPresented;
|
|
1511
|
+
if (isReturningFromSheet) {
|
|
1512
|
+
setIsSheetPresented(false);
|
|
1513
|
+
}
|
|
1514
|
+
const isInsideTheField =
|
|
1515
|
+
(isReturningFromSheet && hasReportedFocusRef.current) ||
|
|
1516
|
+
isHandingOffFocusRef.current;
|
|
1517
|
+
if (!isInsideTheField) {
|
|
1518
|
+
hasReportedFocusRef.current = true;
|
|
1519
|
+
onFocus?.(event);
|
|
1520
|
+
}
|
|
1521
|
+
}}
|
|
1522
|
+
onBlur={event => {
|
|
1523
|
+
// Focus moving into the sheet is still the field's: the flag
|
|
1524
|
+
// stays, and the caller's onBlur — "when focus leaves the
|
|
1525
|
+
// tokenizer entirely" — stays quiet. Only a blur to somewhere
|
|
1526
|
+
// else reports.
|
|
1527
|
+
if (isSheetOpen) {
|
|
1528
|
+
return;
|
|
1529
|
+
}
|
|
1530
|
+
isControlFocusedRef.current = false;
|
|
1531
|
+
hasReportedFocusRef.current = false;
|
|
1532
|
+
onBlur?.(event);
|
|
1533
|
+
}}
|
|
1534
|
+
onKeyDown={onKeyDown}
|
|
1535
|
+
{...mergeProps(
|
|
1536
|
+
themeProps('tokenizer', {
|
|
1537
|
+
size,
|
|
1538
|
+
status: status?.type,
|
|
1539
|
+
disabled: isDisabled ? 'disabled' : null,
|
|
1540
|
+
}),
|
|
1541
|
+
stylex.props(
|
|
1542
|
+
inputWrapperStyles.base,
|
|
1543
|
+
styles.wrapper,
|
|
1544
|
+
styles.sheetTrigger,
|
|
1545
|
+
// The trigger keeps the inline field's height for its size step,
|
|
1546
|
+
// as Selector's bottom-sheet trigger does; the sheet's own rows
|
|
1547
|
+
// and search field carry the touch-sized targets.
|
|
1548
|
+
sizeStyles[size],
|
|
1549
|
+
value.length > 0 && styles.wrapperWithTokens,
|
|
1550
|
+
isDisabled && inputWrapperStyles.disabled,
|
|
1551
|
+
isDisabled && styles.sheetTriggerDisabled,
|
|
1552
|
+
status && inputStatusBorderStyles[status.type],
|
|
1553
|
+
status &&
|
|
1554
|
+
!isDisabled &&
|
|
1555
|
+
inputStatusHoverShadowStyles[status.type],
|
|
1556
|
+
status && inputStatusFocusWithinStyles[status.type],
|
|
1557
|
+
controlXstyle,
|
|
1558
|
+
),
|
|
1559
|
+
controlClassName,
|
|
1560
|
+
controlStyle,
|
|
1561
|
+
)}>
|
|
1562
|
+
{startIcon && (
|
|
1563
|
+
<span
|
|
1564
|
+
{...stylex.props(value.length > 0 && styles.startIconWithTokens)}>
|
|
1565
|
+
{renderIconSlot(startIcon, {size: 'sm', color: 'secondary'})}
|
|
1566
|
+
</span>
|
|
1567
|
+
)}
|
|
1568
|
+
{value.length > 0 ? (
|
|
1569
|
+
value.map(item => (
|
|
1570
|
+
<Token
|
|
1571
|
+
key={item.id}
|
|
1572
|
+
id={tokenElementId(item.id)}
|
|
1573
|
+
label={item.label}
|
|
1574
|
+
size={size}
|
|
1575
|
+
isDisabled={isDisabled}
|
|
1576
|
+
xstyle={isDisabled ? styles.sheetTokenDisabled : undefined}
|
|
1577
|
+
/>
|
|
1578
|
+
))
|
|
1579
|
+
) : (
|
|
1580
|
+
<span
|
|
1581
|
+
{...stylex.props(
|
|
1582
|
+
styles.sheetTriggerPlaceholder,
|
|
1583
|
+
isDisabled && styles.sheetTriggerPlaceholderDisabled,
|
|
1584
|
+
)}>
|
|
1585
|
+
{placeholder ?? ''}
|
|
1586
|
+
</span>
|
|
1587
|
+
)}
|
|
1588
|
+
</button>
|
|
1589
|
+
{value.length > 0 && (
|
|
1590
|
+
<VisuallyHidden id={triggerTokensId}>
|
|
1591
|
+
{t('@astryx.tokenizer.selectedCount', {count: value.length})}
|
|
1592
|
+
</VisuallyHidden>
|
|
1593
|
+
)}
|
|
1594
|
+
{/* Form carriers, gated exactly as the inline branch gates its own: a
|
|
1595
|
+
disabled field submits nothing. */}
|
|
1596
|
+
{htmlName != null &&
|
|
1597
|
+
!isDisabled &&
|
|
1598
|
+
value.map(item => (
|
|
1599
|
+
<input
|
|
1600
|
+
key={item.id}
|
|
1601
|
+
type="hidden"
|
|
1602
|
+
name={htmlName}
|
|
1603
|
+
value={item.id}
|
|
1604
|
+
/>
|
|
1605
|
+
))}
|
|
1606
|
+
{/* Mounted from the press until the sheet's exit has completed and
|
|
1607
|
+
focus is back on the trigger (`isSheetPresented`): at rest the
|
|
1608
|
+
field renders its trigger alone — no closed dialog, rows, search
|
|
1609
|
+
field or confirmation in the DOM (INV7). */}
|
|
1610
|
+
{(isSheetOpen || isSheetPresented) &&
|
|
1611
|
+
(!isDisabled || keepsSheetWhileDisabled) && (
|
|
1612
|
+
<TokenizerSheetHost
|
|
1613
|
+
isOpen={isSheetOpen}
|
|
1614
|
+
onOpenChange={setIsSheetOpen}
|
|
1615
|
+
finalFocusRef={triggerRef}
|
|
1616
|
+
initialQuery={sheetInitialQuery}
|
|
1617
|
+
label={label}
|
|
1618
|
+
searchSource={searchSource}
|
|
1619
|
+
value={value}
|
|
1620
|
+
isAtMax={isAtMax}
|
|
1621
|
+
hasCreate={hasCreate}
|
|
1622
|
+
maxMenuItems={maxMenuItems ?? 10}
|
|
1623
|
+
minQueryLength={minQueryLength ?? 1}
|
|
1624
|
+
debounceMs={debounceMs ?? 150}
|
|
1625
|
+
emptySearchText={emptySearchText}
|
|
1626
|
+
onAdd={handleAdd}
|
|
1627
|
+
onRemove={handleRemove}
|
|
1628
|
+
onClearAll={handleClearAll}
|
|
1629
|
+
onChangeQuery={handleSheetQueryChange}
|
|
1630
|
+
/>
|
|
1631
|
+
)}
|
|
1632
|
+
</>
|
|
1633
|
+
);
|
|
1634
|
+
} else if (isLayerMode) {
|
|
1113
1635
|
const placeholderSizeStyle = layerPlaceholderSizeStyles[size];
|
|
1114
1636
|
tokenizerContent = (
|
|
1115
1637
|
<>
|
|
@@ -1209,3 +1731,19 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1209
1731
|
}
|
|
1210
1732
|
|
|
1211
1733
|
Tokenizer.displayName = 'Tokenizer';
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* The same component with the sheet presentation reachable: `experimental`
|
|
1737
|
+
* (`presentation: 'popover' | 'bottom-sheet' | 'adaptive'`) and a `ref` that
|
|
1738
|
+
* also takes the trigger button. Not public — re-exported only by
|
|
1739
|
+
* `@astryxdesign/core/internal/tokenizer-presentation`, the entry reserved
|
|
1740
|
+
* for Astryx's own packages (`architecture:react-component-runtime` INV13),
|
|
1741
|
+
* while the sheet's user experience is being finished (`component:Tokenizer`
|
|
1742
|
+
* DEC-3). The public `Tokenizer` renders the popover presentation for every
|
|
1743
|
+
* field.
|
|
1744
|
+
*/
|
|
1745
|
+
export const TokenizerWithPresentation = Tokenizer as <
|
|
1746
|
+
T extends SearchableItem,
|
|
1747
|
+
>(
|
|
1748
|
+
props: TokenizerWithPresentationProps<T>,
|
|
1749
|
+
) => React.JSX.Element;
|