@astryxdesign/core 0.4.4 → 0.4.5-canary.013e728
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/CHANGELOG.md +40 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.js +1 -1
- package/dist/BottomSheet/BottomSheet.d.ts +11 -2
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +4 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +5 -2
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +65 -15
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts.map +1 -1
- package/dist/BottomSheet/snapOffsets.d.ts +57 -20
- package/dist/BottomSheet/snapOffsets.d.ts.map +1 -1
- package/dist/BottomSheet/snapOffsets.js +106 -30
- package/dist/BottomSheet/useSheetGestures.d.ts +13 -8
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +160 -64
- package/dist/Breadcrumbs/BreadcrumbItem.js +6 -6
- package/dist/Button/Button.js +5 -5
- package/dist/Calendar/Calendar.d.ts +17 -0
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +55 -15
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +14 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts.map +1 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.js +26 -0
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +22 -1
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarConstraints.js +26 -4
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +14 -10
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +8 -4
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts +47 -0
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts.map +1 -0
- package/dist/Calendar/standaloneShortWeekdayNames.generated.js +40 -0
- package/dist/Calendar/styles.js +3 -3
- package/dist/Center/Center.d.ts +23 -1
- package/dist/Center/Center.d.ts.map +1 -1
- package/dist/Center/Center.js +12 -6
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +2 -2
- package/dist/Chat/ChatToolCalls.js +1 -1
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.d.ts +1 -1
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +4 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +9 -0
- package/dist/Citation/Citation.js +3 -3
- package/dist/ClickableCard/ClickableCard.js +2 -2
- package/dist/CommandPalette/CommandPaletteItem.js +1 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -3
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +17 -9
- package/dist/DateRangeInput/DateRangeInput.d.ts +23 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +47 -9
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +18 -10
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/Field/FieldLabel.d.ts +2 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +21 -3
- package/dist/Field/InputClearButton.d.ts +2 -1
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +12 -1
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +4 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +2 -2
- package/dist/FormLayout/FormLayout.d.ts +24 -2
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/FormLayout/FormLayout.js +7 -2
- package/dist/FormLayout/FormLayoutContext.d.ts +15 -2
- package/dist/FormLayout/FormLayoutContext.d.ts.map +1 -1
- package/dist/FormLayout/FormLayoutContext.js +19 -4
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.d.ts +13 -3
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +2 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.d.ts +17 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +78 -9
- package/dist/Item/Item.d.ts +9 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +46 -8
- package/dist/Layer/index.d.ts +4 -2
- package/dist/Layer/index.d.ts.map +1 -1
- package/dist/Layer/index.js +2 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +3 -2
- package/dist/Layer/useTouchTrigger.d.ts +113 -0
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -0
- package/dist/Layer/useTouchTrigger.js +241 -0
- package/dist/Layout/container.stylex.d.ts +4 -2
- package/dist/Layout/container.stylex.d.ts.map +1 -1
- package/dist/Layout/container.stylex.js +19 -11
- package/dist/Layout/index.d.ts +1 -0
- package/dist/Layout/index.d.ts.map +1 -1
- package/dist/Layout/index.js +4 -0
- package/dist/Layout/padding.stylex.d.ts +315 -12
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +389 -12
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +2 -1
- package/dist/Link/Link.js +4 -4
- package/dist/Markdown/Markdown.d.ts +8 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +31 -3
- package/dist/Markdown/parser.d.ts +14 -2
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +50 -2
- package/dist/MobileNav/MobileNav.d.ts +1 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +24 -6
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +8 -3
- package/dist/NavItem/navItemStyles.stylex.d.ts +2 -2
- package/dist/NavItem/navItemStyles.stylex.js +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +38 -5
- package/dist/Outline/Outline.js +2 -2
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -0
- package/dist/Outline/parseOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/parseOutlineFromMarkdown.js +5 -31
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +11 -12
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -1
- package/dist/PowerSearch/formatFilterValue.d.ts +11 -2
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +23 -8
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +12 -1
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +68 -38
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +3 -3
- package/dist/Section/Section.d.ts +36 -1
- package/dist/Section/Section.d.ts.map +1 -1
- package/dist/Section/Section.js +12 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +6 -1
- package/dist/SelectableCard/SelectableCard.js +1 -1
- package/dist/Selector/Selector.d.ts +26 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +95 -17
- package/dist/Selector/SelectorOption.d.ts +14 -1
- package/dist/Selector/SelectorOption.d.ts.map +1 -1
- package/dist/Selector/SelectorOption.js +6 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts +8 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -0
- package/dist/Selector/SelectorRowLayoutContext.js +27 -0
- package/dist/Selector/types.d.ts +1 -0
- package/dist/Selector/types.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +1 -1
- package/dist/SideNav/SideNavItem.js +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +3 -3
- package/dist/Stack/Stack.d.ts +23 -1
- package/dist/Stack/Stack.d.ts.map +1 -1
- package/dist/Stack/Stack.js +12 -6
- package/dist/StatusDot/StatusDot.d.ts +43 -3
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +42 -5
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +9 -0
- package/dist/TabList/TabMenu.js +1 -1
- package/dist/Table/TableRow.js +4 -4
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +7 -2
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +5 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +12 -9
- package/dist/Table/plugins/tree/useTableTreeData.js +2 -2
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +6 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +6 -1
- package/dist/Thumbnail/Thumbnail.js +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +6 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +6 -4
- package/dist/Timestamp/formatInstant.d.ts +3 -2
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +8 -8
- package/dist/Timestamp/tooltipEntries.d.ts +2 -1
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.js +5 -3
- package/dist/Token/Token.js +1 -1
- package/dist/Tooltip/Tooltip.d.ts +16 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +2 -0
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +21 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +71 -13
- package/dist/TopNav/TopNavHeading.js +2 -2
- package/dist/TopNav/TopNavItem.js +2 -2
- package/dist/TopNav/TopNavMegaMenu.js +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +1 -1
- package/dist/TopNav/TopNavMenu.js +2 -2
- package/dist/TreeList/TreeListItem.js +1 -1
- package/dist/astryx.css +85 -60
- package/dist/hooks/containerReveal.stylex.d.ts.map +1 -1
- package/dist/hooks/containerReveal.stylex.js +18 -18
- package/dist/hooks/scrollbarGutter.d.ts +28 -0
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -0
- package/dist/hooks/scrollbarGutter.js +103 -0
- package/dist/hooks/useResolvedRequired.d.ts +19 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -0
- package/dist/hooks/useResolvedRequired.js +40 -0
- package/dist/hooks/useScrollLock.d.ts +4 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +13 -1
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +2 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +6 -0
- package/dist/i18n/useCollator.d.ts +12 -0
- package/dist/i18n/useCollator.d.ts.map +1 -0
- package/dist/i18n/useCollator.js +40 -0
- package/dist/i18n/useLocale.d.ts +3 -0
- package/dist/i18n/useLocale.d.ts.map +1 -0
- package/dist/i18n/useLocale.js +31 -0
- package/dist/theme/defineTheme.d.ts +5 -0
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +5 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +7 -0
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +66 -5
- package/dist/utils/dateParser.d.ts +4 -3
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +8 -8
- package/dist/utils/plainDate.d.ts +9 -2
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +16 -4
- package/locales/af-ZA.json +958 -0
- package/locales/ar-SA.json +998 -0
- package/locales/ca-ES.json +974 -0
- package/locales/cs-CZ.json +990 -0
- package/locales/da-DK.json +966 -0
- package/locales/de-DE.json +966 -0
- package/locales/el-GR.json +990 -0
- package/locales/en.json +8 -0
- package/locales/es-ES.json +978 -0
- package/locales/fi-FI.json +990 -0
- package/locales/fr-FR.json +928 -0
- package/locales/he-IL.json +990 -0
- package/locales/hu-HU.json +990 -0
- package/locales/it-IT.json +978 -0
- package/locales/ja-JP.json +998 -0
- package/locales/ko-KR.json +990 -0
- package/locales/nl-NL.json +954 -0
- package/locales/no-NO.json +978 -0
- package/locales/pl-PL.json +982 -0
- package/locales/pseudo.json +6 -0
- package/locales/pt-BR.json +982 -0
- package/locales/pt-PT.json +982 -0
- package/locales/ro-RO.json +982 -0
- package/locales/ru-RU.json +990 -0
- package/locales/sr-SP.json +990 -0
- package/locales/sv-SE.json +986 -0
- package/locales/tr-TR.json +990 -0
- package/locales/uk-UA.json +990 -0
- package/locales/vi-VN.json +986 -0
- package/locales/zh-CN.json +998 -0
- package/locales/zh-TW.json +998 -0
- package/package.json +3 -3
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +1 -1
- package/src/Banner/Banner.doc.mjs +2 -0
- package/src/BottomSheet/BottomSheet.doc.mjs +36 -3
- package/src/BottomSheet/BottomSheet.test.tsx +177 -2
- package/src/BottomSheet/BottomSheet.tsx +16 -2
- package/src/BottomSheet/BottomSheetPanel.test.tsx +41 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +95 -15
- package/src/BottomSheet/index.ts +5 -1
- package/src/BottomSheet/snapOffsets.test.ts +114 -47
- package/src/BottomSheet/snapOffsets.ts +119 -33
- package/src/BottomSheet/useSheetGestures.test.ts +113 -15
- package/src/BottomSheet/useSheetGestures.ts +196 -100
- package/src/Breadcrumbs/BreadcrumbItem.tsx +1 -1
- package/src/Button/Button.tsx +7 -7
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.test.tsx +137 -0
- package/src/Calendar/Calendar.tsx +80 -11
- package/src/Calendar/getStandaloneShortWeekdayNames.test.ts +54 -0
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +38 -0
- package/src/Calendar/hooks/useCalendarConstraints.ts +54 -3
- package/src/Calendar/hooks/useCalendarDays.ts +13 -10
- package/src/Calendar/hooks/useCalendarNavigation.ts +6 -4
- package/src/Calendar/standaloneShortWeekdayNames.generated.ts +50 -0
- package/src/Calendar/styles.ts +3 -3
- package/src/Center/Center.doc.mjs +48 -0
- package/src/Center/Center.test.tsx +158 -0
- package/src/Center/Center.tsx +50 -9
- package/src/Chat/ChatComposer.tsx +7 -4
- package/src/Chat/ChatToolCalls.tsx +1 -1
- package/src/Chat/{useChatDictation.test.ts → useChatDictation.test.tsx} +29 -14
- package/src/Chat/useChatDictation.ts +1 -1
- package/src/Chat/useSpeechRecognition.ts +5 -3
- package/src/CheckboxInput/CheckboxInput.tsx +6 -0
- package/src/Citation/Citation.tsx +3 -3
- package/src/ClickableCard/ClickableCard.tsx +2 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -1
- package/src/ComplexSelector/ComplexSelector.doc.mjs +10 -0
- package/src/ComplexSelector/ComplexSelector.tsx +8 -5
- package/src/DateInput/DateInput.test.tsx +17 -1
- package/src/DateInput/DateInput.tsx +13 -9
- package/src/DateRangeInput/DateRangeInput.doc.mjs +16 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +81 -1
- package/src/DateRangeInput/DateRangeInput.tsx +88 -8
- package/src/DateTimeInput/DateTimeInput.tsx +23 -8
- package/src/Dialog/Dialog.test.tsx +24 -0
- package/src/Dialog/Dialog.tsx +3 -0
- package/src/Field/Field.doc.mjs +3 -0
- package/src/Field/FieldLabel.tsx +20 -4
- package/src/Field/InputClearButton.test.tsx +134 -2
- package/src/Field/InputClearButton.tsx +42 -1
- package/src/Field/inputStyles.stylex.ts +16 -12
- package/src/FileInput/FileInput.tsx +5 -4
- package/src/FormLayout/FormLayout.doc.mjs +13 -0
- package/src/FormLayout/FormLayout.test.tsx +181 -4
- package/src/FormLayout/FormLayout.tsx +33 -2
- package/src/FormLayout/FormLayoutContext.ts +22 -7
- package/src/FormLayout/index.ts +1 -1
- package/src/HoverCard/HoverCard.doc.mjs +18 -0
- package/src/HoverCard/HoverCard.test.tsx +189 -0
- package/src/HoverCard/HoverCard.tsx +22 -2
- package/src/HoverCard/index.ts +1 -0
- package/src/HoverCard/useHoverCard.doc.mjs +2 -0
- package/src/HoverCard/useHoverCard.tsx +103 -7
- package/src/Item/Item.doc.mjs +1 -0
- package/src/Item/Item.test.tsx +50 -0
- package/src/Item/Item.tsx +41 -2
- package/src/Layer/index.ts +10 -0
- package/src/Layer/useLayer.tsx +13 -2
- package/src/Layer/useTouchTrigger.test.ts +70 -0
- package/src/Layer/useTouchTrigger.ts +366 -0
- package/src/Layout/Layout.doc.mjs +18 -0
- package/src/Layout/container.stylex.ts +11 -3
- package/src/Layout/index.ts +4 -0
- package/src/Layout/overlayPaddingReset.test.tsx +222 -0
- package/src/Layout/padding.stylex.ts +192 -12
- package/src/Lightbox/Lightbox.tsx +2 -1
- package/src/Link/Link.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +3 -0
- package/src/Markdown/Markdown.test.tsx +78 -0
- package/src/Markdown/Markdown.tsx +41 -1
- package/src/Markdown/parser.ts +60 -2
- package/src/MobileNav/MobileNav.tsx +61 -5
- package/src/MobileNav/MobileNavEntryAnimation.test.tsx +212 -0
- package/src/MobileNav/MobileNavScrollbarGutter.test.tsx +109 -0
- package/src/MultiSelector/MultiSelector.test.tsx +1 -1
- package/src/MultiSelector/MultiSelector.tsx +8 -5
- package/src/NavItem/navItemStyles.stylex.ts +2 -2
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -1
- package/src/NumberInput/NumberInput.doc.mjs +24 -0
- package/src/NumberInput/NumberInput.test.tsx +138 -0
- package/src/NumberInput/NumberInput.tsx +44 -6
- package/src/Outline/Outline.doc.mjs +2 -0
- package/src/Outline/Outline.tsx +1 -1
- package/src/Outline/parseOutlineFromMarkdown.ts +10 -40
- package/src/PowerSearch/PowerSearch.tsx +17 -8
- package/src/PowerSearch/PowerSearchToken.tsx +3 -0
- package/src/PowerSearch/formatFilterValue.test.ts +22 -2
- package/src/PowerSearch/formatFilterValue.ts +31 -6
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/RadioList/RadioList.test.tsx +170 -2
- package/src/RadioList/RadioList.tsx +9 -1
- package/src/RadioList/RadioListItem.tsx +83 -51
- package/src/Resizable/ResizeHandle.test.tsx +22 -0
- package/src/Resizable/ResizeHandle.tsx +9 -3
- package/src/Section/Section.doc.mjs +55 -0
- package/src/Section/Section.test.tsx +201 -4
- package/src/Section/Section.tsx +69 -0
- package/src/SegmentedControl/SegmentedControl.test.tsx +31 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +11 -2
- package/src/SelectableCard/SelectableCard.tsx +1 -1
- package/src/Selector/Selector.doc.mjs +16 -2
- package/src/Selector/Selector.test.tsx +525 -1
- package/src/Selector/Selector.tsx +166 -21
- package/src/Selector/SelectorOption.doc.mjs +7 -0
- package/src/Selector/SelectorOption.tsx +21 -0
- package/src/Selector/SelectorRowLayoutContext.ts +32 -0
- package/src/Selector/types.ts +4 -4
- package/src/SideNav/SideNavHeading.tsx +2 -2
- package/src/SideNav/SideNavItem.tsx +1 -1
- package/src/Slider/Slider.tsx +11 -1
- package/src/Stack/Stack.doc.mjs +72 -0
- package/src/Stack/Stack.test.tsx +156 -0
- package/src/Stack/Stack.tsx +50 -8
- package/src/StatusDot/StatusDot.doc.mjs +13 -0
- package/src/StatusDot/StatusDot.test.tsx +115 -8
- package/src/StatusDot/StatusDot.tsx +74 -9
- package/src/Switch/Switch.tsx +6 -0
- package/src/TabList/TabMenu.tsx +1 -1
- package/src/Table/TableRow.tsx +4 -4
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +2 -1
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +2 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +22 -4
- package/src/Table/plugins/sortable/useTableSortableState.test.tsx +34 -0
- package/src/Table/plugins/sortable/useTableSortableState.tsx +26 -23
- package/src/Table/plugins/tree/useTableTreeData.tsx +2 -2
- package/src/TextArea/TextArea.doc.mjs +1 -1
- package/src/TextArea/TextArea.tsx +3 -1
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Thumbnail/Thumbnail.tsx +1 -1
- package/src/TimeInput/TimeInput.tsx +3 -1
- package/src/Timestamp/Timestamp.test.tsx +27 -7
- package/src/Timestamp/Timestamp.tsx +8 -4
- package/src/Timestamp/formatInstant.ts +9 -7
- package/src/Timestamp/tooltipEntries.test.ts +11 -6
- package/src/Timestamp/tooltipEntries.ts +6 -2
- package/src/Token/Token.tsx +1 -1
- package/src/Tooltip/Tooltip.doc.mjs +18 -0
- package/src/Tooltip/Tooltip.test.tsx +254 -1
- package/src/Tooltip/Tooltip.tsx +22 -2
- package/src/Tooltip/index.ts +1 -0
- package/src/Tooltip/useTooltip.doc.mjs +2 -0
- package/src/Tooltip/useTooltip.tsx +99 -21
- package/src/TopNav/TopNavHeading.tsx +1 -1
- package/src/TopNav/TopNavItem.tsx +2 -2
- package/src/TopNav/TopNavMegaMenu.tsx +1 -1
- package/src/TopNav/TopNavMegaMenuItem.tsx +1 -1
- package/src/TopNav/TopNavMenu.tsx +2 -2
- package/src/TreeList/TreeListItem.tsx +1 -1
- package/src/hooks/containerReveal.stylex.ts +54 -18
- package/src/hooks/scrollbarGutter.test.ts +167 -0
- package/src/hooks/scrollbarGutter.ts +121 -0
- package/src/hooks/useResolvedRequired.ts +42 -0
- package/src/hooks/useScrollLock.doc.mjs +4 -4
- package/src/hooks/useScrollLock.test.ts +73 -0
- package/src/hooks/useScrollLock.ts +14 -0
- package/src/i18n/InternationalizationContext.ts +2 -0
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +37 -1
- package/src/i18n/__tests__/useCollator.test.tsx +115 -0
- package/src/i18n/__tests__/useLocale.test.tsx +52 -0
- package/src/i18n/index.ts +6 -0
- package/src/i18n/useCollator.doc.mjs +84 -0
- package/src/i18n/useCollator.ts +44 -0
- package/src/i18n/useLocale.doc.mjs +70 -0
- package/src/i18n/useLocale.ts +34 -0
- package/src/i18n/useTranslator.doc.mjs +1 -1
- package/src/theme/defineTheme.test.ts +9 -3
- package/src/theme/defineTheme.ts +5 -0
- package/src/theme/derivedVarRegistry.test.ts +19 -5
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/generateThemeRules.test.ts +118 -0
- package/src/theme/generateThemeRules.ts +83 -5
- package/src/utils/dateParser.test.ts +20 -0
- package/src/utils/dateParser.ts +14 -7
- package/src/utils/plainDate.test.ts +56 -0
- package/src/utils/plainDate.ts +17 -4
package/dist/Button/Button.js
CHANGED
|
@@ -75,7 +75,7 @@ const styles = {
|
|
|
75
75
|
$$css: true
|
|
76
76
|
},
|
|
77
77
|
ariaDisabled: {
|
|
78
|
-
kKwaWg: "x18o3ruo
|
|
78
|
+
kKwaWg: "x18o3ruo xuqm82a",
|
|
79
79
|
$$css: true
|
|
80
80
|
},
|
|
81
81
|
iconOnly: {
|
|
@@ -187,26 +187,26 @@ const variants = {
|
|
|
187
187
|
primary: {
|
|
188
188
|
kWkggS: "x1ewilqj",
|
|
189
189
|
kMwMTN: "x17wrial",
|
|
190
|
-
kKwaWg: "
|
|
190
|
+
kKwaWg: "xmvprkv xq8i9tn",
|
|
191
191
|
$$css: true
|
|
192
192
|
},
|
|
193
193
|
secondary: {
|
|
194
194
|
kWkggS: "x17x4s8c",
|
|
195
195
|
kMwMTN: "x1tgivj0",
|
|
196
|
-
kKwaWg: "
|
|
196
|
+
kKwaWg: "xmvprkv xq8i9tn",
|
|
197
197
|
$$css: true
|
|
198
198
|
},
|
|
199
199
|
ghost: {
|
|
200
200
|
kWkggS: "xjbqb8w",
|
|
201
201
|
kMwMTN: "x1tgivj0",
|
|
202
|
-
kKwaWg: "
|
|
202
|
+
kKwaWg: "xmvprkv xq8i9tn",
|
|
203
203
|
$$css: true
|
|
204
204
|
},
|
|
205
205
|
destructive: {
|
|
206
206
|
kWkggS: "x1pjz0fi",
|
|
207
207
|
kMwMTN: "x1m024r3",
|
|
208
208
|
kjBf7l: "x1e0x2sz",
|
|
209
|
-
kKwaWg: "
|
|
209
|
+
kKwaWg: "xmvprkv xq8i9tn",
|
|
210
210
|
$$css: true
|
|
211
211
|
}
|
|
212
212
|
};
|
|
@@ -22,6 +22,23 @@ interface CalendarBaseProps extends Omit<BaseProps<HTMLDivElement>, 'onChange' |
|
|
|
22
22
|
* Use for complex rules like "weekdays only" or "no holidays".
|
|
23
23
|
*/
|
|
24
24
|
dateConstraints?: ReadonlyArray<(date: Date) => boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Range mode only. Maximum number of days a selected range may span,
|
|
27
|
+
* counting both endpoints — `maxRangeSpan={7}` allows a 7-day window
|
|
28
|
+
* (start + 6 days). Once a start date is picked, days beyond this distance
|
|
29
|
+
* from it are disabled in either direction; before a start is picked every
|
|
30
|
+
* otherwise-valid day stays selectable. Use for rolling windows like "at
|
|
31
|
+
* most a week from the chosen day". For fixed calendar bounds use min/max.
|
|
32
|
+
*/
|
|
33
|
+
maxRangeSpan?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Range mode only. Minimum number of days a selected range must span,
|
|
36
|
+
* counting both endpoints — `minRangeSpan={2}` forbids a single-day range.
|
|
37
|
+
* Once a start date is picked, days closer than this to it are disabled —
|
|
38
|
+
* except the start itself, which stays selectable as the active anchor.
|
|
39
|
+
* Defaults to 1 (a same-day start and end is allowed).
|
|
40
|
+
*/
|
|
41
|
+
minRangeSpan?: number;
|
|
25
42
|
/**
|
|
26
43
|
* Controlled focus date (which month is visible).
|
|
27
44
|
* If not provided, defaults to selected date or today.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA+C5C,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;AAK5B,+CAA+C;AAE/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,EAAE,aAAa,CAAC;IAEpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,aAAa,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC;IAEzD;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAEvD;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CAC1C;AAID,UAAU,mBAAoB,SAAQ,iBAAiB;IACrD,qBAAqB;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,KAAK,IAAI,CAAC;CAC9D;AAED,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IAEd,0BAA0B;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAMrE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAC,GAAG,EAAE,GAAG,KAAK,EAAC,EAAE,aAAa,+BAuXtD;yBAvXe,QAAQ"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* - /apps/storybook/stories/Calendar.stories.tsx (storybook stories)
|
|
17
17
|
* - /packages/cli/assets/templates/blocks/components/Calendar/ (showcase blocks)
|
|
18
18
|
*/
|
|
19
|
-
import { useState, useMemo, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
|
|
19
|
+
import { use, useState, useMemo, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
|
|
20
20
|
import * as stylex from '@stylexjs/stylex';
|
|
21
21
|
import { Button } from "../Button/index.js";
|
|
22
22
|
import { Icon } from "../Icon/index.js";
|
|
@@ -34,7 +34,7 @@ import { computeDayCellState, computeRangeRounding, computePreviewRounding, comp
|
|
|
34
34
|
|
|
35
35
|
import { normalizeDayOfWeek } from "../utils/dateTypes.js";
|
|
36
36
|
import { themeProps } from "../utils/themeProps.js";
|
|
37
|
-
import { useTranslator } from "../i18n/index.js";
|
|
37
|
+
import { useTranslator, InternationalizationContext } from "../i18n/index.js";
|
|
38
38
|
|
|
39
39
|
/** Imperative handle for Calendar handleRef */
|
|
40
40
|
|
|
@@ -59,6 +59,9 @@ export function Calendar({
|
|
|
59
59
|
...props
|
|
60
60
|
}) {
|
|
61
61
|
const t = useTranslator();
|
|
62
|
+
const {
|
|
63
|
+
locale
|
|
64
|
+
} = use(InternationalizationContext);
|
|
62
65
|
const {
|
|
63
66
|
handleRef,
|
|
64
67
|
mode = 'single',
|
|
@@ -69,6 +72,8 @@ export function Calendar({
|
|
|
69
72
|
min,
|
|
70
73
|
max,
|
|
71
74
|
dateConstraints,
|
|
75
|
+
maxRangeSpan,
|
|
76
|
+
minRangeSpan,
|
|
72
77
|
focusDate: focusDateProp,
|
|
73
78
|
onFocusDateChange,
|
|
74
79
|
hasOutsideDays = true,
|
|
@@ -156,10 +161,10 @@ export function Calendar({
|
|
|
156
161
|
// Format month header
|
|
157
162
|
const monthYearLabel = useMemo(() => {
|
|
158
163
|
if (numberOfMonths === 1) {
|
|
159
|
-
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR);
|
|
164
|
+
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR, locale);
|
|
160
165
|
}
|
|
161
|
-
return visibleMonths.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR)).join(' – ');
|
|
162
|
-
}, [visibleMonths, numberOfMonths]);
|
|
166
|
+
return visibleMonths.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR, locale)).join(' – ');
|
|
167
|
+
}, [visibleMonths, numberOfMonths, locale]);
|
|
163
168
|
|
|
164
169
|
// Announce the newly visible month to screen readers whenever it changes.
|
|
165
170
|
// The visible month label (`<span>`) carries no live semantics, so paging the
|
|
@@ -242,11 +247,25 @@ export function Calendar({
|
|
|
242
247
|
// progress through the same polite live region.
|
|
243
248
|
setRangeSelectionStart(iso);
|
|
244
249
|
announce(t('@astryx.calendar.rangeStartAnnounce', {
|
|
245
|
-
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY)
|
|
250
|
+
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY, locale)
|
|
246
251
|
}));
|
|
247
252
|
} else {
|
|
248
253
|
// Second click - complete the range
|
|
249
254
|
const startPd = plainDateFromISO(rangeSelectionStart);
|
|
255
|
+
|
|
256
|
+
// Clicking the anchor again clears the in-progress start rather than
|
|
257
|
+
// committing a zero-length range. This is also the escape hatch when
|
|
258
|
+
// `minRangeSpan` disables the days around the anchor: without it the
|
|
259
|
+
// anchor would be the only clickable day left and the start could
|
|
260
|
+
// never be moved. `minRangeSpan` leaves the anchor itself enabled
|
|
261
|
+
// precisely so this toggle stays reachable.
|
|
262
|
+
if (plainDateIsEqual(date, startPd)) {
|
|
263
|
+
setRangeSelectionStart(null);
|
|
264
|
+
announce(t('@astryx.calendar.rangeClearedAnnounce', {
|
|
265
|
+
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY)
|
|
266
|
+
}));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
250
269
|
let start;
|
|
251
270
|
let end;
|
|
252
271
|
|
|
@@ -268,12 +287,12 @@ export function Calendar({
|
|
|
268
287
|
// Completed-range announcement, in chronological order (matches the
|
|
269
288
|
// swapped {start, end} above even for a reverse pick).
|
|
270
289
|
announce(t('@astryx.calendar.rangeCompleteAnnounce', {
|
|
271
|
-
start: plainDateFormat(plainDateFromISO(start), DATE_FORMAT_WITH_WEEKDAY),
|
|
272
|
-
end: plainDateFormat(plainDateFromISO(end), DATE_FORMAT_WITH_WEEKDAY)
|
|
290
|
+
start: plainDateFormat(plainDateFromISO(start), DATE_FORMAT_WITH_WEEKDAY, locale),
|
|
291
|
+
end: plainDateFormat(plainDateFromISO(end), DATE_FORMAT_WITH_WEEKDAY, locale)
|
|
273
292
|
}));
|
|
274
293
|
}
|
|
275
294
|
}
|
|
276
|
-
}, [mode, onChange, rangeSelectionStart, announce, t]);
|
|
295
|
+
}, [mode, onChange, rangeSelectionStart, announce, t, locale]);
|
|
277
296
|
return /*#__PURE__*/_jsxs("div", {
|
|
278
297
|
ref: ref,
|
|
279
298
|
...rest,
|
|
@@ -339,6 +358,8 @@ export function Calendar({
|
|
|
339
358
|
min: min,
|
|
340
359
|
max: max,
|
|
341
360
|
dateConstraints: dateConstraints,
|
|
361
|
+
maxRangeSpan: maxRangeSpan,
|
|
362
|
+
minRangeSpan: minRangeSpan,
|
|
342
363
|
hasOutsideDays: hasOutsideDays,
|
|
343
364
|
hasWeekNumbers: hasWeekNumbers,
|
|
344
365
|
hasVariableRowCount: hasVariableRowCount,
|
|
@@ -369,6 +390,8 @@ function MonthGrid({
|
|
|
369
390
|
min,
|
|
370
391
|
max,
|
|
371
392
|
dateConstraints,
|
|
393
|
+
maxRangeSpan,
|
|
394
|
+
minRangeSpan,
|
|
372
395
|
hasOutsideDays,
|
|
373
396
|
hasWeekNumbers,
|
|
374
397
|
hasVariableRowCount,
|
|
@@ -381,6 +404,9 @@ function MonthGrid({
|
|
|
381
404
|
pendingFocus,
|
|
382
405
|
onPendingFocusHandled
|
|
383
406
|
}) {
|
|
407
|
+
const {
|
|
408
|
+
locale
|
|
409
|
+
} = use(InternationalizationContext);
|
|
384
410
|
const year = month.year;
|
|
385
411
|
|
|
386
412
|
// Use hooks for days generation and constraints
|
|
@@ -394,12 +420,20 @@ function MonthGrid({
|
|
|
394
420
|
weekStartsOn,
|
|
395
421
|
hasVariableRowCount
|
|
396
422
|
});
|
|
423
|
+
const dayNameHeaders = useMemo(() => dayNames.map((name, offset) => ({
|
|
424
|
+
dayOfWeek: (weekStartsOn + offset) % 7,
|
|
425
|
+
name
|
|
426
|
+
})), [dayNames, weekStartsOn]);
|
|
427
|
+
const rangeAnchor = useMemo(() => mode === 'range' && rangeSelectionStart ? plainDateFromISO(rangeSelectionStart) : null, [mode, rangeSelectionStart]);
|
|
397
428
|
const {
|
|
398
429
|
isDateDisabled
|
|
399
430
|
} = useCalendarConstraints({
|
|
400
431
|
min,
|
|
401
432
|
max,
|
|
402
|
-
dateConstraints
|
|
433
|
+
dateConstraints,
|
|
434
|
+
maxRangeSpan,
|
|
435
|
+
minRangeSpan,
|
|
436
|
+
rangeAnchor
|
|
403
437
|
});
|
|
404
438
|
|
|
405
439
|
// Parse selected date for roving tabindex priority
|
|
@@ -565,8 +599,8 @@ function MonthGrid({
|
|
|
565
599
|
|
|
566
600
|
// Month label for announcements
|
|
567
601
|
const monthLabel = useMemo(() => {
|
|
568
|
-
return plainDateFormat(month, DATE_FORMAT_MONTH_YEAR);
|
|
569
|
-
}, [month]);
|
|
602
|
+
return plainDateFormat(month, DATE_FORMAT_MONTH_YEAR, locale);
|
|
603
|
+
}, [month, locale]);
|
|
570
604
|
return /*#__PURE__*/_jsx("div", {
|
|
571
605
|
...stylex.props(monthGridStyles.monthGrid),
|
|
572
606
|
children: /*#__PURE__*/_jsxs("div", {
|
|
@@ -585,11 +619,14 @@ function MonthGrid({
|
|
|
585
619
|
...stylex.props(monthGridStyles.weekRow),
|
|
586
620
|
children: [hasWeekNumbers && /*#__PURE__*/_jsx("div", {
|
|
587
621
|
...stylex.props(monthGridStyles.dayName, monthGridStyles.weekNumberHeader)
|
|
588
|
-
}),
|
|
622
|
+
}), dayNameHeaders.map(({
|
|
623
|
+
dayOfWeek,
|
|
624
|
+
name
|
|
625
|
+
}) => /*#__PURE__*/_jsx("div", {
|
|
589
626
|
role: "columnheader",
|
|
590
627
|
...stylex.props(monthGridStyles.dayName),
|
|
591
628
|
children: name
|
|
592
|
-
},
|
|
629
|
+
}, dayOfWeek))]
|
|
593
630
|
}), weeks.map(week => {
|
|
594
631
|
const weekDate = week.find(d => !d.isOutside)?.date || week[0].date;
|
|
595
632
|
const weekNum = plainDateGetWeekNumber(weekDate);
|
|
@@ -663,6 +700,9 @@ function DayCell({
|
|
|
663
700
|
onDayHover
|
|
664
701
|
}) {
|
|
665
702
|
const t = useTranslator();
|
|
703
|
+
const {
|
|
704
|
+
locale
|
|
705
|
+
} = use(InternationalizationContext);
|
|
666
706
|
const {
|
|
667
707
|
date,
|
|
668
708
|
isOutside,
|
|
@@ -707,7 +747,7 @@ function DayCell({
|
|
|
707
747
|
// params rather than string concatenation. A mid-flight first pick (where
|
|
708
748
|
// rangeStart === rangeEnd) reads as "range start" only; a completed one-day
|
|
709
749
|
// range reads as both start and end.
|
|
710
|
-
const dateLabel = plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY);
|
|
750
|
+
const dateLabel = plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY, locale);
|
|
711
751
|
const dayLabel = state.isSelected ? t('@astryx.calendar.daySelected', {
|
|
712
752
|
date: dateLabel
|
|
713
753
|
}) : state.isRangeStart && state.isRangeEnd ? isRangeSelectionInProgress ? t('@astryx.calendar.dayRangeStart', {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file getStandaloneShortWeekdayNames.ts
|
|
3
|
+
* @input Generated CLDR stand-alone-short weekday table
|
|
4
|
+
* @output Private locale resolver for Calendar weekday headers
|
|
5
|
+
* @position Calendar-internal pure utility; not exported from the package
|
|
6
|
+
*/
|
|
7
|
+
import { type StandaloneShortWeekdayNames } from './standaloneShortWeekdayNames.generated';
|
|
8
|
+
/**
|
|
9
|
+
* Resolve generated weekday reference data as exact locale -> language -> English.
|
|
10
|
+
* Unicode extensions are ignored through Intl.Locale.baseName. Invalid tags and
|
|
11
|
+
* valid but unsupported languages safely use English.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getStandaloneShortWeekdayNames(locale: string): StandaloneShortWeekdayNames;
|
|
14
|
+
//# sourceMappingURL=getStandaloneShortWeekdayNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getStandaloneShortWeekdayNames.d.ts","sourceRoot":"","sources":["../../src/Calendar/getStandaloneShortWeekdayNames.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,yCAAyC,CAAC;AAOjD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,GACb,2BAA2B,CAW7B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file getStandaloneShortWeekdayNames.ts
|
|
5
|
+
* @input Generated CLDR stand-alone-short weekday table
|
|
6
|
+
* @output Private locale resolver for Calendar weekday headers
|
|
7
|
+
* @position Calendar-internal pure utility; not exported from the package
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { standaloneShortWeekdayNamesByLocale } from "./standaloneShortWeekdayNames.generated.js";
|
|
11
|
+
const weekdayNamesByLocale = standaloneShortWeekdayNamesByLocale;
|
|
12
|
+
const englishWeekdayNames = weekdayNamesByLocale.en;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Resolve generated weekday reference data as exact locale -> language -> English.
|
|
16
|
+
* Unicode extensions are ignored through Intl.Locale.baseName. Invalid tags and
|
|
17
|
+
* valid but unsupported languages safely use English.
|
|
18
|
+
*/
|
|
19
|
+
export function getStandaloneShortWeekdayNames(locale) {
|
|
20
|
+
try {
|
|
21
|
+
const parsed = new Intl.Locale(locale);
|
|
22
|
+
return weekdayNamesByLocale[parsed.baseName] ?? weekdayNamesByLocale[parsed.language] ?? englishWeekdayNames;
|
|
23
|
+
} catch {
|
|
24
|
+
return englishWeekdayNames;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -13,6 +13,25 @@ export interface UseCalendarConstraintsOptions {
|
|
|
13
13
|
* Date is disabled if ANY function returns false.
|
|
14
14
|
*/
|
|
15
15
|
dateConstraints?: ReadonlyArray<(date: Date) => boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum number of days a range may span, counting both endpoints
|
|
18
|
+
* (a value of 7 allows a 7-day window). In range mode, once a start is
|
|
19
|
+
* picked, dates further than this from it are disabled. No effect until a
|
|
20
|
+
* range anchor exists.
|
|
21
|
+
*/
|
|
22
|
+
maxRangeSpan?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Minimum number of days a range must span, counting both endpoints
|
|
25
|
+
* (a value of 2 forbids a single-day range). In range mode, once a start
|
|
26
|
+
* is picked, dates closer than this to it are disabled.
|
|
27
|
+
*/
|
|
28
|
+
minRangeSpan?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The in-progress range start (first click, awaiting the second). Span
|
|
31
|
+
* constraints are measured from this date. Null when no selection is
|
|
32
|
+
* underway.
|
|
33
|
+
*/
|
|
34
|
+
rangeAnchor?: PlainDate | null;
|
|
16
35
|
}
|
|
17
36
|
/**
|
|
18
37
|
* Return type for useCalendarConstraints hook
|
|
@@ -29,13 +48,15 @@ export interface UseCalendarConstraintsReturn {
|
|
|
29
48
|
* Hook for managing calendar date validation constraints.
|
|
30
49
|
*
|
|
31
50
|
* Provides a function to check if a date is disabled based on
|
|
32
|
-
* min/max bounds and custom constraint functions.
|
|
51
|
+
* min/max bounds, range-span bounds, and custom constraint functions.
|
|
33
52
|
*
|
|
34
53
|
* @example
|
|
35
54
|
* ```
|
|
36
55
|
* const {isDateDisabled} = useCalendarConstraints({
|
|
37
56
|
* min: '2026-01-01',
|
|
38
57
|
* max: '2026-12-31',
|
|
58
|
+
* maxRangeSpan: 7, // once a start is picked, cap the window at 7 days
|
|
59
|
+
* rangeAnchor, // the in-progress start (null before the first click)
|
|
39
60
|
* dateConstraints: [
|
|
40
61
|
* (date) => date.getDay() !== 0, // No Sundays (receives native Date)
|
|
41
62
|
* ],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCalendarConstraints.d.ts","sourceRoot":"","sources":["../../../src/Calendar/hooks/useCalendarConstraints.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"useCalendarConstraints.d.ts","sourceRoot":"","sources":["../../../src/Calendar/hooks/useCalendarConstraints.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,4CAA4C;IAC5C,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC;IACzD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,uCAAuC;IACvC,cAAc,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC;IAC7C,gCAAgC;IAChC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,gCAAgC;IAChC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,6BAA6B,GACrC,4BAA4B,CAoE9B"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - /packages/core/src/Calendar/hooks/index.ts
|
|
13
13
|
*/
|
|
14
14
|
import { useCallback, useMemo } from 'react';
|
|
15
|
-
import { plainDateFromISO, plainDateToDate, plainDateIsBefore, plainDateIsAfter } from "../../utils/plainDate.js";
|
|
15
|
+
import { plainDateFromISO, plainDateToDate, plainDateIsBefore, plainDateIsAfter, plainDateDiffDays } from "../../utils/plainDate.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Configuration for date constraints
|
|
@@ -26,13 +26,15 @@ import { plainDateFromISO, plainDateToDate, plainDateIsBefore, plainDateIsAfter
|
|
|
26
26
|
* Hook for managing calendar date validation constraints.
|
|
27
27
|
*
|
|
28
28
|
* Provides a function to check if a date is disabled based on
|
|
29
|
-
* min/max bounds and custom constraint functions.
|
|
29
|
+
* min/max bounds, range-span bounds, and custom constraint functions.
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
32
|
* ```
|
|
33
33
|
* const {isDateDisabled} = useCalendarConstraints({
|
|
34
34
|
* min: '2026-01-01',
|
|
35
35
|
* max: '2026-12-31',
|
|
36
|
+
* maxRangeSpan: 7, // once a start is picked, cap the window at 7 days
|
|
37
|
+
* rangeAnchor, // the in-progress start (null before the first click)
|
|
36
38
|
* dateConstraints: [
|
|
37
39
|
* (date) => date.getDay() !== 0, // No Sundays (receives native Date)
|
|
38
40
|
* ],
|
|
@@ -48,7 +50,10 @@ export function useCalendarConstraints(options) {
|
|
|
48
50
|
const {
|
|
49
51
|
min,
|
|
50
52
|
max,
|
|
51
|
-
dateConstraints
|
|
53
|
+
dateConstraints,
|
|
54
|
+
maxRangeSpan,
|
|
55
|
+
minRangeSpan,
|
|
56
|
+
rangeAnchor
|
|
52
57
|
} = options;
|
|
53
58
|
|
|
54
59
|
// Parse min/max dates
|
|
@@ -67,6 +72,23 @@ export function useCalendarConstraints(options) {
|
|
|
67
72
|
return true;
|
|
68
73
|
}
|
|
69
74
|
|
|
75
|
+
// Range-span bounds, measured from the in-progress start. Spans count
|
|
76
|
+
// both endpoints (a span of 7 spans a 7-day window), so the reachable
|
|
77
|
+
// distance from the anchor is `span - 1` days in either direction. Only
|
|
78
|
+
// active once a start is picked — before that, every day stays pickable.
|
|
79
|
+
if (rangeAnchor) {
|
|
80
|
+
const distance = Math.abs(plainDateDiffDays(rangeAnchor, date));
|
|
81
|
+
if (maxRangeSpan != null && distance > maxRangeSpan - 1) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
// The anchor itself (distance 0) is never disabled by minRangeSpan —
|
|
85
|
+
// it is the picked start, and disabling it would render the active
|
|
86
|
+
// selection start as aria-disabled to keyboard and screen-reader users.
|
|
87
|
+
if (minRangeSpan != null && distance > 0 && distance < minRangeSpan - 1) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
70
92
|
// Check custom constraints (convert to Date for public API compatibility)
|
|
71
93
|
if (dateConstraints) {
|
|
72
94
|
for (const constraint of dateConstraints) {
|
|
@@ -76,7 +98,7 @@ export function useCalendarConstraints(options) {
|
|
|
76
98
|
}
|
|
77
99
|
}
|
|
78
100
|
return false;
|
|
79
|
-
}, [minDate, maxDate, dateConstraints]);
|
|
101
|
+
}, [minDate, maxDate, dateConstraints, maxRangeSpan, minRangeSpan, rangeAnchor]);
|
|
80
102
|
return {
|
|
81
103
|
isDateDisabled,
|
|
82
104
|
minDate,
|
|
@@ -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;
|
|
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,CAgFvB"}
|
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useCalendarDays.ts
|
|
7
|
-
* @input Uses React useMemo, PlainDate utilities
|
|
7
|
+
* @input Uses React context via use(), useMemo, PlainDate utilities, generated CLDR weekday data
|
|
8
8
|
* @output Exports useCalendarDays hook for generating calendar day grids
|
|
9
9
|
* @position Calendar-specific hook; used by Calendar
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update:
|
|
12
12
|
* - /packages/core/src/Calendar/hooks/index.ts
|
|
13
13
|
*/
|
|
14
|
-
import { useMemo } from 'react';
|
|
14
|
+
import { use, useMemo } from 'react';
|
|
15
15
|
import { plainDateToISO, getDaysInMonth, plainDateDayOfWeek, plainDateAddDays } from "../../utils/plainDate.js";
|
|
16
|
+
import { InternationalizationContext } from "../../i18n/InternationalizationContext.js";
|
|
17
|
+
import { getStandaloneShortWeekdayNames } from "../getStandaloneShortWeekdayNames.js";
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Represents a single day in the calendar grid.
|
|
@@ -49,6 +51,9 @@ export function useCalendarDays(options) {
|
|
|
49
51
|
weekStartsOn = 0,
|
|
50
52
|
hasVariableRowCount = false
|
|
51
53
|
} = options;
|
|
54
|
+
const {
|
|
55
|
+
locale
|
|
56
|
+
} = use(InternationalizationContext);
|
|
52
57
|
|
|
53
58
|
// Calculate grid structure
|
|
54
59
|
const gridInfo = useMemo(() => {
|
|
@@ -75,15 +80,14 @@ export function useCalendarDays(options) {
|
|
|
75
80
|
};
|
|
76
81
|
}, [year, month, weekStartsOn, hasVariableRowCount]);
|
|
77
82
|
|
|
78
|
-
//
|
|
83
|
+
// Generated strings avoid Date anchors, so weekday headers cannot shift with
|
|
84
|
+
// the runtime timezone. Keep numeric indices as the rotation source of truth.
|
|
79
85
|
const dayNames = useMemo(() => {
|
|
80
|
-
const names =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return rotated;
|
|
86
|
-
}, [weekStartsOn]);
|
|
86
|
+
const names = getStandaloneShortWeekdayNames(locale);
|
|
87
|
+
return Array.from({
|
|
88
|
+
length: 7
|
|
89
|
+
}, (_, index) => names[(index + weekStartsOn) % 7]);
|
|
90
|
+
}, [locale, weekStartsOn]);
|
|
87
91
|
|
|
88
92
|
// Generate days array
|
|
89
93
|
const days = useMemo(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCalendarNavigation.d.ts","sourceRoot":"","sources":["../../../src/Calendar/hooks/useCalendarNavigation.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,KAAK,SAAS,EASf,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useCalendarNavigation.d.ts","sourceRoot":"","sources":["../../../src/Calendar/hooks/useCalendarNavigation.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,KAAK,SAAS,EASf,MAAM,uBAAuB,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,gDAAgD;IAChD,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,qDAAqD;IACrD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,0CAA0C;IAC1C,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IACvD,kCAAkC;IAClC,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mEAAmE;IACnE,SAAS,EAAE,SAAS,CAAC;IACrB,sDAAsD;IACtD,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,2CAA2C;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,aAAa,EAAE,CACb,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,aAAa,EAC3B,MAAM,CAAC,EAAE,MAAM,KACZ,IAAI,CAAC;IACV,4CAA4C;IAC5C,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,8BAA8B;IAC9B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,2BAA2B,CAyF7B"}
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* SYNC: When modified, update:
|
|
12
12
|
* - /packages/core/src/Calendar/hooks/index.ts
|
|
13
13
|
*/
|
|
14
|
-
import { useState, useMemo, useCallback } from 'react';
|
|
14
|
+
import { use, useState, useMemo, useCallback } from 'react';
|
|
15
15
|
import { plainDateFromISO, plainDateToISO, plainDateToday, plainDateSetFirstOfMonth, plainDateAddMonths, plainDateAddDays, plainDateFormat, DATE_FORMAT_MONTH_YEAR } from "../../utils/plainDate.js";
|
|
16
|
+
import { InternationalizationContext } from "../../i18n/index.js";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Configuration for calendar navigation
|
|
@@ -56,6 +57,9 @@ export function useCalendarNavigation(options) {
|
|
|
56
57
|
onFocusDateChange,
|
|
57
58
|
numberOfMonths = 1
|
|
58
59
|
} = options;
|
|
60
|
+
const {
|
|
61
|
+
locale
|
|
62
|
+
} = use(InternationalizationContext);
|
|
59
63
|
|
|
60
64
|
// Pending focus target after month navigation
|
|
61
65
|
const [pendingFocus, setPendingFocus] = useState(null);
|
|
@@ -92,10 +96,10 @@ export function useCalendarNavigation(options) {
|
|
|
92
96
|
// Format month header
|
|
93
97
|
const monthYearLabel = useMemo(() => {
|
|
94
98
|
if (numberOfMonths === 1) {
|
|
95
|
-
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR);
|
|
99
|
+
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR, locale);
|
|
96
100
|
}
|
|
97
|
-
return visibleMonths.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR)).join(' – ');
|
|
98
|
-
}, [visibleMonths, numberOfMonths]);
|
|
101
|
+
return visibleMonths.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR, locale)).join(' – ');
|
|
102
|
+
}, [visibleMonths, numberOfMonths, locale]);
|
|
99
103
|
|
|
100
104
|
// Navigate to previous/next month
|
|
101
105
|
const navigateMonth = useCallback((delta, focusedDate, offset) => {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated by scripts/generate-cldr-weekdays.mjs from Unicode CLDR 48.2.0.
|
|
3
|
+
* Do not edit by hand. Run `pnpm generate:cldr-weekdays` instead.
|
|
4
|
+
*/
|
|
5
|
+
export type StandaloneShortWeekdayNames = readonly [
|
|
6
|
+
string,
|
|
7
|
+
string,
|
|
8
|
+
string,
|
|
9
|
+
string,
|
|
10
|
+
string,
|
|
11
|
+
string,
|
|
12
|
+
string
|
|
13
|
+
];
|
|
14
|
+
export declare const standaloneShortWeekdayNamesByLocale: {
|
|
15
|
+
readonly af: readonly ["So.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Sa."];
|
|
16
|
+
readonly ar: readonly ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"];
|
|
17
|
+
readonly 'ar-SA': readonly ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"];
|
|
18
|
+
readonly ca: readonly ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."];
|
|
19
|
+
readonly cs: readonly ["ne", "po", "út", "st", "čt", "pá", "so"];
|
|
20
|
+
readonly da: readonly ["sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø."];
|
|
21
|
+
readonly de: readonly ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."];
|
|
22
|
+
readonly el: readonly ["Κυ", "Δε", "Τρ", "Τε", "Πέ", "Πα", "Σά"];
|
|
23
|
+
readonly en: readonly ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
24
|
+
readonly es: readonly ["DO", "LU", "MA", "MI", "JU", "VI", "SA"];
|
|
25
|
+
readonly fi: readonly ["su", "ma", "ti", "ke", "to", "pe", "la"];
|
|
26
|
+
readonly fr: readonly ["di", "lu", "ma", "me", "je", "ve", "sa"];
|
|
27
|
+
readonly he: readonly ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"];
|
|
28
|
+
readonly hu: readonly ["V", "H", "K", "Sze", "Cs", "P", "Szo"];
|
|
29
|
+
readonly it: readonly ["dom", "lun", "mar", "mer", "gio", "ven", "sab"];
|
|
30
|
+
readonly ja: readonly ["日", "月", "火", "水", "木", "金", "土"];
|
|
31
|
+
readonly ko: readonly ["일", "월", "화", "수", "목", "금", "토"];
|
|
32
|
+
readonly nl: readonly ["zo", "ma", "di", "wo", "do", "vr", "za"];
|
|
33
|
+
readonly no: readonly ["sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø."];
|
|
34
|
+
readonly pl: readonly ["nie", "pon", "wto", "śro", "czw", "pią", "sob"];
|
|
35
|
+
readonly pt: readonly ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."];
|
|
36
|
+
readonly 'pt-PT': readonly ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."];
|
|
37
|
+
readonly ro: readonly ["du.", "lu.", "ma.", "mi.", "joi", "vi.", "sâ."];
|
|
38
|
+
readonly ru: readonly ["вс", "пн", "вт", "ср", "чт", "пт", "сб"];
|
|
39
|
+
readonly sr: readonly ["не", "по", "ут", "ср", "че", "пе", "су"];
|
|
40
|
+
readonly sv: readonly ["sö", "må", "ti", "on", "to", "fr", "lö"];
|
|
41
|
+
readonly tr: readonly ["Pa", "Pt", "Sa", "Ça", "Pe", "Cu", "Ct"];
|
|
42
|
+
readonly uk: readonly ["нд", "пн", "вт", "ср", "чт", "пт", "сб"];
|
|
43
|
+
readonly vi: readonly ["CN", "T2", "T3", "T4", "T5", "T6", "T7"];
|
|
44
|
+
readonly zh: readonly ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
|
45
|
+
readonly 'zh-TW': readonly ["日", "一", "二", "三", "四", "五", "六"];
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=standaloneShortWeekdayNames.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standaloneShortWeekdayNames.generated.d.ts","sourceRoot":"","sources":["../../src/Calendar/standaloneShortWeekdayNames.generated.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,MAAM,2BAA2B,GAAG,SAAS;IACjD,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC0B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @generated by scripts/generate-cldr-weekdays.mjs from Unicode CLDR 48.2.0.
|
|
5
|
+
* Do not edit by hand. Run `pnpm generate:cldr-weekdays` instead.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const standaloneShortWeekdayNamesByLocale = {
|
|
9
|
+
af: ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'],
|
|
10
|
+
ar: ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
|
11
|
+
'ar-SA': ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
|
12
|
+
ca: ['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'],
|
|
13
|
+
cs: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
|
14
|
+
da: ['sø.', 'ma.', 'ti.', 'on.', 'to.', 'fr.', 'lø.'],
|
|
15
|
+
de: ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'],
|
|
16
|
+
el: ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πέ', 'Πα', 'Σά'],
|
|
17
|
+
en: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
18
|
+
es: ['DO', 'LU', 'MA', 'MI', 'JU', 'VI', 'SA'],
|
|
19
|
+
fi: ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'],
|
|
20
|
+
fr: ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'],
|
|
21
|
+
he: ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'],
|
|
22
|
+
hu: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
|
|
23
|
+
it: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'],
|
|
24
|
+
ja: ['日', '月', '火', '水', '木', '金', '土'],
|
|
25
|
+
ko: ['일', '월', '화', '수', '목', '금', '토'],
|
|
26
|
+
nl: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
|
27
|
+
no: ['sø.', 'ma.', 'ti.', 'on.', 'to.', 'fr.', 'lø.'],
|
|
28
|
+
pl: ['nie', 'pon', 'wto', 'śro', 'czw', 'pią', 'sob'],
|
|
29
|
+
pt: ['dom.', 'seg.', 'ter.', 'qua.', 'qui.', 'sex.', 'sáb.'],
|
|
30
|
+
'pt-PT': ['dom.', 'seg.', 'ter.', 'qua.', 'qui.', 'sex.', 'sáb.'],
|
|
31
|
+
ro: ['du.', 'lu.', 'ma.', 'mi.', 'joi', 'vi.', 'sâ.'],
|
|
32
|
+
ru: ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
|
33
|
+
sr: ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'],
|
|
34
|
+
sv: ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'],
|
|
35
|
+
tr: ['Pa', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'],
|
|
36
|
+
uk: ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
|
37
|
+
vi: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
|
38
|
+
zh: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
39
|
+
'zh-TW': ['日', '一', '二', '三', '四', '五', '六']
|
|
40
|
+
};
|