@atom63/ui-react 0.2.0-beta.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/README.md +121 -0
- package/dist/button-sktq-nvV.d.ts +13 -0
- package/dist/chunk-7VSPECOH.js +73 -0
- package/dist/chunk-7VSPECOH.js.map +1 -0
- package/dist/chunk-AJLHJRK6.js +11 -0
- package/dist/chunk-AJLHJRK6.js.map +1 -0
- package/dist/chunk-MXNO63TC.js +2745 -0
- package/dist/chunk-MXNO63TC.js.map +1 -0
- package/dist/chunk-STCXERLM.js +354 -0
- package/dist/chunk-STCXERLM.js.map +1 -0
- package/dist/destination-link-C9NKeKLe.d.ts +34 -0
- package/dist/index.d.ts +1605 -0
- package/dist/index.js +7337 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/index.d.ts +196 -0
- package/dist/layout/index.js +500 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/media/index.d.ts +208 -0
- package/dist/media/index.js +1498 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/media-lightbox/parts/index.d.ts +284 -0
- package/dist/media/media-lightbox/parts/index.js +5 -0
- package/dist/media/media-lightbox/parts/index.js.map +1 -0
- package/dist/theme/index.d.ts +350 -0
- package/dist/theme/index.js +1173 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/types-Dxe5IzjE.d.ts +145 -0
- package/package.json +188 -0
- package/src/components/accordion/accordion.css +196 -0
- package/src/components/alert/alert.css +189 -0
- package/src/components/alert-dialog/alert-dialog.css +205 -0
- package/src/components/autocomplete/autocomplete.css +240 -0
- package/src/components/avatar/avatar.css +147 -0
- package/src/components/badge/badge.css +223 -0
- package/src/components/breadcrumb/breadcrumb.css +99 -0
- package/src/components/button/button.css +594 -0
- package/src/components/button-group/button-group.css +412 -0
- package/src/components/calendar/calendar.css +271 -0
- package/src/components/card/card.css +421 -0
- package/src/components/carousel/carousel.css +163 -0
- package/src/components/checkbox/checkbox.css +113 -0
- package/src/components/collapsible/collapsible.css +59 -0
- package/src/components/command/command.css +226 -0
- package/src/components/connected-panel/connected-panel.css +437 -0
- package/src/components/copy-button/copy-button.css +57 -0
- package/src/components/dialog/dialog.css +221 -0
- package/src/components/drawer/drawer.css +265 -0
- package/src/components/empty/empty.css +145 -0
- package/src/components/feedback-state/feedback-state.css +141 -0
- package/src/components/field/field.css +260 -0
- package/src/components/form/form.css +32 -0
- package/src/components/frame/frame.css +115 -0
- package/src/components/hover-card/hover-card.css +80 -0
- package/src/components/input/input.css +291 -0
- package/src/components/input-otp/input-otp.css +145 -0
- package/src/components/item/item.css +216 -0
- package/src/components/kbd/kbd.css +72 -0
- package/src/components/label/label.css +37 -0
- package/src/components/load-more-trigger/load-more-trigger.css +109 -0
- package/src/components/marquee/marquee.css +79 -0
- package/src/components/menu/menu.css +216 -0
- package/src/components/menubar/menubar.css +67 -0
- package/src/components/navigation-menu/navigation-menu.css +275 -0
- package/src/components/pagination/pagination.css +86 -0
- package/src/components/panel-setting-button/panel-setting-button.css +76 -0
- package/src/components/popover/popover.css +89 -0
- package/src/components/preview-card/preview-card.css +69 -0
- package/src/components/progress/progress.css +70 -0
- package/src/components/radio/radio.css +115 -0
- package/src/components/resizable/resizable.css +99 -0
- package/src/components/scroll-area/scroll-area.css +130 -0
- package/src/components/scrollable-list/scrollable-list.css +144 -0
- package/src/components/segmented-control/segmented-control.css +235 -0
- package/src/components/select/select.css +261 -0
- package/src/components/separator/separator.css +43 -0
- package/src/components/sheet/sheet.css +209 -0
- package/src/components/sidebar/sidebar.css +728 -0
- package/src/components/sidebar-nav-tree/sidebar-nav-tree.css +179 -0
- package/src/components/skeleton/skeleton.css +42 -0
- package/src/components/slider/slider.css +124 -0
- package/src/components/switch/switch.css +149 -0
- package/src/components/table/table.css +183 -0
- package/src/components/tabs/tabs.css +416 -0
- package/src/components/text-ticker/text-ticker.css +139 -0
- package/src/components/textarea/textarea.css +122 -0
- package/src/components/toggle/toggle.css +185 -0
- package/src/components/toggle-group/toggle-group.css +102 -0
- package/src/components/tooltip/tooltip.css +133 -0
- package/src/media/media-lightbox/media-lightbox.css +171 -0
- package/src/styles/index.css +3 -0
- package/src/styles/recipes.css +70 -0
- package/src/styles/reset.css +22 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
.a63-Button {
|
|
2
|
+
--button-background: var(--a63-action-neutral);
|
|
3
|
+
/* The fill colour, exposed so themes can tint shadows/glows per-button (a
|
|
4
|
+
destructive button gets a red shadow, a neutral one a neutral shadow) rather
|
|
5
|
+
than a fixed accent. Resolves to each variant's --button-background. */
|
|
6
|
+
--button-tint: var(--button-background);
|
|
7
|
+
--button-border-color: var(--button-background);
|
|
8
|
+
--button-border-width: var(--a63-control-border-width);
|
|
9
|
+
--button-focus-ring: var(--a63-control-focus-ring-color);
|
|
10
|
+
--button-foreground: var(--a63-action-neutral-foreground);
|
|
11
|
+
--button-loading-foreground: var(--button-foreground);
|
|
12
|
+
--button-gap: var(--a63-control-gap);
|
|
13
|
+
/*
|
|
14
|
+
* Content floor — a control must never be shorter than the text it contains.
|
|
15
|
+
*
|
|
16
|
+
* Height comes from the control ramp, which the DENSITY axis owns
|
|
17
|
+
* (`--a63-control-height-*` is `--a63-space-unit × N`). Font size comes from
|
|
18
|
+
* the TYPE SCALE axis (`--typography-*` × `--typography-scale`). The two are
|
|
19
|
+
* orthogonal on purpose (docs/design-system/personalization-axes.md), so
|
|
20
|
+
* nothing stops them moving in opposite directions — and measured on this
|
|
21
|
+
* recipe they already do. At `type-scale: large` + `density: compact` the
|
|
22
|
+
* internal padding is 0.15px per side at `xl`, 0.37px at `lg`, and exactly 0
|
|
23
|
+
* at `icon-sm`. A taller font (`--a63-font: serif | mono | pixel`) or a
|
|
24
|
+
* locale with taller glyphs tips those into visible clipping.
|
|
25
|
+
*
|
|
26
|
+
* The fix is NOT to make the space unit follow `--typography-scale` — that
|
|
27
|
+
* would hand one axis a token group another axis owns, which the ownership
|
|
28
|
+
* rule forbids. Instead the control reads its own line box and refuses to go
|
|
29
|
+
* below it, the same content-driven-height-with-a-ramp-floor pattern
|
|
30
|
+
* `contracts/control.css` already documents for rows.
|
|
31
|
+
*
|
|
32
|
+
* `--button-content-lh` is set per SIZE STEP (not read from `1lh`) so a text
|
|
33
|
+
* button and the icon button of the same step always resolve to the identical
|
|
34
|
+
* floor and stay aligned in a toolbar row — the sibling-alignment rule the
|
|
35
|
+
* icon-size block below depends on. It also avoids `1lh`, whose absence would
|
|
36
|
+
* make the whole `max()` invalid at computed-value time and drop the height.
|
|
37
|
+
*
|
|
38
|
+
* 2 × `--a63-space-0_5` is a minimum, not a comfortable padding: it is chosen
|
|
39
|
+
* so the floor is INERT in every shipping combination of type-scale × density
|
|
40
|
+
* today, and only engages when a control would otherwise crowd its own text.
|
|
41
|
+
* It deliberately does not restore the ramp's proportions at large type
|
|
42
|
+
* scales; that is a ramp question, not a clipping question.
|
|
43
|
+
*/
|
|
44
|
+
--button-content-lh: var(--typography-sm-line-height);
|
|
45
|
+
--button-content-floor: calc(var(--button-content-lh) + 2 * var(--a63-space-0_5));
|
|
46
|
+
--button-height: max(
|
|
47
|
+
calc(var(--a63-control-height-md) * var(--a63-density-scale, 1)),
|
|
48
|
+
var(--a63-control-min-size),
|
|
49
|
+
var(--button-content-floor)
|
|
50
|
+
);
|
|
51
|
+
--button-icon-size: var(--a63-control-icon-size-md);
|
|
52
|
+
--button-motion-press: var(--a63-control-press-transform);
|
|
53
|
+
--button-padding-inline: var(--a63-control-padding-inline-md);
|
|
54
|
+
--button-radius: var(--a63-control-radius);
|
|
55
|
+
--button-shadow: var(--a63-control-shadow);
|
|
56
|
+
--button-shadow-active: var(--a63-control-shadow-active);
|
|
57
|
+
--button-text-shadow: var(--a63-control-text-shadow);
|
|
58
|
+
/* Depth tinted by the button's own fill (strength from the theme), composed
|
|
59
|
+
here at the use-site so --button-tint resolves per variant: an inner bounce
|
|
60
|
+
glowing up from the bottom (the "lit glass" look) + a soft outer glow halo. */
|
|
61
|
+
--button-tint-drop:
|
|
62
|
+
inset 0 -6px 9px -3px
|
|
63
|
+
color-mix(in oklch, var(--button-tint) var(--a63-control-shadow-tint), transparent),
|
|
64
|
+
0 2px 12px -3px
|
|
65
|
+
color-mix(in oklch, var(--button-tint) var(--a63-control-shadow-tint), transparent);
|
|
66
|
+
--button-gloss: var(--a63-control-gloss);
|
|
67
|
+
--button-highlight: var(--a63-control-highlight);
|
|
68
|
+
--button-highlight-opacity: 1;
|
|
69
|
+
--button-state-hover-background: color-mix(in oklch, var(--a63-action-neutral) 90%, transparent);
|
|
70
|
+
--button-state-hover-border-color: var(--button-state-hover-background);
|
|
71
|
+
--button-state-active-background: var(--button-state-hover-background);
|
|
72
|
+
--button-state-active-border-color: var(--button-state-hover-border-color);
|
|
73
|
+
--button-icon-opacity: 0.8;
|
|
74
|
+
--button-icon-filter: none;
|
|
75
|
+
|
|
76
|
+
position: relative;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
min-width: var(--a63-control-min-target);
|
|
81
|
+
height: var(--button-height);
|
|
82
|
+
min-height: var(--button-height);
|
|
83
|
+
padding: 0 var(--button-padding-inline);
|
|
84
|
+
border: var(--button-border-width) solid var(--button-border-color);
|
|
85
|
+
border-radius: var(--button-radius);
|
|
86
|
+
appearance: none;
|
|
87
|
+
background-color: var(--button-background);
|
|
88
|
+
background-image: var(--button-gloss);
|
|
89
|
+
box-shadow: var(--button-shadow), var(--button-tint-drop);
|
|
90
|
+
color: var(--button-foreground);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
font-family: var(--a63-control-font-family);
|
|
93
|
+
font-size: var(--a63-control-font-size-md);
|
|
94
|
+
font-weight: var(--a63-control-font-weight);
|
|
95
|
+
gap: var(--button-gap);
|
|
96
|
+
line-height: var(--typography-sm-line-height);
|
|
97
|
+
text-shadow: var(--button-text-shadow);
|
|
98
|
+
outline: none;
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
transition:
|
|
101
|
+
background-color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
102
|
+
border-color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
103
|
+
box-shadow var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
104
|
+
color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
105
|
+
transform var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
106
|
+
user-select: none;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Gloss reflection panel — a defined rounded highlight in the top of the button
|
|
111
|
+
(the aqua glass shape). Invisible unless a theme sets --button-highlight. */
|
|
112
|
+
.a63-Button::after {
|
|
113
|
+
content: '';
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: 2px;
|
|
116
|
+
right: 9%;
|
|
117
|
+
left: 9%;
|
|
118
|
+
z-index: 0;
|
|
119
|
+
height: 42%;
|
|
120
|
+
border-radius: 999px;
|
|
121
|
+
background: var(--button-highlight);
|
|
122
|
+
opacity: var(--button-highlight-opacity);
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Interaction floor without inflating the rendered box — the same pattern
|
|
127
|
+
checkbox/radio/switch/toggle use. Absolutely positioned so it stays out of the
|
|
128
|
+
inline-flex layout; a tap on it still activates the button, since it is a
|
|
129
|
+
child. `tile` opts out: it is a bespoke 5rem stacked shape, already far above
|
|
130
|
+
any target minimum. */
|
|
131
|
+
.a63-Button:not([data-size='tile'])::before {
|
|
132
|
+
content: '';
|
|
133
|
+
position: absolute;
|
|
134
|
+
inset: 50%;
|
|
135
|
+
min-width: var(--a63-control-min-target);
|
|
136
|
+
min-height: var(--a63-control-min-target);
|
|
137
|
+
translate: -50% -50%;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Keep content above the reflection panel. */
|
|
141
|
+
.a63-Button > span:not(.a63-Button-spinner) {
|
|
142
|
+
position: relative;
|
|
143
|
+
z-index: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ── Icon-button gloss ─────────────────────────────────────────────────
|
|
147
|
+
* The ::after reflection above is an inset pill (fixed 9% side insets, pill
|
|
148
|
+
* radius) tuned for wide rounded RECTANGLES. On a 1:1 icon button it reads as a
|
|
149
|
+
* narrow capsule floating inside the shape with visible side gaps — worst on
|
|
150
|
+
* fully-round icon controls (scroll/nav chevrons). Full-bleed it and clip to the
|
|
151
|
+
* button's own radius (square OR circle) via overflow, with a convex lower edge
|
|
152
|
+
* so the sheen fits the square footprint as a liquid-glass dome. Only geometry
|
|
153
|
+
* changes — the fill (--button-highlight) stays theme-driven, so this is inert
|
|
154
|
+
* off Aqua (modern leaves it `none`). Keyed on the icon sizes, which are the
|
|
155
|
+
* aspect-ratio:1 buttons. */
|
|
156
|
+
/* Only a theme that paints --a63-control-highlight needs this clip, and clipping
|
|
157
|
+
the root also clips the hit-area pseudo-element. Aqua is the only theme that
|
|
158
|
+
sets a highlight (guarded by a test in recipes.test.ts), so scope it there and
|
|
159
|
+
leave every other theme's icon buttons able to expand their touch target. */
|
|
160
|
+
[data-a63-theme='aqua'] .a63-Button[data-size^='icon'] {
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.a63-Button[data-size^='icon']::after {
|
|
165
|
+
top: 1px;
|
|
166
|
+
right: 0;
|
|
167
|
+
left: 0;
|
|
168
|
+
height: 52%;
|
|
169
|
+
border-radius: 0 0 50% 50% / 0 0 100% 100%;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.a63-Button:hover {
|
|
173
|
+
background-color: var(--button-state-hover-background);
|
|
174
|
+
border-color: var(--button-state-hover-border-color);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.a63-Button:active,
|
|
178
|
+
.a63-Button[data-pressed] {
|
|
179
|
+
background-color: var(--button-state-active-background);
|
|
180
|
+
border-color: var(--button-state-active-border-color);
|
|
181
|
+
box-shadow: var(--button-shadow-active);
|
|
182
|
+
transform: var(--button-motion-press);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.a63-Button:focus-visible {
|
|
186
|
+
box-shadow:
|
|
187
|
+
var(--button-shadow),
|
|
188
|
+
var(--button-tint-drop),
|
|
189
|
+
0 0 0 var(--a63-control-focus-ring-width) var(--button-focus-ring);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.a63-Button:disabled,
|
|
193
|
+
.a63-Button[data-disabled] {
|
|
194
|
+
cursor: not-allowed;
|
|
195
|
+
transform: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Disabled fades ONLY the foreground (label + icon), not the whole control — the
|
|
199
|
+
fill/border stay at full strength so the button still reads as present, just
|
|
200
|
+
inactive. */
|
|
201
|
+
.a63-Button:disabled .a63-Button-label,
|
|
202
|
+
.a63-Button[data-disabled] .a63-Button-label {
|
|
203
|
+
opacity: 0.56;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.a63-Button[data-loading] {
|
|
207
|
+
cursor: progress;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.a63-Button[data-loading] .a63-Button-label {
|
|
211
|
+
color: transparent;
|
|
212
|
+
text-shadow: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.a63-Button-label {
|
|
216
|
+
display: inline-flex;
|
|
217
|
+
align-items: center;
|
|
218
|
+
/* Fill the button and adopt its alignment so a width-constrained button can
|
|
219
|
+
distribute its own content — e.g. `justify-between` to pin a trailing Kbd to
|
|
220
|
+
the right edge. Without the stretch the label is a single content-sized flex
|
|
221
|
+
item, so the button's justify-content has nothing to distribute and any
|
|
222
|
+
alignment other than the default silently does nothing. Content-sized
|
|
223
|
+
buttons are unaffected: there is no free space to fill. */
|
|
224
|
+
flex: 1 1 auto;
|
|
225
|
+
justify-content: inherit;
|
|
226
|
+
/* Resolve gap here — inherit from the button can pick up unrelated parent gaps
|
|
227
|
+
when Button is nested (toolbars / groups). */
|
|
228
|
+
gap: var(--button-gap);
|
|
229
|
+
min-width: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.a63-Button-spinner {
|
|
233
|
+
position: absolute;
|
|
234
|
+
inset: 0;
|
|
235
|
+
z-index: 1;
|
|
236
|
+
display: flex;
|
|
237
|
+
align-items: center;
|
|
238
|
+
justify-content: center;
|
|
239
|
+
width: auto;
|
|
240
|
+
height: auto;
|
|
241
|
+
margin: 0;
|
|
242
|
+
border: none;
|
|
243
|
+
border-radius: 0;
|
|
244
|
+
background: transparent;
|
|
245
|
+
color: var(--button-loading-foreground);
|
|
246
|
+
animation: none;
|
|
247
|
+
pointer-events: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.a63-Button-spinner::before {
|
|
251
|
+
content: '';
|
|
252
|
+
width: var(--button-icon-size);
|
|
253
|
+
height: var(--button-icon-size);
|
|
254
|
+
border: 2px solid currentColor;
|
|
255
|
+
border-top-color: transparent;
|
|
256
|
+
border-radius: var(--radius-full);
|
|
257
|
+
animation: a63-button-spin 700ms linear infinite;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* ── Variants ──────────────────────────────────────────────────────────
|
|
261
|
+
* Base rule above is the `default` variant (neutral inverted). Each variant
|
|
262
|
+
* maps --button-* onto the canonical --a63-* semantic tokens; `primary`/
|
|
263
|
+
* `destructive` are brand/status-aware via their hover tokens. No literals.
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
.a63-Button[data-variant='primary'] {
|
|
267
|
+
--button-background: var(--a63-action-primary);
|
|
268
|
+
--button-border-color: var(--button-background);
|
|
269
|
+
--button-foreground: var(--a63-action-primary-foreground);
|
|
270
|
+
--button-text-shadow: var(--a63-action-primary-text-shadow, var(--a63-control-text-shadow));
|
|
271
|
+
--button-state-hover-background: var(--a63-action-primary-hover);
|
|
272
|
+
--button-state-hover-border-color: var(--button-state-hover-background);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.a63-Button[data-variant='secondary'] {
|
|
276
|
+
--button-background: var(--a63-surface-muted);
|
|
277
|
+
--button-border-color: transparent;
|
|
278
|
+
--button-foreground: var(--a63-text-secondary);
|
|
279
|
+
--button-state-hover-background: color-mix(in oklch, var(--a63-surface-muted) 90%, transparent);
|
|
280
|
+
--button-state-hover-border-color: transparent;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.a63-Button[data-variant='destructive'] {
|
|
284
|
+
--button-background: var(--a63-action-danger);
|
|
285
|
+
--button-border-color: var(--button-background);
|
|
286
|
+
--button-foreground: var(--a63-action-danger-foreground);
|
|
287
|
+
--button-state-hover-background: var(--a63-action-danger-hover);
|
|
288
|
+
--button-state-hover-border-color: var(--button-state-hover-background);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.a63-Button[data-variant='destructive-outline'] {
|
|
292
|
+
--button-gloss: none;
|
|
293
|
+
--button-highlight: none;
|
|
294
|
+
--button-shadow: var(--a63-control-shadow-flat);
|
|
295
|
+
--button-background: color-mix(in oklch, var(--a63-action-danger) 10%, transparent);
|
|
296
|
+
--button-border-color: color-mix(in oklch, var(--a63-action-danger) 20%, transparent);
|
|
297
|
+
--button-foreground: var(--a63-action-danger);
|
|
298
|
+
--button-state-hover-background: color-mix(in oklch, var(--a63-action-danger) 15%, transparent);
|
|
299
|
+
--button-state-hover-border-color: color-mix(in oklch, var(--a63-action-danger) 30%, transparent);
|
|
300
|
+
--button-state-active-background: color-mix(in oklch, var(--a63-action-danger) 15%, transparent);
|
|
301
|
+
--button-state-active-border-color: color-mix(
|
|
302
|
+
in oklch,
|
|
303
|
+
var(--a63-action-danger) 30%,
|
|
304
|
+
transparent
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.a63-Button[data-variant='outline'] {
|
|
309
|
+
--button-gloss: none;
|
|
310
|
+
--button-highlight: none;
|
|
311
|
+
--button-shadow: var(--a63-control-shadow-flat);
|
|
312
|
+
--button-background: var(--a63-surface-panel);
|
|
313
|
+
--button-border-color: var(--a63-border-control);
|
|
314
|
+
--button-foreground: var(--a63-text-primary);
|
|
315
|
+
--button-state-hover-background: color-mix(
|
|
316
|
+
in oklch,
|
|
317
|
+
var(--a63-surface-control-hover) 50%,
|
|
318
|
+
transparent
|
|
319
|
+
);
|
|
320
|
+
--button-state-hover-border-color: var(--a63-border-subtle);
|
|
321
|
+
--button-state-active-background: color-mix(
|
|
322
|
+
in oklch,
|
|
323
|
+
var(--a63-surface-control-hover) 50%,
|
|
324
|
+
transparent
|
|
325
|
+
);
|
|
326
|
+
--button-state-active-border-color: var(--a63-border-subtle);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
:is(.dark, [data-a63-mode='dark']) .a63-Button[data-variant='outline'] {
|
|
330
|
+
--button-background: color-mix(in oklch, var(--a63-border-control) 32%, transparent);
|
|
331
|
+
--button-border-color: var(--a63-border-control);
|
|
332
|
+
--button-state-hover-background: color-mix(in oklch, var(--a63-border-control) 64%, transparent);
|
|
333
|
+
--button-state-hover-border-color: var(--a63-border-control);
|
|
334
|
+
--button-state-active-background: color-mix(in oklch, var(--a63-border-control) 64%, transparent);
|
|
335
|
+
--button-state-active-border-color: var(--a63-border-control);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.a63-Button[data-variant='ghost'] {
|
|
339
|
+
--button-gloss: none;
|
|
340
|
+
--button-highlight: none;
|
|
341
|
+
--button-background: transparent;
|
|
342
|
+
--button-border-color: transparent;
|
|
343
|
+
--button-foreground: var(--a63-text-primary);
|
|
344
|
+
--button-shadow: 0 0 #0000;
|
|
345
|
+
--button-state-hover-background: var(--a63-surface-control-hover);
|
|
346
|
+
--button-state-hover-border-color: transparent;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.a63-Button[data-variant='link'] {
|
|
350
|
+
--button-gloss: none;
|
|
351
|
+
--button-highlight: none;
|
|
352
|
+
--button-background: transparent;
|
|
353
|
+
--button-border-color: transparent;
|
|
354
|
+
--button-foreground: var(--a63-text-primary);
|
|
355
|
+
--button-shadow: 0 0 #0000;
|
|
356
|
+
--button-state-hover-background: transparent;
|
|
357
|
+
--button-state-hover-border-color: transparent;
|
|
358
|
+
text-underline-offset: 4px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.a63-Button[data-variant='link']:hover,
|
|
362
|
+
.a63-Button[data-variant='link']:active,
|
|
363
|
+
.a63-Button[data-variant='link'][data-pressed] {
|
|
364
|
+
text-decoration: underline;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/* Frosted dark-glass buttons for use OVER media (hero art, video). `overlay`
|
|
368
|
+
and `glass` are the same treatment (kept as two ids for prod parity): a
|
|
369
|
+
translucent dark fill + light hairline + backdrop blur, theme-agnostic so it
|
|
370
|
+
reads over any imagery. No aqua gloss/gel; the icon gets a drop-shadow. */
|
|
371
|
+
.a63-Button[data-variant='overlay'],
|
|
372
|
+
.a63-Button[data-variant='glass'] {
|
|
373
|
+
--button-gloss: none;
|
|
374
|
+
--button-highlight: none;
|
|
375
|
+
--button-tint-drop: 0 0 #0000;
|
|
376
|
+
--button-background: color-mix(in oklch, var(--surface-dark-1) 26%, transparent);
|
|
377
|
+
--button-border-color: color-mix(in oklch, var(--surface-light-1) 14%, transparent);
|
|
378
|
+
--button-foreground: var(--surface-light-1);
|
|
379
|
+
--button-shadow: 0 1px 3px color-mix(in oklch, var(--surface-dark-1) 18%, transparent);
|
|
380
|
+
--button-state-hover-background: color-mix(in oklch, var(--surface-dark-1) 30%, transparent);
|
|
381
|
+
--button-state-hover-border-color: color-mix(in oklch, var(--surface-light-1) 22%, transparent);
|
|
382
|
+
--button-icon-filter: drop-shadow(
|
|
383
|
+
0 1px 1px color-mix(in oklch, var(--surface-dark-1) 64%, transparent)
|
|
384
|
+
);
|
|
385
|
+
|
|
386
|
+
backdrop-filter: blur(12px) saturate(1.25);
|
|
387
|
+
text-shadow: 0 1px 1px color-mix(in oklch, var(--surface-dark-1) 64%, transparent);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* Pressed: matches prod's overlay active fill + brighter hairline. */
|
|
391
|
+
.a63-Button[data-variant='overlay']:active,
|
|
392
|
+
.a63-Button[data-variant='overlay'][data-pressed],
|
|
393
|
+
.a63-Button[data-variant='glass']:active,
|
|
394
|
+
.a63-Button[data-variant='glass'][data-pressed] {
|
|
395
|
+
background-color: color-mix(in oklch, var(--surface-dark-1) 34%, transparent);
|
|
396
|
+
border-color: color-mix(in oklch, var(--surface-light-1) 18%, transparent);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* ── Sizes ─────────────────────────────────────────────────────────────
|
|
400
|
+
* Base rule is `md`. Heights/padding/font come from the control ramp, so
|
|
401
|
+
* design language (web/iOS) reshapes every size through the tokens.
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
.a63-Button[data-size='xs'] {
|
|
405
|
+
--button-content-lh: var(--typography-xs-line-height);
|
|
406
|
+
--button-height: max(
|
|
407
|
+
calc(var(--a63-control-height-xs) * var(--a63-density-scale, 1)),
|
|
408
|
+
var(--a63-control-min-size),
|
|
409
|
+
var(--button-content-floor)
|
|
410
|
+
);
|
|
411
|
+
--button-padding-inline: var(--a63-control-padding-inline-xs);
|
|
412
|
+
--button-icon-size: var(--a63-control-icon-size-xs);
|
|
413
|
+
|
|
414
|
+
font-size: var(--a63-control-font-size-xs);
|
|
415
|
+
line-height: var(--typography-xs-line-height);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.a63-Button[data-size='sm'] {
|
|
419
|
+
--button-content-lh: var(--typography-xs-line-height);
|
|
420
|
+
--button-height: max(
|
|
421
|
+
calc(var(--a63-control-height-sm) * var(--a63-density-scale, 1)),
|
|
422
|
+
var(--a63-control-min-size),
|
|
423
|
+
var(--button-content-floor)
|
|
424
|
+
);
|
|
425
|
+
--button-padding-inline: var(--a63-control-padding-inline-sm);
|
|
426
|
+
--button-icon-size: var(--a63-control-icon-size-sm);
|
|
427
|
+
/* Tighter icon↔label than md — sm toolbars read loose at space-2. */
|
|
428
|
+
--button-gap: var(--a63-space-1_5);
|
|
429
|
+
|
|
430
|
+
font-size: var(--a63-control-font-size-sm);
|
|
431
|
+
line-height: var(--typography-xs-line-height);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.a63-Button[data-size='lg'] {
|
|
435
|
+
--button-content-lh: var(--typography-base-line-height);
|
|
436
|
+
--button-height: max(
|
|
437
|
+
calc(var(--a63-control-height-lg) * var(--a63-density-scale, 1)),
|
|
438
|
+
var(--a63-control-min-size-lg, var(--a63-control-min-size)),
|
|
439
|
+
var(--button-content-floor)
|
|
440
|
+
);
|
|
441
|
+
--button-padding-inline: var(--a63-control-padding-inline-lg);
|
|
442
|
+
--button-icon-size: var(--a63-control-icon-size-lg);
|
|
443
|
+
|
|
444
|
+
min-width: var(--a63-control-min-target-lg, var(--a63-control-min-target));
|
|
445
|
+
font-size: var(--a63-control-font-size-lg);
|
|
446
|
+
line-height: var(--typography-base-line-height);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.a63-Button[data-size='xl'] {
|
|
450
|
+
--button-content-lh: var(--typography-lg-line-height);
|
|
451
|
+
--button-height: max(
|
|
452
|
+
calc(var(--a63-control-height-xl) * var(--a63-density-scale, 1)),
|
|
453
|
+
var(--a63-control-min-size-xl, var(--a63-control-min-size)),
|
|
454
|
+
var(--button-content-floor)
|
|
455
|
+
);
|
|
456
|
+
--button-padding-inline: var(--a63-control-padding-inline-xl);
|
|
457
|
+
--button-icon-size: var(--a63-control-icon-size-xl);
|
|
458
|
+
|
|
459
|
+
min-width: var(--a63-control-min-target-xl, var(--a63-control-min-target));
|
|
460
|
+
font-size: var(--a63-control-font-size-xl);
|
|
461
|
+
line-height: var(--typography-lg-line-height);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* Tile — tall, full-width, icon-over-label shape for launcher grids and app
|
|
465
|
+
tiles (ported from the legacy @atom63/ui `tile` size). Composes with any
|
|
466
|
+
variant; the glyph stacks over a wrapping, centered caption. */
|
|
467
|
+
.a63-Button[data-size='tile'] {
|
|
468
|
+
width: 100%;
|
|
469
|
+
height: auto;
|
|
470
|
+
min-height: calc(5rem * var(--a63-density-scale, 1));
|
|
471
|
+
padding: var(--a63-space-3);
|
|
472
|
+
--button-icon-size: 1.5rem;
|
|
473
|
+
|
|
474
|
+
font-size: var(--a63-control-font-size-md);
|
|
475
|
+
line-height: var(--typography-sm-line-height);
|
|
476
|
+
white-space: normal;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* The label span is a row flex by default; stack it so the icon sits above the
|
|
480
|
+
caption (matches the legacy tile + the os63 launcher tile). */
|
|
481
|
+
.a63-Button[data-size='tile'] .a63-Button-label {
|
|
482
|
+
flex-direction: column;
|
|
483
|
+
gap: 0.375rem;
|
|
484
|
+
text-align: center;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* Tile stretched into a grid/flex track — let the parent set height instead of
|
|
488
|
+
the standalone 5rem floor (avoids clipping in fixed-height widget grids). */
|
|
489
|
+
.a63-Button[data-size='tile'].h-full,
|
|
490
|
+
.a63-Button[data-size='tile'].size-full {
|
|
491
|
+
height: 100%;
|
|
492
|
+
min-height: 0;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* Icon-only sizes — square, centered glyph, no inline padding */
|
|
496
|
+
.a63-Button[data-size='icon-xs'],
|
|
497
|
+
.a63-Button[data-size='icon-sm'],
|
|
498
|
+
.a63-Button[data-size='icon'],
|
|
499
|
+
.a63-Button[data-size='icon-lg'],
|
|
500
|
+
.a63-Button[data-size='icon-xl'] {
|
|
501
|
+
/* Square: width tracks the SAME effective size as the height.
|
|
502
|
+
Icon buttons sit on the SAME rendered ramp as every other control. Flooring
|
|
503
|
+
them at --a63-control-min-target instead put a 44px icon button next to a
|
|
504
|
+
32px text button in the same toolbar row on coarse pointers — same size
|
|
505
|
+
token, different height. Sibling alignment outranks the "small in both axes"
|
|
506
|
+
argument; the 44px interaction floor is delivered by the hit-area
|
|
507
|
+
pseudo-element below instead. */
|
|
508
|
+
width: var(--button-height);
|
|
509
|
+
min-width: var(--button-height);
|
|
510
|
+
min-height: var(--button-height);
|
|
511
|
+
padding-inline: 0;
|
|
512
|
+
aspect-ratio: 1;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.a63-Button[data-size='icon-xs'] {
|
|
516
|
+
--button-height: max(
|
|
517
|
+
calc(var(--a63-control-height-xs) * var(--a63-density-scale, 1)),
|
|
518
|
+
var(--a63-control-min-size),
|
|
519
|
+
var(--button-content-floor)
|
|
520
|
+
);
|
|
521
|
+
/* Same step as `xs`, so the two resolve to an identical floor and stay
|
|
522
|
+
aligned in a mixed toolbar row. Declared after `--button-height` only to
|
|
523
|
+
keep the `--button-height: max(` guard in recipes.test.ts matching; custom
|
|
524
|
+
property order within a rule does not affect resolution. */
|
|
525
|
+
--button-content-lh: var(--typography-xs-line-height);
|
|
526
|
+
--button-icon-size: var(--a63-control-icon-size-xs);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.a63-Button[data-size='icon-sm'] {
|
|
530
|
+
--button-height: max(
|
|
531
|
+
calc(var(--a63-control-height-sm) * var(--a63-density-scale, 1)),
|
|
532
|
+
var(--a63-control-min-size),
|
|
533
|
+
var(--button-content-floor)
|
|
534
|
+
);
|
|
535
|
+
--button-content-lh: var(--typography-xs-line-height);
|
|
536
|
+
--button-icon-size: var(--a63-control-icon-size-sm);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.a63-Button[data-size='icon'] {
|
|
540
|
+
--button-height: max(
|
|
541
|
+
calc(var(--a63-control-height-md) * var(--a63-density-scale, 1)),
|
|
542
|
+
var(--a63-control-min-size),
|
|
543
|
+
var(--button-content-floor)
|
|
544
|
+
);
|
|
545
|
+
--button-icon-size: var(--a63-control-icon-size-md);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.a63-Button[data-size='icon-lg'] {
|
|
549
|
+
--button-height: max(
|
|
550
|
+
calc(var(--a63-control-height-lg) * var(--a63-density-scale, 1)),
|
|
551
|
+
var(--a63-control-min-size-lg, var(--a63-control-min-size)),
|
|
552
|
+
var(--button-content-floor)
|
|
553
|
+
);
|
|
554
|
+
--button-content-lh: var(--typography-base-line-height);
|
|
555
|
+
--button-icon-size: var(--a63-control-icon-size-lg);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.a63-Button[data-size='icon-xl'] {
|
|
559
|
+
--button-height: max(
|
|
560
|
+
calc(var(--a63-control-height-xl) * var(--a63-density-scale, 1)),
|
|
561
|
+
var(--a63-control-min-size-xl, var(--a63-control-min-size)),
|
|
562
|
+
var(--button-content-floor)
|
|
563
|
+
);
|
|
564
|
+
--button-content-lh: var(--typography-lg-line-height);
|
|
565
|
+
--button-icon-size: var(--a63-control-icon-size-xl);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.a63-Button :where(svg) {
|
|
569
|
+
width: var(--button-icon-size);
|
|
570
|
+
height: var(--button-icon-size);
|
|
571
|
+
flex: none;
|
|
572
|
+
opacity: var(--button-icon-opacity);
|
|
573
|
+
filter: var(--button-icon-filter);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
@keyframes a63-button-spin {
|
|
577
|
+
to {
|
|
578
|
+
transform: rotate(360deg);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
@media (prefers-reduced-motion: reduce) {
|
|
583
|
+
.a63-Button {
|
|
584
|
+
transition: none;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.a63-Button:active {
|
|
588
|
+
transform: none;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.a63-Button-spinner::before {
|
|
592
|
+
animation-duration: 1.6s;
|
|
593
|
+
}
|
|
594
|
+
}
|