@neetechs/ui 0.1.0 → 0.3.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 (285) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/LICENSE +21 -21
  3. package/README.md +862 -861
  4. package/dist/ai/ai-action-button/ai-action-button.css +271 -271
  5. package/dist/ai/ai-approval-card/ai-approval-card.css +323 -323
  6. package/dist/ai/ai-conversation-panel/ai-conversation-panel.css +447 -447
  7. package/dist/ai/ai-prompt-input/ai-prompt-input.css +380 -380
  8. package/dist/ai/ai-proposal-card/ai-proposal-card.css +358 -358
  9. package/dist/ai/ai-suggestion-card/ai-suggestion-card.css +295 -295
  10. package/dist/ai/ai-tool-call/ai-tool-call.css +256 -256
  11. package/dist/ai/index.css +7 -7
  12. package/dist/behaviors/index.d.ts +1 -0
  13. package/dist/behaviors/index.d.ts.map +1 -1
  14. package/dist/behaviors/index.js +1 -0
  15. package/dist/behaviors/index.js.map +1 -1
  16. package/dist/behaviors/selection-indicator.d.ts +35 -0
  17. package/dist/behaviors/selection-indicator.d.ts.map +1 -0
  18. package/dist/behaviors/selection-indicator.js +133 -0
  19. package/dist/behaviors/selection-indicator.js.map +1 -0
  20. package/dist/behaviors/sidebar.d.ts +3 -1
  21. package/dist/behaviors/sidebar.d.ts.map +1 -1
  22. package/dist/behaviors/sidebar.js +10 -3
  23. package/dist/behaviors/sidebar.js.map +1 -1
  24. package/dist/components/alert/alert.css +226 -220
  25. package/dist/components/avatar/avatar.css +298 -220
  26. package/dist/components/badge/badge.css +180 -174
  27. package/dist/components/breadcrumb/breadcrumb.css +207 -207
  28. package/dist/components/button/button.css +278 -238
  29. package/dist/components/card/card.css +336 -265
  30. package/dist/components/checkbox/checkbox.css +189 -189
  31. package/dist/components/chip/chip.css +269 -269
  32. package/dist/components/choice-card/choice-card.css +244 -0
  33. package/dist/components/data-grid/data-grid.css +520 -520
  34. package/dist/components/description-list/description-list.css +187 -187
  35. package/dist/components/dialog/dialog.css +348 -339
  36. package/dist/components/disclosure/disclosure.css +154 -0
  37. package/dist/components/dock/dock.css +319 -0
  38. package/dist/components/drawer/drawer.css +493 -484
  39. package/dist/components/dropdown/dropdown.css +325 -316
  40. package/dist/components/fab/fab.css +281 -0
  41. package/dist/components/icon-button/icon-button.css +162 -162
  42. package/dist/components/index.css +4 -0
  43. package/dist/components/input/input.css +163 -163
  44. package/dist/components/menu/menu.css +315 -315
  45. package/dist/components/pagination/pagination.css +250 -250
  46. package/dist/components/panel/panel.css +316 -284
  47. package/dist/components/popover/popover.css +22 -0
  48. package/dist/components/progress/progress.css +268 -256
  49. package/dist/components/radio/radio.css +166 -166
  50. package/dist/components/segmented-control/segmented-control.css +264 -205
  51. package/dist/components/select/select.css +117 -117
  52. package/dist/components/skeleton/skeleton.css +267 -267
  53. package/dist/components/split-button/split-button.css +292 -292
  54. package/dist/components/stat/stat.css +433 -403
  55. package/dist/components/switch/switch.css +195 -195
  56. package/dist/components/table/table.css +220 -220
  57. package/dist/components/tabs/tabs.css +393 -293
  58. package/dist/components/textarea/textarea.css +86 -86
  59. package/dist/components/toast/toast.css +345 -345
  60. package/dist/components/tooltip/tooltip.css +267 -258
  61. package/dist/domain/billing/index.css +629 -629
  62. package/dist/domain/calendar/agenda-list/agenda-list.css +224 -224
  63. package/dist/domain/calendar/day-slice/day-slice.css +384 -384
  64. package/dist/domain/calendar/day-timeline/day-timeline.css +332 -332
  65. package/dist/domain/calendar/event-card/event-card.css +338 -338
  66. package/dist/domain/calendar/index.css +5 -5
  67. package/dist/domain/calendar/month-grid/month-grid.css +426 -426
  68. package/dist/domain/calendar/week-grid/week-grid.css +487 -480
  69. package/dist/domain/companies/index.css +526 -526
  70. package/dist/domain/index.css +3 -3
  71. package/dist/index.css +5 -5
  72. package/dist/patterns/command-palette/command-palette.css +488 -447
  73. package/dist/patterns/company-switcher/company-switcher.css +390 -390
  74. package/dist/patterns/content-state/content-state.css +236 -236
  75. package/dist/patterns/document-preview/document-preview.css +169 -0
  76. package/dist/patterns/editor-workspace/editor-workspace.css +276 -0
  77. package/dist/patterns/empty-state/empty-state.css +260 -260
  78. package/dist/patterns/error-state/error-state.css +272 -272
  79. package/dist/patterns/form-layout/form-layout.css +106 -106
  80. package/dist/patterns/index.css +4 -0
  81. package/dist/patterns/loading-state/loading-state.css +287 -287
  82. package/dist/patterns/master-detail/master-detail.css +103 -103
  83. package/dist/patterns/notification-center/notification-center.css +443 -443
  84. package/dist/patterns/page/page.css +303 -303
  85. package/dist/patterns/profile-header/profile-header.css +205 -0
  86. package/dist/patterns/profile-menu/profile-menu.css +298 -298
  87. package/dist/patterns/record-list/record-list.css +302 -302
  88. package/dist/patterns/resource-card/resource-card.css +258 -0
  89. package/dist/patterns/search-bar/search-bar.css +457 -457
  90. package/dist/patterns/settings-layout/settings-layout.css +283 -150
  91. package/dist/patterns/workflow/workflow.css +168 -168
  92. package/dist/shell/app-shell/app-shell.css +429 -211
  93. package/dist/shell/content-frame/content-frame.css +93 -93
  94. package/dist/shell/header/header.css +328 -328
  95. package/dist/shell/index.css +8 -8
  96. package/dist/shell/mobile-nav/mobile-nav.css +254 -254
  97. package/dist/shell/navbar/navbar.css +28 -1
  98. package/dist/shell/sidebar/sidebar.css +923 -314
  99. package/dist/styles/accessibility.css +150 -150
  100. package/dist/styles/animations/motion.css +162 -162
  101. package/dist/styles/appearance/accent.css +215 -215
  102. package/dist/styles/appearance/density.css +61 -61
  103. package/dist/styles/appearance/motion.css +48 -40
  104. package/dist/styles/base.css +83 -83
  105. package/dist/styles/index.css +29 -28
  106. package/dist/styles/localization.css +56 -56
  107. package/dist/styles/reset.css +51 -51
  108. package/dist/styles/responsive.css +101 -101
  109. package/dist/styles/themes/dark.css +225 -202
  110. package/dist/styles/themes/high-contrast.css +378 -290
  111. package/dist/styles/themes/light.css +224 -201
  112. package/dist/styles/tokens/breakpoints.css +37 -37
  113. package/dist/styles/tokens/color.css +102 -102
  114. package/dist/styles/tokens/compatibility.css +33 -33
  115. package/dist/styles/tokens/elevation.css +33 -26
  116. package/dist/styles/tokens/index.css +9 -9
  117. package/dist/styles/tokens/motion.css +55 -36
  118. package/dist/styles/tokens/radius.css +26 -26
  119. package/dist/styles/tokens/spacing.css +56 -56
  120. package/dist/styles/tokens/typography.css +85 -85
  121. package/dist/styles/tokens/z-index.css +14 -14
  122. package/dist/styles/utilities/glass.css +97 -0
  123. package/dist/styles/utilities/layout.css +153 -153
  124. package/dist/styles/utilities/text.css +152 -152
  125. package/dist/styles/utilities/visibility.css +47 -47
  126. package/dist/version.d.ts +1 -1
  127. package/dist/version.js +1 -1
  128. package/docs/NEETECHS_UI_UPGRADE_PLAN.md +312 -192
  129. package/docs/accessibility.md +218 -218
  130. package/docs/appearance-and-theming.md +150 -150
  131. package/docs/brand-palette.md +36 -36
  132. package/docs/component-architecture.md +137 -137
  133. package/docs/component-guidelines.md +64 -64
  134. package/docs/components.md +326 -173
  135. package/docs/content-and-terminology.md +207 -207
  136. package/docs/design-system-baseline-audit.md +226 -226
  137. package/docs/design-token-contract.md +279 -279
  138. package/docs/glass-and-motion.md +310 -0
  139. package/docs/localization-and-rtl.md +147 -147
  140. package/docs/migration.md +193 -193
  141. package/docs/page-patterns-and-workflows.md +301 -275
  142. package/docs/responsive-and-adaptive-design.md +351 -351
  143. package/docs/semantic-role-migration-audit.md +77 -77
  144. package/docs/site-chrome.md +320 -313
  145. package/docs/states-feedback-and-recovery.md +206 -206
  146. package/docs/theming.md +5 -5
  147. package/package.json +2 -1
  148. package/src/ai/ai-action-button/ai-action-button.css +271 -271
  149. package/src/ai/ai-approval-card/ai-approval-card.css +323 -323
  150. package/src/ai/ai-conversation-panel/ai-conversation-panel.css +447 -447
  151. package/src/ai/ai-prompt-input/ai-prompt-input.css +380 -380
  152. package/src/ai/ai-proposal-card/ai-proposal-card.css +358 -358
  153. package/src/ai/ai-suggestion-card/ai-suggestion-card.css +295 -295
  154. package/src/ai/ai-tool-call/ai-tool-call.css +256 -256
  155. package/src/ai/index.css +7 -7
  156. package/src/appearance/cache.ts +236 -236
  157. package/src/appearance/cookie.ts +184 -184
  158. package/src/appearance/index.ts +86 -86
  159. package/src/appearance/preference.ts +121 -121
  160. package/src/appearance/theme-controller.ts +384 -384
  161. package/src/appearance/types.ts +61 -61
  162. package/src/behaviors/announcer.ts +222 -222
  163. package/src/behaviors/calendar.ts +92 -92
  164. package/src/behaviors/data-grid.ts +133 -133
  165. package/src/behaviors/dialog.ts +203 -203
  166. package/src/behaviors/direction.ts +34 -34
  167. package/src/behaviors/drawer.ts +210 -210
  168. package/src/behaviors/dropdown.ts +344 -344
  169. package/src/behaviors/focus-trap.ts +304 -304
  170. package/src/behaviors/forms.ts +205 -205
  171. package/src/behaviors/ids.ts +47 -47
  172. package/src/behaviors/index.ts +1 -0
  173. package/src/behaviors/keyboard.ts +305 -305
  174. package/src/behaviors/overlay.ts +344 -344
  175. package/src/behaviors/selection-indicator.ts +162 -0
  176. package/src/behaviors/sidebar.ts +14 -4
  177. package/src/behaviors/state.ts +282 -282
  178. package/src/behaviors/tabs.ts +137 -137
  179. package/src/behaviors/viewport.ts +61 -61
  180. package/src/components/alert/alert.css +226 -220
  181. package/src/components/avatar/avatar.css +298 -220
  182. package/src/components/badge/badge.css +180 -174
  183. package/src/components/breadcrumb/breadcrumb.css +207 -207
  184. package/src/components/button/button.css +278 -238
  185. package/src/components/card/card.css +336 -265
  186. package/src/components/checkbox/checkbox.css +189 -189
  187. package/src/components/chip/chip.css +269 -269
  188. package/src/components/choice-card/choice-card.css +244 -0
  189. package/src/components/data-grid/data-grid.css +520 -520
  190. package/src/components/description-list/description-list.css +187 -187
  191. package/src/components/dialog/dialog.css +348 -339
  192. package/src/components/disclosure/disclosure.css +154 -0
  193. package/src/components/dock/dock.css +319 -0
  194. package/src/components/drawer/drawer.css +493 -484
  195. package/src/components/dropdown/dropdown.css +325 -316
  196. package/src/components/fab/fab.css +281 -0
  197. package/src/components/icon-button/icon-button.css +162 -162
  198. package/src/components/index.css +4 -0
  199. package/src/components/input/input.css +163 -163
  200. package/src/components/menu/menu.css +315 -315
  201. package/src/components/pagination/pagination.css +250 -250
  202. package/src/components/panel/panel.css +316 -284
  203. package/src/components/popover/popover.css +22 -0
  204. package/src/components/progress/progress.css +268 -256
  205. package/src/components/radio/radio.css +166 -166
  206. package/src/components/segmented-control/segmented-control.css +264 -205
  207. package/src/components/select/select.css +117 -117
  208. package/src/components/skeleton/skeleton.css +267 -267
  209. package/src/components/split-button/split-button.css +292 -292
  210. package/src/components/stat/stat.css +433 -403
  211. package/src/components/switch/switch.css +195 -195
  212. package/src/components/table/table.css +220 -220
  213. package/src/components/tabs/tabs.css +393 -293
  214. package/src/components/textarea/textarea.css +86 -86
  215. package/src/components/toast/toast.css +345 -345
  216. package/src/components/tooltip/tooltip.css +267 -258
  217. package/src/domain/billing/index.css +629 -629
  218. package/src/domain/calendar/agenda-list/agenda-list.css +224 -224
  219. package/src/domain/calendar/day-slice/day-slice.css +384 -384
  220. package/src/domain/calendar/day-timeline/day-timeline.css +332 -332
  221. package/src/domain/calendar/event-card/event-card.css +338 -338
  222. package/src/domain/calendar/index.css +5 -5
  223. package/src/domain/calendar/month-grid/month-grid.css +426 -426
  224. package/src/domain/calendar/week-grid/week-grid.css +487 -480
  225. package/src/domain/companies/index.css +526 -526
  226. package/src/domain/index.css +3 -3
  227. package/src/index.css +5 -5
  228. package/src/index.ts +7 -7
  229. package/src/localization/index.ts +56 -56
  230. package/src/patterns/command-palette/command-palette.css +488 -447
  231. package/src/patterns/company-switcher/company-switcher.css +390 -390
  232. package/src/patterns/content-state/content-state.css +236 -236
  233. package/src/patterns/document-preview/document-preview.css +169 -0
  234. package/src/patterns/editor-workspace/editor-workspace.css +276 -0
  235. package/src/patterns/empty-state/empty-state.css +260 -260
  236. package/src/patterns/error-state/error-state.css +272 -272
  237. package/src/patterns/form-layout/form-layout.css +106 -106
  238. package/src/patterns/index.css +4 -0
  239. package/src/patterns/loading-state/loading-state.css +287 -287
  240. package/src/patterns/master-detail/master-detail.css +103 -103
  241. package/src/patterns/notification-center/notification-center.css +443 -443
  242. package/src/patterns/page/page.css +303 -303
  243. package/src/patterns/profile-header/profile-header.css +205 -0
  244. package/src/patterns/profile-menu/profile-menu.css +298 -298
  245. package/src/patterns/record-list/record-list.css +302 -302
  246. package/src/patterns/resource-card/resource-card.css +258 -0
  247. package/src/patterns/search-bar/search-bar.css +457 -457
  248. package/src/patterns/settings-layout/settings-layout.css +283 -150
  249. package/src/patterns/workflow/workflow.css +168 -168
  250. package/src/shell/app-shell/app-shell.css +429 -211
  251. package/src/shell/content-frame/content-frame.css +93 -93
  252. package/src/shell/header/header.css +328 -328
  253. package/src/shell/index.css +8 -8
  254. package/src/shell/mobile-nav/mobile-nav.css +254 -254
  255. package/src/shell/navbar/navbar.css +28 -1
  256. package/src/shell/sidebar/sidebar.css +923 -314
  257. package/src/styles/accessibility.css +150 -150
  258. package/src/styles/animations/motion.css +162 -162
  259. package/src/styles/appearance/accent.css +215 -215
  260. package/src/styles/appearance/density.css +61 -61
  261. package/src/styles/appearance/motion.css +48 -40
  262. package/src/styles/base.css +83 -83
  263. package/src/styles/index.css +29 -28
  264. package/src/styles/localization.css +56 -56
  265. package/src/styles/reset.css +51 -51
  266. package/src/styles/responsive.css +101 -101
  267. package/src/styles/themes/dark.css +225 -202
  268. package/src/styles/themes/high-contrast.css +378 -290
  269. package/src/styles/themes/light.css +224 -201
  270. package/src/styles/tokens/breakpoints.css +37 -37
  271. package/src/styles/tokens/color.css +102 -102
  272. package/src/styles/tokens/compatibility.css +33 -33
  273. package/src/styles/tokens/elevation.css +33 -26
  274. package/src/styles/tokens/index.css +9 -9
  275. package/src/styles/tokens/motion.css +55 -36
  276. package/src/styles/tokens/radius.css +26 -26
  277. package/src/styles/tokens/spacing.css +56 -56
  278. package/src/styles/tokens/typography.css +85 -85
  279. package/src/styles/tokens/z-index.css +14 -14
  280. package/src/styles/utilities/glass.css +97 -0
  281. package/src/styles/utilities/layout.css +153 -153
  282. package/src/styles/utilities/text.css +152 -152
  283. package/src/styles/utilities/visibility.css +47 -47
  284. package/src/types/index.ts +126 -126
  285. package/src/version.ts +1 -1
package/README.md CHANGED
@@ -1,861 +1,862 @@
1
- # @neetechs/ui
2
-
3
- Official framework-agnostic Neetechs UI design system.
4
-
5
- ## Responsive and adaptive behavior
6
-
7
- Reusable components respond to their *container*, not the viewport: the shell content area, dialog and drawer bodies, tables, data grids, and forms are query containers, and `.nt-region` makes any dashboard column or split pane one. Viewport media queries are reserved for shell-level layout and use a documented rem scale (30/40/48/64/80rem — mirrored by `NT_VIEWPORTS` in `@neetechs/ui/behaviors`). Mobile contracts include the `.nt-mobile-nav` drawer shell mode, table priority columns and row details, data-grid constrained/record modes, the `.nt-calendar-agenda` phone calendar, dvh-safe full-height utilities (`.nt-fill-viewport`), safe-area padding, and coarse-pointer touch targets. See [docs/responsive-and-adaptive-design.md](./docs/responsive-and-adaptive-design.md).
8
-
9
- ```bash
10
- npm run check:responsive
11
- ```
12
-
13
- ## Page patterns and content standards
14
-
15
- Shared page anatomy (`.nt-page-header`, `.nt-page-toolbar`, `.nt-page-section`, `.nt-page-footer-actions`), responsive forms (`.nt-form`), settings layouts, master-detail, and multi-step workflow patterns are documented in [docs/page-patterns-and-workflows.md](./docs/page-patterns-and-workflows.md). Terminology, action-label, validation, empty-state, confirmation, and AI-copy rules live in [docs/content-and-terminology.md](./docs/content-and-terminology.md) and are enforced for repository-owned fixtures by:
16
-
17
- ```bash
18
- npm run check:content
19
- ```
20
-
21
- ## Localization and RTL
22
-
23
- Use native document metadata; components inherit nested direction changes:
24
-
25
- ```html
26
- <html lang="ar" dir="rtl">
27
- <code dir="ltr" class="nt-technical-value">POST /api/v1/invoices</code>
28
- </html>
29
- ```
30
-
31
- Use `.nt-icon--directional` only for arrows whose inline meaning should mirror. Explicit-locale number/date helpers are exported from `@neetechs/ui/localization`. Applications provide translations, locale/time-zone selection, and approved font loading. See [the RTL and localization contract](./docs/localization-and-rtl.md).
32
-
33
- `@neetechs/ui` is pure CSS + pure TypeScript helpers. It does not depend on Angular, React, Next.js, Bootstrap, Tailwind, or Angular Material.
34
-
35
- Use it in:
36
-
37
- - Angular
38
- - React
39
- - Next.js
40
- - plain JavaScript
41
- - plain HTML
42
- - future Neetechs apps
43
-
44
- ## Core rules
45
-
46
- - Use `nt-` class prefix.
47
- - Use `--nt-` token prefix.
48
- - Do not hardcode component colors.
49
- - Components must consume design tokens.
50
- - Keep this base package framework-agnostic.
51
- - Build Angular or React wrappers later, outside this package.
52
-
53
- ## Install
54
-
55
- ```bash
56
- npm install @neetechs/ui
57
- ```
58
-
59
- ## Import all styles
60
-
61
- In TypeScript or JavaScript:
62
-
63
- ```ts
64
- import '@neetechs/ui/styles.css';
65
- ```
66
-
67
- In CSS:
68
-
69
- ```css
70
- @import '@neetechs/ui/styles.css';
71
- ```
72
-
73
- This imports:
74
-
75
- ```txt
76
- styles
77
- shell
78
- components
79
- patterns
80
- ai
81
- domain
82
- ```
83
-
84
- ## Import only what you need
85
-
86
- ```css
87
- @import '@neetechs/ui/base.css';
88
- @import '@neetechs/ui/shell.css';
89
- @import '@neetechs/ui/components.css';
90
- @import '@neetechs/ui/patterns.css';
91
- @import '@neetechs/ui/ai.css';
92
- @import '@neetechs/ui/domain.css';
93
- ```
94
-
95
- Specific CSS entry points:
96
-
97
- ```css
98
- @import '@neetechs/ui/components/button.css';
99
- @import '@neetechs/ui/components/input.css';
100
- @import '@neetechs/ui/components/card.css';
101
- @import '@neetechs/ui/components/dropdown.css';
102
- @import '@neetechs/ui/patterns/company-switcher.css';
103
- @import '@neetechs/ui/patterns/profile-menu.css';
104
- @import '@neetechs/ui/ai/ai-prompt-input.css';
105
- @import '@neetechs/ui/domain/calendar.css';
106
- @import '@neetechs/ui/domain/billing.css';
107
- @import '@neetechs/ui/domain/companies.css';
108
- ```
109
-
110
- ## Default brand colors
111
-
112
- Neetechs now defaults to a softer navy dark theme with a blue product accent.
113
- The canonical palette, accessible foreground rules, and rollout notes are in
114
- [docs/brand-palette.md](./docs/brand-palette.md). Existing saved accent preferences
115
- continue to work (including orange); applications must resolve appearance from
116
- the backend rather than overriding user choices.
117
-
118
- ## Theme setup
119
-
120
- For the shared SSR-safe appearance system, use `@neetechs/ui/appearance` and
121
- see [docs/appearance-and-theming.md](./docs/appearance-and-theming.md).
122
-
123
- ```ts
124
- import { bootstrapNeetechsAppearance, createAppearanceController } from '@neetechs/ui/appearance';
125
-
126
- bootstrapNeetechsAppearance(); // before framework rendering
127
- const appearance = createAppearanceController();
128
- appearance.initialize();
129
- ```
130
-
131
- To avoid a theme flash on client-rendered pages, emit the pre-paint bootstrap
132
- as an inline script in `<head>` (server/build time). It reads the same cookie
133
- and cache as the controller and only sets root attributes:
134
-
135
- ```ts
136
- import { ntAppearanceBootstrapScript } from '@neetechs/ui/appearance';
137
-
138
- const headScript = `<script>${ntAppearanceBootstrapScript()}</script>`;
139
- ```
140
-
141
- Switch one dimension without resetting the others (saved accent and density
142
- are kept):
143
-
144
- ```ts
145
- appearance.updatePreference({ theme: 'light' });
146
- ```
147
-
148
- The controller applies the public contract to the root `html` element.
149
-
150
- ```html
151
- <html data-nt-theme="dark" data-nt-theme-preference="system"
152
- data-nt-accent="blue" data-nt-density="comfortable"
153
- data-nt-contrast="normal" data-nt-motion="full">
154
- ...
155
- </html>
156
- ```
157
-
158
- Supported preferences are `system`, `light`, and `dark`; resolved themes are:
159
-
160
- ```txt
161
- dark
162
- light
163
- ```
164
-
165
- Supported accents:
166
-
167
- ```txt
168
- orange
169
- blue
170
- green
171
- purple
172
- neutral
173
- ```
174
-
175
- Supported density:
176
-
177
- ```txt
178
- compact
179
- comfortable
180
- spacious
181
- ```
182
-
183
- ## Recommended app setup
184
-
185
- For a full Neetechs app, import the full stylesheet once at the app root:
186
-
187
- ```ts
188
- import '@neetechs/ui/styles.css';
189
- ```
190
-
191
- Then initialize appearance before rendering. Do not create a competing body-level theme:
192
-
193
- ```html
194
- <body>
195
- <div class="nt-app-shell">
196
- ...
197
- </div>
198
- </body>
199
- ```
200
-
201
- Do not import random component CSS files all over the app unless you are intentionally optimizing bundle size. For most Neetechs apps, one root import is cleaner.
202
-
203
- ## Basic button
204
-
205
- ```html
206
- <button class="nt-button nt-button--primary">
207
- Save changes
208
- </button>
209
-
210
- <button class="nt-button nt-button--secondary">
211
- Cancel
212
- </button>
213
-
214
- <button class="nt-button nt-button--ghost">
215
- More
216
- </button>
217
- ```
218
-
219
- Async actions keep their visible name, expose busy state, and prevent accidental duplicate activation without treating pending as native disabled:
220
-
221
- ```ts
222
- import { ntCreateAsyncAction } from '@neetechs/ui';
223
-
224
- const save = ntCreateAsyncAction({
225
- control: document.querySelector<HTMLButtonElement>('#save')!,
226
- async run(_event, signal) {
227
- await saveChanges({ signal });
228
- },
229
- });
230
- ```
231
-
232
- ```html
233
- <button id="save" class="nt-button nt-button--primary">
234
- Save changes
235
- </button>
236
- ```
237
-
238
- ## Button group
239
-
240
- ```html
241
- <div class="nt-button-group nt-button-group--attached" role="group" aria-label="Text alignment">
242
- <button class="nt-button nt-button--secondary" type="button" aria-pressed="true">Start</button>
243
- <button class="nt-button nt-button--secondary" type="button" aria-pressed="false">Center</button>
244
- </div>
245
- ```
246
-
247
- Spaced by default; `--attached` joins buttons, `--vertical` stacks them, `--full`
248
- stretches them. Pressed state uses `aria-pressed` (color plus an inset ring).
249
-
250
- ## Popover
251
-
252
- Non-modal panel for rich content such as filters or quick settings:
253
-
254
- ```html
255
- <div class="nt-popover">
256
- <button class="nt-button nt-button--secondary" type="button" id="filters-trigger">Filters</button>
257
- <div class="nt-popover__content" id="filters" aria-labelledby="filters-title" hidden>
258
- <div class="nt-popover__header"><h3 class="nt-popover__title" id="filters-title">Filter invoices</h3></div>
259
- <div class="nt-popover__body">...</div>
260
- </div>
261
- </div>
262
- ```
263
-
264
- ```ts
265
- import { ntCreatePopover } from '@neetechs/ui/behaviors';
266
-
267
- ntCreatePopover({
268
- trigger: document.querySelector<HTMLElement>('#filters-trigger')!,
269
- content: document.querySelector<HTMLElement>('#filters')!,
270
- });
271
- ```
272
-
273
- Full catalog of components and behaviors: [docs/components.md](./docs/components.md).
274
-
275
- ## Basic input
276
-
277
- ```html
278
- <label class="nt-field">
279
- <span class="nt-field__label">Company name</span>
280
- <input class="nt-input" placeholder="Neetechs" />
281
- <span class="nt-field__help">Used across your workspace.</span>
282
- </label>
283
- ```
284
-
285
- Invalid input:
286
-
287
- ```html
288
- <label class="nt-field">
289
- <span class="nt-field__label" id="email-label">Email</span>
290
- <input id="email" class="nt-input" aria-labelledby="email-label"
291
- aria-describedby="email-error" aria-invalid="true" />
292
- <span id="email-error" class="nt-field__error">Enter a valid email.</span>
293
- </label>
294
- ```
295
-
296
- For full form submission state, use `ntConnectField`, `ntFocusErrorSummary`, and `ntCreateFormController` from `@neetechs/ui`.
297
-
298
- ## Feedback and recovery
299
-
300
- New content-state work uses the shared pattern:
301
-
302
- ```html
303
- <section class="nt-content-state nt-content-state--section"
304
- data-nt-content-state="offline"
305
- aria-labelledby="offline-title">
306
- <h2 id="offline-title" class="nt-content-state__title">Connection lost</h2>
307
- <p class="nt-content-state__description">
308
- Cached records are still visible. Retry when the connection returns.
309
- </p>
310
- <div class="nt-content-state__actions">
311
- <button class="nt-button nt-button--secondary">Retry</button>
312
- </div>
313
- </section>
314
- ```
315
-
316
- `ntCreateToastController` manages toast semantics, dedupe, stack limits, pause-on-hover/focus, and cleanup. Use toasts for brief noncritical feedback, not field validation, permission-denied pages, or irreversible-action confirmation.
317
-
318
- See [docs/states-feedback-and-recovery.md](./docs/states-feedback-and-recovery.md) for the canonical state vocabulary, forms, loading, empty/error/offline patterns, confirmations, unsaved changes, AI write-action approval, and recovery rules.
319
-
320
- ## Card
321
-
322
- ```html
323
- <section class="nt-card">
324
- <header class="nt-card__header">
325
- <div class="nt-card__header-main">
326
- <p class="nt-card__eyebrow">Workspace</p>
327
- <h2 class="nt-card__title">Company Center</h2>
328
- <p class="nt-card__subtitle">
329
- Manage companies, branding, team, and billing.
330
- </p>
331
- </div>
332
-
333
- <div class="nt-card__actions">
334
- <button class="nt-button nt-button--secondary">Settings</button>
335
- </div>
336
- </header>
337
-
338
- <div class="nt-card__body">
339
- <p>Put your content here.</p>
340
- </div>
341
-
342
- <footer class="nt-card__footer">
343
- <span class="nt-card__meta">Updated today</span>
344
- <button class="nt-button nt-button--primary">Open</button>
345
- </footer>
346
- </section>
347
- ```
348
-
349
- ## App shell
350
-
351
- ```html
352
- <div class="nt-app-shell">
353
- <aside class="nt-app-shell__sidebar nt-sidebar">
354
- ...
355
- </aside>
356
-
357
- <div class="nt-app-shell__main">
358
- <header class="nt-app-shell__header nt-header">
359
- ...
360
- </header>
361
-
362
- <main class="nt-app-shell__content nt-content-frame">
363
- ...
364
- </main>
365
- </div>
366
- </div>
367
- ```
368
-
369
- ## Site chrome: header, navbar, account, mobile nav, footer
370
-
371
- Reusable website chrome with configurable logo, navigation, account actions,
372
- footer columns, and social links. Routing, auth, and URLs stay in the app.
373
-
374
- ```ts
375
- import { ntCreateAccountMenu, ntCreateMobileNav, ntCreateNavbar } from '@neetechs/ui/behaviors';
376
- ```
377
-
378
- ```html
379
- <header class="nt-header nt-header--sticky">
380
- <div class="nt-header__left">
381
- <a class="nt-header__brand" href="/"><span class="nt-header__brand-name">Neetechs</span></a>
382
- </div>
383
- <div class="nt-header__nav"><nav class="nt-navbar" aria-label="Primary">...</nav></div>
384
- <div class="nt-header__right">...</div>
385
- </header>
386
- <footer class="nt-footer">...</footer>
387
- ```
388
-
389
- Full markup, keyboard contract, and examples: [docs/site-chrome.md](./docs/site-chrome.md).
390
- Stacking rules: [docs/layering.md](./docs/layering.md).
391
-
392
- ## Company switcher
393
-
394
- ```html
395
- <div class="nt-company-switcher">
396
- <header class="nt-company-switcher__header">
397
- <div class="nt-company-switcher__header-main">
398
- <span class="nt-company-switcher__eyebrow">Active company</span>
399
- <h2 class="nt-company-switcher__title">Switch company</h2>
400
- <p class="nt-company-switcher__description">
401
- Choose the company you want to manage.
402
- </p>
403
- </div>
404
- </header>
405
-
406
- <div class="nt-company-switcher__body">
407
- <button class="nt-company-switcher__item nt-company-switcher__item--active">
408
- <span class="nt-company-switcher__logo">SD</span>
409
-
410
- <span class="nt-company-switcher__item-main">
411
- <span class="nt-company-switcher__name">Sydfix</span>
412
- <span class="nt-company-switcher__meta">
413
- <span class="nt-company-switcher__country">SE</span>
414
- <span class="nt-company-switcher__role">owner</span>
415
- <span class="nt-company-switcher__currency">SEK</span>
416
- </span>
417
- </span>
418
-
419
- <span class="nt-company-switcher__check">✓</span>
420
- </button>
421
- </div>
422
-
423
- <footer class="nt-company-switcher__footer">
424
- <a class="nt-company-switcher__footer-action" href="/companies/create">
425
- Create company
426
- </a>
427
- </footer>
428
- </div>
429
- ```
430
-
431
- ## Profile menu
432
-
433
- ```html
434
- <div class="nt-profile-menu">
435
- <header class="nt-profile-menu__header">
436
- <span class="nt-avatar">SJ</span>
437
-
438
- <div class="nt-profile-menu__identity">
439
- <span class="nt-profile-menu__name">Sayed Jihad ElSayed</span>
440
- <span class="nt-profile-menu__email">jelsayed@uab.edu</span>
441
- </div>
442
- </header>
443
-
444
- <div class="nt-profile-menu__body">
445
- <a class="nt-profile-menu__item" href="/profile">
446
- <span class="nt-profile-menu__item-icon">👤</span>
447
- <span class="nt-profile-menu__item-main">
448
- <span class="nt-profile-menu__item-title">Profile</span>
449
- </span>
450
- </a>
451
-
452
- <a class="nt-profile-menu__item" href="/settings">
453
- <span class="nt-profile-menu__item-icon">⚙</span>
454
- <span class="nt-profile-menu__item-main">
455
- <span class="nt-profile-menu__item-title">Settings</span>
456
- </span>
457
- </a>
458
- </div>
459
- </div>
460
- ```
461
-
462
- ## AI prompt input
463
-
464
- ```html
465
- <form class="nt-ai-prompt-input">
466
- <div class="nt-ai-prompt-input__header">
467
- <div class="nt-ai-prompt-input__title" id="ai-prompt-label">
468
- <span class="nt-ai-prompt-input__title-icon">✦</span>
469
- Ask AI
470
- </div>
471
-
472
- <div class="nt-ai-prompt-input__meta">GPT</div>
473
- </div>
474
-
475
- <div class="nt-ai-prompt-input__body">
476
- <textarea
477
- class="nt-ai-prompt-input__textarea"
478
- aria-labelledby="ai-prompt-label"
479
- placeholder="Ask AI to plan your day..."
480
- ></textarea>
481
- </div>
482
-
483
- <footer class="nt-ai-prompt-input__footer">
484
- <div class="nt-ai-prompt-input__tools">
485
- <button class="nt-ai-prompt-input__tool" type="button">Calendar</button>
486
- <button class="nt-ai-prompt-input__tool" type="button">Company</button>
487
- </div>
488
-
489
- <div class="nt-ai-prompt-input__actions">
490
- <button class="nt-ai-prompt-input__submit" type="submit">
491
- Generate
492
- </button>
493
- </div>
494
- </footer>
495
- </form>
496
- ```
497
-
498
- ## AI proposal card
499
-
500
- ```html
501
- <section class="nt-ai-proposal-card">
502
- <header class="nt-ai-proposal-card__header">
503
- <span class="nt-ai-proposal-card__icon">✦</span>
504
-
505
- <div class="nt-ai-proposal-card__header-main">
506
- <span class="nt-ai-proposal-card__eyebrow">AI proposal</span>
507
- <h2 class="nt-ai-proposal-card__title">Schedule focus block</h2>
508
- <p class="nt-ai-proposal-card__description">
509
- AI found a free slot based on your calendar.
510
- </p>
511
- </div>
512
-
513
- <span class="nt-ai-proposal-card__confidence nt-ai-proposal-card__confidence--high">
514
- High confidence
515
- </span>
516
- </header>
517
-
518
- <div class="nt-ai-proposal-card__body">
519
- <div class="nt-ai-proposal-card__summary">
520
- <h3 class="nt-ai-proposal-card__summary-title">Summary</h3>
521
- <p class="nt-ai-proposal-card__summary-text">
522
- Create a 90-minute deep work session tomorrow morning.
523
- </p>
524
- </div>
525
- </div>
526
-
527
- <footer class="nt-ai-proposal-card__footer">
528
- <span class="nt-ai-proposal-card__footer-text">
529
- Review before applying.
530
- </span>
531
-
532
- <div class="nt-ai-proposal-card__actions">
533
- <button class="nt-button nt-button--secondary">Reject</button>
534
- <button class="nt-button nt-button--primary">Apply</button>
535
- </div>
536
- </footer>
537
- </section>
538
- ```
539
-
540
- ## Calendar month grid
541
-
542
- ```html
543
- <section class="nt-calendar-month-grid">
544
- <header class="nt-calendar-month-grid__header">
545
- <div class="nt-calendar-month-grid__header-main">
546
- <span class="nt-calendar-month-grid__eyebrow">Calendar</span>
547
- <h2 class="nt-calendar-month-grid__title">June 2026</h2>
548
- </div>
549
-
550
- <div class="nt-calendar-month-grid__actions">
551
- <button class="nt-button nt-button--secondary">Today</button>
552
- <button class="nt-button nt-button--primary">New event</button>
553
- </div>
554
- </header>
555
-
556
- <div class="nt-calendar-month-grid__body">
557
- <div class="nt-calendar-month-grid__weekdays">
558
- <div class="nt-calendar-month-grid__weekday">Mon</div>
559
- <div class="nt-calendar-month-grid__weekday">Tue</div>
560
- <div class="nt-calendar-month-grid__weekday">Wed</div>
561
- <div class="nt-calendar-month-grid__weekday">Thu</div>
562
- <div class="nt-calendar-month-grid__weekday">Fri</div>
563
- <div class="nt-calendar-month-grid__weekday">Sat</div>
564
- <div class="nt-calendar-month-grid__weekday">Sun</div>
565
- </div>
566
-
567
- <div class="nt-calendar-month-grid__days">
568
- <button class="nt-calendar-month-grid__day nt-calendar-month-grid__day--interactive">
569
- <span class="nt-calendar-month-grid__day-header">
570
- <span class="nt-calendar-month-grid__day-number">1</span>
571
- </span>
572
-
573
- <span class="nt-calendar-month-grid__events">
574
- <span class="nt-calendar-month-grid__event nt-calendar-month-grid__event--busy">
575
- <span class="nt-calendar-month-grid__event-dot"></span>
576
- <span class="nt-calendar-month-grid__event-title">Team sync</span>
577
- </span>
578
- </span>
579
- </button>
580
- </div>
581
- </div>
582
- </section>
583
- ```
584
-
585
- ## Billing document
586
-
587
- ```html
588
- <section class="nt-billing-document">
589
- <header class="nt-billing-document__header">
590
- <div class="nt-billing-document__header-main">
591
- <span class="nt-billing-document__eyebrow">Invoice</span>
592
- <h2 class="nt-billing-document__title">INV-1001</h2>
593
- <p class="nt-billing-document__description">Issued to Sydfix customer.</p>
594
- </div>
595
-
596
- <span class="nt-billing-status nt-billing-status--paid">
597
- <span class="nt-billing-status__dot"></span>
598
- Paid
599
- </span>
600
- </header>
601
-
602
- <div class="nt-billing-document__body">
603
- <div class="nt-billing-amount-list">
604
- <div class="nt-billing-amount-row">
605
- <span class="nt-billing-amount-row__label">Subtotal</span>
606
- <span class="nt-billing-amount-row__value">1,000 SEK</span>
607
- </div>
608
-
609
- <div class="nt-billing-amount-row nt-billing-amount-row--total">
610
- <span class="nt-billing-amount-row__label">Total</span>
611
- <span class="nt-billing-amount-row__value">1,250 SEK</span>
612
- </div>
613
- </div>
614
- </div>
615
- </section>
616
- ```
617
-
618
- Totals cards separate every row with `.nt-billing-amount-list--divided` and
619
- box the amount due with `.nt-billing-amount-row--grand`. Headers can keep the
620
- status inline with the reference via `.nt-billing-document__title-row` and
621
- `.nt-billing-document__status`. Workflow states outside the named set use the
622
- generic tones `.nt-billing-status--neutral`, `--info`, `--success`,
623
- `--warning`, `--danger` (the text always names the state). Dashboard metrics
624
- can show a tone bar (`.nt-billing-metric__accent`), an info tone
625
- (`.nt-billing-metric--info`), and a headline size
626
- (`.nt-billing-metric--prominent`); new dashboards should prefer the
627
- domain-neutral `.nt-stat` card.
628
-
629
- ```html
630
- <div class="nt-billing-amount-list nt-billing-amount-list--divided">
631
- <div class="nt-billing-amount-row">
632
- <span class="nt-billing-amount-row__label">VAT 25%</span>
633
- <span class="nt-billing-amount-row__value">250 SEK</span>
634
- </div>
635
- <div class="nt-billing-amount-row nt-billing-amount-row--grand">
636
- <span class="nt-billing-amount-row__label">Amount due</span>
637
- <span class="nt-billing-amount-row__value">1,250 SEK</span>
638
- </div>
639
- </div>
640
- ```
641
-
642
- ## TypeScript helpers
643
-
644
- ```ts
645
- import {
646
- ntCreateCalendarGrid,
647
- ntCreateDataGrid,
648
- ntCreateDialog,
649
- ntCreateDrawer,
650
- ntCreateDropdown,
651
- ntCreateMenu,
652
- ntCreateTabs,
653
- } from '@neetechs/ui/behaviors';
654
- ```
655
-
656
- ## Accessibility
657
-
658
- The package targets WCAG 2.2 AA as an engineering baseline, not a certification. Native HTML remains required: CSS classes do not add roles, names, labels, or keyboard behavior. Shared helpers cover tabs, menus, modal focus management, data-grid navigation, calendar-grid navigation, form relationships, and announcements.
659
-
660
- See [docs/accessibility.md](./docs/accessibility.md) for component contracts and manual checks. Repository verification includes:
661
-
662
- ```bash
663
- npm run check:a11y
664
- npm run test:browser
665
- ```
666
-
667
- Dropdown example:
668
-
669
- ```ts
670
- import { ntCreateDropdown } from '@neetechs/ui/behaviors';
671
-
672
- const trigger = document.querySelector<HTMLElement>('#profile-trigger');
673
- const content = document.querySelector<HTMLElement>('#profile-menu');
674
-
675
- if (trigger && content) {
676
- ntCreateDropdown({
677
- trigger,
678
- content,
679
- });
680
- }
681
- ```
682
-
683
- Dialog example:
684
-
685
- ```ts
686
- import { ntCreateDialog } from '@neetechs/ui/behaviors';
687
-
688
- const trigger = document.querySelector<HTMLElement>('#open-dialog');
689
- const dialog = document.querySelector<HTMLElement>('#dialog');
690
- const backdrop = document.querySelector<HTMLElement>('#dialog-backdrop');
691
- const title = document.querySelector<HTMLElement>('#dialog-title');
692
-
693
- if (dialog) {
694
- ntCreateDialog({
695
- trigger,
696
- dialog,
697
- backdrop,
698
- title,
699
- });
700
- }
701
- ```
702
-
703
- Drawer example:
704
-
705
- ```ts
706
- import { ntCreateDrawer } from '@neetechs/ui/behaviors';
707
-
708
- const trigger = document.querySelector<HTMLElement>('#open-drawer');
709
- const drawer = document.querySelector<HTMLElement>('#drawer');
710
- const backdrop = document.querySelector<HTMLElement>('#drawer-backdrop');
711
-
712
- if (drawer) {
713
- ntCreateDrawer({
714
- trigger,
715
- drawer,
716
- backdrop,
717
- placement: 'inline-end',
718
- });
719
- }
720
- ```
721
-
722
- ## Canonical components and compatibility
723
-
724
- Modal is a mode of the canonical dialog controller. `ntCreateModal`, `.nt-modal*`, and `@neetechs/ui/components/modal.css` remain deprecated compatibility contracts; new code uses `ntCreateDialog({ modal: true })` and dialog classes. Drawers use logical `placement`; the old right-drawer CSS path/classes remain mapped to the canonical drawer source. Company and workspace switchers retain distinct product class names while sharing one visual/menu foundation.
725
-
726
- Native read-only tables use `@neetechs/ui/components/table.css`. Use data grid only for genuinely interactive two-dimensional data. See [docs/component-architecture.md](./docs/component-architecture.md) for the complete decision and deprecation matrix.
727
-
728
- Architecture verification:
729
-
730
- ```bash
731
- npm run check:architecture
732
- ```
733
-
734
- ## Package exports
735
-
736
- Main TypeScript export:
737
-
738
- ```ts
739
- import { NEETECHS_UI_PACKAGE, NEETECHS_UI_VERSION } from '@neetechs/ui';
740
- ```
741
-
742
- Behavior helpers:
743
-
744
- ```ts
745
- import { ntCreateDropdown } from '@neetechs/ui/behaviors';
746
- ```
747
-
748
- CSS exports:
749
-
750
- ```txt
751
- @neetechs/ui/styles.css
752
- @neetechs/ui/base.css
753
- @neetechs/ui/tokens.css
754
- @neetechs/ui/reset.css
755
- @neetechs/ui/shell.css
756
- @neetechs/ui/components.css
757
- @neetechs/ui/patterns.css
758
- @neetechs/ui/ai.css
759
- @neetechs/ui/domain.css
760
- @neetechs/ui/domain/calendar.css
761
- @neetechs/ui/domain/billing.css
762
- @neetechs/ui/domain/companies.css
763
- ```
764
-
765
- ## Framework usage
766
-
767
- ### Angular
768
-
769
- In `styles.scss`:
770
-
771
- ```scss
772
- @import '@neetechs/ui/styles.css';
773
- ```
774
-
775
- Or in `angular.json` styles:
776
-
777
- ```json
778
- [
779
- "node_modules/@neetechs/ui/src/index.css",
780
- "src/styles.scss"
781
- ]
782
- ```
783
-
784
- ### React / Next.js
785
-
786
- In your root layout or app entry:
787
-
788
- ```ts
789
- import '@neetechs/ui/styles.css';
790
- ```
791
-
792
- ### Plain HTML
793
-
794
- ```html
795
- <link rel="stylesheet" href="/node_modules/@neetechs/ui/src/index.css" />
796
- ```
797
-
798
- For production, serve the built CSS from your bundler output instead of directly referencing `node_modules`.
799
-
800
- ## Current package structure
801
-
802
- ```txt
803
- packages/ui
804
- src
805
- styles
806
- tokens
807
- themes
808
- utilities
809
- animations
810
- shell
811
- components
812
- patterns
813
- ai
814
- domain
815
- calendar
816
- billing
817
- companies
818
- behaviors
819
- types
820
- docs
821
- ```
822
-
823
- ## What belongs here
824
-
825
- Good:
826
-
827
- ```txt
828
- CSS tokens
829
- themes
830
- base/reset styles
831
- utility CSS
832
- component CSS classes
833
- shell CSS
834
- AI UI CSS
835
- domain UI CSS
836
- pure TypeScript DOM helpers
837
- ```
838
-
839
- Bad:
840
-
841
- ```txt
842
- Angular components
843
- React components
844
- business API calls
845
- Tailwind config
846
- Bootstrap overrides
847
- Angular Material wrappers
848
- app-specific routing
849
- backend logic
850
- ```
851
-
852
- ## Wrapper packages later
853
-
854
- These should be separate packages:
855
-
856
- ```txt
857
- @neetechs/ui-angular
858
- @neetechs/ui-react
859
- ```
860
-
861
- Do not put wrappers inside `@neetechs/ui`.
1
+ # @neetechs/ui
2
+
3
+ Official framework-agnostic Neetechs UI design system.
4
+
5
+ ## Responsive and adaptive behavior
6
+
7
+ Reusable components respond to their *container*, not the viewport: the shell content area, dialog and drawer bodies, tables, data grids, and forms are query containers, and `.nt-region` makes any dashboard column or split pane one. Viewport media queries are reserved for shell-level layout and use a documented rem scale (30/40/48/64/80rem — mirrored by `NT_VIEWPORTS` in `@neetechs/ui/behaviors`). Mobile contracts include the `.nt-mobile-nav` drawer shell mode, table priority columns and row details, data-grid constrained/record modes, the `.nt-calendar-agenda` phone calendar, dvh-safe full-height utilities (`.nt-fill-viewport`), safe-area padding, and coarse-pointer touch targets. See [docs/responsive-and-adaptive-design.md](./docs/responsive-and-adaptive-design.md).
8
+
9
+ ```bash
10
+ npm run check:responsive
11
+ ```
12
+
13
+ ## Page patterns and content standards
14
+
15
+ Shared page anatomy (`.nt-page-header`, `.nt-page-toolbar`, `.nt-page-section`, `.nt-page-footer-actions`), responsive forms (`.nt-form`), settings layouts, master-detail, and multi-step workflow patterns are documented in [docs/page-patterns-and-workflows.md](./docs/page-patterns-and-workflows.md). Terminology, action-label, validation, empty-state, confirmation, and AI-copy rules live in [docs/content-and-terminology.md](./docs/content-and-terminology.md) and are enforced for repository-owned fixtures by:
16
+
17
+ ```bash
18
+ npm run check:content
19
+ ```
20
+
21
+ ## Localization and RTL
22
+
23
+ Use native document metadata; components inherit nested direction changes:
24
+
25
+ ```html
26
+ <html lang="ar" dir="rtl">
27
+ <code dir="ltr" class="nt-technical-value">POST /api/v1/invoices</code>
28
+ </html>
29
+ ```
30
+
31
+ Use `.nt-icon--directional` only for arrows whose inline meaning should mirror. Explicit-locale number/date helpers are exported from `@neetechs/ui/localization`. Applications provide translations, locale/time-zone selection, and approved font loading. See [the RTL and localization contract](./docs/localization-and-rtl.md).
32
+
33
+ `@neetechs/ui` is pure CSS + pure TypeScript helpers. It does not depend on Angular, React, Next.js, Bootstrap, Tailwind, or Angular Material.
34
+
35
+ Use it in:
36
+
37
+ - Angular
38
+ - React
39
+ - Next.js
40
+ - plain JavaScript
41
+ - plain HTML
42
+ - future Neetechs apps
43
+
44
+ ## Core rules
45
+
46
+ - Use `nt-` class prefix.
47
+ - Use `--nt-` token prefix.
48
+ - Do not hardcode component colors.
49
+ - Components must consume design tokens.
50
+ - Keep this base package framework-agnostic.
51
+ - Build Angular or React wrappers later, outside this package.
52
+
53
+ ## Install
54
+
55
+ ```bash
56
+ npm install @neetechs/ui
57
+ ```
58
+
59
+ ## Import all styles
60
+
61
+ In TypeScript or JavaScript:
62
+
63
+ ```ts
64
+ import '@neetechs/ui/styles.css';
65
+ ```
66
+
67
+ In CSS:
68
+
69
+ ```css
70
+ @import '@neetechs/ui/styles.css';
71
+ ```
72
+
73
+ This imports:
74
+
75
+ ```txt
76
+ styles
77
+ shell
78
+ components
79
+ patterns
80
+ ai
81
+ domain
82
+ ```
83
+
84
+ ## Import only what you need
85
+
86
+ ```css
87
+ @import '@neetechs/ui/base.css';
88
+ @import '@neetechs/ui/shell.css';
89
+ @import '@neetechs/ui/components.css';
90
+ @import '@neetechs/ui/patterns.css';
91
+ @import '@neetechs/ui/ai.css';
92
+ @import '@neetechs/ui/domain.css';
93
+ ```
94
+
95
+ Specific CSS entry points:
96
+
97
+ ```css
98
+ @import '@neetechs/ui/components/button.css';
99
+ @import '@neetechs/ui/components/input.css';
100
+ @import '@neetechs/ui/components/card.css';
101
+ @import '@neetechs/ui/components/dropdown.css';
102
+ @import '@neetechs/ui/patterns/company-switcher.css';
103
+ @import '@neetechs/ui/patterns/profile-menu.css';
104
+ @import '@neetechs/ui/ai/ai-prompt-input.css';
105
+ @import '@neetechs/ui/domain/calendar.css';
106
+ @import '@neetechs/ui/domain/billing.css';
107
+ @import '@neetechs/ui/domain/companies.css';
108
+ ```
109
+
110
+ ## Default brand colors
111
+
112
+ Neetechs now defaults to a softer navy dark theme with a blue product accent.
113
+ The canonical palette, accessible foreground rules, and rollout notes are in
114
+ [docs/brand-palette.md](./docs/brand-palette.md). Existing saved accent preferences
115
+ continue to work (including orange); applications must resolve appearance from
116
+ the backend rather than overriding user choices.
117
+
118
+ ## Theme setup
119
+
120
+ For the shared SSR-safe appearance system, use `@neetechs/ui/appearance` and
121
+ see [docs/appearance-and-theming.md](./docs/appearance-and-theming.md).
122
+
123
+ ```ts
124
+ import { bootstrapNeetechsAppearance, createAppearanceController } from '@neetechs/ui/appearance';
125
+
126
+ bootstrapNeetechsAppearance(); // before framework rendering
127
+ const appearance = createAppearanceController();
128
+ appearance.initialize();
129
+ ```
130
+
131
+ To avoid a theme flash on client-rendered pages, emit the pre-paint bootstrap
132
+ as an inline script in `<head>` (server/build time). It reads the same cookie
133
+ and cache as the controller and only sets root attributes:
134
+
135
+ ```ts
136
+ import { ntAppearanceBootstrapScript } from '@neetechs/ui/appearance';
137
+
138
+ const headScript = `<script>${ntAppearanceBootstrapScript()}</script>`;
139
+ ```
140
+
141
+ Switch one dimension without resetting the others (saved accent and density
142
+ are kept):
143
+
144
+ ```ts
145
+ appearance.updatePreference({ theme: 'light' });
146
+ ```
147
+
148
+ The controller applies the public contract to the root `html` element.
149
+
150
+ ```html
151
+ <html data-nt-theme="dark" data-nt-theme-preference="system"
152
+ data-nt-accent="blue" data-nt-density="comfortable"
153
+ data-nt-contrast="normal" data-nt-motion="full">
154
+ ...
155
+ </html>
156
+ ```
157
+
158
+ Supported preferences are `system`, `light`, and `dark`; resolved themes are:
159
+
160
+ ```txt
161
+ dark
162
+ light
163
+ ```
164
+
165
+ Supported accents:
166
+
167
+ ```txt
168
+ orange
169
+ blue
170
+ green
171
+ purple
172
+ neutral
173
+ ```
174
+
175
+ Supported density:
176
+
177
+ ```txt
178
+ compact
179
+ comfortable
180
+ spacious
181
+ ```
182
+
183
+ ## Recommended app setup
184
+
185
+ For a full Neetechs app, import the full stylesheet once at the app root:
186
+
187
+ ```ts
188
+ import '@neetechs/ui/styles.css';
189
+ ```
190
+
191
+ Then initialize appearance before rendering. Do not create a competing body-level theme:
192
+
193
+ ```html
194
+ <body>
195
+ <div class="nt-app-shell">
196
+ ...
197
+ </div>
198
+ </body>
199
+ ```
200
+
201
+ Do not import random component CSS files all over the app unless you are intentionally optimizing bundle size. For most Neetechs apps, one root import is cleaner.
202
+
203
+ ## Basic button
204
+
205
+ ```html
206
+ <button class="nt-button nt-button--primary">
207
+ Save changes
208
+ </button>
209
+
210
+ <button class="nt-button nt-button--secondary">
211
+ Cancel
212
+ </button>
213
+
214
+ <button class="nt-button nt-button--ghost">
215
+ More
216
+ </button>
217
+ ```
218
+
219
+ Async actions keep their visible name, expose busy state, and prevent accidental duplicate activation without treating pending as native disabled:
220
+
221
+ ```ts
222
+ import { ntCreateAsyncAction } from '@neetechs/ui';
223
+
224
+ const save = ntCreateAsyncAction({
225
+ control: document.querySelector<HTMLButtonElement>('#save')!,
226
+ async run(_event, signal) {
227
+ await saveChanges({ signal });
228
+ },
229
+ });
230
+ ```
231
+
232
+ ```html
233
+ <button id="save" class="nt-button nt-button--primary">
234
+ Save changes
235
+ </button>
236
+ ```
237
+
238
+ ## Button group
239
+
240
+ ```html
241
+ <div class="nt-button-group nt-button-group--attached" role="group" aria-label="Text alignment">
242
+ <button class="nt-button nt-button--secondary" type="button" aria-pressed="true">Start</button>
243
+ <button class="nt-button nt-button--secondary" type="button" aria-pressed="false">Center</button>
244
+ </div>
245
+ ```
246
+
247
+ Spaced by default; `--attached` joins buttons, `--vertical` stacks them, `--full`
248
+ stretches them. Pressed state uses `aria-pressed` (color plus an inset ring).
249
+
250
+ ## Popover
251
+
252
+ Non-modal panel for rich content such as filters or quick settings:
253
+
254
+ ```html
255
+ <div class="nt-popover">
256
+ <button class="nt-button nt-button--secondary" type="button" id="filters-trigger">Filters</button>
257
+ <div class="nt-popover__content" id="filters" aria-labelledby="filters-title" hidden>
258
+ <div class="nt-popover__header"><h3 class="nt-popover__title" id="filters-title">Filter invoices</h3></div>
259
+ <div class="nt-popover__body">...</div>
260
+ </div>
261
+ </div>
262
+ ```
263
+
264
+ ```ts
265
+ import { ntCreatePopover } from '@neetechs/ui/behaviors';
266
+
267
+ ntCreatePopover({
268
+ trigger: document.querySelector<HTMLElement>('#filters-trigger')!,
269
+ content: document.querySelector<HTMLElement>('#filters')!,
270
+ });
271
+ ```
272
+
273
+ Full catalog of components and behaviors: [docs/components.md](./docs/components.md).
274
+ Opt-in glass surfaces, the glass sidebar and connected shell, sliding selection, dock, floating action menu, and the motion tokens: [docs/glass-and-motion.md](./docs/glass-and-motion.md).
275
+
276
+ ## Basic input
277
+
278
+ ```html
279
+ <label class="nt-field">
280
+ <span class="nt-field__label">Company name</span>
281
+ <input class="nt-input" placeholder="Neetechs" />
282
+ <span class="nt-field__help">Used across your workspace.</span>
283
+ </label>
284
+ ```
285
+
286
+ Invalid input:
287
+
288
+ ```html
289
+ <label class="nt-field">
290
+ <span class="nt-field__label" id="email-label">Email</span>
291
+ <input id="email" class="nt-input" aria-labelledby="email-label"
292
+ aria-describedby="email-error" aria-invalid="true" />
293
+ <span id="email-error" class="nt-field__error">Enter a valid email.</span>
294
+ </label>
295
+ ```
296
+
297
+ For full form submission state, use `ntConnectField`, `ntFocusErrorSummary`, and `ntCreateFormController` from `@neetechs/ui`.
298
+
299
+ ## Feedback and recovery
300
+
301
+ New content-state work uses the shared pattern:
302
+
303
+ ```html
304
+ <section class="nt-content-state nt-content-state--section"
305
+ data-nt-content-state="offline"
306
+ aria-labelledby="offline-title">
307
+ <h2 id="offline-title" class="nt-content-state__title">Connection lost</h2>
308
+ <p class="nt-content-state__description">
309
+ Cached records are still visible. Retry when the connection returns.
310
+ </p>
311
+ <div class="nt-content-state__actions">
312
+ <button class="nt-button nt-button--secondary">Retry</button>
313
+ </div>
314
+ </section>
315
+ ```
316
+
317
+ `ntCreateToastController` manages toast semantics, dedupe, stack limits, pause-on-hover/focus, and cleanup. Use toasts for brief noncritical feedback, not field validation, permission-denied pages, or irreversible-action confirmation.
318
+
319
+ See [docs/states-feedback-and-recovery.md](./docs/states-feedback-and-recovery.md) for the canonical state vocabulary, forms, loading, empty/error/offline patterns, confirmations, unsaved changes, AI write-action approval, and recovery rules.
320
+
321
+ ## Card
322
+
323
+ ```html
324
+ <section class="nt-card">
325
+ <header class="nt-card__header">
326
+ <div class="nt-card__header-main">
327
+ <p class="nt-card__eyebrow">Workspace</p>
328
+ <h2 class="nt-card__title">Company Center</h2>
329
+ <p class="nt-card__subtitle">
330
+ Manage companies, branding, team, and billing.
331
+ </p>
332
+ </div>
333
+
334
+ <div class="nt-card__actions">
335
+ <button class="nt-button nt-button--secondary">Settings</button>
336
+ </div>
337
+ </header>
338
+
339
+ <div class="nt-card__body">
340
+ <p>Put your content here.</p>
341
+ </div>
342
+
343
+ <footer class="nt-card__footer">
344
+ <span class="nt-card__meta">Updated today</span>
345
+ <button class="nt-button nt-button--primary">Open</button>
346
+ </footer>
347
+ </section>
348
+ ```
349
+
350
+ ## App shell
351
+
352
+ ```html
353
+ <div class="nt-app-shell">
354
+ <aside class="nt-app-shell__sidebar nt-sidebar">
355
+ ...
356
+ </aside>
357
+
358
+ <div class="nt-app-shell__main">
359
+ <header class="nt-app-shell__header nt-header">
360
+ ...
361
+ </header>
362
+
363
+ <main class="nt-app-shell__content nt-content-frame">
364
+ ...
365
+ </main>
366
+ </div>
367
+ </div>
368
+ ```
369
+
370
+ ## Site chrome: header, navbar, account, mobile nav, footer
371
+
372
+ Reusable website chrome with configurable logo, navigation, account actions,
373
+ footer columns, and social links. Routing, auth, and URLs stay in the app.
374
+
375
+ ```ts
376
+ import { ntCreateAccountMenu, ntCreateMobileNav, ntCreateNavbar } from '@neetechs/ui/behaviors';
377
+ ```
378
+
379
+ ```html
380
+ <header class="nt-header nt-header--sticky">
381
+ <div class="nt-header__left">
382
+ <a class="nt-header__brand" href="/"><span class="nt-header__brand-name">Neetechs</span></a>
383
+ </div>
384
+ <div class="nt-header__nav"><nav class="nt-navbar" aria-label="Primary">...</nav></div>
385
+ <div class="nt-header__right">...</div>
386
+ </header>
387
+ <footer class="nt-footer">...</footer>
388
+ ```
389
+
390
+ Full markup, keyboard contract, and examples: [docs/site-chrome.md](./docs/site-chrome.md).
391
+ Stacking rules: [docs/layering.md](./docs/layering.md).
392
+
393
+ ## Company switcher
394
+
395
+ ```html
396
+ <div class="nt-company-switcher">
397
+ <header class="nt-company-switcher__header">
398
+ <div class="nt-company-switcher__header-main">
399
+ <span class="nt-company-switcher__eyebrow">Active company</span>
400
+ <h2 class="nt-company-switcher__title">Switch company</h2>
401
+ <p class="nt-company-switcher__description">
402
+ Choose the company you want to manage.
403
+ </p>
404
+ </div>
405
+ </header>
406
+
407
+ <div class="nt-company-switcher__body">
408
+ <button class="nt-company-switcher__item nt-company-switcher__item--active">
409
+ <span class="nt-company-switcher__logo">SD</span>
410
+
411
+ <span class="nt-company-switcher__item-main">
412
+ <span class="nt-company-switcher__name">Sydfix</span>
413
+ <span class="nt-company-switcher__meta">
414
+ <span class="nt-company-switcher__country">SE</span>
415
+ <span class="nt-company-switcher__role">owner</span>
416
+ <span class="nt-company-switcher__currency">SEK</span>
417
+ </span>
418
+ </span>
419
+
420
+ <span class="nt-company-switcher__check">✓</span>
421
+ </button>
422
+ </div>
423
+
424
+ <footer class="nt-company-switcher__footer">
425
+ <a class="nt-company-switcher__footer-action" href="/companies/create">
426
+ Create company
427
+ </a>
428
+ </footer>
429
+ </div>
430
+ ```
431
+
432
+ ## Profile menu
433
+
434
+ ```html
435
+ <div class="nt-profile-menu">
436
+ <header class="nt-profile-menu__header">
437
+ <span class="nt-avatar">SJ</span>
438
+
439
+ <div class="nt-profile-menu__identity">
440
+ <span class="nt-profile-menu__name">Sayed Jihad ElSayed</span>
441
+ <span class="nt-profile-menu__email">jelsayed@uab.edu</span>
442
+ </div>
443
+ </header>
444
+
445
+ <div class="nt-profile-menu__body">
446
+ <a class="nt-profile-menu__item" href="/profile">
447
+ <span class="nt-profile-menu__item-icon">👤</span>
448
+ <span class="nt-profile-menu__item-main">
449
+ <span class="nt-profile-menu__item-title">Profile</span>
450
+ </span>
451
+ </a>
452
+
453
+ <a class="nt-profile-menu__item" href="/settings">
454
+ <span class="nt-profile-menu__item-icon">⚙</span>
455
+ <span class="nt-profile-menu__item-main">
456
+ <span class="nt-profile-menu__item-title">Settings</span>
457
+ </span>
458
+ </a>
459
+ </div>
460
+ </div>
461
+ ```
462
+
463
+ ## AI prompt input
464
+
465
+ ```html
466
+ <form class="nt-ai-prompt-input">
467
+ <div class="nt-ai-prompt-input__header">
468
+ <div class="nt-ai-prompt-input__title" id="ai-prompt-label">
469
+ <span class="nt-ai-prompt-input__title-icon">✦</span>
470
+ Ask AI
471
+ </div>
472
+
473
+ <div class="nt-ai-prompt-input__meta">GPT</div>
474
+ </div>
475
+
476
+ <div class="nt-ai-prompt-input__body">
477
+ <textarea
478
+ class="nt-ai-prompt-input__textarea"
479
+ aria-labelledby="ai-prompt-label"
480
+ placeholder="Ask AI to plan your day..."
481
+ ></textarea>
482
+ </div>
483
+
484
+ <footer class="nt-ai-prompt-input__footer">
485
+ <div class="nt-ai-prompt-input__tools">
486
+ <button class="nt-ai-prompt-input__tool" type="button">Calendar</button>
487
+ <button class="nt-ai-prompt-input__tool" type="button">Company</button>
488
+ </div>
489
+
490
+ <div class="nt-ai-prompt-input__actions">
491
+ <button class="nt-ai-prompt-input__submit" type="submit">
492
+ Generate
493
+ </button>
494
+ </div>
495
+ </footer>
496
+ </form>
497
+ ```
498
+
499
+ ## AI proposal card
500
+
501
+ ```html
502
+ <section class="nt-ai-proposal-card">
503
+ <header class="nt-ai-proposal-card__header">
504
+ <span class="nt-ai-proposal-card__icon">✦</span>
505
+
506
+ <div class="nt-ai-proposal-card__header-main">
507
+ <span class="nt-ai-proposal-card__eyebrow">AI proposal</span>
508
+ <h2 class="nt-ai-proposal-card__title">Schedule focus block</h2>
509
+ <p class="nt-ai-proposal-card__description">
510
+ AI found a free slot based on your calendar.
511
+ </p>
512
+ </div>
513
+
514
+ <span class="nt-ai-proposal-card__confidence nt-ai-proposal-card__confidence--high">
515
+ High confidence
516
+ </span>
517
+ </header>
518
+
519
+ <div class="nt-ai-proposal-card__body">
520
+ <div class="nt-ai-proposal-card__summary">
521
+ <h3 class="nt-ai-proposal-card__summary-title">Summary</h3>
522
+ <p class="nt-ai-proposal-card__summary-text">
523
+ Create a 90-minute deep work session tomorrow morning.
524
+ </p>
525
+ </div>
526
+ </div>
527
+
528
+ <footer class="nt-ai-proposal-card__footer">
529
+ <span class="nt-ai-proposal-card__footer-text">
530
+ Review before applying.
531
+ </span>
532
+
533
+ <div class="nt-ai-proposal-card__actions">
534
+ <button class="nt-button nt-button--secondary">Reject</button>
535
+ <button class="nt-button nt-button--primary">Apply</button>
536
+ </div>
537
+ </footer>
538
+ </section>
539
+ ```
540
+
541
+ ## Calendar month grid
542
+
543
+ ```html
544
+ <section class="nt-calendar-month-grid">
545
+ <header class="nt-calendar-month-grid__header">
546
+ <div class="nt-calendar-month-grid__header-main">
547
+ <span class="nt-calendar-month-grid__eyebrow">Calendar</span>
548
+ <h2 class="nt-calendar-month-grid__title">June 2026</h2>
549
+ </div>
550
+
551
+ <div class="nt-calendar-month-grid__actions">
552
+ <button class="nt-button nt-button--secondary">Today</button>
553
+ <button class="nt-button nt-button--primary">New event</button>
554
+ </div>
555
+ </header>
556
+
557
+ <div class="nt-calendar-month-grid__body">
558
+ <div class="nt-calendar-month-grid__weekdays">
559
+ <div class="nt-calendar-month-grid__weekday">Mon</div>
560
+ <div class="nt-calendar-month-grid__weekday">Tue</div>
561
+ <div class="nt-calendar-month-grid__weekday">Wed</div>
562
+ <div class="nt-calendar-month-grid__weekday">Thu</div>
563
+ <div class="nt-calendar-month-grid__weekday">Fri</div>
564
+ <div class="nt-calendar-month-grid__weekday">Sat</div>
565
+ <div class="nt-calendar-month-grid__weekday">Sun</div>
566
+ </div>
567
+
568
+ <div class="nt-calendar-month-grid__days">
569
+ <button class="nt-calendar-month-grid__day nt-calendar-month-grid__day--interactive">
570
+ <span class="nt-calendar-month-grid__day-header">
571
+ <span class="nt-calendar-month-grid__day-number">1</span>
572
+ </span>
573
+
574
+ <span class="nt-calendar-month-grid__events">
575
+ <span class="nt-calendar-month-grid__event nt-calendar-month-grid__event--busy">
576
+ <span class="nt-calendar-month-grid__event-dot"></span>
577
+ <span class="nt-calendar-month-grid__event-title">Team sync</span>
578
+ </span>
579
+ </span>
580
+ </button>
581
+ </div>
582
+ </div>
583
+ </section>
584
+ ```
585
+
586
+ ## Billing document
587
+
588
+ ```html
589
+ <section class="nt-billing-document">
590
+ <header class="nt-billing-document__header">
591
+ <div class="nt-billing-document__header-main">
592
+ <span class="nt-billing-document__eyebrow">Invoice</span>
593
+ <h2 class="nt-billing-document__title">INV-1001</h2>
594
+ <p class="nt-billing-document__description">Issued to Sydfix customer.</p>
595
+ </div>
596
+
597
+ <span class="nt-billing-status nt-billing-status--paid">
598
+ <span class="nt-billing-status__dot"></span>
599
+ Paid
600
+ </span>
601
+ </header>
602
+
603
+ <div class="nt-billing-document__body">
604
+ <div class="nt-billing-amount-list">
605
+ <div class="nt-billing-amount-row">
606
+ <span class="nt-billing-amount-row__label">Subtotal</span>
607
+ <span class="nt-billing-amount-row__value">1,000 SEK</span>
608
+ </div>
609
+
610
+ <div class="nt-billing-amount-row nt-billing-amount-row--total">
611
+ <span class="nt-billing-amount-row__label">Total</span>
612
+ <span class="nt-billing-amount-row__value">1,250 SEK</span>
613
+ </div>
614
+ </div>
615
+ </div>
616
+ </section>
617
+ ```
618
+
619
+ Totals cards separate every row with `.nt-billing-amount-list--divided` and
620
+ box the amount due with `.nt-billing-amount-row--grand`. Headers can keep the
621
+ status inline with the reference via `.nt-billing-document__title-row` and
622
+ `.nt-billing-document__status`. Workflow states outside the named set use the
623
+ generic tones `.nt-billing-status--neutral`, `--info`, `--success`,
624
+ `--warning`, `--danger` (the text always names the state). Dashboard metrics
625
+ can show a tone bar (`.nt-billing-metric__accent`), an info tone
626
+ (`.nt-billing-metric--info`), and a headline size
627
+ (`.nt-billing-metric--prominent`); new dashboards should prefer the
628
+ domain-neutral `.nt-stat` card.
629
+
630
+ ```html
631
+ <div class="nt-billing-amount-list nt-billing-amount-list--divided">
632
+ <div class="nt-billing-amount-row">
633
+ <span class="nt-billing-amount-row__label">VAT 25%</span>
634
+ <span class="nt-billing-amount-row__value">250 SEK</span>
635
+ </div>
636
+ <div class="nt-billing-amount-row nt-billing-amount-row--grand">
637
+ <span class="nt-billing-amount-row__label">Amount due</span>
638
+ <span class="nt-billing-amount-row__value">1,250 SEK</span>
639
+ </div>
640
+ </div>
641
+ ```
642
+
643
+ ## TypeScript helpers
644
+
645
+ ```ts
646
+ import {
647
+ ntCreateCalendarGrid,
648
+ ntCreateDataGrid,
649
+ ntCreateDialog,
650
+ ntCreateDrawer,
651
+ ntCreateDropdown,
652
+ ntCreateMenu,
653
+ ntCreateTabs,
654
+ } from '@neetechs/ui/behaviors';
655
+ ```
656
+
657
+ ## Accessibility
658
+
659
+ The package targets WCAG 2.2 AA as an engineering baseline, not a certification. Native HTML remains required: CSS classes do not add roles, names, labels, or keyboard behavior. Shared helpers cover tabs, menus, modal focus management, data-grid navigation, calendar-grid navigation, form relationships, and announcements.
660
+
661
+ See [docs/accessibility.md](./docs/accessibility.md) for component contracts and manual checks. Repository verification includes:
662
+
663
+ ```bash
664
+ npm run check:a11y
665
+ npm run test:browser
666
+ ```
667
+
668
+ Dropdown example:
669
+
670
+ ```ts
671
+ import { ntCreateDropdown } from '@neetechs/ui/behaviors';
672
+
673
+ const trigger = document.querySelector<HTMLElement>('#profile-trigger');
674
+ const content = document.querySelector<HTMLElement>('#profile-menu');
675
+
676
+ if (trigger && content) {
677
+ ntCreateDropdown({
678
+ trigger,
679
+ content,
680
+ });
681
+ }
682
+ ```
683
+
684
+ Dialog example:
685
+
686
+ ```ts
687
+ import { ntCreateDialog } from '@neetechs/ui/behaviors';
688
+
689
+ const trigger = document.querySelector<HTMLElement>('#open-dialog');
690
+ const dialog = document.querySelector<HTMLElement>('#dialog');
691
+ const backdrop = document.querySelector<HTMLElement>('#dialog-backdrop');
692
+ const title = document.querySelector<HTMLElement>('#dialog-title');
693
+
694
+ if (dialog) {
695
+ ntCreateDialog({
696
+ trigger,
697
+ dialog,
698
+ backdrop,
699
+ title,
700
+ });
701
+ }
702
+ ```
703
+
704
+ Drawer example:
705
+
706
+ ```ts
707
+ import { ntCreateDrawer } from '@neetechs/ui/behaviors';
708
+
709
+ const trigger = document.querySelector<HTMLElement>('#open-drawer');
710
+ const drawer = document.querySelector<HTMLElement>('#drawer');
711
+ const backdrop = document.querySelector<HTMLElement>('#drawer-backdrop');
712
+
713
+ if (drawer) {
714
+ ntCreateDrawer({
715
+ trigger,
716
+ drawer,
717
+ backdrop,
718
+ placement: 'inline-end',
719
+ });
720
+ }
721
+ ```
722
+
723
+ ## Canonical components and compatibility
724
+
725
+ Modal is a mode of the canonical dialog controller. `ntCreateModal`, `.nt-modal*`, and `@neetechs/ui/components/modal.css` remain deprecated compatibility contracts; new code uses `ntCreateDialog({ modal: true })` and dialog classes. Drawers use logical `placement`; the old right-drawer CSS path/classes remain mapped to the canonical drawer source. Company and workspace switchers retain distinct product class names while sharing one visual/menu foundation.
726
+
727
+ Native read-only tables use `@neetechs/ui/components/table.css`. Use data grid only for genuinely interactive two-dimensional data. See [docs/component-architecture.md](./docs/component-architecture.md) for the complete decision and deprecation matrix.
728
+
729
+ Architecture verification:
730
+
731
+ ```bash
732
+ npm run check:architecture
733
+ ```
734
+
735
+ ## Package exports
736
+
737
+ Main TypeScript export:
738
+
739
+ ```ts
740
+ import { NEETECHS_UI_PACKAGE, NEETECHS_UI_VERSION } from '@neetechs/ui';
741
+ ```
742
+
743
+ Behavior helpers:
744
+
745
+ ```ts
746
+ import { ntCreateDropdown } from '@neetechs/ui/behaviors';
747
+ ```
748
+
749
+ CSS exports:
750
+
751
+ ```txt
752
+ @neetechs/ui/styles.css
753
+ @neetechs/ui/base.css
754
+ @neetechs/ui/tokens.css
755
+ @neetechs/ui/reset.css
756
+ @neetechs/ui/shell.css
757
+ @neetechs/ui/components.css
758
+ @neetechs/ui/patterns.css
759
+ @neetechs/ui/ai.css
760
+ @neetechs/ui/domain.css
761
+ @neetechs/ui/domain/calendar.css
762
+ @neetechs/ui/domain/billing.css
763
+ @neetechs/ui/domain/companies.css
764
+ ```
765
+
766
+ ## Framework usage
767
+
768
+ ### Angular
769
+
770
+ In `styles.scss`:
771
+
772
+ ```scss
773
+ @import '@neetechs/ui/styles.css';
774
+ ```
775
+
776
+ Or in `angular.json` styles:
777
+
778
+ ```json
779
+ [
780
+ "node_modules/@neetechs/ui/src/index.css",
781
+ "src/styles.scss"
782
+ ]
783
+ ```
784
+
785
+ ### React / Next.js
786
+
787
+ In your root layout or app entry:
788
+
789
+ ```ts
790
+ import '@neetechs/ui/styles.css';
791
+ ```
792
+
793
+ ### Plain HTML
794
+
795
+ ```html
796
+ <link rel="stylesheet" href="/node_modules/@neetechs/ui/src/index.css" />
797
+ ```
798
+
799
+ For production, serve the built CSS from your bundler output instead of directly referencing `node_modules`.
800
+
801
+ ## Current package structure
802
+
803
+ ```txt
804
+ packages/ui
805
+ src
806
+ styles
807
+ tokens
808
+ themes
809
+ utilities
810
+ animations
811
+ shell
812
+ components
813
+ patterns
814
+ ai
815
+ domain
816
+ calendar
817
+ billing
818
+ companies
819
+ behaviors
820
+ types
821
+ docs
822
+ ```
823
+
824
+ ## What belongs here
825
+
826
+ Good:
827
+
828
+ ```txt
829
+ CSS tokens
830
+ themes
831
+ base/reset styles
832
+ utility CSS
833
+ component CSS classes
834
+ shell CSS
835
+ AI UI CSS
836
+ domain UI CSS
837
+ pure TypeScript DOM helpers
838
+ ```
839
+
840
+ Bad:
841
+
842
+ ```txt
843
+ Angular components
844
+ React components
845
+ business API calls
846
+ Tailwind config
847
+ Bootstrap overrides
848
+ Angular Material wrappers
849
+ app-specific routing
850
+ backend logic
851
+ ```
852
+
853
+ ## Wrapper packages later
854
+
855
+ These should be separate packages:
856
+
857
+ ```txt
858
+ @neetechs/ui-angular
859
+ @neetechs/ui-react
860
+ ```
861
+
862
+ Do not put wrappers inside `@neetechs/ui`.