@dillingerstaffing/strand-vue 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Link/Link.vue.d.ts +3 -0
- package/dist/components/Link/Link.vue.d.ts.map +1 -1
- package/dist/components/Nav/Nav.vue.d.ts +3 -0
- package/dist/components/Nav/Nav.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.d.ts +5 -2
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/css/strand-ui.css +13 -0
- package/dist/index.js +119 -115
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Link/Link.test.ts +12 -0
- package/src/components/Link/Link.vue +4 -1
- package/src/components/Nav/Nav.test.ts +14 -0
- package/src/components/Nav/Nav.vue +4 -1
- package/src/components/Section/Section.test.ts +10 -0
- package/src/components/Section/Section.vue +5 -1
package/dist/index.js
CHANGED
|
@@ -26,23 +26,23 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
26
26
|
a.loading && "strand-btn--loading"
|
|
27
27
|
].filter(Boolean).join(" ")
|
|
28
28
|
);
|
|
29
|
-
function o
|
|
30
|
-
s.value || n("click",
|
|
29
|
+
function d(o) {
|
|
30
|
+
s.value || n("click", o);
|
|
31
31
|
}
|
|
32
|
-
return (
|
|
32
|
+
return (o, m) => (l(), r("button", {
|
|
33
33
|
type: e.type,
|
|
34
34
|
class: b(i.value),
|
|
35
35
|
disabled: s.value,
|
|
36
36
|
"aria-disabled": s.value ? "true" : void 0,
|
|
37
37
|
"aria-busy": e.loading ? "true" : void 0,
|
|
38
|
-
onClick:
|
|
38
|
+
onClick: d
|
|
39
39
|
}, [
|
|
40
40
|
e.loading ? (l(), r("span", P)) : g("", !0),
|
|
41
41
|
f("span", {
|
|
42
42
|
class: "strand-btn__content",
|
|
43
43
|
style: S(e.loading ? { visibility: "hidden" } : void 0)
|
|
44
44
|
}, [
|
|
45
|
-
y(
|
|
45
|
+
y(o.$slots, "default")
|
|
46
46
|
], 4)
|
|
47
47
|
], 10, K));
|
|
48
48
|
}
|
|
@@ -73,15 +73,15 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
73
73
|
!!s.trailing && "strand-input--has-trailing"
|
|
74
74
|
].filter(Boolean).join(" ")
|
|
75
75
|
);
|
|
76
|
-
function o
|
|
77
|
-
const m =
|
|
76
|
+
function d(o) {
|
|
77
|
+
const m = o.target;
|
|
78
78
|
n("update:modelValue", m.value);
|
|
79
79
|
}
|
|
80
|
-
return (
|
|
80
|
+
return (o, m) => (l(), r("div", {
|
|
81
81
|
class: b(i.value)
|
|
82
82
|
}, [
|
|
83
|
-
|
|
84
|
-
y(
|
|
83
|
+
o.$slots.leading ? (l(), r("span", U, [
|
|
84
|
+
y(o.$slots, "leading")
|
|
85
85
|
])) : g("", !0),
|
|
86
86
|
f("input", {
|
|
87
87
|
type: e.type,
|
|
@@ -89,10 +89,10 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
89
89
|
disabled: e.disabled,
|
|
90
90
|
"aria-invalid": e.error ? "true" : void 0,
|
|
91
91
|
value: e.modelValue,
|
|
92
|
-
onInput:
|
|
92
|
+
onInput: d
|
|
93
93
|
}, null, 40, q),
|
|
94
|
-
|
|
95
|
-
y(
|
|
94
|
+
o.$slots.trailing ? (l(), r("span", G, [
|
|
95
|
+
y(o.$slots, "trailing")
|
|
96
96
|
])) : g("", !0)
|
|
97
97
|
], 2));
|
|
98
98
|
}
|
|
@@ -119,20 +119,20 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
119
119
|
a.disabled && "strand-textarea--disabled",
|
|
120
120
|
a.autoResize && "strand-textarea--auto-resize"
|
|
121
121
|
].filter(Boolean).join(" ")
|
|
122
|
-
),
|
|
122
|
+
), d = c(
|
|
123
123
|
() => typeof a.modelValue == "string" ? a.modelValue.length : 0
|
|
124
124
|
);
|
|
125
|
-
function
|
|
125
|
+
function o() {
|
|
126
126
|
a.autoResize && s.value && (s.value.style.height = "auto", s.value.style.height = `${s.value.scrollHeight}px`);
|
|
127
127
|
}
|
|
128
128
|
function m(v) {
|
|
129
129
|
const u = v.target;
|
|
130
|
-
n("update:modelValue", u.value),
|
|
130
|
+
n("update:modelValue", u.value), o();
|
|
131
131
|
}
|
|
132
132
|
return I(() => a.modelValue, () => {
|
|
133
|
-
|
|
133
|
+
o();
|
|
134
134
|
}), E(() => {
|
|
135
|
-
|
|
135
|
+
o();
|
|
136
136
|
}), (v, u) => (l(), r("div", {
|
|
137
137
|
class: b(i.value)
|
|
138
138
|
}, [
|
|
@@ -146,7 +146,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
146
146
|
value: e.modelValue,
|
|
147
147
|
onInput: m
|
|
148
148
|
}, null, 40, W),
|
|
149
|
-
e.showCount && e.maxLength != null ? (l(), r("span", H, _(
|
|
149
|
+
e.showCount && e.maxLength != null ? (l(), r("span", H, _(d.value) + "/" + _(e.maxLength), 1)) : g("", !0)
|
|
150
150
|
], 2));
|
|
151
151
|
}
|
|
152
152
|
}), Z = ["value", "disabled", "aria-invalid"], J = {
|
|
@@ -171,11 +171,11 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
171
171
|
a.disabled && "strand-select--disabled"
|
|
172
172
|
].filter(Boolean).join(" ")
|
|
173
173
|
);
|
|
174
|
-
function i(
|
|
175
|
-
const
|
|
176
|
-
n("update:modelValue",
|
|
174
|
+
function i(d) {
|
|
175
|
+
const o = d.target;
|
|
176
|
+
n("update:modelValue", o.value);
|
|
177
177
|
}
|
|
178
|
-
return (
|
|
178
|
+
return (d, o) => (l(), r("div", {
|
|
179
179
|
class: b(s.value)
|
|
180
180
|
}, [
|
|
181
181
|
f("select", {
|
|
@@ -191,7 +191,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
191
191
|
value: m.value
|
|
192
192
|
}, _(m.label), 9, Q))), 128))
|
|
193
193
|
], 40, Z),
|
|
194
|
-
|
|
194
|
+
o[0] || (o[0] = f("span", {
|
|
195
195
|
class: "strand-select__arrow",
|
|
196
196
|
"aria-hidden": "true"
|
|
197
197
|
}, null, -1))
|
|
@@ -236,10 +236,10 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
236
236
|
a.indeterminate && "strand-checkbox--indeterminate",
|
|
237
237
|
a.disabled && "strand-checkbox--disabled"
|
|
238
238
|
].filter(Boolean).join(" ")
|
|
239
|
-
),
|
|
239
|
+
), d = c(
|
|
240
240
|
() => a.indeterminate ? "mixed" : a.checked ? "true" : "false"
|
|
241
241
|
);
|
|
242
|
-
function
|
|
242
|
+
function o(v) {
|
|
243
243
|
a.disabled || n("change", v);
|
|
244
244
|
}
|
|
245
245
|
function m(v) {
|
|
@@ -256,9 +256,9 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
256
256
|
class: "strand-checkbox__native",
|
|
257
257
|
checked: e.checked,
|
|
258
258
|
disabled: e.disabled,
|
|
259
|
-
"aria-checked":
|
|
259
|
+
"aria-checked": d.value,
|
|
260
260
|
role: "checkbox",
|
|
261
|
-
onChange:
|
|
261
|
+
onChange: o
|
|
262
262
|
}, null, 40, X),
|
|
263
263
|
f("span", Y, [
|
|
264
264
|
e.indeterminate ? (l(), r("svg", ee, [...u[0] || (u[0] = [
|
|
@@ -305,10 +305,10 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
305
305
|
a.disabled && "strand-radio--disabled"
|
|
306
306
|
].filter(Boolean).join(" ")
|
|
307
307
|
);
|
|
308
|
-
function i(
|
|
309
|
-
a.disabled || n("change",
|
|
308
|
+
function i(d) {
|
|
309
|
+
a.disabled || n("change", d);
|
|
310
310
|
}
|
|
311
|
-
return (
|
|
311
|
+
return (d, o) => (l(), r("label", {
|
|
312
312
|
class: b(s.value)
|
|
313
313
|
}, [
|
|
314
314
|
f("input", {
|
|
@@ -320,7 +320,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
320
320
|
value: e.value,
|
|
321
321
|
onChange: i
|
|
322
322
|
}, null, 40, se),
|
|
323
|
-
|
|
323
|
+
o[0] || (o[0] = f("span", {
|
|
324
324
|
class: "strand-radio__control",
|
|
325
325
|
"aria-hidden": "true"
|
|
326
326
|
}, [
|
|
@@ -351,10 +351,10 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
351
351
|
function i() {
|
|
352
352
|
a.disabled || n("change", !a.checked);
|
|
353
353
|
}
|
|
354
|
-
function o
|
|
355
|
-
(
|
|
354
|
+
function d(o) {
|
|
355
|
+
(o.key === " " || o.key === "Enter") && !a.disabled && (o.preventDefault(), n("change", !a.checked));
|
|
356
356
|
}
|
|
357
|
-
return (
|
|
357
|
+
return (o, m) => (l(), r("label", {
|
|
358
358
|
class: b(s.value)
|
|
359
359
|
}, [
|
|
360
360
|
f("button", {
|
|
@@ -364,7 +364,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
364
364
|
"aria-checked": e.checked ? "true" : "false",
|
|
365
365
|
disabled: e.disabled,
|
|
366
366
|
onClick: i,
|
|
367
|
-
onKeydown:
|
|
367
|
+
onKeydown: d
|
|
368
368
|
}, [...m[0] || (m[0] = [
|
|
369
369
|
f("span", {
|
|
370
370
|
class: "strand-switch__thumb",
|
|
@@ -391,11 +391,11 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
391
391
|
a.disabled && "strand-slider--disabled"
|
|
392
392
|
].filter(Boolean).join(" ")
|
|
393
393
|
);
|
|
394
|
-
function i(
|
|
395
|
-
const
|
|
396
|
-
n("update:modelValue", Number(
|
|
394
|
+
function i(d) {
|
|
395
|
+
const o = d.target;
|
|
396
|
+
n("update:modelValue", Number(o.value));
|
|
397
397
|
}
|
|
398
|
-
return (
|
|
398
|
+
return (d, o) => (l(), r("div", {
|
|
399
399
|
class: b(s.value)
|
|
400
400
|
}, [
|
|
401
401
|
f("input", {
|
|
@@ -491,19 +491,19 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
491
491
|
const t = e, a = D(), n = c(() => !!a.default), s = c(() => t.variant === "count" ? t.count != null && t.count > t.maxCount ? `${t.maxCount}+` : t.count : null), i = c(() => {
|
|
492
492
|
if (t.variant === "dot") return "Status indicator";
|
|
493
493
|
if (t.count != null) return `${t.count} notifications`;
|
|
494
|
-
}),
|
|
494
|
+
}), d = c(
|
|
495
495
|
() => [
|
|
496
496
|
"strand-badge__indicator",
|
|
497
497
|
`strand-badge--${t.variant}`,
|
|
498
498
|
`strand-badge--${t.status}`
|
|
499
499
|
].filter(Boolean).join(" ")
|
|
500
|
-
),
|
|
500
|
+
), o = c(
|
|
501
501
|
() => n.value ? ["strand-badge", t.className].filter(Boolean).join(" ") : ["strand-badge", "strand-badge--inline", t.className].filter(Boolean).join(" ")
|
|
502
502
|
);
|
|
503
|
-
return (m, v) => (l(), r("span", k({ class:
|
|
503
|
+
return (m, v) => (l(), r("span", k({ class: o.value }, m.$attrs), [
|
|
504
504
|
y(m.$slots, "default"),
|
|
505
505
|
f("span", {
|
|
506
|
-
class: b(
|
|
506
|
+
class: b(d.value),
|
|
507
507
|
"aria-label": i.value,
|
|
508
508
|
role: "status"
|
|
509
509
|
}, _(s.value), 11, ve)
|
|
@@ -525,18 +525,18 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
525
525
|
setup(e) {
|
|
526
526
|
const t = e, a = w(!1), n = () => {
|
|
527
527
|
a.value = !0;
|
|
528
|
-
}, s = c(() => t.src && !a.value), i = c(() => t.initials.slice(0, 2).toUpperCase()),
|
|
528
|
+
}, s = c(() => t.src && !a.value), i = c(() => t.initials.slice(0, 2).toUpperCase()), d = c(
|
|
529
529
|
() => [
|
|
530
530
|
"strand-avatar",
|
|
531
531
|
`strand-avatar--${t.size}`,
|
|
532
532
|
t.className
|
|
533
533
|
].filter(Boolean).join(" ")
|
|
534
534
|
);
|
|
535
|
-
return (
|
|
536
|
-
class:
|
|
535
|
+
return (o, m) => (l(), r("div", k({
|
|
536
|
+
class: d.value,
|
|
537
537
|
role: "img",
|
|
538
538
|
"aria-label": e.alt || i.value
|
|
539
|
-
},
|
|
539
|
+
}, o.$attrs), [
|
|
540
540
|
s.value ? (l(), r("img", {
|
|
541
541
|
key: 0,
|
|
542
542
|
class: "strand-avatar__img",
|
|
@@ -564,7 +564,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
564
564
|
a.className
|
|
565
565
|
].filter(Boolean).join(" ")
|
|
566
566
|
);
|
|
567
|
-
return (i,
|
|
567
|
+
return (i, d) => (l(), r("span", k({ class: s.value }, i.$attrs), [
|
|
568
568
|
f("span", be, [
|
|
569
569
|
y(i.$slots, "default")
|
|
570
570
|
]),
|
|
@@ -573,8 +573,8 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
573
573
|
type: "button",
|
|
574
574
|
class: "strand-tag__remove",
|
|
575
575
|
"aria-label": "Remove",
|
|
576
|
-
onClick:
|
|
577
|
-
}, [...
|
|
576
|
+
onClick: d[0] || (d[0] = (o) => n("remove"))
|
|
577
|
+
}, [...d[1] || (d[1] = [
|
|
578
578
|
f("svg", {
|
|
579
579
|
width: "12",
|
|
580
580
|
height: "12",
|
|
@@ -606,11 +606,11 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
606
606
|
const a = t, n = w(null), s = w("asc"), i = c(
|
|
607
607
|
() => ["strand-table-wrapper"].filter(Boolean).join(" ")
|
|
608
608
|
);
|
|
609
|
-
function
|
|
609
|
+
function d(m) {
|
|
610
610
|
const v = n.value === m && s.value === "asc" ? "desc" : "asc";
|
|
611
611
|
n.value = m, s.value = v, a("sort", m, v);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function o(m) {
|
|
614
614
|
return n.value === m ? s.value === "asc" ? "↑" : "↓" : "↕";
|
|
615
615
|
}
|
|
616
616
|
return (m, v) => (l(), r("div", {
|
|
@@ -629,10 +629,10 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
629
629
|
type: "button",
|
|
630
630
|
class: "strand-table__sort-btn",
|
|
631
631
|
"aria-label": `Sort by ${u.header}`,
|
|
632
|
-
onClick: (p) =>
|
|
632
|
+
onClick: (p) => d(u.key)
|
|
633
633
|
}, [
|
|
634
634
|
R(_(u.header) + " ", 1),
|
|
635
|
-
f("span", ye, _(
|
|
635
|
+
f("span", ye, _(o(u.key)), 1)
|
|
636
636
|
], 8, ge)) : (l(), r(B, { key: 1 }, [
|
|
637
637
|
R(_(u.header), 1)
|
|
638
638
|
], 64))
|
|
@@ -775,7 +775,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
775
775
|
const t = e, a = c(() => t.direction === "vertical"), n = c(() => !a.value && !!t.label);
|
|
776
776
|
c(() => !a.value && !t.label);
|
|
777
777
|
const s = c(() => a.value ? ["strand-divider", "strand-divider--vertical", t.className].filter(Boolean).join(" ") : n.value ? ["strand-divider", "strand-divider--horizontal", "strand-divider--labeled", t.className].filter(Boolean).join(" ") : ["strand-divider", "strand-divider--horizontal", t.className].filter(Boolean).join(" "));
|
|
778
|
-
return (i,
|
|
778
|
+
return (i, d) => a.value ? (l(), r("div", {
|
|
779
779
|
key: 0,
|
|
780
780
|
class: b(s.value),
|
|
781
781
|
role: "separator",
|
|
@@ -786,9 +786,9 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
786
786
|
role: "separator",
|
|
787
787
|
"aria-orientation": "horizontal"
|
|
788
788
|
}, [
|
|
789
|
-
|
|
789
|
+
d[0] || (d[0] = f("span", { class: "strand-divider__line" }, null, -1)),
|
|
790
790
|
f("span", Ne, _(e.label), 1),
|
|
791
|
-
|
|
791
|
+
d[1] || (d[1] = f("span", { class: "strand-divider__line" }, null, -1))
|
|
792
792
|
], 2)) : (l(), r("hr", {
|
|
793
793
|
key: 2,
|
|
794
794
|
class: b(s.value),
|
|
@@ -801,6 +801,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
801
801
|
props: {
|
|
802
802
|
variant: { default: "standard" },
|
|
803
803
|
background: { default: "primary" },
|
|
804
|
+
borderTop: { type: Boolean, default: !1 },
|
|
804
805
|
className: { default: "" }
|
|
805
806
|
},
|
|
806
807
|
setup(e) {
|
|
@@ -809,6 +810,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
809
810
|
"strand-section",
|
|
810
811
|
`strand-section--${t.variant}`,
|
|
811
812
|
`strand-section--bg-${t.background}`,
|
|
813
|
+
t.borderTop && "strand-section--border-top",
|
|
812
814
|
t.className
|
|
813
815
|
].filter(Boolean).join(" ")
|
|
814
816
|
);
|
|
@@ -853,20 +855,20 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
853
855
|
);
|
|
854
856
|
return E(() => {
|
|
855
857
|
a.value && (s = new IntersectionObserver(
|
|
856
|
-
(
|
|
857
|
-
for (const
|
|
858
|
-
|
|
858
|
+
(d) => {
|
|
859
|
+
for (const o of d)
|
|
860
|
+
o.isIntersecting ? (n.value = !0, t.once && s && a.value && s.unobserve(a.value)) : t.once || (n.value = !1);
|
|
859
861
|
},
|
|
860
862
|
{ threshold: t.threshold }
|
|
861
863
|
), s.observe(a.value));
|
|
862
864
|
}), j(() => {
|
|
863
865
|
s && (s.disconnect(), s = null);
|
|
864
|
-
}), (
|
|
866
|
+
}), (d, o) => (l(), r("div", k({
|
|
865
867
|
ref_key: "elRef",
|
|
866
868
|
ref: a,
|
|
867
869
|
class: i.value
|
|
868
|
-
},
|
|
869
|
-
y(
|
|
870
|
+
}, d.$attrs), [
|
|
871
|
+
y(d.$slots, "default")
|
|
870
872
|
], 16));
|
|
871
873
|
}
|
|
872
874
|
}), je = ["href"], Ia = /* @__PURE__ */ h({
|
|
@@ -874,11 +876,12 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
874
876
|
props: {
|
|
875
877
|
href: {},
|
|
876
878
|
external: { type: Boolean, default: !1 },
|
|
879
|
+
variant: { default: "default" },
|
|
877
880
|
className: { default: "" }
|
|
878
881
|
},
|
|
879
882
|
setup(e) {
|
|
880
883
|
const t = e, a = c(
|
|
881
|
-
() => ["strand-link", t.className].filter(Boolean).join(" ")
|
|
884
|
+
() => ["strand-link", t.variant !== "default" && `strand-link--${t.variant}`, t.className].filter(Boolean).join(" ")
|
|
882
885
|
);
|
|
883
886
|
return (n, s) => (l(), r("a", k({
|
|
884
887
|
href: e.href,
|
|
@@ -899,7 +902,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
899
902
|
emits: ["change"],
|
|
900
903
|
setup(e, { emit: t }) {
|
|
901
904
|
const a = e, n = t, s = w(null), i = c(() => ["strand-tabs"].filter(Boolean).join(" "));
|
|
902
|
-
function
|
|
905
|
+
function d(m) {
|
|
903
906
|
var u, p;
|
|
904
907
|
const v = a.tabs[m];
|
|
905
908
|
if (v) {
|
|
@@ -908,7 +911,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
908
911
|
(p = $ == null ? void 0 : $[m]) == null || p.focus();
|
|
909
912
|
}
|
|
910
913
|
}
|
|
911
|
-
function
|
|
914
|
+
function o(m) {
|
|
912
915
|
const v = a.tabs.findIndex((p) => p.id === a.activeTab);
|
|
913
916
|
let u = null;
|
|
914
917
|
switch (m.key) {
|
|
@@ -927,7 +930,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
927
930
|
default:
|
|
928
931
|
return;
|
|
929
932
|
}
|
|
930
|
-
m.preventDefault(),
|
|
933
|
+
m.preventDefault(), d(u);
|
|
931
934
|
}
|
|
932
935
|
return (m, v) => (l(), r("div", {
|
|
933
936
|
class: b(i.value)
|
|
@@ -936,7 +939,7 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
936
939
|
ref_key: "tablistRef",
|
|
937
940
|
ref: s,
|
|
938
941
|
role: "tablist",
|
|
939
|
-
onKeydown:
|
|
942
|
+
onKeydown: o
|
|
940
943
|
}, [
|
|
941
944
|
(l(!0), r(B, null, C(e.tabs, (u) => (l(), r("button", {
|
|
942
945
|
key: u.id,
|
|
@@ -1014,21 +1017,22 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
1014
1017
|
}, Ke = ["href", "aria-current"], Va = /* @__PURE__ */ h({
|
|
1015
1018
|
__name: "Nav",
|
|
1016
1019
|
props: {
|
|
1017
|
-
items: { default: () => [] }
|
|
1020
|
+
items: { default: () => [] },
|
|
1021
|
+
glass: { type: Boolean, default: !1 }
|
|
1018
1022
|
},
|
|
1019
1023
|
setup(e) {
|
|
1020
|
-
const t = w(!1);
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1024
|
+
const t = e, a = w(!1);
|
|
1025
|
+
function n() {
|
|
1026
|
+
a.value = !a.value;
|
|
1023
1027
|
}
|
|
1024
|
-
const
|
|
1025
|
-
return (
|
|
1026
|
-
class: b(
|
|
1028
|
+
const s = c(() => ["strand-nav", t.glass && "strand-nav--glass"].filter(Boolean).join(" "));
|
|
1029
|
+
return (i, d) => (l(), r("nav", {
|
|
1030
|
+
class: b(s.value),
|
|
1027
1031
|
"aria-label": "Main navigation"
|
|
1028
1032
|
}, [
|
|
1029
1033
|
f("div", Ve, [
|
|
1030
|
-
|
|
1031
|
-
y(
|
|
1034
|
+
i.$slots.logo ? (l(), r("div", Le, [
|
|
1035
|
+
y(i.$slots, "logo")
|
|
1032
1036
|
])) : g("", !0),
|
|
1033
1037
|
f("div", De, [
|
|
1034
1038
|
(l(!0), r(B, null, C(e.items, (o) => (l(), r("a", {
|
|
@@ -1041,23 +1045,23 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
1041
1045
|
"aria-current": o.active ? "page" : void 0
|
|
1042
1046
|
}, _(o.label), 11, Oe))), 128))
|
|
1043
1047
|
]),
|
|
1044
|
-
|
|
1045
|
-
y(
|
|
1048
|
+
i.$slots.actions ? (l(), r("div", Ae, [
|
|
1049
|
+
y(i.$slots, "actions")
|
|
1046
1050
|
])) : g("", !0),
|
|
1047
1051
|
f("button", {
|
|
1048
1052
|
type: "button",
|
|
1049
1053
|
class: "strand-nav__hamburger",
|
|
1050
|
-
"aria-expanded":
|
|
1051
|
-
"aria-label":
|
|
1052
|
-
onClick:
|
|
1053
|
-
}, [...
|
|
1054
|
+
"aria-expanded": a.value ? "true" : "false",
|
|
1055
|
+
"aria-label": a.value ? "Close menu" : "Menu",
|
|
1056
|
+
onClick: n
|
|
1057
|
+
}, [...d[0] || (d[0] = [
|
|
1054
1058
|
f("span", {
|
|
1055
1059
|
class: "strand-nav__hamburger-icon",
|
|
1056
1060
|
"aria-hidden": "true"
|
|
1057
1061
|
}, null, -1)
|
|
1058
1062
|
])], 8, Fe)
|
|
1059
1063
|
]),
|
|
1060
|
-
|
|
1064
|
+
a.value ? (l(), r("div", Me, [
|
|
1061
1065
|
(l(!0), r(B, null, C(e.items, (o) => (l(), r("a", {
|
|
1062
1066
|
key: o.href,
|
|
1063
1067
|
href: o.href,
|
|
@@ -1082,18 +1086,18 @@ const K = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
|
1082
1086
|
() => a.status === "error" || a.status === "warning"
|
|
1083
1087
|
), i = c(
|
|
1084
1088
|
() => ["strand-toast", `strand-toast--${a.status}`].filter(Boolean).join(" ")
|
|
1085
|
-
),
|
|
1089
|
+
), d = {
|
|
1086
1090
|
info: "INFO",
|
|
1087
1091
|
success: "COMPLETE",
|
|
1088
1092
|
warning: "WARNING",
|
|
1089
1093
|
error: "ERROR"
|
|
1090
|
-
},
|
|
1094
|
+
}, o = c(() => d[a.status] ?? a.status.toUpperCase());
|
|
1091
1095
|
return (m, v) => (l(), r("div", {
|
|
1092
1096
|
class: b(i.value),
|
|
1093
1097
|
role: "status",
|
|
1094
1098
|
"aria-live": s.value ? "assertive" : "polite"
|
|
1095
1099
|
}, [
|
|
1096
|
-
f("span", Ue, _(
|
|
1100
|
+
f("span", Ue, _(o.value), 1),
|
|
1097
1101
|
f("span", qe, _(e.message), 1),
|
|
1098
1102
|
f("button", {
|
|
1099
1103
|
type: "button",
|
|
@@ -1143,17 +1147,17 @@ const Ge = {
|
|
|
1143
1147
|
clearTimeout(v);
|
|
1144
1148
|
n.clear();
|
|
1145
1149
|
});
|
|
1146
|
-
function
|
|
1150
|
+
function d(v) {
|
|
1147
1151
|
return v === "error" || v === "warning";
|
|
1148
1152
|
}
|
|
1149
|
-
const
|
|
1153
|
+
const o = {
|
|
1150
1154
|
info: "INFO",
|
|
1151
1155
|
success: "COMPLETE",
|
|
1152
1156
|
warning: "WARNING",
|
|
1153
1157
|
error: "ERROR"
|
|
1154
1158
|
};
|
|
1155
1159
|
function m(v) {
|
|
1156
|
-
return
|
|
1160
|
+
return o[v] ?? v.toUpperCase();
|
|
1157
1161
|
}
|
|
1158
1162
|
return (v, u) => (l(), r(B, null, [
|
|
1159
1163
|
y(v.$slots, "default"),
|
|
@@ -1162,7 +1166,7 @@ const Ge = {
|
|
|
1162
1166
|
key: p.id,
|
|
1163
1167
|
class: b(["strand-toast", `strand-toast--${p.status}`].join(" ")),
|
|
1164
1168
|
role: "status",
|
|
1165
|
-
"aria-live":
|
|
1169
|
+
"aria-live": d(p.status) ? "assertive" : "polite"
|
|
1166
1170
|
}, [
|
|
1167
1171
|
f("span", He, _(m(p.status)), 1),
|
|
1168
1172
|
f("span", Ze, _(p.message), 1),
|
|
@@ -1191,12 +1195,12 @@ const Ge = {
|
|
|
1191
1195
|
"strand-alert",
|
|
1192
1196
|
`strand-alert--${a.status}`
|
|
1193
1197
|
].filter(Boolean).join(" ")
|
|
1194
|
-
),
|
|
1198
|
+
), d = {
|
|
1195
1199
|
info: "INFO",
|
|
1196
1200
|
success: "COMPLETE",
|
|
1197
1201
|
warning: "WARNING",
|
|
1198
1202
|
error: "ERROR"
|
|
1199
|
-
},
|
|
1203
|
+
}, o = c(() => d[a.status] ?? a.status.toUpperCase());
|
|
1200
1204
|
function m() {
|
|
1201
1205
|
n("dismiss");
|
|
1202
1206
|
}
|
|
@@ -1204,7 +1208,7 @@ const Ge = {
|
|
|
1204
1208
|
class: b(i.value),
|
|
1205
1209
|
role: s.value
|
|
1206
1210
|
}, [
|
|
1207
|
-
f("span", Xe, _(
|
|
1211
|
+
f("span", Xe, _(o.value), 1),
|
|
1208
1212
|
f("div", Ye, [
|
|
1209
1213
|
y(v.$slots, "default")
|
|
1210
1214
|
]),
|
|
@@ -1232,8 +1236,8 @@ const Ge = {
|
|
|
1232
1236
|
setup(e, { emit: t }) {
|
|
1233
1237
|
const a = e, n = t;
|
|
1234
1238
|
let s = 0;
|
|
1235
|
-
const i = `strand-dialog-title-${++s}`,
|
|
1236
|
-
let
|
|
1239
|
+
const i = `strand-dialog-title-${++s}`, d = w(null);
|
|
1240
|
+
let o = null, m = "";
|
|
1237
1241
|
const v = c(
|
|
1238
1242
|
() => ["strand-dialog__panel"].filter(Boolean).join(" ")
|
|
1239
1243
|
);
|
|
@@ -1243,7 +1247,7 @@ const Ge = {
|
|
|
1243
1247
|
return;
|
|
1244
1248
|
}
|
|
1245
1249
|
if ($.key === "Tab") {
|
|
1246
|
-
const x =
|
|
1250
|
+
const x = d.value;
|
|
1247
1251
|
if (!x) return;
|
|
1248
1252
|
const N = Array.from(
|
|
1249
1253
|
x.querySelectorAll(L)
|
|
@@ -1260,14 +1264,14 @@ const Ge = {
|
|
|
1260
1264
|
() => a.open,
|
|
1261
1265
|
async ($) => {
|
|
1262
1266
|
if ($) {
|
|
1263
|
-
|
|
1264
|
-
const x =
|
|
1267
|
+
o = document.activeElement, m = document.body.style.overflow, document.body.style.overflow = "hidden", await M();
|
|
1268
|
+
const x = d.value;
|
|
1265
1269
|
if (x) {
|
|
1266
1270
|
const N = x.querySelectorAll(L);
|
|
1267
1271
|
N.length > 0 ? N[0].focus() : x.focus();
|
|
1268
1272
|
}
|
|
1269
1273
|
} else
|
|
1270
|
-
document.body.style.overflow = m,
|
|
1274
|
+
document.body.style.overflow = m, o && o instanceof HTMLElement && o.focus();
|
|
1271
1275
|
},
|
|
1272
1276
|
{ immediate: !0 }
|
|
1273
1277
|
), j(() => {
|
|
@@ -1280,7 +1284,7 @@ const Ge = {
|
|
|
1280
1284
|
}, [
|
|
1281
1285
|
f("div", {
|
|
1282
1286
|
ref_key: "panelRef",
|
|
1283
|
-
ref:
|
|
1287
|
+
ref: d,
|
|
1284
1288
|
class: b(v.value),
|
|
1285
1289
|
role: "dialog",
|
|
1286
1290
|
"aria-modal": "true",
|
|
@@ -1317,12 +1321,12 @@ const Ge = {
|
|
|
1317
1321
|
let a = 0;
|
|
1318
1322
|
const n = `strand-tooltip-${++a}`, s = w(!1);
|
|
1319
1323
|
let i = null;
|
|
1320
|
-
function
|
|
1324
|
+
function d() {
|
|
1321
1325
|
i = setTimeout(() => {
|
|
1322
1326
|
s.value = !0;
|
|
1323
1327
|
}, t.delay);
|
|
1324
1328
|
}
|
|
1325
|
-
function
|
|
1329
|
+
function o() {
|
|
1326
1330
|
i !== null && (clearTimeout(i), i = null), s.value = !1;
|
|
1327
1331
|
}
|
|
1328
1332
|
j(() => {
|
|
@@ -1340,10 +1344,10 @@ const Ge = {
|
|
|
1340
1344
|
return (u, p) => (l(), r("span", {
|
|
1341
1345
|
class: b(m.value),
|
|
1342
1346
|
"aria-describedby": n,
|
|
1343
|
-
onMouseenter:
|
|
1344
|
-
onMouseleave:
|
|
1345
|
-
onFocus:
|
|
1346
|
-
onBlur:
|
|
1347
|
+
onMouseenter: d,
|
|
1348
|
+
onMouseleave: o,
|
|
1349
|
+
onFocus: d,
|
|
1350
|
+
onBlur: o
|
|
1347
1351
|
}, [
|
|
1348
1352
|
y(u.$slots, "default"),
|
|
1349
1353
|
f("span", {
|
|
@@ -1371,8 +1375,8 @@ const Ge = {
|
|
|
1371
1375
|
!n.value && "strand-progress--indeterminate",
|
|
1372
1376
|
t.className
|
|
1373
1377
|
].filter(Boolean).join(" ")
|
|
1374
|
-
), i = c(() => a[t.size] ?? a.md),
|
|
1375
|
-
() => n.value ?
|
|
1378
|
+
), i = c(() => a[t.size] ?? a.md), d = c(() => (i.value - T) / 2), o = c(() => 2 * Math.PI * d.value), m = c(
|
|
1379
|
+
() => n.value ? o.value - o.value * t.value / 100 : 0
|
|
1376
1380
|
);
|
|
1377
1381
|
return (v, u) => (l(), r("div", k({
|
|
1378
1382
|
class: s.value,
|
|
@@ -1391,7 +1395,7 @@ const Ge = {
|
|
|
1391
1395
|
f("circle", {
|
|
1392
1396
|
cx: i.value / 2,
|
|
1393
1397
|
cy: i.value / 2,
|
|
1394
|
-
r:
|
|
1398
|
+
r: d.value,
|
|
1395
1399
|
fill: "none",
|
|
1396
1400
|
"stroke-width": T,
|
|
1397
1401
|
class: "strand-progress__track"
|
|
@@ -1399,10 +1403,10 @@ const Ge = {
|
|
|
1399
1403
|
f("circle", {
|
|
1400
1404
|
cx: i.value / 2,
|
|
1401
1405
|
cy: i.value / 2,
|
|
1402
|
-
r:
|
|
1406
|
+
r: d.value,
|
|
1403
1407
|
fill: "none",
|
|
1404
1408
|
"stroke-width": T,
|
|
1405
|
-
"stroke-dasharray":
|
|
1409
|
+
"stroke-dasharray": o.value,
|
|
1406
1410
|
"stroke-dashoffset": n.value ? m.value : void 0,
|
|
1407
1411
|
"stroke-linecap": "round",
|
|
1408
1412
|
class: "strand-progress__fill",
|
|
@@ -1464,11 +1468,11 @@ const Ge = {
|
|
|
1464
1468
|
width: a.value,
|
|
1465
1469
|
height: n.value
|
|
1466
1470
|
}));
|
|
1467
|
-
return (
|
|
1471
|
+
return (d, o) => (l(), r("div", k({
|
|
1468
1472
|
class: s.value,
|
|
1469
1473
|
"aria-hidden": "true",
|
|
1470
1474
|
style: i.value
|
|
1471
|
-
},
|
|
1475
|
+
}, d.$attrs), null, 16));
|
|
1472
1476
|
}
|
|
1473
1477
|
});
|
|
1474
1478
|
export {
|