iryx-ui 0.12.0 → 0.13.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 +35 -1315
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/Accordion.js +5 -0
- package/dist/components/Accordion.vue.d.ts +80 -0
- package/dist/components/Accordion.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/Alert.vue.d.ts +1 -1
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/App.vue.d.ts +1 -1
- package/dist/components/AppShell.js +5 -0
- package/dist/components/AppShell.vue.d.ts +46 -0
- package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/AspectRatio.js +5 -0
- package/dist/components/AspectRatio.vue.d.ts +26 -0
- package/dist/components/AspectRatio.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/Avatar.js +5 -0
- package/dist/components/Avatar.vue.d.ts +52 -0
- package/dist/components/Avatar.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/components/AvatarGroup.js +5 -0
- package/dist/components/AvatarGroup.vue.d.ts +39 -0
- package/dist/components/AvatarGroup.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/Badge.vue.d.ts +1 -1
- package/dist/components/Banner.vue.d.ts +2 -2
- package/dist/components/BarChart.vue.d.ts +1 -1
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/Button.vue.d.ts +2 -2
- package/dist/components/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/Card.vue.d.ts +1 -1
- package/dist/components/Collapsible.js +5 -0
- package/dist/components/Collapsible.vue.d.ts +58 -0
- package/dist/components/Collapsible.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/components/ColorPicker.js +5 -0
- package/dist/components/ColorPicker.vue.d.ts +49 -0
- package/dist/components/ColorPicker.vue_vue_type_script_setup_true_lang.js +172 -0
- package/dist/components/Combobox.vue.d.ts +6 -6
- package/dist/components/CommandPalette.js +5 -0
- package/dist/components/CommandPalette.vue.d.ts +63 -0
- package/dist/components/CommandPalette.vue_vue_type_script_setup_true_lang.js +185 -0
- package/dist/components/Container.js +5 -0
- package/dist/components/Container.vue.d.ts +33 -0
- package/dist/components/Container.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/components/ContextMenu.js +5 -0
- package/dist/components/ContextMenu.vue.d.ts +42 -0
- package/dist/components/ContextMenu.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/DateRangePicker.vue.d.ts +1 -1
- package/dist/components/Dialog.vue.d.ts +1 -1
- package/dist/components/Drawer.vue.d.ts +2 -2
- package/dist/components/EmptyState.vue.d.ts +1 -1
- package/dist/components/Input.vue.d.ts +1 -1
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/Kbd.js +5 -0
- package/dist/components/Kbd.vue.d.ts +46 -0
- package/dist/components/Kbd.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/components/Menubar.js +5 -0
- package/dist/components/Menubar.vue.d.ts +62 -0
- package/dist/components/Menubar.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/NavigationMenu.js +5 -0
- package/dist/components/NavigationMenu.vue.d.ts +75 -0
- package/dist/components/NavigationMenu.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/PageHeader.js +5 -0
- package/dist/components/PageHeader.vue.d.ts +52 -0
- package/dist/components/PageHeader.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/PinInput.js +5 -0
- package/dist/components/PinInput.vue.d.ts +65 -0
- package/dist/components/PinInput.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/Popover.js +5 -0
- package/dist/components/Popover.vue.d.ts +75 -0
- package/dist/components/Popover.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/components/Progress.vue.d.ts +20 -1
- package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +84 -44
- package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/ScrollArea.js +5 -0
- package/dist/components/ScrollArea.vue.d.ts +41 -0
- package/dist/components/ScrollArea.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/components/ScrollFade.js +5 -0
- package/dist/components/ScrollFade.vue.d.ts +36 -0
- package/dist/components/ScrollFade.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/Select.vue.d.ts +2 -2
- package/dist/components/Sidebar.js +5 -0
- package/dist/components/Sidebar.vue.d.ts +72 -0
- package/dist/components/Sidebar.vue_vue_type_script_setup_true_lang.js +183 -0
- package/dist/components/SignaturePad.js +5 -0
- package/dist/components/SignaturePad.vue.d.ts +60 -0
- package/dist/components/SignaturePad.vue_vue_type_script_setup_true_lang.js +158 -0
- package/dist/components/Skeleton.vue.d.ts +1 -1
- package/dist/components/Skeleton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Slider.js +5 -0
- package/dist/components/Slider.vue.d.ts +80 -0
- package/dist/components/Slider.vue_vue_type_script_setup_true_lang.js +115 -0
- package/dist/components/Splitter.js +5 -0
- package/dist/components/Splitter.vue.d.ts +59 -0
- package/dist/components/Splitter.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/Stat.vue.d.ts +1 -1
- package/dist/components/Switch.vue.d.ts +1 -0
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +7 -3
- package/dist/components/Table.vue.d.ts +7 -1
- package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +73 -58
- package/dist/components/TagsInput.js +5 -0
- package/dist/components/TagsInput.vue.d.ts +71 -0
- package/dist/components/TagsInput.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/components/Textarea.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/TimeField.js +5 -0
- package/dist/components/TimeField.vue.d.ts +50 -0
- package/dist/components/TimeField.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/components/Timeline.js +5 -0
- package/dist/components/Timeline.vue.d.ts +61 -0
- package/dist/components/Timeline.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/Toaster.vue.d.ts +1 -1
- package/dist/components/Toggle.js +5 -0
- package/dist/components/Toggle.vue.d.ts +42 -0
- package/dist/components/Toggle.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/components/ToggleGroup.js +5 -0
- package/dist/components/ToggleGroup.vue.d.ts +64 -0
- package/dist/components/ToggleGroup.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/components/Toolbar.js +5 -0
- package/dist/components/Toolbar.vue.d.ts +52 -0
- package/dist/components/Toolbar.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/components/Tree.js +5 -0
- package/dist/components/Tree.vue.d.ts +70 -0
- package/dist/components/Tree.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/index.d.ts +29 -0
- package/dist/components/index.js +144 -86
- package/dist/composables/appearance.js +5 -1
- package/dist/composables/cartesian.d.ts +11 -0
- package/dist/composables/cartesian.js +18 -19
- package/dist/composables/command-palette.d.ts +42 -0
- package/dist/composables/command-palette.js +32 -0
- package/dist/composables/date.d.ts +18 -2
- package/dist/composables/date.js +23 -12
- package/dist/composables/kbd.d.ts +26 -0
- package/dist/composables/kbd.js +161 -0
- package/dist/composables/navigation-menu.d.ts +29 -0
- package/dist/composables/navigation-menu.js +6 -0
- package/dist/composables/scroll-fade.d.ts +35 -0
- package/dist/composables/scroll-fade.js +36 -0
- package/dist/composables/sidebar.d.ts +35 -0
- package/dist/composables/sidebar.js +23 -0
- package/dist/composables/signature.d.ts +22 -0
- package/dist/composables/signature.js +13 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +153 -93
- package/dist/theme/accordion.d.ts +68 -0
- package/dist/theme/accordion.js +24 -0
- package/dist/theme/alert.d.ts +0 -3
- package/dist/theme/app-shell.d.ts +77 -0
- package/dist/theme/app-shell.js +35 -0
- package/dist/theme/avatar.d.ts +253 -0
- package/dist/theme/avatar.js +84 -0
- package/dist/theme/banner.d.ts +0 -9
- package/dist/theme/bar-chart.d.ts +0 -16
- package/dist/theme/breadcrumb.d.ts +3 -3
- package/dist/theme/button-group.d.ts +0 -3
- package/dist/theme/button.d.ts +0 -3
- package/dist/theme/card.js +2 -2
- package/dist/theme/chart-legend.d.ts +3 -11
- package/dist/theme/collapsible.d.ts +44 -0
- package/dist/theme/collapsible.js +17 -0
- package/dist/theme/color-picker.d.ts +98 -0
- package/dist/theme/color-picker.js +19 -0
- package/dist/theme/command-palette.d.ts +122 -0
- package/dist/theme/command-palette.js +22 -0
- package/dist/theme/container.d.ts +101 -0
- package/dist/theme/container.js +26 -0
- package/dist/theme/date-picker.d.ts +12 -0
- package/dist/theme/date-picker.js +1 -1
- package/dist/theme/dropdown-menu.d.ts +0 -9
- package/dist/theme/file-upload.d.ts +0 -3
- package/dist/theme/form.d.ts +12 -12
- package/dist/theme/index.d.ts +25 -0
- package/dist/theme/kbd.d.ts +71 -0
- package/dist/theme/kbd.js +29 -0
- package/dist/theme/line-chart.d.ts +0 -9
- package/dist/theme/menubar.d.ts +29 -0
- package/dist/theme/menubar.js +11 -0
- package/dist/theme/navigation-menu.d.ts +161 -0
- package/dist/theme/navigation-menu.js +43 -0
- package/dist/theme/number-input.d.ts +0 -3
- package/dist/theme/page-header.d.ts +47 -0
- package/dist/theme/page-header.js +17 -0
- package/dist/theme/pagination.d.ts +0 -3
- package/dist/theme/pin-input.d.ts +86 -0
- package/dist/theme/pin-input.js +32 -0
- package/dist/theme/popover.d.ts +119 -0
- package/dist/theme/popover.js +31 -0
- package/dist/theme/presets.d.ts +0 -2
- package/dist/theme/progress.d.ts +93 -0
- package/dist/theme/progress.js +37 -7
- package/dist/theme/radio-group.d.ts +24 -0
- package/dist/theme/radio-group.js +23 -14
- package/dist/theme/scroll-area.d.ts +65 -0
- package/dist/theme/scroll-area.js +57 -0
- package/dist/theme/scroll-fade.d.ts +35 -0
- package/dist/theme/scroll-fade.js +12 -0
- package/dist/theme/sidebar.d.ts +167 -0
- package/dist/theme/sidebar.js +43 -0
- package/dist/theme/signature-pad.d.ts +50 -0
- package/dist/theme/signature-pad.js +17 -0
- package/dist/theme/slider.d.ts +128 -0
- package/dist/theme/slider.js +49 -0
- package/dist/theme/sparkline.d.ts +0 -6
- package/dist/theme/splitter.d.ts +59 -0
- package/dist/theme/splitter.js +25 -0
- package/dist/theme/stat.d.ts +0 -3
- package/dist/theme/stepper.js +2 -2
- package/dist/theme/switch.d.ts +53 -29
- package/dist/theme/switch.js +33 -8
- package/dist/theme/table.d.ts +51 -3
- package/dist/theme/table.js +8 -3
- package/dist/theme/tabs.d.ts +0 -3
- package/dist/theme/tags-input.d.ts +110 -0
- package/dist/theme/tags-input.js +42 -0
- package/dist/theme/time-field.d.ts +68 -0
- package/dist/theme/time-field.js +21 -0
- package/dist/theme/timeline.d.ts +182 -0
- package/dist/theme/timeline.js +83 -0
- package/dist/theme/toggle.d.ts +145 -0
- package/dist/theme/toggle.js +84 -0
- package/dist/theme/toolbar.d.ts +56 -0
- package/dist/theme/toolbar.js +21 -0
- package/dist/theme/tree.d.ts +68 -0
- package/dist/theme/tree.js +28 -0
- package/package.json +2 -2
- package/theme.css +221 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Consumed by the Vue plugin (global registration) and the Nuxt module
|
|
4
4
|
* (auto-imports). Keep in sync with `src/components/index.ts`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const componentNames: readonly ["Alert", "App", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "Combobox", "ConfirmDialog", "DatePicker", "DateRangePicker", "Dialog", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Input", "Label", "LineChart", "NumberInput", "Pagination", "PasswordInput", "Progress", "RadioGroup", "Select", "Separator", "Skeleton", "Sparkline", "Stat", "Stepper", "Switch", "Table", "Tabs", "Textarea", "Toaster", "Tooltip"];
|
|
6
|
+
export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DatePicker", "DateRangePicker", "Dialog", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
|
|
7
7
|
export type ComponentName = (typeof componentNames)[number];
|
package/dist/component-names.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/component-names.ts
|
|
2
|
-
var e = /* @__PURE__ */ "Alert.App.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.Combobox.ConfirmDialog.DatePicker.DateRangePicker.Dialog.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Input.Label.LineChart.NumberInput.Pagination.PasswordInput.Progress.RadioGroup.Select.Separator.Skeleton.Sparkline.Stat.Stepper.Switch.Table.Tabs.Textarea.Toaster.Tooltip".split(".");
|
|
2
|
+
var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DatePicker.DateRangePicker.Dialog.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as componentNames };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { IconLike } from '../composables/icon';
|
|
2
|
+
export interface AccordionItemData {
|
|
3
|
+
/** Row heading, and the fallback value when none is given. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Body text. Use the `content` slot for anything with markup. */
|
|
6
|
+
content?: string;
|
|
7
|
+
/** Identity in the model. Defaults to the label. */
|
|
8
|
+
value?: string;
|
|
9
|
+
icon?: IconLike;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface AccordionProps {
|
|
13
|
+
items?: AccordionItemData[];
|
|
14
|
+
/** One panel open at a time, or several. */
|
|
15
|
+
type?: 'single' | 'multiple';
|
|
16
|
+
/**
|
|
17
|
+
* Let the open panel be closed again by clicking its trigger. Only means
|
|
18
|
+
* anything for `single` — with `multiple` every panel already closes.
|
|
19
|
+
*/
|
|
20
|
+
collapsible?: boolean;
|
|
21
|
+
variant?: 'plain' | 'outline';
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
24
|
+
unstyled?: boolean;
|
|
25
|
+
class?: string;
|
|
26
|
+
ui?: Partial<Record<'root' | 'item' | 'header' | 'trigger' | 'icon' | 'content' | 'contentInner', string>>;
|
|
27
|
+
}
|
|
28
|
+
type __VLS_Props = AccordionProps;
|
|
29
|
+
type __VLS_ModelProps = {
|
|
30
|
+
/**
|
|
31
|
+
* `string` for `single`, `string[]` for `multiple` — Reka's own shape, kept
|
|
32
|
+
* rather than normalised, so a caller's model reads the way the docs for the
|
|
33
|
+
* primitive say it will.
|
|
34
|
+
*/
|
|
35
|
+
modelValue?: string | string[] | undefined;
|
|
36
|
+
};
|
|
37
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
38
|
+
declare var __VLS_26: {
|
|
39
|
+
item: {
|
|
40
|
+
value: string;
|
|
41
|
+
/** Row heading, and the fallback value when none is given. */
|
|
42
|
+
label: string;
|
|
43
|
+
/** Body text. Use the `content` slot for anything with markup. */
|
|
44
|
+
content?: string;
|
|
45
|
+
icon?: IconLike;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
};
|
|
48
|
+
}, __VLS_44: {
|
|
49
|
+
item: {
|
|
50
|
+
value: string;
|
|
51
|
+
/** Row heading, and the fallback value when none is given. */
|
|
52
|
+
label: string;
|
|
53
|
+
/** Body text. Use the `content` slot for anything with markup. */
|
|
54
|
+
content?: string;
|
|
55
|
+
icon?: IconLike;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type __VLS_Slots = {} & {
|
|
60
|
+
trigger?: (props: typeof __VLS_26) => any;
|
|
61
|
+
} & {
|
|
62
|
+
content?: (props: typeof __VLS_44) => any;
|
|
63
|
+
};
|
|
64
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
65
|
+
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
66
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
67
|
+
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
68
|
+
}>, {
|
|
69
|
+
type: "single" | "multiple";
|
|
70
|
+
collapsible: boolean;
|
|
71
|
+
unstyled: boolean;
|
|
72
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
73
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
74
|
+
declare const _default: typeof __VLS_export;
|
|
75
|
+
export default _default;
|
|
76
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
77
|
+
new (): {
|
|
78
|
+
$slots: S;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { accordionTheme as t } from "../theme/accordion.js";
|
|
3
|
+
import n from "./Icon.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, openBlock as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useModel as y, withCtx as b } from "vue";
|
|
5
|
+
import { ArrowDown01Icon as x } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { AccordionContent as S, AccordionHeader as C, AccordionItem as w, AccordionRoot as T, AccordionTrigger as E } from "reka-ui";
|
|
7
|
+
//#region src/components/Accordion.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var D = { class: "flex min-w-0 items-center gap-2" }, O = { class: "truncate" }, k = /*@__PURE__*/ d({
|
|
9
|
+
__name: "Accordion",
|
|
10
|
+
props: /*@__PURE__*/ f({
|
|
11
|
+
items: {},
|
|
12
|
+
type: { default: "single" },
|
|
13
|
+
collapsible: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !0
|
|
16
|
+
},
|
|
17
|
+
variant: {},
|
|
18
|
+
disabled: { type: Boolean },
|
|
19
|
+
unstyled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
class: {},
|
|
24
|
+
ui: {}
|
|
25
|
+
}, {
|
|
26
|
+
modelValue: {},
|
|
27
|
+
modelModifiers: {}
|
|
28
|
+
}),
|
|
29
|
+
emits: ["update:modelValue"],
|
|
30
|
+
setup(d) {
|
|
31
|
+
let f = d, k = y(d, "modelValue"), A = i(() => (f.items ?? []).map((e) => ({
|
|
32
|
+
...e,
|
|
33
|
+
value: e.value ?? e.label
|
|
34
|
+
}))), j = e(), M = i(() => f.unstyled ?? j.unstyled), N = i(() => t({ variant: f.variant }));
|
|
35
|
+
function P(e) {
|
|
36
|
+
let t = f.ui?.[e];
|
|
37
|
+
return M.value ? t : N.value[e]({ class: t });
|
|
38
|
+
}
|
|
39
|
+
return (e, t) => (m(), a(v(T), {
|
|
40
|
+
modelValue: k.value,
|
|
41
|
+
"onUpdate:modelValue": t[0] ||= (e) => k.value = e,
|
|
42
|
+
type: f.type,
|
|
43
|
+
collapsible: f.collapsible,
|
|
44
|
+
disabled: f.disabled,
|
|
45
|
+
class: p(M.value ? [f.ui?.root, f.class] : N.value.root({ class: [f.ui?.root, f.class] }))
|
|
46
|
+
}, {
|
|
47
|
+
default: b(() => [(m(!0), s(r, null, h(A.value, (t) => (m(), a(v(w), {
|
|
48
|
+
key: t.value,
|
|
49
|
+
value: t.value,
|
|
50
|
+
disabled: t.disabled,
|
|
51
|
+
class: p(P("item"))
|
|
52
|
+
}, {
|
|
53
|
+
default: b(() => [u(v(C), { class: p(P("header")) }, {
|
|
54
|
+
default: b(() => [u(v(E), { class: p(P("trigger")) }, {
|
|
55
|
+
default: b(() => [g(e.$slots, "trigger", { item: t }, () => [c("span", D, [t.icon ? (m(), a(n, {
|
|
56
|
+
key: 0,
|
|
57
|
+
icon: t.icon,
|
|
58
|
+
class: "size-4 shrink-0 text-muted-foreground"
|
|
59
|
+
}, null, 8, ["icon"])) : o("", !0), c("span", O, _(t.label), 1)])]), u(n, {
|
|
60
|
+
icon: v(x),
|
|
61
|
+
class: p(P("icon"))
|
|
62
|
+
}, null, 8, ["icon", "class"])]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, 1032, ["class"])]),
|
|
65
|
+
_: 2
|
|
66
|
+
}, 1032, ["class"]), u(v(S), { class: p(P("content")) }, {
|
|
67
|
+
default: b(() => [c("div", { class: p(P("contentInner")) }, [g(e.$slots, "content", { item: t }, () => [l(_(t.content), 1)])], 2)]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1032, ["class"])]),
|
|
70
|
+
_: 2
|
|
71
|
+
}, 1032, [
|
|
72
|
+
"value",
|
|
73
|
+
"disabled",
|
|
74
|
+
"class"
|
|
75
|
+
]))), 128))]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, [
|
|
78
|
+
"modelValue",
|
|
79
|
+
"type",
|
|
80
|
+
"collapsible",
|
|
81
|
+
"disabled",
|
|
82
|
+
"class"
|
|
83
|
+
]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { k as default };
|
|
@@ -60,9 +60,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
60
60
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
61
61
|
}>, {
|
|
62
62
|
icon: IconLike | false;
|
|
63
|
+
unstyled: boolean;
|
|
63
64
|
as: string;
|
|
64
65
|
closeLabel: string;
|
|
65
|
-
unstyled: boolean;
|
|
66
66
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
67
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
68
68
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { alertTheme as n } from "../theme/alert.js";
|
|
4
4
|
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, normalizeClass as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, withCtx as v } from "vue";
|
|
5
5
|
import { Alert02Icon as y, AlertCircleIcon as b, Cancel01Icon as x, CheckmarkCircle02Icon as S, InformationCircleIcon as C } from "@hugeicons/core-free-icons";
|
|
6
6
|
import { Primitive as w } from "reka-ui";
|
|
@@ -40,11 +40,11 @@ var T = ["aria-label"], E = /*@__PURE__*/ u({
|
|
|
40
40
|
danger: b
|
|
41
41
|
}, O = r(() => {
|
|
42
42
|
if (d.icon !== !1) return d.icon ?? D[d.variant ?? "info"];
|
|
43
|
-
}), k = r(() => d.variant === "danger" || d.variant === "warning" ? "alert" : "status"), A = e(), j = r(() => d.unstyled ?? A.unstyled), M = r(() =>
|
|
43
|
+
}), k = r(() => d.variant === "danger" || d.variant === "warning" ? "alert" : "status"), A = e(), j = r(() => d.unstyled ?? A.unstyled), M = r(() => n({
|
|
44
44
|
variant: d.variant,
|
|
45
45
|
withTitle: !!d.title
|
|
46
46
|
})), N = r(() => j.value ? [d.ui?.root, d.class] : M.value.root({ class: [d.ui?.root, d.class] })), P = r(() => j.value ? d.ui?.icon : M.value.icon({ class: d.ui?.icon })), F = r(() => j.value ? d.ui?.content : M.value.content({ class: d.ui?.content })), I = r(() => j.value ? d.ui?.title : M.value.title({ class: d.ui?.title })), L = r(() => j.value ? d.ui?.description : M.value.description({ class: d.ui?.description })), R = r(() => j.value ? d.ui?.actions : M.value.actions({ class: d.ui?.actions })), z = r(() => j.value ? d.ui?.close : M.value.close({ class: d.ui?.close }));
|
|
47
|
-
return (e,
|
|
47
|
+
return (e, n) => E.value ? (p(), i(g(w), {
|
|
48
48
|
key: 0,
|
|
49
49
|
as: d.as,
|
|
50
50
|
role: k.value,
|
|
@@ -54,7 +54,7 @@ var T = ["aria-label"], E = /*@__PURE__*/ u({
|
|
|
54
54
|
O.value || e.$slots.icon ? (p(), o("div", {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: f(P.value)
|
|
57
|
-
}, [m(e.$slots, "icon", {}, () => [l(
|
|
57
|
+
}, [m(e.$slots, "icon", {}, () => [l(t, { icon: O.value }, null, 8, ["icon"])])], 2)) : a("", !0),
|
|
58
58
|
s("div", { class: f(F.value) }, [
|
|
59
59
|
d.title || e.$slots.title ? (p(), o("p", {
|
|
60
60
|
key: 0,
|
|
@@ -74,10 +74,10 @@ var T = ["aria-label"], E = /*@__PURE__*/ u({
|
|
|
74
74
|
type: "button",
|
|
75
75
|
"aria-label": d.closeLabel,
|
|
76
76
|
class: f(z.value),
|
|
77
|
-
onClick:
|
|
77
|
+
onClick: n[0] ||= (t) => {
|
|
78
78
|
E.value = !1, e.$emit("close");
|
|
79
79
|
}
|
|
80
|
-
}, [m(e.$slots, "close", {}, () => [l(
|
|
80
|
+
}, [m(e.$slots, "close", {}, () => [l(t, { icon: g(x) }, null, 8, ["icon"])])], 10, T)) : a("", !0)
|
|
81
81
|
]),
|
|
82
82
|
_: 3
|
|
83
83
|
}, 8, [
|
|
@@ -23,8 +23,8 @@ type __VLS_Slots = {} & {
|
|
|
23
23
|
default?: (props: typeof __VLS_14) => any;
|
|
24
24
|
};
|
|
25
25
|
declare const __VLS_base: import("vue").DefineComponent<AppProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppProps> & Readonly<{}>, {
|
|
26
|
-
as: string;
|
|
27
26
|
unstyled: boolean;
|
|
27
|
+
as: string;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface AppShellProps {
|
|
2
|
+
/** Render as a different element or component. */
|
|
3
|
+
as?: string;
|
|
4
|
+
/**
|
|
5
|
+
* `main` pins the shell to the viewport and scrolls only the content column.
|
|
6
|
+
* `page` scrolls the document, with a sticky header and sidebar.
|
|
7
|
+
*/
|
|
8
|
+
scroll?: 'main' | 'page';
|
|
9
|
+
sidebarPosition?: 'left' | 'right';
|
|
10
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
11
|
+
unstyled?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
/** Override classes per slot, e.g. `{ main: 'p-8' }`. */
|
|
14
|
+
ui?: {
|
|
15
|
+
root?: string;
|
|
16
|
+
header?: string;
|
|
17
|
+
body?: string;
|
|
18
|
+
sidebar?: string;
|
|
19
|
+
main?: string;
|
|
20
|
+
footer?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare var __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
header?: (props: typeof __VLS_8) => any;
|
|
26
|
+
} & {
|
|
27
|
+
sidebar?: (props: typeof __VLS_10) => any;
|
|
28
|
+
} & {
|
|
29
|
+
default?: (props: typeof __VLS_12) => any;
|
|
30
|
+
} & {
|
|
31
|
+
footer?: (props: typeof __VLS_14) => any;
|
|
32
|
+
};
|
|
33
|
+
declare const __VLS_base: import("vue").DefineComponent<AppShellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppShellProps> & Readonly<{}>, {
|
|
34
|
+
unstyled: boolean;
|
|
35
|
+
as: string;
|
|
36
|
+
scroll: "main" | "page";
|
|
37
|
+
sidebarPosition: "left" | "right";
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { useElementSize as t } from "../composables/element-size.js";
|
|
3
|
+
import { appShellTheme as n } from "../theme/app-shell.js";
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, ref as f, renderSlot as p, unref as m, useSlots as h, withCtx as g } from "vue";
|
|
5
|
+
import { Primitive as _ } from "reka-ui";
|
|
6
|
+
//#region src/components/AppShell.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var v = /*@__PURE__*/ c({
|
|
8
|
+
__name: "AppShell",
|
|
9
|
+
props: {
|
|
10
|
+
as: { default: "div" },
|
|
11
|
+
scroll: { default: "main" },
|
|
12
|
+
sidebarPosition: { default: "left" },
|
|
13
|
+
unstyled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
class: {},
|
|
18
|
+
ui: {}
|
|
19
|
+
},
|
|
20
|
+
setup(c) {
|
|
21
|
+
let v = c, y = h(), b = e(), x = r(() => v.unstyled ?? b.unstyled), S = f(), { height: C } = t(S), w = r(() => v.scroll === "page" && y.header ? { "--iryx-shell-header-height": `${C.value}px` } : void 0), T = r(() => n({
|
|
22
|
+
scroll: v.scroll,
|
|
23
|
+
sidebarPosition: v.sidebarPosition
|
|
24
|
+
}));
|
|
25
|
+
function E(e) {
|
|
26
|
+
let t = v.ui?.[e];
|
|
27
|
+
return x.value ? t : T.value[e]({ class: t });
|
|
28
|
+
}
|
|
29
|
+
return (e, t) => (d(), i(m(_), {
|
|
30
|
+
as: v.as,
|
|
31
|
+
style: u(w.value),
|
|
32
|
+
class: l(x.value ? [v.ui?.root, v.class] : T.value.root({ class: [v.ui?.root, v.class] }))
|
|
33
|
+
}, {
|
|
34
|
+
default: g(() => [
|
|
35
|
+
e.$slots.header ? (d(), o("div", {
|
|
36
|
+
key: 0,
|
|
37
|
+
ref_key: "header",
|
|
38
|
+
ref: S,
|
|
39
|
+
class: l(E("header"))
|
|
40
|
+
}, [p(e.$slots, "header")], 2)) : a("", !0),
|
|
41
|
+
s("div", { class: l(E("body")) }, [e.$slots.sidebar ? (d(), o("div", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: l(E("sidebar"))
|
|
44
|
+
}, [p(e.$slots, "sidebar")], 2)) : a("", !0), s("main", { class: l(E("main")) }, [p(e.$slots, "default")], 2)], 2),
|
|
45
|
+
e.$slots.footer ? (d(), o("div", {
|
|
46
|
+
key: 1,
|
|
47
|
+
class: l(E("footer"))
|
|
48
|
+
}, [p(e.$slots, "footer")], 2)) : a("", !0)
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, [
|
|
52
|
+
"as",
|
|
53
|
+
"style",
|
|
54
|
+
"class"
|
|
55
|
+
]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
export { v as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface AspectRatioProps {
|
|
2
|
+
/**
|
|
3
|
+
* Width divided by height — `16 / 9`, `1`, `4 / 3`. Given as a number so
|
|
4
|
+
* arithmetic works: `16 / 9` reads as the ratio it is.
|
|
5
|
+
*/
|
|
6
|
+
ratio?: number;
|
|
7
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
8
|
+
unstyled?: boolean;
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
declare var __VLS_8: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_8) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<AspectRatioProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AspectRatioProps> & Readonly<{}>, {
|
|
16
|
+
unstyled: boolean;
|
|
17
|
+
ratio: number;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { computed as t, createBlock as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
|
|
3
|
+
import { AspectRatio as l } from "reka-ui";
|
|
4
|
+
//#region src/components/AspectRatio.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var u = /*@__PURE__*/ r({
|
|
6
|
+
__name: "AspectRatio",
|
|
7
|
+
props: {
|
|
8
|
+
ratio: { default: 1 },
|
|
9
|
+
unstyled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: void 0
|
|
12
|
+
},
|
|
13
|
+
class: {}
|
|
14
|
+
},
|
|
15
|
+
setup(r) {
|
|
16
|
+
let u = r, d = e(), f = t(() => u.unstyled ?? d.unstyled), p = t(() => f.value ? u.class : ["overflow-hidden rounded-xl", u.class]);
|
|
17
|
+
return (e, t) => (a(), n(s(l), {
|
|
18
|
+
ratio: u.ratio,
|
|
19
|
+
class: i(p.value)
|
|
20
|
+
}, {
|
|
21
|
+
default: c(() => [o(e.$slots, "default")]),
|
|
22
|
+
_: 3
|
|
23
|
+
}, 8, ["ratio", "class"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { u as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface AvatarProps {
|
|
2
|
+
src?: string;
|
|
3
|
+
/**
|
|
4
|
+
* Describes the image. Leave it empty when the avatar sits beside the same
|
|
5
|
+
* person's name — repeating it makes a screen reader say it twice.
|
|
6
|
+
*/
|
|
7
|
+
alt?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Who this is. Used to derive initials when there is no image, and as the
|
|
10
|
+
* accessible name when nothing else provides one.
|
|
11
|
+
*/
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Overrides the derived initials. */
|
|
14
|
+
initials?: string;
|
|
15
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
16
|
+
/** Circle for a person, square for a company or a project. */
|
|
17
|
+
shape?: 'circle' | 'square';
|
|
18
|
+
/** Presence dot in the corner. */
|
|
19
|
+
status?: 'online' | 'busy' | 'away' | 'offline';
|
|
20
|
+
/** Names that dot, since a colour alone says nothing to a screen reader. */
|
|
21
|
+
statusLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Hold the fallback back by this many milliseconds, so a fast connection
|
|
24
|
+
* goes straight to the image instead of flashing initials on the way.
|
|
25
|
+
*/
|
|
26
|
+
delayMs?: number;
|
|
27
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
28
|
+
unstyled?: boolean;
|
|
29
|
+
class?: string;
|
|
30
|
+
/** Override classes per slot, e.g. `{ fallback: 'bg-primary' }`. */
|
|
31
|
+
ui?: {
|
|
32
|
+
root?: string;
|
|
33
|
+
image?: string;
|
|
34
|
+
fallback?: string;
|
|
35
|
+
status?: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
declare var __VLS_19: {};
|
|
39
|
+
type __VLS_Slots = {} & {
|
|
40
|
+
fallback?: (props: typeof __VLS_19) => any;
|
|
41
|
+
};
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
43
|
+
unstyled: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { avatarTheme as t } from "../theme/avatar.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
|
|
4
|
+
import { AvatarFallback as h, AvatarImage as g, AvatarRoot as _ } from "reka-ui";
|
|
5
|
+
//#region src/components/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var v = ["title", "aria-label"], y = /*@__PURE__*/ c({
|
|
7
|
+
__name: "Avatar",
|
|
8
|
+
props: {
|
|
9
|
+
src: {},
|
|
10
|
+
alt: {},
|
|
11
|
+
name: {},
|
|
12
|
+
initials: {},
|
|
13
|
+
size: {},
|
|
14
|
+
shape: {},
|
|
15
|
+
status: {},
|
|
16
|
+
statusLabel: {},
|
|
17
|
+
delayMs: {},
|
|
18
|
+
unstyled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
class: {},
|
|
23
|
+
ui: {}
|
|
24
|
+
},
|
|
25
|
+
setup(c) {
|
|
26
|
+
let y = c, b = n(() => {
|
|
27
|
+
if (y.initials) return y.initials;
|
|
28
|
+
let e = (y.name ?? "").trim().split(/\s+/).filter(Boolean);
|
|
29
|
+
return e.length === 0 ? "" : e.length === 1 ? e[0].slice(0, 1) : `${e[0].slice(0, 1)}${e.at(-1).slice(0, 1)}`;
|
|
30
|
+
}), x = e(), S = n(() => y.unstyled ?? x.unstyled), C = n(() => t({
|
|
31
|
+
size: y.size,
|
|
32
|
+
shape: y.shape,
|
|
33
|
+
status: y.status
|
|
34
|
+
})), w = n(() => S.value ? [y.ui?.root, y.class] : C.value.root({ class: [y.ui?.root, y.class] })), T = n(() => S.value ? y.ui?.image : C.value.image({ class: y.ui?.image })), E = n(() => S.value ? y.ui?.fallback : C.value.fallback({ class: y.ui?.fallback })), D = n(() => S.value ? y.ui?.status : C.value.status({ class: y.ui?.status }));
|
|
35
|
+
return (e, t) => (u(), r(p(_), { class: l(w.value) }, {
|
|
36
|
+
default: m(() => [
|
|
37
|
+
y.src ? (u(), r(p(g), {
|
|
38
|
+
key: 0,
|
|
39
|
+
src: y.src,
|
|
40
|
+
alt: y.alt ?? "",
|
|
41
|
+
class: l(T.value)
|
|
42
|
+
}, null, 8, [
|
|
43
|
+
"src",
|
|
44
|
+
"alt",
|
|
45
|
+
"class"
|
|
46
|
+
])) : i("", !0),
|
|
47
|
+
s(p(h), {
|
|
48
|
+
"delay-ms": y.delayMs,
|
|
49
|
+
class: l(E.value)
|
|
50
|
+
}, {
|
|
51
|
+
default: m(() => [d(e.$slots, "fallback", {}, () => [o(f(b.value), 1)])]),
|
|
52
|
+
_: 3
|
|
53
|
+
}, 8, ["delay-ms", "class"]),
|
|
54
|
+
y.status ? (u(), a("span", {
|
|
55
|
+
key: 1,
|
|
56
|
+
class: l(D.value),
|
|
57
|
+
title: y.statusLabel ?? y.status,
|
|
58
|
+
role: "img",
|
|
59
|
+
"aria-label": y.statusLabel ?? y.status
|
|
60
|
+
}, null, 10, v)) : i("", !0)
|
|
61
|
+
]),
|
|
62
|
+
_: 3
|
|
63
|
+
}, 8, ["class"]));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
export { y as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { AvatarProps } from './Avatar.vue';
|
|
2
|
+
/** One member of the stack — an `IAvatar`'s own props, minus the shared ones. */
|
|
3
|
+
export type AvatarGroupItem = Omit<AvatarProps, 'size' | 'shape' | 'unstyled' | 'class' | 'ui'>;
|
|
4
|
+
export interface AvatarGroupProps {
|
|
5
|
+
items?: AvatarGroupItem[];
|
|
6
|
+
/**
|
|
7
|
+
* Show at most this many, closing the stack with a "+n" chip. Without it
|
|
8
|
+
* every avatar is rendered, which stops being readable somewhere past six.
|
|
9
|
+
*/
|
|
10
|
+
max?: number;
|
|
11
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
12
|
+
shape?: 'circle' | 'square';
|
|
13
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
14
|
+
unstyled?: boolean;
|
|
15
|
+
class?: string;
|
|
16
|
+
/** Override classes per slot, e.g. `{ overflow: 'bg-primary' }`. */
|
|
17
|
+
ui?: {
|
|
18
|
+
root?: string;
|
|
19
|
+
item?: string;
|
|
20
|
+
overflow?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare var __VLS_1: {
|
|
24
|
+
count: number;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
overflow?: (props: typeof __VLS_1) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {
|
|
30
|
+
unstyled: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { avatarGroupTheme as t } from "../theme/avatar.js";
|
|
3
|
+
import n from "./Avatar.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h } from "vue";
|
|
5
|
+
//#region src/components/AvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var g = /*@__PURE__*/ l({
|
|
7
|
+
__name: "AvatarGroup",
|
|
8
|
+
props: {
|
|
9
|
+
items: {},
|
|
10
|
+
max: {},
|
|
11
|
+
size: {},
|
|
12
|
+
shape: {},
|
|
13
|
+
unstyled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
class: {},
|
|
18
|
+
ui: {}
|
|
19
|
+
},
|
|
20
|
+
setup(l) {
|
|
21
|
+
let g = l, _ = i(() => g.items ?? []), v = i(() => {
|
|
22
|
+
let e = g.max;
|
|
23
|
+
return [...e !== void 0 && _.value.length > e ? _.value.slice(0, e) : _.value].reverse();
|
|
24
|
+
}), y = i(() => {
|
|
25
|
+
let e = g.max;
|
|
26
|
+
return e === void 0 || _.value.length <= e ? 0 : _.value.length - e;
|
|
27
|
+
}), b = e(), x = i(() => g.unstyled ?? b.unstyled), S = i(() => t({ size: g.size })), C = i(() => x.value ? [g.ui?.root, g.class] : S.value.root({ class: [g.ui?.root, g.class] })), w = i(() => x.value ? g.ui?.item : S.value.item({ class: g.ui?.item })), T = i(() => x.value ? g.ui?.overflow : S.value.overflow({ class: g.ui?.overflow }));
|
|
28
|
+
return (e, t) => (f(), s("div", { class: d(C.value) }, [y.value ? (f(), s("span", {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: d(T.value)
|
|
31
|
+
}, [m(e.$slots, "overflow", { count: y.value }, () => [c("+" + h(y.value), 1)])], 2)) : o("", !0), (f(!0), s(r, null, p(v.value, (e, t) => (f(), a(n, u({ key: t }, { ref_for: !0 }, e, {
|
|
32
|
+
size: g.size,
|
|
33
|
+
shape: g.shape,
|
|
34
|
+
unstyled: x.value,
|
|
35
|
+
class: w.value
|
|
36
|
+
}), null, 16, [
|
|
37
|
+
"size",
|
|
38
|
+
"shape",
|
|
39
|
+
"unstyled",
|
|
40
|
+
"class"
|
|
41
|
+
]))), 128))], 2));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { g as default };
|