@neetechs/ui 0.0.3 → 0.0.4

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