rl-react-components 2.5.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,35 +4,98 @@ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
4
  import f from "react-markdown";
5
5
  import p from "remark-gfm";
6
6
  var m = {
7
- button: "_button_oxaxw_1",
8
- content: "_content_oxaxw_37",
9
- primary: "_primary_oxaxw_45",
10
- secondary: "_secondary_oxaxw_56",
11
- ghost: "_ghost_oxaxw_66",
12
- danger: "_danger_oxaxw_76",
13
- small: "_small_oxaxw_86",
14
- large: "_large_oxaxw_91",
15
- fullWidth: "_fullWidth_oxaxw_96"
7
+ accordion: "_accordion_1dh6o_1",
8
+ item: "_item_1dh6o_9",
9
+ summary: "_summary_1dh6o_32",
10
+ title: "_title_1dh6o_52",
11
+ chevron: "_chevron_1dh6o_62",
12
+ content: "_content_1dh6o_73"
13
+ };
14
+ // src/components/Accordion/Accordion.tsx
15
+ function h({ items: e, defaultOpen: t = [], singleOpen: n = !1, headingLevel: r, className: i }) {
16
+ let o = a(), [s] = c(() => new Set(n ? t.slice(0, 1) : t)), l = r ? `h${r}` : "span";
17
+ return /* @__PURE__ */ u("div", {
18
+ className: [m.accordion, i].filter(Boolean).join(" "),
19
+ children: e.map((e) => /* @__PURE__ */ d("details", {
20
+ className: m.item,
21
+ name: n ? o : void 0,
22
+ open: s.has(e.id),
23
+ suppressHydrationWarning: !0,
24
+ children: [/* @__PURE__ */ d("summary", {
25
+ className: m.summary,
26
+ children: [/* @__PURE__ */ u(l, {
27
+ className: m.title,
28
+ children: e.title
29
+ }), /* @__PURE__ */ u("svg", {
30
+ className: m.chevron,
31
+ width: 18,
32
+ height: 18,
33
+ viewBox: "0 0 24 24",
34
+ fill: "none",
35
+ stroke: "currentColor",
36
+ strokeWidth: 1.7,
37
+ strokeLinecap: "round",
38
+ strokeLinejoin: "round",
39
+ "aria-hidden": "true",
40
+ focusable: "false",
41
+ children: /* @__PURE__ */ u("path", { d: "M6 9l6 6 6-6" })
42
+ })]
43
+ }), /* @__PURE__ */ u("div", {
44
+ className: m.content,
45
+ children: e.content
46
+ })]
47
+ }, e.id))
48
+ });
49
+ }
50
+ var g = {
51
+ button: "_button_1vh0a_1",
52
+ content: "_content_1vh0a_37",
53
+ primary: "_primary_1vh0a_45",
54
+ secondary: "_secondary_1vh0a_56",
55
+ ghost: "_ghost_1vh0a_66",
56
+ danger: "_danger_1vh0a_76",
57
+ small: "_small_1vh0a_86",
58
+ large: "_large_1vh0a_91",
59
+ fullWidth: "_fullWidth_1vh0a_96",
60
+ link: "_link_1vh0a_100"
16
61
  };
17
62
  // src/components/Button/Button.tsx
18
- function h({ variant: e = "primary", size: t = "medium", fullWidth: n = !1, children: r, className: i, ...a }) {
19
- let o = [
20
- m.button,
21
- m[e],
22
- t !== "medium" && m[t],
23
- n && m.fullWidth,
63
+ function _(e) {
64
+ return Object.fromEntries(Object.entries(e).filter(([e]) => !/^on[A-Z]/.test(e) && e !== "tabIndex"));
65
+ }
66
+ function v({ variant: e = "primary", size: t = "medium", fullWidth: n = !1, children: r, className: i, href: a, target: o, rel: s, as: c, type: l, disabled: d, onClick: f, ...p }) {
67
+ let m = a !== void 0, h = [
68
+ g.button,
69
+ g[e],
70
+ t !== "medium" && g[t],
71
+ n && g.fullWidth,
72
+ m && g.link,
24
73
  i
25
- ].filter(Boolean).join(" ");
26
- return /* @__PURE__ */ u("button", {
27
- className: o,
28
- ...a,
74
+ ].filter(Boolean).join(" "), v = m && !!d, y = v ? "a" : c ?? (m ? "a" : "button"), b;
75
+ return b = v ? {
76
+ role: "link",
77
+ "aria-disabled": !0
78
+ } : m ? {
79
+ href: a,
80
+ target: o,
81
+ rel: s
82
+ } : {
83
+ type: l,
84
+ disabled: d
85
+ }, /* @__PURE__ */ u(y, {
86
+ className: h,
87
+ ...v ? _(p) : {
88
+ ...p,
89
+ onClick: f
90
+ },
91
+ ...b,
29
92
  children: /* @__PURE__ */ u("span", {
30
- className: m.content,
93
+ className: g.content,
31
94
  children: r
32
95
  })
33
96
  });
34
97
  }
35
- var g = {
98
+ var y = {
36
99
  card: "_card_vtakk_1",
37
100
  link: "_link_vtakk_21",
38
101
  arrow: "_arrow_vtakk_41",
@@ -43,53 +106,53 @@ var g = {
43
106
  title: "_title_vtakk_86"
44
107
  };
45
108
  // src/components/Card/Card.tsx
46
- function _(e) {
109
+ function b(e) {
47
110
  let t = e.currentTarget, n = t.getBoundingClientRect();
48
111
  t.style.setProperty("--spot-x", `${e.clientX - n.left}px`), t.style.setProperty("--spot-y", `${e.clientY - n.top}px`);
49
112
  }
50
- function v({ title: e, description: t, icon: n, eyebrow: r, href: i, target: o, rel: s, headingLevel: c, as: l, children: f, className: p, style: m, id: h }) {
51
- let v = a(), y = a(), b = i !== void 0, x = l ?? (b ? "a" : "div"), S = c ? `h${c}` : "span", C = [
52
- g.card,
53
- b && g.link,
113
+ function x({ title: e, description: t, icon: n, eyebrow: r, href: i, target: o, rel: s, headingLevel: c, as: l, children: f, className: p, style: m, id: h }) {
114
+ let g = a(), _ = a(), v = i !== void 0, x = l ?? (v ? "a" : "div"), S = c ? `h${c}` : "span", C = [
115
+ y.card,
116
+ v && y.link,
54
117
  p
55
118
  ].filter(Boolean).join(" ");
56
119
  return /* @__PURE__ */ d(x, {
57
120
  className: C,
58
121
  style: m,
59
122
  id: h,
60
- ...b ? {
123
+ ...v ? {
61
124
  href: i,
62
125
  target: o,
63
126
  rel: s,
64
- onPointerMove: _,
65
- "aria-labelledby": v,
66
- "aria-describedby": t ? y : void 0
127
+ onPointerMove: b,
128
+ "aria-labelledby": g,
129
+ "aria-describedby": t ? _ : void 0
67
130
  } : {},
68
131
  children: [
69
132
  (n || r) && /* @__PURE__ */ d("span", {
70
- className: g.top,
133
+ className: y.top,
71
134
  children: [n && /* @__PURE__ */ u("span", {
72
- className: g.icon,
135
+ className: y.icon,
73
136
  "aria-hidden": "true",
74
137
  children: n
75
138
  }), r && /* @__PURE__ */ u("span", {
76
- className: g.eyebrow,
139
+ className: y.eyebrow,
77
140
  children: r
78
141
  })]
79
142
  }),
80
143
  /* @__PURE__ */ u(S, {
81
- id: v,
82
- className: g.title,
144
+ id: g,
145
+ className: y.title,
83
146
  children: e
84
147
  }),
85
148
  t && /* @__PURE__ */ u("span", {
86
- id: y,
87
- className: g.description,
149
+ id: _,
150
+ className: y.description,
88
151
  children: t
89
152
  }),
90
153
  f,
91
- b && /* @__PURE__ */ u("svg", {
92
- className: g.arrow,
154
+ v && /* @__PURE__ */ u("svg", {
155
+ className: y.arrow,
93
156
  width: 16,
94
157
  height: 16,
95
158
  viewBox: "0 0 24 24",
@@ -105,27 +168,51 @@ function v({ title: e, description: t, icon: n, eyebrow: r, href: i, target: o,
105
168
  ]
106
169
  });
107
170
  }
108
- var y = {
109
- container: "_container_12hys_1",
110
- sm: "_sm_12hys_8",
111
- md: "_md_12hys_12",
112
- lg: "_lg_12hys_16",
113
- xl: "_xl_12hys_20",
114
- xxl: "_xxl_12hys_24"
171
+ var S = {
172
+ checkbox: "_checkbox_10gcb_2",
173
+ input: "_input_10gcb_9",
174
+ tile: "_tile_10gcb_22",
175
+ box: "_box_10gcb_44"
176
+ };
177
+ // src/components/Checkbox/Checkbox.tsx
178
+ function C({ label: e, className: t, ...n }) {
179
+ return /* @__PURE__ */ d("label", {
180
+ className: `${S.checkbox} ${t || ""}`,
181
+ children: [/* @__PURE__ */ u("input", {
182
+ ...n,
183
+ type: "checkbox",
184
+ className: S.input
185
+ }), /* @__PURE__ */ d("span", {
186
+ className: S.tile,
187
+ children: [/* @__PURE__ */ u("span", {
188
+ className: S.box,
189
+ "aria-hidden": "true"
190
+ }), e]
191
+ })]
192
+ });
193
+ }
194
+ var w = {
195
+ container: "_container_1yk16_1",
196
+ pageWidth: "_pageWidth_1yk16_8",
197
+ sm: "_sm_1yk16_12",
198
+ md: "_md_1yk16_16",
199
+ lg: "_lg_1yk16_20",
200
+ xl: "_xl_1yk16_24",
201
+ xxl: "_xxl_1yk16_28"
115
202
  };
116
203
  // src/components/Container/Container.tsx
117
- function b({ children: e, size: t = "xl", className: n, as: r = "div" }) {
118
- let i = [
119
- y.container,
120
- y[t],
204
+ function T({ children: e, size: t, className: n, as: r = "div" }) {
205
+ let i = t ? w[t] : w.pageWidth, a = [
206
+ w.container,
207
+ i,
121
208
  n
122
209
  ].filter(Boolean).join(" ");
123
210
  return /* @__PURE__ */ u(r, {
124
- className: i,
211
+ className: a,
125
212
  children: e
126
213
  });
127
214
  }
128
- var x = { icon: "_icon_veg5e_1" }, S = {
215
+ var ee = { icon: "_icon_veg5e_1" }, E = {
129
216
  sun: /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("circle", {
130
217
  cx: "12",
131
218
  cy: "12",
@@ -173,9 +260,9 @@ var x = { icon: "_icon_veg5e_1" }, S = {
173
260
  sparkle: /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("path", { d: "M12 3c.6 4.5 2.5 6.4 7 7-4.5.6-6.4 2.5-7 7-.6-4.5-2.5-6.4-7-7 4.5-.6 6.4-2.5 7-7Z" }), /* @__PURE__ */ u("path", { d: "M19 16c.2 1.6.9 2.3 2.5 2.5-1.6.2-2.3.9-2.5 2.5-.2-1.6-.9-2.3-2.5-2.5 1.6-.2 2.3-.9 2.5-2.5Z" })] }),
174
261
  braces: /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("path", { d: "M8 3H7a2 2 0 0 0-2 2v4a3 3 0 0 1-2 3 3 3 0 0 1 2 3v4a2 2 0 0 0 2 2h1" }), /* @__PURE__ */ u("path", { d: "M16 3h1a2 2 0 0 1 2 2v4a3 3 0 0 0 2 3 3 3 0 0 0-2 3v4a2 2 0 0 1-2 2h-1" })] }),
175
262
  type: /* @__PURE__ */ u("path", { d: "M5 7V4h14v3M12 4v16M9 20h6" })
176
- }, C = Object.keys(S);
177
- function ee({ name: e, size: t = 18, className: n }) {
178
- let r = [x.icon, n].filter(Boolean).join(" ");
263
+ }, te = Object.keys(E);
264
+ function ne({ name: e, size: t = 18, className: n }) {
265
+ let r = [ee.icon, n].filter(Boolean).join(" ");
179
266
  return /* @__PURE__ */ u("svg", {
180
267
  className: r,
181
268
  width: t,
@@ -188,29 +275,56 @@ function ee({ name: e, size: t = 18, className: n }) {
188
275
  strokeLinejoin: "round",
189
276
  "aria-hidden": "true",
190
277
  focusable: "false",
191
- children: S[e]
278
+ children: E[e]
279
+ });
280
+ }
281
+ var D = {
282
+ iconButton: "_iconButton_uxox6_1",
283
+ icon: "_icon_uxox6_1",
284
+ default: "_default_uxox6_25",
285
+ danger: "_danger_uxox6_30"
286
+ };
287
+ // src/components/IconButton/IconButton.tsx
288
+ function re({ label: e, icon: t, variant: n = "default", type: r = "button", title: i = e, className: a, ...o }) {
289
+ let s = [
290
+ D.iconButton,
291
+ D[n],
292
+ a
293
+ ].filter(Boolean).join(" ");
294
+ return /* @__PURE__ */ u("button", {
295
+ ...o,
296
+ type: r,
297
+ className: s,
298
+ "aria-label": e,
299
+ "aria-labelledby": void 0,
300
+ title: i,
301
+ children: /* @__PURE__ */ u("span", {
302
+ className: D.icon,
303
+ "aria-hidden": "true",
304
+ children: t
305
+ })
192
306
  });
193
307
  }
194
308
  // src/components/Markdown/Markdown.tsx
195
- function te({ node: e, ...t }) {
309
+ function ie({ node: e, ...t }) {
196
310
  return /* @__PURE__ */ u("a", {
197
311
  ...t,
198
312
  target: "_blank",
199
313
  rel: "noopener noreferrer"
200
314
  });
201
315
  }
202
- var ne = { a: te }, re = [p];
203
- function w({ children: e, className: t }) {
316
+ var ae = { a: ie }, oe = [p];
317
+ function O({ children: e, className: t }) {
204
318
  return /* @__PURE__ */ u("div", {
205
319
  className: t,
206
320
  children: /* @__PURE__ */ u(f, {
207
- remarkPlugins: re,
208
- components: ne,
321
+ remarkPlugins: oe,
322
+ components: ae,
209
323
  children: e
210
324
  })
211
325
  });
212
326
  }
213
- var T = {
327
+ var k = {
214
328
  editor: "_editor_spixg_1",
215
329
  label: "_label_spixg_7",
216
330
  toolbar: "_toolbar_spixg_15",
@@ -223,7 +337,7 @@ var T = {
223
337
  previewHeader: "_previewHeader_spixg_111",
224
338
  previewDot: "_previewDot_spixg_125",
225
339
  preview: "_preview_spixg_104"
226
- }, E = 200, D = " ", O = [
340
+ }, se = 200, ce = " ", le = [
227
341
  [
228
342
  {
229
343
  action: "bold",
@@ -323,11 +437,11 @@ var T = {
323
437
  }
324
438
  ]
325
439
  ];
326
- function k({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
440
+ function ue({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
327
441
  let f = s(null), p = s(!1), m = a(), h = a();
328
442
  i(() => {
329
443
  let e = f.current;
330
- e && (e.style.height = "auto", e.style.height = `${Math.max(E, e.scrollHeight)}px`);
444
+ e && (e.style.height = "auto", e.style.height = `${Math.max(se, e.scrollHeight)}px`);
331
445
  }, [t]);
332
446
  let g = n((e) => {
333
447
  let t = f.current;
@@ -346,17 +460,17 @@ function k({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
346
460
  return [t.substring(0, n) + e.prefix + a + e.suffix + t.substring(r), n + e.prefix.length + a.length];
347
461
  });
348
462
  return /* @__PURE__ */ d("div", {
349
- className: T.editor,
463
+ className: k.editor,
350
464
  children: [
351
465
  /* @__PURE__ */ u("label", {
352
- className: T.label,
466
+ className: k.label,
353
467
  htmlFor: m,
354
468
  children: c
355
469
  }),
356
470
  /* @__PURE__ */ u("div", {
357
- className: T.toolbar,
358
- children: O.map((t, n) => /* @__PURE__ */ d(e.Fragment, { children: [n > 0 && /* @__PURE__ */ u("div", { className: T.separator }), t.map((e) => /* @__PURE__ */ u("button", {
359
- className: T.toolBtn,
471
+ className: k.toolbar,
472
+ children: le.map((t, n) => /* @__PURE__ */ d(e.Fragment, { children: [n > 0 && /* @__PURE__ */ u("div", { className: k.separator }), t.map((e) => /* @__PURE__ */ u("button", {
473
+ className: k.toolBtn,
360
474
  onClick: () => _(e),
361
475
  title: o.actions[e.action],
362
476
  "aria-label": o.actions[e.action],
@@ -365,16 +479,16 @@ function k({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
365
479
  }, e.action))] }, n))
366
480
  }),
367
481
  /* @__PURE__ */ d("div", {
368
- className: T.content,
482
+ className: k.content,
369
483
  children: [/* @__PURE__ */ u("textarea", {
370
484
  id: m,
371
485
  ref: f,
372
- className: T.textarea,
486
+ className: k.textarea,
373
487
  value: t,
374
488
  onChange: (e) => r(e.target.value),
375
489
  onKeyDown: (e) => {
376
490
  let n = p.current;
377
- p.current = e.key === "Escape", !(e.key !== "Tab" || e.shiftKey || n) && (e.preventDefault(), g((e, n) => [t.substring(0, e) + D + t.substring(n), e + 2]));
491
+ p.current = e.key === "Escape", !(e.key !== "Tab" || e.shiftKey || n) && (e.preventDefault(), g((e, n) => [t.substring(0, e) + ce + t.substring(n), e + 2]));
378
492
  },
379
493
  onBlur: () => {
380
494
  p.current = !1;
@@ -383,17 +497,17 @@ function k({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
383
497
  "aria-describedby": o.tabHint ? h : void 0
384
498
  }), o.tabHint && /* @__PURE__ */ u("span", {
385
499
  id: h,
386
- className: T.visuallyHidden,
500
+ className: k.visuallyHidden,
387
501
  children: o.tabHint
388
502
  })]
389
503
  }),
390
504
  t.trim() && /* @__PURE__ */ d("div", {
391
- className: T.previewSection,
505
+ className: k.previewSection,
392
506
  children: [/* @__PURE__ */ d("div", {
393
- className: T.previewHeader,
394
- children: [/* @__PURE__ */ u("span", { className: T.previewDot }), o.preview]
395
- }), /* @__PURE__ */ u(w, {
396
- className: T.preview,
507
+ className: k.previewHeader,
508
+ children: [/* @__PURE__ */ u("span", { className: k.previewDot }), o.preview]
509
+ }), /* @__PURE__ */ u(O, {
510
+ className: k.preview,
397
511
  children: t
398
512
  })]
399
513
  })
@@ -410,7 +524,7 @@ var A = {
410
524
  headOpacity: 1,
411
525
  trailOpacityMax: .8,
412
526
  chars: Array.from("アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン0123456789")
413
- }, ie = {
527
+ }, de = {
414
528
  drizzle: {
415
529
  columnDensity: .15,
416
530
  tickMs: 250,
@@ -432,7 +546,7 @@ var A = {
432
546
  headOpacity: .9,
433
547
  trailOpacityMax: .8
434
548
  }
435
- }, ae = {
549
+ }, fe = {
436
550
  dark: {
437
551
  fontSize: 14,
438
552
  columnDensity: 1,
@@ -701,12 +815,12 @@ var R = {
701
815
  heroSubtitle: "_heroSubtitle_1b7du_137"
702
816
  };
703
817
  // src/components/PageHero/PageHero.tsx
704
- function oe({ eyebrow: e, title: t, subtitle: n, count: r, countLabel: i }) {
818
+ function pe({ eyebrow: e, title: t, subtitle: n, count: r, countLabel: i }) {
705
819
  return /* @__PURE__ */ u(L, {
706
820
  noPadding: !0,
707
821
  children: /* @__PURE__ */ u("div", {
708
822
  className: R.hero,
709
- children: /* @__PURE__ */ u(b, { children: /* @__PURE__ */ d("div", {
823
+ children: /* @__PURE__ */ u(T, { children: /* @__PURE__ */ d("div", {
710
824
  className: R.heroInner,
711
825
  children: [
712
826
  /* @__PURE__ */ d("div", {
@@ -742,7 +856,7 @@ var z = {
742
856
  visible: "_visible_1rdu6_6"
743
857
  };
744
858
  // src/components/PageTransition/PageTransition.tsx
745
- function se({ children: e, transitionKey: t, appear: n = !0 }) {
859
+ function B({ children: e, transitionKey: t, appear: n = !0 }) {
746
860
  let [r, a] = c(!n), [o, s] = c(t);
747
861
  return t !== o && (s(t), a(!1)), i(() => {
748
862
  if (r) return;
@@ -757,32 +871,47 @@ function se({ children: e, transitionKey: t, appear: n = !0 }) {
757
871
  children: e
758
872
  });
759
873
  }
760
- var B = {
761
- wrapper: "_wrapper_2hx09_1",
762
- label: "_label_2hx09_7",
763
- select: "_select_2hx09_15"
874
+ var V = {
875
+ wrapper: "_wrapper_19o1i_1",
876
+ label: "_label_19o1i_7",
877
+ hint: "_hint_19o1i_15",
878
+ select: "_select_19o1i_21",
879
+ compact: "_compact_19o1i_50"
764
880
  };
765
881
  // src/components/Select/Select.tsx
766
- function V({ label: e, placeholder: t, options: n, className: r, id: i, ...o }) {
767
- let s = a(), c = i ?? s;
882
+ function me({ label: e, hint: t, placeholder: n, options: r, compact: i = !1, className: o, id: s, "aria-describedby": c, ...l }) {
883
+ let f = a(), p = s ?? f, m = `${p}-hint`, h = [c, t && m].filter(Boolean).join(" ") || void 0;
768
884
  return /* @__PURE__ */ d("div", {
769
- className: `${B.wrapper} ${r || ""}`,
770
- children: [e && /* @__PURE__ */ u("label", {
771
- className: B.label,
772
- htmlFor: c,
773
- children: e
774
- }), /* @__PURE__ */ d("select", {
775
- id: c,
776
- className: B.select,
777
- ...o,
778
- children: [/* @__PURE__ */ u("option", {
779
- value: "",
885
+ className: [
886
+ V.wrapper,
887
+ i && V.compact,
888
+ o
889
+ ].filter(Boolean).join(" "),
890
+ children: [
891
+ e && /* @__PURE__ */ u("label", {
892
+ className: V.label,
893
+ htmlFor: p,
894
+ children: e
895
+ }),
896
+ /* @__PURE__ */ d("select", {
897
+ id: p,
898
+ className: V.select,
899
+ "aria-describedby": h,
900
+ ...l,
901
+ children: [n !== void 0 && /* @__PURE__ */ u("option", {
902
+ value: "",
903
+ children: n
904
+ }), r.map((e) => /* @__PURE__ */ u("option", {
905
+ value: e.value,
906
+ children: e.label
907
+ }, e.value))]
908
+ }),
909
+ t && /* @__PURE__ */ u("span", {
910
+ id: m,
911
+ className: V.hint,
780
912
  children: t
781
- }), n.map((e) => /* @__PURE__ */ u("option", {
782
- value: e.value,
783
- children: e.label
784
- }, e.value))]
785
- })]
913
+ })
914
+ ]
786
915
  });
787
916
  }
788
917
  var H = {
@@ -794,26 +923,33 @@ var H = {
794
923
  loaded: "_loaded_btbpz_38"
795
924
  };
796
925
  // src/components/ShimmerImage/ShimmerImage.tsx
797
- function U({ src: e, alt: t, className: n, ...r }) {
798
- let [i, a] = c(null), o = i === e, s = (t) => {
799
- t?.complete && t.naturalWidth > 0 && a(e);
926
+ function he({ src: e, alt: t, fallback: n, className: r, onError: i, ...a }) {
927
+ let [o, s] = c(null), f = o === e, [p, m] = c(null);
928
+ p !== null && p !== e && m(null);
929
+ let h = (t) => {
930
+ t?.complete && (t.naturalWidth > 0 ? s(e) : t.decode?.().then(() => s(e), () => {
931
+ n !== void 0 && m(e);
932
+ }));
800
933
  };
801
- return /* @__PURE__ */ d("div", {
802
- className: `${H.frame} ${o ? H.loaded : ""}`,
934
+ return n !== void 0 && (!e || p === e) ? /* @__PURE__ */ u(l, { children: n }) : /* @__PURE__ */ d("div", {
935
+ className: `${H.frame} ${f ? H.loaded : ""}`,
803
936
  children: [/* @__PURE__ */ u("div", { className: H.shimmer }), /* @__PURE__ */ u("div", {
804
937
  className: H.reveal,
805
938
  children: /* @__PURE__ */ u("img", {
806
- ...r,
807
- ref: s,
939
+ ...a,
940
+ ref: h,
808
941
  src: e,
809
942
  alt: t,
810
- className: [H.image, n].filter(Boolean).join(" "),
811
- onLoad: () => a(e)
943
+ className: [H.image, r].filter(Boolean).join(" "),
944
+ onLoad: () => s(e),
945
+ onError: (t) => {
946
+ m(e), i?.(t);
947
+ }
812
948
  })
813
949
  })]
814
950
  });
815
951
  }
816
- var W = {
952
+ var U = {
817
953
  sideNav: "_sideNav_1ljaj_1",
818
954
  list: "_list_1ljaj_10",
819
955
  group: "_group_1ljaj_16",
@@ -822,11 +958,11 @@ var W = {
822
958
  active: "_active_1ljaj_64",
823
959
  icon: "_icon_1ljaj_76",
824
960
  label: "_label_1ljaj_81"
825
- }, G = 24;
826
- function ce(e) {
961
+ }, W = 24;
962
+ function ge(e) {
827
963
  return "items" in e;
828
964
  }
829
- function le(e) {
965
+ function _e(e) {
830
966
  let { body: t, documentElement: n } = e.ownerDocument;
831
967
  for (let r = e.parentElement; r; r = r.parentElement) {
832
968
  if (r === t || r === n) return null;
@@ -835,56 +971,56 @@ function le(e) {
835
971
  }
836
972
  return null;
837
973
  }
838
- function K(e, t) {
974
+ function ve(e, t) {
839
975
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect().top + t.clientTop, i = n.top - r + t.scrollTop, a = i + n.height;
840
- i - G < t.scrollTop ? t.scrollTo({ top: i - G }) : a + G > t.scrollTop + t.clientHeight && t.scrollTo({ top: a + G - t.clientHeight });
976
+ i - W < t.scrollTop ? t.scrollTo({ top: i - W }) : a + W > t.scrollTop + t.clientHeight && t.scrollTo({ top: a + W - t.clientHeight });
841
977
  }
842
- function ue({ label: e, items: t, activeHref: n, ariaCurrent: r = "page", keepActiveInView: o = !1, as: c = "a", onItemClick: l, className: f }) {
978
+ function ye({ label: e, items: t, activeHref: n, ariaCurrent: r = "page", keepActiveInView: o = !1, as: c = "a", onItemClick: l, className: f }) {
843
979
  let p = a(), m = s(null);
844
980
  i(() => {
845
981
  let e = m.current;
846
982
  if (!o || !e) return;
847
- let t = e.querySelector("[aria-current]"), n = le(e);
848
- t && n && K(t, n);
983
+ let t = e.querySelector("[aria-current]"), n = _e(e);
984
+ t && n && ve(t, n);
849
985
  }, [n, o]);
850
986
  let h = (e) => {
851
987
  let t = e.href === n;
852
988
  return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d(c, {
853
989
  href: e.href,
854
- className: [W.link, t && W.active].filter(Boolean).join(" "),
990
+ className: [U.link, t && U.active].filter(Boolean).join(" "),
855
991
  "aria-current": t ? r : void 0,
856
992
  onClick: l ? (t) => l(e, t) : void 0,
857
993
  children: [e.icon && /* @__PURE__ */ u("span", {
858
- className: W.icon,
994
+ className: U.icon,
859
995
  "aria-hidden": "true",
860
996
  children: e.icon
861
997
  }), /* @__PURE__ */ u("span", {
862
- className: W.label,
998
+ className: U.label,
863
999
  children: e.label
864
1000
  })]
865
1001
  }) }, e.href);
866
1002
  };
867
1003
  return /* @__PURE__ */ u("nav", {
868
1004
  ref: m,
869
- className: [W.sideNav, f].filter(Boolean).join(" "),
1005
+ className: [U.sideNav, f].filter(Boolean).join(" "),
870
1006
  "aria-label": e,
871
1007
  children: /* @__PURE__ */ u("ul", {
872
- className: W.list,
1008
+ className: U.list,
873
1009
  children: t.map((e, t) => {
874
- if (!ce(e)) return h(e);
1010
+ if (!ge(e)) return h(e);
875
1011
  let n = `${p}-group-${t}`;
876
1012
  return /* @__PURE__ */ d("li", {
877
- className: W.group,
1013
+ className: U.group,
878
1014
  children: [/* @__PURE__ */ d("span", {
879
1015
  id: n,
880
- className: W.groupTitle,
1016
+ className: U.groupTitle,
881
1017
  children: [e.icon && /* @__PURE__ */ u("span", {
882
- className: W.icon,
1018
+ className: U.icon,
883
1019
  "aria-hidden": "true",
884
1020
  children: e.icon
885
1021
  }), e.title]
886
1022
  }), /* @__PURE__ */ u("ul", {
887
- className: W.list,
1023
+ className: U.list,
888
1024
  "aria-labelledby": n,
889
1025
  children: e.items.map(h)
890
1026
  })]
@@ -893,7 +1029,7 @@ function ue({ label: e, items: t, activeHref: n, ariaCurrent: r = "page", keepAc
893
1029
  })
894
1030
  });
895
1031
  }
896
- var q = {
1032
+ var G = {
897
1033
  tag: "_tag_1tw86_1",
898
1034
  clickable: "_clickable_1tw86_20",
899
1035
  active: "_active_1tw86_29",
@@ -901,12 +1037,12 @@ var q = {
901
1037
  removeBtn: "_removeBtn_1tw86_44"
902
1038
  };
903
1039
  // src/components/Tag/Tag.tsx
904
- function J({ label: e, active: t, onClick: n, onRemove: r, removeLabel: i }) {
1040
+ function K({ label: e, active: t, onClick: n, onRemove: r, removeLabel: i }) {
905
1041
  let a = [
906
- q.tag,
907
- n && q.clickable,
908
- t && q.active,
909
- r && q.removable
1042
+ G.tag,
1043
+ n && G.clickable,
1044
+ t && G.active,
1045
+ r && G.removable
910
1046
  ].filter(Boolean).join(" ");
911
1047
  return n ? /* @__PURE__ */ u("button", {
912
1048
  type: "button",
@@ -918,32 +1054,57 @@ function J({ label: e, active: t, onClick: n, onRemove: r, removeLabel: i }) {
918
1054
  className: a,
919
1055
  children: [e, r && /* @__PURE__ */ u("button", {
920
1056
  type: "button",
921
- className: q.removeBtn,
1057
+ className: G.removeBtn,
922
1058
  onClick: r,
923
1059
  "aria-label": i,
924
1060
  children: "×"
925
1061
  })]
926
1062
  });
927
1063
  }
928
- var de = { tagFilter: "_tagFilter_1mu0a_1" };
1064
+ var be = { tagFilter: "_tagFilter_1mu0a_1" };
929
1065
  // src/components/TagFilter/TagFilter.tsx
930
- function fe({ tags: e, activeTag: t, onTagClick: n, allLabel: r, groupLabel: i }) {
1066
+ function xe({ tags: e, activeTag: t, onTagClick: n, allLabel: r, groupLabel: i }) {
931
1067
  return /* @__PURE__ */ d("div", {
932
- className: de.tagFilter,
1068
+ className: be.tagFilter,
933
1069
  role: i ? "group" : void 0,
934
1070
  "aria-label": i,
935
- children: [/* @__PURE__ */ u(J, {
1071
+ children: [/* @__PURE__ */ u(K, {
936
1072
  label: r,
937
1073
  active: t === null,
938
1074
  onClick: () => n(null)
939
- }), e.map((e) => /* @__PURE__ */ u(J, {
1075
+ }), e.map((e) => /* @__PURE__ */ u(K, {
940
1076
  label: e,
941
1077
  active: t === e,
942
1078
  onClick: () => n(e)
943
1079
  }, e))]
944
1080
  });
945
1081
  }
946
- var Y = {
1082
+ var q = {
1083
+ tagGroup: "_tagGroup_sens0_1",
1084
+ label: "_label_sens0_9",
1085
+ tags: "_tags_sens0_20"
1086
+ };
1087
+ // src/components/TagGroup/TagGroup.tsx
1088
+ function Se(e) {
1089
+ let { label: t, options: n, className: r } = e, i = (t) => e.selection === "single" ? e.selected === t : e.selected.includes(t), a = (t) => {
1090
+ e.selection === "single" ? e.onChange(e.selected === t ? null : t) : e.onChange(e.selected.includes(t) ? e.selected.filter((e) => e !== t) : [...e.selected, t]);
1091
+ };
1092
+ return /* @__PURE__ */ d("fieldset", {
1093
+ className: [q.tagGroup, r].filter(Boolean).join(" "),
1094
+ children: [/* @__PURE__ */ u("legend", {
1095
+ className: q.label,
1096
+ children: t
1097
+ }), /* @__PURE__ */ u("div", {
1098
+ className: q.tags,
1099
+ children: n.map((e) => /* @__PURE__ */ u(K, {
1100
+ label: e.label,
1101
+ active: i(e.value),
1102
+ onClick: () => a(e.value)
1103
+ }, e.value))
1104
+ })]
1105
+ });
1106
+ }
1107
+ var J = {
947
1108
  text: "_text_dq0aw_1",
948
1109
  body: "_body_dq0aw_13",
949
1110
  display: "_display_dq0aw_17",
@@ -980,17 +1141,17 @@ var Y = {
980
1141
  clamp: "_clamp_dq0aw_156"
981
1142
  };
982
1143
  // src/components/Text/Text.tsx
983
- function pe({ as: e = "p", variant: t = "body", size: n, weight: r, italic: i = !1, tone: a, align: o, truncate: s, className: c, style: l, children: d, ...f }) {
1144
+ function Ce({ as: e = "p", variant: t = "body", size: n, weight: r, italic: i = !1, tone: a, align: o, truncate: s, className: c, style: l, children: d, ...f }) {
984
1145
  let p = typeof s == "number" && s >= 1 ? Math.floor(s) : void 0, m = [
985
- Y.text,
986
- Y[t],
987
- n && Y[`size-${n}`],
988
- r && Y[`weight-${r}`],
989
- i && Y.italic,
990
- a && Y[`tone-${a}`],
991
- o && Y[`align-${o}`],
992
- s === !0 && Y.truncate,
993
- p !== void 0 && Y.clamp,
1146
+ J.text,
1147
+ J[t],
1148
+ n && J[`size-${n}`],
1149
+ r && J[`weight-${r}`],
1150
+ i && J.italic,
1151
+ a && J[`tone-${a}`],
1152
+ o && J[`align-${o}`],
1153
+ s === !0 && J.truncate,
1154
+ p !== void 0 && J.clamp,
994
1155
  c
995
1156
  ].filter(Boolean).join(" "), h = p === void 0 ? l : {
996
1157
  ...l,
@@ -1003,61 +1164,87 @@ function pe({ as: e = "p", variant: t = "body", size: n, weight: r, italic: i =
1003
1164
  children: d
1004
1165
  });
1005
1166
  }
1006
- var X = {
1007
- wrapper: "_wrapper_12bvz_1",
1008
- label: "_label_12bvz_7",
1009
- textarea: "_textarea_12bvz_15"
1167
+ var Y = {
1168
+ wrapper: "_wrapper_m6u21_1",
1169
+ label: "_label_m6u21_7",
1170
+ hint: "_hint_m6u21_15",
1171
+ textarea: "_textarea_m6u21_21"
1010
1172
  };
1011
1173
  // src/components/TextArea/TextArea.tsx
1012
- function me({ label: e, className: t, id: n, ...r }) {
1013
- let i = a(), o = n ?? i;
1174
+ function we({ label: e, hint: t, className: n, id: r, "aria-describedby": i, ...o }) {
1175
+ let s = a(), c = r ?? s, l = `${c}-hint`, f = [i, t && l].filter(Boolean).join(" ") || void 0;
1014
1176
  return /* @__PURE__ */ d("div", {
1015
- className: `${X.wrapper} ${t || ""}`,
1016
- children: [e && /* @__PURE__ */ u("label", {
1017
- className: X.label,
1018
- htmlFor: o,
1019
- children: e
1020
- }), /* @__PURE__ */ u("textarea", {
1021
- id: o,
1022
- className: X.textarea,
1023
- ...r
1024
- })]
1177
+ className: `${Y.wrapper} ${n || ""}`,
1178
+ children: [
1179
+ e && /* @__PURE__ */ u("label", {
1180
+ className: Y.label,
1181
+ htmlFor: c,
1182
+ children: e
1183
+ }),
1184
+ /* @__PURE__ */ u("textarea", {
1185
+ id: c,
1186
+ className: Y.textarea,
1187
+ "aria-describedby": f,
1188
+ ...o
1189
+ }),
1190
+ t && /* @__PURE__ */ u("span", {
1191
+ id: l,
1192
+ className: Y.hint,
1193
+ children: t
1194
+ })
1195
+ ]
1025
1196
  });
1026
1197
  }
1027
- var Z = {
1028
- wrapper: "_wrapper_3ifhw_1",
1029
- label: "_label_3ifhw_7",
1030
- input: "_input_3ifhw_15",
1031
- error: "_error_3ifhw_37",
1032
- errorMessage: "_errorMessage_3ifhw_41"
1198
+ var X = {
1199
+ wrapper: "_wrapper_1y6l7_1",
1200
+ label: "_label_1y6l7_7",
1201
+ input: "_input_1y6l7_15",
1202
+ error: "_error_1y6l7_37",
1203
+ hint: "_hint_1y6l7_41",
1204
+ compact: "_compact_1y6l7_47",
1205
+ errorMessage: "_errorMessage_1y6l7_51"
1033
1206
  };
1034
1207
  // src/components/TextInput/TextInput.tsx
1035
- function he({ label: e, error: t, className: n, id: r, "aria-describedby": i, "aria-invalid": o, ...s }) {
1036
- let c = a(), l = r ?? c, f = `${l}-error`, p = [i, t && f].filter(Boolean).join(" ") || void 0;
1208
+ function Te({ label: e, hint: t, error: n, compact: r = !1, className: i, id: o, "aria-describedby": s, "aria-invalid": c, ...l }) {
1209
+ let f = a(), p = o ?? f, m = `${p}-hint`, h = `${p}-error`, g = [
1210
+ s,
1211
+ t && m,
1212
+ n && h
1213
+ ].filter(Boolean).join(" ") || void 0;
1037
1214
  return /* @__PURE__ */ d("div", {
1038
- className: `${Z.wrapper} ${t ? Z.error : ""} ${n || ""}`,
1215
+ className: [
1216
+ X.wrapper,
1217
+ r && X.compact,
1218
+ n && X.error,
1219
+ i
1220
+ ].filter(Boolean).join(" "),
1039
1221
  children: [
1040
1222
  e && /* @__PURE__ */ u("label", {
1041
- className: Z.label,
1042
- htmlFor: l,
1223
+ className: X.label,
1224
+ htmlFor: p,
1043
1225
  children: e
1044
1226
  }),
1045
1227
  /* @__PURE__ */ u("input", {
1046
- id: l,
1047
- className: Z.input,
1048
- "aria-describedby": p,
1049
- "aria-invalid": t ? !0 : o,
1050
- ...s
1228
+ id: p,
1229
+ className: X.input,
1230
+ "aria-describedby": g,
1231
+ "aria-invalid": n ? !0 : c,
1232
+ ...l
1051
1233
  }),
1052
1234
  t && /* @__PURE__ */ u("span", {
1053
- id: f,
1054
- className: Z.errorMessage,
1235
+ id: m,
1236
+ className: X.hint,
1055
1237
  children: t
1238
+ }),
1239
+ n && /* @__PURE__ */ u("span", {
1240
+ id: h,
1241
+ className: X.errorMessage,
1242
+ children: n
1056
1243
  })
1057
1244
  ]
1058
1245
  });
1059
1246
  }
1060
- var Q = {
1247
+ var Z = {
1061
1248
  container: "_container_m3x4i_1",
1062
1249
  toast: "_toast_m3x4i_14",
1063
1250
  slideIn: "_slideIn_m3x4i_1",
@@ -1075,16 +1262,16 @@ var Q = {
1075
1262
  progress: "_progress_m3x4i_153",
1076
1263
  toastInner: "_toastInner_m3x4i_181",
1077
1264
  toastBody: "_toastBody_m3x4i_187"
1078
- }, ge = 220, _e = {
1265
+ }, Q = 220, Ee = {
1079
1266
  success: "✓",
1080
1267
  error: "✕",
1081
1268
  warning: "⚠",
1082
1269
  info: "ℹ"
1083
1270
  }, $ = t({ addToast: () => {} });
1084
- function ve() {
1271
+ function De() {
1085
1272
  return r($);
1086
1273
  }
1087
- function ye({ dismissLabel: e, children: t }) {
1274
+ function Oe({ dismissLabel: e, children: t }) {
1088
1275
  let [r, a] = c([]), l = s(0), f = s(/* @__PURE__ */ new Map());
1089
1276
  i(() => {
1090
1277
  let e = f.current;
@@ -1096,7 +1283,7 @@ function ye({ dismissLabel: e, children: t }) {
1096
1283
  isExiting: !0
1097
1284
  } : t)), setTimeout(() => {
1098
1285
  a((t) => t.filter((t) => t.id !== e));
1099
- }, ge);
1286
+ }, Q);
1100
1287
  }, []), m = n((e, t = "success", n = 4e3) => {
1101
1288
  let r = String(l.current++);
1102
1289
  a((i) => [...i, {
@@ -1109,44 +1296,44 @@ function ye({ dismissLabel: e, children: t }) {
1109
1296
  }, [p]), h = o(() => ({ addToast: m }), [m]);
1110
1297
  return /* @__PURE__ */ d($.Provider, {
1111
1298
  value: h,
1112
- children: [t, /* @__PURE__ */ u(be, {
1299
+ children: [t, /* @__PURE__ */ u(ke, {
1113
1300
  toasts: r,
1114
1301
  onDismiss: p,
1115
1302
  dismissLabel: e
1116
1303
  })]
1117
1304
  });
1118
1305
  }
1119
- function be({ toasts: e, onDismiss: t, dismissLabel: n }) {
1306
+ function ke({ toasts: e, onDismiss: t, dismissLabel: n }) {
1120
1307
  return /* @__PURE__ */ u("div", {
1121
- className: Q.container,
1308
+ className: Z.container,
1122
1309
  role: "status",
1123
1310
  "aria-atomic": "false",
1124
1311
  children: e.map((e) => /* @__PURE__ */ d("div", {
1125
- className: `${Q.toast} ${Q[e.variant]} ${e.isExiting ? Q.exiting : ""}`,
1312
+ className: `${Z.toast} ${Z[e.variant]} ${e.isExiting ? Z.exiting : ""}`,
1126
1313
  children: [
1127
1314
  /* @__PURE__ */ u("div", {
1128
- className: Q.toastInner,
1315
+ className: Z.toastInner,
1129
1316
  children: /* @__PURE__ */ d("div", {
1130
- className: Q.toastBody,
1317
+ className: Z.toastBody,
1131
1318
  children: [/* @__PURE__ */ u("span", {
1132
- className: Q.icon,
1319
+ className: Z.icon,
1133
1320
  "aria-hidden": "true",
1134
- children: _e[e.variant]
1321
+ children: Ee[e.variant]
1135
1322
  }), /* @__PURE__ */ u("span", {
1136
- className: Q.message,
1323
+ className: Z.message,
1137
1324
  children: e.message
1138
1325
  })]
1139
1326
  })
1140
1327
  }),
1141
1328
  /* @__PURE__ */ u("button", {
1142
1329
  type: "button",
1143
- className: Q.close,
1330
+ className: Z.close,
1144
1331
  onClick: () => t(e.id),
1145
1332
  "aria-label": n,
1146
1333
  children: "×"
1147
1334
  }),
1148
1335
  /* @__PURE__ */ u("div", {
1149
- className: Q.progress,
1336
+ className: Z.progress,
1150
1337
  style: { animationDuration: `${e.duration}ms` }
1151
1338
  })
1152
1339
  ]
@@ -1154,7 +1341,7 @@ function be({ toasts: e, onDismiss: t, dismissLabel: n }) {
1154
1341
  });
1155
1342
  }
1156
1343
  // src/hooks/useDragReorder.ts
1157
- function xe(e, t) {
1344
+ function Ae(e, t) {
1158
1345
  let [n, r] = c(null), [i, a] = c(null), o = () => {
1159
1346
  r(null), a(null);
1160
1347
  }, s = (n, r) => {
@@ -1183,15 +1370,15 @@ function xe(e, t) {
1183
1370
  };
1184
1371
  }
1185
1372
  // src/hooks/useRotatingMessage.ts
1186
- var Se = 300;
1187
- function Ce(e, t = 1e4, n = !1) {
1373
+ var je = 300;
1374
+ function Me(e, t = 1e4, n = !1) {
1188
1375
  let [r, a] = c(0), [o, s] = c(!1);
1189
1376
  return i(() => {
1190
1377
  if (e.length <= 1 || n) return;
1191
1378
  let r, i = setInterval(() => {
1192
1379
  s(!0), r = setTimeout(() => {
1193
1380
  r = void 0, a((t) => (t + 1) % e.length), s(!1);
1194
- }, Se);
1381
+ }, je);
1195
1382
  }, t);
1196
1383
  return () => {
1197
1384
  clearInterval(i), r !== void 0 && (clearTimeout(r), s(!1));
@@ -1205,4 +1392,4 @@ function Ce(e, t = 1e4, n = !1) {
1205
1392
  isFading: o
1206
1393
  };
1207
1394
  }
1208
- export { h as Button, v as Card, b as Container, C as ICON_NAMES, ee as Icon, A as MATRIX_CONFIG, ie as MATRIX_PRESETS, ae as MATRIX_THEME_CONFIG, w as Markdown, k as MarkdownEditor, M as MatrixContainer, N as ORBITAL_DOTS_CONFIG, F as OrbitalDots, oe as PageHero, se as PageTransition, L as Section, V as Select, U as ShimmerImage, ue as SideNav, J as Tag, fe as TagFilter, pe as Text, me as TextArea, he as TextInput, ye as ToastProvider, xe as useDragReorder, Ce as useRotatingMessage, ve as useToast };
1395
+ export { h as Accordion, v as Button, x as Card, C as Checkbox, T as Container, te as ICON_NAMES, ne as Icon, re as IconButton, A as MATRIX_CONFIG, de as MATRIX_PRESETS, fe as MATRIX_THEME_CONFIG, O as Markdown, ue as MarkdownEditor, M as MatrixContainer, N as ORBITAL_DOTS_CONFIG, F as OrbitalDots, pe as PageHero, B as PageTransition, L as Section, me as Select, he as ShimmerImage, ye as SideNav, K as Tag, xe as TagFilter, Se as TagGroup, Ce as Text, we as TextArea, Te as TextInput, Oe as ToastProvider, Ae as useDragReorder, Me as useRotatingMessage, De as useToast };