toku-ui 5.0.0 → 5.2.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/TCommandPalette/TCommandPalette.stories.d.ts +194 -0
- package/dist/components/TCommandPalette/TCommandPalette.stories.d.ts.map +1 -0
- package/dist/components/TCommandPalette/TCommandPalette.vue.d.ts +215 -0
- package/dist/components/TCommandPalette/TCommandPalette.vue.d.ts.map +1 -0
- package/dist/components/TCommandPalette/index.d.ts +3 -0
- package/dist/components/TCommandPalette/index.d.ts.map +1 -0
- package/dist/components/TDialog/TDialog.d.ts +11 -1
- package/dist/components/TDialog/TDialog.d.ts.map +1 -1
- package/dist/components/TTypography/TTypography.d.ts +11 -1
- package/dist/components/TTypography/TTypography.d.ts.map +1 -1
- package/dist/components/TTypography/TTypography.types.d.ts +7 -0
- package/dist/components/TTypography/TTypography.types.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.es.js +1240 -871
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { css as
|
|
4
|
-
import { Label as ie, Primitive as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, computed as r, createApp as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, inject as p, isVNode as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E, renderSlot as D, toDisplayString as O, unref as k, useAttrs as ee, useCssVars as te, useId as ne, useModel as re, useSlots as A, watch as j, withCtx as M } from "vue";
|
|
2
|
+
import { Icon as N } from "@iconify/vue";
|
|
3
|
+
import { css as P } from "@emotion/css";
|
|
4
|
+
import { Label as ie, Primitive as F, SwitchRoot as ae, SwitchThumb as oe } from "reka-ui";
|
|
5
5
|
//#region src/theme/base.ts
|
|
6
|
-
var
|
|
6
|
+
var se = {
|
|
7
7
|
colors: {
|
|
8
8
|
primary: {
|
|
9
9
|
main: "#3C1053",
|
|
@@ -58,22 +58,22 @@ var ce = {
|
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
61
|
-
function
|
|
61
|
+
function ce(e) {
|
|
62
62
|
return Number.isSafeInteger(e) && e >= 0;
|
|
63
63
|
}
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
|
|
66
|
-
function
|
|
67
|
-
return e != null && typeof e != "function" &&
|
|
66
|
+
function le(e) {
|
|
67
|
+
return e != null && typeof e != "function" && ce(e.length);
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
71
|
-
function
|
|
71
|
+
function ue(e) {
|
|
72
72
|
return e === "__proto__";
|
|
73
73
|
}
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
|
|
76
|
-
function
|
|
76
|
+
function de(e) {
|
|
77
77
|
switch (typeof e) {
|
|
78
78
|
case "number":
|
|
79
79
|
case "symbol": return !1;
|
|
@@ -82,24 +82,24 @@ function fe(e) {
|
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
|
|
85
|
-
function
|
|
85
|
+
function fe(e) {
|
|
86
86
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
90
|
-
function
|
|
90
|
+
function pe(e) {
|
|
91
91
|
if (e == null) return "";
|
|
92
92
|
if (typeof e == "string") return e;
|
|
93
|
-
if (Array.isArray(e)) return e.map(
|
|
93
|
+
if (Array.isArray(e)) return e.map(pe).join(",");
|
|
94
94
|
let t = String(e);
|
|
95
95
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs
|
|
99
|
-
function
|
|
100
|
-
if (Array.isArray(e)) return e.map(
|
|
99
|
+
function me(e) {
|
|
100
|
+
if (Array.isArray(e)) return e.map(fe);
|
|
101
101
|
if (typeof e == "symbol") return [e];
|
|
102
|
-
e =
|
|
102
|
+
e = pe(e);
|
|
103
103
|
let t = [], n = e.length;
|
|
104
104
|
if (n === 0) return t;
|
|
105
105
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -111,81 +111,81 @@ function he(e) {
|
|
|
111
111
|
}
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/get.mjs
|
|
114
|
-
function
|
|
114
|
+
function he(e, t, n) {
|
|
115
115
|
if (e == null) return n;
|
|
116
116
|
switch (typeof t) {
|
|
117
117
|
case "string": {
|
|
118
|
-
if (
|
|
118
|
+
if (ue(t)) return n;
|
|
119
119
|
let r = e[t];
|
|
120
|
-
return r === void 0 ?
|
|
120
|
+
return r === void 0 ? de(t) ? he(e, me(t), n) : n : r;
|
|
121
121
|
}
|
|
122
122
|
case "number":
|
|
123
123
|
case "symbol": {
|
|
124
|
-
typeof t == "number" && (t =
|
|
124
|
+
typeof t == "number" && (t = fe(t));
|
|
125
125
|
let r = e[t];
|
|
126
126
|
return r === void 0 ? n : r;
|
|
127
127
|
}
|
|
128
128
|
default: {
|
|
129
|
-
if (Array.isArray(t)) return
|
|
130
|
-
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t),
|
|
129
|
+
if (Array.isArray(t)) return ge(e, t, n);
|
|
130
|
+
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), ue(t)) return n;
|
|
131
131
|
let r = e[t];
|
|
132
132
|
return r === void 0 ? n : r;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ge(e, t, n) {
|
|
137
137
|
if (t.length === 0) return n;
|
|
138
138
|
let r = e;
|
|
139
139
|
for (let e = 0; e < t.length; e++) {
|
|
140
|
-
if (r == null ||
|
|
140
|
+
if (r == null || ue(t[e])) return n;
|
|
141
141
|
r = r[t[e]];
|
|
142
142
|
}
|
|
143
143
|
return r === void 0 ? n : r;
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
146
146
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
147
|
-
function
|
|
147
|
+
function _e(e) {
|
|
148
148
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
152
|
-
function
|
|
152
|
+
function I(e) {
|
|
153
153
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
157
|
-
function
|
|
157
|
+
function L(e) {
|
|
158
158
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
159
159
|
}
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
162
|
-
var
|
|
162
|
+
var R = "[object RegExp]", z = "[object String]", B = "[object Number]", ve = "[object Boolean]", V = "[object Arguments]", ye = "[object Symbol]", be = "[object Date]", xe = "[object Map]", Se = "[object Set]", Ce = "[object Array]", we = "[object ArrayBuffer]", Te = "[object Object]", Ee = "[object DataView]", De = "[object Uint8Array]", Oe = "[object Uint8ClampedArray]", ke = "[object Uint16Array]", Ae = "[object Uint32Array]", je = "[object Int8Array]", Me = "[object Int16Array]", Ne = "[object Int32Array]", Pe = "[object Float32Array]", Fe = "[object Float64Array]", Ie = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
|
|
163
163
|
return this;
|
|
164
164
|
})() || Function("return this")();
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
|
|
167
|
-
function
|
|
168
|
-
return
|
|
167
|
+
function Le(e) {
|
|
168
|
+
return Ie.Buffer !== void 0 && Ie.Buffer.isBuffer(e);
|
|
169
169
|
}
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
172
|
-
function
|
|
172
|
+
function Re(e) {
|
|
173
173
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
177
|
-
function
|
|
178
|
-
return
|
|
177
|
+
function ze(e, t) {
|
|
178
|
+
return Be(e, void 0, e, /* @__PURE__ */ new Map(), t);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Be(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
181
181
|
let a = i?.(e, t, n, r);
|
|
182
182
|
if (a !== void 0) return a;
|
|
183
|
-
if (
|
|
183
|
+
if (_e(e)) return e;
|
|
184
184
|
if (r.has(e)) return r.get(e);
|
|
185
185
|
if (Array.isArray(e)) {
|
|
186
186
|
let t = Array(e.length);
|
|
187
187
|
r.set(e, t);
|
|
188
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
188
|
+
for (let a = 0; a < e.length; a++) t[a] = Be(e[a], a, n, r, i);
|
|
189
189
|
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
|
|
190
190
|
}
|
|
191
191
|
if (e instanceof Date) return new Date(e.getTime());
|
|
@@ -196,112 +196,112 @@ function M(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
196
196
|
if (e instanceof Map) {
|
|
197
197
|
let t = /* @__PURE__ */ new Map();
|
|
198
198
|
r.set(e, t);
|
|
199
|
-
for (let [a, o] of e) t.set(a,
|
|
199
|
+
for (let [a, o] of e) t.set(a, Be(o, a, n, r, i));
|
|
200
200
|
return t;
|
|
201
201
|
}
|
|
202
202
|
if (e instanceof Set) {
|
|
203
203
|
let t = /* @__PURE__ */ new Set();
|
|
204
204
|
r.set(e, t);
|
|
205
|
-
for (let a of e) t.add(
|
|
205
|
+
for (let a of e) t.add(Be(a, void 0, n, r, i));
|
|
206
206
|
return t;
|
|
207
207
|
}
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
208
|
+
if (Le(e)) return e.subarray();
|
|
209
|
+
if (Re(e)) {
|
|
210
210
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
211
211
|
r.set(e, t);
|
|
212
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
212
|
+
for (let a = 0; a < e.length; a++) t[a] = Be(e[a], a, n, r, i);
|
|
213
213
|
return t;
|
|
214
214
|
}
|
|
215
215
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
216
216
|
if (e instanceof DataView) {
|
|
217
217
|
let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
|
|
218
|
-
return r.set(e, t),
|
|
218
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
219
219
|
}
|
|
220
220
|
if (typeof File < "u" && e instanceof File) {
|
|
221
221
|
let t = new File([e], e.name, { type: e.type });
|
|
222
|
-
return r.set(e, t),
|
|
222
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
223
223
|
}
|
|
224
224
|
if (typeof Blob < "u" && e instanceof Blob) {
|
|
225
225
|
let t = new Blob([e], { type: e.type });
|
|
226
|
-
return r.set(e, t),
|
|
226
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
227
227
|
}
|
|
228
228
|
if (e instanceof Error) {
|
|
229
229
|
let t = structuredClone(e);
|
|
230
|
-
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor,
|
|
230
|
+
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor, H(t, e, n, r, i), t;
|
|
231
231
|
}
|
|
232
232
|
if (e instanceof Boolean) {
|
|
233
233
|
let t = new Boolean(e.valueOf());
|
|
234
|
-
return r.set(e, t),
|
|
234
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
235
235
|
}
|
|
236
236
|
if (e instanceof Number) {
|
|
237
237
|
let t = new Number(e.valueOf());
|
|
238
|
-
return r.set(e, t),
|
|
238
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
239
239
|
}
|
|
240
240
|
if (e instanceof String) {
|
|
241
241
|
let t = new String(e.valueOf());
|
|
242
|
-
return r.set(e, t),
|
|
242
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
243
243
|
}
|
|
244
|
-
if (typeof e == "object" &&
|
|
244
|
+
if (typeof e == "object" && Ve(e)) {
|
|
245
245
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
246
|
-
return r.set(e, t),
|
|
246
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
247
247
|
}
|
|
248
248
|
return e;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
let a = [...Object.keys(t), ...
|
|
250
|
+
function H(e, t, n = e, r, i) {
|
|
251
|
+
let a = [...Object.keys(t), ...I(t)];
|
|
252
252
|
for (let o = 0; o < a.length; o++) {
|
|
253
253
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
254
|
-
(c == null || c.writable) && (e[s] =
|
|
254
|
+
(c == null || c.writable) && (e[s] = Be(t[s], s, n, r, i));
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
switch (
|
|
259
|
-
case
|
|
260
|
-
case
|
|
257
|
+
function Ve(e) {
|
|
258
|
+
switch (L(e)) {
|
|
259
|
+
case V:
|
|
260
|
+
case Ce:
|
|
261
|
+
case we:
|
|
262
|
+
case Ee:
|
|
263
|
+
case ve:
|
|
264
|
+
case be:
|
|
265
|
+
case Pe:
|
|
266
|
+
case Fe:
|
|
261
267
|
case je:
|
|
268
|
+
case Me:
|
|
262
269
|
case Ne:
|
|
263
|
-
case
|
|
270
|
+
case xe:
|
|
271
|
+
case B:
|
|
272
|
+
case Te:
|
|
273
|
+
case R:
|
|
274
|
+
case Se:
|
|
275
|
+
case z:
|
|
276
|
+
case ye:
|
|
264
277
|
case De:
|
|
265
|
-
case Ve:
|
|
266
|
-
case He:
|
|
267
|
-
case Re:
|
|
268
|
-
case ze:
|
|
269
|
-
case Be:
|
|
270
278
|
case Oe:
|
|
271
|
-
case Ce:
|
|
272
|
-
case Me:
|
|
273
|
-
case xe:
|
|
274
279
|
case ke:
|
|
275
|
-
case
|
|
276
|
-
case Ee:
|
|
277
|
-
case Pe:
|
|
278
|
-
case Fe:
|
|
279
|
-
case Ie:
|
|
280
|
-
case Le: return !0;
|
|
280
|
+
case Ae: return !0;
|
|
281
281
|
default: return !1;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
|
|
286
|
-
function
|
|
287
|
-
return
|
|
286
|
+
function He(e, t) {
|
|
287
|
+
return ze(e, (n, r, i, a) => {
|
|
288
288
|
let o = t?.(n, r, i, a);
|
|
289
289
|
if (o !== void 0) return o;
|
|
290
290
|
if (typeof e == "object") {
|
|
291
|
-
if (
|
|
291
|
+
if (L(e) === "[object Object]" && typeof e.constructor != "function") {
|
|
292
292
|
let t = {};
|
|
293
|
-
return a.set(e, t),
|
|
293
|
+
return a.set(e, t), H(t, e, i, a), t;
|
|
294
294
|
}
|
|
295
295
|
switch (Object.prototype.toString.call(e)) {
|
|
296
|
-
case
|
|
297
|
-
case
|
|
298
|
-
case
|
|
296
|
+
case B:
|
|
297
|
+
case z:
|
|
298
|
+
case ve: {
|
|
299
299
|
let t = new e.constructor(e?.valueOf());
|
|
300
|
-
return
|
|
300
|
+
return H(t, e), t;
|
|
301
301
|
}
|
|
302
|
-
case
|
|
302
|
+
case V: {
|
|
303
303
|
let t = {};
|
|
304
|
-
return
|
|
304
|
+
return H(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
|
|
305
305
|
}
|
|
306
306
|
default: return;
|
|
307
307
|
}
|
|
@@ -310,35 +310,35 @@ function Je(e, t) {
|
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
|
|
313
|
-
function
|
|
314
|
-
return
|
|
313
|
+
function Ue(e) {
|
|
314
|
+
return He(e);
|
|
315
315
|
}
|
|
316
316
|
//#endregion
|
|
317
317
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
|
|
318
|
-
function
|
|
319
|
-
return typeof e == "object" && !!e &&
|
|
318
|
+
function We(e) {
|
|
319
|
+
return typeof e == "object" && !!e && L(e) === "[object Arguments]";
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
|
|
323
|
-
function
|
|
323
|
+
function Ge(e) {
|
|
324
324
|
return typeof e == "object" && !!e;
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
|
|
328
|
-
function
|
|
329
|
-
return
|
|
328
|
+
function Ke(e) {
|
|
329
|
+
return Ge(e) && le(e);
|
|
330
330
|
}
|
|
331
331
|
//#endregion
|
|
332
332
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/function/noop.mjs
|
|
333
|
-
function
|
|
333
|
+
function qe() {}
|
|
334
334
|
//#endregion
|
|
335
335
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
function Je(e) {
|
|
337
|
+
return Re(e);
|
|
338
338
|
}
|
|
339
339
|
//#endregion
|
|
340
340
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
341
|
-
function
|
|
341
|
+
function Ye(e) {
|
|
342
342
|
if (typeof e != "object" || !e) return !1;
|
|
343
343
|
if (Object.getPrototypeOf(e) === null) return !0;
|
|
344
344
|
if (Object.prototype.toString.call(e) !== "[object Object]") {
|
|
@@ -351,9 +351,9 @@ function tt(e) {
|
|
|
351
351
|
}
|
|
352
352
|
//#endregion
|
|
353
353
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/clone.mjs
|
|
354
|
-
function
|
|
355
|
-
if (
|
|
356
|
-
if (Array.isArray(e) ||
|
|
354
|
+
function Xe(e) {
|
|
355
|
+
if (_e(e)) return e;
|
|
356
|
+
if (Array.isArray(e) || Re(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
357
357
|
let t = Object.getPrototypeOf(e);
|
|
358
358
|
if (t == null) return Object.assign(Object.create(t), e);
|
|
359
359
|
let n = t.constructor;
|
|
@@ -374,106 +374,106 @@ function nt(e) {
|
|
|
374
374
|
}
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
|
|
377
|
-
function
|
|
377
|
+
function Ze(e, ...t) {
|
|
378
378
|
let n = t.slice(0, -1), r = t[t.length - 1], i = e;
|
|
379
379
|
for (let e = 0; e < n.length; e++) {
|
|
380
380
|
let t = n[e];
|
|
381
|
-
i =
|
|
381
|
+
i = Qe(i, t, r, /* @__PURE__ */ new Map());
|
|
382
382
|
}
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
387
|
-
if (r.has(t)) return
|
|
385
|
+
function Qe(e, t, n, r) {
|
|
386
|
+
if (_e(e) && (e = Object(e)), typeof t != "object" || !t) return e;
|
|
387
|
+
if (r.has(t)) return Xe(r.get(t));
|
|
388
388
|
if (r.set(t, e), Array.isArray(t)) {
|
|
389
389
|
t = t.slice();
|
|
390
390
|
for (let e = 0; e < t.length; e++) t[e] = t[e] ?? void 0;
|
|
391
391
|
}
|
|
392
|
-
let i = [...Object.keys(t), ...
|
|
392
|
+
let i = [...Object.keys(t), ...I(t)];
|
|
393
393
|
for (let a = 0; a < i.length; a++) {
|
|
394
394
|
let o = i[a];
|
|
395
|
-
if (
|
|
395
|
+
if (ue(o)) continue;
|
|
396
396
|
let s = t[o], c = e[o];
|
|
397
|
-
if (
|
|
397
|
+
if (We(s) && (s = { ...s }), We(c) && (c = { ...c }), Le(s) && (s = Ue(s)), Array.isArray(s)) if (Array.isArray(c)) {
|
|
398
398
|
let e = [], t = Reflect.ownKeys(c);
|
|
399
399
|
for (let n = 0; n < t.length; n++) {
|
|
400
400
|
let r = t[n];
|
|
401
401
|
e[r] = c[r];
|
|
402
402
|
}
|
|
403
403
|
c = e;
|
|
404
|
-
} else if (
|
|
404
|
+
} else if (Ke(c)) {
|
|
405
405
|
let e = [];
|
|
406
406
|
for (let t = 0; t < c.length; t++) e[t] = c[t];
|
|
407
407
|
c = e;
|
|
408
408
|
} else c = [];
|
|
409
409
|
let l = n(c, s, o, e, t, r);
|
|
410
|
-
l === void 0 ? Array.isArray(s) ||
|
|
410
|
+
l === void 0 ? Array.isArray(s) || Ge(c) && Ge(s) && (Ye(c) || Ye(s) || Je(c) || Je(s)) ? e[o] = Qe(c, s, n, r) : c == null && Ye(s) ? e[o] = Qe({}, s, n, r) : c == null && Je(s) ? e[o] = Ue(s) : (c === void 0 || s !== void 0) && (e[o] = s) : e[o] = l;
|
|
411
411
|
}
|
|
412
412
|
return e;
|
|
413
413
|
}
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/merge.mjs
|
|
416
|
-
function
|
|
417
|
-
return
|
|
416
|
+
function U(e, ...t) {
|
|
417
|
+
return Ze(e, ...t, qe);
|
|
418
418
|
}
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
421
|
-
function
|
|
421
|
+
function $e(e) {
|
|
422
422
|
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
423
423
|
}
|
|
424
424
|
//#endregion
|
|
425
425
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/words.mjs
|
|
426
|
-
var
|
|
427
|
-
function
|
|
428
|
-
return Array.from(e.match(
|
|
426
|
+
var et = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
427
|
+
function tt(e) {
|
|
428
|
+
return Array.from(e.match(et) ?? []);
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
431
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
432
|
-
function
|
|
433
|
-
let t =
|
|
432
|
+
function nt(e) {
|
|
433
|
+
let t = tt(e);
|
|
434
434
|
if (t.length === 0) return "";
|
|
435
435
|
let [n, ...r] = t;
|
|
436
|
-
return `${n.toLowerCase()}${r.map((e) =>
|
|
436
|
+
return `${n.toLowerCase()}${r.map((e) => $e(e)).join("")}`;
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
440
|
-
function
|
|
441
|
-
return
|
|
440
|
+
function W() {
|
|
441
|
+
return W = Object.assign ? Object.assign.bind() : function(e) {
|
|
442
442
|
for (var t = 1; t < arguments.length; t++) {
|
|
443
443
|
var n = arguments[t];
|
|
444
444
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
445
445
|
}
|
|
446
446
|
return e;
|
|
447
|
-
},
|
|
447
|
+
}, W.apply(null, arguments);
|
|
448
448
|
}
|
|
449
449
|
//#endregion
|
|
450
450
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
451
|
-
function
|
|
451
|
+
function rt(e) {
|
|
452
452
|
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
453
453
|
return e;
|
|
454
454
|
}
|
|
455
455
|
//#endregion
|
|
456
456
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
457
|
-
function
|
|
458
|
-
return
|
|
457
|
+
function it(e, t) {
|
|
458
|
+
return it = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
459
459
|
return e.__proto__ = t, e;
|
|
460
|
-
},
|
|
460
|
+
}, it(e, t);
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
464
|
-
function
|
|
465
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
464
|
+
function at(e, t) {
|
|
465
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, it(e, t);
|
|
466
466
|
}
|
|
467
467
|
//#endregion
|
|
468
468
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
469
|
-
function
|
|
470
|
-
return
|
|
469
|
+
function ot(e) {
|
|
470
|
+
return ot = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
471
471
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
472
|
-
},
|
|
472
|
+
}, ot(e);
|
|
473
473
|
}
|
|
474
474
|
//#endregion
|
|
475
475
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
|
|
476
|
-
function
|
|
476
|
+
function st(e) {
|
|
477
477
|
try {
|
|
478
478
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
479
479
|
} catch {
|
|
@@ -482,48 +482,48 @@ function ft(e) {
|
|
|
482
482
|
}
|
|
483
483
|
//#endregion
|
|
484
484
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
|
|
485
|
-
function
|
|
485
|
+
function ct() {
|
|
486
486
|
try {
|
|
487
487
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
488
488
|
} catch {}
|
|
489
|
-
return (
|
|
489
|
+
return (ct = function() {
|
|
490
490
|
return !!e;
|
|
491
491
|
})();
|
|
492
492
|
}
|
|
493
493
|
//#endregion
|
|
494
494
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/construct.js
|
|
495
|
-
function
|
|
496
|
-
if (
|
|
495
|
+
function lt(e, t, n) {
|
|
496
|
+
if (ct()) return Reflect.construct.apply(null, arguments);
|
|
497
497
|
var r = [null];
|
|
498
498
|
r.push.apply(r, t);
|
|
499
499
|
var i = new (e.bind.apply(e, r))();
|
|
500
|
-
return n &&
|
|
500
|
+
return n && it(i, n.prototype), i;
|
|
501
501
|
}
|
|
502
502
|
//#endregion
|
|
503
503
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
|
|
504
|
-
function
|
|
504
|
+
function ut(e) {
|
|
505
505
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
506
|
-
return
|
|
507
|
-
if (e === null || !
|
|
506
|
+
return ut = function(e) {
|
|
507
|
+
if (e === null || !st(e)) return e;
|
|
508
508
|
if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
|
|
509
509
|
if (t !== void 0) {
|
|
510
510
|
if (t.has(e)) return t.get(e);
|
|
511
511
|
t.set(e, n);
|
|
512
512
|
}
|
|
513
513
|
function n() {
|
|
514
|
-
return
|
|
514
|
+
return lt(e, arguments, ot(this).constructor);
|
|
515
515
|
}
|
|
516
516
|
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
517
517
|
value: n,
|
|
518
518
|
enumerable: !1,
|
|
519
519
|
writable: !0,
|
|
520
520
|
configurable: !0
|
|
521
|
-
} }),
|
|
522
|
-
},
|
|
521
|
+
} }), it(n, e);
|
|
522
|
+
}, ut(e);
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js
|
|
526
|
-
var
|
|
526
|
+
var dt = {
|
|
527
527
|
1: "Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",
|
|
528
528
|
2: "Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",
|
|
529
529
|
3: "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
|
|
@@ -603,40 +603,40 @@ var gt = {
|
|
|
603
603
|
77: "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
604
604
|
78: "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
605
605
|
};
|
|
606
|
-
function
|
|
606
|
+
function ft() {
|
|
607
607
|
var e = [...arguments], t = e[0], n = [], r;
|
|
608
608
|
for (r = 1; r < e.length; r += 1) n.push(e[r]);
|
|
609
609
|
return n.forEach(function(e) {
|
|
610
610
|
t = t.replace(/%[a-z]/, e);
|
|
611
611
|
}), t;
|
|
612
612
|
}
|
|
613
|
-
var
|
|
614
|
-
|
|
613
|
+
var G = /* @__PURE__ */ function(e) {
|
|
614
|
+
at(t, e);
|
|
615
615
|
function t(t) {
|
|
616
616
|
var n;
|
|
617
617
|
if (process.env.NODE_ENV === "production") n = e.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + t + " for more information.") || this;
|
|
618
618
|
else {
|
|
619
619
|
var r = [...arguments].slice(1);
|
|
620
|
-
n = e.call(this,
|
|
620
|
+
n = e.call(this, ft.apply(void 0, [dt[t]].concat(r))) || this;
|
|
621
621
|
}
|
|
622
|
-
return
|
|
622
|
+
return rt(n);
|
|
623
623
|
}
|
|
624
624
|
return t;
|
|
625
|
-
}(/* @__PURE__ */
|
|
626
|
-
function
|
|
625
|
+
}(/* @__PURE__ */ ut(Error));
|
|
626
|
+
function pt(e) {
|
|
627
627
|
return Math.round(e * 255);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
629
|
+
function mt(e, t, n) {
|
|
630
|
+
return pt(e) + "," + pt(t) + "," + pt(n);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
if (r === void 0 && (r =
|
|
632
|
+
function ht(e, t, n, r) {
|
|
633
|
+
if (r === void 0 && (r = mt), t === 0) return r(n, n, n);
|
|
634
634
|
var i = (e % 360 + 360) % 360 / 60, a = (1 - Math.abs(2 * n - 1)) * t, o = a * (1 - Math.abs(i % 2 - 1)), s = 0, c = 0, l = 0;
|
|
635
635
|
i >= 0 && i < 1 ? (s = a, c = o) : i >= 1 && i < 2 ? (s = o, c = a) : i >= 2 && i < 3 ? (c = a, l = o) : i >= 3 && i < 4 ? (c = o, l = a) : i >= 4 && i < 5 ? (s = o, l = a) : i >= 5 && i < 6 && (s = a, l = o);
|
|
636
636
|
var u = n - a / 2, d = s + u, f = c + u, p = l + u;
|
|
637
637
|
return r(d, f, p);
|
|
638
638
|
}
|
|
639
|
-
var
|
|
639
|
+
var gt = {
|
|
640
640
|
aliceblue: "f0f8ff",
|
|
641
641
|
antiquewhite: "faebd7",
|
|
642
642
|
aqua: "00ffff",
|
|
@@ -786,21 +786,21 @@ var bt = {
|
|
|
786
786
|
yellow: "ff0",
|
|
787
787
|
yellowgreen: "9acd32"
|
|
788
788
|
};
|
|
789
|
-
function
|
|
789
|
+
function _t(e) {
|
|
790
790
|
if (typeof e != "string") return e;
|
|
791
791
|
var t = e.toLowerCase();
|
|
792
|
-
return
|
|
792
|
+
return gt[t] ? "#" + gt[t] : e;
|
|
793
793
|
}
|
|
794
|
-
var
|
|
795
|
-
function
|
|
796
|
-
if (typeof e != "string") throw new
|
|
797
|
-
var t =
|
|
798
|
-
if (t.match(
|
|
794
|
+
var vt = /^#[a-fA-F0-9]{6}$/, yt = /^#[a-fA-F0-9]{8}$/, bt = /^#[a-fA-F0-9]{3}$/, xt = /^#[a-fA-F0-9]{4}$/, St = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, Ct = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, wt = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, Tt = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
795
|
+
function Et(e) {
|
|
796
|
+
if (typeof e != "string") throw new G(3);
|
|
797
|
+
var t = _t(e);
|
|
798
|
+
if (t.match(vt)) return {
|
|
799
799
|
red: parseInt("" + t[1] + t[2], 16),
|
|
800
800
|
green: parseInt("" + t[3] + t[4], 16),
|
|
801
801
|
blue: parseInt("" + t[5] + t[6], 16)
|
|
802
802
|
};
|
|
803
|
-
if (t.match(
|
|
803
|
+
if (t.match(yt)) {
|
|
804
804
|
var n = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
|
|
805
805
|
return {
|
|
806
806
|
red: parseInt("" + t[1] + t[2], 16),
|
|
@@ -809,12 +809,12 @@ function z(e) {
|
|
|
809
809
|
alpha: n
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
|
-
if (t.match(
|
|
812
|
+
if (t.match(bt)) return {
|
|
813
813
|
red: parseInt("" + t[1] + t[1], 16),
|
|
814
814
|
green: parseInt("" + t[2] + t[2], 16),
|
|
815
815
|
blue: parseInt("" + t[3] + t[3], 16)
|
|
816
816
|
};
|
|
817
|
-
if (t.match(
|
|
817
|
+
if (t.match(xt)) {
|
|
818
818
|
var r = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
|
|
819
819
|
return {
|
|
820
820
|
red: parseInt("" + t[1] + t[1], 16),
|
|
@@ -823,33 +823,33 @@ function z(e) {
|
|
|
823
823
|
alpha: r
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
|
-
var i =
|
|
826
|
+
var i = St.exec(t);
|
|
827
827
|
if (i) return {
|
|
828
828
|
red: parseInt("" + i[1], 10),
|
|
829
829
|
green: parseInt("" + i[2], 10),
|
|
830
830
|
blue: parseInt("" + i[3], 10)
|
|
831
831
|
};
|
|
832
|
-
var a =
|
|
832
|
+
var a = Ct.exec(t.substring(0, 50));
|
|
833
833
|
if (a) return {
|
|
834
834
|
red: parseInt("" + a[1], 10),
|
|
835
835
|
green: parseInt("" + a[2], 10),
|
|
836
836
|
blue: parseInt("" + a[3], 10),
|
|
837
837
|
alpha: parseFloat("" + a[4]) > 1 ? parseFloat("" + a[4]) / 100 : parseFloat("" + a[4])
|
|
838
838
|
};
|
|
839
|
-
var o =
|
|
839
|
+
var o = wt.exec(t);
|
|
840
840
|
if (o) {
|
|
841
|
-
var s = "rgb(" +
|
|
842
|
-
if (!c) throw new
|
|
841
|
+
var s = "rgb(" + ht(parseInt("" + o[1], 10), parseInt("" + o[2], 10) / 100, parseInt("" + o[3], 10) / 100) + ")", c = St.exec(s);
|
|
842
|
+
if (!c) throw new G(4, t, s);
|
|
843
843
|
return {
|
|
844
844
|
red: parseInt("" + c[1], 10),
|
|
845
845
|
green: parseInt("" + c[2], 10),
|
|
846
846
|
blue: parseInt("" + c[3], 10)
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
|
-
var l =
|
|
849
|
+
var l = Tt.exec(t.substring(0, 50));
|
|
850
850
|
if (l) {
|
|
851
|
-
var u = "rgb(" +
|
|
852
|
-
if (!d) throw new
|
|
851
|
+
var u = "rgb(" + ht(parseInt("" + l[1], 10), parseInt("" + l[2], 10) / 100, parseInt("" + l[3], 10) / 100) + ")", d = St.exec(u);
|
|
852
|
+
if (!d) throw new G(4, t, u);
|
|
853
853
|
return {
|
|
854
854
|
red: parseInt("" + d[1], 10),
|
|
855
855
|
green: parseInt("" + d[2], 10),
|
|
@@ -857,9 +857,9 @@ function z(e) {
|
|
|
857
857
|
alpha: parseFloat("" + l[4]) > 1 ? parseFloat("" + l[4]) / 100 : parseFloat("" + l[4])
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
|
-
throw new
|
|
860
|
+
throw new G(5);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function Dt(e) {
|
|
863
863
|
var t = e.red / 255, n = e.green / 255, r = e.blue / 255, i = Math.max(t, n, r), a = Math.min(t, n, r), o = (i + a) / 2;
|
|
864
864
|
if (i === a) return e.alpha === void 0 ? {
|
|
865
865
|
hue: 0,
|
|
@@ -894,168 +894,168 @@ function At(e) {
|
|
|
894
894
|
alpha: e.alpha
|
|
895
895
|
};
|
|
896
896
|
}
|
|
897
|
-
function
|
|
898
|
-
return
|
|
897
|
+
function K(e) {
|
|
898
|
+
return Dt(Et(e));
|
|
899
899
|
}
|
|
900
|
-
var
|
|
900
|
+
var Ot = function(e) {
|
|
901
901
|
return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
|
|
902
902
|
};
|
|
903
|
-
function
|
|
903
|
+
function kt(e) {
|
|
904
904
|
var t = e.toString(16);
|
|
905
905
|
return t.length === 1 ? "0" + t : t;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
return
|
|
907
|
+
function At(e) {
|
|
908
|
+
return kt(Math.round(e * 255));
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
return
|
|
910
|
+
function jt(e, t, n) {
|
|
911
|
+
return Ot("#" + At(e) + At(t) + At(n));
|
|
912
912
|
}
|
|
913
|
-
function
|
|
914
|
-
return
|
|
913
|
+
function Mt(e, t, n) {
|
|
914
|
+
return ht(e, t, n, jt);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
918
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
919
|
-
throw new
|
|
916
|
+
function Nt(e, t, n) {
|
|
917
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return Mt(e, t, n);
|
|
918
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return Mt(e.hue, e.saturation, e.lightness);
|
|
919
|
+
throw new G(1);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
923
|
-
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
924
|
-
throw new
|
|
921
|
+
function Pt(e, t, n, r) {
|
|
922
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? Mt(e, t, n) : "rgba(" + ht(e, t, n) + "," + r + ")";
|
|
923
|
+
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? Mt(e.hue, e.saturation, e.lightness) : "rgba(" + ht(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
|
|
924
|
+
throw new G(2);
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
928
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
929
|
-
throw new
|
|
926
|
+
function Ft(e, t, n) {
|
|
927
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return Ot("#" + kt(e) + kt(t) + kt(n));
|
|
928
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return Ot("#" + kt(e.red) + kt(e.green) + kt(e.blue));
|
|
929
|
+
throw new G(6);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function q(e, t, n, r) {
|
|
932
932
|
if (typeof e == "string" && typeof t == "number") {
|
|
933
|
-
var i =
|
|
933
|
+
var i = Et(e);
|
|
934
934
|
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + t + ")";
|
|
935
|
-
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
936
|
-
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
937
|
-
throw new
|
|
935
|
+
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? Ft(e, t, n) : "rgba(" + e + "," + t + "," + n + "," + r + ")";
|
|
936
|
+
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? Ft(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
|
|
937
|
+
throw new G(7);
|
|
938
938
|
}
|
|
939
|
-
var
|
|
939
|
+
var It = function(e) {
|
|
940
940
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
941
|
-
},
|
|
941
|
+
}, Lt = function(e) {
|
|
942
942
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
943
|
-
},
|
|
943
|
+
}, Rt = function(e) {
|
|
944
944
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
945
|
-
},
|
|
945
|
+
}, zt = function(e) {
|
|
946
946
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
947
947
|
};
|
|
948
|
-
function
|
|
949
|
-
if (typeof e != "object") throw new
|
|
950
|
-
if (
|
|
951
|
-
if (
|
|
952
|
-
if (
|
|
953
|
-
if (
|
|
954
|
-
throw new
|
|
948
|
+
function J(e) {
|
|
949
|
+
if (typeof e != "object") throw new G(8);
|
|
950
|
+
if (Lt(e)) return q(e);
|
|
951
|
+
if (It(e)) return Ft(e);
|
|
952
|
+
if (zt(e)) return Pt(e);
|
|
953
|
+
if (Rt(e)) return Nt(e);
|
|
954
|
+
throw new G(8);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Bt(e, t, n) {
|
|
957
957
|
return function() {
|
|
958
958
|
var r = n.concat(Array.prototype.slice.call(arguments));
|
|
959
|
-
return r.length >= t ? e.apply(this, r) :
|
|
959
|
+
return r.length >= t ? e.apply(this, r) : Bt(e, t, r);
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
962
|
+
function Y(e) {
|
|
963
|
+
return Bt(e, e.length, []);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Vt(e, t) {
|
|
966
966
|
if (t === "transparent") return t;
|
|
967
|
-
var n =
|
|
968
|
-
return
|
|
967
|
+
var n = K(t);
|
|
968
|
+
return J(W({}, n, { hue: n.hue + parseFloat(e) }));
|
|
969
969
|
}
|
|
970
|
-
|
|
971
|
-
function
|
|
970
|
+
Y(Vt);
|
|
971
|
+
function Ht(e, t, n) {
|
|
972
972
|
return Math.max(e, Math.min(t, n));
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function Ut(e, t) {
|
|
975
975
|
if (t === "transparent") return t;
|
|
976
|
-
var n =
|
|
977
|
-
return
|
|
976
|
+
var n = K(t);
|
|
977
|
+
return J(W({}, n, { lightness: Ht(0, 1, n.lightness - parseFloat(e)) }));
|
|
978
978
|
}
|
|
979
|
-
var
|
|
979
|
+
var Wt = Y(Ut);
|
|
980
980
|
function Gt(e, t) {
|
|
981
981
|
if (t === "transparent") return t;
|
|
982
|
-
var n =
|
|
983
|
-
return
|
|
982
|
+
var n = K(t);
|
|
983
|
+
return J(W({}, n, { saturation: Ht(0, 1, n.saturation - parseFloat(e)) }));
|
|
984
984
|
}
|
|
985
|
-
|
|
985
|
+
Y(Gt);
|
|
986
986
|
function Kt(e, t) {
|
|
987
987
|
if (t === "transparent") return t;
|
|
988
|
-
var n =
|
|
989
|
-
return
|
|
988
|
+
var n = K(t);
|
|
989
|
+
return J(W({}, n, { lightness: Ht(0, 1, n.lightness + parseFloat(e)) }));
|
|
990
990
|
}
|
|
991
|
-
var
|
|
991
|
+
var X = Y(Kt);
|
|
992
992
|
function qt(e, t, n) {
|
|
993
993
|
if (t === "transparent") return n;
|
|
994
994
|
if (n === "transparent") return t;
|
|
995
995
|
if (e === 0) return n;
|
|
996
|
-
var r =
|
|
997
|
-
return
|
|
996
|
+
var r = Et(t), i = W({}, r, { alpha: typeof r.alpha == "number" ? r.alpha : 1 }), a = Et(n), o = W({}, a, { alpha: typeof a.alpha == "number" ? a.alpha : 1 }), s = i.alpha - o.alpha, c = parseFloat(e) * 2 - 1, l = ((c * s === -1 ? c : c + s) / (1 + c * s) + 1) / 2, u = 1 - l;
|
|
997
|
+
return q({
|
|
998
998
|
red: Math.floor(i.red * l + o.red * u),
|
|
999
999
|
green: Math.floor(i.green * l + o.green * u),
|
|
1000
1000
|
blue: Math.floor(i.blue * l + o.blue * u),
|
|
1001
1001
|
alpha: i.alpha * parseFloat(e) + o.alpha * (1 - parseFloat(e))
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
var Jt =
|
|
1004
|
+
var Jt = Y(qt);
|
|
1005
1005
|
function Yt(e, t) {
|
|
1006
1006
|
if (t === "transparent") return t;
|
|
1007
|
-
var n =
|
|
1008
|
-
return
|
|
1007
|
+
var n = Et(t);
|
|
1008
|
+
return q(W({}, n, { alpha: Ht(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 + parseFloat(e) * 100) / 100) }));
|
|
1009
1009
|
}
|
|
1010
|
-
|
|
1010
|
+
Y(Yt);
|
|
1011
1011
|
function Xt(e, t) {
|
|
1012
1012
|
if (t === "transparent") return t;
|
|
1013
|
-
var n =
|
|
1014
|
-
return
|
|
1013
|
+
var n = K(t);
|
|
1014
|
+
return J(W({}, n, { saturation: Ht(0, 1, n.saturation + parseFloat(e)) }));
|
|
1015
1015
|
}
|
|
1016
|
-
|
|
1016
|
+
Y(Xt);
|
|
1017
1017
|
function Zt(e, t) {
|
|
1018
|
-
return t === "transparent" ? t :
|
|
1018
|
+
return t === "transparent" ? t : J(W({}, K(t), { hue: parseFloat(e) }));
|
|
1019
1019
|
}
|
|
1020
|
-
|
|
1020
|
+
Y(Zt);
|
|
1021
1021
|
function Qt(e, t) {
|
|
1022
|
-
return t === "transparent" ? t :
|
|
1022
|
+
return t === "transparent" ? t : J(W({}, K(t), { lightness: parseFloat(e) }));
|
|
1023
1023
|
}
|
|
1024
|
-
|
|
1024
|
+
Y(Qt);
|
|
1025
1025
|
function $t(e, t) {
|
|
1026
|
-
return t === "transparent" ? t :
|
|
1026
|
+
return t === "transparent" ? t : J(W({}, K(t), { saturation: parseFloat(e) }));
|
|
1027
1027
|
}
|
|
1028
|
-
|
|
1028
|
+
Y($t);
|
|
1029
1029
|
function en(e, t) {
|
|
1030
1030
|
return t === "transparent" ? t : Jt(parseFloat(e), "rgb(0, 0, 0)", t);
|
|
1031
1031
|
}
|
|
1032
|
-
|
|
1032
|
+
Y(en);
|
|
1033
1033
|
function tn(e, t) {
|
|
1034
1034
|
return t === "transparent" ? t : Jt(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1036
|
+
Y(tn);
|
|
1037
1037
|
function nn(e, t) {
|
|
1038
1038
|
if (t === "transparent") return t;
|
|
1039
|
-
var n =
|
|
1040
|
-
return
|
|
1039
|
+
var n = Et(t);
|
|
1040
|
+
return q(W({}, n, { alpha: Ht(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 - parseFloat(e) * 100).toFixed(2) / 100) }));
|
|
1041
1041
|
}
|
|
1042
|
-
var rn =
|
|
1042
|
+
var rn = Y(nn);
|
|
1043
1043
|
//#endregion
|
|
1044
1044
|
//#region src/theme/utils.ts
|
|
1045
1045
|
function an(e) {
|
|
1046
1046
|
return {
|
|
1047
|
-
1:
|
|
1048
|
-
2:
|
|
1049
|
-
3:
|
|
1050
|
-
4:
|
|
1051
|
-
5:
|
|
1052
|
-
6:
|
|
1053
|
-
7:
|
|
1054
|
-
8:
|
|
1047
|
+
1: X(.35, e),
|
|
1048
|
+
2: X(.3, e),
|
|
1049
|
+
3: X(.25, e),
|
|
1050
|
+
4: X(.2, e),
|
|
1051
|
+
5: X(.15, e),
|
|
1052
|
+
6: X(.12, e),
|
|
1053
|
+
7: X(.08, e),
|
|
1054
|
+
8: X(.04, e),
|
|
1055
1055
|
9: e,
|
|
1056
|
-
10:
|
|
1057
|
-
11:
|
|
1058
|
-
12:
|
|
1056
|
+
10: Wt(.08, e),
|
|
1057
|
+
11: Wt(.1, e),
|
|
1058
|
+
12: Wt(.15, e)
|
|
1059
1059
|
};
|
|
1060
1060
|
}
|
|
1061
1061
|
var on = [
|
|
@@ -1073,7 +1073,7 @@ var on = [
|
|
|
1073
1073
|
.9
|
|
1074
1074
|
];
|
|
1075
1075
|
function sn(e = {}) {
|
|
1076
|
-
let t =
|
|
1076
|
+
let t = U({}, se, e), n = e.colors?.brand?.base ?? e.colors?.primary?.main, r;
|
|
1077
1077
|
if (n) {
|
|
1078
1078
|
let e = an(n);
|
|
1079
1079
|
t.colors.primary.main = n, t.colors.primary.ultraDark = e[12], t.colors.primary.dark = n, t.colors.primary.toku = e[10], t.colors.primary.light1 = e[7], t.colors.primary.light2 = e[4], t.colors.primary.light3 = e[3], t.colors.primary.light4 = e[2], t.colors.primary.light5 = e[1], r = {};
|
|
@@ -1087,29 +1087,29 @@ function sn(e = {}) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
//#endregion
|
|
1089
1089
|
//#region src/composables/theme.ts
|
|
1090
|
-
var cn = Symbol("theme"),
|
|
1091
|
-
let e =
|
|
1092
|
-
return
|
|
1093
|
-
}, ln = /* @__PURE__ */
|
|
1090
|
+
var cn = Symbol("theme"), Z = () => {
|
|
1091
|
+
let e = p(cn, void 0);
|
|
1092
|
+
return r(() => e?.value ?? se);
|
|
1093
|
+
}, ln = /* @__PURE__ */ d({
|
|
1094
1094
|
__name: "TChip",
|
|
1095
1095
|
props: { variant: { default: "default" } },
|
|
1096
1096
|
setup(e) {
|
|
1097
|
-
|
|
1098
|
-
v3457cee4:
|
|
1099
|
-
v38cf7840:
|
|
1100
|
-
v2d9fac57:
|
|
1101
|
-
v4320e4fd:
|
|
1097
|
+
te((e) => ({
|
|
1098
|
+
v3457cee4: k(n).colors.gray.dark3,
|
|
1099
|
+
v38cf7840: k(n).colors.background,
|
|
1100
|
+
v2d9fac57: k(n).colors.primary.main,
|
|
1101
|
+
v4320e4fd: k(n).colors.primary.light5
|
|
1102
1102
|
}));
|
|
1103
|
-
let t = e, n =
|
|
1104
|
-
return (e, n) => (
|
|
1103
|
+
let t = e, n = Z();
|
|
1104
|
+
return (e, n) => (C(), s("div", { class: v(["t-chip", [`t-chip--${t.variant}`]]) }, [D(e.$slots, "default", {}, void 0, !0)], 2));
|
|
1105
1105
|
}
|
|
1106
|
-
}),
|
|
1106
|
+
}), un = (e, t) => {
|
|
1107
1107
|
let n = e.__vccOpts || e;
|
|
1108
1108
|
for (let [e, r] of t) n[e] = r;
|
|
1109
1109
|
return n;
|
|
1110
|
-
},
|
|
1111
|
-
let t =
|
|
1112
|
-
return
|
|
1110
|
+
}, dn = /* @__PURE__ */ un(ln, [["__scopeId", "data-v-519905d4"]]), fn = (e) => nt(e), pn = (e) => {
|
|
1111
|
+
let t = Z(), n = r(() => fn(e.value)), i = r(() => n.value === "primary" ? t.value.colors.primary.toku : Wt(.15, t.value.colors[n.value])), a = r(() => n.value === "primary" ? t.value.colors.primary.main : t.value.colors[n.value]), o = r(() => n.value === "primary" ? t.value.colors.primary.light1 : X(.15, t.value.colors[n.value])), s = r(() => n.value === "primary" ? t.value.colors.primary.light2 : X(.2, t.value.colors[n.value])), c = r(() => n.value === "primary" ? t.value.colors.primary.light3 : X(.25, t.value.colors[n.value]));
|
|
1112
|
+
return r(() => P({
|
|
1113
1113
|
"&, *": {
|
|
1114
1114
|
margin: 0,
|
|
1115
1115
|
padding: 0,
|
|
@@ -1202,12 +1202,12 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1202
1202
|
"&--tertiary:disabled &__spinner": { color: t.value.colors.gray.medium1 },
|
|
1203
1203
|
"&--secondary &__spinner, &--tertiary &__spinner": { color: a.value }
|
|
1204
1204
|
}));
|
|
1205
|
-
},
|
|
1205
|
+
}, mn = {
|
|
1206
1206
|
variant: "primary",
|
|
1207
1207
|
size: "medium",
|
|
1208
1208
|
type: "button",
|
|
1209
1209
|
color: "primary"
|
|
1210
|
-
},
|
|
1210
|
+
}, hn = /* @__PURE__ */ d({
|
|
1211
1211
|
name: "TButton",
|
|
1212
1212
|
props: {
|
|
1213
1213
|
variant: String,
|
|
@@ -1221,8 +1221,8 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1221
1221
|
color: String
|
|
1222
1222
|
},
|
|
1223
1223
|
emits: ["click"],
|
|
1224
|
-
setup(e, { attrs: t, slots:
|
|
1225
|
-
let a =
|
|
1224
|
+
setup(e, { attrs: t, slots: n, emit: i }) {
|
|
1225
|
+
let a = r(() => U({}, mn, e, t)), o = pn(r(() => a.value.color)), s = Z(), c = r(() => [
|
|
1226
1226
|
o.value,
|
|
1227
1227
|
`${o.value}--${a.value.variant}`,
|
|
1228
1228
|
`${o.value}--${a.value.size}`,
|
|
@@ -1230,29 +1230,29 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1230
1230
|
[`${o.value}--full-width`]: a.value.fullWidth,
|
|
1231
1231
|
[`${o.value}--loading`]: a.value.loading
|
|
1232
1232
|
}
|
|
1233
|
-
]),
|
|
1233
|
+
]), l = () => {
|
|
1234
1234
|
a.value.loading || i("click");
|
|
1235
1235
|
};
|
|
1236
|
-
return () =>
|
|
1236
|
+
return () => u("button", g({
|
|
1237
1237
|
class: c.value,
|
|
1238
1238
|
type: a.value.type,
|
|
1239
1239
|
disabled: a.value.disabled,
|
|
1240
|
-
onClick:
|
|
1240
|
+
onClick: l
|
|
1241
1241
|
}, t), [
|
|
1242
|
-
a.value.leftIcon &&
|
|
1243
|
-
|
|
1244
|
-
a.value.rightIcon &&
|
|
1245
|
-
a.value.loading &&
|
|
1242
|
+
a.value.leftIcon && u(N, { icon: `${s.value.iconSet}:${a.value.leftIcon}` }, null),
|
|
1243
|
+
n.default?.(),
|
|
1244
|
+
a.value.rightIcon && u(N, { icon: `${s.value.iconSet}:${a.value.rightIcon}` }, null),
|
|
1245
|
+
a.value.loading && u(N, {
|
|
1246
1246
|
class: `${o.value}__spinner`,
|
|
1247
1247
|
icon: "svg-spinners:90-ring-with-bg"
|
|
1248
1248
|
}, null)
|
|
1249
1249
|
]);
|
|
1250
1250
|
}
|
|
1251
|
-
}),
|
|
1251
|
+
}), gn = {
|
|
1252
1252
|
color: "#000",
|
|
1253
1253
|
size: "medium",
|
|
1254
1254
|
variant: "outline"
|
|
1255
|
-
},
|
|
1255
|
+
}, Q = /* @__PURE__ */ d({
|
|
1256
1256
|
name: "TIcon",
|
|
1257
1257
|
props: {
|
|
1258
1258
|
icon: {
|
|
@@ -1264,7 +1264,7 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1264
1264
|
variant: String
|
|
1265
1265
|
},
|
|
1266
1266
|
setup(e, { attrs: t }) {
|
|
1267
|
-
let
|
|
1267
|
+
let n = r(() => U({}, gn, e, t)), i = Z(), a = r(() => he(i.value.colors, n.value.color) || n.value.color), o = r(() => `${i.value.iconSet}:${n.value.icon}${n.value.variant === "solid" ? "-solid" : ""}`), s = {
|
|
1268
1268
|
miniature: "6px",
|
|
1269
1269
|
"extra-small": "10px",
|
|
1270
1270
|
small: "16px",
|
|
@@ -1272,17 +1272,17 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1272
1272
|
large: "24px",
|
|
1273
1273
|
"extra-large": "28px",
|
|
1274
1274
|
huge: "44px"
|
|
1275
|
-
}, c =
|
|
1276
|
-
return () =>
|
|
1275
|
+
}, c = r(() => s[n.value.size]);
|
|
1276
|
+
return () => u(N, g({
|
|
1277
1277
|
icon: o.value,
|
|
1278
1278
|
color: a.value,
|
|
1279
1279
|
height: c.value,
|
|
1280
1280
|
width: c.value
|
|
1281
1281
|
}, t), null);
|
|
1282
1282
|
}
|
|
1283
|
-
}),
|
|
1284
|
-
let e =
|
|
1285
|
-
return
|
|
1283
|
+
}), _n = () => {
|
|
1284
|
+
let e = Z();
|
|
1285
|
+
return r(() => P({
|
|
1286
1286
|
"&, *": {
|
|
1287
1287
|
margin: 0,
|
|
1288
1288
|
boxSizing: "border-box"
|
|
@@ -1341,56 +1341,56 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1341
1341
|
"&--default > &__status-indicator": { background: e.value.colors.gray.medium1 },
|
|
1342
1342
|
"&--success": {
|
|
1343
1343
|
color: e.value.colors.success,
|
|
1344
|
-
background:
|
|
1344
|
+
background: q(e.value.colors.success, .1)
|
|
1345
1345
|
},
|
|
1346
1346
|
"&--success > &__text": { color: e.value.colors.success },
|
|
1347
1347
|
"&--success > &__status-indicator": { background: e.value.colors.success },
|
|
1348
|
-
"&--in-process": { background:
|
|
1348
|
+
"&--in-process": { background: q(e.value.colors.inProcess, .1) },
|
|
1349
1349
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
1350
1350
|
"&--in-process > &__status-indicator": { background: e.value.colors.inProcessDark },
|
|
1351
|
-
"&--pending": { background:
|
|
1351
|
+
"&--pending": { background: q(e.value.colors.info, .1) },
|
|
1352
1352
|
"&--pending > &__text": { color: e.value.colors.info },
|
|
1353
1353
|
"&--pending > &__status-indicator": { background: e.value.colors.info },
|
|
1354
|
-
"&--toku": { background:
|
|
1354
|
+
"&--toku": { background: q(e.value.colors.primary.light4, 1) },
|
|
1355
1355
|
"&--toku > &__text": { color: e.value.colors.primary.main },
|
|
1356
1356
|
"&--toku > &__status-indicator": { background: e.value.colors.primary.main },
|
|
1357
1357
|
"&--error": {
|
|
1358
1358
|
color: e.value.colors.error,
|
|
1359
|
-
background:
|
|
1359
|
+
background: q(e.value.colors.error, .1)
|
|
1360
1360
|
},
|
|
1361
1361
|
"&--error > &__text": { color: e.value.colors.error },
|
|
1362
1362
|
"&--error > &__status-indicator": { background: e.value.colors.error }
|
|
1363
1363
|
}));
|
|
1364
|
-
},
|
|
1364
|
+
}, vn = {
|
|
1365
1365
|
size: "medium",
|
|
1366
1366
|
variant: "default"
|
|
1367
|
-
},
|
|
1367
|
+
}, yn = /* @__PURE__ */ d({
|
|
1368
1368
|
name: "TTag",
|
|
1369
1369
|
props: {
|
|
1370
1370
|
size: String,
|
|
1371
1371
|
variant: String
|
|
1372
1372
|
},
|
|
1373
1373
|
setup(e, { slots: t }) {
|
|
1374
|
-
let
|
|
1374
|
+
let n = r(() => U({}, vn, e)), i = _n(), a = r(() => [
|
|
1375
1375
|
i.value,
|
|
1376
|
-
`${i.value}--${
|
|
1377
|
-
`${i.value}--${
|
|
1376
|
+
`${i.value}--${n.value.variant}`,
|
|
1377
|
+
`${i.value}--${n.value.size}`
|
|
1378
1378
|
]);
|
|
1379
|
-
return () =>
|
|
1379
|
+
return () => u("div", { class: a.value }, [n.value.size === "miniature" ? u("div", {
|
|
1380
1380
|
"data-testid": "t-tag-status-indicator",
|
|
1381
1381
|
class: `${i.value}__status-indicator`
|
|
1382
|
-
}, null) :
|
|
1382
|
+
}, null) : u("p", {
|
|
1383
1383
|
"data-testid": "t-tag-text",
|
|
1384
|
-
class: `${i.value}__text ${i.value}__text--${
|
|
1384
|
+
class: `${i.value}__text ${i.value}__text--${n.value.size}`
|
|
1385
1385
|
}, [t.default?.()])]);
|
|
1386
1386
|
}
|
|
1387
|
-
}),
|
|
1387
|
+
}), bn = ["data-borderless", "disabled"], xn = ["data-media"], Sn = { class: "t-card-button__text" }, Cn = { class: "t-card-button__title" }, wn = {
|
|
1388
1388
|
key: 0,
|
|
1389
1389
|
class: "t-card-button__subtitle"
|
|
1390
|
-
},
|
|
1390
|
+
}, Tn = {
|
|
1391
1391
|
key: 1,
|
|
1392
1392
|
class: "t-card-button__tag"
|
|
1393
|
-
},
|
|
1393
|
+
}, En = { class: "t-card-button__trailing" }, Dn = /* @__PURE__ */ un(/* @__PURE__ */ d({
|
|
1394
1394
|
name: "TCardButton",
|
|
1395
1395
|
__name: "TCardButton",
|
|
1396
1396
|
props: {
|
|
@@ -1402,34 +1402,34 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1402
1402
|
disabled: { type: Boolean }
|
|
1403
1403
|
},
|
|
1404
1404
|
setup(e) {
|
|
1405
|
-
return (t, n) => (
|
|
1405
|
+
return (t, n) => (C(), s("button", {
|
|
1406
1406
|
type: "button",
|
|
1407
1407
|
class: "t-card-button",
|
|
1408
1408
|
"data-borderless": e.borderless || void 0,
|
|
1409
1409
|
disabled: e.disabled
|
|
1410
1410
|
}, [
|
|
1411
|
-
t.$slots.icon || t.$slots.image ? (
|
|
1411
|
+
t.$slots.icon || t.$slots.image ? (C(), s("div", {
|
|
1412
1412
|
key: 0,
|
|
1413
1413
|
class: "t-card-button__media",
|
|
1414
1414
|
"data-media": t.$slots.icon ? "icon" : "image"
|
|
1415
|
-
}, [t.$slots.icon ?
|
|
1416
|
-
|
|
1417
|
-
e.tag || t.$slots.tag ? (
|
|
1415
|
+
}, [t.$slots.icon ? D(t.$slots, "icon", { key: 0 }, void 0, !0) : D(t.$slots, "image", { key: 1 }, void 0, !0)], 8, xn)) : o("", !0),
|
|
1416
|
+
c("div", Sn, [D(t.$slots, "title", {}, () => [c("p", Cn, O(e.title), 1)], !0), e.subtitle ? (C(), s("p", wn, O(e.subtitle), 1)) : o("", !0)]),
|
|
1417
|
+
e.tag || t.$slots.tag ? (C(), s("span", Tn, [D(t.$slots, "tag", {}, () => [u(k(yn), {
|
|
1418
1418
|
size: "small",
|
|
1419
1419
|
variant: e.tagVariant
|
|
1420
1420
|
}, {
|
|
1421
|
-
default:
|
|
1421
|
+
default: M(() => [l(O(e.tag), 1)]),
|
|
1422
1422
|
_: 1
|
|
1423
|
-
}, 8, ["variant"])], !0)])) :
|
|
1424
|
-
|
|
1423
|
+
}, 8, ["variant"])], !0)])) : o("", !0),
|
|
1424
|
+
c("span", En, [D(t.$slots, "trailing", {}, () => [u(k(Q), {
|
|
1425
1425
|
icon: "chevron-right",
|
|
1426
1426
|
size: "small",
|
|
1427
1427
|
color: "currentColor"
|
|
1428
1428
|
})], !0)])
|
|
1429
|
-
], 8,
|
|
1429
|
+
], 8, bn));
|
|
1430
1430
|
}
|
|
1431
|
-
}), [["__scopeId", "data-v-b2bdf7ca"]]),
|
|
1432
|
-
let e =
|
|
1431
|
+
}), [["__scopeId", "data-v-b2bdf7ca"]]), On = () => {
|
|
1432
|
+
let e = Z(), t = e.value.colors.gray.light1, n = (e, t) => {
|
|
1433
1433
|
switch (t) {
|
|
1434
1434
|
case "large": return encodeURIComponent(`<svg width="10" height="9.5" viewBox="0 0 10 9.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1435
1435
|
<path d="M0.833344 3.79167L3.75001 6.70834L9.16668 1.29167" stroke="${e}" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1440,7 +1440,7 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1440
1440
|
default: return "";
|
|
1441
1441
|
}
|
|
1442
1442
|
};
|
|
1443
|
-
return
|
|
1443
|
+
return r(() => P({
|
|
1444
1444
|
"&, *": {
|
|
1445
1445
|
margin: 0,
|
|
1446
1446
|
padding: 0,
|
|
@@ -1502,11 +1502,11 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1502
1502
|
height: "1.125rem",
|
|
1503
1503
|
"&::before": {
|
|
1504
1504
|
boxShadow: `inset 0 0 0 1.125rem ${e.value.colors.primary.main}`,
|
|
1505
|
-
content: `url('data:image/svg+xml,${
|
|
1505
|
+
content: `url('data:image/svg+xml,${n("white", "large")}')`,
|
|
1506
1506
|
width: "1.125rem",
|
|
1507
1507
|
height: "1.125rem"
|
|
1508
1508
|
},
|
|
1509
|
-
"&:checked:disabled::before": { content: `url('data:image/svg+xml,${
|
|
1509
|
+
"&:checked:disabled::before": { content: `url('data:image/svg+xml,${n(t, "large")}')` }
|
|
1510
1510
|
}
|
|
1511
1511
|
},
|
|
1512
1512
|
"&--small": {
|
|
@@ -1517,18 +1517,18 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1517
1517
|
height: "1rem",
|
|
1518
1518
|
"&::before": {
|
|
1519
1519
|
boxShadow: `inset 0 0 0 1rem ${e.value.colors.primary.main}`,
|
|
1520
|
-
content: `url('data:image/svg+xml,${
|
|
1520
|
+
content: `url('data:image/svg+xml,${n("white", "small")}')`,
|
|
1521
1521
|
width: "1rem",
|
|
1522
1522
|
height: "1rem"
|
|
1523
1523
|
},
|
|
1524
|
-
"&:checked:disabled::before": { content: `url('data:image/svg+xml,${
|
|
1524
|
+
"&:checked:disabled::before": { content: `url('data:image/svg+xml,${n(t, "small")}')` }
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
1527
|
}));
|
|
1528
|
-
},
|
|
1528
|
+
}, kn = () => `checkbox-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`, An = {
|
|
1529
1529
|
size: "large",
|
|
1530
1530
|
value: !1
|
|
1531
|
-
},
|
|
1531
|
+
}, jn = /* @__PURE__ */ d({
|
|
1532
1532
|
name: "TCheckbox",
|
|
1533
1533
|
props: {
|
|
1534
1534
|
labelPosition: String,
|
|
@@ -1543,24 +1543,24 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1543
1543
|
"change",
|
|
1544
1544
|
"update:modelValue"
|
|
1545
1545
|
],
|
|
1546
|
-
setup(e, { attrs: t, slots:
|
|
1547
|
-
let a =
|
|
1546
|
+
setup(e, { attrs: t, slots: n, emit: i }) {
|
|
1547
|
+
let a = kn(), o = r(() => U({}, An, e, t, { id: e.id ?? t.id ?? a })), s = On(), c = r(() => [s.value, `${s.value}--${o.value.size}`]), l = r(() => [
|
|
1548
1548
|
s.value,
|
|
1549
1549
|
`${s.value}--${o.value.size}`,
|
|
1550
1550
|
{ [`${s.value}--disabled`]: o.value.disabled }
|
|
1551
|
-
]), d =
|
|
1552
|
-
|
|
1551
|
+
]), d = T(o.value.modelValue || o.value.value);
|
|
1552
|
+
j([() => o.value.modelValue, () => o.value.value], () => {
|
|
1553
1553
|
d.value = o.value.modelValue || o.value.value;
|
|
1554
1554
|
});
|
|
1555
1555
|
let f = () => {
|
|
1556
1556
|
i("update:modelValue", !d.value), i("input", !d.value), i("change", !d.value), d.value = !d.value;
|
|
1557
1557
|
};
|
|
1558
|
-
return () =>
|
|
1559
|
-
|
|
1558
|
+
return () => u("div", { class: c.value.map((e) => `${e}__wrapper`) }, [
|
|
1559
|
+
n.default?.() && o.value.labelPosition === "left" && u("label", {
|
|
1560
1560
|
for: o.value.id,
|
|
1561
|
-
class:
|
|
1562
|
-
}, [
|
|
1563
|
-
|
|
1561
|
+
class: l.value
|
|
1562
|
+
}, [n.default()]),
|
|
1563
|
+
u("input", g({
|
|
1564
1564
|
id: o.value.id,
|
|
1565
1565
|
type: "checkbox",
|
|
1566
1566
|
class: c.value.map((e) => `${e}__input`),
|
|
@@ -1568,15 +1568,15 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1568
1568
|
disabled: o.value.disabled,
|
|
1569
1569
|
onClick: f
|
|
1570
1570
|
}, t), null),
|
|
1571
|
-
|
|
1571
|
+
n.default?.() && o.value.labelPosition === "right" && u("label", {
|
|
1572
1572
|
for: o.value.id,
|
|
1573
|
-
class:
|
|
1574
|
-
}, [
|
|
1573
|
+
class: l.value
|
|
1574
|
+
}, [n.default()])
|
|
1575
1575
|
]);
|
|
1576
1576
|
}
|
|
1577
|
-
}),
|
|
1578
|
-
let t =
|
|
1579
|
-
return
|
|
1577
|
+
}), Mn = (e) => {
|
|
1578
|
+
let t = Z();
|
|
1579
|
+
return r(() => P({
|
|
1580
1580
|
"&, *": {
|
|
1581
1581
|
margin: 0,
|
|
1582
1582
|
boxSizing: "border-box"
|
|
@@ -1637,7 +1637,7 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1637
1637
|
marginBlock: "0.5rem"
|
|
1638
1638
|
}
|
|
1639
1639
|
}));
|
|
1640
|
-
},
|
|
1640
|
+
}, Nn = () => r(() => P({
|
|
1641
1641
|
position: "fixed",
|
|
1642
1642
|
display: "none",
|
|
1643
1643
|
padding: "0.625rem",
|
|
@@ -1666,21 +1666,21 @@ var cn = Symbol("theme"), J = () => {
|
|
|
1666
1666
|
borderTopRightRadius: "0.5rem",
|
|
1667
1667
|
borderBottomLeftRadius: "0"
|
|
1668
1668
|
}
|
|
1669
|
-
})),
|
|
1669
|
+
})), Pn = (e) => {
|
|
1670
1670
|
let t = [];
|
|
1671
1671
|
return e?.forEach((e) => {
|
|
1672
|
-
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
1672
|
+
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...Pn(e.children));
|
|
1673
1673
|
}), t;
|
|
1674
1674
|
};
|
|
1675
1675
|
//#endregion
|
|
1676
1676
|
//#region src/components/TDropdown/TDropdown.tsx
|
|
1677
|
-
function
|
|
1678
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1677
|
+
function Fn(e) {
|
|
1678
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
1679
1679
|
}
|
|
1680
|
-
var
|
|
1680
|
+
var In = {
|
|
1681
1681
|
size: "small",
|
|
1682
1682
|
position: "center"
|
|
1683
|
-
},
|
|
1683
|
+
}, Ln = /* @__PURE__ */ d({
|
|
1684
1684
|
name: "TDropdown",
|
|
1685
1685
|
props: {
|
|
1686
1686
|
open: Boolean,
|
|
@@ -1690,53 +1690,53 @@ var Pn = {
|
|
|
1690
1690
|
attachToBody: Boolean
|
|
1691
1691
|
},
|
|
1692
1692
|
emits: ["cancel"],
|
|
1693
|
-
setup(
|
|
1694
|
-
let o =
|
|
1693
|
+
setup(e, { slots: n, attrs: i, emit: a }) {
|
|
1694
|
+
let o = r(() => U({}, In, e, i)), s = T(null), c = T(null), l = T(null), d = T({
|
|
1695
1695
|
top: 0,
|
|
1696
1696
|
left: 0
|
|
1697
1697
|
}), f = () => {
|
|
1698
|
-
if (!c.value || !
|
|
1698
|
+
if (!c.value || !l.value) return;
|
|
1699
1699
|
let e = c.value.getBoundingClientRect(), t = e.bottom + 8, n = e.left, r = t, i = n;
|
|
1700
1700
|
switch (o.value.position) {
|
|
1701
1701
|
case "center":
|
|
1702
|
-
i = n -
|
|
1702
|
+
i = n - l.value.clientWidth / 2 + c.value.clientWidth / 2;
|
|
1703
1703
|
break;
|
|
1704
1704
|
case "right":
|
|
1705
1705
|
i = n + c.value.clientWidth;
|
|
1706
1706
|
break;
|
|
1707
1707
|
case "left":
|
|
1708
|
-
i = n -
|
|
1708
|
+
i = n - l.value.clientWidth;
|
|
1709
1709
|
break;
|
|
1710
1710
|
case "middle-left":
|
|
1711
|
-
i = n -
|
|
1711
|
+
i = n - l.value.clientWidth + c.value.clientWidth;
|
|
1712
1712
|
break;
|
|
1713
1713
|
case "middle-right":
|
|
1714
1714
|
i = n;
|
|
1715
1715
|
break;
|
|
1716
1716
|
case "top-center":
|
|
1717
|
-
r = e.top -
|
|
1717
|
+
r = e.top - l.value.clientHeight - 8, i = n - l.value.clientWidth / 2 + c.value.clientWidth / 2;
|
|
1718
1718
|
break;
|
|
1719
1719
|
case "top-left":
|
|
1720
|
-
r = e.top -
|
|
1720
|
+
r = e.top - l.value.clientHeight - 8, i = n - l.value.clientWidth;
|
|
1721
1721
|
break;
|
|
1722
1722
|
case "top-right":
|
|
1723
|
-
r = e.top -
|
|
1723
|
+
r = e.top - l.value.clientHeight - 8, i = n + c.value.clientWidth;
|
|
1724
1724
|
break;
|
|
1725
1725
|
}
|
|
1726
1726
|
d.value = {
|
|
1727
1727
|
top: r,
|
|
1728
1728
|
left: i
|
|
1729
1729
|
};
|
|
1730
|
-
}, p =
|
|
1730
|
+
}, p = Nn(), m = r(() => [
|
|
1731
1731
|
p.value,
|
|
1732
1732
|
`${p.value}--${o.value.size}`,
|
|
1733
1733
|
`${p.value}--${o.value.position}`,
|
|
1734
1734
|
{ [`${p.value}--open`]: o.value.open }
|
|
1735
|
-
]), h =
|
|
1735
|
+
]), h = r(() => ({
|
|
1736
1736
|
top: `${d.value.top}px`,
|
|
1737
1737
|
left: `${d.value.left}px`,
|
|
1738
1738
|
width: o.value.fullWidth ? `${c.value?.clientWidth}px` : void 0
|
|
1739
|
-
})), g =
|
|
1739
|
+
})), g = Mn(r(() => l.value?.clientHeight ?? 0)), _ = r(() => [
|
|
1740
1740
|
g.value,
|
|
1741
1741
|
`${g.value}--${o.value.size}`,
|
|
1742
1742
|
`${g.value}--${o.value.position}`,
|
|
@@ -1746,46 +1746,46 @@ var Pn = {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
]), v = (e) => {
|
|
1748
1748
|
o.value.open && s.value && !s.value.contains(e.target) && !e.target?.closest(`.${p.value}`) && a("cancel");
|
|
1749
|
-
},
|
|
1749
|
+
}, y = (e) => {
|
|
1750
1750
|
e.key === "Escape" && a("cancel");
|
|
1751
|
-
},
|
|
1751
|
+
}, b = (e) => {
|
|
1752
1752
|
if (o.value.attachToBody && e.key === "Tab") {
|
|
1753
1753
|
e.preventDefault();
|
|
1754
|
-
let t =
|
|
1754
|
+
let t = l.value?.querySelector("[role=\"menuitem\"]");
|
|
1755
1755
|
t && t.focus();
|
|
1756
1756
|
}
|
|
1757
1757
|
};
|
|
1758
|
-
o.value.attachToBody &&
|
|
1758
|
+
o.value.attachToBody && j([
|
|
1759
1759
|
() => o.value.open,
|
|
1760
1760
|
() => o.value.position,
|
|
1761
1761
|
() => o.value.size,
|
|
1762
1762
|
c,
|
|
1763
|
-
|
|
1763
|
+
l
|
|
1764
1764
|
], () => {
|
|
1765
|
-
f(), o.value.open &&
|
|
1766
|
-
}, { immediate: !0 }),
|
|
1767
|
-
o.value.attachToBody && (window.addEventListener("scroll", f), window.addEventListener("resize", f)), document.addEventListener("click", v), document.addEventListener("keydown",
|
|
1768
|
-
}),
|
|
1769
|
-
o.value.attachToBody && (window.removeEventListener("scroll", f), window.removeEventListener("resize", f)), document.removeEventListener("click", v), document.removeEventListener("keydown",
|
|
1765
|
+
f(), o.value.open && l.value ? c.value?.addEventListener("keydown", b) : c.value?.removeEventListener("keydown", b);
|
|
1766
|
+
}, { immediate: !0 }), x(() => {
|
|
1767
|
+
o.value.attachToBody && (window.addEventListener("scroll", f), window.addEventListener("resize", f)), document.addEventListener("click", v), document.addEventListener("keydown", y);
|
|
1768
|
+
}), S(() => {
|
|
1769
|
+
o.value.attachToBody && (window.removeEventListener("scroll", f), window.removeEventListener("resize", f)), document.removeEventListener("click", v), document.removeEventListener("keydown", y);
|
|
1770
1770
|
});
|
|
1771
|
-
let
|
|
1772
|
-
ref:
|
|
1771
|
+
let C = r(() => Pn(n.default?.() || [])), w = () => u("div", {
|
|
1772
|
+
ref: l,
|
|
1773
1773
|
class: o.value.attachToBody ? m.value : `${g.value}__menu`,
|
|
1774
1774
|
style: o.value.attachToBody ? h.value : void 0,
|
|
1775
1775
|
role: "menu",
|
|
1776
1776
|
tabindex: o.value.attachToBody ? 0 : void 0
|
|
1777
|
-
}, [
|
|
1777
|
+
}, [C.value.map((e, t, n) => u("div", { key: t }, [e, t < n.length - 1 && u("div", { class: `${g.value}__divider` }, null)]))]);
|
|
1778
1778
|
return () => {
|
|
1779
|
-
let
|
|
1780
|
-
return
|
|
1779
|
+
let e;
|
|
1780
|
+
return u("div", {
|
|
1781
1781
|
ref: s,
|
|
1782
1782
|
class: _.value
|
|
1783
|
-
}, [
|
|
1783
|
+
}, [u("div", { ref: c }, [n.trigger?.()]), o.value.open && (o.value.attachToBody ? u(t, { to: "body" }, Fn(e = w()) ? e : { default: () => [e] }) : w())]);
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
|
-
}),
|
|
1787
|
-
let e =
|
|
1788
|
-
return
|
|
1786
|
+
}), Rn = () => {
|
|
1787
|
+
let e = Z();
|
|
1788
|
+
return r(() => P({
|
|
1789
1789
|
"&, *": {
|
|
1790
1790
|
margin: 0,
|
|
1791
1791
|
boxSizing: "border-box"
|
|
@@ -1807,28 +1807,28 @@ var Pn = {
|
|
|
1807
1807
|
cursor: "not-allowed"
|
|
1808
1808
|
}
|
|
1809
1809
|
}));
|
|
1810
|
-
},
|
|
1810
|
+
}, zn = /* @__PURE__ */ d({
|
|
1811
1811
|
name: "TDropdownItem",
|
|
1812
1812
|
emits: ["click"],
|
|
1813
1813
|
props: { disabled: Boolean },
|
|
1814
|
-
setup(e, { slots: t, emit:
|
|
1815
|
-
let a =
|
|
1816
|
-
a.value.disabled ||
|
|
1817
|
-
},
|
|
1818
|
-
e.key === "Enter" && !a.value.disabled && (
|
|
1814
|
+
setup(e, { slots: t, emit: n, attrs: i }) {
|
|
1815
|
+
let a = r(() => U({}, e, i)), o = Rn(), s = r(() => [o.value, { [`${o.value}--disabled`]: a.value.disabled }]), c = () => {
|
|
1816
|
+
a.value.disabled || n("click");
|
|
1817
|
+
}, l = (e) => {
|
|
1818
|
+
e.key === "Enter" && !a.value.disabled && (n("click"), e.preventDefault());
|
|
1819
1819
|
};
|
|
1820
|
-
return () =>
|
|
1820
|
+
return () => u("div", {
|
|
1821
1821
|
class: s.value,
|
|
1822
1822
|
onClick: c,
|
|
1823
1823
|
role: "menuitem",
|
|
1824
1824
|
tabindex: 0,
|
|
1825
|
-
onKeydown:
|
|
1825
|
+
onKeydown: l,
|
|
1826
1826
|
"aria-disabled": a.value.disabled
|
|
1827
1827
|
}, [t.default?.()]);
|
|
1828
1828
|
}
|
|
1829
|
-
}),
|
|
1830
|
-
let e =
|
|
1831
|
-
return
|
|
1829
|
+
}), Bn = () => {
|
|
1830
|
+
let e = Z();
|
|
1831
|
+
return r(() => P({
|
|
1832
1832
|
"&, *": {
|
|
1833
1833
|
margin: 0,
|
|
1834
1834
|
padding: 0,
|
|
@@ -1902,7 +1902,7 @@ var Pn = {
|
|
|
1902
1902
|
transform: "translateY(50%)"
|
|
1903
1903
|
}
|
|
1904
1904
|
}));
|
|
1905
|
-
},
|
|
1905
|
+
}, Vn = { type: "text" }, Hn = /* @__PURE__ */ d({
|
|
1906
1906
|
name: "TTextInput",
|
|
1907
1907
|
emits: [
|
|
1908
1908
|
"input",
|
|
@@ -1937,19 +1937,19 @@ var Pn = {
|
|
|
1937
1937
|
max: [String, Number],
|
|
1938
1938
|
step: [String, Number]
|
|
1939
1939
|
},
|
|
1940
|
-
setup(e, { attrs: t, emit:
|
|
1941
|
-
let o =
|
|
1940
|
+
setup(e, { attrs: t, emit: n, slots: i, expose: a }) {
|
|
1941
|
+
let o = r(() => U({}, Vn, e, t)), s = Bn(), c = Z(), l = r({
|
|
1942
1942
|
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
1943
1943
|
set: (e) => {
|
|
1944
|
-
|
|
1944
|
+
n("update:modelValue", e), n("input", e), n("change", e);
|
|
1945
1945
|
}
|
|
1946
1946
|
}), d = (e) => {
|
|
1947
|
-
|
|
1947
|
+
l.value = e.target.value;
|
|
1948
1948
|
}, f = (e) => {
|
|
1949
|
-
|
|
1949
|
+
n("focus", e);
|
|
1950
1950
|
}, p = (e) => {
|
|
1951
|
-
|
|
1952
|
-
}, m =
|
|
1951
|
+
n("blur", e);
|
|
1952
|
+
}, m = T(null);
|
|
1953
1953
|
return a({
|
|
1954
1954
|
focus: () => {
|
|
1955
1955
|
m.value?.focus();
|
|
@@ -1957,7 +1957,7 @@ var Pn = {
|
|
|
1957
1957
|
blur: () => {
|
|
1958
1958
|
m.value?.blur();
|
|
1959
1959
|
}
|
|
1960
|
-
}), () =>
|
|
1960
|
+
}), () => u("div", { class: [
|
|
1961
1961
|
s.value,
|
|
1962
1962
|
`${s.value}__container`,
|
|
1963
1963
|
{
|
|
@@ -1966,16 +1966,16 @@ var Pn = {
|
|
|
1966
1966
|
[`${s.value}--multiline`]: o.value.multiline
|
|
1967
1967
|
}
|
|
1968
1968
|
] }, [
|
|
1969
|
-
i.label?.() || o.value.label &&
|
|
1969
|
+
i.label?.() || o.value.label && u("label", {
|
|
1970
1970
|
class: [`${s.value}__label`],
|
|
1971
1971
|
for: o.value.id
|
|
1972
1972
|
}, [o.value.label]),
|
|
1973
|
-
|
|
1974
|
-
i.leftIcon?.() || o.value.leftIcon &&
|
|
1973
|
+
u("div", { class: `${s.value}__input-wrapper` }, [
|
|
1974
|
+
i.leftIcon?.() || o.value.leftIcon && u(N, {
|
|
1975
1975
|
icon: `${c.value.iconSet}:${o.value.leftIcon}`,
|
|
1976
1976
|
class: [`${s.value}__icon`, `${s.value}__icon--left`]
|
|
1977
1977
|
}, null),
|
|
1978
|
-
|
|
1978
|
+
u("input", g(t, {
|
|
1979
1979
|
id: o.value.id,
|
|
1980
1980
|
type: o.value.multiline ? void 0 : o.value.type,
|
|
1981
1981
|
class: [`${s.value}__input`, {
|
|
@@ -1983,7 +1983,7 @@ var Pn = {
|
|
|
1983
1983
|
[`${s.value}__input--right-icon`]: i.rightIcon?.() || o.value.rightIcon
|
|
1984
1984
|
}],
|
|
1985
1985
|
placeholder: o.value.placeholder,
|
|
1986
|
-
value:
|
|
1986
|
+
value: l.value,
|
|
1987
1987
|
onInput: d,
|
|
1988
1988
|
onFocus: f,
|
|
1989
1989
|
onBlur: p,
|
|
@@ -1994,15 +1994,15 @@ var Pn = {
|
|
|
1994
1994
|
ref: m,
|
|
1995
1995
|
step: o.value.step
|
|
1996
1996
|
}), null),
|
|
1997
|
-
i.rightIcon?.() || o.value.rightIcon &&
|
|
1997
|
+
i.rightIcon?.() || o.value.rightIcon && u(N, {
|
|
1998
1998
|
icon: `${c.value.iconSet}:${o.value.rightIcon}`,
|
|
1999
1999
|
class: [`${s.value}__icon`, `${s.value}__icon--right`]
|
|
2000
2000
|
}, null)
|
|
2001
2001
|
]),
|
|
2002
|
-
i.helperText?.() || o.value.helperText &&
|
|
2002
|
+
i.helperText?.() || o.value.helperText && u("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
2003
2003
|
]);
|
|
2004
2004
|
}
|
|
2005
|
-
}),
|
|
2005
|
+
}), Un = (e) => e.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, ""), Wn = /* @__PURE__ */ d({
|
|
2006
2006
|
name: "TCombobox",
|
|
2007
2007
|
emits: [
|
|
2008
2008
|
"input",
|
|
@@ -2023,8 +2023,8 @@ var Pn = {
|
|
|
2023
2023
|
helperText: String,
|
|
2024
2024
|
disabled: Boolean
|
|
2025
2025
|
},
|
|
2026
|
-
setup(e, { emit: t, expose:
|
|
2027
|
-
let i =
|
|
2026
|
+
setup(e, { emit: t, expose: n }) {
|
|
2027
|
+
let i = T(e.modelValue ?? ""), a = T(null), o = T(!1), s = T(null), c = T(null), l = r(() => e.disabled), d = () => {
|
|
2028
2028
|
o.value = !0;
|
|
2029
2029
|
}, f = () => {
|
|
2030
2030
|
o.value = !1;
|
|
@@ -2033,7 +2033,7 @@ var Pn = {
|
|
|
2033
2033
|
}, m = () => {
|
|
2034
2034
|
a.value === null ? i.value = "" : i.value = a.value.label;
|
|
2035
2035
|
};
|
|
2036
|
-
|
|
2036
|
+
n({
|
|
2037
2037
|
resetTextValue: m,
|
|
2038
2038
|
resetSelectedOption: () => {
|
|
2039
2039
|
a.value = null;
|
|
@@ -2047,18 +2047,18 @@ var Pn = {
|
|
|
2047
2047
|
s.value && o.value && (s.value.contains(e.target) || (f(), m(), p()));
|
|
2048
2048
|
}, v = (e) => {
|
|
2049
2049
|
i.value = e.label, a.value = e, t("select", e.value), t("update:modelValue", e.label), f();
|
|
2050
|
-
},
|
|
2050
|
+
}, y = (e) => {
|
|
2051
2051
|
e.key === "Escape" && (f(), m(), p());
|
|
2052
|
-
},
|
|
2053
|
-
let t =
|
|
2052
|
+
}, b = r(() => i.value === "" ? e.options : e.options.filter((e) => {
|
|
2053
|
+
let t = Un(e.label), n = Un(i.value);
|
|
2054
2054
|
return t.includes(n);
|
|
2055
2055
|
}));
|
|
2056
|
-
|
|
2057
|
-
document.addEventListener("click", _), s.value?.addEventListener("keydown",
|
|
2058
|
-
}),
|
|
2059
|
-
document.removeEventListener("click", _), s.value?.removeEventListener("keydown",
|
|
2056
|
+
x(() => {
|
|
2057
|
+
document.addEventListener("click", _), s.value?.addEventListener("keydown", y);
|
|
2058
|
+
}), S(() => {
|
|
2059
|
+
document.removeEventListener("click", _), s.value?.removeEventListener("keydown", y);
|
|
2060
2060
|
});
|
|
2061
|
-
let
|
|
2061
|
+
let C = () => u(Hn, {
|
|
2062
2062
|
ref: c,
|
|
2063
2063
|
modelValue: i.value,
|
|
2064
2064
|
label: e.label,
|
|
@@ -2066,26 +2066,399 @@ var Pn = {
|
|
|
2066
2066
|
placeholder: e.placeholder,
|
|
2067
2067
|
onFocus: h,
|
|
2068
2068
|
onChange: g,
|
|
2069
|
-
disabled:
|
|
2069
|
+
disabled: l.value
|
|
2070
2070
|
}, null);
|
|
2071
|
-
return
|
|
2071
|
+
return j(() => e.modelValue, () => {
|
|
2072
2072
|
i.value = e.modelValue ?? "";
|
|
2073
|
-
}), () =>
|
|
2073
|
+
}), () => u("div", {
|
|
2074
2074
|
ref: s,
|
|
2075
2075
|
role: "combobox",
|
|
2076
2076
|
"aria-controls": "menu",
|
|
2077
2077
|
"aria-expanded": o.value
|
|
2078
|
-
}, [
|
|
2078
|
+
}, [u(Ln, {
|
|
2079
2079
|
open: o.value,
|
|
2080
2080
|
"full-width": !0
|
|
2081
2081
|
}, {
|
|
2082
|
-
trigger: () =>
|
|
2083
|
-
default: () =>
|
|
2082
|
+
trigger: () => u(C, null, null),
|
|
2083
|
+
default: () => b.value.map((e) => u(zn, { onClick: () => v(e) }, { default: () => [e.label] }))
|
|
2084
2084
|
})]);
|
|
2085
2085
|
}
|
|
2086
|
-
}),
|
|
2087
|
-
let e =
|
|
2088
|
-
return
|
|
2086
|
+
}), Gn = () => {
|
|
2087
|
+
let e = new Set(["class", "style"]), t = ([t]) => e.has(t), n = ([e]) => /^on[A-Z]/.test(e), i = ee(), a = r(() => Object.entries(i).filter(([e]) => e !== "data-state")), o = r(() => Object.fromEntries(a.value.filter(t))), s = r(() => Object.fromEntries(a.value.filter(n))), c = r(() => Object.fromEntries(a.value.filter((e) => !t(e) && !n(e))));
|
|
2088
|
+
return {
|
|
2089
|
+
wrapperAttrs: o,
|
|
2090
|
+
controlAttrs: r(() => Object.fromEntries(a.value.filter((e) => !t(e)))),
|
|
2091
|
+
staticAttrs: c,
|
|
2092
|
+
listenerAttrs: s
|
|
2093
|
+
};
|
|
2094
|
+
}, Kn = ["data-loading", "data-empty"], qn = { class: "t-command-palette__panel" }, Jn = { class: "t-command-palette__search" }, Yn = [
|
|
2095
|
+
"aria-label",
|
|
2096
|
+
"aria-expanded",
|
|
2097
|
+
"aria-activedescendant",
|
|
2098
|
+
"placeholder",
|
|
2099
|
+
"value"
|
|
2100
|
+
], Xn = ["data-hidden", "aria-label"], Zn = {
|
|
2101
|
+
key: 0,
|
|
2102
|
+
role: "status",
|
|
2103
|
+
class: "t-command-palette__status"
|
|
2104
|
+
}, Qn = [
|
|
2105
|
+
"role",
|
|
2106
|
+
"aria-labelledby",
|
|
2107
|
+
"aria-busy"
|
|
2108
|
+
], $n = {
|
|
2109
|
+
key: 0,
|
|
2110
|
+
class: "t-command-palette__skeleton",
|
|
2111
|
+
"aria-hidden": "true"
|
|
2112
|
+
}, er = { class: "t-command-palette__skeleton-lines" }, tr = [
|
|
2113
|
+
"role",
|
|
2114
|
+
"data-section",
|
|
2115
|
+
"aria-labelledby"
|
|
2116
|
+
], nr = ["id"], rr = ["data-group", "aria-labelledby"], ir = ["id"], ar = [
|
|
2117
|
+
"id",
|
|
2118
|
+
"aria-label",
|
|
2119
|
+
"aria-selected",
|
|
2120
|
+
"aria-disabled",
|
|
2121
|
+
"data-highlighted",
|
|
2122
|
+
"data-active",
|
|
2123
|
+
"data-disabled",
|
|
2124
|
+
"onClick",
|
|
2125
|
+
"onPointermove"
|
|
2126
|
+
], or = ["data-icon-variant"], sr = { class: "t-command-palette__item-label" }, cr = { class: "t-command-palette__item-title" }, lr = {
|
|
2127
|
+
key: 0,
|
|
2128
|
+
class: "t-command-palette__item-prefix"
|
|
2129
|
+
}, ur = { class: "t-command-palette__item-text" }, dr = {
|
|
2130
|
+
key: 0,
|
|
2131
|
+
class: "t-command-palette__item-suffix"
|
|
2132
|
+
}, fr = { class: "t-command-palette__item-trailing" }, pr = {
|
|
2133
|
+
key: 0,
|
|
2134
|
+
class: "t-command-palette__item-chip"
|
|
2135
|
+
}, mr = {
|
|
2136
|
+
key: 1,
|
|
2137
|
+
class: "t-command-palette__item-enter",
|
|
2138
|
+
"aria-hidden": "true"
|
|
2139
|
+
}, hr = {
|
|
2140
|
+
key: 1,
|
|
2141
|
+
class: "t-command-palette__empty"
|
|
2142
|
+
}, gr = {
|
|
2143
|
+
key: 1,
|
|
2144
|
+
class: "t-command-palette__footer"
|
|
2145
|
+
}, _r = /* @__PURE__ */ un(/* @__PURE__ */ d({
|
|
2146
|
+
name: "TCommandPalette",
|
|
2147
|
+
inheritAttrs: !1,
|
|
2148
|
+
__name: "TCommandPalette",
|
|
2149
|
+
props: /* @__PURE__ */ h({
|
|
2150
|
+
groups: { default: () => [] },
|
|
2151
|
+
open: { type: Boolean },
|
|
2152
|
+
searchTerm: {},
|
|
2153
|
+
searchDelay: { default: 0 },
|
|
2154
|
+
loading: { type: Boolean },
|
|
2155
|
+
placeholder: { default: "" },
|
|
2156
|
+
clearLabel: { default: "Clear search" },
|
|
2157
|
+
loadingLabel: { default: "Loading results" },
|
|
2158
|
+
autofocus: { type: Boolean }
|
|
2159
|
+
}, {
|
|
2160
|
+
open: {
|
|
2161
|
+
type: Boolean,
|
|
2162
|
+
default: !1
|
|
2163
|
+
},
|
|
2164
|
+
openModifiers: {},
|
|
2165
|
+
searchTerm: { default: "" },
|
|
2166
|
+
searchTermModifiers: {}
|
|
2167
|
+
}),
|
|
2168
|
+
emits: /* @__PURE__ */ h(["highlight", "select"], ["update:open", "update:searchTerm"]),
|
|
2169
|
+
setup(t, { emit: n }) {
|
|
2170
|
+
let i = n, d = re(t, "open"), f = re(t, "searchTerm"), p = r(() => t.autofocus ?? !0), m = Z(), { wrapperAttrs: h, controlAttrs: v } = Gn(), S = ne(), w = `${S}-input`, ee = `${S}-listbox`, te = (e) => `${S}-group-${e}`, A = (e, t) => `${S}-option-${e}-${t}`, M = T(), P = T(), ie = T(), F = T("");
|
|
2171
|
+
j(f, (e) => {
|
|
2172
|
+
e !== F.value && (F.value = e);
|
|
2173
|
+
}, { immediate: !0 });
|
|
2174
|
+
let ae = (e) => {
|
|
2175
|
+
f.value = e;
|
|
2176
|
+
}, oe, se = () => {
|
|
2177
|
+
clearTimeout(oe), oe = setTimeout(() => ae(F.value), t.searchDelay);
|
|
2178
|
+
};
|
|
2179
|
+
b(() => clearTimeout(oe));
|
|
2180
|
+
let ce = (e) => {
|
|
2181
|
+
F.value = e.target.value, t.searchDelay > 0 ? se() : ae(F.value);
|
|
2182
|
+
}, le = r(() => t.groups.map((e) => ({
|
|
2183
|
+
...e,
|
|
2184
|
+
items: e.postFilter ? e.postFilter(f.value, e.items) : e.items
|
|
2185
|
+
}))), ue = r(() => t.loading ? [] : le.value), de = r(() => {
|
|
2186
|
+
let e = [];
|
|
2187
|
+
return ue.value.forEach((t, n) => {
|
|
2188
|
+
let r = e.at(-1);
|
|
2189
|
+
if (t.section && r?.section?.id === t.section.id) {
|
|
2190
|
+
r.entries.push({
|
|
2191
|
+
group: t,
|
|
2192
|
+
index: n
|
|
2193
|
+
}), r.section.label ??= t.section.label;
|
|
2194
|
+
return;
|
|
2195
|
+
}
|
|
2196
|
+
e.push({
|
|
2197
|
+
key: `${t.section?.id ?? t.id}-${n}`,
|
|
2198
|
+
section: t.section ? { ...t.section } : void 0,
|
|
2199
|
+
entries: [{
|
|
2200
|
+
group: t,
|
|
2201
|
+
index: n
|
|
2202
|
+
}]
|
|
2203
|
+
});
|
|
2204
|
+
}), e;
|
|
2205
|
+
}), fe = (e) => `${S}-section-${e}`, pe = [
|
|
2206
|
+
{
|
|
2207
|
+
id: "a",
|
|
2208
|
+
rows: [
|
|
2209
|
+
0,
|
|
2210
|
+
1,
|
|
2211
|
+
2
|
|
2212
|
+
]
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
id: "b",
|
|
2216
|
+
rows: [0, 1]
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
id: "c",
|
|
2220
|
+
rows: [0, 1]
|
|
2221
|
+
}
|
|
2222
|
+
], me = [
|
|
2223
|
+
42,
|
|
2224
|
+
56,
|
|
2225
|
+
68
|
|
2226
|
+
], he = [
|
|
2227
|
+
24,
|
|
2228
|
+
32,
|
|
2229
|
+
38
|
|
2230
|
+
], ge = (e) => me[e % 3], _e = (e) => he[e % 3], I = r(() => ue.value.flatMap((e, t) => e.items.map((n, r) => ({
|
|
2231
|
+
item: n,
|
|
2232
|
+
group: e,
|
|
2233
|
+
groupIndex: t,
|
|
2234
|
+
itemIndex: r
|
|
2235
|
+
})))), L = r(() => I.value.length === 0), R = T(-1), z = r(() => I.value[R.value]), B = r(() => z.value ? A(z.value.groupIndex, z.value.itemIndex) : void 0), ve = (e) => !!e && !e.item.disabled, V = (e, t) => {
|
|
2236
|
+
let n = I.value.length;
|
|
2237
|
+
if (n === 0) return -1;
|
|
2238
|
+
for (let r = 0; r < n; r += 1) {
|
|
2239
|
+
let i = ((e + t * r) % n + n) % n;
|
|
2240
|
+
if (ve(I.value[i])) return i;
|
|
2241
|
+
}
|
|
2242
|
+
return -1;
|
|
2243
|
+
}, ye = async () => {
|
|
2244
|
+
await _(), B.value && ie.value?.querySelector(`[id="${B.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
2245
|
+
}, be = (e) => {
|
|
2246
|
+
e !== R.value && (e !== -1 && !ve(I.value[e]) || (R.value = e, i("highlight", z.value?.item, z.value?.group), ye()));
|
|
2247
|
+
}, xe = (e) => {
|
|
2248
|
+
let t = V(R.value === -1 ? e > 0 ? 0 : I.value.length - 1 : R.value + e, e);
|
|
2249
|
+
t !== -1 && be(t);
|
|
2250
|
+
}, Se = (e) => {
|
|
2251
|
+
e.item.disabled || (e.item.onSelect?.(), i("select", e.item, e.group), e.group?.keepOpenOnSelect || (d.value = !1));
|
|
2252
|
+
}, Ce = (e) => {
|
|
2253
|
+
switch (e.key) {
|
|
2254
|
+
case "ArrowDown":
|
|
2255
|
+
e.preventDefault(), xe(1);
|
|
2256
|
+
break;
|
|
2257
|
+
case "ArrowUp":
|
|
2258
|
+
e.preventDefault(), xe(-1);
|
|
2259
|
+
break;
|
|
2260
|
+
case "Home":
|
|
2261
|
+
e.preventDefault(), be(V(0, 1));
|
|
2262
|
+
break;
|
|
2263
|
+
case "End":
|
|
2264
|
+
e.preventDefault(), be(V(I.value.length - 1, -1));
|
|
2265
|
+
break;
|
|
2266
|
+
case "Enter":
|
|
2267
|
+
z.value && (e.preventDefault(), Se(z.value));
|
|
2268
|
+
break;
|
|
2269
|
+
case "Escape":
|
|
2270
|
+
d.value = !1;
|
|
2271
|
+
break;
|
|
2272
|
+
default: break;
|
|
2273
|
+
}
|
|
2274
|
+
};
|
|
2275
|
+
j(I, () => {
|
|
2276
|
+
R.value = V(0, 1), i("highlight", z.value?.item, z.value?.group), ye();
|
|
2277
|
+
});
|
|
2278
|
+
let we = async () => {
|
|
2279
|
+
let e = M.value;
|
|
2280
|
+
e && (d.value ? (e.open || e.showModal(), await _(), p.value && P.value?.focus(), ye()) : e.open && e.close());
|
|
2281
|
+
};
|
|
2282
|
+
j(d, (e) => {
|
|
2283
|
+
e && (R.value = V(0, 1)), we();
|
|
2284
|
+
}, { immediate: !0 }), x(we);
|
|
2285
|
+
let Te = () => {
|
|
2286
|
+
d.value = !1;
|
|
2287
|
+
}, Ee = (e) => {
|
|
2288
|
+
e.target === M.value && (d.value = !1);
|
|
2289
|
+
}, De = () => {
|
|
2290
|
+
F.value = "", ae(""), P.value?.focus();
|
|
2291
|
+
}, Oe = (e) => `${m.value.iconSet}:${e}`, ke = (e) => typeof e == "string" ? e : void 0;
|
|
2292
|
+
return (n, r) => (C(), s("dialog", g({
|
|
2293
|
+
ref_key: "dialogRef",
|
|
2294
|
+
ref: M
|
|
2295
|
+
}, k(h), {
|
|
2296
|
+
class: "t-command-palette",
|
|
2297
|
+
"data-loading": t.loading || void 0,
|
|
2298
|
+
"data-empty": L.value && !t.loading || void 0,
|
|
2299
|
+
onClose: Te,
|
|
2300
|
+
onClick: Ee
|
|
2301
|
+
}), [c("div", qn, [
|
|
2302
|
+
c("div", Jn, [
|
|
2303
|
+
u(k(N), {
|
|
2304
|
+
icon: Oe("magnifying-glass"),
|
|
2305
|
+
class: "t-command-palette__search-icon",
|
|
2306
|
+
"aria-hidden": "true"
|
|
2307
|
+
}, null, 8, ["icon"]),
|
|
2308
|
+
c("input", g({
|
|
2309
|
+
id: w,
|
|
2310
|
+
ref_key: "inputRef",
|
|
2311
|
+
ref: P
|
|
2312
|
+
}, k(v), {
|
|
2313
|
+
class: "t-command-palette__input",
|
|
2314
|
+
type: "text",
|
|
2315
|
+
role: "combobox",
|
|
2316
|
+
autocomplete: "off",
|
|
2317
|
+
autocorrect: "off",
|
|
2318
|
+
spellcheck: "false",
|
|
2319
|
+
"aria-autocomplete": "list",
|
|
2320
|
+
"aria-label": n.$attrs["aria-label"] ?? t.placeholder ?? void 0,
|
|
2321
|
+
"aria-expanded": d.value && !L.value,
|
|
2322
|
+
"aria-controls": ee,
|
|
2323
|
+
"aria-activedescendant": B.value,
|
|
2324
|
+
placeholder: t.placeholder,
|
|
2325
|
+
value: F.value,
|
|
2326
|
+
onInput: ce,
|
|
2327
|
+
onKeydown: Ce
|
|
2328
|
+
}), null, 16, Yn),
|
|
2329
|
+
c("button", {
|
|
2330
|
+
type: "button",
|
|
2331
|
+
class: "t-command-palette__clear",
|
|
2332
|
+
"data-hidden": !F.value || void 0,
|
|
2333
|
+
"aria-label": t.clearLabel,
|
|
2334
|
+
onClick: De
|
|
2335
|
+
}, [u(k(N), {
|
|
2336
|
+
icon: Oe("x-mark"),
|
|
2337
|
+
"aria-hidden": "true"
|
|
2338
|
+
}, null, 8, ["icon"])], 8, Xn),
|
|
2339
|
+
c("kbd", {
|
|
2340
|
+
class: "t-command-palette__esc",
|
|
2341
|
+
"aria-hidden": "true"
|
|
2342
|
+
}, O("ESC"))
|
|
2343
|
+
]),
|
|
2344
|
+
t.loading ? (C(), s("p", Zn, O(t.loadingLabel), 1)) : o("", !0),
|
|
2345
|
+
c("div", {
|
|
2346
|
+
id: ee,
|
|
2347
|
+
ref_key: "listRef",
|
|
2348
|
+
ref: ie,
|
|
2349
|
+
class: "t-command-palette__list",
|
|
2350
|
+
role: L.value ? void 0 : "listbox",
|
|
2351
|
+
"aria-labelledby": L.value ? void 0 : w,
|
|
2352
|
+
"aria-busy": t.loading || void 0
|
|
2353
|
+
}, [
|
|
2354
|
+
t.loading ? (C(), s("div", $n, [(C(), s(e, null, E(pe, (t) => c("div", {
|
|
2355
|
+
key: t.id,
|
|
2356
|
+
class: "t-command-palette__group"
|
|
2357
|
+
}, [r[1] ||= c("div", { class: "t-command-palette__skeleton-label" }, null, -1), (C(!0), s(e, null, E(t.rows, (e) => (C(), s("div", {
|
|
2358
|
+
key: e,
|
|
2359
|
+
class: "t-command-palette__skeleton-row"
|
|
2360
|
+
}, [r[0] ||= c("span", { class: "t-command-palette__skeleton-box" }, null, -1), c("span", er, [c("span", {
|
|
2361
|
+
class: "t-command-palette__skeleton-title",
|
|
2362
|
+
style: y({ width: `${ge(e)}%` })
|
|
2363
|
+
}, null, 4), c("span", {
|
|
2364
|
+
class: "t-command-palette__skeleton-suffix",
|
|
2365
|
+
style: y({ width: `${_e(e)}%` })
|
|
2366
|
+
}, null, 4)])]))), 128))])), 64))])) : o("", !0),
|
|
2367
|
+
(C(!0), s(e, null, E(de.value, (t) => (C(), s("div", {
|
|
2368
|
+
key: t.key,
|
|
2369
|
+
class: "t-command-palette__section",
|
|
2370
|
+
role: t.section ? "group" : "presentation",
|
|
2371
|
+
"data-section": t.section?.id,
|
|
2372
|
+
"aria-labelledby": t.section && (t.section.label || n.$slots["section-label"]) ? fe(t.entries[0].index) : void 0
|
|
2373
|
+
}, [t.section && (t.section.label || n.$slots["section-label"]) ? (C(), s("div", {
|
|
2374
|
+
key: 0,
|
|
2375
|
+
id: fe(t.entries[0].index),
|
|
2376
|
+
class: "t-command-palette__section-label"
|
|
2377
|
+
}, [D(n.$slots, "section-label", {
|
|
2378
|
+
section: t.section,
|
|
2379
|
+
groups: t.entries.map((e) => e.group)
|
|
2380
|
+
}, () => [l(O(t.section.label), 1)], !0)], 8, nr)) : o("", !0), (C(!0), s(e, null, E(t.entries, ({ group: t, index: r }) => (C(), s("div", {
|
|
2381
|
+
key: t.id,
|
|
2382
|
+
class: "t-command-palette__group",
|
|
2383
|
+
role: "group",
|
|
2384
|
+
"data-group": t.id,
|
|
2385
|
+
"aria-labelledby": t.label || n.$slots["group-label"] ? te(r) : void 0
|
|
2386
|
+
}, [t.label || n.$slots["group-label"] ? (C(), s("div", {
|
|
2387
|
+
key: 0,
|
|
2388
|
+
id: te(r),
|
|
2389
|
+
class: "t-command-palette__group-label"
|
|
2390
|
+
}, [D(n.$slots, "group-label", {
|
|
2391
|
+
group: t,
|
|
2392
|
+
index: r
|
|
2393
|
+
}, () => [l(O(t.label), 1)], !0)], 8, ir)) : o("", !0), (C(!0), s(e, null, E(t.items, (i, u) => (C(), s("div", {
|
|
2394
|
+
id: A(r, u),
|
|
2395
|
+
key: A(r, u),
|
|
2396
|
+
class: "t-command-palette__item",
|
|
2397
|
+
role: "option",
|
|
2398
|
+
"aria-label": i.label,
|
|
2399
|
+
"aria-selected": A(r, u) === B.value,
|
|
2400
|
+
"aria-disabled": i.disabled || void 0,
|
|
2401
|
+
"data-highlighted": A(r, u) === B.value || void 0,
|
|
2402
|
+
"data-active": i.active || void 0,
|
|
2403
|
+
"data-disabled": i.disabled || void 0,
|
|
2404
|
+
onClick: (e) => Se({
|
|
2405
|
+
item: i,
|
|
2406
|
+
group: t,
|
|
2407
|
+
groupIndex: r,
|
|
2408
|
+
itemIndex: u
|
|
2409
|
+
}),
|
|
2410
|
+
onPointermove: (e) => be(I.value.findIndex((e) => e.groupIndex === r && e.itemIndex === u))
|
|
2411
|
+
}, [D(n.$slots, "item", {
|
|
2412
|
+
item: i,
|
|
2413
|
+
group: t,
|
|
2414
|
+
active: A(r, u) === B.value
|
|
2415
|
+
}, () => [
|
|
2416
|
+
c("span", {
|
|
2417
|
+
class: "t-command-palette__item-leading",
|
|
2418
|
+
"data-icon-variant": i.iconVariant ?? "tile"
|
|
2419
|
+
}, [D(n.$slots, "item-leading", {
|
|
2420
|
+
item: i,
|
|
2421
|
+
group: t,
|
|
2422
|
+
active: A(r, u) === B.value
|
|
2423
|
+
}, () => [i.icon ? (C(), a(k(N), {
|
|
2424
|
+
key: 0,
|
|
2425
|
+
icon: Oe(i.icon),
|
|
2426
|
+
"aria-hidden": "true"
|
|
2427
|
+
}, null, 8, ["icon"])) : o("", !0)], !0)], 8, or),
|
|
2428
|
+
c("span", sr, [D(n.$slots, "item-label", {
|
|
2429
|
+
item: i,
|
|
2430
|
+
group: t,
|
|
2431
|
+
active: A(r, u) === B.value
|
|
2432
|
+
}, () => [c("span", cr, [i.prefix ? (C(), s("span", lr, O(i.prefix), 1)) : o("", !0), c("span", ur, [D(n.$slots, "item-text", {
|
|
2433
|
+
item: i,
|
|
2434
|
+
group: t,
|
|
2435
|
+
active: A(r, u) === B.value
|
|
2436
|
+
}, () => [l(O(i.label), 1)], !0)])]), i.suffix || n.$slots["item-suffix"] ? (C(), s("span", dr, [D(n.$slots, "item-suffix", {
|
|
2437
|
+
item: i,
|
|
2438
|
+
group: t,
|
|
2439
|
+
active: A(r, u) === B.value
|
|
2440
|
+
}, () => [l(O(i.suffix), 1)], !0)])) : o("", !0)], !0)]),
|
|
2441
|
+
c("span", fr, [D(n.$slots, "item-trailing", {
|
|
2442
|
+
item: i,
|
|
2443
|
+
group: t,
|
|
2444
|
+
active: A(r, u) === B.value
|
|
2445
|
+
}, () => [
|
|
2446
|
+
ke(i.chip) ? (C(), s("span", pr, O(ke(i.chip)), 1)) : o("", !0),
|
|
2447
|
+
(C(!0), s(e, null, E(i.kbds, (e) => (C(), s("kbd", {
|
|
2448
|
+
key: e,
|
|
2449
|
+
class: "t-command-palette__item-kbd"
|
|
2450
|
+
}, O(e), 1))), 128)),
|
|
2451
|
+
A(r, u) === B.value && !i.kbds?.length ? (C(), s("span", mr, O("↵"))) : o("", !0)
|
|
2452
|
+
], !0)])
|
|
2453
|
+
], !0)], 40, ar))), 128))], 8, rr))), 128))], 8, tr))), 128)),
|
|
2454
|
+
L.value && !t.loading ? (C(), s("div", hr, [D(n.$slots, "empty", { searchTerm: f.value }, void 0, !0)])) : o("", !0)
|
|
2455
|
+
], 8, Qn),
|
|
2456
|
+
n.$slots.footer ? (C(), s("div", gr, [D(n.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
2457
|
+
])], 16, Kn));
|
|
2458
|
+
}
|
|
2459
|
+
}), [["__scopeId", "data-v-e95fc3d0"]]), vr = () => {
|
|
2460
|
+
let e = Z();
|
|
2461
|
+
return r(() => P({
|
|
2089
2462
|
"&, & > *": {
|
|
2090
2463
|
margin: 0,
|
|
2091
2464
|
padding: 0,
|
|
@@ -2156,7 +2529,7 @@ var Pn = {
|
|
|
2156
2529
|
zIndex: 45
|
|
2157
2530
|
}
|
|
2158
2531
|
}));
|
|
2159
|
-
},
|
|
2532
|
+
}, yr = { size: "medium" }, br = /* @__PURE__ */ d({
|
|
2160
2533
|
name: "TModal",
|
|
2161
2534
|
props: {
|
|
2162
2535
|
open: Boolean,
|
|
@@ -2166,8 +2539,8 @@ var Pn = {
|
|
|
2166
2539
|
nonBlocking: Boolean
|
|
2167
2540
|
},
|
|
2168
2541
|
emits: ["close", "cancel"],
|
|
2169
|
-
setup(e, { slots: t, attrs:
|
|
2170
|
-
let o =
|
|
2542
|
+
setup(e, { slots: t, attrs: n, emit: i, expose: a }) {
|
|
2543
|
+
let o = r(() => U({}, yr, e, n)), s = T(o.value.open), c = vr(), l = r(() => [
|
|
2171
2544
|
c.value,
|
|
2172
2545
|
`${c.value}--${o.value.size}`,
|
|
2173
2546
|
{
|
|
@@ -2175,20 +2548,20 @@ var Pn = {
|
|
|
2175
2548
|
[`${c.value}--active`]: s.value,
|
|
2176
2549
|
[`${c.value}--non-blocking`]: o.value.nonBlocking
|
|
2177
2550
|
}
|
|
2178
|
-
]), d =
|
|
2551
|
+
]), d = T(null), f = () => {
|
|
2179
2552
|
s.value = !0, o.value.nonBlocking ? d.value?.show() : d.value?.showModal();
|
|
2180
2553
|
}, p = () => {
|
|
2181
2554
|
s.value = !1, d.value?.close();
|
|
2182
2555
|
};
|
|
2183
|
-
|
|
2556
|
+
j([() => o.value.open, d], () => {
|
|
2184
2557
|
d.value && o.value.open ? f() : p();
|
|
2185
2558
|
}, { immediate: !0 });
|
|
2186
2559
|
let m = (e) => {
|
|
2187
2560
|
o.value.open ? e.preventDefault() : s.value = !1, i("cancel");
|
|
2188
2561
|
};
|
|
2189
|
-
|
|
2562
|
+
x(() => {
|
|
2190
2563
|
d.value && d.value.addEventListener("cancel", m);
|
|
2191
|
-
}),
|
|
2564
|
+
}), S(() => {
|
|
2192
2565
|
d.value && d.value.removeEventListener("cancel", m);
|
|
2193
2566
|
});
|
|
2194
2567
|
let h = () => {
|
|
@@ -2200,38 +2573,38 @@ var Pn = {
|
|
|
2200
2573
|
showModal: f,
|
|
2201
2574
|
close: p
|
|
2202
2575
|
});
|
|
2203
|
-
let _ =
|
|
2204
|
-
|
|
2576
|
+
let _ = T(0);
|
|
2577
|
+
j(s, () => {
|
|
2205
2578
|
!s.value && o.value.destroyOnClose && (_.value += 1);
|
|
2206
2579
|
});
|
|
2207
|
-
let v = () =>
|
|
2580
|
+
let v = () => u("dialog", {
|
|
2208
2581
|
ref: d,
|
|
2209
|
-
class:
|
|
2582
|
+
class: l.value,
|
|
2210
2583
|
"aria-labelledby": "modal-header",
|
|
2211
2584
|
"aria-describedby": "modal-body",
|
|
2212
2585
|
"aria-modal": "true",
|
|
2213
2586
|
onClick: g,
|
|
2214
2587
|
key: _.value
|
|
2215
2588
|
}, [
|
|
2216
|
-
t.header &&
|
|
2589
|
+
t.header && u("div", {
|
|
2217
2590
|
id: "modal-header",
|
|
2218
2591
|
class: `${c.value}__header`
|
|
2219
|
-
}, [t.header(), o.value.featured &&
|
|
2592
|
+
}, [t.header(), o.value.featured && u("button", {
|
|
2220
2593
|
class: `${c.value}__close-button`,
|
|
2221
2594
|
onClick: h,
|
|
2222
2595
|
"aria-label": "Close"
|
|
2223
|
-
}, [
|
|
2224
|
-
(t.body || t.default) &&
|
|
2596
|
+
}, [u(Q, { icon: "x-mark" }, null)])]),
|
|
2597
|
+
(t.body || t.default) && u("div", {
|
|
2225
2598
|
id: "modal-body",
|
|
2226
2599
|
class: `${c.value}__body`
|
|
2227
2600
|
}, [(t.body ?? t.default)?.()]),
|
|
2228
|
-
t.footer &&
|
|
2601
|
+
t.footer && u("div", { class: `${c.value}__footer` }, [t.footer()])
|
|
2229
2602
|
]);
|
|
2230
|
-
return o.value.nonBlocking ? () =>
|
|
2603
|
+
return o.value.nonBlocking ? () => u("div", null, [o.value.nonBlocking && s.value && u("div", { class: `${c.value}__backdrop` }, null), u(v, null, null)]) : () => u(v, null, null);
|
|
2231
2604
|
}
|
|
2232
|
-
}),
|
|
2233
|
-
let t =
|
|
2234
|
-
return
|
|
2605
|
+
}), xr = (e) => {
|
|
2606
|
+
let t = Z();
|
|
2607
|
+
return r(() => P({
|
|
2235
2608
|
margin: 0,
|
|
2236
2609
|
padding: 0,
|
|
2237
2610
|
boxSizing: "border-box",
|
|
@@ -2304,7 +2677,7 @@ var Pn = {
|
|
|
2304
2677
|
"&--normal": { fontStyle: "normal" },
|
|
2305
2678
|
"&--italic": { fontStyle: "italic" }
|
|
2306
2679
|
}));
|
|
2307
|
-
},
|
|
2680
|
+
}, Sr = {
|
|
2308
2681
|
h1: "h1",
|
|
2309
2682
|
h2: "h2",
|
|
2310
2683
|
h3: "h3",
|
|
@@ -2320,13 +2693,13 @@ var Pn = {
|
|
|
2320
2693
|
b4: "p",
|
|
2321
2694
|
b5: "p",
|
|
2322
2695
|
b6: "p"
|
|
2323
|
-
},
|
|
2696
|
+
}, Cr = [
|
|
2324
2697
|
"http:",
|
|
2325
2698
|
"https:",
|
|
2326
2699
|
"mailto:",
|
|
2327
2700
|
"tel:",
|
|
2328
2701
|
"ftp:"
|
|
2329
|
-
],
|
|
2702
|
+
], wr = (e) => Cr.some((t) => e.trim().toLowerCase().startsWith(t)), Tr = (e) => {
|
|
2330
2703
|
let t = [
|
|
2331
2704
|
{
|
|
2332
2705
|
regex: /\*\*([\s\S]+?)\*\*/g,
|
|
@@ -2350,88 +2723,92 @@ var Pn = {
|
|
|
2350
2723
|
url: a ? t[2]?.trim() : void 0
|
|
2351
2724
|
});
|
|
2352
2725
|
return n;
|
|
2353
|
-
},
|
|
2726
|
+
}, Er = (e) => {
|
|
2354
2727
|
let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end), n = [], r = 0;
|
|
2355
2728
|
for (let e of t) e.start >= r && (n.push(e), r = e.end);
|
|
2356
2729
|
return n;
|
|
2357
|
-
},
|
|
2730
|
+
}, Dr = (e) => {
|
|
2358
2731
|
if (!e) return [e];
|
|
2359
|
-
let t =
|
|
2732
|
+
let t = Tr(e);
|
|
2360
2733
|
if (t.length === 0) return [e];
|
|
2361
|
-
let n =
|
|
2734
|
+
let n = Er(t), r = [], i = 0;
|
|
2362
2735
|
for (let t of n) {
|
|
2363
2736
|
t.start > i && r.push(e.substring(i, t.start));
|
|
2364
|
-
let n =
|
|
2365
|
-
t.tag === "a" ? t.url &&
|
|
2737
|
+
let n = Dr(t.content);
|
|
2738
|
+
t.tag === "a" ? t.url && wr(t.url) ? r.push(f("a", {
|
|
2366
2739
|
href: t.url,
|
|
2367
2740
|
target: "_blank",
|
|
2368
2741
|
rel: "noopener noreferrer"
|
|
2369
|
-
}, n)) : r.push(...n) : r.push(
|
|
2742
|
+
}, n)) : r.push(...n) : r.push(f(t.tag, n)), i = t.end;
|
|
2370
2743
|
}
|
|
2371
2744
|
return i < e.length && r.push(e.substring(i)), r.length > 0 ? r : [e];
|
|
2372
|
-
},
|
|
2373
|
-
if (e.type ===
|
|
2745
|
+
}, Or = (e) => typeof e == "object" && !!e && "type" in e && e.type !== void 0, kr = (e) => {
|
|
2746
|
+
if (e.type === n) return Dr(typeof e.children == "string" ? e.children : "");
|
|
2374
2747
|
if (!e.children) return e;
|
|
2375
|
-
let
|
|
2376
|
-
if (Array.isArray(e.children))
|
|
2377
|
-
if (typeof e == "string") return
|
|
2378
|
-
if (
|
|
2379
|
-
let t =
|
|
2748
|
+
let t;
|
|
2749
|
+
if (Array.isArray(e.children)) t = e.children.flatMap((e) => {
|
|
2750
|
+
if (typeof e == "string") return Dr(e);
|
|
2751
|
+
if (Or(e)) {
|
|
2752
|
+
let t = kr(e);
|
|
2380
2753
|
return Array.isArray(t) ? t : [t];
|
|
2381
2754
|
}
|
|
2382
2755
|
return [];
|
|
2383
2756
|
});
|
|
2384
|
-
else if (typeof e.children == "string")
|
|
2385
|
-
else if (
|
|
2386
|
-
let
|
|
2387
|
-
|
|
2757
|
+
else if (typeof e.children == "string") t = Dr(e.children);
|
|
2758
|
+
else if (Or(e.children)) {
|
|
2759
|
+
let n = kr(e.children);
|
|
2760
|
+
t = Array.isArray(n) ? n : [n];
|
|
2388
2761
|
} else return e;
|
|
2389
|
-
return
|
|
2390
|
-
},
|
|
2391
|
-
if (typeof e == "string") return
|
|
2762
|
+
return f(e.type, { ...e.props }, t);
|
|
2763
|
+
}, Ar = (e) => {
|
|
2764
|
+
if (typeof e == "string") return Dr(e);
|
|
2392
2765
|
if (Array.isArray(e)) return e.flatMap((e) => {
|
|
2393
|
-
if (typeof e == "string") return
|
|
2394
|
-
if (
|
|
2395
|
-
let t =
|
|
2766
|
+
if (typeof e == "string") return Dr(e);
|
|
2767
|
+
if (Or(e)) {
|
|
2768
|
+
let t = kr(e);
|
|
2396
2769
|
return Array.isArray(t) ? t : [t];
|
|
2397
2770
|
}
|
|
2398
2771
|
return [e];
|
|
2399
2772
|
});
|
|
2400
|
-
if (
|
|
2401
|
-
let t =
|
|
2773
|
+
if (Or(e)) {
|
|
2774
|
+
let t = kr(e);
|
|
2402
2775
|
return Array.isArray(t) ? t : [t];
|
|
2403
2776
|
}
|
|
2404
2777
|
return [e];
|
|
2405
|
-
},
|
|
2778
|
+
}, jr = {
|
|
2406
2779
|
fontStyle: "normal",
|
|
2407
2780
|
fontWeight: "regular",
|
|
2408
2781
|
variant: "b0",
|
|
2409
2782
|
color: "#373737"
|
|
2410
|
-
}, $ = /* @__PURE__ */
|
|
2783
|
+
}, $ = /* @__PURE__ */ d({
|
|
2411
2784
|
name: "TTypography",
|
|
2412
2785
|
props: {
|
|
2413
2786
|
fontStyle: String,
|
|
2414
2787
|
fontWeight: String,
|
|
2415
2788
|
variant: String,
|
|
2416
2789
|
as: String,
|
|
2417
|
-
color: String
|
|
2790
|
+
color: String,
|
|
2791
|
+
parseMarkdown: {
|
|
2792
|
+
type: Boolean,
|
|
2793
|
+
default: void 0
|
|
2794
|
+
}
|
|
2418
2795
|
},
|
|
2419
|
-
setup(e, { attrs: t, slots:
|
|
2420
|
-
let i =
|
|
2796
|
+
setup(e, { attrs: t, slots: n }) {
|
|
2797
|
+
let i = r(() => U({}, jr, e, t)), a = Z(), o = xr(r(() => he(a.value.colors, i.value.color) || a.value.typography.color).value), s = r(() => [
|
|
2421
2798
|
o.value,
|
|
2422
2799
|
`${o.value}--${i.value.variant}`,
|
|
2423
2800
|
`${o.value}--${i.value.fontWeight}`,
|
|
2424
2801
|
`${o.value}--${i.value.fontStyle}`
|
|
2425
|
-
]), c =
|
|
2802
|
+
]), c = r(() => i.value.as || Sr[i.value.variant]), l = r(() => i.value.parseMarkdown ?? a.value.parseMarkdown);
|
|
2426
2803
|
return () => {
|
|
2427
|
-
let e =
|
|
2428
|
-
if (!e) return
|
|
2429
|
-
if (!
|
|
2430
|
-
let t =
|
|
2431
|
-
return
|
|
2804
|
+
let e = n.default?.();
|
|
2805
|
+
if (!e) return f(c.value, { class: s.value });
|
|
2806
|
+
if (!l.value) return f(c.value, { class: s.value }, e);
|
|
2807
|
+
let t = Ar(e);
|
|
2808
|
+
return f(c.value, { class: s.value }, t);
|
|
2432
2809
|
};
|
|
2433
2810
|
}
|
|
2434
|
-
}),
|
|
2811
|
+
}), Mr = () => r(() => P({
|
|
2435
2812
|
"& > [class$=\"__body\"]": { paddingBlock: 0 },
|
|
2436
2813
|
"&__body": {
|
|
2437
2814
|
display: "flex",
|
|
@@ -2444,16 +2821,16 @@ var Pn = {
|
|
|
2444
2821
|
width: "3.5rem",
|
|
2445
2822
|
height: "auto"
|
|
2446
2823
|
}
|
|
2447
|
-
})),
|
|
2824
|
+
})), Nr = {
|
|
2448
2825
|
cancelText: "Cancel",
|
|
2449
2826
|
confirmText: "OK"
|
|
2450
|
-
},
|
|
2827
|
+
}, Pr = /* @__PURE__ */ d({
|
|
2451
2828
|
name: "TDialog",
|
|
2452
2829
|
components: {
|
|
2453
2830
|
TTypography: $,
|
|
2454
|
-
TModal:
|
|
2455
|
-
TButton:
|
|
2456
|
-
TIcon:
|
|
2831
|
+
TModal: br,
|
|
2832
|
+
TButton: hn,
|
|
2833
|
+
TIcon: Q
|
|
2457
2834
|
},
|
|
2458
2835
|
props: {
|
|
2459
2836
|
title: {
|
|
@@ -2477,67 +2854,59 @@ var Pn = {
|
|
|
2477
2854
|
"close"
|
|
2478
2855
|
],
|
|
2479
2856
|
setup(e, { emit: t }) {
|
|
2480
|
-
let
|
|
2481
|
-
if (
|
|
2857
|
+
let n = r(() => U({}, Nr, e)), i = Mr(), a = r(() => {
|
|
2858
|
+
if (n.value.color) return n.value.color === "primary" ? "primary.main" : fn(n.value.color);
|
|
2482
2859
|
});
|
|
2483
|
-
return () =>
|
|
2484
|
-
onClose: () =>
|
|
2485
|
-
onCancel: () =>
|
|
2860
|
+
return () => f(br, {
|
|
2861
|
+
onClose: () => n.value.cancellable && t("close"),
|
|
2862
|
+
onCancel: () => n.value.cancellable && t("cancel"),
|
|
2486
2863
|
onConfirm: () => t("confirm"),
|
|
2487
2864
|
class: i.value,
|
|
2488
2865
|
open: !0,
|
|
2489
|
-
size:
|
|
2866
|
+
size: n.value.size
|
|
2490
2867
|
}, {
|
|
2491
|
-
header: () =>
|
|
2868
|
+
header: () => f($, {
|
|
2492
2869
|
variant: "s2",
|
|
2493
2870
|
fontWeight: "semibold"
|
|
2494
|
-
}, () =>
|
|
2495
|
-
default: () =>
|
|
2871
|
+
}, () => n.value.title),
|
|
2872
|
+
default: () => f("div", { class: `${i.value}__body` }, [n.value.icon ? f(Q, {
|
|
2496
2873
|
class: `${i.value}__body-icon`,
|
|
2497
2874
|
variant: "solid",
|
|
2498
2875
|
color: a.value,
|
|
2499
|
-
icon:
|
|
2500
|
-
}) : void 0,
|
|
2876
|
+
icon: n.value.icon
|
|
2877
|
+
}) : void 0, f($, {
|
|
2501
2878
|
class: `${i.value}__body-text`,
|
|
2502
2879
|
variant: "b1",
|
|
2503
|
-
innerHTML:
|
|
2880
|
+
innerHTML: n.value.message
|
|
2504
2881
|
})]),
|
|
2505
|
-
footer: () => [
|
|
2882
|
+
footer: () => [n.value.cancellable ? f(hn, {
|
|
2506
2883
|
onClick: () => t("cancel"),
|
|
2507
|
-
color:
|
|
2884
|
+
color: n.value.color,
|
|
2508
2885
|
variant: "secondary"
|
|
2509
|
-
}, () =>
|
|
2886
|
+
}, () => n.value.cancelText) : void 0, f(hn, {
|
|
2510
2887
|
onClick: () => t("confirm"),
|
|
2511
|
-
color:
|
|
2512
|
-
}, () =>
|
|
2888
|
+
color: n.value.color
|
|
2889
|
+
}, () => n.value.confirmText)]
|
|
2513
2890
|
});
|
|
2514
2891
|
}
|
|
2515
|
-
}),
|
|
2516
|
-
let e = new Set(["class", "style"]), t = ([t]) => e.has(t), r = ([e]) => /^on[A-Z]/.test(e), i = ee(), a = n(() => Object.entries(i).filter(([e]) => e !== "data-state")), o = n(() => Object.fromEntries(a.value.filter(t))), s = n(() => Object.fromEntries(a.value.filter(r))), c = n(() => Object.fromEntries(a.value.filter((e) => !t(e) && !r(e))));
|
|
2517
|
-
return {
|
|
2518
|
-
wrapperAttrs: o,
|
|
2519
|
-
controlAttrs: n(() => Object.fromEntries(a.value.filter((e) => !t(e)))),
|
|
2520
|
-
staticAttrs: c,
|
|
2521
|
-
listenerAttrs: s
|
|
2522
|
-
};
|
|
2523
|
-
}, or = {
|
|
2892
|
+
}), Fr = {
|
|
2524
2893
|
key: 0,
|
|
2525
2894
|
class: "t-file-upload__label"
|
|
2526
|
-
},
|
|
2895
|
+
}, Ir = ["for"], Lr = { class: "t-file-upload__filename" }, Rr = ["aria-label", "disabled"], zr = [
|
|
2527
2896
|
"id",
|
|
2528
2897
|
"name",
|
|
2529
2898
|
"required",
|
|
2530
2899
|
"disabled",
|
|
2531
2900
|
"form",
|
|
2532
2901
|
"accept"
|
|
2533
|
-
],
|
|
2902
|
+
], Br = {
|
|
2534
2903
|
key: 4,
|
|
2535
2904
|
class: "t-file-upload__hints"
|
|
2536
|
-
},
|
|
2905
|
+
}, Vr = { key: 1 }, Hr = /* @__PURE__ */ un(/* @__PURE__ */ d({
|
|
2537
2906
|
name: "TFileUpload",
|
|
2538
2907
|
inheritAttrs: !1,
|
|
2539
2908
|
__name: "TFileUpload",
|
|
2540
|
-
props: /* @__PURE__ */
|
|
2909
|
+
props: /* @__PURE__ */ h({
|
|
2541
2910
|
label: {},
|
|
2542
2911
|
ctaText: { default: "Subir archivo" },
|
|
2543
2912
|
loadingText: { default: "Cargando archivo" },
|
|
@@ -2557,11 +2926,11 @@ var Pn = {
|
|
|
2557
2926
|
modelValue: { default: null },
|
|
2558
2927
|
modelModifiers: {}
|
|
2559
2928
|
}),
|
|
2560
|
-
emits: /* @__PURE__ */
|
|
2561
|
-
setup(e, { expose: t, emit:
|
|
2562
|
-
let
|
|
2929
|
+
emits: /* @__PURE__ */ h(["error"], ["update:modelValue"]),
|
|
2930
|
+
setup(e, { expose: t, emit: n }) {
|
|
2931
|
+
let i = n, d = re(e, "modelValue"), f = T(null), p = ne(), m = r(() => e.id ?? p), { wrapperAttrs: h, staticAttrs: _, listenerAttrs: v } = Gn(), y = r(() => e.loading ? "loading" : d.value ? "loaded" : "empty"), b = r(() => {
|
|
2563
2932
|
if (!(!e.accept || e.accept.length === 0)) return e.accept.map((e) => `.${e}`).join(",");
|
|
2564
|
-
}),
|
|
2933
|
+
}), S = r(() => y.value === "empty" && (!!e.formatsHint || !!e.maxSizeHint)), w = () => {
|
|
2565
2934
|
let e = f.value;
|
|
2566
2935
|
if (!e) return;
|
|
2567
2936
|
let t = d.value;
|
|
@@ -2575,7 +2944,7 @@ var Pn = {
|
|
|
2575
2944
|
n.items.add(t), e.files = n.files;
|
|
2576
2945
|
} catch {}
|
|
2577
2946
|
}
|
|
2578
|
-
},
|
|
2947
|
+
}, E = () => {
|
|
2579
2948
|
let t = f.value;
|
|
2580
2949
|
if (!t) return;
|
|
2581
2950
|
let n = t.files?.[0];
|
|
@@ -2583,96 +2952,96 @@ var Pn = {
|
|
|
2583
2952
|
if (e.accept?.length) {
|
|
2584
2953
|
let t = n.name.toLowerCase();
|
|
2585
2954
|
if (!e.accept.some((e) => t.endsWith(`.${e.toLowerCase()}`))) {
|
|
2586
|
-
|
|
2955
|
+
w(), i("error", "bad-format");
|
|
2587
2956
|
return;
|
|
2588
2957
|
}
|
|
2589
2958
|
}
|
|
2590
2959
|
if (e.maxSizeBytes !== void 0 && n.size > e.maxSizeBytes) {
|
|
2591
|
-
|
|
2960
|
+
w(), i("error", "too-large");
|
|
2592
2961
|
return;
|
|
2593
2962
|
}
|
|
2594
2963
|
d.value = n;
|
|
2595
2964
|
}
|
|
2596
|
-
},
|
|
2965
|
+
}, ee = () => {
|
|
2597
2966
|
e.disabled || (d.value = null);
|
|
2598
2967
|
};
|
|
2599
|
-
return
|
|
2968
|
+
return x(w), j(d, w), t({ inputRef: f }), (t, n) => (C(), a(k(F), g(k(h), {
|
|
2600
2969
|
as: e.as,
|
|
2601
2970
|
class: "t-file-upload",
|
|
2602
|
-
"data-state":
|
|
2971
|
+
"data-state": y.value,
|
|
2603
2972
|
"data-disabled": e.disabled || void 0
|
|
2604
2973
|
}), {
|
|
2605
|
-
default:
|
|
2606
|
-
e.label || t.$slots.label ? (
|
|
2974
|
+
default: M(() => [
|
|
2975
|
+
e.label || t.$slots.label ? (C(), s("div", Fr, [D(t.$slots, "label", {}, () => [u(k($), {
|
|
2607
2976
|
variant: "b3",
|
|
2608
2977
|
"font-weight": "semibold"
|
|
2609
2978
|
}, {
|
|
2610
|
-
default:
|
|
2979
|
+
default: M(() => [l(O(e.label), 1)]),
|
|
2611
2980
|
_: 1
|
|
2612
|
-
})], !0)])) :
|
|
2613
|
-
|
|
2981
|
+
})], !0)])) : o("", !0),
|
|
2982
|
+
y.value === "empty" ? (C(), s("label", g({ key: 1 }, k(v), {
|
|
2614
2983
|
class: "t-file-upload__box",
|
|
2615
2984
|
"data-state": "empty",
|
|
2616
2985
|
for: m.value
|
|
2617
|
-
}), [
|
|
2986
|
+
}), [u(k(Q), {
|
|
2618
2987
|
icon: "paper-clip",
|
|
2619
2988
|
size: "small",
|
|
2620
2989
|
color: "gray.main"
|
|
2621
|
-
}),
|
|
2990
|
+
}), u(k($), {
|
|
2622
2991
|
variant: "b3",
|
|
2623
2992
|
class: "t-file-upload__cta-text"
|
|
2624
2993
|
}, {
|
|
2625
|
-
default:
|
|
2994
|
+
default: M(() => [D(t.$slots, "cta", {}, () => [l(O(e.ctaText), 1)], !0)]),
|
|
2626
2995
|
_: 3
|
|
2627
|
-
})], 16,
|
|
2996
|
+
})], 16, Ir)) : y.value === "loading" ? (C(), s("div", g({ key: 2 }, k(v), {
|
|
2628
2997
|
class: "t-file-upload__box",
|
|
2629
2998
|
"data-state": "loading"
|
|
2630
|
-
}), [
|
|
2999
|
+
}), [u(k(Q), {
|
|
2631
3000
|
icon: "arrow-path",
|
|
2632
3001
|
size: "small",
|
|
2633
3002
|
color: "primary.main"
|
|
2634
|
-
}),
|
|
3003
|
+
}), u(k($), {
|
|
2635
3004
|
variant: "b3",
|
|
2636
3005
|
class: "t-file-upload__cta-text",
|
|
2637
3006
|
color: "primary.main"
|
|
2638
3007
|
}, {
|
|
2639
|
-
default:
|
|
3008
|
+
default: M(() => [D(t.$slots, "loading", {}, () => [l(O(e.loadingText), 1)], !0)]),
|
|
2640
3009
|
_: 3
|
|
2641
|
-
})], 16)) : (
|
|
3010
|
+
})], 16)) : (C(), s("div", g({ key: 3 }, k(v), {
|
|
2642
3011
|
class: "t-file-upload__box",
|
|
2643
3012
|
"data-state": "loaded"
|
|
2644
3013
|
}), [
|
|
2645
|
-
|
|
3014
|
+
u(k(Q), {
|
|
2646
3015
|
icon: "document",
|
|
2647
3016
|
size: "small",
|
|
2648
3017
|
color: "primary.main"
|
|
2649
3018
|
}),
|
|
2650
|
-
|
|
3019
|
+
c("div", Lr, [D(t.$slots, "file", { file: d.value }, () => [u(k($), {
|
|
2651
3020
|
variant: "b3",
|
|
2652
3021
|
color: "primary.main",
|
|
2653
3022
|
class: "t-file-upload__filename-text"
|
|
2654
3023
|
}, {
|
|
2655
|
-
default:
|
|
3024
|
+
default: M(() => [l(O(d.value.name), 1)]),
|
|
2656
3025
|
_: 1
|
|
2657
3026
|
})], !0)]),
|
|
2658
|
-
|
|
3027
|
+
c("button", {
|
|
2659
3028
|
type: "button",
|
|
2660
3029
|
class: "t-file-upload__remove",
|
|
2661
3030
|
"aria-label": e.removeLabel,
|
|
2662
3031
|
disabled: e.disabled,
|
|
2663
|
-
onClick:
|
|
2664
|
-
}, [
|
|
3032
|
+
onClick: ee
|
|
3033
|
+
}, [u(k(Q), {
|
|
2665
3034
|
icon: "x-circle",
|
|
2666
3035
|
color: "#FFFFFF",
|
|
2667
3036
|
width: 18,
|
|
2668
3037
|
height: 18
|
|
2669
|
-
})], 8,
|
|
3038
|
+
})], 8, Rr)
|
|
2670
3039
|
], 16)),
|
|
2671
|
-
|
|
3040
|
+
c("input", g({
|
|
2672
3041
|
id: m.value,
|
|
2673
3042
|
ref_key: "inputRef",
|
|
2674
3043
|
ref: f
|
|
2675
|
-
},
|
|
3044
|
+
}, k(_), {
|
|
2676
3045
|
class: "t-file-upload__input",
|
|
2677
3046
|
type: "file",
|
|
2678
3047
|
title: "",
|
|
@@ -2680,24 +3049,24 @@ var Pn = {
|
|
|
2680
3049
|
required: e.required,
|
|
2681
3050
|
disabled: e.disabled || e.loading,
|
|
2682
3051
|
form: e.form,
|
|
2683
|
-
accept:
|
|
2684
|
-
onChange:
|
|
2685
|
-
}), null, 16,
|
|
2686
|
-
|
|
3052
|
+
accept: b.value,
|
|
3053
|
+
onChange: E
|
|
3054
|
+
}), null, 16, zr),
|
|
3055
|
+
S.value ? (C(), s("div", Br, [e.formatsHint ? (C(), a(k($), {
|
|
2687
3056
|
key: 0,
|
|
2688
3057
|
variant: "b4",
|
|
2689
3058
|
color: "gray.medium1"
|
|
2690
3059
|
}, {
|
|
2691
|
-
default:
|
|
3060
|
+
default: M(() => [l(O(e.formatsHint), 1)]),
|
|
2692
3061
|
_: 1
|
|
2693
|
-
})) : (
|
|
3062
|
+
})) : (C(), s("span", Vr)), e.maxSizeHint ? (C(), a(k($), {
|
|
2694
3063
|
key: 2,
|
|
2695
3064
|
variant: "b4",
|
|
2696
3065
|
color: "gray.medium1"
|
|
2697
3066
|
}, {
|
|
2698
|
-
default:
|
|
3067
|
+
default: M(() => [l(O(e.maxSizeHint), 1)]),
|
|
2699
3068
|
_: 1
|
|
2700
|
-
})) :
|
|
3069
|
+
})) : o("", !0)])) : o("", !0)
|
|
2701
3070
|
]),
|
|
2702
3071
|
_: 3
|
|
2703
3072
|
}, 16, [
|
|
@@ -2706,10 +3075,10 @@ var Pn = {
|
|
|
2706
3075
|
"data-disabled"
|
|
2707
3076
|
]));
|
|
2708
3077
|
}
|
|
2709
|
-
}), [["__scopeId", "data-v-1352af96"]]),
|
|
2710
|
-
let t =
|
|
3078
|
+
}), [["__scopeId", "data-v-1352af96"]]), Ur = (e) => {
|
|
3079
|
+
let t = Z(), n = r(() => fn(e.value)), i = r(() => n.value === "primary" ? t.value.colors.primary.toku : Wt(.15, t.value.colors[n.value])), a = r(() => n.value === "primary" ? t.value.colors.primary.main : t.value.colors[n.value]), o = r(() => n.value === "primary" ? t.value.colors.primary.light1 : X(.15, t.value.colors[n.value])), s = r(() => n.value === "primary" ? t.value.colors.primary.light2 : X(.2, t.value.colors[n.value])), c = r(() => n.value === "primary" ? t.value.colors.primary.light3 : X(.25, t.value.colors[n.value]));
|
|
2711
3080
|
return {
|
|
2712
|
-
baseClass:
|
|
3081
|
+
baseClass: r(() => P({
|
|
2713
3082
|
"&, *": {
|
|
2714
3083
|
margin: 0,
|
|
2715
3084
|
padding: 0,
|
|
@@ -2782,7 +3151,7 @@ var Pn = {
|
|
|
2782
3151
|
},
|
|
2783
3152
|
"&--rounded": { borderRadius: "50%" }
|
|
2784
3153
|
})),
|
|
2785
|
-
iconClass:
|
|
3154
|
+
iconClass: r(() => P({
|
|
2786
3155
|
margin: 0,
|
|
2787
3156
|
padding: 0,
|
|
2788
3157
|
"&--large": { height: "1.25rem" },
|
|
@@ -2790,13 +3159,13 @@ var Pn = {
|
|
|
2790
3159
|
"&--small": { height: "1rem" }
|
|
2791
3160
|
}))
|
|
2792
3161
|
};
|
|
2793
|
-
},
|
|
3162
|
+
}, Wr = {
|
|
2794
3163
|
variant: "primary",
|
|
2795
3164
|
size: "medium",
|
|
2796
3165
|
icon: "academic-cap",
|
|
2797
3166
|
type: "button",
|
|
2798
3167
|
color: "primary"
|
|
2799
|
-
},
|
|
3168
|
+
}, Gr = /* @__PURE__ */ d({
|
|
2800
3169
|
name: "TIconButton",
|
|
2801
3170
|
props: {
|
|
2802
3171
|
variant: String,
|
|
@@ -2809,36 +3178,36 @@ var Pn = {
|
|
|
2809
3178
|
color: String
|
|
2810
3179
|
},
|
|
2811
3180
|
emits: ["click"],
|
|
2812
|
-
setup(e, { attrs: t, emit:
|
|
2813
|
-
let i =
|
|
3181
|
+
setup(e, { attrs: t, emit: n }) {
|
|
3182
|
+
let i = r(() => U({}, Wr, e, t)), { baseClass: a, iconClass: o } = Ur(r(() => i.value.color)), s = Z(), c = r(() => [
|
|
2814
3183
|
a.value,
|
|
2815
3184
|
`${a.value}--${i.value.variant}`,
|
|
2816
3185
|
`${a.value}--${i.value.size}`,
|
|
2817
3186
|
{ [`${a.value}--rounded`]: i.value.rounded }
|
|
2818
|
-
]),
|
|
3187
|
+
]), l = r(() => [
|
|
2819
3188
|
o.value,
|
|
2820
3189
|
`${o.value}--${i.value.variant}`,
|
|
2821
3190
|
`${o.value}--${i.value.size}`,
|
|
2822
3191
|
{ [`${a.value}--loading`]: i.value.loading }
|
|
2823
3192
|
]), d = () => {
|
|
2824
|
-
i.value.loading ||
|
|
3193
|
+
i.value.loading || n("click");
|
|
2825
3194
|
};
|
|
2826
|
-
return () =>
|
|
3195
|
+
return () => u("button", g({
|
|
2827
3196
|
class: c.value,
|
|
2828
3197
|
type: i.value.type,
|
|
2829
3198
|
disabled: i.value.disabled,
|
|
2830
3199
|
onClick: d
|
|
2831
|
-
}, t), [i.value.loading ?
|
|
3200
|
+
}, t), [i.value.loading ? u(N, {
|
|
2832
3201
|
class: `${a.value}__spinner`,
|
|
2833
3202
|
icon: "svg-spinners:90-ring-with-bg"
|
|
2834
|
-
}, null) :
|
|
3203
|
+
}, null) : u(N, {
|
|
2835
3204
|
icon: `${s.value.iconSet}:${i.value.icon}`,
|
|
2836
|
-
class:
|
|
3205
|
+
class: l.value
|
|
2837
3206
|
}, null)]);
|
|
2838
3207
|
}
|
|
2839
|
-
}),
|
|
2840
|
-
let e =
|
|
2841
|
-
return
|
|
3208
|
+
}), Kr = () => {
|
|
3209
|
+
let e = Z();
|
|
3210
|
+
return r(() => P({
|
|
2842
3211
|
margin: 0,
|
|
2843
3212
|
padding: 0,
|
|
2844
3213
|
width: "fit-content",
|
|
@@ -2866,10 +3235,10 @@ var Pn = {
|
|
|
2866
3235
|
fontSize: "0.875rem"
|
|
2867
3236
|
}
|
|
2868
3237
|
}));
|
|
2869
|
-
},
|
|
3238
|
+
}, qr = {
|
|
2870
3239
|
variant: "primary",
|
|
2871
3240
|
size: "medium"
|
|
2872
|
-
},
|
|
3241
|
+
}, Jr = /* @__PURE__ */ d({
|
|
2873
3242
|
name: "TButton",
|
|
2874
3243
|
props: {
|
|
2875
3244
|
variant: String,
|
|
@@ -2878,24 +3247,24 @@ var Pn = {
|
|
|
2878
3247
|
leftIcon: String,
|
|
2879
3248
|
rightIcon: String
|
|
2880
3249
|
},
|
|
2881
|
-
setup(e, { attrs: t, slots:
|
|
2882
|
-
let i =
|
|
3250
|
+
setup(e, { attrs: t, slots: n }) {
|
|
3251
|
+
let i = r(() => U({}, qr, e, t)), a = Kr(), o = Z(), s = r(() => [
|
|
2883
3252
|
a.value,
|
|
2884
3253
|
`${a.value}--${i.value.variant}`,
|
|
2885
3254
|
`${a.value}--${i.value.size}`
|
|
2886
3255
|
]);
|
|
2887
|
-
return () =>
|
|
3256
|
+
return () => u("a", g({
|
|
2888
3257
|
class: s.value,
|
|
2889
3258
|
href: i.value.href
|
|
2890
3259
|
}, t), [
|
|
2891
|
-
i.value.leftIcon ?
|
|
2892
|
-
|
|
2893
|
-
i.value.rightIcon ?
|
|
3260
|
+
i.value.leftIcon ? u(N, { icon: `${o.value.iconSet}:${i.value.leftIcon}` }, null) : null,
|
|
3261
|
+
n.default ? n.default() : null,
|
|
3262
|
+
i.value.rightIcon ? u(N, { icon: `${o.value.iconSet}:${i.value.rightIcon}` }, null) : null
|
|
2894
3263
|
]);
|
|
2895
3264
|
}
|
|
2896
|
-
}),
|
|
2897
|
-
let t =
|
|
2898
|
-
return
|
|
3265
|
+
}), Yr = (e) => {
|
|
3266
|
+
let t = r(() => e.color), n = Z();
|
|
3267
|
+
return r(() => P({
|
|
2899
3268
|
margin: 0,
|
|
2900
3269
|
padding: 0,
|
|
2901
3270
|
width: "3.5rem",
|
|
@@ -2903,14 +3272,14 @@ var Pn = {
|
|
|
2903
3272
|
boxSizing: "border-box",
|
|
2904
3273
|
background: "transparent",
|
|
2905
3274
|
borderRadius: "50%",
|
|
2906
|
-
border: `0.5rem solid ${
|
|
2907
|
-
borderBottomColor: t.value ??
|
|
3275
|
+
border: `0.5rem solid ${n.value.colors.background}`,
|
|
3276
|
+
borderBottomColor: t.value ?? n.value.colors.primary.main,
|
|
2908
3277
|
animation: "rotate 0.75s linear infinite",
|
|
2909
3278
|
"&--medium": {
|
|
2910
3279
|
width: "4.5rem",
|
|
2911
3280
|
height: "4.5rem"
|
|
2912
3281
|
},
|
|
2913
|
-
"&--auto": { [`@media (min-width: ${
|
|
3282
|
+
"&--auto": { [`@media (min-width: ${n.value.breakpoints.desktop}px)`]: {
|
|
2914
3283
|
width: "4.5rem",
|
|
2915
3284
|
height: "4.5rem"
|
|
2916
3285
|
} },
|
|
@@ -2919,20 +3288,20 @@ var Pn = {
|
|
|
2919
3288
|
"100%": { transform: "rotate(360deg)" }
|
|
2920
3289
|
}
|
|
2921
3290
|
}));
|
|
2922
|
-
},
|
|
3291
|
+
}, Xr = {
|
|
2923
3292
|
size: "auto",
|
|
2924
3293
|
color: "#3C1053"
|
|
2925
|
-
},
|
|
3294
|
+
}, Zr = /* @__PURE__ */ d({
|
|
2926
3295
|
name: "TSpinner",
|
|
2927
3296
|
props: {
|
|
2928
3297
|
size: String,
|
|
2929
3298
|
color: String
|
|
2930
3299
|
},
|
|
2931
3300
|
setup(e, { attrs: t }) {
|
|
2932
|
-
let
|
|
2933
|
-
return () =>
|
|
3301
|
+
let n = r(() => U({}, Xr, e, t)), i = Z(), a = Yr({ color: r(() => he(i.value.colors, n.value.color) || n.value.color).value }), o = r(() => [a.value, `${a.value}--${n.value.size}`]);
|
|
3302
|
+
return () => u("div", { class: o.value }, null);
|
|
2934
3303
|
}
|
|
2935
|
-
}),
|
|
3304
|
+
}), Qr = () => r(() => P({
|
|
2936
3305
|
bottom: 0,
|
|
2937
3306
|
left: 0,
|
|
2938
3307
|
position: "absolute",
|
|
@@ -2949,7 +3318,7 @@ var Pn = {
|
|
|
2949
3318
|
position: "fixed",
|
|
2950
3319
|
zIndex: 999
|
|
2951
3320
|
}
|
|
2952
|
-
})),
|
|
3321
|
+
})), $r = { size: "auto" }, ei = /* @__PURE__ */ d({
|
|
2953
3322
|
name: "TLoading",
|
|
2954
3323
|
props: {
|
|
2955
3324
|
active: Boolean,
|
|
@@ -2957,19 +3326,19 @@ var Pn = {
|
|
|
2957
3326
|
size: String
|
|
2958
3327
|
},
|
|
2959
3328
|
setup(e, { attrs: t }) {
|
|
2960
|
-
let
|
|
2961
|
-
[`${i.value}--active`]:
|
|
2962
|
-
[`${i.value}--full-page`]:
|
|
3329
|
+
let n = r(() => U({}, $r, e, t)), i = Qr(), a = r(() => [i.value, {
|
|
3330
|
+
[`${i.value}--active`]: n.value.active,
|
|
3331
|
+
[`${i.value}--full-page`]: n.value.fullPage
|
|
2963
3332
|
}]);
|
|
2964
|
-
return () =>
|
|
3333
|
+
return () => u("div", { class: a.value }, [u(Zr, { size: n.value.size }, null)]);
|
|
2965
3334
|
}
|
|
2966
|
-
}),
|
|
3335
|
+
}), ti = {
|
|
2967
3336
|
key: 0,
|
|
2968
3337
|
class: "t-loading-dots__text"
|
|
2969
|
-
},
|
|
3338
|
+
}, ni = {
|
|
2970
3339
|
key: 0,
|
|
2971
3340
|
class: "t-loading-dots__message"
|
|
2972
|
-
},
|
|
3341
|
+
}, ri = ["data-pending", "aria-hidden"], ii = /* @__PURE__ */ un(/* @__PURE__ */ d({
|
|
2973
3342
|
name: "TLoadingDots",
|
|
2974
3343
|
__name: "TLoadingDots",
|
|
2975
3344
|
props: {
|
|
@@ -2982,42 +3351,42 @@ var Pn = {
|
|
|
2982
3351
|
as: { default: "div" }
|
|
2983
3352
|
},
|
|
2984
3353
|
setup(e) {
|
|
2985
|
-
let t =
|
|
2986
|
-
clearTimeout(
|
|
3354
|
+
let t = A(), n = T(!1), i, u = () => {
|
|
3355
|
+
clearTimeout(i), i = void 0;
|
|
2987
3356
|
}, d = (e) => {
|
|
2988
|
-
|
|
2989
|
-
|
|
3357
|
+
i = setTimeout(() => {
|
|
3358
|
+
n.value = !0;
|
|
2990
3359
|
}, e);
|
|
2991
3360
|
};
|
|
2992
|
-
|
|
2993
|
-
u(),
|
|
3361
|
+
S(u), j(() => e.hintDelay, (e) => {
|
|
3362
|
+
u(), n.value = !1, e !== !1 && d(e);
|
|
2994
3363
|
}, { immediate: !0 });
|
|
2995
|
-
let f =
|
|
2996
|
-
return (t,
|
|
3364
|
+
let f = r(() => !!(e.hint || t.hint) && e.hintDelay !== !1), p = r(() => !!(e.message || t.message));
|
|
3365
|
+
return (t, r) => (C(), a(k(F), {
|
|
2997
3366
|
as: e.as,
|
|
2998
3367
|
class: "t-loading-dots",
|
|
2999
3368
|
role: "status",
|
|
3000
3369
|
"aria-live": "polite"
|
|
3001
3370
|
}, {
|
|
3002
|
-
default:
|
|
3371
|
+
default: M(() => [r[0] ||= c("span", {
|
|
3003
3372
|
class: "t-loading-dots__dots",
|
|
3004
3373
|
"aria-hidden": "true"
|
|
3005
3374
|
}, [
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
], -1), p.value || f.value ? (
|
|
3010
|
-
key:
|
|
3375
|
+
c("span", { class: "t-loading-dots__dot" }),
|
|
3376
|
+
c("span", { class: "t-loading-dots__dot" }),
|
|
3377
|
+
c("span", { class: "t-loading-dots__dot" })
|
|
3378
|
+
], -1), p.value || f.value ? (C(), s("span", ti, [p.value ? (C(), s("span", ni, [D(t.$slots, "message", {}, () => [l(O(e.message), 1)], !0)])) : o("", !0), f.value ? (C(), s("span", {
|
|
3379
|
+
key: n.value ? "shown" : "pending",
|
|
3011
3380
|
class: "t-loading-dots__hint",
|
|
3012
|
-
"data-pending": !
|
|
3013
|
-
"aria-hidden": !
|
|
3014
|
-
}, [
|
|
3381
|
+
"data-pending": !n.value || void 0,
|
|
3382
|
+
"aria-hidden": !n.value || void 0
|
|
3383
|
+
}, [D(t.$slots, "hint", {}, () => [l(O(e.hint), 1)], !0)], 8, ri)) : o("", !0)])) : o("", !0)]),
|
|
3015
3384
|
_: 3
|
|
3016
3385
|
}, 8, ["as"]));
|
|
3017
3386
|
}
|
|
3018
|
-
}), [["__scopeId", "data-v-9bc5da3b"]]),
|
|
3019
|
-
let e =
|
|
3020
|
-
return
|
|
3387
|
+
}), [["__scopeId", "data-v-9bc5da3b"]]), ai = () => {
|
|
3388
|
+
let e = Z();
|
|
3389
|
+
return r(() => P({
|
|
3021
3390
|
"&, *": {
|
|
3022
3391
|
margin: 0,
|
|
3023
3392
|
padding: 0,
|
|
@@ -3064,7 +3433,7 @@ var Pn = {
|
|
|
3064
3433
|
"&--disabled &__radio::after": { background: e.value.colors.gray.medium2 },
|
|
3065
3434
|
"&--disabled &__label": { color: e.value.colors.gray.medium2 }
|
|
3066
3435
|
}));
|
|
3067
|
-
},
|
|
3436
|
+
}, oi = { labelPosition: "right" }, si = /* @__PURE__ */ d({
|
|
3068
3437
|
name: "TRadio",
|
|
3069
3438
|
props: {
|
|
3070
3439
|
id: String,
|
|
@@ -3101,12 +3470,12 @@ var Pn = {
|
|
|
3101
3470
|
"change",
|
|
3102
3471
|
"update:modelValue"
|
|
3103
3472
|
],
|
|
3104
|
-
setup(e, { emit: t, attrs:
|
|
3105
|
-
let i =
|
|
3106
|
-
|
|
3473
|
+
setup(e, { emit: t, attrs: n }) {
|
|
3474
|
+
let i = r(() => U({}, oi, e, n)), a = T(i.value.modelValue === i.value.value);
|
|
3475
|
+
j(() => [i.value.modelValue, i.value.value], () => {
|
|
3107
3476
|
a.value = i.value.modelValue === i.value.value;
|
|
3108
3477
|
});
|
|
3109
|
-
let o =
|
|
3478
|
+
let o = ai(), s = r(() => [
|
|
3110
3479
|
o.value,
|
|
3111
3480
|
`${o.value}--label-${i.value.labelPosition}`,
|
|
3112
3481
|
{
|
|
@@ -3115,53 +3484,53 @@ var Pn = {
|
|
|
3115
3484
|
}
|
|
3116
3485
|
]), c = () => {
|
|
3117
3486
|
t("update:modelValue", i.value.value), t("change", i.value.value), t("input", i.value.value), a.value = !0;
|
|
3118
|
-
},
|
|
3487
|
+
}, l = () => {
|
|
3119
3488
|
i.value.disabled || c();
|
|
3120
3489
|
}, d = (e) => {
|
|
3121
3490
|
(e.key === "Enter" || e.key === " ") && !i.value.disabled && c();
|
|
3122
3491
|
};
|
|
3123
|
-
return () =>
|
|
3492
|
+
return () => u("div", { class: s.value }, [u("input", {
|
|
3124
3493
|
id: i.value.id,
|
|
3125
3494
|
type: "radio",
|
|
3126
3495
|
class: `${o.value}__radio`,
|
|
3127
|
-
onClick:
|
|
3496
|
+
onClick: l,
|
|
3128
3497
|
onKeydown: d,
|
|
3129
3498
|
disabled: i.value.disabled
|
|
3130
|
-
}, null), i.value.label &&
|
|
3499
|
+
}, null), i.value.label && u("label", {
|
|
3131
3500
|
class: `${o.value}__label`,
|
|
3132
3501
|
for: i.value.id
|
|
3133
3502
|
}, [i.value.label])]);
|
|
3134
3503
|
}
|
|
3135
|
-
}),
|
|
3504
|
+
}), ci = {
|
|
3136
3505
|
railTopInset: 3,
|
|
3137
3506
|
railBottomInset: 8,
|
|
3138
3507
|
minThumbHeight: 6,
|
|
3139
3508
|
thumbHeightFactor: .65
|
|
3140
3509
|
};
|
|
3141
|
-
function
|
|
3142
|
-
let { railTopInset:
|
|
3143
|
-
...
|
|
3510
|
+
function li(e, t = {}) {
|
|
3511
|
+
let { railTopInset: n, railBottomInset: i, minThumbHeight: a, thumbHeightFactor: o, onDragStart: s, onDragEnd: c } = {
|
|
3512
|
+
...ci,
|
|
3144
3513
|
...t
|
|
3145
|
-
}, l =
|
|
3514
|
+
}, l = T(0), u = T(0), d = T(!1), f = T(0), p = T(0), m = r(() => l.value > 0);
|
|
3146
3515
|
function h() {
|
|
3147
3516
|
let t = e.value;
|
|
3148
3517
|
if (!t) return;
|
|
3149
|
-
let { scrollTop:
|
|
3518
|
+
let { scrollTop: r, scrollHeight: s, clientHeight: c } = t;
|
|
3150
3519
|
if (s <= c) {
|
|
3151
3520
|
l.value = 0, u.value = 0;
|
|
3152
3521
|
return;
|
|
3153
3522
|
}
|
|
3154
|
-
let d = Math.max(c -
|
|
3155
|
-
l.value = p, u.value =
|
|
3523
|
+
let d = Math.max(c - n - i, 0), f = c / s * d, p = Math.max(f * o, a), m = Math.max(d - p, 0), h = s - c, g = h > 0 ? r / h : 0;
|
|
3524
|
+
l.value = p, u.value = n + m * g;
|
|
3156
3525
|
}
|
|
3157
3526
|
function g(t) {
|
|
3158
3527
|
if (!d.value || !e.value) return;
|
|
3159
|
-
let
|
|
3528
|
+
let r = e.value, { scrollHeight: a, clientHeight: o } = r, s = Math.max(a - o, 0);
|
|
3160
3529
|
if (s === 0) return;
|
|
3161
|
-
let c = Math.max(o -
|
|
3530
|
+
let c = Math.max(o - n - i, 0), u = Math.max(c - l.value, 0);
|
|
3162
3531
|
if (u === 0) return;
|
|
3163
3532
|
let m = t.clientY - f.value, g = s / u;
|
|
3164
|
-
|
|
3533
|
+
r.scrollTop = Math.min(Math.max(p.value + m * g, 0), s), h();
|
|
3165
3534
|
}
|
|
3166
3535
|
function _() {
|
|
3167
3536
|
d.value && (d.value = !1, window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", _), c?.());
|
|
@@ -3169,7 +3538,7 @@ function Pr(e, t = {}) {
|
|
|
3169
3538
|
function v(t) {
|
|
3170
3539
|
!e.value || !m.value || (t.preventDefault(), t.stopPropagation(), s?.(), d.value = !0, f.value = t.clientY, p.value = e.value.scrollTop, window.addEventListener("mousemove", g), window.addEventListener("mouseup", _));
|
|
3171
3540
|
}
|
|
3172
|
-
return
|
|
3541
|
+
return S(() => {
|
|
3173
3542
|
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", _);
|
|
3174
3543
|
}), {
|
|
3175
3544
|
thumbHeight: l,
|
|
@@ -3182,9 +3551,9 @@ function Pr(e, t = {}) {
|
|
|
3182
3551
|
}
|
|
3183
3552
|
//#endregion
|
|
3184
3553
|
//#region src/components/TSelect/TSelect.styles.tsx
|
|
3185
|
-
var
|
|
3186
|
-
let e =
|
|
3187
|
-
return
|
|
3554
|
+
var ui = () => {
|
|
3555
|
+
let e = Z();
|
|
3556
|
+
return r(() => P({
|
|
3188
3557
|
"&, *": {
|
|
3189
3558
|
margin: 0,
|
|
3190
3559
|
padding: 0,
|
|
@@ -3312,31 +3681,31 @@ var Fr = () => {
|
|
|
3312
3681
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
3313
3682
|
"&--full-width": { width: "100%" }
|
|
3314
3683
|
}));
|
|
3315
|
-
},
|
|
3316
|
-
e.type === "option" ? t.push(e) : Array.isArray(e.children) &&
|
|
3317
|
-
}), t),
|
|
3684
|
+
}, di = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((e) => di(e)).join("").trim() : e && typeof e == "object" && "children" in e ? di(e.children) : "", fi = (e, t = []) => (e?.forEach((e) => {
|
|
3685
|
+
e.type === "option" ? t.push(e) : Array.isArray(e.children) && fi(e.children, t);
|
|
3686
|
+
}), t), pi = (e) => fi(e).map((e) => ({
|
|
3318
3687
|
value: e.props?.value,
|
|
3319
3688
|
disabled: !!e.props?.disabled,
|
|
3320
|
-
label:
|
|
3321
|
-
})),
|
|
3689
|
+
label: di(e.children)
|
|
3690
|
+
})), mi = (e, t) => {
|
|
3322
3691
|
if (e === t) return !0;
|
|
3323
3692
|
if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
|
|
3324
3693
|
let n = Object.getPrototypeOf(e);
|
|
3325
3694
|
if (n !== Object.prototype || Object.getPrototypeOf(t) !== n) return !1;
|
|
3326
3695
|
let r = Object.keys(e), i = Object.keys(t);
|
|
3327
3696
|
return r.length === i.length ? r.every((n) => e[n] === t[n]) : !1;
|
|
3328
|
-
},
|
|
3329
|
-
let n = e.findIndex((e) =>
|
|
3697
|
+
}, hi = (e, t) => {
|
|
3698
|
+
let n = e.findIndex((e) => mi(e.value, t) && !e.disabled);
|
|
3330
3699
|
if (n >= 0) return n;
|
|
3331
3700
|
let r = e.findIndex((e) => !e.disabled);
|
|
3332
3701
|
return r >= 0 ? r : -1;
|
|
3333
|
-
},
|
|
3702
|
+
}, gi = (e) => {
|
|
3334
3703
|
if (typeof e.leftIcon == "string") return e.leftIcon;
|
|
3335
3704
|
let t = e["left-icon"];
|
|
3336
3705
|
return typeof t == "string" ? t : "";
|
|
3337
|
-
},
|
|
3338
|
-
let e =
|
|
3339
|
-
return
|
|
3706
|
+
}, _i = (e, t) => e ? e.includes(":") ? e : `${t}:${e}` : "", vi = () => {
|
|
3707
|
+
let e = Z();
|
|
3708
|
+
return r(() => P({
|
|
3340
3709
|
"&, *": { boxSizing: "border-box" },
|
|
3341
3710
|
listStyle: "none",
|
|
3342
3711
|
padding: "0.5rem 0.625rem",
|
|
@@ -3366,7 +3735,7 @@ var Fr = () => {
|
|
|
3366
3735
|
pointerEvents: "none"
|
|
3367
3736
|
}
|
|
3368
3737
|
}));
|
|
3369
|
-
},
|
|
3738
|
+
}, yi = /* @__PURE__ */ d({
|
|
3370
3739
|
name: "TSelectOption",
|
|
3371
3740
|
emits: ["select", "hover"],
|
|
3372
3741
|
props: {
|
|
@@ -3376,18 +3745,18 @@ var Fr = () => {
|
|
|
3376
3745
|
disabled: Boolean,
|
|
3377
3746
|
withSeparator: Boolean
|
|
3378
3747
|
},
|
|
3379
|
-
setup(e, { slots: t, emit:
|
|
3380
|
-
let i =
|
|
3748
|
+
setup(e, { slots: t, emit: n }) {
|
|
3749
|
+
let i = vi(), a = r(() => [i.value, {
|
|
3381
3750
|
[`${i.value}--selected`]: e.selected,
|
|
3382
3751
|
[`${i.value}--highlighted`]: e.highlighted,
|
|
3383
3752
|
[`${i.value}--disabled`]: e.disabled,
|
|
3384
3753
|
[`${i.value}--with-separator`]: e.withSeparator
|
|
3385
3754
|
}]), o = () => {
|
|
3386
|
-
e.disabled ||
|
|
3755
|
+
e.disabled || n("hover");
|
|
3387
3756
|
}, s = (t) => {
|
|
3388
|
-
t.preventDefault(), e.disabled ||
|
|
3757
|
+
t.preventDefault(), e.disabled || n("select");
|
|
3389
3758
|
};
|
|
3390
|
-
return () =>
|
|
3759
|
+
return () => u("li", {
|
|
3391
3760
|
class: a.value,
|
|
3392
3761
|
role: "option",
|
|
3393
3762
|
"aria-selected": !!e.selected,
|
|
@@ -3395,16 +3764,16 @@ var Fr = () => {
|
|
|
3395
3764
|
onMouseenter: o
|
|
3396
3765
|
}, [t.default?.() || e.label]);
|
|
3397
3766
|
}
|
|
3398
|
-
}),
|
|
3399
|
-
function
|
|
3400
|
-
let r =
|
|
3401
|
-
n.value || !e.value.length || (r.value = !0, i.value =
|
|
3767
|
+
}), bi = 36;
|
|
3768
|
+
function xi(e, t, n) {
|
|
3769
|
+
let r = T(!1), i = T(-1), a = T(null), o = T(null), s = T(null), c = T(!1), l = T(!1), u = () => {
|
|
3770
|
+
n.value || !e.value.length || (r.value = !0, i.value = hi(e.value, t.value));
|
|
3402
3771
|
}, d = () => {
|
|
3403
3772
|
r.value = !1, i.value = -1, c.value = !1, l.value = !1;
|
|
3404
3773
|
}, f = (e) => {
|
|
3405
3774
|
let t = s.value;
|
|
3406
3775
|
t && t.scrollBy({
|
|
3407
|
-
top: e *
|
|
3776
|
+
top: e * bi,
|
|
3408
3777
|
behavior: "smooth"
|
|
3409
3778
|
});
|
|
3410
3779
|
}, p = (e) => {
|
|
@@ -3459,7 +3828,7 @@ function Kr(e, t, n) {
|
|
|
3459
3828
|
}
|
|
3460
3829
|
//#endregion
|
|
3461
3830
|
//#region src/components/TSelect/TSelect.tsx
|
|
3462
|
-
var
|
|
3831
|
+
var Si = /* @__PURE__ */ d({
|
|
3463
3832
|
name: "TSelect",
|
|
3464
3833
|
emits: [
|
|
3465
3834
|
"input",
|
|
@@ -3502,24 +3871,24 @@ var qr = /* @__PURE__ */ u({
|
|
|
3502
3871
|
fullWidth: Boolean,
|
|
3503
3872
|
id: String
|
|
3504
3873
|
},
|
|
3505
|
-
setup(e, { attrs: t, emit:
|
|
3506
|
-
let o =
|
|
3507
|
-
|
|
3508
|
-
`${
|
|
3874
|
+
setup(e, { attrs: t, emit: n, slots: i, expose: a }) {
|
|
3875
|
+
let o = r(() => U({}, e, t)), s = Z(), c = T(null), l = ui(), d = r(() => [
|
|
3876
|
+
l.value,
|
|
3877
|
+
`${l.value}__container`,
|
|
3509
3878
|
{
|
|
3510
|
-
[`${
|
|
3511
|
-
[`${
|
|
3879
|
+
[`${l.value}--error`]: o.value.error,
|
|
3880
|
+
[`${l.value}--full-width`]: o.value.fullWidth
|
|
3512
3881
|
}
|
|
3513
3882
|
]);
|
|
3514
|
-
|
|
3883
|
+
j(() => [o.value.modelValue, o.value.value], ([e, t]) => {
|
|
3515
3884
|
c.value = e === null ? t : e;
|
|
3516
3885
|
}, { immediate: !0 });
|
|
3517
|
-
let f =
|
|
3886
|
+
let f = r({
|
|
3518
3887
|
get: () => o.value.modelValue === null ? o.value.value === null ? c.value : o.value.value : o.value.modelValue,
|
|
3519
3888
|
set: (e) => {
|
|
3520
|
-
c.value = e,
|
|
3889
|
+
c.value = e, n("update:modelValue", e), n("input", e), n("change", e);
|
|
3521
3890
|
}
|
|
3522
|
-
}), p =
|
|
3891
|
+
}), p = r(() => pi(i.default?.() ?? [])), m = r(() => p.value.find((e) => mi(e.value, f.value))), h = r(() => !!m.value), _ = r(() => m.value ? m.value.label : o.value.placeholder ? o.value.placeholder : ""), v = r(() => gi(o.value)), y = r(() => _i(v.value, s.value.iconSet)), b = xi(p, f, r(() => !!o.value.disabled)), x = li(b.menuRef, {
|
|
3523
3892
|
onDragStart: () => {
|
|
3524
3893
|
b.isInteractingWithMenu.value = !0;
|
|
3525
3894
|
},
|
|
@@ -3529,31 +3898,31 @@ var qr = /* @__PURE__ */ u({
|
|
|
3529
3898
|
});
|
|
3530
3899
|
}
|
|
3531
3900
|
});
|
|
3532
|
-
return
|
|
3901
|
+
return j(() => [b.menuOpen.value, p.value.length], ([e]) => {
|
|
3533
3902
|
e && requestAnimationFrame(() => x.update());
|
|
3534
|
-
}), a({ focus: () => b.triggerRef.value?.focus() }), () =>
|
|
3535
|
-
i.label?.() || o.value.label &&
|
|
3536
|
-
class: `${
|
|
3903
|
+
}), a({ focus: () => b.triggerRef.value?.focus() }), () => u("div", { class: d.value }, [
|
|
3904
|
+
i.label?.() || o.value.label && u("label", {
|
|
3905
|
+
class: `${l.value}__label`,
|
|
3537
3906
|
for: o.value.id
|
|
3538
3907
|
}, [o.value.label]),
|
|
3539
|
-
|
|
3908
|
+
u("div", { class: `${l.value}__wrapper` }, [v.value && u(N, {
|
|
3540
3909
|
icon: y.value,
|
|
3541
|
-
class: [`${
|
|
3542
|
-
}, null),
|
|
3543
|
-
class: [`${
|
|
3910
|
+
class: [`${l.value}__icon`, `${l.value}__icon--left`]
|
|
3911
|
+
}, null), u("div", {
|
|
3912
|
+
class: [`${l.value}__dropdown`, { [`${l.value}__dropdown--open`]: b.menuOpen.value }],
|
|
3544
3913
|
ref: b.wrapperRef
|
|
3545
|
-
}, [
|
|
3546
|
-
class: [`${
|
|
3547
|
-
[`${
|
|
3548
|
-
[`${
|
|
3549
|
-
[`${
|
|
3914
|
+
}, [u("button", g({
|
|
3915
|
+
class: [`${l.value}__select`, {
|
|
3916
|
+
[`${l.value}__select--left-icon`]: v.value,
|
|
3917
|
+
[`${l.value}__select--placeholder`]: !h.value,
|
|
3918
|
+
[`${l.value}__select--open`]: b.menuOpen.value
|
|
3550
3919
|
}],
|
|
3551
3920
|
disabled: o.value.disabled,
|
|
3552
3921
|
id: o.value.id,
|
|
3553
3922
|
onClick: b.handleClickTrigger,
|
|
3554
|
-
onFocus: (e) =>
|
|
3923
|
+
onFocus: (e) => n("focus", e),
|
|
3555
3924
|
onBlur: (e) => {
|
|
3556
|
-
b.handleBlur(),
|
|
3925
|
+
b.handleBlur(), n("blur", e);
|
|
3557
3926
|
},
|
|
3558
3927
|
onKeydown: b.handleKeydown,
|
|
3559
3928
|
ref: b.triggerRef,
|
|
@@ -3561,8 +3930,8 @@ var qr = /* @__PURE__ */ u({
|
|
|
3561
3930
|
"aria-haspopup": "listbox",
|
|
3562
3931
|
"aria-expanded": b.menuOpen.value,
|
|
3563
3932
|
type: "button"
|
|
3564
|
-
}, t), [
|
|
3565
|
-
class: `${
|
|
3933
|
+
}, t), [u("div", { class: `${l.value}__selected-value` }, [_.value])]), b.menuOpen.value && u("div", {
|
|
3934
|
+
class: `${l.value}__menu-wrapper`,
|
|
3566
3935
|
onMousedown: b.handleMenuInteractionStart,
|
|
3567
3936
|
onMouseup: () => {
|
|
3568
3937
|
x.isDragging.value || (b.isInteractingWithMenu.value = !1);
|
|
@@ -3571,37 +3940,37 @@ var qr = /* @__PURE__ */ u({
|
|
|
3571
3940
|
onMouseleave: () => {
|
|
3572
3941
|
b.menuHovered.value = !1, x.isDragging.value || (b.isInteractingWithMenu.value = !1);
|
|
3573
3942
|
}
|
|
3574
|
-
}, [
|
|
3575
|
-
class: `${
|
|
3943
|
+
}, [u("ul", {
|
|
3944
|
+
class: `${l.value}__menu`,
|
|
3576
3945
|
role: "listbox",
|
|
3577
3946
|
ref: b.menuRef,
|
|
3578
3947
|
onScroll: x.update
|
|
3579
|
-
}, [p.value.map((e, t) =>
|
|
3948
|
+
}, [p.value.map((e, t) => u(yi, {
|
|
3580
3949
|
key: `${String(e.value)}-${t}`,
|
|
3581
3950
|
label: e.label,
|
|
3582
|
-
selected:
|
|
3951
|
+
selected: mi(e.value, f.value),
|
|
3583
3952
|
highlighted: t === b.highlightedIndex.value,
|
|
3584
3953
|
disabled: e.disabled,
|
|
3585
3954
|
withSeparator: t < p.value.length - 1,
|
|
3586
3955
|
onHover: () => b.highlightedIndex.value = t,
|
|
3587
3956
|
onSelect: () => b.selectOption(e)
|
|
3588
|
-
}, null))]),
|
|
3589
|
-
class: [`${
|
|
3957
|
+
}, null))]), u("div", {
|
|
3958
|
+
class: [`${l.value}__menu-scrollbar`, { [`${l.value}__menu-scrollbar--visible`]: b.menuHovered.value && x.isScrollable.value }],
|
|
3590
3959
|
"aria-hidden": "true"
|
|
3591
|
-
}, [
|
|
3592
|
-
class: `${
|
|
3960
|
+
}, [u("div", {
|
|
3961
|
+
class: `${l.value}__menu-scrollbar-thumb`,
|
|
3593
3962
|
onMousedown: x.onThumbMouseDown,
|
|
3594
3963
|
style: {
|
|
3595
3964
|
height: `${x.thumbHeight.value}px`,
|
|
3596
3965
|
transform: `translateY(${x.thumbOffset.value}px)`
|
|
3597
3966
|
}
|
|
3598
3967
|
}, null)])])])]),
|
|
3599
|
-
i.helperText?.() || o.value.helperText &&
|
|
3968
|
+
i.helperText?.() || o.value.helperText && u("p", { class: `${l.value}__helper-text` }, [o.value.helperText])
|
|
3600
3969
|
]);
|
|
3601
3970
|
}
|
|
3602
|
-
}),
|
|
3603
|
-
let e =
|
|
3604
|
-
return
|
|
3971
|
+
}), Ci = () => {
|
|
3972
|
+
let e = Z();
|
|
3973
|
+
return r(() => P({
|
|
3605
3974
|
"&, *": {
|
|
3606
3975
|
margin: 0,
|
|
3607
3976
|
boxSizing: "border-box"
|
|
@@ -3682,12 +4051,12 @@ var qr = /* @__PURE__ */ u({
|
|
|
3682
4051
|
"&--error &__select:not(:disabled), &--error &__select:focus": { borderColor: e.value.colors.error },
|
|
3683
4052
|
"&--error + &__helper-text": { color: e.value.colors.error }
|
|
3684
4053
|
}));
|
|
3685
|
-
},
|
|
4054
|
+
}, wi = (e) => {
|
|
3686
4055
|
let t = [];
|
|
3687
4056
|
return e?.forEach((e) => {
|
|
3688
|
-
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
4057
|
+
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...wi(e.children));
|
|
3689
4058
|
}), t;
|
|
3690
|
-
},
|
|
4059
|
+
}, Ti = /* @__PURE__ */ d({
|
|
3691
4060
|
name: "TSelectDropdown",
|
|
3692
4061
|
props: {
|
|
3693
4062
|
open: Boolean,
|
|
@@ -3700,54 +4069,54 @@ var qr = /* @__PURE__ */ u({
|
|
|
3700
4069
|
fullWidth: Boolean
|
|
3701
4070
|
},
|
|
3702
4071
|
emits: ["cancel", "click"],
|
|
3703
|
-
setup(e, { slots: t, attrs:
|
|
3704
|
-
let a =
|
|
4072
|
+
setup(e, { slots: t, attrs: n, emit: i }) {
|
|
4073
|
+
let a = r(() => U({}, e, n)), o = Ci(), s = r(() => [
|
|
3705
4074
|
o.value,
|
|
3706
4075
|
`${o.value}__menu_container`,
|
|
3707
4076
|
{
|
|
3708
4077
|
[`${o.value}--active`]: a.value.open,
|
|
3709
4078
|
[`${o.value}--error`]: a.value.error
|
|
3710
4079
|
}
|
|
3711
|
-
]), c =
|
|
4080
|
+
]), c = r(() => [
|
|
3712
4081
|
o.value,
|
|
3713
4082
|
`${o.value}__container`,
|
|
3714
4083
|
{ [`${o.value}--full-width`]: a.value.fullWidth }
|
|
3715
|
-
]),
|
|
3716
|
-
a.value.open &&
|
|
4084
|
+
]), l = T(null), d = (e) => {
|
|
4085
|
+
a.value.open && l.value && !l.value.contains(e.target) && i("cancel");
|
|
3717
4086
|
}, f = (e) => {
|
|
3718
4087
|
e.key === "Escape" && i("cancel");
|
|
3719
4088
|
};
|
|
3720
|
-
|
|
3721
|
-
document.addEventListener("click", d),
|
|
3722
|
-
}),
|
|
3723
|
-
document.removeEventListener("click", d),
|
|
4089
|
+
x(() => {
|
|
4090
|
+
document.addEventListener("click", d), l.value?.addEventListener("keydown", f);
|
|
4091
|
+
}), S(() => {
|
|
4092
|
+
document.removeEventListener("click", d), l.value?.removeEventListener("keydown", f);
|
|
3724
4093
|
});
|
|
3725
|
-
let p =
|
|
4094
|
+
let p = r(() => wi(t.default?.() || [])), m = () => {
|
|
3726
4095
|
i("click");
|
|
3727
4096
|
};
|
|
3728
|
-
return () =>
|
|
3729
|
-
t.label?.() || a.value.label &&
|
|
3730
|
-
|
|
3731
|
-
ref:
|
|
4097
|
+
return () => u("div", { class: c.value }, [
|
|
4098
|
+
t.label?.() || a.value.label && u("label", { class: `${o.value}__label` }, [a.value.label]),
|
|
4099
|
+
u("div", {
|
|
4100
|
+
ref: l,
|
|
3732
4101
|
role: "menu",
|
|
3733
4102
|
class: s.value
|
|
3734
|
-
}, [
|
|
4103
|
+
}, [u("button", {
|
|
3735
4104
|
class: `${o.value}__select`,
|
|
3736
4105
|
onClick: m,
|
|
3737
4106
|
disabled: a.value.disabled,
|
|
3738
4107
|
type: "button"
|
|
3739
|
-
}, [a.value.selectedValue, a.value.placeholder && !a.value.selectedValue &&
|
|
4108
|
+
}, [a.value.selectedValue, a.value.placeholder && !a.value.selectedValue && u("option", {
|
|
3740
4109
|
value: "",
|
|
3741
4110
|
disabled: !0,
|
|
3742
4111
|
selected: !0,
|
|
3743
4112
|
class: `${o.value}__placeholder`
|
|
3744
|
-
}, [a.value.placeholder])]),
|
|
3745
|
-
t.helperText?.() || a.value.helperText &&
|
|
4113
|
+
}, [a.value.placeholder])]), u("div", { class: `${o.value}__menu` }, [p.value.map((e, t, n) => u("div", null, [e, t < n.length - 1 && u("div", { class: `${o.value}__divider` }, null)]))])]),
|
|
4114
|
+
t.helperText?.() || a.value.helperText && u("p", { class: `${o.value}__helper-text` }, [a.value.helperText])
|
|
3746
4115
|
]);
|
|
3747
4116
|
}
|
|
3748
|
-
}),
|
|
3749
|
-
let e =
|
|
3750
|
-
return
|
|
4117
|
+
}), Ei = () => {
|
|
4118
|
+
let e = Z();
|
|
4119
|
+
return r(() => P({
|
|
3751
4120
|
"&, *": {
|
|
3752
4121
|
margin: 0,
|
|
3753
4122
|
boxSizing: "border-box"
|
|
@@ -3774,29 +4143,29 @@ var qr = /* @__PURE__ */ u({
|
|
|
3774
4143
|
float: "right"
|
|
3775
4144
|
}
|
|
3776
4145
|
}));
|
|
3777
|
-
},
|
|
4146
|
+
}, Di = /* @__PURE__ */ d({
|
|
3778
4147
|
name: "TSelectDropdownItem",
|
|
3779
4148
|
emits: ["click"],
|
|
3780
4149
|
props: { label: String },
|
|
3781
|
-
setup(e, { slots: t, emit:
|
|
3782
|
-
let a =
|
|
3783
|
-
|
|
4150
|
+
setup(e, { slots: t, emit: n, attrs: i }) {
|
|
4151
|
+
let a = r(() => U({}, e, i)), o = Ei(), s = () => {
|
|
4152
|
+
n("click");
|
|
3784
4153
|
}, c = (e) => {
|
|
3785
|
-
e.key === "Enter" && !a.value.disabled && (
|
|
4154
|
+
e.key === "Enter" && !a.value.disabled && (n("click"), e.preventDefault());
|
|
3786
4155
|
};
|
|
3787
|
-
return () =>
|
|
4156
|
+
return () => u("div", {
|
|
3788
4157
|
class: o.value,
|
|
3789
4158
|
onClick: s,
|
|
3790
4159
|
role: "menuitem",
|
|
3791
4160
|
onKeydown: c,
|
|
3792
4161
|
tabindex: 0
|
|
3793
|
-
}, [t.default?.(), t.label?.() || a.value.label &&
|
|
4162
|
+
}, [t.default?.(), t.label?.() || a.value.label && u("label", { class: `${o.value}__label` }, [a.value.label])]);
|
|
3794
4163
|
}
|
|
3795
|
-
}),
|
|
4164
|
+
}), Oi = /* @__PURE__ */ un(/* @__PURE__ */ d({
|
|
3796
4165
|
name: "TSwitch",
|
|
3797
4166
|
inheritAttrs: !1,
|
|
3798
4167
|
__name: "TSwitch",
|
|
3799
|
-
props: /* @__PURE__ */
|
|
4168
|
+
props: /* @__PURE__ */ h({
|
|
3800
4169
|
label: {},
|
|
3801
4170
|
disabled: { type: Boolean },
|
|
3802
4171
|
value: { type: Boolean },
|
|
@@ -3810,18 +4179,18 @@ var qr = /* @__PURE__ */ u({
|
|
|
3810
4179
|
modelValue: {},
|
|
3811
4180
|
modelModifiers: {}
|
|
3812
4181
|
}),
|
|
3813
|
-
emits: /* @__PURE__ */
|
|
4182
|
+
emits: /* @__PURE__ */ h(["change", "input"], ["update:modelValue"]),
|
|
3814
4183
|
setup(e, { emit: t }) {
|
|
3815
|
-
let
|
|
3816
|
-
|
|
4184
|
+
let n = t, i = re(e, "modelValue"), s = r(() => e.modelValue ?? e.value), c = ne(), d = r(() => e.id ?? c), { wrapperAttrs: f, controlAttrs: p } = Gn(), m = (e) => {
|
|
4185
|
+
i.value = e, n("change", e), n("input", e);
|
|
3817
4186
|
};
|
|
3818
|
-
return (t, n) => (
|
|
4187
|
+
return (t, n) => (C(), a(k(F), g(k(f), {
|
|
3819
4188
|
as: e.as,
|
|
3820
4189
|
class: "t-switch",
|
|
3821
4190
|
"data-label-position": e.labelPosition,
|
|
3822
4191
|
"data-disabled": e.disabled || void 0
|
|
3823
4192
|
}), {
|
|
3824
|
-
default:
|
|
4193
|
+
default: M(() => [u(k(ae), g({ id: d.value }, k(p), {
|
|
3825
4194
|
"model-value": s.value,
|
|
3826
4195
|
"true-value": e.trueValue,
|
|
3827
4196
|
"false-value": e.falseValue,
|
|
@@ -3829,7 +4198,7 @@ var qr = /* @__PURE__ */ u({
|
|
|
3829
4198
|
class: "t-switch-track",
|
|
3830
4199
|
"onUpdate:modelValue": m
|
|
3831
4200
|
}), {
|
|
3832
|
-
default:
|
|
4201
|
+
default: M(() => [u(k(oe), { class: "t-switch-thumb" })]),
|
|
3833
4202
|
_: 1
|
|
3834
4203
|
}, 16, [
|
|
3835
4204
|
"id",
|
|
@@ -3837,15 +4206,15 @@ var qr = /* @__PURE__ */ u({
|
|
|
3837
4206
|
"true-value",
|
|
3838
4207
|
"false-value",
|
|
3839
4208
|
"disabled"
|
|
3840
|
-
]), e.label || t.$slots.label ? (
|
|
4209
|
+
]), e.label || t.$slots.label ? (C(), a(k(ie), {
|
|
3841
4210
|
key: 0,
|
|
3842
4211
|
as: e.as === "label" ? "span" : "label",
|
|
3843
4212
|
for: e.as === "label" ? void 0 : d.value,
|
|
3844
4213
|
class: "t-switch-label"
|
|
3845
4214
|
}, {
|
|
3846
|
-
default:
|
|
4215
|
+
default: M(() => [D(t.$slots, "label", { label: e.label }, () => [l(O(e.label), 1)], !0)]),
|
|
3847
4216
|
_: 3
|
|
3848
|
-
}, 8, ["as", "for"])) :
|
|
4217
|
+
}, 8, ["as", "for"])) : o("", !0)]),
|
|
3849
4218
|
_: 3
|
|
3850
4219
|
}, 16, [
|
|
3851
4220
|
"as",
|
|
@@ -3853,9 +4222,9 @@ var qr = /* @__PURE__ */ u({
|
|
|
3853
4222
|
"data-disabled"
|
|
3854
4223
|
]));
|
|
3855
4224
|
}
|
|
3856
|
-
}), [["__scopeId", "data-v-607c870f"]]),
|
|
3857
|
-
let e =
|
|
3858
|
-
return
|
|
4225
|
+
}), [["__scopeId", "data-v-607c870f"]]), ki = () => {
|
|
4226
|
+
let e = Z();
|
|
4227
|
+
return r(() => P({
|
|
3859
4228
|
"&, *": {
|
|
3860
4229
|
margin: 0,
|
|
3861
4230
|
padding: 0,
|
|
@@ -3900,7 +4269,7 @@ var qr = /* @__PURE__ */ u({
|
|
|
3900
4269
|
}
|
|
3901
4270
|
}
|
|
3902
4271
|
}));
|
|
3903
|
-
},
|
|
4272
|
+
}, Ai = /* @__PURE__ */ d({
|
|
3904
4273
|
name: "TTabBar",
|
|
3905
4274
|
emits: [
|
|
3906
4275
|
"input",
|
|
@@ -3912,22 +4281,22 @@ var qr = /* @__PURE__ */ u({
|
|
|
3912
4281
|
value: String,
|
|
3913
4282
|
modelValue: String
|
|
3914
4283
|
},
|
|
3915
|
-
setup(e, { attrs: t, emit:
|
|
3916
|
-
let i =
|
|
3917
|
-
|
|
4284
|
+
setup(e, { attrs: t, emit: n }) {
|
|
4285
|
+
let i = r(() => U({}, e, t)), a = ki(), o = T(i.value.modelValue === void 0 ? i.value.value : i.value.modelValue);
|
|
4286
|
+
j([() => i.value.modelValue, () => i.value.value], () => {
|
|
3918
4287
|
o.value = i.value.modelValue === void 0 ? i.value.value : i.value.modelValue;
|
|
3919
4288
|
});
|
|
3920
4289
|
let s = (e) => {
|
|
3921
|
-
|
|
4290
|
+
n("update:modelValue", e), n("input", e), n("change", e), o.value = e;
|
|
3922
4291
|
};
|
|
3923
|
-
return () =>
|
|
4292
|
+
return () => u("nav", { class: [a.value] }, [u("ul", {
|
|
3924
4293
|
class: [`${a.value}__ul`, `${a.value}`],
|
|
3925
4294
|
role: "tablist"
|
|
3926
|
-
}, [i.value.labels?.map((e) =>
|
|
4295
|
+
}, [i.value.labels?.map((e) => u("li", {
|
|
3927
4296
|
role: "tab",
|
|
3928
4297
|
"aria-selected": o.value === e,
|
|
3929
4298
|
key: e
|
|
3930
|
-
}, [
|
|
4299
|
+
}, [u("button", {
|
|
3931
4300
|
class: [`${a.value}__button`, {
|
|
3932
4301
|
[`${a.value}__selected`]: o.value === e,
|
|
3933
4302
|
[`${a.value}__not-selected`]: o.value !== e
|
|
@@ -3935,9 +4304,9 @@ var qr = /* @__PURE__ */ u({
|
|
|
3935
4304
|
onClick: () => s(e)
|
|
3936
4305
|
}, [e])]))])]);
|
|
3937
4306
|
}
|
|
3938
|
-
}),
|
|
3939
|
-
let e =
|
|
3940
|
-
return
|
|
4307
|
+
}), ji = () => {
|
|
4308
|
+
let e = Z();
|
|
4309
|
+
return r(() => P({
|
|
3941
4310
|
paddingBottom: "0.625rem",
|
|
3942
4311
|
color: e.value.colors.gray.main,
|
|
3943
4312
|
alignItems: "center",
|
|
@@ -3959,7 +4328,7 @@ var qr = /* @__PURE__ */ u({
|
|
|
3959
4328
|
color: e.value.colors.primary.dark
|
|
3960
4329
|
}
|
|
3961
4330
|
}));
|
|
3962
|
-
},
|
|
4331
|
+
}, Mi = /* @__PURE__ */ d({
|
|
3963
4332
|
name: "TTab",
|
|
3964
4333
|
props: {
|
|
3965
4334
|
id: {
|
|
@@ -3982,15 +4351,15 @@ var qr = /* @__PURE__ */ u({
|
|
|
3982
4351
|
}
|
|
3983
4352
|
},
|
|
3984
4353
|
setup(e, { slots: t }) {
|
|
3985
|
-
let
|
|
4354
|
+
let n = ji(), i = p("tabSelection");
|
|
3986
4355
|
if (!i) throw Error("tabSelection provider missing.");
|
|
3987
4356
|
let { selectTab: a } = i, o = () => {
|
|
3988
4357
|
a(e.id);
|
|
3989
4358
|
}, s = (t) => {
|
|
3990
4359
|
t.key === "Enter" && (t.preventDefault(), a(e.id));
|
|
3991
|
-
}, c =
|
|
3992
|
-
return () =>
|
|
3993
|
-
class: [
|
|
4360
|
+
}, c = r(() => e.selected ? "selected" : "");
|
|
4361
|
+
return () => u("div", {
|
|
4362
|
+
class: [n.value, c.value === "selected" ? `${n.value}--selected` : ""],
|
|
3994
4363
|
"aria-label": c.value,
|
|
3995
4364
|
onClick: o,
|
|
3996
4365
|
onKeydown: s,
|
|
@@ -3998,15 +4367,15 @@ var qr = /* @__PURE__ */ u({
|
|
|
3998
4367
|
tabindex: 0
|
|
3999
4368
|
}, [t.default?.()]);
|
|
4000
4369
|
}
|
|
4001
|
-
}),
|
|
4002
|
-
let e =
|
|
4003
|
-
return
|
|
4370
|
+
}), Ni = () => {
|
|
4371
|
+
let e = Z();
|
|
4372
|
+
return r(() => P({
|
|
4004
4373
|
width: "100%",
|
|
4005
4374
|
borderBottom: `0.125rem solid ${e.value.colors.gray.medium2}`,
|
|
4006
4375
|
display: "flex",
|
|
4007
4376
|
gap: "2.5rem"
|
|
4008
4377
|
}));
|
|
4009
|
-
},
|
|
4378
|
+
}, Pi = /* @__PURE__ */ d({
|
|
4010
4379
|
name: "TTabBarExtended",
|
|
4011
4380
|
emits: ["select"],
|
|
4012
4381
|
props: {
|
|
@@ -4023,21 +4392,21 @@ var qr = /* @__PURE__ */ u({
|
|
|
4023
4392
|
] }
|
|
4024
4393
|
},
|
|
4025
4394
|
setup(e, { emit: t }) {
|
|
4026
|
-
let
|
|
4395
|
+
let n = Ni(), i = ji(), a = r(() => e.tabs.map((e, t) => ({
|
|
4027
4396
|
id: `${t}`,
|
|
4028
4397
|
label: e.label,
|
|
4029
4398
|
value: e.value
|
|
4030
|
-
}))), o =
|
|
4399
|
+
}))), o = T(r(() => e.initialLabel ? a.value.find((t) => t.label === e.initialLabel) ?? a.value[0] : a.value[0]).value), s = r(() => e.selectedValue !== void 0), c = r(() => s.value ? a.value.find((t) => t.value === e.selectedValue) ?? a.value[0] : o.value), d = T(!1), f = (e) => {
|
|
4031
4400
|
let n = a.value.find((t) => t.id === e);
|
|
4032
4401
|
if (!n) throw Error("No tab was found.");
|
|
4033
|
-
|
|
4402
|
+
c.value.id !== e && (s.value || (o.value = n), t("select", n.value));
|
|
4034
4403
|
};
|
|
4035
|
-
|
|
4036
|
-
let p =
|
|
4404
|
+
w("tabSelection", { selectTab: f });
|
|
4405
|
+
let p = r(() => a.value.length), m = r(() => Math.min(p.value, e.maxTabs || Infinity)), h = r(() => {
|
|
4037
4406
|
if (p.value === m.value) return a.value;
|
|
4038
4407
|
let e = a.value.slice(0, m.value - 1);
|
|
4039
|
-
return e.some(({ id: e }) => e ===
|
|
4040
|
-
}), g =
|
|
4408
|
+
return e.some(({ id: e }) => e === c.value.id) ? e.push(a.value[m.value - 1]) : e.push(c.value), e;
|
|
4409
|
+
}), g = r(() => h.value.length < a.value.length), _ = () => {
|
|
4041
4410
|
d.value = !d.value;
|
|
4042
4411
|
}, v = () => {
|
|
4043
4412
|
d.value = !1;
|
|
@@ -4047,36 +4416,36 @@ var qr = /* @__PURE__ */ u({
|
|
|
4047
4416
|
e.preventDefault(), e.key === "Enter" && _();
|
|
4048
4417
|
}, x = (e) => {
|
|
4049
4418
|
f(e), v();
|
|
4050
|
-
},
|
|
4419
|
+
}, S = () => u(Ln, {
|
|
4051
4420
|
open: d.value,
|
|
4052
4421
|
position: "center",
|
|
4053
4422
|
onCancel: _
|
|
4054
4423
|
}, {
|
|
4055
|
-
trigger: () =>
|
|
4424
|
+
trigger: () => u("div", {
|
|
4056
4425
|
class: [i.value, `${i.value}__dropdown-trigger`],
|
|
4057
4426
|
onClick: y,
|
|
4058
4427
|
onKeypress: b,
|
|
4059
4428
|
tabindex: 0,
|
|
4060
4429
|
role: "button"
|
|
4061
|
-
}, [
|
|
4062
|
-
default: () => a.value.map((e) =>
|
|
4063
|
-
disabled:
|
|
4430
|
+
}, [l(". . .")]),
|
|
4431
|
+
default: () => a.value.map((e) => u(zn, {
|
|
4432
|
+
disabled: c.value.id === e.id,
|
|
4064
4433
|
onClick: () => x(e.id)
|
|
4065
4434
|
}, { default: () => [e.label] }))
|
|
4066
4435
|
});
|
|
4067
|
-
return () =>
|
|
4436
|
+
return () => u("nav", {
|
|
4068
4437
|
role: "navigation",
|
|
4069
|
-
class: [
|
|
4070
|
-
}, [h.value.map((e) =>
|
|
4438
|
+
class: [n.value]
|
|
4439
|
+
}, [h.value.map((e) => u(Mi, {
|
|
4071
4440
|
key: `${e.label}-${e.id}`,
|
|
4072
4441
|
id: e.id,
|
|
4073
|
-
selected:
|
|
4442
|
+
selected: c.value.id === e.id,
|
|
4074
4443
|
value: e.value
|
|
4075
|
-
}, { default: () => [e.label] })), g.value ?
|
|
4444
|
+
}, { default: () => [e.label] })), g.value ? u(S, null, null) : null]);
|
|
4076
4445
|
}
|
|
4077
|
-
}),
|
|
4078
|
-
let e =
|
|
4079
|
-
return
|
|
4446
|
+
}), Fi = () => {
|
|
4447
|
+
let e = Z();
|
|
4448
|
+
return r(() => P({
|
|
4080
4449
|
"&, *": {
|
|
4081
4450
|
margin: 0,
|
|
4082
4451
|
padding: 0,
|
|
@@ -4134,7 +4503,7 @@ var qr = /* @__PURE__ */ u({
|
|
|
4134
4503
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
4135
4504
|
"&--full-width": { width: "100%" }
|
|
4136
4505
|
}));
|
|
4137
|
-
},
|
|
4506
|
+
}, Ii = 1, Li = /* @__PURE__ */ d({
|
|
4138
4507
|
name: "TTextArea",
|
|
4139
4508
|
emits: [
|
|
4140
4509
|
"input",
|
|
@@ -4160,13 +4529,13 @@ var qr = /* @__PURE__ */ u({
|
|
|
4160
4529
|
default: void 0
|
|
4161
4530
|
}
|
|
4162
4531
|
},
|
|
4163
|
-
setup(e, { attrs: t, emit:
|
|
4164
|
-
let o =
|
|
4532
|
+
setup(e, { attrs: t, emit: n, slots: i, expose: a }) {
|
|
4533
|
+
let o = r(() => U({}, e, t)), s = Fi(), c = r({
|
|
4165
4534
|
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
4166
4535
|
set: (e) => {
|
|
4167
|
-
|
|
4536
|
+
n("update:modelValue", e), n("input", e), n("change", e);
|
|
4168
4537
|
}
|
|
4169
|
-
}),
|
|
4538
|
+
}), l = () => {
|
|
4170
4539
|
let e = m.value;
|
|
4171
4540
|
if (!e || !o.value.autoResize) return;
|
|
4172
4541
|
e.style.height = "auto";
|
|
@@ -4177,17 +4546,17 @@ var qr = /* @__PURE__ */ u({
|
|
|
4177
4546
|
}
|
|
4178
4547
|
e.style.height = `${e.scrollHeight + n + r}px`;
|
|
4179
4548
|
}, d = (e) => {
|
|
4180
|
-
c.value = e.target.value,
|
|
4549
|
+
c.value = e.target.value, l();
|
|
4181
4550
|
}, f = (e) => {
|
|
4182
|
-
|
|
4551
|
+
n("focus", e);
|
|
4183
4552
|
}, p = (e) => {
|
|
4184
|
-
|
|
4185
|
-
}, m =
|
|
4553
|
+
n("blur", e);
|
|
4554
|
+
}, m = T(null);
|
|
4186
4555
|
return a({ focus: () => {
|
|
4187
4556
|
m.value?.focus();
|
|
4188
|
-
} }),
|
|
4189
|
-
o.value.autoResize && (await
|
|
4190
|
-
}), () =>
|
|
4557
|
+
} }), j(() => c.value, async () => {
|
|
4558
|
+
o.value.autoResize && (await _(), l());
|
|
4559
|
+
}), () => u("div", { class: [
|
|
4191
4560
|
s.value,
|
|
4192
4561
|
`${s.value}__container`,
|
|
4193
4562
|
{
|
|
@@ -4196,15 +4565,15 @@ var qr = /* @__PURE__ */ u({
|
|
|
4196
4565
|
[`${s.value}--multiline`]: o.value.multiline
|
|
4197
4566
|
}
|
|
4198
4567
|
] }, [
|
|
4199
|
-
i.label?.() || o.value.label &&
|
|
4568
|
+
i.label?.() || o.value.label && u("label", {
|
|
4200
4569
|
class: [`${s.value}__label`],
|
|
4201
4570
|
for: o.value.id
|
|
4202
4571
|
}, [o.value.label]),
|
|
4203
|
-
|
|
4572
|
+
u("div", { class: `${s.value}__textarea-wrapper` }, [u("textarea", g(t, {
|
|
4204
4573
|
id: o.value.id,
|
|
4205
4574
|
class: [`${s.value}__textarea`, { [`${s.value}__textarea--auto-resize`]: o.value.autoResize }],
|
|
4206
4575
|
style: o.value.autoResize ? { height: "auto" } : void 0,
|
|
4207
|
-
rows: o.value.autoResize ?
|
|
4576
|
+
rows: o.value.autoResize ? Ii : void 0,
|
|
4208
4577
|
placeholder: o.value.placeholder,
|
|
4209
4578
|
value: c.value,
|
|
4210
4579
|
onInput: d,
|
|
@@ -4214,63 +4583,63 @@ var qr = /* @__PURE__ */ u({
|
|
|
4214
4583
|
maxlength: o.value.maxlength,
|
|
4215
4584
|
ref: m
|
|
4216
4585
|
}), null)]),
|
|
4217
|
-
i.helperText?.() || o.value.helperText &&
|
|
4586
|
+
i.helperText?.() || o.value.helperText && u("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
4218
4587
|
]);
|
|
4219
4588
|
}
|
|
4220
|
-
}),
|
|
4589
|
+
}), Ri = /* @__PURE__ */ d({
|
|
4221
4590
|
name: "TThemeProvider",
|
|
4222
4591
|
inheritAttrs: !1,
|
|
4223
4592
|
props: { theme: {
|
|
4224
4593
|
type: Object,
|
|
4225
4594
|
default: () => ({})
|
|
4226
4595
|
} },
|
|
4227
|
-
setup(e, { slots: t, attrs:
|
|
4228
|
-
let i =
|
|
4229
|
-
return
|
|
4596
|
+
setup(e, { slots: t, attrs: n }) {
|
|
4597
|
+
let i = r(() => sn(e.theme ?? {}));
|
|
4598
|
+
return w(cn, i), () => {
|
|
4230
4599
|
let { cssVars: e } = i.value;
|
|
4231
|
-
return
|
|
4232
|
-
...
|
|
4233
|
-
class: ["toku-theme",
|
|
4234
|
-
style: e ? [
|
|
4600
|
+
return f("div", {
|
|
4601
|
+
...n,
|
|
4602
|
+
class: ["toku-theme", n.class],
|
|
4603
|
+
style: e ? [n.style, e] : n.style
|
|
4235
4604
|
}, t.default?.());
|
|
4236
4605
|
};
|
|
4237
4606
|
}
|
|
4238
4607
|
});
|
|
4239
4608
|
//#endregion
|
|
4240
4609
|
//#region src/composables/click.ts
|
|
4241
|
-
function
|
|
4610
|
+
function zi(e, t) {
|
|
4242
4611
|
let n = (n) => {
|
|
4243
4612
|
let r = e();
|
|
4244
4613
|
r && !r.contains(n.target) && t();
|
|
4245
4614
|
};
|
|
4246
|
-
|
|
4615
|
+
x(() => {
|
|
4247
4616
|
document.addEventListener("click", n);
|
|
4248
|
-
}),
|
|
4617
|
+
}), b(() => {
|
|
4249
4618
|
document.removeEventListener("click", n);
|
|
4250
4619
|
});
|
|
4251
4620
|
}
|
|
4252
4621
|
//#endregion
|
|
4253
4622
|
//#region src/composables/tooltip.ts
|
|
4254
|
-
var
|
|
4255
|
-
let t =
|
|
4256
|
-
t.value = !0,
|
|
4623
|
+
var Bi = (e) => {
|
|
4624
|
+
let t = T(!1), n = null, i = () => {
|
|
4625
|
+
t.value = !0, n && clearTimeout(n);
|
|
4257
4626
|
}, a = () => t.value = !1, o = {
|
|
4258
4627
|
hover: {
|
|
4259
4628
|
onMouseenter: i,
|
|
4260
4629
|
onMouseleave: () => {
|
|
4261
|
-
|
|
4630
|
+
n = setTimeout(a, .1 * 1e3);
|
|
4262
4631
|
}
|
|
4263
4632
|
},
|
|
4264
4633
|
click: { onClick: () => t.value ? a() : i() }
|
|
4265
|
-
}, s =
|
|
4266
|
-
return
|
|
4634
|
+
}, s = r(() => o[e.value ?? "hover"]), c = T(null);
|
|
4635
|
+
return zi(() => c.value, a), {
|
|
4267
4636
|
isVisible: t,
|
|
4268
4637
|
triggerHandler: s,
|
|
4269
4638
|
wrapperRef: c
|
|
4270
4639
|
};
|
|
4271
|
-
},
|
|
4272
|
-
let e =
|
|
4273
|
-
return
|
|
4640
|
+
}, Vi = () => {
|
|
4641
|
+
let e = Z();
|
|
4642
|
+
return r(() => P({
|
|
4274
4643
|
position: "relative",
|
|
4275
4644
|
width: "fit-content",
|
|
4276
4645
|
"&, *": {
|
|
@@ -4360,11 +4729,11 @@ var di = (e) => {
|
|
|
4360
4729
|
"&--medium &__tooltip": { maxWidth: "30ch" },
|
|
4361
4730
|
"&--large &__tooltip": { maxWidth: "35ch" }
|
|
4362
4731
|
}));
|
|
4363
|
-
},
|
|
4732
|
+
}, Hi = {
|
|
4364
4733
|
position: "right",
|
|
4365
4734
|
size: "medium",
|
|
4366
4735
|
trigger: "hover"
|
|
4367
|
-
},
|
|
4736
|
+
}, Ui = /* @__PURE__ */ d({
|
|
4368
4737
|
name: "TTooltip",
|
|
4369
4738
|
props: {
|
|
4370
4739
|
label: String,
|
|
@@ -4373,8 +4742,8 @@ var di = (e) => {
|
|
|
4373
4742
|
size: String,
|
|
4374
4743
|
trigger: String
|
|
4375
4744
|
},
|
|
4376
|
-
setup(e, { slots: t, attrs:
|
|
4377
|
-
let i =
|
|
4745
|
+
setup(e, { slots: t, attrs: n }) {
|
|
4746
|
+
let i = r(() => U({}, Hi, e, n)), { isVisible: a, wrapperRef: o, triggerHandler: s } = Bi(r(() => i.value.trigger)), c = Vi(), l = r(() => [
|
|
4378
4747
|
c.value,
|
|
4379
4748
|
`${c.value}--${i.value.position}`,
|
|
4380
4749
|
`${c.value}--${i.value.trigger}`,
|
|
@@ -4384,17 +4753,17 @@ var di = (e) => {
|
|
|
4384
4753
|
[`${c.value}--${i.value.size}`]: i.value.multilined
|
|
4385
4754
|
}
|
|
4386
4755
|
]);
|
|
4387
|
-
return () =>
|
|
4756
|
+
return () => u("div", g({
|
|
4388
4757
|
ref: o,
|
|
4389
|
-
class:
|
|
4390
|
-
}, s.value), [t.default?.(),
|
|
4758
|
+
class: l.value
|
|
4759
|
+
}, s.value), [t.default?.(), u("div", {
|
|
4391
4760
|
role: "tooltip",
|
|
4392
4761
|
class: `${c.value}__tooltip`
|
|
4393
4762
|
}, [t.label?.() || i.value.label])]);
|
|
4394
4763
|
}
|
|
4395
|
-
}),
|
|
4396
|
-
let e =
|
|
4397
|
-
return
|
|
4764
|
+
}), Wi = () => {
|
|
4765
|
+
let e = Z();
|
|
4766
|
+
return r(() => P({
|
|
4398
4767
|
"&, *": {
|
|
4399
4768
|
margin: 0,
|
|
4400
4769
|
boxSizing: "border-box",
|
|
@@ -4419,31 +4788,31 @@ var di = (e) => {
|
|
|
4419
4788
|
"&--success": {
|
|
4420
4789
|
borderColor: e.value.colors.success,
|
|
4421
4790
|
color: e.value.colors.success,
|
|
4422
|
-
background:
|
|
4791
|
+
background: q(e.value.colors.success, .2)
|
|
4423
4792
|
},
|
|
4424
4793
|
"&--success > &__text": { color: e.value.colors.success },
|
|
4425
4794
|
"&--in-process": {
|
|
4426
4795
|
borderColor: e.value.colors.inProcess,
|
|
4427
4796
|
color: e.value.colors.inProcess,
|
|
4428
|
-
background:
|
|
4797
|
+
background: q(e.value.colors.inProcess, .2)
|
|
4429
4798
|
},
|
|
4430
4799
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
4431
4800
|
"&--warning": {
|
|
4432
4801
|
borderColor: e.value.colors.warning,
|
|
4433
4802
|
color: e.value.colors.warning,
|
|
4434
|
-
background:
|
|
4803
|
+
background: q(e.value.colors.warning, .2)
|
|
4435
4804
|
},
|
|
4436
4805
|
"&--warning > &__text": { color: e.value.colors.warning },
|
|
4437
4806
|
"&--error": {
|
|
4438
4807
|
borderColor: e.value.colors.error,
|
|
4439
4808
|
color: e.value.colors.error,
|
|
4440
|
-
background:
|
|
4809
|
+
background: q(e.value.colors.error, .2)
|
|
4441
4810
|
},
|
|
4442
4811
|
"&--error > &__text": { color: e.value.colors.error },
|
|
4443
4812
|
"&--info": {
|
|
4444
4813
|
borderColor: e.value.colors.info,
|
|
4445
4814
|
color: e.value.colors.info,
|
|
4446
|
-
background:
|
|
4815
|
+
background: q(e.value.colors.info, .2)
|
|
4447
4816
|
},
|
|
4448
4817
|
"&--info > &__text": { color: e.value.colors.info },
|
|
4449
4818
|
"&__icon": {
|
|
@@ -4467,7 +4836,7 @@ var di = (e) => {
|
|
|
4467
4836
|
}
|
|
4468
4837
|
}
|
|
4469
4838
|
}));
|
|
4470
|
-
},
|
|
4839
|
+
}, Gi = { variant: "default" }, Ki = /* @__PURE__ */ d({
|
|
4471
4840
|
name: "TWarning",
|
|
4472
4841
|
props: {
|
|
4473
4842
|
fullWidth: Boolean,
|
|
@@ -4475,10 +4844,10 @@ var di = (e) => {
|
|
|
4475
4844
|
variant: String
|
|
4476
4845
|
},
|
|
4477
4846
|
setup(e, { slots: t }) {
|
|
4478
|
-
let
|
|
4847
|
+
let n = r(() => U({}, Gi, e)), i = Wi(), a = r(() => [
|
|
4479
4848
|
i.value,
|
|
4480
|
-
`${i.value}--${
|
|
4481
|
-
{ [`${i.value}--full-width`]:
|
|
4849
|
+
`${i.value}--${n.value.variant}`,
|
|
4850
|
+
{ [`${i.value}--full-width`]: n.value.fullWidth }
|
|
4482
4851
|
]), o = {
|
|
4483
4852
|
default: "gray.medium1",
|
|
4484
4853
|
success: "success",
|
|
@@ -4486,43 +4855,43 @@ var di = (e) => {
|
|
|
4486
4855
|
warning: "warning",
|
|
4487
4856
|
error: "error",
|
|
4488
4857
|
info: "info"
|
|
4489
|
-
}, s =
|
|
4490
|
-
return () =>
|
|
4858
|
+
}, s = r(() => o[n.value.variant]);
|
|
4859
|
+
return () => u("div", {
|
|
4491
4860
|
class: a.value,
|
|
4492
4861
|
role: "alert"
|
|
4493
4862
|
}, [
|
|
4494
|
-
|
|
4495
|
-
icon:
|
|
4863
|
+
n.value.icon && u(Q, {
|
|
4864
|
+
icon: n.value.icon,
|
|
4496
4865
|
class: `${i.value}__icon`,
|
|
4497
4866
|
color: s.value
|
|
4498
4867
|
}, null),
|
|
4499
4868
|
" ",
|
|
4500
|
-
t.content?.() ? t.content?.() :
|
|
4869
|
+
t.content?.() ? t.content?.() : u($, {
|
|
4501
4870
|
variant: "b3",
|
|
4502
4871
|
class: `${i.value}__text`
|
|
4503
4872
|
}, { default: () => [t.default?.()] })
|
|
4504
4873
|
]);
|
|
4505
4874
|
}
|
|
4506
|
-
}),
|
|
4507
|
-
let
|
|
4508
|
-
document.body.appendChild(
|
|
4509
|
-
let a =
|
|
4510
|
-
return
|
|
4875
|
+
}), qi = () => ({ open: ({ onCancel: e, onConfirm: t, ...n }) => {
|
|
4876
|
+
let r = document.createElement("div");
|
|
4877
|
+
document.body.appendChild(r);
|
|
4878
|
+
let a = i({ render() {
|
|
4879
|
+
return f(Pr, {
|
|
4511
4880
|
...n,
|
|
4512
4881
|
onConfirm: () => {
|
|
4513
|
-
t?.(), a.unmount(),
|
|
4882
|
+
t?.(), a.unmount(), r.remove();
|
|
4514
4883
|
},
|
|
4515
4884
|
onCancel: () => {
|
|
4516
|
-
e?.(), a.unmount(),
|
|
4885
|
+
e?.(), a.unmount(), r.remove();
|
|
4517
4886
|
},
|
|
4518
4887
|
onClose: () => {
|
|
4519
|
-
e?.(), a.unmount(),
|
|
4888
|
+
e?.(), a.unmount(), r.remove();
|
|
4520
4889
|
}
|
|
4521
4890
|
});
|
|
4522
4891
|
} });
|
|
4523
|
-
a.mount(
|
|
4892
|
+
a.mount(r);
|
|
4524
4893
|
} });
|
|
4525
4894
|
//#endregion
|
|
4526
|
-
export {
|
|
4895
|
+
export { hn as TButton, Dn as TCardButton, jn as TCheckbox, dn as TChip, Wn as TCombobox, _r as TCommandPalette, Pr as TDialog, Ln as TDropdown, zn as TDropdownItem, Hr as TFileUpload, Q as TIcon, Gr as TIconButton, Jr as TLink, ei as TLoading, ii as TLoadingDots, br as TModal, si as TRadio, Si as TSelect, Ti as TSelectDropdown, Di as TSelectDropdownItem, Zr as TSpinner, Oi as TSwitch, Ai as TTabBar, Pi as TTabBarExtended, yn as TTag, Li as TTextArea, Hn as TTextInput, Ri as TThemeProvider, Ui as TTooltip, $ as TTypography, Ki as TWarning, se as baseTheme, sn as createTheme, cn as injectionKey, qi as useDialog, li as useScrollbarThumb, Z as useTheme };
|
|
4527
4896
|
|
|
4528
4897
|
//# sourceMappingURL=index.es.js.map
|