toku-ui 5.5.0 → 5.6.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/TConfirmDialog/TConfirmDialog.stories.d.ts +74 -0
- package/dist/components/TConfirmDialog/TConfirmDialog.stories.d.ts.map +1 -0
- package/dist/components/TConfirmDialog/TConfirmDialog.vue.d.ts +60 -0
- package/dist/components/TConfirmDialog/TConfirmDialog.vue.d.ts.map +1 -0
- package/dist/components/TConfirmDialog/index.d.ts +3 -0
- package/dist/components/TConfirmDialog/index.d.ts.map +1 -0
- package/dist/components/TDrawer/TDrawer.stories.d.ts +45 -6
- package/dist/components/TDrawer/TDrawer.stories.d.ts.map +1 -1
- package/dist/components/TDrawer/TDrawer.vue.d.ts +76 -11
- package/dist/components/TDrawer/TDrawer.vue.d.ts.map +1 -1
- package/dist/components/TDrawer/TDrawerHeader/TDrawerHeader.vue.d.ts +7 -1
- package/dist/components/TDrawer/TDrawerHeader/TDrawerHeader.vue.d.ts.map +1 -1
- package/dist/components/TDrawer/TDrawerLinkRow/TDrawerLinkRow.vue.d.ts +5 -1
- package/dist/components/TDrawer/TDrawerLinkRow/TDrawerLinkRow.vue.d.ts.map +1 -1
- package/dist/components/TDrawer/context.d.ts +20 -0
- package/dist/components/TDrawer/context.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/composables/confirm.d.ts +22 -0
- package/dist/composables/confirm.d.ts.map +1 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/index.es.js +1212 -942
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Text as n, computed as r, createApp as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d,
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { css as
|
|
4
|
-
import { DialogContent as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, computed as r, createApp as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, getCurrentInstance as f, h as p, inject as m, isVNode as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onUnmounted as C, openBlock as w, provide as ee, reactive as T, ref as E, render as D, renderList as O, renderSlot as k, toDisplayString as A, unref as j, useAttrs as te, useCssVars as ne, useId as re, useModel as M, useSlots as ie, useTemplateRef as N, watch as P, withCtx as F, withModifiers as ae } from "vue";
|
|
2
|
+
import { Icon as I } from "@iconify/vue";
|
|
3
|
+
import { css as L } from "@emotion/css";
|
|
4
|
+
import { AlertDialogCancel as oe, AlertDialogContent as se, AlertDialogDescription as ce, AlertDialogOverlay as le, AlertDialogPortal as ue, AlertDialogRoot as de, AlertDialogTitle as fe, DialogContent as pe, DialogOverlay as me, DialogPortal as he, DialogRoot as R, Label as ge, Primitive as z, SwitchRoot as B, SwitchThumb as V, injectDialogRootContext as _e } from "reka-ui";
|
|
5
5
|
//#region src/theme/base.ts
|
|
6
|
-
var
|
|
6
|
+
var ve = {
|
|
7
7
|
colors: {
|
|
8
8
|
primary: {
|
|
9
9
|
main: "#3C1053",
|
|
@@ -58,22 +58,22 @@ var pe = {
|
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
61
|
-
function
|
|
61
|
+
function ye(e) {
|
|
62
62
|
return Number.isSafeInteger(e) && e >= 0;
|
|
63
63
|
}
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
|
|
66
|
-
function
|
|
67
|
-
return e != null && typeof e != "function" &&
|
|
66
|
+
function be(e) {
|
|
67
|
+
return e != null && typeof e != "function" && ye(e.length);
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
71
|
-
function
|
|
71
|
+
function xe(e) {
|
|
72
72
|
return e === "__proto__";
|
|
73
73
|
}
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
|
|
76
|
-
function
|
|
76
|
+
function Se(e) {
|
|
77
77
|
switch (typeof e) {
|
|
78
78
|
case "number":
|
|
79
79
|
case "symbol": return !1;
|
|
@@ -82,24 +82,24 @@ function _e(e) {
|
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
|
|
85
|
-
function
|
|
85
|
+
function Ce(e) {
|
|
86
86
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
90
|
-
function
|
|
90
|
+
function we(e) {
|
|
91
91
|
if (e == null) return "";
|
|
92
92
|
if (typeof e == "string") return e;
|
|
93
|
-
if (Array.isArray(e)) return e.map(
|
|
93
|
+
if (Array.isArray(e)) return e.map(we).join(",");
|
|
94
94
|
let t = String(e);
|
|
95
95
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs
|
|
99
|
-
function
|
|
100
|
-
if (Array.isArray(e)) return e.map(
|
|
99
|
+
function Te(e) {
|
|
100
|
+
if (Array.isArray(e)) return e.map(Ce);
|
|
101
101
|
if (typeof e == "symbol") return [e];
|
|
102
|
-
e =
|
|
102
|
+
e = we(e);
|
|
103
103
|
let t = [], n = e.length;
|
|
104
104
|
if (n === 0) return t;
|
|
105
105
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -111,81 +111,81 @@ function L(e) {
|
|
|
111
111
|
}
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/get.mjs
|
|
114
|
-
function
|
|
114
|
+
function Ee(e, t, n) {
|
|
115
115
|
if (e == null) return n;
|
|
116
116
|
switch (typeof t) {
|
|
117
117
|
case "string": {
|
|
118
|
-
if (
|
|
118
|
+
if (xe(t)) return n;
|
|
119
119
|
let r = e[t];
|
|
120
|
-
return r === void 0 ?
|
|
120
|
+
return r === void 0 ? Se(t) ? Ee(e, Te(t), n) : n : r;
|
|
121
121
|
}
|
|
122
122
|
case "number":
|
|
123
123
|
case "symbol": {
|
|
124
|
-
typeof t == "number" && (t =
|
|
124
|
+
typeof t == "number" && (t = Ce(t));
|
|
125
125
|
let r = e[t];
|
|
126
126
|
return r === void 0 ? n : r;
|
|
127
127
|
}
|
|
128
128
|
default: {
|
|
129
|
-
if (Array.isArray(t)) return
|
|
130
|
-
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t),
|
|
129
|
+
if (Array.isArray(t)) return De(e, t, n);
|
|
130
|
+
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), xe(t)) return n;
|
|
131
131
|
let r = e[t];
|
|
132
132
|
return r === void 0 ? n : r;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function De(e, t, n) {
|
|
137
137
|
if (t.length === 0) return n;
|
|
138
138
|
let r = e;
|
|
139
139
|
for (let e = 0; e < t.length; e++) {
|
|
140
|
-
if (r == null ||
|
|
140
|
+
if (r == null || xe(t[e])) return n;
|
|
141
141
|
r = r[t[e]];
|
|
142
142
|
}
|
|
143
143
|
return r === void 0 ? n : r;
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
146
146
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
147
|
-
function
|
|
147
|
+
function Oe(e) {
|
|
148
148
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
152
|
-
function
|
|
152
|
+
function ke(e) {
|
|
153
153
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
157
|
-
function
|
|
157
|
+
function Ae(e) {
|
|
158
158
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
159
159
|
}
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
162
|
-
var
|
|
162
|
+
var je = "[object RegExp]", Me = "[object String]", Ne = "[object Number]", Pe = "[object Boolean]", Fe = "[object Arguments]", Ie = "[object Symbol]", Le = "[object Date]", Re = "[object Map]", ze = "[object Set]", Be = "[object Array]", Ve = "[object ArrayBuffer]", He = "[object Object]", Ue = "[object DataView]", We = "[object Uint8Array]", Ge = "[object Uint8ClampedArray]", Ke = "[object Uint16Array]", qe = "[object Uint32Array]", Je = "[object Int8Array]", Ye = "[object Int16Array]", Xe = "[object Int32Array]", Ze = "[object Float32Array]", Qe = "[object Float64Array]", $e = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
|
|
163
163
|
return this;
|
|
164
164
|
})() || Function("return this")();
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
|
|
167
|
-
function
|
|
168
|
-
return
|
|
167
|
+
function et(e) {
|
|
168
|
+
return $e.Buffer !== void 0 && $e.Buffer.isBuffer(e);
|
|
169
169
|
}
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
172
|
-
function
|
|
172
|
+
function tt(e) {
|
|
173
173
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
177
|
-
function
|
|
178
|
-
return
|
|
177
|
+
function nt(e, t) {
|
|
178
|
+
return rt(e, void 0, e, /* @__PURE__ */ new Map(), t);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function rt(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
181
181
|
let a = i?.(e, t, n, r);
|
|
182
182
|
if (a !== void 0) return a;
|
|
183
|
-
if (
|
|
183
|
+
if (Oe(e)) return e;
|
|
184
184
|
if (r.has(e)) return r.get(e);
|
|
185
185
|
if (Array.isArray(e)) {
|
|
186
186
|
let t = Array(e.length);
|
|
187
187
|
r.set(e, t);
|
|
188
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
188
|
+
for (let a = 0; a < e.length; a++) t[a] = rt(e[a], a, n, r, i);
|
|
189
189
|
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
|
|
190
190
|
}
|
|
191
191
|
if (e instanceof Date) return new Date(e.getTime());
|
|
@@ -196,112 +196,112 @@ function Je(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
196
196
|
if (e instanceof Map) {
|
|
197
197
|
let t = /* @__PURE__ */ new Map();
|
|
198
198
|
r.set(e, t);
|
|
199
|
-
for (let [a, o] of e) t.set(a,
|
|
199
|
+
for (let [a, o] of e) t.set(a, rt(o, a, n, r, i));
|
|
200
200
|
return t;
|
|
201
201
|
}
|
|
202
202
|
if (e instanceof Set) {
|
|
203
203
|
let t = /* @__PURE__ */ new Set();
|
|
204
204
|
r.set(e, t);
|
|
205
|
-
for (let a of e) t.add(
|
|
205
|
+
for (let a of e) t.add(rt(a, void 0, n, r, i));
|
|
206
206
|
return t;
|
|
207
207
|
}
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
208
|
+
if (et(e)) return e.subarray();
|
|
209
|
+
if (tt(e)) {
|
|
210
210
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
211
211
|
r.set(e, t);
|
|
212
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
212
|
+
for (let a = 0; a < e.length; a++) t[a] = rt(e[a], a, n, r, i);
|
|
213
213
|
return t;
|
|
214
214
|
}
|
|
215
215
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
216
216
|
if (e instanceof DataView) {
|
|
217
217
|
let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
|
|
218
|
-
return r.set(e, t),
|
|
218
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
219
219
|
}
|
|
220
220
|
if (typeof File < "u" && e instanceof File) {
|
|
221
221
|
let t = new File([e], e.name, { type: e.type });
|
|
222
|
-
return r.set(e, t),
|
|
222
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
223
223
|
}
|
|
224
224
|
if (typeof Blob < "u" && e instanceof Blob) {
|
|
225
225
|
let t = new Blob([e], { type: e.type });
|
|
226
|
-
return r.set(e, t),
|
|
226
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
227
227
|
}
|
|
228
228
|
if (e instanceof Error) {
|
|
229
229
|
let t = structuredClone(e);
|
|
230
|
-
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor,
|
|
230
|
+
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor, H(t, e, n, r, i), t;
|
|
231
231
|
}
|
|
232
232
|
if (e instanceof Boolean) {
|
|
233
233
|
let t = new Boolean(e.valueOf());
|
|
234
|
-
return r.set(e, t),
|
|
234
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
235
235
|
}
|
|
236
236
|
if (e instanceof Number) {
|
|
237
237
|
let t = new Number(e.valueOf());
|
|
238
|
-
return r.set(e, t),
|
|
238
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
239
239
|
}
|
|
240
240
|
if (e instanceof String) {
|
|
241
241
|
let t = new String(e.valueOf());
|
|
242
|
-
return r.set(e, t),
|
|
242
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
243
243
|
}
|
|
244
|
-
if (typeof e == "object" &&
|
|
244
|
+
if (typeof e == "object" && it(e)) {
|
|
245
245
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
246
|
-
return r.set(e, t),
|
|
246
|
+
return r.set(e, t), H(t, e, n, r, i), t;
|
|
247
247
|
}
|
|
248
248
|
return e;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
let a = [...Object.keys(t), ...
|
|
250
|
+
function H(e, t, n = e, r, i) {
|
|
251
|
+
let a = [...Object.keys(t), ...ke(t)];
|
|
252
252
|
for (let o = 0; o < a.length; o++) {
|
|
253
253
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
254
|
-
(c == null || c.writable) && (e[s] =
|
|
254
|
+
(c == null || c.writable) && (e[s] = rt(t[s], s, n, r, i));
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
switch (
|
|
259
|
-
case
|
|
260
|
-
case je:
|
|
261
|
-
case Me:
|
|
262
|
-
case Pe:
|
|
263
|
-
case Te:
|
|
264
|
-
case Oe:
|
|
265
|
-
case He:
|
|
266
|
-
case Ue:
|
|
267
|
-
case ze:
|
|
257
|
+
function it(e) {
|
|
258
|
+
switch (Ae(e)) {
|
|
259
|
+
case Fe:
|
|
268
260
|
case Be:
|
|
269
261
|
case Ve:
|
|
270
|
-
case
|
|
271
|
-
case
|
|
262
|
+
case Ue:
|
|
263
|
+
case Pe:
|
|
264
|
+
case Le:
|
|
265
|
+
case Ze:
|
|
266
|
+
case Qe:
|
|
267
|
+
case Je:
|
|
268
|
+
case Ye:
|
|
269
|
+
case Xe:
|
|
270
|
+
case Re:
|
|
272
271
|
case Ne:
|
|
273
|
-
case
|
|
274
|
-
case
|
|
275
|
-
case
|
|
276
|
-
case
|
|
277
|
-
case Fe:
|
|
272
|
+
case He:
|
|
273
|
+
case je:
|
|
274
|
+
case ze:
|
|
275
|
+
case Me:
|
|
278
276
|
case Ie:
|
|
279
|
-
case
|
|
280
|
-
case
|
|
277
|
+
case We:
|
|
278
|
+
case Ge:
|
|
279
|
+
case Ke:
|
|
280
|
+
case qe: return !0;
|
|
281
281
|
default: return !1;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
|
|
286
|
-
function
|
|
287
|
-
return
|
|
286
|
+
function at(e, t) {
|
|
287
|
+
return nt(e, (n, r, i, a) => {
|
|
288
288
|
let o = t?.(n, r, i, a);
|
|
289
289
|
if (o !== void 0) return o;
|
|
290
290
|
if (typeof e == "object") {
|
|
291
|
-
if (
|
|
291
|
+
if (Ae(e) === "[object Object]" && typeof e.constructor != "function") {
|
|
292
292
|
let t = {};
|
|
293
|
-
return a.set(e, t),
|
|
293
|
+
return a.set(e, t), H(t, e, i, a), t;
|
|
294
294
|
}
|
|
295
295
|
switch (Object.prototype.toString.call(e)) {
|
|
296
|
-
case
|
|
297
|
-
case
|
|
298
|
-
case
|
|
296
|
+
case Ne:
|
|
297
|
+
case Me:
|
|
298
|
+
case Pe: {
|
|
299
299
|
let t = new e.constructor(e?.valueOf());
|
|
300
|
-
return
|
|
300
|
+
return H(t, e), t;
|
|
301
301
|
}
|
|
302
|
-
case
|
|
302
|
+
case Fe: {
|
|
303
303
|
let t = {};
|
|
304
|
-
return
|
|
304
|
+
return H(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
|
|
305
305
|
}
|
|
306
306
|
default: return;
|
|
307
307
|
}
|
|
@@ -310,35 +310,35 @@ function Xe(e, t) {
|
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
|
|
313
|
-
function
|
|
314
|
-
return
|
|
313
|
+
function ot(e) {
|
|
314
|
+
return at(e);
|
|
315
315
|
}
|
|
316
316
|
//#endregion
|
|
317
317
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
|
|
318
|
-
function
|
|
319
|
-
return typeof e == "object" && !!e &&
|
|
318
|
+
function st(e) {
|
|
319
|
+
return typeof e == "object" && !!e && Ae(e) === "[object Arguments]";
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
|
|
323
|
-
function
|
|
323
|
+
function ct(e) {
|
|
324
324
|
return typeof e == "object" && !!e;
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
|
|
328
|
-
function
|
|
329
|
-
return
|
|
328
|
+
function lt(e) {
|
|
329
|
+
return ct(e) && be(e);
|
|
330
330
|
}
|
|
331
331
|
//#endregion
|
|
332
332
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/function/noop.mjs
|
|
333
|
-
function
|
|
333
|
+
function ut() {}
|
|
334
334
|
//#endregion
|
|
335
335
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
function dt(e) {
|
|
337
|
+
return tt(e);
|
|
338
338
|
}
|
|
339
339
|
//#endregion
|
|
340
340
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
341
|
-
function
|
|
341
|
+
function ft(e) {
|
|
342
342
|
if (typeof e != "object" || !e) return !1;
|
|
343
343
|
if (Object.getPrototypeOf(e) === null) return !0;
|
|
344
344
|
if (Object.prototype.toString.call(e) !== "[object Object]") {
|
|
@@ -351,9 +351,9 @@ function rt(e) {
|
|
|
351
351
|
}
|
|
352
352
|
//#endregion
|
|
353
353
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/clone.mjs
|
|
354
|
-
function
|
|
355
|
-
if (
|
|
356
|
-
if (Array.isArray(e) ||
|
|
354
|
+
function pt(e) {
|
|
355
|
+
if (Oe(e)) return e;
|
|
356
|
+
if (Array.isArray(e) || tt(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
357
357
|
let t = Object.getPrototypeOf(e);
|
|
358
358
|
if (t == null) return Object.assign(Object.create(t), e);
|
|
359
359
|
let n = t.constructor;
|
|
@@ -374,130 +374,130 @@ function it(e) {
|
|
|
374
374
|
}
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
|
|
377
|
-
function
|
|
377
|
+
function mt(e, ...t) {
|
|
378
378
|
let n = t.slice(0, -1), r = t[t.length - 1], i = e;
|
|
379
379
|
for (let e = 0; e < n.length; e++) {
|
|
380
380
|
let t = n[e];
|
|
381
|
-
i =
|
|
381
|
+
i = ht(i, t, r, /* @__PURE__ */ new Map());
|
|
382
382
|
}
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
387
|
-
if (r.has(t)) return
|
|
385
|
+
function ht(e, t, n, r) {
|
|
386
|
+
if (Oe(e) && (e = Object(e)), typeof t != "object" || !t) return e;
|
|
387
|
+
if (r.has(t)) return pt(r.get(t));
|
|
388
388
|
if (r.set(t, e), Array.isArray(t)) {
|
|
389
389
|
t = t.slice();
|
|
390
390
|
for (let e = 0; e < t.length; e++) t[e] = t[e] ?? void 0;
|
|
391
391
|
}
|
|
392
|
-
let i = [...Object.keys(t), ...
|
|
392
|
+
let i = [...Object.keys(t), ...ke(t)];
|
|
393
393
|
for (let a = 0; a < i.length; a++) {
|
|
394
394
|
let o = i[a];
|
|
395
|
-
if (
|
|
395
|
+
if (xe(o)) continue;
|
|
396
396
|
let s = t[o], c = e[o];
|
|
397
|
-
if (
|
|
397
|
+
if (st(s) && (s = { ...s }), st(c) && (c = { ...c }), et(s) && (s = ot(s)), Array.isArray(s)) if (Array.isArray(c)) {
|
|
398
398
|
let e = [], t = Reflect.ownKeys(c);
|
|
399
399
|
for (let n = 0; n < t.length; n++) {
|
|
400
400
|
let r = t[n];
|
|
401
401
|
e[r] = c[r];
|
|
402
402
|
}
|
|
403
403
|
c = e;
|
|
404
|
-
} else if (
|
|
404
|
+
} else if (lt(c)) {
|
|
405
405
|
let e = [];
|
|
406
406
|
for (let t = 0; t < c.length; t++) e[t] = c[t];
|
|
407
407
|
c = e;
|
|
408
408
|
} else c = [];
|
|
409
409
|
let l = n(c, s, o, e, t, r);
|
|
410
|
-
l === void 0 ? Array.isArray(s) ||
|
|
410
|
+
l === void 0 ? Array.isArray(s) || ct(c) && ct(s) && (ft(c) || ft(s) || dt(c) || dt(s)) ? e[o] = ht(c, s, n, r) : c == null && ft(s) ? e[o] = ht({}, s, n, r) : c == null && dt(s) ? e[o] = ot(s) : (c === void 0 || s !== void 0) && (e[o] = s) : e[o] = l;
|
|
411
411
|
}
|
|
412
412
|
return e;
|
|
413
413
|
}
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/merge.mjs
|
|
416
|
-
function
|
|
417
|
-
return
|
|
416
|
+
function U(e, ...t) {
|
|
417
|
+
return mt(e, ...t, ut);
|
|
418
418
|
}
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
421
|
-
function
|
|
421
|
+
function gt(e) {
|
|
422
422
|
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
423
423
|
}
|
|
424
424
|
//#endregion
|
|
425
425
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/words.mjs
|
|
426
|
-
var
|
|
427
|
-
function
|
|
428
|
-
return Array.from(e.match(
|
|
426
|
+
var _t = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
427
|
+
function vt(e) {
|
|
428
|
+
return Array.from(e.match(_t) ?? []);
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
431
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
432
|
-
function
|
|
433
|
-
let t =
|
|
432
|
+
function yt(e) {
|
|
433
|
+
let t = vt(e);
|
|
434
434
|
if (t.length === 0) return "";
|
|
435
435
|
let [n, ...r] = t;
|
|
436
|
-
return `${n.toLowerCase()}${r.map((e) =>
|
|
436
|
+
return `${n.toLowerCase()}${r.map((e) => gt(e)).join("")}`;
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region node_modules/.pnpm/bezier-easing@3.2.0/node_modules/bezier-easing/src/index.js
|
|
440
|
-
function
|
|
440
|
+
function bt(e) {
|
|
441
441
|
return e <= 0 ? 0 : e >= 1 ? 1 : e;
|
|
442
442
|
}
|
|
443
|
-
var { min:
|
|
444
|
-
let i = 1 /
|
|
443
|
+
var { min: xt, max: St, cbrt: Ct, sqrt: wt, acos: Tt, cos: Et } = Math, Dt = (e, t, n, r) => {
|
|
444
|
+
let i = 1 / St(r, wt(e)), a = e * i, o = a * i, s = r * i, c = n * o, l = s * s + c, u = -s * (s * s + 1.5 * c) - t * a * o, d = u * u - l * l * l, f;
|
|
445
445
|
if (!l || d > 1e-12 * u * u) {
|
|
446
|
-
let e = -
|
|
446
|
+
let e = -Ct(u < 0 ? u - wt(d) : u + wt(d));
|
|
447
447
|
f = e + l / e || 0;
|
|
448
448
|
} else {
|
|
449
|
-
let e =
|
|
450
|
-
f = 2 * e *
|
|
449
|
+
let e = wt(l);
|
|
450
|
+
f = 2 * e * Et(Tt(St(-1, xt(1, -u / (l * e)))) / 3);
|
|
451
451
|
}
|
|
452
|
-
return
|
|
453
|
-
},
|
|
454
|
-
function
|
|
452
|
+
return xt(1, a / (f + s));
|
|
453
|
+
}, Ot = (e, t, n, r) => ((t * e + n) * e + r) * e;
|
|
454
|
+
function kt(e, t, n, r) {
|
|
455
455
|
if (!(0 <= e && e <= 1 && 0 <= n && n <= 1)) throw Error("bezier x values must be in [0, 1] range");
|
|
456
|
-
if (e === t && n === r) return
|
|
456
|
+
if (e === t && n === r) return bt;
|
|
457
457
|
let i = (3 * e - 3 * n + 1) / 2, a = n - 2 * e, o = e, s = 3 * t - 3 * r + 1, c = 3 * (r - 2 * t), l = 3 * t;
|
|
458
458
|
return function(e) {
|
|
459
|
-
return e > 0 && e < 1 ?
|
|
459
|
+
return e > 0 && e < 1 ? Ot(Dt(e, i, a, o), s, c, l) : bt(e);
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
464
|
-
function
|
|
465
|
-
return
|
|
464
|
+
function W() {
|
|
465
|
+
return W = Object.assign ? Object.assign.bind() : function(e) {
|
|
466
466
|
for (var t = 1; t < arguments.length; t++) {
|
|
467
467
|
var n = arguments[t];
|
|
468
468
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
469
469
|
}
|
|
470
470
|
return e;
|
|
471
|
-
},
|
|
471
|
+
}, W.apply(null, arguments);
|
|
472
472
|
}
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
475
|
-
function
|
|
475
|
+
function At(e) {
|
|
476
476
|
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
477
477
|
return e;
|
|
478
478
|
}
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
481
|
-
function
|
|
482
|
-
return
|
|
481
|
+
function jt(e, t) {
|
|
482
|
+
return jt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
483
483
|
return e.__proto__ = t, e;
|
|
484
|
-
},
|
|
484
|
+
}, jt(e, t);
|
|
485
485
|
}
|
|
486
486
|
//#endregion
|
|
487
487
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
488
|
-
function
|
|
489
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
488
|
+
function Mt(e, t) {
|
|
489
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, jt(e, t);
|
|
490
490
|
}
|
|
491
491
|
//#endregion
|
|
492
492
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
493
|
-
function
|
|
494
|
-
return
|
|
493
|
+
function Nt(e) {
|
|
494
|
+
return Nt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
495
495
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
496
|
-
},
|
|
496
|
+
}, Nt(e);
|
|
497
497
|
}
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
|
|
500
|
-
function
|
|
500
|
+
function Pt(e) {
|
|
501
501
|
try {
|
|
502
502
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
503
503
|
} catch {
|
|
@@ -506,48 +506,48 @@ function Tt(e) {
|
|
|
506
506
|
}
|
|
507
507
|
//#endregion
|
|
508
508
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
|
|
509
|
-
function
|
|
509
|
+
function Ft() {
|
|
510
510
|
try {
|
|
511
511
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
512
512
|
} catch {}
|
|
513
|
-
return (
|
|
513
|
+
return (Ft = function() {
|
|
514
514
|
return !!e;
|
|
515
515
|
})();
|
|
516
516
|
}
|
|
517
517
|
//#endregion
|
|
518
518
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/construct.js
|
|
519
|
-
function
|
|
520
|
-
if (
|
|
519
|
+
function It(e, t, n) {
|
|
520
|
+
if (Ft()) return Reflect.construct.apply(null, arguments);
|
|
521
521
|
var r = [null];
|
|
522
522
|
r.push.apply(r, t);
|
|
523
523
|
var i = new (e.bind.apply(e, r))();
|
|
524
|
-
return n &&
|
|
524
|
+
return n && jt(i, n.prototype), i;
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
|
|
528
|
-
function
|
|
528
|
+
function Lt(e) {
|
|
529
529
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
530
|
-
return
|
|
531
|
-
if (e === null || !
|
|
530
|
+
return Lt = function(e) {
|
|
531
|
+
if (e === null || !Pt(e)) return e;
|
|
532
532
|
if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
|
|
533
533
|
if (t !== void 0) {
|
|
534
534
|
if (t.has(e)) return t.get(e);
|
|
535
535
|
t.set(e, n);
|
|
536
536
|
}
|
|
537
537
|
function n() {
|
|
538
|
-
return
|
|
538
|
+
return It(e, arguments, Nt(this).constructor);
|
|
539
539
|
}
|
|
540
540
|
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
541
541
|
value: n,
|
|
542
542
|
enumerable: !1,
|
|
543
543
|
writable: !0,
|
|
544
544
|
configurable: !0
|
|
545
|
-
} }),
|
|
546
|
-
},
|
|
545
|
+
} }), jt(n, e);
|
|
546
|
+
}, Lt(e);
|
|
547
547
|
}
|
|
548
548
|
//#endregion
|
|
549
549
|
//#region node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js
|
|
550
|
-
var
|
|
550
|
+
var Rt = {
|
|
551
551
|
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",
|
|
552
552
|
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",
|
|
553
553
|
3: "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
|
|
@@ -627,40 +627,40 @@ var kt = {
|
|
|
627
627
|
77: "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
628
628
|
78: "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
629
629
|
};
|
|
630
|
-
function
|
|
630
|
+
function zt() {
|
|
631
631
|
var e = [...arguments], t = e[0], n = [], r;
|
|
632
632
|
for (r = 1; r < e.length; r += 1) n.push(e[r]);
|
|
633
633
|
return n.forEach(function(e) {
|
|
634
634
|
t = t.replace(/%[a-z]/, e);
|
|
635
635
|
}), t;
|
|
636
636
|
}
|
|
637
|
-
var
|
|
638
|
-
|
|
637
|
+
var G = /* @__PURE__ */ function(e) {
|
|
638
|
+
Mt(t, e);
|
|
639
639
|
function t(t) {
|
|
640
640
|
var n;
|
|
641
641
|
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;
|
|
642
642
|
else {
|
|
643
643
|
var r = [...arguments].slice(1);
|
|
644
|
-
n = e.call(this,
|
|
644
|
+
n = e.call(this, zt.apply(void 0, [Rt[t]].concat(r))) || this;
|
|
645
645
|
}
|
|
646
|
-
return
|
|
646
|
+
return At(n);
|
|
647
647
|
}
|
|
648
648
|
return t;
|
|
649
|
-
}(/* @__PURE__ */
|
|
650
|
-
function
|
|
649
|
+
}(/* @__PURE__ */ Lt(Error));
|
|
650
|
+
function Bt(e) {
|
|
651
651
|
return Math.round(e * 255);
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
return
|
|
653
|
+
function Vt(e, t, n) {
|
|
654
|
+
return Bt(e) + "," + Bt(t) + "," + Bt(n);
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
if (r === void 0 && (r =
|
|
656
|
+
function Ht(e, t, n, r) {
|
|
657
|
+
if (r === void 0 && (r = Vt), t === 0) return r(n, n, n);
|
|
658
658
|
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;
|
|
659
659
|
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);
|
|
660
660
|
var u = n - a / 2, d = s + u, f = c + u, p = l + u;
|
|
661
661
|
return r(d, f, p);
|
|
662
662
|
}
|
|
663
|
-
var
|
|
663
|
+
var Ut = {
|
|
664
664
|
aliceblue: "f0f8ff",
|
|
665
665
|
antiquewhite: "faebd7",
|
|
666
666
|
aqua: "00ffff",
|
|
@@ -810,21 +810,21 @@ var Pt = {
|
|
|
810
810
|
yellow: "ff0",
|
|
811
811
|
yellowgreen: "9acd32"
|
|
812
812
|
};
|
|
813
|
-
function
|
|
813
|
+
function Wt(e) {
|
|
814
814
|
if (typeof e != "string") return e;
|
|
815
815
|
var t = e.toLowerCase();
|
|
816
|
-
return
|
|
816
|
+
return Ut[t] ? "#" + Ut[t] : e;
|
|
817
817
|
}
|
|
818
|
-
var
|
|
819
|
-
function
|
|
820
|
-
if (typeof e != "string") throw new
|
|
821
|
-
var t =
|
|
822
|
-
if (t.match(
|
|
818
|
+
var Gt = /^#[a-fA-F0-9]{6}$/, Kt = /^#[a-fA-F0-9]{8}$/, qt = /^#[a-fA-F0-9]{3}$/, Jt = /^#[a-fA-F0-9]{4}$/, Yt = /^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, Zt = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, Qt = /^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;
|
|
819
|
+
function $t(e) {
|
|
820
|
+
if (typeof e != "string") throw new G(3);
|
|
821
|
+
var t = Wt(e);
|
|
822
|
+
if (t.match(Gt)) return {
|
|
823
823
|
red: parseInt("" + t[1] + t[2], 16),
|
|
824
824
|
green: parseInt("" + t[3] + t[4], 16),
|
|
825
825
|
blue: parseInt("" + t[5] + t[6], 16)
|
|
826
826
|
};
|
|
827
|
-
if (t.match(
|
|
827
|
+
if (t.match(Kt)) {
|
|
828
828
|
var n = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
|
|
829
829
|
return {
|
|
830
830
|
red: parseInt("" + t[1] + t[2], 16),
|
|
@@ -833,12 +833,12 @@ function Wt(e) {
|
|
|
833
833
|
alpha: n
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
|
-
if (t.match(
|
|
836
|
+
if (t.match(qt)) return {
|
|
837
837
|
red: parseInt("" + t[1] + t[1], 16),
|
|
838
838
|
green: parseInt("" + t[2] + t[2], 16),
|
|
839
839
|
blue: parseInt("" + t[3] + t[3], 16)
|
|
840
840
|
};
|
|
841
|
-
if (t.match(
|
|
841
|
+
if (t.match(Jt)) {
|
|
842
842
|
var r = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
|
|
843
843
|
return {
|
|
844
844
|
red: parseInt("" + t[1] + t[1], 16),
|
|
@@ -847,33 +847,33 @@ function Wt(e) {
|
|
|
847
847
|
alpha: r
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
|
-
var i =
|
|
850
|
+
var i = Yt.exec(t);
|
|
851
851
|
if (i) return {
|
|
852
852
|
red: parseInt("" + i[1], 10),
|
|
853
853
|
green: parseInt("" + i[2], 10),
|
|
854
854
|
blue: parseInt("" + i[3], 10)
|
|
855
855
|
};
|
|
856
|
-
var a =
|
|
856
|
+
var a = Xt.exec(t.substring(0, 50));
|
|
857
857
|
if (a) return {
|
|
858
858
|
red: parseInt("" + a[1], 10),
|
|
859
859
|
green: parseInt("" + a[2], 10),
|
|
860
860
|
blue: parseInt("" + a[3], 10),
|
|
861
861
|
alpha: parseFloat("" + a[4]) > 1 ? parseFloat("" + a[4]) / 100 : parseFloat("" + a[4])
|
|
862
862
|
};
|
|
863
|
-
var o =
|
|
863
|
+
var o = Zt.exec(t);
|
|
864
864
|
if (o) {
|
|
865
|
-
var s = "rgb(" +
|
|
866
|
-
if (!c) throw new
|
|
865
|
+
var s = "rgb(" + Ht(parseInt("" + o[1], 10), parseInt("" + o[2], 10) / 100, parseInt("" + o[3], 10) / 100) + ")", c = Yt.exec(s);
|
|
866
|
+
if (!c) throw new G(4, t, s);
|
|
867
867
|
return {
|
|
868
868
|
red: parseInt("" + c[1], 10),
|
|
869
869
|
green: parseInt("" + c[2], 10),
|
|
870
870
|
blue: parseInt("" + c[3], 10)
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
var l =
|
|
873
|
+
var l = Qt.exec(t.substring(0, 50));
|
|
874
874
|
if (l) {
|
|
875
|
-
var u = "rgb(" +
|
|
876
|
-
if (!d) throw new
|
|
875
|
+
var u = "rgb(" + Ht(parseInt("" + l[1], 10), parseInt("" + l[2], 10) / 100, parseInt("" + l[3], 10) / 100) + ")", d = Yt.exec(u);
|
|
876
|
+
if (!d) throw new G(4, t, u);
|
|
877
877
|
return {
|
|
878
878
|
red: parseInt("" + d[1], 10),
|
|
879
879
|
green: parseInt("" + d[2], 10),
|
|
@@ -881,9 +881,9 @@ function Wt(e) {
|
|
|
881
881
|
alpha: parseFloat("" + l[4]) > 1 ? parseFloat("" + l[4]) / 100 : parseFloat("" + l[4])
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
throw new
|
|
884
|
+
throw new G(5);
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function en(e) {
|
|
887
887
|
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;
|
|
888
888
|
if (i === a) return e.alpha === void 0 ? {
|
|
889
889
|
hue: 0,
|
|
@@ -918,155 +918,155 @@ function Gt(e) {
|
|
|
918
918
|
alpha: e.alpha
|
|
919
919
|
};
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
return
|
|
921
|
+
function tn(e) {
|
|
922
|
+
return en($t(e));
|
|
923
923
|
}
|
|
924
|
-
var
|
|
924
|
+
var nn = function(e) {
|
|
925
925
|
return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
|
|
926
926
|
};
|
|
927
|
-
function
|
|
927
|
+
function rn(e) {
|
|
928
928
|
var t = e.toString(16);
|
|
929
929
|
return t.length === 1 ? "0" + t : t;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
return
|
|
931
|
+
function an(e) {
|
|
932
|
+
return rn(Math.round(e * 255));
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
return
|
|
934
|
+
function on(e, t, n) {
|
|
935
|
+
return nn("#" + an(e) + an(t) + an(n));
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
return
|
|
937
|
+
function sn(e, t, n) {
|
|
938
|
+
return Ht(e, t, n, on);
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
942
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
943
|
-
throw new
|
|
940
|
+
function cn(e, t, n) {
|
|
941
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return sn(e, t, n);
|
|
942
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return sn(e.hue, e.saturation, e.lightness);
|
|
943
|
+
throw new G(1);
|
|
944
944
|
}
|
|
945
|
-
function
|
|
946
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
947
|
-
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
948
|
-
throw new
|
|
945
|
+
function ln(e, t, n, r) {
|
|
946
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? sn(e, t, n) : "rgba(" + Ht(e, t, n) + "," + r + ")";
|
|
947
|
+
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? sn(e.hue, e.saturation, e.lightness) : "rgba(" + Ht(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
|
|
948
|
+
throw new G(2);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
952
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
953
|
-
throw new
|
|
950
|
+
function un(e, t, n) {
|
|
951
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return nn("#" + rn(e) + rn(t) + rn(n));
|
|
952
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return nn("#" + rn(e.red) + rn(e.green) + rn(e.blue));
|
|
953
|
+
throw new G(6);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function K(e, t, n, r) {
|
|
956
956
|
if (typeof e == "string" && typeof t == "number") {
|
|
957
|
-
var i =
|
|
957
|
+
var i = $t(e);
|
|
958
958
|
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + t + ")";
|
|
959
|
-
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
960
|
-
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
961
|
-
throw new
|
|
959
|
+
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? un(e, t, n) : "rgba(" + e + "," + t + "," + n + "," + r + ")";
|
|
960
|
+
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? un(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
|
|
961
|
+
throw new G(7);
|
|
962
962
|
}
|
|
963
|
-
var
|
|
963
|
+
var dn = function(e) {
|
|
964
964
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
965
|
-
},
|
|
965
|
+
}, fn = function(e) {
|
|
966
966
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
967
|
-
},
|
|
967
|
+
}, pn = function(e) {
|
|
968
968
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
969
|
-
},
|
|
969
|
+
}, mn = function(e) {
|
|
970
970
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
971
971
|
};
|
|
972
|
-
function
|
|
973
|
-
if (typeof e != "object") throw new
|
|
974
|
-
if (
|
|
975
|
-
if (
|
|
976
|
-
if (
|
|
977
|
-
if (
|
|
978
|
-
throw new
|
|
972
|
+
function hn(e) {
|
|
973
|
+
if (typeof e != "object") throw new G(8);
|
|
974
|
+
if (fn(e)) return K(e);
|
|
975
|
+
if (dn(e)) return un(e);
|
|
976
|
+
if (mn(e)) return ln(e);
|
|
977
|
+
if (pn(e)) return cn(e);
|
|
978
|
+
throw new G(8);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function gn(e, t, n) {
|
|
981
981
|
return function() {
|
|
982
982
|
var r = n.concat(Array.prototype.slice.call(arguments));
|
|
983
|
-
return r.length >= t ? e.apply(this, r) :
|
|
983
|
+
return r.length >= t ? e.apply(this, r) : gn(e, t, r);
|
|
984
984
|
};
|
|
985
985
|
}
|
|
986
986
|
function q(e) {
|
|
987
|
-
return
|
|
987
|
+
return gn(e, e.length, []);
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function _n(e, t) {
|
|
990
990
|
if (t === "transparent") return t;
|
|
991
|
-
var n =
|
|
992
|
-
return
|
|
991
|
+
var n = tn(t);
|
|
992
|
+
return hn(W({}, n, { hue: n.hue + parseFloat(e) }));
|
|
993
993
|
}
|
|
994
|
-
q(
|
|
995
|
-
function
|
|
994
|
+
q(_n);
|
|
995
|
+
function vn(e, t, n) {
|
|
996
996
|
return Math.max(e, Math.min(t, n));
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function yn(e, t) {
|
|
999
999
|
if (t === "transparent") return t;
|
|
1000
|
-
var n =
|
|
1001
|
-
return
|
|
1000
|
+
var n = tn(t);
|
|
1001
|
+
return hn(W({}, n, { lightness: vn(0, 1, n.lightness - parseFloat(e)) }));
|
|
1002
1002
|
}
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1003
|
+
var bn = q(yn);
|
|
1004
|
+
function xn(e, t) {
|
|
1005
1005
|
if (t === "transparent") return t;
|
|
1006
|
-
var n =
|
|
1007
|
-
return
|
|
1006
|
+
var n = tn(t);
|
|
1007
|
+
return hn(W({}, n, { saturation: vn(0, 1, n.saturation - parseFloat(e)) }));
|
|
1008
1008
|
}
|
|
1009
|
-
q(
|
|
1010
|
-
function
|
|
1009
|
+
q(xn);
|
|
1010
|
+
function Sn(e, t) {
|
|
1011
1011
|
if (t === "transparent") return t;
|
|
1012
|
-
var n =
|
|
1013
|
-
return
|
|
1012
|
+
var n = tn(t);
|
|
1013
|
+
return hn(W({}, n, { lightness: vn(0, 1, n.lightness + parseFloat(e)) }));
|
|
1014
1014
|
}
|
|
1015
|
-
var
|
|
1016
|
-
function
|
|
1015
|
+
var Cn = q(Sn);
|
|
1016
|
+
function wn(e, t, n) {
|
|
1017
1017
|
if (t === "transparent") return n;
|
|
1018
1018
|
if (n === "transparent") return t;
|
|
1019
1019
|
if (e === 0) return n;
|
|
1020
|
-
var r =
|
|
1021
|
-
return
|
|
1020
|
+
var r = $t(t), i = W({}, r, { alpha: typeof r.alpha == "number" ? r.alpha : 1 }), a = $t(n), o = W({}, a, { alpha: typeof a.alpha == "number" ? a.alpha : 1 }), s = i.alpha - o.alpha, c = parseFloat(e) * 2 - 1, l = ((c * s === -1 ? c : c + s) / (1 + c * s) + 1) / 2, u = 1 - l;
|
|
1021
|
+
return K({
|
|
1022
1022
|
red: Math.floor(i.red * l + o.red * u),
|
|
1023
1023
|
green: Math.floor(i.green * l + o.green * u),
|
|
1024
1024
|
blue: Math.floor(i.blue * l + o.blue * u),
|
|
1025
1025
|
alpha: i.alpha * parseFloat(e) + o.alpha * (1 - parseFloat(e))
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
|
-
var
|
|
1029
|
-
function
|
|
1028
|
+
var Tn = q(wn);
|
|
1029
|
+
function En(e, t) {
|
|
1030
1030
|
if (t === "transparent") return t;
|
|
1031
|
-
var n =
|
|
1032
|
-
return
|
|
1031
|
+
var n = $t(t);
|
|
1032
|
+
return K(W({}, n, { alpha: vn(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 + parseFloat(e) * 100) / 100) }));
|
|
1033
1033
|
}
|
|
1034
|
-
q(
|
|
1035
|
-
function
|
|
1034
|
+
q(En);
|
|
1035
|
+
function Dn(e, t) {
|
|
1036
1036
|
if (t === "transparent") return t;
|
|
1037
|
-
var n =
|
|
1038
|
-
return
|
|
1037
|
+
var n = tn(t);
|
|
1038
|
+
return hn(W({}, n, { saturation: vn(0, 1, n.saturation + parseFloat(e)) }));
|
|
1039
1039
|
}
|
|
1040
|
-
q(
|
|
1041
|
-
function
|
|
1042
|
-
return t === "transparent" ? t :
|
|
1040
|
+
q(Dn);
|
|
1041
|
+
function On(e, t) {
|
|
1042
|
+
return t === "transparent" ? t : hn(W({}, tn(t), { hue: parseFloat(e) }));
|
|
1043
1043
|
}
|
|
1044
|
-
q(
|
|
1045
|
-
function
|
|
1046
|
-
return t === "transparent" ? t :
|
|
1044
|
+
q(On);
|
|
1045
|
+
function kn(e, t) {
|
|
1046
|
+
return t === "transparent" ? t : hn(W({}, tn(t), { lightness: parseFloat(e) }));
|
|
1047
1047
|
}
|
|
1048
|
-
q(
|
|
1049
|
-
function
|
|
1050
|
-
return t === "transparent" ? t :
|
|
1048
|
+
q(kn);
|
|
1049
|
+
function An(e, t) {
|
|
1050
|
+
return t === "transparent" ? t : hn(W({}, tn(t), { saturation: parseFloat(e) }));
|
|
1051
1051
|
}
|
|
1052
|
-
q(
|
|
1053
|
-
function
|
|
1054
|
-
return t === "transparent" ? t :
|
|
1052
|
+
q(An);
|
|
1053
|
+
function jn(e, t) {
|
|
1054
|
+
return t === "transparent" ? t : Tn(parseFloat(e), "rgb(0, 0, 0)", t);
|
|
1055
1055
|
}
|
|
1056
|
-
q(
|
|
1057
|
-
function
|
|
1058
|
-
return t === "transparent" ? t :
|
|
1056
|
+
q(jn);
|
|
1057
|
+
function Mn(e, t) {
|
|
1058
|
+
return t === "transparent" ? t : Tn(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1059
1059
|
}
|
|
1060
|
-
q(
|
|
1061
|
-
function
|
|
1060
|
+
q(Mn);
|
|
1061
|
+
function Nn(e, t) {
|
|
1062
1062
|
if (t === "transparent") return t;
|
|
1063
|
-
var n =
|
|
1064
|
-
return
|
|
1063
|
+
var n = $t(t);
|
|
1064
|
+
return K(W({}, n, { alpha: vn(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 - parseFloat(e) * 100).toFixed(2) / 100) }));
|
|
1065
1065
|
}
|
|
1066
|
-
q(
|
|
1066
|
+
q(Nn);
|
|
1067
1067
|
//#endregion
|
|
1068
1068
|
//#region src/theme/color.ts
|
|
1069
|
-
var
|
|
1069
|
+
var Pn = [
|
|
1070
1070
|
[
|
|
1071
1071
|
.41239079926595934,
|
|
1072
1072
|
.357584339383878,
|
|
@@ -1082,7 +1082,7 @@ var Cn = [
|
|
|
1082
1082
|
.11919477979462598,
|
|
1083
1083
|
.9505321522496607
|
|
1084
1084
|
]
|
|
1085
|
-
],
|
|
1085
|
+
], Fn = [
|
|
1086
1086
|
[
|
|
1087
1087
|
3.2409699419045226,
|
|
1088
1088
|
-1.537383177570094,
|
|
@@ -1098,7 +1098,7 @@ var Cn = [
|
|
|
1098
1098
|
-.20397695888897652,
|
|
1099
1099
|
1.0569715142428786
|
|
1100
1100
|
]
|
|
1101
|
-
],
|
|
1101
|
+
], In = [
|
|
1102
1102
|
[
|
|
1103
1103
|
.4865709486482162,
|
|
1104
1104
|
.26566769316909306,
|
|
@@ -1114,7 +1114,7 @@ var Cn = [
|
|
|
1114
1114
|
.04511338185890264,
|
|
1115
1115
|
1.043944368900976
|
|
1116
1116
|
]
|
|
1117
|
-
],
|
|
1117
|
+
], Ln = [
|
|
1118
1118
|
[
|
|
1119
1119
|
.819022437996703,
|
|
1120
1120
|
.3619062600528904,
|
|
@@ -1130,7 +1130,7 @@ var Cn = [
|
|
|
1130
1130
|
.2642395317527308,
|
|
1131
1131
|
.6335478284694309
|
|
1132
1132
|
]
|
|
1133
|
-
],
|
|
1133
|
+
], Rn = [
|
|
1134
1134
|
[
|
|
1135
1135
|
1.2268798758459243,
|
|
1136
1136
|
-.5578149944602171,
|
|
@@ -1146,7 +1146,7 @@ var Cn = [
|
|
|
1146
1146
|
-.4214933324022432,
|
|
1147
1147
|
1.5869240198367816
|
|
1148
1148
|
]
|
|
1149
|
-
],
|
|
1149
|
+
], zn = [
|
|
1150
1150
|
[
|
|
1151
1151
|
.210454268309314,
|
|
1152
1152
|
.7936177747023054,
|
|
@@ -1162,7 +1162,7 @@ var Cn = [
|
|
|
1162
1162
|
.7827717124575296,
|
|
1163
1163
|
-.8086757549230774
|
|
1164
1164
|
]
|
|
1165
|
-
],
|
|
1165
|
+
], Bn = [
|
|
1166
1166
|
[
|
|
1167
1167
|
1,
|
|
1168
1168
|
.3963377773761749,
|
|
@@ -1178,7 +1178,7 @@ var Cn = [
|
|
|
1178
1178
|
-.0894841775298119,
|
|
1179
1179
|
-1.2914855480194092
|
|
1180
1180
|
]
|
|
1181
|
-
],
|
|
1181
|
+
], Vn = [
|
|
1182
1182
|
[
|
|
1183
1183
|
1.0479297925449969,
|
|
1184
1184
|
.022946870601609652,
|
|
@@ -1194,7 +1194,7 @@ var Cn = [
|
|
|
1194
1194
|
.015055191490298152,
|
|
1195
1195
|
.7518742814281371
|
|
1196
1196
|
]
|
|
1197
|
-
],
|
|
1197
|
+
], Hn = [
|
|
1198
1198
|
[
|
|
1199
1199
|
.955473421488075,
|
|
1200
1200
|
-.02309845494876471,
|
|
@@ -1210,24 +1210,24 @@ var Cn = [
|
|
|
1210
1210
|
-.020507649298898964,
|
|
1211
1211
|
1.330365926242124
|
|
1212
1212
|
]
|
|
1213
|
-
],
|
|
1213
|
+
], Un = [
|
|
1214
1214
|
.3457 / .3585,
|
|
1215
1215
|
1,
|
|
1216
1216
|
.2958 / .3585
|
|
1217
|
-
],
|
|
1217
|
+
], Wn = .8 / 1e5, Gn = 216 / 24389, Kn = 24 / 116, qn = 24389 / 27, J = (e, [t, n, r]) => [
|
|
1218
1218
|
e[0][0] * t + e[0][1] * n + e[0][2] * r,
|
|
1219
1219
|
e[1][0] * t + e[1][1] * n + e[1][2] * r,
|
|
1220
1220
|
e[2][0] * t + e[2][1] * n + e[2][2] * r
|
|
1221
|
-
],
|
|
1221
|
+
], Jn = (e) => e.map((e) => {
|
|
1222
1222
|
let t = Math.abs(e);
|
|
1223
1223
|
return t <= .04045 ? e / 12.92 : Math.sign(e || 1) * ((t + .055) / 1.055) ** 2.4;
|
|
1224
|
-
}),
|
|
1224
|
+
}), Yn = (e) => e.map((e) => {
|
|
1225
1225
|
let t = Math.abs(e);
|
|
1226
1226
|
return t > .0031308 ? Math.sign(e || 1) * (1.055 * t ** (1 / 2.4) - .055) : 12.92 * e;
|
|
1227
1227
|
});
|
|
1228
|
-
function
|
|
1229
|
-
let [t, n, r] = J(
|
|
1230
|
-
return Math.abs(n) <
|
|
1228
|
+
function Xn(e) {
|
|
1229
|
+
let [t, n, r] = J(zn, J(Ln, e).map(Math.cbrt));
|
|
1230
|
+
return Math.abs(n) < Wn && Math.abs(r) < Wn ? [
|
|
1231
1231
|
t,
|
|
1232
1232
|
0,
|
|
1233
1233
|
null
|
|
@@ -1237,7 +1237,7 @@ function zn(e) {
|
|
|
1237
1237
|
(Math.atan2(r, n) * 180 / Math.PI % 360 + 360) % 360
|
|
1238
1238
|
];
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function Zn([e, t, n]) {
|
|
1241
1241
|
let r = Math.max(0, t), i = (n ?? 0) * Math.PI / 180;
|
|
1242
1242
|
return [
|
|
1243
1243
|
e,
|
|
@@ -1245,8 +1245,8 @@ function Bn([e, t, n]) {
|
|
|
1245
1245
|
r * Math.sin(i)
|
|
1246
1246
|
];
|
|
1247
1247
|
}
|
|
1248
|
-
var
|
|
1249
|
-
function
|
|
1248
|
+
var Qn = (e) => J(Rn, J(Bn, Zn(e)).map((e) => e ** 3)), $n = (e) => Xn(J(Pn, Jn(e))), er = (e) => Yn(J(Fn, Qn(e))), tr = (e) => Xn(J(In, Jn(e)));
|
|
1249
|
+
function nr(e) {
|
|
1250
1250
|
let t = e.replace(/^#/, ""), n = t.length <= 4 ? [...t].map((e) => e + e).join("") : t;
|
|
1251
1251
|
if (!/^(?:[0-9a-f]{6}|[0-9a-f]{8})$/i.test(n)) throw TypeError(`Expected a hex color, got ${e}`);
|
|
1252
1252
|
return [
|
|
@@ -1255,34 +1255,34 @@ function Gn(e) {
|
|
|
1255
1255
|
4
|
|
1256
1256
|
].map((e) => Number.parseInt(n.slice(e, e + 2), 16) / 255);
|
|
1257
1257
|
}
|
|
1258
|
-
var
|
|
1258
|
+
var rr = (e) => $n(nr(e));
|
|
1259
1259
|
function Y(e, t) {
|
|
1260
|
-
let [n, r, i] =
|
|
1260
|
+
let [n, r, i] = Zn(e), [a, o, s] = Zn(t);
|
|
1261
1261
|
return Math.sqrt((n - a) ** 2 + (r - o) ** 2 + (i - s) ** 2);
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
let [t, n, r] = J(
|
|
1263
|
+
function ir(e) {
|
|
1264
|
+
let [t, n, r] = J(Vn, Qn(e)).map((e, t) => e / Un[t]).map((e) => e > Gn ? Math.cbrt(e) : (qn * e + 16) / 116);
|
|
1265
1265
|
return [
|
|
1266
1266
|
116 * n - 16,
|
|
1267
1267
|
500 * (t - n),
|
|
1268
1268
|
200 * (n - r)
|
|
1269
1269
|
];
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function ar([e, t, n]) {
|
|
1272
1272
|
let r = (e + 16) / 116, i = t / 500 + r, a = r - n / 200;
|
|
1273
|
-
return
|
|
1274
|
-
(i >
|
|
1275
|
-
(e > 8 ? ((e + 16) / 116) ** 3 : e /
|
|
1276
|
-
(a >
|
|
1273
|
+
return Xn(J(Hn, [
|
|
1274
|
+
(i > Kn ? i ** 3 : (116 * i - 16) / qn) * Un[0],
|
|
1275
|
+
(e > 8 ? ((e + 16) / 116) ** 3 : e / qn) * Un[1],
|
|
1276
|
+
(a > Kn ? a ** 3 : (116 * a - 16) / qn) * Un[2]
|
|
1277
1277
|
]));
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1280
|
-
let r =
|
|
1281
|
-
return
|
|
1279
|
+
function or(e, t, n) {
|
|
1280
|
+
let r = ir(e), i = ir(t);
|
|
1281
|
+
return ar(r.map((e, t) => e + (i[t] - e) * n));
|
|
1282
1282
|
}
|
|
1283
|
-
var
|
|
1284
|
-
function
|
|
1285
|
-
let t = .02, n = 1e-4, r =
|
|
1283
|
+
var sr = (e, t) => e.every((e) => e >= -t && e <= 1 + t), cr = (e) => e.map((e) => Math.min(1, Math.max(0, e)));
|
|
1284
|
+
function lr(e) {
|
|
1285
|
+
let t = .02, n = 1e-4, r = $n(e);
|
|
1286
1286
|
if (r[0] >= 1) return [
|
|
1287
1287
|
1,
|
|
1288
1288
|
1,
|
|
@@ -1293,31 +1293,31 @@ function Qn(e) {
|
|
|
1293
1293
|
0,
|
|
1294
1294
|
0
|
|
1295
1295
|
];
|
|
1296
|
-
if (
|
|
1297
|
-
let i = [...r], a = 0, o = r[1], s = !0, c =
|
|
1296
|
+
if (sr(er(r), 0)) return er(r);
|
|
1297
|
+
let i = [...r], a = 0, o = r[1], s = !0, c = cr(er(i)), l = Y($n(c), i);
|
|
1298
1298
|
if (l < t) return c;
|
|
1299
1299
|
for (; o - a > n;) {
|
|
1300
1300
|
let e = (a + o) / 2;
|
|
1301
|
-
if (i[1] = e, s &&
|
|
1302
|
-
else if (c =
|
|
1301
|
+
if (i[1] = e, s && sr(er(i), 0)) a = e;
|
|
1302
|
+
else if (c = cr(er(i)), l = Y($n(c), i), l < t) {
|
|
1303
1303
|
if (t - l < n) break;
|
|
1304
1304
|
s = !1, a = e;
|
|
1305
1305
|
} else o = e;
|
|
1306
1306
|
}
|
|
1307
1307
|
return c;
|
|
1308
1308
|
}
|
|
1309
|
-
var
|
|
1310
|
-
function
|
|
1311
|
-
return `#${(
|
|
1309
|
+
var ur = (e) => Math.round(e * 255).toString(16).padStart(2, "0");
|
|
1310
|
+
function dr(e, t = 1) {
|
|
1311
|
+
return `#${(sr(e, 75e-6) ? e : lr(e)).map(ur).join("")}${t < 1 ? ur(t) : ""}`;
|
|
1312
1312
|
}
|
|
1313
|
-
var
|
|
1313
|
+
var fr = (e) => dr(er(e)), pr = [
|
|
1314
1314
|
"gray",
|
|
1315
1315
|
"mauve",
|
|
1316
1316
|
"slate",
|
|
1317
1317
|
"sage",
|
|
1318
1318
|
"olive",
|
|
1319
1319
|
"sand"
|
|
1320
|
-
],
|
|
1320
|
+
], mr = {
|
|
1321
1321
|
gray: [
|
|
1322
1322
|
988,
|
|
1323
1323
|
988,
|
|
@@ -2420,42 +2420,42 @@ var tr = (e) => er(Un(e)), nr = [
|
|
|
2420
2420
|
208,
|
|
2421
2421
|
145
|
|
2422
2422
|
]
|
|
2423
|
-
},
|
|
2424
|
-
function
|
|
2425
|
-
return
|
|
2423
|
+
}, hr = "#8B8D98", gr = "#ffffff", _r = kt(0, 2, 0, 2), vr;
|
|
2424
|
+
function yr() {
|
|
2425
|
+
return vr ??= Object.fromEntries(Object.entries(mr).map(([e, t]) => [e, Array.from({ length: 12 }, (e, n) => tr([
|
|
2426
2426
|
t[n * 3] / 1e3,
|
|
2427
2427
|
t[n * 3 + 1] / 1e3,
|
|
2428
2428
|
t[n * 3 + 2] / 1e3
|
|
2429
|
-
]))])),
|
|
2429
|
+
]))])), vr;
|
|
2430
2430
|
}
|
|
2431
|
-
var
|
|
2432
|
-
function
|
|
2433
|
-
let { red: t, green: n, blue: r } =
|
|
2431
|
+
var br = (e) => e[1];
|
|
2432
|
+
function xr(e) {
|
|
2433
|
+
let { red: t, green: n, blue: r } = $t(e);
|
|
2434
2434
|
return [
|
|
2435
2435
|
t / 255,
|
|
2436
2436
|
n / 255,
|
|
2437
2437
|
r / 255
|
|
2438
2438
|
];
|
|
2439
2439
|
}
|
|
2440
|
-
function
|
|
2440
|
+
function Sr(e, t) {
|
|
2441
2441
|
let n = t.length - 1, r = t[0] - e;
|
|
2442
|
-
return t.map((e, t) => e - r *
|
|
2442
|
+
return t.map((e, t) => e - r * _r(1 - t / n));
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function Cr(e, t) {
|
|
2445
2445
|
let n = Object.entries(t).flatMap(([t, n]) => n.map((n) => ({
|
|
2446
2446
|
scale: t,
|
|
2447
2447
|
color: n,
|
|
2448
2448
|
distance: Y(e, n)
|
|
2449
2449
|
}))).sort((e, t) => e.distance - t.distance).filter((e, t, n) => t === n.findIndex((t) => t.scale === e.scale));
|
|
2450
|
-
if (!n.every((e) =>
|
|
2451
|
-
let r = n[0], i = n[1], a = i.distance, o = r.distance, s = Y(r.color, i.color), c = (o ** 2 + s ** 2 - a ** 2) / (2 * o * s), l = (a ** 2 + s ** 2 - o ** 2) / (2 * a * s), u = c / Math.sin(Math.acos(c)), d = l / Math.sin(Math.acos(l)), f = Math.max(0, u / d) * .5, p = t[i.scale], m = t[r.scale].map((e, t) =>
|
|
2450
|
+
if (!n.every((e) => pr.includes(e.scale)) && pr.includes(n[0].scale)) for (; pr.includes(n[1].scale);) n.splice(1, 1);
|
|
2451
|
+
let r = n[0], i = n[1], a = i.distance, o = r.distance, s = Y(r.color, i.color), c = (o ** 2 + s ** 2 - a ** 2) / (2 * o * s), l = (a ** 2 + s ** 2 - o ** 2) / (2 * a * s), u = c / Math.sin(Math.acos(c)), d = l / Math.sin(Math.acos(l)), f = Math.max(0, u / d) * .5, p = t[i.scale], m = t[r.scale].map((e, t) => or(e, p[t], f)), h = [...m].sort((t, n) => Y(e, t) - Y(e, n))[0], g = br(e) / br(h), _ = Sr(Math.max(0, Math.min(1, rr(gr)[0])), [1, ...m.map((e) => e[0])]).slice(1);
|
|
2452
2452
|
return m.map((t, n) => [
|
|
2453
2453
|
_[n],
|
|
2454
|
-
Number.isFinite(g) ? Math.min(
|
|
2454
|
+
Number.isFinite(g) ? Math.min(br(e) * 1.5, br(t) * g) : br(e),
|
|
2455
2455
|
e[2]
|
|
2456
2456
|
]);
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function wr(e, t) {
|
|
2459
2459
|
let [n, r] = e, i = [
|
|
2460
2460
|
n > .4 ? n - .03 / (n + .1) : n + .03 / (n + .1),
|
|
2461
2461
|
n > .4 ? r * .93 : r,
|
|
@@ -2467,30 +2467,30 @@ function pr(e, t) {
|
|
|
2467
2467
|
a[2]
|
|
2468
2468
|
];
|
|
2469
2469
|
}
|
|
2470
|
-
var
|
|
2471
|
-
function
|
|
2472
|
-
let n =
|
|
2470
|
+
var Tr = (e, t, n) => Math.round(n * (1 - t)) + Math.round(e * t);
|
|
2471
|
+
function Er(e, t) {
|
|
2472
|
+
let n = nr(e).map((e) => Math.round(e * 255)), r = nr(t).map((e) => Math.round(e * 255)), i = n.some((e, t) => e > r[t]) ? 255 : 0, a = n.map((e, t) => (e - r[t]) / (i - r[t]));
|
|
2473
2473
|
if (a.every((e) => e === a[0])) {
|
|
2474
2474
|
let e = i / 255;
|
|
2475
|
-
return
|
|
2475
|
+
return dr([
|
|
2476
2476
|
e,
|
|
2477
2477
|
e,
|
|
2478
2478
|
e
|
|
2479
2479
|
], a[0]);
|
|
2480
2480
|
}
|
|
2481
2481
|
let o = (e) => Number.isNaN(e) ? 0 : Math.min(255, Math.max(0, e)), s = o(Math.ceil(Math.max(...a) * 255)) / 255;
|
|
2482
|
-
return
|
|
2483
|
-
let n = r[t], a = Math.ceil(o((n * (1 - s) - e) / s * -1)), c =
|
|
2482
|
+
return dr(n.map((e, t) => {
|
|
2483
|
+
let n = r[t], a = Math.ceil(o((n * (1 - s) - e) / s * -1)), c = Tr(a, s, n);
|
|
2484
2484
|
return !(i === 0 ? e <= n : e >= n) || e === c ? a / 255 : (e > c ? a + 1 : a - 1) / 255;
|
|
2485
2485
|
}), s);
|
|
2486
2486
|
}
|
|
2487
|
-
var
|
|
2488
|
-
function
|
|
2489
|
-
let t =
|
|
2487
|
+
var Dr = /* @__PURE__ */ new Map(), Or = 100;
|
|
2488
|
+
function kr(e) {
|
|
2489
|
+
let t = Dr.get(e);
|
|
2490
2490
|
if (t) return t;
|
|
2491
|
-
let n =
|
|
2492
|
-
o[8] = s, o[9] =
|
|
2493
|
-
let c = Math.max(
|
|
2491
|
+
let n = yr(), r = xr(e), i = $n(r), a = fr(i), o = a === "#000000" || a === "#ffffff" ? Cr(rr(hr), Object.fromEntries(Object.entries(n).filter(([e]) => pr.includes(e)))) : Cr(i, n), s = Y(i, o[0]) * 100 < 25 ? o[8] : i;
|
|
2492
|
+
o[8] = s, o[9] = wr(s, o);
|
|
2493
|
+
let c = Math.max(br(s), br(o[7]));
|
|
2494
2494
|
for (let e of [10, 11]) {
|
|
2495
2495
|
let [t, n, r] = o[e];
|
|
2496
2496
|
o[e] = [
|
|
@@ -2499,27 +2499,27 @@ function vr(e) {
|
|
|
2499
2499
|
r
|
|
2500
2500
|
];
|
|
2501
2501
|
}
|
|
2502
|
-
let l = o.map(
|
|
2503
|
-
l[8] = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(e) ? e :
|
|
2502
|
+
let l = o.map(fr);
|
|
2503
|
+
l[8] = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(e) ? e : dr(r);
|
|
2504
2504
|
let u = {
|
|
2505
2505
|
solid: l,
|
|
2506
|
-
alpha: l.map((e) =>
|
|
2506
|
+
alpha: l.map((e) => Er(e, gr))
|
|
2507
2507
|
};
|
|
2508
|
-
return
|
|
2508
|
+
return Dr.size >= Or && Dr.delete(Dr.keys().next().value), Dr.set(e, u), u;
|
|
2509
2509
|
}
|
|
2510
2510
|
//#endregion
|
|
2511
2511
|
//#region src/theme/utils.ts
|
|
2512
|
-
function
|
|
2512
|
+
function Ar(e) {
|
|
2513
2513
|
try {
|
|
2514
|
-
return
|
|
2514
|
+
return kr(e);
|
|
2515
2515
|
} catch {
|
|
2516
2516
|
return;
|
|
2517
2517
|
}
|
|
2518
2518
|
}
|
|
2519
|
-
function
|
|
2520
|
-
let t =
|
|
2519
|
+
function jr(e = {}) {
|
|
2520
|
+
let t = U({}, ve, e), n = e.colors?.brand?.base ?? e.colors?.primary?.main, r;
|
|
2521
2521
|
n && (t.colors.primary.main = n, t.colors.primary.dark = n);
|
|
2522
|
-
let i = n ?
|
|
2522
|
+
let i = n ? Ar(n) : void 0;
|
|
2523
2523
|
if (i) {
|
|
2524
2524
|
let { solid: e, alpha: n } = i, a = (t) => e[t - 1];
|
|
2525
2525
|
t.colors.primary.ultraDark = a(12), t.colors.primary.toku = a(10), t.colors.primary.light1 = a(7), t.colors.primary.light2 = a(4), t.colors.primary.light3 = a(3), t.colors.primary.light4 = a(2), t.colors.primary.light5 = a(1);
|
|
@@ -2534,29 +2534,29 @@ function br(e = {}) {
|
|
|
2534
2534
|
}
|
|
2535
2535
|
//#endregion
|
|
2536
2536
|
//#region src/composables/theme.ts
|
|
2537
|
-
var
|
|
2538
|
-
let e =
|
|
2539
|
-
return r(() => e?.value ??
|
|
2540
|
-
},
|
|
2537
|
+
var Mr = Symbol("theme"), X = () => {
|
|
2538
|
+
let e = m(Mr, void 0);
|
|
2539
|
+
return r(() => e?.value ?? ve);
|
|
2540
|
+
}, Nr = /* @__PURE__ */ d({
|
|
2541
2541
|
__name: "TChip",
|
|
2542
2542
|
props: { variant: { default: "default" } },
|
|
2543
2543
|
setup(e) {
|
|
2544
|
-
|
|
2545
|
-
v3457cee4:
|
|
2546
|
-
v38cf7840:
|
|
2547
|
-
v2d9fac57:
|
|
2548
|
-
v4320e4fd:
|
|
2544
|
+
ne((e) => ({
|
|
2545
|
+
v3457cee4: j(n).colors.gray.dark3,
|
|
2546
|
+
v38cf7840: j(n).colors.background,
|
|
2547
|
+
v2d9fac57: j(n).colors.primary.main,
|
|
2548
|
+
v4320e4fd: j(n).colors.primary.light5
|
|
2549
2549
|
}));
|
|
2550
2550
|
let t = e, n = X();
|
|
2551
|
-
return (e, n) => (
|
|
2551
|
+
return (e, n) => (w(), s("div", { class: y(["t-chip", [`t-chip--${t.variant}`]]) }, [k(e.$slots, "default", {}, void 0, !0)], 2));
|
|
2552
2552
|
}
|
|
2553
2553
|
}), Z = (e, t) => {
|
|
2554
2554
|
let n = e.__vccOpts || e;
|
|
2555
2555
|
for (let [e, r] of t) n[e] = r;
|
|
2556
2556
|
return n;
|
|
2557
|
-
},
|
|
2558
|
-
let t = X(), n = r(() =>
|
|
2559
|
-
return r(() =>
|
|
2557
|
+
}, Pr = /* @__PURE__ */ Z(Nr, [["__scopeId", "data-v-519905d4"]]), Fr = (e) => yt(e), Ir = (e) => {
|
|
2558
|
+
let t = X(), n = r(() => Fr(e.value)), i = r(() => n.value === "primary" ? t.value.colors.primary.toku : bn(.15, t.value.colors[n.value])), a = r(() => n.value === "primary" ? t.value.colors.primary.main : t.value.colors[n.value]), o = r(() => n.value === "primary" ? t.value.colors.primary.light1 : Cn(.15, t.value.colors[n.value])), s = r(() => n.value === "primary" ? t.value.colors.primary.light2 : Cn(.2, t.value.colors[n.value])), c = r(() => n.value === "primary" ? t.value.colors.primary.light3 : Cn(.25, t.value.colors[n.value]));
|
|
2559
|
+
return r(() => L({
|
|
2560
2560
|
"&, *": {
|
|
2561
2561
|
margin: 0,
|
|
2562
2562
|
padding: 0,
|
|
@@ -2649,12 +2649,12 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2649
2649
|
"&--tertiary:disabled &__spinner": { color: t.value.colors.gray.medium1 },
|
|
2650
2650
|
"&--secondary &__spinner, &--tertiary &__spinner": { color: a.value }
|
|
2651
2651
|
}));
|
|
2652
|
-
},
|
|
2652
|
+
}, Lr = {
|
|
2653
2653
|
variant: "primary",
|
|
2654
2654
|
size: "medium",
|
|
2655
2655
|
type: "button",
|
|
2656
2656
|
color: "primary"
|
|
2657
|
-
},
|
|
2657
|
+
}, Rr = /* @__PURE__ */ d({
|
|
2658
2658
|
name: "TButton",
|
|
2659
2659
|
props: {
|
|
2660
2660
|
variant: String,
|
|
@@ -2669,7 +2669,7 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2669
2669
|
},
|
|
2670
2670
|
emits: ["click"],
|
|
2671
2671
|
setup(e, { attrs: t, slots: n, emit: i }) {
|
|
2672
|
-
let a = r(() =>
|
|
2672
|
+
let a = r(() => U({}, Lr, e, t)), o = Ir(r(() => a.value.color)), s = X(), c = r(() => [
|
|
2673
2673
|
o.value,
|
|
2674
2674
|
`${o.value}--${a.value.variant}`,
|
|
2675
2675
|
`${o.value}--${a.value.size}`,
|
|
@@ -2680,22 +2680,22 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2680
2680
|
]), l = () => {
|
|
2681
2681
|
a.value.loading || i("click");
|
|
2682
2682
|
};
|
|
2683
|
-
return () => u("button",
|
|
2683
|
+
return () => u("button", _({
|
|
2684
2684
|
class: c.value,
|
|
2685
2685
|
type: a.value.type,
|
|
2686
2686
|
disabled: a.value.disabled,
|
|
2687
2687
|
onClick: l
|
|
2688
2688
|
}, t), [
|
|
2689
|
-
a.value.leftIcon && u(
|
|
2689
|
+
a.value.leftIcon && u(I, { icon: `${s.value.iconSet}:${a.value.leftIcon}` }, null),
|
|
2690
2690
|
n.default?.(),
|
|
2691
|
-
a.value.rightIcon && u(
|
|
2692
|
-
a.value.loading && u(
|
|
2691
|
+
a.value.rightIcon && u(I, { icon: `${s.value.iconSet}:${a.value.rightIcon}` }, null),
|
|
2692
|
+
a.value.loading && u(I, {
|
|
2693
2693
|
class: `${o.value}__spinner`,
|
|
2694
2694
|
icon: "svg-spinners:90-ring-with-bg"
|
|
2695
2695
|
}, null)
|
|
2696
2696
|
]);
|
|
2697
2697
|
}
|
|
2698
|
-
}),
|
|
2698
|
+
}), zr = {
|
|
2699
2699
|
color: "#000",
|
|
2700
2700
|
size: "medium",
|
|
2701
2701
|
variant: "outline"
|
|
@@ -2711,7 +2711,7 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2711
2711
|
variant: String
|
|
2712
2712
|
},
|
|
2713
2713
|
setup(e, { attrs: t }) {
|
|
2714
|
-
let n = r(() =>
|
|
2714
|
+
let n = r(() => U({}, zr, e, t)), i = X(), a = r(() => Ee(i.value.colors, n.value.color) || n.value.color), o = r(() => `${i.value.iconSet}:${n.value.icon}${n.value.variant === "solid" ? "-solid" : ""}`), s = {
|
|
2715
2715
|
miniature: "6px",
|
|
2716
2716
|
"extra-small": "10px",
|
|
2717
2717
|
small: "16px",
|
|
@@ -2720,16 +2720,16 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2720
2720
|
"extra-large": "28px",
|
|
2721
2721
|
huge: "44px"
|
|
2722
2722
|
}, c = r(() => s[n.value.size]);
|
|
2723
|
-
return () => u(
|
|
2723
|
+
return () => u(I, _({
|
|
2724
2724
|
icon: o.value,
|
|
2725
2725
|
color: a.value,
|
|
2726
2726
|
height: c.value,
|
|
2727
2727
|
width: c.value
|
|
2728
2728
|
}, t), null);
|
|
2729
2729
|
}
|
|
2730
|
-
}),
|
|
2730
|
+
}), Br = () => {
|
|
2731
2731
|
let e = X();
|
|
2732
|
-
return r(() =>
|
|
2732
|
+
return r(() => L({
|
|
2733
2733
|
"&, *": {
|
|
2734
2734
|
margin: 0,
|
|
2735
2735
|
boxSizing: "border-box"
|
|
@@ -2788,37 +2788,37 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2788
2788
|
"&--default > &__status-indicator": { background: e.value.colors.gray.medium1 },
|
|
2789
2789
|
"&--success": {
|
|
2790
2790
|
color: e.value.colors.success,
|
|
2791
|
-
background:
|
|
2791
|
+
background: K(e.value.colors.success, .1)
|
|
2792
2792
|
},
|
|
2793
2793
|
"&--success > &__text": { color: e.value.colors.success },
|
|
2794
2794
|
"&--success > &__status-indicator": { background: e.value.colors.success },
|
|
2795
|
-
"&--in-process": { background:
|
|
2795
|
+
"&--in-process": { background: K(e.value.colors.inProcess, .1) },
|
|
2796
2796
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
2797
2797
|
"&--in-process > &__status-indicator": { background: e.value.colors.inProcessDark },
|
|
2798
|
-
"&--pending": { background:
|
|
2798
|
+
"&--pending": { background: K(e.value.colors.info, .1) },
|
|
2799
2799
|
"&--pending > &__text": { color: e.value.colors.info },
|
|
2800
2800
|
"&--pending > &__status-indicator": { background: e.value.colors.info },
|
|
2801
|
-
"&--toku": { background:
|
|
2801
|
+
"&--toku": { background: K(e.value.colors.primary.light4, 1) },
|
|
2802
2802
|
"&--toku > &__text": { color: e.value.colors.primary.main },
|
|
2803
2803
|
"&--toku > &__status-indicator": { background: e.value.colors.primary.main },
|
|
2804
2804
|
"&--error": {
|
|
2805
2805
|
color: e.value.colors.error,
|
|
2806
|
-
background:
|
|
2806
|
+
background: K(e.value.colors.error, .1)
|
|
2807
2807
|
},
|
|
2808
2808
|
"&--error > &__text": { color: e.value.colors.error },
|
|
2809
2809
|
"&--error > &__status-indicator": { background: e.value.colors.error }
|
|
2810
2810
|
}));
|
|
2811
|
-
},
|
|
2811
|
+
}, Vr = {
|
|
2812
2812
|
size: "medium",
|
|
2813
2813
|
variant: "default"
|
|
2814
|
-
},
|
|
2814
|
+
}, Hr = /* @__PURE__ */ d({
|
|
2815
2815
|
name: "TTag",
|
|
2816
2816
|
props: {
|
|
2817
2817
|
size: String,
|
|
2818
2818
|
variant: String
|
|
2819
2819
|
},
|
|
2820
2820
|
setup(e, { slots: t }) {
|
|
2821
|
-
let n = r(() =>
|
|
2821
|
+
let n = r(() => U({}, Vr, e)), i = Br(), a = r(() => [
|
|
2822
2822
|
i.value,
|
|
2823
2823
|
`${i.value}--${n.value.variant}`,
|
|
2824
2824
|
`${i.value}--${n.value.size}`
|
|
@@ -2831,13 +2831,13 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2831
2831
|
class: `${i.value}__text ${i.value}__text--${n.value.size}`
|
|
2832
2832
|
}, [t.default?.()])]);
|
|
2833
2833
|
}
|
|
2834
|
-
}),
|
|
2834
|
+
}), Ur = ["data-borderless", "disabled"], Wr = ["data-media"], Gr = { class: "t-card-button__text" }, Kr = { class: "t-card-button__title" }, qr = {
|
|
2835
2835
|
key: 0,
|
|
2836
2836
|
class: "t-card-button__subtitle"
|
|
2837
|
-
},
|
|
2837
|
+
}, Jr = {
|
|
2838
2838
|
key: 1,
|
|
2839
2839
|
class: "t-card-button__tag"
|
|
2840
|
-
},
|
|
2840
|
+
}, Yr = { class: "t-card-button__trailing" }, Xr = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
2841
2841
|
name: "TCardButton",
|
|
2842
2842
|
__name: "TCardButton",
|
|
2843
2843
|
props: {
|
|
@@ -2849,33 +2849,33 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2849
2849
|
disabled: { type: Boolean }
|
|
2850
2850
|
},
|
|
2851
2851
|
setup(e) {
|
|
2852
|
-
return (t, n) => (
|
|
2852
|
+
return (t, n) => (w(), s("button", {
|
|
2853
2853
|
type: "button",
|
|
2854
2854
|
class: "t-card-button",
|
|
2855
2855
|
"data-borderless": e.borderless || void 0,
|
|
2856
2856
|
disabled: e.disabled
|
|
2857
2857
|
}, [
|
|
2858
|
-
t.$slots.icon || t.$slots.image ? (
|
|
2858
|
+
t.$slots.icon || t.$slots.image ? (w(), s("div", {
|
|
2859
2859
|
key: 0,
|
|
2860
2860
|
class: "t-card-button__media",
|
|
2861
2861
|
"data-media": t.$slots.icon ? "icon" : "image"
|
|
2862
|
-
}, [t.$slots.icon ?
|
|
2863
|
-
c("div",
|
|
2864
|
-
e.tag || t.$slots.tag ? (
|
|
2862
|
+
}, [t.$slots.icon ? k(t.$slots, "icon", { key: 0 }, void 0, !0) : k(t.$slots, "image", { key: 1 }, void 0, !0)], 8, Wr)) : o("", !0),
|
|
2863
|
+
c("div", Gr, [k(t.$slots, "title", {}, () => [c("p", Kr, A(e.title), 1)], !0), e.subtitle ? (w(), s("p", qr, A(e.subtitle), 1)) : o("", !0)]),
|
|
2864
|
+
e.tag || t.$slots.tag ? (w(), s("span", Jr, [k(t.$slots, "tag", {}, () => [u(j(Hr), {
|
|
2865
2865
|
size: "small",
|
|
2866
2866
|
variant: e.tagVariant
|
|
2867
2867
|
}, {
|
|
2868
|
-
default:
|
|
2868
|
+
default: F(() => [l(A(e.tag), 1)]),
|
|
2869
2869
|
_: 1
|
|
2870
2870
|
}, 8, ["variant"])], !0)])) : o("", !0),
|
|
2871
|
-
c("span",
|
|
2871
|
+
c("span", Yr, [k(t.$slots, "trailing", {}, () => [u(j(Q), {
|
|
2872
2872
|
icon: "chevron-right",
|
|
2873
2873
|
size: "small",
|
|
2874
2874
|
color: "currentColor"
|
|
2875
2875
|
})], !0)])
|
|
2876
|
-
], 8,
|
|
2876
|
+
], 8, Ur));
|
|
2877
2877
|
}
|
|
2878
|
-
}), [["__scopeId", "data-v-b2bdf7ca"]]),
|
|
2878
|
+
}), [["__scopeId", "data-v-b2bdf7ca"]]), Zr = () => {
|
|
2879
2879
|
let e = X(), t = e.value.colors.gray.light1, n = (e, t) => {
|
|
2880
2880
|
switch (t) {
|
|
2881
2881
|
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">
|
|
@@ -2887,7 +2887,7 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2887
2887
|
default: return "";
|
|
2888
2888
|
}
|
|
2889
2889
|
};
|
|
2890
|
-
return r(() =>
|
|
2890
|
+
return r(() => L({
|
|
2891
2891
|
"&, *": {
|
|
2892
2892
|
margin: 0,
|
|
2893
2893
|
padding: 0,
|
|
@@ -2972,10 +2972,10 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2972
2972
|
}
|
|
2973
2973
|
}
|
|
2974
2974
|
}));
|
|
2975
|
-
},
|
|
2975
|
+
}, Qr = () => `checkbox-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`, $r = {
|
|
2976
2976
|
size: "large",
|
|
2977
2977
|
value: !1
|
|
2978
|
-
},
|
|
2978
|
+
}, ei = /* @__PURE__ */ d({
|
|
2979
2979
|
name: "TCheckbox",
|
|
2980
2980
|
props: {
|
|
2981
2981
|
labelPosition: String,
|
|
@@ -2991,12 +2991,12 @@ var xr = Symbol("theme"), X = () => {
|
|
|
2991
2991
|
"update:modelValue"
|
|
2992
2992
|
],
|
|
2993
2993
|
setup(e, { attrs: t, slots: n, emit: i }) {
|
|
2994
|
-
let a =
|
|
2994
|
+
let a = Qr(), o = r(() => U({}, $r, e, t, { id: e.id ?? t.id ?? a })), s = Zr(), c = r(() => [s.value, `${s.value}--${o.value.size}`]), l = r(() => [
|
|
2995
2995
|
s.value,
|
|
2996
2996
|
`${s.value}--${o.value.size}`,
|
|
2997
2997
|
{ [`${s.value}--disabled`]: o.value.disabled }
|
|
2998
|
-
]), d =
|
|
2999
|
-
|
|
2998
|
+
]), d = E(o.value.modelValue || o.value.value);
|
|
2999
|
+
P([() => o.value.modelValue, () => o.value.value], () => {
|
|
3000
3000
|
d.value = o.value.modelValue || o.value.value;
|
|
3001
3001
|
});
|
|
3002
3002
|
let f = () => {
|
|
@@ -3007,7 +3007,7 @@ var xr = Symbol("theme"), X = () => {
|
|
|
3007
3007
|
for: o.value.id,
|
|
3008
3008
|
class: l.value
|
|
3009
3009
|
}, [n.default()]),
|
|
3010
|
-
u("input",
|
|
3010
|
+
u("input", _({
|
|
3011
3011
|
id: o.value.id,
|
|
3012
3012
|
type: "checkbox",
|
|
3013
3013
|
class: c.value.map((e) => `${e}__input`),
|
|
@@ -3021,9 +3021,9 @@ var xr = Symbol("theme"), X = () => {
|
|
|
3021
3021
|
}, [n.default()])
|
|
3022
3022
|
]);
|
|
3023
3023
|
}
|
|
3024
|
-
}),
|
|
3024
|
+
}), ti = (e) => {
|
|
3025
3025
|
let t = X();
|
|
3026
|
-
return r(() =>
|
|
3026
|
+
return r(() => L({
|
|
3027
3027
|
"&, *": {
|
|
3028
3028
|
margin: 0,
|
|
3029
3029
|
boxSizing: "border-box"
|
|
@@ -3089,7 +3089,7 @@ var xr = Symbol("theme"), X = () => {
|
|
|
3089
3089
|
marginBlock: "0.5rem"
|
|
3090
3090
|
}
|
|
3091
3091
|
}));
|
|
3092
|
-
},
|
|
3092
|
+
}, ni = () => r(() => L({
|
|
3093
3093
|
position: "fixed",
|
|
3094
3094
|
display: "none",
|
|
3095
3095
|
padding: "0.625rem",
|
|
@@ -3118,21 +3118,21 @@ var xr = Symbol("theme"), X = () => {
|
|
|
3118
3118
|
borderTopRightRadius: "0.5rem",
|
|
3119
3119
|
borderBottomLeftRadius: "0"
|
|
3120
3120
|
}
|
|
3121
|
-
})),
|
|
3121
|
+
})), ri = (e) => {
|
|
3122
3122
|
let t = [];
|
|
3123
3123
|
return e?.forEach((e) => {
|
|
3124
|
-
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
3124
|
+
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...ri(e.children));
|
|
3125
3125
|
}), t;
|
|
3126
3126
|
};
|
|
3127
3127
|
//#endregion
|
|
3128
3128
|
//#region src/components/TDropdown/TDropdown.tsx
|
|
3129
|
-
function
|
|
3130
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
3129
|
+
function ii(e) {
|
|
3130
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
3131
3131
|
}
|
|
3132
|
-
var
|
|
3132
|
+
var ai = {
|
|
3133
3133
|
size: "small",
|
|
3134
3134
|
position: "center"
|
|
3135
|
-
},
|
|
3135
|
+
}, oi = /* @__PURE__ */ d({
|
|
3136
3136
|
name: "TDropdown",
|
|
3137
3137
|
props: {
|
|
3138
3138
|
open: Boolean,
|
|
@@ -3143,7 +3143,7 @@ var Jr = {
|
|
|
3143
3143
|
},
|
|
3144
3144
|
emits: ["cancel"],
|
|
3145
3145
|
setup(e, { slots: n, attrs: i, emit: a }) {
|
|
3146
|
-
let o = r(() =>
|
|
3146
|
+
let o = r(() => U({}, ai, e, i)), s = E(null), c = E(null), l = E(null), d = E({
|
|
3147
3147
|
top: 0,
|
|
3148
3148
|
left: 0
|
|
3149
3149
|
}), f = () => {
|
|
@@ -3180,7 +3180,7 @@ var Jr = {
|
|
|
3180
3180
|
top: r,
|
|
3181
3181
|
left: i
|
|
3182
3182
|
};
|
|
3183
|
-
}, p =
|
|
3183
|
+
}, p = ni(), m = r(() => [
|
|
3184
3184
|
p.value,
|
|
3185
3185
|
`${p.value}--${o.value.size}`,
|
|
3186
3186
|
`${p.value}--${o.value.position}`,
|
|
@@ -3189,7 +3189,7 @@ var Jr = {
|
|
|
3189
3189
|
top: `${d.value.top}px`,
|
|
3190
3190
|
left: `${d.value.left}px`,
|
|
3191
3191
|
width: o.value.fullWidth ? `${c.value?.clientWidth}px` : void 0
|
|
3192
|
-
})), g =
|
|
3192
|
+
})), g = ti(r(() => l.value?.clientHeight ?? 0)), _ = r(() => [
|
|
3193
3193
|
g.value,
|
|
3194
3194
|
`${g.value}--${o.value.size}`,
|
|
3195
3195
|
`${g.value}--${o.value.position}`,
|
|
@@ -3208,7 +3208,7 @@ var Jr = {
|
|
|
3208
3208
|
t && t.focus();
|
|
3209
3209
|
}
|
|
3210
3210
|
};
|
|
3211
|
-
o.value.attachToBody &&
|
|
3211
|
+
o.value.attachToBody && P([
|
|
3212
3212
|
() => o.value.open,
|
|
3213
3213
|
() => o.value.position,
|
|
3214
3214
|
() => o.value.size,
|
|
@@ -3216,29 +3216,29 @@ var Jr = {
|
|
|
3216
3216
|
l
|
|
3217
3217
|
], () => {
|
|
3218
3218
|
f(), o.value.open && l.value ? c.value?.addEventListener("keydown", b) : c.value?.removeEventListener("keydown", b);
|
|
3219
|
-
}, { immediate: !0 }),
|
|
3219
|
+
}, { immediate: !0 }), S(() => {
|
|
3220
3220
|
o.value.attachToBody && (window.addEventListener("scroll", f), window.addEventListener("resize", f)), document.addEventListener("click", v), document.addEventListener("keydown", y);
|
|
3221
|
-
}),
|
|
3221
|
+
}), C(() => {
|
|
3222
3222
|
o.value.attachToBody && (window.removeEventListener("scroll", f), window.removeEventListener("resize", f)), document.removeEventListener("click", v), document.removeEventListener("keydown", y);
|
|
3223
3223
|
});
|
|
3224
|
-
let
|
|
3224
|
+
let x = r(() => ri(n.default?.() || [])), w = () => u("div", {
|
|
3225
3225
|
ref: l,
|
|
3226
3226
|
class: o.value.attachToBody ? m.value : `${g.value}__menu`,
|
|
3227
3227
|
style: o.value.attachToBody ? h.value : void 0,
|
|
3228
3228
|
role: "menu",
|
|
3229
3229
|
tabindex: o.value.attachToBody ? 0 : void 0
|
|
3230
|
-
}, [
|
|
3230
|
+
}, [x.value.map((e, t, n) => u("div", { key: t }, [e, t < n.length - 1 && u("div", { class: `${g.value}__divider` }, null)]))]);
|
|
3231
3231
|
return () => {
|
|
3232
3232
|
let e;
|
|
3233
3233
|
return u("div", {
|
|
3234
3234
|
ref: s,
|
|
3235
3235
|
class: _.value
|
|
3236
|
-
}, [u("div", { ref: c }, [n.trigger?.()]), o.value.open && (o.value.attachToBody ? u(t, { to: "body" },
|
|
3236
|
+
}, [u("div", { ref: c }, [n.trigger?.()]), o.value.open && (o.value.attachToBody ? u(t, { to: "body" }, ii(e = w()) ? e : { default: () => [e] }) : w())]);
|
|
3237
3237
|
};
|
|
3238
3238
|
}
|
|
3239
|
-
}),
|
|
3239
|
+
}), si = () => {
|
|
3240
3240
|
let e = X();
|
|
3241
|
-
return r(() =>
|
|
3241
|
+
return r(() => L({
|
|
3242
3242
|
"&, *": {
|
|
3243
3243
|
margin: 0,
|
|
3244
3244
|
boxSizing: "border-box"
|
|
@@ -3260,12 +3260,12 @@ var Jr = {
|
|
|
3260
3260
|
cursor: "not-allowed"
|
|
3261
3261
|
}
|
|
3262
3262
|
}));
|
|
3263
|
-
},
|
|
3263
|
+
}, ci = /* @__PURE__ */ d({
|
|
3264
3264
|
name: "TDropdownItem",
|
|
3265
3265
|
emits: ["click"],
|
|
3266
3266
|
props: { disabled: Boolean },
|
|
3267
3267
|
setup(e, { slots: t, emit: n, attrs: i }) {
|
|
3268
|
-
let a = r(() =>
|
|
3268
|
+
let a = r(() => U({}, e, i)), o = si(), s = r(() => [o.value, { [`${o.value}--disabled`]: a.value.disabled }]), c = () => {
|
|
3269
3269
|
a.value.disabled || n("click");
|
|
3270
3270
|
}, l = (e) => {
|
|
3271
3271
|
e.key === "Enter" && !a.value.disabled && (n("click"), e.preventDefault());
|
|
@@ -3279,9 +3279,9 @@ var Jr = {
|
|
|
3279
3279
|
"aria-disabled": a.value.disabled
|
|
3280
3280
|
}, [t.default?.()]);
|
|
3281
3281
|
}
|
|
3282
|
-
}),
|
|
3282
|
+
}), li = () => {
|
|
3283
3283
|
let e = X();
|
|
3284
|
-
return r(() =>
|
|
3284
|
+
return r(() => L({
|
|
3285
3285
|
"&, *": {
|
|
3286
3286
|
margin: 0,
|
|
3287
3287
|
padding: 0,
|
|
@@ -3355,7 +3355,7 @@ var Jr = {
|
|
|
3355
3355
|
transform: "translateY(50%)"
|
|
3356
3356
|
}
|
|
3357
3357
|
}));
|
|
3358
|
-
},
|
|
3358
|
+
}, ui = { type: "text" }, di = /* @__PURE__ */ d({
|
|
3359
3359
|
name: "TTextInput",
|
|
3360
3360
|
emits: [
|
|
3361
3361
|
"input",
|
|
@@ -3391,7 +3391,7 @@ var Jr = {
|
|
|
3391
3391
|
step: [String, Number]
|
|
3392
3392
|
},
|
|
3393
3393
|
setup(e, { attrs: t, emit: n, slots: i, expose: a }) {
|
|
3394
|
-
let o = r(() =>
|
|
3394
|
+
let o = r(() => U({}, ui, e, t)), s = li(), c = X(), l = r({
|
|
3395
3395
|
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
3396
3396
|
set: (e) => {
|
|
3397
3397
|
n("update:modelValue", e), n("input", e), n("change", e);
|
|
@@ -3402,7 +3402,7 @@ var Jr = {
|
|
|
3402
3402
|
n("focus", e);
|
|
3403
3403
|
}, p = (e) => {
|
|
3404
3404
|
n("blur", e);
|
|
3405
|
-
}, m =
|
|
3405
|
+
}, m = E(null);
|
|
3406
3406
|
return a({
|
|
3407
3407
|
focus: () => {
|
|
3408
3408
|
m.value?.focus();
|
|
@@ -3424,11 +3424,11 @@ var Jr = {
|
|
|
3424
3424
|
for: o.value.id
|
|
3425
3425
|
}, [o.value.label]),
|
|
3426
3426
|
u("div", { class: `${s.value}__input-wrapper` }, [
|
|
3427
|
-
i.leftIcon?.() || o.value.leftIcon && u(
|
|
3427
|
+
i.leftIcon?.() || o.value.leftIcon && u(I, {
|
|
3428
3428
|
icon: `${c.value.iconSet}:${o.value.leftIcon}`,
|
|
3429
3429
|
class: [`${s.value}__icon`, `${s.value}__icon--left`]
|
|
3430
3430
|
}, null),
|
|
3431
|
-
u("input",
|
|
3431
|
+
u("input", _(t, {
|
|
3432
3432
|
id: o.value.id,
|
|
3433
3433
|
type: o.value.multiline ? void 0 : o.value.type,
|
|
3434
3434
|
class: [`${s.value}__input`, {
|
|
@@ -3447,7 +3447,7 @@ var Jr = {
|
|
|
3447
3447
|
ref: m,
|
|
3448
3448
|
step: o.value.step
|
|
3449
3449
|
}), null),
|
|
3450
|
-
i.rightIcon?.() || o.value.rightIcon && u(
|
|
3450
|
+
i.rightIcon?.() || o.value.rightIcon && u(I, {
|
|
3451
3451
|
icon: `${c.value.iconSet}:${o.value.rightIcon}`,
|
|
3452
3452
|
class: [`${s.value}__icon`, `${s.value}__icon--right`]
|
|
3453
3453
|
}, null)
|
|
@@ -3455,7 +3455,7 @@ var Jr = {
|
|
|
3455
3455
|
i.helperText?.() || o.value.helperText && u("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
3456
3456
|
]);
|
|
3457
3457
|
}
|
|
3458
|
-
}),
|
|
3458
|
+
}), fi = (e) => e.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, ""), pi = /* @__PURE__ */ d({
|
|
3459
3459
|
name: "TCombobox",
|
|
3460
3460
|
emits: [
|
|
3461
3461
|
"input",
|
|
@@ -3477,7 +3477,7 @@ var Jr = {
|
|
|
3477
3477
|
disabled: Boolean
|
|
3478
3478
|
},
|
|
3479
3479
|
setup(e, { emit: t, expose: n }) {
|
|
3480
|
-
let i =
|
|
3480
|
+
let i = E(e.modelValue ?? ""), a = E(null), o = E(!1), s = E(null), c = E(null), l = r(() => e.disabled), d = () => {
|
|
3481
3481
|
o.value = !0;
|
|
3482
3482
|
}, f = () => {
|
|
3483
3483
|
o.value = !1;
|
|
@@ -3503,15 +3503,15 @@ var Jr = {
|
|
|
3503
3503
|
}, y = (e) => {
|
|
3504
3504
|
e.key === "Escape" && (f(), m(), p());
|
|
3505
3505
|
}, b = r(() => i.value === "" ? e.options : e.options.filter((e) => {
|
|
3506
|
-
let t =
|
|
3506
|
+
let t = fi(e.label), n = fi(i.value);
|
|
3507
3507
|
return t.includes(n);
|
|
3508
3508
|
}));
|
|
3509
|
-
|
|
3509
|
+
S(() => {
|
|
3510
3510
|
document.addEventListener("click", _), s.value?.addEventListener("keydown", y);
|
|
3511
|
-
}),
|
|
3511
|
+
}), C(() => {
|
|
3512
3512
|
document.removeEventListener("click", _), s.value?.removeEventListener("keydown", y);
|
|
3513
3513
|
});
|
|
3514
|
-
let
|
|
3514
|
+
let x = () => u(di, {
|
|
3515
3515
|
ref: c,
|
|
3516
3516
|
modelValue: i.value,
|
|
3517
3517
|
label: e.label,
|
|
@@ -3521,52 +3521,52 @@ var Jr = {
|
|
|
3521
3521
|
onChange: g,
|
|
3522
3522
|
disabled: l.value
|
|
3523
3523
|
}, null);
|
|
3524
|
-
return
|
|
3524
|
+
return P(() => e.modelValue, () => {
|
|
3525
3525
|
i.value = e.modelValue ?? "";
|
|
3526
3526
|
}), () => u("div", {
|
|
3527
3527
|
ref: s,
|
|
3528
3528
|
role: "combobox",
|
|
3529
3529
|
"aria-controls": "menu",
|
|
3530
3530
|
"aria-expanded": o.value
|
|
3531
|
-
}, [u(
|
|
3531
|
+
}, [u(oi, {
|
|
3532
3532
|
open: o.value,
|
|
3533
3533
|
"full-width": !0
|
|
3534
3534
|
}, {
|
|
3535
|
-
trigger: () => u(
|
|
3536
|
-
default: () => b.value.map((e) => u(
|
|
3535
|
+
trigger: () => u(x, null, null),
|
|
3536
|
+
default: () => b.value.map((e) => u(ci, { onClick: () => v(e) }, { default: () => [e.label] }))
|
|
3537
3537
|
})]);
|
|
3538
3538
|
}
|
|
3539
|
-
}),
|
|
3540
|
-
let e = new Set(["class", "style"]), t = ([t]) => e.has(t), n = ([e]) => /^on[A-Z]/.test(e), i =
|
|
3539
|
+
}), mi = () => {
|
|
3540
|
+
let e = new Set(["class", "style"]), t = ([t]) => e.has(t), n = ([e]) => /^on[A-Z]/.test(e), i = te(), a = r(() => Object.entries(i).filter(([e]) => e !== "data-state")), o = r(() => Object.fromEntries(a.value.filter(t))), s = r(() => Object.fromEntries(a.value.filter(n))), c = r(() => Object.fromEntries(a.value.filter((e) => !t(e) && !n(e))));
|
|
3541
3541
|
return {
|
|
3542
3542
|
wrapperAttrs: o,
|
|
3543
3543
|
controlAttrs: r(() => Object.fromEntries(a.value.filter((e) => !t(e)))),
|
|
3544
3544
|
staticAttrs: c,
|
|
3545
3545
|
listenerAttrs: s
|
|
3546
3546
|
};
|
|
3547
|
-
},
|
|
3547
|
+
}, hi = ["data-loading", "data-empty"], gi = { class: "t-command-palette__panel" }, _i = { class: "t-command-palette__search" }, vi = [
|
|
3548
3548
|
"aria-label",
|
|
3549
3549
|
"aria-expanded",
|
|
3550
3550
|
"aria-activedescendant",
|
|
3551
3551
|
"placeholder",
|
|
3552
3552
|
"value"
|
|
3553
|
-
],
|
|
3553
|
+
], yi = ["data-hidden", "aria-label"], bi = {
|
|
3554
3554
|
key: 0,
|
|
3555
3555
|
role: "status",
|
|
3556
3556
|
class: "t-command-palette__status"
|
|
3557
|
-
},
|
|
3557
|
+
}, xi = [
|
|
3558
3558
|
"role",
|
|
3559
3559
|
"aria-labelledby",
|
|
3560
3560
|
"aria-busy"
|
|
3561
|
-
],
|
|
3561
|
+
], Si = {
|
|
3562
3562
|
key: 0,
|
|
3563
3563
|
class: "t-command-palette__skeleton",
|
|
3564
3564
|
"aria-hidden": "true"
|
|
3565
|
-
},
|
|
3565
|
+
}, Ci = { class: "t-command-palette__skeleton-lines" }, wi = [
|
|
3566
3566
|
"role",
|
|
3567
3567
|
"data-section",
|
|
3568
3568
|
"aria-labelledby"
|
|
3569
|
-
],
|
|
3569
|
+
], Ti = ["id"], Ei = ["data-group", "aria-labelledby"], Di = ["id"], Oi = [
|
|
3570
3570
|
"id",
|
|
3571
3571
|
"aria-label",
|
|
3572
3572
|
"aria-selected",
|
|
@@ -3576,30 +3576,30 @@ var Jr = {
|
|
|
3576
3576
|
"data-disabled",
|
|
3577
3577
|
"onClick",
|
|
3578
3578
|
"onPointermove"
|
|
3579
|
-
],
|
|
3579
|
+
], ki = ["data-icon-variant"], Ai = { class: "t-command-palette__item-label" }, ji = { class: "t-command-palette__item-title" }, Mi = {
|
|
3580
3580
|
key: 0,
|
|
3581
3581
|
class: "t-command-palette__item-prefix"
|
|
3582
|
-
},
|
|
3582
|
+
}, Ni = { class: "t-command-palette__item-text" }, Pi = {
|
|
3583
3583
|
key: 0,
|
|
3584
3584
|
class: "t-command-palette__item-suffix"
|
|
3585
|
-
},
|
|
3585
|
+
}, Fi = { class: "t-command-palette__item-trailing" }, Ii = {
|
|
3586
3586
|
key: 0,
|
|
3587
3587
|
class: "t-command-palette__item-chip"
|
|
3588
|
-
},
|
|
3588
|
+
}, Li = {
|
|
3589
3589
|
key: 1,
|
|
3590
3590
|
class: "t-command-palette__item-enter",
|
|
3591
3591
|
"aria-hidden": "true"
|
|
3592
|
-
},
|
|
3592
|
+
}, Ri = {
|
|
3593
3593
|
key: 1,
|
|
3594
3594
|
class: "t-command-palette__empty"
|
|
3595
|
-
},
|
|
3595
|
+
}, zi = {
|
|
3596
3596
|
key: 1,
|
|
3597
3597
|
class: "t-command-palette__footer"
|
|
3598
|
-
},
|
|
3598
|
+
}, Bi = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
3599
3599
|
name: "TCommandPalette",
|
|
3600
3600
|
inheritAttrs: !1,
|
|
3601
3601
|
__name: "TCommandPalette",
|
|
3602
|
-
props: /* @__PURE__ */
|
|
3602
|
+
props: /* @__PURE__ */ g({
|
|
3603
3603
|
groups: { default: () => [] },
|
|
3604
3604
|
open: { type: Boolean },
|
|
3605
3605
|
searchTerm: {},
|
|
@@ -3618,26 +3618,26 @@ var Jr = {
|
|
|
3618
3618
|
searchTerm: { default: "" },
|
|
3619
3619
|
searchTermModifiers: {}
|
|
3620
3620
|
}),
|
|
3621
|
-
emits: /* @__PURE__ */
|
|
3621
|
+
emits: /* @__PURE__ */ g(["highlight", "select"], ["update:open", "update:searchTerm"]),
|
|
3622
3622
|
setup(t, { emit: n }) {
|
|
3623
|
-
let i = n, d =
|
|
3624
|
-
|
|
3625
|
-
e !==
|
|
3623
|
+
let i = n, d = M(t, "open"), f = M(t, "searchTerm"), p = r(() => t.autofocus ?? !0), m = X(), { wrapperAttrs: h, controlAttrs: g } = mi(), y = re(), C = `${y}-input`, ee = `${y}-listbox`, T = (e) => `${y}-group-${e}`, D = (e, t) => `${y}-option-${e}-${t}`, te = E(), ne = E(), ie = E(), N = E("");
|
|
3624
|
+
P(f, (e) => {
|
|
3625
|
+
e !== N.value && (N.value = e);
|
|
3626
3626
|
}, { immediate: !0 });
|
|
3627
|
-
let
|
|
3627
|
+
let F = (e) => {
|
|
3628
3628
|
f.value = e;
|
|
3629
|
-
},
|
|
3630
|
-
clearTimeout(
|
|
3629
|
+
}, ae, L = () => {
|
|
3630
|
+
clearTimeout(ae), ae = setTimeout(() => F(N.value), t.searchDelay);
|
|
3631
3631
|
};
|
|
3632
|
-
|
|
3633
|
-
let
|
|
3634
|
-
|
|
3635
|
-
},
|
|
3632
|
+
x(() => clearTimeout(ae));
|
|
3633
|
+
let oe = (e) => {
|
|
3634
|
+
N.value = e.target.value, t.searchDelay > 0 ? L() : F(N.value);
|
|
3635
|
+
}, se = r(() => t.groups.map((e) => ({
|
|
3636
3636
|
...e,
|
|
3637
3637
|
items: e.postFilter ? e.postFilter(f.value, e.items) : e.items
|
|
3638
|
-
}))),
|
|
3638
|
+
}))), ce = r(() => t.loading ? [] : se.value), le = r(() => {
|
|
3639
3639
|
let e = [];
|
|
3640
|
-
return
|
|
3640
|
+
return ce.value.forEach((t, n) => {
|
|
3641
3641
|
let r = e.at(-1);
|
|
3642
3642
|
if (t.section && r?.section?.id === t.section.id) {
|
|
3643
3643
|
r.entries.push({
|
|
@@ -3655,7 +3655,7 @@ var Jr = {
|
|
|
3655
3655
|
}]
|
|
3656
3656
|
});
|
|
3657
3657
|
}), e;
|
|
3658
|
-
}),
|
|
3658
|
+
}), ue = (e) => `${y}-section-${e}`, de = [
|
|
3659
3659
|
{
|
|
3660
3660
|
id: "a",
|
|
3661
3661
|
rows: [
|
|
@@ -3672,52 +3672,52 @@ var Jr = {
|
|
|
3672
3672
|
id: "c",
|
|
3673
3673
|
rows: [0, 1]
|
|
3674
3674
|
}
|
|
3675
|
-
],
|
|
3675
|
+
], fe = [
|
|
3676
3676
|
42,
|
|
3677
3677
|
56,
|
|
3678
3678
|
68
|
|
3679
|
-
],
|
|
3679
|
+
], pe = [
|
|
3680
3680
|
24,
|
|
3681
3681
|
32,
|
|
3682
3682
|
38
|
|
3683
|
-
],
|
|
3683
|
+
], me = (e) => fe[e % 3], he = (e) => pe[e % 3], R = r(() => ce.value.flatMap((e, t) => e.items.map((n, r) => ({
|
|
3684
3684
|
item: n,
|
|
3685
3685
|
group: e,
|
|
3686
3686
|
groupIndex: t,
|
|
3687
3687
|
itemIndex: r
|
|
3688
|
-
})))),
|
|
3689
|
-
let n =
|
|
3688
|
+
})))), ge = r(() => R.value.length === 0), z = E(-1), B = r(() => R.value[z.value]), V = r(() => B.value ? D(B.value.groupIndex, B.value.itemIndex) : void 0), _e = (e) => !!e && !e.item.disabled, ve = (e, t) => {
|
|
3689
|
+
let n = R.value.length;
|
|
3690
3690
|
if (n === 0) return -1;
|
|
3691
3691
|
for (let r = 0; r < n; r += 1) {
|
|
3692
3692
|
let i = ((e + t * r) % n + n) % n;
|
|
3693
|
-
if (
|
|
3693
|
+
if (_e(R.value[i])) return i;
|
|
3694
3694
|
}
|
|
3695
3695
|
return -1;
|
|
3696
|
-
},
|
|
3697
|
-
await
|
|
3696
|
+
}, ye = async () => {
|
|
3697
|
+
await v(), V.value && ie.value?.querySelector(`[id="${V.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3698
|
+
}, be = (e) => {
|
|
3699
|
+
e !== z.value && (e !== -1 && !_e(R.value[e]) || (z.value = e, i("highlight", B.value?.item, B.value?.group), ye()));
|
|
3700
|
+
}, xe = (e) => {
|
|
3701
|
+
let t = ve(z.value === -1 ? e > 0 ? 0 : R.value.length - 1 : z.value + e, e);
|
|
3702
|
+
t !== -1 && be(t);
|
|
3698
3703
|
}, Se = (e) => {
|
|
3699
|
-
e !== L.value && (e !== -1 && !ye(I.value[e]) || (L.value = e, i("highlight", R.value?.item, R.value?.group), xe()));
|
|
3700
|
-
}, Ce = (e) => {
|
|
3701
|
-
let t = be(L.value === -1 ? e > 0 ? 0 : I.value.length - 1 : L.value + e, e);
|
|
3702
|
-
t !== -1 && Se(t);
|
|
3703
|
-
}, we = (e) => {
|
|
3704
3704
|
e.item.disabled || (e.item.onSelect?.(), i("select", e.item, e.group), e.group?.keepOpenOnSelect || (d.value = !1));
|
|
3705
|
-
},
|
|
3705
|
+
}, Ce = (e) => {
|
|
3706
3706
|
switch (e.key) {
|
|
3707
3707
|
case "ArrowDown":
|
|
3708
|
-
e.preventDefault(),
|
|
3708
|
+
e.preventDefault(), xe(1);
|
|
3709
3709
|
break;
|
|
3710
3710
|
case "ArrowUp":
|
|
3711
|
-
e.preventDefault(),
|
|
3711
|
+
e.preventDefault(), xe(-1);
|
|
3712
3712
|
break;
|
|
3713
3713
|
case "Home":
|
|
3714
|
-
e.preventDefault(),
|
|
3714
|
+
e.preventDefault(), be(ve(0, 1));
|
|
3715
3715
|
break;
|
|
3716
3716
|
case "End":
|
|
3717
|
-
e.preventDefault(),
|
|
3717
|
+
e.preventDefault(), be(ve(R.value.length - 1, -1));
|
|
3718
3718
|
break;
|
|
3719
3719
|
case "Enter":
|
|
3720
|
-
|
|
3720
|
+
B.value && (e.preventDefault(), Se(B.value));
|
|
3721
3721
|
break;
|
|
3722
3722
|
case "Escape":
|
|
3723
3723
|
d.value = !1;
|
|
@@ -3725,44 +3725,44 @@ var Jr = {
|
|
|
3725
3725
|
default: break;
|
|
3726
3726
|
}
|
|
3727
3727
|
};
|
|
3728
|
-
|
|
3729
|
-
|
|
3728
|
+
P(R, () => {
|
|
3729
|
+
z.value = ve(0, 1), i("highlight", B.value?.item, B.value?.group), ye();
|
|
3730
3730
|
});
|
|
3731
|
-
let
|
|
3732
|
-
let e =
|
|
3733
|
-
e && (d.value ? (e.open || e.showModal(), await
|
|
3731
|
+
let we = async () => {
|
|
3732
|
+
let e = te.value;
|
|
3733
|
+
e && (d.value ? (e.open || e.showModal(), await v(), p.value && ne.value?.focus(), ye()) : e.open && e.close());
|
|
3734
3734
|
};
|
|
3735
|
-
|
|
3736
|
-
e && (
|
|
3737
|
-
}, { immediate: !0 }),
|
|
3738
|
-
let
|
|
3735
|
+
P(d, (e) => {
|
|
3736
|
+
e && (z.value = ve(0, 1)), we();
|
|
3737
|
+
}, { immediate: !0 }), S(we);
|
|
3738
|
+
let Te = () => {
|
|
3739
3739
|
d.value = !1;
|
|
3740
|
-
},
|
|
3741
|
-
e.target ===
|
|
3742
|
-
},
|
|
3743
|
-
|
|
3744
|
-
},
|
|
3745
|
-
return (n, r) => (
|
|
3740
|
+
}, Ee = (e) => {
|
|
3741
|
+
e.target === te.value && (d.value = !1);
|
|
3742
|
+
}, De = () => {
|
|
3743
|
+
N.value = "", F(""), ne.value?.focus();
|
|
3744
|
+
}, Oe = (e) => `${m.value.iconSet}:${e}`, ke = (e) => typeof e == "string" ? e : void 0;
|
|
3745
|
+
return (n, r) => (w(), s("dialog", _({
|
|
3746
3746
|
ref_key: "dialogRef",
|
|
3747
|
-
ref:
|
|
3748
|
-
},
|
|
3747
|
+
ref: te
|
|
3748
|
+
}, j(h), {
|
|
3749
3749
|
class: "t-command-palette",
|
|
3750
3750
|
"data-loading": t.loading || void 0,
|
|
3751
|
-
"data-empty":
|
|
3752
|
-
onClose:
|
|
3753
|
-
onClick:
|
|
3754
|
-
}), [c("div",
|
|
3755
|
-
c("div",
|
|
3756
|
-
u(
|
|
3757
|
-
icon:
|
|
3751
|
+
"data-empty": ge.value && !t.loading || void 0,
|
|
3752
|
+
onClose: Te,
|
|
3753
|
+
onClick: Ee
|
|
3754
|
+
}), [c("div", gi, [
|
|
3755
|
+
c("div", _i, [
|
|
3756
|
+
u(j(I), {
|
|
3757
|
+
icon: Oe("magnifying-glass"),
|
|
3758
3758
|
class: "t-command-palette__search-icon",
|
|
3759
3759
|
"aria-hidden": "true"
|
|
3760
3760
|
}, null, 8, ["icon"]),
|
|
3761
|
-
c("input",
|
|
3762
|
-
id:
|
|
3761
|
+
c("input", _({
|
|
3762
|
+
id: C,
|
|
3763
3763
|
ref_key: "inputRef",
|
|
3764
|
-
ref:
|
|
3765
|
-
},
|
|
3764
|
+
ref: ne
|
|
3765
|
+
}, j(g), {
|
|
3766
3766
|
class: "t-command-palette__input",
|
|
3767
3767
|
type: "text",
|
|
3768
3768
|
role: "combobox",
|
|
@@ -3771,147 +3771,226 @@ var Jr = {
|
|
|
3771
3771
|
spellcheck: "false",
|
|
3772
3772
|
"aria-autocomplete": "list",
|
|
3773
3773
|
"aria-label": n.$attrs["aria-label"] ?? t.placeholder ?? void 0,
|
|
3774
|
-
"aria-expanded": d.value && !
|
|
3774
|
+
"aria-expanded": d.value && !ge.value,
|
|
3775
3775
|
"aria-controls": ee,
|
|
3776
|
-
"aria-activedescendant":
|
|
3776
|
+
"aria-activedescendant": V.value,
|
|
3777
3777
|
placeholder: t.placeholder,
|
|
3778
|
-
value:
|
|
3779
|
-
onInput:
|
|
3780
|
-
onKeydown:
|
|
3781
|
-
}), null, 16,
|
|
3778
|
+
value: N.value,
|
|
3779
|
+
onInput: oe,
|
|
3780
|
+
onKeydown: Ce
|
|
3781
|
+
}), null, 16, vi),
|
|
3782
3782
|
c("button", {
|
|
3783
3783
|
type: "button",
|
|
3784
3784
|
class: "t-command-palette__clear",
|
|
3785
|
-
"data-hidden": !
|
|
3785
|
+
"data-hidden": !N.value || void 0,
|
|
3786
3786
|
"aria-label": t.clearLabel,
|
|
3787
|
-
onClick:
|
|
3788
|
-
}, [u(
|
|
3789
|
-
icon:
|
|
3787
|
+
onClick: De
|
|
3788
|
+
}, [u(j(I), {
|
|
3789
|
+
icon: Oe("x-mark"),
|
|
3790
3790
|
"aria-hidden": "true"
|
|
3791
|
-
}, null, 8, ["icon"])], 8,
|
|
3791
|
+
}, null, 8, ["icon"])], 8, yi),
|
|
3792
3792
|
c("kbd", {
|
|
3793
3793
|
class: "t-command-palette__esc",
|
|
3794
3794
|
"aria-hidden": "true"
|
|
3795
|
-
},
|
|
3795
|
+
}, A("ESC"))
|
|
3796
3796
|
]),
|
|
3797
|
-
t.loading ? (
|
|
3797
|
+
t.loading ? (w(), s("p", bi, A(t.loadingLabel), 1)) : o("", !0),
|
|
3798
3798
|
c("div", {
|
|
3799
3799
|
id: ee,
|
|
3800
3800
|
ref_key: "listRef",
|
|
3801
3801
|
ref: ie,
|
|
3802
3802
|
class: "t-command-palette__list",
|
|
3803
|
-
role:
|
|
3804
|
-
"aria-labelledby":
|
|
3803
|
+
role: ge.value ? void 0 : "listbox",
|
|
3804
|
+
"aria-labelledby": ge.value ? void 0 : C,
|
|
3805
3805
|
"aria-busy": t.loading || void 0
|
|
3806
3806
|
}, [
|
|
3807
|
-
t.loading ? (
|
|
3807
|
+
t.loading ? (w(), s("div", Si, [(w(), s(e, null, O(de, (t) => c("div", {
|
|
3808
3808
|
key: t.id,
|
|
3809
3809
|
class: "t-command-palette__group"
|
|
3810
|
-
}, [r[1] ||= c("div", { class: "t-command-palette__skeleton-label" }, null, -1), (
|
|
3810
|
+
}, [r[1] ||= c("div", { class: "t-command-palette__skeleton-label" }, null, -1), (w(!0), s(e, null, O(t.rows, (e) => (w(), s("div", {
|
|
3811
3811
|
key: e,
|
|
3812
3812
|
class: "t-command-palette__skeleton-row"
|
|
3813
|
-
}, [r[0] ||= c("span", { class: "t-command-palette__skeleton-box" }, null, -1), c("span",
|
|
3813
|
+
}, [r[0] ||= c("span", { class: "t-command-palette__skeleton-box" }, null, -1), c("span", Ci, [c("span", {
|
|
3814
3814
|
class: "t-command-palette__skeleton-title",
|
|
3815
|
-
style:
|
|
3815
|
+
style: b({ width: `${me(e)}%` })
|
|
3816
3816
|
}, null, 4), c("span", {
|
|
3817
3817
|
class: "t-command-palette__skeleton-suffix",
|
|
3818
|
-
style:
|
|
3818
|
+
style: b({ width: `${he(e)}%` })
|
|
3819
3819
|
}, null, 4)])]))), 128))])), 64))])) : o("", !0),
|
|
3820
|
-
(
|
|
3820
|
+
(w(!0), s(e, null, O(le.value, (t) => (w(), s("div", {
|
|
3821
3821
|
key: t.key,
|
|
3822
3822
|
class: "t-command-palette__section",
|
|
3823
3823
|
role: t.section ? "group" : "presentation",
|
|
3824
3824
|
"data-section": t.section?.id,
|
|
3825
|
-
"aria-labelledby": t.section && (t.section.label || n.$slots["section-label"]) ?
|
|
3826
|
-
}, [t.section && (t.section.label || n.$slots["section-label"]) ? (
|
|
3825
|
+
"aria-labelledby": t.section && (t.section.label || n.$slots["section-label"]) ? ue(t.entries[0].index) : void 0
|
|
3826
|
+
}, [t.section && (t.section.label || n.$slots["section-label"]) ? (w(), s("div", {
|
|
3827
3827
|
key: 0,
|
|
3828
|
-
id:
|
|
3828
|
+
id: ue(t.entries[0].index),
|
|
3829
3829
|
class: "t-command-palette__section-label"
|
|
3830
|
-
}, [
|
|
3830
|
+
}, [k(n.$slots, "section-label", {
|
|
3831
3831
|
section: t.section,
|
|
3832
3832
|
groups: t.entries.map((e) => e.group)
|
|
3833
|
-
}, () => [l(
|
|
3833
|
+
}, () => [l(A(t.section.label), 1)], !0)], 8, Ti)) : o("", !0), (w(!0), s(e, null, O(t.entries, ({ group: t, index: r }) => (w(), s("div", {
|
|
3834
3834
|
key: t.id,
|
|
3835
3835
|
class: "t-command-palette__group",
|
|
3836
3836
|
role: "group",
|
|
3837
3837
|
"data-group": t.id,
|
|
3838
|
-
"aria-labelledby": t.label || n.$slots["group-label"] ?
|
|
3839
|
-
}, [t.label || n.$slots["group-label"] ? (
|
|
3838
|
+
"aria-labelledby": t.label || n.$slots["group-label"] ? T(r) : void 0
|
|
3839
|
+
}, [t.label || n.$slots["group-label"] ? (w(), s("div", {
|
|
3840
3840
|
key: 0,
|
|
3841
|
-
id:
|
|
3841
|
+
id: T(r),
|
|
3842
3842
|
class: "t-command-palette__group-label"
|
|
3843
|
-
}, [
|
|
3843
|
+
}, [k(n.$slots, "group-label", {
|
|
3844
3844
|
group: t,
|
|
3845
3845
|
index: r
|
|
3846
|
-
}, () => [l(
|
|
3847
|
-
id:
|
|
3848
|
-
key:
|
|
3846
|
+
}, () => [l(A(t.label), 1)], !0)], 8, Di)) : o("", !0), (w(!0), s(e, null, O(t.items, (i, u) => (w(), s("div", {
|
|
3847
|
+
id: D(r, u),
|
|
3848
|
+
key: D(r, u),
|
|
3849
3849
|
class: "t-command-palette__item",
|
|
3850
3850
|
role: "option",
|
|
3851
3851
|
"aria-label": i.label,
|
|
3852
|
-
"aria-selected":
|
|
3852
|
+
"aria-selected": D(r, u) === V.value,
|
|
3853
3853
|
"aria-disabled": i.disabled || void 0,
|
|
3854
|
-
"data-highlighted":
|
|
3854
|
+
"data-highlighted": D(r, u) === V.value || void 0,
|
|
3855
3855
|
"data-active": i.active || void 0,
|
|
3856
3856
|
"data-disabled": i.disabled || void 0,
|
|
3857
|
-
onClick: (e) =>
|
|
3857
|
+
onClick: (e) => Se({
|
|
3858
3858
|
item: i,
|
|
3859
3859
|
group: t,
|
|
3860
3860
|
groupIndex: r,
|
|
3861
3861
|
itemIndex: u
|
|
3862
3862
|
}),
|
|
3863
|
-
onPointermove: (e) =>
|
|
3864
|
-
}, [
|
|
3863
|
+
onPointermove: (e) => be(R.value.findIndex((e) => e.groupIndex === r && e.itemIndex === u))
|
|
3864
|
+
}, [k(n.$slots, "item", {
|
|
3865
3865
|
item: i,
|
|
3866
3866
|
group: t,
|
|
3867
|
-
active:
|
|
3867
|
+
active: D(r, u) === V.value
|
|
3868
3868
|
}, () => [
|
|
3869
3869
|
c("span", {
|
|
3870
3870
|
class: "t-command-palette__item-leading",
|
|
3871
3871
|
"data-icon-variant": i.iconVariant ?? "tile"
|
|
3872
|
-
}, [
|
|
3872
|
+
}, [k(n.$slots, "item-leading", {
|
|
3873
3873
|
item: i,
|
|
3874
3874
|
group: t,
|
|
3875
|
-
active:
|
|
3876
|
-
}, () => [i.icon ? (
|
|
3875
|
+
active: D(r, u) === V.value
|
|
3876
|
+
}, () => [i.icon ? (w(), a(j(I), {
|
|
3877
3877
|
key: 0,
|
|
3878
|
-
icon:
|
|
3878
|
+
icon: Oe(i.icon),
|
|
3879
3879
|
"aria-hidden": "true"
|
|
3880
|
-
}, null, 8, ["icon"])) : o("", !0)], !0)], 8,
|
|
3881
|
-
c("span",
|
|
3880
|
+
}, null, 8, ["icon"])) : o("", !0)], !0)], 8, ki),
|
|
3881
|
+
c("span", Ai, [k(n.$slots, "item-label", {
|
|
3882
3882
|
item: i,
|
|
3883
3883
|
group: t,
|
|
3884
|
-
active:
|
|
3885
|
-
}, () => [c("span",
|
|
3884
|
+
active: D(r, u) === V.value
|
|
3885
|
+
}, () => [c("span", ji, [i.prefix ? (w(), s("span", Mi, A(i.prefix), 1)) : o("", !0), c("span", Ni, [k(n.$slots, "item-text", {
|
|
3886
3886
|
item: i,
|
|
3887
3887
|
group: t,
|
|
3888
|
-
active:
|
|
3889
|
-
}, () => [l(
|
|
3888
|
+
active: D(r, u) === V.value
|
|
3889
|
+
}, () => [l(A(i.label), 1)], !0)])]), i.suffix || n.$slots["item-suffix"] ? (w(), s("span", Pi, [k(n.$slots, "item-suffix", {
|
|
3890
3890
|
item: i,
|
|
3891
3891
|
group: t,
|
|
3892
|
-
active:
|
|
3893
|
-
}, () => [l(
|
|
3894
|
-
c("span",
|
|
3892
|
+
active: D(r, u) === V.value
|
|
3893
|
+
}, () => [l(A(i.suffix), 1)], !0)])) : o("", !0)], !0)]),
|
|
3894
|
+
c("span", Fi, [k(n.$slots, "item-trailing", {
|
|
3895
3895
|
item: i,
|
|
3896
3896
|
group: t,
|
|
3897
|
-
active:
|
|
3897
|
+
active: D(r, u) === V.value
|
|
3898
3898
|
}, () => [
|
|
3899
|
-
|
|
3900
|
-
(
|
|
3899
|
+
ke(i.chip) ? (w(), s("span", Ii, A(ke(i.chip)), 1)) : o("", !0),
|
|
3900
|
+
(w(!0), s(e, null, O(i.kbds, (e) => (w(), s("kbd", {
|
|
3901
3901
|
key: e,
|
|
3902
3902
|
class: "t-command-palette__item-kbd"
|
|
3903
|
-
},
|
|
3904
|
-
|
|
3903
|
+
}, A(e), 1))), 128)),
|
|
3904
|
+
D(r, u) === V.value && !i.kbds?.length ? (w(), s("span", Li, A("↵"))) : o("", !0)
|
|
3905
3905
|
], !0)])
|
|
3906
|
-
], !0)], 40,
|
|
3907
|
-
|
|
3908
|
-
], 8,
|
|
3909
|
-
n.$slots.footer ? (
|
|
3910
|
-
])], 16,
|
|
3906
|
+
], !0)], 40, Oi))), 128))], 8, Ei))), 128))], 8, wi))), 128)),
|
|
3907
|
+
ge.value && !t.loading ? (w(), s("div", Ri, [k(n.$slots, "empty", { searchTerm: f.value }, void 0, !0)])) : o("", !0)
|
|
3908
|
+
], 8, xi),
|
|
3909
|
+
n.$slots.footer ? (w(), s("div", zi, [k(n.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
3910
|
+
])], 16, hi));
|
|
3911
|
+
}
|
|
3912
|
+
}), [["__scopeId", "data-v-e95fc3d0"]]), Vi = { class: "t-confirm-dialog__actions" }, Hi = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
3913
|
+
name: "TConfirmDialog",
|
|
3914
|
+
inheritAttrs: !1,
|
|
3915
|
+
__name: "TConfirmDialog",
|
|
3916
|
+
props: /* @__PURE__ */ g({
|
|
3917
|
+
title: {},
|
|
3918
|
+
description: {},
|
|
3919
|
+
confirmLabel: {},
|
|
3920
|
+
cancelLabel: { default: "Cancelar" }
|
|
3921
|
+
}, {
|
|
3922
|
+
open: {
|
|
3923
|
+
type: Boolean,
|
|
3924
|
+
default: !1
|
|
3925
|
+
},
|
|
3926
|
+
openModifiers: {}
|
|
3927
|
+
}),
|
|
3928
|
+
emits: /* @__PURE__ */ g([
|
|
3929
|
+
"confirm",
|
|
3930
|
+
"cancel",
|
|
3931
|
+
"closed"
|
|
3932
|
+
], ["update:open"]),
|
|
3933
|
+
setup(e, { emit: t }) {
|
|
3934
|
+
let n = t, i = ie(), s = M(e, "open"), { wrapperAttrs: d, controlAttrs: f } = mi(), p = r(() => !!(e.description || i.default)), m = r(() => ({
|
|
3935
|
+
...d.value,
|
|
3936
|
+
...p.value ? {} : { "aria-describedby": void 0 },
|
|
3937
|
+
...f.value
|
|
3938
|
+
})), h = !1;
|
|
3939
|
+
P(s, (e) => {
|
|
3940
|
+
e && (h = !1);
|
|
3941
|
+
}, { flush: "sync" });
|
|
3942
|
+
let g = (e) => {
|
|
3943
|
+
h || (h = !0, n(e ? "confirm" : "cancel"), s.value = !1);
|
|
3944
|
+
}, v = () => {
|
|
3945
|
+
setTimeout(() => setTimeout(() => n("closed")));
|
|
3946
|
+
}, y = (e) => {
|
|
3947
|
+
e ? s.value = !0 : g(!1);
|
|
3948
|
+
};
|
|
3949
|
+
return (t, n) => (w(), a(j(de), {
|
|
3950
|
+
open: s.value,
|
|
3951
|
+
"onUpdate:open": y
|
|
3952
|
+
}, {
|
|
3953
|
+
default: F(() => [u(j(ue), null, {
|
|
3954
|
+
default: F(() => [u(j(le), { class: "t-confirm-dialog__scrim" }), u(j(se), _({ class: "t-confirm-dialog" }, m.value, { onCloseAutoFocus: v }), {
|
|
3955
|
+
default: F(() => [
|
|
3956
|
+
u(j(fe), { class: "t-confirm-dialog__title" }, {
|
|
3957
|
+
default: F(() => [l(A(e.title), 1)]),
|
|
3958
|
+
_: 1
|
|
3959
|
+
}),
|
|
3960
|
+
p.value ? (w(), a(j(ce), {
|
|
3961
|
+
key: 0,
|
|
3962
|
+
class: "t-confirm-dialog__description"
|
|
3963
|
+
}, {
|
|
3964
|
+
default: F(() => [k(t.$slots, "default", {}, () => [l(A(e.description), 1)], !0)]),
|
|
3965
|
+
_: 3
|
|
3966
|
+
})) : o("", !0),
|
|
3967
|
+
c("div", Vi, [u(j(oe), { "as-child": "" }, {
|
|
3968
|
+
default: F(() => [u(j(Rr), {
|
|
3969
|
+
variant: "secondary",
|
|
3970
|
+
size: "small"
|
|
3971
|
+
}, {
|
|
3972
|
+
default: F(() => [l(A(e.cancelLabel), 1)]),
|
|
3973
|
+
_: 1
|
|
3974
|
+
})]),
|
|
3975
|
+
_: 1
|
|
3976
|
+
}), u(j(Rr), {
|
|
3977
|
+
size: "small",
|
|
3978
|
+
onClick: n[0] ||= (e) => g(!0)
|
|
3979
|
+
}, {
|
|
3980
|
+
default: F(() => [l(A(e.confirmLabel), 1)]),
|
|
3981
|
+
_: 1
|
|
3982
|
+
})])
|
|
3983
|
+
]),
|
|
3984
|
+
_: 3
|
|
3985
|
+
}, 16)]),
|
|
3986
|
+
_: 3
|
|
3987
|
+
})]),
|
|
3988
|
+
_: 3
|
|
3989
|
+
}, 8, ["open"]));
|
|
3911
3990
|
}
|
|
3912
|
-
}), [["__scopeId", "data-v-
|
|
3991
|
+
}), [["__scopeId", "data-v-ef0e26d8"]]), Ui = () => {
|
|
3913
3992
|
let e = X();
|
|
3914
|
-
return r(() =>
|
|
3993
|
+
return r(() => L({
|
|
3915
3994
|
"&, & > *": {
|
|
3916
3995
|
margin: 0,
|
|
3917
3996
|
padding: 0,
|
|
@@ -3982,7 +4061,7 @@ var Jr = {
|
|
|
3982
4061
|
zIndex: 45
|
|
3983
4062
|
}
|
|
3984
4063
|
}));
|
|
3985
|
-
},
|
|
4064
|
+
}, Wi = { size: "medium" }, Gi = /* @__PURE__ */ d({
|
|
3986
4065
|
name: "TModal",
|
|
3987
4066
|
props: {
|
|
3988
4067
|
open: Boolean,
|
|
@@ -3993,7 +4072,7 @@ var Jr = {
|
|
|
3993
4072
|
},
|
|
3994
4073
|
emits: ["close", "cancel"],
|
|
3995
4074
|
setup(e, { slots: t, attrs: n, emit: i, expose: a }) {
|
|
3996
|
-
let o = r(() =>
|
|
4075
|
+
let o = r(() => U({}, Wi, e, n)), s = E(o.value.open), c = Ui(), l = r(() => [
|
|
3997
4076
|
c.value,
|
|
3998
4077
|
`${c.value}--${o.value.size}`,
|
|
3999
4078
|
{
|
|
@@ -4001,20 +4080,20 @@ var Jr = {
|
|
|
4001
4080
|
[`${c.value}--active`]: s.value,
|
|
4002
4081
|
[`${c.value}--non-blocking`]: o.value.nonBlocking
|
|
4003
4082
|
}
|
|
4004
|
-
]), d =
|
|
4083
|
+
]), d = E(null), f = () => {
|
|
4005
4084
|
s.value = !0, o.value.nonBlocking ? d.value?.show() : d.value?.showModal();
|
|
4006
4085
|
}, p = () => {
|
|
4007
4086
|
s.value = !1, d.value?.close();
|
|
4008
4087
|
};
|
|
4009
|
-
|
|
4088
|
+
P([() => o.value.open, d], () => {
|
|
4010
4089
|
d.value && o.value.open ? f() : p();
|
|
4011
4090
|
}, { immediate: !0 });
|
|
4012
4091
|
let m = (e) => {
|
|
4013
4092
|
o.value.open ? e.preventDefault() : s.value = !1, i("cancel");
|
|
4014
4093
|
};
|
|
4015
|
-
|
|
4094
|
+
S(() => {
|
|
4016
4095
|
d.value && d.value.addEventListener("cancel", m);
|
|
4017
|
-
}),
|
|
4096
|
+
}), C(() => {
|
|
4018
4097
|
d.value && d.value.removeEventListener("cancel", m);
|
|
4019
4098
|
});
|
|
4020
4099
|
let h = () => {
|
|
@@ -4026,8 +4105,8 @@ var Jr = {
|
|
|
4026
4105
|
showModal: f,
|
|
4027
4106
|
close: p
|
|
4028
4107
|
});
|
|
4029
|
-
let _ =
|
|
4030
|
-
|
|
4108
|
+
let _ = E(0);
|
|
4109
|
+
P(s, () => {
|
|
4031
4110
|
!s.value && o.value.destroyOnClose && (_.value += 1);
|
|
4032
4111
|
});
|
|
4033
4112
|
let v = () => u("dialog", {
|
|
@@ -4055,9 +4134,9 @@ var Jr = {
|
|
|
4055
4134
|
]);
|
|
4056
4135
|
return o.value.nonBlocking ? () => u("div", null, [o.value.nonBlocking && s.value && u("div", { class: `${c.value}__backdrop` }, null), u(v, null, null)]) : () => u(v, null, null);
|
|
4057
4136
|
}
|
|
4058
|
-
}),
|
|
4137
|
+
}), Ki = (e) => {
|
|
4059
4138
|
let t = X();
|
|
4060
|
-
return r(() =>
|
|
4139
|
+
return r(() => L({
|
|
4061
4140
|
margin: 0,
|
|
4062
4141
|
padding: 0,
|
|
4063
4142
|
boxSizing: "border-box",
|
|
@@ -4130,7 +4209,7 @@ var Jr = {
|
|
|
4130
4209
|
"&--normal": { fontStyle: "normal" },
|
|
4131
4210
|
"&--italic": { fontStyle: "italic" }
|
|
4132
4211
|
}));
|
|
4133
|
-
},
|
|
4212
|
+
}, qi = {
|
|
4134
4213
|
h1: "h1",
|
|
4135
4214
|
h2: "h2",
|
|
4136
4215
|
h3: "h3",
|
|
@@ -4146,13 +4225,13 @@ var Jr = {
|
|
|
4146
4225
|
b4: "p",
|
|
4147
4226
|
b5: "p",
|
|
4148
4227
|
b6: "p"
|
|
4149
|
-
},
|
|
4228
|
+
}, Ji = [
|
|
4150
4229
|
"http:",
|
|
4151
4230
|
"https:",
|
|
4152
4231
|
"mailto:",
|
|
4153
4232
|
"tel:",
|
|
4154
4233
|
"ftp:"
|
|
4155
|
-
],
|
|
4234
|
+
], Yi = (e) => Ji.some((t) => e.trim().toLowerCase().startsWith(t)), Xi = (e) => {
|
|
4156
4235
|
let t = [
|
|
4157
4236
|
{
|
|
4158
4237
|
regex: /\*\*([\s\S]+?)\*\*/g,
|
|
@@ -4176,59 +4255,59 @@ var Jr = {
|
|
|
4176
4255
|
url: a ? t[2]?.trim() : void 0
|
|
4177
4256
|
});
|
|
4178
4257
|
return n;
|
|
4179
|
-
},
|
|
4258
|
+
}, Zi = (e) => {
|
|
4180
4259
|
let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end), n = [], r = 0;
|
|
4181
4260
|
for (let e of t) e.start >= r && (n.push(e), r = e.end);
|
|
4182
4261
|
return n;
|
|
4183
|
-
},
|
|
4262
|
+
}, Qi = (e) => {
|
|
4184
4263
|
if (!e) return [e];
|
|
4185
|
-
let t =
|
|
4264
|
+
let t = Xi(e);
|
|
4186
4265
|
if (t.length === 0) return [e];
|
|
4187
|
-
let n =
|
|
4266
|
+
let n = Zi(t), r = [], i = 0;
|
|
4188
4267
|
for (let t of n) {
|
|
4189
4268
|
t.start > i && r.push(e.substring(i, t.start));
|
|
4190
|
-
let n =
|
|
4191
|
-
t.tag === "a" ? t.url &&
|
|
4269
|
+
let n = Qi(t.content);
|
|
4270
|
+
t.tag === "a" ? t.url && Yi(t.url) ? r.push(p("a", {
|
|
4192
4271
|
href: t.url,
|
|
4193
4272
|
target: "_blank",
|
|
4194
4273
|
rel: "noopener noreferrer"
|
|
4195
|
-
}, n)) : r.push(...n) : r.push(
|
|
4274
|
+
}, n)) : r.push(...n) : r.push(p(t.tag, n)), i = t.end;
|
|
4196
4275
|
}
|
|
4197
4276
|
return i < e.length && r.push(e.substring(i)), r.length > 0 ? r : [e];
|
|
4198
|
-
},
|
|
4199
|
-
if (e.type === n) return
|
|
4277
|
+
}, $i = (e) => typeof e == "object" && !!e && "type" in e && e.type !== void 0, ea = (e) => {
|
|
4278
|
+
if (e.type === n) return Qi(typeof e.children == "string" ? e.children : "");
|
|
4200
4279
|
if (!e.children) return e;
|
|
4201
4280
|
let t;
|
|
4202
4281
|
if (Array.isArray(e.children)) t = e.children.flatMap((e) => {
|
|
4203
|
-
if (typeof e == "string") return
|
|
4204
|
-
if (
|
|
4205
|
-
let t =
|
|
4282
|
+
if (typeof e == "string") return Qi(e);
|
|
4283
|
+
if ($i(e)) {
|
|
4284
|
+
let t = ea(e);
|
|
4206
4285
|
return Array.isArray(t) ? t : [t];
|
|
4207
4286
|
}
|
|
4208
4287
|
return [];
|
|
4209
4288
|
});
|
|
4210
|
-
else if (typeof e.children == "string") t =
|
|
4211
|
-
else if (
|
|
4212
|
-
let n =
|
|
4289
|
+
else if (typeof e.children == "string") t = Qi(e.children);
|
|
4290
|
+
else if ($i(e.children)) {
|
|
4291
|
+
let n = ea(e.children);
|
|
4213
4292
|
t = Array.isArray(n) ? n : [n];
|
|
4214
4293
|
} else return e;
|
|
4215
|
-
return
|
|
4216
|
-
},
|
|
4217
|
-
if (typeof e == "string") return
|
|
4294
|
+
return p(e.type, { ...e.props }, t);
|
|
4295
|
+
}, ta = (e) => {
|
|
4296
|
+
if (typeof e == "string") return Qi(e);
|
|
4218
4297
|
if (Array.isArray(e)) return e.flatMap((e) => {
|
|
4219
|
-
if (typeof e == "string") return
|
|
4220
|
-
if (
|
|
4221
|
-
let t =
|
|
4298
|
+
if (typeof e == "string") return Qi(e);
|
|
4299
|
+
if ($i(e)) {
|
|
4300
|
+
let t = ea(e);
|
|
4222
4301
|
return Array.isArray(t) ? t : [t];
|
|
4223
4302
|
}
|
|
4224
4303
|
return [e];
|
|
4225
4304
|
});
|
|
4226
|
-
if (
|
|
4227
|
-
let t =
|
|
4305
|
+
if ($i(e)) {
|
|
4306
|
+
let t = ea(e);
|
|
4228
4307
|
return Array.isArray(t) ? t : [t];
|
|
4229
4308
|
}
|
|
4230
4309
|
return [e];
|
|
4231
|
-
},
|
|
4310
|
+
}, na = {
|
|
4232
4311
|
fontStyle: "normal",
|
|
4233
4312
|
fontWeight: "regular",
|
|
4234
4313
|
variant: "b0",
|
|
@@ -4247,21 +4326,21 @@ var Jr = {
|
|
|
4247
4326
|
}
|
|
4248
4327
|
},
|
|
4249
4328
|
setup(e, { attrs: t, slots: n }) {
|
|
4250
|
-
let i = r(() =>
|
|
4329
|
+
let i = r(() => U({}, na, e, t)), a = X(), o = Ki(r(() => Ee(a.value.colors, i.value.color) || a.value.typography.color).value), s = r(() => [
|
|
4251
4330
|
o.value,
|
|
4252
4331
|
`${o.value}--${i.value.variant}`,
|
|
4253
4332
|
`${o.value}--${i.value.fontWeight}`,
|
|
4254
4333
|
`${o.value}--${i.value.fontStyle}`
|
|
4255
|
-
]), c = r(() => i.value.as ||
|
|
4334
|
+
]), c = r(() => i.value.as || qi[i.value.variant]), l = r(() => i.value.parseMarkdown ?? a.value.parseMarkdown);
|
|
4256
4335
|
return () => {
|
|
4257
4336
|
let e = n.default?.();
|
|
4258
|
-
if (!e) return
|
|
4259
|
-
if (!l.value) return
|
|
4260
|
-
let t =
|
|
4261
|
-
return
|
|
4337
|
+
if (!e) return p(c.value, { class: s.value });
|
|
4338
|
+
if (!l.value) return p(c.value, { class: s.value }, e);
|
|
4339
|
+
let t = ta(e);
|
|
4340
|
+
return p(c.value, { class: s.value }, t);
|
|
4262
4341
|
};
|
|
4263
4342
|
}
|
|
4264
|
-
}),
|
|
4343
|
+
}), ra = () => r(() => L({
|
|
4265
4344
|
"& > [class$=\"__body\"]": { paddingBlock: 0 },
|
|
4266
4345
|
"&__body": {
|
|
4267
4346
|
display: "flex",
|
|
@@ -4274,15 +4353,15 @@ var Jr = {
|
|
|
4274
4353
|
width: "3.5rem",
|
|
4275
4354
|
height: "auto"
|
|
4276
4355
|
}
|
|
4277
|
-
})),
|
|
4356
|
+
})), ia = {
|
|
4278
4357
|
cancelText: "Cancel",
|
|
4279
4358
|
confirmText: "OK"
|
|
4280
|
-
},
|
|
4359
|
+
}, aa = /* @__PURE__ */ d({
|
|
4281
4360
|
name: "TDialog",
|
|
4282
4361
|
components: {
|
|
4283
4362
|
TTypography: $,
|
|
4284
|
-
TModal:
|
|
4285
|
-
TButton:
|
|
4363
|
+
TModal: Gi,
|
|
4364
|
+
TButton: Rr,
|
|
4286
4365
|
TIcon: Q
|
|
4287
4366
|
},
|
|
4288
4367
|
props: {
|
|
@@ -4307,10 +4386,10 @@ var Jr = {
|
|
|
4307
4386
|
"close"
|
|
4308
4387
|
],
|
|
4309
4388
|
setup(e, { emit: t }) {
|
|
4310
|
-
let n = r(() =>
|
|
4311
|
-
if (n.value.color) return n.value.color === "primary" ? "primary.main" :
|
|
4389
|
+
let n = r(() => U({}, ia, e)), i = ra(), a = r(() => {
|
|
4390
|
+
if (n.value.color) return n.value.color === "primary" ? "primary.main" : Fr(n.value.color);
|
|
4312
4391
|
});
|
|
4313
|
-
return () =>
|
|
4392
|
+
return () => p(Gi, {
|
|
4314
4393
|
onClose: () => n.value.cancellable && t("close"),
|
|
4315
4394
|
onCancel: () => n.value.cancellable && t("cancel"),
|
|
4316
4395
|
onConfirm: () => t("confirm"),
|
|
@@ -4318,125 +4397,292 @@ var Jr = {
|
|
|
4318
4397
|
open: !0,
|
|
4319
4398
|
size: n.value.size
|
|
4320
4399
|
}, {
|
|
4321
|
-
header: () =>
|
|
4400
|
+
header: () => p($, {
|
|
4322
4401
|
variant: "s2",
|
|
4323
4402
|
fontWeight: "semibold"
|
|
4324
4403
|
}, () => n.value.title),
|
|
4325
|
-
default: () =>
|
|
4404
|
+
default: () => p("div", { class: `${i.value}__body` }, [n.value.icon ? p(Q, {
|
|
4326
4405
|
class: `${i.value}__body-icon`,
|
|
4327
4406
|
variant: "solid",
|
|
4328
4407
|
color: a.value,
|
|
4329
4408
|
icon: n.value.icon
|
|
4330
|
-
}) : void 0,
|
|
4409
|
+
}) : void 0, p($, {
|
|
4331
4410
|
class: `${i.value}__body-text`,
|
|
4332
4411
|
variant: "b1",
|
|
4333
4412
|
innerHTML: n.value.message
|
|
4334
4413
|
})]),
|
|
4335
|
-
footer: () => [n.value.cancellable ?
|
|
4414
|
+
footer: () => [n.value.cancellable ? p(Rr, {
|
|
4336
4415
|
onClick: () => t("cancel"),
|
|
4337
4416
|
color: n.value.color,
|
|
4338
4417
|
variant: "secondary"
|
|
4339
|
-
}, () => n.value.cancelText) : void 0,
|
|
4418
|
+
}, () => n.value.cancelText) : void 0, p(Rr, {
|
|
4340
4419
|
onClick: () => t("confirm"),
|
|
4341
4420
|
color: n.value.color
|
|
4342
4421
|
}, () => n.value.confirmText)]
|
|
4343
4422
|
});
|
|
4344
4423
|
}
|
|
4345
|
-
}),
|
|
4424
|
+
}), oa = T({
|
|
4425
|
+
open: !1,
|
|
4426
|
+
options: null
|
|
4427
|
+
}), sa = null, ca = null, la = null, ua = !1, da = (e) => {
|
|
4428
|
+
let t = ca;
|
|
4429
|
+
oa.open = !1, sa = null, ca = null, la = () => t?.(e);
|
|
4430
|
+
}, fa = () => {
|
|
4431
|
+
la?.(), la = null;
|
|
4432
|
+
}, pa = d({
|
|
4433
|
+
name: "TConfirmHost",
|
|
4434
|
+
setup: () => () => oa.options ? p(Hi, {
|
|
4435
|
+
...oa.options,
|
|
4436
|
+
open: oa.open,
|
|
4437
|
+
onConfirm: () => da(!0),
|
|
4438
|
+
onCancel: () => da(!1),
|
|
4439
|
+
onClosed: fa
|
|
4440
|
+
}) : null
|
|
4441
|
+
}), ma = "t-confirm", ha = (e) => {
|
|
4442
|
+
if (ua) return;
|
|
4443
|
+
ua = !0;
|
|
4444
|
+
let t = document.createElement("div");
|
|
4445
|
+
if (document.body.appendChild(t), !e) {
|
|
4446
|
+
let e = i(pa);
|
|
4447
|
+
e.config.idPrefix = ma, e.mount(t);
|
|
4448
|
+
return;
|
|
4449
|
+
}
|
|
4450
|
+
let n = p(pa);
|
|
4451
|
+
n.appContext = {
|
|
4452
|
+
...e,
|
|
4453
|
+
config: {
|
|
4454
|
+
...e.config,
|
|
4455
|
+
idPrefix: ma
|
|
4456
|
+
}
|
|
4457
|
+
}, D(n, t);
|
|
4458
|
+
}, ga = () => {
|
|
4459
|
+
let e = f()?.appContext ?? null;
|
|
4460
|
+
return (t) => sa || (fa(), ha(e), oa.options = t, oa.open = !0, sa = new Promise((e) => {
|
|
4461
|
+
ca = e;
|
|
4462
|
+
}), sa);
|
|
4463
|
+
}, _a = Symbol("TDrawer"), va = {
|
|
4346
4464
|
key: 0,
|
|
4347
4465
|
class: "t-drawer__header"
|
|
4348
|
-
},
|
|
4466
|
+
}, ya = {
|
|
4467
|
+
key: 1,
|
|
4468
|
+
class: "t-drawer__error",
|
|
4469
|
+
role: "alert"
|
|
4470
|
+
}, ba = { class: "t-drawer__error-message" }, xa = {
|
|
4471
|
+
key: 2,
|
|
4472
|
+
class: "t-drawer__skeleton",
|
|
4473
|
+
"data-t-drawer-skeleton": "",
|
|
4474
|
+
"aria-hidden": "true"
|
|
4475
|
+
}, Sa = {
|
|
4476
|
+
key: 0,
|
|
4477
|
+
class: "t-drawer__skeleton-line",
|
|
4478
|
+
"data-width": "title"
|
|
4479
|
+
}, Ca = {
|
|
4349
4480
|
key: 1,
|
|
4350
4481
|
class: "t-drawer__footer"
|
|
4351
|
-
},
|
|
4482
|
+
}, wa = {
|
|
4483
|
+
key: 1,
|
|
4484
|
+
class: "t-drawer__skeleton-footer",
|
|
4485
|
+
"aria-hidden": "true"
|
|
4486
|
+
}, Ta = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4352
4487
|
name: "TDrawer",
|
|
4353
4488
|
__name: "TDrawer",
|
|
4354
|
-
props: /* @__PURE__ */
|
|
4489
|
+
props: /* @__PURE__ */ g({
|
|
4355
4490
|
size: { default: "s" },
|
|
4356
|
-
contentKey: {}
|
|
4491
|
+
contentKey: {},
|
|
4492
|
+
dirty: { type: Boolean },
|
|
4493
|
+
state: { default: "ready" },
|
|
4494
|
+
discardTitle: { default: "¿Descartar los cambios?" },
|
|
4495
|
+
discardDescription: { default: "Si sales ahora, se perderán los cambios que no guardaste." },
|
|
4496
|
+
discardConfirmLabel: { default: "Descartar cambios" },
|
|
4497
|
+
discardCancelLabel: { default: "Seguir editando" },
|
|
4498
|
+
errorMessage: { default: "No pudimos cargar la información." },
|
|
4499
|
+
retryLabel: { default: "Reintentar" }
|
|
4357
4500
|
}, {
|
|
4358
4501
|
open: {
|
|
4359
4502
|
type: Boolean,
|
|
4360
4503
|
default: !1
|
|
4361
4504
|
},
|
|
4362
|
-
openModifiers: {}
|
|
4505
|
+
openModifiers: {},
|
|
4506
|
+
level: { default: 1 },
|
|
4507
|
+
levelModifiers: {},
|
|
4508
|
+
mode: { default: "view" },
|
|
4509
|
+
modeModifiers: {}
|
|
4363
4510
|
}),
|
|
4364
|
-
emits: ["
|
|
4365
|
-
|
|
4366
|
-
|
|
4511
|
+
emits: /* @__PURE__ */ g(["retry"], [
|
|
4512
|
+
"update:open",
|
|
4513
|
+
"update:level",
|
|
4514
|
+
"update:mode"
|
|
4515
|
+
]),
|
|
4516
|
+
setup(t, { expose: n, emit: i }) {
|
|
4517
|
+
let d = i, f = M(t, "open"), p = M(t, "level"), m = M(t, "mode"), h = N("content"), g = N("body"), _ = r(() => m.value === "edit"), y = E(!1), b = null, x = () => {
|
|
4367
4518
|
let e = document.activeElement;
|
|
4368
|
-
|
|
4369
|
-
},
|
|
4370
|
-
let e =
|
|
4519
|
+
h.value?.$el.contains(e) || (b = e instanceof HTMLElement && e !== document.body ? e : null);
|
|
4520
|
+
}, S = () => {
|
|
4521
|
+
let e = h.value?.$el;
|
|
4371
4522
|
(e?.querySelector("[data-t-drawer-title]") ?? e)?.focus({ preventScroll: !0 });
|
|
4372
|
-
};
|
|
4373
|
-
|
|
4374
|
-
e &&
|
|
4523
|
+
}, C = E(!1);
|
|
4524
|
+
P(f, (e) => {
|
|
4525
|
+
e && (C.value = !1, x());
|
|
4375
4526
|
}, {
|
|
4376
4527
|
immediate: !0,
|
|
4377
4528
|
flush: "sync"
|
|
4378
|
-
}),
|
|
4379
|
-
|
|
4380
|
-
}, { flush: "sync" })
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4529
|
+
}), P(m, () => {
|
|
4530
|
+
C.value = f.value;
|
|
4531
|
+
}, { flush: "sync" }), P([f, m], ([e, t], [n, r]) => {
|
|
4532
|
+
t !== "edit" || !e ? y.value = !1 : n && r === "view" && (y.value = !0);
|
|
4533
|
+
});
|
|
4534
|
+
let T = null;
|
|
4535
|
+
P(() => t.contentKey, async (e) => {
|
|
4536
|
+
!f.value || e === void 0 || (x(), await v(), g.value?.scrollTo({ top: 0 }), S());
|
|
4537
|
+
}, { flush: "sync" }), P([() => t.contentKey, p], ([e, t], [n, r]) => {
|
|
4538
|
+
e !== n && t === 1 && r === 1 && (T = null);
|
|
4539
|
+
});
|
|
4540
|
+
let D = () => {
|
|
4541
|
+
let e = T;
|
|
4542
|
+
if (T = null, !e) return !1;
|
|
4543
|
+
let t = h.value?.$el.querySelectorAll("[data-t-drawer-link-row]") ?? [], n = e.element.isConnected ? e.element : [...t].find((t) => t.textContent?.trim() === e.label);
|
|
4544
|
+
return n?.focus({ preventScroll: !0 }), !!n;
|
|
4545
|
+
};
|
|
4546
|
+
P(p, async (e, t) => {
|
|
4547
|
+
f.value && (await v(), g.value?.scrollTo({ top: 0 }), !(e < t && D()) && S());
|
|
4548
|
+
});
|
|
4549
|
+
let te = (e) => {
|
|
4550
|
+
e.preventDefault(), S();
|
|
4551
|
+
}, ne = (e) => {
|
|
4552
|
+
e.preventDefault(), !f.value && (b?.isConnected && b.focus({ preventScroll: !0 }), b = null);
|
|
4553
|
+
}, re = ga(), ie = () => t.dirty ? re({
|
|
4554
|
+
title: t.discardTitle,
|
|
4555
|
+
description: t.discardDescription,
|
|
4556
|
+
confirmLabel: t.discardConfirmLabel,
|
|
4557
|
+
cancelLabel: t.discardCancelLabel
|
|
4558
|
+
}) : Promise.resolve(!0), I = () => t.dirty ? ie().then((e) => (e && (f.value = !1), e)) : (f.value = !1, Promise.resolve(!0)), L = !1, oe = (e) => {
|
|
4559
|
+
L = e.key === "Escape" && !!h.value?.$el.querySelector("[aria-expanded=\"true\"]:is([role=\"combobox\"], [aria-haspopup]:not([aria-haspopup=\"false\"]))");
|
|
4560
|
+
}, se = (e) => {
|
|
4561
|
+
if (L || !h.value?.$el.contains(document.activeElement)) {
|
|
4562
|
+
e.preventDefault();
|
|
4563
|
+
return;
|
|
4564
|
+
}
|
|
4565
|
+
t.dirty && (e.preventDefault(), I());
|
|
4566
|
+
}, ce = E(!1);
|
|
4567
|
+
P(() => f.value && t.state === "loading", (e, t, n) => {
|
|
4568
|
+
if (ce.value = !1, !e) return;
|
|
4569
|
+
let r = setTimeout(() => {
|
|
4570
|
+
ce.value = !0;
|
|
4571
|
+
}, 300);
|
|
4572
|
+
n(() => clearTimeout(r));
|
|
4573
|
+
}, { immediate: !0 });
|
|
4574
|
+
let le = () => {
|
|
4575
|
+
S(), d("retry");
|
|
4389
4576
|
};
|
|
4390
|
-
return (
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4577
|
+
return ee(_a, {
|
|
4578
|
+
mode: m,
|
|
4579
|
+
level: p,
|
|
4580
|
+
editFromView: y,
|
|
4581
|
+
pending: r(() => t.state !== "ready"),
|
|
4582
|
+
skeleton: ce,
|
|
4583
|
+
requestClose: I,
|
|
4584
|
+
back: async () => {
|
|
4585
|
+
if (!_.value) {
|
|
4586
|
+
p.value = 1;
|
|
4587
|
+
return;
|
|
4588
|
+
}
|
|
4589
|
+
await ie() && (m.value = "view");
|
|
4590
|
+
},
|
|
4591
|
+
rememberLinkRow: (e, t) => {
|
|
4592
|
+
T = {
|
|
4593
|
+
element: e,
|
|
4594
|
+
label: t
|
|
4595
|
+
};
|
|
4596
|
+
}
|
|
4597
|
+
}), n({
|
|
4598
|
+
confirmDiscard: ie,
|
|
4599
|
+
requestClose: I
|
|
4600
|
+
}), (n, r) => (w(), a(j(R), {
|
|
4601
|
+
open: f.value,
|
|
4602
|
+
"onUpdate:open": r[1] ||= (e) => f.value = e,
|
|
4603
|
+
modal: _.value
|
|
4394
4604
|
}, {
|
|
4395
|
-
default:
|
|
4396
|
-
default:
|
|
4605
|
+
default: F(() => [u(j(he), null, {
|
|
4606
|
+
default: F(() => [u(j(me), { class: "t-drawer__scrim" }), u(j(pe), {
|
|
4397
4607
|
ref_key: "content",
|
|
4398
|
-
ref:
|
|
4608
|
+
ref: h,
|
|
4399
4609
|
as: "section",
|
|
4400
4610
|
class: "t-drawer",
|
|
4401
|
-
role: "region",
|
|
4611
|
+
role: _.value ? "dialog" : "region",
|
|
4612
|
+
"aria-modal": _.value || void 0,
|
|
4613
|
+
"aria-busy": t.state === "loading" || void 0,
|
|
4402
4614
|
tabindex: "-1",
|
|
4403
4615
|
"aria-describedby": void 0,
|
|
4404
|
-
"data-size":
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4616
|
+
"data-size": t.size,
|
|
4617
|
+
"data-mode": m.value,
|
|
4618
|
+
"data-skip-enter": C.value || void 0,
|
|
4619
|
+
onOpenAutoFocus: te,
|
|
4620
|
+
onCloseAutoFocus: ne,
|
|
4621
|
+
onEscapeKeyDown: se,
|
|
4622
|
+
onInteractOutside: r[0] ||= ae(() => {}, ["prevent"]),
|
|
4623
|
+
onKeydownCapture: oe
|
|
4410
4624
|
}, {
|
|
4411
|
-
default:
|
|
4412
|
-
|
|
4625
|
+
default: F(() => [
|
|
4626
|
+
n.$slots.header ? (w(), s("div", va, [k(n.$slots, "header", {}, void 0, !0)])) : o("", !0),
|
|
4413
4627
|
c("div", {
|
|
4414
4628
|
ref_key: "body",
|
|
4415
|
-
ref:
|
|
4629
|
+
ref: g,
|
|
4416
4630
|
class: "t-drawer__body"
|
|
4417
|
-
}, [
|
|
4418
|
-
|
|
4631
|
+
}, [t.state === "ready" ? k(n.$slots, "default", { key: 0 }, void 0, !0) : t.state === "error" ? (w(), s("div", ya, [k(n.$slots, "error", { retry: le }, () => [c("p", ba, A(t.errorMessage), 1), u(j(Rr), {
|
|
4632
|
+
variant: "secondary",
|
|
4633
|
+
size: "small",
|
|
4634
|
+
onClick: le
|
|
4635
|
+
}, {
|
|
4636
|
+
default: F(() => [l(A(t.retryLabel), 1)]),
|
|
4637
|
+
_: 1
|
|
4638
|
+
})], !0)])) : ce.value ? (w(), s("div", xa, [(w(), s(e, null, O([4, 3], (t) => c("div", {
|
|
4639
|
+
key: t,
|
|
4640
|
+
class: "t-drawer__skeleton-section"
|
|
4641
|
+
}, [t === 3 ? (w(), s("span", Sa)) : o("", !0), (w(!0), s(e, null, O(t, (e) => (w(), s("div", {
|
|
4642
|
+
key: e,
|
|
4643
|
+
class: "t-drawer__skeleton-row"
|
|
4644
|
+
}, [...r[2] ||= [c("span", {
|
|
4645
|
+
class: "t-drawer__skeleton-line",
|
|
4646
|
+
"data-width": "label"
|
|
4647
|
+
}, null, -1), c("span", {
|
|
4648
|
+
class: "t-drawer__skeleton-line",
|
|
4649
|
+
"data-width": "value"
|
|
4650
|
+
}, null, -1)]]))), 128))])), 64))])) : o("", !0)], 512),
|
|
4651
|
+
n.$slots.footer && (t.state === "ready" || ce.value) ? (w(), s("div", Ca, [t.state === "ready" ? k(n.$slots, "footer", { key: 0 }, void 0, !0) : (w(), s("div", wa, [...r[3] ||= [c("span", {
|
|
4652
|
+
class: "t-drawer__skeleton-line",
|
|
4653
|
+
"data-width": "button"
|
|
4654
|
+
}, null, -1), c("span", {
|
|
4655
|
+
class: "t-drawer__skeleton-line",
|
|
4656
|
+
"data-width": "button"
|
|
4657
|
+
}, null, -1)]]))])) : o("", !0)
|
|
4419
4658
|
]),
|
|
4420
4659
|
_: 3
|
|
4421
|
-
}, 8, [
|
|
4660
|
+
}, 8, [
|
|
4661
|
+
"role",
|
|
4662
|
+
"aria-modal",
|
|
4663
|
+
"aria-busy",
|
|
4664
|
+
"data-size",
|
|
4665
|
+
"data-mode",
|
|
4666
|
+
"data-skip-enter"
|
|
4667
|
+
])]),
|
|
4422
4668
|
_: 3
|
|
4423
4669
|
})]),
|
|
4424
4670
|
_: 3
|
|
4425
|
-
}, 8, ["open"]));
|
|
4671
|
+
}, 8, ["open", "modal"]));
|
|
4426
4672
|
}
|
|
4427
|
-
}), [["__scopeId", "data-v-
|
|
4673
|
+
}), [["__scopeId", "data-v-cf563856"]]), Ea = { class: "t-drawer-footer" }, Da = {
|
|
4428
4674
|
key: 0,
|
|
4429
4675
|
class: "t-drawer-footer__start"
|
|
4430
|
-
},
|
|
4676
|
+
}, Oa = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4431
4677
|
name: "TDrawerFooter",
|
|
4432
4678
|
__name: "TDrawerFooter",
|
|
4433
4679
|
setup(e) {
|
|
4434
|
-
return (e, t) => (
|
|
4680
|
+
return (e, t) => (w(), s("div", Ea, [e.$slots.start ? (w(), s("div", Da, [k(e.$slots, "start", {}, void 0, !0)])) : o("", !0), k(e.$slots, "default", {}, void 0, !0)]));
|
|
4435
4681
|
}
|
|
4436
|
-
}), [["__scopeId", "data-v-240938ba"]]),
|
|
4437
|
-
let t = X(), n = r(() => e.value === "neutral"), i = r(() =>
|
|
4682
|
+
}), [["__scopeId", "data-v-240938ba"]]), ka = (e) => {
|
|
4683
|
+
let t = X(), n = r(() => e.value === "neutral"), i = r(() => Fr(e.value)), a = r(() => n.value ? "var(--neutral-solid-hover)" : i.value === "primary" ? t.value.colors.primary.toku : bn(.15, t.value.colors[i.value])), o = r(() => n.value ? "var(--neutral-text-contrast)" : i.value === "primary" ? t.value.colors.primary.main : t.value.colors[i.value]), s = r(() => n.value ? "var(--neutral-border-hover)" : i.value === "primary" ? t.value.colors.primary.light1 : Cn(.15, t.value.colors[i.value])), c = r(() => n.value ? "var(--neutral-text)" : i.value === "primary" ? t.value.colors.primary.light2 : Cn(.2, t.value.colors[i.value])), l = r(() => n.value ? "var(--neutral-bg-subtle)" : i.value === "primary" ? t.value.colors.primary.light3 : Cn(.25, t.value.colors[i.value]));
|
|
4438
4684
|
return {
|
|
4439
|
-
baseClass: r(() =>
|
|
4685
|
+
baseClass: r(() => L({
|
|
4440
4686
|
"&, *": {
|
|
4441
4687
|
margin: 0,
|
|
4442
4688
|
padding: 0,
|
|
@@ -4509,7 +4755,7 @@ var Jr = {
|
|
|
4509
4755
|
},
|
|
4510
4756
|
"&--rounded": { borderRadius: "50%" }
|
|
4511
4757
|
})),
|
|
4512
|
-
iconClass: r(() =>
|
|
4758
|
+
iconClass: r(() => L({
|
|
4513
4759
|
margin: 0,
|
|
4514
4760
|
padding: 0,
|
|
4515
4761
|
"&--large": { height: "1.25rem" },
|
|
@@ -4517,13 +4763,13 @@ var Jr = {
|
|
|
4517
4763
|
"&--small": { height: "1rem" }
|
|
4518
4764
|
}))
|
|
4519
4765
|
};
|
|
4520
|
-
},
|
|
4766
|
+
}, Aa = {
|
|
4521
4767
|
variant: "primary",
|
|
4522
4768
|
size: "medium",
|
|
4523
4769
|
icon: "academic-cap",
|
|
4524
4770
|
type: "button",
|
|
4525
4771
|
color: "primary"
|
|
4526
|
-
},
|
|
4772
|
+
}, ja = /* @__PURE__ */ d({
|
|
4527
4773
|
name: "TIconButton",
|
|
4528
4774
|
props: {
|
|
4529
4775
|
variant: String,
|
|
@@ -4537,7 +4783,7 @@ var Jr = {
|
|
|
4537
4783
|
},
|
|
4538
4784
|
emits: ["click"],
|
|
4539
4785
|
setup(e, { attrs: t, emit: n }) {
|
|
4540
|
-
let i = r(() =>
|
|
4786
|
+
let i = r(() => U({}, Aa, e, t)), { baseClass: a, iconClass: o } = ka(r(() => i.value.color)), s = X(), c = r(() => [
|
|
4541
4787
|
a.value,
|
|
4542
4788
|
`${a.value}--${i.value.variant}`,
|
|
4543
4789
|
`${a.value}--${i.value.size}`,
|
|
@@ -4550,15 +4796,15 @@ var Jr = {
|
|
|
4550
4796
|
]), d = () => {
|
|
4551
4797
|
i.value.loading || n("click");
|
|
4552
4798
|
};
|
|
4553
|
-
return () => u("button",
|
|
4799
|
+
return () => u("button", _({
|
|
4554
4800
|
class: c.value,
|
|
4555
4801
|
type: i.value.type,
|
|
4556
4802
|
disabled: i.value.disabled,
|
|
4557
4803
|
onClick: d
|
|
4558
|
-
}, t), [i.value.loading ? u(
|
|
4804
|
+
}, t), [i.value.loading ? u(I, {
|
|
4559
4805
|
class: `${a.value}__spinner`,
|
|
4560
4806
|
icon: "svg-spinners:90-ring-with-bg"
|
|
4561
|
-
}, null) : u(
|
|
4807
|
+
}, null) : u(I, {
|
|
4562
4808
|
icon: `${s.value.iconSet}:${i.value.icon}`,
|
|
4563
4809
|
class: l.value
|
|
4564
4810
|
}, null)]);
|
|
@@ -4566,21 +4812,21 @@ var Jr = {
|
|
|
4566
4812
|
});
|
|
4567
4813
|
//#endregion
|
|
4568
4814
|
//#region src/composables/click.ts
|
|
4569
|
-
function
|
|
4815
|
+
function Ma(e, t) {
|
|
4570
4816
|
let n = (n) => {
|
|
4571
4817
|
let r = e();
|
|
4572
4818
|
r && !r.contains(n.target) && t();
|
|
4573
4819
|
};
|
|
4574
|
-
|
|
4820
|
+
S(() => {
|
|
4575
4821
|
document.addEventListener("click", n);
|
|
4576
|
-
}),
|
|
4822
|
+
}), x(() => {
|
|
4577
4823
|
document.removeEventListener("click", n);
|
|
4578
4824
|
});
|
|
4579
4825
|
}
|
|
4580
4826
|
//#endregion
|
|
4581
4827
|
//#region src/composables/tooltip.ts
|
|
4582
|
-
var
|
|
4583
|
-
let t =
|
|
4828
|
+
var Na = (e) => {
|
|
4829
|
+
let t = E(!1), n = null, i = () => {
|
|
4584
4830
|
t.value = !0, n && clearTimeout(n);
|
|
4585
4831
|
}, a = () => t.value = !1, o = {
|
|
4586
4832
|
hover: {
|
|
@@ -4590,15 +4836,15 @@ var ra = (e) => {
|
|
|
4590
4836
|
}
|
|
4591
4837
|
},
|
|
4592
4838
|
click: { onClick: () => t.value ? a() : i() }
|
|
4593
|
-
}, s = r(() => o[e.value ?? "hover"]), c =
|
|
4594
|
-
return
|
|
4839
|
+
}, s = r(() => o[e.value ?? "hover"]), c = E(null);
|
|
4840
|
+
return Ma(() => c.value, a), {
|
|
4595
4841
|
isVisible: t,
|
|
4596
4842
|
triggerHandler: s,
|
|
4597
4843
|
wrapperRef: c
|
|
4598
4844
|
};
|
|
4599
|
-
},
|
|
4845
|
+
}, Pa = () => {
|
|
4600
4846
|
let e = X();
|
|
4601
|
-
return r(() =>
|
|
4847
|
+
return r(() => L({
|
|
4602
4848
|
position: "relative",
|
|
4603
4849
|
width: "fit-content",
|
|
4604
4850
|
"&, *": {
|
|
@@ -4688,11 +4934,11 @@ var ra = (e) => {
|
|
|
4688
4934
|
"&--medium &__tooltip": { maxWidth: "30ch" },
|
|
4689
4935
|
"&--large &__tooltip": { maxWidth: "35ch" }
|
|
4690
4936
|
}));
|
|
4691
|
-
},
|
|
4937
|
+
}, Fa = {
|
|
4692
4938
|
position: "right",
|
|
4693
4939
|
size: "medium",
|
|
4694
4940
|
trigger: "hover"
|
|
4695
|
-
},
|
|
4941
|
+
}, Ia = /* @__PURE__ */ d({
|
|
4696
4942
|
name: "TTooltip",
|
|
4697
4943
|
props: {
|
|
4698
4944
|
label: String,
|
|
@@ -4702,7 +4948,7 @@ var ra = (e) => {
|
|
|
4702
4948
|
trigger: String
|
|
4703
4949
|
},
|
|
4704
4950
|
setup(e, { slots: t, attrs: n }) {
|
|
4705
|
-
let i = r(() =>
|
|
4951
|
+
let i = r(() => U({}, Fa, e, n)), { isVisible: a, wrapperRef: o, triggerHandler: s } = Na(r(() => i.value.trigger)), c = Pa(), l = r(() => [
|
|
4706
4952
|
c.value,
|
|
4707
4953
|
`${c.value}--${i.value.position}`,
|
|
4708
4954
|
`${c.value}--${i.value.trigger}`,
|
|
@@ -4712,7 +4958,7 @@ var ra = (e) => {
|
|
|
4712
4958
|
[`${c.value}--${i.value.size}`]: i.value.multilined
|
|
4713
4959
|
}
|
|
4714
4960
|
]);
|
|
4715
|
-
return () => u("div",
|
|
4961
|
+
return () => u("div", _({
|
|
4716
4962
|
ref: o,
|
|
4717
4963
|
class: l.value
|
|
4718
4964
|
}, s.value), [t.default?.(), u("div", {
|
|
@@ -4720,10 +4966,14 @@ var ra = (e) => {
|
|
|
4720
4966
|
class: `${c.value}__tooltip`
|
|
4721
4967
|
}, [t.label?.() || i.value.label])]);
|
|
4722
4968
|
}
|
|
4723
|
-
}),
|
|
4969
|
+
}), La = { class: "t-drawer-header" }, Ra = { class: "t-drawer-header__lead" }, za = ["aria-label"], Ba = { class: "t-drawer-header__heading" }, Va = ["id"], Ha = {
|
|
4970
|
+
key: 0,
|
|
4971
|
+
class: "t-drawer-header__skeleton",
|
|
4972
|
+
"aria-hidden": "true"
|
|
4973
|
+
}, Ua = {
|
|
4724
4974
|
key: 0,
|
|
4725
4975
|
class: "t-drawer-header__status"
|
|
4726
|
-
},
|
|
4976
|
+
}, Wa = { class: "t-drawer-header__actions" }, Ga = ["aria-label"], Ka = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4727
4977
|
name: "TDrawerHeader",
|
|
4728
4978
|
__name: "TDrawerHeader",
|
|
4729
4979
|
props: {
|
|
@@ -4742,47 +4992,57 @@ var ra = (e) => {
|
|
|
4742
4992
|
"close"
|
|
4743
4993
|
],
|
|
4744
4994
|
setup(t, { emit: n }) {
|
|
4745
|
-
let i = n, d =
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4995
|
+
let i = n, d = _e(null), f = m(_a, null), p = r(() => f?.mode.value === "edit"), h = r(() => f?.pending.value ?? !1), g = r(() => f?.skeleton.value ?? !1), _ = r(() => p.value ? f?.editFromView.value ?? !1 : t.back || f?.level.value === 2), b = r(() => !h.value), x = (e) => e.edit ? 0 : e.destructive ? 2 : 1, S = r(() => [...t.actions].sort((e, t) => x(e) - x(t))), C = r(() => p.value || h.value ? [] : S.value), ee = r(() => C.value.length <= 2 ? C.value : C.value.filter((e) => e.edit)), T = r(() => C.value.filter((e) => !ee.value.includes(e))), D = E(!1), te = N("menu");
|
|
4996
|
+
P(() => T.value.length === 0, (e) => {
|
|
4997
|
+
e && (D.value = !1);
|
|
4998
|
+
});
|
|
4999
|
+
let ne = (e) => {
|
|
5000
|
+
D.value = !1, i("action", e.id);
|
|
5001
|
+
}, re = (e) => {
|
|
5002
|
+
e.key !== "Escape" || !D.value || (e.stopPropagation(), D.value = !1, v(() => te.value?.querySelector("button")?.focus()));
|
|
5003
|
+
}, M = () => {
|
|
5004
|
+
p.value || i("back"), f?.back();
|
|
5005
|
+
}, ie = () => {
|
|
5006
|
+
if (f) {
|
|
5007
|
+
f.requestClose().then((e) => e && i("close"));
|
|
5008
|
+
return;
|
|
5009
|
+
}
|
|
4750
5010
|
d?.onOpenChange(!1), i("close");
|
|
4751
5011
|
};
|
|
4752
|
-
return (n, r) => (
|
|
5012
|
+
return (n, r) => (w(), s("div", La, [c("div", Ra, [_.value ? (w(), a(j(Ia), {
|
|
4753
5013
|
key: 0,
|
|
4754
5014
|
label: t.backLabel,
|
|
4755
5015
|
position: "bottom"
|
|
4756
5016
|
}, {
|
|
4757
|
-
default:
|
|
5017
|
+
default: F(() => [c("button", {
|
|
4758
5018
|
type: "button",
|
|
4759
5019
|
class: "t-drawer-header__plain-button",
|
|
4760
5020
|
"aria-label": t.backLabel,
|
|
4761
|
-
onClick:
|
|
4762
|
-
}, [u(
|
|
5021
|
+
onClick: M
|
|
5022
|
+
}, [u(j(Q), {
|
|
4763
5023
|
icon: "chevron-left",
|
|
4764
5024
|
size: "small",
|
|
4765
5025
|
color: "currentColor"
|
|
4766
|
-
})], 8,
|
|
5026
|
+
})], 8, za)]),
|
|
4767
5027
|
_: 1
|
|
4768
|
-
}, 8, ["label"])) : o("", !0), c("div",
|
|
4769
|
-
id:
|
|
5028
|
+
}, 8, ["label"])) : o("", !0), c("div", Ba, [c("h2", {
|
|
5029
|
+
id: j(d)?.titleId,
|
|
4770
5030
|
class: "t-drawer-header__title",
|
|
4771
5031
|
tabindex: "-1",
|
|
4772
5032
|
"data-t-drawer-title": ""
|
|
4773
|
-
}, [
|
|
5033
|
+
}, [g.value ? (w(), s("span", Ha)) : o("", !0), c("span", { class: y({ "t-drawer-header__visually-hidden": g.value }) }, [k(n.$slots, "title", {}, () => [l(A(t.title), 1)], !0)], 2)], 8, Va), b.value && (t.status || n.$slots.status) ? (w(), s("span", Ua, [k(n.$slots, "status", {}, () => [u(j(Hr), {
|
|
4774
5034
|
size: "small",
|
|
4775
5035
|
variant: t.statusVariant
|
|
4776
5036
|
}, {
|
|
4777
|
-
default:
|
|
5037
|
+
default: F(() => [l(A(t.status), 1)]),
|
|
4778
5038
|
_: 1
|
|
4779
|
-
}, 8, ["variant"])], !0)])) : o("", !0)])]), c("div",
|
|
4780
|
-
(
|
|
5039
|
+
}, 8, ["variant"])], !0)])) : o("", !0)])]), c("div", Wa, [
|
|
5040
|
+
(w(!0), s(e, null, O(ee.value, (e) => (w(), a(j(Ia), {
|
|
4781
5041
|
key: e.id,
|
|
4782
5042
|
label: e.label,
|
|
4783
5043
|
position: "bottom"
|
|
4784
5044
|
}, {
|
|
4785
|
-
default:
|
|
5045
|
+
default: F(() => [u(j(ja), {
|
|
4786
5046
|
variant: "secondary",
|
|
4787
5047
|
color: "neutral",
|
|
4788
5048
|
size: "small",
|
|
@@ -4798,65 +5058,62 @@ var ra = (e) => {
|
|
|
4798
5058
|
])]),
|
|
4799
5059
|
_: 2
|
|
4800
5060
|
}, 1032, ["label"]))), 128)),
|
|
4801
|
-
|
|
5061
|
+
T.value.length ? (w(), s("div", {
|
|
4802
5062
|
key: 0,
|
|
4803
5063
|
ref_key: "menu",
|
|
4804
|
-
ref:
|
|
5064
|
+
ref: te,
|
|
4805
5065
|
class: "t-drawer-header__menu",
|
|
4806
|
-
onKeydown:
|
|
4807
|
-
}, [u(
|
|
4808
|
-
open:
|
|
5066
|
+
onKeydown: re
|
|
5067
|
+
}, [u(j(oi), {
|
|
5068
|
+
open: D.value,
|
|
4809
5069
|
position: "bottom-end",
|
|
4810
|
-
onCancel: r[
|
|
5070
|
+
onCancel: r[1] ||= (e) => D.value = !1
|
|
4811
5071
|
}, {
|
|
4812
|
-
trigger:
|
|
5072
|
+
trigger: F(() => [u(j(Ia), {
|
|
4813
5073
|
label: t.moreActionsLabel,
|
|
4814
5074
|
position: "bottom"
|
|
4815
5075
|
}, {
|
|
4816
|
-
default:
|
|
5076
|
+
default: F(() => [u(j(ja), {
|
|
4817
5077
|
variant: "secondary",
|
|
4818
5078
|
color: "neutral",
|
|
4819
5079
|
size: "small",
|
|
4820
5080
|
icon: "ellipsis-vertical",
|
|
4821
5081
|
"aria-label": t.moreActionsLabel,
|
|
4822
5082
|
"aria-haspopup": "menu",
|
|
4823
|
-
"aria-expanded":
|
|
4824
|
-
onClick: r[
|
|
5083
|
+
"aria-expanded": D.value,
|
|
5084
|
+
onClick: r[0] ||= (e) => D.value = !D.value
|
|
4825
5085
|
}, null, 8, ["aria-label", "aria-expanded"])]),
|
|
4826
5086
|
_: 1
|
|
4827
5087
|
}, 8, ["label"])]),
|
|
4828
|
-
default:
|
|
5088
|
+
default: F(() => [(w(!0), s(e, null, O(T.value, (e) => (w(), a(j(ci), {
|
|
4829
5089
|
key: e.id,
|
|
4830
5090
|
disabled: e.disabled,
|
|
4831
|
-
onClick: (t) =>
|
|
5091
|
+
onClick: (t) => ne(e)
|
|
4832
5092
|
}, {
|
|
4833
|
-
default:
|
|
5093
|
+
default: F(() => [l(A(e.label), 1)]),
|
|
4834
5094
|
_: 2
|
|
4835
5095
|
}, 1032, ["disabled", "onClick"]))), 128))]),
|
|
4836
5096
|
_: 1
|
|
4837
5097
|
}, 8, ["open"])], 544)) : o("", !0),
|
|
4838
|
-
u(
|
|
5098
|
+
u(j(Ia), {
|
|
4839
5099
|
label: t.closeLabel,
|
|
4840
5100
|
position: "bottom"
|
|
4841
5101
|
}, {
|
|
4842
|
-
default:
|
|
5102
|
+
default: F(() => [c("button", {
|
|
4843
5103
|
type: "button",
|
|
4844
5104
|
class: "t-drawer-header__plain-button",
|
|
4845
5105
|
"aria-label": t.closeLabel,
|
|
4846
|
-
onClick:
|
|
4847
|
-
}, [u(
|
|
5106
|
+
onClick: ie
|
|
5107
|
+
}, [u(j(Q), {
|
|
4848
5108
|
icon: "x-mark",
|
|
4849
5109
|
size: "small",
|
|
4850
5110
|
color: "currentColor"
|
|
4851
|
-
})], 8,
|
|
5111
|
+
})], 8, Ga)]),
|
|
4852
5112
|
_: 1
|
|
4853
5113
|
}, 8, ["label"])
|
|
4854
5114
|
])]));
|
|
4855
5115
|
}
|
|
4856
|
-
}), [["__scopeId", "data-v-
|
|
4857
|
-
type: "button",
|
|
4858
|
-
class: "t-drawer-link-row"
|
|
4859
|
-
}, _a = { class: "t-drawer-link-row__label" }, va = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
5116
|
+
}), [["__scopeId", "data-v-96f6bdd6"]]), qa = ["aria-disabled"], Ja = { class: "t-drawer-link-row__label" }, Ya = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4860
5117
|
name: "TDrawerLinkRow",
|
|
4861
5118
|
__name: "TDrawerLinkRow",
|
|
4862
5119
|
props: {
|
|
@@ -4864,22 +5121,35 @@ var ra = (e) => {
|
|
|
4864
5121
|
icon: {}
|
|
4865
5122
|
},
|
|
4866
5123
|
setup(e) {
|
|
4867
|
-
|
|
4868
|
-
|
|
5124
|
+
let t = m(_a, null), n = r(() => t?.level.value === 2), i = (r) => {
|
|
5125
|
+
if (n.value) {
|
|
5126
|
+
r.stopImmediatePropagation(), process.env.NODE_ENV !== "production" && console.warn("[TDrawerLinkRow] A drawer has 2 levels at most: a level 2 record cannot open another one.");
|
|
5127
|
+
return;
|
|
5128
|
+
}
|
|
5129
|
+
t?.rememberLinkRow(r.currentTarget, e.label);
|
|
5130
|
+
};
|
|
5131
|
+
return (t, r) => (w(), s("button", {
|
|
5132
|
+
type: "button",
|
|
5133
|
+
class: "t-drawer-link-row",
|
|
5134
|
+
"data-t-drawer-link-row": "",
|
|
5135
|
+
"aria-disabled": n.value || void 0,
|
|
5136
|
+
onClick: i
|
|
5137
|
+
}, [
|
|
5138
|
+
e.icon ? (w(), a(j(Q), {
|
|
4869
5139
|
key: 0,
|
|
4870
5140
|
icon: e.icon,
|
|
4871
5141
|
size: "small",
|
|
4872
5142
|
color: "currentColor"
|
|
4873
5143
|
}, null, 8, ["icon"])) : o("", !0),
|
|
4874
|
-
c("span",
|
|
4875
|
-
u(
|
|
5144
|
+
c("span", Ja, A(e.label), 1),
|
|
5145
|
+
u(j(Q), {
|
|
4876
5146
|
icon: "chevron-right",
|
|
4877
5147
|
size: "small",
|
|
4878
5148
|
color: "currentColor"
|
|
4879
5149
|
})
|
|
4880
|
-
]));
|
|
5150
|
+
], 8, qa));
|
|
4881
5151
|
}
|
|
4882
|
-
}), [["__scopeId", "data-v-
|
|
5152
|
+
}), [["__scopeId", "data-v-a7a9d35b"]]), Xa = { class: "t-drawer-row" }, Za = { class: "t-drawer-row__label-cell" }, Qa = { class: "t-drawer-row__value" }, $a = ["href"], eo = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4883
5153
|
name: "TDrawerRow",
|
|
4884
5154
|
__name: "TDrawerRow",
|
|
4885
5155
|
props: {
|
|
@@ -4890,69 +5160,69 @@ var ra = (e) => {
|
|
|
4890
5160
|
},
|
|
4891
5161
|
emits: ["open"],
|
|
4892
5162
|
setup(t, { emit: n }) {
|
|
4893
|
-
let i = n, o = r(() => t.value === null || t.value === void 0 || t.value === "" ? "—" : t.value), u = r(() => t.variant === "link" && o.value !== "—"), d =
|
|
5163
|
+
let i = n, o = r(() => t.value === null || t.value === void 0 || t.value === "" ? "—" : t.value), u = r(() => t.variant === "link" && o.value !== "—"), d = N("labelElement"), f = E(!1), p = () => {
|
|
4894
5164
|
let e = d.value;
|
|
4895
5165
|
e && (f.value = e.scrollHeight > e.clientHeight);
|
|
4896
5166
|
};
|
|
4897
|
-
return
|
|
5167
|
+
return S(() => {
|
|
4898
5168
|
p(), document.fonts?.ready.then(p);
|
|
4899
|
-
}),
|
|
5169
|
+
}), P(() => t.label, () => v(p)), (n, r) => (w(), s("div", Xa, [c("div", Za, [f.value ? (w(), a(j(Ia), {
|
|
4900
5170
|
key: 0,
|
|
4901
5171
|
label: t.label,
|
|
4902
5172
|
position: "top",
|
|
4903
5173
|
multilined: "",
|
|
4904
5174
|
size: "medium"
|
|
4905
5175
|
}, {
|
|
4906
|
-
default:
|
|
5176
|
+
default: F(() => [c("p", {
|
|
4907
5177
|
ref_key: "labelElement",
|
|
4908
5178
|
ref: d,
|
|
4909
5179
|
class: "t-drawer-row__label"
|
|
4910
|
-
},
|
|
5180
|
+
}, A(t.label), 513)]),
|
|
4911
5181
|
_: 1
|
|
4912
|
-
}, 8, ["label"])) : (
|
|
5182
|
+
}, 8, ["label"])) : (w(), s("p", {
|
|
4913
5183
|
key: 1,
|
|
4914
5184
|
ref_key: "labelElement",
|
|
4915
5185
|
ref: d,
|
|
4916
5186
|
class: "t-drawer-row__label"
|
|
4917
|
-
},
|
|
5187
|
+
}, A(t.label), 513))]), c("div", Qa, [k(n.$slots, "default", {}, () => [u.value && t.href ? (w(), s("a", {
|
|
4918
5188
|
key: 0,
|
|
4919
5189
|
href: t.href,
|
|
4920
5190
|
class: "t-drawer-row__link"
|
|
4921
|
-
},
|
|
5191
|
+
}, A(o.value), 9, $a)) : u.value ? (w(), s("button", {
|
|
4922
5192
|
key: 1,
|
|
4923
5193
|
type: "button",
|
|
4924
5194
|
class: "t-drawer-row__link",
|
|
4925
5195
|
onClick: r[0] ||= (e) => i("open")
|
|
4926
|
-
},
|
|
5196
|
+
}, A(o.value), 1)) : (w(), s(e, { key: 2 }, [l(A(o.value), 1)], 64))], !0)])]));
|
|
4927
5197
|
}
|
|
4928
|
-
}), [["__scopeId", "data-v-7905f54b"]]),
|
|
5198
|
+
}), [["__scopeId", "data-v-7905f54b"]]), to = { class: "t-drawer-section" }, no = {
|
|
4929
5199
|
key: 0,
|
|
4930
5200
|
class: "t-drawer-section__title"
|
|
4931
|
-
},
|
|
5201
|
+
}, ro = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4932
5202
|
name: "TDrawerSection",
|
|
4933
5203
|
__name: "TDrawerSection",
|
|
4934
5204
|
props: { title: {} },
|
|
4935
5205
|
setup(e) {
|
|
4936
|
-
return (t, n) => (
|
|
5206
|
+
return (t, n) => (w(), s("div", to, [e.title || t.$slots.title ? (w(), s("h3", no, [k(t.$slots, "title", {}, () => [l(A(e.title), 1)], !0)])) : o("", !0), k(t.$slots, "default", {}, void 0, !0)]));
|
|
4937
5207
|
}
|
|
4938
|
-
}), [["__scopeId", "data-v-400a57a7"]]),
|
|
5208
|
+
}), [["__scopeId", "data-v-400a57a7"]]), io = {
|
|
4939
5209
|
key: 0,
|
|
4940
5210
|
class: "t-file-upload__label"
|
|
4941
|
-
},
|
|
5211
|
+
}, ao = ["for"], oo = { class: "t-file-upload__filename" }, so = ["aria-label", "disabled"], co = [
|
|
4942
5212
|
"id",
|
|
4943
5213
|
"name",
|
|
4944
5214
|
"required",
|
|
4945
5215
|
"disabled",
|
|
4946
5216
|
"form",
|
|
4947
5217
|
"accept"
|
|
4948
|
-
],
|
|
5218
|
+
], lo = {
|
|
4949
5219
|
key: 4,
|
|
4950
5220
|
class: "t-file-upload__hints"
|
|
4951
|
-
},
|
|
5221
|
+
}, uo = { key: 1 }, fo = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
4952
5222
|
name: "TFileUpload",
|
|
4953
5223
|
inheritAttrs: !1,
|
|
4954
5224
|
__name: "TFileUpload",
|
|
4955
|
-
props: /* @__PURE__ */
|
|
5225
|
+
props: /* @__PURE__ */ g({
|
|
4956
5226
|
label: {},
|
|
4957
5227
|
ctaText: { default: "Subir archivo" },
|
|
4958
5228
|
loadingText: { default: "Cargando archivo" },
|
|
@@ -4972,11 +5242,11 @@ var ra = (e) => {
|
|
|
4972
5242
|
modelValue: { default: null },
|
|
4973
5243
|
modelModifiers: {}
|
|
4974
5244
|
}),
|
|
4975
|
-
emits: /* @__PURE__ */
|
|
5245
|
+
emits: /* @__PURE__ */ g(["error"], ["update:modelValue"]),
|
|
4976
5246
|
setup(e, { expose: t, emit: n }) {
|
|
4977
|
-
let i = n, d =
|
|
5247
|
+
let i = n, d = M(e, "modelValue"), f = E(null), p = re(), m = r(() => e.id ?? p), { wrapperAttrs: h, staticAttrs: g, listenerAttrs: v } = mi(), y = r(() => e.loading ? "loading" : d.value ? "loaded" : "empty"), b = r(() => {
|
|
4978
5248
|
if (!(!e.accept || e.accept.length === 0)) return e.accept.map((e) => `.${e}`).join(",");
|
|
4979
|
-
}),
|
|
5249
|
+
}), x = r(() => y.value === "empty" && (!!e.formatsHint || !!e.maxSizeHint)), C = () => {
|
|
4980
5250
|
let e = f.value;
|
|
4981
5251
|
if (!e) return;
|
|
4982
5252
|
let t = d.value;
|
|
@@ -4990,7 +5260,7 @@ var ra = (e) => {
|
|
|
4990
5260
|
n.items.add(t), e.files = n.files;
|
|
4991
5261
|
} catch {}
|
|
4992
5262
|
}
|
|
4993
|
-
},
|
|
5263
|
+
}, ee = () => {
|
|
4994
5264
|
let t = f.value;
|
|
4995
5265
|
if (!t) return;
|
|
4996
5266
|
let n = t.files?.[0];
|
|
@@ -4998,76 +5268,76 @@ var ra = (e) => {
|
|
|
4998
5268
|
if (e.accept?.length) {
|
|
4999
5269
|
let t = n.name.toLowerCase();
|
|
5000
5270
|
if (!e.accept.some((e) => t.endsWith(`.${e.toLowerCase()}`))) {
|
|
5001
|
-
|
|
5271
|
+
C(), i("error", "bad-format");
|
|
5002
5272
|
return;
|
|
5003
5273
|
}
|
|
5004
5274
|
}
|
|
5005
5275
|
if (e.maxSizeBytes !== void 0 && n.size > e.maxSizeBytes) {
|
|
5006
|
-
|
|
5276
|
+
C(), i("error", "too-large");
|
|
5007
5277
|
return;
|
|
5008
5278
|
}
|
|
5009
5279
|
d.value = n;
|
|
5010
5280
|
}
|
|
5011
|
-
},
|
|
5281
|
+
}, T = () => {
|
|
5012
5282
|
e.disabled || (d.value = null);
|
|
5013
5283
|
};
|
|
5014
|
-
return
|
|
5284
|
+
return S(C), P(d, C), t({ inputRef: f }), (t, n) => (w(), a(j(z), _(j(h), {
|
|
5015
5285
|
as: e.as,
|
|
5016
5286
|
class: "t-file-upload",
|
|
5017
5287
|
"data-state": y.value,
|
|
5018
5288
|
"data-disabled": e.disabled || void 0
|
|
5019
5289
|
}), {
|
|
5020
|
-
default:
|
|
5021
|
-
e.label || t.$slots.label ? (
|
|
5290
|
+
default: F(() => [
|
|
5291
|
+
e.label || t.$slots.label ? (w(), s("div", io, [k(t.$slots, "label", {}, () => [u(j($), {
|
|
5022
5292
|
variant: "b3",
|
|
5023
5293
|
"font-weight": "semibold"
|
|
5024
5294
|
}, {
|
|
5025
|
-
default:
|
|
5295
|
+
default: F(() => [l(A(e.label), 1)]),
|
|
5026
5296
|
_: 1
|
|
5027
5297
|
})], !0)])) : o("", !0),
|
|
5028
|
-
y.value === "empty" ? (
|
|
5298
|
+
y.value === "empty" ? (w(), s("label", _({ key: 1 }, j(v), {
|
|
5029
5299
|
class: "t-file-upload__box",
|
|
5030
5300
|
"data-state": "empty",
|
|
5031
5301
|
for: m.value
|
|
5032
|
-
}), [u(
|
|
5302
|
+
}), [u(j(Q), {
|
|
5033
5303
|
icon: "paper-clip",
|
|
5034
5304
|
size: "small",
|
|
5035
5305
|
color: "gray.main"
|
|
5036
|
-
}), u(
|
|
5306
|
+
}), u(j($), {
|
|
5037
5307
|
variant: "b3",
|
|
5038
5308
|
class: "t-file-upload__cta-text"
|
|
5039
5309
|
}, {
|
|
5040
|
-
default:
|
|
5310
|
+
default: F(() => [k(t.$slots, "cta", {}, () => [l(A(e.ctaText), 1)], !0)]),
|
|
5041
5311
|
_: 3
|
|
5042
|
-
})], 16,
|
|
5312
|
+
})], 16, ao)) : y.value === "loading" ? (w(), s("div", _({ key: 2 }, j(v), {
|
|
5043
5313
|
class: "t-file-upload__box",
|
|
5044
5314
|
"data-state": "loading"
|
|
5045
|
-
}), [u(
|
|
5315
|
+
}), [u(j(Q), {
|
|
5046
5316
|
icon: "arrow-path",
|
|
5047
5317
|
size: "small",
|
|
5048
5318
|
color: "primary.main"
|
|
5049
|
-
}), u(
|
|
5319
|
+
}), u(j($), {
|
|
5050
5320
|
variant: "b3",
|
|
5051
5321
|
class: "t-file-upload__cta-text",
|
|
5052
5322
|
color: "primary.main"
|
|
5053
5323
|
}, {
|
|
5054
|
-
default:
|
|
5324
|
+
default: F(() => [k(t.$slots, "loading", {}, () => [l(A(e.loadingText), 1)], !0)]),
|
|
5055
5325
|
_: 3
|
|
5056
|
-
})], 16)) : (
|
|
5326
|
+
})], 16)) : (w(), s("div", _({ key: 3 }, j(v), {
|
|
5057
5327
|
class: "t-file-upload__box",
|
|
5058
5328
|
"data-state": "loaded"
|
|
5059
5329
|
}), [
|
|
5060
|
-
u(
|
|
5330
|
+
u(j(Q), {
|
|
5061
5331
|
icon: "document",
|
|
5062
5332
|
size: "small",
|
|
5063
5333
|
color: "primary.main"
|
|
5064
5334
|
}),
|
|
5065
|
-
c("div",
|
|
5335
|
+
c("div", oo, [k(t.$slots, "file", { file: d.value }, () => [u(j($), {
|
|
5066
5336
|
variant: "b3",
|
|
5067
5337
|
color: "primary.main",
|
|
5068
5338
|
class: "t-file-upload__filename-text"
|
|
5069
5339
|
}, {
|
|
5070
|
-
default:
|
|
5340
|
+
default: F(() => [l(A(d.value.name), 1)]),
|
|
5071
5341
|
_: 1
|
|
5072
5342
|
})], !0)]),
|
|
5073
5343
|
c("button", {
|
|
@@ -5075,19 +5345,19 @@ var ra = (e) => {
|
|
|
5075
5345
|
class: "t-file-upload__remove",
|
|
5076
5346
|
"aria-label": e.removeLabel,
|
|
5077
5347
|
disabled: e.disabled,
|
|
5078
|
-
onClick:
|
|
5079
|
-
}, [u(
|
|
5348
|
+
onClick: T
|
|
5349
|
+
}, [u(j(Q), {
|
|
5080
5350
|
icon: "x-circle",
|
|
5081
5351
|
color: "#FFFFFF",
|
|
5082
5352
|
width: 18,
|
|
5083
5353
|
height: 18
|
|
5084
|
-
})], 8,
|
|
5354
|
+
})], 8, so)
|
|
5085
5355
|
], 16)),
|
|
5086
|
-
c("input",
|
|
5356
|
+
c("input", _({
|
|
5087
5357
|
id: m.value,
|
|
5088
5358
|
ref_key: "inputRef",
|
|
5089
5359
|
ref: f
|
|
5090
|
-
},
|
|
5360
|
+
}, j(g), {
|
|
5091
5361
|
class: "t-file-upload__input",
|
|
5092
5362
|
type: "file",
|
|
5093
5363
|
title: "",
|
|
@@ -5096,21 +5366,21 @@ var ra = (e) => {
|
|
|
5096
5366
|
disabled: e.disabled || e.loading,
|
|
5097
5367
|
form: e.form,
|
|
5098
5368
|
accept: b.value,
|
|
5099
|
-
onChange:
|
|
5100
|
-
}), null, 16,
|
|
5101
|
-
|
|
5369
|
+
onChange: ee
|
|
5370
|
+
}), null, 16, co),
|
|
5371
|
+
x.value ? (w(), s("div", lo, [e.formatsHint ? (w(), a(j($), {
|
|
5102
5372
|
key: 0,
|
|
5103
5373
|
variant: "b4",
|
|
5104
5374
|
color: "gray.medium1"
|
|
5105
5375
|
}, {
|
|
5106
|
-
default:
|
|
5376
|
+
default: F(() => [l(A(e.formatsHint), 1)]),
|
|
5107
5377
|
_: 1
|
|
5108
|
-
})) : (
|
|
5378
|
+
})) : (w(), s("span", uo)), e.maxSizeHint ? (w(), a(j($), {
|
|
5109
5379
|
key: 2,
|
|
5110
5380
|
variant: "b4",
|
|
5111
5381
|
color: "gray.medium1"
|
|
5112
5382
|
}, {
|
|
5113
|
-
default:
|
|
5383
|
+
default: F(() => [l(A(e.maxSizeHint), 1)]),
|
|
5114
5384
|
_: 1
|
|
5115
5385
|
})) : o("", !0)])) : o("", !0)
|
|
5116
5386
|
]),
|
|
@@ -5121,9 +5391,9 @@ var ra = (e) => {
|
|
|
5121
5391
|
"data-disabled"
|
|
5122
5392
|
]));
|
|
5123
5393
|
}
|
|
5124
|
-
}), [["__scopeId", "data-v-1352af96"]]),
|
|
5394
|
+
}), [["__scopeId", "data-v-1352af96"]]), po = () => {
|
|
5125
5395
|
let e = X();
|
|
5126
|
-
return r(() =>
|
|
5396
|
+
return r(() => L({
|
|
5127
5397
|
margin: 0,
|
|
5128
5398
|
padding: 0,
|
|
5129
5399
|
width: "fit-content",
|
|
@@ -5151,10 +5421,10 @@ var ra = (e) => {
|
|
|
5151
5421
|
fontSize: "0.875rem"
|
|
5152
5422
|
}
|
|
5153
5423
|
}));
|
|
5154
|
-
},
|
|
5424
|
+
}, mo = {
|
|
5155
5425
|
variant: "primary",
|
|
5156
5426
|
size: "medium"
|
|
5157
|
-
},
|
|
5427
|
+
}, ho = /* @__PURE__ */ d({
|
|
5158
5428
|
name: "TButton",
|
|
5159
5429
|
props: {
|
|
5160
5430
|
variant: String,
|
|
@@ -5164,23 +5434,23 @@ var ra = (e) => {
|
|
|
5164
5434
|
rightIcon: String
|
|
5165
5435
|
},
|
|
5166
5436
|
setup(e, { attrs: t, slots: n }) {
|
|
5167
|
-
let i = r(() =>
|
|
5437
|
+
let i = r(() => U({}, mo, e, t)), a = po(), o = X(), s = r(() => [
|
|
5168
5438
|
a.value,
|
|
5169
5439
|
`${a.value}--${i.value.variant}`,
|
|
5170
5440
|
`${a.value}--${i.value.size}`
|
|
5171
5441
|
]);
|
|
5172
|
-
return () => u("a",
|
|
5442
|
+
return () => u("a", _({
|
|
5173
5443
|
class: s.value,
|
|
5174
5444
|
href: i.value.href
|
|
5175
5445
|
}, t), [
|
|
5176
|
-
i.value.leftIcon ? u(
|
|
5446
|
+
i.value.leftIcon ? u(I, { icon: `${o.value.iconSet}:${i.value.leftIcon}` }, null) : null,
|
|
5177
5447
|
n.default ? n.default() : null,
|
|
5178
|
-
i.value.rightIcon ? u(
|
|
5448
|
+
i.value.rightIcon ? u(I, { icon: `${o.value.iconSet}:${i.value.rightIcon}` }, null) : null
|
|
5179
5449
|
]);
|
|
5180
5450
|
}
|
|
5181
|
-
}),
|
|
5451
|
+
}), go = (e) => {
|
|
5182
5452
|
let t = r(() => e.color), n = X();
|
|
5183
|
-
return r(() =>
|
|
5453
|
+
return r(() => L({
|
|
5184
5454
|
margin: 0,
|
|
5185
5455
|
padding: 0,
|
|
5186
5456
|
width: "3.5rem",
|
|
@@ -5204,17 +5474,17 @@ var ra = (e) => {
|
|
|
5204
5474
|
"100%": { transform: "rotate(360deg)" }
|
|
5205
5475
|
}
|
|
5206
5476
|
}));
|
|
5207
|
-
},
|
|
5477
|
+
}, _o = { size: "auto" }, vo = /* @__PURE__ */ d({
|
|
5208
5478
|
name: "TSpinner",
|
|
5209
5479
|
props: {
|
|
5210
5480
|
size: String,
|
|
5211
5481
|
color: String
|
|
5212
5482
|
},
|
|
5213
5483
|
setup(e, { attrs: t }) {
|
|
5214
|
-
let n = r(() =>
|
|
5484
|
+
let n = r(() => U({}, _o, e, t)), i = X(), a = go({ color: r(() => n.value.color && (Ee(i.value.colors, n.value.color) || n.value.color)).value }), o = r(() => [a.value, `${a.value}--${n.value.size}`]);
|
|
5215
5485
|
return () => u("div", { class: o.value }, null);
|
|
5216
5486
|
}
|
|
5217
|
-
}),
|
|
5487
|
+
}), yo = () => r(() => L({
|
|
5218
5488
|
bottom: 0,
|
|
5219
5489
|
left: 0,
|
|
5220
5490
|
position: "absolute",
|
|
@@ -5231,7 +5501,7 @@ var ra = (e) => {
|
|
|
5231
5501
|
position: "fixed",
|
|
5232
5502
|
zIndex: 999
|
|
5233
5503
|
}
|
|
5234
|
-
})),
|
|
5504
|
+
})), bo = { size: "auto" }, xo = /* @__PURE__ */ d({
|
|
5235
5505
|
name: "TLoading",
|
|
5236
5506
|
props: {
|
|
5237
5507
|
active: Boolean,
|
|
@@ -5239,19 +5509,19 @@ var ra = (e) => {
|
|
|
5239
5509
|
size: String
|
|
5240
5510
|
},
|
|
5241
5511
|
setup(e, { attrs: t }) {
|
|
5242
|
-
let n = r(() =>
|
|
5512
|
+
let n = r(() => U({}, bo, e, t)), i = yo(), a = r(() => [i.value, {
|
|
5243
5513
|
[`${i.value}--active`]: n.value.active,
|
|
5244
5514
|
[`${i.value}--full-page`]: n.value.fullPage
|
|
5245
5515
|
}]);
|
|
5246
|
-
return () => u("div", { class: a.value }, [u(
|
|
5516
|
+
return () => u("div", { class: a.value }, [u(vo, { size: n.value.size }, null)]);
|
|
5247
5517
|
}
|
|
5248
|
-
}),
|
|
5518
|
+
}), So = {
|
|
5249
5519
|
key: 0,
|
|
5250
5520
|
class: "t-loading-dots__text"
|
|
5251
|
-
},
|
|
5521
|
+
}, Co = {
|
|
5252
5522
|
key: 0,
|
|
5253
5523
|
class: "t-loading-dots__message"
|
|
5254
|
-
},
|
|
5524
|
+
}, wo = ["data-pending", "aria-hidden"], To = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
5255
5525
|
name: "TLoadingDots",
|
|
5256
5526
|
__name: "TLoadingDots",
|
|
5257
5527
|
props: {
|
|
@@ -5264,42 +5534,42 @@ var ra = (e) => {
|
|
|
5264
5534
|
as: { default: "div" }
|
|
5265
5535
|
},
|
|
5266
5536
|
setup(e) {
|
|
5267
|
-
let t =
|
|
5537
|
+
let t = ie(), n = E(!1), i, u = () => {
|
|
5268
5538
|
clearTimeout(i), i = void 0;
|
|
5269
5539
|
}, d = (e) => {
|
|
5270
5540
|
i = setTimeout(() => {
|
|
5271
5541
|
n.value = !0;
|
|
5272
5542
|
}, e);
|
|
5273
5543
|
};
|
|
5274
|
-
|
|
5544
|
+
C(u), P(() => e.hintDelay, (e) => {
|
|
5275
5545
|
u(), n.value = !1, e !== !1 && d(e);
|
|
5276
5546
|
}, { immediate: !0 });
|
|
5277
5547
|
let f = r(() => !!(e.hint || t.hint) && e.hintDelay !== !1), p = r(() => !!(e.message || t.message));
|
|
5278
|
-
return (t, r) => (
|
|
5548
|
+
return (t, r) => (w(), a(j(z), {
|
|
5279
5549
|
as: e.as,
|
|
5280
5550
|
class: "t-loading-dots",
|
|
5281
5551
|
role: "status",
|
|
5282
5552
|
"aria-live": "polite"
|
|
5283
5553
|
}, {
|
|
5284
|
-
default:
|
|
5554
|
+
default: F(() => [r[0] ||= c("span", {
|
|
5285
5555
|
class: "t-loading-dots__dots",
|
|
5286
5556
|
"aria-hidden": "true"
|
|
5287
5557
|
}, [
|
|
5288
5558
|
c("span", { class: "t-loading-dots__dot" }),
|
|
5289
5559
|
c("span", { class: "t-loading-dots__dot" }),
|
|
5290
5560
|
c("span", { class: "t-loading-dots__dot" })
|
|
5291
|
-
], -1), p.value || f.value ? (
|
|
5561
|
+
], -1), p.value || f.value ? (w(), s("span", So, [p.value ? (w(), s("span", Co, [k(t.$slots, "message", {}, () => [l(A(e.message), 1)], !0)])) : o("", !0), f.value ? (w(), s("span", {
|
|
5292
5562
|
key: n.value ? "shown" : "pending",
|
|
5293
5563
|
class: "t-loading-dots__hint",
|
|
5294
5564
|
"data-pending": !n.value || void 0,
|
|
5295
5565
|
"aria-hidden": !n.value || void 0
|
|
5296
|
-
}, [
|
|
5566
|
+
}, [k(t.$slots, "hint", {}, () => [l(A(e.hint), 1)], !0)], 8, wo)) : o("", !0)])) : o("", !0)]),
|
|
5297
5567
|
_: 3
|
|
5298
5568
|
}, 8, ["as"]));
|
|
5299
5569
|
}
|
|
5300
|
-
}), [["__scopeId", "data-v-9bc5da3b"]]),
|
|
5570
|
+
}), [["__scopeId", "data-v-9bc5da3b"]]), Eo = () => {
|
|
5301
5571
|
let e = X();
|
|
5302
|
-
return r(() =>
|
|
5572
|
+
return r(() => L({
|
|
5303
5573
|
"&, *": {
|
|
5304
5574
|
margin: 0,
|
|
5305
5575
|
padding: 0,
|
|
@@ -5346,7 +5616,7 @@ var ra = (e) => {
|
|
|
5346
5616
|
"&--disabled &__radio::after": { background: e.value.colors.gray.medium2 },
|
|
5347
5617
|
"&--disabled &__label": { color: e.value.colors.gray.medium2 }
|
|
5348
5618
|
}));
|
|
5349
|
-
},
|
|
5619
|
+
}, Do = { labelPosition: "right" }, Oo = /* @__PURE__ */ d({
|
|
5350
5620
|
name: "TRadio",
|
|
5351
5621
|
props: {
|
|
5352
5622
|
id: String,
|
|
@@ -5384,11 +5654,11 @@ var ra = (e) => {
|
|
|
5384
5654
|
"update:modelValue"
|
|
5385
5655
|
],
|
|
5386
5656
|
setup(e, { emit: t, attrs: n }) {
|
|
5387
|
-
let i = r(() =>
|
|
5388
|
-
|
|
5657
|
+
let i = r(() => U({}, Do, e, n)), a = E(i.value.modelValue === i.value.value);
|
|
5658
|
+
P(() => [i.value.modelValue, i.value.value], () => {
|
|
5389
5659
|
a.value = i.value.modelValue === i.value.value;
|
|
5390
5660
|
});
|
|
5391
|
-
let o =
|
|
5661
|
+
let o = Eo(), s = r(() => [
|
|
5392
5662
|
o.value,
|
|
5393
5663
|
`${o.value}--label-${i.value.labelPosition}`,
|
|
5394
5664
|
{
|
|
@@ -5414,17 +5684,17 @@ var ra = (e) => {
|
|
|
5414
5684
|
for: i.value.id
|
|
5415
5685
|
}, [i.value.label])]);
|
|
5416
5686
|
}
|
|
5417
|
-
}),
|
|
5687
|
+
}), ko = {
|
|
5418
5688
|
railTopInset: 3,
|
|
5419
5689
|
railBottomInset: 8,
|
|
5420
5690
|
minThumbHeight: 6,
|
|
5421
5691
|
thumbHeightFactor: .65
|
|
5422
5692
|
};
|
|
5423
|
-
function
|
|
5693
|
+
function Ao(e, t = {}) {
|
|
5424
5694
|
let { railTopInset: n, railBottomInset: i, minThumbHeight: a, thumbHeightFactor: o, onDragStart: s, onDragEnd: c } = {
|
|
5425
|
-
...
|
|
5695
|
+
...ko,
|
|
5426
5696
|
...t
|
|
5427
|
-
}, l =
|
|
5697
|
+
}, l = E(0), u = E(0), d = E(!1), f = E(0), p = E(0), m = r(() => l.value > 0);
|
|
5428
5698
|
function h() {
|
|
5429
5699
|
let t = e.value;
|
|
5430
5700
|
if (!t) return;
|
|
@@ -5451,7 +5721,7 @@ function Qa(e, t = {}) {
|
|
|
5451
5721
|
function v(t) {
|
|
5452
5722
|
!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", _));
|
|
5453
5723
|
}
|
|
5454
|
-
return
|
|
5724
|
+
return C(() => {
|
|
5455
5725
|
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", _);
|
|
5456
5726
|
}), {
|
|
5457
5727
|
thumbHeight: l,
|
|
@@ -5464,9 +5734,9 @@ function Qa(e, t = {}) {
|
|
|
5464
5734
|
}
|
|
5465
5735
|
//#endregion
|
|
5466
5736
|
//#region src/components/TSelect/TSelect.styles.tsx
|
|
5467
|
-
var
|
|
5737
|
+
var jo = () => {
|
|
5468
5738
|
let e = X();
|
|
5469
|
-
return r(() =>
|
|
5739
|
+
return r(() => L({
|
|
5470
5740
|
"&, *": {
|
|
5471
5741
|
margin: 0,
|
|
5472
5742
|
padding: 0,
|
|
@@ -5594,31 +5864,31 @@ var $a = () => {
|
|
|
5594
5864
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
5595
5865
|
"&--full-width": { width: "100%" }
|
|
5596
5866
|
}));
|
|
5597
|
-
},
|
|
5598
|
-
e.type === "option" ? t.push(e) : Array.isArray(e.children) &&
|
|
5599
|
-
}), t),
|
|
5867
|
+
}, Mo = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((e) => Mo(e)).join("").trim() : e && typeof e == "object" && "children" in e ? Mo(e.children) : "", No = (e, t = []) => (e?.forEach((e) => {
|
|
5868
|
+
e.type === "option" ? t.push(e) : Array.isArray(e.children) && No(e.children, t);
|
|
5869
|
+
}), t), Po = (e) => No(e).map((e) => ({
|
|
5600
5870
|
value: e.props?.value,
|
|
5601
5871
|
disabled: !!e.props?.disabled,
|
|
5602
|
-
label:
|
|
5603
|
-
})),
|
|
5872
|
+
label: Mo(e.children)
|
|
5873
|
+
})), Fo = (e, t) => {
|
|
5604
5874
|
if (e === t) return !0;
|
|
5605
5875
|
if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
|
|
5606
5876
|
let n = Object.getPrototypeOf(e);
|
|
5607
5877
|
if (n !== Object.prototype || Object.getPrototypeOf(t) !== n) return !1;
|
|
5608
5878
|
let r = Object.keys(e), i = Object.keys(t);
|
|
5609
5879
|
return r.length === i.length ? r.every((n) => e[n] === t[n]) : !1;
|
|
5610
|
-
},
|
|
5611
|
-
let n = e.findIndex((e) =>
|
|
5880
|
+
}, Io = (e, t) => {
|
|
5881
|
+
let n = e.findIndex((e) => Fo(e.value, t) && !e.disabled);
|
|
5612
5882
|
if (n >= 0) return n;
|
|
5613
5883
|
let r = e.findIndex((e) => !e.disabled);
|
|
5614
5884
|
return r >= 0 ? r : -1;
|
|
5615
|
-
},
|
|
5885
|
+
}, Lo = (e) => {
|
|
5616
5886
|
if (typeof e.leftIcon == "string") return e.leftIcon;
|
|
5617
5887
|
let t = e["left-icon"];
|
|
5618
5888
|
return typeof t == "string" ? t : "";
|
|
5619
|
-
},
|
|
5889
|
+
}, Ro = (e, t) => e ? e.includes(":") ? e : `${t}:${e}` : "", zo = () => {
|
|
5620
5890
|
let e = X();
|
|
5621
|
-
return r(() =>
|
|
5891
|
+
return r(() => L({
|
|
5622
5892
|
"&, *": { boxSizing: "border-box" },
|
|
5623
5893
|
listStyle: "none",
|
|
5624
5894
|
padding: "0.5rem 0.625rem",
|
|
@@ -5648,7 +5918,7 @@ var $a = () => {
|
|
|
5648
5918
|
pointerEvents: "none"
|
|
5649
5919
|
}
|
|
5650
5920
|
}));
|
|
5651
|
-
},
|
|
5921
|
+
}, Bo = /* @__PURE__ */ d({
|
|
5652
5922
|
name: "TSelectOption",
|
|
5653
5923
|
emits: ["select", "hover"],
|
|
5654
5924
|
props: {
|
|
@@ -5659,7 +5929,7 @@ var $a = () => {
|
|
|
5659
5929
|
withSeparator: Boolean
|
|
5660
5930
|
},
|
|
5661
5931
|
setup(e, { slots: t, emit: n }) {
|
|
5662
|
-
let i =
|
|
5932
|
+
let i = zo(), a = r(() => [i.value, {
|
|
5663
5933
|
[`${i.value}--selected`]: e.selected,
|
|
5664
5934
|
[`${i.value}--highlighted`]: e.highlighted,
|
|
5665
5935
|
[`${i.value}--disabled`]: e.disabled,
|
|
@@ -5677,16 +5947,16 @@ var $a = () => {
|
|
|
5677
5947
|
onMouseenter: o
|
|
5678
5948
|
}, [t.default?.() || e.label]);
|
|
5679
5949
|
}
|
|
5680
|
-
}),
|
|
5681
|
-
function
|
|
5682
|
-
let r =
|
|
5683
|
-
n.value || !e.value.length || (r.value = !0, i.value =
|
|
5950
|
+
}), Vo = 36;
|
|
5951
|
+
function Ho(e, t, n) {
|
|
5952
|
+
let r = E(!1), i = E(-1), a = E(null), o = E(null), s = E(null), c = E(!1), l = E(!1), u = () => {
|
|
5953
|
+
n.value || !e.value.length || (r.value = !0, i.value = Io(e.value, t.value));
|
|
5684
5954
|
}, d = () => {
|
|
5685
5955
|
r.value = !1, i.value = -1, c.value = !1, l.value = !1;
|
|
5686
5956
|
}, f = (e) => {
|
|
5687
5957
|
let t = s.value;
|
|
5688
5958
|
t && t.scrollBy({
|
|
5689
|
-
top: e *
|
|
5959
|
+
top: e * Vo,
|
|
5690
5960
|
behavior: "smooth"
|
|
5691
5961
|
});
|
|
5692
5962
|
}, p = (e) => {
|
|
@@ -5741,7 +6011,7 @@ function uo(e, t, n) {
|
|
|
5741
6011
|
}
|
|
5742
6012
|
//#endregion
|
|
5743
6013
|
//#region src/components/TSelect/TSelect.tsx
|
|
5744
|
-
var
|
|
6014
|
+
var Uo = /* @__PURE__ */ d({
|
|
5745
6015
|
name: "TSelect",
|
|
5746
6016
|
emits: [
|
|
5747
6017
|
"input",
|
|
@@ -5785,7 +6055,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
5785
6055
|
id: String
|
|
5786
6056
|
},
|
|
5787
6057
|
setup(e, { attrs: t, emit: n, slots: i, expose: a }) {
|
|
5788
|
-
let o = r(() =>
|
|
6058
|
+
let o = r(() => U({}, e, t)), s = X(), c = E(null), l = jo(), d = r(() => [
|
|
5789
6059
|
l.value,
|
|
5790
6060
|
`${l.value}__container`,
|
|
5791
6061
|
{
|
|
@@ -5793,7 +6063,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
5793
6063
|
[`${l.value}--full-width`]: o.value.fullWidth
|
|
5794
6064
|
}
|
|
5795
6065
|
]);
|
|
5796
|
-
|
|
6066
|
+
P(() => [o.value.modelValue, o.value.value], ([e, t]) => {
|
|
5797
6067
|
c.value = e === null ? t : e;
|
|
5798
6068
|
}, { immediate: !0 });
|
|
5799
6069
|
let f = r({
|
|
@@ -5801,7 +6071,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
5801
6071
|
set: (e) => {
|
|
5802
6072
|
c.value = e, n("update:modelValue", e), n("input", e), n("change", e);
|
|
5803
6073
|
}
|
|
5804
|
-
}), p = r(() =>
|
|
6074
|
+
}), p = r(() => Po(i.default?.() ?? [])), m = r(() => p.value.find((e) => Fo(e.value, f.value))), h = r(() => !!m.value), g = r(() => m.value ? m.value.label : o.value.placeholder ? o.value.placeholder : ""), v = r(() => Lo(o.value)), y = r(() => Ro(v.value, s.value.iconSet)), b = Ho(p, f, r(() => !!o.value.disabled)), x = Ao(b.menuRef, {
|
|
5805
6075
|
onDragStart: () => {
|
|
5806
6076
|
b.isInteractingWithMenu.value = !0;
|
|
5807
6077
|
},
|
|
@@ -5811,20 +6081,20 @@ var fo = /* @__PURE__ */ d({
|
|
|
5811
6081
|
});
|
|
5812
6082
|
}
|
|
5813
6083
|
});
|
|
5814
|
-
return
|
|
6084
|
+
return P(() => [b.menuOpen.value, p.value.length], ([e]) => {
|
|
5815
6085
|
e && requestAnimationFrame(() => x.update());
|
|
5816
6086
|
}), a({ focus: () => b.triggerRef.value?.focus() }), () => u("div", { class: d.value }, [
|
|
5817
6087
|
i.label?.() || o.value.label && u("label", {
|
|
5818
6088
|
class: `${l.value}__label`,
|
|
5819
6089
|
for: o.value.id
|
|
5820
6090
|
}, [o.value.label]),
|
|
5821
|
-
u("div", { class: `${l.value}__wrapper` }, [v.value && u(
|
|
6091
|
+
u("div", { class: `${l.value}__wrapper` }, [v.value && u(I, {
|
|
5822
6092
|
icon: y.value,
|
|
5823
6093
|
class: [`${l.value}__icon`, `${l.value}__icon--left`]
|
|
5824
6094
|
}, null), u("div", {
|
|
5825
6095
|
class: [`${l.value}__dropdown`, { [`${l.value}__dropdown--open`]: b.menuOpen.value }],
|
|
5826
6096
|
ref: b.wrapperRef
|
|
5827
|
-
}, [u("button",
|
|
6097
|
+
}, [u("button", _({
|
|
5828
6098
|
class: [`${l.value}__select`, {
|
|
5829
6099
|
[`${l.value}__select--left-icon`]: v.value,
|
|
5830
6100
|
[`${l.value}__select--placeholder`]: !h.value,
|
|
@@ -5843,7 +6113,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
5843
6113
|
"aria-haspopup": "listbox",
|
|
5844
6114
|
"aria-expanded": b.menuOpen.value,
|
|
5845
6115
|
type: "button"
|
|
5846
|
-
}, t), [u("div", { class: `${l.value}__selected-value` }, [
|
|
6116
|
+
}, t), [u("div", { class: `${l.value}__selected-value` }, [g.value])]), b.menuOpen.value && u("div", {
|
|
5847
6117
|
class: `${l.value}__menu-wrapper`,
|
|
5848
6118
|
onMousedown: b.handleMenuInteractionStart,
|
|
5849
6119
|
onMouseup: () => {
|
|
@@ -5858,10 +6128,10 @@ var fo = /* @__PURE__ */ d({
|
|
|
5858
6128
|
role: "listbox",
|
|
5859
6129
|
ref: b.menuRef,
|
|
5860
6130
|
onScroll: x.update
|
|
5861
|
-
}, [p.value.map((e, t) => u(
|
|
6131
|
+
}, [p.value.map((e, t) => u(Bo, {
|
|
5862
6132
|
key: `${String(e.value)}-${t}`,
|
|
5863
6133
|
label: e.label,
|
|
5864
|
-
selected:
|
|
6134
|
+
selected: Fo(e.value, f.value),
|
|
5865
6135
|
highlighted: t === b.highlightedIndex.value,
|
|
5866
6136
|
disabled: e.disabled,
|
|
5867
6137
|
withSeparator: t < p.value.length - 1,
|
|
@@ -5881,9 +6151,9 @@ var fo = /* @__PURE__ */ d({
|
|
|
5881
6151
|
i.helperText?.() || o.value.helperText && u("p", { class: `${l.value}__helper-text` }, [o.value.helperText])
|
|
5882
6152
|
]);
|
|
5883
6153
|
}
|
|
5884
|
-
}),
|
|
6154
|
+
}), Wo = () => {
|
|
5885
6155
|
let e = X();
|
|
5886
|
-
return r(() =>
|
|
6156
|
+
return r(() => L({
|
|
5887
6157
|
"&, *": {
|
|
5888
6158
|
margin: 0,
|
|
5889
6159
|
boxSizing: "border-box"
|
|
@@ -5964,12 +6234,12 @@ var fo = /* @__PURE__ */ d({
|
|
|
5964
6234
|
"&--error &__select:not(:disabled), &--error &__select:focus": { borderColor: e.value.colors.error },
|
|
5965
6235
|
"&--error + &__helper-text": { color: e.value.colors.error }
|
|
5966
6236
|
}));
|
|
5967
|
-
},
|
|
6237
|
+
}, Go = (e) => {
|
|
5968
6238
|
let t = [];
|
|
5969
6239
|
return e?.forEach((e) => {
|
|
5970
|
-
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
6240
|
+
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...Go(e.children));
|
|
5971
6241
|
}), t;
|
|
5972
|
-
},
|
|
6242
|
+
}, Ko = /* @__PURE__ */ d({
|
|
5973
6243
|
name: "TSelectDropdown",
|
|
5974
6244
|
props: {
|
|
5975
6245
|
open: Boolean,
|
|
@@ -5983,7 +6253,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
5983
6253
|
},
|
|
5984
6254
|
emits: ["cancel", "click"],
|
|
5985
6255
|
setup(e, { slots: t, attrs: n, emit: i }) {
|
|
5986
|
-
let a = r(() =>
|
|
6256
|
+
let a = r(() => U({}, e, n)), o = Wo(), s = r(() => [
|
|
5987
6257
|
o.value,
|
|
5988
6258
|
`${o.value}__menu_container`,
|
|
5989
6259
|
{
|
|
@@ -5994,17 +6264,17 @@ var fo = /* @__PURE__ */ d({
|
|
|
5994
6264
|
o.value,
|
|
5995
6265
|
`${o.value}__container`,
|
|
5996
6266
|
{ [`${o.value}--full-width`]: a.value.fullWidth }
|
|
5997
|
-
]), l =
|
|
6267
|
+
]), l = E(null), d = (e) => {
|
|
5998
6268
|
a.value.open && l.value && !l.value.contains(e.target) && i("cancel");
|
|
5999
6269
|
}, f = (e) => {
|
|
6000
6270
|
e.key === "Escape" && i("cancel");
|
|
6001
6271
|
};
|
|
6002
|
-
|
|
6272
|
+
S(() => {
|
|
6003
6273
|
document.addEventListener("click", d), l.value?.addEventListener("keydown", f);
|
|
6004
|
-
}),
|
|
6274
|
+
}), C(() => {
|
|
6005
6275
|
document.removeEventListener("click", d), l.value?.removeEventListener("keydown", f);
|
|
6006
6276
|
});
|
|
6007
|
-
let p = r(() =>
|
|
6277
|
+
let p = r(() => Go(t.default?.() || [])), m = () => {
|
|
6008
6278
|
i("click");
|
|
6009
6279
|
};
|
|
6010
6280
|
return () => u("div", { class: c.value }, [
|
|
@@ -6027,9 +6297,9 @@ var fo = /* @__PURE__ */ d({
|
|
|
6027
6297
|
t.helperText?.() || a.value.helperText && u("p", { class: `${o.value}__helper-text` }, [a.value.helperText])
|
|
6028
6298
|
]);
|
|
6029
6299
|
}
|
|
6030
|
-
}),
|
|
6300
|
+
}), qo = () => {
|
|
6031
6301
|
let e = X();
|
|
6032
|
-
return r(() =>
|
|
6302
|
+
return r(() => L({
|
|
6033
6303
|
"&, *": {
|
|
6034
6304
|
margin: 0,
|
|
6035
6305
|
boxSizing: "border-box"
|
|
@@ -6056,12 +6326,12 @@ var fo = /* @__PURE__ */ d({
|
|
|
6056
6326
|
float: "right"
|
|
6057
6327
|
}
|
|
6058
6328
|
}));
|
|
6059
|
-
},
|
|
6329
|
+
}, Jo = /* @__PURE__ */ d({
|
|
6060
6330
|
name: "TSelectDropdownItem",
|
|
6061
6331
|
emits: ["click"],
|
|
6062
6332
|
props: { label: String },
|
|
6063
6333
|
setup(e, { slots: t, emit: n, attrs: i }) {
|
|
6064
|
-
let a = r(() =>
|
|
6334
|
+
let a = r(() => U({}, e, i)), o = qo(), s = () => {
|
|
6065
6335
|
n("click");
|
|
6066
6336
|
}, c = (e) => {
|
|
6067
6337
|
e.key === "Enter" && !a.value.disabled && (n("click"), e.preventDefault());
|
|
@@ -6074,11 +6344,11 @@ var fo = /* @__PURE__ */ d({
|
|
|
6074
6344
|
tabindex: 0
|
|
6075
6345
|
}, [t.default?.(), t.label?.() || a.value.label && u("label", { class: `${o.value}__label` }, [a.value.label])]);
|
|
6076
6346
|
}
|
|
6077
|
-
}),
|
|
6347
|
+
}), Yo = /* @__PURE__ */ Z(/* @__PURE__ */ d({
|
|
6078
6348
|
name: "TSwitch",
|
|
6079
6349
|
inheritAttrs: !1,
|
|
6080
6350
|
__name: "TSwitch",
|
|
6081
|
-
props: /* @__PURE__ */
|
|
6351
|
+
props: /* @__PURE__ */ g({
|
|
6082
6352
|
label: {},
|
|
6083
6353
|
disabled: { type: Boolean },
|
|
6084
6354
|
value: { type: Boolean },
|
|
@@ -6092,18 +6362,18 @@ var fo = /* @__PURE__ */ d({
|
|
|
6092
6362
|
modelValue: {},
|
|
6093
6363
|
modelModifiers: {}
|
|
6094
6364
|
}),
|
|
6095
|
-
emits: /* @__PURE__ */
|
|
6365
|
+
emits: /* @__PURE__ */ g(["change", "input"], ["update:modelValue"]),
|
|
6096
6366
|
setup(e, { emit: t }) {
|
|
6097
|
-
let n = t, i =
|
|
6367
|
+
let n = t, i = M(e, "modelValue"), s = r(() => e.modelValue ?? e.value), c = re(), d = r(() => e.id ?? c), { wrapperAttrs: f, controlAttrs: p } = mi(), m = (e) => {
|
|
6098
6368
|
i.value = e, n("change", e), n("input", e);
|
|
6099
6369
|
};
|
|
6100
|
-
return (t, n) => (
|
|
6370
|
+
return (t, n) => (w(), a(j(z), _(j(f), {
|
|
6101
6371
|
as: e.as,
|
|
6102
6372
|
class: "t-switch",
|
|
6103
6373
|
"data-label-position": e.labelPosition,
|
|
6104
6374
|
"data-disabled": e.disabled || void 0
|
|
6105
6375
|
}), {
|
|
6106
|
-
default:
|
|
6376
|
+
default: F(() => [u(j(B), _({ id: d.value }, j(p), {
|
|
6107
6377
|
"model-value": s.value,
|
|
6108
6378
|
"true-value": e.trueValue,
|
|
6109
6379
|
"false-value": e.falseValue,
|
|
@@ -6111,7 +6381,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6111
6381
|
class: "t-switch-track",
|
|
6112
6382
|
"onUpdate:modelValue": m
|
|
6113
6383
|
}), {
|
|
6114
|
-
default:
|
|
6384
|
+
default: F(() => [u(j(V), { class: "t-switch-thumb" })]),
|
|
6115
6385
|
_: 1
|
|
6116
6386
|
}, 16, [
|
|
6117
6387
|
"id",
|
|
@@ -6119,13 +6389,13 @@ var fo = /* @__PURE__ */ d({
|
|
|
6119
6389
|
"true-value",
|
|
6120
6390
|
"false-value",
|
|
6121
6391
|
"disabled"
|
|
6122
|
-
]), e.label || t.$slots.label ? (
|
|
6392
|
+
]), e.label || t.$slots.label ? (w(), a(j(ge), {
|
|
6123
6393
|
key: 0,
|
|
6124
6394
|
as: e.as === "label" ? "span" : "label",
|
|
6125
6395
|
for: e.as === "label" ? void 0 : d.value,
|
|
6126
6396
|
class: "t-switch-label"
|
|
6127
6397
|
}, {
|
|
6128
|
-
default:
|
|
6398
|
+
default: F(() => [k(t.$slots, "label", { label: e.label }, () => [l(A(e.label), 1)], !0)]),
|
|
6129
6399
|
_: 3
|
|
6130
6400
|
}, 8, ["as", "for"])) : o("", !0)]),
|
|
6131
6401
|
_: 3
|
|
@@ -6135,9 +6405,9 @@ var fo = /* @__PURE__ */ d({
|
|
|
6135
6405
|
"data-disabled"
|
|
6136
6406
|
]));
|
|
6137
6407
|
}
|
|
6138
|
-
}), [["__scopeId", "data-v-d1ee1a6c"]]),
|
|
6408
|
+
}), [["__scopeId", "data-v-d1ee1a6c"]]), Xo = () => {
|
|
6139
6409
|
let e = X();
|
|
6140
|
-
return r(() =>
|
|
6410
|
+
return r(() => L({
|
|
6141
6411
|
"&, *": {
|
|
6142
6412
|
margin: 0,
|
|
6143
6413
|
padding: 0,
|
|
@@ -6182,7 +6452,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6182
6452
|
}
|
|
6183
6453
|
}
|
|
6184
6454
|
}));
|
|
6185
|
-
},
|
|
6455
|
+
}, Zo = /* @__PURE__ */ d({
|
|
6186
6456
|
name: "TTabBar",
|
|
6187
6457
|
emits: [
|
|
6188
6458
|
"input",
|
|
@@ -6195,8 +6465,8 @@ var fo = /* @__PURE__ */ d({
|
|
|
6195
6465
|
modelValue: String
|
|
6196
6466
|
},
|
|
6197
6467
|
setup(e, { attrs: t, emit: n }) {
|
|
6198
|
-
let i = r(() =>
|
|
6199
|
-
|
|
6468
|
+
let i = r(() => U({}, e, t)), a = Xo(), o = E(i.value.modelValue === void 0 ? i.value.value : i.value.modelValue);
|
|
6469
|
+
P([() => i.value.modelValue, () => i.value.value], () => {
|
|
6200
6470
|
o.value = i.value.modelValue === void 0 ? i.value.value : i.value.modelValue;
|
|
6201
6471
|
});
|
|
6202
6472
|
let s = (e) => {
|
|
@@ -6217,9 +6487,9 @@ var fo = /* @__PURE__ */ d({
|
|
|
6217
6487
|
onClick: () => s(e)
|
|
6218
6488
|
}, [e])]))])]);
|
|
6219
6489
|
}
|
|
6220
|
-
}),
|
|
6490
|
+
}), Qo = () => {
|
|
6221
6491
|
let e = X();
|
|
6222
|
-
return r(() =>
|
|
6492
|
+
return r(() => L({
|
|
6223
6493
|
paddingBottom: "0.625rem",
|
|
6224
6494
|
color: e.value.colors.gray.main,
|
|
6225
6495
|
alignItems: "center",
|
|
@@ -6241,7 +6511,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6241
6511
|
color: e.value.colors.primary.dark
|
|
6242
6512
|
}
|
|
6243
6513
|
}));
|
|
6244
|
-
},
|
|
6514
|
+
}, $o = /* @__PURE__ */ d({
|
|
6245
6515
|
name: "TTab",
|
|
6246
6516
|
props: {
|
|
6247
6517
|
id: {
|
|
@@ -6264,7 +6534,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6264
6534
|
}
|
|
6265
6535
|
},
|
|
6266
6536
|
setup(e, { slots: t }) {
|
|
6267
|
-
let n =
|
|
6537
|
+
let n = Qo(), i = m("tabSelection");
|
|
6268
6538
|
if (!i) throw Error("tabSelection provider missing.");
|
|
6269
6539
|
let { selectTab: a } = i, o = () => {
|
|
6270
6540
|
a(e.id);
|
|
@@ -6280,15 +6550,15 @@ var fo = /* @__PURE__ */ d({
|
|
|
6280
6550
|
tabindex: 0
|
|
6281
6551
|
}, [t.default?.()]);
|
|
6282
6552
|
}
|
|
6283
|
-
}),
|
|
6553
|
+
}), es = () => {
|
|
6284
6554
|
let e = X();
|
|
6285
|
-
return r(() =>
|
|
6555
|
+
return r(() => L({
|
|
6286
6556
|
width: "100%",
|
|
6287
6557
|
borderBottom: `0.125rem solid ${e.value.colors.gray.medium2}`,
|
|
6288
6558
|
display: "flex",
|
|
6289
6559
|
gap: "2.5rem"
|
|
6290
6560
|
}));
|
|
6291
|
-
},
|
|
6561
|
+
}, ts = /* @__PURE__ */ d({
|
|
6292
6562
|
name: "TTabBarExtended",
|
|
6293
6563
|
emits: ["select"],
|
|
6294
6564
|
props: {
|
|
@@ -6305,16 +6575,16 @@ var fo = /* @__PURE__ */ d({
|
|
|
6305
6575
|
] }
|
|
6306
6576
|
},
|
|
6307
6577
|
setup(e, { emit: t }) {
|
|
6308
|
-
let n =
|
|
6578
|
+
let n = es(), i = Qo(), a = r(() => e.tabs.map((e, t) => ({
|
|
6309
6579
|
id: `${t}`,
|
|
6310
6580
|
label: e.label,
|
|
6311
6581
|
value: e.value
|
|
6312
|
-
}))), o =
|
|
6582
|
+
}))), o = E(r(() => e.initialLabel ? a.value.find((t) => t.label === e.initialLabel) ?? a.value[0] : a.value[0]).value), s = r(() => e.selectedValue !== void 0), c = r(() => s.value ? a.value.find((t) => t.value === e.selectedValue) ?? a.value[0] : o.value), d = E(!1), f = (e) => {
|
|
6313
6583
|
let n = a.value.find((t) => t.id === e);
|
|
6314
6584
|
if (!n) throw Error("No tab was found.");
|
|
6315
6585
|
c.value.id !== e && (s.value || (o.value = n), t("select", n.value));
|
|
6316
6586
|
};
|
|
6317
|
-
|
|
6587
|
+
ee("tabSelection", { selectTab: f });
|
|
6318
6588
|
let p = r(() => a.value.length), m = r(() => Math.min(p.value, e.maxTabs || Infinity)), h = r(() => {
|
|
6319
6589
|
if (p.value === m.value) return a.value;
|
|
6320
6590
|
let e = a.value.slice(0, m.value - 1);
|
|
@@ -6329,7 +6599,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6329
6599
|
e.preventDefault(), e.key === "Enter" && _();
|
|
6330
6600
|
}, x = (e) => {
|
|
6331
6601
|
f(e), v();
|
|
6332
|
-
}, S = () => u(
|
|
6602
|
+
}, S = () => u(oi, {
|
|
6333
6603
|
open: d.value,
|
|
6334
6604
|
position: "center",
|
|
6335
6605
|
onCancel: _
|
|
@@ -6341,7 +6611,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6341
6611
|
tabindex: 0,
|
|
6342
6612
|
role: "button"
|
|
6343
6613
|
}, [l(". . .")]),
|
|
6344
|
-
default: () => a.value.map((e) => u(
|
|
6614
|
+
default: () => a.value.map((e) => u(ci, {
|
|
6345
6615
|
disabled: c.value.id === e.id,
|
|
6346
6616
|
onClick: () => x(e.id)
|
|
6347
6617
|
}, { default: () => [e.label] }))
|
|
@@ -6349,16 +6619,16 @@ var fo = /* @__PURE__ */ d({
|
|
|
6349
6619
|
return () => u("nav", {
|
|
6350
6620
|
role: "navigation",
|
|
6351
6621
|
class: [n.value]
|
|
6352
|
-
}, [h.value.map((e) => u(
|
|
6622
|
+
}, [h.value.map((e) => u($o, {
|
|
6353
6623
|
key: `${e.label}-${e.id}`,
|
|
6354
6624
|
id: e.id,
|
|
6355
6625
|
selected: c.value.id === e.id,
|
|
6356
6626
|
value: e.value
|
|
6357
6627
|
}, { default: () => [e.label] })), g.value ? u(S, null, null) : null]);
|
|
6358
6628
|
}
|
|
6359
|
-
}),
|
|
6629
|
+
}), ns = () => {
|
|
6360
6630
|
let e = X();
|
|
6361
|
-
return r(() =>
|
|
6631
|
+
return r(() => L({
|
|
6362
6632
|
"&, *": {
|
|
6363
6633
|
margin: 0,
|
|
6364
6634
|
padding: 0,
|
|
@@ -6416,7 +6686,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6416
6686
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
6417
6687
|
"&--full-width": { width: "100%" }
|
|
6418
6688
|
}));
|
|
6419
|
-
},
|
|
6689
|
+
}, rs = 1, is = /* @__PURE__ */ d({
|
|
6420
6690
|
name: "TTextArea",
|
|
6421
6691
|
emits: [
|
|
6422
6692
|
"input",
|
|
@@ -6443,7 +6713,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6443
6713
|
}
|
|
6444
6714
|
},
|
|
6445
6715
|
setup(e, { attrs: t, emit: n, slots: i, expose: a }) {
|
|
6446
|
-
let o = r(() =>
|
|
6716
|
+
let o = r(() => U({}, e, t)), s = ns(), c = r({
|
|
6447
6717
|
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
6448
6718
|
set: (e) => {
|
|
6449
6719
|
n("update:modelValue", e), n("input", e), n("change", e);
|
|
@@ -6464,11 +6734,11 @@ var fo = /* @__PURE__ */ d({
|
|
|
6464
6734
|
n("focus", e);
|
|
6465
6735
|
}, p = (e) => {
|
|
6466
6736
|
n("blur", e);
|
|
6467
|
-
}, m =
|
|
6737
|
+
}, m = E(null);
|
|
6468
6738
|
return a({ focus: () => {
|
|
6469
6739
|
m.value?.focus();
|
|
6470
|
-
} }),
|
|
6471
|
-
o.value.autoResize && (await
|
|
6740
|
+
} }), P(() => c.value, async () => {
|
|
6741
|
+
o.value.autoResize && (await v(), l());
|
|
6472
6742
|
}), () => u("div", { class: [
|
|
6473
6743
|
s.value,
|
|
6474
6744
|
`${s.value}__container`,
|
|
@@ -6482,11 +6752,11 @@ var fo = /* @__PURE__ */ d({
|
|
|
6482
6752
|
class: [`${s.value}__label`],
|
|
6483
6753
|
for: o.value.id
|
|
6484
6754
|
}, [o.value.label]),
|
|
6485
|
-
u("div", { class: `${s.value}__textarea-wrapper` }, [u("textarea",
|
|
6755
|
+
u("div", { class: `${s.value}__textarea-wrapper` }, [u("textarea", _(t, {
|
|
6486
6756
|
id: o.value.id,
|
|
6487
6757
|
class: [`${s.value}__textarea`, { [`${s.value}__textarea--auto-resize`]: o.value.autoResize }],
|
|
6488
6758
|
style: o.value.autoResize ? { height: "auto" } : void 0,
|
|
6489
|
-
rows: o.value.autoResize ?
|
|
6759
|
+
rows: o.value.autoResize ? rs : void 0,
|
|
6490
6760
|
placeholder: o.value.placeholder,
|
|
6491
6761
|
value: c.value,
|
|
6492
6762
|
onInput: d,
|
|
@@ -6499,7 +6769,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6499
6769
|
i.helperText?.() || o.value.helperText && u("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
6500
6770
|
]);
|
|
6501
6771
|
}
|
|
6502
|
-
}),
|
|
6772
|
+
}), as = /* @__PURE__ */ d({
|
|
6503
6773
|
name: "TThemeProvider",
|
|
6504
6774
|
inheritAttrs: !1,
|
|
6505
6775
|
props: { theme: {
|
|
@@ -6507,19 +6777,19 @@ var fo = /* @__PURE__ */ d({
|
|
|
6507
6777
|
default: () => ({})
|
|
6508
6778
|
} },
|
|
6509
6779
|
setup(e, { slots: t, attrs: n }) {
|
|
6510
|
-
let i = r(() =>
|
|
6511
|
-
return
|
|
6780
|
+
let i = r(() => jr(e.theme ?? {}));
|
|
6781
|
+
return ee(Mr, i), () => {
|
|
6512
6782
|
let { cssVars: e } = i.value;
|
|
6513
|
-
return
|
|
6783
|
+
return p("div", {
|
|
6514
6784
|
...n,
|
|
6515
6785
|
class: ["toku-theme", n.class],
|
|
6516
6786
|
style: e ? [n.style, e] : n.style
|
|
6517
6787
|
}, t.default?.());
|
|
6518
6788
|
};
|
|
6519
6789
|
}
|
|
6520
|
-
}),
|
|
6790
|
+
}), os = () => {
|
|
6521
6791
|
let e = X();
|
|
6522
|
-
return r(() =>
|
|
6792
|
+
return r(() => L({
|
|
6523
6793
|
"&, *": {
|
|
6524
6794
|
margin: 0,
|
|
6525
6795
|
boxSizing: "border-box",
|
|
@@ -6544,31 +6814,31 @@ var fo = /* @__PURE__ */ d({
|
|
|
6544
6814
|
"&--success": {
|
|
6545
6815
|
borderColor: e.value.colors.success,
|
|
6546
6816
|
color: e.value.colors.success,
|
|
6547
|
-
background:
|
|
6817
|
+
background: K(e.value.colors.success, .2)
|
|
6548
6818
|
},
|
|
6549
6819
|
"&--success > &__text": { color: e.value.colors.success },
|
|
6550
6820
|
"&--in-process": {
|
|
6551
6821
|
borderColor: e.value.colors.inProcess,
|
|
6552
6822
|
color: e.value.colors.inProcess,
|
|
6553
|
-
background:
|
|
6823
|
+
background: K(e.value.colors.inProcess, .2)
|
|
6554
6824
|
},
|
|
6555
6825
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
6556
6826
|
"&--warning": {
|
|
6557
6827
|
borderColor: e.value.colors.warning,
|
|
6558
6828
|
color: e.value.colors.warning,
|
|
6559
|
-
background:
|
|
6829
|
+
background: K(e.value.colors.warning, .2)
|
|
6560
6830
|
},
|
|
6561
6831
|
"&--warning > &__text": { color: e.value.colors.warning },
|
|
6562
6832
|
"&--error": {
|
|
6563
6833
|
borderColor: e.value.colors.error,
|
|
6564
6834
|
color: e.value.colors.error,
|
|
6565
|
-
background:
|
|
6835
|
+
background: K(e.value.colors.error, .2)
|
|
6566
6836
|
},
|
|
6567
6837
|
"&--error > &__text": { color: e.value.colors.error },
|
|
6568
6838
|
"&--info": {
|
|
6569
6839
|
borderColor: e.value.colors.info,
|
|
6570
6840
|
color: e.value.colors.info,
|
|
6571
|
-
background:
|
|
6841
|
+
background: K(e.value.colors.info, .2)
|
|
6572
6842
|
},
|
|
6573
6843
|
"&--info > &__text": { color: e.value.colors.info },
|
|
6574
6844
|
"&__icon": {
|
|
@@ -6592,7 +6862,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6592
6862
|
}
|
|
6593
6863
|
}
|
|
6594
6864
|
}));
|
|
6595
|
-
},
|
|
6865
|
+
}, ss = { variant: "default" }, cs = /* @__PURE__ */ d({
|
|
6596
6866
|
name: "TWarning",
|
|
6597
6867
|
props: {
|
|
6598
6868
|
fullWidth: Boolean,
|
|
@@ -6600,7 +6870,7 @@ var fo = /* @__PURE__ */ d({
|
|
|
6600
6870
|
variant: String
|
|
6601
6871
|
},
|
|
6602
6872
|
setup(e, { slots: t }) {
|
|
6603
|
-
let n = r(() =>
|
|
6873
|
+
let n = r(() => U({}, ss, e)), i = os(), a = r(() => [
|
|
6604
6874
|
i.value,
|
|
6605
6875
|
`${i.value}--${n.value.variant}`,
|
|
6606
6876
|
{ [`${i.value}--full-width`]: n.value.fullWidth }
|
|
@@ -6628,11 +6898,11 @@ var fo = /* @__PURE__ */ d({
|
|
|
6628
6898
|
}, { default: () => [t.default?.()] })
|
|
6629
6899
|
]);
|
|
6630
6900
|
}
|
|
6631
|
-
}),
|
|
6901
|
+
}), ls = () => ({ open: ({ onCancel: e, onConfirm: t, ...n }) => {
|
|
6632
6902
|
let r = document.createElement("div");
|
|
6633
6903
|
document.body.appendChild(r);
|
|
6634
6904
|
let a = i({ render() {
|
|
6635
|
-
return
|
|
6905
|
+
return p(aa, {
|
|
6636
6906
|
...n,
|
|
6637
6907
|
onConfirm: () => {
|
|
6638
6908
|
t?.(), a.unmount(), r.remove();
|
|
@@ -6648,6 +6918,6 @@ var fo = /* @__PURE__ */ d({
|
|
|
6648
6918
|
a.mount(r);
|
|
6649
6919
|
} });
|
|
6650
6920
|
//#endregion
|
|
6651
|
-
export {
|
|
6921
|
+
export { Rr as TButton, Xr as TCardButton, ei as TCheckbox, Pr as TChip, pi as TCombobox, Bi as TCommandPalette, Hi as TConfirmDialog, aa as TDialog, Ta as TDrawer, Oa as TDrawerFooter, Ka as TDrawerHeader, Ya as TDrawerLinkRow, eo as TDrawerRow, ro as TDrawerSection, oi as TDropdown, ci as TDropdownItem, fo as TFileUpload, Q as TIcon, ja as TIconButton, ho as TLink, xo as TLoading, To as TLoadingDots, Gi as TModal, Oo as TRadio, Uo as TSelect, Ko as TSelectDropdown, Jo as TSelectDropdownItem, vo as TSpinner, Yo as TSwitch, Zo as TTabBar, ts as TTabBarExtended, Hr as TTag, is as TTextArea, di as TTextInput, as as TThemeProvider, Ia as TTooltip, $ as TTypography, cs as TWarning, ve as baseTheme, jr as createTheme, Mr as injectionKey, ga as useConfirm, ls as useDialog, Ao as useScrollbarThumb, X as useTheme };
|
|
6652
6922
|
|
|
6653
6923
|
//# sourceMappingURL=index.es.js.map
|