@amsterdamdatalabs/enact-design-system 0.1.1

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.
Files changed (41) hide show
  1. package/README.md +115 -0
  2. package/dist/components/core/Avatar/Avatar.d.ts +7 -0
  3. package/dist/components/core/Avatar/index.d.ts +1 -0
  4. package/dist/components/core/Badge/Badge.d.ts +7 -0
  5. package/dist/components/core/Badge/index.d.ts +1 -0
  6. package/dist/components/core/Button/Button.d.ts +10 -0
  7. package/dist/components/core/Button/index.d.ts +1 -0
  8. package/dist/components/core/Card/Card.d.ts +9 -0
  9. package/dist/components/core/Card/index.d.ts +1 -0
  10. package/dist/components/core/IconButton/IconButton.d.ts +9 -0
  11. package/dist/components/core/IconButton/index.d.ts +1 -0
  12. package/dist/components/core/Stat/Stat.d.ts +9 -0
  13. package/dist/components/core/Stat/index.d.ts +1 -0
  14. package/dist/components/core/Tag/Tag.d.ts +7 -0
  15. package/dist/components/core/Tag/index.d.ts +1 -0
  16. package/dist/components/feedback/Alert/Alert.d.ts +9 -0
  17. package/dist/components/feedback/Alert/index.d.ts +1 -0
  18. package/dist/components/feedback/Progress/Progress.d.ts +10 -0
  19. package/dist/components/feedback/Progress/index.d.ts +1 -0
  20. package/dist/components/feedback/Tooltip/Tooltip.d.ts +7 -0
  21. package/dist/components/feedback/Tooltip/index.d.ts +1 -0
  22. package/dist/components/forms/Checkbox/Checkbox.d.ts +9 -0
  23. package/dist/components/forms/Checkbox/index.d.ts +1 -0
  24. package/dist/components/forms/Field/Field.d.ts +11 -0
  25. package/dist/components/forms/Field/index.d.ts +1 -0
  26. package/dist/components/forms/Input/Input.d.ts +6 -0
  27. package/dist/components/forms/Input/index.d.ts +1 -0
  28. package/dist/components/forms/Select/Select.d.ts +7 -0
  29. package/dist/components/forms/Select/index.d.ts +1 -0
  30. package/dist/components/forms/Switch/Switch.d.ts +9 -0
  31. package/dist/components/forms/Switch/index.d.ts +1 -0
  32. package/dist/components/navigation/Breadcrumb/Breadcrumb.d.ts +10 -0
  33. package/dist/components/navigation/Breadcrumb/index.d.ts +1 -0
  34. package/dist/components/navigation/Tabs/Tabs.d.ts +15 -0
  35. package/dist/components/navigation/Tabs/index.d.ts +1 -0
  36. package/dist/enact-design-system.css +1 -0
  37. package/dist/index.d.ts +24 -0
  38. package/dist/index.js +749 -0
  39. package/dist/lib/cx.d.ts +2 -0
  40. package/dist/tokens.css +449 -0
  41. package/package.json +61 -0
package/dist/index.js ADDED
@@ -0,0 +1,749 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { useState as W } from "react";
3
+ function l(...t) {
4
+ return t.filter(Boolean).join(" ");
5
+ }
6
+ const A = "_avatar_yqge8_1", C = "_hasImage_yqge8_15", F = "_img_yqge8_19", U = "_sm_yqge8_26", R = "_md_yqge8_31", T = "_lg_yqge8_36", D = "_xl_yqge8_41", x = {
7
+ avatar: A,
8
+ hasImage: C,
9
+ img: F,
10
+ sm: U,
11
+ md: R,
12
+ lg: T,
13
+ xl: D
14
+ }, E = /\s+/;
15
+ function O(t) {
16
+ return t.split(E).filter(Boolean).slice(0, 2).map((n) => n[0].toUpperCase()).join("");
17
+ }
18
+ function te({
19
+ name: t = "",
20
+ src: n,
21
+ size: a = "md",
22
+ className: s,
23
+ ...c
24
+ }) {
25
+ const o = O(t);
26
+ return /* @__PURE__ */ e(
27
+ "span",
28
+ {
29
+ className: l(
30
+ x.avatar,
31
+ x[a],
32
+ n && x.hasImage,
33
+ s
34
+ ),
35
+ title: t,
36
+ ...c,
37
+ children: n ? /* @__PURE__ */ e("img", { alt: t, className: x.img, src: n }) : o || "•"
38
+ }
39
+ );
40
+ }
41
+ const P = "_badge_1ndhf_1", H = "_dot_1ndhf_15", G = "_neutral_1ndhf_23", J = "_brand_1ndhf_27", K = "_info_1ndhf_31", Q = "_success_1ndhf_35", V = "_warning_1ndhf_39", X = "_danger_1ndhf_43", L = {
42
+ badge: P,
43
+ dot: H,
44
+ neutral: G,
45
+ brand: J,
46
+ info: K,
47
+ success: Q,
48
+ warning: V,
49
+ danger: X
50
+ };
51
+ function ne({
52
+ tone: t = "neutral",
53
+ dot: n = !1,
54
+ className: a,
55
+ children: s,
56
+ ...c
57
+ }) {
58
+ return /* @__PURE__ */ r("span", { className: l(L.badge, L[t], a), ...c, children: [
59
+ n && /* @__PURE__ */ e("span", { className: L.dot }),
60
+ s
61
+ ] });
62
+ }
63
+ const Y = "_btn_1m6dq_1", Z = "_fullWidth_1m6dq_20", tt = "_sm_1m6dq_26", nt = "_md_1m6dq_32", et = "_lg_1m6dq_38", st = "_primary_1m6dq_46", at = "_secondary_1m6dq_57", ct = "_ghost_1m6dq_71", ot = "_danger_1m6dq_82", j = {
64
+ btn: Y,
65
+ fullWidth: Z,
66
+ sm: tt,
67
+ md: nt,
68
+ lg: et,
69
+ primary: st,
70
+ secondary: at,
71
+ ghost: ct,
72
+ danger: ot
73
+ };
74
+ function ee({
75
+ variant: t = "primary",
76
+ size: n = "md",
77
+ iconLeft: a,
78
+ iconRight: s,
79
+ fullWidth: c = !1,
80
+ disabled: o = !1,
81
+ className: i,
82
+ children: d,
83
+ ...p
84
+ }) {
85
+ return /* @__PURE__ */ r(
86
+ "button",
87
+ {
88
+ className: l(
89
+ j.btn,
90
+ j[t],
91
+ j[n],
92
+ c && j.fullWidth,
93
+ i
94
+ ),
95
+ disabled: o,
96
+ type: "button",
97
+ ...p,
98
+ children: [
99
+ a,
100
+ d,
101
+ s
102
+ ]
103
+ }
104
+ );
105
+ }
106
+ const lt = "_card_1tzae_1", rt = "_padNone_1tzae_9", it = "_padSm_1tzae_12", _t = "_padMd_1tzae_15", dt = "_padLg_1tzae_18", ut = "_raised_1tzae_28", ht = "_sunken_1tzae_33", pt = "_inverse_1tzae_38", mt = "_interactive_1tzae_49", M = {
107
+ card: lt,
108
+ padNone: rt,
109
+ padSm: it,
110
+ padMd: _t,
111
+ padLg: dt,
112
+ default: "_default_1tzae_23",
113
+ raised: ut,
114
+ sunken: ht,
115
+ inverse: pt,
116
+ interactive: mt
117
+ }, gt = {
118
+ none: "padNone",
119
+ sm: "padSm",
120
+ md: "padMd",
121
+ lg: "padLg"
122
+ };
123
+ function se({
124
+ variant: t = "default",
125
+ padding: n = "md",
126
+ interactive: a = !1,
127
+ className: s,
128
+ children: c,
129
+ ...o
130
+ }) {
131
+ return /* @__PURE__ */ e(
132
+ "div",
133
+ {
134
+ className: l(
135
+ M.card,
136
+ M[t],
137
+ M[gt[n]],
138
+ a && M.interactive,
139
+ s
140
+ ),
141
+ ...o,
142
+ children: c
143
+ }
144
+ );
145
+ }
146
+ const ft = "_btn_2g73d_1", vt = "_sm_2g73d_17", bt = "_md_2g73d_21", kt = "_lg_2g73d_25", Nt = "_ghost_2g73d_31", $t = "_outline_2g73d_39", yt = "_primary_2g73d_48", z = {
147
+ btn: ft,
148
+ sm: vt,
149
+ md: bt,
150
+ lg: kt,
151
+ ghost: Nt,
152
+ outline: $t,
153
+ primary: yt
154
+ };
155
+ function ae({
156
+ label: t,
157
+ size: n = "md",
158
+ variant: a = "ghost",
159
+ disabled: s = !1,
160
+ className: c,
161
+ children: o,
162
+ ...i
163
+ }) {
164
+ return /* @__PURE__ */ e(
165
+ "button",
166
+ {
167
+ "aria-label": t,
168
+ className: l(z.btn, z[a], z[n], c),
169
+ disabled: s,
170
+ title: t,
171
+ type: "button",
172
+ ...i,
173
+ children: o
174
+ }
175
+ );
176
+ }
177
+ const wt = "_stat_1uc8c_1", xt = "_label_1uc8c_7", jt = "_valueRow_1uc8c_16", Mt = "_value_1uc8c_16", qt = "_delta_1uc8c_31", Lt = "_deltaUp_1uc8c_40", zt = "_deltaDown_1uc8c_43", Bt = "_deltaFlat_1uc8c_46", St = "_flip_1uc8c_50", Wt = "_caption_1uc8c_54", h = {
178
+ stat: wt,
179
+ label: xt,
180
+ valueRow: jt,
181
+ value: Mt,
182
+ delta: qt,
183
+ deltaUp: Lt,
184
+ deltaDown: zt,
185
+ deltaFlat: Bt,
186
+ flip: St,
187
+ caption: Wt
188
+ }, It = {
189
+ up: "deltaUp",
190
+ down: "deltaDown",
191
+ flat: "deltaFlat"
192
+ };
193
+ function ce({
194
+ label: t,
195
+ value: n,
196
+ delta: a,
197
+ deltaDirection: s = "up",
198
+ caption: c,
199
+ className: o,
200
+ ...i
201
+ }) {
202
+ return /* @__PURE__ */ r("div", { className: l(h.stat, o), ...i, children: [
203
+ /* @__PURE__ */ e("span", { className: h.label, children: t }),
204
+ /* @__PURE__ */ r("span", { className: h.valueRow, children: [
205
+ /* @__PURE__ */ e("span", { className: h.value, children: n }),
206
+ a != null && /* @__PURE__ */ r(
207
+ "span",
208
+ {
209
+ className: l(h.delta, h[It[s]]),
210
+ children: [
211
+ s !== "flat" && /* @__PURE__ */ e(
212
+ "svg",
213
+ {
214
+ "aria-hidden": "true",
215
+ className: s === "down" ? h.flip : void 0,
216
+ fill: "none",
217
+ height: "10",
218
+ stroke: "currentColor",
219
+ strokeLinecap: "round",
220
+ strokeLinejoin: "round",
221
+ strokeWidth: "1.6",
222
+ viewBox: "0 0 10 10",
223
+ width: "10",
224
+ children: /* @__PURE__ */ e("path", { d: "M1.5 8.5l7-7M3.5 1.5h5v5" })
225
+ }
226
+ ),
227
+ a
228
+ ]
229
+ }
230
+ )
231
+ ] }),
232
+ c != null && /* @__PURE__ */ e("span", { className: h.caption, children: c })
233
+ ] });
234
+ }
235
+ const At = "_tag_11jaq_1", Ct = "_remove_11jaq_18", I = {
236
+ tag: At,
237
+ remove: Ct
238
+ };
239
+ function oe({ onRemove: t, className: n, children: a, ...s }) {
240
+ return /* @__PURE__ */ r("span", { className: l(I.tag, n), ...s, children: [
241
+ a,
242
+ t && /* @__PURE__ */ e(
243
+ "button",
244
+ {
245
+ "aria-label": "Remove",
246
+ className: I.remove,
247
+ onClick: t,
248
+ type: "button",
249
+ children: /* @__PURE__ */ e(
250
+ "svg",
251
+ {
252
+ "aria-hidden": "true",
253
+ fill: "none",
254
+ height: "9",
255
+ stroke: "currentColor",
256
+ strokeLinecap: "round",
257
+ strokeWidth: "1.6",
258
+ viewBox: "0 0 10 10",
259
+ width: "9",
260
+ children: /* @__PURE__ */ e("path", { d: "M1.5 1.5l7 7M8.5 1.5l-7 7" })
261
+ }
262
+ )
263
+ }
264
+ )
265
+ ] });
266
+ }
267
+ const Ft = "_alert_1217n_1", Ut = "_icon_1217n_16", Rt = "_body_1217n_22", Tt = "_title_1217n_26", Dt = "_titleSpaced_1217n_29", Et = "_dismiss_1217n_33", Ot = "_info_1217n_45", Pt = "_success_1217n_50", Ht = "_warning_1217n_55", Gt = "_danger_1217n_60", m = {
268
+ alert: Ft,
269
+ icon: Ut,
270
+ body: Rt,
271
+ title: Tt,
272
+ titleSpaced: Dt,
273
+ dismiss: Et,
274
+ info: Ot,
275
+ success: Pt,
276
+ warning: Ht,
277
+ danger: Gt
278
+ }, Jt = {
279
+ info: "M12 16v-4M12 8h.01M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0z",
280
+ success: "M22 11.08V12a10 10 0 1 1-5.93-9.14M22 4L12 14.01l-3-3",
281
+ warning: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01",
282
+ danger: "M12 8v4M12 16h.01M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0z"
283
+ };
284
+ function le({
285
+ tone: t = "info",
286
+ title: n,
287
+ onDismiss: a,
288
+ className: s,
289
+ children: c,
290
+ ...o
291
+ }) {
292
+ return /* @__PURE__ */ r(
293
+ "div",
294
+ {
295
+ className: l(m.alert, m[t], s),
296
+ role: "status",
297
+ ...o,
298
+ children: [
299
+ /* @__PURE__ */ e(
300
+ "svg",
301
+ {
302
+ "aria-hidden": "true",
303
+ className: m.icon,
304
+ fill: "none",
305
+ height: "18",
306
+ stroke: "currentColor",
307
+ strokeLinecap: "round",
308
+ strokeLinejoin: "round",
309
+ strokeWidth: "2",
310
+ viewBox: "0 0 24 24",
311
+ width: "18",
312
+ children: /* @__PURE__ */ e("path", { d: Jt[t] })
313
+ }
314
+ ),
315
+ /* @__PURE__ */ r("div", { className: m.body, children: [
316
+ n && /* @__PURE__ */ e(
317
+ "div",
318
+ {
319
+ className: l(
320
+ m.title,
321
+ !!c && m.titleSpaced
322
+ ),
323
+ children: n
324
+ }
325
+ ),
326
+ c
327
+ ] }),
328
+ a && /* @__PURE__ */ e(
329
+ "button",
330
+ {
331
+ "aria-label": "Dismiss",
332
+ className: m.dismiss,
333
+ onClick: a,
334
+ type: "button",
335
+ children: /* @__PURE__ */ e(
336
+ "svg",
337
+ {
338
+ "aria-hidden": "true",
339
+ fill: "none",
340
+ height: "14",
341
+ stroke: "currentColor",
342
+ strokeLinecap: "round",
343
+ strokeWidth: "2",
344
+ viewBox: "0 0 24 24",
345
+ width: "14",
346
+ children: /* @__PURE__ */ e("path", { d: "M18 6L6 18M6 6l12 12" })
347
+ }
348
+ )
349
+ }
350
+ )
351
+ ]
352
+ }
353
+ );
354
+ }
355
+ const Kt = "_progress_tptlj_1", Qt = "_header_tptlj_7", Vt = "_percent_tptlj_16", Xt = "_track_tptlj_20", Yt = "_fill_tptlj_27", Zt = "_brand_tptlj_34", tn = "_success_tptlj_37", nn = "_warning_tptlj_40", en = "_danger_tptlj_43", sn = "_accent_tptlj_46", f = {
356
+ progress: Kt,
357
+ header: Qt,
358
+ percent: Vt,
359
+ track: Xt,
360
+ fill: Yt,
361
+ brand: Zt,
362
+ success: tn,
363
+ warning: nn,
364
+ danger: en,
365
+ accent: sn
366
+ };
367
+ function re({
368
+ value: t = 0,
369
+ max: n = 100,
370
+ tone: a = "brand",
371
+ label: s,
372
+ showValue: c = !1,
373
+ className: o,
374
+ ...i
375
+ }) {
376
+ const d = Math.min(100, Math.max(0, t / n * 100));
377
+ return /* @__PURE__ */ r("div", { className: l(f.progress, o), ...i, children: [
378
+ (s || c) && /* @__PURE__ */ r("div", { className: f.header, children: [
379
+ /* @__PURE__ */ e("span", { children: s }),
380
+ c && /* @__PURE__ */ r("span", { className: f.percent, children: [
381
+ Math.round(d),
382
+ "%"
383
+ ] })
384
+ ] }),
385
+ /* @__PURE__ */ e(
386
+ "div",
387
+ {
388
+ "aria-valuemax": n,
389
+ "aria-valuenow": t,
390
+ className: f.track,
391
+ role: "progressbar",
392
+ children: /* @__PURE__ */ e(
393
+ "div",
394
+ {
395
+ className: l(f.fill, f[a]),
396
+ style: { width: `${d}%` }
397
+ }
398
+ )
399
+ }
400
+ )
401
+ ] });
402
+ }
403
+ const an = "_wrap_82rh0_1", cn = "_tip_82rh0_6", on = "_top_82rh0_34", ln = "_bottom_82rh0_39", rn = "_left_82rh0_44", _n = "_right_82rh0_49", B = {
404
+ wrap: an,
405
+ tip: cn,
406
+ top: on,
407
+ bottom: ln,
408
+ left: rn,
409
+ right: _n
410
+ };
411
+ function ie({
412
+ content: t,
413
+ placement: n = "top",
414
+ className: a,
415
+ children: s,
416
+ ...c
417
+ }) {
418
+ return /* @__PURE__ */ r("span", { className: l(B.wrap, a), ...c, children: [
419
+ s,
420
+ /* @__PURE__ */ e("span", { className: l(B.tip, B[n]), role: "tooltip", children: t })
421
+ ] });
422
+ }
423
+ const dn = "_root_1t9ke_1", un = "_disabled_1t9ke_12", hn = "_input_1t9ke_18", pn = "_box_1t9ke_25", mn = "_checked_1t9ke_40", N = {
424
+ root: dn,
425
+ disabled: un,
426
+ input: hn,
427
+ box: pn,
428
+ checked: mn
429
+ };
430
+ function _e({
431
+ checked: t,
432
+ defaultChecked: n = !1,
433
+ onChange: a,
434
+ label: s,
435
+ disabled: c = !1,
436
+ className: o,
437
+ ...i
438
+ }) {
439
+ const [d, p] = W(n), _ = t === void 0 ? d : t, k = (g) => {
440
+ c || (t === void 0 && p(!_), a == null || a(!_, g));
441
+ };
442
+ return /* @__PURE__ */ r(
443
+ "label",
444
+ {
445
+ className: l(N.root, c && N.disabled, o),
446
+ ...i,
447
+ children: [
448
+ /* @__PURE__ */ e(
449
+ "input",
450
+ {
451
+ checked: _,
452
+ className: N.input,
453
+ disabled: c,
454
+ onChange: k,
455
+ type: "checkbox"
456
+ }
457
+ ),
458
+ /* @__PURE__ */ e(
459
+ "span",
460
+ {
461
+ "aria-hidden": "true",
462
+ className: l(N.box, _ && N.checked),
463
+ children: _ && /* @__PURE__ */ e(
464
+ "svg",
465
+ {
466
+ "aria-hidden": "true",
467
+ fill: "none",
468
+ height: "11",
469
+ stroke: "var(--text-on-brand)",
470
+ strokeLinecap: "round",
471
+ strokeLinejoin: "round",
472
+ strokeWidth: "3.2",
473
+ viewBox: "0 0 24 24",
474
+ width: "11",
475
+ children: /* @__PURE__ */ e("path", { d: "M20 6L9 17l-5-5" })
476
+ }
477
+ )
478
+ }
479
+ ),
480
+ s
481
+ ]
482
+ }
483
+ );
484
+ }
485
+ const gn = "_field_1d54c_1", fn = "_label_1d54c_7", vn = "_required_1d54c_14", bn = "_error_1d54c_18", kn = "_hint_1d54c_23", w = {
486
+ field: gn,
487
+ label: fn,
488
+ required: vn,
489
+ error: bn,
490
+ hint: kn
491
+ };
492
+ function Nn({ error: t, hint: n }) {
493
+ return t ? /* @__PURE__ */ e("span", { className: w.error, children: t }) : n ? /* @__PURE__ */ e("span", { className: w.hint, children: n }) : null;
494
+ }
495
+ function de({
496
+ label: t,
497
+ hint: n,
498
+ error: a,
499
+ required: s = !1,
500
+ htmlFor: c,
501
+ className: o,
502
+ children: i,
503
+ ...d
504
+ }) {
505
+ return /* @__PURE__ */ r("div", { className: l(w.field, o), ...d, children: [
506
+ t && /* @__PURE__ */ r("label", { className: w.label, htmlFor: c, children: [
507
+ t,
508
+ s && /* @__PURE__ */ e("span", { className: w.required, children: " *" })
509
+ ] }),
510
+ i,
511
+ /* @__PURE__ */ e(Nn, { error: a, hint: n })
512
+ ] });
513
+ }
514
+ const $n = "_input_nhfx3_1", yn = "_invalid_nhfx3_31", wn = "_sm_nhfx3_37", xn = "_md_nhfx3_41", jn = "_lg_nhfx3_45", S = {
515
+ input: $n,
516
+ invalid: yn,
517
+ sm: wn,
518
+ md: xn,
519
+ lg: jn
520
+ };
521
+ function ue({
522
+ size: t = "md",
523
+ invalid: n = !1,
524
+ disabled: a = !1,
525
+ className: s,
526
+ ...c
527
+ }) {
528
+ return /* @__PURE__ */ e(
529
+ "input",
530
+ {
531
+ "aria-invalid": n || void 0,
532
+ className: l(
533
+ S.input,
534
+ S[t],
535
+ n && S.invalid,
536
+ s
537
+ ),
538
+ disabled: a,
539
+ ...c
540
+ }
541
+ );
542
+ }
543
+ const Mn = "_wrap_1nxaj_1", qn = "_select_1nxaj_7", Ln = "_invalid_1nxaj_36", zn = "_chevron_1nxaj_41", Bn = "_sm_1nxaj_51", Sn = "_md_1nxaj_55", Wn = "_lg_1nxaj_59", $ = {
544
+ wrap: Mn,
545
+ select: qn,
546
+ invalid: Ln,
547
+ chevron: zn,
548
+ sm: Bn,
549
+ md: Sn,
550
+ lg: Wn
551
+ };
552
+ function he({
553
+ size: t = "md",
554
+ invalid: n = !1,
555
+ disabled: a = !1,
556
+ className: s,
557
+ children: c,
558
+ ...o
559
+ }) {
560
+ return /* @__PURE__ */ r("span", { className: $.wrap, children: [
561
+ /* @__PURE__ */ e(
562
+ "select",
563
+ {
564
+ "aria-invalid": n || void 0,
565
+ className: l(
566
+ $.select,
567
+ $[t],
568
+ n && $.invalid,
569
+ s
570
+ ),
571
+ disabled: a,
572
+ ...o,
573
+ children: c
574
+ }
575
+ ),
576
+ /* @__PURE__ */ e(
577
+ "svg",
578
+ {
579
+ "aria-hidden": "true",
580
+ className: $.chevron,
581
+ fill: "none",
582
+ height: "14",
583
+ stroke: "currentColor",
584
+ strokeLinecap: "round",
585
+ strokeLinejoin: "round",
586
+ strokeWidth: "2",
587
+ viewBox: "0 0 24 24",
588
+ width: "14",
589
+ children: /* @__PURE__ */ e("path", { d: "M6 9l6 6 6-6" })
590
+ }
591
+ )
592
+ ] });
593
+ }
594
+ const In = "_root_ctdye_1", An = "_disabled_ctdye_12", Cn = "_input_ctdye_17", Fn = "_track_ctdye_24", Un = "_on_ctdye_34", Rn = "_knob_ctdye_38", v = {
595
+ root: In,
596
+ disabled: An,
597
+ input: Cn,
598
+ track: Fn,
599
+ on: Un,
600
+ knob: Rn
601
+ };
602
+ function pe({
603
+ checked: t,
604
+ defaultChecked: n = !1,
605
+ onChange: a,
606
+ label: s,
607
+ disabled: c = !1,
608
+ className: o,
609
+ ...i
610
+ }) {
611
+ const [d, p] = W(n), _ = t === void 0 ? d : t, k = (g) => {
612
+ c || (t === void 0 && p(!_), a == null || a(!_, g));
613
+ };
614
+ return /* @__PURE__ */ r(
615
+ "label",
616
+ {
617
+ className: l(v.root, c && v.disabled, o),
618
+ ...i,
619
+ children: [
620
+ /* @__PURE__ */ e(
621
+ "input",
622
+ {
623
+ "aria-checked": _,
624
+ checked: _,
625
+ className: v.input,
626
+ disabled: c,
627
+ onChange: k,
628
+ role: "switch",
629
+ type: "checkbox"
630
+ }
631
+ ),
632
+ /* @__PURE__ */ e("span", { "aria-hidden": "true", className: l(v.track, _ && v.on), children: /* @__PURE__ */ e("span", { className: v.knob }) }),
633
+ s
634
+ ]
635
+ }
636
+ );
637
+ }
638
+ const Tn = "_list_1e7it_1", Dn = "_item_1e7it_12", En = "_current_1e7it_18", On = "_link_1e7it_23", Pn = "_sep_1e7it_34", y = {
639
+ list: Tn,
640
+ item: Dn,
641
+ current: En,
642
+ link: On,
643
+ sep: Pn
644
+ };
645
+ function me({ items: t, className: n, ...a }) {
646
+ return /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: n, ...a, children: /* @__PURE__ */ e("ol", { className: y.list, children: t.map((s, c) => {
647
+ const o = c === t.length - 1;
648
+ return /* @__PURE__ */ r(
649
+ "li",
650
+ {
651
+ className: y.item,
652
+ children: [
653
+ o ? /* @__PURE__ */ e("span", { "aria-current": "page", className: y.current, children: s.label }) : /* @__PURE__ */ e(
654
+ "a",
655
+ {
656
+ className: y.link,
657
+ href: s.href || "#",
658
+ onClick: s.onClick,
659
+ children: s.label
660
+ }
661
+ ),
662
+ !o && /* @__PURE__ */ e(
663
+ "svg",
664
+ {
665
+ "aria-hidden": "true",
666
+ className: y.sep,
667
+ fill: "none",
668
+ height: "12",
669
+ stroke: "currentColor",
670
+ strokeLinecap: "round",
671
+ strokeLinejoin: "round",
672
+ strokeWidth: "2",
673
+ viewBox: "0 0 24 24",
674
+ width: "12",
675
+ children: /* @__PURE__ */ e("path", { d: "M9 18l6-6-6-6" })
676
+ }
677
+ )
678
+ ]
679
+ },
680
+ `${s.label}:${s.href ?? ""}`
681
+ );
682
+ }) }) });
683
+ }
684
+ const Hn = "_tablist_1khzs_1", Gn = "_tab_1khzs_1", Jn = "_active_1khzs_24", Kn = "_sm_1khzs_34", Qn = "_md_1khzs_38", Vn = "_count_1khzs_44", Xn = "_countActive_1khzs_53", b = {
685
+ tablist: Hn,
686
+ tab: Gn,
687
+ active: Jn,
688
+ sm: Kn,
689
+ md: Qn,
690
+ count: Vn,
691
+ countActive: Xn
692
+ };
693
+ function ge({
694
+ items: t,
695
+ active: n,
696
+ defaultActive: a,
697
+ onChange: s,
698
+ size: c = "md",
699
+ className: o,
700
+ ...i
701
+ }) {
702
+ var g;
703
+ const [d, p] = W(a ?? ((g = t[0]) == null ? void 0 : g.id)), _ = n === void 0 ? d : n, k = (u) => {
704
+ n === void 0 && p(u), s == null || s(u);
705
+ };
706
+ return /* @__PURE__ */ e("div", { className: l(b.tablist, o), role: "tablist", ...i, children: t.map((u) => {
707
+ const q = u.id === _;
708
+ return /* @__PURE__ */ r(
709
+ "button",
710
+ {
711
+ "aria-selected": q,
712
+ className: l(b.tab, b[c], q && b.active),
713
+ onClick: () => k(u.id),
714
+ role: "tab",
715
+ type: "button",
716
+ children: [
717
+ u.label,
718
+ u.count !== void 0 && /* @__PURE__ */ e(
719
+ "span",
720
+ {
721
+ className: l(b.count, q && b.countActive),
722
+ children: u.count
723
+ }
724
+ )
725
+ ]
726
+ },
727
+ u.id
728
+ );
729
+ }) });
730
+ }
731
+ export {
732
+ le as Alert,
733
+ te as Avatar,
734
+ ne as Badge,
735
+ me as Breadcrumb,
736
+ ee as Button,
737
+ se as Card,
738
+ _e as Checkbox,
739
+ de as Field,
740
+ ae as IconButton,
741
+ ue as Input,
742
+ re as Progress,
743
+ he as Select,
744
+ ce as Stat,
745
+ pe as Switch,
746
+ ge as Tabs,
747
+ oe as Tag,
748
+ ie as Tooltip
749
+ };