rl-react-components 2.6.0 → 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,50 +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 = {
171
+ var S = {
109
172
  checkbox: "_checkbox_10gcb_2",
110
173
  input: "_input_10gcb_9",
111
174
  tile: "_tile_10gcb_22",
112
175
  box: "_box_10gcb_44"
113
176
  };
114
177
  // src/components/Checkbox/Checkbox.tsx
115
- function b({ label: e, className: t, ...n }) {
178
+ function C({ label: e, className: t, ...n }) {
116
179
  return /* @__PURE__ */ d("label", {
117
- className: `${y.checkbox} ${t || ""}`,
180
+ className: `${S.checkbox} ${t || ""}`,
118
181
  children: [/* @__PURE__ */ u("input", {
119
182
  ...n,
120
183
  type: "checkbox",
121
- className: y.input
184
+ className: S.input
122
185
  }), /* @__PURE__ */ d("span", {
123
- className: y.tile,
186
+ className: S.tile,
124
187
  children: [/* @__PURE__ */ u("span", {
125
- className: y.box,
188
+ className: S.box,
126
189
  "aria-hidden": "true"
127
190
  }), e]
128
191
  })]
129
192
  });
130
193
  }
131
- var x = {
132
- container: "_container_12hys_1",
133
- sm: "_sm_12hys_8",
134
- md: "_md_12hys_12",
135
- lg: "_lg_12hys_16",
136
- xl: "_xl_12hys_20",
137
- xxl: "_xxl_12hys_24"
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"
138
202
  };
139
203
  // src/components/Container/Container.tsx
140
- function S({ children: e, size: t = "xl", className: n, as: r = "div" }) {
141
- let i = [
142
- x.container,
143
- x[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,
144
208
  n
145
209
  ].filter(Boolean).join(" ");
146
210
  return /* @__PURE__ */ u(r, {
147
- className: i,
211
+ className: a,
148
212
  children: e
149
213
  });
150
214
  }
151
- var C = { icon: "_icon_veg5e_1" }, w = {
215
+ var ee = { icon: "_icon_veg5e_1" }, E = {
152
216
  sun: /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("circle", {
153
217
  cx: "12",
154
218
  cy: "12",
@@ -196,9 +260,9 @@ var C = { icon: "_icon_veg5e_1" }, w = {
196
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" })] }),
197
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" })] }),
198
262
  type: /* @__PURE__ */ u("path", { d: "M5 7V4h14v3M12 4v16M9 20h6" })
199
- }, ee = Object.keys(w);
200
- function te({ name: e, size: t = 18, className: n }) {
201
- let r = [C.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(" ");
202
266
  return /* @__PURE__ */ u("svg", {
203
267
  className: r,
204
268
  width: t,
@@ -211,29 +275,56 @@ function te({ name: e, size: t = 18, className: n }) {
211
275
  strokeLinejoin: "round",
212
276
  "aria-hidden": "true",
213
277
  focusable: "false",
214
- children: w[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
+ })
215
306
  });
216
307
  }
217
308
  // src/components/Markdown/Markdown.tsx
218
- function T({ node: e, ...t }) {
309
+ function ie({ node: e, ...t }) {
219
310
  return /* @__PURE__ */ u("a", {
220
311
  ...t,
221
312
  target: "_blank",
222
313
  rel: "noopener noreferrer"
223
314
  });
224
315
  }
225
- var ne = { a: T }, E = [p];
226
- function D({ children: e, className: t }) {
316
+ var ae = { a: ie }, oe = [p];
317
+ function O({ children: e, className: t }) {
227
318
  return /* @__PURE__ */ u("div", {
228
319
  className: t,
229
320
  children: /* @__PURE__ */ u(f, {
230
- remarkPlugins: E,
231
- components: ne,
321
+ remarkPlugins: oe,
322
+ components: ae,
232
323
  children: e
233
324
  })
234
325
  });
235
326
  }
236
- var O = {
327
+ var k = {
237
328
  editor: "_editor_spixg_1",
238
329
  label: "_label_spixg_7",
239
330
  toolbar: "_toolbar_spixg_15",
@@ -246,7 +337,7 @@ var O = {
246
337
  previewHeader: "_previewHeader_spixg_111",
247
338
  previewDot: "_previewDot_spixg_125",
248
339
  preview: "_preview_spixg_104"
249
- }, re = 200, ie = " ", k = [
340
+ }, se = 200, ce = " ", le = [
250
341
  [
251
342
  {
252
343
  action: "bold",
@@ -346,11 +437,11 @@ var O = {
346
437
  }
347
438
  ]
348
439
  ];
349
- function ae({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
440
+ function ue({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
350
441
  let f = s(null), p = s(!1), m = a(), h = a();
351
442
  i(() => {
352
443
  let e = f.current;
353
- e && (e.style.height = "auto", e.style.height = `${Math.max(re, e.scrollHeight)}px`);
444
+ e && (e.style.height = "auto", e.style.height = `${Math.max(se, e.scrollHeight)}px`);
354
445
  }, [t]);
355
446
  let g = n((e) => {
356
447
  let t = f.current;
@@ -369,17 +460,17 @@ function ae({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
369
460
  return [t.substring(0, n) + e.prefix + a + e.suffix + t.substring(r), n + e.prefix.length + a.length];
370
461
  });
371
462
  return /* @__PURE__ */ d("div", {
372
- className: O.editor,
463
+ className: k.editor,
373
464
  children: [
374
465
  /* @__PURE__ */ u("label", {
375
- className: O.label,
466
+ className: k.label,
376
467
  htmlFor: m,
377
468
  children: c
378
469
  }),
379
470
  /* @__PURE__ */ u("div", {
380
- className: O.toolbar,
381
- children: k.map((t, n) => /* @__PURE__ */ d(e.Fragment, { children: [n > 0 && /* @__PURE__ */ u("div", { className: O.separator }), t.map((e) => /* @__PURE__ */ u("button", {
382
- className: O.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,
383
474
  onClick: () => _(e),
384
475
  title: o.actions[e.action],
385
476
  "aria-label": o.actions[e.action],
@@ -388,16 +479,16 @@ function ae({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
388
479
  }, e.action))] }, n))
389
480
  }),
390
481
  /* @__PURE__ */ d("div", {
391
- className: O.content,
482
+ className: k.content,
392
483
  children: [/* @__PURE__ */ u("textarea", {
393
484
  id: m,
394
485
  ref: f,
395
- className: O.textarea,
486
+ className: k.textarea,
396
487
  value: t,
397
488
  onChange: (e) => r(e.target.value),
398
489
  onKeyDown: (e) => {
399
490
  let n = p.current;
400
- p.current = e.key === "Escape", !(e.key !== "Tab" || e.shiftKey || n) && (e.preventDefault(), g((e, n) => [t.substring(0, e) + ie + 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]));
401
492
  },
402
493
  onBlur: () => {
403
494
  p.current = !1;
@@ -406,17 +497,17 @@ function ae({ value: t, onChange: r, labels: o, label: c, placeholder: l }) {
406
497
  "aria-describedby": o.tabHint ? h : void 0
407
498
  }), o.tabHint && /* @__PURE__ */ u("span", {
408
499
  id: h,
409
- className: O.visuallyHidden,
500
+ className: k.visuallyHidden,
410
501
  children: o.tabHint
411
502
  })]
412
503
  }),
413
504
  t.trim() && /* @__PURE__ */ d("div", {
414
- className: O.previewSection,
505
+ className: k.previewSection,
415
506
  children: [/* @__PURE__ */ d("div", {
416
- className: O.previewHeader,
417
- children: [/* @__PURE__ */ u("span", { className: O.previewDot }), o.preview]
418
- }), /* @__PURE__ */ u(D, {
419
- className: O.preview,
507
+ className: k.previewHeader,
508
+ children: [/* @__PURE__ */ u("span", { className: k.previewDot }), o.preview]
509
+ }), /* @__PURE__ */ u(O, {
510
+ className: k.preview,
420
511
  children: t
421
512
  })]
422
513
  })
@@ -433,7 +524,7 @@ var A = {
433
524
  headOpacity: 1,
434
525
  trailOpacityMax: .8,
435
526
  chars: Array.from("アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン0123456789")
436
- }, oe = {
527
+ }, de = {
437
528
  drizzle: {
438
529
  columnDensity: .15,
439
530
  tickMs: 250,
@@ -455,7 +546,7 @@ var A = {
455
546
  headOpacity: .9,
456
547
  trailOpacityMax: .8
457
548
  }
458
- }, se = {
549
+ }, fe = {
459
550
  dark: {
460
551
  fontSize: 14,
461
552
  columnDensity: 1,
@@ -724,12 +815,12 @@ var R = {
724
815
  heroSubtitle: "_heroSubtitle_1b7du_137"
725
816
  };
726
817
  // src/components/PageHero/PageHero.tsx
727
- function ce({ eyebrow: e, title: t, subtitle: n, count: r, countLabel: i }) {
818
+ function pe({ eyebrow: e, title: t, subtitle: n, count: r, countLabel: i }) {
728
819
  return /* @__PURE__ */ u(L, {
729
820
  noPadding: !0,
730
821
  children: /* @__PURE__ */ u("div", {
731
822
  className: R.hero,
732
- children: /* @__PURE__ */ u(S, { children: /* @__PURE__ */ d("div", {
823
+ children: /* @__PURE__ */ u(T, { children: /* @__PURE__ */ d("div", {
733
824
  className: R.heroInner,
734
825
  children: [
735
826
  /* @__PURE__ */ d("div", {
@@ -781,34 +872,49 @@ function B({ children: e, transitionKey: t, appear: n = !0 }) {
781
872
  });
782
873
  }
783
874
  var V = {
784
- wrapper: "_wrapper_2hx09_1",
785
- label: "_label_2hx09_7",
786
- select: "_select_2hx09_15"
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"
787
880
  };
788
881
  // src/components/Select/Select.tsx
789
- function H({ label: e, placeholder: t, options: n, className: r, id: i, ...o }) {
790
- 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;
791
884
  return /* @__PURE__ */ d("div", {
792
- className: `${V.wrapper} ${r || ""}`,
793
- children: [e && /* @__PURE__ */ u("label", {
794
- className: V.label,
795
- htmlFor: c,
796
- children: e
797
- }), /* @__PURE__ */ d("select", {
798
- id: c,
799
- className: V.select,
800
- ...o,
801
- children: [/* @__PURE__ */ u("option", {
802
- 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,
803
912
  children: t
804
- }), n.map((e) => /* @__PURE__ */ u("option", {
805
- value: e.value,
806
- children: e.label
807
- }, e.value))]
808
- })]
913
+ })
914
+ ]
809
915
  });
810
916
  }
811
- var U = {
917
+ var H = {
812
918
  frame: "_frame_btbpz_1",
813
919
  shimmer: "_shimmer_btbpz_7",
814
920
  sweep: "_sweep_btbpz_1",
@@ -817,26 +923,33 @@ var U = {
817
923
  loaded: "_loaded_btbpz_38"
818
924
  };
819
925
  // src/components/ShimmerImage/ShimmerImage.tsx
820
- function W({ src: e, alt: t, className: n, ...r }) {
821
- let [i, a] = c(null), o = i === e, s = (t) => {
822
- 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
+ }));
823
933
  };
824
- return /* @__PURE__ */ d("div", {
825
- className: `${U.frame} ${o ? U.loaded : ""}`,
826
- children: [/* @__PURE__ */ u("div", { className: U.shimmer }), /* @__PURE__ */ u("div", {
827
- className: U.reveal,
934
+ return n !== void 0 && (!e || p === e) ? /* @__PURE__ */ u(l, { children: n }) : /* @__PURE__ */ d("div", {
935
+ className: `${H.frame} ${f ? H.loaded : ""}`,
936
+ children: [/* @__PURE__ */ u("div", { className: H.shimmer }), /* @__PURE__ */ u("div", {
937
+ className: H.reveal,
828
938
  children: /* @__PURE__ */ u("img", {
829
- ...r,
830
- ref: s,
939
+ ...a,
940
+ ref: h,
831
941
  src: e,
832
942
  alt: t,
833
- className: [U.image, n].filter(Boolean).join(" "),
834
- onLoad: () => a(e)
943
+ className: [H.image, r].filter(Boolean).join(" "),
944
+ onLoad: () => s(e),
945
+ onError: (t) => {
946
+ m(e), i?.(t);
947
+ }
835
948
  })
836
949
  })]
837
950
  });
838
951
  }
839
- var G = {
952
+ var U = {
840
953
  sideNav: "_sideNav_1ljaj_1",
841
954
  list: "_list_1ljaj_10",
842
955
  group: "_group_1ljaj_16",
@@ -845,11 +958,11 @@ var G = {
845
958
  active: "_active_1ljaj_64",
846
959
  icon: "_icon_1ljaj_76",
847
960
  label: "_label_1ljaj_81"
848
- }, K = 24;
849
- function le(e) {
961
+ }, W = 24;
962
+ function ge(e) {
850
963
  return "items" in e;
851
964
  }
852
- function ue(e) {
965
+ function _e(e) {
853
966
  let { body: t, documentElement: n } = e.ownerDocument;
854
967
  for (let r = e.parentElement; r; r = r.parentElement) {
855
968
  if (r === t || r === n) return null;
@@ -858,56 +971,56 @@ function ue(e) {
858
971
  }
859
972
  return null;
860
973
  }
861
- function de(e, t) {
974
+ function ve(e, t) {
862
975
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect().top + t.clientTop, i = n.top - r + t.scrollTop, a = i + n.height;
863
- i - K < t.scrollTop ? t.scrollTo({ top: i - K }) : a + K > t.scrollTop + t.clientHeight && t.scrollTo({ top: a + K - 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 });
864
977
  }
865
- function fe({ 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 }) {
866
979
  let p = a(), m = s(null);
867
980
  i(() => {
868
981
  let e = m.current;
869
982
  if (!o || !e) return;
870
- let t = e.querySelector("[aria-current]"), n = ue(e);
871
- t && n && de(t, n);
983
+ let t = e.querySelector("[aria-current]"), n = _e(e);
984
+ t && n && ve(t, n);
872
985
  }, [n, o]);
873
986
  let h = (e) => {
874
987
  let t = e.href === n;
875
988
  return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d(c, {
876
989
  href: e.href,
877
- className: [G.link, t && G.active].filter(Boolean).join(" "),
990
+ className: [U.link, t && U.active].filter(Boolean).join(" "),
878
991
  "aria-current": t ? r : void 0,
879
992
  onClick: l ? (t) => l(e, t) : void 0,
880
993
  children: [e.icon && /* @__PURE__ */ u("span", {
881
- className: G.icon,
994
+ className: U.icon,
882
995
  "aria-hidden": "true",
883
996
  children: e.icon
884
997
  }), /* @__PURE__ */ u("span", {
885
- className: G.label,
998
+ className: U.label,
886
999
  children: e.label
887
1000
  })]
888
1001
  }) }, e.href);
889
1002
  };
890
1003
  return /* @__PURE__ */ u("nav", {
891
1004
  ref: m,
892
- className: [G.sideNav, f].filter(Boolean).join(" "),
1005
+ className: [U.sideNav, f].filter(Boolean).join(" "),
893
1006
  "aria-label": e,
894
1007
  children: /* @__PURE__ */ u("ul", {
895
- className: G.list,
1008
+ className: U.list,
896
1009
  children: t.map((e, t) => {
897
- if (!le(e)) return h(e);
1010
+ if (!ge(e)) return h(e);
898
1011
  let n = `${p}-group-${t}`;
899
1012
  return /* @__PURE__ */ d("li", {
900
- className: G.group,
1013
+ className: U.group,
901
1014
  children: [/* @__PURE__ */ d("span", {
902
1015
  id: n,
903
- className: G.groupTitle,
1016
+ className: U.groupTitle,
904
1017
  children: [e.icon && /* @__PURE__ */ u("span", {
905
- className: G.icon,
1018
+ className: U.icon,
906
1019
  "aria-hidden": "true",
907
1020
  children: e.icon
908
1021
  }), e.title]
909
1022
  }), /* @__PURE__ */ u("ul", {
910
- className: G.list,
1023
+ className: U.list,
911
1024
  "aria-labelledby": n,
912
1025
  children: e.items.map(h)
913
1026
  })]
@@ -916,7 +1029,7 @@ function fe({ label: e, items: t, activeHref: n, ariaCurrent: r = "page", keepAc
916
1029
  })
917
1030
  });
918
1031
  }
919
- var q = {
1032
+ var G = {
920
1033
  tag: "_tag_1tw86_1",
921
1034
  clickable: "_clickable_1tw86_20",
922
1035
  active: "_active_1tw86_29",
@@ -924,12 +1037,12 @@ var q = {
924
1037
  removeBtn: "_removeBtn_1tw86_44"
925
1038
  };
926
1039
  // src/components/Tag/Tag.tsx
927
- 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 }) {
928
1041
  let a = [
929
- q.tag,
930
- n && q.clickable,
931
- t && q.active,
932
- r && q.removable
1042
+ G.tag,
1043
+ n && G.clickable,
1044
+ t && G.active,
1045
+ r && G.removable
933
1046
  ].filter(Boolean).join(" ");
934
1047
  return n ? /* @__PURE__ */ u("button", {
935
1048
  type: "button",
@@ -941,32 +1054,57 @@ function J({ label: e, active: t, onClick: n, onRemove: r, removeLabel: i }) {
941
1054
  className: a,
942
1055
  children: [e, r && /* @__PURE__ */ u("button", {
943
1056
  type: "button",
944
- className: q.removeBtn,
1057
+ className: G.removeBtn,
945
1058
  onClick: r,
946
1059
  "aria-label": i,
947
1060
  children: "×"
948
1061
  })]
949
1062
  });
950
1063
  }
951
- var pe = { tagFilter: "_tagFilter_1mu0a_1" };
1064
+ var be = { tagFilter: "_tagFilter_1mu0a_1" };
952
1065
  // src/components/TagFilter/TagFilter.tsx
953
- function me({ tags: e, activeTag: t, onTagClick: n, allLabel: r, groupLabel: i }) {
1066
+ function xe({ tags: e, activeTag: t, onTagClick: n, allLabel: r, groupLabel: i }) {
954
1067
  return /* @__PURE__ */ d("div", {
955
- className: pe.tagFilter,
1068
+ className: be.tagFilter,
956
1069
  role: i ? "group" : void 0,
957
1070
  "aria-label": i,
958
- children: [/* @__PURE__ */ u(J, {
1071
+ children: [/* @__PURE__ */ u(K, {
959
1072
  label: r,
960
1073
  active: t === null,
961
1074
  onClick: () => n(null)
962
- }), e.map((e) => /* @__PURE__ */ u(J, {
1075
+ }), e.map((e) => /* @__PURE__ */ u(K, {
963
1076
  label: e,
964
1077
  active: t === e,
965
1078
  onClick: () => n(e)
966
1079
  }, e))]
967
1080
  });
968
1081
  }
969
- 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 = {
970
1108
  text: "_text_dq0aw_1",
971
1109
  body: "_body_dq0aw_13",
972
1110
  display: "_display_dq0aw_17",
@@ -1003,17 +1141,17 @@ var Y = {
1003
1141
  clamp: "_clamp_dq0aw_156"
1004
1142
  };
1005
1143
  // src/components/Text/Text.tsx
1006
- function he({ 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 }) {
1007
1145
  let p = typeof s == "number" && s >= 1 ? Math.floor(s) : void 0, m = [
1008
- Y.text,
1009
- Y[t],
1010
- n && Y[`size-${n}`],
1011
- r && Y[`weight-${r}`],
1012
- i && Y.italic,
1013
- a && Y[`tone-${a}`],
1014
- o && Y[`align-${o}`],
1015
- s === !0 && Y.truncate,
1016
- 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,
1017
1155
  c
1018
1156
  ].filter(Boolean).join(" "), h = p === void 0 ? l : {
1019
1157
  ...l,
@@ -1026,61 +1164,87 @@ function he({ as: e = "p", variant: t = "body", size: n, weight: r, italic: i =
1026
1164
  children: d
1027
1165
  });
1028
1166
  }
1029
- var X = {
1030
- wrapper: "_wrapper_12bvz_1",
1031
- label: "_label_12bvz_7",
1032
- 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"
1033
1172
  };
1034
1173
  // src/components/TextArea/TextArea.tsx
1035
- function ge({ label: e, className: t, id: n, ...r }) {
1036
- 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;
1037
1176
  return /* @__PURE__ */ d("div", {
1038
- className: `${X.wrapper} ${t || ""}`,
1039
- children: [e && /* @__PURE__ */ u("label", {
1040
- className: X.label,
1041
- htmlFor: o,
1042
- children: e
1043
- }), /* @__PURE__ */ u("textarea", {
1044
- id: o,
1045
- className: X.textarea,
1046
- ...r
1047
- })]
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
+ ]
1048
1196
  });
1049
1197
  }
1050
- var Z = {
1051
- wrapper: "_wrapper_3ifhw_1",
1052
- label: "_label_3ifhw_7",
1053
- input: "_input_3ifhw_15",
1054
- error: "_error_3ifhw_37",
1055
- 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"
1056
1206
  };
1057
1207
  // src/components/TextInput/TextInput.tsx
1058
- function _e({ label: e, error: t, className: n, id: r, "aria-describedby": i, "aria-invalid": o, ...s }) {
1059
- 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;
1060
1214
  return /* @__PURE__ */ d("div", {
1061
- 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(" "),
1062
1221
  children: [
1063
1222
  e && /* @__PURE__ */ u("label", {
1064
- className: Z.label,
1065
- htmlFor: l,
1223
+ className: X.label,
1224
+ htmlFor: p,
1066
1225
  children: e
1067
1226
  }),
1068
1227
  /* @__PURE__ */ u("input", {
1069
- id: l,
1070
- className: Z.input,
1071
- "aria-describedby": p,
1072
- "aria-invalid": t ? !0 : o,
1073
- ...s
1228
+ id: p,
1229
+ className: X.input,
1230
+ "aria-describedby": g,
1231
+ "aria-invalid": n ? !0 : c,
1232
+ ...l
1074
1233
  }),
1075
1234
  t && /* @__PURE__ */ u("span", {
1076
- id: f,
1077
- className: Z.errorMessage,
1235
+ id: m,
1236
+ className: X.hint,
1078
1237
  children: t
1238
+ }),
1239
+ n && /* @__PURE__ */ u("span", {
1240
+ id: h,
1241
+ className: X.errorMessage,
1242
+ children: n
1079
1243
  })
1080
1244
  ]
1081
1245
  });
1082
1246
  }
1083
- var Q = {
1247
+ var Z = {
1084
1248
  container: "_container_m3x4i_1",
1085
1249
  toast: "_toast_m3x4i_14",
1086
1250
  slideIn: "_slideIn_m3x4i_1",
@@ -1098,16 +1262,16 @@ var Q = {
1098
1262
  progress: "_progress_m3x4i_153",
1099
1263
  toastInner: "_toastInner_m3x4i_181",
1100
1264
  toastBody: "_toastBody_m3x4i_187"
1101
- }, ve = 220, ye = {
1265
+ }, Q = 220, Ee = {
1102
1266
  success: "✓",
1103
1267
  error: "✕",
1104
1268
  warning: "⚠",
1105
1269
  info: "ℹ"
1106
1270
  }, $ = t({ addToast: () => {} });
1107
- function be() {
1271
+ function De() {
1108
1272
  return r($);
1109
1273
  }
1110
- function xe({ dismissLabel: e, children: t }) {
1274
+ function Oe({ dismissLabel: e, children: t }) {
1111
1275
  let [r, a] = c([]), l = s(0), f = s(/* @__PURE__ */ new Map());
1112
1276
  i(() => {
1113
1277
  let e = f.current;
@@ -1119,7 +1283,7 @@ function xe({ dismissLabel: e, children: t }) {
1119
1283
  isExiting: !0
1120
1284
  } : t)), setTimeout(() => {
1121
1285
  a((t) => t.filter((t) => t.id !== e));
1122
- }, ve);
1286
+ }, Q);
1123
1287
  }, []), m = n((e, t = "success", n = 4e3) => {
1124
1288
  let r = String(l.current++);
1125
1289
  a((i) => [...i, {
@@ -1132,44 +1296,44 @@ function xe({ dismissLabel: e, children: t }) {
1132
1296
  }, [p]), h = o(() => ({ addToast: m }), [m]);
1133
1297
  return /* @__PURE__ */ d($.Provider, {
1134
1298
  value: h,
1135
- children: [t, /* @__PURE__ */ u(Se, {
1299
+ children: [t, /* @__PURE__ */ u(ke, {
1136
1300
  toasts: r,
1137
1301
  onDismiss: p,
1138
1302
  dismissLabel: e
1139
1303
  })]
1140
1304
  });
1141
1305
  }
1142
- function Se({ toasts: e, onDismiss: t, dismissLabel: n }) {
1306
+ function ke({ toasts: e, onDismiss: t, dismissLabel: n }) {
1143
1307
  return /* @__PURE__ */ u("div", {
1144
- className: Q.container,
1308
+ className: Z.container,
1145
1309
  role: "status",
1146
1310
  "aria-atomic": "false",
1147
1311
  children: e.map((e) => /* @__PURE__ */ d("div", {
1148
- className: `${Q.toast} ${Q[e.variant]} ${e.isExiting ? Q.exiting : ""}`,
1312
+ className: `${Z.toast} ${Z[e.variant]} ${e.isExiting ? Z.exiting : ""}`,
1149
1313
  children: [
1150
1314
  /* @__PURE__ */ u("div", {
1151
- className: Q.toastInner,
1315
+ className: Z.toastInner,
1152
1316
  children: /* @__PURE__ */ d("div", {
1153
- className: Q.toastBody,
1317
+ className: Z.toastBody,
1154
1318
  children: [/* @__PURE__ */ u("span", {
1155
- className: Q.icon,
1319
+ className: Z.icon,
1156
1320
  "aria-hidden": "true",
1157
- children: ye[e.variant]
1321
+ children: Ee[e.variant]
1158
1322
  }), /* @__PURE__ */ u("span", {
1159
- className: Q.message,
1323
+ className: Z.message,
1160
1324
  children: e.message
1161
1325
  })]
1162
1326
  })
1163
1327
  }),
1164
1328
  /* @__PURE__ */ u("button", {
1165
1329
  type: "button",
1166
- className: Q.close,
1330
+ className: Z.close,
1167
1331
  onClick: () => t(e.id),
1168
1332
  "aria-label": n,
1169
1333
  children: "×"
1170
1334
  }),
1171
1335
  /* @__PURE__ */ u("div", {
1172
- className: Q.progress,
1336
+ className: Z.progress,
1173
1337
  style: { animationDuration: `${e.duration}ms` }
1174
1338
  })
1175
1339
  ]
@@ -1177,7 +1341,7 @@ function Se({ toasts: e, onDismiss: t, dismissLabel: n }) {
1177
1341
  });
1178
1342
  }
1179
1343
  // src/hooks/useDragReorder.ts
1180
- function Ce(e, t) {
1344
+ function Ae(e, t) {
1181
1345
  let [n, r] = c(null), [i, a] = c(null), o = () => {
1182
1346
  r(null), a(null);
1183
1347
  }, s = (n, r) => {
@@ -1206,15 +1370,15 @@ function Ce(e, t) {
1206
1370
  };
1207
1371
  }
1208
1372
  // src/hooks/useRotatingMessage.ts
1209
- var we = 300;
1210
- function Te(e, t = 1e4, n = !1) {
1373
+ var je = 300;
1374
+ function Me(e, t = 1e4, n = !1) {
1211
1375
  let [r, a] = c(0), [o, s] = c(!1);
1212
1376
  return i(() => {
1213
1377
  if (e.length <= 1 || n) return;
1214
1378
  let r, i = setInterval(() => {
1215
1379
  s(!0), r = setTimeout(() => {
1216
1380
  r = void 0, a((t) => (t + 1) % e.length), s(!1);
1217
- }, we);
1381
+ }, je);
1218
1382
  }, t);
1219
1383
  return () => {
1220
1384
  clearInterval(i), r !== void 0 && (clearTimeout(r), s(!1));
@@ -1228,4 +1392,4 @@ function Te(e, t = 1e4, n = !1) {
1228
1392
  isFading: o
1229
1393
  };
1230
1394
  }
1231
- export { h as Button, v as Card, b as Checkbox, S as Container, ee as ICON_NAMES, te as Icon, A as MATRIX_CONFIG, oe as MATRIX_PRESETS, se as MATRIX_THEME_CONFIG, D as Markdown, ae as MarkdownEditor, M as MatrixContainer, N as ORBITAL_DOTS_CONFIG, F as OrbitalDots, ce as PageHero, B as PageTransition, L as Section, H as Select, W as ShimmerImage, fe as SideNav, J as Tag, me as TagFilter, he as Text, ge as TextArea, _e as TextInput, xe as ToastProvider, Ce as useDragReorder, Te as useRotatingMessage, be 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 };