iryx-ui 0.10.2 → 0.12.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 +593 -496
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/components/Banner.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BarChart.vue.d.ts +13 -0
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +174 -132
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -30
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +62 -60
- package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +74 -74
- package/dist/components/Dialog.vue_vue_type_script_setup_true_lang.js +34 -34
- package/dist/components/Drawer.js +5 -0
- package/dist/components/Drawer.vue.d.ts +94 -0
- package/dist/components/Drawer.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +77 -77
- package/dist/components/Icon.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +68 -66
- package/dist/components/Pagination.vue.d.ts +1 -1
- package/dist/components/Pagination.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +34 -31
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +47 -45
- package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/components/Stepper.vue_vue_type_script_setup_true_lang.js +38 -38
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +9 -2
- package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +41 -41
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +54 -52
- package/dist/composables/date.js +12 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +55 -54
- package/dist/theme/drawer.d.ts +110 -0
- package/dist/theme/drawer.js +100 -0
- package/dist/theme/index.d.ts +1 -0
- package/package.json +3 -2
- package/theme.css +114 -0
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +0 -377
- 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 +0 -8
- 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 +0 -25
- 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 +0 -63
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +0 -122
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +0 -84
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +0 -91
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +0 -107
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +0 -159
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +0 -29
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +0 -37
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +0 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import e from "./Icon.js";
|
|
2
|
+
import { dropdownMenuTheme as t } from "../theme/dropdown-menu.js";
|
|
3
|
+
import { isSeparator as n, isSubmenu as r } from "../composables/dropdown-menu.js";
|
|
4
|
+
import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderList as p, resolveComponent as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
|
|
5
|
+
import { ArrowRight01Icon as v } from "@hugeicons/core-free-icons";
|
|
6
6
|
import { DropdownMenuItem as y, DropdownMenuLabel as b, DropdownMenuPortal as x, DropdownMenuSeparator as S, DropdownMenuSub as C, DropdownMenuSubContent as w, DropdownMenuSubTrigger as T } from "reka-ui";
|
|
7
7
|
//#region src/components/DropdownMenuItems.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var E = /*@__PURE__*/
|
|
8
|
+
var E = /*@__PURE__*/ u({
|
|
9
9
|
__name: "DropdownMenuItems",
|
|
10
10
|
props: {
|
|
11
11
|
entries: {},
|
|
@@ -15,42 +15,42 @@ var E = /*@__PURE__*/ d({
|
|
|
15
15
|
},
|
|
16
16
|
ui: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
let E =
|
|
20
|
-
function D(e,
|
|
18
|
+
setup(u) {
|
|
19
|
+
let E = u;
|
|
20
|
+
function D(e, n) {
|
|
21
21
|
let r = E.ui?.[e];
|
|
22
|
-
return E.unstyled ? r :
|
|
22
|
+
return E.unstyled ? r : t({ danger: n })[e]({ class: r });
|
|
23
23
|
}
|
|
24
|
-
let O = E.unstyled ? void 0 :
|
|
25
|
-
return (
|
|
26
|
-
let k =
|
|
27
|
-
return
|
|
24
|
+
let O = E.unstyled ? void 0 : t().subTriggerIcon();
|
|
25
|
+
return (t, u) => {
|
|
26
|
+
let k = m("DropdownMenuItems", !0);
|
|
27
|
+
return f(!0), s(i, null, p(E.entries, (t, u) => (f(), s(i, { key: u }, [g(n)(t) ? (f(), a(g(S), {
|
|
28
28
|
key: 0,
|
|
29
|
-
class:
|
|
30
|
-
}, null, 8, ["class"])) :
|
|
31
|
-
default:
|
|
32
|
-
disabled:
|
|
33
|
-
class:
|
|
29
|
+
class: d(D("separator"))
|
|
30
|
+
}, null, 8, ["class"])) : g(r)(t) ? (f(), a(g(C), { key: 1 }, {
|
|
31
|
+
default: _(() => [l(g(T), {
|
|
32
|
+
disabled: t.disabled,
|
|
33
|
+
class: d(D("subTrigger"))
|
|
34
34
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
|
|
35
|
+
default: _(() => [
|
|
36
|
+
t.icon ? (f(), a(e, {
|
|
37
37
|
key: 0,
|
|
38
|
-
icon:
|
|
39
|
-
}, null, 8, ["icon"])) :
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
icon:
|
|
43
|
-
class:
|
|
38
|
+
icon: t.icon
|
|
39
|
+
}, null, 8, ["icon"])) : o("", !0),
|
|
40
|
+
c(" " + h(t.label) + " ", 1),
|
|
41
|
+
l(e, {
|
|
42
|
+
icon: g(v),
|
|
43
|
+
class: d(g(O))
|
|
44
44
|
}, null, 8, ["icon", "class"])
|
|
45
45
|
]),
|
|
46
46
|
_: 2
|
|
47
|
-
}, 1032, ["disabled", "class"]),
|
|
48
|
-
default:
|
|
49
|
-
class:
|
|
47
|
+
}, 1032, ["disabled", "class"]), l(g(x), null, {
|
|
48
|
+
default: _(() => [l(g(w), {
|
|
49
|
+
class: d(D("subContent")),
|
|
50
50
|
"side-offset": 4
|
|
51
51
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
entries:
|
|
52
|
+
default: _(() => [l(k, {
|
|
53
|
+
entries: t.items,
|
|
54
54
|
unstyled: E.unstyled,
|
|
55
55
|
ui: E.ui
|
|
56
56
|
}, null, 8, [
|
|
@@ -63,26 +63,26 @@ var E = /*@__PURE__*/ d({
|
|
|
63
63
|
_: 2
|
|
64
64
|
}, 1024)]),
|
|
65
65
|
_: 2
|
|
66
|
-
}, 1024)) :
|
|
66
|
+
}, 1024)) : t.onSelect ? (f(), a(g(y), {
|
|
67
67
|
key: 3,
|
|
68
|
-
disabled:
|
|
69
|
-
class:
|
|
70
|
-
onSelect:
|
|
68
|
+
disabled: t.disabled,
|
|
69
|
+
class: d(D("item", t.danger)),
|
|
70
|
+
onSelect: t.onSelect
|
|
71
71
|
}, {
|
|
72
|
-
default:
|
|
72
|
+
default: _(() => [t.icon ? (f(), a(e, {
|
|
73
73
|
key: 0,
|
|
74
|
-
icon:
|
|
75
|
-
}, null, 8, ["icon"])) :
|
|
74
|
+
icon: t.icon
|
|
75
|
+
}, null, 8, ["icon"])) : o("", !0), c(" " + h(t.label), 1)]),
|
|
76
76
|
_: 2
|
|
77
77
|
}, 1032, [
|
|
78
78
|
"disabled",
|
|
79
79
|
"class",
|
|
80
80
|
"onSelect"
|
|
81
|
-
])) : (
|
|
81
|
+
])) : (f(), a(g(b), {
|
|
82
82
|
key: 2,
|
|
83
|
-
class:
|
|
83
|
+
class: d(D("label"))
|
|
84
84
|
}, {
|
|
85
|
-
default:
|
|
85
|
+
default: _(() => [c(h(t.label), 1)]),
|
|
86
86
|
_: 2
|
|
87
87
|
}, 1032, ["class"]))], 64))), 128);
|
|
88
88
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import n from "./Button.js";
|
|
4
|
+
import { useFormField as r } from "../composables/form.js";
|
|
5
|
+
import { fileUploadTheme as i } from "../theme/file-upload.js";
|
|
6
|
+
import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as ee, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, onBeforeUnmount as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, useModel as b, watch as x, withCtx as S, withModifiers as C } from "vue";
|
|
7
|
+
import { Delete02Icon as w, File01Icon as T, Upload05Icon as E } from "@hugeicons/core-free-icons";
|
|
8
8
|
//#region src/components/FileUpload.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var D = [
|
|
10
10
|
"id",
|
|
11
11
|
"multiple",
|
|
12
12
|
"accept",
|
|
13
13
|
"disabled",
|
|
14
14
|
"aria-invalid",
|
|
15
15
|
"aria-describedby"
|
|
16
|
-
],
|
|
16
|
+
], O = ["src"], k = [
|
|
17
17
|
"aria-label",
|
|
18
18
|
"disabled",
|
|
19
19
|
"onClick"
|
|
20
|
-
],
|
|
20
|
+
], A = /*@__PURE__*/ d({
|
|
21
21
|
__name: "FileUpload",
|
|
22
|
-
props: /*@__PURE__*/
|
|
22
|
+
props: /*@__PURE__*/ f({
|
|
23
23
|
multiple: { type: Boolean },
|
|
24
24
|
accept: {},
|
|
25
25
|
maxSize: {},
|
|
@@ -47,16 +47,16 @@ var O = [
|
|
|
47
47
|
modelValue: { default: () => [] },
|
|
48
48
|
modelModifiers: {}
|
|
49
49
|
}),
|
|
50
|
-
emits: /*@__PURE__*/
|
|
51
|
-
setup(
|
|
52
|
-
let
|
|
50
|
+
emits: /*@__PURE__*/ f(["reject"], ["update:modelValue"]),
|
|
51
|
+
setup(d, { emit: f }) {
|
|
52
|
+
let A = d, j = f, M = b(d, "modelValue"), N = r(), P = o(() => A.id ?? N?.id.value), F = o(() => A.invalid ?? N?.invalid.value ?? !1), I = e(), L = o(() => A.unstyled ?? I.unstyled), R = g([]);
|
|
53
53
|
function z(e) {
|
|
54
|
-
if (!
|
|
54
|
+
if (!A.accept) return !0;
|
|
55
55
|
let t = e.name.toLowerCase(), n = e.type.toLowerCase();
|
|
56
|
-
return
|
|
56
|
+
return A.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean).some((e) => e.startsWith(".") ? t.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
|
|
57
57
|
}
|
|
58
58
|
function B(e) {
|
|
59
|
-
let t = [], n = [], r =
|
|
59
|
+
let t = [], n = [], r = A.multiple ? M.value : [];
|
|
60
60
|
for (let i of e) {
|
|
61
61
|
if (!z(i)) {
|
|
62
62
|
n.push({
|
|
@@ -65,14 +65,14 @@ var O = [
|
|
|
65
65
|
});
|
|
66
66
|
continue;
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
68
|
+
if (A.maxSize != null && i.size > A.maxSize) {
|
|
69
69
|
n.push({
|
|
70
70
|
file: i,
|
|
71
71
|
reason: "size"
|
|
72
72
|
});
|
|
73
73
|
continue;
|
|
74
74
|
}
|
|
75
|
-
let e =
|
|
75
|
+
let e = A.multiple ? A.maxFiles : 1;
|
|
76
76
|
if (e != null && r.length + t.length >= e) {
|
|
77
77
|
n.push({
|
|
78
78
|
file: i,
|
|
@@ -82,9 +82,9 @@ var O = [
|
|
|
82
82
|
}
|
|
83
83
|
t.push(i);
|
|
84
84
|
}
|
|
85
|
-
R.value = n, n.length &&
|
|
85
|
+
R.value = n, n.length && j("reject", n), t.length && (M.value = [...r, ...t]);
|
|
86
86
|
}
|
|
87
|
-
let V =
|
|
87
|
+
let V = g();
|
|
88
88
|
function H(e) {
|
|
89
89
|
let t = e.target;
|
|
90
90
|
B([...t.files ?? []]), t.value = "";
|
|
@@ -92,24 +92,24 @@ var O = [
|
|
|
92
92
|
function U(e) {
|
|
93
93
|
M.value = M.value.filter((t, n) => n !== e);
|
|
94
94
|
}
|
|
95
|
-
let W =
|
|
95
|
+
let W = g(0), G = o(() => W.value > 0);
|
|
96
96
|
function K() {
|
|
97
|
-
|
|
97
|
+
A.disabled || W.value++;
|
|
98
98
|
}
|
|
99
99
|
function q() {
|
|
100
100
|
W.value > 0 && W.value--;
|
|
101
101
|
}
|
|
102
102
|
function J(e) {
|
|
103
|
-
W.value = 0, !
|
|
103
|
+
W.value = 0, !A.disabled && B([...e.dataTransfer?.files ?? []]);
|
|
104
104
|
}
|
|
105
|
-
let Y =
|
|
106
|
-
|
|
105
|
+
let Y = g(/* @__PURE__ */ new Map());
|
|
106
|
+
x(M, (e) => {
|
|
107
107
|
for (let [t, n] of Y.value) e.includes(t) || (URL.revokeObjectURL(n), Y.value.delete(t));
|
|
108
108
|
for (let t of e) t.type.startsWith("image/") && !Y.value.has(t) && Y.value.set(t, URL.createObjectURL(t));
|
|
109
109
|
}, {
|
|
110
110
|
immediate: !0,
|
|
111
111
|
deep: !0
|
|
112
|
-
}),
|
|
112
|
+
}), m(() => {
|
|
113
113
|
for (let e of Y.value.values()) URL.revokeObjectURL(e);
|
|
114
114
|
});
|
|
115
115
|
function X(e) {
|
|
@@ -123,87 +123,87 @@ var O = [
|
|
|
123
123
|
return `${r === 0 ? n : Math.round(n * 10) / 10} ${t[r]}`;
|
|
124
124
|
}
|
|
125
125
|
function Z(e) {
|
|
126
|
-
let t = e.reason === "size" ?
|
|
126
|
+
let t = e.reason === "size" ? A.tooLargeText : e.reason === "type" ? A.wrongTypeText : A.tooManyText;
|
|
127
127
|
return `${e.file.name} ${t}`;
|
|
128
128
|
}
|
|
129
|
-
let Q =
|
|
129
|
+
let Q = o(() => i({
|
|
130
130
|
dragging: G.value,
|
|
131
131
|
invalid: F.value,
|
|
132
|
-
disabled:
|
|
132
|
+
disabled: A.disabled
|
|
133
133
|
}));
|
|
134
134
|
function $(e, t) {
|
|
135
|
-
let n =
|
|
135
|
+
let n = A.ui?.[e];
|
|
136
136
|
return L.value ? [n, t] : Q.value[e]({ class: [n, t] });
|
|
137
137
|
}
|
|
138
|
-
let te =
|
|
139
|
-
return (
|
|
140
|
-
|
|
141
|
-
class:
|
|
142
|
-
onDragenter:
|
|
143
|
-
onDragover:
|
|
144
|
-
onDragleave:
|
|
145
|
-
onDrop:
|
|
138
|
+
let te = o(() => L.value ? A.ui?.browse : Q.value.browse({ class: A.ui?.browse }));
|
|
139
|
+
return (e, r) => (h(), c("div", { class: p($("root", A.class)) }, [
|
|
140
|
+
l("label", {
|
|
141
|
+
class: p($("dropzone")),
|
|
142
|
+
onDragenter: C(K, ["prevent"]),
|
|
143
|
+
onDragover: r[0] ||= C(() => {}, ["prevent"]),
|
|
144
|
+
onDragleave: C(q, ["prevent"]),
|
|
145
|
+
onDrop: C(J, ["prevent"])
|
|
146
146
|
}, [
|
|
147
|
-
|
|
147
|
+
l("input", {
|
|
148
148
|
id: P.value,
|
|
149
149
|
ref_key: "inputEl",
|
|
150
150
|
ref: V,
|
|
151
151
|
type: "file",
|
|
152
|
-
multiple:
|
|
153
|
-
accept:
|
|
154
|
-
disabled:
|
|
152
|
+
multiple: A.multiple,
|
|
153
|
+
accept: A.accept,
|
|
154
|
+
disabled: A.disabled,
|
|
155
155
|
"aria-invalid": F.value || void 0,
|
|
156
|
-
"aria-describedby":
|
|
157
|
-
class:
|
|
156
|
+
"aria-describedby": y(N)?.describedBy.value,
|
|
157
|
+
class: p($("input")),
|
|
158
158
|
onChange: H
|
|
159
|
-
}, null, 42,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
}, null, 42, D),
|
|
160
|
+
l("span", { class: p($("icon")) }, [u(t, { icon: y(E) }, null, 8, ["icon"])], 2),
|
|
161
|
+
l("span", { class: p($("label")) }, v(A.label), 3),
|
|
162
|
+
A.hint ? (h(), c("span", {
|
|
163
163
|
key: 0,
|
|
164
|
-
class:
|
|
165
|
-
},
|
|
166
|
-
|
|
164
|
+
class: p($("hint"))
|
|
165
|
+
}, v(A.hint), 3)) : s("", !0),
|
|
166
|
+
u(n, {
|
|
167
167
|
as: "span",
|
|
168
168
|
variant: "outline",
|
|
169
169
|
size: "sm",
|
|
170
|
-
class:
|
|
170
|
+
class: p(te.value)
|
|
171
171
|
}, {
|
|
172
|
-
default:
|
|
172
|
+
default: S(() => [ee(v(A.browseLabel), 1)]),
|
|
173
173
|
_: 1
|
|
174
174
|
}, 8, ["class"])
|
|
175
175
|
], 34),
|
|
176
|
-
(
|
|
176
|
+
(h(!0), c(a, null, _(R.value, (e) => (h(), c("p", {
|
|
177
177
|
key: e.file.name,
|
|
178
|
-
class:
|
|
179
|
-
},
|
|
180
|
-
M.value.length ? (
|
|
178
|
+
class: p($("error"))
|
|
179
|
+
}, v(Z(e)), 3))), 128)),
|
|
180
|
+
M.value.length ? (h(), c("ul", {
|
|
181
181
|
key: 0,
|
|
182
|
-
class:
|
|
183
|
-
}, [(
|
|
184
|
-
key: `${
|
|
185
|
-
class:
|
|
182
|
+
class: p($("list"))
|
|
183
|
+
}, [(h(!0), c(a, null, _(M.value, (e, n) => (h(), c("li", {
|
|
184
|
+
key: `${e.name}-${n}`,
|
|
185
|
+
class: p($("item"))
|
|
186
186
|
}, [
|
|
187
|
-
Y.value.get(
|
|
187
|
+
Y.value.get(e) ? (h(), c("img", {
|
|
188
188
|
key: 0,
|
|
189
|
-
src: Y.value.get(
|
|
189
|
+
src: Y.value.get(e),
|
|
190
190
|
alt: "",
|
|
191
|
-
class:
|
|
192
|
-
}, null, 10,
|
|
191
|
+
class: p($("thumbnail"))
|
|
192
|
+
}, null, 10, O)) : (h(), c("span", {
|
|
193
193
|
key: 1,
|
|
194
|
-
class:
|
|
195
|
-
}, [
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
class: p($("placeholder"))
|
|
195
|
+
}, [u(t, { icon: y(T) }, null, 8, ["icon"])], 2)),
|
|
196
|
+
l("span", { class: p($("details")) }, [l("span", { class: p($("name")) }, v(e.name), 3), l("span", { class: p($("meta")) }, v(X(e.size)), 3)], 2),
|
|
197
|
+
l("button", {
|
|
198
198
|
type: "button",
|
|
199
|
-
"aria-label": `${
|
|
200
|
-
disabled:
|
|
201
|
-
class:
|
|
202
|
-
onClick: (e) => U(
|
|
203
|
-
}, [
|
|
204
|
-
], 2))), 128))], 2)) :
|
|
199
|
+
"aria-label": `${A.removeLabel} ${e.name}`,
|
|
200
|
+
disabled: A.disabled,
|
|
201
|
+
class: p($("remove")),
|
|
202
|
+
onClick: (e) => U(n)
|
|
203
|
+
}, [u(t, { icon: y(w) }, null, 8, ["icon"])], 10, k)
|
|
204
|
+
], 2))), 128))], 2)) : s("", !0)
|
|
205
205
|
], 2));
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
//#endregion
|
|
209
|
-
export {
|
|
209
|
+
export { A as default };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isIconArray as e } from "../composables/icon.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, resolveDynamicComponent as s, unref as c } from "vue";
|
|
3
|
+
import { HugeiconsIcon as l } from "@hugeicons/vue";
|
|
4
4
|
//#region src/components/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var u = /*@__PURE__*/
|
|
5
|
+
var u = /*@__PURE__*/ i({
|
|
6
6
|
__name: "Icon",
|
|
7
7
|
props: {
|
|
8
8
|
icon: {},
|
|
9
9
|
class: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
let u =
|
|
13
|
-
return (
|
|
11
|
+
setup(i) {
|
|
12
|
+
let u = i, d = t(() => u.icon && e(u.icon) ? u.icon : void 0);
|
|
13
|
+
return (e, t) => d.value ? (o(), n(c(l), {
|
|
14
14
|
key: 0,
|
|
15
15
|
icon: d.value,
|
|
16
|
-
class:
|
|
16
|
+
class: a(u.class),
|
|
17
17
|
"aria-hidden": "true"
|
|
18
|
-
}, null, 8, ["icon", "class"])) : u.icon ? (
|
|
18
|
+
}, null, 8, ["icon", "class"])) : u.icon ? (o(), n(s(u.icon), {
|
|
19
19
|
key: 1,
|
|
20
|
-
class:
|
|
20
|
+
class: a(u.class),
|
|
21
21
|
"aria-hidden": "true"
|
|
22
|
-
}, null, 8, ["class"])) :
|
|
22
|
+
}, null, 8, ["class"])) : r("", !0);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { useFormField as n } from "../composables/form.js";
|
|
4
|
+
import { inputTheme as r } from "../theme/input.js";
|
|
5
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, normalizeClass as p, onBeforeUnmount as m, openBlock as h, ref as g, renderSlot as _, unref as v, useModel as y, useSlots as b, watch as x, withKeys as S } from "vue";
|
|
6
|
+
import { Cancel01Icon as C, Loading03Icon as w } from "@hugeicons/core-free-icons";
|
|
7
7
|
//#region src/components/Input.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var T = [
|
|
9
9
|
"id",
|
|
@@ -14,10 +14,10 @@ var T = [
|
|
|
14
14
|
"required",
|
|
15
15
|
"aria-invalid",
|
|
16
16
|
"aria-describedby"
|
|
17
|
-
], E = ["aria-label"], D = /*@__PURE__*/
|
|
17
|
+
], E = ["aria-label"], D = /*@__PURE__*/ u({
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
__name: "Input",
|
|
20
|
-
props: /*@__PURE__*/
|
|
20
|
+
props: /*@__PURE__*/ d({
|
|
21
21
|
type: { default: "text" },
|
|
22
22
|
size: {},
|
|
23
23
|
placeholder: {},
|
|
@@ -43,12 +43,12 @@ var T = [
|
|
|
43
43
|
modelModifiers: {}
|
|
44
44
|
}),
|
|
45
45
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(
|
|
47
|
-
let D =
|
|
46
|
+
setup(u, { expose: d }) {
|
|
47
|
+
let D = u, O = y(u, "modelValue"), k = b(), A = n(), j = i(() => D.id ?? A?.id.value), M = i(() => D.invalid ?? A?.invalid.value ?? !1), N = e(), P = i(() => D.unstyled ?? N.unstyled), F = g(O.value), I;
|
|
48
48
|
function L() {
|
|
49
49
|
I !== void 0 && (clearTimeout(I), I = void 0);
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
x(O, (e) => {
|
|
52
52
|
L(), F.value = e;
|
|
53
53
|
});
|
|
54
54
|
function R(e) {
|
|
@@ -64,13 +64,13 @@ var T = [
|
|
|
64
64
|
function z() {
|
|
65
65
|
I !== void 0 && (L(), O.value = F.value);
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
let B =
|
|
67
|
+
m(L);
|
|
68
|
+
let B = g();
|
|
69
69
|
function V() {
|
|
70
70
|
L(), F.value = "", O.value = "", B.value?.focus();
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
let H =
|
|
72
|
+
d({ input: B });
|
|
73
|
+
let H = i(() => F.value !== "" && F.value != null), U = i(() => D.clearable && H.value && !D.disabled), W = i(() => D.loading || U.value || !!k.trailing), G = i(() => r({
|
|
74
74
|
size: D.size,
|
|
75
75
|
invalid: M.value
|
|
76
76
|
}));
|
|
@@ -78,12 +78,12 @@ var T = [
|
|
|
78
78
|
let n = D.ui?.[e];
|
|
79
79
|
return P.value ? [n, t] : G.value[e]({ class: [n, t] });
|
|
80
80
|
}
|
|
81
|
-
return (
|
|
82
|
-
|
|
81
|
+
return (e, n) => (h(), s("div", { class: p(K("root", D.class)) }, [
|
|
82
|
+
v(k).leading ? (h(), s("span", {
|
|
83
83
|
key: 0,
|
|
84
|
-
class:
|
|
85
|
-
}, [
|
|
86
|
-
|
|
84
|
+
class: p(K("leading"))
|
|
85
|
+
}, [_(e.$slots, "leading")], 2)) : o("", !0),
|
|
86
|
+
c("input", f({
|
|
87
87
|
id: j.value,
|
|
88
88
|
ref_key: "inputEl",
|
|
89
89
|
ref: B,
|
|
@@ -93,32 +93,32 @@ var T = [
|
|
|
93
93
|
disabled: D.disabled,
|
|
94
94
|
required: D.required,
|
|
95
95
|
"aria-invalid": M.value || void 0,
|
|
96
|
-
"aria-describedby":
|
|
96
|
+
"aria-describedby": v(A)?.describedBy.value,
|
|
97
97
|
class: K("input")
|
|
98
|
-
},
|
|
98
|
+
}, e.$attrs, {
|
|
99
99
|
onInput: R,
|
|
100
100
|
onBlur: z,
|
|
101
|
-
onKeydown:
|
|
101
|
+
onKeydown: S(z, ["enter"])
|
|
102
102
|
}), null, 16, T),
|
|
103
|
-
W.value ? (
|
|
103
|
+
W.value ? (h(), s("span", {
|
|
104
104
|
key: 1,
|
|
105
|
-
class:
|
|
105
|
+
class: p(K("trailing"))
|
|
106
106
|
}, [
|
|
107
|
-
|
|
108
|
-
U.value ? (
|
|
107
|
+
_(e.$slots, "trailing"),
|
|
108
|
+
U.value ? (h(), s("button", {
|
|
109
109
|
key: 0,
|
|
110
110
|
type: "button",
|
|
111
111
|
tabindex: "-1",
|
|
112
112
|
"aria-label": D.clearLabel,
|
|
113
|
-
class:
|
|
113
|
+
class: p(K("clear")),
|
|
114
114
|
onClick: V
|
|
115
|
-
}, [
|
|
116
|
-
D.loading ? (
|
|
115
|
+
}, [l(t, { icon: v(C) }, null, 8, ["icon"])], 10, E)) : o("", !0),
|
|
116
|
+
D.loading ? (h(), a(t, {
|
|
117
117
|
key: 1,
|
|
118
|
-
icon:
|
|
118
|
+
icon: v(w),
|
|
119
119
|
class: "animate-spin"
|
|
120
|
-
}, null, 8, ["icon"])) :
|
|
121
|
-
], 2)) :
|
|
120
|
+
}, null, 8, ["icon"])) : o("", !0)
|
|
121
|
+
], 2)) : o("", !0)
|
|
122
122
|
], 2));
|
|
123
123
|
}
|
|
124
124
|
});
|