@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.
Files changed (134) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +133 -2
  3. package/dist/base.css +850 -0
  4. package/dist/components.css +10508 -0
  5. package/dist/docs/components/accordion.md +83 -0
  6. package/dist/docs/components/alert.md +52 -0
  7. package/dist/docs/components/avatar.md +55 -0
  8. package/dist/docs/components/badge.md +64 -0
  9. package/dist/docs/components/breadcrumbs.md +64 -0
  10. package/dist/docs/components/button.md +197 -0
  11. package/dist/docs/components/card.md +103 -0
  12. package/dist/docs/components/checkbox.md +45 -0
  13. package/dist/docs/components/chip.md +30 -0
  14. package/dist/docs/components/cluster.md +33 -0
  15. package/dist/docs/components/code.md +65 -0
  16. package/dist/docs/components/container.md +24 -0
  17. package/dist/docs/components/dialog.md +199 -0
  18. package/dist/docs/components/divider.md +31 -0
  19. package/dist/docs/components/dl.md +24 -0
  20. package/dist/docs/components/effect-utilities.md +82 -0
  21. package/dist/docs/components/empty.md +40 -0
  22. package/dist/docs/components/frame.md +27 -0
  23. package/dist/docs/components/grid.md +31 -0
  24. package/dist/docs/components/hud.md +75 -0
  25. package/dist/docs/components/input-group.md +28 -0
  26. package/dist/docs/components/input.md +52 -0
  27. package/dist/docs/components/kbd.md +42 -0
  28. package/dist/docs/components/label-and-field.md +31 -0
  29. package/dist/docs/components/link.md +41 -0
  30. package/dist/docs/components/list.md +67 -0
  31. package/dist/docs/components/menu.md +85 -0
  32. package/dist/docs/components/meter.md +77 -0
  33. package/dist/docs/components/navbar.md +66 -0
  34. package/dist/docs/components/pagination.md +64 -0
  35. package/dist/docs/components/popover.md +59 -0
  36. package/dist/docs/components/progress.md +32 -0
  37. package/dist/docs/components/prose.md +29 -0
  38. package/dist/docs/components/select.md +51 -0
  39. package/dist/docs/components/sidebar.md +35 -0
  40. package/dist/docs/components/sidenav.md +45 -0
  41. package/dist/docs/components/skeleton.md +36 -0
  42. package/dist/docs/components/slider.md +32 -0
  43. package/dist/docs/components/spinner.md +30 -0
  44. package/dist/docs/components/stack.md +26 -0
  45. package/dist/docs/components/steps.md +49 -0
  46. package/dist/docs/components/switch.md +19 -0
  47. package/dist/docs/components/table.md +83 -0
  48. package/dist/docs/components/tabs.md +207 -0
  49. package/dist/docs/components/textarea.md +13 -0
  50. package/dist/docs/components/toast.md +86 -0
  51. package/dist/docs/components/tooltip.md +39 -0
  52. package/dist/docs/components/typography-classes.md +38 -0
  53. package/dist/docs/families/data-display.md +15 -0
  54. package/dist/docs/families/feedback.md +13 -0
  55. package/dist/docs/families/forms.md +141 -0
  56. package/dist/docs/families/layout-typography.md +17 -0
  57. package/dist/docs/families/navigation.md +13 -0
  58. package/dist/docs/families/overlays.md +13 -0
  59. package/dist/docs/families/surfaces.md +11 -0
  60. package/dist/docs/foundations/accessibility.md +71 -0
  61. package/dist/docs/foundations/color-roles.md +114 -0
  62. package/dist/docs/foundations/effects-motion.md +150 -0
  63. package/dist/docs/foundations/flavors.md +156 -0
  64. package/dist/docs/foundations/icons.md +45 -0
  65. package/dist/docs/foundations/palette.md +180 -0
  66. package/dist/docs/foundations/spacing-elevation.md +168 -0
  67. package/dist/docs/foundations/typography.md +80 -0
  68. package/dist/docs/index.md +233 -0
  69. package/dist/docs/manifest.json +859 -0
  70. package/dist/fonts/inter-OFL.txt +93 -0
  71. package/dist/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
  72. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  73. package/dist/fonts/inter-latin-wght-italic.woff2 +0 -0
  74. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  75. package/dist/fonts/martian-mono-OFL.txt +93 -0
  76. package/dist/fonts/martian-mono-latin-ext-wdth-normal.woff2 +0 -0
  77. package/dist/fonts/martian-mono-latin-wdth-normal.woff2 +0 -0
  78. package/dist/fonts/space-grotesk-OFL.txt +93 -0
  79. package/dist/fonts/space-grotesk-latin-ext-wght-normal.woff2 +0 -0
  80. package/dist/fonts/space-grotesk-latin-wght-normal.woff2 +0 -0
  81. package/dist/fonts.css +73 -0
  82. package/dist/nyxwire.css +12183 -0
  83. package/dist/tokens.css +579 -0
  84. package/dist/utilities.css +176 -0
  85. package/nyxwire.d.ts +2 -0
  86. package/package.json +66 -3
  87. package/skills/nyxwire/SKILL.md +63 -0
  88. package/src/base.css +158 -0
  89. package/src/components/accordion.css +280 -0
  90. package/src/components/alert.css +176 -0
  91. package/src/components/avatar.css +262 -0
  92. package/src/components/badge.css +193 -0
  93. package/src/components/breadcrumbs.css +209 -0
  94. package/src/components/btn.css +517 -0
  95. package/src/components/card.css +327 -0
  96. package/src/components/checkbox.css +202 -0
  97. package/src/components/chip.css +345 -0
  98. package/src/components/code.css +340 -0
  99. package/src/components/dialog.css +411 -0
  100. package/src/components/divider.css +201 -0
  101. package/src/components/empty.css +216 -0
  102. package/src/components/field.css +161 -0
  103. package/src/components/hud.css +212 -0
  104. package/src/components/index.css +50 -0
  105. package/src/components/input.css +383 -0
  106. package/src/components/kbd.css +197 -0
  107. package/src/components/layout.css +344 -0
  108. package/src/components/link.css +178 -0
  109. package/src/components/list.css +353 -0
  110. package/src/components/menu.css +347 -0
  111. package/src/components/meter.css +238 -0
  112. package/src/components/navbar.css +309 -0
  113. package/src/components/pagination.css +302 -0
  114. package/src/components/popover.css +352 -0
  115. package/src/components/progress.css +241 -0
  116. package/src/components/select.css +121 -0
  117. package/src/components/sidenav.css +326 -0
  118. package/src/components/skeleton.css +193 -0
  119. package/src/components/slider.css +201 -0
  120. package/src/components/spinner.css +200 -0
  121. package/src/components/stat.css +263 -0
  122. package/src/components/steps.css +311 -0
  123. package/src/components/switch.css +183 -0
  124. package/src/components/table.css +290 -0
  125. package/src/components/tabs.css +271 -0
  126. package/src/components/toast.css +413 -0
  127. package/src/components/tooltip.css +288 -0
  128. package/src/fonts.css +92 -0
  129. package/src/index.css +6 -0
  130. package/src/motion.css +177 -0
  131. package/src/semantic.css +85 -0
  132. package/src/tokens.css +276 -0
  133. package/src/typography.css +430 -0
  134. package/src/utilities.css +198 -0
@@ -0,0 +1,517 @@
1
+ /* Button. An intent class sets the palette, a variant class sets the paint and a size class sets
2
+ the geometry. Defaults: solid + primary + md. Every state only swaps the private paint
3
+ variables, so the box keeps its height, padding and width in all of them.
4
+
5
+ Paint model: --_fill/--_line/--_ink rest, --_fill-hover/... hover, --_fill-active/... pressed,
6
+ --_fill-on/... pressed or expanded, --_fill-off/... disabled. Each is declared on the button
7
+ itself, never inherited, so the same names used by other components cannot leak in.
8
+
9
+ .nw-btn-cut keeps the chamfer in the cascade instead of on the host, so a glow survives;
10
+ .nw-btn-wire draws the primary-to-secondary edge over an opaque fill. Both are opt-in. */
11
+ @layer components {
12
+ .nw-btn {
13
+ --_intent: var(--nw-primary);
14
+ --_on: var(--nw-on-primary);
15
+ --_soft: var(--nw-primary-soft);
16
+ --_h: var(--nw-control-md);
17
+ --_px: var(--nw-space-4);
18
+ --_gap: var(--nw-space-2);
19
+ --_fs: var(--nw-text-sm);
20
+ --_radius: var(--nw-radius-md);
21
+ /* A length, never a reference to --nw-cut: the cut variant assigns --nw-cut from this, and a
22
+ self-reference would invalidate the whole cut recipe. Inline --nw-cut still wins. */
23
+ --_cut-size: var(--nw-space-2-5);
24
+ --_tint-ink: color-mix(in oklab, var(--_intent) var(--nw-soft-ink), var(--nw-fg));
25
+ --_fill: var(--_intent);
26
+ --_line: transparent;
27
+ --_ink: var(--_on);
28
+ --_fill-hover: color-mix(in oklab, var(--_intent) 86%, var(--nw-fg));
29
+ --_line-hover: transparent;
30
+ --_ink-hover: var(--_on);
31
+ --_fill-active: color-mix(in oklab, var(--_intent) 74%, var(--nw-fg));
32
+ --_line-active: transparent;
33
+ --_ink-active: var(--_on);
34
+ --_fill-on: var(--_fill-active);
35
+ --_line-on: var(--_intent);
36
+ --_ink-on: var(--_on);
37
+ --_fill-off: var(--nw-panel-hover);
38
+ --_line-off: transparent;
39
+ --_ink-off: var(--nw-fg-disabled);
40
+ --_glow: none;
41
+ --_drop: none;
42
+ --_text-glow: none;
43
+ --_wire: var(--nw-gradient-wire);
44
+ --_ring: var(--_intent);
45
+
46
+ position: relative;
47
+ display: inline-flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ gap: var(--_gap);
51
+ flex: none;
52
+ box-sizing: border-box;
53
+ min-inline-size: var(--_h);
54
+ block-size: var(--_h);
55
+ padding-inline: var(--_px);
56
+ border: 1px solid var(--_line);
57
+ border-radius: var(--_radius);
58
+ font-family: var(--nw-font-sans);
59
+ font-size: var(--_fs);
60
+ font-weight: 600;
61
+ line-height: var(--nw-leading-none);
62
+ letter-spacing: var(--nw-tracking-tight);
63
+ color: var(--_ink);
64
+ background-color: var(--_fill);
65
+ box-shadow: var(--_glow);
66
+ text-shadow: var(--_text-glow);
67
+ text-decoration-line: none;
68
+ white-space: nowrap;
69
+ vertical-align: middle;
70
+ cursor: pointer;
71
+ user-select: none;
72
+ appearance: none;
73
+ -webkit-tap-highlight-color: transparent;
74
+ transition:
75
+ background-color var(--nw-duration-fast) var(--nw-ease-standard),
76
+ border-color var(--nw-duration-fast) var(--nw-ease-standard),
77
+ color var(--nw-duration-fast) var(--nw-ease-standard),
78
+ box-shadow var(--nw-duration-fast) var(--nw-ease-standard),
79
+ filter var(--nw-duration-fast) var(--nw-ease-standard),
80
+ text-shadow var(--nw-duration-fast) var(--nw-ease-standard),
81
+ text-decoration-color var(--nw-duration-fast) var(--nw-ease-standard),
82
+ translate var(--nw-duration-instant) var(--nw-ease-standard);
83
+ }
84
+ .nw-btn > svg {
85
+ flex: none;
86
+ inline-size: 1.2em;
87
+ block-size: 1.2em;
88
+ }
89
+ .nw-btn:where(:disabled, [aria-disabled='true']) {
90
+ cursor: not-allowed;
91
+ }
92
+
93
+ /* Intents -------------------------------------------------------------------------------- */
94
+ /* Neutral is the only intent whose paint is not an accent: its soft, outline and ghost text
95
+ stays readable on any surface, and a solid neutral button is a quiet inverted one. */
96
+ .nw-btn-primary {
97
+ --_intent: var(--nw-primary);
98
+ --_on: var(--nw-on-primary);
99
+ --_soft: var(--nw-primary-soft);
100
+ }
101
+ .nw-btn-secondary {
102
+ --_intent: var(--nw-secondary);
103
+ --_on: var(--nw-on-secondary);
104
+ --_soft: var(--nw-secondary-soft);
105
+ }
106
+ .nw-btn-tertiary {
107
+ --_intent: var(--nw-tertiary);
108
+ --_on: var(--nw-on-tertiary);
109
+ --_soft: var(--nw-tertiary-soft);
110
+ }
111
+ .nw-btn-neutral {
112
+ --_intent: var(--nw-fg-muted);
113
+ --_on: var(--nw-canvas);
114
+ --_soft: color-mix(in oklab, var(--nw-fg-muted) 16%, transparent);
115
+ }
116
+ .nw-btn-info {
117
+ --_intent: var(--nw-info);
118
+ --_on: var(--nw-on-info);
119
+ --_soft: var(--nw-info-soft);
120
+ }
121
+ .nw-btn-success {
122
+ --_intent: var(--nw-success);
123
+ --_on: var(--nw-on-success);
124
+ --_soft: var(--nw-success-soft);
125
+ }
126
+ .nw-btn-warning {
127
+ --_intent: var(--nw-warning);
128
+ --_on: var(--nw-on-warning);
129
+ --_soft: var(--nw-warning-soft);
130
+ }
131
+ .nw-btn-danger {
132
+ --_intent: var(--nw-danger);
133
+ --_on: var(--nw-on-danger);
134
+ --_soft: var(--nw-danger-soft);
135
+ }
136
+
137
+ /* Variants ------------------------------------------------------------------------------- */
138
+ .nw-btn-solid {
139
+ --_fill: var(--_intent);
140
+ --_line: transparent;
141
+ --_ink: var(--_on);
142
+ --_fill-hover: color-mix(in oklab, var(--_intent) 86%, var(--nw-fg));
143
+ --_line-hover: transparent;
144
+ --_ink-hover: var(--_on);
145
+ --_fill-active: color-mix(in oklab, var(--_intent) 74%, var(--nw-fg));
146
+ --_line-active: transparent;
147
+ --_ink-active: var(--_on);
148
+ --_fill-on: var(--_fill-active);
149
+ --_line-on: var(--_intent);
150
+ --_ink-on: var(--_on);
151
+ }
152
+ .nw-btn-soft {
153
+ --_fill: var(--_soft);
154
+ --_line: color-mix(in oklab, var(--_intent) 30%, transparent);
155
+ --_ink: var(--_tint-ink);
156
+ --_fill-hover: var(--_soft);
157
+ --_line-hover: var(--_intent);
158
+ --_ink-hover: var(--_tint-ink);
159
+ --_fill-active: var(--_soft);
160
+ --_line-active: var(--_intent);
161
+ --_ink-active: var(--_tint-ink);
162
+ --_fill-on: var(--_soft);
163
+ --_line-on: var(--_intent);
164
+ --_ink-on: var(--_tint-ink);
165
+ }
166
+ /* Outline and link text sit on plain surfaces, where the full intent color keeps 4.5:1 in every
167
+ flavor; the moment they gain a tint they switch to the mixed tint ink. A 70% border would
168
+ drop below 3:1 against panel fills, so the wire is the full intent color. */
169
+ .nw-btn-outline {
170
+ --_fill: transparent;
171
+ --_line: var(--_intent);
172
+ --_ink: var(--_intent);
173
+ --_fill-hover: var(--_soft);
174
+ --_line-hover: var(--_intent);
175
+ --_ink-hover: var(--_tint-ink);
176
+ --_fill-active: var(--_soft);
177
+ --_line-active: var(--_intent);
178
+ --_ink-active: var(--_tint-ink);
179
+ --_fill-on: var(--_soft);
180
+ --_line-on: var(--_intent);
181
+ --_ink-on: var(--_tint-ink);
182
+ }
183
+ .nw-btn-ghost {
184
+ --_fill: transparent;
185
+ --_line: transparent;
186
+ --_ink: var(--_intent);
187
+ --_fill-hover: var(--_soft);
188
+ --_line-hover: transparent;
189
+ --_ink-hover: var(--_tint-ink);
190
+ --_fill-active: var(--_soft);
191
+ --_line-active: transparent;
192
+ --_ink-active: var(--_tint-ink);
193
+ --_fill-on: var(--_soft);
194
+ --_line-on: transparent;
195
+ --_ink-on: var(--_tint-ink);
196
+ }
197
+ .nw-btn-link {
198
+ --_h: auto;
199
+ --_px: var(--nw-space-0);
200
+ --_radius: var(--nw-radius-xs);
201
+ --_fill: transparent;
202
+ --_line: transparent;
203
+ --_ink: var(--_intent);
204
+ --_fill-hover: transparent;
205
+ --_line-hover: transparent;
206
+ --_ink-hover: var(--_intent);
207
+ --_fill-active: transparent;
208
+ --_line-active: transparent;
209
+ --_ink-active: var(--_intent);
210
+ --_fill-on: transparent;
211
+ --_line-on: transparent;
212
+ --_ink-on: var(--_intent);
213
+ min-inline-size: 0;
214
+ line-height: var(--nw-leading-normal);
215
+ text-decoration-line: underline;
216
+ text-decoration-thickness: 1px;
217
+ text-decoration-color: color-mix(in oklab, var(--_intent) 40%, transparent);
218
+ text-underline-offset: 0.2em;
219
+ }
220
+ .nw-btn-wire {
221
+ --_fill: var(--nw-canvas-sunken);
222
+ --_line: transparent;
223
+ --_ink: var(--nw-fg);
224
+ --_fill-hover: var(--nw-panel-hover);
225
+ --_line-hover: transparent;
226
+ --_ink-hover: var(--nw-fg);
227
+ --_fill-active: var(--nw-panel-active);
228
+ --_line-active: transparent;
229
+ --_ink-active: var(--nw-fg);
230
+ --_fill-on: var(--nw-panel-hover);
231
+ --_line-on: transparent;
232
+ --_ink-on: var(--nw-fg);
233
+ background:
234
+ linear-gradient(var(--_fill), var(--_fill)) padding-box,
235
+ var(--_wire) border-box;
236
+ }
237
+
238
+ /* States --------------------------------------------------------------------------------- */
239
+ /* Held on. The pressed fill survives the pointer leaving the button. */
240
+ .nw-btn:is(
241
+ [aria-pressed='true'],
242
+ [aria-checked='true'],
243
+ [aria-selected='true'],
244
+ [data-state='on']
245
+ ):not(:disabled, [aria-disabled='true'], [aria-busy='true']) {
246
+ --_fill: var(--_fill-on);
247
+ --_line: var(--_line-on);
248
+ --_ink: var(--_ink-on);
249
+ }
250
+ /* Hover, and an expanded trigger while its popup is open. :active is excluded so pressing a
251
+ button drops the bloom instead of stacking a second one on the active fill. */
252
+ .nw-btn:is(:hover, [aria-expanded='true'], [data-state='open']):not(
253
+ :active,
254
+ :disabled,
255
+ [aria-disabled='true'],
256
+ [aria-busy='true']
257
+ ) {
258
+ --_fill: var(--_fill-hover);
259
+ --_line: var(--_line-hover);
260
+ --_ink: var(--_ink-hover);
261
+ --_glow: var(--nw-glow-sm);
262
+ --_drop: var(--nw-glow-drop-sm);
263
+ }
264
+ /* A transparent fill has no halo to spend; the link glows in its text, the wire along its edge. */
265
+ .nw-btn-ghost:is(:hover, [aria-expanded='true'], [data-state='open']):not(
266
+ :active,
267
+ :disabled,
268
+ [aria-disabled='true'],
269
+ [aria-busy='true']
270
+ ) {
271
+ --_glow: none;
272
+ --_drop: none;
273
+ }
274
+ .nw-btn-wire:is(:hover, [aria-expanded='true'], [data-state='open']):not(
275
+ :active,
276
+ :disabled,
277
+ [aria-disabled='true'],
278
+ [aria-busy='true']
279
+ ) {
280
+ --_glow: var(--nw-glow-wire);
281
+ --_drop: var(--nw-glow-drop-wire);
282
+ }
283
+ .nw-btn-link:is(:hover, [aria-expanded='true'], [data-state='open']):not(
284
+ :active,
285
+ :disabled,
286
+ [aria-disabled='true'],
287
+ [aria-busy='true']
288
+ ) {
289
+ --_glow: none;
290
+ --_drop: none;
291
+ --_text-glow: var(--nw-glow-text);
292
+ text-decoration-color: currentColor;
293
+ }
294
+ .nw-btn:active:not(:disabled, [aria-disabled='true'], [aria-busy='true']) {
295
+ --_fill: var(--_fill-active);
296
+ --_line: var(--_line-active);
297
+ --_ink: var(--_ink-active);
298
+ translate: 0 1px;
299
+ }
300
+ .nw-btn:focus-visible {
301
+ outline: var(--nw-ring-width) solid var(--_ring);
302
+ outline-offset: var(--nw-ring-offset);
303
+ box-shadow: var(--_glow);
304
+ }
305
+ /* Only a cut surface glows through a filter; on a rounded box the drop-shadow would double the
306
+ box-shadow bloom. */
307
+ .nw-btn-cut,
308
+ .nw-btn-cut:focus-visible {
309
+ filter: var(--_drop);
310
+ }
311
+ .nw-btn:disabled,
312
+ .nw-btn[aria-disabled='true'] {
313
+ --_fill: var(--_fill-off);
314
+ --_line: var(--_line-off);
315
+ --_ink: var(--_ink-off);
316
+ --_glow: none;
317
+ --_drop: none;
318
+ --_text-glow: none;
319
+ --_wire: var(--nw-line);
320
+ translate: none;
321
+ }
322
+ .nw-btn-outline:disabled,
323
+ .nw-btn-outline[aria-disabled='true'],
324
+ .nw-btn-ghost:disabled,
325
+ .nw-btn-ghost[aria-disabled='true'],
326
+ .nw-btn-link:disabled,
327
+ .nw-btn-link[aria-disabled='true'] {
328
+ --_fill-off: transparent;
329
+ --_line-off: transparent;
330
+ --_text-glow: none;
331
+ text-shadow: none;
332
+ }
333
+ .nw-btn-link:disabled,
334
+ .nw-btn-link[aria-disabled='true'] {
335
+ text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
336
+ }
337
+
338
+ /* Busy: the label keeps its slot so the box does not change size, and the ring spins over it. */
339
+ .nw-btn[aria-busy='true'] {
340
+ --_glow: none;
341
+ --_drop: none;
342
+ --_text-glow: none;
343
+ color: transparent;
344
+ text-shadow: none;
345
+ cursor: progress;
346
+ pointer-events: none;
347
+ translate: none;
348
+ }
349
+ .nw-btn[aria-busy='true'] > * {
350
+ visibility: hidden;
351
+ }
352
+ .nw-btn[aria-busy='true']::after {
353
+ content: '';
354
+ position: absolute;
355
+ inset: 0;
356
+ margin: auto;
357
+ inline-size: 1.1em;
358
+ block-size: 1.1em;
359
+ border: 2px solid color-mix(in oklab, var(--_ink) 30%, transparent);
360
+ border-block-start-color: var(--_ink);
361
+ border-radius: var(--nw-radius-full);
362
+ animation: nw-spin var(--nw-duration-slower) linear infinite;
363
+ }
364
+
365
+ /* Sizes ---------------------------------------------------------------------------------- */
366
+ .nw-btn-xs {
367
+ --_h: var(--nw-control-xs);
368
+ --_px: var(--nw-space-2-5);
369
+ --_gap: var(--nw-space-1-5);
370
+ --_fs: var(--nw-text-xs);
371
+ --_radius: var(--nw-radius-sm);
372
+ --_cut-size: var(--nw-space-2);
373
+ }
374
+ .nw-btn-sm {
375
+ --_h: var(--nw-control-sm);
376
+ --_px: var(--nw-space-3);
377
+ --_gap: var(--nw-space-1-5);
378
+ --_fs: var(--nw-text-sm);
379
+ --_radius: var(--nw-radius-sm);
380
+ --_cut-size: var(--nw-space-2);
381
+ }
382
+ .nw-btn-md {
383
+ --_h: var(--nw-control-md);
384
+ --_px: var(--nw-space-4);
385
+ --_gap: var(--nw-space-2);
386
+ --_fs: var(--nw-text-sm);
387
+ --_radius: var(--nw-radius-md);
388
+ }
389
+ .nw-btn-lg {
390
+ --_h: var(--nw-control-lg);
391
+ --_px: var(--nw-space-5);
392
+ --_gap: var(--nw-space-2-5);
393
+ --_fs: var(--nw-text-base);
394
+ --_radius: var(--nw-radius-lg);
395
+ --_cut-size: var(--nw-space-3);
396
+ }
397
+ .nw-btn-icon {
398
+ --_px: var(--nw-space-0);
399
+ inline-size: var(--_h);
400
+ padding: 0;
401
+ }
402
+ .nw-btn-block {
403
+ display: flex;
404
+ inline-size: 100%;
405
+ }
406
+
407
+ /* Cut corners and the wire edge ----------------------------------------------------------- */
408
+ .nw-btn-cut {
409
+ position: relative;
410
+ isolation: isolate;
411
+ border: 0;
412
+ border-radius: 0;
413
+ background: var(--nw-cut-surface);
414
+ --nw-cut: var(--_cut-size);
415
+ --nw-fill: var(--_fill);
416
+ box-shadow: none;
417
+ filter: var(--_drop);
418
+ }
419
+ .nw-btn-cut::before {
420
+ content: '';
421
+ position: absolute;
422
+ inset: 0;
423
+ z-index: 1;
424
+ pointer-events: none;
425
+ background: var(--_line);
426
+ clip-path: var(--nw-cut-ring);
427
+ }
428
+ /* The wire ring is the gradient itself, so the state rules that swap --_line cannot erase it. */
429
+ .nw-btn-cut.nw-btn-wire::before {
430
+ background: var(--_wire);
431
+ }
432
+ .nw-btn-glow {
433
+ --_glow: var(--nw-glow-md);
434
+ --_drop: var(--nw-glow-drop-md);
435
+ }
436
+
437
+ /* Group ---------------------------------------------------------------------------------- */
438
+ .nw-btn-group {
439
+ display: inline-flex;
440
+ align-items: stretch;
441
+ isolation: isolate;
442
+ vertical-align: middle;
443
+ }
444
+ .nw-btn-group > .nw-btn {
445
+ flex: 0 1 auto;
446
+ }
447
+ .nw-btn-group > .nw-btn:not(:first-child) {
448
+ margin-inline-start: -1px;
449
+ border-start-start-radius: 0;
450
+ border-end-start-radius: 0;
451
+ }
452
+ .nw-btn-group > .nw-btn:not(:last-child) {
453
+ border-start-end-radius: 0;
454
+ border-end-end-radius: 0;
455
+ }
456
+ /* Joined solid buttons keep a visible seam; overlapping variant borders already make one. */
457
+ .nw-btn-group > .nw-btn:not(:first-child) {
458
+ border-inline-start-color: color-mix(in oklab, var(--_on) 25%, transparent);
459
+ }
460
+ .nw-btn-group > .nw-btn-soft:not(:first-child),
461
+ .nw-btn-group > .nw-btn-outline:not(:first-child) {
462
+ border-inline-start-color: var(--_line);
463
+ }
464
+ .nw-btn-group > .nw-btn-ghost:not(:first-child),
465
+ .nw-btn-group > .nw-btn-link:not(:first-child) {
466
+ margin-inline-start: 0;
467
+ border-inline-start-color: transparent;
468
+ }
469
+ .nw-btn-group > .nw-btn:is(:hover, :focus-visible, [aria-expanded='true'], [data-state='open']) {
470
+ z-index: 1;
471
+ }
472
+ .nw-btn-group > .nw-btn-cut {
473
+ --_cut-size: var(--nw-space-0-5);
474
+ }
475
+
476
+ @media (prefers-reduced-motion: reduce) {
477
+ .nw-btn:active:not(:disabled, [aria-disabled='true']) {
478
+ translate: none;
479
+ }
480
+ }
481
+
482
+ @media (forced-colors: active) {
483
+ .nw-btn,
484
+ .nw-btn-cut,
485
+ .nw-btn-wire {
486
+ background: ButtonFace;
487
+ color: ButtonText;
488
+ border: 1px solid ButtonText;
489
+ box-shadow: none;
490
+ filter: none;
491
+ text-shadow: none;
492
+ }
493
+ .nw-btn-cut::before {
494
+ display: none;
495
+ }
496
+ .nw-btn:is(
497
+ [aria-pressed='true'],
498
+ [aria-checked='true'],
499
+ [aria-selected='true'],
500
+ [aria-expanded='true'],
501
+ [data-state='on'],
502
+ [data-state='open']
503
+ ):not(:disabled, [aria-disabled='true']) {
504
+ background: Highlight;
505
+ color: HighlightText;
506
+ }
507
+ .nw-btn[aria-busy='true']::after {
508
+ border-color: GrayText;
509
+ border-block-start-color: ButtonText;
510
+ }
511
+ .nw-btn:disabled,
512
+ .nw-btn[aria-disabled='true'] {
513
+ color: GrayText;
514
+ border-color: GrayText;
515
+ }
516
+ }
517
+ }