@ecoma-io/loom 0.3.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 +73 -6
- 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/app-header/src/AppHeader.js.map +1 -1
- package/dist/packages/blocks/app-header/src/AppHeader.vue.d.ts.map +1 -1
- package/dist/packages/blocks/app-header/src/AppHeader.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/packages/blocks/app-header/src/AppHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/blocks/desktop-app-shell/src/DesktopAppShell.vue.d.ts +3 -3
- 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/blocks/metric-card/src/MetricCard.js.map +1 -1
- package/dist/packages/blocks/metric-card/src/MetricCard.vue.d.ts +22 -4
- package/dist/packages/blocks/metric-card/src/MetricCard.vue.d.ts.map +1 -1
- package/dist/packages/blocks/metric-card/src/MetricCard.vue_vue_type_script_setup_true_lang.js +38 -15
- package/dist/packages/blocks/metric-card/src/MetricCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/blocks/title-bar/src/TitleBar.vue.d.ts +3 -3
- package/dist/packages/blocks/toast-stack/src/ToastStack.vue.d.ts +3 -3
- package/dist/packages/composition/scroll-reel/src/ScrollReel.js +2 -2
- package/dist/packages/composition/scroll-reel/src/ScrollReel.js.map +1 -1
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue.d.ts +26 -0
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js +28 -7
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/composition/scroll-reel/src/index.d.ts +2 -1
- package/dist/packages/composition/scroll-reel/src/index.js +2 -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 +2 -2
- package/dist/packages/core/src/index.d.ts.map +1 -1
- package/dist/packages/core/src/index.js +3 -3
- package/dist/packages/core/src/motion.d.ts +13 -0
- package/dist/packages/core/src/motion.d.ts.map +1 -1
- package/dist/packages/core/src/motion.js +20 -13
- package/dist/packages/core/src/motion.js.map +1 -1
- package/dist/packages/core/src/theme.d.ts +9 -0
- package/dist/packages/core/src/theme.d.ts.map +1 -1
- package/dist/packages/core/src/theme.js +36 -10
- package/dist/packages/core/src/theme.js.map +1 -1
- package/dist/packages/labels/src/ancestor-disabled.d.ts +5 -1
- package/dist/packages/labels/src/ancestor-disabled.d.ts.map +1 -1
- package/dist/packages/labels/src/ancestor-disabled.js +5 -1
- package/dist/packages/labels/src/ancestor-disabled.js.map +1 -1
- package/dist/packages/labels/src/component-shapes.d.ts +236 -1
- package/dist/packages/labels/src/component-shapes.d.ts.map +1 -1
- package/dist/packages/labels/src/date-labels.d.ts +86 -7
- package/dist/packages/labels/src/date-labels.d.ts.map +1 -1
- package/dist/packages/labels/src/date-labels.js +58 -9
- 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 +15 -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/reading/src/Reading.js.map +1 -1
- package/dist/packages/layouts/reading/src/Reading.vue.d.ts +16 -15
- package/dist/packages/layouts/reading/src/Reading.vue.d.ts.map +1 -1
- package/dist/packages/layouts/reading/src/Reading.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/reading/src/index.d.ts +1 -0
- package/dist/packages/layouts/reading/src/index.d.ts.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 +217 -174
- package/dist/packages/loom/src/theme.d.ts +3 -0
- package/dist/packages/primitives/alert/src/Alert.js +7 -0
- package/dist/packages/primitives/alert/src/Alert.js.map +1 -0
- package/dist/packages/primitives/alert/src/Alert.vue.d.ts +91 -0
- package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/alert/src/index.d.ts +4 -0
- package/dist/packages/primitives/alert/src/index.js +3 -0
- package/dist/packages/primitives/alert-dialog/src/AlertDialog.js.map +1 -1
- package/dist/packages/primitives/alert-dialog/src/AlertDialog.vue.d.ts +2 -2
- package/dist/packages/primitives/alert-dialog/src/AlertDialog.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/packages/primitives/alert-dialog/src/AlertDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/alert-dialog/src/index.d.ts +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/avatar-group/src/AvatarGroup.vue.d.ts +3 -3
- package/dist/packages/primitives/avatar-group/src/index.d.ts +1 -1
- package/dist/packages/primitives/badge/src/Badge.js.map +1 -1
- package/dist/packages/primitives/badge/src/Badge.vue.d.ts.map +1 -1
- package/dist/packages/primitives/badge/src/Badge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/badge/src/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/breadcrumb/src/Breadcrumb.js +2 -2
- package/dist/packages/primitives/breadcrumb/src/Breadcrumb.js.map +1 -1
- package/dist/packages/primitives/breadcrumb/src/Breadcrumb.vue.d.ts +28 -0
- package/dist/packages/primitives/breadcrumb/src/Breadcrumb.vue_vue_type_script_setup_true_lang.js +16 -5
- package/dist/packages/primitives/breadcrumb/src/Breadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/breadcrumb/src/index.d.ts +2 -1
- package/dist/packages/primitives/breadcrumb/src/index.js +2 -1
- package/dist/packages/primitives/button/src/Button.js.map +1 -1
- package/dist/packages/primitives/button/src/Button.vue.d.ts.map +1 -1
- package/dist/packages/primitives/button/src/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/button/src/index.js +2 -2
- 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/card/src/Card.js +7 -0
- package/dist/packages/primitives/card/src/Card.js.map +1 -0
- package/dist/packages/primitives/card/src/Card.vue.d.ts +72 -0
- package/dist/packages/primitives/card/src/Card.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/packages/primitives/card/src/Card.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/card/src/index.d.ts +3 -0
- package/dist/packages/primitives/card/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/card/src/index.js +2 -0
- package/dist/packages/primitives/carousel/src/Carousel.js +7 -0
- package/dist/packages/primitives/carousel/src/Carousel.js.map +1 -0
- package/dist/packages/primitives/carousel/src/Carousel.vue.d.ts +34 -0
- package/dist/packages/primitives/carousel/src/Carousel.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/packages/primitives/carousel/src/Carousel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/carousel/src/index.d.ts +3 -0
- package/dist/packages/primitives/carousel/src/index.js +3 -0
- package/dist/packages/primitives/checkbox/src/Checkbox.js.map +1 -1
- package/dist/packages/primitives/checkbox/src/Checkbox.vue.d.ts +1 -1
- package/dist/packages/primitives/checkbox/src/Checkbox.vue.d.ts.map +1 -1
- package/dist/packages/primitives/checkbox/src/Checkbox.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/packages/primitives/checkbox/src/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/chip/src/Chip.js.map +1 -1
- package/dist/packages/primitives/chip/src/Chip.vue.d.ts.map +1 -1
- package/dist/packages/primitives/chip/src/Chip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/chip/src/Chip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/collapse/src/Collapse.js +7 -0
- package/dist/packages/primitives/collapse/src/Collapse.js.map +1 -0
- package/dist/packages/primitives/collapse/src/Collapse.vue.d.ts +56 -0
- package/dist/packages/primitives/collapse/src/Collapse.vue.d.ts.map +1 -0
- package/dist/packages/primitives/collapse/src/Collapse.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/packages/primitives/collapse/src/Collapse.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/collapse/src/index.d.ts +2 -0
- package/dist/packages/primitives/collapse/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/collapse/src/index.js +2 -0
- package/dist/packages/primitives/color-picker/src/ColorPicker.js.map +1 -1
- package/dist/packages/primitives/color-picker/src/ColorPicker.vue.d.ts +4 -4
- package/dist/packages/primitives/color-picker/src/ColorPicker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/packages/primitives/color-picker/src/ColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/color-picker/src/index.d.ts +1 -1
- package/dist/packages/primitives/combobox/src/Combobox.js.map +1 -1
- package/dist/packages/primitives/combobox/src/Combobox.vue.d.ts +3 -3
- package/dist/packages/primitives/combobox/src/Combobox.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/packages/primitives/combobox/src/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/combobox/src/index.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/context-menu/src/ContextMenu.js.map +1 -1
- package/dist/packages/primitives/context-menu/src/ContextMenu.vue.d.ts +12 -0
- package/dist/packages/primitives/context-menu/src/ContextMenu.vue.d.ts.map +1 -1
- package/dist/packages/primitives/context-menu/src/ContextMenu.vue_vue_type_script_setup_true_lang.js +7 -3
- package/dist/packages/primitives/context-menu/src/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- 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.d.ts +2 -2
- package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js +14 -14
- 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.d.ts +3 -3
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js +22 -19
- 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-range-picker/src/index.d.ts +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.d.ts +2 -2
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js +18 -17
- 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.d.ts +3 -3
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +18 -17
- 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/date-time-range-picker/src/index.d.ts +1 -1
- package/dist/packages/primitives/dialog/src/Dialog.js.map +1 -1
- package/dist/packages/primitives/dialog/src/Dialog.vue.d.ts +27 -11
- package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js +6 -4
- package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/dialog/src/index.d.ts +1 -1
- package/dist/packages/primitives/drawer/src/Drawer.js.map +1 -1
- package/dist/packages/primitives/drawer/src/Drawer.vue.d.ts +12 -4
- package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js +13 -5
- package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/drawer/src/index.d.ts +1 -1
- package/dist/packages/primitives/dropdown-menu/src/DropdownMenu.js.map +1 -1
- package/dist/packages/primitives/dropdown-menu/src/DropdownMenu.vue.d.ts +26 -0
- package/dist/packages/primitives/dropdown-menu/src/DropdownMenu.vue.d.ts.map +1 -1
- package/dist/packages/primitives/dropdown-menu/src/DropdownMenu.vue_vue_type_script_setup_true_lang.js +10 -4
- package/dist/packages/primitives/dropdown-menu/src/DropdownMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/editable/src/Editable.js.map +1 -1
- package/dist/packages/primitives/editable/src/Editable.vue.d.ts +2 -2
- package/dist/packages/primitives/editable/src/Editable.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/editable/src/Editable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/editable/src/index.d.ts +1 -1
- package/dist/packages/primitives/file-upload/src/FileUpload.js.map +1 -1
- package/dist/packages/primitives/file-upload/src/FileUpload.vue.d.ts +2 -2
- package/dist/packages/primitives/file-upload/src/FileUpload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/file-upload/src/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/file-upload/src/index.d.ts +1 -1
- package/dist/packages/primitives/hover-card/src/HoverCard.js.map +1 -1
- package/dist/packages/primitives/hover-card/src/HoverCard.vue.d.ts.map +1 -1
- package/dist/packages/primitives/hover-card/src/HoverCard.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/hover-card/src/HoverCard.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/icon-button/src/IconButton.js.map +1 -1
- package/dist/packages/primitives/icon-button/src/IconButton.vue.d.ts +10 -4
- package/dist/packages/primitives/icon-button/src/IconButton.vue.d.ts.map +1 -1
- package/dist/packages/primitives/icon-button/src/IconButton.vue_vue_type_script_setup_true_lang.js +18 -6
- package/dist/packages/primitives/icon-button/src/IconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/indicator/src/Indicator.vue.d.ts +2 -2
- package/dist/packages/primitives/indicator/src/index.d.ts +1 -1
- package/dist/packages/primitives/kbd/src/Kbd.js +7 -0
- package/dist/packages/primitives/kbd/src/Kbd.js.map +1 -0
- package/dist/packages/primitives/kbd/src/Kbd.vue.d.ts +30 -0
- package/dist/packages/primitives/kbd/src/Kbd.vue.d.ts.map +1 -0
- package/dist/packages/primitives/kbd/src/Kbd.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/packages/primitives/kbd/src/Kbd.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/kbd/src/index.d.ts +3 -0
- package/dist/packages/primitives/kbd/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/kbd/src/index.js +3 -0
- package/dist/packages/primitives/link/src/Link.js.map +1 -1
- package/dist/packages/primitives/link/src/Link.vue.d.ts.map +1 -1
- package/dist/packages/primitives/link/src/Link.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/packages/primitives/link/src/Link.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/list/src/List.js +7 -0
- package/dist/packages/primitives/list/src/List.js.map +1 -0
- package/dist/packages/primitives/list/src/List.vue.d.ts +22 -0
- package/dist/packages/primitives/list/src/List.vue.d.ts.map +1 -0
- package/dist/packages/primitives/list/src/List.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/packages/primitives/list/src/List.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/list/src/ListItem.js +7 -0
- package/dist/packages/primitives/list/src/ListItem.js.map +1 -0
- package/dist/packages/primitives/list/src/ListItem.vue.d.ts +75 -0
- package/dist/packages/primitives/list/src/ListItem.vue.d.ts.map +1 -0
- package/dist/packages/primitives/list/src/ListItem.vue_vue_type_script_setup_true_lang.js +101 -0
- package/dist/packages/primitives/list/src/ListItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/list/src/index.d.ts +4 -0
- package/dist/packages/primitives/list/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/list/src/index.js +3 -0
- 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 +20 -6
- 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 +211 -64
- 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/number-field/src/NumberField.js.map +1 -1
- package/dist/packages/primitives/number-field/src/NumberField.vue.d.ts +2 -2
- package/dist/packages/primitives/number-field/src/NumberField.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/packages/primitives/number-field/src/NumberField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/number-field/src/index.d.ts +1 -1
- package/dist/packages/primitives/otp-input/src/OtpInput.vue.d.ts +2 -2
- package/dist/packages/primitives/otp-input/src/index.d.ts +1 -1
- package/dist/packages/primitives/pagination/src/Pagination.js.map +1 -1
- package/dist/packages/primitives/pagination/src/Pagination.vue.d.ts +3 -3
- package/dist/packages/primitives/pagination/src/Pagination.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/pagination/src/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/pagination/src/index.d.ts +1 -1
- package/dist/packages/primitives/popover/src/Popover.js.map +1 -1
- package/dist/packages/primitives/popover/src/Popover.vue.d.ts.map +1 -1
- package/dist/packages/primitives/popover/src/Popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/popover/src/Popover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/progress/src/Progress.vue.d.ts +2 -2
- package/dist/packages/primitives/progress/src/index.d.ts +1 -1
- package/dist/packages/primitives/radial-progress/src/RadialProgress.vue.d.ts +2 -2
- package/dist/packages/primitives/radial-progress/src/index.d.ts +1 -1
- package/dist/packages/primitives/radio-group/src/RadioGroup.js.map +1 -1
- package/dist/packages/primitives/radio-group/src/RadioGroup.vue.d.ts.map +1 -1
- package/dist/packages/primitives/radio-group/src/RadioGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/radio-group/src/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/rating/src/Rating.vue.d.ts +2 -2
- package/dist/packages/primitives/rating/src/index.d.ts +1 -1
- 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 +2 -3
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/select/src/Select.js.map +1 -1
- package/dist/packages/primitives/select/src/Select.vue.d.ts.map +1 -1
- package/dist/packages/primitives/select/src/Select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/select/src/Select.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/slider/src/Slider.js.map +1 -1
- package/dist/packages/primitives/slider/src/Slider.vue.d.ts +6 -3
- package/dist/packages/primitives/slider/src/Slider.vue.d.ts.map +1 -1
- package/dist/packages/primitives/slider/src/Slider.vue_vue_type_script_setup_true_lang.js +15 -10
- package/dist/packages/primitives/slider/src/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/stepper/src/Stepper.js.map +1 -1
- package/dist/packages/primitives/stepper/src/Stepper.vue.d.ts +2 -2
- 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/stepper/src/index.d.ts +1 -1
- package/dist/packages/primitives/switch/src/Switch.js.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue.d.ts +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 +3 -3
- package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/table/src/Table.js +7 -0
- package/dist/packages/primitives/table/src/Table.js.map +1 -0
- package/dist/packages/primitives/table/src/Table.vue.d.ts +45 -0
- package/dist/packages/primitives/table/src/Table.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/packages/primitives/table/src/Table.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/table/src/TableCell.js +7 -0
- package/dist/packages/primitives/table/src/TableCell.js.map +1 -0
- package/dist/packages/primitives/table/src/TableCell.vue.d.ts +19 -0
- package/dist/packages/primitives/table/src/TableCell.vue.d.ts.map +1 -0
- package/dist/packages/primitives/table/src/TableCell.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/packages/primitives/table/src/TableCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/table/src/TableHead.js +7 -0
- package/dist/packages/primitives/table/src/TableHead.js.map +1 -0
- package/dist/packages/primitives/table/src/TableHead.vue.d.ts +56 -0
- package/dist/packages/primitives/table/src/TableHead.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/packages/primitives/table/src/TableHead.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/table/src/TableRow.js +7 -0
- package/dist/packages/primitives/table/src/TableRow.js.map +1 -0
- package/dist/packages/primitives/table/src/TableRow.vue.d.ts +39 -0
- package/dist/packages/primitives/table/src/TableRow.vue.d.ts.map +1 -0
- package/dist/packages/primitives/table/src/TableRow.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/packages/primitives/table/src/TableRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/table/src/index.d.ts +10 -0
- package/dist/packages/primitives/table/src/index.js +8 -0
- package/dist/packages/primitives/tabs/src/Tabs.js.map +1 -1
- package/dist/packages/primitives/tabs/src/Tabs.vue.d.ts.map +1 -1
- package/dist/packages/primitives/tabs/src/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/tabs/src/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/tags-input/src/TagsInput.js.map +1 -1
- package/dist/packages/primitives/tags-input/src/TagsInput.vue.d.ts +2 -2
- package/dist/packages/primitives/tags-input/src/TagsInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/tags-input/src/TagsInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/tags-input/src/index.d.ts +1 -1
- package/dist/packages/primitives/text-field/src/TextField.js.map +1 -1
- package/dist/packages/primitives/text-field/src/TextField.vue.d.ts +2 -2
- package/dist/packages/primitives/text-field/src/TextField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/text-field/src/TextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/text-field/src/index.d.ts +1 -1
- package/dist/packages/primitives/text-field/src/index.js +2 -2
- package/dist/packages/primitives/textarea/src/Textarea.js.map +1 -1
- package/dist/packages/primitives/textarea/src/Textarea.vue.d.ts +2 -2
- package/dist/packages/primitives/textarea/src/Textarea.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/textarea/src/Textarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/textarea/src/index.d.ts +1 -1
- package/dist/packages/primitives/textarea/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.d.ts +2 -2
- 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/timeline/src/Timeline.js +7 -0
- package/dist/packages/primitives/timeline/src/Timeline.js.map +1 -0
- package/dist/packages/primitives/timeline/src/Timeline.vue.d.ts +37 -0
- package/dist/packages/primitives/timeline/src/Timeline.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/packages/primitives/timeline/src/Timeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/timeline/src/TimelineItem.js +7 -0
- package/dist/packages/primitives/timeline/src/TimelineItem.js.map +1 -0
- package/dist/packages/primitives/timeline/src/TimelineItem.vue.d.ts +50 -0
- package/dist/packages/primitives/timeline/src/TimelineItem.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/packages/primitives/timeline/src/TimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/timeline/src/index.d.ts +5 -0
- package/dist/packages/primitives/timeline/src/index.js +5 -0
- package/dist/packages/primitives/toast/src/Toast.vue.d.ts +2 -2
- package/dist/packages/primitives/toast/src/ToastItem.js.map +1 -1
- package/dist/packages/primitives/toast/src/ToastItem.vue.d.ts +2 -2
- package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/toast/src/index.d.ts +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/tooltip/src/Tooltip.js.map +1 -1
- package/dist/packages/primitives/tooltip/src/Tooltip.vue.d.ts.map +1 -1
- package/dist/packages/primitives/tooltip/src/Tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/tooltip/src/Tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- 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/dist/packages/primitives/window-controls/src/WindowControls.vue.d.ts +2 -2
- package/dist/packages/primitives/window-controls/src/index.d.ts +1 -1
- package/dist/styles/global.css +59 -0
- package/dist/styles/theme.css +13 -0
- package/dist/theme.js +3 -0
- package/package.json +37 -30
- package/dist/packages/blocks/desktop-app-shell/src/DesktopAppShell.vue.d.ts.map +0 -1
- package/dist/packages/blocks/title-bar/src/TitleBar.vue.d.ts.map +0 -1
- package/dist/packages/blocks/toast-stack/src/ToastStack.vue.d.ts.map +0 -1
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue.d.ts.map +0 -1
- package/dist/packages/composition/scroll-reel/src/index.d.ts.map +0 -1
- package/dist/packages/loom/src/a11y.d.ts.map +0 -1
- package/dist/packages/loom/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/alert-dialog/src/AlertDialog.vue.d.ts.map +0 -1
- package/dist/packages/primitives/alert-dialog/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/avatar-group/src/AvatarGroup.vue.d.ts.map +0 -1
- package/dist/packages/primitives/avatar-group/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/breadcrumb/src/Breadcrumb.vue.d.ts.map +0 -1
- package/dist/packages/primitives/breadcrumb/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/color-picker/src/ColorPicker.vue.d.ts.map +0 -1
- package/dist/packages/primitives/color-picker/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/combobox/src/Combobox.vue.d.ts.map +0 -1
- package/dist/packages/primitives/combobox/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/date-picker/src/DatePicker.vue.d.ts.map +0 -1
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue.d.ts.map +0 -1
- package/dist/packages/primitives/date-range-picker/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue.d.ts.map +0 -1
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue.d.ts.map +0 -1
- package/dist/packages/primitives/date-time-range-picker/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/dialog/src/Dialog.vue.d.ts.map +0 -1
- package/dist/packages/primitives/dialog/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/drawer/src/Drawer.vue.d.ts.map +0 -1
- package/dist/packages/primitives/drawer/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/editable/src/Editable.vue.d.ts.map +0 -1
- package/dist/packages/primitives/editable/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/file-upload/src/FileUpload.vue.d.ts.map +0 -1
- package/dist/packages/primitives/file-upload/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/indicator/src/Indicator.vue.d.ts.map +0 -1
- package/dist/packages/primitives/indicator/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/number-field/src/NumberField.vue.d.ts.map +0 -1
- package/dist/packages/primitives/number-field/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/otp-input/src/OtpInput.vue.d.ts.map +0 -1
- package/dist/packages/primitives/otp-input/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/pagination/src/Pagination.vue.d.ts.map +0 -1
- package/dist/packages/primitives/pagination/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/progress/src/Progress.vue.d.ts.map +0 -1
- package/dist/packages/primitives/progress/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/radial-progress/src/RadialProgress.vue.d.ts.map +0 -1
- package/dist/packages/primitives/radial-progress/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/rating/src/Rating.vue.d.ts.map +0 -1
- package/dist/packages/primitives/rating/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/stepper/src/Stepper.vue.d.ts.map +0 -1
- package/dist/packages/primitives/stepper/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/tags-input/src/TagsInput.vue.d.ts.map +0 -1
- package/dist/packages/primitives/tags-input/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/text-field/src/TextField.vue.d.ts.map +0 -1
- package/dist/packages/primitives/text-field/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/textarea/src/Textarea.vue.d.ts.map +0 -1
- package/dist/packages/primitives/textarea/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/time-picker/src/TimePicker.vue.d.ts.map +0 -1
- package/dist/packages/primitives/toast/src/Toast.vue.d.ts.map +0 -1
- package/dist/packages/primitives/toast/src/ToastItem.vue.d.ts.map +0 -1
- package/dist/packages/primitives/toast/src/index.d.ts.map +0 -1
- package/dist/packages/primitives/window-controls/src/WindowControls.vue.d.ts.map +0 -1
- package/dist/packages/primitives/window-controls/src/index.d.ts.map +0 -1
- package/dist/styles/theme.contrast.test.ts +0 -460
package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,8 +3,8 @@ import { optional } from "../../../core/src/props.js";
|
|
|
3
3
|
import { useSplitAttrs } from "../../../core/src/attrs.js";
|
|
4
4
|
import "../../../core/src/index.js";
|
|
5
5
|
import { useLabels } from "../../../labels/src/labels.js";
|
|
6
|
-
import { parseTime as $58246871e4652552$export$c9698ec7f05a07e1 } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.
|
|
7
|
-
import { TIME_SEGMENT_LABELS,
|
|
6
|
+
import { parseTime as $58246871e4652552$export$c9698ec7f05a07e1 } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.4/node_modules/@internationalized/date/dist/private/string.js";
|
|
7
|
+
import { TIME_SEGMENT_LABELS, segmentAriaLabel, segmentAriaValueText } from "../../../labels/src/date-labels.js";
|
|
8
8
|
import { useFieldControl } from "../../../labels/src/field-context.js";
|
|
9
9
|
import { useAncestorDisabled } from "../../../labels/src/ancestor-disabled.js";
|
|
10
10
|
import "../../../labels/src/index.js";
|
|
@@ -45,13 +45,15 @@ var TimePicker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
45
45
|
const emit = __emit;
|
|
46
46
|
const text = useLabels("timeSegments", TIME_SEGMENT_LABELS, () => props.labels);
|
|
47
47
|
function segmentLabel(part) {
|
|
48
|
-
return
|
|
48
|
+
return segmentAriaLabel({ time: text.value }, part);
|
|
49
49
|
}
|
|
50
50
|
function segmentValueText(part, value) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
return segmentAriaValueText({
|
|
52
|
+
time: text.value,
|
|
53
|
+
part,
|
|
54
|
+
value,
|
|
55
|
+
locale: props.locale
|
|
56
|
+
});
|
|
55
57
|
}
|
|
56
58
|
const { attrs, rest: fieldAttrs } = useSplitAttrs();
|
|
57
59
|
/**
|
|
@@ -76,7 +78,7 @@ var TimePicker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
76
78
|
invalid: props.invalid,
|
|
77
79
|
required: props.required
|
|
78
80
|
}));
|
|
79
|
-
const groupLabelledBy = computed(() => attrs["aria-label"]
|
|
81
|
+
const groupLabelledBy = computed(() => attrs["aria-label"] ? void 0 : field.labelledBy);
|
|
80
82
|
function fromClock(value) {
|
|
81
83
|
if (!value) return void 0;
|
|
82
84
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/primitives/time-picker/src/TimePicker.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { TimeSegmentLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * Everything this control publishes to assistive technology: the four names\n * Reka UI would otherwise give the segments in English of its own accord.\n * There is nothing else — the icon is decoration and hidden, and the field\n * group takes its name from the caller or from a wrapping Field.\n *\n * An alias for the shared slice rather than a fifth interface. The same four\n * names are said by `DateTimePicker` and `DateTimeRangePicker`, they come from\n * one Reka implementation, and `src/lib/date-labels.ts` carries why they are\n * declared once. The alias exists so this control's `labels` prop reads like\n * every other one's; annotate with `LabelOverrides<TimePickerLabels>` rather\n * than with this, which is total.\n */\nexport type TimePickerLabels = TimeSegmentLabels;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useTemplateRef } from \"vue\";\nimport { TimeFieldInput, TimeFieldRoot, type TimeValue } from \"reka-ui\";\nimport { Clock } from \"@lucide/vue\";\nimport { parseTime } from \"@internationalized/date\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { useSplitAttrs } from \"@ecoma-io/loom-core\";\nimport { useAncestorDisabled } from \"@ecoma-io/loom-labels\";\nimport { useFieldControl } from \"@ecoma-io/loom-labels\";\nimport { optional } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\nimport {\n TIME_SEGMENT_LABELS,\n emptySegmentValueText,\n isTimeSegmentPart,\n} from \"@ecoma-io/loom-labels\";\n\n/**\n * TimePicker — a time of day, typed into a segmented field. Reach for it\n * wherever a clock time is a value: a meeting start, a reminder, opening hours.\n *\n * **There is no clock face and no dropdown, deliberately.** A clock dial is\n * slower than typing for every reader who can type, and unusable for several\n * who cannot; a 96-row list of quarter hours is worse again. The segmented\n * field already is the control — arrow keys change the segment under the\n * cursor, digits fill it and advance — so a panel would only be a second, worse\n * path to the same value. That is the one place this diverges from DatePicker,\n * where the calendar earns its panel by answering \"which Tuesday?\", a question\n * a time never has.\n *\n * **The model value is a plain `\"HH:mm\"` string in 24-hour time**, or\n * `\"HH:mm:ss\"` when `granularity` asks for seconds — the same boundary\n * DatePicker draws for `\"YYYY-MM-DD\"`, and drawn here for the same reason: a\n * host has a string from its API and should not have to learn a date library to\n * bind a time. `hourCycle` moves the *display* to 12-hour and never the value,\n * because conflating the two is how a 12-hour locale ends up storing `\"01:30\"`\n * for half past one in the afternoon.\n *\n * **A time is not a date.** There is no timezone here, no offset, and no `Date`\n * anywhere near the public surface: `\"09:00\"` is nine in the morning wherever\n * it is read, and the moment that turns into is the host's question, not this\n * component's. Pair it with a DatePicker when an instant is what is wanted.\n *\n * Unlike DatePicker there are no `min`/`max` bounds. A time of day has no\n * ordering that survives midnight — a night shift is \"not before 22:00\" *and*\n * \"not after 02:00\", two bounds that cross rather than fence — so a min/max\n * pair would quietly call 01:00 out of range for the exact case it was reached\n * for. A window like that belongs to the host, which knows which day each end\n * is on.\n *\n * Inside a [Field](../Field/Field.vue) it wires itself through\n * `useFieldControl()` — the row's id, the id of its hint or error line, and\n * `required` / `invalid` / `disabled` / `readonly` / `name` — so `<Field\n * label=\"Starts at\" error=\"…\"><TimePicker /></Field>` needs no attributes at the\n * call site. Every prop below still wins over the row when it is set, in both\n * directions, which is why the four booleans default to `undefined` rather than\n * `false`. `readonly` and `disabled` are different states, so the field rests in\n * three appearances rather than two: read-only is a time on show — still a Tab\n * stop, still submitted, a lifted fill with the segments at full strength —\n * where disabled is unavailable and drained a step further, in fill, text\n * colour and border weight together.\n */\nconst props = withDefaults(\n defineProps<{\n /**\n * The chosen time as `\"HH:mm\"`, or `\"HH:mm:ss\"` at second granularity, in\n * 24-hour time whatever the field displays. Unset, empty or unparseable\n * means no time is chosen. The explicit `| undefined` is what lets\n * `v-model` bind a ref that clears — the emitted value drops to `undefined`\n * when the field is emptied, and a plain optional prop refuses to take it\n * back.\n */\n modelValue?: string | undefined;\n /**\n * Whether the field reads as 12-hour with an AM/PM segment or as 24-hour.\n * Display only: the value stays 24-hour either way. Unset follows `locale`,\n * which is what a reader of that locale expects to see.\n */\n hourCycle?: 12 | 24;\n /** How far down the field goes. `\"hour\"` and `\"minute\"` report `\"HH:mm\"`; `\"second\"` adds a seconds segment and reports `\"HH:mm:ss\"`. */\n granularity?: \"hour\" | \"minute\" | \"second\";\n /** BCP 47 tag driving the order of the segments, the separator between them, and the 12-or-24-hour default. */\n locale?: string;\n /** Unavailable: dims the control and takes the field out of the tab order. Unset defers to a wrapping Field. */\n disabled?: boolean | undefined;\n /** Shows the time without allowing an edit: the field stays a Tab stop, stays submitted, and is filled rather than dimmed. Unset defers to a wrapping Field. */\n readonly?: boolean | undefined;\n /** Error state: paints the destructive border and ring, and sets `aria-invalid`. Unset defers to a wrapping Field's `error`. */\n invalid?: boolean | undefined;\n /** Marks the field mandatory to assistive tech (`aria-required` on the segment group). Unset defers to a wrapping Field. */\n required?: boolean | undefined;\n /** The field name for a native form post or `FormData`, carried on the hidden input Reka submits the time through. Unset defers to a wrapping Field. */\n name?: string;\n /**\n * Names for the four segments, as any subset of `TimePickerLabels` — the\n * rest stay as the host's `provideLoomLabels` vocabulary left them, and then\n * as Loom's English.\n *\n * Every one of them replaces a literal Reka writes itself, so this is not\n * decoration: leave the vocabulary unset and the segments are named in\n * English rather than named not at all.\n */\n labels?: LabelOverrides<TimePickerLabels>;\n }>(),\n {\n granularity: \"minute\",\n locale: \"en\",\n // Not `false`, for any of the four — TextField.vue carries the full\n // reasoning: `false` is a caller's decision that must beat the row, absent\n // is a caller saying nothing, and only `undefined` survives to mean that\n // past Vue's absent-Boolean-casts-to-false rule.\n disabled: undefined,\n readonly: undefined,\n invalid: undefined,\n required: undefined,\n },\n);\n\nconst emit = defineEmits<{\n /** The chosen time as `\"HH:mm\"` (or `\"HH:mm:ss\"`), or `undefined` once the field has been cleared. */\n \"update:modelValue\": [value: string | undefined];\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"timeSegments\", TIME_SEGMENT_LABELS, () => props.labels);\n\n// Read through the ref on every call rather than resolved into a lookup table\n// once: a table built in `setup` freezes the first language and every later\n// switch silently does nothing. `undefined` for the `literal` separators, which\n// Reka renders `aria-hidden` and which must stay unnamed.\nfunction segmentLabel(part: string): string | undefined {\n return isTimeSegmentPart(part) ? text.value[part] : undefined;\n}\n\n// The companion to `segmentLabel`, and the reason it returns an object rather\n// than a string is in `emptySegmentValueText`: Reka's `aria-valuetext` is a\n// hard-coded \"Empty\" only while the segment holds nothing, so this replaces\n// that case and leaves the filled one — a number — exactly as Reka wrote it.\n//\n// The dayPeriod is the exception. Reka writes `\"AM\"` or `\"PM\"` from its own\n// hour-cycle logic, not from `Intl.DateTimeFormat`, so a localised field\n// still announces the period in English. `filledDayPeriod` lets a host replace\n// those with the locale's own period names (Arabic `\"ص\"`/`\"م\"`, Japanese\n// `\"午前\"`/`\"午後\"`).\nfunction segmentValueText(part: string, value: string): { \"aria-valuetext\"?: string } {\n const empty = emptySegmentValueText(part, value, text.value.empty);\n if (empty[\"aria-valuetext\"]) return empty;\n if (part === \"dayPeriod\") {\n return { \"aria-valuetext\": text.value.filledDayPeriod({ dayPeriod: value }) };\n }\n return {};\n}\n\n// One rendered node, so both halves of the fallthrough land on it — the split\n// exists only because `class` needs the Tailwind-aware merge and Vue's own\n// fallthrough would concatenate a caller's `h-11` after our `h-9` instead of\n// replacing it. That node is Reka's `role=\"group\"`, which is also where\n// `aria-label` belongs: a screen reader announces a group's name once on\n// entering it, rather than once per segment.\n//\n// It is also why `invalid` is announced with `aria-invalid` and nothing else.\n// DatePicker moves its `data-invalid` marker onto the anchor because the field\n// group already spells that attribute with Reka's own meaning; here there is no\n// second element to move it to, and an attribute Reka binds itself wins outright\n// — its template merges `$attrs` first and its own bindings after, so a\n// `data-invalid` passed in from out here is overwritten by Reka's own\n// `undefined` before it reaches the DOM. Setting it would look like it worked\n// and silently do nothing.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest: fieldAttrs } = useSplitAttrs();\n\n/**\n * The time segments are `<div role=\"spinbutton\" tabindex=\"0\">`, and\n * `<fieldset disabled>` reaches only `<input>`, `<button>`, `<select>` and\n * `<textarea>` — so Reka's hidden input went inert inside a disabled group\n * while the segments a reader actually uses still typed. Measured in jsdom: an\n * empty hour segment became `12` on an arrow key.\n *\n * Read off the DOM rather than taken from the Field context, which publishes no\n * `disabled` on purpose — see `../../lib/ancestor-disabled.ts`.\n */\nconst root = useTemplateRef<{ $el?: Element }>(\"root\");\nconst groupDisabled = useAncestorDisabled(() => root.value?.$el);\n\n// `id` and `aria-describedby` reach this control as fallthrough attrs rather\n// than props, so they are handed in as this caller's own values: a caller who\n// sets either still beats the row, and the row's description is merged into\n// theirs rather than replacing it. `field.attrs` then spreads onto\n// `TimeFieldRoot` **after** `fieldAttrs`, which is the node both were already\n// landing on.\n//\n// **Where each key ends up was checked rather than assumed**, given what the\n// note above says about attributes this node overwrites. The set Reka spells\n// itself is `role`, `aria-disabled`, `data-disabled`, `data-readonly`,\n// `data-invalid` and `dir`, and `field.attrs` spells none of them:\n// `aria-describedby`, `aria-required` and `aria-invalid` are undeclared and land\n// on the `role=\"group\"` as intended, while `id` and `name` are declared props\n// and land on the visually-hidden `<input>` the field submits through — which is\n// the element a `<label for>` can actually name, a `role=\"group\"` div not being\n// labelable.\n//\n// The `:aria-invalid` binding that used to sit on the root is gone with it: an\n// individual attribute written after a `v-bind` wins, so keeping one would\n// overwrite the resolved value with the raw prop.\nconst field = useFieldControl(() => ({\n id: attrs.id as string | undefined,\n describedBy: attrs[\"aria-describedby\"] as string | undefined,\n ariaLabelledby: attrs[\"aria-labelledby\"] as string | undefined,\n name: props.name,\n // The fieldset beats the prop in both directions, exactly as it does for the\n // native input Reka renders inside this very control.\n disabled: groupDisabled.value ? true : props.disabled,\n readonly: props.readonly,\n invalid: props.invalid,\n required: props.required,\n}));\n\n// `aria-labelledby` for the group, resolved against the row — DatePicker's\n// reasoning, and the same three-way guard.\nconst groupLabelledBy = computed(() =>\n attrs[\"aria-label\"] || attrs[\"aria-labelledby\"] ? undefined : field.labelledBy,\n);\n\nfunction fromClock(value: string | undefined): TimeValue | undefined {\n if (!value) return undefined;\n try {\n return parseTime(value);\n } catch {\n // Same contract as DatePicker: a half-typed or wrongly-shaped value is read\n // as no time chosen. A component library cannot decide that a host's bad\n // data is fatal.\n return undefined;\n }\n}\n\nfunction pad(value: number): string {\n return String(value).padStart(2, \"0\");\n}\n\n// Written out rather than taken from `Time.toString()`, which always prints\n// seconds and appends a fractional part when the value carries one — so a\n// minute-granularity field would report `\"09:30:00\"`, and a value the host\n// parsed from `\"09:30:00.5\"` would round-trip a half second the field never\n// showed. The string that comes back is the string the segments are showing.\nfunction toClock(time: TimeValue): string {\n const hhmm = `${pad(time.hour)}:${pad(time.minute)}`;\n return props.granularity === \"second\" ? `${hhmm}:${pad(time.second)}` : hhmm;\n}\n\n// `optional()` rather than plain bindings: Reka reads an explicit `undefined`\n// `modelValue` as a value the host owns and is holding empty, which turns an\n// uncontrolled field into a permanently empty one, and an `hourCycle` of\n// `undefined` is how it is told to follow the locale. Dropping the keys says\n// what is true.\nconst rootValue = computed(() =>\n optional({ modelValue: fromClock(props.modelValue), hourCycle: props.hourCycle }),\n);\n\nfunction onTimeChange(time: TimeValue | undefined) {\n emit(\"update:modelValue\", time ? toClock(time) : undefined);\n}\n\n// The field is one Tab stop, not four. The reasoning, and the reason Reka's own\n// ArrowLeft/ArrowRight handling survives it untouched, is written out in\n// DatePicker — it moves focus with `focus()` directly, which ignores tabindex.\n// It matters more here: a 12-hour field with seconds is four segments, so\n// leaving Reka's default in place costs a keyboard reader four Tab presses to\n// cross one control.\nconst focusedPart = ref<string>();\n\nfunction segmentTabIndex(part: string, segments: readonly { part: string }[]): number | undefined {\n // Read-only keeps every stop it had, unlike disabled: the time is on show and\n // a reader still arrows across the segments to read it.\n if (field.disabled || part === \"literal\") return undefined;\n const editable = segments.filter((segment) => segment.part !== \"literal\");\n // The remembered segment is dropped when a granularity or locale change takes\n // it away — a field whose only tab stop is a seconds segment that no longer\n // exists is a field nothing can reach.\n const active =\n focusedPart.value !== undefined &&\n editable.some((segment) => segment.part === focusedPart.value)\n ? focusedPart.value\n : editable[0]?.part;\n return part === active ? 0 : -1;\n}\n\n// Reka reads `hourCycle` once, when it builds its formatter, and seeds its\n// segment values from the granularity in the same breath — neither is watched.\n// Observed: a field showing 13:30 that is moved to a 12-hour cycle relabels\n// itself \"1:30 AM\", half a day wrong, because the AM/PM segment appears with\n// its initial value and nothing recomputes it from the hour. Widening the\n// granularity on an empty field is the same fault with a different symptom: the\n// new seconds segment arrives with no entry to read, so it renders without a\n// role at all.\n//\n// Both are structural changes — they add and remove segments — so keying the\n// field on them rebuilds it rather than patching a half-migrated one. `locale`\n// is deliberately not in the key: Reka does watch that, and rebuilding on it\n// would throw away focus mid-edit for a change it handles correctly.\nconst shape = computed(() => `${props.granularity}-${props.hourCycle}`);\n\n/**\n * Reka's hour segment publishes `aria-valuenow` and `aria-valuetext` straight\n * off the internal 24-hour value while publishing `aria-valuemin`/`max` as\n * 1–12, so half past one in the afternoon announces itself as \"13 PM\", out of\n * its own declared range. The displayed hour is the one the reader is being\n * asked about, so the announcement is rebuilt from what the segment actually\n * shows. Only under an explicit 12-hour cycle: left to the locale, Reka defers\n * to the formatter and the pair is already consistent.\n */\nfunction hourAnnouncement(\n segments: readonly { part: string; value: string }[],\n): Record<string, string | number> | undefined {\n if (props.hourCycle !== 12) return undefined;\n const shown = Number(segments.find((segment) => segment.part === \"hour\")?.value);\n const period = segments.find((segment) => segment.part === \"dayPeriod\")?.value;\n // An unfilled hour reads as its placeholder rather than a number, and there is\n // no number to announce for it. The empty case is not left to Reka's English\n // \"Empty\" either — `segmentValueText` binds the vocabulary's word for it on\n // the same element, and the two never collide: this returns a value only for\n // a filled hour and that one only for an empty segment.\n if (!Number.isInteger(shown) || period === undefined) return undefined;\n return { \"aria-valuenow\": shown, \"aria-valuetext\": `${shown} ${period}` };\n}\n</script>\n\n<template>\n <TimeFieldRoot\n ref=\"root\"\n :key=\"shape\"\n v-slot=\"{ segments }\"\n v-bind=\"{ ...rootValue, ...fieldAttrs, ...field.attrs }\"\n :aria-labelledby=\"groupLabelledBy\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :disabled=\"field.disabled\"\n :readonly=\"field.readonly\"\n :class=\"\n cn(\n // The text input's own height scale, so a time sitting in a form row\n // beside a text field lines up rather than nearly lining up. No gap:\n // the colon between two segments is itself a segment, so spacing them\n // apart writes the time as `09 : 30`.\n 'flex h-9 w-full items-center rounded-md border border-input bg-background px-3 text-sm text-foreground',\n 'transition-[color,background-color,border-color,box-shadow] duration-fast ease-out',\n // The box carries the ring and the focused segment below carries a fill\n // instead of a second outline, exactly as DatePicker's field does — a\n // ring drawn inside a ring reads as a rendering fault.\n 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring',\n !field.invalid && 'focus-within:shadow-halo',\n // Three resting appearances, and each is painted on this group rather\n // than on the segments inside it: a per-segment fill leaves the colon\n // between them on `background`, and the time comes out striped.\n //\n // Read-only lifts to `subtle` and keeps its focus ring and its\n // full-strength segments — 13.46:1 over that fill — because a read-only\n // time is a value on show, not an unavailable control. The rim stays\n // `input`: the field is still a Tab stop and still submitted. Reka's own\n // `data-readonly` on this node carries the same state to assistive tech,\n // so nothing here rests on colour.\n field.readonly && 'bg-subtle',\n // Drained rather than faded, for the reason DatePicker and\n // DateTimePicker both write out — this control was the one member of\n // the family the sweep still caught. `opacity-50` took the segments\n // down with the box: measured on the built site, the hour and the\n // period read 3.08:1 and the colon between them 2.07:1, and those\n // segments *are* the value. The fill drains one step past read-only,\n // the muted text over it is 4.68:1, and the rim slackens from `input`\n // to `border` — three channels, so the two states do not part on hue\n // alone. Set on the group because no segment declares a resting colour\n // of its own, so each inherits this one.\n field.disabled && 'cursor-not-allowed border-border bg-muted text-muted-foreground',\n // Last of the rules that name a border colour: `cn()` resolves one by\n // whichever class it saw last, so a field both in error and unavailable\n // would otherwise lose its destructive rim to the disabled one.\n field.invalid && 'border-destructive focus-within:outline-destructive',\n attrs.class as string,\n )\n \"\n @update:model-value=\"onTimeChange\"\n >\n <!-- Leading, where DatePicker's calendar button is trailing: that trailing\n slot is a button in every other member of this family, and a glyph\n sitting in it that opens nothing would promise a panel this control\n does not have. Decoration, so it is hidden from the accessibility\n tree — the group's own name says what the field is. -->\n <Clock aria-hidden=\"true\" class=\"mr-2 h-4 w-4 shrink-0 text-muted-foreground\" />\n\n <!-- The `:aria-label` replaces the one Reka writes in English inside its\n own render function. It reaches the DOM node as a fallthrough\n attribute, which Vue merges last, so it is a replacement rather than a\n second name. Removing it does not fall back to nothing; it falls back\n to Reka's English. -->\n <TimeFieldInput\n v-for=\"(item, index) in segments\"\n :key=\"index\"\n :part=\"item.part\"\n :tabindex=\"segmentTabIndex(item.part, segments)\"\n :aria-label=\"segmentLabel(item.part)\"\n v-bind=\"{\n ...segmentValueText(item.part, item.value),\n ...(item.part === 'hour' ? hourAnnouncement(segments) : undefined),\n }\"\n :class=\"\n cn(\n 'tabular rounded-sm px-0.5 outline-none',\n 'transition-colors duration-instant ease-out',\n 'focus:bg-primary-muted focus:text-primary-text',\n 'data-[placeholder]:text-muted-foreground',\n item.part === 'literal' && 'text-muted-foreground',\n )\n \"\n @focusin=\"focusedPart = item.part\"\n >\n {{ item.value }}\n </TimeFieldInput>\n </TimeFieldRoot>\n</template>\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"TimePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/primitives/time-picker/src/TimePicker.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { TimeSegmentLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * Everything this control publishes to assistive technology: the four names\n * Reka UI would otherwise give the segments in English of its own accord.\n * There is nothing else — the icon is decoration and hidden, and the field\n * group takes its name from the caller or from a wrapping Field.\n *\n * An alias for the shared slice rather than a fifth interface. The same four\n * names are said by `DateTimePicker` and `DateTimeRangePicker`, they come from\n * one Reka implementation, and `src/lib/date-labels.ts` carries why they are\n * declared once. The alias exists so this control's `labels` prop reads like\n * every other one's; annotate with `LabelOverrides<TimePickerLabels>` rather\n * than with this, which is total.\n */\nexport type TimePickerLabels = TimeSegmentLabels;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useTemplateRef } from \"vue\";\nimport { TimeFieldInput, TimeFieldRoot, type TimeValue } from \"reka-ui\";\nimport { Clock } from \"@lucide/vue\";\nimport { parseTime } from \"@internationalized/date\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { useSplitAttrs } from \"@ecoma-io/loom-core\";\nimport { useAncestorDisabled } from \"@ecoma-io/loom-labels\";\nimport { useFieldControl } from \"@ecoma-io/loom-labels\";\nimport { optional } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\nimport { TIME_SEGMENT_LABELS, segmentAriaLabel, segmentAriaValueText } from \"@ecoma-io/loom-labels\";\n\n/**\n * TimePicker — a time of day, typed into a segmented field. Reach for it\n * wherever a clock time is a value: a meeting start, a reminder, opening hours.\n *\n * **There is no clock face and no dropdown, deliberately.** A clock dial is\n * slower than typing for every reader who can type, and unusable for several\n * who cannot; a 96-row list of quarter hours is worse again. The segmented\n * field already is the control — arrow keys change the segment under the\n * cursor, digits fill it and advance — so a panel would only be a second, worse\n * path to the same value. That is the one place this diverges from DatePicker,\n * where the calendar earns its panel by answering \"which Tuesday?\", a question\n * a time never has.\n *\n * **The model value is a plain `\"HH:mm\"` string in 24-hour time**, or\n * `\"HH:mm:ss\"` when `granularity` asks for seconds — the same boundary\n * DatePicker draws for `\"YYYY-MM-DD\"`, and drawn here for the same reason: a\n * host has a string from its API and should not have to learn a date library to\n * bind a time. `hourCycle` moves the *display* to 12-hour and never the value,\n * because conflating the two is how a 12-hour locale ends up storing `\"01:30\"`\n * for half past one in the afternoon.\n *\n * **A time is not a date.** There is no timezone here, no offset, and no `Date`\n * anywhere near the public surface: `\"09:00\"` is nine in the morning wherever\n * it is read, and the moment that turns into is the host's question, not this\n * component's. Pair it with a DatePicker when an instant is what is wanted.\n *\n * Unlike DatePicker there are no `min`/`max` bounds. A time of day has no\n * ordering that survives midnight — a night shift is \"not before 22:00\" *and*\n * \"not after 02:00\", two bounds that cross rather than fence — so a min/max\n * pair would quietly call 01:00 out of range for the exact case it was reached\n * for. A window like that belongs to the host, which knows which day each end\n * is on.\n *\n * Inside a [Field](../Field/Field.vue) it wires itself through\n * `useFieldControl()` — the row's id, the id of its hint or error line, and\n * `required` / `invalid` / `disabled` / `readonly` / `name` — so `<Field\n * label=\"Starts at\" error=\"…\"><TimePicker /></Field>` needs no attributes at the\n * call site. Every prop below still wins over the row when it is set, in both\n * directions, which is why the four booleans default to `undefined` rather than\n * `false`. `readonly` and `disabled` are different states, so the field rests in\n * three appearances rather than two: read-only is a time on show — still a Tab\n * stop, still submitted, a lifted fill with the segments at full strength —\n * where disabled is unavailable and drained a step further, in fill, text\n * colour and border weight together.\n */\nconst props = withDefaults(\n defineProps<{\n /**\n * The chosen time as `\"HH:mm\"`, or `\"HH:mm:ss\"` at second granularity, in\n * 24-hour time whatever the field displays. Unset, empty or unparseable\n * means no time is chosen. The explicit `| undefined` is what lets\n * `v-model` bind a ref that clears — the emitted value drops to `undefined`\n * when the field is emptied, and a plain optional prop refuses to take it\n * back.\n */\n modelValue?: string | undefined;\n /**\n * Whether the field reads as 12-hour with an AM/PM segment or as 24-hour.\n * Display only: the value stays 24-hour either way. Unset follows `locale`,\n * which is what a reader of that locale expects to see.\n */\n hourCycle?: 12 | 24;\n /** How far down the field goes. `\"hour\"` and `\"minute\"` report `\"HH:mm\"`; `\"second\"` adds a seconds segment and reports `\"HH:mm:ss\"`. */\n granularity?: \"hour\" | \"minute\" | \"second\";\n /** BCP 47 tag driving the order of the segments, the separator between them, and the 12-or-24-hour default. */\n locale?: string;\n /** Unavailable: dims the control and takes the field out of the tab order. Unset defers to a wrapping Field. */\n disabled?: boolean | undefined;\n /** Shows the time without allowing an edit: the field stays a Tab stop, stays submitted, and is filled rather than dimmed. Unset defers to a wrapping Field. */\n readonly?: boolean | undefined;\n /** Error state: paints the destructive border and ring, and sets `aria-invalid`. Unset defers to a wrapping Field's `error`. */\n invalid?: boolean | undefined;\n /** Marks the field mandatory to assistive tech (`aria-required` on the segment group). Unset defers to a wrapping Field. */\n required?: boolean | undefined;\n /** The field name for a native form post or `FormData`, carried on the hidden input Reka submits the time through. Unset defers to a wrapping Field. */\n name?: string;\n /**\n * Names for the four segments, as any subset of `TimePickerLabels` — the\n * rest stay as the host's `provideLoomLabels` vocabulary left them, and then\n * as Loom's English.\n *\n * Every one of them replaces a literal Reka writes itself, so this is not\n * decoration: leave the vocabulary unset and the segments are named in\n * English rather than named not at all.\n */\n labels?: LabelOverrides<TimePickerLabels>;\n }>(),\n {\n granularity: \"minute\",\n locale: \"en\",\n // Not `false`, for any of the four — TextField.vue carries the full\n // reasoning: `false` is a caller's decision that must beat the row, absent\n // is a caller saying nothing, and only `undefined` survives to mean that\n // past Vue's absent-Boolean-casts-to-false rule.\n disabled: undefined,\n readonly: undefined,\n invalid: undefined,\n required: undefined,\n },\n);\n\nconst emit = defineEmits<{\n /** The chosen time as `\"HH:mm\"` (or `\"HH:mm:ss\"`), or `undefined` once the field has been cleared. */\n \"update:modelValue\": [value: string | undefined];\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"timeSegments\", TIME_SEGMENT_LABELS, () => props.labels);\n\n// Read through the ref on every call rather than resolved into a lookup table\n// once: a table built in `setup` freezes the first language and every later\n// switch silently does nothing. The resolution rules themselves are the shared\n// helpers' — five hand-copied pairs of these two functions drifted once\n// already, so the branches live in `@ecoma-io/loom-labels` now and only the\n// refs stay here. `undefined` for the `literal` separators, which Reka renders\n// `aria-hidden` and which must stay unnamed.\nfunction segmentLabel(part: string): string | undefined {\n return segmentAriaLabel({ time: text.value }, part);\n}\n\nfunction segmentValueText(part: string, value: string): { \"aria-valuetext\"?: string } {\n return segmentAriaValueText({ time: text.value, part, value, locale: props.locale });\n}\n\n// One rendered node, so both halves of the fallthrough land on it — the split\n// exists only because `class` needs the Tailwind-aware merge and Vue's own\n// fallthrough would concatenate a caller's `h-11` after our `h-9` instead of\n// replacing it. That node is Reka's `role=\"group\"`, which is also where\n// `aria-label` belongs: a screen reader announces a group's name once on\n// entering it, rather than once per segment.\n//\n// It is also why `invalid` is announced with `aria-invalid` and nothing else.\n// DatePicker moves its `data-invalid` marker onto the anchor because the field\n// group already spells that attribute with Reka's own meaning; here there is no\n// second element to move it to, and an attribute Reka binds itself wins outright\n// — its template merges `$attrs` first and its own bindings after, so a\n// `data-invalid` passed in from out here is overwritten by Reka's own\n// `undefined` before it reaches the DOM. Setting it would look like it worked\n// and silently do nothing.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest: fieldAttrs } = useSplitAttrs();\n\n/**\n * The time segments are `<div role=\"spinbutton\" tabindex=\"0\">`, and\n * `<fieldset disabled>` reaches only `<input>`, `<button>`, `<select>` and\n * `<textarea>` — so Reka's hidden input went inert inside a disabled group\n * while the segments a reader actually uses still typed. Measured in jsdom: an\n * empty hour segment became `12` on an arrow key.\n *\n * Read off the DOM rather than taken from the Field context, which publishes no\n * `disabled` on purpose — see `../../lib/ancestor-disabled.ts`.\n */\nconst root = useTemplateRef<{ $el?: Element }>(\"root\");\nconst groupDisabled = useAncestorDisabled(() => root.value?.$el);\n\n// `id` and `aria-describedby` reach this control as fallthrough attrs rather\n// than props, so they are handed in as this caller's own values: a caller who\n// sets either still beats the row, and the row's description is merged into\n// theirs rather than replacing it. `field.attrs` then spreads onto\n// `TimeFieldRoot` **after** `fieldAttrs`, which is the node both were already\n// landing on.\n//\n// **Where each key ends up was checked rather than assumed**, given what the\n// note above says about attributes this node overwrites. The set Reka spells\n// itself is `role`, `aria-disabled`, `data-disabled`, `data-readonly`,\n// `data-invalid` and `dir`, and `field.attrs` spells none of them:\n// `aria-describedby`, `aria-required` and `aria-invalid` are undeclared and land\n// on the `role=\"group\"` as intended, while `id` and `name` are declared props\n// and land on the visually-hidden `<input>` the field submits through — which is\n// the element a `<label for>` can actually name, a `role=\"group\"` div not being\n// labelable.\n//\n// The `:aria-invalid` binding that used to sit on the root is gone with it: an\n// individual attribute written after a `v-bind` wins, so keeping one would\n// overwrite the resolved value with the raw prop.\nconst field = useFieldControl(() => ({\n id: attrs.id as string | undefined,\n describedBy: attrs[\"aria-describedby\"] as string | undefined,\n ariaLabelledby: attrs[\"aria-labelledby\"] as string | undefined,\n name: props.name,\n // The fieldset beats the prop in both directions, exactly as it does for the\n // native input Reka renders inside this very control.\n disabled: groupDisabled.value ? true : props.disabled,\n readonly: props.readonly,\n invalid: props.invalid,\n required: props.required,\n}));\n\n// `aria-labelledby` for the group, resolved against the row — DatePicker's\n// reasoning, minus the old third arm of the guard: a caller's own labelledby\n// has to survive here, because the binding below beats the spread and an\n// `undefined` would strip it instead of deferring to it.\nconst groupLabelledBy = computed(() => (attrs[\"aria-label\"] ? undefined : field.labelledBy));\n\nfunction fromClock(value: string | undefined): TimeValue | undefined {\n if (!value) return undefined;\n try {\n return parseTime(value);\n } catch {\n // Same contract as DatePicker: a half-typed or wrongly-shaped value is read\n // as no time chosen. A component library cannot decide that a host's bad\n // data is fatal.\n return undefined;\n }\n}\n\nfunction pad(value: number): string {\n return String(value).padStart(2, \"0\");\n}\n\n// Written out rather than taken from `Time.toString()`, which always prints\n// seconds and appends a fractional part when the value carries one — so a\n// minute-granularity field would report `\"09:30:00\"`, and a value the host\n// parsed from `\"09:30:00.5\"` would round-trip a half second the field never\n// showed. The string that comes back is the string the segments are showing.\nfunction toClock(time: TimeValue): string {\n const hhmm = `${pad(time.hour)}:${pad(time.minute)}`;\n return props.granularity === \"second\" ? `${hhmm}:${pad(time.second)}` : hhmm;\n}\n\n// `optional()` rather than plain bindings: Reka reads an explicit `undefined`\n// `modelValue` as a value the host owns and is holding empty, which turns an\n// uncontrolled field into a permanently empty one, and an `hourCycle` of\n// `undefined` is how it is told to follow the locale. Dropping the keys says\n// what is true.\nconst rootValue = computed(() =>\n optional({ modelValue: fromClock(props.modelValue), hourCycle: props.hourCycle }),\n);\n\nfunction onTimeChange(time: TimeValue | undefined) {\n emit(\"update:modelValue\", time ? toClock(time) : undefined);\n}\n\n// The field is one Tab stop, not four. The reasoning, and the reason Reka's own\n// ArrowLeft/ArrowRight handling survives it untouched, is written out in\n// DatePicker — it moves focus with `focus()` directly, which ignores tabindex.\n// It matters more here: a 12-hour field with seconds is four segments, so\n// leaving Reka's default in place costs a keyboard reader four Tab presses to\n// cross one control.\nconst focusedPart = ref<string>();\n\nfunction segmentTabIndex(part: string, segments: readonly { part: string }[]): number | undefined {\n // Read-only keeps every stop it had, unlike disabled: the time is on show and\n // a reader still arrows across the segments to read it.\n if (field.disabled || part === \"literal\") return undefined;\n const editable = segments.filter((segment) => segment.part !== \"literal\");\n // The remembered segment is dropped when a granularity or locale change takes\n // it away — a field whose only tab stop is a seconds segment that no longer\n // exists is a field nothing can reach.\n const active =\n focusedPart.value !== undefined &&\n editable.some((segment) => segment.part === focusedPart.value)\n ? focusedPart.value\n : editable[0]?.part;\n return part === active ? 0 : -1;\n}\n\n// Reka reads `hourCycle` once, when it builds its formatter, and seeds its\n// segment values from the granularity in the same breath — neither is watched.\n// Observed: a field showing 13:30 that is moved to a 12-hour cycle relabels\n// itself \"1:30 AM\", half a day wrong, because the AM/PM segment appears with\n// its initial value and nothing recomputes it from the hour. Widening the\n// granularity on an empty field is the same fault with a different symptom: the\n// new seconds segment arrives with no entry to read, so it renders without a\n// role at all.\n//\n// Both are structural changes — they add and remove segments — so keying the\n// field on them rebuilds it rather than patching a half-migrated one. `locale`\n// is deliberately not in the key: Reka does watch that, and rebuilding on it\n// would throw away focus mid-edit for a change it handles correctly.\nconst shape = computed(() => `${props.granularity}-${props.hourCycle}`);\n\n/**\n * Reka's hour segment publishes `aria-valuenow` and `aria-valuetext` straight\n * off the internal 24-hour value while publishing `aria-valuemin`/`max` as\n * 1–12, so half past one in the afternoon announces itself as \"13 PM\", out of\n * its own declared range. The displayed hour is the one the reader is being\n * asked about, so the announcement is rebuilt from what the segment actually\n * shows. Only under an explicit 12-hour cycle: left to the locale, Reka defers\n * to the formatter and the pair is already consistent.\n */\nfunction hourAnnouncement(\n segments: readonly { part: string; value: string }[],\n): Record<string, string | number> | undefined {\n if (props.hourCycle !== 12) return undefined;\n const shown = Number(segments.find((segment) => segment.part === \"hour\")?.value);\n const period = segments.find((segment) => segment.part === \"dayPeriod\")?.value;\n // An unfilled hour reads as its placeholder rather than a number, and there is\n // no number to announce for it. The empty case is not left to Reka's English\n // \"Empty\" either — `segmentValueText` binds the vocabulary's word for it on\n // the same element, and the two never collide: this returns a value only for\n // a filled hour and that one only for an empty segment.\n if (!Number.isInteger(shown) || period === undefined) return undefined;\n return { \"aria-valuenow\": shown, \"aria-valuetext\": `${shown} ${period}` };\n}\n</script>\n\n<template>\n <TimeFieldRoot\n ref=\"root\"\n :key=\"shape\"\n v-slot=\"{ segments }\"\n v-bind=\"{ ...rootValue, ...fieldAttrs, ...field.attrs }\"\n :aria-labelledby=\"groupLabelledBy\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :disabled=\"field.disabled\"\n :readonly=\"field.readonly\"\n :class=\"\n cn(\n // The text input's own height scale, so a time sitting in a form row\n // beside a text field lines up rather than nearly lining up. No gap:\n // the colon between two segments is itself a segment, so spacing them\n // apart writes the time as `09 : 30`.\n 'flex h-9 w-full items-center rounded-md border border-input bg-background px-3 text-sm text-foreground',\n 'transition-[color,background-color,border-color,box-shadow] duration-fast ease-out',\n // The box carries the ring and the focused segment below carries a fill\n // instead of a second outline, exactly as DatePicker's field does — a\n // ring drawn inside a ring reads as a rendering fault.\n 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring',\n !field.invalid && 'focus-within:shadow-halo',\n // Three resting appearances, and each is painted on this group rather\n // than on the segments inside it: a per-segment fill leaves the colon\n // between them on `background`, and the time comes out striped.\n //\n // Read-only lifts to `subtle` and keeps its focus ring and its\n // full-strength segments — 13.46:1 over that fill — because a read-only\n // time is a value on show, not an unavailable control. The rim stays\n // `input`: the field is still a Tab stop and still submitted. Reka's own\n // `data-readonly` on this node carries the same state to assistive tech,\n // so nothing here rests on colour.\n field.readonly && 'bg-subtle',\n // Drained rather than faded, for the reason DatePicker and\n // DateTimePicker both write out — this control was the one member of\n // the family the sweep still caught. `opacity-50` took the segments\n // down with the box: measured on the built site, the hour and the\n // period read 3.08:1 and the colon between them 2.07:1, and those\n // segments *are* the value. The fill drains one step past read-only,\n // the muted text over it is 4.68:1, and the rim slackens from `input`\n // to `border` — three channels, so the two states do not part on hue\n // alone. Set on the group because no segment declares a resting colour\n // of its own, so each inherits this one.\n field.disabled && 'cursor-not-allowed border-border bg-muted text-muted-foreground',\n // Last of the rules that name a border colour: `cn()` resolves one by\n // whichever class it saw last, so a field both in error and unavailable\n // would otherwise lose its destructive rim to the disabled one.\n field.invalid && 'border-destructive focus-within:outline-destructive',\n attrs.class as string,\n )\n \"\n @update:model-value=\"onTimeChange\"\n >\n <!-- Leading, where DatePicker's calendar button is trailing: that trailing\n slot is a button in every other member of this family, and a glyph\n sitting in it that opens nothing would promise a panel this control\n does not have. Decoration, so it is hidden from the accessibility\n tree — the group's own name says what the field is. -->\n <Clock aria-hidden=\"true\" class=\"mr-2 h-4 w-4 shrink-0 text-muted-foreground\" />\n\n <!-- The `:aria-label` replaces the one Reka writes in English inside its\n own render function. It reaches the DOM node as a fallthrough\n attribute, which Vue merges last, so it is a replacement rather than a\n second name. Removing it does not fall back to nothing; it falls back\n to Reka's English. -->\n <TimeFieldInput\n v-for=\"(item, index) in segments\"\n :key=\"index\"\n :part=\"item.part\"\n :tabindex=\"segmentTabIndex(item.part, segments)\"\n :aria-label=\"segmentLabel(item.part)\"\n v-bind=\"{\n ...segmentValueText(item.part, item.value),\n ...(item.part === 'hour' ? hourAnnouncement(segments) : undefined),\n }\"\n :class=\"\n cn(\n 'tabular rounded-sm px-0.5 outline-none',\n 'transition-colors duration-instant ease-out',\n 'focus:bg-primary-muted focus:text-primary-text',\n 'data-[placeholder]:text-muted-foreground',\n item.part === 'literal' && 'text-muted-foreground',\n )\n \"\n @focusin=\"focusedPart = item.part\"\n >\n {{ item.value }}\n </TimeFieldInput>\n </TimeFieldRoot>\n</template>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Timeline_vue_vue_type_script_setup_true_lang_default, { TIMELINE_LABELS } from "./Timeline.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region packages/primitives/timeline/src/Timeline.vue
|
|
3
|
+
var Timeline_default = Timeline_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TIMELINE_LABELS, Timeline_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=Timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.js","names":[],"sources":["../../../../../packages/primitives/timeline/src/Timeline.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { TimelineLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * Timeline — a chronological spine: markers down a line, each carrying a\n * moment (title, description, timestamp) and where it sits relative to now.\n *\n * **Vertical is the only axis.** A horizontal timeline is a Stepper wearing\n * different clothes: ordered stages a reader moves through, which Stepper\n * already models with a state machine, reachability rules and keyboard\n * traversal. A timeline's moments are *records* the reader scans, and the\n * scan runs top-to-bottom at every viewport this library targets. If a\n * design reaches for horizontal, it is asking for Stepper.\n *\n * Statuses are explicit — the host owns the truth about what has happened —\n * and every item states its status in words beside the marker, because a\n * dot's colour alone is not a state.\n */\nexport const TIMELINE_LABELS: TimelineLabels = {\n region: \"Timeline\",\n complete: \"Completed\",\n current: \"Current\",\n upcoming: \"Upcoming\",\n};\n\n/** Where a moment sits relative to now. The host owns the truth. */\nexport type TimelineStatus = \"complete\" | \"current\" | \"upcoming\";\n</script>\n\n<script setup lang=\"ts\">\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\n\ndefineProps<{\n /** Names the timeline when surrounding prose does not already say it. */\n labels?: LabelOverrides<TimelineLabels>;\n}>();\n\n// `text`, not `labels`: one of three sources, resolved key by key.\nconst text = useLabels(\"timeline\", TIMELINE_LABELS);\n</script>\n\n<template>\n <!-- An ordered list, because a timeline IS ordered. Items draw their own\n connector stub; the last one's is retired here so the line stops where\n the story does. -->\n <!-- A div carrying explicit list roles rather than a styled ol: the docs\n site's own unlayered `ol` rules beat every utility here (the failure\n AvatarGroup recorded first), and explicit roles also survive engines\n that drop list semantics once `list-style: none` lands. -->\n <div\n role=\"list\"\n :aria-label=\"text.region\"\n class=\"m-0 p-0 [&>*:last-child_.loom-timeline-line]:hidden\"\n >\n <!-- @slot The entries: one `TimelineItem` per moment, in order. -->\n <slot />\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type LabelOverrides } from "../../../labels/src/index";
|
|
2
|
+
import type { TimelineLabels } from "../../../labels/src/index";
|
|
3
|
+
/**
|
|
4
|
+
* Timeline — a chronological spine: markers down a line, each carrying a
|
|
5
|
+
* moment (title, description, timestamp) and where it sits relative to now.
|
|
6
|
+
*
|
|
7
|
+
* **Vertical is the only axis.** A horizontal timeline is a Stepper wearing
|
|
8
|
+
* different clothes: ordered stages a reader moves through, which Stepper
|
|
9
|
+
* already models with a state machine, reachability rules and keyboard
|
|
10
|
+
* traversal. A timeline's moments are *records* the reader scans, and the
|
|
11
|
+
* scan runs top-to-bottom at every viewport this library targets. If a
|
|
12
|
+
* design reaches for horizontal, it is asking for Stepper.
|
|
13
|
+
*
|
|
14
|
+
* Statuses are explicit — the host owns the truth about what has happened —
|
|
15
|
+
* and every item states its status in words beside the marker, because a
|
|
16
|
+
* dot's colour alone is not a state.
|
|
17
|
+
*/
|
|
18
|
+
export declare const TIMELINE_LABELS: TimelineLabels;
|
|
19
|
+
/** Where a moment sits relative to now. The host owns the truth. */
|
|
20
|
+
export type TimelineStatus = "complete" | "current" | "upcoming";
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
24
|
+
/** Names the timeline when surrounding prose does not already say it. */
|
|
25
|
+
labels?: LabelOverrides<TimelineLabels>;
|
|
26
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
27
|
+
/** Names the timeline when surrounding prose does not already say it. */
|
|
28
|
+
labels?: LabelOverrides<TimelineLabels>;
|
|
29
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
30
|
+
default?: (props: {}) => any;
|
|
31
|
+
}>;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=Timeline.vue.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useLabels } from "../../../labels/src/labels.js";
|
|
2
|
+
import "../../../labels/src/index.js";
|
|
3
|
+
import { createElementBlock, defineComponent, openBlock, renderSlot, unref } from "vue";
|
|
4
|
+
//#region packages/primitives/timeline/src/Timeline.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _hoisted_1 = ["aria-label"];
|
|
6
|
+
/**
|
|
7
|
+
* Timeline — a chronological spine: markers down a line, each carrying a
|
|
8
|
+
* moment (title, description, timestamp) and where it sits relative to now.
|
|
9
|
+
*
|
|
10
|
+
* **Vertical is the only axis.** A horizontal timeline is a Stepper wearing
|
|
11
|
+
* different clothes: ordered stages a reader moves through, which Stepper
|
|
12
|
+
* already models with a state machine, reachability rules and keyboard
|
|
13
|
+
* traversal. A timeline's moments are *records* the reader scans, and the
|
|
14
|
+
* scan runs top-to-bottom at every viewport this library targets. If a
|
|
15
|
+
* design reaches for horizontal, it is asking for Stepper.
|
|
16
|
+
*
|
|
17
|
+
* Statuses are explicit — the host owns the truth about what has happened —
|
|
18
|
+
* and every item states its status in words beside the marker, because a
|
|
19
|
+
* dot's colour alone is not a state.
|
|
20
|
+
*/
|
|
21
|
+
var TIMELINE_LABELS = {
|
|
22
|
+
region: "Timeline",
|
|
23
|
+
complete: "Completed",
|
|
24
|
+
current: "Current",
|
|
25
|
+
upcoming: "Upcoming"
|
|
26
|
+
};
|
|
27
|
+
var Timeline_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
28
|
+
__name: "Timeline",
|
|
29
|
+
props: { labels: {} },
|
|
30
|
+
setup(__props) {
|
|
31
|
+
const text = useLabels("timeline", TIMELINE_LABELS);
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return openBlock(), createElementBlock("div", {
|
|
34
|
+
role: "list",
|
|
35
|
+
"aria-label": unref(text).region,
|
|
36
|
+
class: "m-0 p-0 [&>*:last-child_.loom-timeline-line]:hidden"
|
|
37
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { TIMELINE_LABELS, Timeline_vue_vue_type_script_setup_true_lang_default as default };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=Timeline.vue_vue_type_script_setup_true_lang.js.map
|
package/dist/packages/primitives/timeline/src/Timeline.vue_vue_type_script_setup_true_lang.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/primitives/timeline/src/Timeline.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { TimelineLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * Timeline — a chronological spine: markers down a line, each carrying a\n * moment (title, description, timestamp) and where it sits relative to now.\n *\n * **Vertical is the only axis.** A horizontal timeline is a Stepper wearing\n * different clothes: ordered stages a reader moves through, which Stepper\n * already models with a state machine, reachability rules and keyboard\n * traversal. A timeline's moments are *records* the reader scans, and the\n * scan runs top-to-bottom at every viewport this library targets. If a\n * design reaches for horizontal, it is asking for Stepper.\n *\n * Statuses are explicit — the host owns the truth about what has happened —\n * and every item states its status in words beside the marker, because a\n * dot's colour alone is not a state.\n */\nexport const TIMELINE_LABELS: TimelineLabels = {\n region: \"Timeline\",\n complete: \"Completed\",\n current: \"Current\",\n upcoming: \"Upcoming\",\n};\n\n/** Where a moment sits relative to now. The host owns the truth. */\nexport type TimelineStatus = \"complete\" | \"current\" | \"upcoming\";\n</script>\n\n<script setup lang=\"ts\">\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\n\ndefineProps<{\n /** Names the timeline when surrounding prose does not already say it. */\n labels?: LabelOverrides<TimelineLabels>;\n}>();\n\n// `text`, not `labels`: one of three sources, resolved key by key.\nconst text = useLabels(\"timeline\", TIMELINE_LABELS);\n</script>\n\n<template>\n <!-- An ordered list, because a timeline IS ordered. Items draw their own\n connector stub; the last one's is retired here so the line stops where\n the story does. -->\n <!-- A div carrying explicit list roles rather than a styled ol: the docs\n site's own unlayered `ol` rules beat every utility here (the failure\n AvatarGroup recorded first), and explicit roles also survive engines\n that drop list semantics once `list-style: none` lands. -->\n <div\n role=\"list\"\n :aria-label=\"text.region\"\n class=\"m-0 p-0 [&>*:last-child_.loom-timeline-line]:hidden\"\n >\n <!-- @slot The entries: one `TimelineItem` per moment, in order. -->\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,IAAa,kBAAkC;CAC7C,QAAQ;CACR,UAAU;CACV,SAAS;CACT,UAAU;AACZ;;;;;EAeA,MAAM,OAAO,UAAU,YAAY,eAAe;;GAWhD,OAAA,UAAA,GAAA,mBAOM,OAAA;IANJ,MAAK;IACJ,cAAY,MAAA,IAAA,CAAI,CAAC;IAClB,OAAM;GAGN,GAAA,CAAA,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,GAAA,UAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import TimelineItem_vue_vue_type_script_setup_true_lang_default, { timelineMarkerVariants } from "./TimelineItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region packages/primitives/timeline/src/TimelineItem.vue
|
|
3
|
+
var TimelineItem_default = TimelineItem_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TimelineItem_default as default, timelineMarkerVariants };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=TimelineItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimelineItem.js","names":[],"sources":["../../../../../packages/primitives/timeline/src/TimelineItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * The marker, per status. Complete fills with success and takes the check;\n * current fills with primary and wears a halo — emphasis without motion, so\n * reduced-motion readers lose nothing; upcoming is a hollow dot, present but\n * not yet lived.\n */\nexport const timelineMarkerVariants = cva(\n \"relative z-raised flex h-6 w-6 shrink-0 items-center justify-center rounded-full border\",\n {\n variants: {\n status: {\n complete: \"border-success bg-success text-success-foreground\",\n current: \"border-primary bg-primary-muted text-primary-text ring-4 ring-primary-muted\",\n upcoming: \"border-border bg-background text-muted-foreground\",\n },\n },\n defaultVariants: { status: \"upcoming\" as TimelineStatus },\n },\n);\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Check } from \"@lucide/vue\";\nimport { useLabels, type LabelOverrides, type TimelineLabels } from \"@ecoma-io/loom-labels\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { TIMELINE_LABELS, type TimelineStatus } from \"./Timeline.vue\";\n\nconst props = withDefaults(\n defineProps<{\n /** The moment's heading. */\n title: string;\n /** A line under the title. */\n description?: string;\n /** When it happened (or will). Rendered inside a real `<time>`. */\n timestamp?: string;\n /** Machine-readable timestamp for `<time datetime>`. */\n datetime?: string;\n /** Where the moment sits relative to now. The host owns the truth. */\n status?: TimelineStatus;\n /** Names what the item says on its own account, as any subset of `TimelineLabels`. */\n labels?: LabelOverrides<TimelineLabels>;\n }>(),\n { status: \"upcoming\" },\n);\n\n// `text`, not `labels`: one of three sources, resolved key by key.\nconst text = useLabels(\"timeline\", TIMELINE_LABELS, () => props.labels);\n\nconst STATUS_WORD = {\n complete: \"complete\",\n current: \"current\",\n upcoming: \"upcoming\",\n} as const;\nconst statusWord = computed(() => {\n const bag = text.value;\n return bag[STATUS_WORD[props.status]];\n});\n</script>\n\n<template>\n <!-- pl-8 clears the marker column; the connector stub is drawn by this\n item along the left edge of that gutter and retired by the wrapper for\n the last entry, so the line stops where the story does. -->\n <div\n role=\"listitem\"\n class=\"relative pb-8 pl-8 last:pb-0\"\n :aria-current=\"status === 'current' ? 'step' : undefined\"\n >\n <!-- The spine sits under the marker column: left-3 is exactly the\n h-6 marker's centre, so the line runs through every dot and retires\n with the final entry. -->\n <span\n aria-hidden=\"true\"\n class=\"loom-timeline-line absolute top-6 bottom-0 left-3 w-px -translate-x-1/2 bg-border\"\n />\n\n <span\n aria-hidden=\"true\"\n :class=\"cn(timelineMarkerVariants({ status }), 'absolute left-0 top-0')\"\n >\n <Check v-if=\"status === 'complete'\" class=\"h-3.5 w-3.5\" />\n </span>\n\n <div>\n <div class=\"flex flex-wrap items-baseline gap-x-2\">\n <p class=\"text-sm font-medium\">{{ title }}</p>\n <time\n v-if=\"timestamp || datetime\"\n :datetime=\"datetime\"\n class=\"text-small tabular text-muted-foreground\"\n >{{ timestamp ?? datetime }}</time\n >\n <span class=\"sr-only\">{{ statusWord }}</span>\n </div>\n <p v-if=\"description\" class=\"mt-1 text-small text-muted-foreground\">{{ description }}</p>\n <!-- @slot Anything beyond title/description/timestamp — a Badge, a link out. -->\n <div v-if=\"$slots.default\" class=\"mt-2\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type LabelOverrides, type TimelineLabels } from "../../../labels/src/index";
|
|
2
|
+
import { type TimelineStatus } from "./Timeline.vue";
|
|
3
|
+
/**
|
|
4
|
+
* The marker, per status. Complete fills with success and takes the check;
|
|
5
|
+
* current fills with primary and wears a halo — emphasis without motion, so
|
|
6
|
+
* reduced-motion readers lose nothing; upcoming is a hollow dot, present but
|
|
7
|
+
* not yet lived.
|
|
8
|
+
*/
|
|
9
|
+
export declare const timelineMarkerVariants: (props?: ({
|
|
10
|
+
status?: "complete" | "current" | "upcoming" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
15
|
+
/** The moment's heading. */
|
|
16
|
+
title: string;
|
|
17
|
+
/** A line under the title. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** When it happened (or will). Rendered inside a real `<time>`. */
|
|
20
|
+
timestamp?: string;
|
|
21
|
+
/** Machine-readable timestamp for `<time datetime>`. */
|
|
22
|
+
datetime?: string;
|
|
23
|
+
/** Where the moment sits relative to now. The host owns the truth. */
|
|
24
|
+
status?: TimelineStatus;
|
|
25
|
+
/** Names what the item says on its own account, as any subset of `TimelineLabels`. */
|
|
26
|
+
labels?: LabelOverrides<TimelineLabels>;
|
|
27
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
28
|
+
/** The moment's heading. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** A line under the title. */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** When it happened (or will). Rendered inside a real `<time>`. */
|
|
33
|
+
timestamp?: string;
|
|
34
|
+
/** Machine-readable timestamp for `<time datetime>`. */
|
|
35
|
+
datetime?: string;
|
|
36
|
+
/** Where the moment sits relative to now. The host owns the truth. */
|
|
37
|
+
status?: TimelineStatus;
|
|
38
|
+
/** Names what the item says on its own account, as any subset of `TimelineLabels`. */
|
|
39
|
+
labels?: LabelOverrides<TimelineLabels>;
|
|
40
|
+
}> & Readonly<{}>, {
|
|
41
|
+
status: TimelineStatus;
|
|
42
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
43
|
+
default?: (props: {}) => any;
|
|
44
|
+
}>;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=TimelineItem.vue.d.ts.map
|
package/dist/packages/primitives/timeline/src/TimelineItem.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { cn } from "../../../core/src/cn.js";
|
|
2
|
+
import "../../../core/src/index.js";
|
|
3
|
+
import { useLabels } from "../../../labels/src/labels.js";
|
|
4
|
+
import "../../../labels/src/index.js";
|
|
5
|
+
import { TIMELINE_LABELS } from "./Timeline.vue_vue_type_script_setup_true_lang.js";
|
|
6
|
+
import "./Timeline.js";
|
|
7
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref } from "vue";
|
|
8
|
+
import { Check } from "@lucide/vue";
|
|
9
|
+
import { cva } from "class-variance-authority";
|
|
10
|
+
//#region packages/primitives/timeline/src/TimelineItem.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var _hoisted_1 = ["aria-current"];
|
|
12
|
+
var _hoisted_2 = { class: "flex flex-wrap items-baseline gap-x-2" };
|
|
13
|
+
var _hoisted_3 = { class: "text-sm font-medium" };
|
|
14
|
+
var _hoisted_4 = ["datetime"];
|
|
15
|
+
var _hoisted_5 = { class: "sr-only" };
|
|
16
|
+
var _hoisted_6 = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "mt-1 text-small text-muted-foreground"
|
|
19
|
+
};
|
|
20
|
+
var _hoisted_7 = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "mt-2"
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The marker, per status. Complete fills with success and takes the check;
|
|
26
|
+
* current fills with primary and wears a halo — emphasis without motion, so
|
|
27
|
+
* reduced-motion readers lose nothing; upcoming is a hollow dot, present but
|
|
28
|
+
* not yet lived.
|
|
29
|
+
*/
|
|
30
|
+
var timelineMarkerVariants = cva("relative z-raised flex h-6 w-6 shrink-0 items-center justify-center rounded-full border", {
|
|
31
|
+
variants: { status: {
|
|
32
|
+
complete: "border-success bg-success text-success-foreground",
|
|
33
|
+
current: "border-primary bg-primary-muted text-primary-text ring-4 ring-primary-muted",
|
|
34
|
+
upcoming: "border-border bg-background text-muted-foreground"
|
|
35
|
+
} },
|
|
36
|
+
defaultVariants: { status: "upcoming" }
|
|
37
|
+
});
|
|
38
|
+
var TimelineItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
39
|
+
__name: "TimelineItem",
|
|
40
|
+
props: {
|
|
41
|
+
title: {},
|
|
42
|
+
description: {},
|
|
43
|
+
timestamp: {},
|
|
44
|
+
datetime: {},
|
|
45
|
+
status: { default: "upcoming" },
|
|
46
|
+
labels: {}
|
|
47
|
+
},
|
|
48
|
+
setup(__props) {
|
|
49
|
+
const props = __props;
|
|
50
|
+
const text = useLabels("timeline", TIMELINE_LABELS, () => props.labels);
|
|
51
|
+
const STATUS_WORD = {
|
|
52
|
+
complete: "complete",
|
|
53
|
+
current: "current",
|
|
54
|
+
upcoming: "upcoming"
|
|
55
|
+
};
|
|
56
|
+
const statusWord = computed(() => {
|
|
57
|
+
return text.value[STATUS_WORD[props.status]];
|
|
58
|
+
});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return openBlock(), createElementBlock("div", {
|
|
61
|
+
role: "listitem",
|
|
62
|
+
class: "relative pb-8 pl-8 last:pb-0",
|
|
63
|
+
"aria-current": __props.status === "current" ? "step" : void 0
|
|
64
|
+
}, [
|
|
65
|
+
_cache[0] || (_cache[0] = createElementVNode("span", {
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
class: "loom-timeline-line absolute top-6 bottom-0 left-3 w-px -translate-x-1/2 bg-border"
|
|
68
|
+
}, null, -1)),
|
|
69
|
+
createElementVNode("span", {
|
|
70
|
+
"aria-hidden": "true",
|
|
71
|
+
class: normalizeClass(unref(cn)(unref(timelineMarkerVariants)({ status: __props.status }), "absolute left-0 top-0"))
|
|
72
|
+
}, [__props.status === "complete" ? (openBlock(), createBlock(unref(Check), {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: "h-3.5 w-3.5"
|
|
75
|
+
})) : createCommentVNode("", true)], 2),
|
|
76
|
+
createElementVNode("div", null, [
|
|
77
|
+
createElementVNode("div", _hoisted_2, [
|
|
78
|
+
createElementVNode("p", _hoisted_3, toDisplayString(__props.title), 1),
|
|
79
|
+
__props.timestamp || __props.datetime ? (openBlock(), createElementBlock("time", {
|
|
80
|
+
key: 0,
|
|
81
|
+
datetime: __props.datetime,
|
|
82
|
+
class: "text-small tabular text-muted-foreground"
|
|
83
|
+
}, toDisplayString(__props.timestamp ?? __props.datetime), 9, _hoisted_4)) : createCommentVNode("", true),
|
|
84
|
+
createElementVNode("span", _hoisted_5, toDisplayString(statusWord.value), 1)
|
|
85
|
+
]),
|
|
86
|
+
__props.description ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(__props.description), 1)) : createCommentVNode("", true),
|
|
87
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)
|
|
88
|
+
])
|
|
89
|
+
], 8, _hoisted_1);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
export { TimelineItem_vue_vue_type_script_setup_true_lang_default as default, timelineMarkerVariants };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=TimelineItem.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimelineItem.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../packages/primitives/timeline/src/TimelineItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * The marker, per status. Complete fills with success and takes the check;\n * current fills with primary and wears a halo — emphasis without motion, so\n * reduced-motion readers lose nothing; upcoming is a hollow dot, present but\n * not yet lived.\n */\nexport const timelineMarkerVariants = cva(\n \"relative z-raised flex h-6 w-6 shrink-0 items-center justify-center rounded-full border\",\n {\n variants: {\n status: {\n complete: \"border-success bg-success text-success-foreground\",\n current: \"border-primary bg-primary-muted text-primary-text ring-4 ring-primary-muted\",\n upcoming: \"border-border bg-background text-muted-foreground\",\n },\n },\n defaultVariants: { status: \"upcoming\" as TimelineStatus },\n },\n);\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Check } from \"@lucide/vue\";\nimport { useLabels, type LabelOverrides, type TimelineLabels } from \"@ecoma-io/loom-labels\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { TIMELINE_LABELS, type TimelineStatus } from \"./Timeline.vue\";\n\nconst props = withDefaults(\n defineProps<{\n /** The moment's heading. */\n title: string;\n /** A line under the title. */\n description?: string;\n /** When it happened (or will). Rendered inside a real `<time>`. */\n timestamp?: string;\n /** Machine-readable timestamp for `<time datetime>`. */\n datetime?: string;\n /** Where the moment sits relative to now. The host owns the truth. */\n status?: TimelineStatus;\n /** Names what the item says on its own account, as any subset of `TimelineLabels`. */\n labels?: LabelOverrides<TimelineLabels>;\n }>(),\n { status: \"upcoming\" },\n);\n\n// `text`, not `labels`: one of three sources, resolved key by key.\nconst text = useLabels(\"timeline\", TIMELINE_LABELS, () => props.labels);\n\nconst STATUS_WORD = {\n complete: \"complete\",\n current: \"current\",\n upcoming: \"upcoming\",\n} as const;\nconst statusWord = computed(() => {\n const bag = text.value;\n return bag[STATUS_WORD[props.status]];\n});\n</script>\n\n<template>\n <!-- pl-8 clears the marker column; the connector stub is drawn by this\n item along the left edge of that gutter and retired by the wrapper for\n the last entry, so the line stops where the story does. -->\n <div\n role=\"listitem\"\n class=\"relative pb-8 pl-8 last:pb-0\"\n :aria-current=\"status === 'current' ? 'step' : undefined\"\n >\n <!-- The spine sits under the marker column: left-3 is exactly the\n h-6 marker's centre, so the line runs through every dot and retires\n with the final entry. -->\n <span\n aria-hidden=\"true\"\n class=\"loom-timeline-line absolute top-6 bottom-0 left-3 w-px -translate-x-1/2 bg-border\"\n />\n\n <span\n aria-hidden=\"true\"\n :class=\"cn(timelineMarkerVariants({ status }), 'absolute left-0 top-0')\"\n >\n <Check v-if=\"status === 'complete'\" class=\"h-3.5 w-3.5\" />\n </span>\n\n <div>\n <div class=\"flex flex-wrap items-baseline gap-x-2\">\n <p class=\"text-sm font-medium\">{{ title }}</p>\n <time\n v-if=\"timestamp || datetime\"\n :datetime=\"datetime\"\n class=\"text-small tabular text-muted-foreground\"\n >{{ timestamp ?? datetime }}</time\n >\n <span class=\"sr-only\">{{ statusWord }}</span>\n </div>\n <p v-if=\"description\" class=\"mt-1 text-small text-muted-foreground\">{{ description }}</p>\n <!-- @slot Anything beyond title/description/timestamp — a Badge, a link out. -->\n <div v-if=\"$slots.default\" class=\"mt-2\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAa,yBAAyB,IACpC,2FACA;CACE,UAAU,EACR,QAAQ;EACN,UAAU;EACV,SAAS;EACT,UAAU;CACZ,EACF;CACA,iBAAiB,EAAE,QAAQ,WAA6B;AAC1D,CACF;;;;;;;;;;;;EAUA,MAAM,QAAQ;EAmBd,MAAM,OAAO,UAAU,YAAY,uBAAuB,MAAM,MAAM;EAEtE,MAAM,cAAc;GAClB,UAAU;GACV,SAAS;GACT,UAAU;EACZ;EACA,MAAM,aAAa,eAAe;GAEhC,OADY,KAAK,MACN,YAAY,MAAM;EAC/B,CAAC;;GAOC,OAAA,UAAA,GAAA,mBAqCM,OAAA;IApCJ,MAAK;IACL,OAAM;IACL,gBAAc,QAAA,WAAM,YAAA,SAA0B,KAAA;;IAK/C,OAAA,OAAA,OAAA,KAAA,mBAGE,QAAA;KAFA,eAAY;KACZ,OAAM;;IAGR,mBAKO,QAAA;KAJL,eAAY;KACX,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAA,sBAAA,CAAsB,CAAA,EAAA,QAAG,QAAA,OAAM,CAAA,GAAA,uBAAA,CAAA;IAE7B,GAAA,CAAA,QAAA,WAAM,cAAnB,UAAA,GAAA,YAA0D,MAAA,KAAA,GAAA;;KAAtB,OAAM;;IAG5C,mBAgBM,OAAA,MAAA;KAfJ,mBASM,OATN,YASM;MARJ,mBAA8C,KAA9C,YAA8C,gBAAZ,QAAA,KAAK,GAAA,CAAA;MAE/B,QAAA,aAAa,QAAA,YADrB,UAAA,GAAA,mBAKC,QAAA;;OAHE,UAAU,QAAA;OACX,OAAM;MACF,GAAA,gBAAA,QAAA,aAAa,QAAA,QAAQ,GAAA,GAAA,UAAA,KAAA,mBAAA,IAAA,IAAA;MAE3B,mBAA6C,QAA7C,YAA6C,gBAApB,WAAA,KAAU,GAAA,CAAA;;KAE5B,QAAA,eAAT,UAAA,GAAA,mBAAyF,KAAzF,YAAyF,gBAAlB,QAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;KAEvEA,KAAAA,OAAO,WAAlB,UAAA,GAAA,mBAEM,OAFN,YAEM,CADJ,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default, TIMELINE_LABELS } from "./Timeline.vue";
|
|
2
|
+
export { default as TimelineItem, timelineMarkerVariants } from "./TimelineItem.vue";
|
|
3
|
+
export type { TimelineLabels } from "../../../labels/src/index";
|
|
4
|
+
export type { TimelineStatus } from "./Timeline.vue";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TIMELINE_LABELS } from "./Timeline.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
import Timeline_default from "./Timeline.js";
|
|
3
|
+
import "./TimelineItem.vue_vue_type_script_setup_true_lang.js";
|
|
4
|
+
import TimelineItem_default from "./TimelineItem.js";
|
|
5
|
+
export { TIMELINE_LABELS, TimelineItem_default as TimelineItem, Timeline_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type LabelOverrides, type ToastLabels } from "
|
|
1
|
+
import { type LabelOverrides, type ToastLabels } from "../../../labels/src/index";
|
|
2
2
|
export type ToastVariant = "info" | "success" | "warning" | "destructive" | "accent";
|
|
3
|
-
export type { ToastLabels } from "
|
|
3
|
+
export type { ToastLabels } from "../../../labels/src/index";
|
|
4
4
|
export { TOAST_LABELS } from "./ToastItem.vue";
|
|
5
5
|
declare const _default: typeof __VLS_export;
|
|
6
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastItem.js","names":[],"sources":["../../../../../packages/primitives/toast/src/ToastItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ToastLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const TOAST_LABELS: ToastLabels = {\n close: \"Close\",\n announce: \"Notification\",\n region: ({ hotkey }) => `Notifications (${hotkey})`,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { optional } from \"@ecoma-io/loom-core\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n /** Names for what the card says on its own account, as any subset of `ToastLabels`. */\n labels?: LabelOverrides<ToastLabels>;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"toast\", TOAST_LABELS, () => props.labels);\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info-text\" },\n success: { icon: CircleCheck, color: \"text-success-text\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive-text\" },\n accent: { icon: Sparkles, color: \"text-primary-text\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The
|
|
1
|
+
{"version":3,"file":"ToastItem.js","names":[],"sources":["../../../../../packages/primitives/toast/src/ToastItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ToastLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const TOAST_LABELS: ToastLabels = {\n close: \"Close\",\n announce: \"Notification\",\n region: ({ hotkey }) => `Notifications (${hotkey})`,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { optional } from \"@ecoma-io/loom-core\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n /** Names for what the card says on its own account, as any subset of `ToastLabels`. */\n labels?: LabelOverrides<ToastLabels>;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"toast\", TOAST_LABELS, () => props.labels);\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info-text\" },\n success: { icon: CircleCheck, color: \"text-success-text\" },\n // `-text` like its four siblings. The bare `warning` hue is a fill colour —\n // as text it fails on the dark theme, and the functional `-text` tokens are\n // the ones measured legible on every surface (theme.css carries the ratios).\n warning: { icon: TriangleAlert, color: \"text-warning-text\" },\n destructive: { icon: CircleX, color: \"text-destructive-text\" },\n accent: { icon: Sparkles, color: \"text-primary-text\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n\n// Severity alone decides how the toast interrupts (issue #91): a destructive\n// report announced politely can be swallowed by whatever the screen reader is\n// already saying — exactly the messages that must not be missed. The knob is\n// Reka's own `type`: it hard-wires the hidden announce region's `role` to\n// `alert` and picks that region's politeness from this prop — `foreground`\n// announces `aria-live=\"assertive\"`, `background` politely. Destructive\n// routes foreground; every other severity stays polite, so an ordinary\n// notification never interrupts. Deliberately no prop of Loom's own: the\n// variant the card already carries *is* the severity, and a second way to set\n// it would only let the two disagree.\nconst announceType = computed<\"foreground\" | \"background\">(() =>\n props.variant === \"destructive\" ? \"foreground\" : \"background\",\n);\n</script>\n\n<template>\n <!-- Entrance and exit deliberately do not share an element, and the split is\n forced by Reka rather than taste. The swipe gesture marks ToastRoot\n itself (data-swipe plus --reka-toast-swipe-* custom properties), so the\n root's transform stays reserved and the entrance rides the inner card.\n The exit cannot ride along: Presence decides an element's fate by\n reading the computed animation-name of the node it mounted — never a\n descendant's — and by waiting for an animationend whose target is that\n same node (usePresence.js). A toast-out confined to the inner card would\n leave the root's own name `none` and be unmounted before its first\n frame; on ToastRoot it genuinely plays. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :type=\"announceType\"\n :duration=\"duration\"\n class=\"outline-none data-[state=closed]:animate-toast-out\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Accent variant: a highlighted border to draw attention to the\n // toast's distinctiveness from the standard variants.\n variant === 'accent' && 'border-primary/40',\n )\n \"\n >\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary-text transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n :aria-label=\"text.close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type LabelOverrides } from "
|
|
1
|
+
import { type LabelOverrides } from "../../../labels/src/index";
|
|
2
2
|
import type { ToastVariant } from "./Toast.vue";
|
|
3
|
-
import type { ToastLabels } from "
|
|
3
|
+
import type { ToastLabels } from "../../../labels/src/index";
|
|
4
4
|
/**
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -56,7 +56,7 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
56
56
|
},
|
|
57
57
|
warning: {
|
|
58
58
|
icon: TriangleAlert,
|
|
59
|
-
color: "text-warning"
|
|
59
|
+
color: "text-warning-text"
|
|
60
60
|
},
|
|
61
61
|
destructive: {
|
|
62
62
|
icon: CircleX,
|
|
@@ -68,10 +68,12 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
const accent = computed(() => toastAccents[props.variant]);
|
|
71
|
+
const announceType = computed(() => props.variant === "destructive" ? "foreground" : "background");
|
|
71
72
|
return (_ctx, _cache) => {
|
|
72
73
|
return openBlock(), createBlock(unref(ToastRoot), mergeProps(unref(optional)({ open: __props.open }), {
|
|
74
|
+
type: announceType.value,
|
|
73
75
|
duration: __props.duration,
|
|
74
|
-
class: "outline-none",
|
|
76
|
+
class: "outline-none data-[state=closed]:animate-toast-out",
|
|
75
77
|
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:open", $event))
|
|
76
78
|
}), {
|
|
77
79
|
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cn)("relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg", __props.variant === "accent" && "border-primary/40")) }, [
|
|
@@ -108,7 +110,7 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
108
110
|
}, 8, ["aria-label"])) : createCommentVNode("", true)
|
|
109
111
|
], 2)]),
|
|
110
112
|
_: 1
|
|
111
|
-
}, 16, ["duration"]);
|
|
113
|
+
}, 16, ["type", "duration"]);
|
|
112
114
|
};
|
|
113
115
|
}
|
|
114
116
|
});
|