@neetechs/ui 0.1.0 → 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.
Files changed (51) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/alert/alert.css +6 -0
  3. package/dist/components/avatar/avatar.css +78 -0
  4. package/dist/components/badge/badge.css +9 -3
  5. package/dist/components/button/button.css +40 -0
  6. package/dist/components/card/card.css +19 -0
  7. package/dist/components/choice-card/choice-card.css +244 -0
  8. package/dist/components/disclosure/disclosure.css +154 -0
  9. package/dist/components/index.css +2 -0
  10. package/dist/components/progress/progress.css +12 -0
  11. package/dist/components/stat/stat.css +30 -0
  12. package/dist/domain/billing/index.css +6 -6
  13. package/dist/patterns/document-preview/document-preview.css +169 -0
  14. package/dist/patterns/editor-workspace/editor-workspace.css +276 -0
  15. package/dist/patterns/index.css +4 -0
  16. package/dist/patterns/profile-header/profile-header.css +205 -0
  17. package/dist/patterns/resource-card/resource-card.css +258 -0
  18. package/dist/patterns/settings-layout/settings-layout.css +133 -0
  19. package/dist/shell/navbar/navbar.css +28 -1
  20. package/dist/styles/themes/dark.css +8 -0
  21. package/dist/styles/themes/high-contrast.css +8 -0
  22. package/dist/styles/themes/light.css +8 -0
  23. package/dist/version.d.ts +1 -1
  24. package/dist/version.js +1 -1
  25. package/docs/NEETECHS_UI_UPGRADE_PLAN.md +121 -1
  26. package/docs/components.md +148 -0
  27. package/docs/page-patterns-and-workflows.md +27 -1
  28. package/docs/site-chrome.md +4 -0
  29. package/package.json +1 -1
  30. package/src/components/alert/alert.css +6 -0
  31. package/src/components/avatar/avatar.css +78 -0
  32. package/src/components/badge/badge.css +9 -3
  33. package/src/components/button/button.css +40 -0
  34. package/src/components/card/card.css +19 -0
  35. package/src/components/choice-card/choice-card.css +244 -0
  36. package/src/components/disclosure/disclosure.css +154 -0
  37. package/src/components/index.css +2 -0
  38. package/src/components/progress/progress.css +12 -0
  39. package/src/components/stat/stat.css +30 -0
  40. package/src/domain/billing/index.css +6 -6
  41. package/src/patterns/document-preview/document-preview.css +169 -0
  42. package/src/patterns/editor-workspace/editor-workspace.css +276 -0
  43. package/src/patterns/index.css +4 -0
  44. package/src/patterns/profile-header/profile-header.css +205 -0
  45. package/src/patterns/resource-card/resource-card.css +258 -0
  46. package/src/patterns/settings-layout/settings-layout.css +133 -0
  47. package/src/shell/navbar/navbar.css +28 -1
  48. package/src/styles/themes/dark.css +8 -0
  49. package/src/styles/themes/high-contrast.css +8 -0
  50. package/src/styles/themes/light.css +8 -0
  51. package/src/version.ts +1 -1
@@ -0,0 +1,276 @@
1
+ /*
2
+ * Editor workspace: a source editor beside a live preview (Markdown résumés,
3
+ * invoice and contract templates, email templates, AI drafts). Distilled
4
+ * from MyAccount's Resume Studio: page header and formatting toolbar above,
5
+ * two bordered panes with headings and a status footer, the preview pane
6
+ * optionally sticky while the source scrolls, and a print mode that keeps
7
+ * only the preview. Panes stack when the workspace is narrower than 64rem.
8
+ *
9
+ * Compose the header with .nt-page-header--compact and the formatting row
10
+ * with .nt-page-toolbar--surface; render the preview with
11
+ * .nt-document-preview.
12
+ *
13
+ * Markup: <div class="nt-editor-workspace">
14
+ * …header, toolbar…
15
+ * <div class="nt-editor-workspace__panes">
16
+ * <section class="nt-editor-pane" aria-labelledby="src-title">
17
+ * <div class="nt-editor-pane__header">
18
+ * <h2 class="nt-editor-pane__title" id="src-title">Markdown</h2>
19
+ * </div>
20
+ * <textarea class="nt-editor-pane__source" aria-labelledby="src-title"></textarea>
21
+ * <div class="nt-editor-pane__footer">
22
+ * <span class="nt-editor-status" data-state="saved" role="status">Saved</span>
23
+ * </div>
24
+ * </section>
25
+ * <section class="nt-editor-pane nt-editor-pane--preview">…</section>
26
+ * </div>
27
+ * </div>
28
+ */
29
+
30
+ .nt-editor-workspace {
31
+ --nt-editor-sticky-offset: var(--nt-space-3);
32
+
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: var(--nt-space-4);
36
+ min-width: 0;
37
+ container-type: inline-size;
38
+ container-name: nt-editor-workspace;
39
+ }
40
+
41
+ .nt-editor-workspace__panes {
42
+ display: grid;
43
+ grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr);
44
+ align-items: start;
45
+ gap: var(--nt-space-4);
46
+ min-width: 0;
47
+ }
48
+
49
+ .nt-editor-workspace--balanced .nt-editor-workspace__panes {
50
+ grid-template-columns: repeat(2, minmax(0, 1fr));
51
+ }
52
+
53
+ /* The preview follows the reader while a long source scrolls. */
54
+ .nt-editor-workspace--sticky-preview .nt-editor-pane--preview {
55
+ position: sticky;
56
+ top: var(--nt-editor-sticky-offset);
57
+ max-height: calc(100vh - 2 * var(--nt-editor-sticky-offset));
58
+ max-height: calc(100dvh - 2 * var(--nt-editor-sticky-offset));
59
+ }
60
+
61
+ .nt-editor-workspace--sticky-preview .nt-editor-pane--preview > .nt-editor-pane__body {
62
+ overflow: auto;
63
+ }
64
+
65
+ @container nt-editor-workspace (max-width: 64rem) {
66
+ .nt-editor-workspace__panes,
67
+ .nt-editor-workspace--balanced .nt-editor-workspace__panes {
68
+ grid-template-columns: minmax(0, 1fr);
69
+ }
70
+
71
+ .nt-editor-workspace--sticky-preview .nt-editor-pane--preview {
72
+ position: static;
73
+ max-height: none;
74
+ }
75
+ }
76
+
77
+ /* Pane */
78
+
79
+ .nt-editor-pane {
80
+ display: flex;
81
+ flex-direction: column;
82
+ min-width: 0;
83
+ overflow: hidden;
84
+ border: 1px solid var(--nt-border-subtle);
85
+ border-radius: var(--nt-radius-panel);
86
+ background: var(--nt-bg-surface);
87
+ transition: border-color var(--nt-duration-fast) var(--nt-ease-standard);
88
+ }
89
+
90
+ /* The pane being edited is marked without moving anything. */
91
+ .nt-editor-pane:focus-within {
92
+ border-color: var(--nt-border-interactive);
93
+ }
94
+
95
+ .nt-editor-pane__header {
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ align-items: center;
99
+ justify-content: space-between;
100
+ gap: var(--nt-space-2) var(--nt-space-3);
101
+ min-height: var(--nt-control-height-lg);
102
+ padding: var(--nt-space-2) var(--nt-space-4);
103
+ border-block-end: 1px solid var(--nt-border-subtle);
104
+ }
105
+
106
+ .nt-editor-pane__title {
107
+ margin: 0;
108
+ color: var(--nt-text-primary);
109
+ font: var(--nt-text-label-lg);
110
+ }
111
+
112
+ .nt-editor-pane__meta {
113
+ color: var(--nt-text-muted);
114
+ font: var(--nt-text-caption);
115
+ }
116
+
117
+ .nt-editor-pane__actions {
118
+ display: flex;
119
+ flex-wrap: wrap;
120
+ align-items: center;
121
+ gap: var(--nt-space-1);
122
+ }
123
+
124
+ .nt-editor-pane__body {
125
+ min-width: 0;
126
+ min-height: 0;
127
+ }
128
+
129
+ /* Full-bleed source editor: monospace, generous line height, inset focus
130
+ * ring because the pane edge is the control edge. */
131
+ .nt-editor-pane__source {
132
+ display: block;
133
+ width: 100%;
134
+ min-height: 60vh;
135
+ min-height: 60dvh;
136
+ margin: 0;
137
+ padding: var(--nt-space-4);
138
+ border: 0;
139
+ border-radius: 0;
140
+ background: var(--nt-bg-surface-sunken);
141
+ color: var(--nt-text-primary);
142
+ font: var(--nt-text-mono-sm);
143
+ line-height: var(--nt-line-height-body-lg);
144
+ tab-size: 2;
145
+ resize: vertical;
146
+ unicode-bidi: plaintext;
147
+ }
148
+
149
+ .nt-editor-pane__source:focus,
150
+ .nt-editor-pane__source:focus-visible {
151
+ outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
152
+ outline-offset: calc(var(--nt-focus-ring-width) * -1);
153
+ }
154
+
155
+ .nt-editor-pane__footer {
156
+ display: flex;
157
+ flex-wrap: wrap;
158
+ align-items: center;
159
+ justify-content: space-between;
160
+ gap: var(--nt-space-2) var(--nt-space-4);
161
+ padding: var(--nt-space-2) var(--nt-space-4);
162
+ border-block-start: 1px solid var(--nt-border-subtle);
163
+ color: var(--nt-text-muted);
164
+ font: var(--nt-text-caption);
165
+ font-variant-numeric: tabular-nums;
166
+ }
167
+
168
+ .nt-editor-pane__footer:empty {
169
+ display: none;
170
+ }
171
+
172
+ @container nt-editor-workspace (max-width: 64rem) {
173
+ .nt-editor-pane__source {
174
+ min-height: 40vh;
175
+ min-height: 40dvh;
176
+ }
177
+ }
178
+
179
+ /* Save status: idle / saving / saved / error. Always a word plus a dot; the
180
+ * dot pulses while saving and pops once when saved. Announce changes with
181
+ * role="status" on the element. */
182
+ .nt-editor-status {
183
+ --nt-editor-status-color: var(--nt-text-muted);
184
+
185
+ display: inline-flex;
186
+ align-items: center;
187
+ gap: var(--nt-space-1-5);
188
+ color: var(--nt-text-muted);
189
+ font: var(--nt-text-label-sm);
190
+ white-space: nowrap;
191
+ }
192
+
193
+ .nt-editor-status::before {
194
+ display: inline-block;
195
+ flex: 0 0 auto;
196
+ width: var(--nt-space-2);
197
+ height: var(--nt-space-2);
198
+ border-radius: var(--nt-radius-pill);
199
+ background: var(--nt-editor-status-color);
200
+ content: '';
201
+ }
202
+
203
+ .nt-editor-status[data-state='saving'] {
204
+ --nt-editor-status-color: var(--nt-info);
205
+ }
206
+
207
+ .nt-editor-status[data-state='saving']::before {
208
+ animation: nt-skeleton-pulse var(--nt-duration-slower) var(--nt-ease-standard) infinite alternate;
209
+ }
210
+
211
+ .nt-editor-status[data-state='saved'] {
212
+ --nt-editor-status-color: var(--nt-success);
213
+
214
+ color: var(--nt-success-text);
215
+ }
216
+
217
+ .nt-editor-status[data-state='saved']::before {
218
+ animation: nt-editor-status-pop var(--nt-duration-slow) var(--nt-ease-emphasized);
219
+ }
220
+
221
+ .nt-editor-status[data-state='error'] {
222
+ --nt-editor-status-color: var(--nt-danger);
223
+
224
+ color: var(--nt-danger-text);
225
+ }
226
+
227
+ .nt-editor-status[data-state='unsaved'] {
228
+ --nt-editor-status-color: var(--nt-warning);
229
+
230
+ color: var(--nt-warning-text);
231
+ }
232
+
233
+ @keyframes nt-editor-status-pop {
234
+ 0% {
235
+ transform: scale(0.4);
236
+ }
237
+
238
+ 60% {
239
+ transform: scale(1.35);
240
+ }
241
+
242
+ 100% {
243
+ transform: scale(1);
244
+ }
245
+ }
246
+
247
+ /* Print only the document. */
248
+ @media print {
249
+ .nt-editor-workspace > :not(.nt-editor-workspace__panes),
250
+ .nt-editor-pane:not(.nt-editor-pane--preview),
251
+ .nt-editor-pane__header,
252
+ .nt-editor-pane__footer {
253
+ display: none !important;
254
+ }
255
+
256
+ .nt-editor-workspace__panes {
257
+ display: block;
258
+ }
259
+
260
+ .nt-editor-pane--preview,
261
+ .nt-editor-workspace--sticky-preview .nt-editor-pane--preview {
262
+ position: static;
263
+ max-height: none;
264
+ overflow: visible;
265
+ border: 0;
266
+ background: none;
267
+ }
268
+ }
269
+
270
+ @media (prefers-reduced-motion: reduce) {
271
+ .nt-editor-pane,
272
+ .nt-editor-status::before {
273
+ transition: none !important;
274
+ animation: none !important;
275
+ }
276
+ }
@@ -1,5 +1,9 @@
1
1
  @import './page/page.css';
2
2
  @import './record-list/record-list.css';
3
+ @import './profile-header/profile-header.css';
4
+ @import './resource-card/resource-card.css';
5
+ @import './editor-workspace/editor-workspace.css';
6
+ @import './document-preview/document-preview.css';
3
7
  @import './form-layout/form-layout.css';
4
8
  @import './settings-layout/settings-layout.css';
5
9
  @import './master-detail/master-detail.css';
@@ -0,0 +1,205 @@
1
+ /*
2
+ * Profile header: identity at the top of a profile, account, company, or
3
+ * contact page. Distilled from MyAccount: a large (optionally editable)
4
+ * avatar, name with handle, headline and detail line, a completion meter,
5
+ * contextual inline actions for missing information ("Add headline" as
6
+ * .nt-button--link), primary actions, and an optional aside for a
7
+ * promotional or next-step card. Lays out from its own width.
8
+ *
9
+ * Markup: <header class="nt-profile-header">
10
+ * <div class="nt-profile-header__identity">
11
+ * <span class="nt-avatar nt-avatar--2xl nt-avatar--rounded">…</span>
12
+ * <div class="nt-profile-header__main">
13
+ * <div class="nt-profile-header__name-row">
14
+ * <h1 class="nt-profile-header__name">…</h1>
15
+ * <span class="nt-profile-header__handle">@…</span>
16
+ * </div>
17
+ * <p class="nt-profile-header__headline">…</p>
18
+ * <ul class="nt-profile-header__details"><li>…</li></ul>
19
+ * <div class="nt-profile-header__completion">nt-progress</div>
20
+ * </div>
21
+ * </div>
22
+ * <div class="nt-profile-header__side">
23
+ * <div class="nt-profile-header__actions">…</div>
24
+ * <div class="nt-profile-header__aside">…</div>
25
+ * </div>
26
+ * </header>
27
+ *
28
+ * The root wraps intrinsically: the side column moves under the identity
29
+ * when both no longer fit side by side; descendants then re-align through
30
+ * the nt-profile-header container query.
31
+ */
32
+
33
+ .nt-profile-header {
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ align-items: flex-start;
37
+ gap: var(--nt-space-4) var(--nt-space-6);
38
+ min-width: 0;
39
+ container-type: inline-size;
40
+ container-name: nt-profile-header;
41
+ }
42
+
43
+ /* Sizes */
44
+
45
+ .nt-profile-header--compact {
46
+ gap: var(--nt-space-2) var(--nt-space-4);
47
+ }
48
+
49
+ .nt-profile-header--compact .nt-profile-header__identity {
50
+ gap: var(--nt-space-3);
51
+ }
52
+
53
+ .nt-profile-header--compact .nt-profile-header__name {
54
+ font: var(--nt-text-title-lg);
55
+ }
56
+
57
+ /* Variants */
58
+
59
+ .nt-profile-header--surface {
60
+ padding: var(--nt-density-card-padding);
61
+ border: 1px solid var(--nt-border-subtle);
62
+ border-radius: var(--nt-radius-panel);
63
+ background: var(--nt-bg-surface);
64
+ box-shadow: var(--nt-elevation-card);
65
+ }
66
+
67
+ /* Internals */
68
+
69
+ .nt-profile-header__identity {
70
+ display: flex;
71
+ flex: 999 1 24rem;
72
+ align-items: flex-start;
73
+ gap: var(--nt-space-4);
74
+ min-width: 0;
75
+ }
76
+
77
+ .nt-profile-header__main {
78
+ display: flex;
79
+ flex: 1 1 auto;
80
+ flex-direction: column;
81
+ gap: var(--nt-space-1-5);
82
+ min-width: 0;
83
+ }
84
+
85
+ .nt-profile-header__name-row {
86
+ display: flex;
87
+ flex-wrap: wrap;
88
+ align-items: baseline;
89
+ gap: var(--nt-space-1) var(--nt-space-2-5);
90
+ min-width: 0;
91
+ }
92
+
93
+ .nt-profile-header__name {
94
+ margin: 0;
95
+ min-width: 0;
96
+ color: var(--nt-text-primary);
97
+ font-family: var(--nt-font-sans);
98
+ font-size: clamp(var(--nt-font-size-title-lg), calc(var(--nt-font-size-title-sm) + 1.2vw), var(--nt-font-size-heading-md));
99
+ font-weight: var(--nt-font-weight-bold);
100
+ line-height: var(--nt-line-height-heading-sm);
101
+ letter-spacing: var(--nt-letter-spacing-heading);
102
+ overflow-wrap: anywhere;
103
+ }
104
+
105
+ .nt-profile-header__handle {
106
+ color: var(--nt-text-secondary);
107
+ font: var(--nt-text-label-md);
108
+ unicode-bidi: plaintext;
109
+ }
110
+
111
+ .nt-profile-header__headline {
112
+ margin: 0;
113
+ color: var(--nt-text-secondary);
114
+ font: var(--nt-text-body-md);
115
+ overflow-wrap: anywhere;
116
+ }
117
+
118
+ /* Detail line: location, organization, member since. Separators are
119
+ * generated with empty alternative text so they are not announced. */
120
+ .nt-profile-header__details {
121
+ display: flex;
122
+ flex-wrap: wrap;
123
+ align-items: center;
124
+ gap: var(--nt-space-1) var(--nt-space-2);
125
+ margin: 0;
126
+ padding: 0;
127
+ color: var(--nt-text-muted);
128
+ font: var(--nt-text-body-sm);
129
+ list-style: none;
130
+ }
131
+
132
+ .nt-profile-header__details > li {
133
+ display: inline-flex;
134
+ align-items: center;
135
+ gap: var(--nt-space-1-5);
136
+ min-width: 0;
137
+ }
138
+
139
+ .nt-profile-header__details > li + li::before {
140
+ margin-inline-end: var(--nt-space-0-5);
141
+ color: var(--nt-text-subtle);
142
+ content: '·' / '';
143
+ }
144
+
145
+ .nt-profile-header__completion {
146
+ width: min(100%, 18rem);
147
+ margin-block-start: var(--nt-space-1);
148
+ }
149
+
150
+ .nt-profile-header__side {
151
+ display: flex;
152
+ flex: 1 1 22rem;
153
+ flex-direction: column;
154
+ align-items: flex-end;
155
+ gap: var(--nt-space-3);
156
+ min-width: 0;
157
+ }
158
+
159
+ .nt-profile-header__actions {
160
+ display: flex;
161
+ flex-wrap: wrap;
162
+ align-items: center;
163
+ justify-content: flex-end;
164
+ gap: var(--nt-space-2);
165
+ min-width: 0;
166
+ }
167
+
168
+ .nt-profile-header__actions:empty,
169
+ .nt-profile-header__aside:empty,
170
+ .nt-profile-header__side:empty {
171
+ display: none;
172
+ }
173
+
174
+ .nt-profile-header__aside {
175
+ width: min(100%, 22rem);
176
+ min-width: 0;
177
+ }
178
+
179
+ /* Once the side column has wrapped under the identity, align it to the
180
+ * start like the rest of the header. */
181
+ @container nt-profile-header (max-width: 48rem) {
182
+ .nt-profile-header__side {
183
+ align-items: stretch;
184
+ }
185
+
186
+ .nt-profile-header__actions {
187
+ justify-content: flex-start;
188
+ }
189
+
190
+ .nt-profile-header__aside {
191
+ width: min(100%, 32rem);
192
+ }
193
+ }
194
+
195
+ /* Narrow: the avatar sits above the text. */
196
+ @container nt-profile-header (max-width: 30rem) {
197
+ .nt-profile-header__identity {
198
+ flex-direction: column;
199
+ gap: var(--nt-space-3);
200
+ }
201
+
202
+ .nt-profile-header__completion {
203
+ width: 100%;
204
+ }
205
+ }