@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,244 @@
1
+ /*
2
+ * Choice card: a radio or checkbox presented as a selectable card (résumé
3
+ * templates, plans, AI providers, export formats). Distilled from
4
+ * MyAccount's template picker. The native input stays in the accessibility
5
+ * tree and owns keyboard behavior (arrow keys within a radio group, Space
6
+ * for checkboxes); the card reflects its state through :has().
7
+ *
8
+ * Markup: <div class="nt-choice-group" role="radiogroup" aria-labelledby="…">
9
+ * <label class="nt-choice-card">
10
+ * <input class="nt-choice-card__input" type="radio" name="template" value="pro">
11
+ * <span class="nt-choice-card__indicator" aria-hidden="true"></span>
12
+ * <span class="nt-choice-card__body">
13
+ * <span class="nt-choice-card__title">Professional</span>
14
+ * <span class="nt-choice-card__description">One column, ATS friendly</span>
15
+ * </span>
16
+ * </label>
17
+ * </div>
18
+ */
19
+
20
+ .nt-choice-card {
21
+ position: relative;
22
+ display: flex;
23
+ align-items: flex-start;
24
+ gap: var(--nt-space-3);
25
+ min-width: 0;
26
+ min-height: var(--nt-target-size-primary);
27
+ padding: var(--nt-space-3);
28
+ border: 1px solid var(--nt-control-border);
29
+ border-radius: var(--nt-radius-item);
30
+ background: var(--nt-bg-surface);
31
+ color: var(--nt-text-primary);
32
+ text-align: start;
33
+ cursor: pointer;
34
+ transition: var(--nt-transition-colors);
35
+ }
36
+
37
+ .nt-choice-card:hover {
38
+ border-color: var(--nt-control-border-hover);
39
+ background: var(--nt-bg-surface-hover);
40
+ }
41
+
42
+ .nt-choice-card:active {
43
+ background: var(--nt-bg-surface-active);
44
+ }
45
+
46
+ .nt-choice-card:has(.nt-choice-card__input:focus-visible) {
47
+ outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
48
+ outline-offset: var(--nt-focus-ring-offset);
49
+ }
50
+
51
+ /* Selected: selection fill, border, and an inner ring (shape change), plus
52
+ * the filled indicator. */
53
+ .nt-choice-card:has(.nt-choice-card__input:checked),
54
+ .nt-choice-card--selected {
55
+ border-color: var(--nt-selection-border);
56
+ background: var(--nt-selection-bg);
57
+ box-shadow: inset 0 0 0 1px var(--nt-selection-border);
58
+ }
59
+
60
+ .nt-choice-card:has(.nt-choice-card__input:disabled),
61
+ .nt-choice-card--disabled {
62
+ border-color: var(--nt-border-disabled);
63
+ background: var(--nt-bg-surface-disabled);
64
+ color: var(--nt-text-disabled);
65
+ cursor: not-allowed;
66
+ }
67
+
68
+ .nt-choice-card:has(.nt-choice-card__input:disabled) :is(.nt-choice-card__description, .nt-choice-card__meta) {
69
+ color: var(--nt-text-disabled);
70
+ }
71
+
72
+ /* Sizes */
73
+
74
+ .nt-choice-card--sm {
75
+ gap: var(--nt-space-2);
76
+ min-height: var(--nt-target-size-default);
77
+ padding: var(--nt-space-2) var(--nt-space-3);
78
+ }
79
+
80
+ .nt-choice-card--lg {
81
+ gap: var(--nt-space-4);
82
+ padding: var(--nt-space-4);
83
+ }
84
+
85
+ /* Variants */
86
+
87
+ /* Indicator-free cards for visual pickers (themes, templates with a
88
+ * thumbnail); selection relies on the ring and a check in __meta. */
89
+ .nt-choice-card--plain .nt-choice-card__indicator {
90
+ display: none;
91
+ }
92
+
93
+ /* Internals */
94
+
95
+ /* Visually hidden but focusable and announced. */
96
+ .nt-choice-card__input {
97
+ position: absolute;
98
+ width: 1px;
99
+ height: 1px;
100
+ margin: 0;
101
+ overflow: hidden;
102
+ clip-path: inset(50%);
103
+ white-space: nowrap;
104
+ opacity: 0;
105
+ }
106
+
107
+ .nt-choice-card__indicator {
108
+ position: relative;
109
+ display: inline-flex;
110
+ flex: 0 0 auto;
111
+ width: var(--nt-space-4);
112
+ height: var(--nt-space-4);
113
+ margin-block-start: var(--nt-space-0-5);
114
+ border: 1px solid var(--nt-control-border);
115
+ border-radius: var(--nt-radius-pill);
116
+ background: var(--nt-control-bg);
117
+ transition: var(--nt-transition-colors);
118
+ }
119
+
120
+ .nt-choice-card:has(input[type='checkbox']) .nt-choice-card__indicator {
121
+ border-radius: var(--nt-radius-indicator);
122
+ }
123
+
124
+ /* Radio dot / checkbox tick grow in from the center. */
125
+ .nt-choice-card__indicator::after {
126
+ position: absolute;
127
+ inset: 0;
128
+ margin: auto;
129
+ width: var(--nt-space-2);
130
+ height: var(--nt-space-2);
131
+ border-radius: var(--nt-radius-pill);
132
+ background: var(--nt-action-primary-fg);
133
+ content: '';
134
+ transform: scale(0);
135
+ transition: transform var(--nt-duration-fast) var(--nt-ease-emphasized);
136
+ }
137
+
138
+ .nt-choice-card:has(input[type='checkbox']) .nt-choice-card__indicator::after {
139
+ width: var(--nt-space-1-5);
140
+ height: var(--nt-space-2-5);
141
+ margin-block-start: calc(var(--nt-space-0-5) * 0.5);
142
+ border: solid var(--nt-action-primary-fg);
143
+ border-width: 0 2px 2px 0;
144
+ border-radius: 0;
145
+ background: transparent;
146
+ transform: rotate(45deg) scale(0);
147
+ }
148
+
149
+ .nt-choice-card:has(.nt-choice-card__input:checked) .nt-choice-card__indicator,
150
+ .nt-choice-card--selected .nt-choice-card__indicator {
151
+ border-color: var(--nt-action-primary-bg);
152
+ background: var(--nt-action-primary-bg);
153
+ }
154
+
155
+ .nt-choice-card:has(.nt-choice-card__input:checked) .nt-choice-card__indicator::after,
156
+ .nt-choice-card--selected .nt-choice-card__indicator::after {
157
+ transform: scale(1);
158
+ }
159
+
160
+ .nt-choice-card:has(input[type='checkbox']:checked) .nt-choice-card__indicator::after {
161
+ transform: rotate(45deg) scale(1);
162
+ }
163
+
164
+ .nt-choice-card:has(.nt-choice-card__input:disabled) .nt-choice-card__indicator {
165
+ border-color: var(--nt-border-disabled);
166
+ background: var(--nt-bg-surface-disabled);
167
+ }
168
+
169
+ .nt-choice-card__media {
170
+ display: flex;
171
+ flex: 0 0 auto;
172
+ align-items: center;
173
+ justify-content: center;
174
+ overflow: hidden;
175
+ border-radius: var(--nt-radius-control);
176
+ }
177
+
178
+ .nt-choice-card__body {
179
+ display: flex;
180
+ flex: 1 1 auto;
181
+ flex-direction: column;
182
+ gap: var(--nt-space-1);
183
+ min-width: 0;
184
+ }
185
+
186
+ .nt-choice-card__title {
187
+ display: flex;
188
+ flex-wrap: wrap;
189
+ align-items: center;
190
+ gap: var(--nt-space-1) var(--nt-space-2);
191
+ font: var(--nt-text-label-lg);
192
+ overflow-wrap: anywhere;
193
+ }
194
+
195
+ .nt-choice-card__description {
196
+ color: var(--nt-text-muted);
197
+ font: var(--nt-text-body-sm);
198
+ overflow-wrap: anywhere;
199
+ }
200
+
201
+ .nt-choice-card:has(.nt-choice-card__input:checked) .nt-choice-card__description,
202
+ .nt-choice-card--selected .nt-choice-card__description {
203
+ color: var(--nt-text-secondary);
204
+ }
205
+
206
+ .nt-choice-card__meta {
207
+ margin-inline-start: auto;
208
+ color: var(--nt-text-muted);
209
+ font: var(--nt-text-label-sm);
210
+ white-space: nowrap;
211
+ }
212
+
213
+ /* Group: as many cards per row as fit; cards in a row share a height. */
214
+ .nt-choice-group {
215
+ --nt-choice-group-min: 13rem;
216
+
217
+ display: grid;
218
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--nt-choice-group-min)), 1fr));
219
+ gap: var(--nt-space-2);
220
+ min-width: 0;
221
+ margin: 0;
222
+ padding: 0;
223
+ border: 0;
224
+ }
225
+
226
+ .nt-choice-group--stacked {
227
+ grid-template-columns: minmax(0, 1fr);
228
+ }
229
+
230
+ @media (forced-colors: active) {
231
+ .nt-choice-card:has(.nt-choice-card__input:checked),
232
+ .nt-choice-card--selected {
233
+ outline: 2px solid Highlight;
234
+ outline-offset: -2px;
235
+ }
236
+ }
237
+
238
+ @media (prefers-reduced-motion: reduce) {
239
+ .nt-choice-card,
240
+ .nt-choice-card__indicator,
241
+ .nt-choice-card__indicator::after {
242
+ transition: none !important;
243
+ }
244
+ }
@@ -0,0 +1,154 @@
1
+ /*
2
+ * Disclosure: native <details>/<summary> for secondary content that should
3
+ * stay one click away (archived documents, version history, advanced
4
+ * options, tax-claim breakdowns). Used by both MyAccount (archived CVs,
5
+ * CV history) and Billing (RUT/ROT claims). Native semantics give keyboard
6
+ * and screen-reader support for free; the content height animates where
7
+ * the browser supports ::details-content, and opens instantly elsewhere.
8
+ *
9
+ * Markup: <details class="nt-disclosure">
10
+ * <summary class="nt-disclosure__summary">
11
+ * <span class="nt-disclosure__title">Archived CVs</span>
12
+ * <span class="nt-disclosure__meta">3</span>
13
+ * <svg class="nt-disclosure__chevron" aria-hidden="true">…</svg>
14
+ * </summary>
15
+ * <div class="nt-disclosure__content">…</div>
16
+ * </details>
17
+ */
18
+
19
+ .nt-disclosure {
20
+ min-width: 0;
21
+ color: var(--nt-text-primary);
22
+ interpolate-size: allow-keywords;
23
+ }
24
+
25
+ .nt-disclosure::details-content {
26
+ block-size: 0;
27
+ overflow-y: clip;
28
+ transition:
29
+ block-size var(--nt-duration-normal) var(--nt-ease-standard),
30
+ content-visibility var(--nt-duration-normal) var(--nt-ease-standard) allow-discrete;
31
+ }
32
+
33
+ .nt-disclosure[open]::details-content {
34
+ block-size: auto;
35
+ }
36
+
37
+ .nt-disclosure__summary {
38
+ display: flex;
39
+ align-items: center;
40
+ gap: var(--nt-space-2);
41
+ min-height: var(--nt-target-size-primary);
42
+ padding-inline: var(--nt-space-2);
43
+ border-radius: var(--nt-radius-control);
44
+ font: var(--nt-text-label-lg);
45
+ list-style: none;
46
+ cursor: pointer;
47
+ user-select: none;
48
+ transition: var(--nt-transition-colors);
49
+ }
50
+
51
+ .nt-disclosure__summary::-webkit-details-marker {
52
+ display: none;
53
+ }
54
+
55
+ .nt-disclosure__summary::marker {
56
+ content: '';
57
+ }
58
+
59
+ .nt-disclosure__summary:hover {
60
+ background: var(--nt-bg-surface-hover);
61
+ }
62
+
63
+ .nt-disclosure__summary:focus-visible {
64
+ outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
65
+ outline-offset: var(--nt-focus-ring-offset);
66
+ }
67
+
68
+ /* Sizes */
69
+
70
+ .nt-disclosure--sm .nt-disclosure__summary {
71
+ min-height: var(--nt-target-size-default);
72
+ font: var(--nt-text-label-md);
73
+ }
74
+
75
+ /* Variants */
76
+
77
+ /* Surface: a bordered panel (stand-alone sections). */
78
+ .nt-disclosure--surface {
79
+ border: 1px solid var(--nt-border-subtle);
80
+ border-radius: var(--nt-radius-panel);
81
+ background: var(--nt-bg-surface);
82
+ }
83
+
84
+ .nt-disclosure--surface > .nt-disclosure__summary {
85
+ padding-inline: var(--nt-space-4);
86
+ border-radius: calc(var(--nt-radius-panel) - var(--nt-space-px));
87
+ }
88
+
89
+ .nt-disclosure--surface[open] > .nt-disclosure__summary {
90
+ border-end-start-radius: 0;
91
+ border-end-end-radius: 0;
92
+ }
93
+
94
+ .nt-disclosure--surface .nt-disclosure__content {
95
+ padding: 0 var(--nt-space-4) var(--nt-space-4);
96
+ }
97
+
98
+ /* Group: stacked disclosures separated by rules (FAQ, history). */
99
+ .nt-disclosure-group {
100
+ display: flex;
101
+ flex-direction: column;
102
+ min-width: 0;
103
+ }
104
+
105
+ .nt-disclosure-group > .nt-disclosure + .nt-disclosure {
106
+ border-block-start: 1px solid var(--nt-border-subtle);
107
+ }
108
+
109
+ /* Internals */
110
+
111
+ .nt-disclosure__title {
112
+ flex: 1 1 auto;
113
+ min-width: 0;
114
+ overflow-wrap: anywhere;
115
+ }
116
+
117
+ .nt-disclosure__meta {
118
+ flex: 0 0 auto;
119
+ color: var(--nt-text-muted);
120
+ font: var(--nt-text-label-sm);
121
+ font-variant-numeric: tabular-nums;
122
+ }
123
+
124
+ .nt-disclosure__chevron {
125
+ display: inline-flex;
126
+ flex: 0 0 auto;
127
+ width: var(--nt-icon-size-sm);
128
+ height: var(--nt-icon-size-sm);
129
+ color: var(--nt-icon-secondary);
130
+ transition: transform var(--nt-duration-normal) var(--nt-ease-standard);
131
+ }
132
+
133
+ .nt-disclosure[open] > .nt-disclosure__summary .nt-disclosure__chevron {
134
+ transform: rotate(180deg);
135
+ }
136
+
137
+ .nt-disclosure__content {
138
+ display: flex;
139
+ flex-direction: column;
140
+ align-items: flex-start;
141
+ gap: var(--nt-space-3);
142
+ min-width: 0;
143
+ padding: var(--nt-space-2) var(--nt-space-2) var(--nt-space-3);
144
+ color: var(--nt-text-secondary);
145
+ font: var(--nt-text-body-sm);
146
+ }
147
+
148
+ @media (prefers-reduced-motion: reduce) {
149
+ .nt-disclosure::details-content,
150
+ .nt-disclosure__summary,
151
+ .nt-disclosure__chevron {
152
+ transition: none !important;
153
+ }
154
+ }
@@ -22,6 +22,8 @@
22
22
  @import './skeleton/skeleton.css';
23
23
  @import './stat/stat.css';
24
24
  @import './description-list/description-list.css';
25
+ @import './choice-card/choice-card.css';
26
+ @import './disclosure/disclosure.css';
25
27
  @import './split-button/split-button.css';
26
28
  @import './button-group/button-group.css';
27
29
  @import './pagination/pagination.css';
@@ -58,6 +58,18 @@
58
58
  transform-origin: right center;
59
59
  }
60
60
 
61
+ /* Reveal: the bar fills from zero when it first renders (profile
62
+ * completion, quota meters). Width changes afterwards animate as usual. */
63
+ .nt-progress--reveal .nt-progress__bar {
64
+ transition-duration: var(--nt-duration-slower), var(--nt-duration-fast);
65
+ }
66
+
67
+ @starting-style {
68
+ .nt-progress--reveal .nt-progress__bar {
69
+ width: 0;
70
+ }
71
+ }
72
+
61
73
  .nt-progress__description {
62
74
  margin: 0;
63
75
  color: var(--nt-text-muted);
@@ -188,6 +188,36 @@ button.nt-stat {
188
188
  border-inline-start: var(--nt-space-1) solid var(--nt-stat-tone);
189
189
  }
190
190
 
191
+ /* Split: headline figure in __body beside supporting facts in __aside
192
+ * (balances, quotas). Wraps intrinsically; any other child, such as an
193
+ * alert, takes a full row. */
194
+ .nt-stat--split {
195
+ flex-direction: row;
196
+ flex-wrap: wrap;
197
+ align-items: flex-start;
198
+ gap: var(--nt-space-4);
199
+ }
200
+
201
+ .nt-stat__body,
202
+ .nt-stat__aside {
203
+ display: flex;
204
+ flex-direction: column;
205
+ gap: var(--nt-space-2);
206
+ min-width: 0;
207
+ }
208
+
209
+ .nt-stat__body {
210
+ flex: 999 1 16rem;
211
+ }
212
+
213
+ .nt-stat__aside {
214
+ flex: 1 1 12rem;
215
+ }
216
+
217
+ .nt-stat--split > :not(.nt-stat__body, .nt-stat__aside) {
218
+ flex: 1 0 100%;
219
+ }
220
+
191
221
  /* Wide: spans every column of a stat grid (featured figure). */
192
222
  .nt-stat--wide {
193
223
  grid-column: 1 / -1;
@@ -231,10 +231,10 @@
231
231
  gap: var(--nt-space-1);
232
232
  min-height: 1.5rem;
233
233
  padding: 0 var(--nt-space-2);
234
- border: 1px solid var(--nt-border-subtle);
234
+ border: 1px solid var(--nt-neutral-border);
235
235
  border-radius: var(--nt-radius-pill);
236
- background: var(--nt-bg-surface-muted);
237
- color: var(--nt-text-muted);
236
+ background: var(--nt-neutral-bg);
237
+ color: var(--nt-neutral-text);
238
238
  font: var(--nt-text-label-xs);
239
239
  letter-spacing: var(--nt-letter-spacing-label);
240
240
  white-space: nowrap;
@@ -249,9 +249,9 @@
249
249
  }
250
250
 
251
251
  .nt-billing-status--draft {
252
- border-color: var(--nt-border-subtle);
253
- background: var(--nt-bg-surface-muted);
254
- color: var(--nt-text-muted);
252
+ border-color: var(--nt-neutral-border);
253
+ background: var(--nt-neutral-bg);
254
+ color: var(--nt-neutral-text);
255
255
  }
256
256
 
257
257
  .nt-billing-status--sent,
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Document preview: a printable page shown at true size on a canvas
3
+ * (résumés, invoices, offers, contracts, letters). Distilled from
4
+ * MyAccount's Resume Studio: the sheet keeps its real paper width so lines
5
+ * wrap exactly as in the exported PDF, and narrow screens scroll the
6
+ * canvas horizontally instead of squeezing the page. Paper and ink use the
7
+ * --nt-document-* tokens, which stay paper-colored in every theme.
8
+ *
9
+ * The page content's own typography (résumé or invoice layout) belongs to
10
+ * the application; this pattern provides the canvas, sheet, margins, page
11
+ * breaks, and print geometry.
12
+ *
13
+ * Markup: <div class="nt-document-preview">
14
+ * <div class="nt-document-preview__viewport" tabindex="0" role="region" aria-label="Preview">
15
+ * <article class="nt-document-preview__page">…</article>
16
+ * </div>
17
+ * <p class="nt-document-preview__caption">…</p>
18
+ * </div>
19
+ */
20
+
21
+ .nt-document-preview {
22
+ --nt-document-page-width: 210mm;
23
+ --nt-document-page-height: 297mm;
24
+ --nt-document-margin-block: 13mm;
25
+ --nt-document-margin-inline: 14mm;
26
+
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: var(--nt-space-3);
30
+ min-width: 0;
31
+ }
32
+
33
+ .nt-document-preview__viewport {
34
+ min-width: 0;
35
+ padding: var(--nt-space-6) var(--nt-space-4);
36
+ overflow-x: auto;
37
+ border-radius: inherit;
38
+ background: var(--nt-document-canvas);
39
+ scrollbar-gutter: stable;
40
+ overscroll-behavior-inline: contain;
41
+ }
42
+
43
+ .nt-document-preview__viewport:focus-visible {
44
+ outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
45
+ outline-offset: calc(var(--nt-focus-ring-width) * -1);
46
+ }
47
+
48
+ .nt-document-preview__page {
49
+ box-sizing: border-box;
50
+ width: var(--nt-document-page-width);
51
+ min-width: var(--nt-document-page-width);
52
+ min-height: var(--nt-document-page-height);
53
+ margin-inline: auto;
54
+ padding: var(--nt-document-margin-block) var(--nt-document-margin-inline);
55
+ background: var(--nt-document-paper);
56
+ color: var(--nt-document-ink);
57
+ box-shadow: var(--nt-elevation-raised);
58
+ overflow-wrap: break-word;
59
+ color-scheme: light;
60
+ }
61
+
62
+ .nt-document-preview__page + .nt-document-preview__page {
63
+ margin-block-start: var(--nt-space-6);
64
+ }
65
+
66
+ /* Page sizes */
67
+
68
+ .nt-document-preview--letter {
69
+ --nt-document-page-width: 215.9mm;
70
+ --nt-document-page-height: 279.4mm;
71
+ }
72
+
73
+ /* Fluid: on-screen documents that are never printed at a fixed size. */
74
+ .nt-document-preview--fluid .nt-document-preview__page {
75
+ width: 100%;
76
+ min-width: 0;
77
+ max-width: var(--nt-document-page-width);
78
+ min-height: 0;
79
+ }
80
+
81
+ /* Margins */
82
+
83
+ .nt-document-preview--margin-narrow {
84
+ --nt-document-margin-block: 10mm;
85
+ --nt-document-margin-inline: 10mm;
86
+ }
87
+
88
+ .nt-document-preview--margin-wide {
89
+ --nt-document-margin-block: 17mm;
90
+ --nt-document-margin-inline: 18mm;
91
+ }
92
+
93
+ /* Variants */
94
+
95
+ /* Flush: the canvas fills its container edge to edge (inside an editor
96
+ * pane). */
97
+ .nt-document-preview--flush .nt-document-preview__viewport {
98
+ border-radius: 0;
99
+ }
100
+
101
+ /* Internals */
102
+
103
+ /* Visible page-break marker on screen; a real page break in print. */
104
+ .nt-document-preview__page-break {
105
+ position: relative;
106
+ height: 1px;
107
+ margin-block: var(--nt-space-5);
108
+ border-block-start: 1px dashed var(--nt-document-rule);
109
+ }
110
+
111
+ .nt-document-preview__page-break[data-label]::after {
112
+ position: absolute;
113
+ inset-block-start: calc(var(--nt-space-4) * -1);
114
+ inset-inline-end: 0;
115
+ padding: var(--nt-space-0-5) var(--nt-space-1-5);
116
+ background: var(--nt-document-paper);
117
+ color: var(--nt-document-ink-muted);
118
+ font: var(--nt-text-caption);
119
+ content: attr(data-label);
120
+ }
121
+
122
+ .nt-document-preview__caption {
123
+ margin: 0;
124
+ color: var(--nt-text-muted);
125
+ font: var(--nt-text-caption);
126
+ text-align: center;
127
+ }
128
+
129
+ @media (max-width: 40rem) {
130
+ .nt-document-preview__viewport {
131
+ padding: var(--nt-space-2);
132
+ }
133
+ }
134
+
135
+ @media print {
136
+ .nt-document-preview,
137
+ .nt-document-preview__viewport {
138
+ display: block;
139
+ padding: 0;
140
+ overflow: visible;
141
+ background: none;
142
+ }
143
+
144
+ .nt-document-preview__page {
145
+ width: auto;
146
+ min-width: 0;
147
+ min-height: 0;
148
+ margin: 0;
149
+ padding: 0;
150
+ box-shadow: none;
151
+ }
152
+
153
+ .nt-document-preview__page + .nt-document-preview__page {
154
+ margin-block-start: 0;
155
+ break-before: page;
156
+ }
157
+
158
+ .nt-document-preview__page-break {
159
+ height: 0;
160
+ margin: 0;
161
+ border: 0;
162
+ break-before: page;
163
+ }
164
+
165
+ .nt-document-preview__page-break::after,
166
+ .nt-document-preview__caption {
167
+ display: none;
168
+ }
169
+ }