@nyxwire/css 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +133 -2
- package/dist/base.css +850 -0
- package/dist/components.css +10508 -0
- package/dist/docs/components/accordion.md +83 -0
- package/dist/docs/components/alert.md +52 -0
- package/dist/docs/components/avatar.md +55 -0
- package/dist/docs/components/badge.md +64 -0
- package/dist/docs/components/breadcrumbs.md +64 -0
- package/dist/docs/components/button.md +197 -0
- package/dist/docs/components/card.md +103 -0
- package/dist/docs/components/checkbox.md +45 -0
- package/dist/docs/components/chip.md +30 -0
- package/dist/docs/components/cluster.md +33 -0
- package/dist/docs/components/code.md +65 -0
- package/dist/docs/components/container.md +24 -0
- package/dist/docs/components/dialog.md +199 -0
- package/dist/docs/components/divider.md +31 -0
- package/dist/docs/components/dl.md +24 -0
- package/dist/docs/components/effect-utilities.md +82 -0
- package/dist/docs/components/empty.md +40 -0
- package/dist/docs/components/frame.md +27 -0
- package/dist/docs/components/grid.md +31 -0
- package/dist/docs/components/hud.md +75 -0
- package/dist/docs/components/input-group.md +28 -0
- package/dist/docs/components/input.md +52 -0
- package/dist/docs/components/kbd.md +42 -0
- package/dist/docs/components/label-and-field.md +31 -0
- package/dist/docs/components/link.md +41 -0
- package/dist/docs/components/list.md +67 -0
- package/dist/docs/components/menu.md +85 -0
- package/dist/docs/components/meter.md +77 -0
- package/dist/docs/components/navbar.md +66 -0
- package/dist/docs/components/pagination.md +64 -0
- package/dist/docs/components/popover.md +59 -0
- package/dist/docs/components/progress.md +32 -0
- package/dist/docs/components/prose.md +29 -0
- package/dist/docs/components/select.md +51 -0
- package/dist/docs/components/sidebar.md +35 -0
- package/dist/docs/components/sidenav.md +45 -0
- package/dist/docs/components/skeleton.md +36 -0
- package/dist/docs/components/slider.md +32 -0
- package/dist/docs/components/spinner.md +30 -0
- package/dist/docs/components/stack.md +26 -0
- package/dist/docs/components/steps.md +49 -0
- package/dist/docs/components/switch.md +19 -0
- package/dist/docs/components/table.md +83 -0
- package/dist/docs/components/tabs.md +207 -0
- package/dist/docs/components/textarea.md +13 -0
- package/dist/docs/components/toast.md +86 -0
- package/dist/docs/components/tooltip.md +39 -0
- package/dist/docs/components/typography-classes.md +38 -0
- package/dist/docs/families/data-display.md +15 -0
- package/dist/docs/families/feedback.md +13 -0
- package/dist/docs/families/forms.md +141 -0
- package/dist/docs/families/layout-typography.md +17 -0
- package/dist/docs/families/navigation.md +13 -0
- package/dist/docs/families/overlays.md +13 -0
- package/dist/docs/families/surfaces.md +11 -0
- package/dist/docs/foundations/accessibility.md +71 -0
- package/dist/docs/foundations/color-roles.md +114 -0
- package/dist/docs/foundations/effects-motion.md +150 -0
- package/dist/docs/foundations/flavors.md +156 -0
- package/dist/docs/foundations/icons.md +45 -0
- package/dist/docs/foundations/palette.md +180 -0
- package/dist/docs/foundations/spacing-elevation.md +168 -0
- package/dist/docs/foundations/typography.md +80 -0
- package/dist/docs/index.md +233 -0
- package/dist/docs/manifest.json +859 -0
- package/dist/fonts/inter-OFL.txt +93 -0
- package/dist/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/martian-mono-OFL.txt +93 -0
- package/dist/fonts/martian-mono-latin-ext-wdth-normal.woff2 +0 -0
- package/dist/fonts/martian-mono-latin-wdth-normal.woff2 +0 -0
- package/dist/fonts/space-grotesk-OFL.txt +93 -0
- package/dist/fonts/space-grotesk-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/space-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/fonts.css +73 -0
- package/dist/nyxwire.css +12183 -0
- package/dist/tokens.css +579 -0
- package/dist/utilities.css +176 -0
- package/nyxwire.d.ts +2 -0
- package/package.json +66 -3
- package/skills/nyxwire/SKILL.md +63 -0
- package/src/base.css +158 -0
- package/src/components/accordion.css +280 -0
- package/src/components/alert.css +176 -0
- package/src/components/avatar.css +262 -0
- package/src/components/badge.css +193 -0
- package/src/components/breadcrumbs.css +209 -0
- package/src/components/btn.css +517 -0
- package/src/components/card.css +327 -0
- package/src/components/checkbox.css +202 -0
- package/src/components/chip.css +345 -0
- package/src/components/code.css +340 -0
- package/src/components/dialog.css +411 -0
- package/src/components/divider.css +201 -0
- package/src/components/empty.css +216 -0
- package/src/components/field.css +161 -0
- package/src/components/hud.css +212 -0
- package/src/components/index.css +50 -0
- package/src/components/input.css +383 -0
- package/src/components/kbd.css +197 -0
- package/src/components/layout.css +344 -0
- package/src/components/link.css +178 -0
- package/src/components/list.css +353 -0
- package/src/components/menu.css +347 -0
- package/src/components/meter.css +238 -0
- package/src/components/navbar.css +309 -0
- package/src/components/pagination.css +302 -0
- package/src/components/popover.css +352 -0
- package/src/components/progress.css +241 -0
- package/src/components/select.css +121 -0
- package/src/components/sidenav.css +326 -0
- package/src/components/skeleton.css +193 -0
- package/src/components/slider.css +201 -0
- package/src/components/spinner.css +200 -0
- package/src/components/stat.css +263 -0
- package/src/components/steps.css +311 -0
- package/src/components/switch.css +183 -0
- package/src/components/table.css +290 -0
- package/src/components/tabs.css +271 -0
- package/src/components/toast.css +413 -0
- package/src/components/tooltip.css +288 -0
- package/src/fonts.css +92 -0
- package/src/index.css +6 -0
- package/src/motion.css +177 -0
- package/src/semantic.css +85 -0
- package/src/tokens.css +276 -0
- package/src/typography.css +430 -0
- package/src/utilities.css +198 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
/* Dialog and drawer, on the native <dialog> element or on a library-driven box.
|
|
2
|
+
|
|
3
|
+
<dialog class="nw-dialog nw-dialog-md" aria-labelledby="title">
|
|
4
|
+
<header class="nw-dialog-header">
|
|
5
|
+
<h2 class="nw-dialog-title" id="title">Title</h2>
|
|
6
|
+
<p class="nw-dialog-description">One line on what this decides.</p>
|
|
7
|
+
<button class="nw-dialog-close" aria-label="Close">svg</button>
|
|
8
|
+
</header>
|
|
9
|
+
<div class="nw-dialog-body">...</div>
|
|
10
|
+
<footer class="nw-dialog-footer">
|
|
11
|
+
<span class="nw-dialog-footer-start">left-aligned extra</span>
|
|
12
|
+
<button class="nw-btn nw-btn-ghost">Cancel</button>
|
|
13
|
+
<button class="nw-btn nw-btn-primary">Confirm</button>
|
|
14
|
+
</footer>
|
|
15
|
+
</dialog>
|
|
16
|
+
|
|
17
|
+
Open with showModal() (scrim through ::backdrop) or show(). A div with data-state="open|closed"
|
|
18
|
+
(Reka, Radix) gets the same look, centered through position: fixed, and pairs with a sibling
|
|
19
|
+
.nw-dialog-backdrop. Sizes xs..xl and full; intents color the edge and the glow; .nw-dialog-cut
|
|
20
|
+
chamfers the box; .nw-dialog-drawer docks it to an edge (right by default, -left, -top, -bottom). */
|
|
21
|
+
@layer components {
|
|
22
|
+
.nw-dialog {
|
|
23
|
+
--_intent: var(--nw-primary);
|
|
24
|
+
--_on: var(--nw-on-primary);
|
|
25
|
+
--_soft: var(--nw-primary-soft);
|
|
26
|
+
--_fill: var(--nw-canvas);
|
|
27
|
+
--_edge: var(--nw-gradient-wire);
|
|
28
|
+
--_w: 32rem;
|
|
29
|
+
--_px: var(--nw-space-6);
|
|
30
|
+
--_py: var(--nw-space-5);
|
|
31
|
+
--_from: translateY(var(--nw-space-3)) scale(0.98);
|
|
32
|
+
--_duration: var(--nw-duration-base);
|
|
33
|
+
--nw-glow-color: var(--_intent);
|
|
34
|
+
|
|
35
|
+
display: none;
|
|
36
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
37
|
+
inline-size: min(var(--_w), 100% - 2 * var(--nw-space-4));
|
|
38
|
+
max-inline-size: none;
|
|
39
|
+
max-block-size: calc(100dvh - 2 * var(--nw-space-8));
|
|
40
|
+
margin: auto;
|
|
41
|
+
padding: 0;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
border: 1px solid transparent;
|
|
44
|
+
border-radius: var(--nw-radius-lg);
|
|
45
|
+
font-size: var(--nw-text-base);
|
|
46
|
+
line-height: var(--nw-leading-normal);
|
|
47
|
+
color: var(--nw-fg);
|
|
48
|
+
/* The wire: the fill covers the padding box, the edge paint shows through the 1px border. */
|
|
49
|
+
background:
|
|
50
|
+
linear-gradient(var(--_fill), var(--_fill)) padding-box,
|
|
51
|
+
var(--_edge) border-box;
|
|
52
|
+
box-shadow: var(--nw-shadow-lg);
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: var(--_from);
|
|
55
|
+
transition:
|
|
56
|
+
opacity var(--_duration) var(--nw-ease-out),
|
|
57
|
+
transform var(--_duration) var(--nw-ease-out),
|
|
58
|
+
overlay var(--_duration) allow-discrete,
|
|
59
|
+
display var(--_duration) allow-discrete;
|
|
60
|
+
}
|
|
61
|
+
.nw-dialog:is([open], [data-state]) {
|
|
62
|
+
display: grid;
|
|
63
|
+
}
|
|
64
|
+
.nw-dialog:is([open], [data-state='open']) {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
transform: none;
|
|
67
|
+
}
|
|
68
|
+
@starting-style {
|
|
69
|
+
.nw-dialog:is([open], [data-state='open']) {
|
|
70
|
+
opacity: 0;
|
|
71
|
+
transform: var(--_from);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/* A box that is not a <dialog> has no UA centering of its own. */
|
|
75
|
+
.nw-dialog[data-state] {
|
|
76
|
+
position: fixed;
|
|
77
|
+
inset: 0;
|
|
78
|
+
z-index: var(--nw-z-modal);
|
|
79
|
+
block-size: fit-content;
|
|
80
|
+
}
|
|
81
|
+
.nw-dialog[data-state='closed'] {
|
|
82
|
+
animation: nw-dialog-out var(--_duration) var(--nw-ease-in) both;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.nw-dialog::backdrop {
|
|
86
|
+
background: var(--nw-backdrop);
|
|
87
|
+
backdrop-filter: blur(var(--nw-blur-sm));
|
|
88
|
+
opacity: 0;
|
|
89
|
+
transition:
|
|
90
|
+
opacity var(--nw-duration-base) var(--nw-ease-out),
|
|
91
|
+
overlay var(--nw-duration-base) allow-discrete,
|
|
92
|
+
display var(--nw-duration-base) allow-discrete;
|
|
93
|
+
}
|
|
94
|
+
.nw-dialog[open]::backdrop {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
}
|
|
97
|
+
@starting-style {
|
|
98
|
+
.nw-dialog[open]::backdrop {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.nw-dialog-backdrop {
|
|
103
|
+
position: fixed;
|
|
104
|
+
inset: 0;
|
|
105
|
+
z-index: var(--nw-z-overlay);
|
|
106
|
+
background: var(--nw-backdrop);
|
|
107
|
+
backdrop-filter: blur(var(--nw-blur-sm));
|
|
108
|
+
animation: nw-fade-in var(--nw-duration-base) var(--nw-ease-out) both;
|
|
109
|
+
}
|
|
110
|
+
.nw-dialog-backdrop[data-state='closed'] {
|
|
111
|
+
animation-name: nw-fade-out;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Parts ------------------------------------------------------------------------------------ */
|
|
115
|
+
|
|
116
|
+
.nw-dialog-header {
|
|
117
|
+
position: relative;
|
|
118
|
+
display: grid;
|
|
119
|
+
gap: var(--nw-space-1);
|
|
120
|
+
padding: var(--_py) var(--_px) var(--nw-space-4);
|
|
121
|
+
padding-inline-end: calc(var(--_px) + var(--nw-control-md));
|
|
122
|
+
border-block-end: 1px solid var(--nw-line);
|
|
123
|
+
}
|
|
124
|
+
.nw-dialog-title {
|
|
125
|
+
font-family: var(--nw-font-display);
|
|
126
|
+
font-size: var(--nw-text-xl);
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
line-height: var(--nw-leading-tight);
|
|
129
|
+
letter-spacing: var(--nw-tracking-tight);
|
|
130
|
+
text-wrap: balance;
|
|
131
|
+
color: var(--nw-fg);
|
|
132
|
+
}
|
|
133
|
+
.nw-dialog-description {
|
|
134
|
+
font-size: var(--nw-text-sm);
|
|
135
|
+
color: var(--nw-fg-muted);
|
|
136
|
+
}
|
|
137
|
+
.nw-dialog-icon {
|
|
138
|
+
display: inline-grid;
|
|
139
|
+
place-items: center;
|
|
140
|
+
inline-size: var(--nw-space-10);
|
|
141
|
+
block-size: var(--nw-space-10);
|
|
142
|
+
margin-block-end: var(--nw-space-2);
|
|
143
|
+
border-radius: var(--nw-radius-md);
|
|
144
|
+
color: color-mix(in oklab, var(--_intent) var(--nw-soft-ink), var(--nw-fg));
|
|
145
|
+
background-color: var(--_soft);
|
|
146
|
+
}
|
|
147
|
+
.nw-dialog-icon > svg {
|
|
148
|
+
inline-size: var(--nw-space-5);
|
|
149
|
+
block-size: var(--nw-space-5);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.nw-dialog-close {
|
|
153
|
+
position: absolute;
|
|
154
|
+
inset-block-start: calc(var(--_py) - var(--nw-space-2));
|
|
155
|
+
inset-inline-end: calc(var(--_px) - var(--nw-space-2));
|
|
156
|
+
display: inline-grid;
|
|
157
|
+
place-items: center;
|
|
158
|
+
inline-size: var(--nw-control-md);
|
|
159
|
+
block-size: var(--nw-control-md);
|
|
160
|
+
padding: 0;
|
|
161
|
+
border: 0;
|
|
162
|
+
border-radius: var(--nw-radius-md);
|
|
163
|
+
color: var(--nw-fg-subtle);
|
|
164
|
+
background: none;
|
|
165
|
+
transition:
|
|
166
|
+
color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
167
|
+
background-color var(--nw-duration-fast) var(--nw-ease-standard);
|
|
168
|
+
}
|
|
169
|
+
.nw-dialog-close > svg {
|
|
170
|
+
inline-size: var(--nw-space-5);
|
|
171
|
+
block-size: var(--nw-space-5);
|
|
172
|
+
}
|
|
173
|
+
.nw-dialog-close:hover {
|
|
174
|
+
color: var(--nw-fg);
|
|
175
|
+
background-color: var(--nw-panel-hover);
|
|
176
|
+
}
|
|
177
|
+
.nw-dialog-close:active {
|
|
178
|
+
background-color: var(--nw-panel-active);
|
|
179
|
+
}
|
|
180
|
+
.nw-dialog-close:focus-visible {
|
|
181
|
+
outline: var(--nw-ring-width) solid var(--nw-ring);
|
|
182
|
+
outline-offset: 0;
|
|
183
|
+
}
|
|
184
|
+
.nw-dialog-close:disabled {
|
|
185
|
+
color: var(--nw-fg-disabled);
|
|
186
|
+
background: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.nw-dialog-body {
|
|
190
|
+
min-block-size: 0;
|
|
191
|
+
padding: var(--nw-space-4) var(--_px);
|
|
192
|
+
overflow: auto;
|
|
193
|
+
overscroll-behavior: contain;
|
|
194
|
+
scrollbar-width: thin;
|
|
195
|
+
}
|
|
196
|
+
.nw-dialog-body > :first-child {
|
|
197
|
+
margin-block-start: 0;
|
|
198
|
+
}
|
|
199
|
+
.nw-dialog-body > :last-child {
|
|
200
|
+
margin-block-end: 0;
|
|
201
|
+
}
|
|
202
|
+
/* Without a header or footer the body carries the outer padding itself. */
|
|
203
|
+
.nw-dialog-body:first-child {
|
|
204
|
+
padding-block-start: var(--_py);
|
|
205
|
+
}
|
|
206
|
+
.nw-dialog-body:last-child {
|
|
207
|
+
padding-block-end: var(--_py);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.nw-dialog-footer {
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-wrap: wrap;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: flex-end;
|
|
215
|
+
gap: var(--nw-space-2);
|
|
216
|
+
padding: var(--nw-space-4) var(--_px) var(--_py);
|
|
217
|
+
border-block-start: 1px solid var(--nw-line);
|
|
218
|
+
background-color: color-mix(in oklab, var(--nw-canvas-sunken) 50%, transparent);
|
|
219
|
+
}
|
|
220
|
+
.nw-dialog-footer-start {
|
|
221
|
+
margin-inline-end: auto;
|
|
222
|
+
font-size: var(--nw-text-sm);
|
|
223
|
+
color: var(--nw-fg-muted);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Sizes ------------------------------------------------------------------------------------ */
|
|
227
|
+
|
|
228
|
+
.nw-dialog-xs {
|
|
229
|
+
--_w: 20rem;
|
|
230
|
+
--_px: var(--nw-space-5);
|
|
231
|
+
--_py: var(--nw-space-4);
|
|
232
|
+
}
|
|
233
|
+
.nw-dialog-sm {
|
|
234
|
+
--_w: 24rem;
|
|
235
|
+
--_px: var(--nw-space-5);
|
|
236
|
+
--_py: var(--nw-space-4);
|
|
237
|
+
}
|
|
238
|
+
.nw-dialog-md {
|
|
239
|
+
--_w: 32rem;
|
|
240
|
+
}
|
|
241
|
+
.nw-dialog-lg {
|
|
242
|
+
--_w: 44rem;
|
|
243
|
+
}
|
|
244
|
+
.nw-dialog-xl {
|
|
245
|
+
--_w: 60rem;
|
|
246
|
+
}
|
|
247
|
+
.nw-dialog-full {
|
|
248
|
+
--_w: 100dvw;
|
|
249
|
+
inline-size: 100dvw;
|
|
250
|
+
block-size: 100dvh;
|
|
251
|
+
max-block-size: none;
|
|
252
|
+
border: 0;
|
|
253
|
+
border-radius: 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* Intents: the edge and the glow take the intent color; text stays the foreground. ---------- */
|
|
257
|
+
|
|
258
|
+
.nw-dialog-primary {
|
|
259
|
+
--_intent: var(--nw-primary);
|
|
260
|
+
--_on: var(--nw-on-primary);
|
|
261
|
+
--_soft: var(--nw-primary-soft);
|
|
262
|
+
--_edge: var(--_intent);
|
|
263
|
+
}
|
|
264
|
+
.nw-dialog-secondary {
|
|
265
|
+
--_intent: var(--nw-secondary);
|
|
266
|
+
--_on: var(--nw-on-secondary);
|
|
267
|
+
--_soft: var(--nw-secondary-soft);
|
|
268
|
+
--_edge: var(--_intent);
|
|
269
|
+
}
|
|
270
|
+
.nw-dialog-tertiary {
|
|
271
|
+
--_intent: var(--nw-tertiary);
|
|
272
|
+
--_on: var(--nw-on-tertiary);
|
|
273
|
+
--_soft: var(--nw-tertiary-soft);
|
|
274
|
+
--_edge: var(--_intent);
|
|
275
|
+
}
|
|
276
|
+
.nw-dialog-neutral {
|
|
277
|
+
--_intent: var(--nw-fg-muted);
|
|
278
|
+
--_on: var(--nw-canvas);
|
|
279
|
+
--_soft: color-mix(in oklab, var(--nw-fg) 10%, transparent);
|
|
280
|
+
--_edge: var(--nw-line-strong);
|
|
281
|
+
}
|
|
282
|
+
.nw-dialog-info {
|
|
283
|
+
--_intent: var(--nw-info);
|
|
284
|
+
--_on: var(--nw-on-info);
|
|
285
|
+
--_soft: var(--nw-info-soft);
|
|
286
|
+
--_edge: var(--_intent);
|
|
287
|
+
}
|
|
288
|
+
.nw-dialog-success {
|
|
289
|
+
--_intent: var(--nw-success);
|
|
290
|
+
--_on: var(--nw-on-success);
|
|
291
|
+
--_soft: var(--nw-success-soft);
|
|
292
|
+
--_edge: var(--_intent);
|
|
293
|
+
}
|
|
294
|
+
.nw-dialog-warning {
|
|
295
|
+
--_intent: var(--nw-warning);
|
|
296
|
+
--_on: var(--nw-on-warning);
|
|
297
|
+
--_soft: var(--nw-warning-soft);
|
|
298
|
+
--_edge: var(--_intent);
|
|
299
|
+
}
|
|
300
|
+
.nw-dialog-danger {
|
|
301
|
+
--_intent: var(--nw-danger);
|
|
302
|
+
--_on: var(--nw-on-danger);
|
|
303
|
+
--_soft: var(--nw-danger-soft);
|
|
304
|
+
--_edge: var(--_intent);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Variants --------------------------------------------------------------------------------- */
|
|
308
|
+
|
|
309
|
+
.nw-dialog-glow {
|
|
310
|
+
box-shadow: var(--nw-shadow-lg), var(--nw-glow-md);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* Cut corners: the same recipe as .nw-cut, fed with the dialog's own fill and edge. The glow
|
|
314
|
+
moves to a filter because clip-path would clip a box-shadow. */
|
|
315
|
+
.nw-dialog-cut {
|
|
316
|
+
--nw-fill: var(--_fill);
|
|
317
|
+
--nw-cut: 16px;
|
|
318
|
+
isolation: isolate;
|
|
319
|
+
border: 0;
|
|
320
|
+
border-radius: 0;
|
|
321
|
+
background: var(--nw-cut-surface);
|
|
322
|
+
box-shadow: none;
|
|
323
|
+
filter: var(--nw-glow-drop-sm);
|
|
324
|
+
}
|
|
325
|
+
.nw-dialog-cut::before {
|
|
326
|
+
content: '';
|
|
327
|
+
position: absolute;
|
|
328
|
+
inset: 0;
|
|
329
|
+
z-index: 1;
|
|
330
|
+
pointer-events: none;
|
|
331
|
+
background: var(--_edge);
|
|
332
|
+
clip-path: var(--nw-cut-ring);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* Drawer: full height against a viewport edge, the wire on the inner edge only. */
|
|
336
|
+
.nw-dialog-drawer {
|
|
337
|
+
--_w: 28rem;
|
|
338
|
+
--_from: translateX(100%);
|
|
339
|
+
position: fixed;
|
|
340
|
+
inset: 0 0 0 auto;
|
|
341
|
+
inline-size: min(var(--_w), 100%);
|
|
342
|
+
block-size: 100dvh;
|
|
343
|
+
max-block-size: none;
|
|
344
|
+
margin: 0;
|
|
345
|
+
border-width: 0 0 0 1px;
|
|
346
|
+
border-radius: 0;
|
|
347
|
+
}
|
|
348
|
+
.nw-dialog-drawer-left {
|
|
349
|
+
--_from: translateX(-100%);
|
|
350
|
+
inset: 0 auto 0 0;
|
|
351
|
+
border-width: 0 1px 0 0;
|
|
352
|
+
}
|
|
353
|
+
.nw-dialog-drawer-top,
|
|
354
|
+
.nw-dialog-drawer-bottom {
|
|
355
|
+
--_w: 100dvw;
|
|
356
|
+
inline-size: 100dvw;
|
|
357
|
+
block-size: auto;
|
|
358
|
+
max-block-size: min(85dvh, 48rem);
|
|
359
|
+
}
|
|
360
|
+
.nw-dialog-drawer-top {
|
|
361
|
+
--_from: translateY(-100%);
|
|
362
|
+
inset: 0 0 auto 0;
|
|
363
|
+
border-width: 0 0 1px 0;
|
|
364
|
+
}
|
|
365
|
+
.nw-dialog-drawer-bottom {
|
|
366
|
+
--_from: translateY(100%);
|
|
367
|
+
inset: auto 0 0 0;
|
|
368
|
+
border-width: 1px 0 0 0;
|
|
369
|
+
border-radius: var(--nw-radius-xl) var(--nw-radius-xl) 0 0;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@keyframes nw-dialog-out {
|
|
373
|
+
to {
|
|
374
|
+
opacity: 0;
|
|
375
|
+
transform: var(--_from);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
@media (max-width: 40rem) {
|
|
380
|
+
.nw-dialog {
|
|
381
|
+
--_px: var(--nw-space-5);
|
|
382
|
+
max-block-size: calc(100dvh - 2 * var(--nw-space-6));
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* The move becomes a cross-fade; the durations collapse through the motion tokens. */
|
|
387
|
+
@media (prefers-reduced-motion: reduce) {
|
|
388
|
+
.nw-dialog {
|
|
389
|
+
--_from: none;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@media (forced-colors: active) {
|
|
394
|
+
.nw-dialog {
|
|
395
|
+
border: 1px solid CanvasText;
|
|
396
|
+
background: Canvas;
|
|
397
|
+
box-shadow: none;
|
|
398
|
+
filter: none;
|
|
399
|
+
}
|
|
400
|
+
.nw-dialog-cut::before {
|
|
401
|
+
display: none;
|
|
402
|
+
}
|
|
403
|
+
.nw-dialog-header,
|
|
404
|
+
.nw-dialog-footer {
|
|
405
|
+
border-color: CanvasText;
|
|
406
|
+
}
|
|
407
|
+
.nw-dialog-footer {
|
|
408
|
+
background: Canvas;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* Divider: a hairline between regions, on <hr> or <div role="separator">. Text inside it sits in
|
|
2
|
+
the line, set in the mono eyebrow face. Variants: dashed, strong, bright, wire (the gradient),
|
|
3
|
+
glow, fade, vertical; sizes are the space around it. */
|
|
4
|
+
@layer components {
|
|
5
|
+
.nw-divider {
|
|
6
|
+
--_line: var(--nw-line);
|
|
7
|
+
--_glow: var(--nw-primary);
|
|
8
|
+
--_my: var(--nw-space-6);
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: var(--nw-space-3);
|
|
11
|
+
align-items: center;
|
|
12
|
+
inline-size: 100%;
|
|
13
|
+
block-size: auto;
|
|
14
|
+
margin: var(--_my) 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
border: 0;
|
|
17
|
+
font-family: var(--nw-font-mono);
|
|
18
|
+
font-size: var(--nw-text-2xs);
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
line-height: var(--nw-leading-snug);
|
|
21
|
+
letter-spacing: var(--nw-tracking-wider);
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
color: var(--nw-fg-subtle);
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
background: none;
|
|
26
|
+
}
|
|
27
|
+
.nw-divider::before,
|
|
28
|
+
.nw-divider::after {
|
|
29
|
+
content: '';
|
|
30
|
+
flex: 1;
|
|
31
|
+
block-size: 1px;
|
|
32
|
+
background: var(--_line);
|
|
33
|
+
}
|
|
34
|
+
/* With no text, one line runs the whole way. */
|
|
35
|
+
.nw-divider:empty {
|
|
36
|
+
gap: 0;
|
|
37
|
+
}
|
|
38
|
+
.nw-divider:empty::after {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
.nw-divider > svg {
|
|
42
|
+
inline-size: 1.2em;
|
|
43
|
+
block-size: 1.2em;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Where the text sits. */
|
|
47
|
+
.nw-divider-start::before {
|
|
48
|
+
flex: 0 0 var(--nw-space-6);
|
|
49
|
+
}
|
|
50
|
+
.nw-divider-end::after {
|
|
51
|
+
flex: 0 0 var(--nw-space-6);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Line styles */
|
|
55
|
+
.nw-divider-dashed::before,
|
|
56
|
+
.nw-divider-dashed::after {
|
|
57
|
+
background: repeating-linear-gradient(
|
|
58
|
+
90deg,
|
|
59
|
+
var(--_line) 0 var(--nw-space-1),
|
|
60
|
+
transparent var(--nw-space-1) var(--nw-space-2)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
.nw-divider-strong {
|
|
64
|
+
--_line: var(--nw-line-strong);
|
|
65
|
+
}
|
|
66
|
+
.nw-divider-bright {
|
|
67
|
+
--_line: var(--nw-line-bright);
|
|
68
|
+
}
|
|
69
|
+
.nw-divider-fade::before {
|
|
70
|
+
background: linear-gradient(90deg, transparent, var(--_line));
|
|
71
|
+
}
|
|
72
|
+
.nw-divider-fade::after {
|
|
73
|
+
background: linear-gradient(90deg, var(--_line), transparent);
|
|
74
|
+
}
|
|
75
|
+
.nw-divider-fade:empty::before {
|
|
76
|
+
background: linear-gradient(90deg, transparent, var(--_line), transparent);
|
|
77
|
+
}
|
|
78
|
+
/* The signature wire: primary to secondary across the whole rule. */
|
|
79
|
+
.nw-divider-wire {
|
|
80
|
+
color: var(--nw-fg-muted);
|
|
81
|
+
}
|
|
82
|
+
.nw-divider-wire::before {
|
|
83
|
+
background: linear-gradient(90deg, var(--nw-primary), var(--nw-secondary));
|
|
84
|
+
}
|
|
85
|
+
.nw-divider-wire::after {
|
|
86
|
+
background: linear-gradient(90deg, var(--nw-secondary), var(--nw-primary));
|
|
87
|
+
}
|
|
88
|
+
.nw-divider-wire:empty::before {
|
|
89
|
+
background: var(--nw-gradient-wire);
|
|
90
|
+
}
|
|
91
|
+
.nw-divider-glow::before,
|
|
92
|
+
.nw-divider-glow::after {
|
|
93
|
+
--nw-glow-color: var(--_glow);
|
|
94
|
+
box-shadow: var(--nw-glow-sm);
|
|
95
|
+
}
|
|
96
|
+
.nw-divider-wire.nw-divider-glow::before,
|
|
97
|
+
.nw-divider-wire.nw-divider-glow::after {
|
|
98
|
+
box-shadow: var(--nw-glow-wire);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Intents color the line and the text. */
|
|
102
|
+
.nw-divider-primary {
|
|
103
|
+
--_line: color-mix(in oklab, var(--nw-primary) 60%, transparent);
|
|
104
|
+
--_glow: var(--nw-primary);
|
|
105
|
+
color: var(--nw-primary);
|
|
106
|
+
}
|
|
107
|
+
.nw-divider-secondary {
|
|
108
|
+
--_line: color-mix(in oklab, var(--nw-secondary) 60%, transparent);
|
|
109
|
+
--_glow: var(--nw-secondary);
|
|
110
|
+
color: var(--nw-secondary);
|
|
111
|
+
}
|
|
112
|
+
.nw-divider-tertiary {
|
|
113
|
+
--_line: color-mix(in oklab, var(--nw-tertiary) 60%, transparent);
|
|
114
|
+
--_glow: var(--nw-tertiary);
|
|
115
|
+
color: var(--nw-tertiary);
|
|
116
|
+
}
|
|
117
|
+
.nw-divider-neutral {
|
|
118
|
+
--_line: var(--nw-line-strong);
|
|
119
|
+
--_glow: var(--nw-fg);
|
|
120
|
+
color: var(--nw-fg-muted);
|
|
121
|
+
}
|
|
122
|
+
.nw-divider-info {
|
|
123
|
+
--_line: color-mix(in oklab, var(--nw-info) 60%, transparent);
|
|
124
|
+
--_glow: var(--nw-info);
|
|
125
|
+
color: var(--nw-info);
|
|
126
|
+
}
|
|
127
|
+
.nw-divider-success {
|
|
128
|
+
--_line: color-mix(in oklab, var(--nw-success) 60%, transparent);
|
|
129
|
+
--_glow: var(--nw-success);
|
|
130
|
+
color: var(--nw-success);
|
|
131
|
+
}
|
|
132
|
+
.nw-divider-warning {
|
|
133
|
+
--_line: color-mix(in oklab, var(--nw-warning) 60%, transparent);
|
|
134
|
+
--_glow: var(--nw-warning);
|
|
135
|
+
color: var(--nw-warning);
|
|
136
|
+
}
|
|
137
|
+
.nw-divider-danger {
|
|
138
|
+
--_line: color-mix(in oklab, var(--nw-danger) 60%, transparent);
|
|
139
|
+
--_glow: var(--nw-danger);
|
|
140
|
+
color: var(--nw-danger);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Vertical: between items in a row; stretches to the row's height. */
|
|
144
|
+
.nw-divider-vertical {
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
align-self: stretch;
|
|
147
|
+
inline-size: auto;
|
|
148
|
+
min-block-size: 1em;
|
|
149
|
+
margin: 0 var(--_my);
|
|
150
|
+
}
|
|
151
|
+
.nw-divider-vertical::before,
|
|
152
|
+
.nw-divider-vertical::after {
|
|
153
|
+
inline-size: 1px;
|
|
154
|
+
block-size: auto;
|
|
155
|
+
}
|
|
156
|
+
.nw-divider-vertical.nw-divider-dashed::before,
|
|
157
|
+
.nw-divider-vertical.nw-divider-dashed::after {
|
|
158
|
+
background: repeating-linear-gradient(
|
|
159
|
+
180deg,
|
|
160
|
+
var(--_line) 0 var(--nw-space-1),
|
|
161
|
+
transparent var(--nw-space-1) var(--nw-space-2)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
.nw-divider-vertical.nw-divider-fade::before {
|
|
165
|
+
background: linear-gradient(180deg, transparent, var(--_line));
|
|
166
|
+
}
|
|
167
|
+
.nw-divider-vertical.nw-divider-fade::after {
|
|
168
|
+
background: linear-gradient(180deg, var(--_line), transparent);
|
|
169
|
+
}
|
|
170
|
+
.nw-divider-vertical.nw-divider-wire::before {
|
|
171
|
+
background: linear-gradient(180deg, var(--nw-primary), var(--nw-secondary));
|
|
172
|
+
}
|
|
173
|
+
.nw-divider-vertical.nw-divider-wire::after {
|
|
174
|
+
background: linear-gradient(180deg, var(--nw-secondary), var(--nw-primary));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Sizes: the space the divider takes around itself. */
|
|
178
|
+
.nw-divider-xs {
|
|
179
|
+
--_my: var(--nw-space-2);
|
|
180
|
+
}
|
|
181
|
+
.nw-divider-sm {
|
|
182
|
+
--_my: var(--nw-space-4);
|
|
183
|
+
}
|
|
184
|
+
.nw-divider-md {
|
|
185
|
+
--_my: var(--nw-space-6);
|
|
186
|
+
}
|
|
187
|
+
.nw-divider-lg {
|
|
188
|
+
--_my: var(--nw-space-10);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@media (forced-colors: active) {
|
|
192
|
+
.nw-divider {
|
|
193
|
+
color: CanvasText;
|
|
194
|
+
}
|
|
195
|
+
.nw-divider::before,
|
|
196
|
+
.nw-divider::after {
|
|
197
|
+
background: CanvasText;
|
|
198
|
+
box-shadow: none;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|