@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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAC;AAE7D,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1D,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,QAAQ,GACR,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,MAAM,WAAW,GACnB,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAEf,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEzD,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GA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ingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/sync-version.mjs from package.json. Do not edit.
2
+ export const NEETECHS_UI_VERSION = '0.1.0';
3
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC"}
@@ -0,0 +1,192 @@
1
+ # Neetechs UI upgrade plan
2
+
3
+ Single progress tracker for the 8-stage `@neetechs/ui` upgrade. Site chrome
4
+ (Header, Navbar, Account dropdown, Mobile navigation, Footer) is part of
5
+ Stages 4–6 below; there is no separate plan.
6
+
7
+ **Current stage:** 8: 0.1.0 published to npm on 2026-11-15 (local `npm publish` by the owner account, tagged `v0.1.0`); consumer migrations can start.
8
+
9
+ ## Billing-referenced design upgrade (2026-11-15)
10
+
11
+ Neetechs_Billing (Angular, consuming 0.0.4) was audited as the visual quality
12
+ reference: global styles, `billing-shell`, `_billing-page-theme`,
13
+ `_billing-detail-theme`, dashboard, invoice detail, stat/action/page-header
14
+ cards, overlays, right drawer, desktop/mobile header, and status badges.
15
+ Billing was not modified. Its reusable patterns were rebuilt on semantic
16
+ tokens; nothing was copied verbatim.
17
+
18
+ ### Comparison
19
+
20
+ | Area | Billing | Design System before | Result |
21
+ |---|---|---|---|
22
+ | KPI / stat cards | Compact cards, sentence-case labels, large tabular values, short tone bar, tinted exceptional states, skeleton loading, featured full-width card | Only `.nt-billing-metric` (finance-only, small value, no tone bar, no loading contract) | **Added** `.nt-stat` + intrinsic `.nt-stat-grid`; enhanced `.nt-billing-metric` |
23
+ | Detail fields, totals | `dl` grids with muted labels, inline totals with dividers, boxed grand total, breakdown tiles | `.nt-billing-amount-list` only | **Added** `.nt-description-list`; enhanced amount list (`--divided`, `--grand`) |
24
+ | Recent items / health list | Bordered rows with title + meta + end-aligned amount, status dot, calm hover | Tables, data grid, notification center only | **Added** `.nt-record-list` |
25
+ | Action bar (document header) | Eyebrow, title, inline status, contextual actions on a surface | `.nt-page-header` (no surface or status slot) | **Enhanced** `--surface`, `--compact`, `__title-row`, `__status` |
26
+ | Filter toolbar | Bordered surface, auto-fit field grid, actions aligned to fields | `.nt-page-toolbar` (inline only) | **Enhanced** `--surface`, `__fields`, `__actions` |
27
+ | Sidebar | Collapsible groups with chevrons, icon rail with section dividers, floating panel, off-canvas on mobile, selection-styled active item | Flat sections; rail used `display: none` on labels (accessible names lost); no groups; hidden on mobile | **Enhanced** groups, indicator, rail a11y fix, floating, off-canvas + `ntCreateSidebar` |
28
+ | Skip link | Pill sliding from the top | None | **Added** `.nt-skip-link` |
29
+ | Dialog, drawer, dropdown, tooltip, toast motion | Billing re-implements entry animations locally | Already richer in the DS (open/closed keyframes, swipe toasts, mobile sheets, focus management) | **Kept DS**; Billing should drop its local copies |
30
+ | Inputs, focus halo, tabular numerals, status badges | Local tag-level styles | Already in the DS | **Kept DS**; added generic billing status tones |
31
+
32
+ ### Strongest Billing patterns adopted
33
+ 1. Compact, calm workspace density: radius-xl panels, subtle borders, no heavy shadows.
34
+ 2. One headline figure per card with a tone bar instead of tinting the whole card.
35
+ 3. Sentence-case labels (Billing's own final override dropped uppercase labels).
36
+ 4. Selection-fill active navigation.
37
+ 5. Collapsible navigation groups and an icon rail with dividers.
38
+ 6. Inline status beside the document reference.
39
+ 7. A boxed grand total in totals cards.
40
+ 8. Tabular numerals everywhere amounts appear.
41
+
42
+ ### Motion and microinteractions
43
+ - Sidebar: active indicator grows in (`--nt-duration-normal`, `--nt-ease-emphasized`);
44
+ group height animates through `grid-template-rows` and closed items leave the tab
45
+ order through delayed `visibility`; chevron rotation is direction-aware; rail width
46
+ animates on the shell grid; off-canvas slides in with `--nt-ease-enter` and out
47
+ with `--nt-ease-exit`; the backdrop fades.
48
+ - Buttons: pending state keeps the button width (no layout shift); success and error play one halo pulse.
49
+ - Cards and stats: hover lift, pressed reset, selection ring.
50
+ - Stats: the loading pulse keeps the value footprint.
51
+ - Records: a border-strengthening hover and a chevron nudge toward the reading direction.
52
+ - Skeleton shimmer follows RTL. The skip link slides in.
53
+ - Every new transition and animation is disabled under `prefers-reduced-motion`, and the
54
+ shell honors `data-nt-motion`.
55
+
56
+ ### Intentionally not copied
57
+ | Billing pattern | Reason |
58
+ |---|---|
59
+ | Orange radial-gradient invoice header with a 5rem invoice number | Hardcoded `#f7931a`/rgba; conflicts with the blue default accent and token rules |
60
+ | Tag-level form styling inside `.billing-workspace` (`label`, `input`, `dt`) | The DS styles opt-in classes; global tag rules would leak into consumers |
61
+ | Modal backdrops with literal rgba and blur, z-index literals (40, 1000, 2200) | The DS has semantic backdrop and z-index scales (`docs/layering.md`) |
62
+ | Emoji language menu in `<details>` | Covered by `.nt-dropdown`/`ntCreateMenu` with keyboard support |
63
+ | Go-to-top button, radial-gradient page spinner, light-only `selection-loader` | Low reuse value or hardcoded colors; skeleton and loading-state already cover loading |
64
+ | RUT/ROT tax-reduction card markup | Swedish-tax-specific; generalized as `.nt-stat--wide` + `.nt-description-list--boxed` |
65
+ | Uppercase micro labels | Billing itself moved to sentence case; the DS keeps uppercase only for eyebrows |
66
+ | `::ng-deep`, `!important` overrides, Angular services and routing | Framework code and business logic stay out of the package |
67
+
68
+ ### Tests (2026-11-15, Windows, Node 24, Chromium; local, after `npm ci`)
69
+ | Command | Result |
70
+ |---|---|
71
+ | `npm test` (static contracts, build, `check:docs`, `check:api`, unit) | pass: 124/124 unit (+7 new) |
72
+ | `npx playwright test` | pass: 93/93 (+25 new in `workspace.spec.mjs`, including axe in 3 themes and a stat-grid snapshot); all 4 pre-existing snapshots unchanged |
73
+ | `npm run check:package` | pass: 282.7 kB packed, 381 files, clean consumer install + import |
74
+ | `check:api` baseline update | +127 additions, 0 removals |
75
+ | GitHub Actions on `235e000` (ubuntu) | **failed**: only the new stat-grid snapshot (Linux fallback font wrapped labels at a 1280px viewport; reproduced locally with Verdana) |
76
+ | GitHub Actions on `57ebc72` (ubuntu, full gate incl. Playwright and package check; publish skipped) | pass |
77
+
78
+ ### Unresolved issues
79
+ - Billing still ships local duplicates (`.billing-sidenav`, `.finance-stat-card`,
80
+ `.finance-filter-toolbar`, `.dashboard-record`, `.action-bar`, `.totals-card`, a
81
+ right-drawer animation). Remove them during the Billing migration (Prompt 14);
82
+ Billing was intentionally not modified here.
83
+ - `.nt-mobile-only` sets `display: none` at the utility layer and loses to components
84
+ loaded later (for example `.nt-button`). This predates this work and was left
85
+ unchanged because raising utility specificity affects every consumer; the shell uses
86
+ scoped toggle classes instead.
87
+ - `grid-template-rows`/`grid-template-columns` transitions and `:has()` need current
88
+ evergreen browsers. Older engines fall back to instant state changes and to the
89
+ previous pending-button behavior; nothing breaks.
90
+ - The rail uses `title` for icon-only labels; a positioned flyout tooltip would be
91
+ clipped by the scrolling nav and was not added.
92
+ - The stat-grid snapshot is captured at 1600px so text never wraps under either
93
+ platform's font metrics; it passes on Windows and Linux CI.
94
+ - `src.zip` is still tracked (owner decision, unchanged).
95
+
96
+ ## Release safety
97
+
98
+ - Pushes to `main` run verification only. npm publishing requires the owner to
99
+ run the release workflow manually with `publish: true` (see CONTRIBUTING.md).
100
+ - No consumer has been switched to the unpublished version. Consumer trials run
101
+ in throwaway clones in a temp directory; consumer repos are untouched.
102
+
103
+ ## Stage status
104
+
105
+ | Stage | Status | Evidence |
106
+ |---|---|---|
107
+ | 1. Package audit | done | `docs/design-system-audit.md` |
108
+ | 2. Design tokens | done (verified; no change needed) | 0 undefined tokens, z-index/breakpoint/motion scales, aliases in `tokens/compatibility.css`, `docs/design-token-contract.md`, `docs/layering.md` |
109
+ | 3. Theme system | done | Pre-paint bootstrap (`ntAppearanceBootstrapScript`), `updatePreference(partial)`; dark/light/high-contrast × 5 accents already supported; 140 contrast pairs checked |
110
+ | 4. Components | done | Audit vs. requested catalog: all present except button group and popover → added. **Site chrome:** header brand/nav/account slots, navbar, account dropdown, mobile drawer, footer |
111
+ | 5. Responsive & a11y | done | Header stacking fix, disclosure keyboard contracts, Escape/outside-click/focus-out, focus restore, modal mobile drawer, RTL (logical props + direction-aware arrows), 44px coarse targets, reduced motion, forced colors; `docs/layering.md` |
112
+ | 6. QA, tests, docs | done | +5 unit tests (bootstrap parity across 140 cases), +27 browser tests, `check:docs`, `check:api`, `check:package`; docs: components, site-chrome, layering, migration, CONTRIBUTING, README |
113
+ | 7. Release preparation | done (release candidate 0.1.0) | CHANGELOG, version 0.1.0, `npm pack` contents verified, clean consumer install, API superset of 0.0.4 |
114
+ | 8. Consumer integration | readiness verified; migrations blocked on publish | See "Consumer readiness" |
115
+
116
+ ## Site chrome deliverables (Stages 4–6)
117
+
118
+ | Requirement | Implementation | Verified by |
119
+ |---|---|---|
120
+ | Responsive header & footer on tokens | `shell/header.css` additions, `shell/footer.css` (container queries) | `site-chrome.spec.mjs` 320/375/1280px, LTR+RTL |
121
+ | Desktop / tablet / mobile | Navbar ≥ 64rem, mobile drawer below; account collapses to avatar < 40rem | desktop/mobile tests, viewport-grow test |
122
+ | Dark/light/high contrast, RTL, a11y | Semantic tokens only; logical properties; disclosure pattern | axe in dark, light, high contrast, Arabic RTL with menus open |
123
+ | Configurable logos, nav, account, footer, social | Plain markup slots; no routes/URLs/auth in package | `tests/pages/site-chrome.html` working example |
124
+ | Dropdown positioning, z-index, keyboard, outside click | Header layer, `--nt-z-dropdown` panels, `ntCreateNavbar`/`ntCreateAccountMenu` | elementFromPoint hit tests over cards; keyboard and dismissal tests |
125
+ | Framework independence | Plain DOM controllers with `destroy()`/`refresh()` | `check:architecture`, no framework imports |
126
+ | Preserve existing styling | Additive classes; `.nt-header` layer at zero specificity; existing snapshots unchanged | 41 pre-existing browser tests incl. visual snapshots pass |
127
+
128
+ ## Discovered bugs
129
+
130
+ | Bug | Status |
131
+ |---|---|
132
+ | CI blocked since 0.0.4 by double-escaped regexes in `tests/brand-palette.test.mjs` | fixed (`38b6f31`) |
133
+ | CI would auto-publish to npm on any green push to `main` | fixed (`38b6f31`) |
134
+ | Published 0.0.4 exports `NEETECHS_UI_VERSION = '0.0.2'` | fixed (`38b6f31`) |
135
+ | Arabic heading test false positive when Noto Sans Arabic is installed | fixed (`38b6f31`) |
136
+ | `test-results/` tracked in git | fixed (`38b6f31`) |
137
+ | Standalone header dropdowns could render behind positioned/hovered cards | fixed (`d69d0c9`) |
138
+ | Theme flash before app bundle runs (no pre-paint bootstrap) | fixed (`03abaf4`) |
139
+ | `NtDisclosureController` types had no implementation | fixed (`57ef4a6`) |
140
+ | README samples used non-existent classes | fixed (`d69d0c9`) |
141
+ | Stale `src.zip` (1.5 MB) tracked in git | open (owner decision; not published) |
142
+
143
+ ## Tests executed (2026-11-15, Windows, Node 24.22, Chromium 149)
144
+
145
+ | Command | Result |
146
+ |---|---|
147
+ | `npm test` (7 static contracts, build, `check:docs`, `check:api`, unit) | pass: 117/117 unit |
148
+ | `npx playwright test` | pass: 68/68 |
149
+ | `npm run check:package` | pass: 0.1.0 tarball 258.9 kB, 370 files, clean consumer install + import |
150
+ | `node scripts/check-api.mjs --compare <0.0.4 tarball>` | pass: nothing removed; 83 additions |
151
+ | GitHub Actions on `38b6f31`, `d69d0c9`, `57ef4a6`, `3fca265` (ubuntu, full gate incl. Playwright, publish skipped) | pass; npm still at 0.0.4 |
152
+ | MyAccount trial: `ng build` ×3, `ng test` ×2 | build pass; tests identical 140/161 on 0.0.4 and 0.1.0 |
153
+
154
+ ## Consumer readiness (Stage 8)
155
+
156
+ | App | Current | Bridge tokens identical to 0.1.0 | Trial build with 0.1.0 |
157
+ |---|---|---|---|
158
+ | Neetechs_Myaccount | 0.0.4 | 47 / 47 | `ng build` passes on 0.0.4, on 0.1.0, and on 0.1.0 with the bridge deleted; `ng test` 140/161 on both 0.0.4 and 0.1.0 (identical 21 pre-existing failures) |
159
+ | Neetechs_Apply | 0.0.4 | 50 / 51 (keep `--nt-text-label-xs`) | not run |
160
+ | Neetechs_Billing | 0.0.4 | 50 / 52 (keep label-xs, review selection border) | not run |
161
+ | Neetechs_AI | 0.0.4 | 45 / 49 (4 near-identical deltas) | not run |
162
+ | Neetechs_devices | 0.0.4 | no bridge | not run |
163
+ | Neetechs_Frontend, Neetechs_Accounts | not consumers | — | — |
164
+
165
+ ### MyAccount trial details (throwaway clone of `d7658b0`, packed 0.1.0 tarball)
166
+
167
+ - Initial bundle: 1.04 MB (0.0.4) → 1.06 MB (0.1.0, +18.8 kB raw CSS for new modules
168
+ because the app imports the full stylesheet) → 1.06 MB minus 1.8 kB with the bridge
169
+ deleted. The app's 1.00 MB budget warning pre-exists on 0.0.4.
170
+ - Tests: the same 21 specs fail on 0.0.4 and 0.1.0 (`NullInjectorError: No provider for
171
+ ActivatedRoute` and similar missing test providers in component specs). Not caused by
172
+ `@neetechs/ui`; recorded as a MyAccount migration issue to fix in that repo.
173
+ - Header z-index: MyAccount's last commit hand-fixed an account dropdown z-index; the
174
+ package header layer covers this case once adopted.
175
+
176
+ ### Recorded migration issues
177
+
178
+ | App | Issue | Owner |
179
+ |---|---|---|
180
+ | Neetechs_Myaccount | 21 component specs fail from missing test providers (pre-existing) | MyAccount |
181
+ | Neetechs_Myaccount | Initial bundle budget (1 MB) already exceeded on 0.0.4 | MyAccount |
182
+ | Neetechs_Billing | Local `.site-header` z-index rule duplicates the new package header layer | Billing (remove after upgrade) |
183
+ | Neetechs_AI | Own `useTheme` hook writes `data-nt-theme`; consider the shared controller and `updatePreference` | AI |
184
+
185
+ ## Blockers
186
+
187
+ - None. 0.1.0 was published on 2026-11-15 at the owner's request.
188
+
189
+ ## Next actions
190
+
191
+ 1. Migrate MyAccount (delete the 47-token bridge), then Billing, Apply, AI, devices.
192
+ 2. Owner: decide whether to delete `src.zip`.
@@ -0,0 +1,218 @@
1
+ # Accessibility contract
2
+
3
+ Localization does not weaken this contract. Set correct `lang`/`dir`, provide complete accessible names in the active language, isolate technical values without changing their spoken label, and test visual keyboard order in RTL. Native Arabic screen-reader QA remains an application responsibility; see [localization-and-rtl.md](./localization-and-rtl.md).
4
+
5
+ `@neetechs/ui` targets WCAG 2.2 Level AA as its engineering baseline. This is not a certification: applications must still test their content, routing, framework integration, localization, screen-reader experience, and complete user journeys.
6
+
7
+ The package is CSS-first. CSS classes provide appearance; they cannot repair incorrect HTML. The behavior exports under `@neetechs/ui/behaviors` add only relationships and interactions that require JavaScript. Consumers remain responsible for meaningful labels and product-specific descriptions.
8
+
9
+ ## 1. Baseline requirements
10
+
11
+ - Normal text is at least 4.5:1; large text and meaningful non-text boundaries are at least 3:1.
12
+ - Keyboard focus uses `:focus-visible`, a 2px semantic ring, and a 2px offset. Never remove an outline without a replacement in the same rule.
13
+ - Primary and icon-only controls expose a 44×44px target. Dense contextual controls expose at least 40×40px. Inline text links, browser-native controls, tightly packed data points, and controls whose spacing provides an equivalent compound target are documented exceptions.
14
+ - Native HTML is preferred. Do not replace a `button`, `a`, `input`, `select`, `textarea`, `table`, `fieldset`, or heading with a generic element plus ARIA.
15
+ - Light/dark × orange/blue/green/purple/neutral semantic contrast is enforced by `npm run check:a11y`.
16
+ - High contrast and forced colors layer over light or dark. Reduced motion removes decorative travel/lift and preserves state feedback.
17
+
18
+ ## 2. Native HTML and accessible names
19
+
20
+ Use visible text as the accessible name whenever possible. Icon-only controls require a concise `aria-label` or associated visible label. `title` is supplementary, not the only naming strategy. Images use meaningful `alt`, empty `alt` when decorative, or a nearby text alternative for complex graphics. Decorative SVGs are `aria-hidden="true"`; meaningful SVGs inherit `currentColor` and are named by surrounding content.
21
+
22
+ Labels describe the control, while `aria-describedby` connects helper, constraint, consequence, and error copy. Placeholder text is never the only label. Do not repeat visible text in `aria-label`; that can override better content.
23
+
24
+ ## 3. Component accessibility inventory
25
+
26
+ Prompt 7 consolidation note: modal CSS and `ntCreateModal` now delegate to the canonical dialog implementation; the right-drawer path/classes delegate to canonical logical drawer CSS; company/workspace switchers share one visual source and the menu-popover behavior. These compatibility names do not define separate accessibility contracts. The table export is now a styled native-table contract and remains intentionally separate from the interactive data grid. See [component-architecture.md](./component-architecture.md).
27
+
28
+ Prompt 8 state note: operation state now uses native semantics plus `data-nt-state` where needed; content-region state uses `data-nt-content-state`; legacy `--loading`, `--error`, and `--success` modifiers are styling compatibility hooks. See [states-feedback-and-recovery.md](./states-feedback-and-recovery.md).
29
+
30
+ The inventory covers all 59 shipped UI/domain CSS modules. “Gallery” means the representative Playwright/axe contract gallery; “manual” identifies an application-level check still required.
31
+
32
+ | Component and source | Semantic/name contract | Keyboard and focus | State/feedback contract | Target, modes, coverage and residual risk |
33
+ |---|---|---|---|---|
34
+ | Alert — `src/components/alert/alert.css` | Static notice: section/region; urgent dynamic error: `role=alert`; routine update: `role=status`; heading names region | Actions are native controls; no container tab stop | Severity is text/icon plus color; recovery action is named | Actions 40/44; forced-color border; gallery. Urgency choice remains manual |
35
+ | Avatar — `src/components/avatar/avatar.css` | Decorative avatar has empty alt/hidden initials; informative image has person/org name | Not focusable unless a native link/button wrapper | Presence/status needs text alternative | CurrentColor boundary; manual image-alt review |
36
+ | Badge — `src/components/badge/badge.css` | Text span; status role only for a dynamic update | Not focusable unless interactive variant is a button | Status wording must not rely on hue | Forced-color boundary; semantic contrast; manual copy review |
37
+ | Breadcrumb — `src/components/breadcrumb/breadcrumb.css` | `nav aria-label="Breadcrumb"`, ordered list, current item `aria-current=page` | Native links; visible focus | Current page is not a dead unlabeled link | Inline-link target exception; structure manual |
38
+ | Button — `src/components/button/button.css` | Native `button`; visible text is name; busy keeps original name and uses `aria-busy` | Native Enter/Space; no redundant handlers | Native `disabled`; `aria-disabled` requires activation guard; loading prevents repeat | Primary 44; focus/contrast/motion/forced colors tested |
39
+ | Card — `src/components/card/card.css` | Article/section only with a heading; clickable card uses one real link/button, not nested controls | Only actual actions focus | Selected cards use `aria-selected` only in a selection widget | Reduced lift; selected outline in forced colors; structure manual |
40
+ | Checkbox — `src/components/checkbox/checkbox.css` | Native checkbox inside label; groups use fieldset/legend | Native Space | `checked`, `indeterminate`, `disabled`, required/error on input | 40px row; system-color forced mode; gallery/axe |
41
+ | Chip — `src/components/chip/chip.css` | Static tag is text; removable/choice chip uses native button and named remove action | Native activation; composite owner manages arrows | `aria-pressed`/`aria-selected`; disabled guard | 40px interactive target; composite behavior app-owned |
42
+ | Data grid — `src/components/data-grid/data-grid.css`, `src/behaviors/data-grid.ts` | Prefer semantic table. Opt-in `role=grid` only for 2-D interaction; headers name columns; help describes keys | Roving arrows, Home/End, Ctrl+Home/End, activation callback | `aria-sort`, `aria-selected`, disabled; polite sort live region | Visible focus/selection; browser tested. Editing/resize policy app-specific |
43
+ | Dialog — `src/components/dialog/dialog.css`, `src/behaviors/dialog.ts` | Dialog role/modal state/title and optional description references | Intentional initial focus, Tab trap, Escape if dismissible, restore invoker | Background inert, scroll locked, hidden closed, nested-stack aware | Boundary/focus forced colors; nested browser test; SR manual |
44
+ | Drawer — `src/components/drawer/drawer.css`, `src/behaviors/drawer.ts` | Explicit modal dialog or nonmodal region/navigation | Modal traps/restores; nonmodal follows page order; top overlay owns Escape | Modal background inert; role/modal match declared modality | Reduced travel/forced boundary; nested browser test |
45
+ | Dropdown — `src/components/dropdown/dropdown.css`, `src/behaviors/dropdown.ts` | Trigger button with popup/expanded/controls; content is menu or listbox, not both | Arrow open/navigation, Home/End, typeahead, activation, Escape returns trigger; no Tab trap | Disabled items skipped/blocked; closed content hidden | Items 40px; browser tested. Listbox value sync consumer-owned |
46
+ | Icon button — `src/components/icon-button/icon-button.css` | Native button with required accessible name | Native activation; visible focus | Disabled/loading as button | 44px default, 40px compact; browser measured |
47
+ | Input — `src/components/input/input.css`, `src/behaviors/forms.ts` | Visible label; stable help/error IDs | Native editing and focus | required, invalid, disabled, readonly, busy distinct | 40px minimum; contrast/focus/axe |
48
+ | Menu — `src/components/menu/menu.css`, dropdown behavior | Menu only for application commands; navigation remains nav/links | Up/Down, Home/End, typeahead, activation, Escape; no Tab trap | Disabled items skipped/blocked; checked command roles where needed | 40px; browser tested through dropdown |
49
+ | Modal compatibility - `@neetechs/ui/components/modal.css`, `ntCreateModal` | Deprecated aliases to canonical dialog CSS/behavior; identical naming requirement | Same canonical trap/restore contract | Adapter forces `modal: true`; no second focus manager | Architecture-tested; migrate to dialog before 1.0 |
50
+ | Pagination — `src/components/pagination/pagination.css` | Labelled nav; native links/buttons; current page `aria-current=page` | Native activation/sequence | Disabled previous/next native or non-link text | 40×40; forced selected outline; structure manual |
51
+ | Panel — `src/components/panel/panel.css` | Section/aside only when landmark/heading is useful | Actions only | Loading may set `aria-busy` on panel | Semantic boundary; structure manual |
52
+ | Progress — `src/components/progress/progress.css` | Native progress or named progressbar with value/min/max; indeterminate has status text | Not focusable | Announce milestones, not every frame | Motion reduced without losing state; cadence manual |
53
+ | Radio — `src/components/radio/radio.css` | Native radios in fieldset/legend | Native arrows/Space | checked/disabled/required/error on input | 40px row; forced colors; gallery/axe |
54
+ | Segmented control — `src/components/segmented-control/segmented-control.css` | Radio group for exclusive value or toolbar of buttons for commands; label group | Native radios or documented roving behavior | checked/pressed/disabled explicit | Focus/selected distinct; role choice manual |
55
+ | Select — `src/components/select/select.css` | Native label + select unless complete combobox implemented | Native browser behavior | disabled/required/invalid; native select has no readonly | 40px; contrast/focus/axe |
56
+ | Skeleton — `src/components/skeleton/skeleton.css` | Decorative skeleton hidden; containing region busy with readable status | Not focusable | Real content replaces skeleton; no repeated announcements | Animation suppressed; gallery loading pattern |
57
+ | Split button — `src/components/split-button/split-button.css` | Two named native buttons: action and disclosure | Native action; disclosure follows menu contract | Disabled/loading coherent across both | 40/44 by action; composition manual |
58
+ | Switch — `src/components/switch/switch.css` | Prefer native checkbox; custom switch requires checked state and label | Native Space | checked/disabled; no mixed state | 40px row; forced colors; gallery/axe |
59
+ | Table — `src/components/table/table.css` | Native table/caption/scope headers; no grid role for display-only data | Standard AT table navigation | Sort buttons inside headers and announce state | Overflow response deferred; markup manual |
60
+ | Tabs — `src/components/tabs/tabs.css`, `src/behaviors/tabs.ts` | tablist/tab/tabpanel with generated controls/labelledby IDs | Orientation arrows, Home/End, one tab stop; automatic/manual declared | selected/disabled/hidden panel synchronized | 40px; focus/forced selection; browser tested |
61
+ | Textarea — `src/components/textarea/textarea.css` | Visible label and descriptions | Native editing | readonly readable/focusable; disabled/invalid distinct | 40px; contrast/focus/axe |
62
+ | Toast — `src/components/toast/toast.css`, `src/behaviors/announcer.ts` | Routine status; urgent error alert; named close | No automatic focus; close keyboard accessible; timed toast pauses hover/focus | Critical content persists; status wording explicit | Gallery semantics; `ntCreateToastController` covers timers, dedupe, stack limit, pause, and cleanup |
63
+ | Tooltip — `src/components/tooltip/tooltip.css` | Tooltip role/stable describedby; never sole essential content | Opens focus/hover; Escape dismissal when behavior exists; no interactive children | Hidden tooltip not exposed | Reduced motion/forced text; lifecycle consumer-owned |
64
+ | AI action button — `src/ai/ai-action-button/ai-action-button.css` | Named native button; name states action, not only “AI” | Native activation | Busy preserves name, blocks repeat, exposes status | 44px; independent AI contrast; reduced motion |
65
+ | AI approval card — `src/ai/ai-approval-card/ai-approval-card.css` | Heading names card; description states intent, target, consequence, reversibility | Native reject/approve; safe action first | Pending/status polite; confirmation/success/failure explicit | Gallery/axe/actions; product copy/workflow manual |
66
+ | AI conversation panel — `src/ai/ai-conversation-panel/ai-conversation-panel.css` | Named region/log; messages identify speaker; streaming status separate | Normal document/controls order | New content polite/batched; do not reread transcript | Streaming behavior app-owned |
67
+ | AI prompt input — `src/ai/ai-prompt-input/ai-prompt-input.css` | Labelled textarea/input; named send/attachment | Native editing; multiline Enter preserved unless policy declared | Busy/error/counter associated without chatter | Controls 40/44; policy manual |
68
+ | AI proposal card — `src/ai/ai-proposal-card/ai-proposal-card.css` | Heading + proposal description; buttons name consequences | Native actions | Approval not inferred from purple; explicit status | Focus/contrast; workflow manual |
69
+ | AI suggestion card — `src/ai/ai-suggestion-card/ai-suggestion-card.css` | List/article with descriptive suggestion action | Native action; owning widget handles arrows if selection composite | Accepted/rejected text plus status | Focus/selection/contrast; list behavior manual |
70
+ | AI tool call — `src/ai/ai-tool-call/ai-tool-call.css` | Human-readable operation/target/status; raw JSON optional detail | Disclosure button for collapsed detail | Running/success/failure at meaningful transitions | Status contrast; descriptions manual |
71
+ | Billing — `src/domain/billing/index.css` | Semantic tables/lists/forms; amounts include currency/sign in text | Native actions/table navigation | Financial sign never color-only; errors use form contract | Financial tokens; localization audit deferred |
72
+ | Companies — `src/domain/companies/index.css` | Named company list/region; logos follow avatar rules; actions are native | Native list actions; switcher menu uses shared behavior | Active company, role, permission, and availability use text/ARIA plus visual state | Focus/target/forced colors; product permissions and names manual |
73
+ | Calendar day slice — `src/domain/calendar/day-slice/day-slice.css` | Named time-grid; events named with title/time | Application declares arrows or normal Tab, not both | Current/selected time text/ARIA, not color only | Focus/forced/reduced; core grid browser tested |
74
+ | Calendar timeline — `src/domain/calendar/day-timeline/day-timeline.css` | Time labels/events expose start/end | Event keyboard path documented by app | Current time/category needs non-color text | Drag/resize keyboard alternative app-specific |
75
+ | Calendar event card — `src/domain/calendar/event-card/event-card.css` | Native link/button with event name/time/category | Native activation; menu uses shared behavior | selected/current/cancelled text/ARIA plus visual | 44 primary; compact context exception; copy manual |
76
+ | Calendar month grid — `src/domain/calendar/month-grid/month-grid.css`, calendar behavior | Grid rows/cells; full date spoken label; today current date | ±1/±7 arrows, Home/End, one tab stop | selection state; range polite live region | 44px behavior hook; browser tested |
77
+ | Calendar week grid — `src/domain/calendar/week-grid/week-grid.css`, calendar behavior | Named grid/time-grid and full event names | Declared grid or event Tab model | current/selected not color-only | Focus/forced; complex navigation manual |
78
+ | Command palette — `src/patterns/command-palette/command-palette.css` | Modal dialog with labelled combobox/listbox | Input arrows/Home/End/Enter/Escape; modal trap/restore | Loading/empty readable; active descendant when input retains focus | Complete combobox controller is a known limitation |
79
+ | Company switcher — `src/patterns/company-switcher/company-switcher.css` | Disclosure + menu/listbox chosen by command vs value | Shared dropdown keyboard | Selected company/unavailable explicit | 40px/shared browser behavior; content manual |
80
+ | Content state — `src/patterns/content-state/content-state.css` | Heading/description/native recovery; urgency chosen by context | Native action; no automatic focus unless recovering from failed submission | `data-nt-content-state` differentiates loading, empty, error, offline, permission, not-found, maintenance, success | Target/focus/contrast/RTL; manual content |
81
+ | Empty state — `src/patterns/empty-state/empty-state.css` | Legacy pattern over content-state guidance; heading/description/native recovery; no alert | Native action | Static absence is not urgent | Compatible; prefer `.nt-content-state` for new work |
82
+ | Error state — `src/patterns/error-state/error-state.css` | Legacy pattern over content-state guidance; heading/recovery/action; alert only dynamically urgent | Native action | Reason/recovery not icon/color only | Compatible; prefer `.nt-content-state` for new work |
83
+ | Loading state — `src/patterns/loading-state/loading-state.css` | Legacy pattern over content-state guidance; named status; affected region busy; skeleton hidden | Do not move/strand focus | Announce start/end or milestones only | Compatible; prefer `.nt-content-state` for new work |
84
+ | Notification center — `src/patterns/notification-center/notification-center.css` | Named region/list; item heading/time/read state | Native actions; optional menu shared | Unread text/ARIA plus color; updates polite | Focus/forced color; update behavior manual |
85
+ | Profile menu — `src/patterns/profile-menu/profile-menu.css` | Trigger + command menu | Shared dropdown menu | Disabled/current account explicit | Shared browser menu; names manual |
86
+ | Search bar — `src/patterns/search-bar/search-bar.css` | Search landmark/form, labelled input, named clear/submit | Native editing/submission; Escape clear only if declared | Loading/results count polite; clear updates value | Focus/targets; results combobox not provided |
87
+ | Workspace switcher - `@neetechs/ui/patterns/workspace-switcher.css` | Disclosure + menu/listbox chosen by purpose; shared entity-switcher CSS | Shared menu-popover behavior | Selected workspace explicit | Shared browser behavior; rich content semantics remain consumer-owned |
88
+ | App shell — `src/shell/app-shell/app-shell.css` | Header/nav/main/aside landmarks, one main, app supplies skip link | Logical DOM order; no positive tabindex | Busy main does not indefinitely inert nav | Global focus/motion; landmarks manual |
89
+ | Content frame — `src/shell/content-frame/content-frame.css` | Main/section with heading hierarchy | Normal order | Loading/error use pattern contracts | Noninteractive; heading audit manual |
90
+ | Header — `src/shell/header/header.css` | Header landmark; labelled nav | Native controls and skip target | Expanded menus reflect state | Focus/target/forced; composition manual |
91
+ | Mobile nav — `src/shell/mobile-nav/mobile-nav.css` | Labelled nav; current link; overlay version uses drawer contract | Native links; modal traps/restores | open/closed and isolation explicit | 40px/reduced motion; responsive redesign deferred |
92
+ | Right-drawer compatibility - `@neetechs/ui/shell/right-drawer.css` | Deprecated classes/path map to canonical logical drawer; declare modal/nonmodal role | Shared drawer contract | Same modality/state rules | Migrate to inline-end drawer; nested overlay test covers canonical behavior |
93
+ | Sidebar — `src/shell/sidebar/sidebar.css` | Labelled nav/aside; current link | Native links/disclosures | Collapsed items remain named | 40px/focus/forced; responsive deferred |
94
+
95
+ ## 4. Keyboard interaction table
96
+
97
+ | Pattern | Required keys |
98
+ |---|---|
99
+ | Button | Enter and Space through native behavior |
100
+ | Link | Enter through native behavior |
101
+ | Menu | Up/Down, Home/End, typeahead, Enter/Space, Escape; Tab exits rather than traps |
102
+ | Tabs | Left/Right or Up/Down by orientation, Home/End; activation mode declared |
103
+ | Modal dialog | Tab and Shift+Tab stay inside; Escape closes only when dismissal is allowed and only the top overlay |
104
+ | Grid | Arrows; Home/End row bounds; Ctrl+Home/End grid bounds; consumer activation |
105
+ | Calendar | Left/Right one day, Up/Down one week, Home/End week bounds |
106
+ | Native form controls | Browser-native behavior; no duplicate activation handlers |
107
+
108
+ ## 5. Focus management and overlays
109
+
110
+ `ntCreateDialog` and modal `ntCreateDrawer` set role/name/description relationships, unhide before focus, isolate background branches with `inert`, lock scroll with reference counting, trap focus, and restore the connected invoker after inert state is removed. Overlay and focus stacks ensure Escape and Tab affect only the top nested overlay. `destroy()` removes listeners and locks.
111
+
112
+ Initial focus should be the least destructive useful control, a heading/container for long content, or the first invalid field. Destructive confirmation is not the default. Nonmodal drawers use `modal: false` and `role: 'region'` or `'navigation'`; they do not trap or inert. Portaled overlays must keep the active modal/backdrop outside inert branches.
113
+
114
+ ## 6. Forms, validation, and error summaries
115
+
116
+ ```html
117
+ <label id="email-label" for="email">Email <span aria-hidden="true">*</span></label>
118
+ <input id="email" required aria-describedby="email-help email-error" aria-invalid="true">
119
+ <p id="email-help">Use your work address.</p>
120
+ <p id="email-error">Enter a valid email address.</p>
121
+ ```
122
+
123
+ `ntConnectField()` establishes stable IDs and relationships but cannot invent labels or recovery copy. Native `required`, `disabled`, and `readonly` remain authoritative where supported. Read-only fields remain readable/selectable and may stay focusable; disabled controls do not activate and ordinarily leave the Tab sequence.
124
+
125
+ An error summary is a named region with heading and links to invalid fields. Reveal it, then call `ntFocusErrorSummary()`. Avoid combining focus movement with assertive announcement unless interruption is required. Password reveal controls name the action and state; clear buttons name the field; counters announce thresholds, not every keystroke.
126
+
127
+ ## 7. Feedback, loading, and live regions
128
+
129
+ - Routine success/update: `role=status`, `aria-live=polite`.
130
+ - Immediate actionable failure: `role=alert`; not for static empty states.
131
+ - Long operation: `aria-busy=true` on the affected region plus concise status text; batch progress.
132
+ - Toasts never take focus automatically. Timed toasts pause while hovered/focused; critical content persists elsewhere.
133
+ - Skeleton geometry is hidden from AT; a readable sibling communicates loading.
134
+
135
+ Use `ntCreateAnnouncer()` for application messages and destroy it at teardown. `ntConfigureToastSemantics()` selects polite or assertive semantics intentionally. Use `ntCreateToastController()` when the package-owned DOM controls toast timers, dedupe, stack limits, pause-on-hover/focus, and cleanup.
136
+
137
+ ## 8. Disabled, read-only, selected, and loading
138
+
139
+ Disabled means unavailable/noninteractive; prefer native disabled. `aria-disabled=true` does not block events, so behavior must guard activation. Read-only means readable but not editable and must not look identical to disabled. Selected uses the owning pattern's selected/checked/pressed/current state and a boundary that survives forced colors. Focus remains distinct. Loading/pending is not disabled: it preserves the name, exposes busy, prevents repeat activation, and keeps focus stable. `ntCreateAsyncAction()` implements that contract for action controls.
140
+
141
+ ## 9. Contrast and focus tokens
142
+
143
+ Components consume `--nt-focus-ring-width`, `--nt-focus-ring-offset`, `--nt-focus-ring-color`, `--nt-focus-ring-danger`, and `--nt-focus-ring-inverse`. Target roles are `--nt-target-size-primary`, `--nt-target-size-default`, and `--nt-target-size-compact`.
144
+
145
+ `scripts/check-accessibility.mjs` resolves 14 semantic pairs across light/dark and five accents (140 measurements). It enforces 4.5:1 text, 3:1 focus/control boundaries, rejects unsafe outline removal, and requires forced-colors/reduced-motion layers. It tests semantic contracts instead of brittle full CSS snapshots.
146
+
147
+ ## 10. High contrast and forced colors
148
+
149
+ Manual high contrast strengthens boundaries and disables shadow-only elevation. In forced colors, controls retain system boundaries, links use `LinkText`, selection/current state gains a `Highlight` outline, and icons inherit `currentColor`. `forced-color-adjust: none` is not used. Custom checkbox/radio/switch visuals preserve the native input and system state.
150
+
151
+ ## 11. Reduced motion
152
+
153
+ The central layer and component rules remove decorative lift, scale, spinner, long drawer/dialog travel, and smooth scrolling under system or manual reduced motion. Short color/state changes may remain. Loading retains text/busy feedback when animation stops.
154
+
155
+ ## 12. Data-grid guidance
156
+
157
+ Use a semantic table for read-only data. Use `ntCreateDataGrid()` only for spreadsheet-like 2-D navigation. It supplies roving focus, bounds navigation, selection callbacks, and sort announcements; applications define editing, selection model, virtualization, resize increments, and undo. Resize handles are named focusable controls with arrow increments and final announcements.
158
+
159
+ ## 13. Calendar guidance
160
+
161
+ `ntCreateCalendarGrid()` supplies one-tab-stop date navigation and range announcements. Dates/events need full spoken labels including date and time. Today is `aria-current=date`; selection is `aria-selected`; they are visually distinct. Category/availability/conflict needs non-color alternatives. Drag/drop and resize need host keyboard alternatives.
162
+
163
+ ## 14. AI approval guidance
164
+
165
+ Approval states what Neenee will do, which record/system changes, reversibility, confirmation requirement, and pending/success/failure result. Actions name consequences, such as “Approve and create event”. Safe/reject/review precedes destructive approval absent a documented reason. Purple identifies AI origin; status semantics describe consequences.
166
+
167
+ ## 15. Correct and incorrect patterns
168
+
169
+ Correct:
170
+
171
+ ```html
172
+ <button class="nt-icon-button" aria-label="Close invoice details">…</button>
173
+ <button aria-expanded="false" aria-controls="account-menu">Account menu</button>
174
+ ```
175
+
176
+ Incorrect:
177
+
178
+ ```html
179
+ <div class="nt-button" onclick="save()">Save</div>
180
+ <button class="nt-icon-button" title="Close">…</button>
181
+ <input placeholder="Email">
182
+ ```
183
+
184
+ Do not add conflicting ARIA, positive tabindex, native-activation duplicates, alert roles on every error-looking block, or raw tool JSON as the only AI description.
185
+
186
+ ## 16. Testing commands
187
+
188
+ ```bash
189
+ npm run check:tokens
190
+ npm run check:a11y
191
+ npm test
192
+ npm run test:browser
193
+ npm run build
194
+ npm pack --dry-run
195
+ ```
196
+
197
+ Browser tests use Chromium, Playwright and `@axe-core/playwright`. Automation does not replace keyboard, zoom/reflow, forced-colors, speech input, switch control, or screen-reader tests.
198
+
199
+ ## 17. Manual test checklist
200
+
201
+ - Traverse journeys with Tab/Shift+Tab and pattern keys; verify focus/order.
202
+ - Test modal nesting, containment, Escape ownership, restoration and isolation.
203
+ - Test NVDA + Firefox/Chrome and VoiceOver + Safari for name/role/value/description/live timing.
204
+ - Test 200% zoom and 400% reflow, text spacing, long Swedish labels, Arabic/mixed direction (RTL fixes deferred).
205
+ - Test Windows High Contrast/forced colors; verify selection, error, icons and focus without background hue.
206
+ - Test reduced motion, grid/calendar operations, form recovery, offline/error/loading and AI consequences.
207
+ - Verify every image/icon, dynamic ID reference and composed application example.
208
+
209
+ ## 18. Known limitations
210
+
211
+ - Formal screen-reader interoperability and mobile gestures require manual application testing.
212
+ - No complete combobox/command-palette controller is shipped; use a conforming implementation or native select.
213
+ - Data-grid editing/resizing/virtualization remain application-specific; shared behavior covers navigation/selection/sort.
214
+ - Calendar drag/resize/collision/time-grid navigation require host keyboard alternatives.
215
+ - Tooltip lifecycle remains consumer-owned; toast timeout pause has a shared controller.
216
+ - Responsive adaptation preserves accessibility invariants: content hidden by adaptive modes uses `display: none` (never focusable-but-invisible), table/record-list alternatives render one at a time, scrollable table regions carry `tabindex="0"` and an accessible name, coarse pointers expand compact controls to the documented target sizes, and hover-revealed actions stay visible on touch and keyboard (`.nt-hover-reveal` contract). See [responsive-and-adaptive-design.md](./responsive-and-adaptive-design.md).
217
+ - State recovery still requires application-owned backend/router behavior; final product copy follows [content-and-terminology.md](./content-and-terminology.md).
218
+ - Axe and semantic checks cover representative contracts, not every consumer content/color/image combination.
@@ -0,0 +1,150 @@
1
+ # Appearance and theming
2
+
3
+ `@neetechs/ui/appearance` is the framework-neutral appearance authority for Neetechs applications. MyAccount/the shared backend owns permanent preferences. The package resolves, applies, observes, and caches those values; it does not call an API or make browser storage authoritative.
4
+
5
+ ## Preference and resolved contracts
6
+
7
+ ```ts
8
+ type NtThemePreference = 'system' | 'light' | 'dark';
9
+ type NtResolvedTheme = 'light' | 'dark';
10
+ type NtAccentPreference = 'orange' | 'blue' | 'green' | 'purple' | 'neutral';
11
+ type NtDensityPreference = 'compact' | 'comfortable' | 'spacious';
12
+
13
+ interface NtAppearancePreference {
14
+ theme: NtThemePreference;
15
+ accent: NtAccentPreference;
16
+ density: NtDensityPreference;
17
+ reduceMotion?: boolean | 'system';
18
+ highContrast?: boolean | 'system';
19
+ }
20
+ ```
21
+
22
+ `system` color theme resolves from `prefers-color-scheme`. High contrast is a separate accessibility dimension layered on the resolved light/dark theme. Motion and contrast resolve to `full|reduced` and `normal|high`. Forced colors always activates the high-contrast layer, even when the manual contrast preference is false.
23
+
24
+ Safe defaults are `system`, `blue`, `comfortable`, system motion, and system contrast. Without browser globals, system color falls back to dark (the package `:root` foundation), motion to full, and contrast to normal.
25
+
26
+ ## Public DOM contract
27
+
28
+ The controller owns these public attributes on `document.documentElement`:
29
+
30
+ ```html
31
+ <html
32
+ data-nt-theme="dark"
33
+ data-nt-theme-preference="system"
34
+ data-nt-accent="blue"
35
+ data-nt-density="comfortable"
36
+ data-nt-contrast="normal"
37
+ data-nt-motion="full"
38
+ >
39
+ ```
40
+
41
+ Applications must not set competing attributes on `body` or app roots. `data-nt-theme="high-contrast"` remains a deprecated CSS compatibility selector only; controllers never emit it.
42
+
43
+ ## Resolution and startup precedence
44
+
45
+ 1. `serverPreference`, when SSR/backend settings are already available.
46
+ 2. Valid `nt_theme` bootstrap cookie.
47
+ 3. Valid `nt_appearance_preference` local cache; legacy `nt_theme_preference` expands with safe defaults.
48
+ 4. Safe defaults plus operating-system media preferences.
49
+ 5. An authenticated backend result applied with `applyResolvedPreference`; this refreshes the startup cache.
50
+
51
+ Cookie and cache values prevent a flash and are never permanent truth. Applications must route permanent changes through MyAccount/the shared backend, then apply the returned preference.
52
+
53
+ ```ts
54
+ import {
55
+ bootstrapNeetechsAppearance,
56
+ createAppearanceController,
57
+ type NtAppearancePreference,
58
+ } from '@neetechs/ui/appearance';
59
+
60
+ bootstrapNeetechsAppearance();
61
+ const appearance = createAppearanceController();
62
+ appearance.initialize();
63
+
64
+ const backendPreference: NtAppearancePreference = await loadAccountPreference();
65
+ appearance.applyResolvedPreference(backendPreference, { source: 'backend' });
66
+
67
+ const unsubscribe = appearance.subscribe(state => {
68
+ console.log(state.resolved.theme, state.resolved.contrast);
69
+ });
70
+ unsubscribe();
71
+ appearance.destroy();
72
+ ```
73
+
74
+ ### Pre-paint bootstrap (no theme flash)
75
+
76
+ `bootstrapNeetechsAppearance()` runs when the application bundle executes,
77
+ which on client-rendered pages can be after first paint. For flash-free
78
+ startup, inline the self-contained bootstrap in `<head>` before stylesheets:
79
+
80
+ ```ts
81
+ import { ntAppearanceBootstrapScript } from '@neetechs/ui/appearance';
82
+
83
+ // Server or build step: inject into <head>. Under a strict CSP add a nonce/hash.
84
+ const inline = `<script>${ntAppearanceBootstrapScript({ fallbackResolved: 'dark' })}</script>`;
85
+ ```
86
+
87
+ It applies cookie → local cache → system defaults exactly like
88
+ `initialize()` (unit-tested against it across cookie/cache/media matrices),
89
+ never writes storage, and is wrapped in `try/catch`. The controller remains
90
+ the single owner of state once the app starts.
91
+
92
+ ### Partial updates
93
+
94
+ `setPreference` takes a complete preference. To change one dimension,
95
+ for example from a light/dark toggle, use `updatePreference`, which merges onto
96
+ the current preference so saved accent, density, motion, and contrast choices
97
+ are never reset:
98
+
99
+ ```ts
100
+ appearance.updatePreference({ theme: 'light' });
101
+ appearance.updatePreference({ accent: 'green' });
102
+ ```
103
+
104
+ Initialization is idempotent. `destroy()` removes color-scheme, motion, contrast, and forced-color listeners and subscribers. Invalid complete preferences are ignored. Storage, cookies, media queries, and DOM globals are injectable and guarded when unavailable.
105
+
106
+ ## Accent semantics
107
+
108
+ Blue is the Neetechs default. Orange remains available for existing preferences; green, purple, and neutral remap primary action, selected surface, link, product focus, and interactive-border roles. Components consume semantic tokens and contain no accent-specific selectors. Status, AI, and financial roles do not follow the accent: green selection is not success, purple selection is not AI origin, and financial positive stays financial positive.
109
+
110
+ The dark theme uses a softer navy surface hierarchy, while the light theme keeps clear neutral surfaces. Both themes keep readable foregrounds and use blue for product actions, lavender/purple for AI, green for success, amber for warnings, and red for danger. See [brand-palette.md](./brand-palette.md) for exact values and usage rules. Existing saved orange preferences continue to work until changed in MyAccount.
111
+
112
+ ## Density semantics
113
+
114
+ Density remaps semantic sizing roles for control heights/padding, rows, cards, panels, navigation, forms, toolbars, and list items. Comfortable preserves the pre-density baseline. Compact common controls remain at least `2rem`; medium controls/navigation rows are `2.25rem`. Spacious increases whitespace without changing typography hierarchy.
115
+
116
+ Local component size variants still describe the use case. Global density changes the measurements behind those roles; it does not remove local variants.
117
+
118
+ ## Contrast, forced colors, and motion
119
+
120
+ `data-nt-contrast="high"` strengthens boundaries and removes shadow-dependent hierarchy for either light or dark. `prefers-contrast: more` supplies system behavior. Forced-colors mode maps semantic roles to system colors; no `forced-color-adjust: none` exception exists.
121
+
122
+ `data-nt-motion="reduced"` shortens semantic durations, removes decorative transforms/travel, and disables decorative AI/slide animations. Essential state and progress feedback remain visible. `prefers-reduced-motion` supplies system behavior unless a manual boolean preference is applied. Component focus, forced-colors, target-size, and semantic contrast contracts are documented in [accessibility.md](./accessibility.md).
123
+
124
+ ## Cookie and cross-subdomain configuration
125
+
126
+ `nt_theme` is the frozen public cookie name. It accepts legacy raw `system|light|dark` values and a compact versioned appearance payload containing presentation data only.
127
+
128
+ ```ts
129
+ const setCookieValue = createAppearanceCookie(preference, {
130
+ domain: '.neetechs.com', // omit in local development
131
+ path: '/',
132
+ sameSite: 'Lax',
133
+ secure: true,
134
+ maxAge: 60 * 60 * 24 * 365,
135
+ });
136
+ ```
137
+
138
+ The package does not hardcode `.neetechs.com`, write authentication data, or depend on a backend route. Production infrastructure may use the result as `Set-Cookie`; local development omits `domain` and usually `secure`.
139
+
140
+ ## SSR and framework integration
141
+
142
+ On the server, pass a validated backend preference as `serverPreference` or a request cookie string and emit the resolved attributes on `<html>`. On the client, bootstrap before Angular startup or React `createRoot`, then initialize one shared controller. Hydration sees the same server hint/cookie and avoids an avoidable mismatch.
143
+
144
+ Angular should provide the controller through an application initializer/injection token; React should place one controller in context and subscribe through an external-store hook. The package intentionally ships no framework dependency.
145
+
146
+ ## Compatibility and unsupported patterns
147
+
148
+ `bootstrapNeetechsTheme`, `createThemeController`, `applyThemeToDocument`, `ThemePreference`, `ResolvedThemeState`, `nt_theme_preference`, and raw theme cookie values remain compatible. The theme controller is deprecated for new integrations because it exposes only the color-theme view while applying safe defaults for other dimensions.
149
+
150
+ Unsupported: per-app permanent stores, writing resolved light/dark over `system`, application-specific theme controllers, component accent selectors, high contrast as a fourth ordinary theme, sensitive cookie fields, and direct root-attribute mutation after the shared controller initializes.