@astryxdesign/core 0.7.7 → 0.7.8-canary.0588a13
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/AlertDialog/AlertDialog.d.ts +4 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +46 -6
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +11 -3
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +1 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +1 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +55 -18
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +5 -0
- package/dist/BottomSheet/bottomSheetStack.js +1 -1
- package/dist/BottomSheet/useSheetGestures.d.ts +3 -1
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +16 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +17 -1
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +18 -22
- package/dist/Calendar/getWeekdayHeaderNames.d.ts +16 -0
- package/dist/Calendar/getWeekdayHeaderNames.d.ts.map +1 -0
- package/dist/Calendar/getWeekdayHeaderNames.js +70 -0
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +2 -10
- package/dist/Calendar/{standaloneShortWeekdayNames.generated.d.ts → weekdayHeaderNames.generated.d.ts} +14 -14
- package/dist/Calendar/weekdayHeaderNames.generated.d.ts.map +1 -0
- package/dist/Calendar/{standaloneShortWeekdayNames.generated.js → weekdayHeaderNames.generated.js} +12 -12
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +2 -0
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +6 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +2 -1
- package/dist/Chat/useChatDictation.d.ts.map +1 -1
- package/dist/Chat/useChatDictation.js +2 -0
- package/dist/Chat/useChatNewMessages.js +1 -1
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +2 -0
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +3 -0
- package/dist/Chat/useTriggerMenu.js +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +17 -12
- package/dist/CheckboxList/CheckboxList.d.ts +20 -2
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +12 -4
- package/dist/CheckboxList/CheckboxListContext.d.ts +7 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListContext.js +2 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +14 -2
- package/dist/CheckboxList/requiredGroup.d.ts +22 -0
- package/dist/CheckboxList/requiredGroup.d.ts.map +1 -0
- package/dist/CheckboxList/requiredGroup.js +52 -0
- package/dist/CodeBlock/CodeBlock.d.ts +10 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +28 -11
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +2 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +14 -4
- package/dist/ContextMenu/ContextMenu.js +2 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +5 -2
- package/dist/DateInput/PickerWheel.d.ts +19 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -0
- package/dist/DateInput/PickerWheel.js +646 -0
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +9 -30
- package/dist/DateInput/Wheel.d.ts +18 -37
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +133 -120
- package/dist/DateInput/datePickerTouch.d.ts +13 -0
- package/dist/DateInput/datePickerTouch.d.ts.map +1 -0
- package/dist/DateInput/datePickerTouch.js +14 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts +10 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts.map +1 -1
- package/dist/DateInput/useOwnScrollGesture.js +16 -3
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +2 -0
- package/dist/DateInput/useScrollSettle.d.ts.map +1 -1
- package/dist/DateInput/useScrollSettle.js +3 -0
- package/dist/DateInput/useWheelListbox.d.ts +59 -0
- package/dist/DateInput/useWheelListbox.d.ts.map +1 -0
- package/dist/DateInput/useWheelListbox.js +88 -0
- package/dist/DateInput/wheelOptions.d.ts +94 -0
- package/dist/DateInput/wheelOptions.d.ts.map +1 -0
- package/dist/DateInput/wheelOptions.js +110 -0
- package/dist/DateInput/wheelPhysics.d.ts +127 -0
- package/dist/DateInput/wheelPhysics.d.ts.map +1 -0
- package/dist/DateInput/wheelPhysics.js +341 -0
- package/dist/DateInput/wheelStrip.d.ts +92 -0
- package/dist/DateInput/wheelStrip.d.ts.map +1 -0
- package/dist/DateInput/wheelStrip.js +258 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +70 -127
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +9 -32
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +3 -0
- package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -1
- package/dist/DropdownMenu/useMenuOverflow.js +5 -0
- package/dist/Field/Field.js +2 -2
- package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts.map +1 -1
- package/dist/FieldStatus/useFieldStatusAnnouncement.js +1 -0
- package/dist/FormLayout/FormLayout.d.ts +5 -1
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.d.ts +6 -4
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +48 -3
- package/dist/HoverCard/useHoverCard.d.ts +5 -4
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +26 -34
- package/dist/Icon/Icon.d.ts +5 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +20 -3
- package/dist/InfoTip/InfoTip.d.ts +5 -5
- package/dist/InfoTip/InfoTip.d.ts.map +1 -1
- package/dist/InfoTip/InfoTip.js +58 -19
- package/dist/Item/useSwipeAction.d.ts.map +1 -1
- package/dist/Item/useSwipeAction.js +3 -0
- package/dist/Layer/modalOutlet.d.ts.map +1 -1
- package/dist/Layer/modalOutlet.js +2 -0
- package/dist/Layer/outsidePress.d.ts.map +1 -1
- package/dist/Layer/outsidePress.js +1 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +4 -1
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +3 -0
- package/dist/Layer/useTouchTrigger.d.ts +13 -7
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +20 -6
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.d.ts.map +1 -1
- package/dist/Layout/index.js +1 -1
- package/dist/Layout/layoutReset.js +1 -1
- package/dist/Layout/overlayPaddingReset.stylex.d.ts +68 -0
- package/dist/Layout/overlayPaddingReset.stylex.d.ts.map +1 -0
- package/dist/Layout/overlayPaddingReset.stylex.js +72 -0
- package/dist/Layout/padding.stylex.d.ts +5 -129
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +9 -143
- package/dist/Layout/paddingStyles.stylex.d.ts +83 -0
- package/dist/Layout/paddingStyles.stylex.d.ts.map +1 -0
- package/dist/Layout/paddingStyles.stylex.js +99 -0
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +20 -1
- package/dist/MobileNav/MobileNav.d.ts +3 -2
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +10 -26
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +2 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +2 -1
- package/dist/Outline/useOutlineFromDOM.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromDOM.js +3 -0
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +3 -0
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +3 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +7 -2
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +6 -0
- package/dist/Popover/usePopover.js +2 -2
- package/dist/PowerSearch/PowerSearch.d.ts +41 -4
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +441 -134
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +125 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +2041 -0
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +35 -2
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +43 -10
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +4 -2
- package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -2
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +273 -86
- package/dist/PowerSearch/formatFilterValue.d.ts +14 -7
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +31 -23
- package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
- package/dist/PowerSearch/formatTokenValue.js +161 -0
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/powerSearchDateZone.d.ts +25 -0
- package/dist/PowerSearch/powerSearchDateZone.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchDateZone.js +57 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
- package/dist/PowerSearch/types.d.ts +8 -1
- package/dist/PowerSearch/types.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBarTouch.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBarTouch.js +2 -0
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +3 -2
- package/dist/RadioList/RadioListItem.d.ts +1 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -3
- package/dist/Resizable/ResizeHandle.d.ts +2 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +116 -92
- package/dist/Resizable/createResizable.d.ts +199 -0
- package/dist/Resizable/createResizable.d.ts.map +1 -0
- package/dist/Resizable/createResizable.js +733 -0
- package/dist/Resizable/separatorAttributes.d.ts +45 -0
- package/dist/Resizable/separatorAttributes.d.ts.map +1 -0
- package/dist/Resizable/separatorAttributes.js +35 -0
- package/dist/Resizable/useResizable.d.ts +3 -3
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +252 -459
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +3 -3
- package/dist/SelectableCard/SelectableCard.d.ts +2 -0
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +36 -11
- package/dist/SelectableCard/selectableCardInput.d.ts +12 -0
- package/dist/SelectableCard/selectableCardInput.d.ts.map +1 -0
- package/dist/SelectableCard/selectableCardInput.js +20 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +7 -9
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +36 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +16 -11
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +60 -58
- package/dist/Stepper/Stepper.d.ts.map +1 -1
- package/dist/Stepper/Stepper.js +10 -15
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +4 -10
- package/dist/Switch/useSwitchTouch.js +4 -4
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +29 -8
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +3 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +2 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +12 -0
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +17 -3
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -0
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +11 -0
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +27 -14
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +2 -1
- package/dist/TextInput/TextInput.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +12 -8
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +2 -0
- package/dist/TimeInput/TimeWheels.d.ts +32 -0
- package/dist/TimeInput/TimeWheels.d.ts.map +1 -0
- package/dist/TimeInput/TimeWheels.js +144 -0
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +63 -116
- package/dist/TimeInput/timeWheelRules.d.ts +124 -0
- package/dist/TimeInput/timeWheelRules.d.ts.map +1 -0
- package/dist/TimeInput/timeWheelRules.js +277 -0
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +2 -0
- package/dist/Timestamp/Timestamp.js +1 -1
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +1 -23
- package/dist/Toast/Toast.d.ts +11 -1
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +25 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +97 -34
- package/dist/Toast/types.d.ts +9 -3
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +1 -0
- package/dist/Tokenizer/Tokenizer.d.ts +44 -46
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +20 -21
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +12 -18
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.d.ts +2 -23
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +5 -29
- package/dist/Tooltip/useTooltip.d.ts +23 -30
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +200 -108
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +27 -18
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/animator/createAnimator.d.ts +98 -0
- package/dist/animator/createAnimator.d.ts.map +1 -0
- package/dist/animator/createAnimator.js +259 -0
- package/dist/astryx.css +53 -8
- package/dist/gestures/GestureHost.d.ts +16 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +4 -1
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +4 -3
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -1
- package/dist/hooks/ModalAnnounceProvider.js +1 -0
- package/dist/hooks/actionGroupTracker.d.ts +4 -1
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +18 -7
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/longPressDetector.d.ts +66 -0
- package/dist/hooks/longPressDetector.d.ts.map +1 -0
- package/dist/hooks/longPressDetector.js +200 -0
- package/dist/hooks/pressGroupContext.d.ts +6 -0
- package/dist/hooks/pressGroupContext.d.ts.map +1 -0
- package/dist/hooks/pressGroupContext.js +20 -0
- package/dist/hooks/rootScrollStyles.d.ts +48 -0
- package/dist/hooks/rootScrollStyles.d.ts.map +1 -0
- package/dist/hooks/rootScrollStyles.js +207 -0
- package/dist/hooks/scrollLockTouchGuard.d.ts +13 -0
- package/dist/hooks/scrollLockTouchGuard.d.ts.map +1 -0
- package/dist/hooks/scrollLockTouchGuard.js +117 -0
- package/dist/hooks/scrollbarGutter.d.ts +4 -4
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -1
- package/dist/hooks/scrollbarGutter.js +36 -23
- package/dist/hooks/useActionGroupTracking.d.ts +53 -0
- package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
- package/dist/hooks/useActionGroupTracking.js +174 -0
- package/dist/hooks/useAnimator.d.ts +41 -0
- package/dist/hooks/useAnimator.d.ts.map +1 -0
- package/dist/hooks/useAnimator.js +70 -0
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +1 -0
- package/dist/hooks/useAttachment.d.ts +1 -1
- package/dist/hooks/useAttachment.js +1 -1
- package/dist/hooks/useAutoMediaMode.d.ts.map +1 -1
- package/dist/hooks/useAutoMediaMode.js +1 -0
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +2 -0
- package/dist/hooks/useDevWarning.d.ts.map +1 -1
- package/dist/hooks/useDevWarning.js +2 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +2 -0
- package/dist/hooks/useGridFocus.d.ts +8 -5
- package/dist/hooks/useGridFocus.d.ts.map +1 -1
- package/dist/hooks/useGridFocus.js +4 -3
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +3 -0
- package/dist/hooks/useImageMode.d.ts.map +1 -1
- package/dist/hooks/useImageMode.js +3 -0
- package/dist/hooks/useInputStatusIcon.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +2 -2
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +1 -1
- package/dist/hooks/useLongPress.d.ts +8 -9
- package/dist/hooks/useLongPress.d.ts.map +1 -1
- package/dist/hooks/useLongPress.js +23 -106
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +2 -0
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +3 -0
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +2 -1
- package/dist/hooks/usePressFeedback.d.ts.map +1 -1
- package/dist/hooks/usePressFeedback.js +1 -0
- package/dist/hooks/useResolvedRequired.d.ts +3 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +3 -0
- package/dist/hooks/useScrollLock.d.ts +8 -9
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +50 -48
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +5 -0
- package/dist/hooks/useStreamingText.d.ts.map +1 -1
- package/dist/hooks/useStreamingText.js +3 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +45 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
- package/dist/i18n/generated-english/Resizable/createResizable.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Resizable/createResizable.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Resizable/createResizable.generated.js +13 -0
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.js +3 -1
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.js +3 -1
- package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.js +17 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +37 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/internal/indicatorPress.stylex.d.ts +20 -0
- package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
- package/dist/internal/indicatorPress.stylex.js +26 -0
- package/dist/internal/selectable-card.d.ts +21 -0
- package/dist/internal/selectable-card.d.ts.map +1 -0
- package/dist/internal/selectable-card.js +20 -0
- package/dist/internal/sheetDraft.d.ts +2 -2
- package/dist/internal/sheetDraft.js +2 -2
- package/dist/keyboard/index.d.ts +17 -0
- package/dist/keyboard/index.d.ts.map +1 -0
- package/dist/keyboard/index.js +19 -0
- package/dist/keyboard/keyboardHeight.d.ts +149 -0
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -0
- package/dist/keyboard/keyboardHeight.js +432 -0
- package/dist/keyboard/keyboardLayoutGuide.d.ts +59 -0
- package/dist/keyboard/keyboardLayoutGuide.d.ts.map +1 -0
- package/dist/keyboard/keyboardLayoutGuide.js +207 -0
- package/dist/keyboard/keyboardModel.d.ts +93 -0
- package/dist/keyboard/keyboardModel.d.ts.map +1 -0
- package/dist/keyboard/keyboardModel.js +220 -0
- package/dist/keyboard/rideKeyboard.d.ts +42 -0
- package/dist/keyboard/rideKeyboard.d.ts.map +1 -0
- package/dist/keyboard/rideKeyboard.js +77 -0
- package/dist/keyboard/useMobileKeyboard.d.ts +61 -0
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -0
- package/dist/keyboard/useMobileKeyboard.js +699 -0
- package/dist/motion/android/index.d.ts +16 -0
- package/dist/motion/android/index.d.ts.map +1 -0
- package/dist/motion/android/index.js +18 -0
- package/dist/motion/android/keyboard.d.ts +83 -0
- package/dist/motion/android/keyboard.d.ts.map +1 -0
- package/dist/motion/android/keyboard.js +96 -0
- package/dist/motion/animatedLayout.d.ts +8 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +246 -53
- package/dist/motion/animator.d.ts +14 -14
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +45 -26
- package/dist/motion/frameBlock.d.ts +14 -0
- package/dist/motion/frameBlock.d.ts.map +1 -0
- package/dist/motion/frameBlock.js +16 -0
- package/dist/motion/progress.d.ts +88 -0
- package/dist/motion/progress.d.ts.map +1 -0
- package/dist/motion/progress.js +128 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -1
- package/dist/motion/reducedMotion.js +3 -1
- package/dist/motion/uikit/alert.d.ts +41 -0
- package/dist/motion/uikit/alert.d.ts.map +1 -0
- package/dist/motion/uikit/alert.js +43 -0
- package/dist/motion/uikit/datePicker.d.ts +58 -0
- package/dist/motion/uikit/datePicker.d.ts.map +1 -0
- package/dist/motion/uikit/datePicker.js +60 -0
- package/dist/motion/uikit/index.d.ts +6 -4
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +6 -4
- package/dist/motion/uikit/picker.d.ts +96 -0
- package/dist/motion/uikit/picker.d.ts.map +1 -0
- package/dist/motion/uikit/picker.js +117 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +22 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressGroupItem.stylex.js +36 -0
- package/dist/privateAttributes/reducedMotion.stylex.d.ts +23 -0
- package/dist/privateAttributes/reducedMotion.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/reducedMotion.stylex.js +40 -0
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +29 -4
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +14 -13
- package/dist/theme/motionKnobs.d.ts +4 -3
- package/dist/theme/motionKnobs.d.ts.map +1 -1
- package/dist/theme/motionKnobs.js +3 -2
- package/dist/theme/themeMotion.d.ts +6 -0
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +15 -2
- package/dist/theme/tokens.stylex.d.ts +3 -0
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +4 -1
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +12 -0
- package/dist/utils/disabledInteraction.d.ts +10 -2
- package/dist/utils/disabledInteraction.d.ts.map +1 -1
- package/dist/utils/disabledInteraction.js +16 -2
- package/dist/utils/focusReturn.d.ts +22 -25
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +36 -29
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/interactionModality.d.ts.map +1 -1
- package/dist/utils/interactionModality.js +4 -0
- package/dist/utils/interactionOverlay.stylex.d.ts +6 -4
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +6 -4
- package/dist/utils/isFocusDetached.d.ts +27 -0
- package/dist/utils/isFocusDetached.d.ts.map +1 -0
- package/dist/utils/isFocusDetached.js +32 -0
- package/dist/utils/layoutViewport.d.ts +25 -0
- package/dist/utils/layoutViewport.d.ts.map +1 -0
- package/dist/utils/layoutViewport.js +102 -0
- package/dist/utils/plainDate.d.ts +31 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +68 -4
- package/dist/utils/pressFeedback.d.ts +6 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +97 -18
- package/dist/utils/pressGesture.d.ts +4 -2
- package/dist/utils/pressGesture.d.ts.map +1 -1
- package/dist/utils/pressGesture.js +3 -1
- package/dist/utils/selectionLock.d.ts +10 -1
- package/dist/utils/selectionLock.d.ts.map +1 -1
- package/dist/utils/selectionLock.js +31 -5
- package/dist/utils/sharedMutationObserver.d.ts +2 -1
- package/dist/utils/sharedMutationObserver.d.ts.map +1 -1
- package/dist/utils/sharedMutationObserver.js +2 -1
- package/dist/utils/timeParser.d.ts +2 -1
- package/dist/utils/timeParser.d.ts.map +1 -1
- package/dist/utils/timeParser.js +29 -3
- package/dist/utils/triggerFocus.d.ts +36 -0
- package/dist/utils/triggerFocus.d.ts.map +1 -0
- package/dist/utils/triggerFocus.js +65 -0
- package/locales/en.json +148 -0
- package/locales/pseudo.json +111 -0
- package/package.json +14 -9
- package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
- package/src/AlertDialog/AlertDialog.tsx +46 -5
- package/src/AppShell/AppShell.tsx +13 -4
- package/src/BottomSheet/BottomSheet.doc.mjs +1 -1
- package/src/BottomSheet/BottomSheet.tsx +1 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +80 -16
- package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +5 -0
- package/src/BottomSheet/BottomSheetSwitcher.tsx +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +1 -1
- package/src/BottomSheet/useSheetGestures.ts +16 -1
- package/src/Button/Button.tsx +26 -4
- package/src/Calendar/Calendar.tsx +40 -32
- package/src/Calendar/getWeekdayHeaderNames.ts +88 -0
- package/src/Calendar/hooks/useCalendarDays.ts +5 -10
- package/src/Calendar/{standaloneShortWeekdayNames.generated.ts → weekdayHeaderNames.generated.ts} +14 -14
- package/src/Carousel/Carousel.tsx +1 -0
- package/src/Chat/ChatComposerInput.tsx +4 -7
- package/src/Chat/ChatMessageList.tsx +2 -1
- package/src/Chat/useChatDictation.ts +1 -0
- package/src/Chat/useChatNewMessages.ts +1 -1
- package/src/Chat/useChatStreamScroll.ts +2 -0
- package/src/Chat/useSpeechRecognition.ts +2 -0
- package/src/Chat/useTriggerMenu.tsx +1 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
- package/src/CheckboxInput/CheckboxInput.tsx +38 -15
- package/src/CheckboxList/CheckboxList.doc.mjs +14 -0
- package/src/CheckboxList/CheckboxList.tsx +43 -2
- package/src/CheckboxList/CheckboxListContext.tsx +9 -1
- package/src/CheckboxList/CheckboxListItem.tsx +23 -2
- package/src/CheckboxList/requiredGroup.ts +77 -0
- package/src/CodeBlock/CodeBlock.doc.mjs +9 -1
- package/src/CodeBlock/CodeBlock.tsx +41 -4
- package/src/CommandPalette/CommandPalette.tsx +1 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.tsx +20 -5
- package/src/ContextMenu/ContextMenu.tsx +2 -2
- package/src/DateInput/MonthScroller.tsx +8 -2
- package/src/DateInput/PickerWheel.tsx +796 -0
- package/src/DateInput/TouchDateField.tsx +6 -32
- package/src/DateInput/Wheel.tsx +188 -171
- package/src/DateInput/datePickerTouch.ts +15 -0
- package/src/DateInput/useOwnScrollGesture.ts +25 -3
- package/src/DateInput/usePointerDragScroll.ts +1 -0
- package/src/DateInput/useScrollSettle.ts +2 -0
- package/src/DateInput/useWheelListbox.ts +112 -0
- package/src/DateInput/wheelOptions.ts +184 -0
- package/src/DateInput/wheelPhysics.ts +406 -0
- package/src/DateInput/wheelStrip.ts +341 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +100 -189
- package/src/Dialog/Dialog.tsx +12 -32
- package/src/Drawer/useDrawerDialogPresence.ts +2 -0
- package/src/DropdownMenu/useMenuOverflow.ts +3 -0
- package/src/Field/Field.tsx +2 -2
- package/src/FieldStatus/useFieldStatusAnnouncement.ts +1 -0
- package/src/FormLayout/FormLayout.doc.mjs +181 -46
- package/src/FormLayout/FormLayout.tsx +5 -1
- package/src/HoverCard/HoverCard.doc.mjs +10 -8
- package/src/HoverCard/HoverCard.tsx +58 -6
- package/src/HoverCard/useHoverCard.doc.mjs +178 -36
- package/src/HoverCard/useHoverCard.tsx +55 -55
- package/src/Icon/Icon.doc.mjs +51 -10
- package/src/Icon/Icon.tsx +31 -8
- package/src/IconButton/IconButton.doc.mjs +141 -21
- package/src/InfoTip/InfoTip.tsx +72 -16
- package/src/Item/useSwipeAction.ts +2 -0
- package/src/Layer/modalOutlet.ts +2 -0
- package/src/Layer/outsidePress.ts +1 -0
- package/src/Layer/useLayer.tsx +3 -1
- package/src/Layer/useLayerDismissal.ts +2 -0
- package/src/Layer/useTouchTrigger.ts +19 -6
- package/src/Layout/index.ts +1 -1
- package/src/Layout/layoutReset.ts +1 -1
- package/src/Layout/overlayPaddingReset.stylex.ts +73 -0
- package/src/Layout/padding.stylex.ts +9 -133
- package/src/Layout/paddingStyles.stylex.ts +87 -0
- package/src/Lightbox/Lightbox.tsx +20 -1
- package/src/Lightbox/useLightbox.doc.mjs +167 -0
- package/src/MobileNav/MobileNav.tsx +10 -31
- package/src/MultiSelector/MultiSelector.tsx +2 -7
- package/src/NumberInput/NumberInput.tsx +2 -7
- package/src/Outline/useOutlineFromDOM.ts +2 -0
- package/src/Outline/useScrollSpy.ts +2 -0
- package/src/OverflowList/OverflowList.tsx +2 -0
- package/src/Overlay/Overlay.tsx +7 -2
- package/src/Popover/Popover.tsx +4 -0
- package/src/Popover/usePopover.tsx +2 -2
- package/src/PowerSearch/PowerSearch.doc.mjs +60 -8
- package/src/PowerSearch/PowerSearch.tsx +622 -157
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2700 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +65 -9
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +2 -0
- package/src/PowerSearch/PowerSearchToken.tsx +2 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +340 -59
- package/src/PowerSearch/formatFilterValue.ts +49 -27
- package/src/PowerSearch/formatTokenValue.ts +220 -0
- package/src/PowerSearch/index.ts +5 -1
- package/src/PowerSearch/powerSearchDateZone.ts +95 -0
- package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
- package/src/PowerSearch/types.ts +8 -1
- package/src/ProgressBar/ProgressBarTouch.ts +2 -0
- package/src/RadioList/RadioList.tsx +3 -2
- package/src/RadioList/RadioListItem.tsx +5 -3
- package/src/Resizable/Resizable.doc.mjs +5 -4
- package/src/Resizable/ResizeHandle.tsx +187 -135
- package/src/Resizable/createResizable.ts +1046 -0
- package/src/Resizable/separatorAttributes.ts +73 -0
- package/src/Resizable/useResizable.ts +292 -623
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +6 -3
- package/src/SelectableCard/SelectableCard.tsx +39 -10
- package/src/SelectableCard/selectableCardInput.ts +30 -0
- package/src/Selector/Selector.tsx +7 -19
- package/src/SideNav/SideNav.tsx +41 -5
- package/src/Slider/Slider.tsx +20 -11
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Spinner/Spinner.tsx +77 -63
- package/src/Stepper/Stepper.tsx +10 -27
- package/src/Switch/Switch.tsx +2 -6
- package/src/Switch/useSwitchTouch.ts +4 -4
- package/src/Table/BaseTable.tsx +46 -12
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +2 -1
- package/src/Table/plugins/filtering/useTableFiltering.tsx +1 -0
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +31 -7
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +2 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +43 -20
- package/src/Table/useTableRowExpansion.doc.mjs +9 -0
- package/src/Table/useTableTreeData.doc.mjs +15 -3
- package/src/TextArea/TextArea.tsx +2 -7
- package/src/TextInput/TextInput.tsx +13 -17
- package/src/TimeInput/TimeInput.tsx +2 -0
- package/src/TimeInput/TimeWheels.tsx +218 -0
- package/src/TimeInput/TouchTimeField.tsx +93 -155
- package/src/TimeInput/timeWheelRules.ts +352 -0
- package/src/Timer/Timer.tsx +1 -0
- package/src/Timestamp/Timestamp.tsx +1 -1
- package/src/Timestamp/formatInstant.ts +1 -33
- package/src/Toast/Toast.doc.mjs +4 -3
- package/src/Toast/Toast.tsx +52 -32
- package/src/Toast/ToastViewport.tsx +123 -35
- package/src/Toast/types.ts +9 -3
- package/src/Toast/useToast.tsx +1 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +10 -10
- package/src/Tokenizer/Tokenizer.tsx +61 -62
- package/src/Tokenizer/TokenizerBottomSheet.tsx +17 -23
- package/src/Tokenizer/index.ts +1 -0
- package/src/Tooltip/Tooltip.tsx +6 -42
- package/src/Tooltip/useTooltip.doc.mjs +24 -0
- package/src/Tooltip/useTooltip.tsx +243 -134
- package/src/Typeahead/BaseTypeahead.tsx +27 -17
- package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/animator/createAnimator.doc.mjs +153 -0
- package/src/animator/createAnimator.ts +324 -0
- package/src/gestures/GestureHost.ts +6 -5
- package/src/gestures/PressTracker.ts +4 -3
- package/src/gestures/README.md +10 -4
- package/src/hooks/ModalAnnounceProvider.tsx +1 -0
- package/src/hooks/actionGroupTracker.ts +25 -9
- package/src/hooks/index.ts +2 -0
- package/src/hooks/longPressDetector.ts +273 -0
- package/src/hooks/pressGroupContext.ts +21 -0
- package/src/hooks/rootScrollStyles.ts +247 -0
- package/src/hooks/scrollLockTouchGuard.ts +149 -0
- package/src/hooks/scrollbarGutter.ts +41 -26
- package/src/hooks/useActionGroupTracking.ts +224 -0
- package/src/hooks/useAnimator.doc.mjs +109 -0
- package/src/hooks/useAnimator.ts +67 -0
- package/src/hooks/useAnnounceRenderedText.ts +1 -0
- package/src/hooks/useAttachment.ts +1 -1
- package/src/hooks/useAutoMediaMode.ts +1 -0
- package/src/hooks/useBusyAnnouncement.ts +2 -0
- package/src/hooks/useDevWarning.ts +2 -0
- package/src/hooks/useFocusTrap.ts +2 -0
- package/src/hooks/useGridFocus.doc.mjs +6 -6
- package/src/hooks/useGridFocus.ts +10 -7
- package/src/hooks/useHotkeys.ts +2 -0
- package/src/hooks/useImageMode.ts +2 -0
- package/src/hooks/useInputStatusIcon.tsx +3 -2
- package/src/hooks/useKeyboardHint.tsx +1 -1
- package/src/hooks/useLongPress.doc.mjs +2 -2
- package/src/hooks/useLongPress.ts +32 -122
- package/src/hooks/useMenuHover.ts +1 -0
- package/src/hooks/useMenuPress.ts +2 -0
- package/src/hooks/useOverflow.ts +2 -1
- package/src/hooks/usePressFeedback.ts +1 -0
- package/src/hooks/useResolvedRequired.ts +3 -0
- package/src/hooks/useScrollLock.doc.mjs +51 -12
- package/src/hooks/useScrollLock.ts +53 -60
- package/src/hooks/useScrollableArea.ts +4 -0
- package/src/hooks/useStreamingText.ts +2 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +46 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
- package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
- package/src/i18n/generated-english/Resizable/createResizable.generated.ts +14 -0
- package/src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts +3 -1
- package/src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts +3 -1
- package/src/i18n/generated-english/TimeInput/TimeWheels.generated.ts +18 -0
- package/src/i18n/generated-locales/en.generated.ts +47 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +48 -0
- package/src/index.ts +13 -0
- package/src/internal/indicatorPress.stylex.ts +24 -0
- package/src/internal/selectable-card.ts +21 -0
- package/src/internal/sheetDraft.ts +2 -2
- package/src/keyboard/README.md +197 -0
- package/src/keyboard/index.ts +48 -0
- package/src/keyboard/keyboardHeight.ts +543 -0
- package/src/keyboard/keyboardLayoutGuide.ts +266 -0
- package/src/keyboard/keyboardModel.ts +301 -0
- package/src/keyboard/rideKeyboard.ts +100 -0
- package/src/keyboard/useMobileKeyboard.ts +866 -0
- package/src/motion/MEASUREMENTS.md +28 -0
- package/src/motion/README.md +12 -5
- package/src/motion/android/index.ts +18 -0
- package/src/motion/android/keyboard.ts +96 -0
- package/src/motion/animatedLayout.ts +323 -60
- package/src/motion/animator.ts +66 -37
- package/src/motion/frameBlock.ts +16 -0
- package/src/motion/progress.ts +155 -0
- package/src/motion/reducedMotion.ts +3 -1
- package/src/motion/uikit/alert.ts +43 -0
- package/src/motion/uikit/datePicker.ts +60 -0
- package/src/motion/uikit/index.ts +6 -4
- package/src/motion/uikit/picker.ts +116 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +44 -0
- package/src/privateAttributes/reducedMotion.stylex.ts +45 -0
- package/src/theme/Theme.tsx +37 -3
- package/src/theme/generateThemeRules.ts +14 -12
- package/src/theme/motionKnobs.ts +4 -3
- package/src/theme/themeMotion.ts +17 -2
- package/src/theme/tokens.stylex.ts +2 -0
- package/src/utils/dateParser.ts +16 -0
- package/src/utils/disabledInteraction.ts +23 -2
- package/src/utils/focusReturn.ts +38 -31
- package/src/utils/index.ts +1 -1
- package/src/utils/interactionModality.ts +4 -0
- package/src/utils/interactionOverlay.stylex.ts +6 -4
- package/src/utils/isFocusDetached.ts +34 -0
- package/src/utils/layoutViewport.ts +104 -0
- package/src/utils/plainDate.ts +80 -4
- package/src/utils/pressFeedback.ts +126 -30
- package/src/utils/pressGesture.ts +4 -2
- package/src/utils/selectionLock.ts +40 -6
- package/src/utils/sharedMutationObserver.ts +2 -1
- package/src/utils/timeParser.ts +40 -3
- package/src/utils/triggerFocus.ts +80 -0
- package/dist/BottomSheet/useMobileKeyboard.d.ts +0 -21
- package/dist/BottomSheet/useMobileKeyboard.d.ts.map +0 -1
- package/dist/BottomSheet/useMobileKeyboard.js +0 -407
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +0 -14
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts.map +0 -1
- package/dist/Calendar/getStandaloneShortWeekdayNames.js +0 -26
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts.map +0 -1
- package/dist/Layer/usePressPin.d.ts +0 -93
- package/dist/Layer/usePressPin.d.ts.map +0 -1
- package/dist/Layer/usePressPin.js +0 -363
- package/dist/internal/touch-sheet.d.ts +0 -21
- package/dist/internal/touch-sheet.d.ts.map +0 -1
- package/dist/internal/touch-sheet.js +0 -19
- package/src/BottomSheet/useMobileKeyboard.ts +0 -538
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +0 -38
- package/src/Layer/usePressPin.ts +0 -510
- package/src/internal/touch-sheet.ts +0 -21
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
type RefObject,
|
|
26
26
|
} from 'react';
|
|
27
27
|
import {
|
|
28
|
-
|
|
28
|
+
createMotionAnimator,
|
|
29
29
|
type AnimateOptions,
|
|
30
30
|
type Animator,
|
|
31
31
|
type MotionCurve,
|
|
@@ -539,7 +539,7 @@ export class SegmentedSelectionMotion {
|
|
|
539
539
|
private readonly after: Animator;
|
|
540
540
|
|
|
541
541
|
constructor(
|
|
542
|
-
private readonly animator: Animator =
|
|
542
|
+
private readonly animator: Animator = createMotionAnimator(null, {
|
|
543
543
|
pseudoElement: '::before',
|
|
544
544
|
}),
|
|
545
545
|
options: SegmentedSelectionMotionOptions = {},
|
|
@@ -552,7 +552,10 @@ export class SegmentedSelectionMotion {
|
|
|
552
552
|
this.now = options.now ?? defaultNow;
|
|
553
553
|
this.after =
|
|
554
554
|
options.afterAnimator ??
|
|
555
|
-
|
|
555
|
+
createMotionAnimator(null, {
|
|
556
|
+
pseudoElement: '::after',
|
|
557
|
+
initial: {opacity: 0},
|
|
558
|
+
});
|
|
556
559
|
}
|
|
557
560
|
|
|
558
561
|
/** Attaches the radiogroup whose pseudo-elements are the lens (null detaches). */
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
* A hidden <input type="checkbox"> inside the card provides the accessible
|
|
24
24
|
* role, label, and checked state — the card surface itself has no role/tabIndex.
|
|
25
25
|
* Space toggles it natively; Enter is wired up as an additional toggle key.
|
|
26
|
+
* Inside a single-choice group (Lab's SelectableCardGroup, through an internal
|
|
27
|
+
* context) the input is a radio: the card selects and never deselects itself.
|
|
26
28
|
*
|
|
27
29
|
* For static display, use Card.
|
|
28
30
|
* For navigation or action cards, use ClickableCard.
|
|
@@ -34,13 +36,14 @@ import {
|
|
|
34
36
|
type KeyboardEvent,
|
|
35
37
|
useRef,
|
|
36
38
|
useCallback,
|
|
39
|
+
use,
|
|
37
40
|
type Ref,
|
|
38
41
|
} from 'react';
|
|
39
42
|
import * as stylex from '@stylexjs/stylex';
|
|
40
43
|
import type {StyleXStyles} from '@stylexjs/stylex';
|
|
41
44
|
import {colorVars, durationVars, easeVars} from '../theme/tokens.stylex';
|
|
42
45
|
import type {Elevation, SizeValue, SpacingStep} from '../utils/types';
|
|
43
|
-
import {mergeProps} from '../utils';
|
|
46
|
+
import {isImeKeyEvent, mergeProps} from '../utils';
|
|
44
47
|
import {Card} from '../Card/Card';
|
|
45
48
|
import type {CardVariant} from '../Card/Card';
|
|
46
49
|
import {useClickableContainer} from '../hooks/useClickableContainer';
|
|
@@ -52,6 +55,7 @@ import {interactionOverlayStyles} from '../utils/interactionOverlay.stylex';
|
|
|
52
55
|
import {usePressFeedback} from '../hooks/usePressFeedback';
|
|
53
56
|
|
|
54
57
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
58
|
+
import {SelectableCardInputContext} from './selectableCardInput';
|
|
55
59
|
// =============================================================================
|
|
56
60
|
// Styles — selection + interaction; Card handles the rest
|
|
57
61
|
// =============================================================================
|
|
@@ -412,20 +416,34 @@ export function SelectableCard({
|
|
|
412
416
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
413
417
|
const interactiveRef = useRef<HTMLInputElement | null>(null);
|
|
414
418
|
|
|
419
|
+
// A group can make the input a radio. A radio only selects: a native radio
|
|
420
|
+
// stays checked when it is clicked again.
|
|
421
|
+
const groupInput = use(SelectableCardInputContext);
|
|
422
|
+
const isRadio = groupInput?.type === 'radio';
|
|
423
|
+
const requestChange = useCallback(() => {
|
|
424
|
+
if (!isRadio) {
|
|
425
|
+
onChange(!isSelected);
|
|
426
|
+
} else if (!isSelected) {
|
|
427
|
+
onChange(true);
|
|
428
|
+
}
|
|
429
|
+
}, [isRadio, isSelected, onChange]);
|
|
430
|
+
|
|
415
431
|
const handleClick = useCallback(
|
|
416
432
|
(_event: MouseEvent<HTMLElement>) => {
|
|
417
433
|
if (!isDisabled) {
|
|
418
|
-
|
|
434
|
+
requestChange();
|
|
419
435
|
}
|
|
420
436
|
},
|
|
421
|
-
[isDisabled,
|
|
437
|
+
[isDisabled, requestChange],
|
|
422
438
|
);
|
|
423
439
|
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
// handling, so we deliberately do not toggle on Space here (would double).
|
|
440
|
+
// A native checkbox or radio reacts to Space but not to Enter. This handler
|
|
441
|
+
// adds Enter. Space is not handled here, because it would act twice.
|
|
427
442
|
const handleKeyDown = useCallback(
|
|
428
443
|
(event: KeyboardEvent<HTMLInputElement>) => {
|
|
444
|
+
if (isImeKeyEvent(event.nativeEvent)) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
429
447
|
if (isDisabled) {
|
|
430
448
|
if (event.key === ' ' || event.key === 'Enter') {
|
|
431
449
|
event.preventDefault();
|
|
@@ -434,10 +452,10 @@ export function SelectableCard({
|
|
|
434
452
|
}
|
|
435
453
|
if (event.key === 'Enter') {
|
|
436
454
|
event.preventDefault();
|
|
437
|
-
|
|
455
|
+
requestChange();
|
|
438
456
|
}
|
|
439
457
|
},
|
|
440
|
-
[isDisabled,
|
|
458
|
+
[isDisabled, requestChange],
|
|
441
459
|
);
|
|
442
460
|
|
|
443
461
|
const {onClick, onMouseUp} = useClickableContainer({
|
|
@@ -523,7 +541,18 @@ export function SelectableCard({
|
|
|
523
541
|
}>
|
|
524
542
|
<input
|
|
525
543
|
ref={interactiveRef}
|
|
526
|
-
type=
|
|
544
|
+
type={isRadio ? 'radio' : 'checkbox'}
|
|
545
|
+
name={groupInput?.name}
|
|
546
|
+
value={groupInput?.value}
|
|
547
|
+
// Radios group by name and form owner, so every radio card leaves
|
|
548
|
+
// the form together and the group stays one tab stop. The group
|
|
549
|
+
// submits its choice itself. A disabled checkbox card submits
|
|
550
|
+
// nothing, so it leaves the form too.
|
|
551
|
+
form={
|
|
552
|
+
groupInput != null && (groupInput.type === 'radio' || isDisabled)
|
|
553
|
+
? ''
|
|
554
|
+
: undefined
|
|
555
|
+
}
|
|
527
556
|
checked={isSelected}
|
|
528
557
|
aria-label={label}
|
|
529
558
|
aria-disabled={isDisabled ? 'true' : undefined}
|
|
@@ -531,7 +560,7 @@ export function SelectableCard({
|
|
|
531
560
|
if (isDisabled) {
|
|
532
561
|
return;
|
|
533
562
|
}
|
|
534
|
-
|
|
563
|
+
requestChange();
|
|
535
564
|
}}
|
|
536
565
|
onKeyDown={handleKeyDown}
|
|
537
566
|
{...stylex.props(styles.srOnly)}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file selectableCardInput.ts
|
|
7
|
+
* @input A card group's choice of native input for each card it renders
|
|
8
|
+
* @output SelectableCardInputContext: the input type, name and value a group
|
|
9
|
+
* gives one SelectableCard
|
|
10
|
+
* @position Internal: Lab's SelectableCardGroup provides it through
|
|
11
|
+
* `@astryxdesign/core/internal/selectable-card`. It is not public API, so
|
|
12
|
+
* SelectableCard's public props do not change.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import {createContext} from 'react';
|
|
16
|
+
|
|
17
|
+
/** The native input a group gives one card. */
|
|
18
|
+
export interface SelectableCardInput {
|
|
19
|
+
/** `radio` makes the card one choice of a single-choice set. */
|
|
20
|
+
readonly type: 'checkbox' | 'radio';
|
|
21
|
+
/** The input's `name`. Radios that share it form one native group. */
|
|
22
|
+
readonly name: string;
|
|
23
|
+
/** The input's `value`. A checkbox card submits it when it is selected. */
|
|
24
|
+
readonly value: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Without a provider, a card renders its own checkbox. */
|
|
28
|
+
export const SelectableCardInputContext =
|
|
29
|
+
createContext<SelectableCardInput | null>(null);
|
|
30
|
+
SelectableCardInputContext.displayName = 'SelectableCardInputContext';
|
|
@@ -79,6 +79,7 @@ import {SelectorOption} from './SelectorOption';
|
|
|
79
79
|
import {SelectorRowLayoutContext} from './SelectorRowLayoutContext';
|
|
80
80
|
import {getInputARIA, isImeKeyEvent, mergeProps} from '../utils';
|
|
81
81
|
import {joinAriaIDs} from '../utils/inputAria';
|
|
82
|
+
import {withholdCallerHandlers} from '../utils/disabledInteraction';
|
|
82
83
|
import {warnOnce} from '../utils/devWarning';
|
|
83
84
|
import {useSize} from '../SizeContext/SizeContext';
|
|
84
85
|
import {
|
|
@@ -1907,7 +1908,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
1907
1908
|
ref={attachListbox}
|
|
1908
1909
|
id={listboxId}
|
|
1909
1910
|
role="listbox"
|
|
1910
|
-
aria-
|
|
1911
|
+
aria-label={label}
|
|
1911
1912
|
{...listboxPress.menuProps}
|
|
1912
1913
|
{...stylex.props(
|
|
1913
1914
|
styles.dropdown,
|
|
@@ -1927,17 +1928,10 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
1927
1928
|
id={listboxId}
|
|
1928
1929
|
role="listbox"
|
|
1929
1930
|
{...listboxPress.menuProps}
|
|
1930
|
-
// The
|
|
1931
|
-
// outside
|
|
1932
|
-
//
|
|
1933
|
-
|
|
1934
|
-
// relationship.
|
|
1935
|
-
aria-label={
|
|
1936
|
-
surface.activePresentation === 'bottom-sheet' ? label : undefined
|
|
1937
|
-
}
|
|
1938
|
-
aria-labelledby={
|
|
1939
|
-
surface.activePresentation === 'bottom-sheet' ? undefined : triggerId
|
|
1940
|
-
}
|
|
1931
|
+
// The trigger shows the value, so it cannot name the list.
|
|
1932
|
+
// A modal sheet removes an outside label from the accessibility tree.
|
|
1933
|
+
// The label element also holds the required marker and the tooltip.
|
|
1934
|
+
aria-label={label}
|
|
1941
1935
|
aria-activedescendant={
|
|
1942
1936
|
surface.isOpen && highlightedIndex >= 0
|
|
1943
1937
|
? getItemId(highlightedIndex)
|
|
@@ -1995,13 +1989,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
1995
1989
|
// A disabled trigger stays focusable but, like a natively disabled button,
|
|
1996
1990
|
// runs no caller event handler other than focus and blur, and a press on it
|
|
1997
1991
|
// reaches no handler at all (`spec:AST-085` FR2).
|
|
1998
|
-
const callerProps = isDisabled
|
|
1999
|
-
? Object.fromEntries(
|
|
2000
|
-
Object.entries(rest).filter(
|
|
2001
|
-
([key]) => !/^on[A-Z]/.test(key) || /^on(Focus|Blur)/.test(key),
|
|
2002
|
-
),
|
|
2003
|
-
)
|
|
2004
|
-
: rest;
|
|
1992
|
+
const callerProps = withholdCallerHandlers(rest, isDisabled);
|
|
2005
1993
|
const triggerSharedProps: React.HTMLAttributes<HTMLElement> = {
|
|
2006
1994
|
...callerProps,
|
|
2007
1995
|
onClick: isDisabled
|
package/src/SideNav/SideNav.tsx
CHANGED
|
@@ -438,6 +438,12 @@ interface PendingRailFocus {
|
|
|
438
438
|
wasOnToggle: boolean;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
/** The timeline holds one time per frame, so two reads in one frame match. */
|
|
442
|
+
function frameTimeOf(doc: Document | undefined): number | null {
|
|
443
|
+
const time = doc?.timeline?.currentTime;
|
|
444
|
+
return time == null ? null : Number(time);
|
|
445
|
+
}
|
|
446
|
+
|
|
441
447
|
/**
|
|
442
448
|
* Sidebar navigation container for application pages.
|
|
443
449
|
*
|
|
@@ -456,6 +462,7 @@ interface PendingRailFocus {
|
|
|
456
462
|
* </SideNav>
|
|
457
463
|
* ```
|
|
458
464
|
*/
|
|
465
|
+
|
|
459
466
|
export function SideNav({
|
|
460
467
|
header,
|
|
461
468
|
topContent,
|
|
@@ -498,7 +505,27 @@ export function SideNav({
|
|
|
498
505
|
// The nav's own document's last input decides the moved focus's ring
|
|
499
506
|
// (AR3), so a SideNav in a second document tracks input there.
|
|
500
507
|
const {ref: modalityRef} = useInteractionModalityTracking();
|
|
501
|
-
|
|
508
|
+
// The initial state never animates. A change before the rail's first paint
|
|
509
|
+
// lands at once, unless the rail's own toggle made it. Until a frame runs
|
|
510
|
+
// after the nav attaches, the document timeline reads the frame it read
|
|
511
|
+
// then.
|
|
512
|
+
const mountFrameRef = useRef<number | null>(null);
|
|
513
|
+
const mountedNavRef = useRef<HTMLElement | null>(null);
|
|
514
|
+
const isOwnToggleRef = useRef(false);
|
|
515
|
+
const recordMountFrame = useCallback((nav: HTMLElement | null) => {
|
|
516
|
+
// An inline ref re-attaches the same nav on each render. Only a new nav
|
|
517
|
+
// starts a new initial state.
|
|
518
|
+
if (nav != null && nav !== mountedNavRef.current) {
|
|
519
|
+
mountedNavRef.current = nav;
|
|
520
|
+
mountFrameRef.current = frameTimeOf(nav.ownerDocument);
|
|
521
|
+
}
|
|
522
|
+
}, []);
|
|
523
|
+
const mergedNavRef = useMergedRefs(
|
|
524
|
+
ref,
|
|
525
|
+
navRef,
|
|
526
|
+
modalityRef,
|
|
527
|
+
recordMountFrame,
|
|
528
|
+
);
|
|
502
529
|
const collapseStateRef = useRef<SideNavCollapseState>({
|
|
503
530
|
isCollapsed: false,
|
|
504
531
|
toggle: () => {},
|
|
@@ -522,10 +549,10 @@ export function SideNav({
|
|
|
522
549
|
|
|
523
550
|
const collapsed = resizableHook.isCollapsed;
|
|
524
551
|
|
|
525
|
-
//
|
|
526
|
-
//
|
|
527
|
-
// played after it before paint. Inside AppShell the
|
|
528
|
-
// it through AppShell's own handle
|
|
552
|
+
// A collapse or expand plays the rail's motion, except an app's change
|
|
553
|
+
// before the rail's first paint. It is measured in the commit before the
|
|
554
|
+
// DOM changes and played after it, before paint. Inside AppShell the
|
|
555
|
+
// content area moves with it through AppShell's own handle; outside,
|
|
529
556
|
// SideNav holds its own over its parent.
|
|
530
557
|
const shell = use(SideNavShellContext);
|
|
531
558
|
// A resizable rail's wrapper holds the nav and the handle; outside AppShell
|
|
@@ -548,6 +575,14 @@ export function SideNav({
|
|
|
548
575
|
running?.rail.end();
|
|
549
576
|
running?.endContent();
|
|
550
577
|
motionRef.current = null;
|
|
578
|
+
const isOwnToggle = isOwnToggleRef.current;
|
|
579
|
+
isOwnToggleRef.current = false;
|
|
580
|
+
const frame = frameTimeOf(navRef.current?.ownerDocument);
|
|
581
|
+
if (!isOwnToggle && (frame == null || frame === mountFrameRef.current)) {
|
|
582
|
+
railSnapshotRef.current = null;
|
|
583
|
+
shell?.landContent();
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
551
586
|
railSnapshotRef.current = snapshotRail(
|
|
552
587
|
shell?.rail() ?? ownRail(),
|
|
553
588
|
shell?.animatedLayout ?? ownLayout,
|
|
@@ -707,6 +742,7 @@ export function SideNav({
|
|
|
707
742
|
|
|
708
743
|
const toggle = useCallback(() => {
|
|
709
744
|
const next = !collapsed;
|
|
745
|
+
isOwnToggleRef.current = true;
|
|
710
746
|
|
|
711
747
|
// Deprecated `handleRef` path only: an out-of-tree button reads this
|
|
712
748
|
// snapshot while rendering, which can happen before SideNav re-renders.
|
package/src/Slider/Slider.tsx
CHANGED
|
@@ -48,6 +48,7 @@ import {VisuallyHidden} from '../VisuallyHidden';
|
|
|
48
48
|
import type {InputStatus} from '../Field/types';
|
|
49
49
|
import {mergeProps, rtlStyles} from '../utils';
|
|
50
50
|
import {focusOutlineStyles} from '../utils/focusOutline.stylex';
|
|
51
|
+
import {withholdCallerHandlers} from '../utils/disabledInteraction';
|
|
51
52
|
import {joinAriaIDs} from '../utils/inputAria';
|
|
52
53
|
import {useInteractionModalityTracking} from '../utils/interactionModality';
|
|
53
54
|
import {isRtlElement} from '../hooks/isRtlElement';
|
|
@@ -742,15 +743,20 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
742
743
|
|
|
743
744
|
const isHorizontal = orientation === 'horizontal';
|
|
744
745
|
|
|
745
|
-
// Consumer handlers run after the component's own
|
|
746
|
-
//
|
|
747
|
-
// must not silence a consumer.
|
|
746
|
+
// Consumer handlers run after the component's own, so the component's
|
|
747
|
+
// preventDefault() calls never silence an enabled slider's consumer.
|
|
748
748
|
const after =
|
|
749
749
|
<E,>(own: (event: E) => void, consumer?: (event: E) => void) =>
|
|
750
750
|
(event: E) => {
|
|
751
751
|
own(event);
|
|
752
752
|
consumer?.(event);
|
|
753
753
|
};
|
|
754
|
+
|
|
755
|
+
// A disabled slider keeps its tab stop, so the browser still sends its events.
|
|
756
|
+
// Drop the caller's handlers, but keep focus and blur.
|
|
757
|
+
const callerProps = withholdCallerHandlers(rest, isDisabled);
|
|
758
|
+
const callerHandler = <E,>(handler?: (event: E) => void) =>
|
|
759
|
+
isDisabled ? undefined : handler;
|
|
754
760
|
const generatedId = useId();
|
|
755
761
|
const id = idProp ?? generatedId;
|
|
756
762
|
const labelID = useId();
|
|
@@ -1475,7 +1481,7 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
1475
1481
|
) => (
|
|
1476
1482
|
<div
|
|
1477
1483
|
key={thumbIndex}
|
|
1478
|
-
{...(!isRange ?
|
|
1484
|
+
{...(!isRange ? callerProps : undefined)}
|
|
1479
1485
|
ref={trigger != null ? trigger.ref : !isRange ? ref : undefined}
|
|
1480
1486
|
id={!isRange ? id : undefined}
|
|
1481
1487
|
role="slider"
|
|
@@ -1504,7 +1510,7 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
1504
1510
|
}
|
|
1505
1511
|
onKeyDown={after(
|
|
1506
1512
|
e => handleKeyDown(thumbIndex, e),
|
|
1507
|
-
!isRange ? onKeyDown : undefined,
|
|
1513
|
+
!isRange ? callerHandler(onKeyDown) : undefined,
|
|
1508
1514
|
)}
|
|
1509
1515
|
onFocus={after(
|
|
1510
1516
|
e => handleThumbFocus(thumbIndex, e),
|
|
@@ -1634,10 +1640,10 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
1634
1640
|
<div
|
|
1635
1641
|
// In range mode the role="group" control takes the base props; a
|
|
1636
1642
|
// single slider gives them to its role="slider" thumb.
|
|
1637
|
-
{...(isRange ?
|
|
1643
|
+
{...(isRange ? callerProps : undefined)}
|
|
1638
1644
|
{...(isRange
|
|
1639
1645
|
? {
|
|
1640
|
-
onKeyDown,
|
|
1646
|
+
onKeyDown: callerHandler(onKeyDown),
|
|
1641
1647
|
onFocus,
|
|
1642
1648
|
onBlur,
|
|
1643
1649
|
'aria-describedby': ariaDescribedByProp,
|
|
@@ -1655,10 +1661,13 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
1655
1661
|
'aria-labelledby': joinAriaIDs(labelID, ariaLabelledByProp),
|
|
1656
1662
|
}
|
|
1657
1663
|
: undefined)}
|
|
1658
|
-
onPointerDown={after(handlePointerDown, onPointerDown)}
|
|
1659
|
-
onPointerMove={after(handlePointerMove, onPointerMove)}
|
|
1660
|
-
onPointerUp={after(handlePointerUp, onPointerUp)}
|
|
1661
|
-
onPointerCancel={after(
|
|
1664
|
+
onPointerDown={after(handlePointerDown, callerHandler(onPointerDown))}
|
|
1665
|
+
onPointerMove={after(handlePointerMove, callerHandler(onPointerMove))}
|
|
1666
|
+
onPointerUp={after(handlePointerUp, callerHandler(onPointerUp))}
|
|
1667
|
+
onPointerCancel={after(
|
|
1668
|
+
handlePointerUp,
|
|
1669
|
+
callerHandler(onPointerCancel),
|
|
1670
|
+
)}
|
|
1662
1671
|
{...mergeProps(
|
|
1663
1672
|
themeProps('slider-control', {
|
|
1664
1673
|
orientation,
|
|
@@ -29,7 +29,7 @@ import {TapGestureRecognizer} from '../gestures/TapGestureRecognizer';
|
|
|
29
29
|
import type {PointerKind} from '../gestures/types';
|
|
30
30
|
import {isRtlElement} from '../hooks/isRtlElement';
|
|
31
31
|
import {
|
|
32
|
-
|
|
32
|
+
createMotionAnimator,
|
|
33
33
|
type Animator,
|
|
34
34
|
type MotionCurve,
|
|
35
35
|
type MotionHandle,
|
|
@@ -1186,7 +1186,7 @@ export class SliderTouchController {
|
|
|
1186
1186
|
private animatorFor(element: HTMLElement): Animator {
|
|
1187
1187
|
let animator = this.animators.get(element);
|
|
1188
1188
|
if (animator == null) {
|
|
1189
|
-
animator =
|
|
1189
|
+
animator = createMotionAnimator(element);
|
|
1190
1190
|
this.animators.set(element, animator);
|
|
1191
1191
|
}
|
|
1192
1192
|
return animator;
|
package/src/Spinner/Spinner.tsx
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/core/src/Spinner/Spinner.doc.mjs
|
|
13
|
-
* - /packages/core/src/Spinner/Spinner.test.tsx
|
|
13
|
+
* - /packages/core/src/Spinner/Spinner.test.tsx and __tests__/SpinnerMotion.a11y.chromium.spec.ts (rotor timing)
|
|
14
14
|
* - /packages/core/src/Spinner/index.ts
|
|
15
15
|
* - /apps/storybook/stories/Spinner.stories.tsx
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/Spinner/ (showcase blocks)
|
|
@@ -153,60 +153,57 @@ function registerSpinnerVars(): void {
|
|
|
153
153
|
registerSpinnerVars();
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* Pin every ring's
|
|
157
|
-
*
|
|
156
|
+
* Pin every ring's rotation to the document timeline's origin instead of its
|
|
157
|
+
* own start time, so spinners mounted seconds apart stay in phase.
|
|
158
158
|
*
|
|
159
|
-
* Setting `startTime` is exact where arithmetic on a clock read is not
|
|
159
|
+
* Setting `startTime` is exact where arithmetic on a clock read is not. A
|
|
160
160
|
* negative `animation-delay` computed at mount is only as good as the gap
|
|
161
|
-
* between
|
|
162
|
-
*
|
|
163
|
-
* literal rotation; the same drift risk applies to the dash offset now).
|
|
161
|
+
* between the clock read and the frame the animation starts in. At 10x CPU
|
|
162
|
+
* throttling that gap measured 116 degrees of drift.
|
|
164
163
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
164
|
+
* Rotors are collected and pinned in one frame. `getAnimations()` resolves
|
|
165
|
+
* style, and `startTime` dirties it again. So pinning them one at a time makes
|
|
166
|
+
* each mount re-force what the previous one invalidated: 53 style recalcs for
|
|
167
|
+
* 38 spinners, against 19 batched.
|
|
169
168
|
*/
|
|
170
|
-
const
|
|
169
|
+
const pendingRotors = new Set<HTMLSpanElement>();
|
|
171
170
|
let flushScheduled = false;
|
|
172
171
|
|
|
173
|
-
function
|
|
172
|
+
function pinRotorsToTimelineOrigin(): void {
|
|
174
173
|
flushScheduled = false;
|
|
175
174
|
const animations: Animation[] = [];
|
|
176
|
-
for (const
|
|
177
|
-
|
|
178
|
-
// this ref sits on (#6253), so it needs subtree:true to be found here.
|
|
179
|
-
animations.push(...svg.getAnimations({subtree: true}));
|
|
175
|
+
for (const rotor of pendingRotors) {
|
|
176
|
+
animations.push(...rotor.getAnimations());
|
|
180
177
|
}
|
|
181
|
-
|
|
178
|
+
pendingRotors.clear();
|
|
182
179
|
for (const animation of animations) {
|
|
183
180
|
animation.startTime = 0;
|
|
184
181
|
}
|
|
185
182
|
}
|
|
186
183
|
|
|
187
184
|
/**
|
|
188
|
-
* Ref callback for the
|
|
185
|
+
* Ref callback for the rotor: the one place a mounted ring touches the DOM.
|
|
189
186
|
*
|
|
190
187
|
* It reads nothing back — the geometry is resolved by the cascade, not in JS.
|
|
191
188
|
*/
|
|
192
189
|
function syncRotationPhase(
|
|
193
|
-
|
|
190
|
+
rotor: HTMLSpanElement | null,
|
|
194
191
|
): (() => void) | undefined {
|
|
195
|
-
if (
|
|
192
|
+
if (rotor == null) {
|
|
196
193
|
return undefined;
|
|
197
194
|
}
|
|
198
195
|
// jsdom implements no Web Animations, and this runs in every consumer's
|
|
199
196
|
// component tests.
|
|
200
|
-
if (typeof
|
|
197
|
+
if (typeof rotor.getAnimations !== 'function') {
|
|
201
198
|
return undefined;
|
|
202
199
|
}
|
|
203
|
-
|
|
200
|
+
pendingRotors.add(rotor);
|
|
204
201
|
if (!flushScheduled) {
|
|
205
202
|
flushScheduled = true;
|
|
206
|
-
requestAnimationFrame(
|
|
203
|
+
requestAnimationFrame(pinRotorsToTimelineOrigin);
|
|
207
204
|
}
|
|
208
205
|
return () => {
|
|
209
|
-
|
|
206
|
+
pendingRotors.delete(rotor);
|
|
210
207
|
};
|
|
211
208
|
}
|
|
212
209
|
|
|
@@ -215,19 +212,13 @@ function syncRotationPhase(
|
|
|
215
212
|
// =============================================================================
|
|
216
213
|
|
|
217
214
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* angle, which reads as a visible wobble on iOS Safari independent of
|
|
222
|
-
* compositing (#6253) — confirmed by a real-device test against this exact
|
|
223
|
-
* fix, since `willChange`/layer promotion alone (the earlier fix for #3617)
|
|
224
|
-
* only smooths the rotation's motion, not the per-frame stroke rasterization.
|
|
225
|
-
* A static circle with an animated `stroke-dashoffset` never rotates, so
|
|
226
|
-
* WebKit never re-rasterizes the cap at an intermediate angle at all.
|
|
215
|
+
* A `transform` animation runs on the compositor, so the ring keeps turning
|
|
216
|
+
* while a script runs. A `stroke-dashoffset` animation would repaint the arc
|
|
217
|
+
* on the main thread every frame, so it would stop while a script runs.
|
|
227
218
|
*/
|
|
228
|
-
const
|
|
229
|
-
'0%': {
|
|
230
|
-
'100%': {
|
|
219
|
+
const rotation = stylex.keyframes({
|
|
220
|
+
'0%': {transform: 'rotate(0deg)'},
|
|
221
|
+
'100%': {transform: 'rotate(360deg)'},
|
|
231
222
|
});
|
|
232
223
|
|
|
233
224
|
// =============================================================================
|
|
@@ -283,6 +274,8 @@ const styles = stylex.create({
|
|
|
283
274
|
ring: {
|
|
284
275
|
backfaceVisibility: 'hidden',
|
|
285
276
|
display: 'block',
|
|
277
|
+
// The track and the rotor share the one grid cell, stacked and centred.
|
|
278
|
+
gridArea: '1 / 1',
|
|
286
279
|
// The frame is the box, read from the same composed var the span is sized
|
|
287
280
|
// from — not from the size constant, which a theme cannot reach, and not
|
|
288
281
|
// from a percentage, which needs the grid area to be a definite size in
|
|
@@ -300,6 +293,27 @@ const styles = stylex.create({
|
|
|
300
293
|
// which put the ring 1.5-3.3px off across the four sizes.
|
|
301
294
|
overflow: 'visible',
|
|
302
295
|
},
|
|
296
|
+
// The rotor is the frame's size, so it turns about the ring's centre.
|
|
297
|
+
rotor: {
|
|
298
|
+
display: 'block',
|
|
299
|
+
gridArea: '1 / 1',
|
|
300
|
+
width: `var(${BOX_SIZE})`,
|
|
301
|
+
height: `var(${BOX_SIZE})`,
|
|
302
|
+
// Mobile Safari keeps a re-timed animation off the main thread only on an
|
|
303
|
+
// element with its own layer. So the rotor declares one before the start
|
|
304
|
+
// time is set (see `pinRotorsToTimelineOrigin`).
|
|
305
|
+
willChange: 'transform',
|
|
306
|
+
// Reduced motion slows the turn but never stops it: a still ring reads as
|
|
307
|
+
// broken. The status role and its name still say that work is busy.
|
|
308
|
+
animationDuration: {
|
|
309
|
+
// The loop reads the duration before a theme's tempo scales it.
|
|
310
|
+
default: `var(--_astryx-pre-tempo-duration-slow-min, ${durationVars['--duration-slow-min']})`,
|
|
311
|
+
'@media (prefers-reduced-motion: reduce)': '3s',
|
|
312
|
+
},
|
|
313
|
+
animationIterationCount: 'infinite',
|
|
314
|
+
animationName: rotation,
|
|
315
|
+
animationTimingFunction: 'linear',
|
|
316
|
+
},
|
|
303
317
|
circle: {
|
|
304
318
|
fill: 'none',
|
|
305
319
|
// The ring is centred on the box (cx/cy 50%), so the arc's start offset
|
|
@@ -336,18 +350,6 @@ const styles = stylex.create({
|
|
|
336
350
|
// `0` the way the registered length pair guards against, so it needs no
|
|
337
351
|
// registration.
|
|
338
352
|
arc: {
|
|
339
|
-
// Slow the motion dramatically under reduced-motion rather than freezing
|
|
340
|
-
// it (a frozen spinner reads as broken), matching ProgressBar's approach.
|
|
341
|
-
// The role="status" + "Loading" label still convey busy state (obs-6).
|
|
342
|
-
animationDuration: {
|
|
343
|
-
// The loop reads the duration before a theme's tempo scales it
|
|
344
|
-
// (spec:AST-108 FR4).
|
|
345
|
-
default: `var(--_astryx-pre-tempo-duration-slow-min, ${durationVars['--duration-slow-min']})`,
|
|
346
|
-
'@media (prefers-reduced-motion: reduce)': '3s',
|
|
347
|
-
},
|
|
348
|
-
animationIterationCount: 'infinite',
|
|
349
|
-
animationName: dashMotion,
|
|
350
|
-
animationTimingFunction: 'linear',
|
|
351
353
|
stroke: 'var(--spinner-color)',
|
|
352
354
|
transform: 'rotate(-90deg)',
|
|
353
355
|
strokeDasharray: `calc(var(${RESOLVED_DIAMETER}) * ${PI} * var(--spinner-arc-fraction)) calc(var(${RESOLVED_DIAMETER}) * ${PI} * (1 - var(--spinner-arc-fraction)))`,
|
|
@@ -569,10 +571,12 @@ export function Spinner({
|
|
|
569
571
|
height: `var(${BOX_SIZE}, ${frameSize}px)`,
|
|
570
572
|
},
|
|
571
573
|
)}>
|
|
574
|
+
{/* The track is zero-sized by attribute. With no stylesheet, the
|
|
575
|
+
rotor's arc alone fills the box, instead of two discs side by side.
|
|
576
|
+
`ring` sizes both to the box. */}
|
|
572
577
|
<svg
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
height={frameSize}
|
|
578
|
+
width={0}
|
|
579
|
+
height={0}
|
|
576
580
|
aria-hidden="true"
|
|
577
581
|
{...stylex.props(styles.ring)}>
|
|
578
582
|
<circle
|
|
@@ -586,18 +590,28 @@ export function Spinner({
|
|
|
586
590
|
trackOpacityStyles[shade],
|
|
587
591
|
)}
|
|
588
592
|
/>
|
|
589
|
-
<circle
|
|
590
|
-
cx="50%"
|
|
591
|
-
cy="50%"
|
|
592
|
-
r={diameter / 2}
|
|
593
|
-
strokeWidth={border}
|
|
594
|
-
// The size's own dash, for the render with no stylesheet. The rule
|
|
595
|
-
// above composes the same lengths from the resolved diameter, so a
|
|
596
|
-
// themed ring keeps this fraction of arc rather than this length.
|
|
597
|
-
strokeDasharray={`${arcLength} ${circumference - arcLength}`}
|
|
598
|
-
{...stylex.props(styles.circle, styles.arc)}
|
|
599
|
-
/>
|
|
600
593
|
</svg>
|
|
594
|
+
<span
|
|
595
|
+
ref={syncRotationPhase}
|
|
596
|
+
aria-hidden="true"
|
|
597
|
+
{...stylex.props(styles.rotor)}>
|
|
598
|
+
<svg
|
|
599
|
+
width={frameSize}
|
|
600
|
+
height={frameSize}
|
|
601
|
+
{...stylex.props(styles.ring)}>
|
|
602
|
+
<circle
|
|
603
|
+
cx="50%"
|
|
604
|
+
cy="50%"
|
|
605
|
+
r={diameter / 2}
|
|
606
|
+
strokeWidth={border}
|
|
607
|
+
// The size's own dash, for the render with no stylesheet. The rule
|
|
608
|
+
// above composes the same lengths from the resolved diameter, so a
|
|
609
|
+
// themed ring keeps this fraction of arc rather than this length.
|
|
610
|
+
strokeDasharray={`${arcLength} ${circumference - arcLength}`}
|
|
611
|
+
{...stylex.props(styles.circle, styles.arc)}
|
|
612
|
+
/>
|
|
613
|
+
</svg>
|
|
614
|
+
</span>
|
|
601
615
|
</span>
|
|
602
616
|
);
|
|
603
617
|
|