iryx-ui 0.2.0 → 0.3.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 +180 -20
- package/dist/component-names.d.ts +1 -1
- package/dist/components/Alert.vue.d.ts +3 -3
- package/dist/components/Breadcrumb.vue.d.ts +45 -0
- package/dist/components/Button.vue.d.ts +8 -0
- package/dist/components/ButtonGroup.vue.d.ts +32 -0
- package/dist/components/ConfirmDialog.vue.d.ts +18 -0
- package/dist/components/Dialog.vue.d.ts +65 -0
- package/dist/components/DropdownMenu.vue.d.ts +49 -0
- package/dist/components/DropdownMenuItems.vue.d.ts +24 -0
- package/dist/components/EmptyState.vue.d.ts +46 -0
- package/dist/components/FormField.vue.d.ts +9 -0
- package/dist/components/Icon.vue.d.ts +8 -0
- package/dist/components/Label.vue.d.ts +6 -0
- package/dist/components/Pagination.vue.d.ts +57 -0
- package/dist/components/Progress.vue.d.ts +52 -0
- package/dist/components/Separator.vue.d.ts +36 -0
- package/dist/components/Skeleton.vue.d.ts +20 -0
- package/dist/components/Stat.vue.d.ts +57 -0
- package/dist/components/Stepper.vue.d.ts +61 -0
- package/dist/components/Tabs.vue.d.ts +63 -0
- package/dist/components/Toaster.vue.d.ts +28 -0
- package/dist/components/Tooltip.vue.d.ts +49 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/composables/button-group.d.ts +12 -0
- package/dist/composables/confirm.d.ts +36 -0
- package/dist/composables/dropdown-menu.d.ts +22 -0
- package/dist/composables/icon.d.ts +10 -0
- package/dist/composables/toast.d.ts +42 -0
- package/dist/config.d.ts +9 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +64 -31
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +201 -0
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue.js +25 -0
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue2.js +63 -0
- package/dist/nuxt.js +1 -1
- package/dist/packages/iryx-ui/src/component-names.js +4 -0
- package/dist/packages/iryx-ui/src/components/Alert.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/packages/iryx-ui/src/components/Breadcrumb.js +5 -0
- package/dist/packages/iryx-ui/src/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/packages/iryx-ui/src/components/Button.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/packages/iryx-ui/src/components/ButtonGroup.js +5 -0
- package/dist/packages/iryx-ui/src/components/ButtonGroup.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/packages/iryx-ui/src/components/Checkbox.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/packages/iryx-ui/src/components/ConfirmDialog.js +5 -0
- package/dist/packages/iryx-ui/src/components/ConfirmDialog.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/packages/iryx-ui/src/components/Dialog.js +5 -0
- package/dist/packages/iryx-ui/src/components/Dialog.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenu.js +5 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenu.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenuItems.js +5 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/packages/iryx-ui/src/components/EmptyState.js +5 -0
- package/dist/packages/iryx-ui/src/components/EmptyState.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/{components → packages/iryx-ui/src/components}/FormField.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/packages/iryx-ui/src/components/Icon.js +5 -0
- package/dist/packages/iryx-ui/src/components/Icon.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/{components → packages/iryx-ui/src/components}/Label.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/packages/iryx-ui/src/components/Pagination.js +5 -0
- package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/packages/iryx-ui/src/components/Progress.js +5 -0
- package/dist/packages/iryx-ui/src/components/Progress.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/packages/iryx-ui/src/components/Select.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/packages/iryx-ui/src/components/Separator.js +5 -0
- package/dist/packages/iryx-ui/src/components/Separator.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/packages/iryx-ui/src/components/Skeleton.js +5 -0
- package/dist/packages/iryx-ui/src/components/Skeleton.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/packages/iryx-ui/src/components/Stat.js +5 -0
- package/dist/packages/iryx-ui/src/components/Stat.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/packages/iryx-ui/src/components/Stepper.js +5 -0
- package/dist/packages/iryx-ui/src/components/Stepper.vue_vue_type_script_setup_true_lang.js +89 -0
- package/dist/packages/iryx-ui/src/components/Tabs.js +5 -0
- package/dist/packages/iryx-ui/src/components/Tabs.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/packages/iryx-ui/src/components/Toaster.js +5 -0
- package/dist/packages/iryx-ui/src/components/Toaster.vue_vue_type_script_setup_true_lang.js +115 -0
- package/dist/packages/iryx-ui/src/components/Tooltip.js +5 -0
- package/dist/packages/iryx-ui/src/components/Tooltip.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/packages/iryx-ui/src/components/index.js +64 -0
- package/dist/{composables → packages/iryx-ui/src/composables}/appearance.js +11 -7
- package/dist/packages/iryx-ui/src/composables/button-group.js +8 -0
- package/dist/packages/iryx-ui/src/composables/confirm.js +25 -0
- package/dist/packages/iryx-ui/src/composables/dropdown-menu.js +9 -0
- package/dist/packages/iryx-ui/src/composables/icon.js +6 -0
- package/dist/packages/iryx-ui/src/composables/toast.js +38 -0
- package/dist/{theme → packages/iryx-ui/src/theme}/badge.js +3 -3
- package/dist/packages/iryx-ui/src/theme/breadcrumb.js +12 -0
- package/dist/packages/iryx-ui/src/theme/button-group.js +15 -0
- package/dist/packages/iryx-ui/src/theme/button.js +59 -0
- package/dist/packages/iryx-ui/src/theme/dialog.js +23 -0
- package/dist/packages/iryx-ui/src/theme/dropdown-menu.js +16 -0
- package/dist/packages/iryx-ui/src/theme/empty-state.js +34 -0
- package/dist/packages/iryx-ui/src/theme/form.js +38 -0
- package/dist/{theme → packages/iryx-ui/src/theme}/label.js +10 -1
- package/dist/packages/iryx-ui/src/theme/pagination.js +29 -0
- package/dist/packages/iryx-ui/src/theme/progress.js +33 -0
- package/dist/packages/iryx-ui/src/theme/separator.js +22 -0
- package/dist/packages/iryx-ui/src/theme/skeleton.js +13 -0
- package/dist/packages/iryx-ui/src/theme/stat.js +30 -0
- package/dist/packages/iryx-ui/src/theme/stepper.js +25 -0
- package/dist/packages/iryx-ui/src/theme/tabs.js +52 -0
- package/dist/packages/iryx-ui/src/theme/toast.js +53 -0
- package/dist/packages/iryx-ui/src/theme/tooltip.js +8 -0
- package/dist/theme/breadcrumb.d.ts +59 -0
- package/dist/theme/button-group.d.ts +29 -0
- package/dist/theme/button.d.ts +17 -2
- package/dist/theme/dialog.d.ts +74 -0
- package/dist/theme/dropdown-menu.d.ts +53 -0
- package/dist/theme/empty-state.d.ts +86 -0
- package/dist/theme/form.d.ts +62 -35
- package/dist/theme/index.d.ts +14 -0
- package/dist/theme/label.d.ts +18 -0
- package/dist/theme/pagination.d.ts +71 -0
- package/dist/theme/progress.d.ts +143 -0
- package/dist/theme/separator.d.ts +50 -0
- package/dist/theme/skeleton.d.ts +23 -0
- package/dist/theme/stat.d.ts +110 -0
- package/dist/theme/stepper.d.ts +56 -0
- package/dist/theme/tabs.d.ts +104 -0
- package/dist/theme/toast.d.ts +176 -0
- package/dist/theme/tooltip.d.ts +32 -0
- package/package.json +4 -3
- package/theme.css +55 -0
- package/dist/component-names.js +0 -19
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +0 -74
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +0 -54
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +0 -79
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +0 -84
- package/dist/components/index.js +0 -34
- package/dist/theme/button.js +0 -27
- package/dist/theme/form.js +0 -14
- /package/dist/{components → packages/iryx-ui/src/components}/Alert.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/App.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/App.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Badge.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Badge.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Button.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Card.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Card.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Checkbox.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Form.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Form.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/FormField.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Input.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Input.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Label.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/RadioGroup.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/RadioGroup.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Select.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Switch.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Switch.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Textarea.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Textarea.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{composables → packages/iryx-ui/src/composables}/form.js +0 -0
- /package/dist/{config.js → packages/iryx-ui/src/config.js} +0 -0
- /package/dist/{plugin.js → packages/iryx-ui/src/plugin.js} +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/alert.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/card.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/checkbox.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/input.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/presets.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/radio-group.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/select.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/switch.js +0 -0
package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ArrowLeft01Icon as e, ArrowRight01Icon as t } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
+
import { useIryxUiConfig as n } from "../config.js";
|
|
3
|
+
import r from "./Icon.js";
|
|
4
|
+
import { paginationTheme as i } from "../theme/pagination.js";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createElementBlock 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";
|
|
6
|
+
import { PaginationEllipsis as x, PaginationList as S, PaginationListItem as C, PaginationNext as w, PaginationPrev as T, PaginationRoot as E } from "reka-ui";
|
|
7
|
+
//#region src/components/Pagination.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var D = /*@__PURE__*/ d({
|
|
9
|
+
__name: "Pagination",
|
|
10
|
+
props: /*@__PURE__*/ f({
|
|
11
|
+
total: { default: 0 },
|
|
12
|
+
itemsPerPage: { default: 10 },
|
|
13
|
+
siblingCount: { default: 1 },
|
|
14
|
+
showEdges: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
size: {},
|
|
19
|
+
prevLabel: { default: "Previous page" },
|
|
20
|
+
nextLabel: { default: "Next page" },
|
|
21
|
+
label: { default: "Pagination" },
|
|
22
|
+
unstyled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
class: {},
|
|
27
|
+
ui: {}
|
|
28
|
+
}, {
|
|
29
|
+
page: { default: 1 },
|
|
30
|
+
pageModifiers: {}
|
|
31
|
+
}),
|
|
32
|
+
emits: ["update:page"],
|
|
33
|
+
setup(d) {
|
|
34
|
+
let f = d, D = y(d, "page"), O = n(), k = o(() => f.unstyled ?? O.unstyled), A = o(() => i({ size: f.size })), j = o(() => k.value ? [f.ui?.root, f.class] : A.value.root({ class: [f.ui?.root, f.class] })), M = o(() => k.value ? f.ui?.list : A.value.list({ class: f.ui?.list })), N = o(() => k.value ? f.ui?.ellipsis : A.value.ellipsis({ class: f.ui?.ellipsis }));
|
|
35
|
+
function P(e) {
|
|
36
|
+
return k.value ? f.ui?.item : [A.value.item({ class: f.ui?.item }), e ? A.value.active() : A.value.inactive()];
|
|
37
|
+
}
|
|
38
|
+
return (n, i) => (m(), s(v(E), {
|
|
39
|
+
page: D.value,
|
|
40
|
+
"onUpdate:page": i[0] ||= (e) => D.value = e,
|
|
41
|
+
total: f.total,
|
|
42
|
+
"items-per-page": f.itemsPerPage,
|
|
43
|
+
"sibling-count": f.siblingCount,
|
|
44
|
+
"show-edges": f.showEdges,
|
|
45
|
+
"aria-label": f.label,
|
|
46
|
+
class: p(j.value)
|
|
47
|
+
}, {
|
|
48
|
+
default: b(() => [u(v(S), { class: p(M.value) }, {
|
|
49
|
+
default: b(({ items: o }) => [
|
|
50
|
+
u(v(T), {
|
|
51
|
+
"aria-label": f.prevLabel,
|
|
52
|
+
class: p(P(!1))
|
|
53
|
+
}, {
|
|
54
|
+
default: b(() => [g(n.$slots, "prev", {}, () => [u(r, { icon: v(e) }, null, 8, ["icon"])])]),
|
|
55
|
+
_: 3
|
|
56
|
+
}, 8, ["aria-label", "class"]),
|
|
57
|
+
(m(!0), c(a, null, h(o, (e, t) => (m(), c(a, { key: t }, [e.type === "page" ? (m(), s(v(C), {
|
|
58
|
+
key: 0,
|
|
59
|
+
value: e.value,
|
|
60
|
+
class: p(P(e.value === D.value))
|
|
61
|
+
}, {
|
|
62
|
+
default: b(() => [l(_(e.value), 1)]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, 1032, ["value", "class"])) : (m(), s(v(x), {
|
|
65
|
+
key: 1,
|
|
66
|
+
class: p(N.value)
|
|
67
|
+
}, {
|
|
68
|
+
default: b(() => [...i[1] ||= [l(" … ", -1)]]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, ["class"]))], 64))), 128)),
|
|
71
|
+
u(v(w), {
|
|
72
|
+
"aria-label": f.nextLabel,
|
|
73
|
+
class: p(P(!1))
|
|
74
|
+
}, {
|
|
75
|
+
default: b(() => [g(n.$slots, "next", {}, () => [u(r, { icon: v(t) }, null, 8, ["icon"])])]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, ["aria-label", "class"])
|
|
78
|
+
]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 8, ["class"])]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 8, [
|
|
83
|
+
"page",
|
|
84
|
+
"total",
|
|
85
|
+
"items-per-page",
|
|
86
|
+
"sibling-count",
|
|
87
|
+
"show-edges",
|
|
88
|
+
"aria-label",
|
|
89
|
+
"class"
|
|
90
|
+
]));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
export { D as default };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { progressTheme as t } from "../theme/progress.js";
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
|
|
4
|
+
import { ProgressIndicator as h, ProgressRoot as g } from "reka-ui";
|
|
5
|
+
//#region src/components/Progress.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _ = /*@__PURE__*/ s({
|
|
7
|
+
__name: "Progress",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {},
|
|
10
|
+
max: { default: 100 },
|
|
11
|
+
variant: {},
|
|
12
|
+
size: {},
|
|
13
|
+
indeterminate: { type: Boolean },
|
|
14
|
+
label: {},
|
|
15
|
+
showValue: { type: Boolean },
|
|
16
|
+
formatValue: {},
|
|
17
|
+
unstyled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
class: {},
|
|
22
|
+
ui: {}
|
|
23
|
+
},
|
|
24
|
+
setup(s) {
|
|
25
|
+
let _ = s, v = n(() => _.indeterminate || _.modelValue == null), y = n(() => v.value ? null : Math.min(Math.max(_.modelValue ?? 0, 0), _.max)), b = n(() => y.value == null ? 0 : y.value / _.max * 100), x = n(() => {
|
|
26
|
+
if (y.value != null) return _.formatValue ? _.formatValue(y.value, _.max) : `${Math.round(b.value)}%`;
|
|
27
|
+
}), S = n(() => !!(_.label || _.showValue && x.value)), C = e(), w = n(() => _.unstyled ?? C.unstyled), T = n(() => t({
|
|
28
|
+
variant: _.variant,
|
|
29
|
+
size: _.size,
|
|
30
|
+
indeterminate: v.value
|
|
31
|
+
})), E = n(() => w.value ? [_.ui?.root, _.class] : T.value.root({ class: [_.ui?.root, _.class] })), D = n(() => w.value ? _.ui?.header : T.value.header({ class: _.ui?.header })), O = n(() => w.value ? _.ui?.label : T.value.label({ class: _.ui?.label })), k = n(() => w.value ? _.ui?.value : T.value.value({ class: _.ui?.value })), A = n(() => w.value ? _.ui?.track : T.value.track({ class: _.ui?.track })), j = n(() => w.value ? _.ui?.indicator : T.value.indicator({ class: _.ui?.indicator })), M = n(() => v.value ? void 0 : { transform: `translateX(-${100 - b.value}%)` });
|
|
32
|
+
return (e, t) => (u(), i("div", { class: c(E.value) }, [S.value ? (u(), i("div", {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: c(D.value)
|
|
35
|
+
}, [_.label || e.$slots.label ? (u(), i("span", {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: c(O.value)
|
|
38
|
+
}, [d(e.$slots, "label", {}, () => [a(f(_.label), 1)])], 2)) : r("", !0), _.showValue && x.value ? (u(), i("span", {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: c(k.value)
|
|
41
|
+
}, [d(e.$slots, "value", {
|
|
42
|
+
value: y.value,
|
|
43
|
+
percent: b.value,
|
|
44
|
+
formatted: x.value
|
|
45
|
+
}, () => [a(f(x.value), 1)])], 2)) : r("", !0)], 2)) : r("", !0), o(p(g), {
|
|
46
|
+
"model-value": y.value,
|
|
47
|
+
max: _.max,
|
|
48
|
+
"get-value-label": () => x.value ?? "",
|
|
49
|
+
class: c(A.value)
|
|
50
|
+
}, {
|
|
51
|
+
default: m(() => [o(p(h), {
|
|
52
|
+
class: c(j.value),
|
|
53
|
+
style: l(M.value)
|
|
54
|
+
}, null, 8, ["class", "style"])]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, [
|
|
57
|
+
"model-value",
|
|
58
|
+
"max",
|
|
59
|
+
"get-value-label",
|
|
60
|
+
"class"
|
|
61
|
+
])], 2));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//#endregion
|
|
65
|
+
export { _ as default };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ArrowDown01Icon as e, Tick02Icon as t } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
+
import { useIryxUiConfig as n } from "../config.js";
|
|
3
|
+
import r from "./Icon.js";
|
|
4
|
+
import { selectTheme as i } from "../theme/select.js";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, normalizeClass as p, normalizeProps as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
6
|
+
import { SelectContent as x, SelectIcon as S, SelectItem as C, SelectItemIndicator as w, SelectItemText as T, SelectPortal as E, SelectRoot as D, SelectTrigger as O, SelectValue as k, SelectViewport as A, useForwardPropsEmits as j } from "reka-ui";
|
|
7
|
+
//#region src/components/Select.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var M = /*@__PURE__*/ d({
|
|
9
|
+
__name: "Select",
|
|
10
|
+
props: {
|
|
11
|
+
items: {},
|
|
12
|
+
placeholder: {},
|
|
13
|
+
size: {},
|
|
14
|
+
unstyled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
class: {},
|
|
19
|
+
ui: {},
|
|
20
|
+
open: { type: Boolean },
|
|
21
|
+
defaultOpen: { type: Boolean },
|
|
22
|
+
defaultValue: {},
|
|
23
|
+
modelValue: {},
|
|
24
|
+
by: {},
|
|
25
|
+
dir: {},
|
|
26
|
+
multiple: { type: Boolean },
|
|
27
|
+
autocomplete: {},
|
|
28
|
+
disabled: { type: Boolean },
|
|
29
|
+
name: {},
|
|
30
|
+
required: { type: Boolean }
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:modelValue", "update:open"],
|
|
33
|
+
setup(d, { emit: M }) {
|
|
34
|
+
let N = d, P = M, F = j(o(() => {
|
|
35
|
+
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } = N;
|
|
36
|
+
return o;
|
|
37
|
+
}), P), I = o(() => (N.items ?? []).map((e) => typeof e == "string" ? {
|
|
38
|
+
label: e,
|
|
39
|
+
value: e
|
|
40
|
+
} : e)), L = n(), R = o(() => N.unstyled ?? L.unstyled), z = o(() => i({ size: N.size })), B = o(() => R.value ? [N.ui?.trigger, N.class] : z.value.trigger({ class: [N.ui?.trigger, N.class] })), V = o(() => R.value ? N.ui?.content : z.value.content({ class: N.ui?.content })), H = o(() => R.value ? N.ui?.viewport : z.value.viewport({ class: N.ui?.viewport })), U = o(() => R.value ? N.ui?.item : z.value.item({ class: N.ui?.item })), W = o(() => R.value ? void 0 : z.value.itemIndicator());
|
|
41
|
+
return (n, i) => (h(), s(y(D), m(f(y(F))), {
|
|
42
|
+
default: b(() => [u(y(O), { class: p(B.value) }, {
|
|
43
|
+
default: b(() => [u(y(k), { placeholder: N.placeholder }, null, 8, ["placeholder"]), u(y(S), { "as-child": "" }, {
|
|
44
|
+
default: b(() => [u(r, { icon: y(e) }, null, 8, ["icon"])]),
|
|
45
|
+
_: 1
|
|
46
|
+
})]),
|
|
47
|
+
_: 1
|
|
48
|
+
}, 8, ["class"]), u(y(E), null, {
|
|
49
|
+
default: b(() => [u(y(x), {
|
|
50
|
+
class: p(V.value),
|
|
51
|
+
position: "popper",
|
|
52
|
+
"side-offset": 4
|
|
53
|
+
}, {
|
|
54
|
+
default: b(() => [u(y(A), { class: p(H.value) }, {
|
|
55
|
+
default: b(() => [_(n.$slots, "default", {}, () => [(h(!0), c(a, null, g(I.value, (e) => (h(), s(y(C), {
|
|
56
|
+
key: e.value,
|
|
57
|
+
value: e.value,
|
|
58
|
+
disabled: e.disabled,
|
|
59
|
+
class: p(U.value)
|
|
60
|
+
}, {
|
|
61
|
+
default: b(() => [u(y(w), { class: p(W.value) }, {
|
|
62
|
+
default: b(() => [u(r, { icon: y(t) }, null, 8, ["icon"])]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["class"]), u(y(T), null, {
|
|
65
|
+
default: b(() => [l(v(e.label), 1)]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1024)]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1032, [
|
|
70
|
+
"value",
|
|
71
|
+
"disabled",
|
|
72
|
+
"class"
|
|
73
|
+
]))), 128))])]),
|
|
74
|
+
_: 3
|
|
75
|
+
}, 8, ["class"])]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, ["class"])]),
|
|
78
|
+
_: 3
|
|
79
|
+
})]),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 16));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { M as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { separatorTheme as t } from "../theme/separator.js";
|
|
3
|
+
import { computed as n, createBlock as r, createElementBlock as i, createElementVNode 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, useSlots as m } from "vue";
|
|
4
|
+
import { Separator as h } from "reka-ui";
|
|
5
|
+
//#region src/components/Separator.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var g = /*@__PURE__*/ c({
|
|
7
|
+
__name: "Separator",
|
|
8
|
+
props: {
|
|
9
|
+
orientation: { default: "horizontal" },
|
|
10
|
+
label: {},
|
|
11
|
+
decorative: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !0
|
|
14
|
+
},
|
|
15
|
+
unstyled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
class: {},
|
|
20
|
+
ui: {}
|
|
21
|
+
},
|
|
22
|
+
setup(c) {
|
|
23
|
+
let g = c, _ = m(), v = n(() => !!(g.label || _.default)), y = e(), b = n(() => g.unstyled ?? y.unstyled), x = n(() => t({ orientation: g.orientation })), S = n(() => b.value ? [g.ui?.root, g.class] : x.value.root({ class: [g.ui?.root, g.class] })), C = n(() => b.value ? g.ui?.line : x.value.line({ class: g.ui?.line })), w = n(() => b.value ? g.ui?.label : x.value.label({ class: g.ui?.label }));
|
|
24
|
+
return (e, t) => v.value ? (u(), i("div", {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: l(S.value)
|
|
27
|
+
}, [
|
|
28
|
+
s(p(h), {
|
|
29
|
+
orientation: g.orientation,
|
|
30
|
+
decorative: g.decorative,
|
|
31
|
+
class: l(C.value)
|
|
32
|
+
}, null, 8, [
|
|
33
|
+
"orientation",
|
|
34
|
+
"decorative",
|
|
35
|
+
"class"
|
|
36
|
+
]),
|
|
37
|
+
a("span", { class: l(w.value) }, [d(e.$slots, "default", {}, () => [o(f(g.label), 1)])], 2),
|
|
38
|
+
s(p(h), {
|
|
39
|
+
orientation: g.orientation,
|
|
40
|
+
decorative: "",
|
|
41
|
+
class: l(C.value)
|
|
42
|
+
}, null, 8, ["orientation", "class"])
|
|
43
|
+
], 2)) : (u(), r(p(h), {
|
|
44
|
+
key: 1,
|
|
45
|
+
orientation: g.orientation,
|
|
46
|
+
decorative: g.decorative,
|
|
47
|
+
class: l(b.value ? [g.ui?.line, g.class] : x.value.line({ class: [g.ui?.line, g.class] }))
|
|
48
|
+
}, null, 8, [
|
|
49
|
+
"orientation",
|
|
50
|
+
"decorative",
|
|
51
|
+
"class"
|
|
52
|
+
]));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { g as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { skeletonTheme as t } from "../theme/skeleton.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, defineComponent as o, normalizeClass as s, openBlock as c, renderList as l, unref as u } from "vue";
|
|
4
|
+
import { Primitive as d } from "reka-ui";
|
|
5
|
+
//#region src/components/Skeleton.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var f = ["aria-label"], p = /*@__PURE__*/ o({
|
|
7
|
+
__name: "Skeleton",
|
|
8
|
+
props: {
|
|
9
|
+
as: { default: "div" },
|
|
10
|
+
variant: {},
|
|
11
|
+
lines: { default: 1 },
|
|
12
|
+
label: { default: "Loading" },
|
|
13
|
+
unstyled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
class: {}
|
|
18
|
+
},
|
|
19
|
+
setup(o) {
|
|
20
|
+
let p = o, m = e(), h = r(() => p.unstyled ?? m.unstyled), g = r(() => h.value ? p.class : t({
|
|
21
|
+
variant: p.variant,
|
|
22
|
+
class: p.class
|
|
23
|
+
})), _ = r(() => Math.max(1, p.lines));
|
|
24
|
+
return (e, t) => _.value > 1 ? (c(), a("div", {
|
|
25
|
+
key: 0,
|
|
26
|
+
role: "status",
|
|
27
|
+
"aria-label": p.label,
|
|
28
|
+
class: "flex w-full flex-col gap-2"
|
|
29
|
+
}, [(c(!0), a(n, null, l(_.value, (e) => (c(), i(u(d), {
|
|
30
|
+
key: e,
|
|
31
|
+
as: p.as,
|
|
32
|
+
class: s(g.value),
|
|
33
|
+
"aria-hidden": "true"
|
|
34
|
+
}, null, 8, ["as", "class"]))), 128))], 8, f)) : (c(), i(u(d), {
|
|
35
|
+
key: 1,
|
|
36
|
+
as: p.as,
|
|
37
|
+
role: "status",
|
|
38
|
+
"aria-label": p.label,
|
|
39
|
+
class: s(g.value)
|
|
40
|
+
}, null, 8, [
|
|
41
|
+
"as",
|
|
42
|
+
"aria-label",
|
|
43
|
+
"class"
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//#endregion
|
|
48
|
+
export { p as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ArrowDown01Icon as e, ArrowRight01Icon as t, ArrowUp01Icon as n } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
+
import { useIryxUiConfig as r } from "../config.js";
|
|
3
|
+
import i from "./Icon.js";
|
|
4
|
+
import { statTheme as a } from "../theme/stat.js";
|
|
5
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
6
|
+
import { Primitive as b } from "reka-ui";
|
|
7
|
+
//#region src/components/Stat.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var x = /*@__PURE__*/ p({
|
|
9
|
+
__name: "Stat",
|
|
10
|
+
props: {
|
|
11
|
+
as: { default: "div" },
|
|
12
|
+
label: {},
|
|
13
|
+
value: {},
|
|
14
|
+
delta: {},
|
|
15
|
+
trend: {},
|
|
16
|
+
hint: {},
|
|
17
|
+
size: {},
|
|
18
|
+
formatDelta: {},
|
|
19
|
+
unstyled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
class: {},
|
|
24
|
+
ui: {}
|
|
25
|
+
},
|
|
26
|
+
setup(p) {
|
|
27
|
+
let x = p, S = o(() => x.trend ? x.trend : x.delta == null || x.delta === 0 ? "neutral" : x.delta > 0 ? "up" : "down"), C = o(() => ({
|
|
28
|
+
up: n,
|
|
29
|
+
down: e,
|
|
30
|
+
neutral: t
|
|
31
|
+
})[S.value]), w = o(() => {
|
|
32
|
+
if (x.delta != null) return x.formatDelta ? x.formatDelta(x.delta) : `${x.delta > 0 ? "+" : ""}${x.delta}%`;
|
|
33
|
+
}), T = r(), E = o(() => x.unstyled ?? T.unstyled), D = o(() => a({
|
|
34
|
+
size: x.size,
|
|
35
|
+
trend: S.value
|
|
36
|
+
})), O = o(() => E.value ? [x.ui?.root, x.class] : D.value.root({ class: [x.ui?.root, x.class] })), k = o(() => E.value ? x.ui?.label : D.value.label({ class: x.ui?.label })), A = o(() => E.value ? x.ui?.value : D.value.value({ class: x.ui?.value })), j = o(() => E.value ? x.ui?.delta : D.value.delta({ class: x.ui?.delta })), M = o(() => E.value ? x.ui?.hint : D.value.hint({ class: x.ui?.hint })), N = o(() => E.value ? x.ui?.row : D.value.row({ class: x.ui?.row }));
|
|
37
|
+
return (e, t) => (h(), s(v(b), {
|
|
38
|
+
as: x.as,
|
|
39
|
+
class: m(O.value)
|
|
40
|
+
}, {
|
|
41
|
+
default: y(() => [
|
|
42
|
+
x.label || e.$slots.label ? (h(), l("span", {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: m(k.value)
|
|
45
|
+
}, [g(e.$slots, "label", {}, () => [d(_(x.label), 1)])], 2)) : c("", !0),
|
|
46
|
+
u("span", { class: m(N.value) }, [u("span", { class: m(A.value) }, [g(e.$slots, "default", {}, () => [d(_(x.value), 1)])], 2), w.value || e.$slots.delta ? (h(), l("span", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: m(j.value)
|
|
49
|
+
}, [g(e.$slots, "delta", { trend: S.value }, () => [f(i, {
|
|
50
|
+
icon: C.value,
|
|
51
|
+
"data-icon": "inline-start"
|
|
52
|
+
}, null, 8, ["icon"]), d(" " + _(w.value), 1)])], 2)) : c("", !0)], 2),
|
|
53
|
+
x.hint || e.$slots.hint ? (h(), l("span", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: m(M.value)
|
|
56
|
+
}, [g(e.$slots, "hint", {}, () => [d(_(x.hint), 1)])], 2)) : c("", !0)
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 8, ["as", "class"]));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
//#endregion
|
|
63
|
+
export { x as default };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Tick02Icon as e } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
+
import { useIryxUiConfig as t } from "../config.js";
|
|
3
|
+
import n from "./Icon.js";
|
|
4
|
+
import { stepperTheme as r } from "../theme/stepper.js";
|
|
5
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, normalizeClass as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
|
|
6
|
+
import { StepperDescription as S, StepperIndicator as C, StepperItem as w, StepperRoot as T, StepperSeparator as E, StepperTitle as D, StepperTrigger as O } from "reka-ui";
|
|
7
|
+
//#region src/components/Stepper.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var k = /*@__PURE__*/ f({
|
|
9
|
+
__name: "Stepper",
|
|
10
|
+
props: /*@__PURE__*/ p({
|
|
11
|
+
items: {},
|
|
12
|
+
orientation: {},
|
|
13
|
+
linear: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
unstyled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
class: {},
|
|
22
|
+
ui: {}
|
|
23
|
+
}, {
|
|
24
|
+
modelValue: { default: 1 },
|
|
25
|
+
modelModifiers: {}
|
|
26
|
+
}),
|
|
27
|
+
emits: ["update:modelValue"],
|
|
28
|
+
setup(f) {
|
|
29
|
+
let p = f, k = b(f, "modelValue"), A = a(() => (p.items ?? []).map((e) => typeof e == "string" ? { title: e } : e)), j = t(), M = a(() => p.unstyled ?? j.unstyled), N = a(() => r({ orientation: p.orientation }));
|
|
30
|
+
function P(e) {
|
|
31
|
+
let t = p.ui?.[e];
|
|
32
|
+
return M.value ? t : N.value[e]({ class: t });
|
|
33
|
+
}
|
|
34
|
+
let F = a(() => M.value ? [p.ui?.root, p.class] : N.value.root({ class: [p.ui?.root, p.class] }));
|
|
35
|
+
return (t, r) => (h(), o(y(T), {
|
|
36
|
+
modelValue: k.value,
|
|
37
|
+
"onUpdate:modelValue": r[0] ||= (e) => k.value = e,
|
|
38
|
+
orientation: p.orientation,
|
|
39
|
+
linear: p.linear,
|
|
40
|
+
class: m(F.value)
|
|
41
|
+
}, {
|
|
42
|
+
default: x(() => [(h(!0), c(i, null, g(A.value, (r, a) => (h(), o(y(w), {
|
|
43
|
+
key: a,
|
|
44
|
+
step: a + 1,
|
|
45
|
+
disabled: r.disabled,
|
|
46
|
+
class: m(P("item"))
|
|
47
|
+
}, {
|
|
48
|
+
default: x(() => [d(y(O), { class: m(P("trigger")) }, {
|
|
49
|
+
default: x(() => [d(y(C), { class: m(P("indicator")) }, {
|
|
50
|
+
default: x(() => [_(t.$slots, "indicator", {
|
|
51
|
+
step: a + 1,
|
|
52
|
+
item: r
|
|
53
|
+
}, () => [a + 1 < k.value ? (h(), o(n, {
|
|
54
|
+
key: 0,
|
|
55
|
+
icon: y(e)
|
|
56
|
+
}, null, 8, ["icon"])) : (h(), c(i, { key: 1 }, [u(v(a + 1), 1)], 64))])]),
|
|
57
|
+
_: 2
|
|
58
|
+
}, 1032, ["class"]), l("span", { class: m(P("content")) }, [d(y(D), { class: m(P("title")) }, {
|
|
59
|
+
default: x(() => [u(v(r.title), 1)]),
|
|
60
|
+
_: 2
|
|
61
|
+
}, 1032, ["class"]), r.description ? (h(), o(y(S), {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: m(P("description"))
|
|
64
|
+
}, {
|
|
65
|
+
default: x(() => [u(v(r.description), 1)]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1032, ["class"])) : s("", !0)], 2)]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1032, ["class"]), a < A.value.length - 1 ? (h(), o(y(E), {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: m(P("separator"))
|
|
72
|
+
}, null, 8, ["class"])) : s("", !0)]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, 1032, [
|
|
75
|
+
"step",
|
|
76
|
+
"disabled",
|
|
77
|
+
"class"
|
|
78
|
+
]))), 128))]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 8, [
|
|
81
|
+
"modelValue",
|
|
82
|
+
"orientation",
|
|
83
|
+
"linear",
|
|
84
|
+
"class"
|
|
85
|
+
]));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//#endregion
|
|
89
|
+
export { k as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { tabsTheme as n } from "../theme/tabs.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, normalizeClass as f, openBlock as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, useModel as v, withCtx as y } from "vue";
|
|
5
|
+
import { TabsContent as b, TabsIndicator as x, TabsList as S, TabsRoot as C, TabsTrigger as w } from "reka-ui";
|
|
6
|
+
//#region src/components/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var T = /*@__PURE__*/ u({
|
|
8
|
+
__name: "Tabs",
|
|
9
|
+
props: /*@__PURE__*/ d({
|
|
10
|
+
items: {},
|
|
11
|
+
variant: {},
|
|
12
|
+
orientation: {},
|
|
13
|
+
keepMounted: { type: Boolean },
|
|
14
|
+
unstyled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
class: {},
|
|
19
|
+
ui: {}
|
|
20
|
+
}, {
|
|
21
|
+
modelValue: { default: void 0 },
|
|
22
|
+
modelModifiers: {}
|
|
23
|
+
}),
|
|
24
|
+
emits: ["update:modelValue"],
|
|
25
|
+
setup(u) {
|
|
26
|
+
let d = u, T = i(() => (d.items ?? []).map((e) => typeof e == "string" ? { label: e } : e)), E = (e) => e.value ?? e.label, D = v(u, "modelValue"), O = e(), k = i(() => d.unstyled ?? O.unstyled), A = i(() => n({
|
|
27
|
+
variant: d.variant,
|
|
28
|
+
orientation: d.orientation
|
|
29
|
+
})), j = i(() => k.value ? [d.ui?.root, d.class] : A.value.root({ class: [d.ui?.root, d.class] })), M = i(() => k.value ? d.ui?.list : A.value.list({ class: d.ui?.list })), N = i(() => k.value ? d.ui?.indicator : A.value.indicator({ class: d.ui?.indicator })), P = i(() => k.value ? d.ui?.trigger : A.value.trigger({ class: d.ui?.trigger })), F = i(() => k.value ? d.ui?.content : A.value.content({ class: d.ui?.content }));
|
|
30
|
+
return (e, n) => (p(), a(_(C), {
|
|
31
|
+
modelValue: D.value,
|
|
32
|
+
"onUpdate:modelValue": n[0] ||= (e) => D.value = e,
|
|
33
|
+
"default-value": T.value[0] ? E(T.value[0]) : void 0,
|
|
34
|
+
orientation: d.orientation,
|
|
35
|
+
class: f(j.value)
|
|
36
|
+
}, {
|
|
37
|
+
default: y(() => [l(_(S), { class: f(M.value) }, {
|
|
38
|
+
default: y(() => [l(_(x), { class: f(N.value) }, null, 8, ["class"]), h(e.$slots, "list", {}, () => [(p(!0), s(r, null, m(T.value, (n) => (p(), a(_(w), {
|
|
39
|
+
key: E(n),
|
|
40
|
+
value: E(n),
|
|
41
|
+
disabled: n.disabled,
|
|
42
|
+
class: f(P.value)
|
|
43
|
+
}, {
|
|
44
|
+
default: y(() => [h(e.$slots, "trigger", { item: n }, () => [n.icon ? (p(), a(t, {
|
|
45
|
+
key: 0,
|
|
46
|
+
icon: n.icon
|
|
47
|
+
}, null, 8, ["icon"])) : o("", !0), c(" " + g(n.label), 1)])]),
|
|
48
|
+
_: 2
|
|
49
|
+
}, 1032, [
|
|
50
|
+
"value",
|
|
51
|
+
"disabled",
|
|
52
|
+
"class"
|
|
53
|
+
]))), 128))])]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, ["class"]), h(e.$slots, "default", {}, () => [(p(!0), s(r, null, m(T.value, (t) => (p(), a(_(b), {
|
|
56
|
+
key: E(t),
|
|
57
|
+
value: E(t),
|
|
58
|
+
"force-mount": d.keepMounted || void 0,
|
|
59
|
+
class: f(F.value)
|
|
60
|
+
}, {
|
|
61
|
+
default: y(() => [h(e.$slots, E(t), { item: t })]),
|
|
62
|
+
_: 2
|
|
63
|
+
}, 1032, [
|
|
64
|
+
"value",
|
|
65
|
+
"force-mount",
|
|
66
|
+
"class"
|
|
67
|
+
]))), 128))])]),
|
|
68
|
+
_: 3
|
|
69
|
+
}, 8, [
|
|
70
|
+
"modelValue",
|
|
71
|
+
"default-value",
|
|
72
|
+
"orientation",
|
|
73
|
+
"class"
|
|
74
|
+
]));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { T as default };
|