@lerianstudio/sindarian-ui 1.4.0-beta.2 → 1.4.0-beta.4

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 (120) hide show
  1. package/dist/components/entity-box/index.d.ts +11 -2
  2. package/dist/components/entity-box/index.d.ts.map +1 -1
  3. package/dist/components/entity-box/index.js +3 -3
  4. package/dist/components/form/input-field/index.d.ts +12 -2
  5. package/dist/components/form/input-field/index.d.ts.map +1 -1
  6. package/dist/components/form/input-field/index.js +29 -5
  7. package/dist/components/form/select-field/index.d.ts +29 -5
  8. package/dist/components/form/select-field/index.d.ts.map +1 -1
  9. package/dist/components/form/select-field/index.js +33 -10
  10. package/dist/components/page-header/index.d.ts +8 -2
  11. package/dist/components/page-header/index.d.ts.map +1 -1
  12. package/dist/components/page-header/index.js +4 -4
  13. package/dist/components/ui/badge/index.d.ts +8 -0
  14. package/dist/components/ui/badge/index.d.ts.map +1 -1
  15. package/dist/components/ui/badge/index.js +9 -1
  16. package/dist/components/ui/form.d.ts +4 -4
  17. package/dist/components/ui/form.d.ts.map +1 -1
  18. package/dist/components/ui/form.js +12 -6
  19. package/dist/components/ui/multiple-select/index.d.ts +11 -3
  20. package/dist/components/ui/multiple-select/index.d.ts.map +1 -1
  21. package/dist/components/ui/select/index.d.ts +5 -0
  22. package/dist/components/ui/select/index.d.ts.map +1 -1
  23. package/dist/components/ui/select/index.js +24 -1
  24. package/dist/domain/blotter/index.d.ts +2 -2
  25. package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  26. package/dist/domain/delinquency-aging/aging-buckets.js +1 -1
  27. package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
  28. package/dist/domain/delinquency-aging/index.js +1 -1
  29. package/dist/domain/figure/index.d.ts +11 -9
  30. package/dist/domain/figure/index.d.ts.map +1 -1
  31. package/dist/domain/figure/index.js +8 -8
  32. package/dist/domain/key-id/index.d.ts +1 -1
  33. package/dist/domain/key-id/index.d.ts.map +1 -1
  34. package/dist/domain/key-id/index.js +1 -1
  35. package/dist/domain/section-label/index.d.ts +10 -7
  36. package/dist/domain/section-label/index.d.ts.map +1 -1
  37. package/dist/domain/status-rail/index.d.ts +1 -1
  38. package/dist/domain/status-rail/index.d.ts.map +1 -1
  39. package/dist/domain/status-rail/index.js +8 -4
  40. package/dist/enterprise/alert-banner/index.d.ts +5 -3
  41. package/dist/enterprise/alert-banner/index.d.ts.map +1 -1
  42. package/dist/enterprise/alert-banner/index.js +2 -2
  43. package/dist/enterprise/data-table/column-size.d.ts +70 -0
  44. package/dist/enterprise/data-table/column-size.d.ts.map +1 -0
  45. package/dist/enterprise/data-table/column-size.js +103 -0
  46. package/dist/enterprise/data-table/index.d.ts.map +1 -1
  47. package/dist/enterprise/data-table/index.js +22 -2
  48. package/dist/enterprise/date-range-picker/index.d.ts.map +1 -1
  49. package/dist/enterprise/date-range-picker/index.js +1 -2
  50. package/dist/enterprise/stat-card/index.d.ts +3 -3
  51. package/dist/enterprise/stat-card/index.d.ts.map +1 -1
  52. package/dist/enterprise/stat-card/index.js +1 -1
  53. package/dist/enterprise/status-badge/index.js +1 -1
  54. package/dist/enterprise/virtualized-table/index.d.ts +18 -2
  55. package/dist/enterprise/virtualized-table/index.d.ts.map +1 -1
  56. package/dist/enterprise/virtualized-table/index.js +31 -4
  57. package/dist/esm/components/entity-box/index.d.ts +11 -2
  58. package/dist/esm/components/entity-box/index.d.ts.map +1 -1
  59. package/dist/esm/components/entity-box/index.js +3 -3
  60. package/dist/esm/components/form/input-field/index.d.ts +12 -2
  61. package/dist/esm/components/form/input-field/index.d.ts.map +1 -1
  62. package/dist/esm/components/form/input-field/index.js +29 -5
  63. package/dist/esm/components/form/select-field/index.d.ts +29 -5
  64. package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
  65. package/dist/esm/components/form/select-field/index.js +33 -10
  66. package/dist/esm/components/page-header/index.d.ts +8 -2
  67. package/dist/esm/components/page-header/index.d.ts.map +1 -1
  68. package/dist/esm/components/page-header/index.js +4 -4
  69. package/dist/esm/components/ui/badge/index.d.ts +8 -0
  70. package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
  71. package/dist/esm/components/ui/badge/index.js +9 -1
  72. package/dist/esm/components/ui/form.d.ts +4 -4
  73. package/dist/esm/components/ui/form.d.ts.map +1 -1
  74. package/dist/esm/components/ui/form.js +12 -6
  75. package/dist/esm/components/ui/multiple-select/index.d.ts +11 -3
  76. package/dist/esm/components/ui/multiple-select/index.d.ts.map +1 -1
  77. package/dist/esm/components/ui/select/index.d.ts +5 -0
  78. package/dist/esm/components/ui/select/index.d.ts.map +1 -1
  79. package/dist/esm/components/ui/select/index.js +24 -1
  80. package/dist/esm/domain/blotter/index.d.ts +2 -2
  81. package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  82. package/dist/esm/domain/delinquency-aging/aging-buckets.js +1 -1
  83. package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
  84. package/dist/esm/domain/delinquency-aging/index.js +1 -1
  85. package/dist/esm/domain/figure/index.d.ts +11 -9
  86. package/dist/esm/domain/figure/index.d.ts.map +1 -1
  87. package/dist/esm/domain/figure/index.js +8 -8
  88. package/dist/esm/domain/key-id/index.d.ts +1 -1
  89. package/dist/esm/domain/key-id/index.d.ts.map +1 -1
  90. package/dist/esm/domain/key-id/index.js +1 -1
  91. package/dist/esm/domain/section-label/index.d.ts +10 -7
  92. package/dist/esm/domain/section-label/index.d.ts.map +1 -1
  93. package/dist/esm/domain/status-rail/index.d.ts +1 -1
  94. package/dist/esm/domain/status-rail/index.d.ts.map +1 -1
  95. package/dist/esm/domain/status-rail/index.js +8 -4
  96. package/dist/esm/enterprise/alert-banner/index.d.ts +5 -3
  97. package/dist/esm/enterprise/alert-banner/index.d.ts.map +1 -1
  98. package/dist/esm/enterprise/alert-banner/index.js +2 -2
  99. package/dist/esm/enterprise/data-table/column-size.d.ts +70 -0
  100. package/dist/esm/enterprise/data-table/column-size.d.ts.map +1 -0
  101. package/dist/esm/enterprise/data-table/column-size.js +97 -0
  102. package/dist/esm/enterprise/data-table/index.d.ts.map +1 -1
  103. package/dist/esm/enterprise/data-table/index.js +22 -2
  104. package/dist/esm/enterprise/date-range-picker/index.d.ts.map +1 -1
  105. package/dist/esm/enterprise/date-range-picker/index.js +1 -2
  106. package/dist/esm/enterprise/stat-card/index.d.ts +3 -3
  107. package/dist/esm/enterprise/stat-card/index.d.ts.map +1 -1
  108. package/dist/esm/enterprise/stat-card/index.js +1 -1
  109. package/dist/esm/enterprise/status-badge/index.js +1 -1
  110. package/dist/esm/enterprise/virtualized-table/index.d.ts +18 -2
  111. package/dist/esm/enterprise/virtualized-table/index.d.ts.map +1 -1
  112. package/dist/esm/enterprise/virtualized-table/index.js +31 -4
  113. package/dist/esm/lib/typography.d.ts +21 -6
  114. package/dist/esm/lib/typography.d.ts.map +1 -1
  115. package/dist/esm/lib/typography.js +20 -5
  116. package/dist/globals.css +51 -16
  117. package/dist/lib/typography.d.ts +21 -6
  118. package/dist/lib/typography.d.ts.map +1 -1
  119. package/dist/lib/typography.js +20 -5
  120. package/package.json +1 -1
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Figure — the locked mono figure type scale of the enterprise console.
2
+ * Figure — the figure type scale of the enterprise console.
3
3
  *
4
- * All numbers are the hero: mono, tabular, visually dominant. This file is the
5
- * single source of truth for the canonical figure sizes so screens stop
6
- * re-typing `font-mono … tabular-nums` strings and drifting on
7
- * size/weight/tracking. Use `<Figure size>` for new markup, or import the
8
- * `FIGURE_CLASS` constants when composing className strings inline.
4
+ * All numbers are the hero: tabular and visually dominant, on the console's own
5
+ * Inter — NOT a second typeface. `tabular-nums` (Inter's `tnum`) is what keeps
6
+ * digits column-aligned, so the mono lock the scale used to carry bought
7
+ * nothing the console needed. This file is the single source of truth for the
8
+ * canonical figure sizes so screens stop re-typing `tabular-nums` strings and
9
+ * drifting on size/weight/tracking. Use `<Figure size>` for new markup, or
10
+ * import the `FIGURE_CLASS` constants when composing className strings inline.
9
11
  *
10
12
  * Scale:
11
13
  * - hero : the dominant in-bar figure — text-4xl/5xl, semibold, tracking-tight
@@ -18,13 +20,13 @@
18
20
  * `money-hero` is `hero`'s role at one step down the scale: a formatted BRL
19
21
  * amount runs ~13 characters, which clips a three-column panel at 4xl/5xl, so
20
22
  * consoles were hand-rolling `text-2xl lg:text-3xl` at the call site and losing
21
- * the mono/tabular/weight invariants along the way. Same responsive shape as
23
+ * the tabular/weight invariants along the way. Same responsive shape as
22
24
  * `hero`, same weight and tracking — only the two size steps differ.
23
25
  */
24
26
  import type { ElementType, ReactNode } from 'react';
25
27
  export type FigureSize = 'hero' | 'money-hero' | 'panel' | 'count' | 'row' | 'tick';
26
- /** Canonical class strings per figure size. The `tabular-nums` and `font-mono`
27
- * invariants live here so they can never be forgotten at a call site. */
28
+ /** Canonical class strings per figure size. The `tabular-nums` invariant lives
29
+ * here so it can never be forgotten at a call site. */
28
30
  export declare const FIGURE_CLASS: Record<FigureSize, string>;
29
31
  export type FigureProps = {
30
32
  size: FigureSize;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/figure/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAInD,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;AAE5D;0EAC0E;AAC1E,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAQnD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAY,EACjB,EAAE,WAAW,+BAEb"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/figure/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAInD,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;AAE5D;wDACwD;AACxD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAQnD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAY,EACjB,EAAE,WAAW,+BAEb"}
@@ -4,15 +4,15 @@ exports.FIGURE_CLASS = void 0;
4
4
  exports.Figure = Figure;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const utils_1 = require("../../lib/utils");
7
- /** Canonical class strings per figure size. The `tabular-nums` and `font-mono`
8
- * invariants live here so they can never be forgotten at a call site. */
7
+ /** Canonical class strings per figure size. The `tabular-nums` invariant lives
8
+ * here so it can never be forgotten at a call site. */
9
9
  exports.FIGURE_CLASS = {
10
- hero: 'font-mono text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl',
11
- 'money-hero': 'font-mono text-2xl font-semibold tracking-tight tabular-nums lg:text-3xl',
12
- panel: 'font-mono text-3xl font-semibold tracking-tight tabular-nums',
13
- count: 'font-mono text-2xl font-semibold tracking-tight tabular-nums',
14
- row: 'font-mono text-sm tabular-nums',
15
- tick: 'font-mono text-[10px] leading-none tabular-nums'
10
+ hero: 'text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl',
11
+ 'money-hero': 'text-2xl font-semibold tracking-tight tabular-nums lg:text-3xl',
12
+ panel: 'text-3xl font-semibold tracking-tight tabular-nums',
13
+ count: 'text-2xl font-semibold tracking-tight tabular-nums',
14
+ row: 'text-sm tabular-nums',
15
+ tick: 'text-xs leading-none tabular-nums'
16
16
  };
17
17
  function Figure({ size, children, className, as: Tag = 'span' }) {
18
18
  return (0, jsx_runtime_1.jsx)(Tag, { className: (0, utils_1.cn)(exports.FIGURE_CLASS[size], className), children: children });
@@ -3,7 +3,7 @@ export interface KeyIdProps {
3
3
  value: string;
4
4
  /** What the value is. Drives the mask shape and the default mask state. */
5
5
  kind?: KeyIdKind;
6
- /** Optional uppercase tag rendered before the value (e.g. 'Payer', 'E2E'). */
6
+ /** Optional quiet label rendered before the value (e.g. 'Payer', 'E2E'). */
7
7
  label?: string;
8
8
  /** Override the per-kind mask default. PII kinds default true, ids default false. */
9
9
  mask?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/key-id/index.tsx"],"names":[],"mappings":"AA2BA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,UAAU,GACV,WAAW,GACX,WAAW,GACX,SAAS,GACT,KAAK,GACL,aAAa,GACb,SAAS,CAAA;AAEb,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qFAAqF;IACrF,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sEAAsE;IACtE,MAAM,CAA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 -139,7 +139,7 @@ function maskKeyId(value, kind) {
139
139
  function KeyId({ value, kind = 'generic', label, mask, copyable = false, className }) {
140
140
  const masked = mask ?? masksByDefault(kind);
141
141
  const display = masked ? maskKeyId(value, kind) : truncateMiddle(value);
142
- return ((0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)('inline-flex min-w-0 items-center gap-2', className), children: [label ? ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'shrink-0'), children: label })) : null, (0, jsx_runtime_1.jsx)("span", { className: "text-foreground truncate font-mono text-xs tabular-nums",
142
+ return ((0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)('inline-flex min-w-0 items-center gap-2', className), children: [label ? ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'shrink-0 text-xs'), children: label })) : null, (0, jsx_runtime_1.jsx)("span", { className: "text-foreground truncate font-mono text-xs tabular-nums",
143
143
  // The raw value as a tooltip only when nothing is hidden — never leak a
144
144
  // masked PII value through the title attribute.
145
145
  title: masked ? undefined : value, children: display }), copyable ? (0, jsx_runtime_1.jsx)(CopyValue, { value: value }) : null] }));
@@ -1,14 +1,17 @@
1
1
  /**
2
- * SectionLabel — THE canonical uppercase tracked sans label of the console.
2
+ * SectionLabel — THE canonical quiet label of the console.
3
3
  *
4
- * Every panel heading, section title, and caption is uppercase, tracked
5
- * (0.08em) muted-foreground — the recessive foil that lets the mono figures be
6
- * loud. The class itself lives in `@/lib/typography` (`SECTION_LABEL_CLASS`,
7
- * an alias of `LABEL_VOICE_CLASS`) and is NEVER re-stated here, so the voice
8
- * cannot drift between this component and the `ui/` layer that shares it.
4
+ * Every panel heading, section title, and caption speaks product-console's
5
+ * table-head voice: sentence case, `text-sm`, medium weight, muted-foreground
6
+ * — the recessive foil that lets the figures be loud. The class itself
7
+ * lives in `@/lib/typography` (`SECTION_LABEL_CLASS`, an alias of
8
+ * `LABEL_VOICE_CLASS`) and is NEVER re-stated here, so the voice cannot drift
9
+ * between this component and the `ui/` layer that shares it.
9
10
  *
10
11
  * Renders an `<h2>` by default (the ledger-sheet cell heading), but `as` lets
11
- * it become a `<p>`/`<span>`/`<dt>` for captions and inline labels.
12
+ * it become a `<p>`/`<span>`/`<dt>` for captions and inline labels. For an
13
+ * EntityBox-scale panel TITLE, reach for `EntityBoxHeaderTitle` instead — that
14
+ * is the kit's `text-lg` heading voice.
12
15
  */
13
16
  import type { ElementType, HTMLAttributes, ReactNode } from 'react';
14
17
  export type SectionLabelProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/section-label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAA;AAE/D,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAU,EACd,KAAa,EACb,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAcnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/section-label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAA;AAE/D,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAU,EACd,KAAa,EACb,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAcnB"}
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
2
2
  export type StatusRailItem = {
3
3
  /** Optional stable key for dynamic (reordered/filtered) rails; falls back to index. */
4
4
  id?: string;
5
- /** Optional uppercase label rendered inline before the value. */
5
+ /** Optional quiet label rendered inline before the value. */
6
6
  label?: ReactNode;
7
7
  value: ReactNode;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/status-rail/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,MAAM,cAAc,GAAG;IAC3B,uFAAuF;IACvF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,iEAAiE;IACjE,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,uFAAuF;IACvF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qEAAqE;IACrE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,qCAAqC;IACrC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,gCAAgC;IAChC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAU,EACV,KAAU,EACV,SAAS,EACV,EAAE,eAAe,+BAwEjB;AAkBD,qFAAqF;AACrF,wBAAgB,GAAG,gCAMlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,gCAOxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/status-rail/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,MAAM,cAAc,GAAG;IAC3B,uFAAuF;IACvF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,6DAA6D;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,uFAAuF;IACvF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qEAAqE;IACrE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,qCAAqC;IACrC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,gCAAgC;IAChC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAU,EACV,KAAU,EACV,SAAS,EACV,EAAE,eAAe,+BAwEjB;AAkBD,qFAAqF;AACrF,wBAAgB,GAAG,gCAMlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,gCAOxB"}
@@ -23,9 +23,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
23
23
  * />
24
24
  *
25
25
  * The first token (`lead`) is `text-foreground font-medium`. Tape items are
26
- * dot-separated; an item with a `label` renders the uppercase label inline
27
- * before its value. Chips pin right via `ml-auto`; `alarm` escalates a chip to
28
- * destructive.
26
+ * dot-separated; an item with a `label` renders the label inline before its
27
+ * value, in the rail's own `font-medium`. Chips pin right via `ml-auto`;
28
+ * `alarm` escalates a chip to destructive.
29
+ *
30
+ * Labels carry weight only: the rail root already supplies size, family and
31
+ * ink (`font-mono text-xs text-muted-foreground`), so re-stating
32
+ * LABEL_VOICE_CLASS here would import a `text-sm` that fights the tape.
29
33
  */
30
34
  const lucide_react_1 = require("lucide-react");
31
35
  const utils_1 = require("../../lib/utils");
@@ -42,7 +46,7 @@ function StatusRail({ lead, items = [], chips = [], className }) {
42
46
  // Recessed instrument strip: the page surface inside a hairline border
43
47
  // whose top edge runs one step darker — light-from-above recession
44
48
  // without any inner shadow.
45
- 'border-border border-t-foreground/10 bg-body-surface text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg border px-4 py-2 font-mono text-xs tabular-nums', className), children: [hasLead ? ((0, jsx_runtime_1.jsx)("span", { className: "text-foreground font-medium", children: lead })) : null, items.map((item, i) => ((0, jsx_runtime_1.jsx)(RailFragment, { hasLead: hasLead || i > 0, children: item.label != null ? ((0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "tracking-[0.08em] uppercase", children: item.label }), item.value] })) : ((0, jsx_runtime_1.jsx)("span", { className: "flex items-center gap-1.5", children: item.value })) }, item.id ?? i))), chips.length ? ((0, jsx_runtime_1.jsx)("span", { className: "ml-auto flex flex-wrap items-center gap-x-3 gap-y-1.5", children: chips.map((chip, i) => ((0, jsx_runtime_1.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "tracking-[0.08em] uppercase", children: chip.label }), (0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)(
49
+ 'border-border border-t-foreground/10 bg-body-surface text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg border px-4 py-2 font-mono text-xs tabular-nums', className), children: [hasLead ? ((0, jsx_runtime_1.jsx)("span", { className: "text-foreground font-medium", children: lead })) : null, items.map((item, i) => ((0, jsx_runtime_1.jsx)(RailFragment, { hasLead: hasLead || i > 0, children: item.label != null ? ((0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-medium", children: item.label }), item.value] })) : ((0, jsx_runtime_1.jsx)("span", { className: "flex items-center gap-1.5", children: item.value })) }, item.id ?? i))), chips.length ? ((0, jsx_runtime_1.jsx)("span", { className: "ml-auto flex flex-wrap items-center gap-x-3 gap-y-1.5", children: chips.map((chip, i) => ((0, jsx_runtime_1.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-medium", children: chip.label }), (0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)(
46
50
  // Tiny mono token: raised a hair off the sunken tape by the
47
51
  // card surface + whisper shadow.
48
52
  'inline-flex items-center gap-1 rounded-sm border px-1.5 py-0.5 shadow-sm', chip.alarm
@@ -12,9 +12,11 @@
12
12
  * Renders `role="alert"`. Tones map to sindarian-ui's `system-*` semantic token
13
13
  * families, so they track the active light/dark palette automatically.
14
14
  */
15
- import type { ReactNode } from 'react';
15
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
16
16
  export type AlertBannerTone = 'destructive' | 'warning' | 'info' | 'success' | 'neutral';
17
- export type AlertBannerProps = {
17
+ /** `title` is widened to ReactNode, so the DOM `title` attribute (a string)
18
+ * is omitted rather than conflicting. */
19
+ export type AlertBannerProps = Omit<ComponentPropsWithoutRef<'div'>, 'title'> & {
18
20
  tone?: AlertBannerTone;
19
21
  /** Bold lead line, carries the tone color. */
20
22
  title?: ReactNode;
@@ -26,5 +28,5 @@ export type AlertBannerProps = {
26
28
  icon?: ReactNode;
27
29
  className?: string;
28
30
  };
29
- export declare function AlertBanner({ tone, title, children, detail, icon, className }: AlertBannerProps): import("react").JSX.Element;
31
+ export declare function AlertBanner({ tone, title, children, detail, icon, className, ...props }: AlertBannerProps): import("react").JSX.Element;
30
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/alert-banner/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,MAAM,eAAe,GACzB,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAoB5D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAgB,EAChB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EACV,EAAE,gBAAgB,+BAmClB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/alert-banner/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIhE,MAAM,MAAM,eAAe,GACzB,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAoB5D;0CAC0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,wBAAwB,CAAC,KAAK,CAAC,EAC/B,OAAO,CACR,GAAG;IACF,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAgB,EAChB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,+BAuClB"}
@@ -19,6 +19,6 @@ const TONE_TITLE = {
19
19
  success: 'text-system-success-text',
20
20
  neutral: 'text-foreground'
21
21
  };
22
- function AlertBanner({ tone = 'neutral', title, children, detail, icon, className }) {
23
- return ((0, jsx_runtime_1.jsxs)("div", { role: "alert", "data-tone": tone, className: (0, utils_1.cn)('flex gap-3 rounded-md border px-4 py-3', TONE_CONTAINER[tone], className), children: [icon != null ? ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)('mt-0.5 shrink-0', TONE_TITLE[tone]), "aria-hidden": true, children: icon })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1 space-y-1", children: [title != null ? ((0, jsx_runtime_1.jsx)("p", { className: (0, utils_1.cn)('text-sm font-medium', TONE_TITLE[tone]), children: title })) : null, children != null ? ((0, jsx_runtime_1.jsx)("div", { className: "text-foreground text-xs leading-relaxed", children: children })) : null, detail != null ? ((0, jsx_runtime_1.jsx)("pre", { className: "text-muted-foreground overflow-x-auto font-mono text-xs break-words whitespace-pre-wrap", children: detail })) : null] })] }));
22
+ function AlertBanner({ tone = 'neutral', title, children, detail, icon, className, ...props }) {
23
+ return ((0, jsx_runtime_1.jsxs)("div", { ...props, role: "alert", "data-tone": tone, className: (0, utils_1.cn)('flex gap-3 rounded-md border px-4 py-3', TONE_CONTAINER[tone], className), children: [icon != null ? ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)('mt-0.5 shrink-0', TONE_TITLE[tone]), "aria-hidden": true, children: icon })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1 space-y-1", children: [title != null ? ((0, jsx_runtime_1.jsx)("p", { className: (0, utils_1.cn)('text-sm font-medium', TONE_TITLE[tone]), children: title })) : null, children != null ? ((0, jsx_runtime_1.jsx)("div", { className: "text-foreground text-xs leading-relaxed", children: children })) : null, detail != null ? ((0, jsx_runtime_1.jsx)("pre", { className: "text-muted-foreground overflow-x-auto font-mono text-xs break-words whitespace-pre-wrap", children: detail })) : null] })] }));
24
24
  }
@@ -0,0 +1,70 @@
1
+ import type { Column } from '@tanstack/react-table';
2
+ /**
3
+ * The sizing a column DECLARED, in px. Only keys the ColumnDef actually carried
4
+ * are present, so an undeclared column reads back as `undefined` and keeps
5
+ * whatever width its layout gives it.
6
+ */
7
+ export type DeclaredColumnSize = {
8
+ width?: number;
9
+ minWidth?: number;
10
+ maxWidth?: number;
11
+ };
12
+ /**
13
+ * The column sizing a ColumnDef actually DECLARED, or `undefined` when it
14
+ * declared none. This is VirtualizedTable's reading: flex rows honour all
15
+ * three, so `size`, `minSize` and `maxSize` all PIN. DataTable's `<th>`/`<td>`
16
+ * path reads the same declaration through {@link readPreferredColumnSize},
17
+ * which drops the ceiling CSS auto table layout cannot enforce.
18
+ *
19
+ * Reading the raw `columnDef` is only honest because both tables pass
20
+ * `defaultColumn: { size: undefined, minSize: undefined, maxSize: undefined }`
21
+ * to `useReactTable`. TanStack builds every columnDef as
22
+ * `{ ...featureDefaults, ...table.options.defaultColumn, ...userDef }`, so
23
+ * those three overrides blank out the `defaultColumnSizing` the ColumnSizing
24
+ * feature would otherwise stamp on every column (150 / 20 / MAX_SAFE_INTEGER).
25
+ * Without them a column asking for nothing reports `size: 150` and a column
26
+ * asking for exactly 150 is indistinguishable from it. `column.getSize()` is
27
+ * unaffected: it falls back to `defaultColumnSizing` with `??`, so column
28
+ * offsets and the table's total size are byte-identical either way.
29
+ *
30
+ * Width comes from `getSize()` rather than the raw `size` so it lands already
31
+ * clamped by the column's own min/max.
32
+ */
33
+ export declare function readDeclaredColumnSize<TData>(column: Column<TData, unknown>): DeclaredColumnSize | undefined;
34
+ /**
35
+ * A GROUP header cell is exactly as wide as the leaf columns it spans, so it
36
+ * can only be pinned when every one of them is: a group whose leaves are
37
+ * partly sized has no honest fixed width, and keeps its colSpan flex share so
38
+ * the header rule still tracks the cells beneath it. Reading the group's own
39
+ * ColumnDef instead would size the header against a declaration its body cells
40
+ * never see.
41
+ *
42
+ * Every dimension the leaves agree on carries up, CEILING INCLUDED. This is
43
+ * VirtualizedTable's path, where flex rows honour `maxSize` on a leaf — so a
44
+ * group of capped leaves whose header carried no `maxWidth` was free to grow
45
+ * past every column it names, which is the same header-vs-cells drift the
46
+ * width sum exists to prevent. Each dimension is decided on its own: a group
47
+ * can be uncapped and still have a floor.
48
+ */
49
+ export declare function readDeclaredGroupSize<TData>(leaves: Column<TData, unknown>[]): DeclaredColumnSize | undefined;
50
+ /**
51
+ * The same declaration as {@link readDeclaredColumnSize}, minus `maxWidth`.
52
+ *
53
+ * DataTable renders real `<th>`/`<td>` under CSS AUTO table layout, where
54
+ * Chrome and Firefox ignore `max-width` on a cell. Emitting it would advertise
55
+ * a ceiling that never holds, so this path keeps only what the layout obeys:
56
+ * `size` as a PREFERRED width and `minSize` as a floor. A column that must not
57
+ * grow past a width belongs in VirtualizedTable.
58
+ */
59
+ export declare function readPreferredColumnSize<TData>(column: Column<TData, unknown>): DeclaredColumnSize | undefined;
60
+ /**
61
+ * Blanks out the `defaultColumnSizing` TanStack stamps onto every ColumnDef, so
62
+ * `columnDef.size` / `minSize` / `maxSize` mean "the consumer asked for this"
63
+ * and nothing else. Both tables pass it to `useReactTable`.
64
+ */
65
+ export declare const UNSIZED_DEFAULT_COLUMN: {
66
+ size: undefined;
67
+ minSize: undefined;
68
+ maxSize: undefined;
69
+ };
70
+ //# sourceMappingURL=column-size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-size.d.ts","sourceRoot":"","sources":["../../../src/enterprise/data-table/column-size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAC1C,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAC7B,kBAAkB,GAAG,SAAS,CAUhC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EACzC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,GAC/B,kBAAkB,GAAG,SAAS,CAchC;AAsBD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAC3C,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAC7B,kBAAkB,GAAG,SAAS,CAQhC;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAA"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNSIZED_DEFAULT_COLUMN = void 0;
4
+ exports.readDeclaredColumnSize = readDeclaredColumnSize;
5
+ exports.readDeclaredGroupSize = readDeclaredGroupSize;
6
+ exports.readPreferredColumnSize = readPreferredColumnSize;
7
+ /**
8
+ * The column sizing a ColumnDef actually DECLARED, or `undefined` when it
9
+ * declared none. This is VirtualizedTable's reading: flex rows honour all
10
+ * three, so `size`, `minSize` and `maxSize` all PIN. DataTable's `<th>`/`<td>`
11
+ * path reads the same declaration through {@link readPreferredColumnSize},
12
+ * which drops the ceiling CSS auto table layout cannot enforce.
13
+ *
14
+ * Reading the raw `columnDef` is only honest because both tables pass
15
+ * `defaultColumn: { size: undefined, minSize: undefined, maxSize: undefined }`
16
+ * to `useReactTable`. TanStack builds every columnDef as
17
+ * `{ ...featureDefaults, ...table.options.defaultColumn, ...userDef }`, so
18
+ * those three overrides blank out the `defaultColumnSizing` the ColumnSizing
19
+ * feature would otherwise stamp on every column (150 / 20 / MAX_SAFE_INTEGER).
20
+ * Without them a column asking for nothing reports `size: 150` and a column
21
+ * asking for exactly 150 is indistinguishable from it. `column.getSize()` is
22
+ * unaffected: it falls back to `defaultColumnSizing` with `??`, so column
23
+ * offsets and the table's total size are byte-identical either way.
24
+ *
25
+ * Width comes from `getSize()` rather than the raw `size` so it lands already
26
+ * clamped by the column's own min/max.
27
+ */
28
+ function readDeclaredColumnSize(column) {
29
+ const { size, minSize, maxSize } = column.columnDef;
30
+ const width = size === undefined ? undefined : column.getSize();
31
+ if (width === undefined && minSize === undefined && maxSize === undefined) {
32
+ return undefined;
33
+ }
34
+ return { width, minWidth: minSize, maxWidth: maxSize };
35
+ }
36
+ /**
37
+ * A GROUP header cell is exactly as wide as the leaf columns it spans, so it
38
+ * can only be pinned when every one of them is: a group whose leaves are
39
+ * partly sized has no honest fixed width, and keeps its colSpan flex share so
40
+ * the header rule still tracks the cells beneath it. Reading the group's own
41
+ * ColumnDef instead would size the header against a declaration its body cells
42
+ * never see.
43
+ *
44
+ * Every dimension the leaves agree on carries up, CEILING INCLUDED. This is
45
+ * VirtualizedTable's path, where flex rows honour `maxSize` on a leaf — so a
46
+ * group of capped leaves whose header carried no `maxWidth` was free to grow
47
+ * past every column it names, which is the same header-vs-cells drift the
48
+ * width sum exists to prevent. Each dimension is decided on its own: a group
49
+ * can be uncapped and still have a floor.
50
+ */
51
+ function readDeclaredGroupSize(leaves) {
52
+ if (leaves.length === 0)
53
+ return undefined;
54
+ const sizes = leaves.map(readDeclaredColumnSize);
55
+ const width = sum(sizes, 'width');
56
+ const minWidth = sum(sizes, 'minWidth');
57
+ const maxWidth = sum(sizes, 'maxWidth');
58
+ if (width === undefined && minWidth === undefined && maxWidth === undefined) {
59
+ return undefined;
60
+ }
61
+ return { width, minWidth, maxWidth };
62
+ }
63
+ /**
64
+ * The total of one dimension, or `undefined` unless EVERY leaf declared it. One
65
+ * leaf short and the group has no honest total: an unsized leaf flexes, an
66
+ * unfloored one can shrink, and an uncapped one grows without limit.
67
+ */
68
+ function sum(sizes, key) {
69
+ let total = 0;
70
+ for (const size of sizes) {
71
+ const value = size?.[key];
72
+ if (value === undefined)
73
+ return undefined;
74
+ total += value;
75
+ }
76
+ return total;
77
+ }
78
+ /**
79
+ * The same declaration as {@link readDeclaredColumnSize}, minus `maxWidth`.
80
+ *
81
+ * DataTable renders real `<th>`/`<td>` under CSS AUTO table layout, where
82
+ * Chrome and Firefox ignore `max-width` on a cell. Emitting it would advertise
83
+ * a ceiling that never holds, so this path keeps only what the layout obeys:
84
+ * `size` as a PREFERRED width and `minSize` as a floor. A column that must not
85
+ * grow past a width belongs in VirtualizedTable.
86
+ */
87
+ function readPreferredColumnSize(column) {
88
+ const { width, minWidth } = readDeclaredColumnSize(column) ?? {};
89
+ if (width === undefined && minWidth === undefined) {
90
+ return undefined;
91
+ }
92
+ return { width, minWidth };
93
+ }
94
+ /**
95
+ * Blanks out the `defaultColumnSizing` TanStack stamps onto every ColumnDef, so
96
+ * `columnDef.size` / `minSize` / `maxSize` mean "the consumer asked for this"
97
+ * and nothing else. Both tables pass it to `useReactTable`.
98
+ */
99
+ exports.UNSIZED_DEFAULT_COLUMN = {
100
+ size: undefined,
101
+ minSize: undefined,
102
+ maxSize: undefined
103
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/data-table/index.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAA;AAc9B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEjE;;;;GAIG;AACH,OAAO,QAAQ,uBAAuB,CAAC;IAIrC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB;CACF;AAED;;;;;;;;GAQG;AACH,KAAK,iBAAiB,CAAC,KAAK,IACxB;IACE,kBAAkB,CAAC,EAAE,KAAK,CAAA;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,oBAAoB,CAAC,EAAE,KAAK,CAAA;IAC5B,oBAAoB,CAAC,EAAE,KAAK,CAAA;CAC7B,GACD;IACE,kBAAkB,EAAE,IAAI,CAAA;IACxB,kFAAkF;IAClF,YAAY,EAAE,iBAAiB,CAAA;IAC/B,4DAA4D;IAC5D,oBAAoB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAA;IACnD;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAA;CAC9C,CAAA;AAEL,KAAK,kBAAkB,CAAC,KAAK,IAAI;IAC/B,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAA;IACpC,IAAI,EAAE,KAAK,EAAE,CAAA;IACb,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,e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KAAK,KAAK,IAAI,CAAA;IACpC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAC3D,iBAAiB,CAAC,KAAK,CAAC,CAAA;AA4E1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,EAC/B,OAAO,EACP,IAAI,EACJ,OAAe,EACf,YAAgB,EAChB,YAAmC,EACnC,KAAK,EACL,QAAQ,EACR,KAAa,EACb,OAAuB,EACvB,kBAA0B,EAC1B,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACP,EAAE,cAAc,CAAC,KAAK,CAAC,+BAySvB"}
@@ -20,6 +20,18 @@ const jsx_runtime_1 = require("react/jsx-runtime");
20
20
  * `original` value, so screens compose money / date / status cells directly in
21
21
  * their column `cell` renderers.
22
22
  *
23
+ * Declared column sizing (see `./column-size`) does NOT mean the same thing in
24
+ * the kit's two table paths, because their layouts differ:
25
+ * - DataTable renders real `<th>`/`<td>` under CSS AUTO table layout (the
26
+ * `Table` primitive sets no `table-fixed`). There, `size` is a PREFERRED
27
+ * width the browser may exceed to fit content, `minSize` acts as a floor,
28
+ * and `maxSize` is ignored outright — Chrome and Firefox do not apply
29
+ * `max-width` to table cells. A column declaring none keeps auto width.
30
+ * - VirtualizedTable renders flex rows, where all three PIN: `size`,
31
+ * `minSize` and `maxSize` are honoured exactly as declared.
32
+ * So a column that must not grow past a width belongs in VirtualizedTable, or
33
+ * in a cell renderer that truncates its own content.
34
+ *
23
35
  * Row selection is opt-in and controlled: pass `enableRowSelection` plus
24
36
  * `rowSelection` / `onRowSelectionChange` (TanStack-native types). When
25
37
  * enabled, a checkbox column is prepended — header checkbox selects the
@@ -45,6 +57,7 @@ const skeleton_1 = require("../../components/ui/skeleton");
45
57
  const typography_1 = require("../../lib/typography");
46
58
  const utils_1 = require("../../lib/utils");
47
59
  const empty_state_1 = require("../empty-state");
60
+ const column_size_1 = require("./column-size");
48
61
  const SELECTION_COLUMN_ID = '__select__';
49
62
  const CHECKBOX_CLASS = 'accent-primary block size-4';
50
63
  /** Right-aligned mono treatment for `meta: { numeric: true }` columns. */
@@ -89,6 +102,10 @@ function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLa
89
102
  const table = (0, react_table_1.useReactTable)({
90
103
  data,
91
104
  columns: tableColumns,
105
+ // Keeps `columnDef.size`/`minSize`/`maxSize` meaning "declared" — see
106
+ // ./column-size. `getSize()` is unaffected; it falls back to the library
107
+ // defaults itself.
108
+ defaultColumn: column_size_1.UNSIZED_DEFAULT_COLUMN,
92
109
  getCoreRowModel: (0, react_table_1.getCoreRowModel)(),
93
110
  getRowId,
94
111
  enableRowSelection,
@@ -220,7 +237,10 @@ function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLa
220
237
  ? 'No rows'
221
238
  : `${rowCount} rows` }), (0, jsx_runtime_1.jsxs)(table_1.Table, { "aria-busy": loading ? 'true' : undefined, children: [(0, jsx_runtime_1.jsx)(table_1.TableHeader, { children: table.getHeaderGroups().map((headerGroup) => ((0, jsx_runtime_1.jsx)(table_1.TableRow, { className: "hover:bg-transparent", children: headerGroup.headers.map((header) => {
222
239
  const numeric = header.column.columnDef.meta?.numeric;
223
- return ((0, jsx_runtime_1.jsx)(table_1.TableHead, { align: numeric ? 'right' : undefined, className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, headDensityClass, header.column.id === SELECTION_COLUMN_ID && 'w-10', headClassName), children: header.isPlaceholder
240
+ return ((0, jsx_runtime_1.jsx)(table_1.TableHead, { align: numeric ? 'right' : undefined,
241
+ // Only a column that DECLARED sizing gets an inline width;
242
+ // everything else keeps the auto table layout it has today.
243
+ style: (0, column_size_1.readPreferredColumnSize)(header.column), className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, headDensityClass, header.column.id === SELECTION_COLUMN_ID && 'w-10', headClassName), children: header.isPlaceholder
224
244
  ? null
225
245
  : (0, react_table_1.flexRender)(header.column.columnDef.header, header.getContext()) }, header.id));
226
246
  }) }, headerGroup.id))) }), (0, jsx_runtime_1.jsx)(table_1.TableBody, { children: loading ? (Array.from({ length: skeletonRows }).map((_, rowIndex) => ((0, jsx_runtime_1.jsx)(table_1.TableRow, { className: "hover:bg-transparent", children: Array.from({ length: colCount }).map((__, cellIndex) => ((0, jsx_runtime_1.jsx)(table_1.TableCell, { className: cellDensityClass, children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { className: "h-4 w-full max-w-[160px]" }) }, `skeleton-${rowIndex}-${cellIndex}`))) }, `skeleton-${rowIndex}`)))) : rowCount === 0 ? ((0, jsx_runtime_1.jsx)(table_1.TableRow, { className: "hover:bg-transparent", children: (0, jsx_runtime_1.jsx)(table_1.TableCell, { colSpan: colCount, className: "p-0", children: (0, jsx_runtime_1.jsx)(empty_state_1.EmptyState, { title: empty?.title ?? 'Nothing here yet', description: empty?.description, icon: empty?.icon, action: empty?.action,
@@ -243,7 +263,7 @@ function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLa
243
263
  ? (event) => handleRowKeyDown(event, row, rowIndex)
244
264
  : undefined, className: keyboardNav ? ROW_FOCUS_CLASS : undefined, "data-state": enableRowSelection && row.getIsSelected()
245
265
  ? 'selected'
246
- : undefined, children: row.getVisibleCells().map((cell) => ((0, jsx_runtime_1.jsx)(table_1.TableCell, { className: (0, utils_1.cn)(cell.column.columnDef.meta?.numeric && NUMERIC_CELL_CLASS, cellDensityClass, cell.column.id === SELECTION_COLUMN_ID && 'w-10'), onClick: cell.column.id === SELECTION_COLUMN_ID
266
+ : undefined, children: row.getVisibleCells().map((cell) => ((0, jsx_runtime_1.jsx)(table_1.TableCell, { style: (0, column_size_1.readPreferredColumnSize)(cell.column), className: (0, utils_1.cn)(cell.column.columnDef.meta?.numeric && NUMERIC_CELL_CLASS, cellDensityClass, cell.column.id === SELECTION_COLUMN_ID && 'w-10'), onClick: cell.column.id === SELECTION_COLUMN_ID
247
267
  ? stopPropagation
248
268
  : undefined, children: (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) }), footer ? (0, jsx_runtime_1.jsx)(table_1.TableFooter, { children: footer }) : null] })] }));
249
269
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/date-range-picker/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAUnD;;;;GAIG;AACH,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAA;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAC7C,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB,CAAA;AAkCD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,aAAa,EACb,MAAM,EACN,IAAI,EACJ,SAAS,EACT,OAAO,EACP,OAAe,EACf,OAAO,EACP,WAAwB,EACxB,SAA+B,EAC/B,UAAoB,EACpB,MAAa,EACd,EAAE,oBAAoB,+BAiHtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/date-range-picker/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AASnD;;;;GAIG;AACH,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAA;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAC7C,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB,CAAA;AAkCD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,aAAa,EACb,MAAM,EACN,IAAI,EACJ,SAAS,EACT,OAAO,EACP,OAAe,EACf,OAAO,EACP,WAAwB,EACxB,SAA+B,EAC/B,UAAoB,EACpB,MAAa,EACd,EAAE,oBAAoB,+BAsHtB"}
@@ -30,7 +30,6 @@ const button_1 = require("../../components/ui/button");
30
30
  const calendar_1 = require("../../components/ui/calendar");
31
31
  const label_1 = require("../../components/ui/label");
32
32
  const popover_1 = require("../../components/ui/popover");
33
- const typography_1 = require("../../lib/typography");
34
33
  const utils_1 = require("../../lib/utils");
35
34
  /** Leading YYYY-MM-DD of an ISO date (or date-time) string. */
36
35
  const ISO_DAY = /^(\d{4})-(\d{2})-(\d{2})/;
@@ -87,6 +86,6 @@ function DateRangePicker({ value, onValueChange, fromId, toId, fromLabel, toLabe
87
86
  // segments read and write the SAME range selection, so which one you opened
88
87
  // changes only the anchor, never the state.
89
88
  const calendar = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(calendar_1.Calendar, { mode: "range", numberOfMonths: 2, defaultMonth: fromDate ?? toDate ?? new Date(), selected: selected, onSelect: onSelect, locale: locale }), (0, jsx_runtime_1.jsx)("div", { className: "border-border flex items-center justify-end border-t px-3 py-2", children: (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", variant: "plain", size: "small", disabled: !hasValue, onClick: () => onValueChange({ from: '', to: '' }), children: clearLabel }) })] }));
90
- const renderSegment = (segment, id, label, dateValue) => ((0, jsx_runtime_1.jsxs)(popover_1.Popover, { open: openSegment === segment, onOpenChange: (next) => setOpenSegment(next ? segment : null), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-1.5", children: [(0, jsx_runtime_1.jsx)(label_1.Label, { htmlFor: id, className: typography_1.SECTION_LABEL_CLASS, children: label }), (0, jsx_runtime_1.jsxs)(popover_1.PopoverTrigger, { type: "button", id: id, className: triggerClass, "aria-invalid": invalid || undefined, "aria-describedby": invalid ? errorId : undefined, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CalendarDays, { className: "text-muted-foreground size-4 shrink-0", "aria-hidden": true }), dateValue ? ((0, jsx_runtime_1.jsx)("span", { children: dateValue })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-muted-foreground font-sans", children: placeholder }))] })] }), (0, jsx_runtime_1.jsx)(popover_1.PopoverContent, { align: "start", className: "w-auto p-0", "aria-label": ariaLabel, children: calendar })] }, segment));
89
+ const renderSegment = (segment, id, label, dateValue) => ((0, jsx_runtime_1.jsxs)(popover_1.Popover, { open: openSegment === segment, onOpenChange: (next) => setOpenSegment(next ? segment : null), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-1.5", children: [(0, jsx_runtime_1.jsx)(label_1.Label, { htmlFor: id, children: label }), (0, jsx_runtime_1.jsxs)(popover_1.PopoverTrigger, { type: "button", id: id, className: triggerClass, "aria-invalid": invalid || undefined, "aria-describedby": invalid ? errorId : undefined, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CalendarDays, { className: "text-muted-foreground size-4 shrink-0", "aria-hidden": true }), dateValue ? ((0, jsx_runtime_1.jsx)("span", { children: dateValue })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-muted-foreground font-sans", children: placeholder }))] })] }), (0, jsx_runtime_1.jsx)(popover_1.PopoverContent, { align: "start", className: "w-auto p-0", "aria-label": ariaLabel, children: calendar })] }, segment));
91
90
  return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-end", children: [renderSegment('from', fromId, fromLabel, value.from), renderSegment('to', toId, toLabel, value.to)] }));
92
91
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * StatCard — a single headline-figure cell of the console.
3
3
  *
4
- * A `LedgerPanel` holding a recessive `SectionLabel`, the dominant mono
4
+ * A `LedgerPanel` holding a recessive `SectionLabel`, the dominant
5
5
  * `Figure`, an optional delta line, an optional inline trend, and optional
6
6
  * secondary `BlotterRow` key/value rows. Drop StatCards into a `LedgerSheet` so
7
7
  * they read as connected hairline-seamed panels rather than floating cards.
@@ -23,9 +23,9 @@ export type StatCardRow = {
23
23
  value: ReactNode;
24
24
  };
25
25
  export type StatCardProps = {
26
- /** Recessive uppercase heading. */
26
+ /** Recessive heading, rendered through `SectionLabel`'s quiet label voice. */
27
27
  label: string;
28
- /** The dominant headline value — rendered in the hero mono figure. */
28
+ /** The dominant headline value — rendered in the hero figure. */
29
29
  value: ReactNode;
30
30
  /** Optional delta line below the value (e.g. `+0.6 pts`, `-3`). Inherits the tone color. */
31
31
  delta?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/stat-card/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAA;AAoB5E,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,KAAK,EAAE,SAAS,CAAA;IAChB,4FAA4F;IAC5F,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,uDAAuD;IACvD,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,sDAAsD;IACtD,KAAK,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC,CA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AAgB,EAChB,KAAK,EACL,QAAkB,EAClB,IAAI,EACJ,SAAS,EACV,EAAE,aAAa,+BAgCf"}
@@ -63,5 +63,5 @@ function TrendSpark({ data, dataKey, color }) {
63
63
  function StatCard({ label, value, delta, tone = 'default', trend, trendKey = 'value', rows, className }) {
64
64
  const hasTrend = trend !== undefined && trend.length > 0;
65
65
  const hasRows = rows !== undefined && rows.length > 0;
66
- return ((0, jsx_runtime_1.jsxs)(ledger_sheet_1.LedgerPanel, { "data-tone": tone, className: className, children: [(0, jsx_runtime_1.jsx)(section_label_1.SectionLabel, { children: label }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-1", children: [(0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "hero", className: (0, utils_1.cn)('block', TONE_VALUE[tone]), children: value }), delta !== undefined ? ((0, jsx_runtime_1.jsx)("p", { className: (0, utils_1.cn)('font-mono text-xs tabular-nums', TONE_VALUE[tone]), children: delta })) : null] }), hasTrend ? ((0, jsx_runtime_1.jsx)(TrendSpark, { data: trend, dataKey: trendKey, color: TONE_TREND[tone] })) : null, hasRows ? ((0, jsx_runtime_1.jsx)(blotter_1.Blotter, { className: "mt-auto", children: rows.map((row, i) => ((0, jsx_runtime_1.jsx)(blotter_1.BlotterRow, { label: row.label, value: row.value }, i))) })) : null] }));
66
+ return ((0, jsx_runtime_1.jsxs)(ledger_sheet_1.LedgerPanel, { "data-tone": tone, className: className, children: [(0, jsx_runtime_1.jsx)(section_label_1.SectionLabel, { children: label }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-1", children: [(0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "hero", className: (0, utils_1.cn)('block', TONE_VALUE[tone]), children: value }), delta !== undefined ? ((0, jsx_runtime_1.jsx)("p", { className: (0, utils_1.cn)('text-xs tabular-nums', TONE_VALUE[tone]), children: delta })) : null] }), hasTrend ? ((0, jsx_runtime_1.jsx)(TrendSpark, { data: trend, dataKey: trendKey, color: TONE_TREND[tone] })) : null, hasRows ? ((0, jsx_runtime_1.jsx)(blotter_1.Blotter, { className: "mt-auto", children: rows.map((row, i) => ((0, jsx_runtime_1.jsx)(blotter_1.BlotterRow, { label: row.label, value: row.value }, i))) })) : null] }));
67
67
  }
@@ -116,5 +116,5 @@ function StatusBadge({ status, label, variantMap, withIcon = false, unknownLabel
116
116
  // The glyph follows the resolved variant; an unknown/non-severity variant has
117
117
  // no cue, so the badge gracefully renders label-only even with withIcon set.
118
118
  const cue = withIcon ? SEVERITY_CUE[variant] : undefined;
119
- return ((0, jsx_runtime_1.jsxs)(badge_1.Badge, { variant: variant, className: (0, utils_1.cn)('gap-1', className), children: [cue ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(cue.Icon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [cue.word, ": "] })] })) : null, label ?? humanize(status)] }));
119
+ return ((0, jsx_runtime_1.jsxs)(badge_1.Badge, { variant: variant, className: className, children: [cue ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(cue.Icon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [cue.word, ": "] })] })) : null, label ?? humanize(status)] }));
120
120
  }
@@ -1,6 +1,16 @@
1
1
  import { type ColumnDef } from '@tanstack/react-table';
2
2
  export type VirtualizedTableProps<TData> = {
3
- /** Same shape as DataTable: standard TanStack `ColumnDef<T>`. */
3
+ /**
4
+ * Same shape as DataTable: standard TanStack `ColumnDef<T>`. A column that
5
+ * declares none keeps its equal share of the row.
6
+ *
7
+ * Declared sizing does NOT mean the same thing in the kit's two table paths.
8
+ * Here, flex rows PIN all three: `size`, `minSize` and `maxSize` are honoured
9
+ * exactly as declared. DataTable renders real `<th>`/`<td>` under CSS auto
10
+ * table layout, where `size` is only a PREFERRED width, `minSize` a floor,
11
+ * and `maxSize` is ignored outright. A column that must not grow past a width
12
+ * belongs here.
13
+ */
4
14
  columns: ColumnDef<TData, unknown>[];
5
15
  /** The full dataset, already in memory. Only the visible window renders. */
6
16
  data: TData[];
@@ -21,6 +31,12 @@ export type VirtualizedTableProps<TData> = {
21
31
  scrollAreaLabel?: string;
22
32
  /** Applied to the outer wrapper (the scroll container's parent). */
23
33
  className?: string;
34
+ /**
35
+ * Extra classes merged onto every header cell, after the kit label voice —
36
+ * the same seam DataTable exposes, so a screen that switches between the two
37
+ * render paths quiets both column heads with one prop instead of one.
38
+ */
39
+ headClassName?: string;
24
40
  };
25
- export declare function VirtualizedTable<TData>({ columns, data, rowHeight, maxHeight, scrollAreaLabel, className }: VirtualizedTableProps<TData>): import("react").JSX.Element;
41
+ export declare function VirtualizedTable<TData>({ columns, data, rowHeight, maxHeight, scrollAreaLabel, className, headClassName }: VirtualizedTableProps<TData>): import("react").JSX.Element;
26
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/virtualized-table/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAA;AAK9B,MAAM,MAAM,qBAAqB,CAAC,KAAK,IAAI;IACzC,iEAAiE;IACjE,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAA;IACpC,4EAA4E;IAC5E,IAAI,EAAE,KAAK,EAAE,CAAA;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAKD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,EACtC,OAAO,EACP,IAAI,EACJ,SAAc,EACd,SAAe,EACf,eAAyC,EACzC,SAAS,EACV,EAAE,qBAAqB,CAAC,KAAK,CAAC,+BAiM9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/virtualized-table/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAA;AAW9B,MAAM,MAAM,qBAAqB,CAAC,KAAK,IAAI;IACzC;;;;;;;;;;OAUG;IACH,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAA;IACpC,4EAA4E;IAC5E,IAAI,EAAE,KAAK,EAAE,CAAA;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAKD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,EACtC,OAAO,EACP,IAAI,EACJ,SAAc,EACd,SAAe,EACf,eAAyC,EACzC,SAAS,EACT,aAAa,EACd,EAAE,qBAAqB,CAAC,KAAK,CAAC,+BAkO9B"}