@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
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file AlertDialog.tsx
|
|
7
|
-
* @input Uses React, StyleX, Dialog, Layout, Heading, Text, Button
|
|
7
|
+
* @input Uses React, StyleX, Dialog, Layout, Heading, Text, Button, the
|
|
8
|
+
* action-group tracking (hooks/useActionGroupTracking) and the press-group
|
|
9
|
+
* marker (privateAttributes/pressGroupItem.stylex)
|
|
8
10
|
* @output Exports AlertDialog component, AlertDialogProps type
|
|
9
11
|
* @position Core implementation; consumed by index.ts, tested by AlertDialog.test.tsx
|
|
10
12
|
*
|
|
@@ -12,11 +14,12 @@
|
|
|
12
14
|
* - /packages/core/src/AlertDialog/AlertDialog.doc.mjs (props table, features, examples)
|
|
13
15
|
* - /packages/core/src/AlertDialog/AlertDialog.test.tsx (tests for new/changed behavior)
|
|
14
16
|
* - /packages/core/src/AlertDialog/index.ts (exports if types change)
|
|
17
|
+
* - /packages/core/src/AlertDialog/__tests__/AlertDialog.interaction.browser.spec.ts (touch tracking)
|
|
15
18
|
* - /apps/storybook/stories/AlertDialog.stories.tsx (storybook stories)
|
|
16
19
|
* - /packages/cli/assets/templates/blocks/components/AlertDialog/ (showcase blocks)
|
|
17
20
|
*/
|
|
18
21
|
|
|
19
|
-
import React, {useId, useCallback} from 'react';
|
|
22
|
+
import React, {useId, useCallback, useRef} from 'react';
|
|
20
23
|
import * as stylex from '@stylexjs/stylex';
|
|
21
24
|
import {Dialog} from '../Dialog/Dialog';
|
|
22
25
|
import {Layout} from '../Layout/Layout';
|
|
@@ -31,17 +34,31 @@ import type {BaseProps} from '../BaseProps';
|
|
|
31
34
|
import {mergeProps} from '../utils/mergeProps';
|
|
32
35
|
import {themeProps} from '../utils/themeProps';
|
|
33
36
|
import {useMediaQuery} from '../hooks/useMediaQuery';
|
|
37
|
+
import {useTouchPresentation} from '../utils/touchPresentation';
|
|
34
38
|
import {
|
|
35
39
|
registerEnglishFallback,
|
|
36
40
|
useComponentTranslator,
|
|
37
41
|
} from '../i18n/useComponentTranslator';
|
|
38
42
|
import english from '../i18n/generated-english/AlertDialog/AlertDialog.generated';
|
|
43
|
+
import {useActionGroupTracking} from '../hooks/useActionGroupTracking';
|
|
44
|
+
import {PressGroupContext} from '../hooks/pressGroupContext';
|
|
45
|
+
import {alertController} from '../motion/uikit/alert';
|
|
46
|
+
import {pressGroupItemProps} from '../privateAttributes/pressGroupItem.stylex';
|
|
39
47
|
|
|
40
48
|
registerEnglishFallback(english);
|
|
41
49
|
|
|
50
|
+
const SLIDING_POINTERS = ['touch', 'pen'] as const;
|
|
51
|
+
const ACTION_TRACKING_PROPS = pressGroupItemProps(SLIDING_POINTERS);
|
|
52
|
+
|
|
42
53
|
const SMALL_SCREEN_QUERY = '(max-width: 640px)';
|
|
43
54
|
|
|
44
55
|
const styles = stylex.create({
|
|
56
|
+
// The browser may pinch-zoom on the actions but never pans there. Chrome on
|
|
57
|
+
// Android cancels a pointer it pans, which would cancel the group's press.
|
|
58
|
+
// The gesture host keeps an author's narrower touch-action.
|
|
59
|
+
trackingRow: {
|
|
60
|
+
touchAction: 'pinch-zoom',
|
|
61
|
+
},
|
|
45
62
|
action: {
|
|
46
63
|
maxWidth: '100%',
|
|
47
64
|
minWidth: 0,
|
|
@@ -177,6 +194,24 @@ export function AlertDialog({
|
|
|
177
194
|
onOpenChange(false);
|
|
178
195
|
}, [onOpenChange]);
|
|
179
196
|
|
|
197
|
+
// Each action carries the press-group marker from its first render, so the
|
|
198
|
+
// tracker is its only painter.
|
|
199
|
+
const actionsRef = useRef<HTMLElement>(null);
|
|
200
|
+
// Only under the touch presentation does a press slide across the
|
|
201
|
+
// actions. A desktop press stays the native button's.
|
|
202
|
+
const {isTouch} = useTouchPresentation();
|
|
203
|
+
const isTracking = isOpen && isInline !== true && isTouch;
|
|
204
|
+
useActionGroupTracking(actionsRef, {
|
|
205
|
+
// The actions row holds only the two buttons.
|
|
206
|
+
itemSelector: 'button',
|
|
207
|
+
highlightOnsetMs: alertController.actions.highlightOnsetMs,
|
|
208
|
+
highlightExpansion: alertController.actions.highlightExpansion,
|
|
209
|
+
// A mouse press acts as a native button's under any presentation.
|
|
210
|
+
pointerTypes: SLIDING_POINTERS,
|
|
211
|
+
isEnabled: isTracking,
|
|
212
|
+
});
|
|
213
|
+
const actionTrackingProps = isTracking ? ACTION_TRACKING_PROPS : undefined;
|
|
214
|
+
|
|
180
215
|
const buttonActionStyle = [
|
|
181
216
|
styles.action,
|
|
182
217
|
isSmallScreen && styles.stackedAction,
|
|
@@ -188,6 +223,7 @@ export function AlertDialog({
|
|
|
188
223
|
label={cancelLabel}
|
|
189
224
|
onClick={handleCancel}
|
|
190
225
|
xstyle={buttonActionStyle}
|
|
226
|
+
{...actionTrackingProps}
|
|
191
227
|
// Dialog focuses [data-autofocus] itself after showModal(), because
|
|
192
228
|
// React's autoFocus runs during commit while the dialog is invisible.
|
|
193
229
|
// Cancel is least destructive, so it remains the autofocus target even
|
|
@@ -203,6 +239,7 @@ export function AlertDialog({
|
|
|
203
239
|
onClick={onAction}
|
|
204
240
|
isLoading={isActionLoading}
|
|
205
241
|
xstyle={buttonActionStyle}
|
|
242
|
+
{...actionTrackingProps}
|
|
206
243
|
/>
|
|
207
244
|
);
|
|
208
245
|
|
|
@@ -244,13 +281,17 @@ export function AlertDialog({
|
|
|
244
281
|
destructive-above-Cancel narrow order because confirmation
|
|
245
282
|
actions have component-specific meaning here. */}
|
|
246
283
|
<Stack
|
|
284
|
+
ref={actionsRef}
|
|
285
|
+
xstyle={isTracking && styles.trackingRow}
|
|
247
286
|
direction={isSmallScreen ? 'vertical' : 'horizontal'}
|
|
248
287
|
gap={2}
|
|
249
288
|
hAlign={isSmallScreen ? 'stretch' : 'end'}
|
|
250
289
|
wrap={isSmallScreen ? 'nowrap' : 'wrap'}>
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
290
|
+
<PressGroupContext value={isTracking}>
|
|
291
|
+
{isSmallScreen
|
|
292
|
+
? [actionButton, cancelButton]
|
|
293
|
+
: [cancelButton, actionButton]}
|
|
294
|
+
</PressGroupContext>
|
|
254
295
|
</Stack>
|
|
255
296
|
</LayoutFooter>
|
|
256
297
|
}
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
holdLayoutSwap,
|
|
60
60
|
landLayoutGlide,
|
|
61
61
|
layoutMotionFor,
|
|
62
|
+
layoutStartFor,
|
|
62
63
|
playLayoutFrames,
|
|
63
64
|
playLayoutSwap,
|
|
64
65
|
reportLayoutChange,
|
|
@@ -647,6 +648,8 @@ export function AppShell({
|
|
|
647
648
|
if (isMobileNavOpen && !isMobileNavCloseHeld) {
|
|
648
649
|
setIsMobileNavCloseHeld(true);
|
|
649
650
|
}
|
|
651
|
+
// Syncs the mobile-nav close hold with a timer. The hold ends after the
|
|
652
|
+
// slide-out delay.
|
|
650
653
|
useEffect(() => {
|
|
651
654
|
if (!HasActivity || isMobileNavOpen) {
|
|
652
655
|
return;
|
|
@@ -814,6 +817,8 @@ export function AppShell({
|
|
|
814
817
|
const headerRef = useRef<HTMLDivElement>(null);
|
|
815
818
|
const shellRef = useRef<HTMLDivElement>(null);
|
|
816
819
|
|
|
820
|
+
// Syncs the header-height CSS variable with a ResizeObserver while the height
|
|
821
|
+
// is automatic.
|
|
817
822
|
useEffect(() => {
|
|
818
823
|
if (!isAuto || !headerRef.current || !shellRef.current) {
|
|
819
824
|
return;
|
|
@@ -996,9 +1001,13 @@ export function AppShell({
|
|
|
996
1001
|
let entering = 0;
|
|
997
1002
|
const last = lastSwapRef.current;
|
|
998
1003
|
if (last != null && motion.kind === 'spring') {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1004
|
+
// Read at the change's own start, where the glide it retargets
|
|
1005
|
+
// carries on. After a block, that is later than the frame the
|
|
1006
|
+
// timeline still reads.
|
|
1007
|
+
const elapsed = Math.max(
|
|
1008
|
+
0,
|
|
1009
|
+
layoutStartFor(main.ownerDocument) - last.startedAt,
|
|
1010
|
+
);
|
|
1002
1011
|
if (elapsed < motion.progress.durationMs) {
|
|
1003
1012
|
const p = 1 - motion.progress.remaining(elapsed);
|
|
1004
1013
|
held = last.entering + (1 - last.entering) * p;
|
|
@@ -1058,7 +1067,7 @@ export function AppShell({
|
|
|
1058
1067
|
}
|
|
1059
1068
|
const {held, entering} = pending;
|
|
1060
1069
|
lastSwapRef.current = {
|
|
1061
|
-
startedAt:
|
|
1070
|
+
startedAt: layoutStartFor(main.ownerDocument),
|
|
1062
1071
|
held,
|
|
1063
1072
|
entering,
|
|
1064
1073
|
};
|
|
@@ -152,7 +152,7 @@ export const docs = {
|
|
|
152
152
|
name: 'height',
|
|
153
153
|
type: "'hug' | 'capped' | 'tall' | number | string",
|
|
154
154
|
description:
|
|
155
|
-
"How tall the sheet is. Named budgets: 'hug' fits its content up to 92% of the viewport, 'capped' is a scrolling mid-height panel (~62%), and 'tall' is a pinned near-full panel (~92%) for content that streams in. Or pass a number (px) / CSS length for a custom budget. Give snapPoints to let the user drag between heights. On shorter viewports the sheet fills the available height. Only a fully expanded 'tall' sheet provides mobile-keyboard accommodation: it stays put and scrolls each focused control above the keyboard. Hug, Capped, numeric and CSS-length heights never do, and a Tall sheet stops doing it the moment the user drags it to a shorter detent, resuming when they drag it back. Outside that state the sheet neither moves nor adds keyboard scroll space, and the browser's own focus reveal is left in place; on iOS that reveal can shift the whole page.",
|
|
155
|
+
"How tall the sheet is. Named budgets: 'hug' fits its content up to 92% of the viewport, 'capped' is a scrolling mid-height panel (~62%), and 'tall' is a pinned near-full panel (~92%) for content that streams in. Or pass a number (px) / CSS length for a custom budget. Give snapPoints to let the user drag between heights. On shorter viewports the sheet fills the available height. Only a fully expanded 'tall' sheet provides mobile-keyboard accommodation: it stays put and scrolls each focused control above the keyboard. Hug, Capped, numeric and CSS-length heights never do, and a Tall sheet stops doing it the moment the user drags it to a shorter detent, resuming when they drag it back. Outside that state the sheet neither moves nor adds keyboard scroll space, and the browser's own focus reveal is left in place; on iOS that reveal can shift the whole page. This accommodation applies where the visual viewport shrinks for the keyboard, as in Safari on iOS, Firefox for Android and Chrome on Android, where the sheet places the focused control just above the keyboard as it comes up, and the control rides the rest of Gboard\u2019s slide up, and the slide down after it loses focus; a hide Chrome reports late, such as Back, rides down from Chrome\u2019s report (`astryx docs browser-support`).",
|
|
156
156
|
default: "'capped'",
|
|
157
157
|
},
|
|
158
158
|
{
|
|
@@ -517,6 +517,7 @@ function StandaloneBottomSheet({
|
|
|
517
517
|
const stackViewRef = useRef(stackView);
|
|
518
518
|
stackViewRef.current = stackView;
|
|
519
519
|
const scrimWriteRef = useRef<BottomSheetScrimWrite>({frame: null});
|
|
520
|
+
// Releases the pending scrim write frame on unmount.
|
|
520
521
|
useEffect(() => () => cancelScrimWrite(scrimWriteRef.current), []);
|
|
521
522
|
const writeScrim = useCallback(
|
|
522
523
|
(opacity: '0' | '1') =>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* - /packages/core/src/BottomSheet/BottomSheet.tsx
|
|
15
15
|
* - /packages/core/src/BottomSheet/BottomSheetPanel.test.tsx
|
|
16
16
|
* - /packages/core/src/BottomSheet/snapOffsets.ts
|
|
17
|
-
* - /packages/core/src/
|
|
17
|
+
* - /packages/core/src/keyboard/useMobileKeyboard.ts
|
|
18
18
|
* - /packages/core/src/BottomSheet/useSheetGestures.ts
|
|
19
19
|
* - /packages/core/src/Layout/container.stylex.ts (bottom-sheet padding chain)
|
|
20
20
|
*/
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
resolveSnapPoints,
|
|
67
67
|
type BottomSheetSnapPoint,
|
|
68
68
|
} from './snapOffsets';
|
|
69
|
-
import {useMobileKeyboard} from '
|
|
69
|
+
import {useMobileKeyboard} from '../keyboard/useMobileKeyboard';
|
|
70
70
|
import {
|
|
71
71
|
scrollPreservationPadding,
|
|
72
72
|
sheetLayoutHeight,
|
|
@@ -255,6 +255,10 @@ const styles = stylex.create({
|
|
|
255
255
|
// surface behind the pill itself, fading out across the lower half so the
|
|
256
256
|
// content emerging below has no visible cut line.
|
|
257
257
|
backgroundImage: `linear-gradient(to bottom, ${colorVars['--color-background-surface']} 60%, transparent)`,
|
|
258
|
+
// WebKit can draw this bar under the scrolling body's own layer while the
|
|
259
|
+
// sheet's transform animates, so the pill vanishes until the sheet rests.
|
|
260
|
+
// A layer of its own keeps it above the body.
|
|
261
|
+
willChange: 'transform',
|
|
258
262
|
// Drags are the handle's; a pinch still zooms the page (WCAG 1.4.4).
|
|
259
263
|
touchAction: 'pinch-zoom',
|
|
260
264
|
cursor: {
|
|
@@ -312,13 +316,29 @@ const styles = stylex.create({
|
|
|
312
316
|
},
|
|
313
317
|
tallKeyboardBody: {
|
|
314
318
|
scrollPaddingBlockEnd: MOBILE_KEYBOARD_BOTTOM_CLEARANCE,
|
|
319
|
+
},
|
|
320
|
+
// The inset the keyboard takes at the end of a Tall sheet's content
|
|
321
|
+
// (useMobileKeyboard), so its last control can scroll above the keyboard.
|
|
322
|
+
// It is the content box's last in-flow box, after the content's own
|
|
323
|
+
// children, not a box after the content. Firefox resolves the content's
|
|
324
|
+
// `min-height: min-content` as `auto` in the block axis. The content box
|
|
325
|
+
// then keeps the body's height while its children overflow it. An inset
|
|
326
|
+
// after that box sat inside the overflow and added no scroll range. In
|
|
327
|
+
// Firefox for Android, the body's scrollHeight was 1491 with and without a
|
|
328
|
+
// 357 px inset.
|
|
329
|
+
tallKeyboardContent: {
|
|
315
330
|
'::after': {
|
|
316
331
|
content: '""',
|
|
317
332
|
display: 'block',
|
|
318
|
-
blockSize:
|
|
333
|
+
blockSize: 0,
|
|
319
334
|
pointerEvents: 'none',
|
|
320
335
|
},
|
|
321
336
|
},
|
|
337
|
+
keyboardInset: (inset: number) => ({
|
|
338
|
+
'::after': {
|
|
339
|
+
blockSize: inset,
|
|
340
|
+
},
|
|
341
|
+
}),
|
|
322
342
|
budget: {
|
|
323
343
|
height: `calc(var(--_sheet-budget) + ${OVERSCROLL_PADDING}px)`,
|
|
324
344
|
},
|
|
@@ -418,6 +438,7 @@ function waitForTransition(
|
|
|
418
438
|
|
|
419
439
|
let done = false;
|
|
420
440
|
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
441
|
+
let backstopMs = 0;
|
|
421
442
|
const finish = () => {
|
|
422
443
|
if (done) {
|
|
423
444
|
return;
|
|
@@ -431,9 +452,24 @@ function waitForTransition(
|
|
|
431
452
|
complete();
|
|
432
453
|
};
|
|
433
454
|
const handleTransitionEnd = (event: TransitionEvent) => {
|
|
434
|
-
if (event.target
|
|
435
|
-
|
|
455
|
+
if (event.target !== element || event.propertyName !== propertyName) {
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
// The engine cancels a transition whose end value changes mid-flight. A
|
|
459
|
+
// percentage transform does when the closing frame moves the height by a
|
|
460
|
+
// fraction of a pixel. A replacement runs on from where it was. That one
|
|
461
|
+
// ends the motion, not the cancel.
|
|
462
|
+
if (
|
|
463
|
+
event.type === 'transitioncancel' &&
|
|
464
|
+
hasRunningTransition(element, propertyName)
|
|
465
|
+
) {
|
|
466
|
+
if (timer != null) {
|
|
467
|
+
clearTimeout(timer);
|
|
468
|
+
timer = setTimeout(finish, backstopMs);
|
|
469
|
+
}
|
|
470
|
+
return;
|
|
436
471
|
}
|
|
472
|
+
finish();
|
|
437
473
|
};
|
|
438
474
|
element.addEventListener('transitionend', handleTransitionEnd);
|
|
439
475
|
element.addEventListener('transitioncancel', handleTransitionEnd);
|
|
@@ -484,7 +520,8 @@ function waitForTransition(
|
|
|
484
520
|
return () => {};
|
|
485
521
|
}
|
|
486
522
|
|
|
487
|
-
|
|
523
|
+
backstopMs = transitionMs + TRANSITION_BACKSTOP_BUFFER_MS;
|
|
524
|
+
timer = setTimeout(finish, backstopMs);
|
|
488
525
|
return () => {
|
|
489
526
|
if (timer != null) {
|
|
490
527
|
clearTimeout(timer);
|
|
@@ -494,6 +531,19 @@ function waitForTransition(
|
|
|
494
531
|
};
|
|
495
532
|
}
|
|
496
533
|
|
|
534
|
+
// Whether a CSS transition of `propertyName` still runs on `element`.
|
|
535
|
+
function hasRunningTransition(
|
|
536
|
+
element: HTMLElement,
|
|
537
|
+
propertyName: string,
|
|
538
|
+
): boolean {
|
|
539
|
+
return (element.getAnimations?.() ?? []).some(
|
|
540
|
+
animation =>
|
|
541
|
+
(animation as Animation & {transitionProperty?: string})
|
|
542
|
+
.transitionProperty === propertyName &&
|
|
543
|
+
(animation.playState === 'running' || animation.playState === 'paused'),
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
|
|
497
547
|
function parseTransitionTime(value: string): number | null {
|
|
498
548
|
const normalizedValue = value.trim();
|
|
499
549
|
if (!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(normalizedValue)) {
|
|
@@ -530,6 +580,9 @@ export function BottomSheetPanel({
|
|
|
530
580
|
...props
|
|
531
581
|
}: BottomSheetPanelProps) {
|
|
532
582
|
const elementRef = useRef<HTMLDivElement | null>(null);
|
|
583
|
+
const dismissKeyboardRef = useRef<
|
|
584
|
+
((focusTarget?: HTMLElement) => void) | null
|
|
585
|
+
>(null);
|
|
533
586
|
const previousStateRef = useRef(state);
|
|
534
587
|
const reactivatedEntranceRef = useRef(false);
|
|
535
588
|
const onMotionStartRef = useRef(onMotionStart);
|
|
@@ -605,7 +658,6 @@ export function BottomSheetPanel({
|
|
|
605
658
|
dragOffset,
|
|
606
659
|
settledOffset,
|
|
607
660
|
isDragging,
|
|
608
|
-
isTraveling,
|
|
609
661
|
isDismissedByTouchDrag,
|
|
610
662
|
sheetHeight,
|
|
611
663
|
scrollPreservationInset,
|
|
@@ -619,6 +671,10 @@ export function BottomSheetPanel({
|
|
|
619
671
|
offscreenBlockEndInset: OVERSCROLL_PADDING,
|
|
620
672
|
onDismiss,
|
|
621
673
|
snapHeights,
|
|
674
|
+
onTravelStart: () => {
|
|
675
|
+
// Focusing the sheet dismisses the keyboard as the sheet starts to move.
|
|
676
|
+
dismissKeyboardRef.current?.(elementRef.current ?? undefined);
|
|
677
|
+
},
|
|
622
678
|
onScrimOpacity,
|
|
623
679
|
hasFixedHeight: consumerHeight != null,
|
|
624
680
|
});
|
|
@@ -652,17 +708,19 @@ export function BottomSheetPanel({
|
|
|
652
708
|
isPresentedRef.current = isPresented;
|
|
653
709
|
sheetRef(isPresented ? elementRef.current : null);
|
|
654
710
|
}, [isPresented, sheetRef]);
|
|
655
|
-
useMobileKeyboard({
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
isSheetTraveling: isTraveling,
|
|
711
|
+
const keyboard = useMobileKeyboard(elementRef, {
|
|
712
|
+
move: 'ride',
|
|
713
|
+
inset: true,
|
|
714
|
+
offset: MOBILE_KEYBOARD_BOTTOM_CLEARANCE,
|
|
715
|
+
isEnabled: height === 'tall' && isPresented,
|
|
716
|
+
isExpanded: settledOffset === 0,
|
|
662
717
|
isOpen: isInteractive,
|
|
663
|
-
|
|
664
|
-
sheetRef: elementRef,
|
|
718
|
+
isPageScrollLocked,
|
|
665
719
|
});
|
|
720
|
+
const keyboardInset = keyboard.inset;
|
|
721
|
+
// The drag's own callback dismisses the keyboard as the sheet starts to
|
|
722
|
+
// move. It runs in the gesture, so it reads the newest dismiss.
|
|
723
|
+
dismissKeyboardRef.current = keyboard.dismiss;
|
|
666
724
|
// Keep controller registration attached to one stable host ref. React
|
|
667
725
|
// detaches an old callback ref when a consumer supplies a new identity; if
|
|
668
726
|
// that public ref were merged with setElement, an ordinary parent rerender
|
|
@@ -676,6 +734,8 @@ export function BottomSheetPanel({
|
|
|
676
734
|
const isCoarseCrossFade = useMediaQuery(REDUCED_MOTION_COARSE_QUERY);
|
|
677
735
|
const isCrossFade =
|
|
678
736
|
isCoarseCrossFade || (isReducedMotion && isDismissedByTouchDrag);
|
|
737
|
+
// Syncs the motion with the panel's CSS transition. The motion completes when
|
|
738
|
+
// that transition ends.
|
|
679
739
|
useLayoutEffect(() => {
|
|
680
740
|
if (motion == null) {
|
|
681
741
|
return;
|
|
@@ -907,6 +967,10 @@ export function BottomSheetPanel({
|
|
|
907
967
|
getContentProps<HTMLDivElement>(
|
|
908
968
|
stylex.props(
|
|
909
969
|
styles.content,
|
|
970
|
+
height === 'tall' && styles.tallKeyboardContent,
|
|
971
|
+
height === 'tall' &&
|
|
972
|
+
keyboardInset > 0 &&
|
|
973
|
+
styles.keyboardInset(keyboardInset),
|
|
910
974
|
...container(
|
|
911
975
|
usesThemePadding
|
|
912
976
|
? {useThemeDefault: 'bottom-sheet'}
|
|
@@ -29,6 +29,11 @@ export const docs = {
|
|
|
29
29
|
group: 'BottomSheet',
|
|
30
30
|
category: 'Overlay',
|
|
31
31
|
keywords: ['bottom sheet', 'switcher', 'multi-step', 'flow', 'wizard'],
|
|
32
|
+
deprecated: {
|
|
33
|
+
replacement: 'BottomSheet',
|
|
34
|
+
description:
|
|
35
|
+
'Write each step as its own BottomSheet with isOpen, controlled by one state value that names the open step; moving on from inside the open step replaces it in place (see BottomSheet, Replacing a sheet). BottomSheetSwitcher keeps working until a future minor release removes it.',
|
|
36
|
+
},
|
|
32
37
|
playground: {
|
|
33
38
|
overlay: true,
|
|
34
39
|
overlayControl: {
|
|
@@ -358,6 +358,7 @@ export function BottomSheetSwitcher({
|
|
|
358
358
|
const stackViewRef = useRef(stackView);
|
|
359
359
|
stackViewRef.current = stackView;
|
|
360
360
|
const scrimWriteRef = useRef<BottomSheetScrimWrite>({frame: null});
|
|
361
|
+
// Releases the pending scrim write frame on unmount.
|
|
361
362
|
useEffect(() => () => cancelScrimWrite(scrimWriteRef.current), []);
|
|
362
363
|
// What the flow's place in the stack was when it left the registry: its
|
|
363
364
|
// depth and the open sheet beneath it. React runs the registration
|
|
@@ -564,6 +565,9 @@ export function BottomSheetSwitcher({
|
|
|
564
565
|
presentationCounterRef.current += 1;
|
|
565
566
|
presentationOrderRef.current.set(sheetId, presentationCounterRef.current);
|
|
566
567
|
}, []);
|
|
568
|
+
// Syncs document focus with the flow's visibility. When the flow hides, focus
|
|
569
|
+
// goes to the opener, to the sheet now on top, or to the target of the
|
|
570
|
+
// registry.
|
|
567
571
|
useLayoutEffect(() => {
|
|
568
572
|
if (isFlowVisible) {
|
|
569
573
|
if (!hasScrim) {
|
|
@@ -694,6 +698,7 @@ export function BottomSheetSwitcher({
|
|
|
694
698
|
unregister();
|
|
695
699
|
};
|
|
696
700
|
}, [hasScrim, isFlowVisible, onBeforeSheetPresent]);
|
|
701
|
+
// Syncs the open state of this flow in the sheet stack registry.
|
|
697
702
|
useLayoutEffect(() => {
|
|
698
703
|
if (isFlowVisible && hasScrim) {
|
|
699
704
|
setBottomSheetOpen(stackKeyRef.current, isFlowOpen);
|
|
@@ -1881,7 +1881,7 @@ export function getBottomSheetBeneath(
|
|
|
1881
1881
|
|
|
1882
1882
|
// preventScroll on both: presenting a sheet must not scroll the page to reveal
|
|
1883
1883
|
// what it just focused. For an autofocused field that reveal is the mobile
|
|
1884
|
-
// keyboard's, and it moves the document under a fixed sheet
|
|
1884
|
+
// keyboard's, and it moves the document under a fixed sheet. useMobileKeyboard
|
|
1885
1885
|
// brings the field into view within the sheet instead.
|
|
1886
1886
|
/**
|
|
1887
1887
|
* Move focus into a sheet panel. Focus already inside the sheet stays put:
|
|
@@ -354,6 +354,8 @@ export interface UseSheetGesturesOptions {
|
|
|
354
354
|
snapHeights?: () => number[];
|
|
355
355
|
/** Notified when the settled visible detent height (px) changes. */
|
|
356
356
|
onSnap?: (heightPx: number) => void;
|
|
357
|
+
/** Called once a drag first moves the sheet off its detent. */
|
|
358
|
+
onTravelStart?: () => void;
|
|
357
359
|
/**
|
|
358
360
|
* Called with the scrim opacity the sheet should show (1 = fully visible,
|
|
359
361
|
* 0 = hidden) as the drag moves and on settle. Full while the sheet is at
|
|
@@ -508,6 +510,7 @@ export function useSheetGestures({
|
|
|
508
510
|
onDismiss,
|
|
509
511
|
snapHeights,
|
|
510
512
|
onSnap,
|
|
513
|
+
onTravelStart,
|
|
511
514
|
onScrimOpacity,
|
|
512
515
|
hasFixedHeight = false,
|
|
513
516
|
}: UseSheetGesturesOptions): UseSheetGesturesResult {
|
|
@@ -654,6 +657,8 @@ export function useSheetGestures({
|
|
|
654
657
|
// stops by the time the re-anchor read it.
|
|
655
658
|
const snapHeightsRef = useRef(snapHeights);
|
|
656
659
|
snapHeightsRef.current = snapHeights;
|
|
660
|
+
const onTravelStartRef = useRef(onTravelStart);
|
|
661
|
+
onTravelStartRef.current = onTravelStart;
|
|
657
662
|
|
|
658
663
|
const onDismissRef = useRef(onDismiss);
|
|
659
664
|
const canDismissRef = useRef(canDismiss);
|
|
@@ -699,6 +704,8 @@ export function useSheetGestures({
|
|
|
699
704
|
const sheetElRef = useRef<HTMLElement | null>(null);
|
|
700
705
|
const bodyNodeRef = useRef<HTMLElement | null>(null);
|
|
701
706
|
const observerRef = useRef<ResizeObserver | null>(null);
|
|
707
|
+
// Syncs the browser layout with the transform reset, then ends the
|
|
708
|
+
// scroll-area reconcile one frame later.
|
|
702
709
|
useLayoutEffect(() => {
|
|
703
710
|
if (!isScrollAreaReconciling) {
|
|
704
711
|
return;
|
|
@@ -738,7 +745,9 @@ export function useSheetGestures({
|
|
|
738
745
|
}
|
|
739
746
|
return;
|
|
740
747
|
}
|
|
741
|
-
|
|
748
|
+
// No measure here: reading the height while the sheet mounts forces a
|
|
749
|
+
// layout in the middle of the open. The observer's first report comes
|
|
750
|
+
// after the browser's own layout, before the first paint.
|
|
742
751
|
const ro = new ResizeObserver(entries => {
|
|
743
752
|
const entry = entries[0];
|
|
744
753
|
if (entry) {
|
|
@@ -756,6 +765,7 @@ export function useSheetGestures({
|
|
|
756
765
|
},
|
|
757
766
|
[recordSheetHeight],
|
|
758
767
|
);
|
|
768
|
+
// Releases the height observer on unmount.
|
|
759
769
|
useEffect(() => () => observerRef.current?.disconnect(), []);
|
|
760
770
|
|
|
761
771
|
// Reset to the tallest detent each time the sheet re-opens.
|
|
@@ -907,6 +917,8 @@ export function useSheetGestures({
|
|
|
907
917
|
resolveDetents,
|
|
908
918
|
]);
|
|
909
919
|
|
|
920
|
+
// Syncs window resize and orientation listeners with `isOpen`. Each event
|
|
921
|
+
// anchors the sheet to its settled detent again.
|
|
910
922
|
useEffect(() => {
|
|
911
923
|
if (!isOpen || typeof window === 'undefined') {
|
|
912
924
|
return;
|
|
@@ -1024,6 +1036,8 @@ export function useSheetGestures({
|
|
|
1024
1036
|
[prepareScrollAreaSettle, resolveDetents],
|
|
1025
1037
|
);
|
|
1026
1038
|
|
|
1039
|
+
// Syncs window blur and document visibilitychange listeners with `isOpen`. A
|
|
1040
|
+
// blur or a hidden page cancels a drag.
|
|
1027
1041
|
useEffect(() => {
|
|
1028
1042
|
// Only an open sheet can be dragged; a closed one listens to nothing.
|
|
1029
1043
|
if (!isOpen) {
|
|
@@ -1303,6 +1317,7 @@ export function useSheetGestures({
|
|
|
1303
1317
|
if (!state.hasTraveled && next !== state.baseOffset) {
|
|
1304
1318
|
state.hasTraveled = true;
|
|
1305
1319
|
setIsTraveling(true);
|
|
1320
|
+
onTravelStartRef.current?.();
|
|
1306
1321
|
}
|
|
1307
1322
|
|
|
1308
1323
|
// Mirror the scrim to the live drag: full at/above the mid detent,
|
package/src/Button/Button.tsx
CHANGED
|
@@ -53,6 +53,7 @@ import {iconBoxSizeStyles, type IconSize} from '../Icon/IconSize.stylex';
|
|
|
53
53
|
import {EDGE_COMP_ATTR} from '../Layout/edgeCompensation.stylex';
|
|
54
54
|
import {useSize} from '../SizeContext/SizeContext';
|
|
55
55
|
import {useButtonGroup} from '../ButtonGroup/ButtonGroupContext';
|
|
56
|
+
import {PressGroupContext} from '../hooks/pressGroupContext';
|
|
56
57
|
import {useInputGroup} from '../InputGroup/InputGroupContext';
|
|
57
58
|
import {InputGroupInternalContext} from '../InputGroup/InputGroupInternalContext';
|
|
58
59
|
import {
|
|
@@ -77,6 +78,12 @@ import {isRenderable} from '../utils/isRenderable';
|
|
|
77
78
|
|
|
78
79
|
registerEnglishFallback(english);
|
|
79
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Written by the press controller or a group's tracker while a press is
|
|
83
|
+
* believed. Typed `string`, so StyleX reads it as a computed key.
|
|
84
|
+
*/
|
|
85
|
+
const PRESSED_ON: string = '[data-astryx-press="on"]';
|
|
86
|
+
|
|
80
87
|
/**
|
|
81
88
|
* Base button styles
|
|
82
89
|
* Pseudo-classes are nested within properties per StyleX recommendation:
|
|
@@ -138,7 +145,19 @@ const styles = stylex.create({
|
|
|
138
145
|
default: 'scale(0.98)',
|
|
139
146
|
'@media (pointer: coarse)': 'scale(1)',
|
|
140
147
|
},
|
|
141
|
-
|
|
148
|
+
[PRESSED_ON]: 'scale(0.98)',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
// A tracked action's own `:active` image paints nothing: the tracker paints
|
|
152
|
+
// the action under the pointer, which need not be the one pressed first.
|
|
153
|
+
trackedOverlay: {
|
|
154
|
+
backgroundSize: {default: null, [`:active:not(${PRESSED_ON})`]: '0 0'},
|
|
155
|
+
},
|
|
156
|
+
// A tracked action's press is painted by its group's tracker alone.
|
|
157
|
+
pressableTracked: {
|
|
158
|
+
transform: {
|
|
159
|
+
default: 'scale(1)',
|
|
160
|
+
[PRESSED_ON]: 'scale(0.98)',
|
|
142
161
|
},
|
|
143
162
|
},
|
|
144
163
|
inactive: {
|
|
@@ -147,7 +166,7 @@ const styles = stylex.create({
|
|
|
147
166
|
transform: {
|
|
148
167
|
default: 'none',
|
|
149
168
|
':active': 'none',
|
|
150
|
-
|
|
169
|
+
[PRESSED_ON]: 'none',
|
|
151
170
|
},
|
|
152
171
|
},
|
|
153
172
|
disabled: {
|
|
@@ -160,7 +179,7 @@ const styles = stylex.create({
|
|
|
160
179
|
backgroundImage: {
|
|
161
180
|
default: 'none',
|
|
162
181
|
':active': 'none',
|
|
163
|
-
|
|
182
|
+
[PRESSED_ON]: 'none',
|
|
164
183
|
},
|
|
165
184
|
},
|
|
166
185
|
iconOnly: {
|
|
@@ -632,6 +651,7 @@ export function Button({
|
|
|
632
651
|
const t = useComponentTranslator();
|
|
633
652
|
const size = useSize(sizeProp, 'md');
|
|
634
653
|
const buttonGroup = useButtonGroup();
|
|
654
|
+
const isGroupTracked = use(PressGroupContext);
|
|
635
655
|
const inputGroup = useInputGroup();
|
|
636
656
|
|
|
637
657
|
const [isPending, startTransition] = useTransition();
|
|
@@ -760,11 +780,13 @@ export function Button({
|
|
|
760
780
|
sizeStyles[size],
|
|
761
781
|
isIconOnly && styles.iconOnly,
|
|
762
782
|
interactionOverlayStyles.backgroundImage,
|
|
783
|
+
isGroupTracked && styles.trackedOverlay,
|
|
763
784
|
buttonDisabled && styles.inactive,
|
|
764
785
|
isTrueDisabled && styles.disabled,
|
|
765
786
|
useAriaDisabled && styles.ariaDisabled,
|
|
766
787
|
renderAsLink && styles.link,
|
|
767
|
-
!buttonGroup &&
|
|
788
|
+
!buttonGroup &&
|
|
789
|
+
(isGroupTracked ? styles.pressableTracked : styles.pressable),
|
|
768
790
|
buttonGroup &&
|
|
769
791
|
(buttonGroup.orientation === 'horizontal'
|
|
770
792
|
? groupStyles.horizontal
|