@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/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
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 { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withModifiers } from "vue";
|
|
6
|
+
import { TriangleAlert } from "@lucide/vue";
|
|
7
|
+
//#region packages/blocks/error-summary/src/ErrorSummary.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _hoisted_1 = ["role", "aria-labelledby"];
|
|
9
|
+
var _hoisted_2 = { class: "flex items-start gap-2" };
|
|
10
|
+
var _hoisted_3 = { class: "min-w-0" };
|
|
11
|
+
var _hoisted_4 = ["id"];
|
|
12
|
+
var _hoisted_5 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "mt-1 text-sm"
|
|
15
|
+
};
|
|
16
|
+
var _hoisted_6 = { class: "mt-2 list-disc space-y-1 pl-5" };
|
|
17
|
+
var _hoisted_7 = ["href", "onClick"];
|
|
18
|
+
/**
|
|
19
|
+
* Loom's English, co-located with the component so it tree-shakes with it.
|
|
20
|
+
* `heading` takes the count rather than a finished sentence for the reason
|
|
21
|
+
* `LabelOf` in `@ecoma-io/loom-labels` records: plurals are a language
|
|
22
|
+
* decision, and Loom's English has no right to make it for anyone else.
|
|
23
|
+
*/
|
|
24
|
+
var ERROR_SUMMARY_LABELS = {
|
|
25
|
+
heading: ({ count }) => `There is a problem (${String(count)} ${count === 1 ? "error" : "errors"})`,
|
|
26
|
+
description: () => ""
|
|
27
|
+
};
|
|
28
|
+
var ErrorSummary_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
29
|
+
__name: "ErrorSummary",
|
|
30
|
+
props: {
|
|
31
|
+
errors: {},
|
|
32
|
+
labels: {}
|
|
33
|
+
},
|
|
34
|
+
setup(__props) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const text = useLabels("errorSummary", ERROR_SUMMARY_LABELS, () => props.labels);
|
|
37
|
+
const box = ref(null);
|
|
38
|
+
const headingId = useId();
|
|
39
|
+
const announcing = ref(false);
|
|
40
|
+
let invalid = false;
|
|
41
|
+
watch(() => props.errors, async (errors) => {
|
|
42
|
+
if (errors.length === 0) {
|
|
43
|
+
invalid = false;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
announcing.value = !invalid;
|
|
47
|
+
invalid = true;
|
|
48
|
+
await nextTick();
|
|
49
|
+
box.value?.focus();
|
|
50
|
+
}, {
|
|
51
|
+
deep: true,
|
|
52
|
+
immediate: true
|
|
53
|
+
});
|
|
54
|
+
function focusField(id) {
|
|
55
|
+
document.getElementById(id)?.focus();
|
|
56
|
+
}
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return __props.errors.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
ref_key: "box",
|
|
61
|
+
ref: box,
|
|
62
|
+
tabindex: "-1",
|
|
63
|
+
role: announcing.value ? "alert" : void 0,
|
|
64
|
+
"aria-labelledby": unref(headingId),
|
|
65
|
+
class: normalizeClass(unref(cn)("rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-destructive-text", "animate-fade-rise", "focus:outline-2 focus:outline-offset-2 focus:outline-destructive")),
|
|
66
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => announcing.value = false)
|
|
67
|
+
}, [createElementVNode("div", _hoisted_2, [createVNode(unref(TriangleAlert), {
|
|
68
|
+
class: "mt-0.5 h-4 w-4 shrink-0",
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
}), createElementVNode("div", _hoisted_3, [
|
|
71
|
+
createElementVNode("h2", {
|
|
72
|
+
id: unref(headingId),
|
|
73
|
+
class: "text-sm font-semibold"
|
|
74
|
+
}, toDisplayString(unref(text).heading({ count: __props.errors.length })), 9, _hoisted_4),
|
|
75
|
+
unref(text).description({ count: __props.errors.length }) !== "" ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(unref(text).description({ count: __props.errors.length })), 1)) : createCommentVNode("", true),
|
|
76
|
+
createElementVNode("ul", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.errors, (error) => {
|
|
77
|
+
return openBlock(), createElementBlock("li", { key: error.id }, [createElementVNode("a", {
|
|
78
|
+
href: `#${error.id}`,
|
|
79
|
+
class: "font-medium underline underline-offset-2",
|
|
80
|
+
onClick: withModifiers(($event) => focusField(error.id), ["prevent"])
|
|
81
|
+
}, toDisplayString(error.fieldLabel ? `${error.fieldLabel}: ${error.message}` : error.message), 9, _hoisted_7)]);
|
|
82
|
+
}), 128))])
|
|
83
|
+
])])], 42, _hoisted_1)) : createCommentVNode("", true);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ERROR_SUMMARY_LABELS, ErrorSummary_vue_vue_type_script_setup_true_lang_default as default };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=ErrorSummary.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorSummary.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/blocks/error-summary/src/ErrorSummary.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ErrorSummaryLabels, LabelOverrides } from \"@ecoma-io/loom-labels\";\n\n/** One invalid field the summary lists. */\nexport interface ErrorSummaryEntry {\n /** The id of the element the entry links to — the invalid field's control. Give it `tabindex=\"-1\"` (or be natively focusable) so focus can land. */\n id: string;\n /** The error text for that field. */\n message: string;\n /** The field's visible label, spoken ahead of the message in the link text. */\n fieldLabel?: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it.\n * `heading` takes the count rather than a finished sentence for the reason\n * `LabelOf` in `@ecoma-io/loom-labels` records: plurals are a language\n * decision, and Loom's English has no right to make it for anyone else.\n */\nexport const ERROR_SUMMARY_LABELS: ErrorSummaryLabels = {\n heading: ({ count }) =>\n `There is a problem (${String(count)} ${count === 1 ? \"error\" : \"errors\"})`,\n description: () => \"\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref, useId, watch } from \"vue\";\nimport { TriangleAlert } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { useLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * ErrorSummary — the GOV.UK error-summary pattern. On submit-failure, focus\n * moves to a summary listing every field error, each entry a link that moves\n * focus to the invalid field. The container takes `tabindex=\"-1\"` and is\n * focused programmatically whenever the errors first render or change while\n * the form stays invalid.\n *\n * The announcement happens once. `role=\"alert\"` exists only between the\n * summary's appearance and the focus this component immediately gives it —\n * a region that stayed alert would re-announce the whole list on every\n * later change, which is the failure the pattern exists to avoid. Where\n * InlineError annotates one field, this orients the reader across the whole\n * form.\n */\nconst props = defineProps<{\n /** Every invalid field, most important first. Give each `id` a focusable target. */\n errors: ErrorSummaryEntry[];\n /** Names for the summary's own copy — the heading takes the count, so a host owns its plural forms. */\n labels?: LabelOverrides<ErrorSummaryLabels> | undefined;\n}>();\n\nconst text = useLabels(\"errorSummary\", ERROR_SUMMARY_LABELS, () => props.labels);\n\nconst box = ref<HTMLElement | null>(null);\nconst headingId = useId();\nconst announcing = ref(false);\n// True while the form is known to be invalid: the announcement belongs to\n// the empty→invalid transition alone, not to any later change of detail.\nlet invalid = false;\n\nwatch(\n () => props.errors,\n async (errors) => {\n if (errors.length === 0) {\n invalid = false;\n return;\n }\n announcing.value = !invalid;\n invalid = true;\n await nextTick();\n box.value?.focus();\n },\n { deep: true, immediate: true },\n);\n\nfunction focusField(id: string): void {\n // The link's native jump is suppressed: focusing scrolls the field into\n // view, and a jump-to-anchor from a link moves no focus at all when the\n // target is a tabindex=\"-1\" field — which is the documented host contract.\n document.getElementById(id)?.focus();\n}\n</script>\n\n<template>\n <!-- Mounted only while invalid, like InlineError: `v-if`, never `v-show` —\n a summary that never leaves the DOM cannot announce its return. -->\n <div\n v-if=\"errors.length > 0\"\n ref=\"box\"\n tabindex=\"-1\"\n :role=\"announcing ? 'alert' : undefined\"\n :aria-labelledby=\"headingId\"\n :class=\"\n cn(\n 'rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-destructive-text',\n 'animate-fade-rise',\n 'focus:outline-2 focus:outline-offset-2 focus:outline-destructive',\n )\n \"\n @focus=\"announcing = false\"\n >\n <div class=\"flex items-start gap-2\">\n <TriangleAlert class=\"mt-0.5 h-4 w-4 shrink-0\" aria-hidden=\"true\" />\n <div class=\"min-w-0\">\n <h2 :id=\"headingId\" class=\"text-sm font-semibold\">\n {{ text.heading({ count: errors.length }) }}\n </h2>\n <p v-if=\"text.description({ count: errors.length }) !== ''\" class=\"mt-1 text-sm\">\n {{ text.description({ count: errors.length }) }}\n </p>\n <ul class=\"mt-2 list-disc space-y-1 pl-5\">\n <li v-for=\"error in errors\" :key=\"error.id\">\n <a\n :href=\"`#${error.id}`\"\n class=\"font-medium underline underline-offset-2\"\n @click.prevent=\"focusField(error.id)\"\n >{{ error.fieldLabel ? `${error.fieldLabel}: ${error.message}` : error.message }}</a\n >\n </li>\n </ul>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAa,uBAA2C;CACtD,UAAU,EAAE,YACV,uBAAuB,OAAO,KAAK,EAAE,GAAG,UAAU,IAAI,UAAU,SAAS;CAC3E,mBAAmB;AACrB;;;;;;;;EAuBA,MAAM,QAAQ;EAOd,MAAM,OAAO,UAAU,gBAAgB,4BAA4B,MAAM,MAAM;EAE/E,MAAM,MAAM,IAAwB,IAAI;EACxC,MAAM,YAAY,MAAM;EACxB,MAAM,aAAa,IAAI,KAAK;EAG5B,IAAI,UAAU;EAEd,YACQ,MAAM,QACZ,OAAO,WAAW;GAChB,IAAI,OAAO,WAAW,GAAG;IACvB,UAAU;IACV;GACF;GACA,WAAW,QAAQ,CAAC;GACpB,UAAU;GACV,MAAM,SAAS;GACf,IAAI,OAAO,MAAM;EACnB,GACA;GAAE,MAAM;GAAM,WAAW;EAAK,CAChC;EAEA,SAAS,WAAW,IAAkB;GAIpC,SAAS,eAAe,EAAE,CAAC,EAAE,MAAM;EACrC;;GAOU,OAAA,QAAA,OAAO,SAAM,KADrB,UAAA,GAAA,mBAoCM,OAAA;;IAlCA,SAAA;IAAJ,KAAI;IACJ,UAAS;IACR,MAAM,WAAA,QAAU,UAAa,KAAA;IAC7B,mBAAiB,MAAA,SAAA;IACjB,OAAK,eAAS,MAAA,EAAA,CAAE,CAAA,6FAAA,qBAAA,kEAAA,CAAA;IAOhB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,WAAA,QAAU;GAElB,GAAA,CAAA,mBAoBM,OApBN,YAoBM,CAnBJ,YAAoE,MAAA,aAAA,GAAA;IAArD,OAAM;IAA0B,eAAY;GAC3D,CAAA,GAAA,mBAiBM,OAjBN,YAiBM;IAhBJ,mBAEK,MAAA;KAFA,IAAI,MAAA,SAAA;KAAW,OAAM;IACrB,GAAA,gBAAA,MAAA,IAAA,CAAI,CAAC,QAAO,EAAA,OAAU,QAAA,OAAO,OAAM,CAAA,CAAA,GAAA,GAAA,UAAA;IAE/B,MAAA,IAAA,CAAI,CAAC,YAAW,EAAA,OAAU,QAAA,OAAO,OAAM,CAAA,MAAA,MAAhD,UAAA,GAAA,mBAEI,KAFJ,YAEI,gBADC,MAAA,IAAA,CAAI,CAAC,YAAW,EAAA,OAAU,QAAA,OAAO,OAAM,CAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAE5C,mBASK,MATL,YASK,EARH,UAAA,IAAA,GAAA,mBAOK,UAAA,MAAA,WAPe,QAAA,SAAT,UAAK;KAAhB,OAAA,UAAA,GAAA,mBAOK,MAAA,EAPwB,KAAK,MAAM,GAAA,GAAA,CACtC,mBAKC,KAAA;MAJE,MAAI,IAAM,MAAM;MACjB,OAAM;MACL,SAAK,eAAA,WAAU,WAAW,MAAM,EAAE,GAAA,CAAA,SAAA,CAAA;KAC/B,GAAA,gBAAA,MAAM,aAAU,GAAM,MAAM,WAAU,IAAK,MAAM,YAAY,MAAM,OAAO,GAAA,GAAA,UAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricCard.js","names":[],"sources":["../../../../../packages/blocks/metric-card/src/MetricCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * MetricCard — one KPI on a dashboard: a compact surface carrying a metric\n * value, its label, and an optional trend arrow. The shape is fixed (icon →\n * label → value + trend) because a hand-rolled metric row drifts from call\n * site to call site — the icon above the label here, the trend on a second\n * line there — and this block pins one layout so the row scans left-to-right.\n *\n * The trend is always inline with the value, never a separate line. A trend\n * on its own row reads as a second metric; sharing the value line reads as\n * context for that metric, which is what it is. The arrows are inline SVGs\n * (12px) rather than an icon-library dependency: a trend indicator is a\n * single directional glyph, and pulling in an icon package for three paths\n * is weight the host did not ask for.\n *\n * Colour encodes direction but is never the only signal: the arrow shape\n * distinguishes up from down even without hue, and \"flat\" is an em dash\n * rather than a horizontal arrow that could be mistaken for a minus sign or\n * a separator. `text-success-text` / `text-destructive-text` / `text-muted-foreground`\n * are the semantic tokens rather than fixed greens and reds, so the card\n * adapts to whatever the theme maps those to.\n */\nexport type MetricCardTrend = \"up\" | \"down\" | \"flat\";\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"@ecoma-io/loom-core\";\n\
|
|
1
|
+
{"version":3,"file":"MetricCard.js","names":[],"sources":["../../../../../packages/blocks/metric-card/src/MetricCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * MetricCard — one KPI on a dashboard: a compact surface carrying a metric\n * value, its label, and an optional trend arrow. The shape is fixed (icon →\n * label → value + trend) because a hand-rolled metric row drifts from call\n * site to call site — the icon above the label here, the trend on a second\n * line there — and this block pins one layout so the row scans left-to-right.\n *\n * The trend is always inline with the value, never a separate line. A trend\n * on its own row reads as a second metric; sharing the value line reads as\n * context for that metric, which is what it is. The arrows are inline SVGs\n * (12px) rather than an icon-library dependency: a trend indicator is a\n * single directional glyph, and pulling in an icon package for three paths\n * is weight the host did not ask for.\n *\n * Colour encodes direction but is never the only signal: the arrow shape\n * distinguishes up from down even without hue, and \"flat\" is an em dash\n * rather than a horizontal arrow that could be mistaken for a minus sign or\n * a separator. `text-success-text` / `text-destructive-text` / `text-muted-foreground`\n * are the semantic tokens rather than fixed greens and reds, so the card\n * adapts to whatever the theme maps those to.\n */\nexport type MetricCardTrend = \"up\" | \"down\" | \"flat\";\n</script>\n\n<script setup lang=\"ts\">\nimport { watchEffect } from \"vue\";\nimport Skeleton from \"@ecoma-io/loom-skeleton\";\nimport { cn } from \"@ecoma-io/loom-core\";\n\nconst props = defineProps<{\n /** The metric value — a formatted string or number the host has already\n * localised (e.g. \"1,234\", \"98.5%\", \"$42k\"). Raw numbers are not\n * formatted by the card; the host owns formatting so the same value\n * can be \"$42k\" in one place and \"42,000\" in another. Optional only\n * while `loading`. */\n value?: string | number;\n /** What the metric measures — always shown. */\n label: string;\n /** Direction of change. When absent, no trend indicator is rendered. */\n trend?: MetricCardTrend;\n /** The trend magnitude (e.g. \"+12.5%\", \"-3.2%\"). Shown only when `trend`\n * is also provided; a magnitude with no direction has no meaning. */\n trendValue?: string;\n /** Context line under the value row — a period, a comparison base. */\n description?: string;\n /**\n * Renders the label and value as Skeleton placeholders sized to the real\n * layout, so the card keeps its height and does not reflow when data\n * lands.\n */\n loading?: boolean;\n}>();\n\n// `value` went optional for the loading state; this keeps a forgotten value\n// from landing as an empty heading once data arrives.\nwatchEffect(() => {\n if (!props.loading && props.value === undefined) {\n console.warn(\n \"[MetricCard] no `value` given and `loading` is false — the card renders an empty metric.\",\n );\n }\n});\n</script>\n\n<template>\n <div :aria-busy=\"loading || undefined\" :class=\"cn('rounded-lg border border-border bg-card p-4')\">\n <!-- Decorative icon — hidden from assistive tech because the label and\n value already carry the metric's meaning. -->\n <div\n v-if=\"$slots.icon\"\n aria-hidden=\"true\"\n class=\"mb-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n <slot name=\"icon\" />\n </div>\n <!-- Loading keeps the card's height by sizing each placeholder to the\n row it stands in for — a single generic bar would let the value\n land with a jolt. aria-hidden pairs with the parent's own\n aria-busy below. -->\n <template v-if=\"loading\">\n <Skeleton variant=\"text\" class=\"mb-2 h-3 w-20\" />\n <div class=\"flex items-baseline gap-1.5\">\n <Skeleton variant=\"text\" class=\"h-7 w-24\" />\n </div>\n </template>\n <template v-else>\n <p class=\"text-small text-muted-foreground\">{{ label }}</p>\n <div class=\"flex items-baseline gap-1.5\">\n <!-- `text-heading`, not a hand-assembled `text-2xl font-semibold\n tracking-tight`: the named rung is near-parity with that stack\n (1.5rem, weight 600) by design, and composing it here meant the KPI\n drifted silently if the scale ever moved. The two real deltas are\n deliberate — letter-spacing slackens from tight's −0.025em to the\n heading rung's −0.01em, and the line-height comes down to 1.2 —\n both invisible on a single baseline row like this one. -->\n <span class=\"text-heading text-foreground\">\n {{ value }}\n </span>\n <span\n v-if=\"trend\"\n :class=\"\n cn('inline-flex items-center gap-0.5 text-small font-medium', {\n 'text-success-text': trend === 'up',\n 'text-destructive-text': trend === 'down',\n 'text-muted-foreground': trend === 'flat',\n })\n \"\n >\n <!-- Up arrow: a single upward stroke with a chevron head. -->\n <svg\n v-if=\"trend === 'up'\"\n class=\"inline h-3 w-3\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n aria-hidden=\"true\"\n >\n <path d=\"M6 2v8M3 5l3-3 3 3\" />\n </svg>\n <!-- Down arrow: a single downward stroke with a chevron head. -->\n <svg\n v-else-if=\"trend === 'down'\"\n class=\"inline h-3 w-3\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n aria-hidden=\"true\"\n >\n <path d=\"M6 10V2M3 7l3 3 3-3\" />\n </svg>\n <!-- Flat: an em dash rather than a horizontal arrow — a horizontal\n arrow at this size reads as a minus sign or a separator. -->\n <span v-else aria-hidden=\"true\">—</span>\n <span v-if=\"trendValue\">{{ trendValue }}</span>\n </span>\n </div>\n <p v-if=\"description\" class=\"mt-1 text-small text-muted-foreground\">\n {{ description }}\n </p>\n </template>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -26,8 +26,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
26
26
|
/** The metric value — a formatted string or number the host has already
|
|
27
27
|
* localised (e.g. "1,234", "98.5%", "$42k"). Raw numbers are not
|
|
28
28
|
* formatted by the card; the host owns formatting so the same value
|
|
29
|
-
* can be "$42k" in one place and "42,000" in another.
|
|
30
|
-
|
|
29
|
+
* can be "$42k" in one place and "42,000" in another. Optional only
|
|
30
|
+
* while `loading`. */
|
|
31
|
+
value?: string | number;
|
|
31
32
|
/** What the metric measures — always shown. */
|
|
32
33
|
label: string;
|
|
33
34
|
/** Direction of change. When absent, no trend indicator is rendered. */
|
|
@@ -35,12 +36,21 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
35
36
|
/** The trend magnitude (e.g. "+12.5%", "-3.2%"). Shown only when `trend`
|
|
36
37
|
* is also provided; a magnitude with no direction has no meaning. */
|
|
37
38
|
trendValue?: string;
|
|
39
|
+
/** Context line under the value row — a period, a comparison base. */
|
|
40
|
+
description?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Renders the label and value as Skeleton placeholders sized to the real
|
|
43
|
+
* layout, so the card keeps its height and does not reflow when data
|
|
44
|
+
* lands.
|
|
45
|
+
*/
|
|
46
|
+
loading?: boolean;
|
|
38
47
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
39
48
|
/** The metric value — a formatted string or number the host has already
|
|
40
49
|
* localised (e.g. "1,234", "98.5%", "$42k"). Raw numbers are not
|
|
41
50
|
* formatted by the card; the host owns formatting so the same value
|
|
42
|
-
* can be "$42k" in one place and "42,000" in another.
|
|
43
|
-
|
|
51
|
+
* can be "$42k" in one place and "42,000" in another. Optional only
|
|
52
|
+
* while `loading`. */
|
|
53
|
+
value?: string | number;
|
|
44
54
|
/** What the metric measures — always shown. */
|
|
45
55
|
label: string;
|
|
46
56
|
/** Direction of change. When absent, no trend indicator is rendered. */
|
|
@@ -48,6 +58,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
48
58
|
/** The trend magnitude (e.g. "+12.5%", "-3.2%"). Shown only when `trend`
|
|
49
59
|
* is also provided; a magnitude with no direction has no meaning. */
|
|
50
60
|
trendValue?: string;
|
|
61
|
+
/** Context line under the value row — a period, a comparison base. */
|
|
62
|
+
description?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Renders the label and value as Skeleton placeholders sized to the real
|
|
65
|
+
* layout, so the card keeps its height and does not reflow when data
|
|
66
|
+
* lands.
|
|
67
|
+
*/
|
|
68
|
+
loading?: boolean;
|
|
51
69
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
52
70
|
icon?: (props: {}) => any;
|
|
53
71
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricCard.vue.d.ts","sourceRoot":"","sources":["../../../../../packages/blocks/metric-card/src/MetricCard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetricCard.vue.d.ts","sourceRoot":"","sources":["../../../../../packages/blocks/metric-card/src/MetricCard.vue"],"names":[],"mappings":"AAyJA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;wBAChC,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEhB;;;;2BAIuB;YACf,MAAM,GAAG,MAAM;IACvB,+CAA+C;WACxC,MAAM;IACb,wEAAwE;YAChE,eAAe;IACvB;0EACsE;iBACzD,MAAM;IACnB,sEAAsE;kBACxD,MAAM;IACpB;;;;OAIG;cACO,OAAO;;IApBjB;;;;2BAIuB;YACf,MAAM,GAAG,MAAM;IACvB,+CAA+C;WACxC,MAAM;IACb,wEAAwE;YAChE,eAAe;IACvB;0EACsE;iBACzD,MAAM;IACnB,sEAAsE;kBACxD,MAAM;IACpB;;;;OAIG;cACO,OAAO;;WA0KR,CAAC,KAAK,IAAgB,KAAK,GAAG;EASrC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/packages/blocks/metric-card/src/MetricCard.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { cn } from "../../../core/src/cn.js";
|
|
2
2
|
import "../../../core/src/index.js";
|
|
3
|
-
import
|
|
3
|
+
import Skeleton_default from "../../../primitives/skeleton/src/Skeleton.js";
|
|
4
|
+
import "../../../primitives/skeleton/src/index.js";
|
|
5
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, watchEffect } from "vue";
|
|
4
6
|
//#region packages/blocks/metric-card/src/MetricCard.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var _hoisted_1 =
|
|
7
|
+
var _hoisted_1 = ["aria-busy"];
|
|
8
|
+
var _hoisted_2 = {
|
|
6
9
|
key: 0,
|
|
7
10
|
"aria-hidden": "true",
|
|
8
11
|
class: "mb-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4"
|
|
9
12
|
};
|
|
10
|
-
var _hoisted_2 = { class: "text-small text-muted-foreground" };
|
|
11
13
|
var _hoisted_3 = { class: "flex items-baseline gap-1.5" };
|
|
12
|
-
var _hoisted_4 = { class: "text-
|
|
13
|
-
var _hoisted_5 = {
|
|
14
|
+
var _hoisted_4 = { class: "text-small text-muted-foreground" };
|
|
15
|
+
var _hoisted_5 = { class: "flex items-baseline gap-1.5" };
|
|
16
|
+
var _hoisted_6 = { class: "text-heading text-foreground" };
|
|
17
|
+
var _hoisted_7 = {
|
|
14
18
|
key: 0,
|
|
15
19
|
class: "inline h-3 w-3",
|
|
16
20
|
viewBox: "0 0 12 12",
|
|
@@ -19,7 +23,7 @@ var _hoisted_5 = {
|
|
|
19
23
|
"stroke-width": "2",
|
|
20
24
|
"aria-hidden": "true"
|
|
21
25
|
};
|
|
22
|
-
var
|
|
26
|
+
var _hoisted_8 = {
|
|
23
27
|
key: 1,
|
|
24
28
|
class: "inline h-3 w-3",
|
|
25
29
|
viewBox: "0 0 12 12",
|
|
@@ -28,33 +32,52 @@ var _hoisted_6 = {
|
|
|
28
32
|
"stroke-width": "2",
|
|
29
33
|
"aria-hidden": "true"
|
|
30
34
|
};
|
|
31
|
-
var
|
|
35
|
+
var _hoisted_9 = {
|
|
32
36
|
key: 2,
|
|
33
37
|
"aria-hidden": "true"
|
|
34
38
|
};
|
|
35
|
-
var
|
|
39
|
+
var _hoisted_10 = { key: 3 };
|
|
40
|
+
var _hoisted_11 = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "mt-1 text-small text-muted-foreground"
|
|
43
|
+
};
|
|
36
44
|
var MetricCard_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
37
45
|
__name: "MetricCard",
|
|
38
46
|
props: {
|
|
39
47
|
value: {},
|
|
40
48
|
label: {},
|
|
41
49
|
trend: {},
|
|
42
|
-
trendValue: {}
|
|
50
|
+
trendValue: {},
|
|
51
|
+
description: {},
|
|
52
|
+
loading: { type: Boolean }
|
|
43
53
|
},
|
|
44
54
|
setup(__props) {
|
|
55
|
+
const props = __props;
|
|
56
|
+
watchEffect(() => {
|
|
57
|
+
if (!props.loading && props.value === void 0) console.warn("[MetricCard] no `value` given and `loading` is false — the card renders an empty metric.");
|
|
58
|
+
});
|
|
45
59
|
return (_ctx, _cache) => {
|
|
46
|
-
return openBlock(), createElementBlock("div", {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
return openBlock(), createElementBlock("div", {
|
|
61
|
+
"aria-busy": __props.loading || void 0,
|
|
62
|
+
class: normalizeClass(unref(cn)("rounded-lg border border-border bg-card p-4"))
|
|
63
|
+
}, [_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true), __props.loading ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(Skeleton_default), {
|
|
64
|
+
variant: "text",
|
|
65
|
+
class: "mb-2 h-3 w-20"
|
|
66
|
+
}), createElementVNode("div", _hoisted_3, [createVNode(unref(Skeleton_default), {
|
|
67
|
+
variant: "text",
|
|
68
|
+
class: "h-7 w-24"
|
|
69
|
+
})])], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
70
|
+
createElementVNode("p", _hoisted_4, toDisplayString(__props.label), 1),
|
|
71
|
+
createElementVNode("div", _hoisted_5, [createElementVNode("span", _hoisted_6, toDisplayString(__props.value), 1), __props.trend ? (openBlock(), createElementBlock("span", {
|
|
50
72
|
key: 0,
|
|
51
73
|
class: normalizeClass(unref(cn)("inline-flex items-center gap-0.5 text-small font-medium", {
|
|
52
74
|
"text-success-text": __props.trend === "up",
|
|
53
75
|
"text-destructive-text": __props.trend === "down",
|
|
54
76
|
"text-muted-foreground": __props.trend === "flat"
|
|
55
77
|
}))
|
|
56
|
-
}, [__props.trend === "up" ? (openBlock(), createElementBlock("svg",
|
|
57
|
-
|
|
78
|
+
}, [__props.trend === "up" ? (openBlock(), createElementBlock("svg", _hoisted_7, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M6 2v8M3 5l3-3 3 3" }, null, -1)])])) : __props.trend === "down" ? (openBlock(), createElementBlock("svg", _hoisted_8, [..._cache[1] || (_cache[1] = [createElementVNode("path", { d: "M6 10V2M3 7l3 3 3-3" }, null, -1)])])) : (openBlock(), createElementBlock("span", _hoisted_9, "—")), __props.trendValue ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(__props.trendValue), 1)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)]),
|
|
79
|
+
__props.description ? (openBlock(), createElementBlock("p", _hoisted_11, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
|
|
80
|
+
], 64))], 10, _hoisted_1);
|
|
58
81
|
};
|
|
59
82
|
}
|
|
60
83
|
});
|
package/dist/packages/blocks/metric-card/src/MetricCard.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricCard.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../packages/blocks/metric-card/src/MetricCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * MetricCard — one KPI on a dashboard: a compact surface carrying a metric\n * value, its label, and an optional trend arrow. The shape is fixed (icon →\n * label → value + trend) because a hand-rolled metric row drifts from call\n * site to call site — the icon above the label here, the trend on a second\n * line there — and this block pins one layout so the row scans left-to-right.\n *\n * The trend is always inline with the value, never a separate line. A trend\n * on its own row reads as a second metric; sharing the value line reads as\n * context for that metric, which is what it is. The arrows are inline SVGs\n * (12px) rather than an icon-library dependency: a trend indicator is a\n * single directional glyph, and pulling in an icon package for three paths\n * is weight the host did not ask for.\n *\n * Colour encodes direction but is never the only signal: the arrow shape\n * distinguishes up from down even without hue, and \"flat\" is an em dash\n * rather than a horizontal arrow that could be mistaken for a minus sign or\n * a separator. `text-success-text` / `text-destructive-text` / `text-muted-foreground`\n * are the semantic tokens rather than fixed greens and reds, so the card\n * adapts to whatever the theme maps those to.\n */\nexport type MetricCardTrend = \"up\" | \"down\" | \"flat\";\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"@ecoma-io/loom-core\";\n\
|
|
1
|
+
{"version":3,"file":"MetricCard.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../packages/blocks/metric-card/src/MetricCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * MetricCard — one KPI on a dashboard: a compact surface carrying a metric\n * value, its label, and an optional trend arrow. The shape is fixed (icon →\n * label → value + trend) because a hand-rolled metric row drifts from call\n * site to call site — the icon above the label here, the trend on a second\n * line there — and this block pins one layout so the row scans left-to-right.\n *\n * The trend is always inline with the value, never a separate line. A trend\n * on its own row reads as a second metric; sharing the value line reads as\n * context for that metric, which is what it is. The arrows are inline SVGs\n * (12px) rather than an icon-library dependency: a trend indicator is a\n * single directional glyph, and pulling in an icon package for three paths\n * is weight the host did not ask for.\n *\n * Colour encodes direction but is never the only signal: the arrow shape\n * distinguishes up from down even without hue, and \"flat\" is an em dash\n * rather than a horizontal arrow that could be mistaken for a minus sign or\n * a separator. `text-success-text` / `text-destructive-text` / `text-muted-foreground`\n * are the semantic tokens rather than fixed greens and reds, so the card\n * adapts to whatever the theme maps those to.\n */\nexport type MetricCardTrend = \"up\" | \"down\" | \"flat\";\n</script>\n\n<script setup lang=\"ts\">\nimport { watchEffect } from \"vue\";\nimport Skeleton from \"@ecoma-io/loom-skeleton\";\nimport { cn } from \"@ecoma-io/loom-core\";\n\nconst props = defineProps<{\n /** The metric value — a formatted string or number the host has already\n * localised (e.g. \"1,234\", \"98.5%\", \"$42k\"). Raw numbers are not\n * formatted by the card; the host owns formatting so the same value\n * can be \"$42k\" in one place and \"42,000\" in another. Optional only\n * while `loading`. */\n value?: string | number;\n /** What the metric measures — always shown. */\n label: string;\n /** Direction of change. When absent, no trend indicator is rendered. */\n trend?: MetricCardTrend;\n /** The trend magnitude (e.g. \"+12.5%\", \"-3.2%\"). Shown only when `trend`\n * is also provided; a magnitude with no direction has no meaning. */\n trendValue?: string;\n /** Context line under the value row — a period, a comparison base. */\n description?: string;\n /**\n * Renders the label and value as Skeleton placeholders sized to the real\n * layout, so the card keeps its height and does not reflow when data\n * lands.\n */\n loading?: boolean;\n}>();\n\n// `value` went optional for the loading state; this keeps a forgotten value\n// from landing as an empty heading once data arrives.\nwatchEffect(() => {\n if (!props.loading && props.value === undefined) {\n console.warn(\n \"[MetricCard] no `value` given and `loading` is false — the card renders an empty metric.\",\n );\n }\n});\n</script>\n\n<template>\n <div :aria-busy=\"loading || undefined\" :class=\"cn('rounded-lg border border-border bg-card p-4')\">\n <!-- Decorative icon — hidden from assistive tech because the label and\n value already carry the metric's meaning. -->\n <div\n v-if=\"$slots.icon\"\n aria-hidden=\"true\"\n class=\"mb-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n <slot name=\"icon\" />\n </div>\n <!-- Loading keeps the card's height by sizing each placeholder to the\n row it stands in for — a single generic bar would let the value\n land with a jolt. aria-hidden pairs with the parent's own\n aria-busy below. -->\n <template v-if=\"loading\">\n <Skeleton variant=\"text\" class=\"mb-2 h-3 w-20\" />\n <div class=\"flex items-baseline gap-1.5\">\n <Skeleton variant=\"text\" class=\"h-7 w-24\" />\n </div>\n </template>\n <template v-else>\n <p class=\"text-small text-muted-foreground\">{{ label }}</p>\n <div class=\"flex items-baseline gap-1.5\">\n <!-- `text-heading`, not a hand-assembled `text-2xl font-semibold\n tracking-tight`: the named rung is near-parity with that stack\n (1.5rem, weight 600) by design, and composing it here meant the KPI\n drifted silently if the scale ever moved. The two real deltas are\n deliberate — letter-spacing slackens from tight's −0.025em to the\n heading rung's −0.01em, and the line-height comes down to 1.2 —\n both invisible on a single baseline row like this one. -->\n <span class=\"text-heading text-foreground\">\n {{ value }}\n </span>\n <span\n v-if=\"trend\"\n :class=\"\n cn('inline-flex items-center gap-0.5 text-small font-medium', {\n 'text-success-text': trend === 'up',\n 'text-destructive-text': trend === 'down',\n 'text-muted-foreground': trend === 'flat',\n })\n \"\n >\n <!-- Up arrow: a single upward stroke with a chevron head. -->\n <svg\n v-if=\"trend === 'up'\"\n class=\"inline h-3 w-3\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n aria-hidden=\"true\"\n >\n <path d=\"M6 2v8M3 5l3-3 3 3\" />\n </svg>\n <!-- Down arrow: a single downward stroke with a chevron head. -->\n <svg\n v-else-if=\"trend === 'down'\"\n class=\"inline h-3 w-3\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n aria-hidden=\"true\"\n >\n <path d=\"M6 10V2M3 7l3 3 3-3\" />\n </svg>\n <!-- Flat: an em dash rather than a horizontal arrow — a horizontal\n arrow at this size reads as a minus sign or a separator. -->\n <span v-else aria-hidden=\"true\">—</span>\n <span v-if=\"trendValue\">{{ trendValue }}</span>\n </span>\n </div>\n <p v-if=\"description\" class=\"mt-1 text-small text-muted-foreground\">\n {{ description }}\n </p>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,QAAQ;EA0Bd,kBAAkB;GAChB,IAAI,CAAC,MAAM,WAAW,MAAM,UAAU,KAAA,GACpC,QAAQ,KACN,0FACF;EAEJ,CAAC;;GAIC,OAAA,UAAA,GAAA,mBA6EM,OAAA;IA7EA,aAAW,QAAA,WAAW,KAAA;IAAY,OAAK,eAAE,MAAA,EAAA,CAAE,CAAA,6CAAA,CAAA;GAIvCA,GAAAA,CAAAA,KAAAA,OAAO,QADf,UAAA,GAAA,mBAMM,OANN,YAMM,CADJ,WAAoB,KAAA,QAAA,MAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAMN,QAAA,WAAhB,UAAA,GAAA,mBAKW,UAAA,EAAA,KAAA,EAAA,GAAA,CAJT,YAAiD,MAAA,gBAAA,GAAA;IAAvC,SAAQ;IAAO,OAAM;GAC/B,CAAA,GAAA,mBAEM,OAFN,YAEM,CADJ,YAA4C,MAAA,gBAAA,GAAA;IAAlC,SAAQ;IAAO,OAAM;GAGnC,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,MAAA,UAAA,GAAA,mBAwDW,UAAA,EAAA,KAAA,EAAA,GAAA;IAvDT,mBAA2D,KAA3D,YAA2D,gBAAZ,QAAA,KAAK,GAAA,CAAA;IACpD,mBAkDM,OAlDN,YAkDM,CA1CJ,mBAEO,QAFP,YAEO,gBADF,QAAA,KAAK,GAAA,CAAA,GAGF,QAAA,SADR,UAAA,GAAA,mBAsCO,QAAA;;KApCJ,OAAK,eAAe,MAAA,EAAA,CAAE,CAAA,2DAAA;MAAiG,qBAAA,QAAA,UAAK;MAAkD,yBAAA,QAAA,UAAK;MAAoD,yBAAA,QAAA,UAAK;;IAUrO,GAAA,CAAA,QAAA,UAAK,QADb,UAAA,GAAA,mBAUM,OAVN,YAUM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CADJ,mBAA+B,QAAA,EAAzB,GAAE,qBAAoB,GAAA,MAAA,EAAA,CAAA,EAAA,CAAA,KAIjB,QAAA,UAAK,UADlB,UAAA,GAAA,mBAUM,OAVN,YAUM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CADJ,mBAAgC,QAAA,EAA1B,GAAE,sBAAqB,GAAA,MAAA,EAAA,CAAA,EAAA,CAAA,MAI/B,UAAA,GAAA,mBAA8C,QAA9C,YAAgC,GAAO,IAC3B,QAAA,cAAZ,UAAA,GAAA,mBAA+C,QAAA,aAAA,gBAApB,QAAA,UAAU,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;IAGhC,QAAA,eAAT,UAAA,GAAA,mBAEI,KAFJ,aAEI,gBADC,QAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type WindowControlsLabels } from "
|
|
1
|
+
import { type WindowControlsLabels } from "../../../primitives/window-controls/src/index";
|
|
2
2
|
/**
|
|
3
3
|
* TitleBar — a desktop app's custom window chrome (a block: composed from
|
|
4
4
|
* primitives, domain-aware, but still presentational). Layout:
|
|
@@ -19,8 +19,8 @@ import { type WindowControlsLabels } from "@ecoma-io/loom-window-controls";
|
|
|
19
19
|
* the brand cluster shifts right to leave room for the native traffic-light
|
|
20
20
|
* buttons, and WindowControls renders nothing (the OS owns those buttons).
|
|
21
21
|
*/
|
|
22
|
-
import type { MenubarMenu } from "
|
|
23
|
-
import type { WindowPlatform } from "
|
|
22
|
+
import type { MenubarMenu } from "../../../primitives/menubar/src/index";
|
|
23
|
+
import type { WindowPlatform } from "../../../primitives/window-controls/src/index";
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
export default _default;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type LabelOverrides } from "
|
|
2
|
-
import { type ToastLabels } from "
|
|
3
|
-
import type { ToastVariant } from "
|
|
1
|
+
import { type LabelOverrides } from "../../../labels/src/index";
|
|
2
|
+
import { type ToastLabels } from "../../../primitives/toast/src/index";
|
|
3
|
+
import type { ToastVariant } from "../../../primitives/toast/src/index";
|
|
4
4
|
/** One entry of a host-owned toast queue, rendered by `ToastStack`. */
|
|
5
5
|
export interface ToastStackItem {
|
|
6
6
|
readonly id: string | number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ScrollReel_vue_vue_type_script_setup_true_lang_default, { gapClass, snapClass } from "./ScrollReel.vue_vue_type_script_setup_true_lang.js";
|
|
1
|
+
import ScrollReel_vue_vue_type_script_setup_true_lang_default, { SCROLL_REEL_LABELS, gapClass, snapClass } from "./ScrollReel.vue_vue_type_script_setup_true_lang.js";
|
|
2
2
|
//#region packages/composition/scroll-reel/src/ScrollReel.vue
|
|
3
3
|
var ScrollReel_default = ScrollReel_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { ScrollReel_default as default, gapClass, snapClass };
|
|
5
|
+
export { SCROLL_REEL_LABELS, ScrollReel_default as default, gapClass, snapClass };
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=ScrollReel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollReel.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\n\
|
|
1
|
+
{"version":3,"file":"ScrollReel.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it. The type itself lives in the\n * labels registry (`ScrollReelLabels`) like every other slot's, so\n * `provideLoomLabels({ scrollReel: … })` reaches this component exactly as\n * it reaches every primitive — composition sits above labels in the layer\n * direction, and a host localising one reel should not have to learn a\n * second seam to do it.\n */\nexport const SCROLL_REEL_LABELS: ScrollReelLabels = {\n region: \"Scrollable content\",\n};\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn, smoothScrollBehavior } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides, type ScrollReelLabels } from \"@ecoma-io/loom-labels\";\n\nconst props = withDefaults(\n defineProps<{\n /** Scroll-snap alignment. \"none\" disables snap entirely. */\n snap?: ScrollReelSnap;\n /** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */\n gap?: ScrollReelGap;\n /**\n * Names for what the reel says out loud, as any subset of\n * `ScrollReelLabels` — the per-instance correction over\n * `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop\n * takes.\n */\n labels?: LabelOverrides<ScrollReelLabels>;\n }>(),\n { snap: \"start\", gap: \"md\" },\n);\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves (own prop, then the host vocabulary from `provideLoomLabels`, then\n// these English defaults), and a template reading the raw prop would be\n// reading the overrides rather than the answer.\nconst text = useLabels(\"scrollReel\", SCROLL_REEL_LABELS, () => props.labels);\n\nconst reel = ref<HTMLDivElement | null>(null);\n\n// The reduced-motion softening lives in core (`smoothScrollBehavior`): an\n// explicit `\"smooth\"` in a scrollTo dictionary overrides the stylesheet's\n// kill-switch, so the question has to be answered at the call site — and\n// Carousel asks it too, which is why the answer is shared rather than owned.\nconst scrollBehavior = smoothScrollBehavior;\n\n/**\n * Keyboard navigation for scroll-snap: arrow keys scroll to the next or\n * previous snap-aligned child. Without this, the browser's default arrow-key\n * behaviour scrolls by a fixed pixel amount that rarely aligns with snap\n * points, leaving the strip between two items.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const el = reel.value;\n if (!el) return;\n\n // A keypress inside a nested editable (search field, combobox, contenteditable\n // chip) bubbles up to this listener: the arrows and Home/End are the caret's\n // keys there, not the reel's. Step aside so the text control keeps them —\n // the same boundary Toolbar draws at its own listener.\n if ((event.target as HTMLElement).closest(\"input, select, textarea, [contenteditable]\")) return;\n\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (direction === 0 && event.key !== \"Home\" && event.key !== \"End\") return;\n\n event.preventDefault();\n\n const behavior = scrollBehavior();\n if (event.key === \"Home\") {\n el.scrollTo({ left: 0, behavior });\n return;\n }\n if (event.key === \"End\") {\n el.scrollTo({ left: el.scrollWidth, behavior });\n return;\n }\n\n // Find the next snap-aligned child in the scroll direction.\n const children = [...el.children] as HTMLElement[];\n const scrollEdge = direction === 1 ? el.scrollLeft + el.clientWidth : el.scrollLeft;\n\n for (const child of direction === 1 ? children : children.reverse()) {\n const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;\n const isNext = direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1;\n if (isNext) {\n child.scrollIntoView({ behavior, block: \"nearest\", inline: \"start\" });\n break;\n }\n }\n}\n</script>\n\n<template>\n <!-- `role=\"region\"` + `tabindex=\"0\"` + an accessible name make this a named,\n focusable landmark region. The keyboard handler is what makes the\n scroll-snap strip navigable by arrow keys — a genuine interaction on\n a genuinely interactive element. The rule does not account for\n non-interactive ARIA roles with an explicit tabindex. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"reel\"\n class=\"overflow-x-auto\"\n :class=\"cn('flex flex-row', snapClass[snap], gapClass[gap])\"\n tabindex=\"0\"\n role=\"region\"\n :aria-label=\"text.region\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LabelOverrides, type ScrollReelLabels } from "../../../labels/src/index";
|
|
1
2
|
/**
|
|
2
3
|
* ScrollReel — horizontal scrolling strip with scroll-snap.
|
|
3
4
|
*
|
|
@@ -13,6 +14,17 @@
|
|
|
13
14
|
*/
|
|
14
15
|
export type ScrollReelSnap = "start" | "center" | "end" | "none";
|
|
15
16
|
export type ScrollReelGap = "sm" | "md" | "lg";
|
|
17
|
+
/**
|
|
18
|
+
* Loom's English, co-located with the component so it tree-shakes with it,
|
|
19
|
+
* and exported so a host can build a partial vocabulary against the real
|
|
20
|
+
* thing rather than a transcription of it. The type itself lives in the
|
|
21
|
+
* labels registry (`ScrollReelLabels`) like every other slot's, so
|
|
22
|
+
* `provideLoomLabels({ scrollReel: … })` reaches this component exactly as
|
|
23
|
+
* it reaches every primitive — composition sits above labels in the layer
|
|
24
|
+
* direction, and a host localising one reel should not have to learn a
|
|
25
|
+
* second seam to do it.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SCROLL_REEL_LABELS: ScrollReelLabels;
|
|
16
28
|
declare const snapClass: Record<ScrollReelSnap, string>;
|
|
17
29
|
declare const gapClass: Record<ScrollReelGap, string>;
|
|
18
30
|
export { snapClass, gapClass };
|
|
@@ -23,11 +35,25 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
23
35
|
snap?: ScrollReelSnap;
|
|
24
36
|
/** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */
|
|
25
37
|
gap?: ScrollReelGap;
|
|
38
|
+
/**
|
|
39
|
+
* Names for what the reel says out loud, as any subset of
|
|
40
|
+
* `ScrollReelLabels` — the per-instance correction over
|
|
41
|
+
* `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop
|
|
42
|
+
* takes.
|
|
43
|
+
*/
|
|
44
|
+
labels?: LabelOverrides<ScrollReelLabels>;
|
|
26
45
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
27
46
|
/** Scroll-snap alignment. "none" disables snap entirely. */
|
|
28
47
|
snap?: ScrollReelSnap;
|
|
29
48
|
/** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */
|
|
30
49
|
gap?: ScrollReelGap;
|
|
50
|
+
/**
|
|
51
|
+
* Names for what the reel says out loud, as any subset of
|
|
52
|
+
* `ScrollReelLabels` — the per-instance correction over
|
|
53
|
+
* `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop
|
|
54
|
+
* takes.
|
|
55
|
+
*/
|
|
56
|
+
labels?: LabelOverrides<ScrollReelLabels>;
|
|
31
57
|
}> & Readonly<{}>, {
|
|
32
58
|
gap: ScrollReelGap;
|
|
33
59
|
snap: ScrollReelSnap;
|
package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { cn } from "../../../core/src/cn.js";
|
|
2
|
+
import { smoothScrollBehavior } from "../../../core/src/motion.js";
|
|
2
3
|
import "../../../core/src/index.js";
|
|
4
|
+
import { useLabels } from "../../../labels/src/labels.js";
|
|
5
|
+
import "../../../labels/src/index.js";
|
|
3
6
|
import { createElementBlock, defineComponent, normalizeClass, openBlock, ref, renderSlot, unref } from "vue";
|
|
4
7
|
//#region packages/composition/scroll-reel/src/ScrollReel.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _hoisted_1 = ["aria-label"];
|
|
9
|
+
/**
|
|
10
|
+
* Loom's English, co-located with the component so it tree-shakes with it,
|
|
11
|
+
* and exported so a host can build a partial vocabulary against the real
|
|
12
|
+
* thing rather than a transcription of it. The type itself lives in the
|
|
13
|
+
* labels registry (`ScrollReelLabels`) like every other slot's, so
|
|
14
|
+
* `provideLoomLabels({ scrollReel: … })` reaches this component exactly as
|
|
15
|
+
* it reaches every primitive — composition sits above labels in the layer
|
|
16
|
+
* direction, and a host localising one reel should not have to learn a
|
|
17
|
+
* second seam to do it.
|
|
18
|
+
*/
|
|
19
|
+
var SCROLL_REEL_LABELS = { region: "Scrollable content" };
|
|
5
20
|
var snapClass = {
|
|
6
21
|
start: "snap-x snap-mandatory snap-start",
|
|
7
22
|
center: "snap-x snap-mandatory snap-center",
|
|
@@ -17,10 +32,14 @@ var ScrollReel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
17
32
|
__name: "ScrollReel",
|
|
18
33
|
props: {
|
|
19
34
|
snap: { default: "start" },
|
|
20
|
-
gap: { default: "md" }
|
|
35
|
+
gap: { default: "md" },
|
|
36
|
+
labels: {}
|
|
21
37
|
},
|
|
22
38
|
setup(__props) {
|
|
39
|
+
const props = __props;
|
|
40
|
+
const text = useLabels("scrollReel", SCROLL_REEL_LABELS, () => props.labels);
|
|
23
41
|
const reel = ref(null);
|
|
42
|
+
const scrollBehavior = smoothScrollBehavior;
|
|
24
43
|
/**
|
|
25
44
|
* Keyboard navigation for scroll-snap: arrow keys scroll to the next or
|
|
26
45
|
* previous snap-aligned child. Without this, the browser's default arrow-key
|
|
@@ -30,20 +49,22 @@ var ScrollReel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
30
49
|
function onKeydown(event) {
|
|
31
50
|
const el = reel.value;
|
|
32
51
|
if (!el) return;
|
|
52
|
+
if (event.target.closest("input, select, textarea, [contenteditable]")) return;
|
|
33
53
|
const direction = event.key === "ArrowRight" ? 1 : event.key === "ArrowLeft" ? -1 : 0;
|
|
34
54
|
if (direction === 0 && event.key !== "Home" && event.key !== "End") return;
|
|
35
55
|
event.preventDefault();
|
|
56
|
+
const behavior = scrollBehavior();
|
|
36
57
|
if (event.key === "Home") {
|
|
37
58
|
el.scrollTo({
|
|
38
59
|
left: 0,
|
|
39
|
-
behavior
|
|
60
|
+
behavior
|
|
40
61
|
});
|
|
41
62
|
return;
|
|
42
63
|
}
|
|
43
64
|
if (event.key === "End") {
|
|
44
65
|
el.scrollTo({
|
|
45
66
|
left: el.scrollWidth,
|
|
46
|
-
behavior
|
|
67
|
+
behavior
|
|
47
68
|
});
|
|
48
69
|
return;
|
|
49
70
|
}
|
|
@@ -53,7 +74,7 @@ var ScrollReel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
53
74
|
const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;
|
|
54
75
|
if (direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1) {
|
|
55
76
|
child.scrollIntoView({
|
|
56
|
-
behavior
|
|
77
|
+
behavior,
|
|
57
78
|
block: "nearest",
|
|
58
79
|
inline: "start"
|
|
59
80
|
});
|
|
@@ -68,13 +89,13 @@ var ScrollReel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
68
89
|
class: normalizeClass(["overflow-x-auto", unref(cn)("flex flex-row", snapClass[__props.snap], gapClass[__props.gap])]),
|
|
69
90
|
tabindex: "0",
|
|
70
91
|
role: "region",
|
|
71
|
-
"aria-label":
|
|
92
|
+
"aria-label": unref(text).region,
|
|
72
93
|
onKeydown
|
|
73
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
94
|
+
}, [renderSlot(_ctx.$slots, "default")], 42, _hoisted_1);
|
|
74
95
|
};
|
|
75
96
|
}
|
|
76
97
|
});
|
|
77
98
|
//#endregion
|
|
78
|
-
export { ScrollReel_vue_vue_type_script_setup_true_lang_default as default, gapClass, snapClass };
|
|
99
|
+
export { SCROLL_REEL_LABELS, ScrollReel_vue_vue_type_script_setup_true_lang_default as default, gapClass, snapClass };
|
|
79
100
|
|
|
80
101
|
//# sourceMappingURL=ScrollReel.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollReel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\n\
|
|
1
|
+
{"version":3,"file":"ScrollReel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it. The type itself lives in the\n * labels registry (`ScrollReelLabels`) like every other slot's, so\n * `provideLoomLabels({ scrollReel: … })` reaches this component exactly as\n * it reaches every primitive — composition sits above labels in the layer\n * direction, and a host localising one reel should not have to learn a\n * second seam to do it.\n */\nexport const SCROLL_REEL_LABELS: ScrollReelLabels = {\n region: \"Scrollable content\",\n};\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn, smoothScrollBehavior } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides, type ScrollReelLabels } from \"@ecoma-io/loom-labels\";\n\nconst props = withDefaults(\n defineProps<{\n /** Scroll-snap alignment. \"none\" disables snap entirely. */\n snap?: ScrollReelSnap;\n /** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */\n gap?: ScrollReelGap;\n /**\n * Names for what the reel says out loud, as any subset of\n * `ScrollReelLabels` — the per-instance correction over\n * `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop\n * takes.\n */\n labels?: LabelOverrides<ScrollReelLabels>;\n }>(),\n { snap: \"start\", gap: \"md\" },\n);\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves (own prop, then the host vocabulary from `provideLoomLabels`, then\n// these English defaults), and a template reading the raw prop would be\n// reading the overrides rather than the answer.\nconst text = useLabels(\"scrollReel\", SCROLL_REEL_LABELS, () => props.labels);\n\nconst reel = ref<HTMLDivElement | null>(null);\n\n// The reduced-motion softening lives in core (`smoothScrollBehavior`): an\n// explicit `\"smooth\"` in a scrollTo dictionary overrides the stylesheet's\n// kill-switch, so the question has to be answered at the call site — and\n// Carousel asks it too, which is why the answer is shared rather than owned.\nconst scrollBehavior = smoothScrollBehavior;\n\n/**\n * Keyboard navigation for scroll-snap: arrow keys scroll to the next or\n * previous snap-aligned child. Without this, the browser's default arrow-key\n * behaviour scrolls by a fixed pixel amount that rarely aligns with snap\n * points, leaving the strip between two items.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const el = reel.value;\n if (!el) return;\n\n // A keypress inside a nested editable (search field, combobox, contenteditable\n // chip) bubbles up to this listener: the arrows and Home/End are the caret's\n // keys there, not the reel's. Step aside so the text control keeps them —\n // the same boundary Toolbar draws at its own listener.\n if ((event.target as HTMLElement).closest(\"input, select, textarea, [contenteditable]\")) return;\n\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (direction === 0 && event.key !== \"Home\" && event.key !== \"End\") return;\n\n event.preventDefault();\n\n const behavior = scrollBehavior();\n if (event.key === \"Home\") {\n el.scrollTo({ left: 0, behavior });\n return;\n }\n if (event.key === \"End\") {\n el.scrollTo({ left: el.scrollWidth, behavior });\n return;\n }\n\n // Find the next snap-aligned child in the scroll direction.\n const children = [...el.children] as HTMLElement[];\n const scrollEdge = direction === 1 ? el.scrollLeft + el.clientWidth : el.scrollLeft;\n\n for (const child of direction === 1 ? children : children.reverse()) {\n const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;\n const isNext = direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1;\n if (isNext) {\n child.scrollIntoView({ behavior, block: \"nearest\", inline: \"start\" });\n break;\n }\n }\n}\n</script>\n\n<template>\n <!-- `role=\"region\"` + `tabindex=\"0\"` + an accessible name make this a named,\n focusable landmark region. The keyboard handler is what makes the\n scroll-snap strip navigable by arrow keys — a genuine interaction on\n a genuinely interactive element. The rule does not account for\n non-interactive ARIA roles with an explicit tabindex. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"reel\"\n class=\"overflow-x-auto\"\n :class=\"cn('flex flex-row', snapClass[snap], gapClass[gap])\"\n tabindex=\"0\"\n role=\"region\"\n :aria-label=\"text.region\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,IAAa,qBAAuC,EAClD,QAAQ,qBACV;AAEA,IAAM,YAA4C;CAChD,OAAO;CACP,QAAQ;CACR,KAAK;CAEL,MAAM;AACR;AAEA,IAAM,WAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;;;;;;;EAUA,MAAM,QAAQ;EAqBd,MAAM,OAAO,UAAU,cAAc,0BAA0B,MAAM,MAAM;EAE3E,MAAM,OAAO,IAA2B,IAAI;EAM5C,MAAM,iBAAiB;;;;;;;EAQvB,SAAS,UAAU,OAAsB;GACvC,MAAM,KAAK,KAAK;GAChB,IAAI,CAAC,IAAI;GAMT,IAAK,MAAM,OAAuB,QAAQ,4CAA4C,GAAG;GAEzF,MAAM,YAAY,MAAM,QAAQ,eAAe,IAAI,MAAM,QAAQ,cAAc,KAAK;GACpF,IAAI,cAAc,KAAK,MAAM,QAAQ,UAAU,MAAM,QAAQ,OAAO;GAEpE,MAAM,eAAe;GAErB,MAAM,WAAW,eAAe;GAChC,IAAI,MAAM,QAAQ,QAAQ;IACxB,GAAG,SAAS;KAAE,MAAM;KAAG;IAAS,CAAC;IACjC;GACF;GACA,IAAI,MAAM,QAAQ,OAAO;IACvB,GAAG,SAAS;KAAE,MAAM,GAAG;KAAa;IAAS,CAAC;IAC9C;GACF;GAGA,MAAM,WAAW,CAAC,GAAG,GAAG,QAAQ;GAChC,MAAM,aAAa,cAAc,IAAI,GAAG,aAAa,GAAG,cAAc,GAAG;GAEzE,KAAK,MAAM,SAAS,cAAc,IAAI,WAAW,SAAS,QAAQ,GAAG;IACnE,MAAM,YAAY,cAAc,IAAI,MAAM,aAAa,MAAM,aAAa,MAAM;IAEhF,IADe,cAAc,IAAI,YAAY,aAAa,IAAI,YAAY,aAAa,GAC3E;KACV,MAAM,eAAe;MAAE;MAAU,OAAO;MAAW,QAAQ;KAAQ,CAAC;KACpE;IACF;GACF;EACF;;GAUE,OAAA,UAAA,GAAA,mBAUM,OAAA;IATA,SAAA;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,mBACE,MAAA,EAAA,CAAE,CAAA,iBAAkB,UAAU,QAAA,OAAO,SAAS,QAAA,IAAG,CAAA,CAAA;IACzD,UAAS;IACT,MAAK;IACJ,cAAY,MAAA,IAAA,CAAI,CAAC;IACR;GAEV,GAAA,CAAA,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,IAAA,UAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { default } from "./ScrollReel.vue";
|
|
1
|
+
export { default, SCROLL_REEL_LABELS } from "./ScrollReel.vue";
|
|
2
2
|
export type { ScrollReelGap, ScrollReelSnap } from "./ScrollReel.vue";
|
|
3
|
+
export type { ScrollReelLabels } from "../../../labels/src/index";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|