@astryxdesign/core 0.7.7 → 0.7.8-canary.36cde5e
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 +5 -0
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +1 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +25 -4
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +5 -0
- package/dist/BottomSheet/useMobileKeyboard.d.ts.map +1 -1
- package/dist/BottomSheet/useMobileKeyboard.js +6 -0
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +12 -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 +15 -16
- 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 +4 -0
- 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/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 +625 -0
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +1 -0
- package/dist/DateInput/Wheel.d.ts +18 -37
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +84 -113
- 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 +74 -0
- package/dist/DateInput/wheelOptions.d.ts.map +1 -0
- package/dist/DateInput/wheelOptions.js +98 -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 +2 -0
- 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 +20 -33
- package/dist/Icon/Icon.d.ts +5 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +5 -2
- 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 +3 -0
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +3 -0
- package/dist/Layer/usePressPin.d.ts +17 -5
- package/dist/Layer/usePressPin.d.ts.map +1 -1
- package/dist/Layer/usePressPin.js +62 -12
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +3 -0
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +19 -0
- package/dist/MobileNav/MobileNav.d.ts +3 -2
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +9 -25
- 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/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +6 -0
- package/dist/PowerSearch/PowerSearch.d.ts +43 -4
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +445 -134
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +102 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +1919 -0
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +35 -2
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +25 -6
- 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 +7 -2
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +193 -83
- package/dist/PowerSearch/formatFilterValue.d.ts +18 -6
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +33 -12
- package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
- package/dist/PowerSearch/formatTokenValue.js +162 -0
- package/dist/PowerSearch/powerSearchDateZone.d.ts +21 -0
- package/dist/PowerSearch/powerSearchDateZone.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchDateZone.js +37 -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 +2 -0
- 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 +101 -77
- package/dist/Resizable/createResizable.d.ts +145 -0
- package/dist/Resizable/createResizable.d.ts.map +1 -0
- package/dist/Resizable/createResizable.js +575 -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 +5 -8
- 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/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.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +4 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -0
- package/dist/TextInput/TextInput.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +10 -7
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +2 -0
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +2 -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/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 +49 -37
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +22 -19
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +19 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +34 -53
- 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 +39 -6
- package/dist/gestures/GestureHost.d.ts +16 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +1 -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 +13 -3
- 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 +134 -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/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 +7 -9
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +55 -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 +42 -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-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +30 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +30 -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/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +7 -7
- package/dist/motion/animator.d.ts +14 -14
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +45 -20
- 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/index.d.ts +4 -3
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +4 -3
- 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/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 +7 -0
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +12 -0
- package/dist/utils/focusReturn.d.ts +15 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +28 -0
- package/dist/utils/interactionModality.d.ts.map +1 -1
- package/dist/utils/interactionModality.js +4 -0
- package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +3 -2
- package/dist/utils/plainDate.d.ts +8 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +19 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +20 -6
- 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 +120 -0
- package/locales/pseudo.json +90 -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 +4 -0
- package/src/BottomSheet/BottomSheet.tsx +1 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +39 -3
- package/src/BottomSheet/BottomSheetSwitcher.tsx +5 -0
- package/src/BottomSheet/useMobileKeyboard.ts +4 -0
- package/src/BottomSheet/useSheetGestures.ts +10 -1
- package/src/Button/Button.tsx +26 -4
- package/src/Calendar/Calendar.tsx +36 -25
- package/src/Carousel/Carousel.tsx +1 -0
- package/src/Chat/ChatComposerInput.tsx +2 -0
- 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/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 +765 -0
- package/src/DateInput/TouchDateField.tsx +1 -0
- package/src/DateInput/Wheel.tsx +94 -150
- 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 +155 -0
- package/src/DateInput/wheelPhysics.ts +406 -0
- package/src/DateInput/wheelStrip.ts +341 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- 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 +49 -54
- package/src/Icon/Icon.doc.mjs +49 -8
- package/src/Icon/Icon.tsx +15 -7
- package/src/IconButton/IconButton.doc.mjs +141 -21
- 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 +2 -0
- package/src/Layer/useLayerDismissal.ts +2 -0
- package/src/Layer/usePressPin.ts +81 -15
- package/src/Layer/useTouchTrigger.ts +2 -0
- package/src/Lightbox/Lightbox.tsx +19 -0
- package/src/MobileNav/MobileNav.tsx +9 -30
- package/src/Outline/useOutlineFromDOM.ts +2 -0
- package/src/Outline/useScrollSpy.ts +2 -0
- package/src/OverflowList/OverflowList.tsx +2 -0
- package/src/Popover/Popover.tsx +4 -0
- package/src/PowerSearch/PowerSearch.doc.mjs +60 -8
- package/src/PowerSearch/PowerSearch.tsx +627 -157
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2525 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +39 -6
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +2 -0
- package/src/PowerSearch/PowerSearchToken.tsx +7 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +244 -58
- package/src/PowerSearch/formatFilterValue.ts +55 -17
- package/src/PowerSearch/formatTokenValue.ts +222 -0
- package/src/PowerSearch/powerSearchDateZone.ts +64 -0
- package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
- package/src/PowerSearch/types.ts +2 -0
- 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 +169 -109
- package/src/Resizable/createResizable.ts +831 -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 +5 -12
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Spinner/Spinner.tsx +77 -63
- 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 +4 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +2 -0
- package/src/TextInput/TextInput.tsx +11 -10
- package/src/TimeInput/TimeInput.tsx +2 -0
- package/src/TimeInput/TouchTimeField.tsx +2 -0
- package/src/Timer/Timer.tsx +1 -0
- package/src/Timestamp/Timestamp.tsx +1 -1
- 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 +19 -3
- package/src/Tokenizer/Tokenizer.tsx +73 -51
- package/src/Tokenizer/TokenizerBottomSheet.tsx +1 -1
- package/src/Tokenizer/index.ts +1 -0
- package/src/Tooltip/useTooltip.doc.mjs +24 -0
- package/src/Tooltip/useTooltip.tsx +61 -56
- 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 +1 -1
- 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 +20 -5
- 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 +182 -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 +57 -60
- package/src/hooks/useScrollableArea.ts +4 -0
- package/src/hooks/useStreamingText.ts +2 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -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-locales/en.generated.ts +41 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +42 -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/motion/MEASUREMENTS.md +18 -0
- package/src/motion/README.md +10 -5
- package/src/motion/animatedLayout.ts +10 -5
- package/src/motion/animator.ts +66 -31
- 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/index.ts +4 -3
- 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/motionKnobs.ts +4 -3
- package/src/theme/themeMotion.ts +7 -0
- package/src/utils/dateParser.ts +16 -0
- package/src/utils/focusReturn.ts +30 -0
- package/src/utils/interactionModality.ts +4 -0
- package/src/utils/interactionOverlay.stylex.ts +3 -2
- package/src/utils/plainDate.ts +21 -0
- package/src/utils/pressFeedback.ts +24 -6
- package/src/utils/triggerFocus.ts +80 -0
- 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/internal/touch-sheet.ts +0 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAMhD,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,6CAE5B,CAAC;AAiBF,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,mBAAmB,CAAC,cAAc,CAAC,EACnC,UAAU,CACX;IACC,wDAAwD;IACxD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,MAAM,EACN,YAAY,EACZ,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EAAE,kBAAkB,EACrC,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,cAAc,qBAkOhB;yBA9Pe,SAAS"}
|
|
@@ -22,9 +22,10 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
22
22
|
import "../theme/tokens.stylex.js";
|
|
23
23
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
24
24
|
import { Field } from "../Field/Field.js";
|
|
25
|
-
import { useTooltip } from "../Tooltip/
|
|
25
|
+
import { useTooltip } from "../Tooltip/useTooltip.js";
|
|
26
26
|
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
27
|
-
import { composeEventHandlers
|
|
27
|
+
import { composeEventHandlers } from "../utils/composeEventHandlers.js";
|
|
28
|
+
import { mergeProps } from "../utils/mergeProps.js";
|
|
28
29
|
import { joinAriaIDs } from "../utils/inputAria.js";
|
|
29
30
|
import { useFieldInputStyling } from "../Field/fieldParts.js";
|
|
30
31
|
import { themeProps } from "../utils/themeProps.js";
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import React, { type ReactNode } from 'react';
|
|
17
17
|
import type { BaseProps } from '../BaseProps.js';
|
|
18
|
-
import { type ItemAlign } from '../Item/
|
|
18
|
+
import { type ItemAlign } from '../Item/Item.js';
|
|
19
19
|
export interface RadioListItemProps extends BaseProps<HTMLDivElement> {
|
|
20
20
|
ref?: React.Ref<HTMLDivElement>;
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAY5C,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,cAAc,CAAC;AA0IlD,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;;;;OAUG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,WAAW,EACX,UAAU,EAAE,cAAsB,EAClC,YAAY,EACZ,UAAU,EACV,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,kBAAkB,qBAoLpB;yBAnMe,aAAa"}
|
|
@@ -24,13 +24,15 @@ import { RadioListReasonContext } from "./RadioListReasonContext.js";
|
|
|
24
24
|
import { joinAriaIDs } from "../utils/inputAria.js";
|
|
25
25
|
import "../theme/tokens.stylex.js";
|
|
26
26
|
import { colorVars, radiusVars } from "../theme/tokens.stylex.js";
|
|
27
|
-
import {
|
|
27
|
+
import { isRenderable } from "../utils/isRenderable.js";
|
|
28
|
+
import { mergeProps } from "../utils/mergeProps.js";
|
|
29
|
+
import { rtlStyles } from "../utils/rtlStyles.js";
|
|
28
30
|
import "../Indicator/indicator.markers.stylex.js";
|
|
29
31
|
import { indicatorScope } from "../Indicator/indicator.markers.stylex.js";
|
|
30
32
|
import { useIndicatorFocusRing } from "../hooks/useIndicatorFocusRing.js";
|
|
31
33
|
import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
32
|
-
import { useIndicator } from "../Indicator/
|
|
33
|
-
import { Item } from "../Item/
|
|
34
|
+
import { useIndicator } from "../Indicator/useIndicator.js";
|
|
35
|
+
import { Item } from "../Item/Item.js";
|
|
34
36
|
import { themeProps } from "../utils/themeProps.js";
|
|
35
37
|
|
|
36
38
|
// The touch press's paint, declared by the shared overlay styles on the
|
|
@@ -43,7 +43,8 @@ export interface ResizeHandleProps extends Omit<BaseProps<HTMLDivElement>, 'styl
|
|
|
43
43
|
*/
|
|
44
44
|
isAlwaysVisible?: boolean;
|
|
45
45
|
/**
|
|
46
|
-
* Which side of the divider line the pill sits on.
|
|
46
|
+
* Which side of the divider line the pill sits on. It moves only the pill:
|
|
47
|
+
* the grab zone stays centred on the divider.
|
|
47
48
|
* - `'auto'` — panel side by default, flips when panel is collapsed to 0px
|
|
48
49
|
* - `'start'` — left (horizontal) or top (vertical)
|
|
49
50
|
* - `'end'` — right (horizontal) or bottom (vertical)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../src/Resizable/ResizeHandle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../src/Resizable/ResizeHandle.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAiB,SAAS,EAAC,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAkBxB,KAAK,aAAa,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AA8PzD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,SAAS,CAAC,cAAc,CAAC,EACzB,OAAO,CACR;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAEtC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAEhC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,YAAY,CAAC,EAC3B,SAAwB,EACxB,QAAQ,EAAE,YAAuB,EACjC,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAsB,EACtB,aAAsB,EACtB,KAAK,EAAE,cAAc,EACrB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,iBAAiB,+BA+SnB;yBA9Te,YAAY"}
|
|
@@ -8,25 +8,8 @@
|
|
|
8
8
|
* @output Styled drag handle with WAI-ARIA separator role and keyboard support
|
|
9
9
|
* @position Between resizable panels; consumed directly by builders
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Pill grip indicator can sit on either side of the divider (or centered)
|
|
14
|
-
* via pillPlacement. Default 'auto' places the pill on the panel side and
|
|
15
|
-
* flips when the panel collapses to 0px so it stays accessible.
|
|
16
|
-
*
|
|
17
|
-
* Pill placement uses a single stylex dynamic style that accepts a direction
|
|
18
|
-
* multiplier (-1 or 1). The pill element has its own themeProps
|
|
19
|
-
* ('resize-handle-pill') so themes can target size/shape directly.
|
|
20
|
-
*
|
|
21
|
-
* While the panel is collapsed, aria-valuenow is clamped to aria-valuemin
|
|
22
|
-
* (a value below the minimum is invalid per WCAG 4.1.2) and a localized
|
|
23
|
-
* "Collapsed" aria-valuetext announces the real state.
|
|
24
|
-
*
|
|
25
|
-
* The handle's input (the pointer drag, the keys, the double-click) is
|
|
26
|
-
* resizeGesture.ts. ResizeHandle forwards its React events to it, over the
|
|
27
|
-
* region its `resizable` prop describes. A drag takes pointer capture on the grab zone.
|
|
28
|
-
* The gesture's move, up and cancel events then go there, as in Slider, even
|
|
29
|
-
* over an embedded frame.
|
|
11
|
+
* A drag takes pointer capture on the element it starts on, so moves over an
|
|
12
|
+
* embedded frame still arrive.
|
|
30
13
|
*/
|
|
31
14
|
import { useEffect, useRef, useState } from 'react';
|
|
32
15
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -53,28 +36,6 @@ function resolveEffectiveSide(pillPlacement, isReversed, isCollapsed) {
|
|
|
53
36
|
}
|
|
54
37
|
return panelSide;
|
|
55
38
|
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Hit-area inline bias, expressed as a fraction of the pill's per-side offset.
|
|
59
|
-
*
|
|
60
|
-
* The visible pill is placed by `pillOffsetX`/`pillOffsetY`: anchored at the
|
|
61
|
-
* divider's inline-start edge and pushed one grip-width-plus-gap toward the
|
|
62
|
-
* panel side via a PHYSICAL translate (dir −1 = start, +1 = end). Because that
|
|
63
|
-
* offset is physical, the pill sits on the same physical side of the divider in
|
|
64
|
-
* both LTR and RTL. The grab zone must sit OVER that pill, so it has to use the
|
|
65
|
-
* exact same anchor + physical-offset construction as the pill (just wider) —
|
|
66
|
-
* anchoring the hit area at the divider centre (`insetInlineStart: 50%`) and
|
|
67
|
-
* biasing with a percentage translate mixes a logical anchor (which flips under
|
|
68
|
-
* RTL) with a physical translate (which doesn't), leaving the grab zone stranded
|
|
69
|
-
* to one side under RTL. Returning the pill's `dir` here lets the hit area reuse
|
|
70
|
-
* `pillOffsetX`/`pillOffsetY` so the two elements are positioned identically.
|
|
71
|
-
*/
|
|
72
|
-
function hitAreaBiasDir(effectiveSide) {
|
|
73
|
-
if (effectiveSide === 'center') {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
return effectiveSide === 'start' ? -1 : 1;
|
|
77
|
-
}
|
|
78
39
|
const styles = {
|
|
79
40
|
handle: {
|
|
80
41
|
kVAEAm: "x1n2onr6",
|
|
@@ -108,6 +69,14 @@ const styles = {
|
|
|
108
69
|
kZKoxP: "x5kfih4",
|
|
109
70
|
$$css: true
|
|
110
71
|
},
|
|
72
|
+
overlayHorizontalOnShortPane: {
|
|
73
|
+
kzqmXN: "x1a4a7d3",
|
|
74
|
+
$$css: true
|
|
75
|
+
},
|
|
76
|
+
overlayVerticalOnShortPane: {
|
|
77
|
+
kZKoxP: "xcuarzx",
|
|
78
|
+
$$css: true
|
|
79
|
+
},
|
|
111
80
|
horizontal: {
|
|
112
81
|
kzqmXN: "x1i1rx1s",
|
|
113
82
|
kZKoxP: "x5yr21d",
|
|
@@ -169,10 +138,19 @@ const styles = {
|
|
|
169
138
|
k3aq6I: "x1cb1t30",
|
|
170
139
|
$$css: true
|
|
171
140
|
},
|
|
141
|
+
hitAreaWithinHandleX: {
|
|
142
|
+
kzqmXN: "x5wh7xo",
|
|
143
|
+
$$css: true
|
|
144
|
+
},
|
|
145
|
+
hitAreaWithinHandleY: {
|
|
146
|
+
kZKoxP: "x1tvnn7s",
|
|
147
|
+
$$css: true
|
|
148
|
+
},
|
|
172
149
|
pill: {
|
|
173
150
|
kVAEAm: "x10l6tqk",
|
|
174
151
|
kY2c9j: "xhtitgo",
|
|
175
|
-
|
|
152
|
+
kFalU9: "x5ve5x3",
|
|
153
|
+
kfSwDN: "x87ps6o",
|
|
176
154
|
kaIpWk: "xjspbzw",
|
|
177
155
|
kWkggS: "x1m4xfpy",
|
|
178
156
|
k1ekBW: "x1wbls7o",
|
|
@@ -181,6 +159,14 @@ const styles = {
|
|
|
181
159
|
k87sOh: "xwa60dl",
|
|
182
160
|
$$css: true
|
|
183
161
|
},
|
|
162
|
+
pillGrabHorizontal: {
|
|
163
|
+
kkrTdU: "xicojor x16khyan",
|
|
164
|
+
$$css: true
|
|
165
|
+
},
|
|
166
|
+
pillGrabVertical: {
|
|
167
|
+
kkrTdU: "xyozgr7 x16khyan",
|
|
168
|
+
$$css: true
|
|
169
|
+
},
|
|
184
170
|
pillHorizontal: {
|
|
185
171
|
kzqmXN: "x1g8rjiy",
|
|
186
172
|
kZKoxP: "x18to7ep",
|
|
@@ -193,6 +179,7 @@ const styles = {
|
|
|
193
179
|
},
|
|
194
180
|
pillHidden: {
|
|
195
181
|
kSiTet: "xg01cxk",
|
|
182
|
+
kfzvcC: "x47corl",
|
|
196
183
|
$$css: true
|
|
197
184
|
},
|
|
198
185
|
pillVisible: {
|
|
@@ -201,26 +188,58 @@ const styles = {
|
|
|
201
188
|
},
|
|
202
189
|
pillHover: {
|
|
203
190
|
kSiTet: "x1hc1fzr",
|
|
191
|
+
kfzvcC: "x67bb7w",
|
|
204
192
|
kWkggS: "x1m4xfpy",
|
|
205
193
|
$$css: true
|
|
206
194
|
},
|
|
207
195
|
pillActive: {
|
|
208
196
|
kSiTet: "x1hc1fzr",
|
|
197
|
+
kfzvcC: "x67bb7w",
|
|
209
198
|
kWkggS: "x7njt3n",
|
|
210
199
|
$$css: true
|
|
200
|
+
},
|
|
201
|
+
pillBridgeRight: {
|
|
202
|
+
kgeoSG: "x1cpjm7i",
|
|
203
|
+
kEoFBp: "x1hmns74",
|
|
204
|
+
kGOzcv: "x1nc033x",
|
|
205
|
+
kSJ0CW: "x1682cnc x7my30s",
|
|
206
|
+
koaPKo: "x5ig7ga x3k25x4",
|
|
207
|
+
$$css: true
|
|
208
|
+
},
|
|
209
|
+
pillBridgeLeft: {
|
|
210
|
+
kgeoSG: "x1cpjm7i",
|
|
211
|
+
kEoFBp: "x1hmns74",
|
|
212
|
+
kGOzcv: "x1nc033x",
|
|
213
|
+
kSJ0CW: "x1vl71nl xnx00js",
|
|
214
|
+
koaPKo: "xtyp5od x17kcdp5",
|
|
215
|
+
$$css: true
|
|
216
|
+
},
|
|
217
|
+
pillBridgeDown: {
|
|
218
|
+
kgeoSG: "x1cpjm7i",
|
|
219
|
+
kEoFBp: "x1hmns74",
|
|
220
|
+
kpsdNU: "xm4btww",
|
|
221
|
+
k96MEf: "x1y3wzot",
|
|
222
|
+
k5Ofw7: "xxgnp13",
|
|
223
|
+
$$css: true
|
|
224
|
+
},
|
|
225
|
+
pillBridgeUp: {
|
|
226
|
+
kgeoSG: "x1cpjm7i",
|
|
227
|
+
kEoFBp: "x1hmns74",
|
|
228
|
+
kpsdNU: "xm4btww",
|
|
229
|
+
k96MEf: "x1phjwh8",
|
|
230
|
+
k5Ofw7: "xhq5o37",
|
|
231
|
+
$$css: true
|
|
211
232
|
}
|
|
212
233
|
};
|
|
213
234
|
|
|
214
235
|
// Dynamic styles — avoids inline style overrides.
|
|
215
236
|
// Each axis gets its own function since StyleX requires static structure.
|
|
216
237
|
const _temp = {
|
|
217
|
-
|
|
218
|
-
k3aq6I: "x11wx31z " + "x75qhwu",
|
|
238
|
+
kzqmXN: "x5lhr3w",
|
|
219
239
|
"$$css": true
|
|
220
240
|
};
|
|
221
241
|
const _temp2 = {
|
|
222
|
-
|
|
223
|
-
k3aq6I: "xsqj5wx",
|
|
242
|
+
kZKoxP: "x16ye13r",
|
|
224
243
|
"$$css": true
|
|
225
244
|
};
|
|
226
245
|
const _temp3 = {
|
|
@@ -234,12 +253,11 @@ const _temp4 = {
|
|
|
234
253
|
"$$css": true
|
|
235
254
|
};
|
|
236
255
|
const dynamicStyles = {
|
|
237
|
-
|
|
238
|
-
"--x-
|
|
239
|
-
"--x-sj6hyi": `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) + 6.5px))` != null ? `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) + 6.5px))` : undefined
|
|
256
|
+
hitAreaLengthX: pane => [_temp, {
|
|
257
|
+
"--x-width": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`min(${spacingVars['--spacing-4']}, ${pane}px)`)
|
|
240
258
|
}],
|
|
241
|
-
|
|
242
|
-
"--x-
|
|
259
|
+
hitAreaLengthY: pane => [_temp2, {
|
|
260
|
+
"--x-height": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`min(${spacingVars['--spacing-4']}, ${pane}px)`)
|
|
243
261
|
}],
|
|
244
262
|
pillOffsetX: dir => [_temp3, {
|
|
245
263
|
"--x-transform": `translate(calc(${dir} * (100% + ${spacingVars['--spacing-1']})), -50%)` != null ? `translate(calc(${dir} * (100% + ${spacingVars['--spacing-1']})), -50%)` : undefined
|
|
@@ -358,9 +376,11 @@ export function ResizeHandle({
|
|
|
358
376
|
const gesture = resizable != null ? regionGesture : null;
|
|
359
377
|
const isCollapsed = resizable?._isCollapsed ?? false;
|
|
360
378
|
const effectiveSide = resolveEffectiveSide(pillPlacement, isReversed, isCollapsed);
|
|
361
|
-
//
|
|
362
|
-
//
|
|
363
|
-
|
|
379
|
+
// An inline zone reaches at most half of the pane the Handle resizes. An
|
|
380
|
+
// overlay Handle takes at most half of it. A collapsed pane, or one at 0px,
|
|
381
|
+
// has nothing to protect and keeps the whole zone.
|
|
382
|
+
const paneSize = resizable?._size;
|
|
383
|
+
const paneLength = isCollapsed || paneSize == null || paneSize <= 0 ? undefined : paneSize;
|
|
364
384
|
const isInteracting = isHovered || isFocused;
|
|
365
385
|
|
|
366
386
|
// A handle whose axis disagrees with its region drags along one axis while
|
|
@@ -378,6 +398,8 @@ export function ResizeHandle({
|
|
|
378
398
|
// are released here. The region outlives this handle and still has to hear
|
|
379
399
|
// that its gesture is over.
|
|
380
400
|
const hasRegion = resizable != null;
|
|
401
|
+
// Interrupts the region's gesture when the handle loses its region or
|
|
402
|
+
// unmounts.
|
|
381
403
|
useEffect(() => {
|
|
382
404
|
if (!hasRegion) {
|
|
383
405
|
return;
|
|
@@ -402,6 +424,26 @@ export function ResizeHandle({
|
|
|
402
424
|
const effectiveMax = resizable ? getEffectiveMaxPx(resizable) ?? (resizable._maxSizePx !== Infinity ? resizable._maxSizePx : undefined) : undefined;
|
|
403
425
|
const ariaValueMax = effectiveMax != null && Number.isFinite(effectiveMax) ? effectiveMax : undefined;
|
|
404
426
|
const ariaValueText = resizable != null && isCollapsed ? t('@astryx.resizable.collapsed') : undefined;
|
|
427
|
+
|
|
428
|
+
// The Grip pill takes the pointer as the Grab zone does, so a pill drawn
|
|
429
|
+
// outside the zone still resizes.
|
|
430
|
+
const grabHandlers = {
|
|
431
|
+
onPointerDown: e => {
|
|
432
|
+
if (!isDisabled) {
|
|
433
|
+
gesture?.pointerDown(e);
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
onPointerMove: e => gesture?.pointerMove(e),
|
|
437
|
+
onPointerUp: e => gesture?.pointerUp(e),
|
|
438
|
+
onPointerCancel: e => gesture?.pointerCancel(e),
|
|
439
|
+
onLostPointerCapture: e => gesture?.pointerCancel(e),
|
|
440
|
+
onPointerEnter: () => setIsHovered(true),
|
|
441
|
+
onPointerLeave: () => {
|
|
442
|
+
if (!isDragging) {
|
|
443
|
+
setIsHovered(false);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
};
|
|
405
447
|
return /*#__PURE__*/_jsxs("div", {
|
|
406
448
|
ref: useMergedRefs(ref, handleRef),
|
|
407
449
|
role: "separator",
|
|
@@ -421,7 +463,7 @@ export function ResizeHandle({
|
|
|
421
463
|
onFocus: () => setIsFocused(true),
|
|
422
464
|
onBlur: () => setIsFocused(false),
|
|
423
465
|
"data-resizing": isDragging || undefined,
|
|
424
|
-
...mergeProps(themeProps('resize-handle'), focusOutlineProps.focusVisible(styles.handle, isOverlay && styles.overlay, isOverlay && (isHorizontal ? styles.overlayHorizontal : styles.overlayVertical), !isOverlay && (isHorizontal ? styles.horizontal : styles.vertical), !isOverlay && !hasDivider && (isHorizontal ? styles.noDividerHorizontal : styles.noDividerVertical), !isOverlay && hasDivider && isInteracting && !isDragging && styles.handleHover, !isOverlay && hasDivider && isDragging && styles.handleActive, isDisabled && styles.disabled, xstyle), className),
|
|
466
|
+
...mergeProps(themeProps('resize-handle'), focusOutlineProps.focusVisible(styles.handle, isOverlay && styles.overlay, isOverlay && (isHorizontal ? styles.overlayHorizontal : styles.overlayVertical), isOverlay && paneLength != null && (isHorizontal ? styles.overlayHorizontalOnShortPane : styles.overlayVerticalOnShortPane), !isOverlay && (isHorizontal ? styles.horizontal : styles.vertical), !isOverlay && !hasDivider && (isHorizontal ? styles.noDividerHorizontal : styles.noDividerVertical), !isOverlay && hasDivider && isInteracting && !isDragging && styles.handleHover, !isOverlay && hasDivider && isDragging && styles.handleActive, isDisabled && styles.disabled, xstyle), className),
|
|
425
467
|
...props,
|
|
426
468
|
// Keyboard resizing must fire from the focusable separator, not a child:
|
|
427
469
|
// keydown fires on the focused element and bubbles up, so a handler on a
|
|
@@ -435,29 +477,11 @@ export function ResizeHandle({
|
|
|
435
477
|
}
|
|
436
478
|
},
|
|
437
479
|
children: [/*#__PURE__*/_jsx("div", {
|
|
438
|
-
...stylex.props(styles.hitArea, isHorizontal ? styles.hitAreaHorizontal : styles.hitAreaVertical,
|
|
439
|
-
|
|
440
|
-
// centered (no bias) just center the hit area on the divider; when
|
|
441
|
-
// it's offset to a panel side, reuse the pill's physical-offset
|
|
442
|
-
// construction so the two stay aligned in LTR and RTL alike.
|
|
443
|
-
hitBiasDir == null ? isHorizontal ? rtlStyles.centerInline('0px') : styles.hitAreaCenteredY : isHorizontal ? dynamicStyles.hitAreaOffsetX(hitBiasDir) : dynamicStyles.hitAreaOffsetY(hitBiasDir), isDisabled && styles.disabled),
|
|
444
|
-
onPointerDown: e => {
|
|
445
|
-
if (!isDisabled) {
|
|
446
|
-
gesture?.pointerDown(e);
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
onPointerMove: e => gesture?.pointerMove(e),
|
|
450
|
-
onPointerUp: e => gesture?.pointerUp(e),
|
|
451
|
-
onPointerCancel: e => gesture?.pointerCancel(e),
|
|
452
|
-
onLostPointerCapture: e => gesture?.pointerCancel(e),
|
|
453
|
-
onPointerEnter: () => setIsHovered(true),
|
|
454
|
-
onPointerLeave: () => {
|
|
455
|
-
if (!isDragging) {
|
|
456
|
-
setIsHovered(false);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
480
|
+
...stylex.props(styles.hitArea, isHorizontal ? styles.hitAreaHorizontal : styles.hitAreaVertical, isHorizontal ? rtlStyles.centerInline('0px') : styles.hitAreaCenteredY, isOverlay && (isHorizontal ? styles.hitAreaWithinHandleX : styles.hitAreaWithinHandleY), !isOverlay && paneLength != null && (isHorizontal ? dynamicStyles.hitAreaLengthX(paneLength) : dynamicStyles.hitAreaLengthY(paneLength)), isDisabled && styles.disabled),
|
|
481
|
+
...grabHandlers
|
|
459
482
|
}), children ?? /*#__PURE__*/_jsx("div", {
|
|
460
|
-
...mergeProps(themeProps('resize-handle-pill'), stylex.props(styles.pill, isHorizontal ? styles.pillHorizontal : styles.pillVertical, effectiveSide === 'center' ? rtlStyles.centerInline('-50%') : isHorizontal ? dynamicStyles.pillOffsetX(effectiveSide === 'start' ? -1 : 1) : dynamicStyles.pillOffsetY(effectiveSide === 'start' ? -1 : 1), isAlwaysVisible ? styles.pillVisible : styles.pillHidden, isInteracting && !isDragging && styles.pillHover, isDragging && styles.pillActive))
|
|
483
|
+
...mergeProps(themeProps('resize-handle-pill'), stylex.props(styles.pill, isHorizontal ? styles.pillHorizontal : styles.pillVertical, effectiveSide === 'center' ? rtlStyles.centerInline('-50%') : isHorizontal ? dynamicStyles.pillOffsetX(effectiveSide === 'start' ? -1 : 1) : dynamicStyles.pillOffsetY(effectiveSide === 'start' ? -1 : 1), isHorizontal ? styles.pillGrabHorizontal : styles.pillGrabVertical, isAlwaysVisible ? styles.pillVisible : styles.pillHidden, !isAlwaysVisible && effectiveSide !== 'center' && (isHorizontal ? effectiveSide === 'start' ? styles.pillBridgeRight : styles.pillBridgeLeft : effectiveSide === 'start' ? styles.pillBridgeDown : styles.pillBridgeUp), isInteracting && !isDragging && styles.pillHover, isDragging && styles.pillActive, isDisabled && styles.disabled)),
|
|
484
|
+
...grabHandlers
|
|
461
485
|
})]
|
|
462
486
|
});
|
|
463
487
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { SizeValue } from '../utils/types.js';
|
|
2
|
+
import { type ResizableDirection } from './resizableModel.js';
|
|
3
|
+
import type { ResizeGestureModel } from './resizeGesture.js';
|
|
4
|
+
import type { ResizableSize } from './utils.js';
|
|
5
|
+
export interface CreateResizableOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Initial size. A number or an exact `Npx` is pixels, and an exact `N%` is
|
|
8
|
+
* a share of the basis. `percent(value, {min | max: pixel(value)})` adds one
|
|
9
|
+
* pixel floor or ceiling. A value that depends on the basis resolves once
|
|
10
|
+
* into pixels. @default 250
|
|
11
|
+
*/
|
|
12
|
+
defaultSize?: ResizableSize | SizeValue;
|
|
13
|
+
/** The minimum size, in the same forms. @default 50 */
|
|
14
|
+
minSize?: ResizableSize;
|
|
15
|
+
/** The maximum size, in the same forms. Unbounded when omitted. */
|
|
16
|
+
maxSize?: ResizableSize;
|
|
17
|
+
/** Pixel values the region rests on; it can rest only on one of them. */
|
|
18
|
+
snaps?: number[];
|
|
19
|
+
/** Whether the region can collapse to 0. @default false */
|
|
20
|
+
collapsible?: boolean;
|
|
21
|
+
/** Size in px under which a drag collapses the region. @default 40 */
|
|
22
|
+
collapsedSize?: number;
|
|
23
|
+
/**
|
|
24
|
+
* The element a percentage is a share of, read as `containerRef.current`.
|
|
25
|
+
* Omitted, percentages are a share of the viewport. A plain `{current}`
|
|
26
|
+
* object serves outside React.
|
|
27
|
+
*/
|
|
28
|
+
containerRef?: {
|
|
29
|
+
readonly current: HTMLElement | null;
|
|
30
|
+
};
|
|
31
|
+
/** The axis the region resizes along. @default 'horizontal' */
|
|
32
|
+
direction?: ResizableDirection;
|
|
33
|
+
/** Key under which the size and collapse state persist in localStorage. */
|
|
34
|
+
autoSaveId?: string;
|
|
35
|
+
/** Initial collapse state; a persisted entry wins over it. */
|
|
36
|
+
defaultIsCollapsed?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Controlled collapse state. When set, the caller owns collapse. A collapse
|
|
39
|
+
* or expand request reports through `onCollapseChange`. Nothing changes
|
|
40
|
+
* until the caller passes the new value through `update`.
|
|
41
|
+
*/
|
|
42
|
+
isCollapsed?: boolean;
|
|
43
|
+
/** Called when an interaction changes the size. */
|
|
44
|
+
onSizeChange?: (size: number) => void;
|
|
45
|
+
/** Called when an interaction collapses or expands the region. */
|
|
46
|
+
onCollapseChange?: (isCollapsed: boolean) => void;
|
|
47
|
+
}
|
|
48
|
+
export interface ResizableController {
|
|
49
|
+
/** The region's size in px, 0 while collapsed. */
|
|
50
|
+
readonly size: number;
|
|
51
|
+
readonly isCollapsed: boolean;
|
|
52
|
+
/** Collapses the region, when it is collapsible. */
|
|
53
|
+
collapse(): void;
|
|
54
|
+
/** Expands the region to the size it had before it collapsed. */
|
|
55
|
+
expand(): void;
|
|
56
|
+
/** Resizes the region to `size` px, within its bounds. */
|
|
57
|
+
resize(size: number): void;
|
|
58
|
+
/**
|
|
59
|
+
* Takes the full set of options, as a new render does: an option left out
|
|
60
|
+
* returns to its default. The region keeps its size and collapse state,
|
|
61
|
+
* within the new options.
|
|
62
|
+
*/
|
|
63
|
+
update(options: CreateResizableOptions): void;
|
|
64
|
+
/**
|
|
65
|
+
* Calls `listener` after every change to `size` or `isCollapsed`, a
|
|
66
|
+
* correction a newly measured basis makes included. Returns the function
|
|
67
|
+
* that stops it.
|
|
68
|
+
*/
|
|
69
|
+
subscribe(listener: () => void): () => void;
|
|
70
|
+
/** Stops every observer the factory started; a gesture in flight ends. */
|
|
71
|
+
destroy(): void;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The state a region with `options` starts in: the server's render and a
|
|
75
|
+
* hook's first render. A container is not measured
|
|
76
|
+
* yet, so a percentage of it resolves against the deterministic 1200px basis
|
|
77
|
+
* until the factory measures it. `'server'` reads the state the server
|
|
78
|
+
* rendered, for a render that hydrates it: the 1200px basis for a viewport
|
|
79
|
+
* percentage too, and nothing saved.
|
|
80
|
+
*/
|
|
81
|
+
export declare function readInitialResizableState(options?: CreateResizableOptions, environment?: 'client' | 'server'): ResizableSnapshot;
|
|
82
|
+
/**
|
|
83
|
+
* What a React form of the region renders. A change to any part replaces it
|
|
84
|
+
* as a whole. It holds the size (0 while collapsed), the collapse state, the
|
|
85
|
+
* size as expanded, and the bounds the handle announces.
|
|
86
|
+
*/
|
|
87
|
+
export interface ResizableSnapshot {
|
|
88
|
+
readonly size: number;
|
|
89
|
+
readonly isCollapsed: boolean;
|
|
90
|
+
readonly expandedSize: number;
|
|
91
|
+
readonly minPx: number;
|
|
92
|
+
readonly maxPx: number;
|
|
93
|
+
/** The maximum the handle reports: a configured one, or a measured extent. */
|
|
94
|
+
readonly effectiveMaxPx: number | undefined;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The package's own channel into a factory, for useResizable: kept off the
|
|
98
|
+
* exported ResizableController, so it adds no public member.
|
|
99
|
+
*/
|
|
100
|
+
interface ResizableInternals {
|
|
101
|
+
snapshot(): ResizableSnapshot;
|
|
102
|
+
/** Calls `listener` after every change to the snapshot. */
|
|
103
|
+
subscribeSnapshot(listener: () => void): () => void;
|
|
104
|
+
/**
|
|
105
|
+
* Follows the element behind `containerRef` when it has changed without
|
|
106
|
+
* new options, as a React caller's commit may have swapped it.
|
|
107
|
+
*/
|
|
108
|
+
syncContainer(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Lets go of the page and keeps the region. A gesture in flight ends as
|
|
111
|
+
* cancelled, and the observers go. Collapse, expand and resize still apply
|
|
112
|
+
* and report. For a React caller whose component unmounts or an
|
|
113
|
+
* `<Activity>` hides.
|
|
114
|
+
*/
|
|
115
|
+
suspend(): void;
|
|
116
|
+
/** Takes the page back after `suspend`: the observers. */
|
|
117
|
+
resume(): void;
|
|
118
|
+
/**
|
|
119
|
+
* The region's side of a ResizeHandle's gesture: the drag and keys of a
|
|
120
|
+
* ResizeHandle given the configuration object's props.
|
|
121
|
+
*/
|
|
122
|
+
model: ResizeGestureModel;
|
|
123
|
+
}
|
|
124
|
+
/** The factory's internal channel, or undefined for anything else. */
|
|
125
|
+
export declare function readResizableInternals(controller: ResizableController): ResizableInternals | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* A resizable region, without React. The factory never sizes the panel: it
|
|
128
|
+
* reports the size, and the caller applies it. It resolves, clamps, snaps,
|
|
129
|
+
* collapses and saves the size, and a percentage follows its basis.
|
|
130
|
+
* `destroy` stops its observers.
|
|
131
|
+
*/
|
|
132
|
+
export declare function createResizable(options?: CreateResizableOptions): ResizableController;
|
|
133
|
+
/**
|
|
134
|
+
* Who a factory's development warnings speak for: the bare factory, or the
|
|
135
|
+
* configuration-object useResizable built on it, whose warnings keep the
|
|
136
|
+
* hook's name and words.
|
|
137
|
+
*/
|
|
138
|
+
export type ResizableWarningSource = 'createResizable' | 'useResizable';
|
|
139
|
+
/**
|
|
140
|
+
* createResizable, with its development warnings in the words of `source`:
|
|
141
|
+
* the package's own entry, for useResizable.
|
|
142
|
+
*/
|
|
143
|
+
export declare function createResizableAs(source: ResizableWarningSource, options?: CreateResizableOptions): ResizableController;
|
|
144
|
+
export {};
|
|
145
|
+
//# sourceMappingURL=createResizable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createResizable.d.ts","sourceRoot":"","sources":["../../src/Resizable/createResizable.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAcL,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAC,kBAAkB,EAAqB,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACxC,uDAAuD;IACvD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,mEAAmE;IACnE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE;QAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;KAAC,CAAC;IACtD,+DAA+D;IAC/D,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,oDAAoD;IACpD,QAAQ,IAAI,IAAI,CAAC;IACjB,iEAAiE;IACjE,MAAM,IAAI,IAAI,CAAC;IACf,0DAA0D;IAC1D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC9C;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5C,0EAA0E;IAC1E,OAAO,IAAI,IAAI,CAAC;CACjB;AAkBD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,sBAA2B,EACpC,WAAW,GAAE,QAAQ,GAAG,QAAmB,GAC1C,iBAAiB,CAgFnB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED;;;GAGG;AACH,UAAU,kBAAkB;IAC1B,QAAQ,IAAI,iBAAiB,CAAC;IAC9B,2DAA2D;IAC3D,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IACpD;;;OAGG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;;OAKG;IACH,OAAO,IAAI,IAAI,CAAC;IAChB,0DAA0D;IAC1D,MAAM,IAAI,IAAI,CAAC;IACf;;;OAGG;IACH,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAID,sEAAsE;AACtE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,mBAAmB,GAC9B,kBAAkB,GAAG,SAAS,CAEhC;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,GAAE,sBAA2B,GACnC,mBAAmB,CAErB;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAExE;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,sBAAsB,EAC9B,OAAO,GAAE,sBAA2B,GACnC,mBAAmB,CA4hBrB"}
|