@strands.gg/accui 2.3.11 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accui.css +1 -1
- package/dist/strands-auth-ui.cjs.js +1 -1
- package/dist/strands-auth-ui.es.js +1230 -480
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, provide, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, renderSlot, createBlock, Teleport, createCommentVNode, unref, createElementVNode, toDisplayString, createTextVNode, h, useSlots, Fragment, resolveDynamicComponent,
|
|
1
|
+
import { defineComponent, computed, provide, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, renderSlot, createBlock, Teleport, createCommentVNode, unref, createElementVNode, toDisplayString, createTextVNode, normalizeStyle, h, useSlots, createVNode, Fragment, resolveDynamicComponent, withCtx, resolveComponent, createSlots, ref, nextTick, toRefs, watch, renderList, reactive, withModifiers, createStaticVNode, withDirectives, vModelText, Transition, mergeProps, vModelSelect, inject, onBeforeUnmount, withKeys, isMemoSame, getCurrentInstance } from "vue";
|
|
2
2
|
import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-C3gBJK6y.es.js";
|
|
3
3
|
import { s } from "./useStrandsConfig-C3gBJK6y.es.js";
|
|
4
4
|
import { u as useStrandsAuth } from "./useStrandsAuth-DoUupKb8.es.js";
|
|
@@ -146,7 +146,7 @@ const _hoisted_4$t = {
|
|
|
146
146
|
"aria-hidden": "true"
|
|
147
147
|
};
|
|
148
148
|
const _hoisted_5$q = ["d"];
|
|
149
|
-
const _hoisted_6$
|
|
149
|
+
const _hoisted_6$o = { class: "alert-text-container" };
|
|
150
150
|
const _hoisted_7$m = {
|
|
151
151
|
key: 0,
|
|
152
152
|
class: "alert-dismiss-container"
|
|
@@ -202,7 +202,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
202
202
|
}, null, 8, _hoisted_5$q)
|
|
203
203
|
]))
|
|
204
204
|
]),
|
|
205
|
-
createElementVNode("div", _hoisted_6$
|
|
205
|
+
createElementVNode("div", _hoisted_6$o, [
|
|
206
206
|
_ctx.title ? (openBlock(), createElementBlock("h3", {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: normalizeClass(titleClasses.value)
|
|
@@ -242,6 +242,111 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
const StrandsUiAlert = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-1beb49ad"]]);
|
|
245
|
+
const logo = '<svg width="302" height="438" viewBox="0 0 302 438" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M71.5001 96C71.5001 96 132 106 137 61.5C142 17 117.5 3.50005 94.5001 1.50003C71.5001 -0.499996 16.0001 8.5 2.00014 72.5C-6.5 130.5 71.5003 227.5 165 218C258.5 208.5 280.758 148.5 283.5 121C286.242 93.5 277.5 61.5 238.5 61.5C153 61.5 150.501 185 170.5 235C190.5 285 199 279 213 314C227.001 349 217.296 411.458 183 427C129.456 450.65 92 426 78.5 407.5C65 389 68.0003 357 94.5001 344.5C121 332 212.41 393.5 301.5 361" stroke="black"/>\n</svg>\n';
|
|
246
|
+
const _hoisted_1$H = {
|
|
247
|
+
key: 0,
|
|
248
|
+
class: "loader-icon"
|
|
249
|
+
};
|
|
250
|
+
const _hoisted_2$y = ["width", "height"];
|
|
251
|
+
const _hoisted_3$v = ["d"];
|
|
252
|
+
const _hoisted_4$s = ["stroke-width"];
|
|
253
|
+
const _hoisted_5$p = ["stroke-width"];
|
|
254
|
+
const _hoisted_6$n = ["width", "height"];
|
|
255
|
+
const _hoisted_7$l = {
|
|
256
|
+
key: 3,
|
|
257
|
+
class: "loader-text"
|
|
258
|
+
};
|
|
259
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
260
|
+
__name: "UiLoader",
|
|
261
|
+
props: {
|
|
262
|
+
size: { default: 80 },
|
|
263
|
+
color: { default: "primary" },
|
|
264
|
+
variant: { default: "spinner" },
|
|
265
|
+
text: {},
|
|
266
|
+
centered: { type: Boolean, default: true },
|
|
267
|
+
weight: { default: 30 },
|
|
268
|
+
fullWidth: { type: Boolean, default: false }
|
|
269
|
+
},
|
|
270
|
+
setup(__props) {
|
|
271
|
+
const path = logo.replace(/<svg[^>]*>/, "").replace(/<\/svg>/, "").trim();
|
|
272
|
+
const d = path.match(/d="([^"]*)"/)?.[1] || "";
|
|
273
|
+
return (_ctx, _cache) => {
|
|
274
|
+
return openBlock(), createElementBlock("div", {
|
|
275
|
+
class: normalizeClass(["loader-container", [
|
|
276
|
+
{ "loader-centered": _ctx.centered },
|
|
277
|
+
`loader-color-${_ctx.color}`
|
|
278
|
+
]])
|
|
279
|
+
}, [
|
|
280
|
+
_ctx.variant === "spinner" ? (openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
281
|
+
(openBlock(), createElementBlock("svg", {
|
|
282
|
+
width: _ctx.size,
|
|
283
|
+
height: _ctx.size,
|
|
284
|
+
viewBox: "0 0 500 500"
|
|
285
|
+
}, [
|
|
286
|
+
createElementVNode("defs", null, [
|
|
287
|
+
createElementVNode("path", {
|
|
288
|
+
id: "logo-path",
|
|
289
|
+
d: unref(d),
|
|
290
|
+
transform: "translate(81, 13) scale(1.0)"
|
|
291
|
+
}, null, 8, _hoisted_3$v)
|
|
292
|
+
]),
|
|
293
|
+
createElementVNode("use", {
|
|
294
|
+
href: "#logo-path",
|
|
295
|
+
fill: "none",
|
|
296
|
+
stroke: "var(--loader-semi-color)",
|
|
297
|
+
"stroke-width": _ctx.weight,
|
|
298
|
+
"stroke-linecap": "round",
|
|
299
|
+
"stroke-linejoin": "round"
|
|
300
|
+
}, null, 8, _hoisted_4$s),
|
|
301
|
+
createElementVNode("use", {
|
|
302
|
+
href: "#logo-path",
|
|
303
|
+
fill: "none",
|
|
304
|
+
stroke: "var(--loader-solid-color)",
|
|
305
|
+
"stroke-width": _ctx.weight,
|
|
306
|
+
"stroke-linecap": "round",
|
|
307
|
+
"stroke-linejoin": "round",
|
|
308
|
+
class: "loader-animated-path"
|
|
309
|
+
}, null, 8, _hoisted_5$p)
|
|
310
|
+
], 8, _hoisted_2$y))
|
|
311
|
+
])) : _ctx.variant === "circle" ? (openBlock(), createElementBlock("div", {
|
|
312
|
+
key: 1,
|
|
313
|
+
class: "loader-circle",
|
|
314
|
+
style: normalizeStyle({ width: `${_ctx.size}px`, height: `${_ctx.size}px` })
|
|
315
|
+
}, [
|
|
316
|
+
(openBlock(), createElementBlock("svg", {
|
|
317
|
+
width: _ctx.size,
|
|
318
|
+
height: _ctx.size,
|
|
319
|
+
viewBox: "0 0 50 50"
|
|
320
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
321
|
+
createElementVNode("circle", {
|
|
322
|
+
cx: "25",
|
|
323
|
+
cy: "25",
|
|
324
|
+
r: "20",
|
|
325
|
+
fill: "none",
|
|
326
|
+
stroke: "var(--loader-solid-color)",
|
|
327
|
+
"stroke-width": "4",
|
|
328
|
+
"stroke-linecap": "round",
|
|
329
|
+
class: "loader-circle-path"
|
|
330
|
+
}, null, -1)
|
|
331
|
+
])], 8, _hoisted_6$n))
|
|
332
|
+
], 4)) : _ctx.variant === "bar" ? (openBlock(), createElementBlock("div", {
|
|
333
|
+
key: 2,
|
|
334
|
+
class: "loader-bar",
|
|
335
|
+
style: normalizeStyle({
|
|
336
|
+
width: _ctx.fullWidth ? "100%" : `${_ctx.size * 1.5}px`,
|
|
337
|
+
height: `${Math.max(_ctx.size * 0.1, 4)}px`
|
|
338
|
+
})
|
|
339
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
340
|
+
createElementVNode("div", { class: "loader-bar-track" }, [
|
|
341
|
+
createElementVNode("div", { class: "loader-bar-fill" })
|
|
342
|
+
], -1)
|
|
343
|
+
])], 4)) : createCommentVNode("", true),
|
|
344
|
+
_ctx.text ? (openBlock(), createElementBlock("p", _hoisted_7$l, toDisplayString(_ctx.text), 1)) : createCommentVNode("", true)
|
|
345
|
+
], 2);
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
const StrandsUiLoader = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-ba3ffb77"]]);
|
|
245
350
|
/**
|
|
246
351
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
247
352
|
*
|
|
@@ -329,6 +434,16 @@ const createLucideIcon = (iconName, iconNode) => (props, { slots, attrs }) => h(
|
|
|
329
434
|
},
|
|
330
435
|
slots
|
|
331
436
|
);
|
|
437
|
+
/**
|
|
438
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
439
|
+
*
|
|
440
|
+
* This source code is licensed under the ISC license.
|
|
441
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
442
|
+
*/
|
|
443
|
+
const ArrowRight = createLucideIcon("arrow-right", [
|
|
444
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
445
|
+
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
446
|
+
]);
|
|
332
447
|
/**
|
|
333
448
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
334
449
|
*
|
|
@@ -345,6 +460,31 @@ const Bell = createLucideIcon("bell", [
|
|
|
345
460
|
}
|
|
346
461
|
]
|
|
347
462
|
]);
|
|
463
|
+
/**
|
|
464
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
465
|
+
*
|
|
466
|
+
* This source code is licensed under the ISC license.
|
|
467
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
468
|
+
*/
|
|
469
|
+
const BookOpen = createLucideIcon("book-open", [
|
|
470
|
+
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
471
|
+
[
|
|
472
|
+
"path",
|
|
473
|
+
{
|
|
474
|
+
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",
|
|
475
|
+
key: "ruj8y"
|
|
476
|
+
}
|
|
477
|
+
]
|
|
478
|
+
]);
|
|
479
|
+
/**
|
|
480
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
481
|
+
*
|
|
482
|
+
* This source code is licensed under the ISC license.
|
|
483
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
484
|
+
*/
|
|
485
|
+
const Bookmark = createLucideIcon("bookmark", [
|
|
486
|
+
["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }]
|
|
487
|
+
]);
|
|
348
488
|
/**
|
|
349
489
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
350
490
|
*
|
|
@@ -389,6 +529,16 @@ const ChevronsUpDown = createLucideIcon("chevrons-up-down", [
|
|
|
389
529
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
390
530
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
391
531
|
]);
|
|
532
|
+
/**
|
|
533
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
534
|
+
*
|
|
535
|
+
* This source code is licensed under the ISC license.
|
|
536
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
537
|
+
*/
|
|
538
|
+
const Contrast = createLucideIcon("contrast", [
|
|
539
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
540
|
+
["path", { d: "M12 18a6 6 0 0 0 0-12v12z", key: "j4l70d" }]
|
|
541
|
+
]);
|
|
392
542
|
/**
|
|
393
543
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
394
544
|
*
|
|
@@ -409,6 +559,17 @@ const DollarSign = createLucideIcon("dollar-sign", [
|
|
|
409
559
|
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
|
|
410
560
|
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
|
|
411
561
|
]);
|
|
562
|
+
/**
|
|
563
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
564
|
+
*
|
|
565
|
+
* This source code is licensed under the ISC license.
|
|
566
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
567
|
+
*/
|
|
568
|
+
const Download = createLucideIcon("download", [
|
|
569
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
570
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
571
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
572
|
+
]);
|
|
412
573
|
/**
|
|
413
574
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
414
575
|
*
|
|
@@ -435,6 +596,22 @@ const Funnel = createLucideIcon("funnel", [
|
|
|
435
596
|
}
|
|
436
597
|
]
|
|
437
598
|
]);
|
|
599
|
+
/**
|
|
600
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
601
|
+
*
|
|
602
|
+
* This source code is licensed under the ISC license.
|
|
603
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
604
|
+
*/
|
|
605
|
+
const Github = createLucideIcon("github", [
|
|
606
|
+
[
|
|
607
|
+
"path",
|
|
608
|
+
{
|
|
609
|
+
d: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",
|
|
610
|
+
key: "tonef"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
|
|
614
|
+
]);
|
|
438
615
|
/**
|
|
439
616
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
440
617
|
*
|
|
@@ -449,6 +626,21 @@ const GripVertical = createLucideIcon("grip-vertical", [
|
|
|
449
626
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
450
627
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
451
628
|
]);
|
|
629
|
+
/**
|
|
630
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
631
|
+
*
|
|
632
|
+
* This source code is licensed under the ISC license.
|
|
633
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
634
|
+
*/
|
|
635
|
+
const Heart = createLucideIcon("heart", [
|
|
636
|
+
[
|
|
637
|
+
"path",
|
|
638
|
+
{
|
|
639
|
+
d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
|
|
640
|
+
key: "mvr1a0"
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
]);
|
|
452
644
|
/**
|
|
453
645
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
454
646
|
*
|
|
@@ -561,6 +753,75 @@ const Search = createLucideIcon("search", [
|
|
|
561
753
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
562
754
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
563
755
|
]);
|
|
756
|
+
/**
|
|
757
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
758
|
+
*
|
|
759
|
+
* This source code is licensed under the ISC license.
|
|
760
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
761
|
+
*/
|
|
762
|
+
const Share = createLucideIcon("share", [
|
|
763
|
+
["path", { d: "M12 2v13", key: "1km8f5" }],
|
|
764
|
+
["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
|
|
765
|
+
["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }]
|
|
766
|
+
]);
|
|
767
|
+
/**
|
|
768
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
769
|
+
*
|
|
770
|
+
* This source code is licensed under the ISC license.
|
|
771
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
772
|
+
*/
|
|
773
|
+
const Shield = createLucideIcon("shield", [
|
|
774
|
+
[
|
|
775
|
+
"path",
|
|
776
|
+
{
|
|
777
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
778
|
+
key: "oel41y"
|
|
779
|
+
}
|
|
780
|
+
]
|
|
781
|
+
]);
|
|
782
|
+
/**
|
|
783
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
784
|
+
*
|
|
785
|
+
* This source code is licensed under the ISC license.
|
|
786
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
787
|
+
*/
|
|
788
|
+
const Smile = createLucideIcon("smile", [
|
|
789
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
790
|
+
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
|
|
791
|
+
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
792
|
+
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
793
|
+
]);
|
|
794
|
+
/**
|
|
795
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
796
|
+
*
|
|
797
|
+
* This source code is licensed under the ISC license.
|
|
798
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
799
|
+
*/
|
|
800
|
+
const SquarePen = createLucideIcon("square-pen", [
|
|
801
|
+
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
|
|
802
|
+
[
|
|
803
|
+
"path",
|
|
804
|
+
{
|
|
805
|
+
d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
|
|
806
|
+
key: "ohrbg2"
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
]);
|
|
810
|
+
/**
|
|
811
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
812
|
+
*
|
|
813
|
+
* This source code is licensed under the ISC license.
|
|
814
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
815
|
+
*/
|
|
816
|
+
const Star = createLucideIcon("star", [
|
|
817
|
+
[
|
|
818
|
+
"path",
|
|
819
|
+
{
|
|
820
|
+
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
821
|
+
key: "r04s7s"
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
]);
|
|
564
825
|
/**
|
|
565
826
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
566
827
|
*
|
|
@@ -613,24 +874,38 @@ const Users = createLucideIcon("users", [
|
|
|
613
874
|
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
614
875
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
615
876
|
]);
|
|
616
|
-
|
|
877
|
+
/**
|
|
878
|
+
* @license lucide-vue-next v0.542.0 - ISC
|
|
879
|
+
*
|
|
880
|
+
* This source code is licensed under the ISC license.
|
|
881
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
882
|
+
*/
|
|
883
|
+
const X = createLucideIcon("x", [
|
|
884
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
885
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
886
|
+
]);
|
|
887
|
+
const _hoisted_1$G = {
|
|
617
888
|
key: 0,
|
|
618
889
|
class: "button-loading-content"
|
|
619
890
|
};
|
|
620
|
-
const _hoisted_2$
|
|
621
|
-
const _hoisted_3$
|
|
622
|
-
key: 1,
|
|
623
|
-
class: "button-content"
|
|
624
|
-
};
|
|
625
|
-
const _hoisted_4$s = {
|
|
891
|
+
const _hoisted_2$x = { key: 0 };
|
|
892
|
+
const _hoisted_3$u = {
|
|
626
893
|
key: 0,
|
|
627
894
|
class: "leading-icon"
|
|
628
895
|
};
|
|
629
|
-
const
|
|
896
|
+
const _hoisted_4$r = {
|
|
630
897
|
key: 1,
|
|
898
|
+
class: "leading-icon"
|
|
899
|
+
};
|
|
900
|
+
const _hoisted_5$o = {
|
|
901
|
+
key: 2,
|
|
631
902
|
class: "trailing-icon"
|
|
632
903
|
};
|
|
633
|
-
const
|
|
904
|
+
const _hoisted_6$m = {
|
|
905
|
+
key: 3,
|
|
906
|
+
class: "trailing-icon"
|
|
907
|
+
};
|
|
908
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
634
909
|
__name: "UiButton.Content",
|
|
635
910
|
props: {
|
|
636
911
|
loading: { type: Boolean, default: false },
|
|
@@ -638,78 +913,158 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
638
913
|
icon: { type: Boolean, default: false },
|
|
639
914
|
iconName: {},
|
|
640
915
|
leadingIcon: {},
|
|
641
|
-
trailingIcon: {}
|
|
916
|
+
trailingIcon: {},
|
|
917
|
+
size: {}
|
|
642
918
|
},
|
|
643
919
|
setup(__props) {
|
|
644
920
|
const LucideIcons = {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
921
|
+
ArrowRight,
|
|
922
|
+
Bell,
|
|
923
|
+
BookOpen,
|
|
924
|
+
Bookmark,
|
|
648
925
|
Check,
|
|
649
926
|
ChevronRight,
|
|
927
|
+
ChevronUp,
|
|
650
928
|
ChevronDown,
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
929
|
+
ChevronsUpDown,
|
|
930
|
+
Contrast,
|
|
931
|
+
DollarSign,
|
|
932
|
+
Download,
|
|
933
|
+
Edit: SquarePen,
|
|
934
|
+
ExternalLink,
|
|
935
|
+
Github,
|
|
936
|
+
Heart,
|
|
654
937
|
Home: House,
|
|
938
|
+
Mail,
|
|
939
|
+
MapPin,
|
|
940
|
+
Monitor,
|
|
941
|
+
Moon,
|
|
942
|
+
Phone,
|
|
943
|
+
Plus,
|
|
944
|
+
Search,
|
|
945
|
+
Share,
|
|
946
|
+
Shield,
|
|
947
|
+
Smile,
|
|
948
|
+
Star,
|
|
949
|
+
Sun,
|
|
950
|
+
Trash2,
|
|
655
951
|
User,
|
|
656
|
-
|
|
952
|
+
X
|
|
657
953
|
};
|
|
658
954
|
const slots = useSlots();
|
|
955
|
+
const hasLeadingIconSlot = computed(() => {
|
|
956
|
+
return !!slots["leading-icon"];
|
|
957
|
+
});
|
|
958
|
+
const hasTrailingIconSlot = computed(() => {
|
|
959
|
+
return !!slots["trailing-icon"];
|
|
960
|
+
});
|
|
659
961
|
const props = __props;
|
|
660
962
|
const getLucideIcon = (iconName) => {
|
|
661
|
-
if (!iconName) return null;
|
|
963
|
+
if (!iconName || iconName.trim() === "") return null;
|
|
662
964
|
const pascalCase = iconName.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
663
965
|
const IconComponent2 = LucideIcons[pascalCase];
|
|
664
966
|
return IconComponent2 || null;
|
|
665
967
|
};
|
|
666
|
-
const LeadingIconComponent = computed(() =>
|
|
667
|
-
|
|
668
|
-
|
|
968
|
+
const LeadingIconComponent = computed(() => {
|
|
969
|
+
if (!props.leadingIcon || props.leadingIcon.trim() === "") {
|
|
970
|
+
return null;
|
|
971
|
+
}
|
|
972
|
+
return getLucideIcon(props.leadingIcon);
|
|
973
|
+
});
|
|
974
|
+
const TrailingIconComponent = computed(() => {
|
|
975
|
+
if (!props.trailingIcon || props.trailingIcon.trim() === "") {
|
|
976
|
+
return null;
|
|
977
|
+
}
|
|
978
|
+
return getLucideIcon(props.trailingIcon);
|
|
979
|
+
});
|
|
980
|
+
const IconComponent = computed(() => {
|
|
981
|
+
return props.iconName && props.iconName.trim() !== "" ? getLucideIcon(props.iconName) : null;
|
|
982
|
+
});
|
|
983
|
+
const iconSizeClass = computed(() => {
|
|
984
|
+
switch (props.size) {
|
|
985
|
+
case "xs":
|
|
986
|
+
return "button-icon-xs";
|
|
987
|
+
case "sm":
|
|
988
|
+
return "button-icon-sm";
|
|
989
|
+
case "md":
|
|
990
|
+
return "button-icon-md";
|
|
991
|
+
case "lg":
|
|
992
|
+
return "button-icon-lg";
|
|
993
|
+
case "xl":
|
|
994
|
+
return "button-icon-xl";
|
|
995
|
+
default:
|
|
996
|
+
return "button-icon-md";
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
const loaderSize = computed(() => {
|
|
1000
|
+
switch (props.size) {
|
|
1001
|
+
case "xs":
|
|
1002
|
+
return 16;
|
|
1003
|
+
// 1rem - 1.33x text
|
|
1004
|
+
case "sm":
|
|
1005
|
+
return 18;
|
|
1006
|
+
// 1.125rem - 1.28x text
|
|
1007
|
+
case "md":
|
|
1008
|
+
return 20;
|
|
1009
|
+
// 1.25rem - 1.4x text
|
|
1010
|
+
case "lg":
|
|
1011
|
+
return 24;
|
|
1012
|
+
// 1.5rem - 1.5x text
|
|
1013
|
+
case "xl":
|
|
1014
|
+
return 28;
|
|
1015
|
+
// 1.75rem - 1.55x text
|
|
1016
|
+
default:
|
|
1017
|
+
return 20;
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
const sizeClass = computed(() => {
|
|
1021
|
+
return props.size ? `button-content-${props.size}` : "button-content-md";
|
|
1022
|
+
});
|
|
669
1023
|
return (_ctx, _cache) => {
|
|
670
|
-
return _ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
"stroke-width": "4"
|
|
683
|
-
}),
|
|
684
|
-
createElementVNode("path", {
|
|
685
|
-
class: "button-loading-spinner",
|
|
686
|
-
fill: "currentColor",
|
|
687
|
-
d: "m4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
688
|
-
})
|
|
689
|
-
], -1)),
|
|
690
|
-
!_ctx.icon ? (openBlock(), createElementBlock("span", _hoisted_2$y, toDisplayString(_ctx.loadingText || "Loading..."), 1)) : createCommentVNode("", true)
|
|
691
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_3$v, [
|
|
1024
|
+
return _ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_1$G, [
|
|
1025
|
+
createVNode(StrandsUiLoader, {
|
|
1026
|
+
variant: "circle",
|
|
1027
|
+
size: loaderSize.value,
|
|
1028
|
+
centered: false,
|
|
1029
|
+
color: "white"
|
|
1030
|
+
}, null, 8, ["size"]),
|
|
1031
|
+
!_ctx.icon ? (openBlock(), createElementBlock("span", _hoisted_2$x, toDisplayString(_ctx.loadingText || "Loading..."), 1)) : createCommentVNode("", true)
|
|
1032
|
+
])) : (openBlock(), createElementBlock("span", {
|
|
1033
|
+
key: 1,
|
|
1034
|
+
class: normalizeClass(["button-content", sizeClass.value])
|
|
1035
|
+
}, [
|
|
692
1036
|
_ctx.icon ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
693
|
-
IconComponent.value
|
|
1037
|
+
IconComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(IconComponent.value), {
|
|
1038
|
+
key: 0,
|
|
1039
|
+
class: normalizeClass(iconSizeClass.value)
|
|
1040
|
+
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
694
1041
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
1042
|
+
LeadingIconComponent.value ? (openBlock(), createElementBlock("span", _hoisted_3$u, [
|
|
1043
|
+
(openBlock(), createBlock(resolveDynamicComponent(LeadingIconComponent.value), {
|
|
1044
|
+
class: normalizeClass(iconSizeClass.value)
|
|
1045
|
+
}, null, 8, ["class"]))
|
|
1046
|
+
])) : createCommentVNode("", true),
|
|
1047
|
+
hasLeadingIconSlot.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, [
|
|
1048
|
+
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1049
|
+
])) : createCommentVNode("", true),
|
|
1050
|
+
renderSlot(_ctx.$slots, "icon", {}, void 0, true),
|
|
1051
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
1052
|
+
TrailingIconComponent.value ? (openBlock(), createElementBlock("span", _hoisted_5$o, [
|
|
1053
|
+
(openBlock(), createBlock(resolveDynamicComponent(TrailingIconComponent.value), {
|
|
1054
|
+
class: normalizeClass(iconSizeClass.value)
|
|
1055
|
+
}, null, 8, ["class"]))
|
|
699
1056
|
])) : createCommentVNode("", true),
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
TrailingIconComponent.value || unref(slots)["trailing-icon"] ? (openBlock(), createElementBlock("span", _hoisted_5$p, [
|
|
703
|
-
TrailingIconComponent.value && !unref(slots)["trailing-icon"] ? (openBlock(), createBlock(resolveDynamicComponent(TrailingIconComponent.value), { key: 0 })) : createCommentVNode("", true),
|
|
704
|
-
unref(slots)["trailing-icon"] ? renderSlot(_ctx.$slots, "trailing-icon", { key: 1 }) : createCommentVNode("", true)
|
|
1057
|
+
hasTrailingIconSlot.value ? (openBlock(), createElementBlock("span", _hoisted_6$m, [
|
|
1058
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
705
1059
|
])) : createCommentVNode("", true)
|
|
706
1060
|
], 64))
|
|
707
|
-
]));
|
|
1061
|
+
], 2));
|
|
708
1062
|
};
|
|
709
1063
|
}
|
|
710
1064
|
});
|
|
711
|
-
const
|
|
712
|
-
const
|
|
1065
|
+
const UiButtonContent = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-474060cc"]]);
|
|
1066
|
+
const _hoisted_1$F = ["href", "target", "rel"];
|
|
1067
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
713
1068
|
__name: "UiButton.Anchor",
|
|
714
1069
|
props: {
|
|
715
1070
|
to: {},
|
|
@@ -757,7 +1112,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
757
1112
|
style: normalizeStyle(_ctx.buttonStyles),
|
|
758
1113
|
onClick: handleLinkClick
|
|
759
1114
|
}, [
|
|
760
|
-
createVNode(
|
|
1115
|
+
createVNode(UiButtonContent, {
|
|
761
1116
|
loading: _ctx.loading,
|
|
762
1117
|
"loading-text": _ctx.loadingText,
|
|
763
1118
|
icon: _ctx.icon,
|
|
@@ -779,11 +1134,11 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
779
1134
|
]),
|
|
780
1135
|
_: 3
|
|
781
1136
|
}, 8, ["loading", "loading-text", "icon", "icon-name", "leading-icon", "trailing-icon"])
|
|
782
|
-
], 14, _hoisted_1$
|
|
1137
|
+
], 14, _hoisted_1$F);
|
|
783
1138
|
};
|
|
784
1139
|
}
|
|
785
1140
|
});
|
|
786
|
-
const _sfc_main$
|
|
1141
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
787
1142
|
__name: "UiButton.Nuxt",
|
|
788
1143
|
props: {
|
|
789
1144
|
to: {},
|
|
@@ -817,7 +1172,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
817
1172
|
onClick: handleLinkClick
|
|
818
1173
|
}, {
|
|
819
1174
|
default: withCtx(() => [
|
|
820
|
-
createVNode(
|
|
1175
|
+
createVNode(UiButtonContent, {
|
|
821
1176
|
loading: _ctx.loading,
|
|
822
1177
|
"loading-text": _ctx.loadingText,
|
|
823
1178
|
icon: _ctx.icon,
|
|
@@ -845,7 +1200,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
845
1200
|
};
|
|
846
1201
|
}
|
|
847
1202
|
});
|
|
848
|
-
const _sfc_main$
|
|
1203
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
849
1204
|
__name: "UiButton.Vue",
|
|
850
1205
|
props: {
|
|
851
1206
|
to: {},
|
|
@@ -879,7 +1234,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
879
1234
|
onClick: handleLinkClick
|
|
880
1235
|
}, {
|
|
881
1236
|
default: withCtx(() => [
|
|
882
|
-
createVNode(
|
|
1237
|
+
createVNode(UiButtonContent, {
|
|
883
1238
|
loading: _ctx.loading,
|
|
884
1239
|
"loading-text": _ctx.loadingText,
|
|
885
1240
|
icon: _ctx.icon,
|
|
@@ -907,8 +1262,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
907
1262
|
};
|
|
908
1263
|
}
|
|
909
1264
|
});
|
|
910
|
-
const _hoisted_1$
|
|
911
|
-
const _sfc_main$
|
|
1265
|
+
const _hoisted_1$E = ["type", "disabled"];
|
|
1266
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
912
1267
|
__name: "UiButton",
|
|
913
1268
|
props: {
|
|
914
1269
|
variant: { default: "primary" },
|
|
@@ -961,9 +1316,10 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
961
1316
|
props.fullWidth ? "ui-button-full-width" : "",
|
|
962
1317
|
props.icon ? "ui-button-icon" : "",
|
|
963
1318
|
props.squircle ? "ui-button-squircle" : ""
|
|
964
|
-
].filter(Boolean)
|
|
1319
|
+
].filter(Boolean);
|
|
965
1320
|
return classes;
|
|
966
1321
|
});
|
|
1322
|
+
const buttonClassString = computed(() => buttonClasses.value.join(" "));
|
|
967
1323
|
const buttonStyles = computed(() => {
|
|
968
1324
|
return {
|
|
969
1325
|
fontWeight: props.fontWeight
|
|
@@ -974,33 +1330,43 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
974
1330
|
key: 0,
|
|
975
1331
|
type: _ctx.type,
|
|
976
1332
|
disabled: _ctx.disabled || _ctx.loading,
|
|
977
|
-
class: normalizeClass(
|
|
1333
|
+
class: normalizeClass(buttonClassString.value),
|
|
978
1334
|
style: normalizeStyle(buttonStyles.value),
|
|
979
1335
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
980
1336
|
}, [
|
|
981
|
-
createVNode(
|
|
1337
|
+
createVNode(UiButtonContent, {
|
|
982
1338
|
loading: _ctx.loading,
|
|
983
1339
|
"loading-text": _ctx.loadingText,
|
|
984
1340
|
icon: _ctx.icon,
|
|
985
1341
|
"icon-name": _ctx.iconName,
|
|
986
1342
|
"leading-icon": _ctx.leadingIcon,
|
|
987
|
-
"trailing-icon": _ctx.trailingIcon
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
991
|
-
]),
|
|
1343
|
+
"trailing-icon": _ctx.trailingIcon,
|
|
1344
|
+
size: _ctx.size
|
|
1345
|
+
}, createSlots({
|
|
992
1346
|
icon: withCtx(() => [
|
|
993
1347
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
994
1348
|
]),
|
|
995
1349
|
default: withCtx(() => [
|
|
996
1350
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
997
1351
|
]),
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
]
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1352
|
+
_: 2
|
|
1353
|
+
}, [
|
|
1354
|
+
_ctx.$slots["leading-icon"] ? {
|
|
1355
|
+
name: "leading-icon",
|
|
1356
|
+
fn: withCtx(() => [
|
|
1357
|
+
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1358
|
+
]),
|
|
1359
|
+
key: "0"
|
|
1360
|
+
} : void 0,
|
|
1361
|
+
_ctx.$slots["trailing-icon"] ? {
|
|
1362
|
+
name: "trailing-icon",
|
|
1363
|
+
fn: withCtx(() => [
|
|
1364
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
1365
|
+
]),
|
|
1366
|
+
key: "1"
|
|
1367
|
+
} : void 0
|
|
1368
|
+
]), 1032, ["loading", "loading-text", "icon", "icon-name", "leading-icon", "trailing-icon", "size"])
|
|
1369
|
+
], 14, _hoisted_1$E)) : isNuxtAvailable.value && _ctx.to ? (openBlock(), createBlock(_sfc_main$J, {
|
|
1004
1370
|
key: 1,
|
|
1005
1371
|
to: _ctx.to,
|
|
1006
1372
|
disabled: _ctx.disabled,
|
|
@@ -1013,21 +1379,30 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1013
1379
|
"button-classes": buttonClasses.value,
|
|
1014
1380
|
"button-styles": buttonStyles.value,
|
|
1015
1381
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click", $event))
|
|
1016
|
-
}, {
|
|
1017
|
-
"leading-icon": withCtx(() => [
|
|
1018
|
-
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1019
|
-
]),
|
|
1382
|
+
}, createSlots({
|
|
1020
1383
|
icon: withCtx(() => [
|
|
1021
1384
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
1022
1385
|
]),
|
|
1023
1386
|
default: withCtx(() => [
|
|
1024
1387
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1025
1388
|
]),
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
]
|
|
1029
|
-
|
|
1030
|
-
|
|
1389
|
+
_: 2
|
|
1390
|
+
}, [
|
|
1391
|
+
_ctx.$slots["leading-icon"] ? {
|
|
1392
|
+
name: "leading-icon",
|
|
1393
|
+
fn: withCtx(() => [
|
|
1394
|
+
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1395
|
+
]),
|
|
1396
|
+
key: "0"
|
|
1397
|
+
} : void 0,
|
|
1398
|
+
_ctx.$slots["trailing-icon"] ? {
|
|
1399
|
+
name: "trailing-icon",
|
|
1400
|
+
fn: withCtx(() => [
|
|
1401
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
1402
|
+
]),
|
|
1403
|
+
key: "1"
|
|
1404
|
+
} : void 0
|
|
1405
|
+
]), 1032, ["to", "disabled", "loading", "loading-text", "icon", "icon-name", "leading-icon", "trailing-icon", "button-classes", "button-styles"])) : isVueRouterAvailable.value && _ctx.to ? (openBlock(), createBlock(_sfc_main$I, {
|
|
1031
1406
|
key: 2,
|
|
1032
1407
|
to: _ctx.to,
|
|
1033
1408
|
disabled: _ctx.disabled,
|
|
@@ -1040,21 +1415,30 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1040
1415
|
"button-classes": buttonClasses.value,
|
|
1041
1416
|
"button-styles": buttonStyles.value,
|
|
1042
1417
|
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("click", $event))
|
|
1043
|
-
}, {
|
|
1044
|
-
"leading-icon": withCtx(() => [
|
|
1045
|
-
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1046
|
-
]),
|
|
1418
|
+
}, createSlots({
|
|
1047
1419
|
icon: withCtx(() => [
|
|
1048
1420
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
1049
1421
|
]),
|
|
1050
1422
|
default: withCtx(() => [
|
|
1051
1423
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1052
1424
|
]),
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
]
|
|
1056
|
-
|
|
1057
|
-
|
|
1425
|
+
_: 2
|
|
1426
|
+
}, [
|
|
1427
|
+
_ctx.$slots["leading-icon"] ? {
|
|
1428
|
+
name: "leading-icon",
|
|
1429
|
+
fn: withCtx(() => [
|
|
1430
|
+
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1431
|
+
]),
|
|
1432
|
+
key: "0"
|
|
1433
|
+
} : void 0,
|
|
1434
|
+
_ctx.$slots["trailing-icon"] ? {
|
|
1435
|
+
name: "trailing-icon",
|
|
1436
|
+
fn: withCtx(() => [
|
|
1437
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
1438
|
+
]),
|
|
1439
|
+
key: "1"
|
|
1440
|
+
} : void 0
|
|
1441
|
+
]), 1032, ["to", "disabled", "loading", "loading-text", "icon", "icon-name", "leading-icon", "trailing-icon", "button-classes", "button-styles"])) : (openBlock(), createBlock(_sfc_main$K, {
|
|
1058
1442
|
key: 3,
|
|
1059
1443
|
to: _ctx.to,
|
|
1060
1444
|
href: _ctx.href,
|
|
@@ -1069,35 +1453,49 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1069
1453
|
"button-classes": buttonClasses.value,
|
|
1070
1454
|
"button-styles": buttonStyles.value,
|
|
1071
1455
|
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("click", $event))
|
|
1072
|
-
}, {
|
|
1073
|
-
"leading-icon": withCtx(() => [
|
|
1074
|
-
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1075
|
-
]),
|
|
1456
|
+
}, createSlots({
|
|
1076
1457
|
icon: withCtx(() => [
|
|
1077
1458
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
1078
1459
|
]),
|
|
1079
1460
|
default: withCtx(() => [
|
|
1080
1461
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1081
1462
|
]),
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
]
|
|
1085
|
-
|
|
1086
|
-
|
|
1463
|
+
_: 2
|
|
1464
|
+
}, [
|
|
1465
|
+
_ctx.$slots["leading-icon"] ? {
|
|
1466
|
+
name: "leading-icon",
|
|
1467
|
+
fn: withCtx(() => [
|
|
1468
|
+
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
|
|
1469
|
+
]),
|
|
1470
|
+
key: "0"
|
|
1471
|
+
} : void 0,
|
|
1472
|
+
_ctx.$slots["trailing-icon"] ? {
|
|
1473
|
+
name: "trailing-icon",
|
|
1474
|
+
fn: withCtx(() => [
|
|
1475
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
1476
|
+
]),
|
|
1477
|
+
key: "1"
|
|
1478
|
+
} : void 0
|
|
1479
|
+
]), 1032, ["to", "href", "external", "disabled", "loading", "loading-text", "icon", "icon-name", "leading-icon", "trailing-icon", "button-classes", "button-styles"]));
|
|
1087
1480
|
};
|
|
1088
1481
|
}
|
|
1089
1482
|
});
|
|
1090
|
-
const StrandsUiButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1091
|
-
const
|
|
1483
|
+
const StrandsUiButton = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-25067b15"]]);
|
|
1484
|
+
const CompoundUiButton = StrandsUiButton;
|
|
1485
|
+
CompoundUiButton.Content = UiButtonContent;
|
|
1486
|
+
CompoundUiButton.Anchor = _sfc_main$K;
|
|
1487
|
+
CompoundUiButton.Nuxt = _sfc_main$J;
|
|
1488
|
+
CompoundUiButton.Vue = _sfc_main$I;
|
|
1489
|
+
const _hoisted_1$D = {
|
|
1092
1490
|
key: 0,
|
|
1093
1491
|
class: "ui-card-header"
|
|
1094
1492
|
};
|
|
1095
|
-
const _hoisted_2$
|
|
1096
|
-
const _hoisted_3$
|
|
1493
|
+
const _hoisted_2$w = { class: "ui-card-content" };
|
|
1494
|
+
const _hoisted_3$t = {
|
|
1097
1495
|
key: 1,
|
|
1098
1496
|
class: "ui-card-footer"
|
|
1099
1497
|
};
|
|
1100
|
-
const _sfc_main$
|
|
1498
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
1101
1499
|
__name: "UiCard",
|
|
1102
1500
|
props: {
|
|
1103
1501
|
variant: { default: "default" },
|
|
@@ -1115,30 +1513,30 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
1115
1513
|
`ui-card-color-${_ctx.color}`
|
|
1116
1514
|
]])
|
|
1117
1515
|
}, [
|
|
1118
|
-
_ctx.$slots["header"] ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1516
|
+
_ctx.$slots["header"] ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
1119
1517
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1120
1518
|
])) : createCommentVNode("", true),
|
|
1121
|
-
createElementVNode("div", _hoisted_2$
|
|
1519
|
+
createElementVNode("div", _hoisted_2$w, [
|
|
1122
1520
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1123
1521
|
]),
|
|
1124
|
-
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1522
|
+
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
|
|
1125
1523
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1126
1524
|
])) : createCommentVNode("", true)
|
|
1127
1525
|
], 2);
|
|
1128
1526
|
};
|
|
1129
1527
|
}
|
|
1130
1528
|
});
|
|
1131
|
-
const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1132
|
-
const _hoisted_1$
|
|
1133
|
-
const _hoisted_2$
|
|
1134
|
-
const _hoisted_3$
|
|
1135
|
-
const _hoisted_4$
|
|
1529
|
+
const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-e189c5aa"]]);
|
|
1530
|
+
const _hoisted_1$C = { class: "accui-component-scope" };
|
|
1531
|
+
const _hoisted_2$v = { class: "input-container" };
|
|
1532
|
+
const _hoisted_3$s = ["for"];
|
|
1533
|
+
const _hoisted_4$q = {
|
|
1136
1534
|
key: 0,
|
|
1137
1535
|
class: "input-required"
|
|
1138
1536
|
};
|
|
1139
|
-
const _hoisted_5$
|
|
1140
|
-
const _hoisted_6$
|
|
1141
|
-
const _hoisted_7$
|
|
1537
|
+
const _hoisted_5$n = { class: "input-wrapper" };
|
|
1538
|
+
const _hoisted_6$l = ["id", "type", "value", "placeholder", "disabled", "required", "autocomplete", "name", "inputmode", "maxlength"];
|
|
1539
|
+
const _hoisted_7$k = ["aria-label"];
|
|
1142
1540
|
const _hoisted_8$k = {
|
|
1143
1541
|
key: 0,
|
|
1144
1542
|
class: "input-toggle-icon",
|
|
@@ -1165,7 +1563,7 @@ const _hoisted_12$i = {
|
|
|
1165
1563
|
key: 2,
|
|
1166
1564
|
class: "input-help-text"
|
|
1167
1565
|
};
|
|
1168
|
-
const _sfc_main$
|
|
1566
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
1169
1567
|
__name: "UiInput",
|
|
1170
1568
|
props: {
|
|
1171
1569
|
modelValue: {},
|
|
@@ -1247,17 +1645,17 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1247
1645
|
showPassword.value = !showPassword.value;
|
|
1248
1646
|
};
|
|
1249
1647
|
return (_ctx, _cache) => {
|
|
1250
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1251
|
-
createElementVNode("div", _hoisted_2$
|
|
1648
|
+
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
1649
|
+
createElementVNode("div", _hoisted_2$v, [
|
|
1252
1650
|
_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
1253
1651
|
key: 0,
|
|
1254
1652
|
for: inputId.value,
|
|
1255
1653
|
class: "input-label"
|
|
1256
1654
|
}, [
|
|
1257
1655
|
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
1258
|
-
_ctx.required ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
1259
|
-
], 8, _hoisted_3$
|
|
1260
|
-
createElementVNode("div", _hoisted_5$
|
|
1656
|
+
_ctx.required ? (openBlock(), createElementBlock("span", _hoisted_4$q, "*")) : createCommentVNode("", true)
|
|
1657
|
+
], 8, _hoisted_3$s)) : createCommentVNode("", true),
|
|
1658
|
+
createElementVNode("div", _hoisted_5$n, [
|
|
1261
1659
|
createElementVNode("div", {
|
|
1262
1660
|
class: normalizeClass(["input-field-wrapper", [
|
|
1263
1661
|
{ "input-error": _ctx.error },
|
|
@@ -1287,7 +1685,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1287
1685
|
onBlur: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("blur", $event)),
|
|
1288
1686
|
onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("focus", $event)),
|
|
1289
1687
|
onKeydown: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("keydown", $event))
|
|
1290
|
-
}, null, 42, _hoisted_6$
|
|
1688
|
+
}, null, 42, _hoisted_6$l),
|
|
1291
1689
|
_ctx.type === "password" ? (openBlock(), createElementBlock("button", {
|
|
1292
1690
|
key: 1,
|
|
1293
1691
|
type: "button",
|
|
@@ -1316,7 +1714,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1316
1714
|
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
|
1317
1715
|
}, null, -1)
|
|
1318
1716
|
])]))
|
|
1319
|
-
], 8, _hoisted_7$
|
|
1717
|
+
], 8, _hoisted_7$k)) : createCommentVNode("", true),
|
|
1320
1718
|
FollowingIconComponent.value || _ctx.$slots["following-icon"] ? (openBlock(), createElementBlock("div", {
|
|
1321
1719
|
key: 2,
|
|
1322
1720
|
class: normalizeClass(["input-following-icon", { "cursor-pointer": _ctx.$attrs["onTrailing-action"] }]),
|
|
@@ -1335,10 +1733,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1335
1733
|
};
|
|
1336
1734
|
}
|
|
1337
1735
|
});
|
|
1338
|
-
const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1339
|
-
const _hoisted_1$
|
|
1340
|
-
const _hoisted_2$
|
|
1341
|
-
const _sfc_main$
|
|
1736
|
+
const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-26b9fb0d"]]);
|
|
1737
|
+
const _hoisted_1$B = ["disabled", "aria-disabled"];
|
|
1738
|
+
const _hoisted_2$u = ["href", "target", "rel", "aria-disabled"];
|
|
1739
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
1342
1740
|
__name: "UiLink",
|
|
1343
1741
|
props: {
|
|
1344
1742
|
href: {},
|
|
@@ -1377,8 +1775,6 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
1377
1775
|
const getColorValues = () => ({
|
|
1378
1776
|
primary: getCurrentAccentColor(),
|
|
1379
1777
|
// configurable strands accent
|
|
1380
|
-
secondary: "#6b7280",
|
|
1381
|
-
// gray-500
|
|
1382
1778
|
success: "#059669",
|
|
1383
1779
|
// emerald-600
|
|
1384
1780
|
warning: "#d97706",
|
|
@@ -1430,7 +1826,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
1430
1826
|
onClick: handleClick
|
|
1431
1827
|
}, [
|
|
1432
1828
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1433
|
-
], 14, _hoisted_1$
|
|
1829
|
+
], 14, _hoisted_1$B)) : (openBlock(), createElementBlock("a", {
|
|
1434
1830
|
key: 1,
|
|
1435
1831
|
class: normalizeClass(["ui-link", [
|
|
1436
1832
|
`ui-link-${_ctx.variant}`,
|
|
@@ -1446,23 +1842,23 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
1446
1842
|
onClick: handleClick
|
|
1447
1843
|
}, [
|
|
1448
1844
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1449
|
-
], 14, _hoisted_2$
|
|
1845
|
+
], 14, _hoisted_2$u));
|
|
1450
1846
|
};
|
|
1451
1847
|
}
|
|
1452
1848
|
});
|
|
1453
|
-
const StrandsUiLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1454
|
-
const _hoisted_1$
|
|
1455
|
-
const _hoisted_2$
|
|
1849
|
+
const StrandsUiLink = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-3bf99110"]]);
|
|
1850
|
+
const _hoisted_1$A = { class: "tabs-wrapper" };
|
|
1851
|
+
const _hoisted_2$t = {
|
|
1456
1852
|
key: 0,
|
|
1457
1853
|
class: "tabs-before"
|
|
1458
1854
|
};
|
|
1459
|
-
const _hoisted_3$
|
|
1460
|
-
const _hoisted_4$
|
|
1855
|
+
const _hoisted_3$r = ["aria-selected", "id", "onClick"];
|
|
1856
|
+
const _hoisted_4$p = {
|
|
1461
1857
|
key: 1,
|
|
1462
1858
|
class: "tabs-after"
|
|
1463
1859
|
};
|
|
1464
|
-
const _hoisted_5$
|
|
1465
|
-
const _sfc_main$
|
|
1860
|
+
const _hoisted_5$m = ["aria-labelledby"];
|
|
1861
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
1466
1862
|
__name: "UiTabs",
|
|
1467
1863
|
props: {
|
|
1468
1864
|
modelValue: {},
|
|
@@ -1692,6 +2088,68 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
1692
2088
|
}, 200);
|
|
1693
2089
|
});
|
|
1694
2090
|
};
|
|
2091
|
+
let resizeTimeout = null;
|
|
2092
|
+
const handleResize = () => {
|
|
2093
|
+
const activeIndex = props.tabs.findIndex((tab) => tab.value === props.modelValue);
|
|
2094
|
+
if (activeIndex !== -1 && tabButtons.value && tabButtons.value[activeIndex]) {
|
|
2095
|
+
const wasTransitionsEnabled = enableTransitions.value;
|
|
2096
|
+
enableTransitions.value = false;
|
|
2097
|
+
const newTab = tabButtons.value[activeIndex];
|
|
2098
|
+
const container = newTab.parentElement;
|
|
2099
|
+
if (container) {
|
|
2100
|
+
const newDimensions = calculateUnderlineDimensions(newTab, container);
|
|
2101
|
+
const newTabRect = newTab.getBoundingClientRect();
|
|
2102
|
+
const containerRect = container.getBoundingClientRect();
|
|
2103
|
+
let newTabPos, newTabSize;
|
|
2104
|
+
if (props.orientation === "vertical") {
|
|
2105
|
+
newTabPos = newTabRect.top - containerRect.top;
|
|
2106
|
+
newTabSize = newTabRect.height;
|
|
2107
|
+
underlineStyle.value = {
|
|
2108
|
+
height: `${newDimensions.height}px`,
|
|
2109
|
+
top: `${newDimensions.top}px`,
|
|
2110
|
+
width: `${newDimensions.width}px`,
|
|
2111
|
+
left: `${newDimensions.left}px`,
|
|
2112
|
+
opacity: "1"
|
|
2113
|
+
};
|
|
2114
|
+
backgroundStyle.value = {
|
|
2115
|
+
height: `${newTabSize}px`,
|
|
2116
|
+
top: `${newTabPos}px`,
|
|
2117
|
+
width: `${newTabRect.width}px`,
|
|
2118
|
+
left: "0",
|
|
2119
|
+
opacity: "1"
|
|
2120
|
+
};
|
|
2121
|
+
} else {
|
|
2122
|
+
newTabPos = newTabRect.left - containerRect.left;
|
|
2123
|
+
newTabSize = newTabRect.width;
|
|
2124
|
+
underlineStyle.value = {
|
|
2125
|
+
width: `${newDimensions.width}px`,
|
|
2126
|
+
left: `${newDimensions.left}px`,
|
|
2127
|
+
height: `${newDimensions.height}px`,
|
|
2128
|
+
top: `${newDimensions.top}px`,
|
|
2129
|
+
opacity: "1"
|
|
2130
|
+
};
|
|
2131
|
+
backgroundStyle.value = {
|
|
2132
|
+
width: `${newTabSize}px`,
|
|
2133
|
+
left: `${newTabPos}px`,
|
|
2134
|
+
height: "100%",
|
|
2135
|
+
top: "0",
|
|
2136
|
+
opacity: "1"
|
|
2137
|
+
};
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
currentTabIndex = activeIndex;
|
|
2141
|
+
isAnimating = false;
|
|
2142
|
+
setTimeout(() => {
|
|
2143
|
+
enableTransitions.value = wasTransitionsEnabled;
|
|
2144
|
+
}, 10);
|
|
2145
|
+
}
|
|
2146
|
+
if (resizeTimeout) {
|
|
2147
|
+
clearTimeout(resizeTimeout);
|
|
2148
|
+
}
|
|
2149
|
+
resizeTimeout = setTimeout(() => {
|
|
2150
|
+
resizeTimeout = null;
|
|
2151
|
+
}, 50);
|
|
2152
|
+
};
|
|
1695
2153
|
onMounted(async () => {
|
|
1696
2154
|
await nextTick();
|
|
1697
2155
|
const activeIndex = props.tabs.findIndex((tab) => tab.value === props.modelValue);
|
|
@@ -1701,6 +2159,14 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
1701
2159
|
enableTransitions.value = true;
|
|
1702
2160
|
}, 50);
|
|
1703
2161
|
}
|
|
2162
|
+
window.addEventListener("resize", handleResize);
|
|
2163
|
+
});
|
|
2164
|
+
onUnmounted(() => {
|
|
2165
|
+
window.removeEventListener("resize", handleResize);
|
|
2166
|
+
if (resizeTimeout) {
|
|
2167
|
+
clearTimeout(resizeTimeout);
|
|
2168
|
+
resizeTimeout = null;
|
|
2169
|
+
}
|
|
1704
2170
|
});
|
|
1705
2171
|
const { modelValue } = toRefs(props);
|
|
1706
2172
|
watch(modelValue, async () => {
|
|
@@ -1719,7 +2185,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
1719
2185
|
{ "tabs-container--with-content": hasContentSlot.value }
|
|
1720
2186
|
]])
|
|
1721
2187
|
}, [
|
|
1722
|
-
createElementVNode("div", _hoisted_1$
|
|
2188
|
+
createElementVNode("div", _hoisted_1$A, [
|
|
1723
2189
|
createElementVNode("div", {
|
|
1724
2190
|
class: normalizeClass(["tabs-list", [
|
|
1725
2191
|
`tabs-list--${_ctx.orientation}`,
|
|
@@ -1728,7 +2194,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
1728
2194
|
]]),
|
|
1729
2195
|
style: normalizeStyle(_ctx.sticky ? { position: "sticky", [_ctx.sticky.side]: `${_ctx.sticky.offset}px`, zIndex: 10 } : {})
|
|
1730
2196
|
}, [
|
|
1731
|
-
_ctx.$slots["before"] ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2197
|
+
_ctx.$slots["before"] ? (openBlock(), createElementBlock("div", _hoisted_2$t, [
|
|
1732
2198
|
renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
1733
2199
|
])) : createCommentVNode("", true),
|
|
1734
2200
|
createElementVNode("div", {
|
|
@@ -1752,141 +2218,36 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
1752
2218
|
id: `tab-${tab.value}`,
|
|
1753
2219
|
role: "tab",
|
|
1754
2220
|
onClick: ($event) => handleTabClick(tab.value, index)
|
|
1755
|
-
}, toDisplayString(tab.label), 11, _hoisted_3$
|
|
1756
|
-
}), 128)),
|
|
1757
|
-
createElementVNode("div", {
|
|
1758
|
-
class: normalizeClass(["tab-background", { "no-transition": !enableTransitions.value }]),
|
|
1759
|
-
style: normalizeStyle(backgroundStyle.value)
|
|
1760
|
-
}, null, 6),
|
|
1761
|
-
createElementVNode("div", {
|
|
1762
|
-
class: normalizeClass(["tab-underline", { "no-transition": !enableTransitions.value }]),
|
|
1763
|
-
style: normalizeStyle(underlineStyle.value)
|
|
1764
|
-
}, null, 6)
|
|
1765
|
-
], 2),
|
|
1766
|
-
_ctx.$slots["after"] ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1767
|
-
renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
1768
|
-
])) : createCommentVNode("", true)
|
|
1769
|
-
], 6)
|
|
1770
|
-
]),
|
|
1771
|
-
hasContentSlot.value ? (openBlock(), createElementBlock("div", {
|
|
1772
|
-
key: 0,
|
|
1773
|
-
class: normalizeClass(["tabs-content", `tabs-content--${_ctx.orientation}`]),
|
|
1774
|
-
role: "tabpanel",
|
|
1775
|
-
"aria-labelledby": `tab-${unref(modelValue)}`,
|
|
1776
|
-
id: "tabpanel"
|
|
1777
|
-
}, [
|
|
1778
|
-
renderSlot(_ctx.$slots, "content", { activeTab: activeTab.value }, void 0, true)
|
|
1779
|
-
], 10, _hoisted_5$
|
|
1780
|
-
], 2);
|
|
1781
|
-
};
|
|
1782
|
-
}
|
|
1783
|
-
});
|
|
1784
|
-
const StrandsUiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-fcde7995"]]);
|
|
1785
|
-
const logo = '<svg width="302" height="438" viewBox="0 0 302 438" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M71.5001 96C71.5001 96 132 106 137 61.5C142 17 117.5 3.50005 94.5001 1.50003C71.5001 -0.499996 16.0001 8.5 2.00014 72.5C-6.5 130.5 71.5003 227.5 165 218C258.5 208.5 280.758 148.5 283.5 121C286.242 93.5 277.5 61.5 238.5 61.5C153 61.5 150.501 185 170.5 235C190.5 285 199 279 213 314C227.001 349 217.296 411.458 183 427C129.456 450.65 92 426 78.5 407.5C65 389 68.0003 357 94.5001 344.5C121 332 212.41 393.5 301.5 361" stroke="black"/>\n</svg>\n';
|
|
1786
|
-
const _hoisted_1$A = {
|
|
1787
|
-
key: 0,
|
|
1788
|
-
class: "loader-icon"
|
|
1789
|
-
};
|
|
1790
|
-
const _hoisted_2$t = ["width", "height"];
|
|
1791
|
-
const _hoisted_3$r = ["d"];
|
|
1792
|
-
const _hoisted_4$p = ["stroke-width"];
|
|
1793
|
-
const _hoisted_5$m = ["stroke-width"];
|
|
1794
|
-
const _hoisted_6$l = ["width", "height"];
|
|
1795
|
-
const _hoisted_7$k = {
|
|
1796
|
-
key: 3,
|
|
1797
|
-
class: "loader-text"
|
|
1798
|
-
};
|
|
1799
|
-
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
1800
|
-
__name: "UiLoader",
|
|
1801
|
-
props: {
|
|
1802
|
-
size: { default: 80 },
|
|
1803
|
-
color: { default: "primary" },
|
|
1804
|
-
variant: { default: "spinner" },
|
|
1805
|
-
text: {},
|
|
1806
|
-
centered: { type: Boolean, default: true },
|
|
1807
|
-
weight: { default: 30 },
|
|
1808
|
-
fullWidth: { type: Boolean, default: false }
|
|
1809
|
-
},
|
|
1810
|
-
setup(__props) {
|
|
1811
|
-
const path = logo.replace(/<svg[^>]*>/, "").replace(/<\/svg>/, "").trim();
|
|
1812
|
-
const d = path.match(/d="([^"]*)"/)?.[1] || "";
|
|
1813
|
-
return (_ctx, _cache) => {
|
|
1814
|
-
return openBlock(), createElementBlock("div", {
|
|
1815
|
-
class: normalizeClass(["loader-container", [
|
|
1816
|
-
{ "loader-centered": _ctx.centered },
|
|
1817
|
-
`loader-color-${_ctx.color}`
|
|
1818
|
-
]])
|
|
1819
|
-
}, [
|
|
1820
|
-
_ctx.variant === "spinner" ? (openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
1821
|
-
(openBlock(), createElementBlock("svg", {
|
|
1822
|
-
width: _ctx.size,
|
|
1823
|
-
height: _ctx.size,
|
|
1824
|
-
viewBox: "0 0 500 500"
|
|
1825
|
-
}, [
|
|
1826
|
-
createElementVNode("defs", null, [
|
|
1827
|
-
createElementVNode("path", {
|
|
1828
|
-
id: "logo-path",
|
|
1829
|
-
d: unref(d),
|
|
1830
|
-
transform: "translate(81, 13) scale(1.0)"
|
|
1831
|
-
}, null, 8, _hoisted_3$r)
|
|
1832
|
-
]),
|
|
1833
|
-
createElementVNode("use", {
|
|
1834
|
-
href: "#logo-path",
|
|
1835
|
-
fill: "none",
|
|
1836
|
-
stroke: "var(--loader-semi-color)",
|
|
1837
|
-
"stroke-width": _ctx.weight,
|
|
1838
|
-
"stroke-linecap": "round",
|
|
1839
|
-
"stroke-linejoin": "round"
|
|
1840
|
-
}, null, 8, _hoisted_4$p),
|
|
1841
|
-
createElementVNode("use", {
|
|
1842
|
-
href: "#logo-path",
|
|
1843
|
-
fill: "none",
|
|
1844
|
-
stroke: "var(--loader-solid-color)",
|
|
1845
|
-
"stroke-width": _ctx.weight,
|
|
1846
|
-
"stroke-linecap": "round",
|
|
1847
|
-
"stroke-linejoin": "round",
|
|
1848
|
-
class: "loader-animated-path"
|
|
1849
|
-
}, null, 8, _hoisted_5$m)
|
|
1850
|
-
], 8, _hoisted_2$t))
|
|
1851
|
-
])) : _ctx.variant === "circle" ? (openBlock(), createElementBlock("div", {
|
|
1852
|
-
key: 1,
|
|
1853
|
-
class: "loader-circle",
|
|
1854
|
-
style: normalizeStyle({ width: `${_ctx.size}px`, height: `${_ctx.size}px` })
|
|
1855
|
-
}, [
|
|
1856
|
-
(openBlock(), createElementBlock("svg", {
|
|
1857
|
-
width: _ctx.size,
|
|
1858
|
-
height: _ctx.size,
|
|
1859
|
-
viewBox: "0 0 50 50"
|
|
1860
|
-
}, [..._cache[0] || (_cache[0] = [
|
|
1861
|
-
createElementVNode("circle", {
|
|
1862
|
-
cx: "25",
|
|
1863
|
-
cy: "25",
|
|
1864
|
-
r: "20",
|
|
1865
|
-
fill: "none",
|
|
1866
|
-
stroke: "var(--loader-solid-color)",
|
|
1867
|
-
"stroke-width": "4",
|
|
1868
|
-
"stroke-linecap": "round",
|
|
1869
|
-
class: "loader-circle-path"
|
|
1870
|
-
}, null, -1)
|
|
1871
|
-
])], 8, _hoisted_6$l))
|
|
1872
|
-
], 4)) : _ctx.variant === "bar" ? (openBlock(), createElementBlock("div", {
|
|
1873
|
-
key: 2,
|
|
1874
|
-
class: "loader-bar",
|
|
1875
|
-
style: normalizeStyle({
|
|
1876
|
-
width: _ctx.fullWidth ? "100%" : `${_ctx.size * 1.5}px`,
|
|
1877
|
-
height: `${Math.max(_ctx.size * 0.1, 4)}px`
|
|
1878
|
-
})
|
|
1879
|
-
}, [..._cache[1] || (_cache[1] = [
|
|
1880
|
-
createElementVNode("div", { class: "loader-bar-track" }, [
|
|
1881
|
-
createElementVNode("div", { class: "loader-bar-fill" })
|
|
1882
|
-
], -1)
|
|
1883
|
-
])], 4)) : createCommentVNode("", true),
|
|
1884
|
-
_ctx.text ? (openBlock(), createElementBlock("p", _hoisted_7$k, toDisplayString(_ctx.text), 1)) : createCommentVNode("", true)
|
|
2221
|
+
}, toDisplayString(tab.label), 11, _hoisted_3$r);
|
|
2222
|
+
}), 128)),
|
|
2223
|
+
createElementVNode("div", {
|
|
2224
|
+
class: normalizeClass(["tab-background", { "no-transition": !enableTransitions.value }]),
|
|
2225
|
+
style: normalizeStyle(backgroundStyle.value)
|
|
2226
|
+
}, null, 6),
|
|
2227
|
+
createElementVNode("div", {
|
|
2228
|
+
class: normalizeClass(["tab-underline", { "no-transition": !enableTransitions.value }]),
|
|
2229
|
+
style: normalizeStyle(underlineStyle.value)
|
|
2230
|
+
}, null, 6)
|
|
2231
|
+
], 2),
|
|
2232
|
+
_ctx.$slots["after"] ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
|
|
2233
|
+
renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
2234
|
+
])) : createCommentVNode("", true)
|
|
2235
|
+
], 6)
|
|
2236
|
+
]),
|
|
2237
|
+
hasContentSlot.value ? (openBlock(), createElementBlock("div", {
|
|
2238
|
+
key: 0,
|
|
2239
|
+
class: normalizeClass(["tabs-content", `tabs-content--${_ctx.orientation}`]),
|
|
2240
|
+
role: "tabpanel",
|
|
2241
|
+
"aria-labelledby": `tab-${unref(modelValue)}`,
|
|
2242
|
+
id: "tabpanel"
|
|
2243
|
+
}, [
|
|
2244
|
+
renderSlot(_ctx.$slots, "content", { activeTab: activeTab.value }, void 0, true)
|
|
2245
|
+
], 10, _hoisted_5$m)) : createCommentVNode("", true)
|
|
1885
2246
|
], 2);
|
|
1886
2247
|
};
|
|
1887
2248
|
}
|
|
1888
2249
|
});
|
|
1889
|
-
const
|
|
2250
|
+
const StrandsUiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-95268d49"]]);
|
|
1890
2251
|
const _hoisted_1$z = ["aria-pressed", "aria-labelledby"];
|
|
1891
2252
|
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
1892
2253
|
__name: "UiToggle",
|
|
@@ -3874,37 +4235,75 @@ const _hoisted_20$9 = {
|
|
|
3874
4235
|
};
|
|
3875
4236
|
const _hoisted_21$8 = ["cx", "fill"];
|
|
3876
4237
|
const _hoisted_22$8 = { class: "ui-color-picker-inputs" };
|
|
3877
|
-
const _hoisted_23$7 = {
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
4238
|
+
const _hoisted_23$7 = {
|
|
4239
|
+
key: 0,
|
|
4240
|
+
class: "ui-color-picker-input-row"
|
|
4241
|
+
};
|
|
4242
|
+
const _hoisted_24$6 = { class: "ui-color-picker-input-group" };
|
|
4243
|
+
const _hoisted_25$6 = { class: "ui-color-picker-button-wrapper" };
|
|
4244
|
+
const _hoisted_26$5 = {
|
|
4245
|
+
key: 1,
|
|
4246
|
+
class: "ui-color-picker-input-row"
|
|
4247
|
+
};
|
|
3881
4248
|
const _hoisted_27$5 = { class: "ui-color-picker-input-group" };
|
|
3882
|
-
const _hoisted_28$5 = {
|
|
4249
|
+
const _hoisted_28$5 = { class: "ui-color-picker-input-group" };
|
|
4250
|
+
const _hoisted_29$5 = { class: "ui-color-picker-input-group" };
|
|
4251
|
+
const _hoisted_30$5 = {
|
|
4252
|
+
key: 0,
|
|
4253
|
+
class: "ui-color-picker-input-group"
|
|
4254
|
+
};
|
|
4255
|
+
const _hoisted_31$5 = { class: "ui-color-picker-button-wrapper" };
|
|
4256
|
+
const _hoisted_32$5 = {
|
|
4257
|
+
key: 2,
|
|
4258
|
+
class: "ui-color-picker-input-row"
|
|
4259
|
+
};
|
|
4260
|
+
const _hoisted_33$4 = { class: "ui-color-picker-input-group" };
|
|
4261
|
+
const _hoisted_34$3 = { class: "ui-color-picker-input-group" };
|
|
4262
|
+
const _hoisted_35$3 = { class: "ui-color-picker-input-group" };
|
|
4263
|
+
const _hoisted_36$3 = {
|
|
4264
|
+
key: 0,
|
|
4265
|
+
class: "ui-color-picker-input-group"
|
|
4266
|
+
};
|
|
4267
|
+
const _hoisted_37$2 = { class: "ui-color-picker-button-wrapper" };
|
|
4268
|
+
const _hoisted_38$1 = {
|
|
4269
|
+
key: 3,
|
|
4270
|
+
class: "ui-color-picker-input-row"
|
|
4271
|
+
};
|
|
4272
|
+
const _hoisted_39$1 = { class: "ui-color-picker-input-group" };
|
|
4273
|
+
const _hoisted_40$1 = { class: "ui-color-picker-input-group" };
|
|
4274
|
+
const _hoisted_41$1 = { class: "ui-color-picker-input-group" };
|
|
4275
|
+
const _hoisted_42$1 = {
|
|
3883
4276
|
key: 0,
|
|
3884
4277
|
class: "ui-color-picker-input-group"
|
|
3885
4278
|
};
|
|
3886
|
-
const
|
|
3887
|
-
const
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
const
|
|
3892
|
-
const
|
|
3893
|
-
const
|
|
4279
|
+
const _hoisted_43$1 = { class: "ui-color-picker-button-wrapper" };
|
|
4280
|
+
const _hoisted_44$1 = {
|
|
4281
|
+
key: 1,
|
|
4282
|
+
class: "ui-color-picker-swatches"
|
|
4283
|
+
};
|
|
4284
|
+
const _hoisted_45$1 = { class: "ui-color-picker-swatch-row ui-color-picker-swatch-row--additional" };
|
|
4285
|
+
const _hoisted_46$1 = ["onClick"];
|
|
4286
|
+
const _hoisted_47$1 = { class: "ui-color-picker-swatch-row" };
|
|
4287
|
+
const _hoisted_48$1 = ["onClick"];
|
|
4288
|
+
const _hoisted_49$1 = { class: "ui-color-picker-shades-inner" };
|
|
4289
|
+
const _hoisted_50$1 = { class: "ui-color-picker-swatch-row ui-color-picker-swatch-row--shades" };
|
|
4290
|
+
const _hoisted_51$1 = ["onClick"];
|
|
3894
4291
|
const GLOBAL_PICKER_WIDTH = 200;
|
|
3895
4292
|
const GLOBAL_PICKER_HEIGHT = 150;
|
|
3896
4293
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
3897
4294
|
__name: "UiColorPicker.Picker",
|
|
3898
4295
|
props: {
|
|
4296
|
+
contrastLabel: {},
|
|
3899
4297
|
modelValue: {},
|
|
3900
4298
|
disabled: { type: Boolean },
|
|
3901
4299
|
showAlpha: { type: Boolean },
|
|
4300
|
+
defaultColorFormat: { default: "hex" },
|
|
3902
4301
|
swatches: {},
|
|
3903
4302
|
additionalSwatches: {},
|
|
3904
4303
|
additionalSwatchesLabel: {},
|
|
4304
|
+
showSwatches: { type: Boolean, default: true },
|
|
3905
4305
|
compareColor: {},
|
|
3906
|
-
showContrast: { type: Boolean }
|
|
3907
|
-
contrastLabel: {}
|
|
4306
|
+
showContrast: { type: Boolean }
|
|
3908
4307
|
},
|
|
3909
4308
|
emits: ["update:modelValue", "change"],
|
|
3910
4309
|
setup(__props, { emit: __emit }) {
|
|
@@ -3926,9 +4325,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
3926
4325
|
const saturation = ref(1);
|
|
3927
4326
|
const brightness = ref(1);
|
|
3928
4327
|
const alpha = ref(1);
|
|
3929
|
-
const hexInput = ref(getCurrentAccentColor());
|
|
4328
|
+
const hexInput = ref(props.modelValue || getCurrentAccentColor());
|
|
3930
4329
|
const rgbInputs = ref({ r: 234, g: 0, b: 168 });
|
|
3931
4330
|
const alphaInput = ref(100);
|
|
4331
|
+
const currentColorFormat = ref(props.defaultColorFormat || "hex");
|
|
4332
|
+
const hslInputs = ref({ h: 0, s: 0, l: 0 });
|
|
4333
|
+
const oklchInputs = ref({ l: 0, c: 0, h: 0 });
|
|
3932
4334
|
const isDraggingArea = ref(false);
|
|
3933
4335
|
const isDraggingHue = ref(false);
|
|
3934
4336
|
const isDraggingAlpha = ref(false);
|
|
@@ -4209,6 +4611,111 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
4209
4611
|
const rgbToHex = (r, g, b) => {
|
|
4210
4612
|
return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;
|
|
4211
4613
|
};
|
|
4614
|
+
const rgbToHsl = (r, g, b) => {
|
|
4615
|
+
r /= 255;
|
|
4616
|
+
g /= 255;
|
|
4617
|
+
b /= 255;
|
|
4618
|
+
const max = Math.max(r, g, b);
|
|
4619
|
+
const min = Math.min(r, g, b);
|
|
4620
|
+
const diff = max - min;
|
|
4621
|
+
const sum = max + min;
|
|
4622
|
+
let h2 = 0;
|
|
4623
|
+
let s2 = 0;
|
|
4624
|
+
let l = sum / 2;
|
|
4625
|
+
if (diff !== 0) {
|
|
4626
|
+
s2 = l > 0.5 ? diff / (2 - sum) : diff / sum;
|
|
4627
|
+
switch (max) {
|
|
4628
|
+
case r:
|
|
4629
|
+
h2 = ((g - b) / diff + (g < b ? 6 : 0)) / 6;
|
|
4630
|
+
break;
|
|
4631
|
+
case g:
|
|
4632
|
+
h2 = ((b - r) / diff + 2) / 6;
|
|
4633
|
+
break;
|
|
4634
|
+
case b:
|
|
4635
|
+
h2 = ((r - g) / diff + 4) / 6;
|
|
4636
|
+
break;
|
|
4637
|
+
}
|
|
4638
|
+
}
|
|
4639
|
+
return {
|
|
4640
|
+
h: Math.round(h2 * 360),
|
|
4641
|
+
s: Math.round(s2 * 100),
|
|
4642
|
+
l: Math.round(l * 100)
|
|
4643
|
+
};
|
|
4644
|
+
};
|
|
4645
|
+
const hslToRgb = (h2, s2, l) => {
|
|
4646
|
+
h2 /= 360;
|
|
4647
|
+
s2 /= 100;
|
|
4648
|
+
l /= 100;
|
|
4649
|
+
const hue2rgb = (p2, q2, t) => {
|
|
4650
|
+
if (t < 0) t += 1;
|
|
4651
|
+
if (t > 1) t -= 1;
|
|
4652
|
+
if (t < 1 / 6) return p2 + (q2 - p2) * 6 * t;
|
|
4653
|
+
if (t < 1 / 2) return q2;
|
|
4654
|
+
if (t < 2 / 3) return p2 + (q2 - p2) * (2 / 3 - t) * 6;
|
|
4655
|
+
return p2;
|
|
4656
|
+
};
|
|
4657
|
+
if (s2 === 0) {
|
|
4658
|
+
return { r: Math.round(l * 255), g: Math.round(l * 255), b: Math.round(l * 255) };
|
|
4659
|
+
}
|
|
4660
|
+
const q = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2;
|
|
4661
|
+
const p = 2 * l - q;
|
|
4662
|
+
return {
|
|
4663
|
+
r: Math.round(hue2rgb(p, q, h2 + 1 / 3) * 255),
|
|
4664
|
+
g: Math.round(hue2rgb(p, q, h2) * 255),
|
|
4665
|
+
b: Math.round(hue2rgb(p, q, h2 - 1 / 3) * 255)
|
|
4666
|
+
};
|
|
4667
|
+
};
|
|
4668
|
+
const rgbToOklch = (r, g, b) => {
|
|
4669
|
+
const toLinear = (c) => {
|
|
4670
|
+
c /= 255;
|
|
4671
|
+
return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
4672
|
+
};
|
|
4673
|
+
const rLinear = toLinear(r);
|
|
4674
|
+
const gLinear = toLinear(g);
|
|
4675
|
+
const bLinear = toLinear(b);
|
|
4676
|
+
const l = 0.4122214708 * rLinear + 0.5363325363 * gLinear + 0.0514459929 * bLinear;
|
|
4677
|
+
const m = 0.2119034982 * rLinear + 0.6806995451 * gLinear + 0.1073969566 * bLinear;
|
|
4678
|
+
const s2 = 0.0883024619 * rLinear + 0.2817188376 * gLinear + 0.6299787005 * bLinear;
|
|
4679
|
+
const lCube = Math.sign(l) * Math.pow(Math.abs(l), 1 / 3);
|
|
4680
|
+
const mCube = Math.sign(m) * Math.pow(Math.abs(m), 1 / 3);
|
|
4681
|
+
const sCube = Math.sign(s2) * Math.pow(Math.abs(s2), 1 / 3);
|
|
4682
|
+
const lOk = 0.2104542553 * lCube + 0.793617785 * mCube - 0.0040720468 * sCube;
|
|
4683
|
+
const aOk = 1.9779984951 * lCube - 2.428592205 * mCube + 0.4505937099 * sCube;
|
|
4684
|
+
const bOk = 0.0259040371 * lCube + 0.7827717662 * mCube - 0.808675766 * sCube;
|
|
4685
|
+
const lightness = lOk;
|
|
4686
|
+
const chroma = Math.sqrt(aOk * aOk + bOk * bOk);
|
|
4687
|
+
let hue2 = Math.atan2(bOk, aOk) * 180 / Math.PI;
|
|
4688
|
+
if (hue2 < 0) hue2 += 360;
|
|
4689
|
+
return {
|
|
4690
|
+
l: Math.round(lightness * 100),
|
|
4691
|
+
c: Math.round(chroma * 100),
|
|
4692
|
+
h: Math.round(hue2)
|
|
4693
|
+
};
|
|
4694
|
+
};
|
|
4695
|
+
const oklchToRgb = (l, c, h2) => {
|
|
4696
|
+
l /= 100;
|
|
4697
|
+
c /= 100;
|
|
4698
|
+
h2 = h2 * Math.PI / 180;
|
|
4699
|
+
const aOk = c * Math.cos(h2);
|
|
4700
|
+
const bOk = c * Math.sin(h2);
|
|
4701
|
+
const lCube = l + 0.3963377774 * aOk + 0.2158037573 * bOk;
|
|
4702
|
+
const mCube = l - 0.1055613458 * aOk - 0.0638541728 * bOk;
|
|
4703
|
+
const sCube = l - 0.0894841775 * aOk - 1.291485548 * bOk;
|
|
4704
|
+
const lLinear = lCube * lCube * lCube;
|
|
4705
|
+
const mLinear = mCube * mCube * mCube;
|
|
4706
|
+
const sLinear = sCube * sCube * sCube;
|
|
4707
|
+
const rLinear = 4.0767416621 * lLinear - 3.3077115913 * mLinear + 0.2309699292 * sLinear;
|
|
4708
|
+
const gLinear = -1.2684380046 * lLinear + 2.6097574011 * mLinear - 0.3413193965 * sLinear;
|
|
4709
|
+
const bLinear = -0.0041960863 * lLinear - 0.7034186147 * mLinear + 1.707614701 * sLinear;
|
|
4710
|
+
const fromLinear = (c2) => {
|
|
4711
|
+
return c2 <= 31308e-7 ? c2 * 12.92 : 1.055 * Math.pow(c2, 1 / 2.4) - 0.055;
|
|
4712
|
+
};
|
|
4713
|
+
return {
|
|
4714
|
+
r: Math.max(0, Math.min(255, Math.round(fromLinear(rLinear) * 255))),
|
|
4715
|
+
g: Math.max(0, Math.min(255, Math.round(fromLinear(gLinear) * 255))),
|
|
4716
|
+
b: Math.max(0, Math.min(255, Math.round(fromLinear(bLinear) * 255)))
|
|
4717
|
+
};
|
|
4718
|
+
};
|
|
4212
4719
|
const normalizeColorString = (colorStr) => {
|
|
4213
4720
|
if (!colorStr) return colorStr;
|
|
4214
4721
|
const rgb = hexToRgb(colorStr);
|
|
@@ -4251,7 +4758,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
4251
4758
|
const rgbString = computed(() => `rgb(${currentRgb.value.r}, ${currentRgb.value.g}, ${currentRgb.value.b})`);
|
|
4252
4759
|
const currentColorString = computed(() => {
|
|
4253
4760
|
const { r, g, b } = currentRgb.value;
|
|
4254
|
-
return props.showAlpha && alpha.value <
|
|
4761
|
+
return props.showAlpha && alpha.value < 0.99 ? `rgba(${r}, ${g}, ${b}, ${alpha.value})` : rgbToHex(r, g, b);
|
|
4255
4762
|
});
|
|
4256
4763
|
const updateContrastData = () => {
|
|
4257
4764
|
if (!props.showContrast || !props.compareColor) {
|
|
@@ -5161,6 +5668,34 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5161
5668
|
saturation.value = hsv.s;
|
|
5162
5669
|
brightness.value = hsv.v;
|
|
5163
5670
|
updateHexInput();
|
|
5671
|
+
updateHslInputs();
|
|
5672
|
+
updateOklchInputs();
|
|
5673
|
+
}
|
|
5674
|
+
};
|
|
5675
|
+
const handleHslInput = () => {
|
|
5676
|
+
const { h: h2, s: s2, l } = hslInputs.value;
|
|
5677
|
+
if (h2 >= 0 && h2 <= 360 && s2 >= 0 && s2 <= 100 && l >= 0 && l <= 100) {
|
|
5678
|
+
const rgb = hslToRgb(h2, s2, l);
|
|
5679
|
+
const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
|
|
5680
|
+
hue.value = hsv.h;
|
|
5681
|
+
saturation.value = hsv.s;
|
|
5682
|
+
brightness.value = hsv.v;
|
|
5683
|
+
updateHexInput();
|
|
5684
|
+
updateRgbInputs();
|
|
5685
|
+
updateOklchInputs();
|
|
5686
|
+
}
|
|
5687
|
+
};
|
|
5688
|
+
const handleOklchInput = () => {
|
|
5689
|
+
const { l, c, h: h2 } = oklchInputs.value;
|
|
5690
|
+
if (l >= 0 && l <= 100 && c >= 0 && c <= 100 && h2 >= 0 && h2 <= 360) {
|
|
5691
|
+
const rgb = oklchToRgb(l, c, h2);
|
|
5692
|
+
const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
|
|
5693
|
+
hue.value = hsv.h;
|
|
5694
|
+
saturation.value = hsv.s;
|
|
5695
|
+
brightness.value = hsv.v;
|
|
5696
|
+
updateHexInput();
|
|
5697
|
+
updateRgbInputs();
|
|
5698
|
+
updateHslInputs();
|
|
5164
5699
|
}
|
|
5165
5700
|
};
|
|
5166
5701
|
const handleAlphaInput = () => {
|
|
@@ -5168,6 +5703,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5168
5703
|
alpha.value = value / 100;
|
|
5169
5704
|
alphaInput.value = value;
|
|
5170
5705
|
};
|
|
5706
|
+
const cycleColorFormat = () => {
|
|
5707
|
+
const formats = ["hex", "rgb", "hsl", "oklch"];
|
|
5708
|
+
const currentIndex = formats.indexOf(currentColorFormat.value);
|
|
5709
|
+
const nextIndex = (currentIndex + 1) % formats.length;
|
|
5710
|
+
currentColorFormat.value = formats[nextIndex];
|
|
5711
|
+
};
|
|
5171
5712
|
const updateHexInput = () => {
|
|
5172
5713
|
const { r, g, b } = currentRgb.value;
|
|
5173
5714
|
hexInput.value = rgbToHex(r, g, b);
|
|
@@ -5176,6 +5717,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5176
5717
|
const { r, g, b } = currentRgb.value;
|
|
5177
5718
|
rgbInputs.value = { r, g, b };
|
|
5178
5719
|
};
|
|
5720
|
+
const updateHslInputs = () => {
|
|
5721
|
+
const { r, g, b } = currentRgb.value;
|
|
5722
|
+
const hsl = rgbToHsl(r, g, b);
|
|
5723
|
+
hslInputs.value = hsl;
|
|
5724
|
+
};
|
|
5725
|
+
const updateOklchInputs = () => {
|
|
5726
|
+
const { r, g, b } = currentRgb.value;
|
|
5727
|
+
const oklch = rgbToOklch(r, g, b);
|
|
5728
|
+
oklchInputs.value = oklch;
|
|
5729
|
+
};
|
|
5179
5730
|
const setColorFromSwatch = (swatchColor) => {
|
|
5180
5731
|
if (props.disabled) return;
|
|
5181
5732
|
const rgb = hexToRgb(swatchColor);
|
|
@@ -5193,7 +5744,21 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5193
5744
|
};
|
|
5194
5745
|
const initializeFromProp = () => {
|
|
5195
5746
|
if (!props.modelValue) return;
|
|
5196
|
-
|
|
5747
|
+
let rgb;
|
|
5748
|
+
if (props.modelValue.startsWith("#")) {
|
|
5749
|
+
rgb = hexToRgb(props.modelValue);
|
|
5750
|
+
hexInput.value = props.modelValue;
|
|
5751
|
+
} else {
|
|
5752
|
+
const rgbMatch = props.modelValue.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/);
|
|
5753
|
+
if (rgbMatch) {
|
|
5754
|
+
rgb = {
|
|
5755
|
+
r: parseInt(rgbMatch[1]),
|
|
5756
|
+
g: parseInt(rgbMatch[2]),
|
|
5757
|
+
b: parseInt(rgbMatch[3])
|
|
5758
|
+
};
|
|
5759
|
+
hexInput.value = rgbToHex(rgb.r, rgb.g, rgb.b);
|
|
5760
|
+
}
|
|
5761
|
+
}
|
|
5197
5762
|
if (rgb) {
|
|
5198
5763
|
const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
|
|
5199
5764
|
hue.value = hsv.h;
|
|
@@ -5206,6 +5771,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5206
5771
|
watch([hue, saturation, brightness, alpha], () => {
|
|
5207
5772
|
updateHexInput();
|
|
5208
5773
|
updateRgbInputs();
|
|
5774
|
+
updateHslInputs();
|
|
5775
|
+
updateOklchInputs();
|
|
5209
5776
|
const currentColor = normalizeColorString(currentColorString.value);
|
|
5210
5777
|
if (currentColor === lastEmittedColor) {
|
|
5211
5778
|
return;
|
|
@@ -5278,8 +5845,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5278
5845
|
onMousedown: handleAreaMouseDown,
|
|
5279
5846
|
onTouchstart: handleAreaMouseDown
|
|
5280
5847
|
}, [
|
|
5281
|
-
_cache[
|
|
5282
|
-
_cache[
|
|
5848
|
+
_cache[16] || (_cache[16] = createElementVNode("div", { class: "ui-color-picker-saturation" }, null, -1)),
|
|
5849
|
+
_cache[17] || (_cache[17] = createElementVNode("div", { class: "ui-color-picker-brightness" }, null, -1)),
|
|
5283
5850
|
debouncedCompareColor.value ? (openBlock(), createElementBlock("div", {
|
|
5284
5851
|
key: 0,
|
|
5285
5852
|
class: normalizeClass(["ui-color-picker-contrast-overlay", { "contrast-overlay-visible": contrastEnabled.value }])
|
|
@@ -5298,7 +5865,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5298
5865
|
height: GLOBAL_PICKER_HEIGHT
|
|
5299
5866
|
})
|
|
5300
5867
|
]),
|
|
5301
|
-
_cache[
|
|
5868
|
+
_cache[13] || (_cache[13] = createElementVNode("pattern", {
|
|
5302
5869
|
id: "orangeDotsPattern",
|
|
5303
5870
|
x: "0",
|
|
5304
5871
|
y: "0",
|
|
@@ -5314,7 +5881,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5314
5881
|
opacity: "0.3"
|
|
5315
5882
|
})
|
|
5316
5883
|
], -1)),
|
|
5317
|
-
_cache[
|
|
5884
|
+
_cache[14] || (_cache[14] = createElementVNode("pattern", {
|
|
5318
5885
|
id: "redDotsPattern",
|
|
5319
5886
|
x: "0",
|
|
5320
5887
|
y: "0",
|
|
@@ -5400,7 +5967,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5400
5967
|
top: `${(1 - brightness.value) * 100}%`,
|
|
5401
5968
|
backgroundColor: currentColorString.value
|
|
5402
5969
|
})
|
|
5403
|
-
}, [..._cache[
|
|
5970
|
+
}, [..._cache[15] || (_cache[15] = [
|
|
5404
5971
|
createElementVNode("div", { class: "ui-color-picker-cursor-inner" }, null, -1)
|
|
5405
5972
|
])], 4)
|
|
5406
5973
|
], 36),
|
|
@@ -5428,12 +5995,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5428
5995
|
delay: 300
|
|
5429
5996
|
}, {
|
|
5430
5997
|
default: withCtx(() => [
|
|
5431
|
-
createVNode(unref(
|
|
5998
|
+
createVNode(unref(CompoundUiButton), {
|
|
5432
5999
|
onClick: toggleContrast,
|
|
5433
|
-
icon:
|
|
5434
|
-
squircle:
|
|
6000
|
+
icon: true,
|
|
6001
|
+
squircle: true,
|
|
5435
6002
|
size: "xs",
|
|
5436
|
-
variant: contrastEnabled.value ? "primary" : "
|
|
6003
|
+
variant: contrastEnabled.value ? "primary" : "ghost",
|
|
5437
6004
|
"icon-name": "contrast"
|
|
5438
6005
|
}, null, 8, ["variant"])
|
|
5439
6006
|
]),
|
|
@@ -5446,7 +6013,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5446
6013
|
}, [
|
|
5447
6014
|
contrastData.value ? (openBlock(), createElementBlock("div", _hoisted_11$f, [
|
|
5448
6015
|
createElementVNode("div", _hoisted_12$f, [
|
|
5449
|
-
_cache[
|
|
6016
|
+
_cache[18] || (_cache[18] = createElementVNode("h4", { class: "ui-color-picker-contrast-title" }, "Contrast Check", -1)),
|
|
5450
6017
|
createElementVNode("div", _hoisted_13$f, [
|
|
5451
6018
|
createElementVNode("div", _hoisted_14$f, [
|
|
5452
6019
|
createElementVNode("div", {
|
|
@@ -5467,7 +6034,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5467
6034
|
"ui-color-picker-contrast-level--fail": contrastData.value.normalText === "FAIL"
|
|
5468
6035
|
}])
|
|
5469
6036
|
}, [
|
|
5470
|
-
_cache[
|
|
6037
|
+
_cache[19] || (_cache[19] = createElementVNode("div", { class: "ui-color-picker-contrast-level-indicator" }, [
|
|
5471
6038
|
createElementVNode("div", { class: "ui-color-picker-contrast-level-line ui-color-picker-contrast-level-line--solid" }),
|
|
5472
6039
|
createElementVNode("span", { class: "ui-color-picker-contrast-level-label" }, "Normal Text")
|
|
5473
6040
|
], -1)),
|
|
@@ -5479,7 +6046,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5479
6046
|
"ui-color-picker-contrast-level--fail": contrastData.value.largeText === "FAIL"
|
|
5480
6047
|
}])
|
|
5481
6048
|
}, [
|
|
5482
|
-
_cache[
|
|
6049
|
+
_cache[20] || (_cache[20] = createElementVNode("div", { class: "ui-color-picker-contrast-level-indicator" }, [
|
|
5483
6050
|
createElementVNode("div", { class: "ui-color-picker-contrast-level-line ui-color-picker-contrast-level-line--dashed" }),
|
|
5484
6051
|
createElementVNode("span", { class: "ui-color-picker-contrast-level-label" }, "Large Text")
|
|
5485
6052
|
], -1)),
|
|
@@ -5488,7 +6055,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5488
6055
|
]),
|
|
5489
6056
|
createElementVNode("div", _hoisted_19$a, [
|
|
5490
6057
|
(openBlock(), createElementBlock("svg", _hoisted_20$9, [
|
|
5491
|
-
_cache[
|
|
6058
|
+
_cache[21] || (_cache[21] = createStaticVNode('<defs data-v-3634b582><linearGradient id="contrastGradientDefault" x1="0%" y1="0%" x2="100%" y2="0%" data-v-3634b582><stop offset="0%" stop-color="#ef4444" data-v-3634b582></stop><stop offset="21.4%" stop-color="#ef4444" data-v-3634b582></stop><stop offset="21.4%" stop-color="#f59e0b" data-v-3634b582></stop><stop offset="64.3%" stop-color="#f59e0b" data-v-3634b582></stop><stop offset="64.3%" stop-color="#22c55e" data-v-3634b582></stop><stop offset="100%" stop-color="#22c55e" data-v-3634b582></stop></linearGradient></defs><rect x="0" y="15" width="280" height="10" fill="url(#contrastGradientDefault)" rx="5" data-v-3634b582></rect><line x1="60" y1="10" x2="60" y2="30" stroke="#666" stroke-width="1" opacity="0.5" data-v-3634b582></line><line x1="180" y1="10" x2="180" y2="30" stroke="#666" stroke-width="1" opacity="0.5" data-v-3634b582></line>', 4)),
|
|
5492
6059
|
createElementVNode("circle", {
|
|
5493
6060
|
cx: Math.min(270, Math.max(10, Math.min(contrastData.value.ratio, 14) / 14 * 260 + 10)),
|
|
5494
6061
|
cy: "20",
|
|
@@ -5498,7 +6065,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5498
6065
|
"stroke-width": "2"
|
|
5499
6066
|
}, null, 8, _hoisted_21$8)
|
|
5500
6067
|
])),
|
|
5501
|
-
_cache[
|
|
6068
|
+
_cache[22] || (_cache[22] = createStaticVNode('<div class="ui-color-picker-contrast-labels" data-v-3634b582><span class="ui-color-picker-contrast-label" data-v-3634b582>1:1</span><span class="ui-color-picker-contrast-label" style="left:60px;" data-v-3634b582>3:1</span><span class="ui-color-picker-contrast-label" style="left:180px;" data-v-3634b582>4.5:1</span><span class="ui-color-picker-contrast-label" style="right:0;" data-v-3634b582>14:1+</span></div>', 1))
|
|
5502
6069
|
])
|
|
5503
6070
|
])) : createCommentVNode("", true)
|
|
5504
6071
|
], 2),
|
|
@@ -5510,7 +6077,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5510
6077
|
onMousedown: handleAlphaMouseDown,
|
|
5511
6078
|
onTouchstart: handleAlphaMouseDown
|
|
5512
6079
|
}, [
|
|
5513
|
-
_cache[
|
|
6080
|
+
_cache[23] || (_cache[23] = createElementVNode("div", { class: "ui-color-picker-alpha-bg" }, null, -1)),
|
|
5514
6081
|
createElementVNode("div", {
|
|
5515
6082
|
class: "ui-color-picker-alpha-gradient",
|
|
5516
6083
|
style: normalizeStyle({
|
|
@@ -5523,22 +6090,35 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5523
6090
|
}, null, 4)
|
|
5524
6091
|
], 544)) : createCommentVNode("", true),
|
|
5525
6092
|
createElementVNode("div", _hoisted_22$8, [
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
"
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
6093
|
+
currentColorFormat.value === "hex" ? (openBlock(), createElementBlock("div", _hoisted_23$7, [
|
|
6094
|
+
createElementVNode("div", _hoisted_24$6, [
|
|
6095
|
+
_cache[24] || (_cache[24] = createElementVNode("label", { class: "ui-color-picker-label" }, "Hex", -1)),
|
|
6096
|
+
withDirectives(createElementVNode("input", {
|
|
6097
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hexInput.value = $event),
|
|
6098
|
+
onInput: handleHexInput,
|
|
6099
|
+
onBlur: validateHexInput,
|
|
6100
|
+
class: "ui-color-picker-input",
|
|
6101
|
+
type: "text",
|
|
6102
|
+
maxlength: "7",
|
|
6103
|
+
placeholder: "#000000"
|
|
6104
|
+
}, null, 544), [
|
|
6105
|
+
[vModelText, hexInput.value]
|
|
6106
|
+
])
|
|
6107
|
+
]),
|
|
5540
6108
|
createElementVNode("div", _hoisted_25$6, [
|
|
5541
|
-
|
|
6109
|
+
createVNode(unref(CompoundUiButton), {
|
|
6110
|
+
color: "secondary",
|
|
6111
|
+
size: "xs",
|
|
6112
|
+
icon: "",
|
|
6113
|
+
squircle: "",
|
|
6114
|
+
"icon-name": "chevrons-up-down",
|
|
6115
|
+
onClick: cycleColorFormat,
|
|
6116
|
+
"aria-label": "Switch color format"
|
|
6117
|
+
})
|
|
6118
|
+
])
|
|
6119
|
+
])) : currentColorFormat.value === "rgb" ? (openBlock(), createElementBlock("div", _hoisted_26$5, [
|
|
6120
|
+
createElementVNode("div", _hoisted_27$5, [
|
|
6121
|
+
_cache[25] || (_cache[25] = createElementVNode("label", { class: "ui-color-picker-label" }, "R", -1)),
|
|
5542
6122
|
withDirectives(createElementVNode("input", {
|
|
5543
6123
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => rgbInputs.value.r = $event),
|
|
5544
6124
|
onInput: handleRgbInput,
|
|
@@ -5555,8 +6135,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5555
6135
|
]
|
|
5556
6136
|
])
|
|
5557
6137
|
]),
|
|
5558
|
-
createElementVNode("div",
|
|
5559
|
-
_cache[
|
|
6138
|
+
createElementVNode("div", _hoisted_28$5, [
|
|
6139
|
+
_cache[26] || (_cache[26] = createElementVNode("label", { class: "ui-color-picker-label" }, "G", -1)),
|
|
5560
6140
|
withDirectives(createElementVNode("input", {
|
|
5561
6141
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => rgbInputs.value.g = $event),
|
|
5562
6142
|
onInput: handleRgbInput,
|
|
@@ -5573,8 +6153,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5573
6153
|
]
|
|
5574
6154
|
])
|
|
5575
6155
|
]),
|
|
5576
|
-
createElementVNode("div",
|
|
5577
|
-
_cache[
|
|
6156
|
+
createElementVNode("div", _hoisted_29$5, [
|
|
6157
|
+
_cache[27] || (_cache[27] = createElementVNode("label", { class: "ui-color-picker-label" }, "B", -1)),
|
|
5578
6158
|
withDirectives(createElementVNode("input", {
|
|
5579
6159
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rgbInputs.value.b = $event),
|
|
5580
6160
|
onInput: handleRgbInput,
|
|
@@ -5591,8 +6171,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5591
6171
|
]
|
|
5592
6172
|
])
|
|
5593
6173
|
]),
|
|
5594
|
-
props.showAlpha ? (openBlock(), createElementBlock("div",
|
|
5595
|
-
_cache[
|
|
6174
|
+
props.showAlpha ? (openBlock(), createElementBlock("div", _hoisted_30$5, [
|
|
6175
|
+
_cache[28] || (_cache[28] = createElementVNode("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
5596
6176
|
withDirectives(createElementVNode("input", {
|
|
5597
6177
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => alphaInput.value = $event),
|
|
5598
6178
|
onInput: handleAlphaInput,
|
|
@@ -5608,10 +6188,189 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5608
6188
|
{ number: true }
|
|
5609
6189
|
]
|
|
5610
6190
|
])
|
|
5611
|
-
])) : createCommentVNode("", true)
|
|
5612
|
-
|
|
6191
|
+
])) : createCommentVNode("", true),
|
|
6192
|
+
createElementVNode("div", _hoisted_31$5, [
|
|
6193
|
+
createVNode(unref(CompoundUiButton), {
|
|
6194
|
+
color: "secondary",
|
|
6195
|
+
size: "xs",
|
|
6196
|
+
icon: "",
|
|
6197
|
+
squircle: "",
|
|
6198
|
+
"icon-name": "chevrons-up-down",
|
|
6199
|
+
onClick: cycleColorFormat,
|
|
6200
|
+
"aria-label": "Switch color format"
|
|
6201
|
+
})
|
|
6202
|
+
])
|
|
6203
|
+
])) : currentColorFormat.value === "hsl" ? (openBlock(), createElementBlock("div", _hoisted_32$5, [
|
|
6204
|
+
createElementVNode("div", _hoisted_33$4, [
|
|
6205
|
+
_cache[29] || (_cache[29] = createElementVNode("label", { class: "ui-color-picker-label" }, "H", -1)),
|
|
6206
|
+
withDirectives(createElementVNode("input", {
|
|
6207
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => hslInputs.value.h = $event),
|
|
6208
|
+
onInput: handleHslInput,
|
|
6209
|
+
class: "ui-color-picker-input",
|
|
6210
|
+
type: "number",
|
|
6211
|
+
min: "0",
|
|
6212
|
+
max: "360"
|
|
6213
|
+
}, null, 544), [
|
|
6214
|
+
[
|
|
6215
|
+
vModelText,
|
|
6216
|
+
hslInputs.value.h,
|
|
6217
|
+
void 0,
|
|
6218
|
+
{ number: true }
|
|
6219
|
+
]
|
|
6220
|
+
])
|
|
6221
|
+
]),
|
|
6222
|
+
createElementVNode("div", _hoisted_34$3, [
|
|
6223
|
+
_cache[30] || (_cache[30] = createElementVNode("label", { class: "ui-color-picker-label" }, "S", -1)),
|
|
6224
|
+
withDirectives(createElementVNode("input", {
|
|
6225
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => hslInputs.value.s = $event),
|
|
6226
|
+
onInput: handleHslInput,
|
|
6227
|
+
class: "ui-color-picker-input",
|
|
6228
|
+
type: "number",
|
|
6229
|
+
min: "0",
|
|
6230
|
+
max: "100"
|
|
6231
|
+
}, null, 544), [
|
|
6232
|
+
[
|
|
6233
|
+
vModelText,
|
|
6234
|
+
hslInputs.value.s,
|
|
6235
|
+
void 0,
|
|
6236
|
+
{ number: true }
|
|
6237
|
+
]
|
|
6238
|
+
])
|
|
6239
|
+
]),
|
|
6240
|
+
createElementVNode("div", _hoisted_35$3, [
|
|
6241
|
+
_cache[31] || (_cache[31] = createElementVNode("label", { class: "ui-color-picker-label" }, "L", -1)),
|
|
6242
|
+
withDirectives(createElementVNode("input", {
|
|
6243
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => hslInputs.value.l = $event),
|
|
6244
|
+
onInput: handleHslInput,
|
|
6245
|
+
class: "ui-color-picker-input",
|
|
6246
|
+
type: "number",
|
|
6247
|
+
min: "0",
|
|
6248
|
+
max: "100"
|
|
6249
|
+
}, null, 544), [
|
|
6250
|
+
[
|
|
6251
|
+
vModelText,
|
|
6252
|
+
hslInputs.value.l,
|
|
6253
|
+
void 0,
|
|
6254
|
+
{ number: true }
|
|
6255
|
+
]
|
|
6256
|
+
])
|
|
6257
|
+
]),
|
|
6258
|
+
props.showAlpha ? (openBlock(), createElementBlock("div", _hoisted_36$3, [
|
|
6259
|
+
_cache[32] || (_cache[32] = createElementVNode("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
6260
|
+
withDirectives(createElementVNode("input", {
|
|
6261
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => alphaInput.value = $event),
|
|
6262
|
+
onInput: handleAlphaInput,
|
|
6263
|
+
class: "ui-color-picker-input",
|
|
6264
|
+
type: "number",
|
|
6265
|
+
min: "0",
|
|
6266
|
+
max: "100"
|
|
6267
|
+
}, null, 544), [
|
|
6268
|
+
[
|
|
6269
|
+
vModelText,
|
|
6270
|
+
alphaInput.value,
|
|
6271
|
+
void 0,
|
|
6272
|
+
{ number: true }
|
|
6273
|
+
]
|
|
6274
|
+
])
|
|
6275
|
+
])) : createCommentVNode("", true),
|
|
6276
|
+
createElementVNode("div", _hoisted_37$2, [
|
|
6277
|
+
createVNode(unref(CompoundUiButton), {
|
|
6278
|
+
color: "secondary",
|
|
6279
|
+
size: "xs",
|
|
6280
|
+
icon: "",
|
|
6281
|
+
squircle: "",
|
|
6282
|
+
"icon-name": "chevrons-up-down",
|
|
6283
|
+
onClick: cycleColorFormat,
|
|
6284
|
+
"aria-label": "Switch color format"
|
|
6285
|
+
})
|
|
6286
|
+
])
|
|
6287
|
+
])) : currentColorFormat.value === "oklch" ? (openBlock(), createElementBlock("div", _hoisted_38$1, [
|
|
6288
|
+
createElementVNode("div", _hoisted_39$1, [
|
|
6289
|
+
_cache[33] || (_cache[33] = createElementVNode("label", { class: "ui-color-picker-label" }, "L", -1)),
|
|
6290
|
+
withDirectives(createElementVNode("input", {
|
|
6291
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => oklchInputs.value.l = $event),
|
|
6292
|
+
onInput: handleOklchInput,
|
|
6293
|
+
class: "ui-color-picker-input",
|
|
6294
|
+
type: "number",
|
|
6295
|
+
min: "0",
|
|
6296
|
+
max: "100"
|
|
6297
|
+
}, null, 544), [
|
|
6298
|
+
[
|
|
6299
|
+
vModelText,
|
|
6300
|
+
oklchInputs.value.l,
|
|
6301
|
+
void 0,
|
|
6302
|
+
{ number: true }
|
|
6303
|
+
]
|
|
6304
|
+
])
|
|
6305
|
+
]),
|
|
6306
|
+
createElementVNode("div", _hoisted_40$1, [
|
|
6307
|
+
_cache[34] || (_cache[34] = createElementVNode("label", { class: "ui-color-picker-label" }, "C", -1)),
|
|
6308
|
+
withDirectives(createElementVNode("input", {
|
|
6309
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => oklchInputs.value.c = $event),
|
|
6310
|
+
onInput: handleOklchInput,
|
|
6311
|
+
class: "ui-color-picker-input",
|
|
6312
|
+
type: "number",
|
|
6313
|
+
min: "0",
|
|
6314
|
+
max: "100"
|
|
6315
|
+
}, null, 544), [
|
|
6316
|
+
[
|
|
6317
|
+
vModelText,
|
|
6318
|
+
oklchInputs.value.c,
|
|
6319
|
+
void 0,
|
|
6320
|
+
{ number: true }
|
|
6321
|
+
]
|
|
6322
|
+
])
|
|
6323
|
+
]),
|
|
6324
|
+
createElementVNode("div", _hoisted_41$1, [
|
|
6325
|
+
_cache[35] || (_cache[35] = createElementVNode("label", { class: "ui-color-picker-label" }, "H", -1)),
|
|
6326
|
+
withDirectives(createElementVNode("input", {
|
|
6327
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => oklchInputs.value.h = $event),
|
|
6328
|
+
onInput: handleOklchInput,
|
|
6329
|
+
class: "ui-color-picker-input",
|
|
6330
|
+
type: "number",
|
|
6331
|
+
min: "0",
|
|
6332
|
+
max: "360"
|
|
6333
|
+
}, null, 544), [
|
|
6334
|
+
[
|
|
6335
|
+
vModelText,
|
|
6336
|
+
oklchInputs.value.h,
|
|
6337
|
+
void 0,
|
|
6338
|
+
{ number: true }
|
|
6339
|
+
]
|
|
6340
|
+
])
|
|
6341
|
+
]),
|
|
6342
|
+
props.showAlpha ? (openBlock(), createElementBlock("div", _hoisted_42$1, [
|
|
6343
|
+
_cache[36] || (_cache[36] = createElementVNode("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
6344
|
+
withDirectives(createElementVNode("input", {
|
|
6345
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => alphaInput.value = $event),
|
|
6346
|
+
onInput: handleAlphaInput,
|
|
6347
|
+
class: "ui-color-picker-input",
|
|
6348
|
+
type: "number",
|
|
6349
|
+
min: "0",
|
|
6350
|
+
max: "100"
|
|
6351
|
+
}, null, 544), [
|
|
6352
|
+
[
|
|
6353
|
+
vModelText,
|
|
6354
|
+
alphaInput.value,
|
|
6355
|
+
void 0,
|
|
6356
|
+
{ number: true }
|
|
6357
|
+
]
|
|
6358
|
+
])
|
|
6359
|
+
])) : createCommentVNode("", true),
|
|
6360
|
+
createElementVNode("div", _hoisted_43$1, [
|
|
6361
|
+
createVNode(unref(CompoundUiButton), {
|
|
6362
|
+
color: "secondary",
|
|
6363
|
+
size: "xs",
|
|
6364
|
+
icon: "",
|
|
6365
|
+
squircle: "",
|
|
6366
|
+
"icon-name": "chevrons-up-down",
|
|
6367
|
+
onClick: cycleColorFormat,
|
|
6368
|
+
"aria-label": "Switch color format"
|
|
6369
|
+
})
|
|
6370
|
+
])
|
|
6371
|
+
])) : createCommentVNode("", true)
|
|
5613
6372
|
]),
|
|
5614
|
-
|
|
6373
|
+
props.showSwatches ? (openBlock(), createElementBlock("div", _hoisted_44$1, [
|
|
5615
6374
|
additionalSwatches.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5616
6375
|
createVNode(unref(UiDivider), {
|
|
5617
6376
|
text: _ctx.additionalSwatchesLabel || "Custom Colors",
|
|
@@ -5619,7 +6378,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5619
6378
|
color: "#d1d5db",
|
|
5620
6379
|
margin: 12
|
|
5621
6380
|
}, null, 8, ["text"]),
|
|
5622
|
-
createElementVNode("div",
|
|
6381
|
+
createElementVNode("div", _hoisted_45$1, [
|
|
5623
6382
|
(openBlock(true), createElementBlock(Fragment, null, renderList(additionalSwatches.value, (swatch) => {
|
|
5624
6383
|
return openBlock(), createBlock(unref(UiTooltip), {
|
|
5625
6384
|
key: swatch,
|
|
@@ -5632,7 +6391,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5632
6391
|
class: normalizeClass(["ui-color-picker-swatch", { "ui-color-picker-swatch--active": isSwatchActive(swatch) }]),
|
|
5633
6392
|
style: normalizeStyle(getSwatchStyle(swatch)),
|
|
5634
6393
|
onClick: ($event) => setColorFromSwatch(swatch)
|
|
5635
|
-
}, null, 14,
|
|
6394
|
+
}, null, 14, _hoisted_46$1)
|
|
5636
6395
|
]),
|
|
5637
6396
|
_: 2
|
|
5638
6397
|
}, 1032, ["content"]);
|
|
@@ -5643,7 +6402,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5643
6402
|
color: "#d1d5db",
|
|
5644
6403
|
margin: 8
|
|
5645
6404
|
}),
|
|
5646
|
-
createElementVNode("div",
|
|
6405
|
+
createElementVNode("div", _hoisted_47$1, [
|
|
5647
6406
|
(openBlock(true), createElementBlock(Fragment, null, renderList(mainSwatches.value, (swatch) => {
|
|
5648
6407
|
return openBlock(), createBlock(unref(UiTooltip), {
|
|
5649
6408
|
key: swatch,
|
|
@@ -5656,7 +6415,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5656
6415
|
class: normalizeClass(["ui-color-picker-swatch", { "ui-color-picker-swatch--active": isSwatchActive(swatch) }]),
|
|
5657
6416
|
style: normalizeStyle(getSwatchStyle(swatch)),
|
|
5658
6417
|
onClick: ($event) => setColorFromSwatch(swatch)
|
|
5659
|
-
}, null, 14,
|
|
6418
|
+
}, null, 14, _hoisted_48$1)
|
|
5660
6419
|
]),
|
|
5661
6420
|
_: 2
|
|
5662
6421
|
}, 1032, ["content"]);
|
|
@@ -5665,14 +6424,14 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5665
6424
|
createElementVNode("div", {
|
|
5666
6425
|
class: normalizeClass(["ui-color-picker-shades-container", { "ui-color-picker-shades-container--expanded": shouldShowShades.value }])
|
|
5667
6426
|
}, [
|
|
5668
|
-
createElementVNode("div",
|
|
6427
|
+
createElementVNode("div", _hoisted_49$1, [
|
|
5669
6428
|
createVNode(unref(UiDivider), {
|
|
5670
6429
|
text: `${selectedSwatchLabel.value} Shades`,
|
|
5671
6430
|
"text-position": "left",
|
|
5672
6431
|
color: "#d1d5db",
|
|
5673
6432
|
margin: 8
|
|
5674
6433
|
}, null, 8, ["text"]),
|
|
5675
|
-
createElementVNode("div",
|
|
6434
|
+
createElementVNode("div", _hoisted_50$1, [
|
|
5676
6435
|
(openBlock(true), createElementBlock(Fragment, null, renderList(shadeSwatches.value, (shade) => {
|
|
5677
6436
|
return openBlock(), createBlock(unref(UiTooltip), {
|
|
5678
6437
|
key: shade,
|
|
@@ -5685,7 +6444,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5685
6444
|
class: normalizeClass(["ui-color-picker-swatch ui-color-picker-swatch--shade", { "ui-color-picker-swatch--active": isSwatchActive(shade) }]),
|
|
5686
6445
|
style: normalizeStyle(getSwatchStyle(shade)),
|
|
5687
6446
|
onClick: ($event) => setColorFromSwatch(shade)
|
|
5688
|
-
}, null, 14,
|
|
6447
|
+
}, null, 14, _hoisted_51$1)
|
|
5689
6448
|
]),
|
|
5690
6449
|
_: 2
|
|
5691
6450
|
}, 1032, ["content"]);
|
|
@@ -5693,12 +6452,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5693
6452
|
])
|
|
5694
6453
|
])
|
|
5695
6454
|
], 2)
|
|
5696
|
-
])
|
|
6455
|
+
])) : createCommentVNode("", true)
|
|
5697
6456
|
]);
|
|
5698
6457
|
};
|
|
5699
6458
|
}
|
|
5700
6459
|
});
|
|
5701
|
-
const UiColorPickerPicker = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
6460
|
+
const UiColorPickerPicker = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-3634b582"]]);
|
|
5702
6461
|
const _hoisted_1$u = { class: "ui-color-picker-button-container" };
|
|
5703
6462
|
const _hoisted_2$o = { class: "ui-color-picker-button-preview" };
|
|
5704
6463
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
@@ -5707,9 +6466,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5707
6466
|
modelValue: {},
|
|
5708
6467
|
disabled: { type: Boolean, default: false },
|
|
5709
6468
|
showAlpha: { type: Boolean, default: false },
|
|
5710
|
-
|
|
6469
|
+
defaultColorFormat: { default: "hex" },
|
|
6470
|
+
swatches: {},
|
|
6471
|
+
additionalSwatches: {},
|
|
6472
|
+
additionalSwatchesLabel: {},
|
|
6473
|
+
showSwatches: { type: Boolean, default: true },
|
|
5711
6474
|
compareColor: {},
|
|
5712
|
-
|
|
6475
|
+
showContrast: { type: Boolean, default: false }
|
|
5713
6476
|
},
|
|
5714
6477
|
emits: ["update:modelValue"],
|
|
5715
6478
|
setup(__props, { emit: __emit }) {
|
|
@@ -5747,11 +6510,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5747
6510
|
const updatePopoverPosition = () => {
|
|
5748
6511
|
if (!buttonRef.value?.$el || !popoverRef.value) return;
|
|
5749
6512
|
const button = buttonRef.value.$el;
|
|
6513
|
+
const popover = popoverRef.value;
|
|
5750
6514
|
const buttonRect = button.getBoundingClientRect();
|
|
5751
6515
|
const viewportWidth = window.innerWidth;
|
|
5752
6516
|
const viewportHeight = window.innerHeight;
|
|
5753
|
-
const
|
|
5754
|
-
const
|
|
6517
|
+
const popoverRect = popover.getBoundingClientRect();
|
|
6518
|
+
const popoverWidth = popoverRect.width || 312;
|
|
6519
|
+
const popoverHeight = popoverRect.height || 450;
|
|
5755
6520
|
let top = buttonRect.bottom + 8;
|
|
5756
6521
|
let left = buttonRect.left;
|
|
5757
6522
|
if (left + popoverWidth > viewportWidth - 16) {
|
|
@@ -5824,7 +6589,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5824
6589
|
ref_key: "buttonRef",
|
|
5825
6590
|
ref: buttonRef,
|
|
5826
6591
|
disabled: props.disabled,
|
|
5827
|
-
|
|
6592
|
+
color: "secondary",
|
|
5828
6593
|
"trailing-icon": "chevron-down",
|
|
5829
6594
|
onClick: togglePopover
|
|
5830
6595
|
}, {
|
|
@@ -5849,25 +6614,19 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5849
6614
|
class: "ui-color-picker-popover",
|
|
5850
6615
|
style: normalizeStyle(popoverStyle.value)
|
|
5851
6616
|
}, [
|
|
5852
|
-
createVNode(UiColorPickerPicker, {
|
|
6617
|
+
createVNode(UiColorPickerPicker, mergeProps({
|
|
5853
6618
|
modelValue: internalValue.value,
|
|
5854
|
-
"onUpdate:modelValue": [
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
"show-alpha": props.showAlpha,
|
|
5859
|
-
"show-contrast": props.showContrast,
|
|
5860
|
-
"compare-color": props.compareColor,
|
|
5861
|
-
disabled: props.disabled,
|
|
5862
|
-
swatches: props.swatches
|
|
5863
|
-
}, null, 8, ["modelValue", "show-alpha", "show-contrast", "compare-color", "disabled", "swatches"])
|
|
6619
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event)
|
|
6620
|
+
}, props, {
|
|
6621
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
6622
|
+
}), null, 16, ["modelValue"])
|
|
5864
6623
|
], 4)) : createCommentVNode("", true)
|
|
5865
6624
|
]))
|
|
5866
6625
|
]);
|
|
5867
6626
|
};
|
|
5868
6627
|
}
|
|
5869
6628
|
});
|
|
5870
|
-
const UiColorPickerButton = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
6629
|
+
const UiColorPickerButton = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-5d8fef82"]]);
|
|
5871
6630
|
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
5872
6631
|
__name: "UiColorPicker",
|
|
5873
6632
|
props: {
|
|
@@ -5877,7 +6636,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
5877
6636
|
swatches: {},
|
|
5878
6637
|
variant: { default: "default" },
|
|
5879
6638
|
compareColor: {},
|
|
5880
|
-
showContrast: { type: Boolean, default: false }
|
|
6639
|
+
showContrast: { type: Boolean, default: false },
|
|
6640
|
+
defaultColorFormat: { default: "hex" },
|
|
6641
|
+
additionalSwatches: {},
|
|
6642
|
+
additionalSwatchesLabel: {},
|
|
6643
|
+
showSwatches: { type: Boolean, default: true },
|
|
6644
|
+
contrastLabel: {}
|
|
5881
6645
|
},
|
|
5882
6646
|
emits: ["update:modelValue", "change"],
|
|
5883
6647
|
setup(__props, { emit: __emit }) {
|
|
@@ -5905,25 +6669,15 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
5905
6669
|
}
|
|
5906
6670
|
});
|
|
5907
6671
|
return (_ctx, _cache) => {
|
|
5908
|
-
return props.variant === "button" ? (openBlock(), createBlock(UiColorPickerButton, {
|
|
6672
|
+
return props.variant === "button" ? (openBlock(), createBlock(UiColorPickerButton, mergeProps({
|
|
5909
6673
|
key: 0,
|
|
5910
6674
|
modelValue: internalValue.value,
|
|
5911
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event)
|
|
5912
|
-
|
|
5913
|
-
"show-alpha": props.showAlpha,
|
|
5914
|
-
"show-contrast": props.showContrast,
|
|
5915
|
-
"compare-color": props.compareColor,
|
|
5916
|
-
swatches: props.swatches
|
|
5917
|
-
}, null, 8, ["modelValue", "disabled", "show-alpha", "show-contrast", "compare-color", "swatches"])) : (openBlock(), createBlock(UiColorPickerPicker, {
|
|
6675
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event)
|
|
6676
|
+
}, props), null, 16, ["modelValue"])) : (openBlock(), createBlock(UiColorPickerPicker, mergeProps({
|
|
5918
6677
|
key: 1,
|
|
5919
6678
|
modelValue: internalValue.value,
|
|
5920
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => internalValue.value = $event)
|
|
5921
|
-
|
|
5922
|
-
"show-alpha": props.showAlpha,
|
|
5923
|
-
"show-contrast": props.showContrast,
|
|
5924
|
-
"compare-color": props.compareColor,
|
|
5925
|
-
swatches: props.swatches
|
|
5926
|
-
}, null, 8, ["modelValue", "disabled", "show-alpha", "show-contrast", "compare-color", "swatches"]));
|
|
6679
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => internalValue.value = $event)
|
|
6680
|
+
}, props), null, 16, ["modelValue"]));
|
|
5927
6681
|
};
|
|
5928
6682
|
}
|
|
5929
6683
|
});
|
|
@@ -7024,19 +7778,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7024
7778
|
createElementVNode("div", _hoisted_2$l, [
|
|
7025
7779
|
_ctx.variant === "button" ? (openBlock(), createBlock(StrandsUiButton, {
|
|
7026
7780
|
key: 0,
|
|
7027
|
-
icon:
|
|
7028
|
-
squircle:
|
|
7029
|
-
|
|
7781
|
+
icon: true,
|
|
7782
|
+
squircle: true,
|
|
7783
|
+
"icon-name": currentIcon.value,
|
|
7030
7784
|
variant: "ghost",
|
|
7031
7785
|
size: _ctx.size,
|
|
7032
7786
|
disabled: isDisabled.value,
|
|
7033
7787
|
onClick: _cache[0] || (_cache[0] = ($event) => isDisabled.value ? null : toggleTheme),
|
|
7034
7788
|
title: isDisabled.value ? "Theme is locked by app settings" : `Switch to ${nextThemeLabel.value.toLowerCase()} theme`,
|
|
7035
7789
|
class: normalizeClass(["ui-theme-toggle-button", { "ui-theme-toggle--disabled": isDisabled.value }])
|
|
7036
|
-
}, null, 8, ["
|
|
7790
|
+
}, null, 8, ["icon-name", "size", "disabled", "title", "class"])) : _ctx.variant === "dropdown" ? (openBlock(), createElementBlock("div", _hoisted_3$k, [
|
|
7037
7791
|
createVNode(StrandsUiButton, {
|
|
7038
|
-
squircle:
|
|
7039
|
-
|
|
7792
|
+
squircle: true,
|
|
7793
|
+
"leading-icon": currentIcon.value,
|
|
7040
7794
|
"trailing-icon": showDropdown.value ? "chevron-up" : "chevron-down",
|
|
7041
7795
|
variant: "ghost",
|
|
7042
7796
|
size: _ctx.size,
|
|
@@ -7049,7 +7803,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7049
7803
|
createTextVNode(toDisplayString(unref(themeLabel)) + toDisplayString(isDisabled.value ? " (Locked)" : ""), 1)
|
|
7050
7804
|
]),
|
|
7051
7805
|
_: 1
|
|
7052
|
-
}, 8, ["
|
|
7806
|
+
}, 8, ["leading-icon", "trailing-icon", "size", "disabled", "class", "title"]),
|
|
7053
7807
|
showDropdown.value ? (openBlock(), createElementBlock("div", {
|
|
7054
7808
|
key: 0,
|
|
7055
7809
|
class: "ui-theme-toggle-menu",
|
|
@@ -7079,8 +7833,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7079
7833
|
return openBlock(), createBlock(StrandsUiButton, {
|
|
7080
7834
|
key: option.value,
|
|
7081
7835
|
variant: unref(currentTheme2) === option.value ? "primary" : "ghost",
|
|
7082
|
-
icon:
|
|
7083
|
-
squircle:
|
|
7836
|
+
icon: true,
|
|
7837
|
+
squircle: true,
|
|
7838
|
+
"icon-name": option.icon,
|
|
7084
7839
|
size: _ctx.size,
|
|
7085
7840
|
class: normalizeClass([
|
|
7086
7841
|
"ui-theme-toggle-segment",
|
|
@@ -7090,12 +7845,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7090
7845
|
"aria-label": `${option.label} theme`,
|
|
7091
7846
|
onClick: ($event) => unref(setTheme)(option.value),
|
|
7092
7847
|
title: `Switch to ${option.label.toLowerCase()} theme`
|
|
7093
|
-
},
|
|
7094
|
-
default: withCtx(() => [
|
|
7095
|
-
(openBlock(), createBlock(resolveDynamicComponent(getIconComponent(option.icon))))
|
|
7096
|
-
]),
|
|
7097
|
-
_: 2
|
|
7098
|
-
}, 1032, ["variant", "size", "class", "aria-pressed", "aria-label", "onClick", "title"]);
|
|
7848
|
+
}, null, 8, ["variant", "icon-name", "size", "class", "aria-pressed", "aria-label", "onClick", "title"]);
|
|
7099
7849
|
}), 128))
|
|
7100
7850
|
])) : createCommentVNode("", true)
|
|
7101
7851
|
])
|
|
@@ -7103,7 +7853,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7103
7853
|
};
|
|
7104
7854
|
}
|
|
7105
7855
|
});
|
|
7106
|
-
const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
7856
|
+
const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-8758f364"]]);
|
|
7107
7857
|
const slotHasContent = (slotName, slots) => {
|
|
7108
7858
|
const slot = slots[slotName];
|
|
7109
7859
|
if (!slot) return false;
|
|
@@ -7824,7 +8574,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7824
8574
|
])]),
|
|
7825
8575
|
footer: withCtx(() => [
|
|
7826
8576
|
createElementVNode("div", _hoisted_36$2, [
|
|
7827
|
-
createVNode(unref(
|
|
8577
|
+
createVNode(unref(CompoundUiButton), {
|
|
7828
8578
|
variant: "secondary",
|
|
7829
8579
|
onClick: closeModal,
|
|
7830
8580
|
disabled: loading2.value
|
|
@@ -7834,7 +8584,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7834
8584
|
])]),
|
|
7835
8585
|
_: 1
|
|
7836
8586
|
}, 8, ["disabled"]),
|
|
7837
|
-
selectedMethod.value && selectedMethod.value.device_type !== "hardware" && selectedMethod.value.device_type !== "passkey" && (selectedMethod.value.device_type !== "email" || emailCodeSent.value) || (selectedMethod.value?.device_type === "hardware" || selectedMethod.value?.device_type === "passkey") && showBackupCodeInput.value ? (openBlock(), createBlock(unref(
|
|
8587
|
+
selectedMethod.value && selectedMethod.value.device_type !== "hardware" && selectedMethod.value.device_type !== "passkey" && (selectedMethod.value.device_type !== "email" || emailCodeSent.value) || (selectedMethod.value?.device_type === "hardware" || selectedMethod.value?.device_type === "passkey") && showBackupCodeInput.value ? (openBlock(), createBlock(unref(CompoundUiButton), {
|
|
7838
8588
|
key: 0,
|
|
7839
8589
|
variant: "primary",
|
|
7840
8590
|
onClick: _cache[5] || (_cache[5] = ($event) => showBackupCodeInput.value ? verifyBackupCode() : verify()),
|
|
@@ -7894,7 +8644,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7894
8644
|
])) : createCommentVNode("", true),
|
|
7895
8645
|
selectedMethod.value?.device_type === "email" && !emailCodeSent.value ? (openBlock(), createElementBlock("div", _hoisted_17$a, [
|
|
7896
8646
|
_cache[10] || (_cache[10] = createElementVNode("p", { class: "mfa-email-request-text" }, "Click below to receive your verification code", -1)),
|
|
7897
|
-
createVNode(unref(
|
|
8647
|
+
createVNode(unref(CompoundUiButton), {
|
|
7898
8648
|
variant: "primary",
|
|
7899
8649
|
onClick: sendEmailCode,
|
|
7900
8650
|
disabled: loading2.value,
|
|
@@ -7921,7 +8671,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7921
8671
|
])
|
|
7922
8672
|
])
|
|
7923
8673
|
]),
|
|
7924
|
-
createVNode(unref(
|
|
8674
|
+
createVNode(unref(CompoundUiButton), {
|
|
7925
8675
|
variant: "primary",
|
|
7926
8676
|
onClick: authenticateHardwareKey,
|
|
7927
8677
|
disabled: loading2.value,
|
|
@@ -7933,7 +8683,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7933
8683
|
_: 1
|
|
7934
8684
|
}, 8, ["disabled", "loading"]),
|
|
7935
8685
|
createElementVNode("div", _hoisted_25$4, [
|
|
7936
|
-
createVNode(unref(
|
|
8686
|
+
createVNode(unref(CompoundUiButton), {
|
|
7937
8687
|
variant: "ghost",
|
|
7938
8688
|
size: "sm",
|
|
7939
8689
|
onClick: _cache[0] || (_cache[0] = ($event) => showBackupCodeInput.value = !showBackupCodeInput.value),
|
|
@@ -8034,7 +8784,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8034
8784
|
createElementVNode("span", _hoisted_31$4, '"' + toDisplayString(selectedMethod.value.device_name) + '"', 1)
|
|
8035
8785
|
])) : createCommentVNode("", true),
|
|
8036
8786
|
selectedMethod.value.device_type === "email" ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
|
|
8037
|
-
createVNode(unref(
|
|
8787
|
+
createVNode(unref(CompoundUiButton), {
|
|
8038
8788
|
variant: "ghost",
|
|
8039
8789
|
size: "sm",
|
|
8040
8790
|
onClick: sendEmailCode,
|
|
@@ -8048,7 +8798,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8048
8798
|
}, 8, ["disabled"])
|
|
8049
8799
|
])) : createCommentVNode("", true),
|
|
8050
8800
|
createElementVNode("div", _hoisted_33$3, [
|
|
8051
|
-
createVNode(unref(
|
|
8801
|
+
createVNode(unref(CompoundUiButton), {
|
|
8052
8802
|
variant: "ghost",
|
|
8053
8803
|
size: "sm",
|
|
8054
8804
|
onClick: _cache[3] || (_cache[3] = ($event) => showBackupCodeInput.value = !showBackupCodeInput.value),
|
|
@@ -8743,7 +9493,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
8743
9493
|
default: withCtx(() => [
|
|
8744
9494
|
!isPasswordReset.value && displayProviders.value?.length ? (openBlock(), createElementBlock("div", _hoisted_9$c, [
|
|
8745
9495
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayProviders.value, (provider) => {
|
|
8746
|
-
return openBlock(), createBlock(unref(
|
|
9496
|
+
return openBlock(), createBlock(unref(CompoundUiButton), {
|
|
8747
9497
|
key: provider.id,
|
|
8748
9498
|
variant: "outline",
|
|
8749
9499
|
"full-width": "",
|
|
@@ -8864,7 +9614,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
8864
9614
|
_: 1
|
|
8865
9615
|
})
|
|
8866
9616
|
]),
|
|
8867
|
-
createVNode(unref(
|
|
9617
|
+
createVNode(unref(CompoundUiButton), {
|
|
8868
9618
|
type: "submit",
|
|
8869
9619
|
variant: "primary",
|
|
8870
9620
|
"full-width": "",
|
|
@@ -9159,7 +9909,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
9159
9909
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(enabledProviders), (provider, __, ___, _cached) => {
|
|
9160
9910
|
const _memo = [provider.id, provider.name, provider.displayName, unref(oauthLoading)];
|
|
9161
9911
|
if (_cached && _cached.key === provider.id && isMemoSame(_cached, _memo)) return _cached;
|
|
9162
|
-
const _item = (openBlock(), createBlock(unref(
|
|
9912
|
+
const _item = (openBlock(), createBlock(unref(CompoundUiButton), {
|
|
9163
9913
|
key: provider.id,
|
|
9164
9914
|
variant: "outline",
|
|
9165
9915
|
"full-width": "",
|
|
@@ -9247,7 +9997,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
9247
9997
|
])
|
|
9248
9998
|
])
|
|
9249
9999
|
]),
|
|
9250
|
-
createVNode(unref(
|
|
10000
|
+
createVNode(unref(CompoundUiButton), {
|
|
9251
10001
|
type: "submit",
|
|
9252
10002
|
variant: "primary",
|
|
9253
10003
|
"full-width": "",
|
|
@@ -9507,7 +10257,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9507
10257
|
createElementVNode("strong", null, toDisplayString(successEmail.value), 1)
|
|
9508
10258
|
])) : createCommentVNode("", true),
|
|
9509
10259
|
_cache[5] || (_cache[5] = createElementVNode("p", { class: "signup-success-instructions" }, " Click the link in your email to complete your account setup. The link will expire in 24 hours. ", -1)),
|
|
9510
|
-
createVNode(unref(
|
|
10260
|
+
createVNode(unref(CompoundUiButton), {
|
|
9511
10261
|
variant: "outline",
|
|
9512
10262
|
"full-width": "",
|
|
9513
10263
|
onClick: resetToForm,
|
|
@@ -9536,7 +10286,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9536
10286
|
], -1)),
|
|
9537
10287
|
unref(enabledProviders)?.length ? (openBlock(), createElementBlock("div", _hoisted_13$a, [
|
|
9538
10288
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(enabledProviders), (provider) => {
|
|
9539
|
-
return openBlock(), createBlock(unref(
|
|
10289
|
+
return openBlock(), createBlock(unref(CompoundUiButton), {
|
|
9540
10290
|
key: provider.id,
|
|
9541
10291
|
variant: "outline",
|
|
9542
10292
|
"full-width": "",
|
|
@@ -9614,7 +10364,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9614
10364
|
])
|
|
9615
10365
|
])
|
|
9616
10366
|
]),
|
|
9617
|
-
createVNode(unref(
|
|
10367
|
+
createVNode(unref(CompoundUiButton), {
|
|
9618
10368
|
type: "submit",
|
|
9619
10369
|
variant: "primary",
|
|
9620
10370
|
"full-width": "",
|
|
@@ -9856,7 +10606,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9856
10606
|
_cache[8] || (_cache[8] = createElementVNode("h1", { class: "complete-signup-success-title" }, "Welcome to Strands!", -1)),
|
|
9857
10607
|
_cache[9] || (_cache[9] = createElementVNode("p", { class: "complete-signup-success-message" }, " Your account has been created successfully. ", -1)),
|
|
9858
10608
|
_cache[10] || (_cache[10] = createElementVNode("p", { class: "complete-signup-success-instructions" }, " You are now signed in and can access your dashboard. ", -1)),
|
|
9859
|
-
createVNode(unref(
|
|
10609
|
+
createVNode(unref(CompoundUiButton), {
|
|
9860
10610
|
variant: "primary",
|
|
9861
10611
|
"full-width": "",
|
|
9862
10612
|
onClick: redirectToReferrer
|
|
@@ -9879,7 +10629,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9879
10629
|
_cache[13] || (_cache[13] = createElementVNode("h1", { class: "complete-signup-error-title" }, "Invalid Link", -1)),
|
|
9880
10630
|
_cache[14] || (_cache[14] = createElementVNode("p", { class: "complete-signup-error-message" }, " This registration link is invalid or has expired. ", -1)),
|
|
9881
10631
|
_cache[15] || (_cache[15] = createElementVNode("p", { class: "complete-signup-error-instructions" }, " Please request a new magic link to complete your registration. ", -1)),
|
|
9882
|
-
createVNode(unref(
|
|
10632
|
+
createVNode(unref(CompoundUiButton), {
|
|
9883
10633
|
variant: "primary",
|
|
9884
10634
|
"full-width": "",
|
|
9885
10635
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("request-new-link"))
|
|
@@ -9950,7 +10700,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9950
10700
|
}, null, 8, ["modelValue", "error"]),
|
|
9951
10701
|
_cache[19] || (_cache[19] = createElementVNode("div", { class: "complete-signup-password-hint" }, " Password must be at least 8 characters long ", -1))
|
|
9952
10702
|
]),
|
|
9953
|
-
createVNode(unref(
|
|
10703
|
+
createVNode(unref(CompoundUiButton), {
|
|
9954
10704
|
type: "submit",
|
|
9955
10705
|
variant: "primary",
|
|
9956
10706
|
"full-width": "",
|
|
@@ -10004,7 +10754,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
10004
10754
|
_cache[25] || (_cache[25] = createElementVNode("h1", { class: "complete-signup-warning-title" }, "Missing Token", -1)),
|
|
10005
10755
|
_cache[26] || (_cache[26] = createElementVNode("p", { class: "complete-signup-warning-message" }, " No registration token was provided. ", -1)),
|
|
10006
10756
|
_cache[27] || (_cache[27] = createElementVNode("p", { class: "complete-signup-warning-instructions" }, " This page requires a valid registration token from the magic link in your email. ", -1)),
|
|
10007
|
-
createVNode(unref(
|
|
10757
|
+
createVNode(unref(CompoundUiButton), {
|
|
10008
10758
|
variant: "primary",
|
|
10009
10759
|
"full-width": "",
|
|
10010
10760
|
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("start-registration"))
|
|
@@ -10182,7 +10932,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10182
10932
|
disabled: unref(loading2)
|
|
10183
10933
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
10184
10934
|
createElementVNode("div", _hoisted_3$c, [
|
|
10185
|
-
createVNode(unref(
|
|
10935
|
+
createVNode(unref(CompoundUiButton), {
|
|
10186
10936
|
variant: "secondary",
|
|
10187
10937
|
onClick: closeModal,
|
|
10188
10938
|
disabled: unref(loading2)
|
|
@@ -10192,7 +10942,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10192
10942
|
])]),
|
|
10193
10943
|
_: 1
|
|
10194
10944
|
}, 8, ["disabled"]),
|
|
10195
|
-
createVNode(unref(
|
|
10945
|
+
createVNode(unref(CompoundUiButton), {
|
|
10196
10946
|
variant: "primary",
|
|
10197
10947
|
onClick: startSetup,
|
|
10198
10948
|
disabled: !deviceName.value.trim() || unref(loading2),
|
|
@@ -10247,7 +10997,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10247
10997
|
], -1)
|
|
10248
10998
|
])])) : createCommentVNode("", true),
|
|
10249
10999
|
createElementVNode("div", _hoisted_12$8, [
|
|
10250
|
-
createVNode(unref(
|
|
11000
|
+
createVNode(unref(CompoundUiButton), {
|
|
10251
11001
|
variant: "secondary",
|
|
10252
11002
|
onClick: _cache[1] || (_cache[1] = ($event) => step.value = 1),
|
|
10253
11003
|
disabled: unref(loading2)
|
|
@@ -10257,7 +11007,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10257
11007
|
])]),
|
|
10258
11008
|
_: 1
|
|
10259
11009
|
}, 8, ["disabled"]),
|
|
10260
|
-
createVNode(unref(
|
|
11010
|
+
createVNode(unref(CompoundUiButton), {
|
|
10261
11011
|
variant: "primary",
|
|
10262
11012
|
onClick: _cache[2] || (_cache[2] = ($event) => step.value = 3),
|
|
10263
11013
|
disabled: unref(loading2)
|
|
@@ -10285,7 +11035,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10285
11035
|
onInput: onVerificationCodeInput
|
|
10286
11036
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
10287
11037
|
createElementVNode("div", _hoisted_14$8, [
|
|
10288
|
-
createVNode(unref(
|
|
11038
|
+
createVNode(unref(CompoundUiButton), {
|
|
10289
11039
|
variant: "secondary",
|
|
10290
11040
|
onClick: _cache[4] || (_cache[4] = ($event) => step.value = 2),
|
|
10291
11041
|
disabled: unref(loading2)
|
|
@@ -10295,7 +11045,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10295
11045
|
])]),
|
|
10296
11046
|
_: 1
|
|
10297
11047
|
}, 8, ["disabled"]),
|
|
10298
|
-
createVNode(unref(
|
|
11048
|
+
createVNode(unref(CompoundUiButton), {
|
|
10299
11049
|
variant: "primary",
|
|
10300
11050
|
onClick: verifySetup,
|
|
10301
11051
|
disabled: verificationCode.value.length !== 6 || unref(loading2),
|
|
@@ -10357,7 +11107,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10357
11107
|
])
|
|
10358
11108
|
]),
|
|
10359
11109
|
createElementVNode("div", _hoisted_19$4, [
|
|
10360
|
-
createVNode(unref(
|
|
11110
|
+
createVNode(unref(CompoundUiButton), {
|
|
10361
11111
|
variant: "secondary",
|
|
10362
11112
|
size: "sm",
|
|
10363
11113
|
onClick: copyBackupCodes
|
|
@@ -10370,7 +11120,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
10370
11120
|
])
|
|
10371
11121
|
]),
|
|
10372
11122
|
createElementVNode("div", _hoisted_20$4, [
|
|
10373
|
-
createVNode(unref(
|
|
11123
|
+
createVNode(unref(CompoundUiButton), {
|
|
10374
11124
|
variant: "primary",
|
|
10375
11125
|
onClick: finish
|
|
10376
11126
|
}, {
|
|
@@ -10555,7 +11305,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10555
11305
|
_: 1
|
|
10556
11306
|
}),
|
|
10557
11307
|
createElementVNode("div", _hoisted_3$b, [
|
|
10558
|
-
createVNode(unref(
|
|
11308
|
+
createVNode(unref(CompoundUiButton), {
|
|
10559
11309
|
variant: "secondary",
|
|
10560
11310
|
onClick: closeModal,
|
|
10561
11311
|
disabled: unref(loading2)
|
|
@@ -10565,7 +11315,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10565
11315
|
])]),
|
|
10566
11316
|
_: 1
|
|
10567
11317
|
}, 8, ["disabled"]),
|
|
10568
|
-
createVNode(unref(
|
|
11318
|
+
createVNode(unref(CompoundUiButton), {
|
|
10569
11319
|
variant: "primary",
|
|
10570
11320
|
onClick: startSetup,
|
|
10571
11321
|
disabled: !deviceName.value.trim() || unref(loading2),
|
|
@@ -10613,7 +11363,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10613
11363
|
onInput: onVerificationCodeInput
|
|
10614
11364
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
10615
11365
|
createElementVNode("div", _hoisted_5$9, [
|
|
10616
|
-
createVNode(unref(
|
|
11366
|
+
createVNode(unref(CompoundUiButton), {
|
|
10617
11367
|
variant: "secondary",
|
|
10618
11368
|
size: "sm",
|
|
10619
11369
|
onClick: resendCode,
|
|
@@ -10626,7 +11376,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10626
11376
|
}, 8, ["disabled"])
|
|
10627
11377
|
]),
|
|
10628
11378
|
createElementVNode("div", _hoisted_6$8, [
|
|
10629
|
-
createVNode(unref(
|
|
11379
|
+
createVNode(unref(CompoundUiButton), {
|
|
10630
11380
|
variant: "secondary",
|
|
10631
11381
|
onClick: _cache[2] || (_cache[2] = ($event) => step.value = 1),
|
|
10632
11382
|
disabled: unref(loading2)
|
|
@@ -10636,7 +11386,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10636
11386
|
])]),
|
|
10637
11387
|
_: 1
|
|
10638
11388
|
}, 8, ["disabled"]),
|
|
10639
|
-
createVNode(unref(
|
|
11389
|
+
createVNode(unref(CompoundUiButton), {
|
|
10640
11390
|
variant: "primary",
|
|
10641
11391
|
onClick: verifySetup,
|
|
10642
11392
|
disabled: verificationCode.value.length !== 6 || unref(loading2),
|
|
@@ -10689,7 +11439,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10689
11439
|
])
|
|
10690
11440
|
], -1)),
|
|
10691
11441
|
createElementVNode("div", _hoisted_8$8, [
|
|
10692
|
-
createVNode(unref(
|
|
11442
|
+
createVNode(unref(CompoundUiButton), {
|
|
10693
11443
|
variant: "primary",
|
|
10694
11444
|
onClick: finish
|
|
10695
11445
|
}, {
|
|
@@ -11015,7 +11765,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11015
11765
|
disabled: loading2.value
|
|
11016
11766
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
11017
11767
|
createElementVNode("div", _hoisted_3$a, [
|
|
11018
|
-
createVNode(unref(
|
|
11768
|
+
createVNode(unref(CompoundUiButton), {
|
|
11019
11769
|
variant: "secondary",
|
|
11020
11770
|
onClick: closeModal,
|
|
11021
11771
|
disabled: loading2.value
|
|
@@ -11025,7 +11775,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11025
11775
|
])]),
|
|
11026
11776
|
_: 1
|
|
11027
11777
|
}, 8, ["disabled"]),
|
|
11028
|
-
createVNode(unref(
|
|
11778
|
+
createVNode(unref(CompoundUiButton), {
|
|
11029
11779
|
variant: "primary",
|
|
11030
11780
|
onClick: startSetup,
|
|
11031
11781
|
disabled: !deviceName.value.trim() || loading2.value,
|
|
@@ -11094,7 +11844,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11094
11844
|
])
|
|
11095
11845
|
]),
|
|
11096
11846
|
createElementVNode("div", _hoisted_8$7, [
|
|
11097
|
-
createVNode(unref(
|
|
11847
|
+
createVNode(unref(CompoundUiButton), {
|
|
11098
11848
|
variant: "secondary",
|
|
11099
11849
|
onClick: _cache[1] || (_cache[1] = ($event) => step.value = 1),
|
|
11100
11850
|
disabled: loading2.value
|
|
@@ -11104,7 +11854,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11104
11854
|
])]),
|
|
11105
11855
|
_: 1
|
|
11106
11856
|
}, 8, ["disabled"]),
|
|
11107
|
-
createVNode(unref(
|
|
11857
|
+
createVNode(unref(CompoundUiButton), {
|
|
11108
11858
|
variant: "primary",
|
|
11109
11859
|
onClick: handleRegisterHardwareKey,
|
|
11110
11860
|
disabled: loading2.value,
|
|
@@ -11200,7 +11950,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11200
11950
|
])
|
|
11201
11951
|
]),
|
|
11202
11952
|
createElementVNode("div", _hoisted_17$5, [
|
|
11203
|
-
createVNode(unref(
|
|
11953
|
+
createVNode(unref(CompoundUiButton), {
|
|
11204
11954
|
variant: "secondary",
|
|
11205
11955
|
size: "sm",
|
|
11206
11956
|
onClick: copyBackupCodes
|
|
@@ -11213,7 +11963,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11213
11963
|
])
|
|
11214
11964
|
]),
|
|
11215
11965
|
createElementVNode("div", _hoisted_18$4, [
|
|
11216
|
-
createVNode(unref(
|
|
11966
|
+
createVNode(unref(CompoundUiButton), {
|
|
11217
11967
|
variant: "primary",
|
|
11218
11968
|
onClick: finish
|
|
11219
11969
|
}, {
|
|
@@ -11245,7 +11995,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11245
11995
|
createElementVNode("p", _hoisted_21$3, toDisplayString(errorMessage.value), 1)
|
|
11246
11996
|
]),
|
|
11247
11997
|
createElementVNode("div", _hoisted_22$3, [
|
|
11248
|
-
createVNode(unref(
|
|
11998
|
+
createVNode(unref(CompoundUiButton), {
|
|
11249
11999
|
variant: "secondary",
|
|
11250
12000
|
onClick: _cache[2] || (_cache[2] = ($event) => step.value = 1)
|
|
11251
12001
|
}, {
|
|
@@ -11254,7 +12004,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11254
12004
|
])]),
|
|
11255
12005
|
_: 1
|
|
11256
12006
|
}),
|
|
11257
|
-
createVNode(unref(
|
|
12007
|
+
createVNode(unref(CompoundUiButton), {
|
|
11258
12008
|
variant: "primary",
|
|
11259
12009
|
onClick: closeModal
|
|
11260
12010
|
}, {
|
|
@@ -11449,7 +12199,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11449
12199
|
])
|
|
11450
12200
|
]),
|
|
11451
12201
|
createElementVNode("div", _hoisted_11$6, [
|
|
11452
|
-
createVNode(unref(
|
|
12202
|
+
createVNode(unref(CompoundUiButton), {
|
|
11453
12203
|
variant: "secondary",
|
|
11454
12204
|
size: "sm",
|
|
11455
12205
|
onClick: copyBackupCodes
|
|
@@ -11459,7 +12209,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11459
12209
|
])]),
|
|
11460
12210
|
_: 1
|
|
11461
12211
|
}),
|
|
11462
|
-
createVNode(unref(
|
|
12212
|
+
createVNode(unref(CompoundUiButton), {
|
|
11463
12213
|
variant: "secondary",
|
|
11464
12214
|
size: "sm",
|
|
11465
12215
|
onClick: downloadBackupCodes
|
|
@@ -11473,7 +12223,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11473
12223
|
])) : createCommentVNode("", true),
|
|
11474
12224
|
createElementVNode("div", _hoisted_12$6, [
|
|
11475
12225
|
createElementVNode("div", _hoisted_13$6, [
|
|
11476
|
-
createVNode(unref(
|
|
12226
|
+
createVNode(unref(CompoundUiButton), {
|
|
11477
12227
|
variant: "secondary",
|
|
11478
12228
|
onClick: regenerateCodes,
|
|
11479
12229
|
disabled: unref(loading2),
|
|
@@ -11484,7 +12234,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11484
12234
|
])]),
|
|
11485
12235
|
_: 1
|
|
11486
12236
|
}, 8, ["disabled", "loading"]),
|
|
11487
|
-
createVNode(unref(
|
|
12237
|
+
createVNode(unref(CompoundUiButton), {
|
|
11488
12238
|
variant: "primary",
|
|
11489
12239
|
onClick: closeModal
|
|
11490
12240
|
}, {
|
|
@@ -11512,7 +12262,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11512
12262
|
_cache[11] || (_cache[11] = createElementVNode("p", { class: "backup-codes-regenerate-title" }, "Regenerate Backup Codes?", -1)),
|
|
11513
12263
|
_cache[12] || (_cache[12] = createElementVNode("p", { class: "backup-codes-regenerate-description" }, " This will invalidate all current backup codes. Make sure to save the new ones. ", -1)),
|
|
11514
12264
|
createElementVNode("div", _hoisted_16$5, [
|
|
11515
|
-
createVNode(unref(
|
|
12265
|
+
createVNode(unref(CompoundUiButton), {
|
|
11516
12266
|
variant: "primary",
|
|
11517
12267
|
size: "sm",
|
|
11518
12268
|
onClick: confirmRegenerate,
|
|
@@ -11524,7 +12274,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11524
12274
|
])]),
|
|
11525
12275
|
_: 1
|
|
11526
12276
|
}, 8, ["disabled", "loading"]),
|
|
11527
|
-
createVNode(unref(
|
|
12277
|
+
createVNode(unref(CompoundUiButton), {
|
|
11528
12278
|
variant: "secondary",
|
|
11529
12279
|
size: "sm",
|
|
11530
12280
|
onClick: _cache[0] || (_cache[0] = ($event) => showRegenerateWarning.value = false)
|
|
@@ -11594,7 +12344,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
11594
12344
|
default: withCtx(() => [
|
|
11595
12345
|
createElementVNode("p", _hoisted_3$8, toDisplayString(_ctx.message), 1),
|
|
11596
12346
|
createElementVNode("div", _hoisted_4$8, [
|
|
11597
|
-
createVNode(unref(
|
|
12347
|
+
createVNode(unref(CompoundUiButton), {
|
|
11598
12348
|
variant: "secondary",
|
|
11599
12349
|
onClick: handleCancel,
|
|
11600
12350
|
disabled: loading2.value
|
|
@@ -11604,7 +12354,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
11604
12354
|
]),
|
|
11605
12355
|
_: 1
|
|
11606
12356
|
}, 8, ["disabled"]),
|
|
11607
|
-
createVNode(unref(
|
|
12357
|
+
createVNode(unref(CompoundUiButton), {
|
|
11608
12358
|
variant: _ctx.variant,
|
|
11609
12359
|
onClick: handleConfirm,
|
|
11610
12360
|
disabled: loading2.value,
|
|
@@ -11751,7 +12501,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11751
12501
|
]);
|
|
11752
12502
|
}
|
|
11753
12503
|
};
|
|
11754
|
-
const
|
|
12504
|
+
const Shield2 = {
|
|
11755
12505
|
props: ["size"],
|
|
11756
12506
|
render() {
|
|
11757
12507
|
return h("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -11886,7 +12636,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11886
12636
|
]),
|
|
11887
12637
|
createElementVNode("div", _hoisted_7$5, [
|
|
11888
12638
|
unref(mfaEnabled2) ? (openBlock(), createElementBlock("span", _hoisted_8$5, [
|
|
11889
|
-
createVNode(
|
|
12639
|
+
createVNode(Shield2, {
|
|
11890
12640
|
size: 12,
|
|
11891
12641
|
class: "mfa-badge-icon"
|
|
11892
12642
|
}),
|
|
@@ -11916,7 +12666,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11916
12666
|
createElementVNode("p", { class: "mfa-device-option-description" }, "Use apps like Google Authenticator, or Authy")
|
|
11917
12667
|
], -1))
|
|
11918
12668
|
]),
|
|
11919
|
-
createVNode(unref(
|
|
12669
|
+
createVNode(unref(CompoundUiButton), {
|
|
11920
12670
|
variant: "outline",
|
|
11921
12671
|
size: "sm",
|
|
11922
12672
|
onClick: _cache[0] || (_cache[0] = ($event) => showTotpSetupModal.value = true)
|
|
@@ -11937,7 +12687,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11937
12687
|
createElementVNode("p", { class: "mfa-device-option-description" }, "Receive verification codes via email")
|
|
11938
12688
|
], -1))
|
|
11939
12689
|
]),
|
|
11940
|
-
createVNode(unref(
|
|
12690
|
+
createVNode(unref(CompoundUiButton), {
|
|
11941
12691
|
variant: "outline",
|
|
11942
12692
|
size: "sm",
|
|
11943
12693
|
onClick: _cache[1] || (_cache[1] = ($event) => showEmailMfaSetupModal.value = true)
|
|
@@ -11958,7 +12708,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11958
12708
|
createElementVNode("p", { class: "mfa-device-option-description" }, "Use a physical security key (YubiKey, etc.)")
|
|
11959
12709
|
], -1))
|
|
11960
12710
|
]),
|
|
11961
|
-
createVNode(unref(
|
|
12711
|
+
createVNode(unref(CompoundUiButton), {
|
|
11962
12712
|
variant: "outline",
|
|
11963
12713
|
size: "sm",
|
|
11964
12714
|
onClick: _cache[2] || (_cache[2] = ($event) => showHardwareKeySetupModal.value = true)
|
|
@@ -11979,7 +12729,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11979
12729
|
createElementVNode("p", { class: "mfa-device-option-description" }, "Use biometric authentication or device PIN")
|
|
11980
12730
|
], -1))
|
|
11981
12731
|
]),
|
|
11982
|
-
createVNode(unref(
|
|
12732
|
+
createVNode(unref(CompoundUiButton), {
|
|
11983
12733
|
variant: "outline",
|
|
11984
12734
|
size: "sm",
|
|
11985
12735
|
onClick: _cache[3] || (_cache[3] = ($event) => showPasskeySetupModal.value = true)
|
|
@@ -11995,11 +12745,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11995
12745
|
])) : currentTab?.value === "manage" ? (openBlock(), createElementBlock("div", _hoisted_24$2, [
|
|
11996
12746
|
unref(activeMfaDevices).length === 0 ? (openBlock(), createElementBlock("div", _hoisted_25$2, [
|
|
11997
12747
|
createElementVNode("div", _hoisted_26$2, [
|
|
11998
|
-
createVNode(
|
|
12748
|
+
createVNode(Shield2, { size: 48 })
|
|
11999
12749
|
]),
|
|
12000
12750
|
_cache[24] || (_cache[24] = createElementVNode("h3", { class: "mfa-empty-title" }, "No MFA Devices", -1)),
|
|
12001
12751
|
_cache[25] || (_cache[25] = createElementVNode("p", { class: "mfa-empty-description" }, "You haven't set up any multi-factor authentication devices yet.", -1)),
|
|
12002
|
-
createVNode(unref(
|
|
12752
|
+
createVNode(unref(CompoundUiButton), {
|
|
12003
12753
|
onClick: _cache[4] || (_cache[4] = ($event) => activeTab.value = "add"),
|
|
12004
12754
|
variant: "primary"
|
|
12005
12755
|
}, {
|
|
@@ -12037,7 +12787,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
12037
12787
|
])
|
|
12038
12788
|
]),
|
|
12039
12789
|
createElementVNode("div", _hoisted_33$2, [
|
|
12040
|
-
device.device_type === "email" && !device.verified ? (openBlock(), createBlock(unref(
|
|
12790
|
+
device.device_type === "email" && !device.verified ? (openBlock(), createBlock(unref(CompoundUiButton), {
|
|
12041
12791
|
key: 0,
|
|
12042
12792
|
variant: "outline",
|
|
12043
12793
|
size: "xs",
|
|
@@ -12057,7 +12807,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
12057
12807
|
onConfirm: ($event) => handleRemoveDevice(device)
|
|
12058
12808
|
}, {
|
|
12059
12809
|
trigger: withCtx(() => [
|
|
12060
|
-
createVNode(unref(
|
|
12810
|
+
createVNode(unref(CompoundUiButton), {
|
|
12061
12811
|
variant: "ghost",
|
|
12062
12812
|
size: "xs",
|
|
12063
12813
|
disabled: disablingDevice[device.id]
|
|
@@ -12083,7 +12833,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
12083
12833
|
device.backup_codes && device.backup_codes.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_37$1, [
|
|
12084
12834
|
createVNode(StrandsBackupCodesModal, { device }, {
|
|
12085
12835
|
trigger: withCtx(() => [
|
|
12086
|
-
createVNode(unref(
|
|
12836
|
+
createVNode(unref(CompoundUiButton), {
|
|
12087
12837
|
variant: "outline",
|
|
12088
12838
|
size: "xs"
|
|
12089
12839
|
}, {
|
|
@@ -12685,7 +13435,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
12685
13435
|
])
|
|
12686
13436
|
]),
|
|
12687
13437
|
!session.is_current ? (openBlock(), createElementBlock("div", _hoisted_18$2, [
|
|
12688
|
-
createVNode(unref(
|
|
13438
|
+
createVNode(unref(CompoundUiButton), {
|
|
12689
13439
|
variant: "outline",
|
|
12690
13440
|
size: "xs",
|
|
12691
13441
|
onClick: ($event) => revokeSession(session.id),
|
|
@@ -12728,7 +13478,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
12728
13478
|
}), 128))
|
|
12729
13479
|
]),
|
|
12730
13480
|
sessions.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_32$1, [
|
|
12731
|
-
createVNode(unref(
|
|
13481
|
+
createVNode(unref(CompoundUiButton), {
|
|
12732
13482
|
variant: "outline",
|
|
12733
13483
|
onClick: handleRevokeAllOther,
|
|
12734
13484
|
disabled: revokingAll.value
|
|
@@ -13602,7 +14352,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13602
14352
|
_cache[15] || (_cache[15] = createElementVNode("h4", { class: "profile-setting-title" }, "Email Address", -1)),
|
|
13603
14353
|
createElementVNode("p", _hoisted_15$2, toDisplayString(currentUser.value?.email), 1)
|
|
13604
14354
|
]),
|
|
13605
|
-
createVNode(unref(
|
|
14355
|
+
createVNode(unref(CompoundUiButton), {
|
|
13606
14356
|
variant: "secondary",
|
|
13607
14357
|
size: "sm",
|
|
13608
14358
|
onClick: _cache[2] || (_cache[2] = ($event) => showEmailChange.value = !showEmailChange.value)
|
|
@@ -13632,7 +14382,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13632
14382
|
autocomplete: "current-password",
|
|
13633
14383
|
error: emailChangeForm.errors.password
|
|
13634
14384
|
}, null, 8, ["modelValue", "error"]),
|
|
13635
|
-
createVNode(unref(
|
|
14385
|
+
createVNode(unref(CompoundUiButton), {
|
|
13636
14386
|
variant: "primary",
|
|
13637
14387
|
size: "sm",
|
|
13638
14388
|
onClick: handleEmailChange,
|
|
@@ -13654,7 +14404,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13654
14404
|
_cache[16] || (_cache[16] = createElementVNode("h4", { class: "profile-field-title" }, "Username", -1)),
|
|
13655
14405
|
createElementVNode("p", _hoisted_19, toDisplayString(currentUser.value?.username || "No username set"), 1)
|
|
13656
14406
|
]),
|
|
13657
|
-
createVNode(unref(
|
|
14407
|
+
createVNode(unref(CompoundUiButton), {
|
|
13658
14408
|
variant: "secondary",
|
|
13659
14409
|
size: "sm",
|
|
13660
14410
|
disabled: !usernameChangeData.canChange || usernameChangeLoading.value,
|
|
@@ -13681,7 +14431,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13681
14431
|
key: 0,
|
|
13682
14432
|
class: normalizeClass(["profile-availability-message", usernameAvailability.available ? "success" : "error"])
|
|
13683
14433
|
}, toDisplayString(usernameAvailability.message), 3)) : createCommentVNode("", true),
|
|
13684
|
-
createVNode(unref(
|
|
14434
|
+
createVNode(unref(CompoundUiButton), {
|
|
13685
14435
|
variant: "primary",
|
|
13686
14436
|
size: "sm",
|
|
13687
14437
|
onClick: handleUsernameChange,
|
|
@@ -13706,7 +14456,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13706
14456
|
_cache[18] || (_cache[18] = createElementVNode("h4", { class: "profile-field-title" }, "Password", -1)),
|
|
13707
14457
|
createElementVNode("p", _hoisted_24, "Last updated " + toDisplayString(passwordLastUpdated.value), 1)
|
|
13708
14458
|
]),
|
|
13709
|
-
createVNode(unref(
|
|
14459
|
+
createVNode(unref(CompoundUiButton), {
|
|
13710
14460
|
variant: "secondary",
|
|
13711
14461
|
size: "sm",
|
|
13712
14462
|
onClick: _cache[6] || (_cache[6] = ($event) => showPasswordChange.value = !showPasswordChange.value)
|
|
@@ -13741,7 +14491,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13741
14491
|
placeholder: "Confirm new password",
|
|
13742
14492
|
autocomplete: "new-password"
|
|
13743
14493
|
}, null, 8, ["modelValue"]),
|
|
13744
|
-
createVNode(unref(
|
|
14494
|
+
createVNode(unref(CompoundUiButton), {
|
|
13745
14495
|
variant: "primary",
|
|
13746
14496
|
size: "sm",
|
|
13747
14497
|
onClick: handlePasswordChange,
|
|
@@ -13780,7 +14530,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13780
14530
|
}), 128))
|
|
13781
14531
|
])) : createCommentVNode("", true)
|
|
13782
14532
|
]),
|
|
13783
|
-
createVNode(unref(
|
|
14533
|
+
createVNode(unref(CompoundUiButton), {
|
|
13784
14534
|
variant: "secondary",
|
|
13785
14535
|
size: "sm",
|
|
13786
14536
|
class: "profile-toggle-container",
|
|
@@ -13802,7 +14552,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13802
14552
|
])
|
|
13803
14553
|
]),
|
|
13804
14554
|
createElementVNode("div", _hoisted_36, [
|
|
13805
|
-
createVNode(unref(
|
|
14555
|
+
createVNode(unref(CompoundUiButton), {
|
|
13806
14556
|
variant: "secondary",
|
|
13807
14557
|
size: "sm",
|
|
13808
14558
|
disabled: loadingSessions.value,
|
|
@@ -13819,7 +14569,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13819
14569
|
])
|
|
13820
14570
|
]),
|
|
13821
14571
|
hasChanges.value ? (openBlock(), createElementBlock("div", _hoisted_37, [
|
|
13822
|
-
createVNode(unref(
|
|
14572
|
+
createVNode(unref(CompoundUiButton), {
|
|
13823
14573
|
type: "submit",
|
|
13824
14574
|
variant: "primary",
|
|
13825
14575
|
disabled: loading2.value,
|
|
@@ -13830,7 +14580,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13830
14580
|
]),
|
|
13831
14581
|
_: 1
|
|
13832
14582
|
}, 8, ["disabled", "loading"]),
|
|
13833
|
-
createVNode(unref(
|
|
14583
|
+
createVNode(unref(CompoundUiButton), {
|
|
13834
14584
|
variant: "secondary",
|
|
13835
14585
|
onClick: handleCancel,
|
|
13836
14586
|
disabled: loading2.value
|
|
@@ -13883,7 +14633,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13883
14633
|
}, {
|
|
13884
14634
|
default: withCtx(() => [
|
|
13885
14635
|
createElementVNode("div", _hoisted_46, [
|
|
13886
|
-
createVNode(unref(
|
|
14636
|
+
createVNode(unref(CompoundUiButton), {
|
|
13887
14637
|
color: "danger",
|
|
13888
14638
|
onClick: handleSignOut,
|
|
13889
14639
|
disabled: signingOut.value,
|
|
@@ -13896,7 +14646,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13896
14646
|
}, 8, ["disabled"]),
|
|
13897
14647
|
createVNode(StrandsSettingsModal, { onSettingsUpdated: handleSettingsUpdated }, {
|
|
13898
14648
|
trigger: withCtx(() => [
|
|
13899
|
-
createVNode(unref(
|
|
14649
|
+
createVNode(unref(CompoundUiButton), {
|
|
13900
14650
|
variant: "secondary",
|
|
13901
14651
|
class: "profile-sign-out-button"
|
|
13902
14652
|
}, {
|
|
@@ -14063,7 +14813,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
14063
14813
|
disabled: loading2.value || isSubmitted.value,
|
|
14064
14814
|
error: error.value ? "Email address not found" : void 0
|
|
14065
14815
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
14066
|
-
createVNode(unref(
|
|
14816
|
+
createVNode(unref(CompoundUiButton), {
|
|
14067
14817
|
type: "submit",
|
|
14068
14818
|
variant: "primary",
|
|
14069
14819
|
"full-width": "",
|
|
@@ -14501,7 +15251,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14501
15251
|
invert: !!props.user
|
|
14502
15252
|
}, {
|
|
14503
15253
|
default: withCtx(() => [
|
|
14504
|
-
createVNode(unref(
|
|
15254
|
+
createVNode(unref(CompoundUiButton), {
|
|
14505
15255
|
color: "secondary",
|
|
14506
15256
|
active: showDropdown.value,
|
|
14507
15257
|
onClick: toggleDropdown,
|
|
@@ -14664,7 +15414,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14664
15414
|
}, 8, ["modelValue"])
|
|
14665
15415
|
]),
|
|
14666
15416
|
fallback: withCtx(() => [
|
|
14667
|
-
createVNode(unref(
|
|
15417
|
+
createVNode(unref(CompoundUiButton), {
|
|
14668
15418
|
onClick: openSignIn,
|
|
14669
15419
|
"aria-label": "Sign in"
|
|
14670
15420
|
}, {
|
|
@@ -14842,7 +15592,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14842
15592
|
const getNavItemComponent = () => {
|
|
14843
15593
|
const actualType = getActualType();
|
|
14844
15594
|
if (actualType === "button" && props.type === "button") {
|
|
14845
|
-
return
|
|
15595
|
+
return CompoundUiButton;
|
|
14846
15596
|
} else if (props.to) {
|
|
14847
15597
|
return "router-link";
|
|
14848
15598
|
} else {
|
|
@@ -15137,7 +15887,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15137
15887
|
]);
|
|
15138
15888
|
}
|
|
15139
15889
|
};
|
|
15140
|
-
const
|
|
15890
|
+
const Shield2 = {
|
|
15141
15891
|
props: {
|
|
15142
15892
|
size: {
|
|
15143
15893
|
type: [String, Number],
|
|
@@ -15250,7 +16000,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15250
16000
|
]),
|
|
15251
16001
|
footer: withCtx(() => [
|
|
15252
16002
|
createElementVNode("div", _hoisted_18, [
|
|
15253
|
-
createVNode(unref(
|
|
16003
|
+
createVNode(unref(CompoundUiButton), {
|
|
15254
16004
|
variant: "secondary",
|
|
15255
16005
|
onClick: closeModal,
|
|
15256
16006
|
disabled: unref(loading2)
|
|
@@ -15271,7 +16021,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15271
16021
|
unref(mfaEnabled2) || unref(activeMfaDevices).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
15272
16022
|
createElementVNode("div", _hoisted_8, [
|
|
15273
16023
|
createElementVNode("div", _hoisted_9, [
|
|
15274
|
-
createVNode(
|
|
16024
|
+
createVNode(Shield2, {
|
|
15275
16025
|
size: 20,
|
|
15276
16026
|
class: "mfa-setup-shield-icon"
|
|
15277
16027
|
})
|
|
@@ -15300,7 +16050,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15300
16050
|
createElementVNode("h4", { class: "mfa-setup-method-title" }, "Authenticator App"),
|
|
15301
16051
|
createElementVNode("p", { class: "mfa-setup-method-description" }, "Use Google Authenticator, Authy, or any TOTP-compatible app to generate secure codes")
|
|
15302
16052
|
], -1)),
|
|
15303
|
-
createVNode(unref(
|
|
16053
|
+
createVNode(unref(CompoundUiButton), {
|
|
15304
16054
|
variant: "primary",
|
|
15305
16055
|
size: "md",
|
|
15306
16056
|
onClick: withModifiers(startTotpSetup, ["stop"]),
|
|
@@ -15329,7 +16079,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15329
16079
|
createElementVNode("h4", { class: "mfa-setup-method-title" }, "Email Verification"),
|
|
15330
16080
|
createElementVNode("p", { class: "mfa-setup-method-description" }, "Receive verification codes directly in your email inbox for easy access")
|
|
15331
16081
|
], -1)),
|
|
15332
|
-
createVNode(unref(
|
|
16082
|
+
createVNode(unref(CompoundUiButton), {
|
|
15333
16083
|
variant: "primary",
|
|
15334
16084
|
size: "md",
|
|
15335
16085
|
onClick: withModifiers(startEmailMfaSetup, ["stop"]),
|
|
@@ -15351,7 +16101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15351
16101
|
_cache[13] || (_cache[13] = createElementVNode("h3", { class: "mfa-setup-manage-title" }, "Manage Existing Methods", -1)),
|
|
15352
16102
|
createElementVNode("p", _hoisted_17, toDisplayString(unref(activeMfaDevices).length) + " device(s) currently active", 1)
|
|
15353
16103
|
]),
|
|
15354
|
-
createVNode(unref(
|
|
16104
|
+
createVNode(unref(CompoundUiButton), {
|
|
15355
16105
|
variant: "secondary",
|
|
15356
16106
|
size: "md",
|
|
15357
16107
|
onClick: openMfaModal,
|
|
@@ -15647,7 +16397,7 @@ export {
|
|
|
15647
16397
|
StrandsUiAlert,
|
|
15648
16398
|
UiApp as StrandsUiApp,
|
|
15649
16399
|
_sfc_main$B as StrandsUiAvatarEditor,
|
|
15650
|
-
StrandsUiButton,
|
|
16400
|
+
CompoundUiButton as StrandsUiButton,
|
|
15651
16401
|
StrandsUiCard,
|
|
15652
16402
|
_sfc_main$w as StrandsUiColorPicker,
|
|
15653
16403
|
UiDivider as StrandsUiDivider,
|
|
@@ -15669,7 +16419,7 @@ export {
|
|
|
15669
16419
|
UiApp,
|
|
15670
16420
|
_sfc_main$B as UiAvatarEditor,
|
|
15671
16421
|
_sfc_main$B as UiAvatarEditorSimple,
|
|
15672
|
-
|
|
16422
|
+
CompoundUiButton as UiButton,
|
|
15673
16423
|
StrandsUiCard as UiCard,
|
|
15674
16424
|
_sfc_main$w as UiColorPicker,
|
|
15675
16425
|
UiDivider,
|