@astryxdesign/core 0.7.8 → 0.7.9-canary.0200dfe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppShell/observeMainOverflow.d.ts.map +1 -1
- package/dist/AppShell/observeMainOverflow.js +9 -6
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +37 -3
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +40 -8
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +4 -3
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +61 -21
- package/dist/Calendar/Calendar.d.ts +14 -2
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +63 -74
- package/dist/Calendar/getInitialFocusDate.d.ts +4 -1
- package/dist/Calendar/getInitialFocusDate.d.ts.map +1 -1
- package/dist/Calendar/getInitialFocusDate.js +7 -5
- package/dist/Calendar/hooks/useCalendarDays.d.ts +19 -2
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +57 -64
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts +28 -3
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +33 -22
- package/dist/Calendar/styles.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +74 -18
- package/dist/CheckboxInput/CheckboxRowPressContext.d.ts +2 -0
- package/dist/CheckboxInput/CheckboxRowPressContext.d.ts.map +1 -0
- package/dist/CheckboxInput/CheckboxRowPressContext.js +20 -0
- package/dist/CheckboxList/CheckboxListItem.d.ts +2 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +40 -14
- package/dist/ClickableCard/ClickableCard.d.ts +1 -1
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +5 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +2 -0
- package/dist/DateInput/DateInput.d.ts +37 -6
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +97 -124
- package/dist/DateInput/MonthScroller.d.ts +5 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +26 -29
- package/dist/DateInput/MonthYearWheels.d.ts +10 -1
- package/dist/DateInput/MonthYearWheels.d.ts.map +1 -1
- package/dist/DateInput/MonthYearWheels.js +54 -42
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +7 -1
- package/dist/DateInput/TouchDateField.d.ts +1 -1
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +26 -21
- package/dist/DateInput/monthGeometry.d.ts +42 -8
- package/dist/DateInput/monthGeometry.d.ts.map +1 -1
- package/dist/DateInput/monthGeometry.js +81 -7
- package/dist/DateInput/useCalendarPresentation.d.ts +10 -0
- package/dist/DateInput/useCalendarPresentation.d.ts.map +1 -0
- package/dist/DateInput/useCalendarPresentation.js +32 -0
- package/dist/DateInput/useTypedDate.d.ts +92 -0
- package/dist/DateInput/useTypedDate.d.ts.map +1 -0
- package/dist/DateInput/useTypedDate.js +269 -0
- package/dist/DateInput/wheelStrip.js +2 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts +17 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +15 -8
- package/dist/DateTimeInput/DateTimeInput.d.ts +26 -3
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +92 -88
- package/dist/DateTimeInput/TouchDateTimeField.d.ts +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +26 -20
- package/dist/Dialog/Dialog.d.ts +2 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +14 -3
- package/dist/Drawer/useDrawerDialogPresence.d.ts +2 -1
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +11 -2
- package/dist/DropdownMenu/DropdownMenu.d.ts +9 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +11 -8
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +3 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -4
- package/dist/Field/inputStyles.stylex.d.ts +1 -1
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +16 -2
- package/dist/HoverCard/useHoverCard.d.ts +3 -1
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/InfoTip/InfoTip.d.ts +1 -0
- package/dist/InfoTip/InfoTip.d.ts.map +1 -1
- package/dist/InfoTip/InfoTip.js +6 -18
- package/dist/InputGroup/InputGroup.d.ts +4 -3
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +2 -2
- package/dist/InputGroup/InputGroupText.d.ts +2 -1
- package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupText.js +2 -1
- package/dist/InputGroup/groupStyles.d.ts +1 -1
- package/dist/InputGroup/groupStyles.d.ts.map +1 -1
- package/dist/InputGroup/groupStyles.js +1 -1
- package/dist/Item/Item.d.ts +20 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +97 -29
- package/dist/Item/ItemListRowContext.d.ts +2 -0
- package/dist/Item/ItemListRowContext.d.ts.map +1 -0
- package/dist/Item/ItemListRowContext.js +16 -0
- package/dist/Layer/holdEntranceInput.d.ts +24 -0
- package/dist/Layer/holdEntranceInput.d.ts.map +1 -0
- package/dist/Layer/holdEntranceInput.js +65 -0
- package/dist/Layer/inputHold.d.ts +49 -0
- package/dist/Layer/inputHold.d.ts.map +1 -0
- package/dist/Layer/inputHold.js +636 -0
- package/dist/Layer/outsidePress.d.ts +4 -0
- package/dist/Layer/outsidePress.d.ts.map +1 -1
- package/dist/Layer/outsidePress.js +18 -1
- package/dist/Layer/preserveAnimations.d.ts +1 -5
- package/dist/Layer/preserveAnimations.d.ts.map +1 -1
- package/dist/Layer/preserveAnimations.js +12 -214
- package/dist/Layer/useBackdropPress.d.ts +8 -0
- package/dist/Layer/useBackdropPress.d.ts.map +1 -1
- package/dist/Layer/useBackdropPress.js +31 -2
- package/dist/Layer/useLayer.d.ts +3 -1
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +64 -4
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +4 -0
- package/dist/Layout/LayoutContent.d.ts +3 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +12 -4
- package/dist/Layout/LayoutPanel.d.ts +13 -10
- package/dist/Layout/LayoutPanel.d.ts.map +1 -1
- package/dist/Layout/LayoutPanel.js +81 -11
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +4 -0
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +1 -0
- package/dist/List/ListItem.d.ts +5 -4
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +45 -9
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +56 -39
- package/dist/MetadataList/MetadataList.js +1 -1
- package/dist/MobileNav/MobileNav.d.ts +11 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +39 -1
- package/dist/MoreMenu/MoreMenu.d.ts +5 -3
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +6 -9
- package/dist/NumberInput/NumberInput.d.ts +4 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +244 -11
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +7 -2
- package/dist/Popover/usePopover.d.ts +1 -0
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +12 -5
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchBottomSheet.js +4 -2
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -1
- package/dist/PowerSearch/formatFilterValue.d.ts +9 -3
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +14 -11
- package/dist/PowerSearch/formatTokenValue.d.ts +6 -2
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatTokenValue.js +6 -3
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +16 -3
- package/dist/Resizable/ResizeHandle.d.ts +5 -5
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +44 -5
- package/dist/Resizable/resizablePane.d.ts +58 -0
- package/dist/Resizable/resizablePane.d.ts.map +1 -0
- package/dist/Resizable/resizablePane.js +137 -0
- package/dist/Resizable/useResizable.d.ts +7 -0
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +13 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +3 -3
- package/dist/SelectableCard/SelectableCard.d.ts +1 -1
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +5 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +51 -10
- package/dist/SideNav/SideNav.d.ts +9 -3
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +45 -10
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +14 -71
- package/dist/Spinner/index.d.ts +1 -1
- package/dist/Spinner/index.d.ts.map +1 -1
- package/dist/Spinner/spinnerRotor.d.ts +28 -0
- package/dist/Spinner/spinnerRotor.d.ts.map +1 -0
- package/dist/Spinner/spinnerRotor.js +98 -0
- package/dist/Stack/StackItem.d.ts +8 -4
- package/dist/Stack/StackItem.d.ts.map +1 -1
- package/dist/Stack/StackItem.js +17 -4
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +13 -10
- package/dist/Switch/useSwitchTouch.js +4 -4
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +5 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +1 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +14 -8
- package/dist/Timestamp/formatInstant.d.ts +10 -1
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +13 -27
- package/dist/Timestamp/tooltipEntries.d.ts +5 -3
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.js +6 -4
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +9 -0
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/TokenLink.d.ts.map +1 -1
- package/dist/Token/TokenLink.js +4 -1
- package/dist/Tokenizer/Tokenizer.d.ts +14 -10
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +189 -89
- package/dist/Tooltip/useTooltip.d.ts +3 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +164 -59
- package/dist/TreeList/TreeListItem.d.ts +2 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +27 -3
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -1
- package/dist/animator/createAnimator.js +2 -2
- package/dist/astryx.css +362 -325
- package/dist/gestures/GestureHost.d.ts +2 -2
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +21 -6
- package/dist/gestures/PanGestureRecognizer.d.ts +11 -1
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/PanGestureRecognizer.js +15 -1
- package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts +6 -1
- package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/nativeScroll.d.ts +3 -6
- package/dist/gestures/nativeScroll.d.ts.map +1 -1
- package/dist/gestures/nativeScroll.js +7 -52
- package/dist/gestures/wheelSegmenter.d.ts +68 -1
- package/dist/gestures/wheelSegmenter.d.ts.map +1 -1
- package/dist/gestures/wheelSegmenter.js +199 -10
- package/dist/hooks/StackItemScrollRegion.d.ts +31 -0
- package/dist/hooks/StackItemScrollRegion.d.ts.map +1 -0
- package/dist/hooks/StackItemScrollRegion.js +40 -0
- package/dist/hooks/computeOverflow.d.ts +2 -0
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +1 -1
- package/dist/hooks/menuPressGesture.d.ts +133 -21
- package/dist/hooks/menuPressGesture.d.ts.map +1 -1
- package/dist/hooks/menuPressGesture.js +155 -30
- package/dist/hooks/menuPressValues.d.ts +16 -0
- package/dist/hooks/menuPressValues.d.ts.map +1 -0
- package/dist/hooks/menuPressValues.js +18 -0
- package/dist/hooks/useClickableContainer.d.ts +36 -7
- package/dist/hooks/useClickableContainer.d.ts.map +1 -1
- package/dist/hooks/useClickableContainer.js +63 -14
- package/dist/hooks/useFocusTrap.d.ts +10 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +225 -132
- package/dist/hooks/useKeyboardHighlight.d.ts +17 -0
- package/dist/hooks/useKeyboardHighlight.d.ts.map +1 -0
- package/dist/hooks/useKeyboardHighlight.js +38 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -1
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +37 -12
- package/dist/hooks/useMenuPress.d.ts +34 -1
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +93 -5
- package/dist/hooks/useOverflow.d.ts +10 -0
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +214 -23
- package/dist/hooks/usePressFeedback.d.ts +6 -6
- package/dist/hooks/usePressFeedback.js +6 -6
- package/dist/hooks/useScrollRegionProps.d.ts +35 -0
- package/dist/hooks/useScrollRegionProps.d.ts.map +1 -0
- package/dist/hooks/useScrollRegionProps.js +51 -0
- package/dist/i18n/InternationalizationContext.d.ts +6 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.d.ts +23 -3
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +8 -3
- package/dist/i18n/generated-english/DateInput/DateInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/DateInput/DateInput.generated.js +0 -1
- package/dist/i18n/generated-english/DateInput/useTypedDate.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateInput/useTypedDate.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateInput/useTypedDate.generated.js +16 -0
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.js +0 -1
- package/dist/i18n/generated-english/hooks/useScrollRegionProps.generated.d.ts +8 -0
- package/dist/i18n/generated-english/hooks/useScrollRegionProps.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/hooks/useScrollRegionProps.generated.js +12 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +5 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +5 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/useCalendarSystem.d.ts +19 -0
- package/dist/i18n/useCalendarSystem.d.ts.map +1 -0
- package/dist/i18n/useCalendarSystem.js +61 -0
- package/dist/internal/calendar-system.d.ts +18 -0
- package/dist/internal/calendar-system.d.ts.map +1 -0
- package/dist/internal/calendar-system.js +19 -0
- package/dist/internal/spinner-rotor.d.ts +16 -0
- package/dist/internal/spinner-rotor.d.ts.map +1 -0
- package/dist/internal/spinner-rotor.js +16 -0
- package/dist/internal/touch.d.ts +20 -2
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +29 -3
- package/dist/motion/animator.d.ts +5 -5
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +7 -6
- package/dist/motion/carryAnimations.d.ts +58 -0
- package/dist/motion/carryAnimations.d.ts.map +1 -0
- package/dist/motion/carryAnimations.js +305 -0
- package/dist/motion/transientCopy.d.ts +4 -2
- package/dist/motion/transientCopy.d.ts.map +1 -1
- package/dist/motion/transientCopy.js +34 -5
- package/dist/motion/uikit/gestures.d.ts +41 -0
- package/dist/motion/uikit/gestures.d.ts.map +1 -1
- package/dist/motion/uikit/gestures.js +25 -0
- package/dist/motion/uikit/index.d.ts +1 -1
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +1 -1
- package/dist/motion/uikit/timing.d.ts +14 -10
- package/dist/motion/uikit/timing.d.ts.map +1 -1
- package/dist/motion/uikit/timing.js +7 -5
- package/dist/privateAttributes/menuPressLit.stylex.d.ts +52 -0
- package/dist/privateAttributes/menuPressLit.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/menuPressLit.stylex.js +99 -0
- package/dist/privateAttributes/press.stylex.d.ts +142 -0
- package/dist/privateAttributes/press.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/press.stylex.js +101 -0
- package/dist/theme/themeMotion.d.ts +3 -2
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +3 -2
- package/dist/theme/tokens.stylex.d.ts +2 -2
- package/dist/theme/tokens.stylex.js +1 -1
- package/dist/utils/calendarDateParser.d.ts +110 -0
- package/dist/utils/calendarDateParser.d.ts.map +1 -0
- package/dist/utils/calendarDateParser.js +1225 -0
- package/dist/utils/calendarSystem.d.ts +176 -0
- package/dist/utils/calendarSystem.d.ts.map +1 -0
- package/dist/utils/calendarSystem.js +569 -0
- package/dist/utils/coarsePointer.d.ts +5 -0
- package/dist/utils/coarsePointer.d.ts.map +1 -1
- package/dist/utils/coarsePointer.js +22 -13
- package/dist/utils/flatTree.d.ts +6 -3
- package/dist/utils/flatTree.d.ts.map +1 -1
- package/dist/utils/flatTree.js +13 -3
- package/dist/utils/focusReturn.d.ts +34 -13
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +64 -17
- package/dist/utils/hitArea.d.ts +8 -1
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +99 -9
- package/dist/utils/inputPresentation.d.ts +9 -1
- package/dist/utils/inputPresentation.d.ts.map +1 -1
- package/dist/utils/inputPresentation.js +15 -1
- package/dist/utils/inputStream.d.ts +14 -1
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +40 -9
- package/dist/utils/interactionOverlay.stylex.d.ts +5 -9
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +29 -31
- package/dist/utils/plainDate.d.ts +38 -7
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +92 -18
- package/dist/utils/pressFeedback.d.ts +10 -2
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +40 -15
- package/dist/utils/pressGesture.d.ts +12 -6
- package/dist/utils/pressGesture.d.ts.map +1 -1
- package/dist/utils/pressGesture.js +26 -8
- package/dist/utils/scrollView.d.ts +25 -0
- package/dist/utils/scrollView.d.ts.map +1 -0
- package/dist/utils/scrollView.js +108 -0
- package/dist/utils/selectionLock.d.ts.map +1 -1
- package/dist/utils/selectionLock.js +1 -10
- package/dist/utils/touchHitArea.d.ts +30 -0
- package/dist/utils/touchHitArea.d.ts.map +1 -0
- package/dist/utils/touchHitArea.js +167 -0
- package/dist/utils/touchHitArea.stylex.d.ts +38 -0
- package/dist/utils/touchHitArea.stylex.d.ts.map +1 -0
- package/dist/utils/touchHitArea.stylex.js +48 -0
- package/dist/utils/triggerFocus.d.ts +5 -0
- package/dist/utils/triggerFocus.d.ts.map +1 -1
- package/dist/utils/triggerFocus.js +9 -2
- package/locales/en.json +21 -1
- package/locales/pseudo.json +15 -0
- package/package.json +15 -4
- package/src/AppShell/observeMainOverflow.ts +9 -6
- package/src/BottomSheet/BottomSheet.tsx +45 -3
- package/src/BottomSheet/BottomSheetPanel.tsx +64 -7
- package/src/BottomSheet/bottomSheetStack.ts +4 -3
- package/src/BottomSheet/useSheetGestures.ts +83 -20
- package/src/Calendar/Calendar.doc.mjs +76 -6
- package/src/Calendar/Calendar.tsx +123 -104
- package/src/Calendar/getInitialFocusDate.ts +22 -8
- package/src/Calendar/hooks/useCalendarDays.ts +89 -63
- package/src/Calendar/hooks/useCalendarNavigation.ts +68 -26
- package/src/CheckboxInput/CheckboxInput.doc.mjs +5 -4
- package/src/CheckboxInput/CheckboxInput.tsx +105 -20
- package/src/CheckboxInput/CheckboxRowPressContext.ts +22 -0
- package/src/CheckboxList/CheckboxList.doc.mjs +9 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/CheckboxList/CheckboxListItem.tsx +35 -14
- package/src/ClickableCard/ClickableCard.tsx +8 -1
- package/src/ContextMenu/ContextMenu.tsx +2 -0
- package/src/DateInput/DateInput.doc.mjs +45 -12
- package/src/DateInput/DateInput.tsx +165 -179
- package/src/DateInput/MonthScroller.tsx +39 -37
- package/src/DateInput/MonthYearWheels.tsx +68 -47
- package/src/DateInput/PickerWheel.tsx +7 -2
- package/src/DateInput/TouchDateField.tsx +45 -17
- package/src/DateInput/monthGeometry.ts +110 -8
- package/src/DateInput/useCalendarPresentation.ts +64 -0
- package/src/DateInput/useTypedDate.ts +469 -0
- package/src/DateInput/wheelStrip.ts +2 -2
- package/src/DateRangeInput/DateRangeInput.doc.mjs +9 -0
- package/src/DateRangeInput/DateRangeInput.tsx +43 -9
- package/src/DateTimeInput/DateTimeInput.doc.mjs +42 -9
- package/src/DateTimeInput/DateTimeInput.tsx +138 -148
- package/src/DateTimeInput/TouchDateTimeField.tsx +31 -16
- package/src/Dialog/Dialog.doc.mjs +1 -1
- package/src/Dialog/Dialog.tsx +14 -2
- package/src/Drawer/Drawer.doc.mjs +1 -1
- package/src/Drawer/useDrawerDialogPresence.ts +9 -2
- package/src/DropdownMenu/DropdownMenu.doc.mjs +1 -2
- package/src/DropdownMenu/DropdownMenu.tsx +31 -7
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +5 -1
- package/src/DropdownMenu/DropdownMenuItem.tsx +8 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +5 -1
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +5 -1
- package/src/FileInput/FileInput.tsx +16 -2
- package/src/HoverCard/useHoverCard.tsx +3 -1
- package/src/Icon/useIcon.doc.mjs +94 -0
- package/src/InfoTip/InfoTip.doc.mjs +26 -2
- package/src/InfoTip/InfoTip.tsx +6 -27
- package/src/InputGroup/InputGroup.doc.mjs +4 -3
- package/src/InputGroup/InputGroup.tsx +4 -3
- package/src/InputGroup/InputGroupText.doc.mjs +45 -3
- package/src/InputGroup/InputGroupText.tsx +2 -1
- package/src/InputGroup/groupStyles.ts +3 -1
- package/src/Item/Item.tsx +139 -35
- package/src/Item/ItemListRowContext.tsx +18 -0
- package/src/Layer/holdEntranceInput.ts +84 -0
- package/src/Layer/inputHold.ts +734 -0
- package/src/Layer/outsidePress.ts +18 -1
- package/src/Layer/preserveAnimations.ts +12 -275
- package/src/Layer/useBackdropPress.ts +41 -1
- package/src/Layer/useLayer.tsx +77 -4
- package/src/Layer/useTouchTrigger.ts +4 -0
- package/src/Layout/LayoutContent.doc.mjs +6 -3
- package/src/Layout/LayoutContent.tsx +10 -4
- package/src/Layout/LayoutPanel.doc.mjs +14 -11
- package/src/Layout/LayoutPanel.tsx +113 -16
- package/src/Lightbox/Lightbox.tsx +4 -0
- package/src/List/List.doc.mjs +10 -1
- package/src/List/List.tsx +5 -0
- package/src/List/ListItem.tsx +63 -8
- package/src/Markdown/parser.ts +65 -42
- package/src/MetadataList/MetadataList.tsx +1 -1
- package/src/MobileNav/MobileNav.doc.mjs +3 -3
- package/src/MobileNav/MobileNav.tsx +39 -1
- package/src/MoreMenu/MoreMenu.doc.mjs +2 -4
- package/src/MoreMenu/MoreMenu.tsx +5 -3
- package/src/MultiSelector/MultiSelector.tsx +7 -17
- package/src/NumberInput/NumberInput.doc.mjs +1 -1
- package/src/NumberInput/NumberInput.tsx +259 -11
- package/src/OverflowList/OverflowList.tsx +15 -9
- package/src/Popover/usePopover.tsx +1 -0
- package/src/PowerSearch/PowerSearch.doc.mjs +3 -3
- package/src/PowerSearch/PowerSearch.tsx +20 -3
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +4 -1
- package/src/PowerSearch/PowerSearchToken.tsx +3 -0
- package/src/PowerSearch/formatFilterValue.ts +21 -11
- package/src/PowerSearch/formatTokenValue.ts +7 -1
- package/src/RadioList/RadioListItem.doc.mjs +3 -2
- package/src/RadioList/RadioListItem.tsx +16 -6
- package/src/Resizable/Resizable.doc.mjs +40 -12
- package/src/Resizable/ResizeHandle.tsx +68 -6
- package/src/Resizable/resizablePane.ts +179 -0
- package/src/Resizable/useResizable.ts +15 -0
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +3 -3
- package/src/SelectableCard/SelectableCard.tsx +8 -1
- package/src/Selector/Selector.tsx +83 -8
- package/src/SideNav/SideNav.doc.mjs +2 -2
- package/src/SideNav/SideNav.tsx +87 -12
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Spinner/Spinner.tsx +7 -89
- package/src/Spinner/index.ts +1 -5
- package/src/Spinner/spinnerRotor.ts +113 -0
- package/src/Stack/Stack.doc.mjs +1 -1
- package/src/Stack/StackItem.tsx +27 -13
- package/src/Switch/Switch.tsx +7 -6
- package/src/Switch/useSwitchTouch.ts +4 -4
- package/src/TabList/Tab.tsx +5 -1
- package/src/Table/plugins/sortable/useTableSortable.tsx +1 -1
- package/src/Timestamp/Timestamp.doc.mjs +3 -3
- package/src/Timestamp/Timestamp.tsx +13 -8
- package/src/Timestamp/formatInstant.ts +49 -28
- package/src/Timestamp/tooltipEntries.ts +7 -3
- package/src/Token/Token.tsx +18 -1
- package/src/Token/TokenLink.tsx +7 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +3 -3
- package/src/Tokenizer/Tokenizer.tsx +252 -115
- package/src/Tooltip/useTooltip.tsx +180 -80
- package/src/TreeList/TreeListItem.tsx +36 -2
- package/src/Typeahead/BaseTypeahead.tsx +2 -0
- package/src/animator/createAnimator.ts +3 -3
- package/src/gestures/GestureHost.ts +21 -5
- package/src/gestures/PanGestureRecognizer.ts +19 -2
- package/src/gestures/README.md +14 -5
- package/src/gestures/ScreenEdgePanGestureRecognizer.ts +6 -1
- package/src/gestures/nativeScroll.ts +12 -68
- package/src/gestures/wheelSegmenter.ts +243 -10
- package/src/hooks/StackItemScrollRegion.tsx +57 -0
- package/src/hooks/computeOverflow.ts +1 -1
- package/src/hooks/menuPressGesture.ts +244 -38
- package/src/hooks/menuPressValues.ts +18 -0
- package/src/hooks/useClickableContainer.doc.mjs +8 -2
- package/src/hooks/useClickableContainer.ts +93 -15
- package/src/hooks/useFocusTrap.ts +268 -151
- package/src/hooks/useKeyboardHighlight.ts +71 -0
- package/src/hooks/useMediaQuery.ts +41 -12
- package/src/hooks/useMenuPress.ts +118 -11
- package/src/hooks/useOverflow.ts +321 -75
- package/src/hooks/usePressFeedback.doc.mjs +3 -3
- package/src/hooks/usePressFeedback.ts +6 -6
- package/src/hooks/useScrollRegionProps.ts +76 -0
- package/src/i18n/InternationalizationContext.ts +6 -0
- package/src/i18n/InternationalizationProvider.doc.mjs +29 -1
- package/src/i18n/InternationalizationProvider.tsx +35 -3
- package/src/i18n/generated-english/DateInput/DateInput.generated.ts +0 -1
- package/src/i18n/generated-english/DateInput/useTypedDate.generated.ts +17 -0
- package/src/i18n/generated-english/DateTimeInput/DateTimeInput.generated.ts +0 -1
- package/src/i18n/generated-english/hooks/useScrollRegionProps.generated.ts +13 -0
- package/src/i18n/generated-locales/en.generated.ts +7 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +7 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/useCalendarSystem.ts +95 -0
- package/src/internal/calendar-system.ts +26 -0
- package/src/internal/spinner-rotor.ts +20 -0
- package/src/internal/touch.ts +43 -2
- package/src/motion/MEASUREMENTS.md +11 -0
- package/src/motion/README.md +3 -3
- package/src/motion/animator.ts +7 -7
- package/src/motion/carryAnimations.ts +389 -0
- package/src/motion/transientCopy.ts +45 -5
- package/src/motion/uikit/gestures.ts +22 -0
- package/src/motion/uikit/index.ts +1 -0
- package/src/motion/uikit/timing.ts +7 -5
- package/src/privateAttributes/menuPressLit.stylex.ts +104 -0
- package/src/privateAttributes/press.stylex.ts +261 -0
- package/src/theme/themeMotion.ts +3 -2
- package/src/theme/tokens.stylex.ts +1 -1
- package/src/utils/calendarDateParser.ts +1385 -0
- package/src/utils/calendarSystem.ts +832 -0
- package/src/utils/coarsePointer.ts +27 -14
- package/src/utils/flatTree.ts +15 -3
- package/src/utils/focusReturn.ts +78 -18
- package/src/utils/hitArea.ts +138 -9
- package/src/utils/inputPresentation.ts +21 -1
- package/src/utils/inputStream.ts +47 -10
- package/src/utils/interactionOverlay.stylex.ts +19 -22
- package/src/utils/plainDate.ts +130 -19
- package/src/utils/pressFeedback.ts +46 -14
- package/src/utils/pressGesture.ts +35 -9
- package/src/utils/scrollView.ts +135 -0
- package/src/utils/selectionLock.ts +5 -10
- package/src/utils/touchHitArea.stylex.ts +56 -0
- package/src/utils/touchHitArea.ts +177 -0
- package/src/utils/triggerFocus.ts +17 -4
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* useAdaptivePresentation, and TokenizerBottomSheet (lazy)
|
|
9
9
|
* @output Exports Tokenizer multi-select typeahead component
|
|
10
10
|
* @position Composed component; forwards DOM ref and exposes focus control via
|
|
11
|
-
* handleRef. The `presentation` prop swaps the inline combobox for a
|
|
12
|
-
* trigger
|
|
11
|
+
* handleRef. The `presentation` prop swaps the inline combobox for a field
|
|
12
|
+
* box whose trigger opens TokenizerBottomSheet.
|
|
13
13
|
*
|
|
14
14
|
* SYNC: When modified, update:
|
|
15
15
|
* - /packages/core/src/Tokenizer/index.ts
|
|
@@ -25,6 +25,7 @@ import { CommittedChoicesKeyContext } from "../Typeahead/committedChoicesKey.js"
|
|
|
25
25
|
import { useFieldInputStyling } from "../Field/fieldParts.js";
|
|
26
26
|
import { inputDisabledFocusStyles } from "../Field/inputDisabledFocus.js";
|
|
27
27
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
28
|
+
import { hasInteractiveAncestor } from "../hooks/useClickableContainer.js";
|
|
28
29
|
import { TokenizerClearAllMessageContext } from "./TokenizerClearAllMessageContext.js";
|
|
29
30
|
import { TokenizerItemRemovableContext } from "./TokenizerItemRemovableContext.js";
|
|
30
31
|
import { useBusyAnnouncement } from "../hooks/useBusyAnnouncement.js";
|
|
@@ -167,14 +168,39 @@ const styles = {
|
|
|
167
168
|
kzqmXN: "x1xgy17j",
|
|
168
169
|
$$css: true
|
|
169
170
|
},
|
|
170
|
-
|
|
171
|
+
sheetField: {
|
|
171
172
|
kzqmXN: "xh8yej3",
|
|
173
|
+
kkrTdU: "x1ypdohk x16khyan",
|
|
174
|
+
$$css: true
|
|
175
|
+
},
|
|
176
|
+
sheetFieldDisabled: {
|
|
177
|
+
kkrTdU: "xt0e3qv",
|
|
178
|
+
$$css: true
|
|
179
|
+
},
|
|
180
|
+
sheetTrigger: {
|
|
181
|
+
kysU6D: "xjyslct",
|
|
182
|
+
kzQI83: "x1iyjqo2",
|
|
183
|
+
kSGwAc: "xkh2ocl",
|
|
184
|
+
k1xSpc: "x78zum5",
|
|
185
|
+
kGNEyG: "x6s0dn4",
|
|
186
|
+
k7Eaqz: "xeuugli",
|
|
187
|
+
kmVPX3: "x1717udv",
|
|
188
|
+
kogj98: "x1ghz6dp",
|
|
189
|
+
kMzoRj: "xc342km",
|
|
190
|
+
ksu8eU: "xng3xce",
|
|
191
|
+
kWkggS: "xjbqb8w",
|
|
172
192
|
kMv6JI: "xjb2p0i",
|
|
173
193
|
kGuDYH: "x1qlqyl8",
|
|
194
|
+
kLWn49: "x15bjb6t",
|
|
174
195
|
kMwMTN: "x1heor9g",
|
|
175
196
|
k9WMMc: "x1yc453h",
|
|
176
|
-
kysU6D: "xjyslct",
|
|
177
197
|
kkrTdU: "x1ypdohk x16khyan",
|
|
198
|
+
kI3sdo: "x1a2a7pz",
|
|
199
|
+
$$css: true
|
|
200
|
+
},
|
|
201
|
+
sheetTriggerWithTokens: {
|
|
202
|
+
kVAEAm: "x10l6tqk",
|
|
203
|
+
kpwlN0: "x10a8y8t",
|
|
178
204
|
$$css: true
|
|
179
205
|
},
|
|
180
206
|
sheetTriggerDisabled: {
|
|
@@ -554,7 +580,7 @@ export function Tokenizer({
|
|
|
554
580
|
// Props that describe the inline combobox have no surface in the sheet
|
|
555
581
|
// presentation. Say so once in development rather than dropping them
|
|
556
582
|
// silently (`architecture:public-component-api` INV3).
|
|
557
|
-
const inertSheetProps = isSheetPresentation ? [['renderItem', renderItem], ['
|
|
583
|
+
const inertSheetProps = isSheetPresentation ? [['renderItem', renderItem], ['hasClear', hasClear || undefined], ['hasEntriesOnFocus', hasEntriesOnFocus || undefined], ['menuWidth', menuWidth], ['tokenOverflowBehavior', tokenOverflowBehavior], ['hasAutoFocus', hasAutoFocus || undefined]].filter(([, v]) => v !== undefined && v !== 'none').map(([name]) => name) : [];
|
|
558
584
|
const inertSheetPropsKey = inertSheetProps.join(',');
|
|
559
585
|
useEffect(() => {
|
|
560
586
|
if (inertSheetPropsKey === '') {
|
|
@@ -615,9 +641,27 @@ export function Tokenizer({
|
|
|
615
641
|
};
|
|
616
642
|
}, [tooltipAnchorRef]);
|
|
617
643
|
|
|
644
|
+
// A swap also removes `endContent` and a custom token's remove. If focus is
|
|
645
|
+
// in the box when it detaches, the new control takes it. The box also anchors
|
|
646
|
+
// the disabled-message tooltip.
|
|
647
|
+
const sheetFieldCallbackRef = useCallback(el => {
|
|
648
|
+
tooltipAnchorRef(el);
|
|
649
|
+
if (el == null) {
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
return () => {
|
|
653
|
+
if (el.contains(el.ownerDocument.activeElement)) {
|
|
654
|
+
isFocusPendingHandOffRef.current = true;
|
|
655
|
+
}
|
|
656
|
+
tooltipAnchorRef(null);
|
|
657
|
+
};
|
|
658
|
+
}, [tooltipAnchorRef]);
|
|
659
|
+
|
|
618
660
|
// The sheet presentation has no input; the public ref reaches the trigger,
|
|
619
|
-
// the control it stands for (`family:input-fields` FR10).
|
|
620
|
-
|
|
661
|
+
// the control it stands for (`family:input-fields` FR10). The
|
|
662
|
+
// disabled-message tooltip anchors to the field box around it, as it
|
|
663
|
+
// anchors to the inline field's wrapper.
|
|
664
|
+
const triggerMergedRef = useMergedRefs(triggerRef, ref, handOffFocusRef);
|
|
621
665
|
useImperativeHandle(handleRef, () => ({
|
|
622
666
|
focus() {
|
|
623
667
|
(isSheetPresentation ? triggerRef : inputRef).current?.focus();
|
|
@@ -639,6 +683,11 @@ export function Tokenizer({
|
|
|
639
683
|
// `endContent`, a clear button, or all three — so its width is measured
|
|
640
684
|
// rather than assumed, and the input reserves it.
|
|
641
685
|
const [laneRef, laneReserve] = useEndLaneReserve(END_LANE_INSET);
|
|
686
|
+
// `laneRef` publishes the lane's width, so token rows and the placeholder
|
|
687
|
+
// stop short of it. `sheetLaneRef` tells a tap in the lane from a tap on the
|
|
688
|
+
// field.
|
|
689
|
+
const sheetLaneRef = useRef(null);
|
|
690
|
+
const sheetLaneMergedRef = useMergedRefs(laneRef, sheetLaneRef);
|
|
642
691
|
// A composing component can lock tokens (PowerSearch's read-only filters
|
|
643
692
|
// and read-only field). No remove path removes a locked token.
|
|
644
693
|
const isItemRemovable = use(TokenizerItemRemovableContext);
|
|
@@ -1070,83 +1119,80 @@ export function Tokenizer({
|
|
|
1070
1119
|
})]
|
|
1071
1120
|
})]
|
|
1072
1121
|
});
|
|
1122
|
+
|
|
1123
|
+
// A `renderToken` token's own remove control in the sheet field removes at
|
|
1124
|
+
// once, as it does in the inline field. Its control leaves with it, so
|
|
1125
|
+
// focus moves to the trigger.
|
|
1126
|
+
const handleSheetTokenRemove = item => {
|
|
1127
|
+
if (handleRemove(item)) {
|
|
1128
|
+
triggerRef.current?.focus();
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
// A tap on a token, the placeholder or empty space opens the sheet, as a tap
|
|
1132
|
+
// on the trigger does. The trigger, `endContent` and a custom token's
|
|
1133
|
+
// controls handle their own clicks.
|
|
1134
|
+
const handleSheetFieldClick = event => {
|
|
1135
|
+
const trigger = triggerRef.current;
|
|
1136
|
+
const target = event.target;
|
|
1137
|
+
if (trigger == null || !(target instanceof Element)) {
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
if (trigger.contains(target) || sheetLaneRef.current?.contains(target) || hasInteractiveAncestor(target, event.currentTarget)) {
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
trigger.click();
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
// The caller's onFocus and onBlur report focus entering and leaving the whole
|
|
1147
|
+
// box, as for the inline wrapper. A move between the trigger, `endContent`
|
|
1148
|
+
// and a custom token's controls stays inside the field.
|
|
1149
|
+
const handleSheetFieldFocus = event => {
|
|
1150
|
+
// BottomSheet focuses the trigger only after its exit completes; that
|
|
1151
|
+
// focus is the signal that the retained sheet can leave. If the
|
|
1152
|
+
// resolution moved to the popover meanwhile, the inline input takes the
|
|
1153
|
+
// focus over once it mounts.
|
|
1154
|
+
const isReturningFromSheet = event.target === triggerRef.current && !isSheetOpen && isSheetPresented;
|
|
1155
|
+
if (isReturningFromSheet) {
|
|
1156
|
+
setIsSheetPresented(false);
|
|
1157
|
+
}
|
|
1158
|
+
const relatedTarget = event.relatedTarget;
|
|
1159
|
+
if (relatedTarget instanceof Node && event.currentTarget.contains(relatedTarget)) {
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
// Focus that returns from the field's own sheet, or that a presentation swap
|
|
1163
|
+
// hands over, does not enter from outside. The caller's onFocus stays quiet
|
|
1164
|
+
// for it (`family:input-fields` FR10).
|
|
1165
|
+
const isInsideTheField = isReturningFromSheet && hasReportedFocusRef.current || isHandingOffFocusRef.current;
|
|
1166
|
+
if (!isInsideTheField) {
|
|
1167
|
+
hasReportedFocusRef.current = true;
|
|
1168
|
+
onFocus?.(event);
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
const handleSheetFieldBlur = event => {
|
|
1172
|
+
// Focus moving into the sheet, or to another control in the box, is
|
|
1173
|
+
// still the field's. Only a blur to somewhere else reports.
|
|
1174
|
+
const relatedTarget = event.relatedTarget;
|
|
1175
|
+
if (isSheetOpen || relatedTarget instanceof Node && event.currentTarget.contains(relatedTarget)) {
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
hasReportedFocusRef.current = false;
|
|
1179
|
+
isFocusPendingHandOffRef.current = false;
|
|
1180
|
+
onBlur?.(event);
|
|
1181
|
+
};
|
|
1073
1182
|
let tokenizerContent;
|
|
1074
1183
|
if (isSheetPresentation) {
|
|
1075
1184
|
tokenizerContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
1076
|
-
children: [/*#__PURE__*/_jsxs("
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
"aria-labelledby": fieldLabelledBy,
|
|
1082
|
-
"aria-haspopup": "dialog",
|
|
1083
|
-
"aria-expanded": isSheetOpen,
|
|
1084
|
-
"aria-disabled": isDisabled || undefined
|
|
1085
|
-
// The description is what the inline input's is, in its order —
|
|
1086
|
-
// the caller's ids, the field description, the status message, the
|
|
1087
|
-
// disabled reason (`spec:AST-085` FR5: a disabled control exposes
|
|
1088
|
-
// its description and reason on itself) — then the hidden count and
|
|
1089
|
-
// the rendered tokens themselves, each by id: the
|
|
1090
|
-
// accessible-description algorithm reads the referenced elements in
|
|
1091
|
-
// order and separates them, so every label renders once
|
|
1092
|
-
// (`architecture:component-style-authoring` INV7) and no locale's
|
|
1093
|
-
// list punctuation is written here (AR6).
|
|
1094
|
-
,
|
|
1095
|
-
"aria-describedby": [ariaDescribedByProp, ariaDescribedBy, value.length > 0 ? triggerTokensId : null, ...value.map(item => tokenElementId(item.id))].filter(Boolean).join(' ') || undefined
|
|
1096
|
-
// The open runs first and the caller's onClick after it, as the
|
|
1097
|
-
// inline input composes its click: a caller observes the click but
|
|
1098
|
-
// cannot cancel the field's own handling
|
|
1099
|
-
// (`family:input-fields` FR10).
|
|
1100
|
-
,
|
|
1101
|
-
onClick: composeEventHandlers(() => {
|
|
1102
|
-
if (isDisabled) {
|
|
1103
|
-
return;
|
|
1104
|
-
}
|
|
1105
|
-
setIsSheetPresented(true);
|
|
1106
|
-
setSheetInitialQuery(sheetQueryRef.current);
|
|
1107
|
-
setIsSheetOpen(true);
|
|
1108
|
-
},
|
|
1109
|
-
// Typed for the input by the base props; here the control is the
|
|
1110
|
-
// trigger button, and the handler only reads the event.
|
|
1111
|
-
callerOnClick),
|
|
1112
|
-
onFocus: event => {
|
|
1113
|
-
// BottomSheet focuses the trigger only after its exit completes;
|
|
1114
|
-
// that focus is the signal that the retained sheet can leave. If
|
|
1115
|
-
// the resolution moved to the popover meanwhile, the inline input
|
|
1116
|
-
// takes the focus over once it mounts. The field's own sheet is
|
|
1117
|
-
// part of the field: focus coming back from it, or handed over by
|
|
1118
|
-
// a presentation swap, is not focus entering from outside, so the
|
|
1119
|
-
// caller's onFocus — "when focus enters the tokenizer from
|
|
1120
|
-
// outside" — stays quiet for it (`family:input-fields` FR10).
|
|
1121
|
-
const isReturningFromSheet = !isSheetOpen && isSheetPresented;
|
|
1122
|
-
if (isReturningFromSheet) {
|
|
1123
|
-
setIsSheetPresented(false);
|
|
1124
|
-
}
|
|
1125
|
-
const isInsideTheField = isReturningFromSheet && hasReportedFocusRef.current || isHandingOffFocusRef.current;
|
|
1126
|
-
if (!isInsideTheField) {
|
|
1127
|
-
hasReportedFocusRef.current = true;
|
|
1128
|
-
onFocus?.(event);
|
|
1129
|
-
}
|
|
1130
|
-
},
|
|
1131
|
-
onBlur: event => {
|
|
1132
|
-
// Focus moving into the sheet is still the field's: the flag
|
|
1133
|
-
// stays, and the caller's onBlur — "when focus leaves the
|
|
1134
|
-
// tokenizer entirely" — stays quiet. Only a blur to somewhere
|
|
1135
|
-
// else reports.
|
|
1136
|
-
if (isSheetOpen) {
|
|
1137
|
-
return;
|
|
1138
|
-
}
|
|
1139
|
-
hasReportedFocusRef.current = false;
|
|
1140
|
-
isFocusPendingHandOffRef.current = false;
|
|
1141
|
-
onBlur?.(event);
|
|
1142
|
-
},
|
|
1143
|
-
onKeyDown: onKeyDown,
|
|
1185
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
1186
|
+
ref: sheetFieldCallbackRef,
|
|
1187
|
+
onClick: handleSheetFieldClick,
|
|
1188
|
+
onFocus: handleSheetFieldFocus,
|
|
1189
|
+
onBlur: handleSheetFieldBlur,
|
|
1144
1190
|
...mergeProps(themeProps('tokenizer', {
|
|
1145
1191
|
size,
|
|
1146
1192
|
status: status?.type,
|
|
1147
1193
|
disabled: isDisabled ? 'disabled' : null
|
|
1148
|
-
}), stylex.props(inputWrapperStyles.base, styles.wrapper, styles.
|
|
1149
|
-
// The
|
|
1194
|
+
}), stylex.props(inputWrapperStyles.base, styles.wrapper, styles.sheetField, isDisabled && styles.sheetFieldDisabled,
|
|
1195
|
+
// The field keeps the inline field's height for its size step,
|
|
1150
1196
|
// as Selector's bottom-sheet trigger does; the sheet's own rows
|
|
1151
1197
|
// and search field carry the touch-sized targets.
|
|
1152
1198
|
sizeStyles[size], value.length > 0 && styles.wrapperWithTokens, isDisabled && inputWrapperStyles.disabled, isDisabled && styles.sheetTriggerDisabled, status && inputStatusBorderStyles[status.type], status && !isDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], controlXstyle), controlClassName, controlStyle),
|
|
@@ -1161,29 +1207,83 @@ export function Tokenizer({
|
|
|
1161
1207
|
size: 'sm',
|
|
1162
1208
|
color: 'secondary'
|
|
1163
1209
|
})
|
|
1164
|
-
}),
|
|
1210
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
1211
|
+
...restWithoutClick,
|
|
1212
|
+
ref: triggerMergedRef,
|
|
1213
|
+
type: "button",
|
|
1214
|
+
id: inputId,
|
|
1215
|
+
"aria-labelledby": fieldLabelledBy,
|
|
1216
|
+
"aria-haspopup": "dialog",
|
|
1217
|
+
"aria-expanded": isSheetOpen,
|
|
1218
|
+
"aria-disabled": isDisabled || undefined
|
|
1219
|
+
// The description follows the inline input's order: the caller's
|
|
1220
|
+
// ids, the field description, the status message, then the
|
|
1221
|
+
// disabled reason (`spec:AST-085` FR5). The hidden count and the
|
|
1222
|
+
// token labels follow, each by id. The algorithm separates
|
|
1223
|
+
// referenced elements, so no list punctuation is written here
|
|
1224
|
+
// (AR6). A default token is display-only and is its own label. A
|
|
1225
|
+
// custom token can hold controls, so a hidden copy of its item
|
|
1226
|
+
// label stands in.
|
|
1227
|
+
,
|
|
1228
|
+
"aria-describedby": [ariaDescribedByProp, ariaDescribedBy, value.length > 0 ? triggerTokensId : null, ...value.map(item => tokenElementId(item.id))].filter(Boolean).join(' ') || undefined
|
|
1229
|
+
// The open runs first and the caller's onClick after it, as the
|
|
1230
|
+
// inline input composes its click: a caller observes the click but
|
|
1231
|
+
// cannot cancel the field's own handling
|
|
1232
|
+
// (`family:input-fields` FR10).
|
|
1233
|
+
,
|
|
1234
|
+
onClick: composeEventHandlers(() => {
|
|
1235
|
+
if (isDisabled) {
|
|
1236
|
+
return;
|
|
1237
|
+
}
|
|
1238
|
+
setIsSheetPresented(true);
|
|
1239
|
+
setSheetInitialQuery(sheetQueryRef.current);
|
|
1240
|
+
setIsSheetOpen(true);
|
|
1241
|
+
},
|
|
1242
|
+
// Typed for the input by the base props; here the control is the
|
|
1243
|
+
// trigger button, and the handler only reads the event.
|
|
1244
|
+
callerOnClick),
|
|
1245
|
+
onKeyDown: onKeyDown,
|
|
1246
|
+
...stylex.props(styles.sheetTrigger, value.length > 0 && styles.sheetTriggerWithTokens,
|
|
1247
|
+
// With no token the placeholder stops short of the end lane, as
|
|
1248
|
+
// the inline input's text does.
|
|
1249
|
+
value.length === 0 && laneReserve),
|
|
1250
|
+
children: value.length === 0 && /*#__PURE__*/_jsx("span", {
|
|
1251
|
+
...{
|
|
1252
|
+
0: {
|
|
1253
|
+
className: "xv1l7n4 x7a5moj"
|
|
1254
|
+
},
|
|
1255
|
+
1: {
|
|
1256
|
+
className: "x7a5moj xv1l7n4 x1bhcspo"
|
|
1257
|
+
}
|
|
1258
|
+
}[!!isDisabled << 0],
|
|
1259
|
+
children: placeholder ?? ''
|
|
1260
|
+
})
|
|
1261
|
+
}), value.map(item => renderToken ? /*#__PURE__*/_jsx("span", {
|
|
1262
|
+
...{
|
|
1263
|
+
className: "x78zum5 x2lah0s x193iq5w x1n2onr6 x1vjfegm"
|
|
1264
|
+
},
|
|
1265
|
+
children: renderToken(item, () => handleSheetTokenRemove(item))
|
|
1266
|
+
}, item.id) : /*#__PURE__*/_jsx(Token, {
|
|
1165
1267
|
id: tokenElementId(item.id),
|
|
1166
1268
|
label: item.label,
|
|
1167
1269
|
size: size,
|
|
1168
1270
|
isDisabled: isDisabled,
|
|
1169
1271
|
xstyle: isDisabled ? styles.sheetTokenDisabled : undefined
|
|
1170
|
-
}, item.id))
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1175
|
-
1: {
|
|
1176
|
-
className: "x7a5moj xv1l7n4 x1bhcspo"
|
|
1177
|
-
}
|
|
1178
|
-
}[!!isDisabled << 0],
|
|
1179
|
-
children: placeholder ?? ''
|
|
1272
|
+
}, item.id)), isRenderable(endContent) && /*#__PURE__*/_jsx("div", {
|
|
1273
|
+
ref: sheetLaneMergedRef,
|
|
1274
|
+
...stylex.props(styles.endSection, endSectionSizeStyles[size]),
|
|
1275
|
+
children: endContent
|
|
1180
1276
|
})]
|
|
1181
1277
|
}), value.length > 0 && /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
1182
1278
|
id: triggerTokensId,
|
|
1183
1279
|
children: t('@astryx.tokenizer.selectedCount', {
|
|
1184
1280
|
count: value.length
|
|
1185
1281
|
})
|
|
1186
|
-
}),
|
|
1282
|
+
}), renderToken != null && value.map(item => /*#__PURE__*/_jsx("span", {
|
|
1283
|
+
id: tokenElementId(item.id),
|
|
1284
|
+
hidden: true,
|
|
1285
|
+
children: item.label
|
|
1286
|
+
}, item.id)), htmlName != null && !isDisabled && value.map(item => /*#__PURE__*/_jsx("input", {
|
|
1187
1287
|
type: "hidden",
|
|
1188
1288
|
name: htmlName,
|
|
1189
1289
|
value: item.id
|
|
@@ -104,7 +104,8 @@ export interface TooltipReturn {
|
|
|
104
104
|
ref: RefCallback<HTMLElement>;
|
|
105
105
|
/**
|
|
106
106
|
* Ref for the positioning anchor element.
|
|
107
|
-
*
|
|
107
|
+
* While the layer is shown, and until its exit animation ends, the trigger
|
|
108
|
+
* carries the layer's CSS anchor name.
|
|
108
109
|
*/
|
|
109
110
|
positionRef: RefCallback<HTMLElement>;
|
|
110
111
|
/**
|
|
@@ -116,6 +117,7 @@ export interface TooltipReturn {
|
|
|
116
117
|
/**
|
|
117
118
|
* The CSS anchor name to use for positioning.
|
|
118
119
|
* Use this when you need to set anchorName manually (e.g., display:contents wrapper).
|
|
120
|
+
* Set it only while the layer is shown or its exit animation runs.
|
|
119
121
|
*/
|
|
120
122
|
anchorId: string;
|
|
121
123
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA+ClC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEzC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;OAOG;IACH,aAAa,EAAE,CACb,QAAQ,EAAE,SAAS,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,KAC5C,SAAS,CAAC;IAEf;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,wBAAgB,UAAU,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CAqsBtE"}
|