@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,241 @@
|
|
|
1
|
+
/* Progress: task completion toward a known total, or an indeterminate busy bar.
|
|
2
|
+
|
|
3
|
+
Native: <progress class="nw-progress nw-progress-sm nw-progress-success" value="64" max="100">
|
|
4
|
+
Div: <div class="nw-progress" role="progressbar" aria-valuenow="64" aria-valuemin="0"
|
|
5
|
+
aria-valuemax="100" style="--nw-progress: .64">
|
|
6
|
+
<div class="nw-progress-fill"></div>
|
|
7
|
+
</div>
|
|
8
|
+
Labels: <div class="nw-progress-row"><span>Upload</span><span class="nw-progress-value">64%</span></div>
|
|
9
|
+
|
|
10
|
+
--nw-progress is a 0..1 fraction; without it the div fill is empty. Indeterminate: omit value on
|
|
11
|
+
the native element, or add .nw-progress-indeterminate / data-state="indeterminate" to the div.
|
|
12
|
+
Sizes xs..lg set the track height; intents recolor the fill; -striped, -pill, -cut and -glow are
|
|
13
|
+
opt-in. Add .nw-motion-essential to an indeterminate bar to keep its sweep under reduced motion. */
|
|
14
|
+
@layer components {
|
|
15
|
+
.nw-progress {
|
|
16
|
+
--_intent: var(--nw-primary);
|
|
17
|
+
--_on: var(--nw-on-primary);
|
|
18
|
+
--_soft: var(--nw-primary-soft);
|
|
19
|
+
--_h: var(--nw-space-2);
|
|
20
|
+
--_radius: var(--nw-radius-xs);
|
|
21
|
+
--_track: color-mix(in oklab, var(--nw-fg) 10%, transparent);
|
|
22
|
+
--_fill: var(--_intent);
|
|
23
|
+
--_speed: 1.4s;
|
|
24
|
+
--nw-glow-color: var(--_intent);
|
|
25
|
+
|
|
26
|
+
display: block;
|
|
27
|
+
inline-size: 100%;
|
|
28
|
+
block-size: var(--_h);
|
|
29
|
+
border: 0;
|
|
30
|
+
border-radius: var(--_radius);
|
|
31
|
+
background-color: var(--_track);
|
|
32
|
+
color: var(--_fill);
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
/* Native <progress>. */
|
|
36
|
+
progress.nw-progress {
|
|
37
|
+
appearance: none;
|
|
38
|
+
}
|
|
39
|
+
progress.nw-progress::-webkit-progress-bar {
|
|
40
|
+
background-color: var(--_track);
|
|
41
|
+
border-radius: var(--_radius);
|
|
42
|
+
}
|
|
43
|
+
progress.nw-progress::-webkit-progress-value {
|
|
44
|
+
background-color: var(--_fill);
|
|
45
|
+
border-radius: var(--_radius);
|
|
46
|
+
transition: inline-size var(--nw-duration-base) var(--nw-ease-standard);
|
|
47
|
+
}
|
|
48
|
+
progress.nw-progress::-moz-progress-bar {
|
|
49
|
+
background-color: var(--_fill);
|
|
50
|
+
border-radius: var(--_radius);
|
|
51
|
+
transition: inline-size var(--nw-duration-base) var(--nw-ease-standard);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Div version. */
|
|
55
|
+
.nw-progress-fill {
|
|
56
|
+
inline-size: calc(var(--nw-progress, 0) * 100%);
|
|
57
|
+
block-size: 100%;
|
|
58
|
+
border-radius: var(--_radius);
|
|
59
|
+
background-color: var(--_fill);
|
|
60
|
+
transition: inline-size var(--nw-duration-base) var(--nw-ease-standard);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Indeterminate: a 40% fill sweeping the track. */
|
|
64
|
+
progress.nw-progress:indeterminate::-webkit-progress-value {
|
|
65
|
+
inline-size: 40%;
|
|
66
|
+
animation: nw-progress-sweep var(--_speed) var(--nw-ease-in-out) infinite;
|
|
67
|
+
}
|
|
68
|
+
progress.nw-progress:indeterminate::-moz-progress-bar {
|
|
69
|
+
inline-size: 40%;
|
|
70
|
+
animation: nw-progress-sweep var(--_speed) var(--nw-ease-in-out) infinite;
|
|
71
|
+
}
|
|
72
|
+
.nw-progress:is(.nw-progress-indeterminate, [data-state='indeterminate']) .nw-progress-fill {
|
|
73
|
+
inline-size: 40%;
|
|
74
|
+
animation: nw-progress-sweep var(--_speed) var(--nw-ease-in-out) infinite;
|
|
75
|
+
}
|
|
76
|
+
@keyframes nw-progress-sweep {
|
|
77
|
+
from {
|
|
78
|
+
transform: translateX(-100%);
|
|
79
|
+
}
|
|
80
|
+
to {
|
|
81
|
+
transform: translateX(260%);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* A label/value line above the track. */
|
|
86
|
+
.nw-progress-row {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-wrap: wrap;
|
|
89
|
+
align-items: baseline;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
gap: var(--nw-space-1) var(--nw-space-3);
|
|
92
|
+
margin-block-end: var(--nw-space-2);
|
|
93
|
+
font-family: var(--nw-font-mono);
|
|
94
|
+
font-size: var(--nw-text-xs);
|
|
95
|
+
letter-spacing: var(--nw-tracking-wide);
|
|
96
|
+
color: var(--nw-fg-muted);
|
|
97
|
+
}
|
|
98
|
+
.nw-progress-value {
|
|
99
|
+
font-variant-numeric: tabular-nums;
|
|
100
|
+
color: var(--nw-fg);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Sizes ------------------------------------------------------------------------------------ */
|
|
104
|
+
|
|
105
|
+
.nw-progress-xs {
|
|
106
|
+
--_h: var(--nw-space-1);
|
|
107
|
+
}
|
|
108
|
+
.nw-progress-sm {
|
|
109
|
+
--_h: var(--nw-space-1-5);
|
|
110
|
+
}
|
|
111
|
+
.nw-progress-md {
|
|
112
|
+
--_h: var(--nw-space-2);
|
|
113
|
+
}
|
|
114
|
+
.nw-progress-lg {
|
|
115
|
+
--_h: var(--nw-space-3);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Intents ---------------------------------------------------------------------------------- */
|
|
119
|
+
|
|
120
|
+
.nw-progress-primary {
|
|
121
|
+
--_intent: var(--nw-primary);
|
|
122
|
+
--_on: var(--nw-on-primary);
|
|
123
|
+
--_soft: var(--nw-primary-soft);
|
|
124
|
+
}
|
|
125
|
+
.nw-progress-secondary {
|
|
126
|
+
--_intent: var(--nw-secondary);
|
|
127
|
+
--_on: var(--nw-on-secondary);
|
|
128
|
+
--_soft: var(--nw-secondary-soft);
|
|
129
|
+
}
|
|
130
|
+
.nw-progress-tertiary {
|
|
131
|
+
--_intent: var(--nw-tertiary);
|
|
132
|
+
--_on: var(--nw-on-tertiary);
|
|
133
|
+
--_soft: var(--nw-tertiary-soft);
|
|
134
|
+
}
|
|
135
|
+
.nw-progress-neutral {
|
|
136
|
+
--_intent: var(--nw-fg-muted);
|
|
137
|
+
--_on: var(--nw-canvas);
|
|
138
|
+
--_soft: color-mix(in oklab, var(--nw-fg) 10%, transparent);
|
|
139
|
+
}
|
|
140
|
+
.nw-progress-info {
|
|
141
|
+
--_intent: var(--nw-info);
|
|
142
|
+
--_on: var(--nw-on-info);
|
|
143
|
+
--_soft: var(--nw-info-soft);
|
|
144
|
+
}
|
|
145
|
+
.nw-progress-success {
|
|
146
|
+
--_intent: var(--nw-success);
|
|
147
|
+
--_on: var(--nw-on-success);
|
|
148
|
+
--_soft: var(--nw-success-soft);
|
|
149
|
+
}
|
|
150
|
+
.nw-progress-warning {
|
|
151
|
+
--_intent: var(--nw-warning);
|
|
152
|
+
--_on: var(--nw-on-warning);
|
|
153
|
+
--_soft: var(--nw-warning-soft);
|
|
154
|
+
}
|
|
155
|
+
.nw-progress-danger {
|
|
156
|
+
--_intent: var(--nw-danger);
|
|
157
|
+
--_on: var(--nw-on-danger);
|
|
158
|
+
--_soft: var(--nw-danger-soft);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Variants --------------------------------------------------------------------------------- */
|
|
162
|
+
|
|
163
|
+
.nw-progress-striped::-webkit-progress-value,
|
|
164
|
+
.nw-progress-striped .nw-progress-fill,
|
|
165
|
+
.nw-progress-striped::-moz-progress-bar {
|
|
166
|
+
background-image: repeating-linear-gradient(
|
|
167
|
+
45deg,
|
|
168
|
+
color-mix(in oklab, var(--_on) 22%, transparent) 0 var(--nw-space-1),
|
|
169
|
+
transparent var(--nw-space-1) var(--nw-space-2)
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
.nw-progress-pill {
|
|
173
|
+
--_radius: var(--nw-radius-full);
|
|
174
|
+
}
|
|
175
|
+
/* Chamfered ends, sized by the track height so the cut stays proportional. */
|
|
176
|
+
.nw-progress-cut {
|
|
177
|
+
--_radius: 0;
|
|
178
|
+
clip-path: polygon(0 0, calc(100% - var(--_h)) 0, 100% 100%, var(--_h) 100%);
|
|
179
|
+
}
|
|
180
|
+
.nw-progress-cut .nw-progress-fill,
|
|
181
|
+
.nw-progress-cut::-webkit-progress-value,
|
|
182
|
+
.nw-progress-cut::-moz-progress-bar {
|
|
183
|
+
border-radius: 0;
|
|
184
|
+
}
|
|
185
|
+
.nw-progress-glow::-webkit-progress-value {
|
|
186
|
+
box-shadow: var(--nw-glow-sm);
|
|
187
|
+
}
|
|
188
|
+
.nw-progress-glow::-moz-progress-bar {
|
|
189
|
+
box-shadow: var(--nw-glow-sm);
|
|
190
|
+
}
|
|
191
|
+
.nw-progress-glow .nw-progress-fill {
|
|
192
|
+
box-shadow: var(--nw-glow-sm);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (prefers-reduced-motion: reduce) {
|
|
196
|
+
/* Without motion the sweep would freeze off-track; show a static busy bar instead. Add
|
|
197
|
+
.nw-motion-essential to keep the sweep itself. */
|
|
198
|
+
.nw-progress:not(.nw-motion-essential):is(
|
|
199
|
+
:indeterminate,
|
|
200
|
+
.nw-progress-indeterminate,
|
|
201
|
+
[data-state='indeterminate']
|
|
202
|
+
),
|
|
203
|
+
.nw-progress:not(.nw-motion-essential):is(
|
|
204
|
+
:indeterminate,
|
|
205
|
+
.nw-progress-indeterminate,
|
|
206
|
+
[data-state='indeterminate']
|
|
207
|
+
)
|
|
208
|
+
.nw-progress-fill {
|
|
209
|
+
animation: none;
|
|
210
|
+
}
|
|
211
|
+
.nw-progress:not(.nw-motion-essential):is(
|
|
212
|
+
.nw-progress-indeterminate,
|
|
213
|
+
[data-state='indeterminate']
|
|
214
|
+
)
|
|
215
|
+
.nw-progress-fill {
|
|
216
|
+
inline-size: 100%;
|
|
217
|
+
opacity: 0.6;
|
|
218
|
+
}
|
|
219
|
+
progress.nw-progress:not(.nw-motion-essential):indeterminate::-webkit-progress-value {
|
|
220
|
+
inline-size: 100%;
|
|
221
|
+
opacity: 0.6;
|
|
222
|
+
}
|
|
223
|
+
progress.nw-progress:not(.nw-motion-essential):indeterminate::-moz-progress-bar {
|
|
224
|
+
inline-size: 100%;
|
|
225
|
+
opacity: 0.6;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (forced-colors: active) {
|
|
230
|
+
.nw-progress {
|
|
231
|
+
border: 1px solid CanvasText;
|
|
232
|
+
background: Canvas;
|
|
233
|
+
}
|
|
234
|
+
.nw-progress::-webkit-progress-value,
|
|
235
|
+
.nw-progress::-moz-progress-bar,
|
|
236
|
+
.nw-progress-fill {
|
|
237
|
+
background: Highlight;
|
|
238
|
+
box-shadow: none;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* Select. The well, the intents, the sizes and the invalid/disabled states live with the other
|
|
2
|
+
text controls in input.css; this file adds what makes a select a select.
|
|
3
|
+
On a native <select> the caret is painted, because the element has no pseudo-elements. The same
|
|
4
|
+
class works on a custom listbox trigger (a button or a div): aria-expanded, data-state='open'
|
|
5
|
+
and data-placeholder then describe it.
|
|
6
|
+
On a native select the popup itself belongs to the browser; the option colors below theme the
|
|
7
|
+
platforms that honor them. */
|
|
8
|
+
@layer components {
|
|
9
|
+
.nw-select {
|
|
10
|
+
--_caret: var(--nw-fg-subtle);
|
|
11
|
+
padding-inline-end: calc(var(--_px) + var(--nw-space-5));
|
|
12
|
+
background-image:
|
|
13
|
+
linear-gradient(
|
|
14
|
+
135deg,
|
|
15
|
+
transparent calc(50% - 0.5px),
|
|
16
|
+
var(--_caret) 50%,
|
|
17
|
+
transparent calc(50% + 0.5px)
|
|
18
|
+
),
|
|
19
|
+
linear-gradient(
|
|
20
|
+
225deg,
|
|
21
|
+
transparent calc(50% - 0.5px),
|
|
22
|
+
var(--_caret) 50%,
|
|
23
|
+
transparent calc(50% + 0.5px)
|
|
24
|
+
);
|
|
25
|
+
background-position:
|
|
26
|
+
right calc(var(--_px) + var(--nw-space-1-5)) center,
|
|
27
|
+
right var(--_px) center;
|
|
28
|
+
background-size: var(--nw-space-1-5) var(--nw-space-1-5);
|
|
29
|
+
background-repeat: no-repeat;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
/* The caret is a pair of gradients, not text, so it flips without changing the box. */
|
|
33
|
+
.nw-select:is([aria-expanded='true'], [data-state='open']) {
|
|
34
|
+
--_line: var(--_intent);
|
|
35
|
+
background-image:
|
|
36
|
+
linear-gradient(
|
|
37
|
+
45deg,
|
|
38
|
+
transparent calc(50% - 0.5px),
|
|
39
|
+
var(--_caret) 50%,
|
|
40
|
+
transparent calc(50% + 0.5px)
|
|
41
|
+
),
|
|
42
|
+
linear-gradient(
|
|
43
|
+
315deg,
|
|
44
|
+
transparent calc(50% - 0.5px),
|
|
45
|
+
var(--_caret) 50%,
|
|
46
|
+
transparent calc(50% + 0.5px)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
.nw-select:focus-visible {
|
|
50
|
+
outline: var(--nw-ring-width) solid var(--_ring);
|
|
51
|
+
outline-offset: var(--nw-ring-offset);
|
|
52
|
+
}
|
|
53
|
+
.nw-select[data-placeholder] {
|
|
54
|
+
color: var(--nw-fg-subtle);
|
|
55
|
+
}
|
|
56
|
+
.nw-select:disabled,
|
|
57
|
+
.nw-select[aria-disabled='true'] {
|
|
58
|
+
--_caret: var(--nw-fg-disabled);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* A custom trigger lays out its own content. */
|
|
62
|
+
.nw-select:is(button, [role='combobox'], [role='listbox']) {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
gap: var(--nw-space-2);
|
|
67
|
+
inline-size: auto;
|
|
68
|
+
min-inline-size: var(--nw-space-24);
|
|
69
|
+
text-align: start;
|
|
70
|
+
font-weight: 400;
|
|
71
|
+
user-select: none;
|
|
72
|
+
}
|
|
73
|
+
.nw-select > svg {
|
|
74
|
+
flex: none;
|
|
75
|
+
inline-size: 1em;
|
|
76
|
+
block-size: 1em;
|
|
77
|
+
color: var(--_caret);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Multiple and list boxes ------------------------------------------------------------------ */
|
|
81
|
+
.nw-select[multiple],
|
|
82
|
+
.nw-select[size]:not([size='1']) {
|
|
83
|
+
block-size: auto;
|
|
84
|
+
min-block-size: var(--_h);
|
|
85
|
+
padding: var(--nw-space-1);
|
|
86
|
+
line-height: var(--nw-leading-normal);
|
|
87
|
+
background-image: none;
|
|
88
|
+
scrollbar-color: var(--nw-line-strong) transparent;
|
|
89
|
+
scrollbar-width: thin;
|
|
90
|
+
}
|
|
91
|
+
.nw-select option {
|
|
92
|
+
padding: var(--nw-space-1-5) var(--nw-space-2);
|
|
93
|
+
border-radius: var(--nw-radius-sm);
|
|
94
|
+
color: var(--nw-fg);
|
|
95
|
+
background-color: var(--nw-panel);
|
|
96
|
+
}
|
|
97
|
+
.nw-select option:checked {
|
|
98
|
+
color: var(--nw-fg);
|
|
99
|
+
background-color: var(--nw-primary-soft);
|
|
100
|
+
}
|
|
101
|
+
.nw-select option:disabled {
|
|
102
|
+
color: var(--nw-fg-disabled);
|
|
103
|
+
}
|
|
104
|
+
.nw-select optgroup {
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
color: var(--nw-fg-muted);
|
|
107
|
+
background-color: var(--nw-panel);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (forced-colors: active) {
|
|
111
|
+
/* The gradient caret is a background image and disappears; the native arrow comes back. */
|
|
112
|
+
.nw-select {
|
|
113
|
+
appearance: auto;
|
|
114
|
+
background-image: none;
|
|
115
|
+
padding-inline-end: var(--_px);
|
|
116
|
+
}
|
|
117
|
+
.nw-select:is(button, [role='combobox'], [role='listbox']) {
|
|
118
|
+
appearance: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
/* Sidenav: the vertical navigation of an app shell. <nav class="nw-sidenav"> with sections
|
|
2
|
+
(.nw-sidenav-section, .nw-sidenav-label), lists of .nw-sidenav-link, collapsible groups
|
|
3
|
+
(a link with aria-expanded over a .nw-sidenav-sub list), a header and a footer. The current
|
|
4
|
+
page carries aria-current="page". .nw-sidenav-collapsed turns it into an icon rail. */
|
|
5
|
+
@layer components {
|
|
6
|
+
.nw-sidenav {
|
|
7
|
+
--_intent: var(--nw-primary);
|
|
8
|
+
--_on: var(--nw-on-primary);
|
|
9
|
+
--_soft: var(--nw-primary-soft);
|
|
10
|
+
--_ink: color-mix(in oklab, var(--_intent) var(--nw-soft-ink), var(--nw-fg));
|
|
11
|
+
--_h: var(--nw-control-md);
|
|
12
|
+
--_fs: var(--nw-text-sm);
|
|
13
|
+
--_w: var(--nw-sidenav-size, 16rem);
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--nw-space-5);
|
|
17
|
+
inline-size: var(--_w);
|
|
18
|
+
min-inline-size: 0;
|
|
19
|
+
padding: var(--nw-space-4) var(--nw-space-3);
|
|
20
|
+
border-inline-end: 1px solid var(--nw-line);
|
|
21
|
+
font-size: var(--_fs);
|
|
22
|
+
color: var(--nw-fg);
|
|
23
|
+
background-color: var(--nw-canvas-subtle);
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
overscroll-behavior: contain;
|
|
26
|
+
scrollbar-width: thin;
|
|
27
|
+
}
|
|
28
|
+
.nw-sidenav-end {
|
|
29
|
+
border-inline-end: 0;
|
|
30
|
+
border-inline-start: 1px solid var(--nw-line);
|
|
31
|
+
}
|
|
32
|
+
.nw-sidenav-flush {
|
|
33
|
+
border: 0;
|
|
34
|
+
background: none;
|
|
35
|
+
}
|
|
36
|
+
.nw-sidenav-sticky {
|
|
37
|
+
position: sticky;
|
|
38
|
+
inset-block-start: 0;
|
|
39
|
+
max-block-size: 100dvh;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nw-sidenav-header,
|
|
43
|
+
.nw-sidenav-footer {
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: var(--nw-space-3);
|
|
46
|
+
align-items: center;
|
|
47
|
+
min-inline-size: 0;
|
|
48
|
+
padding-inline: var(--nw-space-2);
|
|
49
|
+
}
|
|
50
|
+
.nw-sidenav-footer {
|
|
51
|
+
margin-block-start: auto;
|
|
52
|
+
padding-block-start: var(--nw-space-4);
|
|
53
|
+
border-block-start: 1px solid var(--nw-line);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.nw-sidenav-section {
|
|
57
|
+
display: grid;
|
|
58
|
+
gap: var(--nw-space-1);
|
|
59
|
+
min-inline-size: 0;
|
|
60
|
+
}
|
|
61
|
+
.nw-sidenav-label {
|
|
62
|
+
padding: 0 var(--nw-space-2-5) var(--nw-space-1);
|
|
63
|
+
font-family: var(--nw-font-mono);
|
|
64
|
+
font-size: var(--nw-text-2xs);
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
letter-spacing: var(--nw-tracking-wider);
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
color: var(--nw-fg-subtle);
|
|
69
|
+
}
|
|
70
|
+
.nw-sidenav-list {
|
|
71
|
+
display: grid;
|
|
72
|
+
gap: var(--nw-space-0-5);
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0;
|
|
75
|
+
list-style: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.nw-sidenav-link {
|
|
79
|
+
position: relative;
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: var(--nw-space-2-5);
|
|
82
|
+
align-items: center;
|
|
83
|
+
inline-size: 100%;
|
|
84
|
+
min-block-size: var(--_h);
|
|
85
|
+
padding: var(--nw-space-1) var(--nw-space-2-5);
|
|
86
|
+
border: 0;
|
|
87
|
+
border-radius: var(--nw-radius-sm);
|
|
88
|
+
font: inherit;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
line-height: var(--nw-leading-snug);
|
|
91
|
+
text-align: start;
|
|
92
|
+
color: var(--nw-fg-muted);
|
|
93
|
+
text-decoration-line: none;
|
|
94
|
+
background: none;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition:
|
|
97
|
+
color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
98
|
+
background-color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
99
|
+
box-shadow var(--nw-duration-fast) var(--nw-ease-standard);
|
|
100
|
+
}
|
|
101
|
+
.nw-sidenav-link:hover:not([aria-disabled='true'], :disabled) {
|
|
102
|
+
color: var(--nw-fg);
|
|
103
|
+
background-color: var(--nw-panel);
|
|
104
|
+
}
|
|
105
|
+
.nw-sidenav-link:active:not([aria-disabled='true'], :disabled) {
|
|
106
|
+
background-color: var(--nw-panel-active);
|
|
107
|
+
}
|
|
108
|
+
.nw-sidenav-link:focus-visible {
|
|
109
|
+
outline: var(--nw-ring-width) solid var(--nw-ring);
|
|
110
|
+
outline-offset: 0;
|
|
111
|
+
}
|
|
112
|
+
.nw-sidenav-link:is([aria-current='page'], [aria-current='true'], .nw-sidenav-link-active) {
|
|
113
|
+
color: var(--_ink);
|
|
114
|
+
background-color: var(--_soft);
|
|
115
|
+
}
|
|
116
|
+
.nw-sidenav-link:is([aria-disabled='true'], :disabled) {
|
|
117
|
+
color: var(--nw-fg-disabled);
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.nw-sidenav-icon {
|
|
122
|
+
display: inline-flex;
|
|
123
|
+
flex: none;
|
|
124
|
+
color: var(--nw-fg-subtle);
|
|
125
|
+
transition: color var(--nw-duration-fast) var(--nw-ease-standard);
|
|
126
|
+
}
|
|
127
|
+
.nw-sidenav-icon > svg {
|
|
128
|
+
inline-size: 1.2em;
|
|
129
|
+
block-size: 1.2em;
|
|
130
|
+
}
|
|
131
|
+
.nw-sidenav-link:is(:hover, [aria-current='page'], [aria-current='true'], .nw-sidenav-link-active)
|
|
132
|
+
.nw-sidenav-icon {
|
|
133
|
+
color: inherit;
|
|
134
|
+
}
|
|
135
|
+
.nw-sidenav-text {
|
|
136
|
+
flex: 1;
|
|
137
|
+
min-inline-size: 0;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
text-overflow: ellipsis;
|
|
140
|
+
white-space: nowrap;
|
|
141
|
+
}
|
|
142
|
+
/* A count at the end of the row. */
|
|
143
|
+
.nw-sidenav-badge {
|
|
144
|
+
display: inline-grid;
|
|
145
|
+
place-items: center;
|
|
146
|
+
min-inline-size: 1.6em;
|
|
147
|
+
margin-inline-start: auto;
|
|
148
|
+
padding: 0 var(--nw-space-1-5);
|
|
149
|
+
border-radius: var(--nw-radius-full);
|
|
150
|
+
font-family: var(--nw-font-mono);
|
|
151
|
+
font-size: var(--nw-text-2xs);
|
|
152
|
+
font-variant-numeric: tabular-nums;
|
|
153
|
+
line-height: 1.6;
|
|
154
|
+
color: var(--nw-fg-subtle);
|
|
155
|
+
background-color: var(--nw-panel-active);
|
|
156
|
+
}
|
|
157
|
+
.nw-sidenav-link:is([aria-current='page'], [aria-current='true'], .nw-sidenav-link-active)
|
|
158
|
+
.nw-sidenav-badge {
|
|
159
|
+
color: var(--_on);
|
|
160
|
+
background-color: var(--_intent);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* Collapsible group: the trigger ends in a chevron that turns when open; the sub list is
|
|
164
|
+
indented behind a hairline. */
|
|
165
|
+
.nw-sidenav-link[aria-expanded]::after {
|
|
166
|
+
content: '';
|
|
167
|
+
flex: none;
|
|
168
|
+
inline-size: 1em;
|
|
169
|
+
block-size: 1em;
|
|
170
|
+
margin-inline-start: auto;
|
|
171
|
+
background-color: var(--nw-fg-subtle);
|
|
172
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")
|
|
173
|
+
center / contain no-repeat;
|
|
174
|
+
transition: rotate var(--nw-duration-fast) var(--nw-ease-standard);
|
|
175
|
+
}
|
|
176
|
+
.nw-sidenav-link[aria-expanded] .nw-sidenav-badge {
|
|
177
|
+
margin-inline-start: auto;
|
|
178
|
+
}
|
|
179
|
+
.nw-sidenav-link[aria-expanded]:has(.nw-sidenav-badge)::after {
|
|
180
|
+
margin-inline-start: 0;
|
|
181
|
+
}
|
|
182
|
+
.nw-sidenav-link[aria-expanded='true']::after {
|
|
183
|
+
rotate: 90deg;
|
|
184
|
+
}
|
|
185
|
+
.nw-sidenav-sub {
|
|
186
|
+
display: grid;
|
|
187
|
+
gap: var(--nw-space-0-5);
|
|
188
|
+
margin: var(--nw-space-0-5) 0 var(--nw-space-1) var(--nw-space-4);
|
|
189
|
+
padding: 0 0 0 var(--nw-space-2);
|
|
190
|
+
border-inline-start: 1px solid var(--nw-line);
|
|
191
|
+
list-style: none;
|
|
192
|
+
}
|
|
193
|
+
.nw-sidenav-sub .nw-sidenav-link {
|
|
194
|
+
min-block-size: calc(var(--_h) - var(--nw-space-1));
|
|
195
|
+
font-weight: 400;
|
|
196
|
+
}
|
|
197
|
+
.nw-sidenav-sub:is([hidden], [data-state='closed']) {
|
|
198
|
+
display: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Solid: the current link is a filled, glowing block. */
|
|
202
|
+
.nw-sidenav-solid
|
|
203
|
+
.nw-sidenav-link:is([aria-current='page'], [aria-current='true'], .nw-sidenav-link-active) {
|
|
204
|
+
--nw-glow-color: var(--_intent);
|
|
205
|
+
color: var(--_on);
|
|
206
|
+
background-color: var(--_intent);
|
|
207
|
+
box-shadow: var(--nw-glow-sm);
|
|
208
|
+
}
|
|
209
|
+
.nw-sidenav-solid
|
|
210
|
+
.nw-sidenav-link:is([aria-current='page'], [aria-current='true'], .nw-sidenav-link-active)
|
|
211
|
+
.nw-sidenav-badge {
|
|
212
|
+
color: var(--_intent);
|
|
213
|
+
background-color: var(--_on);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Collapsed rail: icons only. Labels stay in the accessibility tree. */
|
|
217
|
+
.nw-sidenav-collapsed {
|
|
218
|
+
inline-size: auto;
|
|
219
|
+
padding-inline: var(--nw-space-2);
|
|
220
|
+
}
|
|
221
|
+
.nw-sidenav-collapsed .nw-sidenav-link {
|
|
222
|
+
justify-content: center;
|
|
223
|
+
inline-size: var(--_h);
|
|
224
|
+
padding-inline: 0;
|
|
225
|
+
}
|
|
226
|
+
.nw-sidenav-collapsed .nw-sidenav-text,
|
|
227
|
+
.nw-sidenav-collapsed .nw-sidenav-label {
|
|
228
|
+
position: absolute;
|
|
229
|
+
inline-size: 1px;
|
|
230
|
+
block-size: 1px;
|
|
231
|
+
margin: -1px;
|
|
232
|
+
padding: 0;
|
|
233
|
+
overflow: hidden;
|
|
234
|
+
clip-path: inset(50%);
|
|
235
|
+
white-space: nowrap;
|
|
236
|
+
}
|
|
237
|
+
.nw-sidenav-collapsed .nw-sidenav-badge,
|
|
238
|
+
.nw-sidenav-collapsed .nw-sidenav-link[aria-expanded]::after,
|
|
239
|
+
.nw-sidenav-collapsed .nw-sidenav-sub {
|
|
240
|
+
display: none;
|
|
241
|
+
}
|
|
242
|
+
.nw-sidenav-collapsed .nw-sidenav-icon {
|
|
243
|
+
margin: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Intents color the current link. */
|
|
247
|
+
.nw-sidenav-primary {
|
|
248
|
+
--_intent: var(--nw-primary);
|
|
249
|
+
--_on: var(--nw-on-primary);
|
|
250
|
+
--_soft: var(--nw-primary-soft);
|
|
251
|
+
}
|
|
252
|
+
.nw-sidenav-secondary {
|
|
253
|
+
--_intent: var(--nw-secondary);
|
|
254
|
+
--_on: var(--nw-on-secondary);
|
|
255
|
+
--_soft: var(--nw-secondary-soft);
|
|
256
|
+
}
|
|
257
|
+
.nw-sidenav-tertiary {
|
|
258
|
+
--_intent: var(--nw-tertiary);
|
|
259
|
+
--_on: var(--nw-on-tertiary);
|
|
260
|
+
--_soft: var(--nw-tertiary-soft);
|
|
261
|
+
}
|
|
262
|
+
.nw-sidenav-neutral {
|
|
263
|
+
--_intent: var(--nw-fg);
|
|
264
|
+
--_on: var(--nw-canvas);
|
|
265
|
+
--_soft: color-mix(in oklab, var(--nw-fg) 12%, transparent);
|
|
266
|
+
}
|
|
267
|
+
.nw-sidenav-info {
|
|
268
|
+
--_intent: var(--nw-info);
|
|
269
|
+
--_on: var(--nw-on-info);
|
|
270
|
+
--_soft: var(--nw-info-soft);
|
|
271
|
+
}
|
|
272
|
+
.nw-sidenav-success {
|
|
273
|
+
--_intent: var(--nw-success);
|
|
274
|
+
--_on: var(--nw-on-success);
|
|
275
|
+
--_soft: var(--nw-success-soft);
|
|
276
|
+
}
|
|
277
|
+
.nw-sidenav-warning {
|
|
278
|
+
--_intent: var(--nw-warning);
|
|
279
|
+
--_on: var(--nw-on-warning);
|
|
280
|
+
--_soft: var(--nw-warning-soft);
|
|
281
|
+
}
|
|
282
|
+
.nw-sidenav-danger {
|
|
283
|
+
--_intent: var(--nw-danger);
|
|
284
|
+
--_on: var(--nw-on-danger);
|
|
285
|
+
--_soft: var(--nw-danger-soft);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* Sizes */
|
|
289
|
+
.nw-sidenav-xs {
|
|
290
|
+
--_h: var(--nw-control-xs);
|
|
291
|
+
--_fs: var(--nw-text-xs);
|
|
292
|
+
}
|
|
293
|
+
.nw-sidenav-sm {
|
|
294
|
+
--_h: var(--nw-control-sm);
|
|
295
|
+
--_fs: var(--nw-text-sm);
|
|
296
|
+
}
|
|
297
|
+
.nw-sidenav-md {
|
|
298
|
+
--_h: var(--nw-control-md);
|
|
299
|
+
--_fs: var(--nw-text-sm);
|
|
300
|
+
}
|
|
301
|
+
.nw-sidenav-lg {
|
|
302
|
+
--_h: var(--nw-control-lg);
|
|
303
|
+
--_fs: var(--nw-text-base);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@media (forced-colors: active) {
|
|
307
|
+
.nw-sidenav,
|
|
308
|
+
.nw-sidenav-footer,
|
|
309
|
+
.nw-sidenav-sub {
|
|
310
|
+
border-color: CanvasText;
|
|
311
|
+
background: Canvas;
|
|
312
|
+
}
|
|
313
|
+
.nw-sidenav-link:is([aria-current='page'], [aria-current='true'], .nw-sidenav-link-active) {
|
|
314
|
+
forced-color-adjust: none;
|
|
315
|
+
color: HighlightText;
|
|
316
|
+
background-color: Highlight;
|
|
317
|
+
box-shadow: none;
|
|
318
|
+
}
|
|
319
|
+
.nw-sidenav-link:is([aria-disabled='true'], :disabled) {
|
|
320
|
+
color: GrayText;
|
|
321
|
+
}
|
|
322
|
+
.nw-sidenav-link[aria-expanded]::after {
|
|
323
|
+
background-color: CanvasText;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|