@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,302 @@
|
|
|
1
|
+
/* Pagination: <nav class="nw-pagination"><ul class="nw-pagination-list"><li><a class="nw-pagination-item">
|
|
2
|
+
with aria-current="page" on the current one. Numerals are mono and tabular so the items keep one
|
|
3
|
+
width. Variants: solid, outline, pill, cut (chamfered current page). */
|
|
4
|
+
@layer components {
|
|
5
|
+
.nw-pagination {
|
|
6
|
+
--_intent: var(--nw-primary);
|
|
7
|
+
--_on: var(--nw-on-primary);
|
|
8
|
+
--_soft: var(--nw-primary-soft);
|
|
9
|
+
--_ink: color-mix(in oklab, var(--_intent) var(--nw-soft-ink), var(--nw-fg));
|
|
10
|
+
--_h: var(--nw-control-md);
|
|
11
|
+
--_fs: var(--nw-text-sm);
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
gap: var(--nw-space-3) var(--nw-space-5);
|
|
15
|
+
align-items: center;
|
|
16
|
+
min-inline-size: 0;
|
|
17
|
+
}
|
|
18
|
+
.nw-pagination-center {
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
.nw-pagination-end {
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
}
|
|
24
|
+
.nw-pagination-between {
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.nw-pagination-list {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
gap: var(--nw-space-1);
|
|
32
|
+
align-items: center;
|
|
33
|
+
margin: 0;
|
|
34
|
+
padding: 0;
|
|
35
|
+
list-style: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.nw-pagination-item {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
gap: var(--nw-space-1-5);
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
min-inline-size: var(--_h);
|
|
44
|
+
block-size: var(--_h);
|
|
45
|
+
padding-inline: var(--nw-space-2);
|
|
46
|
+
border: 1px solid transparent;
|
|
47
|
+
border-radius: var(--nw-radius-sm);
|
|
48
|
+
font-family: var(--nw-font-mono);
|
|
49
|
+
font-size: var(--_fs);
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
font-variant-numeric: tabular-nums;
|
|
52
|
+
line-height: 1;
|
|
53
|
+
color: var(--nw-fg-muted);
|
|
54
|
+
text-decoration-line: none;
|
|
55
|
+
background: none;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
transition:
|
|
58
|
+
color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
59
|
+
background-color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
60
|
+
border-color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
61
|
+
box-shadow var(--nw-duration-fast) var(--nw-ease-standard),
|
|
62
|
+
filter var(--nw-duration-fast) var(--nw-ease-standard);
|
|
63
|
+
}
|
|
64
|
+
.nw-pagination-item > svg {
|
|
65
|
+
flex: none;
|
|
66
|
+
inline-size: 1.15em;
|
|
67
|
+
block-size: 1.15em;
|
|
68
|
+
}
|
|
69
|
+
.nw-pagination-item:hover:not(:disabled, [aria-disabled='true']) {
|
|
70
|
+
color: var(--nw-fg);
|
|
71
|
+
background-color: var(--nw-panel);
|
|
72
|
+
}
|
|
73
|
+
.nw-pagination-item:active:not(:disabled, [aria-disabled='true']) {
|
|
74
|
+
background-color: var(--nw-panel-active);
|
|
75
|
+
}
|
|
76
|
+
.nw-pagination-item:focus-visible {
|
|
77
|
+
outline: var(--nw-ring-width) solid var(--nw-ring);
|
|
78
|
+
outline-offset: var(--nw-ring-offset);
|
|
79
|
+
}
|
|
80
|
+
.nw-pagination-item:is(
|
|
81
|
+
[aria-current='page'],
|
|
82
|
+
[aria-current='true'],
|
|
83
|
+
[data-selected],
|
|
84
|
+
.nw-pagination-active
|
|
85
|
+
) {
|
|
86
|
+
color: var(--_ink);
|
|
87
|
+
background-color: var(--_soft);
|
|
88
|
+
}
|
|
89
|
+
.nw-pagination-item:is(:disabled, [aria-disabled='true']) {
|
|
90
|
+
color: var(--nw-fg-disabled);
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Previous and next carry a label beside their arrow. */
|
|
95
|
+
:is(.nw-pagination-prev, .nw-pagination-next) {
|
|
96
|
+
padding-inline: var(--nw-space-3);
|
|
97
|
+
font-family: var(--nw-font-sans);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.nw-pagination-ellipsis {
|
|
101
|
+
display: inline-grid;
|
|
102
|
+
place-items: center;
|
|
103
|
+
min-inline-size: var(--_h);
|
|
104
|
+
block-size: var(--_h);
|
|
105
|
+
font-family: var(--nw-font-mono);
|
|
106
|
+
font-size: var(--_fs);
|
|
107
|
+
letter-spacing: 0.1em;
|
|
108
|
+
color: var(--nw-fg-faint);
|
|
109
|
+
user-select: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* "1-20 of 134" */
|
|
113
|
+
.nw-pagination-summary {
|
|
114
|
+
font-size: var(--_fs);
|
|
115
|
+
font-variant-numeric: tabular-nums;
|
|
116
|
+
color: var(--nw-fg-subtle);
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Intents */
|
|
121
|
+
.nw-pagination-primary {
|
|
122
|
+
--_intent: var(--nw-primary);
|
|
123
|
+
--_on: var(--nw-on-primary);
|
|
124
|
+
--_soft: var(--nw-primary-soft);
|
|
125
|
+
}
|
|
126
|
+
.nw-pagination-secondary {
|
|
127
|
+
--_intent: var(--nw-secondary);
|
|
128
|
+
--_on: var(--nw-on-secondary);
|
|
129
|
+
--_soft: var(--nw-secondary-soft);
|
|
130
|
+
}
|
|
131
|
+
.nw-pagination-tertiary {
|
|
132
|
+
--_intent: var(--nw-tertiary);
|
|
133
|
+
--_on: var(--nw-on-tertiary);
|
|
134
|
+
--_soft: var(--nw-tertiary-soft);
|
|
135
|
+
}
|
|
136
|
+
.nw-pagination-neutral {
|
|
137
|
+
--_intent: var(--nw-fg);
|
|
138
|
+
--_on: var(--nw-canvas);
|
|
139
|
+
--_soft: color-mix(in oklab, var(--nw-fg) 12%, transparent);
|
|
140
|
+
}
|
|
141
|
+
.nw-pagination-info {
|
|
142
|
+
--_intent: var(--nw-info);
|
|
143
|
+
--_on: var(--nw-on-info);
|
|
144
|
+
--_soft: var(--nw-info-soft);
|
|
145
|
+
}
|
|
146
|
+
.nw-pagination-success {
|
|
147
|
+
--_intent: var(--nw-success);
|
|
148
|
+
--_on: var(--nw-on-success);
|
|
149
|
+
--_soft: var(--nw-success-soft);
|
|
150
|
+
}
|
|
151
|
+
.nw-pagination-warning {
|
|
152
|
+
--_intent: var(--nw-warning);
|
|
153
|
+
--_on: var(--nw-on-warning);
|
|
154
|
+
--_soft: var(--nw-warning-soft);
|
|
155
|
+
}
|
|
156
|
+
.nw-pagination-danger {
|
|
157
|
+
--_intent: var(--nw-danger);
|
|
158
|
+
--_on: var(--nw-on-danger);
|
|
159
|
+
--_soft: var(--nw-danger-soft);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* Solid: the current page is a filled, glowing block. */
|
|
163
|
+
.nw-pagination-solid
|
|
164
|
+
.nw-pagination-item:is(
|
|
165
|
+
[aria-current='page'],
|
|
166
|
+
[aria-current='true'],
|
|
167
|
+
[data-selected],
|
|
168
|
+
.nw-pagination-active
|
|
169
|
+
) {
|
|
170
|
+
--nw-glow-color: var(--_intent);
|
|
171
|
+
color: var(--_on);
|
|
172
|
+
background-color: var(--_intent);
|
|
173
|
+
box-shadow: var(--nw-glow-sm);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Outline: every page is a bordered control. */
|
|
177
|
+
.nw-pagination-outline .nw-pagination-item {
|
|
178
|
+
border-color: var(--nw-line-strong);
|
|
179
|
+
background-color: var(--nw-canvas);
|
|
180
|
+
}
|
|
181
|
+
.nw-pagination-outline .nw-pagination-item:hover:not(:disabled, [aria-disabled='true']) {
|
|
182
|
+
border-color: var(--nw-line-bright);
|
|
183
|
+
}
|
|
184
|
+
.nw-pagination-outline
|
|
185
|
+
.nw-pagination-item:is(
|
|
186
|
+
[aria-current='page'],
|
|
187
|
+
[aria-current='true'],
|
|
188
|
+
[data-selected],
|
|
189
|
+
.nw-pagination-active
|
|
190
|
+
) {
|
|
191
|
+
border-color: color-mix(in oklab, var(--_intent) 50%, transparent);
|
|
192
|
+
}
|
|
193
|
+
.nw-pagination-outline .nw-pagination-item:is(:disabled, [aria-disabled='true']) {
|
|
194
|
+
border-color: var(--nw-line);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.nw-pagination-pill .nw-pagination-item {
|
|
198
|
+
border-radius: var(--nw-radius-full);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Cut: chamfered pages. The item paints the cut surface and keeps its box, so the current page
|
|
202
|
+
can glow through a filter; ::before draws the edge. */
|
|
203
|
+
.nw-pagination-cut .nw-pagination-item {
|
|
204
|
+
--nw-cut: calc(var(--_h) / 4);
|
|
205
|
+
--nw-fill: var(--_fill);
|
|
206
|
+
--_fill: transparent;
|
|
207
|
+
--_line: transparent;
|
|
208
|
+
position: relative;
|
|
209
|
+
isolation: isolate;
|
|
210
|
+
border: 0;
|
|
211
|
+
border-radius: 0;
|
|
212
|
+
background: var(--nw-cut-surface);
|
|
213
|
+
}
|
|
214
|
+
.nw-pagination-cut .nw-pagination-item::before {
|
|
215
|
+
content: '';
|
|
216
|
+
position: absolute;
|
|
217
|
+
inset: 0;
|
|
218
|
+
z-index: 1;
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
background: var(--_line);
|
|
221
|
+
clip-path: var(--nw-cut-ring);
|
|
222
|
+
}
|
|
223
|
+
.nw-pagination-cut .nw-pagination-item:hover:not(:disabled, [aria-disabled='true']) {
|
|
224
|
+
--_fill: var(--nw-panel);
|
|
225
|
+
--_line: var(--nw-line-strong);
|
|
226
|
+
background: var(--nw-cut-surface);
|
|
227
|
+
}
|
|
228
|
+
.nw-pagination-cut .nw-pagination-item:active:not(:disabled, [aria-disabled='true']) {
|
|
229
|
+
--_fill: var(--nw-panel-active);
|
|
230
|
+
background: var(--nw-cut-surface);
|
|
231
|
+
}
|
|
232
|
+
.nw-pagination-cut
|
|
233
|
+
.nw-pagination-item:is(
|
|
234
|
+
[aria-current='page'],
|
|
235
|
+
[aria-current='true'],
|
|
236
|
+
[data-selected],
|
|
237
|
+
.nw-pagination-active
|
|
238
|
+
) {
|
|
239
|
+
--_fill: var(--_intent);
|
|
240
|
+
--_line: transparent;
|
|
241
|
+
--nw-glow-color: var(--_intent);
|
|
242
|
+
color: var(--_on);
|
|
243
|
+
background: var(--nw-cut-surface);
|
|
244
|
+
filter: var(--nw-glow-drop-sm);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Sizes */
|
|
248
|
+
.nw-pagination-xs {
|
|
249
|
+
--_h: var(--nw-control-xs);
|
|
250
|
+
--_fs: var(--nw-text-xs);
|
|
251
|
+
}
|
|
252
|
+
.nw-pagination-sm {
|
|
253
|
+
--_h: var(--nw-control-sm);
|
|
254
|
+
--_fs: var(--nw-text-xs);
|
|
255
|
+
}
|
|
256
|
+
.nw-pagination-md {
|
|
257
|
+
--_h: var(--nw-control-md);
|
|
258
|
+
--_fs: var(--nw-text-sm);
|
|
259
|
+
}
|
|
260
|
+
.nw-pagination-lg {
|
|
261
|
+
--_h: var(--nw-control-lg);
|
|
262
|
+
--_fs: var(--nw-text-base);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@media (forced-colors: active) {
|
|
266
|
+
.nw-pagination-item {
|
|
267
|
+
border-color: CanvasText;
|
|
268
|
+
}
|
|
269
|
+
.nw-pagination-item:is(
|
|
270
|
+
[aria-current='page'],
|
|
271
|
+
[aria-current='true'],
|
|
272
|
+
[data-selected],
|
|
273
|
+
.nw-pagination-active
|
|
274
|
+
) {
|
|
275
|
+
forced-color-adjust: none;
|
|
276
|
+
color: HighlightText;
|
|
277
|
+
background-color: Highlight;
|
|
278
|
+
box-shadow: none;
|
|
279
|
+
filter: none;
|
|
280
|
+
}
|
|
281
|
+
.nw-pagination-item:is(:disabled, [aria-disabled='true']) {
|
|
282
|
+
color: GrayText;
|
|
283
|
+
border-color: GrayText;
|
|
284
|
+
}
|
|
285
|
+
.nw-pagination-cut .nw-pagination-item {
|
|
286
|
+
border: 1px solid CanvasText;
|
|
287
|
+
background: Canvas;
|
|
288
|
+
}
|
|
289
|
+
.nw-pagination-cut
|
|
290
|
+
.nw-pagination-item:is(
|
|
291
|
+
[aria-current='page'],
|
|
292
|
+
[aria-current='true'],
|
|
293
|
+
[data-selected],
|
|
294
|
+
.nw-pagination-active
|
|
295
|
+
) {
|
|
296
|
+
background: Highlight;
|
|
297
|
+
}
|
|
298
|
+
.nw-pagination-cut .nw-pagination-item::before {
|
|
299
|
+
display: none;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/* Popover: a non-modal floating panel. Works as a native [popover] element (position it with
|
|
2
|
+
anchor positioning or JS) and as a library box with data-state="open|closed" and
|
|
3
|
+
data-side="top|right|bottom|left" (Reka, Radix).
|
|
4
|
+
|
|
5
|
+
<div class="nw-popover nw-popover-sm" data-state="open" data-side="bottom">
|
|
6
|
+
<span class="nw-popover-arrow" data-side="bottom" aria-hidden="true"></span>
|
|
7
|
+
<header class="nw-popover-header">
|
|
8
|
+
<h3 class="nw-popover-title">Title</h3>
|
|
9
|
+
<p class="nw-popover-description">...</p>
|
|
10
|
+
<button class="nw-popover-close" aria-label="Close">svg</button>
|
|
11
|
+
</header>
|
|
12
|
+
<div class="nw-popover-body">...</div>
|
|
13
|
+
<footer class="nw-popover-footer">...</footer>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
An .nw-popover-arrow that is an element (not an svg) is drawn as a rotated square that shares
|
|
17
|
+
the panel's fill and edge; give it the popover's data-side and set its inline inset from the
|
|
18
|
+
library's arrow coordinates. Sizes xs..lg, intents color the edge, -glow and -cut are opt-in. */
|
|
19
|
+
@layer components {
|
|
20
|
+
.nw-popover {
|
|
21
|
+
--_intent: var(--nw-primary);
|
|
22
|
+
--_on: var(--nw-on-primary);
|
|
23
|
+
--_soft: var(--nw-primary-soft);
|
|
24
|
+
--_fill: var(--nw-panel);
|
|
25
|
+
--_edge: var(--nw-line-strong);
|
|
26
|
+
--_w: 22rem;
|
|
27
|
+
--_p: var(--nw-space-5);
|
|
28
|
+
--_arrow: var(--nw-space-2);
|
|
29
|
+
--_from: translateY(var(--nw-slide-distance, 0.5rem));
|
|
30
|
+
--_in: nw-slide-in-from-bottom;
|
|
31
|
+
--_out: nw-slide-out-to-bottom;
|
|
32
|
+
--nw-glow-color: var(--_intent);
|
|
33
|
+
|
|
34
|
+
position: fixed;
|
|
35
|
+
inset: auto;
|
|
36
|
+
z-index: var(--nw-z-popover);
|
|
37
|
+
display: none;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
inline-size: min(var(--_w), calc(100dvw - 2 * var(--nw-space-4)));
|
|
40
|
+
max-block-size: var(--nw-popover-available-height, calc(100dvh - 2 * var(--nw-space-8)));
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
/* Visible so the arrow can sit half outside the panel; the body scrolls instead. */
|
|
44
|
+
overflow: visible;
|
|
45
|
+
border: 1px solid var(--_edge);
|
|
46
|
+
border-radius: var(--nw-radius-md);
|
|
47
|
+
font-size: var(--nw-text-sm);
|
|
48
|
+
line-height: var(--nw-leading-normal);
|
|
49
|
+
color: var(--nw-fg);
|
|
50
|
+
background-color: var(--_fill);
|
|
51
|
+
box-shadow: var(--nw-shadow-lg);
|
|
52
|
+
}
|
|
53
|
+
/* Native popover: keep the UA's placement, animate on entry. */
|
|
54
|
+
.nw-popover[popover] {
|
|
55
|
+
inset: 0;
|
|
56
|
+
margin: auto;
|
|
57
|
+
block-size: fit-content;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transform: var(--_from);
|
|
60
|
+
transition:
|
|
61
|
+
opacity var(--nw-duration-base) var(--nw-ease-out),
|
|
62
|
+
transform var(--nw-duration-base) var(--nw-ease-out),
|
|
63
|
+
overlay var(--nw-duration-base) allow-discrete,
|
|
64
|
+
display var(--nw-duration-base) allow-discrete;
|
|
65
|
+
}
|
|
66
|
+
/* Display only while open: setting it on [popover] itself would beat the UA's closed-state
|
|
67
|
+
display:none and leave the panel on screen. */
|
|
68
|
+
.nw-popover[popover]:popover-open {
|
|
69
|
+
display: flex;
|
|
70
|
+
opacity: 1;
|
|
71
|
+
transform: none;
|
|
72
|
+
}
|
|
73
|
+
@starting-style {
|
|
74
|
+
.nw-popover[popover]:popover-open {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transform: var(--_from);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.nw-popover[popover]::backdrop {
|
|
80
|
+
background: transparent;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Library-driven: mounted while open, animated out by the presence wrapper. */
|
|
84
|
+
.nw-popover[data-state] {
|
|
85
|
+
display: flex;
|
|
86
|
+
}
|
|
87
|
+
.nw-popover[data-state='open'] {
|
|
88
|
+
animation: var(--_in) var(--nw-duration-base) var(--nw-ease-out) both;
|
|
89
|
+
}
|
|
90
|
+
.nw-popover[data-state='closed'] {
|
|
91
|
+
animation: var(--_out) var(--nw-duration-fast) var(--nw-ease-in) both;
|
|
92
|
+
}
|
|
93
|
+
.nw-popover[data-side='top'] {
|
|
94
|
+
--_in: nw-slide-in-from-top;
|
|
95
|
+
--_out: nw-slide-out-to-top;
|
|
96
|
+
}
|
|
97
|
+
.nw-popover[data-side='left'] {
|
|
98
|
+
--_in: nw-slide-in-from-left;
|
|
99
|
+
--_out: nw-slide-out-to-left;
|
|
100
|
+
}
|
|
101
|
+
.nw-popover[data-side='right'] {
|
|
102
|
+
--_in: nw-slide-in-from-right;
|
|
103
|
+
--_out: nw-slide-out-to-right;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Parts ------------------------------------------------------------------------------------ */
|
|
107
|
+
|
|
108
|
+
.nw-popover-header {
|
|
109
|
+
position: relative;
|
|
110
|
+
display: grid;
|
|
111
|
+
gap: var(--nw-space-1);
|
|
112
|
+
padding: var(--_p) var(--_p) var(--nw-space-3);
|
|
113
|
+
padding-inline-end: calc(var(--_p) + var(--nw-control-sm));
|
|
114
|
+
border-block-end: 1px solid var(--nw-line);
|
|
115
|
+
}
|
|
116
|
+
.nw-popover-title {
|
|
117
|
+
font-family: var(--nw-font-display);
|
|
118
|
+
font-size: var(--nw-text-base);
|
|
119
|
+
font-weight: 600;
|
|
120
|
+
line-height: var(--nw-leading-snug);
|
|
121
|
+
letter-spacing: var(--nw-tracking-tight);
|
|
122
|
+
text-wrap: balance;
|
|
123
|
+
color: var(--nw-fg);
|
|
124
|
+
}
|
|
125
|
+
.nw-popover-description {
|
|
126
|
+
font-size: var(--nw-text-xs);
|
|
127
|
+
color: var(--nw-fg-muted);
|
|
128
|
+
}
|
|
129
|
+
.nw-popover-body {
|
|
130
|
+
flex: 1 1 auto;
|
|
131
|
+
min-block-size: 0;
|
|
132
|
+
padding: var(--_p);
|
|
133
|
+
overflow: auto;
|
|
134
|
+
overscroll-behavior: contain;
|
|
135
|
+
scrollbar-width: thin;
|
|
136
|
+
}
|
|
137
|
+
.nw-popover-body > :first-child {
|
|
138
|
+
margin-block-start: 0;
|
|
139
|
+
}
|
|
140
|
+
.nw-popover-body > :last-child {
|
|
141
|
+
margin-block-end: 0;
|
|
142
|
+
}
|
|
143
|
+
.nw-popover-header + .nw-popover-body {
|
|
144
|
+
padding-block-start: var(--nw-space-3);
|
|
145
|
+
}
|
|
146
|
+
.nw-popover-footer {
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-wrap: wrap;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: flex-end;
|
|
151
|
+
gap: var(--nw-space-2);
|
|
152
|
+
padding: var(--nw-space-3) var(--_p) var(--_p);
|
|
153
|
+
border-block-start: 1px solid var(--nw-line);
|
|
154
|
+
}
|
|
155
|
+
.nw-popover-close {
|
|
156
|
+
position: absolute;
|
|
157
|
+
inset-block-start: var(--nw-space-2);
|
|
158
|
+
inset-inline-end: var(--nw-space-2);
|
|
159
|
+
display: inline-grid;
|
|
160
|
+
place-items: center;
|
|
161
|
+
inline-size: var(--nw-control-sm);
|
|
162
|
+
block-size: var(--nw-control-sm);
|
|
163
|
+
padding: 0;
|
|
164
|
+
border: 0;
|
|
165
|
+
border-radius: var(--nw-radius-sm);
|
|
166
|
+
color: var(--nw-fg-subtle);
|
|
167
|
+
background: none;
|
|
168
|
+
transition:
|
|
169
|
+
color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
170
|
+
background-color var(--nw-duration-fast) var(--nw-ease-standard);
|
|
171
|
+
}
|
|
172
|
+
.nw-popover-close > svg {
|
|
173
|
+
inline-size: var(--nw-space-4);
|
|
174
|
+
block-size: var(--nw-space-4);
|
|
175
|
+
}
|
|
176
|
+
.nw-popover-close:hover {
|
|
177
|
+
color: var(--nw-fg);
|
|
178
|
+
background-color: var(--nw-panel-hover);
|
|
179
|
+
}
|
|
180
|
+
.nw-popover-close:active {
|
|
181
|
+
background-color: var(--nw-panel-active);
|
|
182
|
+
}
|
|
183
|
+
.nw-popover-close:focus-visible {
|
|
184
|
+
outline: var(--nw-ring-width) solid var(--nw-ring);
|
|
185
|
+
outline-offset: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* A div or span arrow; an svg arrow is left to the library. */
|
|
189
|
+
.nw-popover-arrow:not(svg) {
|
|
190
|
+
position: absolute;
|
|
191
|
+
z-index: -1;
|
|
192
|
+
inline-size: var(--_arrow);
|
|
193
|
+
block-size: var(--_arrow);
|
|
194
|
+
border: 1px solid var(--_edge);
|
|
195
|
+
border-width: 1px 0 0 1px;
|
|
196
|
+
background-color: var(--_fill);
|
|
197
|
+
transform: rotate(45deg);
|
|
198
|
+
}
|
|
199
|
+
.nw-popover-arrow:not(svg)[data-side='bottom'] {
|
|
200
|
+
inset-block-start: calc(var(--_arrow) / -2);
|
|
201
|
+
inset-inline-start: var(--_arrow-left, calc(50% - var(--_arrow) / 2));
|
|
202
|
+
}
|
|
203
|
+
.nw-popover-arrow:not(svg)[data-side='top'] {
|
|
204
|
+
inset-block-end: calc(var(--_arrow) / -2);
|
|
205
|
+
inset-inline-start: var(--_arrow-left, calc(50% - var(--_arrow) / 2));
|
|
206
|
+
border-width: 0 1px 1px 0;
|
|
207
|
+
}
|
|
208
|
+
.nw-popover-arrow:not(svg)[data-side='left'] {
|
|
209
|
+
inset-inline-end: calc(var(--_arrow) / -2);
|
|
210
|
+
inset-block-start: var(--_arrow-top, calc(50% - var(--_arrow) / 2));
|
|
211
|
+
border-width: 1px 1px 0 0;
|
|
212
|
+
}
|
|
213
|
+
.nw-popover-arrow:not(svg)[data-side='right'] {
|
|
214
|
+
inset-inline-start: calc(var(--_arrow) / -2);
|
|
215
|
+
inset-block-start: var(--_arrow-top, calc(50% - var(--_arrow) / 2));
|
|
216
|
+
border-width: 0 0 1px 1px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Sizes ------------------------------------------------------------------------------------ */
|
|
220
|
+
|
|
221
|
+
.nw-popover-xs {
|
|
222
|
+
--_w: 16rem;
|
|
223
|
+
--_p: var(--nw-space-3);
|
|
224
|
+
}
|
|
225
|
+
.nw-popover-sm {
|
|
226
|
+
--_w: 20rem;
|
|
227
|
+
--_p: var(--nw-space-4);
|
|
228
|
+
}
|
|
229
|
+
.nw-popover-md {
|
|
230
|
+
--_w: 22rem;
|
|
231
|
+
--_p: var(--nw-space-5);
|
|
232
|
+
}
|
|
233
|
+
.nw-popover-lg {
|
|
234
|
+
--_w: 30rem;
|
|
235
|
+
--_p: var(--nw-space-6);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Intents ---------------------------------------------------------------------------------- */
|
|
239
|
+
|
|
240
|
+
.nw-popover-primary {
|
|
241
|
+
--_intent: var(--nw-primary);
|
|
242
|
+
--_on: var(--nw-on-primary);
|
|
243
|
+
--_soft: var(--nw-primary-soft);
|
|
244
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
245
|
+
}
|
|
246
|
+
.nw-popover-secondary {
|
|
247
|
+
--_intent: var(--nw-secondary);
|
|
248
|
+
--_on: var(--nw-on-secondary);
|
|
249
|
+
--_soft: var(--nw-secondary-soft);
|
|
250
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
251
|
+
}
|
|
252
|
+
.nw-popover-tertiary {
|
|
253
|
+
--_intent: var(--nw-tertiary);
|
|
254
|
+
--_on: var(--nw-on-tertiary);
|
|
255
|
+
--_soft: var(--nw-tertiary-soft);
|
|
256
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
257
|
+
}
|
|
258
|
+
.nw-popover-neutral {
|
|
259
|
+
--_intent: var(--nw-fg-muted);
|
|
260
|
+
--_on: var(--nw-canvas);
|
|
261
|
+
--_soft: color-mix(in oklab, var(--nw-fg) 10%, transparent);
|
|
262
|
+
--_edge: var(--nw-line-strong);
|
|
263
|
+
}
|
|
264
|
+
.nw-popover-info {
|
|
265
|
+
--_intent: var(--nw-info);
|
|
266
|
+
--_on: var(--nw-on-info);
|
|
267
|
+
--_soft: var(--nw-info-soft);
|
|
268
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
269
|
+
}
|
|
270
|
+
.nw-popover-success {
|
|
271
|
+
--_intent: var(--nw-success);
|
|
272
|
+
--_on: var(--nw-on-success);
|
|
273
|
+
--_soft: var(--nw-success-soft);
|
|
274
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
275
|
+
}
|
|
276
|
+
.nw-popover-warning {
|
|
277
|
+
--_intent: var(--nw-warning);
|
|
278
|
+
--_on: var(--nw-on-warning);
|
|
279
|
+
--_soft: var(--nw-warning-soft);
|
|
280
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
281
|
+
}
|
|
282
|
+
.nw-popover-danger {
|
|
283
|
+
--_intent: var(--nw-danger);
|
|
284
|
+
--_on: var(--nw-on-danger);
|
|
285
|
+
--_soft: var(--nw-danger-soft);
|
|
286
|
+
--_edge: color-mix(in oklab, var(--_intent) 55%, var(--nw-line-strong));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Variants --------------------------------------------------------------------------------- */
|
|
290
|
+
|
|
291
|
+
.nw-popover-wire {
|
|
292
|
+
--_edge: var(--nw-gradient-wire);
|
|
293
|
+
border-color: transparent;
|
|
294
|
+
background:
|
|
295
|
+
linear-gradient(var(--_fill), var(--_fill)) padding-box,
|
|
296
|
+
var(--_edge) border-box;
|
|
297
|
+
}
|
|
298
|
+
.nw-popover-glow {
|
|
299
|
+
box-shadow: var(--nw-shadow-lg), var(--nw-glow-md);
|
|
300
|
+
}
|
|
301
|
+
.nw-popover-cut {
|
|
302
|
+
--nw-fill: var(--_fill);
|
|
303
|
+
--nw-cut: var(--nw-space-3);
|
|
304
|
+
position: relative;
|
|
305
|
+
isolation: isolate;
|
|
306
|
+
border: 0;
|
|
307
|
+
border-radius: 0;
|
|
308
|
+
background: var(--nw-cut-surface);
|
|
309
|
+
}
|
|
310
|
+
.nw-popover-cut::before {
|
|
311
|
+
content: '';
|
|
312
|
+
position: absolute;
|
|
313
|
+
inset: 0;
|
|
314
|
+
z-index: 1;
|
|
315
|
+
pointer-events: none;
|
|
316
|
+
background: var(--_edge);
|
|
317
|
+
clip-path: var(--nw-cut-ring);
|
|
318
|
+
}
|
|
319
|
+
.nw-popover-cut.nw-popover-glow {
|
|
320
|
+
box-shadow: none;
|
|
321
|
+
filter: var(--nw-glow-drop-md);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@media (max-width: 40rem) {
|
|
325
|
+
.nw-popover {
|
|
326
|
+
--_w: 24rem;
|
|
327
|
+
--_p: var(--nw-space-4);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@media (prefers-reduced-motion: reduce) {
|
|
332
|
+
.nw-popover {
|
|
333
|
+
--_from: none;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@media (forced-colors: active) {
|
|
338
|
+
.nw-popover,
|
|
339
|
+
.nw-popover-arrow:not(svg) {
|
|
340
|
+
border: 1px solid CanvasText;
|
|
341
|
+
background: Canvas;
|
|
342
|
+
box-shadow: none;
|
|
343
|
+
}
|
|
344
|
+
.nw-popover-cut::before {
|
|
345
|
+
display: none;
|
|
346
|
+
}
|
|
347
|
+
.nw-popover-header,
|
|
348
|
+
.nw-popover-footer {
|
|
349
|
+
border-color: CanvasText;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|