@astryxdesign/core 0.7.7-canary.550ff21 → 0.7.7-canary.58c5b8a
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 +36 -6
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts +13 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts.map +1 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.js +45 -0
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +1 -1
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +79 -9
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +23 -4
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +5 -4
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +3 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +2 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +9 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +50 -5
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +7 -1
- package/dist/CheckboxList/CheckboxListContext.d.ts +6 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +10 -2
- 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/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +5 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +13 -27
- package/dist/DateInput/Wheel.d.ts +17 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +161 -20
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +63 -49
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +53 -15
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +15 -11
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +9 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +20 -4
- package/dist/Field/Field.js +2 -2
- package/dist/Field/PanelSearchInput.d.ts +9 -1
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +3 -1
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +27 -2
- 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/InfoTip/InfoTip.d.ts +63 -0
- package/dist/InfoTip/InfoTip.d.ts.map +1 -0
- package/dist/InfoTip/InfoTip.js +126 -0
- package/dist/InfoTip/index.d.ts +10 -0
- package/dist/InfoTip/index.d.ts.map +1 -0
- package/dist/InfoTip/index.js +12 -0
- package/dist/Layer/layerAnimations.stylex.d.ts +7 -8
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +25 -20
- package/dist/Layer/layerClickBoundary.d.ts +7 -1
- package/dist/Layer/layerClickBoundary.d.ts.map +1 -1
- package/dist/Layer/layerClickBoundary.js +2 -2
- package/dist/Layer/useBackdropPress.d.ts +27 -0
- package/dist/Layer/useBackdropPress.d.ts.map +1 -0
- package/dist/Layer/useBackdropPress.js +53 -0
- package/dist/Layer/usePressPin.d.ts +105 -0
- package/dist/Layer/usePressPin.d.ts.map +1 -0
- package/dist/Layer/usePressPin.js +413 -0
- package/dist/Layer/useTouchTrigger.d.ts +23 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +45 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +2 -1
- package/dist/MobileNav/MobileNav.js +0 -1
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +2 -4
- package/dist/Outline/Outline.d.ts +2 -4
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -52
- package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromMarkdown.js +1 -0
- package/dist/Outline/useScrollSpy.js +3 -3
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +56 -7
- package/dist/PowerSearch/PowerSearch.d.ts +36 -3
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +571 -302
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +100 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +1913 -0
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +32 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +17 -6
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +170 -61
- package/dist/PowerSearch/formatFilterValue.d.ts +7 -0
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +11 -1
- package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
- package/dist/PowerSearch/formatTokenValue.js +160 -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/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +33 -6
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +8 -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.map +1 -1
- package/dist/Resizable/ResizeHandle.js +118 -260
- package/dist/Resizable/resizeGesture.d.ts +91 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -0
- package/dist/Resizable/resizeGesture.js +251 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +3 -1
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +115 -8
- package/dist/SegmentedControl/SegmentedControlContext.d.ts +6 -0
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -0
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +10 -2
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts +357 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +1349 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +70 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +264 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +96 -67
- package/dist/Selector/optionShape.d.ts +24 -0
- package/dist/Selector/optionShape.d.ts.map +1 -0
- package/dist/Selector/optionShape.js +48 -0
- package/dist/Selector/selectableOptionEntries.d.ts +20 -0
- package/dist/Selector/selectableOptionEntries.d.ts.map +1 -0
- package/dist/Selector/selectableOptionEntries.js +38 -0
- package/dist/Selector/utils.d.ts +2 -17
- package/dist/Selector/utils.d.ts.map +1 -1
- package/dist/Selector/utils.js +3 -51
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -9
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +200 -46
- package/dist/Switch/switchFill.d.ts +31 -0
- package/dist/Switch/switchFill.d.ts.map +1 -0
- package/dist/Switch/switchFill.js +88 -0
- package/dist/Switch/switchTouch.d.ts +74 -0
- package/dist/Switch/switchTouch.d.ts.map +1 -0
- package/dist/Switch/switchTouch.js +125 -0
- package/dist/Switch/useSwitchTouch.d.ts +276 -0
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -0
- package/dist/Switch/useSwitchTouch.js +939 -0
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +4 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +29 -8
- 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/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +5 -0
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +13 -4
- package/dist/Token/TokenNamingContext.d.ts +14 -0
- package/dist/Token/TokenNamingContext.d.ts.map +1 -0
- package/dist/Token/TokenNamingContext.js +23 -0
- package/dist/Tokenizer/Tokenizer.d.ts +46 -59
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +44 -60
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +25 -28
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +157 -54
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +3 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.js +19 -0
- package/dist/Tooltip/Tooltip.d.ts +24 -5
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +29 -5
- package/dist/Tooltip/useTooltip.d.ts +48 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +90 -20
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +4 -7
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +4 -7
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +4 -7
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +26 -15
- 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 +142 -7
- package/dist/gestures/GestureHost.d.ts +27 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +161 -22
- package/dist/gestures/PressTracker.d.ts +6 -0
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +3 -0
- package/dist/gestures/types.d.ts +6 -0
- package/dist/gestures/types.d.ts.map +1 -1
- package/dist/gestures/usePressTracker.d.ts.map +1 -1
- package/dist/gestures/usePressTracker.js +1 -0
- package/dist/gestures/wheelSegmenter.d.ts +14 -3
- package/dist/gestures/wheelSegmenter.d.ts.map +1 -1
- package/dist/gestures/wheelSegmenter.js +32 -8
- package/dist/hooks/actionGroupTracker.d.ts +7 -4
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +19 -56
- 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/pressGroupContext.d.ts +6 -0
- package/dist/hooks/pressGroupContext.d.ts.map +1 -0
- package/dist/hooks/pressGroupContext.js +20 -0
- 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/useAttachment.d.ts +16 -8
- package/dist/hooks/useAttachment.d.ts.map +1 -1
- package/dist/hooks/useAttachment.js +35 -15
- package/dist/hooks/useFocusTrap.d.ts +15 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +13 -2
- package/dist/hooks/useHighlightedOptionScroll.d.ts +11 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
- package/dist/hooks/useHighlightedOptionScroll.js +112 -11
- 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/useMediaQuery.d.ts +2 -1
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +7 -4
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +4 -2
- package/dist/hooks/usePager.d.ts +261 -0
- package/dist/hooks/usePager.d.ts.map +1 -0
- package/dist/hooks/usePager.js +1169 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts +8 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.js +12 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +1 -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-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +7 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +33 -1
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +33 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/internal/SheetConfirmation.d.ts +11 -0
- package/dist/internal/SheetConfirmation.d.ts.map +1 -0
- package/dist/internal/SheetConfirmation.js +92 -0
- package/dist/internal/sheetDraft.d.ts +35 -0
- package/dist/internal/sheetDraft.d.ts.map +1 -0
- package/dist/internal/sheetDraft.js +65 -0
- package/dist/internal/touch-sheet.d.ts +21 -0
- package/dist/internal/touch-sheet.d.ts.map +1 -0
- package/dist/internal/touch-sheet.js +19 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts +24 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +1 -0
- package/dist/internal/useDismissSearchOnTouchDrag.js +56 -0
- package/dist/motion/animator.d.ts +14 -14
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +41 -18
- package/dist/motion/paging.d.ts +16 -5
- package/dist/motion/paging.d.ts.map +1 -1
- package/dist/motion/paging.js +34 -14
- package/dist/motion/reducedMotion.d.ts +24 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -1
- package/dist/motion/reducedMotion.js +78 -1
- package/dist/motion/roles.d.ts +7 -1
- package/dist/motion/roles.d.ts.map +1 -1
- package/dist/motion/roles.js +20 -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 +7 -4
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +7 -4
- package/dist/motion/uikit/paging.d.ts +31 -20
- package/dist/motion/uikit/paging.d.ts.map +1 -1
- package/dist/motion/uikit/paging.js +41 -11
- package/dist/motion/uikit/progressBar.d.ts +27 -7
- package/dist/motion/uikit/progressBar.d.ts.map +1 -1
- package/dist/motion/uikit/progressBar.js +31 -11
- package/dist/motion/uikit/segmented.d.ts +55 -0
- package/dist/motion/uikit/segmented.d.ts.map +1 -0
- package/dist/motion/uikit/segmented.js +77 -0
- package/dist/motion/uikit/springs.d.ts +8 -42
- package/dist/motion/uikit/springs.d.ts.map +1 -1
- package/dist/motion/uikit/springs.js +12 -42
- package/dist/motion/uikit/switch.d.ts +166 -0
- package/dist/motion/uikit/switch.d.ts.map +1 -0
- package/dist/motion/uikit/switch.js +186 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +15 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressGroupItem.stylex.js +23 -0
- package/dist/privateAttributes/pressHoldsDrag.stylex.d.ts +18 -0
- package/dist/privateAttributes/pressHoldsDrag.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressHoldsDrag.stylex.js +28 -0
- package/dist/privateAttributes/segmentTitle.stylex.d.ts +5 -0
- package/dist/privateAttributes/segmentTitle.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/segmentTitle.stylex.js +22 -0
- package/dist/utils/browserClickWait.d.ts +35 -0
- package/dist/utils/browserClickWait.d.ts.map +1 -0
- package/dist/utils/browserClickWait.js +123 -0
- package/dist/utils/clickGuard.d.ts +14 -1
- package/dist/utils/clickGuard.d.ts.map +1 -1
- package/dist/utils/clickGuard.js +46 -1
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +12 -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/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +24 -6
- package/locales/en.json +128 -0
- package/locales/pseudo.json +96 -0
- package/package.json +13 -8
- package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
- package/src/AlertDialog/AlertDialog.tsx +37 -5
- package/src/AppShell/useCloseMobileDrawerOnActivate.ts +52 -0
- package/src/Avatar/Avatar.tsx +3 -1
- package/src/BottomSheet/BottomSheet.tsx +95 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +40 -5
- package/src/BottomSheet/bottomSheetStack.ts +8 -4
- package/src/BottomSheet/useSheetGestures.ts +3 -1
- package/src/Breadcrumbs/BreadcrumbItem.tsx +17 -4
- package/src/Button/Button.tsx +66 -7
- package/src/CheckboxList/CheckboxList.doc.mjs +4 -2
- package/src/CheckboxList/CheckboxList.tsx +6 -0
- package/src/CheckboxList/CheckboxListContext.tsx +6 -0
- package/src/CheckboxList/CheckboxListItem.tsx +11 -2
- package/src/ComplexSelector/ComplexSelector.tsx +20 -5
- package/src/DateInput/DateInput.tsx +8 -2
- package/src/DateInput/MonthScroller.tsx +18 -22
- package/src/DateInput/Wheel.tsx +172 -14
- package/src/DateRangeInput/DateRangeInput.doc.mjs +3 -2
- package/src/DateRangeInput/DateRangeInput.tsx +117 -71
- package/src/DateTimeInput/DateTimeInput.tsx +8 -2
- package/src/Dialog/Dialog.tsx +81 -15
- package/src/Drawer/Drawer.tsx +28 -11
- package/src/Drawer/useDrawerDialogPresence.ts +9 -1
- package/src/DropdownMenu/DropdownMenu.tsx +28 -6
- package/src/Field/Field.tsx +2 -2
- package/src/Field/PanelSearchInput.tsx +11 -0
- package/src/HoverCard/HoverCard.tsx +31 -1
- package/src/Icon/Icon.doc.mjs +49 -8
- package/src/Icon/Icon.tsx +15 -7
- package/src/InfoTip/InfoTip.doc.mjs +192 -0
- package/src/InfoTip/InfoTip.tsx +186 -0
- package/src/InfoTip/index.ts +14 -0
- package/src/Layer/layerAnimations.stylex.ts +24 -16
- package/src/Layer/layerClickBoundary.ts +2 -2
- package/src/Layer/useBackdropPress.ts +81 -0
- package/src/Layer/usePressPin.ts +576 -0
- package/src/Layer/useTouchTrigger.ts +56 -6
- package/src/Lightbox/Lightbox.tsx +2 -1
- package/src/MobileNav/MobileNav.tsx +1 -1
- package/src/MultiSelector/hooks.ts +2 -4
- package/src/Outline/Outline.doc.mjs +177 -51
- package/src/Outline/Outline.tsx +5 -57
- package/src/Outline/useOutlineFromMarkdown.doc.mjs +157 -0
- package/src/Outline/useOutlineFromMarkdown.ts +1 -0
- package/src/Outline/useScrollSpy.ts +3 -3
- package/src/Popover/usePopover.tsx +71 -9
- package/src/PowerSearch/PowerSearch.doc.mjs +55 -6
- package/src/PowerSearch/PowerSearch.tsx +798 -324
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2515 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +28 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +203 -38
- package/src/PowerSearch/formatFilterValue.ts +18 -1
- package/src/PowerSearch/formatTokenValue.ts +215 -0
- package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
- package/src/ProgressBar/ProgressBar.doc.mjs +4 -2
- package/src/ProgressBar/ProgressBar.tsx +67 -7
- package/src/RadioList/RadioList.doc.mjs +4 -2
- package/src/RadioList/RadioList.tsx +7 -2
- package/src/RadioList/RadioListItem.tsx +5 -3
- package/src/Resizable/ResizeHandle.tsx +133 -328
- package/src/Resizable/resizeGesture.ts +368 -0
- package/src/SegmentedControl/SegmentedControl.doc.mjs +3 -3
- package/src/SegmentedControl/SegmentedControl.tsx +179 -5
- package/src/SegmentedControl/SegmentedControlContext.ts +6 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +14 -2
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +1640 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +308 -0
- package/src/Selector/Selector.tsx +136 -89
- package/src/Selector/optionShape.ts +64 -0
- package/src/Selector/selectableOptionEntries.ts +39 -0
- package/src/Selector/utils.ts +9 -68
- package/src/SideNav/SideNavItem.tsx +3 -7
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Switch/Switch.doc.mjs +3 -3
- package/src/Switch/Switch.tsx +412 -86
- package/src/Switch/switchFill.ts +106 -0
- package/src/Switch/switchTouch.ts +186 -0
- package/src/Switch/useSwitchTouch.ts +1051 -0
- package/src/TabList/Tab.tsx +5 -3
- package/src/Table/BaseTable.tsx +46 -12
- package/src/TextInput/TextInput.tsx +11 -10
- package/src/Toast/Toast.tsx +5 -0
- package/src/Token/Token.tsx +15 -4
- package/src/Token/TokenNamingContext.ts +28 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
- package/src/Tokenizer/Tokenizer.tsx +93 -88
- package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
- package/src/Tokenizer/TokenizerItemRemovableContext.ts +24 -0
- package/src/Tooltip/Tooltip.doc.mjs +123 -39
- package/src/Tooltip/Tooltip.tsx +43 -9
- package/src/Tooltip/useTooltip.doc.mjs +171 -31
- package/src/Tooltip/useTooltip.tsx +137 -22
- package/src/TopNav/TopNavItem.tsx +6 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +6 -5
- package/src/TopNav/TopNavMenu.tsx +6 -5
- package/src/Typeahead/Typeahead.tsx +29 -15
- package/src/animator/createAnimator.doc.mjs +153 -0
- package/src/animator/createAnimator.ts +324 -0
- package/src/gestures/GestureHost.ts +205 -21
- package/src/gestures/PressTracker.ts +10 -0
- package/src/gestures/types.ts +6 -0
- package/src/gestures/usePressTracker.ts +2 -0
- package/src/gestures/wheelSegmenter.ts +36 -7
- package/src/hooks/actionGroupTracker.ts +32 -61
- package/src/hooks/index.ts +2 -0
- package/src/hooks/pressGroupContext.ts +21 -0
- 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/useAttachment.ts +56 -14
- package/src/hooks/useFocusTrap.ts +26 -2
- package/src/hooks/useHighlightedOptionScroll.ts +123 -15
- package/src/hooks/useInputStatusIcon.tsx +3 -2
- package/src/hooks/useMediaQuery.doc.mjs +2 -2
- package/src/hooks/useMediaQuery.ts +13 -4
- package/src/hooks/useMenuPress.ts +8 -2
- package/src/hooks/usePager.ts +1446 -0
- package/src/i18n/generated-english/InfoTip/InfoTip.generated.ts +13 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +1 -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-english/Tokenizer/TokenizerBottomSheet.generated.ts +7 -1
- package/src/i18n/generated-locales/en.generated.ts +43 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +44 -0
- package/src/index.ts +14 -0
- package/src/internal/SheetConfirmation.tsx +101 -0
- package/src/internal/sheetDraft.ts +80 -0
- package/src/internal/touch-sheet.ts +21 -0
- package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
- package/src/motion/MEASUREMENTS.md +36 -27
- package/src/motion/README.md +11 -6
- package/src/motion/animator.ts +61 -29
- package/src/motion/paging.ts +37 -14
- package/src/motion/reducedMotion.ts +79 -1
- package/src/motion/roles.ts +20 -1
- package/src/motion/uikit/alert.ts +43 -0
- package/src/motion/uikit/index.ts +6 -5
- package/src/motion/uikit/paging.ts +41 -10
- package/src/motion/uikit/progressBar.ts +31 -11
- package/src/motion/uikit/segmented.ts +74 -0
- package/src/motion/uikit/springs.ts +12 -42
- package/src/motion/uikit/switch.ts +174 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +23 -0
- package/src/privateAttributes/pressHoldsDrag.stylex.ts +28 -0
- package/src/privateAttributes/segmentTitle.stylex.ts +22 -0
- package/src/utils/browserClickWait.ts +133 -0
- package/src/utils/clickGuard.ts +64 -1
- package/src/utils/dateParser.ts +16 -0
- package/src/utils/interactionOverlay.stylex.ts +3 -2
- package/src/utils/pressFeedback.ts +24 -6
- package/dist/internal/tokenizer-presentation.d.ts +0 -21
- package/dist/internal/tokenizer-presentation.d.ts.map +0 -1
- package/dist/internal/tokenizer-presentation.js +0 -21
- package/src/internal/tokenizer-presentation.ts +0 -25
|
@@ -6,16 +6,10 @@
|
|
|
6
6
|
* @file Tokenizer.tsx
|
|
7
7
|
* @input Uses React, BaseTypeahead, Field, Token, useAnnounce,
|
|
8
8
|
* useAdaptivePresentation, and TokenizerBottomSheet (lazy)
|
|
9
|
-
* @output Exports Tokenizer multi-select typeahead component
|
|
10
|
-
* internal TokenizerWithPresentation signature the `internal/tokenizer-presentation`
|
|
11
|
-
* entry re-exports
|
|
9
|
+
* @output Exports Tokenizer multi-select typeahead component
|
|
12
10
|
* @position Composed component; forwards DOM ref and exposes focus control via
|
|
13
|
-
* handleRef. The
|
|
14
|
-
*
|
|
15
|
-
* offers no `experimental.presentation` while its user experience is being
|
|
16
|
-
* finished (`component:Tokenizer` DEC-3, implementation gap), and only
|
|
17
|
-
* Astryx's own packages reach it through the internal entry
|
|
18
|
-
* (`architecture:react-component-runtime` INV13).
|
|
11
|
+
* handleRef. The experimental `presentation` option swaps the inline
|
|
12
|
+
* combobox for a trigger that opens TokenizerBottomSheet.
|
|
19
13
|
*
|
|
20
14
|
* SYNC: When modified, update:
|
|
21
15
|
* - /packages/core/src/Tokenizer/index.ts
|
|
@@ -32,6 +26,7 @@ import { useFieldInputStyling } from "../Field/fieldParts.js";
|
|
|
32
26
|
import { inputDisabledFocusStyles } from "../Field/inputDisabledFocus.js";
|
|
33
27
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
34
28
|
import { TokenizerClearAllMessageContext } from "./TokenizerClearAllMessageContext.js";
|
|
29
|
+
import { TokenizerItemRemovableContext } from "./TokenizerItemRemovableContext.js";
|
|
35
30
|
import { useBusyAnnouncement } from "../hooks/useBusyAnnouncement.js";
|
|
36
31
|
import { useAdaptivePresentation } from "../hooks/useAdaptivePresentation.js";
|
|
37
32
|
import { useIsHydrating } from "../hooks/useIsHydrating.js";
|
|
@@ -57,6 +52,7 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
57
52
|
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
58
53
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
59
54
|
import english from "../i18n/generated-english/Tokenizer/Tokenizer.generated.js";
|
|
55
|
+
import { isRenderable } from "../utils/isRenderable.js";
|
|
60
56
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
61
57
|
registerEnglishFallback(english);
|
|
62
58
|
|
|
@@ -82,20 +78,12 @@ registerEnglishFallback(english);
|
|
|
82
78
|
*/
|
|
83
79
|
|
|
84
80
|
/**
|
|
85
|
-
* The
|
|
86
|
-
* `
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The props of the sheet-capable signature: `TokenizerProps` plus the
|
|
93
|
-
* presentation options and a `ref` that also accepts the sheet presentation's
|
|
94
|
-
* trigger button, the control it stands for there. Not public: reached only
|
|
95
|
-
* as `TokenizerWithPresentation` through the internal entry, so the released
|
|
96
|
-
* `TokenizerProps` — an interface, so `interface X extends TokenizerProps<T>`,
|
|
97
|
-
* `Omit<TokenizerProps<T>, …>` and `ComponentProps<typeof Tokenizer>` keep
|
|
98
|
-
* their released shapes — names no presentation.
|
|
81
|
+
* The props the experimental opt-in admits. `experimental` is present, and
|
|
82
|
+
* `ref` also accepts the sheet presentation's trigger button, the control it
|
|
83
|
+
* stands for there. Only the overload below reaches this type. `TokenizerProps`
|
|
84
|
+
* stays the component's declared props type: it is an interface, so
|
|
85
|
+
* `interface X extends TokenizerProps<T>`, `Omit<TokenizerProps<T>, …>` and
|
|
86
|
+
* `ComponentProps<typeof Tokenizer>` keep their released shapes.
|
|
99
87
|
*/
|
|
100
88
|
|
|
101
89
|
// =============================================================================
|
|
@@ -392,10 +380,10 @@ function EndLane({
|
|
|
392
380
|
});
|
|
393
381
|
}
|
|
394
382
|
|
|
395
|
-
//
|
|
396
|
-
// Tokenizer>`
|
|
397
|
-
//
|
|
398
|
-
// `
|
|
383
|
+
// Keep this overload first. TypeScript resolves `ComponentProps<typeof
|
|
384
|
+
// Tokenizer>` against the last overload, so that type stays the stable props.
|
|
385
|
+
// A call that passes `experimental` matches this one and may pass the wider
|
|
386
|
+
// `ref`.
|
|
399
387
|
|
|
400
388
|
export function Tokenizer({
|
|
401
389
|
label,
|
|
@@ -512,6 +500,14 @@ export function Tokenizer({
|
|
|
512
500
|
sheetQueryRef.current = query;
|
|
513
501
|
onChangeQuery?.(query);
|
|
514
502
|
}, [onChangeQuery]);
|
|
503
|
+
// Save's one report. The sheet announced each edit as it happened, so
|
|
504
|
+
// nothing is announced here; a field that is disabled at Save reports
|
|
505
|
+
// nothing.
|
|
506
|
+
const handleSheetCommit = useCallback((items, change) => {
|
|
507
|
+
if (!isDisabled) {
|
|
508
|
+
onChange(items, change);
|
|
509
|
+
}
|
|
510
|
+
}, [isDisabled, onChange]);
|
|
515
511
|
// Set around a focus move the field makes itself — a presentation swap
|
|
516
512
|
// handing focus from one control to the other — so the receiving control
|
|
517
513
|
// does not report it as focus entering from outside.
|
|
@@ -644,11 +640,15 @@ export function Tokenizer({
|
|
|
644
640
|
// `endContent`, a clear button, or all three — so its width is measured
|
|
645
641
|
// rather than assumed, and the input reserves it.
|
|
646
642
|
const [laneRef, laneReserve] = useEndLaneReserve(END_LANE_INSET);
|
|
643
|
+
// A composing component can lock tokens (PowerSearch's read-only filters
|
|
644
|
+
// and read-only field). No remove path removes a locked token.
|
|
645
|
+
const isItemRemovable = use(TokenizerItemRemovableContext);
|
|
646
|
+
const canRemoveItem = useCallback(item => isItemRemovable?.(item) ?? true, [isItemRemovable]);
|
|
647
647
|
// The half of the lane's contents this component knows about. The busy half
|
|
648
648
|
// is the leaf's own business — folding it in here would mean reading the
|
|
649
649
|
// busy state during this render, which is exactly the re-render the store
|
|
650
650
|
// exists to avoid.
|
|
651
|
-
const hasClearButton = hasClear &&
|
|
651
|
+
const hasClearButton = hasClear && !isDisabled && value.some(canRemoveItem);
|
|
652
652
|
const hasStaticEndLane = Boolean(endContent || hasClearButton);
|
|
653
653
|
const [isFocusedWithin, setIsFocusedWithin] = useState(false);
|
|
654
654
|
const isTruncated = !isFocusedWithin && tokenOverflowBehavior !== 'none' && value.length > 0;
|
|
@@ -851,7 +851,7 @@ export function Tokenizer({
|
|
|
851
851
|
// input and the per-token remove buttons route through here, so the
|
|
852
852
|
// announcement covers both.
|
|
853
853
|
const handleRemove = useCallback((item, options) => {
|
|
854
|
-
if (isDisabled) {
|
|
854
|
+
if (isDisabled || !canRemoveItem(item)) {
|
|
855
855
|
return false;
|
|
856
856
|
}
|
|
857
857
|
const newItems = value.filter(v => v.id !== item.id);
|
|
@@ -866,20 +866,20 @@ export function Tokenizer({
|
|
|
866
866
|
}
|
|
867
867
|
inputRef.current?.focus();
|
|
868
868
|
return true;
|
|
869
|
-
}, [value, onChange, isDisabled, announce, t]);
|
|
869
|
+
}, [value, onChange, isDisabled, canRemoveItem, announce, t]);
|
|
870
870
|
|
|
871
|
-
// Handle clearing all items
|
|
872
871
|
// A composing component that words its own Clear all (PowerSearch) provides
|
|
873
872
|
// its words; otherwise the field's own (component:Tokenizer AR7).
|
|
874
873
|
const clearAllMessage = use(TokenizerClearAllMessageContext) ?? t('@astryx.tokenizer.allRemoved');
|
|
875
874
|
const handleClearAll = useCallback(options => {
|
|
876
|
-
|
|
875
|
+
const removedItems = value.filter(canRemoveItem);
|
|
876
|
+
if (isDisabled || removedItems.length === 0) {
|
|
877
877
|
return;
|
|
878
878
|
}
|
|
879
|
-
//
|
|
880
|
-
const
|
|
881
|
-
onChange(
|
|
882
|
-
item:
|
|
879
|
+
// onChange names one item. Clear all names the last one it removes.
|
|
880
|
+
const lastRemovedItem = removedItems[removedItems.length - 1];
|
|
881
|
+
onChange(value.filter(item => !canRemoveItem(item)), {
|
|
882
|
+
item: lastRemovedItem,
|
|
883
883
|
type: 'remove'
|
|
884
884
|
});
|
|
885
885
|
// Focus moves to the input, so the emptied selection is announced, in
|
|
@@ -888,7 +888,7 @@ export function Tokenizer({
|
|
|
888
888
|
announce(clearAllMessage);
|
|
889
889
|
}
|
|
890
890
|
inputRef.current?.focus();
|
|
891
|
-
}, [value, onChange, isDisabled, announce, clearAllMessage]);
|
|
891
|
+
}, [value, onChange, isDisabled, canRemoveItem, announce, clearAllMessage]);
|
|
892
892
|
|
|
893
893
|
// Handle backspace on empty input — remove last token
|
|
894
894
|
const handleKeyDown = useCallback(e => {
|
|
@@ -931,7 +931,7 @@ export function Tokenizer({
|
|
|
931
931
|
return /*#__PURE__*/_jsx(Token, {
|
|
932
932
|
label: item.label,
|
|
933
933
|
size: size,
|
|
934
|
-
onRemove: isDisabled ? undefined : onRemoveItem,
|
|
934
|
+
onRemove: isDisabled || !canRemoveItem(item) ? undefined : onRemoveItem,
|
|
935
935
|
isDisabled: isDisabled,
|
|
936
936
|
xstyle: styles.token
|
|
937
937
|
}, item.id);
|
|
@@ -966,7 +966,7 @@ export function Tokenizer({
|
|
|
966
966
|
status: status?.type,
|
|
967
967
|
disabled: isDisabled ? 'disabled' : null
|
|
968
968
|
}), stylex.props(inputWrapperStyles.base, styles.wrapper, value.length > 0 && styles.wrapperWithTokens, isTruncated ? truncatedSizeStyles[size] : sizeStyle, isTruncated && styles.truncatedWrapper, isDisabled && inputWrapperStyles.disabled, isDisabled && inputDisabledFocusStyles.nestedRing, status && inputStatusBorderStyles[status.type], status && !isDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], controlXstyle), controlClassName, controlStyle),
|
|
969
|
-
children: [startIcon && /*#__PURE__*/_jsx("span", {
|
|
969
|
+
children: [isRenderable(startIcon) && /*#__PURE__*/_jsx("span", {
|
|
970
970
|
...{
|
|
971
971
|
0: {},
|
|
972
972
|
1: {
|
|
@@ -1151,7 +1151,7 @@ export function Tokenizer({
|
|
|
1151
1151
|
// as Selector's bottom-sheet trigger does; the sheet's own rows
|
|
1152
1152
|
// and search field carry the touch-sized targets.
|
|
1153
1153
|
sizeStyles[size], value.length > 0 && styles.wrapperWithTokens, isDisabled && inputWrapperStyles.disabled, isDisabled && styles.sheetTriggerDisabled, status && inputStatusBorderStyles[status.type], status && !isDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], controlXstyle), controlClassName, controlStyle),
|
|
1154
|
-
children: [startIcon && /*#__PURE__*/_jsx("span", {
|
|
1154
|
+
children: [isRenderable(startIcon) && /*#__PURE__*/_jsx("span", {
|
|
1155
1155
|
...{
|
|
1156
1156
|
0: {},
|
|
1157
1157
|
1: {
|
|
@@ -1196,17 +1196,13 @@ export function Tokenizer({
|
|
|
1196
1196
|
label: label,
|
|
1197
1197
|
searchSource: searchSource,
|
|
1198
1198
|
value: value,
|
|
1199
|
-
|
|
1199
|
+
maxEntries: maxEntries,
|
|
1200
1200
|
hasCreate: hasCreate,
|
|
1201
1201
|
maxMenuItems: maxMenuItems ?? 10,
|
|
1202
1202
|
minQueryLength: minQueryLength ?? 1,
|
|
1203
1203
|
debounceMs: debounceMs ?? 150,
|
|
1204
1204
|
emptySearchText: emptySearchText,
|
|
1205
|
-
|
|
1206
|
-
onRemove: handleRemove,
|
|
1207
|
-
onClearAll: () => handleClearAll({
|
|
1208
|
-
silent: true
|
|
1209
|
-
}),
|
|
1205
|
+
onCommit: handleSheetCommit,
|
|
1210
1206
|
onChangeQuery: handleSheetQueryChange
|
|
1211
1207
|
})]
|
|
1212
1208
|
});
|
|
@@ -1222,7 +1218,7 @@ export function Tokenizer({
|
|
|
1222
1218
|
disabled: isDisabled ? 'disabled' : null
|
|
1223
1219
|
}), stylex.props(inputWrapperStyles.base, styles.wrapper, value.length > 0 && styles.wrapperWithTokens, placeholderSizeStyle, isTruncated && styles.truncatedWrapper, isDisabled && inputWrapperStyles.disabled, status && inputStatusBorderStyles[status.type], status && !isDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], controlXstyle), controlClassName, controlStyle),
|
|
1224
1220
|
children: isTruncated && /*#__PURE__*/_jsxs(_Fragment, {
|
|
1225
|
-
children: [startIcon && renderIconSlot(startIcon, {
|
|
1221
|
+
children: [isRenderable(startIcon) && renderIconSlot(startIcon, {
|
|
1226
1222
|
size: 'sm',
|
|
1227
1223
|
color: 'secondary'
|
|
1228
1224
|
}), /*#__PURE__*/_jsx(OverflowList, {
|
|
@@ -1273,16 +1269,4 @@ export function Tokenizer({
|
|
|
1273
1269
|
children: [tokenizerContent, showsDisabledMessage && disabledMessageTooltip.renderTooltip(disabledMessage)]
|
|
1274
1270
|
});
|
|
1275
1271
|
}
|
|
1276
|
-
Tokenizer.displayName = 'Tokenizer';
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* The same component with the sheet presentation reachable: `experimental`
|
|
1280
|
-
* (`presentation: 'popover' | 'bottom-sheet' | 'adaptive'`) and a `ref` that
|
|
1281
|
-
* also takes the trigger button. Not public — re-exported only by
|
|
1282
|
-
* `@astryxdesign/core/internal/tokenizer-presentation`, the entry reserved
|
|
1283
|
-
* for Astryx's own packages (`architecture:react-component-runtime` INV13),
|
|
1284
|
-
* while the sheet's user experience is being finished (`component:Tokenizer`
|
|
1285
|
-
* DEC-3). The public `Tokenizer` renders the popover presentation for every
|
|
1286
|
-
* field.
|
|
1287
|
-
*/
|
|
1288
|
-
export const TokenizerWithPresentation = Tokenizer;
|
|
1272
|
+
Tokenizer.displayName = 'Tokenizer';
|
|
@@ -22,13 +22,17 @@
|
|
|
22
22
|
* - /docs/specs/components/Tokenizer/Tokenizer.spec.md (FR16–FR24, AR6, PR6)
|
|
23
23
|
*/
|
|
24
24
|
import { type ReactNode, type RefObject } from 'react';
|
|
25
|
+
import { type SheetDraftChange } from '../internal/sheetDraft.js';
|
|
25
26
|
import type { SearchableItem, SearchSource } from '../Typeahead/types.js';
|
|
26
27
|
/** Rows rendered per batch while a long list scrolls (`component:Tokenizer` FR21). */
|
|
27
28
|
export declare const LIST_RENDER_BATCH_SIZE = 50;
|
|
28
29
|
export interface TokenizerBottomSheetProps<T extends SearchableItem> {
|
|
29
30
|
/** Whether the sheet is open. */
|
|
30
31
|
isOpen: boolean;
|
|
31
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Called with `false` when the sheet closes: Save, a clean dismissal, or a
|
|
34
|
+
* confirmed discard.
|
|
35
|
+
*/
|
|
32
36
|
onOpenChange: (isOpen: boolean) => void;
|
|
33
37
|
/** The trigger, which takes focus back after the sheet closes. */
|
|
34
38
|
finalFocusRef: RefObject<HTMLElement | null>;
|
|
@@ -44,10 +48,10 @@ export interface TokenizerBottomSheetProps<T extends SearchableItem> {
|
|
|
44
48
|
/** The field label; names the sheet, the search field, and the list. */
|
|
45
49
|
label: string;
|
|
46
50
|
searchSource: SearchSource<T>;
|
|
47
|
-
/** The committed selection. */
|
|
51
|
+
/** The committed selection; the draft the sheet edits starts from it. */
|
|
48
52
|
value: T[];
|
|
49
|
-
/**
|
|
50
|
-
|
|
53
|
+
/** The selection limit, enforced on the draft. */
|
|
54
|
+
maxEntries: number | undefined;
|
|
51
55
|
hasCreate: boolean;
|
|
52
56
|
maxMenuItems: number;
|
|
53
57
|
minQueryLength: number;
|
|
@@ -55,41 +59,34 @@ export interface TokenizerBottomSheetProps<T extends SearchableItem> {
|
|
|
55
59
|
/** The no-results message; a string becomes the empty state's title. */
|
|
56
60
|
emptySearchText: ReactNode;
|
|
57
61
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* dialog, where `useAnnounce` routes it
|
|
61
|
-
* whether the item was added.
|
|
62
|
+
* Save's one report: the whole draft and the last edit that still holds.
|
|
63
|
+
* The sheet announces each edit itself when it happens, from inside its
|
|
64
|
+
* dialog, where `useAnnounce` routes it; nothing is announced on Save.
|
|
62
65
|
*/
|
|
63
|
-
|
|
64
|
-
silent: true;
|
|
65
|
-
}) => boolean;
|
|
66
|
-
/** Tokenizer's remove path, silent for the same reason. */
|
|
67
|
-
onRemove: (item: T, options: {
|
|
68
|
-
silent: true;
|
|
69
|
-
}) => boolean;
|
|
70
|
-
/** Tokenizer's clear-all path. */
|
|
71
|
-
onClearAll: () => void;
|
|
66
|
+
onCommit: (items: T[], change: SheetDraftChange<T>) => void;
|
|
72
67
|
onChangeQuery?: (query: string) => void;
|
|
73
68
|
}
|
|
74
69
|
/**
|
|
75
70
|
* The touch surface of Tokenizer's `bottom-sheet` presentation.
|
|
76
71
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*
|
|
72
|
+
* One open sheet edits one draft that starts as `value`; rows, the create row
|
|
73
|
+
* and Clear all change the draft, and Save reports it once. Rows keep their
|
|
74
|
+
* position while the sheet is open: the items selected when it opened lead,
|
|
75
|
+
* in `value` order, then draft-selected items the results do not carry, then
|
|
76
|
+
* the results; the next open takes a fresh snapshot and regroups
|
|
77
|
+
* selected-first.
|
|
78
|
+
*
|
|
79
|
+
* The sheet is BottomSheet around the content, split in two so the content —
|
|
84
80
|
* search, rows, footer, and every announcement about them — is rendered
|
|
85
81
|
* inside the sheet's dialog, where `useAnnounce` routes into it while it is
|
|
86
|
-
* open
|
|
87
|
-
*
|
|
82
|
+
* open: a component that renders a modal and announces about its content is
|
|
83
|
+
* inside that modal only when the announcing code is.
|
|
88
84
|
*
|
|
89
85
|
* The outer part also tells the content how a close came about: a close the
|
|
90
|
-
* person made (
|
|
86
|
+
* person made (Save, swipe, scrim, Escape) clears the query so the next open
|
|
91
87
|
* lists the bootstrap set, while a close the field forced (becoming disabled
|
|
92
|
-
* while open) keeps it
|
|
88
|
+
* while open) keeps it. A swipe, scrim or Escape close of a changed draft is
|
|
89
|
+
* routed to the content first, which asks before discarding.
|
|
93
90
|
*/
|
|
94
91
|
export declare function TokenizerBottomSheet<T extends SearchableItem>({ isOpen, onOpenChange, finalFocusRef, label, ...content }: TokenizerBottomSheetProps<T>): import("react").JSX.Element;
|
|
95
92
|
export declare namespace TokenizerBottomSheet {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenizerBottomSheet.d.ts","sourceRoot":"","sources":["../../src/Tokenizer/TokenizerBottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TokenizerBottomSheet.d.ts","sourceRoot":"","sources":["../../src/Tokenizer/TokenizerBottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAgBf,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAqBrE,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAyHzC,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,cAAc;IACjE,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,kEAAkE;IAClE,aAAa,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC7C;;;;;;;OAOG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,yEAAyE;IACzE,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,kDAAkD;IAClD,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,eAAe,EAAE,SAAS,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,cAAc,EAAE,EAC7D,MAAM,EACN,YAAY,EACZ,aAAa,EACb,KAAK,EACL,GAAG,OAAO,EACX,EAAE,yBAAyB,CAAC,CAAC,CAAC,+BAqC9B;yBA3Ce,oBAAoB"}
|