@astryxdesign/core 0.7.7 → 0.7.8-canary.0d54fd3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/AlertDialog.d.ts +4 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +46 -6
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +11 -3
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +1 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +25 -4
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +5 -0
- package/dist/BottomSheet/useMobileKeyboard.d.ts.map +1 -1
- package/dist/BottomSheet/useMobileKeyboard.js +6 -0
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +12 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +17 -1
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +18 -22
- package/dist/Calendar/getWeekdayHeaderNames.d.ts +16 -0
- package/dist/Calendar/getWeekdayHeaderNames.d.ts.map +1 -0
- package/dist/Calendar/getWeekdayHeaderNames.js +70 -0
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +2 -10
- package/dist/Calendar/{standaloneShortWeekdayNames.generated.d.ts → weekdayHeaderNames.generated.d.ts} +14 -14
- package/dist/Calendar/weekdayHeaderNames.generated.d.ts.map +1 -0
- package/dist/Calendar/{standaloneShortWeekdayNames.generated.js → weekdayHeaderNames.generated.js} +12 -12
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +2 -0
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +6 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +2 -1
- package/dist/Chat/useChatDictation.d.ts.map +1 -1
- package/dist/Chat/useChatDictation.js +2 -0
- package/dist/Chat/useChatNewMessages.js +1 -1
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +2 -0
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +3 -0
- package/dist/Chat/useTriggerMenu.js +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +17 -12
- package/dist/CheckboxList/CheckboxList.d.ts +8 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +2 -0
- package/dist/CodeBlock/CodeBlock.d.ts +10 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +28 -11
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +2 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +14 -4
- package/dist/ContextMenu/ContextMenu.js +2 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +5 -2
- package/dist/DateInput/PickerWheel.d.ts +19 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -0
- package/dist/DateInput/PickerWheel.js +625 -0
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +9 -30
- package/dist/DateInput/Wheel.d.ts +18 -37
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +84 -113
- package/dist/DateInput/useOwnScrollGesture.d.ts +10 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts.map +1 -1
- package/dist/DateInput/useOwnScrollGesture.js +16 -3
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +2 -0
- package/dist/DateInput/useScrollSettle.d.ts.map +1 -1
- package/dist/DateInput/useScrollSettle.js +3 -0
- package/dist/DateInput/useWheelListbox.d.ts +59 -0
- package/dist/DateInput/useWheelListbox.d.ts.map +1 -0
- package/dist/DateInput/useWheelListbox.js +88 -0
- package/dist/DateInput/wheelOptions.d.ts +74 -0
- package/dist/DateInput/wheelOptions.d.ts.map +1 -0
- package/dist/DateInput/wheelOptions.js +98 -0
- package/dist/DateInput/wheelPhysics.d.ts +127 -0
- package/dist/DateInput/wheelPhysics.d.ts.map +1 -0
- package/dist/DateInput/wheelPhysics.js +341 -0
- package/dist/DateInput/wheelStrip.d.ts +92 -0
- package/dist/DateInput/wheelStrip.d.ts.map +1 -0
- package/dist/DateInput/wheelStrip.js +258 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +10 -10
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +9 -32
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +3 -0
- package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -1
- package/dist/DropdownMenu/useMenuOverflow.js +5 -0
- package/dist/Field/Field.js +2 -2
- package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts.map +1 -1
- package/dist/FieldStatus/useFieldStatusAnnouncement.js +1 -0
- package/dist/FormLayout/FormLayout.d.ts +5 -1
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.d.ts +6 -4
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +48 -3
- package/dist/HoverCard/useHoverCard.d.ts +5 -4
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +20 -33
- package/dist/Icon/Icon.d.ts +5 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +5 -2
- package/dist/InfoTip/InfoTip.d.ts +5 -5
- package/dist/InfoTip/InfoTip.d.ts.map +1 -1
- package/dist/InfoTip/InfoTip.js +58 -19
- package/dist/Item/useSwipeAction.d.ts.map +1 -1
- package/dist/Item/useSwipeAction.js +3 -0
- package/dist/Layer/modalOutlet.d.ts.map +1 -1
- package/dist/Layer/modalOutlet.js +2 -0
- package/dist/Layer/outsidePress.d.ts.map +1 -1
- package/dist/Layer/outsidePress.js +1 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +4 -1
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +3 -0
- package/dist/Layer/useTouchTrigger.d.ts +13 -7
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +20 -6
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.d.ts.map +1 -1
- package/dist/Layout/index.js +1 -1
- package/dist/Layout/layoutReset.js +1 -1
- package/dist/Layout/overlayPaddingReset.stylex.d.ts +68 -0
- package/dist/Layout/overlayPaddingReset.stylex.d.ts.map +1 -0
- package/dist/Layout/overlayPaddingReset.stylex.js +72 -0
- package/dist/Layout/padding.stylex.d.ts +5 -129
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +9 -143
- package/dist/Layout/paddingStyles.stylex.d.ts +83 -0
- package/dist/Layout/paddingStyles.stylex.d.ts.map +1 -0
- package/dist/Layout/paddingStyles.stylex.js +99 -0
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +20 -1
- package/dist/MobileNav/MobileNav.d.ts +3 -2
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +10 -26
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +2 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +2 -1
- package/dist/Outline/useOutlineFromDOM.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromDOM.js +3 -0
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +3 -0
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +3 -0
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +6 -0
- package/dist/Popover/usePopover.js +2 -2
- package/dist/PowerSearch/PowerSearch.d.ts +39 -4
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +441 -134
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +102 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +1919 -0
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +35 -2
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +43 -10
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +4 -2
- package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -2
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +273 -86
- package/dist/PowerSearch/formatFilterValue.d.ts +14 -7
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +31 -23
- package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
- package/dist/PowerSearch/formatTokenValue.js +161 -0
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/powerSearchDateZone.d.ts +25 -0
- package/dist/PowerSearch/powerSearchDateZone.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchDateZone.js +57 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
- package/dist/PowerSearch/types.d.ts +8 -1
- package/dist/PowerSearch/types.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBarTouch.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBarTouch.js +2 -0
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +3 -2
- package/dist/RadioList/RadioListItem.d.ts +1 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -3
- package/dist/Resizable/ResizeHandle.d.ts +2 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +101 -77
- package/dist/Resizable/createResizable.d.ts +145 -0
- package/dist/Resizable/createResizable.d.ts.map +1 -0
- package/dist/Resizable/createResizable.js +575 -0
- package/dist/Resizable/useResizable.d.ts +3 -3
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +252 -459
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +3 -3
- package/dist/SelectableCard/SelectableCard.d.ts +2 -0
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +36 -11
- package/dist/SelectableCard/selectableCardInput.d.ts +12 -0
- package/dist/SelectableCard/selectableCardInput.d.ts.map +1 -0
- package/dist/SelectableCard/selectableCardInput.js +20 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +7 -9
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +36 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +16 -11
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +60 -58
- package/dist/Stepper/Stepper.d.ts.map +1 -1
- package/dist/Stepper/Stepper.js +10 -15
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +4 -10
- package/dist/Switch/useSwitchTouch.js +4 -4
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +29 -8
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +3 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +2 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +4 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -0
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +2 -1
- package/dist/TextInput/TextInput.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +12 -8
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +2 -0
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +2 -0
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +2 -0
- package/dist/Timestamp/Timestamp.js +1 -1
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +1 -23
- package/dist/Toast/Toast.d.ts +11 -1
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +25 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +97 -34
- package/dist/Toast/types.d.ts +9 -3
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +1 -0
- package/dist/Tokenizer/Tokenizer.d.ts +44 -46
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +20 -21
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +4 -6
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.d.ts +2 -23
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +5 -29
- package/dist/Tooltip/useTooltip.d.ts +23 -30
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +194 -108
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +27 -18
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/animator/createAnimator.d.ts +98 -0
- package/dist/animator/createAnimator.d.ts.map +1 -0
- package/dist/animator/createAnimator.js +259 -0
- package/dist/astryx.css +41 -7
- package/dist/gestures/GestureHost.d.ts +16 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +1 -1
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +4 -3
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -1
- package/dist/hooks/ModalAnnounceProvider.js +1 -0
- package/dist/hooks/actionGroupTracker.d.ts +4 -1
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +13 -3
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/longPressDetector.d.ts +66 -0
- package/dist/hooks/longPressDetector.d.ts.map +1 -0
- package/dist/hooks/longPressDetector.js +200 -0
- package/dist/hooks/pressGroupContext.d.ts +6 -0
- package/dist/hooks/pressGroupContext.d.ts.map +1 -0
- package/dist/hooks/pressGroupContext.js +20 -0
- package/dist/hooks/rootScrollStyles.d.ts +48 -0
- package/dist/hooks/rootScrollStyles.d.ts.map +1 -0
- package/dist/hooks/rootScrollStyles.js +207 -0
- package/dist/hooks/scrollLockTouchGuard.d.ts +13 -0
- package/dist/hooks/scrollLockTouchGuard.d.ts.map +1 -0
- package/dist/hooks/scrollLockTouchGuard.js +117 -0
- package/dist/hooks/scrollbarGutter.d.ts +4 -4
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -1
- package/dist/hooks/scrollbarGutter.js +36 -23
- package/dist/hooks/useActionGroupTracking.d.ts +53 -0
- package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
- package/dist/hooks/useActionGroupTracking.js +174 -0
- package/dist/hooks/useAnimator.d.ts +41 -0
- package/dist/hooks/useAnimator.d.ts.map +1 -0
- package/dist/hooks/useAnimator.js +70 -0
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +1 -0
- package/dist/hooks/useAttachment.d.ts +1 -1
- package/dist/hooks/useAttachment.js +1 -1
- package/dist/hooks/useAutoMediaMode.d.ts.map +1 -1
- package/dist/hooks/useAutoMediaMode.js +1 -0
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +2 -0
- package/dist/hooks/useDevWarning.d.ts.map +1 -1
- package/dist/hooks/useDevWarning.js +2 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +2 -0
- package/dist/hooks/useGridFocus.d.ts +8 -5
- package/dist/hooks/useGridFocus.d.ts.map +1 -1
- package/dist/hooks/useGridFocus.js +4 -3
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +3 -0
- package/dist/hooks/useImageMode.d.ts.map +1 -1
- package/dist/hooks/useImageMode.js +3 -0
- package/dist/hooks/useInputStatusIcon.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +2 -2
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +1 -1
- package/dist/hooks/useLongPress.d.ts +8 -9
- package/dist/hooks/useLongPress.d.ts.map +1 -1
- package/dist/hooks/useLongPress.js +23 -106
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +2 -0
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +3 -0
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +2 -1
- package/dist/hooks/usePressFeedback.d.ts.map +1 -1
- package/dist/hooks/usePressFeedback.js +1 -0
- package/dist/hooks/useResolvedRequired.d.ts +3 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +3 -0
- package/dist/hooks/useScrollLock.d.ts +8 -9
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +50 -48
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +5 -0
- package/dist/hooks/useStreamingText.d.ts.map +1 -1
- package/dist/hooks/useStreamingText.js +3 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +42 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +30 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +30 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/internal/indicatorPress.stylex.d.ts +20 -0
- package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
- package/dist/internal/indicatorPress.stylex.js +26 -0
- package/dist/internal/selectable-card.d.ts +21 -0
- package/dist/internal/selectable-card.d.ts.map +1 -0
- package/dist/internal/selectable-card.js +20 -0
- package/dist/internal/sheetDraft.d.ts +2 -2
- package/dist/internal/sheetDraft.js +2 -2
- package/dist/motion/animatedLayout.d.ts +8 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +246 -53
- package/dist/motion/animator.d.ts +14 -14
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +45 -26
- package/dist/motion/frameBlock.d.ts +14 -0
- package/dist/motion/frameBlock.d.ts.map +1 -0
- package/dist/motion/frameBlock.js +16 -0
- package/dist/motion/progress.d.ts +88 -0
- package/dist/motion/progress.d.ts.map +1 -0
- package/dist/motion/progress.js +128 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -1
- package/dist/motion/reducedMotion.js +3 -1
- package/dist/motion/uikit/alert.d.ts +41 -0
- package/dist/motion/uikit/alert.d.ts.map +1 -0
- package/dist/motion/uikit/alert.js +43 -0
- package/dist/motion/uikit/index.d.ts +4 -3
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +4 -3
- package/dist/motion/uikit/picker.d.ts +96 -0
- package/dist/motion/uikit/picker.d.ts.map +1 -0
- package/dist/motion/uikit/picker.js +117 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +22 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressGroupItem.stylex.js +36 -0
- package/dist/privateAttributes/reducedMotion.stylex.d.ts +23 -0
- package/dist/privateAttributes/reducedMotion.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/reducedMotion.stylex.js +40 -0
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +29 -4
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +14 -13
- package/dist/theme/motionKnobs.d.ts +4 -3
- package/dist/theme/motionKnobs.d.ts.map +1 -1
- package/dist/theme/motionKnobs.js +3 -2
- package/dist/theme/themeMotion.d.ts +6 -0
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +15 -2
- package/dist/theme/tokens.stylex.d.ts +3 -0
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +4 -1
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +12 -0
- package/dist/utils/disabledInteraction.d.ts +10 -2
- package/dist/utils/disabledInteraction.d.ts.map +1 -1
- package/dist/utils/disabledInteraction.js +16 -2
- package/dist/utils/focusReturn.d.ts +22 -25
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +36 -29
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/interactionModality.d.ts.map +1 -1
- package/dist/utils/interactionModality.js +4 -0
- package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +3 -2
- package/dist/utils/isFocusDetached.d.ts +27 -0
- package/dist/utils/isFocusDetached.d.ts.map +1 -0
- package/dist/utils/isFocusDetached.js +32 -0
- package/dist/utils/plainDate.d.ts +31 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +68 -4
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +20 -6
- package/dist/utils/triggerFocus.d.ts +36 -0
- package/dist/utils/triggerFocus.d.ts.map +1 -0
- package/dist/utils/triggerFocus.js +65 -0
- package/locales/en.json +120 -0
- package/locales/pseudo.json +90 -0
- package/package.json +14 -9
- package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
- package/src/AlertDialog/AlertDialog.tsx +46 -5
- package/src/AppShell/AppShell.tsx +13 -4
- package/src/BottomSheet/BottomSheet.tsx +1 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +39 -3
- package/src/BottomSheet/BottomSheetSwitcher.tsx +5 -0
- package/src/BottomSheet/useMobileKeyboard.ts +4 -0
- package/src/BottomSheet/useSheetGestures.ts +10 -1
- package/src/Button/Button.tsx +26 -4
- package/src/Calendar/Calendar.tsx +40 -32
- package/src/Calendar/getWeekdayHeaderNames.ts +88 -0
- package/src/Calendar/hooks/useCalendarDays.ts +5 -10
- package/src/Calendar/{standaloneShortWeekdayNames.generated.ts → weekdayHeaderNames.generated.ts} +14 -14
- package/src/Carousel/Carousel.tsx +1 -0
- package/src/Chat/ChatComposerInput.tsx +4 -7
- package/src/Chat/ChatMessageList.tsx +2 -1
- package/src/Chat/useChatDictation.ts +1 -0
- package/src/Chat/useChatNewMessages.ts +1 -1
- package/src/Chat/useChatStreamScroll.ts +2 -0
- package/src/Chat/useSpeechRecognition.ts +2 -0
- package/src/Chat/useTriggerMenu.tsx +1 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
- package/src/CheckboxInput/CheckboxInput.tsx +38 -15
- package/src/CheckboxList/CheckboxList.doc.mjs +7 -0
- package/src/CheckboxList/CheckboxList.tsx +9 -0
- package/src/CodeBlock/CodeBlock.doc.mjs +9 -1
- package/src/CodeBlock/CodeBlock.tsx +41 -4
- package/src/CommandPalette/CommandPalette.tsx +1 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.tsx +20 -5
- package/src/ContextMenu/ContextMenu.tsx +2 -2
- package/src/DateInput/MonthScroller.tsx +8 -2
- package/src/DateInput/PickerWheel.tsx +765 -0
- package/src/DateInput/TouchDateField.tsx +6 -32
- package/src/DateInput/Wheel.tsx +94 -150
- package/src/DateInput/useOwnScrollGesture.ts +25 -3
- package/src/DateInput/usePointerDragScroll.ts +1 -0
- package/src/DateInput/useScrollSettle.ts +2 -0
- package/src/DateInput/useWheelListbox.ts +112 -0
- package/src/DateInput/wheelOptions.ts +155 -0
- package/src/DateInput/wheelPhysics.ts +406 -0
- package/src/DateInput/wheelStrip.ts +341 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +8 -13
- package/src/Dialog/Dialog.tsx +12 -32
- package/src/Drawer/useDrawerDialogPresence.ts +2 -0
- package/src/DropdownMenu/useMenuOverflow.ts +3 -0
- package/src/Field/Field.tsx +2 -2
- package/src/FieldStatus/useFieldStatusAnnouncement.ts +1 -0
- package/src/FormLayout/FormLayout.doc.mjs +181 -46
- package/src/FormLayout/FormLayout.tsx +5 -1
- package/src/HoverCard/HoverCard.doc.mjs +10 -8
- package/src/HoverCard/HoverCard.tsx +58 -6
- package/src/HoverCard/useHoverCard.doc.mjs +178 -36
- package/src/HoverCard/useHoverCard.tsx +49 -54
- package/src/Icon/Icon.doc.mjs +51 -10
- package/src/Icon/Icon.tsx +15 -7
- package/src/IconButton/IconButton.doc.mjs +141 -21
- package/src/InfoTip/InfoTip.tsx +72 -16
- package/src/Item/useSwipeAction.ts +2 -0
- package/src/Layer/modalOutlet.ts +2 -0
- package/src/Layer/outsidePress.ts +1 -0
- package/src/Layer/useLayer.tsx +3 -1
- package/src/Layer/useLayerDismissal.ts +2 -0
- package/src/Layer/useTouchTrigger.ts +19 -6
- package/src/Layout/index.ts +1 -1
- package/src/Layout/layoutReset.ts +1 -1
- package/src/Layout/overlayPaddingReset.stylex.ts +73 -0
- package/src/Layout/padding.stylex.ts +9 -133
- package/src/Layout/paddingStyles.stylex.ts +87 -0
- package/src/Lightbox/Lightbox.tsx +20 -1
- package/src/Lightbox/useLightbox.doc.mjs +167 -0
- package/src/MobileNav/MobileNav.tsx +10 -31
- package/src/MultiSelector/MultiSelector.tsx +2 -7
- package/src/NumberInput/NumberInput.tsx +2 -7
- package/src/Outline/useOutlineFromDOM.ts +2 -0
- package/src/Outline/useScrollSpy.ts +2 -0
- package/src/OverflowList/OverflowList.tsx +2 -0
- package/src/Popover/Popover.tsx +4 -0
- package/src/Popover/usePopover.tsx +2 -2
- package/src/PowerSearch/PowerSearch.doc.mjs +60 -8
- package/src/PowerSearch/PowerSearch.tsx +620 -157
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2525 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +65 -9
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +2 -0
- package/src/PowerSearch/PowerSearchToken.tsx +2 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +340 -59
- package/src/PowerSearch/formatFilterValue.ts +49 -27
- package/src/PowerSearch/formatTokenValue.ts +220 -0
- package/src/PowerSearch/index.ts +5 -1
- package/src/PowerSearch/powerSearchDateZone.ts +95 -0
- package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
- package/src/PowerSearch/types.ts +8 -1
- package/src/ProgressBar/ProgressBarTouch.ts +2 -0
- package/src/RadioList/RadioList.tsx +3 -2
- package/src/RadioList/RadioListItem.tsx +5 -3
- package/src/Resizable/Resizable.doc.mjs +5 -4
- package/src/Resizable/ResizeHandle.tsx +169 -109
- package/src/Resizable/createResizable.ts +831 -0
- package/src/Resizable/useResizable.ts +292 -623
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +6 -3
- package/src/SelectableCard/SelectableCard.tsx +39 -10
- package/src/SelectableCard/selectableCardInput.ts +30 -0
- package/src/Selector/Selector.tsx +7 -19
- package/src/SideNav/SideNav.tsx +41 -5
- package/src/Slider/Slider.tsx +20 -11
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Spinner/Spinner.tsx +77 -63
- package/src/Stepper/Stepper.tsx +10 -27
- package/src/Switch/Switch.tsx +2 -6
- package/src/Switch/useSwitchTouch.ts +4 -4
- package/src/Table/BaseTable.tsx +46 -12
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +2 -1
- package/src/Table/plugins/filtering/useTableFiltering.tsx +1 -0
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +4 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +2 -0
- package/src/TextArea/TextArea.tsx +2 -7
- package/src/TextInput/TextInput.tsx +13 -17
- package/src/TimeInput/TimeInput.tsx +2 -0
- package/src/TimeInput/TouchTimeField.tsx +2 -0
- package/src/Timer/Timer.tsx +1 -0
- package/src/Timestamp/Timestamp.tsx +1 -1
- package/src/Timestamp/formatInstant.ts +1 -33
- package/src/Toast/Toast.doc.mjs +4 -3
- package/src/Toast/Toast.tsx +52 -32
- package/src/Toast/ToastViewport.tsx +123 -35
- package/src/Toast/types.ts +9 -3
- package/src/Toast/useToast.tsx +1 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +10 -10
- package/src/Tokenizer/Tokenizer.tsx +61 -62
- package/src/Tokenizer/TokenizerBottomSheet.tsx +9 -11
- package/src/Tokenizer/index.ts +1 -0
- package/src/Tooltip/Tooltip.tsx +6 -42
- package/src/Tooltip/useTooltip.doc.mjs +24 -0
- package/src/Tooltip/useTooltip.tsx +237 -134
- package/src/Typeahead/BaseTypeahead.tsx +27 -17
- package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/animator/createAnimator.doc.mjs +153 -0
- package/src/animator/createAnimator.ts +324 -0
- package/src/gestures/GestureHost.ts +1 -1
- package/src/gestures/PressTracker.ts +4 -3
- package/src/gestures/README.md +10 -4
- package/src/hooks/ModalAnnounceProvider.tsx +1 -0
- package/src/hooks/actionGroupTracker.ts +20 -5
- package/src/hooks/index.ts +2 -0
- package/src/hooks/longPressDetector.ts +273 -0
- package/src/hooks/pressGroupContext.ts +21 -0
- package/src/hooks/rootScrollStyles.ts +247 -0
- package/src/hooks/scrollLockTouchGuard.ts +149 -0
- package/src/hooks/scrollbarGutter.ts +41 -26
- package/src/hooks/useActionGroupTracking.ts +224 -0
- package/src/hooks/useAnimator.doc.mjs +109 -0
- package/src/hooks/useAnimator.ts +67 -0
- package/src/hooks/useAnnounceRenderedText.ts +1 -0
- package/src/hooks/useAttachment.ts +1 -1
- package/src/hooks/useAutoMediaMode.ts +1 -0
- package/src/hooks/useBusyAnnouncement.ts +2 -0
- package/src/hooks/useDevWarning.ts +2 -0
- package/src/hooks/useFocusTrap.ts +2 -0
- package/src/hooks/useGridFocus.doc.mjs +6 -6
- package/src/hooks/useGridFocus.ts +10 -7
- package/src/hooks/useHotkeys.ts +2 -0
- package/src/hooks/useImageMode.ts +2 -0
- package/src/hooks/useInputStatusIcon.tsx +3 -2
- package/src/hooks/useKeyboardHint.tsx +1 -1
- package/src/hooks/useLongPress.doc.mjs +2 -2
- package/src/hooks/useLongPress.ts +32 -122
- package/src/hooks/useMenuHover.ts +1 -0
- package/src/hooks/useMenuPress.ts +2 -0
- package/src/hooks/useOverflow.ts +2 -1
- package/src/hooks/usePressFeedback.ts +1 -0
- package/src/hooks/useResolvedRequired.ts +3 -0
- package/src/hooks/useScrollLock.doc.mjs +51 -12
- package/src/hooks/useScrollLock.ts +53 -60
- package/src/hooks/useScrollableArea.ts +4 -0
- package/src/hooks/useStreamingText.ts +2 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
- package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
- package/src/i18n/generated-locales/en.generated.ts +41 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +42 -0
- package/src/index.ts +13 -0
- package/src/internal/indicatorPress.stylex.ts +24 -0
- package/src/internal/selectable-card.ts +21 -0
- package/src/internal/sheetDraft.ts +2 -2
- package/src/motion/MEASUREMENTS.md +18 -0
- package/src/motion/README.md +10 -5
- package/src/motion/animatedLayout.ts +323 -60
- package/src/motion/animator.ts +66 -37
- package/src/motion/frameBlock.ts +16 -0
- package/src/motion/progress.ts +155 -0
- package/src/motion/reducedMotion.ts +3 -1
- package/src/motion/uikit/alert.ts +43 -0
- package/src/motion/uikit/index.ts +4 -3
- package/src/motion/uikit/picker.ts +116 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +44 -0
- package/src/privateAttributes/reducedMotion.stylex.ts +45 -0
- package/src/theme/Theme.tsx +37 -3
- package/src/theme/generateThemeRules.ts +14 -12
- package/src/theme/motionKnobs.ts +4 -3
- package/src/theme/themeMotion.ts +17 -2
- package/src/theme/tokens.stylex.ts +2 -0
- package/src/utils/dateParser.ts +16 -0
- package/src/utils/disabledInteraction.ts +23 -2
- package/src/utils/focusReturn.ts +38 -31
- package/src/utils/index.ts +1 -1
- package/src/utils/interactionModality.ts +4 -0
- package/src/utils/interactionOverlay.stylex.ts +3 -2
- package/src/utils/isFocusDetached.ts +34 -0
- package/src/utils/plainDate.ts +80 -4
- package/src/utils/pressFeedback.ts +24 -6
- package/src/utils/triggerFocus.ts +80 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +0 -14
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts.map +0 -1
- package/dist/Calendar/getStandaloneShortWeekdayNames.js +0 -26
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts.map +0 -1
- package/dist/Layer/usePressPin.d.ts +0 -93
- package/dist/Layer/usePressPin.d.ts.map +0 -1
- package/dist/Layer/usePressPin.js +0 -363
- package/dist/internal/touch-sheet.d.ts +0 -21
- package/dist/internal/touch-sheet.d.ts.map +0 -1
- package/dist/internal/touch-sheet.js +0 -19
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +0 -38
- package/src/Layer/usePressPin.ts +0 -510
- package/src/internal/touch-sheet.ts +0 -21
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @file pressFeedback.ts
|
|
5
|
-
* @input The press state machine (pressGesture.ts), the menu-press
|
|
6
|
-
*
|
|
5
|
+
* @input The press state machine (pressGesture.ts), the menu-press and
|
|
6
|
+
* press-group markers and the document's pointer, keyboard, scroll and
|
|
7
7
|
* visibility events
|
|
8
8
|
* @output PRESSABLE_ATTRIBUTE, PRESSED_ATTRIBUTE, pressableProps and
|
|
9
9
|
* installPressFeedback
|
|
@@ -38,6 +38,7 @@ import { isCoarsePointer, watchCoarsePointer } from "./coarsePointer.js";
|
|
|
38
38
|
import { subscribeInput } from "./inputStream.js";
|
|
39
39
|
import { TOUCH_QUERY } from "./touchPresentation.js";
|
|
40
40
|
import { holdsPressThroughDrag } from "../privateAttributes/pressHoldsDrag.stylex.js";
|
|
41
|
+
import { isTrackedByGroup } from "../privateAttributes/pressGroupItem.stylex.js";
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* The marker the controller finds with `closest()`. Every Astryx component
|
|
@@ -288,14 +289,19 @@ function stylesheetDroppedActive() {
|
|
|
288
289
|
|
|
289
290
|
/**
|
|
290
291
|
* The surface a mouse button's or the Space key's press paints, if any: the
|
|
291
|
-
* innermost marked surface, outside a menu. A key's
|
|
292
|
-
* focused element that is itself the surface, as
|
|
292
|
+
* innermost marked surface, outside a menu and off a tracked action. A key's
|
|
293
|
+
* press paints only a focused element that is itself the surface, as
|
|
294
|
+
* `:active` does.
|
|
293
295
|
*/
|
|
294
296
|
function buttonSurfaceAt(target, pointerId) {
|
|
295
297
|
const element = surfaceAt(target);
|
|
296
298
|
if (element == null || element.closest(MENU_PRESS_ROOT) != null) {
|
|
297
299
|
return null;
|
|
298
300
|
}
|
|
301
|
+
// A tracker that follows a mouse paints a mouse press on its own actions.
|
|
302
|
+
if (pointerId != null && isTrackedByGroup(element, 'mouse')) {
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
299
305
|
if (pointerId == null && element !== target) {
|
|
300
306
|
return null;
|
|
301
307
|
}
|
|
@@ -379,7 +385,10 @@ function onPointerDown(event) {
|
|
|
379
385
|
const braking = element != null && scrollerIsBraking(element);
|
|
380
386
|
lastTouchAt = Date.now();
|
|
381
387
|
lastTouchTarget = event.target instanceof Node ? event.target : null;
|
|
382
|
-
|
|
388
|
+
// A group's tracker that follows this pointer paints its action, so two
|
|
389
|
+
// writers would erase each other's paint. The touch still counts for the
|
|
390
|
+
// brake above.
|
|
391
|
+
if (element == null || braking || isTrackedByGroup(element, event.pointerType)) {
|
|
383
392
|
return;
|
|
384
393
|
}
|
|
385
394
|
takeOver(button, element);
|
|
@@ -509,6 +518,11 @@ function activatesOnSpace(target) {
|
|
|
509
518
|
return target instanceof HTMLInputElement && SPACE_ACTIVATED_INPUT_TYPES.has(target.type);
|
|
510
519
|
}
|
|
511
520
|
|
|
521
|
+
/** A tracked action takes no `:active` paint, so a key's press paints here. */
|
|
522
|
+
function isTrackedAction(target) {
|
|
523
|
+
return target instanceof Element && isTrackedByGroup(target);
|
|
524
|
+
}
|
|
525
|
+
|
|
512
526
|
/**
|
|
513
527
|
* Space went down on a focused button that is itself a pressable surface.
|
|
514
528
|
* Heard in the BUBBLE phase, after the page's own handlers, so a press the
|
|
@@ -516,7 +530,7 @@ function activatesOnSpace(target) {
|
|
|
516
530
|
* not engage for one.
|
|
517
531
|
*/
|
|
518
532
|
function onKeyDown(event) {
|
|
519
|
-
if (event.key !== ' ' || event.repeat || event.isComposing || event.defaultPrevented || !activatesOnSpace(event.target) || !stylesheetDroppedActive()) {
|
|
533
|
+
if (event.key !== ' ' || event.repeat || event.isComposing || event.defaultPrevented || !activatesOnSpace(event.target) || !(stylesheetDroppedActive() || isTrackedAction(event.target))) {
|
|
520
534
|
return;
|
|
521
535
|
}
|
|
522
536
|
pressButton(event.target, null);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file triggerFocus.ts
|
|
3
|
+
* @input A focus event on a hover-layer trigger and its focusTrigger value
|
|
4
|
+
* @output Whether that focus counts as focus on the trigger, and a gate that
|
|
5
|
+
* remembers it for the matching blur
|
|
6
|
+
* @position Shared focus-trigger judgement for Tooltip and HoverCard
|
|
7
|
+
*/
|
|
8
|
+
/** When focus on a trigger opens its layer. */
|
|
9
|
+
export type TriggerFocusMode = 'auto' | 'always' | 'never';
|
|
10
|
+
/** Whether `element` is in the tab order or naturally focusable. */
|
|
11
|
+
export declare function isFocusableTrigger(element: HTMLElement): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether a focus event on a trigger (its `currentTarget`) counts as focus on
|
|
14
|
+
* the trigger.
|
|
15
|
+
*
|
|
16
|
+
* Under `auto` it is decided when focus arrives, not when listeners attach: a
|
|
17
|
+
* roving-tabindex member that was `tabindex="-1"` then can be the tab stop
|
|
18
|
+
* now. A trigger that receives focus is focusable by definition, which covers
|
|
19
|
+
* focusable elements this check does not list, such as a `<summary>` or an SVG
|
|
20
|
+
* link. Focus inside the trigger counts only while the trigger is focusable
|
|
21
|
+
* too, so a plain wrapper ignores its children's focus.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isFocusForTrigger(event: Event, mode: TriggerFocusMode): boolean;
|
|
24
|
+
/** Remembers whether a trigger's current focus counted when it arrived. */
|
|
25
|
+
export interface TriggerFocusGate {
|
|
26
|
+
/** On focusin: whether this focus opens the layer. */
|
|
27
|
+
focusIn(event: Event, mode: TriggerFocusMode): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* On focusout: whether this blur closes the layer. A focus that counted
|
|
30
|
+
* closes on blur even if the trigger has since left the tab order.
|
|
31
|
+
*/
|
|
32
|
+
focusOut(event: Event, mode: TriggerFocusMode): boolean;
|
|
33
|
+
}
|
|
34
|
+
/** A gate for one trigger; each hook keeps one for its lifetime. */
|
|
35
|
+
export declare function createTriggerFocusGate(): TriggerFocusGate;
|
|
36
|
+
//# sourceMappingURL=triggerFocus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggerFocus.d.ts","sourceRoot":"","sources":["../../src/utils/triggerFocus.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D,oEAAoE;AACpE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAShE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAWT;AAED,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC;CACzD;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,IAAI,gBAAgB,CAezD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file triggerFocus.ts
|
|
5
|
+
* @input A focus event on a hover-layer trigger and its focusTrigger value
|
|
6
|
+
* @output Whether that focus counts as focus on the trigger, and a gate that
|
|
7
|
+
* remembers it for the matching blur
|
|
8
|
+
* @position Shared focus-trigger judgement for Tooltip and HoverCard
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** When focus on a trigger opens its layer. */
|
|
12
|
+
|
|
13
|
+
/** Whether `element` is in the tab order or naturally focusable. */
|
|
14
|
+
export function isFocusableTrigger(element) {
|
|
15
|
+
if (element.hasAttribute('tabindex')) {
|
|
16
|
+
return element.tabIndex >= 0;
|
|
17
|
+
}
|
|
18
|
+
const focusableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'];
|
|
19
|
+
if (focusableTags.includes(element.tagName)) {
|
|
20
|
+
return !element.disabled;
|
|
21
|
+
}
|
|
22
|
+
return element.isContentEditable;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Whether a focus event on a trigger (its `currentTarget`) counts as focus on
|
|
27
|
+
* the trigger.
|
|
28
|
+
*
|
|
29
|
+
* Under `auto` it is decided when focus arrives, not when listeners attach: a
|
|
30
|
+
* roving-tabindex member that was `tabindex="-1"` then can be the tab stop
|
|
31
|
+
* now. A trigger that receives focus is focusable by definition, which covers
|
|
32
|
+
* focusable elements this check does not list, such as a `<summary>` or an SVG
|
|
33
|
+
* link. Focus inside the trigger counts only while the trigger is focusable
|
|
34
|
+
* too, so a plain wrapper ignores its children's focus.
|
|
35
|
+
*/
|
|
36
|
+
export function isFocusForTrigger(event, mode) {
|
|
37
|
+
if (mode === 'always') {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
if (mode === 'never') {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
const trigger = event.currentTarget;
|
|
44
|
+
return trigger != null && (event.target === trigger || isFocusableTrigger(trigger));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Remembers whether a trigger's current focus counted when it arrived. */
|
|
48
|
+
|
|
49
|
+
/** A gate for one trigger; each hook keeps one for its lifetime. */
|
|
50
|
+
export function createTriggerFocusGate() {
|
|
51
|
+
let isCounted = false;
|
|
52
|
+
return {
|
|
53
|
+
focusIn(event, mode) {
|
|
54
|
+
isCounted = isFocusForTrigger(event, mode);
|
|
55
|
+
return isCounted;
|
|
56
|
+
},
|
|
57
|
+
focusOut(event, mode) {
|
|
58
|
+
if (!isCounted && !isFocusForTrigger(event, mode)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
isCounted = false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
package/locales/en.json
CHANGED
|
@@ -255,6 +255,126 @@
|
|
|
255
255
|
"defaultMessage": "{count, number} {count, plural, one {result} other {results}}",
|
|
256
256
|
"description": "Live result-count text next to the PowerSearch input, announced to screen readers on change. Example: `12 results`, `1 result`; keep compact."
|
|
257
257
|
},
|
|
258
|
+
"@astryx.powersearch.sheet.filtersTitle": {
|
|
259
|
+
"defaultMessage": "Filters",
|
|
260
|
+
"description": "Heading and accessible name of the PowerSearch touch sheet that lists the active filters (experimental bottom-sheet presentation). Plural noun."
|
|
261
|
+
},
|
|
262
|
+
"@astryx.powersearch.sheet.addFilter": {
|
|
263
|
+
"defaultMessage": "Add filter",
|
|
264
|
+
"description": "Button label in the PowerSearch touch flow: in the Filters sheet header it opens the field list; in the value step it confirms a new filter. Imperative verb; no leading plus sign."
|
|
265
|
+
},
|
|
266
|
+
"@astryx.powersearch.sheet.noFilters": {
|
|
267
|
+
"defaultMessage": "No filters applied",
|
|
268
|
+
"description": "Heading of the PowerSearch Filters sheet empty state when no filter is active (experimental bottom-sheet presentation). Neutral tone."
|
|
269
|
+
},
|
|
270
|
+
"@astryx.powersearch.sheet.noFiltersDescription": {
|
|
271
|
+
"defaultMessage": "Add a filter to narrow your results and find what you need faster.",
|
|
272
|
+
"description": "Guidance line under the PowerSearch Filters sheet empty state, above its Add filter action. One short sentence."
|
|
273
|
+
},
|
|
274
|
+
"@astryx.powersearch.sheet.clearAll": {
|
|
275
|
+
"defaultMessage": "Clear all",
|
|
276
|
+
"description": "Button label in the PowerSearch Filters sheet footer that asks to remove every editable filter. Imperative verb + determiner."
|
|
277
|
+
},
|
|
278
|
+
"@astryx.powersearch.sheet.clearAllTitle": {
|
|
279
|
+
"defaultMessage": "Clear all filters?",
|
|
280
|
+
"description": "Title and accessible name of the confirmation dialog that Clear all opens in the PowerSearch touch flow. A short question."
|
|
281
|
+
},
|
|
282
|
+
"@astryx.powersearch.sheet.clearAllDescription": {
|
|
283
|
+
"defaultMessage": "This removes all editable filters from this search.",
|
|
284
|
+
"description": "Body text of the PowerSearch Clear all confirmation dialog. Read-only filters stay, so it names editable filters."
|
|
285
|
+
},
|
|
286
|
+
"@astryx.powersearch.sheet.clearAllConfirm": {
|
|
287
|
+
"defaultMessage": "Clear filters",
|
|
288
|
+
"description": "Destructive action of the PowerSearch Clear all confirmation dialog: removes the editable filters. Imperative verb + plural noun."
|
|
289
|
+
},
|
|
290
|
+
"@astryx.powersearch.sheet.clearAllCancel": {
|
|
291
|
+
"defaultMessage": "Keep filters",
|
|
292
|
+
"description": "Safe action of the PowerSearch Clear all confirmation dialog: closes it and changes nothing. Imperative verb + plural noun."
|
|
293
|
+
},
|
|
294
|
+
"@astryx.powersearch.sheet.done": {
|
|
295
|
+
"defaultMessage": "Done",
|
|
296
|
+
"description": "Primary button label in the PowerSearch Filters sheet footer that closes the sheet. Short; marks the end of the filtering task."
|
|
297
|
+
},
|
|
298
|
+
"@astryx.powersearch.sheet.search": {
|
|
299
|
+
"defaultMessage": "Search",
|
|
300
|
+
"description": "Screen-reader-only label of the content-search box at the top of the PowerSearch Add filter sheet; its suggestions list inline below it. Noun or verb as reads best."
|
|
301
|
+
},
|
|
302
|
+
"@astryx.powersearch.sheet.searchResults": {
|
|
303
|
+
"defaultMessage": "Search results",
|
|
304
|
+
"description": "Screen-reader-only name of the inline suggestion list under the PowerSearch Add filter sheet's content search. Plural noun."
|
|
305
|
+
},
|
|
306
|
+
"@astryx.powersearch.sheet.searchFields": {
|
|
307
|
+
"defaultMessage": "Search filters",
|
|
308
|
+
"description": "Screen-reader-only label of the field-list filter box in the PowerSearch Add filter sheet, shown once the config has eight or more fields. Imperative verb + plural noun."
|
|
309
|
+
},
|
|
310
|
+
"@astryx.powersearch.sheet.searchFieldsPlaceholder": {
|
|
311
|
+
"defaultMessage": "Search filters…",
|
|
312
|
+
"description": "Placeholder inside the field-list filter box in the PowerSearch Add filter sheet. Imperative verb; trailing `…` is one character."
|
|
313
|
+
},
|
|
314
|
+
"@astryx.powersearch.sheet.ungroupedFields": {
|
|
315
|
+
"defaultMessage": "General",
|
|
316
|
+
"description": "Heading of the PowerSearch Add filter sheet's list of fields that belong to no group, shown before the named groups. A short noun."
|
|
317
|
+
},
|
|
318
|
+
"@astryx.powersearch.sheet.noMatchingFields": {
|
|
319
|
+
"defaultMessage": "No filters match your search",
|
|
320
|
+
"description": "Empty-state text in the PowerSearch Add filter sheet when the field-list filter matches no field. Neutral tone."
|
|
321
|
+
},
|
|
322
|
+
"@astryx.powersearch.sheet.tryDifferentSearch": {
|
|
323
|
+
"defaultMessage": "Try a different search.",
|
|
324
|
+
"description": "Guidance line under the PowerSearch Add filter sheet's empty search result (\"No results found\", \"No filters match your search\"). One short sentence."
|
|
325
|
+
},
|
|
326
|
+
"@astryx.powersearch.sheet.noResults": {
|
|
327
|
+
"defaultMessage": "No results found",
|
|
328
|
+
"description": "Empty-state text in the PowerSearch Add filter sheet when the content search has no suggestion for the typed query. Neutral tone (not error-y)."
|
|
329
|
+
},
|
|
330
|
+
"@astryx.powersearch.sheet.filterUnavailable": {
|
|
331
|
+
"defaultMessage": "This filter is no longer available",
|
|
332
|
+
"description": "Message in the PowerSearch value step when a config update removed the field or operator being edited; Cancel remains as the way out, and the Filters row keeps its remove action."
|
|
333
|
+
},
|
|
334
|
+
"@astryx.powersearch.sheet.removeFilter": {
|
|
335
|
+
"defaultMessage": "Remove {field} filter",
|
|
336
|
+
"description": "Accessible name and tooltip of the trailing remove button on a PowerSearch Filters sheet row; field is the filter's field label (for example \"Remove Status filter\")."
|
|
337
|
+
},
|
|
338
|
+
"@astryx.powersearch.sheet.relativeDaysAgo": {
|
|
339
|
+
"defaultMessage": "{count, number} {count, plural, one {day} other {days}} ago",
|
|
340
|
+
"description": "A relative-date choice row in the PowerSearch touch sheet, in the past (for example \"3 days ago\"). The popover editor lists the same choices."
|
|
341
|
+
},
|
|
342
|
+
"@astryx.powersearch.sheet.relativeDaysFromNow": {
|
|
343
|
+
"defaultMessage": "{count, number} {count, plural, one {day} other {days}} from now",
|
|
344
|
+
"description": "A relative-date choice row in the PowerSearch touch sheet, in the future (for example \"3 days from now\"). The popover editor lists the same choices."
|
|
345
|
+
},
|
|
346
|
+
"@astryx.powersearch.sheet.relativeWeeksAgo": {
|
|
347
|
+
"defaultMessage": "{count, number} {count, plural, one {week} other {weeks}} ago",
|
|
348
|
+
"description": "A relative-date choice row in the PowerSearch touch sheet, in the past (for example \"3 weeks ago\"). The popover editor lists the same choices."
|
|
349
|
+
},
|
|
350
|
+
"@astryx.powersearch.sheet.relativeWeeksFromNow": {
|
|
351
|
+
"defaultMessage": "{count, number} {count, plural, one {week} other {weeks}} from now",
|
|
352
|
+
"description": "A relative-date choice row in the PowerSearch touch sheet, in the future (for example \"3 weeks from now\"). The popover editor lists the same choices."
|
|
353
|
+
},
|
|
354
|
+
"@astryx.powersearch.sheet.relativeMonthsAgo": {
|
|
355
|
+
"defaultMessage": "{count, number} {count, plural, one {month} other {months}} ago",
|
|
356
|
+
"description": "A relative-date choice row in the PowerSearch touch sheet, in the past (for example \"3 months ago\"). The popover editor lists the same choices."
|
|
357
|
+
},
|
|
358
|
+
"@astryx.powersearch.sheet.relativeMonthsFromNow": {
|
|
359
|
+
"defaultMessage": "{count, number} {count, plural, one {month} other {months}} from now",
|
|
360
|
+
"description": "A relative-date choice row in the PowerSearch touch sheet, in the future (for example \"3 months from now\"). The popover editor lists the same choices."
|
|
361
|
+
},
|
|
362
|
+
"@astryx.powersearch.sheet.fieldOperator": {
|
|
363
|
+
"defaultMessage": "{field} {operator}",
|
|
364
|
+
"description": "A field label joined with an operator label in the PowerSearch touch sheet: the value step's title, an operator radio's name, and the first part of a Filters row (for example \"Status is\"). Translators may reorder the two parts."
|
|
365
|
+
},
|
|
366
|
+
"@astryx.powersearch.sheet.labelValue": {
|
|
367
|
+
"defaultMessage": "{label} {value}",
|
|
368
|
+
"description": "A Filters row's \"field operator\" text joined with its value, as the removal announcement reads it (for example \"Status is Open\"). Translators may reorder the two parts."
|
|
369
|
+
},
|
|
370
|
+
"@astryx.powersearch.sheet.filtersClearedWithCount": {
|
|
371
|
+
"defaultMessage": "All filters removed. {resultCount}",
|
|
372
|
+
"description": "Polite screen-reader announcement after Clear all in the PowerSearch touch sheet when the result count changed with it; resultCount is the field's already formatted result count (for example \"240 results\"). Live-region text, never shown on screen."
|
|
373
|
+
},
|
|
374
|
+
"@astryx.powersearch.sheet.editableFiltersClearedWithCount": {
|
|
375
|
+
"defaultMessage": "Editable filters removed. {resultCount}",
|
|
376
|
+
"description": "Polite screen-reader announcement after Clear all in the PowerSearch touch sheet removes the editable filters, keeps read-only ones, and the result count changed with it; resultCount is the field's already formatted result count (for example \"240 results\"). Live-region text, never shown on screen."
|
|
377
|
+
},
|
|
258
378
|
"@astryx.alertDialog.cancel": {
|
|
259
379
|
"defaultMessage": "Cancel",
|
|
260
380
|
"description": "Button label on the secondary/dismiss button of an AlertDialog (modal confirmation). Imperative verb; consumers usually override with task-specific text."
|
package/locales/pseudo.json
CHANGED
|
@@ -191,6 +191,96 @@
|
|
|
191
191
|
"@astryx.powersearch.resultCount": {
|
|
192
192
|
"defaultMessage": "⟦{count, number} {count, plural, one {result} other {results}}⟧"
|
|
193
193
|
},
|
|
194
|
+
"@astryx.powersearch.sheet.filtersTitle": {
|
|
195
|
+
"defaultMessage": "⟦Ƒíłţéřš⟧"
|
|
196
|
+
},
|
|
197
|
+
"@astryx.powersearch.sheet.addFilter": {
|
|
198
|
+
"defaultMessage": "⟦Àðð ƒíłţéř⟧"
|
|
199
|
+
},
|
|
200
|
+
"@astryx.powersearch.sheet.noFilters": {
|
|
201
|
+
"defaultMessage": "⟦Ñó ƒíłţéřš àþþłíéð⟧"
|
|
202
|
+
},
|
|
203
|
+
"@astryx.powersearch.sheet.noFiltersDescription": {
|
|
204
|
+
"defaultMessage": "⟦Àðð à ƒíłţéř ţó ñàřřóŵ ýóúř řéšúłţš àñð ƒíñð ŵĥàţ ýóú ñééð ƒàšţéř.⟧"
|
|
205
|
+
},
|
|
206
|
+
"@astryx.powersearch.sheet.clearAll": {
|
|
207
|
+
"defaultMessage": "⟦Çłéàř àłł⟧"
|
|
208
|
+
},
|
|
209
|
+
"@astryx.powersearch.sheet.clearAllTitle": {
|
|
210
|
+
"defaultMessage": "⟦Çłéàř àłł ƒíłţéřš?⟧"
|
|
211
|
+
},
|
|
212
|
+
"@astryx.powersearch.sheet.clearAllDescription": {
|
|
213
|
+
"defaultMessage": "⟦Ţĥíš řéɱóṽéš àłł éðíţàƀłé ƒíłţéřš ƒřóɱ ţĥíš šéàřçĥ.⟧"
|
|
214
|
+
},
|
|
215
|
+
"@astryx.powersearch.sheet.clearAllConfirm": {
|
|
216
|
+
"defaultMessage": "⟦Çłéàř ƒíłţéřš⟧"
|
|
217
|
+
},
|
|
218
|
+
"@astryx.powersearch.sheet.clearAllCancel": {
|
|
219
|
+
"defaultMessage": "⟦Ķééþ ƒíłţéřš⟧"
|
|
220
|
+
},
|
|
221
|
+
"@astryx.powersearch.sheet.done": {
|
|
222
|
+
"defaultMessage": "⟦Ðóñé⟧"
|
|
223
|
+
},
|
|
224
|
+
"@astryx.powersearch.sheet.search": {
|
|
225
|
+
"defaultMessage": "⟦Šéàřçĥ⟧"
|
|
226
|
+
},
|
|
227
|
+
"@astryx.powersearch.sheet.searchResults": {
|
|
228
|
+
"defaultMessage": "⟦Šéàřçĥ řéšúłţš⟧"
|
|
229
|
+
},
|
|
230
|
+
"@astryx.powersearch.sheet.searchFields": {
|
|
231
|
+
"defaultMessage": "⟦Šéàřçĥ ƒíłţéřš⟧"
|
|
232
|
+
},
|
|
233
|
+
"@astryx.powersearch.sheet.searchFieldsPlaceholder": {
|
|
234
|
+
"defaultMessage": "⟦Šéàřçĥ ƒíłţéřš…⟧"
|
|
235
|
+
},
|
|
236
|
+
"@astryx.powersearch.sheet.ungroupedFields": {
|
|
237
|
+
"defaultMessage": "⟦Ĝéñéřàł⟧"
|
|
238
|
+
},
|
|
239
|
+
"@astryx.powersearch.sheet.noMatchingFields": {
|
|
240
|
+
"defaultMessage": "⟦Ñó ƒíłţéřš ɱàţçĥ ýóúř šéàřçĥ⟧"
|
|
241
|
+
},
|
|
242
|
+
"@astryx.powersearch.sheet.tryDifferentSearch": {
|
|
243
|
+
"defaultMessage": "⟦Ţřý à ð탃éřéñţ šéàřçĥ.⟧"
|
|
244
|
+
},
|
|
245
|
+
"@astryx.powersearch.sheet.noResults": {
|
|
246
|
+
"defaultMessage": "⟦Ñó řéšúłţš ƒóúñð⟧"
|
|
247
|
+
},
|
|
248
|
+
"@astryx.powersearch.sheet.filterUnavailable": {
|
|
249
|
+
"defaultMessage": "⟦Ţĥíš ƒíłţéř íš ñó łóñĝéř àṽàíłàƀłé⟧"
|
|
250
|
+
},
|
|
251
|
+
"@astryx.powersearch.sheet.removeFilter": {
|
|
252
|
+
"defaultMessage": "⟦Řéɱóṽé {field} ƒíłţéř⟧"
|
|
253
|
+
},
|
|
254
|
+
"@astryx.powersearch.sheet.relativeDaysAgo": {
|
|
255
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {day} other {days}} àĝó⟧"
|
|
256
|
+
},
|
|
257
|
+
"@astryx.powersearch.sheet.relativeDaysFromNow": {
|
|
258
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {day} other {days}} ƒřóɱ ñóŵ⟧"
|
|
259
|
+
},
|
|
260
|
+
"@astryx.powersearch.sheet.relativeWeeksAgo": {
|
|
261
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {week} other {weeks}} àĝó⟧"
|
|
262
|
+
},
|
|
263
|
+
"@astryx.powersearch.sheet.relativeWeeksFromNow": {
|
|
264
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {week} other {weeks}} ƒřóɱ ñóŵ⟧"
|
|
265
|
+
},
|
|
266
|
+
"@astryx.powersearch.sheet.relativeMonthsAgo": {
|
|
267
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {month} other {months}} àĝó⟧"
|
|
268
|
+
},
|
|
269
|
+
"@astryx.powersearch.sheet.relativeMonthsFromNow": {
|
|
270
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {month} other {months}} ƒřóɱ ñóŵ⟧"
|
|
271
|
+
},
|
|
272
|
+
"@astryx.powersearch.sheet.fieldOperator": {
|
|
273
|
+
"defaultMessage": "⟦{field} {operator}⟧"
|
|
274
|
+
},
|
|
275
|
+
"@astryx.powersearch.sheet.labelValue": {
|
|
276
|
+
"defaultMessage": "⟦{label} {value}⟧"
|
|
277
|
+
},
|
|
278
|
+
"@astryx.powersearch.sheet.filtersClearedWithCount": {
|
|
279
|
+
"defaultMessage": "⟦Àłł ƒíłţéřš řéɱóṽéð. {resultCount}⟧"
|
|
280
|
+
},
|
|
281
|
+
"@astryx.powersearch.sheet.editableFiltersClearedWithCount": {
|
|
282
|
+
"defaultMessage": "⟦Éðíţàƀłé ƒíłţéřš řéɱóṽéð. {resultCount}⟧"
|
|
283
|
+
},
|
|
194
284
|
"@astryx.alertDialog.cancel": {
|
|
195
285
|
"defaultMessage": "⟦Çàñçéł⟧"
|
|
196
286
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8-canary.0d54fd3",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -824,15 +824,20 @@
|
|
|
824
824
|
"types": "./dist/Markdown/remark.d.ts",
|
|
825
825
|
"default": "./dist/Markdown/remark.js"
|
|
826
826
|
},
|
|
827
|
+
"./internal/indicatorPress.stylex": {
|
|
828
|
+
"source": "./src/internal/indicatorPress.stylex.ts",
|
|
829
|
+
"types": "./dist/internal/indicatorPress.stylex.d.ts",
|
|
830
|
+
"default": "./dist/internal/indicatorPress.stylex.js"
|
|
831
|
+
},
|
|
827
832
|
"./internal/touch": {
|
|
828
833
|
"source": "./src/internal/touch.ts",
|
|
829
834
|
"types": "./dist/internal/touch.d.ts",
|
|
830
835
|
"default": "./dist/internal/touch.js"
|
|
831
836
|
},
|
|
832
|
-
"./internal/
|
|
833
|
-
"source": "./src/internal/
|
|
834
|
-
"types": "./dist/internal/
|
|
835
|
-
"default": "./dist/internal/
|
|
837
|
+
"./internal/selectable-card": {
|
|
838
|
+
"source": "./src/internal/selectable-card.ts",
|
|
839
|
+
"types": "./dist/internal/selectable-card.d.ts",
|
|
840
|
+
"default": "./dist/internal/selectable-card.js"
|
|
836
841
|
}
|
|
837
842
|
},
|
|
838
843
|
"files": [
|
|
@@ -865,6 +870,9 @@
|
|
|
865
870
|
"react-dom": ">=19.0.0"
|
|
866
871
|
},
|
|
867
872
|
"devDependencies": {
|
|
873
|
+
"@astryxdesign/a11y-spec": "0.7.8-canary.0d54fd3",
|
|
874
|
+
"@astryxdesign/cli": "0.7.8-canary.0d54fd3",
|
|
875
|
+
"@astryxdesign/interaction-harness": "0.7.8-canary.0d54fd3",
|
|
868
876
|
"@babel/cli": "^7.29.7",
|
|
869
877
|
"@babel/core": "^7.29.7",
|
|
870
878
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -875,10 +883,7 @@
|
|
|
875
883
|
"@testing-library/jest-dom": "^6.6.0",
|
|
876
884
|
"@testing-library/react": "^16.3.2",
|
|
877
885
|
"@types/babel__core": "^7.20.5",
|
|
878
|
-
"tailwindcss": "^4.3.2"
|
|
879
|
-
"@astryxdesign/a11y-spec": "0.0.0",
|
|
880
|
-
"@astryxdesign/interaction-harness": "0.0.0",
|
|
881
|
-
"@astryxdesign/cli": "0.7.7"
|
|
886
|
+
"tailwindcss": "^4.3.2"
|
|
882
887
|
},
|
|
883
888
|
"dependencies": {
|
|
884
889
|
"intl-messageformat": "^11.2.9"
|
|
@@ -21,7 +21,7 @@ export const docs = {
|
|
|
21
21
|
],
|
|
22
22
|
usage: {
|
|
23
23
|
description:
|
|
24
|
-
'AlertDialog asks the user to confirm a destructive or irreversible action before it happens. Use it for things like deleting content, revoking access, or discarding unsaved changes.\n\nIt implements the WAI-ARIA APG [Alert Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/): `role="alertdialog"`, a title linked by `aria-labelledby`, a consequence description linked by `aria-describedby`, focus moved into the dialog on open and returned to the trigger on close, and no dismissal by clicking outside. Escape cancels.\n\nAlertDialog passes its requested width through to Dialog, which clamps the surface to the container and dynamic viewport with token gutters. Generic Dialog footers should wrap, but Dialog does not own action semantics or order; consumer composition controls that. AlertDialog owns its confirmation semantics: above 640px, actions render horizontally and may move onto another row; at 640px and below, the destructive action appears above Cancel and both buttons fill the footer width. Button labels retain their standard single-line behavior. The breakpoint follows available width, not pointer or hover capability. The body scrolls when block space is constrained.\n\nFor cases where you want to show an alert without managing open state, use the `useImperativeAlertDialog` hook: call `alert.show(options)` and render `alert.element` in your tree.',
|
|
24
|
+
'AlertDialog asks the user to confirm a destructive or irreversible action before it happens. Use it for things like deleting content, revoking access, or discarding unsaved changes.\n\nIt implements the WAI-ARIA APG [Alert Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/): `role="alertdialog"`, a title linked by `aria-labelledby`, a consequence description linked by `aria-describedby`, focus moved into the dialog on open and returned to the trigger on close, and no dismissal by clicking outside. Escape cancels.\n\nAlertDialog passes its requested width through to Dialog, which clamps the surface to the container and dynamic viewport with token gutters. Generic Dialog footers should wrap, but Dialog does not own action semantics or order; consumer composition controls that. AlertDialog owns its confirmation semantics: above 640px, actions render horizontally and may move onto another row; at 640px and below, the destructive action appears above Cancel and both buttons fill the footer width. Button labels retain their standard single-line behavior. The breakpoint follows available width, not pointer or hover capability. The body scrolls when block space is constrained.\n\nThe two actions are tracked as one group under every pointer, the way iOS tracks the actions of an alert: the action under the pointer highlights as soon as it is pressed, the highlight follows the pointer from one action to the other, and the release runs the action under it. Releasing off both actions runs nothing. The keyboard and assistive technology keep the click of each button.\n\nFor cases where you want to show an alert without managing open state, use the `useImperativeAlertDialog` hook: call `alert.show(options)` and render `alert.element` in your tree.',
|
|
25
25
|
bestPractices: [
|
|
26
26
|
{
|
|
27
27
|
guidance: true,
|
|
@@ -196,7 +196,7 @@ export const docsDense = {
|
|
|
196
196
|
'Confirms destructive/irreversible action before it happens (delete, revoke access, discard unsaved changes).',
|
|
197
197
|
usage: {
|
|
198
198
|
description:
|
|
199
|
-
'AlertDialog confirms destructive/irreversible action (delete, revoke access, discard changes). Implements WAI-ARIA APG Alert Dialog pattern (https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/): role="alertdialog", aria-labelledby title, aria-describedby description, focus into dialog on open + back to trigger on close, no outside-click dismissal, Escape cancels. Dialog preserves requested width + clamps it to container/dynamic viewport gutters. Generic Dialog footers wrap while consumers own action order. AlertDialog owns confirmation action layout: >640px horizontal buttons may move to another row; <=640px puts the destructive action above Cancel and makes both buttons full width regardless of pointer/hover capability. Button labels remain single-line. Body scrolls when height constrained. To show w/o managing open state, use useImperativeAlertDialog hook: call alert.show(options) + render alert.element in tree.',
|
|
199
|
+
'AlertDialog confirms destructive/irreversible action (delete, revoke access, discard changes). Implements WAI-ARIA APG Alert Dialog pattern (https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/): role="alertdialog", aria-labelledby title, aria-describedby description, focus into dialog on open + back to trigger on close, no outside-click dismissal, Escape cancels. Dialog preserves requested width + clamps it to container/dynamic viewport gutters. Generic Dialog footers wrap while consumers own action order. AlertDialog owns confirmation action layout: >640px horizontal buttons may move to another row; <=640px puts the destructive action above Cancel and makes both buttons full width regardless of pointer/hover capability. Button labels remain single-line. Body scrolls when height constrained. Every pointer: both actions tracked as one group like iOS alerts (action under pointer highlights at once, highlight follows pointer between actions, release runs action under pointer, release off both runs nothing); keyboard/AT keep each button click. To show w/o managing open state, use useImperativeAlertDialog hook: call alert.show(options) + render alert.element in tree.',
|
|
200
200
|
bestPractices: [
|
|
201
201
|
{
|
|
202
202
|
guidance: true,
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file AlertDialog.tsx
|
|
7
|
-
* @input Uses React, StyleX, Dialog, Layout, Heading, Text, Button
|
|
7
|
+
* @input Uses React, StyleX, Dialog, Layout, Heading, Text, Button, the
|
|
8
|
+
* action-group tracking (hooks/useActionGroupTracking) and the press-group
|
|
9
|
+
* marker (privateAttributes/pressGroupItem.stylex)
|
|
8
10
|
* @output Exports AlertDialog component, AlertDialogProps type
|
|
9
11
|
* @position Core implementation; consumed by index.ts, tested by AlertDialog.test.tsx
|
|
10
12
|
*
|
|
@@ -12,11 +14,12 @@
|
|
|
12
14
|
* - /packages/core/src/AlertDialog/AlertDialog.doc.mjs (props table, features, examples)
|
|
13
15
|
* - /packages/core/src/AlertDialog/AlertDialog.test.tsx (tests for new/changed behavior)
|
|
14
16
|
* - /packages/core/src/AlertDialog/index.ts (exports if types change)
|
|
17
|
+
* - /packages/core/src/AlertDialog/__tests__/AlertDialog.interaction.browser.spec.ts (touch tracking)
|
|
15
18
|
* - /apps/storybook/stories/AlertDialog.stories.tsx (storybook stories)
|
|
16
19
|
* - /packages/cli/assets/templates/blocks/components/AlertDialog/ (showcase blocks)
|
|
17
20
|
*/
|
|
18
21
|
|
|
19
|
-
import React, {useId, useCallback} from 'react';
|
|
22
|
+
import React, {useId, useCallback, useRef} from 'react';
|
|
20
23
|
import * as stylex from '@stylexjs/stylex';
|
|
21
24
|
import {Dialog} from '../Dialog/Dialog';
|
|
22
25
|
import {Layout} from '../Layout/Layout';
|
|
@@ -31,17 +34,31 @@ import type {BaseProps} from '../BaseProps';
|
|
|
31
34
|
import {mergeProps} from '../utils/mergeProps';
|
|
32
35
|
import {themeProps} from '../utils/themeProps';
|
|
33
36
|
import {useMediaQuery} from '../hooks/useMediaQuery';
|
|
37
|
+
import {useTouchPresentation} from '../utils/touchPresentation';
|
|
34
38
|
import {
|
|
35
39
|
registerEnglishFallback,
|
|
36
40
|
useComponentTranslator,
|
|
37
41
|
} from '../i18n/useComponentTranslator';
|
|
38
42
|
import english from '../i18n/generated-english/AlertDialog/AlertDialog.generated';
|
|
43
|
+
import {useActionGroupTracking} from '../hooks/useActionGroupTracking';
|
|
44
|
+
import {PressGroupContext} from '../hooks/pressGroupContext';
|
|
45
|
+
import {alertController} from '../motion/uikit/alert';
|
|
46
|
+
import {pressGroupItemProps} from '../privateAttributes/pressGroupItem.stylex';
|
|
39
47
|
|
|
40
48
|
registerEnglishFallback(english);
|
|
41
49
|
|
|
50
|
+
const SLIDING_POINTERS = ['touch', 'pen'] as const;
|
|
51
|
+
const ACTION_TRACKING_PROPS = pressGroupItemProps(SLIDING_POINTERS);
|
|
52
|
+
|
|
42
53
|
const SMALL_SCREEN_QUERY = '(max-width: 640px)';
|
|
43
54
|
|
|
44
55
|
const styles = stylex.create({
|
|
56
|
+
// The browser may pinch-zoom on the actions but never pans there. Chrome on
|
|
57
|
+
// Android cancels a pointer it pans, which would cancel the group's press.
|
|
58
|
+
// The gesture host keeps an author's narrower touch-action.
|
|
59
|
+
trackingRow: {
|
|
60
|
+
touchAction: 'pinch-zoom',
|
|
61
|
+
},
|
|
45
62
|
action: {
|
|
46
63
|
maxWidth: '100%',
|
|
47
64
|
minWidth: 0,
|
|
@@ -177,6 +194,24 @@ export function AlertDialog({
|
|
|
177
194
|
onOpenChange(false);
|
|
178
195
|
}, [onOpenChange]);
|
|
179
196
|
|
|
197
|
+
// Each action carries the press-group marker from its first render, so the
|
|
198
|
+
// tracker is its only painter.
|
|
199
|
+
const actionsRef = useRef<HTMLElement>(null);
|
|
200
|
+
// Only under the touch presentation does a press slide across the
|
|
201
|
+
// actions. A desktop press stays the native button's.
|
|
202
|
+
const {isTouch} = useTouchPresentation();
|
|
203
|
+
const isTracking = isOpen && isInline !== true && isTouch;
|
|
204
|
+
useActionGroupTracking(actionsRef, {
|
|
205
|
+
// The actions row holds only the two buttons.
|
|
206
|
+
itemSelector: 'button',
|
|
207
|
+
highlightOnsetMs: alertController.actions.highlightOnsetMs,
|
|
208
|
+
highlightExpansion: alertController.actions.highlightExpansion,
|
|
209
|
+
// A mouse press acts as a native button's under any presentation.
|
|
210
|
+
pointerTypes: SLIDING_POINTERS,
|
|
211
|
+
isEnabled: isTracking,
|
|
212
|
+
});
|
|
213
|
+
const actionTrackingProps = isTracking ? ACTION_TRACKING_PROPS : undefined;
|
|
214
|
+
|
|
180
215
|
const buttonActionStyle = [
|
|
181
216
|
styles.action,
|
|
182
217
|
isSmallScreen && styles.stackedAction,
|
|
@@ -188,6 +223,7 @@ export function AlertDialog({
|
|
|
188
223
|
label={cancelLabel}
|
|
189
224
|
onClick={handleCancel}
|
|
190
225
|
xstyle={buttonActionStyle}
|
|
226
|
+
{...actionTrackingProps}
|
|
191
227
|
// Dialog focuses [data-autofocus] itself after showModal(), because
|
|
192
228
|
// React's autoFocus runs during commit while the dialog is invisible.
|
|
193
229
|
// Cancel is least destructive, so it remains the autofocus target even
|
|
@@ -203,6 +239,7 @@ export function AlertDialog({
|
|
|
203
239
|
onClick={onAction}
|
|
204
240
|
isLoading={isActionLoading}
|
|
205
241
|
xstyle={buttonActionStyle}
|
|
242
|
+
{...actionTrackingProps}
|
|
206
243
|
/>
|
|
207
244
|
);
|
|
208
245
|
|
|
@@ -244,13 +281,17 @@ export function AlertDialog({
|
|
|
244
281
|
destructive-above-Cancel narrow order because confirmation
|
|
245
282
|
actions have component-specific meaning here. */}
|
|
246
283
|
<Stack
|
|
284
|
+
ref={actionsRef}
|
|
285
|
+
xstyle={isTracking && styles.trackingRow}
|
|
247
286
|
direction={isSmallScreen ? 'vertical' : 'horizontal'}
|
|
248
287
|
gap={2}
|
|
249
288
|
hAlign={isSmallScreen ? 'stretch' : 'end'}
|
|
250
289
|
wrap={isSmallScreen ? 'nowrap' : 'wrap'}>
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
290
|
+
<PressGroupContext value={isTracking}>
|
|
291
|
+
{isSmallScreen
|
|
292
|
+
? [actionButton, cancelButton]
|
|
293
|
+
: [cancelButton, actionButton]}
|
|
294
|
+
</PressGroupContext>
|
|
254
295
|
</Stack>
|
|
255
296
|
</LayoutFooter>
|
|
256
297
|
}
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
holdLayoutSwap,
|
|
60
60
|
landLayoutGlide,
|
|
61
61
|
layoutMotionFor,
|
|
62
|
+
layoutStartFor,
|
|
62
63
|
playLayoutFrames,
|
|
63
64
|
playLayoutSwap,
|
|
64
65
|
reportLayoutChange,
|
|
@@ -647,6 +648,8 @@ export function AppShell({
|
|
|
647
648
|
if (isMobileNavOpen && !isMobileNavCloseHeld) {
|
|
648
649
|
setIsMobileNavCloseHeld(true);
|
|
649
650
|
}
|
|
651
|
+
// Syncs the mobile-nav close hold with a timer. The hold ends after the
|
|
652
|
+
// slide-out delay.
|
|
650
653
|
useEffect(() => {
|
|
651
654
|
if (!HasActivity || isMobileNavOpen) {
|
|
652
655
|
return;
|
|
@@ -814,6 +817,8 @@ export function AppShell({
|
|
|
814
817
|
const headerRef = useRef<HTMLDivElement>(null);
|
|
815
818
|
const shellRef = useRef<HTMLDivElement>(null);
|
|
816
819
|
|
|
820
|
+
// Syncs the header-height CSS variable with a ResizeObserver while the height
|
|
821
|
+
// is automatic.
|
|
817
822
|
useEffect(() => {
|
|
818
823
|
if (!isAuto || !headerRef.current || !shellRef.current) {
|
|
819
824
|
return;
|
|
@@ -996,9 +1001,13 @@ export function AppShell({
|
|
|
996
1001
|
let entering = 0;
|
|
997
1002
|
const last = lastSwapRef.current;
|
|
998
1003
|
if (last != null && motion.kind === 'spring') {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1004
|
+
// Read at the change's own start, where the glide it retargets
|
|
1005
|
+
// carries on. After a block, that is later than the frame the
|
|
1006
|
+
// timeline still reads.
|
|
1007
|
+
const elapsed = Math.max(
|
|
1008
|
+
0,
|
|
1009
|
+
layoutStartFor(main.ownerDocument) - last.startedAt,
|
|
1010
|
+
);
|
|
1002
1011
|
if (elapsed < motion.progress.durationMs) {
|
|
1003
1012
|
const p = 1 - motion.progress.remaining(elapsed);
|
|
1004
1013
|
held = last.entering + (1 - last.entering) * p;
|
|
@@ -1058,7 +1067,7 @@ export function AppShell({
|
|
|
1058
1067
|
}
|
|
1059
1068
|
const {held, entering} = pending;
|
|
1060
1069
|
lastSwapRef.current = {
|
|
1061
|
-
startedAt:
|
|
1070
|
+
startedAt: layoutStartFor(main.ownerDocument),
|
|
1062
1071
|
held,
|
|
1063
1072
|
entering,
|
|
1064
1073
|
};
|