@dillingerstaffing/strand-ui 0.5.1 → 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 +79 -3
- package/README.md +1 -1
- package/dist/components/Alert/Alert.d.ts.map +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/components/Toast/Toast.d.ts.map +1 -1
- package/dist/css/strand-ui.css +145 -54
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +578 -534
- package/package.json +2 -2
- package/src/__tests__/build-output.test.ts +1 -0
- package/src/components/Alert/Alert.css +24 -13
- package/src/components/Alert/Alert.test.tsx +30 -0
- package/src/components/Alert/Alert.tsx +4 -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/CodeBlock/CodeBlock.css +1 -1
- package/src/components/FormField/FormField.css +5 -3
- 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/components/Tabs/Tabs.css +1 -1
- package/src/components/Tag/Tag.css +3 -3
- package/src/components/Toast/Toast.css +15 -17
- package/src/components/Toast/Toast.test.tsx +28 -0
- package/src/components/Toast/Toast.tsx +8 -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
|
|
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
4
|
import { createContext as I } from "preact";
|
|
5
|
-
const E =
|
|
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
|
]
|
|
@@ -52,33 +52,33 @@ const E = p(
|
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
E.displayName = "Button";
|
|
55
|
-
const
|
|
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
|
}
|
|
@@ -87,73 +87,73 @@ const K = p(
|
|
|
87
87
|
] });
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
|
-
|
|
91
|
-
const
|
|
90
|
+
L.displayName = "Input";
|
|
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
|
] })
|
|
139
139
|
] });
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
|
-
|
|
143
|
-
const
|
|
142
|
+
K.displayName = "Textarea";
|
|
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 L = 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
|
),
|
|
@@ -178,28 +178,28 @@ const L = p(
|
|
|
178
178
|
] });
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
|
-
|
|
182
|
-
const
|
|
181
|
+
M.displayName = "Select";
|
|
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
|
|
193
|
-
|
|
194
|
-
const f = typeof
|
|
191
|
+
}, o) => {
|
|
192
|
+
const d = g(null);
|
|
193
|
+
C(() => {
|
|
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 M = 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 M = 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 M = 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 M = 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
|
-
|
|
276
|
-
const P =
|
|
275
|
+
A.displayName = "Checkbox";
|
|
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 G = 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 O = 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,78 +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
|
-
|
|
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-
|
|
999
|
+
/* @__PURE__ */ s("span", { className: "strand-toast__status", children: l }),
|
|
1000
|
+
/* @__PURE__ */ s("span", { className: "strand-toast__message", children: e.message }),
|
|
1000
1001
|
/* @__PURE__ */ s(
|
|
1001
1002
|
"button",
|
|
1002
1003
|
{
|
|
@@ -1011,30 +1012,31 @@ function ia({ entry: a, onDismiss: t }) {
|
|
|
1011
1012
|
}
|
|
1012
1013
|
);
|
|
1013
1014
|
}
|
|
1014
|
-
const
|
|
1015
|
-
({ status:
|
|
1016
|
-
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 = [
|
|
1017
1018
|
"strand-toast",
|
|
1018
|
-
`strand-toast--${
|
|
1019
|
+
`strand-toast--${e}`,
|
|
1019
1020
|
n
|
|
1020
|
-
].filter(Boolean).join(" ");
|
|
1021
|
+
].filter(Boolean).join(" "), d = e === "success" ? "COMPLETE" : e.toUpperCase();
|
|
1021
1022
|
return /* @__PURE__ */ _(
|
|
1022
1023
|
"div",
|
|
1023
1024
|
{
|
|
1024
|
-
ref:
|
|
1025
|
-
className:
|
|
1025
|
+
ref: l,
|
|
1026
|
+
className: o,
|
|
1026
1027
|
role: "status",
|
|
1027
1028
|
"aria-live": r ? "assertive" : "polite",
|
|
1028
|
-
...
|
|
1029
|
+
...i,
|
|
1029
1030
|
children: [
|
|
1031
|
+
/* @__PURE__ */ s("span", { className: "strand-toast__status", children: d }),
|
|
1030
1032
|
/* @__PURE__ */ s("span", { className: "strand-toast__message", children: t }),
|
|
1031
|
-
|
|
1033
|
+
a && /* @__PURE__ */ s(
|
|
1032
1034
|
"button",
|
|
1033
1035
|
{
|
|
1034
1036
|
type: "button",
|
|
1035
1037
|
className: "strand-toast__dismiss",
|
|
1036
1038
|
"aria-label": "Dismiss",
|
|
1037
|
-
onClick:
|
|
1039
|
+
onClick: a,
|
|
1038
1040
|
children: "×"
|
|
1039
1041
|
}
|
|
1040
1042
|
)
|
|
@@ -1043,54 +1045,55 @@ const oa = p(
|
|
|
1043
1045
|
);
|
|
1044
1046
|
}
|
|
1045
1047
|
);
|
|
1046
|
-
|
|
1047
|
-
const
|
|
1048
|
+
oe.displayName = "Toast";
|
|
1049
|
+
const de = h(
|
|
1048
1050
|
({
|
|
1049
|
-
status:
|
|
1051
|
+
status: e = "info",
|
|
1050
1052
|
dismissible: t = !1,
|
|
1051
|
-
onDismiss:
|
|
1053
|
+
onDismiss: a,
|
|
1052
1054
|
className: n = "",
|
|
1053
|
-
children:
|
|
1054
|
-
...
|
|
1055
|
+
children: i,
|
|
1056
|
+
...l
|
|
1055
1057
|
}, r) => {
|
|
1056
|
-
const
|
|
1058
|
+
const o = e === "error" || e === "warning" ? "alert" : "status", d = [
|
|
1057
1059
|
"strand-alert",
|
|
1058
|
-
`strand-alert--${
|
|
1060
|
+
`strand-alert--${e}`,
|
|
1059
1061
|
n
|
|
1060
|
-
].filter(Boolean).join(" ");
|
|
1061
|
-
return /* @__PURE__ */ _("div", { ref: r, className:
|
|
1062
|
-
/* @__PURE__ */ s("
|
|
1062
|
+
].filter(Boolean).join(" "), u = e === "success" ? "COMPLETE" : e.toUpperCase();
|
|
1063
|
+
return /* @__PURE__ */ _("div", { ref: r, className: d, role: o, ...l, children: [
|
|
1064
|
+
/* @__PURE__ */ s("span", { className: "strand-alert__status", children: u }),
|
|
1065
|
+
/* @__PURE__ */ s("div", { className: "strand-alert__content", children: i }),
|
|
1063
1066
|
t && /* @__PURE__ */ s(
|
|
1064
1067
|
"button",
|
|
1065
1068
|
{
|
|
1066
1069
|
type: "button",
|
|
1067
1070
|
className: "strand-alert__dismiss",
|
|
1068
1071
|
"aria-label": "Dismiss",
|
|
1069
|
-
onClick:
|
|
1072
|
+
onClick: a,
|
|
1070
1073
|
children: "×"
|
|
1071
1074
|
}
|
|
1072
1075
|
)
|
|
1073
1076
|
] });
|
|
1074
1077
|
}
|
|
1075
1078
|
);
|
|
1076
|
-
|
|
1079
|
+
de.displayName = "Alert";
|
|
1077
1080
|
const T = 'a[href], button:not(:disabled), textarea:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex]:not([tabindex="-1"])';
|
|
1078
|
-
let
|
|
1079
|
-
const
|
|
1081
|
+
let ce = 0;
|
|
1082
|
+
const ue = h(
|
|
1080
1083
|
({
|
|
1081
|
-
open:
|
|
1084
|
+
open: e,
|
|
1082
1085
|
onClose: t,
|
|
1083
|
-
title:
|
|
1086
|
+
title: a,
|
|
1084
1087
|
closeOnOutsideClick: n = !0,
|
|
1085
|
-
closeOnEscape:
|
|
1086
|
-
className:
|
|
1088
|
+
closeOnEscape: i = !0,
|
|
1089
|
+
className: l = "",
|
|
1087
1090
|
children: r,
|
|
1088
|
-
...
|
|
1089
|
-
},
|
|
1090
|
-
const u =
|
|
1091
|
-
|
|
1092
|
-
if (!
|
|
1093
|
-
|
|
1091
|
+
...o
|
|
1092
|
+
}, d) => {
|
|
1093
|
+
const u = g(null), c = g(null), m = g(`strand-dialog-title-${++ce}`).current;
|
|
1094
|
+
C(() => {
|
|
1095
|
+
if (!e) return;
|
|
1096
|
+
c.current = document.activeElement;
|
|
1094
1097
|
const b = requestAnimationFrame(() => {
|
|
1095
1098
|
const y = u.current;
|
|
1096
1099
|
if (!y) return;
|
|
@@ -1099,19 +1102,19 @@ const ua = p(
|
|
|
1099
1102
|
});
|
|
1100
1103
|
return () => {
|
|
1101
1104
|
cancelAnimationFrame(b);
|
|
1102
|
-
const y =
|
|
1105
|
+
const y = c.current;
|
|
1103
1106
|
y && y instanceof HTMLElement && y.focus();
|
|
1104
1107
|
};
|
|
1105
|
-
}, [
|
|
1106
|
-
if (!
|
|
1108
|
+
}, [e]), C(() => {
|
|
1109
|
+
if (!e) return;
|
|
1107
1110
|
const b = document.body.style.overflow;
|
|
1108
1111
|
return document.body.style.overflow = "hidden", () => {
|
|
1109
1112
|
document.body.style.overflow = b;
|
|
1110
1113
|
};
|
|
1111
|
-
}, [
|
|
1112
|
-
const f =
|
|
1114
|
+
}, [e]);
|
|
1115
|
+
const f = N(
|
|
1113
1116
|
(b) => {
|
|
1114
|
-
if (b.key === "Escape" &&
|
|
1117
|
+
if (b.key === "Escape" && i) {
|
|
1115
1118
|
b.stopPropagation(), t();
|
|
1116
1119
|
return;
|
|
1117
1120
|
}
|
|
@@ -1122,39 +1125,39 @@ const ua = p(
|
|
|
1122
1125
|
y.querySelectorAll(T)
|
|
1123
1126
|
);
|
|
1124
1127
|
if (w.length === 0) return;
|
|
1125
|
-
const
|
|
1126
|
-
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());
|
|
1127
1130
|
}
|
|
1128
1131
|
},
|
|
1129
|
-
[
|
|
1130
|
-
),
|
|
1132
|
+
[i, t]
|
|
1133
|
+
), v = N(
|
|
1131
1134
|
(b) => {
|
|
1132
1135
|
n && b.target === b.currentTarget && t();
|
|
1133
1136
|
},
|
|
1134
1137
|
[n, t]
|
|
1135
1138
|
);
|
|
1136
|
-
if (!
|
|
1137
|
-
const
|
|
1139
|
+
if (!e) return null;
|
|
1140
|
+
const k = ["strand-dialog__panel", l].filter(Boolean).join(" ");
|
|
1138
1141
|
return /* @__PURE__ */ s(
|
|
1139
1142
|
"div",
|
|
1140
1143
|
{
|
|
1141
1144
|
className: "strand-dialog__backdrop",
|
|
1142
|
-
onClick:
|
|
1145
|
+
onClick: v,
|
|
1143
1146
|
onKeyDown: f,
|
|
1144
1147
|
children: /* @__PURE__ */ _(
|
|
1145
1148
|
"div",
|
|
1146
1149
|
{
|
|
1147
1150
|
ref: (b) => {
|
|
1148
|
-
u.current = b, typeof
|
|
1151
|
+
u.current = b, typeof d == "function" ? d(b) : d && (d.current = b);
|
|
1149
1152
|
},
|
|
1150
|
-
className:
|
|
1153
|
+
className: k,
|
|
1151
1154
|
role: "dialog",
|
|
1152
1155
|
"aria-modal": "true",
|
|
1153
|
-
"aria-labelledby":
|
|
1156
|
+
"aria-labelledby": a ? m : void 0,
|
|
1154
1157
|
tabIndex: -1,
|
|
1155
|
-
...
|
|
1158
|
+
...o,
|
|
1156
1159
|
children: [
|
|
1157
|
-
|
|
1160
|
+
a && /* @__PURE__ */ s("div", { className: "strand-dialog__header", children: /* @__PURE__ */ s("h2", { id: m, className: "strand-dialog__title", children: a }) }),
|
|
1158
1161
|
/* @__PURE__ */ s(
|
|
1159
1162
|
"button",
|
|
1160
1163
|
{
|
|
@@ -1173,49 +1176,49 @@ const ua = p(
|
|
|
1173
1176
|
);
|
|
1174
1177
|
}
|
|
1175
1178
|
);
|
|
1176
|
-
|
|
1177
|
-
let
|
|
1178
|
-
const
|
|
1179
|
+
ue.displayName = "Dialog";
|
|
1180
|
+
let me = 0;
|
|
1181
|
+
const pe = h(
|
|
1179
1182
|
({
|
|
1180
|
-
content:
|
|
1183
|
+
content: e,
|
|
1181
1184
|
position: t = "top",
|
|
1182
|
-
delay:
|
|
1185
|
+
delay: a = 200,
|
|
1183
1186
|
className: n = "",
|
|
1184
|
-
children:
|
|
1185
|
-
...
|
|
1187
|
+
children: i,
|
|
1188
|
+
...l
|
|
1186
1189
|
}, r) => {
|
|
1187
|
-
const [
|
|
1190
|
+
const [o, d] = B(!1), u = g(null), p = g(`strand-tooltip-${++me}`).current, m = N(() => {
|
|
1188
1191
|
u.current = setTimeout(() => {
|
|
1189
|
-
|
|
1190
|
-
},
|
|
1191
|
-
}, [
|
|
1192
|
-
u.current !== null && (clearTimeout(u.current), u.current = null),
|
|
1193
|
-
}, []),
|
|
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 = [
|
|
1194
1197
|
"strand-tooltip",
|
|
1195
1198
|
`strand-tooltip--${t}`,
|
|
1196
|
-
|
|
1199
|
+
o && "strand-tooltip--visible"
|
|
1197
1200
|
].filter(Boolean).join(" ");
|
|
1198
1201
|
return /* @__PURE__ */ _(
|
|
1199
1202
|
"span",
|
|
1200
1203
|
{
|
|
1201
1204
|
ref: r,
|
|
1202
|
-
className:
|
|
1205
|
+
className: v,
|
|
1203
1206
|
onMouseEnter: m,
|
|
1204
1207
|
onMouseLeave: f,
|
|
1205
1208
|
onFocus: m,
|
|
1206
1209
|
onBlur: f,
|
|
1207
|
-
"aria-describedby":
|
|
1208
|
-
...
|
|
1210
|
+
"aria-describedby": p,
|
|
1211
|
+
...l,
|
|
1209
1212
|
children: [
|
|
1210
|
-
|
|
1213
|
+
i,
|
|
1211
1214
|
/* @__PURE__ */ s(
|
|
1212
1215
|
"span",
|
|
1213
1216
|
{
|
|
1214
|
-
id:
|
|
1215
|
-
className:
|
|
1217
|
+
id: p,
|
|
1218
|
+
className: k,
|
|
1216
1219
|
role: "tooltip",
|
|
1217
|
-
"aria-hidden": !
|
|
1218
|
-
children:
|
|
1220
|
+
"aria-hidden": !o,
|
|
1221
|
+
children: e
|
|
1219
1222
|
}
|
|
1220
1223
|
)
|
|
1221
1224
|
]
|
|
@@ -1223,29 +1226,29 @@ const ha = p(
|
|
|
1223
1226
|
);
|
|
1224
1227
|
}
|
|
1225
1228
|
);
|
|
1226
|
-
|
|
1227
|
-
const
|
|
1229
|
+
pe.displayName = "Tooltip";
|
|
1230
|
+
const S = { sm: 24, md: 40, lg: 56 }, x = 3, he = h(
|
|
1228
1231
|
({
|
|
1229
|
-
variant:
|
|
1232
|
+
variant: e = "bar",
|
|
1230
1233
|
value: t,
|
|
1231
|
-
size:
|
|
1234
|
+
size: a = "md",
|
|
1232
1235
|
className: n = "",
|
|
1233
|
-
...
|
|
1234
|
-
},
|
|
1235
|
-
const r = t != null,
|
|
1236
|
+
...i
|
|
1237
|
+
}, l) => {
|
|
1238
|
+
const r = t != null, o = [
|
|
1236
1239
|
"strand-progress",
|
|
1237
|
-
`strand-progress--${a}`,
|
|
1238
1240
|
`strand-progress--${e}`,
|
|
1241
|
+
`strand-progress--${a}`,
|
|
1239
1242
|
!r && "strand-progress--indeterminate",
|
|
1240
1243
|
n
|
|
1241
|
-
].filter(Boolean).join(" "),
|
|
1244
|
+
].filter(Boolean).join(" "), d = {
|
|
1242
1245
|
role: "progressbar",
|
|
1243
1246
|
"aria-valuemin": 0,
|
|
1244
1247
|
"aria-valuemax": 100
|
|
1245
1248
|
};
|
|
1246
|
-
if (r && (
|
|
1247
|
-
const u =
|
|
1248
|
-
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__ */ _(
|
|
1249
1252
|
"svg",
|
|
1250
1253
|
{
|
|
1251
1254
|
width: u,
|
|
@@ -1258,9 +1261,9 @@ const D = { sm: 24, md: 40, lg: 56 }, C = 3, pa = p(
|
|
|
1258
1261
|
{
|
|
1259
1262
|
cx: u / 2,
|
|
1260
1263
|
cy: u / 2,
|
|
1261
|
-
r:
|
|
1264
|
+
r: c,
|
|
1262
1265
|
fill: "none",
|
|
1263
|
-
"stroke-width":
|
|
1266
|
+
"stroke-width": x,
|
|
1264
1267
|
className: "strand-progress__track"
|
|
1265
1268
|
}
|
|
1266
1269
|
),
|
|
@@ -1269,10 +1272,10 @@ const D = { sm: 24, md: 40, lg: 56 }, C = 3, pa = p(
|
|
|
1269
1272
|
{
|
|
1270
1273
|
cx: u / 2,
|
|
1271
1274
|
cy: u / 2,
|
|
1272
|
-
r:
|
|
1275
|
+
r: c,
|
|
1273
1276
|
fill: "none",
|
|
1274
|
-
"stroke-width":
|
|
1275
|
-
"stroke-dasharray":
|
|
1277
|
+
"stroke-width": x,
|
|
1278
|
+
"stroke-dasharray": p,
|
|
1276
1279
|
"stroke-dashoffset": r ? m : void 0,
|
|
1277
1280
|
"stroke-linecap": "round",
|
|
1278
1281
|
className: "strand-progress__fill",
|
|
@@ -1283,7 +1286,7 @@ const D = { sm: 24, md: 40, lg: 56 }, C = 3, pa = p(
|
|
|
1283
1286
|
}
|
|
1284
1287
|
) });
|
|
1285
1288
|
}
|
|
1286
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
1289
|
+
return /* @__PURE__ */ s("div", { ref: l, className: o, ...d, ...i, children: /* @__PURE__ */ s(
|
|
1287
1290
|
"div",
|
|
1288
1291
|
{
|
|
1289
1292
|
className: "strand-progress__fill",
|
|
@@ -1292,88 +1295,129 @@ const D = { sm: 24, md: 40, lg: 56 }, C = 3, pa = p(
|
|
|
1292
1295
|
) });
|
|
1293
1296
|
}
|
|
1294
1297
|
);
|
|
1295
|
-
|
|
1296
|
-
const
|
|
1298
|
+
he.displayName = "Progress";
|
|
1299
|
+
const fe = h(
|
|
1297
1300
|
({
|
|
1298
|
-
size:
|
|
1301
|
+
size: e = "md",
|
|
1299
1302
|
className: t = "",
|
|
1300
|
-
...
|
|
1303
|
+
...a
|
|
1301
1304
|
}, n) => {
|
|
1302
|
-
const
|
|
1305
|
+
const i = [
|
|
1303
1306
|
"strand-spinner",
|
|
1304
|
-
`strand-spinner--${
|
|
1307
|
+
`strand-spinner--${e}`,
|
|
1305
1308
|
t
|
|
1306
1309
|
].filter(Boolean).join(" ");
|
|
1307
|
-
return /* @__PURE__ */ _("span", { ref: n, className:
|
|
1310
|
+
return /* @__PURE__ */ _("span", { ref: n, className: i, role: "status", ...a, children: [
|
|
1308
1311
|
/* @__PURE__ */ s("span", { className: "strand-spinner__ring", "aria-hidden": "true" }),
|
|
1309
1312
|
/* @__PURE__ */ s("span", { className: "strand-spinner__sr-only", children: "Loading" })
|
|
1310
1313
|
] });
|
|
1311
1314
|
}
|
|
1312
1315
|
);
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1316
|
+
fe.displayName = "Spinner";
|
|
1317
|
+
const _e = h(
|
|
1315
1318
|
({
|
|
1316
|
-
variant:
|
|
1319
|
+
variant: e = "text",
|
|
1317
1320
|
width: t,
|
|
1318
|
-
height:
|
|
1321
|
+
height: a,
|
|
1319
1322
|
className: n = "",
|
|
1320
|
-
...
|
|
1321
|
-
},
|
|
1322
|
-
const r = t ?? (
|
|
1323
|
+
...i
|
|
1324
|
+
}, l) => {
|
|
1325
|
+
const r = t ?? (e === "text" ? "100%" : void 0), o = e === "circle" ? r : a, d = [
|
|
1323
1326
|
"strand-skeleton",
|
|
1324
|
-
`strand-skeleton--${
|
|
1327
|
+
`strand-skeleton--${e}`,
|
|
1325
1328
|
"strand-skeleton--shimmer",
|
|
1326
1329
|
n
|
|
1327
1330
|
].filter(Boolean).join(" ");
|
|
1328
1331
|
return /* @__PURE__ */ s(
|
|
1329
1332
|
"div",
|
|
1330
1333
|
{
|
|
1331
|
-
ref:
|
|
1332
|
-
className:
|
|
1334
|
+
ref: l,
|
|
1335
|
+
className: d,
|
|
1333
1336
|
"aria-hidden": "true",
|
|
1334
1337
|
style: {
|
|
1335
1338
|
width: r,
|
|
1336
|
-
height:
|
|
1339
|
+
height: o
|
|
1337
1340
|
},
|
|
1338
|
-
...
|
|
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
|
|
1339
1381
|
}
|
|
1340
1382
|
);
|
|
1341
1383
|
}
|
|
1342
1384
|
);
|
|
1343
|
-
|
|
1385
|
+
be.displayName = "ScrollReveal";
|
|
1344
1386
|
export {
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1387
|
+
de as Alert,
|
|
1388
|
+
G as Avatar,
|
|
1389
|
+
q as Badge,
|
|
1390
|
+
te as Breadcrumb,
|
|
1349
1391
|
E as Button,
|
|
1350
|
-
|
|
1351
|
-
|
|
1392
|
+
V as Card,
|
|
1393
|
+
A as Checkbox,
|
|
1352
1394
|
Z as CodeBlock,
|
|
1353
1395
|
X as Container,
|
|
1354
1396
|
W as DataReadout,
|
|
1355
|
-
|
|
1397
|
+
ue as Dialog,
|
|
1356
1398
|
Y as Divider,
|
|
1357
|
-
|
|
1399
|
+
U as FormField,
|
|
1358
1400
|
Q as Grid,
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1401
|
+
L as Input,
|
|
1402
|
+
ve as InstrumentViewport,
|
|
1403
|
+
ae as Link,
|
|
1404
|
+
ne as Nav,
|
|
1405
|
+
he as Progress,
|
|
1363
1406
|
P as Radio,
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1407
|
+
be as ScrollReveal,
|
|
1408
|
+
ee as Section,
|
|
1409
|
+
M as Select,
|
|
1410
|
+
_e as Skeleton,
|
|
1411
|
+
O as Slider,
|
|
1412
|
+
fe as Spinner,
|
|
1369
1413
|
J as Stack,
|
|
1370
1414
|
F as Switch,
|
|
1371
1415
|
z as Table,
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1416
|
+
se as Tabs,
|
|
1417
|
+
H as Tag,
|
|
1418
|
+
K as Textarea,
|
|
1419
|
+
oe as Toast,
|
|
1420
|
+
le as ToastProvider,
|
|
1421
|
+
pe as Tooltip,
|
|
1422
|
+
we as useToast
|
|
1379
1423
|
};
|