@astryxdesign/core 0.7.7 → 0.7.8-canary.0588a13
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 +1 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +55 -18
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +5 -0
- package/dist/BottomSheet/bottomSheetStack.js +1 -1
- package/dist/BottomSheet/useSheetGestures.d.ts +3 -1
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +16 -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 +20 -2
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +12 -4
- package/dist/CheckboxList/CheckboxListContext.d.ts +7 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListContext.js +2 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +14 -2
- package/dist/CheckboxList/requiredGroup.d.ts +22 -0
- package/dist/CheckboxList/requiredGroup.d.ts.map +1 -0
- package/dist/CheckboxList/requiredGroup.js +52 -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 +646 -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 +133 -120
- package/dist/DateInput/datePickerTouch.d.ts +13 -0
- package/dist/DateInput/datePickerTouch.d.ts.map +1 -0
- package/dist/DateInput/datePickerTouch.js +14 -0
- 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 +94 -0
- package/dist/DateInput/wheelOptions.d.ts.map +1 -0
- package/dist/DateInput/wheelOptions.js +110 -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 +70 -127
- 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 +26 -34
- package/dist/Icon/Icon.d.ts +5 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +20 -3
- 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/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +7 -2
- 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 +41 -4
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +441 -134
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +125 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +2041 -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 +116 -92
- package/dist/Resizable/createResizable.d.ts +199 -0
- package/dist/Resizable/createResizable.d.ts.map +1 -0
- package/dist/Resizable/createResizable.js +733 -0
- package/dist/Resizable/separatorAttributes.d.ts +45 -0
- package/dist/Resizable/separatorAttributes.d.ts.map +1 -0
- package/dist/Resizable/separatorAttributes.js +35 -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 +12 -0
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +17 -3
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -0
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +11 -0
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +27 -14
- 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/TimeWheels.d.ts +32 -0
- package/dist/TimeInput/TimeWheels.d.ts.map +1 -0
- package/dist/TimeInput/TimeWheels.js +144 -0
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +63 -116
- package/dist/TimeInput/timeWheelRules.d.ts +124 -0
- package/dist/TimeInput/timeWheelRules.d.ts.map +1 -0
- package/dist/TimeInput/timeWheelRules.js +277 -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 +12 -18
- 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 +200 -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 +53 -8
- package/dist/gestures/GestureHost.d.ts +16 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +4 -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 +18 -7
- 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 +45 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
- package/dist/i18n/generated-english/Resizable/createResizable.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Resizable/createResizable.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Resizable/createResizable.generated.js +13 -0
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.js +3 -1
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.js +3 -1
- package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.js +17 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +37 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +37 -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/keyboard/index.d.ts +17 -0
- package/dist/keyboard/index.d.ts.map +1 -0
- package/dist/keyboard/index.js +19 -0
- package/dist/keyboard/keyboardHeight.d.ts +149 -0
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -0
- package/dist/keyboard/keyboardHeight.js +432 -0
- package/dist/keyboard/keyboardLayoutGuide.d.ts +59 -0
- package/dist/keyboard/keyboardLayoutGuide.d.ts.map +1 -0
- package/dist/keyboard/keyboardLayoutGuide.js +207 -0
- package/dist/keyboard/keyboardModel.d.ts +93 -0
- package/dist/keyboard/keyboardModel.d.ts.map +1 -0
- package/dist/keyboard/keyboardModel.js +220 -0
- package/dist/keyboard/rideKeyboard.d.ts +42 -0
- package/dist/keyboard/rideKeyboard.d.ts.map +1 -0
- package/dist/keyboard/rideKeyboard.js +77 -0
- package/dist/keyboard/useMobileKeyboard.d.ts +61 -0
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -0
- package/dist/keyboard/useMobileKeyboard.js +699 -0
- package/dist/motion/android/index.d.ts +16 -0
- package/dist/motion/android/index.d.ts.map +1 -0
- package/dist/motion/android/index.js +18 -0
- package/dist/motion/android/keyboard.d.ts +83 -0
- package/dist/motion/android/keyboard.d.ts.map +1 -0
- package/dist/motion/android/keyboard.js +96 -0
- 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/datePicker.d.ts +58 -0
- package/dist/motion/uikit/datePicker.d.ts.map +1 -0
- package/dist/motion/uikit/datePicker.js +60 -0
- package/dist/motion/uikit/index.d.ts +6 -4
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +6 -4
- 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 +6 -4
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +6 -4
- 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/layoutViewport.d.ts +25 -0
- package/dist/utils/layoutViewport.d.ts.map +1 -0
- package/dist/utils/layoutViewport.js +102 -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 +6 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +97 -18
- package/dist/utils/pressGesture.d.ts +4 -2
- package/dist/utils/pressGesture.d.ts.map +1 -1
- package/dist/utils/pressGesture.js +3 -1
- package/dist/utils/selectionLock.d.ts +10 -1
- package/dist/utils/selectionLock.d.ts.map +1 -1
- package/dist/utils/selectionLock.js +31 -5
- package/dist/utils/sharedMutationObserver.d.ts +2 -1
- package/dist/utils/sharedMutationObserver.d.ts.map +1 -1
- package/dist/utils/sharedMutationObserver.js +2 -1
- package/dist/utils/timeParser.d.ts +2 -1
- package/dist/utils/timeParser.d.ts.map +1 -1
- package/dist/utils/timeParser.js +29 -3
- 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 +148 -0
- package/locales/pseudo.json +111 -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.doc.mjs +1 -1
- package/src/BottomSheet/BottomSheet.tsx +1 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +80 -16
- package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +5 -0
- package/src/BottomSheet/BottomSheetSwitcher.tsx +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +1 -1
- package/src/BottomSheet/useSheetGestures.ts +16 -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 +14 -0
- package/src/CheckboxList/CheckboxList.tsx +43 -2
- package/src/CheckboxList/CheckboxListContext.tsx +9 -1
- package/src/CheckboxList/CheckboxListItem.tsx +23 -2
- package/src/CheckboxList/requiredGroup.ts +77 -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 +796 -0
- package/src/DateInput/TouchDateField.tsx +6 -32
- package/src/DateInput/Wheel.tsx +188 -171
- package/src/DateInput/datePickerTouch.ts +15 -0
- 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 +184 -0
- package/src/DateInput/wheelPhysics.ts +406 -0
- package/src/DateInput/wheelStrip.ts +341 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +100 -189
- 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 +55 -55
- package/src/Icon/Icon.doc.mjs +51 -10
- package/src/Icon/Icon.tsx +31 -8
- 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/Overlay/Overlay.tsx +7 -2
- 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 +622 -157
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2700 -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 +187 -135
- package/src/Resizable/createResizable.ts +1046 -0
- package/src/Resizable/separatorAttributes.ts +73 -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 +31 -7
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +2 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +43 -20
- package/src/Table/useTableRowExpansion.doc.mjs +9 -0
- package/src/Table/useTableTreeData.doc.mjs +15 -3
- package/src/TextArea/TextArea.tsx +2 -7
- package/src/TextInput/TextInput.tsx +13 -17
- package/src/TimeInput/TimeInput.tsx +2 -0
- package/src/TimeInput/TimeWheels.tsx +218 -0
- package/src/TimeInput/TouchTimeField.tsx +93 -155
- package/src/TimeInput/timeWheelRules.ts +352 -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 +17 -23
- 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 +243 -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 +6 -5
- 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 +25 -9
- 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 +46 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
- package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
- package/src/i18n/generated-english/Resizable/createResizable.generated.ts +14 -0
- package/src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts +3 -1
- package/src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts +3 -1
- package/src/i18n/generated-english/TimeInput/TimeWheels.generated.ts +18 -0
- package/src/i18n/generated-locales/en.generated.ts +47 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +48 -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/keyboard/README.md +197 -0
- package/src/keyboard/index.ts +48 -0
- package/src/keyboard/keyboardHeight.ts +543 -0
- package/src/keyboard/keyboardLayoutGuide.ts +266 -0
- package/src/keyboard/keyboardModel.ts +301 -0
- package/src/keyboard/rideKeyboard.ts +100 -0
- package/src/keyboard/useMobileKeyboard.ts +866 -0
- package/src/motion/MEASUREMENTS.md +28 -0
- package/src/motion/README.md +12 -5
- package/src/motion/android/index.ts +18 -0
- package/src/motion/android/keyboard.ts +96 -0
- 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/datePicker.ts +60 -0
- package/src/motion/uikit/index.ts +6 -4
- 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 +6 -4
- package/src/utils/isFocusDetached.ts +34 -0
- package/src/utils/layoutViewport.ts +104 -0
- package/src/utils/plainDate.ts +80 -4
- package/src/utils/pressFeedback.ts +126 -30
- package/src/utils/pressGesture.ts +4 -2
- package/src/utils/selectionLock.ts +40 -6
- package/src/utils/sharedMutationObserver.ts +2 -1
- package/src/utils/timeParser.ts +40 -3
- package/src/utils/triggerFocus.ts +80 -0
- package/dist/BottomSheet/useMobileKeyboard.d.ts +0 -21
- package/dist/BottomSheet/useMobileKeyboard.d.ts.map +0 -1
- package/dist/BottomSheet/useMobileKeyboard.js +0 -407
- 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/BottomSheet/useMobileKeyboard.ts +0 -538
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +0 -38
- package/src/Layer/usePressPin.ts +0 -510
- package/src/internal/touch-sheet.ts +0 -21
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CheckboxList.tsx
|
|
7
|
-
* @input Uses React, useId, useOptimistic, useTransition, Field, List, CheckboxListContext
|
|
7
|
+
* @input Uses React, useId, useOptimistic, useTransition, Field, List, CheckboxListContext, requiredGroup
|
|
8
8
|
* @output Exports CheckboxList component, CheckboxListProps
|
|
9
9
|
* @position Core implementation; consumed by index.ts, tested by CheckboxList.test.tsx
|
|
10
10
|
*
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
CheckboxListContext,
|
|
44
44
|
type CheckboxListContextValue,
|
|
45
45
|
} from './CheckboxListContext';
|
|
46
|
+
import {createRequiredGroup} from './requiredGroup';
|
|
46
47
|
|
|
47
48
|
const EMPTY_ARRAY: string[] = [];
|
|
48
49
|
|
|
@@ -65,6 +66,24 @@ export interface CheckboxListProps extends Omit<
|
|
|
65
66
|
* Description text displayed below the label.
|
|
66
67
|
*/
|
|
67
68
|
description?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the group is optional. Shows the optional indicator after the
|
|
71
|
+
* group label, unless a surrounding `FormLayout` already makes fields
|
|
72
|
+
* optional by default.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
isOptional?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the group needs at least one checked box. Shows the required
|
|
78
|
+
* indicator after the group label by the same rules as every input field.
|
|
79
|
+
* While no box is checked, the browser blocks submit and moves focus to
|
|
80
|
+
* the first box that is neither disabled nor read-only. A disabled or
|
|
81
|
+
* read-only group requires nothing. Show your own error text through
|
|
82
|
+
* `status`.
|
|
83
|
+
* Mutually exclusive with isOptional.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
isRequired?: boolean;
|
|
68
87
|
/**
|
|
69
88
|
* Status indicator for the checkbox group.
|
|
70
89
|
* When set with a message, displays a colored message box below the group.
|
|
@@ -153,6 +172,8 @@ export function CheckboxList({
|
|
|
153
172
|
label,
|
|
154
173
|
isLabelHidden = false,
|
|
155
174
|
description,
|
|
175
|
+
isOptional = false,
|
|
176
|
+
isRequired = false,
|
|
156
177
|
status,
|
|
157
178
|
value,
|
|
158
179
|
onChange,
|
|
@@ -185,6 +206,18 @@ export function CheckboxList({
|
|
|
185
206
|
const descriptionID = useId();
|
|
186
207
|
const statusMessageID = useId();
|
|
187
208
|
|
|
209
|
+
const requiredGroup = useMemo(
|
|
210
|
+
() => (isRequired ? createRequiredGroup() : undefined),
|
|
211
|
+
[isRequired],
|
|
212
|
+
);
|
|
213
|
+
const observeRequiredGroup = useCallback(
|
|
214
|
+
(container: HTMLDivElement | null) =>
|
|
215
|
+
container != null && requiredGroup != null
|
|
216
|
+
? requiredGroup.observe(container)
|
|
217
|
+
: undefined,
|
|
218
|
+
[requiredGroup],
|
|
219
|
+
);
|
|
220
|
+
|
|
188
221
|
const [, startTransition] = useTransition();
|
|
189
222
|
const isCollectionMode = value !== undefined;
|
|
190
223
|
const effectiveValue = value ?? EMPTY_ARRAY;
|
|
@@ -248,6 +281,7 @@ export function CheckboxList({
|
|
|
248
281
|
isReadOnly,
|
|
249
282
|
isInvalid: status?.type === 'error',
|
|
250
283
|
loadingValues,
|
|
284
|
+
requiredGroup,
|
|
251
285
|
}),
|
|
252
286
|
[
|
|
253
287
|
isCollectionMode,
|
|
@@ -259,6 +293,7 @@ export function CheckboxList({
|
|
|
259
293
|
isReadOnly,
|
|
260
294
|
status?.type,
|
|
261
295
|
loadingValues,
|
|
296
|
+
requiredGroup,
|
|
262
297
|
],
|
|
263
298
|
);
|
|
264
299
|
|
|
@@ -270,6 +305,8 @@ export function CheckboxList({
|
|
|
270
305
|
inputID={inputID}
|
|
271
306
|
labelID={labelID}
|
|
272
307
|
isGroupLabel
|
|
308
|
+
isOptional={isOptional}
|
|
309
|
+
isRequired={isRequired}
|
|
273
310
|
descriptionID={description ? descriptionID : undefined}
|
|
274
311
|
isDisabled={isDisabled}
|
|
275
312
|
status={
|
|
@@ -293,7 +330,11 @@ export function CheckboxList({
|
|
|
293
330
|
{...rest}
|
|
294
331
|
// The disabled-message tooltip anchors here; its handlers are gated
|
|
295
332
|
// internally by isEnabled, so attaching unconditionally is safe.
|
|
296
|
-
ref={useMergedRefs(
|
|
333
|
+
ref={useMergedRefs(
|
|
334
|
+
ref,
|
|
335
|
+
disabledMessageTooltip.ref,
|
|
336
|
+
observeRequiredGroup,
|
|
337
|
+
)}
|
|
297
338
|
{...mergeProps(
|
|
298
339
|
stylex.props(controlXstyle),
|
|
299
340
|
controlClassName,
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CheckboxListContext.tsx
|
|
7
|
-
* @input Uses the private layer-scoped context factory
|
|
7
|
+
* @input Uses the private layer-scoped context factory and the RequiredGroup
|
|
8
|
+
* type
|
|
8
9
|
* @output Exports CheckboxListContext for parent-child communication
|
|
9
10
|
* @position Internal context; consumed by CheckboxList.tsx and CheckboxListItem.tsx
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import {createLayerScopedContext} from '../Layer/layerScopedContext';
|
|
14
|
+
import type {RequiredGroup} from './requiredGroup';
|
|
13
15
|
|
|
14
16
|
export interface CheckboxListContextValue {
|
|
15
17
|
value?: string[];
|
|
@@ -49,6 +51,12 @@ export interface CheckboxListContextValue {
|
|
|
49
51
|
* when idle.
|
|
50
52
|
*/
|
|
51
53
|
loadingValues?: ReadonlyArray<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Present when the list is `isRequired`. Each item registers its checkbox,
|
|
56
|
+
* so that while no box is checked the first enabled box carries native
|
|
57
|
+
* `required`.
|
|
58
|
+
*/
|
|
59
|
+
requiredGroup?: RequiredGroup;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
export const CheckboxListContext =
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* - /packages/cli/assets/templates/blocks/components/CheckboxList/ (showcase blocks)
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import {use, useId, useRef, type ReactNode} from 'react';
|
|
20
|
+
import {use, useCallback, useId, useRef, type ReactNode} from 'react';
|
|
21
21
|
import * as stylex from '@stylexjs/stylex';
|
|
22
22
|
import type {StyleXStyles} from '@stylexjs/stylex';
|
|
23
23
|
import {colorVars} from '../theme/tokens.stylex';
|
|
@@ -30,6 +30,7 @@ import {ListContext} from '../List/ListContext';
|
|
|
30
30
|
import {CheckboxListContext} from './CheckboxListContext';
|
|
31
31
|
import {ItemDescriptionContext} from '../Item/ItemDescriptionContext';
|
|
32
32
|
import {joinAriaIDs} from '../utils/inputAria';
|
|
33
|
+
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
33
34
|
import type {ItemAlign} from '../Item';
|
|
34
35
|
import {
|
|
35
36
|
registerEnglishFallback,
|
|
@@ -284,6 +285,26 @@ export function CheckboxListItem({
|
|
|
284
285
|
const checkboxRef = useRef<HTMLInputElement | null>(null);
|
|
285
286
|
const hasRowInteraction = isInteractive || onClickProp != null;
|
|
286
287
|
|
|
288
|
+
// A required group decides which box carries native `required` from the
|
|
289
|
+
// state of every box. A change to this box's state registers it again.
|
|
290
|
+
const requiredGroup = ctx?.requiredGroup;
|
|
291
|
+
const isBoxChecked = resolvedChecked === true;
|
|
292
|
+
const isBoxEnabled = !effectiveDisabled && !effectiveReadOnly;
|
|
293
|
+
const registerWithRequiredGroup = useCallback(
|
|
294
|
+
(input: HTMLInputElement | null) =>
|
|
295
|
+
input != null && requiredGroup != null
|
|
296
|
+
? requiredGroup.register(input, {
|
|
297
|
+
isChecked: isBoxChecked,
|
|
298
|
+
isEnabled: isBoxEnabled,
|
|
299
|
+
})
|
|
300
|
+
: undefined,
|
|
301
|
+
[requiredGroup, isBoxChecked, isBoxEnabled],
|
|
302
|
+
);
|
|
303
|
+
const checkboxInputRef = useMergedRefs(
|
|
304
|
+
checkboxRef,
|
|
305
|
+
registerWithRequiredGroup,
|
|
306
|
+
);
|
|
307
|
+
|
|
287
308
|
// A read-only checkbox carries aria-readonly, which the row's clickable
|
|
288
309
|
// container treats as a non-interactive target, so a click on it would be
|
|
289
310
|
// delegated straight back to the checkbox without end. Stop that click at
|
|
@@ -349,7 +370,7 @@ export function CheckboxListItem({
|
|
|
349
370
|
style={style}
|
|
350
371
|
startContent={
|
|
351
372
|
<DescribedCheckboxInput
|
|
352
|
-
ref={
|
|
373
|
+
ref={checkboxInputRef}
|
|
353
374
|
label={checkboxLabel}
|
|
354
375
|
aria-labelledby={namesFromVisibleLabel ? labelID : undefined}
|
|
355
376
|
isLabelHidden
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file requiredGroup.ts
|
|
5
|
+
* @input The checkbox inputs of a required CheckboxList and each box's state;
|
|
6
|
+
* Core's shared mutation observer
|
|
7
|
+
* @output Exports createRequiredGroup, RequiredGroup, and RequiredGroupBox
|
|
8
|
+
* @position Internal to CheckboxList; CheckboxList creates one for an
|
|
9
|
+
* `isRequired` group and CheckboxListItem registers its checkbox with it
|
|
10
|
+
*
|
|
11
|
+
* The browser has no required state for a group of checkboxes. While no box
|
|
12
|
+
* is checked, the first enabled box carries native `required`. The browser
|
|
13
|
+
* then blocks submit and moves focus to that box with its own message. Once
|
|
14
|
+
* any box is checked, no box carries `required`.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {observeMutations} from '../utils/sharedMutationObserver';
|
|
18
|
+
|
|
19
|
+
/** The state of one box that decides which box carries `required`. */
|
|
20
|
+
export interface RequiredGroupBox {
|
|
21
|
+
isChecked: boolean;
|
|
22
|
+
/** False for a disabled or read-only box, which the user cannot check. */
|
|
23
|
+
isEnabled: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface RequiredGroup {
|
|
27
|
+
/**
|
|
28
|
+
* Adds a checkbox with its state and updates `required` on every box.
|
|
29
|
+
* Returns a function that removes the checkbox, clears its `required`, and
|
|
30
|
+
* updates the rest. An item registers again when its state changes.
|
|
31
|
+
*/
|
|
32
|
+
register: (input: HTMLInputElement, box: RequiredGroupBox) => () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Updates `required` when the group's options move, for example after a
|
|
35
|
+
* keyed reorder, which registers no box again. Returns a function that
|
|
36
|
+
* stops it.
|
|
37
|
+
*/
|
|
38
|
+
observe: (container: HTMLElement) => () => void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const MOVE_OPTIONS: MutationObserverInit = {childList: true, subtree: true};
|
|
42
|
+
|
|
43
|
+
function byDocumentOrder(a: HTMLInputElement, b: HTMLInputElement): number {
|
|
44
|
+
return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING
|
|
45
|
+
? -1
|
|
46
|
+
: 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function createRequiredGroup(): RequiredGroup {
|
|
50
|
+
const boxes = new Map<HTMLInputElement, RequiredGroupBox>();
|
|
51
|
+
|
|
52
|
+
function update() {
|
|
53
|
+
const ordered = [...boxes.keys()].sort(byDocumentOrder);
|
|
54
|
+
const isEmpty = ![...boxes.values()].some(box => box.isChecked);
|
|
55
|
+
const target = isEmpty
|
|
56
|
+
? ordered.find(input => boxes.get(input)?.isEnabled === true)
|
|
57
|
+
: undefined;
|
|
58
|
+
for (const input of ordered) {
|
|
59
|
+
input.required = input === target;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
register(input, box) {
|
|
65
|
+
boxes.set(input, box);
|
|
66
|
+
update();
|
|
67
|
+
return () => {
|
|
68
|
+
boxes.delete(input);
|
|
69
|
+
input.required = false;
|
|
70
|
+
update();
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
observe(container) {
|
|
74
|
+
return observeMutations(container, MOVE_OPTIONS, update);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -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>
|