@dashforge/tw 1.1.0 → 1.1.1

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 (390) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/dist/index.esm.js +1 -1
  3. package/dist/src/index.d.ts +1 -1
  4. package/package.json +8 -3
  5. package/.swcrc +0 -29
  6. package/A11Y.md +0 -130
  7. package/CONSUMER-VALIDATION.md +0 -130
  8. package/COVERAGE.md +0 -63
  9. package/PARITY.md +0 -481
  10. package/PERFORMANCE.md +0 -227
  11. package/REFINEMENT-NOTES.md +0 -50
  12. package/THEME-AUDIT.md +0 -174
  13. package/dashforge-tw-1.0.0.tgz +0 -0
  14. package/eslint.config.mjs +0 -62
  15. package/project.json +0 -15
  16. package/rollup.config.cjs +0 -16
  17. package/src/components/Accordion/Accordion.test.tsx +0 -95
  18. package/src/components/Accordion/Accordion.tsx +0 -97
  19. package/src/components/Accordion/accordion.types.ts +0 -66
  20. package/src/components/Accordion/accordion.variants.ts +0 -32
  21. package/src/components/Alert/Alert.test.tsx +0 -302
  22. package/src/components/Alert/Alert.tsx +0 -186
  23. package/src/components/Alert/alert.types.ts +0 -144
  24. package/src/components/Alert/alert.variants.ts +0 -71
  25. package/src/components/AppShell/AppShell.test.tsx +0 -223
  26. package/src/components/AppShell/AppShell.tsx +0 -239
  27. package/src/components/AppShell/appShell.types.ts +0 -49
  28. package/src/components/AppShell/appShell.variants.ts +0 -54
  29. package/src/components/AspectRatio/AspectRatio.test.tsx +0 -173
  30. package/src/components/AspectRatio/AspectRatio.tsx +0 -73
  31. package/src/components/AspectRatio/aspectRatio.types.ts +0 -54
  32. package/src/components/Autocomplete/Autocomplete.perf.test.tsx +0 -225
  33. package/src/components/Autocomplete/Autocomplete.test.tsx +0 -556
  34. package/src/components/Autocomplete/Autocomplete.tsx +0 -1069
  35. package/src/components/Autocomplete/autocomplete.types.ts +0 -198
  36. package/src/components/Autocomplete/autocomplete.variants.ts +0 -141
  37. package/src/components/Avatar/Avatar.test.tsx +0 -287
  38. package/src/components/Avatar/Avatar.tsx +0 -304
  39. package/src/components/Avatar/avatar.types.ts +0 -205
  40. package/src/components/Avatar/avatar.variants.ts +0 -194
  41. package/src/components/Badge/Badge.test.tsx +0 -385
  42. package/src/components/Badge/Badge.tsx +0 -174
  43. package/src/components/Badge/badge.types.ts +0 -154
  44. package/src/components/Badge/badge.variants.ts +0 -161
  45. package/src/components/Box/Box.test.tsx +0 -391
  46. package/src/components/Box/Box.tsx +0 -112
  47. package/src/components/Box/box.types.ts +0 -116
  48. package/src/components/Box/box.variants.ts +0 -230
  49. package/src/components/Breadcrumbs/Breadcrumbs.perf.test.tsx +0 -128
  50. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +0 -231
  51. package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -203
  52. package/src/components/Breadcrumbs/breadcrumbs.types.ts +0 -87
  53. package/src/components/Breadcrumbs/breadcrumbs.variants.ts +0 -54
  54. package/src/components/Button/Button.test.tsx +0 -204
  55. package/src/components/Button/Button.tsx +0 -151
  56. package/src/components/Button/button.types.ts +0 -110
  57. package/src/components/Button/button.variants.ts +0 -159
  58. package/src/components/Calendar/Calendar.test.tsx +0 -75
  59. package/src/components/Calendar/Calendar.tsx +0 -264
  60. package/src/components/Calendar/calendar.types.ts +0 -65
  61. package/src/components/Calendar/calendar.variants.ts +0 -64
  62. package/src/components/Card/Card.test.tsx +0 -291
  63. package/src/components/Card/Card.tsx +0 -241
  64. package/src/components/Card/card.types.ts +0 -132
  65. package/src/components/Checkbox/Checkbox.test.tsx +0 -146
  66. package/src/components/Checkbox/Checkbox.tsx +0 -286
  67. package/src/components/Checkbox/checkbox.types.ts +0 -88
  68. package/src/components/Checkbox/checkbox.variants.ts +0 -68
  69. package/src/components/Chip/Chip.test.tsx +0 -316
  70. package/src/components/Chip/Chip.tsx +0 -224
  71. package/src/components/Chip/chip.types.ts +0 -128
  72. package/src/components/Chip/chip.variants.ts +0 -173
  73. package/src/components/ConfirmDialog/ConfirmDialog.perf.test.tsx +0 -172
  74. package/src/components/ConfirmDialog/ConfirmDialog.test.tsx +0 -311
  75. package/src/components/ConfirmDialog/ConfirmDialog.tsx +0 -252
  76. package/src/components/ConfirmDialog/confirmDialog.types.ts +0 -70
  77. package/src/components/ConfirmDialog/confirmDialog.variants.ts +0 -76
  78. package/src/components/Container/Container.test.tsx +0 -209
  79. package/src/components/Container/Container.tsx +0 -74
  80. package/src/components/Container/container.types.ts +0 -45
  81. package/src/components/Container/container.variants.ts +0 -81
  82. package/src/components/DataGrid/DataGrid.perf.test.tsx +0 -114
  83. package/src/components/DataGrid/DataGrid.test.tsx +0 -1153
  84. package/src/components/DataGrid/DataGrid.tsx +0 -1282
  85. package/src/components/DataGrid/dataGrid.types.ts +0 -238
  86. package/src/components/DataGrid/dataGrid.variants.ts +0 -152
  87. package/src/components/DataGrid/filters/ColumnFilters.test.tsx +0 -330
  88. package/src/components/DataGrid/filters/ColumnFilters.tsx +0 -456
  89. package/src/components/DataGrid/reorder/useColumnReorder.test.ts +0 -130
  90. package/src/components/DataGrid/reorder/useColumnReorder.ts +0 -144
  91. package/src/components/DataGrid/resize/useColumnResize.test.ts +0 -144
  92. package/src/components/DataGrid/resize/useColumnResize.ts +0 -135
  93. package/src/components/DataGrid/visibility/ColumnVisibilityMenu.tsx +0 -186
  94. package/src/components/DatePicker/DatePicker.test.tsx +0 -76
  95. package/src/components/DatePicker/DatePicker.tsx +0 -305
  96. package/src/components/DatePicker/datePicker.types.ts +0 -77
  97. package/src/components/DatePicker/datePicker.variants.ts +0 -50
  98. package/src/components/DateRangePicker/DateRangePicker.test.tsx +0 -92
  99. package/src/components/DateRangePicker/DateRangePicker.tsx +0 -510
  100. package/src/components/DateRangePicker/dateRangePicker.types.ts +0 -74
  101. package/src/components/DateRangePicker/dateRangePicker.variants.ts +0 -101
  102. package/src/components/DateTimePicker/DateTimePicker.test.tsx +0 -78
  103. package/src/components/DateTimePicker/DateTimePicker.tsx +0 -347
  104. package/src/components/DateTimePicker/dateTimePicker.types.ts +0 -79
  105. package/src/components/DateTimePicker/dateTimePicker.variants.ts +0 -55
  106. package/src/components/Dialog/Dialog.test.tsx +0 -96
  107. package/src/components/Dialog/Dialog.tsx +0 -102
  108. package/src/components/Dialog/dialog.types.ts +0 -62
  109. package/src/components/Dialog/dialog.variants.ts +0 -66
  110. package/src/components/Divider/Divider.test.tsx +0 -243
  111. package/src/components/Divider/Divider.tsx +0 -140
  112. package/src/components/Divider/divider.types.ts +0 -52
  113. package/src/components/Divider/divider.variants.ts +0 -116
  114. package/src/components/Grid/Grid.test.tsx +0 -321
  115. package/src/components/Grid/Grid.tsx +0 -148
  116. package/src/components/Grid/grid.types.ts +0 -112
  117. package/src/components/Grid/grid.variants.ts +0 -133
  118. package/src/components/IconButton/IconButton.test.tsx +0 -367
  119. package/src/components/IconButton/IconButton.tsx +0 -159
  120. package/src/components/IconButton/iconButton.types.ts +0 -106
  121. package/src/components/IconButton/iconButton.variants.ts +0 -31
  122. package/src/components/LeftNav/LeftNav.perf.test.tsx +0 -172
  123. package/src/components/LeftNav/LeftNav.test.tsx +0 -302
  124. package/src/components/LeftNav/LeftNav.tsx +0 -330
  125. package/src/components/LeftNav/leftNav.types.ts +0 -120
  126. package/src/components/LeftNav/leftNav.variants.ts +0 -107
  127. package/src/components/Menu/Menu.test.tsx +0 -408
  128. package/src/components/Menu/Menu.tsx +0 -335
  129. package/src/components/Menu/menu.types.ts +0 -221
  130. package/src/components/Menu/menu.variants.ts +0 -132
  131. package/src/components/NumberField/NumberField.test.tsx +0 -83
  132. package/src/components/NumberField/NumberField.tsx +0 -321
  133. package/src/components/NumberField/numberField.types.ts +0 -72
  134. package/src/components/NumberField/numberField.variants.ts +0 -94
  135. package/src/components/OTPField/OTPField.test.tsx +0 -121
  136. package/src/components/OTPField/OTPField.tsx +0 -250
  137. package/src/components/OTPField/otpField.types.ts +0 -58
  138. package/src/components/OTPField/otpField.variants.ts +0 -72
  139. package/src/components/Pagination/Pagination.test.tsx +0 -314
  140. package/src/components/Pagination/Pagination.tsx +0 -277
  141. package/src/components/Pagination/pagination.helpers.ts +0 -102
  142. package/src/components/Pagination/pagination.types.ts +0 -117
  143. package/src/components/Pagination/pagination.variants.ts +0 -117
  144. package/src/components/Popover/Popover.test.tsx +0 -72
  145. package/src/components/Popover/Popover.tsx +0 -55
  146. package/src/components/Popover/popover.types.ts +0 -42
  147. package/src/components/Popover/popover.variants.ts +0 -24
  148. package/src/components/RadioGroup/RadioGroup.test.tsx +0 -140
  149. package/src/components/RadioGroup/RadioGroup.tsx +0 -283
  150. package/src/components/RadioGroup/radioGroup.types.ts +0 -85
  151. package/src/components/RadioGroup/radioGroup.variants.ts +0 -87
  152. package/src/components/Skeleton/Skeleton.test.tsx +0 -127
  153. package/src/components/Skeleton/Skeleton.tsx +0 -49
  154. package/src/components/Skeleton/skeleton.types.ts +0 -59
  155. package/src/components/Skeleton/skeleton.variants.ts +0 -87
  156. package/src/components/Snackbar/Snackbar.perf.test.tsx +0 -144
  157. package/src/components/Snackbar/Snackbar.test.tsx +0 -327
  158. package/src/components/Snackbar/Snackbar.tsx +0 -316
  159. package/src/components/Snackbar/snackbar.types.ts +0 -127
  160. package/src/components/Snackbar/snackbar.variants.ts +0 -81
  161. package/src/components/Spinner/Spinner.test.tsx +0 -199
  162. package/src/components/Spinner/Spinner.tsx +0 -158
  163. package/src/components/Spinner/spinner.types.ts +0 -113
  164. package/src/components/Spinner/spinner.variants.ts +0 -83
  165. package/src/components/Stack/Stack.test.tsx +0 -309
  166. package/src/components/Stack/Stack.tsx +0 -115
  167. package/src/components/Stack/stack.types.ts +0 -68
  168. package/src/components/Stack/stack.variants.ts +0 -80
  169. package/src/components/Switch/Switch.test.tsx +0 -131
  170. package/src/components/Switch/Switch.tsx +0 -158
  171. package/src/components/Switch/switch.types.ts +0 -36
  172. package/src/components/Switch/switch.variants.ts +0 -70
  173. package/src/components/Table/Table.perf.test.tsx +0 -81
  174. package/src/components/Table/Table.test.tsx +0 -674
  175. package/src/components/Table/Table.tsx +0 -863
  176. package/src/components/Table/cells/RenderButton.tsx +0 -23
  177. package/src/components/Table/cells/RenderChip.tsx +0 -37
  178. package/src/components/Table/cells/RenderText.tsx +0 -37
  179. package/src/components/Table/cells/RenderTwoLine.tsx +0 -34
  180. package/src/components/Table/cells/RowActionsMenu.tsx +0 -147
  181. package/src/components/Table/cells/cells.test.tsx +0 -247
  182. package/src/components/Table/cells/index.ts +0 -14
  183. package/src/components/Table/table.types.ts +0 -438
  184. package/src/components/Table/table.variants.ts +0 -207
  185. package/src/components/Tabs/Tabs.test.tsx +0 -145
  186. package/src/components/Tabs/Tabs.tsx +0 -77
  187. package/src/components/Tabs/tabs.types.ts +0 -55
  188. package/src/components/Tabs/tabs.variants.ts +0 -69
  189. package/src/components/Tabs/useTabs.ts +0 -167
  190. package/src/components/TextField/TextField.test.tsx +0 -198
  191. package/src/components/TextField/TextField.tsx +0 -245
  192. package/src/components/TextField/textField.types.ts +0 -90
  193. package/src/components/TextField/textField.variants.ts +0 -105
  194. package/src/components/Textarea/Textarea.test.tsx +0 -75
  195. package/src/components/Textarea/Textarea.tsx +0 -190
  196. package/src/components/Textarea/textarea.types.ts +0 -60
  197. package/src/components/Textarea/textarea.variants.ts +0 -85
  198. package/src/components/TimePicker/TimePicker.test.tsx +0 -65
  199. package/src/components/TimePicker/TimePicker.tsx +0 -274
  200. package/src/components/TimePicker/timePicker.types.ts +0 -69
  201. package/src/components/TimePicker/timePicker.variants.ts +0 -53
  202. package/src/components/Tooltip/Tooltip.test.tsx +0 -73
  203. package/src/components/Tooltip/Tooltip.tsx +0 -70
  204. package/src/components/Tooltip/tooltip.types.ts +0 -44
  205. package/src/components/Tooltip/tooltip.variants.ts +0 -28
  206. package/src/components/TopBar/TopBar.test.tsx +0 -129
  207. package/src/components/TopBar/TopBar.tsx +0 -66
  208. package/src/components/TopBar/topBar.types.ts +0 -42
  209. package/src/components/TopBar/topBar.variants.ts +0 -38
  210. package/src/components/Typography/Typography.test.tsx +0 -247
  211. package/src/components/Typography/Typography.tsx +0 -112
  212. package/src/components/Typography/typography.types.ts +0 -65
  213. package/src/components/Typography/typography.variants.ts +0 -130
  214. package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +0 -86
  215. package/src/components/VisuallyHidden/VisuallyHidden.tsx +0 -59
  216. package/src/components/VisuallyHidden/visuallyHidden.types.ts +0 -45
  217. package/src/components/_shared/data/getNestedValue.test.ts +0 -50
  218. package/src/components/_shared/data/getNestedValue.ts +0 -32
  219. package/src/components/_shared/data/useColumnAutoDetect.test.ts +0 -123
  220. package/src/components/_shared/data/useColumnAutoDetect.ts +0 -100
  221. package/src/components/_shared/data/useControllableState.ts +0 -48
  222. package/src/components/_shared/data/useDebouncedValue.ts +0 -24
  223. package/src/components/_shared/data/useTableFilter.test.ts +0 -166
  224. package/src/components/_shared/data/useTableFilter.ts +0 -118
  225. package/src/components/_shared/data/useTableSearch.test.ts +0 -115
  226. package/src/components/_shared/data/useTableSearch.ts +0 -66
  227. package/src/components/_shared/data/useTableSelection.test.ts +0 -100
  228. package/src/components/_shared/data/useTableSelection.ts +0 -100
  229. package/src/components/_shared/data/useTableSort.test.ts +0 -150
  230. package/src/components/_shared/data/useTableSort.ts +0 -141
  231. package/src/components/_shared/data/useVirtualizer.test.ts +0 -158
  232. package/src/components/_shared/data/useVirtualizer.ts +0 -199
  233. package/src/components/_shared/resolveValidationState.ts +0 -60
  234. package/src/components/_shared/severity/index.ts +0 -33
  235. package/src/components/_shared/severity/severity.types.ts +0 -50
  236. package/src/components/_shared/severity/severityIcons.tsx +0 -104
  237. package/src/components/_shared/severity/severityVariants.test.ts +0 -136
  238. package/src/components/_shared/severity/severityVariants.ts +0 -115
  239. package/src/components/_shared/themeIdentity.test.ts +0 -113
  240. package/src/hooks/useAccessState.spec.tsx +0 -161
  241. package/src/hooks/useAccessState.ts +0 -81
  242. package/src/index.ts +0 -550
  243. package/src/utils/cn.spec.ts +0 -16
  244. package/src/utils/cn.ts +0 -29
  245. package/test-output/vitest/coverage/base.css +0 -224
  246. package/test-output/vitest/coverage/block-navigation.js +0 -87
  247. package/test-output/vitest/coverage/clover.xml +0 -2418
  248. package/test-output/vitest/coverage/coverage-final.json +0 -89
  249. package/test-output/vitest/coverage/favicon.png +0 -0
  250. package/test-output/vitest/coverage/index.html +0 -746
  251. package/test-output/vitest/coverage/prettify.css +0 -1
  252. package/test-output/vitest/coverage/prettify.js +0 -2
  253. package/test-output/vitest/coverage/sort-arrow-sprite.png +0 -0
  254. package/test-output/vitest/coverage/sorter.js +0 -210
  255. package/test-output/vitest/coverage/src/components/Accordion/Accordion.tsx.html +0 -376
  256. package/test-output/vitest/coverage/src/components/Accordion/accordion.variants.ts.html +0 -181
  257. package/test-output/vitest/coverage/src/components/Accordion/index.html +0 -131
  258. package/test-output/vitest/coverage/src/components/AppShell/AppShell.tsx.html +0 -802
  259. package/test-output/vitest/coverage/src/components/AppShell/appShell.variants.ts.html +0 -247
  260. package/test-output/vitest/coverage/src/components/AppShell/index.html +0 -131
  261. package/test-output/vitest/coverage/src/components/AspectRatio/AspectRatio.tsx.html +0 -304
  262. package/test-output/vitest/coverage/src/components/AspectRatio/index.html +0 -116
  263. package/test-output/vitest/coverage/src/components/Autocomplete/Autocomplete.tsx.html +0 -3292
  264. package/test-output/vitest/coverage/src/components/Autocomplete/autocomplete.variants.ts.html +0 -508
  265. package/test-output/vitest/coverage/src/components/Autocomplete/index.html +0 -131
  266. package/test-output/vitest/coverage/src/components/Box/Box.tsx.html +0 -334
  267. package/test-output/vitest/coverage/src/components/Box/box.variants.ts.html +0 -775
  268. package/test-output/vitest/coverage/src/components/Box/index.html +0 -131
  269. package/test-output/vitest/coverage/src/components/Breadcrumbs/Breadcrumbs.tsx.html +0 -694
  270. package/test-output/vitest/coverage/src/components/Breadcrumbs/breadcrumbs.variants.ts.html +0 -247
  271. package/test-output/vitest/coverage/src/components/Breadcrumbs/index.html +0 -131
  272. package/test-output/vitest/coverage/src/components/Button/Button.tsx.html +0 -535
  273. package/test-output/vitest/coverage/src/components/Button/button.variants.ts.html +0 -562
  274. package/test-output/vitest/coverage/src/components/Button/index.html +0 -131
  275. package/test-output/vitest/coverage/src/components/Checkbox/Checkbox.tsx.html +0 -943
  276. package/test-output/vitest/coverage/src/components/Checkbox/checkbox.variants.ts.html +0 -289
  277. package/test-output/vitest/coverage/src/components/Checkbox/index.html +0 -131
  278. package/test-output/vitest/coverage/src/components/ConfirmDialog/ConfirmDialog.tsx.html +0 -841
  279. package/test-output/vitest/coverage/src/components/ConfirmDialog/confirmDialog.variants.ts.html +0 -313
  280. package/test-output/vitest/coverage/src/components/ConfirmDialog/index.html +0 -131
  281. package/test-output/vitest/coverage/src/components/Container/Container.tsx.html +0 -307
  282. package/test-output/vitest/coverage/src/components/Container/container.variants.ts.html +0 -328
  283. package/test-output/vitest/coverage/src/components/Container/index.html +0 -131
  284. package/test-output/vitest/coverage/src/components/DataGrid/DataGrid.tsx.html +0 -3937
  285. package/test-output/vitest/coverage/src/components/DataGrid/dataGrid.variants.ts.html +0 -541
  286. package/test-output/vitest/coverage/src/components/DataGrid/filters/ColumnFilters.tsx.html +0 -1453
  287. package/test-output/vitest/coverage/src/components/DataGrid/filters/index.html +0 -116
  288. package/test-output/vitest/coverage/src/components/DataGrid/index.html +0 -131
  289. package/test-output/vitest/coverage/src/components/DataGrid/reorder/index.html +0 -116
  290. package/test-output/vitest/coverage/src/components/DataGrid/reorder/useColumnReorder.ts.html +0 -517
  291. package/test-output/vitest/coverage/src/components/DataGrid/resize/index.html +0 -116
  292. package/test-output/vitest/coverage/src/components/DataGrid/resize/useColumnResize.ts.html +0 -490
  293. package/test-output/vitest/coverage/src/components/DataGrid/visibility/ColumnVisibilityMenu.tsx.html +0 -592
  294. package/test-output/vitest/coverage/src/components/DataGrid/visibility/index.html +0 -116
  295. package/test-output/vitest/coverage/src/components/DateTimePicker/DateTimePicker.tsx.html +0 -1042
  296. package/test-output/vitest/coverage/src/components/DateTimePicker/dateTimePicker.variants.ts.html +0 -337
  297. package/test-output/vitest/coverage/src/components/DateTimePicker/index.html +0 -131
  298. package/test-output/vitest/coverage/src/components/Dialog/Dialog.tsx.html +0 -391
  299. package/test-output/vitest/coverage/src/components/Dialog/dialog.variants.ts.html +0 -283
  300. package/test-output/vitest/coverage/src/components/Dialog/index.html +0 -131
  301. package/test-output/vitest/coverage/src/components/Divider/Divider.tsx.html +0 -505
  302. package/test-output/vitest/coverage/src/components/Divider/divider.variants.ts.html +0 -433
  303. package/test-output/vitest/coverage/src/components/Divider/index.html +0 -131
  304. package/test-output/vitest/coverage/src/components/Grid/Grid.tsx.html +0 -529
  305. package/test-output/vitest/coverage/src/components/Grid/grid.variants.ts.html +0 -484
  306. package/test-output/vitest/coverage/src/components/Grid/index.html +0 -131
  307. package/test-output/vitest/coverage/src/components/LeftNav/LeftNav.tsx.html +0 -1075
  308. package/test-output/vitest/coverage/src/components/LeftNav/index.html +0 -131
  309. package/test-output/vitest/coverage/src/components/LeftNav/leftNav.variants.ts.html +0 -406
  310. package/test-output/vitest/coverage/src/components/NumberField/NumberField.tsx.html +0 -1048
  311. package/test-output/vitest/coverage/src/components/NumberField/index.html +0 -131
  312. package/test-output/vitest/coverage/src/components/NumberField/numberField.variants.ts.html +0 -367
  313. package/test-output/vitest/coverage/src/components/OTPField/OTPField.tsx.html +0 -835
  314. package/test-output/vitest/coverage/src/components/OTPField/index.html +0 -131
  315. package/test-output/vitest/coverage/src/components/OTPField/otpField.variants.ts.html +0 -301
  316. package/test-output/vitest/coverage/src/components/Pagination/Pagination.tsx.html +0 -916
  317. package/test-output/vitest/coverage/src/components/Pagination/index.html +0 -146
  318. package/test-output/vitest/coverage/src/components/Pagination/pagination.helpers.ts.html +0 -391
  319. package/test-output/vitest/coverage/src/components/Pagination/pagination.variants.ts.html +0 -436
  320. package/test-output/vitest/coverage/src/components/Popover/Popover.tsx.html +0 -250
  321. package/test-output/vitest/coverage/src/components/Popover/index.html +0 -131
  322. package/test-output/vitest/coverage/src/components/Popover/popover.variants.ts.html +0 -157
  323. package/test-output/vitest/coverage/src/components/RadioGroup/RadioGroup.tsx.html +0 -934
  324. package/test-output/vitest/coverage/src/components/RadioGroup/index.html +0 -131
  325. package/test-output/vitest/coverage/src/components/RadioGroup/radioGroup.variants.ts.html +0 -346
  326. package/test-output/vitest/coverage/src/components/Skeleton/Skeleton.tsx.html +0 -232
  327. package/test-output/vitest/coverage/src/components/Skeleton/index.html +0 -131
  328. package/test-output/vitest/coverage/src/components/Skeleton/skeleton.variants.ts.html +0 -346
  329. package/test-output/vitest/coverage/src/components/Snackbar/Snackbar.tsx.html +0 -979
  330. package/test-output/vitest/coverage/src/components/Snackbar/index.html +0 -131
  331. package/test-output/vitest/coverage/src/components/Snackbar/snackbar.variants.ts.html +0 -307
  332. package/test-output/vitest/coverage/src/components/Stack/Stack.tsx.html +0 -430
  333. package/test-output/vitest/coverage/src/components/Stack/index.html +0 -131
  334. package/test-output/vitest/coverage/src/components/Stack/stack.variants.ts.html +0 -325
  335. package/test-output/vitest/coverage/src/components/Switch/Switch.tsx.html +0 -559
  336. package/test-output/vitest/coverage/src/components/Switch/index.html +0 -131
  337. package/test-output/vitest/coverage/src/components/Switch/switch.variants.ts.html +0 -295
  338. package/test-output/vitest/coverage/src/components/Table/Table.tsx.html +0 -2677
  339. package/test-output/vitest/coverage/src/components/Table/cells/RenderButton.tsx.html +0 -154
  340. package/test-output/vitest/coverage/src/components/Table/cells/RenderChip.tsx.html +0 -385
  341. package/test-output/vitest/coverage/src/components/Table/cells/RenderText.tsx.html +0 -196
  342. package/test-output/vitest/coverage/src/components/Table/cells/RenderTwoLine.tsx.html +0 -187
  343. package/test-output/vitest/coverage/src/components/Table/cells/RowActionsMenu.tsx.html +0 -526
  344. package/test-output/vitest/coverage/src/components/Table/cells/index.html +0 -191
  345. package/test-output/vitest/coverage/src/components/Table/cells/index.ts.html +0 -127
  346. package/test-output/vitest/coverage/src/components/Table/index.html +0 -131
  347. package/test-output/vitest/coverage/src/components/Table/table.variants.ts.html +0 -706
  348. package/test-output/vitest/coverage/src/components/Tabs/Tabs.tsx.html +0 -283
  349. package/test-output/vitest/coverage/src/components/Tabs/index.html +0 -131
  350. package/test-output/vitest/coverage/src/components/Tabs/tabs.variants.ts.html +0 -292
  351. package/test-output/vitest/coverage/src/components/TextField/TextField.tsx.html +0 -820
  352. package/test-output/vitest/coverage/src/components/TextField/index.html +0 -131
  353. package/test-output/vitest/coverage/src/components/TextField/textField.variants.ts.html +0 -400
  354. package/test-output/vitest/coverage/src/components/Textarea/Textarea.tsx.html +0 -655
  355. package/test-output/vitest/coverage/src/components/Textarea/index.html +0 -131
  356. package/test-output/vitest/coverage/src/components/Textarea/textarea.variants.ts.html +0 -340
  357. package/test-output/vitest/coverage/src/components/Tooltip/Tooltip.tsx.html +0 -295
  358. package/test-output/vitest/coverage/src/components/Tooltip/index.html +0 -131
  359. package/test-output/vitest/coverage/src/components/Tooltip/tooltip.variants.ts.html +0 -169
  360. package/test-output/vitest/coverage/src/components/TopBar/TopBar.tsx.html +0 -283
  361. package/test-output/vitest/coverage/src/components/TopBar/index.html +0 -131
  362. package/test-output/vitest/coverage/src/components/TopBar/topBar.variants.ts.html +0 -199
  363. package/test-output/vitest/coverage/src/components/Typography/Typography.tsx.html +0 -421
  364. package/test-output/vitest/coverage/src/components/Typography/index.html +0 -131
  365. package/test-output/vitest/coverage/src/components/Typography/typography.variants.ts.html +0 -436
  366. package/test-output/vitest/coverage/src/components/VisuallyHidden/VisuallyHidden.tsx.html +0 -262
  367. package/test-output/vitest/coverage/src/components/VisuallyHidden/index.html +0 -116
  368. package/test-output/vitest/coverage/src/components/_shared/data/getNestedValue.ts.html +0 -181
  369. package/test-output/vitest/coverage/src/components/_shared/data/index.html +0 -236
  370. package/test-output/vitest/coverage/src/components/_shared/data/useColumnAutoDetect.ts.html +0 -385
  371. package/test-output/vitest/coverage/src/components/_shared/data/useControllableState.ts.html +0 -229
  372. package/test-output/vitest/coverage/src/components/_shared/data/useDebouncedValue.ts.html +0 -157
  373. package/test-output/vitest/coverage/src/components/_shared/data/useTableFilter.ts.html +0 -439
  374. package/test-output/vitest/coverage/src/components/_shared/data/useTableSearch.ts.html +0 -283
  375. package/test-output/vitest/coverage/src/components/_shared/data/useTableSelection.ts.html +0 -385
  376. package/test-output/vitest/coverage/src/components/_shared/data/useTableSort.ts.html +0 -508
  377. package/test-output/vitest/coverage/src/components/_shared/data/useVirtualizer.ts.html +0 -682
  378. package/test-output/vitest/coverage/src/components/_shared/index.html +0 -116
  379. package/test-output/vitest/coverage/src/components/_shared/resolveValidationState.ts.html +0 -265
  380. package/test-output/vitest/coverage/src/hooks/index.html +0 -116
  381. package/test-output/vitest/coverage/src/hooks/useAccessState.ts.html +0 -328
  382. package/test-output/vitest/coverage/src/index.html +0 -116
  383. package/test-output/vitest/coverage/src/index.ts.html +0 -1153
  384. package/test-output/vitest/coverage/src/utils/cn.ts.html +0 -172
  385. package/test-output/vitest/coverage/src/utils/index.html +0 -116
  386. package/tsconfig.json +0 -13
  387. package/tsconfig.lib.json +0 -58
  388. package/tsconfig.spec.json +0 -34
  389. package/vite.config.ts +0 -33
  390. package/vitest.config.mts +0 -29
package/PERFORMANCE.md DELETED
@@ -1,227 +0,0 @@
1
- # `@dashforge/tw` performance baseline
2
-
3
- > Establishes the performance commitment for `@dashforge/tw`. Every
4
- > subsequent release should hold these numbers or justify any
5
- > regression in `CHANGELOG.md`.
6
-
7
- ## Bundle size
8
-
9
- ### Full library (`dist/index.esm.js`)
10
-
11
- Measured immediately after `nx build @dashforge/tw` on the
12
- `0.4.0-beta` source tree.
13
-
14
- | Metric | Value |
15
- |---|---|
16
- | Raw size | **312 KB** (319,924 bytes) |
17
- | Gzipped | **68.85 KB** (70,499 bytes) |
18
- | Brotli (estimate) | ~58 KB |
19
-
20
- ### Historical bundle trajectory
21
-
22
- | Version | Raw | Gzipped | Components | Delta vs prev |
23
- |---|---|---|---|---|
24
- | `0.1.0-beta` | 255 KB | ~57 KB | 16 (tier-1/2/3) | baseline |
25
- | `0.2.0-beta` | 272 KB | ~60 KB | 24 (+8 foundation) | +17 KB raw |
26
- | `0.3.0-beta` | 272 KB | ~60 KB | 24 | 0 (no new components) |
27
- | `0.4.0-beta` | **312 KB** | **68.85 KB** | 29 (+5 tier-4) | **+40 KB raw / +8.85 KB gz** |
28
-
29
- The `0.4.0-beta` delta is the cost of 5 new Tier-4 components +
30
- their 5 Radix UI primitive dependencies (`@radix-ui/react-dialog`,
31
- `-tabs`, `-tooltip`, `-popover`, `-accordion`). The Radix runtime
32
- sub-dependencies (`@radix-ui/react-portal`, `-presence`,
33
- `-dismissable-layer`, etc.) are shared across primitives so the
34
- marginal cost of each new primitive after the first is smaller.
35
-
36
- ### Tree-shaken size — per-component source weight
37
-
38
- Tree-shaken bundle size depends on the consumer's bundler (Vite,
39
- webpack, esbuild, Rollup). The TS source size below is a **proxy**
40
- for the contribution each component makes — not the precise
41
- tree-shaken cost, which includes the Radix runtime and shared
42
- helpers (`cn()`, `tailwind-variants`).
43
-
44
- | Component | Source bytes | Tier |
45
- |---|---:|---|
46
- | Autocomplete | 49,020 | Tier-3 (heaviest — multi-select + free-solo + async) |
47
- | LeftNav | 18,002 | F6 (navigation) |
48
- | RadioGroup | 16,946 | Tier-2 |
49
- | NumberField | 16,289 | Tier-2 |
50
- | DateTimePicker | 16,075 | Tier-3 |
51
- | Checkbox | 15,732 | Tier-1 |
52
- | Grid | 15,086 | F10 (foundation) |
53
- | TextField | 14,772 | Tier-1 |
54
- | Snackbar | 14,770 | F7 |
55
- | Box | 14,039 | F9 (foundation) |
56
- | ConfirmDialog | 13,361 | F7 |
57
- | AppShell | 12,734 | F6 |
58
- | Button | 12,628 | Tier-1 |
59
- | OTPField | 12,497 | Tier-2 |
60
- | Breadcrumbs | 11,694 | F6 |
61
- | Typography | 11,619 | F9 |
62
- | Divider | 11,026 | F10 |
63
- | Textarea | 10,310 | Tier-2 |
64
- | Stack | 9,131 | F9 |
65
- | Switch | 8,711 | Tier-1 |
66
- | **Dialog** | **7,421** | **Tier-4 (new)** |
67
- | Container | 6,754 | F10 |
68
- | **Accordion** | **6,150** | **Tier-4 (new)** |
69
- | **Tabs** | **5,303** | **Tier-4 (new)** |
70
- | AspectRatio | 4,871 | F10 |
71
- | TopBar | 4,723 | F6 |
72
- | **Tooltip** | **4,389** | **Tier-4 (new)** |
73
- | **Popover** | **3,747** | **Tier-4 (new)** |
74
- | VisuallyHidden | 3,744 | F10 |
75
-
76
- The 5 new Tier-4 components contribute **~27 KB of source** combined
77
- — roughly aligned with the +40 KB raw bundle delta (the extra
78
- ~13 KB is Radix runtime).
79
-
80
- ### Representative bundle subsets
81
-
82
- If a consumer imports only a subset, expected gzipped cost
83
- (estimated, depends on bundler):
84
-
85
- | Subset | Components | Estimated gzipped |
86
- |---|---|---|
87
- | Atomic (Button only) | 1 | ~6 KB |
88
- | Form bundle | TextField + Checkbox + Switch + RadioGroup + NumberField + Textarea + OTPField | ~28 KB |
89
- | Layout bundle | Box + Stack + Grid + Container + AppShell + LeftNav + TopBar + Breadcrumbs | ~24 KB |
90
- | Foundation (F9 + F10) | Typography + Box + Stack + Grid + Container + Divider + AspectRatio + VisuallyHidden | ~18 KB |
91
- | Tier-4 overlay primitives | Dialog + Tabs + Tooltip + Popover + Accordion | ~12 KB |
92
- | Full library | 29 | **68.85 KB** |
93
-
94
- Estimates are upper bounds — actual tree-shaking can do better if
95
- the consumer doesn't trigger code paths (e.g. importing
96
- `<Autocomplete>` without using `loadOptions` won't strip the async
97
- loader code from the bundle, but other unused components are
98
- fully eliminable).
99
-
100
- ## Render performance
101
-
102
- ### Sprint 2 baseline (in `dash` consumer, React Profiler)
103
-
104
- Measured in
105
- `~/projects/web/learn/dash/src/pages/TestFoundation.tsx` — page
106
- mounts all 8 Foundation primitives × ~6 instances each (50+
107
- primitives total) inside `<DashforgeTailwindProvider>` wrapped in
108
- `<React.Profiler>`:
109
-
110
- | Operation | Time | Notes |
111
- |---|---|---|
112
- | First mount | **12.1 ms** | Cold cache, no styles compiled yet |
113
- | Re-render (no state change) | **7.0 ms** | After style cache warm |
114
- | Re-render (state change) | **8.6 ms** | One field updated, sibling fields untouched |
115
-
116
- Within the **60 fps budget** (16.67 ms per frame) for the full page
117
- mount + every subsequent interaction. The primitives are pure (no
118
- internal `useState`, no `useEffect`, only className resolution via
119
- `tv()` + `cn()`), so React's reconciler trivially handles re-renders
120
- without `React.memo`.
121
-
122
- ### Tier-4 components — expected render cost
123
-
124
- Tier-4 components (Dialog, Tabs, Tooltip, Popover, Accordion) carry
125
- internal Radix state machines. Render cost is dominated by Radix's
126
- own reconciliation, which is well-optimized. Expected ranges:
127
-
128
- | Component | Expected mount | Notes |
129
- |---|---|---|
130
- | Tooltip | <1 ms | Renders nothing until hover; portal mount on open is ~2 ms |
131
- | Popover | <1 ms | Same as Tooltip |
132
- | Tabs | ~2 ms | Static — all triggers + active panel mount once |
133
- | Accordion | ~3 ms | Per-item triggers + lazy panel mount |
134
- | Dialog | ~3 ms | Portal + focus trap setup on open |
135
-
136
- These are estimates based on Radix's published benchmarks. Real
137
- consumer-app numbers will be captured in Sprint 3 follow-up
138
- end-to-end validation pass (`/test-tier-4` page in `dash`).
139
-
140
- ## Regression budget policy
141
-
142
- **Every PR that touches a component or adds a new export MUST**:
143
-
144
- 1. Re-run `nx build @dashforge/tw` and check the new
145
- `dist/index.esm.js` size (raw + gzipped).
146
- 2. If the gzipped delta is **> +5%** vs the previous release,
147
- include in the PR description:
148
- - The bytes added (raw + gzipped)
149
- - The reason (new component / new feature / new dep / refactor)
150
- - A justification for why the cost is worth it
151
- 3. If the gzipped delta is **> +10%**, the PR also requires a
152
- reviewer's sign-off on the bundle impact explicitly (not a
153
- silent pass).
154
-
155
- The 5% threshold at the current 68.85 KB baseline = 3.4 KB. That's
156
- enough headroom for a typical component-level change (e.g. adding a
157
- single Radix primitive's worth of code) without the policy
158
- triggering, but small enough that a careless dep addition gets
159
- flagged.
160
-
161
- ## Render perf test suite (Sprint 6 P3)
162
-
163
- CI-enforced render budgets, co-located as `*.perf.test.tsx`. Bounds
164
- are deliberately generous — they catch **order-of-magnitude**
165
- regressions (an accidental O(n²) in the pipeline, or a virtualization
166
- break that mounts the full dataset), not micro-jitter.
167
-
168
- ### `<Table>` — non-virtualized (`Table.perf.test.tsx`)
169
-
170
- | Scenario | Budget | Asserts |
171
- |---|---|---|
172
- | Mount 500 rows (Table's row-count ceiling) | < 800 ms | render path stays linear |
173
- | 500 rows in DOM | exactly 500 `<tbody tr>` | non-virtualized contract |
174
- | Default sort over 500 rows | < 800 ms | sort pipeline is not O(n²) |
175
-
176
- ### `<DataGrid>` — virtualized (`DataGrid.perf.test.tsx`)
177
-
178
- | Scenario | Budget | Asserts |
179
- |---|---|---|
180
- | Mount 10 000 rows | < 500 ms | render is O(window) |
181
- | 10 000-row DOM node count | < 100 `<tbody tr>` | only the window is mounted |
182
- | Mount 100 000 rows | < 800 ms | cost does NOT scale with the dataset |
183
-
184
- The 100 000-row test is the load-bearing one: if a regression makes
185
- `renderedRows` slice the full array, the DOM-node-count assertion
186
- fails immediately (100k `<tr>` ≫ 100).
187
-
188
- ## Strict gate assessment (Sprint 6 P3)
189
-
190
- A probe enabled `exactOptionalPropertyTypes` + `noUncheckedIndexedAccess`
191
- + `noUnusedParameters` on `@dashforge/tw`. Result: **42 errors, zero
192
- real bugs.** Every hit was either pedantic (`exactOptionalPropertyTypes`
193
- flagging `fn | undefined` passed to an optional prop) or invariant-safe
194
- but unprovable (`noUncheckedIndexedAccess` flagging array accesses
195
- already guarded by a `.length` check — AppShell focus trap, RadioGroup
196
- option access, Autocomplete highlight index).
197
-
198
- **Decision**: enabling those flags is a workspace-wide change (the
199
- `@dashforge/source` path mapping pulls the bridge layer's source into
200
- the same program) for near-zero bug-catching value. Deferred to the
201
- `1.0.0-rc` hardening sprint. The codebase is already solid under the
202
- current `strict: true` baseline + `noImplicitOverride` /
203
- `noImplicitReturns` / `noUnusedLocals` / `noFallthroughCasesInSwitch`.
204
- ESLint is on `typescript-eslint recommended` + `react-hooks
205
- recommended` + Nx boundary/dependency checks; promotion to
206
- `strict-type-checked` (type-aware `no-unsafe-*` / `no-floating-promises`)
207
- is the same workspace-wide 1.0-rc item.
208
-
209
- ## Console hygiene (Sprint 6 P3)
210
-
211
- The full test run is audited for stray `console.error` / `console.warn`.
212
- Sprint 6 P3 fixed the one finding: Radix logged 8× *"Missing
213
- `Description` or `aria-describedby` for DialogContent"* — `<Dialog>`
214
- now passes `aria-describedby={undefined}` on the content when no
215
- `description` is supplied (Radix's documented opt-out). Console is
216
- clean apart from a single jsdom-only *"Not implemented: navigation"*
217
- (an environment limitation, not a component defect).
218
-
219
- ## Reference
220
-
221
- - **Build command**: `nx build @dashforge/tw`
222
- - **Measurement script**: `gzip -c dist/index.esm.js | wc -c`
223
- - **Render perf setup**: see Sprint 2 P1
224
- (`/test-foundation` route in `dash` consumer)
225
- - **Render perf suite**: `*.perf.test.tsx` (Sprint 6 P3 — Table + DataGrid)
226
- - **CHANGELOG entries**: every release records the bundle delta
227
- in the `Compatibility` section
@@ -1,50 +0,0 @@
1
- # REFINEMENT-NOTES — `@dashforge/tw` Table + DataGrid
2
-
3
- > Sprint 6 P2 deliverable (2026-05-20). Blind technical review of
4
- > `<Table>` + `<DataGrid>` — what was fixed, and what was explicitly
5
- > deferred.
6
-
7
- ## Fixed in Sprint 6 P2
8
-
9
- | ID | Area | Fix |
10
- |----|------|-----|
11
- | D1 | DataGrid a11y | `aria-rowcount` on the `<table>` (true dataset size, not the virtualized window) + `aria-rowindex` on the header row (1) and every data row (`absoluteIndex + 2`). A screen reader now announces the real position. |
12
- | D3 | DataGrid a11y | Column resize is now keyboard-operable: the resize handle is `tabIndex=0`, `ArrowLeft`/`ArrowRight` nudge the width 16px (64px with Shift), `aria-valuemin/max/now` announce the bounds. New `nudge()` on `useColumnResize`. |
13
- | D6 | DataGrid bug | The resize handle on a reorderable column could also start a column-reorder drag (the `<th>` is `draggable`). Handle now sets `draggable={false}` — grabbing it always resizes. |
14
- | D2 | DataGrid touch | Column reorder rides native HTML5 drag-and-drop, whose events don't fire on touch. The grid now detects a coarse pointer (`matchMedia('(pointer: coarse)')`) and disables the `draggable` affordance there, so it isn't a dead interaction. (Full touch reorder — see Deferred below.) |
15
- | D4 | DataGrid UX | `Enter` in any filter Popover input now applies the filter (was: must click "Apply"). |
16
- | D7 | Table + DataGrid UX | Empty state distinguishes a genuinely empty dataset (`noData`) from one emptied by an active search / filter (`noResults`). New `TableLabels.noResults`. |
17
- | D8 | Table | Verified non-issue — Table is auto-height by design; skeleton rows inherit cell density padding. Added a clarifying code comment. |
18
- | M4 | Cell library | Cleaned up a self-contradictory comment in `RenderChip` (the `solid neutral` variant). |
19
- | T1 | Table | `getRowId` stays optional (back-compat) but now emits a dev-only `console.warn` when omitted while sort / search / selection / expandable is active — the positional-index fallback breaks row identity on reorder. Expanded the prop JSDoc. |
20
-
21
- ## Deferred — tracked follow-ups
22
-
23
- ### T3 — Per-column filter UI on `<Table>`
24
- `<DataGrid>` got the in-header filter Popover in 0.8.0-beta (`filterable: true`).
25
- `<Table>` still only accepts a controlled `filterModel` with no UI to
26
- produce it. Porting `ColumnFilterTrigger` + the filter pipeline to
27
- Table is a feature, not a refinement — it belongs in a dedicated
28
- feature sprint (or post-1.0). Until then, Table's `filterModel` is
29
- consumer-driven only.
30
-
31
- ### C2 — Cell renderer library additions
32
- The library ships `RenderText`, `RenderTwoLine`, `RenderChip`,
33
- `RenderButton`, `RowActionsMenu`. Common table-cell patterns still
34
- missing:
35
- - `RenderDate` — locale-aware date formatting (`Intl.DateTimeFormat`,
36
- zero-dep)
37
- - `RenderAvatar` — avatar image / initials + label, the canonical
38
- "user" cell
39
- - `RenderLink` — a styled anchor honoring the theme
40
-
41
- Purely additive — slated for a feature sprint, not refinement.
42
-
43
- ### D2-full — Pointer-events column reorder (touch support)
44
- The D2 fix above is *graceful degradation* — reorder is cleanly
45
- unavailable on touch rather than silently broken. A proper touch
46
- implementation means replacing `useColumnReorder`'s HTML5
47
- drag-and-drop with pointer events (à la `useColumnResize`): track
48
- `pointerdown` → `pointermove` with hit-testing (`elementFromPoint`)
49
- for the drop target → `pointerup` to commit. Meaningful rewrite —
50
- deferred to a follow-up so P2 stays a refinement pass.
package/THEME-AUDIT.md DELETED
@@ -1,174 +0,0 @@
1
- # THEME-AUDIT — @dashforge/tw catalog identity sweep
2
-
3
- > Audit of every `@dashforge/tw` component against the **default
4
- > `dashforgePreset()` identity rule**.
5
- >
6
- > **Rule recap.** The `dashforgePreset()` CSS-variable swap
7
- > auto-inverts the neutral palette:
8
- > `bg-neutral-50` / `text-neutral-900` etc. resolve to the
9
- > appropriate physical color via `--df-tw-color-neutral-N`. Adding a
10
- > `dark:` variant on a neutral class **double-inverts** the value
11
- > and breaks dark mode. The Table fix established the
12
- > canonical patterns; Sprint 4.3 applies them to the whole catalog.
13
-
14
- ## Scoring legend
15
-
16
- - **A** — Pure double inversion. REMOVE `dark:` variant entirely.
17
- - **B** — `bg-white` / `text-white` paired with a wrong `dark:`
18
- target. KEEP the `dark:` variant (white doesn't auto-invert) but
19
- FIX the target — `dark:bg-neutral-900` in dark mode resolves to
20
- near-white (broken); use `dark:bg-neutral-100` for proper dark
21
- elevated surface.
22
- - **C** — Intentional `dark:` on color palette (`primary`,
23
- `success`, `warning`, `danger`, `info`, `secondary`). KEEP — color
24
- palettes don't auto-invert; explicit `dark:` is a design choice.
25
- - **D** — Component-specific exception (e.g. Tooltip wants
26
- high-contrast inversion against the page). Document why kept.
27
-
28
- ## Per-file findings
29
-
30
- ### Accordion (`accordion.variants.ts`)
31
-
32
- | Line | Class | Category | Fix |
33
- |---|---|---|---|
34
- | 6 | `border-b border-neutral-200 dark:border-neutral-800` | A | `border-b border-neutral-200` |
35
- | 10 | `text-sm font-medium text-neutral-900 dark:text-neutral-50` | A | `text-sm font-medium text-neutral-900` |
36
- | 18 | `overflow-hidden text-sm text-neutral-700 dark:text-neutral-300` | A | drop `dark:text-neutral-300` |
37
-
38
- ### Box (`box.variants.ts`)
39
-
40
- | Line | Class | Category | Fix |
41
- |---|---|---|---|
42
- | 58 | `bg-white dark:bg-neutral-900` (elevated) | B | `bg-white dark:bg-neutral-100` (dark-mode elevation tier above page surface) |
43
- | 168 | `border-neutral-200 bg-white dark:border-neutral-700 dark:bg-neutral-900` (outlined) | A + B | `border-neutral-200 bg-white dark:bg-neutral-100` (border auto-inverts; bg keeps `bg-white` + corrected dark target) |
44
- | 184 | `bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100` (soft) | A | `bg-neutral-100 text-neutral-900` |
45
- | 200 | `bg-neutral-900 text-white dark:bg-neutral-100 dark:text-neutral-900` (solid neutral) | D | `bg-neutral-900 text-neutral-50` (auto-invert — solid neutral becomes inverted accent: dark surface in light mode, light surface in dark mode; consistent with identity rule) |
46
-
47
- ### Dialog (`dialog.variants.ts`)
48
-
49
- | Line | Class | Category | Fix |
50
- |---|---|---|---|
51
- | 29 | `w-full bg-white dark:bg-neutral-900 rounded-lg shadow-xl` | B | `dark:bg-neutral-100` |
52
- | 30 | `border border-neutral-200 dark:border-neutral-800` | A | drop `dark:` |
53
- | 37 | `text-lg ... text-neutral-900 dark:text-neutral-50` | A | drop `dark:` |
54
- | 38 | `text-sm text-neutral-600 dark:text-neutral-400` | A | drop `dark:` |
55
- | 42 | `dark:text-neutral-400 dark:hover:text-neutral-50` (close button) | A | drop both `dark:` |
56
- | 43 | `hover:bg-neutral-100 dark:hover:bg-neutral-800` | A | drop `dark:` |
57
-
58
- ### Divider (`divider.variants.ts` + `Divider.tsx`)
59
-
60
- | File / Line | Class | Category | Fix |
61
- |---|---|---|---|
62
- | `divider.variants.ts:88` | `border-neutral-200 dark:border-neutral-800` (neutral color variant) | A | drop `dark:` |
63
- | `Divider.tsx:131` | `text-sm text-neutral-500 dark:text-neutral-400` (label) | A | drop `dark:` |
64
-
65
- ### Pagination (`pagination.variants.ts` + `Pagination.tsx`)
66
-
67
- 10 violations — full sweep of borders / text / bg / hover / active-button.
68
-
69
- | Line | Class | Category | Fix |
70
- |---|---|---|---|
71
- | `variants:26` summary | `text-neutral-600 dark:text-neutral-400` | A | drop |
72
- | `variants:30, 44, 58` borders | `border border-neutral-300 dark:border-neutral-700` | A | drop |
73
- | `variants:31, 45, 59` button/selector/input bg | `bg-white dark:bg-neutral-900` | B → drop entirely | use `bg-neutral-50` (auto-inverts; border provides separation against page) |
74
- | `variants:32, 46, 55` button text | `text-neutral-700 dark:text-neutral-300` | A | drop |
75
- | `variants:33, 47` button hover bg | `hover:bg-neutral-50 dark:hover:bg-neutral-800` | A | `hover:bg-neutral-100` (1 elevation tier; auto-inverts) |
76
- | `variants:60` jumpInput text | `text-neutral-900 dark:text-neutral-50` | A | drop |
77
- | `Pagination.tsx:241` select bg+border | `border ... dark:border-neutral-700 bg-white dark:bg-neutral-900` | B → drop | `border border-neutral-300 bg-neutral-50` |
78
-
79
- ### Popover (`popover.variants.ts`)
80
-
81
- | Line | Class | Category | Fix |
82
- |---|---|---|---|
83
- | 6 | `border border-neutral-200 dark:border-neutral-800` | A | drop |
84
- | 7 | `bg-white dark:bg-neutral-900 p-4 shadow-lg` | B | `dark:bg-neutral-100` |
85
- | 8 | `text-sm text-neutral-900 dark:text-neutral-50` | A | drop |
86
- | 14 | `fill-white dark:fill-neutral-900` (arrow) | B | `fill-white dark:fill-neutral-100` (match content bg) |
87
-
88
- ### Skeleton (`skeleton.variants.ts`)
89
-
90
- | Line | Class | Category | Fix |
91
- |---|---|---|---|
92
- | 38 | `bg-neutral-200 dark:bg-neutral-800` | A | drop `dark:` (auto-inverts — skeleton placeholder slightly more visible than page surface in both modes) |
93
-
94
- ### Tabs (`tabs.variants.ts`)
95
-
96
- | Line | Class | Category | Fix |
97
- |---|---|---|---|
98
- | 22 | `border-b border-neutral-200 dark:border-neutral-800` (underline list) | A | drop |
99
- | 24 | `... text-neutral-600 dark:text-neutral-400` (underline trigger) | A | drop |
100
- | 25 | `hover:text-neutral-900 dark:hover:text-neutral-50` | A | drop |
101
- | 31 | `bg-neutral-100 dark:bg-neutral-800 p-1` (pill list) | A | drop |
102
- | 33 | `... text-neutral-600 dark:text-neutral-400` (pill trigger) | A | drop |
103
- | 34 | `hover:text-neutral-900 dark:hover:text-neutral-50` | A | drop |
104
- | 35 | `data-[state=active]:bg-white dark:data-[state=active]:bg-neutral-900` (pill active) | B | `dark:bg-neutral-100` |
105
- | 36 | `data-[state=active]:text-neutral-900 dark:data-[state=active]:text-neutral-50` | A | drop |
106
-
107
- ### Tooltip (`tooltip.variants.ts`)
108
-
109
- Tooltip historically used a "fixed dark surface in both modes" pattern.
110
- Per the identity rule, **auto-invert** is the right behavior: dark
111
- tooltip on light page (light mode), light tooltip on dark page (dark
112
- mode) — the inversion **is** the high-contrast effect.
113
-
114
- | Line | Class | Category | Fix |
115
- |---|---|---|---|
116
- | 8 | `bg-neutral-900 text-neutral-50` + `dark:bg-neutral-50 dark:text-neutral-900` | A | drop the `dark:` line entirely (the base classes already auto-invert and give the high-contrast effect against the page) |
117
- | 14 | `fill-neutral-900 dark:fill-neutral-50` (arrow) | A | drop `dark:` (arrow auto-inverts with content bg) |
118
-
119
- ### Typography (`typography.variants.ts`)
120
-
121
- | Line | Class | Category | Fix |
122
- |---|---|---|---|
123
- | 65 | `neutral: 'text-neutral-900 dark:text-neutral-100'` | A | `'text-neutral-900'` |
124
- | 66 | `muted: 'text-neutral-600 dark:text-neutral-400'` | A | `'text-neutral-600'` |
125
-
126
- ### Table-side (Sprint 4.1 — already fixed)
127
-
128
- Per-file already corrected in Sprint 4.1. Sprint 4.3 just verifies
129
- the regression guard (themeIdentity test) is promoted to global so
130
- the rest of the catalog is covered too.
131
-
132
- ## Summary
133
-
134
- | Component | Violations | Fix categories |
135
- |---|---|---|
136
- | Accordion | 3 | A × 3 |
137
- | Box | 4 | A + B + D |
138
- | Dialog | 6 | A × 5 + B × 1 |
139
- | Divider | 2 | A × 2 |
140
- | Pagination | 10 | A × 7 + B × 3 |
141
- | Popover | 4 | A × 3 + B × 1 |
142
- | Skeleton | 1 | A × 1 |
143
- | Tabs | 8 | A × 7 + B × 1 |
144
- | Tooltip | 2 | A × 2 (was "double-inverted to preserve fixed look" — auto-invert is now the canonical choice) |
145
- | Typography | 2 | A × 2 |
146
- | **Total** | **42** | **31 A + 5 B + 1 D + 5 fixed already** |
147
-
148
- ## Color palettes — NOT touched
149
-
150
- `dark:` variants on `primary`, `secondary`, `success`, `warning`,
151
- `danger`, `info` palettes are **intentional** — those palettes do
152
- not auto-invert (same physical color in both modes), so the
153
- `dark:` shift is a design choice for tone refinement. They stay.
154
-
155
- Affected sites (kept as-is):
156
-
157
- - `Box` compound variants (`outlined/soft/solid` × color) for the
158
- 6 color palettes (lines 188-198 in `box.variants.ts`)
159
- - `RenderChip` color rows (Sprint 4.1 decision)
160
- - `RowActionsMenu` `text-danger-700 dark:text-danger-300` and same
161
- for warning
162
-
163
- ## Sprint 4.3 deliverables
164
-
165
- 1. ✅ THEME-AUDIT.md (this file)
166
- 2. ⏳ Apply fixes per-file (P3)
167
- 3. ⏳ Promote `themeIdentity.test.ts` from `Table/_internal/` to
168
- package-level scanner walking `libs/dashforge/tw/src/components/**`
169
- (P2). Excludes `*.test.*` files. The test fails any future
170
- `dark:*-neutral-N` reintroduction.
171
- 4. ⏳ Visual regression catch in `dash` (manual check in both
172
- light + dark mode)
173
- 5. ⏳ Release `@dashforge/tw@0.7.0-beta` — expected bundle to
174
- **shrink** by 1-3 KB gz (removing redundant classes).
Binary file
package/eslint.config.mjs DELETED
@@ -1,62 +0,0 @@
1
- import baseConfig from '../../../eslint.config.mjs';
2
- import reactHooks from 'eslint-plugin-react-hooks';
3
-
4
- export default [
5
- ...baseConfig,
6
- // React Hooks plugin — every component in this package authors
7
- // hooks, so the rule set is required for `// eslint-disable-next-line
8
- // react-hooks/exhaustive-deps` directives to be valid AND to catch
9
- // real rules-of-hooks violations (hook called after early-return).
10
- // Scoped here (not at workspace root) to avoid surfacing pre-existing
11
- // unrelated bugs in sibling packages that fall outside this sprint's
12
- // scope — those should be cleaned up in a dedicated workspace pass.
13
- {
14
- files: ['**/*.{ts,tsx,js,jsx,cts,mts,cjs,mjs}'],
15
- plugins: { 'react-hooks': reactHooks },
16
- rules: {
17
- ...reactHooks.configs.recommended.rules,
18
- },
19
- },
20
- {
21
- files: ['**/*.json'],
22
- rules: {
23
- '@nx/dependency-checks': [
24
- 'error',
25
- {
26
- // Non-shipped files: their imports must NOT count toward the
27
- // published `dependencies` set. Spec/test files import the
28
- // test runner; the build/test config files import build
29
- // tooling — all of which belong in `devDependencies`.
30
- ignoredFiles: [
31
- '{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}',
32
- '{projectRoot}/rollup.config.{js,ts,mjs,mts,cjs,cts}',
33
- '{projectRoot}/vite.config.{js,ts,mjs,mts}',
34
- '{projectRoot}/vitest.config.{js,ts,mjs,mts}',
35
- '{projectRoot}/**/*.spec.{ts,tsx}',
36
- '{projectRoot}/**/*.test.{ts,tsx}',
37
- ],
38
- // tw-tokens (CSS vars + Tailwind preset) and tw-theme
39
- // (Provider that injects the runtime vars) are CONSUMER-FACING
40
- // peer dependencies: the runtime requires them, but @dashforge/tw
41
- // itself never imports them. Declaring them as peers documents
42
- // the requirement without triggering the "not used" check.
43
- // `tailwindcss` is the same case — a build-time peer (the
44
- // consumer's Tailwind compiles the class strings + reads the
45
- // `darkMode: 'selector'` config from `dashforgePreset()`); it
46
- // is never an `import` site in this package's code.
47
- ignoredDependencies: [
48
- '@dashforge/tw-tokens',
49
- '@dashforge/tw-theme',
50
- 'tailwindcss',
51
- ],
52
- },
53
- ],
54
- },
55
- languageOptions: {
56
- parser: await import('jsonc-eslint-parser'),
57
- },
58
- },
59
- {
60
- ignores: ['**/out-tsc'],
61
- },
62
- ];
package/project.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3
- "name": "@dashforge/tw",
4
- "targets": {
5
- "typecheck": {
6
- "options": {
7
- "command": "tsc --build tsconfig.lib.json --emitDeclarationOnly"
8
- }
9
- },
10
- "build": {
11
- "_comment": "typecheck excluded from dependsOn: TS bundler resolver fails when consuming `@dashforge/forms/dist/index.d.ts` (a 1-line `export * from \"./src/index\"` re-export) through nx's composite project chain. `nx run typecheck` separately works; `nx run-many -t test` works (it bundles types via vitest). Re-attach `typecheck` once the publishables' dist d.ts wrappers are switched to inline `export ...` (out of scope F3).",
12
- "dependsOn": ["^build"]
13
- }
14
- }
15
- }
package/rollup.config.cjs DELETED
@@ -1,16 +0,0 @@
1
- const { withNx } = require('@nx/rollup/with-nx');
2
-
3
- module.exports = withNx(
4
- {
5
- main: './src/index.ts',
6
- outputPath: './dist',
7
- tsConfig: './tsconfig.lib.json',
8
- compiler: 'swc',
9
- format: ['esm'],
10
- },
11
- {
12
- // Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
13
- // e.g.
14
- // output: { sourcemap: true },
15
- }
16
- );
@@ -1,95 +0,0 @@
1
- // @vitest-environment jsdom
2
- import * as React from 'react';
3
- import { describe, it, expect, afterEach } from 'vitest';
4
- import { render, screen, fireEvent, cleanup } from '@testing-library/react';
5
- import { Accordion } from './Accordion.js';
6
-
7
- void React;
8
- afterEach(() => cleanup());
9
-
10
- const items = [
11
- { value: 'one', header: 'Section one', content: <p>One body</p> },
12
- { value: 'two', header: 'Section two', content: <p>Two body</p> },
13
- { value: 'three', header: 'Section three', content: <p>Three body</p> },
14
- ];
15
-
16
- function regionIsOpen(bodyText: string): boolean {
17
- const node = screen.queryByText(bodyText);
18
- if (!node) return false;
19
- const region = node.closest('[role="region"]');
20
- if (!region) return false;
21
- // Radix sets `hidden` attr on closed regions in jsdom.
22
- return region.getAttribute('hidden') === null && !(region as HTMLElement).hidden;
23
- }
24
-
25
- describe('Accordion — single mode (default)', () => {
26
- it('renders all triggers', () => {
27
- render(<Accordion items={items} />);
28
- expect(screen.queryByText('Section one')).not.toBeNull();
29
- expect(screen.queryByText('Section two')).not.toBeNull();
30
- expect(screen.queryByText('Section three')).not.toBeNull();
31
- });
32
-
33
- it('opens a panel on trigger click', () => {
34
- render(<Accordion items={items} />);
35
- expect(regionIsOpen('Two body')).toBe(false);
36
- fireEvent.click(screen.getByText('Section two'));
37
- expect(regionIsOpen('Two body')).toBe(true);
38
- });
39
-
40
- it('closes the open panel when clicked again (collapsible default)', () => {
41
- render(<Accordion items={items} />);
42
- const trigger = screen.getByText('Section two');
43
- fireEvent.click(trigger);
44
- expect(regionIsOpen('Two body')).toBe(true);
45
- fireEvent.click(trigger);
46
- expect(regionIsOpen('Two body')).toBe(false);
47
- });
48
-
49
- it('respects defaultValue', () => {
50
- render(<Accordion items={items} defaultValue="three" />);
51
- expect(regionIsOpen('Three body')).toBe(true);
52
- });
53
-
54
- it('emits onValueChange', () => {
55
- let last: string | null = null;
56
- render(<Accordion items={items} onValueChange={(v) => (last = v)} />);
57
- fireEvent.click(screen.getByText('Section one'));
58
- expect(last).toBe('one');
59
- });
60
- });
61
-
62
- describe('Accordion — multiple mode', () => {
63
- it('allows multiple panels open simultaneously', () => {
64
- render(<Accordion type="multiple" items={items} defaultValue={['one', 'three']} />);
65
- expect(regionIsOpen('One body')).toBe(true);
66
- expect(regionIsOpen('Three body')).toBe(true);
67
- });
68
-
69
- it('emits onValueChange with the updated array', () => {
70
- let last: string[] = [];
71
- render(
72
- <Accordion
73
- type="multiple"
74
- items={items}
75
- defaultValue={['one']}
76
- onValueChange={(v) => (last = v)}
77
- />
78
- );
79
- fireEvent.click(screen.getByText('Section two'));
80
- expect(last).toEqual(expect.arrayContaining(['one', 'two']));
81
- });
82
- });
83
-
84
- describe('Accordion — disabled items', () => {
85
- it('does not open a disabled section', () => {
86
- const disabledItems = [
87
- ...items.slice(0, 2),
88
- { ...items[2]!, disabled: true },
89
- ];
90
- render(<Accordion items={disabledItems} />);
91
- const trigger = screen.getByText('Section three');
92
- fireEvent.click(trigger);
93
- expect(regionIsOpen('Three body')).toBe(false);
94
- });
95
- });