@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
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file padding.stylex.ts
|
|
5
5
|
* @input Uses @stylexjs/stylex, spacing from theme
|
|
6
|
-
* @output StyleX styles for numeric padding prop on layout components
|
|
6
|
+
* @output StyleX styles for numeric padding prop on layout components, the
|
|
7
|
+
* container padding variables, and (re-exported) paddingStyles and
|
|
8
|
+
* overlayPaddingReset
|
|
7
9
|
* @position Layout utility; used by Card, Section, and Layout sub-components
|
|
8
10
|
*/
|
|
9
11
|
|
|
@@ -11,6 +13,12 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
11
13
|
import {spacingVars} from '../theme/tokens.stylex';
|
|
12
14
|
import type {SpacingStep} from '../utils/types';
|
|
13
15
|
|
|
16
|
+
// In their own modules so an overlay's eager code imports them without this
|
|
17
|
+
// one, and a lazily loaded overlay that uses the container padding styles
|
|
18
|
+
// below keeps those out of the chunk it shares with that code.
|
|
19
|
+
export {paddingStyles} from './paddingStyles.stylex';
|
|
20
|
+
export {overlayPaddingReset} from './overlayPaddingReset.stylex';
|
|
21
|
+
|
|
14
22
|
/**
|
|
15
23
|
* Maps numeric SpacingStep values to SpacingToken keys used by the container system.
|
|
16
24
|
*/
|
|
@@ -28,79 +36,6 @@ export const spacingStepToToken: Record<SpacingStep, string> = {
|
|
|
28
36
|
10: 'spacing10',
|
|
29
37
|
};
|
|
30
38
|
|
|
31
|
-
/**
|
|
32
|
-
* Padding styles for all sides using spacing tokens.
|
|
33
|
-
* Each key applies uniform padding to all four sides.
|
|
34
|
-
*/
|
|
35
|
-
export const paddingStyles = stylex.create({
|
|
36
|
-
0: {
|
|
37
|
-
paddingInlineStart: spacingVars['--spacing-0'],
|
|
38
|
-
paddingInlineEnd: spacingVars['--spacing-0'],
|
|
39
|
-
paddingBlockStart: spacingVars['--spacing-0'],
|
|
40
|
-
paddingBlockEnd: spacingVars['--spacing-0'],
|
|
41
|
-
},
|
|
42
|
-
0.5: {
|
|
43
|
-
paddingInlineStart: spacingVars['--spacing-0-5'],
|
|
44
|
-
paddingInlineEnd: spacingVars['--spacing-0-5'],
|
|
45
|
-
paddingBlockStart: spacingVars['--spacing-0-5'],
|
|
46
|
-
paddingBlockEnd: spacingVars['--spacing-0-5'],
|
|
47
|
-
},
|
|
48
|
-
1: {
|
|
49
|
-
paddingInlineStart: spacingVars['--spacing-1'],
|
|
50
|
-
paddingInlineEnd: spacingVars['--spacing-1'],
|
|
51
|
-
paddingBlockStart: spacingVars['--spacing-1'],
|
|
52
|
-
paddingBlockEnd: spacingVars['--spacing-1'],
|
|
53
|
-
},
|
|
54
|
-
1.5: {
|
|
55
|
-
paddingInlineStart: spacingVars['--spacing-1-5'],
|
|
56
|
-
paddingInlineEnd: spacingVars['--spacing-1-5'],
|
|
57
|
-
paddingBlockStart: spacingVars['--spacing-1-5'],
|
|
58
|
-
paddingBlockEnd: spacingVars['--spacing-1-5'],
|
|
59
|
-
},
|
|
60
|
-
2: {
|
|
61
|
-
paddingInlineStart: spacingVars['--spacing-2'],
|
|
62
|
-
paddingInlineEnd: spacingVars['--spacing-2'],
|
|
63
|
-
paddingBlockStart: spacingVars['--spacing-2'],
|
|
64
|
-
paddingBlockEnd: spacingVars['--spacing-2'],
|
|
65
|
-
},
|
|
66
|
-
3: {
|
|
67
|
-
paddingInlineStart: spacingVars['--spacing-3'],
|
|
68
|
-
paddingInlineEnd: spacingVars['--spacing-3'],
|
|
69
|
-
paddingBlockStart: spacingVars['--spacing-3'],
|
|
70
|
-
paddingBlockEnd: spacingVars['--spacing-3'],
|
|
71
|
-
},
|
|
72
|
-
4: {
|
|
73
|
-
paddingInlineStart: spacingVars['--spacing-4'],
|
|
74
|
-
paddingInlineEnd: spacingVars['--spacing-4'],
|
|
75
|
-
paddingBlockStart: spacingVars['--spacing-4'],
|
|
76
|
-
paddingBlockEnd: spacingVars['--spacing-4'],
|
|
77
|
-
},
|
|
78
|
-
5: {
|
|
79
|
-
paddingInlineStart: spacingVars['--spacing-5'],
|
|
80
|
-
paddingInlineEnd: spacingVars['--spacing-5'],
|
|
81
|
-
paddingBlockStart: spacingVars['--spacing-5'],
|
|
82
|
-
paddingBlockEnd: spacingVars['--spacing-5'],
|
|
83
|
-
},
|
|
84
|
-
6: {
|
|
85
|
-
paddingInlineStart: spacingVars['--spacing-6'],
|
|
86
|
-
paddingInlineEnd: spacingVars['--spacing-6'],
|
|
87
|
-
paddingBlockStart: spacingVars['--spacing-6'],
|
|
88
|
-
paddingBlockEnd: spacingVars['--spacing-6'],
|
|
89
|
-
},
|
|
90
|
-
8: {
|
|
91
|
-
paddingInlineStart: spacingVars['--spacing-8'],
|
|
92
|
-
paddingInlineEnd: spacingVars['--spacing-8'],
|
|
93
|
-
paddingBlockStart: spacingVars['--spacing-8'],
|
|
94
|
-
paddingBlockEnd: spacingVars['--spacing-8'],
|
|
95
|
-
},
|
|
96
|
-
10: {
|
|
97
|
-
paddingInlineStart: spacingVars['--spacing-10'],
|
|
98
|
-
paddingInlineEnd: spacingVars['--spacing-10'],
|
|
99
|
-
paddingBlockStart: spacingVars['--spacing-10'],
|
|
100
|
-
paddingBlockEnd: spacingVars['--spacing-10'],
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
|
|
104
39
|
/**
|
|
105
40
|
* Container padding inline CSS variable styles for edge compensation.
|
|
106
41
|
* Sets --container-padding-inline-start and --container-padding-inline-end so
|
|
@@ -474,62 +409,3 @@ export const sectionPaddingPropagationStyles = stylex.create({
|
|
|
474
409
|
8: {'--_section-padding-propagated': spacingVars['--spacing-8']},
|
|
475
410
|
10: {'--_section-padding-propagated': spacingVars['--spacing-10']},
|
|
476
411
|
});
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Padding-variable reset for overlay roots (Dialog, BottomSheet, Drawer,
|
|
480
|
-
* MobileNav, Lightbox, and every layer surface).
|
|
481
|
-
*
|
|
482
|
-
* ## Why an overlay needs this
|
|
483
|
-
*
|
|
484
|
-
* The container padding system talks to descendants through inherited custom
|
|
485
|
-
* properties: a padded container announces its padding, and children read the
|
|
486
|
-
* value either to apply it or to cancel it with a negative margin
|
|
487
|
-
* (`Section`, `Divider`, `Layout`, `Table`).
|
|
488
|
-
*
|
|
489
|
-
* Inheritance follows the DOM, but an overlay leaves its parent's visual box —
|
|
490
|
-
* a fixed/top-layer `<dialog>` is a DOM descendant of the padded page while
|
|
491
|
-
* being nowhere near it on screen. It inherits values describing padding that
|
|
492
|
-
* is not there, and its content compensates against phantom space: a `Section`
|
|
493
|
-
* inside a 640px sheet rendered 672px wide and hung off both edges (#5208).
|
|
494
|
-
*
|
|
495
|
-
* Two families leak, and they need opposite treatments:
|
|
496
|
-
*
|
|
497
|
-
* - `--container-padding-*` -> `0px`. Descendants SUBTRACT these (bleed
|
|
498
|
-
* margins). The overlay root has no padding of its own to escape, so the
|
|
499
|
-
* honest answer is zero. Nested containers that do set padding (a Dialog's
|
|
500
|
-
* content wrapper) re-announce their own values below this point, so
|
|
501
|
-
* legitimate edge-to-edge bleed inside the overlay is unaffected.
|
|
502
|
-
* - `--layout-padding-*` and `--_section-padding-propagated` -> `initial`.
|
|
503
|
-
* Descendants ADD these, so zeroing them would strip padding rather than
|
|
504
|
-
* restore it. `initial` makes each guaranteed-invalid, so readers fall
|
|
505
|
-
* through their own `var(…, fallback)` chain and land on the theme default —
|
|
506
|
-
* which is what an overlay at the top of the tree should show.
|
|
507
|
-
*
|
|
508
|
-
* `initial` is also why propagation moved off `--astryx-section-padding`: that
|
|
509
|
-
* name is public theme surface, set at the theme root, and making it invalid
|
|
510
|
-
* here would blank the theme's own section padding inside every overlay.
|
|
511
|
-
*
|
|
512
|
-
* Apply on the overlay's outermost styled element.
|
|
513
|
-
*
|
|
514
|
-
* @example
|
|
515
|
-
* ```
|
|
516
|
-
* <dialog {...stylex.props(styles.dialog, overlayPaddingReset.reset)} />
|
|
517
|
-
* ```
|
|
518
|
-
*/
|
|
519
|
-
export const overlayPaddingReset = stylex.create({
|
|
520
|
-
reset: {
|
|
521
|
-
// Subtracted by descendants — the overlay root has no padding to escape.
|
|
522
|
-
'--container-padding-inline-start': '0px',
|
|
523
|
-
'--container-padding-inline-end': '0px',
|
|
524
|
-
'--container-padding-block-start': '0px',
|
|
525
|
-
'--container-padding-block-end': '0px',
|
|
526
|
-
// Added by descendants — fall through to each reader's own default.
|
|
527
|
-
'--layout-padding-outer-x': 'initial',
|
|
528
|
-
'--layout-padding-outer-y': 'initial',
|
|
529
|
-
'--layout-padding-own-outer-x': 'initial',
|
|
530
|
-
'--layout-padding-own-outer-y': 'initial',
|
|
531
|
-
'--layout-padding-inner-x': 'initial',
|
|
532
|
-
'--layout-padding-inner-y': 'initial',
|
|
533
|
-
'--_section-padding-propagated': 'initial',
|
|
534
|
-
},
|
|
535
|
-
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file paddingStyles.stylex.ts
|
|
5
|
+
* @input Uses @stylexjs/stylex, spacing from theme
|
|
6
|
+
* @output paddingStyles: uniform padding on all four sides by SpacingStep
|
|
7
|
+
* @position Layout utility, re-exported by padding.stylex.ts. Its own module so an
|
|
8
|
+
* overlay's eager code (usePopover) imports it without padding.stylex.ts:
|
|
9
|
+
* a lazily loaded overlay that uses the container padding styles there then
|
|
10
|
+
* keeps them out of the eager chunk it shares with this module.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import * as stylex from '@stylexjs/stylex';
|
|
14
|
+
import {spacingVars} from '../theme/tokens.stylex';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Padding styles for all sides using spacing tokens.
|
|
18
|
+
* Each key applies uniform padding to all four sides.
|
|
19
|
+
*/
|
|
20
|
+
export const paddingStyles = stylex.create({
|
|
21
|
+
0: {
|
|
22
|
+
paddingInlineStart: spacingVars['--spacing-0'],
|
|
23
|
+
paddingInlineEnd: spacingVars['--spacing-0'],
|
|
24
|
+
paddingBlockStart: spacingVars['--spacing-0'],
|
|
25
|
+
paddingBlockEnd: spacingVars['--spacing-0'],
|
|
26
|
+
},
|
|
27
|
+
0.5: {
|
|
28
|
+
paddingInlineStart: spacingVars['--spacing-0-5'],
|
|
29
|
+
paddingInlineEnd: spacingVars['--spacing-0-5'],
|
|
30
|
+
paddingBlockStart: spacingVars['--spacing-0-5'],
|
|
31
|
+
paddingBlockEnd: spacingVars['--spacing-0-5'],
|
|
32
|
+
},
|
|
33
|
+
1: {
|
|
34
|
+
paddingInlineStart: spacingVars['--spacing-1'],
|
|
35
|
+
paddingInlineEnd: spacingVars['--spacing-1'],
|
|
36
|
+
paddingBlockStart: spacingVars['--spacing-1'],
|
|
37
|
+
paddingBlockEnd: spacingVars['--spacing-1'],
|
|
38
|
+
},
|
|
39
|
+
1.5: {
|
|
40
|
+
paddingInlineStart: spacingVars['--spacing-1-5'],
|
|
41
|
+
paddingInlineEnd: spacingVars['--spacing-1-5'],
|
|
42
|
+
paddingBlockStart: spacingVars['--spacing-1-5'],
|
|
43
|
+
paddingBlockEnd: spacingVars['--spacing-1-5'],
|
|
44
|
+
},
|
|
45
|
+
2: {
|
|
46
|
+
paddingInlineStart: spacingVars['--spacing-2'],
|
|
47
|
+
paddingInlineEnd: spacingVars['--spacing-2'],
|
|
48
|
+
paddingBlockStart: spacingVars['--spacing-2'],
|
|
49
|
+
paddingBlockEnd: spacingVars['--spacing-2'],
|
|
50
|
+
},
|
|
51
|
+
3: {
|
|
52
|
+
paddingInlineStart: spacingVars['--spacing-3'],
|
|
53
|
+
paddingInlineEnd: spacingVars['--spacing-3'],
|
|
54
|
+
paddingBlockStart: spacingVars['--spacing-3'],
|
|
55
|
+
paddingBlockEnd: spacingVars['--spacing-3'],
|
|
56
|
+
},
|
|
57
|
+
4: {
|
|
58
|
+
paddingInlineStart: spacingVars['--spacing-4'],
|
|
59
|
+
paddingInlineEnd: spacingVars['--spacing-4'],
|
|
60
|
+
paddingBlockStart: spacingVars['--spacing-4'],
|
|
61
|
+
paddingBlockEnd: spacingVars['--spacing-4'],
|
|
62
|
+
},
|
|
63
|
+
5: {
|
|
64
|
+
paddingInlineStart: spacingVars['--spacing-5'],
|
|
65
|
+
paddingInlineEnd: spacingVars['--spacing-5'],
|
|
66
|
+
paddingBlockStart: spacingVars['--spacing-5'],
|
|
67
|
+
paddingBlockEnd: spacingVars['--spacing-5'],
|
|
68
|
+
},
|
|
69
|
+
6: {
|
|
70
|
+
paddingInlineStart: spacingVars['--spacing-6'],
|
|
71
|
+
paddingInlineEnd: spacingVars['--spacing-6'],
|
|
72
|
+
paddingBlockStart: spacingVars['--spacing-6'],
|
|
73
|
+
paddingBlockEnd: spacingVars['--spacing-6'],
|
|
74
|
+
},
|
|
75
|
+
8: {
|
|
76
|
+
paddingInlineStart: spacingVars['--spacing-8'],
|
|
77
|
+
paddingInlineEnd: spacingVars['--spacing-8'],
|
|
78
|
+
paddingBlockStart: spacingVars['--spacing-8'],
|
|
79
|
+
paddingBlockEnd: spacingVars['--spacing-8'],
|
|
80
|
+
},
|
|
81
|
+
10: {
|
|
82
|
+
paddingInlineStart: spacingVars['--spacing-10'],
|
|
83
|
+
paddingInlineEnd: spacingVars['--spacing-10'],
|
|
84
|
+
paddingBlockStart: spacingVars['--spacing-10'],
|
|
85
|
+
paddingBlockEnd: spacingVars['--spacing-10'],
|
|
86
|
+
},
|
|
87
|
+
});
|
|
@@ -43,7 +43,7 @@ import {layerStructureReset} from '../Layer/layerStructureReset.stylex';
|
|
|
43
43
|
import {LayerContentBoundary} from '../Layer/layerScopedContext';
|
|
44
44
|
import {layerClickBoundary} from '../Layer/layerClickBoundary';
|
|
45
45
|
import {ModalAnnounceProvider} from '../hooks/ModalAnnounceProvider';
|
|
46
|
-
import {overlayPaddingReset} from '../Layout/
|
|
46
|
+
import {overlayPaddingReset} from '../Layout/overlayPaddingReset.stylex';
|
|
47
47
|
import {LayerDepthProvider} from '../Layer/LayerDepthContext';
|
|
48
48
|
import {useLayerDismissal} from '../Layer/useLayerDismissal';
|
|
49
49
|
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
} from '../i18n/useComponentTranslator';
|
|
56
56
|
import english from '../i18n/generated-english/Lightbox/Lightbox.generated';
|
|
57
57
|
import {isRenderable} from '../utils/isRenderable';
|
|
58
|
+
import {prepareFocusReturnOnRemoval} from '../utils/focusReturn';
|
|
58
59
|
|
|
59
60
|
registerEnglishFallback(english);
|
|
60
61
|
/**
|
|
@@ -428,6 +429,7 @@ export function Lightbox({
|
|
|
428
429
|
// Open/close dialog. The dialog renders only with an item, so a viewer
|
|
429
430
|
// opened before its first item arrives opens when that item does.
|
|
430
431
|
const hasItem = currentItem != null;
|
|
432
|
+
// Syncs the native dialog with `isOpen` through `showModal()` and `close()`.
|
|
431
433
|
useIsomorphicLayoutEffect(() => {
|
|
432
434
|
const dialog = dialogRef.current;
|
|
433
435
|
if (!dialog || !hasItem) {
|
|
@@ -445,6 +447,23 @@ export function Lightbox({
|
|
|
445
447
|
}
|
|
446
448
|
}, [isOpen, hasItem]);
|
|
447
449
|
|
|
450
|
+
// A viewer that unmounts while open (rendered only while open, or removed
|
|
451
|
+
// with the rest of a view) never runs the close branch above. Focus the
|
|
452
|
+
// removal lost goes back to the opener while the opener is still on the
|
|
453
|
+
// page.
|
|
454
|
+
useEffect(() => {
|
|
455
|
+
const dialog = dialogRef.current;
|
|
456
|
+
if (dialog == null) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
const returnFocusOnRemoval = prepareFocusReturnOnRemoval(dialog);
|
|
460
|
+
return () => {
|
|
461
|
+
if (dialog.open) {
|
|
462
|
+
returnFocusOnRemoval(triggerElementRef.current);
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
}, [hasItem]);
|
|
466
|
+
|
|
448
467
|
const handleClose = useCallback(() => {
|
|
449
468
|
onOpenChange(false);
|
|
450
469
|
}, [onOpenChange]);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').HookDoc} */
|
|
4
|
+
export const docs = {
|
|
5
|
+
name: 'useLightbox',
|
|
6
|
+
displayName: 'useLightbox',
|
|
7
|
+
group: 'Lightbox',
|
|
8
|
+
keywords: [
|
|
9
|
+
'lightbox',
|
|
10
|
+
'gallery',
|
|
11
|
+
'viewer',
|
|
12
|
+
'image',
|
|
13
|
+
'video',
|
|
14
|
+
'media',
|
|
15
|
+
'modal',
|
|
16
|
+
'overlay',
|
|
17
|
+
'trigger',
|
|
18
|
+
],
|
|
19
|
+
params: [
|
|
20
|
+
{
|
|
21
|
+
name: 'options',
|
|
22
|
+
type: 'UseLightboxOptions',
|
|
23
|
+
description: 'Configuration options for the lightbox.',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'options.media',
|
|
28
|
+
type: 'LightboxMedia | LightboxMedia[]',
|
|
29
|
+
description:
|
|
30
|
+
'Media to display in the lightbox. Pass a single object for one item, or an array for gallery mode.',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'options.hasZoom',
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
description:
|
|
37
|
+
'Enable zoom on double-click, or Enter/Space/+/- via keyboard (images only). When zoomed, drag or use arrow keys to pan.',
|
|
38
|
+
default: 'false',
|
|
39
|
+
required: false,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'options.hasAutoPlay',
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
description: 'Whether video should autoplay when the lightbox opens.',
|
|
45
|
+
default: 'false',
|
|
46
|
+
required: false,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
returns: [
|
|
50
|
+
{
|
|
51
|
+
name: 'open',
|
|
52
|
+
type: '(index?: number) => void',
|
|
53
|
+
description:
|
|
54
|
+
'Open the lightbox, optionally at a specific gallery index (defaults to 0).',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'close',
|
|
58
|
+
type: '() => void',
|
|
59
|
+
description: 'Close the lightbox.',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'isOpen',
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
description: 'Whether the lightbox is currently open.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'index',
|
|
68
|
+
type: 'number',
|
|
69
|
+
description: 'Current gallery index.',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'element',
|
|
73
|
+
type: 'ReactNode',
|
|
74
|
+
description:
|
|
75
|
+
'Pre-wired Lightbox component element to render in your JSX tree.',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'triggerProps',
|
|
79
|
+
type: "{role: 'button', tabIndex: 0, 'aria-haspopup': 'dialog', onClick: () => void, onKeyDown: (e: React.KeyboardEvent) => void}",
|
|
80
|
+
description:
|
|
81
|
+
'Props to spread onto a single trigger element to open the lightbox at index 0 on click, Enter, or Space.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'getTriggerProps',
|
|
85
|
+
type: "(index: number) => {role: 'button', tabIndex: 0, 'aria-haspopup': 'dialog', onClick: () => void, onKeyDown: (e: React.KeyboardEvent) => void}",
|
|
86
|
+
description:
|
|
87
|
+
'Returns trigger props to spread onto an element to open the lightbox at a specific gallery index on click, Enter, or Space.',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
usage: {
|
|
91
|
+
description:
|
|
92
|
+
'State management and accessible trigger wiring for Lightbox. Eliminates boilerplate for managing open state and current index. Returns trigger props with button role, tabIndex={0}, aria-haspopup="dialog", and keyboard activation handlers, along with a pre-wired Lightbox element that handles dismissal, next/previous navigation, and focus restoration.',
|
|
93
|
+
bestPractices: [
|
|
94
|
+
{
|
|
95
|
+
guidance: true,
|
|
96
|
+
description:
|
|
97
|
+
'Spread getTriggerProps(index) onto image or thumbnail elements to give them accessible button semantics and keyboard activation.',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
guidance: true,
|
|
101
|
+
description:
|
|
102
|
+
'Render lightbox.element once in your component JSX tree alongside the triggers.',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
guidance: false,
|
|
106
|
+
description:
|
|
107
|
+
'Manage separate isOpen or index state alongside useLightbox; the hook already tracks both.',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
guidance: false,
|
|
111
|
+
description:
|
|
112
|
+
'Add custom click or keydown handlers to open the lightbox when using triggerProps or getTriggerProps.',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
relatedComponents: ['Lightbox', 'Grid', 'Thumbnail'],
|
|
117
|
+
relatedHooks: [],
|
|
118
|
+
importPath: '@astryxdesign/core/Lightbox',
|
|
119
|
+
category: 'interaction',
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
|
|
123
|
+
export const docsDense = {
|
|
124
|
+
description:
|
|
125
|
+
'State management and accessible trigger wiring for Lightbox. Eliminates boilerplate for open state and index. Returns trigger props and pre-wired Lightbox element.',
|
|
126
|
+
paramDescriptions: {
|
|
127
|
+
options: 'configuration options for the lightbox.',
|
|
128
|
+
'options.media':
|
|
129
|
+
'media to display (single item or array for gallery mode).',
|
|
130
|
+
'options.hasZoom':
|
|
131
|
+
'enable zoom on double-click or Enter/Space/+/- (images only).',
|
|
132
|
+
'options.hasAutoPlay': 'whether video should autoplay when opened.',
|
|
133
|
+
},
|
|
134
|
+
returnDescriptions: {
|
|
135
|
+
open: 'open the lightbox, optionally at a specific gallery index.',
|
|
136
|
+
close: 'close the lightbox.',
|
|
137
|
+
isOpen: 'whether the lightbox is currently open.',
|
|
138
|
+
index: 'current gallery index.',
|
|
139
|
+
element: 'pre-wired Lightbox element to render in JSX tree.',
|
|
140
|
+
triggerProps:
|
|
141
|
+
'trigger attributes to spread onto a single trigger element.',
|
|
142
|
+
getTriggerProps:
|
|
143
|
+
'(index) => props: returns trigger attributes for opening at index on click, Enter, or Space.',
|
|
144
|
+
},
|
|
145
|
+
usage: {
|
|
146
|
+
description:
|
|
147
|
+
'State management and trigger wiring for Lightbox. Returns trigger props and pre-wired element.',
|
|
148
|
+
bestPractices: [
|
|
149
|
+
{
|
|
150
|
+
guidance: true,
|
|
151
|
+
description:
|
|
152
|
+
'Spread getTriggerProps(index) onto image elements for accessible button semantics.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
guidance: true,
|
|
156
|
+
description:
|
|
157
|
+
'Render lightbox.element once in JSX alongside the triggers.',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
guidance: false,
|
|
161
|
+
description:
|
|
162
|
+
'Manage separate isOpen or index state alongside useLightbox.',
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
|
|
@@ -18,9 +18,10 @@
|
|
|
18
18
|
* without manual z-index management. The browser provides:
|
|
19
19
|
* - Top layer promotion (no z-index needed)
|
|
20
20
|
* - `::backdrop` pseudo-element
|
|
21
|
-
* - Body scroll lock
|
|
22
21
|
* - Focus trapping
|
|
23
22
|
*
|
|
23
|
+
* The page behind takes `useScrollLock`, the same lock as every other modal.
|
|
24
|
+
*
|
|
24
25
|
* Escape is owned by the shared dismissal stack (`useLayerDismissal`), so a
|
|
25
26
|
* drawer opened over another layer takes the press and nothing behind it
|
|
26
27
|
* closes. The native `cancel` event still handles the dismissals the browser
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
* SYNC: When modified, update these files to stay in sync:
|
|
37
38
|
* - /packages/core/src/MobileNav/index.ts (exports if types change)
|
|
38
39
|
* - /packages/core/src/Layer/useLayerDismissal.ts (dismissal stack)
|
|
39
|
-
* - /packages/core/src/hooks/
|
|
40
|
+
* - /packages/core/src/hooks/useScrollLock.ts (the page's scroll lock)
|
|
40
41
|
* - /packages/cli/assets/templates/blocks/components/MobileNav/ (showcase blocks)
|
|
41
42
|
*/
|
|
42
43
|
|
|
@@ -62,16 +63,12 @@ import {Button} from '../Button';
|
|
|
62
63
|
import {Icon} from '../Icon';
|
|
63
64
|
import {Heading} from '../Heading/Heading';
|
|
64
65
|
import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
|
|
65
|
-
import {
|
|
66
|
-
holdScrollbarGutter,
|
|
67
|
-
type ScrollbarGutterHold,
|
|
68
|
-
} from '../hooks/scrollbarGutter';
|
|
69
66
|
import {mergeProps, composeEventHandlers} from '../utils';
|
|
70
67
|
import {layerTextReset} from '../Layer/layerTextReset.stylex';
|
|
71
68
|
import {layerStructureReset} from '../Layer/layerStructureReset.stylex';
|
|
72
69
|
import {LayerContentBoundary} from '../Layer/layerScopedContext';
|
|
73
70
|
import {layerClickBoundary} from '../Layer/layerClickBoundary';
|
|
74
|
-
import {overlayPaddingReset} from '../Layout/
|
|
71
|
+
import {overlayPaddingReset} from '../Layout/overlayPaddingReset.stylex';
|
|
75
72
|
import {LayerDepthProvider} from '../Layer/LayerDepthContext';
|
|
76
73
|
import {ModalAnnounceProvider} from '../hooks/ModalAnnounceProvider';
|
|
77
74
|
import {useLayerDismissal} from '../Layer/useLayerDismissal';
|
|
@@ -79,6 +76,7 @@ import type {BaseProps} from '../BaseProps';
|
|
|
79
76
|
import {themeProps} from '../utils/themeProps';
|
|
80
77
|
|
|
81
78
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
79
|
+
import {useScrollLock} from '../hooks/useScrollLock';
|
|
82
80
|
import {
|
|
83
81
|
registerEnglishFallback,
|
|
84
82
|
useComponentTranslator,
|
|
@@ -525,15 +523,10 @@ export function MobileNav({
|
|
|
525
523
|
setWasOpen(isOpen);
|
|
526
524
|
setIsCloseHeld(!isOpen);
|
|
527
525
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
//
|
|
531
|
-
|
|
532
|
-
if (gutterRef.current) {
|
|
533
|
-
gutterRef.current.release();
|
|
534
|
-
gutterRef.current = null;
|
|
535
|
-
}
|
|
536
|
-
}, []);
|
|
526
|
+
// The same page lock as every other modal. Its effect runs before the
|
|
527
|
+
// open/close effect below, so it measures the scrollbar gutter before
|
|
528
|
+
// showModal() can hide the scrollbar.
|
|
529
|
+
useScrollLock(isOpen);
|
|
537
530
|
// Resolved side — computed from trigger position when side='auto'
|
|
538
531
|
const [resolvedSide, setResolvedSide] = useState<'start' | 'end'>(
|
|
539
532
|
side === 'auto' ? 'end' : side,
|
|
@@ -576,10 +569,6 @@ export function MobileNav({
|
|
|
576
569
|
}
|
|
577
570
|
|
|
578
571
|
if (isOpen) {
|
|
579
|
-
// Taken first: every mutation below is one that can hide the scrollbar,
|
|
580
|
-
// and the gutter has to be measured while it is still there.
|
|
581
|
-
gutterRef.current ??= holdScrollbarGutter(document.documentElement);
|
|
582
|
-
|
|
583
572
|
if (!dialog.open) {
|
|
584
573
|
// Capture the opener before showModal() pulls focus into the top
|
|
585
574
|
// layer. Only on the transition into open: a reopen while the delayed
|
|
@@ -589,15 +578,7 @@ export function MobileNav({
|
|
|
589
578
|
document.activeElement as HTMLElement | null;
|
|
590
579
|
dialog.showModal();
|
|
591
580
|
}
|
|
592
|
-
// Prevent background scrolling and iOS pull-to-refresh.
|
|
593
|
-
// overflow: clip avoids creating a scroll container (unlike hidden),
|
|
594
|
-
// so there's no scroll bounce and no need to save/restore scroll position.
|
|
595
|
-
document.documentElement.style.overflow = 'clip';
|
|
596
|
-
gutterRef.current.settle();
|
|
597
581
|
} else if (dialog.open) {
|
|
598
|
-
document.documentElement.style.overflow = '';
|
|
599
|
-
releaseGutter();
|
|
600
|
-
|
|
601
582
|
closeTimeoutRef.current = setTimeout(() => {
|
|
602
583
|
closeAndRestoreFocus(dialog, triggerElementRef);
|
|
603
584
|
setIsCloseHeld(false);
|
|
@@ -613,10 +594,8 @@ export function MobileNav({
|
|
|
613
594
|
clearTimeout(closeTimeoutRef.current);
|
|
614
595
|
closeTimeoutRef.current = null;
|
|
615
596
|
}
|
|
616
|
-
document.documentElement.style.overflow = '';
|
|
617
|
-
releaseGutter();
|
|
618
597
|
};
|
|
619
|
-
}, [isOpen
|
|
598
|
+
}, [isOpen]);
|
|
620
599
|
|
|
621
600
|
// Close the native dialog on unmount if it's still open. Inside AppShell the
|
|
622
601
|
// drawer is mounted in an <Activity> that switches to mode="hidden" when the
|
|
@@ -76,6 +76,7 @@ import {
|
|
|
76
76
|
import {useMultiCombobox} from './hooks';
|
|
77
77
|
import {getInputARIA, isImeKeyEvent, mergeProps} from '../utils';
|
|
78
78
|
import {joinAriaIDs} from '../utils/inputAria';
|
|
79
|
+
import {withholdCallerHandlers} from '../utils/disabledInteraction';
|
|
79
80
|
import {devWarn, warnOnce} from '../utils/devWarning';
|
|
80
81
|
import {useInteractionModalityTracking} from '../utils/interactionModality';
|
|
81
82
|
import {useAnnounce} from '../hooks/useAnnounce';
|
|
@@ -2468,13 +2469,7 @@ export function MultiSelector<T extends MultiSelectorOptionType>({
|
|
|
2468
2469
|
// A disabled trigger stays focusable but, like a natively disabled button,
|
|
2469
2470
|
// runs no caller event handler other than focus and blur, and a press on it
|
|
2470
2471
|
// reaches no handler at all (`spec:AST-085` FR2).
|
|
2471
|
-
const callerProps = isDisabled
|
|
2472
|
-
? Object.fromEntries(
|
|
2473
|
-
Object.entries(rest).filter(
|
|
2474
|
-
([key]) => !/^on[A-Z]/.test(key) || /^on(Focus|Blur)/.test(key),
|
|
2475
|
-
),
|
|
2476
|
-
)
|
|
2477
|
-
: rest;
|
|
2472
|
+
const callerProps = withholdCallerHandlers(rest, isDisabled);
|
|
2478
2473
|
const triggerSharedProps: React.HTMLAttributes<HTMLElement> = {
|
|
2479
2474
|
...callerProps,
|
|
2480
2475
|
id: triggerId,
|
|
@@ -53,6 +53,7 @@ import {VisuallyHidden} from '../VisuallyHidden';
|
|
|
53
53
|
import {useTooltip} from '../Tooltip';
|
|
54
54
|
import {getInputARIA} from '../utils';
|
|
55
55
|
import {joinAriaIDs} from '../utils/inputAria';
|
|
56
|
+
import {withholdCallerHandlers} from '../utils/disabledInteraction';
|
|
56
57
|
import {interactionOverlayStyles} from '../utils/interactionOverlay.stylex';
|
|
57
58
|
import {usePressFeedback} from '../hooks/usePressFeedback';
|
|
58
59
|
import {inputDisabledFocusStyles} from '../Field/inputDisabledFocus';
|
|
@@ -633,13 +634,7 @@ export function NumberInput({
|
|
|
633
634
|
const showsDisabledMessage = isDisabled && !!disabledMessage;
|
|
634
635
|
// A disabled field keeps its tab stop but, like a natively disabled one,
|
|
635
636
|
// runs no caller event handler other than focus and blur (`spec:AST-085` FR2).
|
|
636
|
-
const fieldProps = isDisabled
|
|
637
|
-
? Object.fromEntries(
|
|
638
|
-
Object.entries(rest).filter(
|
|
639
|
-
([key]) => !/^on[A-Z]/.test(key) || /^on(Focus|Blur)/.test(key),
|
|
640
|
-
),
|
|
641
|
-
)
|
|
642
|
-
: rest;
|
|
637
|
+
const fieldProps = withholdCallerHandlers(rest, isDisabled);
|
|
643
638
|
const disabledMessageTooltip = useTooltip({
|
|
644
639
|
placement: 'above',
|
|
645
640
|
// The container div is not naturally focusable; focusin bubbles up from
|
|
@@ -42,6 +42,8 @@ export function useOutlineFromDOM(
|
|
|
42
42
|
collectOutlineItems(containerRef.current),
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
+
// Syncs the outline items with the container's DOM through a
|
|
46
|
+
// MutationObserver.
|
|
45
47
|
useEffect(() => {
|
|
46
48
|
const container = containerRef.current;
|
|
47
49
|
setItems(collectOutlineItems(container));
|
|
@@ -275,6 +275,8 @@ export function useScrollSpy({
|
|
|
275
275
|
);
|
|
276
276
|
}, [rootRef, scrollContainerRef]);
|
|
277
277
|
|
|
278
|
+
// Syncs a scroll listener on the scroll root and a window resize listener
|
|
279
|
+
// with the items and offset. They choose the active outline item.
|
|
278
280
|
useEffect(() => {
|
|
279
281
|
if (isControlled || typeof window === 'undefined') {
|
|
280
282
|
return;
|
|
@@ -350,6 +350,8 @@ export function OverflowList({
|
|
|
350
350
|
const overflowItemsRef = useRef(overflowItems);
|
|
351
351
|
overflowItemsRef.current = overflowItems;
|
|
352
352
|
|
|
353
|
+
// Reports the measured overflow to `onOverflowChange`. A ResizeObserver
|
|
354
|
+
// drives the measurement, so no event handler can report it.
|
|
353
355
|
useIsomorphicLayoutEffect(() => {
|
|
354
356
|
if (
|
|
355
357
|
!onOverflowChange ||
|
package/src/Overlay/Overlay.tsx
CHANGED
|
@@ -94,8 +94,13 @@ export function Overlay({
|
|
|
94
94
|
align,
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
//
|
|
98
|
-
//
|
|
97
|
+
// Copies the first child's radius onto the wrapper, so the scrim clips to
|
|
98
|
+
// the media's rounded corners. This is a layout read of the mounted DOM, and
|
|
99
|
+
// no user interaction causes it. It runs again when a hidden Activity shows
|
|
100
|
+
// the wrapper, because the child can change while it is hidden. A ref
|
|
101
|
+
// callback runs again when a caller's ref changes identity, so it cannot
|
|
102
|
+
// keep this once-per-show timing. A useOverlay consumer sets the radius on
|
|
103
|
+
// its own element.
|
|
99
104
|
useIsomorphicLayoutEffect(() => {
|
|
100
105
|
const el = overlay.containerRef.current;
|
|
101
106
|
if (!el) {
|