@octavius2929-personal/design-system 0.8.1 → 0.10.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
@@ -23,6 +23,9 @@ function useToggle(initial = false) {
23
23
  return [on, toggle, setOn];
24
24
  }
25
25
 
26
+ // src/components/container/index.tsx
27
+ import { forwardRef } from "react";
28
+
26
29
  // src/theme/styles/sprinkles/index.css.ts
27
30
  import { createSprinkles as _ad221 } from "@vanilla-extract/sprinkles/createRuntimeSprinkles";
28
31
  var sprinkles = _ad221({ conditions: void 0, styles: { p: { mappings: ["padding"] }, px: { mappings: ["paddingLeft", "paddingRight"] }, py: { mappings: ["paddingTop", "paddingBottom"] }, pt: { mappings: ["paddingTop"] }, pr: { mappings: ["paddingRight"] }, pb: { mappings: ["paddingBottom"] }, pl: { mappings: ["paddingLeft"] }, m: { mappings: ["marginTop", "marginRight", "marginBottom", "marginLeft"] }, mx: { mappings: ["marginLeft", "marginRight"] }, my: { mappings: ["marginTop", "marginBottom"] }, mt: { mappings: ["marginTop"] }, mr: { mappings: ["marginRight"] }, mb: { mappings: ["marginBottom"] }, ml: { mappings: ["marginLeft"] }, bg: { mappings: ["background"] }, radius: { mappings: ["borderRadius"] }, padding: { values: { s0: { defaultClass: "sprinkles_padding_s0__qhecrd0" }, s1: { defaultClass: "sprinkles_padding_s1__qhecrd1" }, s2: { defaultClass: "sprinkles_padding_s2__qhecrd2" }, s3: { defaultClass: "sprinkles_padding_s3__qhecrd3" }, s4: { defaultClass: "sprinkles_padding_s4__qhecrd4" }, s5: { defaultClass: "sprinkles_padding_s5__qhecrd5" }, s6: { defaultClass: "sprinkles_padding_s6__qhecrd6" }, s7: { defaultClass: "sprinkles_padding_s7__qhecrd7" }, s8: { defaultClass: "sprinkles_padding_s8__qhecrd8" }, s9: { defaultClass: "sprinkles_padding_s9__qhecrd9" } } }, paddingTop: { values: { s0: { defaultClass: "sprinkles_paddingTop_s0__qhecrda" }, s1: { defaultClass: "sprinkles_paddingTop_s1__qhecrdb" }, s2: { defaultClass: "sprinkles_paddingTop_s2__qhecrdc" }, s3: { defaultClass: "sprinkles_paddingTop_s3__qhecrdd" }, s4: { defaultClass: "sprinkles_paddingTop_s4__qhecrde" }, s5: { defaultClass: "sprinkles_paddingTop_s5__qhecrdf" }, s6: { defaultClass: "sprinkles_paddingTop_s6__qhecrdg" }, s7: { defaultClass: "sprinkles_paddingTop_s7__qhecrdh" }, s8: { defaultClass: "sprinkles_paddingTop_s8__qhecrdi" }, s9: { defaultClass: "sprinkles_paddingTop_s9__qhecrdj" } } }, paddingRight: { values: { s0: { defaultClass: "sprinkles_paddingRight_s0__qhecrdk" }, s1: { defaultClass: "sprinkles_paddingRight_s1__qhecrdl" }, s2: { defaultClass: "sprinkles_paddingRight_s2__qhecrdm" }, s3: { defaultClass: "sprinkles_paddingRight_s3__qhecrdn" }, s4: { defaultClass: "sprinkles_paddingRight_s4__qhecrdo" }, s5: { defaultClass: "sprinkles_paddingRight_s5__qhecrdp" }, s6: { defaultClass: "sprinkles_paddingRight_s6__qhecrdq" }, s7: { defaultClass: "sprinkles_paddingRight_s7__qhecrdr" }, s8: { defaultClass: "sprinkles_paddingRight_s8__qhecrds" }, s9: { defaultClass: "sprinkles_paddingRight_s9__qhecrdt" } } }, paddingBottom: { values: { s0: { defaultClass: "sprinkles_paddingBottom_s0__qhecrdu" }, s1: { defaultClass: "sprinkles_paddingBottom_s1__qhecrdv" }, s2: { defaultClass: "sprinkles_paddingBottom_s2__qhecrdw" }, s3: { defaultClass: "sprinkles_paddingBottom_s3__qhecrdx" }, s4: { defaultClass: "sprinkles_paddingBottom_s4__qhecrdy" }, s5: { defaultClass: "sprinkles_paddingBottom_s5__qhecrdz" }, s6: { defaultClass: "sprinkles_paddingBottom_s6__qhecrd10" }, s7: { defaultClass: "sprinkles_paddingBottom_s7__qhecrd11" }, s8: { defaultClass: "sprinkles_paddingBottom_s8__qhecrd12" }, s9: { defaultClass: "sprinkles_paddingBottom_s9__qhecrd13" } } }, paddingLeft: { values: { s0: { defaultClass: "sprinkles_paddingLeft_s0__qhecrd14" }, s1: { defaultClass: "sprinkles_paddingLeft_s1__qhecrd15" }, s2: { defaultClass: "sprinkles_paddingLeft_s2__qhecrd16" }, s3: { defaultClass: "sprinkles_paddingLeft_s3__qhecrd17" }, s4: { defaultClass: "sprinkles_paddingLeft_s4__qhecrd18" }, s5: { defaultClass: "sprinkles_paddingLeft_s5__qhecrd19" }, s6: { defaultClass: "sprinkles_paddingLeft_s6__qhecrd1a" }, s7: { defaultClass: "sprinkles_paddingLeft_s7__qhecrd1b" }, s8: { defaultClass: "sprinkles_paddingLeft_s8__qhecrd1c" }, s9: { defaultClass: "sprinkles_paddingLeft_s9__qhecrd1d" } } }, marginTop: { values: { s0: { defaultClass: "sprinkles_marginTop_s0__qhecrd1e" }, s1: { defaultClass: "sprinkles_marginTop_s1__qhecrd1f" }, s2: { defaultClass: "sprinkles_marginTop_s2__qhecrd1g" }, s3: { defaultClass: "sprinkles_marginTop_s3__qhecrd1h" }, s4: { defaultClass: "sprinkles_marginTop_s4__qhecrd1i" }, s5: { defaultClass: "sprinkles_marginTop_s5__qhecrd1j" }, s6: { defaultClass: "sprinkles_marginTop_s6__qhecrd1k" }, s7: { defaultClass: "sprinkles_marginTop_s7__qhecrd1l" }, s8: { defaultClass: "sprinkles_marginTop_s8__qhecrd1m" }, s9: { defaultClass: "sprinkles_marginTop_s9__qhecrd1n" } } }, marginRight: { values: { s0: { defaultClass: "sprinkles_marginRight_s0__qhecrd1o" }, s1: { defaultClass: "sprinkles_marginRight_s1__qhecrd1p" }, s2: { defaultClass: "sprinkles_marginRight_s2__qhecrd1q" }, s3: { defaultClass: "sprinkles_marginRight_s3__qhecrd1r" }, s4: { defaultClass: "sprinkles_marginRight_s4__qhecrd1s" }, s5: { defaultClass: "sprinkles_marginRight_s5__qhecrd1t" }, s6: { defaultClass: "sprinkles_marginRight_s6__qhecrd1u" }, s7: { defaultClass: "sprinkles_marginRight_s7__qhecrd1v" }, s8: { defaultClass: "sprinkles_marginRight_s8__qhecrd1w" }, s9: { defaultClass: "sprinkles_marginRight_s9__qhecrd1x" } } }, marginBottom: { values: { s0: { defaultClass: "sprinkles_marginBottom_s0__qhecrd1y" }, s1: { defaultClass: "sprinkles_marginBottom_s1__qhecrd1z" }, s2: { defaultClass: "sprinkles_marginBottom_s2__qhecrd20" }, s3: { defaultClass: "sprinkles_marginBottom_s3__qhecrd21" }, s4: { defaultClass: "sprinkles_marginBottom_s4__qhecrd22" }, s5: { defaultClass: "sprinkles_marginBottom_s5__qhecrd23" }, s6: { defaultClass: "sprinkles_marginBottom_s6__qhecrd24" }, s7: { defaultClass: "sprinkles_marginBottom_s7__qhecrd25" }, s8: { defaultClass: "sprinkles_marginBottom_s8__qhecrd26" }, s9: { defaultClass: "sprinkles_marginBottom_s9__qhecrd27" } } }, marginLeft: { values: { s0: { defaultClass: "sprinkles_marginLeft_s0__qhecrd28" }, s1: { defaultClass: "sprinkles_marginLeft_s1__qhecrd29" }, s2: { defaultClass: "sprinkles_marginLeft_s2__qhecrd2a" }, s3: { defaultClass: "sprinkles_marginLeft_s3__qhecrd2b" }, s4: { defaultClass: "sprinkles_marginLeft_s4__qhecrd2c" }, s5: { defaultClass: "sprinkles_marginLeft_s5__qhecrd2d" }, s6: { defaultClass: "sprinkles_marginLeft_s6__qhecrd2e" }, s7: { defaultClass: "sprinkles_marginLeft_s7__qhecrd2f" }, s8: { defaultClass: "sprinkles_marginLeft_s8__qhecrd2g" }, s9: { defaultClass: "sprinkles_marginLeft_s9__qhecrd2h" } } }, gap: { values: { s0: { defaultClass: "sprinkles_gap_s0__qhecrd2i" }, s1: { defaultClass: "sprinkles_gap_s1__qhecrd2j" }, s2: { defaultClass: "sprinkles_gap_s2__qhecrd2k" }, s3: { defaultClass: "sprinkles_gap_s3__qhecrd2l" }, s4: { defaultClass: "sprinkles_gap_s4__qhecrd2m" }, s5: { defaultClass: "sprinkles_gap_s5__qhecrd2n" }, s6: { defaultClass: "sprinkles_gap_s6__qhecrd2o" }, s7: { defaultClass: "sprinkles_gap_s7__qhecrd2p" }, s8: { defaultClass: "sprinkles_gap_s8__qhecrd2q" }, s9: { defaultClass: "sprinkles_gap_s9__qhecrd2r" } } }, rowGap: { values: { s0: { defaultClass: "sprinkles_rowGap_s0__qhecrd2s" }, s1: { defaultClass: "sprinkles_rowGap_s1__qhecrd2t" }, s2: { defaultClass: "sprinkles_rowGap_s2__qhecrd2u" }, s3: { defaultClass: "sprinkles_rowGap_s3__qhecrd2v" }, s4: { defaultClass: "sprinkles_rowGap_s4__qhecrd2w" }, s5: { defaultClass: "sprinkles_rowGap_s5__qhecrd2x" }, s6: { defaultClass: "sprinkles_rowGap_s6__qhecrd2y" }, s7: { defaultClass: "sprinkles_rowGap_s7__qhecrd2z" }, s8: { defaultClass: "sprinkles_rowGap_s8__qhecrd30" }, s9: { defaultClass: "sprinkles_rowGap_s9__qhecrd31" } } }, columnGap: { values: { s0: { defaultClass: "sprinkles_columnGap_s0__qhecrd32" }, s1: { defaultClass: "sprinkles_columnGap_s1__qhecrd33" }, s2: { defaultClass: "sprinkles_columnGap_s2__qhecrd34" }, s3: { defaultClass: "sprinkles_columnGap_s3__qhecrd35" }, s4: { defaultClass: "sprinkles_columnGap_s4__qhecrd36" }, s5: { defaultClass: "sprinkles_columnGap_s5__qhecrd37" }, s6: { defaultClass: "sprinkles_columnGap_s6__qhecrd38" }, s7: { defaultClass: "sprinkles_columnGap_s7__qhecrd39" }, s8: { defaultClass: "sprinkles_columnGap_s8__qhecrd3a" }, s9: { defaultClass: "sprinkles_columnGap_s9__qhecrd3b" } } }, background: { values: { bg1: { defaultClass: "sprinkles_background_bg1__qhecrd3c" }, bg2: { defaultClass: "sprinkles_background_bg2__qhecrd3d" }, bg3: { defaultClass: "sprinkles_background_bg3__qhecrd3e" }, bgInset: { defaultClass: "sprinkles_background_bgInset__qhecrd3f" }, fg1: { defaultClass: "sprinkles_background_fg1__qhecrd3g" }, fg2: { defaultClass: "sprinkles_background_fg2__qhecrd3h" }, fg3: { defaultClass: "sprinkles_background_fg3__qhecrd3i" }, fgOnAccent: { defaultClass: "sprinkles_background_fgOnAccent__qhecrd3j" }, border1: { defaultClass: "sprinkles_background_border1__qhecrd3k" }, border2: { defaultClass: "sprinkles_background_border2__qhecrd3l" }, borderStrong: { defaultClass: "sprinkles_background_borderStrong__qhecrd3m" }, accent: { defaultClass: "sprinkles_background_accent__qhecrd3n" }, accentHover: { defaultClass: "sprinkles_background_accentHover__qhecrd3o" }, accentSoft: { defaultClass: "sprinkles_background_accentSoft__qhecrd3p" }, ok: { defaultClass: "sprinkles_background_ok__qhecrd3q" }, warn: { defaultClass: "sprinkles_background_warn__qhecrd3r" }, danger: { defaultClass: "sprinkles_background_danger__qhecrd3s" }, info: { defaultClass: "sprinkles_background_info__qhecrd3t" }, focus: { defaultClass: "sprinkles_background_focus__qhecrd3u" }, scrim: { defaultClass: "sprinkles_background_scrim__qhecrd3v" } } }, color: { values: { bg1: { defaultClass: "sprinkles_color_bg1__qhecrd3w" }, bg2: { defaultClass: "sprinkles_color_bg2__qhecrd3x" }, bg3: { defaultClass: "sprinkles_color_bg3__qhecrd3y" }, bgInset: { defaultClass: "sprinkles_color_bgInset__qhecrd3z" }, fg1: { defaultClass: "sprinkles_color_fg1__qhecrd40" }, fg2: { defaultClass: "sprinkles_color_fg2__qhecrd41" }, fg3: { defaultClass: "sprinkles_color_fg3__qhecrd42" }, fgOnAccent: { defaultClass: "sprinkles_color_fgOnAccent__qhecrd43" }, border1: { defaultClass: "sprinkles_color_border1__qhecrd44" }, border2: { defaultClass: "sprinkles_color_border2__qhecrd45" }, borderStrong: { defaultClass: "sprinkles_color_borderStrong__qhecrd46" }, accent: { defaultClass: "sprinkles_color_accent__qhecrd47" }, accentHover: { defaultClass: "sprinkles_color_accentHover__qhecrd48" }, accentSoft: { defaultClass: "sprinkles_color_accentSoft__qhecrd49" }, ok: { defaultClass: "sprinkles_color_ok__qhecrd4a" }, warn: { defaultClass: "sprinkles_color_warn__qhecrd4b" }, danger: { defaultClass: "sprinkles_color_danger__qhecrd4c" }, info: { defaultClass: "sprinkles_color_info__qhecrd4d" }, focus: { defaultClass: "sprinkles_color_focus__qhecrd4e" }, scrim: { defaultClass: "sprinkles_color_scrim__qhecrd4f" } } }, borderRadius: { values: { none: { defaultClass: "sprinkles_borderRadius_none__qhecrd4g" }, sm: { defaultClass: "sprinkles_borderRadius_sm__qhecrd4h" }, md: { defaultClass: "sprinkles_borderRadius_md__qhecrd4i" }, lg: { defaultClass: "sprinkles_borderRadius_lg__qhecrd4j" }, base: { defaultClass: "sprinkles_borderRadius_base__qhecrd4k" }, full: { defaultClass: "sprinkles_borderRadius_full__qhecrd4l" } } }, display: { values: { block: { defaultClass: "sprinkles_display_block__qhecrd4m" }, "inline-block": { defaultClass: "sprinkles_display_inline-block__qhecrd4n" }, flex: { defaultClass: "sprinkles_display_flex__qhecrd4o" }, "inline-flex": { defaultClass: "sprinkles_display_inline-flex__qhecrd4p" }, grid: { defaultClass: "sprinkles_display_grid__qhecrd4q" }, none: { defaultClass: "sprinkles_display_none__qhecrd4r" } } }, flexDirection: { values: { row: { defaultClass: "sprinkles_flexDirection_row__qhecrd4s" }, column: { defaultClass: "sprinkles_flexDirection_column__qhecrd4t" }, "row-reverse": { defaultClass: "sprinkles_flexDirection_row-reverse__qhecrd4u" }, "column-reverse": { defaultClass: "sprinkles_flexDirection_column-reverse__qhecrd4v" } } }, alignItems: { values: { "flex-start": { defaultClass: "sprinkles_alignItems_flex-start__qhecrd4w" }, center: { defaultClass: "sprinkles_alignItems_center__qhecrd4x" }, "flex-end": { defaultClass: "sprinkles_alignItems_flex-end__qhecrd4y" }, stretch: { defaultClass: "sprinkles_alignItems_stretch__qhecrd4z" }, baseline: { defaultClass: "sprinkles_alignItems_baseline__qhecrd50" } } }, justifyContent: { values: { "flex-start": { defaultClass: "sprinkles_justifyContent_flex-start__qhecrd51" }, center: { defaultClass: "sprinkles_justifyContent_center__qhecrd52" }, "flex-end": { defaultClass: "sprinkles_justifyContent_flex-end__qhecrd53" }, "space-between": { defaultClass: "sprinkles_justifyContent_space-between__qhecrd54" }, "space-around": { defaultClass: "sprinkles_justifyContent_space-around__qhecrd55" }, "space-evenly": { defaultClass: "sprinkles_justifyContent_space-evenly__qhecrd56" } } }, flexWrap: { values: { nowrap: { defaultClass: "sprinkles_flexWrap_nowrap__qhecrd57" }, wrap: { defaultClass: "sprinkles_flexWrap_wrap__qhecrd58" } } } } });
@@ -44,11 +47,17 @@ function useStyles(props) {
44
47
 
45
48
  // src/components/container/index.tsx
46
49
  import { jsx } from "react/jsx-runtime";
47
- function Container({ as, ...props }) {
50
+ function ContainerImpl({ as, ...props }, ref) {
48
51
  const Component = as ?? "div";
49
52
  const { className, rest } = useStyles(props);
50
- return /* @__PURE__ */ jsx(Component, { ...rest, className });
53
+ return /* @__PURE__ */ jsx(Component, { ref, ...rest, className });
51
54
  }
55
+ var ContainerForwarded = forwardRef(ContainerImpl);
56
+ ContainerForwarded.displayName = "Container";
57
+ var Container = ContainerForwarded;
58
+
59
+ // src/components/typography/index.tsx
60
+ import { forwardRef as forwardRef2 } from "react";
52
61
 
53
62
  // src/components/typography/use-styles.ts
54
63
  import { useMemo as useMemo2 } from "react";
@@ -188,17 +197,19 @@ var defaultElement = {
188
197
  code: "code",
189
198
  blackletter: "span"
190
199
  };
191
- function Typography({
192
- variant: variant2,
193
- as,
194
- color: color2,
195
- align: align2,
196
- ...rest
197
- }) {
200
+ function TypographyInner({ variant: variant2, as, color: color2, align: align2, ...rest }, ref) {
198
201
  const Component = as ?? defaultElement[variant2];
199
202
  const { text: text2 } = useStyles2({ variant: variant2, color: color2, align: align2 });
200
- return /* @__PURE__ */ jsx3(Component, { ...rest, className: text2 });
203
+ return /* @__PURE__ */ jsx3(Component, { ref, ...rest, className: text2 });
201
204
  }
205
+ var TypographyForwarded = forwardRef2(
206
+ TypographyInner
207
+ );
208
+ TypographyForwarded.displayName = "Typography";
209
+ var Typography = TypographyForwarded;
210
+
211
+ // src/components/button/index.tsx
212
+ import { forwardRef as forwardRef3 } from "react";
202
213
 
203
214
  // src/components/button/use-styles.ts
204
215
  import { useMemo as useMemo3 } from "react";
@@ -238,7 +249,7 @@ function useStyles3({
238
249
  // src/components/button/index.tsx
239
250
  import { jsx as jsx4, jsxs } from "react/jsx-runtime";
240
251
  var ICON_SIZE = { sm: 14, md: 16, lg: 18 };
241
- function Button({
252
+ var Button = forwardRef3(function Button2({
242
253
  variant: variant2,
243
254
  tone: tone4,
244
255
  size: size3 = "md",
@@ -246,17 +257,21 @@ function Button({
246
257
  endIcon: EndIcon,
247
258
  full: full2,
248
259
  className,
260
+ type = "button",
249
261
  children,
250
262
  ...rest
251
- }) {
263
+ }, ref) {
252
264
  const { container } = useStyles3({ variant: variant2, tone: tone4, size: size3, full: full2, className });
253
265
  const iconSize = ICON_SIZE[size3];
254
- return /* @__PURE__ */ jsxs("button", { className: container, ...rest, children: [
266
+ return /* @__PURE__ */ jsxs("button", { ref, type, className: container, ...rest, children: [
255
267
  StartIcon && /* @__PURE__ */ jsx4(StartIcon, { size: iconSize }),
256
268
  children,
257
269
  EndIcon && /* @__PURE__ */ jsx4(EndIcon, { size: iconSize })
258
270
  ] });
259
- }
271
+ });
272
+
273
+ // src/components/divider/index.tsx
274
+ import { forwardRef as forwardRef4 } from "react";
260
275
 
261
276
  // src/components/divider/use-styles.ts
262
277
  import { useMemo as useMemo4 } from "react";
@@ -285,18 +300,21 @@ function useStyles4({ vertical: vertical2, hasLabel }) {
285
300
 
286
301
  // src/components/divider/index.tsx
287
302
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
288
- function Divider({ vertical: vertical2, label: label7, ...rest }) {
303
+ var Divider = forwardRef4(function Divider2({ vertical: vertical2, label: label7, ...rest }, ref) {
289
304
  const hasLabel = label7 != null;
290
305
  const { root: root24, line: line2, label: labelClass } = useStyles4({ vertical: vertical2, hasLabel });
291
306
  if (hasLabel) {
292
- return /* @__PURE__ */ jsxs2("div", { role: "separator", className: root24, ...rest, children: [
307
+ return /* @__PURE__ */ jsxs2("div", { ref, role: "separator", className: root24, ...rest, children: [
293
308
  /* @__PURE__ */ jsx5("span", { className: line2 }),
294
309
  /* @__PURE__ */ jsx5("span", { className: labelClass, children: label7 }),
295
310
  /* @__PURE__ */ jsx5("span", { className: line2 })
296
311
  ] });
297
312
  }
298
- return /* @__PURE__ */ jsx5("div", { role: "separator", className: root24, ...rest });
299
- }
313
+ return /* @__PURE__ */ jsx5("div", { ref, role: "separator", className: root24, ...rest });
314
+ });
315
+
316
+ // src/components/avatar/index.tsx
317
+ import { forwardRef as forwardRef5 } from "react";
300
318
 
301
319
  // src/components/avatar/use-styles.ts
302
320
  import { useMemo as useMemo5 } from "react";
@@ -328,10 +346,13 @@ function useStyles5({
328
346
 
329
347
  // src/components/avatar/index.tsx
330
348
  import { jsx as jsx6 } from "react/jsx-runtime";
331
- function Avatar({ size: size3, filled, className, children, ...rest }) {
349
+ var Avatar = forwardRef5(function Avatar2({ size: size3, filled, className, children, ...rest }, ref) {
332
350
  const { root: root24 } = useStyles5({ size: size3, filled, className });
333
- return /* @__PURE__ */ jsx6("span", { className: root24, ...rest, children });
334
- }
351
+ return /* @__PURE__ */ jsx6("span", { ref, className: root24, ...rest, children });
352
+ });
353
+
354
+ // src/components/badge/index.tsx
355
+ import { forwardRef as forwardRef6 } from "react";
335
356
 
336
357
  // src/components/badge/use-styles.ts
337
358
  import { useMemo as useMemo6 } from "react";
@@ -357,13 +378,16 @@ function useStyles6({
357
378
 
358
379
  // src/components/badge/index.tsx
359
380
  import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
360
- function Badge({ count, tone: tone4, className, children, ...rest }) {
381
+ var Badge = forwardRef6(function Badge2({ count, tone: tone4, className, children, ...rest }, ref) {
361
382
  const { root: root24, dot: dot3 } = useStyles6({ tone: tone4, className });
362
- return /* @__PURE__ */ jsxs3("span", { className: root24, ...rest, children: [
383
+ return /* @__PURE__ */ jsxs3("span", { ref, className: root24, ...rest, children: [
363
384
  children,
364
385
  count != null && /* @__PURE__ */ jsx7("span", { className: dot3, children: count })
365
386
  ] });
366
- }
387
+ });
388
+
389
+ // src/components/progress/index.tsx
390
+ import { forwardRef as forwardRef7 } from "react";
367
391
 
368
392
  // src/components/progress/use-styles.ts
369
393
  import { useMemo as useMemo7 } from "react";
@@ -397,19 +421,14 @@ function useStyles7({
397
421
 
398
422
  // src/components/progress/index.tsx
399
423
  import { jsx as jsx8 } from "react/jsx-runtime";
400
- function Progress({
401
- variant: variant2 = "linear",
402
- value,
403
- size: size3 = 20,
404
- className,
405
- ...rest
406
- }) {
424
+ var Progress = forwardRef7(function Progress2({ variant: variant2 = "linear", value, size: size3 = 20, className, ...rest }, ref) {
407
425
  const { track: track4, bar: bar2, spinner: spinner2 } = useStyles7({ variant: variant2, value, className });
408
426
  const indeterminate2 = value === void 0;
409
427
  if (variant2 === "circular") {
410
428
  return /* @__PURE__ */ jsx8(
411
429
  "span",
412
430
  {
431
+ ref,
413
432
  className: spinner2,
414
433
  role: "progressbar",
415
434
  "aria-valuenow": indeterminate2 ? void 0 : value,
@@ -423,6 +442,7 @@ function Progress({
423
442
  return /* @__PURE__ */ jsx8(
424
443
  "div",
425
444
  {
445
+ ref,
426
446
  className: track4,
427
447
  role: "progressbar",
428
448
  "aria-valuenow": indeterminate2 ? void 0 : value,
@@ -432,7 +452,10 @@ function Progress({
432
452
  children: /* @__PURE__ */ jsx8("div", { className: bar2, style: indeterminate2 ? void 0 : { width: `${value}%` } })
433
453
  }
434
454
  );
435
- }
455
+ });
456
+
457
+ // src/components/chip/index.tsx
458
+ import { forwardRef as forwardRef8 } from "react";
436
459
 
437
460
  // src/components/icons/x/index.tsx
438
461
  import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -490,18 +513,21 @@ function useStyles8({
490
513
 
491
514
  // src/components/chip/index.tsx
492
515
  import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
493
- function Chip({ selected: selected3, tone: tone4, onDelete, onClick, children, ...rest }) {
516
+ var Chip = forwardRef8(function Chip2({ selected: selected3, tone: tone4, onDelete, onClick, children, ...rest }, ref) {
494
517
  const clickable2 = Boolean(onClick);
495
518
  const { root: root24, deleteBtn: deleteBtn2 } = useStyles8({ selected: selected3, tone: tone4, clickable: clickable2 });
496
519
  const handleDelete = (event) => {
497
520
  event.stopPropagation();
498
521
  onDelete?.();
499
522
  };
500
- return /* @__PURE__ */ jsxs5("span", { className: root24, onClick, ...rest, children: [
523
+ return /* @__PURE__ */ jsxs5("span", { ref, className: root24, onClick, ...rest, children: [
501
524
  children,
502
525
  onDelete && /* @__PURE__ */ jsx10("button", { type: "button", className: deleteBtn2, "aria-label": "Remove", onClick: handleDelete, children: /* @__PURE__ */ jsx10(XIcon, { size: 13 }) })
503
526
  ] });
504
- }
527
+ });
528
+
529
+ // src/components/checkbox/index.tsx
530
+ import { forwardRef as forwardRef9 } from "react";
505
531
 
506
532
  // src/components/icons/check/index.tsx
507
533
  import { jsx as jsx11 } from "react/jsx-runtime";
@@ -552,13 +578,7 @@ function useStyles9({ checked, disabled: disabled3 }) {
552
578
 
553
579
  // src/components/checkbox/index.tsx
554
580
  import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
555
- function Checkbox({
556
- checked = false,
557
- onChange,
558
- label: label7,
559
- disabled: disabled3 = false,
560
- id
561
- }) {
581
+ var Checkbox = forwardRef9(function Checkbox2({ checked = false, onChange, label: label7, disabled: disabled3 = false, id, ...rest }, ref) {
562
582
  const { root: root24, input: input6, box: box2, check: check2 } = useStyles9({ checked, disabled: disabled3 });
563
583
  const handleChange = (e) => {
564
584
  if (disabled3) return;
@@ -568,18 +588,23 @@ function Checkbox({
568
588
  /* @__PURE__ */ jsx12(
569
589
  "input",
570
590
  {
591
+ ref,
571
592
  type: "checkbox",
572
593
  className: input6,
573
594
  id,
574
595
  checked,
575
596
  disabled: disabled3,
576
- onChange: handleChange
597
+ onChange: handleChange,
598
+ ...rest
577
599
  }
578
600
  ),
579
601
  /* @__PURE__ */ jsx12("span", { className: box2, children: checked && /* @__PURE__ */ jsx12(CheckIcon, { size: 12, className: check2 }) }),
580
602
  label7
581
603
  ] });
582
- }
604
+ });
605
+
606
+ // src/components/radio/index.tsx
607
+ import { forwardRef as forwardRef10 } from "react";
583
608
 
584
609
  // src/components/radio/use-styles.ts
585
610
  import { useMemo as useMemo10 } from "react";
@@ -613,25 +638,30 @@ function useStyles10({
613
638
 
614
639
  // src/components/radio/index.tsx
615
640
  import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
616
- function Radio({ checked, onChange, label: label7, name, value, disabled: disabled3 }) {
641
+ var Radio = forwardRef10(function Radio2({ checked, onChange, label: label7, name, value, disabled: disabled3, ...rest }, ref) {
617
642
  const { root: root24, input: input6, circle: circle2, dot: dot3, label: labelClass } = useStyles10({ disabled: disabled3 });
618
643
  return /* @__PURE__ */ jsxs7("label", { className: root24, children: [
619
644
  /* @__PURE__ */ jsx13(
620
645
  "input",
621
646
  {
647
+ ref,
622
648
  className: input6,
623
649
  type: "radio",
624
650
  name,
625
651
  value,
626
652
  checked,
627
653
  disabled: disabled3,
628
- onChange
654
+ onChange,
655
+ ...rest
629
656
  }
630
657
  ),
631
658
  /* @__PURE__ */ jsx13("span", { className: circle2, children: checked && /* @__PURE__ */ jsx13("span", { className: dot3 }) }),
632
659
  label7 != null && /* @__PURE__ */ jsx13("span", { className: labelClass, children: label7 })
633
660
  ] });
634
- }
661
+ });
662
+
663
+ // src/components/switch/index.tsx
664
+ import { forwardRef as forwardRef11 } from "react";
635
665
 
636
666
  // src/components/switch/use-styles.ts
637
667
  import { useMemo as useMemo11 } from "react";
@@ -662,12 +692,13 @@ function useStyles11({ checked }) {
662
692
 
663
693
  // src/components/switch/index.tsx
664
694
  import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
665
- function Switch({ checked = false, onChange, label: label7, disabled: disabled3 }) {
695
+ var Switch = forwardRef11(function Switch2({ checked = false, onChange, label: label7, disabled: disabled3, ...rest }, ref) {
666
696
  const { root: root24, input: input6, track: track4, knob: knob2, label: labelClass } = useStyles11({ checked });
667
697
  return /* @__PURE__ */ jsxs8("label", { className: root24, children: [
668
698
  /* @__PURE__ */ jsx14(
669
699
  "input",
670
700
  {
701
+ ref,
671
702
  type: "checkbox",
672
703
  role: "switch",
673
704
  "aria-checked": checked,
@@ -677,16 +708,20 @@ function Switch({ checked = false, onChange, label: label7, disabled: disabled3
677
708
  onChange: (event) => {
678
709
  if (disabled3) return;
679
710
  onChange?.(event.target.checked);
680
- }
711
+ },
712
+ ...rest
681
713
  }
682
714
  ),
683
715
  /* @__PURE__ */ jsx14("span", { className: track4, children: /* @__PURE__ */ jsx14("span", { className: knob2 }) }),
684
716
  label7 != null && /* @__PURE__ */ jsx14("span", { className: labelClass, children: label7 })
685
717
  ] });
686
- }
718
+ });
719
+
720
+ // src/components/text-field/index.tsx
721
+ import { forwardRef as forwardRef13 } from "react";
687
722
 
688
723
  // src/components/base-field/index.tsx
689
- import { useId } from "react";
724
+ import { forwardRef as forwardRef12, useId } from "react";
690
725
 
691
726
  // src/components/base-field/use-styles.ts
692
727
  import { useMemo as useMemo12 } from "react";
@@ -733,21 +768,15 @@ function useStyles12({ error, hasStartIcon, hasTrailing, className }) {
733
768
 
734
769
  // src/components/base-field/index.tsx
735
770
  import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
736
- function BaseField({
737
- label: label7,
738
- help,
739
- error,
740
- startIcon: StartIcon,
741
- trailing: trailing2,
742
- id,
743
- className,
744
- children
745
- }) {
771
+ var BaseField = forwardRef12(function BaseField2({ label: label7, help, error, startIcon: StartIcon, trailing: trailing2, id, className, children }, ref) {
746
772
  const autoId = useId();
747
773
  const controlId = id ?? autoId;
748
- const helpId = help != null ? `${controlId}-help` : void 0;
774
+ const errorMessage = error != null && error !== false && error !== true && error !== "" ? error : null;
775
+ const hasError = error === true || errorMessage != null;
776
+ const message2 = errorMessage ?? help;
777
+ const messageId = message2 != null ? `${controlId}-msg` : void 0;
749
778
  const classes = useStyles12({
750
- error,
779
+ error: hasError,
751
780
  hasStartIcon: StartIcon != null,
752
781
  hasTrailing: trailing2 != null,
753
782
  className
@@ -755,8 +784,9 @@ function BaseField({
755
784
  const control = {
756
785
  id: controlId,
757
786
  className: classes.input,
758
- "aria-describedby": helpId,
759
- "aria-invalid": error ? true : void 0
787
+ ref,
788
+ "aria-describedby": messageId,
789
+ "aria-invalid": hasError ? true : void 0
760
790
  };
761
791
  return /* @__PURE__ */ jsxs9("div", { className: classes.root, children: [
762
792
  label7 != null && /* @__PURE__ */ jsx15("label", { htmlFor: controlId, className: classes.labelText, children: label7 }),
@@ -765,13 +795,22 @@ function BaseField({
765
795
  children(control),
766
796
  trailing2 != null && /* @__PURE__ */ jsx15("span", { className: classes.trailingSlot, children: trailing2 })
767
797
  ] }),
768
- help != null && /* @__PURE__ */ jsx15("span", { id: helpId, className: classes.helpText, children: help })
798
+ message2 != null && // `aria-live` solo cuando el mensaje es un error: anuncia la validación al aparecer.
799
+ /* @__PURE__ */ jsx15(
800
+ "span",
801
+ {
802
+ id: messageId,
803
+ className: classes.helpText,
804
+ "aria-live": errorMessage ? "polite" : void 0,
805
+ children: message2
806
+ }
807
+ )
769
808
  ] });
770
- }
809
+ });
771
810
 
772
811
  // src/components/text-field/index.tsx
773
812
  import { jsx as jsx16 } from "react/jsx-runtime";
774
- function TextField({
813
+ var TextField = forwardRef13(function TextField2({
775
814
  label: label7,
776
815
  help,
777
816
  error,
@@ -783,39 +822,45 @@ function TextField({
783
822
  className,
784
823
  id,
785
824
  ...rest
786
- }) {
825
+ }, ref) {
787
826
  return /* @__PURE__ */ jsx16(
788
827
  BaseField,
789
828
  {
829
+ ref,
790
830
  label: label7,
791
831
  help,
792
832
  error,
793
833
  startIcon,
794
834
  id,
795
835
  className,
796
- children: (control) => multiline ? /* @__PURE__ */ jsx16(
797
- "textarea",
798
- {
799
- ...rest,
800
- ...control,
801
- rows: rows ?? 4,
802
- onChange: (e) => onChange?.(e.target.value)
803
- }
836
+ children: ({ ref: controlRef, ...control }) => multiline ? (
837
+ // En multiline el control es un <textarea>: no reenviamos `controlRef` porque el
838
+ // tipo público de la ref es HTMLInputElement (la ref aplica solo a la rama <input>).
839
+ /* @__PURE__ */ jsx16(
840
+ "textarea",
841
+ {
842
+ ...rest,
843
+ ...control,
844
+ rows: rows ?? 4,
845
+ onChange: (e) => onChange?.(e.target.value)
846
+ }
847
+ )
804
848
  ) : /* @__PURE__ */ jsx16(
805
849
  "input",
806
850
  {
807
851
  ...rest,
808
852
  ...control,
853
+ ref: controlRef,
809
854
  type,
810
855
  onChange: (e) => onChange?.(e.target.value)
811
856
  }
812
857
  )
813
858
  }
814
859
  );
815
- }
860
+ });
816
861
 
817
862
  // src/components/password-field/index.tsx
818
- import { useState as useState3 } from "react";
863
+ import { forwardRef as forwardRef14, useState as useState3 } from "react";
819
864
 
820
865
  // src/components/icons/eye/index.tsx
821
866
  import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
@@ -882,53 +927,55 @@ function useStyles13() {
882
927
 
883
928
  // src/components/password-field/index.tsx
884
929
  import { jsx as jsx19 } from "react/jsx-runtime";
885
- function PasswordField({
886
- label: label7,
887
- help,
888
- error,
889
- startIcon,
890
- onChange,
891
- id,
892
- className,
893
- ...rest
894
- }) {
895
- const [reveal, setReveal] = useState3(false);
896
- const classes = useStyles13();
897
- const handleChange = (e) => {
898
- onChange?.(e.target.value);
899
- };
900
- const handleToggleMouseDown = (e) => {
901
- e.preventDefault();
902
- };
903
- const toggleButton = /* @__PURE__ */ jsx19(
904
- "button",
905
- {
906
- type: "button",
907
- tabIndex: -1,
908
- className: classes.revealButton,
909
- "aria-label": reveal ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a",
910
- onMouseDown: handleToggleMouseDown,
911
- onClick: () => setReveal((r) => !r),
912
- children: reveal ? /* @__PURE__ */ jsx19(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx19(EyeIcon, { size: 18 })
913
- }
914
- );
915
- return /* @__PURE__ */ jsx19(
916
- BaseField,
917
- {
918
- label: label7,
919
- help,
920
- error,
921
- startIcon,
922
- trailing: toggleButton,
923
- id,
924
- className,
925
- children: (control) => /* @__PURE__ */ jsx19("input", { ...rest, ...control, type: reveal ? "text" : "password", onChange: handleChange })
926
- }
927
- );
928
- }
930
+ var PasswordField = forwardRef14(
931
+ function PasswordField2({ label: label7, help, error, startIcon, onChange, id, className, ...rest }, ref) {
932
+ const [reveal, setReveal] = useState3(false);
933
+ const classes = useStyles13();
934
+ const handleChange = (e) => {
935
+ onChange?.(e.target.value);
936
+ };
937
+ const handleToggleMouseDown = (e) => {
938
+ e.preventDefault();
939
+ };
940
+ const toggleButton = /* @__PURE__ */ jsx19(
941
+ "button",
942
+ {
943
+ type: "button",
944
+ tabIndex: -1,
945
+ className: classes.revealButton,
946
+ "aria-label": reveal ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a",
947
+ onMouseDown: handleToggleMouseDown,
948
+ onClick: () => setReveal((r) => !r),
949
+ children: reveal ? /* @__PURE__ */ jsx19(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx19(EyeIcon, { size: 18 })
950
+ }
951
+ );
952
+ return /* @__PURE__ */ jsx19(
953
+ BaseField,
954
+ {
955
+ ref,
956
+ label: label7,
957
+ help,
958
+ error,
959
+ startIcon,
960
+ trailing: toggleButton,
961
+ id,
962
+ className,
963
+ children: (control) => /* @__PURE__ */ jsx19(
964
+ "input",
965
+ {
966
+ ...rest,
967
+ ...control,
968
+ type: reveal ? "text" : "password",
969
+ onChange: handleChange
970
+ }
971
+ )
972
+ }
973
+ );
974
+ }
975
+ );
929
976
 
930
977
  // src/components/money-field/index.tsx
931
- import { useMemo as useMemo14, useState as useState4 } from "react";
978
+ import { forwardRef as forwardRef15, useMemo as useMemo14, useState as useState4 } from "react";
932
979
  import { jsx as jsx20 } from "react/jsx-runtime";
933
980
  function parseAmount(raw) {
934
981
  const cleaned = raw.replace(/[^0-9.-]/g, "");
@@ -936,7 +983,7 @@ function parseAmount(raw) {
936
983
  const n = Number.parseFloat(cleaned);
937
984
  return Number.isNaN(n) ? null : n;
938
985
  }
939
- function MoneyField({
986
+ var MoneyField = forwardRef15(function MoneyField2({
940
987
  value,
941
988
  onChange,
942
989
  currency = "USD",
@@ -950,7 +997,7 @@ function MoneyField({
950
997
  onFocus,
951
998
  onBlur,
952
999
  ...rest
953
- }) {
1000
+ }, ref) {
954
1001
  const [focused, setFocused] = useState4(false);
955
1002
  const [draft, setDraft] = useState4("");
956
1003
  const formatter = useMemo14(
@@ -972,6 +1019,7 @@ function MoneyField({
972
1019
  return /* @__PURE__ */ jsx20(
973
1020
  BaseField,
974
1021
  {
1022
+ ref,
975
1023
  label: label7,
976
1024
  help,
977
1025
  error,
@@ -992,7 +1040,10 @@ function MoneyField({
992
1040
  )
993
1041
  }
994
1042
  );
995
- }
1043
+ });
1044
+
1045
+ // src/components/icon-button/index.tsx
1046
+ import { forwardRef as forwardRef16 } from "react";
996
1047
 
997
1048
  // src/components/icon-button/use-styles.ts
998
1049
  import { useMemo as useMemo15 } from "react";
@@ -1017,10 +1068,20 @@ function useStyles14({
1017
1068
 
1018
1069
  // src/components/icon-button/index.tsx
1019
1070
  import { jsx as jsx21 } from "react/jsx-runtime";
1020
- function IconButton({ icon: Icon, active: active2, tone: tone4, title, ...rest }) {
1071
+ var IconButton = forwardRef16(function IconButton2({ icon: Icon, active: active2, tone: tone4, title, type = "button", ...rest }, ref) {
1072
+ if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
1073
+ const restProps = rest;
1074
+ const hasName = title.trim() !== "" || restProps["aria-label"] != null || restProps["aria-labelledby"] != null;
1075
+ if (!hasName) {
1076
+ console.warn("IconButton: falta un nombre accesible (`title` o `aria-label`).");
1077
+ }
1078
+ }
1021
1079
  const { root: root24 } = useStyles14({ active: active2, tone: tone4 });
1022
- return /* @__PURE__ */ jsx21("button", { className: root24, "aria-label": title, title, ...rest, children: /* @__PURE__ */ jsx21(Icon, { size: 18 }) });
1023
- }
1080
+ return /* @__PURE__ */ jsx21("button", { ref, type, className: root24, "aria-label": title, title, ...rest, children: /* @__PURE__ */ jsx21(Icon, { size: 18 }) });
1081
+ });
1082
+
1083
+ // src/components/card/index.tsx
1084
+ import { forwardRef as forwardRef17 } from "react";
1024
1085
 
1025
1086
  // src/components/card/use-styles.ts
1026
1087
  import { useMemo as useMemo16 } from "react";
@@ -1040,10 +1101,10 @@ function useStyles15() {
1040
1101
 
1041
1102
  // src/components/card/index.tsx
1042
1103
  import { jsx as jsx22 } from "react/jsx-runtime";
1043
- function CardRoot({ children, ...rest }) {
1104
+ var CardRoot = forwardRef17(function Card({ children, ...rest }, ref) {
1044
1105
  const { root: root24 } = useStyles15();
1045
- return /* @__PURE__ */ jsx22("div", { className: root24, ...rest, children });
1046
- }
1106
+ return /* @__PURE__ */ jsx22("div", { ref, className: root24, ...rest, children });
1107
+ });
1047
1108
  function CardHeader({ children, ...rest }) {
1048
1109
  const { header: header3 } = useStyles15();
1049
1110
  return /* @__PURE__ */ jsx22("div", { className: header3, ...rest, children });
@@ -1060,12 +1121,15 @@ CardRoot.displayName = "Card";
1060
1121
  CardHeader.displayName = "Card.Header";
1061
1122
  CardBody.displayName = "Card.Body";
1062
1123
  CardFooter.displayName = "Card.Footer";
1063
- var Card = Object.assign(CardRoot, {
1124
+ var Card2 = Object.assign(CardRoot, {
1064
1125
  Header: CardHeader,
1065
1126
  Body: CardBody,
1066
1127
  Footer: CardFooter
1067
1128
  });
1068
1129
 
1130
+ // src/components/alert/index.tsx
1131
+ import { forwardRef as forwardRef18 } from "react";
1132
+
1069
1133
  // src/components/icons/circle-check/index.tsx
1070
1134
  import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1071
1135
  function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
@@ -1203,27 +1267,27 @@ var defaultIcons = {
1203
1267
  warn: TriangleAlertIcon,
1204
1268
  danger: CircleXIcon
1205
1269
  };
1206
- function Alert({
1207
- severity: severity2 = "info",
1208
- title,
1209
- icon,
1210
- className,
1211
- children,
1212
- ...rest
1213
- }) {
1270
+ var Alert = forwardRef18(function Alert2({ severity: severity2 = "info", title, icon, className, children, ...rest }, ref) {
1214
1271
  const styles = useStyles16({ severity: severity2, className });
1215
1272
  const IconComponent = icon ?? defaultIcons[severity2];
1216
- return /* @__PURE__ */ jsxs16("div", { role: "alert", className: styles.root, ...rest, children: [
1273
+ return /* @__PURE__ */ jsxs16("div", { ref, role: "alert", className: styles.root, ...rest, children: [
1217
1274
  /* @__PURE__ */ jsx27("span", { className: styles.iconSlot, children: /* @__PURE__ */ jsx27(IconComponent, {}) }),
1218
1275
  /* @__PURE__ */ jsxs16("div", { className: styles.content, children: [
1219
1276
  title != null && /* @__PURE__ */ jsx27(Typography, { variant: "h4", children: title }),
1220
1277
  children != null && /* @__PURE__ */ jsx27(Typography, { variant: "body", color: "fg2", children })
1221
1278
  ] })
1222
1279
  ] });
1223
- }
1280
+ });
1224
1281
 
1225
1282
  // src/components/tooltip/index.tsx
1226
- import { cloneElement, useId as useId2, useState as useState5 } from "react";
1283
+ import {
1284
+ cloneElement,
1285
+ forwardRef as forwardRef19,
1286
+ useEffect as useEffect3,
1287
+ useId as useId2,
1288
+ useRef as useRef2,
1289
+ useState as useState5
1290
+ } from "react";
1227
1291
 
1228
1292
  // src/components/tooltip/use-styles.ts
1229
1293
  import { useMemo as useMemo18 } from "react";
@@ -1251,23 +1315,74 @@ function useStyles17({
1251
1315
 
1252
1316
  // src/components/tooltip/index.tsx
1253
1317
  import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
1254
- function Tooltip({ label: label7, children, placement: placement2 }) {
1318
+ var HIDE_DELAY = 120;
1319
+ var Tooltip = forwardRef19(function Tooltip2({ label: label7, children, placement: placement2 }, ref) {
1255
1320
  const [open, setOpen] = useState5(false);
1256
1321
  const tooltipId = useId2();
1257
1322
  const { wrapper: wrapper4, bubble: bubble2 } = useStyles17({ placement: placement2 });
1258
- const show = () => setOpen(true);
1259
- const hide = () => setOpen(false);
1323
+ const hideTimer = useRef2(null);
1324
+ const clearHide = () => {
1325
+ if (hideTimer.current) {
1326
+ clearTimeout(hideTimer.current);
1327
+ hideTimer.current = null;
1328
+ }
1329
+ };
1330
+ const show = () => {
1331
+ clearHide();
1332
+ setOpen(true);
1333
+ };
1334
+ const scheduleHide = () => {
1335
+ clearHide();
1336
+ hideTimer.current = setTimeout(() => setOpen(false), HIDE_DELAY);
1337
+ };
1338
+ const hideNow = () => {
1339
+ clearHide();
1340
+ setOpen(false);
1341
+ };
1342
+ useEffect3(() => {
1343
+ return () => {
1344
+ if (hideTimer.current) clearTimeout(hideTimer.current);
1345
+ };
1346
+ }, []);
1347
+ const handleKeyDown = (event) => {
1348
+ if (event.key === "Escape" && open) {
1349
+ event.stopPropagation();
1350
+ hideNow();
1351
+ }
1352
+ };
1260
1353
  const previousDescribedBy = children.props["aria-describedby"];
1261
1354
  const describedBy = open ? [previousDescribedBy, tooltipId].filter(Boolean).join(" ") : previousDescribedBy;
1262
1355
  const trigger2 = cloneElement(children, { "aria-describedby": describedBy });
1263
- return /* @__PURE__ */ jsxs17("span", { className: wrapper4, onMouseEnter: show, onMouseLeave: hide, onFocus: show, onBlur: hide, children: [
1264
- trigger2,
1265
- open && /* @__PURE__ */ jsx28("span", { id: tooltipId, role: "tooltip", className: bubble2, children: label7 })
1266
- ] });
1267
- }
1356
+ return /* @__PURE__ */ jsxs17(
1357
+ "span",
1358
+ {
1359
+ ref,
1360
+ className: wrapper4,
1361
+ onMouseEnter: show,
1362
+ onMouseLeave: scheduleHide,
1363
+ onFocus: show,
1364
+ onBlur: hideNow,
1365
+ onKeyDown: handleKeyDown,
1366
+ children: [
1367
+ trigger2,
1368
+ open && /* @__PURE__ */ jsx28(
1369
+ "span",
1370
+ {
1371
+ id: tooltipId,
1372
+ role: "tooltip",
1373
+ className: bubble2,
1374
+ onMouseEnter: show,
1375
+ onMouseLeave: scheduleHide,
1376
+ children: label7
1377
+ }
1378
+ )
1379
+ ]
1380
+ }
1381
+ );
1382
+ });
1268
1383
 
1269
1384
  // src/components/select/index.tsx
1270
- import { useEffect as useEffect3, useId as useId3, useRef as useRef2, useState as useState6 } from "react";
1385
+ import { forwardRef as forwardRef20, useEffect as useEffect4, useId as useId3, useRef as useRef3, useState as useState6 } from "react";
1271
1386
 
1272
1387
  // src/components/icons/chevron-down/index.tsx
1273
1388
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -1327,10 +1442,15 @@ function useStyles18({
1327
1442
 
1328
1443
  // src/components/select/index.tsx
1329
1444
  import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
1330
- function Select({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3 }) {
1445
+ var Select = forwardRef20(function Select2({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3, ...rest }, ref) {
1331
1446
  const [open, setOpen] = useState6(false);
1332
1447
  const [activeIndex, setActiveIndex] = useState6(0);
1333
- const rootRef = useRef2(null);
1448
+ const rootRef = useRef3(null);
1449
+ const setRootRef = (node) => {
1450
+ rootRef.current = node;
1451
+ if (typeof ref === "function") ref(node);
1452
+ else if (ref) ref.current = node;
1453
+ };
1334
1454
  const baseId = useId3();
1335
1455
  const labelId = `${baseId}-label`;
1336
1456
  const optionId = (index) => `${baseId}-option-${index}`;
@@ -1343,7 +1463,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
1343
1463
  menu: menu2,
1344
1464
  optionClass
1345
1465
  } = useStyles18({ open });
1346
- useEffect3(() => {
1466
+ useEffect4(() => {
1347
1467
  if (!open) return;
1348
1468
  const onPointerDown = (event) => {
1349
1469
  if (rootRef.current && !rootRef.current.contains(event.target)) {
@@ -1403,7 +1523,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
1403
1523
  break;
1404
1524
  }
1405
1525
  };
1406
- return /* @__PURE__ */ jsxs18("div", { ref: rootRef, className: root24, children: [
1526
+ return /* @__PURE__ */ jsxs18("div", { ref: setRootRef, className: root24, ...rest, children: [
1407
1527
  label7 && /* @__PURE__ */ jsx30("span", { id: labelId, className: labelClass, children: label7 }),
1408
1528
  /* @__PURE__ */ jsxs18(
1409
1529
  "button",
@@ -1451,7 +1571,10 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
1451
1571
  );
1452
1572
  }) })
1453
1573
  ] });
1454
- }
1574
+ });
1575
+
1576
+ // src/components/slider/index.tsx
1577
+ import { forwardRef as forwardRef21 } from "react";
1455
1578
 
1456
1579
  // src/components/slider/use-styles.ts
1457
1580
  import { useMemo as useMemo20 } from "react";
@@ -1484,15 +1607,7 @@ function useStyles19() {
1484
1607
 
1485
1608
  // src/components/slider/index.tsx
1486
1609
  import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
1487
- function Slider({
1488
- value = 0,
1489
- onChange,
1490
- min = 0,
1491
- max = 100,
1492
- step: step2 = 1,
1493
- disabled: disabled3,
1494
- label: label7
1495
- }) {
1610
+ var Slider = forwardRef21(function Slider2({ value = 0, onChange, min = 0, max = 100, step: step2 = 1, disabled: disabled3, label: label7, ...rest }, ref) {
1496
1611
  const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } = useStyles19();
1497
1612
  const span = max - min;
1498
1613
  const percent = span > 0 ? (value - min) / span * 100 : 0;
@@ -1508,6 +1623,7 @@ function Slider({
1508
1623
  /* @__PURE__ */ jsx31(
1509
1624
  "input",
1510
1625
  {
1626
+ ref,
1511
1627
  className: input6,
1512
1628
  type: "range",
1513
1629
  min,
@@ -1515,16 +1631,17 @@ function Slider({
1515
1631
  step: step2,
1516
1632
  value,
1517
1633
  disabled: disabled3,
1518
- onChange: handleChange
1634
+ onChange: handleChange,
1635
+ ...rest
1519
1636
  }
1520
1637
  ),
1521
1638
  /* @__PURE__ */ jsx31("span", { className: thumb2, style: { left: `${clamped}%` } })
1522
1639
  ] })
1523
1640
  ] });
1524
- }
1641
+ });
1525
1642
 
1526
1643
  // src/components/accordion/index.tsx
1527
- import { useState as useState7 } from "react";
1644
+ import { forwardRef as forwardRef22, useState as useState7 } from "react";
1528
1645
 
1529
1646
  // src/components/accordion/use-styles.ts
1530
1647
  import { useMemo as useMemo21 } from "react";
@@ -1554,14 +1671,9 @@ function useStyles20({ className }) {
1554
1671
 
1555
1672
  // src/components/accordion/index.tsx
1556
1673
  import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
1557
- function Accordion({
1558
- items,
1559
- multiple = false,
1560
- defaultOpen = [],
1561
- className
1562
- }) {
1674
+ var Accordion = forwardRef22(function Accordion2({ items, multiple = false, defaultOpen = [], className }, ref) {
1563
1675
  const [open, setOpen] = useState7(defaultOpen);
1564
- const { root: root24, item: item3, header: header3, chevronFor, panel: panel2 } = useStyles20({ className });
1676
+ const { root: root24, item: item3, header: header3, chevronFor, panel: panel3 } = useStyles20({ className });
1565
1677
  const toggle = (id) => {
1566
1678
  setOpen((current2) => {
1567
1679
  const isOpen = current2.includes(id);
@@ -1569,7 +1681,7 @@ function Accordion({
1569
1681
  return multiple ? [...current2, id] : [id];
1570
1682
  });
1571
1683
  };
1572
- return /* @__PURE__ */ jsx32("div", { className: root24, children: items.map((it) => {
1684
+ return /* @__PURE__ */ jsx32("div", { ref, className: root24, children: items.map((it) => {
1573
1685
  const isOpen = open.includes(it.id);
1574
1686
  const panelId = `accordion-panel-${it.id}`;
1575
1687
  const headerId = `accordion-header-${it.id}`;
@@ -1589,13 +1701,13 @@ function Accordion({
1589
1701
  ]
1590
1702
  }
1591
1703
  ),
1592
- isOpen && /* @__PURE__ */ jsx32("div", { id: panelId, className: panel2, role: "region", "aria-labelledby": headerId, children: it.content })
1704
+ isOpen && /* @__PURE__ */ jsx32("div", { id: panelId, className: panel3, role: "region", "aria-labelledby": headerId, children: it.content })
1593
1705
  ] }, it.id);
1594
1706
  }) });
1595
- }
1707
+ });
1596
1708
 
1597
1709
  // src/components/breadcrumbs/index.tsx
1598
- import { Fragment } from "react";
1710
+ import { Fragment, forwardRef as forwardRef23 } from "react";
1599
1711
 
1600
1712
  // src/components/icons/chevron-right/index.tsx
1601
1713
  import { jsx as jsx33 } from "react/jsx-runtime";
@@ -1640,9 +1752,9 @@ function useStyles21({ className }) {
1640
1752
 
1641
1753
  // src/components/breadcrumbs/index.tsx
1642
1754
  import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
1643
- function Breadcrumbs({ items, className, ...rest }) {
1755
+ var Breadcrumbs = forwardRef23(function Breadcrumbs2({ items, className, ...rest }, ref) {
1644
1756
  const { root: root24, crumb: crumb2, current: current2, separator: separator2 } = useStyles21({ className });
1645
- return /* @__PURE__ */ jsx34("nav", { "aria-label": "Breadcrumb", className: root24, ...rest, children: items.map((item3, index) => {
1757
+ return /* @__PURE__ */ jsx34("nav", { ref, "aria-label": "Breadcrumb", className: root24, ...rest, children: items.map((item3, index) => {
1646
1758
  const isLast = index === items.length - 1;
1647
1759
  const key = index;
1648
1760
  return /* @__PURE__ */ jsxs21(Fragment, { children: [
@@ -1650,7 +1762,10 @@ function Breadcrumbs({ items, className, ...rest }) {
1650
1762
  !isLast && /* @__PURE__ */ jsx34("span", { className: separator2, children: /* @__PURE__ */ jsx34(ChevronRightIcon, { size: 14 }) })
1651
1763
  ] }, key);
1652
1764
  }) });
1653
- }
1765
+ });
1766
+
1767
+ // src/components/pagination/index.tsx
1768
+ import { forwardRef as forwardRef24 } from "react";
1654
1769
 
1655
1770
  // src/components/icons/chevron-left/index.tsx
1656
1771
  import { jsx as jsx35 } from "react/jsx-runtime";
@@ -1713,13 +1828,13 @@ function buildItems(count, page, siblingCount) {
1713
1828
  if (last > first) items.push(last);
1714
1829
  return items;
1715
1830
  }
1716
- function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
1831
+ var Pagination = forwardRef24(function Pagination2({ count, page = 1, onChange, siblingCount = 1, ...rest }, ref) {
1717
1832
  const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } = useStyles22();
1718
1833
  const total = Math.max(1, count);
1719
1834
  const current2 = Math.min(Math.max(1, page), total);
1720
1835
  const items = buildItems(total, current2, siblingCount);
1721
1836
  const go = (n) => onChange?.(Math.min(Math.max(1, n), total));
1722
- return /* @__PURE__ */ jsxs22("nav", { className: root24, "aria-label": "Pagination", children: [
1837
+ return /* @__PURE__ */ jsxs22("nav", { ref, className: root24, "aria-label": "Pagination", ...rest, children: [
1723
1838
  /* @__PURE__ */ jsx36(
1724
1839
  "button",
1725
1840
  {
@@ -1759,10 +1874,10 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
1759
1874
  }
1760
1875
  )
1761
1876
  ] });
1762
- }
1877
+ });
1763
1878
 
1764
1879
  // src/components/stepper/index.tsx
1765
- import { Fragment as Fragment2 } from "react";
1880
+ import { Fragment as Fragment2, forwardRef as forwardRef25 } from "react";
1766
1881
 
1767
1882
  // src/components/stepper/use-styles.ts
1768
1883
  import { useMemo as useMemo24 } from "react";
@@ -1794,9 +1909,9 @@ function useStyles23({ className }) {
1794
1909
 
1795
1910
  // src/components/stepper/index.tsx
1796
1911
  import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
1797
- function Stepper({ steps, active: active2 = 0, className, ...rest }) {
1912
+ var Stepper = forwardRef25(function Stepper2({ steps, active: active2 = 0, className, ...rest }, ref) {
1798
1913
  const { root: root24, step: step2, connector: connector2, markerFor, labelFor } = useStyles23({ className });
1799
- return /* @__PURE__ */ jsx37("div", { className: root24, ...rest, children: steps.map((s, index) => {
1914
+ return /* @__PURE__ */ jsx37("div", { ref, className: root24, ...rest, children: steps.map((s, index) => {
1800
1915
  const state = index < active2 ? "done" : index === active2 ? "active" : "upcoming";
1801
1916
  const isActive = state === "active";
1802
1917
  return (
@@ -1810,12 +1925,16 @@ function Stepper({ steps, active: active2 = 0, className, ...rest }) {
1810
1925
  ] }, index)
1811
1926
  );
1812
1927
  }) });
1813
- }
1928
+ });
1929
+
1930
+ // src/components/tabs/index.tsx
1931
+ import { forwardRef as forwardRef26, useId as useId4, useRef as useRef4 } from "react";
1814
1932
 
1815
1933
  // src/components/tabs/use-styles.ts
1816
1934
  import { useMemo as useMemo25 } from "react";
1817
1935
 
1818
1936
  // src/components/tabs/use-styles.css.ts
1937
+ var panel2 = "use-styles_panel__1l4m7t43";
1819
1938
  var root19 = "use-styles_root__1l4m7t40";
1820
1939
  var tab = "use-styles_tab__1l4m7t41";
1821
1940
  var tabActive = "use-styles_tabActive__1l4m7t42";
@@ -1826,37 +1945,94 @@ function useStyles24() {
1826
1945
  return useMemo25(() => {
1827
1946
  const root24 = [themeClass, root19].filter(Boolean).join(" ");
1828
1947
  const tabClass = (active2) => [tab, active2 && tabActive].filter(Boolean).join(" ");
1829
- return { root: root24, tab, tabClass };
1948
+ return { root: root24, tab, tabClass, panel: panel2 };
1830
1949
  }, [themeClass]);
1831
1950
  }
1832
1951
 
1833
1952
  // src/components/tabs/index.tsx
1834
- import { jsx as jsx38 } from "react/jsx-runtime";
1835
- function Tabs({ items, value, onChange }) {
1836
- const { root: root24, tabClass } = useStyles24();
1837
- return /* @__PURE__ */ jsx38("div", { role: "tablist", className: root24, children: items.map((item3) => {
1838
- const active2 = item3.value === value;
1839
- return /* @__PURE__ */ jsx38(
1840
- "button",
1953
+ import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
1954
+ var Tabs = forwardRef26(function Tabs2({ items, value, onChange, ...rest }, ref) {
1955
+ const { root: root24, tabClass, panel: panel3 } = useStyles24();
1956
+ const baseId = useId4();
1957
+ const tabRefs = useRef4([]);
1958
+ const hasPanels = items.some((item3) => item3.content !== void 0);
1959
+ const activeIndex = items.findIndex((item3) => item3.value === value);
1960
+ const tabId = (v) => `${baseId}-tab-${v}`;
1961
+ const panelId = (v) => `${baseId}-panel-${v}`;
1962
+ const selectTab = (index) => {
1963
+ const item3 = items[index];
1964
+ if (!item3) return;
1965
+ onChange?.(item3.value);
1966
+ tabRefs.current[index]?.focus();
1967
+ };
1968
+ const onKeyDown = (event, index) => {
1969
+ const last = items.length - 1;
1970
+ switch (event.key) {
1971
+ case "ArrowRight":
1972
+ event.preventDefault();
1973
+ selectTab(index === last ? 0 : index + 1);
1974
+ break;
1975
+ case "ArrowLeft":
1976
+ event.preventDefault();
1977
+ selectTab(index === 0 ? last : index - 1);
1978
+ break;
1979
+ case "Home":
1980
+ event.preventDefault();
1981
+ selectTab(0);
1982
+ break;
1983
+ case "End":
1984
+ event.preventDefault();
1985
+ selectTab(last);
1986
+ break;
1987
+ }
1988
+ };
1989
+ return /* @__PURE__ */ jsxs24(Fragment3, { children: [
1990
+ /* @__PURE__ */ jsx38("div", { ref, role: "tablist", className: root24, ...rest, children: items.map((item3, index) => {
1991
+ const active2 = item3.value === value;
1992
+ const tabbable = active2 || activeIndex === -1 && index === 0;
1993
+ return /* @__PURE__ */ jsx38(
1994
+ "button",
1995
+ {
1996
+ ref: (el) => {
1997
+ tabRefs.current[index] = el;
1998
+ },
1999
+ type: "button",
2000
+ role: "tab",
2001
+ id: tabId(item3.value),
2002
+ "aria-selected": active2,
2003
+ "aria-controls": hasPanels ? panelId(item3.value) : void 0,
2004
+ tabIndex: tabbable ? 0 : -1,
2005
+ className: tabClass(active2),
2006
+ onClick: () => onChange?.(item3.value),
2007
+ onKeyDown: (event) => onKeyDown(event, index),
2008
+ children: item3.label
2009
+ },
2010
+ item3.value
2011
+ );
2012
+ }) }),
2013
+ hasPanels && items.map((item3) => /* @__PURE__ */ jsx38(
2014
+ "div",
1841
2015
  {
1842
- type: "button",
1843
- role: "tab",
1844
- "aria-selected": active2,
1845
- className: tabClass(active2),
1846
- onClick: () => onChange?.(item3.value),
1847
- children: item3.label
2016
+ role: "tabpanel",
2017
+ id: panelId(item3.value),
2018
+ "aria-labelledby": tabId(item3.value),
2019
+ hidden: item3.value !== value,
2020
+ tabIndex: 0,
2021
+ className: panel3,
2022
+ children: item3.content
1848
2023
  },
1849
2024
  item3.value
1850
- );
1851
- }) });
1852
- }
2025
+ ))
2026
+ ] });
2027
+ });
1853
2028
 
1854
2029
  // src/components/menu/index.tsx
1855
2030
  import {
1856
2031
  cloneElement as cloneElement2,
1857
- useEffect as useEffect4,
2032
+ forwardRef as forwardRef27,
2033
+ useEffect as useEffect5,
1858
2034
  useLayoutEffect,
1859
- useRef as useRef3,
2035
+ useRef as useRef5,
1860
2036
  useState as useState8
1861
2037
  } from "react";
1862
2038
 
@@ -1884,18 +2060,22 @@ function useStyles25() {
1884
2060
  }
1885
2061
 
1886
2062
  // src/components/menu/index.tsx
1887
- import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
2063
+ import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
1888
2064
  function assignRef(ref, value) {
1889
2065
  if (typeof ref === "function") ref(value);
1890
2066
  else if (ref) ref.current = value;
1891
2067
  }
1892
- function Menu({ trigger: trigger2, items }) {
2068
+ var Menu = forwardRef27(function Menu2({ trigger: trigger2, items }, ref) {
1893
2069
  const { wrapper: wrapper4, list: list2, item: item3, dangerItem } = useStyles25();
1894
2070
  const [open, setOpen] = useState8(false);
1895
2071
  const [alignEnd, setAlignEnd] = useState8(false);
1896
- const rootRef = useRef3(null);
1897
- const listRef = useRef3(null);
1898
- const triggerRef = useRef3(null);
2072
+ const rootRef = useRef5(null);
2073
+ const setRootRef = (node) => {
2074
+ rootRef.current = node;
2075
+ assignRef(ref, node);
2076
+ };
2077
+ const listRef = useRef5(null);
2078
+ const triggerRef = useRef5(null);
1899
2079
  const getMenuItems = () => Array.from(listRef.current?.querySelectorAll('[role="menuitem"]') ?? []);
1900
2080
  const focusItemAt = (index) => {
1901
2081
  const menuItems = getMenuItems();
@@ -1919,7 +2099,7 @@ function Menu({ trigger: trigger2, items }) {
1919
2099
  const viewport = document.documentElement.clientWidth;
1920
2100
  setAlignEnd(rootLeft + listEl.offsetWidth > viewport);
1921
2101
  }, [open]);
1922
- useEffect4(() => {
2102
+ useEffect5(() => {
1923
2103
  if (!open) return;
1924
2104
  listRef.current?.querySelector('[role="menuitem"]')?.focus();
1925
2105
  const onDocMouseDown = (event) => {
@@ -1984,7 +2164,7 @@ function Menu({ trigger: trigger2, items }) {
1984
2164
  setOpen((prev) => !prev);
1985
2165
  }
1986
2166
  });
1987
- return /* @__PURE__ */ jsxs24("div", { ref: rootRef, className: wrapper4, children: [
2167
+ return /* @__PURE__ */ jsxs25("div", { ref: setRootRef, className: wrapper4, children: [
1988
2168
  clonedTrigger,
1989
2169
  open && /* @__PURE__ */ jsx39(
1990
2170
  "div",
@@ -2012,13 +2192,14 @@ function Menu({ trigger: trigger2, items }) {
2012
2192
  }
2013
2193
  )
2014
2194
  ] });
2015
- }
2195
+ });
2016
2196
 
2017
2197
  // src/components/dialog/index.tsx
2018
2198
  import {
2019
- useEffect as useEffect5,
2020
- useId as useId4,
2021
- useRef as useRef4
2199
+ forwardRef as forwardRef28,
2200
+ useEffect as useEffect6,
2201
+ useId as useId5,
2202
+ useRef as useRef6
2022
2203
  } from "react";
2023
2204
  import { createPortal } from "react-dom";
2024
2205
 
@@ -2046,15 +2227,23 @@ function useStyles26() {
2046
2227
  }
2047
2228
 
2048
2229
  // src/components/dialog/index.tsx
2049
- import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
2230
+ import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
2050
2231
  var FOCUSABLE = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
2051
- function Dialog({ open, onClose, title, actions: actions3, children }) {
2232
+ function assignRef2(ref, value) {
2233
+ if (typeof ref === "function") ref(value);
2234
+ else if (ref) ref.current = value;
2235
+ }
2236
+ var Dialog = forwardRef28(function Dialog2({ open, onClose, title, actions: actions3, children }, ref) {
2052
2237
  const { overlay: overlay2, surface: surface2, body: body3, actions: actionsClass } = useStyles26();
2053
- const surfaceRef = useRef4(null);
2054
- const previouslyFocused = useRef4(null);
2055
- const generatedId = useId4();
2238
+ const surfaceRef = useRef6(null);
2239
+ const setSurfaceRef = (node) => {
2240
+ surfaceRef.current = node;
2241
+ assignRef2(ref, node);
2242
+ };
2243
+ const previouslyFocused = useRef6(null);
2244
+ const generatedId = useId5();
2056
2245
  const titleId = title != null ? generatedId : void 0;
2057
- useEffect5(() => {
2246
+ useEffect6(() => {
2058
2247
  if (!open) return;
2059
2248
  const onKeyDown = (event) => {
2060
2249
  if (event.key === "Escape") onClose();
@@ -2062,13 +2251,13 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
2062
2251
  document.addEventListener("keydown", onKeyDown);
2063
2252
  return () => document.removeEventListener("keydown", onKeyDown);
2064
2253
  }, [open, onClose]);
2065
- useEffect5(() => {
2254
+ useEffect6(() => {
2066
2255
  if (!open) return;
2067
2256
  previouslyFocused.current = document.activeElement;
2068
2257
  surfaceRef.current?.focus();
2069
2258
  return () => previouslyFocused.current?.focus?.();
2070
2259
  }, [open]);
2071
- useEffect5(() => {
2260
+ useEffect6(() => {
2072
2261
  if (!open) return;
2073
2262
  const previousOverflow = document.body.style.overflow;
2074
2263
  document.body.style.overflow = "hidden";
@@ -2106,10 +2295,10 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
2106
2295
  };
2107
2296
  return createPortal(
2108
2297
  // biome-ignore lint/a11y/useKeyWithClickEvents: ESC handled by a document keydown listener.
2109
- /* @__PURE__ */ jsx40("div", { className: overlay2, "data-testid": "dialog-overlay", onClick: onClose, children: /* @__PURE__ */ jsxs25(
2298
+ /* @__PURE__ */ jsx40("div", { className: overlay2, "data-testid": "dialog-overlay", onClick: onClose, children: /* @__PURE__ */ jsxs26(
2110
2299
  "div",
2111
2300
  {
2112
- ref: surfaceRef,
2301
+ ref: setSurfaceRef,
2113
2302
  className: surface2,
2114
2303
  role: "dialog",
2115
2304
  "aria-modal": "true",
@@ -2126,9 +2315,10 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
2126
2315
  ) }),
2127
2316
  document.body
2128
2317
  );
2129
- }
2318
+ });
2130
2319
 
2131
2320
  // src/components/snackbar/index.tsx
2321
+ import { forwardRef as forwardRef29 } from "react";
2132
2322
  import { createPortal as createPortal2 } from "react-dom";
2133
2323
 
2134
2324
  // src/components/snackbar/use-styles.ts
@@ -2153,25 +2343,29 @@ function useStyles27() {
2153
2343
  }
2154
2344
 
2155
2345
  // src/components/snackbar/index.tsx
2156
- import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
2157
- function Snackbar({ open, message: message2, action, onClose }) {
2346
+ import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
2347
+ var Snackbar = forwardRef29(function Snackbar2({ open, message: message2, action, onClose }, ref) {
2158
2348
  const { root: root24, message: messageClass, closeBtn: closeBtn2 } = useStyles27();
2159
2349
  if (!open || typeof document === "undefined") return null;
2160
2350
  return createPortal2(
2161
- /* @__PURE__ */ jsxs26("div", { role: "status", className: root24, children: [
2351
+ /* @__PURE__ */ jsxs27("div", { ref, role: "status", className: root24, children: [
2162
2352
  /* @__PURE__ */ jsx41("span", { className: messageClass, children: message2 }),
2163
2353
  action,
2164
2354
  onClose && /* @__PURE__ */ jsx41("button", { type: "button", "aria-label": "Close", className: closeBtn2, onClick: onClose, children: /* @__PURE__ */ jsx41(XIcon, { size: 18 }) })
2165
2355
  ] }),
2166
2356
  document.body
2167
2357
  );
2168
- }
2358
+ });
2359
+
2360
+ // src/components/table/index.tsx
2361
+ import { forwardRef as forwardRef30 } from "react";
2169
2362
 
2170
2363
  // src/components/table/use-styles.ts
2171
2364
  import { useMemo as useMemo29 } from "react";
2172
2365
 
2173
2366
  // src/components/table/use-styles.css.ts
2174
2367
  var alignRight = "use-styles_alignRight__1n2cz6i3";
2368
+ var caption = "use-styles_caption__1n2cz6i4";
2175
2369
  var root21 = "use-styles_root__1n2cz6i0";
2176
2370
  var td = "use-styles_td__1n2cz6i2";
2177
2371
  var th = "use-styles_th__1n2cz6i1";
@@ -2183,26 +2377,33 @@ function useStyles28({ className }) {
2183
2377
  () => [themeClass, root21, className].filter(Boolean).join(" "),
2184
2378
  [themeClass, className]
2185
2379
  );
2186
- return { root: root24, th, td, alignRight };
2380
+ return {
2381
+ root: root24,
2382
+ th,
2383
+ td,
2384
+ alignRight,
2385
+ caption
2386
+ };
2187
2387
  }
2188
2388
 
2189
2389
  // src/components/table/index.tsx
2190
- import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
2191
- function Table({
2192
- columns,
2193
- rows,
2194
- getRowKey,
2195
- className,
2196
- ...rest
2197
- }) {
2198
- const { root: root24, th: th2, td: td2, alignRight: alignRight2 } = useStyles28({ className });
2390
+ import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
2391
+ function TableInner({ columns, rows, getRowKey, className, caption: caption2, ...rest }, ref) {
2392
+ const { root: root24, th: th2, td: td2, alignRight: alignRight2, caption: captionClass } = useStyles28({ className });
2199
2393
  const headClass = (column) => column.align === "right" ? `${th2} ${alignRight2}` : th2;
2200
2394
  const cellClass = (column) => column.align === "right" ? `${td2} ${alignRight2}` : td2;
2201
- return /* @__PURE__ */ jsxs27("table", { className: root24, ...rest, children: [
2202
- /* @__PURE__ */ jsx42("thead", { children: /* @__PURE__ */ jsx42("tr", { children: columns.map((column) => /* @__PURE__ */ jsx42("th", { className: headClass(column), children: column.header }, column.key)) }) }),
2395
+ return /* @__PURE__ */ jsxs28("table", { ref, className: root24, ...rest, children: [
2396
+ caption2 != null && /* @__PURE__ */ jsx42("caption", { className: captionClass, children: caption2 }),
2397
+ /* @__PURE__ */ jsx42("thead", { children: /* @__PURE__ */ jsx42("tr", { children: columns.map((column) => /* @__PURE__ */ jsx42("th", { scope: "col", className: headClass(column), children: column.header }, column.key)) }) }),
2203
2398
  /* @__PURE__ */ jsx42("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx42("tr", { children: columns.map((column) => /* @__PURE__ */ jsx42("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
2204
2399
  ] });
2205
2400
  }
2401
+ var TableForwarded = forwardRef30(TableInner);
2402
+ TableForwarded.displayName = "Table";
2403
+ var Table = TableForwarded;
2404
+
2405
+ // src/components/app-bar/index.tsx
2406
+ import { forwardRef as forwardRef31 } from "react";
2206
2407
 
2207
2408
  // src/components/app-bar/use-styles.ts
2208
2409
  import { useMemo as useMemo30 } from "react";
@@ -2223,15 +2424,18 @@ function useStyles29({ className }) {
2223
2424
  }
2224
2425
 
2225
2426
  // src/components/app-bar/index.tsx
2226
- import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
2227
- function AppBar({ brand: brand2, actions: actions3, className, children, ...rest }) {
2427
+ import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
2428
+ var AppBar = forwardRef31(function AppBar2({ brand: brand2, actions: actions3, className, children, ...rest }, ref) {
2228
2429
  const styles = useStyles29({ className });
2229
- return /* @__PURE__ */ jsxs28("header", { className: styles.root, ...rest, children: [
2430
+ return /* @__PURE__ */ jsxs29("header", { ref, className: styles.root, ...rest, children: [
2230
2431
  brand2 !== void 0 ? /* @__PURE__ */ jsx43("div", { className: styles.brand, children: brand2 }) : null,
2231
2432
  children,
2232
2433
  actions3 !== void 0 ? /* @__PURE__ */ jsx43("div", { className: styles.actions, children: actions3 }) : null
2233
2434
  ] });
2234
- }
2435
+ });
2436
+
2437
+ // src/components/list-item/index.tsx
2438
+ import { forwardRef as forwardRef32 } from "react";
2235
2439
 
2236
2440
  // src/components/list-item/use-styles.ts
2237
2441
  import { useMemo as useMemo31 } from "react";
@@ -2257,22 +2461,15 @@ function useStyles30({
2257
2461
  }
2258
2462
 
2259
2463
  // src/components/list-item/index.tsx
2260
- import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
2261
- function ListItem({
2262
- leading: leading2,
2263
- trailing: trailing2,
2264
- selected: selected3,
2265
- className,
2266
- children,
2267
- ...rest
2268
- }) {
2464
+ import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
2465
+ var ListItem = forwardRef32(function ListItem2({ leading: leading2, trailing: trailing2, selected: selected3, className, children, ...rest }, ref) {
2269
2466
  const styles = useStyles30({ selected: selected3, className });
2270
- return /* @__PURE__ */ jsxs29("div", { className: styles.root, ...rest, children: [
2467
+ return /* @__PURE__ */ jsxs30("div", { ref, className: styles.root, ...rest, children: [
2271
2468
  leading2 != null && /* @__PURE__ */ jsx44("span", { className: styles.leading, children: leading2 }),
2272
2469
  /* @__PURE__ */ jsx44("span", { className: styles.content, children }),
2273
2470
  trailing2 != null && /* @__PURE__ */ jsx44("span", { className: styles.trailing, children: trailing2 })
2274
2471
  ] });
2275
- }
2472
+ });
2276
2473
 
2277
2474
  // src/components/icons/chevron-up/index.tsx
2278
2475
  import { jsx as jsx45 } from "react/jsx-runtime";
@@ -2297,9 +2494,9 @@ function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2297
2494
  }
2298
2495
 
2299
2496
  // src/components/icons/search/index.tsx
2300
- import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
2497
+ import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
2301
2498
  function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2302
- return /* @__PURE__ */ jsxs30(
2499
+ return /* @__PURE__ */ jsxs31(
2303
2500
  "svg",
2304
2501
  {
2305
2502
  xmlns: "http://www.w3.org/2000/svg",
@@ -2322,9 +2519,9 @@ function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2322
2519
  }
2323
2520
 
2324
2521
  // src/components/icons/plus/index.tsx
2325
- import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
2522
+ import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
2326
2523
  function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2327
- return /* @__PURE__ */ jsxs31(
2524
+ return /* @__PURE__ */ jsxs32(
2328
2525
  "svg",
2329
2526
  {
2330
2527
  xmlns: "http://www.w3.org/2000/svg",
@@ -2369,9 +2566,9 @@ function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2369
2566
  }
2370
2567
 
2371
2568
  // src/components/icons/more-horizontal/index.tsx
2372
- import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
2569
+ import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
2373
2570
  function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2374
- return /* @__PURE__ */ jsxs32(
2571
+ return /* @__PURE__ */ jsxs33(
2375
2572
  "svg",
2376
2573
  {
2377
2574
  xmlns: "http://www.w3.org/2000/svg",
@@ -2401,7 +2598,7 @@ export {
2401
2598
  Badge,
2402
2599
  Breadcrumbs,
2403
2600
  Button,
2404
- Card,
2601
+ Card2 as Card,
2405
2602
  CheckIcon,
2406
2603
  Checkbox,
2407
2604
  ChevronDownIcon,