@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,93 @@
|
|
|
1
|
+
/** Which browser's keyboard reports the guide reads. */
|
|
2
|
+
export type KeyboardProfile = 'chromium';
|
|
3
|
+
/** An eased slide: the curve a transition plays (Gboard going up or down). */
|
|
4
|
+
export interface KeyboardCurve {
|
|
5
|
+
/** Length, ms. */
|
|
6
|
+
readonly durationMs: number;
|
|
7
|
+
/** Cubic-bézier control points. */
|
|
8
|
+
readonly points: readonly [number, number, number, number];
|
|
9
|
+
}
|
|
10
|
+
/** How the keyboard's cover changes. */
|
|
11
|
+
export type KeyboardTransitionKind = 'show' | 'hide' | 'change';
|
|
12
|
+
/** One change of the keyboard's cover, as the guide reports it. */
|
|
13
|
+
export interface KeyboardTransition {
|
|
14
|
+
readonly kind: KeyboardTransitionKind;
|
|
15
|
+
/** Inset presented at `start`, CSS px. */
|
|
16
|
+
readonly from: number;
|
|
17
|
+
/** Inset the keyboard comes to rest at, CSS px. */
|
|
18
|
+
readonly to: number;
|
|
19
|
+
/**
|
|
20
|
+
* When the keyboard starts to move, ms on the document timeline
|
|
21
|
+
* (`performance.now()`). For a slide Chrome reported, the guide dates it
|
|
22
|
+
* back to Gboard's start. For a hide after a blur, it is shortly ahead.
|
|
23
|
+
*/
|
|
24
|
+
readonly start: number;
|
|
25
|
+
/** The inset's velocity at `start`, px/s (0 unless it interrupts one). */
|
|
26
|
+
readonly velocity: number;
|
|
27
|
+
/** False when the inset jumps at `start` (another keyboard while one is up). */
|
|
28
|
+
readonly animated: boolean;
|
|
29
|
+
/** True until the visual viewport confirms a transition the guide inferred. */
|
|
30
|
+
readonly predicted: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The eased slide the keyboard moves on (Gboard in Chrome on Android), or
|
|
33
|
+
* null when the inset jumps. A surface riding the keyboard plays it from
|
|
34
|
+
* `start`, as rideKeyboard does. It is the keyboard's own motion, with no
|
|
35
|
+
* motion role.
|
|
36
|
+
*/
|
|
37
|
+
readonly curve: KeyboardCurve | null;
|
|
38
|
+
}
|
|
39
|
+
/** The guide's clock-free core: inputs carry their own times. */
|
|
40
|
+
export interface KeyboardModel {
|
|
41
|
+
/** The inset the keyboard rests at (or is heading to), CSS px. */
|
|
42
|
+
readonly inset: number;
|
|
43
|
+
/** The latest transition. */
|
|
44
|
+
readonly transition: KeyboardTransition;
|
|
45
|
+
/** The inset presented at `time`, CSS px. */
|
|
46
|
+
presentation(time: number): number;
|
|
47
|
+
/** The presented inset's velocity at `time`, px/s. */
|
|
48
|
+
velocity(time: number): number;
|
|
49
|
+
/**
|
|
50
|
+
* The visual viewport reports an inset (null when unknown) at `time` (the
|
|
51
|
+
* event's timestamp). Returns the transition the report starts, if any.
|
|
52
|
+
*/
|
|
53
|
+
report(inset: number | null, time: number): KeyboardTransition | null;
|
|
54
|
+
/**
|
|
55
|
+
* A control that brings up a keyboard lost focus to nothing that brings
|
|
56
|
+
* up one.
|
|
57
|
+
*/
|
|
58
|
+
blurred(time: number): KeyboardTransition | null;
|
|
59
|
+
/** A control that brings up a keyboard gained focus. */
|
|
60
|
+
focused(time: number): KeyboardTransition | null;
|
|
61
|
+
/**
|
|
62
|
+
* Checks a predicted transition against the viewport once it should have
|
|
63
|
+
* ended; moves to what the viewport says when they disagree.
|
|
64
|
+
*/
|
|
65
|
+
verify(inset: number | null, time: number): KeyboardTransition | null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates the guide's core. Tests drive it with explicit times, and the
|
|
69
|
+
* window's guide feeds it events.
|
|
70
|
+
*
|
|
71
|
+
* Chrome reports each keyboard slide through the visual viewport just after
|
|
72
|
+
* it starts (README.md, "What the page sees"). Content rides Gboard's own
|
|
73
|
+
* slides, fitted on Chromium 158 with Gboard (motion/android/keyboard.ts).
|
|
74
|
+
*
|
|
75
|
+
* - Show: from the report, dated back `androidKeyboard.showReportLagMs`, on
|
|
76
|
+
* `showCurve` over `showMs`, joining the slide where it is. The report's
|
|
77
|
+
* first painted frame trails Gboard's first moved frame by 14 to 35 ms. An
|
|
78
|
+
* `<input>` that brings an accessory bar first gives a smaller report
|
|
79
|
+
* before the keyboard's. It rides to the last keyboard's height instead, as
|
|
80
|
+
* a prediction, and the keyboard's report confirms it.
|
|
81
|
+
* - Hide: on `hideCurve` over `hideMs`. It starts
|
|
82
|
+
* `androidKeyboard.hideAfterBlurMs` after a blur that brings no keyboard,
|
|
83
|
+
* as a prediction, because Gboard starts down at the blur. When nothing
|
|
84
|
+
* predicted it, as with Back, it starts from Chrome's report, dated back
|
|
85
|
+
* `hideReportLagMs`, the lag measured on blurs.
|
|
86
|
+
* - A keyboard that changes while up, such as another keyboard, lays out at
|
|
87
|
+
* once.
|
|
88
|
+
*
|
|
89
|
+
* A prediction the viewport has not confirmed by its end gives way to what
|
|
90
|
+
* the viewport says (`verify`).
|
|
91
|
+
*/
|
|
92
|
+
export declare function createKeyboardModel(initialInset?: number): KeyboardModel;
|
|
93
|
+
//# sourceMappingURL=keyboardModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboardModel.d.ts","sourceRoot":"","sources":["../../src/keyboard/keyboardModel.ts"],"names":[],"mappings":"AAkBA,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC;AAEzC,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,kBAAkB;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5D;AAED,wCAAwC;AACxC,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,mEAAmE;AACnE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAED,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,6CAA6C;IAC7C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAAC;IACtE;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAAC;IACjD,wDAAwD;IACxD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAAC;IACjD;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAAC;CACvE;AAUD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,SAAI,GAAG,aAAa,CAkLnE"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file keyboardModel.ts
|
|
5
|
+
* @input `keyboard` from the Android table: Gboard's slides and Chrome's
|
|
6
|
+
* report timings
|
|
7
|
+
* @output createKeyboardModel, the keyboard layout guide's clock-free core,
|
|
8
|
+
* and the KeyboardTransition and KeyboardModel types
|
|
9
|
+
* @position The state of the keyboard layout guide (keyboardLayoutGuide.ts).
|
|
10
|
+
* It infers the keyboard's transition from the visual viewport's reports
|
|
11
|
+
* and focus changes, each input with its own time. It is internal to core.
|
|
12
|
+
*
|
|
13
|
+
* SYNC: When modified, update /packages/core/src/keyboard/README.md
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { keyboard as androidKeyboard } from "../motion/android/keyboard.js";
|
|
17
|
+
import { cubicBezier } from "../motion/bezier.js";
|
|
18
|
+
|
|
19
|
+
/** Which browser's keyboard reports the guide reads. */
|
|
20
|
+
|
|
21
|
+
/** An eased slide: the curve a transition plays (Gboard going up or down). */
|
|
22
|
+
|
|
23
|
+
/** How the keyboard's cover changes. */
|
|
24
|
+
|
|
25
|
+
/** One change of the keyboard's cover, as the guide reports it. */
|
|
26
|
+
|
|
27
|
+
/** The guide's clock-free core: inputs carry their own times. */
|
|
28
|
+
|
|
29
|
+
const EPSILON = 0.5;
|
|
30
|
+
|
|
31
|
+
/** The inset and its velocity, seconds after a transition's start. */
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates the guide's core. Tests drive it with explicit times, and the
|
|
35
|
+
* window's guide feeds it events.
|
|
36
|
+
*
|
|
37
|
+
* Chrome reports each keyboard slide through the visual viewport just after
|
|
38
|
+
* it starts (README.md, "What the page sees"). Content rides Gboard's own
|
|
39
|
+
* slides, fitted on Chromium 158 with Gboard (motion/android/keyboard.ts).
|
|
40
|
+
*
|
|
41
|
+
* - Show: from the report, dated back `androidKeyboard.showReportLagMs`, on
|
|
42
|
+
* `showCurve` over `showMs`, joining the slide where it is. The report's
|
|
43
|
+
* first painted frame trails Gboard's first moved frame by 14 to 35 ms. An
|
|
44
|
+
* `<input>` that brings an accessory bar first gives a smaller report
|
|
45
|
+
* before the keyboard's. It rides to the last keyboard's height instead, as
|
|
46
|
+
* a prediction, and the keyboard's report confirms it.
|
|
47
|
+
* - Hide: on `hideCurve` over `hideMs`. It starts
|
|
48
|
+
* `androidKeyboard.hideAfterBlurMs` after a blur that brings no keyboard,
|
|
49
|
+
* as a prediction, because Gboard starts down at the blur. When nothing
|
|
50
|
+
* predicted it, as with Back, it starts from Chrome's report, dated back
|
|
51
|
+
* `hideReportLagMs`, the lag measured on blurs.
|
|
52
|
+
* - A keyboard that changes while up, such as another keyboard, lays out at
|
|
53
|
+
* once.
|
|
54
|
+
*
|
|
55
|
+
* A prediction the viewport has not confirmed by its end gives way to what
|
|
56
|
+
* the viewport says (`verify`).
|
|
57
|
+
*/
|
|
58
|
+
export function createKeyboardModel(initialInset = 0) {
|
|
59
|
+
let transition = {
|
|
60
|
+
kind: 'change',
|
|
61
|
+
from: initialInset,
|
|
62
|
+
to: initialInset,
|
|
63
|
+
start: -Infinity,
|
|
64
|
+
velocity: 0,
|
|
65
|
+
animated: false,
|
|
66
|
+
predicted: false,
|
|
67
|
+
curve: null
|
|
68
|
+
};
|
|
69
|
+
// The inset over seconds since the transition's start.
|
|
70
|
+
let curve = null;
|
|
71
|
+
// An eased slide's value and velocity.
|
|
72
|
+
const easedCurve = (from, to, slide) => {
|
|
73
|
+
const span = slide.durationMs / 1000;
|
|
74
|
+
const ease = cubicBezier(slide.points);
|
|
75
|
+
const value = t => from + (to - from) * ease(Math.min(1, Math.max(0, t / span)));
|
|
76
|
+
return {
|
|
77
|
+
value,
|
|
78
|
+
velocity: t => {
|
|
79
|
+
if (t >= span) {
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
const a = Math.max(0, t - 0.001);
|
|
83
|
+
const b = Math.min(span, t + 0.001);
|
|
84
|
+
return (value(b) - value(a)) / (b - a);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
// Gboard's slides, as Chrome draws them: the table's show and hide curves.
|
|
89
|
+
const showSlide = {
|
|
90
|
+
durationMs: androidKeyboard.showMs,
|
|
91
|
+
points: androidKeyboard.showCurve
|
|
92
|
+
};
|
|
93
|
+
const hideSlide = {
|
|
94
|
+
durationMs: androidKeyboard.hideMs,
|
|
95
|
+
points: androidKeyboard.hideCurve
|
|
96
|
+
};
|
|
97
|
+
// How long the current transition moves for.
|
|
98
|
+
const lengthOf = () => transition.curve != null ? transition.curve.durationMs : 0;
|
|
99
|
+
// The inset of the last keyboard that was up, for a hide that turns back.
|
|
100
|
+
let shownInset = initialInset;
|
|
101
|
+
const presentation = time => {
|
|
102
|
+
// A jump has happened at its start; a curve starts from `from`.
|
|
103
|
+
if (time < transition.start) {
|
|
104
|
+
return transition.from;
|
|
105
|
+
}
|
|
106
|
+
if (curve == null || time >= transition.start + lengthOf()) {
|
|
107
|
+
return transition.to;
|
|
108
|
+
}
|
|
109
|
+
return curve.value((time - transition.start) / 1000);
|
|
110
|
+
};
|
|
111
|
+
const velocity = time => {
|
|
112
|
+
if (time <= transition.start) {
|
|
113
|
+
return transition.velocity;
|
|
114
|
+
}
|
|
115
|
+
if (curve == null || time >= transition.start + lengthOf()) {
|
|
116
|
+
return 0;
|
|
117
|
+
}
|
|
118
|
+
return curve.velocity((time - transition.start) / 1000);
|
|
119
|
+
};
|
|
120
|
+
const begin = (kind, to, start, {
|
|
121
|
+
animated = true,
|
|
122
|
+
predicted = false
|
|
123
|
+
} = {}) => {
|
|
124
|
+
// Never date a transition before the one it interrupts.
|
|
125
|
+
const at = Math.max(start, transition.start);
|
|
126
|
+
const from = presentation(at);
|
|
127
|
+
const v = animated ? velocity(at) : 0;
|
|
128
|
+
const slide = animated ? to > from ? showSlide : hideSlide : null;
|
|
129
|
+
transition = {
|
|
130
|
+
kind,
|
|
131
|
+
from,
|
|
132
|
+
to,
|
|
133
|
+
start: at,
|
|
134
|
+
velocity: v,
|
|
135
|
+
animated,
|
|
136
|
+
predicted,
|
|
137
|
+
curve: slide
|
|
138
|
+
};
|
|
139
|
+
curve = slide != null && Math.abs(to - from) + Math.abs(v) > 0 ? easedCurve(from, to, slide) : null;
|
|
140
|
+
if (to > EPSILON) {
|
|
141
|
+
shownInset = to;
|
|
142
|
+
}
|
|
143
|
+
return transition;
|
|
144
|
+
};
|
|
145
|
+
const confirm = () => {
|
|
146
|
+
if (transition.predicted) {
|
|
147
|
+
transition = {
|
|
148
|
+
...transition,
|
|
149
|
+
predicted: false
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
};
|
|
154
|
+
return {
|
|
155
|
+
get inset() {
|
|
156
|
+
return transition.to;
|
|
157
|
+
},
|
|
158
|
+
get transition() {
|
|
159
|
+
return transition;
|
|
160
|
+
},
|
|
161
|
+
presentation,
|
|
162
|
+
velocity,
|
|
163
|
+
report(inset, time) {
|
|
164
|
+
if (inset == null) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
const target = transition.to;
|
|
168
|
+
if (Math.abs(inset - target) < EPSILON) {
|
|
169
|
+
return confirm();
|
|
170
|
+
}
|
|
171
|
+
if (inset <= EPSILON) {
|
|
172
|
+
// A hide nothing predicted (Back): Chrome reports it just after
|
|
173
|
+
// Gboard starts down, so it rides from that moment.
|
|
174
|
+
return begin('hide', 0, time - androidKeyboard.hideReportLagMs);
|
|
175
|
+
}
|
|
176
|
+
if (target <= EPSILON) {
|
|
177
|
+
// Chrome reports the show just after Gboard starts up: ride from
|
|
178
|
+
// that moment, joining the slide where it is. A smaller first
|
|
179
|
+
// report is the accessory bar, the keyboard's own following: ride
|
|
180
|
+
// to the last keyboard's height and let its report confirm it.
|
|
181
|
+
const predicted = shownInset > inset + EPSILON;
|
|
182
|
+
return begin('show', predicted ? shownInset : inset, time - androidKeyboard.showReportLagMs, {
|
|
183
|
+
predicted
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
// The keyboard changed while up (another keyboard, or the keyboard's
|
|
187
|
+
// report after the accessory bar's): Chrome lays the page out at once.
|
|
188
|
+
return begin('change', inset, time, {
|
|
189
|
+
animated: false
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
blurred(time) {
|
|
193
|
+
if (transition.to <= EPSILON) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
return begin('hide', 0, time + androidKeyboard.hideAfterBlurMs, {
|
|
197
|
+
predicted: true
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
focused(time) {
|
|
201
|
+
if (transition.kind !== 'hide' || !transition.predicted) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
// Focus came back before the predicted hide finished: the keyboard
|
|
205
|
+
// turns back to the inset it had.
|
|
206
|
+
return begin('show', shownInset, Math.max(time, transition.start), {
|
|
207
|
+
predicted: true
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
verify(inset, time) {
|
|
211
|
+
if (!transition.predicted || inset == null || time < transition.start + lengthOf()) {
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
if (Math.abs(inset - transition.to) < EPSILON) {
|
|
215
|
+
return confirm();
|
|
216
|
+
}
|
|
217
|
+
return begin(inset > transition.to ? 'show' : 'hide', inset, time);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file rideKeyboard.ts
|
|
3
|
+
* @input An animator, target values and a keyboard transition, with its
|
|
4
|
+
* start and the curve the guide publishes with it, and ride options
|
|
5
|
+
* @output rideKeyboard, which moves an element with the keyboard on the
|
|
6
|
+
* keyboard's own motion
|
|
7
|
+
* @position Keyboard module, internal to core. A guide subscriber calls it
|
|
8
|
+
* for each transition, as BottomSheet's hook does.
|
|
9
|
+
*
|
|
10
|
+
* SYNC: When modified, update /packages/core/src/keyboard/README.md
|
|
11
|
+
*/
|
|
12
|
+
import type { Animator, MotionHandle, MotionValues } from '../motion/animator.js';
|
|
13
|
+
import type { KeyboardTransition } from './keyboardModel.js';
|
|
14
|
+
/** How a ride treats Reduce Motion. */
|
|
15
|
+
export interface RideOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Under Reduce Motion, lands the element at once and fades it in. Without
|
|
18
|
+
* it, the animator's own Reduce Motion plan applies.
|
|
19
|
+
*/
|
|
20
|
+
readonly entrance?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Moves `animator`'s element to `to` with the keyboard: on its curve from
|
|
24
|
+
* `transition.start`, or at once when the keyboard jumps.
|
|
25
|
+
*
|
|
26
|
+
* Android's keyboard moves on Gboard's slides up and down
|
|
27
|
+
* (motion/android/keyboard.ts). The transition publishes the slide
|
|
28
|
+
* (`curve`), and the ride plays it. Every ride starts at the transition's
|
|
29
|
+
* start, so content that joins a slide late lands where the keyboard is. A
|
|
30
|
+
* transition that is not animated lands at once, such as a keyboard changing
|
|
31
|
+
* while up. So does a slide that has ended by the call. These values are the
|
|
32
|
+
* keyboard's own motion, with no motion role. The system moves the keyboard
|
|
33
|
+
* on them whatever the page does, so any other curve would leave the element
|
|
34
|
+
* out of step.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```
|
|
38
|
+
* guide.subscribe(t => rideKeyboard(dock.animator, {y: -lift(t.to)}, t));
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function rideKeyboard(animator: Animator, to: MotionValues, transition: KeyboardTransition, { entrance }?: RideOptions): MotionHandle | null;
|
|
42
|
+
//# sourceMappingURL=rideKeyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rideKeyboard.d.ts","sourceRoot":"","sources":["../../src/keyboard/rideKeyboard.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,QAAQ,EAER,YAAY,EAEZ,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExD,uCAAuC;AACvC,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,YAAY,EAChB,UAAU,EAAE,kBAAkB,EAC9B,EAAC,QAAgB,EAAC,GAAE,WAAgB,GACnC,YAAY,GAAG,IAAI,CA0CrB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file rideKeyboard.ts
|
|
5
|
+
* @input An animator, target values and a keyboard transition, with its
|
|
6
|
+
* start and the curve the guide publishes with it, and ride options
|
|
7
|
+
* @output rideKeyboard, which moves an element with the keyboard on the
|
|
8
|
+
* keyboard's own motion
|
|
9
|
+
* @position Keyboard module, internal to core. A guide subscriber calls it
|
|
10
|
+
* for each transition, as BottomSheet's hook does.
|
|
11
|
+
*
|
|
12
|
+
* SYNC: When modified, update /packages/core/src/keyboard/README.md
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { cubicBezier } from "../motion/bezier.js";
|
|
16
|
+
|
|
17
|
+
/** How a ride treats Reduce Motion. */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Moves `animator`'s element to `to` with the keyboard: on its curve from
|
|
21
|
+
* `transition.start`, or at once when the keyboard jumps.
|
|
22
|
+
*
|
|
23
|
+
* Android's keyboard moves on Gboard's slides up and down
|
|
24
|
+
* (motion/android/keyboard.ts). The transition publishes the slide
|
|
25
|
+
* (`curve`), and the ride plays it. Every ride starts at the transition's
|
|
26
|
+
* start, so content that joins a slide late lands where the keyboard is. A
|
|
27
|
+
* transition that is not animated lands at once, such as a keyboard changing
|
|
28
|
+
* while up. So does a slide that has ended by the call. These values are the
|
|
29
|
+
* keyboard's own motion, with no motion role. The system moves the keyboard
|
|
30
|
+
* on them whatever the page does, so any other curve would leave the element
|
|
31
|
+
* out of step.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```
|
|
35
|
+
* guide.subscribe(t => rideKeyboard(dock.animator, {y: -lift(t.to)}, t));
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export function rideKeyboard(animator, to, transition, {
|
|
39
|
+
entrance = false
|
|
40
|
+
} = {}) {
|
|
41
|
+
// A frame after a busy task still draws an animation at that task's
|
|
42
|
+
// start. The ride sets a slide that has already ended, so no frame shows the
|
|
43
|
+
// element short of its target.
|
|
44
|
+
if (!transition.animated || transition.curve == null || performance.now() >= transition.start + transition.curve.durationMs) {
|
|
45
|
+
animator.set(to);
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
// Under Reduce Motion nothing travels. The animator's default cross-fades
|
|
49
|
+
// the element to its new place on a touch screen, and elsewhere moves it at
|
|
50
|
+
// once. An entrance lands it at once and fades it in.
|
|
51
|
+
const options = entrance ? {
|
|
52
|
+
at: transition.start,
|
|
53
|
+
crossfadeAs: 'entrance'
|
|
54
|
+
} : {
|
|
55
|
+
at: transition.start
|
|
56
|
+
};
|
|
57
|
+
const span = transition.curve.durationMs / 1000;
|
|
58
|
+
const ease = cubicBezier(transition.curve.points);
|
|
59
|
+
const curves = {};
|
|
60
|
+
for (const [property, target] of Object.entries(to)) {
|
|
61
|
+
const from = animator.get(property, transition.start);
|
|
62
|
+
const at = t => from + (target - from) * ease(Math.min(1, Math.max(0, t / span)));
|
|
63
|
+
curves[property] = {
|
|
64
|
+
duration: span,
|
|
65
|
+
at,
|
|
66
|
+
velocity: t => {
|
|
67
|
+
if (t >= span) {
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
const a = Math.max(0, t - 0.001);
|
|
71
|
+
const b = Math.min(span, t + 0.001);
|
|
72
|
+
return (at(b) - at(a)) / (b - a);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return animator.play(curves, options);
|
|
77
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file useMobileKeyboard.ts
|
|
3
|
+
* @input A target element and its scroll area, the keyboard module's reports
|
|
4
|
+
* and focus claim, and the layout guide
|
|
5
|
+
* @output useMobileKeyboard, which keeps a focused field in the target above
|
|
6
|
+
* the on-screen keyboard and returns the inset and a dismiss
|
|
7
|
+
* @position Keyboard module, internal to core. BottomSheet passes its panel.
|
|
8
|
+
*
|
|
9
|
+
* SYNC: When modified, update /packages/core/src/keyboard/README.md
|
|
10
|
+
*/
|
|
11
|
+
import { type RefObject } from 'react';
|
|
12
|
+
/** How a target keeps a focused field above the on-screen keyboard. */
|
|
13
|
+
export interface MobileKeyboardOptions {
|
|
14
|
+
/**
|
|
15
|
+
* How the target moves the field: `'ride'` reveals it with the scroller
|
|
16
|
+
* and rides the scroller's content on the keyboard's slide.
|
|
17
|
+
*/
|
|
18
|
+
move: 'ride';
|
|
19
|
+
/**
|
|
20
|
+
* Reserves the keyboard's inset at the end of the target's scroll area,
|
|
21
|
+
* the first element inside it that `useScrollableArea` marks with
|
|
22
|
+
* `data-scroll-axis`.
|
|
23
|
+
*/
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
/** The gap kept between the focused field and the keyboard, CSS px. */
|
|
26
|
+
offset: number;
|
|
27
|
+
/** Whether the target follows the keyboard at all. */
|
|
28
|
+
isEnabled: boolean;
|
|
29
|
+
/** Whether the target is at its full height, where it reveals fields. */
|
|
30
|
+
isExpanded: boolean;
|
|
31
|
+
/** Whether the target is open. Focus that leaves for nothing parks on it. */
|
|
32
|
+
isOpen: boolean;
|
|
33
|
+
/** Whether the page's own scroll is locked under the target. */
|
|
34
|
+
isPageScrollLocked: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** What useMobileKeyboard returns. */
|
|
37
|
+
export interface MobileKeyboard {
|
|
38
|
+
/** The inset the target lays out at its scroller's content end, CSS px. */
|
|
39
|
+
readonly inset: number;
|
|
40
|
+
/**
|
|
41
|
+
* Dismisses the keyboard, keeping the inset while the keyboard goes. The
|
|
42
|
+
* focused field blurs, or `focusTarget` takes focus.
|
|
43
|
+
*/
|
|
44
|
+
readonly dismiss: (focusTarget?: HTMLElement) => void;
|
|
45
|
+
}
|
|
46
|
+
/** Forgets every window's recorded reveal, for tests. */
|
|
47
|
+
export declare function __resetRevealsAtReportForTest(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Keeps a focused field in `targetRef`'s element above the on-screen
|
|
50
|
+
* keyboard (see README.md). A sheet passes its panel, and the hook reserves
|
|
51
|
+
* the inset in the panel's scroll area. Returns the inset the keyboard takes
|
|
52
|
+
* at the end of that area's content, CSS px, or 0 without a keyboard, and a
|
|
53
|
+
* dismiss.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```
|
|
57
|
+
* const keyboard = useMobileKeyboard(panelRef, {move: 'ride', inset: true, offset: 48, isEnabled, isExpanded, isOpen, isPageScrollLocked});
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function useMobileKeyboard(targetRef: RefObject<HTMLElement | null>, { inset: reservesInset, offset, isEnabled, isExpanded, isOpen, isPageScrollLocked, }: MobileKeyboardOptions): MobileKeyboard;
|
|
61
|
+
//# sourceMappingURL=useMobileKeyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMobileKeyboard.d.ts","sourceRoot":"","sources":["../../src/keyboard/useMobileKeyboard.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AA+B/E,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,UAAU,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,gEAAgE;IAChE,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;CACvD;AAmBD,yDAAyD;AACzD,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAkBD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,EACE,KAAK,EAAE,aAAqB,EAC5B,MAAM,EACN,SAAS,EACT,UAAU,EACV,MAAM,EACN,kBAAkB,GACnB,EAAE,qBAAqB,GACvB,cAAc,CAmtBhB"}
|