@neetechs/ui 0.0.4 → 0.2.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 +138 -0
- package/CONTRIBUTING.md +60 -0
- package/LICENSE +21 -21
- package/README.md +861 -752
- package/dist/ai/ai-action-button/ai-action-button.css +271 -271
- package/dist/ai/ai-approval-card/ai-approval-card.css +323 -323
- package/dist/ai/ai-conversation-panel/ai-conversation-panel.css +447 -447
- package/dist/ai/ai-prompt-input/ai-prompt-input.css +380 -380
- package/dist/ai/ai-proposal-card/ai-proposal-card.css +358 -358
- package/dist/ai/ai-suggestion-card/ai-suggestion-card.css +295 -295
- package/dist/ai/ai-tool-call/ai-tool-call.css +256 -256
- package/dist/ai/index.css +7 -7
- package/dist/appearance/index.d.ts +2 -0
- package/dist/appearance/index.d.ts.map +1 -1
- package/dist/appearance/index.js +1 -0
- 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.js +1 -1
- package/dist/appearance/preference.js.map +1 -1
- package/dist/appearance/theme-controller.d.ts +6 -0
- package/dist/appearance/theme-controller.d.ts.map +1 -1
- package/dist/appearance/theme-controller.js +5 -0
- package/dist/appearance/theme-controller.js.map +1 -1
- package/dist/behaviors/index.d.ts +3 -0
- package/dist/behaviors/index.d.ts.map +1 -1
- package/dist/behaviors/index.js +3 -0
- package/dist/behaviors/index.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/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/components/alert/alert.css +226 -220
- package/dist/components/avatar/avatar.css +298 -220
- package/dist/components/badge/badge.css +180 -174
- package/dist/components/breadcrumb/breadcrumb.css +207 -207
- package/dist/components/button/button.css +278 -195
- package/dist/components/button-group/button-group.css +111 -0
- package/dist/components/card/card.css +284 -221
- package/dist/components/checkbox/checkbox.css +189 -189
- package/dist/components/chip/chip.css +269 -269
- package/dist/components/choice-card/choice-card.css +244 -0
- package/dist/components/data-grid/data-grid.css +520 -520
- package/dist/components/description-list/description-list.css +187 -0
- package/dist/components/dialog/dialog.css +339 -339
- package/dist/components/disclosure/disclosure.css +154 -0
- package/dist/components/drawer/drawer.css +484 -484
- package/dist/components/dropdown/dropdown.css +316 -316
- package/dist/components/icon-button/icon-button.css +162 -162
- package/dist/components/index.css +6 -0
- package/dist/components/input/input.css +163 -163
- package/dist/components/menu/menu.css +315 -315
- package/dist/components/pagination/pagination.css +250 -250
- package/dist/components/panel/panel.css +284 -284
- package/dist/components/popover/popover.css +153 -0
- package/dist/components/progress/progress.css +268 -256
- package/dist/components/radio/radio.css +166 -166
- package/dist/components/segmented-control/segmented-control.css +205 -205
- package/dist/components/select/select.css +117 -117
- package/dist/components/skeleton/skeleton.css +267 -262
- package/dist/components/split-button/split-button.css +292 -292
- package/dist/components/stat/stat.css +433 -0
- package/dist/components/switch/switch.css +195 -195
- package/dist/components/table/table.css +220 -220
- package/dist/components/tabs/tabs.css +293 -293
- package/dist/components/textarea/textarea.css +86 -86
- package/dist/components/toast/toast.css +345 -345
- package/dist/components/tooltip/tooltip.css +258 -258
- package/dist/domain/billing/index.css +629 -498
- package/dist/domain/calendar/agenda-list/agenda-list.css +224 -224
- package/dist/domain/calendar/day-slice/day-slice.css +384 -384
- package/dist/domain/calendar/day-timeline/day-timeline.css +332 -332
- package/dist/domain/calendar/event-card/event-card.css +338 -338
- package/dist/domain/calendar/index.css +5 -5
- package/dist/domain/calendar/month-grid/month-grid.css +426 -426
- package/dist/domain/calendar/week-grid/week-grid.css +480 -480
- package/dist/domain/companies/index.css +526 -526
- package/dist/domain/index.css +3 -3
- package/dist/index.css +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/patterns/command-palette/command-palette.css +447 -447
- package/dist/patterns/company-switcher/company-switcher.css +390 -390
- package/dist/patterns/content-state/content-state.css +236 -236
- package/dist/patterns/document-preview/document-preview.css +169 -0
- package/dist/patterns/editor-workspace/editor-workspace.css +276 -0
- package/dist/patterns/empty-state/empty-state.css +260 -260
- package/dist/patterns/error-state/error-state.css +272 -272
- package/dist/patterns/form-layout/form-layout.css +106 -106
- package/dist/patterns/index.css +5 -0
- package/dist/patterns/loading-state/loading-state.css +287 -287
- package/dist/patterns/master-detail/master-detail.css +103 -103
- package/dist/patterns/notification-center/notification-center.css +443 -443
- package/dist/patterns/page/page.css +303 -219
- package/dist/patterns/profile-header/profile-header.css +205 -0
- package/dist/patterns/profile-menu/profile-menu.css +298 -298
- package/dist/patterns/record-list/record-list.css +302 -0
- package/dist/patterns/resource-card/resource-card.css +258 -0
- package/dist/patterns/search-bar/search-bar.css +457 -457
- package/dist/patterns/settings-layout/settings-layout.css +283 -150
- package/dist/patterns/workflow/workflow.css +168 -168
- package/dist/shell/app-shell/app-shell.css +211 -75
- 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 -180
- package/dist/shell/index.css +8 -6
- package/dist/shell/mobile-nav/mobile-nav.css +254 -173
- package/dist/shell/navbar/navbar.css +282 -0
- package/dist/shell/sidebar/sidebar.css +314 -146
- package/dist/styles/accessibility.css +150 -116
- package/dist/styles/animations/motion.css +162 -162
- package/dist/styles/appearance/accent.css +215 -173
- package/dist/styles/appearance/density.css +61 -61
- package/dist/styles/appearance/motion.css +40 -40
- package/dist/styles/base.css +83 -83
- package/dist/styles/index.css +28 -28
- package/dist/styles/localization.css +56 -56
- package/dist/styles/reset.css +51 -51
- package/dist/styles/responsive.css +101 -101
- package/dist/styles/themes/dark.css +210 -202
- package/dist/styles/themes/high-contrast.css +298 -290
- package/dist/styles/themes/light.css +209 -201
- package/dist/styles/tokens/breakpoints.css +37 -37
- package/dist/styles/tokens/color.css +102 -96
- package/dist/styles/tokens/compatibility.css +33 -33
- package/dist/styles/tokens/elevation.css +26 -26
- package/dist/styles/tokens/index.css +9 -9
- package/dist/styles/tokens/motion.css +35 -35
- package/dist/styles/tokens/radius.css +26 -26
- package/dist/styles/tokens/spacing.css +56 -56
- package/dist/styles/tokens/typography.css +85 -85
- package/dist/styles/tokens/z-index.css +14 -14
- package/dist/styles/utilities/layout.css +153 -153
- package/dist/styles/utilities/text.css +152 -152
- package/dist/styles/utilities/visibility.css +47 -47
- 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 +312 -0
- package/docs/accessibility.md +218 -218
- package/docs/appearance-and-theming.md +150 -118
- package/docs/brand-palette.md +36 -0
- package/docs/component-architecture.md +137 -137
- package/docs/component-guidelines.md +64 -64
- package/docs/components.md +321 -0
- package/docs/content-and-terminology.md +207 -207
- package/docs/design-system-audit.md +120 -0
- package/docs/design-system-baseline-audit.md +226 -226
- package/docs/design-token-contract.md +279 -279
- package/docs/layering.md +53 -0
- package/docs/localization-and-rtl.md +147 -147
- package/docs/migration.md +193 -142
- package/docs/page-patterns-and-workflows.md +301 -260
- package/docs/responsive-and-adaptive-design.md +351 -351
- package/docs/semantic-role-migration-audit.md +77 -77
- package/docs/site-chrome.md +317 -0
- package/docs/states-feedback-and-recovery.md +206 -206
- package/docs/theming.md +5 -5
- package/package.json +19 -6
- package/src/ai/ai-action-button/ai-action-button.css +271 -271
- package/src/ai/ai-approval-card/ai-approval-card.css +323 -323
- package/src/ai/ai-conversation-panel/ai-conversation-panel.css +447 -447
- package/src/ai/ai-prompt-input/ai-prompt-input.css +380 -380
- package/src/ai/ai-proposal-card/ai-proposal-card.css +358 -358
- package/src/ai/ai-suggestion-card/ai-suggestion-card.css +295 -295
- package/src/ai/ai-tool-call/ai-tool-call.css +256 -256
- package/src/ai/index.css +7 -7
- package/src/appearance/cache.ts +236 -236
- package/src/appearance/cookie.ts +184 -184
- package/src/appearance/index.ts +86 -80
- package/src/appearance/inline-bootstrap.ts +163 -0
- package/src/appearance/preference.ts +121 -121
- package/src/appearance/theme-controller.ts +384 -371
- package/src/appearance/types.ts +61 -61
- package/src/behaviors/announcer.ts +222 -222
- package/src/behaviors/calendar.ts +92 -92
- package/src/behaviors/data-grid.ts +133 -133
- package/src/behaviors/dialog.ts +203 -203
- package/src/behaviors/direction.ts +34 -34
- package/src/behaviors/drawer.ts +210 -210
- package/src/behaviors/dropdown.ts +344 -344
- package/src/behaviors/focus-trap.ts +304 -304
- package/src/behaviors/forms.ts +205 -205
- package/src/behaviors/ids.ts +47 -47
- package/src/behaviors/index.ts +3 -0
- package/src/behaviors/keyboard.ts +305 -305
- package/src/behaviors/navigation.ts +417 -0
- package/src/behaviors/overlay.ts +344 -344
- package/src/behaviors/popover.ts +157 -0
- package/src/behaviors/sidebar.ts +342 -0
- package/src/behaviors/state.ts +282 -282
- package/src/behaviors/tabs.ts +137 -137
- package/src/behaviors/viewport.ts +61 -61
- package/src/components/alert/alert.css +226 -220
- package/src/components/avatar/avatar.css +298 -220
- package/src/components/badge/badge.css +180 -174
- package/src/components/breadcrumb/breadcrumb.css +207 -207
- package/src/components/button/button.css +278 -195
- package/src/components/button-group/button-group.css +111 -0
- package/src/components/card/card.css +284 -221
- package/src/components/checkbox/checkbox.css +189 -189
- package/src/components/chip/chip.css +269 -269
- package/src/components/choice-card/choice-card.css +244 -0
- package/src/components/data-grid/data-grid.css +520 -520
- package/src/components/description-list/description-list.css +187 -0
- package/src/components/dialog/dialog.css +339 -339
- package/src/components/disclosure/disclosure.css +154 -0
- package/src/components/drawer/drawer.css +484 -484
- package/src/components/dropdown/dropdown.css +316 -316
- package/src/components/icon-button/icon-button.css +162 -162
- package/src/components/index.css +6 -0
- package/src/components/input/input.css +163 -163
- package/src/components/menu/menu.css +315 -315
- package/src/components/pagination/pagination.css +250 -250
- package/src/components/panel/panel.css +284 -284
- package/src/components/popover/popover.css +153 -0
- package/src/components/progress/progress.css +268 -256
- package/src/components/radio/radio.css +166 -166
- package/src/components/segmented-control/segmented-control.css +205 -205
- package/src/components/select/select.css +117 -117
- package/src/components/skeleton/skeleton.css +267 -262
- package/src/components/split-button/split-button.css +292 -292
- package/src/components/stat/stat.css +433 -0
- package/src/components/switch/switch.css +195 -195
- package/src/components/table/table.css +220 -220
- package/src/components/tabs/tabs.css +293 -293
- package/src/components/textarea/textarea.css +86 -86
- package/src/components/toast/toast.css +345 -345
- package/src/components/tooltip/tooltip.css +258 -258
- package/src/domain/billing/index.css +629 -498
- package/src/domain/calendar/agenda-list/agenda-list.css +224 -224
- package/src/domain/calendar/day-slice/day-slice.css +384 -384
- package/src/domain/calendar/day-timeline/day-timeline.css +332 -332
- package/src/domain/calendar/event-card/event-card.css +338 -338
- package/src/domain/calendar/index.css +5 -5
- package/src/domain/calendar/month-grid/month-grid.css +426 -426
- package/src/domain/calendar/week-grid/week-grid.css +480 -480
- package/src/domain/companies/index.css +526 -526
- package/src/domain/index.css +3 -3
- package/src/index.css +5 -5
- package/src/index.ts +7 -7
- package/src/localization/index.ts +56 -56
- package/src/patterns/command-palette/command-palette.css +447 -447
- package/src/patterns/company-switcher/company-switcher.css +390 -390
- package/src/patterns/content-state/content-state.css +236 -236
- package/src/patterns/document-preview/document-preview.css +169 -0
- package/src/patterns/editor-workspace/editor-workspace.css +276 -0
- package/src/patterns/empty-state/empty-state.css +260 -260
- package/src/patterns/error-state/error-state.css +272 -272
- package/src/patterns/form-layout/form-layout.css +106 -106
- package/src/patterns/index.css +5 -0
- package/src/patterns/loading-state/loading-state.css +287 -287
- package/src/patterns/master-detail/master-detail.css +103 -103
- package/src/patterns/notification-center/notification-center.css +443 -443
- package/src/patterns/page/page.css +303 -219
- package/src/patterns/profile-header/profile-header.css +205 -0
- package/src/patterns/profile-menu/profile-menu.css +298 -298
- package/src/patterns/record-list/record-list.css +302 -0
- package/src/patterns/resource-card/resource-card.css +258 -0
- package/src/patterns/search-bar/search-bar.css +457 -457
- package/src/patterns/settings-layout/settings-layout.css +283 -150
- package/src/patterns/workflow/workflow.css +168 -168
- package/src/shell/app-shell/app-shell.css +211 -75
- 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 -180
- package/src/shell/index.css +8 -6
- package/src/shell/mobile-nav/mobile-nav.css +254 -173
- package/src/shell/navbar/navbar.css +282 -0
- package/src/shell/sidebar/sidebar.css +314 -146
- package/src/styles/accessibility.css +150 -116
- package/src/styles/animations/motion.css +162 -162
- package/src/styles/appearance/accent.css +215 -173
- package/src/styles/appearance/density.css +61 -61
- package/src/styles/appearance/motion.css +40 -40
- package/src/styles/base.css +83 -83
- package/src/styles/index.css +28 -28
- package/src/styles/localization.css +56 -56
- package/src/styles/reset.css +51 -51
- package/src/styles/responsive.css +101 -101
- package/src/styles/themes/dark.css +210 -202
- package/src/styles/themes/high-contrast.css +298 -290
- package/src/styles/themes/light.css +209 -201
- package/src/styles/tokens/breakpoints.css +37 -37
- package/src/styles/tokens/color.css +102 -96
- package/src/styles/tokens/compatibility.css +33 -33
- package/src/styles/tokens/elevation.css +26 -26
- package/src/styles/tokens/index.css +9 -9
- package/src/styles/tokens/motion.css +35 -35
- package/src/styles/tokens/radius.css +26 -26
- package/src/styles/tokens/spacing.css +56 -56
- package/src/styles/tokens/typography.css +85 -85
- package/src/styles/tokens/z-index.css +14 -14
- package/src/styles/utilities/layout.css +153 -153
- package/src/styles/utilities/text.css +152 -152
- package/src/styles/utilities/visibility.css +47 -47
- package/src/types/index.ts +126 -126
- package/src/version.ts +2 -0
package/README.md
CHANGED
|
@@ -1,752 +1,861 @@
|
|
|
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
|
-
##
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
appearance
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
```html
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<div class="nt-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
<
|
|
335
|
-
</
|
|
336
|
-
</
|
|
337
|
-
|
|
338
|
-
<
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
</
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
<
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
<
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
</
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
</
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
<div class="nt-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
<
|
|
504
|
-
|
|
505
|
-
<div class="nt-
|
|
506
|
-
<span class="nt-
|
|
507
|
-
<h2 class="nt-
|
|
508
|
-
<p class="nt-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
</
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
```
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
@neetechs/ui/
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
##
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
```
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
```
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
```
|
|
751
|
-
|
|
752
|
-
|
|
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`.
|