@neetechs/ui 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/CONTRIBUTING.md +60 -0
  3. package/LICENSE +21 -21
  4. package/README.md +861 -650
  5. package/dist/ai/ai-action-button/ai-action-button.css +271 -270
  6. package/dist/ai/ai-approval-card/ai-approval-card.css +323 -320
  7. package/dist/ai/ai-conversation-panel/ai-conversation-panel.css +447 -403
  8. package/dist/ai/ai-prompt-input/ai-prompt-input.css +380 -377
  9. package/dist/ai/ai-proposal-card/ai-proposal-card.css +358 -358
  10. package/dist/ai/ai-suggestion-card/ai-suggestion-card.css +295 -293
  11. package/dist/ai/ai-tool-call/ai-tool-call.css +256 -255
  12. package/dist/ai/index.css +7 -7
  13. package/dist/appearance/cache.d.ts +6 -1
  14. package/dist/appearance/cache.d.ts.map +1 -1
  15. package/dist/appearance/cache.js +57 -1
  16. package/dist/appearance/cache.js.map +1 -1
  17. package/dist/appearance/cookie.d.ts +16 -1
  18. package/dist/appearance/cookie.d.ts.map +1 -1
  19. package/dist/appearance/cookie.js +73 -4
  20. package/dist/appearance/cookie.js.map +1 -1
  21. package/dist/appearance/index.d.ts +9 -6
  22. package/dist/appearance/index.d.ts.map +1 -1
  23. package/dist/appearance/index.js +5 -4
  24. package/dist/appearance/index.js.map +1 -1
  25. package/dist/appearance/inline-bootstrap.d.ts +29 -0
  26. package/dist/appearance/inline-bootstrap.d.ts.map +1 -0
  27. package/dist/appearance/inline-bootstrap.js +154 -0
  28. package/dist/appearance/inline-bootstrap.js.map +1 -0
  29. package/dist/appearance/preference.d.ts +9 -1
  30. package/dist/appearance/preference.d.ts.map +1 -1
  31. package/dist/appearance/preference.js +54 -0
  32. package/dist/appearance/preference.js.map +1 -1
  33. package/dist/appearance/theme-controller.d.ts +37 -49
  34. package/dist/appearance/theme-controller.d.ts.map +1 -1
  35. package/dist/appearance/theme-controller.js +153 -143
  36. package/dist/appearance/theme-controller.js.map +1 -1
  37. package/dist/appearance/types.d.ts +29 -2
  38. package/dist/appearance/types.d.ts.map +1 -1
  39. package/dist/behaviors/announcer.d.ts +34 -0
  40. package/dist/behaviors/announcer.d.ts.map +1 -0
  41. package/dist/behaviors/announcer.js +150 -0
  42. package/dist/behaviors/announcer.js.map +1 -0
  43. package/dist/behaviors/calendar.d.ts +15 -0
  44. package/dist/behaviors/calendar.d.ts.map +1 -0
  45. package/dist/behaviors/calendar.js +77 -0
  46. package/dist/behaviors/calendar.js.map +1 -0
  47. package/dist/behaviors/data-grid.d.ts +18 -0
  48. package/dist/behaviors/data-grid.d.ts.map +1 -0
  49. package/dist/behaviors/data-grid.js +114 -0
  50. package/dist/behaviors/data-grid.js.map +1 -0
  51. package/dist/behaviors/dialog.d.ts +14 -0
  52. package/dist/behaviors/dialog.d.ts.map +1 -1
  53. package/dist/behaviors/dialog.js +24 -6
  54. package/dist/behaviors/dialog.js.map +1 -1
  55. package/dist/behaviors/direction.d.ts +10 -0
  56. package/dist/behaviors/direction.d.ts.map +1 -0
  57. package/dist/behaviors/direction.js +24 -0
  58. package/dist/behaviors/direction.js.map +1 -0
  59. package/dist/behaviors/drawer.d.ts +15 -3
  60. package/dist/behaviors/drawer.d.ts.map +1 -1
  61. package/dist/behaviors/drawer.js +25 -10
  62. package/dist/behaviors/drawer.js.map +1 -1
  63. package/dist/behaviors/dropdown.d.ts +11 -0
  64. package/dist/behaviors/dropdown.d.ts.map +1 -1
  65. package/dist/behaviors/dropdown.js +53 -11
  66. package/dist/behaviors/dropdown.js.map +1 -1
  67. package/dist/behaviors/focus-trap.d.ts.map +1 -1
  68. package/dist/behaviors/focus-trap.js +45 -5
  69. package/dist/behaviors/focus-trap.js.map +1 -1
  70. package/dist/behaviors/forms.d.ts +32 -0
  71. package/dist/behaviors/forms.d.ts.map +1 -0
  72. package/dist/behaviors/forms.js +147 -0
  73. package/dist/behaviors/forms.js.map +1 -0
  74. package/dist/behaviors/index.d.ts +11 -0
  75. package/dist/behaviors/index.d.ts.map +1 -1
  76. package/dist/behaviors/index.js +11 -0
  77. package/dist/behaviors/index.js.map +1 -1
  78. package/dist/behaviors/keyboard.d.ts.map +1 -1
  79. package/dist/behaviors/keyboard.js +4 -2
  80. package/dist/behaviors/keyboard.js.map +1 -1
  81. package/dist/behaviors/navigation.d.ts +98 -0
  82. package/dist/behaviors/navigation.d.ts.map +1 -0
  83. package/dist/behaviors/navigation.js +295 -0
  84. package/dist/behaviors/navigation.js.map +1 -0
  85. package/dist/behaviors/overlay.d.ts +6 -0
  86. package/dist/behaviors/overlay.d.ts.map +1 -1
  87. package/dist/behaviors/overlay.js +93 -3
  88. package/dist/behaviors/overlay.js.map +1 -1
  89. package/dist/behaviors/popover.d.ts +22 -0
  90. package/dist/behaviors/popover.d.ts.map +1 -0
  91. package/dist/behaviors/popover.js +126 -0
  92. package/dist/behaviors/popover.js.map +1 -0
  93. package/dist/behaviors/sidebar.d.ts +78 -0
  94. package/dist/behaviors/sidebar.d.ts.map +1 -0
  95. package/dist/behaviors/sidebar.js +263 -0
  96. package/dist/behaviors/sidebar.js.map +1 -0
  97. package/dist/behaviors/state.d.ts +49 -0
  98. package/dist/behaviors/state.d.ts.map +1 -0
  99. package/dist/behaviors/state.js +220 -0
  100. package/dist/behaviors/state.js.map +1 -0
  101. package/dist/behaviors/tabs.d.ts +18 -0
  102. package/dist/behaviors/tabs.d.ts.map +1 -0
  103. package/dist/behaviors/tabs.js +103 -0
  104. package/dist/behaviors/tabs.js.map +1 -0
  105. package/dist/behaviors/viewport.d.ts +40 -0
  106. package/dist/behaviors/viewport.d.ts.map +1 -0
  107. package/dist/behaviors/viewport.js +47 -0
  108. package/dist/behaviors/viewport.js.map +1 -0
  109. package/dist/components/alert/alert.css +220 -217
  110. package/dist/components/avatar/avatar.css +220 -219
  111. package/dist/components/badge/badge.css +174 -174
  112. package/dist/components/breadcrumb/breadcrumb.css +207 -205
  113. package/dist/components/button/button.css +238 -167
  114. package/dist/components/button-group/button-group.css +111 -0
  115. package/dist/components/card/card.css +265 -220
  116. package/dist/components/checkbox/checkbox.css +189 -187
  117. package/dist/components/chip/chip.css +269 -267
  118. package/dist/components/data-grid/data-grid.css +520 -369
  119. package/dist/components/description-list/description-list.css +187 -0
  120. package/dist/components/dialog/dialog.css +339 -275
  121. package/dist/components/drawer/drawer.css +484 -403
  122. package/dist/components/dropdown/dropdown.css +316 -298
  123. package/dist/components/icon-button/icon-button.css +162 -158
  124. package/dist/components/index.css +5 -2
  125. package/dist/components/input/input.css +163 -163
  126. package/dist/components/menu/menu.css +315 -314
  127. package/dist/components/pagination/pagination.css +250 -249
  128. package/dist/components/panel/panel.css +284 -283
  129. package/dist/components/popover/popover.css +153 -0
  130. package/dist/components/progress/progress.css +256 -248
  131. package/dist/components/radio/radio.css +166 -164
  132. package/dist/components/segmented-control/segmented-control.css +205 -205
  133. package/dist/components/select/select.css +117 -103
  134. package/dist/components/skeleton/skeleton.css +267 -262
  135. package/dist/components/split-button/split-button.css +292 -285
  136. package/dist/components/stat/stat.css +403 -0
  137. package/dist/components/switch/switch.css +195 -181
  138. package/dist/components/table/table.css +220 -0
  139. package/dist/components/tabs/tabs.css +293 -289
  140. package/dist/components/textarea/textarea.css +86 -86
  141. package/dist/components/toast/toast.css +345 -323
  142. package/dist/components/tooltip/tooltip.css +258 -255
  143. package/dist/domain/billing/index.css +629 -498
  144. package/dist/domain/calendar/agenda-list/agenda-list.css +224 -0
  145. package/dist/domain/calendar/day-slice/day-slice.css +384 -383
  146. package/dist/domain/calendar/day-timeline/day-timeline.css +332 -324
  147. package/dist/domain/calendar/event-card/event-card.css +338 -336
  148. package/dist/domain/calendar/index.css +5 -4
  149. package/dist/domain/calendar/month-grid/month-grid.css +426 -420
  150. package/dist/domain/calendar/week-grid/week-grid.css +480 -470
  151. package/dist/domain/companies/index.css +526 -525
  152. package/dist/domain/index.css +3 -3
  153. package/dist/index.css +5 -5
  154. package/dist/index.d.ts +2 -1
  155. package/dist/index.d.ts.map +1 -1
  156. package/dist/index.js +2 -1
  157. package/dist/index.js.map +1 -1
  158. package/dist/localization/index.d.ts +8 -0
  159. package/dist/localization/index.d.ts.map +1 -0
  160. package/dist/localization/index.js +22 -0
  161. package/dist/localization/index.js.map +1 -0
  162. package/dist/patterns/command-palette/command-palette.css +447 -439
  163. package/dist/patterns/company-switcher/company-switcher.css +390 -363
  164. package/dist/patterns/content-state/content-state.css +236 -0
  165. package/dist/patterns/empty-state/empty-state.css +260 -259
  166. package/dist/patterns/error-state/error-state.css +272 -271
  167. package/dist/patterns/form-layout/form-layout.css +106 -0
  168. package/dist/patterns/index.css +9 -3
  169. package/dist/patterns/loading-state/loading-state.css +287 -287
  170. package/dist/patterns/master-detail/master-detail.css +103 -0
  171. package/dist/patterns/notification-center/notification-center.css +443 -438
  172. package/dist/patterns/page/page.css +303 -0
  173. package/dist/patterns/profile-menu/profile-menu.css +298 -297
  174. package/dist/patterns/record-list/record-list.css +302 -0
  175. package/dist/patterns/search-bar/search-bar.css +457 -444
  176. package/dist/patterns/settings-layout/settings-layout.css +150 -0
  177. package/dist/patterns/workflow/workflow.css +168 -0
  178. package/dist/shell/app-shell/app-shell.css +211 -68
  179. package/dist/shell/content-frame/content-frame.css +93 -93
  180. package/dist/shell/footer/footer.css +256 -0
  181. package/dist/shell/header/header.css +328 -178
  182. package/dist/shell/index.css +8 -6
  183. package/dist/shell/mobile-nav/mobile-nav.css +254 -171
  184. package/dist/shell/navbar/navbar.css +255 -0
  185. package/dist/shell/sidebar/sidebar.css +314 -146
  186. package/dist/styles/accessibility.css +150 -0
  187. package/dist/styles/animations/motion.css +162 -162
  188. package/dist/styles/appearance/accent.css +215 -0
  189. package/dist/styles/appearance/density.css +61 -0
  190. package/dist/styles/appearance/motion.css +40 -0
  191. package/dist/styles/base.css +83 -82
  192. package/dist/styles/index.css +28 -21
  193. package/dist/styles/localization.css +56 -0
  194. package/dist/styles/reset.css +51 -50
  195. package/dist/styles/responsive.css +101 -0
  196. package/dist/styles/themes/dark.css +202 -120
  197. package/dist/styles/themes/high-contrast.css +290 -119
  198. package/dist/styles/themes/light.css +201 -119
  199. package/dist/styles/tokens/breakpoints.css +37 -15
  200. package/dist/styles/tokens/color.css +102 -96
  201. package/dist/styles/tokens/compatibility.css +33 -0
  202. package/dist/styles/tokens/elevation.css +26 -32
  203. package/dist/styles/tokens/index.css +9 -8
  204. package/dist/styles/tokens/motion.css +35 -35
  205. package/dist/styles/tokens/radius.css +26 -21
  206. package/dist/styles/tokens/spacing.css +56 -50
  207. package/dist/styles/tokens/typography.css +85 -84
  208. package/dist/styles/tokens/z-index.css +14 -14
  209. package/dist/styles/utilities/layout.css +153 -135
  210. package/dist/styles/utilities/text.css +152 -152
  211. package/dist/styles/utilities/visibility.css +47 -47
  212. package/dist/types/index.d.ts +1 -0
  213. package/dist/types/index.d.ts.map +1 -1
  214. package/dist/version.d.ts +2 -0
  215. package/dist/version.d.ts.map +1 -0
  216. package/dist/version.js +3 -0
  217. package/dist/version.js.map +1 -0
  218. package/docs/NEETECHS_UI_UPGRADE_PLAN.md +192 -0
  219. package/docs/accessibility.md +218 -0
  220. package/docs/appearance-and-theming.md +150 -0
  221. package/docs/brand-palette.md +36 -0
  222. package/docs/component-architecture.md +137 -0
  223. package/docs/component-guidelines.md +64 -0
  224. package/docs/components.md +173 -0
  225. package/docs/content-and-terminology.md +207 -0
  226. package/docs/design-system-audit.md +120 -0
  227. package/docs/design-system-baseline-audit.md +226 -0
  228. package/docs/design-token-contract.md +279 -0
  229. package/docs/layering.md +53 -0
  230. package/docs/localization-and-rtl.md +147 -0
  231. package/docs/migration.md +193 -0
  232. package/docs/page-patterns-and-workflows.md +275 -0
  233. package/docs/responsive-and-adaptive-design.md +351 -0
  234. package/docs/semantic-role-migration-audit.md +77 -0
  235. package/docs/site-chrome.md +313 -0
  236. package/docs/states-feedback-and-recovery.md +206 -0
  237. package/docs/theming.md +5 -227
  238. package/package.json +48 -6
  239. package/src/ai/ai-action-button/ai-action-button.css +271 -270
  240. package/src/ai/ai-approval-card/ai-approval-card.css +323 -320
  241. package/src/ai/ai-conversation-panel/ai-conversation-panel.css +447 -403
  242. package/src/ai/ai-prompt-input/ai-prompt-input.css +380 -377
  243. package/src/ai/ai-proposal-card/ai-proposal-card.css +358 -358
  244. package/src/ai/ai-suggestion-card/ai-suggestion-card.css +295 -293
  245. package/src/ai/ai-tool-call/ai-tool-call.css +256 -255
  246. package/src/ai/index.css +7 -7
  247. package/src/appearance/cache.ts +236 -160
  248. package/src/appearance/cookie.ts +184 -68
  249. package/src/appearance/index.ts +86 -38
  250. package/src/appearance/inline-bootstrap.ts +163 -0
  251. package/src/appearance/preference.ts +121 -35
  252. package/src/appearance/theme-controller.ts +384 -383
  253. package/src/appearance/types.ts +61 -23
  254. package/src/behaviors/announcer.ts +222 -0
  255. package/src/behaviors/calendar.ts +92 -0
  256. package/src/behaviors/data-grid.ts +133 -0
  257. package/src/behaviors/dialog.ts +203 -168
  258. package/src/behaviors/direction.ts +34 -0
  259. package/src/behaviors/drawer.ts +210 -177
  260. package/src/behaviors/dropdown.ts +344 -281
  261. package/src/behaviors/focus-trap.ts +304 -261
  262. package/src/behaviors/forms.ts +205 -0
  263. package/src/behaviors/ids.ts +47 -47
  264. package/src/behaviors/index.ts +12 -1
  265. package/src/behaviors/keyboard.ts +305 -303
  266. package/src/behaviors/navigation.ts +417 -0
  267. package/src/behaviors/overlay.ts +344 -231
  268. package/src/behaviors/popover.ts +157 -0
  269. package/src/behaviors/sidebar.ts +342 -0
  270. package/src/behaviors/state.ts +282 -0
  271. package/src/behaviors/tabs.ts +137 -0
  272. package/src/behaviors/viewport.ts +61 -0
  273. package/src/components/alert/alert.css +220 -217
  274. package/src/components/avatar/avatar.css +220 -219
  275. package/src/components/badge/badge.css +174 -174
  276. package/src/components/breadcrumb/breadcrumb.css +207 -205
  277. package/src/components/button/button.css +238 -167
  278. package/src/components/button-group/button-group.css +111 -0
  279. package/src/components/card/card.css +265 -220
  280. package/src/components/checkbox/checkbox.css +189 -187
  281. package/src/components/chip/chip.css +269 -267
  282. package/src/components/data-grid/data-grid.css +520 -369
  283. package/src/components/description-list/description-list.css +187 -0
  284. package/src/components/dialog/dialog.css +339 -275
  285. package/src/components/drawer/drawer.css +484 -403
  286. package/src/components/dropdown/dropdown.css +316 -298
  287. package/src/components/icon-button/icon-button.css +162 -158
  288. package/src/components/index.css +5 -2
  289. package/src/components/input/input.css +163 -163
  290. package/src/components/menu/menu.css +315 -314
  291. package/src/components/pagination/pagination.css +250 -249
  292. package/src/components/panel/panel.css +284 -283
  293. package/src/components/popover/popover.css +153 -0
  294. package/src/components/progress/progress.css +256 -248
  295. package/src/components/radio/radio.css +166 -164
  296. package/src/components/segmented-control/segmented-control.css +205 -205
  297. package/src/components/select/select.css +117 -103
  298. package/src/components/skeleton/skeleton.css +267 -262
  299. package/src/components/split-button/split-button.css +292 -285
  300. package/src/components/stat/stat.css +403 -0
  301. package/src/components/switch/switch.css +195 -181
  302. package/src/components/table/table.css +220 -0
  303. package/src/components/tabs/tabs.css +293 -289
  304. package/src/components/textarea/textarea.css +86 -86
  305. package/src/components/toast/toast.css +345 -323
  306. package/src/components/tooltip/tooltip.css +258 -255
  307. package/src/domain/billing/index.css +629 -498
  308. package/src/domain/calendar/agenda-list/agenda-list.css +224 -0
  309. package/src/domain/calendar/day-slice/day-slice.css +384 -383
  310. package/src/domain/calendar/day-timeline/day-timeline.css +332 -324
  311. package/src/domain/calendar/event-card/event-card.css +338 -336
  312. package/src/domain/calendar/index.css +5 -4
  313. package/src/domain/calendar/month-grid/month-grid.css +426 -420
  314. package/src/domain/calendar/week-grid/week-grid.css +480 -470
  315. package/src/domain/companies/index.css +526 -525
  316. package/src/domain/index.css +3 -3
  317. package/src/index.css +5 -5
  318. package/src/index.ts +7 -6
  319. package/src/localization/index.ts +56 -0
  320. package/src/patterns/command-palette/command-palette.css +447 -439
  321. package/src/patterns/company-switcher/company-switcher.css +390 -363
  322. package/src/patterns/content-state/content-state.css +236 -0
  323. package/src/patterns/empty-state/empty-state.css +260 -259
  324. package/src/patterns/error-state/error-state.css +272 -271
  325. package/src/patterns/form-layout/form-layout.css +106 -0
  326. package/src/patterns/index.css +9 -3
  327. package/src/patterns/loading-state/loading-state.css +287 -287
  328. package/src/patterns/master-detail/master-detail.css +103 -0
  329. package/src/patterns/notification-center/notification-center.css +443 -438
  330. package/src/patterns/page/page.css +303 -0
  331. package/src/patterns/profile-menu/profile-menu.css +298 -297
  332. package/src/patterns/record-list/record-list.css +302 -0
  333. package/src/patterns/search-bar/search-bar.css +457 -444
  334. package/src/patterns/settings-layout/settings-layout.css +150 -0
  335. package/src/patterns/workflow/workflow.css +168 -0
  336. package/src/shell/app-shell/app-shell.css +211 -68
  337. package/src/shell/content-frame/content-frame.css +93 -93
  338. package/src/shell/footer/footer.css +256 -0
  339. package/src/shell/header/header.css +328 -178
  340. package/src/shell/index.css +8 -6
  341. package/src/shell/mobile-nav/mobile-nav.css +254 -171
  342. package/src/shell/navbar/navbar.css +255 -0
  343. package/src/shell/sidebar/sidebar.css +314 -146
  344. package/src/styles/accessibility.css +150 -0
  345. package/src/styles/animations/motion.css +162 -162
  346. package/src/styles/appearance/accent.css +215 -0
  347. package/src/styles/appearance/density.css +61 -0
  348. package/src/styles/appearance/motion.css +40 -0
  349. package/src/styles/base.css +83 -82
  350. package/src/styles/index.css +28 -21
  351. package/src/styles/localization.css +56 -0
  352. package/src/styles/reset.css +51 -50
  353. package/src/styles/responsive.css +101 -0
  354. package/src/styles/themes/dark.css +202 -120
  355. package/src/styles/themes/high-contrast.css +290 -119
  356. package/src/styles/themes/light.css +201 -119
  357. package/src/styles/tokens/breakpoints.css +37 -15
  358. package/src/styles/tokens/color.css +102 -96
  359. package/src/styles/tokens/compatibility.css +33 -0
  360. package/src/styles/tokens/elevation.css +26 -32
  361. package/src/styles/tokens/index.css +9 -8
  362. package/src/styles/tokens/motion.css +35 -35
  363. package/src/styles/tokens/radius.css +26 -21
  364. package/src/styles/tokens/spacing.css +56 -50
  365. package/src/styles/tokens/typography.css +85 -84
  366. package/src/styles/tokens/z-index.css +14 -14
  367. package/src/styles/utilities/layout.css +153 -135
  368. package/src/styles/utilities/text.css +152 -152
  369. package/src/styles/utilities/visibility.css +47 -47
  370. package/src/types/index.ts +126 -125
  371. package/src/version.ts +2 -0
  372. package/dist/components/modal/modal.css +0 -318
  373. package/dist/patterns/workspace-switcher/workspace-switcher.css +0 -380
  374. package/dist/shell/right-drawer/right-drawer.css +0 -108
  375. package/src/components/modal/modal.css +0 -318
  376. package/src/patterns/workspace-switcher/workspace-switcher.css +0 -380
  377. package/src/shell/right-drawer/right-drawer.css +0 -108
@@ -0,0 +1,120 @@
1
+ # Design system audit — `@neetechs/ui` (Stage 1)
2
+
3
+ Audit date: 2026-11-15. Scope: this repository at `c07e6ed` (start of the
4
+ upgrade), the published `0.0.4` tarball, and the consumer repositories on this
5
+ machine. It supersedes nothing: [design-system-baseline-audit.md](./design-system-baseline-audit.md)
6
+ (2026-07-13) records the earlier state and most of its findings have since been
7
+ resolved. Progress is tracked in [NEETECHS_UI_UPGRADE_PLAN.md](./NEETECHS_UI_UPGRADE_PLAN.md).
8
+
9
+ ## 1. Summary
10
+
11
+ `@neetechs/ui` is a mature, CSS-first, framework-free package: 96 CSS files
12
+ (shell, components, patterns, AI, domain), 14 behavior modules, and a tested
13
+ SSR-safe appearance controller, guarded by 7 static contract checkers, 112 node
14
+ tests (one test file failed to load, see #1), and 41 Playwright tests (axe,
15
+ RTL, responsive, visual snapshots). The
16
+ architecture was sound. The real problems were in **release engineering**:
17
+
18
+ | # | Finding | Severity | Status |
19
+ |---|---|---|---|
20
+ | 1 | CI failed at the unit-test step on every push since 0.0.4 (double-escaped regex literals in `tests/brand-palette.test.mjs`), so the navy palette (`feat`) and focus-ring fix (`fix`) were never released. Consumers carry hand-copied "bridges" for it. | High | Fixed |
21
+ | 2 | The release workflow published to npm automatically on any green push to `main`. Fixing #1 would have published without owner approval. | High | Fixed: manual `publish` gate |
22
+ | 3 | Published `0.0.4` exports `NEETECHS_UI_VERSION = '0.0.2'` (constant never bumped by semantic-release). | Medium | Fixed: generated `src/version.ts` + `prepack` build |
23
+ | 4 | Standalone `.nt-header` (no app shell) was unpositioned while its `backdrop-filter` created a stacking context, so header dropdowns could render behind positioned or hovered cards (MyAccount carried a local fix: "account dropdown z-index over Resume Studio"). | Medium | Fixed in package |
24
+ | 5 | No pre-paint appearance bootstrap; client-rendered apps could flash the wrong theme before the bundle ran. | Medium | Fixed: `ntAppearanceBootstrapScript()` |
25
+ | 6 | `AppearanceController.setPreference` requires a full preference; a light/dark toggle in an app could reset accent/density if written carelessly. | Low | Fixed: `updatePreference(partial)` |
26
+ | 7 | `NtDisclosureOptions`/`NtDisclosureController` types exported with no implementation. | Low | Fixed: `ntCreatePopover` implements them |
27
+ | 8 | Three README samples used non-existent classes (`nt-field__hint`, `nt-field--error`, `nt-shell-main`). | Low | Fixed; `check:docs` now enforces |
28
+ | 9 | `test-results/.last-run.json` tracked in git. | Low | Fixed (ignored) |
29
+ | 10 | `src.zip` (1.5 MB, 841 files, stale copy of `src`) is tracked in git. Not published (excluded by `files`). | Low | Open: owner decision to delete |
30
+ | 11 | No reusable site header navigation, footer, account dropdown controller, or standalone mobile drawer for websites. | Feature gap | Added (Stage 4) |
31
+ | 12 | No plain button group or non-menu popover. | Feature gap | Added (Stage 4) |
32
+
33
+ ## 2. Architecture and exports
34
+
35
+ - ESM only, `"type": "module"`, zero runtime dependencies. `sideEffects` marks CSS only.
36
+ - CSS is shipped from `src/` and also copied to `dist/`; entry files are `@import`
37
+ graphs that consumer bundlers (Angular CLI, Vite, webpack) inline at build time.
38
+ All 36 export keys and 100 CSS files are verified by `check:package` and `check:api`.
39
+ - JS entries: `.`, `./appearance`, `./behaviors`, `./behaviors/*`, `./localization`,
40
+ `./types`. TypeScript declarations ship for every entry (`strict`,
41
+ `exactOptionalPropertyTypes`).
42
+ - Layers: `styles/` (tokens, themes, appearance selectors, reset, base, utilities),
43
+ `shell/`, `components/`, `patterns/`, `ai/`, `domain/` (calendar, billing,
44
+ companies). Domain modules are scoped to their own directory and export path.
45
+
46
+ ## 3. Tokens, themes, and appearance
47
+
48
+ - Three-layer tokens (primitive → semantic → component) with deprecated aliases
49
+ in `tokens/compatibility.css`; `check:tokens` reports 0 undefined tokens and 0
50
+ internal uses of deprecated aliases.
51
+ - Complete scales: color roles, typography (composite `font` shorthands), spacing,
52
+ radius roles, elevation, motion, breakpoints (documentation contract mirrored
53
+ by `NT_VIEWPORTS`), z-index (12 named layers).
54
+ - Root-attribute contract: `data-nt-theme`, `data-nt-theme-preference`,
55
+ `data-nt-accent` (blue, orange, green, purple, neutral), `data-nt-density`,
56
+ `data-nt-contrast`, `data-nt-motion`; system color scheme, contrast, forced
57
+ colors, and reduced motion are honoured. Cookie (`nt_theme`, cross-subdomain)
58
+ and local cache provide startup hints; the backend remains the source of truth.
59
+ - `check:a11y` verifies 140 contrast pairs across themes and accents.
60
+
61
+ ## 4. Components and duplication
62
+
63
+ - Canonical overlays: dialog (modal is an alias), drawer (`right-drawer` alias),
64
+ menu/dropdown on one popover foundation; workspace switcher aliases company
65
+ switcher. `check:architecture` keeps 3 compatibility exports pointing at
66
+ canonical files and prevents re-copying retired implementations.
67
+ - Table (read-only) and data grid (interactive) are intentionally distinct, as
68
+ are badge (informational) and chip (interactive).
69
+ - No conflicting selectors found: every block is BEM-namespaced `nt-`.
70
+
71
+ ## 5. Framework compatibility
72
+
73
+ - Angular (current consumers, v20): CSS via `styles.scss` `@import`, behaviors via
74
+ `@neetechs/ui/behaviors` in components (Billing overlays, devices header/drawer),
75
+ appearance via `bootstrapNeetechsTheme` in `main.ts` (devices).
76
+ - React: `Neetechs_AI` (Vite/React) consumes tokens and the `data-nt-theme`
77
+ convention. Controllers are plain DOM functions that fit `useEffect`
78
+ cleanups. No framework code exists in the package.
79
+
80
+ ## 6. Accessibility and responsive
81
+
82
+ Already strong: focus-visible ring tokens, 44px primary targets, coarse-pointer
83
+ upgrades, reduced-motion blocks, forced-colors support, logical properties
84
+ (`check:rtl`), container-query components (`check:responsive`), Arabic
85
+ typography adjustments. Gaps found and fixed are #4–#6 above, plus site chrome
86
+ (navbar, account, mobile drawer, footer) with full keyboard and dismissal contracts.
87
+
88
+ ## 7. Versioning
89
+
90
+ - Published: 0.0.1–0.0.4 (2026-06-26 → 2026-07-14). Tags `v0.0.2`–`v0.0.4`.
91
+ - Unreleased since 0.0.4: one `feat`, one `fix` → semantic-release will compute
92
+ **0.1.0** (minor on 0.x). The repo `package.json` now states `0.1.0` so the
93
+ build, `NEETECHS_UI_VERSION`, and tarball agree before publishing.
94
+ - Stay on `0.x` until the four real-application migrations in `todo.txt` succeed.
95
+
96
+ ## 8. Consumers
97
+
98
+ | Repository | Uses `@neetechs/ui` | Version | Integration |
99
+ |---|---|---|---|
100
+ | `Neetechs_Myaccount` (top-level checkout) | yes | 0.0.4 | `styles.scss` import + 47-token navy bridge + `--brand-rgb` |
101
+ | `Neetechs_Apply` | yes | 0.0.4 | `styles.scss` import + 51-token bridge |
102
+ | `Neetechs_Billing` | yes | 0.0.4 | import, 52-token bridge, `ntCreateFocusTrap`/`ntLockScroll` |
103
+ | `Neetechs_AI` (React) | yes | 0.0.4 | 49-token bridge in `brand-theme.css`, own `useTheme` on `data-nt-theme` |
104
+ | `Neetechs_devices` | yes | 0.0.4 | import, appearance bootstrap/controller, dialog/drawer behaviors |
105
+ | `Neetechs/Neetechs_Frontend` | **no** | — | Own styling; adoption would be a new integration |
106
+ | `Neetechs/Neetechs_Accounts` | **no** | — | Own styling; adoption would be a new integration |
107
+ | `Neetechs/Neetechs_Myaccount` (nested checkout) | **no** | — | Older checkout; the top-level `Neetechs_Myaccount` is the consumer |
108
+
109
+ Bridge analysis (browser-computed, Stage 8) is in [migration.md](./migration.md#upgrading-consumers-from-004-to-010).
110
+
111
+ ## 9. Recommendations (all implemented unless noted)
112
+
113
+ 1. Gate publishing behind explicit approval; keep full verification on every push.
114
+ 2. Generate the runtime version constant from `package.json`.
115
+ 3. Add automated checks for docs accuracy (`check:docs`), public API stability
116
+ against a baseline and against 0.0.4 (`check:api`), and the packed tarball in a
117
+ clean consumer (`check:package`).
118
+ 4. Provide site chrome components so apps stop rebuilding headers, menus, and footers.
119
+ 5. After publishing 0.1.0, delete consumer palette bridges (MyAccount first).
120
+ 6. Owner decision: delete the stale tracked `src.zip`.
@@ -0,0 +1,226 @@
1
+ # Design-system baseline audit
2
+
3
+ Audit date: 2026-07-13. Scope: the complete tracked repository plus the root `src.zip` archive manifest (which duplicates source content). This is an observation-only baseline. No source, CSS, export, test, workflow, or package change was made.
4
+
5
+ ## 1. Executive summary
6
+
7
+ `@neetechs/ui` 0.0.2 is a CSS-first ESM package containing 59 CSS UI modules, seven DOM-behavior helpers, and one tested appearance controller. Its declared package surface is broad (89 concrete current import paths when export globs are expanded), but the styling contract is not internally coherent: 27 `--nt-*` names are referenced without a repository-wide declaration, including all six suspected tokens. `src/components/table/table.css` is empty yet published and included by `components.css`.
8
+
9
+ The only automated tests are 37 Node tests for appearance. The build passes, but it only type-checks TypeScript and copies assets; it does not parse CSS, validate tokens, test a component, exercise RTL, test accessibility, or verify browser rendering. Accent and density are documented and typed but have no CSS selectors or controller implementation. High contrast CSS exists but is outside the persisted appearance API. No `forced-colors`, `prefers-contrast`, container-query, or RTL CSS is present.
10
+
11
+ The immediate refactor rule is therefore: preserve import paths, CSS class names, data/ARIA hooks, and the appearance/behavior public APIs until a versioned migration has been implemented. Repairing undefined tokens and duplicated overlay/surface patterns is a high-risk compatibility change because consumers may currently supply missing custom properties themselves.
12
+
13
+ ## 2. Repository and package overview
14
+
15
+ | Item | Current contract / finding |
16
+ | --- | --- |
17
+ | Package | `@neetechs/ui`, version `0.0.2` in `package.json`; runtime `NEETECHS_UI_VERSION` is **`0.0.1`** in `src/index.ts:2`. |
18
+ | Runtime format | ESM only (`"type": "module"`); `main` and `module` are `./dist/index.js`; declarations `./dist/index.d.ts`. TypeScript target is ES2022 with DOM/DOM.Iterable libs (`tsconfig.json`). |
19
+ | CSS delivery | Package `style` and all CSS export targets point at **`src`**, not `dist`; `src` is intentionally in `files`. The build also copies CSS to `dist`, creating duplicate package contents. CSS entry files are `@import` chains, not flattened. |
20
+ | Published files | `files`: `dist`, `src`, `docs`, `README.md`; `npm pack --dry-run` reports 257 files, 99.4 kB tarball / 1.0 MB unpacked. It includes empty docs and `src/components/table/table.css` (0 B). |
21
+ | Side effects / tree shaking | `sideEffects: ["**/*.css"]`; JavaScript modules are not explicitly marked side-effect-free. CSS is side-effectful by intent. Export globs make individual CSS imports tree-shakable only when a consumer/bundler honors package exports and CSS imports. |
22
+ | Build/test/release | `build`: `tsc` then `scripts/copy-assets.mjs`; `test`: build then `node --test tests/**/*.test.mjs`; `release`: Semantic Release. No lint, CSS parse/lint, package-size, visual, browser, accessibility, RTL, or localization script. |
23
+ | Publishing | `.github/workflows/publish-npm.yml` publishes on every push to `main` and manual dispatch, after `npm ci`, test, build, and `npm pack --dry-run`; `.releaserc.json` uses semantic-release npm/GitHub plugins and `main`. Workflow uses Node 24 and `actions/*@v6`. |
24
+ | Compatibility | Code assumes ES2022 and browsers with DOM APIs, `queueMicrotask`, `PointerEvent`, `Event.composedPath`, `classList`, `dataset`, `matchMedia`, and `MediaQueryList` (legacy listener fallback exists only for the latter). Node is not declared in `engines`; appearance supports SSR only when globals are avoided/injected. |
25
+ | Repository state observed | Pre-existing user worktree changes: tracked `.zip` deleted and untracked `src.zip` present. This audit did not alter either. |
26
+
27
+ ## 3. Current public import paths
28
+
29
+ The following are public according to `package.json#exports`; wildcard entries expand to every matching current file. Preserve all temporarily. Concrete count: **89** (12 JavaScript/TypeScript paths and 77 CSS paths).
30
+
31
+ | Group | Public paths |
32
+ | --- | --- |
33
+ | JS/types | `@neetechs/ui`; `@neetechs/ui/appearance`; `@neetechs/ui/behaviors`; `@neetechs/ui/behaviors/{dialog,drawer,dropdown,focus-trap,ids,index,keyboard,overlay}`; `@neetechs/ui/types` |
34
+ | global CSS | `@neetechs/ui/styles`, `@neetechs/ui/styles.css`, `@neetechs/ui/base.css`, `@neetechs/ui/tokens.css`, `@neetechs/ui/reset.css`, `@neetechs/ui/themes/{dark,light,high-contrast}.css`, `@neetechs/ui/utilities/{layout,text,visibility}.css`, `@neetechs/ui/animations/motion.css` |
35
+ | shell CSS | `@neetechs/ui/shell.css`, `@neetechs/ui/shell/{app-shell,content-frame,header,mobile-nav,right-drawer,sidebar}.css` |
36
+ | component CSS | `@neetechs/ui/components.css`, plus `@neetechs/ui/components/{alert,avatar,badge,breadcrumb,button,card,checkbox,chip,data-grid,dialog,drawer,dropdown,icon-button,input,menu,modal,pagination,panel,progress,radio,segmented-control,select,skeleton,split-button,switch,table,tabs,textarea,toast,tooltip}.css` |
37
+ | pattern CSS | `@neetechs/ui/patterns.css`, plus `@neetechs/ui/patterns/{command-palette,company-switcher,empty-state,error-state,loading-state,notification-center,profile-menu,search-bar,workspace-switcher}.css` |
38
+ | AI CSS | `@neetechs/ui/ai.css`, plus `@neetechs/ui/ai/{ai-action-button,ai-approval-card,ai-conversation-panel,ai-prompt-input,ai-proposal-card,ai-suggestion-card,ai-tool-call}.css` |
39
+ | domain CSS | `@neetechs/ui/domain.css`, `@neetechs/ui/domain/{calendar,billing,companies}.css`, plus `@neetechs/ui/domain/calendar/{day-slice,day-timeline,event-card,month-grid,week-grid}.css` |
40
+
41
+ `README.md:568` and `:584` additionally tell consumers to load `node_modules/@neetechs/ui/src/index.css` directly. `src` is published, but that path is not an export and is unsafe with export-enforcing resolvers; treat it as documented-but-risky, not a stable recommended import.
42
+
43
+ ## 4. Component inventory
44
+
45
+ All listed CSS modules are in their category index and therefore in `styles.css`; a module-specific export exists at the matching path in section 3. “Docs” means substantive component documentation, not merely an export list. No CSS module has a component-specific test. Variants and states below are CSS modifiers/attribute selectors—not behavior guarantees.
46
+
47
+ | Category / item | File and root class(es) | Variants, sizes, states, responsive/a11y baseline | Docs / completeness / overlap |
48
+ | --- | --- | --- | --- |
49
+ | Primitives: alert, avatar, badge, breadcrumb | `src/components/{alert,avatar,badge,breadcrumb}/*.css`; `.nt-alert`, `.nt-avatar`, `.nt-badge`, `.nt-breadcrumb` | Alert tones/layouts; avatar xs–xl/shapes; badge sm–lg/tones; breadcrumb compact/mobile/truncate. Most have `:focus-visible` where interactive and reduced-motion; breadcrumb has 640px rule. | No dedicated docs/tests. Complete-looking CSS only. |
50
+ | Primitives: button, icon-button, split-button | corresponding component files; `.nt-button`, `.nt-icon-button`, `.nt-split-button` | Button/icon primary/secondary/ghost/danger/AI, sm–lg, disabled/loading; split primary/ghost/danger, sm/lg, open menu. Native/ARIA disabled styling; focus rings; reduced-motion. | README documents button; no behavior initializer for split button. |
51
+ | Form controls | `input`, `textarea`, `select`, `checkbox`, `radio`, `switch` files; `.nt-field`, `.nt-input`, `.nt-textarea`, `.nt-select`, `.nt-checkbox`, `.nt-radio`, `.nt-switch` | sm–lg; error/readonly/disabled as applicable. Native `:disabled`, `aria-disabled`, `aria-invalid`; checkbox/radio/switch have visually-hidden inputs. No generated `id`, label, described-by, required, or live-error behavior. | README documents input only; no tests. |
52
+ | Surface/data primitives | `card`, `panel`, `table`, `data-grid`, `progress`, `skeleton` files | Card/panel surface/tone/density modifiers; data grid striped/sticky; progress sizes/tones/ring/indeterminate; skeleton shapes/sizes. `table.css` is **0 bytes**. 640px adaptations for card/panel/data-grid/skeleton; grid remains CSS-only. | README documents card; table is publicly exported but empty. Card/panel overlap; table/data-grid overlap. |
53
+ | Selection/navigation primitives | `chip`, `tabs`, `segmented-control`, `pagination`, `menu`, `dropdown` files | Chips tones/sizes/selected; tabs boxed/pills/vertical/scrollable; segmented accent/ghost/vertical; pagination simple/mobile; menus layouts; dropdown sm/lg. Use `aria-selected`, `aria-current`, `aria-disabled`, `aria-expanded`, `data-state`; only dropdown has supplied behavior. | No dedicated docs/tests. Menu/dropdown overlap. |
54
+ | Overlay primitives | `dialog`, `modal`, `drawer`, `toast`, `tooltip` files | Dialog/modal sm–xl/fullscreen and tone modifiers; drawer four sides/sm–xl/fullscreen; toast placements/states; tooltip side/align/tone. CSS uses `[data-state]`; dialog/drawer have helpers, modal/tooltip/toast do not. 640px overlay rules except tooltip. | README documents dialog/drawer behavior. Dialog/modal and drawer/right-drawer overlap. |
55
+ | Shell | `src/shell/{app-shell,sidebar,header,content-frame,right-drawer,mobile-nav}/*.css` | App shell collapse; content widths; right drawer narrow/wide; header/app shell use 40/48/64rem breakpoints. Sidebar/mobile nav use `aria-current`. No behavior. | README documents app-shell structure only. |
56
+ | Patterns | `src/patterns/{command-palette,company-switcher,workspace-switcher,profile-menu,notification-center,search-bar,empty-state,error-state,loading-state}/*.css` | Switchers/profile menu compact/wide and ARIA selected/current; command palette compact/wide; search bar sizes/states; state patterns density/tone/layout. All mostly 640px CSS; many duplicate menu/list/overlay affordances. | README gives company/profile examples only; no behavior/test. |
57
+ | AI | `src/ai/{ai-action-button,ai-approval-card,ai-conversation-panel,ai-prompt-input,ai-proposal-card,ai-suggestion-card,ai-tool-call}/*.css` | Dedicated AI color treatment; action button sizes/tones/loading; cards compact/status/tone; prompt compact/large/loading/error; tool-call running/open. All but approval/proposal have reduced-motion blocks; most 640px rules. | README gives prompt/proposal markup only; no behavior/test. |
58
+ | Calendar domain | `src/domain/calendar/{day-slice,day-timeline,event-card,month-grid,week-grid}/*.css` | Compact/flat/ghost; event tone modifiers; 480/760px layout rules for grids/slice and 640px for timeline/event card. CSS custom placement variables (`--nt-calendar-*`) are consumer inputs. | README documents month-grid only; no tests/behavior or date/locale logic. |
59
+ | Billing / companies domain | `src/domain/{billing,companies}/index.css` | Billing status/metric/row modifiers; company card/profile/member/info structures. 640px layout rules (billing has no reduced-motion block). | README documents billing markup; no tests/behavior. |
60
+ | Appearance module | `src/appearance/*.ts`; `@neetechs/ui/appearance` | System/light/dark preference resolution, cookie/cache/SSR support, listener cleanup. No accent/density/reduced-motion API. | Fully documented in `docs/theming.md`, with 37 tests; high contrast must be manually assigned. |
61
+ | Behavior module | `src/behaviors/{dialog,drawer,dropdown,focus-trap,overlay,keyboard,ids}.ts`; `@neetechs/ui/behaviors` and direct behavior paths | Controllers expose `open`, `close`, `toggle`, `destroy`; dropdown has roving focus. Dialog/drawer apply role, modal ARIA, IDs, focus trap, Escape/outside/scroll behavior. | README documents three factory examples; no direct behavior tests. |
62
+
63
+ The component count is **59 CSS UI modules** (30 core, 6 shell, 9 patterns, 7 AI, 7 domain); table is counted because it is publicly exported despite being empty. `src/styles/*` supplies tokens/base/utilities/animation primitives rather than UI components.
64
+
65
+ ## 5. Public CSS and DOM contract
66
+
67
+ ### Classification
68
+
69
+ | Classification | Contract |
70
+ | --- | --- |
71
+ | Clearly public | Every `.nt-*` selector in shipped CSS (all are directly consumer-authored markup), all exported CSS paths, `data-nt-theme`, `data-nt-theme-preference`, appearance constants/functions, behavior factory APIs, and documented `aria-*` state selectors. |
72
+ | Probably public | Component BEM elements/modifiers, `[data-state]`, `[data-side]`, `[data-align]`, `data-disabled`, placement variables (`--nt-tooltip-x/y`, `--nt-toast-swipe-x`, `--nt-calendar-*`, `--nt-search-results-*`, `--nt-progress-*`), and style tokens. They are shipped, externally usable, and have no private namespace. |
73
+ | Internal implementation detail | Generated IDs such as `nt-dialog-1`, the module-global incremental ID counter, overlay scroll-lock implementation, and direct `body.style.overflow/paddingRight` manipulation. Keep behavior, not exact IDs/implementation. |
74
+ | Undocumented but externally usable | All component-specific CSS exports via glob, all behavior subpaths, `data-state`, `data-side`, `data-align`, `data-disabled`, and the custom placement/progress/calendar variables. |
75
+ | Documented but not implemented | `data-nt-accent` values (`orange|blue|green|purple|neutral`) and `data-nt-density` (`compact|comfortable|spacious`): only README/type declarations exist; no CSS selector or controller logic. README's direct `src/index.css` usage is not an export. |
76
+
77
+ Behavior helper DOM mutations are a freeze item: dialog/drawer set `role="dialog"`, `aria-modal="true"`, `aria-expanded`, `aria-controls`, optional `aria-labelledby`, `hidden`, `data-state=open|closed`, and drawer `data-side`; dropdown sets `aria-haspopup="menu"`, `aria-expanded`, `aria-controls`, content `hidden`, `data-state`, `data-side`, and `data-align`. The dropdown default item selector is `[role="menuitem"],[role="option"],.nt-dropdown__item,.nt-menu__item` (`src/behaviors/dropdown.ts:36-41`).
78
+
79
+ Storage/cookie contracts: `NT_THEME_COOKIE_NAME = "nt_theme"` (`cookie.ts:10`); cache key `nt_theme_preference` and legacy keys `themeMode`, `selectedTheme`, `aiTheme`, `billingTheme` (`cache.ts:9-21`). The package reads but never writes the cookie; it reads/writes the cache and migration deletes legacy keys.
80
+
81
+ ## 6. Token declaration and usage findings
82
+
83
+ Static comparison covered every CSS declaration matching `--nt-*:` and every `var(--nt-*)` use. A reference can deliberately be a consumer-set positional value, but all names below are undeclared by package CSS and resolve invalid without a consumer value/fallback.
84
+
85
+ | Finding | Tokens / evidence |
86
+ | --- | --- |
87
+ | Referenced but undefined (27) | `--nt-accent-bg`, `--nt-accent-border`, `--nt-bg-elevated`, `--nt-bg-muted`, `--nt-bg-overlay-subtle`, `--nt-danger-bg-hover`, `--nt-line-height-relaxed`, `--nt-line-height-snug`, `--nt-shadow-2xl`, `--nt-text-code-sm`, `--nt-text-label-xs`, `--nt-z-overlay`; and consumer-input names `--nt-calendar-day-slice-used`, `--nt-calendar-event-top`, `--nt-calendar-hour-height`, `--nt-calendar-now-offset`, `--nt-progress-ring-{circumference,offset,value}`, `--nt-search-results-{top,right,bottom,left,width}`, `--nt-toast-swipe-x`, `--nt-tooltip-{x,y}`. The last group should be formally documented as inputs or supplied with fallbacks. |
88
+ | Suspected tokens | All are missing: `--nt-bg-muted`, `--nt-bg-elevated`, `--nt-accent-bg`, `--nt-accent-border`, `--nt-text-label-xs`, `--nt-shadow-2xl`. High-impact references include AI modules, card/panel-like components, calendar, switchers, dialog, command palette, and tooltip. |
89
+ | Defined but unused | Primitive color scale is almost wholly unused directly; unused semantic examples include `--nt-bg-shell`, `--nt-bg-inverse`, `--nt-border-muted`, `--nt-control-bg-active`, `--nt-accent-muted`, AI bubble tokens, status tokens, many breakpoint/container tokens, motion aliases, radius aliases, and z-index aliases. These are candidates for validation before removal, not safe deletion yet because consumers may read them. |
90
+ | Duplicate/conflicting declarations | The expected 84 semantic theme declarations repeat in dark/light/high-contrast with different values. No accidental same-file duplicate was identified in token files; however themes contain raw color values and theme semantics are incomplete because referenced semantic names are absent from all three. |
91
+ | Legacy/incompatible naming | Both semantic surface names (`--nt-bg-surface-muted`) and legacy-like aliases (`--nt-bg-muted`, `--nt-bg-elevated`) are used, but only the former are defined. Typography is mixed between composite `--nt-text-*` and missing `--nt-text-label-xs` / `--nt-text-code-sm`; line-height aliases are missing. |
92
+ | Primitive bypass / hardcoding | Theme files intentionally use primitive vars and raw hex/RGBA. Component CSS uses many raw layout/radius/typography/timing values (`1px`, `3px`, `0.5rem`, fixed `640px`, `1.15s`, etc.) and `progress.css` uses hardcoded `rgba(255,255,255,.18)` stripes. This bypasses the stated semantic-only rule for non-color dimensions. |
93
+ | Fallbacks | Most semantic `var()` calls have no fallback. Components therefore fail properties when an undefined token is not supplied by the application. Placement variables are the only common intentional exceptions with local fallbacks (for example tooltip x/y). |
94
+
95
+ Token source files: primitive color/spacing/radius/type/elevation/motion/z-index/breakpoint declarations are in `src/styles/tokens/*.css`; 84 theme semantic declarations are in each of `src/styles/themes/{dark,light,high-contrast}.css`. No automated token validation exists.
96
+
97
+ ### Prompt 2 repair status (2026-07-13)
98
+
99
+ The findings above remain the historical baseline. Prompt 2 repaired all 27 undefined names: internal CSS now uses canonical tokens, 10 deprecated names are retained only in `src/styles/tokens/compatibility.css`, 17 intended canonical/component-input tokens now have declarations, and `scripts/check-design-tokens.mjs` enforces zero undefined references, valid alias graphs, and no deprecated internal usage. See `docs/design-token-contract.md` for the current contract and mapping.
100
+
101
+ ### Prompt 3 semantic architecture status (2026-07-13)
102
+
103
+ The historical visual-consistency findings above are now partially repaired. Dark, light, and high-contrast themes expose the same 104-role semantic color/elevation contract; 57 production CSS files use the new action, selection, AI, financial, surface, elevation, or radius roles. Component-layer counts are now zero for primitive palette references, hardcoded colors, raw shadow-scale references, and raw radius-scale references. Twenty-five legacy names remain as one-hop compatibility aliases. Semantic enforcement and focused tests are part of `npm run check:tokens` / `npm test`; runtime contrast and screenshot approval remain unresolved.
104
+
105
+ ## 7. Theme and appearance findings
106
+
107
+ > Prompt 4 remediation (2026-07-13): the historical findings in this section remain the frozen baseline, but the package now implements typed theme/accent/density/motion/contrast preferences, full root attributes, versioned cookie/cache bootstrap, backend application, system listeners and cleanup, forced-colors/prefers-contrast layers, and SSR injection. High contrast is now layered over light/dark; the old `data-nt-theme='high-contrast'` stylesheet selector is compatibility-only. Focused appearance coverage increased the suite from 59 to 72 tests before final verification. Browser screenshot and component-level contrast review remain unresolved.
108
+
109
+ | Feature | Implemented baseline | Gap / status |
110
+ | --- | --- | --- |
111
+ | Dark/light/system | CSS selectors in themes; controller resolves `system` via `(prefers-color-scheme: dark)` and writes root attributes. | Works in tested fake DOM/media environment. No browser integration test. |
112
+ | High contrast | `data-nt-theme='high-contrast'` CSS has its own 84 declarations. | Controller types reject `high-contrast`; cookie/cache/backend preference cannot carry it. No `forced-colors` or `prefers-contrast` bridge. |
113
+ | Accent / density | README and `NtAccentName`/`NtDensityName` types advertise values. | **Nonfunctional:** no `[data-nt-accent]` or `[data-nt-density]` CSS anywhere, no controller state, persistence, listener, or tests. |
114
+ | Reduced motion | Base stylesheet and many component files have `prefers-reduced-motion: reduce` rules. | Uneven: AI approval/proposal, billing, empty/error patterns and several others lack module-local reduced-motion rules; no test validates computed animation. |
115
+ | Persistence / migration | Cookie → cache → system → fallback, cache failure guards, explicit SSR cookie, legacy-cache migration, system listener and `destroy()` cleanup. | Backend persistence is deliberately external. Cookie attributes/domain are documentation only; package cannot set/verify them. |
116
+ | SSR / hydration | Globals are avoided at import, options inject document/media/storage/cookie, SSR fallback is dark. | Server must call API with the request cookie and render matching root attribute; no framework/hydration test proves integration. |
117
+
118
+ `docs/theming.md` accurately documents the controller’s stored values and source ordering. README contradicts it by presenting high-contrast alongside “supported themes” in the general setup while the controller can only persist dark/light/system.
119
+
120
+ ## 8. Accessibility baseline
121
+
122
+ > Prompt 5 remediation (2026-07-13): the historical findings below remain the frozen baseline. The package now has semantic contrast/focus/target checks, forced-colors and reduced-motion coverage, nested overlay/focus management, additive tabs/grid/calendar/forms/announcer helpers, a 59-module accessibility inventory in `docs/accessibility.md`, 76 unit checks, and 10 passing Chromium keyboard/axe contracts. Formal certification, manual screen-reader interoperability, advanced combobox/grid/calendar behavior, responsive reflow, RTL, and localization remain unresolved.
123
+
124
+ > Prompt 6 remediation (2026-07-13): the frozen RTL findings below are now addressed by native inherited direction, logical CSS migrations, reviewed physical-coordinate exceptions, Arabic typography hooks, bidi utilities, explicit-locale `Intl` helpers, direction-aware keyboard behavior, `check:rtl`, and representative Chromium LTR/RTL/zoom tests. Full responsive calendar/data-grid redesign, application font loading/translations, and native Arabic screen-reader QA remain unresolved.
125
+
126
+ Implemented evidence: most interactive CSS modules use `:focus-visible` with a focus token; form styles recognize native disabled and `aria-invalid`; dialog/drawer create focus traps, restore focus by default, close on Escape/outside by default, lock scroll, set dialog roles/labels when title is passed; dropdown provides keyboard activation, up/down/home/end roving focus, Escape and outside closing. `src/behaviors/focus-trap.ts` excludes disabled/`aria-disabled` elements.
127
+
128
+ Limits: CSS alone supplies no roles, labels, required indicators, error `aria-describedby` association, read-only semantics, live regions, toast announcements, loading announcements, dialog title requirement, or target-size validation. Modal, tooltip, toast, menu, tabs, segmented control, command palette, search bar, notification center, switchers, data grid, and calendar have no dedicated behavior/controller. `aria-*` attributes are frequently styling selectors and are consumer obligations. No contrast calculations, accessibility tests, screen-reader tests, or browser keyboard tests exist; do **not** claim WCAG compliance.
129
+
130
+ ## 9. Responsive behavior baseline
131
+
132
+ The responsive implementation is viewport-only: dominant breakpoint `max-width: 640px`, calendar `480px/760px`, shell `40rem/48rem/64rem`. Breakpoint tokens are declared but CSS media queries mostly hardcode values. There are zero `@container` queries. Shell/header/content frame have explicit narrow rules; dialogs, drawers, modal, data grid, card/panel, most patterns and AI cards have 640px rules. Calendar grids switch/reduce at 480/760px.
133
+
134
+ Risk areas needing runtime verification: tables/data grids retain wide tabular DOM and rely on overflow/sticky styles rather than an alternate compact representation; calendar timeline/week layouts use absolute placement variables; switchers/menus/search results use fixed min/max widths; mobile nav is CSS only; no test covers long text, narrow containers, touch targets, or overflow. A breakpoint rule is not proof of usable adaptation.
135
+
136
+ ## 10. RTL and localization baseline
137
+
138
+ No `[dir]`, `:dir()`, or `direction` selector was found. There are many physical direction properties: tooltip side/arrow placement, split-button borders/menu origin, toast positions/origins, tabs vertical borders, select chevrons, timeline grid borders/offsets, progress transform origin, and calendar placement use `left`/`right`. Some properties use logical `text-align: start`, but the system is not RTL-safe.
139
+
140
+ There is no locale, date, number, currency, financial, Swedish-expansion, Arabic, bidi, or mixed-direction formatting API. Billing/calendar markup only displays consumer-provided strings; it supplies no `Intl` behavior. Long text is handled selectively by truncation/overflow CSS, not a localization contract.
141
+
142
+ ## 11. Duplicate and overlapping components
143
+
144
+ > Prompt 7 remediation (2026-07-14): modal now delegates to canonical dialog CSS/behavior, workspace switcher uses shared entity-switcher CSS, and the legacy right-drawer path/classes are owned by canonical drawer CSS. Exact package exports preserve all three old paths. Card/panel, table/data-grid, and badge/chip remain intentionally separate because their semantics differ. The empty table stylesheet is now a functional native-table contract. See `docs/component-architecture.md`.
145
+
146
+ | Likely group | Evidence / freeze classification |
147
+ | --- | --- |
148
+ | dialog vs modal | Both ship full backdrop, header/body/footer, size, state, focus styling and 640px rules (`dialog.css`, `modal.css`). Only dialog has `ntCreateDialog`; do not merge/remove before consumers are mapped. |
149
+ | drawer vs right-drawer | Drawer is a behavioral four-side overlay; shell right drawer is CSS-only right-side layout. Both expose right-side panels; preserve both pending semantic decision. |
150
+ | card vs panel | Both are configurable bordered surfaces with header/body/footer, compact/spacious, flat/ghost/raised/elevated, interactive and tone modifiers. Strong duplication. |
151
+ | company-switcher vs workspace-switcher | Near-parallel selectable list/popover structures, compact/wide modifiers, active/current/selected/disabled hooks, headers/search/items/footer. Strong duplication. |
152
+ | menu/dropdown/profile-menu/switchers | Menu and dropdown share item/list/selection patterns; profile/company/workspace are domain-shaped menus. Dropdown is the only generic behavior controller. Do not collapse without preserving markup/class contracts. |
153
+ | table vs data-grid | `table.css` is empty, while data-grid provides all apparent table styles, sticky/selection/sorting hooks. Table is a broken/empty public export and should be classified as non-preservable implementation surface after a deprecation plan. |
154
+ | state patterns | Empty/error/loading states repeat card-like layouts, fixed icons/sizes and 640px rules. Candidate consolidation, but public markup differs. |
155
+
156
+ At least **seven** likely duplicate/overlap groups exist (the six requested groups plus state-pattern duplication).
157
+
158
+ ## 12. Visual consistency problems
159
+
160
+ Visual language is not verifiably consistent. Core, AI, domain and patterns independently restate border widths, focus shadow spreads, fixed sizing, media queries, surface treatments and transitions. Key examples: dialog/command palette use missing `--nt-shadow-2xl`; tooltip uses missing elevated/muted surfaces; AI/calendar/switcher modules use missing accent/background aliases; progress hardcodes white stripe color; shell uses rem breakpoints whereas most modules use 640px. Card/panel/state patterns duplicate elevation and nesting logic. AI has a separate purple token family but lack of a defined accent-background semantic means its treatment can fail. Billing and some state modules lack the reduced-motion coverage common in core.
161
+
162
+ No visual-regression or screenshot test exists, so this is static evidence, not a visual approval.
163
+
164
+ ## 13. Testing and CI coverage
165
+
166
+ `tests/appearance.test.mjs` is the sole test file. Its 37 tests validate preference normalization/resolution, root attributes, SSR fake DOM behavior, cookie parsing, source order, cache failure/invalid values/migration, media listener lifecycle, subscriptions, and absence of network API calls in appearance source. It does not run in a browser and does not test CSS.
167
+
168
+ The CI workflow runs install/test/build/package dry-run then semantic release. There are no unit/integration tests for behavior helpers; no CSS lint/type check beyond TS; no token validator; no a11y, browser, RTL/localization, visual/screenshot, package-size, or package-content assertion (the dry-run is informational only).
169
+
170
+ ## 14. Documented features that do not work
171
+
172
+ 1. README’s `data-nt-accent` and `data-nt-density` setup has no implementation.
173
+ 2. ~~The exported `table.css` and its inclusion in `components.css` yielded no table CSS.~~ Prompt 7 implemented a native read-only table contract while preserving the path; interactive data-grid behavior remains separate.
174
+ 3. README direct paths to `node_modules/@neetechs/ui/src/index.css` bypass `exports` and are unsuitable for export-enforcing tooling.
175
+ 4. The public runtime version (`0.0.1`) disagrees with package version (`0.0.2`).
176
+ 5. Documentation describes generic theme setup including high contrast, but stored appearance values and controller resolution do not support high contrast.
177
+ 6. `docs/accessibility.md`, `docs/component-guidelines.md`, and `docs/migration.md` are published zero-byte files.
178
+
179
+ ## 15. Potential breaking-change risks
180
+
181
+ - Changing/renaming any `@neetechs/ui/*` export, including glob-derived component CSS, breaks direct imports.
182
+ - Renaming `.nt-*` BEM classes/modifiers or `[data-state|side|align]` values breaks consumer HTML and CSS overrides.
183
+ - Defining currently undefined tokens changes currently-invalid declarations and may override consumer-provided values; use an alias/deprecation layer first.
184
+ - Changing cookie/cache names or source ordering changes anti-flash/SSR behavior across applications.
185
+ - Altering dialog/drawer/dropdown defaults, ARIA mutations, focus restoration, `hidden`, scroll locking or event behavior breaks integrations.
186
+ - Replacing physical placement or responsive behavior may alter absolute-positioned calendars/tooltips/toasts.
187
+ - Removing duplicate modules, even table, requires an export deprecation because all are public/published.
188
+
189
+ ## 16. Safe-to-change internal implementation details
190
+
191
+ Subject to behavior-preserving tests: TypeScript private closure layout; generated numeric ID format; focus/overlay listener bookkeeping; build asset-copy implementation; comments; duplicate `dist` CSS copies; internal theme raw-value organization; CSS declaration ordering that does not affect cascade; and unpublished archive/root artifact handling. The zero-byte table implementation itself is not a useful contract, but its import path must remain temporarily (for example via a compatibility file).
192
+
193
+ ## 17. Public API freeze for the upcoming refactor
194
+
195
+ Preserve temporarily: all 89 paths in section 3; all `.nt-*` selectors and current modifiers; `data-nt-theme`, `data-nt-theme-preference`, `data-state`, `data-side`, `data-align`, `data-disabled`; CSS custom properties used as consumer inputs; appearance exports/options/types; `nt_theme`, `nt_theme_preference`, and four legacy cache keys; and all behavior factory/controller methods and DOM effects.
196
+
197
+ Historical Prompt 1 classification was: the empty table implementation, direct `src/index.css` documentation path, undocumented generated IDs, nonfunctional accent/density, missing-token aliases, and duplicate components. Prompts 2-7 have implemented the token/appearance/table contracts and placed duplicates behind tested compatibility layers; removal still requires the documented migration window.
198
+
199
+ ## 18. Recommended migration order
200
+
201
+ 1. Add automated contract snapshots for exports, selectors, tokens and package contents—without changing production CSS.
202
+ 2. Decide and publish the compatibility policy for table, direct-source imports, duplicate overlay/surface modules and accent/density.
203
+ 3. Create a token manifest; define every missing semantic token across all themes or introduce explicit compatibility aliases, then add token validation.
204
+ 4. Make appearance API/CSS coherent (high contrast, accents, density, forced colors/contrast) with SSR/browser tests.
205
+ 5. Add behavior, accessibility and browser tests before altering interactive components.
206
+ 6. Repair responsive/RTL/localization foundations using logical properties and component runtime fixtures.
207
+ 7. Consolidate duplicate implementations behind preserved public classes/exports, then deprecate in a major-version migration.
208
+ 8. Add visual regression and package-content gates before release.
209
+
210
+ ## 19. Commands executed and results
211
+
212
+ | Command | Result |
213
+ | --- | --- |
214
+ | repository instruction reads; tracked-file/source/doc/workflow searches; static token/selector/media/RTL scans | Completed read-only. No nested instruction file beyond `CLAUDE.local.md`; root `CLAUDE.md`, `AGENTS.md`, and `CONTRIBUTING.md` absent. |
215
+ | `npm ci` | Passed: 303 packages added, 447 audited, 0 vulnerabilities. |
216
+ | `npm test` | Initial sandbox attempt failed `spawn EPERM`; rerun outside sandbox passed: build plus **37/37** appearance tests. |
217
+ | `npm run build` | Passed (`tsc` plus asset copy). |
218
+ | `npm pack --dry-run` | Initial sandbox attempt failed cache `EPERM`; rerun outside sandbox passed: 257 files, 99.4 kB package, 1.0 MB unpacked. |
219
+
220
+ ## 20. Uncertainties and items requiring runtime verification
221
+
222
+ - No real browser, assistive technology, visual, touch, narrow-width, forced-colors, RTL, Arabic, Swedish, or long-content execution was performed; static CSS cannot establish usability or contrast.
223
+ - Consumer applications may rely on undocumented selectors, missing custom properties, direct `src` paths, and duplicate components; repository-only audit cannot enumerate them.
224
+ - CSS `@import` resolution and tree-shaking behavior vary by consumer bundler and must be tested from a packed tarball in representative Angular/React/plain-CSS fixtures.
225
+ - Theme cookie domain/security attributes are backend-owned and cannot be verified here.
226
+ - The root archive/worktree `.zip` → `src.zip` state appears pre-existing and was not opened beyond manifest listing; confirm whether it belongs in the repository before changing artifact policy.