@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
|
@@ -452,7 +452,7 @@ export function useTriggerMenu(
|
|
|
452
452
|
});
|
|
453
453
|
const {show: showPopover, hide: hidePopover} = popover;
|
|
454
454
|
|
|
455
|
-
//
|
|
455
|
+
// Releases the search timer and the anchor span on unmount.
|
|
456
456
|
useEffect(() => {
|
|
457
457
|
return () => {
|
|
458
458
|
if (searchTimeoutRef.current) {
|
|
@@ -151,6 +151,15 @@ export const docs = {
|
|
|
151
151
|
},
|
|
152
152
|
{className: 'astryx-checkbox-label'},
|
|
153
153
|
],
|
|
154
|
+
vars: [
|
|
155
|
+
{
|
|
156
|
+
name: '--_indicator-press-image',
|
|
157
|
+
description:
|
|
158
|
+
"The row's touch press image, handed down to a first-party indicator that paints its own press. Set from the press paint only while the row itself is pressed; only this row declares it.",
|
|
159
|
+
default: 'none',
|
|
160
|
+
private: true,
|
|
161
|
+
},
|
|
162
|
+
],
|
|
154
163
|
},
|
|
155
164
|
usage: {
|
|
156
165
|
accessibility: [
|
|
@@ -390,6 +399,15 @@ export const docsZh = {
|
|
|
390
399
|
},
|
|
391
400
|
{className: 'astryx-checkbox-label'},
|
|
392
401
|
],
|
|
402
|
+
vars: [
|
|
403
|
+
{
|
|
404
|
+
name: '--_indicator-press-image',
|
|
405
|
+
description:
|
|
406
|
+
'复选框行的触摸按下图像,传递给自行绘制按下效果的第一方指示器。仅在该行自身被按下时根据按下涂层设置,只有该行声明它。',
|
|
407
|
+
default: 'none',
|
|
408
|
+
private: true,
|
|
409
|
+
},
|
|
410
|
+
],
|
|
393
411
|
},
|
|
394
412
|
};
|
|
395
413
|
|
|
@@ -46,11 +46,11 @@ import {useTooltip} from '../Tooltip/useTooltip';
|
|
|
46
46
|
import {mergeProps} from '../utils/mergeProps';
|
|
47
47
|
import {rtlStyles} from '../utils/rtlStyles';
|
|
48
48
|
import {indicatorScope} from '../Indicator/indicator.markers.stylex';
|
|
49
|
+
import {indicatorPressScope} from '../internal/indicatorPress.stylex';
|
|
49
50
|
import {interactionOverlayStyles} from '../utils/interactionOverlay.stylex';
|
|
50
51
|
import {useIndicatorFocusRing} from '../hooks/useIndicatorFocusRing';
|
|
51
52
|
import {useBusyAnnouncement} from '../hooks/useBusyAnnouncement';
|
|
52
53
|
import {usePressFeedback} from '../hooks/usePressFeedback';
|
|
53
|
-
import {useResolvedRequired} from '../hooks/useResolvedRequired';
|
|
54
54
|
import {useIndicator} from '../Indicator/useIndicator';
|
|
55
55
|
import {themeProps} from '../utils/themeProps';
|
|
56
56
|
|
|
@@ -63,6 +63,11 @@ import english from '../i18n/generated-english/CheckboxInput/CheckboxInput.gener
|
|
|
63
63
|
|
|
64
64
|
registerEnglishFallback(english);
|
|
65
65
|
|
|
66
|
+
/** Written by the touch press controller while the row is pressed. */
|
|
67
|
+
const PRESSED_ON = '[data-astryx-press="on"]';
|
|
68
|
+
/** Written by the touch press controller for the press's release. */
|
|
69
|
+
const PRESSED_FADING = '[data-astryx-press="fading"]';
|
|
70
|
+
|
|
66
71
|
// The touch press's paint, declared by the shared overlay styles on the
|
|
67
72
|
// element the controller writes to (`pressedAlpha`) at the press's strength,
|
|
68
73
|
// 1 while on and 1 → 0 over the release, and inherited resolved by the layer
|
|
@@ -78,6 +83,20 @@ const styles = stylex.create({
|
|
|
78
83
|
containerLabelHidden: {
|
|
79
84
|
gap: 0,
|
|
80
85
|
},
|
|
86
|
+
// An indicator in another package may not name this row's private press
|
|
87
|
+
// attribute. So the row hands its touch press image down to an indicator
|
|
88
|
+
// that paints its own press, but only in its own press states. A pressed
|
|
89
|
+
// ancestor row reaches it no more than it reaches the built-in box. The
|
|
90
|
+
// property has no default: a layered stylesheet ranks a default above the
|
|
91
|
+
// arms. Only this row declares it. A menu item paints its own press, so a
|
|
92
|
+
// mapped indicator there paints none.
|
|
93
|
+
indicatorPressImage: {
|
|
94
|
+
'--_indicator-press-image': {
|
|
95
|
+
default: null,
|
|
96
|
+
[PRESSED_ON]: 'var(--_press-paint-image)',
|
|
97
|
+
[PRESSED_FADING]: 'var(--_press-paint-image)',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
81
100
|
checkboxWrapper: {
|
|
82
101
|
position: 'relative',
|
|
83
102
|
display: 'flex',
|
|
@@ -86,15 +105,22 @@ const styles = stylex.create({
|
|
|
86
105
|
flexShrink: 0,
|
|
87
106
|
isolation: 'isolate',
|
|
88
107
|
},
|
|
89
|
-
// The owner paints this layer over the resolved indicator, so a theme
|
|
90
|
-
// replacement
|
|
108
|
+
// The owner paints this layer over the resolved indicator, so a plain theme
|
|
109
|
+
// replacement keeps the pressed feedback. An indicator with
|
|
110
|
+
// `indicatorPressScope` paints its own press from what the row hands down,
|
|
111
|
+
// so this layer stays off over it.
|
|
91
112
|
// Two pointers, two press models (see interactionOverlay.stylex.ts): a
|
|
92
113
|
// mouse keeps `:active`; under a coarse pointer that arm is dropped and the
|
|
93
114
|
// touch press controller writes `data-astryx-press` on the row, which this layer
|
|
94
115
|
// reads off the same scope marker as the hover tint.
|
|
95
116
|
indicatorPressOverlay: {
|
|
96
117
|
'::after': {
|
|
97
|
-
|
|
118
|
+
// `when.descendant` takes a pseudo-class; `:is(*)` matches any marked
|
|
119
|
+
// indicator.
|
|
120
|
+
content: {
|
|
121
|
+
default: '""',
|
|
122
|
+
[stylex.when.descendant(':is(*)', indicatorPressScope)]: 'none',
|
|
123
|
+
},
|
|
98
124
|
position: 'absolute',
|
|
99
125
|
inset: 0,
|
|
100
126
|
borderRadius: radiusVars['--radius-inner'],
|
|
@@ -112,15 +138,14 @@ const styles = stylex.create({
|
|
|
112
138
|
// what moves. Coarse pointers only, like the drop above.
|
|
113
139
|
backgroundImage: {
|
|
114
140
|
default: null,
|
|
115
|
-
[stylex.when.ancestor(
|
|
141
|
+
[stylex.when.ancestor(PRESSED_ON, indicatorScope)]: {
|
|
142
|
+
default: null,
|
|
143
|
+
'@media (pointer: coarse)': pressedOverlayImage,
|
|
144
|
+
},
|
|
145
|
+
[stylex.when.ancestor(PRESSED_FADING, indicatorScope)]: {
|
|
116
146
|
default: null,
|
|
117
147
|
'@media (pointer: coarse)': pressedOverlayImage,
|
|
118
148
|
},
|
|
119
|
-
[stylex.when.ancestor('[data-astryx-press="fading"]', indicatorScope)]:
|
|
120
|
-
{
|
|
121
|
-
default: null,
|
|
122
|
-
'@media (pointer: coarse)': pressedOverlayImage,
|
|
123
|
-
},
|
|
124
149
|
},
|
|
125
150
|
},
|
|
126
151
|
},
|
|
@@ -352,10 +377,6 @@ export function CheckboxInput({
|
|
|
352
377
|
const id = idProp || generatedId;
|
|
353
378
|
const descriptionID = useId();
|
|
354
379
|
const statusMessageID = useId();
|
|
355
|
-
// Announce the effective required state (form default included) while the
|
|
356
|
-
// native `required` stays bound to the explicit `isRequired` so a layout
|
|
357
|
-
// default never switches on browser validation.
|
|
358
|
-
const isEffectivelyRequired = useResolvedRequired({isRequired, isOptional});
|
|
359
380
|
|
|
360
381
|
const [, startTransition] = useTransition();
|
|
361
382
|
const [optimisticValue, setOptimisticValue] = useOptimistic(value);
|
|
@@ -450,6 +471,7 @@ export function CheckboxInput({
|
|
|
450
471
|
// Hover and focus reach the checkbox visual through this ancestor
|
|
451
472
|
// marker rather than props, so the whole row drives it.
|
|
452
473
|
!isDisabled && indicatorScope,
|
|
474
|
+
!isDisabled && styles.indicatorPressImage,
|
|
453
475
|
// The touch press's strength and release live on the row the
|
|
454
476
|
// controller writes to; the layer over the checkbox box inherits
|
|
455
477
|
// and paints it.
|
|
@@ -484,7 +506,8 @@ export function CheckboxInput({
|
|
|
484
506
|
onClick={isDisabled ? undefined : rest.onClick}
|
|
485
507
|
readOnly={isReadOnly}
|
|
486
508
|
required={isRequired}
|
|
487
|
-
|
|
509
|
+
// A form's required default sets nothing here: an unchecked box is an answer.
|
|
510
|
+
aria-required={isRequired ? 'true' : undefined}
|
|
488
511
|
onChange={e => {
|
|
489
512
|
if (isDisabled || isBusy || isReadOnly) {
|
|
490
513
|
// Activation clears the native mixed state; React restores
|
|
@@ -127,6 +127,13 @@ export const docs = {
|
|
|
127
127
|
type: 'string',
|
|
128
128
|
description: 'Description text displayed below the label.',
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
name: 'isOptional',
|
|
132
|
+
type: 'boolean',
|
|
133
|
+
description:
|
|
134
|
+
'Whether the group is optional. Shows the optional indicator after the group label, unless a surrounding FormLayout already makes fields optional by default.',
|
|
135
|
+
default: 'false',
|
|
136
|
+
},
|
|
130
137
|
{
|
|
131
138
|
name: 'density',
|
|
132
139
|
type: "'compact' | 'balanced' | 'spacious'",
|
|
@@ -65,6 +65,13 @@ export interface CheckboxListProps extends Omit<
|
|
|
65
65
|
* Description text displayed below the label.
|
|
66
66
|
*/
|
|
67
67
|
description?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the group is optional. Shows the optional indicator after the
|
|
70
|
+
* group label, unless a surrounding `FormLayout` already makes fields
|
|
71
|
+
* optional by default.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
isOptional?: boolean;
|
|
68
75
|
/**
|
|
69
76
|
* Status indicator for the checkbox group.
|
|
70
77
|
* When set with a message, displays a colored message box below the group.
|
|
@@ -153,6 +160,7 @@ export function CheckboxList({
|
|
|
153
160
|
label,
|
|
154
161
|
isLabelHidden = false,
|
|
155
162
|
description,
|
|
163
|
+
isOptional = false,
|
|
156
164
|
status,
|
|
157
165
|
value,
|
|
158
166
|
onChange,
|
|
@@ -270,6 +278,7 @@ export function CheckboxList({
|
|
|
270
278
|
inputID={inputID}
|
|
271
279
|
labelID={labelID}
|
|
272
280
|
isGroupLabel
|
|
281
|
+
isOptional={isOptional}
|
|
273
282
|
descriptionID={description ? descriptionID : undefined}
|
|
274
283
|
isDisabled={isDisabled}
|
|
275
284
|
status={
|
|
@@ -51,10 +51,18 @@ export const docs = {
|
|
|
51
51
|
description: 'Show a line number gutter.',
|
|
52
52
|
default: 'false',
|
|
53
53
|
},
|
|
54
|
+
{
|
|
55
|
+
name: 'startLineNumber',
|
|
56
|
+
type: 'number',
|
|
57
|
+
description:
|
|
58
|
+
'First line number shown in the gutter. The gutter shows file coordinates (startLineNumber + index) so a code excerpt reads with its real line numbers. highlightLines uses the same file coordinates. Values below 1 clamp to 1.',
|
|
59
|
+
default: '1',
|
|
60
|
+
},
|
|
54
61
|
{
|
|
55
62
|
name: 'highlightLines',
|
|
56
63
|
type: 'number[]',
|
|
57
|
-
description:
|
|
64
|
+
description:
|
|
65
|
+
'1-indexed line numbers to highlight, in the same file coordinates as the gutter (see startLineNumber). Out-of-range entries render no highlight.',
|
|
58
66
|
},
|
|
59
67
|
{
|
|
60
68
|
name: 'isDiff',
|
|
@@ -456,6 +456,7 @@ const LINE_CHUNK_THRESHOLD = 100;
|
|
|
456
456
|
const CodeChunk = React.memo(function CodeChunk({
|
|
457
457
|
lines,
|
|
458
458
|
startIndex,
|
|
459
|
+
startLineNumber,
|
|
459
460
|
highlightSet,
|
|
460
461
|
diffKinds,
|
|
461
462
|
renderLineContent,
|
|
@@ -463,6 +464,7 @@ const CodeChunk = React.memo(function CodeChunk({
|
|
|
463
464
|
}: {
|
|
464
465
|
lines: string[];
|
|
465
466
|
startIndex: number;
|
|
467
|
+
startLineNumber: number;
|
|
466
468
|
highlightSet: Set<number> | null;
|
|
467
469
|
diffKinds: ReadonlyArray<DiffLineKind> | null;
|
|
468
470
|
renderLineContent: (line: string, lineIndex: number) => React.ReactNode;
|
|
@@ -472,11 +474,12 @@ const CodeChunk = React.memo(function CodeChunk({
|
|
|
472
474
|
<>
|
|
473
475
|
{lines.map((line, j) => {
|
|
474
476
|
const i = startIndex + j;
|
|
477
|
+
const lineNumber = startLineNumber + i;
|
|
475
478
|
const diffKind = diffKinds?.[i];
|
|
476
479
|
return (
|
|
477
480
|
<div
|
|
478
481
|
key={i}
|
|
479
|
-
data-line={
|
|
482
|
+
data-line={lineNumber}
|
|
480
483
|
data-diff={diffKind === 'context' ? undefined : diffKind}
|
|
481
484
|
{...stylex.props(
|
|
482
485
|
styles.line,
|
|
@@ -488,7 +491,8 @@ const CodeChunk = React.memo(function CodeChunk({
|
|
|
488
491
|
diffKind === 'header' && styles.lineDiffHeader,
|
|
489
492
|
// Last on purpose: a highlight replaces a diff tint rather than
|
|
490
493
|
// stacking on it, so tokens keep their single-paint contrast.
|
|
491
|
-
(highlightSet?.has(
|
|
494
|
+
(highlightSet?.has(lineNumber) ?? false) &&
|
|
495
|
+
styles.lineHighlighted,
|
|
492
496
|
)}>
|
|
493
497
|
{renderLineContent(line, i)}
|
|
494
498
|
</div>
|
|
@@ -504,6 +508,7 @@ function renderLines(
|
|
|
504
508
|
diffKinds: ReadonlyArray<DiffLineKind> | null,
|
|
505
509
|
renderLineContent: (line: string, lineIndex: number) => React.ReactNode,
|
|
506
510
|
lineNumbers: boolean,
|
|
511
|
+
startLineNumber: number,
|
|
507
512
|
chunkSize: number = LINE_CHUNK_SIZE,
|
|
508
513
|
): React.ReactNode {
|
|
509
514
|
chunkSize = Math.max(1, Math.floor(chunkSize));
|
|
@@ -513,6 +518,7 @@ function renderLines(
|
|
|
513
518
|
<CodeChunk
|
|
514
519
|
lines={lines}
|
|
515
520
|
startIndex={0}
|
|
521
|
+
startLineNumber={startLineNumber}
|
|
516
522
|
highlightSet={highlightSet}
|
|
517
523
|
diffKinds={diffKinds}
|
|
518
524
|
renderLineContent={renderLineContent}
|
|
@@ -536,6 +542,7 @@ function renderLines(
|
|
|
536
542
|
<CodeChunk
|
|
537
543
|
lines={chunkLines}
|
|
538
544
|
startIndex={start}
|
|
545
|
+
startLineNumber={startLineNumber}
|
|
539
546
|
highlightSet={highlightSet}
|
|
540
547
|
diffKinds={diffKinds}
|
|
541
548
|
renderLineContent={renderLineContent}
|
|
@@ -566,6 +573,15 @@ export interface CodeBlockProps extends BaseProps<HTMLPreElement> {
|
|
|
566
573
|
title?: string;
|
|
567
574
|
hasLanguageLabel?: boolean;
|
|
568
575
|
hasLineNumbers?: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* First line's number in the source file. The gutter shows file
|
|
578
|
+
* coordinates (`startLineNumber + index`) instead of starting at 1, so a
|
|
579
|
+
* code excerpt reads with its real line numbers. `highlightLines` uses the
|
|
580
|
+
* same file coordinates. Values below 1 clamp to 1.
|
|
581
|
+
* @default 1
|
|
582
|
+
*/
|
|
583
|
+
startLineNumber?: number;
|
|
584
|
+
/** 1-indexed line numbers to highlight, in the same file coordinates as the gutter (see `startLineNumber`). Out-of-range entries render no highlight. */
|
|
569
585
|
highlightLines?: number[];
|
|
570
586
|
/**
|
|
571
587
|
* Render the code as a unified diff over `language`: lines starting with
|
|
@@ -792,6 +808,7 @@ function SpanCodeContent({
|
|
|
792
808
|
sizeStyle,
|
|
793
809
|
hasLineNumbers,
|
|
794
810
|
maxDigits,
|
|
811
|
+
startLineNumber,
|
|
795
812
|
}: {
|
|
796
813
|
lines: string[];
|
|
797
814
|
tokenLines: TokenLine[];
|
|
@@ -802,7 +819,10 @@ function SpanCodeContent({
|
|
|
802
819
|
sizeStyle: stylex.StyleXStyles;
|
|
803
820
|
hasLineNumbers: boolean;
|
|
804
821
|
maxDigits: number;
|
|
822
|
+
startLineNumber: number;
|
|
805
823
|
}) {
|
|
824
|
+
// Syncs the document's ::highlight() stylesheet. The rules go in one time,
|
|
825
|
+
// before layout reads.
|
|
806
826
|
useInsertionEffect(() => {
|
|
807
827
|
ensureHighlightStyles();
|
|
808
828
|
}, []);
|
|
@@ -861,6 +881,7 @@ function SpanCodeContent({
|
|
|
861
881
|
diffKinds,
|
|
862
882
|
renderLineContent,
|
|
863
883
|
hasLineNumbers,
|
|
884
|
+
startLineNumber,
|
|
864
885
|
)}
|
|
865
886
|
</code>
|
|
866
887
|
);
|
|
@@ -879,6 +900,7 @@ function RangeCodeContent({
|
|
|
879
900
|
sizeStyle,
|
|
880
901
|
hasLineNumbers,
|
|
881
902
|
maxDigits,
|
|
903
|
+
startLineNumber,
|
|
882
904
|
}: {
|
|
883
905
|
lines: string[];
|
|
884
906
|
tokenLines: TokenLine[];
|
|
@@ -888,6 +910,7 @@ function RangeCodeContent({
|
|
|
888
910
|
sizeStyle: stylex.StyleXStyles;
|
|
889
911
|
hasLineNumbers: boolean;
|
|
890
912
|
maxDigits: number;
|
|
913
|
+
startLineNumber: number;
|
|
891
914
|
}) {
|
|
892
915
|
const codeRef = useRef<HTMLElement>(null);
|
|
893
916
|
|
|
@@ -902,6 +925,8 @@ function RangeCodeContent({
|
|
|
902
925
|
}
|
|
903
926
|
}, []);
|
|
904
927
|
|
|
928
|
+
// Syncs the CSS.highlights registry with the token ranges. It applies them in
|
|
929
|
+
// chunks.
|
|
905
930
|
useEffect(() => {
|
|
906
931
|
if (!hasHighlightAPI()) {
|
|
907
932
|
return;
|
|
@@ -939,6 +964,7 @@ function RangeCodeContent({
|
|
|
939
964
|
diffKinds,
|
|
940
965
|
renderLineContent,
|
|
941
966
|
hasLineNumbers,
|
|
967
|
+
startLineNumber,
|
|
942
968
|
)}
|
|
943
969
|
</code>
|
|
944
970
|
);
|
|
@@ -963,6 +989,7 @@ export function CodeBlock({
|
|
|
963
989
|
title,
|
|
964
990
|
hasLanguageLabel = true,
|
|
965
991
|
hasLineNumbers = false,
|
|
992
|
+
startLineNumber = 1,
|
|
966
993
|
highlightLines,
|
|
967
994
|
isDiff = false,
|
|
968
995
|
hasCopyButton = true,
|
|
@@ -1019,6 +1046,12 @@ export function CodeBlock({
|
|
|
1019
1046
|
customTokenizer,
|
|
1020
1047
|
);
|
|
1021
1048
|
const diffKinds = diff?.kinds ?? null;
|
|
1049
|
+
// File coordinates for the gutter and highlights. Values below 1 clamp to
|
|
1050
|
+
// 1 so the gutter never shows a 0 or negative line number.
|
|
1051
|
+
const effectiveStartLineNumber =
|
|
1052
|
+
Number.isFinite(startLineNumber) && startLineNumber > 1
|
|
1053
|
+
? Math.floor(startLineNumber)
|
|
1054
|
+
: 1;
|
|
1022
1055
|
const highlightSet = useMemo(
|
|
1023
1056
|
() => (highlightLines ? new Set(highlightLines) : null),
|
|
1024
1057
|
[highlightLines],
|
|
@@ -1032,8 +1065,10 @@ export function CodeBlock({
|
|
|
1032
1065
|
}, [code, copy, onCopy]);
|
|
1033
1066
|
|
|
1034
1067
|
const sizeStyle = size === 'sm' ? styles.sizeSm : styles.sizeMd;
|
|
1035
|
-
// Digits in the largest line number — sizes the gutter column width.
|
|
1036
|
-
const maxLineDigits = String(
|
|
1068
|
+
// Digits in the largest visible line number — sizes the gutter column width.
|
|
1069
|
+
const maxLineDigits = String(
|
|
1070
|
+
effectiveStartLineNumber + lines.length - 1,
|
|
1071
|
+
).length;
|
|
1037
1072
|
// With the diff layer on, the label and viewport name say so: `diff` over
|
|
1038
1073
|
// plaintext, `tsx diff` over a language — so a diff keeps its header,
|
|
1039
1074
|
// collapse control, and a name that still matches a `diff` fence.
|
|
@@ -1219,6 +1254,7 @@ export function CodeBlock({
|
|
|
1219
1254
|
sizeStyle={sizeStyle}
|
|
1220
1255
|
hasLineNumbers={hasLineNumbers}
|
|
1221
1256
|
maxDigits={maxLineDigits}
|
|
1257
|
+
startLineNumber={effectiveStartLineNumber}
|
|
1222
1258
|
/>
|
|
1223
1259
|
) : (
|
|
1224
1260
|
<RangeCodeContent
|
|
@@ -1230,6 +1266,7 @@ export function CodeBlock({
|
|
|
1230
1266
|
sizeStyle={sizeStyle}
|
|
1231
1267
|
hasLineNumbers={hasLineNumbers}
|
|
1232
1268
|
maxDigits={maxLineDigits}
|
|
1269
|
+
startLineNumber={effectiveStartLineNumber}
|
|
1233
1270
|
/>
|
|
1234
1271
|
)}
|
|
1235
1272
|
</div>
|
|
@@ -509,6 +509,7 @@ export function CommandPalette<T extends SearchableItem = SearchableItem>({
|
|
|
509
509
|
const runSearchRef = useRef(runSearch);
|
|
510
510
|
runSearchRef.current = runSearch;
|
|
511
511
|
|
|
512
|
+
// Syncs the search source with `isOpen`. An open runs the empty-query search.
|
|
512
513
|
useEffect(() => {
|
|
513
514
|
if (isOpen) {
|
|
514
515
|
runSearchRef.current('');
|
|
@@ -155,6 +155,7 @@ export function CommandPaletteItem({
|
|
|
155
155
|
(ctx ? ctx.highlightedIndex === itemIndex && itemIndex >= 0 : false);
|
|
156
156
|
const isSelected = controlledSelected ?? (ctx ? ctx.value === value : false);
|
|
157
157
|
|
|
158
|
+
// Syncs the scroll position of a standalone item with `isHighlighted`.
|
|
158
159
|
useEffect(() => {
|
|
159
160
|
// Inside CommandPalette the shared useHighlightedOptionScroll (via
|
|
160
161
|
// useCombobox) is the single scrollIntoView owner (#6077); a second owner
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
} from '../Field/fieldParts';
|
|
36
36
|
import {useDevWarning} from '../hooks/useDevWarning';
|
|
37
37
|
import {mergeRefs} from '../utils/mergeRefs';
|
|
38
|
+
import {isFocusLost} from '../utils/focusReturn';
|
|
38
39
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
39
40
|
import {useBusyAnnouncement} from '../hooks/useBusyAnnouncement';
|
|
40
41
|
import {Field, inputWrapperStyles} from '../Field';
|
|
@@ -347,7 +348,10 @@ export interface ComplexSelectorRenderState {
|
|
|
347
348
|
export interface ComplexSelectorHandle {
|
|
348
349
|
/** Open the selector surface. No-op when disabled or already open. */
|
|
349
350
|
open(): void;
|
|
350
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* Close the selector surface. Focus returns to the trigger only when it
|
|
353
|
+
* would otherwise be lost; a caller-rendered trigger always gets it back.
|
|
354
|
+
*/
|
|
351
355
|
close(): void;
|
|
352
356
|
/** Toggle the selector surface open or closed. */
|
|
353
357
|
toggle(): void;
|
|
@@ -630,12 +634,22 @@ export function ComplexSelector<Value>({
|
|
|
630
634
|
onOpenChange?.(true);
|
|
631
635
|
}, [onOpenChange]);
|
|
632
636
|
|
|
637
|
+
// The popup's content element, read when it closes.
|
|
638
|
+
const popupContentRef = useRef<HTMLElement | null>(null);
|
|
639
|
+
const hasCallerTrigger = renderTrigger != null;
|
|
633
640
|
const handlePopoverHide = useCallback(() => {
|
|
634
|
-
|
|
635
|
-
//
|
|
636
|
-
|
|
641
|
+
const trigger = triggerRef.current;
|
|
642
|
+
// A press that moved focus to another control keeps it there. A caller's
|
|
643
|
+
// control always gets focus back. Focus moves before the callback, so a
|
|
644
|
+
// consumer that moves it from the callback wins.
|
|
645
|
+
if (
|
|
646
|
+
hasCallerTrigger ||
|
|
647
|
+
isFocusLost(popupContentRef.current, trigger?.ownerDocument)
|
|
648
|
+
) {
|
|
649
|
+
trigger?.focus();
|
|
650
|
+
}
|
|
637
651
|
onOpenChange?.(false);
|
|
638
|
-
}, [onOpenChange]);
|
|
652
|
+
}, [hasCallerTrigger, onOpenChange]);
|
|
639
653
|
|
|
640
654
|
const popover = usePopover({
|
|
641
655
|
dialogLabel: label,
|
|
@@ -645,6 +659,7 @@ export function ComplexSelector<Value>({
|
|
|
645
659
|
onShow: handlePopoverShow,
|
|
646
660
|
onHide: handlePopoverHide,
|
|
647
661
|
});
|
|
662
|
+
popupContentRef.current = popover.contentRef.current;
|
|
648
663
|
|
|
649
664
|
const isOpen = popover.isOpen;
|
|
650
665
|
|
|
@@ -712,14 +712,14 @@ export function ContextMenu({
|
|
|
712
712
|
);
|
|
713
713
|
const handleTriggerTouchEnd = useCallback(
|
|
714
714
|
(event: React.TouchEvent<HTMLElement>) => {
|
|
715
|
-
handleLongPressTouchEnd();
|
|
715
|
+
handleLongPressTouchEnd(event);
|
|
716
716
|
onTouchEndProp?.(event);
|
|
717
717
|
},
|
|
718
718
|
[handleLongPressTouchEnd, onTouchEndProp],
|
|
719
719
|
);
|
|
720
720
|
const handleTriggerTouchCancel = useCallback(
|
|
721
721
|
(event: React.TouchEvent<HTMLElement>) => {
|
|
722
|
-
handleLongPressTouchCancel();
|
|
722
|
+
handleLongPressTouchCancel(event);
|
|
723
723
|
onTouchCancelProp?.(event);
|
|
724
724
|
},
|
|
725
725
|
[handleLongPressTouchCancel, onTouchCancelProp],
|
|
@@ -51,7 +51,10 @@ import {
|
|
|
51
51
|
borderVars,
|
|
52
52
|
} from '../theme/tokens.stylex';
|
|
53
53
|
import {focusOutlineStyles} from '../utils';
|
|
54
|
-
import {
|
|
54
|
+
import {
|
|
55
|
+
plainDateFormatDayNumber,
|
|
56
|
+
plainDateFormatStandaloneMonthYear,
|
|
57
|
+
} from '../utils/plainDate';
|
|
55
58
|
import {
|
|
56
59
|
type DayOfWeek,
|
|
57
60
|
type ISODateString,
|
|
@@ -591,6 +594,7 @@ export function MonthScroller({
|
|
|
591
594
|
* it cannot oscillate.
|
|
592
595
|
*/
|
|
593
596
|
const settleFrameRef = useRef<number | undefined>(undefined);
|
|
597
|
+
// Releases the settle frame on unmount.
|
|
594
598
|
useEffect(
|
|
595
599
|
() => () => {
|
|
596
600
|
if (settleFrameRef.current != null) {
|
|
@@ -663,6 +667,8 @@ export function MonthScroller({
|
|
|
663
667
|
// rAF-throttled: a touch scroll fires far more scroll events than frames,
|
|
664
668
|
// and all this does is move a label and widen a window.
|
|
665
669
|
const frameRef = useRef<number | undefined>(undefined);
|
|
670
|
+
// Syncs scroll, touch and wheel listeners on the scroller with its measured
|
|
671
|
+
// height.
|
|
666
672
|
useEffect(() => {
|
|
667
673
|
const scroller = scrollerRef.current;
|
|
668
674
|
// Not before the height is known. A listener attached while it was zero
|
|
@@ -1012,7 +1018,7 @@ function MonthPane({
|
|
|
1012
1018
|
isToday && styles.puckToday,
|
|
1013
1019
|
isSelected && styles.puckSelected,
|
|
1014
1020
|
)}>
|
|
1015
|
-
{day.dayNumber}
|
|
1021
|
+
{plainDateFormatDayNumber(day.dayNumber, locale)}
|
|
1016
1022
|
</span>
|
|
1017
1023
|
</button>
|
|
1018
1024
|
</div>
|