@roku-ui/vue 0.1.0 → 0.1.1
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/Avatar.vue.d.ts +1 -1
- package/dist/components/Btn.vue.d.ts +1 -1
- package/dist/components/Chip.vue.d.ts +47 -46
- package/dist/components/Indicator.vue.d.ts +1 -1
- package/dist/components/Modal.vue.d.ts +19 -37
- package/dist/components/Notification.vue.d.ts +1 -1
- package/dist/components/NotificationSystem.vue.d.ts +1 -1
- package/dist/components/PinInput.vue.d.ts +1 -1
- package/dist/components/Progress.vue.d.ts +3 -3
- package/dist/components/RokuProvider.vue.d.ts +1 -1
- package/dist/components/Select.vue.d.ts +39 -42
- package/dist/components/Slider.vue.d.ts +77 -42
- package/dist/components/Switch.vue.d.ts +73 -52
- package/dist/components/TextField.vue.d.ts +7 -2
- package/dist/components/ThemeProvider.vue.d.ts +23 -0
- package/dist/components/ThemeSwitch.vue.d.ts +2 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/composables/index.d.ts +61 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1169 -883
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/theme.d.ts +3 -1
- package/package.json +23 -17
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as z, computed as m, openBlock as g, createBlock as U, resolveDynamicComponent as Ee, normalizeClass as w, unref as c, withCtx as ue, renderSlot as I, createCommentVNode as T, getCurrentScope as ht, onScopeDispose as pt, onMounted as pe, nextTick as mt, getCurrentInstance as Qe, watch as ae, ref as y, mergeModels as J, useModel as me, watchEffect as X, createElementBlock as v, createElementVNode as $, withModifiers as Ze, normalizeStyle as C, Fragment as ee, renderList as de, toDisplayString as te, withDirectives as Je, mergeProps as gt, vModelCheckbox as bt, reactive as vt, inject as et, provide as Fe, createTextVNode as yt, Teleport as wt, createVNode as We, Transition as xt, withKeys as _t, useSlots as Mt, isRef as $t } from "vue";
|
|
2
|
+
const St = /* @__PURE__ */ z({
|
|
3
3
|
__name: "Btn",
|
|
4
4
|
props: {
|
|
5
5
|
type: { default: "button" },
|
|
@@ -45,7 +45,7 @@ const ct = /* @__PURE__ */ R({
|
|
|
45
45
|
iconContent: "h-10 w-10 p-3"
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), a = m(() => {
|
|
49
49
|
switch (t.variant) {
|
|
50
50
|
case "filled":
|
|
51
51
|
switch (t.color) {
|
|
@@ -118,212 +118,286 @@ const ct = /* @__PURE__ */ R({
|
|
|
118
118
|
return "btn-default";
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
return (
|
|
122
|
-
"data-size":
|
|
123
|
-
type:
|
|
121
|
+
return (o, i) => (g(), U(Ee(o.is), {
|
|
122
|
+
"data-size": o.size,
|
|
123
|
+
type: o.type,
|
|
124
124
|
class: w(["flex items-center justify-center gap-1 decoration-none", [
|
|
125
|
-
c(
|
|
125
|
+
c(a),
|
|
126
126
|
c(r),
|
|
127
|
-
|
|
127
|
+
o.icon ? c(n).iconContent : c(n).normalContent,
|
|
128
128
|
{
|
|
129
|
-
"filter-grayscale":
|
|
130
|
-
"active:translate-y-0.25": !
|
|
131
|
-
"active:scale-98": !
|
|
132
|
-
"transition-all":
|
|
129
|
+
"filter-grayscale": o.disabled,
|
|
130
|
+
"active:translate-y-0.25": !o.disabled && o.pressEffect === "translate",
|
|
131
|
+
"active:scale-98": !o.disabled && o.pressEffect === "scale",
|
|
132
|
+
"transition-all": o.animate
|
|
133
133
|
}
|
|
134
134
|
]]),
|
|
135
|
-
disabled:
|
|
135
|
+
disabled: o.disabled
|
|
136
136
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
default: ue(() => [
|
|
138
|
+
o.$slots.leftSection ? I(o.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
139
|
+
I(o.$slots, "default"),
|
|
140
|
+
o.$slots.rightSection ? I(o.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
141
141
|
]),
|
|
142
142
|
_: 3
|
|
143
143
|
}, 8, ["data-size", "type", "class", "disabled"]));
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function Ne(e) {
|
|
147
|
+
return ht() ? (pt(e), !0) : !1;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Pe(e) {
|
|
150
150
|
return typeof e == "function" ? e() : c(e);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const ge = typeof window < "u" && typeof document < "u";
|
|
153
153
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
154
|
-
const
|
|
154
|
+
const kt = Object.prototype.toString, At = (e) => kt.call(e) === "[object Object]", Ct = () => {
|
|
155
155
|
};
|
|
156
|
-
function
|
|
157
|
-
return e ||
|
|
156
|
+
function Tt(e) {
|
|
157
|
+
return e || Qe();
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
n ? de(e, n) : t ? e() : Ze(e);
|
|
159
|
+
function zt(e, t = !0, r) {
|
|
160
|
+
Tt() ? pe(e, r) : t ? e() : mt(e);
|
|
162
161
|
}
|
|
163
|
-
function
|
|
162
|
+
function q(e) {
|
|
164
163
|
var t;
|
|
165
|
-
const r =
|
|
164
|
+
const r = Pe(e);
|
|
166
165
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
167
166
|
}
|
|
168
|
-
const
|
|
169
|
-
function
|
|
170
|
-
let t, r, n,
|
|
171
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n,
|
|
172
|
-
return
|
|
167
|
+
const we = ge ? window : void 0;
|
|
168
|
+
function Y(...e) {
|
|
169
|
+
let t, r, n, a;
|
|
170
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t = we) : [t, r, n, a] = e, !t)
|
|
171
|
+
return Ct;
|
|
173
172
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
() => [
|
|
178
|
-
([
|
|
179
|
-
if (
|
|
173
|
+
const o = [], i = () => {
|
|
174
|
+
o.forEach((f) => f()), o.length = 0;
|
|
175
|
+
}, s = (f, u, p, b) => (f.addEventListener(u, p, b), () => f.removeEventListener(u, p, b)), l = ae(
|
|
176
|
+
() => [q(t), Pe(a)],
|
|
177
|
+
([f, u]) => {
|
|
178
|
+
if (i(), !f)
|
|
180
179
|
return;
|
|
181
|
-
const p =
|
|
182
|
-
|
|
183
|
-
...r.flatMap((
|
|
180
|
+
const p = At(u) ? { ...u } : u;
|
|
181
|
+
o.push(
|
|
182
|
+
...r.flatMap((b) => n.map((M) => s(f, b, M, p)))
|
|
184
183
|
);
|
|
185
184
|
},
|
|
186
185
|
{ immediate: !0, flush: "post" }
|
|
187
186
|
), d = () => {
|
|
188
|
-
l(),
|
|
187
|
+
l(), i();
|
|
189
188
|
};
|
|
190
|
-
return
|
|
189
|
+
return Ne(d), d;
|
|
191
190
|
}
|
|
192
|
-
function
|
|
191
|
+
function Rt(e) {
|
|
193
192
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
194
193
|
}
|
|
195
|
-
function
|
|
194
|
+
function Se(...e) {
|
|
196
195
|
let t, r, n = {};
|
|
197
196
|
e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
|
|
198
197
|
const {
|
|
199
|
-
target:
|
|
200
|
-
eventName:
|
|
201
|
-
passive:
|
|
202
|
-
dedupe:
|
|
203
|
-
} = n, l =
|
|
204
|
-
return
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
}
|
|
208
|
-
function
|
|
209
|
-
const e =
|
|
210
|
-
return
|
|
198
|
+
target: a = we,
|
|
199
|
+
eventName: o = "keydown",
|
|
200
|
+
passive: i = !1,
|
|
201
|
+
dedupe: s = !1
|
|
202
|
+
} = n, l = Rt(t);
|
|
203
|
+
return Y(a, o, (f) => {
|
|
204
|
+
f.repeat && Pe(s) || l(f) && r(f);
|
|
205
|
+
}, i);
|
|
206
|
+
}
|
|
207
|
+
function Et() {
|
|
208
|
+
const e = y(!1);
|
|
209
|
+
return Qe() && pe(() => {
|
|
211
210
|
e.value = !0;
|
|
212
211
|
}), e;
|
|
213
212
|
}
|
|
214
|
-
function
|
|
215
|
-
const t =
|
|
213
|
+
function tt(e) {
|
|
214
|
+
const t = Et();
|
|
216
215
|
return m(() => (t.value, !!e()));
|
|
217
216
|
}
|
|
218
|
-
function
|
|
219
|
-
const { window: n =
|
|
220
|
-
let
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
}, l =
|
|
217
|
+
function Nt(e, t, r = {}) {
|
|
218
|
+
const { window: n = we, ...a } = r;
|
|
219
|
+
let o;
|
|
220
|
+
const i = tt(() => n && "MutationObserver" in n), s = () => {
|
|
221
|
+
o && (o.disconnect(), o = void 0);
|
|
222
|
+
}, l = ae(
|
|
223
|
+
() => q(e),
|
|
224
|
+
(u) => {
|
|
225
|
+
s(), i.value && n && u && (o = new MutationObserver(t), o.observe(u, a));
|
|
226
|
+
},
|
|
227
|
+
{ immediate: !0 }
|
|
228
|
+
), d = () => o == null ? void 0 : o.takeRecords(), f = () => {
|
|
229
|
+
s(), l();
|
|
230
|
+
};
|
|
231
|
+
return Ne(f), {
|
|
232
|
+
isSupported: i,
|
|
233
|
+
stop: f,
|
|
234
|
+
takeRecords: d
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function Pt(e, t, r = {}) {
|
|
238
|
+
const { window: n = we, ...a } = r;
|
|
239
|
+
let o;
|
|
240
|
+
const i = tt(() => n && "ResizeObserver" in n), s = () => {
|
|
241
|
+
o && (o.disconnect(), o = void 0);
|
|
242
|
+
}, l = m(() => Array.isArray(e) ? e.map((u) => q(u)) : [q(e)]), d = ae(
|
|
224
243
|
l,
|
|
225
|
-
(
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
for (const p of
|
|
229
|
-
p &&
|
|
244
|
+
(u) => {
|
|
245
|
+
if (s(), i.value && n) {
|
|
246
|
+
o = new ResizeObserver(t);
|
|
247
|
+
for (const p of u)
|
|
248
|
+
p && o.observe(p, a);
|
|
230
249
|
}
|
|
231
250
|
},
|
|
232
251
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
233
|
-
),
|
|
234
|
-
|
|
252
|
+
), f = () => {
|
|
253
|
+
s(), d();
|
|
235
254
|
};
|
|
236
|
-
return
|
|
237
|
-
isSupported:
|
|
238
|
-
stop:
|
|
255
|
+
return Ne(f), {
|
|
256
|
+
isSupported: i,
|
|
257
|
+
stop: f
|
|
239
258
|
};
|
|
240
259
|
}
|
|
241
|
-
function
|
|
260
|
+
function Ht(e, t = {}) {
|
|
242
261
|
const {
|
|
243
262
|
reset: r = !0,
|
|
244
263
|
windowResize: n = !0,
|
|
245
|
-
windowScroll:
|
|
246
|
-
immediate:
|
|
247
|
-
} = t,
|
|
248
|
-
function
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
251
|
-
r && (
|
|
264
|
+
windowScroll: a = !0,
|
|
265
|
+
immediate: o = !0
|
|
266
|
+
} = t, i = y(0), s = y(0), l = y(0), d = y(0), f = y(0), u = y(0), p = y(0), b = y(0);
|
|
267
|
+
function M() {
|
|
268
|
+
const S = q(e);
|
|
269
|
+
if (!S) {
|
|
270
|
+
r && (i.value = 0, s.value = 0, l.value = 0, d.value = 0, f.value = 0, u.value = 0, p.value = 0, b.value = 0);
|
|
252
271
|
return;
|
|
253
272
|
}
|
|
254
|
-
const A =
|
|
255
|
-
|
|
273
|
+
const A = S.getBoundingClientRect();
|
|
274
|
+
i.value = A.height, s.value = A.bottom, l.value = A.left, d.value = A.right, f.value = A.top, u.value = A.width, p.value = A.x, b.value = A.y;
|
|
256
275
|
}
|
|
257
|
-
return
|
|
258
|
-
|
|
276
|
+
return Pt(e, M), ae(() => q(e), (S) => !S && M()), Nt(e, M, {
|
|
277
|
+
attributeFilter: ["style", "class"]
|
|
278
|
+
}), a && Y("scroll", M, { capture: !0, passive: !0 }), n && Y("resize", M, { passive: !0 }), zt(() => {
|
|
279
|
+
o && M();
|
|
259
280
|
}), {
|
|
260
|
-
height:
|
|
261
|
-
bottom:
|
|
281
|
+
height: i,
|
|
282
|
+
bottom: s,
|
|
262
283
|
left: l,
|
|
263
284
|
right: d,
|
|
264
|
-
top:
|
|
265
|
-
width:
|
|
285
|
+
top: f,
|
|
286
|
+
width: u,
|
|
266
287
|
x: p,
|
|
267
|
-
y:
|
|
268
|
-
update:
|
|
288
|
+
y: b,
|
|
289
|
+
update: M
|
|
269
290
|
};
|
|
270
291
|
}
|
|
271
|
-
function
|
|
272
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t,
|
|
273
|
-
|
|
292
|
+
function It(e, t = {}) {
|
|
293
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = y(!1), o = m(() => q(e));
|
|
294
|
+
Y(o, "focus", (s) => {
|
|
274
295
|
var l, d;
|
|
275
|
-
(!n || (d = (l =
|
|
276
|
-
}),
|
|
277
|
-
const
|
|
278
|
-
get: () =>
|
|
279
|
-
set(
|
|
296
|
+
(!n || (d = (l = s.target).matches) != null && d.call(l, ":focus-visible")) && (a.value = !0);
|
|
297
|
+
}), Y(o, "blur", () => a.value = !1);
|
|
298
|
+
const i = m({
|
|
299
|
+
get: () => a.value,
|
|
300
|
+
set(s) {
|
|
280
301
|
var l, d;
|
|
281
|
-
!
|
|
302
|
+
!s && a.value ? (l = o.value) == null || l.blur() : s && !a.value && ((d = o.value) == null || d.focus());
|
|
282
303
|
}
|
|
283
304
|
});
|
|
284
305
|
return ae(
|
|
285
|
-
|
|
306
|
+
o,
|
|
286
307
|
() => {
|
|
287
|
-
|
|
308
|
+
i.value = r;
|
|
288
309
|
},
|
|
289
310
|
{ immediate: !0, flush: "post" }
|
|
290
|
-
), { focused:
|
|
311
|
+
), { focused: i };
|
|
291
312
|
}
|
|
292
|
-
const
|
|
313
|
+
const Ot = { class: "relative inline-block" }, nn = /* @__PURE__ */ z({
|
|
293
314
|
__name: "Slider",
|
|
294
|
-
props: {
|
|
295
|
-
modelValue: {},
|
|
315
|
+
props: /* @__PURE__ */ J({
|
|
296
316
|
size: { default: "md" },
|
|
297
|
-
animate: { type: Boolean, default: !
|
|
317
|
+
animate: { type: Boolean, default: !1 },
|
|
318
|
+
width: { default: 12 },
|
|
298
319
|
options: {},
|
|
299
|
-
|
|
300
|
-
|
|
320
|
+
min: { default: 0 },
|
|
321
|
+
max: { default: 100 },
|
|
322
|
+
step: { default: 1 },
|
|
323
|
+
tickNum: {},
|
|
324
|
+
color: { default: "primary" }
|
|
325
|
+
}, {
|
|
326
|
+
modelValue: {
|
|
327
|
+
default: void 0
|
|
328
|
+
},
|
|
329
|
+
modelModifiers: {}
|
|
330
|
+
}),
|
|
301
331
|
emits: ["update:modelValue"],
|
|
302
|
-
setup(e
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
332
|
+
setup(e) {
|
|
333
|
+
const t = e;
|
|
334
|
+
function r(k, R, E) {
|
|
335
|
+
const H = [];
|
|
336
|
+
for (let j = k; j <= R; j += E)
|
|
337
|
+
H.push(j);
|
|
338
|
+
return H[H.length - 1] !== R && H.push(R), H;
|
|
339
|
+
}
|
|
340
|
+
function n(k, R) {
|
|
341
|
+
const E = [];
|
|
342
|
+
E.push(R[0]);
|
|
343
|
+
const H = (R.length - 1) / (k - 1);
|
|
344
|
+
for (let j = 1; j < k - 1; j++)
|
|
345
|
+
E.push(R[Math.round(j * H)]);
|
|
346
|
+
return E.push(R[R.length - 1]), E;
|
|
347
|
+
}
|
|
348
|
+
const a = m(() => t.options ? t.options.length : t.tickNum ?? 0), o = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), i = m(() => n(a.value, o.value)), s = me(e, "modelValue"), l = m(() => o.value.length ?? 0), d = y(o.value.includes(s.value) ? o.value.indexOf(s.value) : 0);
|
|
349
|
+
function f(k) {
|
|
350
|
+
return o.value.indexOf(k);
|
|
351
|
+
}
|
|
352
|
+
const u = m(() => {
|
|
353
|
+
switch (t.color) {
|
|
354
|
+
case "primary":
|
|
355
|
+
return "bg-primary-container";
|
|
356
|
+
case "secondary":
|
|
357
|
+
return "bg-secondary-container";
|
|
358
|
+
case "tertiary":
|
|
359
|
+
return "bg-tertiary-container";
|
|
360
|
+
case "error":
|
|
361
|
+
return "bg-error-container";
|
|
362
|
+
}
|
|
363
|
+
}), p = m(() => `dark:bg-white bg-${t.color}-container`), b = m(() => {
|
|
364
|
+
switch (t.color) {
|
|
365
|
+
case "primary":
|
|
366
|
+
return "dark:bg-primary-container bg-white";
|
|
367
|
+
case "secondary":
|
|
368
|
+
return "dark:bg-secondary-container bg-white";
|
|
369
|
+
case "tertiary":
|
|
370
|
+
return "dark:bg-tertiary-container bg-white";
|
|
371
|
+
case "error":
|
|
372
|
+
return "dark:bg-error-container bg-white";
|
|
373
|
+
}
|
|
306
374
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
375
|
+
X(() => {
|
|
376
|
+
s.value = o.value[d.value];
|
|
377
|
+
});
|
|
378
|
+
const M = y(), S = y(), A = Ht(M), se = y(!1);
|
|
379
|
+
function ie(k) {
|
|
380
|
+
if (!se.value)
|
|
310
381
|
return;
|
|
311
|
-
if (!(
|
|
312
|
-
|
|
382
|
+
if (!(k.buttons === 1)) {
|
|
383
|
+
se.value = !1;
|
|
313
384
|
return;
|
|
314
385
|
}
|
|
315
|
-
|
|
316
|
-
const { clientX:
|
|
317
|
-
|
|
386
|
+
k.preventDefault(), k.stopPropagation();
|
|
387
|
+
const { clientX: E } = k, H = A.left.value, ft = A.right.value - H, $e = Math.round((E - H) / ft * (l.value - 1));
|
|
388
|
+
$e < 0 || $e > l.value - 1 || (d.value = $e);
|
|
318
389
|
}
|
|
319
|
-
|
|
320
|
-
|
|
390
|
+
X(() => {
|
|
391
|
+
d.value = f(s.value);
|
|
392
|
+
});
|
|
393
|
+
function x(k) {
|
|
394
|
+
k.preventDefault(), k.stopPropagation(), se.value = !0, ie(k);
|
|
321
395
|
}
|
|
322
|
-
|
|
323
|
-
|
|
396
|
+
Y(M, "pointerdown", x), pe(() => {
|
|
397
|
+
Y(document, "pointermove", ie), d.value = Math.max(0, f(s.value));
|
|
324
398
|
});
|
|
325
|
-
const
|
|
326
|
-
switch (
|
|
399
|
+
const O = m(() => {
|
|
400
|
+
switch (t.size) {
|
|
327
401
|
case "sm":
|
|
328
402
|
return {
|
|
329
403
|
wrapper: "h-2",
|
|
@@ -355,82 +429,82 @@ const kt = { class: "relative inline-block" }, Hr = /* @__PURE__ */ R({
|
|
|
355
429
|
progress: "-mx-1.5"
|
|
356
430
|
};
|
|
357
431
|
}
|
|
358
|
-
}),
|
|
432
|
+
}), D = m(() => t.animate ? {
|
|
359
433
|
indicator: "transition-left",
|
|
360
434
|
progress: "transition-width"
|
|
361
435
|
} : {
|
|
362
436
|
indicator: "",
|
|
363
437
|
progress: ""
|
|
364
438
|
});
|
|
365
|
-
return (
|
|
366
|
-
|
|
439
|
+
return (k, R) => (g(), v("div", Ot, [
|
|
440
|
+
$("div", {
|
|
367
441
|
ref_key: "wrapper",
|
|
368
|
-
ref:
|
|
442
|
+
ref: M,
|
|
369
443
|
type: "size",
|
|
370
|
-
class: w(["flex cursor-pointer items-center", c(
|
|
371
|
-
onTouchmove:
|
|
444
|
+
class: w(["flex cursor-pointer items-center", c(O).wrapper]),
|
|
445
|
+
onTouchmove: R[0] || (R[0] = Ze(() => {
|
|
372
446
|
}, ["prevent"]))
|
|
373
447
|
}, [
|
|
374
|
-
|
|
375
|
-
class: w(["rounded-full bg-
|
|
448
|
+
$("div", {
|
|
449
|
+
class: w(["rounded-full bg-surface-high transition-background-color,border-color,color", c(O).innerWrapper])
|
|
376
450
|
}, [
|
|
377
|
-
|
|
378
|
-
class: w(["relative flex", c(
|
|
451
|
+
$("div", {
|
|
452
|
+
class: w(["relative flex", c(O).content]),
|
|
379
453
|
style: C({
|
|
380
|
-
width: `${
|
|
454
|
+
width: `${t.width}rem`
|
|
381
455
|
})
|
|
382
456
|
}, [
|
|
383
|
-
(g(!0),
|
|
384
|
-
key:
|
|
457
|
+
(g(!0), v(ee, null, de(c(i), (E) => (g(), v("div", {
|
|
458
|
+
key: E,
|
|
385
459
|
style: C({
|
|
386
|
-
left: `${
|
|
460
|
+
left: `${f(E) / (c(l) - 1) * 100}%`
|
|
387
461
|
}),
|
|
388
|
-
class: w(["absolute top-50% rounded-full bg-white", c(
|
|
462
|
+
class: w(["absolute top-50% rounded-full bg-white", c(O).tick])
|
|
389
463
|
}, null, 6))), 128)),
|
|
390
|
-
|
|
464
|
+
$("div", {
|
|
391
465
|
ref_key: "indicator",
|
|
392
|
-
ref:
|
|
393
|
-
class: w(["absolute top-50% cursor-pointer rounded-full
|
|
466
|
+
ref: S,
|
|
467
|
+
class: w(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(O).indicator, c(D).indicator, c(p)]]),
|
|
394
468
|
style: C({
|
|
395
|
-
left: `${c(
|
|
469
|
+
left: `${c(d) / (c(l) - 1) * 100}%`
|
|
396
470
|
})
|
|
397
471
|
}, [
|
|
398
|
-
|
|
399
|
-
class: w(["pointer-events-none absolute left-50% top-50% rounded-full
|
|
472
|
+
$("div", {
|
|
473
|
+
class: w(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(O).indicatorInner, c(b)]])
|
|
400
474
|
}, null, 2)
|
|
401
475
|
], 6),
|
|
402
|
-
|
|
403
|
-
class: w(["pointer-events-none h-full rounded-full
|
|
476
|
+
$("div", {
|
|
477
|
+
class: w(["pointer-events-none h-full rounded-full", [c(O).progress, c(D).progress, c(u)]]),
|
|
404
478
|
style: C({
|
|
405
|
-
width: `${c(
|
|
479
|
+
width: `${c(d) / (c(l) - 1) * 100}%`
|
|
406
480
|
})
|
|
407
481
|
}, null, 6)
|
|
408
482
|
], 6)
|
|
409
483
|
], 2)
|
|
410
484
|
], 34),
|
|
411
|
-
|
|
412
|
-
class: "relative mx-1 h-1em text-xs
|
|
485
|
+
$("div", {
|
|
486
|
+
class: "relative mx-1 h-1em text-xs text-surface-onlow",
|
|
413
487
|
style: C({
|
|
414
|
-
width: `${
|
|
488
|
+
width: `${t.width}rem`
|
|
415
489
|
})
|
|
416
490
|
}, [
|
|
417
|
-
(g(!0),
|
|
418
|
-
key:
|
|
491
|
+
(g(!0), v(ee, null, de(c(i), (E, H) => (g(), v("div", {
|
|
492
|
+
key: H,
|
|
419
493
|
style: C({
|
|
420
|
-
left: `${
|
|
494
|
+
left: `${f(E) / (c(l) - 1) * 100}%`
|
|
421
495
|
}),
|
|
422
|
-
class: w(["absolute w-auto flex rounded-full -translate-x-50%", c(
|
|
423
|
-
},
|
|
496
|
+
class: w(["absolute w-auto flex rounded-full -translate-x-50%", c(O).tick])
|
|
497
|
+
}, te(E), 7))), 128))
|
|
424
498
|
], 4)
|
|
425
499
|
]));
|
|
426
500
|
}
|
|
427
501
|
});
|
|
428
|
-
function
|
|
502
|
+
function xe(e) {
|
|
429
503
|
return m(
|
|
430
|
-
() => ({ style:
|
|
504
|
+
() => ({ style: Bt(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
431
505
|
);
|
|
432
506
|
}
|
|
433
|
-
function
|
|
507
|
+
function Bt(e) {
|
|
434
508
|
switch (e) {
|
|
435
509
|
case "none":
|
|
436
510
|
return "--r-rounded: 0";
|
|
@@ -446,10 +520,10 @@ function Mt(e) {
|
|
|
446
520
|
return typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
|
|
447
521
|
}
|
|
448
522
|
}
|
|
449
|
-
const
|
|
523
|
+
const Vt = ["id"], Ft = ["for"], Wt = ["for"], Lt = /* @__PURE__ */ z({
|
|
524
|
+
inheritAttrs: !1,
|
|
450
525
|
__name: "Switch",
|
|
451
|
-
props: {
|
|
452
|
-
modelValue: {},
|
|
526
|
+
props: /* @__PURE__ */ J({
|
|
453
527
|
size: { default: "md" },
|
|
454
528
|
animate: { type: Boolean, default: !0 },
|
|
455
529
|
options: {},
|
|
@@ -457,14 +531,20 @@ const St = ["id"], At = ["for"], $t = ["for"], Br = /* @__PURE__ */ R({
|
|
|
457
531
|
id: {},
|
|
458
532
|
rounded: { default: "full" },
|
|
459
533
|
color: { default: "primary" },
|
|
460
|
-
disabled: { type: Boolean }
|
|
461
|
-
|
|
534
|
+
disabled: { type: Boolean },
|
|
535
|
+
offIcon: {},
|
|
536
|
+
onIcon: {}
|
|
537
|
+
}, {
|
|
538
|
+
modelValue: { type: Boolean },
|
|
539
|
+
modelModifiers: {}
|
|
540
|
+
}),
|
|
462
541
|
emits: ["update:modelValue"],
|
|
463
|
-
setup(e
|
|
464
|
-
const
|
|
465
|
-
switch (
|
|
542
|
+
setup(e) {
|
|
543
|
+
const t = e, r = me(e, "modelValue"), n = y(null), a = y(!1), o = m(() => {
|
|
544
|
+
switch (t.size) {
|
|
466
545
|
case "sm":
|
|
467
546
|
return {
|
|
547
|
+
icon: "text-xs mx-0.5",
|
|
468
548
|
wrapper: "h-4 w-8",
|
|
469
549
|
indicator: a.value ? "h-3 w-4" : "h-3 w-3",
|
|
470
550
|
inactive: "left-[calc(0.125rem-1px)]",
|
|
@@ -472,6 +552,7 @@ const St = ["id"], At = ["for"], $t = ["for"], Br = /* @__PURE__ */ R({
|
|
|
472
552
|
};
|
|
473
553
|
case "md":
|
|
474
554
|
return {
|
|
555
|
+
icon: "text-sm mx-1",
|
|
475
556
|
wrapper: "h-6 w-12",
|
|
476
557
|
indicator: a.value ? "h-4 w-5" : "h-4 w-4",
|
|
477
558
|
inactive: "left-[calc(0.25rem-1px)]",
|
|
@@ -479,106 +560,109 @@ const St = ["id"], At = ["for"], $t = ["for"], Br = /* @__PURE__ */ R({
|
|
|
479
560
|
};
|
|
480
561
|
case "lg":
|
|
481
562
|
return {
|
|
563
|
+
icon: "text-lg mx-2",
|
|
482
564
|
wrapper: "h-8 w-16",
|
|
483
565
|
indicator: a.value ? "h-6 w-8" : "h-6 w-6",
|
|
484
566
|
inactive: "left-[calc(0.25rem-1px)]",
|
|
485
567
|
active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
486
568
|
};
|
|
487
569
|
}
|
|
488
|
-
}), i = m(() =>
|
|
570
|
+
}), i = m(() => t.animate ? {
|
|
489
571
|
indicator: "transition-all",
|
|
490
572
|
progress: "transition-width"
|
|
491
573
|
} : {
|
|
492
574
|
indicator: "",
|
|
493
575
|
progress: ""
|
|
494
|
-
})
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
}) : k(!1);
|
|
502
|
-
function d() {
|
|
503
|
-
const v = k("");
|
|
504
|
-
return de(() => {
|
|
505
|
-
r.id ? v.value = r.id : v.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
506
|
-
}), v;
|
|
576
|
+
});
|
|
577
|
+
function s() {
|
|
578
|
+
const u = y("");
|
|
579
|
+
return pe(() => {
|
|
580
|
+
t.id ? u.value = t.id : u.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
581
|
+
}), u;
|
|
507
582
|
}
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
switch (
|
|
583
|
+
const l = s(), d = m(() => {
|
|
584
|
+
let u = "bg-primary-container";
|
|
585
|
+
switch (t.color) {
|
|
511
586
|
case "secondary":
|
|
512
|
-
|
|
587
|
+
u = "bg-secondary-7";
|
|
513
588
|
break;
|
|
514
589
|
case "tertiary":
|
|
515
|
-
|
|
590
|
+
u = "bg-tertiary-7";
|
|
516
591
|
break;
|
|
517
592
|
case "error":
|
|
518
|
-
|
|
593
|
+
u = "bg-error-7";
|
|
519
594
|
break;
|
|
520
595
|
}
|
|
521
596
|
return {
|
|
522
|
-
wrapper:
|
|
523
|
-
indicator:
|
|
597
|
+
wrapper: r.value ? `border border-transparent ${u}` : "bg-surface-lowest border border-surface-border",
|
|
598
|
+
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
524
599
|
};
|
|
525
|
-
}),
|
|
526
|
-
return (
|
|
600
|
+
}), f = xe(t);
|
|
601
|
+
return (u, p) => (g(), v("div", {
|
|
527
602
|
role: "switch",
|
|
528
603
|
class: w(["relative flex items-center gap-2", {
|
|
529
|
-
"pointer-events-none filter-grayscale":
|
|
604
|
+
"pointer-events-none filter-grayscale op60": t.disabled
|
|
530
605
|
}])
|
|
531
606
|
}, [
|
|
532
|
-
|
|
533
|
-
id: c(
|
|
534
|
-
"onUpdate:modelValue":
|
|
607
|
+
Je($("input", gt({
|
|
608
|
+
id: c(l),
|
|
609
|
+
"onUpdate:modelValue": p[0] || (p[0] = (b) => r.value = b)
|
|
610
|
+
}, u.$attrs, {
|
|
535
611
|
class: "hidden",
|
|
536
612
|
type: "checkbox"
|
|
537
|
-
}, null,
|
|
538
|
-
[
|
|
613
|
+
}), null, 16, Vt), [
|
|
614
|
+
[bt, r.value]
|
|
539
615
|
]),
|
|
540
|
-
|
|
616
|
+
$("label", {
|
|
541
617
|
class: "leading-0 cursor-pointer!",
|
|
542
|
-
for: c(
|
|
618
|
+
for: c(l)
|
|
543
619
|
}, [
|
|
544
|
-
|
|
620
|
+
$("div", {
|
|
545
621
|
ref_key: "wrapper",
|
|
546
|
-
ref:
|
|
547
|
-
class: w([[c(o).wrapper, c(
|
|
548
|
-
style: C([c(
|
|
549
|
-
onPointerdown:
|
|
550
|
-
onPointerup:
|
|
551
|
-
onPointerleave:
|
|
552
|
-
onPointerenter:
|
|
622
|
+
ref: n,
|
|
623
|
+
class: w([[c(o).wrapper, c(d).wrapper, c(f).class], "relative inline-block transition-all"]),
|
|
624
|
+
style: C([c(f).style]),
|
|
625
|
+
onPointerdown: p[1] || (p[1] = (b) => a.value = !0),
|
|
626
|
+
onPointerup: p[2] || (p[2] = (b) => a.value = !1),
|
|
627
|
+
onPointerleave: p[3] || (p[3] = (b) => a.value = !1),
|
|
628
|
+
onPointerenter: p[4] || (p[4] = (b) => b.buttons === 1 && (a.value = !0))
|
|
553
629
|
}, [
|
|
554
|
-
|
|
555
|
-
class: w(["absolute top-50% -translate-y-50%", [c(o).indicator, c(
|
|
556
|
-
style: C([c(
|
|
557
|
-
}, null, 6)
|
|
630
|
+
$("div", {
|
|
631
|
+
class: w(["absolute top-50% -translate-y-50%", [c(o).indicator, c(d).indicator, c(i).indicator, r.value ? c(o).active : c(o).inactive, c(f).class]]),
|
|
632
|
+
style: C([c(f).style])
|
|
633
|
+
}, null, 6),
|
|
634
|
+
$("i", {
|
|
635
|
+
class: w(["absolute top-1/2 -translate-y-50%", [c(o).icon, {
|
|
636
|
+
[`left-0 text-${u.color}-on`]: r.value,
|
|
637
|
+
"right-0 text-surface-on ": !r.value,
|
|
638
|
+
[u.onIcon ?? ""]: r.value && u.onIcon,
|
|
639
|
+
[u.offIcon ?? ""]: !r.value && u.offIcon
|
|
640
|
+
}]])
|
|
641
|
+
}, null, 2)
|
|
558
642
|
], 38)
|
|
559
|
-
], 8,
|
|
560
|
-
|
|
643
|
+
], 8, Ft),
|
|
644
|
+
u.label ? (g(), v("label", {
|
|
561
645
|
key: 0,
|
|
562
|
-
for: c(
|
|
563
|
-
},
|
|
646
|
+
for: c(l)
|
|
647
|
+
}, te(u.label), 9, Wt)) : T("", !0)
|
|
564
648
|
], 2));
|
|
565
649
|
}
|
|
566
650
|
});
|
|
567
|
-
function
|
|
651
|
+
function be(e) {
|
|
568
652
|
"@babel/helpers - typeof";
|
|
569
|
-
return
|
|
653
|
+
return be = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
570
654
|
return typeof t;
|
|
571
655
|
} : function(t) {
|
|
572
656
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
573
|
-
},
|
|
657
|
+
}, be(e);
|
|
574
658
|
}
|
|
575
|
-
var
|
|
659
|
+
var Dt = /^\s+/, jt = /\s+$/;
|
|
576
660
|
function h(e, t) {
|
|
577
661
|
if (e = e || "", t = t || {}, e instanceof h)
|
|
578
662
|
return e;
|
|
579
663
|
if (!(this instanceof h))
|
|
580
664
|
return new h(e, t);
|
|
581
|
-
var r =
|
|
665
|
+
var r = Gt(e);
|
|
582
666
|
this._originalInput = e, this._r = r.r, this._g = r.g, this._b = r.b, this._a = r.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || r.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = r.ok;
|
|
583
667
|
}
|
|
584
668
|
h.prototype = {
|
|
@@ -605,14 +689,14 @@ h.prototype = {
|
|
|
605
689
|
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
606
690
|
},
|
|
607
691
|
getLuminance: function() {
|
|
608
|
-
var t = this.toRgb(), r, n,
|
|
609
|
-
return r = t.r / 255, n = t.g / 255,
|
|
692
|
+
var t = this.toRgb(), r, n, a, o, i, s;
|
|
693
|
+
return r = t.r / 255, n = t.g / 255, a = t.b / 255, r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? i = n / 12.92 : i = Math.pow((n + 0.055) / 1.055, 2.4), a <= 0.03928 ? s = a / 12.92 : s = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * o + 0.7152 * i + 0.0722 * s;
|
|
610
694
|
},
|
|
611
695
|
setAlpha: function(t) {
|
|
612
|
-
return this._a =
|
|
696
|
+
return this._a = rt(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
613
697
|
},
|
|
614
698
|
toHsv: function() {
|
|
615
|
-
var t =
|
|
699
|
+
var t = De(this._r, this._g, this._b);
|
|
616
700
|
return {
|
|
617
701
|
h: t.h * 360,
|
|
618
702
|
s: t.s,
|
|
@@ -621,11 +705,11 @@ h.prototype = {
|
|
|
621
705
|
};
|
|
622
706
|
},
|
|
623
707
|
toHsvString: function() {
|
|
624
|
-
var t =
|
|
625
|
-
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " +
|
|
708
|
+
var t = De(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.v * 100);
|
|
709
|
+
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + a + "%)" : "hsva(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
|
|
626
710
|
},
|
|
627
711
|
toHsl: function() {
|
|
628
|
-
var t =
|
|
712
|
+
var t = Le(this._r, this._g, this._b);
|
|
629
713
|
return {
|
|
630
714
|
h: t.h * 360,
|
|
631
715
|
s: t.s,
|
|
@@ -634,17 +718,17 @@ h.prototype = {
|
|
|
634
718
|
};
|
|
635
719
|
},
|
|
636
720
|
toHslString: function() {
|
|
637
|
-
var t =
|
|
638
|
-
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " +
|
|
721
|
+
var t = Le(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.l * 100);
|
|
722
|
+
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + a + "%)" : "hsla(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
|
|
639
723
|
},
|
|
640
724
|
toHex: function(t) {
|
|
641
|
-
return
|
|
725
|
+
return je(this._r, this._g, this._b, t);
|
|
642
726
|
},
|
|
643
727
|
toHexString: function(t) {
|
|
644
728
|
return "#" + this.toHex(t);
|
|
645
729
|
},
|
|
646
730
|
toHex8: function(t) {
|
|
647
|
-
return
|
|
731
|
+
return Yt(this._r, this._g, this._b, this._a, t);
|
|
648
732
|
},
|
|
649
733
|
toHex8String: function(t) {
|
|
650
734
|
return "#" + this.toHex8(t);
|
|
@@ -662,31 +746,31 @@ h.prototype = {
|
|
|
662
746
|
},
|
|
663
747
|
toPercentageRgb: function() {
|
|
664
748
|
return {
|
|
665
|
-
r: Math.round(
|
|
666
|
-
g: Math.round(
|
|
667
|
-
b: Math.round(
|
|
749
|
+
r: Math.round(_(this._r, 255) * 100) + "%",
|
|
750
|
+
g: Math.round(_(this._g, 255) * 100) + "%",
|
|
751
|
+
b: Math.round(_(this._b, 255) * 100) + "%",
|
|
668
752
|
a: this._a
|
|
669
753
|
};
|
|
670
754
|
},
|
|
671
755
|
toPercentageRgbString: function() {
|
|
672
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
756
|
+
return this._a == 1 ? "rgb(" + Math.round(_(this._r, 255) * 100) + "%, " + Math.round(_(this._g, 255) * 100) + "%, " + Math.round(_(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(_(this._r, 255) * 100) + "%, " + Math.round(_(this._g, 255) * 100) + "%, " + Math.round(_(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
673
757
|
},
|
|
674
758
|
toName: function() {
|
|
675
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 :
|
|
759
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : ir[je(this._r, this._g, this._b, !0)] || !1;
|
|
676
760
|
},
|
|
677
761
|
toFilter: function(t) {
|
|
678
|
-
var r = "#" +
|
|
762
|
+
var r = "#" + Ge(this._r, this._g, this._b, this._a), n = r, a = this._gradientType ? "GradientType = 1, " : "";
|
|
679
763
|
if (t) {
|
|
680
|
-
var
|
|
681
|
-
n = "#" +
|
|
764
|
+
var o = h(t);
|
|
765
|
+
n = "#" + Ge(o._r, o._g, o._b, o._a);
|
|
682
766
|
}
|
|
683
|
-
return "progid:DXImageTransform.Microsoft.gradient(" +
|
|
767
|
+
return "progid:DXImageTransform.Microsoft.gradient(" + a + "startColorstr=" + r + ",endColorstr=" + n + ")";
|
|
684
768
|
},
|
|
685
769
|
toString: function(t) {
|
|
686
770
|
var r = !!t;
|
|
687
771
|
t = t || this._format;
|
|
688
|
-
var n = !1,
|
|
689
|
-
return
|
|
772
|
+
var n = !1, a = this._a < 1 && this._a >= 0, o = !r && a && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
|
|
773
|
+
return o ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
|
|
690
774
|
},
|
|
691
775
|
clone: function() {
|
|
692
776
|
return h(this.toString());
|
|
@@ -696,172 +780,172 @@ h.prototype = {
|
|
|
696
780
|
return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
|
|
697
781
|
},
|
|
698
782
|
lighten: function() {
|
|
699
|
-
return this._applyModification(
|
|
783
|
+
return this._applyModification(Jt, arguments);
|
|
700
784
|
},
|
|
701
785
|
brighten: function() {
|
|
702
|
-
return this._applyModification(
|
|
786
|
+
return this._applyModification(er, arguments);
|
|
703
787
|
},
|
|
704
788
|
darken: function() {
|
|
705
|
-
return this._applyModification(
|
|
789
|
+
return this._applyModification(tr, arguments);
|
|
706
790
|
},
|
|
707
791
|
desaturate: function() {
|
|
708
|
-
return this._applyModification(
|
|
792
|
+
return this._applyModification(Kt, arguments);
|
|
709
793
|
},
|
|
710
794
|
saturate: function() {
|
|
711
|
-
return this._applyModification(
|
|
795
|
+
return this._applyModification(Qt, arguments);
|
|
712
796
|
},
|
|
713
797
|
greyscale: function() {
|
|
714
|
-
return this._applyModification(
|
|
798
|
+
return this._applyModification(Zt, arguments);
|
|
715
799
|
},
|
|
716
800
|
spin: function() {
|
|
717
|
-
return this._applyModification(
|
|
801
|
+
return this._applyModification(rr, arguments);
|
|
718
802
|
},
|
|
719
803
|
_applyCombination: function(t, r) {
|
|
720
804
|
return t.apply(null, [this].concat([].slice.call(r)));
|
|
721
805
|
},
|
|
722
806
|
analogous: function() {
|
|
723
|
-
return this._applyCombination(
|
|
807
|
+
return this._applyCombination(ar, arguments);
|
|
724
808
|
},
|
|
725
809
|
complement: function() {
|
|
726
|
-
return this._applyCombination(
|
|
810
|
+
return this._applyCombination(nr, arguments);
|
|
727
811
|
},
|
|
728
812
|
monochromatic: function() {
|
|
729
|
-
return this._applyCombination(
|
|
813
|
+
return this._applyCombination(sr, arguments);
|
|
730
814
|
},
|
|
731
815
|
splitcomplement: function() {
|
|
732
|
-
return this._applyCombination(
|
|
816
|
+
return this._applyCombination(or, arguments);
|
|
733
817
|
},
|
|
734
818
|
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
735
819
|
// polyad: function (number) {
|
|
736
820
|
// return this._applyCombination(polyad, [number]);
|
|
737
821
|
// },
|
|
738
822
|
triad: function() {
|
|
739
|
-
return this._applyCombination(
|
|
823
|
+
return this._applyCombination(Ue, [3]);
|
|
740
824
|
},
|
|
741
825
|
tetrad: function() {
|
|
742
|
-
return this._applyCombination(
|
|
826
|
+
return this._applyCombination(Ue, [4]);
|
|
743
827
|
}
|
|
744
828
|
};
|
|
745
829
|
h.fromRatio = function(e, t) {
|
|
746
|
-
if (
|
|
830
|
+
if (be(e) == "object") {
|
|
747
831
|
var r = {};
|
|
748
832
|
for (var n in e)
|
|
749
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
833
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = le(e[n]));
|
|
750
834
|
e = r;
|
|
751
835
|
}
|
|
752
836
|
return h(e, t);
|
|
753
837
|
};
|
|
754
|
-
function
|
|
838
|
+
function Gt(e) {
|
|
755
839
|
var t = {
|
|
756
840
|
r: 0,
|
|
757
841
|
g: 0,
|
|
758
842
|
b: 0
|
|
759
|
-
}, r = 1, n = null,
|
|
760
|
-
return typeof e == "string" && (e =
|
|
761
|
-
ok:
|
|
762
|
-
format: e.format ||
|
|
843
|
+
}, r = 1, n = null, a = null, o = null, i = !1, s = !1;
|
|
844
|
+
return typeof e == "string" && (e = dr(e)), be(e) == "object" && (W(e.r) && W(e.g) && W(e.b) ? (t = Ut(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : W(e.h) && W(e.s) && W(e.v) ? (n = le(e.s), a = le(e.v), t = qt(e.h, n, a), i = !0, s = "hsv") : W(e.h) && W(e.s) && W(e.l) && (n = le(e.s), o = le(e.l), t = Xt(e.h, n, o), i = !0, s = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = rt(r), {
|
|
845
|
+
ok: i,
|
|
846
|
+
format: e.format || s,
|
|
763
847
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
764
848
|
g: Math.min(255, Math.max(t.g, 0)),
|
|
765
849
|
b: Math.min(255, Math.max(t.b, 0)),
|
|
766
850
|
a: r
|
|
767
851
|
};
|
|
768
852
|
}
|
|
769
|
-
function
|
|
853
|
+
function Ut(e, t, r) {
|
|
770
854
|
return {
|
|
771
|
-
r:
|
|
772
|
-
g:
|
|
773
|
-
b:
|
|
855
|
+
r: _(e, 255) * 255,
|
|
856
|
+
g: _(t, 255) * 255,
|
|
857
|
+
b: _(r, 255) * 255
|
|
774
858
|
};
|
|
775
859
|
}
|
|
776
|
-
function
|
|
777
|
-
e =
|
|
778
|
-
var n = Math.max(e, t, r),
|
|
779
|
-
if (n ==
|
|
780
|
-
|
|
860
|
+
function Le(e, t, r) {
|
|
861
|
+
e = _(e, 255), t = _(t, 255), r = _(r, 255);
|
|
862
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, i, s = (n + a) / 2;
|
|
863
|
+
if (n == a)
|
|
864
|
+
o = i = 0;
|
|
781
865
|
else {
|
|
782
|
-
var l = n -
|
|
783
|
-
switch (
|
|
866
|
+
var l = n - a;
|
|
867
|
+
switch (i = s > 0.5 ? l / (2 - n - a) : l / (n + a), n) {
|
|
784
868
|
case e:
|
|
785
|
-
|
|
869
|
+
o = (t - r) / l + (t < r ? 6 : 0);
|
|
786
870
|
break;
|
|
787
871
|
case t:
|
|
788
|
-
|
|
872
|
+
o = (r - e) / l + 2;
|
|
789
873
|
break;
|
|
790
874
|
case r:
|
|
791
|
-
|
|
875
|
+
o = (e - t) / l + 4;
|
|
792
876
|
break;
|
|
793
877
|
}
|
|
794
|
-
|
|
878
|
+
o /= 6;
|
|
795
879
|
}
|
|
796
880
|
return {
|
|
797
|
-
h:
|
|
798
|
-
s:
|
|
799
|
-
l:
|
|
881
|
+
h: o,
|
|
882
|
+
s: i,
|
|
883
|
+
l: s
|
|
800
884
|
};
|
|
801
885
|
}
|
|
802
|
-
function
|
|
803
|
-
var n,
|
|
804
|
-
e =
|
|
805
|
-
function
|
|
806
|
-
return
|
|
886
|
+
function Xt(e, t, r) {
|
|
887
|
+
var n, a, o;
|
|
888
|
+
e = _(e, 360), t = _(t, 100), r = _(r, 100);
|
|
889
|
+
function i(d, f, u) {
|
|
890
|
+
return u < 0 && (u += 1), u > 1 && (u -= 1), u < 1 / 6 ? d + (f - d) * 6 * u : u < 1 / 2 ? f : u < 2 / 3 ? d + (f - d) * (2 / 3 - u) * 6 : d;
|
|
807
891
|
}
|
|
808
892
|
if (t === 0)
|
|
809
|
-
n =
|
|
893
|
+
n = a = o = r;
|
|
810
894
|
else {
|
|
811
|
-
var
|
|
812
|
-
n =
|
|
895
|
+
var s = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - s;
|
|
896
|
+
n = i(l, s, e + 1 / 3), a = i(l, s, e), o = i(l, s, e - 1 / 3);
|
|
813
897
|
}
|
|
814
898
|
return {
|
|
815
899
|
r: n * 255,
|
|
816
|
-
g:
|
|
817
|
-
b:
|
|
900
|
+
g: a * 255,
|
|
901
|
+
b: o * 255
|
|
818
902
|
};
|
|
819
903
|
}
|
|
820
|
-
function
|
|
821
|
-
e =
|
|
822
|
-
var n = Math.max(e, t, r),
|
|
823
|
-
if (
|
|
824
|
-
|
|
904
|
+
function De(e, t, r) {
|
|
905
|
+
e = _(e, 255), t = _(t, 255), r = _(r, 255);
|
|
906
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, i, s = n, l = n - a;
|
|
907
|
+
if (i = n === 0 ? 0 : l / n, n == a)
|
|
908
|
+
o = 0;
|
|
825
909
|
else {
|
|
826
910
|
switch (n) {
|
|
827
911
|
case e:
|
|
828
|
-
|
|
912
|
+
o = (t - r) / l + (t < r ? 6 : 0);
|
|
829
913
|
break;
|
|
830
914
|
case t:
|
|
831
|
-
|
|
915
|
+
o = (r - e) / l + 2;
|
|
832
916
|
break;
|
|
833
917
|
case r:
|
|
834
|
-
|
|
918
|
+
o = (e - t) / l + 4;
|
|
835
919
|
break;
|
|
836
920
|
}
|
|
837
|
-
|
|
921
|
+
o /= 6;
|
|
838
922
|
}
|
|
839
923
|
return {
|
|
840
|
-
h:
|
|
841
|
-
s:
|
|
842
|
-
v:
|
|
924
|
+
h: o,
|
|
925
|
+
s: i,
|
|
926
|
+
v: s
|
|
843
927
|
};
|
|
844
928
|
}
|
|
845
|
-
function
|
|
846
|
-
e =
|
|
847
|
-
var n = Math.floor(e),
|
|
929
|
+
function qt(e, t, r) {
|
|
930
|
+
e = _(e, 360) * 6, t = _(t, 100), r = _(r, 100);
|
|
931
|
+
var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), s = r * (1 - (1 - a) * t), l = n % 6, d = [r, i, o, o, s, r][l], f = [s, r, r, i, o, o][l], u = [o, o, s, r, r, i][l];
|
|
848
932
|
return {
|
|
849
933
|
r: d * 255,
|
|
850
|
-
g:
|
|
851
|
-
b:
|
|
934
|
+
g: f * 255,
|
|
935
|
+
b: u * 255
|
|
852
936
|
};
|
|
853
937
|
}
|
|
854
|
-
function
|
|
855
|
-
var
|
|
856
|
-
return n &&
|
|
938
|
+
function je(e, t, r, n) {
|
|
939
|
+
var a = [V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16))];
|
|
940
|
+
return n && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
|
|
857
941
|
}
|
|
858
|
-
function
|
|
859
|
-
var
|
|
860
|
-
return
|
|
942
|
+
function Yt(e, t, r, n, a) {
|
|
943
|
+
var o = [V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16)), V(nt(n))];
|
|
944
|
+
return a && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) && o[3].charAt(0) == o[3].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
|
|
861
945
|
}
|
|
862
|
-
function
|
|
863
|
-
var
|
|
864
|
-
return
|
|
946
|
+
function Ge(e, t, r, n) {
|
|
947
|
+
var a = [V(nt(n)), V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16))];
|
|
948
|
+
return a.join("");
|
|
865
949
|
}
|
|
866
950
|
h.equals = function(e, t) {
|
|
867
951
|
return !e || !t ? !1 : h(e).toRgbString() == h(t).toRgbString();
|
|
@@ -873,54 +957,54 @@ h.random = function() {
|
|
|
873
957
|
b: Math.random()
|
|
874
958
|
});
|
|
875
959
|
};
|
|
876
|
-
function
|
|
960
|
+
function Kt(e, t) {
|
|
877
961
|
t = t === 0 ? 0 : t || 10;
|
|
878
962
|
var r = h(e).toHsl();
|
|
879
|
-
return r.s -= t / 100, r.s =
|
|
963
|
+
return r.s -= t / 100, r.s = _e(r.s), h(r);
|
|
880
964
|
}
|
|
881
|
-
function
|
|
965
|
+
function Qt(e, t) {
|
|
882
966
|
t = t === 0 ? 0 : t || 10;
|
|
883
967
|
var r = h(e).toHsl();
|
|
884
|
-
return r.s += t / 100, r.s =
|
|
968
|
+
return r.s += t / 100, r.s = _e(r.s), h(r);
|
|
885
969
|
}
|
|
886
|
-
function
|
|
970
|
+
function Zt(e) {
|
|
887
971
|
return h(e).desaturate(100);
|
|
888
972
|
}
|
|
889
|
-
function
|
|
973
|
+
function Jt(e, t) {
|
|
890
974
|
t = t === 0 ? 0 : t || 10;
|
|
891
975
|
var r = h(e).toHsl();
|
|
892
|
-
return r.l += t / 100, r.l =
|
|
976
|
+
return r.l += t / 100, r.l = _e(r.l), h(r);
|
|
893
977
|
}
|
|
894
|
-
function
|
|
978
|
+
function er(e, t) {
|
|
895
979
|
t = t === 0 ? 0 : t || 10;
|
|
896
980
|
var r = h(e).toRgb();
|
|
897
981
|
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), h(r);
|
|
898
982
|
}
|
|
899
|
-
function
|
|
983
|
+
function tr(e, t) {
|
|
900
984
|
t = t === 0 ? 0 : t || 10;
|
|
901
985
|
var r = h(e).toHsl();
|
|
902
|
-
return r.l -= t / 100, r.l =
|
|
986
|
+
return r.l -= t / 100, r.l = _e(r.l), h(r);
|
|
903
987
|
}
|
|
904
|
-
function
|
|
988
|
+
function rr(e, t) {
|
|
905
989
|
var r = h(e).toHsl(), n = (r.h + t) % 360;
|
|
906
990
|
return r.h = n < 0 ? 360 + n : n, h(r);
|
|
907
991
|
}
|
|
908
|
-
function
|
|
992
|
+
function nr(e) {
|
|
909
993
|
var t = h(e).toHsl();
|
|
910
994
|
return t.h = (t.h + 180) % 360, h(t);
|
|
911
995
|
}
|
|
912
|
-
function
|
|
996
|
+
function Ue(e, t) {
|
|
913
997
|
if (isNaN(t) || t <= 0)
|
|
914
998
|
throw new Error("Argument to polyad must be a positive number");
|
|
915
|
-
for (var r = h(e).toHsl(), n = [h(e)],
|
|
999
|
+
for (var r = h(e).toHsl(), n = [h(e)], a = 360 / t, o = 1; o < t; o++)
|
|
916
1000
|
n.push(h({
|
|
917
|
-
h: (r.h +
|
|
1001
|
+
h: (r.h + o * a) % 360,
|
|
918
1002
|
s: r.s,
|
|
919
1003
|
l: r.l
|
|
920
1004
|
}));
|
|
921
1005
|
return n;
|
|
922
1006
|
}
|
|
923
|
-
function
|
|
1007
|
+
function or(e) {
|
|
924
1008
|
var t = h(e).toHsl(), r = t.h;
|
|
925
1009
|
return [h(e), h({
|
|
926
1010
|
h: (r + 72) % 360,
|
|
@@ -932,64 +1016,64 @@ function Wt(e) {
|
|
|
932
1016
|
l: t.l
|
|
933
1017
|
})];
|
|
934
1018
|
}
|
|
935
|
-
function
|
|
1019
|
+
function ar(e, t, r) {
|
|
936
1020
|
t = t || 6, r = r || 30;
|
|
937
|
-
var n = h(e).toHsl(),
|
|
938
|
-
for (n.h = (n.h - (
|
|
939
|
-
n.h = (n.h +
|
|
940
|
-
return
|
|
1021
|
+
var n = h(e).toHsl(), a = 360 / r, o = [h(e)];
|
|
1022
|
+
for (n.h = (n.h - (a * t >> 1) + 720) % 360; --t; )
|
|
1023
|
+
n.h = (n.h + a) % 360, o.push(h(n));
|
|
1024
|
+
return o;
|
|
941
1025
|
}
|
|
942
|
-
function
|
|
1026
|
+
function sr(e, t) {
|
|
943
1027
|
t = t || 6;
|
|
944
|
-
for (var r = h(e).toHsv(), n = r.h,
|
|
945
|
-
|
|
1028
|
+
for (var r = h(e).toHsv(), n = r.h, a = r.s, o = r.v, i = [], s = 1 / t; t--; )
|
|
1029
|
+
i.push(h({
|
|
946
1030
|
h: n,
|
|
947
|
-
s,
|
|
948
|
-
v:
|
|
949
|
-
})),
|
|
950
|
-
return
|
|
1031
|
+
s: a,
|
|
1032
|
+
v: o
|
|
1033
|
+
})), o = (o + s) % 1;
|
|
1034
|
+
return i;
|
|
951
1035
|
}
|
|
952
1036
|
h.mix = function(e, t, r) {
|
|
953
1037
|
r = r === 0 ? 0 : r || 50;
|
|
954
|
-
var n = h(e).toRgb(),
|
|
955
|
-
r: (
|
|
956
|
-
g: (
|
|
957
|
-
b: (
|
|
958
|
-
a: (
|
|
1038
|
+
var n = h(e).toRgb(), a = h(t).toRgb(), o = r / 100, i = {
|
|
1039
|
+
r: (a.r - n.r) * o + n.r,
|
|
1040
|
+
g: (a.g - n.g) * o + n.g,
|
|
1041
|
+
b: (a.b - n.b) * o + n.b,
|
|
1042
|
+
a: (a.a - n.a) * o + n.a
|
|
959
1043
|
};
|
|
960
|
-
return h(
|
|
1044
|
+
return h(i);
|
|
961
1045
|
};
|
|
962
1046
|
h.readability = function(e, t) {
|
|
963
1047
|
var r = h(e), n = h(t);
|
|
964
1048
|
return (Math.max(r.getLuminance(), n.getLuminance()) + 0.05) / (Math.min(r.getLuminance(), n.getLuminance()) + 0.05);
|
|
965
1049
|
};
|
|
966
1050
|
h.isReadable = function(e, t, r) {
|
|
967
|
-
var n = h.readability(e, t),
|
|
968
|
-
switch (
|
|
1051
|
+
var n = h.readability(e, t), a, o;
|
|
1052
|
+
switch (o = !1, a = fr(r), a.level + a.size) {
|
|
969
1053
|
case "AAsmall":
|
|
970
1054
|
case "AAAlarge":
|
|
971
|
-
|
|
1055
|
+
o = n >= 4.5;
|
|
972
1056
|
break;
|
|
973
1057
|
case "AAlarge":
|
|
974
|
-
|
|
1058
|
+
o = n >= 3;
|
|
975
1059
|
break;
|
|
976
1060
|
case "AAAsmall":
|
|
977
|
-
|
|
1061
|
+
o = n >= 7;
|
|
978
1062
|
break;
|
|
979
1063
|
}
|
|
980
|
-
return
|
|
1064
|
+
return o;
|
|
981
1065
|
};
|
|
982
1066
|
h.mostReadable = function(e, t, r) {
|
|
983
|
-
var n = null,
|
|
984
|
-
r = r || {},
|
|
1067
|
+
var n = null, a = 0, o, i, s, l;
|
|
1068
|
+
r = r || {}, i = r.includeFallbackColors, s = r.level, l = r.size;
|
|
985
1069
|
for (var d = 0; d < t.length; d++)
|
|
986
|
-
|
|
1070
|
+
o = h.readability(e, t[d]), o > a && (a = o, n = h(t[d]));
|
|
987
1071
|
return h.isReadable(e, n, {
|
|
988
|
-
level:
|
|
1072
|
+
level: s,
|
|
989
1073
|
size: l
|
|
990
|
-
}) || !
|
|
1074
|
+
}) || !i ? n : (r.includeFallbackColors = !1, h.mostReadable(e, ["#fff", "#000"], r));
|
|
991
1075
|
};
|
|
992
|
-
var
|
|
1076
|
+
var Ae = h.names = {
|
|
993
1077
|
aliceblue: "f0f8ff",
|
|
994
1078
|
antiquewhite: "faebd7",
|
|
995
1079
|
aqua: "0ff",
|
|
@@ -1139,69 +1223,69 @@ var ye = h.names = {
|
|
|
1139
1223
|
whitesmoke: "f5f5f5",
|
|
1140
1224
|
yellow: "ff0",
|
|
1141
1225
|
yellowgreen: "9acd32"
|
|
1142
|
-
},
|
|
1143
|
-
function
|
|
1226
|
+
}, ir = h.hexNames = lr(Ae);
|
|
1227
|
+
function lr(e) {
|
|
1144
1228
|
var t = {};
|
|
1145
1229
|
for (var r in e)
|
|
1146
1230
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
1147
1231
|
return t;
|
|
1148
1232
|
}
|
|
1149
|
-
function
|
|
1233
|
+
function rt(e) {
|
|
1150
1234
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1151
1235
|
}
|
|
1152
|
-
function
|
|
1153
|
-
|
|
1154
|
-
var r =
|
|
1236
|
+
function _(e, t) {
|
|
1237
|
+
cr(e) && (e = "100%");
|
|
1238
|
+
var r = ur(e);
|
|
1155
1239
|
return e = Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
|
|
1156
1240
|
}
|
|
1157
|
-
function
|
|
1241
|
+
function _e(e) {
|
|
1158
1242
|
return Math.min(1, Math.max(0, e));
|
|
1159
1243
|
}
|
|
1160
|
-
function
|
|
1244
|
+
function P(e) {
|
|
1161
1245
|
return parseInt(e, 16);
|
|
1162
1246
|
}
|
|
1163
|
-
function
|
|
1247
|
+
function cr(e) {
|
|
1164
1248
|
return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
|
|
1165
1249
|
}
|
|
1166
|
-
function
|
|
1250
|
+
function ur(e) {
|
|
1167
1251
|
return typeof e == "string" && e.indexOf("%") != -1;
|
|
1168
1252
|
}
|
|
1169
|
-
function
|
|
1253
|
+
function V(e) {
|
|
1170
1254
|
return e.length == 1 ? "0" + e : "" + e;
|
|
1171
1255
|
}
|
|
1172
|
-
function
|
|
1256
|
+
function le(e) {
|
|
1173
1257
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
1174
1258
|
}
|
|
1175
|
-
function
|
|
1259
|
+
function nt(e) {
|
|
1176
1260
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1177
1261
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return
|
|
1262
|
+
function Xe(e) {
|
|
1263
|
+
return P(e) / 255;
|
|
1180
1264
|
}
|
|
1181
|
-
var
|
|
1182
|
-
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?",
|
|
1265
|
+
var B = function() {
|
|
1266
|
+
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", a = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
|
|
1183
1267
|
return {
|
|
1184
1268
|
CSS_UNIT: new RegExp(r),
|
|
1185
1269
|
rgb: new RegExp("rgb" + n),
|
|
1186
|
-
rgba: new RegExp("rgba" +
|
|
1270
|
+
rgba: new RegExp("rgba" + a),
|
|
1187
1271
|
hsl: new RegExp("hsl" + n),
|
|
1188
|
-
hsla: new RegExp("hsla" +
|
|
1272
|
+
hsla: new RegExp("hsla" + a),
|
|
1189
1273
|
hsv: new RegExp("hsv" + n),
|
|
1190
|
-
hsva: new RegExp("hsva" +
|
|
1274
|
+
hsva: new RegExp("hsva" + a),
|
|
1191
1275
|
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1192
1276
|
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1193
1277
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1194
1278
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1195
1279
|
};
|
|
1196
1280
|
}();
|
|
1197
|
-
function
|
|
1198
|
-
return !!
|
|
1281
|
+
function W(e) {
|
|
1282
|
+
return !!B.CSS_UNIT.exec(e);
|
|
1199
1283
|
}
|
|
1200
|
-
function
|
|
1201
|
-
e = e.replace(
|
|
1284
|
+
function dr(e) {
|
|
1285
|
+
e = e.replace(Dt, "").replace(jt, "").toLowerCase();
|
|
1202
1286
|
var t = !1;
|
|
1203
|
-
if (
|
|
1204
|
-
e =
|
|
1287
|
+
if (Ae[e])
|
|
1288
|
+
e = Ae[e], t = !0;
|
|
1205
1289
|
else if (e == "transparent")
|
|
1206
1290
|
return {
|
|
1207
1291
|
r: 0,
|
|
@@ -1211,58 +1295,58 @@ function Kt(e) {
|
|
|
1211
1295
|
format: "name"
|
|
1212
1296
|
};
|
|
1213
1297
|
var r;
|
|
1214
|
-
return (r =
|
|
1298
|
+
return (r = B.rgb.exec(e)) ? {
|
|
1215
1299
|
r: r[1],
|
|
1216
1300
|
g: r[2],
|
|
1217
1301
|
b: r[3]
|
|
1218
|
-
} : (r =
|
|
1302
|
+
} : (r = B.rgba.exec(e)) ? {
|
|
1219
1303
|
r: r[1],
|
|
1220
1304
|
g: r[2],
|
|
1221
1305
|
b: r[3],
|
|
1222
1306
|
a: r[4]
|
|
1223
|
-
} : (r =
|
|
1307
|
+
} : (r = B.hsl.exec(e)) ? {
|
|
1224
1308
|
h: r[1],
|
|
1225
1309
|
s: r[2],
|
|
1226
1310
|
l: r[3]
|
|
1227
|
-
} : (r =
|
|
1311
|
+
} : (r = B.hsla.exec(e)) ? {
|
|
1228
1312
|
h: r[1],
|
|
1229
1313
|
s: r[2],
|
|
1230
1314
|
l: r[3],
|
|
1231
1315
|
a: r[4]
|
|
1232
|
-
} : (r =
|
|
1316
|
+
} : (r = B.hsv.exec(e)) ? {
|
|
1233
1317
|
h: r[1],
|
|
1234
1318
|
s: r[2],
|
|
1235
1319
|
v: r[3]
|
|
1236
|
-
} : (r =
|
|
1320
|
+
} : (r = B.hsva.exec(e)) ? {
|
|
1237
1321
|
h: r[1],
|
|
1238
1322
|
s: r[2],
|
|
1239
1323
|
v: r[3],
|
|
1240
1324
|
a: r[4]
|
|
1241
|
-
} : (r =
|
|
1242
|
-
r:
|
|
1243
|
-
g:
|
|
1244
|
-
b:
|
|
1245
|
-
a:
|
|
1325
|
+
} : (r = B.hex8.exec(e)) ? {
|
|
1326
|
+
r: P(r[1]),
|
|
1327
|
+
g: P(r[2]),
|
|
1328
|
+
b: P(r[3]),
|
|
1329
|
+
a: Xe(r[4]),
|
|
1246
1330
|
format: t ? "name" : "hex8"
|
|
1247
|
-
} : (r =
|
|
1248
|
-
r:
|
|
1249
|
-
g:
|
|
1250
|
-
b:
|
|
1331
|
+
} : (r = B.hex6.exec(e)) ? {
|
|
1332
|
+
r: P(r[1]),
|
|
1333
|
+
g: P(r[2]),
|
|
1334
|
+
b: P(r[3]),
|
|
1251
1335
|
format: t ? "name" : "hex"
|
|
1252
|
-
} : (r =
|
|
1253
|
-
r:
|
|
1254
|
-
g:
|
|
1255
|
-
b:
|
|
1256
|
-
a:
|
|
1336
|
+
} : (r = B.hex4.exec(e)) ? {
|
|
1337
|
+
r: P(r[1] + "" + r[1]),
|
|
1338
|
+
g: P(r[2] + "" + r[2]),
|
|
1339
|
+
b: P(r[3] + "" + r[3]),
|
|
1340
|
+
a: Xe(r[4] + "" + r[4]),
|
|
1257
1341
|
format: t ? "name" : "hex8"
|
|
1258
|
-
} : (r =
|
|
1259
|
-
r:
|
|
1260
|
-
g:
|
|
1261
|
-
b:
|
|
1342
|
+
} : (r = B.hex3.exec(e)) ? {
|
|
1343
|
+
r: P(r[1] + "" + r[1]),
|
|
1344
|
+
g: P(r[2] + "" + r[2]),
|
|
1345
|
+
b: P(r[3] + "" + r[3]),
|
|
1262
1346
|
format: t ? "name" : "hex"
|
|
1263
1347
|
} : !1;
|
|
1264
1348
|
}
|
|
1265
|
-
function
|
|
1349
|
+
function fr(e) {
|
|
1266
1350
|
var t, r;
|
|
1267
1351
|
return e = e || {
|
|
1268
1352
|
level: "AA",
|
|
@@ -1272,114 +1356,232 @@ function Qt(e) {
|
|
|
1272
1356
|
size: r
|
|
1273
1357
|
};
|
|
1274
1358
|
}
|
|
1275
|
-
const
|
|
1276
|
-
primary: ["#
|
|
1277
|
-
secondary: ["#
|
|
1278
|
-
tertiary: ["#
|
|
1279
|
-
error: ["#
|
|
1359
|
+
const He = {
|
|
1360
|
+
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
1361
|
+
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
1362
|
+
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
1363
|
+
error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
|
|
1280
1364
|
surface: ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#404040", "#262626", "#171717", "#0a0a0a"]
|
|
1281
|
-
},
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1365
|
+
}, Ce = {
|
|
1366
|
+
name: "dark",
|
|
1367
|
+
scheme: "dark",
|
|
1368
|
+
colors: He
|
|
1369
|
+
}, hr = {
|
|
1370
|
+
name: "light",
|
|
1371
|
+
scheme: "light",
|
|
1372
|
+
colors: He
|
|
1373
|
+
}, on = Symbol("Notifications"), ot = vt([]);
|
|
1374
|
+
function pr() {
|
|
1375
|
+
return ot;
|
|
1376
|
+
}
|
|
1377
|
+
class an {
|
|
1289
1378
|
static show(t) {
|
|
1290
|
-
t.hash = Math.random().toString(36),
|
|
1379
|
+
t.hash = Math.random().toString(36), ot.push(t);
|
|
1291
1380
|
}
|
|
1292
1381
|
}
|
|
1293
|
-
const
|
|
1382
|
+
const Te = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28], qe = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32, 0.64];
|
|
1383
|
+
function mr(e) {
|
|
1384
|
+
const t = h(e).toHsl().l;
|
|
1385
|
+
return Te.reduce(
|
|
1386
|
+
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
1387
|
+
);
|
|
1388
|
+
}
|
|
1389
|
+
function gr(e) {
|
|
1390
|
+
const t = h(e), r = mr(t), n = Te.findIndex((o) => o === r), a = Te.map((o) => {
|
|
1391
|
+
const i = h({ h: t.toHsl().h, s: t.toHsl().s, l: o }), s = qe[n] - qe[n];
|
|
1392
|
+
return s >= 0 ? i.saturate(s * 100) : i.desaturate(s * -100), i;
|
|
1393
|
+
});
|
|
1394
|
+
return { baseColorIndex: n, colors: a.map((o) => o.toHexString()) };
|
|
1395
|
+
}
|
|
1396
|
+
function sn(e) {
|
|
1397
|
+
return gr(e).colors;
|
|
1398
|
+
}
|
|
1399
|
+
function br() {
|
|
1400
|
+
if (typeof window > "u")
|
|
1401
|
+
return y("dark");
|
|
1402
|
+
const e = y(document.documentElement.dataset.theme);
|
|
1403
|
+
return new MutationObserver((r) => {
|
|
1404
|
+
r.forEach((n) => {
|
|
1405
|
+
n.type === "attributes" && n.attributeName === "data-theme" && (e.value = document.documentElement.dataset.theme);
|
|
1406
|
+
});
|
|
1407
|
+
}).observe(document.documentElement, {
|
|
1408
|
+
attributes: !0,
|
|
1409
|
+
attributeFilter: ["data-theme"]
|
|
1410
|
+
}), e;
|
|
1411
|
+
}
|
|
1412
|
+
function ln() {
|
|
1413
|
+
return et("currentThemeScheme", null);
|
|
1414
|
+
}
|
|
1415
|
+
function vr() {
|
|
1416
|
+
return et("currentTheme", y(Ce));
|
|
1417
|
+
}
|
|
1418
|
+
function at(e, t = !0) {
|
|
1419
|
+
const r = y(e), n = y(e.scheme), a = br();
|
|
1420
|
+
X(() => {
|
|
1421
|
+
a.value && (n.value = a.value);
|
|
1422
|
+
}), Fe("currentTheme", r), Fe("currentThemeScheme", n);
|
|
1423
|
+
const i = {
|
|
1424
|
+
...Object.keys(r.value.colors).map((f) => {
|
|
1425
|
+
const u = f;
|
|
1426
|
+
return r.value.colors[u].reduce((b, M, S) => {
|
|
1427
|
+
const A = h(M).toRgb();
|
|
1428
|
+
return b[`--r-color-${u}-${S}`] = `${A.r} ${A.g} ${A.b}`, b;
|
|
1429
|
+
}, {});
|
|
1430
|
+
}).reduce((f, u) => ({
|
|
1431
|
+
...f,
|
|
1432
|
+
...u
|
|
1433
|
+
}), {})
|
|
1434
|
+
}, s = {
|
|
1435
|
+
"color-scheme": n.value,
|
|
1436
|
+
"font-family": "'Roboto', sans-serif",
|
|
1437
|
+
"background-color": "rgb(var(--r-color-surface-low))",
|
|
1438
|
+
color: "rgb(var(--r-color-surface-on))"
|
|
1439
|
+
}, l = m(() => {
|
|
1440
|
+
if (t)
|
|
1441
|
+
return {};
|
|
1442
|
+
switch (e.scheme) {
|
|
1443
|
+
case "dark":
|
|
1444
|
+
return {
|
|
1445
|
+
colorScheme: "dark",
|
|
1446
|
+
"--r-color-surface-on": "var(--r-color-surface-3)",
|
|
1447
|
+
"--r-color-surface-oninverted": "var(--r-color-surface-8)",
|
|
1448
|
+
"--r-color-surface-onlow": "var(--r-color-surface-4)",
|
|
1449
|
+
"--r-color-surface-onlowinverted": "var(--r-color-surface-7)",
|
|
1450
|
+
"--r-color-surface-lowest": "var(--r-color-surface-9)",
|
|
1451
|
+
"--r-color-surface-low": "var(--r-color-surface-9)",
|
|
1452
|
+
"--r-color-surface-base": "var(--r-color-surface-8)",
|
|
1453
|
+
"--r-color-surface-high": "var(--r-color-surface-7)",
|
|
1454
|
+
"--r-color-surface-highest": "var(--r-color-surface-6)",
|
|
1455
|
+
"--r-color-surface-border": "var(--r-color-surface-7)",
|
|
1456
|
+
"--r-color-primary-container": "var(--r-color-primary-8)",
|
|
1457
|
+
"--r-color-secondary-container": "var(--r-color-secondary-8)",
|
|
1458
|
+
"--r-color-tertiary-container": "var(--r-color-tertiary-8)",
|
|
1459
|
+
"--r-color-error-container": "var(--r-color-error-8)",
|
|
1460
|
+
"--r-color-primary-containerd": "var(--r-color-primary-9)",
|
|
1461
|
+
"--r-color-secondary-containerd": "var(--r-color-secondary-9)",
|
|
1462
|
+
"--r-color-tertiary-containerd": "var(--r-color-tertiary-9)",
|
|
1463
|
+
"--r-color-error-containerd": "var(--r-color-error-9)",
|
|
1464
|
+
"--r-color-primary-containerl": "var(--r-color-primary-6)",
|
|
1465
|
+
"--r-color-secondary-containerl": "var(--r-color-secondary-6)",
|
|
1466
|
+
"--r-color-tertiary-containerl": "var(--r-color-tertiary-6)",
|
|
1467
|
+
"--r-color-error-containerl": "var(--r-color-error-6)"
|
|
1468
|
+
};
|
|
1469
|
+
case "light":
|
|
1470
|
+
return {
|
|
1471
|
+
colorScheme: "light",
|
|
1472
|
+
"--r-color-surface-on": "var(--r-color-surface-7)",
|
|
1473
|
+
"--r-color-surface-oninverted": "var(--r-color-surface-2)",
|
|
1474
|
+
"--r-color-surface-onlow": "var(--r-color-surface-6)",
|
|
1475
|
+
"--r-color-surface-onlowinverted": "var(--r-color-surface-3)",
|
|
1476
|
+
"--r-color-surface-lowest": "var(--r-color-surface-3)",
|
|
1477
|
+
"--r-color-surface-low": "var(--r-color-surface-2)",
|
|
1478
|
+
"--r-color-surface-base": "var(--r-color-surface-1)",
|
|
1479
|
+
"--r-color-surface-high": "var(--r-color-surface-0)",
|
|
1480
|
+
"--r-color-surface-highest": "var(--r-color-surface-0)",
|
|
1481
|
+
"--r-color-surface-border": "var(--r-color-surface-4)",
|
|
1482
|
+
"--r-color-primary-container": "var(--r-color-primary-6)",
|
|
1483
|
+
"--r-color-secondary-container": "var(--r-color-secondary-6)",
|
|
1484
|
+
"--r-color-tertiary-container": "var(--r-color-tertiary-6)",
|
|
1485
|
+
"--r-color-error-container": "var(--r-color-error-6)",
|
|
1486
|
+
"--r-color-primary-containerd": "var(--r-color-primary-7)",
|
|
1487
|
+
"--r-color-secondary-containerd": "var(--r-color-secondary-7)",
|
|
1488
|
+
"--r-color-tertiary-containerd": "var(--r-color-tertiary-7)",
|
|
1489
|
+
"--r-color-error-containerd": "var(--r-color-error-7)",
|
|
1490
|
+
"--r-color-primary-containerl": "var(--r-color-primary-4)",
|
|
1491
|
+
"--r-color-secondary-containerl": "var(--r-color-secondary-4)",
|
|
1492
|
+
"--r-color-tertiary-containerl": "var(--r-color-tertiary-4)",
|
|
1493
|
+
"--r-color-error-containerl": "var(--r-color-error-4)"
|
|
1494
|
+
};
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
return {
|
|
1498
|
+
...i,
|
|
1499
|
+
...s,
|
|
1500
|
+
...l.value
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1503
|
+
const cn = /* @__PURE__ */ z({
|
|
1294
1504
|
__name: "RokuProvider",
|
|
1295
1505
|
props: {
|
|
1296
1506
|
is: { default: "div" },
|
|
1297
1507
|
theme: { default() {
|
|
1298
|
-
return
|
|
1508
|
+
return typeof window > "u" || document.documentElement.dataset.theme === "dark" ? Ce : hr;
|
|
1299
1509
|
} }
|
|
1300
1510
|
},
|
|
1301
1511
|
setup(e) {
|
|
1302
|
-
const t = e, r =
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
};
|
|
1318
|
-
return rt("theme", t.theme), (s, a) => (g(), L(xe(s.is), { style: n }, {
|
|
1319
|
-
default: ce(() => [
|
|
1320
|
-
P(s.$slots, "default")
|
|
1512
|
+
const t = e, r = y(0), n = y(0);
|
|
1513
|
+
ge && new ResizeObserver(() => {
|
|
1514
|
+
const s = window.innerWidth - document.body.clientWidth;
|
|
1515
|
+
s !== 0 && (r.value = s), n.value = s;
|
|
1516
|
+
}).observe(document.body);
|
|
1517
|
+
const a = m(() => n.value === r.value ? "0px" : `${r.value}px`), o = at(t.theme);
|
|
1518
|
+
return (i, s) => (g(), U(Ee(i.is), {
|
|
1519
|
+
style: C([
|
|
1520
|
+
c(o),
|
|
1521
|
+
{ paddingRight: c(a) }
|
|
1522
|
+
]),
|
|
1523
|
+
class: "text-surface-on transition-background-color,border-color,color"
|
|
1524
|
+
}, {
|
|
1525
|
+
default: ue(() => [
|
|
1526
|
+
I(i.$slots, "default")
|
|
1321
1527
|
]),
|
|
1322
1528
|
_: 3
|
|
1323
|
-
}));
|
|
1529
|
+
}, 8, ["style"]));
|
|
1324
1530
|
}
|
|
1325
|
-
}),
|
|
1531
|
+
}), yr = { class: "w-full flex items-center" }, wr = ["placeholder", "value"], xr = /* @__PURE__ */ $("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), _r = {
|
|
1326
1532
|
key: 0,
|
|
1327
1533
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1330
|
-
],
|
|
1534
|
+
}, Mr = ["onPointerdown", "onHover"], $r = { key: 0 }, Sr = /* @__PURE__ */ $("i", { class: "i-tabler-check h-3 w-3" }, null, -1), kr = [
|
|
1535
|
+
Sr
|
|
1536
|
+
], un = /* @__PURE__ */ z({
|
|
1331
1537
|
__name: "Select",
|
|
1332
|
-
props: {
|
|
1538
|
+
props: /* @__PURE__ */ J({
|
|
1333
1539
|
options: { default() {
|
|
1334
1540
|
return [];
|
|
1335
1541
|
} },
|
|
1336
|
-
modelValue: { default: void 0 },
|
|
1337
1542
|
size: { default: "md" },
|
|
1338
|
-
noneText: { default: "No options" }
|
|
1339
|
-
|
|
1340
|
-
|
|
1543
|
+
noneText: { default: "No options" },
|
|
1544
|
+
placeholder: { default: "" }
|
|
1545
|
+
}, {
|
|
1546
|
+
modelValue: { default: void 0 },
|
|
1547
|
+
modelModifiers: {}
|
|
1548
|
+
}),
|
|
1549
|
+
emits: /* @__PURE__ */ J(["change"], ["update:modelValue"]),
|
|
1341
1550
|
setup(e, { emit: t }) {
|
|
1342
|
-
const r = e, n = t, s = m(
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
}), a = k(null), o = k(null), { focused: i } = xt(a), l = m(() => r.options.map((x) => _(x)).indexOf(s.value)), d = k(-1), u = k(-1);
|
|
1350
|
-
oe(() => {
|
|
1351
|
-
i.value || (u.value = -1);
|
|
1352
|
-
}), oe(() => {
|
|
1353
|
-
s.value = _(r.options[l.value]);
|
|
1354
|
-
}), ae(s, () => {
|
|
1355
|
-
n("change", s.value);
|
|
1551
|
+
const r = e, n = t, a = me(e, "modelValue"), o = y(null), i = y(null), { focused: s } = It(o), l = m(() => r.options.map((x) => S(x)).indexOf(a.value)), d = y(-1), f = y(-1);
|
|
1552
|
+
X(() => {
|
|
1553
|
+
s.value || (f.value = -1);
|
|
1554
|
+
}), X(() => {
|
|
1555
|
+
a.value = S(r.options[l.value]);
|
|
1556
|
+
}), ae(a, () => {
|
|
1557
|
+
n("change", a.value);
|
|
1356
1558
|
});
|
|
1357
|
-
const
|
|
1358
|
-
function
|
|
1559
|
+
const u = r.options, p = m(() => u[l.value]), b = m(() => M(p.value));
|
|
1560
|
+
function M(x) {
|
|
1359
1561
|
if (x)
|
|
1360
1562
|
return typeof x == "string" || typeof x == "symbol" || typeof x == "number" ? x : x.label;
|
|
1361
1563
|
}
|
|
1362
|
-
function
|
|
1564
|
+
function S(x) {
|
|
1363
1565
|
if (x)
|
|
1364
1566
|
return typeof x == "string" || typeof x == "symbol" || typeof x == "number" ? x : x.id;
|
|
1365
1567
|
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
}),
|
|
1369
|
-
|
|
1370
|
-
}),
|
|
1371
|
-
|
|
1568
|
+
Se("ArrowDown", (x) => {
|
|
1569
|
+
s.value && (x.preventDefault(), f.value = (f.value + 1) % u.length);
|
|
1570
|
+
}), Se("ArrowUp", (x) => {
|
|
1571
|
+
s.value && (x.preventDefault(), f.value = (f.value - 1 + u.length) % u.length);
|
|
1572
|
+
}), Se("Enter", () => {
|
|
1573
|
+
s.value && f.value !== -1 && (a.value = S(u[f.value]), s.value = !1);
|
|
1372
1574
|
});
|
|
1373
1575
|
function A(x) {
|
|
1374
|
-
if (!
|
|
1375
|
-
|
|
1576
|
+
if (!s.value) {
|
|
1577
|
+
s.value = !0;
|
|
1376
1578
|
return;
|
|
1377
1579
|
}
|
|
1378
|
-
|
|
1580
|
+
a.value = S(x), s.value = !1;
|
|
1379
1581
|
}
|
|
1380
|
-
const
|
|
1582
|
+
const se = m(() => ({
|
|
1381
1583
|
input: "container-default focus:border-primary-7"
|
|
1382
|
-
})),
|
|
1584
|
+
})), ie = m(() => {
|
|
1383
1585
|
switch (r.size) {
|
|
1384
1586
|
case "sm":
|
|
1385
1587
|
return {
|
|
@@ -1398,45 +1600,45 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1398
1600
|
};
|
|
1399
1601
|
}
|
|
1400
1602
|
});
|
|
1401
|
-
return (x,
|
|
1603
|
+
return (x, O) => (g(), v("div", {
|
|
1402
1604
|
ref_key: "wrapperRef",
|
|
1403
|
-
ref:
|
|
1605
|
+
ref: i,
|
|
1404
1606
|
class: "r-select-wrapper relative"
|
|
1405
1607
|
}, [
|
|
1406
|
-
|
|
1407
|
-
|
|
1608
|
+
$("div", yr, [
|
|
1609
|
+
$("input", {
|
|
1408
1610
|
ref_key: "inputRef",
|
|
1409
|
-
ref:
|
|
1410
|
-
class: w([[c(
|
|
1411
|
-
placeholder:
|
|
1611
|
+
ref: o,
|
|
1612
|
+
class: w([[c(se).input, c(ie).wrapper], "r-select-input cursor-pointer border rounded outline-none"]),
|
|
1613
|
+
placeholder: x.placeholder,
|
|
1412
1614
|
readonly: "",
|
|
1413
|
-
value: c(
|
|
1615
|
+
value: c(b),
|
|
1414
1616
|
"aria-haspopup": "listbox",
|
|
1415
1617
|
autocomplete: "off",
|
|
1416
|
-
onFocus:
|
|
1417
|
-
}, null, 42,
|
|
1418
|
-
|
|
1618
|
+
onFocus: O[0] || (O[0] = (D) => s.value = !0)
|
|
1619
|
+
}, null, 42, wr),
|
|
1620
|
+
xr
|
|
1419
1621
|
]),
|
|
1420
|
-
c(
|
|
1622
|
+
c(s) ? (g(), v("div", {
|
|
1421
1623
|
key: 0,
|
|
1422
|
-
class: w([c(
|
|
1624
|
+
class: w([c(ie).dropdown, "absolute z-1 mt-2 w-full flex-col overflow-hidden border container-default rounded p-1"])
|
|
1423
1625
|
}, [
|
|
1424
|
-
c(
|
|
1425
|
-
key:
|
|
1626
|
+
c(u).length === 0 ? (g(), v("div", _r, te(x.noneText), 1)) : (g(!0), v(ee, { key: 1 }, de(c(u), (D, k) => (g(), v("div", {
|
|
1627
|
+
key: S(D),
|
|
1426
1628
|
class: w([{
|
|
1427
|
-
"hover:bg-surface-
|
|
1428
|
-
"container-filled-primary": c(
|
|
1629
|
+
"hover:bg-surface-high": c(f) !== k,
|
|
1630
|
+
"container-filled-primary": c(f) === k
|
|
1429
1631
|
}, "flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),
|
|
1430
|
-
onPointerdown: (
|
|
1431
|
-
onHover: (
|
|
1632
|
+
onPointerdown: (R) => A(D),
|
|
1633
|
+
onHover: (R) => d.value = k
|
|
1432
1634
|
}, [
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
], 42,
|
|
1436
|
-
], 2)) :
|
|
1635
|
+
yt(te(M(D)) + " ", 1),
|
|
1636
|
+
D === c(p) ? (g(), v("div", $r, kr)) : T("", !0)
|
|
1637
|
+
], 42, Mr))), 128))
|
|
1638
|
+
], 2)) : T("", !0)
|
|
1437
1639
|
], 512));
|
|
1438
1640
|
}
|
|
1439
|
-
}),
|
|
1641
|
+
}), Ar = ["value", "placeholder", "type"], Cr = /* @__PURE__ */ z({
|
|
1440
1642
|
__name: "TextField",
|
|
1441
1643
|
props: {
|
|
1442
1644
|
modelValue: {},
|
|
@@ -1445,54 +1647,70 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1445
1647
|
error: { type: Boolean },
|
|
1446
1648
|
disabled: { type: Boolean },
|
|
1447
1649
|
rounded: { default: "md" },
|
|
1650
|
+
size: { default: "md" },
|
|
1448
1651
|
password: { type: Boolean },
|
|
1449
1652
|
placeholder: {}
|
|
1450
1653
|
},
|
|
1451
1654
|
emits: ["change", "update:modelValue", "input", "click", "pointerdown", "pointerup"],
|
|
1452
1655
|
setup(e, { expose: t, emit: r }) {
|
|
1453
|
-
const n = e,
|
|
1656
|
+
const n = e, a = r, o = m(() => {
|
|
1657
|
+
switch (n.size) {
|
|
1658
|
+
case "sm":
|
|
1659
|
+
return {
|
|
1660
|
+
base: "h-6 px-2 py-1 text-xs"
|
|
1661
|
+
};
|
|
1662
|
+
case "md":
|
|
1663
|
+
return {
|
|
1664
|
+
base: "h-8 px-3 py-1 text-sm"
|
|
1665
|
+
};
|
|
1666
|
+
case "lg":
|
|
1667
|
+
return {
|
|
1668
|
+
base: "h-10 px-4 py-2 text-base"
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
}), i = m(() => {
|
|
1454
1672
|
if (n.error)
|
|
1455
|
-
return "text-error-
|
|
1673
|
+
return "text-error-container bg-surface-base border-error-5 focus:border-error-5";
|
|
1456
1674
|
switch (n.color) {
|
|
1457
1675
|
case "secondary":
|
|
1458
|
-
return "text-surface-
|
|
1676
|
+
return "text-surface-on bg-surface-base border-surface-border focus:border-secondary-5";
|
|
1459
1677
|
case "tertiary":
|
|
1460
|
-
return "text-surface-
|
|
1678
|
+
return "text-surface-on bg-surface-base border-surface-border focus:border-tertiary-5";
|
|
1461
1679
|
case "error":
|
|
1462
|
-
return "text-surface-
|
|
1680
|
+
return "text-surface-on bg-surface-base border-surface-border focus:border-error-5";
|
|
1463
1681
|
case "primary":
|
|
1464
1682
|
default:
|
|
1465
|
-
return "text-surface-
|
|
1683
|
+
return "text-surface-on bg-surface-base border-surface-border focus:border-primary-5";
|
|
1466
1684
|
}
|
|
1467
|
-
}),
|
|
1468
|
-
function
|
|
1469
|
-
var
|
|
1470
|
-
|
|
1685
|
+
}), s = m(() => n.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l = xe(n), d = y(null);
|
|
1686
|
+
function f(u) {
|
|
1687
|
+
var p;
|
|
1688
|
+
a("update:modelValue", ((p = u.target) == null ? void 0 : p.value) ?? ""), a("input", u);
|
|
1471
1689
|
}
|
|
1472
1690
|
return t({
|
|
1473
|
-
el:
|
|
1474
|
-
}), (u,
|
|
1691
|
+
el: d
|
|
1692
|
+
}), (u, p) => (g(), v("input", {
|
|
1475
1693
|
ref_key: "input",
|
|
1476
|
-
ref:
|
|
1694
|
+
ref: d,
|
|
1477
1695
|
value: u.modelValue,
|
|
1478
|
-
class: w(["bg-back-2 border px-2 py-1 outline-none", [c(
|
|
1479
|
-
style: C([c(
|
|
1696
|
+
class: w(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [c(i), c(s), c(l).class, c(o).base]]),
|
|
1697
|
+
style: C([c(l).style]),
|
|
1480
1698
|
placeholder: u.placeholder,
|
|
1481
1699
|
type: n.password ? "password" : "text",
|
|
1482
|
-
onChange:
|
|
1483
|
-
onInput:
|
|
1484
|
-
onClick:
|
|
1485
|
-
onPointerdown:
|
|
1486
|
-
onPointerup:
|
|
1487
|
-
}, null, 46,
|
|
1700
|
+
onChange: p[0] || (p[0] = (b) => u.$emit("change", b)),
|
|
1701
|
+
onInput: f,
|
|
1702
|
+
onClick: p[1] || (p[1] = (b) => u.$emit("click", b)),
|
|
1703
|
+
onPointerdown: p[2] || (p[2] = (b) => u.$emit("pointerdown", b)),
|
|
1704
|
+
onPointerup: p[3] || (p[3] = (b) => u.$emit("pointerup", b))
|
|
1705
|
+
}, null, 46, Ar));
|
|
1488
1706
|
}
|
|
1489
|
-
}),
|
|
1707
|
+
}), Tr = {
|
|
1490
1708
|
key: 0,
|
|
1491
1709
|
class: "i-tabler-loader-2 h-5 w-5 shrink-0 animate-spin"
|
|
1492
|
-
},
|
|
1710
|
+
}, zr = { key: 1 }, Rr = { class: "grow-1" }, Er = {
|
|
1493
1711
|
key: 1,
|
|
1494
|
-
class: "text-sm text-surface-
|
|
1495
|
-
},
|
|
1712
|
+
class: "text-sm text-surface-5"
|
|
1713
|
+
}, Nr = /* @__PURE__ */ $("i", { class: "i-tabler-x" }, null, -1), Pr = /* @__PURE__ */ z({
|
|
1496
1714
|
__name: "Notification",
|
|
1497
1715
|
props: {
|
|
1498
1716
|
title: {},
|
|
@@ -1514,7 +1732,7 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1514
1732
|
case "error":
|
|
1515
1733
|
return "bg-error-5";
|
|
1516
1734
|
default:
|
|
1517
|
-
return "bg-primary-
|
|
1735
|
+
return "bg-primary-container";
|
|
1518
1736
|
}
|
|
1519
1737
|
}), n = m(() => {
|
|
1520
1738
|
switch (t.color) {
|
|
@@ -1528,72 +1746,80 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1528
1746
|
return "text-primary-5";
|
|
1529
1747
|
}
|
|
1530
1748
|
});
|
|
1531
|
-
return (
|
|
1532
|
-
const
|
|
1533
|
-
return g(),
|
|
1749
|
+
return (a, o) => {
|
|
1750
|
+
const i = St;
|
|
1751
|
+
return g(), v("div", {
|
|
1534
1752
|
class: w(["relative max-w-100 min-h-16 min-w-80 w-full flex items-center gap-2 container-default rounded p-3", [
|
|
1535
|
-
{ "border-0": !
|
|
1753
|
+
{ "border-0": !a.withBorder }
|
|
1536
1754
|
]])
|
|
1537
1755
|
}, [
|
|
1538
|
-
|
|
1756
|
+
a.icon ? (g(), v("div", {
|
|
1539
1757
|
key: 0,
|
|
1540
1758
|
class: w(["leading-0", c(n)])
|
|
1541
1759
|
}, [
|
|
1542
|
-
|
|
1760
|
+
a.loading ? (g(), v("i", Tr)) : (g(), v("i", {
|
|
1543
1761
|
key: 1,
|
|
1544
|
-
class: w(["h-5 w-5 shrink-0",
|
|
1762
|
+
class: w(["h-5 w-5 shrink-0", a.icon])
|
|
1545
1763
|
}, null, 2))
|
|
1546
|
-
], 2)) : (g(),
|
|
1547
|
-
|
|
1764
|
+
], 2)) : (g(), v("div", zr, [
|
|
1765
|
+
$("div", {
|
|
1548
1766
|
class: w(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
1549
|
-
"animate-pulse":
|
|
1767
|
+
"animate-pulse": a.loading
|
|
1550
1768
|
}, c(r)]])
|
|
1551
1769
|
}, null, 2)
|
|
1552
1770
|
])),
|
|
1553
|
-
|
|
1554
|
-
|
|
1771
|
+
$("div", Rr, [
|
|
1772
|
+
a.title ? (g(), v("div", {
|
|
1555
1773
|
key: 0,
|
|
1556
1774
|
class: w([c(n), "text-base"])
|
|
1557
|
-
},
|
|
1558
|
-
|
|
1775
|
+
}, te(a.title), 3)) : T("", !0),
|
|
1776
|
+
a.message ? (g(), v("div", Er, te(a.message), 1)) : T("", !0)
|
|
1559
1777
|
]),
|
|
1560
|
-
|
|
1778
|
+
a.closeable ? (g(), U(i, {
|
|
1561
1779
|
key: 2,
|
|
1562
1780
|
icon: "",
|
|
1563
1781
|
variant: "transparent",
|
|
1564
|
-
class: "text-
|
|
1565
|
-
onClick:
|
|
1782
|
+
class: "text-surface-on hover:text-surface-on",
|
|
1783
|
+
onClick: o[0] || (o[0] = (s) => a.$emit("close"))
|
|
1566
1784
|
}, {
|
|
1567
|
-
default:
|
|
1568
|
-
|
|
1785
|
+
default: ue(() => [
|
|
1786
|
+
Nr
|
|
1569
1787
|
]),
|
|
1570
1788
|
_: 1
|
|
1571
|
-
})) :
|
|
1789
|
+
})) : T("", !0)
|
|
1572
1790
|
], 2);
|
|
1573
1791
|
};
|
|
1574
1792
|
}
|
|
1575
|
-
}),
|
|
1576
|
-
__name: "
|
|
1793
|
+
}), Hr = /* @__PURE__ */ z({
|
|
1794
|
+
__name: "ThemeProvider",
|
|
1577
1795
|
props: {
|
|
1578
|
-
|
|
1796
|
+
theme: {}
|
|
1797
|
+
},
|
|
1798
|
+
setup(e) {
|
|
1799
|
+
const r = at(e.theme, !1);
|
|
1800
|
+
return (n, a) => (g(), v("div", {
|
|
1801
|
+
style: C([c(r)])
|
|
1802
|
+
}, [
|
|
1803
|
+
I(n.$slots, "default")
|
|
1804
|
+
], 4));
|
|
1805
|
+
}
|
|
1806
|
+
}), dn = /* @__PURE__ */ z({
|
|
1807
|
+
__name: "Modal",
|
|
1808
|
+
props: /* @__PURE__ */ J({
|
|
1579
1809
|
persistent: { type: Boolean, default: !1 },
|
|
1580
1810
|
blur: { type: [String, Boolean] }
|
|
1581
|
-
},
|
|
1811
|
+
}, {
|
|
1812
|
+
modelValue: { type: Boolean },
|
|
1813
|
+
modelModifiers: {}
|
|
1814
|
+
}),
|
|
1582
1815
|
emits: ["update:modelValue"],
|
|
1583
|
-
setup(e
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
},
|
|
1588
|
-
set(l) {
|
|
1589
|
-
n("update:modelValue", l);
|
|
1590
|
-
}
|
|
1591
|
-
}), a = k(null);
|
|
1592
|
-
function o(l) {
|
|
1593
|
-
r.persistent || l.target === a.value && (s.value = !1);
|
|
1816
|
+
setup(e) {
|
|
1817
|
+
const t = e, r = me(e, "modelValue"), n = y(null);
|
|
1818
|
+
function a(s) {
|
|
1819
|
+
t.persistent || s.target === n.value && (r.value = !1);
|
|
1594
1820
|
}
|
|
1595
|
-
const
|
|
1596
|
-
switch (
|
|
1821
|
+
const o = m(() => {
|
|
1822
|
+
switch (t.blur) {
|
|
1597
1823
|
case "sm":
|
|
1598
1824
|
return "backdrop-blur-sm";
|
|
1599
1825
|
case "md":
|
|
@@ -1605,140 +1831,150 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1605
1831
|
return "";
|
|
1606
1832
|
}
|
|
1607
1833
|
});
|
|
1608
|
-
|
|
1609
|
-
r.
|
|
1610
|
-
document.body.style.overflow = "", document.body.style.marginRight = "";
|
|
1834
|
+
X(() => {
|
|
1835
|
+
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1836
|
+
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1611
1837
|
}, 300);
|
|
1612
|
-
})
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1838
|
+
});
|
|
1839
|
+
const i = vr();
|
|
1840
|
+
return (s, l) => {
|
|
1841
|
+
const d = Hr;
|
|
1842
|
+
return g(), U(wt, { to: "body" }, [
|
|
1843
|
+
We(d, { theme: c(i) }, {
|
|
1844
|
+
default: ue(() => [
|
|
1845
|
+
$("div", {
|
|
1846
|
+
ref_key: "wrapperRef",
|
|
1847
|
+
ref: n,
|
|
1848
|
+
class: w(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full flex items-end justify-center bg-surface-lowest/50 transition-all duration-300 md:items-center", [o.value, {
|
|
1849
|
+
"op0 pointer-events-none": !r.value,
|
|
1850
|
+
op100: r.value
|
|
1851
|
+
}]]),
|
|
1852
|
+
onClick: a
|
|
1853
|
+
}, [
|
|
1854
|
+
We(xt, {
|
|
1855
|
+
"enter-from-class": "translate-y-1/2",
|
|
1856
|
+
"enter-to-class": "translate-y-0",
|
|
1857
|
+
"leave-from-class": "translate-y-0",
|
|
1858
|
+
"leave-to-class": "translate-y-1/2",
|
|
1859
|
+
"enter-active-class": "transition ease-out duration-300",
|
|
1860
|
+
"leave-active-class": "transition ease-in duration-200"
|
|
1861
|
+
}, {
|
|
1862
|
+
default: ue(() => [
|
|
1863
|
+
r.value ? I(s.$slots, "default", { key: 0 }) : T("", !0)
|
|
1864
|
+
]),
|
|
1865
|
+
_: 3
|
|
1866
|
+
})
|
|
1867
|
+
], 2)
|
|
1632
1868
|
]),
|
|
1633
1869
|
_: 3
|
|
1634
|
-
})
|
|
1635
|
-
]
|
|
1636
|
-
|
|
1870
|
+
}, 8, ["theme"])
|
|
1871
|
+
]);
|
|
1872
|
+
};
|
|
1637
1873
|
}
|
|
1638
|
-
}),
|
|
1639
|
-
let
|
|
1640
|
-
const
|
|
1641
|
-
const t =
|
|
1642
|
-
t && t.forEach((r) =>
|
|
1643
|
-
},
|
|
1874
|
+
}), st = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakSet();
|
|
1875
|
+
let G, Ie = 0, Oe = 0;
|
|
1876
|
+
const L = "__aa_tgt", fe = "__aa_del", ye = "__aa_new", Or = (e) => {
|
|
1877
|
+
const t = Lr(e);
|
|
1878
|
+
t && t.forEach((r) => Dr(r));
|
|
1879
|
+
}, Br = (e) => {
|
|
1644
1880
|
e.forEach((t) => {
|
|
1645
|
-
t.target ===
|
|
1881
|
+
t.target === G && Fr(), N.has(t.target) && Q(t.target);
|
|
1646
1882
|
});
|
|
1647
1883
|
};
|
|
1648
|
-
function
|
|
1649
|
-
const t =
|
|
1884
|
+
function Vr(e) {
|
|
1885
|
+
const t = ze.get(e);
|
|
1650
1886
|
t == null || t.disconnect();
|
|
1651
|
-
let r =
|
|
1652
|
-
const
|
|
1653
|
-
r || (r =
|
|
1654
|
-
const { offsetWidth:
|
|
1655
|
-
r.top -
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
r.left -
|
|
1659
|
-
].map((
|
|
1660
|
-
++n > 1 &&
|
|
1887
|
+
let r = N.get(e), n = 0;
|
|
1888
|
+
const a = 5;
|
|
1889
|
+
r || (r = oe(e), N.set(e, r));
|
|
1890
|
+
const { offsetWidth: o, offsetHeight: i } = G, l = [
|
|
1891
|
+
r.top - a,
|
|
1892
|
+
o - (r.left + a + r.width),
|
|
1893
|
+
i - (r.top + a + r.height),
|
|
1894
|
+
r.left - a
|
|
1895
|
+
].map((f) => `${-1 * Math.floor(f)}px`).join(" "), d = new IntersectionObserver(() => {
|
|
1896
|
+
++n > 1 && Q(e);
|
|
1661
1897
|
}, {
|
|
1662
|
-
root:
|
|
1898
|
+
root: G,
|
|
1663
1899
|
threshold: 1,
|
|
1664
1900
|
rootMargin: l
|
|
1665
1901
|
});
|
|
1666
|
-
d.observe(e),
|
|
1902
|
+
d.observe(e), ze.set(e, d);
|
|
1667
1903
|
}
|
|
1668
|
-
function
|
|
1669
|
-
clearTimeout(
|
|
1670
|
-
const t =
|
|
1671
|
-
|
|
1672
|
-
const n =
|
|
1904
|
+
function Q(e) {
|
|
1905
|
+
clearTimeout(ve.get(e));
|
|
1906
|
+
const t = Me(e), r = he(t) ? 500 : t.duration;
|
|
1907
|
+
ve.set(e, setTimeout(async () => {
|
|
1908
|
+
const n = K.get(e);
|
|
1673
1909
|
try {
|
|
1674
|
-
await (n == null ? void 0 : n.finished),
|
|
1910
|
+
await (n == null ? void 0 : n.finished), N.set(e, oe(e)), Vr(e);
|
|
1675
1911
|
} catch {
|
|
1676
1912
|
}
|
|
1677
1913
|
}, r));
|
|
1678
1914
|
}
|
|
1679
|
-
function
|
|
1680
|
-
clearTimeout(
|
|
1681
|
-
|
|
1915
|
+
function Fr() {
|
|
1916
|
+
clearTimeout(ve.get(G)), ve.set(G, setTimeout(() => {
|
|
1917
|
+
st.forEach((e) => ut(e, (t) => it(() => Q(t))));
|
|
1682
1918
|
}, 100));
|
|
1683
1919
|
}
|
|
1684
|
-
function
|
|
1920
|
+
function Wr(e) {
|
|
1685
1921
|
setTimeout(() => {
|
|
1686
|
-
|
|
1922
|
+
Ir.set(e, setInterval(() => it(Q.bind(null, e)), 2e3));
|
|
1687
1923
|
}, Math.round(2e3 * Math.random()));
|
|
1688
1924
|
}
|
|
1689
|
-
function
|
|
1925
|
+
function it(e) {
|
|
1690
1926
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
1691
1927
|
}
|
|
1692
|
-
let
|
|
1693
|
-
typeof window < "u" && (
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1696
|
-
function
|
|
1697
|
-
return e.reduce((n,
|
|
1928
|
+
let Re, Z;
|
|
1929
|
+
typeof window < "u" && (G = document.documentElement, Re = new MutationObserver(Or), Z = new ResizeObserver(Br), window.addEventListener("scroll", () => {
|
|
1930
|
+
Oe = window.scrollY, Ie = window.scrollX;
|
|
1931
|
+
}), Z.observe(G));
|
|
1932
|
+
function Lr(e) {
|
|
1933
|
+
return e.reduce((n, a) => [
|
|
1698
1934
|
...n,
|
|
1699
|
-
...Array.from(
|
|
1700
|
-
...Array.from(
|
|
1701
|
-
], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n,
|
|
1935
|
+
...Array.from(a.addedNodes),
|
|
1936
|
+
...Array.from(a.removedNodes)
|
|
1937
|
+
], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n, a) => {
|
|
1702
1938
|
if (n === !1)
|
|
1703
1939
|
return !1;
|
|
1704
|
-
if (
|
|
1705
|
-
if (
|
|
1706
|
-
n.add(
|
|
1707
|
-
for (let
|
|
1708
|
-
const
|
|
1709
|
-
if (
|
|
1710
|
-
if (
|
|
1940
|
+
if (a.target instanceof Element) {
|
|
1941
|
+
if (ke(a.target), !n.has(a.target)) {
|
|
1942
|
+
n.add(a.target);
|
|
1943
|
+
for (let o = 0; o < a.target.children.length; o++) {
|
|
1944
|
+
const i = a.target.children.item(o);
|
|
1945
|
+
if (i) {
|
|
1946
|
+
if (fe in i)
|
|
1711
1947
|
return !1;
|
|
1712
|
-
|
|
1948
|
+
ke(a.target, i), n.add(i);
|
|
1713
1949
|
}
|
|
1714
1950
|
}
|
|
1715
1951
|
}
|
|
1716
|
-
if (
|
|
1717
|
-
for (let
|
|
1718
|
-
const
|
|
1719
|
-
if (
|
|
1952
|
+
if (a.removedNodes.length)
|
|
1953
|
+
for (let o = 0; o < a.removedNodes.length; o++) {
|
|
1954
|
+
const i = a.removedNodes[o];
|
|
1955
|
+
if (fe in i)
|
|
1720
1956
|
return !1;
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1957
|
+
i instanceof Element && (n.add(i), ke(a.target, i), re.set(i, [
|
|
1958
|
+
a.previousSibling,
|
|
1959
|
+
a.nextSibling
|
|
1724
1960
|
]));
|
|
1725
1961
|
}
|
|
1726
1962
|
}
|
|
1727
1963
|
return n;
|
|
1728
1964
|
}, /* @__PURE__ */ new Set());
|
|
1729
1965
|
}
|
|
1730
|
-
function
|
|
1731
|
-
!t && !(
|
|
1966
|
+
function ke(e, t) {
|
|
1967
|
+
!t && !(L in e) ? Object.defineProperty(e, L, { value: e }) : t && !(L in t) && Object.defineProperty(t, L, { value: e });
|
|
1732
1968
|
}
|
|
1733
|
-
function
|
|
1969
|
+
function Dr(e) {
|
|
1734
1970
|
var t;
|
|
1735
|
-
const r = e.isConnected, n =
|
|
1736
|
-
r &&
|
|
1971
|
+
const r = e.isConnected, n = N.has(e);
|
|
1972
|
+
r && re.has(e) && re.delete(e), K.has(e) && ((t = K.get(e)) === null || t === void 0 || t.cancel()), ye in e ? Ye(e) : n && r ? Gr(e) : n && !r ? Ur(e) : Ye(e);
|
|
1737
1973
|
}
|
|
1738
|
-
function
|
|
1974
|
+
function F(e) {
|
|
1739
1975
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
1740
1976
|
}
|
|
1741
|
-
function
|
|
1977
|
+
function jr(e) {
|
|
1742
1978
|
let t = e.parentElement;
|
|
1743
1979
|
for (; t; ) {
|
|
1744
1980
|
if (t.scrollLeft || t.scrollTop)
|
|
@@ -1747,8 +1983,8 @@ function Mr(e) {
|
|
|
1747
1983
|
}
|
|
1748
1984
|
return { x: 0, y: 0 };
|
|
1749
1985
|
}
|
|
1750
|
-
function
|
|
1751
|
-
const t = e.getBoundingClientRect(), { x: r, y: n } =
|
|
1986
|
+
function oe(e) {
|
|
1987
|
+
const t = e.getBoundingClientRect(), { x: r, y: n } = jr(e);
|
|
1752
1988
|
return {
|
|
1753
1989
|
top: t.top + n,
|
|
1754
1990
|
left: t.left + r,
|
|
@@ -1756,69 +1992,69 @@ function Q(e) {
|
|
|
1756
1992
|
height: t.height
|
|
1757
1993
|
};
|
|
1758
1994
|
}
|
|
1759
|
-
function
|
|
1760
|
-
let n = t.width,
|
|
1761
|
-
const
|
|
1762
|
-
if (
|
|
1763
|
-
const d =
|
|
1764
|
-
n -=
|
|
1995
|
+
function lt(e, t, r) {
|
|
1996
|
+
let n = t.width, a = t.height, o = r.width, i = r.height;
|
|
1997
|
+
const s = getComputedStyle(e);
|
|
1998
|
+
if (s.getPropertyValue("box-sizing") === "content-box") {
|
|
1999
|
+
const d = F(s.paddingTop) + F(s.paddingBottom) + F(s.borderTopWidth) + F(s.borderBottomWidth), f = F(s.paddingLeft) + F(s.paddingRight) + F(s.borderRightWidth) + F(s.borderLeftWidth);
|
|
2000
|
+
n -= f, o -= f, a -= d, i -= d;
|
|
1765
2001
|
}
|
|
1766
|
-
return [n,
|
|
2002
|
+
return [n, o, a, i].map(Math.round);
|
|
1767
2003
|
}
|
|
1768
|
-
function
|
|
1769
|
-
return
|
|
2004
|
+
function Me(e) {
|
|
2005
|
+
return L in e && ne.has(e[L]) ? ne.get(e[L]) : { duration: 250, easing: "ease-in-out" };
|
|
1770
2006
|
}
|
|
1771
|
-
function
|
|
1772
|
-
if (
|
|
1773
|
-
return e[
|
|
2007
|
+
function ct(e) {
|
|
2008
|
+
if (L in e)
|
|
2009
|
+
return e[L];
|
|
1774
2010
|
}
|
|
1775
|
-
function
|
|
1776
|
-
const t =
|
|
1777
|
-
return t ?
|
|
2011
|
+
function Be(e) {
|
|
2012
|
+
const t = ct(e);
|
|
2013
|
+
return t ? ce.has(t) : !1;
|
|
1778
2014
|
}
|
|
1779
|
-
function
|
|
1780
|
-
t.forEach((r) => r(e,
|
|
2015
|
+
function ut(e, ...t) {
|
|
2016
|
+
t.forEach((r) => r(e, ne.has(e)));
|
|
1781
2017
|
for (let r = 0; r < e.children.length; r++) {
|
|
1782
2018
|
const n = e.children.item(r);
|
|
1783
|
-
n && t.forEach((
|
|
2019
|
+
n && t.forEach((a) => a(n, ne.has(n)));
|
|
1784
2020
|
}
|
|
1785
2021
|
}
|
|
1786
|
-
function
|
|
2022
|
+
function Ve(e) {
|
|
1787
2023
|
return Array.isArray(e) ? e : [e];
|
|
1788
2024
|
}
|
|
1789
|
-
function
|
|
2025
|
+
function he(e) {
|
|
1790
2026
|
return typeof e == "function";
|
|
1791
2027
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const t =
|
|
1794
|
-
if (
|
|
1795
|
-
return
|
|
2028
|
+
function Gr(e) {
|
|
2029
|
+
const t = N.get(e), r = oe(e);
|
|
2030
|
+
if (!Be(e))
|
|
2031
|
+
return N.set(e, r);
|
|
1796
2032
|
let n;
|
|
1797
2033
|
if (!t)
|
|
1798
2034
|
return;
|
|
1799
|
-
const
|
|
1800
|
-
if (typeof
|
|
1801
|
-
const
|
|
1802
|
-
transform: `translate(${
|
|
2035
|
+
const a = Me(e);
|
|
2036
|
+
if (typeof a != "function") {
|
|
2037
|
+
const o = t.left - r.left, i = t.top - r.top, [s, l, d, f] = lt(e, t, r), u = {
|
|
2038
|
+
transform: `translate(${o}px, ${i}px)`
|
|
1803
2039
|
}, p = {
|
|
1804
2040
|
transform: "translate(0, 0)"
|
|
1805
2041
|
};
|
|
1806
|
-
|
|
1807
|
-
duration:
|
|
1808
|
-
easing:
|
|
2042
|
+
s !== l && (u.width = `${s}px`, p.width = `${l}px`), d !== f && (u.height = `${d}px`, p.height = `${f}px`), n = e.animate([u, p], {
|
|
2043
|
+
duration: a.duration,
|
|
2044
|
+
easing: a.easing
|
|
1809
2045
|
});
|
|
1810
2046
|
} else {
|
|
1811
|
-
const [
|
|
1812
|
-
n = new Animation(
|
|
2047
|
+
const [o] = Ve(a(e, "remain", t, r));
|
|
2048
|
+
n = new Animation(o), n.play();
|
|
1813
2049
|
}
|
|
1814
|
-
|
|
1815
|
-
}
|
|
1816
|
-
function
|
|
1817
|
-
|
|
1818
|
-
const t =
|
|
1819
|
-
|
|
1820
|
-
const r =
|
|
1821
|
-
if (
|
|
2050
|
+
K.set(e, n), N.set(e, r), n.addEventListener("finish", Q.bind(null, e));
|
|
2051
|
+
}
|
|
2052
|
+
function Ye(e) {
|
|
2053
|
+
ye in e && delete e[ye];
|
|
2054
|
+
const t = oe(e);
|
|
2055
|
+
N.set(e, t);
|
|
2056
|
+
const r = Me(e);
|
|
2057
|
+
if (!Be(e))
|
|
1822
2058
|
return;
|
|
1823
2059
|
let n;
|
|
1824
2060
|
if (typeof r != "function")
|
|
@@ -1831,34 +2067,34 @@ function He(e) {
|
|
|
1831
2067
|
easing: "ease-in"
|
|
1832
2068
|
});
|
|
1833
2069
|
else {
|
|
1834
|
-
const [
|
|
1835
|
-
n = new Animation(
|
|
2070
|
+
const [a] = Ve(r(e, "add", t));
|
|
2071
|
+
n = new Animation(a), n.play();
|
|
1836
2072
|
}
|
|
1837
|
-
|
|
2073
|
+
K.set(e, n), n.addEventListener("finish", Q.bind(null, e));
|
|
1838
2074
|
}
|
|
1839
|
-
function
|
|
2075
|
+
function Ke(e, t) {
|
|
1840
2076
|
var r;
|
|
1841
|
-
e.remove(),
|
|
1842
|
-
if (
|
|
2077
|
+
e.remove(), N.delete(e), re.delete(e), K.delete(e), (r = ze.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2078
|
+
if (fe in e && delete e[fe], Object.defineProperty(e, ye, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
1843
2079
|
for (const n in t)
|
|
1844
2080
|
e.style[n] = "";
|
|
1845
2081
|
}, 0);
|
|
1846
2082
|
}
|
|
1847
|
-
function
|
|
2083
|
+
function Ur(e) {
|
|
1848
2084
|
var t;
|
|
1849
|
-
if (!
|
|
2085
|
+
if (!re.has(e) || !N.has(e))
|
|
1850
2086
|
return;
|
|
1851
|
-
const [r, n] =
|
|
1852
|
-
Object.defineProperty(e,
|
|
1853
|
-
const
|
|
1854
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
1855
|
-
return
|
|
1856
|
-
const [
|
|
1857
|
-
(
|
|
1858
|
-
let p,
|
|
2087
|
+
const [r, n] = re.get(e);
|
|
2088
|
+
Object.defineProperty(e, fe, { value: !0, configurable: !0 });
|
|
2089
|
+
const a = window.scrollX, o = window.scrollY;
|
|
2090
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = ct(e)) === null || t === void 0 || t.appendChild(e), !Be(e))
|
|
2091
|
+
return Ke(e);
|
|
2092
|
+
const [i, s, l, d] = qr(e), f = Me(e), u = N.get(e);
|
|
2093
|
+
(a !== Ie || o !== Oe) && Xr(e, a, o, f);
|
|
2094
|
+
let p, b = {
|
|
1859
2095
|
position: "absolute",
|
|
1860
|
-
top: `${
|
|
1861
|
-
left: `${
|
|
2096
|
+
top: `${i}px`,
|
|
2097
|
+
left: `${s}px`,
|
|
1862
2098
|
width: `${l}px`,
|
|
1863
2099
|
height: `${d}px`,
|
|
1864
2100
|
margin: "0",
|
|
@@ -1866,8 +2102,8 @@ function Ar(e) {
|
|
|
1866
2102
|
transformOrigin: "center",
|
|
1867
2103
|
zIndex: "100"
|
|
1868
2104
|
};
|
|
1869
|
-
if (!
|
|
1870
|
-
Object.assign(e.style,
|
|
2105
|
+
if (!he(f))
|
|
2106
|
+
Object.assign(e.style, b), p = e.animate([
|
|
1871
2107
|
{
|
|
1872
2108
|
transform: "scale(1)",
|
|
1873
2109
|
opacity: 1
|
|
@@ -1876,84 +2112,84 @@ function Ar(e) {
|
|
|
1876
2112
|
transform: "scale(.98)",
|
|
1877
2113
|
opacity: 0
|
|
1878
2114
|
}
|
|
1879
|
-
], { duration:
|
|
2115
|
+
], { duration: f.duration, easing: "ease-out" });
|
|
1880
2116
|
else {
|
|
1881
|
-
const [
|
|
1882
|
-
(
|
|
2117
|
+
const [M, S] = Ve(f(e, "remove", u));
|
|
2118
|
+
(S == null ? void 0 : S.styleReset) !== !1 && (b = (S == null ? void 0 : S.styleReset) || b, Object.assign(e.style, b)), p = new Animation(M), p.play();
|
|
1883
2119
|
}
|
|
1884
|
-
|
|
2120
|
+
K.set(e, p), p.addEventListener("finish", Ke.bind(null, e, b));
|
|
1885
2121
|
}
|
|
1886
|
-
function
|
|
1887
|
-
const
|
|
1888
|
-
if (getComputedStyle(
|
|
2122
|
+
function Xr(e, t, r, n) {
|
|
2123
|
+
const a = Ie - t, o = Oe - r, i = document.documentElement.style.scrollBehavior;
|
|
2124
|
+
if (getComputedStyle(G).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + a, window.scrollY + o), !e.parentElement)
|
|
1889
2125
|
return;
|
|
1890
2126
|
const l = e.parentElement;
|
|
1891
|
-
let d = l.clientHeight,
|
|
1892
|
-
const
|
|
2127
|
+
let d = l.clientHeight, f = l.clientWidth;
|
|
2128
|
+
const u = performance.now();
|
|
1893
2129
|
function p() {
|
|
1894
2130
|
requestAnimationFrame(() => {
|
|
1895
|
-
if (!
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1898
|
-
left: window.scrollX -
|
|
1899
|
-
top: window.scrollY -
|
|
1900
|
-
}), d = l.clientHeight,
|
|
2131
|
+
if (!he(n)) {
|
|
2132
|
+
const b = d - l.clientHeight, M = f - l.clientWidth;
|
|
2133
|
+
u + n.duration > performance.now() ? (window.scrollTo({
|
|
2134
|
+
left: window.scrollX - M,
|
|
2135
|
+
top: window.scrollY - b
|
|
2136
|
+
}), d = l.clientHeight, f = l.clientWidth, p()) : document.documentElement.style.scrollBehavior = i;
|
|
1901
2137
|
}
|
|
1902
2138
|
});
|
|
1903
2139
|
}
|
|
1904
2140
|
p();
|
|
1905
2141
|
}
|
|
1906
|
-
function
|
|
1907
|
-
const t =
|
|
1908
|
-
let
|
|
1909
|
-
for (;
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
const
|
|
1913
|
-
return [
|
|
1914
|
-
}
|
|
1915
|
-
function
|
|
1916
|
-
return
|
|
2142
|
+
function qr(e) {
|
|
2143
|
+
const t = N.get(e), [r, , n] = lt(e, t, oe(e));
|
|
2144
|
+
let a = e.parentElement;
|
|
2145
|
+
for (; a && (getComputedStyle(a).position === "static" || a instanceof HTMLBodyElement); )
|
|
2146
|
+
a = a.parentElement;
|
|
2147
|
+
a || (a = document.body);
|
|
2148
|
+
const o = getComputedStyle(a), i = N.get(a) || oe(a), s = Math.round(t.top - i.top) - F(o.borderTopWidth), l = Math.round(t.left - i.left) - F(o.borderLeftWidth);
|
|
2149
|
+
return [s, l, r, n];
|
|
2150
|
+
}
|
|
2151
|
+
function Yr(e, t = {}) {
|
|
2152
|
+
return Re && Z && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !he(t) && !t.disrespectUserMotionPreference || (ce.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), ut(e, Q, Wr, (a) => Z == null ? void 0 : Z.observe(a)), he(t) ? ne.set(e, t) : ne.set(e, { duration: 250, easing: "ease-in-out", ...t }), Re.observe(e, { childList: !0 }), st.add(e))), Object.freeze({
|
|
1917
2153
|
parent: e,
|
|
1918
2154
|
enable: () => {
|
|
1919
|
-
|
|
2155
|
+
ce.add(e);
|
|
1920
2156
|
},
|
|
1921
2157
|
disable: () => {
|
|
1922
|
-
|
|
2158
|
+
ce.delete(e);
|
|
1923
2159
|
},
|
|
1924
|
-
isEnabled: () =>
|
|
2160
|
+
isEnabled: () => ce.has(e)
|
|
1925
2161
|
});
|
|
1926
2162
|
}
|
|
1927
|
-
const
|
|
2163
|
+
const Kr = {
|
|
1928
2164
|
mounted: (e, t) => {
|
|
1929
|
-
|
|
2165
|
+
Yr(e, t.value || {});
|
|
1930
2166
|
},
|
|
1931
2167
|
// ignore ssr see #96:
|
|
1932
2168
|
getSSRProps: () => ({})
|
|
1933
|
-
},
|
|
2169
|
+
}, Qr = { class: "fixed z-20 flex flex-col gap-2 p-2" }, fn = /* @__PURE__ */ z({
|
|
1934
2170
|
__name: "NotificationSystem",
|
|
1935
2171
|
setup(e) {
|
|
1936
|
-
const t =
|
|
2172
|
+
const t = pr();
|
|
1937
2173
|
return (r, n) => {
|
|
1938
|
-
const
|
|
1939
|
-
return
|
|
1940
|
-
(g(!0),
|
|
1941
|
-
key:
|
|
1942
|
-
"with-border": "",
|
|
2174
|
+
const a = Pr;
|
|
2175
|
+
return Je((g(), v("div", Qr, [
|
|
2176
|
+
(g(!0), v(ee, null, de(c(t), (o) => (g(), U(a, {
|
|
2177
|
+
key: o.hash,
|
|
1943
2178
|
closeable: "",
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
2179
|
+
"with-border": "",
|
|
2180
|
+
title: o.title,
|
|
2181
|
+
message: o.message,
|
|
2182
|
+
icon: o.icon,
|
|
2183
|
+
loading: o.loading,
|
|
2184
|
+
color: o.color,
|
|
2185
|
+
onClose: (i) => c(t).splice(c(t).indexOf(o), 1)
|
|
1950
2186
|
}, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
|
|
1951
2187
|
])), [
|
|
1952
|
-
[c(
|
|
2188
|
+
[c(Kr)]
|
|
1953
2189
|
]);
|
|
1954
2190
|
};
|
|
1955
2191
|
}
|
|
1956
|
-
}),
|
|
2192
|
+
}), Zr = { class: "flex gap-2" }, hn = /* @__PURE__ */ z({
|
|
1957
2193
|
__name: "PinInput",
|
|
1958
2194
|
props: {
|
|
1959
2195
|
modelValue: {},
|
|
@@ -1962,36 +2198,36 @@ const Rr = {
|
|
|
1962
2198
|
password: { type: Boolean }
|
|
1963
2199
|
},
|
|
1964
2200
|
setup(e) {
|
|
1965
|
-
const t = e, r =
|
|
1966
|
-
function n(
|
|
1967
|
-
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1970
|
-
|
|
2201
|
+
const t = e, r = y([]);
|
|
2202
|
+
function n(o) {
|
|
2203
|
+
o.preventDefault(), o.stopPropagation();
|
|
2204
|
+
const i = r.value.findIndex((l) => l.el === o.target), s = o.target.value ?? "";
|
|
2205
|
+
o.target.value = "", Array.from(s).forEach((l, d) => {
|
|
2206
|
+
i + d >= r.value.length || (r.value[i + d].el.value = l, i + d + 1 < r.value.length ? (r.value[i + d + 1].el.focus(), r.value[i + d + 1].el.select()) : r.value[i + d].el.blur());
|
|
1971
2207
|
});
|
|
1972
2208
|
}
|
|
1973
|
-
function
|
|
1974
|
-
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
const
|
|
1978
|
-
|
|
2209
|
+
function a(o) {
|
|
2210
|
+
o.preventDefault(), o.stopPropagation();
|
|
2211
|
+
const i = o.target.value !== "";
|
|
2212
|
+
o.target.value = "";
|
|
2213
|
+
const s = r.value.findIndex((l) => l.el === o.target);
|
|
2214
|
+
s !== 0 && (r.value[s - 1].el.focus(), r.value[s - 1].el.select(), i || (r.value[s - 1].el.value = ""));
|
|
1979
2215
|
}
|
|
1980
|
-
return (
|
|
1981
|
-
(g(!0),
|
|
2216
|
+
return (o, i) => (g(), v("div", Zr, [
|
|
2217
|
+
(g(!0), v(ee, null, de(t.length, (s) => (g(), U(c(Cr), {
|
|
1982
2218
|
ref_for: !0,
|
|
1983
2219
|
ref_key: "inputs",
|
|
1984
2220
|
ref: r,
|
|
1985
|
-
key:
|
|
2221
|
+
key: s,
|
|
1986
2222
|
class: "h-8 w-8 text-center",
|
|
1987
2223
|
password: t.password,
|
|
1988
|
-
onPointerup:
|
|
1989
|
-
onInput:
|
|
1990
|
-
onKeydown:
|
|
2224
|
+
onPointerup: i[0] || (i[0] = (l) => l.target.select()),
|
|
2225
|
+
onInput: Ze(n, ["stop", "prevent"]),
|
|
2226
|
+
onKeydown: _t(a, ["backspace"])
|
|
1991
2227
|
}, null, 8, ["password"]))), 128))
|
|
1992
2228
|
]));
|
|
1993
2229
|
}
|
|
1994
|
-
}),
|
|
2230
|
+
}), pn = /* @__PURE__ */ z({
|
|
1995
2231
|
__name: "Progress",
|
|
1996
2232
|
props: {
|
|
1997
2233
|
value: { default: 0 },
|
|
@@ -2015,7 +2251,7 @@ const Rr = {
|
|
|
2015
2251
|
}), n = m(() => {
|
|
2016
2252
|
switch (t.color) {
|
|
2017
2253
|
case "primary":
|
|
2018
|
-
return "bg-primary-
|
|
2254
|
+
return "bg-primary-container";
|
|
2019
2255
|
case "secondary":
|
|
2020
2256
|
return "bg-secondary-7";
|
|
2021
2257
|
case "tertiary":
|
|
@@ -2023,25 +2259,24 @@ const Rr = {
|
|
|
2023
2259
|
case "error":
|
|
2024
2260
|
return "bg-error-7";
|
|
2025
2261
|
}
|
|
2026
|
-
}),
|
|
2027
|
-
return (
|
|
2028
|
-
class: w(["relative w-full self-center overflow-hidden bg-surface-
|
|
2029
|
-
style: C([c(
|
|
2262
|
+
}), a = xe(t);
|
|
2263
|
+
return (o, i) => (g(), v("div", {
|
|
2264
|
+
class: w(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [c(r), c(a).class]]),
|
|
2265
|
+
style: C([c(a).style])
|
|
2030
2266
|
}, [
|
|
2031
|
-
|
|
2267
|
+
o.loading ? (g(), v("div", {
|
|
2032
2268
|
key: 1,
|
|
2033
2269
|
class: w(["loading-progress h-full", [c(n)]])
|
|
2034
|
-
}, null, 2)) : (g(),
|
|
2270
|
+
}, null, 2)) : (g(), v("div", {
|
|
2035
2271
|
key: 0,
|
|
2036
2272
|
class: w(["h-full", [c(n)]]),
|
|
2037
2273
|
style: C([{
|
|
2038
|
-
width: `${(
|
|
2274
|
+
width: `${(o.value - o.min) / (o.max - o.min) * 100}%`
|
|
2039
2275
|
}])
|
|
2040
2276
|
}, null, 6))
|
|
2041
2277
|
], 6));
|
|
2042
2278
|
}
|
|
2043
|
-
})
|
|
2044
|
-
const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
2279
|
+
}), Jr = { class: "relative" }, mn = /* @__PURE__ */ z({
|
|
2045
2280
|
__name: "Indicator",
|
|
2046
2281
|
props: {
|
|
2047
2282
|
color: { default: "primary" },
|
|
@@ -2061,7 +2296,7 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2061
2296
|
default:
|
|
2062
2297
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
|
|
2063
2298
|
}
|
|
2064
|
-
}), n =
|
|
2299
|
+
}), n = Mt(), a = m(() => {
|
|
2065
2300
|
if (!n.label)
|
|
2066
2301
|
return "";
|
|
2067
2302
|
switch (t.size) {
|
|
@@ -2072,7 +2307,7 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2072
2307
|
case "lg":
|
|
2073
2308
|
return "text-lg children:px-2.5";
|
|
2074
2309
|
}
|
|
2075
|
-
}),
|
|
2310
|
+
}), o = m(() => {
|
|
2076
2311
|
switch (t.position) {
|
|
2077
2312
|
case "top-left":
|
|
2078
2313
|
return "top-0 left-0 -translate-x-1/2 -translate-y-1/2";
|
|
@@ -2083,69 +2318,64 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2083
2318
|
case "bottom-right":
|
|
2084
2319
|
return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
|
|
2085
2320
|
}
|
|
2086
|
-
}),
|
|
2321
|
+
}), i = m(() => {
|
|
2087
2322
|
switch (t.color) {
|
|
2088
2323
|
case "primary":
|
|
2089
|
-
return "bg-primary-
|
|
2324
|
+
return "bg-primary-container text-primary-on";
|
|
2090
2325
|
case "secondary":
|
|
2091
|
-
return "bg-secondary-
|
|
2326
|
+
return "bg-secondary-container text-secondary-on";
|
|
2092
2327
|
case "tertiary":
|
|
2093
|
-
return "bg-tertiary-
|
|
2328
|
+
return "bg-tertiary-container text-tertiary-on";
|
|
2094
2329
|
case "error":
|
|
2095
|
-
return "bg-error-
|
|
2330
|
+
return "bg-error-container text-error-on";
|
|
2096
2331
|
}
|
|
2097
2332
|
});
|
|
2098
|
-
return (
|
|
2099
|
-
|
|
2100
|
-
class: w([[c(
|
|
2333
|
+
return (s, l) => (g(), v("div", Jr, [
|
|
2334
|
+
$("div", {
|
|
2335
|
+
class: w([[c(o), c(a)], "absolute z-1"])
|
|
2101
2336
|
}, [
|
|
2102
|
-
t.ping ? (g(),
|
|
2337
|
+
t.ping ? (g(), v("div", {
|
|
2103
2338
|
key: 0,
|
|
2104
2339
|
class: w(["absolute animate-ping rounded-full", [
|
|
2105
2340
|
{
|
|
2106
|
-
[c(r)]: !
|
|
2341
|
+
[c(r)]: !s.$slots.label
|
|
2107
2342
|
},
|
|
2108
|
-
c(
|
|
2343
|
+
c(i)
|
|
2109
2344
|
]])
|
|
2110
2345
|
}, [
|
|
2111
|
-
|
|
2112
|
-
], 2)) :
|
|
2113
|
-
|
|
2346
|
+
s.$slots.label ? I(s.$slots, "label", { key: 0 }) : T("", !0)
|
|
2347
|
+
], 2)) : T("", !0),
|
|
2348
|
+
$("div", {
|
|
2114
2349
|
class: w(["top-0 rounded-full", [
|
|
2115
2350
|
{
|
|
2116
|
-
[c(r)]: !
|
|
2351
|
+
[c(r)]: !s.$slots.label
|
|
2117
2352
|
},
|
|
2118
|
-
c(
|
|
2353
|
+
c(i)
|
|
2119
2354
|
]])
|
|
2120
2355
|
}, [
|
|
2121
|
-
|
|
2356
|
+
s.$slots.label ? I(s.$slots, "label", { key: 0 }) : T("", !0)
|
|
2122
2357
|
], 2)
|
|
2123
2358
|
], 2),
|
|
2124
|
-
|
|
2359
|
+
I(s.$slots, "default")
|
|
2125
2360
|
]));
|
|
2126
2361
|
}
|
|
2127
|
-
}),
|
|
2362
|
+
}), gn = /* @__PURE__ */ z({
|
|
2128
2363
|
__name: "Chip",
|
|
2129
|
-
props: {
|
|
2364
|
+
props: /* @__PURE__ */ J({
|
|
2130
2365
|
is: { default: "img" },
|
|
2131
2366
|
src: {},
|
|
2132
2367
|
size: { default: "md" },
|
|
2133
2368
|
style: {},
|
|
2134
2369
|
class: {},
|
|
2135
|
-
modelValue: { type: Boolean },
|
|
2136
2370
|
rounded: { default: "full" }
|
|
2137
|
-
},
|
|
2371
|
+
}, {
|
|
2372
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
2373
|
+
modelModifiers: {}
|
|
2374
|
+
}),
|
|
2138
2375
|
emits: ["update:modelValue"],
|
|
2139
|
-
setup(e
|
|
2140
|
-
const r = e, n = t,
|
|
2141
|
-
|
|
2142
|
-
return r.modelValue;
|
|
2143
|
-
},
|
|
2144
|
-
set(u) {
|
|
2145
|
-
n("update:modelValue", u);
|
|
2146
|
-
}
|
|
2147
|
-
}), a = fe(r), o = m(() => {
|
|
2148
|
-
switch (r.size) {
|
|
2376
|
+
setup(e) {
|
|
2377
|
+
const t = e, r = me(e, "modelValue"), n = xe(t), a = m(() => {
|
|
2378
|
+
switch (t.size) {
|
|
2149
2379
|
case "sm":
|
|
2150
2380
|
return "px-3 text-sm h-6";
|
|
2151
2381
|
case "md":
|
|
@@ -2153,18 +2383,18 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2153
2383
|
case "lg":
|
|
2154
2384
|
return "px-8 h-10 text-lg";
|
|
2155
2385
|
}
|
|
2156
|
-
}),
|
|
2157
|
-
return (
|
|
2158
|
-
class: w(["inline-flex items-center gap-1", [c(
|
|
2159
|
-
style: C([c(
|
|
2160
|
-
onPointerup:
|
|
2386
|
+
}), o = m(() => r.value ? "container-filled-primary" : "container-default"), i = m(() => r.value !== void 0), s = m(() => i.value ? "cursor-pointer" : "");
|
|
2387
|
+
return (l, d) => (g(), v("span", {
|
|
2388
|
+
class: w(["inline-flex items-center gap-1", [c(n).class, c(a), c(o), c(s)]]),
|
|
2389
|
+
style: C([c(n).style]),
|
|
2390
|
+
onPointerup: d[0] || (d[0] = (f) => c(i) && (r.value = !r.value))
|
|
2161
2391
|
}, [
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2392
|
+
l.$slots.leftSection ? I(l.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
2393
|
+
I(l.$slots, "default"),
|
|
2394
|
+
l.$slots.rightSection ? I(l.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
2165
2395
|
], 38));
|
|
2166
2396
|
}
|
|
2167
|
-
}),
|
|
2397
|
+
}), bn = /* @__PURE__ */ z({
|
|
2168
2398
|
__name: "Avatar",
|
|
2169
2399
|
props: {
|
|
2170
2400
|
is: { default: "img" },
|
|
@@ -2185,46 +2415,102 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2185
2415
|
default:
|
|
2186
2416
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `--size: ${t.size}rem;` : `--size: ${t.size};`;
|
|
2187
2417
|
}
|
|
2188
|
-
}), n =
|
|
2189
|
-
return (
|
|
2190
|
-
|
|
2418
|
+
}), n = y(!1);
|
|
2419
|
+
return (a, o) => (g(), v(ee, null, [
|
|
2420
|
+
a.src ? (g(), U(Ee(a.is), {
|
|
2191
2421
|
key: 0,
|
|
2192
|
-
style: C([
|
|
2422
|
+
style: C([a.style, c(r)]),
|
|
2193
2423
|
placeholder: "",
|
|
2194
|
-
src:
|
|
2424
|
+
src: a.src,
|
|
2195
2425
|
class: w(["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !c(n) }, t.class]]),
|
|
2196
|
-
onLoad:
|
|
2197
|
-
}, null, 40, ["style", "src", "class"])) :
|
|
2198
|
-
c(n) ?
|
|
2426
|
+
onLoad: o[0] || (o[0] = (i) => n.value = !0)
|
|
2427
|
+
}, null, 40, ["style", "src", "class"])) : T("", !0),
|
|
2428
|
+
c(n) ? T("", !0) : (g(), v("img", {
|
|
2199
2429
|
key: 1,
|
|
2200
2430
|
class: "h-[var(--size)] w-[var(--size)] animate-pulse rounded-full bg-surface-5 object-cover",
|
|
2201
|
-
style: C([
|
|
2431
|
+
style: C([a.style, c(r)])
|
|
2202
2432
|
}, null, 4))
|
|
2203
2433
|
], 64));
|
|
2204
2434
|
}
|
|
2205
|
-
})
|
|
2206
|
-
|
|
2207
|
-
|
|
2435
|
+
}), vn = /* @__PURE__ */ z({
|
|
2436
|
+
__name: "ThemeSwitch",
|
|
2437
|
+
setup(e) {
|
|
2438
|
+
const t = y(void 0);
|
|
2439
|
+
return X(() => {
|
|
2440
|
+
ge && (t.value === !0 ? (document.documentElement.setAttribute("data-theme", "dark"), localStorage.setItem("theme", "dark")) : t.value === !1 && (document.documentElement.setAttribute("data-theme", "light"), localStorage.setItem("theme", "light")));
|
|
2441
|
+
}), pe(() => {
|
|
2442
|
+
if (ge) {
|
|
2443
|
+
const r = localStorage.getItem("theme");
|
|
2444
|
+
r === "dark" ? t.value = !0 : r === "light" ? t.value = !1 : t.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2445
|
+
}
|
|
2446
|
+
}), (r, n) => {
|
|
2447
|
+
const a = Lt;
|
|
2448
|
+
return g(), U(a, {
|
|
2449
|
+
modelValue: c(t),
|
|
2450
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => $t(t) ? t.value = o : null),
|
|
2451
|
+
color: "secondary",
|
|
2452
|
+
"on-icon": "i-tabler-moon",
|
|
2453
|
+
"off-icon": "i-tabler-sun"
|
|
2454
|
+
}, null, 8, ["modelValue"]);
|
|
2455
|
+
};
|
|
2456
|
+
}
|
|
2457
|
+
}), dt = Object.keys(He), en = dt.reduce((e, t) => (e[t] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((r) => `rgb(var(--r-color-${t}-${r}))`).reduce((r, n, a) => (r[a] = n, r), {}), t === "surface" ? ["lowest", "low", "base", "high", "highest", "on", "oninverted", "onlow", "onlowinverted", "border"].forEach((r) => {
|
|
2458
|
+
e[t][r] = `rgb(var(--r-color-${t}-${r}))`;
|
|
2459
|
+
}) : ["container", "containerd", "containerl", "on"].forEach((r) => {
|
|
2460
|
+
e[t][r] = `rgb(var(--r-color-${t}-${r}))`;
|
|
2461
|
+
}), e), {}), tn = dt.filter((e) => e !== "surface").reduce((e, t) => (e[`container-filled-${t}`] = `bg-${t}-container`, e[`btn-filled-${t}`] = `container-filled-${t} enabled:hover:bg-${t}-containerd text-${t}-on`, e[`container-light-${t}`] = `bg-${t}-container/10`, e[`btn-light-${t}`] = `container-light-${t} hover:bg-${t}-6/25 text-${t}-container`, e[`container-outline-${t}`] = `border-${t}-container border text-${t}-container`, e[`btn-outline-${t}`] = `container-outline-${t} hover:bg-${t}-container/10 text-${t}-container`, e[`container-subtle-${t}`] = `bg-${t}-container/0`, e[`btn-subtle-${t}`] = `container-subtle-${t} hover:bg-${t}-container/10 text-${t}-container`, e[`container-transparent-${t}`] = `bg-transparent text-${t}-container`, e[`btn-transparent-${t}`] = `container-transparent-${t} hover:text-${t}-containerl`, e[`container-constrast-${t}`] = `text-${t}-container`, e[`btn-constrast-${t}`] = `container-constrast-${t} hover:text-surface-base hover:bg-${t}-container`, e), {});
|
|
2462
|
+
function yn() {
|
|
2463
|
+
return {
|
|
2464
|
+
name: "roku",
|
|
2465
|
+
theme: {
|
|
2466
|
+
colors: {
|
|
2467
|
+
...en
|
|
2468
|
+
}
|
|
2469
|
+
},
|
|
2470
|
+
shortcuts: {
|
|
2471
|
+
...tn,
|
|
2472
|
+
"container-default": "bg-surface-base border-surface-border border text-surface-on transition-background-color,border-color,color",
|
|
2473
|
+
"btn-default": "container-default enabled:hover:bg-surface-high transition-background-color,border-color,color"
|
|
2474
|
+
},
|
|
2475
|
+
presets: [],
|
|
2476
|
+
content: {
|
|
2477
|
+
pipeline: {
|
|
2478
|
+
include: [
|
|
2479
|
+
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
|
|
2480
|
+
/@roku-ui/
|
|
2481
|
+
]
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
};
|
|
2208
2485
|
}
|
|
2209
2486
|
export {
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2487
|
+
bn as Avatar,
|
|
2488
|
+
St as Btn,
|
|
2489
|
+
gn as Chip,
|
|
2490
|
+
mn as Indicator,
|
|
2491
|
+
dn as Modal,
|
|
2492
|
+
Pr as Notification,
|
|
2493
|
+
fn as NotificationSystem,
|
|
2494
|
+
an as Notifications,
|
|
2495
|
+
hn as PinInput,
|
|
2496
|
+
pn as Progress,
|
|
2497
|
+
cn as RokuProvider,
|
|
2498
|
+
un as Select,
|
|
2499
|
+
nn as Slider,
|
|
2500
|
+
Lt as Switch,
|
|
2501
|
+
Cr as TextField,
|
|
2502
|
+
Hr as ThemeProvider,
|
|
2503
|
+
vn as ThemeSwitch,
|
|
2504
|
+
Ce as darkTheme,
|
|
2505
|
+
sn as generateColors,
|
|
2506
|
+
gr as generateColorsMap,
|
|
2507
|
+
hr as lightTheme,
|
|
2508
|
+
on as notificationsSymbol,
|
|
2509
|
+
yn as rokuPreset,
|
|
2510
|
+
He as themeColors,
|
|
2511
|
+
vr as useCurrentTheme,
|
|
2512
|
+
ln as useCurrentThemeScheme,
|
|
2513
|
+
pr as useNotifications,
|
|
2514
|
+
br as useRootTheme,
|
|
2515
|
+
at as useThemeStyles
|
|
2230
2516
|
};
|