@ecoma-io/loom 0.1.1 → 0.2.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 +54 -57
- package/dist/blocks/AppHeader/AppHeader.js.map +1 -1
- package/dist/blocks/AppHeader/AppHeader.vue.d.ts +5 -6
- package/dist/blocks/AppHeader/AppHeader.vue.d.ts.map +1 -1
- package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts +1 -1
- package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts.map +1 -1
- package/dist/blocks/DesktopAppShell/DesktopAppShell.js +7 -0
- package/dist/blocks/DesktopAppShell/DesktopAppShell.js.map +1 -0
- package/dist/blocks/DesktopAppShell/DesktopAppShell.vue.d.ts +102 -0
- package/dist/blocks/DesktopAppShell/DesktopAppShell.vue.d.ts.map +1 -0
- package/dist/blocks/DesktopAppShell/DesktopAppShell.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/blocks/DesktopAppShell/DesktopAppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/blocks/ErrorState/ErrorState.js +7 -0
- package/dist/blocks/ErrorState/ErrorState.js.map +1 -0
- package/dist/blocks/ErrorState/ErrorState.vue.d.ts +44 -0
- package/dist/blocks/ErrorState/ErrorState.vue.d.ts.map +1 -0
- package/dist/blocks/ErrorState/ErrorState.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/blocks/ErrorState/ErrorState.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/blocks/FormActions/FormActions.js +7 -0
- package/dist/blocks/FormActions/FormActions.js.map +1 -0
- package/dist/blocks/FormActions/FormActions.vue.d.ts +51 -0
- package/dist/blocks/FormActions/FormActions.vue.d.ts.map +1 -0
- package/dist/blocks/FormActions/FormActions.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/blocks/FormActions/FormActions.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/blocks/FormSection/FormSection.js +7 -0
- package/dist/blocks/FormSection/FormSection.js.map +1 -0
- package/dist/blocks/FormSection/FormSection.vue.d.ts +85 -0
- package/dist/blocks/FormSection/FormSection.vue.d.ts.map +1 -0
- package/dist/blocks/FormSection/FormSection.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/blocks/FormSection/FormSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/blocks/LoadingState/LoadingState.js +7 -0
- package/dist/blocks/LoadingState/LoadingState.js.map +1 -0
- package/dist/blocks/LoadingState/LoadingState.vue.d.ts +22 -0
- package/dist/blocks/LoadingState/LoadingState.vue.d.ts.map +1 -0
- package/dist/blocks/LoadingState/LoadingState.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/blocks/LoadingState/LoadingState.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/blocks/MetricCard/MetricCard.js +7 -0
- package/dist/blocks/MetricCard/MetricCard.js.map +1 -0
- package/dist/blocks/MetricCard/MetricCard.vue.d.ts +59 -0
- package/dist/blocks/MetricCard/MetricCard.vue.d.ts.map +1 -0
- package/dist/blocks/MetricCard/MetricCard.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/blocks/MetricCard/MetricCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/blocks/SidebarNav/SidebarNav.js.map +1 -1
- package/dist/blocks/SidebarNav/SidebarNav.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/blocks/TitleBar/TitleBar.js.map +1 -1
- package/dist/blocks/TitleBar/TitleBar.vue.d.ts +37 -3
- package/dist/blocks/TitleBar/TitleBar.vue.d.ts.map +1 -1
- package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/blocks/ToastStack/ToastStack.js.map +1 -1
- package/dist/blocks/ToastStack/ToastStack.vue.d.ts +20 -0
- package/dist/blocks/ToastStack/ToastStack.vue.d.ts.map +1 -1
- package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js +16 -5
- package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composition/Center/Center.js +7 -0
- package/dist/composition/Center/Center.js.map +1 -0
- package/dist/composition/Center/Center.vue.d.ts +40 -0
- package/dist/composition/Center/Center.vue.d.ts.map +1 -0
- package/dist/composition/Center/Center.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/composition/Center/Center.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/Frame/Frame.js +7 -0
- package/dist/composition/Frame/Frame.js.map +1 -0
- package/dist/composition/Frame/Frame.vue.d.ts +35 -0
- package/dist/composition/Frame/Frame.vue.d.ts.map +1 -0
- package/dist/composition/Frame/Frame.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/composition/Frame/Frame.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/Grid/Grid.js +7 -0
- package/dist/composition/Grid/Grid.js.map +1 -0
- package/dist/composition/Grid/Grid.vue.d.ts +41 -0
- package/dist/composition/Grid/Grid.vue.d.ts.map +1 -0
- package/dist/composition/Grid/Grid.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/composition/Grid/Grid.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/Inline/Inline.js +7 -0
- package/dist/composition/Inline/Inline.js.map +1 -0
- package/dist/composition/Inline/Inline.vue.d.ts +46 -0
- package/dist/composition/Inline/Inline.vue.d.ts.map +1 -0
- package/dist/composition/Inline/Inline.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/composition/Inline/Inline.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/ScrollReel/ScrollReel.js +7 -0
- package/dist/composition/ScrollReel/ScrollReel.js.map +1 -0
- package/dist/composition/ScrollReel/ScrollReel.vue.d.ts +42 -0
- package/dist/composition/ScrollReel/ScrollReel.vue.d.ts.map +1 -0
- package/dist/composition/ScrollReel/ScrollReel.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/composition/ScrollReel/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/Sidebar/Sidebar.js +7 -0
- package/dist/composition/Sidebar/Sidebar.js.map +1 -0
- package/dist/composition/Sidebar/Sidebar.vue.d.ts +52 -0
- package/dist/composition/Sidebar/Sidebar.vue.d.ts.map +1 -0
- package/dist/composition/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/composition/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/Split/Split.js +7 -0
- package/dist/composition/Split/Split.js.map +1 -0
- package/dist/composition/Split/Split.vue.d.ts +58 -0
- package/dist/composition/Split/Split.vue.d.ts.map +1 -0
- package/dist/composition/Split/Split.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/composition/Split/Split.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composition/Stack/Stack.js +7 -0
- package/dist/composition/Stack/Stack.js.map +1 -0
- package/dist/composition/Stack/Stack.vue.d.ts +43 -0
- package/dist/composition/Stack/Stack.vue.d.ts.map +1 -0
- package/dist/composition/Stack/Stack.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/composition/Stack/Stack.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/index.d.ts +119 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -5
- package/dist/layouts/AppShell/AppShell.js +7 -0
- package/dist/layouts/AppShell/AppShell.js.map +1 -0
- package/dist/layouts/AppShell/AppShell.vue.d.ts +51 -0
- package/dist/layouts/AppShell/AppShell.vue.d.ts.map +1 -0
- package/dist/layouts/AppShell/AppShell.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/layouts/AppShell/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/Centered/Centered.js +7 -0
- package/dist/layouts/Centered/Centered.js.map +1 -0
- package/dist/layouts/Centered/Centered.vue.d.ts +48 -0
- package/dist/layouts/Centered/Centered.vue.d.ts.map +1 -0
- package/dist/layouts/Centered/Centered.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/layouts/Centered/Centered.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/Dashboard/Dashboard.js +7 -0
- package/dist/layouts/Dashboard/Dashboard.js.map +1 -0
- package/dist/layouts/Dashboard/Dashboard.vue.d.ts +60 -0
- package/dist/layouts/Dashboard/Dashboard.vue.d.ts.map +1 -0
- package/dist/layouts/Dashboard/Dashboard.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/layouts/Dashboard/Dashboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/FormLayout/FormLayout.js +7 -0
- package/dist/layouts/FormLayout/FormLayout.js.map +1 -0
- package/dist/layouts/FormLayout/FormLayout.vue.d.ts +46 -0
- package/dist/layouts/FormLayout/FormLayout.vue.d.ts.map +1 -0
- package/dist/layouts/FormLayout/FormLayout.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/layouts/FormLayout/FormLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/MasterDetail/MasterDetail.js +7 -0
- package/dist/layouts/MasterDetail/MasterDetail.js.map +1 -0
- package/dist/layouts/MasterDetail/MasterDetail.vue.d.ts +49 -0
- package/dist/layouts/MasterDetail/MasterDetail.vue.d.ts.map +1 -0
- package/dist/layouts/MasterDetail/MasterDetail.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/layouts/MasterDetail/MasterDetail.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/Reading/Reading.js +7 -0
- package/dist/layouts/Reading/Reading.js.map +1 -0
- package/dist/layouts/Reading/Reading.vue.d.ts +24 -0
- package/dist/layouts/Reading/Reading.vue.d.ts.map +1 -0
- package/dist/layouts/Reading/Reading.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/layouts/Reading/Reading.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/Settings/Settings.js +7 -0
- package/dist/layouts/Settings/Settings.js.map +1 -0
- package/dist/layouts/Settings/Settings.vue.d.ts +39 -0
- package/dist/layouts/Settings/Settings.vue.d.ts.map +1 -0
- package/dist/layouts/Settings/Settings.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/layouts/Settings/Settings.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/layouts/SplitLayout/SplitLayout.js +7 -0
- package/dist/layouts/SplitLayout/SplitLayout.js.map +1 -0
- package/dist/layouts/SplitLayout/SplitLayout.vue.d.ts +63 -0
- package/dist/layouts/SplitLayout/SplitLayout.vue.d.ts.map +1 -0
- package/dist/layouts/SplitLayout/SplitLayout.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/layouts/SplitLayout/SplitLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/lib/ancestor-disabled.d.ts +35 -0
- package/dist/lib/ancestor-disabled.d.ts.map +1 -0
- package/dist/lib/ancestor-disabled.js +86 -0
- package/dist/lib/ancestor-disabled.js.map +1 -0
- package/dist/lib/cn.d.ts.map +1 -1
- package/dist/lib/cn.js +46 -1
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/count-labels.d.ts +78 -0
- package/dist/lib/count-labels.d.ts.map +1 -0
- package/dist/lib/count-labels.js +29 -0
- package/dist/lib/count-labels.js.map +1 -0
- package/dist/lib/date-labels.d.ts +278 -0
- package/dist/lib/date-labels.d.ts.map +1 -0
- package/dist/lib/date-labels.js +157 -0
- package/dist/lib/date-labels.js.map +1 -0
- package/dist/lib/field-context.d.ts +178 -0
- package/dist/lib/field-context.d.ts.map +1 -0
- package/dist/lib/field-context.js +106 -0
- package/dist/lib/field-context.js.map +1 -0
- package/dist/lib/label-registry.d.ts +75 -0
- package/dist/lib/label-registry.d.ts.map +1 -0
- package/dist/lib/labels.d.ts +116 -0
- package/dist/lib/labels.d.ts.map +1 -0
- package/dist/lib/labels.js +84 -0
- package/dist/lib/labels.js.map +1 -0
- package/dist/lib/theme.d.ts +68 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +236 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +117 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +142 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +280 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +40 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +69 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +8 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js.map +1 -0
- package/dist/primitives/Accordion/Accordion.js +7 -0
- package/dist/primitives/Accordion/Accordion.js.map +1 -0
- package/dist/primitives/Accordion/Accordion.vue.d.ts +68 -0
- package/dist/primitives/Accordion/Accordion.vue.d.ts.map +1 -0
- package/dist/primitives/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/primitives/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/AlertDialog/AlertDialog.js +7 -0
- package/dist/primitives/AlertDialog/AlertDialog.js.map +1 -0
- package/dist/primitives/AlertDialog/AlertDialog.vue.d.ts +94 -0
- package/dist/primitives/AlertDialog/AlertDialog.vue.d.ts.map +1 -0
- package/dist/primitives/AlertDialog/AlertDialog.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/primitives/AlertDialog/AlertDialog.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Avatar/Avatar.js +2 -2
- package/dist/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/primitives/Avatar/Avatar.vue.d.ts +30 -3
- package/dist/primitives/Avatar/Avatar.vue.d.ts.map +1 -1
- package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +95 -14
- package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/AvatarGroup/AvatarGroup.js +7 -0
- package/dist/primitives/AvatarGroup/AvatarGroup.js.map +1 -0
- package/dist/primitives/AvatarGroup/AvatarGroup.vue.d.ts +104 -0
- package/dist/primitives/AvatarGroup/AvatarGroup.vue.d.ts.map +1 -0
- package/dist/primitives/AvatarGroup/AvatarGroup.vue_vue_type_script_setup_true_lang.js +139 -0
- package/dist/primitives/AvatarGroup/AvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Badge/Badge.js.map +1 -1
- package/dist/primitives/Badge/Badge.vue.d.ts +6 -6
- package/dist/primitives/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Breadcrumb/Breadcrumb.js +7 -0
- package/dist/primitives/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/primitives/Breadcrumb/Breadcrumb.vue.d.ts +25 -0
- package/dist/primitives/Breadcrumb/Breadcrumb.vue.d.ts.map +1 -0
- package/dist/primitives/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/primitives/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Button/Button.js +2 -2
- package/dist/primitives/Button/Button.js.map +1 -1
- package/dist/primitives/Button/Button.vue.d.ts +31 -8
- package/dist/primitives/Button/Button.vue.d.ts.map +1 -1
- package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js +32 -16
- package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/primitives/Checkbox/Checkbox.vue.d.ts +18 -3
- package/dist/primitives/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +46 -7
- package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Chip/Chip.js +7 -0
- package/dist/primitives/Chip/Chip.js.map +1 -0
- package/dist/primitives/Chip/Chip.vue.d.ts +79 -0
- package/dist/primitives/Chip/Chip.vue.d.ts.map +1 -0
- package/dist/primitives/Chip/Chip.vue_vue_type_script_setup_true_lang.js +139 -0
- package/dist/primitives/Chip/Chip.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/ColorPicker/ColorPicker.js +7 -0
- package/dist/primitives/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/primitives/ColorPicker/ColorPicker.vue.d.ts +125 -0
- package/dist/primitives/ColorPicker/ColorPicker.vue.d.ts.map +1 -0
- package/dist/primitives/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +301 -0
- package/dist/primitives/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Combobox/Combobox.js +7 -0
- package/dist/primitives/Combobox/Combobox.js.map +1 -0
- package/dist/primitives/Combobox/Combobox.vue.d.ts +205 -0
- package/dist/primitives/Combobox/Combobox.vue.d.ts.map +1 -0
- package/dist/primitives/Combobox/Combobox.vue_vue_type_script_setup_true_lang.js +345 -0
- package/dist/primitives/Combobox/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/ContextMenu/ContextMenu.js +7 -0
- package/dist/primitives/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/primitives/ContextMenu/ContextMenu.vue.d.ts +55 -0
- package/dist/primitives/ContextMenu/ContextMenu.vue.d.ts.map +1 -0
- package/dist/primitives/ContextMenu/ContextMenu.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/primitives/ContextMenu/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/DatePicker/DatePicker.js +7 -0
- package/dist/primitives/DatePicker/DatePicker.js.map +1 -0
- package/dist/primitives/DatePicker/DatePicker.vue.d.ts +102 -0
- package/dist/primitives/DatePicker/DatePicker.vue.d.ts.map +1 -0
- package/dist/primitives/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +292 -0
- package/dist/primitives/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.js +7 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.vue.d.ts +173 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +412 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.js +7 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.js.map +1 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.vue.d.ts +113 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.vue.d.ts.map +1 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +358 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.js +7 -0
- package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -0
- package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +181 -0
- package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts.map +1 -0
- package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +562 -0
- package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Dialog/Dialog.js +2 -2
- package/dist/primitives/Dialog/Dialog.js.map +1 -1
- package/dist/primitives/Dialog/Dialog.vue.d.ts +39 -0
- package/dist/primitives/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js +14 -5
- package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Drawer/Drawer.js +7 -0
- package/dist/primitives/Drawer/Drawer.js.map +1 -0
- package/dist/primitives/Drawer/Drawer.vue.d.ts +110 -0
- package/dist/primitives/Drawer/Drawer.vue.d.ts.map +1 -0
- package/dist/primitives/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +223 -0
- package/dist/primitives/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/primitives/DropdownMenu/DropdownMenu.vue.d.ts.map +1 -1
- package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Editable/Editable.js +7 -0
- package/dist/primitives/Editable/Editable.js.map +1 -0
- package/dist/primitives/Editable/Editable.vue.d.ts +200 -0
- package/dist/primitives/Editable/Editable.vue.d.ts.map +1 -0
- package/dist/primitives/Editable/Editable.vue_vue_type_script_setup_true_lang.js +275 -0
- package/dist/primitives/Editable/Editable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Field/Field.js.map +1 -1
- package/dist/primitives/Field/Field.vue.d.ts +32 -17
- package/dist/primitives/Field/Field.vue.d.ts.map +1 -1
- package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js +51 -18
- package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Fieldset/Fieldset.js +7 -0
- package/dist/primitives/Fieldset/Fieldset.js.map +1 -0
- package/dist/primitives/Fieldset/Fieldset.vue.d.ts +91 -0
- package/dist/primitives/Fieldset/Fieldset.vue.d.ts.map +1 -0
- package/dist/primitives/Fieldset/Fieldset.vue_vue_type_script_setup_true_lang.js +138 -0
- package/dist/primitives/Fieldset/Fieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/FileUpload/FileUpload.js +7 -0
- package/dist/primitives/FileUpload/FileUpload.js.map +1 -0
- package/dist/primitives/FileUpload/FileUpload.vue.d.ts +132 -0
- package/dist/primitives/FileUpload/FileUpload.vue.d.ts.map +1 -0
- package/dist/primitives/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +359 -0
- package/dist/primitives/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/HoverCard/HoverCard.js +7 -0
- package/dist/primitives/HoverCard/HoverCard.js.map +1 -0
- package/dist/primitives/HoverCard/HoverCard.vue.d.ts +68 -0
- package/dist/primitives/HoverCard/HoverCard.vue.d.ts.map +1 -0
- package/dist/primitives/HoverCard/HoverCard.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/primitives/HoverCard/HoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/IconButton/IconButton.js +7 -0
- package/dist/primitives/IconButton/IconButton.js.map +1 -0
- package/dist/primitives/IconButton/IconButton.vue.d.ts +45 -0
- package/dist/primitives/IconButton/IconButton.vue.d.ts.map +1 -0
- package/dist/primitives/IconButton/IconButton.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/primitives/IconButton/IconButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Indicator/Indicator.js +7 -0
- package/dist/primitives/Indicator/Indicator.js.map +1 -0
- package/dist/primitives/Indicator/Indicator.vue.d.ts +144 -0
- package/dist/primitives/Indicator/Indicator.vue.d.ts.map +1 -0
- package/dist/primitives/Indicator/Indicator.vue_vue_type_script_setup_true_lang.js +198 -0
- package/dist/primitives/Indicator/Indicator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Link/Link.js +7 -0
- package/dist/primitives/Link/Link.js.map +1 -0
- package/dist/primitives/Link/Link.vue.d.ts +46 -0
- package/dist/primitives/Link/Link.vue.d.ts.map +1 -0
- package/dist/primitives/Link/Link.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/primitives/Link/Link.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Menubar/Menubar.js.map +1 -1
- package/dist/primitives/Menubar/Menubar.vue.d.ts.map +1 -1
- package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/NumberField/NumberField.js +2 -2
- package/dist/primitives/NumberField/NumberField.js.map +1 -1
- package/dist/primitives/NumberField/NumberField.vue.d.ts +86 -25
- package/dist/primitives/NumberField/NumberField.vue.d.ts.map +1 -1
- package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +83 -39
- package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/OtpInput/OtpInput.js +7 -0
- package/dist/primitives/OtpInput/OtpInput.js.map +1 -0
- package/dist/primitives/OtpInput/OtpInput.vue.d.ts +110 -0
- package/dist/primitives/OtpInput/OtpInput.vue.d.ts.map +1 -0
- package/dist/primitives/OtpInput/OtpInput.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/primitives/OtpInput/OtpInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Pagination/Pagination.js +7 -0
- package/dist/primitives/Pagination/Pagination.js.map +1 -0
- package/dist/primitives/Pagination/Pagination.vue.d.ts +143 -0
- package/dist/primitives/Pagination/Pagination.vue.d.ts.map +1 -0
- package/dist/primitives/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +231 -0
- package/dist/primitives/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Progress/Progress.js +2 -2
- package/dist/primitives/Progress/Progress.js.map +1 -1
- package/dist/primitives/Progress/Progress.vue.d.ts +81 -15
- package/dist/primitives/Progress/Progress.vue.d.ts.map +1 -1
- package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js +88 -22
- package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/RadialProgress/RadialProgress.js +7 -0
- package/dist/primitives/RadialProgress/RadialProgress.js.map +1 -0
- package/dist/primitives/RadialProgress/RadialProgress.vue.d.ts +96 -0
- package/dist/primitives/RadialProgress/RadialProgress.vue.d.ts.map +1 -0
- package/dist/primitives/RadialProgress/RadialProgress.vue_vue_type_script_setup_true_lang.js +189 -0
- package/dist/primitives/RadialProgress/RadialProgress.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts +7 -7
- package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
- package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js +26 -9
- package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Rating/Rating.js +7 -0
- package/dist/primitives/Rating/Rating.js.map +1 -0
- package/dist/primitives/Rating/Rating.vue.d.ts +113 -0
- package/dist/primitives/Rating/Rating.vue.d.ts.map +1 -0
- package/dist/primitives/Rating/Rating.vue_vue_type_script_setup_true_lang.js +282 -0
- package/dist/primitives/Rating/Rating.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/ScrollArea/ScrollArea.js +7 -0
- package/dist/primitives/ScrollArea/ScrollArea.js.map +1 -0
- package/dist/primitives/ScrollArea/ScrollArea.vue.d.ts +25 -0
- package/dist/primitives/ScrollArea/ScrollArea.vue.d.ts.map +1 -0
- package/dist/primitives/ScrollArea/ScrollArea.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/primitives/ScrollArea/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts +5 -5
- package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js +51 -8
- package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Select/Select.js.map +1 -1
- package/dist/primitives/Select/Select.vue.d.ts +10 -10
- package/dist/primitives/Select/Select.vue.d.ts.map +1 -1
- package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js +105 -52
- package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Skeleton/Skeleton.vue.d.ts +1 -1
- package/dist/primitives/Slider/Slider.js.map +1 -1
- package/dist/primitives/Slider/Slider.vue.d.ts +24 -4
- package/dist/primitives/Slider/Slider.vue.d.ts.map +1 -1
- package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js +79 -9
- package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/SpeedDial/SpeedDial.js +7 -0
- package/dist/primitives/SpeedDial/SpeedDial.js.map +1 -0
- package/dist/primitives/SpeedDial/SpeedDial.vue.d.ts +58 -0
- package/dist/primitives/SpeedDial/SpeedDial.vue.d.ts.map +1 -0
- package/dist/primitives/SpeedDial/SpeedDial.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/primitives/SpeedDial/SpeedDial.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Stepper/Stepper.js +7 -0
- package/dist/primitives/Stepper/Stepper.js.map +1 -0
- package/dist/primitives/Stepper/Stepper.vue.d.ts +119 -0
- package/dist/primitives/Stepper/Stepper.vue.d.ts.map +1 -0
- package/dist/primitives/Stepper/Stepper.vue_vue_type_script_setup_true_lang.js +202 -0
- package/dist/primitives/Stepper/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Switch/Switch.js.map +1 -1
- package/dist/primitives/Switch/Switch.vue.d.ts +13 -3
- package/dist/primitives/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js +34 -5
- package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Tabs/Tabs.js.map +1 -1
- package/dist/primitives/Tabs/Tabs.vue.d.ts.map +1 -1
- package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/TagsInput/TagsInput.js +7 -0
- package/dist/primitives/TagsInput/TagsInput.js.map +1 -0
- package/dist/primitives/TagsInput/TagsInput.vue.d.ts +156 -0
- package/dist/primitives/TagsInput/TagsInput.vue.d.ts.map +1 -0
- package/dist/primitives/TagsInput/TagsInput.vue_vue_type_script_setup_true_lang.js +387 -0
- package/dist/primitives/TagsInput/TagsInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/TextField/TextField.js +2 -2
- package/dist/primitives/TextField/TextField.js.map +1 -1
- package/dist/primitives/TextField/TextField.vue.d.ts +119 -10
- package/dist/primitives/TextField/TextField.vue.d.ts.map +1 -1
- package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js +270 -21
- package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Textarea/Textarea.js +2 -2
- package/dist/primitives/Textarea/Textarea.js.map +1 -1
- package/dist/primitives/Textarea/Textarea.vue.d.ts +114 -14
- package/dist/primitives/Textarea/Textarea.vue.d.ts.map +1 -1
- package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +216 -20
- package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/TimePicker/TimePicker.js +7 -0
- package/dist/primitives/TimePicker/TimePicker.js.map +1 -0
- package/dist/primitives/TimePicker/TimePicker.vue.d.ts +111 -0
- package/dist/primitives/TimePicker/TimePicker.vue.d.ts.map +1 -0
- package/dist/primitives/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +185 -0
- package/dist/primitives/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/primitives/Toast/Toast.js +2 -1
- package/dist/primitives/Toast/Toast.js.map +1 -1
- package/dist/primitives/Toast/Toast.vue.d.ts +29 -3
- package/dist/primitives/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js +17 -7
- package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Toast/ToastItem.js +2 -2
- package/dist/primitives/Toast/ToastItem.js.map +1 -1
- package/dist/primitives/Toast/ToastItem.vue.d.ts +69 -12
- package/dist/primitives/Toast/ToastItem.vue.d.ts.map +1 -1
- package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primitives/Tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/primitives/Tooltip/Tooltip.vue.d.ts.map +1 -1
- package/dist/primitives/WindowControls/WindowControls.js +2 -2
- package/dist/primitives/WindowControls/WindowControls.js.map +1 -1
- package/dist/primitives/WindowControls/WindowControls.vue.d.ts +66 -10
- package/dist/primitives/WindowControls/WindowControls.vue.d.ts.map +1 -1
- package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js +23 -13
- package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/styles/global.css +116 -17
- package/dist/styles/theme.contrast.test.ts +460 -0
- package/dist/styles/theme.css +239 -41
- package/dist/theme.js +171 -0
- package/dist/theme.js.map +1 -0
- package/package.json +14 -4
- package/dist/icons/BrandMark.d.ts +0 -18
- package/dist/icons/BrandMark.d.ts.map +0 -1
- package/dist/icons/BrandMark.js +0 -47
- package/dist/icons/BrandMark.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastItem.js","names":[],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n
|
|
1
|
+
{"version":3,"file":"ToastItem.js","names":[],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { LabelOf } from \"../../lib/labels\";\n\n/**\n * Everything a toast publishes that is not the host's own copy — including the\n * two strings Reka UI would otherwise supply in English of its own accord.\n *\n * Declared here rather than in `Toast.vue`, which is where a reader would look\n * for it, and the reason is a module cycle rather than a preference.\n * `Toast.vue` imports this file; this file needs the defaults for the close\n * control it renders. Declaring them in `Toast.vue` and importing them back\n * would make that a real runtime cycle where today it is a type-only one, and\n * it would cost the block that reuses this card — `ToastStack` mounts\n * `ToastItem` directly through its own provider — the whole seam. Owning them\n * here means every card resolves its own names wherever it is mounted.\n *\n * `announce` and `region` are not decoration. Reka's `ToastProvider` defaults\n * its `label` to \"Notification\" and reads it out ahead of every toast's own\n * text in a hidden live region; its `ToastViewport` names the list\n * \"Notifications ({hotkey})\". Both are real props rather than hard-coded\n * vnode attributes, so these are set rather than overridden — but leaving\n * either unset falls back to English, not to nothing.\n */\nexport interface ToastLabels {\n /** The ✕ control on the card. */\n readonly close: string;\n /**\n * Spoken before each toast's own title, in a hidden live region, to say what\n * kind of thing has just arrived. Keep it to one word — it is a prefix on\n * every announcement, not a sentence.\n */\n readonly announce: string;\n /**\n * The name of the list the toasts stack in. `hotkey` is the key that focuses\n * it, as the environment reports it (\"F8\"), handed over raw so a language\n * can put it wherever it belongs in the phrase.\n */\n readonly region: LabelOf<{ hotkey: string }>;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const TOAST_LABELS: ToastLabels = {\n close: \"Close\",\n announce: \"Notification\",\n region: ({ hotkey }) => `Notifications (${hotkey})`,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n /** Names for what the card says on its own account, as any subset of `ToastLabels`. */\n labels?: LabelOverrides<ToastLabels>;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"toast\", TOAST_LABELS, () => props.labels);\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n accent: { icon: Sparkles, color: \"text-primary\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The slide-in animation rides this inner card, never ToastRoot: Reka\n drives ToastRoot's own transform for the swipe-to-dismiss gesture, so a\n filled entrance transform there would freeze the swipe. ToastRoot itself\n carries no animation, so Reka Presence unmounts it immediately on close. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :duration=\"duration\"\n class=\"outline-none\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Accent variant: a highlighted border to draw attention to the\n // toast's distinctiveness from the standard variants.\n variant === 'accent' && 'border-primary/40',\n )\n \"\n >\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n :aria-label=\"text.close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":""}
|
|
@@ -1,11 +1,52 @@
|
|
|
1
|
+
import { type LabelOverrides } from "../../lib/labels";
|
|
1
2
|
import type { ToastVariant } from "./Toast.vue";
|
|
3
|
+
import type { LabelOf } from "../../lib/labels";
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Everything a toast publishes that is not the host's own copy — including the
|
|
6
|
+
* two strings Reka UI would otherwise supply in English of its own accord.
|
|
7
|
+
*
|
|
8
|
+
* Declared here rather than in `Toast.vue`, which is where a reader would look
|
|
9
|
+
* for it, and the reason is a module cycle rather than a preference.
|
|
10
|
+
* `Toast.vue` imports this file; this file needs the defaults for the close
|
|
11
|
+
* control it renders. Declaring them in `Toast.vue` and importing them back
|
|
12
|
+
* would make that a real runtime cycle where today it is a type-only one, and
|
|
13
|
+
* it would cost the block that reuses this card — `ToastStack` mounts
|
|
14
|
+
* `ToastItem` directly through its own provider — the whole seam. Owning them
|
|
15
|
+
* here means every card resolves its own names wherever it is mounted.
|
|
16
|
+
*
|
|
17
|
+
* `announce` and `region` are not decoration. Reka's `ToastProvider` defaults
|
|
18
|
+
* its `label` to "Notification" and reads it out ahead of every toast's own
|
|
19
|
+
* text in a hidden live region; its `ToastViewport` names the list
|
|
20
|
+
* "Notifications ({hotkey})". Both are real props rather than hard-coded
|
|
21
|
+
* vnode attributes, so these are set rather than overridden — but leaving
|
|
22
|
+
* either unset falls back to English, not to nothing.
|
|
7
23
|
*/
|
|
8
|
-
|
|
24
|
+
export interface ToastLabels {
|
|
25
|
+
/** The ✕ control on the card. */
|
|
26
|
+
readonly close: string;
|
|
27
|
+
/**
|
|
28
|
+
* Spoken before each toast's own title, in a hidden live region, to say what
|
|
29
|
+
* kind of thing has just arrived. Keep it to one word — it is a prefix on
|
|
30
|
+
* every announcement, not a sentence.
|
|
31
|
+
*/
|
|
32
|
+
readonly announce: string;
|
|
33
|
+
/**
|
|
34
|
+
* The name of the list the toasts stack in. `hotkey` is the key that focuses
|
|
35
|
+
* it, as the environment reports it ("F8"), handed over raw so a language
|
|
36
|
+
* can put it wherever it belongs in the phrase.
|
|
37
|
+
*/
|
|
38
|
+
readonly region: LabelOf<{
|
|
39
|
+
hotkey: string;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Loom's English, co-located with the component so it tree-shakes with it, and
|
|
44
|
+
* exported so a host can build a partial vocabulary against the real thing.
|
|
45
|
+
*/
|
|
46
|
+
export declare const TOAST_LABELS: ToastLabels;
|
|
47
|
+
declare const _default: typeof __VLS_export;
|
|
48
|
+
export default _default;
|
|
49
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
9
50
|
/** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */
|
|
10
51
|
open?: boolean | undefined;
|
|
11
52
|
/** The toast's headline — always shown. */
|
|
@@ -20,19 +61,35 @@ type __VLS_Props = {
|
|
|
20
61
|
closable?: boolean;
|
|
21
62
|
/** Renders a single inline action button; emits `action` when pressed. */
|
|
22
63
|
actionLabel?: string;
|
|
23
|
-
|
|
24
|
-
|
|
64
|
+
/** Names for what the card says on its own account, as any subset of `ToastLabels`. */
|
|
65
|
+
labels?: LabelOverrides<ToastLabels>;
|
|
66
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
67
|
"update:open": (value: boolean) => any;
|
|
26
68
|
action: () => any;
|
|
27
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
69
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
70
|
+
/** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */
|
|
71
|
+
open?: boolean | undefined;
|
|
72
|
+
/** The toast's headline — always shown. */
|
|
73
|
+
title: string;
|
|
74
|
+
/** An optional second line of detail below the title. */
|
|
75
|
+
description?: string;
|
|
76
|
+
/** Selects the accent icon and colour. */
|
|
77
|
+
variant?: ToastVariant;
|
|
78
|
+
/** ms before auto-dismiss; the Reka default pauses on hover/focus. */
|
|
79
|
+
duration?: number;
|
|
80
|
+
/** Shows the ✕ close button. */
|
|
81
|
+
closable?: boolean;
|
|
82
|
+
/** Renders a single inline action button; emits `action` when pressed. */
|
|
83
|
+
actionLabel?: string;
|
|
84
|
+
/** Names for what the card says on its own account, as any subset of `ToastLabels`. */
|
|
85
|
+
labels?: LabelOverrides<ToastLabels>;
|
|
86
|
+
}> & Readonly<{
|
|
28
87
|
"onUpdate:open"?: (value: boolean) => any;
|
|
29
88
|
onAction?: () => any;
|
|
30
89
|
}>, {
|
|
31
|
-
|
|
90
|
+
duration: number;
|
|
32
91
|
open: boolean | undefined;
|
|
92
|
+
variant: ToastVariant;
|
|
33
93
|
closable: boolean;
|
|
34
|
-
duration: number;
|
|
35
94
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
-
declare const _default: typeof __VLS_export;
|
|
37
|
-
export default _default;
|
|
38
95
|
//# sourceMappingURL=ToastItem.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastItem.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Toast/ToastItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToastItem.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Toast/ToastItem.vue"],"names":[],"mappings":"AA4KA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,WAI1B,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAQd,mGAAmG;WAC5F,OAAO,GAAG,SAAS;IAC1B,2CAA2C;WACpC,MAAM;IACb,yDAAyD;kBAC3C,MAAM;IACpB,0CAA0C;cAChC,YAAY;IACtB,sEAAsE;eAC3D,MAAM;IACjB,gCAAgC;eACrB,OAAO;IAClB,0EAA0E;kBAC5D,MAAM;IACpB,uFAAuF;aAC9E,cAAc,CAAC,WAAW,CAAC;;;;;IAfpC,mGAAmG;WAC5F,OAAO,GAAG,SAAS;IAC1B,2CAA2C;WACpC,MAAM;IACb,yDAAyD;kBAC3C,MAAM;IACpB,0CAA0C;cAChC,YAAY;IACtB,sEAAsE;eAC3D,MAAM;IACjB,gCAAgC;eACrB,OAAO;IAClB,0EAA0E;kBAC5D,MAAM;IACpB,uFAAuF;aAC9E,cAAc,CAAC,WAAW,CAAC;;;;;cANzB,MAAM;UARV,OAAO,GAAG,SAAS;aAMhB,YAAY;cAIX,OAAO;6EAmRlB,CAAC"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { cn } from "../../lib/cn.js";
|
|
2
2
|
import { optional } from "../../lib/props.js";
|
|
3
|
+
import { useLabels } from "../../lib/labels.js";
|
|
3
4
|
import { CircleCheck, CircleX, Info, Sparkles, TriangleAlert, X } from "@lucide/vue";
|
|
4
|
-
import { computed, createBlock, createCommentVNode,
|
|
5
|
+
import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
5
6
|
import { ToastAction, ToastClose, ToastDescription, ToastRoot, ToastTitle } from "reka-ui";
|
|
6
7
|
//#region src/primitives/Toast/ToastItem.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var _hoisted_1 = {
|
|
8
|
-
|
|
9
|
-
"aria-hidden": "true",
|
|
10
|
-
class: "pointer-events-none absolute inset-0 rounded-md animate-conduct"
|
|
11
|
-
};
|
|
12
|
-
var _hoisted_2 = { class: "min-w-0 flex-1" };
|
|
13
|
-
var _hoisted_3 = {
|
|
8
|
+
var _hoisted_1 = { class: "min-w-0 flex-1" };
|
|
9
|
+
var _hoisted_2 = {
|
|
14
10
|
type: "button",
|
|
15
11
|
class: "shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
|
|
16
12
|
};
|
|
17
13
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* `ToastViewport` it teleports into: `Toast` bundles that pair for the
|
|
21
|
-
* standalone case. Not exported from the barrel — hosts use `Toast`.
|
|
14
|
+
* Loom's English, co-located with the component so it tree-shakes with it, and
|
|
15
|
+
* exported so a host can build a partial vocabulary against the real thing.
|
|
22
16
|
*/
|
|
17
|
+
var TOAST_LABELS = {
|
|
18
|
+
close: "Close",
|
|
19
|
+
announce: "Notification",
|
|
20
|
+
region: ({ hotkey }) => `Notifications (${hotkey})`
|
|
21
|
+
};
|
|
23
22
|
var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
24
23
|
__name: "ToastItem",
|
|
25
24
|
props: {
|
|
@@ -35,11 +34,13 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
35
34
|
type: Boolean,
|
|
36
35
|
default: true
|
|
37
36
|
},
|
|
38
|
-
actionLabel: {}
|
|
37
|
+
actionLabel: {},
|
|
38
|
+
labels: {}
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:open", "action"],
|
|
41
41
|
setup(__props) {
|
|
42
42
|
const props = __props;
|
|
43
|
+
const text = useLabels("toast", TOAST_LABELS, () => props.labels);
|
|
43
44
|
const toastAccents = {
|
|
44
45
|
info: {
|
|
45
46
|
icon: Info,
|
|
@@ -57,7 +58,7 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
57
58
|
icon: CircleX,
|
|
58
59
|
color: "text-destructive"
|
|
59
60
|
},
|
|
60
|
-
|
|
61
|
+
accent: {
|
|
61
62
|
icon: Sparkles,
|
|
62
63
|
color: "text-primary"
|
|
63
64
|
}
|
|
@@ -69,13 +70,12 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
69
70
|
class: "outline-none",
|
|
70
71
|
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:open", $event))
|
|
71
72
|
}), {
|
|
72
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cn)("relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg", __props.variant === "
|
|
73
|
-
__props.variant === "ai" ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true),
|
|
73
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cn)("relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg", __props.variant === "accent" && "border-primary/40")) }, [
|
|
74
74
|
(openBlock(), createBlock(resolveDynamicComponent(accent.value.icon), {
|
|
75
75
|
class: normalizeClass(unref(cn)("mt-0.5 h-4 w-4 shrink-0", accent.value.color)),
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
}, null, 8, ["class"])),
|
|
78
|
-
createElementVNode("div",
|
|
78
|
+
createElementVNode("div", _hoisted_1, [createVNode(unref(ToastTitle), { class: "text-sm font-medium" }, {
|
|
79
79
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
|
|
80
80
|
_: 1
|
|
81
81
|
}), __props.description ? (openBlock(), createBlock(unref(ToastDescription), {
|
|
@@ -86,22 +86,22 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
86
86
|
_: 1
|
|
87
87
|
})) : createCommentVNode("", true)]),
|
|
88
88
|
__props.actionLabel ? (openBlock(), createBlock(unref(ToastAction), {
|
|
89
|
-
key:
|
|
89
|
+
key: 0,
|
|
90
90
|
"alt-text": __props.actionLabel,
|
|
91
91
|
"as-child": "",
|
|
92
92
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("action"))
|
|
93
93
|
}, {
|
|
94
|
-
default: withCtx(() => [createElementVNode("button",
|
|
94
|
+
default: withCtx(() => [createElementVNode("button", _hoisted_2, toDisplayString(__props.actionLabel), 1)]),
|
|
95
95
|
_: 1
|
|
96
96
|
}, 8, ["alt-text"])) : createCommentVNode("", true),
|
|
97
97
|
__props.closable ? (openBlock(), createBlock(unref(ToastClose), {
|
|
98
|
-
key:
|
|
99
|
-
"aria-label":
|
|
98
|
+
key: 1,
|
|
99
|
+
"aria-label": unref(text).close,
|
|
100
100
|
class: "absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
|
|
101
101
|
}, {
|
|
102
102
|
default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
|
|
103
103
|
_: 1
|
|
104
|
-
})) : createCommentVNode("", true)
|
|
104
|
+
}, 8, ["aria-label"])) : createCommentVNode("", true)
|
|
105
105
|
], 2)]),
|
|
106
106
|
_: 1
|
|
107
107
|
}, 16, ["duration"]);
|
|
@@ -109,6 +109,6 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
//#endregion
|
|
112
|
-
export { ToastItem_vue_vue_type_script_setup_true_lang_default as default };
|
|
112
|
+
export { TOAST_LABELS, ToastItem_vue_vue_type_script_setup_true_lang_default as default };
|
|
113
113
|
|
|
114
114
|
//# sourceMappingURL=ToastItem.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastItem.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n
|
|
1
|
+
{"version":3,"file":"ToastItem.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { LabelOf } from \"../../lib/labels\";\n\n/**\n * Everything a toast publishes that is not the host's own copy — including the\n * two strings Reka UI would otherwise supply in English of its own accord.\n *\n * Declared here rather than in `Toast.vue`, which is where a reader would look\n * for it, and the reason is a module cycle rather than a preference.\n * `Toast.vue` imports this file; this file needs the defaults for the close\n * control it renders. Declaring them in `Toast.vue` and importing them back\n * would make that a real runtime cycle where today it is a type-only one, and\n * it would cost the block that reuses this card — `ToastStack` mounts\n * `ToastItem` directly through its own provider — the whole seam. Owning them\n * here means every card resolves its own names wherever it is mounted.\n *\n * `announce` and `region` are not decoration. Reka's `ToastProvider` defaults\n * its `label` to \"Notification\" and reads it out ahead of every toast's own\n * text in a hidden live region; its `ToastViewport` names the list\n * \"Notifications ({hotkey})\". Both are real props rather than hard-coded\n * vnode attributes, so these are set rather than overridden — but leaving\n * either unset falls back to English, not to nothing.\n */\nexport interface ToastLabels {\n /** The ✕ control on the card. */\n readonly close: string;\n /**\n * Spoken before each toast's own title, in a hidden live region, to say what\n * kind of thing has just arrived. Keep it to one word — it is a prefix on\n * every announcement, not a sentence.\n */\n readonly announce: string;\n /**\n * The name of the list the toasts stack in. `hotkey` is the key that focuses\n * it, as the environment reports it (\"F8\"), handed over raw so a language\n * can put it wherever it belongs in the phrase.\n */\n readonly region: LabelOf<{ hotkey: string }>;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const TOAST_LABELS: ToastLabels = {\n close: \"Close\",\n announce: \"Notification\",\n region: ({ hotkey }) => `Notifications (${hotkey})`,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n /** Names for what the card says on its own account, as any subset of `ToastLabels`. */\n labels?: LabelOverrides<ToastLabels>;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"toast\", TOAST_LABELS, () => props.labels);\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n accent: { icon: Sparkles, color: \"text-primary\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The slide-in animation rides this inner card, never ToastRoot: Reka\n drives ToastRoot's own transform for the swipe-to-dismiss gesture, so a\n filled entrance transform there would freeze the swipe. ToastRoot itself\n carries no animation, so Reka Presence unmounts it immediately on close. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :duration=\"duration\"\n class=\"outline-none\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Accent variant: a highlighted border to draw attention to the\n // toast's distinctiveness from the standard variants.\n variant === 'accent' && 'border-primary/40',\n )\n \"\n >\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n :aria-label=\"text.close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;AA4CA,IAAa,eAA4B;CACvC,OAAO;CACP,UAAU;CACV,SAAS,EAAE,aAAa,kBAAkB,OAAO;AACnD;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ;EAkCd,MAAM,OAAO,UAAU,SAAS,oBAAoB,MAAM,MAAM;EAIhE,MAAM,eAAe;GACnB,MAAM;IAAE,MAAM;IAAM,OAAO;GAAY;GACvC,SAAS;IAAE,MAAM;IAAa,OAAO;GAAe;GACpD,SAAS;IAAE,MAAM;IAAe,OAAO;GAAe;GACtD,aAAa;IAAE,MAAM;IAAS,OAAO;GAAmB;GACxD,QAAQ;IAAE,MAAM;IAAU,OAAO;GAAe;EAClD;EAEA,MAAM,SAAS,eAAe,aAAa,MAAM,QAAQ;;GAQvD,OAAA,UAAA,GAAA,YA6CY,MAAA,SAAA,GA7CZ,WACU,MA4CE,QAAA,CA5CM,CAAA,EAAA,MAAG,QAAA,KAAI,CAAA,GAAA;IACtB,UAAU,QAAA;IACX,OAAM;IACL,iBAAW,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,eAAgB,MAAM;;IAEzC,SAAA,cAsCM,CAtCN,mBAsCM,OAAA,EArCH,OAAK,eAAW,MAAA,EAAA,CAAE,CAAA,0IAA4S,QAAA,YAAO,YAAA,mBAAA,CAAA,EAAA,GAAA;MAStU,UAAA,GAAA,YAIE,wBAHK,OAAA,MAAO,IAAI,GAAA;MACf,OAAK,eAAE,MAAA,EAAA,CAAE,CAAA,2BAA4B,OAAA,MAAO,KAAK,CAAA;MAClD,eAAY;;KAEd,mBAKM,OALN,YAKM,CAJJ,YAAgE,MAAA,UAAA,GAAA,EAApD,OAAM,sBAAqB,GAAA;MAAC,SAAA,cAAW,CAAR,gBAAA,gBAAA,QAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;KACxB,CAAA,GAAA,QAAA,eAAxB,UAAA,GAAA,YAEmB,MAAA,gBAAA,GAAA;;MAFkB,OAAM;;MACzC,SAAA,cAAiB,CAAd,gBAAA,gBAAA,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;KAIC,QAAA,eAAnB,UAAA,GAAA,YAOc,MAAA,WAAA,GAAA;;MAPmB,YAAU,QAAA;MAAa,YAAA;MAAU,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;;MAC5E,SAAA,cAKS,CALT,mBAKS,UALT,YAKS,gBADJ,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;KAKV,QAAA,YADR,UAAA,GAAA,YAMa,MAAA,UAAA,GAAA;;MAJV,cAAY,MAAA,IAAA,CAAI,CAAC;MAClB,OAAM;;MAEN,SAAA,cAAyB,CAAzB,YAAyB,MAAA,CAAA,GAAA,EAAtB,OAAM,cAAa,CAAA,CAAA,CAAA"}
|
|
@@ -35,10 +35,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
}> & Readonly<{
|
|
36
36
|
"onUpdate:open"?: (value: boolean) => any;
|
|
37
37
|
}>, {
|
|
38
|
+
delay: number;
|
|
38
39
|
open: boolean | undefined;
|
|
39
40
|
side: TooltipSide;
|
|
40
41
|
sideOffset: number;
|
|
41
|
-
delay: number;
|
|
42
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
43
43
|
trigger?: (props: {}) => any;
|
|
44
44
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Tooltip/Tooltip.vue"],"names":[],"mappings":"AA8HA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;wBACzC,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAuBd,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;IAT1B,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"Tooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Tooltip/Tooltip.vue"],"names":[],"mappings":"AA8HA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;wBACzC,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAuBd,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;IAT1B,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;WAFlB,MAAM;UAEP,OAAO,GAAG,SAAS;UANnB,WAAW;gBAEL,MAAM;;cA4LT,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;EAWzC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import WindowControls_vue_vue_type_script_setup_true_lang_default from "./WindowControls.vue_vue_type_script_setup_true_lang.js";
|
|
1
|
+
import WindowControls_vue_vue_type_script_setup_true_lang_default, { WINDOW_CONTROLS_LABELS } from "./WindowControls.vue_vue_type_script_setup_true_lang.js";
|
|
2
2
|
//#region src/primitives/WindowControls/WindowControls.vue
|
|
3
3
|
var WindowControls_default = WindowControls_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { WindowControls_default as default };
|
|
5
|
+
export { WINDOW_CONTROLS_LABELS, WindowControls_default as default };
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=WindowControls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowControls.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/**
|
|
1
|
+
{"version":3,"file":"WindowControls.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * `platform` tells the cluster whether to render at all: on macOS the operating\n * system owns the traffic-light buttons, so a second set drawn by Loom would be\n * redundant and confusing. The host decides which platform it is on — Loom never\n * sniffs the OS at runtime, because a Tauri or Electron host already knows its\n * platform and a PWA has no native window controls to compete with.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/** The desktop platform that owns the window chrome. */\nexport type WindowPlatform = \"windows\" | \"macos\" | \"linux\";\n\n/**\n * The three buttons' accessible names. There are four, because the middle\n * button is one control in two states and a language may well name them with\n * unrelated words.\n *\n * Every glyph here is an inline SVG marked `aria-hidden`, so these names are\n * the only thing a screen reader has to go on — a missing one is not a degraded\n * label but an unnamed button.\n */\nexport interface WindowControlsLabels {\n /** Send the window to the taskbar. */\n readonly minimize: string;\n /** Fill the screen. The middle button's name while the window is restored. */\n readonly maximize: string;\n /** Return to the previous size. The same button's name while maximized. */\n readonly restore: string;\n /** Close the window. */\n readonly close: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const WINDOW_CONTROLS_LABELS: WindowControlsLabels = {\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The desktop platform the window is running on. On macOS the OS draws its\n * own traffic-light buttons, so this cluster renders nothing there. The host\n * decides — Loom does not sniff the OS, because the host already knows its\n * platform and a PWA has no native controls to avoid.\n */\n platform?: WindowPlatform;\n /** Swaps the middle button between its Maximize and Restore glyph and label. */\n isMaximized?: boolean;\n /**\n * Names for the three buttons, as any subset of `WindowControlsLabels` —\n * the rest stay as the host's `provideLoomLabels` vocabulary left them, and\n * then as Loom's English.\n *\n * This took a whole object before the seam existed, which meant a host that\n * wanted one word in their own language had to restate the other three in\n * English and keep them in step by hand.\n */\n labels?: LabelOverrides<WindowControlsLabels>;\n }>(),\n { platform: \"windows\", isMaximized: false },\n);\n\nconst emit = defineEmits<{\n (e: \"minimize\"): void;\n (e: \"maximize\"): void;\n (e: \"close\"): void;\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"windowControls\", WINDOW_CONTROLS_LABELS, () => props.labels);\n</script>\n\n<template>\n <!-- On macOS the OS owns the traffic-light buttons; rendering a second set\n would be redundant. The host can also choose \"linux\" if their desktop\n environment handles window buttons natively. -->\n <div\n v-if=\"platform !== 'macos'\"\n class=\"flex h-full items-stretch\"\n style=\"-webkit-app-region: no-drag\"\n >\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.minimize\"\n data-testid=\"win-minimize\"\n @click=\"emit('minimize')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect y=\"4.5\" width=\"10\" height=\"1\" fill=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"isMaximized ? text.restore : text.maximize\"\n data-testid=\"win-maximize\"\n @click=\"emit('maximize')\"\n >\n <svg v-if=\"!isMaximized\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n <svg v-else width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" fill=\"none\" stroke=\"currentColor\" />\n <path d=\"M2.5 2.5 V0.5 H9.5 V7.5 H7.5\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.close\"\n data-testid=\"win-close\"\n @click=\"emit('close')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M0 0 L10 10 M10 0 L0 10\" stroke=\"currentColor\" />\n </svg>\n </button>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1,41 +1,97 @@
|
|
|
1
|
+
import { type LabelOverrides } from "../../lib/labels";
|
|
1
2
|
/**
|
|
2
3
|
* WindowControls — the minimize / maximize / close cluster for a frameless
|
|
3
4
|
* (custom-chrome) window. Presentational only: it emits intents; the host wires
|
|
4
5
|
* them to the platform (the desktop shell's window bridge). Windows-style layout —
|
|
5
6
|
* on macOS the OS draws native traffic-lights, so hide this there.
|
|
6
7
|
*
|
|
8
|
+
* `platform` tells the cluster whether to render at all: on macOS the operating
|
|
9
|
+
* system owns the traffic-light buttons, so a second set drawn by Loom would be
|
|
10
|
+
* redundant and confusing. The host decides which platform it is on — Loom never
|
|
11
|
+
* sniffs the OS at runtime, because a Tauri or Electron host already knows its
|
|
12
|
+
* platform and a PWA has no native window controls to compete with.
|
|
13
|
+
*
|
|
7
14
|
* The close button is the one place `destructive` is allowed without a confirm:
|
|
8
15
|
* OS window-close is an expected, reversible-by-reopen affordance.
|
|
9
16
|
*/
|
|
10
|
-
/**
|
|
17
|
+
/** The desktop platform that owns the window chrome. */
|
|
18
|
+
export type WindowPlatform = "windows" | "macos" | "linux";
|
|
19
|
+
/**
|
|
20
|
+
* The three buttons' accessible names. There are four, because the middle
|
|
21
|
+
* button is one control in two states and a language may well name them with
|
|
22
|
+
* unrelated words.
|
|
23
|
+
*
|
|
24
|
+
* Every glyph here is an inline SVG marked `aria-hidden`, so these names are
|
|
25
|
+
* the only thing a screen reader has to go on — a missing one is not a degraded
|
|
26
|
+
* label but an unnamed button.
|
|
27
|
+
*/
|
|
11
28
|
export interface WindowControlsLabels {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
29
|
+
/** Send the window to the taskbar. */
|
|
30
|
+
readonly minimize: string;
|
|
31
|
+
/** Fill the screen. The middle button's name while the window is restored. */
|
|
32
|
+
readonly maximize: string;
|
|
33
|
+
/** Return to the previous size. The same button's name while maximized. */
|
|
34
|
+
readonly restore: string;
|
|
35
|
+
/** Close the window. */
|
|
36
|
+
readonly close: string;
|
|
16
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Loom's English, co-located with the component so it tree-shakes with it, and
|
|
40
|
+
* exported so a host can build a partial vocabulary against the real thing.
|
|
41
|
+
*/
|
|
42
|
+
export declare const WINDOW_CONTROLS_LABELS: WindowControlsLabels;
|
|
17
43
|
declare const _default: typeof __VLS_export;
|
|
18
44
|
export default _default;
|
|
19
45
|
declare const __VLS_export: import("vue").DefineComponent<{
|
|
46
|
+
/**
|
|
47
|
+
* The desktop platform the window is running on. On macOS the OS draws its
|
|
48
|
+
* own traffic-light buttons, so this cluster renders nothing there. The host
|
|
49
|
+
* decides — Loom does not sniff the OS, because the host already knows its
|
|
50
|
+
* platform and a PWA has no native controls to avoid.
|
|
51
|
+
*/
|
|
52
|
+
platform?: WindowPlatform;
|
|
20
53
|
/** Swaps the middle button between its Maximize and Restore glyph and label. */
|
|
21
54
|
isMaximized?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Names for the three buttons, as any subset of `WindowControlsLabels` —
|
|
57
|
+
* the rest stay as the host's `provideLoomLabels` vocabulary left them, and
|
|
58
|
+
* then as Loom's English.
|
|
59
|
+
*
|
|
60
|
+
* This took a whole object before the seam existed, which meant a host that
|
|
61
|
+
* wanted one word in their own language had to restate the other three in
|
|
62
|
+
* English and keep them in step by hand.
|
|
63
|
+
*/
|
|
64
|
+
labels?: LabelOverrides<WindowControlsLabels>;
|
|
24
65
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
25
66
|
close: () => any;
|
|
26
67
|
minimize: () => any;
|
|
27
68
|
maximize: () => any;
|
|
28
69
|
}, string, import("vue").PublicProps, Readonly<{
|
|
70
|
+
/**
|
|
71
|
+
* The desktop platform the window is running on. On macOS the OS draws its
|
|
72
|
+
* own traffic-light buttons, so this cluster renders nothing there. The host
|
|
73
|
+
* decides — Loom does not sniff the OS, because the host already knows its
|
|
74
|
+
* platform and a PWA has no native controls to avoid.
|
|
75
|
+
*/
|
|
76
|
+
platform?: WindowPlatform;
|
|
29
77
|
/** Swaps the middle button between its Maximize and Restore glyph and label. */
|
|
30
78
|
isMaximized?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Names for the three buttons, as any subset of `WindowControlsLabels` —
|
|
81
|
+
* the rest stay as the host's `provideLoomLabels` vocabulary left them, and
|
|
82
|
+
* then as Loom's English.
|
|
83
|
+
*
|
|
84
|
+
* This took a whole object before the seam existed, which meant a host that
|
|
85
|
+
* wanted one word in their own language had to restate the other three in
|
|
86
|
+
* English and keep them in step by hand.
|
|
87
|
+
*/
|
|
88
|
+
labels?: LabelOverrides<WindowControlsLabels>;
|
|
33
89
|
}> & Readonly<{
|
|
34
90
|
onClose?: () => any;
|
|
35
91
|
onMinimize?: () => any;
|
|
36
92
|
onMaximize?: () => any;
|
|
37
93
|
}>, {
|
|
94
|
+
platform: WindowPlatform;
|
|
38
95
|
isMaximized: boolean;
|
|
39
|
-
labels: WindowControlsLabels;
|
|
40
96
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
97
|
//# sourceMappingURL=WindowControls.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowControls.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WindowControls.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"names":[],"mappings":"AAiJA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlE;;;;;;;;;;;;;;GAcG;AAEH,wDAAwD;AACxD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,oBAKpC,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd;;;;;OAKG;eACQ,cAAc;IACzB,gFAAgF;kBAClE,OAAO;IACrB;;;;;;;;OAQG;aACM,cAAc,CAAC,oBAAoB,CAAC;;;;;;IAlB7C;;;;;OAKG;eACQ,cAAc;IACzB,gFAAgF;kBAClE,OAAO;IACrB;;;;;;;;OAQG;aACM,cAAc,CAAC,oBAAoB,CAAC;;;;;;cAZlC,cAAc;iBAEX,OAAO;6EA6MrB,CAAC"}
|
package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLabels } from "../../lib/labels.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, unref } from "vue";
|
|
2
3
|
//#region src/primitives/WindowControls/WindowControls.vue?vue&type=script&setup=true&lang.ts
|
|
3
4
|
var _hoisted_1 = {
|
|
5
|
+
key: 0,
|
|
4
6
|
class: "flex h-full items-stretch",
|
|
5
7
|
style: { "-webkit-app-region": "no-drag" }
|
|
6
8
|
};
|
|
@@ -21,19 +23,25 @@ var _hoisted_5 = {
|
|
|
21
23
|
"aria-hidden": "true"
|
|
22
24
|
};
|
|
23
25
|
var _hoisted_6 = ["aria-label"];
|
|
26
|
+
/**
|
|
27
|
+
* Loom's English, co-located with the component so it tree-shakes with it, and
|
|
28
|
+
* exported so a host can build a partial vocabulary against the real thing.
|
|
29
|
+
*/
|
|
30
|
+
var WINDOW_CONTROLS_LABELS = {
|
|
31
|
+
minimize: "Minimize",
|
|
32
|
+
maximize: "Maximize",
|
|
33
|
+
restore: "Restore",
|
|
34
|
+
close: "Close"
|
|
35
|
+
};
|
|
24
36
|
var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
25
37
|
__name: "WindowControls",
|
|
26
38
|
props: {
|
|
39
|
+
platform: { default: "windows" },
|
|
27
40
|
isMaximized: {
|
|
28
41
|
type: Boolean,
|
|
29
42
|
default: false
|
|
30
43
|
},
|
|
31
|
-
labels: {
|
|
32
|
-
minimize: "Minimize",
|
|
33
|
-
maximize: "Maximize",
|
|
34
|
-
restore: "Restore",
|
|
35
|
-
close: "Close"
|
|
36
|
-
}) }
|
|
44
|
+
labels: {}
|
|
37
45
|
},
|
|
38
46
|
emits: [
|
|
39
47
|
"minimize",
|
|
@@ -41,13 +49,15 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
41
49
|
"close"
|
|
42
50
|
],
|
|
43
51
|
setup(__props, { emit: __emit }) {
|
|
52
|
+
const props = __props;
|
|
44
53
|
const emit = __emit;
|
|
54
|
+
const text = useLabels("windowControls", WINDOW_CONTROLS_LABELS, () => props.labels);
|
|
45
55
|
return (_ctx, _cache) => {
|
|
46
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
56
|
+
return __props.platform !== "macos" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
47
57
|
createElementVNode("button", {
|
|
48
58
|
type: "button",
|
|
49
59
|
class: "flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
|
|
50
|
-
"aria-label":
|
|
60
|
+
"aria-label": unref(text).minimize,
|
|
51
61
|
"data-testid": "win-minimize",
|
|
52
62
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("minimize"))
|
|
53
63
|
}, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
|
|
@@ -64,7 +74,7 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
64
74
|
createElementVNode("button", {
|
|
65
75
|
type: "button",
|
|
66
76
|
class: "flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
|
|
67
|
-
"aria-label": __props.isMaximized ?
|
|
77
|
+
"aria-label": __props.isMaximized ? unref(text).restore : unref(text).maximize,
|
|
68
78
|
"data-testid": "win-maximize",
|
|
69
79
|
onClick: _cache[1] || (_cache[1] = ($event) => emit("maximize"))
|
|
70
80
|
}, [!__props.isMaximized ? (openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[4] || (_cache[4] = [createElementVNode("rect", {
|
|
@@ -89,7 +99,7 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
89
99
|
createElementVNode("button", {
|
|
90
100
|
type: "button",
|
|
91
101
|
class: "flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
|
|
92
|
-
"aria-label":
|
|
102
|
+
"aria-label": unref(text).close,
|
|
93
103
|
"data-testid": "win-close",
|
|
94
104
|
onClick: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
95
105
|
}, [..._cache[6] || (_cache[6] = [createElementVNode("svg", {
|
|
@@ -101,11 +111,11 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
101
111
|
d: "M0 0 L10 10 M10 0 L0 10",
|
|
102
112
|
stroke: "currentColor"
|
|
103
113
|
})], -1)])], 8, _hoisted_6)
|
|
104
|
-
]);
|
|
114
|
+
])) : createCommentVNode("", true);
|
|
105
115
|
};
|
|
106
116
|
}
|
|
107
117
|
});
|
|
108
118
|
//#endregion
|
|
109
|
-
export { WindowControls_vue_vue_type_script_setup_true_lang_default as default };
|
|
119
|
+
export { WINDOW_CONTROLS_LABELS, WindowControls_vue_vue_type_script_setup_true_lang_default as default };
|
|
110
120
|
|
|
111
121
|
//# sourceMappingURL=WindowControls.vue_vue_type_script_setup_true_lang.js.map
|
package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowControls.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/**
|
|
1
|
+
{"version":3,"file":"WindowControls.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * `platform` tells the cluster whether to render at all: on macOS the operating\n * system owns the traffic-light buttons, so a second set drawn by Loom would be\n * redundant and confusing. The host decides which platform it is on — Loom never\n * sniffs the OS at runtime, because a Tauri or Electron host already knows its\n * platform and a PWA has no native window controls to compete with.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/** The desktop platform that owns the window chrome. */\nexport type WindowPlatform = \"windows\" | \"macos\" | \"linux\";\n\n/**\n * The three buttons' accessible names. There are four, because the middle\n * button is one control in two states and a language may well name them with\n * unrelated words.\n *\n * Every glyph here is an inline SVG marked `aria-hidden`, so these names are\n * the only thing a screen reader has to go on — a missing one is not a degraded\n * label but an unnamed button.\n */\nexport interface WindowControlsLabels {\n /** Send the window to the taskbar. */\n readonly minimize: string;\n /** Fill the screen. The middle button's name while the window is restored. */\n readonly maximize: string;\n /** Return to the previous size. The same button's name while maximized. */\n readonly restore: string;\n /** Close the window. */\n readonly close: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const WINDOW_CONTROLS_LABELS: WindowControlsLabels = {\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The desktop platform the window is running on. On macOS the OS draws its\n * own traffic-light buttons, so this cluster renders nothing there. The host\n * decides — Loom does not sniff the OS, because the host already knows its\n * platform and a PWA has no native controls to avoid.\n */\n platform?: WindowPlatform;\n /** Swaps the middle button between its Maximize and Restore glyph and label. */\n isMaximized?: boolean;\n /**\n * Names for the three buttons, as any subset of `WindowControlsLabels` —\n * the rest stay as the host's `provideLoomLabels` vocabulary left them, and\n * then as Loom's English.\n *\n * This took a whole object before the seam existed, which meant a host that\n * wanted one word in their own language had to restate the other three in\n * English and keep them in step by hand.\n */\n labels?: LabelOverrides<WindowControlsLabels>;\n }>(),\n { platform: \"windows\", isMaximized: false },\n);\n\nconst emit = defineEmits<{\n (e: \"minimize\"): void;\n (e: \"maximize\"): void;\n (e: \"close\"): void;\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"windowControls\", WINDOW_CONTROLS_LABELS, () => props.labels);\n</script>\n\n<template>\n <!-- On macOS the OS owns the traffic-light buttons; rendering a second set\n would be redundant. The host can also choose \"linux\" if their desktop\n environment handles window buttons natively. -->\n <div\n v-if=\"platform !== 'macos'\"\n class=\"flex h-full items-stretch\"\n style=\"-webkit-app-region: no-drag\"\n >\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.minimize\"\n data-testid=\"win-minimize\"\n @click=\"emit('minimize')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect y=\"4.5\" width=\"10\" height=\"1\" fill=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"isMaximized ? text.restore : text.maximize\"\n data-testid=\"win-maximize\"\n @click=\"emit('maximize')\"\n >\n <svg v-if=\"!isMaximized\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n <svg v-else width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" fill=\"none\" stroke=\"currentColor\" />\n <path d=\"M2.5 2.5 V0.5 H9.5 V7.5 H7.5\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.close\"\n data-testid=\"win-close\"\n @click=\"emit('close')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M0 0 L10 10 M10 0 L0 10\" stroke=\"currentColor\" />\n </svg>\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAa,yBAA+C;CAC1D,UAAU;CACV,UAAU;CACV,SAAS;CACT,OAAO;AACT;;;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EAyBd,MAAM,OAAO;EASb,MAAM,OAAO,UAAU,kBAAkB,8BAA8B,MAAM,MAAM;;GAQzE,OAAA,QAAA,aAAQ,WADhB,UAAA,GAAA,mBA4CM,OA5CN,YA4CM;IAvCJ,mBAUS,UAAA;KATP,MAAK;KACL,OAAM;KACL,cAAY,MAAA,IAAA,CAAI,CAAC;KAClB,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;IAEZ,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAEM,OAAA;KAFD,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,eAAY;IAC1D,GAAA,CAAA,mBAA0D,QAAA;KAApD,GAAE;KAAM,OAAM;KAAK,QAAO;KAAI,MAAK;;IAI7C,mBAcS,UAAA;KAbP,MAAK;KACL,OAAM;KACL,cAAY,QAAA,cAAc,MAAA,IAAA,CAAI,CAAC,UAAU,MAAA,IAAA,CAAI,CAAC;KAC/C,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;IAEA,GAAA,CAAA,CAAA,QAAA,eAAZ,UAAA,GAAA,mBAEM,OAFN,YAEM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CADJ,mBAA+E,QAAA;KAAzE,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAI,MAAK;KAAO,QAAO;IAEhE,GAAA,MAAA,EAAA,CAAA,EAAA,CAAA,MAAA,UAAA,GAAA,mBAGM,OAHN,YAGM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFJ,mBAA+E,QAAA;KAAzE,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAI,MAAK;KAAO,QAAO;IAC9D,GAAA,MAAA,EAAA,GAAA,mBAA2E,QAAA;KAArE,GAAE;KAA+B,MAAK;KAAO,QAAO;;IAI9D,mBAUS,UAAA;KATP,MAAK;KACL,OAAM;KACL,cAAY,MAAA,IAAA,CAAI,CAAC;KAClB,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;IAEZ,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAEM,OAAA;KAFD,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,eAAY;IAC1D,GAAA,CAAA,mBAA0D,QAAA;KAApD,GAAE;KAA0B,QAAO"}
|