iryx-ui 0.24.1 → 0.26.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/dist/components/AvatarGroup.vue.d.ts +8 -2
- package/dist/components/AvatarGroup.vue_vue_type_script_setup_true_lang.js +57 -23
- package/dist/components/Breadcrumb.vue.d.ts +10 -2
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +66 -34
- package/dist/components/CommandPalette.vue.d.ts +12 -0
- package/dist/components/CommandPalette.vue_vue_type_script_setup_true_lang.js +122 -85
- package/dist/components/ConfirmPopover.vue.d.ts +1 -1
- package/dist/components/DateRangePicker.vue.d.ts +14 -2
- package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +111 -70
- package/dist/components/FileUpload.vue.d.ts +23 -1
- package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +139 -96
- package/dist/components/Input.vue.d.ts +14 -0
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +86 -69
- package/dist/components/SignaturePad.vue.d.ts +1 -1
- package/dist/components/Tabs.vue.d.ts +7 -6
- package/dist/components/Tabs.vue_vue_type_script_setup_true_lang.js +65 -30
- package/dist/components/Textarea.vue.d.ts +14 -0
- package/dist/components/Textarea.vue_vue_type_script_setup_true_lang.js +90 -42
- package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +42 -41
- package/dist/components/index.js +144 -144
- package/dist/composables/character-count.d.ts +6 -0
- package/dist/composables/character-count.js +18 -0
- package/dist/composables/command-palette.d.ts +7 -0
- package/dist/composables/command-palette.js +8 -2
- package/dist/composables/date.d.ts +25 -0
- package/dist/composables/date.js +59 -16
- package/dist/composables/scroll-fade.d.ts +1 -1
- package/dist/composables/toast.d.ts +16 -1
- package/dist/composables/toast.js +23 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +154 -154
- package/dist/theme/avatar.d.ts +21 -0
- package/dist/theme/avatar.js +28 -21
- package/dist/theme/bar-chart.d.ts +3 -3
- package/dist/theme/date-picker.d.ts +9 -0
- package/dist/theme/date-picker.js +3 -0
- package/dist/theme/donut-chart.d.ts +3 -3
- package/dist/theme/file-upload.d.ts +24 -0
- package/dist/theme/file-upload.js +6 -2
- package/dist/theme/input.d.ts +46 -0
- package/dist/theme/input.js +10 -2
- package/dist/theme/line-chart.d.ts +3 -3
- package/dist/theme/tabs.d.ts +18 -3
- package/dist/theme/tabs.js +20 -12
- package/dist/theme/toast.d.ts +9 -0
- package/dist/theme/toast.js +2 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import t from "./Icon.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { scrollFadeMask as n, useScrollEdges as r } from "../composables/scroll-fade.js";
|
|
4
|
+
import { tabsTheme as i } from "../theme/tabs.js";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeModels as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onMounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useModel as T, watch as E, withCtx as D } from "vue";
|
|
6
|
+
import { TabsContent as O, TabsIndicator as k, TabsList as A, TabsRoot as j, TabsTrigger as M } from "reka-ui";
|
|
6
7
|
//#region src/components/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var N = 24, P = /*@__PURE__*/ p({
|
|
8
9
|
__name: "Tabs",
|
|
9
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ m({
|
|
10
11
|
items: {},
|
|
11
12
|
variant: {},
|
|
12
13
|
orientation: {},
|
|
@@ -27,29 +28,57 @@ var T = /*@__PURE__*/ u({
|
|
|
27
28
|
modelModifiers: {}
|
|
28
29
|
}),
|
|
29
30
|
emits: ["update:modelValue"],
|
|
30
|
-
setup(
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
setup(p) {
|
|
32
|
+
let m = p, P = o(() => (m.items ?? []).map((e) => typeof e == "string" ? { label: e } : e)), F = (e) => e.value ?? e.label, I = T(p, "modelValue"), L = b(), R = o(() => L.value?.$el), z = o(() => m.orientation === "vertical" ? "vertical" : "horizontal"), { atStart: B, atEnd: V, overflowing: H } = r(R, z), U = o(() => {
|
|
33
|
+
if (!H.value) return;
|
|
34
|
+
let e = n({
|
|
35
|
+
orientation: z.value,
|
|
36
|
+
size: `${N}px`,
|
|
37
|
+
fadeStart: !B.value,
|
|
38
|
+
fadeEnd: !V.value
|
|
39
|
+
});
|
|
40
|
+
return e ? {
|
|
41
|
+
maskImage: e,
|
|
42
|
+
WebkitMaskImage: e
|
|
43
|
+
} : void 0;
|
|
44
|
+
});
|
|
45
|
+
function W() {
|
|
46
|
+
let e = R.value, t = e?.querySelector("[role=\"tab\"][data-state=\"active\"]");
|
|
47
|
+
if (!e || !t) return;
|
|
48
|
+
let n = z.value === "vertical", r = n ? t.offsetTop : t.offsetLeft, i = r + (n ? t.offsetHeight : t.offsetWidth), a = n ? e.scrollTop : e.scrollLeft, o = n ? e.clientHeight : e.clientWidth, s = a;
|
|
49
|
+
r < a + N ? s = r - N : i > a + o - N && (s = i - o + N), s !== a && (n ? e.scrollTop = Math.max(0, s) : e.scrollLeft = Math.max(0, s));
|
|
50
|
+
}
|
|
51
|
+
v(() => void h(W)), E(I, () => void h(W));
|
|
52
|
+
let G = e(), K = o(() => m.unstyled ?? G.unstyled), q = o(() => i({
|
|
53
|
+
variant: m.variant,
|
|
54
|
+
orientation: m.orientation
|
|
55
|
+
})), J = o(() => K.value ? [m.ui?.root, m.class] : q.value.root({ class: [m.ui?.root, m.class] })), Y = o(() => K.value ? m.ui?.frame : q.value.frame({ class: m.ui?.frame })), X = o(() => K.value ? m.ui?.list : q.value.list({ class: m.ui?.list })), Z = o(() => K.value ? m.ui?.indicator : q.value.indicator({ class: m.ui?.indicator })), Q = o(() => K.value ? m.ui?.trigger : q.value.trigger({ class: m.ui?.trigger })), $ = o(() => K.value ? m.ui?.content : q.value.content({ class: m.ui?.content }));
|
|
56
|
+
return (e, n) => (y(), s(w(j), {
|
|
57
|
+
modelValue: I.value,
|
|
58
|
+
"onUpdate:modelValue": n[0] ||= (e) => I.value = e,
|
|
59
|
+
"default-value": P.value[0] ? F(P.value[0]) : void 0,
|
|
60
|
+
orientation: m.orientation,
|
|
61
|
+
class: g(J.value)
|
|
41
62
|
}, {
|
|
42
|
-
default:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
default: D(() => [u("div", { class: g(Y.value) }, [f(w(A), {
|
|
64
|
+
ref_key: "list",
|
|
65
|
+
ref: L,
|
|
66
|
+
class: g(X.value),
|
|
67
|
+
style: _(U.value),
|
|
68
|
+
"data-overflowing": w(H) ? "" : void 0,
|
|
69
|
+
"data-at-start": w(B) ? "" : void 0,
|
|
70
|
+
"data-at-end": w(V) ? "" : void 0
|
|
71
|
+
}, {
|
|
72
|
+
default: D(() => [f(w(k), { class: g(Z.value) }, null, 8, ["class"]), S(e.$slots, "list", {}, () => [(y(!0), l(a, null, x(P.value, (n) => (y(), s(w(M), {
|
|
73
|
+
key: F(n),
|
|
74
|
+
value: F(n),
|
|
46
75
|
disabled: n.disabled,
|
|
47
|
-
class:
|
|
76
|
+
class: g(Q.value)
|
|
48
77
|
}, {
|
|
49
|
-
default:
|
|
78
|
+
default: D(() => [S(e.$slots, "trigger", { item: n }, () => [n.icon ? (y(), s(t, {
|
|
50
79
|
key: 0,
|
|
51
80
|
icon: n.icon
|
|
52
|
-
}, null, 8, ["icon"])) :
|
|
81
|
+
}, null, 8, ["icon"])) : c("", !0), d(" " + C(n.label), 1)])]),
|
|
53
82
|
_: 2
|
|
54
83
|
}, 1032, [
|
|
55
84
|
"value",
|
|
@@ -57,13 +86,19 @@ var T = /*@__PURE__*/ u({
|
|
|
57
86
|
"class"
|
|
58
87
|
]))), 128))])]),
|
|
59
88
|
_: 3
|
|
60
|
-
}, 8, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
89
|
+
}, 8, [
|
|
90
|
+
"class",
|
|
91
|
+
"style",
|
|
92
|
+
"data-overflowing",
|
|
93
|
+
"data-at-start",
|
|
94
|
+
"data-at-end"
|
|
95
|
+
])], 2), S(e.$slots, "default", {}, () => [(y(!0), l(a, null, x(P.value, (t) => (y(), s(w(O), {
|
|
96
|
+
key: F(t),
|
|
97
|
+
value: F(t),
|
|
98
|
+
"force-mount": m.keepMounted || void 0,
|
|
99
|
+
class: g($.value)
|
|
65
100
|
}, {
|
|
66
|
-
default:
|
|
101
|
+
default: D(() => [S(e.$slots, F(t), { item: t })]),
|
|
67
102
|
_: 2
|
|
68
103
|
}, 1032, [
|
|
69
104
|
"value",
|
|
@@ -80,4 +115,4 @@ var T = /*@__PURE__*/ u({
|
|
|
80
115
|
}
|
|
81
116
|
});
|
|
82
117
|
//#endregion
|
|
83
|
-
export {
|
|
118
|
+
export { P as default };
|
|
@@ -19,9 +19,22 @@ export interface TextareaProps {
|
|
|
19
19
|
required?: boolean;
|
|
20
20
|
/** Mark the field as invalid — styles the border and ring red. */
|
|
21
21
|
invalid?: boolean;
|
|
22
|
+
/** Hard limit in characters, enforced by the browser. */
|
|
23
|
+
maxlength?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Show a character count under the field — "120/500" with `maxlength`,
|
|
26
|
+
* turning red within the last tenth of the limit.
|
|
27
|
+
*/
|
|
28
|
+
showCount?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* What a screen reader announces near the limit. Override for non-English
|
|
31
|
+
* apps.
|
|
32
|
+
*/
|
|
33
|
+
countLabel?: (remaining: number) => string;
|
|
22
34
|
id?: string;
|
|
23
35
|
/** Skip built-in classes; you take over styling entirely. */
|
|
24
36
|
unstyled?: boolean;
|
|
37
|
+
/** Applied to the wrapper when `showCount` is on, otherwise to the textarea. */
|
|
25
38
|
class?: ClassValue;
|
|
26
39
|
}
|
|
27
40
|
type __VLS_Props = TextareaProps;
|
|
@@ -39,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
39
52
|
}>, {
|
|
40
53
|
unstyled: boolean;
|
|
41
54
|
invalid: boolean;
|
|
55
|
+
countLabel: (remaining: number) => string;
|
|
42
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
57
|
declare const _default: typeof __VLS_export;
|
|
44
58
|
export default _default;
|
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { useFormField as t } from "../composables/form.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { textareaCountTheme as n, textareaTheme as r } from "../theme/input.js";
|
|
4
|
+
import { defaultCountLabel as i, useCharacterCount as a } from "../composables/character-count.js";
|
|
5
|
+
import { computed as o, createElementBlock as s, createElementVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, normalizeClass as p, onMounted as m, openBlock as h, ref as g, toDisplayString as _, unref as v, useModel as y, vModelText as b, watch as x, withDirectives as S } from "vue";
|
|
5
6
|
//#region src/components/Textarea.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
7
|
+
var C = [
|
|
7
8
|
"id",
|
|
8
9
|
"rows",
|
|
10
|
+
"maxlength",
|
|
9
11
|
"placeholder",
|
|
10
12
|
"disabled",
|
|
11
13
|
"required",
|
|
12
14
|
"aria-invalid",
|
|
13
15
|
"aria-describedby"
|
|
14
|
-
],
|
|
16
|
+
], w = {
|
|
17
|
+
class: "sr-only",
|
|
18
|
+
"aria-live": "polite"
|
|
19
|
+
}, T = [
|
|
20
|
+
"id",
|
|
21
|
+
"rows",
|
|
22
|
+
"maxlength",
|
|
23
|
+
"placeholder",
|
|
24
|
+
"disabled",
|
|
25
|
+
"required",
|
|
26
|
+
"aria-invalid",
|
|
27
|
+
"aria-describedby"
|
|
28
|
+
], E = /*@__PURE__*/ l({
|
|
29
|
+
inheritAttrs: !1,
|
|
15
30
|
__name: "Textarea",
|
|
16
|
-
props: /*@__PURE__*/
|
|
31
|
+
props: /*@__PURE__*/ u({
|
|
17
32
|
size: {},
|
|
18
33
|
rows: {},
|
|
19
34
|
autosize: { type: [Boolean, Object] },
|
|
@@ -24,6 +39,12 @@ var _ = [
|
|
|
24
39
|
type: Boolean,
|
|
25
40
|
default: void 0
|
|
26
41
|
},
|
|
42
|
+
maxlength: {},
|
|
43
|
+
showCount: { type: Boolean },
|
|
44
|
+
countLabel: {
|
|
45
|
+
type: Function,
|
|
46
|
+
default: i
|
|
47
|
+
},
|
|
27
48
|
id: {},
|
|
28
49
|
unstyled: {
|
|
29
50
|
type: Boolean,
|
|
@@ -40,51 +61,78 @@ var _ = [
|
|
|
40
61
|
modelModifiers: {}
|
|
41
62
|
}),
|
|
42
63
|
emits: ["update:modelValue"],
|
|
43
|
-
setup(
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
size:
|
|
48
|
-
invalid:
|
|
49
|
-
autosize: !!
|
|
50
|
-
class:
|
|
51
|
-
})), E =
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
function
|
|
64
|
+
setup(i, { expose: l }) {
|
|
65
|
+
let u = i, E = y(i, "modelValue"), D = t(), O = o(() => u.id ?? D?.id.value);
|
|
66
|
+
D && u.id && (D.id.value = u.id);
|
|
67
|
+
let k = o(() => u.invalid ?? D?.invalid.value ?? !1), A = e(), j = o(() => u.unstyled ?? A.unstyled), M = o(() => j.value ? u.class : r({
|
|
68
|
+
size: u.size,
|
|
69
|
+
invalid: k.value,
|
|
70
|
+
autosize: !!u.autosize,
|
|
71
|
+
class: u.showCount ? void 0 : u.class
|
|
72
|
+
})), { remaining: N, nearLimit: P, text: F } = a(() => E.value, () => u.maxlength), I = o(() => n({ nearLimit: P.value })), L = o(() => j.value ? u.class : I.value.root({ class: u.class })), R = o(() => j.value ? void 0 : I.value.count()), z = g();
|
|
73
|
+
l({ textarea: z });
|
|
74
|
+
let B = o(() => typeof u.autosize == "object" ? u.autosize : {});
|
|
75
|
+
function V(e) {
|
|
55
76
|
return Number.parseFloat(e) || 0;
|
|
56
77
|
}
|
|
57
|
-
function
|
|
58
|
-
let e =
|
|
59
|
-
if (!e || !
|
|
78
|
+
function H() {
|
|
79
|
+
let e = z.value;
|
|
80
|
+
if (!e || !u.autosize) return;
|
|
60
81
|
e.style.height = "auto";
|
|
61
|
-
let t = window.getComputedStyle(e), n =
|
|
82
|
+
let t = window.getComputedStyle(e), n = V(t.lineHeight), r = V(t.paddingTop) + V(t.paddingBottom), i = V(t.borderTopWidth) + V(t.borderBottomWidth), a = e.scrollHeight;
|
|
62
83
|
if (n) {
|
|
63
|
-
let { min: e, max: t } =
|
|
84
|
+
let { min: e, max: t } = B.value;
|
|
64
85
|
e != null && (a = Math.max(a, e * n + r)), t != null && (a = Math.min(a, t * n + r));
|
|
65
86
|
}
|
|
66
|
-
e.style.height = `${a + i}px`, e.style.overflowY =
|
|
87
|
+
e.style.height = `${a + i}px`, e.style.overflowY = B.value.max != null && e.scrollHeight > a ? "auto" : "hidden";
|
|
67
88
|
}
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
], () => void
|
|
75
|
-
|
|
89
|
+
return m(() => {
|
|
90
|
+
u.autosize && f(H);
|
|
91
|
+
}), x(() => [
|
|
92
|
+
E.value,
|
|
93
|
+
u.autosize,
|
|
94
|
+
u.size
|
|
95
|
+
], () => void f(H)), (e, t) => u.showCount ? (h(), s("div", {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: p(L.value)
|
|
98
|
+
}, [
|
|
99
|
+
S(c("textarea", d({
|
|
100
|
+
id: O.value,
|
|
101
|
+
ref_key: "el",
|
|
102
|
+
ref: z
|
|
103
|
+
}, e.$attrs, {
|
|
104
|
+
"onUpdate:modelValue": t[0] ||= (e) => E.value = e,
|
|
105
|
+
rows: u.autosize ? B.value.min : u.rows,
|
|
106
|
+
maxlength: u.maxlength,
|
|
107
|
+
placeholder: u.placeholder,
|
|
108
|
+
disabled: u.disabled,
|
|
109
|
+
required: u.required,
|
|
110
|
+
"aria-invalid": k.value || void 0,
|
|
111
|
+
"aria-describedby": v(D)?.describedBy.value,
|
|
112
|
+
class: M.value
|
|
113
|
+
}), null, 16, C), [[b, E.value]]),
|
|
114
|
+
c("span", {
|
|
115
|
+
"aria-hidden": "true",
|
|
116
|
+
class: p(R.value)
|
|
117
|
+
}, _(v(F)), 3),
|
|
118
|
+
c("span", w, _(v(P) ? u.countLabel(v(N)) : ""), 1)
|
|
119
|
+
], 2)) : S((h(), s("textarea", d({
|
|
120
|
+
key: 1,
|
|
121
|
+
id: O.value,
|
|
76
122
|
ref_key: "el",
|
|
77
|
-
ref:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
123
|
+
ref: z
|
|
124
|
+
}, e.$attrs, {
|
|
125
|
+
"onUpdate:modelValue": t[1] ||= (e) => E.value = e,
|
|
126
|
+
rows: u.autosize ? B.value.min : u.rows,
|
|
127
|
+
maxlength: u.maxlength,
|
|
128
|
+
placeholder: u.placeholder,
|
|
129
|
+
disabled: u.disabled,
|
|
130
|
+
required: u.required,
|
|
131
|
+
"aria-invalid": k.value || void 0,
|
|
132
|
+
"aria-describedby": v(D)?.describedBy.value,
|
|
133
|
+
class: M.value
|
|
134
|
+
}), null, 16, T)), [[b, E.value]]);
|
|
87
135
|
}
|
|
88
136
|
});
|
|
89
137
|
//#endregion
|
|
90
|
-
export {
|
|
138
|
+
export { E as default };
|
|
@@ -3,10 +3,10 @@ import t from "./Icon.js";
|
|
|
3
3
|
import { useToast as n, useToastState as r } from "../composables/toast.js";
|
|
4
4
|
import { toastTheme as i } from "../theme/toast.js";
|
|
5
5
|
import { Fragment as a, 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, renderList as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
6
|
-
import { Alert02Icon as b, AlertCircleIcon as x, Cancel01Icon as S, CheckmarkCircle02Icon as C, InformationCircleIcon as w } from "@hugeicons/core-free-icons";
|
|
7
|
-
import { ToastAction as
|
|
6
|
+
import { Alert02Icon as b, AlertCircleIcon as x, Cancel01Icon as S, CheckmarkCircle02Icon as C, InformationCircleIcon as w, Loading03Icon as T } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { ToastAction as E, ToastClose as D, ToastDescription as O, ToastPortal as k, ToastProvider as A, ToastRoot as j, ToastTitle as M, ToastViewport as N } from "reka-ui";
|
|
8
8
|
//#region src/components/Toaster.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var P = /*@__PURE__*/ p({
|
|
10
10
|
__name: "Toaster",
|
|
11
11
|
props: {
|
|
12
12
|
position: {},
|
|
@@ -25,68 +25,69 @@ var N = /*@__PURE__*/ p({
|
|
|
25
25
|
ui: {}
|
|
26
26
|
},
|
|
27
27
|
setup(p) {
|
|
28
|
-
let
|
|
28
|
+
let P = p, F = r(), { dismiss: I } = n(), L = {
|
|
29
29
|
success: C,
|
|
30
30
|
warning: b,
|
|
31
31
|
danger: x,
|
|
32
|
-
info: w
|
|
32
|
+
info: w,
|
|
33
|
+
loading: T
|
|
33
34
|
};
|
|
34
|
-
function L(e) {
|
|
35
|
-
return e.variant && e.variant !== "neutral" ? I[e.variant] : void 0;
|
|
36
|
-
}
|
|
37
35
|
function R(e) {
|
|
38
|
-
|
|
36
|
+
return e.variant && e.variant !== "neutral" ? L[e.variant] : void 0;
|
|
37
|
+
}
|
|
38
|
+
function z(e) {
|
|
39
|
+
let t = e.duration ?? P.duration;
|
|
39
40
|
return t === 0 ? Infinity : t;
|
|
40
41
|
}
|
|
41
|
-
let
|
|
42
|
-
function
|
|
42
|
+
let B = e(), V = o(() => P.unstyled ?? B.unstyled);
|
|
43
|
+
function H(e) {
|
|
43
44
|
return i({
|
|
44
45
|
variant: e.variant,
|
|
45
|
-
position:
|
|
46
|
+
position: P.position,
|
|
46
47
|
withTitle: !!e.title
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
let
|
|
50
|
-
let e = i({ position:
|
|
51
|
-
return
|
|
50
|
+
let U = o(() => {
|
|
51
|
+
let e = i({ position: P.position });
|
|
52
|
+
return V.value ? [P.ui?.viewport, P.class] : e.viewport({ class: [P.ui?.viewport, P.class] });
|
|
52
53
|
});
|
|
53
|
-
function
|
|
54
|
-
let n =
|
|
55
|
-
return
|
|
54
|
+
function W(e, t) {
|
|
55
|
+
let n = P.ui?.[t];
|
|
56
|
+
return V.value ? n : H(e)[t]({ class: n });
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
e.action?.onClick(),
|
|
58
|
+
function G(e) {
|
|
59
|
+
e.action?.onClick(), I(e.id);
|
|
59
60
|
}
|
|
60
|
-
return (e, n) => (h(), s(v(
|
|
61
|
-
default: y(() => [(h(!0), l(a, null, g(v(
|
|
61
|
+
return (e, n) => (h(), s(v(A), null, {
|
|
62
|
+
default: y(() => [(h(!0), l(a, null, g(v(F), (e) => (h(), s(v(j), {
|
|
62
63
|
key: e.id,
|
|
63
|
-
duration:
|
|
64
|
-
class: m(
|
|
65
|
-
"onUpdate:open": (t) => !t && v(
|
|
64
|
+
duration: z(e),
|
|
65
|
+
class: m(W(e, "root")),
|
|
66
|
+
"onUpdate:open": (t) => !t && v(I)(e.id)
|
|
66
67
|
}, {
|
|
67
68
|
default: y(() => [
|
|
68
|
-
|
|
69
|
+
R(e) ? (h(), l("div", {
|
|
69
70
|
key: 0,
|
|
70
|
-
class: m(
|
|
71
|
-
}, [f(t, { icon:
|
|
72
|
-
u("div", { class: m(
|
|
71
|
+
class: m(W(e, "icon"))
|
|
72
|
+
}, [f(t, { icon: R(e) }, null, 8, ["icon"])], 2)) : c("", !0),
|
|
73
|
+
u("div", { class: m(W(e, "content")) }, [e.title ? (h(), s(v(M), {
|
|
73
74
|
key: 0,
|
|
74
|
-
class: m(
|
|
75
|
+
class: m(W(e, "title"))
|
|
75
76
|
}, {
|
|
76
77
|
default: y(() => [d(_(e.title), 1)]),
|
|
77
78
|
_: 2
|
|
78
|
-
}, 1032, ["class"])) : c("", !0), e.description ? (h(), s(v(
|
|
79
|
+
}, 1032, ["class"])) : c("", !0), e.description ? (h(), s(v(O), {
|
|
79
80
|
key: 1,
|
|
80
|
-
class: m(
|
|
81
|
+
class: m(W(e, "description"))
|
|
81
82
|
}, {
|
|
82
83
|
default: y(() => [d(_(e.description), 1)]),
|
|
83
84
|
_: 2
|
|
84
85
|
}, 1032, ["class"])) : c("", !0)], 2),
|
|
85
|
-
e.action ? (h(), s(v(
|
|
86
|
+
e.action ? (h(), s(v(E), {
|
|
86
87
|
key: 1,
|
|
87
88
|
"alt-text": e.action.label,
|
|
88
|
-
class: m(
|
|
89
|
-
onClick: (t) =>
|
|
89
|
+
class: m(W(e, "action")),
|
|
90
|
+
onClick: (t) => G(e)
|
|
90
91
|
}, {
|
|
91
92
|
default: y(() => [d(_(e.action.label), 1)]),
|
|
92
93
|
_: 2
|
|
@@ -95,9 +96,9 @@ var N = /*@__PURE__*/ p({
|
|
|
95
96
|
"class",
|
|
96
97
|
"onClick"
|
|
97
98
|
])) : c("", !0),
|
|
98
|
-
f(v(
|
|
99
|
-
"aria-label":
|
|
100
|
-
class: m(
|
|
99
|
+
f(v(D), {
|
|
100
|
+
"aria-label": P.closeLabel,
|
|
101
|
+
class: m(W(e, "close"))
|
|
101
102
|
}, {
|
|
102
103
|
default: y(() => [f(t, { icon: v(S) }, null, 8, ["icon"])]),
|
|
103
104
|
_: 1
|
|
@@ -108,8 +109,8 @@ var N = /*@__PURE__*/ p({
|
|
|
108
109
|
"duration",
|
|
109
110
|
"class",
|
|
110
111
|
"onUpdate:open"
|
|
111
|
-
]))), 128)), f(v(
|
|
112
|
-
default: y(() => [f(v(
|
|
112
|
+
]))), 128)), f(v(k), null, {
|
|
113
|
+
default: y(() => [f(v(N), { class: m(U.value) }, null, 8, ["class"])]),
|
|
113
114
|
_: 1
|
|
114
115
|
})]),
|
|
115
116
|
_: 1
|
|
@@ -117,4 +118,4 @@ var N = /*@__PURE__*/ p({
|
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
120
|
//#endregion
|
|
120
|
-
export {
|
|
121
|
+
export { P as default };
|