@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
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file wheelStrip.ts
|
|
5
|
+
* @input The touch wheel's strip (its flat rows in one element), its layout,
|
|
6
|
+
* and curves from wheelPhysics.ts
|
|
7
|
+
* @output createWheelStrip: the one owner of a wheel's offset. It writes a
|
|
8
|
+
* drag's frames, plays and stops curves, ticks, and reports the nearest row
|
|
9
|
+
* @position Glue of the touch picker wheel (PickerWheel.tsx) over the shared
|
|
10
|
+
* animator (motion/animator.ts)
|
|
11
|
+
*
|
|
12
|
+
* The strip is the one element that moves, on `translate`, so a motion plays
|
|
13
|
+
* on the compositor with no layout or paint per frame.
|
|
14
|
+
*
|
|
15
|
+
* SYNC: When modified, update wheelStrip.test.ts and PickerWheel.tsx.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import {canVibrate, playHaptic} from '../gestures/haptics';
|
|
19
|
+
import {createMotionAnimator, type MotionCurve} from '../motion/animator';
|
|
20
|
+
import {reducedMotionFade} from '../motion/reducedMotion';
|
|
21
|
+
import {picker} from '../motion/uikit/picker';
|
|
22
|
+
import {
|
|
23
|
+
nearestIndex,
|
|
24
|
+
reachesRow,
|
|
25
|
+
tickTimes,
|
|
26
|
+
type WheelCurve,
|
|
27
|
+
type WheelLayout,
|
|
28
|
+
} from './wheelPhysics';
|
|
29
|
+
|
|
30
|
+
/** How a motion ended: arrived on its row, or stopped before. */
|
|
31
|
+
export type WheelMotionOutcome = 'arrived' | 'stopped';
|
|
32
|
+
|
|
33
|
+
/** Options for one motion. */
|
|
34
|
+
export interface PlayOptions {
|
|
35
|
+
/** Tick as rows reach the band (a drag's release); a tap's spin does not. */
|
|
36
|
+
ticks?: boolean;
|
|
37
|
+
/** Called once when the motion ends, either way. */
|
|
38
|
+
onEnd?: (outcome: WheelMotionOutcome, offset: number) => void;
|
|
39
|
+
/** Started by a touch drag's release, which cross-fades under Reduce Motion. */
|
|
40
|
+
touchRelease?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The momentum that continues a throw: a coast, and its bounce at an end.
|
|
43
|
+
* It is direct movement, so it plays under Reduce Motion too, as scrolling
|
|
44
|
+
* keeps decelerating under iOS Reduce Motion.
|
|
45
|
+
*/
|
|
46
|
+
momentum?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** One picker column's offset and everything that moves it. */
|
|
50
|
+
export interface WheelStrip {
|
|
51
|
+
/** The strip the offset moves (null detaches it). */
|
|
52
|
+
attach(strip: HTMLElement | null): void;
|
|
53
|
+
/** Update the rows (a new option list); keeps the offset. */
|
|
54
|
+
setLayout(layout: WheelLayout): void;
|
|
55
|
+
/**
|
|
56
|
+
* Tell `listener` the position of the row nearest the band whenever it
|
|
57
|
+
* changes. That is on a drag frame, where a motion stops or ends, and at
|
|
58
|
+
* rest. A cross-fade's landing counts as an end. A motion itself reports
|
|
59
|
+
* nothing until it ends, so the compositor plays it without the main thread
|
|
60
|
+
* painting a mark per row.
|
|
61
|
+
*/
|
|
62
|
+
onNearestChange(listener: ((position: number) => void) | null): void;
|
|
63
|
+
/** Whether a motion is playing. */
|
|
64
|
+
isMoving(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The offset on screen at `time` (ms, the document timeline's clock; default
|
|
67
|
+
* now). It is the animator's presentation value. So a motion that has not
|
|
68
|
+
* started on screen yet shows its start.
|
|
69
|
+
*/
|
|
70
|
+
offset(time?: number): number;
|
|
71
|
+
/** Where the wheel will be at rest: the motion's end, or the offset now. */
|
|
72
|
+
target(): number;
|
|
73
|
+
/**
|
|
74
|
+
* Show `offset` at once, stopping any motion: a drag frame or a park. A drag
|
|
75
|
+
* frame passes `ticks`, which also keeps the strip on its own compositing
|
|
76
|
+
* layer for the frames that follow.
|
|
77
|
+
*/
|
|
78
|
+
setOffset(offset: number, options?: {ticks?: boolean}): void;
|
|
79
|
+
/** Forget the previous drag frame (a new gesture starts). */
|
|
80
|
+
resetDrag(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Stop the motion where it was on screen at `time` (a finger landing on a
|
|
83
|
+
* spinning wheel: its touch-down time). Returns that offset.
|
|
84
|
+
*/
|
|
85
|
+
stop(time?: number): number;
|
|
86
|
+
/** Play `curve` from the current offset; the strip ends at `curve.to`. */
|
|
87
|
+
play(curve: WheelCurve, options?: PlayOptions): void;
|
|
88
|
+
/**
|
|
89
|
+
* Forget the row last reported nearest the band, so the next report names it
|
|
90
|
+
* again even unchanged. A caller that clears its mark as a motion starts then
|
|
91
|
+
* gets it back. That happens when the motion ends on the row it began on.
|
|
92
|
+
*/
|
|
93
|
+
forgetNearest(): void;
|
|
94
|
+
/** Stop everything; a motion still running ends as stopped. */
|
|
95
|
+
dispose(): void;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface Running {
|
|
99
|
+
readonly curve: WheelCurve;
|
|
100
|
+
readonly onEnd?: (outcome: WheelMotionOutcome, offset: number) => void;
|
|
101
|
+
readonly timers: ReturnType<typeof setTimeout>[];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function now(): number {
|
|
105
|
+
const time =
|
|
106
|
+
typeof document !== 'undefined'
|
|
107
|
+
? (document.timeline?.currentTime as number | null | undefined)
|
|
108
|
+
: null;
|
|
109
|
+
return typeof time === 'number' ? time : performance.now();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Creates a wheel's strip on a fresh animator. It uses the internal animator
|
|
114
|
+
* for three jobs the public handle lacks:
|
|
115
|
+
*
|
|
116
|
+
* - It plays a closed-form curve on the compositor: a coast onto a row, a
|
|
117
|
+
* snap, a spin.
|
|
118
|
+
* - It times haptic ticks on that curve's clock.
|
|
119
|
+
* - It substitutes Reduce Motion's cross-fade for a move.
|
|
120
|
+
*
|
|
121
|
+
* A release's coast and its bounce at an end are momentum (`decay`), so they
|
|
122
|
+
* keep their motion under Reduce Motion. Every other curve is a transition
|
|
123
|
+
* (`play`). Under Reduce Motion the animator cross-fades it after a touch or
|
|
124
|
+
* on a coarse pointer. Otherwise it lands at once.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```
|
|
128
|
+
* const strip = createWheelStrip({rowHeight: 28, rowCount: 60});
|
|
129
|
+
* strip.attach(element);
|
|
130
|
+
* strip.setOffset(30 * 28);
|
|
131
|
+
* strip.play(planRelease(strip.offset(), 900, layout).curve, {ticks: true, momentum: true});
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export function createWheelStrip(initialLayout: WheelLayout): WheelStrip {
|
|
135
|
+
const animator = createMotionAnimator(null);
|
|
136
|
+
let layout = initialLayout;
|
|
137
|
+
let running: Running | null = null;
|
|
138
|
+
let nearestListener: ((position: number) => void) | null = null;
|
|
139
|
+
let lastNearest: number | null = null;
|
|
140
|
+
let lastTick = -Infinity;
|
|
141
|
+
/** Last offset a drag frame showed, for its ticks. */
|
|
142
|
+
let dragPrevious: number | null = null;
|
|
143
|
+
|
|
144
|
+
const shown = (time?: number): number =>
|
|
145
|
+
// The strip's top sits on the band's row: offset `o` is `translate` −o.
|
|
146
|
+
-animator.get('y', time);
|
|
147
|
+
|
|
148
|
+
const reportNearest = (offset: number): void => {
|
|
149
|
+
const position = nearestIndex(offset, layout);
|
|
150
|
+
if (position === lastNearest) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
lastNearest = position;
|
|
154
|
+
nearestListener?.(position);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const tick = (time: number): void => {
|
|
158
|
+
if (time - lastTick < picker.selectionTick.minimumIntervalMs) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
lastTick = time;
|
|
162
|
+
playHaptic('selection');
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const clear = (motion: Running): void => {
|
|
166
|
+
for (const timer of motion.timers) {
|
|
167
|
+
clearTimeout(timer);
|
|
168
|
+
}
|
|
169
|
+
motion.timers.length = 0;
|
|
170
|
+
if (running === motion) {
|
|
171
|
+
running = null;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The motion's timers, from `origin` (when it started on screen): its
|
|
177
|
+
* ticks, a cross-fade's landing, and its end.
|
|
178
|
+
*/
|
|
179
|
+
const schedule = (
|
|
180
|
+
motion: Running,
|
|
181
|
+
origin: number,
|
|
182
|
+
{
|
|
183
|
+
endMs,
|
|
184
|
+
ticks,
|
|
185
|
+
landingMs,
|
|
186
|
+
}: {endMs: number; ticks: boolean; landingMs: number | null},
|
|
187
|
+
): void => {
|
|
188
|
+
for (const timer of motion.timers) {
|
|
189
|
+
clearTimeout(timer);
|
|
190
|
+
}
|
|
191
|
+
motion.timers.length = 0;
|
|
192
|
+
const elapsed = now() - origin;
|
|
193
|
+
if (ticks) {
|
|
194
|
+
for (const t of tickTimes(motion.curve, layout.rowHeight)) {
|
|
195
|
+
motion.timers.push(
|
|
196
|
+
setTimeout(
|
|
197
|
+
() => {
|
|
198
|
+
if (running === motion) {
|
|
199
|
+
tick(now());
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
Math.max(0, t * 1000 - elapsed),
|
|
203
|
+
),
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (landingMs != null) {
|
|
208
|
+
motion.timers.push(
|
|
209
|
+
setTimeout(
|
|
210
|
+
() => {
|
|
211
|
+
if (running === motion) {
|
|
212
|
+
reportNearest(motion.curve.to);
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
Math.max(0, landingMs - elapsed),
|
|
216
|
+
),
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
motion.timers.push(
|
|
220
|
+
setTimeout(
|
|
221
|
+
() => {
|
|
222
|
+
if (running !== motion) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
clear(motion);
|
|
226
|
+
reportNearest(motion.curve.to);
|
|
227
|
+
motion.onEnd?.('arrived', motion.curve.to);
|
|
228
|
+
},
|
|
229
|
+
Math.max(0, endMs - elapsed),
|
|
230
|
+
),
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const stop = (time?: number): number => {
|
|
235
|
+
const motion = running;
|
|
236
|
+
if (motion == null) {
|
|
237
|
+
return shown();
|
|
238
|
+
}
|
|
239
|
+
const offset = shown(time);
|
|
240
|
+
clear(motion);
|
|
241
|
+
// `set` ends the strip's animation and puts it where it was shown.
|
|
242
|
+
animator.set({y: -offset});
|
|
243
|
+
reportNearest(offset);
|
|
244
|
+
motion.onEnd?.('stopped', offset);
|
|
245
|
+
return offset;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
return {
|
|
249
|
+
attach(strip) {
|
|
250
|
+
animator.attach(strip);
|
|
251
|
+
},
|
|
252
|
+
setLayout(next) {
|
|
253
|
+
layout = next;
|
|
254
|
+
},
|
|
255
|
+
onNearestChange(listener) {
|
|
256
|
+
nearestListener = listener;
|
|
257
|
+
lastNearest = null;
|
|
258
|
+
},
|
|
259
|
+
isMoving() {
|
|
260
|
+
return running != null;
|
|
261
|
+
},
|
|
262
|
+
offset(time) {
|
|
263
|
+
return shown(time);
|
|
264
|
+
},
|
|
265
|
+
target() {
|
|
266
|
+
return running?.curve.to ?? shown();
|
|
267
|
+
},
|
|
268
|
+
setOffset(offset, {ticks = false} = {}) {
|
|
269
|
+
if (running != null) {
|
|
270
|
+
stop();
|
|
271
|
+
}
|
|
272
|
+
if (
|
|
273
|
+
ticks &&
|
|
274
|
+
dragPrevious != null &&
|
|
275
|
+
canVibrate() &&
|
|
276
|
+
reachesRow(dragPrevious, offset, layout.rowHeight)
|
|
277
|
+
) {
|
|
278
|
+
tick(now());
|
|
279
|
+
}
|
|
280
|
+
dragPrevious = offset;
|
|
281
|
+
// A park is a one-off write: no layer for a strip at rest.
|
|
282
|
+
animator.set({y: -offset}, {promote: ticks});
|
|
283
|
+
reportNearest(offset);
|
|
284
|
+
},
|
|
285
|
+
resetDrag() {
|
|
286
|
+
dragPrevious = null;
|
|
287
|
+
},
|
|
288
|
+
stop,
|
|
289
|
+
play(
|
|
290
|
+
curve,
|
|
291
|
+
{ticks = false, onEnd, touchRelease = false, momentum = false} = {},
|
|
292
|
+
) {
|
|
293
|
+
stop();
|
|
294
|
+
dragPrevious = null;
|
|
295
|
+
const element = animator.element;
|
|
296
|
+
// What Reduce Motion makes of a transition: null while motion plays.
|
|
297
|
+
// Momentum is never substituted.
|
|
298
|
+
const fade = momentum ? null : reducedMotionFade(element, {touchRelease});
|
|
299
|
+
const endMs = fade == null ? curve.duration * 1000 : fade.duration;
|
|
300
|
+
if (!(endMs > 0)) {
|
|
301
|
+
animator.set({y: -curve.to});
|
|
302
|
+
reportNearest(curve.to);
|
|
303
|
+
onEnd?.('arrived', curve.to);
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const motionCurve: MotionCurve = {
|
|
307
|
+
duration: curve.duration,
|
|
308
|
+
at: t => -curve.value(t),
|
|
309
|
+
velocity: t => -curve.velocity(t),
|
|
310
|
+
};
|
|
311
|
+
const handle = momentum
|
|
312
|
+
? animator.decay({y: motionCurve}, {touchRelease})
|
|
313
|
+
: animator.play({y: motionCurve}, {touchRelease});
|
|
314
|
+
const motion: Running = {curve, onEnd, timers: []};
|
|
315
|
+
running = motion;
|
|
316
|
+
const plan = {
|
|
317
|
+
endMs,
|
|
318
|
+
// A cross-fade has no travel to tick through.
|
|
319
|
+
ticks: ticks && fade == null && canVibrate(),
|
|
320
|
+
// A cross-fade lands its rows at its midpoint, faded out.
|
|
321
|
+
landingMs: fade == null ? null : endMs / 2,
|
|
322
|
+
};
|
|
323
|
+
schedule(motion, now(), plan);
|
|
324
|
+
// A busy main thread can hold a motion's first frame: its timers then
|
|
325
|
+
// follow the start the browser gives it. The animator's start promise
|
|
326
|
+
// only resolves, so nothing here waits on a rejection.
|
|
327
|
+
void handle.started.then(start => {
|
|
328
|
+
if (running === motion) {
|
|
329
|
+
schedule(motion, start, plan);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
},
|
|
333
|
+
forgetNearest() {
|
|
334
|
+
lastNearest = null;
|
|
335
|
+
},
|
|
336
|
+
dispose() {
|
|
337
|
+
stop();
|
|
338
|
+
animator.dispose();
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file TouchDateTimeField.tsx
|
|
7
|
-
* @input Uses React, Field, BottomSheet, SegmentedControl, DateInput month picker primitives, Wheel, StyleX intrinsic flex layout
|
|
7
|
+
* @input Uses React, Field, BottomSheet, SegmentedControl, DateInput month picker primitives, Wheel and the pickers' touch layer (TimeWheels), the touch presentation, StyleX intrinsic flex layout
|
|
8
8
|
* @output Exports TouchDateTimeField — the coarse-pointer surface behind DateTimeInput
|
|
9
9
|
* @position Internal component; consumed by DateTimeInput.tsx
|
|
10
10
|
*
|
|
@@ -70,11 +70,11 @@ import {rtlStyles} from '../utils/rtlStyles';
|
|
|
70
70
|
import {themeProps} from '../utils/themeProps';
|
|
71
71
|
import {normalizeDayOfWeek} from '../utils/dateTypes';
|
|
72
72
|
import {formatLocaleTime} from '../utils/timeFormat';
|
|
73
|
+
import {getWeekdayHeaders} from '../Calendar/getWeekdayHeaderNames';
|
|
73
74
|
import {
|
|
74
75
|
formatISOTime,
|
|
75
76
|
isImeKeyEvent,
|
|
76
77
|
isRenderable,
|
|
77
|
-
isTimeInRange,
|
|
78
78
|
clampTime,
|
|
79
79
|
mergeProps,
|
|
80
80
|
parseISOTime,
|
|
@@ -84,7 +84,6 @@ import {chainEventHandlers} from '../utils/chainEventHandlers';
|
|
|
84
84
|
import {joinAriaIDs} from '../utils/inputAria';
|
|
85
85
|
import {
|
|
86
86
|
DATE_FORMAT_LONG,
|
|
87
|
-
DATE_FORMAT_WEEKDAY_ONLY,
|
|
88
87
|
plainDateFormat,
|
|
89
88
|
plainDateFromISO,
|
|
90
89
|
plainDateToday,
|
|
@@ -97,6 +96,17 @@ import {
|
|
|
97
96
|
} from '../DateInput/MonthScroller';
|
|
98
97
|
import {MonthYearWheels} from '../DateInput/MonthYearWheels';
|
|
99
98
|
import {Wheel, type WheelOption} from '../DateInput/Wheel';
|
|
99
|
+
import {TimeWheels} from '../DateInput/datePickerTouch';
|
|
100
|
+
import {
|
|
101
|
+
hour12From24,
|
|
102
|
+
hour24From12,
|
|
103
|
+
hourRowsInHalf,
|
|
104
|
+
meridiemRows,
|
|
105
|
+
minuteRows,
|
|
106
|
+
secondRows,
|
|
107
|
+
wheelBounds,
|
|
108
|
+
} from '../TimeInput/timeWheelRules';
|
|
109
|
+
import {useTouchPresentation} from '../utils/touchPresentation';
|
|
100
110
|
import {
|
|
101
111
|
dateInputTouchGeometry,
|
|
102
112
|
dateInputTouchSizes,
|
|
@@ -406,45 +416,6 @@ function normalizeISOTime(
|
|
|
406
416
|
return parsed ? formatISOTime(parsed, hasSeconds) : undefined;
|
|
407
417
|
}
|
|
408
418
|
|
|
409
|
-
function timeToSeconds(time: ISOTimeString | undefined): number | null {
|
|
410
|
-
if (time === undefined) {
|
|
411
|
-
return null;
|
|
412
|
-
}
|
|
413
|
-
const parsed = parseISOTime(time);
|
|
414
|
-
return parsed == null
|
|
415
|
-
? null
|
|
416
|
-
: parsed.hour * 3600 + parsed.minute * 60 + parsed.second;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
function twoDigits(value: number): string {
|
|
420
|
-
return String(value).padStart(2, '0');
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
function hour12From24(hour: number): number {
|
|
424
|
-
return hour === 0 ? 12 : hour > 12 ? hour - 12 : hour;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
function hour24From12(hour: number, meridiem: number): number {
|
|
428
|
-
if (meridiem === 0) {
|
|
429
|
-
return hour === 12 ? 0 : hour;
|
|
430
|
-
}
|
|
431
|
-
return hour === 12 ? 12 : hour + 12;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
function rangeOverlaps(
|
|
435
|
-
startSecond: number,
|
|
436
|
-
endSecond: number,
|
|
437
|
-
min: ISOTimeString | undefined,
|
|
438
|
-
max: ISOTimeString | undefined,
|
|
439
|
-
): boolean {
|
|
440
|
-
const minSecond = timeToSeconds(min);
|
|
441
|
-
const maxSecond = timeToSeconds(max);
|
|
442
|
-
return (
|
|
443
|
-
(minSecond == null || endSecond >= minSecond) &&
|
|
444
|
-
(maxSecond == null || startSecond <= maxSecond)
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
419
|
type TouchDateTimePanel = 'date' | 'time';
|
|
449
420
|
|
|
450
421
|
export function TouchDateTimeField({
|
|
@@ -584,6 +555,7 @@ export function TouchDateTimeField({
|
|
|
584
555
|
);
|
|
585
556
|
const [activePanel, setActivePanel] = useState<TouchDateTimePanel>('date');
|
|
586
557
|
const [isWheelOpen, setIsWheelOpen] = useState(false);
|
|
558
|
+
const {isTouch} = useTouchPresentation();
|
|
587
559
|
const [draftTime, setDraftTime] = useState<ISOTimeString | undefined>(() =>
|
|
588
560
|
normalizeISOTime(splitDateTime(value).time, hasSeconds),
|
|
589
561
|
);
|
|
@@ -658,16 +630,9 @@ export function TouchDateTimeField({
|
|
|
658
630
|
const canStepBack = monthIndex > minMonthIndex;
|
|
659
631
|
const canStepForward = monthIndex < maxMonthIndex;
|
|
660
632
|
|
|
661
|
-
const
|
|
662
|
-
() =>
|
|
663
|
-
|
|
664
|
-
plainDateFormat(
|
|
665
|
-
{year: 1970, month: 1, day: 4 + ((weekStartsOn + offset) % 7)},
|
|
666
|
-
DATE_FORMAT_WEEKDAY_ONLY,
|
|
667
|
-
locale,
|
|
668
|
-
),
|
|
669
|
-
),
|
|
670
|
-
[weekStartsOn, locale],
|
|
633
|
+
const weekdayHeaders = useMemo(
|
|
634
|
+
() => getWeekdayHeaders(locale, weekStartsOn),
|
|
635
|
+
[locale, weekStartsOn],
|
|
671
636
|
);
|
|
672
637
|
const monthYearLabel = plainDateFormatStandaloneMonthYear(
|
|
673
638
|
{year, month, day: 1},
|
|
@@ -859,106 +824,32 @@ export function TouchDateTimeField({
|
|
|
859
824
|
);
|
|
860
825
|
|
|
861
826
|
const timeBounds = timeBoundsForDate(valueParts.date);
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
timeBounds.min,
|
|
871
|
-
timeBounds.max,
|
|
872
|
-
),
|
|
873
|
-
}));
|
|
874
|
-
}
|
|
875
|
-
const meridiem = parsedWheelTime.hour < 12 ? 0 : 1;
|
|
876
|
-
// In 12-hour mode the hour column is interpreted inside the active AM/PM
|
|
877
|
-
// half, so disabled rows describe reachability within that half only.
|
|
878
|
-
return Array.from({length: 12}, (_, index) => {
|
|
879
|
-
const hour = index + 1;
|
|
880
|
-
const hour24 = hour24From12(hour, meridiem);
|
|
881
|
-
return {
|
|
882
|
-
value: hour,
|
|
883
|
-
label: String(hour),
|
|
884
|
-
isDisabled: !rangeOverlaps(
|
|
885
|
-
hour24 * 3600,
|
|
886
|
-
hour24 * 3600 + 3599,
|
|
887
|
-
timeBounds.min,
|
|
888
|
-
timeBounds.max,
|
|
889
|
-
),
|
|
890
|
-
};
|
|
891
|
-
});
|
|
892
|
-
}, [hourFormat, parsedWheelTime.hour, timeBounds.min, timeBounds.max]);
|
|
893
|
-
|
|
827
|
+
const bounds = useMemo(
|
|
828
|
+
() => wheelBounds(timeBounds.min, timeBounds.max),
|
|
829
|
+
[timeBounds.min, timeBounds.max],
|
|
830
|
+
);
|
|
831
|
+
const hourOptions: WheelOption[] = useMemo(
|
|
832
|
+
() => hourRowsInHalf(parsedWheelTime.hour, hourFormat, bounds),
|
|
833
|
+
[bounds, hourFormat, parsedWheelTime.hour],
|
|
834
|
+
);
|
|
894
835
|
const minuteOptions: WheelOption[] = useMemo(
|
|
895
|
-
() =>
|
|
896
|
-
|
|
897
|
-
const start = parsedWheelTime.hour * 3600 + minute * 60;
|
|
898
|
-
return {
|
|
899
|
-
value: minute,
|
|
900
|
-
label: twoDigits(minute),
|
|
901
|
-
isDisabled: !rangeOverlaps(
|
|
902
|
-
start,
|
|
903
|
-
start + (hasSeconds ? 59 : 0),
|
|
904
|
-
timeBounds.min,
|
|
905
|
-
timeBounds.max,
|
|
906
|
-
),
|
|
907
|
-
};
|
|
908
|
-
}),
|
|
909
|
-
[hasSeconds, parsedWheelTime.hour, timeBounds.min, timeBounds.max],
|
|
836
|
+
() => minuteRows(parsedWheelTime.hour, hasSeconds, bounds),
|
|
837
|
+
[bounds, hasSeconds, parsedWheelTime.hour],
|
|
910
838
|
);
|
|
911
|
-
|
|
912
839
|
const secondOptions: WheelOption[] = useMemo(
|
|
913
|
-
() =>
|
|
914
|
-
|
|
915
|
-
value: second,
|
|
916
|
-
label: twoDigits(second),
|
|
917
|
-
isDisabled: !isTimeInRange(
|
|
918
|
-
formatISOTime(
|
|
919
|
-
{
|
|
920
|
-
hour: parsedWheelTime.hour,
|
|
921
|
-
minute: parsedWheelTime.minute,
|
|
922
|
-
second,
|
|
923
|
-
},
|
|
924
|
-
true,
|
|
925
|
-
),
|
|
926
|
-
timeBounds.min,
|
|
927
|
-
timeBounds.max,
|
|
928
|
-
),
|
|
929
|
-
})),
|
|
930
|
-
[
|
|
931
|
-
parsedWheelTime.hour,
|
|
932
|
-
parsedWheelTime.minute,
|
|
933
|
-
timeBounds.min,
|
|
934
|
-
timeBounds.max,
|
|
935
|
-
],
|
|
840
|
+
() => secondRows(parsedWheelTime.hour, parsedWheelTime.minute, bounds),
|
|
841
|
+
[bounds, parsedWheelTime.hour, parsedWheelTime.minute],
|
|
936
842
|
);
|
|
937
|
-
|
|
938
843
|
const meridiemOptions: WheelOption[] = useMemo(
|
|
939
|
-
() =>
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
),
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
value: 1,
|
|
952
|
-
label: t('@astryx.dateTimeInput.meridiemPM'),
|
|
953
|
-
isDisabled: !rangeOverlaps(
|
|
954
|
-
12 * 3600,
|
|
955
|
-
23 * 3600 + 3599,
|
|
956
|
-
timeBounds.min,
|
|
957
|
-
timeBounds.max,
|
|
958
|
-
),
|
|
959
|
-
},
|
|
960
|
-
],
|
|
961
|
-
[t, timeBounds.min, timeBounds.max],
|
|
844
|
+
() =>
|
|
845
|
+
meridiemRows(
|
|
846
|
+
{
|
|
847
|
+
am: t('@astryx.dateTimeInput.meridiemAM'),
|
|
848
|
+
pm: t('@astryx.dateTimeInput.meridiemPM'),
|
|
849
|
+
},
|
|
850
|
+
bounds,
|
|
851
|
+
),
|
|
852
|
+
[bounds, t],
|
|
962
853
|
);
|
|
963
854
|
|
|
964
855
|
const handleVisibleMonthChange = useCallback(
|
|
@@ -1141,8 +1032,8 @@ export function TouchDateTimeField({
|
|
|
1141
1032
|
isWheelOpen && styles.touchDateSurfaceHidden,
|
|
1142
1033
|
)}>
|
|
1143
1034
|
<div aria-hidden="true" {...stylex.props(styles.touchWeekdays)}>
|
|
1144
|
-
{
|
|
1145
|
-
<div key={
|
|
1035
|
+
{weekdayHeaders.map(({dayOfWeek, name}) => (
|
|
1036
|
+
<div key={dayOfWeek} {...stylex.props(styles.touchWeekday)}>
|
|
1146
1037
|
{name}
|
|
1147
1038
|
</div>
|
|
1148
1039
|
))}
|
|
@@ -1230,49 +1121,69 @@ export function TouchDateTimeField({
|
|
|
1230
1121
|
activePanel !== 'time' && styles.touchPanelHidden,
|
|
1231
1122
|
)}>
|
|
1232
1123
|
<div {...stylex.props(styles.touchTimeWheels)}>
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
}
|
|
1241
|
-
isActive={activePanel === 'time'}
|
|
1242
|
-
onChange={hour =>
|
|
1243
|
-
commitWheelTime(
|
|
1244
|
-
hourFormat === '24h'
|
|
1245
|
-
? composeWheelTime({hour24: hour})
|
|
1246
|
-
: composeWheelTime({hour12: hour}),
|
|
1247
|
-
)
|
|
1248
|
-
}
|
|
1249
|
-
/>
|
|
1250
|
-
<Wheel
|
|
1251
|
-
label={t('@astryx.dateTimeInput.minuteWheel')}
|
|
1252
|
-
options={minuteOptions}
|
|
1253
|
-
value={parsedWheelTime.minute}
|
|
1254
|
-
isActive={activePanel === 'time'}
|
|
1255
|
-
onChange={minute => commitWheelTime(composeWheelTime({minute}))}
|
|
1256
|
-
/>
|
|
1257
|
-
{hasSeconds && (
|
|
1258
|
-
<Wheel
|
|
1259
|
-
label={t('@astryx.dateTimeInput.secondWheel')}
|
|
1260
|
-
options={secondOptions}
|
|
1261
|
-
value={parsedWheelTime.second}
|
|
1124
|
+
{isTouch ? (
|
|
1125
|
+
<TimeWheels
|
|
1126
|
+
time={parsedWheelTime}
|
|
1127
|
+
hourFormat={hourFormat}
|
|
1128
|
+
hasSeconds={hasSeconds}
|
|
1129
|
+
min={timeBounds.min}
|
|
1130
|
+
max={timeBounds.max}
|
|
1262
1131
|
isActive={activePanel === 'time'}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
)}
|
|
1266
|
-
{hourFormat === '12h' && (
|
|
1267
|
-
<Wheel
|
|
1268
|
-
label={t('@astryx.dateTimeInput.meridiemWheel')}
|
|
1269
|
-
options={meridiemOptions}
|
|
1270
|
-
value={parsedWheelTime.hour < 12 ? 0 : 1}
|
|
1271
|
-
isActive={activePanel === 'time'}
|
|
1272
|
-
onChange={meridiem =>
|
|
1273
|
-
commitWheelTime(composeWheelTime({meridiem}))
|
|
1132
|
+
onCommit={time =>
|
|
1133
|
+
commitWheelTime(formatISOTime(time, hasSeconds))
|
|
1274
1134
|
}
|
|
1275
1135
|
/>
|
|
1136
|
+
) : (
|
|
1137
|
+
<>
|
|
1138
|
+
<Wheel
|
|
1139
|
+
label={t('@astryx.dateTimeInput.hourWheel')}
|
|
1140
|
+
options={hourOptions}
|
|
1141
|
+
value={
|
|
1142
|
+
hourFormat === '24h'
|
|
1143
|
+
? parsedWheelTime.hour
|
|
1144
|
+
: hour12From24(parsedWheelTime.hour)
|
|
1145
|
+
}
|
|
1146
|
+
isActive={activePanel === 'time'}
|
|
1147
|
+
onChange={hour =>
|
|
1148
|
+
commitWheelTime(
|
|
1149
|
+
hourFormat === '24h'
|
|
1150
|
+
? composeWheelTime({hour24: hour})
|
|
1151
|
+
: composeWheelTime({hour12: hour}),
|
|
1152
|
+
)
|
|
1153
|
+
}
|
|
1154
|
+
/>
|
|
1155
|
+
<Wheel
|
|
1156
|
+
label={t('@astryx.dateTimeInput.minuteWheel')}
|
|
1157
|
+
options={minuteOptions}
|
|
1158
|
+
value={parsedWheelTime.minute}
|
|
1159
|
+
isActive={activePanel === 'time'}
|
|
1160
|
+
onChange={minute =>
|
|
1161
|
+
commitWheelTime(composeWheelTime({minute}))
|
|
1162
|
+
}
|
|
1163
|
+
/>
|
|
1164
|
+
{hasSeconds && (
|
|
1165
|
+
<Wheel
|
|
1166
|
+
label={t('@astryx.dateTimeInput.secondWheel')}
|
|
1167
|
+
options={secondOptions}
|
|
1168
|
+
value={parsedWheelTime.second}
|
|
1169
|
+
isActive={activePanel === 'time'}
|
|
1170
|
+
onChange={second =>
|
|
1171
|
+
commitWheelTime(composeWheelTime({second}))
|
|
1172
|
+
}
|
|
1173
|
+
/>
|
|
1174
|
+
)}
|
|
1175
|
+
{hourFormat === '12h' && (
|
|
1176
|
+
<Wheel
|
|
1177
|
+
label={t('@astryx.dateTimeInput.meridiemWheel')}
|
|
1178
|
+
options={meridiemOptions}
|
|
1179
|
+
value={parsedWheelTime.hour < 12 ? 0 : 1}
|
|
1180
|
+
isActive={activePanel === 'time'}
|
|
1181
|
+
onChange={meridiem =>
|
|
1182
|
+
commitWheelTime(composeWheelTime({meridiem}))
|
|
1183
|
+
}
|
|
1184
|
+
/>
|
|
1185
|
+
)}
|
|
1186
|
+
</>
|
|
1276
1187
|
)}
|
|
1277
1188
|
</div>
|
|
1278
1189
|
<div {...stylex.props(styles.touchFooter)}>
|