@ecoma-io/loom 0.4.0 → 0.5.0
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/README.md +11 -9
- package/dist/a11y.js +2 -2
- package/dist/index.js +36 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/CalendarDate.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/conversion.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/manipulation.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/queries.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/queries.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/string.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/string.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/utils.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/utils.js.map +1 -1
- package/dist/packages/blocks/empty-state/src/EmptyState.js.map +1 -1
- package/dist/packages/blocks/empty-state/src/EmptyState.vue.d.ts.map +1 -1
- package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js +5 -6
- package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/blocks/error-summary/src/ErrorSummary.js +7 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.js.map +1 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.vue.d.ts +31 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js +90 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/blocks/error-summary/src/index.d.ts +4 -0
- package/dist/packages/blocks/error-summary/src/index.js +3 -0
- package/dist/packages/composition/scroll-reel/src/ScrollReel.js.map +1 -1
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/composition/sidebar/src/Sidebar.js.map +1 -1
- package/dist/packages/composition/sidebar/src/Sidebar.vue.d.ts +4 -0
- package/dist/packages/composition/sidebar/src/Sidebar.vue.d.ts.map +1 -1
- package/dist/packages/composition/sidebar/src/Sidebar.vue_vue_type_script_setup_true_lang.js +13 -4
- package/dist/packages/composition/sidebar/src/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/composition/split/src/Split.js.map +1 -1
- package/dist/packages/composition/split/src/Split.vue.d.ts +11 -12
- package/dist/packages/composition/split/src/Split.vue.d.ts.map +1 -1
- package/dist/packages/composition/split/src/Split.vue_vue_type_script_setup_true_lang.js +15 -5
- package/dist/packages/composition/split/src/Split.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/core/src/a11y-scope.d.ts +71 -5
- package/dist/packages/core/src/a11y-scope.d.ts.map +1 -1
- package/dist/packages/core/src/a11y-scope.js +126 -6
- package/dist/packages/core/src/a11y-scope.js.map +1 -1
- package/dist/packages/core/src/index.d.ts +1 -1
- package/dist/packages/core/src/index.d.ts.map +1 -1
- package/dist/packages/core/src/index.js +2 -2
- package/dist/packages/labels/src/component-shapes.d.ts +163 -1
- package/dist/packages/labels/src/component-shapes.d.ts.map +1 -1
- package/dist/packages/labels/src/date-labels.d.ts +82 -5
- package/dist/packages/labels/src/date-labels.d.ts.map +1 -1
- package/dist/packages/labels/src/date-labels.js +54 -7
- package/dist/packages/labels/src/date-labels.js.map +1 -1
- package/dist/packages/labels/src/field-context.d.ts +2 -2
- package/dist/packages/labels/src/field-context.js.map +1 -1
- package/dist/packages/labels/src/index.d.ts +3 -3
- package/dist/packages/labels/src/index.d.ts.map +1 -1
- package/dist/packages/labels/src/index.js +2 -2
- package/dist/packages/labels/src/label-registry.d.ts +9 -1
- package/dist/packages/labels/src/label-registry.d.ts.map +1 -1
- package/dist/packages/layouts/dashboard/src/Dashboard.js.map +1 -1
- package/dist/packages/layouts/dashboard/src/Dashboard.vue.d.ts +4 -4
- package/dist/packages/layouts/dashboard/src/Dashboard.vue.d.ts.map +1 -1
- package/dist/packages/layouts/dashboard/src/Dashboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/settings/src/Settings.js.map +1 -1
- package/dist/packages/layouts/settings/src/Settings.vue.d.ts +3 -3
- package/dist/packages/layouts/settings/src/Settings.vue.d.ts.map +1 -1
- package/dist/packages/layouts/settings/src/Settings.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/split-layout/src/SplitLayout.js.map +1 -1
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue.d.ts +4 -6
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue.d.ts.map +1 -1
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue_vue_type_script_setup_true_lang.js +20 -5
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/split-layout/src/index.d.ts +1 -1
- package/dist/packages/layouts/split-layout/src/index.d.ts.map +1 -1
- package/dist/packages/loom/src/a11y.d.ts +1 -1
- package/dist/packages/loom/src/index.d.ts +27 -1
- package/dist/packages/primitives/alert/src/Alert.js.map +1 -1
- package/dist/packages/primitives/alert/src/Alert.vue.d.ts +18 -0
- package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.js.map +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.vue.d.ts +2 -2
- package/dist/packages/primitives/avatar/src/Avatar.vue.d.ts.map +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/calendar/src/Calendar.js +7 -0
- package/dist/packages/primitives/calendar/src/Calendar.js.map +1 -0
- package/dist/packages/primitives/calendar/src/Calendar.vue.d.ts +95 -0
- package/dist/packages/primitives/calendar/src/Calendar.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/packages/primitives/calendar/src/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/calendar/src/index.d.ts +3 -0
- package/dist/packages/primitives/calendar/src/index.js +3 -0
- package/dist/packages/primitives/combobox/src/Combobox.vue.d.ts +1 -1
- package/dist/packages/primitives/command/src/Command.js +7 -0
- package/dist/packages/primitives/command/src/Command.js.map +1 -0
- package/dist/packages/primitives/command/src/Command.vue.d.ts +77 -0
- package/dist/packages/primitives/command/src/Command.vue_vue_type_script_setup_true_lang.js +333 -0
- package/dist/packages/primitives/command/src/Command.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/command/src/index.d.ts +4 -0
- package/dist/packages/primitives/command/src/index.js +3 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.js +7 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.js.map +1 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.vue.d.ts +64 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/copy-button/src/index.d.ts +4 -0
- package/dist/packages/primitives/copy-button/src/index.js +3 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.js +7 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.js.map +1 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.vue.d.ts +128 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/data-grid/src/index.d.ts +4 -0
- package/dist/packages/primitives/data-grid/src/index.js +3 -0
- package/dist/packages/primitives/date-picker/src/DatePicker.js.map +1 -1
- package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.js.map +1 -1
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js +21 -18
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.js.map +1 -1
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.js.map +1 -1
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/dialog/src/Dialog.js.map +1 -1
- package/dist/packages/primitives/dialog/src/Dialog.vue.d.ts +15 -7
- package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/drawer/src/Drawer.js.map +1 -1
- package/dist/packages/primitives/drawer/src/Drawer.vue.d.ts +10 -2
- package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/hover-card/src/index.d.ts.map +1 -1
- package/dist/packages/primitives/live-region/src/LiveRegion.js +7 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.js.map +1 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue.d.ts +36 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/live-region/src/context.d.ts +40 -0
- package/dist/packages/primitives/live-region/src/context.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/context.js +85 -0
- package/dist/packages/primitives/live-region/src/context.js.map +1 -0
- package/dist/packages/primitives/live-region/src/index.d.ts +4 -0
- package/dist/packages/primitives/live-region/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/index.js +3 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.d.ts +17 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.js +25 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.js.map +1 -0
- package/dist/packages/primitives/menubar/src/Menubar.js.map +1 -1
- package/dist/packages/primitives/menubar/src/Menubar.vue.d.ts.map +1 -1
- package/dist/packages/primitives/menubar/src/Menubar.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/packages/primitives/menubar/src/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/meter/src/Meter.js +7 -0
- package/dist/packages/primitives/meter/src/Meter.js.map +1 -0
- package/dist/packages/primitives/meter/src/Meter.vue.d.ts +87 -0
- package/dist/packages/primitives/meter/src/Meter.vue_vue_type_script_setup_true_lang.js +236 -0
- package/dist/packages/primitives/meter/src/Meter.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/meter/src/index.d.ts +4 -0
- package/dist/packages/primitives/meter/src/index.js +3 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.js +7 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.js.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue.d.ts +69 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue.d.ts.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue_vue_type_script_setup_true_lang.js +118 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/index.d.ts +3 -0
- package/dist/packages/primitives/navigation-menu/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/index.js +2 -0
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.js.map +1 -1
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/skip-link/src/SkipLink.js +7 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.js.map +1 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.vue.d.ts +62 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/skip-link/src/index.d.ts +3 -0
- package/dist/packages/primitives/skip-link/src/index.js +3 -0
- package/dist/packages/primitives/stepper/src/Stepper.js.map +1 -1
- package/dist/packages/primitives/stepper/src/Stepper.vue_vue_type_script_setup_true_lang.js +7 -5
- package/dist/packages/primitives/stepper/src/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.js.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue.d.ts.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/table/src/index.d.ts +1 -1
- package/dist/packages/primitives/table/src/index.js +2 -2
- package/dist/packages/primitives/time-picker/src/TimePicker.js.map +1 -1
- package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/toast/src/ToastItem.js.map +1 -1
- package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.js +7 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.js.map +1 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue.d.ts +53 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue.d.ts.map +1 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/toggle-group/src/index.d.ts +3 -0
- package/dist/packages/primitives/toggle-group/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/toggle-group/src/index.js +2 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.js +7 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue.d.ts +31 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue.d.ts.map +1 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue_vue_type_script_setup_true_lang.js +149 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.js +7 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue.d.ts +24 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue.d.ts.map +1 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/index.d.ts +4 -0
- package/dist/packages/primitives/toolbar/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/toolbar/src/index.js +3 -0
- package/dist/packages/primitives/tree-view/src/TreeView.js +7 -0
- package/dist/packages/primitives/tree-view/src/TreeView.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeView.vue.d.ts +99 -0
- package/dist/packages/primitives/tree-view/src/TreeView.vue_vue_type_script_setup_true_lang.js +310 -0
- package/dist/packages/primitives/tree-view/src/TreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.js +7 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue.d.ts +15 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue.d.ts.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/context.d.ts +39 -0
- package/dist/packages/primitives/tree-view/src/context.d.ts.map +1 -0
- package/dist/packages/primitives/tree-view/src/context.js +6 -0
- package/dist/packages/primitives/tree-view/src/context.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/index.d.ts +4 -0
- package/dist/packages/primitives/tree-view/src/index.js +3 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.js +7 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.js.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue.d.ts +21 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue.d.ts.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/index.d.ts +3 -0
- package/dist/packages/primitives/visually-hidden/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/index.js +2 -0
- package/package.json +29 -28
|
@@ -60,6 +60,43 @@ export interface AlertLabels {
|
|
|
60
60
|
/** The dismiss control's accessible name. */
|
|
61
61
|
readonly dismiss: string;
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* What this surface speaks of its own account: the names of the two buttons
|
|
65
|
+
* that page the months, and the two halves of the selection line under the
|
|
66
|
+
* header.
|
|
67
|
+
*
|
|
68
|
+
* Everything else a reader is told is already shaped by the control's own
|
|
69
|
+
* `locale` — the month-and-year heading and each day cell's full-date name
|
|
70
|
+
* are formatted from it, so there is no English behind them for this slot to
|
|
71
|
+
* replace.
|
|
72
|
+
*
|
|
73
|
+
* **The selection line exists because the engine announces nothing.** A
|
|
74
|
+
* choice reaches the DOM only as `aria-selected` flipping on a cell, and a
|
|
75
|
+
* flipped attribute under an unmoved focus point is silent to a screen
|
|
76
|
+
* reader — there is no field beside this surface whose value change would be
|
|
77
|
+
* announced instead. The line is DateRangePicker's `role="status"` summary,
|
|
78
|
+
* reduced to what a point selection has to say.
|
|
79
|
+
*/
|
|
80
|
+
export interface CalendarLabels {
|
|
81
|
+
/** The button that pages the calendar back one month. */
|
|
82
|
+
readonly previousMonth: string;
|
|
83
|
+
/** The button that pages the calendar on one month. */
|
|
84
|
+
readonly nextMonth: string;
|
|
85
|
+
/**
|
|
86
|
+
* What that line says once a day is chosen. It receives the day already
|
|
87
|
+
* written out in full by the control's own formatter — the same string the
|
|
88
|
+
* chosen cell is named with — because formatting it a second way here would
|
|
89
|
+
* build a second `Intl` path beside the one that exists.
|
|
90
|
+
*/
|
|
91
|
+
readonly chosen: LabelOf<{
|
|
92
|
+
date: string;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* What the same line says while nothing is chosen, and what it returns to
|
|
96
|
+
* when the chosen day is picked again.
|
|
97
|
+
*/
|
|
98
|
+
readonly cleared: string;
|
|
99
|
+
}
|
|
63
100
|
/**
|
|
64
101
|
* What Carousel says on its own account: the region's name, the two controls'
|
|
65
102
|
* names, and the sentence that turns a position into a sentence. `slide` is
|
|
@@ -77,6 +114,20 @@ export interface CarouselLabels {
|
|
|
77
114
|
total: number;
|
|
78
115
|
}>;
|
|
79
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* What CopyButton says on its own account: its own name and the two
|
|
119
|
+
* outcomes. `copy` is the icon-only button's accessible name; `copied` and
|
|
120
|
+
* `failed` are the announcements assistive technology hears — the visible
|
|
121
|
+
* glyph swap is deliberately not the only carrier of the state.
|
|
122
|
+
*/
|
|
123
|
+
export interface CopyButtonLabels {
|
|
124
|
+
/** The button's accessible name. */
|
|
125
|
+
readonly copy: string;
|
|
126
|
+
/** Announced when the clipboard accepts the write. */
|
|
127
|
+
readonly copied: string;
|
|
128
|
+
/** Announced when the clipboard refuses or the host's `getText` throws — the button stays operable, so the next click retries. */
|
|
129
|
+
readonly failed: string;
|
|
130
|
+
}
|
|
80
131
|
/**
|
|
81
132
|
* What Table says on its own account: the scrollable region's fallback name
|
|
82
133
|
* (a caption prop overrides it) and the sort control's state in words —
|
|
@@ -100,6 +151,14 @@ export interface TableLabels {
|
|
|
100
151
|
readonly sortedDescending: string;
|
|
101
152
|
readonly sort: string;
|
|
102
153
|
}
|
|
154
|
+
export interface DataGridLabels {
|
|
155
|
+
readonly region: string;
|
|
156
|
+
readonly selectAll: string;
|
|
157
|
+
readonly selectRow: string;
|
|
158
|
+
readonly sortedAscending: string;
|
|
159
|
+
readonly sortedDescending: string;
|
|
160
|
+
readonly sort: string;
|
|
161
|
+
}
|
|
103
162
|
/**
|
|
104
163
|
* The two sentences the row says that are not a member's own name.
|
|
105
164
|
*
|
|
@@ -242,6 +301,26 @@ export interface ComboboxLabels {
|
|
|
242
301
|
hidden: number;
|
|
243
302
|
}>;
|
|
244
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* Everything a Command says that does not arrive as one of its items — the
|
|
306
|
+
* search field's placeholder plus the strings spoken around the result list.
|
|
307
|
+
* Command renders its own chrome and the host's items fill only the list, so
|
|
308
|
+
* this slot is exactly the reverse of `Select`'s absence: it exists because
|
|
309
|
+
* the chrome is real, and it stays one line apart from `ComboboxLabels`
|
|
310
|
+
* because the two controls share their surface vocabulary and keyboard model.
|
|
311
|
+
*/
|
|
312
|
+
export interface CommandLabels {
|
|
313
|
+
/** Placeholder text for the search input. */
|
|
314
|
+
readonly placeholder: string;
|
|
315
|
+
/** Text shown when no items match the query. */
|
|
316
|
+
readonly emptyMessage: string;
|
|
317
|
+
/** Accessible label for the search input. */
|
|
318
|
+
readonly searchLabel: string;
|
|
319
|
+
/** Singular result count text. Use {count} as placeholder. */
|
|
320
|
+
readonly resultSingular: string;
|
|
321
|
+
/** Plural result count text. Use {count} as placeholder. */
|
|
322
|
+
readonly resultPlural: string;
|
|
323
|
+
}
|
|
245
324
|
/**
|
|
246
325
|
* The strings this control says that no other member of the family says: the
|
|
247
326
|
* two half-group names and the status line above the grids.
|
|
@@ -406,6 +485,24 @@ export interface EditableLabels {
|
|
|
406
485
|
value: string;
|
|
407
486
|
}>;
|
|
408
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* What the ErrorSummary says on its own account: the heading that names the
|
|
490
|
+
* problem and states the count — a reader should know the size of the list
|
|
491
|
+
* before it is read — and the optional line under it. The heading takes the
|
|
492
|
+
* **number**, never a finished sentence, for the reason `LabelOf` gives:
|
|
493
|
+
* "2 errors" has one plural form in English and another in Arabic, and a
|
|
494
|
+
* host handed the integer reaches `Intl.PluralRules`.
|
|
495
|
+
*/
|
|
496
|
+
export interface ErrorSummaryLabels {
|
|
497
|
+
/** The summary's heading, carrying the number of field errors it lists. */
|
|
498
|
+
readonly heading: LabelOf<{
|
|
499
|
+
count: number;
|
|
500
|
+
}>;
|
|
501
|
+
/** Supporting text under the heading, before the list. Empty by default; render nothing when it is. */
|
|
502
|
+
readonly description: LabelOf<{
|
|
503
|
+
count: number;
|
|
504
|
+
}>;
|
|
505
|
+
}
|
|
409
506
|
/**
|
|
410
507
|
* Everything this control puts in front of a reader that is not a file name —
|
|
411
508
|
* and it is the most prose in the library, which is why every one of these
|
|
@@ -482,6 +579,39 @@ export interface IndicatorLabels {
|
|
|
482
579
|
/** A dot with no `status`: something changed here, and nothing more specific. */
|
|
483
580
|
readonly attention: string;
|
|
484
581
|
}
|
|
582
|
+
/**
|
|
583
|
+
* Everything this gauge publishes that is not the host's own label — and all
|
|
584
|
+
* four keys exist because the meter role has no English of its own.
|
|
585
|
+
*
|
|
586
|
+
* `valueText` takes `{ value, min, max }` rather than a pre-formatted string.
|
|
587
|
+
* A host handed "17 of 40" can format the digits for its locale and word the
|
|
588
|
+
* qualifier — "17 of 40 seats", "17 / 40 places", "used 17 out of 40" — but a
|
|
589
|
+
* host handed the formatted string can only re-read it. The rounding therefore
|
|
590
|
+
* lives in Loom's default, not in the component, so it is a wording choice a
|
|
591
|
+
* host replaces along with the words.
|
|
592
|
+
*
|
|
593
|
+
* The three band words (`optimal`, `cautionary`, `critical`) name the HTML
|
|
594
|
+
* meter element's three quality regions — the non-colour cue that is mandatory
|
|
595
|
+
* when `threshold` is on. They are not adjectives applied to a value; they are
|
|
596
|
+
* the region's own name, so a language can pick the word that reads naturally
|
|
597
|
+
* as a label beside the gauge ("Optimal" / "Caution" / "Critical").
|
|
598
|
+
*/
|
|
599
|
+
export interface MeterLabels {
|
|
600
|
+
/** Fallback accessible name when no label/ariaLabel/ariaLabelledby is provided. */
|
|
601
|
+
readonly name: string;
|
|
602
|
+
/** The announced value, from the clamped amount and the range it sits in. */
|
|
603
|
+
readonly valueText: LabelOf<{
|
|
604
|
+
value: number;
|
|
605
|
+
min: number;
|
|
606
|
+
max: number;
|
|
607
|
+
}>;
|
|
608
|
+
/** The word for the optimal band — the region containing the optimum value. */
|
|
609
|
+
readonly optimal: string;
|
|
610
|
+
/** The word for the cautionary band — a suboptimal region, but not the worst. */
|
|
611
|
+
readonly cautionary: string;
|
|
612
|
+
/** The word for the critical band — the farthest region from the optimum. */
|
|
613
|
+
readonly critical: string;
|
|
614
|
+
}
|
|
485
615
|
/**
|
|
486
616
|
* Everything this control publishes to assistive technology — and all three of
|
|
487
617
|
* these are names Reka UI would otherwise supply in English of its own accord.
|
|
@@ -668,7 +798,7 @@ export interface RatingLabels {
|
|
|
668
798
|
* carries how that one is taken out of the accessibility tree, and why it has
|
|
669
799
|
* to be taken out rather than translated in place.
|
|
670
800
|
*
|
|
671
|
-
* `position` and `completed` take values rather than returning fragments Loom
|
|
801
|
+
* `position`, `step` and `completed` take values rather than returning fragments Loom
|
|
672
802
|
* would join. "Step 3 of 12" is not four keys and a preposition; it is one
|
|
673
803
|
* sentence a translator has to be able to re-order, and the same is true of
|
|
674
804
|
* where a language puts a qualifier relative to the thing it qualifies. See
|
|
@@ -691,6 +821,18 @@ export interface StepperLabels {
|
|
|
691
821
|
step: number;
|
|
692
822
|
stepCount: number;
|
|
693
823
|
}>;
|
|
824
|
+
/**
|
|
825
|
+
* A trigger's position, joined into that trigger's accessible name. The
|
|
826
|
+
* indicator a reader sees is the step's number, and WCAG 2.5.3 (Label in
|
|
827
|
+
* Name) makes a control's visible text part of its name, so a voice user
|
|
828
|
+
* saying "Step 2" must land on the same trigger one saying "Shipping" does
|
|
829
|
+
* — the number has to join the name, and this is where it joins. Measured
|
|
830
|
+
* 2026-08-26: `label-content-name-mismatch` fired on every Stepper trigger
|
|
831
|
+
* before this key existed.
|
|
832
|
+
*/
|
|
833
|
+
readonly step: LabelOf<{
|
|
834
|
+
step: number;
|
|
835
|
+
}>;
|
|
694
836
|
/**
|
|
695
837
|
* A finished step's whole accessible name, built from its title. ARIA has a
|
|
696
838
|
* value for "you are here" and none for "done", and the check glyph is
|
|
@@ -819,6 +961,17 @@ export interface ToastLabels {
|
|
|
819
961
|
hotkey: string;
|
|
820
962
|
}>;
|
|
821
963
|
}
|
|
964
|
+
/**
|
|
965
|
+
* The strings the TreeView says that no node in it says. Everything else a
|
|
966
|
+
* tree renders arrives as a node's own `label`, so the bag is small — but the
|
|
967
|
+
* one string it does carry is one a reader waits on: a lazy branch that is
|
|
968
|
+
* fetching its children has to say so rather than sit silent, because an
|
|
969
|
+
* expand that produces nothing reads as a broken control.
|
|
970
|
+
*/
|
|
971
|
+
export interface TreeViewLabels {
|
|
972
|
+
/** Shown on, and announced for, a node whose children are being fetched. */
|
|
973
|
+
readonly loading: string;
|
|
974
|
+
}
|
|
822
975
|
/**
|
|
823
976
|
* The three buttons' accessible names. There are four, because the middle
|
|
824
977
|
* button is one control in two states and a language may well name them with
|
|
@@ -849,4 +1002,13 @@ export interface ScrollReelLabels {
|
|
|
849
1002
|
/** The reel region's accessible name. */
|
|
850
1003
|
readonly region: string;
|
|
851
1004
|
}
|
|
1005
|
+
/**
|
|
1006
|
+
* The one string this component renders: the bypass link's visible text.
|
|
1007
|
+
* It is the first thing a keyboard user meets on the page, so it is the
|
|
1008
|
+
* first string a host translating the interface translates.
|
|
1009
|
+
*/
|
|
1010
|
+
export interface SkipLinkLabels {
|
|
1011
|
+
/** The link's visible text. */
|
|
1012
|
+
readonly label: string;
|
|
1013
|
+
}
|
|
852
1014
|
//# sourceMappingURL=component-shapes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-shapes.d.ts","sourceRoot":"","sources":["../../../../packages/labels/src/component-shapes.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC,2JAA2J;AAC3J,MAAM,MAAM,YAAY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AsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -189,6 +189,80 @@ export declare function emptySegmentValueText(part: string, value: string, empty
|
|
|
189
189
|
export declare function isDateSegmentPart(part: string): part is DateSegmentName;
|
|
190
190
|
/** Whether a part named by Reka's `segments` slot belongs to the clock half. */
|
|
191
191
|
export declare function isTimeSegmentPart(part: string): part is TimeSegmentName;
|
|
192
|
+
/**
|
|
193
|
+
* The one or both vocabularies a segmented field resolves its strings through,
|
|
194
|
+
* as `useLabels` handed them to the control.
|
|
195
|
+
*
|
|
196
|
+
* A shape per control rather than one required parameter set, because this
|
|
197
|
+
* serves three shapes of control at once: a date-only one resolves through
|
|
198
|
+
* `date` alone, a time-only one through `time` alone, and the two datetime
|
|
199
|
+
* controls through both. That spread is exactly why this pair lives here
|
|
200
|
+
* rather than five times over — five hand-copied `segmentLabel`/
|
|
201
|
+
* `segmentValueText` pairs had already drifted in their comments, and the only
|
|
202
|
+
* step left was drifting in the emitted strings themselves, which are
|
|
203
|
+
* assistive technology's entire view of these fields.
|
|
204
|
+
*/
|
|
205
|
+
export interface SegmentVocabularies {
|
|
206
|
+
/** The date half's vocabulary, when the control renders date segments. */
|
|
207
|
+
readonly date?: DateSegmentLabels | undefined;
|
|
208
|
+
/** The clock half's vocabulary, when the control renders time segments. */
|
|
209
|
+
readonly time?: TimeSegmentLabels | undefined;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* The accessible name of one segment, replacing the English name Reka writes
|
|
213
|
+
* inside `useDateField`'s own render function — see `DATE_SEGMENT_LABELS`.
|
|
214
|
+
*
|
|
215
|
+
* The half that owns the part names it: a date part is answered by the date
|
|
216
|
+
* vocabulary and a clock part by the time one, which is what lets a host
|
|
217
|
+
* localising only `timeSegments` still reach the clock segments of a datetime
|
|
218
|
+
* control. `undefined` for everything else — the `literal` separators, which
|
|
219
|
+
* Reka renders `aria-hidden` and which must stay unnamed, and any part neither
|
|
220
|
+
* vocabulary knows.
|
|
221
|
+
*/
|
|
222
|
+
export declare function segmentAriaLabel(vocabularies: SegmentVocabularies, part: string): string | undefined;
|
|
223
|
+
/** What `segmentAriaValueText` resolves one segment's value announcement from. */
|
|
224
|
+
export interface SegmentAriaValueTextArgs extends SegmentVocabularies {
|
|
225
|
+
/** The segment's part name, as Reka's `segments` slot yields it. */
|
|
226
|
+
readonly part: string;
|
|
227
|
+
/**
|
|
228
|
+
* The segment's displayed value, whose emptiness decides whether the field's
|
|
229
|
+
* own word replaces Reka's — read off digits by `emptySegmentValueText`.
|
|
230
|
+
*/
|
|
231
|
+
readonly value: string;
|
|
232
|
+
/**
|
|
233
|
+
* The field's locale, composed into the filled month's value text. Every
|
|
234
|
+
* other branch ignores it, but a control always has one to give.
|
|
235
|
+
*/
|
|
236
|
+
readonly locale: string;
|
|
237
|
+
/**
|
|
238
|
+
* The numeric month of the model value the control parsed itself, and never
|
|
239
|
+
* of `value`: the displayed text is locale-formatted and may carry no
|
|
240
|
+
* parseable number, so the caller reads the month off what it parsed.
|
|
241
|
+
* Absent while no full date is chosen, and unused by a time-only control.
|
|
242
|
+
*/
|
|
243
|
+
readonly month?: number | undefined;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The `aria-valuetext` override for one segment, as an object to `v-bind` —
|
|
247
|
+
* the shape `emptySegmentValueText` returns and the reason is recorded there.
|
|
248
|
+
*
|
|
249
|
+
* This composes the branches the five segmented controls each used to carry by
|
|
250
|
+
* hand, in the order they must apply: the empty case first, because it is the
|
|
251
|
+
* only one replacing what Reka wrote; then the filled month, announced through
|
|
252
|
+
* `filledMonth` so a host can compose `"5 - May"` the way their language
|
|
253
|
+
* needs; then the filled day period through `filledDayPeriod`, for the same
|
|
254
|
+
* reason. Anything else returns `{}`, which merges as nothing and leaves
|
|
255
|
+
* Reka's own value text — a number — exactly as it wrote it.
|
|
256
|
+
*
|
|
257
|
+
* The empty message comes from whichever half owns the part, so a host
|
|
258
|
+
* localising only `timeSegments` still reaches the clock segments of a
|
|
259
|
+
* datetime control. The fallback to `""` is unreachable for every real caller
|
|
260
|
+
* — a control always resolves at least its own half — and exists to keep the
|
|
261
|
+
* function total rather than to be exercised.
|
|
262
|
+
*/
|
|
263
|
+
export declare function segmentAriaValueText({ date, time, part, value, locale, month, }: SegmentAriaValueTextArgs): {
|
|
264
|
+
"aria-valuetext"?: string;
|
|
265
|
+
};
|
|
192
266
|
/**
|
|
193
267
|
* Everything the calendar popover says that is not a date: the panel's own
|
|
194
268
|
* name, the button that opens it, and the two that page the months.
|
|
@@ -269,12 +343,15 @@ export declare const RANGE_CELL_LABELS: RangeCellLabels;
|
|
|
269
343
|
export declare function monthName(locale: string, month: number): string;
|
|
270
344
|
/**
|
|
271
345
|
* A whole day written out — weekday, day, month and year — in the control's
|
|
272
|
-
* locale, which is the half of a range cell's name that is not a qualifier
|
|
346
|
+
* locale, which is the half of a range cell's name that is not a qualifier,
|
|
347
|
+
* and the whole of a standalone calendar cell's name: a surface with no field
|
|
348
|
+
* echoing the value has its cells carry the full date themselves.
|
|
273
349
|
*
|
|
274
|
-
* Both range controls' English defaults need it and neither should own it;
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
350
|
+
* Both range controls' English defaults need it and neither should own it;
|
|
351
|
+
* the Calendar reaches it through this module for the same reason, so one
|
|
352
|
+
* formatter cache serves every grid in the library. A host replacing those
|
|
353
|
+
* defaults formats with whatever their own application already uses and never
|
|
354
|
+
* calls this. Like `monthName`, it stays off the public facade.
|
|
278
355
|
*/
|
|
279
356
|
export declare function formatFullDay(locale: string, date: DateValue): string;
|
|
280
357
|
//# sourceMappingURL=date-labels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-labels.d.ts","sourceRoot":"","sources":["../../../../packages/labels/src/date-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClE;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAkBjC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0BAA0B;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,QAAQ,CAA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;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;KACjC,CAAC,CAAC;CACJ;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,eAQ/B,CAAC;AAaF;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAYrE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getLocalTimeZone as $ad063034c8620db8$export$aa8b41735afcabd2 } from "../../../node_modules/.pnpm/@internationalized_date@3.12.
|
|
1
|
+
import { getLocalTimeZone as $ad063034c8620db8$export$aa8b41735afcabd2 } from "../../../node_modules/.pnpm/@internationalized_date@3.12.4/node_modules/@internationalized/date/dist/private/queries.js";
|
|
2
2
|
//#region packages/labels/src/date-labels.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loom's English for the date segments, co-located so it tree-shakes with the
|
|
@@ -92,6 +92,50 @@ function isDateSegmentPart(part) {
|
|
|
92
92
|
function isTimeSegmentPart(part) {
|
|
93
93
|
return TIME_SEGMENT_PARTS.has(part);
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* The accessible name of one segment, replacing the English name Reka writes
|
|
97
|
+
* inside `useDateField`'s own render function — see `DATE_SEGMENT_LABELS`.
|
|
98
|
+
*
|
|
99
|
+
* The half that owns the part names it: a date part is answered by the date
|
|
100
|
+
* vocabulary and a clock part by the time one, which is what lets a host
|
|
101
|
+
* localising only `timeSegments` still reach the clock segments of a datetime
|
|
102
|
+
* control. `undefined` for everything else — the `literal` separators, which
|
|
103
|
+
* Reka renders `aria-hidden` and which must stay unnamed, and any part neither
|
|
104
|
+
* vocabulary knows.
|
|
105
|
+
*/
|
|
106
|
+
function segmentAriaLabel(vocabularies, part) {
|
|
107
|
+
const { date, time } = vocabularies;
|
|
108
|
+
if (date && isDateSegmentPart(part)) return date[part];
|
|
109
|
+
return time && isTimeSegmentPart(part) ? time[part] : void 0;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The `aria-valuetext` override for one segment, as an object to `v-bind` —
|
|
113
|
+
* the shape `emptySegmentValueText` returns and the reason is recorded there.
|
|
114
|
+
*
|
|
115
|
+
* This composes the branches the five segmented controls each used to carry by
|
|
116
|
+
* hand, in the order they must apply: the empty case first, because it is the
|
|
117
|
+
* only one replacing what Reka wrote; then the filled month, announced through
|
|
118
|
+
* `filledMonth` so a host can compose `"5 - May"` the way their language
|
|
119
|
+
* needs; then the filled day period through `filledDayPeriod`, for the same
|
|
120
|
+
* reason. Anything else returns `{}`, which merges as nothing and leaves
|
|
121
|
+
* Reka's own value text — a number — exactly as it wrote it.
|
|
122
|
+
*
|
|
123
|
+
* The empty message comes from whichever half owns the part, so a host
|
|
124
|
+
* localising only `timeSegments` still reaches the clock segments of a
|
|
125
|
+
* datetime control. The fallback to `""` is unreachable for every real caller
|
|
126
|
+
* — a control always resolves at least its own half — and exists to keep the
|
|
127
|
+
* function total rather than to be exercised.
|
|
128
|
+
*/
|
|
129
|
+
function segmentAriaValueText({ date, time, part, value, locale, month }) {
|
|
130
|
+
const empty = emptySegmentValueText(part, value, (isTimeSegmentPart(part) ? time ?? date : date ?? time)?.empty ?? "");
|
|
131
|
+
if (empty["aria-valuetext"]) return empty;
|
|
132
|
+
if (date && part === "month" && month !== void 0) return { "aria-valuetext": date.filledMonth({
|
|
133
|
+
value: month,
|
|
134
|
+
locale
|
|
135
|
+
}) };
|
|
136
|
+
if (time && part === "dayPeriod") return { "aria-valuetext": time.filledDayPeriod({ dayPeriod: value }) };
|
|
137
|
+
return {};
|
|
138
|
+
}
|
|
95
139
|
/** Loom's English for the calendar popover. See `DATE_SEGMENT_LABELS`. */
|
|
96
140
|
var CALENDAR_PANEL_LABELS = {
|
|
97
141
|
calendar: "Calendar",
|
|
@@ -133,12 +177,15 @@ function monthName(locale, month) {
|
|
|
133
177
|
}
|
|
134
178
|
/**
|
|
135
179
|
* A whole day written out — weekday, day, month and year — in the control's
|
|
136
|
-
* locale, which is the half of a range cell's name that is not a qualifier
|
|
180
|
+
* locale, which is the half of a range cell's name that is not a qualifier,
|
|
181
|
+
* and the whole of a standalone calendar cell's name: a surface with no field
|
|
182
|
+
* echoing the value has its cells carry the full date themselves.
|
|
137
183
|
*
|
|
138
|
-
* Both range controls' English defaults need it and neither should own it;
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
184
|
+
* Both range controls' English defaults need it and neither should own it;
|
|
185
|
+
* the Calendar reaches it through this module for the same reason, so one
|
|
186
|
+
* formatter cache serves every grid in the library. A host replacing those
|
|
187
|
+
* defaults formats with whatever their own application already uses and never
|
|
188
|
+
* calls this. Like `monthName`, it stays off the public facade.
|
|
142
189
|
*/
|
|
143
190
|
function formatFullDay(locale, date) {
|
|
144
191
|
let formatter = dayFormatters.get(locale);
|
|
@@ -154,6 +201,6 @@ function formatFullDay(locale, date) {
|
|
|
154
201
|
return formatter.format(date.toDate($ad063034c8620db8$export$aa8b41735afcabd2()));
|
|
155
202
|
}
|
|
156
203
|
//#endregion
|
|
157
|
-
export { CALENDAR_PANEL_LABELS, DATE_SEGMENT_LABELS, RANGE_CELL_LABELS, TIME_SEGMENT_LABELS, emptySegmentValueText, formatFullDay, isDateSegmentPart, isTimeSegmentPart, monthName };
|
|
204
|
+
export { CALENDAR_PANEL_LABELS, DATE_SEGMENT_LABELS, RANGE_CELL_LABELS, TIME_SEGMENT_LABELS, emptySegmentValueText, formatFullDay, isDateSegmentPart, isTimeSegmentPart, monthName, segmentAriaLabel, segmentAriaValueText };
|
|
158
205
|
|
|
159
206
|
//# sourceMappingURL=date-labels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-labels.js","names":[],"sources":["../../../../packages/labels/src/date-labels.ts"],"sourcesContent":["import { getLocalTimeZone, type DateValue } from \"@internationalized/date\";\nimport type { LabelOf } from \"./labels\";\n\n/**\n * The four slices the five date and time controls share, and the one decision\n * behind putting them here rather than five times over.\n *\n * Every other component in the library declares its own bag beside its own\n * markup, because its vocabulary is its own. These five do not have five\n * vocabularies: `DatePicker`, `DateTimePicker`, `DateRangePicker` and\n * `DateTimeRangePicker` all say *Open calendar*, *Previous month* and *Next\n * month*, and all five name the parts of a segmented field with the same\n * words — the words are Reka UI's `useDateField` and `CalendarRoot` speaking,\n * one implementation underneath all five. Declared per component that would be\n * fifty-two keys with the same twelve strings written four times, and a\n * translator doing the same work four times to make one language complete.\n *\n * **Sliced by what a control actually says, not merged into one family bag.**\n * A `TimePicker` has no calendar and never renders a month or a year, so it\n * registers `timeSegments` alone: its documented vocabulary is four keys, and a\n * consumer importing only that control ships only those four strings. One\n * shared bag for the whole family would have made every one of the five carry\n * all twenty, and would have printed keys on `TimePicker`'s API page that it\n * has no element to put them on.\n *\n * What is deliberately *not* shared is the two range controls' half-group names\n * and status lines. They name the same concepts with different words (`Start\n * date` against `Start date and time`) and from different facts (a count of\n * whole days against a signed duration in minutes), so a shared key would have\n * to be a sentence that is never true of both. Their calendar cells' names are\n * shared, because those differ in neither.\n */\n\n/**\n * The names Reka UI's `useDateField` writes onto the day, month, year and era\n * segments — `\"day,\"`, `\"month, \"`, `\"year, \"`, `\"era\"`, each with the spacing\n * of a string it meant to concatenate.\n *\n * There is no prop for any of them. A binding on Loom's side reaches the\n * segment as a fallthrough attribute, which Vue merges onto the rendered vnode\n * *after* Reka's own render function produced it, and `mergeProps` is\n * last-write-wins for everything that is not `class`, `style` or `on*` — so\n * these replace Reka's rather than competing with it. Leave one unset and the\n * segment is not unnamed, it is named in English, which is the failure this\n * seam exists to close.\n *\n * Loom's defaults differ from Reka's by their capitalisation, which is what\n * lets a test assert *whose* string reached the DOM rather than merely what it\n * said.\n */\nexport interface DateSegmentLabels {\n /** The month segment of a date field. */\n readonly month: string;\n /** The day-of-month segment. */\n readonly day: string;\n /** The year segment. */\n readonly year: string;\n /**\n * The era segment, which most locales never render — `ja-JP-u-ca-japanese`\n * is the ordinary case that does.\n */\n readonly era: string;\n /**\n * What a segment with nothing in it yet reports as its value, replacing the\n * `aria-valuetext=\"Empty\"` Reka writes on an unfilled day, month or year.\n *\n * A segment shows the locale's own placeholder — `mm`, `jj`, `aaaa` — while\n * announcing this instead, so it is the one word standing between a fully\n * localised date field and a reader who is told \"Empty\" in English.\n *\n * Present on this slice *and* on `TimeSegmentLabels` rather than shared\n * between them, for the reason the slices exist at all: a `TimePicker`\n * registers no `dateSegments`, and a key it could only reach through the\n * date half would be a key it could not set.\n */\n readonly empty: string;\n /**\n * What a filled month segment announces as its value, replacing the\n * `aria-valuetext` Reka builds inside `useDateField`.\n *\n * Reka writes `\"5 - May\"` — the numeric month, a hard-coded `\" - \"`, and\n * the month name from `Intl.DateTimeFormat`. The name is locale-aware, but\n * the format is not: Japanese writes `\"5月\"`, Vietnamese `\"tháng 5\"`, and\n * neither separates the two parts with a hyphen. A `LabelOf` hands the\n * host the month number and the locale so they can compose the string their\n * language needs, using `Intl.DateTimeFormat` for the name and arranging the\n * parts in the right order.\n *\n * A `LabelOf` rather than a plain string, for the same reason\n * `RangeCellLabels.cell` is one: the month name depends on the locale, and\n * a string that did not receive the locale could not produce it. The host\n * decides the format — Loom's English default matches Reka's output so that\n * nothing changes for a consumer who does not override it.\n */\n readonly filledMonth: LabelOf<{ value: number; locale: string }>;\n}\n\n/**\n * Loom's English for the date segments, co-located so it tree-shakes with the\n * controls that use it, and exported so a host can build a partial vocabulary\n * against the real thing rather than a transcription of it.\n */\nexport const DATE_SEGMENT_LABELS: DateSegmentLabels = {\n month: \"Month\",\n day: \"Day\",\n year: \"Year\",\n era: \"Era\",\n // \"Not set\" rather than Reka's own \"Empty\", and the difference is load-bearing\n // in the same way the capitalisation of the names above is: it is what lets a\n // test assert whose string reached the DOM. It also reads better spoken — a\n // reader is being told this field has no value yet, not that it is blank.\n empty: \"Not set\",\n // Matches Reka's `\"5 - May\"` format for English. The month name comes from\n // `Intl.DateTimeFormat` via the cached `monthFormatters` map, which avoids\n // reconstructing the formatter on every render. A host overrides this to\n // change the format — Japanese `\"5月\"`, Vietnamese `\"tháng 5\"`, etc.\n filledMonth: ({ value, locale }) => {\n const name = monthName(locale, value);\n return `${String(value)} - ${name}`;\n },\n};\n\n/**\n * The same, for the clock half of a segmented field: Reka writes `\"hour, \"`,\n * `\"minute, \"`, `\"second, \"` and `\"AM/PM\"`, and offers a prop for none of them.\n *\n * `dayPeriod` is spelled `AM or PM` rather than `AM/PM` so that it reads as\n * words when it is spoken, and so the capitalisation trick above still works on\n * the one segment whose name Reka already capitalises.\n */\nexport interface TimeSegmentLabels {\n /** The hour segment. */\n readonly hour: string;\n /** The minute segment. */\n readonly minute: string;\n /** The seconds segment, which only a control at second granularity renders. */\n readonly second: string;\n /** The AM/PM segment, which only a 12-hour field renders. */\n readonly dayPeriod: string;\n /** What an hour, minute or second with nothing in it yet reports. See `DateSegmentLabels.empty`. */\n readonly empty: string;\n /**\n * What a filled day-period segment announces as its value, replacing the\n * `aria-valuetext` Reka writes inside `useDateField`.\n *\n * Reka writes `segmentValues.dayPeriod ?? \"AM\"` — always `\"AM\"` or `\"PM\"`,\n * produced by its own hour-cycle logic (`hour >= 12 ? \"PM\" : \"AM\"`) rather\n * than by `Intl.DateTimeFormat`. A host who has localised every other string\n * in the library still hears Latin-script \"AM\"/\"PM\" from this segment, which\n * is the defect this key exists to close.\n *\n * A `LabelOf` rather than a plain string, because the period name depends on\n * the locale: Arabic writes `\"ص\"`/`\"م\"`, Japanese `\"午前\"`/`\"午後\"`, and a\n * plain string could not carry that decision. Loom's English default returns\n * `dayPeriod` unchanged, which is correct for Latin-script locales.\n */\n readonly filledDayPeriod: LabelOf<{ dayPeriod: string }>;\n}\n\n/** Loom's English for the time segments. See `DATE_SEGMENT_LABELS`. */\nexport const TIME_SEGMENT_LABELS: TimeSegmentLabels = {\n hour: \"Hour\",\n minute: \"Minute\",\n second: \"Second\",\n dayPeriod: \"AM or PM\",\n empty: \"Not set\",\n // The identity function for English: Reka's `\"AM\"`/`\"PM\"` are correct for\n // Latin-script locales. A host localising to Arabic, Japanese, etc. overrides\n // this to return the locale's own period names.\n filledDayPeriod: ({ dayPeriod }) => dayPeriod,\n};\n\n/**\n * The parts each slice actually names — every key of its bag except `empty`,\n * which is a message *about* a segment rather than the name of one.\n *\n * Both the type and the set below are written out rather than derived from the\n * bags, which is what they were before `empty` joined them. Derived, the guards\n * would answer `true` for `\"empty\"` and narrow a part to a key that names no\n * element, and `segmentLabel` would happily return the empty message as a\n * segment's accessible name.\n */\nexport type DateSegmentName = Exclude<keyof DateSegmentLabels, \"empty\" | \"filledMonth\">;\nexport type TimeSegmentName = Exclude<keyof TimeSegmentLabels, \"empty\" | \"filledDayPeriod\">;\n\nconst DATE_SEGMENT_PARTS = new Set<DateSegmentName>([\"month\", \"day\", \"year\", \"era\"]);\nconst TIME_SEGMENT_PARTS = new Set<TimeSegmentName>([\"hour\", \"minute\", \"second\", \"dayPeriod\"]);\n\n/**\n * The six segments Reka reports as `aria-valuetext=\"Empty\"` when they hold\n * nothing — and, not by coincidence, the six that render as digits when they\n * hold something. `dayPeriod` and `era` are absent because Reka never writes\n * \"Empty\" on either: an unset `dayPeriod` reads `AM` and an unset `era` reads\n * the placeholder's own era, both of which are already the locale's words.\n */\nconst EMPTIABLE_SEGMENT_PARTS = new Set<string>([\n \"day\",\n \"month\",\n \"year\",\n \"hour\",\n \"minute\",\n \"second\",\n]);\n\n/**\n * The `aria-valuetext` override for one segment, as an object to `v-bind`\n * rather than a string to bind directly — and that is the whole point of it.\n *\n * Reka writes `aria-valuetext=\"Empty\"` on an unfilled segment and the number\n * on a filled one, and only the first is a hard-coded English literal: the\n * second is `${valueNow}`, and the month's `\"3 - March\"` takes its month name\n * from the field's own `locale`. So this replaces exactly the empty case and\n * leaves the rest alone. Binding `:aria-valuetext` directly could not do that\n * — Vue merges a fallthrough `undefined` over Reka's value and *removes* the\n * attribute, so a filled segment would lose the number it is there to read\n * out. An absent key merges as nothing at all, which is what `optional()`\n * exists for elsewhere and what returning `{}` does here.\n *\n * Emptiness is read off the digits in the segment's own displayed value, which\n * is sound in both directions for these six parts: every locale's placeholder\n * for them is letters (`mm`, `jj`, `aaaa`) and every value they can hold is\n * digits. The two parts where that would not hold are the two excluded above.\n */\nexport function emptySegmentValueText(\n part: string,\n value: string,\n empty: string,\n): { \"aria-valuetext\"?: string } {\n return EMPTIABLE_SEGMENT_PARTS.has(part) && !/\\d/.test(value) ? { \"aria-valuetext\": empty } : {};\n}\n\n/**\n * Whether a part named by Reka's `segments` slot is one this slice names.\n *\n * A guard rather than an index, because the slot also yields `literal` — the\n * slashes and colons between the segments, which Reka renders `aria-hidden`\n * and which must stay unnamed — and `timeZoneName`, which none of these five\n * controls can produce: their values parse through `parseDate`, `parseTime` and\n * `parseDateTime`, none of which yields a zoned value, and no prop on any of\n * them accepts a zone. Reka's `\"timezone, \"` is therefore unreachable from\n * here, and a key for it would be a key nothing could ever render.\n */\nexport function isDateSegmentPart(part: string): part is DateSegmentName {\n return DATE_SEGMENT_PARTS.has(part as DateSegmentName);\n}\n\n/** Whether a part named by Reka's `segments` slot belongs to the clock half. */\nexport function isTimeSegmentPart(part: string): part is TimeSegmentName {\n return TIME_SEGMENT_PARTS.has(part as TimeSegmentName);\n}\n\n/**\n * Everything the calendar popover says that is not a date: the panel's own\n * name, the button that opens it, and the two that page the months.\n *\n * `calendar` is Reka's `CalendarRoot`/`RangeCalendarRoot` `calendarLabel` prop,\n * whose default is the string `\"Event Date\"` — a name for somebody else's\n * application, published both as the grid container's `aria-label` and inside a\n * visually-hidden live region that a screen reader reads on every month change.\n * It is a documented prop rather than a hard-coded literal, so it is the one\n * name in this file that is set rather than overridden.\n *\n * `previousMonth` and `nextMonth` do replace literals: Reka writes\n * `\"Previous page\"` and `\"Next page\"` on those two buttons, which is both\n * English and wrong — what they move is a month.\n */\nexport interface CalendarPanelLabels {\n /** The calendar's own name, read before the month and year on entering it. */\n readonly calendar: string;\n /** The button in the field that opens the calendar popover. */\n readonly openCalendar: string;\n /** The button that pages the calendar back one month. */\n readonly previousMonth: string;\n /** The button that pages the calendar on one month. */\n readonly nextMonth: string;\n}\n\n/** Loom's English for the calendar popover. See `DATE_SEGMENT_LABELS`. */\nexport const CALENDAR_PANEL_LABELS: CalendarPanelLabels = {\n calendar: \"Calendar\",\n openCalendar: \"Open calendar\",\n previousMonth: \"Previous month\",\n nextMonth: \"Next month\",\n};\n\n/**\n * Which part of a chosen span one calendar cell plays, handed to the cell's\n * label rather than resolved into words by the control.\n *\n * Four sibling keys and a joiner would be four phrases a translator cannot\n * reorder around the date they qualify — and in several languages the qualifier\n * does not follow the date at all. One argument carrying the variant is what\n * keeps the whole cell name one sentence the host writes.\n */\nexport type RangeCellPart = \"start\" | \"end\" | \"both\" | \"within\";\n\n/**\n * The accessible name of one day in a range calendar, shared by both range\n * controls because they say it identically and from identical facts — a day\n * and its part in the span. `DateTimeRangePicker`'s cells carry no time: the\n * cell *is* a day, and choosing it moves only the day.\n *\n * The two controls' other strings are not shared, because they differ in words\n * and in facts. This one does neither, and a translator writing it twice would\n * be writing it twice for no reason.\n */\nexport interface RangeCellLabels {\n /**\n * One calendar cell's accessible name, which replaces the one Reka writes\n * rather than adding to it: a cell's part in the range has to arrive *with*\n * the date, and an element has no second slot for a name.\n *\n * `part` is `undefined` for a day with no part in the range at all.\n */\n readonly cell: LabelOf<{\n locale: string;\n date: DateValue;\n part: RangeCellPart | undefined;\n }>;\n}\n\n/**\n * Loom's English for a range calendar's cells. The three fills that carry the\n * first day, the last and the ones between are three shades of one colour,\n * which survives neither a colour deficiency nor forced-colors mode — naming\n * the part is what tells them apart, and it is what makes a one-day span say so\n * once rather than announce itself twice as two different things.\n */\nexport const RANGE_CELL_LABELS: RangeCellLabels = {\n cell: ({ locale, date, part }) => {\n const full = formatFullDay(locale, date);\n if (part === \"both\") return `${full}, the whole range, first and last day`;\n if (part === \"start\") return `${full}, first day of the range`;\n if (part === \"end\") return `${full}, last day of the range`;\n return part === \"within\" ? `${full}, within the range` : full;\n },\n};\n\n// One formatter per locale, kept, because a range calendar's cell label runs\n// forty-two to eighty-four times per render and `Intl.DateTimeFormat`'s\n// constructor is the expensive half of it. The map is bounded by the number of\n// locales an application actually renders, which is one in nearly every case.\nconst dayFormatters = new Map<string, Intl.DateTimeFormat>();\n\n// Same pattern, for the filled month segment's `aria-valuetext`. The default\n// `filledMonth` label calls this on every render, so caching the formatter\n// avoids the `Intl.DateTimeFormat` constructor cost each time.\nconst monthFormatters = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * A month name in the control's locale, for use in `aria-valuetext`.\n *\n * A building block of the defaults below, not public surface — it stays off\n * the package barrel, because a host wording an override formats however\n * their application already does. Exported from the module so its own tests\n * can pin it directly.\n */\nexport function monthName(locale: string, month: number): string {\n let formatter = monthFormatters.get(locale);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(locale, { month: \"long\" });\n monthFormatters.set(locale, formatter);\n }\n // `Date` months are 0-indexed; Loom months are 1-indexed (as in `DateValue.month`).\n return formatter.format(new Date(2026, month - 1, 1));\n}\n\n/**\n * A whole day written out — weekday, day, month and year — in the control's\n * locale, which is the half of a range cell's name that is not a qualifier.\n *\n * Both range controls' English defaults need it and neither should own it; a\n * host replacing those defaults formats with whatever their own application\n * already uses and never calls this. Like `monthName`, it stays off the\n * package barrel.\n */\nexport function formatFullDay(locale: string, date: DateValue): string {\n let formatter = dayFormatters.get(locale);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(locale, {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n });\n dayFormatters.set(locale, formatter);\n }\n return formatter.format(date.toDate(getLocalTimeZone()));\n}\n"],"mappings":";;;;;;;AAsGA,IAAa,sBAAyC;CACpD,OAAO;CACP,KAAK;CACL,MAAM;CACN,KAAK;CAKL,OAAO;CAKP,cAAc,EAAE,OAAO,aAAa;EAClC,MAAM,OAAO,UAAU,QAAQ,KAAK;EACpC,OAAO,GAAG,OAAO,KAAK,EAAE,KAAK;CAC/B;AACF;;AAwCA,IAAa,sBAAyC;CACpD,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,OAAO;CAIP,kBAAkB,EAAE,gBAAgB;AACtC;AAeA,IAAM,qCAAqB,IAAI,IAAqB;CAAC;CAAS;CAAO;CAAQ;AAAK,CAAC;AACnF,IAAM,qCAAqB,IAAI,IAAqB;CAAC;CAAQ;CAAU;CAAU;AAAW,CAAC;;;;;;;;AAS7F,IAAM,0CAA0B,IAAI,IAAY;CAC9C;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,sBACd,MACA,OACA,OAC+B;CAC/B,OAAO,wBAAwB,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,kBAAkB,MAAM,IAAI,CAAC;AACjG;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,MAAuC;CACvE,OAAO,mBAAmB,IAAI,IAAuB;AACvD;;AAGA,SAAgB,kBAAkB,MAAuC;CACvE,OAAO,mBAAmB,IAAI,IAAuB;AACvD;;AA6BA,IAAa,wBAA6C;CACxD,UAAU;CACV,cAAc;CACd,eAAe;CACf,WAAW;AACb;;;;;;;;AA6CA,IAAa,oBAAqC,EAChD,OAAO,EAAE,QAAQ,MAAM,WAAW;CAChC,MAAM,OAAO,cAAc,QAAQ,IAAI;CACvC,IAAI,SAAS,QAAQ,OAAO,GAAG,KAAK;CACpC,IAAI,SAAS,SAAS,OAAO,GAAG,KAAK;CACrC,IAAI,SAAS,OAAO,OAAO,GAAG,KAAK;CACnC,OAAO,SAAS,WAAW,GAAG,KAAK,sBAAsB;AAC3D,EACF;AAMA,IAAM,gCAAgB,IAAI,IAAiC;AAK3D,IAAM,kCAAkB,IAAI,IAAiC;;;;;;;;;AAU7D,SAAgB,UAAU,QAAgB,OAAuB;CAC/D,IAAI,YAAY,gBAAgB,IAAI,MAAM;CAC1C,IAAI,CAAC,WAAW;EACd,YAAY,IAAI,KAAK,eAAe,QAAQ,EAAE,OAAO,OAAO,CAAC;EAC7D,gBAAgB,IAAI,QAAQ,SAAS;CACvC;CAEA,OAAO,UAAU,OAAO,IAAI,KAAK,MAAM,QAAQ,GAAG,CAAC,CAAC;AACtD;;;;;;;;;;AAWA,SAAgB,cAAc,QAAgB,MAAyB;CACrE,IAAI,YAAY,cAAc,IAAI,MAAM;CACxC,IAAI,CAAC,WAAW;EACd,YAAY,IAAI,KAAK,eAAe,QAAQ;GAC1C,SAAS;GACT,KAAK;GACL,OAAO;GACP,MAAM;EACR,CAAC;EACD,cAAc,IAAI,QAAQ,SAAS;CACrC;CACA,OAAO,UAAU,OAAO,KAAK,OAAO,0CAAiB,CAAC,CAAC;AACzD"}
|
|
1
|
+
{"version":3,"file":"date-labels.js","names":[],"sources":["../../../../packages/labels/src/date-labels.ts"],"sourcesContent":["import { getLocalTimeZone, type DateValue } from \"@internationalized/date\";\nimport type { LabelOf } from \"./labels\";\n\n/**\n * The four slices the five date and time controls share, and the one decision\n * behind putting them here rather than five times over.\n *\n * Every other component in the library declares its own bag beside its own\n * markup, because its vocabulary is its own. These five do not have five\n * vocabularies: `DatePicker`, `DateTimePicker`, `DateRangePicker` and\n * `DateTimeRangePicker` all say *Open calendar*, *Previous month* and *Next\n * month*, and all five name the parts of a segmented field with the same\n * words — the words are Reka UI's `useDateField` and `CalendarRoot` speaking,\n * one implementation underneath all five. Declared per component that would be\n * fifty-two keys with the same twelve strings written four times, and a\n * translator doing the same work four times to make one language complete.\n *\n * **Sliced by what a control actually says, not merged into one family bag.**\n * A `TimePicker` has no calendar and never renders a month or a year, so it\n * registers `timeSegments` alone: its documented vocabulary is four keys, and a\n * consumer importing only that control ships only those four strings. One\n * shared bag for the whole family would have made every one of the five carry\n * all twenty, and would have printed keys on `TimePicker`'s API page that it\n * has no element to put them on.\n *\n * What is deliberately *not* shared is the two range controls' half-group names\n * and status lines. They name the same concepts with different words (`Start\n * date` against `Start date and time`) and from different facts (a count of\n * whole days against a signed duration in minutes), so a shared key would have\n * to be a sentence that is never true of both. Their calendar cells' names are\n * shared, because those differ in neither.\n */\n\n/**\n * The names Reka UI's `useDateField` writes onto the day, month, year and era\n * segments — `\"day,\"`, `\"month, \"`, `\"year, \"`, `\"era\"`, each with the spacing\n * of a string it meant to concatenate.\n *\n * There is no prop for any of them. A binding on Loom's side reaches the\n * segment as a fallthrough attribute, which Vue merges onto the rendered vnode\n * *after* Reka's own render function produced it, and `mergeProps` is\n * last-write-wins for everything that is not `class`, `style` or `on*` — so\n * these replace Reka's rather than competing with it. Leave one unset and the\n * segment is not unnamed, it is named in English, which is the failure this\n * seam exists to close.\n *\n * Loom's defaults differ from Reka's by their capitalisation, which is what\n * lets a test assert *whose* string reached the DOM rather than merely what it\n * said.\n */\nexport interface DateSegmentLabels {\n /** The month segment of a date field. */\n readonly month: string;\n /** The day-of-month segment. */\n readonly day: string;\n /** The year segment. */\n readonly year: string;\n /**\n * The era segment, which most locales never render — `ja-JP-u-ca-japanese`\n * is the ordinary case that does.\n */\n readonly era: string;\n /**\n * What a segment with nothing in it yet reports as its value, replacing the\n * `aria-valuetext=\"Empty\"` Reka writes on an unfilled day, month or year.\n *\n * A segment shows the locale's own placeholder — `mm`, `jj`, `aaaa` — while\n * announcing this instead, so it is the one word standing between a fully\n * localised date field and a reader who is told \"Empty\" in English.\n *\n * Present on this slice *and* on `TimeSegmentLabels` rather than shared\n * between them, for the reason the slices exist at all: a `TimePicker`\n * registers no `dateSegments`, and a key it could only reach through the\n * date half would be a key it could not set.\n */\n readonly empty: string;\n /**\n * What a filled month segment announces as its value, replacing the\n * `aria-valuetext` Reka builds inside `useDateField`.\n *\n * Reka writes `\"5 - May\"` — the numeric month, a hard-coded `\" - \"`, and\n * the month name from `Intl.DateTimeFormat`. The name is locale-aware, but\n * the format is not: Japanese writes `\"5月\"`, Vietnamese `\"tháng 5\"`, and\n * neither separates the two parts with a hyphen. A `LabelOf` hands the\n * host the month number and the locale so they can compose the string their\n * language needs, using `Intl.DateTimeFormat` for the name and arranging the\n * parts in the right order.\n *\n * A `LabelOf` rather than a plain string, for the same reason\n * `RangeCellLabels.cell` is one: the month name depends on the locale, and\n * a string that did not receive the locale could not produce it. The host\n * decides the format — Loom's English default matches Reka's output so that\n * nothing changes for a consumer who does not override it.\n */\n readonly filledMonth: LabelOf<{ value: number; locale: string }>;\n}\n\n/**\n * Loom's English for the date segments, co-located so it tree-shakes with the\n * controls that use it, and exported so a host can build a partial vocabulary\n * against the real thing rather than a transcription of it.\n */\nexport const DATE_SEGMENT_LABELS: DateSegmentLabels = {\n month: \"Month\",\n day: \"Day\",\n year: \"Year\",\n era: \"Era\",\n // \"Not set\" rather than Reka's own \"Empty\", and the difference is load-bearing\n // in the same way the capitalisation of the names above is: it is what lets a\n // test assert whose string reached the DOM. It also reads better spoken — a\n // reader is being told this field has no value yet, not that it is blank.\n empty: \"Not set\",\n // Matches Reka's `\"5 - May\"` format for English. The month name comes from\n // `Intl.DateTimeFormat` via the cached `monthFormatters` map, which avoids\n // reconstructing the formatter on every render. A host overrides this to\n // change the format — Japanese `\"5月\"`, Vietnamese `\"tháng 5\"`, etc.\n filledMonth: ({ value, locale }) => {\n const name = monthName(locale, value);\n return `${String(value)} - ${name}`;\n },\n};\n\n/**\n * The same, for the clock half of a segmented field: Reka writes `\"hour, \"`,\n * `\"minute, \"`, `\"second, \"` and `\"AM/PM\"`, and offers a prop for none of them.\n *\n * `dayPeriod` is spelled `AM or PM` rather than `AM/PM` so that it reads as\n * words when it is spoken, and so the capitalisation trick above still works on\n * the one segment whose name Reka already capitalises.\n */\nexport interface TimeSegmentLabels {\n /** The hour segment. */\n readonly hour: string;\n /** The minute segment. */\n readonly minute: string;\n /** The seconds segment, which only a control at second granularity renders. */\n readonly second: string;\n /** The AM/PM segment, which only a 12-hour field renders. */\n readonly dayPeriod: string;\n /** What an hour, minute or second with nothing in it yet reports. See `DateSegmentLabels.empty`. */\n readonly empty: string;\n /**\n * What a filled day-period segment announces as its value, replacing the\n * `aria-valuetext` Reka writes inside `useDateField`.\n *\n * Reka writes `segmentValues.dayPeriod ?? \"AM\"` — always `\"AM\"` or `\"PM\"`,\n * produced by its own hour-cycle logic (`hour >= 12 ? \"PM\" : \"AM\"`) rather\n * than by `Intl.DateTimeFormat`. A host who has localised every other string\n * in the library still hears Latin-script \"AM\"/\"PM\" from this segment, which\n * is the defect this key exists to close.\n *\n * A `LabelOf` rather than a plain string, because the period name depends on\n * the locale: Arabic writes `\"ص\"`/`\"م\"`, Japanese `\"午前\"`/`\"午後\"`, and a\n * plain string could not carry that decision. Loom's English default returns\n * `dayPeriod` unchanged, which is correct for Latin-script locales.\n */\n readonly filledDayPeriod: LabelOf<{ dayPeriod: string }>;\n}\n\n/** Loom's English for the time segments. See `DATE_SEGMENT_LABELS`. */\nexport const TIME_SEGMENT_LABELS: TimeSegmentLabels = {\n hour: \"Hour\",\n minute: \"Minute\",\n second: \"Second\",\n dayPeriod: \"AM or PM\",\n empty: \"Not set\",\n // The identity function for English: Reka's `\"AM\"`/`\"PM\"` are correct for\n // Latin-script locales. A host localising to Arabic, Japanese, etc. overrides\n // this to return the locale's own period names.\n filledDayPeriod: ({ dayPeriod }) => dayPeriod,\n};\n\n/**\n * The parts each slice actually names — every key of its bag except `empty`,\n * which is a message *about* a segment rather than the name of one.\n *\n * Both the type and the set below are written out rather than derived from the\n * bags, which is what they were before `empty` joined them. Derived, the guards\n * would answer `true` for `\"empty\"` and narrow a part to a key that names no\n * element, and `segmentLabel` would happily return the empty message as a\n * segment's accessible name.\n */\nexport type DateSegmentName = Exclude<keyof DateSegmentLabels, \"empty\" | \"filledMonth\">;\nexport type TimeSegmentName = Exclude<keyof TimeSegmentLabels, \"empty\" | \"filledDayPeriod\">;\n\nconst DATE_SEGMENT_PARTS = new Set<DateSegmentName>([\"month\", \"day\", \"year\", \"era\"]);\nconst TIME_SEGMENT_PARTS = new Set<TimeSegmentName>([\"hour\", \"minute\", \"second\", \"dayPeriod\"]);\n\n/**\n * The six segments Reka reports as `aria-valuetext=\"Empty\"` when they hold\n * nothing — and, not by coincidence, the six that render as digits when they\n * hold something. `dayPeriod` and `era` are absent because Reka never writes\n * \"Empty\" on either: an unset `dayPeriod` reads `AM` and an unset `era` reads\n * the placeholder's own era, both of which are already the locale's words.\n */\nconst EMPTIABLE_SEGMENT_PARTS = new Set<string>([\n \"day\",\n \"month\",\n \"year\",\n \"hour\",\n \"minute\",\n \"second\",\n]);\n\n/**\n * The `aria-valuetext` override for one segment, as an object to `v-bind`\n * rather than a string to bind directly — and that is the whole point of it.\n *\n * Reka writes `aria-valuetext=\"Empty\"` on an unfilled segment and the number\n * on a filled one, and only the first is a hard-coded English literal: the\n * second is `${valueNow}`, and the month's `\"3 - March\"` takes its month name\n * from the field's own `locale`. So this replaces exactly the empty case and\n * leaves the rest alone. Binding `:aria-valuetext` directly could not do that\n * — Vue merges a fallthrough `undefined` over Reka's value and *removes* the\n * attribute, so a filled segment would lose the number it is there to read\n * out. An absent key merges as nothing at all, which is what `optional()`\n * exists for elsewhere and what returning `{}` does here.\n *\n * Emptiness is read off the digits in the segment's own displayed value, which\n * is sound in both directions for these six parts: every locale's placeholder\n * for them is letters (`mm`, `jj`, `aaaa`) and every value they can hold is\n * digits. The two parts where that would not hold are the two excluded above.\n */\nexport function emptySegmentValueText(\n part: string,\n value: string,\n empty: string,\n): { \"aria-valuetext\"?: string } {\n return EMPTIABLE_SEGMENT_PARTS.has(part) && !/\\d/.test(value) ? { \"aria-valuetext\": empty } : {};\n}\n\n/**\n * Whether a part named by Reka's `segments` slot is one this slice names.\n *\n * A guard rather than an index, because the slot also yields `literal` — the\n * slashes and colons between the segments, which Reka renders `aria-hidden`\n * and which must stay unnamed — and `timeZoneName`, which none of these five\n * controls can produce: their values parse through `parseDate`, `parseTime` and\n * `parseDateTime`, none of which yields a zoned value, and no prop on any of\n * them accepts a zone. Reka's `\"timezone, \"` is therefore unreachable from\n * here, and a key for it would be a key nothing could ever render.\n */\nexport function isDateSegmentPart(part: string): part is DateSegmentName {\n return DATE_SEGMENT_PARTS.has(part as DateSegmentName);\n}\n\n/** Whether a part named by Reka's `segments` slot belongs to the clock half. */\nexport function isTimeSegmentPart(part: string): part is TimeSegmentName {\n return TIME_SEGMENT_PARTS.has(part as TimeSegmentName);\n}\n\n/**\n * The one or both vocabularies a segmented field resolves its strings through,\n * as `useLabels` handed them to the control.\n *\n * A shape per control rather than one required parameter set, because this\n * serves three shapes of control at once: a date-only one resolves through\n * `date` alone, a time-only one through `time` alone, and the two datetime\n * controls through both. That spread is exactly why this pair lives here\n * rather than five times over — five hand-copied `segmentLabel`/\n * `segmentValueText` pairs had already drifted in their comments, and the only\n * step left was drifting in the emitted strings themselves, which are\n * assistive technology's entire view of these fields.\n */\nexport interface SegmentVocabularies {\n /** The date half's vocabulary, when the control renders date segments. */\n readonly date?: DateSegmentLabels | undefined;\n /** The clock half's vocabulary, when the control renders time segments. */\n readonly time?: TimeSegmentLabels | undefined;\n}\n\n/**\n * The accessible name of one segment, replacing the English name Reka writes\n * inside `useDateField`'s own render function — see `DATE_SEGMENT_LABELS`.\n *\n * The half that owns the part names it: a date part is answered by the date\n * vocabulary and a clock part by the time one, which is what lets a host\n * localising only `timeSegments` still reach the clock segments of a datetime\n * control. `undefined` for everything else — the `literal` separators, which\n * Reka renders `aria-hidden` and which must stay unnamed, and any part neither\n * vocabulary knows.\n */\nexport function segmentAriaLabel(\n vocabularies: SegmentVocabularies,\n part: string,\n): string | undefined {\n const { date, time } = vocabularies;\n if (date && isDateSegmentPart(part)) return date[part];\n return time && isTimeSegmentPart(part) ? time[part] : undefined;\n}\n\n/** What `segmentAriaValueText` resolves one segment's value announcement from. */\nexport interface SegmentAriaValueTextArgs extends SegmentVocabularies {\n /** The segment's part name, as Reka's `segments` slot yields it. */\n readonly part: string;\n /**\n * The segment's displayed value, whose emptiness decides whether the field's\n * own word replaces Reka's — read off digits by `emptySegmentValueText`.\n */\n readonly value: string;\n /**\n * The field's locale, composed into the filled month's value text. Every\n * other branch ignores it, but a control always has one to give.\n */\n readonly locale: string;\n /**\n * The numeric month of the model value the control parsed itself, and never\n * of `value`: the displayed text is locale-formatted and may carry no\n * parseable number, so the caller reads the month off what it parsed.\n * Absent while no full date is chosen, and unused by a time-only control.\n */\n readonly month?: number | undefined;\n}\n\n/**\n * The `aria-valuetext` override for one segment, as an object to `v-bind` —\n * the shape `emptySegmentValueText` returns and the reason is recorded there.\n *\n * This composes the branches the five segmented controls each used to carry by\n * hand, in the order they must apply: the empty case first, because it is the\n * only one replacing what Reka wrote; then the filled month, announced through\n * `filledMonth` so a host can compose `\"5 - May\"` the way their language\n * needs; then the filled day period through `filledDayPeriod`, for the same\n * reason. Anything else returns `{}`, which merges as nothing and leaves\n * Reka's own value text — a number — exactly as it wrote it.\n *\n * The empty message comes from whichever half owns the part, so a host\n * localising only `timeSegments` still reaches the clock segments of a\n * datetime control. The fallback to `\"\"` is unreachable for every real caller\n * — a control always resolves at least its own half — and exists to keep the\n * function total rather than to be exercised.\n */\nexport function segmentAriaValueText({\n date,\n time,\n part,\n value,\n locale,\n month,\n}: SegmentAriaValueTextArgs): { \"aria-valuetext\"?: string } {\n const owner = isTimeSegmentPart(part) ? (time ?? date) : (date ?? time);\n const empty = emptySegmentValueText(part, value, owner?.empty ?? \"\");\n if (empty[\"aria-valuetext\"]) return empty;\n if (date && part === \"month\" && month !== undefined) {\n return { \"aria-valuetext\": date.filledMonth({ value: month, locale }) };\n }\n if (time && part === \"dayPeriod\") {\n return { \"aria-valuetext\": time.filledDayPeriod({ dayPeriod: value }) };\n }\n return {};\n}\n\n/**\n * Everything the calendar popover says that is not a date: the panel's own\n * name, the button that opens it, and the two that page the months.\n *\n * `calendar` is Reka's `CalendarRoot`/`RangeCalendarRoot` `calendarLabel` prop,\n * whose default is the string `\"Event Date\"` — a name for somebody else's\n * application, published both as the grid container's `aria-label` and inside a\n * visually-hidden live region that a screen reader reads on every month change.\n * It is a documented prop rather than a hard-coded literal, so it is the one\n * name in this file that is set rather than overridden.\n *\n * `previousMonth` and `nextMonth` do replace literals: Reka writes\n * `\"Previous page\"` and `\"Next page\"` on those two buttons, which is both\n * English and wrong — what they move is a month.\n */\nexport interface CalendarPanelLabels {\n /** The calendar's own name, read before the month and year on entering it. */\n readonly calendar: string;\n /** The button in the field that opens the calendar popover. */\n readonly openCalendar: string;\n /** The button that pages the calendar back one month. */\n readonly previousMonth: string;\n /** The button that pages the calendar on one month. */\n readonly nextMonth: string;\n}\n\n/** Loom's English for the calendar popover. See `DATE_SEGMENT_LABELS`. */\nexport const CALENDAR_PANEL_LABELS: CalendarPanelLabels = {\n calendar: \"Calendar\",\n openCalendar: \"Open calendar\",\n previousMonth: \"Previous month\",\n nextMonth: \"Next month\",\n};\n\n/**\n * Which part of a chosen span one calendar cell plays, handed to the cell's\n * label rather than resolved into words by the control.\n *\n * Four sibling keys and a joiner would be four phrases a translator cannot\n * reorder around the date they qualify — and in several languages the qualifier\n * does not follow the date at all. One argument carrying the variant is what\n * keeps the whole cell name one sentence the host writes.\n */\nexport type RangeCellPart = \"start\" | \"end\" | \"both\" | \"within\";\n\n/**\n * The accessible name of one day in a range calendar, shared by both range\n * controls because they say it identically and from identical facts — a day\n * and its part in the span. `DateTimeRangePicker`'s cells carry no time: the\n * cell *is* a day, and choosing it moves only the day.\n *\n * The two controls' other strings are not shared, because they differ in words\n * and in facts. This one does neither, and a translator writing it twice would\n * be writing it twice for no reason.\n */\nexport interface RangeCellLabels {\n /**\n * One calendar cell's accessible name, which replaces the one Reka writes\n * rather than adding to it: a cell's part in the range has to arrive *with*\n * the date, and an element has no second slot for a name.\n *\n * `part` is `undefined` for a day with no part in the range at all.\n */\n readonly cell: LabelOf<{\n locale: string;\n date: DateValue;\n part: RangeCellPart | undefined;\n }>;\n}\n\n/**\n * Loom's English for a range calendar's cells. The three fills that carry the\n * first day, the last and the ones between are three shades of one colour,\n * which survives neither a colour deficiency nor forced-colors mode — naming\n * the part is what tells them apart, and it is what makes a one-day span say so\n * once rather than announce itself twice as two different things.\n */\nexport const RANGE_CELL_LABELS: RangeCellLabels = {\n cell: ({ locale, date, part }) => {\n const full = formatFullDay(locale, date);\n if (part === \"both\") return `${full}, the whole range, first and last day`;\n if (part === \"start\") return `${full}, first day of the range`;\n if (part === \"end\") return `${full}, last day of the range`;\n return part === \"within\" ? `${full}, within the range` : full;\n },\n};\n\n// One formatter per locale, kept, because a range calendar's cell label runs\n// forty-two to eighty-four times per render and `Intl.DateTimeFormat`'s\n// constructor is the expensive half of it. The map is bounded by the number of\n// locales an application actually renders, which is one in nearly every case.\nconst dayFormatters = new Map<string, Intl.DateTimeFormat>();\n\n// Same pattern, for the filled month segment's `aria-valuetext`. The default\n// `filledMonth` label calls this on every render, so caching the formatter\n// avoids the `Intl.DateTimeFormat` constructor cost each time.\nconst monthFormatters = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * A month name in the control's locale, for use in `aria-valuetext`.\n *\n * A building block of the defaults below, not public surface — it stays off\n * the package barrel, because a host wording an override formats however\n * their application already does. Exported from the module so its own tests\n * can pin it directly.\n */\nexport function monthName(locale: string, month: number): string {\n let formatter = monthFormatters.get(locale);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(locale, { month: \"long\" });\n monthFormatters.set(locale, formatter);\n }\n // `Date` months are 0-indexed; Loom months are 1-indexed (as in `DateValue.month`).\n return formatter.format(new Date(2026, month - 1, 1));\n}\n\n/**\n * A whole day written out — weekday, day, month and year — in the control's\n * locale, which is the half of a range cell's name that is not a qualifier,\n * and the whole of a standalone calendar cell's name: a surface with no field\n * echoing the value has its cells carry the full date themselves.\n *\n * Both range controls' English defaults need it and neither should own it;\n * the Calendar reaches it through this module for the same reason, so one\n * formatter cache serves every grid in the library. A host replacing those\n * defaults formats with whatever their own application already uses and never\n * calls this. Like `monthName`, it stays off the public facade.\n */\nexport function formatFullDay(locale: string, date: DateValue): string {\n let formatter = dayFormatters.get(locale);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(locale, {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n });\n dayFormatters.set(locale, formatter);\n }\n return formatter.format(date.toDate(getLocalTimeZone()));\n}\n"],"mappings":";;;;;;;AAsGA,IAAa,sBAAyC;CACpD,OAAO;CACP,KAAK;CACL,MAAM;CACN,KAAK;CAKL,OAAO;CAKP,cAAc,EAAE,OAAO,aAAa;EAClC,MAAM,OAAO,UAAU,QAAQ,KAAK;EACpC,OAAO,GAAG,OAAO,KAAK,EAAE,KAAK;CAC/B;AACF;;AAwCA,IAAa,sBAAyC;CACpD,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,OAAO;CAIP,kBAAkB,EAAE,gBAAgB;AACtC;AAeA,IAAM,qCAAqB,IAAI,IAAqB;CAAC;CAAS;CAAO;CAAQ;AAAK,CAAC;AACnF,IAAM,qCAAqB,IAAI,IAAqB;CAAC;CAAQ;CAAU;CAAU;AAAW,CAAC;;;;;;;;AAS7F,IAAM,0CAA0B,IAAI,IAAY;CAC9C;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,sBACd,MACA,OACA,OAC+B;CAC/B,OAAO,wBAAwB,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,kBAAkB,MAAM,IAAI,CAAC;AACjG;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,MA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AuB;CAC/D,IAAI,YAAY,gBAAgB,IAAI,MAAM;CAC1C,IAAI,CAAC,WAAW;EACd,YAAY,IAAI,KAAK,eAAe,QAAQ,EAAE,OAAO,OAAO,CAAC;EAC7D,gBAAgB,IAAI,QAAQ,SAAS;CACvC;CAEA,OAAO,UAAU,OAAO,IAAI,KAAK,MAAM,QAAQ,GAAG,CAAC,CAAC;AACtD;;;;;;;;;;;;;AAcA,SAAgB,cAAc,QAAgB,MAAyB;CACrE,IAAI,YAAY,cAAc,IAAI,MAAM;CACxC,IAAI,CAAC,WAAW;EACd,YAAY,IAAI,KAAK,eAAe,QAAQ;GAC1C,SAAS;GACT,KAAK;GACL,OAAO;GACP,MAAM;EACR,CAAC;EACD,cAAc,IAAI,QAAQ,SAAS;CACrC;CACA,OAAO,UAAU,OAAO,KAAK,OAAO,0CAAiB,CAAC,CAAC;AACzD"}
|
|
@@ -45,8 +45,8 @@ export interface FieldContext {
|
|
|
45
45
|
* and without a claim both inputs adopt the same generated id — a duplicate
|
|
46
46
|
* id, and a `<label for>` that resolves to whichever the browser reaches
|
|
47
47
|
* first. The `axe` gate cannot be the backstop: `duplicate-id-active` is
|
|
48
|
-
* tagged `wcag2a-obsolete`/`deprecated` in axe-core, not `wcag2a`, so it
|
|
49
|
-
*
|
|
48
|
+
* tagged `wcag2a-obsolete`/`deprecated` in axe-core, not `wcag2a`, so it is
|
|
49
|
+
* in neither runtime list and `e2e/accessibility.e2e.ts` never runs it.
|
|
50
50
|
*
|
|
51
51
|
* Reactive rather than a plain boolean because the claim can move: a `v-if`
|
|
52
52
|
* swapping the first control for the second must promote the second, or the
|