@dashforge/tw 1.1.1 → 1.3.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 (197) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/README.md +45 -0
  3. package/dist/index.esm.js +4443 -667
  4. package/dist/src/components/Accordion/Accordion.d.ts.map +1 -1
  5. package/dist/src/components/Accordion/accordion.types.d.ts +7 -0
  6. package/dist/src/components/Accordion/accordion.types.d.ts.map +1 -1
  7. package/dist/src/components/Alert/Alert.d.ts +1 -1
  8. package/dist/src/components/Alert/Alert.d.ts.map +1 -1
  9. package/dist/src/components/Alert/alert.types.d.ts +17 -0
  10. package/dist/src/components/Alert/alert.types.d.ts.map +1 -1
  11. package/dist/src/components/AppShell/AppShell.d.ts.map +1 -1
  12. package/dist/src/components/AppShell/appShell.types.d.ts +7 -0
  13. package/dist/src/components/AppShell/appShell.types.d.ts.map +1 -1
  14. package/dist/src/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  15. package/dist/src/components/Autocomplete/autocomplete.types.d.ts +47 -1
  16. package/dist/src/components/Autocomplete/autocomplete.types.d.ts.map +1 -1
  17. package/dist/src/components/Avatar/Avatar.d.ts.map +1 -1
  18. package/dist/src/components/Avatar/avatar.types.d.ts +17 -1
  19. package/dist/src/components/Avatar/avatar.types.d.ts.map +1 -1
  20. package/dist/src/components/Badge/Badge.d.ts.map +1 -1
  21. package/dist/src/components/Badge/badge.types.d.ts +27 -2
  22. package/dist/src/components/Badge/badge.types.d.ts.map +1 -1
  23. package/dist/src/components/Box/Box.d.ts.map +1 -1
  24. package/dist/src/components/Box/box.types.d.ts +64 -1
  25. package/dist/src/components/Box/box.types.d.ts.map +1 -1
  26. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  27. package/dist/src/components/Breadcrumbs/breadcrumbs.types.d.ts +26 -1
  28. package/dist/src/components/Breadcrumbs/breadcrumbs.types.d.ts.map +1 -1
  29. package/dist/src/components/Button/Button.d.ts.map +1 -1
  30. package/dist/src/components/Button/button.types.d.ts +53 -1
  31. package/dist/src/components/Button/button.types.d.ts.map +1 -1
  32. package/dist/src/components/Calendar/Calendar.d.ts.map +1 -1
  33. package/dist/src/components/Calendar/calendar.types.d.ts +16 -0
  34. package/dist/src/components/Calendar/calendar.types.d.ts.map +1 -1
  35. package/dist/src/components/Card/Card.d.ts.map +1 -1
  36. package/dist/src/components/Card/card.types.d.ts +17 -0
  37. package/dist/src/components/Card/card.types.d.ts.map +1 -1
  38. package/dist/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  39. package/dist/src/components/Checkbox/checkbox.types.d.ts +19 -1
  40. package/dist/src/components/Checkbox/checkbox.types.d.ts.map +1 -1
  41. package/dist/src/components/Chip/Chip.d.ts.map +1 -1
  42. package/dist/src/components/Chip/chip.types.d.ts +40 -1
  43. package/dist/src/components/Chip/chip.types.d.ts.map +1 -1
  44. package/dist/src/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  45. package/dist/src/components/ConfirmDialog/confirmDialog.types.d.ts +30 -2
  46. package/dist/src/components/ConfirmDialog/confirmDialog.types.d.ts.map +1 -1
  47. package/dist/src/components/Container/Container.d.ts.map +1 -1
  48. package/dist/src/components/Container/container.types.d.ts +29 -1
  49. package/dist/src/components/Container/container.types.d.ts.map +1 -1
  50. package/dist/src/components/DataGrid/DataGrid.d.ts +1 -1
  51. package/dist/src/components/DataGrid/DataGrid.d.ts.map +1 -1
  52. package/dist/src/components/DataGrid/dataGrid.types.d.ts +124 -10
  53. package/dist/src/components/DataGrid/dataGrid.types.d.ts.map +1 -1
  54. package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
  55. package/dist/src/components/DatePicker/DatePicker.d.ts.map +1 -1
  56. package/dist/src/components/DatePicker/datePicker.types.d.ts +18 -0
  57. package/dist/src/components/DatePicker/datePicker.types.d.ts.map +1 -1
  58. package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  59. package/dist/src/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  60. package/dist/src/components/DateRangePicker/dateRangePicker.types.d.ts +18 -0
  61. package/dist/src/components/DateRangePicker/dateRangePicker.types.d.ts.map +1 -1
  62. package/dist/src/components/DateTimePicker/DateTimePicker.d.ts +1 -1
  63. package/dist/src/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  64. package/dist/src/components/DateTimePicker/dateTimePicker.types.d.ts +20 -0
  65. package/dist/src/components/DateTimePicker/dateTimePicker.types.d.ts.map +1 -1
  66. package/dist/src/components/Dialog/Dialog.d.ts.map +1 -1
  67. package/dist/src/components/Dialog/dialog.types.d.ts +25 -1
  68. package/dist/src/components/Dialog/dialog.types.d.ts.map +1 -1
  69. package/dist/src/components/Divider/Divider.d.ts.map +1 -1
  70. package/dist/src/components/Divider/divider.types.d.ts +37 -1
  71. package/dist/src/components/Divider/divider.types.d.ts.map +1 -1
  72. package/dist/src/components/Drawer/Drawer.d.ts +21 -0
  73. package/dist/src/components/Drawer/Drawer.d.ts.map +1 -0
  74. package/dist/src/components/Drawer/drawer.types.d.ts +311 -0
  75. package/dist/src/components/Drawer/drawer.types.d.ts.map +1 -0
  76. package/dist/src/components/Drawer/drawer.variants.d.ts +177 -0
  77. package/dist/src/components/Drawer/drawer.variants.d.ts.map +1 -0
  78. package/dist/src/components/Grid/Grid.d.ts.map +1 -1
  79. package/dist/src/components/Grid/grid.types.d.ts +16 -0
  80. package/dist/src/components/Grid/grid.types.d.ts.map +1 -1
  81. package/dist/src/components/IconButton/IconButton.d.ts.map +1 -1
  82. package/dist/src/components/IconButton/iconButton.types.d.ts +40 -1
  83. package/dist/src/components/IconButton/iconButton.types.d.ts.map +1 -1
  84. package/dist/src/components/Image/Image.d.ts +27 -0
  85. package/dist/src/components/Image/Image.d.ts.map +1 -0
  86. package/dist/src/components/Image/image.types.d.ts +126 -0
  87. package/dist/src/components/Image/image.types.d.ts.map +1 -0
  88. package/dist/src/components/Image/image.variants.d.ts +149 -0
  89. package/dist/src/components/Image/image.variants.d.ts.map +1 -0
  90. package/dist/src/components/LeftNav/LeftNav.d.ts.map +1 -1
  91. package/dist/src/components/LeftNav/leftNav.types.d.ts +26 -6
  92. package/dist/src/components/LeftNav/leftNav.types.d.ts.map +1 -1
  93. package/dist/src/components/Link/Link.d.ts +15 -0
  94. package/dist/src/components/Link/Link.d.ts.map +1 -0
  95. package/dist/src/components/Link/link.types.d.ts +169 -0
  96. package/dist/src/components/Link/link.types.d.ts.map +1 -0
  97. package/dist/src/components/Link/link.variants.d.ts +107 -0
  98. package/dist/src/components/Link/link.variants.d.ts.map +1 -0
  99. package/dist/src/components/Menu/Menu.d.ts +1 -1
  100. package/dist/src/components/Menu/Menu.d.ts.map +1 -1
  101. package/dist/src/components/Menu/menu.types.d.ts +20 -0
  102. package/dist/src/components/Menu/menu.types.d.ts.map +1 -1
  103. package/dist/src/components/NumberField/NumberField.d.ts.map +1 -1
  104. package/dist/src/components/NumberField/numberField.types.d.ts +47 -1
  105. package/dist/src/components/NumberField/numberField.types.d.ts.map +1 -1
  106. package/dist/src/components/OTPField/OTPField.d.ts.map +1 -1
  107. package/dist/src/components/OTPField/otpField.types.d.ts +35 -1
  108. package/dist/src/components/OTPField/otpField.types.d.ts.map +1 -1
  109. package/dist/src/components/Pagination/Pagination.d.ts.map +1 -1
  110. package/dist/src/components/Pagination/pagination.types.d.ts +26 -1
  111. package/dist/src/components/Pagination/pagination.types.d.ts.map +1 -1
  112. package/dist/src/components/Popover/Popover.d.ts.map +1 -1
  113. package/dist/src/components/Popover/popover.types.d.ts +29 -0
  114. package/dist/src/components/Popover/popover.types.d.ts.map +1 -1
  115. package/dist/src/components/Progress/Progress.d.ts +20 -0
  116. package/dist/src/components/Progress/Progress.d.ts.map +1 -0
  117. package/dist/src/components/Progress/progress.types.d.ts +200 -0
  118. package/dist/src/components/Progress/progress.types.d.ts.map +1 -0
  119. package/dist/src/components/Progress/progress.variants.d.ts +224 -0
  120. package/dist/src/components/Progress/progress.variants.d.ts.map +1 -0
  121. package/dist/src/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  122. package/dist/src/components/RadioGroup/radioGroup.types.d.ts +25 -1
  123. package/dist/src/components/RadioGroup/radioGroup.types.d.ts.map +1 -1
  124. package/dist/src/components/Select/Select.d.ts +14 -0
  125. package/dist/src/components/Select/Select.d.ts.map +1 -0
  126. package/dist/src/components/Select/select.types.d.ts +272 -0
  127. package/dist/src/components/Select/select.types.d.ts.map +1 -0
  128. package/dist/src/components/Select/select.variants.d.ts +204 -0
  129. package/dist/src/components/Select/select.variants.d.ts.map +1 -0
  130. package/dist/src/components/Skeleton/Skeleton.d.ts.map +1 -1
  131. package/dist/src/components/Skeleton/skeleton.types.d.ts +25 -1
  132. package/dist/src/components/Skeleton/skeleton.types.d.ts.map +1 -1
  133. package/dist/src/components/Slider/Slider.d.ts +15 -0
  134. package/dist/src/components/Slider/Slider.d.ts.map +1 -0
  135. package/dist/src/components/Slider/slider.types.d.ts +279 -0
  136. package/dist/src/components/Slider/slider.types.d.ts.map +1 -0
  137. package/dist/src/components/Slider/slider.variants.d.ts +313 -0
  138. package/dist/src/components/Slider/slider.variants.d.ts.map +1 -0
  139. package/dist/src/components/Snackbar/Snackbar.d.ts.map +1 -1
  140. package/dist/src/components/Snackbar/snackbar.types.d.ts +29 -5
  141. package/dist/src/components/Snackbar/snackbar.types.d.ts.map +1 -1
  142. package/dist/src/components/Spinner/Spinner.d.ts.map +1 -1
  143. package/dist/src/components/Spinner/spinner.types.d.ts +22 -2
  144. package/dist/src/components/Spinner/spinner.types.d.ts.map +1 -1
  145. package/dist/src/components/Stack/Stack.d.ts.map +1 -1
  146. package/dist/src/components/Stack/stack.types.d.ts +53 -2
  147. package/dist/src/components/Stack/stack.types.d.ts.map +1 -1
  148. package/dist/src/components/Stack/stack.variants.d.ts +23 -0
  149. package/dist/src/components/Stack/stack.variants.d.ts.map +1 -1
  150. package/dist/src/components/Stepper/Step.d.ts +30 -0
  151. package/dist/src/components/Stepper/Step.d.ts.map +1 -0
  152. package/dist/src/components/Stepper/Stepper.d.ts +15 -0
  153. package/dist/src/components/Stepper/Stepper.d.ts.map +1 -0
  154. package/dist/src/components/Stepper/StepperContext.d.ts +8 -0
  155. package/dist/src/components/Stepper/StepperContext.d.ts.map +1 -0
  156. package/dist/src/components/Stepper/stepper.types.d.ts +358 -0
  157. package/dist/src/components/Stepper/stepper.types.d.ts.map +1 -0
  158. package/dist/src/components/Stepper/stepper.variants.d.ts +253 -0
  159. package/dist/src/components/Stepper/stepper.variants.d.ts.map +1 -0
  160. package/dist/src/components/Stepper/useStep.d.ts +53 -0
  161. package/dist/src/components/Stepper/useStep.d.ts.map +1 -0
  162. package/dist/src/components/Switch/Switch.d.ts.map +1 -1
  163. package/dist/src/components/Switch/switch.types.d.ts +44 -1
  164. package/dist/src/components/Switch/switch.types.d.ts.map +1 -1
  165. package/dist/src/components/Table/Table.d.ts +1 -1
  166. package/dist/src/components/Table/Table.d.ts.map +1 -1
  167. package/dist/src/components/Table/table.types.d.ts +103 -8
  168. package/dist/src/components/Table/table.types.d.ts.map +1 -1
  169. package/dist/src/components/Tabs/Tabs.d.ts.map +1 -1
  170. package/dist/src/components/Tabs/tabs.types.d.ts +26 -1
  171. package/dist/src/components/Tabs/tabs.types.d.ts.map +1 -1
  172. package/dist/src/components/TextField/TextField.d.ts.map +1 -1
  173. package/dist/src/components/TextField/textField.types.d.ts +30 -1
  174. package/dist/src/components/TextField/textField.types.d.ts.map +1 -1
  175. package/dist/src/components/Textarea/Textarea.d.ts.map +1 -1
  176. package/dist/src/components/Textarea/textarea.types.d.ts +51 -1
  177. package/dist/src/components/Textarea/textarea.types.d.ts.map +1 -1
  178. package/dist/src/components/TimePicker/TimePicker.d.ts +1 -1
  179. package/dist/src/components/TimePicker/TimePicker.d.ts.map +1 -1
  180. package/dist/src/components/TimePicker/timePicker.types.d.ts +18 -0
  181. package/dist/src/components/TimePicker/timePicker.types.d.ts.map +1 -1
  182. package/dist/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  183. package/dist/src/components/Tooltip/tooltip.types.d.ts +30 -0
  184. package/dist/src/components/Tooltip/tooltip.types.d.ts.map +1 -1
  185. package/dist/src/components/TopBar/TopBar.d.ts.map +1 -1
  186. package/dist/src/components/TopBar/topBar.types.d.ts +25 -1
  187. package/dist/src/components/TopBar/topBar.types.d.ts.map +1 -1
  188. package/dist/src/components/Typography/Typography.d.ts.map +1 -1
  189. package/dist/src/components/Typography/typography.types.d.ts +47 -1
  190. package/dist/src/components/Typography/typography.types.d.ts.map +1 -1
  191. package/dist/src/components/Typography/typography.variants.d.ts +2 -2
  192. package/dist/src/components/Typography/typography.variants.d.ts.map +1 -1
  193. package/dist/src/hooks/useStandaloneFieldWarning.d.ts +38 -0
  194. package/dist/src/hooks/useStandaloneFieldWarning.d.ts.map +1 -0
  195. package/dist/src/index.d.ts +66 -42
  196. package/dist/src/index.d.ts.map +1 -1
  197. package/package.json +5 -4
@@ -0,0 +1,177 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ /**
3
+ * `<Drawer>` variant recipe — edge-anchored sliding panel.
4
+ *
5
+ * Slots:
6
+ * - `overlay` — backdrop (rendered only when `variant='temporary'`)
7
+ * - `content` — the drawer panel itself (positioned + sized)
8
+ * - `header` — top region holding title + close button
9
+ * - `title` — the accessible heading
10
+ * - `closeButton` — the `×` button (top-right of header)
11
+ * - `body` — main scrollable content region
12
+ * - `footer` — bottom action bar (rendered when `footer` prop is set)
13
+ * - `resizeHandle` — drag handle on the free edge (rendered when `resize=true`)
14
+ *
15
+ * Axes:
16
+ * - `position` — which viewport edge the drawer anchors to. Drives the
17
+ * translate direction on open/close + which side gets a
18
+ * border.
19
+ * - `size` — bounded-axis preset (width for left/right, height for
20
+ * top/bottom). Applied programmatically in `Drawer.tsx`
21
+ * because the same size name maps to a different axis
22
+ * depending on `position`.
23
+ * - `variant` — `'temporary'` (modal, backdrop, focus trap, scroll
24
+ * lock) or `'persistent'` (non-modal, no backdrop,
25
+ * coexists with the surrounding content).
26
+ *
27
+ * Motion is gated by `prefers-reduced-motion`: slide animations collapse
28
+ * to instantaneous appear/disappear for users who opt out.
29
+ */
30
+ export declare const drawerVariants: import("tailwind-variants").TVReturnType<{
31
+ position: {
32
+ right: {
33
+ content: string[];
34
+ resizeHandle: string;
35
+ };
36
+ left: {
37
+ content: string[];
38
+ resizeHandle: string;
39
+ };
40
+ top: {
41
+ content: string[];
42
+ resizeHandle: string;
43
+ };
44
+ bottom: {
45
+ content: string[];
46
+ resizeHandle: string;
47
+ };
48
+ };
49
+ variant: {
50
+ temporary: {};
51
+ persistent: {};
52
+ sticky: {};
53
+ };
54
+ size: {
55
+ sm: {};
56
+ md: {};
57
+ lg: {};
58
+ full: {};
59
+ };
60
+ }, {
61
+ overlay: string[];
62
+ content: string[];
63
+ header: string[];
64
+ title: string;
65
+ closeButton: string[];
66
+ body: string;
67
+ footer: string[];
68
+ resizeHandle: string[];
69
+ }, undefined, {
70
+ position: {
71
+ right: {
72
+ content: string[];
73
+ resizeHandle: string;
74
+ };
75
+ left: {
76
+ content: string[];
77
+ resizeHandle: string;
78
+ };
79
+ top: {
80
+ content: string[];
81
+ resizeHandle: string;
82
+ };
83
+ bottom: {
84
+ content: string[];
85
+ resizeHandle: string;
86
+ };
87
+ };
88
+ variant: {
89
+ temporary: {};
90
+ persistent: {};
91
+ sticky: {};
92
+ };
93
+ size: {
94
+ sm: {};
95
+ md: {};
96
+ lg: {};
97
+ full: {};
98
+ };
99
+ }, {
100
+ overlay: string[];
101
+ content: string[];
102
+ header: string[];
103
+ title: string;
104
+ closeButton: string[];
105
+ body: string;
106
+ footer: string[];
107
+ resizeHandle: string[];
108
+ }, import("tailwind-variants").TVReturnType<{
109
+ position: {
110
+ right: {
111
+ content: string[];
112
+ resizeHandle: string;
113
+ };
114
+ left: {
115
+ content: string[];
116
+ resizeHandle: string;
117
+ };
118
+ top: {
119
+ content: string[];
120
+ resizeHandle: string;
121
+ };
122
+ bottom: {
123
+ content: string[];
124
+ resizeHandle: string;
125
+ };
126
+ };
127
+ variant: {
128
+ temporary: {};
129
+ persistent: {};
130
+ sticky: {};
131
+ };
132
+ size: {
133
+ sm: {};
134
+ md: {};
135
+ lg: {};
136
+ full: {};
137
+ };
138
+ }, {
139
+ overlay: string[];
140
+ content: string[];
141
+ header: string[];
142
+ title: string;
143
+ closeButton: string[];
144
+ body: string;
145
+ footer: string[];
146
+ resizeHandle: string[];
147
+ }, undefined, unknown, unknown, undefined>>;
148
+ export type DrawerVariants = VariantProps<typeof drawerVariants>;
149
+ /**
150
+ * Size presets. Each entry maps a size name to a Tailwind class for
151
+ * both the horizontal axis (used by left/right drawers → width) and the
152
+ * vertical axis (used by top/bottom drawers → height).
153
+ *
154
+ * `full` uses `w-screen` / `h-screen` for a full-viewport drawer — the
155
+ * mobile-fullscreen pattern.
156
+ *
157
+ * Values in px (approximate):
158
+ * sm → 256 (w-64) / 192 (h-48)
159
+ * md → 320 (w-80) / 288 (h-72)
160
+ * lg → 384 (w-96) / 384 (h-96)
161
+ * full → 100vw / 100vh
162
+ */
163
+ export declare const DRAWER_SIZE_PRESETS: Record<NonNullable<DrawerVariants['size']>, {
164
+ x: string;
165
+ y: string;
166
+ xPx: number;
167
+ yPx: number;
168
+ }>;
169
+ /**
170
+ * Whether a position places the drawer on a horizontal edge (left/right),
171
+ * in which case the bounded axis is width — versus a vertical edge
172
+ * (top/bottom), where the bounded axis is height. Used everywhere the
173
+ * component needs to decide whether to work with `w-*` classes and `x`
174
+ * axis coordinates, or `h-*` and `y`.
175
+ */
176
+ export declare function isHorizontalDrawer(position: NonNullable<DrawerVariants['position']>): boolean;
177
+ //# sourceMappingURL=drawer.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Drawer/drawer.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA0IzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EACnC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAMnD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,GAChD,OAAO,CAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI,mGAwGhB,CAAC"}
1
+ {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI,mGAsHhB,CAAC"}
@@ -99,5 +99,21 @@ interface GridCommonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
99
99
  * `<Grid>` props — discriminated union: container OR item, never both.
100
100
  */
101
101
  export type GridProps = (GridContainerProps | GridItemProps) & GridCommonProps;
102
+ /**
103
+ * Subset of `<Grid container>` props theme-configurable via
104
+ * `theme.components.Grid.defaults` (Option C).
105
+ *
106
+ * Only container-role axes are exposed — item breakpoints (`xs`, `sm`,
107
+ * `md`, `lg`, `xl`) are per-instance responsive layout choices and are
108
+ * intentionally excluded.
109
+ */
110
+ export type GridVariantProps = Pick<GridContainerProps, 'cols' | 'spacing' | 'spacingX' | 'spacingY' | 'autoFlow'>;
111
+ declare module '@dashforge/tw-tokens' {
112
+ interface TWComponentDefaults {
113
+ Grid?: {
114
+ defaults?: Partial<GridVariantProps>;
115
+ };
116
+ }
117
+ }
102
118
  export {};
103
119
  //# sourceMappingURL=grid.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEzD;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GACf,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAChD,MAAM,GACN,MAAM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,SAAS,EAAE,IAAI,CAAC;IAChB,qCAAqC;IACrC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAA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ACjF,gFAAgF;IAChF,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,kBAAkB,GAAG,aAAa,CAAC,GAAG,eAAe,CAAC;AAE/E;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,kBAAkB,EAClB,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAC1D,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,mBAAmB;QAC3B,IAAI,CAAC,EAAE;YACL,QAAQ,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;SACtC,CAAC;KACH;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAY7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,UAAU,+GAgFtB,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAY7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,UAAU,+GAkFtB,CAAC"}
@@ -3,6 +3,19 @@ import type { ClassValue } from 'tailwind-variants';
3
3
  import type { Engine } from '@dashforge/ui-core';
4
4
  import type { AccessRequirement } from '@dashforge/rbac';
5
5
  import type { ButtonVariants } from '../Button/button.variants.js';
6
+ /**
7
+ * Subset of `<IconButton>` props theme-configurable via
8
+ * `theme.components.IconButton.defaults` (Option C). Same variant axes
9
+ * as `<Button>` since IconButton reuses `buttonVariants`.
10
+ */
11
+ export type IconButtonVariantProps = Pick<ButtonVariants, 'variant' | 'color' | 'size' | 'loading'>;
12
+ declare module '@dashforge/tw-tokens' {
13
+ interface TWComponentDefaults {
14
+ IconButton?: {
15
+ defaults?: Partial<IconButtonVariantProps>;
16
+ };
17
+ }
18
+ }
6
19
  /**
7
20
  * Props for `<IconButton>`.
8
21
  *
@@ -50,7 +63,33 @@ import type { ButtonVariants } from '../Button/button.variants.js';
50
63
  * </IconButton>
51
64
  * ```
52
65
  */
53
- export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'children'>, Pick<ButtonVariants, 'variant' | 'color' | 'size' | 'loading'> {
66
+ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'children'> {
67
+ /**
68
+ * Semantic intent role — same axis as `<Button>`, though the
69
+ * default here is `'neutral'` (icon-only surfaces usually deserve
70
+ * a subtler default variant than solid + primary).
71
+ * @default 'neutral'
72
+ */
73
+ color?: ButtonVariants['color'];
74
+ /**
75
+ * Visual treatment. Same axis as `<Button>`; default is `'ghost'`
76
+ * because icon-only actions are typically secondary.
77
+ * @default 'ghost'
78
+ */
79
+ variant?: ButtonVariants['variant'];
80
+ /**
81
+ * Square hit-area tier — matches Button's height scale so a
82
+ * `<Button size="md">` and `<IconButton size="md">` align in the
83
+ * same row.
84
+ * @default 'md'
85
+ */
86
+ size?: ButtonVariants['size'];
87
+ /**
88
+ * When `true`, replace the icon with a `<Spinner>`, short-circuit
89
+ * clicks, and set `aria-busy="true"`.
90
+ * @default false
91
+ */
92
+ loading?: ButtonVariants['loading'];
54
93
  /**
55
94
  * The icon — typically an SVG element from the consumer's icon
56
95
  * library (Lucide / Phosphor / Tabler / inline SVG). A single
@@ -1 +1 @@
1
- {"version":3,"file":"iconButton.types.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/iconButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CACR,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,OAAO,GAAG,UAAU,CACrB,EACD,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAE1C;;;OAGG;IACH,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB"}
1
+ {"version":3,"file":"iconButton.types.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/iconButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC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+ /**
3
+ * Dashforge TW `<Image>` — a declarative, robust wrapper over the
4
+ * native `<img>`. Zero eval, no data fetching: it renders a URL you
5
+ * give it, and adds the three things a bare `<img>` lacks.
6
+ *
7
+ * 1. **No layout shift** — pass `aspectRatio` (or `width` + `height`)
8
+ * and the box is reserved before the image loads (CSS
9
+ * `aspect-ratio`, no JS measurement).
10
+ * 2. **Loading skeleton** — a `<Skeleton>` fills the reserved box
11
+ * while the image loads, and is skipped for already-cached images
12
+ * so there is no flash.
13
+ * 3. **Graceful error** — on load failure a muted fallback replaces
14
+ * the broken-image glyph (`fallback` to customise).
15
+ *
16
+ * Lazy by default (`loading="lazy"`). Any native `<img>` attribute not
17
+ * named here (`srcSet`, `sizes`, `decoding`, …) is forwarded to the
18
+ * underlying element. The ref points at the `<img>`.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <Image src="/hero.jpg" alt="Team at work" aspectRatio={16 / 9} rounded="lg" />
23
+ * <Image src={avatarUrl} alt="Jane Doe" width={48} height={48} rounded="full" />
24
+ * ```
25
+ */
26
+ export declare const Image: import("react").ForwardRefExoticComponent<ImageProps & import("react").RefAttributes<HTMLImageElement>>;
27
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/Image.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8BnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,KAAK,yGAiJjB,CAAC"}
@@ -0,0 +1,126 @@
1
+ import type { ImgHTMLAttributes, ReactNode } from 'react';
2
+ import type { AccessRequirement } from '@dashforge/rbac';
3
+ import type { Engine } from '@dashforge/ui-core';
4
+ import type { ImageVariants } from './image.variants.js';
5
+ /**
6
+ * Subset of `<Image>` props theme-configurable via
7
+ * `theme.components.Image.defaults` (Option C).
8
+ */
9
+ export type ImageVariantProps = Pick<ImageVariants, 'fit' | 'rounded'>;
10
+ declare module '@dashforge/tw-tokens' {
11
+ interface TWComponentDefaults {
12
+ Image?: {
13
+ defaults?: Partial<ImageVariantProps>;
14
+ slotProps?: ImageSlotProps;
15
+ };
16
+ }
17
+ }
18
+ export interface ImageSlotProps {
19
+ /** Wrapper element override. */
20
+ root?: {
21
+ className?: string;
22
+ };
23
+ /** `<img>` element override. */
24
+ img?: {
25
+ className?: string;
26
+ };
27
+ /** Loading-skeleton overlay override. */
28
+ skeleton?: {
29
+ className?: string;
30
+ };
31
+ /** Error-fallback overlay override. */
32
+ fallback?: {
33
+ className?: string;
34
+ };
35
+ }
36
+ /**
37
+ * Props for `<Image>`.
38
+ *
39
+ * A thin, declarative wrapper over the native `<img>` — zero eval, no
40
+ * data fetching — with the robustness a native `<img>` lacks:
41
+ *
42
+ * 1. **No layout shift.** Give `aspectRatio` (or `width` + `height`)
43
+ * and the box is reserved before the image loads (CSS
44
+ * `aspect-ratio`, no JS measurement).
45
+ * 2. **Loading skeleton.** While the image loads, a `<Skeleton>` fills
46
+ * the reserved box. It is skipped automatically for already-cached
47
+ * images (no flash).
48
+ * 3. **Graceful error.** On load failure a muted fallback replaces the
49
+ * broken-image glyph — pass your own via `fallback`.
50
+ * 4. **Lazy by default** (`loading="lazy"`).
51
+ *
52
+ * Any native `<img>` attribute not listed here (`srcSet`, `sizes`,
53
+ * `crossOrigin`, `referrerPolicy`, `decoding`, …) is forwarded to the
54
+ * underlying element.
55
+ *
56
+ * Note on privacy: an external `src` is fetched by the browser from
57
+ * that host (egress). Self-host the asset (same-origin / your CDN) to
58
+ * keep it inside your boundary.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * <Image src="/hero.jpg" alt="Team at work" aspectRatio={16 / 9} rounded="lg" />
63
+ * <Image src={avatarUrl} alt="Jane Doe" width={48} height={48} rounded="full" />
64
+ * <Image src={maybeBroken} alt="Product" aspectRatio={1} fallback={<MyPlaceholder />} />
65
+ * ```
66
+ */
67
+ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'className'> {
68
+ /** Image source URL. Same-origin / data: keeps it inside your boundary; an external host is egress. */
69
+ src: string;
70
+ /**
71
+ * Alternative text (accessibility). Describe what the image conveys;
72
+ * use `alt=""` for purely decorative images so assistive tech skips it.
73
+ */
74
+ alt: string;
75
+ /**
76
+ * Locks the box shape before load to prevent layout shift — a number
77
+ * (`16 / 9`, `1`) or a CSS `aspect-ratio` string (`'16 / 9'`). When
78
+ * set, the image fills the box via `object-fit`.
79
+ */
80
+ aspectRatio?: number | string;
81
+ /**
82
+ * How the image fills its box — CSS `object-fit`.
83
+ * @default 'cover'
84
+ */
85
+ fit?: ImageVariants['fit'];
86
+ /**
87
+ * Corner radius token, clipped via `overflow-hidden`.
88
+ * @default 'none'
89
+ */
90
+ rounded?: ImageVariants['rounded'];
91
+ /**
92
+ * Native lazy/eager loading. Lazy defers off-screen images.
93
+ * @default 'lazy'
94
+ */
95
+ loading?: 'lazy' | 'eager';
96
+ /**
97
+ * Show a `<Skeleton>` while the image loads. Requires a reserved box
98
+ * (`aspectRatio`, or both `width` and `height`) — without one there
99
+ * is no space to paint it, so it is skipped.
100
+ * @default true
101
+ */
102
+ showSkeleton?: boolean;
103
+ /**
104
+ * Content shown when the image fails to load. Defaults to a muted
105
+ * surface with a broken-image glyph.
106
+ */
107
+ fallback?: ReactNode;
108
+ /**
109
+ * RBAC access requirement. When the current user is unauthorized:
110
+ * `onUnauthorized: 'hide'` → the image does not render; `'disable'` /
111
+ * `'readonly'` → it renders dimmed and non-interactive (an image has no
112
+ * true disabled state). Resolved against the nearest `RbacProvider`.
113
+ */
114
+ access?: AccessRequirement;
115
+ /**
116
+ * Reactive visibility predicate evaluated against the form engine — the
117
+ * image renders only when it returns `true` (e.g. show a preview once a
118
+ * file field has a value). No-op outside a `<DashForm>`.
119
+ */
120
+ visibleWhen?: (engine: Engine) => boolean;
121
+ /** Root-level Tailwind override (wins via `tailwind-merge`). */
122
+ sx?: string;
123
+ /** Per-slot overrides. */
124
+ slotProps?: ImageSlotProps;
125
+ }
126
+ //# sourceMappingURL=image.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/image.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,SAAS,CAAC,CAAC;AAEvE,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,mBAAmB;QAC3B,KAAK,CAAC,EAAE;YACN,QAAQ,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;YACtC,SAAS,CAAC,EAAE,cAAc,CAAC;SAC5B,CAAC;KACH;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,gCAAgC;IAChC,GAAG,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,uCAAuC;IACvC,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,WAAW,CAAC;IAC9E,uGAAuG;IACvG,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE9B;;;OAGG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAEnC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAE1C,gEAAgE;IAChE,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,0BAA0B;IAC1B,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B"}
@@ -0,0 +1,149 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ /**
3
+ * `<Image>` variant recipe.
4
+ *
5
+ * Slots:
6
+ * - `root` — positioned wrapper. Holds the `<img>` plus the
7
+ * loading skeleton / error-fallback overlays, and owns
8
+ * the corner radius + overflow clipping. `relative` so
9
+ * the overlays can be `absolute inset-0`.
10
+ * - `img` — the `<img>` element. `object-*` (the `fit` axis)
11
+ * lives here; `block w-full h-full` so it fills the
12
+ * reserved box when an aspect ratio / dimensions are
13
+ * given.
14
+ * - `skeleton` — the loading placeholder overlay (a `<Skeleton>`
15
+ * stretched over the reserved box).
16
+ * - `fallback` — the broken-image overlay shown after `onError`.
17
+ *
18
+ * Variant axes:
19
+ * - `fit` — CSS `object-fit`. `cover` (default) crops to fill,
20
+ * `contain` letterboxes, etc.
21
+ * - `rounded` — corner radius token, applied to `root` (which clips
22
+ * the image via `overflow-hidden`).
23
+ *
24
+ * Neutral fallback surface auto-inverts through the dashforge preset's
25
+ * CSS-variable layer (no explicit `dark:`).
26
+ */
27
+ export declare const imageVariants: import("tailwind-variants").TVReturnType<{
28
+ fit: {
29
+ cover: {
30
+ img: string;
31
+ };
32
+ contain: {
33
+ img: string;
34
+ };
35
+ fill: {
36
+ img: string;
37
+ };
38
+ none: {
39
+ img: string;
40
+ };
41
+ 'scale-down': {
42
+ img: string;
43
+ };
44
+ };
45
+ rounded: {
46
+ none: {
47
+ root: string;
48
+ };
49
+ sm: {
50
+ root: string;
51
+ };
52
+ md: {
53
+ root: string;
54
+ };
55
+ lg: {
56
+ root: string;
57
+ };
58
+ full: {
59
+ root: string;
60
+ };
61
+ };
62
+ }, {
63
+ root: string[];
64
+ img: string[];
65
+ skeleton: string[];
66
+ fallback: string[];
67
+ }, undefined, {
68
+ fit: {
69
+ cover: {
70
+ img: string;
71
+ };
72
+ contain: {
73
+ img: string;
74
+ };
75
+ fill: {
76
+ img: string;
77
+ };
78
+ none: {
79
+ img: string;
80
+ };
81
+ 'scale-down': {
82
+ img: string;
83
+ };
84
+ };
85
+ rounded: {
86
+ none: {
87
+ root: string;
88
+ };
89
+ sm: {
90
+ root: string;
91
+ };
92
+ md: {
93
+ root: string;
94
+ };
95
+ lg: {
96
+ root: string;
97
+ };
98
+ full: {
99
+ root: string;
100
+ };
101
+ };
102
+ }, {
103
+ root: string[];
104
+ img: string[];
105
+ skeleton: string[];
106
+ fallback: string[];
107
+ }, import("tailwind-variants").TVReturnType<{
108
+ fit: {
109
+ cover: {
110
+ img: string;
111
+ };
112
+ contain: {
113
+ img: string;
114
+ };
115
+ fill: {
116
+ img: string;
117
+ };
118
+ none: {
119
+ img: string;
120
+ };
121
+ 'scale-down': {
122
+ img: string;
123
+ };
124
+ };
125
+ rounded: {
126
+ none: {
127
+ root: string;
128
+ };
129
+ sm: {
130
+ root: string;
131
+ };
132
+ md: {
133
+ root: string;
134
+ };
135
+ lg: {
136
+ root: string;
137
+ };
138
+ full: {
139
+ root: string;
140
+ };
141
+ };
142
+ }, {
143
+ root: string[];
144
+ img: string[];
145
+ skeleton: string[];
146
+ fallback: string[];
147
+ }, undefined, unknown, unknown, undefined>>;
148
+ export type ImageVariants = VariantProps<typeof imageVariants>;
149
+ //# sourceMappingURL=image.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/image.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoCxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LeftNav.d.ts","sourceRoot":"","sources":["../../../../src/components/LeftNav/LeftNav.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,oBAAoB,CAAC;AA+M5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAkF1C"}
1
+ {"version":3,"file":"LeftNav.d.ts","sourceRoot":"","sources":["../../../../src/components/LeftNav/LeftNav.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,oBAAoB,CAAC;AAiN5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAqF1C"}
@@ -1,6 +1,19 @@
1
1
  import type { ReactNode, ComponentType, AnchorHTMLAttributes, Ref } from 'react';
2
2
  import type { AccessRequirement } from '@dashforge/rbac';
3
3
  import type { LeftNavVariants } from './leftNav.variants.js';
4
+ /**
5
+ * Subset of `<LeftNav>` props theme-configurable via
6
+ * `theme.components.LeftNav.defaults` (Option C).
7
+ */
8
+ export type LeftNavVariantProps = Pick<LeftNavVariants, 'width' | 'collapsed'>;
9
+ declare module '@dashforge/tw-tokens' {
10
+ interface TWComponentDefaults {
11
+ LeftNav?: {
12
+ defaults?: Partial<LeftNavVariantProps>;
13
+ slotProps?: LeftNavSlotProps;
14
+ };
15
+ }
16
+ }
4
17
  /**
5
18
  * One row in the LeftNav. May be either a clickable item OR a group
6
19
  * (a header that owns nested children, optionally collapsible).
@@ -105,15 +118,22 @@ export interface LeftNavSlotProps {
105
118
  * component renders the actual nav content and exposes a `collapsed`
106
119
  * prop for the icon-only "rail" rendering.
107
120
  */
108
- export interface LeftNavProps extends LeftNavVariants {
121
+ export interface LeftNavProps {
122
+ /**
123
+ * Expanded-mode width tier — sm:w-48, md:w-60, lg:w-72.
124
+ * @default 'md'
125
+ */
126
+ width?: LeftNavVariants['width'];
127
+ /**
128
+ * Rail mode — icons only, labels visually hidden but kept in DOM
129
+ * for a11y (`sr-only`). Group children collapse under a caret.
130
+ * @default false
131
+ */
132
+ collapsed?: LeftNavVariants['collapsed'];
133
+ /** Nav items — a mix of `LeftNavItem` and `LeftNavGroup`. */
109
134
  items: LeftNavNode[];
110
135
  /** Currently-active item id (highlight + `aria-current="page"`). */
111
136
  activeId?: string;
112
- /**
113
- * Icon-only rail mode. When `true`, labels and group children are
114
- * visually hidden (kept for screen readers via `sr-only`).
115
- */
116
- collapsed?: boolean;
117
137
  /** Fired when the user clicks the collapse-toggle button. */
118
138
  onCollapseChange?: (collapsed: boolean) => void;
119
139
  /** Fired when a group's expanded state changes (controlled or not). */