@astryxdesign/core 0.7.8-canary.f50bc74 → 0.7.8-canary.f5a3152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +6 -3
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +3 -6
- 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/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +2 -1
- 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/DateInput/PickerWheel.d.ts +1 -1
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +27 -6
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +8 -30
- package/dist/DateInput/Wheel.d.ts +2 -2
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +54 -12
- 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/wheelOptions.d.ts +22 -2
- package/dist/DateInput/wheelOptions.d.ts.map +1 -1
- package/dist/DateInput/wheelOptions.js +14 -2
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +70 -129
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +6 -1
- package/dist/Icon/Icon.d.ts +3 -3
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +15 -1
- 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/Layer/useLayer.js +1 -1
- package/dist/Layer/useTouchTrigger.d.ts +13 -7
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +17 -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.js +1 -1
- package/dist/MobileNav/MobileNav.js +1 -1
- 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/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +7 -2
- package/dist/Popover/usePopover.js +2 -2
- package/dist/PowerSearch/PowerSearch.d.ts +6 -4
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +1 -1
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +24 -1
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchBottomSheet.js +172 -50
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +18 -4
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +1 -5
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +84 -7
- package/dist/PowerSearch/formatFilterValue.d.ts +2 -7
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +2 -15
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatTokenValue.js +3 -4
- package/dist/PowerSearch/powerSearchDateZone.d.ts +5 -1
- package/dist/PowerSearch/powerSearchDateZone.d.ts.map +1 -1
- package/dist/PowerSearch/powerSearchDateZone.js +22 -2
- package/dist/PowerSearch/types.d.ts +6 -1
- package/dist/PowerSearch/types.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +15 -15
- package/dist/Resizable/createResizable.d.ts +70 -16
- package/dist/Resizable/createResizable.d.ts.map +1 -1
- package/dist/Resizable/createResizable.js +180 -22
- 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.js +2 -2
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +2 -1
- 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/Stepper/Stepper.d.ts.map +1 -1
- package/dist/Stepper/Stepper.js +10 -15
- 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 +13 -3
- 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.map +1 -1
- package/dist/TextInput/TextInput.js +2 -1
- 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 -118
- 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/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +1 -23
- package/dist/Tokenizer/Tokenizer.d.ts +0 -14
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +2 -6
- package/dist/Tokenizer/TokenizerBottomSheet.js +11 -17
- 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 +7 -32
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +182 -71
- package/dist/astryx.css +11 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +3 -0
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +5 -4
- package/dist/hooks/scrollLockTouchGuard.d.ts.map +1 -1
- package/dist/hooks/scrollLockTouchGuard.js +9 -26
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.d.ts +3 -2
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +3 -8
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +5 -2
- 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 +9 -2
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +9 -2
- package/dist/motion/animatedLayout.d.ts +8 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +239 -46
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +1 -7
- 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/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 +4 -3
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +4 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +14 -13
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +8 -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/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 +7 -25
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +8 -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/interactionOverlay.stylex.d.ts +3 -2
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +3 -2
- package/dist/utils/isFocusDetached.d.ts +27 -0
- package/dist/utils/isFocusDetached.d.ts.map +1 -0
- package/dist/utils/isFocusDetached.js +32 -0
- package/dist/utils/plainDate.d.ts +23 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +49 -4
- package/dist/utils/pressFeedback.d.ts +6 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +77 -12
- 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/locales/en.json +37 -9
- package/locales/pseudo.json +27 -6
- package/package.json +4 -4
- package/src/AppShell/AppShell.tsx +9 -4
- package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +5 -0
- package/src/Calendar/Calendar.tsx +4 -7
- 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/Chat/ChatComposerInput.tsx +2 -7
- 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/DateInput/PickerWheel.tsx +39 -8
- package/src/DateInput/TouchDateField.tsx +5 -32
- package/src/DateInput/Wheel.tsx +97 -24
- package/src/DateInput/datePickerTouch.ts +15 -0
- package/src/DateInput/wheelOptions.ts +31 -2
- package/src/DateTimeInput/TouchDateTimeField.tsx +100 -191
- package/src/HoverCard/useHoverCard.tsx +6 -1
- package/src/Icon/Icon.doc.mjs +5 -5
- package/src/Icon/Icon.tsx +19 -4
- package/src/InfoTip/InfoTip.tsx +72 -16
- package/src/Layer/useLayer.tsx +1 -1
- package/src/Layer/useTouchTrigger.ts +17 -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 +1 -1
- package/src/Lightbox/useLightbox.doc.mjs +167 -0
- package/src/MobileNav/MobileNav.tsx +1 -1
- package/src/MultiSelector/MultiSelector.tsx +2 -7
- package/src/NumberInput/NumberInput.tsx +2 -7
- package/src/Overlay/Overlay.tsx +7 -2
- package/src/Popover/usePopover.tsx +2 -2
- package/src/PowerSearch/PowerSearch.doc.mjs +4 -4
- package/src/PowerSearch/PowerSearch.tsx +7 -5
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +237 -62
- package/src/PowerSearch/PowerSearchEditPopover.tsx +26 -3
- package/src/PowerSearch/PowerSearchToken.tsx +1 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +102 -7
- package/src/PowerSearch/formatFilterValue.ts +2 -18
- package/src/PowerSearch/formatTokenValue.ts +9 -11
- package/src/PowerSearch/powerSearchDateZone.ts +32 -1
- package/src/PowerSearch/types.ts +6 -1
- package/src/Resizable/ResizeHandle.tsx +18 -26
- package/src/Resizable/createResizable.ts +242 -27
- package/src/Resizable/separatorAttributes.ts +73 -0
- package/src/Resizable/useResizable.ts +2 -2
- package/src/Selector/Selector.tsx +2 -7
- package/src/SideNav/SideNav.tsx +41 -5
- package/src/Slider/Slider.tsx +20 -11
- package/src/Stepper/Stepper.tsx +10 -27
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +27 -7
- 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 +2 -7
- package/src/TimeInput/TimeWheels.tsx +218 -0
- package/src/TimeInput/TouchTimeField.tsx +93 -157
- package/src/TimeInput/timeWheelRules.ts +352 -0
- package/src/Timestamp/formatInstant.ts +1 -33
- package/src/Tokenizer/Tokenizer.doc.mjs +0 -16
- package/src/Tokenizer/Tokenizer.tsx +2 -25
- package/src/Tokenizer/TokenizerBottomSheet.tsx +16 -22
- package/src/Tooltip/Tooltip.tsx +6 -42
- package/src/Tooltip/useTooltip.tsx +201 -97
- package/src/gestures/GestureHost.ts +5 -4
- package/src/hooks/actionGroupTracker.ts +5 -4
- package/src/hooks/scrollLockTouchGuard.ts +9 -42
- package/src/hooks/useScrollLock.ts +3 -7
- package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +5 -2
- 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 +10 -4
- package/src/i18n/generated-locales/pseudo.generated.ts +10 -4
- package/src/motion/MEASUREMENTS.md +10 -0
- package/src/motion/README.md +1 -0
- package/src/motion/animatedLayout.ts +313 -55
- package/src/motion/animator.ts +1 -7
- package/src/motion/frameBlock.ts +16 -0
- package/src/motion/uikit/datePicker.ts +60 -0
- package/src/motion/uikit/index.ts +4 -3
- package/src/theme/generateThemeRules.ts +14 -12
- package/src/theme/themeMotion.ts +10 -2
- package/src/theme/tokens.stylex.ts +2 -0
- package/src/utils/disabledInteraction.ts +23 -2
- package/src/utils/focusReturn.ts +8 -31
- package/src/utils/index.ts +1 -1
- package/src/utils/interactionOverlay.stylex.ts +3 -2
- package/src/utils/isFocusDetached.ts +34 -0
- package/src/utils/plainDate.ts +59 -4
- package/src/utils/pressFeedback.ts +102 -24
- 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/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 -105
- package/dist/Layer/usePressPin.d.ts.map +0 -1
- package/dist/Layer/usePressPin.js +0 -413
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +0 -38
- package/src/Layer/usePressPin.ts +0 -576
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAyCf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,OAAO,EAEL,KAAK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;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAuQD,wBAAgB,QAAQ,CAAC,EACvB,OAAoB,EACpB,MAAM,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBAsyBf;yBArzBe,QAAQ"}
|
|
@@ -37,7 +37,7 @@ import { MAX_CLOSE_DELAY_MS as MOBILE_NAV_MAX_CLOSE_DELAY_MS } from "../MobileNa
|
|
|
37
37
|
import { SideNavRenderContext } from "../SideNav/SideNavRenderContext.js";
|
|
38
38
|
import { SideNavShellContext } from "../SideNav/railMotion.js";
|
|
39
39
|
import { useAnimatedLayout } from "../hooks/useAnimatedLayout.js";
|
|
40
|
-
import { holdLayoutSwap, landLayoutGlide, layoutMotionFor, playLayoutFrames, playLayoutSwap, reportLayoutChange } from "../motion/animatedLayout.js";
|
|
40
|
+
import { holdLayoutSwap, landLayoutGlide, layoutMotionFor, layoutStartFor, playLayoutFrames, playLayoutSwap, reportLayoutChange } from "../motion/animatedLayout.js";
|
|
41
41
|
import { TopNavRenderContext } from "../TopNav/TopNavRenderContext.js";
|
|
42
42
|
import { TopNavMobileContentContext } from "../TopNav/TopNavMobileContentContext.js";
|
|
43
43
|
import { AppShellMobileContext } from "./AppShellMobileContext.js";
|
|
@@ -609,7 +609,10 @@ export function AppShell({
|
|
|
609
609
|
let entering = 0;
|
|
610
610
|
const last = lastSwapRef.current;
|
|
611
611
|
if (last != null && motion.kind === 'spring') {
|
|
612
|
-
|
|
612
|
+
// Read at the change's own start, where the glide it retargets
|
|
613
|
+
// carries on. After a block, that is later than the frame the
|
|
614
|
+
// timeline still reads.
|
|
615
|
+
const elapsed = Math.max(0, layoutStartFor(main.ownerDocument) - last.startedAt);
|
|
613
616
|
if (elapsed < motion.progress.durationMs) {
|
|
614
617
|
const p = 1 - motion.progress.remaining(elapsed);
|
|
615
618
|
held = last.entering + (1 - last.entering) * p;
|
|
@@ -672,7 +675,7 @@ export function AppShell({
|
|
|
672
675
|
entering
|
|
673
676
|
} = pending;
|
|
674
677
|
lastSwapRef.current = {
|
|
675
|
-
startedAt:
|
|
678
|
+
startedAt: layoutStartFor(main.ownerDocument),
|
|
676
679
|
held,
|
|
677
680
|
entering
|
|
678
681
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA0D5C,YAAY,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACV,MAAM,oBAAoB,CAAC;AAgB5B,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAID,UAAU,iBAAkB,SAAQ,IAAI,CACtC,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,GAAG,cAAc,CAC5B;IACC,kDAAkD;IAClD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qDAAqD;IACrD,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACtC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAEvB,4CAA4C;IAC5C,GAAG,CAAC,EAA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AAC;CACvC;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAqBrE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAC,GAAG,EAAE,GAAG,KAAK,EAAC,EAAE,aAAa,+BAkhBtD;yBAlhBe,QAAQ"}
|
|
@@ -31,6 +31,7 @@ import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
|
31
31
|
import { interactionOverlayStyles } from "../utils/interactionOverlay.stylex.js";
|
|
32
32
|
import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
33
33
|
import { getInitialFocusDate } from "./getInitialFocusDate.js";
|
|
34
|
+
import { getWeekdayHeaders } from "./getWeekdayHeaderNames.js";
|
|
34
35
|
import { computeDayCellState, computeRangeRounding, computePreviewRounding, computeDayNeighborContinuity, isEndpoint } from "./dayCellUtils.js";
|
|
35
36
|
|
|
36
37
|
// =============================================================================
|
|
@@ -540,18 +541,14 @@ function MonthGrid({
|
|
|
540
541
|
// Use hooks for days generation and constraints
|
|
541
542
|
const {
|
|
542
543
|
days,
|
|
543
|
-
weeks
|
|
544
|
-
dayNames
|
|
544
|
+
weeks
|
|
545
545
|
} = useCalendarDays({
|
|
546
546
|
year,
|
|
547
547
|
month: month.month,
|
|
548
548
|
weekStartsOn,
|
|
549
549
|
hasVariableRowCount
|
|
550
550
|
});
|
|
551
|
-
const dayNameHeaders = useMemo(() =>
|
|
552
|
-
dayOfWeek: (weekStartsOn + offset) % 7,
|
|
553
|
-
name
|
|
554
|
-
})), [dayNames, weekStartsOn]);
|
|
551
|
+
const dayNameHeaders = useMemo(() => getWeekdayHeaders(locale, weekStartsOn), [locale, weekStartsOn]);
|
|
555
552
|
const rangeAnchor = useMemo(() => mode === 'range' && rangeSelectionStart ? plainDateFromISO(rangeSelectionStart) : null, [mode, rangeSelectionStart]);
|
|
556
553
|
const {
|
|
557
554
|
isDateDisabled
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DayOfWeek } from '../utils/dateTypes.js';
|
|
2
|
+
/** The longest abbreviated name a header row takes; the generator uses the same. */
|
|
3
|
+
export declare const MAX_ABBREVIATED_HEADER_LENGTH = 4;
|
|
4
|
+
/** One weekday header cell: its day of week (a stable key, since narrow names repeat) and its name. */
|
|
5
|
+
export interface WeekdayHeader {
|
|
6
|
+
dayOfWeek: DayOfWeek;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The seven weekday headers for a locale, in column order for the week that
|
|
11
|
+
* starts on `weekStartsOn`. Unicode extensions are ignored.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getWeekdayHeaders(locale: string, weekStartsOn?: DayOfWeek): WeekdayHeader[];
|
|
14
|
+
/** The names alone, in the same order as `getWeekdayHeaders`. */
|
|
15
|
+
export declare function getWeekdayHeaderNames(locale: string, weekStartsOn?: DayOfWeek): string[];
|
|
16
|
+
//# sourceMappingURL=getWeekdayHeaderNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWeekdayHeaderNames.d.ts","sourceRoot":"","sources":["../../src/Calendar/getWeekdayHeaderNames.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAWlD,oFAAoF;AACpF,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAqC/C,uGAAuG;AACvG,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,SAAa,GAC1B,aAAa,EAAE,CAMjB;AAED,iEAAiE;AACjE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,SAAa,GAC1B,MAAM,EAAE,CAEV"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file getWeekdayHeaderNames.ts
|
|
5
|
+
* @input Generated CLDR weekday header table and the shared date formatter
|
|
6
|
+
* @output Private resolver for one locale's weekday header row
|
|
7
|
+
* @position Package-internal pure utility for the Calendar grid and the
|
|
8
|
+
* DateInput and DateTimeInput bottom sheets; not exported from the package
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { characterCount } from "../utils/characters.js";
|
|
12
|
+
import { plainDateWeekdayNames } from "../utils/plainDate.js";
|
|
13
|
+
import { weekdayHeaderNamesByLocale } from "./weekdayHeaderNames.generated.js";
|
|
14
|
+
const weekdayNamesByLocale = weekdayHeaderNamesByLocale;
|
|
15
|
+
const englishWeekdayNames = weekdayNamesByLocale.en;
|
|
16
|
+
|
|
17
|
+
/** The longest abbreviated name a header row takes; the generator uses the same. */
|
|
18
|
+
export const MAX_ABBREVIATED_HEADER_LENGTH = 4;
|
|
19
|
+
function fitsHeader(names) {
|
|
20
|
+
return names.every(name => characterCount(name) <= MAX_ABBREVIATED_HEADER_LENGTH);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A language with no generated row keeps its own words. `Intl` has no CLDR
|
|
25
|
+
* short width, so names too long for the column fall to the narrow width.
|
|
26
|
+
*/
|
|
27
|
+
function sundayFirstNames(locale) {
|
|
28
|
+
let parsed;
|
|
29
|
+
try {
|
|
30
|
+
parsed = new Intl.Locale(locale);
|
|
31
|
+
} catch {
|
|
32
|
+
return englishWeekdayNames;
|
|
33
|
+
}
|
|
34
|
+
const generated = weekdayNamesByLocale[parsed.baseName] ?? weekdayNamesByLocale[parsed.language];
|
|
35
|
+
if (generated != null) {
|
|
36
|
+
return generated;
|
|
37
|
+
}
|
|
38
|
+
const abbreviated = plainDateWeekdayNames(parsed.baseName);
|
|
39
|
+
if (abbreviated == null) {
|
|
40
|
+
return englishWeekdayNames;
|
|
41
|
+
}
|
|
42
|
+
if (fitsHeader(abbreviated)) {
|
|
43
|
+
return abbreviated;
|
|
44
|
+
}
|
|
45
|
+
return plainDateWeekdayNames(parsed.baseName, 'narrow') ?? englishWeekdayNames;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** One weekday header cell: its day of week (a stable key, since narrow names repeat) and its name. */
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The seven weekday headers for a locale, in column order for the week that
|
|
52
|
+
* starts on `weekStartsOn`. Unicode extensions are ignored.
|
|
53
|
+
*/
|
|
54
|
+
export function getWeekdayHeaders(locale, weekStartsOn = 0) {
|
|
55
|
+
const names = sundayFirstNames(locale);
|
|
56
|
+
return Array.from({
|
|
57
|
+
length: 7
|
|
58
|
+
}, (_, offset) => {
|
|
59
|
+
const dayOfWeek = (weekStartsOn + offset) % 7;
|
|
60
|
+
return {
|
|
61
|
+
dayOfWeek,
|
|
62
|
+
name: names[dayOfWeek]
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** The names alone, in the same order as `getWeekdayHeaders`. */
|
|
68
|
+
export function getWeekdayHeaderNames(locale, weekStartsOn = 0) {
|
|
69
|
+
return getWeekdayHeaders(locale, weekStartsOn).map(header => header.name);
|
|
70
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCalendarDays.d.ts","sourceRoot":"","sources":["../../../src/Calendar/hooks/useCalendarDays.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,uBAAuB,CAAC;AAI/B;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,GAAG,EAAE,aAAa,CAAC;IACnB,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mDAAmD;IACnD,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,8BAA8B;IAC9B,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;IACvB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"useCalendarDays.d.ts","sourceRoot":"","sources":["../../../src/Calendar/hooks/useCalendarDays.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,uBAAuB,CAAC;AAI/B;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,GAAG,EAAE,aAAa,CAAC;IACnB,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mDAAmD;IACnD,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,8BAA8B;IAC9B,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;IACvB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CA2EvB"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { useMemo } from 'react';
|
|
15
15
|
import { plainDateToISO, getDaysInMonth, plainDateDayOfWeek, plainDateAddDays } from "../../utils/plainDate.js";
|
|
16
16
|
import { useLocale } from "../../i18n/index.js";
|
|
17
|
-
import {
|
|
17
|
+
import { getWeekdayHeaderNames } from "../getWeekdayHeaderNames.js";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Represents a single day in the calendar grid.
|
|
@@ -77,15 +77,7 @@ export function useCalendarDays(options) {
|
|
|
77
77
|
totalCells
|
|
78
78
|
};
|
|
79
79
|
}, [year, month, weekStartsOn, hasVariableRowCount]);
|
|
80
|
-
|
|
81
|
-
// Generated strings avoid Date anchors, so weekday headers cannot shift with
|
|
82
|
-
// the runtime timezone. Keep numeric indices as the rotation source of truth.
|
|
83
|
-
const dayNames = useMemo(() => {
|
|
84
|
-
const names = getStandaloneShortWeekdayNames(locale);
|
|
85
|
-
return Array.from({
|
|
86
|
-
length: 7
|
|
87
|
-
}, (_, index) => names[(index + weekStartsOn) % 7]);
|
|
88
|
-
}, [locale, weekStartsOn]);
|
|
80
|
+
const dayNames = useMemo(() => getWeekdayHeaderNames(locale, weekStartsOn), [locale, weekStartsOn]);
|
|
89
81
|
|
|
90
82
|
// Generate days array
|
|
91
83
|
const days = useMemo(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @generated by scripts/generate-cldr-weekdays.mjs from Unicode CLDR 48.2.0.
|
|
3
3
|
* Do not edit by hand. Run `pnpm generate:cldr-weekdays` instead.
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type WeekdayHeaderNames = readonly [
|
|
6
6
|
string,
|
|
7
7
|
string,
|
|
8
8
|
string,
|
|
@@ -11,37 +11,37 @@ export type StandaloneShortWeekdayNames = readonly [
|
|
|
11
11
|
string,
|
|
12
12
|
string
|
|
13
13
|
];
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const weekdayHeaderNamesByLocale: {
|
|
15
15
|
readonly af: readonly ["So.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Sa."];
|
|
16
16
|
readonly ar: readonly ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"];
|
|
17
17
|
readonly 'ar-SA': readonly ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"];
|
|
18
18
|
readonly ca: readonly ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."];
|
|
19
19
|
readonly cs: readonly ["ne", "po", "út", "st", "čt", "pá", "so"];
|
|
20
20
|
readonly da: readonly ["sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø."];
|
|
21
|
-
readonly de: readonly ["So
|
|
22
|
-
readonly el: readonly ["
|
|
23
|
-
readonly en: readonly ["
|
|
24
|
-
readonly es: readonly ["
|
|
21
|
+
readonly de: readonly ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
|
|
22
|
+
readonly el: readonly ["Κυρ", "Δευ", "Τρί", "Τετ", "Πέμ", "Παρ", "Σάβ"];
|
|
23
|
+
readonly en: readonly ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
24
|
+
readonly es: readonly ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"];
|
|
25
25
|
readonly fi: readonly ["su", "ma", "ti", "ke", "to", "pe", "la"];
|
|
26
|
-
readonly fr: readonly ["
|
|
26
|
+
readonly fr: readonly ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."];
|
|
27
27
|
readonly he: readonly ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"];
|
|
28
28
|
readonly hu: readonly ["V", "H", "K", "Sze", "Cs", "P", "Szo"];
|
|
29
29
|
readonly it: readonly ["dom", "lun", "mar", "mer", "gio", "ven", "sab"];
|
|
30
30
|
readonly ja: readonly ["日", "月", "火", "水", "木", "金", "土"];
|
|
31
31
|
readonly ko: readonly ["일", "월", "화", "수", "목", "금", "토"];
|
|
32
32
|
readonly nl: readonly ["zo", "ma", "di", "wo", "do", "vr", "za"];
|
|
33
|
-
readonly no: readonly ["
|
|
33
|
+
readonly no: readonly ["søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."];
|
|
34
34
|
readonly pl: readonly ["nie", "pon", "wto", "śro", "czw", "pią", "sob"];
|
|
35
35
|
readonly pt: readonly ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."];
|
|
36
36
|
readonly 'pt-PT': readonly ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."];
|
|
37
|
-
readonly ro: readonly ["
|
|
37
|
+
readonly ro: readonly ["dum.", "lun.", "mar.", "mie.", "joi", "vin.", "sâm."];
|
|
38
38
|
readonly ru: readonly ["вс", "пн", "вт", "ср", "чт", "пт", "сб"];
|
|
39
|
-
readonly sr: readonly ["
|
|
40
|
-
readonly sv: readonly ["
|
|
41
|
-
readonly tr: readonly ["
|
|
39
|
+
readonly sr: readonly ["нед", "пон", "уто", "сре", "чет", "пет", "суб"];
|
|
40
|
+
readonly sv: readonly ["sön", "mån", "tis", "ons", "tors", "fre", "lör"];
|
|
41
|
+
readonly tr: readonly ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"];
|
|
42
42
|
readonly uk: readonly ["нд", "пн", "вт", "ср", "чт", "пт", "сб"];
|
|
43
43
|
readonly vi: readonly ["CN", "T2", "T3", "T4", "T5", "T6", "T7"];
|
|
44
44
|
readonly zh: readonly ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
|
45
|
-
readonly 'zh-TW': readonly ["
|
|
45
|
+
readonly 'zh-TW': readonly ["週日", "週一", "週二", "週三", "週四", "週五", "週六"];
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=
|
|
47
|
+
//# sourceMappingURL=weekdayHeaderNames.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weekdayHeaderNames.generated.d.ts","sourceRoot":"","sources":["../../src/Calendar/weekdayHeaderNames.generated.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,MAAM,kBAAkB,GAAG,SAAS;IACxC,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC0B,CAAC"}
|
package/dist/Calendar/{standaloneShortWeekdayNames.generated.js → weekdayHeaderNames.generated.js}
RENAMED
|
@@ -5,36 +5,36 @@
|
|
|
5
5
|
* Do not edit by hand. Run `pnpm generate:cldr-weekdays` instead.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const weekdayHeaderNamesByLocale = {
|
|
9
9
|
af: ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'],
|
|
10
10
|
ar: ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
|
11
11
|
'ar-SA': ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
|
12
12
|
ca: ['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'],
|
|
13
13
|
cs: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
|
14
14
|
da: ['sø.', 'ma.', 'ti.', 'on.', 'to.', 'fr.', 'lø.'],
|
|
15
|
-
de: ['So
|
|
16
|
-
el: ['
|
|
17
|
-
en: ['
|
|
18
|
-
es: ['
|
|
15
|
+
de: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
|
|
16
|
+
el: ['Κυρ', 'Δευ', 'Τρί', 'Τετ', 'Πέμ', 'Παρ', 'Σάβ'],
|
|
17
|
+
en: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
18
|
+
es: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'],
|
|
19
19
|
fi: ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'],
|
|
20
|
-
fr: ['
|
|
20
|
+
fr: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
|
|
21
21
|
he: ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'],
|
|
22
22
|
hu: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
|
|
23
23
|
it: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'],
|
|
24
24
|
ja: ['日', '月', '火', '水', '木', '金', '土'],
|
|
25
25
|
ko: ['일', '월', '화', '수', '목', '금', '토'],
|
|
26
26
|
nl: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
|
27
|
-
no: ['
|
|
27
|
+
no: ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'],
|
|
28
28
|
pl: ['nie', 'pon', 'wto', 'śro', 'czw', 'pią', 'sob'],
|
|
29
29
|
pt: ['dom.', 'seg.', 'ter.', 'qua.', 'qui.', 'sex.', 'sáb.'],
|
|
30
30
|
'pt-PT': ['dom.', 'seg.', 'ter.', 'qua.', 'qui.', 'sex.', 'sáb.'],
|
|
31
|
-
ro: ['
|
|
31
|
+
ro: ['dum.', 'lun.', 'mar.', 'mie.', 'joi', 'vin.', 'sâm.'],
|
|
32
32
|
ru: ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
|
33
|
-
sr: ['
|
|
34
|
-
sv: ['
|
|
35
|
-
tr: ['
|
|
33
|
+
sr: ['нед', 'пон', 'уто', 'сре', 'чет', 'пет', 'суб'],
|
|
34
|
+
sv: ['sön', 'mån', 'tis', 'ons', 'tors', 'fre', 'lör'],
|
|
35
|
+
tr: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'],
|
|
36
36
|
uk: ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
|
37
37
|
vi: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
|
38
38
|
zh: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
39
|
-
'zh-TW': ['
|
|
39
|
+
'zh-TW': ['週日', '週一', '週二', '週三', '週四', '週五', '週六']
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposerInput.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAML,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAqBrE,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAQ,KAAK,UAAU,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatComposerInput.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerInput.tsx"],"names":[],"mappings":"AAIA;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,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0IAA0I;IAC1I,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,EACrC,IAAI,EAAE,MAAM,KACT,OAAO,GAAG,IAAI,CAAC;IACpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,yBAAyB,GAAG,KAAK,CAAC;IACjD,8BAA8B;IAC9B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3D;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAwGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,+BAonB9D;yBApnBe,iBAAiB;;;AA4nBjC,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,+BAkB5E;yBAlBe,wBAAwB"}
|
|
@@ -40,6 +40,7 @@ import { useChatPasteAsToken } from "./useChatPasteAsToken.js";
|
|
|
40
40
|
import { Badge } from "../Badge/index.js";
|
|
41
41
|
import { useChatComposerContext } from "./ChatContext.js";
|
|
42
42
|
import { themeProps } from "../utils/themeProps.js";
|
|
43
|
+
import { withholdCallerHandlers } from "../utils/disabledInteraction.js";
|
|
43
44
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
44
45
|
import english from "../i18n/generated-english/Chat/ChatComposerInput.generated.js";
|
|
45
46
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -158,7 +159,7 @@ export function ChatComposerInput(props) {
|
|
|
158
159
|
} = props;
|
|
159
160
|
// Keep focus/blur observation available, but do not forward activation or
|
|
160
161
|
// editing callbacks from the disabled root (including capture handlers).
|
|
161
|
-
const rootProps =
|
|
162
|
+
const rootProps = withholdCallerHandlers(rest, isDisabled);
|
|
162
163
|
const label = labelFromProps ?? t('@astryx.chat.composerInput.label');
|
|
163
164
|
const placeholder = placeholderFromProps ?? composerCtx?.placeholder ?? t('@astryx.chat.composer.placeholder');
|
|
164
165
|
const composerOnChange = composerCtx?.onChange;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file CheckboxList.tsx
|
|
3
|
-
* @input Uses React, useId, useOptimistic, useTransition, Field, List, CheckboxListContext
|
|
3
|
+
* @input Uses React, useId, useOptimistic, useTransition, Field, List, CheckboxListContext, requiredGroup
|
|
4
4
|
* @output Exports CheckboxList component, CheckboxListProps
|
|
5
5
|
* @position Core implementation; consumed by index.ts, tested by CheckboxList.test.tsx
|
|
6
6
|
*
|
|
@@ -32,6 +32,24 @@ export interface CheckboxListProps extends Omit<FieldInputBaseProps<HTMLDivEleme
|
|
|
32
32
|
* Description text displayed below the label.
|
|
33
33
|
*/
|
|
34
34
|
description?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the group is optional. Shows the optional indicator after the
|
|
37
|
+
* group label, unless a surrounding `FormLayout` already makes fields
|
|
38
|
+
* optional by default.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
isOptional?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the group needs at least one checked box. Shows the required
|
|
44
|
+
* indicator after the group label by the same rules as every input field.
|
|
45
|
+
* While no box is checked, the browser blocks submit and moves focus to
|
|
46
|
+
* the first box that is neither disabled nor read-only. A disabled or
|
|
47
|
+
* read-only group requires nothing. Show your own error text through
|
|
48
|
+
* `status`.
|
|
49
|
+
* Mutually exclusive with isOptional.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
isRequired?: boolean;
|
|
35
53
|
/**
|
|
36
54
|
* Status indicator for the checkbox group.
|
|
37
55
|
* When set with a message, displays a colored message box below the group.
|
|
@@ -115,7 +133,7 @@ export interface CheckboxListProps extends Omit<FieldInputBaseProps<HTMLDivEleme
|
|
|
115
133
|
* </CheckboxList>
|
|
116
134
|
* ```
|
|
117
135
|
*/
|
|
118
|
-
export declare function CheckboxList({ label, isLabelHidden, description, status, value, onChange, changeAction, density, hasDividers, isDisabled, disabledMessage, isReadOnly, children, ref, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, ...restProps }: CheckboxListProps): import("react").JSX.Element;
|
|
136
|
+
export declare function CheckboxList({ label, isLabelHidden, description, isOptional, isRequired, status, value, onChange, changeAction, density, hasDividers, isDisabled, disabledMessage, isReadOnly, children, ref, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, ...restProps }: CheckboxListProps): import("react").JSX.Element;
|
|
119
137
|
export declare namespace CheckboxList {
|
|
120
138
|
var displayName: string;
|
|
121
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxList.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,SAAS,EAC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AAM,EAAE,KAAK,IAAI,CAAC;IACtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,OAAoB,EACpB,WAAmB,EACnB,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,QAAQ,EACR,GAAG,EACH,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EAAE,kBAAkB,EACrC,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,iBAAiB,+BA2KnB;yBAtMe,YAAY"}
|
|
@@ -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
|
*
|
|
@@ -26,6 +26,7 @@ import { mergeProps } from "../utils/index.js";
|
|
|
26
26
|
import { themeProps } from "../utils/themeProps.js";
|
|
27
27
|
import { joinAriaIDs } from "../utils/inputAria.js";
|
|
28
28
|
import { CheckboxListContext } from "./CheckboxListContext.js";
|
|
29
|
+
import { createRequiredGroup } from "./requiredGroup.js";
|
|
29
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
31
|
const EMPTY_ARRAY = [];
|
|
31
32
|
/**
|
|
@@ -50,6 +51,8 @@ export function CheckboxList({
|
|
|
50
51
|
label,
|
|
51
52
|
isLabelHidden = false,
|
|
52
53
|
description,
|
|
54
|
+
isOptional = false,
|
|
55
|
+
isRequired = false,
|
|
53
56
|
status,
|
|
54
57
|
value,
|
|
55
58
|
onChange,
|
|
@@ -84,6 +87,8 @@ export function CheckboxList({
|
|
|
84
87
|
const labelID = useId();
|
|
85
88
|
const descriptionID = useId();
|
|
86
89
|
const statusMessageID = useId();
|
|
90
|
+
const requiredGroup = useMemo(() => isRequired ? createRequiredGroup() : undefined, [isRequired]);
|
|
91
|
+
const observeRequiredGroup = useCallback(container => container != null && requiredGroup != null ? requiredGroup.observe(container) : undefined, [requiredGroup]);
|
|
87
92
|
const [, startTransition] = useTransition();
|
|
88
93
|
const isCollectionMode = value !== undefined;
|
|
89
94
|
const effectiveValue = value ?? EMPTY_ARRAY;
|
|
@@ -127,8 +132,9 @@ export function CheckboxList({
|
|
|
127
132
|
disabledMessageID: showsDisabledMessage ? disabledMessageTooltip.describedBy : undefined,
|
|
128
133
|
isReadOnly,
|
|
129
134
|
isInvalid: status?.type === 'error',
|
|
130
|
-
loadingValues
|
|
131
|
-
|
|
135
|
+
loadingValues,
|
|
136
|
+
requiredGroup
|
|
137
|
+
}), [isCollectionMode, optimisticValue, handleChange, isDisabled, showsDisabledMessage, disabledMessageTooltip.describedBy, isReadOnly, status?.type, loadingValues, requiredGroup]);
|
|
132
138
|
return /*#__PURE__*/_jsxs(Field, {
|
|
133
139
|
label: label,
|
|
134
140
|
isLabelHidden: isLabelHidden,
|
|
@@ -136,6 +142,8 @@ export function CheckboxList({
|
|
|
136
142
|
inputID: inputID,
|
|
137
143
|
labelID: labelID,
|
|
138
144
|
isGroupLabel: true,
|
|
145
|
+
isOptional: isOptional,
|
|
146
|
+
isRequired: isRequired,
|
|
139
147
|
descriptionID: description ? descriptionID : undefined,
|
|
140
148
|
isDisabled: isDisabled,
|
|
141
149
|
status: status ? {
|
|
@@ -156,7 +164,7 @@ export function CheckboxList({
|
|
|
156
164
|
...rest,
|
|
157
165
|
// The disabled-message tooltip anchors here; its handlers are gated
|
|
158
166
|
// internally by isEnabled, so attaching unconditionally is safe.
|
|
159
|
-
ref: useMergedRefs(ref, disabledMessageTooltip.ref),
|
|
167
|
+
ref: useMergedRefs(ref, disabledMessageTooltip.ref, observeRequiredGroup),
|
|
160
168
|
...mergeProps(stylex.props(controlXstyle), controlClassName, controlStyle),
|
|
161
169
|
role: "group"
|
|
162
170
|
// Screen readers announce the whole group as unavailable. Its dimmed
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RequiredGroup } from './requiredGroup.js';
|
|
1
2
|
export interface CheckboxListContextValue {
|
|
2
3
|
value?: string[];
|
|
3
4
|
/**
|
|
@@ -36,6 +37,12 @@ export interface CheckboxListContextValue {
|
|
|
36
37
|
* when idle.
|
|
37
38
|
*/
|
|
38
39
|
loadingValues?: ReadonlyArray<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Present when the list is `isRequired`. Each item registers its checkbox,
|
|
42
|
+
* so that while no box is checked the first enabled box carries native
|
|
43
|
+
* `required`.
|
|
44
|
+
*/
|
|
45
|
+
requiredGroup?: RequiredGroup;
|
|
39
46
|
}
|
|
40
47
|
export declare const CheckboxListContext: import("react").Context<CheckboxListContextValue | null>;
|
|
41
48
|
//# sourceMappingURL=CheckboxListContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxListContext.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListContext.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxListContext.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListContext.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,0DACiC,CAAC"}
|
|
@@ -4,7 +4,8 @@
|
|
|
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
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxListItem.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CheckboxListItem.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAItE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAuBvC,MAAM,WAAW,qBAAsB,SAAQ,SAAS,CAAC,aAAa,CAAC;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;;;;;;;OAaG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IACtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;CAChC;AAyCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,WAAW,EACX,UAAU,EACV,UAAU,EAAE,cAAsB,EAClC,SAAS,EAAE,aAAqB,EAChC,SAAS,EACT,OAAO,EACP,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,KAAK,EACL,GAAG,SAAS,EACb,EAAE,qBAAqB,+BAiKvB;yBAlLe,gBAAgB"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* - /apps/storybook/stories/CheckboxList.stories.tsx
|
|
17
17
|
* - /packages/cli/assets/templates/blocks/components/CheckboxList/ (showcase blocks)
|
|
18
18
|
*/
|
|
19
|
-
import { use, useId, useRef } from 'react';
|
|
19
|
+
import { use, useCallback, useId, useRef } from 'react';
|
|
20
20
|
import * as stylex from '@stylexjs/stylex';
|
|
21
21
|
import "../theme/tokens.stylex.js";
|
|
22
22
|
import { colorVars } from "../theme/tokens.stylex.js";
|
|
@@ -26,6 +26,7 @@ import { ListContext } from "../List/ListContext.js";
|
|
|
26
26
|
import { CheckboxListContext } from "./CheckboxListContext.js";
|
|
27
27
|
import { ItemDescriptionContext } from "../Item/ItemDescriptionContext.js";
|
|
28
28
|
import { joinAriaIDs } from "../utils/inputAria.js";
|
|
29
|
+
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
29
30
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
30
31
|
import english from "../i18n/generated-english/CheckboxList/CheckboxListItem.generated.js";
|
|
31
32
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -172,6 +173,17 @@ export function CheckboxListItem({
|
|
|
172
173
|
const checkboxRef = useRef(null);
|
|
173
174
|
const hasRowInteraction = isInteractive || onClickProp != null;
|
|
174
175
|
|
|
176
|
+
// A required group decides which box carries native `required` from the
|
|
177
|
+
// state of every box. A change to this box's state registers it again.
|
|
178
|
+
const requiredGroup = ctx?.requiredGroup;
|
|
179
|
+
const isBoxChecked = resolvedChecked === true;
|
|
180
|
+
const isBoxEnabled = !effectiveDisabled && !effectiveReadOnly;
|
|
181
|
+
const registerWithRequiredGroup = useCallback(input => input != null && requiredGroup != null ? requiredGroup.register(input, {
|
|
182
|
+
isChecked: isBoxChecked,
|
|
183
|
+
isEnabled: isBoxEnabled
|
|
184
|
+
}) : undefined, [requiredGroup, isBoxChecked, isBoxEnabled]);
|
|
185
|
+
const checkboxInputRef = useMergedRefs(checkboxRef, registerWithRequiredGroup);
|
|
186
|
+
|
|
175
187
|
// A read-only checkbox carries aria-readonly, which the row's clickable
|
|
176
188
|
// container treats as a non-interactive target, so a click on it would be
|
|
177
189
|
// delegated straight back to the checkbox without end. Stop that click at
|
|
@@ -222,7 +234,7 @@ export function CheckboxListItem({
|
|
|
222
234
|
className: className,
|
|
223
235
|
style: style,
|
|
224
236
|
startContent: /*#__PURE__*/_jsx(DescribedCheckboxInput, {
|
|
225
|
-
ref:
|
|
237
|
+
ref: checkboxInputRef,
|
|
226
238
|
label: checkboxLabel,
|
|
227
239
|
"aria-labelledby": namesFromVisibleLabel ? labelID : undefined,
|
|
228
240
|
isLabelHidden: true,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The state of one box that decides which box carries `required`. */
|
|
2
|
+
export interface RequiredGroupBox {
|
|
3
|
+
isChecked: boolean;
|
|
4
|
+
/** False for a disabled or read-only box, which the user cannot check. */
|
|
5
|
+
isEnabled: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface RequiredGroup {
|
|
8
|
+
/**
|
|
9
|
+
* Adds a checkbox with its state and updates `required` on every box.
|
|
10
|
+
* Returns a function that removes the checkbox, clears its `required`, and
|
|
11
|
+
* updates the rest. An item registers again when its state changes.
|
|
12
|
+
*/
|
|
13
|
+
register: (input: HTMLInputElement, box: RequiredGroupBox) => () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Updates `required` when the group's options move, for example after a
|
|
16
|
+
* keyed reorder, which registers no box again. Returns a function that
|
|
17
|
+
* stops it.
|
|
18
|
+
*/
|
|
19
|
+
observe: (container: HTMLElement) => () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function createRequiredGroup(): RequiredGroup;
|
|
22
|
+
//# sourceMappingURL=requiredGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requiredGroup.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/requiredGroup.ts"],"names":[],"mappings":"AAkBA,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAC;IACzE;;;;OAIG;IACH,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,MAAM,IAAI,CAAC;CACjD;AAUD,wBAAgB,mBAAmB,IAAI,aAAa,CA4BnD"}
|