@astryxdesign/core 0.7.9-canary.5f81c3f → 0.7.9-canary.5f8a809
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/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +31 -2
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +36 -9
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +3 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +2 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +12 -4
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +5 -1
- package/dist/DateInput/DateInput.d.ts +37 -6
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +98 -128
- package/dist/DateInput/MonthScroller.d.ts +5 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +26 -29
- package/dist/DateInput/MonthYearWheels.d.ts +10 -1
- package/dist/DateInput/MonthYearWheels.d.ts.map +1 -1
- package/dist/DateInput/MonthYearWheels.js +54 -42
- package/dist/DateInput/TouchDateField.d.ts +1 -1
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +26 -21
- package/dist/DateInput/monthGeometry.d.ts +42 -8
- package/dist/DateInput/monthGeometry.d.ts.map +1 -1
- package/dist/DateInput/monthGeometry.js +81 -7
- package/dist/DateInput/useCalendarPresentation.d.ts +10 -0
- package/dist/DateInput/useCalendarPresentation.d.ts.map +1 -0
- package/dist/DateInput/useCalendarPresentation.js +32 -0
- package/dist/DateInput/useTypedDate.d.ts +92 -0
- package/dist/DateInput/useTypedDate.d.ts.map +1 -0
- package/dist/DateInput/useTypedDate.js +269 -0
- package/dist/DateInput/wheelStrip.js +2 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts +17 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +15 -11
- package/dist/DateTimeInput/DateTimeInput.d.ts +26 -3
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +93 -92
- package/dist/DateTimeInput/TouchDateTimeField.d.ts +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +26 -20
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +3 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts +2 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +25 -1
- package/dist/Icon/ComponentIcon.d.ts +33 -0
- package/dist/Icon/ComponentIcon.d.ts.map +1 -0
- package/dist/Icon/ComponentIcon.js +56 -0
- package/dist/Icon/globalIconRegistry.d.ts +45 -4
- package/dist/Icon/globalIconRegistry.d.ts.map +1 -1
- package/dist/Icon/globalIconRegistry.js +137 -3
- package/dist/Icon/index.d.ts +73 -2
- package/dist/Icon/index.d.ts.map +1 -1
- package/dist/Icon/index.js +42 -3
- package/dist/Icon/useIcon.d.ts +13 -4
- package/dist/Icon/useIcon.d.ts.map +1 -1
- package/dist/Icon/useIcon.js +16 -5
- package/dist/InputGroup/InputGroupText.d.ts +2 -1
- package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupText.js +2 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +13 -3
- package/dist/Layer/LayerProvider.d.ts.map +1 -1
- package/dist/Layer/LayerProvider.js +8 -7
- package/dist/Layer/LayerTouch.d.ts +13 -0
- package/dist/Layer/LayerTouch.d.ts.map +1 -0
- package/dist/Layer/LayerTouch.js +16 -0
- package/dist/Layer/holdEntranceInput.d.ts.map +1 -1
- package/dist/Layer/holdEntranceInput.js +4 -2
- package/dist/Layer/layerKeyboardClearance.d.ts +41 -0
- package/dist/Layer/layerKeyboardClearance.d.ts.map +1 -0
- package/dist/Layer/layerKeyboardClearance.js +51 -0
- package/dist/Layer/layerViewportInset.stylex.d.ts +5 -1
- package/dist/Layer/layerViewportInset.stylex.d.ts.map +1 -1
- package/dist/Layer/layerViewportInset.stylex.js +11 -4
- package/dist/Layer/outsidePress.d.ts +4 -0
- package/dist/Layer/outsidePress.d.ts.map +1 -1
- package/dist/Layer/outsidePress.js +18 -1
- package/dist/Layer/settledBox.d.ts +16 -0
- package/dist/Layer/settledBox.d.ts.map +1 -0
- package/dist/Layer/settledBox.js +117 -0
- package/dist/Layer/toastHost.d.ts +77 -0
- package/dist/Layer/toastHost.d.ts.map +1 -0
- package/dist/Layer/toastHost.js +172 -0
- package/dist/Layer/useBackdropPress.d.ts +8 -0
- package/dist/Layer/useBackdropPress.d.ts.map +1 -1
- package/dist/Layer/useBackdropPress.js +31 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +36 -106
- package/dist/Layer/useLayerKeyboardClearance.d.ts +54 -0
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -0
- package/dist/Layer/useLayerKeyboardClearance.js +330 -0
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +4 -0
- package/dist/Layout/LayoutPanel.d.ts.map +1 -1
- package/dist/Layout/LayoutPanel.js +12 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +7 -2
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +28 -28
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +7 -2
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +1 -0
- package/dist/Resizable/resizablePane.d.ts +0 -2
- package/dist/Resizable/resizablePane.d.ts.map +1 -1
- package/dist/Resizable/resizablePane.js +2 -7
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +16 -56
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +39 -17
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +0 -2
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +7 -4
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +13 -9
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +5 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +1 -0
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +2 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +27 -5
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +16 -8
- package/dist/Timestamp/TimestampHoverCard.d.ts +2 -1
- package/dist/Timestamp/TimestampHoverCard.d.ts.map +1 -1
- package/dist/Timestamp/TimestampHoverCard.js +12 -5
- package/dist/Toast/Toast.js +4 -4
- package/dist/Toast/ToastContext.d.ts +6 -13
- package/dist/Toast/ToastContext.d.ts.map +1 -1
- package/dist/Toast/ToastContext.js +6 -8
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +75 -10
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +10 -50
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +2 -0
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +7 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +10 -3
- package/dist/animator/createAnimator.js +2 -2
- package/dist/astryx.css +12 -4
- package/dist/gestures/createPanGesture.d.ts +49 -0
- package/dist/gestures/createPanGesture.d.ts.map +1 -0
- package/dist/gestures/createPanGesture.js +80 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +7 -0
- package/dist/hooks/useOverflow.d.ts +10 -0
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +25 -3
- package/dist/hooks/usePanGesture.d.ts +32 -0
- package/dist/hooks/usePanGesture.d.ts.map +1 -0
- package/dist/hooks/usePanGesture.js +67 -0
- package/dist/i18n/InternationalizationProvider.d.ts +2 -1
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/generated-english/DateInput/DateInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/DateInput/DateInput.generated.js +0 -1
- package/dist/i18n/generated-english/DateInput/useTypedDate.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateInput/useTypedDate.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateInput/useTypedDate.generated.js +16 -0
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.js +0 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +4 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal/touch.d.ts +10 -5
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +15 -7
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +10 -7
- package/dist/motion/animator.d.ts +5 -5
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +10 -8
- package/dist/motion/resolveMotion.d.ts +6 -27
- package/dist/motion/resolveMotion.d.ts.map +1 -1
- package/dist/motion/resolveMotion.js +82 -16
- package/dist/motion/themeTempo.d.ts +7 -0
- package/dist/motion/themeTempo.d.ts.map +1 -0
- package/dist/motion/themeTempo.js +38 -0
- package/dist/motion/themeTiming.d.ts +63 -0
- package/dist/motion/themeTiming.d.ts.map +1 -0
- package/dist/motion/themeTiming.js +173 -0
- package/dist/privateAttributes/press.stylex.d.ts +5 -1
- package/dist/privateAttributes/press.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/press.stylex.js +6 -1
- package/dist/theme/defineTheme.d.ts +42 -3
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +48 -0
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +12 -4
- package/dist/theme/themeMotion.d.ts +7 -5
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +7 -5
- package/dist/utils/calendarDateParser.d.ts +1 -1
- package/dist/utils/calendarDateParser.js +1 -1
- package/dist/utils/calendarSystem.d.ts +49 -3
- package/dist/utils/calendarSystem.d.ts.map +1 -1
- package/dist/utils/calendarSystem.js +129 -5
- package/dist/utils/focusReturn.d.ts +24 -11
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +48 -14
- package/dist/utils/inputPresentation.d.ts +9 -1
- package/dist/utils/inputPresentation.d.ts.map +1 -1
- package/dist/utils/inputPresentation.js +15 -1
- package/locales/en.json +17 -1
- package/locales/pseudo.json +12 -0
- package/package.json +4 -4
- package/src/BottomSheet/BottomSheet.tsx +39 -2
- package/src/BottomSheet/useSheetGestures.ts +41 -10
- package/src/Breadcrumbs/BreadcrumbItem.tsx +7 -1
- package/src/Calendar/useCalendarDays.doc.mjs +158 -0
- package/src/CheckboxInput/CheckboxInput.tsx +5 -1
- package/src/CodeBlock/CodeBlock.doc.mjs +17 -0
- package/src/CodeBlock/CodeBlock.tsx +11 -2
- package/src/ContextMenu/ContextMenu.tsx +9 -1
- package/src/DateInput/DateInput.doc.mjs +45 -12
- package/src/DateInput/DateInput.tsx +165 -181
- package/src/DateInput/MonthScroller.tsx +39 -37
- package/src/DateInput/MonthYearWheels.tsx +68 -47
- package/src/DateInput/TouchDateField.tsx +45 -17
- package/src/DateInput/monthGeometry.ts +110 -8
- package/src/DateInput/useCalendarPresentation.ts +64 -0
- package/src/DateInput/useTypedDate.ts +469 -0
- package/src/DateInput/wheelStrip.ts +2 -2
- package/src/DateRangeInput/DateRangeInput.doc.mjs +9 -0
- package/src/DateRangeInput/DateRangeInput.tsx +42 -10
- package/src/DateTimeInput/DateTimeInput.doc.mjs +42 -9
- package/src/DateTimeInput/DateTimeInput.tsx +138 -150
- package/src/DateTimeInput/TouchDateTimeField.tsx +31 -16
- package/src/Drawer/Drawer.tsx +3 -1
- package/src/DropdownMenu/DropdownMenu.tsx +32 -1
- package/src/Icon/ComponentIcon.tsx +71 -0
- package/src/Icon/globalIconRegistry.tsx +181 -4
- package/src/Icon/index.ts +85 -2
- package/src/Icon/useIcon.doc.mjs +94 -0
- package/src/Icon/useIcon.ts +24 -3
- package/src/InputGroup/InputGroupText.doc.mjs +45 -3
- package/src/InputGroup/InputGroupText.tsx +2 -1
- package/src/Item/Item.doc.mjs +19 -4
- package/src/Item/Item.tsx +21 -2
- package/src/Layer/LayerProvider.tsx +9 -8
- package/src/Layer/LayerTouch.ts +17 -0
- package/src/Layer/holdEntranceInput.ts +4 -2
- package/src/Layer/layerKeyboardClearance.ts +55 -0
- package/src/Layer/layerViewportInset.stylex.ts +16 -5
- package/src/Layer/outsidePress.ts +18 -1
- package/src/Layer/settledBox.ts +138 -0
- package/src/Layer/toastHost.tsx +212 -0
- package/src/Layer/useBackdropPress.ts +41 -1
- package/src/Layer/useLayer.tsx +41 -123
- package/src/Layer/useLayerKeyboardClearance.ts +371 -0
- package/src/Layer/useTouchTrigger.ts +4 -0
- package/src/Layout/LayoutPanel.tsx +16 -2
- package/src/Link/useLinkComponent.doc.mjs +95 -0
- package/src/MultiSelector/MultiSelector.tsx +24 -2
- package/src/MultiSelector/hooks.ts +28 -35
- package/src/MultiSelector/useMultiCombobox.doc.mjs +2 -2
- package/src/OverflowList/OverflowList.tsx +15 -9
- package/src/Overlay/useOverlay.doc.mjs +176 -0
- package/src/Popover/Popover.tsx +5 -0
- package/src/PowerSearch/PowerSearch.doc.mjs +3 -3
- package/src/Resizable/resizablePane.ts +4 -13
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +15 -62
- package/src/Selector/Selector.tsx +61 -8
- package/src/SideNav/SideNav.tsx +0 -1
- package/src/SideNav/SideNavItem.tsx +8 -6
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Switch/useSwitchTouch.ts +17 -9
- package/src/TabList/Tab.tsx +5 -1
- package/src/TabList/TabList.tsx +1 -0
- package/src/Table/Table.doc.mjs +34 -0
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +32 -7
- package/src/Table/plugins/sortable/useTableSortable.tsx +19 -12
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +173 -0
- package/src/Timestamp/Timestamp.doc.mjs +17 -0
- package/src/Timestamp/TimestampHoverCard.tsx +11 -3
- package/src/Toast/Toast.doc.mjs +14 -0
- package/src/Toast/Toast.tsx +2 -2
- package/src/Toast/ToastContext.ts +7 -17
- package/src/Toast/ToastViewport.tsx +53 -9
- package/src/Toast/useToast.tsx +7 -52
- package/src/Tooltip/useTooltip.tsx +2 -0
- package/src/TopNav/TopNavItem.tsx +7 -2
- package/src/Typeahead/BaseTypeahead.tsx +25 -3
- package/src/animator/createAnimator.doc.mjs +1 -1
- package/src/animator/createAnimator.ts +3 -3
- package/src/gestures/README.md +2 -1
- package/src/gestures/createPanGesture.doc.mjs +145 -0
- package/src/gestures/createPanGesture.ts +107 -0
- package/src/hooks/index.ts +8 -0
- package/src/hooks/useAnimatedLayout.doc.mjs +1 -1
- package/src/hooks/useAnimator.doc.mjs +1 -1
- package/src/hooks/useEntryAnimation.doc.mjs +1 -1
- package/src/hooks/useMenuPress.ts +14 -1
- package/src/hooks/useOverflow.ts +25 -3
- package/src/hooks/usePanGesture.doc.mjs +158 -0
- package/src/hooks/usePanGesture.ts +75 -0
- package/src/hooks/usePressFeedback.doc.mjs +1 -1
- package/src/i18n/InternationalizationProvider.doc.mjs +3 -3
- package/src/i18n/InternationalizationProvider.tsx +2 -1
- package/src/i18n/generated-english/DateInput/DateInput.generated.ts +0 -1
- package/src/i18n/generated-english/DateInput/useTypedDate.generated.ts +17 -0
- package/src/i18n/generated-english/DateTimeInput/DateTimeInput.generated.ts +0 -1
- package/src/i18n/generated-locales/en.generated.ts +6 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +6 -0
- package/src/index.ts +2 -0
- package/src/internal/touch.ts +16 -8
- package/src/motion/README.md +6 -5
- package/src/motion/animatedLayout.ts +10 -7
- package/src/motion/animator.ts +10 -9
- package/src/motion/resolveMotion.ts +89 -18
- package/src/motion/themeTempo.ts +41 -0
- package/src/motion/themeTiming.ts +198 -0
- package/src/privateAttributes/press.stylex.ts +21 -1
- package/src/theme/defineTheme.ts +99 -2
- package/src/theme/resolveThemeValues.ts +12 -3
- package/src/theme/themeMotion.ts +7 -5
- package/src/utils/calendarDateParser.ts +1 -1
- package/src/utils/calendarSystem.ts +212 -3
- package/src/utils/focusReturn.ts +61 -15
- package/src/utils/inputPresentation.ts +21 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAuBH,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAuBH,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AA4DhD,YAAY,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAmLhF,UAAU,sBAAuB,SAAQ,SAAS,CAAC,cAAc,CAAC;IAChE,qDAAqD;IACrD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IAEd,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB,wGAAwG;IACxG,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;IAE7C;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAEjD;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,UAAU,0BAA2B,SAAQ,sBAAsB;IACjE,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED,UAAU,wBAAyB,SAAQ,sBAAsB;IAC/D;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED,MAAM,MAAM,gBAAgB,GAC1B,0BAA0B,GAAG,wBAAwB,CAAC;AA27BxD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BA6BlD;yBA7Be,WAAW"}
|
|
@@ -65,7 +65,7 @@ import { ModalAnnounceProvider } from "../hooks/ModalAnnounceProvider.js";
|
|
|
65
65
|
import { useModalOutlet } from "../Layer/modalOutlet.js";
|
|
66
66
|
import { useLayerDismissal } from "../Layer/useLayerDismissal.js";
|
|
67
67
|
import { useFocusRegionContainment } from "../hooks/useFocusTrap.js";
|
|
68
|
-
import { returnFocusForLastInput } from "../utils/focusReturn.js";
|
|
68
|
+
import { prepareFocusRepairOnRemoval, returnFocusForLastInput } from "../utils/focusReturn.js";
|
|
69
69
|
import { useInteractionModalityTracking } from "../utils/interactionModality.js";
|
|
70
70
|
import { BottomSheetPanel } from "./BottomSheetPanel.js";
|
|
71
71
|
import { BottomSheetEdgeTint } from "./BottomSheetEdgeTint.js";
|
|
@@ -387,7 +387,14 @@ function StandaloneBottomSheet({
|
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
389
|
const key = stackKeyRef.current;
|
|
390
|
-
|
|
390
|
+
const dialog = dialogRef.current;
|
|
391
|
+
// Removing an open dialog runs no close, so focus would drop to the page.
|
|
392
|
+
// After the commit, the repair sends focus where a close would, if the
|
|
393
|
+
// removal lost focus.
|
|
394
|
+
const repairOnRemoval = dialog == null ? null : prepareFocusRepairOnRemoval(dialog, {
|
|
395
|
+
keepRestingFocus: true
|
|
396
|
+
});
|
|
397
|
+
const leave = registerBottomSheet({
|
|
391
398
|
key,
|
|
392
399
|
getElement: () => dialogRef.current,
|
|
393
400
|
show: () => {
|
|
@@ -437,6 +444,28 @@ function StandaloneBottomSheet({
|
|
|
437
444
|
}
|
|
438
445
|
}
|
|
439
446
|
}, isOpenRef.current, hasScrim);
|
|
447
|
+
return () => {
|
|
448
|
+
// Read before the registry lets go of the sheet beneath. Focus the
|
|
449
|
+
// person had already moved out of the sheet to the page body stays
|
|
450
|
+
// there: the removal did not lose it.
|
|
451
|
+
if (repairOnRemoval != null && isSheetHostPresented(dialog)) {
|
|
452
|
+
const returnTarget = finalFocusRefRef.current?.current ?? triggerRef.current;
|
|
453
|
+
const revealed = hasScrim ? getBottomSheetBeneath(key) : null;
|
|
454
|
+
repairOnRemoval(() => {
|
|
455
|
+
// The sheet beneath left too. Its own repair returns focus for the
|
|
456
|
+
// stack.
|
|
457
|
+
if (revealed != null && !revealed.element.isConnected) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if (revealed != null && (returnTarget == null || !revealed.element.contains(returnTarget))) {
|
|
461
|
+
revealed.focus();
|
|
462
|
+
} else if (returnTarget != null && returnTarget.isConnected) {
|
|
463
|
+
returnFocusForLastInput(returnTarget);
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
leave();
|
|
468
|
+
};
|
|
440
469
|
}, [hasScrim, shouldPresent, writeScrim]);
|
|
441
470
|
useLayoutEffect(() => {
|
|
442
471
|
if (!isOpen) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSheetGestures.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/useSheetGestures.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAoCH,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,UAAU,IAAI,eAAe,EAClC,KAAK,YAAY,IAAI,iBAAiB,EACtC,KAAK,SAAS,EACd,KAAK,UAAU,IAAI,eAAe,EAClC,KAAK,OAAO,IAAI,YAAY,EAC7B,MAAM,OAAO,CAAC;AA4Hf;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3E;AA+BD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,IAAI,EAAE,WAAW,GAChB,OAAO,CAWT;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,IAAI,EAAE,WAAW,GAChB,WAAW,EAAE,CAaf;AA0DD,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gFAAgF;IAChF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;I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sBAA0B,EAC1B,SAAS,EACT,WAAW,EACX,MAAM,EACN,aAAa,EACb,cAAc,EACd,cAAsB,GACvB,EAAE,uBAAuB,GAAG,sBAAsB,CA+4ClD"}
|
|
@@ -333,18 +333,26 @@ export function useSheetGestures({
|
|
|
333
333
|
// onDismiss() and sets `pending`; the host answers in the same update, so
|
|
334
334
|
// the first render afterwards says whether it took the close (its
|
|
335
335
|
// controlled state now says closed: the exit under way is the drag's) or
|
|
336
|
-
// refused it (a guarded onOpenChange left it open: the sheet snaps back
|
|
337
|
-
// the request is spent). Either way the flag is
|
|
338
|
-
// prev-prop pattern, and derived back to false
|
|
339
|
-
// again — so a later close from a control, Escape
|
|
340
|
-
// mistaken for a drag.
|
|
336
|
+
// refused it (a guarded onOpenChange left it open: the sheet snaps back,
|
|
337
|
+
// its scrim with it, and the request is spent). Either way the flag is
|
|
338
|
+
// settled during render, the prev-prop pattern, and derived back to false
|
|
339
|
+
// once the sheet is open again — so a later close from a control, Escape
|
|
340
|
+
// or code is never mistaken for a drag.
|
|
341
341
|
const [touchDragDismissal, setTouchDragDismissal] = useState(null);
|
|
342
|
+
// The render that spends a refused request counts it. The layout effect
|
|
343
|
+
// below answers each count.
|
|
344
|
+
const [refusedDismissalCount, setRefusedDismissalCount] = useState(0);
|
|
342
345
|
if (touchDragDismissal != null) {
|
|
343
346
|
if (touchDragDismissal.pending) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
347
|
+
if (isOpenRequested) {
|
|
348
|
+
setTouchDragDismissal(null);
|
|
349
|
+
setRefusedDismissalCount(count => count + 1);
|
|
350
|
+
} else {
|
|
351
|
+
setTouchDragDismissal({
|
|
352
|
+
isTouch: touchDragDismissal.isTouch,
|
|
353
|
+
pending: false
|
|
354
|
+
});
|
|
355
|
+
}
|
|
348
356
|
} else if (isOpenRequested) {
|
|
349
357
|
setTouchDragDismissal(null);
|
|
350
358
|
}
|
|
@@ -452,6 +460,24 @@ export function useSheetGestures({
|
|
|
452
460
|
hasFixedHeightRef.current = hasFixedHeight;
|
|
453
461
|
});
|
|
454
462
|
|
|
463
|
+
// The release cannot know whether the host takes the close. The host
|
|
464
|
+
// answers through `isOpenRequested` in the next render. Keep the left
|
|
465
|
+
// detent's scrim until then.
|
|
466
|
+
const restingScrimOpacityRef = useRef(null);
|
|
467
|
+
// Syncs the host's scrim (its backdrop, written through `onScrimOpacity`)
|
|
468
|
+
// with the panel's return to rest after a refusal: the panel rests on that
|
|
469
|
+
// detent again, so the scrim the drag thinned toward the dismiss line rests
|
|
470
|
+
// with it. The refusal changes none of the host's own scrim inputs, so the
|
|
471
|
+
// drag's last value would otherwise stand.
|
|
472
|
+
useLayoutEffect(() => {
|
|
473
|
+
const restingScrimOpacity = restingScrimOpacityRef.current;
|
|
474
|
+
if (refusedDismissalCount === 0 || restingScrimOpacity == null) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
restingScrimOpacityRef.current = null;
|
|
478
|
+
onScrimOpacityRef.current?.(restingScrimOpacity);
|
|
479
|
+
}, [refusedDismissalCount]);
|
|
480
|
+
|
|
455
481
|
// Live drag bookkeeping (refs so pointermove doesn't churn renders).
|
|
456
482
|
const dragStateRef = useRef(null);
|
|
457
483
|
|
|
@@ -770,6 +796,7 @@ export function useSheetGestures({
|
|
|
770
796
|
if (dir > 0 && projected > dismissOffset) {
|
|
771
797
|
if (canDismissRef.current) {
|
|
772
798
|
prepareScrollAreaSettle(baseLayoutOffset, baseOffset, baseLayoutOffset, baseLayoutOffset, baseLayoutOffset, naturalEndGap, false);
|
|
799
|
+
restingScrimOpacityRef.current = scrimOpacityForOffset(baseOffset, offsets, dismissOffset, peekOffset);
|
|
773
800
|
setTouchDragDismissal({
|
|
774
801
|
isTouch,
|
|
775
802
|
pending: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/BreadcrumbItem.tsx"],"names":[],"mappings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E,kBAAkB,EAAE,GAAG,SAAS,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AA2ID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,mBAAmB,qBAuMrB;yBAtNe,cAAc"}
|
|
@@ -41,6 +41,8 @@ import { menuTouchActionStyles } from "../DropdownMenu/menuTouchAction.stylex.js
|
|
|
41
41
|
import { useMenuOverflow } from "../DropdownMenu/useMenuOverflow.js";
|
|
42
42
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
43
43
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
44
|
+
import "../Layer/layerViewportInset.stylex.js";
|
|
45
|
+
import { layerViewportInset } from "../Layer/layerViewportInset.stylex.js";
|
|
44
46
|
import { renderDropdownItems } from "../DropdownMenu/renderDropdownItems.js";
|
|
45
47
|
import { DropdownMenuContext, DropdownMenuRootOpenContext } from "../DropdownMenu/DropdownMenuContext.js";
|
|
46
48
|
import { MENU_ITEM_ROLES, MENU_ITEM_SELECTOR, MENU_BOUNDARY_SELECTOR } from "../DropdownMenu/menuItemRoles.js";
|
|
@@ -131,7 +133,7 @@ const menuStyles = {
|
|
|
131
133
|
k1xSpc: "x78zum5",
|
|
132
134
|
kXwgrk: "xdt5ytf",
|
|
133
135
|
kOIVth: "x1lsbc85",
|
|
134
|
-
kskxy: "
|
|
136
|
+
kskxy: "x1uh1i8a",
|
|
135
137
|
kORKVm: "x1odjw0f",
|
|
136
138
|
"--_dropdown-menu-radius": "x1fcsqxe",
|
|
137
139
|
"--_dropdown-menu-padding": "xgory14",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,UAAU,EAGf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAS3C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,UAAU,EAGf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAS3C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AA6KhD,QAAA,MAAM,iBAAiB;;;;;;;;;EASrB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAE/D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACrE,wDAAwD;IACxD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC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AC,EAAE,WAAW,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EAAE,MAAM,EACV,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,IAAI,EACR,EAAE,kBAAkB,+BAyRpB;yBApTe,aAAa"}
|
|
@@ -26,6 +26,7 @@ import { Spinner } from "../Spinner/Spinner.js";
|
|
|
26
26
|
import { useTooltip } from "../Tooltip/useTooltip.js";
|
|
27
27
|
import { mergeProps } from "../utils/mergeProps.js";
|
|
28
28
|
import { rtlStyles } from "../utils/rtlStyles.js";
|
|
29
|
+
import { withholdCallerHandlers } from "../utils/disabledInteraction.js";
|
|
29
30
|
import "../Indicator/indicator.markers.stylex.js";
|
|
30
31
|
import { indicatorScope } from "../Indicator/indicator.markers.stylex.js";
|
|
31
32
|
import "../internal/indicatorPress.stylex.js";
|
|
@@ -327,7 +328,7 @@ export function CheckboxInput({
|
|
|
327
328
|
...stylex.props(styles.checkboxWrapper, wrapperSizeStyles[size], !isDisabled && styles.indicatorPressOverlay, !isDisabled && isRowPressSurface && styles.indicatorRowPressOverlay),
|
|
328
329
|
...focusProps,
|
|
329
330
|
children: [/*#__PURE__*/_jsx("input", {
|
|
330
|
-
...rest,
|
|
331
|
+
...withholdCallerHandlers(rest, isDisabled),
|
|
331
332
|
ref: useMergedRefs(ref, indeterminateRef, disabledMessageTooltip.positionRef, inputRef),
|
|
332
333
|
id: id,
|
|
333
334
|
type: "checkbox"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA4B5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAW5C,OAAO,EAAc,KAAK,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AAqfxE,MAAM,WAAW,cAAe,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yJAAyJ;IACzJ,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,KACb;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAClD,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC;AA0UD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAsB,EACtB,KAAK,EACL,gBAAuB,EACvB,cAAsB,EACtB,eAAmB,EACnB,cAAc,EACd,MAAc,EACd,aAAoB,EACpB,MAAM,EACN,UAAU,EACV,SAAiB,EACjB,SAAS,EACT,aAAqB,EACrB,oBAAyB,EACzB,IAAW,EACX,KAAK,EAAE,SAAyB,EAChC,SAAkB,EAClB,SAAS,EAAE,eAAe,EAC1B,aAAsB,EACtB,WAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,cAAc,qBAmUhB;yBA9Ve,SAAS"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CodeBlock.tsx
|
|
7
|
-
* @input Uses React, StyleX, theme tokens, CSS Custom Highlight API, SyntaxTheme
|
|
7
|
+
* @input Uses React, StyleX, theme tokens, CSS Custom Highlight API, SyntaxTheme
|
|
8
|
+
* provider, and the theme's `code-block-copy` icon slot
|
|
8
9
|
* @output Exports CodeBlock component and CodeBlockProps
|
|
9
10
|
* @position Core implementation; read-only syntax-highlighted code display
|
|
10
11
|
*/
|
|
@@ -17,6 +18,7 @@ import { isRenderable, mergeProps, rtlStyles } from "../utils/index.js";
|
|
|
17
18
|
import { useClipboard } from "../hooks/useClipboard.js";
|
|
18
19
|
import { useScrollableArea } from "../hooks/useScrollableArea.js";
|
|
19
20
|
import { Icon } from "../Icon/index.js";
|
|
21
|
+
import { ComponentIcon } from "../Icon/ComponentIcon.js";
|
|
20
22
|
import { IconButton } from "../IconButton/index.js";
|
|
21
23
|
import { tokenize, tokenizeAsync, splitDiffLines, flatTokensToLines, SYNC_TOKENIZE_THRESHOLD } from "./tokenizer.js";
|
|
22
24
|
import { isCustomCodeLanguage, languageKey, languageLabel as languageWord, sameCodeLanguage } from "./grammar.js";
|
|
@@ -693,9 +695,15 @@ export function CodeBlock({
|
|
|
693
695
|
const copyButtonEl = hasCopyButton ? /*#__PURE__*/_jsx(IconButton, {
|
|
694
696
|
variant: "ghost",
|
|
695
697
|
size: "sm",
|
|
696
|
-
icon: /*#__PURE__*/_jsx(
|
|
697
|
-
|
|
698
|
-
|
|
698
|
+
icon: /*#__PURE__*/_jsx(ComponentIcon, {
|
|
699
|
+
slot: "code-block-copy",
|
|
700
|
+
state: {
|
|
701
|
+
copied
|
|
702
|
+
},
|
|
703
|
+
fallback: {
|
|
704
|
+
icon: copied ? 'check' : 'copy',
|
|
705
|
+
size: 'sm'
|
|
706
|
+
},
|
|
699
707
|
color: "inherit"
|
|
700
708
|
})
|
|
701
709
|
// A visible "Copy" hover/focus hint via Button's built-in tooltip. It
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot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,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,oBAAqB,SAAQ,oBAAoB;IACzD,gDAAgD;IAChD,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,WAAW,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAM/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,IAAW,EACX,KAAK,EAAE,cAAc,EACrB,UAAkB,EAClB,YAAY,EACZ,YAAwB,EACxB,SAAiB,EACjB,GAAG,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,aAAa,EACb,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,gBAAgB,EAC9B,WAAW,EAAE,eAAe,EAC5B,UAAU,EAAE,cAAc,EAC1B,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAijBlB;yBAtkBe,WAAW"}
|
|
@@ -48,6 +48,7 @@ import { useLayerInternal } from "../Layer/useLayer.js";
|
|
|
48
48
|
import { LayerDepthProvider } from "../Layer/LayerDepthContext.js";
|
|
49
49
|
import { useLayerDismissal } from "../Layer/useLayerDismissal.js";
|
|
50
50
|
import { currentGesture } from "../Layer/gestureCounter.js";
|
|
51
|
+
import { noteOutsideDismissal } from "../Layer/outsidePress.js";
|
|
51
52
|
import { MenuBottomSheetActionList } from "../DropdownMenu/MenuBottomSheetActionList.js";
|
|
52
53
|
import { menuBottomSheetStyles } from "../DropdownMenu/menuBottomSheet.stylex.js";
|
|
53
54
|
import { renderDropdownItems } from "../DropdownMenu/renderDropdownItems.js";
|
|
@@ -60,6 +61,8 @@ import { useMenuPress } from "../hooks/useMenuPress.js";
|
|
|
60
61
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
61
62
|
import { useLongPress } from "../hooks/useLongPress.js";
|
|
62
63
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
64
|
+
import "../Layer/layerViewportInset.stylex.js";
|
|
65
|
+
import { layerViewportInset } from "../Layer/layerViewportInset.stylex.js";
|
|
63
66
|
import "../theme/tokens.stylex.js";
|
|
64
67
|
import { colorVars, spacingVars, radiusVars, durationVars, easeVars, shadowVars } from "../theme/tokens.stylex.js";
|
|
65
68
|
import { mergeProps, rtlStyles } from "../utils/index.js";
|
|
@@ -86,7 +89,7 @@ const styles = {
|
|
|
86
89
|
k1xSpc: "x78zum5",
|
|
87
90
|
kXwgrk: "xdt5ytf",
|
|
88
91
|
kOIVth: "x1lsbc85",
|
|
89
|
-
kskxy: "
|
|
92
|
+
kskxy: "x1uh1i8a",
|
|
90
93
|
kORKVm: "x1odjw0f",
|
|
91
94
|
"--_dropdown-menu-radius": "x1fcsqxe",
|
|
92
95
|
"--_dropdown-menu-padding": "xgory14",
|
|
@@ -386,6 +389,7 @@ export function ContextMenu({
|
|
|
386
389
|
return;
|
|
387
390
|
}
|
|
388
391
|
if (menu && !menu.contains(e.target)) {
|
|
392
|
+
noteOutsideDismissal(menu.ownerDocument);
|
|
389
393
|
closeMenu();
|
|
390
394
|
}
|
|
391
395
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as stylex from '@stylexjs/stylex';
|
|
2
2
|
import { type InputStatus } from '../Field/index.js';
|
|
3
3
|
import { type ISODateString, type DayOfWeek, type DayOfWeekName } from '../Calendar/index.js';
|
|
4
|
+
import type { CalendarSystem } from '../utils/calendarSystem.js';
|
|
4
5
|
import type { TimestampFormat } from '../Timestamp/index.js';
|
|
5
6
|
import { type PickerPresentation } from '../utils/inputPresentation.js';
|
|
6
7
|
declare const sizeStyles: Readonly<{
|
|
@@ -136,7 +137,8 @@ export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElemen
|
|
|
136
137
|
*/
|
|
137
138
|
dateConstraints?: ReadonlyArray<(date: Date) => boolean>;
|
|
138
139
|
/**
|
|
139
|
-
* Placeholder text shown when no date is selected.
|
|
140
|
+
* Placeholder text shown when no date is selected. A caller placeholder
|
|
141
|
+
* replaces the calendar format hint.
|
|
140
142
|
* @default "Select a date"
|
|
141
143
|
*/
|
|
142
144
|
placeholder?: string;
|
|
@@ -202,9 +204,10 @@ export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElemen
|
|
|
202
204
|
* - `(value: ISODateString) => string`: fully custom display string
|
|
203
205
|
*
|
|
204
206
|
* Formatting applies only to the committed value — never to text the user is
|
|
205
|
-
* actively typing.
|
|
206
|
-
*
|
|
207
|
-
*
|
|
207
|
+
* actively typing. Named formats write the date in the field's `calendar`;
|
|
208
|
+
* `'system_date'` stays the Gregorian ISO date. A custom function's output
|
|
209
|
+
* that the field cannot read back can't be re-committed after an edit;
|
|
210
|
+
* external `value` changes always recompute the display from the ISO value.
|
|
208
211
|
*
|
|
209
212
|
* @default 'date_long'
|
|
210
213
|
* @example
|
|
@@ -219,6 +222,28 @@ export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElemen
|
|
|
219
222
|
* ```
|
|
220
223
|
*/
|
|
221
224
|
format?: DateInputFormat | ((value: ISODateString) => string);
|
|
225
|
+
/**
|
|
226
|
+
* The calendar the field shows dates in, such as `'persian'`, `'hebrew'`, or
|
|
227
|
+
* `'buddhist'`: the text field, its calendar popover, and the bottom sheet's
|
|
228
|
+
* months and wheels. `value`, `onChange`, `min`, and `max` stay Gregorian
|
|
229
|
+
* ISO dates in every calendar. People type a date the way the locale writes
|
|
230
|
+
* it in this calendar, and the committed text uses it.
|
|
231
|
+
* Years are years of this calendar, so a Buddhist field reads `2026` as
|
|
232
|
+
* Buddhist year 2026; set `min` and `max` to catch a year typed in the
|
|
233
|
+
* wrong calendar. Calendars other than `gregory`, `iso8601`, `buddhist`,
|
|
234
|
+
* `roc`, and `japanese` need `Temporal`, native or a polyfill the
|
|
235
|
+
* application loads; without it the field uses the Gregorian calendar.
|
|
236
|
+
* The native date control is Gregorian, so with a calendar other than
|
|
237
|
+
* `gregory` or `iso8601` every presentation that would show it uses the
|
|
238
|
+
* popover on a fine pointer and the bottom sheet on a coarse pointer.
|
|
239
|
+
*
|
|
240
|
+
* @default the InternationalizationProvider's calendar, else `'gregory'`
|
|
241
|
+
* @example
|
|
242
|
+
* ```
|
|
243
|
+
* <DateInput label="Start date" calendar="persian" value={date} onChange={setDate} />
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
calendar?: CalendarSystem;
|
|
222
247
|
/**
|
|
223
248
|
* When date picking is handed to the browser/OS instead of Astryx's own
|
|
224
249
|
* surfaces: the field becomes an `<input type="date">` and the platform
|
|
@@ -244,6 +269,9 @@ export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElemen
|
|
|
244
269
|
* picker. `dateConstraints` is enforced the same way, on commit, and is
|
|
245
270
|
* reason enough to prefer `'never'` on a field that uses it.
|
|
246
271
|
*
|
|
272
|
+
* In a calendar other than `gregory` or `iso8601`, `'touch'` and `'always'`
|
|
273
|
+
* use the calendar popover on a mouse and the touch picker on a finger.
|
|
274
|
+
*
|
|
247
275
|
* @default 'touch'
|
|
248
276
|
* @deprecated Use `presentation` (`spec:AST-043` FR3):
|
|
249
277
|
* `'touch'` → `'adaptive-native'`, `'always'` → `'native'`,
|
|
@@ -258,12 +286,15 @@ export interface DateInputProps extends Omit<FieldInputBaseProps<HTMLInputElemen
|
|
|
258
286
|
* - `'popover'`: Astryx's typed field + calendar popover on every pointer
|
|
259
287
|
* - `'bottom-sheet'`: Astryx's bottom-sheet calendar on every pointer
|
|
260
288
|
* - `'native'`: the browser/OS picker on every pointer, with no Astryx
|
|
261
|
-
* fallback (FR2)
|
|
289
|
+
* fallback (FR2), except in a calendar other than `gregory` or
|
|
290
|
+
* `iso8601`, where it is `'adaptive-bottom-sheet'` and warns in
|
|
291
|
+
* development
|
|
262
292
|
* - `'adaptive-bottom-sheet'`: popover on a fine pointer, bottom sheet on
|
|
263
293
|
* a coarse pointer
|
|
264
294
|
* - `'adaptive-native'` (default): popover on a fine pointer, browser/OS
|
|
265
295
|
* picker on a coarse pointer, keeping the released Astryx fallbacks
|
|
266
|
-
* where a native control cannot express the value (FR2)
|
|
296
|
+
* where a native control cannot express the value (FR2), and the bottom
|
|
297
|
+
* sheet in a calendar other than `gregory` or `iso8601`
|
|
267
298
|
*
|
|
268
299
|
* @default 'adaptive-native'
|
|
269
300
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/DateInput/DateInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/DateInput/DateInput.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAS3C,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAQlB,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAkBrB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAG5D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAwDpC,QAAA,MAAM,UAAU;;;;;;;;;;;;;EAad,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH;;;;;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