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