@indielayer/ui 1.14.2 → 1.14.4
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/docs/pages/component/modal/usage.vue +1 -1
- package/lib/components/badge/Badge.vue.js +8 -8
- package/lib/components/checkbox/Checkbox.vue2.js +66 -65
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +8 -8
- package/lib/components/modal/Modal.vue.js +38 -34
- package/lib/components/notifications/Notifications.vue.d.ts +13 -0
- package/lib/components/notifications/Notifications.vue.js +71 -64
- package/lib/components/select/Select.vue.js +22 -22
- package/lib/components/tab/theme/Tab.base.theme.js +1 -1
- package/lib/composables/useFocusTrap.js +19 -15
- package/lib/index.umd.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/badge/Badge.vue +1 -1
- package/src/components/checkbox/Checkbox.vue +9 -3
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +4 -1
- package/src/components/modal/Modal.vue +8 -5
- package/src/components/notifications/Notifications.vue +10 -1
- package/src/components/select/Select.vue +1 -1
- package/src/components/tab/theme/Tab.base.theme.ts +1 -1
- package/src/composables/useFocusTrap.ts +7 -1
- package/src/version.ts +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { injectNotificationKey as
|
|
3
|
-
import { useColors as
|
|
4
|
-
import { useCSS as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { closeIcon as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as q, ref as g, provide as J, watch as D, computed as Q, openBlock as a, createElementBlock as p, Fragment as O, renderSlot as U, createBlock as x, Teleport as W, createElementVNode as k, normalizeStyle as _, unref as i, normalizeClass as C, createVNode as K, TransitionGroup as Y, withCtx as Z, renderList as ee, createCommentVNode as y, toDisplayString as M } from "vue";
|
|
2
|
+
import { injectNotificationKey as te } from "../../composables/keys.js";
|
|
3
|
+
import { useColors as E } from "../../composables/useColors.js";
|
|
4
|
+
import { useCSS as oe } from "../../composables/useCSS.js";
|
|
5
|
+
import { useTheme as re } from "../../composables/useTheme.js";
|
|
6
|
+
import { closeIcon as se } from "../../common/icons.js";
|
|
7
|
+
import A from "../icon/Icon.vue.js";
|
|
8
|
+
import ae from "../spacer/Spacer.js";
|
|
9
|
+
const le = ["onMouseenter", "onMouseleave"], ne = { class: "flex items-center flex-wrap" }, ie = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "font-medium mr-2"
|
|
12
|
-
},
|
|
13
|
-
...
|
|
12
|
+
}, ce = ["onClick"], ue = {
|
|
13
|
+
...E.props("primary"),
|
|
14
14
|
align: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: "right",
|
|
17
|
-
validator: (c) =>
|
|
17
|
+
validator: (c) => S.align.includes(c)
|
|
18
18
|
},
|
|
19
19
|
position: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: "bottom",
|
|
22
|
-
validator: (c) =>
|
|
22
|
+
validator: (c) => S.position.includes(c)
|
|
23
23
|
},
|
|
24
24
|
timeout: {
|
|
25
25
|
type: Number,
|
|
@@ -35,32 +35,36 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
35
35
|
},
|
|
36
36
|
injectKey: {
|
|
37
37
|
type: [Symbol, String],
|
|
38
|
-
default:
|
|
38
|
+
default: te
|
|
39
|
+
},
|
|
40
|
+
offset: {
|
|
41
|
+
type: [String, Number],
|
|
42
|
+
default: 0
|
|
39
43
|
}
|
|
40
|
-
},
|
|
44
|
+
}, S = {
|
|
41
45
|
align: ["left", "right"],
|
|
42
46
|
position: ["bottom", "top"]
|
|
43
|
-
},
|
|
47
|
+
}, me = {
|
|
44
48
|
name: "XNotifications",
|
|
45
|
-
validators:
|
|
46
|
-
},
|
|
47
|
-
...
|
|
48
|
-
props:
|
|
49
|
-
setup(c, { expose:
|
|
50
|
-
const r = c, u = g(r.align), s = g(r.position), d = g([]), z = g(null),
|
|
51
|
-
|
|
52
|
-
log:
|
|
53
|
-
info:
|
|
49
|
+
validators: S
|
|
50
|
+
}, xe = /* @__PURE__ */ q({
|
|
51
|
+
...me,
|
|
52
|
+
props: ue,
|
|
53
|
+
setup(c, { expose: L }) {
|
|
54
|
+
const r = c, u = g(r.align), s = g(r.position), d = g([]), z = g(null), R = oe("notification"), w = E();
|
|
55
|
+
J(r.injectKey, {
|
|
56
|
+
log: N,
|
|
57
|
+
info: $,
|
|
54
58
|
warn: v,
|
|
55
59
|
error: B,
|
|
56
60
|
warning: v,
|
|
57
61
|
success: T
|
|
58
|
-
}),
|
|
62
|
+
}), D(() => r.align, (e) => {
|
|
59
63
|
u.value = e;
|
|
60
|
-
}),
|
|
64
|
+
}), D(() => r.position, (e) => {
|
|
61
65
|
s.value = e;
|
|
62
66
|
});
|
|
63
|
-
function
|
|
67
|
+
function N(e) {
|
|
64
68
|
const o = typeof e == "string", t = {
|
|
65
69
|
message: o ? e : void 0
|
|
66
70
|
};
|
|
@@ -69,7 +73,7 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
69
73
|
...e
|
|
70
74
|
});
|
|
71
75
|
}
|
|
72
|
-
function
|
|
76
|
+
function $(e) {
|
|
73
77
|
const o = typeof e == "string", t = {
|
|
74
78
|
icon: '<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />',
|
|
75
79
|
iconColor: "sky",
|
|
@@ -114,7 +118,7 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
114
118
|
});
|
|
115
119
|
}
|
|
116
120
|
function m(e) {
|
|
117
|
-
var
|
|
121
|
+
var H;
|
|
118
122
|
const t = {
|
|
119
123
|
...{
|
|
120
124
|
id: Date.now(),
|
|
@@ -127,7 +131,7 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
127
131
|
...e
|
|
128
132
|
};
|
|
129
133
|
u.value = t.align, s.value = t.position;
|
|
130
|
-
const l =
|
|
134
|
+
const l = w.getPalette(t.iconColor), f = w.getPalette(((H = t.action) == null ? void 0 : H.color) || "primary"), j = R.variables({
|
|
131
135
|
icon: l[400],
|
|
132
136
|
action: f[400],
|
|
133
137
|
hover: {
|
|
@@ -141,7 +145,7 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
});
|
|
144
|
-
if (t.style = Object.keys(
|
|
148
|
+
if (t.style = Object.keys(j).map((n) => `${n}: ${j[n]}`).join(";"), t.timeout) {
|
|
145
149
|
const n = P(t, t.timeout);
|
|
146
150
|
t.timer = n, t.timerStart = Date.now();
|
|
147
151
|
}
|
|
@@ -158,26 +162,26 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
158
162
|
h(e);
|
|
159
163
|
}, o);
|
|
160
164
|
}
|
|
161
|
-
function
|
|
165
|
+
function X(e) {
|
|
162
166
|
r.pauseOnHover && e.timer && (clearTimeout(e.timer), e.timer = void 0);
|
|
163
167
|
}
|
|
164
|
-
function
|
|
168
|
+
function F(e) {
|
|
165
169
|
if (r.pauseOnHover && e.timeout && e.timerStart) {
|
|
166
170
|
const o = Math.max(e.timeout - (Date.now() - e.timerStart), 1e3);
|
|
167
171
|
e.timer = P(e, o);
|
|
168
172
|
}
|
|
169
173
|
}
|
|
170
|
-
const { styles:
|
|
171
|
-
return
|
|
172
|
-
|
|
173
|
-
(a(), x(
|
|
174
|
-
|
|
174
|
+
const V = Q(() => `${r.offset}px`), { styles: G, classes: b, className: I } = re("Notifications", {}, r);
|
|
175
|
+
return L({ log: N, info: $, success: T, warn: v, warning: v, error: B }), (e, o) => (a(), p(O, null, [
|
|
176
|
+
U(e.$slots, "default"),
|
|
177
|
+
(a(), x(W, { to: "body" }, [
|
|
178
|
+
k("div", {
|
|
175
179
|
ref_key: "listRef",
|
|
176
180
|
ref: z,
|
|
177
|
-
style:
|
|
178
|
-
class:
|
|
179
|
-
i(
|
|
180
|
-
i(
|
|
181
|
+
style: _(i(G)),
|
|
182
|
+
class: C([
|
|
183
|
+
i(I),
|
|
184
|
+
i(b).wrapper,
|
|
181
185
|
{
|
|
182
186
|
// align
|
|
183
187
|
"left-0": u.value === "left",
|
|
@@ -188,10 +192,13 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
188
192
|
}
|
|
189
193
|
])
|
|
190
194
|
}, [
|
|
191
|
-
|
|
195
|
+
K(Y, {
|
|
192
196
|
tag: "ul",
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
style: _([
|
|
198
|
+
s.value === "bottom" ? `padding-bottom: ${V.value};` : `padding-top: ${V.value};`
|
|
199
|
+
]),
|
|
200
|
+
class: C([
|
|
201
|
+
i(b).list,
|
|
195
202
|
{ "flex-col-reverse": s.value }
|
|
196
203
|
]),
|
|
197
204
|
"enter-active-class": "transition ease-out duration-200",
|
|
@@ -202,32 +209,32 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
202
209
|
"leave-to-class": "transform translate-y-2 opacity-0",
|
|
203
210
|
"move-class": "ease-in-out duration-200"
|
|
204
211
|
}, {
|
|
205
|
-
default:
|
|
206
|
-
(a(!0), p(
|
|
212
|
+
default: Z(() => [
|
|
213
|
+
(a(!0), p(O, null, ee(d.value, (t) => (a(), p("li", {
|
|
207
214
|
key: t.id,
|
|
208
|
-
class:
|
|
209
|
-
i(
|
|
215
|
+
class: C([
|
|
216
|
+
i(b).item,
|
|
210
217
|
{
|
|
211
218
|
"mb-2": s.value === "bottom",
|
|
212
219
|
"mt-2": s.value === "top"
|
|
213
220
|
}
|
|
214
221
|
]),
|
|
215
|
-
style:
|
|
216
|
-
onMouseenter: (l) =>
|
|
217
|
-
onMouseleave: (l) =>
|
|
222
|
+
style: _(t.style),
|
|
223
|
+
onMouseenter: (l) => X(t),
|
|
224
|
+
onMouseleave: (l) => F(t)
|
|
218
225
|
}, [
|
|
219
|
-
t.icon ? (a(), x(
|
|
226
|
+
t.icon ? (a(), x(A, {
|
|
220
227
|
key: 0,
|
|
221
228
|
filled: "",
|
|
222
229
|
icon: t.icon,
|
|
223
230
|
class: "mr-4 text-[color:var(--x-notification-icon)] dark:text-[color:var(--x-notification-dark-icon)]",
|
|
224
231
|
viewBox: "0 0 20 20"
|
|
225
232
|
}, null, 8, ["icon"])) : y("", !0),
|
|
226
|
-
|
|
227
|
-
t.title ? (a(), p("span",
|
|
228
|
-
|
|
233
|
+
k("div", ne, [
|
|
234
|
+
t.title ? (a(), p("span", ie, M(t.title), 1)) : y("", !0),
|
|
235
|
+
k("span", null, M(t.message), 1)
|
|
229
236
|
]),
|
|
230
|
-
|
|
237
|
+
K(i(ae)),
|
|
231
238
|
t.action ? (a(), p("button", {
|
|
232
239
|
key: 1,
|
|
233
240
|
type: "button",
|
|
@@ -236,24 +243,24 @@ const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center fl
|
|
|
236
243
|
var l;
|
|
237
244
|
(l = t.action) == null || l.onClick(), h(t);
|
|
238
245
|
}
|
|
239
|
-
},
|
|
240
|
-
t.removable ? (a(), x(
|
|
246
|
+
}, M(t.action.label), 9, ce)) : y("", !0),
|
|
247
|
+
t.removable ? (a(), x(A, {
|
|
241
248
|
key: 2,
|
|
242
|
-
icon: i(
|
|
249
|
+
icon: i(se),
|
|
243
250
|
class: "text-secondary-400 hover:text-secondary-500 ml-3 cursor-pointer",
|
|
244
251
|
onClick: () => {
|
|
245
252
|
h(t);
|
|
246
253
|
}
|
|
247
254
|
}, null, 8, ["icon", "onClick"])) : y("", !0)
|
|
248
|
-
], 46,
|
|
255
|
+
], 46, le))), 128))
|
|
249
256
|
]),
|
|
250
257
|
_: 1
|
|
251
|
-
}, 8, ["class"])
|
|
258
|
+
}, 8, ["style", "class"])
|
|
252
259
|
], 6)
|
|
253
260
|
]))
|
|
254
261
|
], 64));
|
|
255
262
|
}
|
|
256
263
|
});
|
|
257
264
|
export {
|
|
258
|
-
|
|
265
|
+
xe as default
|
|
259
266
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Me, mergeModels as ve, computed as A, ref as b, useModel as Pe, watch as M, nextTick as Z, unref as s, onUnmounted as Fe, openBlock as r, createBlock as L, mergeProps as U, toHandlers as ce, withCtx as m, createElementVNode as P, createElementBlock as u, normalizeClass as k, Fragment as w, createTextVNode as
|
|
1
|
+
import { defineComponent as Me, mergeModels as ve, computed as A, ref as b, useModel as Pe, watch as M, nextTick as Z, unref as s, onUnmounted as Fe, openBlock as r, createBlock as L, mergeProps as U, toHandlers as ce, withCtx as m, createElementVNode as P, createElementBlock as u, normalizeClass as k, Fragment as w, createTextVNode as B, toDisplayString as g, createVNode as S, renderSlot as O, createCommentVNode as R, renderList as j, createSlots as Ee, normalizeStyle as He, withModifiers as We, withDirectives as qe, vModelSelect as Ue } from "vue";
|
|
2
2
|
import { useEventListener as je, useResizeObserver as Xe } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
|
|
3
3
|
import { useColors as Ke } from "../../composables/useColors.js";
|
|
4
4
|
import { useCommon as he } from "../../composables/useCommon.js";
|
|
@@ -70,12 +70,12 @@ const ol = { class: "relative" }, rl = {
|
|
|
70
70
|
}),
|
|
71
71
|
emits: /* @__PURE__ */ ve([..._.emits(), "close"], ["update:filter"]),
|
|
72
72
|
setup(ee, { expose: ge, emit: Ce }) {
|
|
73
|
-
const i = ee,
|
|
73
|
+
const i = ee, z = Ce, c = A(() => i.multiple || i.multipleCheckbox), X = b(null), K = b(null), F = b(null), C = b(null), G = b(null), d = b(), I = Pe(ee, "filter"), E = b(null), $ = A(() => i.disabled || i.loading || i.readonly), we = A(() => !i.loading && !i.readonly && !i.disabled && i.clearable && !J(o.value)), o = A({
|
|
74
74
|
get() {
|
|
75
75
|
return c.value ? i.modelValue ? Array.isArray(i.modelValue) ? i.modelValue : [i.modelValue] : [] : i.modelValue;
|
|
76
76
|
},
|
|
77
77
|
set(e) {
|
|
78
|
-
|
|
78
|
+
z("update:modelValue", e);
|
|
79
79
|
}
|
|
80
80
|
}), h = A(() => !i.options || i.options.length === 0 ? [] : i.options.filter((e) => I.value === "" || e.label.toLowerCase().includes(I.value.toLowerCase())).map((e) => {
|
|
81
81
|
let t = !1;
|
|
@@ -111,7 +111,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
111
111
|
var t;
|
|
112
112
|
ae(d.value || 0), i.filterable && ((t = E.value) == null || t.focus());
|
|
113
113
|
});
|
|
114
|
-
}, 50)) : (i.filterable && (I.value = ""),
|
|
114
|
+
}, 50)) : (i.filterable && (I.value = ""), z("close"));
|
|
115
115
|
});
|
|
116
116
|
function Re() {
|
|
117
117
|
if (c.value) {
|
|
@@ -170,7 +170,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
170
170
|
a !== -1 ? o.value.splice(a, 1) : o.value.push(e);
|
|
171
171
|
} else
|
|
172
172
|
o.value = [e];
|
|
173
|
-
|
|
173
|
+
z("update:modelValue", o.value), i.filterable && setTimeout(() => {
|
|
174
174
|
var a;
|
|
175
175
|
(a = E.value) == null || a.focus();
|
|
176
176
|
});
|
|
@@ -189,9 +189,9 @@ const ol = { class: "relative" }, rl = {
|
|
|
189
189
|
if (e.stopPropagation(), $.value || !Array.isArray(o.value))
|
|
190
190
|
return;
|
|
191
191
|
const l = o.value.indexOf(t);
|
|
192
|
-
l !== -1 && (o.value.splice(l, 1),
|
|
192
|
+
l !== -1 && (o.value.splice(l, 1), z("update:modelValue", o.value));
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function T(e) {
|
|
195
195
|
var l;
|
|
196
196
|
const t = (l = i.options) == null ? void 0 : l.find((a) => a.value === e);
|
|
197
197
|
return t ? t.label : "";
|
|
@@ -205,7 +205,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
205
205
|
setError: Ie,
|
|
206
206
|
isFocused: Ve,
|
|
207
207
|
isInsideForm: Te
|
|
208
|
-
} = _(i, { focus: re, emit:
|
|
208
|
+
} = _(i, { focus: re, emit: z, withListeners: !0 }), Be = A(() => {
|
|
209
209
|
const { focus: e, blur: t } = s(ne);
|
|
210
210
|
return {
|
|
211
211
|
focus: e,
|
|
@@ -305,17 +305,17 @@ const ol = { class: "relative" }, rl = {
|
|
|
305
305
|
J(o.value) ? (r(), u(w, { key: 1 }, [
|
|
306
306
|
e.placeholder ? (r(), u("div", rl, g(e.placeholder), 1)) : (r(), u("div", sl, " "))
|
|
307
307
|
], 64)) : (r(), u(w, { key: 0 }, [
|
|
308
|
-
|
|
308
|
+
B(g(T(o.value)), 1)
|
|
309
309
|
], 64))
|
|
310
310
|
], 2)) : (r(), u(w, { key: 1 }, [
|
|
311
|
-
|
|
311
|
+
S(ye, {
|
|
312
312
|
ref_key: "popoverRef",
|
|
313
313
|
ref: C,
|
|
314
314
|
disabled: $.value,
|
|
315
315
|
placement: e.placement
|
|
316
316
|
}, {
|
|
317
317
|
content: m(() => [
|
|
318
|
-
|
|
318
|
+
S(be, {
|
|
319
319
|
class: k(s(y).content)
|
|
320
320
|
}, {
|
|
321
321
|
default: m(() => [
|
|
@@ -324,7 +324,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
324
324
|
key: 0,
|
|
325
325
|
class: k(s(y).search)
|
|
326
326
|
}, [
|
|
327
|
-
|
|
327
|
+
S(al, {
|
|
328
328
|
ref_key: "filterRef",
|
|
329
329
|
ref: E,
|
|
330
330
|
modelValue: I.value,
|
|
@@ -370,7 +370,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
370
370
|
O(e.$slots, "prefix", {
|
|
371
371
|
item: l.data
|
|
372
372
|
}, () => [
|
|
373
|
-
|
|
373
|
+
B(g(l.data.prefix), 1)
|
|
374
374
|
])
|
|
375
375
|
]),
|
|
376
376
|
key: "0"
|
|
@@ -381,7 +381,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
381
381
|
O(e.$slots, "suffix", {
|
|
382
382
|
item: l.data
|
|
383
383
|
}, () => [
|
|
384
|
-
|
|
384
|
+
B(g(l.data.suffix), 1)
|
|
385
385
|
])
|
|
386
386
|
]),
|
|
387
387
|
key: "1"
|
|
@@ -400,7 +400,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
400
400
|
popover: C.value,
|
|
401
401
|
selected: o.value,
|
|
402
402
|
disabled: $.value,
|
|
403
|
-
label:
|
|
403
|
+
label: T(o.value)
|
|
404
404
|
}, () => [
|
|
405
405
|
P("div", {
|
|
406
406
|
class: k([s(y).box])
|
|
@@ -436,7 +436,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
436
436
|
];
|
|
437
437
|
}),
|
|
438
438
|
default: m(() => [
|
|
439
|
-
|
|
439
|
+
B(" " + g(T(l)), 1)
|
|
440
440
|
]),
|
|
441
441
|
_: 2
|
|
442
442
|
}, 1032, ["outlined", "disabled", "style", "onRemove"]);
|
|
@@ -451,8 +451,8 @@ const ol = { class: "relative" }, rl = {
|
|
|
451
451
|
return (a = de.value) == null ? void 0 : a.toggle();
|
|
452
452
|
}, ["stop"]))
|
|
453
453
|
}, "+" + g(q.value), 3)) : R("", !0)
|
|
454
|
-
], 2)) : !c.value && !J(o.value) ? (r(), u(w, { key: 1 }, [
|
|
455
|
-
|
|
454
|
+
], 2)) : !c.value && !J(o.value) && T(o.value) !== "" ? (r(), u(w, { key: 1 }, [
|
|
455
|
+
B(g(T(o.value)), 1)
|
|
456
456
|
], 64)) : (r(), u(w, { key: 2 }, [
|
|
457
457
|
e.placeholder ? (r(), u("div", nl, g(e.placeholder), 1)) : (r(), u("div", ul, " "))
|
|
458
458
|
], 64))
|
|
@@ -471,7 +471,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
471
471
|
placement: "auto-start"
|
|
472
472
|
}, {
|
|
473
473
|
content: m(() => [
|
|
474
|
-
|
|
474
|
+
S(be, { class: "p-2 flex gap-2 flex-wrap" }, {
|
|
475
475
|
default: m(() => {
|
|
476
476
|
var l;
|
|
477
477
|
return [
|
|
@@ -496,7 +496,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
496
496
|
];
|
|
497
497
|
}),
|
|
498
498
|
default: m(() => [
|
|
499
|
-
|
|
499
|
+
B(" " + g(T(a)), 1)
|
|
500
500
|
]),
|
|
501
501
|
_: 2
|
|
502
502
|
}, 1032, ["outlined", "disabled", "onRemove"]);
|
|
@@ -537,7 +537,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
537
537
|
onClick: t[4] || (t[4] = //@ts-ignore
|
|
538
538
|
(...l) => s(Q) && s(Q)(...l))
|
|
539
539
|
}, [
|
|
540
|
-
|
|
540
|
+
S(me, {
|
|
541
541
|
icon: s(Ye),
|
|
542
542
|
class: k([s(y).icon, "cursor-pointer"])
|
|
543
543
|
}, null, 8, ["icon", "class"])
|
|
@@ -550,7 +550,7 @@ const ol = { class: "relative" }, rl = {
|
|
|
550
550
|
key: 0,
|
|
551
551
|
size: e.size
|
|
552
552
|
}, null, 8, ["size"])) : O(e.$slots, "icon", { key: 1 }, () => [
|
|
553
|
-
|
|
553
|
+
S(me, {
|
|
554
554
|
icon: s(Ze),
|
|
555
555
|
class: k(s(y).icon)
|
|
556
556
|
}, null, 8, ["icon", "class"])
|
|
@@ -2,7 +2,7 @@ const i = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: ({ props: t, data: s }) => {
|
|
4
4
|
const e = ["transition-colors duration-150 ease-in-out whitespace-nowrap text-center"];
|
|
5
|
-
return s.variant === "line" && e.push("py-2"), s.variant === "block" && e.push("py-1
|
|
5
|
+
return s.variant === "line" && e.push("py-2"), s.variant === "block" && e.push("py-1 px-8"), t.size === "xs" ? e.push("text-xs") : t.size === "sm" ? e.push("text-sm") : t.size === "lg" ? e.push("text-lg") : t.size === "xl" && e.push("text-xl"), e;
|
|
6
6
|
},
|
|
7
7
|
content: "flex items-center justify-center",
|
|
8
8
|
label: "font-medium",
|
|
@@ -2,39 +2,43 @@ import { ref as b, onUnmounted as F, unref as w, nextTick as x } from "vue";
|
|
|
2
2
|
const h = 'button:not([tabindex="-1"]), [href], input, select, textarea, li, a, [tabindex]:not([tabindex="-1"])';
|
|
3
3
|
function T() {
|
|
4
4
|
const l = b([]);
|
|
5
|
-
let
|
|
5
|
+
let u = null, i = null, f = null, a = null, o = null;
|
|
6
6
|
function m(e) {
|
|
7
7
|
return e ? e.$el ? e.$el : e : null;
|
|
8
8
|
}
|
|
9
9
|
function v(e) {
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
10
|
+
const t = m(e);
|
|
11
|
+
if (!t)
|
|
12
12
|
return;
|
|
13
|
-
const c =
|
|
14
|
-
l.value = Array.from(c),
|
|
13
|
+
const c = t.querySelectorAll(h);
|
|
14
|
+
l.value = Array.from(c), i = l.value[0] || null, f = l.value[l.value.length - 1] || null;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
if (e.key
|
|
16
|
+
const s = (e) => {
|
|
17
|
+
if (e.key === "Tab" && l.value.length === 0) {
|
|
18
|
+
e.preventDefault();
|
|
18
19
|
return;
|
|
19
|
-
|
|
20
|
+
}
|
|
21
|
+
if (e.key !== "Tab")
|
|
22
|
+
return;
|
|
23
|
+
const t = e.shiftKey, c = document.activeElement, n = i, r = f;
|
|
20
24
|
if (!c) {
|
|
21
25
|
e.preventDefault(), n == null || n.focus();
|
|
22
26
|
return;
|
|
23
27
|
}
|
|
24
|
-
!
|
|
28
|
+
!t && c === r ? (e.preventDefault(), n == null || n.focus()) : t && c === n && (e.preventDefault(), r == null || r.focus());
|
|
25
29
|
};
|
|
26
|
-
async function y(e,
|
|
30
|
+
async function y(e, t) {
|
|
27
31
|
var r;
|
|
28
|
-
if (typeof window > "u" || (d(),
|
|
32
|
+
if (typeof window > "u" || (d(), a = document.activeElement, o = w(e), !o))
|
|
29
33
|
return;
|
|
30
34
|
await x(), v(o);
|
|
31
|
-
const c = (
|
|
32
|
-
(r = l.value[c]) == null || r.focus(), document.removeEventListener("keydown",
|
|
35
|
+
const c = (t == null ? void 0 : t.initialFocusIndex) ?? 0;
|
|
36
|
+
(r = l.value[c]) == null || r.focus(), document.removeEventListener("keydown", s), u == null || u.disconnect(), document.addEventListener("keydown", s);
|
|
33
37
|
const n = m(o);
|
|
34
|
-
n && (
|
|
38
|
+
n && (u = new MutationObserver(() => v(o)), u.observe(n, { childList: !0, subtree: !0 }));
|
|
35
39
|
}
|
|
36
40
|
function d(e) {
|
|
37
|
-
document.removeEventListener("keydown",
|
|
41
|
+
document.removeEventListener("keydown", s), u == null || u.disconnect(), u = null, e != null && e.returnFocus && a && a.focus(), o = null, l.value = [], i = null, f = null, a = null;
|
|
38
42
|
}
|
|
39
43
|
return F(() => {
|
|
40
44
|
d({ returnFocus: !0 });
|