toku-ui 4.0.0 → 4.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/TDialog/TDialog.d.ts +2 -0
- package/dist/components/TDialog/TDialog.d.ts.map +1 -1
- package/dist/components/TDialog/TDialog.types.d.ts +1 -0
- package/dist/components/TDialog/TDialog.types.d.ts.map +1 -1
- package/dist/components/TFileUpload/TFileUpload.stories.d.ts +13 -0
- package/dist/components/TFileUpload/TFileUpload.stories.d.ts.map +1 -0
- package/dist/components/TFileUpload/TFileUpload.vue.d.ts +155 -0
- package/dist/components/TFileUpload/TFileUpload.vue.d.ts.map +1 -0
- package/dist/components/TFileUpload/index.d.ts +3 -0
- package/dist/components/TFileUpload/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.es.js +1106 -915
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -2
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Teleport as e, Text as t, computed as n, createApp as r,
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { css as
|
|
1
|
+
import { Teleport as e, Text as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, h as d, inject as f, isVNode as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, onBeforeUnmount as v, onMounted as y, onUnmounted as b, openBlock as x, provide as S, ref as C, renderSlot as w, toDisplayString as T, unref as E, useCssVars as ee, useId as te, useModel as ne, watch as D, withCtx as O } from "vue";
|
|
2
|
+
import { Icon as k } from "@iconify/vue";
|
|
3
|
+
import { css as A } from "@emotion/css";
|
|
4
|
+
import { Primitive as re } from "reka-ui";
|
|
4
5
|
//#region src/theme/base.ts
|
|
5
|
-
var
|
|
6
|
+
var ie = {
|
|
6
7
|
colors: {
|
|
7
8
|
primary: {
|
|
8
9
|
main: "#5C0087",
|
|
@@ -57,22 +58,22 @@ var E = {
|
|
|
57
58
|
};
|
|
58
59
|
//#endregion
|
|
59
60
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
60
|
-
function
|
|
61
|
+
function ae(e) {
|
|
61
62
|
return Number.isSafeInteger(e) && e >= 0;
|
|
62
63
|
}
|
|
63
64
|
//#endregion
|
|
64
65
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
|
|
65
|
-
function
|
|
66
|
-
return e != null && typeof e != "function" &&
|
|
66
|
+
function oe(e) {
|
|
67
|
+
return e != null && typeof e != "function" && ae(e.length);
|
|
67
68
|
}
|
|
68
69
|
//#endregion
|
|
69
70
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
70
|
-
function
|
|
71
|
+
function j(e) {
|
|
71
72
|
return e === "__proto__";
|
|
72
73
|
}
|
|
73
74
|
//#endregion
|
|
74
75
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
|
|
75
|
-
function
|
|
76
|
+
function se(e) {
|
|
76
77
|
switch (typeof e) {
|
|
77
78
|
case "number":
|
|
78
79
|
case "symbol": return !1;
|
|
@@ -81,24 +82,24 @@ function ne(e) {
|
|
|
81
82
|
}
|
|
82
83
|
//#endregion
|
|
83
84
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
|
|
84
|
-
function
|
|
85
|
+
function ce(e) {
|
|
85
86
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
86
87
|
}
|
|
87
88
|
//#endregion
|
|
88
89
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
89
|
-
function
|
|
90
|
+
function le(e) {
|
|
90
91
|
if (e == null) return "";
|
|
91
92
|
if (typeof e == "string") return e;
|
|
92
|
-
if (Array.isArray(e)) return e.map(
|
|
93
|
+
if (Array.isArray(e)) return e.map(le).join(",");
|
|
93
94
|
let t = String(e);
|
|
94
95
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
95
96
|
}
|
|
96
97
|
//#endregion
|
|
97
98
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs
|
|
98
|
-
function
|
|
99
|
-
if (Array.isArray(e)) return e.map(
|
|
99
|
+
function ue(e) {
|
|
100
|
+
if (Array.isArray(e)) return e.map(ce);
|
|
100
101
|
if (typeof e == "symbol") return [e];
|
|
101
|
-
e =
|
|
102
|
+
e = le(e);
|
|
102
103
|
let t = [], n = e.length;
|
|
103
104
|
if (n === 0) return t;
|
|
104
105
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -110,81 +111,81 @@ function ae(e) {
|
|
|
110
111
|
}
|
|
111
112
|
//#endregion
|
|
112
113
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/get.mjs
|
|
113
|
-
function
|
|
114
|
+
function M(e, t, n) {
|
|
114
115
|
if (e == null) return n;
|
|
115
116
|
switch (typeof t) {
|
|
116
117
|
case "string": {
|
|
117
|
-
if (
|
|
118
|
+
if (j(t)) return n;
|
|
118
119
|
let r = e[t];
|
|
119
|
-
return r === void 0 ?
|
|
120
|
+
return r === void 0 ? se(t) ? M(e, ue(t), n) : n : r;
|
|
120
121
|
}
|
|
121
122
|
case "number":
|
|
122
123
|
case "symbol": {
|
|
123
|
-
typeof t == "number" && (t =
|
|
124
|
+
typeof t == "number" && (t = ce(t));
|
|
124
125
|
let r = e[t];
|
|
125
126
|
return r === void 0 ? n : r;
|
|
126
127
|
}
|
|
127
128
|
default: {
|
|
128
|
-
if (Array.isArray(t)) return
|
|
129
|
-
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t),
|
|
129
|
+
if (Array.isArray(t)) return de(e, t, n);
|
|
130
|
+
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), j(t)) return n;
|
|
130
131
|
let r = e[t];
|
|
131
132
|
return r === void 0 ? n : r;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
+
function de(e, t, n) {
|
|
136
137
|
if (t.length === 0) return n;
|
|
137
138
|
let r = e;
|
|
138
139
|
for (let e = 0; e < t.length; e++) {
|
|
139
|
-
if (r == null ||
|
|
140
|
+
if (r == null || j(t[e])) return n;
|
|
140
141
|
r = r[t[e]];
|
|
141
142
|
}
|
|
142
143
|
return r === void 0 ? n : r;
|
|
143
144
|
}
|
|
144
145
|
//#endregion
|
|
145
146
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
146
|
-
function
|
|
147
|
+
function fe(e) {
|
|
147
148
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
148
149
|
}
|
|
149
150
|
//#endregion
|
|
150
151
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
151
|
-
function
|
|
152
|
+
function pe(e) {
|
|
152
153
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
153
154
|
}
|
|
154
155
|
//#endregion
|
|
155
156
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
156
|
-
function
|
|
157
|
+
function me(e) {
|
|
157
158
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
158
159
|
}
|
|
159
160
|
//#endregion
|
|
160
161
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
161
|
-
var
|
|
162
|
+
var he = "[object RegExp]", ge = "[object String]", _e = "[object Number]", ve = "[object Boolean]", ye = "[object Arguments]", be = "[object Symbol]", xe = "[object Date]", Se = "[object Map]", Ce = "[object Set]", we = "[object Array]", Te = "[object ArrayBuffer]", Ee = "[object Object]", De = "[object DataView]", Oe = "[object Uint8Array]", ke = "[object Uint8ClampedArray]", Ae = "[object Uint16Array]", je = "[object Uint32Array]", Me = "[object Int8Array]", Ne = "[object Int16Array]", Pe = "[object Int32Array]", Fe = "[object Float32Array]", Ie = "[object Float64Array]", Le = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
|
|
162
163
|
return this;
|
|
163
164
|
})() || Function("return this")();
|
|
164
165
|
//#endregion
|
|
165
166
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
|
|
166
|
-
function
|
|
167
|
-
return
|
|
167
|
+
function Re(e) {
|
|
168
|
+
return Le.Buffer !== void 0 && Le.Buffer.isBuffer(e);
|
|
168
169
|
}
|
|
169
170
|
//#endregion
|
|
170
171
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
171
|
-
function
|
|
172
|
+
function ze(e) {
|
|
172
173
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
173
174
|
}
|
|
174
175
|
//#endregion
|
|
175
176
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
176
|
-
function
|
|
177
|
-
return
|
|
177
|
+
function Be(e, t) {
|
|
178
|
+
return N(e, void 0, e, /* @__PURE__ */ new Map(), t);
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function N(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
180
181
|
let a = i?.(e, t, n, r);
|
|
181
182
|
if (a !== void 0) return a;
|
|
182
|
-
if (
|
|
183
|
+
if (fe(e)) return e;
|
|
183
184
|
if (r.has(e)) return r.get(e);
|
|
184
185
|
if (Array.isArray(e)) {
|
|
185
186
|
let t = Array(e.length);
|
|
186
187
|
r.set(e, t);
|
|
187
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
188
|
+
for (let a = 0; a < e.length; a++) t[a] = N(e[a], a, n, r, i);
|
|
188
189
|
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
|
|
189
190
|
}
|
|
190
191
|
if (e instanceof Date) return new Date(e.getTime());
|
|
@@ -195,112 +196,112 @@ function k(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
195
196
|
if (e instanceof Map) {
|
|
196
197
|
let t = /* @__PURE__ */ new Map();
|
|
197
198
|
r.set(e, t);
|
|
198
|
-
for (let [a, o] of e) t.set(a,
|
|
199
|
+
for (let [a, o] of e) t.set(a, N(o, a, n, r, i));
|
|
199
200
|
return t;
|
|
200
201
|
}
|
|
201
202
|
if (e instanceof Set) {
|
|
202
203
|
let t = /* @__PURE__ */ new Set();
|
|
203
204
|
r.set(e, t);
|
|
204
|
-
for (let a of e) t.add(
|
|
205
|
+
for (let a of e) t.add(N(a, void 0, n, r, i));
|
|
205
206
|
return t;
|
|
206
207
|
}
|
|
207
|
-
if (
|
|
208
|
-
if (
|
|
208
|
+
if (Re(e)) return e.subarray();
|
|
209
|
+
if (ze(e)) {
|
|
209
210
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
210
211
|
r.set(e, t);
|
|
211
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
212
|
+
for (let a = 0; a < e.length; a++) t[a] = N(e[a], a, n, r, i);
|
|
212
213
|
return t;
|
|
213
214
|
}
|
|
214
215
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
215
216
|
if (e instanceof DataView) {
|
|
216
217
|
let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
|
|
217
|
-
return r.set(e, t),
|
|
218
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
218
219
|
}
|
|
219
220
|
if (typeof File < "u" && e instanceof File) {
|
|
220
221
|
let t = new File([e], e.name, { type: e.type });
|
|
221
|
-
return r.set(e, t),
|
|
222
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
222
223
|
}
|
|
223
224
|
if (typeof Blob < "u" && e instanceof Blob) {
|
|
224
225
|
let t = new Blob([e], { type: e.type });
|
|
225
|
-
return r.set(e, t),
|
|
226
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
226
227
|
}
|
|
227
228
|
if (e instanceof Error) {
|
|
228
229
|
let t = structuredClone(e);
|
|
229
|
-
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, P(t, e, n, r, i), t;
|
|
230
231
|
}
|
|
231
232
|
if (e instanceof Boolean) {
|
|
232
233
|
let t = new Boolean(e.valueOf());
|
|
233
|
-
return r.set(e, t),
|
|
234
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
234
235
|
}
|
|
235
236
|
if (e instanceof Number) {
|
|
236
237
|
let t = new Number(e.valueOf());
|
|
237
|
-
return r.set(e, t),
|
|
238
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
238
239
|
}
|
|
239
240
|
if (e instanceof String) {
|
|
240
241
|
let t = new String(e.valueOf());
|
|
241
|
-
return r.set(e, t),
|
|
242
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
242
243
|
}
|
|
243
|
-
if (typeof e == "object" &&
|
|
244
|
+
if (typeof e == "object" && Ve(e)) {
|
|
244
245
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
245
|
-
return r.set(e, t),
|
|
246
|
+
return r.set(e, t), P(t, e, n, r, i), t;
|
|
246
247
|
}
|
|
247
248
|
return e;
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
-
let a = [...Object.keys(t), ...
|
|
250
|
+
function P(e, t, n = e, r, i) {
|
|
251
|
+
let a = [...Object.keys(t), ...pe(t)];
|
|
251
252
|
for (let o = 0; o < a.length; o++) {
|
|
252
253
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
253
|
-
(c == null || c.writable) && (e[s] =
|
|
254
|
+
(c == null || c.writable) && (e[s] = N(t[s], s, n, r, i));
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
-
switch (
|
|
258
|
-
case me:
|
|
257
|
+
function Ve(e) {
|
|
258
|
+
switch (me(e)) {
|
|
259
259
|
case ye:
|
|
260
|
-
case
|
|
261
|
-
case
|
|
262
|
-
case pe:
|
|
263
|
-
case ge:
|
|
264
|
-
case Ae:
|
|
265
|
-
case je:
|
|
260
|
+
case we:
|
|
261
|
+
case Te:
|
|
266
262
|
case De:
|
|
267
|
-
case Oe:
|
|
268
|
-
case ke:
|
|
269
|
-
case _e:
|
|
270
|
-
case fe:
|
|
271
|
-
case xe:
|
|
272
|
-
case ue:
|
|
273
263
|
case ve:
|
|
274
|
-
case
|
|
264
|
+
case xe:
|
|
265
|
+
case Fe:
|
|
266
|
+
case Ie:
|
|
267
|
+
case Me:
|
|
268
|
+
case Ne:
|
|
269
|
+
case Pe:
|
|
270
|
+
case Se:
|
|
271
|
+
case _e:
|
|
272
|
+
case Ee:
|
|
275
273
|
case he:
|
|
276
274
|
case Ce:
|
|
277
|
-
case
|
|
278
|
-
case
|
|
279
|
-
case
|
|
275
|
+
case ge:
|
|
276
|
+
case be:
|
|
277
|
+
case Oe:
|
|
278
|
+
case ke:
|
|
279
|
+
case Ae:
|
|
280
|
+
case je: return !0;
|
|
280
281
|
default: return !1;
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
//#endregion
|
|
284
285
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
|
|
285
|
-
function
|
|
286
|
-
return
|
|
286
|
+
function He(e, t) {
|
|
287
|
+
return Be(e, (n, r, i, a) => {
|
|
287
288
|
let o = t?.(n, r, i, a);
|
|
288
289
|
if (o !== void 0) return o;
|
|
289
290
|
if (typeof e == "object") {
|
|
290
|
-
if (
|
|
291
|
+
if (me(e) === "[object Object]" && typeof e.constructor != "function") {
|
|
291
292
|
let t = {};
|
|
292
|
-
return a.set(e, t),
|
|
293
|
+
return a.set(e, t), P(t, e, i, a), t;
|
|
293
294
|
}
|
|
294
295
|
switch (Object.prototype.toString.call(e)) {
|
|
295
|
-
case
|
|
296
|
-
case
|
|
297
|
-
case
|
|
296
|
+
case _e:
|
|
297
|
+
case ge:
|
|
298
|
+
case ve: {
|
|
298
299
|
let t = new e.constructor(e?.valueOf());
|
|
299
|
-
return
|
|
300
|
+
return P(t, e), t;
|
|
300
301
|
}
|
|
301
|
-
case
|
|
302
|
+
case ye: {
|
|
302
303
|
let t = {};
|
|
303
|
-
return
|
|
304
|
+
return P(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
|
|
304
305
|
}
|
|
305
306
|
default: return;
|
|
306
307
|
}
|
|
@@ -309,35 +310,35 @@ function Le(e, t) {
|
|
|
309
310
|
}
|
|
310
311
|
//#endregion
|
|
311
312
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
|
|
312
|
-
function
|
|
313
|
-
return
|
|
313
|
+
function Ue(e) {
|
|
314
|
+
return He(e);
|
|
314
315
|
}
|
|
315
316
|
//#endregion
|
|
316
317
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
|
|
317
|
-
function
|
|
318
|
-
return typeof e == "object" && !!e &&
|
|
318
|
+
function We(e) {
|
|
319
|
+
return typeof e == "object" && !!e && me(e) === "[object Arguments]";
|
|
319
320
|
}
|
|
320
321
|
//#endregion
|
|
321
322
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
|
|
322
|
-
function
|
|
323
|
+
function Ge(e) {
|
|
323
324
|
return typeof e == "object" && !!e;
|
|
324
325
|
}
|
|
325
326
|
//#endregion
|
|
326
327
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
|
|
327
|
-
function
|
|
328
|
-
return
|
|
328
|
+
function Ke(e) {
|
|
329
|
+
return Ge(e) && oe(e);
|
|
329
330
|
}
|
|
330
331
|
//#endregion
|
|
331
332
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/function/noop.mjs
|
|
332
|
-
function
|
|
333
|
+
function qe() {}
|
|
333
334
|
//#endregion
|
|
334
335
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
335
|
-
function
|
|
336
|
-
return
|
|
336
|
+
function Je(e) {
|
|
337
|
+
return ze(e);
|
|
337
338
|
}
|
|
338
339
|
//#endregion
|
|
339
340
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
340
|
-
function
|
|
341
|
+
function Ye(e) {
|
|
341
342
|
if (typeof e != "object" || !e) return !1;
|
|
342
343
|
if (Object.getPrototypeOf(e) === null) return !0;
|
|
343
344
|
if (Object.prototype.toString.call(e) !== "[object Object]") {
|
|
@@ -350,9 +351,9 @@ function Ue(e) {
|
|
|
350
351
|
}
|
|
351
352
|
//#endregion
|
|
352
353
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/clone.mjs
|
|
353
|
-
function
|
|
354
|
-
if (
|
|
355
|
-
if (Array.isArray(e) ||
|
|
354
|
+
function Xe(e) {
|
|
355
|
+
if (fe(e)) return e;
|
|
356
|
+
if (Array.isArray(e) || ze(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
356
357
|
let t = Object.getPrototypeOf(e);
|
|
357
358
|
if (t == null) return Object.assign(Object.create(t), e);
|
|
358
359
|
let n = t.constructor;
|
|
@@ -373,106 +374,106 @@ function We(e) {
|
|
|
373
374
|
}
|
|
374
375
|
//#endregion
|
|
375
376
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
|
|
376
|
-
function
|
|
377
|
+
function Ze(e, ...t) {
|
|
377
378
|
let n = t.slice(0, -1), r = t[t.length - 1], i = e;
|
|
378
379
|
for (let e = 0; e < n.length; e++) {
|
|
379
380
|
let t = n[e];
|
|
380
|
-
i =
|
|
381
|
+
i = Qe(i, t, r, /* @__PURE__ */ new Map());
|
|
381
382
|
}
|
|
382
383
|
return i;
|
|
383
384
|
}
|
|
384
|
-
function
|
|
385
|
-
if (
|
|
386
|
-
if (r.has(t)) return
|
|
385
|
+
function Qe(e, t, n, r) {
|
|
386
|
+
if (fe(e) && (e = Object(e)), typeof t != "object" || !t) return e;
|
|
387
|
+
if (r.has(t)) return Xe(r.get(t));
|
|
387
388
|
if (r.set(t, e), Array.isArray(t)) {
|
|
388
389
|
t = t.slice();
|
|
389
390
|
for (let e = 0; e < t.length; e++) t[e] = t[e] ?? void 0;
|
|
390
391
|
}
|
|
391
|
-
let i = [...Object.keys(t), ...
|
|
392
|
+
let i = [...Object.keys(t), ...pe(t)];
|
|
392
393
|
for (let a = 0; a < i.length; a++) {
|
|
393
394
|
let o = i[a];
|
|
394
|
-
if (
|
|
395
|
+
if (j(o)) continue;
|
|
395
396
|
let s = t[o], c = e[o];
|
|
396
|
-
if (
|
|
397
|
+
if (We(s) && (s = { ...s }), We(c) && (c = { ...c }), Re(s) && (s = Ue(s)), Array.isArray(s)) if (Array.isArray(c)) {
|
|
397
398
|
let e = [], t = Reflect.ownKeys(c);
|
|
398
399
|
for (let n = 0; n < t.length; n++) {
|
|
399
400
|
let r = t[n];
|
|
400
401
|
e[r] = c[r];
|
|
401
402
|
}
|
|
402
403
|
c = e;
|
|
403
|
-
} else if (
|
|
404
|
+
} else if (Ke(c)) {
|
|
404
405
|
let e = [];
|
|
405
406
|
for (let t = 0; t < c.length; t++) e[t] = c[t];
|
|
406
407
|
c = e;
|
|
407
408
|
} else c = [];
|
|
408
409
|
let l = n(c, s, o, e, t, r);
|
|
409
|
-
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;
|
|
410
411
|
}
|
|
411
412
|
return e;
|
|
412
413
|
}
|
|
413
414
|
//#endregion
|
|
414
415
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/merge.mjs
|
|
415
|
-
function
|
|
416
|
-
return
|
|
416
|
+
function F(e, ...t) {
|
|
417
|
+
return Ze(e, ...t, qe);
|
|
417
418
|
}
|
|
418
419
|
//#endregion
|
|
419
420
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
420
|
-
function
|
|
421
|
+
function $e(e) {
|
|
421
422
|
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
422
423
|
}
|
|
423
424
|
//#endregion
|
|
424
425
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/words.mjs
|
|
425
|
-
var
|
|
426
|
-
function
|
|
427
|
-
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) ?? []);
|
|
428
429
|
}
|
|
429
430
|
//#endregion
|
|
430
431
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
431
|
-
function
|
|
432
|
-
let t =
|
|
432
|
+
function nt(e) {
|
|
433
|
+
let t = tt(e);
|
|
433
434
|
if (t.length === 0) return "";
|
|
434
435
|
let [n, ...r] = t;
|
|
435
|
-
return `${n.toLowerCase()}${r.map((e) =>
|
|
436
|
+
return `${n.toLowerCase()}${r.map((e) => $e(e)).join("")}`;
|
|
436
437
|
}
|
|
437
438
|
//#endregion
|
|
438
439
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
439
|
-
function
|
|
440
|
-
return
|
|
440
|
+
function I() {
|
|
441
|
+
return I = Object.assign ? Object.assign.bind() : function(e) {
|
|
441
442
|
for (var t = 1; t < arguments.length; t++) {
|
|
442
443
|
var n = arguments[t];
|
|
443
444
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
444
445
|
}
|
|
445
446
|
return e;
|
|
446
|
-
},
|
|
447
|
+
}, I.apply(null, arguments);
|
|
447
448
|
}
|
|
448
449
|
//#endregion
|
|
449
450
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
450
|
-
function
|
|
451
|
+
function rt(e) {
|
|
451
452
|
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
452
453
|
return e;
|
|
453
454
|
}
|
|
454
455
|
//#endregion
|
|
455
456
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
456
|
-
function
|
|
457
|
-
return
|
|
457
|
+
function L(e, t) {
|
|
458
|
+
return L = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
458
459
|
return e.__proto__ = t, e;
|
|
459
|
-
},
|
|
460
|
+
}, L(e, t);
|
|
460
461
|
}
|
|
461
462
|
//#endregion
|
|
462
463
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
463
|
-
function
|
|
464
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
464
|
+
function it(e, t) {
|
|
465
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, L(e, t);
|
|
465
466
|
}
|
|
466
467
|
//#endregion
|
|
467
468
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
468
|
-
function
|
|
469
|
-
return
|
|
469
|
+
function at(e) {
|
|
470
|
+
return at = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
470
471
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
471
|
-
},
|
|
472
|
+
}, at(e);
|
|
472
473
|
}
|
|
473
474
|
//#endregion
|
|
474
475
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
|
|
475
|
-
function
|
|
476
|
+
function ot(e) {
|
|
476
477
|
try {
|
|
477
478
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
478
479
|
} catch {
|
|
@@ -481,48 +482,48 @@ function et(e) {
|
|
|
481
482
|
}
|
|
482
483
|
//#endregion
|
|
483
484
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
|
|
484
|
-
function
|
|
485
|
+
function st() {
|
|
485
486
|
try {
|
|
486
487
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
487
488
|
} catch {}
|
|
488
|
-
return (
|
|
489
|
+
return (st = function() {
|
|
489
490
|
return !!e;
|
|
490
491
|
})();
|
|
491
492
|
}
|
|
492
493
|
//#endregion
|
|
493
494
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/construct.js
|
|
494
|
-
function
|
|
495
|
-
if (
|
|
495
|
+
function ct(e, t, n) {
|
|
496
|
+
if (st()) return Reflect.construct.apply(null, arguments);
|
|
496
497
|
var r = [null];
|
|
497
498
|
r.push.apply(r, t);
|
|
498
499
|
var i = new (e.bind.apply(e, r))();
|
|
499
|
-
return n &&
|
|
500
|
+
return n && L(i, n.prototype), i;
|
|
500
501
|
}
|
|
501
502
|
//#endregion
|
|
502
503
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
|
|
503
|
-
function
|
|
504
|
+
function lt(e) {
|
|
504
505
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
505
|
-
return
|
|
506
|
-
if (e === null || !
|
|
506
|
+
return lt = function(e) {
|
|
507
|
+
if (e === null || !ot(e)) return e;
|
|
507
508
|
if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
|
|
508
509
|
if (t !== void 0) {
|
|
509
510
|
if (t.has(e)) return t.get(e);
|
|
510
511
|
t.set(e, n);
|
|
511
512
|
}
|
|
512
513
|
function n() {
|
|
513
|
-
return
|
|
514
|
+
return ct(e, arguments, at(this).constructor);
|
|
514
515
|
}
|
|
515
516
|
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
516
517
|
value: n,
|
|
517
518
|
enumerable: !1,
|
|
518
519
|
writable: !0,
|
|
519
520
|
configurable: !0
|
|
520
|
-
} }),
|
|
521
|
-
},
|
|
521
|
+
} }), L(n, e);
|
|
522
|
+
}, lt(e);
|
|
522
523
|
}
|
|
523
524
|
//#endregion
|
|
524
525
|
//#region node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js
|
|
525
|
-
var
|
|
526
|
+
var ut = {
|
|
526
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",
|
|
527
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",
|
|
528
529
|
3: "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
|
|
@@ -602,40 +603,40 @@ var it = {
|
|
|
602
603
|
77: "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
603
604
|
78: "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
604
605
|
};
|
|
605
|
-
function
|
|
606
|
+
function dt() {
|
|
606
607
|
var e = [...arguments], t = e[0], n = [], r;
|
|
607
608
|
for (r = 1; r < e.length; r += 1) n.push(e[r]);
|
|
608
609
|
return n.forEach(function(e) {
|
|
609
610
|
t = t.replace(/%[a-z]/, e);
|
|
610
611
|
}), t;
|
|
611
612
|
}
|
|
612
|
-
var
|
|
613
|
-
|
|
613
|
+
var R = /* @__PURE__ */ function(e) {
|
|
614
|
+
it(t, e);
|
|
614
615
|
function t(t) {
|
|
615
616
|
var n;
|
|
616
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;
|
|
617
618
|
else {
|
|
618
619
|
var r = [...arguments].slice(1);
|
|
619
|
-
n = e.call(this,
|
|
620
|
+
n = e.call(this, dt.apply(void 0, [ut[t]].concat(r))) || this;
|
|
620
621
|
}
|
|
621
|
-
return
|
|
622
|
+
return rt(n);
|
|
622
623
|
}
|
|
623
624
|
return t;
|
|
624
|
-
}(/* @__PURE__ */
|
|
625
|
-
function
|
|
625
|
+
}(/* @__PURE__ */ lt(Error));
|
|
626
|
+
function ft(e) {
|
|
626
627
|
return Math.round(e * 255);
|
|
627
628
|
}
|
|
628
|
-
function
|
|
629
|
-
return
|
|
629
|
+
function pt(e, t, n) {
|
|
630
|
+
return ft(e) + "," + ft(t) + "," + ft(n);
|
|
630
631
|
}
|
|
631
|
-
function
|
|
632
|
-
if (r === void 0 && (r =
|
|
632
|
+
function z(e, t, n, r) {
|
|
633
|
+
if (r === void 0 && (r = pt), t === 0) return r(n, n, n);
|
|
633
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;
|
|
634
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);
|
|
635
636
|
var u = n - a / 2, d = s + u, f = c + u, p = l + u;
|
|
636
637
|
return r(d, f, p);
|
|
637
638
|
}
|
|
638
|
-
var
|
|
639
|
+
var mt = {
|
|
639
640
|
aliceblue: "f0f8ff",
|
|
640
641
|
antiquewhite: "faebd7",
|
|
641
642
|
aqua: "00ffff",
|
|
@@ -785,21 +786,21 @@ var ct = {
|
|
|
785
786
|
yellow: "ff0",
|
|
786
787
|
yellowgreen: "9acd32"
|
|
787
788
|
};
|
|
788
|
-
function
|
|
789
|
+
function ht(e) {
|
|
789
790
|
if (typeof e != "string") return e;
|
|
790
791
|
var t = e.toLowerCase();
|
|
791
|
-
return
|
|
792
|
+
return mt[t] ? "#" + mt[t] : e;
|
|
792
793
|
}
|
|
793
|
-
var
|
|
794
|
-
function
|
|
795
|
-
if (typeof e != "string") throw new
|
|
796
|
-
var t =
|
|
797
|
-
if (t.match(
|
|
794
|
+
var gt = /^#[a-fA-F0-9]{6}$/, _t = /^#[a-fA-F0-9]{8}$/, vt = /^#[a-fA-F0-9]{3}$/, yt = /^#[a-fA-F0-9]{4}$/, bt = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, xt = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, St = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, Ct = /^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 B(e) {
|
|
796
|
+
if (typeof e != "string") throw new R(3);
|
|
797
|
+
var t = ht(e);
|
|
798
|
+
if (t.match(gt)) return {
|
|
798
799
|
red: parseInt("" + t[1] + t[2], 16),
|
|
799
800
|
green: parseInt("" + t[3] + t[4], 16),
|
|
800
801
|
blue: parseInt("" + t[5] + t[6], 16)
|
|
801
802
|
};
|
|
802
|
-
if (t.match(
|
|
803
|
+
if (t.match(_t)) {
|
|
803
804
|
var n = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
|
|
804
805
|
return {
|
|
805
806
|
red: parseInt("" + t[1] + t[2], 16),
|
|
@@ -808,12 +809,12 @@ function L(e) {
|
|
|
808
809
|
alpha: n
|
|
809
810
|
};
|
|
810
811
|
}
|
|
811
|
-
if (t.match(
|
|
812
|
+
if (t.match(vt)) return {
|
|
812
813
|
red: parseInt("" + t[1] + t[1], 16),
|
|
813
814
|
green: parseInt("" + t[2] + t[2], 16),
|
|
814
815
|
blue: parseInt("" + t[3] + t[3], 16)
|
|
815
816
|
};
|
|
816
|
-
if (t.match(
|
|
817
|
+
if (t.match(yt)) {
|
|
817
818
|
var r = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
|
|
818
819
|
return {
|
|
819
820
|
red: parseInt("" + t[1] + t[1], 16),
|
|
@@ -822,33 +823,33 @@ function L(e) {
|
|
|
822
823
|
alpha: r
|
|
823
824
|
};
|
|
824
825
|
}
|
|
825
|
-
var i =
|
|
826
|
+
var i = bt.exec(t);
|
|
826
827
|
if (i) return {
|
|
827
828
|
red: parseInt("" + i[1], 10),
|
|
828
829
|
green: parseInt("" + i[2], 10),
|
|
829
830
|
blue: parseInt("" + i[3], 10)
|
|
830
831
|
};
|
|
831
|
-
var a =
|
|
832
|
+
var a = xt.exec(t.substring(0, 50));
|
|
832
833
|
if (a) return {
|
|
833
834
|
red: parseInt("" + a[1], 10),
|
|
834
835
|
green: parseInt("" + a[2], 10),
|
|
835
836
|
blue: parseInt("" + a[3], 10),
|
|
836
837
|
alpha: parseFloat("" + a[4]) > 1 ? parseFloat("" + a[4]) / 100 : parseFloat("" + a[4])
|
|
837
838
|
};
|
|
838
|
-
var o =
|
|
839
|
+
var o = St.exec(t);
|
|
839
840
|
if (o) {
|
|
840
|
-
var s = "rgb(" +
|
|
841
|
-
if (!c) throw new
|
|
841
|
+
var s = "rgb(" + z(parseInt("" + o[1], 10), parseInt("" + o[2], 10) / 100, parseInt("" + o[3], 10) / 100) + ")", c = bt.exec(s);
|
|
842
|
+
if (!c) throw new R(4, t, s);
|
|
842
843
|
return {
|
|
843
844
|
red: parseInt("" + c[1], 10),
|
|
844
845
|
green: parseInt("" + c[2], 10),
|
|
845
846
|
blue: parseInt("" + c[3], 10)
|
|
846
847
|
};
|
|
847
848
|
}
|
|
848
|
-
var l =
|
|
849
|
+
var l = Ct.exec(t.substring(0, 50));
|
|
849
850
|
if (l) {
|
|
850
|
-
var u = "rgb(" +
|
|
851
|
-
if (!d) throw new
|
|
851
|
+
var u = "rgb(" + z(parseInt("" + l[1], 10), parseInt("" + l[2], 10) / 100, parseInt("" + l[3], 10) / 100) + ")", d = bt.exec(u);
|
|
852
|
+
if (!d) throw new R(4, t, u);
|
|
852
853
|
return {
|
|
853
854
|
red: parseInt("" + d[1], 10),
|
|
854
855
|
green: parseInt("" + d[2], 10),
|
|
@@ -856,9 +857,9 @@ function L(e) {
|
|
|
856
857
|
alpha: parseFloat("" + l[4]) > 1 ? parseFloat("" + l[4]) / 100 : parseFloat("" + l[4])
|
|
857
858
|
};
|
|
858
859
|
}
|
|
859
|
-
throw new
|
|
860
|
+
throw new R(5);
|
|
860
861
|
}
|
|
861
|
-
function
|
|
862
|
+
function wt(e) {
|
|
862
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;
|
|
863
864
|
if (i === a) return e.alpha === void 0 ? {
|
|
864
865
|
hue: 0,
|
|
@@ -893,171 +894,171 @@ function vt(e) {
|
|
|
893
894
|
alpha: e.alpha
|
|
894
895
|
};
|
|
895
896
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
897
|
+
function V(e) {
|
|
898
|
+
return wt(B(e));
|
|
898
899
|
}
|
|
899
|
-
var
|
|
900
|
+
var Tt = function(e) {
|
|
900
901
|
return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
|
|
901
902
|
};
|
|
902
|
-
function
|
|
903
|
+
function H(e) {
|
|
903
904
|
var t = e.toString(16);
|
|
904
905
|
return t.length === 1 ? "0" + t : t;
|
|
905
906
|
}
|
|
906
|
-
function
|
|
907
|
-
return
|
|
907
|
+
function Et(e) {
|
|
908
|
+
return H(Math.round(e * 255));
|
|
908
909
|
}
|
|
909
|
-
function
|
|
910
|
-
return
|
|
910
|
+
function Dt(e, t, n) {
|
|
911
|
+
return Tt("#" + Et(e) + Et(t) + Et(n));
|
|
911
912
|
}
|
|
912
|
-
function
|
|
913
|
-
return
|
|
913
|
+
function Ot(e, t, n) {
|
|
914
|
+
return z(e, t, n, Dt);
|
|
914
915
|
}
|
|
915
|
-
function
|
|
916
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
917
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
918
|
-
throw new
|
|
916
|
+
function kt(e, t, n) {
|
|
917
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return Ot(e, t, n);
|
|
918
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return Ot(e.hue, e.saturation, e.lightness);
|
|
919
|
+
throw new R(1);
|
|
919
920
|
}
|
|
920
|
-
function
|
|
921
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
922
|
-
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
923
|
-
throw new
|
|
921
|
+
function At(e, t, n, r) {
|
|
922
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? Ot(e, t, n) : "rgba(" + z(e, t, n) + "," + r + ")";
|
|
923
|
+
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? Ot(e.hue, e.saturation, e.lightness) : "rgba(" + z(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
|
|
924
|
+
throw new R(2);
|
|
924
925
|
}
|
|
925
|
-
function
|
|
926
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
927
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
928
|
-
throw new
|
|
926
|
+
function jt(e, t, n) {
|
|
927
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return Tt("#" + H(e) + H(t) + H(n));
|
|
928
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return Tt("#" + H(e.red) + H(e.green) + H(e.blue));
|
|
929
|
+
throw new R(6);
|
|
929
930
|
}
|
|
930
|
-
function
|
|
931
|
+
function U(e, t, n, r) {
|
|
931
932
|
if (typeof e == "string" && typeof t == "number") {
|
|
932
|
-
var i =
|
|
933
|
+
var i = B(e);
|
|
933
934
|
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + t + ")";
|
|
934
|
-
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
935
|
-
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
936
|
-
throw new
|
|
935
|
+
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? jt(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 ? jt(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
|
|
937
|
+
throw new R(7);
|
|
937
938
|
}
|
|
938
|
-
var
|
|
939
|
+
var Mt = function(e) {
|
|
939
940
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
940
|
-
},
|
|
941
|
+
}, Nt = function(e) {
|
|
941
942
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
942
|
-
},
|
|
943
|
+
}, Pt = function(e) {
|
|
943
944
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
944
|
-
},
|
|
945
|
+
}, Ft = function(e) {
|
|
945
946
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
946
947
|
};
|
|
947
|
-
function
|
|
948
|
-
if (typeof e != "object") throw new
|
|
949
|
-
if (
|
|
950
|
-
if (
|
|
951
|
-
if (
|
|
952
|
-
if (
|
|
953
|
-
throw new
|
|
948
|
+
function W(e) {
|
|
949
|
+
if (typeof e != "object") throw new R(8);
|
|
950
|
+
if (Nt(e)) return U(e);
|
|
951
|
+
if (Mt(e)) return jt(e);
|
|
952
|
+
if (Ft(e)) return At(e);
|
|
953
|
+
if (Pt(e)) return kt(e);
|
|
954
|
+
throw new R(8);
|
|
954
955
|
}
|
|
955
|
-
function
|
|
956
|
+
function It(e, t, n) {
|
|
956
957
|
return function() {
|
|
957
958
|
var r = n.concat(Array.prototype.slice.call(arguments));
|
|
958
|
-
return r.length >= t ? e.apply(this, r) :
|
|
959
|
+
return r.length >= t ? e.apply(this, r) : It(e, t, r);
|
|
959
960
|
};
|
|
960
961
|
}
|
|
961
|
-
function
|
|
962
|
-
return
|
|
962
|
+
function G(e) {
|
|
963
|
+
return It(e, e.length, []);
|
|
963
964
|
}
|
|
964
|
-
function
|
|
965
|
+
function Lt(e, t) {
|
|
965
966
|
if (t === "transparent") return t;
|
|
966
|
-
var n =
|
|
967
|
-
return
|
|
967
|
+
var n = V(t);
|
|
968
|
+
return W(I({}, n, { hue: n.hue + parseFloat(e) }));
|
|
968
969
|
}
|
|
969
|
-
|
|
970
|
-
function
|
|
970
|
+
G(Lt);
|
|
971
|
+
function K(e, t, n) {
|
|
971
972
|
return Math.max(e, Math.min(t, n));
|
|
972
973
|
}
|
|
973
|
-
function
|
|
974
|
+
function Rt(e, t) {
|
|
974
975
|
if (t === "transparent") return t;
|
|
975
|
-
var n =
|
|
976
|
-
return
|
|
976
|
+
var n = V(t);
|
|
977
|
+
return W(I({}, n, { lightness: K(0, 1, n.lightness - parseFloat(e)) }));
|
|
977
978
|
}
|
|
978
|
-
var
|
|
979
|
-
function
|
|
979
|
+
var zt = G(Rt);
|
|
980
|
+
function Bt(e, t) {
|
|
980
981
|
if (t === "transparent") return t;
|
|
981
|
-
var n =
|
|
982
|
-
return
|
|
982
|
+
var n = V(t);
|
|
983
|
+
return W(I({}, n, { saturation: K(0, 1, n.saturation - parseFloat(e)) }));
|
|
983
984
|
}
|
|
984
|
-
|
|
985
|
-
function
|
|
985
|
+
G(Bt);
|
|
986
|
+
function Vt(e, t) {
|
|
986
987
|
if (t === "transparent") return t;
|
|
987
|
-
var n =
|
|
988
|
-
return
|
|
988
|
+
var n = V(t);
|
|
989
|
+
return W(I({}, n, { lightness: K(0, 1, n.lightness + parseFloat(e)) }));
|
|
989
990
|
}
|
|
990
|
-
var
|
|
991
|
-
function
|
|
991
|
+
var q = G(Vt);
|
|
992
|
+
function Ht(e, t, n) {
|
|
992
993
|
if (t === "transparent") return n;
|
|
993
994
|
if (n === "transparent") return t;
|
|
994
995
|
if (e === 0) return n;
|
|
995
|
-
var r =
|
|
996
|
-
return
|
|
996
|
+
var r = B(t), i = I({}, r, { alpha: typeof r.alpha == "number" ? r.alpha : 1 }), a = B(n), o = I({}, 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 U({
|
|
997
998
|
red: Math.floor(i.red * l + o.red * u),
|
|
998
999
|
green: Math.floor(i.green * l + o.green * u),
|
|
999
1000
|
blue: Math.floor(i.blue * l + o.blue * u),
|
|
1000
1001
|
alpha: i.alpha * parseFloat(e) + o.alpha * (1 - parseFloat(e))
|
|
1001
1002
|
});
|
|
1002
1003
|
}
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1004
|
+
var Ut = G(Ht);
|
|
1005
|
+
function Wt(e, t) {
|
|
1005
1006
|
if (t === "transparent") return t;
|
|
1006
|
-
var n =
|
|
1007
|
-
return
|
|
1007
|
+
var n = B(t);
|
|
1008
|
+
return U(I({}, n, { alpha: K(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 + parseFloat(e) * 100) / 100) }));
|
|
1008
1009
|
}
|
|
1009
|
-
|
|
1010
|
-
function
|
|
1010
|
+
G(Wt);
|
|
1011
|
+
function Gt(e, t) {
|
|
1011
1012
|
if (t === "transparent") return t;
|
|
1012
|
-
var n =
|
|
1013
|
-
return
|
|
1013
|
+
var n = V(t);
|
|
1014
|
+
return W(I({}, n, { saturation: K(0, 1, n.saturation + parseFloat(e)) }));
|
|
1014
1015
|
}
|
|
1015
|
-
|
|
1016
|
-
function
|
|
1017
|
-
return t === "transparent" ? t :
|
|
1016
|
+
G(Gt);
|
|
1017
|
+
function Kt(e, t) {
|
|
1018
|
+
return t === "transparent" ? t : W(I({}, V(t), { hue: parseFloat(e) }));
|
|
1018
1019
|
}
|
|
1019
|
-
|
|
1020
|
-
function
|
|
1021
|
-
return t === "transparent" ? t :
|
|
1020
|
+
G(Kt);
|
|
1021
|
+
function qt(e, t) {
|
|
1022
|
+
return t === "transparent" ? t : W(I({}, V(t), { lightness: parseFloat(e) }));
|
|
1022
1023
|
}
|
|
1023
|
-
|
|
1024
|
-
function
|
|
1025
|
-
return t === "transparent" ? t :
|
|
1024
|
+
G(qt);
|
|
1025
|
+
function Jt(e, t) {
|
|
1026
|
+
return t === "transparent" ? t : W(I({}, V(t), { saturation: parseFloat(e) }));
|
|
1026
1027
|
}
|
|
1027
|
-
|
|
1028
|
-
function
|
|
1029
|
-
return t === "transparent" ? t :
|
|
1028
|
+
G(Jt);
|
|
1029
|
+
function Yt(e, t) {
|
|
1030
|
+
return t === "transparent" ? t : Ut(parseFloat(e), "rgb(0, 0, 0)", t);
|
|
1030
1031
|
}
|
|
1031
|
-
|
|
1032
|
-
function
|
|
1033
|
-
return t === "transparent" ? t :
|
|
1032
|
+
G(Yt);
|
|
1033
|
+
function Xt(e, t) {
|
|
1034
|
+
return t === "transparent" ? t : Ut(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1034
1035
|
}
|
|
1035
|
-
|
|
1036
|
-
function
|
|
1036
|
+
G(Xt);
|
|
1037
|
+
function Zt(e, t) {
|
|
1037
1038
|
if (t === "transparent") return t;
|
|
1038
|
-
var n =
|
|
1039
|
-
return
|
|
1039
|
+
var n = B(t);
|
|
1040
|
+
return U(I({}, n, { alpha: K(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 - parseFloat(e) * 100).toFixed(2) / 100) }));
|
|
1040
1041
|
}
|
|
1041
|
-
var
|
|
1042
|
+
var Qt = G(Zt);
|
|
1042
1043
|
//#endregion
|
|
1043
1044
|
//#region src/theme/utils.ts
|
|
1044
|
-
function
|
|
1045
|
+
function $t(e) {
|
|
1045
1046
|
return {
|
|
1046
|
-
1:
|
|
1047
|
-
2:
|
|
1048
|
-
3:
|
|
1049
|
-
4:
|
|
1050
|
-
5:
|
|
1051
|
-
6:
|
|
1052
|
-
7:
|
|
1053
|
-
8:
|
|
1047
|
+
1: q(.35, e),
|
|
1048
|
+
2: q(.3, e),
|
|
1049
|
+
3: q(.25, e),
|
|
1050
|
+
4: q(.2, e),
|
|
1051
|
+
5: q(.15, e),
|
|
1052
|
+
6: q(.12, e),
|
|
1053
|
+
7: q(.08, e),
|
|
1054
|
+
8: q(.04, e),
|
|
1054
1055
|
9: e,
|
|
1055
|
-
10:
|
|
1056
|
-
11:
|
|
1057
|
-
12:
|
|
1056
|
+
10: q(.1, e),
|
|
1057
|
+
11: zt(.1, e),
|
|
1058
|
+
12: zt(.15, e)
|
|
1058
1059
|
};
|
|
1059
1060
|
}
|
|
1060
|
-
var
|
|
1061
|
+
var en = [
|
|
1061
1062
|
.03,
|
|
1062
1063
|
.05,
|
|
1063
1064
|
.1,
|
|
@@ -1071,41 +1072,41 @@ var Kt = [
|
|
|
1071
1072
|
.8,
|
|
1072
1073
|
.9
|
|
1073
1074
|
];
|
|
1074
|
-
function
|
|
1075
|
-
let t =
|
|
1075
|
+
function tn(e = {}) {
|
|
1076
|
+
let t = F({}, ie, e), n = e.colors?.brand?.base ?? e.colors?.primary?.main, r;
|
|
1076
1077
|
if (n) {
|
|
1077
|
-
let e =
|
|
1078
|
+
let e = $t(n);
|
|
1078
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[5], 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 = {};
|
|
1079
1080
|
for (let [t, n] of Object.entries(e)) r[`--color-brand-${t}`] = n;
|
|
1080
|
-
for (let e = 1; e <= 12; e++) r[`--color-brand-a-${e}`] =
|
|
1081
|
+
for (let e = 1; e <= 12; e++) r[`--color-brand-a-${e}`] = Qt(1 - en[e - 1], n);
|
|
1081
1082
|
}
|
|
1082
1083
|
return Object.assign(t, { cssVars: r });
|
|
1083
1084
|
}
|
|
1084
1085
|
//#endregion
|
|
1085
1086
|
//#region src/composables/theme.ts
|
|
1086
|
-
var
|
|
1087
|
-
let e =
|
|
1088
|
-
return n(() => e?.value ??
|
|
1089
|
-
},
|
|
1090
|
-
let n = e.__vccOpts || e;
|
|
1091
|
-
for (let [e, r] of t) n[e] = r;
|
|
1092
|
-
return n;
|
|
1093
|
-
})(/* @__PURE__ */ s({
|
|
1087
|
+
var nn = Symbol("theme"), J = () => {
|
|
1088
|
+
let e = f(nn, void 0);
|
|
1089
|
+
return n(() => e?.value ?? ie);
|
|
1090
|
+
}, rn = /* @__PURE__ */ u({
|
|
1094
1091
|
__name: "TChip",
|
|
1095
1092
|
props: { variant: { default: "default" } },
|
|
1096
1093
|
setup(e) {
|
|
1097
|
-
|
|
1098
|
-
v3457cee4:
|
|
1099
|
-
v38cf7840:
|
|
1100
|
-
v2d9fac57:
|
|
1101
|
-
v4320e4fd:
|
|
1094
|
+
ee((e) => ({
|
|
1095
|
+
v3457cee4: E(n).colors.gray.dark3,
|
|
1096
|
+
v38cf7840: E(n).colors.background,
|
|
1097
|
+
v2d9fac57: E(n).colors.primary.main,
|
|
1098
|
+
v4320e4fd: E(n).colors.primary.light5
|
|
1102
1099
|
}));
|
|
1103
|
-
let t = e, n =
|
|
1104
|
-
return (e, n) => (
|
|
1100
|
+
let t = e, n = J();
|
|
1101
|
+
return (e, n) => (x(), o("div", { class: _(["t-chip", [`t-chip--${t.variant}`]]) }, [w(e.$slots, "default", {}, void 0, !0)], 2));
|
|
1105
1102
|
}
|
|
1106
|
-
}),
|
|
1107
|
-
let
|
|
1108
|
-
|
|
1103
|
+
}), an = (e, t) => {
|
|
1104
|
+
let n = e.__vccOpts || e;
|
|
1105
|
+
for (let [e, r] of t) n[e] = r;
|
|
1106
|
+
return n;
|
|
1107
|
+
}, on = /* @__PURE__ */ an(rn, [["__scopeId", "data-v-519905d4"]]), sn = (e) => nt(e), cn = (e) => {
|
|
1108
|
+
let t = J(), r = n(() => sn(e.value)), i = n(() => r.value === "primary" ? t.value.colors.primary.ultraDark : zt(.15, t.value.colors[r.value])), a = n(() => r.value === "primary" ? t.value.colors.primary.main : t.value.colors[r.value]), o = n(() => r.value === "primary" ? t.value.colors.primary.light1 : q(.15, t.value.colors[r.value])), s = n(() => r.value === "primary" ? t.value.colors.primary.light2 : q(.2, t.value.colors[r.value])), c = n(() => r.value === "primary" ? t.value.colors.primary.light3 : q(.25, t.value.colors[r.value]));
|
|
1109
|
+
return n(() => A({
|
|
1109
1110
|
"&, *": {
|
|
1110
1111
|
margin: 0,
|
|
1111
1112
|
padding: 0,
|
|
@@ -1198,12 +1199,12 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1198
1199
|
"&--tertiary:disabled &__spinner": { color: t.value.colors.gray.medium1 },
|
|
1199
1200
|
"&--secondary &__spinner, &--tertiary &__spinner": { color: a.value }
|
|
1200
1201
|
}));
|
|
1201
|
-
},
|
|
1202
|
+
}, ln = {
|
|
1202
1203
|
variant: "primary",
|
|
1203
1204
|
size: "medium",
|
|
1204
1205
|
type: "button",
|
|
1205
1206
|
color: "primary"
|
|
1206
|
-
},
|
|
1207
|
+
}, un = /* @__PURE__ */ u({
|
|
1207
1208
|
name: "TButton",
|
|
1208
1209
|
props: {
|
|
1209
1210
|
variant: String,
|
|
@@ -1218,34 +1219,34 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1218
1219
|
},
|
|
1219
1220
|
emits: ["click"],
|
|
1220
1221
|
setup(e, { attrs: t, slots: r, emit: i }) {
|
|
1221
|
-
let a = n(() =>
|
|
1222
|
-
|
|
1223
|
-
`${
|
|
1224
|
-
`${
|
|
1222
|
+
let a = n(() => F({}, ln, e, t)), o = cn(n(() => a.value.color)), s = J(), c = n(() => [
|
|
1223
|
+
o.value,
|
|
1224
|
+
`${o.value}--${a.value.variant}`,
|
|
1225
|
+
`${o.value}--${a.value.size}`,
|
|
1225
1226
|
{
|
|
1226
|
-
[`${
|
|
1227
|
-
[`${
|
|
1227
|
+
[`${o.value}--full-width`]: a.value.fullWidth,
|
|
1228
|
+
[`${o.value}--loading`]: a.value.loading
|
|
1228
1229
|
}
|
|
1229
1230
|
]), u = () => {
|
|
1230
1231
|
a.value.loading || i("click");
|
|
1231
1232
|
};
|
|
1232
|
-
return () =>
|
|
1233
|
-
class:
|
|
1233
|
+
return () => l("button", h({
|
|
1234
|
+
class: c.value,
|
|
1234
1235
|
type: a.value.type,
|
|
1235
1236
|
disabled: a.value.disabled,
|
|
1236
1237
|
onClick: u
|
|
1237
1238
|
}, t), [
|
|
1238
|
-
a.value.leftIcon &&
|
|
1239
|
+
a.value.leftIcon && l(k, { icon: `${s.value.iconSet}:${a.value.leftIcon}` }, null),
|
|
1239
1240
|
r.default?.(),
|
|
1240
|
-
a.value.rightIcon &&
|
|
1241
|
-
a.value.loading &&
|
|
1242
|
-
class: `${
|
|
1241
|
+
a.value.rightIcon && l(k, { icon: `${s.value.iconSet}:${a.value.rightIcon}` }, null),
|
|
1242
|
+
a.value.loading && l(k, {
|
|
1243
|
+
class: `${o.value}__spinner`,
|
|
1243
1244
|
icon: "svg-spinners:90-ring-with-bg"
|
|
1244
1245
|
}, null)
|
|
1245
1246
|
]);
|
|
1246
1247
|
}
|
|
1247
|
-
}),
|
|
1248
|
-
let e =
|
|
1248
|
+
}), dn = () => {
|
|
1249
|
+
let e = J(), t = e.value.colors.gray.light1, r = (e, t) => {
|
|
1249
1250
|
switch (t) {
|
|
1250
1251
|
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">
|
|
1251
1252
|
<path d="M0.833344 3.79167L3.75001 6.70834L9.16668 1.29167" stroke="${e}" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1256,7 +1257,7 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1256
1257
|
default: return "";
|
|
1257
1258
|
}
|
|
1258
1259
|
};
|
|
1259
|
-
return n(() =>
|
|
1260
|
+
return n(() => A({
|
|
1260
1261
|
"&, *": {
|
|
1261
1262
|
margin: 0,
|
|
1262
1263
|
padding: 0,
|
|
@@ -1341,10 +1342,10 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1341
1342
|
}
|
|
1342
1343
|
}
|
|
1343
1344
|
}));
|
|
1344
|
-
},
|
|
1345
|
+
}, fn = () => `checkbox-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`, pn = {
|
|
1345
1346
|
size: "large",
|
|
1346
1347
|
value: !1
|
|
1347
|
-
},
|
|
1348
|
+
}, mn = /* @__PURE__ */ u({
|
|
1348
1349
|
name: "TCheckbox",
|
|
1349
1350
|
props: {
|
|
1350
1351
|
labelPosition: String,
|
|
@@ -1360,39 +1361,39 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1360
1361
|
"update:modelValue"
|
|
1361
1362
|
],
|
|
1362
1363
|
setup(e, { attrs: t, slots: r, emit: i }) {
|
|
1363
|
-
let a =
|
|
1364
|
-
|
|
1365
|
-
`${
|
|
1366
|
-
{ [`${
|
|
1367
|
-
]),
|
|
1368
|
-
|
|
1369
|
-
|
|
1364
|
+
let a = fn(), o = n(() => F({}, pn, e, t, { id: e.id ?? t.id ?? a })), s = dn(), c = n(() => [s.value, `${s.value}--${o.value.size}`]), u = n(() => [
|
|
1365
|
+
s.value,
|
|
1366
|
+
`${s.value}--${o.value.size}`,
|
|
1367
|
+
{ [`${s.value}--disabled`]: o.value.disabled }
|
|
1368
|
+
]), d = C(o.value.modelValue || o.value.value);
|
|
1369
|
+
D([() => o.value.modelValue, () => o.value.value], () => {
|
|
1370
|
+
d.value = o.value.modelValue || o.value.value;
|
|
1370
1371
|
});
|
|
1371
|
-
let
|
|
1372
|
-
i("update:modelValue", !
|
|
1372
|
+
let f = () => {
|
|
1373
|
+
i("update:modelValue", !d.value), i("input", !d.value), i("change", !d.value), d.value = !d.value;
|
|
1373
1374
|
};
|
|
1374
|
-
return () =>
|
|
1375
|
-
r.default?.() &&
|
|
1376
|
-
for:
|
|
1375
|
+
return () => l("div", { class: c.value.map((e) => `${e}__wrapper`) }, [
|
|
1376
|
+
r.default?.() && o.value.labelPosition === "left" && l("label", {
|
|
1377
|
+
for: o.value.id,
|
|
1377
1378
|
class: u.value
|
|
1378
1379
|
}, [r.default()]),
|
|
1379
|
-
|
|
1380
|
-
id:
|
|
1380
|
+
l("input", h({
|
|
1381
|
+
id: o.value.id,
|
|
1381
1382
|
type: "checkbox",
|
|
1382
|
-
class:
|
|
1383
|
-
checked:
|
|
1384
|
-
disabled:
|
|
1385
|
-
onClick:
|
|
1383
|
+
class: c.value.map((e) => `${e}__input`),
|
|
1384
|
+
checked: d.value,
|
|
1385
|
+
disabled: o.value.disabled,
|
|
1386
|
+
onClick: f
|
|
1386
1387
|
}, t), null),
|
|
1387
|
-
r.default?.() &&
|
|
1388
|
-
for:
|
|
1388
|
+
r.default?.() && o.value.labelPosition === "right" && l("label", {
|
|
1389
|
+
for: o.value.id,
|
|
1389
1390
|
class: u.value
|
|
1390
1391
|
}, [r.default()])
|
|
1391
1392
|
]);
|
|
1392
1393
|
}
|
|
1393
|
-
}),
|
|
1394
|
-
let t =
|
|
1395
|
-
return n(() =>
|
|
1394
|
+
}), hn = (e) => {
|
|
1395
|
+
let t = J();
|
|
1396
|
+
return n(() => A({
|
|
1396
1397
|
"&, *": {
|
|
1397
1398
|
margin: 0,
|
|
1398
1399
|
boxSizing: "border-box"
|
|
@@ -1453,7 +1454,7 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1453
1454
|
marginBlock: "0.5rem"
|
|
1454
1455
|
}
|
|
1455
1456
|
}));
|
|
1456
|
-
},
|
|
1457
|
+
}, gn = () => n(() => A({
|
|
1457
1458
|
position: "fixed",
|
|
1458
1459
|
display: "none",
|
|
1459
1460
|
padding: "0.625rem",
|
|
@@ -1482,21 +1483,21 @@ var Jt = Symbol("theme"), q = () => {
|
|
|
1482
1483
|
borderTopRightRadius: "0.5rem",
|
|
1483
1484
|
borderBottomLeftRadius: "0"
|
|
1484
1485
|
}
|
|
1485
|
-
})),
|
|
1486
|
+
})), _n = (e) => {
|
|
1486
1487
|
let t = [];
|
|
1487
1488
|
return e?.forEach((e) => {
|
|
1488
|
-
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
1489
|
+
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(..._n(e.children));
|
|
1489
1490
|
}), t;
|
|
1490
1491
|
};
|
|
1491
1492
|
//#endregion
|
|
1492
1493
|
//#region src/components/TDropdown/TDropdown.tsx
|
|
1493
|
-
function
|
|
1494
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1494
|
+
function vn(e) {
|
|
1495
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !p(e);
|
|
1495
1496
|
}
|
|
1496
|
-
var
|
|
1497
|
+
var yn = {
|
|
1497
1498
|
size: "small",
|
|
1498
1499
|
position: "center"
|
|
1499
|
-
},
|
|
1500
|
+
}, bn = /* @__PURE__ */ u({
|
|
1500
1501
|
name: "TDropdown",
|
|
1501
1502
|
props: {
|
|
1502
1503
|
open: Boolean,
|
|
@@ -1507,101 +1508,101 @@ var cn = {
|
|
|
1507
1508
|
},
|
|
1508
1509
|
emits: ["cancel"],
|
|
1509
1510
|
setup(t, { slots: r, attrs: i, emit: a }) {
|
|
1510
|
-
let
|
|
1511
|
+
let o = n(() => F({}, yn, t, i)), s = C(null), c = C(null), u = C(null), d = C({
|
|
1511
1512
|
top: 0,
|
|
1512
1513
|
left: 0
|
|
1513
1514
|
}), f = () => {
|
|
1514
|
-
if (!
|
|
1515
|
-
let e =
|
|
1516
|
-
switch (
|
|
1515
|
+
if (!c.value || !u.value) return;
|
|
1516
|
+
let e = c.value.getBoundingClientRect(), t = e.bottom + 8, n = e.left, r = t, i = n;
|
|
1517
|
+
switch (o.value.position) {
|
|
1517
1518
|
case "center":
|
|
1518
|
-
i = n - u.value.clientWidth / 2 +
|
|
1519
|
+
i = n - u.value.clientWidth / 2 + c.value.clientWidth / 2;
|
|
1519
1520
|
break;
|
|
1520
1521
|
case "right":
|
|
1521
|
-
i = n +
|
|
1522
|
+
i = n + c.value.clientWidth;
|
|
1522
1523
|
break;
|
|
1523
1524
|
case "left":
|
|
1524
1525
|
i = n - u.value.clientWidth;
|
|
1525
1526
|
break;
|
|
1526
1527
|
case "middle-left":
|
|
1527
|
-
i = n - u.value.clientWidth +
|
|
1528
|
+
i = n - u.value.clientWidth + c.value.clientWidth;
|
|
1528
1529
|
break;
|
|
1529
1530
|
case "middle-right":
|
|
1530
1531
|
i = n;
|
|
1531
1532
|
break;
|
|
1532
1533
|
case "top-center":
|
|
1533
|
-
r = e.top - u.value.clientHeight - 8, i = n - u.value.clientWidth / 2 +
|
|
1534
|
+
r = e.top - u.value.clientHeight - 8, i = n - u.value.clientWidth / 2 + c.value.clientWidth / 2;
|
|
1534
1535
|
break;
|
|
1535
1536
|
case "top-left":
|
|
1536
1537
|
r = e.top - u.value.clientHeight - 8, i = n - u.value.clientWidth;
|
|
1537
1538
|
break;
|
|
1538
1539
|
case "top-right":
|
|
1539
|
-
r = e.top - u.value.clientHeight - 8, i = n +
|
|
1540
|
+
r = e.top - u.value.clientHeight - 8, i = n + c.value.clientWidth;
|
|
1540
1541
|
break;
|
|
1541
1542
|
}
|
|
1542
1543
|
d.value = {
|
|
1543
1544
|
top: r,
|
|
1544
1545
|
left: i
|
|
1545
1546
|
};
|
|
1546
|
-
}, p =
|
|
1547
|
+
}, p = gn(), m = n(() => [
|
|
1547
1548
|
p.value,
|
|
1548
|
-
`${p.value}--${
|
|
1549
|
-
`${p.value}--${
|
|
1550
|
-
{ [`${p.value}--open`]:
|
|
1551
|
-
]),
|
|
1549
|
+
`${p.value}--${o.value.size}`,
|
|
1550
|
+
`${p.value}--${o.value.position}`,
|
|
1551
|
+
{ [`${p.value}--open`]: o.value.open }
|
|
1552
|
+
]), h = n(() => ({
|
|
1552
1553
|
top: `${d.value.top}px`,
|
|
1553
1554
|
left: `${d.value.left}px`,
|
|
1554
|
-
width:
|
|
1555
|
-
})),
|
|
1556
|
-
|
|
1557
|
-
`${
|
|
1558
|
-
`${
|
|
1555
|
+
width: o.value.fullWidth ? `${c.value?.clientWidth}px` : void 0
|
|
1556
|
+
})), g = hn(n(() => u.value?.clientHeight ?? 0)), _ = n(() => [
|
|
1557
|
+
g.value,
|
|
1558
|
+
`${g.value}--${o.value.size}`,
|
|
1559
|
+
`${g.value}--${o.value.position}`,
|
|
1559
1560
|
{
|
|
1560
|
-
[`${
|
|
1561
|
-
[`${
|
|
1561
|
+
[`${g.value}--active`]: o.value.open,
|
|
1562
|
+
[`${g.value}--full-width`]: o.value.fullWidth
|
|
1562
1563
|
}
|
|
1563
|
-
]),
|
|
1564
|
-
|
|
1565
|
-
},
|
|
1564
|
+
]), v = (e) => {
|
|
1565
|
+
o.value.open && s.value && !s.value.contains(e.target) && !e.target?.closest(`.${p.value}`) && a("cancel");
|
|
1566
|
+
}, x = (e) => {
|
|
1566
1567
|
e.key === "Escape" && a("cancel");
|
|
1567
|
-
},
|
|
1568
|
-
if (
|
|
1568
|
+
}, S = (e) => {
|
|
1569
|
+
if (o.value.attachToBody && e.key === "Tab") {
|
|
1569
1570
|
e.preventDefault();
|
|
1570
1571
|
let t = u.value?.querySelector("[role=\"menuitem\"]");
|
|
1571
1572
|
t && t.focus();
|
|
1572
1573
|
}
|
|
1573
1574
|
};
|
|
1574
|
-
|
|
1575
|
-
() =>
|
|
1576
|
-
() =>
|
|
1577
|
-
() =>
|
|
1578
|
-
|
|
1575
|
+
o.value.attachToBody && D([
|
|
1576
|
+
() => o.value.open,
|
|
1577
|
+
() => o.value.position,
|
|
1578
|
+
() => o.value.size,
|
|
1579
|
+
c,
|
|
1579
1580
|
u
|
|
1580
1581
|
], () => {
|
|
1581
|
-
f(),
|
|
1582
|
-
}, { immediate: !0 }),
|
|
1583
|
-
|
|
1584
|
-
}),
|
|
1585
|
-
|
|
1582
|
+
f(), o.value.open && u.value ? c.value?.addEventListener("keydown", S) : c.value?.removeEventListener("keydown", S);
|
|
1583
|
+
}, { immediate: !0 }), y(() => {
|
|
1584
|
+
o.value.attachToBody && (window.addEventListener("scroll", f), window.addEventListener("resize", f)), document.addEventListener("click", v), document.addEventListener("keydown", x);
|
|
1585
|
+
}), b(() => {
|
|
1586
|
+
o.value.attachToBody && (window.removeEventListener("scroll", f), window.removeEventListener("resize", f)), document.removeEventListener("click", v), document.removeEventListener("keydown", x);
|
|
1586
1587
|
});
|
|
1587
|
-
let
|
|
1588
|
+
let w = n(() => _n(r.default?.() || [])), T = () => l("div", {
|
|
1588
1589
|
ref: u,
|
|
1589
|
-
class:
|
|
1590
|
-
style:
|
|
1590
|
+
class: o.value.attachToBody ? m.value : `${g.value}__menu`,
|
|
1591
|
+
style: o.value.attachToBody ? h.value : void 0,
|
|
1591
1592
|
role: "menu",
|
|
1592
|
-
tabindex:
|
|
1593
|
-
}, [
|
|
1593
|
+
tabindex: o.value.attachToBody ? 0 : void 0
|
|
1594
|
+
}, [w.value.map((e, t, n) => l("div", { key: t }, [e, t < n.length - 1 && l("div", { class: `${g.value}__divider` }, null)]))]);
|
|
1594
1595
|
return () => {
|
|
1595
1596
|
let t;
|
|
1596
|
-
return
|
|
1597
|
-
ref:
|
|
1598
|
-
class:
|
|
1599
|
-
}, [
|
|
1597
|
+
return l("div", {
|
|
1598
|
+
ref: s,
|
|
1599
|
+
class: _.value
|
|
1600
|
+
}, [l("div", { ref: c }, [r.trigger?.()]), o.value.open && (o.value.attachToBody ? l(e, { to: "body" }, vn(t = T()) ? t : { default: () => [t] }) : T())]);
|
|
1600
1601
|
};
|
|
1601
1602
|
}
|
|
1602
|
-
}),
|
|
1603
|
-
let e =
|
|
1604
|
-
return n(() =>
|
|
1603
|
+
}), xn = () => {
|
|
1604
|
+
let e = J();
|
|
1605
|
+
return n(() => A({
|
|
1605
1606
|
"&, *": {
|
|
1606
1607
|
margin: 0,
|
|
1607
1608
|
boxSizing: "border-box"
|
|
@@ -1623,28 +1624,28 @@ var cn = {
|
|
|
1623
1624
|
cursor: "not-allowed"
|
|
1624
1625
|
}
|
|
1625
1626
|
}));
|
|
1626
|
-
},
|
|
1627
|
+
}, Sn = /* @__PURE__ */ u({
|
|
1627
1628
|
name: "TDropdownItem",
|
|
1628
1629
|
emits: ["click"],
|
|
1629
1630
|
props: { disabled: Boolean },
|
|
1630
1631
|
setup(e, { slots: t, emit: r, attrs: i }) {
|
|
1631
|
-
let a = n(() =>
|
|
1632
|
+
let a = n(() => F({}, e, i)), o = xn(), s = n(() => [o.value, { [`${o.value}--disabled`]: a.value.disabled }]), c = () => {
|
|
1632
1633
|
a.value.disabled || r("click");
|
|
1633
1634
|
}, u = (e) => {
|
|
1634
1635
|
e.key === "Enter" && !a.value.disabled && (r("click"), e.preventDefault());
|
|
1635
1636
|
};
|
|
1636
|
-
return () =>
|
|
1637
|
-
class:
|
|
1638
|
-
onClick:
|
|
1637
|
+
return () => l("div", {
|
|
1638
|
+
class: s.value,
|
|
1639
|
+
onClick: c,
|
|
1639
1640
|
role: "menuitem",
|
|
1640
1641
|
tabindex: 0,
|
|
1641
1642
|
onKeydown: u,
|
|
1642
1643
|
"aria-disabled": a.value.disabled
|
|
1643
1644
|
}, [t.default?.()]);
|
|
1644
1645
|
}
|
|
1645
|
-
}),
|
|
1646
|
-
let e =
|
|
1647
|
-
return n(() =>
|
|
1646
|
+
}), Cn = () => {
|
|
1647
|
+
let e = J();
|
|
1648
|
+
return n(() => A({
|
|
1648
1649
|
"&, *": {
|
|
1649
1650
|
margin: 0,
|
|
1650
1651
|
padding: 0,
|
|
@@ -1718,7 +1719,7 @@ var cn = {
|
|
|
1718
1719
|
transform: "translateY(50%)"
|
|
1719
1720
|
}
|
|
1720
1721
|
}));
|
|
1721
|
-
},
|
|
1722
|
+
}, wn = { type: "text" }, Tn = /* @__PURE__ */ u({
|
|
1722
1723
|
name: "TTextInput",
|
|
1723
1724
|
emits: [
|
|
1724
1725
|
"input",
|
|
@@ -1754,71 +1755,71 @@ var cn = {
|
|
|
1754
1755
|
step: [String, Number]
|
|
1755
1756
|
},
|
|
1756
1757
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
1757
|
-
let
|
|
1758
|
-
get: () =>
|
|
1758
|
+
let o = n(() => F({}, wn, e, t)), s = Cn(), c = J(), u = n({
|
|
1759
|
+
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
1759
1760
|
set: (e) => {
|
|
1760
1761
|
r("update:modelValue", e), r("input", e), r("change", e);
|
|
1761
1762
|
}
|
|
1762
|
-
}),
|
|
1763
|
+
}), d = (e) => {
|
|
1763
1764
|
u.value = e.target.value;
|
|
1764
|
-
},
|
|
1765
|
+
}, f = (e) => {
|
|
1765
1766
|
r("focus", e);
|
|
1766
|
-
},
|
|
1767
|
+
}, p = (e) => {
|
|
1767
1768
|
r("blur", e);
|
|
1768
|
-
},
|
|
1769
|
+
}, m = C(null);
|
|
1769
1770
|
return a({
|
|
1770
1771
|
focus: () => {
|
|
1771
|
-
|
|
1772
|
+
m.value?.focus();
|
|
1772
1773
|
},
|
|
1773
1774
|
blur: () => {
|
|
1774
|
-
|
|
1775
|
+
m.value?.blur();
|
|
1775
1776
|
}
|
|
1776
|
-
}), () =>
|
|
1777
|
-
|
|
1778
|
-
`${
|
|
1777
|
+
}), () => l("div", { class: [
|
|
1778
|
+
s.value,
|
|
1779
|
+
`${s.value}__container`,
|
|
1779
1780
|
{
|
|
1780
|
-
[`${
|
|
1781
|
-
[`${
|
|
1782
|
-
[`${
|
|
1781
|
+
[`${s.value}--error`]: o.value.error,
|
|
1782
|
+
[`${s.value}--full-width`]: o.value.fullWidth,
|
|
1783
|
+
[`${s.value}--multiline`]: o.value.multiline
|
|
1783
1784
|
}
|
|
1784
1785
|
] }, [
|
|
1785
|
-
i.label?.() ||
|
|
1786
|
-
class: [`${
|
|
1787
|
-
for:
|
|
1788
|
-
}, [
|
|
1789
|
-
|
|
1790
|
-
i.leftIcon?.() ||
|
|
1791
|
-
icon: `${
|
|
1792
|
-
class: [`${
|
|
1786
|
+
i.label?.() || o.value.label && l("label", {
|
|
1787
|
+
class: [`${s.value}__label`],
|
|
1788
|
+
for: o.value.id
|
|
1789
|
+
}, [o.value.label]),
|
|
1790
|
+
l("div", { class: `${s.value}__input-wrapper` }, [
|
|
1791
|
+
i.leftIcon?.() || o.value.leftIcon && l(k, {
|
|
1792
|
+
icon: `${c.value.iconSet}:${o.value.leftIcon}`,
|
|
1793
|
+
class: [`${s.value}__icon`, `${s.value}__icon--left`]
|
|
1793
1794
|
}, null),
|
|
1794
|
-
|
|
1795
|
-
id:
|
|
1796
|
-
type:
|
|
1797
|
-
class: [`${
|
|
1798
|
-
[`${
|
|
1799
|
-
[`${
|
|
1795
|
+
l("input", h(t, {
|
|
1796
|
+
id: o.value.id,
|
|
1797
|
+
type: o.value.multiline ? void 0 : o.value.type,
|
|
1798
|
+
class: [`${s.value}__input`, {
|
|
1799
|
+
[`${s.value}__input--left-icon`]: i.leftIcon?.() || o.value.leftIcon,
|
|
1800
|
+
[`${s.value}__input--right-icon`]: i.rightIcon?.() || o.value.rightIcon
|
|
1800
1801
|
}],
|
|
1801
|
-
placeholder:
|
|
1802
|
+
placeholder: o.value.placeholder,
|
|
1802
1803
|
value: u.value,
|
|
1803
|
-
onInput:
|
|
1804
|
-
onFocus:
|
|
1805
|
-
onBlur:
|
|
1806
|
-
disabled:
|
|
1807
|
-
maxlength:
|
|
1808
|
-
min:
|
|
1809
|
-
max:
|
|
1810
|
-
ref:
|
|
1811
|
-
step:
|
|
1804
|
+
onInput: d,
|
|
1805
|
+
onFocus: f,
|
|
1806
|
+
onBlur: p,
|
|
1807
|
+
disabled: o.value.disabled,
|
|
1808
|
+
maxlength: o.value.maxlength,
|
|
1809
|
+
min: o.value.min,
|
|
1810
|
+
max: o.value.max,
|
|
1811
|
+
ref: m,
|
|
1812
|
+
step: o.value.step
|
|
1812
1813
|
}), null),
|
|
1813
|
-
i.rightIcon?.() ||
|
|
1814
|
-
icon: `${
|
|
1815
|
-
class: [`${
|
|
1814
|
+
i.rightIcon?.() || o.value.rightIcon && l(k, {
|
|
1815
|
+
icon: `${c.value.iconSet}:${o.value.rightIcon}`,
|
|
1816
|
+
class: [`${s.value}__icon`, `${s.value}__icon--right`]
|
|
1816
1817
|
}, null)
|
|
1817
1818
|
]),
|
|
1818
|
-
i.helperText?.() ||
|
|
1819
|
+
i.helperText?.() || o.value.helperText && l("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
1819
1820
|
]);
|
|
1820
1821
|
}
|
|
1821
|
-
}),
|
|
1822
|
+
}), En = (e) => e.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, ""), Dn = /* @__PURE__ */ u({
|
|
1822
1823
|
name: "TCombobox",
|
|
1823
1824
|
emits: [
|
|
1824
1825
|
"input",
|
|
@@ -1840,12 +1841,12 @@ var cn = {
|
|
|
1840
1841
|
disabled: Boolean
|
|
1841
1842
|
},
|
|
1842
1843
|
setup(e, { emit: t, expose: r }) {
|
|
1843
|
-
let i =
|
|
1844
|
-
|
|
1844
|
+
let i = C(e.modelValue ?? ""), a = C(null), o = C(!1), s = C(null), c = C(null), u = n(() => e.disabled), d = () => {
|
|
1845
|
+
o.value = !0;
|
|
1845
1846
|
}, f = () => {
|
|
1846
|
-
|
|
1847
|
+
o.value = !1;
|
|
1847
1848
|
}, p = () => {
|
|
1848
|
-
|
|
1849
|
+
c.value?.blur();
|
|
1849
1850
|
}, m = () => {
|
|
1850
1851
|
a.value === null ? i.value = "" : i.value = a.value.label;
|
|
1851
1852
|
};
|
|
@@ -1855,55 +1856,55 @@ var cn = {
|
|
|
1855
1856
|
a.value = null;
|
|
1856
1857
|
}
|
|
1857
1858
|
});
|
|
1858
|
-
let
|
|
1859
|
+
let h = () => {
|
|
1859
1860
|
d();
|
|
1860
|
-
},
|
|
1861
|
+
}, g = (e) => {
|
|
1861
1862
|
i.value = e, t("input", e);
|
|
1862
|
-
},
|
|
1863
|
-
|
|
1864
|
-
},
|
|
1863
|
+
}, _ = (e) => {
|
|
1864
|
+
s.value && o.value && (s.value.contains(e.target) || (f(), m(), p()));
|
|
1865
|
+
}, v = (e) => {
|
|
1865
1866
|
i.value = e.label, a.value = e, t("select", e.value), t("update:modelValue", e.label), f();
|
|
1866
|
-
},
|
|
1867
|
+
}, x = (e) => {
|
|
1867
1868
|
e.key === "Escape" && (f(), m(), p());
|
|
1868
|
-
},
|
|
1869
|
-
let t =
|
|
1869
|
+
}, S = n(() => i.value === "" ? e.options : e.options.filter((e) => {
|
|
1870
|
+
let t = En(e.label), n = En(i.value);
|
|
1870
1871
|
return t.includes(n);
|
|
1871
1872
|
}));
|
|
1872
|
-
|
|
1873
|
-
document.addEventListener("click",
|
|
1874
|
-
}),
|
|
1875
|
-
document.removeEventListener("click",
|
|
1873
|
+
y(() => {
|
|
1874
|
+
document.addEventListener("click", _), s.value?.addEventListener("keydown", x);
|
|
1875
|
+
}), b(() => {
|
|
1876
|
+
document.removeEventListener("click", _), s.value?.removeEventListener("keydown", x);
|
|
1876
1877
|
});
|
|
1877
|
-
let
|
|
1878
|
-
ref:
|
|
1878
|
+
let w = () => l(Tn, {
|
|
1879
|
+
ref: c,
|
|
1879
1880
|
modelValue: i.value,
|
|
1880
1881
|
label: e.label,
|
|
1881
1882
|
helperText: e.helperText,
|
|
1882
1883
|
placeholder: e.placeholder,
|
|
1883
|
-
onFocus:
|
|
1884
|
-
onChange:
|
|
1884
|
+
onFocus: h,
|
|
1885
|
+
onChange: g,
|
|
1885
1886
|
disabled: u.value
|
|
1886
1887
|
}, null);
|
|
1887
|
-
return
|
|
1888
|
+
return D(() => e.modelValue, () => {
|
|
1888
1889
|
i.value = e.modelValue ?? "";
|
|
1889
|
-
}), () =>
|
|
1890
|
-
ref:
|
|
1890
|
+
}), () => l("div", {
|
|
1891
|
+
ref: s,
|
|
1891
1892
|
role: "combobox",
|
|
1892
1893
|
"aria-controls": "menu",
|
|
1893
|
-
"aria-expanded":
|
|
1894
|
-
}, [
|
|
1895
|
-
open:
|
|
1894
|
+
"aria-expanded": o.value
|
|
1895
|
+
}, [l(bn, {
|
|
1896
|
+
open: o.value,
|
|
1896
1897
|
"full-width": !0
|
|
1897
1898
|
}, {
|
|
1898
|
-
trigger: () =>
|
|
1899
|
-
default: () =>
|
|
1899
|
+
trigger: () => l(w, null, null),
|
|
1900
|
+
default: () => S.value.map((e) => l(Sn, { onClick: () => v(e) }, { default: () => [e.label] }))
|
|
1900
1901
|
})]);
|
|
1901
1902
|
}
|
|
1902
|
-
}),
|
|
1903
|
+
}), On = {
|
|
1903
1904
|
color: "#000",
|
|
1904
1905
|
size: "medium",
|
|
1905
1906
|
variant: "outline"
|
|
1906
|
-
}, Y = /* @__PURE__ */
|
|
1907
|
+
}, Y = /* @__PURE__ */ u({
|
|
1907
1908
|
name: "TIcon",
|
|
1908
1909
|
props: {
|
|
1909
1910
|
icon: {
|
|
@@ -1915,7 +1916,7 @@ var cn = {
|
|
|
1915
1916
|
variant: String
|
|
1916
1917
|
},
|
|
1917
1918
|
setup(e, { attrs: t }) {
|
|
1918
|
-
let r = n(() =>
|
|
1919
|
+
let r = n(() => F({}, On, e, t)), i = J(), a = n(() => M(i.value.colors, r.value.color) || r.value.color), o = n(() => `${i.value.iconSet}:${r.value.icon}${r.value.variant === "solid" ? "-solid" : ""}`), s = {
|
|
1919
1920
|
miniature: "6px",
|
|
1920
1921
|
"extra-small": "10px",
|
|
1921
1922
|
small: "16px",
|
|
@@ -1923,17 +1924,17 @@ var cn = {
|
|
|
1923
1924
|
large: "24px",
|
|
1924
1925
|
"extra-large": "28px",
|
|
1925
1926
|
huge: "44px"
|
|
1926
|
-
},
|
|
1927
|
-
return () =>
|
|
1928
|
-
icon:
|
|
1927
|
+
}, c = n(() => s[r.value.size]);
|
|
1928
|
+
return () => l(k, h({
|
|
1929
|
+
icon: o.value,
|
|
1929
1930
|
color: a.value,
|
|
1930
|
-
height:
|
|
1931
|
-
width:
|
|
1931
|
+
height: c.value,
|
|
1932
|
+
width: c.value
|
|
1932
1933
|
}, t), null);
|
|
1933
1934
|
}
|
|
1934
|
-
}),
|
|
1935
|
-
let e =
|
|
1936
|
-
return n(() =>
|
|
1935
|
+
}), kn = () => {
|
|
1936
|
+
let e = J();
|
|
1937
|
+
return n(() => A({
|
|
1937
1938
|
"&, & > *": {
|
|
1938
1939
|
margin: 0,
|
|
1939
1940
|
padding: 0,
|
|
@@ -2004,7 +2005,7 @@ var cn = {
|
|
|
2004
2005
|
zIndex: 45
|
|
2005
2006
|
}
|
|
2006
2007
|
}));
|
|
2007
|
-
},
|
|
2008
|
+
}, An = { size: "medium" }, jn = /* @__PURE__ */ u({
|
|
2008
2009
|
name: "TModal",
|
|
2009
2010
|
props: {
|
|
2010
2011
|
open: Boolean,
|
|
@@ -2015,71 +2016,71 @@ var cn = {
|
|
|
2015
2016
|
},
|
|
2016
2017
|
emits: ["close", "cancel"],
|
|
2017
2018
|
setup(e, { slots: t, attrs: r, emit: i, expose: a }) {
|
|
2018
|
-
let
|
|
2019
|
-
|
|
2020
|
-
`${
|
|
2019
|
+
let o = n(() => F({}, An, e, r)), s = C(o.value.open), c = kn(), u = n(() => [
|
|
2020
|
+
c.value,
|
|
2021
|
+
`${c.value}--${o.value.size}`,
|
|
2021
2022
|
{
|
|
2022
|
-
[`${
|
|
2023
|
-
[`${
|
|
2024
|
-
[`${
|
|
2023
|
+
[`${c.value}--featured`]: o.value.featured,
|
|
2024
|
+
[`${c.value}--active`]: s.value,
|
|
2025
|
+
[`${c.value}--non-blocking`]: o.value.nonBlocking
|
|
2025
2026
|
}
|
|
2026
|
-
]), d =
|
|
2027
|
-
|
|
2027
|
+
]), d = C(null), f = () => {
|
|
2028
|
+
s.value = !0, o.value.nonBlocking ? d.value?.show() : d.value?.showModal();
|
|
2028
2029
|
}, p = () => {
|
|
2029
|
-
|
|
2030
|
+
s.value = !1, d.value?.close();
|
|
2030
2031
|
};
|
|
2031
|
-
|
|
2032
|
-
d.value &&
|
|
2032
|
+
D([() => o.value.open, d], () => {
|
|
2033
|
+
d.value && o.value.open ? f() : p();
|
|
2033
2034
|
}, { immediate: !0 });
|
|
2034
2035
|
let m = (e) => {
|
|
2035
|
-
|
|
2036
|
+
o.value.open ? e.preventDefault() : s.value = !1, i("cancel");
|
|
2036
2037
|
};
|
|
2037
|
-
|
|
2038
|
+
y(() => {
|
|
2038
2039
|
d.value && d.value.addEventListener("cancel", m);
|
|
2039
|
-
}),
|
|
2040
|
+
}), b(() => {
|
|
2040
2041
|
d.value && d.value.removeEventListener("cancel", m);
|
|
2041
2042
|
});
|
|
2042
|
-
let
|
|
2043
|
-
|
|
2044
|
-
},
|
|
2045
|
-
e.target === d.value && (
|
|
2043
|
+
let h = () => {
|
|
2044
|
+
o.value.open || p(), i("close");
|
|
2045
|
+
}, g = (e) => {
|
|
2046
|
+
e.target === d.value && (o.value.open || p(), i("close"));
|
|
2046
2047
|
};
|
|
2047
2048
|
a({
|
|
2048
2049
|
showModal: f,
|
|
2049
2050
|
close: p
|
|
2050
2051
|
});
|
|
2051
|
-
let
|
|
2052
|
-
|
|
2053
|
-
!
|
|
2052
|
+
let _ = C(0);
|
|
2053
|
+
D(s, () => {
|
|
2054
|
+
!s.value && o.value.destroyOnClose && (_.value += 1);
|
|
2054
2055
|
});
|
|
2055
|
-
let
|
|
2056
|
+
let v = () => l("dialog", {
|
|
2056
2057
|
ref: d,
|
|
2057
2058
|
class: u.value,
|
|
2058
2059
|
"aria-labelledby": "modal-header",
|
|
2059
2060
|
"aria-describedby": "modal-body",
|
|
2060
2061
|
"aria-modal": "true",
|
|
2061
|
-
onClick:
|
|
2062
|
-
key:
|
|
2062
|
+
onClick: g,
|
|
2063
|
+
key: _.value
|
|
2063
2064
|
}, [
|
|
2064
|
-
t.header &&
|
|
2065
|
+
t.header && l("div", {
|
|
2065
2066
|
id: "modal-header",
|
|
2066
|
-
class: `${
|
|
2067
|
-
}, [t.header(),
|
|
2068
|
-
class: `${
|
|
2069
|
-
onClick:
|
|
2067
|
+
class: `${c.value}__header`
|
|
2068
|
+
}, [t.header(), o.value.featured && l("button", {
|
|
2069
|
+
class: `${c.value}__close-button`,
|
|
2070
|
+
onClick: h,
|
|
2070
2071
|
"aria-label": "Close"
|
|
2071
|
-
}, [
|
|
2072
|
-
(t.body || t.default) &&
|
|
2072
|
+
}, [l(Y, { icon: "x-mark" }, null)])]),
|
|
2073
|
+
(t.body || t.default) && l("div", {
|
|
2073
2074
|
id: "modal-body",
|
|
2074
|
-
class: `${
|
|
2075
|
+
class: `${c.value}__body`
|
|
2075
2076
|
}, [(t.body ?? t.default)?.()]),
|
|
2076
|
-
t.footer &&
|
|
2077
|
+
t.footer && l("div", { class: `${c.value}__footer` }, [t.footer()])
|
|
2077
2078
|
]);
|
|
2078
|
-
return
|
|
2079
|
+
return o.value.nonBlocking ? () => l("div", null, [o.value.nonBlocking && s.value && l("div", { class: `${c.value}__backdrop` }, null), l(v, null, null)]) : () => l(v, null, null);
|
|
2079
2080
|
}
|
|
2080
|
-
}),
|
|
2081
|
-
let t =
|
|
2082
|
-
return n(() =>
|
|
2081
|
+
}), Mn = (e) => {
|
|
2082
|
+
let t = J();
|
|
2083
|
+
return n(() => A({
|
|
2083
2084
|
margin: 0,
|
|
2084
2085
|
padding: 0,
|
|
2085
2086
|
boxSizing: "border-box",
|
|
@@ -2152,7 +2153,7 @@ var cn = {
|
|
|
2152
2153
|
"&--normal": { fontStyle: "normal" },
|
|
2153
2154
|
"&--italic": { fontStyle: "italic" }
|
|
2154
2155
|
}));
|
|
2155
|
-
},
|
|
2156
|
+
}, Nn = {
|
|
2156
2157
|
h1: "h1",
|
|
2157
2158
|
h2: "h2",
|
|
2158
2159
|
h3: "h3",
|
|
@@ -2168,13 +2169,13 @@ var cn = {
|
|
|
2168
2169
|
b4: "p",
|
|
2169
2170
|
b5: "p",
|
|
2170
2171
|
b6: "p"
|
|
2171
|
-
},
|
|
2172
|
+
}, Pn = [
|
|
2172
2173
|
"http:",
|
|
2173
2174
|
"https:",
|
|
2174
2175
|
"mailto:",
|
|
2175
2176
|
"tel:",
|
|
2176
2177
|
"ftp:"
|
|
2177
|
-
],
|
|
2178
|
+
], Fn = (e) => Pn.some((t) => e.trim().toLowerCase().startsWith(t)), In = (e) => {
|
|
2178
2179
|
let t = [
|
|
2179
2180
|
{
|
|
2180
2181
|
regex: /\*\*([\s\S]+?)\*\*/g,
|
|
@@ -2198,23 +2199,23 @@ var cn = {
|
|
|
2198
2199
|
url: a ? t[2]?.trim() : void 0
|
|
2199
2200
|
});
|
|
2200
2201
|
return n;
|
|
2201
|
-
},
|
|
2202
|
+
}, Ln = (e) => {
|
|
2202
2203
|
let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end), n = [], r = 0;
|
|
2203
2204
|
for (let e of t) e.start >= r && (n.push(e), r = e.end);
|
|
2204
2205
|
return n;
|
|
2205
2206
|
}, X = (e) => {
|
|
2206
2207
|
if (!e) return [e];
|
|
2207
|
-
let t =
|
|
2208
|
+
let t = In(e);
|
|
2208
2209
|
if (t.length === 0) return [e];
|
|
2209
|
-
let n =
|
|
2210
|
+
let n = Ln(t), r = [], i = 0;
|
|
2210
2211
|
for (let t of n) {
|
|
2211
2212
|
t.start > i && r.push(e.substring(i, t.start));
|
|
2212
2213
|
let n = X(t.content);
|
|
2213
|
-
t.tag === "a" ? t.url &&
|
|
2214
|
+
t.tag === "a" ? t.url && Fn(t.url) ? r.push(d("a", {
|
|
2214
2215
|
href: t.url,
|
|
2215
2216
|
target: "_blank",
|
|
2216
2217
|
rel: "noopener noreferrer"
|
|
2217
|
-
}, n)) : r.push(...n) : r.push(
|
|
2218
|
+
}, n)) : r.push(...n) : r.push(d(t.tag, n)), i = t.end;
|
|
2218
2219
|
}
|
|
2219
2220
|
return i < e.length && r.push(e.substring(i)), r.length > 0 ? r : [e];
|
|
2220
2221
|
}, Z = (e) => typeof e == "object" && !!e && "type" in e && e.type !== void 0, Q = (e) => {
|
|
@@ -2234,8 +2235,8 @@ var cn = {
|
|
|
2234
2235
|
let t = Q(e.children);
|
|
2235
2236
|
n = Array.isArray(t) ? t : [t];
|
|
2236
2237
|
} else return e;
|
|
2237
|
-
return
|
|
2238
|
-
},
|
|
2238
|
+
return d(e.type, { ...e.props }, n);
|
|
2239
|
+
}, Rn = (e) => {
|
|
2239
2240
|
if (typeof e == "string") return X(e);
|
|
2240
2241
|
if (Array.isArray(e)) return e.flatMap((e) => {
|
|
2241
2242
|
if (typeof e == "string") return X(e);
|
|
@@ -2250,12 +2251,12 @@ var cn = {
|
|
|
2250
2251
|
return Array.isArray(t) ? t : [t];
|
|
2251
2252
|
}
|
|
2252
2253
|
return [e];
|
|
2253
|
-
},
|
|
2254
|
+
}, zn = {
|
|
2254
2255
|
fontStyle: "normal",
|
|
2255
2256
|
fontWeight: "regular",
|
|
2256
2257
|
variant: "b0",
|
|
2257
2258
|
color: "#373737"
|
|
2258
|
-
}, $ = /* @__PURE__ */
|
|
2259
|
+
}, $ = /* @__PURE__ */ u({
|
|
2259
2260
|
name: "TTypography",
|
|
2260
2261
|
props: {
|
|
2261
2262
|
fontStyle: String,
|
|
@@ -2265,21 +2266,21 @@ var cn = {
|
|
|
2265
2266
|
color: String
|
|
2266
2267
|
},
|
|
2267
2268
|
setup(e, { attrs: t, slots: r }) {
|
|
2268
|
-
let i = n(() =>
|
|
2269
|
+
let i = n(() => F({}, zn, e, t)), a = J(), o = Mn(n(() => M(a.value.colors, i.value.color) || a.value.typography.color).value), s = n(() => [
|
|
2269
2270
|
o.value,
|
|
2270
2271
|
`${o.value}--${i.value.variant}`,
|
|
2271
2272
|
`${o.value}--${i.value.fontWeight}`,
|
|
2272
2273
|
`${o.value}--${i.value.fontStyle}`
|
|
2273
|
-
]),
|
|
2274
|
+
]), c = n(() => i.value.as || Nn[i.value.variant]);
|
|
2274
2275
|
return () => {
|
|
2275
2276
|
let e = r.default?.();
|
|
2276
|
-
if (!e) return c
|
|
2277
|
-
if (!a.value.parseMarkdown) return c
|
|
2278
|
-
let t =
|
|
2279
|
-
return c
|
|
2277
|
+
if (!e) return d(c.value, { class: s.value });
|
|
2278
|
+
if (!a.value.parseMarkdown) return d(c.value, { class: s.value }, e);
|
|
2279
|
+
let t = Rn(e);
|
|
2280
|
+
return d(c.value, { class: s.value }, t);
|
|
2280
2281
|
};
|
|
2281
2282
|
}
|
|
2282
|
-
}),
|
|
2283
|
+
}), Bn = () => n(() => A({
|
|
2283
2284
|
"& > [class$=\"__body\"]": { paddingBlock: 0 },
|
|
2284
2285
|
"&__body": {
|
|
2285
2286
|
display: "flex",
|
|
@@ -2292,15 +2293,15 @@ var cn = {
|
|
|
2292
2293
|
width: "3.5rem",
|
|
2293
2294
|
height: "auto"
|
|
2294
2295
|
}
|
|
2295
|
-
})),
|
|
2296
|
+
})), Vn = {
|
|
2296
2297
|
cancelText: "Cancel",
|
|
2297
2298
|
confirmText: "OK"
|
|
2298
|
-
},
|
|
2299
|
+
}, Hn = /* @__PURE__ */ u({
|
|
2299
2300
|
name: "TDialog",
|
|
2300
2301
|
components: {
|
|
2301
2302
|
TTypography: $,
|
|
2302
|
-
TModal:
|
|
2303
|
-
TButton:
|
|
2303
|
+
TModal: jn,
|
|
2304
|
+
TButton: un,
|
|
2304
2305
|
TIcon: Y
|
|
2305
2306
|
},
|
|
2306
2307
|
props: {
|
|
@@ -2316,7 +2317,8 @@ var cn = {
|
|
|
2316
2317
|
icon: String,
|
|
2317
2318
|
cancellable: Boolean,
|
|
2318
2319
|
cancelText: String,
|
|
2319
|
-
confirmText: String
|
|
2320
|
+
confirmText: String,
|
|
2321
|
+
size: String
|
|
2320
2322
|
},
|
|
2321
2323
|
emits: [
|
|
2322
2324
|
"confirm",
|
|
@@ -2324,44 +2326,233 @@ var cn = {
|
|
|
2324
2326
|
"close"
|
|
2325
2327
|
],
|
|
2326
2328
|
setup(e, { emit: t }) {
|
|
2327
|
-
let r = n(() =>
|
|
2328
|
-
if (r.value.color) return r.value.color === "primary" ? "primary.main" :
|
|
2329
|
+
let r = n(() => F({}, Vn, e)), i = Bn(), a = n(() => {
|
|
2330
|
+
if (r.value.color) return r.value.color === "primary" ? "primary.main" : sn(r.value.color);
|
|
2329
2331
|
});
|
|
2330
|
-
return () =>
|
|
2332
|
+
return () => d(jn, {
|
|
2331
2333
|
onClose: () => r.value.cancellable && t("close"),
|
|
2332
2334
|
onCancel: () => r.value.cancellable && t("cancel"),
|
|
2333
2335
|
onConfirm: () => t("confirm"),
|
|
2334
2336
|
class: i.value,
|
|
2335
|
-
open: !0
|
|
2337
|
+
open: !0,
|
|
2338
|
+
size: r.value.size
|
|
2336
2339
|
}, {
|
|
2337
|
-
header: () =>
|
|
2340
|
+
header: () => d($, {
|
|
2338
2341
|
variant: "s2",
|
|
2339
2342
|
fontWeight: "semibold"
|
|
2340
2343
|
}, () => r.value.title),
|
|
2341
|
-
default: () =>
|
|
2344
|
+
default: () => d("div", { class: `${i.value}__body` }, [r.value.icon ? d(Y, {
|
|
2342
2345
|
class: `${i.value}__body-icon`,
|
|
2343
2346
|
variant: "solid",
|
|
2344
2347
|
color: a.value,
|
|
2345
2348
|
icon: r.value.icon
|
|
2346
|
-
}) : void 0,
|
|
2349
|
+
}) : void 0, d($, {
|
|
2347
2350
|
class: `${i.value}__body-text`,
|
|
2348
2351
|
variant: "b1",
|
|
2349
2352
|
innerHTML: r.value.message
|
|
2350
2353
|
})]),
|
|
2351
|
-
footer: () => [r.value.cancellable ?
|
|
2354
|
+
footer: () => [r.value.cancellable ? d(un, {
|
|
2352
2355
|
onClick: () => t("cancel"),
|
|
2353
2356
|
color: r.value.color,
|
|
2354
2357
|
variant: "secondary"
|
|
2355
|
-
}, () => r.value.cancelText) : void 0,
|
|
2358
|
+
}, () => r.value.cancelText) : void 0, d(un, {
|
|
2356
2359
|
onClick: () => t("confirm"),
|
|
2357
2360
|
color: r.value.color
|
|
2358
2361
|
}, () => r.value.confirmText)]
|
|
2359
2362
|
});
|
|
2360
2363
|
}
|
|
2361
|
-
}),
|
|
2362
|
-
|
|
2364
|
+
}), Un = {
|
|
2365
|
+
key: 0,
|
|
2366
|
+
class: "t-file-upload__label"
|
|
2367
|
+
}, Wn = ["for"], Gn = { class: "t-file-upload__filename" }, Kn = ["aria-label", "disabled"], qn = [
|
|
2368
|
+
"id",
|
|
2369
|
+
"name",
|
|
2370
|
+
"required",
|
|
2371
|
+
"disabled",
|
|
2372
|
+
"form",
|
|
2373
|
+
"accept"
|
|
2374
|
+
], Jn = {
|
|
2375
|
+
key: 4,
|
|
2376
|
+
class: "t-file-upload__hints"
|
|
2377
|
+
}, Yn = { key: 1 }, Xn = /* @__PURE__ */ an(/* @__PURE__ */ u({
|
|
2378
|
+
name: "TFileUpload",
|
|
2379
|
+
inheritAttrs: !1,
|
|
2380
|
+
__name: "TFileUpload",
|
|
2381
|
+
props: /* @__PURE__ */ m({
|
|
2382
|
+
label: {},
|
|
2383
|
+
ctaText: { default: "Subir archivo" },
|
|
2384
|
+
loadingText: { default: "Cargando archivo" },
|
|
2385
|
+
removeLabel: { default: "Quitar archivo" },
|
|
2386
|
+
formatsHint: {},
|
|
2387
|
+
maxSizeHint: {},
|
|
2388
|
+
accept: {},
|
|
2389
|
+
maxSizeBytes: {},
|
|
2390
|
+
loading: { type: Boolean },
|
|
2391
|
+
id: {},
|
|
2392
|
+
name: {},
|
|
2393
|
+
required: { type: Boolean },
|
|
2394
|
+
disabled: { type: Boolean },
|
|
2395
|
+
form: {},
|
|
2396
|
+
as: { default: "div" }
|
|
2397
|
+
}, {
|
|
2398
|
+
modelValue: { default: null },
|
|
2399
|
+
modelModifiers: {}
|
|
2400
|
+
}),
|
|
2401
|
+
emits: /* @__PURE__ */ m(["error"], ["update:modelValue"]),
|
|
2402
|
+
setup(e, { expose: t, emit: r }) {
|
|
2403
|
+
let u = r, d = ne(e, "modelValue"), f = C(null), p = te(), m = n(() => e.id ?? p), g = n(() => e.loading ? "loading" : d.value ? "loaded" : "empty"), _ = n(() => {
|
|
2404
|
+
if (!(!e.accept || e.accept.length === 0)) return e.accept.map((e) => `.${e}`).join(",");
|
|
2405
|
+
}), v = n(() => g.value === "empty" && (!!e.formatsHint || !!e.maxSizeHint)), b = () => {
|
|
2406
|
+
let e = f.value;
|
|
2407
|
+
if (!e) return;
|
|
2408
|
+
let t = d.value;
|
|
2409
|
+
if (t !== (e.files?.[0] ?? null)) {
|
|
2410
|
+
if (!t) {
|
|
2411
|
+
e.value = "";
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
try {
|
|
2415
|
+
let n = new DataTransfer();
|
|
2416
|
+
n.items.add(t), e.files = n.files;
|
|
2417
|
+
} catch {}
|
|
2418
|
+
}
|
|
2419
|
+
}, S = () => {
|
|
2420
|
+
let t = f.value;
|
|
2421
|
+
if (!t) return;
|
|
2422
|
+
let n = t.files?.[0];
|
|
2423
|
+
if (n) {
|
|
2424
|
+
if (e.accept?.length) {
|
|
2425
|
+
let t = n.name.toLowerCase();
|
|
2426
|
+
if (!e.accept.some((e) => t.endsWith(`.${e.toLowerCase()}`))) {
|
|
2427
|
+
b(), u("error", "bad-format");
|
|
2428
|
+
return;
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
if (e.maxSizeBytes !== void 0 && n.size > e.maxSizeBytes) {
|
|
2432
|
+
b(), u("error", "too-large");
|
|
2433
|
+
return;
|
|
2434
|
+
}
|
|
2435
|
+
d.value = n;
|
|
2436
|
+
}
|
|
2437
|
+
}, ee = () => {
|
|
2438
|
+
e.disabled || (d.value = null);
|
|
2439
|
+
};
|
|
2440
|
+
return y(b), D(d, b), t({ inputRef: f }), (t, n) => (x(), i(E(re), {
|
|
2441
|
+
as: e.as,
|
|
2442
|
+
class: "t-file-upload",
|
|
2443
|
+
"data-state": g.value,
|
|
2444
|
+
"data-disabled": e.disabled || void 0
|
|
2445
|
+
}, {
|
|
2446
|
+
default: O(() => [
|
|
2447
|
+
e.label || t.$slots.label ? (x(), o("div", Un, [w(t.$slots, "label", {}, () => [l(E($), {
|
|
2448
|
+
variant: "b3",
|
|
2449
|
+
"font-weight": "semibold"
|
|
2450
|
+
}, {
|
|
2451
|
+
default: O(() => [c(T(e.label), 1)]),
|
|
2452
|
+
_: 1
|
|
2453
|
+
})], !0)])) : a("", !0),
|
|
2454
|
+
g.value === "empty" ? (x(), o("label", h({
|
|
2455
|
+
key: 1,
|
|
2456
|
+
class: "t-file-upload__box",
|
|
2457
|
+
"data-state": "empty",
|
|
2458
|
+
for: m.value
|
|
2459
|
+
}, t.$attrs), [l(E(Y), {
|
|
2460
|
+
icon: "paper-clip",
|
|
2461
|
+
size: "small",
|
|
2462
|
+
color: "gray.main"
|
|
2463
|
+
}), l(E($), {
|
|
2464
|
+
variant: "b3",
|
|
2465
|
+
class: "t-file-upload__cta-text"
|
|
2466
|
+
}, {
|
|
2467
|
+
default: O(() => [w(t.$slots, "cta", {}, () => [c(T(e.ctaText), 1)], !0)]),
|
|
2468
|
+
_: 3
|
|
2469
|
+
})], 16, Wn)) : g.value === "loading" ? (x(), o("div", h({
|
|
2470
|
+
key: 2,
|
|
2471
|
+
class: "t-file-upload__box",
|
|
2472
|
+
"data-state": "loading"
|
|
2473
|
+
}, t.$attrs), [l(E(Y), {
|
|
2474
|
+
icon: "arrow-path",
|
|
2475
|
+
size: "small",
|
|
2476
|
+
color: "primary.main"
|
|
2477
|
+
}), l(E($), {
|
|
2478
|
+
variant: "b3",
|
|
2479
|
+
class: "t-file-upload__cta-text",
|
|
2480
|
+
color: "primary.main"
|
|
2481
|
+
}, {
|
|
2482
|
+
default: O(() => [w(t.$slots, "loading", {}, () => [c(T(e.loadingText), 1)], !0)]),
|
|
2483
|
+
_: 3
|
|
2484
|
+
})], 16)) : (x(), o("div", h({
|
|
2485
|
+
key: 3,
|
|
2486
|
+
class: "t-file-upload__box",
|
|
2487
|
+
"data-state": "loaded"
|
|
2488
|
+
}, t.$attrs), [
|
|
2489
|
+
l(E(Y), {
|
|
2490
|
+
icon: "document",
|
|
2491
|
+
size: "small",
|
|
2492
|
+
color: "primary.main"
|
|
2493
|
+
}),
|
|
2494
|
+
s("div", Gn, [w(t.$slots, "file", { file: d.value }, () => [l(E($), {
|
|
2495
|
+
variant: "b3",
|
|
2496
|
+
color: "primary.main",
|
|
2497
|
+
class: "t-file-upload__filename-text"
|
|
2498
|
+
}, {
|
|
2499
|
+
default: O(() => [c(T(d.value.name), 1)]),
|
|
2500
|
+
_: 1
|
|
2501
|
+
})], !0)]),
|
|
2502
|
+
s("button", {
|
|
2503
|
+
type: "button",
|
|
2504
|
+
class: "t-file-upload__remove",
|
|
2505
|
+
"aria-label": e.removeLabel,
|
|
2506
|
+
disabled: e.disabled,
|
|
2507
|
+
onClick: ee
|
|
2508
|
+
}, [l(E(Y), {
|
|
2509
|
+
icon: "x-circle",
|
|
2510
|
+
color: "#FFFFFF",
|
|
2511
|
+
width: 18,
|
|
2512
|
+
height: 18
|
|
2513
|
+
})], 8, Kn)
|
|
2514
|
+
], 16)),
|
|
2515
|
+
s("input", {
|
|
2516
|
+
id: m.value,
|
|
2517
|
+
ref_key: "inputRef",
|
|
2518
|
+
ref: f,
|
|
2519
|
+
class: "t-file-upload__input",
|
|
2520
|
+
type: "file",
|
|
2521
|
+
title: "",
|
|
2522
|
+
name: e.name,
|
|
2523
|
+
required: e.required,
|
|
2524
|
+
disabled: e.disabled || e.loading,
|
|
2525
|
+
form: e.form,
|
|
2526
|
+
accept: _.value,
|
|
2527
|
+
onChange: S
|
|
2528
|
+
}, null, 40, qn),
|
|
2529
|
+
v.value ? (x(), o("div", Jn, [e.formatsHint ? (x(), i(E($), {
|
|
2530
|
+
key: 0,
|
|
2531
|
+
variant: "b4",
|
|
2532
|
+
color: "gray.medium1"
|
|
2533
|
+
}, {
|
|
2534
|
+
default: O(() => [c(T(e.formatsHint), 1)]),
|
|
2535
|
+
_: 1
|
|
2536
|
+
})) : (x(), o("span", Yn)), e.maxSizeHint ? (x(), i(E($), {
|
|
2537
|
+
key: 2,
|
|
2538
|
+
variant: "b4",
|
|
2539
|
+
color: "gray.medium1"
|
|
2540
|
+
}, {
|
|
2541
|
+
default: O(() => [c(T(e.maxSizeHint), 1)]),
|
|
2542
|
+
_: 1
|
|
2543
|
+
})) : a("", !0)])) : a("", !0)
|
|
2544
|
+
]),
|
|
2545
|
+
_: 3
|
|
2546
|
+
}, 8, [
|
|
2547
|
+
"as",
|
|
2548
|
+
"data-state",
|
|
2549
|
+
"data-disabled"
|
|
2550
|
+
]));
|
|
2551
|
+
}
|
|
2552
|
+
}), [["__scopeId", "data-v-12fb1894"]]), Zn = (e) => {
|
|
2553
|
+
let t = J(), r = n(() => sn(e.value)), i = n(() => r.value === "primary" ? t.value.colors.primary.ultraDark : zt(.15, t.value.colors[r.value])), a = n(() => r.value === "primary" ? t.value.colors.primary.main : t.value.colors[r.value]), o = n(() => r.value === "primary" ? t.value.colors.primary.light1 : q(.15, t.value.colors[r.value])), s = n(() => r.value === "primary" ? t.value.colors.primary.light2 : q(.2, t.value.colors[r.value])), c = n(() => r.value === "primary" ? t.value.colors.primary.light3 : q(.25, t.value.colors[r.value]));
|
|
2363
2554
|
return {
|
|
2364
|
-
baseClass: n(() =>
|
|
2555
|
+
baseClass: n(() => A({
|
|
2365
2556
|
"&, *": {
|
|
2366
2557
|
margin: 0,
|
|
2367
2558
|
padding: 0,
|
|
@@ -2434,7 +2625,7 @@ var cn = {
|
|
|
2434
2625
|
},
|
|
2435
2626
|
"&--rounded": { borderRadius: "50%" }
|
|
2436
2627
|
})),
|
|
2437
|
-
iconClass: n(() =>
|
|
2628
|
+
iconClass: n(() => A({
|
|
2438
2629
|
margin: 0,
|
|
2439
2630
|
padding: 0,
|
|
2440
2631
|
"&--large": { height: "1.25rem" },
|
|
@@ -2442,13 +2633,13 @@ var cn = {
|
|
|
2442
2633
|
"&--small": { height: "1rem" }
|
|
2443
2634
|
}))
|
|
2444
2635
|
};
|
|
2445
|
-
},
|
|
2636
|
+
}, Qn = {
|
|
2446
2637
|
variant: "primary",
|
|
2447
2638
|
size: "medium",
|
|
2448
2639
|
icon: "academic-cap",
|
|
2449
2640
|
type: "button",
|
|
2450
2641
|
color: "primary"
|
|
2451
|
-
},
|
|
2642
|
+
}, $n = /* @__PURE__ */ u({
|
|
2452
2643
|
name: "TIconButton",
|
|
2453
2644
|
props: {
|
|
2454
2645
|
variant: String,
|
|
@@ -2462,35 +2653,35 @@ var cn = {
|
|
|
2462
2653
|
},
|
|
2463
2654
|
emits: ["click"],
|
|
2464
2655
|
setup(e, { attrs: t, emit: r }) {
|
|
2465
|
-
let i = n(() =>
|
|
2656
|
+
let i = n(() => F({}, Qn, e, t)), { baseClass: a, iconClass: o } = Zn(n(() => i.value.color)), s = J(), c = n(() => [
|
|
2466
2657
|
a.value,
|
|
2467
2658
|
`${a.value}--${i.value.variant}`,
|
|
2468
2659
|
`${a.value}--${i.value.size}`,
|
|
2469
2660
|
{ [`${a.value}--rounded`]: i.value.rounded }
|
|
2470
2661
|
]), u = n(() => [
|
|
2471
|
-
|
|
2472
|
-
`${
|
|
2473
|
-
`${
|
|
2662
|
+
o.value,
|
|
2663
|
+
`${o.value}--${i.value.variant}`,
|
|
2664
|
+
`${o.value}--${i.value.size}`,
|
|
2474
2665
|
{ [`${a.value}--loading`]: i.value.loading }
|
|
2475
|
-
]),
|
|
2666
|
+
]), d = () => {
|
|
2476
2667
|
i.value.loading || r("click");
|
|
2477
2668
|
};
|
|
2478
|
-
return () =>
|
|
2479
|
-
class:
|
|
2669
|
+
return () => l("button", h({
|
|
2670
|
+
class: c.value,
|
|
2480
2671
|
type: i.value.type,
|
|
2481
2672
|
disabled: i.value.disabled,
|
|
2482
|
-
onClick:
|
|
2483
|
-
}, t), [i.value.loading ?
|
|
2673
|
+
onClick: d
|
|
2674
|
+
}, t), [i.value.loading ? l(k, {
|
|
2484
2675
|
class: `${a.value}__spinner`,
|
|
2485
2676
|
icon: "svg-spinners:90-ring-with-bg"
|
|
2486
|
-
}, null) :
|
|
2487
|
-
icon: `${
|
|
2677
|
+
}, null) : l(k, {
|
|
2678
|
+
icon: `${s.value.iconSet}:${i.value.icon}`,
|
|
2488
2679
|
class: u.value
|
|
2489
2680
|
}, null)]);
|
|
2490
2681
|
}
|
|
2491
|
-
}),
|
|
2492
|
-
let e =
|
|
2493
|
-
return n(() =>
|
|
2682
|
+
}), er = () => {
|
|
2683
|
+
let e = J();
|
|
2684
|
+
return n(() => A({
|
|
2494
2685
|
margin: 0,
|
|
2495
2686
|
padding: 0,
|
|
2496
2687
|
width: "fit-content",
|
|
@@ -2518,10 +2709,10 @@ var cn = {
|
|
|
2518
2709
|
fontSize: "0.875rem"
|
|
2519
2710
|
}
|
|
2520
2711
|
}));
|
|
2521
|
-
},
|
|
2712
|
+
}, tr = {
|
|
2522
2713
|
variant: "primary",
|
|
2523
2714
|
size: "medium"
|
|
2524
|
-
},
|
|
2715
|
+
}, nr = /* @__PURE__ */ u({
|
|
2525
2716
|
name: "TButton",
|
|
2526
2717
|
props: {
|
|
2527
2718
|
variant: String,
|
|
@@ -2531,23 +2722,23 @@ var cn = {
|
|
|
2531
2722
|
rightIcon: String
|
|
2532
2723
|
},
|
|
2533
2724
|
setup(e, { attrs: t, slots: r }) {
|
|
2534
|
-
let i = n(() =>
|
|
2725
|
+
let i = n(() => F({}, tr, e, t)), a = er(), o = J(), s = n(() => [
|
|
2535
2726
|
a.value,
|
|
2536
2727
|
`${a.value}--${i.value.variant}`,
|
|
2537
2728
|
`${a.value}--${i.value.size}`
|
|
2538
2729
|
]);
|
|
2539
|
-
return () =>
|
|
2540
|
-
class:
|
|
2730
|
+
return () => l("a", h({
|
|
2731
|
+
class: s.value,
|
|
2541
2732
|
href: i.value.href
|
|
2542
2733
|
}, t), [
|
|
2543
|
-
i.value.leftIcon ?
|
|
2734
|
+
i.value.leftIcon ? l(k, { icon: `${o.value.iconSet}:${i.value.leftIcon}` }, null) : null,
|
|
2544
2735
|
r.default ? r.default() : null,
|
|
2545
|
-
i.value.rightIcon ?
|
|
2736
|
+
i.value.rightIcon ? l(k, { icon: `${o.value.iconSet}:${i.value.rightIcon}` }, null) : null
|
|
2546
2737
|
]);
|
|
2547
2738
|
}
|
|
2548
|
-
}),
|
|
2549
|
-
let t = n(() => e.color), r =
|
|
2550
|
-
return n(() =>
|
|
2739
|
+
}), rr = (e) => {
|
|
2740
|
+
let t = n(() => e.color), r = J();
|
|
2741
|
+
return n(() => A({
|
|
2551
2742
|
margin: 0,
|
|
2552
2743
|
padding: 0,
|
|
2553
2744
|
width: "3.5rem",
|
|
@@ -2571,20 +2762,20 @@ var cn = {
|
|
|
2571
2762
|
"100%": { transform: "rotate(360deg)" }
|
|
2572
2763
|
}
|
|
2573
2764
|
}));
|
|
2574
|
-
},
|
|
2765
|
+
}, ir = {
|
|
2575
2766
|
size: "auto",
|
|
2576
2767
|
color: "#5C0087"
|
|
2577
|
-
},
|
|
2768
|
+
}, ar = /* @__PURE__ */ u({
|
|
2578
2769
|
name: "TSpinner",
|
|
2579
2770
|
props: {
|
|
2580
2771
|
size: String,
|
|
2581
2772
|
color: String
|
|
2582
2773
|
},
|
|
2583
2774
|
setup(e, { attrs: t }) {
|
|
2584
|
-
let r = n(() =>
|
|
2585
|
-
return () =>
|
|
2775
|
+
let r = n(() => F({}, ir, e, t)), i = J(), a = rr({ color: n(() => M(i.value.colors, r.value.color) || r.value.color).value }), o = n(() => [a.value, `${a.value}--${r.value.size}`]);
|
|
2776
|
+
return () => l("div", { class: o.value }, null);
|
|
2586
2777
|
}
|
|
2587
|
-
}),
|
|
2778
|
+
}), or = () => n(() => A({
|
|
2588
2779
|
bottom: 0,
|
|
2589
2780
|
left: 0,
|
|
2590
2781
|
position: "absolute",
|
|
@@ -2601,7 +2792,7 @@ var cn = {
|
|
|
2601
2792
|
position: "fixed",
|
|
2602
2793
|
zIndex: 999
|
|
2603
2794
|
}
|
|
2604
|
-
})),
|
|
2795
|
+
})), sr = { size: "auto" }, cr = /* @__PURE__ */ u({
|
|
2605
2796
|
name: "TLoading",
|
|
2606
2797
|
props: {
|
|
2607
2798
|
active: Boolean,
|
|
@@ -2609,15 +2800,15 @@ var cn = {
|
|
|
2609
2800
|
size: String
|
|
2610
2801
|
},
|
|
2611
2802
|
setup(e, { attrs: t }) {
|
|
2612
|
-
let r = n(() =>
|
|
2803
|
+
let r = n(() => F({}, sr, e, t)), i = or(), a = n(() => [i.value, {
|
|
2613
2804
|
[`${i.value}--active`]: r.value.active,
|
|
2614
2805
|
[`${i.value}--full-page`]: r.value.fullPage
|
|
2615
2806
|
}]);
|
|
2616
|
-
return () =>
|
|
2807
|
+
return () => l("div", { class: a.value }, [l(ar, { size: r.value.size }, null)]);
|
|
2617
2808
|
}
|
|
2618
|
-
}),
|
|
2619
|
-
let e =
|
|
2620
|
-
return n(() =>
|
|
2809
|
+
}), lr = () => {
|
|
2810
|
+
let e = J();
|
|
2811
|
+
return n(() => A({
|
|
2621
2812
|
"&, *": {
|
|
2622
2813
|
margin: 0,
|
|
2623
2814
|
padding: 0,
|
|
@@ -2664,7 +2855,7 @@ var cn = {
|
|
|
2664
2855
|
"&--disabled &__radio::after": { background: e.value.colors.gray.medium2 },
|
|
2665
2856
|
"&--disabled &__label": { color: e.value.colors.gray.medium2 }
|
|
2666
2857
|
}));
|
|
2667
|
-
},
|
|
2858
|
+
}, ur = { labelPosition: "right" }, dr = /* @__PURE__ */ u({
|
|
2668
2859
|
name: "TRadio",
|
|
2669
2860
|
props: {
|
|
2670
2861
|
id: String,
|
|
@@ -2702,47 +2893,47 @@ var cn = {
|
|
|
2702
2893
|
"update:modelValue"
|
|
2703
2894
|
],
|
|
2704
2895
|
setup(e, { emit: t, attrs: r }) {
|
|
2705
|
-
let i = n(() =>
|
|
2706
|
-
|
|
2896
|
+
let i = n(() => F({}, ur, e, r)), a = C(i.value.modelValue === i.value.value);
|
|
2897
|
+
D(() => [i.value.modelValue, i.value.value], () => {
|
|
2707
2898
|
a.value = i.value.modelValue === i.value.value;
|
|
2708
2899
|
});
|
|
2709
|
-
let
|
|
2710
|
-
|
|
2711
|
-
`${
|
|
2900
|
+
let o = lr(), s = n(() => [
|
|
2901
|
+
o.value,
|
|
2902
|
+
`${o.value}--label-${i.value.labelPosition}`,
|
|
2712
2903
|
{
|
|
2713
|
-
[`${
|
|
2714
|
-
[`${
|
|
2904
|
+
[`${o.value}--checked`]: a.value,
|
|
2905
|
+
[`${o.value}--disabled`]: i.value.disabled
|
|
2715
2906
|
}
|
|
2716
|
-
]),
|
|
2907
|
+
]), c = () => {
|
|
2717
2908
|
t("update:modelValue", i.value.value), t("change", i.value.value), t("input", i.value.value), a.value = !0;
|
|
2718
2909
|
}, u = () => {
|
|
2719
|
-
i.value.disabled ||
|
|
2910
|
+
i.value.disabled || c();
|
|
2720
2911
|
}, d = (e) => {
|
|
2721
|
-
(e.key === "Enter" || e.key === " ") && !i.value.disabled &&
|
|
2912
|
+
(e.key === "Enter" || e.key === " ") && !i.value.disabled && c();
|
|
2722
2913
|
};
|
|
2723
|
-
return () =>
|
|
2914
|
+
return () => l("div", { class: s.value }, [l("input", {
|
|
2724
2915
|
id: i.value.id,
|
|
2725
2916
|
type: "radio",
|
|
2726
|
-
class: `${
|
|
2917
|
+
class: `${o.value}__radio`,
|
|
2727
2918
|
onClick: u,
|
|
2728
2919
|
onKeydown: d,
|
|
2729
2920
|
disabled: i.value.disabled
|
|
2730
|
-
}, null), i.value.label &&
|
|
2731
|
-
class: `${
|
|
2921
|
+
}, null), i.value.label && l("label", {
|
|
2922
|
+
class: `${o.value}__label`,
|
|
2732
2923
|
for: i.value.id
|
|
2733
2924
|
}, [i.value.label])]);
|
|
2734
2925
|
}
|
|
2735
|
-
}),
|
|
2926
|
+
}), fr = {
|
|
2736
2927
|
railTopInset: 3,
|
|
2737
2928
|
railBottomInset: 8,
|
|
2738
2929
|
minThumbHeight: 6,
|
|
2739
2930
|
thumbHeightFactor: .65
|
|
2740
2931
|
};
|
|
2741
|
-
function
|
|
2932
|
+
function pr(e, t = {}) {
|
|
2742
2933
|
let { railTopInset: r, railBottomInset: i, minThumbHeight: a, thumbHeightFactor: o, onDragStart: s, onDragEnd: c } = {
|
|
2743
|
-
...
|
|
2934
|
+
...fr,
|
|
2744
2935
|
...t
|
|
2745
|
-
}, l =
|
|
2936
|
+
}, l = C(0), u = C(0), d = C(!1), f = C(0), p = C(0), m = n(() => l.value > 0);
|
|
2746
2937
|
function h() {
|
|
2747
2938
|
let t = e.value;
|
|
2748
2939
|
if (!t) return;
|
|
@@ -2754,7 +2945,7 @@ function Jn(e, t = {}) {
|
|
|
2754
2945
|
let d = Math.max(c - r - i, 0), f = c / s * d, p = Math.max(f * o, a), m = Math.max(d - p, 0), h = s - c, g = h > 0 ? n / h : 0;
|
|
2755
2946
|
l.value = p, u.value = r + m * g;
|
|
2756
2947
|
}
|
|
2757
|
-
function
|
|
2948
|
+
function g(t) {
|
|
2758
2949
|
if (!d.value || !e.value) return;
|
|
2759
2950
|
let n = e.value, { scrollHeight: a, clientHeight: o } = n, s = Math.max(a - o, 0);
|
|
2760
2951
|
if (s === 0) return;
|
|
@@ -2763,28 +2954,28 @@ function Jn(e, t = {}) {
|
|
|
2763
2954
|
let m = t.clientY - f.value, g = s / u;
|
|
2764
2955
|
n.scrollTop = Math.min(Math.max(p.value + m * g, 0), s), h();
|
|
2765
2956
|
}
|
|
2766
|
-
function
|
|
2767
|
-
d.value && (d.value = !1, window.removeEventListener("mousemove",
|
|
2957
|
+
function _() {
|
|
2958
|
+
d.value && (d.value = !1, window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", _), c?.());
|
|
2768
2959
|
}
|
|
2769
|
-
function
|
|
2770
|
-
!e.value || !m.value || (t.preventDefault(), t.stopPropagation(), s?.(), d.value = !0, f.value = t.clientY, p.value = e.value.scrollTop, window.addEventListener("mousemove",
|
|
2960
|
+
function v(t) {
|
|
2961
|
+
!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", _));
|
|
2771
2962
|
}
|
|
2772
|
-
return
|
|
2773
|
-
window.removeEventListener("mousemove",
|
|
2963
|
+
return b(() => {
|
|
2964
|
+
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", _);
|
|
2774
2965
|
}), {
|
|
2775
2966
|
thumbHeight: l,
|
|
2776
2967
|
thumbOffset: u,
|
|
2777
2968
|
isScrollable: m,
|
|
2778
2969
|
isDragging: d,
|
|
2779
2970
|
update: h,
|
|
2780
|
-
onThumbMouseDown:
|
|
2971
|
+
onThumbMouseDown: v
|
|
2781
2972
|
};
|
|
2782
2973
|
}
|
|
2783
2974
|
//#endregion
|
|
2784
2975
|
//#region src/components/TSelect/TSelect.styles.tsx
|
|
2785
|
-
var
|
|
2786
|
-
let e =
|
|
2787
|
-
return n(() =>
|
|
2976
|
+
var mr = () => {
|
|
2977
|
+
let e = J();
|
|
2978
|
+
return n(() => A({
|
|
2788
2979
|
"&, *": {
|
|
2789
2980
|
margin: 0,
|
|
2790
2981
|
padding: 0,
|
|
@@ -2912,31 +3103,31 @@ var Yn = () => {
|
|
|
2912
3103
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
2913
3104
|
"&--full-width": { width: "100%" }
|
|
2914
3105
|
}));
|
|
2915
|
-
},
|
|
2916
|
-
e.type === "option" ? t.push(e) : Array.isArray(e.children) &&
|
|
2917
|
-
}), t),
|
|
3106
|
+
}, hr = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((e) => hr(e)).join("").trim() : e && typeof e == "object" && "children" in e ? hr(e.children) : "", gr = (e, t = []) => (e?.forEach((e) => {
|
|
3107
|
+
e.type === "option" ? t.push(e) : Array.isArray(e.children) && gr(e.children, t);
|
|
3108
|
+
}), t), _r = (e) => gr(e).map((e) => ({
|
|
2918
3109
|
value: e.props?.value,
|
|
2919
3110
|
disabled: !!e.props?.disabled,
|
|
2920
|
-
label:
|
|
2921
|
-
})),
|
|
3111
|
+
label: hr(e.children)
|
|
3112
|
+
})), vr = (e, t) => {
|
|
2922
3113
|
if (e === t) return !0;
|
|
2923
3114
|
if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
|
|
2924
3115
|
let n = Object.getPrototypeOf(e);
|
|
2925
3116
|
if (n !== Object.prototype || Object.getPrototypeOf(t) !== n) return !1;
|
|
2926
3117
|
let r = Object.keys(e), i = Object.keys(t);
|
|
2927
3118
|
return r.length === i.length ? r.every((n) => e[n] === t[n]) : !1;
|
|
2928
|
-
},
|
|
2929
|
-
let n = e.findIndex((e) =>
|
|
3119
|
+
}, yr = (e, t) => {
|
|
3120
|
+
let n = e.findIndex((e) => vr(e.value, t) && !e.disabled);
|
|
2930
3121
|
if (n >= 0) return n;
|
|
2931
3122
|
let r = e.findIndex((e) => !e.disabled);
|
|
2932
3123
|
return r >= 0 ? r : -1;
|
|
2933
|
-
},
|
|
3124
|
+
}, br = (e) => {
|
|
2934
3125
|
if (typeof e.leftIcon == "string") return e.leftIcon;
|
|
2935
3126
|
let t = e["left-icon"];
|
|
2936
3127
|
return typeof t == "string" ? t : "";
|
|
2937
|
-
},
|
|
2938
|
-
let e =
|
|
2939
|
-
return n(() =>
|
|
3128
|
+
}, xr = (e, t) => e ? e.includes(":") ? e : `${t}:${e}` : "", Sr = () => {
|
|
3129
|
+
let e = J();
|
|
3130
|
+
return n(() => A({
|
|
2940
3131
|
"&, *": { boxSizing: "border-box" },
|
|
2941
3132
|
listStyle: "none",
|
|
2942
3133
|
padding: "0.5rem 0.625rem",
|
|
@@ -2966,7 +3157,7 @@ var Yn = () => {
|
|
|
2966
3157
|
pointerEvents: "none"
|
|
2967
3158
|
}
|
|
2968
3159
|
}));
|
|
2969
|
-
},
|
|
3160
|
+
}, Cr = /* @__PURE__ */ u({
|
|
2970
3161
|
name: "TSelectOption",
|
|
2971
3162
|
emits: ["select", "hover"],
|
|
2972
3163
|
props: {
|
|
@@ -2977,34 +3168,34 @@ var Yn = () => {
|
|
|
2977
3168
|
withSeparator: Boolean
|
|
2978
3169
|
},
|
|
2979
3170
|
setup(e, { slots: t, emit: r }) {
|
|
2980
|
-
let i =
|
|
3171
|
+
let i = Sr(), a = n(() => [i.value, {
|
|
2981
3172
|
[`${i.value}--selected`]: e.selected,
|
|
2982
3173
|
[`${i.value}--highlighted`]: e.highlighted,
|
|
2983
3174
|
[`${i.value}--disabled`]: e.disabled,
|
|
2984
3175
|
[`${i.value}--with-separator`]: e.withSeparator
|
|
2985
|
-
}]),
|
|
3176
|
+
}]), o = () => {
|
|
2986
3177
|
e.disabled || r("hover");
|
|
2987
|
-
},
|
|
3178
|
+
}, s = (t) => {
|
|
2988
3179
|
t.preventDefault(), e.disabled || r("select");
|
|
2989
3180
|
};
|
|
2990
|
-
return () =>
|
|
3181
|
+
return () => l("li", {
|
|
2991
3182
|
class: a.value,
|
|
2992
3183
|
role: "option",
|
|
2993
3184
|
"aria-selected": !!e.selected,
|
|
2994
|
-
onMousedown:
|
|
2995
|
-
onMouseenter:
|
|
3185
|
+
onMousedown: s,
|
|
3186
|
+
onMouseenter: o
|
|
2996
3187
|
}, [t.default?.() || e.label]);
|
|
2997
3188
|
}
|
|
2998
|
-
}),
|
|
2999
|
-
function
|
|
3000
|
-
let r =
|
|
3001
|
-
n.value || !e.value.length || (r.value = !0, i.value =
|
|
3189
|
+
}), wr = 36;
|
|
3190
|
+
function Tr(e, t, n) {
|
|
3191
|
+
let r = C(!1), i = C(-1), a = C(null), o = C(null), s = C(null), c = C(!1), l = C(!1), u = () => {
|
|
3192
|
+
n.value || !e.value.length || (r.value = !0, i.value = yr(e.value, t.value));
|
|
3002
3193
|
}, d = () => {
|
|
3003
3194
|
r.value = !1, i.value = -1, c.value = !1, l.value = !1;
|
|
3004
3195
|
}, f = (e) => {
|
|
3005
3196
|
let t = s.value;
|
|
3006
3197
|
t && t.scrollBy({
|
|
3007
|
-
top: e *
|
|
3198
|
+
top: e * wr,
|
|
3008
3199
|
behavior: "smooth"
|
|
3009
3200
|
});
|
|
3010
3201
|
}, p = (e) => {
|
|
@@ -3059,7 +3250,7 @@ function or(e, t, n) {
|
|
|
3059
3250
|
}
|
|
3060
3251
|
//#endregion
|
|
3061
3252
|
//#region src/components/TSelect/TSelect.tsx
|
|
3062
|
-
var
|
|
3253
|
+
var Er = /* @__PURE__ */ u({
|
|
3063
3254
|
name: "TSelect",
|
|
3064
3255
|
emits: [
|
|
3065
3256
|
"input",
|
|
@@ -3103,105 +3294,105 @@ var sr = /* @__PURE__ */ s({
|
|
|
3103
3294
|
id: String
|
|
3104
3295
|
},
|
|
3105
3296
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
3106
|
-
let
|
|
3297
|
+
let o = n(() => F({}, e, t)), s = J(), c = C(null), u = mr(), d = n(() => [
|
|
3107
3298
|
u.value,
|
|
3108
3299
|
`${u.value}__container`,
|
|
3109
3300
|
{
|
|
3110
|
-
[`${u.value}--error`]:
|
|
3111
|
-
[`${u.value}--full-width`]:
|
|
3301
|
+
[`${u.value}--error`]: o.value.error,
|
|
3302
|
+
[`${u.value}--full-width`]: o.value.fullWidth
|
|
3112
3303
|
}
|
|
3113
3304
|
]);
|
|
3114
|
-
|
|
3115
|
-
|
|
3305
|
+
D(() => [o.value.modelValue, o.value.value], ([e, t]) => {
|
|
3306
|
+
c.value = e === null ? t : e;
|
|
3116
3307
|
}, { immediate: !0 });
|
|
3117
|
-
let
|
|
3118
|
-
get: () =>
|
|
3308
|
+
let f = n({
|
|
3309
|
+
get: () => o.value.modelValue === null ? o.value.value === null ? c.value : o.value.value : o.value.modelValue,
|
|
3119
3310
|
set: (e) => {
|
|
3120
|
-
|
|
3311
|
+
c.value = e, r("update:modelValue", e), r("input", e), r("change", e);
|
|
3121
3312
|
}
|
|
3122
|
-
}),
|
|
3313
|
+
}), p = n(() => _r(i.default?.() ?? [])), m = n(() => p.value.find((e) => vr(e.value, f.value))), g = n(() => !!m.value), _ = n(() => m.value ? m.value.label : o.value.placeholder ? o.value.placeholder : ""), v = n(() => br(o.value)), y = n(() => xr(v.value, s.value.iconSet)), b = Tr(p, f, n(() => !!o.value.disabled)), x = pr(b.menuRef, {
|
|
3123
3314
|
onDragStart: () => {
|
|
3124
|
-
|
|
3315
|
+
b.isInteractingWithMenu.value = !0;
|
|
3125
3316
|
},
|
|
3126
3317
|
onDragEnd: () => {
|
|
3127
3318
|
requestAnimationFrame(() => {
|
|
3128
|
-
|
|
3319
|
+
b.isInteractingWithMenu.value = !1;
|
|
3129
3320
|
});
|
|
3130
3321
|
}
|
|
3131
3322
|
});
|
|
3132
|
-
return
|
|
3133
|
-
e && requestAnimationFrame(() =>
|
|
3134
|
-
}), a({ focus: () =>
|
|
3135
|
-
i.label?.() ||
|
|
3323
|
+
return D(() => [b.menuOpen.value, p.value.length], ([e]) => {
|
|
3324
|
+
e && requestAnimationFrame(() => x.update());
|
|
3325
|
+
}), a({ focus: () => b.triggerRef.value?.focus() }), () => l("div", { class: d.value }, [
|
|
3326
|
+
i.label?.() || o.value.label && l("label", {
|
|
3136
3327
|
class: `${u.value}__label`,
|
|
3137
|
-
for:
|
|
3138
|
-
}, [
|
|
3139
|
-
|
|
3140
|
-
icon:
|
|
3328
|
+
for: o.value.id
|
|
3329
|
+
}, [o.value.label]),
|
|
3330
|
+
l("div", { class: `${u.value}__wrapper` }, [v.value && l(k, {
|
|
3331
|
+
icon: y.value,
|
|
3141
3332
|
class: [`${u.value}__icon`, `${u.value}__icon--left`]
|
|
3142
|
-
}, null),
|
|
3143
|
-
class: [`${u.value}__dropdown`, { [`${u.value}__dropdown--open`]:
|
|
3144
|
-
ref:
|
|
3145
|
-
}, [
|
|
3333
|
+
}, null), l("div", {
|
|
3334
|
+
class: [`${u.value}__dropdown`, { [`${u.value}__dropdown--open`]: b.menuOpen.value }],
|
|
3335
|
+
ref: b.wrapperRef
|
|
3336
|
+
}, [l("button", h({
|
|
3146
3337
|
class: [`${u.value}__select`, {
|
|
3147
3338
|
[`${u.value}__select--left-icon`]: v.value,
|
|
3148
3339
|
[`${u.value}__select--placeholder`]: !g.value,
|
|
3149
|
-
[`${u.value}__select--open`]:
|
|
3340
|
+
[`${u.value}__select--open`]: b.menuOpen.value
|
|
3150
3341
|
}],
|
|
3151
|
-
disabled:
|
|
3152
|
-
id:
|
|
3153
|
-
onClick:
|
|
3342
|
+
disabled: o.value.disabled,
|
|
3343
|
+
id: o.value.id,
|
|
3344
|
+
onClick: b.handleClickTrigger,
|
|
3154
3345
|
onFocus: (e) => r("focus", e),
|
|
3155
3346
|
onBlur: (e) => {
|
|
3156
|
-
|
|
3347
|
+
b.handleBlur(), r("blur", e);
|
|
3157
3348
|
},
|
|
3158
|
-
onKeydown:
|
|
3159
|
-
ref:
|
|
3349
|
+
onKeydown: b.handleKeydown,
|
|
3350
|
+
ref: b.triggerRef,
|
|
3160
3351
|
role: "combobox",
|
|
3161
3352
|
"aria-haspopup": "listbox",
|
|
3162
|
-
"aria-expanded":
|
|
3353
|
+
"aria-expanded": b.menuOpen.value,
|
|
3163
3354
|
type: "button"
|
|
3164
|
-
}, t), [
|
|
3355
|
+
}, t), [l("div", { class: `${u.value}__selected-value` }, [_.value])]), b.menuOpen.value && l("div", {
|
|
3165
3356
|
class: `${u.value}__menu-wrapper`,
|
|
3166
|
-
onMousedown:
|
|
3357
|
+
onMousedown: b.handleMenuInteractionStart,
|
|
3167
3358
|
onMouseup: () => {
|
|
3168
|
-
|
|
3359
|
+
x.isDragging.value || (b.isInteractingWithMenu.value = !1);
|
|
3169
3360
|
},
|
|
3170
|
-
onMouseenter: () =>
|
|
3361
|
+
onMouseenter: () => b.menuHovered.value = !0,
|
|
3171
3362
|
onMouseleave: () => {
|
|
3172
|
-
|
|
3363
|
+
b.menuHovered.value = !1, x.isDragging.value || (b.isInteractingWithMenu.value = !1);
|
|
3173
3364
|
}
|
|
3174
|
-
}, [
|
|
3365
|
+
}, [l("ul", {
|
|
3175
3366
|
class: `${u.value}__menu`,
|
|
3176
3367
|
role: "listbox",
|
|
3177
|
-
ref:
|
|
3178
|
-
onScroll:
|
|
3179
|
-
}, [
|
|
3368
|
+
ref: b.menuRef,
|
|
3369
|
+
onScroll: x.update
|
|
3370
|
+
}, [p.value.map((e, t) => l(Cr, {
|
|
3180
3371
|
key: `${String(e.value)}-${t}`,
|
|
3181
3372
|
label: e.label,
|
|
3182
|
-
selected:
|
|
3183
|
-
highlighted: t ===
|
|
3373
|
+
selected: vr(e.value, f.value),
|
|
3374
|
+
highlighted: t === b.highlightedIndex.value,
|
|
3184
3375
|
disabled: e.disabled,
|
|
3185
|
-
withSeparator: t <
|
|
3186
|
-
onHover: () =>
|
|
3187
|
-
onSelect: () =>
|
|
3188
|
-
}, null))]),
|
|
3189
|
-
class: [`${u.value}__menu-scrollbar`, { [`${u.value}__menu-scrollbar--visible`]:
|
|
3376
|
+
withSeparator: t < p.value.length - 1,
|
|
3377
|
+
onHover: () => b.highlightedIndex.value = t,
|
|
3378
|
+
onSelect: () => b.selectOption(e)
|
|
3379
|
+
}, null))]), l("div", {
|
|
3380
|
+
class: [`${u.value}__menu-scrollbar`, { [`${u.value}__menu-scrollbar--visible`]: b.menuHovered.value && x.isScrollable.value }],
|
|
3190
3381
|
"aria-hidden": "true"
|
|
3191
|
-
}, [
|
|
3382
|
+
}, [l("div", {
|
|
3192
3383
|
class: `${u.value}__menu-scrollbar-thumb`,
|
|
3193
|
-
onMousedown:
|
|
3384
|
+
onMousedown: x.onThumbMouseDown,
|
|
3194
3385
|
style: {
|
|
3195
|
-
height: `${
|
|
3196
|
-
transform: `translateY(${
|
|
3386
|
+
height: `${x.thumbHeight.value}px`,
|
|
3387
|
+
transform: `translateY(${x.thumbOffset.value}px)`
|
|
3197
3388
|
}
|
|
3198
3389
|
}, null)])])])]),
|
|
3199
|
-
i.helperText?.() ||
|
|
3390
|
+
i.helperText?.() || o.value.helperText && l("p", { class: `${u.value}__helper-text` }, [o.value.helperText])
|
|
3200
3391
|
]);
|
|
3201
3392
|
}
|
|
3202
|
-
}),
|
|
3203
|
-
let e =
|
|
3204
|
-
return n(() =>
|
|
3393
|
+
}), Dr = () => {
|
|
3394
|
+
let e = J();
|
|
3395
|
+
return n(() => A({
|
|
3205
3396
|
"&, *": {
|
|
3206
3397
|
margin: 0,
|
|
3207
3398
|
boxSizing: "border-box"
|
|
@@ -3282,12 +3473,12 @@ var sr = /* @__PURE__ */ s({
|
|
|
3282
3473
|
"&--error &__select:not(:disabled), &--error &__select:focus": { borderColor: e.value.colors.error },
|
|
3283
3474
|
"&--error + &__helper-text": { color: e.value.colors.error }
|
|
3284
3475
|
}));
|
|
3285
|
-
},
|
|
3476
|
+
}, Or = (e) => {
|
|
3286
3477
|
let t = [];
|
|
3287
3478
|
return e?.forEach((e) => {
|
|
3288
|
-
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
3479
|
+
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...Or(e.children));
|
|
3289
3480
|
}), t;
|
|
3290
|
-
},
|
|
3481
|
+
}, kr = /* @__PURE__ */ u({
|
|
3291
3482
|
name: "TSelectDropdown",
|
|
3292
3483
|
props: {
|
|
3293
3484
|
open: Boolean,
|
|
@@ -3301,53 +3492,53 @@ var sr = /* @__PURE__ */ s({
|
|
|
3301
3492
|
},
|
|
3302
3493
|
emits: ["cancel", "click"],
|
|
3303
3494
|
setup(e, { slots: t, attrs: r, emit: i }) {
|
|
3304
|
-
let a = n(() =>
|
|
3305
|
-
|
|
3306
|
-
`${
|
|
3495
|
+
let a = n(() => F({}, e, r)), o = Dr(), s = n(() => [
|
|
3496
|
+
o.value,
|
|
3497
|
+
`${o.value}__menu_container`,
|
|
3307
3498
|
{
|
|
3308
|
-
[`${
|
|
3309
|
-
[`${
|
|
3499
|
+
[`${o.value}--active`]: a.value.open,
|
|
3500
|
+
[`${o.value}--error`]: a.value.error
|
|
3310
3501
|
}
|
|
3311
|
-
]),
|
|
3312
|
-
|
|
3313
|
-
`${
|
|
3314
|
-
{ [`${
|
|
3315
|
-
]), u =
|
|
3502
|
+
]), c = n(() => [
|
|
3503
|
+
o.value,
|
|
3504
|
+
`${o.value}__container`,
|
|
3505
|
+
{ [`${o.value}--full-width`]: a.value.fullWidth }
|
|
3506
|
+
]), u = C(null), d = (e) => {
|
|
3316
3507
|
a.value.open && u.value && !u.value.contains(e.target) && i("cancel");
|
|
3317
3508
|
}, f = (e) => {
|
|
3318
3509
|
e.key === "Escape" && i("cancel");
|
|
3319
3510
|
};
|
|
3320
|
-
|
|
3511
|
+
y(() => {
|
|
3321
3512
|
document.addEventListener("click", d), u.value?.addEventListener("keydown", f);
|
|
3322
|
-
}),
|
|
3513
|
+
}), b(() => {
|
|
3323
3514
|
document.removeEventListener("click", d), u.value?.removeEventListener("keydown", f);
|
|
3324
3515
|
});
|
|
3325
|
-
let p = n(() =>
|
|
3516
|
+
let p = n(() => Or(t.default?.() || [])), m = () => {
|
|
3326
3517
|
i("click");
|
|
3327
3518
|
};
|
|
3328
|
-
return () =>
|
|
3329
|
-
t.label?.() || a.value.label &&
|
|
3330
|
-
|
|
3519
|
+
return () => l("div", { class: c.value }, [
|
|
3520
|
+
t.label?.() || a.value.label && l("label", { class: `${o.value}__label` }, [a.value.label]),
|
|
3521
|
+
l("div", {
|
|
3331
3522
|
ref: u,
|
|
3332
3523
|
role: "menu",
|
|
3333
|
-
class:
|
|
3334
|
-
}, [
|
|
3335
|
-
class: `${
|
|
3524
|
+
class: s.value
|
|
3525
|
+
}, [l("button", {
|
|
3526
|
+
class: `${o.value}__select`,
|
|
3336
3527
|
onClick: m,
|
|
3337
3528
|
disabled: a.value.disabled,
|
|
3338
3529
|
type: "button"
|
|
3339
|
-
}, [a.value.selectedValue, a.value.placeholder && !a.value.selectedValue &&
|
|
3530
|
+
}, [a.value.selectedValue, a.value.placeholder && !a.value.selectedValue && l("option", {
|
|
3340
3531
|
value: "",
|
|
3341
3532
|
disabled: !0,
|
|
3342
3533
|
selected: !0,
|
|
3343
|
-
class: `${
|
|
3344
|
-
}, [a.value.placeholder])]),
|
|
3345
|
-
t.helperText?.() || a.value.helperText &&
|
|
3534
|
+
class: `${o.value}__placeholder`
|
|
3535
|
+
}, [a.value.placeholder])]), l("div", { class: `${o.value}__menu` }, [p.value.map((e, t, n) => l("div", null, [e, t < n.length - 1 && l("div", { class: `${o.value}__divider` }, null)]))])]),
|
|
3536
|
+
t.helperText?.() || a.value.helperText && l("p", { class: `${o.value}__helper-text` }, [a.value.helperText])
|
|
3346
3537
|
]);
|
|
3347
3538
|
}
|
|
3348
|
-
}),
|
|
3349
|
-
let e =
|
|
3350
|
-
return n(() =>
|
|
3539
|
+
}), Ar = () => {
|
|
3540
|
+
let e = J();
|
|
3541
|
+
return n(() => A({
|
|
3351
3542
|
"&, *": {
|
|
3352
3543
|
margin: 0,
|
|
3353
3544
|
boxSizing: "border-box"
|
|
@@ -3374,27 +3565,27 @@ var sr = /* @__PURE__ */ s({
|
|
|
3374
3565
|
float: "right"
|
|
3375
3566
|
}
|
|
3376
3567
|
}));
|
|
3377
|
-
},
|
|
3568
|
+
}, jr = /* @__PURE__ */ u({
|
|
3378
3569
|
name: "TSelectDropdownItem",
|
|
3379
3570
|
emits: ["click"],
|
|
3380
3571
|
props: { label: String },
|
|
3381
3572
|
setup(e, { slots: t, emit: r, attrs: i }) {
|
|
3382
|
-
let a = n(() =>
|
|
3573
|
+
let a = n(() => F({}, e, i)), o = Ar(), s = () => {
|
|
3383
3574
|
r("click");
|
|
3384
|
-
},
|
|
3575
|
+
}, c = (e) => {
|
|
3385
3576
|
e.key === "Enter" && !a.value.disabled && (r("click"), e.preventDefault());
|
|
3386
3577
|
};
|
|
3387
|
-
return () =>
|
|
3388
|
-
class:
|
|
3389
|
-
onClick:
|
|
3578
|
+
return () => l("div", {
|
|
3579
|
+
class: o.value,
|
|
3580
|
+
onClick: s,
|
|
3390
3581
|
role: "menuitem",
|
|
3391
|
-
onKeydown:
|
|
3582
|
+
onKeydown: c,
|
|
3392
3583
|
tabindex: 0
|
|
3393
|
-
}, [t.default?.(), t.label?.() || a.value.label &&
|
|
3584
|
+
}, [t.default?.(), t.label?.() || a.value.label && l("label", { class: `${o.value}__label` }, [a.value.label])]);
|
|
3394
3585
|
}
|
|
3395
|
-
}),
|
|
3396
|
-
let e =
|
|
3397
|
-
return n(() =>
|
|
3586
|
+
}), Mr = () => {
|
|
3587
|
+
let e = J();
|
|
3588
|
+
return n(() => A({
|
|
3398
3589
|
"&, *": {
|
|
3399
3590
|
margin: 0,
|
|
3400
3591
|
padding: 0,
|
|
@@ -3437,7 +3628,7 @@ var sr = /* @__PURE__ */ s({
|
|
|
3437
3628
|
"&--disabled &__switch": { background: e.value.colors.gray.light3 },
|
|
3438
3629
|
"&--label-left &__switch": { order: 1 }
|
|
3439
3630
|
}));
|
|
3440
|
-
},
|
|
3631
|
+
}, Nr = { labelPosition: "right" }, Pr = /* @__PURE__ */ u({
|
|
3441
3632
|
name: "TSwitch",
|
|
3442
3633
|
props: {
|
|
3443
3634
|
label: String,
|
|
@@ -3453,18 +3644,18 @@ var sr = /* @__PURE__ */ s({
|
|
|
3453
3644
|
"update:modelValue"
|
|
3454
3645
|
],
|
|
3455
3646
|
setup(e, { attrs: t, emit: r }) {
|
|
3456
|
-
let i = n(() =>
|
|
3457
|
-
|
|
3647
|
+
let i = n(() => F({}, Nr, e, t)), a = C(i.value.modelValue || i.value.value);
|
|
3648
|
+
D([() => i.value.modelValue, () => i.value.value], () => {
|
|
3458
3649
|
a.value = i.value.modelValue || i.value.value;
|
|
3459
3650
|
});
|
|
3460
|
-
let
|
|
3651
|
+
let o = () => {
|
|
3461
3652
|
r("update:modelValue", !a.value), r("change", !a.value), r("input", !a.value), a.value = !a.value;
|
|
3653
|
+
}, s = (e) => {
|
|
3654
|
+
i.value.disabled ? e?.preventDefault() : o();
|
|
3462
3655
|
}, c = (e) => {
|
|
3463
|
-
i.value.disabled ? e?.preventDefault() : s();
|
|
3464
|
-
}, l = (e) => {
|
|
3465
3656
|
let { key: t } = e;
|
|
3466
|
-
i.value.disabled || t !== "Enter" && t !== " " ||
|
|
3467
|
-
}, u =
|
|
3657
|
+
i.value.disabled || t !== "Enter" && t !== " " || o();
|
|
3658
|
+
}, u = Mr(), d = n(() => [
|
|
3468
3659
|
u.value,
|
|
3469
3660
|
`${u.value}--label-${i.value.labelPosition}`,
|
|
3470
3661
|
{
|
|
@@ -3472,23 +3663,23 @@ var sr = /* @__PURE__ */ s({
|
|
|
3472
3663
|
[`${u.value}--disabled`]: i.value.disabled
|
|
3473
3664
|
}
|
|
3474
3665
|
]);
|
|
3475
|
-
return () =>
|
|
3666
|
+
return () => l("div", {
|
|
3476
3667
|
class: d.value,
|
|
3477
3668
|
role: "switch",
|
|
3478
3669
|
"aria-checked": a.value,
|
|
3479
3670
|
"aria-disabled": i.value.disabled,
|
|
3480
3671
|
"aria-labelledby": i.value.id,
|
|
3481
|
-
onClick:
|
|
3482
|
-
onKeydown:
|
|
3672
|
+
onClick: s,
|
|
3673
|
+
onKeydown: c,
|
|
3483
3674
|
tabindex: i.value.disabled ? void 0 : 0
|
|
3484
|
-
}, [
|
|
3675
|
+
}, [l("div", { class: `${u.value}__switch` }, null), i.value.label && l("label", {
|
|
3485
3676
|
class: `${u.value}__label`,
|
|
3486
3677
|
id: i.value.id
|
|
3487
3678
|
}, [i.value.label])]);
|
|
3488
3679
|
}
|
|
3489
|
-
}),
|
|
3490
|
-
let e =
|
|
3491
|
-
return n(() =>
|
|
3680
|
+
}), Fr = () => {
|
|
3681
|
+
let e = J();
|
|
3682
|
+
return n(() => A({
|
|
3492
3683
|
"&, *": {
|
|
3493
3684
|
margin: 0,
|
|
3494
3685
|
padding: 0,
|
|
@@ -3533,7 +3724,7 @@ var sr = /* @__PURE__ */ s({
|
|
|
3533
3724
|
}
|
|
3534
3725
|
}
|
|
3535
3726
|
}));
|
|
3536
|
-
},
|
|
3727
|
+
}, Ir = /* @__PURE__ */ u({
|
|
3537
3728
|
name: "TTabBar",
|
|
3538
3729
|
emits: [
|
|
3539
3730
|
"input",
|
|
@@ -3546,31 +3737,31 @@ var sr = /* @__PURE__ */ s({
|
|
|
3546
3737
|
modelValue: String
|
|
3547
3738
|
},
|
|
3548
3739
|
setup(e, { attrs: t, emit: r }) {
|
|
3549
|
-
let i = n(() =>
|
|
3550
|
-
|
|
3551
|
-
|
|
3740
|
+
let i = n(() => F({}, e, t)), a = Fr(), o = C(i.value.modelValue === void 0 ? i.value.value : i.value.modelValue);
|
|
3741
|
+
D([() => i.value.modelValue, () => i.value.value], () => {
|
|
3742
|
+
o.value = i.value.modelValue === void 0 ? i.value.value : i.value.modelValue;
|
|
3552
3743
|
});
|
|
3553
|
-
let
|
|
3554
|
-
r("update:modelValue", e), r("input", e), r("change", e),
|
|
3744
|
+
let s = (e) => {
|
|
3745
|
+
r("update:modelValue", e), r("input", e), r("change", e), o.value = e;
|
|
3555
3746
|
};
|
|
3556
|
-
return () =>
|
|
3747
|
+
return () => l("nav", { class: [a.value] }, [l("ul", {
|
|
3557
3748
|
class: [`${a.value}__ul`, `${a.value}`],
|
|
3558
3749
|
role: "tablist"
|
|
3559
|
-
}, [i.value.labels?.map((e) =>
|
|
3750
|
+
}, [i.value.labels?.map((e) => l("li", {
|
|
3560
3751
|
role: "tab",
|
|
3561
|
-
"aria-selected":
|
|
3752
|
+
"aria-selected": o.value === e,
|
|
3562
3753
|
key: e
|
|
3563
|
-
}, [
|
|
3754
|
+
}, [l("button", {
|
|
3564
3755
|
class: [`${a.value}__button`, {
|
|
3565
|
-
[`${a.value}__selected`]:
|
|
3566
|
-
[`${a.value}__not-selected`]:
|
|
3756
|
+
[`${a.value}__selected`]: o.value === e,
|
|
3757
|
+
[`${a.value}__not-selected`]: o.value !== e
|
|
3567
3758
|
}],
|
|
3568
|
-
onClick: () =>
|
|
3759
|
+
onClick: () => s(e)
|
|
3569
3760
|
}, [e])]))])]);
|
|
3570
3761
|
}
|
|
3571
|
-
}),
|
|
3572
|
-
let e =
|
|
3573
|
-
return n(() =>
|
|
3762
|
+
}), Lr = () => {
|
|
3763
|
+
let e = J();
|
|
3764
|
+
return n(() => A({
|
|
3574
3765
|
paddingBottom: "0.625rem",
|
|
3575
3766
|
color: e.value.colors.gray.main,
|
|
3576
3767
|
alignItems: "center",
|
|
@@ -3592,7 +3783,7 @@ var sr = /* @__PURE__ */ s({
|
|
|
3592
3783
|
color: e.value.colors.primary.dark
|
|
3593
3784
|
}
|
|
3594
3785
|
}));
|
|
3595
|
-
},
|
|
3786
|
+
}, Rr = /* @__PURE__ */ u({
|
|
3596
3787
|
name: "TTab",
|
|
3597
3788
|
props: {
|
|
3598
3789
|
id: {
|
|
@@ -3615,31 +3806,31 @@ var sr = /* @__PURE__ */ s({
|
|
|
3615
3806
|
}
|
|
3616
3807
|
},
|
|
3617
3808
|
setup(e, { slots: t }) {
|
|
3618
|
-
let r =
|
|
3809
|
+
let r = Lr(), i = f("tabSelection");
|
|
3619
3810
|
if (!i) throw Error("tabSelection provider missing.");
|
|
3620
|
-
let { selectTab: a } = i,
|
|
3811
|
+
let { selectTab: a } = i, o = () => {
|
|
3621
3812
|
a(e.id);
|
|
3622
|
-
},
|
|
3813
|
+
}, s = (t) => {
|
|
3623
3814
|
t.key === "Enter" && (t.preventDefault(), a(e.id));
|
|
3624
|
-
},
|
|
3625
|
-
return () =>
|
|
3626
|
-
class: [r.value,
|
|
3627
|
-
"aria-label":
|
|
3628
|
-
onClick:
|
|
3629
|
-
onKeydown:
|
|
3815
|
+
}, c = n(() => e.selected ? "selected" : "");
|
|
3816
|
+
return () => l("div", {
|
|
3817
|
+
class: [r.value, c.value === "selected" ? `${r.value}--selected` : ""],
|
|
3818
|
+
"aria-label": c.value,
|
|
3819
|
+
onClick: o,
|
|
3820
|
+
onKeydown: s,
|
|
3630
3821
|
role: "tab",
|
|
3631
3822
|
tabindex: 0
|
|
3632
3823
|
}, [t.default?.()]);
|
|
3633
3824
|
}
|
|
3634
|
-
}),
|
|
3635
|
-
let e =
|
|
3636
|
-
return n(() =>
|
|
3825
|
+
}), zr = () => {
|
|
3826
|
+
let e = J();
|
|
3827
|
+
return n(() => A({
|
|
3637
3828
|
width: "100%",
|
|
3638
3829
|
borderBottom: `0.125rem solid ${e.value.colors.gray.medium2}`,
|
|
3639
3830
|
display: "flex",
|
|
3640
3831
|
gap: "2.5rem"
|
|
3641
3832
|
}));
|
|
3642
|
-
},
|
|
3833
|
+
}, Br = /* @__PURE__ */ u({
|
|
3643
3834
|
name: "TTabBarExtended",
|
|
3644
3835
|
emits: ["select"],
|
|
3645
3836
|
props: {
|
|
@@ -3656,60 +3847,60 @@ var sr = /* @__PURE__ */ s({
|
|
|
3656
3847
|
] }
|
|
3657
3848
|
},
|
|
3658
3849
|
setup(e, { emit: t }) {
|
|
3659
|
-
let r =
|
|
3850
|
+
let r = zr(), i = Lr(), a = n(() => e.tabs.map((e, t) => ({
|
|
3660
3851
|
id: `${t}`,
|
|
3661
3852
|
label: e.label,
|
|
3662
3853
|
value: e.value
|
|
3663
|
-
}))),
|
|
3664
|
-
let n =
|
|
3854
|
+
}))), o = C(n(() => e.initialLabel ? a.value.find((t) => t.label === e.initialLabel) ?? a.value[0] : a.value[0]).value), s = n(() => e.selectedValue !== void 0), u = n(() => s.value ? a.value.find((t) => t.value === e.selectedValue) ?? a.value[0] : o.value), d = C(!1), f = (e) => {
|
|
3855
|
+
let n = a.value.find((t) => t.id === e);
|
|
3665
3856
|
if (!n) throw Error("No tab was found.");
|
|
3666
|
-
u.value.id !== e && (
|
|
3857
|
+
u.value.id !== e && (s.value || (o.value = n), t("select", n.value));
|
|
3667
3858
|
};
|
|
3668
|
-
|
|
3669
|
-
let p = n(() =>
|
|
3670
|
-
if (p.value === m.value) return
|
|
3671
|
-
let e =
|
|
3672
|
-
return e.some(({ id: e }) => e === u.value.id) ? e.push(
|
|
3673
|
-
}), g = n(() => h.value.length <
|
|
3859
|
+
S("tabSelection", { selectTab: f });
|
|
3860
|
+
let p = n(() => a.value.length), m = n(() => Math.min(p.value, e.maxTabs || Infinity)), h = n(() => {
|
|
3861
|
+
if (p.value === m.value) return a.value;
|
|
3862
|
+
let e = a.value.slice(0, m.value - 1);
|
|
3863
|
+
return e.some(({ id: e }) => e === u.value.id) ? e.push(a.value[m.value - 1]) : e.push(u.value), e;
|
|
3864
|
+
}), g = n(() => h.value.length < a.value.length), _ = () => {
|
|
3674
3865
|
d.value = !d.value;
|
|
3675
|
-
},
|
|
3866
|
+
}, v = () => {
|
|
3676
3867
|
d.value = !1;
|
|
3677
|
-
},
|
|
3868
|
+
}, y = () => {
|
|
3678
3869
|
_();
|
|
3679
|
-
},
|
|
3870
|
+
}, b = (e) => {
|
|
3680
3871
|
e.preventDefault(), e.key === "Enter" && _();
|
|
3681
|
-
},
|
|
3682
|
-
f(e),
|
|
3683
|
-
}, w = () =>
|
|
3872
|
+
}, x = (e) => {
|
|
3873
|
+
f(e), v();
|
|
3874
|
+
}, w = () => l(bn, {
|
|
3684
3875
|
open: d.value,
|
|
3685
3876
|
position: "center",
|
|
3686
3877
|
onCancel: _
|
|
3687
3878
|
}, {
|
|
3688
|
-
trigger: () =>
|
|
3879
|
+
trigger: () => l("div", {
|
|
3689
3880
|
class: [i.value, `${i.value}__dropdown-trigger`],
|
|
3690
|
-
onClick:
|
|
3691
|
-
onKeypress:
|
|
3881
|
+
onClick: y,
|
|
3882
|
+
onKeypress: b,
|
|
3692
3883
|
tabindex: 0,
|
|
3693
3884
|
role: "button"
|
|
3694
|
-
}, [
|
|
3695
|
-
default: () =>
|
|
3885
|
+
}, [c(". . .")]),
|
|
3886
|
+
default: () => a.value.map((e) => l(Sn, {
|
|
3696
3887
|
disabled: u.value.id === e.id,
|
|
3697
|
-
onClick: () =>
|
|
3888
|
+
onClick: () => x(e.id)
|
|
3698
3889
|
}, { default: () => [e.label] }))
|
|
3699
3890
|
});
|
|
3700
|
-
return () =>
|
|
3891
|
+
return () => l("nav", {
|
|
3701
3892
|
role: "navigation",
|
|
3702
3893
|
class: [r.value]
|
|
3703
|
-
}, [h.value.map((e) =>
|
|
3894
|
+
}, [h.value.map((e) => l(Rr, {
|
|
3704
3895
|
key: `${e.label}-${e.id}`,
|
|
3705
3896
|
id: e.id,
|
|
3706
3897
|
selected: u.value.id === e.id,
|
|
3707
3898
|
value: e.value
|
|
3708
|
-
}, { default: () => [e.label] })), g.value ?
|
|
3899
|
+
}, { default: () => [e.label] })), g.value ? l(w, null, null) : null]);
|
|
3709
3900
|
}
|
|
3710
|
-
}),
|
|
3711
|
-
let e =
|
|
3712
|
-
return n(() =>
|
|
3901
|
+
}), Vr = () => {
|
|
3902
|
+
let e = J();
|
|
3903
|
+
return n(() => A({
|
|
3713
3904
|
"&, *": {
|
|
3714
3905
|
margin: 0,
|
|
3715
3906
|
boxSizing: "border-box"
|
|
@@ -3768,52 +3959,52 @@ var sr = /* @__PURE__ */ s({
|
|
|
3768
3959
|
"&--default > &__status-indicator": { background: e.value.colors.gray.medium1 },
|
|
3769
3960
|
"&--success": {
|
|
3770
3961
|
color: e.value.colors.success,
|
|
3771
|
-
background:
|
|
3962
|
+
background: U(e.value.colors.success, .1)
|
|
3772
3963
|
},
|
|
3773
3964
|
"&--success > &__text": { color: e.value.colors.success },
|
|
3774
3965
|
"&--success > &__status-indicator": { background: e.value.colors.success },
|
|
3775
|
-
"&--in-process": { background:
|
|
3966
|
+
"&--in-process": { background: U(e.value.colors.inProcess, .1) },
|
|
3776
3967
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
3777
3968
|
"&--in-process > &__status-indicator": { background: e.value.colors.inProcessDark },
|
|
3778
|
-
"&--pending": { background:
|
|
3969
|
+
"&--pending": { background: U(e.value.colors.info, .1) },
|
|
3779
3970
|
"&--pending > &__text": { color: e.value.colors.info },
|
|
3780
3971
|
"&--pending > &__status-indicator": { background: e.value.colors.info },
|
|
3781
|
-
"&--toku": { background:
|
|
3972
|
+
"&--toku": { background: U(e.value.colors.primary.light4, 1) },
|
|
3782
3973
|
"&--toku > &__text": { color: e.value.colors.primary.main },
|
|
3783
3974
|
"&--toku > &__status-indicator": { background: e.value.colors.primary.main },
|
|
3784
3975
|
"&--error": {
|
|
3785
3976
|
color: e.value.colors.error,
|
|
3786
|
-
background:
|
|
3977
|
+
background: U(e.value.colors.error, .1)
|
|
3787
3978
|
},
|
|
3788
3979
|
"&--error > &__text": { color: e.value.colors.error },
|
|
3789
3980
|
"&--error > &__status-indicator": { background: e.value.colors.error }
|
|
3790
3981
|
}));
|
|
3791
|
-
},
|
|
3982
|
+
}, Hr = {
|
|
3792
3983
|
size: "medium",
|
|
3793
3984
|
variant: "default"
|
|
3794
|
-
},
|
|
3985
|
+
}, Ur = /* @__PURE__ */ u({
|
|
3795
3986
|
name: "TTag",
|
|
3796
3987
|
props: {
|
|
3797
3988
|
size: String,
|
|
3798
3989
|
variant: String
|
|
3799
3990
|
},
|
|
3800
3991
|
setup(e, { slots: t }) {
|
|
3801
|
-
let r = n(() =>
|
|
3992
|
+
let r = n(() => F({}, Hr, e)), i = Vr(), a = n(() => [
|
|
3802
3993
|
i.value,
|
|
3803
3994
|
`${i.value}--${r.value.variant}`,
|
|
3804
3995
|
`${i.value}--${r.value.size}`
|
|
3805
3996
|
]);
|
|
3806
|
-
return () =>
|
|
3997
|
+
return () => l("div", { class: a.value }, [r.value.size === "miniature" ? l("div", {
|
|
3807
3998
|
"data-testid": "t-tag-status-indicator",
|
|
3808
3999
|
class: `${i.value}__status-indicator`
|
|
3809
|
-
}, null) :
|
|
4000
|
+
}, null) : l("p", {
|
|
3810
4001
|
"data-testid": "t-tag-text",
|
|
3811
4002
|
class: `${i.value}__text ${i.value}__text--${r.value.size}`
|
|
3812
4003
|
}, [t.default?.()])]);
|
|
3813
4004
|
}
|
|
3814
|
-
}),
|
|
3815
|
-
let e =
|
|
3816
|
-
return n(() =>
|
|
4005
|
+
}), Wr = () => {
|
|
4006
|
+
let e = J();
|
|
4007
|
+
return n(() => A({
|
|
3817
4008
|
"&, *": {
|
|
3818
4009
|
margin: 0,
|
|
3819
4010
|
padding: 0,
|
|
@@ -3871,7 +4062,7 @@ var sr = /* @__PURE__ */ s({
|
|
|
3871
4062
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
3872
4063
|
"&--full-width": { width: "100%" }
|
|
3873
4064
|
}));
|
|
3874
|
-
},
|
|
4065
|
+
}, Gr = 1, Kr = /* @__PURE__ */ u({
|
|
3875
4066
|
name: "TTextArea",
|
|
3876
4067
|
emits: [
|
|
3877
4068
|
"input",
|
|
@@ -3898,63 +4089,63 @@ var sr = /* @__PURE__ */ s({
|
|
|
3898
4089
|
}
|
|
3899
4090
|
},
|
|
3900
4091
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
3901
|
-
let
|
|
3902
|
-
get: () =>
|
|
4092
|
+
let o = n(() => F({}, e, t)), s = Wr(), c = n({
|
|
4093
|
+
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
3903
4094
|
set: (e) => {
|
|
3904
4095
|
r("update:modelValue", e), r("input", e), r("change", e);
|
|
3905
4096
|
}
|
|
3906
4097
|
}), u = () => {
|
|
3907
|
-
let e =
|
|
3908
|
-
if (!e || !
|
|
4098
|
+
let e = m.value;
|
|
4099
|
+
if (!e || !o.value.autoResize) return;
|
|
3909
4100
|
e.style.height = "auto";
|
|
3910
|
-
let t = getComputedStyle(e), n = Number.parseFloat(t.borderTopWidth), r = Number.parseFloat(t.borderBottomWidth), i =
|
|
4101
|
+
let t = getComputedStyle(e), n = Number.parseFloat(t.borderTopWidth), r = Number.parseFloat(t.borderBottomWidth), i = o.value.maxRows;
|
|
3911
4102
|
if (i) {
|
|
3912
4103
|
let a = Number.parseFloat(t.lineHeight), o = Number.parseFloat(t.paddingTop), s = Number.parseFloat(t.paddingBottom), c = a * i + o + s + n + r;
|
|
3913
4104
|
e.style.maxHeight = `${c}px`;
|
|
3914
4105
|
}
|
|
3915
4106
|
e.style.height = `${e.scrollHeight + n + r}px`;
|
|
3916
|
-
},
|
|
3917
|
-
|
|
3918
|
-
},
|
|
4107
|
+
}, d = (e) => {
|
|
4108
|
+
c.value = e.target.value, u();
|
|
4109
|
+
}, f = (e) => {
|
|
3919
4110
|
r("focus", e);
|
|
3920
|
-
},
|
|
4111
|
+
}, p = (e) => {
|
|
3921
4112
|
r("blur", e);
|
|
3922
|
-
},
|
|
4113
|
+
}, m = C(null);
|
|
3923
4114
|
return a({ focus: () => {
|
|
3924
|
-
|
|
3925
|
-
} }),
|
|
3926
|
-
|
|
3927
|
-
}), () =>
|
|
3928
|
-
|
|
3929
|
-
`${
|
|
4115
|
+
m.value?.focus();
|
|
4116
|
+
} }), D(() => c.value, async () => {
|
|
4117
|
+
o.value.autoResize && (await g(), u());
|
|
4118
|
+
}), () => l("div", { class: [
|
|
4119
|
+
s.value,
|
|
4120
|
+
`${s.value}__container`,
|
|
3930
4121
|
{
|
|
3931
|
-
[`${
|
|
3932
|
-
[`${
|
|
3933
|
-
[`${
|
|
4122
|
+
[`${s.value}--error`]: o.value.error,
|
|
4123
|
+
[`${s.value}--full-width`]: o.value.fullWidth,
|
|
4124
|
+
[`${s.value}--multiline`]: o.value.multiline
|
|
3934
4125
|
}
|
|
3935
4126
|
] }, [
|
|
3936
|
-
i.label?.() ||
|
|
3937
|
-
class: [`${
|
|
3938
|
-
for:
|
|
3939
|
-
}, [
|
|
3940
|
-
|
|
3941
|
-
id:
|
|
3942
|
-
class: [`${
|
|
3943
|
-
style:
|
|
3944
|
-
rows:
|
|
3945
|
-
placeholder:
|
|
3946
|
-
value:
|
|
3947
|
-
onInput:
|
|
3948
|
-
onFocus:
|
|
3949
|
-
onBlur:
|
|
3950
|
-
disabled:
|
|
3951
|
-
maxlength:
|
|
3952
|
-
ref:
|
|
4127
|
+
i.label?.() || o.value.label && l("label", {
|
|
4128
|
+
class: [`${s.value}__label`],
|
|
4129
|
+
for: o.value.id
|
|
4130
|
+
}, [o.value.label]),
|
|
4131
|
+
l("div", { class: `${s.value}__textarea-wrapper` }, [l("textarea", h(t, {
|
|
4132
|
+
id: o.value.id,
|
|
4133
|
+
class: [`${s.value}__textarea`, { [`${s.value}__textarea--auto-resize`]: o.value.autoResize }],
|
|
4134
|
+
style: o.value.autoResize ? { height: "auto" } : void 0,
|
|
4135
|
+
rows: o.value.autoResize ? Gr : void 0,
|
|
4136
|
+
placeholder: o.value.placeholder,
|
|
4137
|
+
value: c.value,
|
|
4138
|
+
onInput: d,
|
|
4139
|
+
onFocus: f,
|
|
4140
|
+
onBlur: p,
|
|
4141
|
+
disabled: o.value.disabled,
|
|
4142
|
+
maxlength: o.value.maxlength,
|
|
4143
|
+
ref: m
|
|
3953
4144
|
}), null)]),
|
|
3954
|
-
i.helperText?.() ||
|
|
4145
|
+
i.helperText?.() || o.value.helperText && l("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
3955
4146
|
]);
|
|
3956
4147
|
}
|
|
3957
|
-
}),
|
|
4148
|
+
}), qr = /* @__PURE__ */ u({
|
|
3958
4149
|
name: "TThemeProvider",
|
|
3959
4150
|
inheritAttrs: !1,
|
|
3960
4151
|
props: { theme: {
|
|
@@ -3962,10 +4153,10 @@ var sr = /* @__PURE__ */ s({
|
|
|
3962
4153
|
default: () => ({})
|
|
3963
4154
|
} },
|
|
3964
4155
|
setup(e, { slots: t, attrs: r }) {
|
|
3965
|
-
let i = n(() =>
|
|
3966
|
-
return
|
|
4156
|
+
let i = n(() => tn(e.theme ?? {}));
|
|
4157
|
+
return S(nn, i), () => {
|
|
3967
4158
|
let { cssVars: e } = i.value;
|
|
3968
|
-
return
|
|
4159
|
+
return d("div", {
|
|
3969
4160
|
...r,
|
|
3970
4161
|
class: ["toku-theme", r.class],
|
|
3971
4162
|
style: e ? [r.style, e] : r.style
|
|
@@ -3975,21 +4166,21 @@ var sr = /* @__PURE__ */ s({
|
|
|
3975
4166
|
});
|
|
3976
4167
|
//#endregion
|
|
3977
4168
|
//#region src/composables/click.ts
|
|
3978
|
-
function
|
|
4169
|
+
function Jr(e, t) {
|
|
3979
4170
|
let n = (n) => {
|
|
3980
4171
|
let r = e();
|
|
3981
4172
|
r && !r.contains(n.target) && t();
|
|
3982
4173
|
};
|
|
3983
|
-
|
|
4174
|
+
y(() => {
|
|
3984
4175
|
document.addEventListener("click", n);
|
|
3985
|
-
}),
|
|
4176
|
+
}), v(() => {
|
|
3986
4177
|
document.removeEventListener("click", n);
|
|
3987
4178
|
});
|
|
3988
4179
|
}
|
|
3989
4180
|
//#endregion
|
|
3990
4181
|
//#region src/composables/tooltip.ts
|
|
3991
|
-
var
|
|
3992
|
-
let t =
|
|
4182
|
+
var Yr = (e) => {
|
|
4183
|
+
let t = C(!1), r = null, i = () => {
|
|
3993
4184
|
t.value = !0, r && clearTimeout(r);
|
|
3994
4185
|
}, a = () => t.value = !1, o = {
|
|
3995
4186
|
hover: {
|
|
@@ -3999,15 +4190,15 @@ var Ar = (e) => {
|
|
|
3999
4190
|
}
|
|
4000
4191
|
},
|
|
4001
4192
|
click: { onClick: () => t.value ? a() : i() }
|
|
4002
|
-
}, s = n(() => o[e.value ?? "hover"]), c =
|
|
4003
|
-
return
|
|
4193
|
+
}, s = n(() => o[e.value ?? "hover"]), c = C(null);
|
|
4194
|
+
return Jr(() => c.value, a), {
|
|
4004
4195
|
isVisible: t,
|
|
4005
4196
|
triggerHandler: s,
|
|
4006
4197
|
wrapperRef: c
|
|
4007
4198
|
};
|
|
4008
|
-
},
|
|
4009
|
-
let e =
|
|
4010
|
-
return n(() =>
|
|
4199
|
+
}, Xr = () => {
|
|
4200
|
+
let e = J();
|
|
4201
|
+
return n(() => A({
|
|
4011
4202
|
position: "relative",
|
|
4012
4203
|
width: "fit-content",
|
|
4013
4204
|
"&, *": {
|
|
@@ -4097,11 +4288,11 @@ var Ar = (e) => {
|
|
|
4097
4288
|
"&--medium &__tooltip": { maxWidth: "30ch" },
|
|
4098
4289
|
"&--large &__tooltip": { maxWidth: "35ch" }
|
|
4099
4290
|
}));
|
|
4100
|
-
},
|
|
4291
|
+
}, Zr = {
|
|
4101
4292
|
position: "right",
|
|
4102
4293
|
size: "medium",
|
|
4103
4294
|
trigger: "hover"
|
|
4104
|
-
},
|
|
4295
|
+
}, Qr = /* @__PURE__ */ u({
|
|
4105
4296
|
name: "TTooltip",
|
|
4106
4297
|
props: {
|
|
4107
4298
|
label: String,
|
|
@@ -4111,27 +4302,27 @@ var Ar = (e) => {
|
|
|
4111
4302
|
trigger: String
|
|
4112
4303
|
},
|
|
4113
4304
|
setup(e, { slots: t, attrs: r }) {
|
|
4114
|
-
let i = n(() =>
|
|
4115
|
-
|
|
4116
|
-
`${
|
|
4117
|
-
`${
|
|
4305
|
+
let i = n(() => F({}, Zr, e, r)), { isVisible: a, wrapperRef: o, triggerHandler: s } = Yr(n(() => i.value.trigger)), c = Xr(), u = n(() => [
|
|
4306
|
+
c.value,
|
|
4307
|
+
`${c.value}--${i.value.position}`,
|
|
4308
|
+
`${c.value}--${i.value.trigger}`,
|
|
4118
4309
|
{
|
|
4119
|
-
[`${
|
|
4120
|
-
[`${
|
|
4121
|
-
[`${
|
|
4310
|
+
[`${c.value}--visible`]: a.value,
|
|
4311
|
+
[`${c.value}--multilined`]: i.value.multilined,
|
|
4312
|
+
[`${c.value}--${i.value.size}`]: i.value.multilined
|
|
4122
4313
|
}
|
|
4123
4314
|
]);
|
|
4124
|
-
return () =>
|
|
4125
|
-
ref:
|
|
4315
|
+
return () => l("div", h({
|
|
4316
|
+
ref: o,
|
|
4126
4317
|
class: u.value
|
|
4127
|
-
},
|
|
4318
|
+
}, s.value), [t.default?.(), l("div", {
|
|
4128
4319
|
role: "tooltip",
|
|
4129
|
-
class: `${
|
|
4320
|
+
class: `${c.value}__tooltip`
|
|
4130
4321
|
}, [t.label?.() || i.value.label])]);
|
|
4131
4322
|
}
|
|
4132
|
-
}),
|
|
4133
|
-
let e =
|
|
4134
|
-
return n(() =>
|
|
4323
|
+
}), $r = () => {
|
|
4324
|
+
let e = J();
|
|
4325
|
+
return n(() => A({
|
|
4135
4326
|
"&, *": {
|
|
4136
4327
|
margin: 0,
|
|
4137
4328
|
boxSizing: "border-box",
|
|
@@ -4156,31 +4347,31 @@ var Ar = (e) => {
|
|
|
4156
4347
|
"&--success": {
|
|
4157
4348
|
borderColor: e.value.colors.success,
|
|
4158
4349
|
color: e.value.colors.success,
|
|
4159
|
-
background:
|
|
4350
|
+
background: U(e.value.colors.success, .2)
|
|
4160
4351
|
},
|
|
4161
4352
|
"&--success > &__text": { color: e.value.colors.success },
|
|
4162
4353
|
"&--in-process": {
|
|
4163
4354
|
borderColor: e.value.colors.inProcess,
|
|
4164
4355
|
color: e.value.colors.inProcess,
|
|
4165
|
-
background:
|
|
4356
|
+
background: U(e.value.colors.inProcess, .2)
|
|
4166
4357
|
},
|
|
4167
4358
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
4168
4359
|
"&--warning": {
|
|
4169
4360
|
borderColor: e.value.colors.warning,
|
|
4170
4361
|
color: e.value.colors.warning,
|
|
4171
|
-
background:
|
|
4362
|
+
background: U(e.value.colors.warning, .2)
|
|
4172
4363
|
},
|
|
4173
4364
|
"&--warning > &__text": { color: e.value.colors.warning },
|
|
4174
4365
|
"&--error": {
|
|
4175
4366
|
borderColor: e.value.colors.error,
|
|
4176
4367
|
color: e.value.colors.error,
|
|
4177
|
-
background:
|
|
4368
|
+
background: U(e.value.colors.error, .2)
|
|
4178
4369
|
},
|
|
4179
4370
|
"&--error > &__text": { color: e.value.colors.error },
|
|
4180
4371
|
"&--info": {
|
|
4181
4372
|
borderColor: e.value.colors.info,
|
|
4182
4373
|
color: e.value.colors.info,
|
|
4183
|
-
background:
|
|
4374
|
+
background: U(e.value.colors.info, .2)
|
|
4184
4375
|
},
|
|
4185
4376
|
"&--info > &__text": { color: e.value.colors.info },
|
|
4186
4377
|
"&__icon": {
|
|
@@ -4204,7 +4395,7 @@ var Ar = (e) => {
|
|
|
4204
4395
|
}
|
|
4205
4396
|
}
|
|
4206
4397
|
}));
|
|
4207
|
-
},
|
|
4398
|
+
}, ei = { variant: "default" }, ti = /* @__PURE__ */ u({
|
|
4208
4399
|
name: "TWarning",
|
|
4209
4400
|
props: {
|
|
4210
4401
|
fullWidth: Boolean,
|
|
@@ -4212,39 +4403,39 @@ var Ar = (e) => {
|
|
|
4212
4403
|
variant: String
|
|
4213
4404
|
},
|
|
4214
4405
|
setup(e, { slots: t }) {
|
|
4215
|
-
let r = n(() =>
|
|
4406
|
+
let r = n(() => F({}, ei, e)), i = $r(), a = n(() => [
|
|
4216
4407
|
i.value,
|
|
4217
4408
|
`${i.value}--${r.value.variant}`,
|
|
4218
4409
|
{ [`${i.value}--full-width`]: r.value.fullWidth }
|
|
4219
|
-
]),
|
|
4410
|
+
]), o = {
|
|
4220
4411
|
default: "gray.medium1",
|
|
4221
4412
|
success: "success",
|
|
4222
4413
|
"in-process": "inProcessDark",
|
|
4223
4414
|
warning: "warning",
|
|
4224
4415
|
error: "error",
|
|
4225
4416
|
info: "info"
|
|
4226
|
-
},
|
|
4227
|
-
return () =>
|
|
4417
|
+
}, s = n(() => o[r.value.variant]);
|
|
4418
|
+
return () => l("div", {
|
|
4228
4419
|
class: a.value,
|
|
4229
4420
|
role: "alert"
|
|
4230
4421
|
}, [
|
|
4231
|
-
r.value.icon &&
|
|
4422
|
+
r.value.icon && l(Y, {
|
|
4232
4423
|
icon: r.value.icon,
|
|
4233
4424
|
class: `${i.value}__icon`,
|
|
4234
|
-
color:
|
|
4425
|
+
color: s.value
|
|
4235
4426
|
}, null),
|
|
4236
4427
|
" ",
|
|
4237
|
-
t.content?.() ? t.content?.() :
|
|
4428
|
+
t.content?.() ? t.content?.() : l($, {
|
|
4238
4429
|
variant: "b3",
|
|
4239
4430
|
class: `${i.value}__text`
|
|
4240
4431
|
}, { default: () => [t.default?.()] })
|
|
4241
4432
|
]);
|
|
4242
4433
|
}
|
|
4243
|
-
}),
|
|
4434
|
+
}), ni = () => ({ open: ({ onCancel: e, onConfirm: t, ...n }) => {
|
|
4244
4435
|
let i = document.createElement("div");
|
|
4245
4436
|
document.body.appendChild(i);
|
|
4246
4437
|
let a = r({ render() {
|
|
4247
|
-
return
|
|
4438
|
+
return d(Hn, {
|
|
4248
4439
|
...n,
|
|
4249
4440
|
onConfirm: () => {
|
|
4250
4441
|
t?.(), a.unmount(), i.remove();
|
|
@@ -4260,6 +4451,6 @@ var Ar = (e) => {
|
|
|
4260
4451
|
a.mount(i);
|
|
4261
4452
|
} });
|
|
4262
4453
|
//#endregion
|
|
4263
|
-
export {
|
|
4454
|
+
export { un as TButton, mn as TCheckbox, on as TChip, Dn as TCombobox, Hn as TDialog, bn as TDropdown, Sn as TDropdownItem, Xn as TFileUpload, Y as TIcon, $n as TIconButton, nr as TLink, cr as TLoading, jn as TModal, dr as TRadio, Er as TSelect, kr as TSelectDropdown, jr as TSelectDropdownItem, ar as TSpinner, Pr as TSwitch, Ir as TTabBar, Br as TTabBarExtended, Ur as TTag, Kr as TTextArea, Tn as TTextInput, qr as TThemeProvider, Qr as TTooltip, $ as TTypography, ti as TWarning, ie as baseTheme, tn as createTheme, nn as injectionKey, ni as useDialog, pr as useScrollbarThumb, J as useTheme };
|
|
4264
4455
|
|
|
4265
4456
|
//# sourceMappingURL=index.es.js.map
|