@dillingerstaffing/strand-ui 0.6.0 → 0.7.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/HTML_REFERENCE.md +64 -1
- package/README.md +1 -1
- package/dist/components/InstrumentViewport/InstrumentViewport.d.ts +10 -0
- package/dist/components/InstrumentViewport/InstrumentViewport.d.ts.map +1 -0
- package/dist/components/InstrumentViewport/index.d.ts +3 -0
- package/dist/components/InstrumentViewport/index.d.ts.map +1 -0
- package/dist/components/ScrollReveal/ScrollReveal.d.ts +12 -0
- package/dist/components/ScrollReveal/ScrollReveal.d.ts.map +1 -0
- package/dist/components/ScrollReveal/index.d.ts +3 -0
- package/dist/components/ScrollReveal/index.d.ts.map +1 -0
- package/dist/css/strand-ui.css +96 -16
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +568 -527
- package/package.json +2 -2
- package/src/__tests__/build-output.test.ts +1 -0
- package/src/components/Avatar/Avatar.css +2 -2
- package/src/components/Button/Button.css +4 -4
- package/src/components/Checkbox/Checkbox.css +3 -2
- package/src/components/InstrumentViewport/InstrumentViewport.css +36 -0
- package/src/components/InstrumentViewport/InstrumentViewport.test.tsx +70 -0
- package/src/components/InstrumentViewport/InstrumentViewport.tsx +31 -0
- package/src/components/InstrumentViewport/index.ts +2 -0
- package/src/components/Nav/Nav.css +2 -2
- package/src/components/Radio/Radio.css +3 -2
- package/src/components/ScrollReveal/ScrollReveal.css +29 -0
- package/src/components/ScrollReveal/ScrollReveal.test.tsx +68 -0
- package/src/components/ScrollReveal/ScrollReveal.tsx +64 -0
- package/src/components/ScrollReveal/index.ts +2 -0
- package/src/components/Slider/Slider.css +10 -4
- package/src/components/Switch/Switch.css +1 -0
- package/src/index.ts +8 -0
package/dist/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { jsxs as _, jsx as s } from "preact/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { createContext as
|
|
5
|
-
const
|
|
2
|
+
import { forwardRef as h } from "preact/compat";
|
|
3
|
+
import { useRef as g, useCallback as N, useEffect as C, useState as B, useContext as R } from "preact/hooks";
|
|
4
|
+
import { createContext as I } from "preact";
|
|
5
|
+
const E = h(
|
|
6
6
|
({
|
|
7
|
-
variant:
|
|
7
|
+
variant: e = "primary",
|
|
8
8
|
size: t = "md",
|
|
9
|
-
loading:
|
|
9
|
+
loading: a = !1,
|
|
10
10
|
iconOnly: n = !1,
|
|
11
|
-
fullWidth:
|
|
12
|
-
disabled:
|
|
11
|
+
fullWidth: i = !1,
|
|
12
|
+
disabled: l = !1,
|
|
13
13
|
className: r = "",
|
|
14
|
-
children:
|
|
15
|
-
onClick:
|
|
14
|
+
children: o,
|
|
15
|
+
onClick: d,
|
|
16
16
|
type: u = "button",
|
|
17
|
-
...
|
|
18
|
-
},
|
|
19
|
-
const m =
|
|
17
|
+
...c
|
|
18
|
+
}, p) => {
|
|
19
|
+
const m = l || a, f = [
|
|
20
20
|
"strand-btn",
|
|
21
|
-
`strand-btn--${
|
|
21
|
+
`strand-btn--${e}`,
|
|
22
22
|
`strand-btn--${t}`,
|
|
23
23
|
n && "strand-btn--icon-only",
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
i && "strand-btn--full-width",
|
|
25
|
+
a && "strand-btn--loading",
|
|
26
26
|
r
|
|
27
27
|
].filter(Boolean).join(" ");
|
|
28
28
|
return /* @__PURE__ */ _(
|
|
29
29
|
"button",
|
|
30
30
|
{
|
|
31
|
-
ref:
|
|
31
|
+
ref: p,
|
|
32
32
|
type: u,
|
|
33
33
|
className: f,
|
|
34
34
|
disabled: m,
|
|
35
35
|
"aria-disabled": m ? "true" : void 0,
|
|
36
|
-
"aria-busy":
|
|
37
|
-
onClick: m ? void 0 :
|
|
38
|
-
...
|
|
36
|
+
"aria-busy": a ? "true" : void 0,
|
|
37
|
+
onClick: m ? void 0 : d,
|
|
38
|
+
...c,
|
|
39
39
|
children: [
|
|
40
|
-
|
|
40
|
+
a && /* @__PURE__ */ s("span", { className: "strand-btn__spinner", "aria-hidden": "true" }),
|
|
41
41
|
/* @__PURE__ */ s(
|
|
42
42
|
"span",
|
|
43
43
|
{
|
|
44
44
|
className: "strand-btn__content",
|
|
45
|
-
style:
|
|
46
|
-
children:
|
|
45
|
+
style: a ? { visibility: "hidden" } : void 0,
|
|
46
|
+
children: o
|
|
47
47
|
}
|
|
48
48
|
)
|
|
49
49
|
]
|
|
@@ -51,34 +51,34 @@ const I = p(
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
|
|
55
|
-
const L =
|
|
54
|
+
E.displayName = "Button";
|
|
55
|
+
const L = h(
|
|
56
56
|
({
|
|
57
|
-
type:
|
|
57
|
+
type: e = "text",
|
|
58
58
|
error: t = !1,
|
|
59
|
-
leadingAddon:
|
|
59
|
+
leadingAddon: a,
|
|
60
60
|
trailingAddon: n,
|
|
61
|
-
className:
|
|
62
|
-
disabled:
|
|
61
|
+
className: i = "",
|
|
62
|
+
disabled: l,
|
|
63
63
|
...r
|
|
64
|
-
},
|
|
65
|
-
const
|
|
64
|
+
}, o) => {
|
|
65
|
+
const d = [
|
|
66
66
|
"strand-input",
|
|
67
67
|
t && "strand-input--error",
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
l && "strand-input--disabled",
|
|
69
|
+
a && "strand-input--has-leading",
|
|
70
70
|
n && "strand-input--has-trailing",
|
|
71
|
-
|
|
71
|
+
i
|
|
72
72
|
].filter(Boolean).join(" ");
|
|
73
|
-
return /* @__PURE__ */ _("div", { className:
|
|
74
|
-
|
|
73
|
+
return /* @__PURE__ */ _("div", { className: d, children: [
|
|
74
|
+
a && /* @__PURE__ */ s("span", { className: "strand-input__leading", "aria-hidden": "true", children: a }),
|
|
75
75
|
/* @__PURE__ */ s(
|
|
76
76
|
"input",
|
|
77
77
|
{
|
|
78
|
-
ref:
|
|
79
|
-
type:
|
|
78
|
+
ref: o,
|
|
79
|
+
type: e,
|
|
80
80
|
className: "strand-input__field",
|
|
81
|
-
disabled:
|
|
81
|
+
disabled: l,
|
|
82
82
|
"aria-invalid": t ? "true" : void 0,
|
|
83
83
|
...r
|
|
84
84
|
}
|
|
@@ -88,51 +88,51 @@ const L = p(
|
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
90
|
L.displayName = "Input";
|
|
91
|
-
const K =
|
|
91
|
+
const K = h(
|
|
92
92
|
({
|
|
93
|
-
autoResize:
|
|
93
|
+
autoResize: e = !1,
|
|
94
94
|
showCount: t = !1,
|
|
95
|
-
error:
|
|
95
|
+
error: a = !1,
|
|
96
96
|
maxLength: n,
|
|
97
|
-
disabled:
|
|
98
|
-
className:
|
|
97
|
+
disabled: i,
|
|
98
|
+
className: l = "",
|
|
99
99
|
value: r,
|
|
100
|
-
onInput:
|
|
101
|
-
...
|
|
100
|
+
onInput: o,
|
|
101
|
+
...d
|
|
102
102
|
}, u) => {
|
|
103
|
-
const
|
|
104
|
-
(
|
|
105
|
-
|
|
103
|
+
const c = g(null), p = N(
|
|
104
|
+
(k) => {
|
|
105
|
+
c.current = k, typeof u == "function" ? u(k) : u && (u.current = k);
|
|
106
106
|
},
|
|
107
107
|
[u]
|
|
108
|
-
), m =
|
|
109
|
-
(
|
|
110
|
-
|
|
108
|
+
), m = N(
|
|
109
|
+
(k) => {
|
|
110
|
+
e && c.current && (c.current.style.height = "auto", c.current.style.height = `${c.current.scrollHeight}px`), o && o(k);
|
|
111
111
|
},
|
|
112
|
-
[
|
|
112
|
+
[e, o]
|
|
113
113
|
), f = [
|
|
114
114
|
"strand-textarea",
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
].filter(Boolean).join(" "),
|
|
115
|
+
a && "strand-textarea--error",
|
|
116
|
+
i && "strand-textarea--disabled",
|
|
117
|
+
e && "strand-textarea--auto-resize",
|
|
118
|
+
l
|
|
119
|
+
].filter(Boolean).join(" "), v = typeof r == "string" ? r.length : 0;
|
|
120
120
|
return /* @__PURE__ */ _("div", { className: f, children: [
|
|
121
121
|
/* @__PURE__ */ s(
|
|
122
122
|
"textarea",
|
|
123
123
|
{
|
|
124
|
-
ref:
|
|
124
|
+
ref: p,
|
|
125
125
|
className: "strand-textarea__field",
|
|
126
|
-
disabled:
|
|
127
|
-
"aria-invalid":
|
|
126
|
+
disabled: i,
|
|
127
|
+
"aria-invalid": a ? "true" : void 0,
|
|
128
128
|
maxLength: n,
|
|
129
129
|
value: r,
|
|
130
130
|
onInput: m,
|
|
131
|
-
...
|
|
131
|
+
...d
|
|
132
132
|
}
|
|
133
133
|
),
|
|
134
134
|
t && n != null && /* @__PURE__ */ _("span", { className: "strand-textarea__count", "aria-live": "polite", children: [
|
|
135
|
-
|
|
135
|
+
v,
|
|
136
136
|
"/",
|
|
137
137
|
n
|
|
138
138
|
] })
|
|
@@ -140,20 +140,20 @@ const K = p(
|
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
142
|
K.displayName = "Textarea";
|
|
143
|
-
const M =
|
|
143
|
+
const M = h(
|
|
144
144
|
({
|
|
145
|
-
options:
|
|
145
|
+
options: e,
|
|
146
146
|
value: t,
|
|
147
|
-
onChange:
|
|
147
|
+
onChange: a,
|
|
148
148
|
disabled: n,
|
|
149
|
-
error:
|
|
150
|
-
placeholder:
|
|
149
|
+
error: i = !1,
|
|
150
|
+
placeholder: l,
|
|
151
151
|
className: r = "",
|
|
152
|
-
...
|
|
153
|
-
},
|
|
152
|
+
...o
|
|
153
|
+
}, d) => {
|
|
154
154
|
const u = [
|
|
155
155
|
"strand-select",
|
|
156
|
-
|
|
156
|
+
i && "strand-select--error",
|
|
157
157
|
n && "strand-select--disabled",
|
|
158
158
|
r
|
|
159
159
|
].filter(Boolean).join(" ");
|
|
@@ -161,16 +161,16 @@ const M = p(
|
|
|
161
161
|
/* @__PURE__ */ _(
|
|
162
162
|
"select",
|
|
163
163
|
{
|
|
164
|
-
ref:
|
|
164
|
+
ref: d,
|
|
165
165
|
className: "strand-select__field",
|
|
166
166
|
value: t,
|
|
167
|
-
onChange:
|
|
167
|
+
onChange: a,
|
|
168
168
|
disabled: n,
|
|
169
|
-
"aria-invalid":
|
|
170
|
-
...
|
|
169
|
+
"aria-invalid": i ? "true" : void 0,
|
|
170
|
+
...o,
|
|
171
171
|
children: [
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
l && /* @__PURE__ */ s("option", { value: "", disabled: !0, children: l }),
|
|
173
|
+
e.map((c) => /* @__PURE__ */ s("option", { value: c.value, children: c.label }, c.value))
|
|
174
174
|
]
|
|
175
175
|
}
|
|
176
176
|
),
|
|
@@ -179,27 +179,27 @@ const M = p(
|
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
181
|
M.displayName = "Select";
|
|
182
|
-
const A =
|
|
182
|
+
const A = h(
|
|
183
183
|
({
|
|
184
|
-
checked:
|
|
184
|
+
checked: e = !1,
|
|
185
185
|
indeterminate: t = !1,
|
|
186
|
-
onChange:
|
|
186
|
+
onChange: a,
|
|
187
187
|
disabled: n = !1,
|
|
188
|
-
label:
|
|
189
|
-
className:
|
|
188
|
+
label: i,
|
|
189
|
+
className: l = "",
|
|
190
190
|
...r
|
|
191
|
-
},
|
|
192
|
-
const
|
|
191
|
+
}, o) => {
|
|
192
|
+
const d = g(null);
|
|
193
193
|
C(() => {
|
|
194
|
-
const f = typeof
|
|
194
|
+
const f = typeof o == "function" ? d.current : (o == null ? void 0 : o.current) ?? d.current;
|
|
195
195
|
f && (f.indeterminate = t);
|
|
196
|
-
}, [t,
|
|
196
|
+
}, [t, o]);
|
|
197
197
|
const u = [
|
|
198
198
|
"strand-checkbox",
|
|
199
|
-
|
|
199
|
+
e && "strand-checkbox--checked",
|
|
200
200
|
t && "strand-checkbox--indeterminate",
|
|
201
201
|
n && "strand-checkbox--disabled",
|
|
202
|
-
|
|
202
|
+
l
|
|
203
203
|
].filter(Boolean).join(" ");
|
|
204
204
|
return /* @__PURE__ */ _(
|
|
205
205
|
"label",
|
|
@@ -208,8 +208,8 @@ const A = p(
|
|
|
208
208
|
onKeyDown: (f) => {
|
|
209
209
|
if (f.key === " " && !n) {
|
|
210
210
|
f.preventDefault();
|
|
211
|
-
const
|
|
212
|
-
|
|
211
|
+
const v = d.current;
|
|
212
|
+
v && v.click();
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
children: [
|
|
@@ -217,14 +217,14 @@ const A = p(
|
|
|
217
217
|
"input",
|
|
218
218
|
{
|
|
219
219
|
ref: (f) => {
|
|
220
|
-
|
|
220
|
+
d.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
|
|
221
221
|
},
|
|
222
222
|
type: "checkbox",
|
|
223
223
|
className: "strand-checkbox__native",
|
|
224
|
-
checked:
|
|
224
|
+
checked: e,
|
|
225
225
|
disabled: n,
|
|
226
|
-
onChange: n ? void 0 :
|
|
227
|
-
"aria-checked": t ? "mixed" :
|
|
226
|
+
onChange: n ? void 0 : a,
|
|
227
|
+
"aria-checked": t ? "mixed" : e ? "true" : "false",
|
|
228
228
|
role: "checkbox",
|
|
229
229
|
...r
|
|
230
230
|
}
|
|
@@ -248,7 +248,7 @@ const A = p(
|
|
|
248
248
|
}
|
|
249
249
|
)
|
|
250
250
|
}
|
|
251
|
-
) :
|
|
251
|
+
) : e ? /* @__PURE__ */ s(
|
|
252
252
|
"svg",
|
|
253
253
|
{
|
|
254
254
|
className: "strand-checkbox__icon",
|
|
@@ -266,43 +266,43 @@ const A = p(
|
|
|
266
266
|
)
|
|
267
267
|
}
|
|
268
268
|
) : null }),
|
|
269
|
-
|
|
269
|
+
i && /* @__PURE__ */ s("span", { className: "strand-checkbox__label", children: i })
|
|
270
270
|
]
|
|
271
271
|
}
|
|
272
272
|
);
|
|
273
273
|
}
|
|
274
274
|
);
|
|
275
275
|
A.displayName = "Checkbox";
|
|
276
|
-
const P =
|
|
276
|
+
const P = h(
|
|
277
277
|
({
|
|
278
|
-
checked:
|
|
278
|
+
checked: e = !1,
|
|
279
279
|
onChange: t,
|
|
280
|
-
disabled:
|
|
280
|
+
disabled: a = !1,
|
|
281
281
|
label: n,
|
|
282
|
-
name:
|
|
283
|
-
value:
|
|
282
|
+
name: i,
|
|
283
|
+
value: l,
|
|
284
284
|
className: r = "",
|
|
285
|
-
...
|
|
286
|
-
},
|
|
285
|
+
...o
|
|
286
|
+
}, d) => {
|
|
287
287
|
const u = [
|
|
288
288
|
"strand-radio",
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
e && "strand-radio--checked",
|
|
290
|
+
a && "strand-radio--disabled",
|
|
291
291
|
r
|
|
292
292
|
].filter(Boolean).join(" ");
|
|
293
293
|
return /* @__PURE__ */ _("label", { className: u, children: [
|
|
294
294
|
/* @__PURE__ */ s(
|
|
295
295
|
"input",
|
|
296
296
|
{
|
|
297
|
-
ref:
|
|
297
|
+
ref: d,
|
|
298
298
|
type: "radio",
|
|
299
299
|
className: "strand-radio__native",
|
|
300
|
-
checked:
|
|
301
|
-
disabled:
|
|
302
|
-
onChange:
|
|
303
|
-
name:
|
|
304
|
-
value:
|
|
305
|
-
...
|
|
300
|
+
checked: e,
|
|
301
|
+
disabled: a,
|
|
302
|
+
onChange: a ? void 0 : t,
|
|
303
|
+
name: i,
|
|
304
|
+
value: l,
|
|
305
|
+
...o
|
|
306
306
|
}
|
|
307
307
|
),
|
|
308
308
|
/* @__PURE__ */ s("span", { className: "strand-radio__control", "aria-hidden": "true", children: /* @__PURE__ */ s("span", { className: "strand-radio__dot" }) }),
|
|
@@ -311,22 +311,22 @@ const P = p(
|
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
313
|
P.displayName = "Radio";
|
|
314
|
-
const F =
|
|
314
|
+
const F = h(
|
|
315
315
|
({
|
|
316
|
-
checked:
|
|
316
|
+
checked: e = !1,
|
|
317
317
|
onChange: t,
|
|
318
|
-
disabled:
|
|
318
|
+
disabled: a = !1,
|
|
319
319
|
label: n,
|
|
320
|
-
className:
|
|
321
|
-
...
|
|
320
|
+
className: i = "",
|
|
321
|
+
...l
|
|
322
322
|
}, r) => {
|
|
323
|
-
const
|
|
323
|
+
const o = [
|
|
324
324
|
"strand-switch",
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
e && "strand-switch--checked",
|
|
326
|
+
a && "strand-switch--disabled",
|
|
327
|
+
i
|
|
328
328
|
].filter(Boolean).join(" ");
|
|
329
|
-
return /* @__PURE__ */ _("label", { className:
|
|
329
|
+
return /* @__PURE__ */ _("label", { className: o, children: [
|
|
330
330
|
/* @__PURE__ */ s(
|
|
331
331
|
"button",
|
|
332
332
|
{
|
|
@@ -334,15 +334,15 @@ const F = p(
|
|
|
334
334
|
type: "button",
|
|
335
335
|
role: "switch",
|
|
336
336
|
className: "strand-switch__track",
|
|
337
|
-
"aria-checked":
|
|
338
|
-
disabled:
|
|
337
|
+
"aria-checked": e ? "true" : "false",
|
|
338
|
+
disabled: a,
|
|
339
339
|
onClick: () => {
|
|
340
|
-
!
|
|
340
|
+
!a && t && t(!e);
|
|
341
341
|
},
|
|
342
|
-
onKeyDown: (
|
|
343
|
-
(
|
|
342
|
+
onKeyDown: (c) => {
|
|
343
|
+
(c.key === " " || c.key === "Enter") && !a && (c.preventDefault(), t && t(!e));
|
|
344
344
|
},
|
|
345
|
-
...
|
|
345
|
+
...l,
|
|
346
346
|
children: /* @__PURE__ */ s("span", { className: "strand-switch__thumb", "aria-hidden": "true" })
|
|
347
347
|
}
|
|
348
348
|
),
|
|
@@ -351,62 +351,62 @@ const F = p(
|
|
|
351
351
|
}
|
|
352
352
|
);
|
|
353
353
|
F.displayName = "Switch";
|
|
354
|
-
const
|
|
354
|
+
const O = h(
|
|
355
355
|
({
|
|
356
|
-
min:
|
|
356
|
+
min: e = 0,
|
|
357
357
|
max: t = 100,
|
|
358
|
-
step:
|
|
358
|
+
step: a = 1,
|
|
359
359
|
value: n,
|
|
360
|
-
onChange:
|
|
361
|
-
disabled:
|
|
360
|
+
onChange: i,
|
|
361
|
+
disabled: l,
|
|
362
362
|
className: r = "",
|
|
363
|
-
...
|
|
364
|
-
},
|
|
363
|
+
...o
|
|
364
|
+
}, d) => {
|
|
365
365
|
const u = [
|
|
366
366
|
"strand-slider",
|
|
367
|
-
|
|
367
|
+
l && "strand-slider--disabled",
|
|
368
368
|
r
|
|
369
369
|
].filter(Boolean).join(" ");
|
|
370
370
|
return /* @__PURE__ */ s("div", { className: u, children: /* @__PURE__ */ s(
|
|
371
371
|
"input",
|
|
372
372
|
{
|
|
373
|
-
ref:
|
|
373
|
+
ref: d,
|
|
374
374
|
type: "range",
|
|
375
375
|
className: "strand-slider__field",
|
|
376
|
-
min:
|
|
376
|
+
min: e,
|
|
377
377
|
max: t,
|
|
378
|
-
step:
|
|
378
|
+
step: a,
|
|
379
379
|
value: n,
|
|
380
|
-
onChange:
|
|
381
|
-
disabled:
|
|
382
|
-
"aria-valuemin":
|
|
380
|
+
onChange: i,
|
|
381
|
+
disabled: l,
|
|
382
|
+
"aria-valuemin": e,
|
|
383
383
|
"aria-valuemax": t,
|
|
384
384
|
"aria-valuenow": n,
|
|
385
|
-
...
|
|
385
|
+
...o
|
|
386
386
|
}
|
|
387
387
|
) });
|
|
388
388
|
}
|
|
389
389
|
);
|
|
390
|
-
|
|
391
|
-
const
|
|
390
|
+
O.displayName = "Slider";
|
|
391
|
+
const U = h(
|
|
392
392
|
({
|
|
393
|
-
label:
|
|
393
|
+
label: e,
|
|
394
394
|
htmlFor: t,
|
|
395
|
-
hint:
|
|
395
|
+
hint: a,
|
|
396
396
|
error: n,
|
|
397
|
-
required:
|
|
398
|
-
className:
|
|
397
|
+
required: i = !1,
|
|
398
|
+
className: l = "",
|
|
399
399
|
children: r
|
|
400
|
-
},
|
|
401
|
-
const
|
|
400
|
+
}, o) => {
|
|
401
|
+
const d = [
|
|
402
402
|
"strand-form-field",
|
|
403
403
|
n && "strand-form-field--error",
|
|
404
|
-
|
|
404
|
+
l
|
|
405
405
|
].filter(Boolean).join(" ");
|
|
406
|
-
return /* @__PURE__ */ _("div", { ref:
|
|
406
|
+
return /* @__PURE__ */ _("div", { ref: o, className: d, children: [
|
|
407
407
|
/* @__PURE__ */ _("label", { className: "strand-form-field__label", htmlFor: t, children: [
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
e,
|
|
409
|
+
i && /* @__PURE__ */ s("span", { className: "strand-form-field__required", "aria-hidden": "true", children: "*" })
|
|
410
410
|
] }),
|
|
411
411
|
/* @__PURE__ */ s("div", { className: "strand-form-field__control", children: r }),
|
|
412
412
|
n ? /* @__PURE__ */ s(
|
|
@@ -417,107 +417,107 @@ const q = p(
|
|
|
417
417
|
role: "alert",
|
|
418
418
|
children: n
|
|
419
419
|
}
|
|
420
|
-
) :
|
|
420
|
+
) : a ? /* @__PURE__ */ s("p", { className: "strand-form-field__hint", id: `${t}-hint`, children: a }) : null
|
|
421
421
|
] });
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
|
-
|
|
425
|
-
const
|
|
424
|
+
U.displayName = "FormField";
|
|
425
|
+
const V = h(
|
|
426
426
|
({
|
|
427
|
-
variant:
|
|
427
|
+
variant: e = "elevated",
|
|
428
428
|
padding: t = "md",
|
|
429
|
-
className:
|
|
429
|
+
className: a = "",
|
|
430
430
|
children: n,
|
|
431
|
-
...
|
|
432
|
-
},
|
|
431
|
+
...i
|
|
432
|
+
}, l) => {
|
|
433
433
|
const r = [
|
|
434
434
|
"strand-card",
|
|
435
|
-
`strand-card--${
|
|
435
|
+
`strand-card--${e}`,
|
|
436
436
|
`strand-card--pad-${t}`,
|
|
437
|
-
|
|
437
|
+
a
|
|
438
438
|
].filter(Boolean).join(" ");
|
|
439
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
439
|
+
return /* @__PURE__ */ s("div", { ref: l, className: r, ...i, children: n });
|
|
440
440
|
}
|
|
441
441
|
);
|
|
442
|
-
|
|
443
|
-
const
|
|
442
|
+
V.displayName = "Card";
|
|
443
|
+
const q = h(
|
|
444
444
|
({
|
|
445
|
-
variant:
|
|
445
|
+
variant: e = "count",
|
|
446
446
|
status: t = "default",
|
|
447
|
-
count:
|
|
447
|
+
count: a,
|
|
448
448
|
maxCount: n = 99,
|
|
449
|
-
className:
|
|
450
|
-
children:
|
|
449
|
+
className: i = "",
|
|
450
|
+
children: l,
|
|
451
451
|
...r
|
|
452
|
-
},
|
|
453
|
-
const
|
|
452
|
+
}, o) => {
|
|
453
|
+
const d = l != null && l !== !1, u = e === "count" ? a != null && a > n ? `${n}+` : a : null, c = e === "dot" ? "Status indicator" : a != null ? `${a} notifications` : void 0, p = [
|
|
454
454
|
"strand-badge__indicator",
|
|
455
|
-
`strand-badge--${
|
|
455
|
+
`strand-badge--${e}`,
|
|
456
456
|
`strand-badge--${t}`
|
|
457
|
-
].filter(Boolean).join(" "), m = /* @__PURE__ */ s("span", { className:
|
|
458
|
-
if (!
|
|
459
|
-
const
|
|
457
|
+
].filter(Boolean).join(" "), m = /* @__PURE__ */ s("span", { className: p, "aria-label": c, role: "status", children: u });
|
|
458
|
+
if (!d) {
|
|
459
|
+
const v = [
|
|
460
460
|
"strand-badge",
|
|
461
461
|
"strand-badge--inline",
|
|
462
|
-
|
|
462
|
+
i
|
|
463
463
|
].filter(Boolean).join(" ");
|
|
464
|
-
return /* @__PURE__ */ s("span", { ref:
|
|
464
|
+
return /* @__PURE__ */ s("span", { ref: o, className: v, ...r, children: m });
|
|
465
465
|
}
|
|
466
|
-
const f = ["strand-badge",
|
|
467
|
-
return /* @__PURE__ */ _("span", { ref:
|
|
468
|
-
|
|
466
|
+
const f = ["strand-badge", i].filter(Boolean).join(" ");
|
|
467
|
+
return /* @__PURE__ */ _("span", { ref: o, className: f, ...r, children: [
|
|
468
|
+
l,
|
|
469
469
|
m
|
|
470
470
|
] });
|
|
471
471
|
}
|
|
472
472
|
);
|
|
473
|
-
|
|
474
|
-
const
|
|
473
|
+
q.displayName = "Badge";
|
|
474
|
+
const G = h(
|
|
475
475
|
({
|
|
476
|
-
src:
|
|
476
|
+
src: e,
|
|
477
477
|
alt: t = "",
|
|
478
|
-
initials:
|
|
478
|
+
initials: a = "",
|
|
479
479
|
size: n = "md",
|
|
480
|
-
className:
|
|
481
|
-
...
|
|
480
|
+
className: i = "",
|
|
481
|
+
...l
|
|
482
482
|
}, r) => {
|
|
483
|
-
const [
|
|
484
|
-
|
|
485
|
-
}, []),
|
|
483
|
+
const [o, d] = B(!1), u = N(() => {
|
|
484
|
+
d(!0);
|
|
485
|
+
}, []), c = e && !o, p = a.slice(0, 2).toUpperCase(), m = [
|
|
486
486
|
"strand-avatar",
|
|
487
487
|
`strand-avatar--${n}`,
|
|
488
|
-
|
|
488
|
+
i
|
|
489
489
|
].filter(Boolean).join(" ");
|
|
490
|
-
return /* @__PURE__ */ s("div", { ref: r, className: m, role: "img", "aria-label": t ||
|
|
490
|
+
return /* @__PURE__ */ s("div", { ref: r, className: m, role: "img", "aria-label": t || p, ...l, children: c ? /* @__PURE__ */ s(
|
|
491
491
|
"img",
|
|
492
492
|
{
|
|
493
493
|
className: "strand-avatar__img",
|
|
494
|
-
src:
|
|
494
|
+
src: e,
|
|
495
495
|
alt: t,
|
|
496
496
|
onError: u
|
|
497
497
|
}
|
|
498
|
-
) : /* @__PURE__ */ s("span", { className: "strand-avatar__initials", "aria-hidden": "true", children:
|
|
498
|
+
) : /* @__PURE__ */ s("span", { className: "strand-avatar__initials", "aria-hidden": "true", children: p }) });
|
|
499
499
|
}
|
|
500
500
|
);
|
|
501
|
-
|
|
502
|
-
const
|
|
501
|
+
G.displayName = "Avatar";
|
|
502
|
+
const H = h(
|
|
503
503
|
({
|
|
504
|
-
variant:
|
|
504
|
+
variant: e = "solid",
|
|
505
505
|
status: t = "default",
|
|
506
|
-
removable:
|
|
506
|
+
removable: a = !1,
|
|
507
507
|
onRemove: n,
|
|
508
|
-
className:
|
|
509
|
-
children:
|
|
508
|
+
className: i = "",
|
|
509
|
+
children: l,
|
|
510
510
|
...r
|
|
511
|
-
},
|
|
512
|
-
const
|
|
511
|
+
}, o) => {
|
|
512
|
+
const d = [
|
|
513
513
|
"strand-tag",
|
|
514
|
-
`strand-tag--${
|
|
514
|
+
`strand-tag--${e}`,
|
|
515
515
|
`strand-tag--${t}`,
|
|
516
|
-
|
|
516
|
+
i
|
|
517
517
|
].filter(Boolean).join(" ");
|
|
518
|
-
return /* @__PURE__ */ _("span", { ref:
|
|
519
|
-
/* @__PURE__ */ s("span", { className: "strand-tag__text", children:
|
|
520
|
-
|
|
518
|
+
return /* @__PURE__ */ _("span", { ref: o, className: d, ...r, children: [
|
|
519
|
+
/* @__PURE__ */ s("span", { className: "strand-tag__text", children: l }),
|
|
520
|
+
a && /* @__PURE__ */ s(
|
|
521
521
|
"button",
|
|
522
522
|
{
|
|
523
523
|
type: "button",
|
|
@@ -548,18 +548,18 @@ const V = p(
|
|
|
548
548
|
] });
|
|
549
549
|
}
|
|
550
550
|
);
|
|
551
|
-
|
|
552
|
-
const z =
|
|
553
|
-
({ columns:
|
|
554
|
-
const [r,
|
|
551
|
+
H.displayName = "Tag";
|
|
552
|
+
const z = h(
|
|
553
|
+
({ columns: e, data: t, onSort: a, className: n = "", ...i }, l) => {
|
|
554
|
+
const [r, o] = B(null), [d, u] = B("asc"), c = N(
|
|
555
555
|
(m) => {
|
|
556
|
-
const f = r === m &&
|
|
557
|
-
|
|
556
|
+
const f = r === m && d === "asc" ? "desc" : "asc";
|
|
557
|
+
o(m), u(f), a == null || a(m, f);
|
|
558
558
|
},
|
|
559
|
-
[r,
|
|
560
|
-
),
|
|
561
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
562
|
-
/* @__PURE__ */ s("thead", { className: "strand-table__head", children: /* @__PURE__ */ s("tr", { children:
|
|
559
|
+
[r, d, a]
|
|
560
|
+
), p = ["strand-table-wrapper", n].filter(Boolean).join(" ");
|
|
561
|
+
return /* @__PURE__ */ s("div", { ref: l, className: p, ...i, children: /* @__PURE__ */ _("table", { className: "strand-table", children: [
|
|
562
|
+
/* @__PURE__ */ s("thead", { className: "strand-table__head", children: /* @__PURE__ */ s("tr", { children: e.map((m) => /* @__PURE__ */ s(
|
|
563
563
|
"th",
|
|
564
564
|
{
|
|
565
565
|
className: "strand-table__th",
|
|
@@ -569,7 +569,7 @@ const z = p(
|
|
|
569
569
|
{
|
|
570
570
|
type: "button",
|
|
571
571
|
className: "strand-table__sort-btn",
|
|
572
|
-
onClick: () =>
|
|
572
|
+
onClick: () => c(m.key),
|
|
573
573
|
"aria-label": `Sort by ${m.header}`,
|
|
574
574
|
children: [
|
|
575
575
|
m.header,
|
|
@@ -578,7 +578,7 @@ const z = p(
|
|
|
578
578
|
{
|
|
579
579
|
className: "strand-table__sort-indicator",
|
|
580
580
|
"aria-hidden": "true",
|
|
581
|
-
children: r === m.key ?
|
|
581
|
+
children: r === m.key ? d === "asc" ? "↑" : "↓" : "↕"
|
|
582
582
|
}
|
|
583
583
|
)
|
|
584
584
|
]
|
|
@@ -587,119 +587,119 @@ const z = p(
|
|
|
587
587
|
},
|
|
588
588
|
m.key
|
|
589
589
|
)) }) }),
|
|
590
|
-
/* @__PURE__ */ s("tbody", { className: "strand-table__body", children: t.map((m, f) => /* @__PURE__ */ s("tr", { className: "strand-table__row", children:
|
|
590
|
+
/* @__PURE__ */ s("tbody", { className: "strand-table__body", children: t.map((m, f) => /* @__PURE__ */ s("tr", { className: "strand-table__row", children: e.map((v) => /* @__PURE__ */ s("td", { className: "strand-table__td", children: m[v.key] }, v.key)) }, f)) })
|
|
591
591
|
] }) });
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
594
|
z.displayName = "Table";
|
|
595
|
-
const W =
|
|
596
|
-
({ label:
|
|
595
|
+
const W = h(
|
|
596
|
+
({ label: e, value: t, size: a, className: n = "", ...i }, l) => {
|
|
597
597
|
const r = [
|
|
598
598
|
"strand-data-readout",
|
|
599
|
-
|
|
599
|
+
a && a !== "md" ? `strand-data-readout--${a}` : "",
|
|
600
600
|
n
|
|
601
601
|
].filter(Boolean).join(" ");
|
|
602
|
-
return /* @__PURE__ */ _("div", { ref:
|
|
603
|
-
/* @__PURE__ */ s("span", { className: "strand-data-readout__label", children:
|
|
602
|
+
return /* @__PURE__ */ _("div", { ref: l, className: r, ...i, children: [
|
|
603
|
+
/* @__PURE__ */ s("span", { className: "strand-data-readout__label", children: e }),
|
|
604
604
|
/* @__PURE__ */ s("span", { className: "strand-data-readout__value", children: t })
|
|
605
605
|
] });
|
|
606
606
|
}
|
|
607
607
|
);
|
|
608
608
|
W.displayName = "DataReadout";
|
|
609
|
-
const Z =
|
|
610
|
-
({ code:
|
|
611
|
-
const
|
|
612
|
-
return /* @__PURE__ */ _("div", { ref:
|
|
609
|
+
const Z = h(
|
|
610
|
+
({ code: e, language: t, className: a = "", ...n }, i) => {
|
|
611
|
+
const l = ["strand-code-block", a].filter(Boolean).join(" ");
|
|
612
|
+
return /* @__PURE__ */ _("div", { ref: i, className: l, ...n, children: [
|
|
613
613
|
t && /* @__PURE__ */ s("span", { className: "strand-code-block__label", children: t }),
|
|
614
|
-
/* @__PURE__ */ s("pre", { className: "strand-code-block__pre", children: /* @__PURE__ */ s("code", { children:
|
|
614
|
+
/* @__PURE__ */ s("pre", { className: "strand-code-block__pre", children: /* @__PURE__ */ s("code", { children: e }) })
|
|
615
615
|
] });
|
|
616
616
|
}
|
|
617
617
|
);
|
|
618
618
|
Z.displayName = "CodeBlock";
|
|
619
|
-
const J =
|
|
619
|
+
const J = h(
|
|
620
620
|
({
|
|
621
|
-
direction:
|
|
621
|
+
direction: e = "vertical",
|
|
622
622
|
gap: t = 4,
|
|
623
|
-
align:
|
|
623
|
+
align: a = "stretch",
|
|
624
624
|
wrap: n = !1,
|
|
625
|
-
justify:
|
|
626
|
-
className:
|
|
625
|
+
justify: i,
|
|
626
|
+
className: l = "",
|
|
627
627
|
style: r,
|
|
628
|
-
children:
|
|
629
|
-
...
|
|
628
|
+
children: o,
|
|
629
|
+
...d
|
|
630
630
|
}, u) => {
|
|
631
|
-
const
|
|
631
|
+
const c = [
|
|
632
632
|
"strand-stack",
|
|
633
|
-
`strand-stack--${
|
|
634
|
-
|
|
635
|
-
|
|
633
|
+
`strand-stack--${e}`,
|
|
634
|
+
a !== "stretch" && `strand-stack--align-${a}`,
|
|
635
|
+
i && `strand-stack--justify-${i}`,
|
|
636
636
|
n && "strand-stack--wrap",
|
|
637
|
-
|
|
638
|
-
].filter(Boolean).join(" "),
|
|
637
|
+
l
|
|
638
|
+
].filter(Boolean).join(" "), p = {
|
|
639
639
|
gap: `var(--strand-space-${t})`
|
|
640
640
|
};
|
|
641
641
|
return /* @__PURE__ */ s(
|
|
642
642
|
"div",
|
|
643
643
|
{
|
|
644
644
|
ref: u,
|
|
645
|
-
className:
|
|
646
|
-
style: { ...
|
|
647
|
-
...
|
|
648
|
-
children:
|
|
645
|
+
className: c,
|
|
646
|
+
style: { ...p, ...r },
|
|
647
|
+
...d,
|
|
648
|
+
children: o
|
|
649
649
|
}
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
652
|
);
|
|
653
653
|
J.displayName = "Stack";
|
|
654
|
-
const Q =
|
|
654
|
+
const Q = h(
|
|
655
655
|
({
|
|
656
|
-
columns:
|
|
656
|
+
columns: e = 1,
|
|
657
657
|
gap: t = 4,
|
|
658
|
-
className:
|
|
658
|
+
className: a = "",
|
|
659
659
|
style: n,
|
|
660
|
-
children:
|
|
661
|
-
...
|
|
660
|
+
children: i,
|
|
661
|
+
...l
|
|
662
662
|
}, r) => {
|
|
663
|
-
const
|
|
664
|
-
gridTemplateColumns: `repeat(${
|
|
663
|
+
const o = ["strand-grid", a].filter(Boolean).join(" "), d = {
|
|
664
|
+
gridTemplateColumns: `repeat(${e}, 1fr)`,
|
|
665
665
|
gap: `var(--strand-space-${t})`
|
|
666
666
|
};
|
|
667
667
|
return /* @__PURE__ */ s(
|
|
668
668
|
"div",
|
|
669
669
|
{
|
|
670
670
|
ref: r,
|
|
671
|
-
className:
|
|
672
|
-
style: { ...
|
|
673
|
-
...
|
|
674
|
-
children:
|
|
671
|
+
className: o,
|
|
672
|
+
style: { ...d, ...n },
|
|
673
|
+
...l,
|
|
674
|
+
children: i
|
|
675
675
|
}
|
|
676
676
|
);
|
|
677
677
|
}
|
|
678
678
|
);
|
|
679
679
|
Q.displayName = "Grid";
|
|
680
|
-
const X =
|
|
680
|
+
const X = h(
|
|
681
681
|
({
|
|
682
|
-
size:
|
|
682
|
+
size: e = "default",
|
|
683
683
|
className: t = "",
|
|
684
|
-
children:
|
|
684
|
+
children: a,
|
|
685
685
|
...n
|
|
686
|
-
},
|
|
687
|
-
const
|
|
686
|
+
}, i) => {
|
|
687
|
+
const l = [
|
|
688
688
|
"strand-container",
|
|
689
|
-
`strand-container--${
|
|
689
|
+
`strand-container--${e}`,
|
|
690
690
|
t
|
|
691
691
|
].filter(Boolean).join(" ");
|
|
692
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
692
|
+
return /* @__PURE__ */ s("div", { ref: i, className: l, ...n, children: a });
|
|
693
693
|
}
|
|
694
694
|
);
|
|
695
695
|
X.displayName = "Container";
|
|
696
|
-
const Y =
|
|
697
|
-
({ direction:
|
|
698
|
-
if (
|
|
696
|
+
const Y = h(
|
|
697
|
+
({ direction: e = "horizontal", label: t, className: a = "" }, n) => {
|
|
698
|
+
if (e === "vertical") {
|
|
699
699
|
const r = [
|
|
700
700
|
"strand-divider",
|
|
701
701
|
"strand-divider--vertical",
|
|
702
|
-
|
|
702
|
+
a
|
|
703
703
|
].filter(Boolean).join(" ");
|
|
704
704
|
return /* @__PURE__ */ s(
|
|
705
705
|
"div",
|
|
@@ -716,7 +716,7 @@ const Y = p(
|
|
|
716
716
|
"strand-divider",
|
|
717
717
|
"strand-divider--horizontal",
|
|
718
718
|
"strand-divider--labeled",
|
|
719
|
-
|
|
719
|
+
a
|
|
720
720
|
].filter(Boolean).join(" ");
|
|
721
721
|
return /* @__PURE__ */ _(
|
|
722
722
|
"div",
|
|
@@ -733,10 +733,10 @@ const Y = p(
|
|
|
733
733
|
}
|
|
734
734
|
);
|
|
735
735
|
}
|
|
736
|
-
const
|
|
736
|
+
const l = [
|
|
737
737
|
"strand-divider",
|
|
738
738
|
"strand-divider--horizontal",
|
|
739
|
-
|
|
739
|
+
a
|
|
740
740
|
].filter(Boolean).join(" ");
|
|
741
741
|
return /* @__PURE__ */ s(
|
|
742
742
|
"hr",
|
|
@@ -744,143 +744,143 @@ const Y = p(
|
|
|
744
744
|
ref: n,
|
|
745
745
|
role: "separator",
|
|
746
746
|
"aria-orientation": "horizontal",
|
|
747
|
-
className:
|
|
747
|
+
className: l
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
}
|
|
751
751
|
);
|
|
752
752
|
Y.displayName = "Divider";
|
|
753
|
-
const
|
|
753
|
+
const ee = h(
|
|
754
754
|
({
|
|
755
|
-
variant:
|
|
755
|
+
variant: e = "standard",
|
|
756
756
|
background: t = "primary",
|
|
757
|
-
className:
|
|
757
|
+
className: a = "",
|
|
758
758
|
children: n,
|
|
759
|
-
...
|
|
760
|
-
},
|
|
759
|
+
...i
|
|
760
|
+
}, l) => {
|
|
761
761
|
const r = [
|
|
762
762
|
"strand-section",
|
|
763
|
-
`strand-section--${
|
|
763
|
+
`strand-section--${e}`,
|
|
764
764
|
`strand-section--bg-${t}`,
|
|
765
|
-
|
|
765
|
+
a
|
|
766
766
|
].filter(Boolean).join(" ");
|
|
767
|
-
return /* @__PURE__ */ s("section", { ref:
|
|
767
|
+
return /* @__PURE__ */ s("section", { ref: l, className: r, ...i, children: n });
|
|
768
768
|
}
|
|
769
769
|
);
|
|
770
|
-
|
|
771
|
-
const
|
|
772
|
-
({ href:
|
|
773
|
-
const r = ["strand-link",
|
|
770
|
+
ee.displayName = "Section";
|
|
771
|
+
const ae = h(
|
|
772
|
+
({ href: e, external: t = !1, className: a = "", children: n, ...i }, l) => {
|
|
773
|
+
const r = ["strand-link", a].filter(Boolean).join(" ");
|
|
774
774
|
return /* @__PURE__ */ s(
|
|
775
775
|
"a",
|
|
776
776
|
{
|
|
777
|
-
ref:
|
|
778
|
-
href:
|
|
777
|
+
ref: l,
|
|
778
|
+
href: e,
|
|
779
779
|
className: r,
|
|
780
780
|
...t && { target: "_blank", rel: "noopener noreferrer" },
|
|
781
|
-
...
|
|
781
|
+
...i,
|
|
782
782
|
children: n
|
|
783
783
|
}
|
|
784
784
|
);
|
|
785
785
|
}
|
|
786
786
|
);
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
({ tabs:
|
|
790
|
-
const r =
|
|
791
|
-
(
|
|
787
|
+
ae.displayName = "Link";
|
|
788
|
+
const se = h(
|
|
789
|
+
({ tabs: e, activeTab: t, onChange: a, className: n = "", ...i }, l) => {
|
|
790
|
+
const r = g(null), o = ["strand-tabs", n].filter(Boolean).join(" "), d = N(
|
|
791
|
+
(c) => {
|
|
792
792
|
var m, f;
|
|
793
|
-
const
|
|
794
|
-
if (
|
|
795
|
-
|
|
796
|
-
const
|
|
793
|
+
const p = e[c];
|
|
794
|
+
if (p) {
|
|
795
|
+
a(p.id);
|
|
796
|
+
const v = (m = r.current) == null ? void 0 : m.querySelectorAll(
|
|
797
797
|
'[role="tab"]'
|
|
798
798
|
);
|
|
799
|
-
(f =
|
|
799
|
+
(f = v == null ? void 0 : v[c]) == null || f.focus();
|
|
800
800
|
}
|
|
801
801
|
},
|
|
802
|
-
[
|
|
803
|
-
), u =
|
|
804
|
-
(
|
|
805
|
-
const
|
|
802
|
+
[e, a]
|
|
803
|
+
), u = N(
|
|
804
|
+
(c) => {
|
|
805
|
+
const p = e.findIndex((f) => f.id === t);
|
|
806
806
|
let m = null;
|
|
807
|
-
switch (
|
|
807
|
+
switch (c.key) {
|
|
808
808
|
case "ArrowRight":
|
|
809
|
-
m = (
|
|
809
|
+
m = (p + 1) % e.length;
|
|
810
810
|
break;
|
|
811
811
|
case "ArrowLeft":
|
|
812
|
-
m = (
|
|
812
|
+
m = (p - 1 + e.length) % e.length;
|
|
813
813
|
break;
|
|
814
814
|
case "Home":
|
|
815
815
|
m = 0;
|
|
816
816
|
break;
|
|
817
817
|
case "End":
|
|
818
|
-
m =
|
|
818
|
+
m = e.length - 1;
|
|
819
819
|
break;
|
|
820
820
|
default:
|
|
821
821
|
return;
|
|
822
822
|
}
|
|
823
|
-
|
|
823
|
+
c.preventDefault(), d(m);
|
|
824
824
|
},
|
|
825
|
-
[
|
|
825
|
+
[e, t, d]
|
|
826
826
|
);
|
|
827
|
-
return /* @__PURE__ */ _("div", { ref:
|
|
827
|
+
return /* @__PURE__ */ _("div", { ref: l, className: o, ...i, children: [
|
|
828
828
|
/* @__PURE__ */ s(
|
|
829
829
|
"div",
|
|
830
830
|
{
|
|
831
831
|
ref: r,
|
|
832
832
|
role: "tablist",
|
|
833
833
|
onKeyDown: u,
|
|
834
|
-
children:
|
|
835
|
-
const
|
|
834
|
+
children: e.map((c) => {
|
|
835
|
+
const p = c.id === t, m = [
|
|
836
836
|
"strand-tabs__tab",
|
|
837
|
-
|
|
837
|
+
p && "strand-tabs__tab--active"
|
|
838
838
|
].filter(Boolean).join(" ");
|
|
839
839
|
return /* @__PURE__ */ s(
|
|
840
840
|
"button",
|
|
841
841
|
{
|
|
842
|
-
id: `tab-${
|
|
842
|
+
id: `tab-${c.id}`,
|
|
843
843
|
role: "tab",
|
|
844
844
|
type: "button",
|
|
845
845
|
className: m,
|
|
846
|
-
"aria-selected":
|
|
847
|
-
"aria-controls": `panel-${
|
|
848
|
-
tabIndex:
|
|
849
|
-
onClick: () =>
|
|
850
|
-
children:
|
|
846
|
+
"aria-selected": p ? "true" : "false",
|
|
847
|
+
"aria-controls": `panel-${c.id}`,
|
|
848
|
+
tabIndex: p ? 0 : -1,
|
|
849
|
+
onClick: () => a(c.id),
|
|
850
|
+
children: c.label
|
|
851
851
|
},
|
|
852
|
-
|
|
852
|
+
c.id
|
|
853
853
|
);
|
|
854
854
|
})
|
|
855
855
|
}
|
|
856
856
|
),
|
|
857
|
-
|
|
858
|
-
const
|
|
857
|
+
e.map((c) => {
|
|
858
|
+
const p = c.id === t;
|
|
859
859
|
return /* @__PURE__ */ s(
|
|
860
860
|
"div",
|
|
861
861
|
{
|
|
862
|
-
id: `panel-${
|
|
862
|
+
id: `panel-${c.id}`,
|
|
863
863
|
role: "tabpanel",
|
|
864
|
-
"aria-labelledby": `tab-${
|
|
865
|
-
hidden: !
|
|
864
|
+
"aria-labelledby": `tab-${c.id}`,
|
|
865
|
+
hidden: !p,
|
|
866
866
|
tabIndex: 0,
|
|
867
|
-
children:
|
|
867
|
+
children: c.content
|
|
868
868
|
},
|
|
869
|
-
|
|
869
|
+
c.id
|
|
870
870
|
);
|
|
871
871
|
})
|
|
872
872
|
] });
|
|
873
873
|
}
|
|
874
874
|
);
|
|
875
|
-
|
|
876
|
-
const
|
|
877
|
-
({ items:
|
|
878
|
-
const
|
|
879
|
-
return /* @__PURE__ */ s("nav", { ref:
|
|
880
|
-
const
|
|
875
|
+
se.displayName = "Tabs";
|
|
876
|
+
const te = h(
|
|
877
|
+
({ items: e, separator: t = "/", className: a = "", ...n }, i) => {
|
|
878
|
+
const l = ["strand-breadcrumb", a].filter(Boolean).join(" ");
|
|
879
|
+
return /* @__PURE__ */ s("nav", { ref: i, "aria-label": "Breadcrumb", className: l, ...n, children: /* @__PURE__ */ s("ol", { className: "strand-breadcrumb__list", children: e.map((r, o) => {
|
|
880
|
+
const d = o === e.length - 1;
|
|
881
881
|
return /* @__PURE__ */ _("li", { className: "strand-breadcrumb__item", children: [
|
|
882
|
-
|
|
883
|
-
|
|
882
|
+
o > 0 && /* @__PURE__ */ s("span", { className: "strand-breadcrumb__separator", "aria-hidden": "true", children: t }),
|
|
883
|
+
d ? /* @__PURE__ */ s(
|
|
884
884
|
"span",
|
|
885
885
|
{
|
|
886
886
|
className: "strand-breadcrumb__current",
|
|
@@ -888,36 +888,36 @@ const ta = p(
|
|
|
888
888
|
children: r.label
|
|
889
889
|
}
|
|
890
890
|
) : /* @__PURE__ */ s("a", { href: r.href, className: "strand-breadcrumb__link", children: r.label })
|
|
891
|
-
] }, `${r.label}-${
|
|
891
|
+
] }, `${r.label}-${o}`);
|
|
892
892
|
}) }) });
|
|
893
893
|
}
|
|
894
894
|
);
|
|
895
|
-
|
|
896
|
-
const
|
|
897
|
-
({ logo:
|
|
898
|
-
const [r,
|
|
899
|
-
|
|
895
|
+
te.displayName = "Breadcrumb";
|
|
896
|
+
const ne = h(
|
|
897
|
+
({ logo: e, items: t = [], actions: a, className: n = "", ...i }, l) => {
|
|
898
|
+
const [r, o] = B(!1), d = N(() => {
|
|
899
|
+
o((c) => !c);
|
|
900
900
|
}, []), u = ["strand-nav", n].filter(Boolean).join(" ");
|
|
901
|
-
return /* @__PURE__ */ _("nav", { ref:
|
|
901
|
+
return /* @__PURE__ */ _("nav", { ref: l, className: u, "aria-label": "Main navigation", ...i, children: [
|
|
902
902
|
/* @__PURE__ */ _("div", { className: "strand-nav__inner", children: [
|
|
903
|
-
|
|
904
|
-
/* @__PURE__ */ s("div", { className: "strand-nav__items", children: t.map((
|
|
905
|
-
const
|
|
903
|
+
e && /* @__PURE__ */ s("div", { className: "strand-nav__logo", children: e }),
|
|
904
|
+
/* @__PURE__ */ s("div", { className: "strand-nav__items", children: t.map((c) => {
|
|
905
|
+
const p = [
|
|
906
906
|
"strand-nav__link",
|
|
907
|
-
|
|
907
|
+
c.active && "strand-nav__link--active"
|
|
908
908
|
].filter(Boolean).join(" ");
|
|
909
909
|
return /* @__PURE__ */ s(
|
|
910
910
|
"a",
|
|
911
911
|
{
|
|
912
|
-
href:
|
|
913
|
-
className:
|
|
914
|
-
"aria-current":
|
|
915
|
-
children:
|
|
912
|
+
href: c.href,
|
|
913
|
+
className: p,
|
|
914
|
+
"aria-current": c.active ? "page" : void 0,
|
|
915
|
+
children: c.label
|
|
916
916
|
},
|
|
917
|
-
|
|
917
|
+
c.href
|
|
918
918
|
);
|
|
919
919
|
}) }),
|
|
920
|
-
|
|
920
|
+
a && /* @__PURE__ */ s("div", { className: "strand-nav__actions", children: a }),
|
|
921
921
|
/* @__PURE__ */ s(
|
|
922
922
|
"button",
|
|
923
923
|
{
|
|
@@ -925,79 +925,79 @@ const na = p(
|
|
|
925
925
|
className: "strand-nav__hamburger",
|
|
926
926
|
"aria-expanded": r ? "true" : "false",
|
|
927
927
|
"aria-label": r ? "Close menu" : "Menu",
|
|
928
|
-
onClick:
|
|
928
|
+
onClick: d,
|
|
929
929
|
children: /* @__PURE__ */ s("span", { className: "strand-nav__hamburger-icon", "aria-hidden": "true" })
|
|
930
930
|
}
|
|
931
931
|
)
|
|
932
932
|
] }),
|
|
933
|
-
r && /* @__PURE__ */ s("div", { className: "strand-nav__mobile-menu", children: t.map((
|
|
934
|
-
const
|
|
933
|
+
r && /* @__PURE__ */ s("div", { className: "strand-nav__mobile-menu", children: t.map((c) => {
|
|
934
|
+
const p = [
|
|
935
935
|
"strand-nav__mobile-link",
|
|
936
|
-
|
|
936
|
+
c.active && "strand-nav__mobile-link--active"
|
|
937
937
|
].filter(Boolean).join(" ");
|
|
938
938
|
return /* @__PURE__ */ s(
|
|
939
939
|
"a",
|
|
940
940
|
{
|
|
941
|
-
href:
|
|
942
|
-
className:
|
|
943
|
-
"aria-current":
|
|
944
|
-
children:
|
|
941
|
+
href: c.href,
|
|
942
|
+
className: p,
|
|
943
|
+
"aria-current": c.active ? "page" : void 0,
|
|
944
|
+
children: c.label
|
|
945
945
|
},
|
|
946
|
-
|
|
946
|
+
c.href
|
|
947
947
|
);
|
|
948
948
|
}) })
|
|
949
949
|
] });
|
|
950
950
|
}
|
|
951
951
|
);
|
|
952
|
-
|
|
953
|
-
const
|
|
954
|
-
function
|
|
955
|
-
const
|
|
956
|
-
if (!
|
|
952
|
+
ne.displayName = "Nav";
|
|
953
|
+
const D = I(null);
|
|
954
|
+
function we() {
|
|
955
|
+
const e = R(D);
|
|
956
|
+
if (!e)
|
|
957
957
|
throw new Error("useToast must be used within a ToastProvider");
|
|
958
|
-
return
|
|
958
|
+
return e;
|
|
959
959
|
}
|
|
960
|
-
let
|
|
961
|
-
const
|
|
962
|
-
const [
|
|
963
|
-
n((
|
|
964
|
-
}, []),
|
|
965
|
-
const
|
|
966
|
-
id: ++
|
|
967
|
-
message:
|
|
968
|
-
status:
|
|
969
|
-
duration:
|
|
960
|
+
let re = 0;
|
|
961
|
+
const le = ({ children: e, className: t = "" }) => {
|
|
962
|
+
const [a, n] = B([]), i = N((o) => {
|
|
963
|
+
n((d) => d.filter((u) => u.id !== o));
|
|
964
|
+
}, []), l = N((o) => {
|
|
965
|
+
const d = {
|
|
966
|
+
id: ++re,
|
|
967
|
+
message: o.message,
|
|
968
|
+
status: o.status ?? "info",
|
|
969
|
+
duration: o.duration ?? 5e3
|
|
970
970
|
};
|
|
971
|
-
n((u) => [...u,
|
|
971
|
+
n((u) => [...u, d]);
|
|
972
972
|
}, []), r = ["strand-toast__container", t].filter(Boolean).join(" ");
|
|
973
|
-
return /* @__PURE__ */ _(
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
973
|
+
return /* @__PURE__ */ _(D.Provider, { value: { toast: l }, children: [
|
|
974
|
+
e,
|
|
975
|
+
a.length > 0 && /* @__PURE__ */ s("div", { className: r, children: a.map((o) => /* @__PURE__ */ s(
|
|
976
|
+
ie,
|
|
977
977
|
{
|
|
978
|
-
entry:
|
|
979
|
-
onDismiss: () =>
|
|
978
|
+
entry: o,
|
|
979
|
+
onDismiss: () => i(o.id)
|
|
980
980
|
},
|
|
981
|
-
|
|
981
|
+
o.id
|
|
982
982
|
)) })
|
|
983
983
|
] });
|
|
984
984
|
};
|
|
985
|
-
|
|
986
|
-
function
|
|
987
|
-
const
|
|
988
|
-
C(() => (
|
|
989
|
-
|
|
990
|
-
}), [
|
|
991
|
-
const n =
|
|
985
|
+
le.displayName = "ToastProvider";
|
|
986
|
+
function ie({ entry: e, onDismiss: t }) {
|
|
987
|
+
const a = g(null);
|
|
988
|
+
C(() => (e.duration > 0 && (a.current = setTimeout(t, e.duration)), () => {
|
|
989
|
+
a.current !== null && clearTimeout(a.current);
|
|
990
|
+
}), [e.duration, t]);
|
|
991
|
+
const n = e.status === "error" || e.status === "warning", i = ["strand-toast", `strand-toast--${e.status}`].filter(Boolean).join(" "), l = e.status === "success" ? "COMPLETE" : e.status.toUpperCase();
|
|
992
992
|
return /* @__PURE__ */ _(
|
|
993
993
|
"div",
|
|
994
994
|
{
|
|
995
|
-
className:
|
|
995
|
+
className: i,
|
|
996
996
|
role: "status",
|
|
997
997
|
"aria-live": n ? "assertive" : "polite",
|
|
998
998
|
children: [
|
|
999
|
-
/* @__PURE__ */ s("span", { className: "strand-toast__status", children:
|
|
1000
|
-
/* @__PURE__ */ s("span", { className: "strand-toast__message", children:
|
|
999
|
+
/* @__PURE__ */ s("span", { className: "strand-toast__status", children: l }),
|
|
1000
|
+
/* @__PURE__ */ s("span", { className: "strand-toast__message", children: e.message }),
|
|
1001
1001
|
/* @__PURE__ */ s(
|
|
1002
1002
|
"button",
|
|
1003
1003
|
{
|
|
@@ -1012,31 +1012,31 @@ function ia({ entry: a, onDismiss: t }) {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
);
|
|
1014
1014
|
}
|
|
1015
|
-
const
|
|
1016
|
-
({ status:
|
|
1017
|
-
const r =
|
|
1015
|
+
const oe = h(
|
|
1016
|
+
({ status: e = "info", message: t, onDismiss: a, className: n = "", ...i }, l) => {
|
|
1017
|
+
const r = e === "error" || e === "warning", o = [
|
|
1018
1018
|
"strand-toast",
|
|
1019
|
-
`strand-toast--${
|
|
1019
|
+
`strand-toast--${e}`,
|
|
1020
1020
|
n
|
|
1021
|
-
].filter(Boolean).join(" "),
|
|
1021
|
+
].filter(Boolean).join(" "), d = e === "success" ? "COMPLETE" : e.toUpperCase();
|
|
1022
1022
|
return /* @__PURE__ */ _(
|
|
1023
1023
|
"div",
|
|
1024
1024
|
{
|
|
1025
|
-
ref:
|
|
1026
|
-
className:
|
|
1025
|
+
ref: l,
|
|
1026
|
+
className: o,
|
|
1027
1027
|
role: "status",
|
|
1028
1028
|
"aria-live": r ? "assertive" : "polite",
|
|
1029
|
-
...
|
|
1029
|
+
...i,
|
|
1030
1030
|
children: [
|
|
1031
|
-
/* @__PURE__ */ s("span", { className: "strand-toast__status", children:
|
|
1031
|
+
/* @__PURE__ */ s("span", { className: "strand-toast__status", children: d }),
|
|
1032
1032
|
/* @__PURE__ */ s("span", { className: "strand-toast__message", children: t }),
|
|
1033
|
-
|
|
1033
|
+
a && /* @__PURE__ */ s(
|
|
1034
1034
|
"button",
|
|
1035
1035
|
{
|
|
1036
1036
|
type: "button",
|
|
1037
1037
|
className: "strand-toast__dismiss",
|
|
1038
1038
|
"aria-label": "Dismiss",
|
|
1039
|
-
onClick:
|
|
1039
|
+
onClick: a,
|
|
1040
1040
|
children: "×"
|
|
1041
1041
|
}
|
|
1042
1042
|
)
|
|
@@ -1045,55 +1045,55 @@ const oa = p(
|
|
|
1045
1045
|
);
|
|
1046
1046
|
}
|
|
1047
1047
|
);
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1048
|
+
oe.displayName = "Toast";
|
|
1049
|
+
const de = h(
|
|
1050
1050
|
({
|
|
1051
|
-
status:
|
|
1051
|
+
status: e = "info",
|
|
1052
1052
|
dismissible: t = !1,
|
|
1053
|
-
onDismiss:
|
|
1053
|
+
onDismiss: a,
|
|
1054
1054
|
className: n = "",
|
|
1055
|
-
children:
|
|
1056
|
-
...
|
|
1055
|
+
children: i,
|
|
1056
|
+
...l
|
|
1057
1057
|
}, r) => {
|
|
1058
|
-
const
|
|
1058
|
+
const o = e === "error" || e === "warning" ? "alert" : "status", d = [
|
|
1059
1059
|
"strand-alert",
|
|
1060
|
-
`strand-alert--${
|
|
1060
|
+
`strand-alert--${e}`,
|
|
1061
1061
|
n
|
|
1062
|
-
].filter(Boolean).join(" "), u =
|
|
1063
|
-
return /* @__PURE__ */ _("div", { ref: r, className:
|
|
1062
|
+
].filter(Boolean).join(" "), u = e === "success" ? "COMPLETE" : e.toUpperCase();
|
|
1063
|
+
return /* @__PURE__ */ _("div", { ref: r, className: d, role: o, ...l, children: [
|
|
1064
1064
|
/* @__PURE__ */ s("span", { className: "strand-alert__status", children: u }),
|
|
1065
|
-
/* @__PURE__ */ s("div", { className: "strand-alert__content", children:
|
|
1065
|
+
/* @__PURE__ */ s("div", { className: "strand-alert__content", children: i }),
|
|
1066
1066
|
t && /* @__PURE__ */ s(
|
|
1067
1067
|
"button",
|
|
1068
1068
|
{
|
|
1069
1069
|
type: "button",
|
|
1070
1070
|
className: "strand-alert__dismiss",
|
|
1071
1071
|
"aria-label": "Dismiss",
|
|
1072
|
-
onClick:
|
|
1072
|
+
onClick: a,
|
|
1073
1073
|
children: "×"
|
|
1074
1074
|
}
|
|
1075
1075
|
)
|
|
1076
1076
|
] });
|
|
1077
1077
|
}
|
|
1078
1078
|
);
|
|
1079
|
-
|
|
1079
|
+
de.displayName = "Alert";
|
|
1080
1080
|
const T = 'a[href], button:not(:disabled), textarea:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex]:not([tabindex="-1"])';
|
|
1081
|
-
let
|
|
1082
|
-
const
|
|
1081
|
+
let ce = 0;
|
|
1082
|
+
const ue = h(
|
|
1083
1083
|
({
|
|
1084
|
-
open:
|
|
1084
|
+
open: e,
|
|
1085
1085
|
onClose: t,
|
|
1086
|
-
title:
|
|
1086
|
+
title: a,
|
|
1087
1087
|
closeOnOutsideClick: n = !0,
|
|
1088
|
-
closeOnEscape:
|
|
1089
|
-
className:
|
|
1088
|
+
closeOnEscape: i = !0,
|
|
1089
|
+
className: l = "",
|
|
1090
1090
|
children: r,
|
|
1091
|
-
...
|
|
1092
|
-
},
|
|
1093
|
-
const u =
|
|
1091
|
+
...o
|
|
1092
|
+
}, d) => {
|
|
1093
|
+
const u = g(null), c = g(null), m = g(`strand-dialog-title-${++ce}`).current;
|
|
1094
1094
|
C(() => {
|
|
1095
|
-
if (!
|
|
1096
|
-
|
|
1095
|
+
if (!e) return;
|
|
1096
|
+
c.current = document.activeElement;
|
|
1097
1097
|
const b = requestAnimationFrame(() => {
|
|
1098
1098
|
const y = u.current;
|
|
1099
1099
|
if (!y) return;
|
|
@@ -1102,19 +1102,19 @@ const ua = p(
|
|
|
1102
1102
|
});
|
|
1103
1103
|
return () => {
|
|
1104
1104
|
cancelAnimationFrame(b);
|
|
1105
|
-
const y =
|
|
1105
|
+
const y = c.current;
|
|
1106
1106
|
y && y instanceof HTMLElement && y.focus();
|
|
1107
1107
|
};
|
|
1108
|
-
}, [
|
|
1109
|
-
if (!
|
|
1108
|
+
}, [e]), C(() => {
|
|
1109
|
+
if (!e) return;
|
|
1110
1110
|
const b = document.body.style.overflow;
|
|
1111
1111
|
return document.body.style.overflow = "hidden", () => {
|
|
1112
1112
|
document.body.style.overflow = b;
|
|
1113
1113
|
};
|
|
1114
|
-
}, [
|
|
1115
|
-
const f =
|
|
1114
|
+
}, [e]);
|
|
1115
|
+
const f = N(
|
|
1116
1116
|
(b) => {
|
|
1117
|
-
if (b.key === "Escape" &&
|
|
1117
|
+
if (b.key === "Escape" && i) {
|
|
1118
1118
|
b.stopPropagation(), t();
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
@@ -1125,39 +1125,39 @@ const ua = p(
|
|
|
1125
1125
|
y.querySelectorAll(T)
|
|
1126
1126
|
);
|
|
1127
1127
|
if (w.length === 0) return;
|
|
1128
|
-
const
|
|
1129
|
-
b.shiftKey ? document.activeElement ===
|
|
1128
|
+
const j = w[0], $ = w[w.length - 1];
|
|
1129
|
+
b.shiftKey ? document.activeElement === j && (b.preventDefault(), $.focus()) : document.activeElement === $ && (b.preventDefault(), j.focus());
|
|
1130
1130
|
}
|
|
1131
1131
|
},
|
|
1132
|
-
[
|
|
1133
|
-
),
|
|
1132
|
+
[i, t]
|
|
1133
|
+
), v = N(
|
|
1134
1134
|
(b) => {
|
|
1135
1135
|
n && b.target === b.currentTarget && t();
|
|
1136
1136
|
},
|
|
1137
1137
|
[n, t]
|
|
1138
1138
|
);
|
|
1139
|
-
if (!
|
|
1140
|
-
const
|
|
1139
|
+
if (!e) return null;
|
|
1140
|
+
const k = ["strand-dialog__panel", l].filter(Boolean).join(" ");
|
|
1141
1141
|
return /* @__PURE__ */ s(
|
|
1142
1142
|
"div",
|
|
1143
1143
|
{
|
|
1144
1144
|
className: "strand-dialog__backdrop",
|
|
1145
|
-
onClick:
|
|
1145
|
+
onClick: v,
|
|
1146
1146
|
onKeyDown: f,
|
|
1147
1147
|
children: /* @__PURE__ */ _(
|
|
1148
1148
|
"div",
|
|
1149
1149
|
{
|
|
1150
1150
|
ref: (b) => {
|
|
1151
|
-
u.current = b, typeof
|
|
1151
|
+
u.current = b, typeof d == "function" ? d(b) : d && (d.current = b);
|
|
1152
1152
|
},
|
|
1153
|
-
className:
|
|
1153
|
+
className: k,
|
|
1154
1154
|
role: "dialog",
|
|
1155
1155
|
"aria-modal": "true",
|
|
1156
|
-
"aria-labelledby":
|
|
1156
|
+
"aria-labelledby": a ? m : void 0,
|
|
1157
1157
|
tabIndex: -1,
|
|
1158
|
-
...
|
|
1158
|
+
...o,
|
|
1159
1159
|
children: [
|
|
1160
|
-
|
|
1160
|
+
a && /* @__PURE__ */ s("div", { className: "strand-dialog__header", children: /* @__PURE__ */ s("h2", { id: m, className: "strand-dialog__title", children: a }) }),
|
|
1161
1161
|
/* @__PURE__ */ s(
|
|
1162
1162
|
"button",
|
|
1163
1163
|
{
|
|
@@ -1176,49 +1176,49 @@ const ua = p(
|
|
|
1176
1176
|
);
|
|
1177
1177
|
}
|
|
1178
1178
|
);
|
|
1179
|
-
|
|
1180
|
-
let
|
|
1181
|
-
const
|
|
1179
|
+
ue.displayName = "Dialog";
|
|
1180
|
+
let me = 0;
|
|
1181
|
+
const pe = h(
|
|
1182
1182
|
({
|
|
1183
|
-
content:
|
|
1183
|
+
content: e,
|
|
1184
1184
|
position: t = "top",
|
|
1185
|
-
delay:
|
|
1185
|
+
delay: a = 200,
|
|
1186
1186
|
className: n = "",
|
|
1187
|
-
children:
|
|
1188
|
-
...
|
|
1187
|
+
children: i,
|
|
1188
|
+
...l
|
|
1189
1189
|
}, r) => {
|
|
1190
|
-
const [
|
|
1190
|
+
const [o, d] = B(!1), u = g(null), p = g(`strand-tooltip-${++me}`).current, m = N(() => {
|
|
1191
1191
|
u.current = setTimeout(() => {
|
|
1192
|
-
|
|
1193
|
-
},
|
|
1194
|
-
}, [
|
|
1195
|
-
u.current !== null && (clearTimeout(u.current), u.current = null),
|
|
1196
|
-
}, []),
|
|
1192
|
+
d(!0);
|
|
1193
|
+
}, a);
|
|
1194
|
+
}, [a]), f = N(() => {
|
|
1195
|
+
u.current !== null && (clearTimeout(u.current), u.current = null), d(!1);
|
|
1196
|
+
}, []), v = ["strand-tooltip__wrapper", n].filter(Boolean).join(" "), k = [
|
|
1197
1197
|
"strand-tooltip",
|
|
1198
1198
|
`strand-tooltip--${t}`,
|
|
1199
|
-
|
|
1199
|
+
o && "strand-tooltip--visible"
|
|
1200
1200
|
].filter(Boolean).join(" ");
|
|
1201
1201
|
return /* @__PURE__ */ _(
|
|
1202
1202
|
"span",
|
|
1203
1203
|
{
|
|
1204
1204
|
ref: r,
|
|
1205
|
-
className:
|
|
1205
|
+
className: v,
|
|
1206
1206
|
onMouseEnter: m,
|
|
1207
1207
|
onMouseLeave: f,
|
|
1208
1208
|
onFocus: m,
|
|
1209
1209
|
onBlur: f,
|
|
1210
|
-
"aria-describedby":
|
|
1211
|
-
...
|
|
1210
|
+
"aria-describedby": p,
|
|
1211
|
+
...l,
|
|
1212
1212
|
children: [
|
|
1213
|
-
|
|
1213
|
+
i,
|
|
1214
1214
|
/* @__PURE__ */ s(
|
|
1215
1215
|
"span",
|
|
1216
1216
|
{
|
|
1217
|
-
id:
|
|
1218
|
-
className:
|
|
1217
|
+
id: p,
|
|
1218
|
+
className: k,
|
|
1219
1219
|
role: "tooltip",
|
|
1220
|
-
"aria-hidden": !
|
|
1221
|
-
children:
|
|
1220
|
+
"aria-hidden": !o,
|
|
1221
|
+
children: e
|
|
1222
1222
|
}
|
|
1223
1223
|
)
|
|
1224
1224
|
]
|
|
@@ -1226,29 +1226,29 @@ const ha = p(
|
|
|
1226
1226
|
);
|
|
1227
1227
|
}
|
|
1228
1228
|
);
|
|
1229
|
-
|
|
1230
|
-
const
|
|
1229
|
+
pe.displayName = "Tooltip";
|
|
1230
|
+
const S = { sm: 24, md: 40, lg: 56 }, x = 3, he = h(
|
|
1231
1231
|
({
|
|
1232
|
-
variant:
|
|
1232
|
+
variant: e = "bar",
|
|
1233
1233
|
value: t,
|
|
1234
|
-
size:
|
|
1234
|
+
size: a = "md",
|
|
1235
1235
|
className: n = "",
|
|
1236
|
-
...
|
|
1237
|
-
},
|
|
1238
|
-
const r = t != null,
|
|
1236
|
+
...i
|
|
1237
|
+
}, l) => {
|
|
1238
|
+
const r = t != null, o = [
|
|
1239
1239
|
"strand-progress",
|
|
1240
|
-
`strand-progress--${a}`,
|
|
1241
1240
|
`strand-progress--${e}`,
|
|
1241
|
+
`strand-progress--${a}`,
|
|
1242
1242
|
!r && "strand-progress--indeterminate",
|
|
1243
1243
|
n
|
|
1244
|
-
].filter(Boolean).join(" "),
|
|
1244
|
+
].filter(Boolean).join(" "), d = {
|
|
1245
1245
|
role: "progressbar",
|
|
1246
1246
|
"aria-valuemin": 0,
|
|
1247
1247
|
"aria-valuemax": 100
|
|
1248
1248
|
};
|
|
1249
|
-
if (r && (
|
|
1250
|
-
const u =
|
|
1251
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
1249
|
+
if (r && (d["aria-valuenow"] = t), e === "ring") {
|
|
1250
|
+
const u = S[a] ?? S.md, c = (u - x) / 2, p = 2 * Math.PI * c, m = r ? p - p * t / 100 : 0;
|
|
1251
|
+
return /* @__PURE__ */ s("div", { ref: l, className: o, ...d, ...i, children: /* @__PURE__ */ _(
|
|
1252
1252
|
"svg",
|
|
1253
1253
|
{
|
|
1254
1254
|
width: u,
|
|
@@ -1261,7 +1261,7 @@ const D = { sm: 24, md: 40, lg: 56 }, x = 3, pa = p(
|
|
|
1261
1261
|
{
|
|
1262
1262
|
cx: u / 2,
|
|
1263
1263
|
cy: u / 2,
|
|
1264
|
-
r:
|
|
1264
|
+
r: c,
|
|
1265
1265
|
fill: "none",
|
|
1266
1266
|
"stroke-width": x,
|
|
1267
1267
|
className: "strand-progress__track"
|
|
@@ -1272,10 +1272,10 @@ const D = { sm: 24, md: 40, lg: 56 }, x = 3, pa = p(
|
|
|
1272
1272
|
{
|
|
1273
1273
|
cx: u / 2,
|
|
1274
1274
|
cy: u / 2,
|
|
1275
|
-
r:
|
|
1275
|
+
r: c,
|
|
1276
1276
|
fill: "none",
|
|
1277
1277
|
"stroke-width": x,
|
|
1278
|
-
"stroke-dasharray":
|
|
1278
|
+
"stroke-dasharray": p,
|
|
1279
1279
|
"stroke-dashoffset": r ? m : void 0,
|
|
1280
1280
|
"stroke-linecap": "round",
|
|
1281
1281
|
className: "strand-progress__fill",
|
|
@@ -1286,7 +1286,7 @@ const D = { sm: 24, md: 40, lg: 56 }, x = 3, pa = p(
|
|
|
1286
1286
|
}
|
|
1287
1287
|
) });
|
|
1288
1288
|
}
|
|
1289
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
1289
|
+
return /* @__PURE__ */ s("div", { ref: l, className: o, ...d, ...i, children: /* @__PURE__ */ s(
|
|
1290
1290
|
"div",
|
|
1291
1291
|
{
|
|
1292
1292
|
className: "strand-progress__fill",
|
|
@@ -1295,88 +1295,129 @@ const D = { sm: 24, md: 40, lg: 56 }, x = 3, pa = p(
|
|
|
1295
1295
|
) });
|
|
1296
1296
|
}
|
|
1297
1297
|
);
|
|
1298
|
-
|
|
1299
|
-
const
|
|
1298
|
+
he.displayName = "Progress";
|
|
1299
|
+
const fe = h(
|
|
1300
1300
|
({
|
|
1301
|
-
size:
|
|
1301
|
+
size: e = "md",
|
|
1302
1302
|
className: t = "",
|
|
1303
|
-
...
|
|
1303
|
+
...a
|
|
1304
1304
|
}, n) => {
|
|
1305
|
-
const
|
|
1305
|
+
const i = [
|
|
1306
1306
|
"strand-spinner",
|
|
1307
|
-
`strand-spinner--${
|
|
1307
|
+
`strand-spinner--${e}`,
|
|
1308
1308
|
t
|
|
1309
1309
|
].filter(Boolean).join(" ");
|
|
1310
|
-
return /* @__PURE__ */ _("span", { ref: n, className:
|
|
1310
|
+
return /* @__PURE__ */ _("span", { ref: n, className: i, role: "status", ...a, children: [
|
|
1311
1311
|
/* @__PURE__ */ s("span", { className: "strand-spinner__ring", "aria-hidden": "true" }),
|
|
1312
1312
|
/* @__PURE__ */ s("span", { className: "strand-spinner__sr-only", children: "Loading" })
|
|
1313
1313
|
] });
|
|
1314
1314
|
}
|
|
1315
1315
|
);
|
|
1316
|
-
|
|
1317
|
-
const
|
|
1316
|
+
fe.displayName = "Spinner";
|
|
1317
|
+
const _e = h(
|
|
1318
1318
|
({
|
|
1319
|
-
variant:
|
|
1319
|
+
variant: e = "text",
|
|
1320
1320
|
width: t,
|
|
1321
|
-
height:
|
|
1321
|
+
height: a,
|
|
1322
1322
|
className: n = "",
|
|
1323
|
-
...
|
|
1324
|
-
},
|
|
1325
|
-
const r = t ?? (
|
|
1323
|
+
...i
|
|
1324
|
+
}, l) => {
|
|
1325
|
+
const r = t ?? (e === "text" ? "100%" : void 0), o = e === "circle" ? r : a, d = [
|
|
1326
1326
|
"strand-skeleton",
|
|
1327
|
-
`strand-skeleton--${
|
|
1327
|
+
`strand-skeleton--${e}`,
|
|
1328
1328
|
"strand-skeleton--shimmer",
|
|
1329
1329
|
n
|
|
1330
1330
|
].filter(Boolean).join(" ");
|
|
1331
1331
|
return /* @__PURE__ */ s(
|
|
1332
1332
|
"div",
|
|
1333
1333
|
{
|
|
1334
|
-
ref:
|
|
1335
|
-
className:
|
|
1334
|
+
ref: l,
|
|
1335
|
+
className: d,
|
|
1336
1336
|
"aria-hidden": "true",
|
|
1337
1337
|
style: {
|
|
1338
1338
|
width: r,
|
|
1339
|
-
height:
|
|
1339
|
+
height: o
|
|
1340
1340
|
},
|
|
1341
|
-
...
|
|
1341
|
+
...i
|
|
1342
|
+
}
|
|
1343
|
+
);
|
|
1344
|
+
}
|
|
1345
|
+
);
|
|
1346
|
+
_e.displayName = "Skeleton";
|
|
1347
|
+
const ve = h(({ grid: e = !1, className: t = "", children: a, ...n }, i) => {
|
|
1348
|
+
const l = [
|
|
1349
|
+
"strand-instrument-viewport",
|
|
1350
|
+
e ? "strand-instrument-viewport--grid" : "",
|
|
1351
|
+
t
|
|
1352
|
+
].filter(Boolean).join(" ");
|
|
1353
|
+
return /* @__PURE__ */ s("div", { ref: i, className: l, ...n, children: a });
|
|
1354
|
+
});
|
|
1355
|
+
ve.displayName = "InstrumentViewport";
|
|
1356
|
+
const be = h(
|
|
1357
|
+
({ threshold: e = 0.1, once: t = !0, className: a = "", children: n, ...i }, l) => {
|
|
1358
|
+
const r = g(null), o = ["strand-reveal", a].filter(Boolean).join(" ");
|
|
1359
|
+
return C(() => {
|
|
1360
|
+
const d = r.current;
|
|
1361
|
+
if (!d || typeof IntersectionObserver > "u") return;
|
|
1362
|
+
const u = new IntersectionObserver(
|
|
1363
|
+
(c) => {
|
|
1364
|
+
for (const p of c)
|
|
1365
|
+
p.isIntersecting ? (p.target.classList.add("strand-reveal--visible"), t && u.unobserve(p.target)) : t || p.target.classList.remove("strand-reveal--visible");
|
|
1366
|
+
},
|
|
1367
|
+
{ threshold: e }
|
|
1368
|
+
);
|
|
1369
|
+
return u.observe(d), () => {
|
|
1370
|
+
u.disconnect();
|
|
1371
|
+
};
|
|
1372
|
+
}, [e, t]), /* @__PURE__ */ s(
|
|
1373
|
+
"div",
|
|
1374
|
+
{
|
|
1375
|
+
ref: (d) => {
|
|
1376
|
+
r.current = d, typeof l == "function" ? l(d) : l && (l.current = d);
|
|
1377
|
+
},
|
|
1378
|
+
className: o,
|
|
1379
|
+
...i,
|
|
1380
|
+
children: n
|
|
1342
1381
|
}
|
|
1343
1382
|
);
|
|
1344
1383
|
}
|
|
1345
1384
|
);
|
|
1346
|
-
|
|
1385
|
+
be.displayName = "ScrollReveal";
|
|
1347
1386
|
export {
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1387
|
+
de as Alert,
|
|
1388
|
+
G as Avatar,
|
|
1389
|
+
q as Badge,
|
|
1390
|
+
te as Breadcrumb,
|
|
1391
|
+
E as Button,
|
|
1392
|
+
V as Card,
|
|
1354
1393
|
A as Checkbox,
|
|
1355
1394
|
Z as CodeBlock,
|
|
1356
1395
|
X as Container,
|
|
1357
1396
|
W as DataReadout,
|
|
1358
|
-
|
|
1397
|
+
ue as Dialog,
|
|
1359
1398
|
Y as Divider,
|
|
1360
|
-
|
|
1399
|
+
U as FormField,
|
|
1361
1400
|
Q as Grid,
|
|
1362
1401
|
L as Input,
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1402
|
+
ve as InstrumentViewport,
|
|
1403
|
+
ae as Link,
|
|
1404
|
+
ne as Nav,
|
|
1405
|
+
he as Progress,
|
|
1366
1406
|
P as Radio,
|
|
1367
|
-
|
|
1407
|
+
be as ScrollReveal,
|
|
1408
|
+
ee as Section,
|
|
1368
1409
|
M as Select,
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1410
|
+
_e as Skeleton,
|
|
1411
|
+
O as Slider,
|
|
1412
|
+
fe as Spinner,
|
|
1372
1413
|
J as Stack,
|
|
1373
1414
|
F as Switch,
|
|
1374
1415
|
z as Table,
|
|
1375
|
-
|
|
1376
|
-
|
|
1416
|
+
se as Tabs,
|
|
1417
|
+
H as Tag,
|
|
1377
1418
|
K as Textarea,
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1419
|
+
oe as Toast,
|
|
1420
|
+
le as ToastProvider,
|
|
1421
|
+
pe as Tooltip,
|
|
1422
|
+
we as useToast
|
|
1382
1423
|
};
|