@astryxdesign/core 0.7.8 → 0.7.9-canary.07992bb
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/AppShell/observeMainOverflow.d.ts.map +1 -1
- package/dist/AppShell/observeMainOverflow.js +9 -6
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +5 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +40 -8
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +61 -21
- package/dist/Calendar/Calendar.d.ts +14 -2
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +63 -74
- package/dist/Calendar/getInitialFocusDate.d.ts +4 -1
- package/dist/Calendar/getInitialFocusDate.d.ts.map +1 -1
- package/dist/Calendar/getInitialFocusDate.js +7 -5
- package/dist/Calendar/hooks/useCalendarDays.d.ts +19 -2
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +57 -64
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts +28 -3
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +33 -22
- package/dist/Calendar/styles.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +54 -11
- package/dist/ClickableCard/ClickableCard.d.ts +1 -1
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +5 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +4 -1
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +7 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +5 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +4 -1
- package/dist/Dialog/Dialog.d.ts +2 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +12 -1
- package/dist/Drawer/useDrawerDialogPresence.d.ts +2 -1
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +11 -2
- package/dist/DropdownMenu/DropdownMenu.d.ts +9 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +9 -4
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +3 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -4
- package/dist/Field/inputStyles.stylex.d.ts +1 -1
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +16 -2
- package/dist/HoverCard/useHoverCard.d.ts +3 -1
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/InfoTip/InfoTip.d.ts +1 -0
- package/dist/InfoTip/InfoTip.d.ts.map +1 -1
- package/dist/InfoTip/InfoTip.js +1 -0
- package/dist/InputGroup/InputGroup.d.ts +4 -3
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +2 -2
- package/dist/InputGroup/groupStyles.d.ts +1 -1
- package/dist/InputGroup/groupStyles.d.ts.map +1 -1
- package/dist/InputGroup/groupStyles.js +1 -1
- package/dist/Item/Item.d.ts +2 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +29 -6
- package/dist/Layer/holdEntranceInput.d.ts +24 -0
- package/dist/Layer/holdEntranceInput.d.ts.map +1 -0
- package/dist/Layer/holdEntranceInput.js +65 -0
- package/dist/Layer/inputHold.d.ts +49 -0
- package/dist/Layer/inputHold.d.ts.map +1 -0
- package/dist/Layer/inputHold.js +636 -0
- package/dist/Layer/preserveAnimations.d.ts +1 -5
- package/dist/Layer/preserveAnimations.d.ts.map +1 -1
- package/dist/Layer/preserveAnimations.js +12 -214
- package/dist/Layer/useLayer.d.ts +3 -1
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +64 -4
- package/dist/Layout/LayoutContent.d.ts +3 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +12 -4
- package/dist/Layout/LayoutPanel.d.ts +4 -1
- package/dist/Layout/LayoutPanel.d.ts.map +1 -1
- package/dist/Layout/LayoutPanel.js +13 -4
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +4 -0
- package/dist/MetadataList/MetadataList.js +1 -1
- package/dist/MobileNav/MobileNav.d.ts +11 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +39 -1
- package/dist/MoreMenu/MoreMenu.d.ts +5 -3
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.d.ts +4 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +244 -11
- package/dist/Popover/usePopover.d.ts +1 -0
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +12 -5
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchBottomSheet.js +4 -2
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -1
- package/dist/PowerSearch/formatFilterValue.d.ts +9 -3
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +14 -11
- package/dist/PowerSearch/formatTokenValue.d.ts +6 -2
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatTokenValue.js +6 -3
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +22 -4
- package/dist/SelectableCard/SelectableCard.d.ts +1 -1
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +5 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +14 -71
- package/dist/Spinner/index.d.ts +1 -1
- package/dist/Spinner/index.d.ts.map +1 -1
- package/dist/Spinner/spinnerRotor.d.ts +28 -0
- package/dist/Spinner/spinnerRotor.d.ts.map +1 -0
- package/dist/Spinner/spinnerRotor.js +98 -0
- package/dist/Stack/StackItem.d.ts +8 -4
- package/dist/Stack/StackItem.d.ts.map +1 -1
- package/dist/Stack/StackItem.js +17 -4
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +13 -10
- package/dist/Table/plugins/sortable/useTableSortable.js +1 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +14 -8
- package/dist/Timestamp/formatInstant.d.ts +10 -1
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +13 -27
- package/dist/Timestamp/tooltipEntries.d.ts +5 -3
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.js +6 -4
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +9 -0
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/TokenLink.d.ts.map +1 -1
- package/dist/Token/TokenLink.js +4 -1
- package/dist/Tokenizer/Tokenizer.d.ts +14 -10
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +189 -89
- package/dist/Tooltip/useTooltip.d.ts +3 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +162 -59
- package/dist/TreeList/TreeListItem.d.ts +2 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +27 -3
- package/dist/astryx.css +45 -18
- package/dist/gestures/GestureHost.d.ts +2 -2
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +21 -6
- package/dist/gestures/PanGestureRecognizer.d.ts +11 -1
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/PanGestureRecognizer.js +15 -1
- package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts +6 -1
- package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/nativeScroll.d.ts +3 -6
- package/dist/gestures/nativeScroll.d.ts.map +1 -1
- package/dist/gestures/nativeScroll.js +7 -52
- package/dist/gestures/wheelSegmenter.d.ts +68 -1
- package/dist/gestures/wheelSegmenter.d.ts.map +1 -1
- package/dist/gestures/wheelSegmenter.js +199 -10
- package/dist/hooks/StackItemScrollRegion.d.ts +31 -0
- package/dist/hooks/StackItemScrollRegion.d.ts.map +1 -0
- package/dist/hooks/StackItemScrollRegion.js +40 -0
- package/dist/hooks/menuPressGesture.d.ts +133 -21
- package/dist/hooks/menuPressGesture.d.ts.map +1 -1
- package/dist/hooks/menuPressGesture.js +155 -30
- package/dist/hooks/menuPressValues.d.ts +16 -0
- package/dist/hooks/menuPressValues.d.ts.map +1 -0
- package/dist/hooks/menuPressValues.js +18 -0
- package/dist/hooks/useClickableContainer.d.ts +27 -5
- package/dist/hooks/useClickableContainer.d.ts.map +1 -1
- package/dist/hooks/useClickableContainer.js +41 -5
- package/dist/hooks/useFocusTrap.d.ts +10 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +225 -132
- package/dist/hooks/useMenuPress.d.ts +34 -1
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +93 -5
- package/dist/hooks/usePressFeedback.d.ts +6 -6
- package/dist/hooks/usePressFeedback.js +6 -6
- package/dist/hooks/useScrollRegionProps.d.ts +35 -0
- package/dist/hooks/useScrollRegionProps.d.ts.map +1 -0
- package/dist/hooks/useScrollRegionProps.js +51 -0
- package/dist/i18n/InternationalizationContext.d.ts +6 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.d.ts +21 -3
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +8 -3
- package/dist/i18n/generated-english/hooks/useScrollRegionProps.generated.d.ts +8 -0
- package/dist/i18n/generated-english/hooks/useScrollRegionProps.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/hooks/useScrollRegionProps.generated.js +12 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +1 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/useCalendarSystem.d.ts +19 -0
- package/dist/i18n/useCalendarSystem.d.ts.map +1 -0
- package/dist/i18n/useCalendarSystem.js +61 -0
- package/dist/internal/spinner-rotor.d.ts +16 -0
- package/dist/internal/spinner-rotor.d.ts.map +1 -0
- package/dist/internal/spinner-rotor.js +16 -0
- package/dist/internal/touch.d.ts +14 -1
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +20 -2
- package/dist/motion/carryAnimations.d.ts +58 -0
- package/dist/motion/carryAnimations.d.ts.map +1 -0
- package/dist/motion/carryAnimations.js +305 -0
- package/dist/motion/transientCopy.d.ts +4 -2
- package/dist/motion/transientCopy.d.ts.map +1 -1
- package/dist/motion/transientCopy.js +34 -5
- package/dist/motion/uikit/gestures.d.ts +41 -0
- package/dist/motion/uikit/gestures.d.ts.map +1 -1
- package/dist/motion/uikit/gestures.js +25 -0
- package/dist/motion/uikit/index.d.ts +1 -1
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +1 -1
- package/dist/motion/uikit/timing.d.ts +14 -10
- package/dist/motion/uikit/timing.d.ts.map +1 -1
- package/dist/motion/uikit/timing.js +7 -5
- package/dist/privateAttributes/menuPressLit.stylex.d.ts +52 -0
- package/dist/privateAttributes/menuPressLit.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/menuPressLit.stylex.js +99 -0
- package/dist/privateAttributes/press.stylex.d.ts +139 -0
- package/dist/privateAttributes/press.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/press.stylex.js +97 -0
- package/dist/theme/themeMotion.d.ts +3 -2
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +3 -2
- package/dist/theme/tokens.stylex.d.ts +2 -2
- package/dist/theme/tokens.stylex.js +1 -1
- package/dist/utils/calendarSystem.d.ts +114 -0
- package/dist/utils/calendarSystem.d.ts.map +1 -0
- package/dist/utils/calendarSystem.js +386 -0
- package/dist/utils/flatTree.d.ts +6 -3
- package/dist/utils/flatTree.d.ts.map +1 -1
- package/dist/utils/flatTree.js +13 -3
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +82 -5
- package/dist/utils/inputStream.d.ts +14 -1
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +40 -9
- package/dist/utils/interactionOverlay.stylex.d.ts +5 -9
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +29 -31
- package/dist/utils/plainDate.d.ts +23 -7
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +57 -18
- package/dist/utils/pressFeedback.d.ts +10 -2
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +40 -15
- package/dist/utils/pressGesture.d.ts +12 -6
- package/dist/utils/pressGesture.d.ts.map +1 -1
- package/dist/utils/pressGesture.js +26 -8
- package/dist/utils/scrollView.d.ts +25 -0
- package/dist/utils/scrollView.d.ts.map +1 -0
- package/dist/utils/scrollView.js +108 -0
- package/dist/utils/selectionLock.d.ts.map +1 -1
- package/dist/utils/selectionLock.js +1 -10
- package/dist/utils/touchHitArea.stylex.d.ts +35 -0
- package/dist/utils/touchHitArea.stylex.d.ts.map +1 -0
- package/dist/utils/touchHitArea.stylex.js +32 -0
- package/dist/utils/triggerFocus.d.ts +5 -0
- package/dist/utils/triggerFocus.d.ts.map +1 -1
- package/dist/utils/triggerFocus.js +9 -2
- package/locales/en.json +4 -0
- package/locales/pseudo.json +3 -0
- package/package.json +10 -4
- package/src/AppShell/observeMainOverflow.ts +9 -6
- package/src/BottomSheet/BottomSheet.tsx +5 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +64 -7
- package/src/BottomSheet/useSheetGestures.ts +83 -20
- package/src/Calendar/Calendar.doc.mjs +76 -6
- package/src/Calendar/Calendar.tsx +123 -104
- package/src/Calendar/getInitialFocusDate.ts +22 -8
- package/src/Calendar/hooks/useCalendarDays.ts +89 -63
- package/src/Calendar/hooks/useCalendarNavigation.ts +68 -26
- package/src/CheckboxInput/CheckboxInput.doc.mjs +3 -2
- package/src/CheckboxInput/CheckboxInput.tsx +71 -9
- package/src/ClickableCard/ClickableCard.tsx +8 -1
- package/src/DateInput/DateInput.tsx +2 -0
- package/src/DateInput/PickerWheel.tsx +7 -2
- package/src/DateRangeInput/DateRangeInput.tsx +3 -1
- package/src/DateTimeInput/DateTimeInput.tsx +2 -0
- package/src/Dialog/Dialog.doc.mjs +1 -1
- package/src/Dialog/Dialog.tsx +12 -1
- package/src/Drawer/Drawer.doc.mjs +1 -1
- package/src/Drawer/useDrawerDialogPresence.ts +9 -2
- package/src/DropdownMenu/DropdownMenu.doc.mjs +1 -2
- package/src/DropdownMenu/DropdownMenu.tsx +29 -5
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +5 -1
- package/src/DropdownMenu/DropdownMenuItem.tsx +8 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +5 -1
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +5 -1
- package/src/FileInput/FileInput.tsx +16 -2
- package/src/HoverCard/useHoverCard.tsx +3 -1
- package/src/InfoTip/InfoTip.doc.mjs +26 -2
- package/src/InfoTip/InfoTip.tsx +1 -0
- package/src/InputGroup/InputGroup.doc.mjs +4 -3
- package/src/InputGroup/InputGroup.tsx +4 -3
- package/src/InputGroup/groupStyles.ts +3 -1
- package/src/Item/Item.tsx +51 -9
- package/src/Layer/holdEntranceInput.ts +84 -0
- package/src/Layer/inputHold.ts +734 -0
- package/src/Layer/preserveAnimations.ts +12 -275
- package/src/Layer/useLayer.tsx +77 -4
- package/src/Layout/LayoutContent.doc.mjs +6 -3
- package/src/Layout/LayoutContent.tsx +10 -4
- package/src/Layout/LayoutPanel.doc.mjs +6 -3
- package/src/Layout/LayoutPanel.tsx +11 -4
- package/src/Lightbox/Lightbox.tsx +4 -0
- package/src/MetadataList/MetadataList.tsx +1 -1
- package/src/MobileNav/MobileNav.doc.mjs +3 -3
- package/src/MobileNav/MobileNav.tsx +39 -1
- package/src/MoreMenu/MoreMenu.doc.mjs +2 -4
- package/src/MoreMenu/MoreMenu.tsx +5 -3
- package/src/NumberInput/NumberInput.doc.mjs +1 -1
- package/src/NumberInput/NumberInput.tsx +259 -11
- package/src/Popover/usePopover.tsx +1 -0
- package/src/PowerSearch/PowerSearch.doc.mjs +3 -3
- package/src/PowerSearch/PowerSearch.tsx +20 -3
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +4 -1
- package/src/PowerSearch/PowerSearchToken.tsx +3 -0
- package/src/PowerSearch/formatFilterValue.ts +21 -11
- package/src/PowerSearch/formatTokenValue.ts +7 -1
- package/src/RadioList/RadioListItem.doc.mjs +3 -2
- package/src/RadioList/RadioListItem.tsx +25 -7
- package/src/SelectableCard/SelectableCard.tsx +8 -1
- package/src/Spinner/Spinner.tsx +7 -89
- package/src/Spinner/index.ts +1 -5
- package/src/Spinner/spinnerRotor.ts +113 -0
- package/src/Stack/Stack.doc.mjs +1 -1
- package/src/Stack/StackItem.tsx +27 -13
- package/src/Switch/Switch.tsx +7 -6
- package/src/Table/plugins/sortable/useTableSortable.tsx +1 -1
- package/src/Timestamp/Timestamp.doc.mjs +3 -3
- package/src/Timestamp/Timestamp.tsx +13 -8
- package/src/Timestamp/formatInstant.ts +49 -28
- package/src/Timestamp/tooltipEntries.ts +7 -3
- package/src/Token/Token.tsx +18 -1
- package/src/Token/TokenLink.tsx +7 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +3 -3
- package/src/Tokenizer/Tokenizer.tsx +252 -115
- package/src/Tooltip/useTooltip.tsx +178 -80
- package/src/TreeList/TreeListItem.tsx +36 -2
- package/src/gestures/GestureHost.ts +21 -5
- package/src/gestures/PanGestureRecognizer.ts +19 -2
- package/src/gestures/README.md +14 -5
- package/src/gestures/ScreenEdgePanGestureRecognizer.ts +6 -1
- package/src/gestures/nativeScroll.ts +12 -68
- package/src/gestures/wheelSegmenter.ts +243 -10
- package/src/hooks/StackItemScrollRegion.tsx +57 -0
- package/src/hooks/menuPressGesture.ts +244 -38
- package/src/hooks/menuPressValues.ts +18 -0
- package/src/hooks/useClickableContainer.doc.mjs +8 -2
- package/src/hooks/useClickableContainer.ts +72 -6
- package/src/hooks/useFocusTrap.ts +268 -151
- package/src/hooks/useMenuPress.ts +118 -11
- package/src/hooks/usePressFeedback.doc.mjs +3 -3
- package/src/hooks/usePressFeedback.ts +6 -6
- package/src/hooks/useScrollRegionProps.ts +76 -0
- package/src/i18n/InternationalizationContext.ts +6 -0
- package/src/i18n/InternationalizationProvider.doc.mjs +29 -1
- package/src/i18n/InternationalizationProvider.tsx +33 -3
- package/src/i18n/generated-english/hooks/useScrollRegionProps.generated.ts +13 -0
- package/src/i18n/generated-locales/en.generated.ts +1 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +1 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/useCalendarSystem.ts +95 -0
- package/src/internal/spinner-rotor.ts +20 -0
- package/src/internal/touch.ts +34 -1
- package/src/motion/MEASUREMENTS.md +11 -0
- package/src/motion/carryAnimations.ts +389 -0
- package/src/motion/transientCopy.ts +45 -5
- package/src/motion/uikit/gestures.ts +22 -0
- package/src/motion/uikit/index.ts +1 -0
- package/src/motion/uikit/timing.ts +7 -5
- package/src/privateAttributes/menuPressLit.stylex.ts +104 -0
- package/src/privateAttributes/press.stylex.ts +243 -0
- package/src/theme/themeMotion.ts +3 -2
- package/src/theme/tokens.stylex.ts +1 -1
- package/src/utils/calendarSystem.ts +548 -0
- package/src/utils/flatTree.ts +15 -3
- package/src/utils/hitArea.ts +107 -5
- package/src/utils/inputStream.ts +47 -10
- package/src/utils/interactionOverlay.stylex.ts +19 -22
- package/src/utils/plainDate.ts +84 -19
- package/src/utils/pressFeedback.ts +46 -14
- package/src/utils/pressGesture.ts +35 -9
- package/src/utils/scrollView.ts +135 -0
- package/src/utils/selectionLock.ts +5 -10
- package/src/utils/touchHitArea.stylex.ts +41 -0
- package/src/utils/triggerFocus.ts +17 -4
|
@@ -178,13 +178,21 @@ interface DropdownMenuDataProps extends DropdownMenuBaseProps {
|
|
|
178
178
|
* Surface used to present the actions. Pass a value selected by product
|
|
179
179
|
* policy (for example, a compact-touch media query) when the presentation
|
|
180
180
|
* should adapt. Bottom-sheet presentation is intended for short action sets.
|
|
181
|
-
*
|
|
181
|
+
* Omitted, the menu is the anchored popover. Under a finger, on every
|
|
182
|
+
* device, the finger that opened it picks as UIMenu's does, once it has
|
|
183
|
+
* moved. `'popover'` pins the anchored popover with the pointer behavior on
|
|
184
|
+
* every device (the opening press follows the settle rule).
|
|
182
185
|
*/
|
|
183
186
|
presentation?: DropdownMenuPresentation;
|
|
184
187
|
items: DropdownMenuOption[];
|
|
185
188
|
children?: undefined;
|
|
186
189
|
}
|
|
187
190
|
interface DropdownMenuCompoundProps extends DropdownMenuBaseProps {
|
|
191
|
+
/**
|
|
192
|
+
* `'popover'` pins the pointer behavior on every device (the opening press
|
|
193
|
+
* follows the settle rule). Omitted, on every device, the finger
|
|
194
|
+
* that opened the menu picks as UIMenu's does, once it has moved.
|
|
195
|
+
*/
|
|
188
196
|
presentation?: 'popover';
|
|
189
197
|
items?: undefined;
|
|
190
198
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAS,KAAK,WAAW,EAAC,MAAM,WAAW,CAAC;AAKnD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AA+B9D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAS1C,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAStE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2L5C;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAqB,SAA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,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,qBAAsB,SAAQ,qBAAqB;IAC3D;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,yBAA0B,SAAQ,qBAAqB;IAC/D;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAC3B,qBAAqB,GAAG,yBAAyB,CAAC;AA+vCpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAkDpD;yBAlDe,YAAY"}
|
|
@@ -47,7 +47,7 @@ import { DropdownMenuContext, DropdownMenuRootOpenContext, DropdownMenuSurfaceCo
|
|
|
47
47
|
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
48
48
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
49
49
|
import { useListFocus } from "../hooks/useListFocus.js";
|
|
50
|
-
import {
|
|
50
|
+
import { useDropdownMenuPress } from "../hooks/useMenuPress.js";
|
|
51
51
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
52
52
|
import { useFocusReturnVisibility } from "../hooks/useFocusReturnVisibility.js";
|
|
53
53
|
import { focusForLastInput } from "../utils/focusReturn.js";
|
|
@@ -574,6 +574,7 @@ function DropdownMenuPopover({
|
|
|
574
574
|
placement = 'below',
|
|
575
575
|
alignment = 'start',
|
|
576
576
|
presentation: _presentation,
|
|
577
|
+
pressTouchModel = 'uikit',
|
|
577
578
|
header,
|
|
578
579
|
footer,
|
|
579
580
|
className,
|
|
@@ -993,12 +994,15 @@ function DropdownMenuPopover({
|
|
|
993
994
|
// The press model: the row under a release acts, the highlight follows a
|
|
994
995
|
// held pointer. A mouse released outside the menu dismisses it; a finger
|
|
995
996
|
// released outside leaves it open, so the hook never calls onDismiss then.
|
|
996
|
-
const menuPress =
|
|
997
|
+
const menuPress = useDropdownMenuPress({
|
|
997
998
|
menuRef: listRef,
|
|
998
999
|
triggerRef: buttonRef,
|
|
999
1000
|
itemSelector: MENU_ITEM_SELECTOR,
|
|
1000
1001
|
onTriggerPress: handleTriggerPress,
|
|
1001
|
-
onDismiss: closeMenu
|
|
1002
|
+
onDismiss: closeMenu,
|
|
1003
|
+
// Under a finger, on every device, the opening finger picks as UIMenu's
|
|
1004
|
+
// does. `presentation="popover"` pins the pointer model.
|
|
1005
|
+
touchModel: pressTouchModel
|
|
1002
1006
|
});
|
|
1003
1007
|
cancelMenuPressRef.current = menuPress.cancel;
|
|
1004
1008
|
const handleButtonClick = useCallback(e => {
|
|
@@ -1305,7 +1309,8 @@ export function DropdownMenu(props) {
|
|
|
1305
1309
|
}
|
|
1306
1310
|
return /*#__PURE__*/_jsx(DropdownMenuPopover, {
|
|
1307
1311
|
...sharedProps,
|
|
1308
|
-
presentation: "popover"
|
|
1312
|
+
presentation: "popover",
|
|
1313
|
+
pressTouchModel: props.presentation === 'popover' ? 'pointer' : 'uikit'
|
|
1309
1314
|
});
|
|
1310
1315
|
}
|
|
1311
1316
|
DropdownMenu.displayName = 'DropdownMenu';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuCheckboxItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuCheckboxItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenuCheckboxItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuCheckboxItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAStD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAiD5C,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CACzD,SAAS,EACT,UAAU,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,CAClD;IACC;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sFAAsF;IACtF,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,WAAW,EACX,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAkB,EAClB,gBAAwB,EACxB,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,IAAI,EACR,EAAE,6BAA6B,+BAqE/B;yBApFe,wBAAwB"}
|
|
@@ -32,6 +32,7 @@ import { useIndicator } from "../Indicator/index.js";
|
|
|
32
32
|
import { Item } from "../Item/index.js";
|
|
33
33
|
import { useDropdownMenuContext } from "./DropdownMenuContext.js";
|
|
34
34
|
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
35
|
+
import { menuPressLitRowStyle } from "../privateAttributes/menuPressLit.stylex.js";
|
|
35
36
|
import { focusMenuItemOnHover } from "./menuItemHover.js";
|
|
36
37
|
import "../theme/tokens.stylex.js";
|
|
37
38
|
import { colorVars, focusVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
@@ -42,7 +43,7 @@ const styles = {
|
|
|
42
43
|
kzqmXN: "xh8yej3",
|
|
43
44
|
kaIpWk: "x1ws5lxm",
|
|
44
45
|
kMwMTN: "x1tgivj0",
|
|
45
|
-
kWkggS: "xjbqb8w
|
|
46
|
+
kWkggS: "xjbqb8w x1p2z2pi",
|
|
46
47
|
kkrTdU: "x1ypdohk x16khyan",
|
|
47
48
|
kInvED: "x1c097ug",
|
|
48
49
|
$$css: true
|
|
@@ -144,7 +145,7 @@ export function DropdownMenuCheckboxItem({
|
|
|
144
145
|
endContent: endContent,
|
|
145
146
|
onClick: handleClick,
|
|
146
147
|
isDisabled: isDisabled,
|
|
147
|
-
xstyle: [focusOutlineStyles.focusVisible, styles.root, isDisabled && styles.disabled, xstyle],
|
|
148
|
+
xstyle: [focusOutlineStyles.focusVisible, styles.root, menuPressLitRowStyle, isDisabled && styles.disabled, xstyle],
|
|
148
149
|
...mergeProps(themeProps('dropdown-menu-item', {
|
|
149
150
|
size: menuSize
|
|
150
151
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAWtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenuItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAWtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAuE5C,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,SAAS,EACT,MAAM,GAAG,UAAU,CACpB;IACC,wCAAwC;IACxC,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,0BAA0B;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gEAAgE;IAChE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACpC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,MAAM,EACN,GAAG,EACH,UAAkB,EAClB,UAAU,EACV,gBAAuB,EACvB,OAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,GAAG,IAAI,EACR,EAAE,qBAAqB,+BAqHvB;yBAxIe,gBAAgB"}
|
|
@@ -37,6 +37,7 @@ import { colorVars, spacingVars, typographyVars, typeScaleVars, focusVars } from
|
|
|
37
37
|
import { composeEventHandlers, mergeProps } from "../utils/index.js";
|
|
38
38
|
import { useDropdownMenuContext } from "./DropdownMenuContext.js";
|
|
39
39
|
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
40
|
+
import { menuPressLitRowStyle } from "../privateAttributes/menuPressLit.stylex.js";
|
|
40
41
|
import { focusMenuItemOnHover } from "./menuItemHover.js";
|
|
41
42
|
import { isModifiedClick } from "./menuItemRoles.js";
|
|
42
43
|
import { themeProps } from "../utils/themeProps.js";
|
|
@@ -52,7 +53,7 @@ const menuItemStyles = {
|
|
|
52
53
|
kMv6JI: "x9ynric",
|
|
53
54
|
kGuDYH: "xcr08ib",
|
|
54
55
|
kMwMTN: "x1tgivj0",
|
|
55
|
-
kWkggS: "xjbqb8w
|
|
56
|
+
kWkggS: "xjbqb8w x1p2z2pi x17hk9mh",
|
|
56
57
|
kMzoRj: "xc342km",
|
|
57
58
|
ksu8eU: "xng3xce",
|
|
58
59
|
kkrTdU: "x1ypdohk x16khyan",
|
|
@@ -199,7 +200,7 @@ export function DropdownMenuItem({
|
|
|
199
200
|
,
|
|
200
201
|
draggable: href != null ? false : undefined,
|
|
201
202
|
isDisabled: isDisabled,
|
|
202
|
-
xstyle: [focusOutlineStyles.focusVisible, menuItemStyles.root, itemSizeStyles[menuSize], isDestructive && menuItemStyles.destructive, isDisabled && menuItemStyles.disabled, xstyle],
|
|
203
|
+
xstyle: [focusOutlineStyles.focusVisible, menuItemStyles.root, menuPressLitRowStyle, itemSizeStyles[menuSize], isDestructive && menuItemStyles.destructive, isDisabled && menuItemStyles.disabled, xstyle],
|
|
203
204
|
...mergeProps(themeProps('dropdown-menu-item', {
|
|
204
205
|
size: menuSize,
|
|
205
206
|
variant: isDestructive ? 'destructive' : null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuRadioItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuRadioItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenuRadioItem.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuRadioItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAStD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAiD5C,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CACtD,SAAS,EACT,MAAM,GAAG,cAAc,GAAG,UAAU,CACrC;IACC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,mFAAmF;IACnF,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CAC9B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,KAAK,EACL,WAAW,EACX,IAAI,EACJ,UAAkB,EAClB,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,IAAI,EACR,EAAE,0BAA0B,+BA6E5B;yBA1Fe,qBAAqB"}
|
|
@@ -28,6 +28,7 @@ import { useIndicator } from "../Indicator/index.js";
|
|
|
28
28
|
import { Item } from "../Item/index.js";
|
|
29
29
|
import { useDropdownMenuContext } from "./DropdownMenuContext.js";
|
|
30
30
|
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
31
|
+
import { menuPressLitRowStyle } from "../privateAttributes/menuPressLit.stylex.js";
|
|
31
32
|
import { focusMenuItemOnHover } from "./menuItemHover.js";
|
|
32
33
|
import "../theme/tokens.stylex.js";
|
|
33
34
|
import { colorVars, focusVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
@@ -39,7 +40,7 @@ const styles = {
|
|
|
39
40
|
kzqmXN: "xh8yej3",
|
|
40
41
|
kaIpWk: "x1ws5lxm",
|
|
41
42
|
kMwMTN: "x1tgivj0",
|
|
42
|
-
kWkggS: "xjbqb8w
|
|
43
|
+
kWkggS: "xjbqb8w x1p2z2pi",
|
|
43
44
|
kkrTdU: "x1ypdohk x16khyan",
|
|
44
45
|
kInvED: "x1c097ug",
|
|
45
46
|
$$css: true
|
|
@@ -139,7 +140,7 @@ export function DropdownMenuRadioItem({
|
|
|
139
140
|
endContent: endContent,
|
|
140
141
|
onClick: handleClick,
|
|
141
142
|
isDisabled: isDisabled,
|
|
142
|
-
xstyle: [focusOutlineStyles.focusVisible, styles.root, isDisabled && styles.disabled, xstyle],
|
|
143
|
+
xstyle: [focusOutlineStyles.focusVisible, styles.root, menuPressLitRowStyle, isDisabled && styles.disabled, xstyle],
|
|
143
144
|
...mergeProps(themeProps('dropdown-menu-item', {
|
|
144
145
|
size: menuSize
|
|
145
146
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuSubMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuSubMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenuSubMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuSubMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AA2C5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAwO5C,MAAM,MAAM,+BAA+B,GACzC,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAErC,UAAU,4BAA6B,SAAQ,IAAI,CACjD,SAAS,EACT,MAAM,GAAG,UAAU,CACpB;IACC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,8CAA8C;IAC9C,KAAK,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,+BAA+B,CAAC;IAC/C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,wBAAyB,SAAQ,4BAA4B;IAC5E;;;;;;;;OAQG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AA6CD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,wBAAwB,GAC9B,SAAS,CAo5BX;yBAt5Be,mBAAmB"}
|
|
@@ -70,6 +70,7 @@ import "../theme/tokens.stylex.js";
|
|
|
70
70
|
import { colorVars, spacingVars, radiusVars, durationVars, easeVars, shadowVars, typographyVars, typeScaleVars, focusVars } from "../theme/tokens.stylex.js";
|
|
71
71
|
import { composeEventHandlers, isImeKeyEvent, isRenderable, mergeProps, rtlStyles } from "../utils/index.js";
|
|
72
72
|
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
73
|
+
import { menuPressLitRowStyle } from "../privateAttributes/menuPressLit.stylex.js";
|
|
73
74
|
import { getInteractionModality } from "../utils/interactionModality.js";
|
|
74
75
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
75
76
|
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
@@ -98,7 +99,7 @@ const triggerStyles = {
|
|
|
98
99
|
kMv6JI: "x9ynric",
|
|
99
100
|
kGuDYH: "xcr08ib",
|
|
100
101
|
kMwMTN: "x1tgivj0",
|
|
101
|
-
kWkggS: "xjbqb8w
|
|
102
|
+
kWkggS: "xjbqb8w x1p2z2pi",
|
|
102
103
|
kMzoRj: "xc342km",
|
|
103
104
|
ksu8eU: "xng3xce",
|
|
104
105
|
kkrTdU: "x1ypdohk x16khyan",
|
|
@@ -915,7 +916,7 @@ export function DropdownMenuSubMenu(props) {
|
|
|
915
916
|
onClick: handleRowClick,
|
|
916
917
|
onKeyDown: composeEventHandlers(handleTriggerKeyDown, onKeyDown),
|
|
917
918
|
isDisabled: isDisabled,
|
|
918
|
-
xstyle: [focusOutlineStyles.focusVisible, triggerStyles.root, triggerSizeStyles[menuSize], isOpen && triggerStyles.open, isDisabled && triggerStyles.disabled, xstyle],
|
|
919
|
+
xstyle: [focusOutlineStyles.focusVisible, triggerStyles.root, menuPressLitRowStyle, triggerSizeStyles[menuSize], isOpen && triggerStyles.open, isDisabled && triggerStyles.disabled, xstyle],
|
|
919
920
|
...mergeProps(themeProps('dropdown-menu-item', {
|
|
920
921
|
size: menuSize
|
|
921
922
|
}), {
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
import * as stylex from '@stylexjs/stylex';
|
|
9
9
|
export declare const inputDisabledFocusStyles: Readonly<{
|
|
10
10
|
readonly ring: Readonly<{
|
|
11
|
-
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #
|
|
11
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #0171E3)" | "light-dark(#CCD3DB, #494D53)" | "Highlight">;
|
|
12
12
|
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", "none" | `inset 0px 0px 0px 2px ${stylex.StyleXVar<"light-dark(#0082FB33, #0082FB3F)">}`>;
|
|
13
13
|
}>;
|
|
14
14
|
readonly nestedRing: Readonly<{
|
|
15
|
-
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #
|
|
15
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #0171E3)" | "light-dark(#CCD3DB, #494D53)" | "Highlight">;
|
|
16
16
|
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", "none" | `inset 0px 0px 0px 2px ${stylex.StyleXVar<"light-dark(#0082FB33, #0082FB3F)">}`>;
|
|
17
17
|
}>;
|
|
18
18
|
readonly withinRing: Readonly<{
|
|
19
|
-
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #
|
|
19
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #0171E3)" | "light-dark(#CCD3DB, #494D53)" | "Highlight">;
|
|
20
20
|
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", "none" | `inset 0px 0px 0px 2px ${stylex.StyleXVar<"light-dark(#0082FB33, #0082FB3F)">}`>;
|
|
21
21
|
}>;
|
|
22
22
|
readonly inputFocusRing: Readonly<{
|
|
23
|
-
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #
|
|
23
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #0171E3)" | "light-dark(#CCD3DB, #494D53)" | "Highlight">;
|
|
24
24
|
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", "none" | `inset 0px 0px 0px 2px ${stylex.StyleXVar<"light-dark(#0082FB33, #0082FB3F)">}`>;
|
|
25
25
|
}>;
|
|
26
26
|
}>;
|
|
@@ -28,7 +28,7 @@ export declare const inputWrapperStyles: Readonly<{
|
|
|
28
28
|
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.5rem">;
|
|
29
29
|
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", "1px">;
|
|
30
30
|
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
31
|
-
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #
|
|
31
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#0064E0, #0171E3)" | "light-dark(#CCD3DB, #494D53)" | "Highlight">;
|
|
32
32
|
readonly '--_field-radius': stylex.StyleXClassNameFor<"--_field-radius", "8px">;
|
|
33
33
|
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "var(--_field-radius)">;
|
|
34
34
|
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "light-dark(#FFFFFF, #1F1F22)">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../src/FileInput/FileInput.tsx"],"names":[],"mappings":"AAuCA,OAAO,EAA0B,KAAK,WAAW,EAAC,MAAM,UAAU,CAAC;AAUnE,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,GACvC,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAO9C,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AA2PxE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,mBAAmB,EACnB,UAAU,GAAG,cAAc,GAAG,OAAO,CACtC;IACC;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,G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B,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,EAAE,EAAE,MAAM,EACV,GAAG,SAAS,EACb,EAAE,cAAc,+BAkiBhB;yBAjkBe,SAAS"}
|
|
@@ -443,14 +443,28 @@ export function FileInput({
|
|
|
443
443
|
const handleDragEnter = useCallback(e => {
|
|
444
444
|
e.preventDefault();
|
|
445
445
|
e.stopPropagation();
|
|
446
|
-
if (
|
|
446
|
+
if (isSelectionDisabled) {
|
|
447
|
+
// A cancelled dragover with the default effect makes the zone a drop
|
|
448
|
+
// target.
|
|
449
|
+
// The 'none' effect shows the no-drop cursor and stops the drop.
|
|
450
|
+
if (e.dataTransfer) {
|
|
451
|
+
e.dataTransfer.dropEffect = 'none';
|
|
452
|
+
}
|
|
453
|
+
} else if (mode === 'dropzone') {
|
|
447
454
|
setIsDragOver(true);
|
|
448
455
|
}
|
|
449
456
|
}, [isSelectionDisabled, mode]);
|
|
450
457
|
const handleDragOver = useCallback(e => {
|
|
451
458
|
e.preventDefault();
|
|
452
459
|
e.stopPropagation();
|
|
453
|
-
if (
|
|
460
|
+
if (isSelectionDisabled) {
|
|
461
|
+
// A cancelled dragover with the default effect makes the zone a drop
|
|
462
|
+
// target.
|
|
463
|
+
// The 'none' effect shows the no-drop cursor and stops the drop.
|
|
464
|
+
if (e.dataTransfer) {
|
|
465
|
+
e.dataTransfer.dropEffect = 'none';
|
|
466
|
+
}
|
|
467
|
+
} else if (mode === 'dropzone') {
|
|
454
468
|
setIsDragOver(true);
|
|
455
469
|
}
|
|
456
470
|
}, [isSelectionDisabled, mode]);
|
|
@@ -111,7 +111,8 @@ export interface HoverCardReturn {
|
|
|
111
111
|
ref: RefCallback<HTMLElement>;
|
|
112
112
|
/**
|
|
113
113
|
* Ref for the positioning anchor element.
|
|
114
|
-
*
|
|
114
|
+
* While the layer is shown, and until its exit animation ends, the trigger
|
|
115
|
+
* carries the layer's CSS anchor name.
|
|
115
116
|
*/
|
|
116
117
|
positionRef: RefCallback<HTMLElement>;
|
|
117
118
|
/**
|
|
@@ -123,6 +124,7 @@ export interface HoverCardReturn {
|
|
|
123
124
|
/**
|
|
124
125
|
* The CSS anchor name to use for positioning.
|
|
125
126
|
* Use this when you need to set anchorName manually (e.g., display:contents wrapper).
|
|
127
|
+
* Set it only while the layer is shown or its exit animation runs.
|
|
126
128
|
*/
|
|
127
129
|
anchorId: string;
|
|
128
130
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHoverCard.d.ts","sourceRoot":"","sources":["../../src/HoverCard/useHoverCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA8BlC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAErC;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAErC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IA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AC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEzC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,QAAQ,EAAE,SAAS,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,KAC5C,SAAS,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAgB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAke5E"}
|
package/dist/Icon/Icon.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare const colorStyles: Readonly<{
|
|
|
46
46
|
readonly color: stylex.StyleXClassNameFor<"color", "light-dark(#A4B0BC, #6F747C)">;
|
|
47
47
|
}>;
|
|
48
48
|
readonly accent: Readonly<{
|
|
49
|
-
readonly color: stylex.StyleXClassNameFor<"color", "light-dark(#0064E0, #
|
|
49
|
+
readonly color: stylex.StyleXClassNameFor<"color", "light-dark(#0064E0, #0171E3)">;
|
|
50
50
|
}>;
|
|
51
51
|
readonly info: Readonly<{
|
|
52
52
|
readonly color: stylex.StyleXClassNameFor<"color", "var(--color-text-info)">;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* - /docs/specs/components/InfoTip/InfoTip.spec.md (contract)
|
|
12
12
|
* - /packages/core/src/InfoTip/InfoTip.test.tsx (tests for new/changed behavior)
|
|
13
13
|
* - /packages/core/src/InfoTip/index.ts (exports if types change)
|
|
14
|
+
* - /packages/cli/assets/templates/blocks/components/InfoTip/ (showcase and example blocks)
|
|
14
15
|
*/
|
|
15
16
|
import { type ReactNode, type Ref } from 'react';
|
|
16
17
|
import type { BaseProps } from '../BaseProps.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoTip.d.ts","sourceRoot":"","sources":["../../src/InfoTip/InfoTip.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"InfoTip.d.ts","sourceRoot":"","sources":["../../src/InfoTip/InfoTip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAO,KAAK,QAAQ,EAAC,MAAM,cAAc,CAAC;AAqBjD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;AAEnC,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,SAAS,EACT,QAAQ,GAAG,WAAW,GAAG,OAAO,CACjC;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC7B;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AA8CD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,KAAK,EACL,IAAW,EACX,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,YAAY,GAAG,SAAS,CAyF1B;yBAjGe,OAAO"}
|
package/dist/InfoTip/InfoTip.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* - /docs/specs/components/InfoTip/InfoTip.spec.md (contract)
|
|
16
16
|
* - /packages/core/src/InfoTip/InfoTip.test.tsx (tests for new/changed behavior)
|
|
17
17
|
* - /packages/core/src/InfoTip/index.ts (exports if types change)
|
|
18
|
+
* - /packages/cli/assets/templates/blocks/components/InfoTip/ (showcase and example blocks)
|
|
18
19
|
*/
|
|
19
20
|
import { useCallback, useState } from 'react';
|
|
20
21
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -59,7 +59,8 @@ export interface InputGroupProps extends Omit<BaseProps<HTMLDivElement>, 'childr
|
|
|
59
59
|
*/
|
|
60
60
|
size?: InputGroupSize;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Validation status. Its message shows below the group. The group border
|
|
63
|
+
* does not change; a theme can style the row from `data-status`.
|
|
63
64
|
*/
|
|
64
65
|
status?: InputStatus;
|
|
65
66
|
/**
|
|
@@ -72,8 +73,8 @@ export interface InputGroupProps extends Omit<BaseProps<HTMLDivElement>, 'childr
|
|
|
72
73
|
'data-testid'?: string;
|
|
73
74
|
}
|
|
74
75
|
/**
|
|
75
|
-
* Groups an input with prefix
|
|
76
|
-
*
|
|
76
|
+
* Groups an input with prefix and suffix addons in one connected row. A
|
|
77
|
+
* focused member stays above its neighbours, so its focus ring shows in full.
|
|
77
78
|
*
|
|
78
79
|
* @example
|
|
79
80
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.d.ts","sourceRoot":"","sources":["../../src/InputGroup/InputGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAsB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAQ,KAAK,WAAW,EAAC,MAAM,UAAU,CAAC;AAGjD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AA0BhD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,CACX;IACC,mDAAmD;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB
|
|
1
|
+
{"version":3,"file":"InputGroup.d.ts","sourceRoot":"","sources":["../../src/InputGroup/InputGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAsB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAQ,KAAK,WAAW,EAAC,MAAM,UAAU,CAAC;AAGjD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AA0BhD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,CACX;IACC,mDAAmD;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAU,EAAE,cAAsB,EAClC,UAAkB,EAClB,UAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,MAAM,EACN,YAAY,EACZ,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,eAAe,+BA8EjB;yBA/Fe,UAAU"}
|
|
@@ -57,8 +57,8 @@ const sizeStyles = {
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
* Groups an input with prefix
|
|
61
|
-
*
|
|
60
|
+
* Groups an input with prefix and suffix addons in one connected row. A
|
|
61
|
+
* focused member stays above its neighbours, so its focus ring shows in full.
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
64
|
* ```
|
|
@@ -33,7 +33,7 @@ export declare const groupStyles: Readonly<{
|
|
|
33
33
|
readonly borderStartEndRadius: stylex.StyleXClassNameFor<"borderStartEndRadius", 0 | "8px">;
|
|
34
34
|
readonly borderEndEndRadius: stylex.StyleXClassNameFor<"borderEndEndRadius", 0 | "8px">;
|
|
35
35
|
readonly ':focus-within': stylex.StyleXClassNameFor<":focus-within", {
|
|
36
|
-
readonly zIndex:
|
|
36
|
+
readonly zIndex: 2;
|
|
37
37
|
}>;
|
|
38
38
|
}>;
|
|
39
39
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupStyles.d.ts","sourceRoot":"","sources":["../../src/InputGroup/groupStyles.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAG3C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;CAEtB,CAAC;AA0BX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"groupStyles.d.ts","sourceRoot":"","sources":["../../src/InputGroup/groupStyles.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAG3C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;CAEtB,CAAC;AA0BX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;EA0DtB,CAAC"}
|
package/dist/Item/Item.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Item.tsx
|
|
3
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens, useClickableContainer
|
|
3
|
+
* @input Uses React, ReactNode, StyleXStyles, theme tokens, useClickableContainer,
|
|
4
|
+
* the shared press overlays and the compositor press layer
|
|
4
5
|
* @output Exports Item component, ItemProps type; publishes the shared inline inset.
|
|
5
6
|
* Only numbered composing rows keep their start/label/end slots in one flex
|
|
6
7
|
* group, through Item's private exact-marker scope; other marked rows keep
|
package/dist/Item/Item.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAiC5C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE1E,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB;IACxB,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,oFAAoF;IACpF,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,qFAAqF;IACrF,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED;;;;;GAKG;AACH,M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;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAgQD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,EACnB,EAAE,EAAE,SAAiB,EACrB,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,KAAgB,EAChB,OAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,MAAkB,EAClB,OAAO,EACP,cAAc,EACd,IAAI,EACJ,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,YAAY,EACjB,aAAqB,EACrB,UAAkB,EAClB,UAAkB,EAClB,YAAY,EACZ,aAAwB,EACxB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,IAAI,EACJ,GAAG,SAAS,EACb,EAAE,SAAS,+BAoYX;yBAhae,IAAI"}
|
package/dist/Item/Item.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file Item.tsx
|
|
7
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens, useClickableContainer
|
|
7
|
+
* @input Uses React, ReactNode, StyleXStyles, theme tokens, useClickableContainer,
|
|
8
|
+
* the shared press overlays and the compositor press layer
|
|
8
9
|
* @output Exports Item component, ItemProps type; publishes the shared inline inset.
|
|
9
10
|
* Only numbered composing rows keep their start/label/end slots in one flex
|
|
10
11
|
* group, through Item's private exact-marker scope; other marked rows keep
|
|
@@ -34,17 +35,19 @@ import "../theme/tokens.stylex.js";
|
|
|
34
35
|
import { colorVars, radiusVars, spacingVars, durationVars, easeVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
35
36
|
import { isRenderable } from "../utils/isRenderable.js";
|
|
36
37
|
import { mergeProps } from "../utils/mergeProps.js";
|
|
38
|
+
import { chainEventHandlers } from "../utils/chainEventHandlers.js";
|
|
37
39
|
import { useFocusAcrossSwap } from "../utils/useFocusAcrossSwap.js";
|
|
38
40
|
import { ItemDescriptionContext } from "./ItemDescriptionContext.js";
|
|
39
41
|
import { ItemMarkerColumnsContext } from "./ItemMarkerColumnsContext.js";
|
|
40
42
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
41
43
|
import { computeTargetAndRel } from "../Link/computeTargetAndRel.js";
|
|
42
44
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
43
|
-
import { useClickableContainer } from "../hooks/useClickableContainer.js";
|
|
45
|
+
import { cancelNestedTouchPress, useClickableContainer } from "../hooks/useClickableContainer.js";
|
|
44
46
|
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
45
47
|
import { themeProps } from "../utils/themeProps.js";
|
|
46
48
|
import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
47
49
|
import { interactionOverlayStyles } from "../utils/interactionOverlay.stylex.js";
|
|
50
|
+
import { rowPressLayerStyles } from "../privateAttributes/press.stylex.js";
|
|
48
51
|
import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
49
52
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
50
53
|
// The gesture and the panels, loaded only by a row that has swipe actions: a
|
|
@@ -190,7 +193,6 @@ const styles = {
|
|
|
190
193
|
$$css: true
|
|
191
194
|
},
|
|
192
195
|
swipeRoot: {
|
|
193
|
-
kHBbk8: "xc8icb0",
|
|
194
196
|
kFalU9: "xge0x1e",
|
|
195
197
|
k3aq6I: "x1kncwj0",
|
|
196
198
|
k1ekBW: "xuo13n2",
|
|
@@ -281,7 +283,11 @@ export function Item({
|
|
|
281
283
|
// the router link component, which may require a live href. The element type
|
|
282
284
|
// then changes with `isDisabled`, so focus follows the swap (FR4).
|
|
283
285
|
const RowAnchor = isDisabled ? 'a' : LinkComponent;
|
|
284
|
-
|
|
286
|
+
// The row's own action, its invisible link or button: a press on it
|
|
287
|
+
// activates the row.
|
|
288
|
+
const actionLinkRef = useRef(null);
|
|
289
|
+
const actionButtonRef = useRef(null);
|
|
290
|
+
const anchorRef = useFocusAcrossSwap(actionLinkRef);
|
|
285
291
|
|
|
286
292
|
// Delegation mode: the row is an enlarged click/tap target for a nested
|
|
287
293
|
// control (e.g. a checkbox) that owns the keyboard access and action. The
|
|
@@ -291,7 +297,8 @@ export function Item({
|
|
|
291
297
|
// Only onClick is needed: onMouseUp handles middle-click href navigation,
|
|
292
298
|
// which delegation mode never has (href is ignored here).
|
|
293
299
|
const {
|
|
294
|
-
onClick: delegatedOnClick
|
|
300
|
+
onClick: delegatedOnClick,
|
|
301
|
+
onPointerDown: delegatedOnPointerDown
|
|
295
302
|
} = useClickableContainer({
|
|
296
303
|
containerRef,
|
|
297
304
|
interactiveRef: interactiveRef ?? undefined,
|
|
@@ -311,6 +318,12 @@ export function Item({
|
|
|
311
318
|
// component means the root itself is the anchor, so the address rides it
|
|
312
319
|
// and the invisible anchor below is not rendered.
|
|
313
320
|
const isLinkRoot = typeof Component !== 'string' && href != null;
|
|
321
|
+
// A press on a nested control does not run this row's action, so the row
|
|
322
|
+
// shows no touch press. A row with a parent role or a link root runs it, so
|
|
323
|
+
// it keeps the press. Such a row is not a clickable container: an enclosing
|
|
324
|
+
// card still treats it as part of its own surface.
|
|
325
|
+
const hasOwnAction = (onClick != null || href != null) && !hasParentRole && !isLinkRoot;
|
|
326
|
+
const pressOnRow = event => cancelNestedTouchPress(event, event.currentTarget, href != null ? actionLinkRef.current : actionButtonRef.current);
|
|
314
327
|
|
|
315
328
|
// Swipe actions exist where the row's role permits interactive descendants
|
|
316
329
|
// (a swipe panel's buttons are such descendants): a `listitem`, or no role
|
|
@@ -434,6 +447,7 @@ export function Item({
|
|
|
434
447
|
}[!!isInline << 1 | !!isDisabled << 0],
|
|
435
448
|
children: labelAndDescription
|
|
436
449
|
}) : onClick != null ? /*#__PURE__*/_jsx("button", {
|
|
450
|
+
ref: actionButtonRef,
|
|
437
451
|
type: "button",
|
|
438
452
|
onClick: onClick,
|
|
439
453
|
disabled: isDisabled,
|
|
@@ -517,6 +531,11 @@ export function Item({
|
|
|
517
531
|
...restProps,
|
|
518
532
|
...swipeHandlers,
|
|
519
533
|
...linkRootProps,
|
|
534
|
+
...(isDelegate ? {
|
|
535
|
+
onPointerDown: chainEventHandlers(restProps.onPointerDown, delegatedOnPointerDown)
|
|
536
|
+
} : hasOwnAction && !isDisabled ? {
|
|
537
|
+
onPointerDown: chainEventHandlers(swipeHandlers?.onPointerDown ?? restProps.onPointerDown, pressOnRow)
|
|
538
|
+
} : null),
|
|
520
539
|
"aria-selected": allowsAriaSelected && isSelected || undefined
|
|
521
540
|
// aria-selected is invalid on roles that don't permit it (listitem, a
|
|
522
541
|
// bare div, etc.). For those, convey selection via aria-current — valid
|
|
@@ -529,7 +548,11 @@ export function Item({
|
|
|
529
548
|
...mergeProps(themeProps('item', {
|
|
530
549
|
density,
|
|
531
550
|
align
|
|
532
|
-
}), focusOutlineProps.focusWithin(styles.root, densityStyles[density], align === 'start' && styles.alignStart, align === 'first-line' && styles.alignFirstLine, isInteractive && styles.interactive, isInteractive && interactionOverlayStyles.backgroundColor,
|
|
551
|
+
}), focusOutlineProps.focusWithin(styles.root, densityStyles[density], align === 'start' && styles.alignStart, align === 'first-line' && styles.alignFirstLine, isInteractive && styles.interactive, isInteractive && interactionOverlayStyles.backgroundColor,
|
|
552
|
+
// The touch press on a compositor layer (after the overlay, whose
|
|
553
|
+
// own touch paint it turns off): the release keeps fading while
|
|
554
|
+
// script runs.
|
|
555
|
+
isInteractive && rowPressLayerStyles.cell, isLinkRoot && styles.linkRoot, isHighlighted && styles.highlighted, isSelected && styles.selected, isDisabled && !hasParentRole && styles.disabled, hasSwipe && styles.swipeRoot, xstyle), className, style),
|
|
533
556
|
role: role,
|
|
534
557
|
onClick: rootOnClick,
|
|
535
558
|
children: [/*#__PURE__*/_jsxs(ItemDescriptionContext, {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Options for {@link holdEntranceInput}. */
|
|
2
|
+
export interface EntranceHoldOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Holds input anywhere while true. While false, only what lands on the layer
|
|
5
|
+
* is held, and the page stays live.
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
isModal?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The element whose animations are the entrance, when it is not the layer
|
|
11
|
+
* itself (a drawer inside its dialog).
|
|
12
|
+
* @default the layer
|
|
13
|
+
*/
|
|
14
|
+
entrance?: Element | null;
|
|
15
|
+
/** The longest the hold lasts, ms. An entrance that runs longer ends it. */
|
|
16
|
+
capMs?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Holds a finger's and a pen's input away from `layer` until its entrance
|
|
20
|
+
* ends, or at most `capMs`. Returns the release, or `null` when nothing is
|
|
21
|
+
* held: no entrance runs, or the primary pointer is fine.
|
|
22
|
+
*/
|
|
23
|
+
export declare function holdEntranceInput(layer: Element, { isModal, entrance: animated, capMs }?: EntranceHoldOptions): (() => void) | null;
|
|
24
|
+
//# sourceMappingURL=holdEntranceInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"holdEntranceInput.d.ts","sourceRoot":"","sources":["../../src/Layer/holdEntranceInput.ts"],"names":[],"mappings":"AAmBA,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,EAAC,OAAc,EAAE,QAAQ,EAAE,QAAgB,EAAE,KAAK,EAAC,GAAE,mBAAwB,GAC5E,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAuBrB"}
|