@dillingerstaffing/strand-vue 0.15.2 → 0.16.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/Nav/Nav.vue.d.ts.map +1 -1
- package/dist/components/StarRating/StarRating.vue.d.ts +13 -0
- package/dist/components/StarRating/StarRating.vue.d.ts.map +1 -0
- package/dist/components/StarRating/index.d.ts +3 -0
- package/dist/components/StarRating/index.d.ts.map +1 -0
- package/dist/css/strand-ui.css +200 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +554 -494
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Nav/Nav.vue +13 -1
- package/src/components/StarRating/StarRating.test.ts +111 -0
- package/src/components/StarRating/StarRating.vue +97 -0
- package/src/components/StarRating/index.ts +2 -0
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as h, computed as
|
|
1
|
+
import { defineComponent as h, computed as f, openBlock as l, createElementBlock as r, normalizeClass as _, createCommentVNode as y, createElementVNode as m, normalizeStyle as O, renderSlot as $, useSlots as V, ref as B, watch as T, onMounted as S, toDisplayString as b, Fragment as w, renderList as C, createTextVNode as I, mergeProps as k, onBeforeUnmount as M, onUnmounted as N, inject as A, provide as F, nextTick as K } from "vue";
|
|
2
2
|
const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "strand-btn__spinner",
|
|
5
5
|
"aria-hidden": "true"
|
|
6
|
-
},
|
|
6
|
+
}, ha = /* @__PURE__ */ h({
|
|
7
7
|
__name: "Button",
|
|
8
8
|
props: {
|
|
9
9
|
variant: { default: "primary" },
|
|
@@ -16,7 +16,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["click"],
|
|
18
18
|
setup(e, { emit: t }) {
|
|
19
|
-
const a = e, n = t, s =
|
|
19
|
+
const a = e, n = t, s = f(() => a.disabled || a.loading), d = f(
|
|
20
20
|
() => [
|
|
21
21
|
"strand-btn",
|
|
22
22
|
`strand-btn--${a.variant}`,
|
|
@@ -26,23 +26,23 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
26
26
|
a.loading && "strand-btn--loading"
|
|
27
27
|
].filter(Boolean).join(" ")
|
|
28
28
|
);
|
|
29
|
-
function
|
|
30
|
-
s.value || n("click",
|
|
29
|
+
function i(o) {
|
|
30
|
+
s.value || n("click", o);
|
|
31
31
|
}
|
|
32
|
-
return (
|
|
32
|
+
return (o, c) => (l(), r("button", {
|
|
33
33
|
type: e.type,
|
|
34
|
-
class:
|
|
34
|
+
class: _(d.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: i
|
|
39
39
|
}, [
|
|
40
|
-
e.loading ? (l(),
|
|
41
|
-
|
|
40
|
+
e.loading ? (l(), r("span", U)) : y("", !0),
|
|
41
|
+
m("span", {
|
|
42
42
|
class: "strand-btn__content",
|
|
43
|
-
style:
|
|
43
|
+
style: O(e.loading ? { visibility: "hidden" } : void 0)
|
|
44
44
|
}, [
|
|
45
|
-
|
|
45
|
+
$(o.$slots, "default")
|
|
46
46
|
], 4)
|
|
47
47
|
], 10, P));
|
|
48
48
|
}
|
|
@@ -54,7 +54,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
54
54
|
key: 1,
|
|
55
55
|
class: "strand-input__trailing",
|
|
56
56
|
"aria-hidden": "true"
|
|
57
|
-
},
|
|
57
|
+
}, ba = /* @__PURE__ */ h({
|
|
58
58
|
__name: "Input",
|
|
59
59
|
props: {
|
|
60
60
|
type: { default: "text" },
|
|
@@ -64,7 +64,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
64
64
|
},
|
|
65
65
|
emits: ["update:modelValue"],
|
|
66
66
|
setup(e, { emit: t }) {
|
|
67
|
-
const a = e, n = t, s =
|
|
67
|
+
const a = e, n = t, s = V(), d = f(
|
|
68
68
|
() => [
|
|
69
69
|
"strand-input",
|
|
70
70
|
a.error && "strand-input--error",
|
|
@@ -73,26 +73,26 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
73
73
|
!!s.trailing && "strand-input--has-trailing"
|
|
74
74
|
].filter(Boolean).join(" ")
|
|
75
75
|
);
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
n("update:modelValue",
|
|
76
|
+
function i(o) {
|
|
77
|
+
const c = o.target;
|
|
78
|
+
n("update:modelValue", c.value);
|
|
79
79
|
}
|
|
80
|
-
return (
|
|
81
|
-
class:
|
|
80
|
+
return (o, c) => (l(), r("div", {
|
|
81
|
+
class: _(d.value)
|
|
82
82
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
o.$slots.leading ? (l(), r("span", q, [
|
|
84
|
+
$(o.$slots, "leading")
|
|
85
85
|
])) : y("", !0),
|
|
86
|
-
|
|
86
|
+
m("input", {
|
|
87
87
|
type: e.type,
|
|
88
88
|
class: "strand-input__field",
|
|
89
89
|
disabled: e.disabled,
|
|
90
90
|
"aria-invalid": e.error ? "true" : void 0,
|
|
91
91
|
value: e.modelValue,
|
|
92
|
-
onInput:
|
|
92
|
+
onInput: i
|
|
93
93
|
}, null, 40, G),
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
o.$slots.trailing ? (l(), r("span", W, [
|
|
95
|
+
$(o.$slots, "trailing")
|
|
96
96
|
])) : y("", !0)
|
|
97
97
|
], 2));
|
|
98
98
|
}
|
|
@@ -100,7 +100,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
100
100
|
key: 0,
|
|
101
101
|
class: "strand-textarea__count",
|
|
102
102
|
"aria-live": "polite"
|
|
103
|
-
},
|
|
103
|
+
}, _a = /* @__PURE__ */ h({
|
|
104
104
|
__name: "Textarea",
|
|
105
105
|
props: {
|
|
106
106
|
autoResize: { type: Boolean, default: !1 },
|
|
@@ -112,31 +112,31 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
112
112
|
},
|
|
113
113
|
emits: ["update:modelValue"],
|
|
114
114
|
setup(e, { emit: t }) {
|
|
115
|
-
const a = e, n = t, s =
|
|
115
|
+
const a = e, n = t, s = B(null), d = f(
|
|
116
116
|
() => [
|
|
117
117
|
"strand-textarea",
|
|
118
118
|
a.error && "strand-textarea--error",
|
|
119
119
|
a.disabled && "strand-textarea--disabled",
|
|
120
120
|
a.autoResize && "strand-textarea--auto-resize"
|
|
121
121
|
].filter(Boolean).join(" ")
|
|
122
|
-
),
|
|
122
|
+
), i = f(
|
|
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
|
-
function
|
|
128
|
+
function c(v) {
|
|
129
129
|
const u = v.target;
|
|
130
|
-
n("update:modelValue", u.value),
|
|
130
|
+
n("update:modelValue", u.value), o();
|
|
131
131
|
}
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
}),
|
|
135
|
-
|
|
136
|
-
}), (v, u) => (l(),
|
|
137
|
-
class:
|
|
132
|
+
return T(() => a.modelValue, () => {
|
|
133
|
+
o();
|
|
134
|
+
}), S(() => {
|
|
135
|
+
o();
|
|
136
|
+
}), (v, u) => (l(), r("div", {
|
|
137
|
+
class: _(d.value)
|
|
138
138
|
}, [
|
|
139
|
-
|
|
139
|
+
m("textarea", {
|
|
140
140
|
ref_key: "textareaRef",
|
|
141
141
|
ref: s,
|
|
142
142
|
class: "strand-textarea__field",
|
|
@@ -144,16 +144,16 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
144
144
|
"aria-invalid": e.error ? "true" : void 0,
|
|
145
145
|
maxlength: e.maxLength,
|
|
146
146
|
value: e.modelValue,
|
|
147
|
-
onInput:
|
|
147
|
+
onInput: c
|
|
148
148
|
}, null, 40, H),
|
|
149
|
-
e.showCount && e.maxLength != null ? (l(),
|
|
149
|
+
e.showCount && e.maxLength != null ? (l(), r("span", Z, b(i.value) + "/" + b(e.maxLength), 1)) : y("", !0)
|
|
150
150
|
], 2));
|
|
151
151
|
}
|
|
152
152
|
}), J = ["value", "disabled", "aria-invalid"], Q = {
|
|
153
153
|
key: 0,
|
|
154
154
|
value: "",
|
|
155
155
|
disabled: ""
|
|
156
|
-
}, X = ["value"],
|
|
156
|
+
}, X = ["value"], pa = /* @__PURE__ */ h({
|
|
157
157
|
__name: "Select",
|
|
158
158
|
props: {
|
|
159
159
|
options: {},
|
|
@@ -164,34 +164,34 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
164
164
|
},
|
|
165
165
|
emits: ["update:modelValue"],
|
|
166
166
|
setup(e, { emit: t }) {
|
|
167
|
-
const a = e, n = t, s =
|
|
167
|
+
const a = e, n = t, s = f(
|
|
168
168
|
() => [
|
|
169
169
|
"strand-select",
|
|
170
170
|
a.error && "strand-select--error",
|
|
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 d(i) {
|
|
175
|
+
const o = i.target;
|
|
176
|
+
n("update:modelValue", o.value);
|
|
177
177
|
}
|
|
178
|
-
return (
|
|
179
|
-
class:
|
|
178
|
+
return (i, o) => (l(), r("div", {
|
|
179
|
+
class: _(s.value)
|
|
180
180
|
}, [
|
|
181
|
-
|
|
181
|
+
m("select", {
|
|
182
182
|
class: "strand-select__field",
|
|
183
183
|
value: e.modelValue,
|
|
184
184
|
disabled: e.disabled,
|
|
185
185
|
"aria-invalid": e.error ? "true" : void 0,
|
|
186
|
-
onChange:
|
|
186
|
+
onChange: d
|
|
187
187
|
}, [
|
|
188
|
-
e.placeholder ? (l(),
|
|
189
|
-
(l(!0),
|
|
190
|
-
key:
|
|
191
|
-
value:
|
|
192
|
-
},
|
|
188
|
+
e.placeholder ? (l(), r("option", Q, b(e.placeholder), 1)) : y("", !0),
|
|
189
|
+
(l(!0), r(w, null, C(e.options, (c) => (l(), r("option", {
|
|
190
|
+
key: c.value,
|
|
191
|
+
value: c.value
|
|
192
|
+
}, b(c.label), 9, X))), 128))
|
|
193
193
|
], 40, J),
|
|
194
|
-
|
|
194
|
+
o[0] || (o[0] = m("span", {
|
|
195
195
|
class: "strand-select__arrow",
|
|
196
196
|
"aria-hidden": "true"
|
|
197
197
|
}, null, -1))
|
|
@@ -213,7 +213,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
213
213
|
}, se = {
|
|
214
214
|
key: 0,
|
|
215
215
|
class: "strand-checkbox__label"
|
|
216
|
-
},
|
|
216
|
+
}, ya = /* @__PURE__ */ h({
|
|
217
217
|
__name: "Checkbox",
|
|
218
218
|
props: {
|
|
219
219
|
checked: { type: Boolean, default: !1 },
|
|
@@ -223,46 +223,46 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
223
223
|
},
|
|
224
224
|
emits: ["change"],
|
|
225
225
|
setup(e, { emit: t }) {
|
|
226
|
-
const a = e, n = t, s =
|
|
227
|
-
|
|
226
|
+
const a = e, n = t, s = B(null);
|
|
227
|
+
S(() => {
|
|
228
228
|
s.value && (s.value.indeterminate = a.indeterminate);
|
|
229
|
-
}),
|
|
229
|
+
}), T(() => a.indeterminate, (v) => {
|
|
230
230
|
s.value && (s.value.indeterminate = v);
|
|
231
231
|
});
|
|
232
|
-
const
|
|
232
|
+
const d = f(
|
|
233
233
|
() => [
|
|
234
234
|
"strand-checkbox",
|
|
235
235
|
a.checked && "strand-checkbox--checked",
|
|
236
236
|
a.indeterminate && "strand-checkbox--indeterminate",
|
|
237
237
|
a.disabled && "strand-checkbox--disabled"
|
|
238
238
|
].filter(Boolean).join(" ")
|
|
239
|
-
),
|
|
239
|
+
), i = f(
|
|
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
|
-
function
|
|
245
|
+
function c(v) {
|
|
246
246
|
v.key === " " && !a.disabled && (v.preventDefault(), s.value && s.value.click());
|
|
247
247
|
}
|
|
248
|
-
return (v, u) => (l(),
|
|
249
|
-
class:
|
|
250
|
-
onKeydown:
|
|
248
|
+
return (v, u) => (l(), r("label", {
|
|
249
|
+
class: _(d.value),
|
|
250
|
+
onKeydown: c
|
|
251
251
|
}, [
|
|
252
|
-
|
|
252
|
+
m("input", {
|
|
253
253
|
ref_key: "inputRef",
|
|
254
254
|
ref: s,
|
|
255
255
|
type: "checkbox",
|
|
256
256
|
class: "strand-checkbox__native",
|
|
257
257
|
checked: e.checked,
|
|
258
258
|
disabled: e.disabled,
|
|
259
|
-
"aria-checked":
|
|
259
|
+
"aria-checked": i.value,
|
|
260
260
|
role: "checkbox",
|
|
261
|
-
onChange:
|
|
261
|
+
onChange: o
|
|
262
262
|
}, null, 40, Y),
|
|
263
|
-
|
|
264
|
-
e.indeterminate ? (l(),
|
|
265
|
-
|
|
263
|
+
m("span", ee, [
|
|
264
|
+
e.indeterminate ? (l(), r("svg", ae, [...u[0] || (u[0] = [
|
|
265
|
+
m("line", {
|
|
266
266
|
x1: "4",
|
|
267
267
|
y1: "8",
|
|
268
268
|
x2: "12",
|
|
@@ -271,8 +271,8 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
271
271
|
"stroke-width": "2",
|
|
272
272
|
"stroke-linecap": "round"
|
|
273
273
|
}, null, -1)
|
|
274
|
-
])])) : e.checked ? (l(),
|
|
275
|
-
|
|
274
|
+
])])) : e.checked ? (l(), r("svg", te, [...u[1] || (u[1] = [
|
|
275
|
+
m("path", {
|
|
276
276
|
d: "M3.5 8L6.5 11L12.5 5",
|
|
277
277
|
stroke: "currentColor",
|
|
278
278
|
"stroke-width": "2",
|
|
@@ -281,13 +281,13 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
281
281
|
}, null, -1)
|
|
282
282
|
])])) : y("", !0)
|
|
283
283
|
]),
|
|
284
|
-
e.label ? (l(),
|
|
284
|
+
e.label ? (l(), r("span", se, b(e.label), 1)) : y("", !0)
|
|
285
285
|
], 34));
|
|
286
286
|
}
|
|
287
287
|
}), ne = ["checked", "disabled", "name", "value"], le = {
|
|
288
288
|
key: 0,
|
|
289
289
|
class: "strand-radio__label"
|
|
290
|
-
},
|
|
290
|
+
}, ga = /* @__PURE__ */ h({
|
|
291
291
|
__name: "Radio",
|
|
292
292
|
props: {
|
|
293
293
|
checked: { type: Boolean, default: !1 },
|
|
@@ -298,41 +298,41 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
298
298
|
},
|
|
299
299
|
emits: ["change"],
|
|
300
300
|
setup(e, { emit: t }) {
|
|
301
|
-
const a = e, n = t, s =
|
|
301
|
+
const a = e, n = t, s = f(
|
|
302
302
|
() => [
|
|
303
303
|
"strand-radio",
|
|
304
304
|
a.checked && "strand-radio--checked",
|
|
305
305
|
a.disabled && "strand-radio--disabled"
|
|
306
306
|
].filter(Boolean).join(" ")
|
|
307
307
|
);
|
|
308
|
-
function i
|
|
309
|
-
a.disabled || n("change",
|
|
308
|
+
function d(i) {
|
|
309
|
+
a.disabled || n("change", i);
|
|
310
310
|
}
|
|
311
|
-
return (
|
|
312
|
-
class:
|
|
311
|
+
return (i, o) => (l(), r("label", {
|
|
312
|
+
class: _(s.value)
|
|
313
313
|
}, [
|
|
314
|
-
|
|
314
|
+
m("input", {
|
|
315
315
|
type: "radio",
|
|
316
316
|
class: "strand-radio__native",
|
|
317
317
|
checked: e.checked,
|
|
318
318
|
disabled: e.disabled,
|
|
319
319
|
name: e.name,
|
|
320
320
|
value: e.value,
|
|
321
|
-
onChange:
|
|
321
|
+
onChange: d
|
|
322
322
|
}, null, 40, ne),
|
|
323
|
-
|
|
323
|
+
o[0] || (o[0] = m("span", {
|
|
324
324
|
class: "strand-radio__control",
|
|
325
325
|
"aria-hidden": "true"
|
|
326
326
|
}, [
|
|
327
|
-
|
|
327
|
+
m("span", { class: "strand-radio__dot" })
|
|
328
328
|
], -1)),
|
|
329
|
-
e.label ? (l(),
|
|
329
|
+
e.label ? (l(), r("span", le, b(e.label), 1)) : y("", !0)
|
|
330
330
|
], 2));
|
|
331
331
|
}
|
|
332
|
-
}),
|
|
332
|
+
}), re = ["aria-checked", "disabled"], oe = {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "strand-switch__label"
|
|
335
|
-
},
|
|
335
|
+
}, $a = /* @__PURE__ */ h({
|
|
336
336
|
__name: "Switch",
|
|
337
337
|
props: {
|
|
338
338
|
checked: { type: Boolean, default: !1 },
|
|
@@ -341,40 +341,40 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
341
341
|
},
|
|
342
342
|
emits: ["change"],
|
|
343
343
|
setup(e, { emit: t }) {
|
|
344
|
-
const a = e, n = t, s =
|
|
344
|
+
const a = e, n = t, s = f(
|
|
345
345
|
() => [
|
|
346
346
|
"strand-switch",
|
|
347
347
|
a.checked && "strand-switch--checked",
|
|
348
348
|
a.disabled && "strand-switch--disabled"
|
|
349
349
|
].filter(Boolean).join(" ")
|
|
350
350
|
);
|
|
351
|
-
function
|
|
351
|
+
function d() {
|
|
352
352
|
a.disabled || n("change", !a.checked);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
(
|
|
354
|
+
function i(o) {
|
|
355
|
+
(o.key === " " || o.key === "Enter") && !a.disabled && (o.preventDefault(), n("change", !a.checked));
|
|
356
356
|
}
|
|
357
|
-
return (
|
|
358
|
-
class:
|
|
357
|
+
return (o, c) => (l(), r("label", {
|
|
358
|
+
class: _(s.value)
|
|
359
359
|
}, [
|
|
360
|
-
|
|
360
|
+
m("button", {
|
|
361
361
|
type: "button",
|
|
362
362
|
role: "switch",
|
|
363
363
|
class: "strand-switch__track",
|
|
364
364
|
"aria-checked": e.checked ? "true" : "false",
|
|
365
365
|
disabled: e.disabled,
|
|
366
|
-
onClick:
|
|
367
|
-
onKeydown:
|
|
368
|
-
}, [...
|
|
369
|
-
|
|
366
|
+
onClick: d,
|
|
367
|
+
onKeydown: i
|
|
368
|
+
}, [...c[0] || (c[0] = [
|
|
369
|
+
m("span", {
|
|
370
370
|
class: "strand-switch__thumb",
|
|
371
371
|
"aria-hidden": "true"
|
|
372
372
|
}, null, -1)
|
|
373
|
-
])], 40,
|
|
374
|
-
e.label ? (l(),
|
|
373
|
+
])], 40, re),
|
|
374
|
+
e.label ? (l(), r("span", oe, b(e.label), 1)) : y("", !0)
|
|
375
375
|
], 2));
|
|
376
376
|
}
|
|
377
|
-
}), ie = ["min", "max", "step", "value", "disabled", "aria-valuemin", "aria-valuemax", "aria-valuenow"],
|
|
377
|
+
}), ie = ["min", "max", "step", "value", "disabled", "aria-valuemin", "aria-valuemax", "aria-valuenow"], ka = /* @__PURE__ */ h({
|
|
378
378
|
__name: "Slider",
|
|
379
379
|
props: {
|
|
380
380
|
min: { default: 0 },
|
|
@@ -385,20 +385,20 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
385
385
|
},
|
|
386
386
|
emits: ["update:modelValue"],
|
|
387
387
|
setup(e, { emit: t }) {
|
|
388
|
-
const a = e, n = t, s =
|
|
388
|
+
const a = e, n = t, s = f(
|
|
389
389
|
() => [
|
|
390
390
|
"strand-slider",
|
|
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 d(i) {
|
|
395
|
+
const o = i.target;
|
|
396
|
+
n("update:modelValue", Number(o.value));
|
|
397
397
|
}
|
|
398
|
-
return (
|
|
399
|
-
class:
|
|
398
|
+
return (i, o) => (l(), r("div", {
|
|
399
|
+
class: _(s.value)
|
|
400
400
|
}, [
|
|
401
|
-
|
|
401
|
+
m("input", {
|
|
402
402
|
type: "range",
|
|
403
403
|
class: "strand-slider__field",
|
|
404
404
|
min: e.min,
|
|
@@ -409,7 +409,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
409
409
|
"aria-valuemin": e.min,
|
|
410
410
|
"aria-valuemax": e.max,
|
|
411
411
|
"aria-valuenow": e.modelValue,
|
|
412
|
-
onInput:
|
|
412
|
+
onInput: d
|
|
413
413
|
}, null, 40, ie)
|
|
414
414
|
], 2));
|
|
415
415
|
}
|
|
@@ -417,7 +417,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
417
417
|
key: 0,
|
|
418
418
|
class: "strand-form-field__required",
|
|
419
419
|
"aria-hidden": "true"
|
|
420
|
-
}, ue = { class: "strand-form-field__control" }, fe = ["id"], ve = ["id"],
|
|
420
|
+
}, ue = { class: "strand-form-field__control" }, fe = ["id"], ve = ["id"], Ba = /* @__PURE__ */ h({
|
|
421
421
|
__name: "FormField",
|
|
422
422
|
props: {
|
|
423
423
|
label: {},
|
|
@@ -427,38 +427,38 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
427
427
|
required: { type: Boolean, default: !1 }
|
|
428
428
|
},
|
|
429
429
|
setup(e) {
|
|
430
|
-
const t = e, a =
|
|
430
|
+
const t = e, a = f(
|
|
431
431
|
() => [
|
|
432
432
|
"strand-form-field",
|
|
433
433
|
t.error && "strand-form-field--error"
|
|
434
434
|
].filter(Boolean).join(" ")
|
|
435
435
|
);
|
|
436
|
-
return (n, s) => (l(),
|
|
437
|
-
class:
|
|
436
|
+
return (n, s) => (l(), r("div", {
|
|
437
|
+
class: _(a.value)
|
|
438
438
|
}, [
|
|
439
|
-
|
|
439
|
+
m("label", {
|
|
440
440
|
class: "strand-form-field__label",
|
|
441
441
|
for: e.htmlFor
|
|
442
442
|
}, [
|
|
443
|
-
|
|
444
|
-
e.required ? (l(),
|
|
443
|
+
I(b(e.label) + " ", 1),
|
|
444
|
+
e.required ? (l(), r("span", ce, " * ")) : y("", !0)
|
|
445
445
|
], 8, de),
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
m("div", ue, [
|
|
447
|
+
$(n.$slots, "default")
|
|
448
448
|
]),
|
|
449
|
-
e.error ? (l(),
|
|
449
|
+
e.error ? (l(), r("p", {
|
|
450
450
|
key: 0,
|
|
451
451
|
class: "strand-form-field__error",
|
|
452
452
|
id: `${e.htmlFor}-error`,
|
|
453
453
|
role: "alert"
|
|
454
|
-
},
|
|
454
|
+
}, b(e.error), 9, fe)) : e.hint ? (l(), r("p", {
|
|
455
455
|
key: 1,
|
|
456
456
|
class: "strand-form-field__hint",
|
|
457
457
|
id: `${e.htmlFor}-hint`
|
|
458
|
-
},
|
|
458
|
+
}, b(e.hint), 9, ve)) : y("", !0)
|
|
459
459
|
], 2));
|
|
460
460
|
}
|
|
461
|
-
}),
|
|
461
|
+
}), wa = /* @__PURE__ */ h({
|
|
462
462
|
__name: "Card",
|
|
463
463
|
props: {
|
|
464
464
|
variant: { default: "elevated" },
|
|
@@ -466,7 +466,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
466
466
|
className: { default: "" }
|
|
467
467
|
},
|
|
468
468
|
setup(e) {
|
|
469
|
-
const t = e, a =
|
|
469
|
+
const t = e, a = f(
|
|
470
470
|
() => [
|
|
471
471
|
"strand-card",
|
|
472
472
|
`strand-card--${t.variant}`,
|
|
@@ -474,11 +474,11 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
474
474
|
t.className
|
|
475
475
|
].filter(Boolean).join(" ")
|
|
476
476
|
);
|
|
477
|
-
return (n, s) => (l(),
|
|
478
|
-
|
|
477
|
+
return (n, s) => (l(), r("div", k({ class: a.value }, n.$attrs), [
|
|
478
|
+
$(n.$slots, "default")
|
|
479
479
|
], 16));
|
|
480
480
|
}
|
|
481
|
-
}), me = ["aria-label"],
|
|
481
|
+
}), me = ["aria-label"], Ca = /* @__PURE__ */ h({
|
|
482
482
|
__name: "Badge",
|
|
483
483
|
props: {
|
|
484
484
|
variant: { default: "count" },
|
|
@@ -488,32 +488,32 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
488
488
|
className: { default: "" }
|
|
489
489
|
},
|
|
490
490
|
setup(e) {
|
|
491
|
-
const t = e, a =
|
|
491
|
+
const t = e, a = V(), n = f(() => !!a.default), s = f(() => t.variant === "count" ? t.count != null && t.count > t.maxCount ? `${t.maxCount}+` : t.count : null), d = f(() => {
|
|
492
492
|
if (t.variant === "dot") return "Status indicator";
|
|
493
493
|
if (t.count != null) return `${t.count} notifications`;
|
|
494
|
-
}),
|
|
494
|
+
}), i = f(
|
|
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 = f(
|
|
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 (
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
class:
|
|
507
|
-
"aria-label":
|
|
503
|
+
return (c, v) => (l(), r("span", k({ class: o.value }, c.$attrs), [
|
|
504
|
+
$(c.$slots, "default"),
|
|
505
|
+
m("span", {
|
|
506
|
+
class: _(i.value),
|
|
507
|
+
"aria-label": d.value,
|
|
508
508
|
role: "status"
|
|
509
|
-
},
|
|
509
|
+
}, b(s.value), 11, me)
|
|
510
510
|
], 16));
|
|
511
511
|
}
|
|
512
|
-
}), he = ["aria-label"],
|
|
512
|
+
}), he = ["aria-label"], be = ["src", "alt"], _e = {
|
|
513
513
|
key: 1,
|
|
514
514
|
class: "strand-avatar__initials",
|
|
515
515
|
"aria-hidden": "true"
|
|
516
|
-
},
|
|
516
|
+
}, xa = /* @__PURE__ */ h({
|
|
517
517
|
__name: "Avatar",
|
|
518
518
|
props: {
|
|
519
519
|
src: {},
|
|
@@ -523,30 +523,30 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
523
523
|
className: { default: "" }
|
|
524
524
|
},
|
|
525
525
|
setup(e) {
|
|
526
|
-
const t = e, a =
|
|
526
|
+
const t = e, a = B(!1), n = () => {
|
|
527
527
|
a.value = !0;
|
|
528
|
-
}, s =
|
|
528
|
+
}, s = f(() => t.src && !a.value), d = f(() => t.initials.slice(0, 2).toUpperCase()), i = f(
|
|
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, c) => (l(), r("div", k({
|
|
536
|
+
class: i.value,
|
|
537
537
|
role: "img",
|
|
538
|
-
"aria-label": e.alt ||
|
|
539
|
-
},
|
|
540
|
-
s.value ? (l(),
|
|
538
|
+
"aria-label": e.alt || d.value
|
|
539
|
+
}, o.$attrs), [
|
|
540
|
+
s.value ? (l(), r("img", {
|
|
541
541
|
key: 0,
|
|
542
542
|
class: "strand-avatar__img",
|
|
543
543
|
src: e.src,
|
|
544
544
|
alt: e.alt,
|
|
545
545
|
onError: n
|
|
546
|
-
}, null, 40,
|
|
546
|
+
}, null, 40, be)) : (l(), r("span", _e, b(d.value), 1))
|
|
547
547
|
], 16, he));
|
|
548
548
|
}
|
|
549
|
-
}), pe = { class: "strand-tag__text" },
|
|
549
|
+
}), pe = { class: "strand-tag__text" }, ja = /* @__PURE__ */ h({
|
|
550
550
|
__name: "Tag",
|
|
551
551
|
props: {
|
|
552
552
|
variant: { default: "solid" },
|
|
@@ -556,7 +556,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
556
556
|
},
|
|
557
557
|
emits: ["remove"],
|
|
558
558
|
setup(e, { emit: t }) {
|
|
559
|
-
const a = e, n = t, s =
|
|
559
|
+
const a = e, n = t, s = f(
|
|
560
560
|
() => [
|
|
561
561
|
"strand-tag",
|
|
562
562
|
`strand-tag--${a.variant}`,
|
|
@@ -564,25 +564,25 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
564
564
|
a.className
|
|
565
565
|
].filter(Boolean).join(" ")
|
|
566
566
|
);
|
|
567
|
-
return (
|
|
568
|
-
|
|
569
|
-
|
|
567
|
+
return (d, i) => (l(), r("span", k({ class: s.value }, d.$attrs), [
|
|
568
|
+
m("span", pe, [
|
|
569
|
+
$(d.$slots, "default")
|
|
570
570
|
]),
|
|
571
|
-
e.removable ? (l(),
|
|
571
|
+
e.removable ? (l(), r("button", {
|
|
572
572
|
key: 0,
|
|
573
573
|
type: "button",
|
|
574
574
|
class: "strand-tag__remove",
|
|
575
575
|
"aria-label": "Remove",
|
|
576
|
-
onClick:
|
|
577
|
-
}, [...
|
|
578
|
-
|
|
576
|
+
onClick: i[0] || (i[0] = (o) => n("remove"))
|
|
577
|
+
}, [...i[1] || (i[1] = [
|
|
578
|
+
m("svg", {
|
|
579
579
|
width: "12",
|
|
580
580
|
height: "12",
|
|
581
581
|
viewBox: "0 0 12 12",
|
|
582
582
|
fill: "none",
|
|
583
583
|
"aria-hidden": "true"
|
|
584
584
|
}, [
|
|
585
|
-
|
|
585
|
+
m("path", {
|
|
586
586
|
d: "M3 3l6 6M9 3l-6 6",
|
|
587
587
|
stroke: "currentColor",
|
|
588
588
|
"stroke-width": "1.5",
|
|
@@ -592,10 +592,10 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
592
592
|
])])) : y("", !0)
|
|
593
593
|
], 16));
|
|
594
594
|
}
|
|
595
|
-
}), ye = { class: "strand-table" },
|
|
595
|
+
}), ye = { class: "strand-table" }, ge = { class: "strand-table__head" }, $e = ["aria-label", "onClick"], ke = {
|
|
596
596
|
class: "strand-table__sort-indicator",
|
|
597
597
|
"aria-hidden": "true"
|
|
598
|
-
},
|
|
598
|
+
}, Be = { class: "strand-table__body" }, Na = /* @__PURE__ */ h({
|
|
599
599
|
__name: "Table",
|
|
600
600
|
props: {
|
|
601
601
|
columns: {},
|
|
@@ -603,57 +603,57 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
603
603
|
},
|
|
604
604
|
emits: ["sort"],
|
|
605
605
|
setup(e, { emit: t }) {
|
|
606
|
-
const a = t, n =
|
|
606
|
+
const a = t, n = B(null), s = B("asc"), d = f(
|
|
607
607
|
() => ["strand-table-wrapper"].filter(Boolean).join(" ")
|
|
608
608
|
);
|
|
609
|
-
function
|
|
610
|
-
const v = n.value ===
|
|
611
|
-
n.value =
|
|
609
|
+
function i(c) {
|
|
610
|
+
const v = n.value === c && s.value === "asc" ? "desc" : "asc";
|
|
611
|
+
n.value = c, s.value = v, a("sort", c, v);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
return n.value ===
|
|
613
|
+
function o(c) {
|
|
614
|
+
return n.value === c ? s.value === "asc" ? "↑" : "↓" : "↕";
|
|
615
615
|
}
|
|
616
|
-
return (
|
|
617
|
-
class:
|
|
616
|
+
return (c, v) => (l(), r("div", {
|
|
617
|
+
class: _(d.value)
|
|
618
618
|
}, [
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
(l(!0),
|
|
619
|
+
m("table", ye, [
|
|
620
|
+
m("thead", ge, [
|
|
621
|
+
m("tr", null, [
|
|
622
|
+
(l(!0), r(w, null, C(e.columns, (u) => (l(), r("th", {
|
|
623
623
|
key: u.key,
|
|
624
624
|
class: "strand-table__th",
|
|
625
|
-
style:
|
|
625
|
+
style: O(u.width ? { width: u.width } : void 0)
|
|
626
626
|
}, [
|
|
627
|
-
u.sortable ? (l(),
|
|
627
|
+
u.sortable ? (l(), r("button", {
|
|
628
628
|
key: 0,
|
|
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) => i(u.key)
|
|
633
633
|
}, [
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
], 8,
|
|
637
|
-
|
|
634
|
+
I(b(u.header) + " ", 1),
|
|
635
|
+
m("span", ke, b(o(u.key)), 1)
|
|
636
|
+
], 8, $e)) : (l(), r(w, { key: 1 }, [
|
|
637
|
+
I(b(u.header), 1)
|
|
638
638
|
], 64))
|
|
639
639
|
], 4))), 128))
|
|
640
640
|
])
|
|
641
641
|
]),
|
|
642
|
-
|
|
643
|
-
(l(!0),
|
|
642
|
+
m("tbody", Be, [
|
|
643
|
+
(l(!0), r(w, null, C(e.data, (u, p) => (l(), r("tr", {
|
|
644
644
|
key: p,
|
|
645
645
|
class: "strand-table__row"
|
|
646
646
|
}, [
|
|
647
|
-
(l(!0),
|
|
648
|
-
key:
|
|
647
|
+
(l(!0), r(w, null, C(e.columns, (g) => (l(), r("td", {
|
|
648
|
+
key: g.key,
|
|
649
649
|
class: "strand-table__td"
|
|
650
|
-
},
|
|
650
|
+
}, b(u[g.key]), 1))), 128))
|
|
651
651
|
]))), 128))
|
|
652
652
|
])
|
|
653
653
|
])
|
|
654
654
|
], 2));
|
|
655
655
|
}
|
|
656
|
-
}),
|
|
656
|
+
}), we = { class: "strand-data-readout__label" }, Ce = { class: "strand-data-readout__value" }, Ta = /* @__PURE__ */ h({
|
|
657
657
|
__name: "DataReadout",
|
|
658
658
|
props: {
|
|
659
659
|
label: {},
|
|
@@ -662,22 +662,22 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
662
662
|
className: { default: "" }
|
|
663
663
|
},
|
|
664
664
|
setup(e) {
|
|
665
|
-
const t = e, a =
|
|
665
|
+
const t = e, a = f(
|
|
666
666
|
() => [
|
|
667
667
|
"strand-data-readout",
|
|
668
668
|
t.size && t.size !== "md" ? `strand-data-readout--${t.size}` : "",
|
|
669
669
|
t.className
|
|
670
670
|
].filter(Boolean).join(" ")
|
|
671
671
|
);
|
|
672
|
-
return (n, s) => (l(),
|
|
673
|
-
|
|
674
|
-
|
|
672
|
+
return (n, s) => (l(), r("div", k({ class: a.value }, n.$attrs), [
|
|
673
|
+
m("span", we, b(e.label), 1),
|
|
674
|
+
m("span", Ce, b(e.value), 1)
|
|
675
675
|
], 16));
|
|
676
676
|
}
|
|
677
|
-
}), xe = ["data-strand-copy"],
|
|
677
|
+
}), xe = ["data-strand-copy"], je = {
|
|
678
678
|
key: 0,
|
|
679
679
|
class: "strand-code-block__label"
|
|
680
|
-
},
|
|
680
|
+
}, Ne = { class: "strand-code-block__pre" }, Te = ["aria-label"], Se = 1500, Sa = /* @__PURE__ */ h({
|
|
681
681
|
__name: "CodeBlock",
|
|
682
682
|
props: {
|
|
683
683
|
code: {},
|
|
@@ -686,44 +686,44 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
686
686
|
copyable: { type: Boolean, default: !0 }
|
|
687
687
|
},
|
|
688
688
|
setup(e) {
|
|
689
|
-
const t = e, a =
|
|
689
|
+
const t = e, a = f(
|
|
690
690
|
() => ["strand-code-block", t.className].filter(Boolean).join(" ")
|
|
691
|
-
), n =
|
|
691
|
+
), n = B(!1);
|
|
692
692
|
let s = null;
|
|
693
693
|
M(() => {
|
|
694
694
|
s !== null && window.clearTimeout(s);
|
|
695
695
|
});
|
|
696
|
-
async function
|
|
697
|
-
var
|
|
696
|
+
async function d() {
|
|
697
|
+
var i;
|
|
698
698
|
try {
|
|
699
|
-
if ((
|
|
699
|
+
if ((i = navigator.clipboard) != null && i.writeText)
|
|
700
700
|
await navigator.clipboard.writeText(t.code);
|
|
701
701
|
else {
|
|
702
|
-
const
|
|
703
|
-
|
|
702
|
+
const o = document.createElement("textarea");
|
|
703
|
+
o.value = t.code, o.setAttribute("readonly", ""), o.style.position = "absolute", o.style.left = "-9999px", document.body.appendChild(o), o.select(), document.execCommand("copy"), document.body.removeChild(o);
|
|
704
704
|
}
|
|
705
705
|
n.value = !0, s !== null && window.clearTimeout(s), s = window.setTimeout(() => {
|
|
706
706
|
n.value = !1;
|
|
707
|
-
},
|
|
707
|
+
}, Se);
|
|
708
708
|
} catch {
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
return (
|
|
711
|
+
return (i, o) => (l(), r("div", k({
|
|
712
712
|
class: a.value,
|
|
713
713
|
"data-strand-copy": e.copyable ? "" : void 0
|
|
714
|
-
},
|
|
715
|
-
e.language ? (l(),
|
|
716
|
-
|
|
717
|
-
|
|
714
|
+
}, i.$attrs), [
|
|
715
|
+
e.language ? (l(), r("span", je, b(e.language), 1)) : y("", !0),
|
|
716
|
+
m("pre", Ne, [
|
|
717
|
+
m("code", null, b(e.code), 1)
|
|
718
718
|
]),
|
|
719
|
-
e.copyable ? (l(),
|
|
719
|
+
e.copyable ? (l(), r("button", {
|
|
720
720
|
key: 1,
|
|
721
721
|
type: "button",
|
|
722
|
-
class:
|
|
722
|
+
class: _(["strand-code-block__copy", n.value ? "strand-code-block__copy--copied" : ""]),
|
|
723
723
|
"aria-label": n.value ? "Copied" : "Copy code to clipboard",
|
|
724
|
-
onClick:
|
|
725
|
-
}, [...
|
|
726
|
-
|
|
724
|
+
onClick: d
|
|
725
|
+
}, [...o[0] || (o[0] = [
|
|
726
|
+
m("svg", {
|
|
727
727
|
class: "strand-code-block__copy-icon strand-code-block__copy-icon--clipboard",
|
|
728
728
|
viewBox: "0 0 16 16",
|
|
729
729
|
fill: "none",
|
|
@@ -734,9 +734,9 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
734
734
|
"aria-hidden": "true",
|
|
735
735
|
focusable: "false"
|
|
736
736
|
}, [
|
|
737
|
-
|
|
737
|
+
m("path", { d: "M6 3 V2 a1 1 0 0 1 1-1 h2 a1 1 0 0 1 1 1 v1 M5 3 h6 a1 1 0 0 1 1 1 v9 a1 1 0 0 1 -1 1 h-6 a1 1 0 0 1 -1 -1 v-9 a1 1 0 0 1 1 -1 z" })
|
|
738
738
|
], -1),
|
|
739
|
-
|
|
739
|
+
m("svg", {
|
|
740
740
|
class: "strand-code-block__copy-icon strand-code-block__copy-icon--check",
|
|
741
741
|
viewBox: "0 0 16 16",
|
|
742
742
|
fill: "none",
|
|
@@ -747,12 +747,12 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
747
747
|
"aria-hidden": "true",
|
|
748
748
|
focusable: "false"
|
|
749
749
|
}, [
|
|
750
|
-
|
|
750
|
+
m("path", { d: "M3 8 l3 3 l7 -7" })
|
|
751
751
|
], -1)
|
|
752
752
|
])], 10, Te)) : y("", !0)
|
|
753
753
|
], 16, xe));
|
|
754
754
|
}
|
|
755
|
-
}),
|
|
755
|
+
}), Ra = /* @__PURE__ */ h({
|
|
756
756
|
__name: "Stack",
|
|
757
757
|
props: {
|
|
758
758
|
direction: { default: "vertical" },
|
|
@@ -763,7 +763,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
763
763
|
className: { default: "" }
|
|
764
764
|
},
|
|
765
765
|
setup(e) {
|
|
766
|
-
const t = e, a =
|
|
766
|
+
const t = e, a = f(
|
|
767
767
|
() => [
|
|
768
768
|
"strand-stack",
|
|
769
769
|
`strand-stack--${t.direction}`,
|
|
@@ -772,17 +772,17 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
772
772
|
t.wrap && "strand-stack--wrap",
|
|
773
773
|
t.className
|
|
774
774
|
].filter(Boolean).join(" ")
|
|
775
|
-
), n =
|
|
775
|
+
), n = f(() => ({
|
|
776
776
|
gap: `var(--strand-space-${t.gap})`
|
|
777
777
|
}));
|
|
778
|
-
return (s,
|
|
778
|
+
return (s, d) => (l(), r("div", k({
|
|
779
779
|
class: a.value,
|
|
780
780
|
style: n.value
|
|
781
781
|
}, s.$attrs), [
|
|
782
|
-
|
|
782
|
+
$(s.$slots, "default")
|
|
783
783
|
], 16));
|
|
784
784
|
}
|
|
785
|
-
}),
|
|
785
|
+
}), Ia = /* @__PURE__ */ h({
|
|
786
786
|
__name: "Grid",
|
|
787
787
|
props: {
|
|
788
788
|
columns: { default: 1 },
|
|
@@ -790,38 +790,38 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
790
790
|
className: { default: "" }
|
|
791
791
|
},
|
|
792
792
|
setup(e) {
|
|
793
|
-
const t = e, a =
|
|
793
|
+
const t = e, a = f(
|
|
794
794
|
() => ["strand-grid", t.className].filter(Boolean).join(" ")
|
|
795
|
-
), n =
|
|
795
|
+
), n = f(() => ({
|
|
796
796
|
gridTemplateColumns: `repeat(${t.columns}, 1fr)`,
|
|
797
797
|
gap: `var(--strand-space-${t.gap})`
|
|
798
798
|
}));
|
|
799
|
-
return (s,
|
|
799
|
+
return (s, d) => (l(), r("div", k({
|
|
800
800
|
class: a.value,
|
|
801
801
|
style: n.value
|
|
802
802
|
}, s.$attrs), [
|
|
803
|
-
|
|
803
|
+
$(s.$slots, "default")
|
|
804
804
|
], 16));
|
|
805
805
|
}
|
|
806
|
-
}),
|
|
806
|
+
}), Oa = /* @__PURE__ */ h({
|
|
807
807
|
__name: "Container",
|
|
808
808
|
props: {
|
|
809
809
|
size: { default: "default" },
|
|
810
810
|
className: { default: "" }
|
|
811
811
|
},
|
|
812
812
|
setup(e) {
|
|
813
|
-
const t = e, a =
|
|
813
|
+
const t = e, a = f(
|
|
814
814
|
() => [
|
|
815
815
|
"strand-container",
|
|
816
816
|
`strand-container--${t.size}`,
|
|
817
817
|
t.className
|
|
818
818
|
].filter(Boolean).join(" ")
|
|
819
819
|
);
|
|
820
|
-
return (n, s) => (l(),
|
|
821
|
-
|
|
820
|
+
return (n, s) => (l(), r("div", k({ class: a.value }, n.$attrs), [
|
|
821
|
+
$(n.$slots, "default")
|
|
822
822
|
], 16));
|
|
823
823
|
}
|
|
824
|
-
}),
|
|
824
|
+
}), Re = { class: "strand-divider__label" }, Ea = /* @__PURE__ */ h({
|
|
825
825
|
__name: "Divider",
|
|
826
826
|
props: {
|
|
827
827
|
direction: { default: "horizontal" },
|
|
@@ -829,31 +829,31 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
829
829
|
className: { default: "" }
|
|
830
830
|
},
|
|
831
831
|
setup(e) {
|
|
832
|
-
const t = e, a =
|
|
833
|
-
|
|
834
|
-
const s =
|
|
835
|
-
return (
|
|
832
|
+
const t = e, a = f(() => t.direction === "vertical"), n = f(() => !a.value && !!t.label);
|
|
833
|
+
f(() => !a.value && !t.label);
|
|
834
|
+
const s = f(() => 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(" "));
|
|
835
|
+
return (d, i) => a.value ? (l(), r("div", {
|
|
836
836
|
key: 0,
|
|
837
|
-
class:
|
|
837
|
+
class: _(s.value),
|
|
838
838
|
role: "separator",
|
|
839
839
|
"aria-orientation": "vertical"
|
|
840
|
-
}, null, 2)) : n.value ? (l(),
|
|
840
|
+
}, null, 2)) : n.value ? (l(), r("div", {
|
|
841
841
|
key: 1,
|
|
842
|
-
class:
|
|
842
|
+
class: _(s.value),
|
|
843
843
|
role: "separator",
|
|
844
844
|
"aria-orientation": "horizontal"
|
|
845
845
|
}, [
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
], 2)) : (l(),
|
|
846
|
+
i[0] || (i[0] = m("span", { class: "strand-divider__line" }, null, -1)),
|
|
847
|
+
m("span", Re, b(e.label), 1),
|
|
848
|
+
i[1] || (i[1] = m("span", { class: "strand-divider__line" }, null, -1))
|
|
849
|
+
], 2)) : (l(), r("hr", {
|
|
850
850
|
key: 2,
|
|
851
|
-
class:
|
|
851
|
+
class: _(s.value),
|
|
852
852
|
role: "separator",
|
|
853
853
|
"aria-orientation": "horizontal"
|
|
854
854
|
}, null, 2));
|
|
855
855
|
}
|
|
856
|
-
}),
|
|
856
|
+
}), za = /* @__PURE__ */ h({
|
|
857
857
|
__name: "Section",
|
|
858
858
|
props: {
|
|
859
859
|
variant: { default: "standard" },
|
|
@@ -862,7 +862,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
862
862
|
className: { default: "" }
|
|
863
863
|
},
|
|
864
864
|
setup(e) {
|
|
865
|
-
const t = e, a =
|
|
865
|
+
const t = e, a = f(
|
|
866
866
|
() => [
|
|
867
867
|
"strand-section",
|
|
868
868
|
`strand-section--${t.variant}`,
|
|
@@ -871,11 +871,11 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
871
871
|
t.className
|
|
872
872
|
].filter(Boolean).join(" ")
|
|
873
873
|
);
|
|
874
|
-
return (n, s) => (l(),
|
|
875
|
-
|
|
874
|
+
return (n, s) => (l(), r("section", k({ class: a.value }, n.$attrs), [
|
|
875
|
+
$(n.$slots, "default")
|
|
876
876
|
], 16));
|
|
877
877
|
}
|
|
878
|
-
}),
|
|
878
|
+
}), La = /* @__PURE__ */ h({
|
|
879
879
|
__name: "InstrumentViewport",
|
|
880
880
|
props: {
|
|
881
881
|
grid: { type: Boolean, default: !1 },
|
|
@@ -883,7 +883,7 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
883
883
|
className: { default: "" }
|
|
884
884
|
},
|
|
885
885
|
setup(e) {
|
|
886
|
-
const t = e, a =
|
|
886
|
+
const t = e, a = f(
|
|
887
887
|
() => [
|
|
888
888
|
"strand-instrument-viewport",
|
|
889
889
|
t.grid && "strand-instrument-viewport--grid",
|
|
@@ -891,8 +891,8 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
891
891
|
t.className
|
|
892
892
|
].filter(Boolean).join(" ")
|
|
893
893
|
);
|
|
894
|
-
return (n, s) => (l(),
|
|
895
|
-
|
|
894
|
+
return (n, s) => (l(), r("div", k({ class: a.value }, n.$attrs), [
|
|
895
|
+
$(n.$slots, "default")
|
|
896
896
|
], 16));
|
|
897
897
|
}
|
|
898
898
|
}), Va = /* @__PURE__ */ h({
|
|
@@ -903,31 +903,31 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
903
903
|
className: { default: "" }
|
|
904
904
|
},
|
|
905
905
|
setup(e) {
|
|
906
|
-
const t = e, a =
|
|
906
|
+
const t = e, a = B(null), n = B(!1);
|
|
907
907
|
let s = null;
|
|
908
|
-
const
|
|
908
|
+
const d = f(
|
|
909
909
|
() => [
|
|
910
910
|
"strand-reveal",
|
|
911
911
|
n.value && "strand-reveal--visible",
|
|
912
912
|
t.className
|
|
913
913
|
].filter(Boolean).join(" ")
|
|
914
914
|
);
|
|
915
|
-
return
|
|
915
|
+
return S(() => {
|
|
916
916
|
a.value && (s = new IntersectionObserver(
|
|
917
|
-
(
|
|
918
|
-
for (const
|
|
919
|
-
|
|
917
|
+
(i) => {
|
|
918
|
+
for (const o of i)
|
|
919
|
+
o.isIntersecting ? (n.value = !0, t.once && s && a.value && s.unobserve(a.value)) : t.once || (n.value = !1);
|
|
920
920
|
},
|
|
921
921
|
{ threshold: t.threshold }
|
|
922
922
|
), s.observe(a.value));
|
|
923
|
-
}),
|
|
923
|
+
}), N(() => {
|
|
924
924
|
s && (s.disconnect(), s = null);
|
|
925
|
-
}), (
|
|
925
|
+
}), (i, o) => (l(), r("div", k({
|
|
926
926
|
ref_key: "elRef",
|
|
927
927
|
ref: a,
|
|
928
|
-
class:
|
|
929
|
-
},
|
|
930
|
-
|
|
928
|
+
class: d.value
|
|
929
|
+
}, i.$attrs), [
|
|
930
|
+
$(i.$slots, "default")
|
|
931
931
|
], 16));
|
|
932
932
|
}
|
|
933
933
|
}), Ie = ["href"], Da = /* @__PURE__ */ h({
|
|
@@ -939,20 +939,20 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
939
939
|
className: { default: "" }
|
|
940
940
|
},
|
|
941
941
|
setup(e) {
|
|
942
|
-
const t = e, a =
|
|
942
|
+
const t = e, a = f(
|
|
943
943
|
() => ["strand-link", t.variant !== "default" && `strand-link--${t.variant}`, t.className].filter(Boolean).join(" ")
|
|
944
944
|
);
|
|
945
|
-
return (n, s) => (l(),
|
|
945
|
+
return (n, s) => (l(), r("a", k({
|
|
946
946
|
href: e.href,
|
|
947
947
|
class: a.value
|
|
948
948
|
}, {
|
|
949
949
|
...e.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
950
950
|
...n.$attrs
|
|
951
951
|
}), [
|
|
952
|
-
|
|
952
|
+
$(n.$slots, "default")
|
|
953
953
|
], 16, Ie));
|
|
954
954
|
}
|
|
955
|
-
}),
|
|
955
|
+
}), Oe = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], Ee = ["id", "aria-labelledby", "hidden"], Ma = /* @__PURE__ */ h({
|
|
956
956
|
__name: "Tabs",
|
|
957
957
|
props: {
|
|
958
958
|
tabs: {},
|
|
@@ -960,20 +960,20 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
960
960
|
},
|
|
961
961
|
emits: ["change"],
|
|
962
962
|
setup(e, { emit: t }) {
|
|
963
|
-
const a = e, n = t, s =
|
|
964
|
-
function
|
|
963
|
+
const a = e, n = t, s = B(null), d = f(() => ["strand-tabs"].filter(Boolean).join(" "));
|
|
964
|
+
function i(c) {
|
|
965
965
|
var u, p;
|
|
966
|
-
const v = a.tabs[
|
|
966
|
+
const v = a.tabs[c];
|
|
967
967
|
if (v) {
|
|
968
968
|
n("change", v.id);
|
|
969
|
-
const
|
|
970
|
-
(p =
|
|
969
|
+
const g = (u = s.value) == null ? void 0 : u.querySelectorAll('[role="tab"]');
|
|
970
|
+
(p = g == null ? void 0 : g[c]) == null || p.focus();
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function o(c) {
|
|
974
974
|
const v = a.tabs.findIndex((p) => p.id === a.activeTab);
|
|
975
975
|
let u = null;
|
|
976
|
-
switch (
|
|
976
|
+
switch (c.key) {
|
|
977
977
|
case "ArrowRight":
|
|
978
978
|
u = (v + 1) % a.tabs.length;
|
|
979
979
|
break;
|
|
@@ -989,23 +989,23 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
989
989
|
default:
|
|
990
990
|
return;
|
|
991
991
|
}
|
|
992
|
-
|
|
992
|
+
c.preventDefault(), i(u);
|
|
993
993
|
}
|
|
994
|
-
return (
|
|
995
|
-
class:
|
|
994
|
+
return (c, v) => (l(), r("div", {
|
|
995
|
+
class: _(d.value)
|
|
996
996
|
}, [
|
|
997
|
-
|
|
997
|
+
m("div", {
|
|
998
998
|
ref_key: "tablistRef",
|
|
999
999
|
ref: s,
|
|
1000
1000
|
role: "tablist",
|
|
1001
|
-
onKeydown:
|
|
1001
|
+
onKeydown: o
|
|
1002
1002
|
}, [
|
|
1003
|
-
(l(!0),
|
|
1003
|
+
(l(!0), r(w, null, C(e.tabs, (u) => (l(), r("button", {
|
|
1004
1004
|
key: u.id,
|
|
1005
1005
|
id: `tab-${u.id}`,
|
|
1006
1006
|
role: "tab",
|
|
1007
1007
|
type: "button",
|
|
1008
|
-
class:
|
|
1008
|
+
class: _([
|
|
1009
1009
|
"strand-tabs__tab",
|
|
1010
1010
|
u.id === e.activeTab && "strand-tabs__tab--active"
|
|
1011
1011
|
].filter(Boolean).join(" ")),
|
|
@@ -1013,9 +1013,9 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
1013
1013
|
"aria-controls": `panel-${u.id}`,
|
|
1014
1014
|
tabindex: u.id === e.activeTab ? 0 : -1,
|
|
1015
1015
|
onClick: (p) => n("change", u.id)
|
|
1016
|
-
},
|
|
1016
|
+
}, b(u.label), 11, Oe))), 128))
|
|
1017
1017
|
], 544),
|
|
1018
|
-
(l(!0),
|
|
1018
|
+
(l(!0), r(w, null, C(e.tabs, (u) => (l(), r("div", {
|
|
1019
1019
|
key: u.id,
|
|
1020
1020
|
id: `panel-${u.id}`,
|
|
1021
1021
|
role: "tabpanel",
|
|
@@ -1023,43 +1023,43 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
1023
1023
|
hidden: u.id !== e.activeTab || void 0,
|
|
1024
1024
|
tabindex: 0
|
|
1025
1025
|
}, [
|
|
1026
|
-
|
|
1027
|
-
], 8,
|
|
1026
|
+
$(c.$slots, `panel-${u.id}`)
|
|
1027
|
+
], 8, Ee))), 128))
|
|
1028
1028
|
], 2));
|
|
1029
1029
|
}
|
|
1030
|
-
}),
|
|
1030
|
+
}), ze = { class: "strand-breadcrumb__list" }, Le = {
|
|
1031
1031
|
key: 0,
|
|
1032
1032
|
class: "strand-breadcrumb__separator",
|
|
1033
1033
|
"aria-hidden": "true"
|
|
1034
|
-
},
|
|
1034
|
+
}, Ve = {
|
|
1035
1035
|
key: 1,
|
|
1036
1036
|
class: "strand-breadcrumb__current",
|
|
1037
1037
|
"aria-current": "page"
|
|
1038
|
-
},
|
|
1038
|
+
}, De = ["href"], Aa = /* @__PURE__ */ h({
|
|
1039
1039
|
__name: "Breadcrumb",
|
|
1040
1040
|
props: {
|
|
1041
1041
|
items: {},
|
|
1042
1042
|
separator: { default: "/" }
|
|
1043
1043
|
},
|
|
1044
1044
|
setup(e) {
|
|
1045
|
-
const t =
|
|
1045
|
+
const t = f(
|
|
1046
1046
|
() => ["strand-breadcrumb"].filter(Boolean).join(" ")
|
|
1047
1047
|
);
|
|
1048
|
-
return (a, n) => (l(),
|
|
1048
|
+
return (a, n) => (l(), r("nav", {
|
|
1049
1049
|
"aria-label": "Breadcrumb",
|
|
1050
|
-
class:
|
|
1050
|
+
class: _(t.value)
|
|
1051
1051
|
}, [
|
|
1052
|
-
|
|
1053
|
-
(l(!0),
|
|
1054
|
-
key: `${s.label}-${
|
|
1052
|
+
m("ol", ze, [
|
|
1053
|
+
(l(!0), r(w, null, C(e.items, (s, d) => (l(), r("li", {
|
|
1054
|
+
key: `${s.label}-${d}`,
|
|
1055
1055
|
class: "strand-breadcrumb__item"
|
|
1056
1056
|
}, [
|
|
1057
|
-
|
|
1058
|
-
|
|
1057
|
+
d > 0 ? (l(), r("span", Le, b(e.separator), 1)) : y("", !0),
|
|
1058
|
+
d === e.items.length - 1 ? (l(), r("span", Ve, b(s.label), 1)) : (l(), r("a", {
|
|
1059
1059
|
key: 2,
|
|
1060
1060
|
href: s.href,
|
|
1061
1061
|
class: "strand-breadcrumb__link"
|
|
1062
|
-
},
|
|
1062
|
+
}, b(s.label), 9, De))
|
|
1063
1063
|
]))), 128))
|
|
1064
1064
|
])
|
|
1065
1065
|
], 2));
|
|
@@ -1073,67 +1073,71 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
1073
1073
|
}, Ue = ["aria-expanded", "aria-label"], qe = {
|
|
1074
1074
|
key: 0,
|
|
1075
1075
|
class: "strand-nav__mobile-menu"
|
|
1076
|
-
}, Ge = ["href", "aria-current"],
|
|
1076
|
+
}, Ge = ["href", "aria-current"], Fa = /* @__PURE__ */ h({
|
|
1077
1077
|
__name: "Nav",
|
|
1078
1078
|
props: {
|
|
1079
1079
|
items: { default: () => [] },
|
|
1080
1080
|
glass: { type: Boolean, default: !1 }
|
|
1081
1081
|
},
|
|
1082
1082
|
setup(e) {
|
|
1083
|
-
const t = e, a =
|
|
1083
|
+
const t = e, a = B(!1);
|
|
1084
1084
|
function n() {
|
|
1085
1085
|
a.value = !a.value;
|
|
1086
1086
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1087
|
+
function s(i) {
|
|
1088
|
+
i ? document.body.classList.add("strand-glass-nav-active") : document.body.classList.remove("strand-glass-nav-active");
|
|
1089
|
+
}
|
|
1090
|
+
S(() => s(t.glass)), N(() => document.body.classList.remove("strand-glass-nav-active")), T(() => t.glass, s);
|
|
1091
|
+
const d = f(() => ["strand-nav", t.glass && "strand-nav--glass"].filter(Boolean).join(" "));
|
|
1092
|
+
return (i, o) => (l(), r("nav", {
|
|
1093
|
+
class: _(d.value),
|
|
1090
1094
|
"aria-label": "Main navigation"
|
|
1091
1095
|
}, [
|
|
1092
|
-
|
|
1093
|
-
i.$slots.logo ? (l(),
|
|
1094
|
-
|
|
1096
|
+
m("div", Me, [
|
|
1097
|
+
i.$slots.logo ? (l(), r("div", Ae, [
|
|
1098
|
+
$(i.$slots, "logo")
|
|
1095
1099
|
])) : y("", !0),
|
|
1096
|
-
|
|
1097
|
-
(l(!0),
|
|
1098
|
-
key:
|
|
1099
|
-
href:
|
|
1100
|
-
class:
|
|
1100
|
+
m("div", Fe, [
|
|
1101
|
+
(l(!0), r(w, null, C(e.items, (c) => (l(), r("a", {
|
|
1102
|
+
key: c.href,
|
|
1103
|
+
href: c.href,
|
|
1104
|
+
class: _([
|
|
1101
1105
|
"strand-nav__link",
|
|
1102
|
-
|
|
1106
|
+
c.active && "strand-nav__link--active"
|
|
1103
1107
|
].filter(Boolean).join(" ")),
|
|
1104
|
-
"aria-current":
|
|
1105
|
-
},
|
|
1108
|
+
"aria-current": c.active ? "page" : void 0
|
|
1109
|
+
}, b(c.label), 11, Ke))), 128))
|
|
1106
1110
|
]),
|
|
1107
|
-
i.$slots.actions ? (l(),
|
|
1108
|
-
|
|
1111
|
+
i.$slots.actions ? (l(), r("div", Pe, [
|
|
1112
|
+
$(i.$slots, "actions")
|
|
1109
1113
|
])) : y("", !0),
|
|
1110
|
-
|
|
1114
|
+
m("button", {
|
|
1111
1115
|
type: "button",
|
|
1112
1116
|
class: "strand-nav__hamburger",
|
|
1113
1117
|
"aria-expanded": a.value ? "true" : "false",
|
|
1114
1118
|
"aria-label": a.value ? "Close menu" : "Menu",
|
|
1115
1119
|
onClick: n
|
|
1116
|
-
}, [...
|
|
1117
|
-
|
|
1120
|
+
}, [...o[0] || (o[0] = [
|
|
1121
|
+
m("span", {
|
|
1118
1122
|
class: "strand-nav__hamburger-icon",
|
|
1119
1123
|
"aria-hidden": "true"
|
|
1120
1124
|
}, null, -1)
|
|
1121
1125
|
])], 8, Ue)
|
|
1122
1126
|
]),
|
|
1123
|
-
a.value ? (l(),
|
|
1124
|
-
(l(!0),
|
|
1125
|
-
key:
|
|
1126
|
-
href:
|
|
1127
|
-
class:
|
|
1127
|
+
a.value ? (l(), r("div", qe, [
|
|
1128
|
+
(l(!0), r(w, null, C(e.items, (c) => (l(), r("a", {
|
|
1129
|
+
key: c.href,
|
|
1130
|
+
href: c.href,
|
|
1131
|
+
class: _([
|
|
1128
1132
|
"strand-nav__mobile-link",
|
|
1129
|
-
|
|
1133
|
+
c.active && "strand-nav__mobile-link--active"
|
|
1130
1134
|
].filter(Boolean).join(" ")),
|
|
1131
|
-
"aria-current":
|
|
1132
|
-
},
|
|
1135
|
+
"aria-current": c.active ? "page" : void 0
|
|
1136
|
+
}, b(c.label), 11, Ge))), 128))
|
|
1133
1137
|
])) : y("", !0)
|
|
1134
1138
|
], 2));
|
|
1135
1139
|
}
|
|
1136
|
-
}), We = ["aria-live"], He = { class: "strand-toast__status" }, Ze = { class: "strand-toast__message" },
|
|
1140
|
+
}), We = ["aria-live"], He = { class: "strand-toast__status" }, Ze = { class: "strand-toast__message" }, Ka = /* @__PURE__ */ h({
|
|
1137
1141
|
__name: "Toast",
|
|
1138
1142
|
props: {
|
|
1139
1143
|
status: { default: "info" },
|
|
@@ -1141,24 +1145,24 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
1141
1145
|
},
|
|
1142
1146
|
emits: ["dismiss"],
|
|
1143
1147
|
setup(e, { emit: t }) {
|
|
1144
|
-
const a = e, n = t, s =
|
|
1148
|
+
const a = e, n = t, s = f(
|
|
1145
1149
|
() => a.status === "error" || a.status === "warning"
|
|
1146
|
-
),
|
|
1150
|
+
), d = f(
|
|
1147
1151
|
() => ["strand-toast", `strand-toast--${a.status}`].filter(Boolean).join(" ")
|
|
1148
|
-
),
|
|
1152
|
+
), i = {
|
|
1149
1153
|
info: "INFO",
|
|
1150
1154
|
success: "COMPLETE",
|
|
1151
1155
|
warning: "WARNING",
|
|
1152
1156
|
error: "ERROR"
|
|
1153
|
-
},
|
|
1154
|
-
return (
|
|
1155
|
-
class:
|
|
1157
|
+
}, o = f(() => i[a.status] ?? a.status.toUpperCase());
|
|
1158
|
+
return (c, v) => (l(), r("div", {
|
|
1159
|
+
class: _(d.value),
|
|
1156
1160
|
role: "status",
|
|
1157
1161
|
"aria-live": s.value ? "assertive" : "polite"
|
|
1158
1162
|
}, [
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1163
|
+
m("span", He, b(o.value), 1),
|
|
1164
|
+
m("span", Ze, b(e.message), 1),
|
|
1165
|
+
m("button", {
|
|
1162
1166
|
type: "button",
|
|
1163
1167
|
class: "strand-toast__dismiss",
|
|
1164
1168
|
"aria-label": "Dismiss",
|
|
@@ -1168,9 +1172,9 @@ const P = ["type", "disabled", "aria-disabled", "aria-busy"], U = {
|
|
|
1168
1172
|
}
|
|
1169
1173
|
});
|
|
1170
1174
|
/*! Strand Vue | MIT License | dillingerstaffing.com */
|
|
1171
|
-
const
|
|
1172
|
-
function
|
|
1173
|
-
const e = A(
|
|
1175
|
+
const D = Symbol("StrandToast");
|
|
1176
|
+
function Pa() {
|
|
1177
|
+
const e = A(D);
|
|
1174
1178
|
if (!e)
|
|
1175
1179
|
throw new Error("useToast must be used within a ToastProvider");
|
|
1176
1180
|
return e;
|
|
@@ -1178,16 +1182,16 @@ function Fa() {
|
|
|
1178
1182
|
const Je = {
|
|
1179
1183
|
key: 0,
|
|
1180
1184
|
class: "strand-toast__container"
|
|
1181
|
-
}, Qe = ["aria-live"], Xe = { class: "strand-toast__status" }, Ye = { class: "strand-toast__message" }, ea = ["onClick"],
|
|
1185
|
+
}, Qe = ["aria-live"], Xe = { class: "strand-toast__status" }, Ye = { class: "strand-toast__message" }, ea = ["onClick"], Ua = /* @__PURE__ */ h({
|
|
1182
1186
|
__name: "ToastProvider",
|
|
1183
1187
|
setup(e) {
|
|
1184
1188
|
let t = 0;
|
|
1185
|
-
const a =
|
|
1189
|
+
const a = B([]), n = /* @__PURE__ */ new Map();
|
|
1186
1190
|
function s(v) {
|
|
1187
1191
|
const u = n.get(v);
|
|
1188
1192
|
u !== void 0 && (clearTimeout(u), n.delete(v)), a.value = a.value.filter((p) => p.id !== v);
|
|
1189
1193
|
}
|
|
1190
|
-
function
|
|
1194
|
+
function d(v) {
|
|
1191
1195
|
const u = {
|
|
1192
1196
|
id: ++t,
|
|
1193
1197
|
message: v.message,
|
|
@@ -1201,45 +1205,45 @@ const Je = {
|
|
|
1201
1205
|
n.set(u.id, p);
|
|
1202
1206
|
}
|
|
1203
1207
|
}
|
|
1204
|
-
F(
|
|
1208
|
+
F(D, { toast: d }), N(() => {
|
|
1205
1209
|
for (const v of n.values())
|
|
1206
1210
|
clearTimeout(v);
|
|
1207
1211
|
n.clear();
|
|
1208
1212
|
});
|
|
1209
|
-
function
|
|
1213
|
+
function i(v) {
|
|
1210
1214
|
return v === "error" || v === "warning";
|
|
1211
1215
|
}
|
|
1212
|
-
const
|
|
1216
|
+
const o = {
|
|
1213
1217
|
info: "INFO",
|
|
1214
1218
|
success: "COMPLETE",
|
|
1215
1219
|
warning: "WARNING",
|
|
1216
1220
|
error: "ERROR"
|
|
1217
1221
|
};
|
|
1218
|
-
function
|
|
1219
|
-
return
|
|
1222
|
+
function c(v) {
|
|
1223
|
+
return o[v] ?? v.toUpperCase();
|
|
1220
1224
|
}
|
|
1221
|
-
return (v, u) => (l(),
|
|
1222
|
-
|
|
1223
|
-
a.value.length > 0 ? (l(),
|
|
1224
|
-
(l(!0),
|
|
1225
|
+
return (v, u) => (l(), r(w, null, [
|
|
1226
|
+
$(v.$slots, "default"),
|
|
1227
|
+
a.value.length > 0 ? (l(), r("div", Je, [
|
|
1228
|
+
(l(!0), r(w, null, C(a.value, (p) => (l(), r("div", {
|
|
1225
1229
|
key: p.id,
|
|
1226
|
-
class:
|
|
1230
|
+
class: _(["strand-toast", `strand-toast--${p.status}`].join(" ")),
|
|
1227
1231
|
role: "status",
|
|
1228
|
-
"aria-live":
|
|
1232
|
+
"aria-live": i(p.status) ? "assertive" : "polite"
|
|
1229
1233
|
}, [
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1234
|
+
m("span", Xe, b(c(p.status)), 1),
|
|
1235
|
+
m("span", Ye, b(p.message), 1),
|
|
1236
|
+
m("button", {
|
|
1233
1237
|
type: "button",
|
|
1234
1238
|
class: "strand-toast__dismiss",
|
|
1235
1239
|
"aria-label": "Dismiss",
|
|
1236
|
-
onClick: (
|
|
1240
|
+
onClick: (g) => s(p.id)
|
|
1237
1241
|
}, " × ", 8, ea)
|
|
1238
1242
|
], 10, Qe))), 128))
|
|
1239
1243
|
])) : y("", !0)
|
|
1240
1244
|
], 64));
|
|
1241
1245
|
}
|
|
1242
|
-
}), aa = ["role"], ta = { class: "strand-alert__status" }, sa = { class: "strand-alert__content" },
|
|
1246
|
+
}), aa = ["role"], ta = { class: "strand-alert__status" }, sa = { class: "strand-alert__content" }, qa = /* @__PURE__ */ h({
|
|
1243
1247
|
__name: "Alert",
|
|
1244
1248
|
props: {
|
|
1245
1249
|
status: { default: "info" },
|
|
@@ -1247,43 +1251,43 @@ const Je = {
|
|
|
1247
1251
|
},
|
|
1248
1252
|
emits: ["dismiss"],
|
|
1249
1253
|
setup(e, { emit: t }) {
|
|
1250
|
-
const a = e, n = t, s =
|
|
1254
|
+
const a = e, n = t, s = f(
|
|
1251
1255
|
() => a.status === "error" || a.status === "warning" ? "alert" : "status"
|
|
1252
|
-
),
|
|
1256
|
+
), d = f(
|
|
1253
1257
|
() => [
|
|
1254
1258
|
"strand-alert",
|
|
1255
1259
|
`strand-alert--${a.status}`
|
|
1256
1260
|
].filter(Boolean).join(" ")
|
|
1257
|
-
),
|
|
1261
|
+
), i = {
|
|
1258
1262
|
info: "INFO",
|
|
1259
1263
|
success: "COMPLETE",
|
|
1260
1264
|
warning: "WARNING",
|
|
1261
1265
|
error: "ERROR"
|
|
1262
|
-
},
|
|
1263
|
-
function
|
|
1266
|
+
}, o = f(() => i[a.status] ?? a.status.toUpperCase());
|
|
1267
|
+
function c() {
|
|
1264
1268
|
n("dismiss");
|
|
1265
1269
|
}
|
|
1266
|
-
return (v, u) => (l(),
|
|
1267
|
-
class:
|
|
1270
|
+
return (v, u) => (l(), r("div", {
|
|
1271
|
+
class: _(d.value),
|
|
1268
1272
|
role: s.value
|
|
1269
1273
|
}, [
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1274
|
+
m("span", ta, b(o.value), 1),
|
|
1275
|
+
m("div", sa, [
|
|
1276
|
+
$(v.$slots, "default")
|
|
1273
1277
|
]),
|
|
1274
|
-
e.dismissible ? (l(),
|
|
1278
|
+
e.dismissible ? (l(), r("button", {
|
|
1275
1279
|
key: 0,
|
|
1276
1280
|
type: "button",
|
|
1277
1281
|
class: "strand-alert__dismiss",
|
|
1278
1282
|
"aria-label": "Dismiss",
|
|
1279
|
-
onClick:
|
|
1283
|
+
onClick: c
|
|
1280
1284
|
}, " × ")) : y("", !0)
|
|
1281
1285
|
], 10, aa));
|
|
1282
1286
|
}
|
|
1283
1287
|
}), na = ["aria-labelledby"], la = {
|
|
1284
1288
|
key: 0,
|
|
1285
1289
|
class: "strand-dialog__header"
|
|
1286
|
-
},
|
|
1290
|
+
}, ra = { class: "strand-dialog__body" }, L = 'a[href], button:not(:disabled), textarea:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex]:not([tabindex="-1"])', Ga = /* @__PURE__ */ h({
|
|
1287
1291
|
__name: "Dialog",
|
|
1288
1292
|
props: {
|
|
1289
1293
|
open: { type: Boolean },
|
|
@@ -1295,80 +1299,80 @@ const Je = {
|
|
|
1295
1299
|
setup(e, { emit: t }) {
|
|
1296
1300
|
const a = e, n = t;
|
|
1297
1301
|
let s = 0;
|
|
1298
|
-
const
|
|
1299
|
-
let
|
|
1300
|
-
const v =
|
|
1302
|
+
const d = `strand-dialog-title-${++s}`, i = B(null);
|
|
1303
|
+
let o = null, c = "";
|
|
1304
|
+
const v = f(
|
|
1301
1305
|
() => ["strand-dialog__panel"].filter(Boolean).join(" ")
|
|
1302
1306
|
);
|
|
1303
|
-
function u(
|
|
1304
|
-
if (
|
|
1305
|
-
|
|
1307
|
+
function u(g) {
|
|
1308
|
+
if (g.key === "Escape" && a.closeOnEscape) {
|
|
1309
|
+
g.stopPropagation(), n("close");
|
|
1306
1310
|
return;
|
|
1307
1311
|
}
|
|
1308
|
-
if (
|
|
1309
|
-
const x =
|
|
1312
|
+
if (g.key === "Tab") {
|
|
1313
|
+
const x = i.value;
|
|
1310
1314
|
if (!x) return;
|
|
1311
|
-
const
|
|
1312
|
-
x.querySelectorAll(
|
|
1315
|
+
const j = Array.from(
|
|
1316
|
+
x.querySelectorAll(L)
|
|
1313
1317
|
);
|
|
1314
|
-
if (
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1318
|
+
if (j.length === 0) return;
|
|
1319
|
+
const E = j[0], z = j[j.length - 1];
|
|
1320
|
+
g.shiftKey ? document.activeElement === E && (g.preventDefault(), z.focus()) : document.activeElement === z && (g.preventDefault(), E.focus());
|
|
1317
1321
|
}
|
|
1318
1322
|
}
|
|
1319
|
-
function p(
|
|
1320
|
-
a.closeOnOutsideClick &&
|
|
1323
|
+
function p(g) {
|
|
1324
|
+
a.closeOnOutsideClick && g.target === g.currentTarget && n("close");
|
|
1321
1325
|
}
|
|
1322
|
-
return
|
|
1326
|
+
return T(
|
|
1323
1327
|
() => a.open,
|
|
1324
|
-
async (
|
|
1325
|
-
if (
|
|
1326
|
-
|
|
1327
|
-
const x =
|
|
1328
|
+
async (g) => {
|
|
1329
|
+
if (g) {
|
|
1330
|
+
o = document.activeElement, c = document.body.style.overflow, document.body.style.overflow = "hidden", await K();
|
|
1331
|
+
const x = i.value;
|
|
1328
1332
|
if (x) {
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1333
|
+
const j = x.querySelectorAll(L);
|
|
1334
|
+
j.length > 0 ? j[0].focus() : x.focus();
|
|
1331
1335
|
}
|
|
1332
1336
|
} else
|
|
1333
|
-
document.body.style.overflow =
|
|
1337
|
+
document.body.style.overflow = c, o && o instanceof HTMLElement && o.focus();
|
|
1334
1338
|
},
|
|
1335
1339
|
{ immediate: !0 }
|
|
1336
|
-
),
|
|
1337
|
-
a.open && (document.body.style.overflow =
|
|
1338
|
-
}), (
|
|
1340
|
+
), N(() => {
|
|
1341
|
+
a.open && (document.body.style.overflow = c);
|
|
1342
|
+
}), (g, x) => e.open ? (l(), r("div", {
|
|
1339
1343
|
key: 0,
|
|
1340
1344
|
class: "strand-dialog__backdrop",
|
|
1341
1345
|
onClick: p,
|
|
1342
1346
|
onKeydown: u
|
|
1343
1347
|
}, [
|
|
1344
|
-
|
|
1348
|
+
m("div", {
|
|
1345
1349
|
ref_key: "panelRef",
|
|
1346
|
-
ref:
|
|
1347
|
-
class:
|
|
1350
|
+
ref: i,
|
|
1351
|
+
class: _(v.value),
|
|
1348
1352
|
role: "dialog",
|
|
1349
1353
|
"aria-modal": "true",
|
|
1350
|
-
"aria-labelledby": e.title ?
|
|
1354
|
+
"aria-labelledby": e.title ? d : void 0,
|
|
1351
1355
|
tabindex: -1
|
|
1352
1356
|
}, [
|
|
1353
|
-
e.title ? (l(),
|
|
1354
|
-
|
|
1355
|
-
id:
|
|
1357
|
+
e.title ? (l(), r("div", la, [
|
|
1358
|
+
m("h2", {
|
|
1359
|
+
id: d,
|
|
1356
1360
|
class: "strand-dialog__title"
|
|
1357
|
-
},
|
|
1361
|
+
}, b(e.title), 1)
|
|
1358
1362
|
])) : y("", !0),
|
|
1359
|
-
|
|
1363
|
+
m("button", {
|
|
1360
1364
|
type: "button",
|
|
1361
1365
|
class: "strand-dialog__close",
|
|
1362
1366
|
"aria-label": "Close",
|
|
1363
|
-
onClick: x[0] || (x[0] = (
|
|
1367
|
+
onClick: x[0] || (x[0] = (j) => n("close"))
|
|
1364
1368
|
}, " × "),
|
|
1365
|
-
|
|
1366
|
-
g
|
|
1369
|
+
m("div", ra, [
|
|
1370
|
+
$(g.$slots, "default")
|
|
1367
1371
|
])
|
|
1368
1372
|
], 10, na)
|
|
1369
1373
|
], 32)) : y("", !0);
|
|
1370
1374
|
}
|
|
1371
|
-
}),
|
|
1375
|
+
}), oa = ["aria-hidden"], Wa = /* @__PURE__ */ h({
|
|
1372
1376
|
__name: "Tooltip",
|
|
1373
1377
|
props: {
|
|
1374
1378
|
content: {},
|
|
@@ -1378,46 +1382,46 @@ const Je = {
|
|
|
1378
1382
|
setup(e) {
|
|
1379
1383
|
const t = e;
|
|
1380
1384
|
let a = 0;
|
|
1381
|
-
const n = `strand-tooltip-${++a}`, s =
|
|
1382
|
-
let
|
|
1383
|
-
function
|
|
1384
|
-
|
|
1385
|
+
const n = `strand-tooltip-${++a}`, s = B(!1);
|
|
1386
|
+
let d = null;
|
|
1387
|
+
function i() {
|
|
1388
|
+
d = setTimeout(() => {
|
|
1385
1389
|
s.value = !0;
|
|
1386
1390
|
}, t.delay);
|
|
1387
1391
|
}
|
|
1388
|
-
function
|
|
1389
|
-
|
|
1392
|
+
function o() {
|
|
1393
|
+
d !== null && (clearTimeout(d), d = null), s.value = !1;
|
|
1390
1394
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1395
|
+
N(() => {
|
|
1396
|
+
d !== null && clearTimeout(d);
|
|
1393
1397
|
});
|
|
1394
|
-
const
|
|
1398
|
+
const c = f(
|
|
1395
1399
|
() => ["strand-tooltip__wrapper"].filter(Boolean).join(" ")
|
|
1396
|
-
), v =
|
|
1400
|
+
), v = f(
|
|
1397
1401
|
() => [
|
|
1398
1402
|
"strand-tooltip",
|
|
1399
1403
|
`strand-tooltip--${t.position}`,
|
|
1400
1404
|
s.value && "strand-tooltip--visible"
|
|
1401
1405
|
].filter(Boolean).join(" ")
|
|
1402
1406
|
);
|
|
1403
|
-
return (u, p) => (l(),
|
|
1404
|
-
class:
|
|
1407
|
+
return (u, p) => (l(), r("span", {
|
|
1408
|
+
class: _(c.value),
|
|
1405
1409
|
"aria-describedby": n,
|
|
1406
|
-
onMouseenter:
|
|
1407
|
-
onMouseleave:
|
|
1408
|
-
onFocus:
|
|
1409
|
-
onBlur:
|
|
1410
|
+
onMouseenter: i,
|
|
1411
|
+
onMouseleave: o,
|
|
1412
|
+
onFocus: i,
|
|
1413
|
+
onBlur: o
|
|
1410
1414
|
}, [
|
|
1411
|
-
|
|
1412
|
-
|
|
1415
|
+
$(u.$slots, "default"),
|
|
1416
|
+
m("span", {
|
|
1413
1417
|
id: n,
|
|
1414
|
-
class:
|
|
1418
|
+
class: _(v.value),
|
|
1415
1419
|
role: "tooltip",
|
|
1416
1420
|
"aria-hidden": !s.value
|
|
1417
|
-
},
|
|
1421
|
+
}, b(e.content), 11, oa)
|
|
1418
1422
|
], 34));
|
|
1419
1423
|
}
|
|
1420
|
-
}), ia = ["aria-valuenow"], da = ["width", "height", "viewBox"], ca = ["cx", "cy", "r"], ua = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset", "transform"],
|
|
1424
|
+
}), ia = ["aria-valuenow"], da = ["width", "height", "viewBox"], ca = ["cx", "cy", "r"], ua = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset", "transform"], R = 3, Ha = /* @__PURE__ */ h({
|
|
1421
1425
|
__name: "Progress",
|
|
1422
1426
|
props: {
|
|
1423
1427
|
variant: { default: "bar" },
|
|
@@ -1426,7 +1430,7 @@ const Je = {
|
|
|
1426
1430
|
className: { default: "" }
|
|
1427
1431
|
},
|
|
1428
1432
|
setup(e) {
|
|
1429
|
-
const t = e, a = { sm: 24, md: 40, lg: 56 }, n =
|
|
1433
|
+
const t = e, a = { sm: 24, md: 40, lg: 56 }, n = f(() => t.value != null), s = f(
|
|
1430
1434
|
() => [
|
|
1431
1435
|
"strand-progress",
|
|
1432
1436
|
`strand-progress--${t.variant}`,
|
|
@@ -1434,76 +1438,76 @@ const Je = {
|
|
|
1434
1438
|
!n.value && "strand-progress--indeterminate",
|
|
1435
1439
|
t.className
|
|
1436
1440
|
].filter(Boolean).join(" ")
|
|
1437
|
-
),
|
|
1438
|
-
() => n.value ?
|
|
1441
|
+
), d = f(() => a[t.size] ?? a.md), i = f(() => (d.value - R) / 2), o = f(() => 2 * Math.PI * i.value), c = f(
|
|
1442
|
+
() => n.value ? o.value - o.value * t.value / 100 : 0
|
|
1439
1443
|
);
|
|
1440
|
-
return (v, u) => (l(),
|
|
1444
|
+
return (v, u) => (l(), r("div", k({
|
|
1441
1445
|
class: s.value,
|
|
1442
1446
|
role: "progressbar",
|
|
1443
1447
|
"aria-valuemin": 0,
|
|
1444
1448
|
"aria-valuemax": 100,
|
|
1445
1449
|
"aria-valuenow": n.value ? e.value : void 0
|
|
1446
1450
|
}, v.$attrs), [
|
|
1447
|
-
e.variant === "ring" ? (l(),
|
|
1451
|
+
e.variant === "ring" ? (l(), r("svg", {
|
|
1448
1452
|
key: 0,
|
|
1449
|
-
width:
|
|
1450
|
-
height:
|
|
1451
|
-
viewBox: `0 0 ${
|
|
1453
|
+
width: d.value,
|
|
1454
|
+
height: d.value,
|
|
1455
|
+
viewBox: `0 0 ${d.value} ${d.value}`,
|
|
1452
1456
|
class: "strand-progress__ring"
|
|
1453
1457
|
}, [
|
|
1454
|
-
|
|
1455
|
-
cx:
|
|
1456
|
-
cy:
|
|
1457
|
-
r:
|
|
1458
|
+
m("circle", {
|
|
1459
|
+
cx: d.value / 2,
|
|
1460
|
+
cy: d.value / 2,
|
|
1461
|
+
r: i.value,
|
|
1458
1462
|
fill: "none",
|
|
1459
|
-
"stroke-width":
|
|
1463
|
+
"stroke-width": R,
|
|
1460
1464
|
class: "strand-progress__track"
|
|
1461
1465
|
}, null, 8, ca),
|
|
1462
|
-
|
|
1463
|
-
cx:
|
|
1464
|
-
cy:
|
|
1465
|
-
r:
|
|
1466
|
+
m("circle", {
|
|
1467
|
+
cx: d.value / 2,
|
|
1468
|
+
cy: d.value / 2,
|
|
1469
|
+
r: i.value,
|
|
1466
1470
|
fill: "none",
|
|
1467
|
-
"stroke-width":
|
|
1468
|
-
"stroke-dasharray":
|
|
1469
|
-
"stroke-dashoffset": n.value ?
|
|
1471
|
+
"stroke-width": R,
|
|
1472
|
+
"stroke-dasharray": o.value,
|
|
1473
|
+
"stroke-dashoffset": n.value ? c.value : void 0,
|
|
1470
1474
|
"stroke-linecap": "round",
|
|
1471
1475
|
class: "strand-progress__fill",
|
|
1472
|
-
transform: `rotate(-90 ${
|
|
1476
|
+
transform: `rotate(-90 ${d.value / 2} ${d.value / 2})`
|
|
1473
1477
|
}, null, 8, ua)
|
|
1474
|
-
], 8, da)) : (l(),
|
|
1478
|
+
], 8, da)) : (l(), r("div", {
|
|
1475
1479
|
key: 1,
|
|
1476
1480
|
class: "strand-progress__fill",
|
|
1477
|
-
style:
|
|
1481
|
+
style: O(n.value ? { width: `${e.value}%` } : void 0)
|
|
1478
1482
|
}, null, 4))
|
|
1479
1483
|
], 16, ia));
|
|
1480
1484
|
}
|
|
1481
|
-
}),
|
|
1485
|
+
}), Za = /* @__PURE__ */ h({
|
|
1482
1486
|
__name: "Spinner",
|
|
1483
1487
|
props: {
|
|
1484
1488
|
size: { default: "md" },
|
|
1485
1489
|
className: { default: "" }
|
|
1486
1490
|
},
|
|
1487
1491
|
setup(e) {
|
|
1488
|
-
const t = e, a =
|
|
1492
|
+
const t = e, a = f(
|
|
1489
1493
|
() => [
|
|
1490
1494
|
"strand-spinner",
|
|
1491
1495
|
`strand-spinner--${t.size}`,
|
|
1492
1496
|
t.className
|
|
1493
1497
|
].filter(Boolean).join(" ")
|
|
1494
1498
|
);
|
|
1495
|
-
return (n, s) => (l(),
|
|
1499
|
+
return (n, s) => (l(), r("span", k({
|
|
1496
1500
|
class: a.value,
|
|
1497
1501
|
role: "status"
|
|
1498
1502
|
}, n.$attrs), [...s[0] || (s[0] = [
|
|
1499
|
-
|
|
1503
|
+
m("span", {
|
|
1500
1504
|
class: "strand-spinner__ring",
|
|
1501
1505
|
"aria-hidden": "true"
|
|
1502
1506
|
}, null, -1),
|
|
1503
|
-
|
|
1507
|
+
m("span", { class: "strand-spinner__sr-only" }, "Loading", -1)
|
|
1504
1508
|
])], 16));
|
|
1505
1509
|
}
|
|
1506
|
-
}),
|
|
1510
|
+
}), Ja = /* @__PURE__ */ h({
|
|
1507
1511
|
__name: "Skeleton",
|
|
1508
1512
|
props: {
|
|
1509
1513
|
variant: { default: "text" },
|
|
@@ -1512,64 +1516,120 @@ const Je = {
|
|
|
1512
1516
|
className: { default: "" }
|
|
1513
1517
|
},
|
|
1514
1518
|
setup(e) {
|
|
1515
|
-
const t = e, a =
|
|
1519
|
+
const t = e, a = f(
|
|
1516
1520
|
() => t.width ?? (t.variant === "text" ? "100%" : void 0)
|
|
1517
|
-
), n =
|
|
1521
|
+
), n = f(
|
|
1518
1522
|
() => t.variant === "circle" ? a.value : t.height
|
|
1519
|
-
), s =
|
|
1523
|
+
), s = f(
|
|
1520
1524
|
() => [
|
|
1521
1525
|
"strand-skeleton",
|
|
1522
1526
|
`strand-skeleton--${t.variant}`,
|
|
1523
1527
|
"strand-skeleton--shimmer",
|
|
1524
1528
|
t.className
|
|
1525
1529
|
].filter(Boolean).join(" ")
|
|
1526
|
-
),
|
|
1530
|
+
), d = f(() => ({
|
|
1527
1531
|
width: a.value,
|
|
1528
1532
|
height: n.value
|
|
1529
1533
|
}));
|
|
1530
|
-
return (
|
|
1534
|
+
return (i, o) => (l(), r("div", k({
|
|
1531
1535
|
class: s.value,
|
|
1532
1536
|
"aria-hidden": "true",
|
|
1533
|
-
style:
|
|
1534
|
-
},
|
|
1537
|
+
style: d.value
|
|
1538
|
+
}, i.$attrs), null, 16));
|
|
1539
|
+
}
|
|
1540
|
+
}), fa = ["aria-label", "data-value"], va = ["aria-checked", "aria-label", "tabindex", "disabled", "data-star-value", "onClick", "onKeydown", "onMouseenter", "onFocus"], Qa = /* @__PURE__ */ h({
|
|
1541
|
+
__name: "StarRating",
|
|
1542
|
+
props: {
|
|
1543
|
+
value: {},
|
|
1544
|
+
onChange: {},
|
|
1545
|
+
size: { default: "md" },
|
|
1546
|
+
readOnly: { type: Boolean, default: !1 },
|
|
1547
|
+
ariaLabel: {}
|
|
1548
|
+
},
|
|
1549
|
+
setup(e) {
|
|
1550
|
+
const t = e, a = B(0), n = f(
|
|
1551
|
+
() => [
|
|
1552
|
+
"strand-star-rating",
|
|
1553
|
+
`strand-star-rating--${t.size}`,
|
|
1554
|
+
t.readOnly && "strand-star-rating--readonly"
|
|
1555
|
+
].filter(Boolean).join(" ")
|
|
1556
|
+
), s = f(() => a.value || t.value);
|
|
1557
|
+
function d(o) {
|
|
1558
|
+
var c;
|
|
1559
|
+
t.readOnly || (c = t.onChange) == null || c.call(t, o);
|
|
1560
|
+
}
|
|
1561
|
+
function i(o, c) {
|
|
1562
|
+
t.readOnly || (o.key === " " || o.key === "Enter") && (o.preventDefault(), d(c));
|
|
1563
|
+
}
|
|
1564
|
+
return (o, c) => (l(), r("div", {
|
|
1565
|
+
class: _(n.value),
|
|
1566
|
+
role: "radiogroup",
|
|
1567
|
+
"aria-label": e.ariaLabel,
|
|
1568
|
+
"data-strand-component": "star-rating",
|
|
1569
|
+
"data-value": String(e.value)
|
|
1570
|
+
}, [
|
|
1571
|
+
(l(), r(w, null, C(5, (v) => m("button", {
|
|
1572
|
+
key: v,
|
|
1573
|
+
type: "button",
|
|
1574
|
+
class: _(`strand-star-rating__star${v <= s.value ? " strand-star-rating__star--active" : ""}`),
|
|
1575
|
+
role: "radio",
|
|
1576
|
+
"aria-checked": v === e.value ? "true" : "false",
|
|
1577
|
+
"aria-label": `${v} star${v > 1 ? "s" : ""}`,
|
|
1578
|
+
tabindex: e.readOnly ? -1 : 0,
|
|
1579
|
+
disabled: e.readOnly,
|
|
1580
|
+
"data-star-value": String(v),
|
|
1581
|
+
onClick: (u) => d(v),
|
|
1582
|
+
onKeydown: (u) => i(u, v),
|
|
1583
|
+
onMouseenter: (u) => !e.readOnly && (a.value = v),
|
|
1584
|
+
onMouseleave: c[0] || (c[0] = (u) => !e.readOnly && (a.value = 0)),
|
|
1585
|
+
onFocus: (u) => !e.readOnly && (a.value = v),
|
|
1586
|
+
onBlur: c[1] || (c[1] = (u) => !e.readOnly && (a.value = 0))
|
|
1587
|
+
}, [...c[2] || (c[2] = [
|
|
1588
|
+
m("span", {
|
|
1589
|
+
class: "strand-star-rating__glyph",
|
|
1590
|
+
"aria-hidden": "true"
|
|
1591
|
+
}, b("★"), -1)
|
|
1592
|
+
])], 42, va)), 64))
|
|
1593
|
+
], 10, fa));
|
|
1535
1594
|
}
|
|
1536
1595
|
});
|
|
1537
1596
|
export {
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1597
|
+
qa as Alert,
|
|
1598
|
+
xa as Avatar,
|
|
1599
|
+
Ca as Badge,
|
|
1600
|
+
Aa as Breadcrumb,
|
|
1601
|
+
ha as Button,
|
|
1602
|
+
wa as Card,
|
|
1603
|
+
ya as Checkbox,
|
|
1604
|
+
Sa as CodeBlock,
|
|
1605
|
+
Oa as Container,
|
|
1606
|
+
Ta as DataReadout,
|
|
1607
|
+
Ga as Dialog,
|
|
1608
|
+
Ea as Divider,
|
|
1609
|
+
Ba as FormField,
|
|
1610
|
+
Ia as Grid,
|
|
1611
|
+
ba as Input,
|
|
1612
|
+
La as InstrumentViewport,
|
|
1554
1613
|
Da as Link,
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1614
|
+
Fa as Nav,
|
|
1615
|
+
Ha as Progress,
|
|
1616
|
+
ga as Radio,
|
|
1558
1617
|
Va as ScrollReveal,
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
Ka as
|
|
1572
|
-
|
|
1573
|
-
|
|
1618
|
+
za as Section,
|
|
1619
|
+
pa as Select,
|
|
1620
|
+
Ja as Skeleton,
|
|
1621
|
+
ka as Slider,
|
|
1622
|
+
Za as Spinner,
|
|
1623
|
+
Ra as Stack,
|
|
1624
|
+
Qa as StarRating,
|
|
1625
|
+
$a as Switch,
|
|
1626
|
+
Na as Table,
|
|
1627
|
+
Ma as Tabs,
|
|
1628
|
+
ja as Tag,
|
|
1629
|
+
_a as Textarea,
|
|
1630
|
+
Ka as Toast,
|
|
1631
|
+
Ua as ToastProvider,
|
|
1632
|
+
Wa as Tooltip,
|
|
1633
|
+
Pa as useToast
|
|
1574
1634
|
};
|
|
1575
1635
|
//# sourceMappingURL=index.js.map
|