@dashforge/tw 0.11.0-beta → 1.1.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 (134) hide show
  1. package/CHANGELOG.md +234 -12
  2. package/COVERAGE.md +2 -2
  3. package/PARITY.md +7 -9
  4. package/PERFORMANCE.md +3 -4
  5. package/README.md +74 -15
  6. package/THEME-AUDIT.md +3 -4
  7. package/dashforge-tw-1.0.0.tgz +0 -0
  8. package/dist/index.esm.js +3127 -748
  9. package/dist/src/components/Alert/Alert.d.ts +65 -0
  10. package/dist/src/components/Alert/Alert.d.ts.map +1 -0
  11. package/dist/src/components/Alert/alert.types.d.ts +130 -0
  12. package/dist/src/components/Alert/alert.types.d.ts.map +1 -0
  13. package/dist/src/components/Alert/alert.variants.d.ts +85 -0
  14. package/dist/src/components/Alert/alert.variants.d.ts.map +1 -0
  15. package/dist/src/components/Avatar/Avatar.d.ts +48 -0
  16. package/dist/src/components/Avatar/Avatar.d.ts.map +1 -0
  17. package/dist/src/components/Avatar/avatar.types.d.ts +162 -0
  18. package/dist/src/components/Avatar/avatar.types.d.ts.map +1 -0
  19. package/dist/src/components/Avatar/avatar.variants.d.ts +208 -0
  20. package/dist/src/components/Avatar/avatar.variants.d.ts.map +1 -0
  21. package/dist/src/components/Badge/Badge.d.ts +63 -0
  22. package/dist/src/components/Badge/Badge.d.ts.map +1 -0
  23. package/dist/src/components/Badge/badge.types.d.ts +124 -0
  24. package/dist/src/components/Badge/badge.types.d.ts.map +1 -0
  25. package/dist/src/components/Badge/badge.variants.d.ts +262 -0
  26. package/dist/src/components/Badge/badge.variants.d.ts.map +1 -0
  27. package/dist/src/components/Box/Box.d.ts.map +1 -1
  28. package/dist/src/components/Box/box.types.d.ts +53 -0
  29. package/dist/src/components/Box/box.types.d.ts.map +1 -1
  30. package/dist/src/components/Button/Button.d.ts.map +1 -1
  31. package/dist/src/components/Button/button.types.d.ts +35 -0
  32. package/dist/src/components/Button/button.types.d.ts.map +1 -1
  33. package/dist/src/components/Card/Card.d.ts +107 -0
  34. package/dist/src/components/Card/Card.d.ts.map +1 -0
  35. package/dist/src/components/Card/card.types.d.ts +119 -0
  36. package/dist/src/components/Card/card.types.d.ts.map +1 -0
  37. package/dist/src/components/Chip/Chip.d.ts +67 -0
  38. package/dist/src/components/Chip/Chip.d.ts.map +1 -0
  39. package/dist/src/components/Chip/chip.types.d.ts +113 -0
  40. package/dist/src/components/Chip/chip.types.d.ts.map +1 -0
  41. package/dist/src/components/Chip/chip.variants.d.ts +155 -0
  42. package/dist/src/components/Chip/chip.variants.d.ts.map +1 -0
  43. package/dist/src/components/IconButton/IconButton.d.ts +57 -0
  44. package/dist/src/components/IconButton/IconButton.d.ts.map +1 -0
  45. package/dist/src/components/IconButton/iconButton.types.d.ts +96 -0
  46. package/dist/src/components/IconButton/iconButton.types.d.ts.map +1 -0
  47. package/dist/src/components/IconButton/iconButton.variants.d.ts +26 -0
  48. package/dist/src/components/IconButton/iconButton.variants.d.ts.map +1 -0
  49. package/dist/src/components/Menu/Menu.d.ts +118 -0
  50. package/dist/src/components/Menu/Menu.d.ts.map +1 -0
  51. package/dist/src/components/Menu/menu.types.d.ts +179 -0
  52. package/dist/src/components/Menu/menu.types.d.ts.map +1 -0
  53. package/dist/src/components/Menu/menu.variants.d.ts +129 -0
  54. package/dist/src/components/Menu/menu.variants.d.ts.map +1 -0
  55. package/dist/src/components/Snackbar/Snackbar.d.ts.map +1 -1
  56. package/dist/src/components/Snackbar/snackbar.types.d.ts +40 -3
  57. package/dist/src/components/Snackbar/snackbar.types.d.ts.map +1 -1
  58. package/dist/src/components/Snackbar/snackbar.variants.d.ts +12 -57
  59. package/dist/src/components/Snackbar/snackbar.variants.d.ts.map +1 -1
  60. package/dist/src/components/Spinner/Spinner.d.ts +44 -0
  61. package/dist/src/components/Spinner/Spinner.d.ts.map +1 -0
  62. package/dist/src/components/Spinner/spinner.types.d.ts +89 -0
  63. package/dist/src/components/Spinner/spinner.types.d.ts.map +1 -0
  64. package/dist/src/components/Spinner/spinner.variants.d.ts +111 -0
  65. package/dist/src/components/Spinner/spinner.variants.d.ts.map +1 -0
  66. package/dist/src/components/Table/cells/RenderChip.d.ts +15 -72
  67. package/dist/src/components/Table/cells/RenderChip.d.ts.map +1 -1
  68. package/dist/src/components/_shared/severity/index.d.ts +21 -0
  69. package/dist/src/components/_shared/severity/index.d.ts.map +1 -0
  70. package/dist/src/components/_shared/severity/severity.types.d.ts +48 -0
  71. package/dist/src/components/_shared/severity/severity.types.d.ts.map +1 -0
  72. package/dist/src/components/_shared/severity/severityIcons.d.ts +45 -0
  73. package/dist/src/components/_shared/severity/severityIcons.d.ts.map +1 -0
  74. package/dist/src/components/_shared/severity/severityVariants.d.ts +22 -0
  75. package/dist/src/components/_shared/severity/severityVariants.d.ts.map +1 -0
  76. package/dist/src/index.d.ts +27 -2
  77. package/dist/src/index.d.ts.map +1 -1
  78. package/package.json +8 -7
  79. package/src/components/Alert/Alert.test.tsx +302 -0
  80. package/src/components/Alert/Alert.tsx +186 -0
  81. package/src/components/Alert/alert.types.ts +144 -0
  82. package/src/components/Alert/alert.variants.ts +71 -0
  83. package/src/components/Autocomplete/autocomplete.variants.ts +1 -1
  84. package/src/components/Avatar/Avatar.test.tsx +287 -0
  85. package/src/components/Avatar/Avatar.tsx +304 -0
  86. package/src/components/Avatar/avatar.types.ts +205 -0
  87. package/src/components/Avatar/avatar.variants.ts +194 -0
  88. package/src/components/Badge/Badge.test.tsx +385 -0
  89. package/src/components/Badge/Badge.tsx +174 -0
  90. package/src/components/Badge/badge.types.ts +154 -0
  91. package/src/components/Badge/badge.variants.ts +161 -0
  92. package/src/components/Box/Box.test.tsx +21 -0
  93. package/src/components/Box/Box.tsx +32 -3
  94. package/src/components/Box/box.types.ts +55 -0
  95. package/src/components/Button/Button.test.tsx +21 -0
  96. package/src/components/Button/Button.tsx +28 -27
  97. package/src/components/Button/button.types.ts +36 -0
  98. package/src/components/Card/Card.test.tsx +291 -0
  99. package/src/components/Card/Card.tsx +241 -0
  100. package/src/components/Card/card.types.ts +132 -0
  101. package/src/components/Chip/Chip.test.tsx +316 -0
  102. package/src/components/Chip/Chip.tsx +224 -0
  103. package/src/components/Chip/chip.types.ts +128 -0
  104. package/src/components/Chip/chip.variants.ts +173 -0
  105. package/src/components/DataGrid/visibility/ColumnVisibilityMenu.tsx +1 -1
  106. package/src/components/IconButton/IconButton.test.tsx +367 -0
  107. package/src/components/IconButton/IconButton.tsx +159 -0
  108. package/src/components/IconButton/iconButton.types.ts +106 -0
  109. package/src/components/IconButton/iconButton.variants.ts +31 -0
  110. package/src/components/LeftNav/leftNav.variants.ts +2 -2
  111. package/src/components/Menu/Menu.test.tsx +408 -0
  112. package/src/components/Menu/Menu.tsx +335 -0
  113. package/src/components/Menu/menu.types.ts +221 -0
  114. package/src/components/Menu/menu.variants.ts +132 -0
  115. package/src/components/Pagination/pagination.variants.ts +1 -1
  116. package/src/components/Snackbar/Snackbar.tsx +46 -28
  117. package/src/components/Snackbar/snackbar.types.ts +47 -3
  118. package/src/components/Snackbar/snackbar.variants.ts +29 -22
  119. package/src/components/Spinner/Spinner.test.tsx +199 -0
  120. package/src/components/Spinner/Spinner.tsx +158 -0
  121. package/src/components/Spinner/spinner.types.ts +113 -0
  122. package/src/components/Spinner/spinner.variants.ts +83 -0
  123. package/src/components/Table/cells/RenderChip.tsx +24 -87
  124. package/src/components/Table/cells/RowActionsMenu.tsx +1 -1
  125. package/src/components/TextField/TextField.test.tsx +5 -1
  126. package/src/components/_shared/severity/index.ts +33 -0
  127. package/src/components/_shared/severity/severity.types.ts +50 -0
  128. package/src/components/_shared/severity/severityIcons.tsx +104 -0
  129. package/src/components/_shared/severity/severityVariants.test.ts +136 -0
  130. package/src/components/_shared/severity/severityVariants.ts +115 -0
  131. package/src/index.ts +163 -1
  132. package/vite.config.ts +8 -0
  133. package/vitest.config.mts +8 -1
  134. package/LICENSE +0 -21
@@ -0,0 +1,129 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ import type { MenuPlacement } from './menu.types.js';
3
+ /**
4
+ * Tailwind-variants recipe for the Menu family.
5
+ *
6
+ * The whole menu family is styled here in one TV instance so the
7
+ * compound rules (item color × selected × danger, etc.) live in
8
+ * one source of truth.
9
+ *
10
+ * Slots:
11
+ * - `content` — floating panel (DropdownMenu.Content)
12
+ * - `item` — clickable row (DropdownMenu.Item)
13
+ * - `itemIcon` — leading icon container
14
+ * - `itemLabel` — text content slot
15
+ * - `itemEnd` — trailing slot (shortcut hint, chevron, …)
16
+ * - `label` — non-interactive heading (DropdownMenu.Label)
17
+ * - `separator` — divider (DropdownMenu.Separator)
18
+ * - `skeleton` — placeholder item (visual only, no Radix slot)
19
+ */
20
+ export declare const menuVariants: import("tailwind-variants").TVReturnType<{
21
+ /**
22
+ * Item color intent. `'danger'` highlights destructive actions
23
+ * (Delete, Sign out) with red bg on hover. Both bg and text
24
+ * shift to the danger palette when the item is highlighted.
25
+ */
26
+ color: {
27
+ default: {};
28
+ danger: {
29
+ item: string[];
30
+ itemIcon: string;
31
+ };
32
+ };
33
+ /**
34
+ * Visual `selected` hint — adds a faint primary bg + the
35
+ * leading edge gets a primary accent. Pure visual; v1 has no
36
+ * controlled selection state machine.
37
+ */
38
+ selected: {
39
+ true: {
40
+ item: string[];
41
+ itemIcon: string;
42
+ };
43
+ };
44
+ }, {
45
+ content: string[];
46
+ item: string[];
47
+ itemIcon: string;
48
+ itemLabel: string;
49
+ itemEnd: string;
50
+ label: string[];
51
+ separator: string;
52
+ skeleton: string[];
53
+ }, undefined, {
54
+ /**
55
+ * Item color intent. `'danger'` highlights destructive actions
56
+ * (Delete, Sign out) with red bg on hover. Both bg and text
57
+ * shift to the danger palette when the item is highlighted.
58
+ */
59
+ color: {
60
+ default: {};
61
+ danger: {
62
+ item: string[];
63
+ itemIcon: string;
64
+ };
65
+ };
66
+ /**
67
+ * Visual `selected` hint — adds a faint primary bg + the
68
+ * leading edge gets a primary accent. Pure visual; v1 has no
69
+ * controlled selection state machine.
70
+ */
71
+ selected: {
72
+ true: {
73
+ item: string[];
74
+ itemIcon: string;
75
+ };
76
+ };
77
+ }, {
78
+ content: string[];
79
+ item: string[];
80
+ itemIcon: string;
81
+ itemLabel: string;
82
+ itemEnd: string;
83
+ label: string[];
84
+ separator: string;
85
+ skeleton: string[];
86
+ }, import("tailwind-variants").TVReturnType<{
87
+ /**
88
+ * Item color intent. `'danger'` highlights destructive actions
89
+ * (Delete, Sign out) with red bg on hover. Both bg and text
90
+ * shift to the danger palette when the item is highlighted.
91
+ */
92
+ color: {
93
+ default: {};
94
+ danger: {
95
+ item: string[];
96
+ itemIcon: string;
97
+ };
98
+ };
99
+ /**
100
+ * Visual `selected` hint — adds a faint primary bg + the
101
+ * leading edge gets a primary accent. Pure visual; v1 has no
102
+ * controlled selection state machine.
103
+ */
104
+ selected: {
105
+ true: {
106
+ item: string[];
107
+ itemIcon: string;
108
+ };
109
+ };
110
+ }, {
111
+ content: string[];
112
+ item: string[];
113
+ itemIcon: string;
114
+ itemLabel: string;
115
+ itemEnd: string;
116
+ label: string[];
117
+ separator: string;
118
+ skeleton: string[];
119
+ }, undefined, unknown, unknown, undefined>>;
120
+ export type MenuVariants = VariantProps<typeof menuVariants>;
121
+ /**
122
+ * Resolve a `MenuPlacement` enum to Radix `side` + `align` props.
123
+ * Single source of truth so Menu.tsx doesn't need a switch statement.
124
+ */
125
+ export declare function placementToRadix(placement: MenuPlacement): {
126
+ side: 'top' | 'right' | 'bottom' | 'left';
127
+ align: 'start' | 'center' | 'end';
128
+ };
129
+ //# sourceMappingURL=menu.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/menu.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY;IAiDrB;;;;OAIG;;;;;;;;IAkBH;;;;OAIG;;;;;;;;;;;;;;;;;IA1BH;;;;OAIG;;;;;;;;IAkBH;;;;OAIG;;;;;;;;;;;;;;;;;IA1BH;;;;OAIG;;;;;;;;IAkBH;;;;OAIG;;;;;;;;;;;;;;;;2CAcL,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,GAAG;IAC1D,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACnC,CAWA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/Snackbar.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EAEX,qBAAqB,EAGtB,MAAM,qBAAqB,CAAC;AAI7B;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAQzC;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CA4N5D"}
1
+ {"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/Snackbar.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,WAAW,EAEX,qBAAqB,EAEtB,MAAM,qBAAqB,CAAC;AAI7B;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAQzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAwP5D"}
@@ -1,7 +1,22 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { SnackbarVariants } from './snackbar.variants.js';
3
- /** Visual severity — drives icon color + accent on the snackbar surface. */
4
- export type SnackbarSeverity = 'info' | 'success' | 'warning' | 'danger';
3
+ import type { Severity, SeverityVariant } from '../_shared/severity/severity.types.js';
4
+ /**
5
+ * Visual severity — drives icon color + accent on the snackbar surface.
6
+ *
7
+ * Re-exported alias of the shared `Severity` type from
8
+ * `_shared/severity/`. Kept as a distinct local alias for
9
+ * backwards-compatible name (`SnackbarSeverity`) — pre-1.1.0 consumers
10
+ * that imported `SnackbarSeverity` keep their imports working.
11
+ */
12
+ export type SnackbarSeverity = Severity;
13
+ /**
14
+ * Visual variant — `standard` (default, soft tinted surface), `filled`
15
+ * (solid colored surface), `outlined` (transparent + border + text).
16
+ * Re-exported alias of the shared `SeverityVariant`. New in 1.1.0:
17
+ * Snackbar now supports the same 3-way axis as Alert / future Banner.
18
+ */
19
+ export type SnackbarVariant = SeverityVariant;
5
20
  /** Corner anchor for the snackbar stack. */
6
21
  export type SnackbarPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
7
22
  /** One snackbar instance — what `useSnackbar().enqueue()` accepts. */
@@ -10,6 +25,28 @@ export interface SnackbarOptions {
10
25
  message: ReactNode;
11
26
  /** Visual severity. @default 'info' */
12
27
  severity?: SnackbarSeverity;
28
+ /**
29
+ * Visual variant — same 3-way axis as Alert. **New in 1.1.0.**
30
+ *
31
+ * - `'standard'` (default) — tinted soft surface, severity-toned text
32
+ * - `'filled'` — solid colored surface, light text (strong weight)
33
+ * - `'outlined'` — transparent surface, severity border + text
34
+ *
35
+ * @default 'standard'
36
+ */
37
+ variant?: SnackbarVariant;
38
+ /**
39
+ * Icon control — same tristate as Alert. **New in 1.1.0.**
40
+ *
41
+ * - omitted / `undefined` → default per-severity icon (inline SVG
42
+ * shared with Alert via `_shared/severity/`)
43
+ * - `ReactNode` → consumer-provided icon
44
+ * - `false` → no icon (colored surface alone carries the severity)
45
+ *
46
+ * The legacy Unicode glyphs (`ⓘ ✓ ⚠ ✕`) shipped in 1.0.x have been
47
+ * REMOVED — see CHANGELOG for the visual breaking note.
48
+ */
49
+ icon?: ReactNode | false;
13
50
  /**
14
51
  * Auto-dismiss after this many ms. `0` / negative ⇒ persistent
15
52
  * (only dismissed by the close button or `dismiss(id)`).
@@ -79,7 +116,7 @@ export interface SnackbarProviderProps extends SnackbarVariants {
79
116
  */
80
117
  maxVisible?: number;
81
118
  /** Defaults merged into every enqueue. */
82
- defaults?: Pick<SnackbarOptions, 'severity' | 'autoHideMs' | 'showClose'>;
119
+ defaults?: Pick<SnackbarOptions, 'severity' | 'variant' | 'autoHideMs' | 'showClose'>;
83
120
  /** Per-slot className overrides. */
84
121
  slotProps?: SnackbarSlotProps;
85
122
  }
@@ -1 +1 @@
1
- {"version":3,"file":"snackbar.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/snackbar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEzE,4CAA4C;AAC5C,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAEnB,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,OAAO,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IACnD,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,0EAA0E;AAC1E,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,sCAAsC;AACtC,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC;IAC9C,mCAAmC;IACnC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,sCAAsC;IACtC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC,CAAC;IAC1E,oCAAoC;IACpC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B"}
1
+ {"version":3,"file":"snackbar.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/snackbar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAChB,MAAM,uCAAuC,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,4CAA4C;AAC5C,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAEnB,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,OAAO,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IACnD,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,0EAA0E;AAC1E,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,sCAAsC;AACtC,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC;IAC9C,mCAAmC;IACnC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,sCAAsC;IACtC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,IAAI,CACb,eAAe,EACf,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CACpD,CAAC;IACF,oCAAoC;IACpC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B"}
@@ -2,13 +2,22 @@ import { type VariantProps } from 'tailwind-variants';
2
2
  /**
3
3
  * Tailwind-variants recipe for `<Snackbar>` (stacked toast surface).
4
4
  *
5
+ * **Sprint 4.4 refactor (1.1.0):** the severity color block has been
6
+ * REMOVED from this recipe. The 3×4 (variant × severity) color matrix
7
+ * now lives in `_shared/severity/severityVariants` and is consumed by
8
+ * Snackbar AND Alert (and any future Banner). This recipe owns layout
9
+ * + spacing + transitions only — the surface / border / icon colors
10
+ * are merged in at render time via `cn()`.
11
+ *
5
12
  * Slots:
6
13
  * - `container` — fixed-position outer stack
7
- * - `item` — single snackbar surface
8
- * - `icon` — leading severity icon
14
+ * - `item` — single snackbar surface (layout only; severity
15
+ * colors injected at render via `getSeverityClasses`)
16
+ * - `icon` — leading severity icon (layout only; tone class
17
+ * injected at render)
9
18
  * - `message` — main text
10
19
  * - `action` — optional action button
11
- * - `closeButton` — trailing `×` button
20
+ * - `closeButton` — trailing close `×` button
12
21
  */
13
22
  export declare const snackbarVariants: import("tailwind-variants").TVReturnType<{
14
23
  position: {
@@ -31,24 +40,6 @@ export declare const snackbarVariants: import("tailwind-variants").TVReturnType<
31
40
  container: string;
32
41
  };
33
42
  };
34
- severity: {
35
- info: {
36
- item: string;
37
- icon: string;
38
- };
39
- success: {
40
- item: string;
41
- icon: string;
42
- };
43
- warning: {
44
- item: string;
45
- icon: string;
46
- };
47
- danger: {
48
- item: string;
49
- icon: string;
50
- };
51
- };
52
43
  }, {
53
44
  container: string[];
54
45
  item: string[];
@@ -77,24 +68,6 @@ export declare const snackbarVariants: import("tailwind-variants").TVReturnType<
77
68
  container: string;
78
69
  };
79
70
  };
80
- severity: {
81
- info: {
82
- item: string;
83
- icon: string;
84
- };
85
- success: {
86
- item: string;
87
- icon: string;
88
- };
89
- warning: {
90
- item: string;
91
- icon: string;
92
- };
93
- danger: {
94
- item: string;
95
- icon: string;
96
- };
97
- };
98
71
  }, {
99
72
  container: string[];
100
73
  item: string[];
@@ -123,24 +96,6 @@ export declare const snackbarVariants: import("tailwind-variants").TVReturnType<
123
96
  container: string;
124
97
  };
125
98
  };
126
- severity: {
127
- info: {
128
- item: string;
129
- icon: string;
130
- };
131
- success: {
132
- item: string;
133
- icon: string;
134
- };
135
- warning: {
136
- item: string;
137
- icon: string;
138
- };
139
- danger: {
140
- item: string;
141
- icon: string;
142
- };
143
- };
144
99
  }, {
145
100
  container: string[];
146
101
  item: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"snackbar.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/snackbar.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA0D3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"snackbar.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/snackbar.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAwD3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { SpinnerProps } from './spinner.types.js';
2
+ /**
3
+ * `<Spinner>` — rotating-arc loading indicator.
4
+ *
5
+ * Visual: a partial-arc SVG rotating via Tailwind's `animate-spin`
6
+ * (pure CSS, GPU-accelerated). Optional `withTrack` renders a faint
7
+ * ghost ring (20% opacity of currentColor) behind the arc — the
8
+ * standard "premium spinner" pattern used by Stripe / Vercel / Linear.
9
+ *
10
+ * Color resolution:
11
+ * - `color="primary"` (or any 7 intent) → `text-{color}-600` class
12
+ * → SVG `stroke="currentColor"` picks it up
13
+ * - `color` omitted → no `text-*` class emitted → SVG inherits
14
+ * parent's text color via `currentColor`. **This is the right
15
+ * default for nested usage** (inside Button, Alert, Card).
16
+ *
17
+ * A11y:
18
+ * - `role="status"` on the wrapper
19
+ * - `aria-live="polite"` so SR queues the announcement
20
+ * - visually-hidden text label inside (`'Loading'` default)
21
+ * - `animate-spin` is gated on `motion-reduce` (WCAG 2.3.3)
22
+ *
23
+ * Delay (anti-flash):
24
+ * - `delay={150}` mounts as `null` for the first 150ms, then swaps
25
+ * to the actual SVG. Quick operations that finish before 150ms
26
+ * never render the spinner — eliminates the "flash" UX bug.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * // 1. Inside a Button — inherits text color
31
+ * <button><Spinner size="sm" /> Saving...</button>
32
+ *
33
+ * // 2. Standalone with explicit color
34
+ * <Spinner color="primary" size="lg" label="Loading dashboard data" />
35
+ *
36
+ * // 3. Anti-flash on quick submits
37
+ * <Spinner visibleWhen={() => isSubmitting} delay={150} />
38
+ *
39
+ * // 4. With track for busy backgrounds
40
+ * <Spinner color="primary" withTrack size="xl" />
41
+ * ```
42
+ */
43
+ export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;
44
+ //# sourceMappingURL=Spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,OAAO,0GAwGlB,CAAC"}
@@ -0,0 +1,89 @@
1
+ import type { ClassValue } from 'tailwind-variants';
2
+ import type { Engine } from '@dashforge/ui-core';
3
+ /**
4
+ * Size scale — maps to spacing tokens (w/h) and matching stroke
5
+ * width in the variants recipe.
6
+ */
7
+ export type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
8
+ /**
9
+ * Intent color. When omitted, the spinner inherits the parent's
10
+ * text color via `currentColor` — the right default for nested
11
+ * usage (inside Button, Alert, Card, etc.).
12
+ */
13
+ export type SpinnerColor = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
14
+ /** Stroke thickness — 3 steps mapped to SVG stroke-width. */
15
+ export type SpinnerThickness = 'thin' | 'md' | 'thick';
16
+ /**
17
+ * Props for `<Spinner>` — rotating-arc loading indicator.
18
+ *
19
+ * A11y: the spinner renders with `role="status"` + `aria-live="polite"`
20
+ * + a visually-hidden text label (default `'Loading'`). Screen readers
21
+ * announce the label politely (queued, doesn't interrupt) when the
22
+ * spinner mounts.
23
+ *
24
+ * Performance: SVG `animate-spin` (Tailwind built-in) — pure CSS,
25
+ * GPU-accelerated, motion-reduce-safe (skips animation entirely
26
+ * under `prefers-reduced-motion`).
27
+ */
28
+ export interface SpinnerProps {
29
+ /** @default 'md' */
30
+ size?: SpinnerSize;
31
+ /**
32
+ * Intent color. **When omitted, inherits parent's text color via
33
+ * `currentColor`** — works seamlessly inside Button, Alert, Card,
34
+ * or any colored container without configuration. Pass explicitly
35
+ * for standalone usage on neutral surfaces.
36
+ */
37
+ color?: SpinnerColor;
38
+ /** @default 'md' */
39
+ thickness?: SpinnerThickness;
40
+ /**
41
+ * Renders a faint "ghost ring" behind the spinning arc (20%
42
+ * opacity of `currentColor`). Improves contrast on busy or dark
43
+ * backgrounds, reads as more "premium" on slow operations.
44
+ *
45
+ * Visually: WITHOUT track you see a rotating partial arc (3/4
46
+ * circle missing in any frame). WITH track you see the full
47
+ * circle (low-opacity) AND the arc on top. The track stays put
48
+ * while the arc rotates.
49
+ *
50
+ * @default false
51
+ */
52
+ withTrack?: boolean;
53
+ /**
54
+ * Accessible label announced by screen readers via
55
+ * `role="status"` + `aria-live="polite"`. Rendered as a visually-
56
+ * hidden `<span>` inside the spinner.
57
+ * @default 'Loading'
58
+ */
59
+ label?: string;
60
+ /**
61
+ * Wait N milliseconds before rendering — prevents a flash of the
62
+ * spinner on quick operations (Atlassian-style anti-flash). The
63
+ * spinner mounts as `null` for the first N ms, then swaps to the
64
+ * actual SVG. Pairs naturally with `visibleWhen`.
65
+ *
66
+ * Common pattern:
67
+ * ```tsx
68
+ * <Spinner
69
+ * visibleWhen={(e) => e.isSubmitting()}
70
+ * delay={150}
71
+ * />
72
+ * // Spinner appears only when isSubmitting AND that has been
73
+ * // true for 150ms — quick submits never flash.
74
+ * ```
75
+ *
76
+ * @default 0
77
+ */
78
+ delay?: number;
79
+ /**
80
+ * Reactive visibility predicate — same contract as Alert/Chip/
81
+ * Button/etc. Spinner is intrinsically conditional (loading IS a
82
+ * state), so this fits naturally even though the component is
83
+ * otherwise display-only.
84
+ */
85
+ visibleWhen?: (engine: Engine) => boolean;
86
+ className?: string;
87
+ sx?: ClassValue;
88
+ }
89
+ //# sourceMappingURL=spinner.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AAEX,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAE3B,oBAAoB;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,oBAAoB;IACpB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAM1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB"}
@@ -0,0 +1,111 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ import type { SpinnerColor } from './spinner.types.js';
3
+ /**
4
+ * Tailwind-variants recipe for `<Spinner>`.
5
+ *
6
+ * Axes:
7
+ * - `size` — 5 steps (xs/sm/md/lg/xl) → w/h spacing tokens
8
+ * - `thickness` — 3 steps (thin/md/thick) → SVG stroke-width
9
+ * - `color` — 7 intents (or omitted → `currentColor`)
10
+ *
11
+ * The stroke + fill of the SVG paths are governed by
12
+ * `stroke="currentColor"` (set inline in Spinner.tsx), so the root
13
+ * `text-*` class drives the color. When `color` is omitted, no
14
+ * `text-*` class is emitted at all — `currentColor` resolves to
15
+ * whatever the parent's text color is.
16
+ */
17
+ export declare const spinnerVariants: import("tailwind-variants").TVReturnType<{
18
+ size: {
19
+ xs: string;
20
+ sm: string;
21
+ md: string;
22
+ lg: string;
23
+ xl: string;
24
+ };
25
+ /**
26
+ * Color → text-{color}-600 (mid-tone, readable on most surfaces).
27
+ * Note: text-{color}-600 acts on currentColor inside the SVG via
28
+ * `stroke="currentColor"`. Neutral uses `text-neutral-600` which
29
+ * auto-inverts via the dashforgePreset CSS-var swap (no `dark:`
30
+ * needed). Color rows do NOT carry `dark:` either — the chosen
31
+ * 600 step works in both modes for the spinner's specific use
32
+ * (small element, brief visibility).
33
+ */
34
+ color: {
35
+ neutral: string;
36
+ primary: string;
37
+ secondary: string;
38
+ success: string;
39
+ warning: string;
40
+ danger: string;
41
+ info: string;
42
+ };
43
+ }, undefined, "inline-block animate-spin motion-reduce:animate-none", {
44
+ size: {
45
+ xs: string;
46
+ sm: string;
47
+ md: string;
48
+ lg: string;
49
+ xl: string;
50
+ };
51
+ /**
52
+ * Color → text-{color}-600 (mid-tone, readable on most surfaces).
53
+ * Note: text-{color}-600 acts on currentColor inside the SVG via
54
+ * `stroke="currentColor"`. Neutral uses `text-neutral-600` which
55
+ * auto-inverts via the dashforgePreset CSS-var swap (no `dark:`
56
+ * needed). Color rows do NOT carry `dark:` either — the chosen
57
+ * 600 step works in both modes for the spinner's specific use
58
+ * (small element, brief visibility).
59
+ */
60
+ color: {
61
+ neutral: string;
62
+ primary: string;
63
+ secondary: string;
64
+ success: string;
65
+ warning: string;
66
+ danger: string;
67
+ info: string;
68
+ };
69
+ }, undefined, import("tailwind-variants").TVReturnType<{
70
+ size: {
71
+ xs: string;
72
+ sm: string;
73
+ md: string;
74
+ lg: string;
75
+ xl: string;
76
+ };
77
+ /**
78
+ * Color → text-{color}-600 (mid-tone, readable on most surfaces).
79
+ * Note: text-{color}-600 acts on currentColor inside the SVG via
80
+ * `stroke="currentColor"`. Neutral uses `text-neutral-600` which
81
+ * auto-inverts via the dashforgePreset CSS-var swap (no `dark:`
82
+ * needed). Color rows do NOT carry `dark:` either — the chosen
83
+ * 600 step works in both modes for the spinner's specific use
84
+ * (small element, brief visibility).
85
+ */
86
+ color: {
87
+ neutral: string;
88
+ primary: string;
89
+ secondary: string;
90
+ success: string;
91
+ warning: string;
92
+ danger: string;
93
+ info: string;
94
+ };
95
+ }, undefined, "inline-block animate-spin motion-reduce:animate-none", unknown, unknown, undefined>>;
96
+ export type SpinnerVariants = VariantProps<typeof spinnerVariants>;
97
+ /**
98
+ * SVG stroke-width per thickness step. Picked to read well at every
99
+ * size — thin (1.5px) is the minimum readable; thick (3px) saturates
100
+ * the available radius at sizes xs/sm.
101
+ */
102
+ export declare const SPINNER_STROKE_WIDTH: Record<'thin' | 'md' | 'thick', number>;
103
+ /**
104
+ * The track ring renders at this opacity of `currentColor`. 0.2 is
105
+ * the sweet spot — visible enough to anchor the eye, faint enough
106
+ * to read as background.
107
+ */
108
+ export declare const SPINNER_TRACK_OPACITY = 0.2;
109
+ /** Re-export the color name list so playground demos can iterate. */
110
+ export declare const SPINNER_COLORS: SpinnerColor[];
111
+ //# sourceMappingURL=spinner.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/spinner.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;;IAUxB;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;IARH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;IARH;;;;;;;;OAQG;;;;;;;;;;mGAgBL,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAIxE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,qEAAqE;AACrE,eAAO,MAAM,cAAc,EAAE,YAAY,EAQxC,CAAC"}
@@ -1,80 +1,23 @@
1
1
  import type { ReactNode } from 'react';
2
- import { type VariantProps } from 'tailwind-variants';
2
+ import type { ChipProps } from '../../Chip/chip.types.js';
3
3
  /**
4
- * Internal mini-chip used by the cell renderer library. Not exported
5
- * from `@dashforge/tw` as a standalone component (per Sprint 4.1
6
- * scope decision — a standalone `<Chip>` may ship in Sprint 5 if
7
- * demand emerges).
4
+ * Internal mini-chip used by the Table cell renderer library.
8
5
  *
9
- * Variants:
10
- * - `color`: 7 intents (neutral / primary / success / warning /
11
- * danger / info / secondary)
12
- * - `variant`: `soft` (default) / `solid` / `outline`
13
- * - `size`: `sm` / `md`
6
+ * **Sprint 4.4 refactor**: this component used to own its own
7
+ * `chipVariants` recipe (the 3 × 7 variant × color matrix). The
8
+ * matrix has since been promoted to the public `<Chip>` at
9
+ * `components/Chip/Chip.tsx` as the single source of truth.
10
+ * `RenderChip` is now a thin wrapper that translates its
11
+ * `children`-style API to `<Chip label={…}>` without any visual
12
+ * change. Table cell consumers keep working unchanged.
13
+ *
14
+ * For new code, prefer importing `<Chip>` from `@dashforge/tw`
15
+ * directly — `RenderChip` exists only for the Table cell renderer
16
+ * registry where the `children` prop convention pre-dates the
17
+ * public Chip API.
14
18
  */
15
- declare const chipVariants: import("tailwind-variants").TVReturnType<{
16
- color: {
17
- neutral: string;
18
- primary: string;
19
- success: string;
20
- warning: string;
21
- danger: string;
22
- info: string;
23
- secondary: string;
24
- };
25
- variant: {
26
- soft: string;
27
- solid: string;
28
- outline: string;
29
- };
30
- size: {
31
- sm: string;
32
- md: string;
33
- };
34
- }, undefined, string[], {
35
- color: {
36
- neutral: string;
37
- primary: string;
38
- success: string;
39
- warning: string;
40
- danger: string;
41
- info: string;
42
- secondary: string;
43
- };
44
- variant: {
45
- soft: string;
46
- solid: string;
47
- outline: string;
48
- };
49
- size: {
50
- sm: string;
51
- md: string;
52
- };
53
- }, undefined, import("tailwind-variants").TVReturnType<{
54
- color: {
55
- neutral: string;
56
- primary: string;
57
- success: string;
58
- warning: string;
59
- danger: string;
60
- info: string;
61
- secondary: string;
62
- };
63
- variant: {
64
- soft: string;
65
- solid: string;
66
- outline: string;
67
- };
68
- size: {
69
- sm: string;
70
- md: string;
71
- };
72
- }, undefined, string[], unknown, unknown, undefined>>;
73
- type ChipVariants = VariantProps<typeof chipVariants>;
74
- export interface RenderChipProps extends ChipVariants {
19
+ export interface RenderChipProps extends Pick<ChipProps, 'color' | 'variant' | 'size' | 'className'> {
75
20
  children: ReactNode;
76
- className?: string;
77
21
  }
78
22
  export declare function RenderChip(props: RenderChipProps): import("react/jsx-runtime").JSX.Element;
79
- export {};
80
23
  //# sourceMappingURL=RenderChip.d.ts.map