@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,36 @@
1
+ # Neetechs brand palette — softer navy
2
+
3
+ This document defines the default visual language in `@neetechs/ui`. It is a color-token refresh, not a replacement for the shared appearance controller. Applications consume the library’s semantic `--nt-*` tokens instead of copying these hexadecimal values.
4
+
5
+ ## Default dark theme
6
+
7
+ | Role | Token | Value |
8
+ | --- | --- | --- |
9
+ | Page canvas | `--nt-bg-app` | `#202d42` |
10
+ | Sidebar | `--nt-bg-sidebar` | `#182337` |
11
+ | Card surface | `--nt-bg-surface` | `#34445d` |
12
+ | Raised panel / overlay | `--nt-bg-surface-raised` | `#445772` |
13
+ | Blue product action | `--nt-accent` | `#528ef5` |
14
+ | AI decorative lavender | `--nt-color-ai-lavender` | `#a78bfa` |
15
+ | Readable AI text | `--nt-ai-fg` | `#ddd6fe` |
16
+ | Primary text | `--nt-text-primary` | `#f8fafc` |
17
+ | Secondary text | `--nt-text-secondary` | `#d8e3f0` |
18
+
19
+ `--nt-color-brand-blue` and `--nt-color-ai-lavender` are primitive palette identifiers. Components should consume their semantic roles instead. Light mode retains its existing airy neutral backgrounds, with an accessible blue primary action.
20
+
21
+ ## Meaning
22
+
23
+ - Blue: primary buttons, selected navigation, links, focus, and application progress. Never use blue alone to mean an action succeeded.
24
+ - Lavender/purple: explicitly AI-related origin, suggestion, or processing states. Use readable `--nt-ai-fg` for text on raised surfaces, rather than the decorative lavender swatch.
25
+ - Green: success and completed tasks.
26
+ - Yellow/amber: warning, paused, or attention needed.
27
+ - Red: errors, destructive actions, and blocked operations.
28
+ - Neutral text and surfaces: most content. Avoid decorative glows and a rainbow of per-feature accents.
29
+
30
+ ## Preferences and rollout
31
+
32
+ The default appearance preference is `{ theme: 'system', accent: 'blue', density: 'comfortable', reduceMotion: 'system', highContrast: 'system' }`. The resolved dark theme uses the new navy surfaces; `system` still honors OS light/dark, and the light theme remains available. High contrast and reduced motion stay independent.
33
+
34
+ The existing `orange`, `green`, `purple`, and `neutral` accent options remain supported. **Saved backend or cookie preferences outrank new defaults** and are not silently reset. Consumers must update their `@neetechs/ui` dependency to use this palette; apps with hard-coded colors or separate CSS themes will not automatically adopt it.
35
+
36
+ Use semantic tokens and the shared appearance controller. Validate readability on the raised surface as well as the canvas; the brand blue uses a dark foreground for action-button text.
@@ -0,0 +1,137 @@
1
+ # Component architecture and consolidation contract
2
+
3
+ This document defines the Prompt 7 ownership model. It preserves public package paths and class names while preventing deprecated implementations from becoming independent again.
4
+
5
+ ## Layer model
6
+
7
+ ```text
8
+ Tokens
9
+ -> visual primitives
10
+ -> accessible behavioral primitives
11
+ -> public components
12
+ -> product patterns
13
+ -> domain compositions
14
+ ```
15
+
16
+ - Tokens own appearance decisions. Components do not fork theme, accent, density, focus, motion, or direction logic.
17
+ - Behavioral primitives in `src/behaviors` own focus, overlay, keyboard, ID, and announcement mechanics.
18
+ - Components define one semantic interaction concept. Patterns compose components for a product purpose. Domain modules add business meaning without reimplementing component mechanics.
19
+ - Compatibility selectors and exports delegate to a canonical source. They are not extension points for new features.
20
+
21
+ ## Consolidation decision table
22
+
23
+ | Old family | Outcome | Canonical architecture | Compatibility and future plan |
24
+ | --- | --- | --- | --- |
25
+ | Dialog / modal | A: one canonical component | `src/components/dialog/dialog.css`; `ntCreateDialog` with `modal: true/false` | `@neetechs/ui/components/modal.css`, `.nt-modal*`, `NtModal*`, `ntCreateModal`, and `createModal` remain deprecated aliases. Earliest removal: 1.0 after a documented 0.x migration window. |
26
+ | Drawer / right drawer | C: canonical variant | `src/components/drawer/drawer.css`; `ntCreateDrawer`; logical `placement` | `@neetechs/ui/shell/right-drawer.css` and `.nt-right-drawer*` map to the canonical drawer source. Migrate markup to `.nt-drawer.nt-drawer--inline-end`; physical `side` is deprecated in favor of `placement`. Earliest removal: 1.0. |
27
+ | Card / panel | B: shared platform primitives, distinct components | Card is an entity/artifact surface; panel is a structural page region. Both consume the same surface, radius, elevation, spacing, density, and state tokens. | Both imports and class families stay supported. Do not add selection semantics to panel merely to match card. |
28
+ | Menu / dropdown / profile menu | B: shared behavior, distinct patterns | `ntCreateMenuPopover` owns overlay, roving focus, typeahead, Escape, outside click, focus return, and cleanup. `ntCreateMenu` fixes menu semantics; `ntCreateDropdown` delegates for compatibility. Profile menu remains a product pattern. | CSS classes/imports remain. New behavior belongs in the canonical controller, never a pattern-specific listener stack. |
29
+ | Company / workspace switcher | B: one visual foundation, distinct product patterns | `src/patterns/company-switcher/company-switcher.css` styles both public class families; both use the canonical menu/listbox controller according to purpose. | `@neetechs/ui/patterns/workspace-switcher.css` resolves to the canonical source. Both class families remain supported; no planned removal before 1.0 and consumer usage review. |
30
+ | Table / data grid | D: keep separate | `table.css` styles native read-only tables. `data-grid.css` plus `ntCreateDataGrid` is opt-in two-dimensional interaction. | The formerly empty table export is now implemented. Neither API is deprecated. Do not add `role=grid` to ordinary tables. |
31
+ | Badge / chip / tag / status | D with shared tokens | Badge is informational metadata/status. Chip may be interactive/removable/selected. “Pill” is a shape modifier, not a component. No standalone tag or status-indicator export exists. | Badge and chip remain. New aliases that differ only by radius are forbidden. Status must include text/icon meaning, not color alone. |
32
+ | Tabs / segmented control / navigation | D: keep separate | Tabs switch panels; segmented control chooses a value or command; sidebar/mobile nav perform navigation. | Visual selection tokens are shared, but semantics and keyboard contracts remain separate. |
33
+ | Empty / error / loading states | B: shared content-state primitive, distinct legacy patterns | `src/patterns/content-state/content-state.css` defines the canonical content-state architecture for loading, empty, error, offline, permission, not-found, maintenance, and success presentations. | Existing `empty-state`, `error-state`, and `loading-state` classes remain compatible public patterns. New work should compose `.nt-content-state` rather than creating another one-off state surface. |
34
+
35
+ No application source was available in this repository. External-usage evidence is therefore limited to public exports, README examples, docs, tests, and the previously published package shape. Lack of an in-repo reference is not proof that a public API is unused.
36
+
37
+ ## Canonical overlays
38
+
39
+ `ntCreateDialog` is the only dialog implementation. Modal dialogs trap focus, make background branches inert, lock scroll by default, and restore the invoker. Nonmodal dialogs retain dialog semantics but do not trap focus or apply `aria-modal`. `ntCreateModal` is a thin modal-mode adapter.
40
+
41
+ `ntCreateDrawer` shares the overlay and focus foundations while adding placement and modal/nonmodal region semantics. New code uses `placement: 'inline-start' | 'inline-end'`; `side` and physical left/right classes are compatibility inputs. Only implemented placements are accepted by the `NtDrawerSide` type.
42
+
43
+ Nested overlays continue to use the shared stack in `src/behaviors/overlay.ts`; component code must not register another document-wide Escape or outside-click implementation.
44
+
45
+ ## Menu and switcher rules
46
+
47
+ - Application commands use menu/menuitem semantics through `ntCreateMenu`.
48
+ - Value selection uses `ntCreateMenuPopover({ pattern: 'listbox' })` and application-owned value synchronization.
49
+ - Navigation links remain a labelled `nav`, not a menu.
50
+ - Rich switchers may contain search, previews, account metadata, and create actions. They retain pattern markup but use the shared overlay/list navigation mechanics.
51
+ - Company and workspace styles share one source. Workspace status dots are the only pattern-specific visual extension in that source.
52
+
53
+ ## Surface rules
54
+
55
+ A card is a bounded content object that can represent an entity/artifact and may be selected or interactive. A panel is a structural region that groups page content and usually is neither selected nor independently elevated. Domain and AI cards keep their business-specific public classes but must consume platform card/surface tokens and must not reimplement overlay or focus behavior.
56
+
57
+ ## Data display rules
58
+
59
+ Use `.nt-table` with native `table`, `caption`, `thead`, `th[scope]`, `tbody`, and `td` for read-only data. Sort controls are real buttons inside headers. Horizontal overflow is a presentation response, not permission to change the role.
60
+
61
+ Use data grid only when the product requires row/cell selection, two-dimensional keyboard navigation, editing, resize, reorder, or comparable grid interaction. The grid controller does not turn arbitrary markup into a fully editable spreadsheet; applications own editing and virtualization policies.
62
+
63
+ ## State and recovery ownership
64
+
65
+ Prompt 8 adds a layered state model on top of this component architecture. State is not a new component layer; it cuts across components and patterns:
66
+
67
+ - Native attributes own native semantics first: `disabled`, `readonly`, `aria-selected`, `aria-expanded`, `aria-current`, `aria-invalid`, and `aria-busy`.
68
+ - `data-nt-state` owns operation state where there is no native equivalent: `idle`, `pending`, `success`, `error`, and `canceled`.
69
+ - `data-nt-content-state` owns content-region state: `loading`, `refreshing`, `empty`, `partial`, `stale`, `error`, `offline`, `unauthenticated`, `forbidden`, `not-found`, `maintenance`, and `success`.
70
+ - Legacy modifier classes such as `--loading`, `--error`, and `--success` are compatibility styling hooks, not the source of behavior truth.
71
+ - `ntCreateAsyncAction`, `ntCreateFormController`, and `ntCreateToastController` are small framework-agnostic behavior primitives. They standardize duplicate prevention, busy exposure, validation summary focus, toast timing, and cleanup without becoming application state management.
72
+
73
+ See [states-feedback-and-recovery.md](./states-feedback-and-recovery.md) for state dimensions, precedence, feedback channel selection, confirmations, unsaved-change contracts, and recovery rules.
74
+
75
+ ## Compatibility matrix
76
+
77
+ | Public contract | Status | Canonical replacement |
78
+ | --- | --- | --- |
79
+ | `@neetechs/ui/components/modal.css` | Deprecated, resolvable | `@neetechs/ui/components/dialog.css` |
80
+ | `.nt-modal*` | Deprecated, styled by dialog CSS | `.nt-dialog*` |
81
+ | `NtModalOptions`, `NtModalController`, `ntCreateModal`, `createModal` | Deprecated adapters | `NtDialogOptions`, `NtDialogController`, `ntCreateDialog` |
82
+ | `@neetechs/ui/shell/right-drawer.css` | Deprecated, resolvable | `@neetechs/ui/components/drawer.css` |
83
+ | `.nt-right-drawer*` | Deprecated compatibility selectors | `.nt-drawer*` with `.nt-drawer--inline-end` |
84
+ | Drawer `side` option and physical sides | Deprecated input, still translated | `placement: 'inline-start' | 'inline-end'` |
85
+ | `@neetechs/ui/patterns/workspace-switcher.css` | Supported compatibility path to shared source | May remain; use `patterns.css` for aggregate import |
86
+ | `.nt-workspace-switcher*` | Supported pattern API | No class migration required |
87
+ | `ntCreateDropdown` | Supported compatibility name over canonical controller | `ntCreateMenu` for command menus or `ntCreateMenuPopover` for explicit menu/listbox use |
88
+ | `createDialog`, `createDrawer` | Supported unprefixed import compatibility | Neetechs-prefixed `ntCreateDialog`, `ntCreateDrawer` remain repository convention |
89
+ | `@neetechs/ui/components/table.css` | Supported and now functional | No replacement; use data grid only for genuine grid interaction |
90
+ | `.nt-empty-state`, `.nt-error-state`, `.nt-loading-state` | Supported legacy content-state patterns | `.nt-content-state` with `data-nt-content-state` |
91
+ | Modifier-only loading/error/success state | Compatible styling hook only | Native/ARIA state plus `data-nt-state` or `data-nt-content-state` |
92
+
93
+ No public export was removed. The three retired source files are intentionally absent; exact package-export entries route their former public paths to canonical files.
94
+
95
+ ## Deprecation policy for 0.x
96
+
97
+ The package is `0.x`, so SemVer permits breaking minor releases, but Neetechs applications still require a controlled window.
98
+
99
+ 1. Deprecate only duplicated, misleading, unsafe, accidental, or superseded contracts.
100
+ 2. Keep a working adapter for at least one documented 0.x minor migration window unless the API was never functional or is unsafe to execute.
101
+ 3. Mark TypeScript APIs with `@deprecated`; document CSS/path deprecations here and in `migration.md`.
102
+ 4. Adapters validate/translate old input and call canonical code. They do not acquire features independently and emit no production console noise.
103
+ 5. Tests must prove old imports resolve and old selectors are emitted from canonical CSS.
104
+ 6. Removal requires release notes, a replacement example, consumer search where repositories are available, and a planned version. Current duplicate compatibility APIs target no earlier than 1.0.
105
+ 7. Accidental unpublished internals may be removed immediately only with package-content evidence. Empty public exports are implemented or explicitly mapped; they are not silently deleted.
106
+
107
+ ## Architecture enforcement
108
+
109
+ `npm run check:architecture` verifies exact compatibility export routing, absence of the three retired copied CSS files, legacy selectors in canonical CSS, thin runtime adapters, and the nonempty table contract. It deliberately does not count ordinary repeated declarations as bugs; identical declarations can express legitimate independent semantics.
110
+
111
+ `npm run check:states` verifies the canonical state helper, content-state CSS import, button async selectors, toast/form behavior helpers, known state names, and state documentation anchors.
112
+
113
+ Run:
114
+
115
+ ```bash
116
+ npm run check:architecture
117
+ npm run check:states
118
+ npm test
119
+ npm run test:browser
120
+ npm run build
121
+ npm pack --dry-run
122
+ ```
123
+
124
+ Packed-tarball consumer verification must resolve the canonical and deprecated runtime/CSS imports. Browser and manual testing remain required for focus, placement, themes, density, forced colors, reduced motion, and visual compatibility.
125
+
126
+ ## Known remaining duplication
127
+
128
+ - Card/panel and product/domain cards repeat structural header/body/footer CSS. Their semantics differ, and deeper visual extraction is deferred until actual composition markup can be tested.
129
+ - Menu, dropdown, profile menu, and command palette retain pattern-specific CSS because popup geometry and rich content differ; behavioral listeners are canonical.
130
+ - Empty/error/loading legacy patterns remain for compatibility; new content-state variants should avoid rebuilding separate CSS unless they add a distinct product pattern.
131
+ - Calendar and data-grid mobile adaptations now exist (agenda list, constrained/record grid modes); remaining physical layout mathematics (event collision, virtualization) stays application-level.
132
+
133
+ ## Adaptive categories and page patterns
134
+
135
+ Every component declares an adaptive category — intrinsic, reflowing, adaptive, or alternative view — defined in [responsive-and-adaptive-design.md](./responsive-and-adaptive-design.md). Reusable components respond to query containers (`.nt-region`, shell content, dialog/drawer bodies), never to the viewport directly; only shell-level layout uses viewport queries from the documented rem scale.
136
+
137
+ Page composition uses the structural patterns in `src/patterns/` — `page.css` (header/toolbar/sections/footer actions), `form-layout.css`, `settings-layout.css`, `master-detail.css`, `workflow.css` — documented in [page-patterns-and-workflows.md](./page-patterns-and-workflows.md). These are layout contracts; they encode no product business logic.
@@ -0,0 +1,64 @@
1
+ # Component authoring guidelines
2
+
3
+ ## Localization and direction
4
+
5
+ Components inherit native `lang` and `dir`; do not add a parallel RTL flag. Use logical properties, pass complete translated strings, isolate unknown content with `<bdi>` or `dir="auto"`, and use `.nt-technical-value` for LTR code/URLs/identifiers inside RTL prose. `.nt-button--wrap` is the opt-in multi-line action contract. Only meaningfully directional arrows receive `.nt-icon--directional`; never mirror an icon subtree globally. See [localization-and-rtl.md](./localization-and-rtl.md).
6
+
7
+ ## Accessibility is part of the public contract
8
+
9
+ Use native HTML first, semantic platform tokens second, and shared behavior only for interaction HTML does not supply. CSS class names do not confer semantics. A `.nt-button` on a `div` is still not a button.
10
+
11
+ Every interactive component definition must state:
12
+
13
+ - native element or required role;
14
+ - accessible name and description source;
15
+ - keyboard keys and activation policy;
16
+ - initial focus, exit, and restoration behavior;
17
+ - disabled, read-only, selected, invalid, and loading behavior;
18
+ - live-region policy;
19
+ - minimum target and reduced-motion/forced-colors behavior;
20
+ - unit, browser, and manual coverage.
21
+
22
+ Use the complete contract in [accessibility.md](./accessibility.md).
23
+
24
+ ## Controls
25
+
26
+ - Buttons and links use native elements. Do not duplicate native Enter/Space handlers.
27
+ - Icon-only buttons require a contextual accessible name.
28
+ - Primary and icon-only controls target 44×44px; dense contextual controls remain at least 40×40px.
29
+ - Preserve the visible label while loading, add `aria-busy`, and prevent duplicate activation. New async behavior uses `data-nt-state="pending"` through `ntCreateAsyncAction()` rather than treating loading as disabled.
30
+ - Native disabled is preferred. When `aria-disabled` is required, guard click and keyboard behavior explicitly.
31
+
32
+ ## Composite widgets
33
+
34
+ Menus, tabs, modal overlays, interactive grids, and calendar grids use the exported framework-neutral helpers. Do not create a competing global Escape listener or focus trap. A semantic table remains a table unless it truly needs two-dimensional interactive navigation. A navigation list is not an application menu.
35
+
36
+ ## Component ownership and composition
37
+
38
+ Use the layer model and decision table in [component-architecture.md](./component-architecture.md). Modal is a dialog mode, not a second behavior. Drawers use logical placement. Menus, dropdowns, profile menus, and switchers share `ntCreateMenuPopover`; product patterns may add rich content but may not fork keyboard, overlay, or cleanup logic. Cards represent objects/artifacts, while panels organize page structure. Badges are informational; removable or selectable chips are interactive.
39
+
40
+ Compatibility selectors and exports are migration-only. Add new behavior and styling to the canonical source, never to a deprecated alias. New component proposals must show that their semantics or interaction differ from an existing component—not merely their radius, color, or product name.
41
+
42
+ ## Forms
43
+
44
+ Visible labels are the default. Stable IDs connect help and errors. Placeholder text, color, icons, and tooltips cannot be the sole instruction. Group related choices with fieldset/legend. Focus a named error-summary region after failed submission and link entries to fields. Use `ntCreateFormController()` for the shared submission lifecycle when a framework does not already provide an equivalent guard.
45
+
46
+ ## States, feedback, and recovery
47
+
48
+ Use the layered state model in [states-feedback-and-recovery.md](./states-feedback-and-recovery.md). Native attributes own availability and validation where they exist; `data-nt-state` owns async operation; `data-nt-content-state` owns loading/empty/error/offline/permission/maintenance content states. Existing modifier classes remain compatibility styling hooks, but new behavior should not invent product-specific loading, error, or pending vocabularies.
49
+
50
+ ## Styling
51
+
52
+ Use semantic foreground/background/border/focus tokens. Never remove outlines. Selection must survive forced colors and differ from focus. Long/decorative motion needs a reduced-motion alternative. Avoid clipping focus rings with overflow; use an inset ring only where geometry requires it.
53
+
54
+ ## Responsive behavior
55
+
56
+ Every component declares its adaptive category (intrinsic, reflowing, adaptive, alternative view) and meets the acceptance checklist in [responsive-and-adaptive-design.md](./responsive-and-adaptive-design.md): container-driven adaptation (viewport queries only at shell level, rem values from the documented scale), no fixed heights around translated text, `100vh` always paired with `100dvh`, no hover-only actions, safe coarse-pointer targets, and DOM order equal to visual order in every mode.
57
+
58
+ ## Page composition and content
59
+
60
+ Page-level structure uses the patterns in [page-patterns-and-workflows.md](./page-patterns-and-workflows.md) (one `<h1>`, one primary action per group, destructive separation). Labels and messages in examples and fixtures follow [content-and-terminology.md](./content-and-terminology.md) and are validated by `npm run check:content`.
61
+
62
+ ## Tests required for a new interactive component
63
+
64
+ Add a representative fixture and test accessible name/role/state, Tab order, pattern keys, focus visibility/restoration, disabled activation, forced colors, reduced motion, and axe. Add required semantic contrast pairs to the checker when introducing a reusable role. Manual screen-reader testing remains part of release review.
@@ -0,0 +1,173 @@
1
+ # Component catalog
2
+
3
+ Every shipped module, its CSS import path, and its optional behavior helper.
4
+ All CSS is included by `@neetechs/ui/styles.css`; per-module paths exist for
5
+ bundle-size optimization. Behaviors are framework-free DOM functions from
6
+ `@neetechs/ui/behaviors` (also re-exported by `@neetechs/ui`).
7
+
8
+ Detailed guides: [site-chrome.md](./site-chrome.md) · [component-guidelines.md](./component-guidelines.md) ·
9
+ [component-architecture.md](./component-architecture.md) · [accessibility.md](./accessibility.md) ·
10
+ [layering.md](./layering.md).
11
+
12
+ ## Actions
13
+
14
+ | Component | Block class | CSS path | Behavior |
15
+ |---|---|---|---|
16
+ | Button | `.nt-button` | `components/button.css` | `ntCreateAsyncAction` (pending state) |
17
+ | Icon button | `.nt-icon-button` | `components/icon-button.css` | — |
18
+ | Button group | `.nt-button-group` | `components/button-group.css` | — (app toggles `aria-pressed`) |
19
+ | Split button | `.nt-split-button` | `components/split-button.css` | `ntCreateMenu` for the menu |
20
+ | Segmented control | `.nt-segmented-control` | `components/segmented-control.css` | — |
21
+ | Chip | `.nt-chip` | `components/chip.css` | — |
22
+
23
+ ## Forms
24
+
25
+ | Component | Block class | CSS path | Behavior |
26
+ |---|---|---|---|
27
+ | Input / field | `.nt-input`, `.nt-field` | `components/input.css` | `ntConnectField`, `ntCreateFormController`, `ntFocusErrorSummary` |
28
+ | Textarea | `.nt-textarea` | `components/textarea.css` | `ntConnectField` |
29
+ | Select | `.nt-select` | `components/select.css` | native `<select>` |
30
+ | Checkbox | `.nt-checkbox` | `components/checkbox.css` | native |
31
+ | Radio | `.nt-radio` | `components/radio.css` | native |
32
+ | Switch | `.nt-switch` | `components/switch.css` | native `role="switch"` |
33
+ | Form layout | `.nt-form` | `patterns/form-layout.css` | — |
34
+
35
+ ## Layout
36
+
37
+ | Component | Block class | CSS path |
38
+ |---|---|---|
39
+ | Card | `.nt-card` | `components/card.css` |
40
+ | Panel | `.nt-panel` | `components/panel.css` |
41
+ | Container, stack, cluster, grid, divider | `.nt-container`, `.nt-stack`, `.nt-cluster`, `.nt-grid`, `.nt-divider` | `utilities/layout.css` |
42
+ | App shell, sidebar, content frame | `.nt-app-shell`, `.nt-sidebar`, `.nt-content-frame` | `shell/app-shell.css`, `shell/sidebar.css`, `shell/content-frame.css` (behavior: `ntCreateSidebar`, see [Workspace sidebar](./site-chrome.md#workspace-sidebar)) |
43
+ | Page, master-detail, settings layout | `.nt-page`, `.nt-master-detail`, `.nt-settings-layout` | `patterns/*.css` |
44
+
45
+ ## Navigation and site chrome
46
+
47
+ | Component | Block class | CSS path | Behavior |
48
+ |---|---|---|---|
49
+ | Header | `.nt-header` | `shell/header.css` | — |
50
+ | Navbar | `.nt-navbar` | `shell/navbar.css` | `ntCreateNavbar` |
51
+ | Account dropdown | `.nt-header__account` + `.nt-profile-menu` | `shell/header.css`, `patterns/profile-menu.css` | `ntCreateAccountMenu` |
52
+ | Mobile navigation | `.nt-mobile-nav` | `shell/mobile-nav.css` | `ntCreateMobileNav` |
53
+ | Footer | `.nt-footer` | `shell/footer.css` | — |
54
+ | Menu / dropdown | `.nt-menu`, `.nt-dropdown` | `components/menu.css`, `components/dropdown.css` | `ntCreateMenu`, `ntCreateDropdown` |
55
+ | Tabs | `.nt-tabs` | `components/tabs.css` | `ntCreateTabs` |
56
+ | Breadcrumb | `.nt-breadcrumb` | `components/breadcrumb.css` | — |
57
+ | Pagination | `.nt-pagination` | `components/pagination.css` | — |
58
+ | Company / workspace switcher | `.nt-company-switcher` | `patterns/company-switcher.css` | `ntCreateMenu` |
59
+ | Command palette, search bar | `.nt-command-palette`, `.nt-search-bar` | `patterns/*.css` | `ntCreateDialog` |
60
+
61
+ ## Data display
62
+
63
+ | Component | Block class | CSS path | Notes |
64
+ |---|---|---|---|
65
+ | Stat (KPI) card | `.nt-stat`, `.nt-stat-grid` | `components/stat.css` | Tones `--success/--warning/--danger/--info/--accent`, `--tinted`, `--emphasis`, `--wide`, `--sm/--lg`, `--interactive`, selected (`aria-pressed`/`aria-current`), loading (`aria-busy`) without layout shift |
66
+ | Description list | `.nt-description-list` | `components/description-list.css` | `--2`, `--3`, `--inline` (totals), `--boxed` (breakdowns), `--compact`, `__item--emphasis`, `__item--full`, `__details--numeric` |
67
+ | Record list | `.nt-record-list`, `.nt-record` | `patterns/record-list.css` | Recent items, queues, health checks; `--divided`, `--compact`, tones, selected bar, container-query stacking |
68
+
69
+ ### Stat card
70
+
71
+ ```html
72
+ <div class="nt-stat-grid">
73
+ <article class="nt-stat nt-stat--success">
74
+ <span class="nt-stat__accent" aria-hidden="true"></span>
75
+ <p class="nt-stat__label">Customer payments</p>
76
+ <div class="nt-stat__row">
77
+ <strong class="nt-stat__value">48 200<span class="nt-stat__unit">SEK</span></strong>
78
+ <span class="nt-stat__delta nt-stat__delta--positive">▲ 12%</span>
79
+ </div>
80
+ <p class="nt-stat__hint">Received since 1 November</p>
81
+ </article>
82
+ </div>
83
+ ```
84
+
85
+ - The grid shows at most `--nt-stat-grid-columns` (default 4; `--2`, `--3`
86
+ modifiers) and never narrower than `--nt-stat-grid-min` (13rem); it
87
+ collapses intrinsically, so it behaves the same in a page, drawer, or pane.
88
+ - A delta always contains a sign or arrow; the tone is secondary.
89
+ - Set `aria-busy="true"` while loading: the value slot becomes a pulse block
90
+ at the same line height, so the real figure appears without a shift.
91
+ - Use links or buttons (`a.nt-stat`, `button.nt-stat`) for drill-down; they
92
+ get hover lift, a pressed state, a focus ring, and a selected ring.
93
+
94
+ ### Description list
95
+
96
+ ```html
97
+ <dl class="nt-description-list nt-description-list--inline">
98
+ <div class="nt-description-list__item">
99
+ <dt class="nt-description-list__term">Subtotal</dt>
100
+ <dd class="nt-description-list__details nt-description-list__details--numeric">3 440 SEK</dd>
101
+ </div>
102
+ <div class="nt-description-list__item nt-description-list__item--emphasis">
103
+ <dt class="nt-description-list__term">Amount due</dt>
104
+ <dd class="nt-description-list__details">4 300 SEK</dd>
105
+ </div>
106
+ </dl>
107
+ ```
108
+
109
+ ### Record list
110
+
111
+ ```html
112
+ <ul class="nt-record-list">
113
+ <li>
114
+ <a class="nt-record nt-record--warning" href="/invoices/142">
115
+ <span class="nt-record__leading"><span class="nt-record__indicator" aria-hidden="true"></span></span>
116
+ <span class="nt-record__main">
117
+ <span class="nt-record__title">INV-2026-0142</span>
118
+ <span class="nt-record__meta">Northwind Traders · 2 Nov</span>
119
+ </span>
120
+ <span class="nt-record__trailing">
121
+ <span class="nt-record__value">4 300 SEK</span>
122
+ <span class="nt-record__caption">Overdue</span>
123
+ </span>
124
+ </a>
125
+ </li>
126
+ </ul>
127
+ ```
128
+
129
+ The indicator dot is decorative; the status is always in text (caption or
130
+ badge). Below a 28rem container the trailing value moves under the title.
131
+
132
+ ## Feedback
133
+
134
+ | Component | Block class | CSS path | Behavior |
135
+ |---|---|---|---|
136
+ | Alert | `.nt-alert` | `components/alert.css` | — |
137
+ | Toast | `.nt-toast` | `components/toast.css` | `ntCreateToastController`, `ntConfigureToastSemantics` |
138
+ | Notification center | `.nt-notification-center` | `patterns/notification-center.css` | — |
139
+ | Badge | `.nt-badge` | `components/badge.css` | — |
140
+ | Progress, skeleton | `.nt-progress`, `.nt-skeleton` | `components/progress.css`, `components/skeleton.css` | — |
141
+ | Loading / empty / error / content state | `.nt-loading-state`, `.nt-empty-state`, `.nt-error-state`, `.nt-content-state` | `patterns/*.css` | `ntApplyState` |
142
+ | Live announcements | — | — | `ntCreateAnnouncer` |
143
+
144
+ ## Overlays
145
+
146
+ | Component | Block class | CSS path | Behavior |
147
+ |---|---|---|---|
148
+ | Dialog / modal | `.nt-dialog` (`.nt-modal` compatibility) | `components/dialog.css` | `ntCreateDialog`, `ntCreateModal` |
149
+ | Drawer | `.nt-drawer` | `components/drawer.css` | `ntCreateDrawer` |
150
+ | Popover | `.nt-popover` | `components/popover.css` | `ntCreatePopover` |
151
+ | Tooltip | `.nt-tooltip` | `components/tooltip.css` | CSS (`:hover`/`:focus-visible`) |
152
+
153
+ ## Data
154
+
155
+ | Component | Block class | CSS path | Behavior |
156
+ |---|---|---|---|
157
+ | Table (read-only) | `.nt-table` | `components/table.css` | — |
158
+ | Data grid (interactive) | `.nt-data-grid` | `components/data-grid.css` | `ntCreateDataGrid` |
159
+ | Avatar | `.nt-avatar` | `components/avatar.css` | — |
160
+
161
+ ## AI and domain modules
162
+
163
+ AI surfaces (`ai/*.css`: action button, approval card, conversation panel,
164
+ prompt input, proposal card, suggestion card, tool call) and domain modules
165
+ (`domain/calendar/*.css` with `ntCreateCalendarGrid`, `domain/billing.css`,
166
+ `domain/companies.css`) are documented in the README sections of the same name.
167
+
168
+ ## Utilities
169
+
170
+ `ntCreateFocusTrap`, `ntCreateOverlay`, `ntLockScroll`, `ntCreateRovingFocus`,
171
+ `ntResolveDirection`, `ntGetInlineArrowKeys`, `ntWatchViewport`,
172
+ `ntViewportQuery`, and id/ARIA helpers (`ntEnsureId`, `ntSetAriaControls`, …)
173
+ are the building blocks the controllers above share.
@@ -0,0 +1,207 @@
1
+ # Content and terminology
2
+
3
+ The Neetechs voice and the canonical vocabulary for actions, states, and
4
+ messages. The design system documents rules and validates its own fixtures
5
+ (`npm run check:content`); applications own the final translated strings.
6
+ No production translations are hardcoded in components.
7
+
8
+ ## Product voice
9
+
10
+ Direct, clear, calm, professional, specific, helpful, honest about system
11
+ state, focused on recovery. Avoid: marketing language in operational
12
+ workflows, jokes in errors, blaming users, vague technical language,
13
+ exclamation marks by default, fake certainty, human-like AI claims, "Oops",
14
+ "Uh-oh", and "Something went wrong" without useful context.
15
+
16
+ Context tuning: operational software is concise and factual; onboarding is
17
+ supportive but not childish; financial workflows are precise and
18
+ consequence-focused; security and permissions are clear and serious; Neenee
19
+ is conversational but transparent about actions, permissions, and
20
+ uncertainty.
21
+
22
+ ## Terminology table
23
+
24
+ | Preferred | Meaning | Use | Do not use for | Notes |
25
+ | --- | --- | --- | --- | --- |
26
+ | Create | A new persistent object will exist | Create invoice, Create company | attaching existing items | Not "Add" or "New" as a verb |
27
+ | Add | Attach/insert an existing item into a collection or context | Add member, Add line item, Add attachment | making brand-new records | |
28
+ | Save changes | Persist edits to an existing object | Edit forms | creating (use Create X) | |
29
+ | Apply | A configuration/filter becomes active without a new record | Apply filters | persisting records | |
30
+ | Delete | The object itself is permanently removed | Delete invoice draft, Delete company | detaching relationships | Pairs with "cannot be undone" |
31
+ | Remove | Detach from a relationship; the object may live on | Remove member from company | permanent destruction | |
32
+ | Cancel | Abandon the current task without side effects | dialogs, forms | stopping a running job (use Stop/Cancel upload with the object) | Never styled as danger |
33
+ | Close | Dismiss a surface whose content has no pending decision | panels, viewers | abandoning unsaved work (use Cancel/Discard) | |
34
+ | Discard | Throw away entered but unsaved data | Discard draft | | Requires confirmation when data is nontrivial |
35
+ | Company | The tenant/organization unit across Neetechs | | "Organization", "Workspace" as synonyms | One product concept, one word |
36
+ | Member | A person belonging to a company | Add member | "User" in product UI | "User" stays in technical/dev contexts |
37
+ | AI connection | A configured AI provider credential | MyAccount → AI Connections | "Integration", developer API keys | Developer keys are "API keys" under Developer & Integrations |
38
+ | Sign in / Sign out | Session start/end | | "Login/Logout" as verbs | |
39
+ | Error vs. failure | Validation error = user-correctable; failure = system could not complete | "2 fields need attention" vs "Upload failed" | | Never blur the two |
40
+
41
+ Check actual product meaning before enforcing a term in an application; the
42
+ distinctions above are semantic, not stylistic.
43
+
44
+ ## Action-label rules
45
+
46
+ Labels start with a verb, name the result, and match the confirmation
47
+ consequence.
48
+
49
+ Prefer: `Create invoice · Save changes · Send invitation · Retry upload ·
50
+ Disconnect provider · Delete company`
51
+
52
+ Avoid: `Submit · OK · Yes · No · Proceed · Execute · Confirm · Click here`
53
+
54
+ Generic labels are acceptable only when context makes the outcome
55
+ unmistakable; owned examples always use specific labels. Never build labels
56
+ by concatenating translated fragments — every label is one complete
57
+ translatable string.
58
+
59
+ ## Validation messages
60
+
61
+ Explain what is wrong, where, and how to correct it. One message, one
62
+ problem.
63
+
64
+ Prefer:
65
+
66
+ ```text
67
+ Enter an invoice number.
68
+ The due date must be on or after the invoice date.
69
+ Choose at least one company.
70
+ The file exceeds the 10 MB limit.
71
+ ```
72
+
73
+ Avoid: `Invalid input · Error · Wrong value · Validation failed`
74
+
75
+ Never expose database field names or stack traces; don't blame the user;
76
+ "please" at most once. Server/system failures must read differently from
77
+ validation ("The invoice could not be saved because the connection was
78
+ lost" vs "Enter an invoice number"). Error codes may appear as support
79
+ detail, never as the only explanation. Security-sensitive errors reveal
80
+ nothing policy forbids.
81
+
82
+ ## System errors
83
+
84
+ Human-readable summary first; expandable, copyable technical detail for
85
+ support; a recovery action wherever one exists (Retry, Reload, contact
86
+ path). Distinguish: temporary (retry likely helps), permission (ask an
87
+ administrator), and defect (report with reference).
88
+
89
+ ## Empty states
90
+
91
+ State what is absent, why, and a useful next step. Four distinct categories
92
+ — never present one as another:
93
+
94
+ | Category | Example |
95
+ | --- | --- |
96
+ | First use | "No invoices yet — Create your first invoice to begin tracking sales." |
97
+ | No search results | "No invoices match “June hosting” — Try another search term." |
98
+ | No filtered results | "No overdue invoices match these filters — Clear one or more filters." |
99
+ | Permission-limited | "You cannot view invoices for this company — Ask a company administrator for billing access." |
100
+
101
+ No create action when the user lacks permission; never claim content does
102
+ not exist when it merely failed to load (that is an error state).
103
+
104
+ ## Confirmations
105
+
106
+ Identify action, target, scope, consequence, reversibility:
107
+
108
+ ```text
109
+ Delete "July hosting invoice"?
110
+
111
+ This permanently removes the draft invoice and its line items.
112
+ This action cannot be undone.
113
+
114
+ [Cancel] [Delete invoice]
115
+ ```
116
+
117
+ The confirming button repeats the verb + object. Never "Are you sure?",
118
+ never danger language for harmless operations.
119
+
120
+ ## Warnings
121
+
122
+ State the risk, the triggering condition, and the safest next action —
123
+ "This may cause problems" is not a warning.
124
+
125
+ ## Success messages
126
+
127
+ Confirm the result without celebration: `Invoice created · Changes saved ·
128
+ Provider connected · Invitation sent · Upload completed`, optionally naming
129
+ the object ("“July hosting invoice” was created."). Success is announced
130
+ only after backend confirmation; routine success uses a toast *or* an inline
131
+ status, never both; no modals solely for success; no exclamation marks by
132
+ default.
133
+
134
+ ## Permission messages
135
+
136
+ Say what is restricted, at what scope, and who can help: "Ask a company
137
+ administrator for billing access." Never dead-end without a path.
138
+
139
+ ## Offline and maintenance
140
+
141
+ Offline: say what still works ("Cached records are still visible") and how
142
+ to recover ("Retry when the connection returns"). Maintenance: say what is
143
+ unavailable and, when known, until when. Both use the Prompt 8 content-state
144
+ categories.
145
+
146
+ ## Billing language
147
+
148
+ Amounts always carry currency; state names are exact (draft, issued,
149
+ overdue, paid, voided); irreversible financial actions state the legal/
150
+ accounting consequence; reversal ≠ deletion; payment failure never implies
151
+ the invoice vanished.
152
+
153
+ ## Security language
154
+
155
+ Serious and specific without revealing internals. Session expiry explains
156
+ what happened to unsaved work. Account-existence, lockout, and MFA copy
157
+ follows the application's security policy — the design system never forces
158
+ copy that leaks state.
159
+
160
+ ## Neenee and AI language
161
+
162
+ Separate: answer · action taken · proposed action · result · warning ·
163
+ technical detail · suggested next actions. Distinguish "I found…",
164
+ "I propose…", "I am executing…", "Completed…". State uncertainty when
165
+ relevant. Never imply external access without a confirming tool/capability;
166
+ never claim "no access" when a Neetechs tool can do the task; never present
167
+ unavailable controls; never claim success before backend confirmation.
168
+ Ordinary answers are plain conversation; strong cards are reserved for
169
+ approvals, artifacts, and important results.
170
+
171
+ ## Localization-safe contracts
172
+
173
+ Components accept complete content slots (heading, description, action
174
+ labels, status label, accessible label) and never assemble sentences from
175
+ `prefix + value + suffix`. Translation systems control variable placement,
176
+ plurals, gender, and word order; long translations and Arabic RTL must fit
177
+ (see the responsive and RTL docs). The package adds no translation
178
+ framework.
179
+
180
+ ## Good and bad examples
181
+
182
+ | Bad | Good |
183
+ | --- | --- |
184
+ | Submit | Create invoice |
185
+ | Are you sure? | Delete "July hosting invoice"? This action cannot be undone. |
186
+ | Something went wrong | The invoice could not be saved because the connection was lost. Retry to send it again. |
187
+ | Invalid input | Enter a valid email address. |
188
+ | No data | No invoices match "June hosting". Try another search term. |
189
+ | Success! | Invoice created |
190
+
191
+ ## Validation and review
192
+
193
+ `npm run check:content` scans repository-owned fixtures for the discouraged
194
+ labels/phrases above (file + line). A line containing `nt-content-allow`
195
+ (comment or attribute) is a reviewed exception for fixtures that
196
+ intentionally demonstrate bad copy. The check never scans consuming
197
+ applications or attempts grammar policing.
198
+
199
+ Review checklist:
200
+
201
+ - [ ] Every button names its result.
202
+ - [ ] Validation copy says what, where, how to fix.
203
+ - [ ] Empty state uses the correct category.
204
+ - [ ] Confirmations state target + consequence + reversibility.
205
+ - [ ] Success claimed only after confirmation, on one channel.
206
+ - [ ] No fragment concatenation; strings are complete and translatable.
207
+ - [ ] AI copy distinguishes found / proposed / executing / completed.