@hirobius/design-system 0.22.0 → 0.23.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.
Files changed (57) hide show
  1. package/AGENTS.md +11 -1
  2. package/CHANGELOG.md +74 -0
  3. package/CONSUMING.md +2 -2
  4. package/DESIGN.md +24 -24
  5. package/NOTICE.md +1 -1
  6. package/README.md +20 -12
  7. package/UPGRADING.md +22 -1
  8. package/dist/chunks/{empty-state-DNoThgfV.js → empty-state-ChC_xZfg.js} +109 -92
  9. package/dist/chunks/{form-By82qZcC.js → form-zCZ_B83I.js} +16 -16
  10. package/dist/css-contract.json +1 -0
  11. package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
  12. package/dist/fonts.css +5 -5
  13. package/dist/form.js +1 -1
  14. package/dist/hirobius-ui.js +1254 -1181
  15. package/dist/manifest.js +5 -4
  16. package/dist/patterns.js +164 -162
  17. package/dist/styles.css +1 -1
  18. package/dist/tokens.css +1 -1
  19. package/dist/tokens.js +14 -1
  20. package/dist/types/src/app/components/asset-img.d.ts +1 -0
  21. package/dist/types/src/app/components/button.d.ts +1 -1
  22. package/dist/types/src/app/components/callout.d.ts +2 -1
  23. package/dist/types/src/app/components/card.d.ts +5 -3
  24. package/dist/types/src/app/components/code-block.d.ts +1 -0
  25. package/dist/types/src/app/components/combobox.d.ts +1 -1
  26. package/dist/types/src/app/components/data-table-section.d.ts +1 -0
  27. package/dist/types/src/app/components/destructive-section.d.ts +1 -0
  28. package/dist/types/src/app/components/divider.d.ts +1 -1
  29. package/dist/types/src/app/components/form-actions.d.ts +1 -0
  30. package/dist/types/src/app/components/form.d.ts +1 -0
  31. package/dist/types/src/app/components/grid.d.ts +1 -1
  32. package/dist/types/src/app/components/icon.d.ts +1 -1
  33. package/dist/types/src/app/components/metric-tiles.d.ts +2 -0
  34. package/dist/types/src/app/components/page-header.d.ts +1 -0
  35. package/dist/types/src/app/components/page.d.ts +1 -0
  36. package/dist/types/src/app/components/reveal.d.ts +1 -0
  37. package/dist/types/src/app/components/stack.d.ts +1 -1
  38. package/dist/types/src/app/components/tabs.d.ts +3 -1
  39. package/dist/types/src/app/context/hds-theme.d.ts +1 -1
  40. package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -0
  41. package/dist/types/src/app/design-system/generated-token-values.d.ts +14 -1
  42. package/dist/types/src/app/hooks/useInteractionState.d.ts +7 -1
  43. package/dist/types/src/index.d.ts +47 -0
  44. package/dist/variables.css +33 -22
  45. package/docs/CONSUMING.md +2 -2
  46. package/hirobius.tokens.json +87 -40
  47. package/llms.txt +29 -7
  48. package/package.json +7 -6
  49. package/public/hds-manifest.json +257 -99
  50. package/public/llms/components.txt +1 -1
  51. package/public/llms-full.txt +54 -32
  52. package/public/llms.txt +29 -7
  53. package/src/app/data/component-api.json +51 -18
  54. package/upgrade/index.json +8 -1
  55. package/upgrade/releases/0.23.0.json +259 -0
  56. package/upgrade/schema.json +114 -1
  57. package/dist/fonts/geist-mono-400.woff2 +0 -0
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import h from "../tokens.js";
3
- import * as g from "react";
4
- import T, { useState as Q, useEffect as Z, forwardRef as me, useId as H } from "react";
2
+ import g from "../tokens.js";
3
+ import * as h from "react";
4
+ import _, { useState as Q, useEffect as Z, forwardRef as me, useId as H } from "react";
5
5
  import { jsx as s, jsxs as k, Fragment as fe } from "react/jsx-runtime";
6
6
  import { Slot as pe } from "@radix-ui/react-slot";
7
7
  import { cva as E } from "class-variance-authority";
@@ -24,7 +24,7 @@ function we() {
24
24
  }, []), t;
25
25
  }
26
26
  function Yt(t) {
27
- const e = we(), r = h.motion[t];
27
+ const e = we(), r = g.motion[t];
28
28
  return e ? { ...r, duration: 0 } : r;
29
29
  }
30
30
  const te = Symbol("hds.env.absent");
@@ -49,7 +49,7 @@ const ke = {
49
49
  bold: 2.5,
50
50
  fill: 2,
51
51
  duotone: 2
52
- }, Ce = /* @__PURE__ */ T.forwardRef(function({
52
+ }, Ce = /* @__PURE__ */ _.forwardRef(function({
53
53
  icon: e,
54
54
  size: r = "small",
55
55
  color: n = "currentColor",
@@ -60,7 +60,7 @@ const ke = {
60
60
  }, l) {
61
61
  if (L() && !e)
62
62
  return console.warn("[Icon] icon prop is missing or undefined. Provide a Lucide icon component."), null;
63
- const i = h.iconSize[r] || r, u = c ? ke[c] : void 0, p = {
63
+ const i = g.iconSize[r] || r, u = c ? ke[c] : void 0, p = {
64
64
  width: i,
65
65
  height: i,
66
66
  minWidth: i,
@@ -105,23 +105,23 @@ const Ne = {
105
105
  "zoom",
106
106
  "tabSize",
107
107
  "aspectRatio"
108
- ]), Re = /* @__PURE__ */ new Set([0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 32]), R = {
108
+ ]), Re = /* @__PURE__ */ new Set([0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 32]), D = {
109
109
  xs: "var(--semantic-space-scale-xs)",
110
110
  sm: "var(--semantic-space-scale-sm)",
111
111
  md: "var(--semantic-space-scale-md)",
112
112
  lg: "var(--semantic-space-scale-lg)",
113
113
  xl: "var(--semantic-space-scale-xl)"
114
114
  }, M = {
115
- tight: R.sm,
116
- normal: R.md,
117
- inset: R.lg,
118
- spacious: R.xl
115
+ tight: D.sm,
116
+ normal: D.md,
117
+ inset: D.lg,
118
+ spacious: D.xl
119
119
  }, De = {
120
120
  names: { ...M, medium: "var(--semantic-space-component-medium)" },
121
121
  closed: !0
122
122
  }, Te = {
123
123
  names: {
124
- ...R,
124
+ ...D,
125
125
  tight: "var(--semantic-space-layout-tight)",
126
126
  normal: "var(--semantic-space-layout-normal)",
127
127
  inset: "var(--semantic-space-layout-inset)",
@@ -250,12 +250,12 @@ function Ke(t) {
250
250
  return `hds-sx-${He(z(t))}`;
251
251
  }
252
252
  const U = /* @__PURE__ */ new Set();
253
- let D = null;
253
+ let T = null;
254
254
  function We() {
255
255
  if (typeof document > "u") return null;
256
- if (D && D.isConnected) return D;
256
+ if (T && T.isConnected) return T;
257
257
  let t = document.querySelector("style[data-hds-sx]");
258
- return t || (t = document.createElement("style"), t.setAttribute("data-hds-sx", ""), document.head.appendChild(t)), D = t, D;
258
+ return t || (t = document.createElement("style"), t.setAttribute("data-hds-sx", ""), document.head.appendChild(t)), T = t, T;
259
259
  }
260
260
  function Xt(t) {
261
261
  const e = Ke(t);
@@ -273,7 +273,7 @@ function Xt(t) {
273
273
  return e;
274
274
  }
275
275
  const Ue = /* @__PURE__ */ E(
276
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md transition-[colors,filter] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:inset-shadow-[0_0_0_9999px] active:inset-shadow-pressed-overlay/5 [&_svg]:pointer-events-none [&_svg]:shrink-0",
276
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md transition-[colors,filter] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:bg-muted disabled:text-[var(--semantic-color-content-disabled)] active:inset-shadow-[0_0_0_9999px] active:inset-shadow-pressed-overlay/5 [&_svg]:pointer-events-none [&_svg]:shrink-0",
277
277
  {
278
278
  variants: {
279
279
  variant: {
@@ -293,6 +293,12 @@ const Ue = /* @__PURE__ */ E(
293
293
  // leaks the variant's class through (the reason the hover pair is here).
294
294
  // A consumer `className` comes last and overrides tone the same way.
295
295
  // Drives the destructive/status actions consumers previously kept on MUI.
296
+ // A tone sets its own bg/text. When disabled, the base string's
297
+ // `disabled:bg-muted` / `disabled:text-…` win via the `:disabled`
298
+ // pseudo-class (higher specificity than the tone's unmodified color), so
299
+ // a disabled toned button reads neutral-disabled WITHOUT the tone needing
300
+ // its own disabled classes — which would break the tone-over-variant
301
+ // contract. So tones stay color-only here.
296
302
  tone: {
297
303
  neutral: "",
298
304
  danger: "border-transparent bg-feedback-bg-danger text-feedback-danger hover:bg-feedback-bg-danger hover:border-transparent hover:brightness-95 dark:hover:brightness-110",
@@ -324,7 +330,7 @@ const Ue = /* @__PURE__ */ E(
324
330
  }
325
331
  ), Ye = "data-[pressed=true]:border-transparent data-[pressed=true]:bg-primary data-[pressed=true]:text-primary-foreground data-[pressed=true]:hover:bg-primary/90";
326
332
  let Y = !1, X = !1;
327
- const Ft = /* @__PURE__ */ g.forwardRef(
333
+ const Ft = /* @__PURE__ */ h.forwardRef(
328
334
  function({
329
335
  className: e,
330
336
  variant: r,
@@ -344,8 +350,8 @@ const Ft = /* @__PURE__ */ g.forwardRef(
344
350
  onPressedChange: v,
345
351
  onClick: w,
346
352
  ...C
347
- }, _) {
348
- const P = p || l, S = m ?? d, N = f !== void 0 || x !== void 0 || v !== void 0, [de, le] = g.useState(x ?? !1), O = f ?? de, B = N ? {
353
+ }, P) {
354
+ const R = p || l, S = m ?? d, N = f !== void 0 || x !== void 0 || v !== void 0, [de, le] = h.useState(x ?? !1), O = f ?? de, B = N ? {
349
355
  "aria-pressed": O,
350
356
  "data-pressed": O ? "true" : "false",
351
357
  onClick: (G) => {
@@ -359,10 +365,14 @@ const Ft = /* @__PURE__ */ g.forwardRef(
359
365
  return c ? /* @__PURE__ */ s(
360
366
  pe,
361
367
  {
362
- ref: _,
363
- className: V,
364
- "aria-disabled": P || void 0,
368
+ ref: P,
369
+ className: y(
370
+ V,
371
+ R && "pointer-events-none text-[var(--semantic-color-content-disabled)]"
372
+ ),
373
+ "aria-disabled": R || void 0,
365
374
  "aria-busy": l || void 0,
375
+ tabIndex: R ? -1 : void 0,
366
376
  "data-state": l ? "loading" : void 0,
367
377
  "data-variant": r ?? void 0,
368
378
  "data-tone": n ?? void 0,
@@ -378,9 +388,9 @@ const Ft = /* @__PURE__ */ g.forwardRef(
378
388
  )), /* @__PURE__ */ k(
379
389
  "button",
380
390
  {
381
- ref: _,
391
+ ref: P,
382
392
  type: b,
383
- disabled: P,
393
+ disabled: R,
384
394
  "aria-busy": l || void 0,
385
395
  ...o && d ? { "aria-label": d } : {},
386
396
  "data-state": l ? "loading" : void 0,
@@ -391,7 +401,7 @@ const Ft = /* @__PURE__ */ g.forwardRef(
391
401
  ...B,
392
402
  ...C,
393
403
  children: [
394
- l ? /* @__PURE__ */ s(ge, { className: "animate-spin", "aria-hidden": "true" }) : i,
404
+ l ? /* @__PURE__ */ s(ge, { className: "animate-spin motion-reduce:animate-none", "aria-hidden": "true" }) : i,
395
405
  !o && S,
396
406
  !l && !o && u
397
407
  ]
@@ -450,7 +460,7 @@ function Je(t) {
450
460
  return qe[t] ?? "0";
451
461
  }
452
462
  const Qe = {
453
- names: { ...h.space, ...M },
463
+ names: { ...g.space, ...M },
454
464
  numbers: "raw"
455
465
  }, Ze = /* @__PURE__ */ E("flex flex-col rounded-lg bg-card text-card-foreground", {
456
466
  variants: {
@@ -486,7 +496,7 @@ function rt(t) {
486
496
  const e = (n = (r = t.target).closest) == null ? void 0 : n.call(r, tt);
487
497
  return !!e && e !== t.currentTarget && t.currentTarget.contains(e);
488
498
  }
489
- const nt = /* @__PURE__ */ g.forwardRef(function({
499
+ const nt = /* @__PURE__ */ h.forwardRef(function({
490
500
  className: e,
491
501
  padding: r = "component",
492
502
  gap: n = "tight",
@@ -502,7 +512,7 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
502
512
  children: b,
503
513
  ...f
504
514
  }, x) {
505
- const v = o ?? "div", w = a ? "none" : r, C = Je(w), _ = w === "none" ? "0" : $(n, Qe), P = u ? {
515
+ const v = o ?? "div", w = a ? "none" : r, C = Je(w), P = w === "none" ? "0" : $(n, Qe), R = u ? {
506
516
  role: "checkbox",
507
517
  "aria-checked": p,
508
518
  tabIndex: 0,
@@ -531,28 +541,28 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
531
541
  ),
532
542
  style: {
533
543
  padding: C,
534
- gap: _,
544
+ gap: P,
535
545
  ...c
536
546
  },
537
547
  ...f,
538
- ...P,
548
+ ...R,
539
549
  children: b
540
550
  }
541
551
  );
542
- }), at = /* @__PURE__ */ g.forwardRef(
552
+ }), at = /* @__PURE__ */ h.forwardRef(
543
553
  function({ className: e, metadata: r, children: n, ...a }, o) {
544
554
  return r !== void 0 ? /* @__PURE__ */ k("div", { ref: o, className: y("flex flex-col gap-3 p-6", e), ...a, children: [
545
555
  /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: r }),
546
556
  /* @__PURE__ */ s("div", { className: "flex flex-col space-y-1.5 min-w-0", children: n })
547
557
  ] }) : /* @__PURE__ */ s("div", { ref: o, className: y("flex flex-col space-y-1.5 p-6", e), ...a, children: n });
548
558
  }
549
- ), ot = /* @__PURE__ */ g.forwardRef(function({ className: e, children: r, ...n }, a) {
559
+ ), ot = /* @__PURE__ */ h.forwardRef(function({ className: e, children: r, ...n }, a) {
550
560
  return /* @__PURE__ */ s(I, { ref: a, as: "h3", variant: "title", className: e, ...n, children: r });
551
- }), st = /* @__PURE__ */ g.forwardRef(function({ className: e, children: r, ...n }, a) {
561
+ }), st = /* @__PURE__ */ h.forwardRef(function({ className: e, children: r, ...n }, a) {
552
562
  return /* @__PURE__ */ s(I, { ref: a, variant: "caption", className: y("text-muted-foreground", e), ...n, children: r });
553
- }), it = /* @__PURE__ */ g.forwardRef(function({ className: e, ...r }, n) {
563
+ }), it = /* @__PURE__ */ h.forwardRef(function({ className: e, ...r }, n) {
554
564
  return /* @__PURE__ */ s("div", { ref: n, className: y("p-6 pt-0", e), ...r });
555
- }), ct = /* @__PURE__ */ g.forwardRef(function({ className: e, ...r }, n) {
565
+ }), ct = /* @__PURE__ */ h.forwardRef(function({ className: e, ...r }, n) {
556
566
  return /* @__PURE__ */ s("div", { ref: n, className: y("flex items-center p-6 pt-0", e), ...r });
557
567
  }), dt = {
558
568
  neutral: "var(--semantic-color-content-accent)",
@@ -560,7 +570,7 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
560
570
  success: "var(--semantic-color-feedback-success)",
561
571
  warning: "var(--semantic-color-feedback-warning)",
562
572
  danger: "var(--semantic-color-feedback-error)"
563
- }, lt = /* @__PURE__ */ g.forwardRef(
573
+ }, lt = /* @__PURE__ */ h.forwardRef(
564
574
  function({ className: e, value: r, max: n = 100, label: a, tone: o = "neutral", style: c, ...d }, l) {
565
575
  const i = Math.max(0, Math.min(r, n)), u = n > 0 ? i / n * 100 : 0;
566
576
  return /* @__PURE__ */ k(
@@ -582,7 +592,7 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
582
592
  style: {
583
593
  height: "4px",
584
594
  background: "var(--semantic-color-border-default)",
585
- borderRadius: h.borderRadius[2],
595
+ borderRadius: g.borderRadius[2],
586
596
  overflow: "hidden"
587
597
  },
588
598
  children: /* @__PURE__ */ s(
@@ -594,8 +604,8 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
594
604
  transform: `scaleX(${u / 100})`,
595
605
  transformOrigin: "left",
596
606
  background: dt[o],
597
- borderRadius: h.borderRadius[2],
598
- transition: `transform ${h.motion.expressive.duration}s ease-out`
607
+ borderRadius: g.borderRadius[2],
608
+ transition: `transform ${g.motion.expressive.duration}s ease-out`
599
609
  }
600
610
  }
601
611
  )
@@ -605,7 +615,7 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
605
615
  "p",
606
616
  {
607
617
  style: {
608
- ...h.typeStyles.caption,
618
+ ...g.typeStyles.caption,
609
619
  margin: "6px 0 0",
610
620
  color: "var(--semantic-color-content-secondary)"
611
621
  },
@@ -622,14 +632,14 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
622
632
  success: "var(--semantic-color-feedback-success)",
623
633
  warning: "var(--semantic-color-feedback-warning)",
624
634
  danger: "var(--semantic-color-feedback-error)"
625
- }, mt = /* @__PURE__ */ g.forwardRef(
635
+ }, mt = /* @__PURE__ */ h.forwardRef(
626
636
  function({ className: e, label: r, value: n, sub: a, tone: o = "neutral", style: c, ...d }, l) {
627
637
  return /* @__PURE__ */ k("div", { ref: l, className: y("flex flex-col px-6", e), style: c, ...d, children: [
628
638
  /* @__PURE__ */ s(
629
639
  "p",
630
640
  {
631
641
  style: {
632
- ...h.typeStyles.caption,
642
+ ...g.typeStyles.caption,
633
643
  margin: "0 0 6px",
634
644
  color: "var(--semantic-color-content-secondary)"
635
645
  },
@@ -640,7 +650,7 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
640
650
  "p",
641
651
  {
642
652
  style: {
643
- ...h.typeStyles.title,
653
+ ...g.typeStyles.title,
644
654
  margin: 0,
645
655
  color: ut[o]
646
656
  },
@@ -651,7 +661,7 @@ const nt = /* @__PURE__ */ g.forwardRef(function({
651
661
  "p",
652
662
  {
653
663
  style: {
654
- ...h.typeStyles.caption,
664
+ ...g.typeStyles.caption,
655
665
  margin: "4px 0 0",
656
666
  color: "var(--semantic-color-content-secondary)"
657
667
  },
@@ -690,12 +700,12 @@ function Jt({
690
700
  };
691
701
  return /* @__PURE__ */ s("div", { className: a, style: o, children: t });
692
702
  }
693
- const ae = /* @__PURE__ */ g.createContext({}), oe = /* @__PURE__ */ g.createContext(null);
703
+ const ae = /* @__PURE__ */ h.createContext({}), oe = /* @__PURE__ */ h.createContext(null);
694
704
  function pt() {
695
- return g.useContext(oe);
705
+ return h.useContext(oe);
696
706
  }
697
707
  function Qt() {
698
- return g.useContext(ae);
708
+ return h.useContext(ae);
699
709
  }
700
710
  function Zt({
701
711
  theme: t,
@@ -708,10 +718,10 @@ function Zt({
708
718
  style: d,
709
719
  children: l
710
720
  }) {
711
- const i = g.useMemo(
721
+ const i = h.useMemo(
712
722
  () => ({ theme: t, density: e, brand: r, fontFamily: n, fontFamilyMono: a }),
713
723
  [t, e, r, n, a]
714
- ), [u, p] = g.useState(null), m = {};
724
+ ), [u, p] = h.useState(null), m = {};
715
725
  return n && (m["--hds-font-family"] = n), a && (m["--hds-font-family-mono"] = a), /* @__PURE__ */ s(ae.Provider, { value: i, children: /* @__PURE__ */ s(oe.Provider, { value: u, children: /* @__PURE__ */ s(
716
726
  o,
717
727
  {
@@ -727,12 +737,12 @@ function Zt({
727
737
  }
728
738
  ) }) });
729
739
  }
730
- const gt = typeof document > "u" ? g.useEffect : g.useLayoutEffect;
740
+ const gt = typeof document > "u" ? h.useEffect : h.useLayoutEffect;
731
741
  function F(t) {
732
742
  return t === document.documentElement || t === document.body;
733
743
  }
734
744
  function ht(t) {
735
- const e = pt(), r = g.useRef(null), [n, a] = g.useState(void 0), o = t === void 0 && e === null;
745
+ const e = pt(), r = h.useRef(null), [n, a] = h.useState(void 0), o = t === void 0 && e === null;
736
746
  gt(() => {
737
747
  var l;
738
748
  if (!o) return;
@@ -759,7 +769,7 @@ const er = /* @__PURE__ */ se(function({
759
769
  children: r
760
770
  }) {
761
771
  return be(r, e ?? document.body);
762
- }), yt = /* @__PURE__ */ T.forwardRef(function({ children: e, colSpan: r, colOffset: n, style: a, className: o, as: c = "div" }, d) {
772
+ }), yt = /* @__PURE__ */ _.forwardRef(function({ children: e, colSpan: r, colOffset: n, style: a, className: o, as: c = "div" }, d) {
763
773
  const l = {
764
774
  ...r !== void 0 && { gridColumn: `span min(var(--current-cols, 12), ${r})` },
765
775
  ...n !== void 0 && { gridColumnStart: n },
@@ -774,9 +784,9 @@ const er = /* @__PURE__ */ se(function({
774
784
  stretch: "stretch"
775
785
  }, q = "280px";
776
786
  function bt(t, e) {
777
- return t <= h.breakpoints.sm ? Math.min(4, e) : t <= h.breakpoints.lg ? Math.min(8, e) : e;
787
+ return t <= g.breakpoints.sm ? Math.min(4, e) : t <= g.breakpoints.lg ? Math.min(8, e) : e;
778
788
  }
779
- const xt = /* @__PURE__ */ T.forwardRef(function({
789
+ const xt = /* @__PURE__ */ _.forwardRef(function({
780
790
  children: e,
781
791
  layout: r = "fixed",
782
792
  minItemWidth: n,
@@ -836,16 +846,16 @@ const xt = /* @__PURE__ */ T.forwardRef(function({
836
846
  "space-between": "space-between"
837
847
  }, kt = {
838
848
  names: {
839
- ...h.space,
849
+ ...g.space,
840
850
  ...M,
841
- gap: R.xs,
851
+ gap: D.xs,
842
852
  medium: "var(--semantic-space-component-medium)",
843
853
  hairline: "var(--semantic-space-subgrid-hairline)",
844
854
  xs: "var(--semantic-space-subgrid-xs)",
845
855
  stack: "var(--semantic-space-section-stack)"
846
856
  },
847
857
  numbers: "raw"
848
- }, rr = /* @__PURE__ */ T.forwardRef(function({
858
+ }, rr = /* @__PURE__ */ _.forwardRef(function({
849
859
  children: e,
850
860
  direction: r = "column",
851
861
  gap: n = "tight",
@@ -896,7 +906,7 @@ const xt = /* @__PURE__ */ T.forwardRef(function({
896
906
  },
897
907
  defaultVariants: { padding: "component", shadow: !1 }
898
908
  }
899
- ), At = /* @__PURE__ */ T.forwardRef(
909
+ ), At = /* @__PURE__ */ _.forwardRef(
900
910
  function({
901
911
  children: e,
902
912
  padding: r = "component",
@@ -958,7 +968,10 @@ const xt = /* @__PURE__ */ T.forwardRef(function({
958
968
  defaultVariants: { align: "left" }
959
969
  }
960
970
  ), Et = /* @__PURE__ */ E(
961
- "flex items-start px-[var(--semantic-space-surface-padding)]",
971
+ // items-center (not items-start) so mixed cell content lines up on a shared
972
+ // vertical center — a badge/status slot no longer floats above its text
973
+ // siblings in the same row. Matches the header cell's items-center.
974
+ "flex items-center px-[var(--semantic-space-surface-padding)]",
962
975
  {
963
976
  variants: {
964
977
  align: {
@@ -979,18 +992,18 @@ const xt = /* @__PURE__ */ T.forwardRef(function({
979
992
  defaultVariants: { align: "left", divider: !0 }
980
993
  }
981
994
  ), Rt = {
982
- label: h.typeStyles.ui,
983
- value: h.typeStyles.ui,
995
+ label: g.typeStyles.ui,
996
+ value: g.typeStyles.ui,
984
997
  description: {
985
- ...h.typeStyles.caption,
998
+ ...g.typeStyles.caption,
986
999
  color: "var(--semantic-color-content-secondary)"
987
1000
  },
988
- token: h.typeStyles.mono,
989
- code: h.typeStyles.mono,
990
- custom: h.typeStyles.ui,
991
- icon: h.typeStyles.caption,
992
- badge: h.typeStyles.caption,
993
- action: h.typeStyles.ui
1001
+ token: g.typeStyles.mono,
1002
+ code: g.typeStyles.mono,
1003
+ custom: g.typeStyles.ui,
1004
+ icon: g.typeStyles.caption,
1005
+ badge: g.typeStyles.caption,
1006
+ action: g.typeStyles.ui
994
1007
  };
995
1008
  function nr({
996
1009
  columns: t,
@@ -1006,21 +1019,25 @@ function nr({
1006
1019
  }) {
1007
1020
  const u = H(), p = H(), m = !!r, b = m ? u : o;
1008
1021
  return /* @__PURE__ */ k("div", { className: "min-w-0 max-w-full", children: [
1009
- r || a ? /* @__PURE__ */ k("div", { children: [
1010
- r ? /* @__PURE__ */ k("div", { className: "flex items-center justify-between", children: [
1011
- /* @__PURE__ */ s(
1012
- "div",
1013
- {
1014
- id: m ? u : void 0,
1015
- className: "m-0 text-primary",
1016
- style: h.typeStyles.ui,
1017
- children: r
1018
- }
1019
- ),
1020
- n ?? null
1021
- ] }) : null,
1022
- a ? /* @__PURE__ */ s("div", { className: "text-secondary", style: h.typeStyles.ui, children: a }) : null
1023
- ] }) : null,
1022
+ r || a ? (
1023
+ // inline-ok: token-driven gap so the caption/description block doesn't
1024
+ // touch the table's header band below it.
1025
+ /* @__PURE__ */ k("div", { style: { marginBottom: g.semantic.space.scale.sm }, children: [
1026
+ r ? /* @__PURE__ */ k("div", { className: "flex items-center justify-between", children: [
1027
+ /* @__PURE__ */ s(
1028
+ "div",
1029
+ {
1030
+ id: m ? u : void 0,
1031
+ className: "m-0 text-primary",
1032
+ style: g.typeStyles.ui,
1033
+ children: r
1034
+ }
1035
+ ),
1036
+ n ?? null
1037
+ ] }) : null,
1038
+ a ? /* @__PURE__ */ s("div", { className: "text-secondary", style: g.typeStyles.ui, children: a }) : null
1039
+ ] })
1040
+ ) : null,
1024
1041
  /* @__PURE__ */ s(
1025
1042
  At,
1026
1043
  {
@@ -1055,7 +1072,7 @@ function nr({
1055
1072
  sticky: !!i
1056
1073
  })
1057
1074
  ),
1058
- style: h.typeStyles.caption,
1075
+ style: g.typeStyles.caption,
1059
1076
  children: f.label
1060
1077
  },
1061
1078
  f.key
@@ -1073,7 +1090,7 @@ function nr({
1073
1090
  sticky: !!i
1074
1091
  })
1075
1092
  ),
1076
- style: h.typeStyles.caption,
1093
+ style: g.typeStyles.caption,
1077
1094
  children: /* @__PURE__ */ k(
1078
1095
  "button",
1079
1096
  {
@@ -1116,7 +1133,7 @@ function nr({
1116
1133
  function Dt(t) {
1117
1134
  return /* @__PURE__ */ s(A.Root, { ...t });
1118
1135
  }
1119
- const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.Cancel, ce = /* @__PURE__ */ g.forwardRef(function({ className: e, ...r }, n) {
1136
+ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.Cancel, ce = /* @__PURE__ */ h.forwardRef(function({ className: e, ...r }, n) {
1120
1137
  return /* @__PURE__ */ s(
1121
1138
  A.Overlay,
1122
1139
  {
@@ -1125,7 +1142,7 @@ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.C
1125
1142
  ...r
1126
1143
  }
1127
1144
  );
1128
- }), Ot = /* @__PURE__ */ g.forwardRef(function({ className: e, container: r, ...n }, a) {
1145
+ }), Ot = /* @__PURE__ */ h.forwardRef(function({ className: e, container: r, ...n }, a) {
1129
1146
  return /* @__PURE__ */ k(ie, { container: r, children: [
1130
1147
  /* @__PURE__ */ s(ce, {}),
1131
1148
  /* @__PURE__ */ s(
@@ -1141,9 +1158,9 @@ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.C
1141
1158
  }
1142
1159
  )
1143
1160
  ] });
1144
- }), $t = /* @__PURE__ */ g.forwardRef(function({ className: e, ...r }, n) {
1161
+ }), $t = /* @__PURE__ */ h.forwardRef(function({ className: e, ...r }, n) {
1145
1162
  return /* @__PURE__ */ s("div", { ref: n, className: y("flex flex-col space-y-1.5 text-left", e), ...r });
1146
- }), It = /* @__PURE__ */ g.forwardRef(function({ className: e, ...r }, n) {
1163
+ }), It = /* @__PURE__ */ h.forwardRef(function({ className: e, ...r }, n) {
1147
1164
  return /* @__PURE__ */ s(
1148
1165
  "div",
1149
1166
  {
@@ -1152,9 +1169,9 @@ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.C
1152
1169
  ...r
1153
1170
  }
1154
1171
  );
1155
- }), Lt = /* @__PURE__ */ g.forwardRef(function({ className: e, children: r, ...n }, a) {
1172
+ }), Lt = /* @__PURE__ */ h.forwardRef(function({ className: e, children: r, ...n }, a) {
1156
1173
  return /* @__PURE__ */ s(A.Title, { asChild: !0, children: /* @__PURE__ */ s(I, { ref: a, as: "h2", variant: "title", className: e, ...n, children: r }) });
1157
- }), jt = /* @__PURE__ */ g.forwardRef(function({ className: e, children: r, ...n }, a) {
1174
+ }), jt = /* @__PURE__ */ h.forwardRef(function({ className: e, children: r, ...n }, a) {
1158
1175
  return /* @__PURE__ */ s(A.Description, { asChild: !0, children: /* @__PURE__ */ s(
1159
1176
  I,
1160
1177
  {
@@ -1180,7 +1197,7 @@ const Tt = A.Trigger, ie = /* @__PURE__ */ se(A.Portal), _t = A.Action, Pt = A.C
1180
1197
  // Set here, not by a later `AlertDialog.displayName = …` write: a top-level
1181
1198
  // property write is a side effect that keeps the module alive.
1182
1199
  displayName: "AlertDialog"
1183
- }), or = /* @__PURE__ */ g.forwardRef(
1200
+ }), or = /* @__PURE__ */ h.forwardRef(
1184
1201
  function({ title: e, description: r, className: n }, a) {
1185
1202
  return /* @__PURE__ */ k(
1186
1203
  "div",
@@ -2,45 +2,45 @@
2
2
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
3
3
  import * as s from "react";
4
4
  import { cn as m } from "../cn.js";
5
- const I = /* @__PURE__ */ s.forwardRef(function({ className: e, ...n }, o) {
6
- return /* @__PURE__ */ f("form", { ref: o, className: m("flex flex-col gap-4", e), ...n });
5
+ const I = /* @__PURE__ */ s.forwardRef(function({ className: e, ...n }, r) {
6
+ return /* @__PURE__ */ f("form", { ref: r, className: m("flex flex-col gap-4", e), ...n });
7
7
  });
8
8
  function x({
9
9
  htmlFor: c,
10
10
  childId: e,
11
11
  description: n,
12
- error: o
12
+ error: r
13
13
  }) {
14
- const i = s.useId(), r = c ?? e ?? i, d = `${r}-description`, t = `${r}-error`, a = [n ? d : null, o ? t : null].filter(Boolean).join(" ") || void 0;
15
- return { controlId: r, descriptionId: d, errorId: t, describedBy: a };
14
+ const o = s.useId(), i = c ?? e ?? o, d = `${i}-description`, t = `${i}-error`, a = [n && !r ? d : null, r ? t : null].filter(Boolean).join(" ") || void 0;
15
+ return { controlId: i, descriptionId: d, errorId: t, describedBy: a };
16
16
  }
17
17
  const b = /* @__PURE__ */ s.forwardRef(
18
- function({ controlId: e, label: n, description: o, error: i, required: r = !1, className: d, children: t }, a) {
18
+ function({ controlId: e, label: n, description: r, error: o, required: i = !1, className: d, children: t }, a) {
19
19
  const l = `${e}-description`, u = `${e}-error`;
20
20
  return /* @__PURE__ */ p("div", { ref: a, className: m("flex flex-col gap-2", d), children: [
21
21
  /* @__PURE__ */ p("label", { htmlFor: e, className: "hds-type-ui text-foreground", children: [
22
22
  n,
23
- r ? /* @__PURE__ */ p("span", { "aria-hidden": "true", className: "text-destructive", children: [
23
+ i ? /* @__PURE__ */ p("span", { "aria-hidden": "true", className: "text-destructive", children: [
24
24
  " ",
25
25
  "*"
26
26
  ] }) : null
27
27
  ] }),
28
28
  t,
29
- o && !i ? /* @__PURE__ */ f("p", { id: l, className: "hds-type-caption text-muted-foreground", children: o }) : null,
30
- i ? /* @__PURE__ */ f("p", { id: u, role: "alert", className: "hds-type-caption text-destructive", children: i }) : null
29
+ r && !o ? /* @__PURE__ */ f("p", { id: l, className: "hds-type-caption text-muted-foreground", children: r }) : null,
30
+ o ? /* @__PURE__ */ f("p", { id: u, role: "alert", className: "hds-type-caption text-destructive", children: o }) : null
31
31
  ] });
32
32
  }
33
33
  ), g = /* @__PURE__ */ s.forwardRef(
34
- function({ label: e, children: n, htmlFor: o, description: i, error: r, required: d = !1, className: t }, a) {
34
+ function({ label: e, children: n, htmlFor: r, description: o, error: i, required: d = !1, className: t }, a) {
35
35
  const l = s.Children.only(n), { controlId: u, describedBy: h } = x({
36
- htmlFor: o,
36
+ htmlFor: r,
37
37
  childId: l.props.id,
38
- description: i,
39
- error: r
38
+ description: o,
39
+ error: i
40
40
  }), F = s.cloneElement(l, {
41
41
  id: u,
42
42
  required: l.props.required ?? d,
43
- "aria-invalid": r ? !0 : l.props["aria-invalid"],
43
+ "aria-invalid": i ? !0 : l.props["aria-invalid"],
44
44
  "aria-describedby": [l.props["aria-describedby"], h].filter(Boolean).join(" ") || void 0
45
45
  });
46
46
  return /* @__PURE__ */ f(
@@ -49,8 +49,8 @@ const b = /* @__PURE__ */ s.forwardRef(
49
49
  ref: a,
50
50
  controlId: u,
51
51
  label: e,
52
- description: i,
53
- error: r,
52
+ description: o,
53
+ error: i,
54
54
  required: d,
55
55
  className: t,
56
56
  children: F