@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,412 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ButtonGroup recipe — always a joined/welded segmented bar, matching ToggleGroup
|
|
3
|
+
* (Figma 432:1335 cell chrome via --a63-segment-*). Members flatten elevation;
|
|
4
|
+
* resting cells paint segment gloss/fill; data-pressed / aria-pressed read as
|
|
5
|
+
* the selected plate. Momentary :active uses the selected inset. Mixed slots
|
|
6
|
+
* (input/select/text) still weld; size ramp is unchanged.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.a63-ButtonGroup {
|
|
10
|
+
--button-group-radius: var(--a63-segment-radius, var(--radius-md));
|
|
11
|
+
--button-group-seam: var(--a63-segment-seam, var(--a63-border-subtle));
|
|
12
|
+
--button-group-height: max(
|
|
13
|
+
calc(var(--a63-control-height-md) * var(--a63-density-scale, 1)),
|
|
14
|
+
var(--a63-control-min-size)
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
width: fit-content;
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
align-items: stretch;
|
|
21
|
+
gap: var(--a63-segment-gap, 0);
|
|
22
|
+
border-radius: var(--button-group-radius);
|
|
23
|
+
background: transparent;
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
overflow-x: auto;
|
|
26
|
+
overscroll-behavior-inline: contain;
|
|
27
|
+
scrollbar-width: none;
|
|
28
|
+
touch-action: pan-x;
|
|
29
|
+
}
|
|
30
|
+
.a63-ButtonGroup::-webkit-scrollbar {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
.a63-ButtonGroup[data-orientation='vertical'] {
|
|
34
|
+
overflow: visible;
|
|
35
|
+
touch-action: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Nested groups (a group of groups) get breathing room instead of welding. */
|
|
39
|
+
.a63-ButtonGroup:has(> [data-slot='button-group']) {
|
|
40
|
+
gap: var(--a63-space-2);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.a63-ButtonGroup[data-orientation='vertical'] {
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Focused member floats above its neighbours so the ring isn't clipped. */
|
|
48
|
+
.a63-ButtonGroup > *:focus-visible {
|
|
49
|
+
position: relative;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.a63-ButtonGroup > [data-slot] {
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ── Welded member geometry ────────────────────────────────────────────── */
|
|
58
|
+
|
|
59
|
+
.a63-ButtonGroup > [data-button],
|
|
60
|
+
.a63-ButtonGroup > [data-slot='button'],
|
|
61
|
+
.a63-ButtonGroup > [data-slot='input-control'],
|
|
62
|
+
.a63-ButtonGroup > [data-slot='select-trigger'],
|
|
63
|
+
.a63-ButtonGroup > .a63-ButtonGroup-text {
|
|
64
|
+
--button-radius: var(--button-group-radius);
|
|
65
|
+
border-radius: 0;
|
|
66
|
+
height: var(--button-group-height);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Flat cells: drop per-member raised chrome so the run is one bar. */
|
|
70
|
+
.a63-ButtonGroup > [data-button],
|
|
71
|
+
.a63-ButtonGroup > [data-slot='button'] {
|
|
72
|
+
--button-shadow: 0 0 #0000;
|
|
73
|
+
--button-shadow-active: 0 0 #0000;
|
|
74
|
+
--button-tint: transparent;
|
|
75
|
+
--button-tint-drop: 0 0 0 transparent;
|
|
76
|
+
--button-highlight: none;
|
|
77
|
+
--button-highlight-opacity: 0;
|
|
78
|
+
--button-motion-press: none;
|
|
79
|
+
box-shadow: none;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* Quiet variants (ghost/link/secondary/outline) adopt ToggleGroup resting cells:
|
|
85
|
+
* segment fill + gloss + border. Loud variants (primary/destructive/…) keep
|
|
86
|
+
* their fills but still weld.
|
|
87
|
+
*/
|
|
88
|
+
.a63-ButtonGroup > [data-slot='button'][data-variant='ghost'],
|
|
89
|
+
.a63-ButtonGroup > [data-slot='button'][data-variant='link'],
|
|
90
|
+
.a63-ButtonGroup > [data-slot='button'][data-variant='secondary'],
|
|
91
|
+
.a63-ButtonGroup > [data-slot='button'][data-variant='outline'],
|
|
92
|
+
.a63-ButtonGroup > [data-button][data-variant='ghost'],
|
|
93
|
+
.a63-ButtonGroup > [data-button][data-variant='link'],
|
|
94
|
+
.a63-ButtonGroup > [data-button][data-variant='secondary'],
|
|
95
|
+
.a63-ButtonGroup > [data-button][data-variant='outline'] {
|
|
96
|
+
--button-background: var(--a63-segment-background, var(--a63-surface-muted));
|
|
97
|
+
--button-foreground: var(--a63-segment-foreground, var(--a63-text-secondary));
|
|
98
|
+
--button-border-color: var(--a63-segment-track-border, var(--a63-border-subtle));
|
|
99
|
+
--button-gloss: var(--a63-segment-gloss, none);
|
|
100
|
+
--button-state-hover-background: var(--a63-segment-background, var(--a63-surface-muted));
|
|
101
|
+
--button-state-hover-border-color: var(--a63-segment-track-border, var(--a63-border-subtle));
|
|
102
|
+
--button-state-active-background: var(
|
|
103
|
+
--a63-segment-selected-background,
|
|
104
|
+
var(--a63-surface-overlay)
|
|
105
|
+
);
|
|
106
|
+
--button-state-active-border-color: var(--a63-segment-track-border, var(--a63-border-subtle));
|
|
107
|
+
background-color: var(--button-background);
|
|
108
|
+
background-image: var(--button-gloss);
|
|
109
|
+
border-color: var(--button-border-color);
|
|
110
|
+
color: var(--button-foreground);
|
|
111
|
+
text-decoration: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.a63-ButtonGroup
|
|
115
|
+
> [data-slot='button'][data-variant='ghost']:hover:not(:disabled):not([data-disabled]),
|
|
116
|
+
.a63-ButtonGroup
|
|
117
|
+
> [data-slot='button'][data-variant='link']:hover:not(:disabled):not([data-disabled]),
|
|
118
|
+
.a63-ButtonGroup
|
|
119
|
+
> [data-slot='button'][data-variant='secondary']:hover:not(:disabled):not([data-disabled]),
|
|
120
|
+
.a63-ButtonGroup
|
|
121
|
+
> [data-slot='button'][data-variant='outline']:hover:not(:disabled):not([data-disabled]),
|
|
122
|
+
.a63-ButtonGroup > [data-button][data-variant='ghost']:hover:not(:disabled):not([data-disabled]),
|
|
123
|
+
.a63-ButtonGroup > [data-button][data-variant='link']:hover:not(:disabled):not([data-disabled]),
|
|
124
|
+
.a63-ButtonGroup
|
|
125
|
+
> [data-button][data-variant='secondary']:hover:not(:disabled):not([data-disabled]),
|
|
126
|
+
.a63-ButtonGroup > [data-button][data-variant='outline']:hover:not(:disabled):not([data-disabled]) {
|
|
127
|
+
color: var(--a63-segment-hover-foreground, var(--a63-text-primary));
|
|
128
|
+
background-image: var(--button-gloss);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Momentary press = pressed-in selected plate (ToggleGroup selected shadow). */
|
|
132
|
+
.a63-ButtonGroup > [data-slot='button']:active:not(:disabled):not([data-disabled]),
|
|
133
|
+
.a63-ButtonGroup > [data-button]:active:not(:disabled):not([data-disabled]) {
|
|
134
|
+
box-shadow: var(--a63-segment-selected-shadow, none);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/*
|
|
138
|
+
* Sticky pressed (Finder view-mode, aria-pressed toolbars) = selected cell.
|
|
139
|
+
* Matches ToggleGroup [data-pressed] treatment.
|
|
140
|
+
*/
|
|
141
|
+
.a63-ButtonGroup > [data-slot='button'][data-pressed],
|
|
142
|
+
.a63-ButtonGroup > [data-slot='button'][aria-pressed='true'],
|
|
143
|
+
.a63-ButtonGroup > [data-button][data-pressed],
|
|
144
|
+
.a63-ButtonGroup > [data-button][aria-pressed='true'] {
|
|
145
|
+
--button-background: var(--a63-segment-selected-background, var(--a63-surface-overlay));
|
|
146
|
+
--button-foreground: var(--a63-segment-selected-foreground, var(--a63-text-primary));
|
|
147
|
+
--button-gloss: var(--a63-segment-selected-gloss, none);
|
|
148
|
+
--button-shadow: var(--a63-segment-selected-shadow, none);
|
|
149
|
+
background-color: var(--button-background);
|
|
150
|
+
background-image: var(--button-gloss);
|
|
151
|
+
box-shadow: var(--button-shadow);
|
|
152
|
+
color: var(--button-foreground);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.a63-ButtonGroup > [data-slot='input-control'] {
|
|
156
|
+
flex: 1;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ── Horizontal: outer radii + collapse inner start borders ────────────── */
|
|
160
|
+
|
|
161
|
+
.a63-ButtonGroup[data-orientation='horizontal']
|
|
162
|
+
> [data-slot]:first-child:not([data-slot='button-group-separator']) {
|
|
163
|
+
border-start-start-radius: var(--button-group-radius);
|
|
164
|
+
border-end-start-radius: var(--button-group-radius);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.a63-ButtonGroup[data-orientation='horizontal']
|
|
168
|
+
> [data-slot]:last-child:not([data-slot='button-group-separator']) {
|
|
169
|
+
border-start-end-radius: var(--button-group-radius);
|
|
170
|
+
border-end-end-radius: var(--button-group-radius);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.a63-ButtonGroup[data-orientation='horizontal']
|
|
174
|
+
> [data-slot]:not(:first-child):not([data-slot='button-group-separator']) {
|
|
175
|
+
border-inline-start-width: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* ── Vertical: outer radii + collapse inner block-start borders ────────── */
|
|
179
|
+
|
|
180
|
+
.a63-ButtonGroup[data-orientation='vertical']
|
|
181
|
+
> [data-slot]:first-child:not([data-slot='button-group-separator']) {
|
|
182
|
+
border-start-start-radius: var(--button-group-radius);
|
|
183
|
+
border-start-end-radius: var(--button-group-radius);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.a63-ButtonGroup[data-orientation='vertical']
|
|
187
|
+
> [data-slot]:last-child:not([data-slot='button-group-separator']) {
|
|
188
|
+
border-end-start-radius: var(--button-group-radius);
|
|
189
|
+
border-end-end-radius: var(--button-group-radius);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.a63-ButtonGroup[data-orientation='vertical']
|
|
193
|
+
> [data-slot]:not(:first-child):not([data-slot='button-group-separator']) {
|
|
194
|
+
border-block-start-width: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* ── Text / label cell ──────────────────────────────────────────────────── */
|
|
198
|
+
|
|
199
|
+
.a63-ButtonGroup-text {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
gap: var(--a63-space-2);
|
|
203
|
+
padding-inline: 0.625rem;
|
|
204
|
+
border: var(--a63-control-border-width) solid
|
|
205
|
+
var(--a63-segment-track-border, var(--a63-border-subtle));
|
|
206
|
+
background-color: var(--a63-segment-background, var(--a63-surface-muted));
|
|
207
|
+
background-image: var(--a63-segment-gloss, none);
|
|
208
|
+
color: var(--a63-segment-foreground, var(--a63-text-secondary));
|
|
209
|
+
font-family: var(--a63-control-font-family);
|
|
210
|
+
font-size: var(--a63-control-font-size-sm);
|
|
211
|
+
font-weight: 500;
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.a63-ButtonGroup-text svg {
|
|
216
|
+
pointer-events: none;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.a63-ButtonGroup-text svg:not([class*='size-']) {
|
|
220
|
+
width: 1rem;
|
|
221
|
+
height: 1rem;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* ── Separator ──────────────────────────────────────────────────────────── */
|
|
225
|
+
|
|
226
|
+
.a63-ButtonGroup-separator {
|
|
227
|
+
position: relative;
|
|
228
|
+
z-index: 1;
|
|
229
|
+
flex-shrink: 0;
|
|
230
|
+
background: var(--button-group-seam);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.a63-ButtonGroup-separator[data-orientation='vertical'] {
|
|
234
|
+
width: var(--a63-control-border-width);
|
|
235
|
+
align-self: stretch;
|
|
236
|
+
height: auto;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.a63-ButtonGroup-separator[data-orientation='horizontal'] {
|
|
240
|
+
width: auto;
|
|
241
|
+
height: var(--a63-control-border-width);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* ── Size ramp ──────────────────────────────────────────────────────────── */
|
|
245
|
+
|
|
246
|
+
.a63-ButtonGroup[data-size='xs'],
|
|
247
|
+
.a63-ButtonGroup[data-size='icon-xs'] {
|
|
248
|
+
--button-group-height: max(
|
|
249
|
+
calc(var(--a63-control-height-xs) * var(--a63-density-scale, 1)),
|
|
250
|
+
var(--a63-control-min-size)
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.a63-ButtonGroup[data-size='sm'],
|
|
255
|
+
.a63-ButtonGroup[data-size='icon-sm'] {
|
|
256
|
+
--button-group-height: max(
|
|
257
|
+
calc(var(--a63-control-height-sm) * var(--a63-density-scale, 1)),
|
|
258
|
+
var(--a63-control-min-size)
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.a63-ButtonGroup[data-size='default'],
|
|
263
|
+
.a63-ButtonGroup[data-size='icon'] {
|
|
264
|
+
--button-group-height: max(
|
|
265
|
+
calc(var(--a63-control-height-md) * var(--a63-density-scale, 1)),
|
|
266
|
+
var(--a63-control-min-size)
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.a63-ButtonGroup[data-size='lg'],
|
|
271
|
+
.a63-ButtonGroup[data-size='icon-lg'] {
|
|
272
|
+
--button-group-height: max(
|
|
273
|
+
calc(var(--a63-control-height-lg) * var(--a63-density-scale, 1)),
|
|
274
|
+
var(--a63-control-min-size-lg, var(--a63-control-min-size))
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
.a63-ButtonGroup[data-size='lg'] > :is([data-button], [data-slot='button']) {
|
|
278
|
+
min-width: var(--a63-control-min-target-lg, var(--a63-control-min-target));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.a63-ButtonGroup[data-size='xl'],
|
|
282
|
+
.a63-ButtonGroup[data-size='icon-xl'] {
|
|
283
|
+
--button-group-height: max(
|
|
284
|
+
calc(var(--a63-control-height-xl) * var(--a63-density-scale, 1)),
|
|
285
|
+
var(--a63-control-min-size-xl, var(--a63-control-min-size))
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
.a63-ButtonGroup[data-size='xl'] > :is([data-button], [data-slot='button']) {
|
|
289
|
+
min-width: var(--a63-control-min-target-xl, var(--a63-control-min-target));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* Icon sizes: square members (width == effective height, including min-target). */
|
|
293
|
+
.a63-ButtonGroup[data-size='icon-xs'] > [data-button],
|
|
294
|
+
.a63-ButtonGroup[data-size='icon-xs'] > [data-slot='button'],
|
|
295
|
+
.a63-ButtonGroup[data-size='icon-sm'] > [data-button],
|
|
296
|
+
.a63-ButtonGroup[data-size='icon-sm'] > [data-slot='button'],
|
|
297
|
+
.a63-ButtonGroup[data-size='icon'] > [data-button],
|
|
298
|
+
.a63-ButtonGroup[data-size='icon'] > [data-slot='button'],
|
|
299
|
+
.a63-ButtonGroup[data-size='icon-lg'] > [data-button],
|
|
300
|
+
.a63-ButtonGroup[data-size='icon-lg'] > [data-slot='button'],
|
|
301
|
+
.a63-ButtonGroup[data-size='icon-xl'] > [data-button],
|
|
302
|
+
.a63-ButtonGroup[data-size='icon-xl'] > [data-slot='button'] {
|
|
303
|
+
--button-group-member-size: var(--button-group-height);
|
|
304
|
+
|
|
305
|
+
flex: none;
|
|
306
|
+
width: var(--button-group-member-size);
|
|
307
|
+
min-width: var(--button-group-member-size);
|
|
308
|
+
height: var(--button-group-member-size);
|
|
309
|
+
min-height: var(--button-group-member-size);
|
|
310
|
+
padding-inline: 0;
|
|
311
|
+
aspect-ratio: 1;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/*
|
|
315
|
+
* Endcap hardening — keep grouped radii stable after Button/ButtonGroup size
|
|
316
|
+
* recipes and composed trigger classes have settled. `data-button` is the
|
|
317
|
+
* stable marker for Button, even when DropdownMenu/Tooltip/Popover merge their
|
|
318
|
+
* own trigger slot attributes onto it.
|
|
319
|
+
*/
|
|
320
|
+
.a63-ButtonGroup[data-orientation='horizontal']
|
|
321
|
+
> :is(
|
|
322
|
+
[data-button],
|
|
323
|
+
[data-slot='input-control'],
|
|
324
|
+
[data-slot='select-trigger'],
|
|
325
|
+
.a63-ButtonGroup-text
|
|
326
|
+
):first-child {
|
|
327
|
+
border-start-start-radius: var(--button-group-radius);
|
|
328
|
+
border-end-start-radius: var(--button-group-radius);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.a63-ButtonGroup[data-orientation='horizontal']
|
|
332
|
+
> :is(
|
|
333
|
+
[data-button],
|
|
334
|
+
[data-slot='input-control'],
|
|
335
|
+
[data-slot='select-trigger'],
|
|
336
|
+
.a63-ButtonGroup-text
|
|
337
|
+
):not(
|
|
338
|
+
:has(
|
|
339
|
+
~ :is(
|
|
340
|
+
[data-button],
|
|
341
|
+
[data-slot='input-control'],
|
|
342
|
+
[data-slot='select-trigger'],
|
|
343
|
+
.a63-ButtonGroup-text
|
|
344
|
+
)
|
|
345
|
+
)
|
|
346
|
+
) {
|
|
347
|
+
border-start-end-radius: var(--button-group-radius);
|
|
348
|
+
border-end-end-radius: var(--button-group-radius);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.a63-ButtonGroup[data-orientation='horizontal']
|
|
352
|
+
> :is(
|
|
353
|
+
[data-button],
|
|
354
|
+
[data-slot='input-control'],
|
|
355
|
+
[data-slot='select-trigger'],
|
|
356
|
+
.a63-ButtonGroup-text
|
|
357
|
+
)
|
|
358
|
+
~ :is(
|
|
359
|
+
[data-button],
|
|
360
|
+
[data-slot='input-control'],
|
|
361
|
+
[data-slot='select-trigger'],
|
|
362
|
+
.a63-ButtonGroup-text
|
|
363
|
+
) {
|
|
364
|
+
border-inline-start-width: 0;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.a63-ButtonGroup[data-orientation='vertical']
|
|
368
|
+
> :is(
|
|
369
|
+
[data-button],
|
|
370
|
+
[data-slot='input-control'],
|
|
371
|
+
[data-slot='select-trigger'],
|
|
372
|
+
.a63-ButtonGroup-text
|
|
373
|
+
):first-child {
|
|
374
|
+
border-start-start-radius: var(--button-group-radius);
|
|
375
|
+
border-start-end-radius: var(--button-group-radius);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.a63-ButtonGroup[data-orientation='vertical']
|
|
379
|
+
> :is(
|
|
380
|
+
[data-button],
|
|
381
|
+
[data-slot='input-control'],
|
|
382
|
+
[data-slot='select-trigger'],
|
|
383
|
+
.a63-ButtonGroup-text
|
|
384
|
+
):not(
|
|
385
|
+
:has(
|
|
386
|
+
~ :is(
|
|
387
|
+
[data-button],
|
|
388
|
+
[data-slot='input-control'],
|
|
389
|
+
[data-slot='select-trigger'],
|
|
390
|
+
.a63-ButtonGroup-text
|
|
391
|
+
)
|
|
392
|
+
)
|
|
393
|
+
) {
|
|
394
|
+
border-end-start-radius: var(--button-group-radius);
|
|
395
|
+
border-end-end-radius: var(--button-group-radius);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.a63-ButtonGroup[data-orientation='vertical']
|
|
399
|
+
> :is(
|
|
400
|
+
[data-button],
|
|
401
|
+
[data-slot='input-control'],
|
|
402
|
+
[data-slot='select-trigger'],
|
|
403
|
+
.a63-ButtonGroup-text
|
|
404
|
+
)
|
|
405
|
+
~ :is(
|
|
406
|
+
[data-button],
|
|
407
|
+
[data-slot='input-control'],
|
|
408
|
+
[data-slot='select-trigger'],
|
|
409
|
+
.a63-ButtonGroup-text
|
|
410
|
+
) {
|
|
411
|
+
border-block-start-width: 0;
|
|
412
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Calendar recipe — the DS port of the react-day-picker DayPicker wrapper. rdp's
|
|
3
|
+
* classNames are fully replaced by these a63-Calendar-* classes (so rdp's base
|
|
4
|
+
* style.css is NOT imported — DS convention: no side-effect CSS). Layout mirrors
|
|
5
|
+
* the prod Tailwind: a fixed --cell-size grid, a centered month caption with
|
|
6
|
+
* absolute prev/next nav, muted weekdays, a brand-primary selected fill, a today
|
|
7
|
+
* dot, and connected range ends. Every colour/space/radius reads --a63-* tokens.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.a63-Calendar {
|
|
11
|
+
--cell-size: max(
|
|
12
|
+
calc(var(--a63-control-height-lg) * var(--a63-density-scale, 1)),
|
|
13
|
+
var(--a63-control-min-size)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
width: fit-content;
|
|
17
|
+
color: var(--a63-text-primary);
|
|
18
|
+
font-family: var(--a63-control-font-family);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* ── Month layout ─────────────────────────────────────────────────────────── */
|
|
22
|
+
.a63-Calendar-months {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: var(--a63-space-2);
|
|
27
|
+
}
|
|
28
|
+
@media (min-width: 40rem) {
|
|
29
|
+
.a63-Calendar-months {
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.a63-Calendar-month {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.a63-Calendar-month-caption {
|
|
39
|
+
position: relative;
|
|
40
|
+
z-index: 1;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
height: var(--cell-size);
|
|
45
|
+
margin-inline: var(--cell-size);
|
|
46
|
+
margin-bottom: var(--a63-space-1);
|
|
47
|
+
padding-inline: var(--a63-space-1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.a63-Calendar-caption-label {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--a63-space-2);
|
|
54
|
+
height: 100%;
|
|
55
|
+
font-size: var(--a63-control-font-size-sm);
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ── Nav (absolute prev/next over the caption row) ────────────────────────── */
|
|
60
|
+
.a63-Calendar-nav {
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 0;
|
|
63
|
+
z-index: 2;
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Nav buttons mimic the DS Button (neutral, ghost-ish): a small square control
|
|
70
|
+
with the control radius, hover surface, and a token focus ring. */
|
|
71
|
+
.a63-Calendar-nav-button {
|
|
72
|
+
position: relative;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
width: var(--cell-size);
|
|
77
|
+
height: var(--cell-size);
|
|
78
|
+
padding: 0;
|
|
79
|
+
border: var(--a63-control-border-width) solid transparent;
|
|
80
|
+
border-radius: var(--a63-control-radius);
|
|
81
|
+
appearance: none;
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
color: var(--a63-text-primary);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
outline: none;
|
|
86
|
+
transition:
|
|
87
|
+
background-color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
88
|
+
box-shadow var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
89
|
+
}
|
|
90
|
+
.a63-Calendar-nav-button:not(:disabled):hover {
|
|
91
|
+
background-color: var(--a63-surface-control-hover);
|
|
92
|
+
}
|
|
93
|
+
.a63-Calendar-nav-button:disabled {
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
opacity: 0.64;
|
|
96
|
+
}
|
|
97
|
+
.a63-Calendar-nav-button:focus-visible {
|
|
98
|
+
box-shadow: 0 0 0 var(--a63-control-focus-ring-width)
|
|
99
|
+
var(--a63-control-focus-ring-color, var(--a63-focus-ring));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.a63-Calendar-chevron {
|
|
103
|
+
width: var(--a63-control-icon-size-md);
|
|
104
|
+
height: var(--a63-control-icon-size-md);
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
}
|
|
108
|
+
:where([dir='rtl']) .a63-Calendar-nav-button .a63-Calendar-chevron {
|
|
109
|
+
transform: rotate(180deg);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ── Caption dropdowns (captionLayout="dropdown") ─────────────────────────── */
|
|
113
|
+
.a63-Calendar-dropdowns {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
gap: var(--a63-space-1);
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: var(--cell-size);
|
|
120
|
+
font-size: var(--a63-control-font-size-sm);
|
|
121
|
+
}
|
|
122
|
+
.a63-Calendar-dropdowns span {
|
|
123
|
+
font-weight: 500;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.a63-Calendar-dropdown-root {
|
|
127
|
+
/* Content floor — see button.css. */
|
|
128
|
+
--calendar-dropdown-floor: calc(var(--typography-xs-line-height) + 2 * var(--a63-space-0_5));
|
|
129
|
+
|
|
130
|
+
position: relative;
|
|
131
|
+
display: inline-flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
height: max(
|
|
134
|
+
calc(var(--a63-control-height-sm) * var(--a63-density-scale, 1)),
|
|
135
|
+
var(--a63-control-min-size),
|
|
136
|
+
var(--calendar-dropdown-floor)
|
|
137
|
+
);
|
|
138
|
+
padding-inline: calc(var(--a63-space-3) - 1px);
|
|
139
|
+
border: var(--a63-control-border-width) solid var(--a63-border-control);
|
|
140
|
+
border-radius: var(--a63-control-radius);
|
|
141
|
+
}
|
|
142
|
+
.a63-Calendar-dropdown-root:has(:focus) {
|
|
143
|
+
border-color: var(--a63-focus-ring);
|
|
144
|
+
box-shadow: 0 0 0 var(--a63-control-focus-ring-width)
|
|
145
|
+
var(--a63-control-focus-ring-color, var(--a63-focus-ring));
|
|
146
|
+
}
|
|
147
|
+
.a63-Calendar-dropdown-root .a63-Calendar-chevron {
|
|
148
|
+
margin-inline-end: -0.25rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* The native select overlays the styled label transparently. */
|
|
152
|
+
.a63-Calendar-dropdown {
|
|
153
|
+
position: absolute;
|
|
154
|
+
inset: 0;
|
|
155
|
+
background-color: var(--a63-surface-overlay);
|
|
156
|
+
opacity: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ── Weekdays + grid ──────────────────────────────────────────────────────── */
|
|
160
|
+
.a63-Calendar-weekday,
|
|
161
|
+
.a63-Calendar-week-number {
|
|
162
|
+
width: var(--cell-size);
|
|
163
|
+
height: var(--cell-size);
|
|
164
|
+
padding: 0;
|
|
165
|
+
font-size: var(--a63-control-font-size-xs);
|
|
166
|
+
font-weight: 500;
|
|
167
|
+
color: color-mix(in oklch, var(--a63-text-secondary) 72%, transparent);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.a63-Calendar-day {
|
|
171
|
+
width: var(--cell-size);
|
|
172
|
+
height: var(--cell-size);
|
|
173
|
+
padding: 1px 0;
|
|
174
|
+
font-size: var(--a63-control-font-size-sm);
|
|
175
|
+
text-align: center;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* ── Day button — the interactive cell ────────────────────────────────────── */
|
|
179
|
+
.a63-Calendar-day-button {
|
|
180
|
+
position: relative;
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
width: var(--cell-size);
|
|
185
|
+
height: var(--cell-size);
|
|
186
|
+
border: 0;
|
|
187
|
+
border-radius: var(--a63-control-radius);
|
|
188
|
+
appearance: none;
|
|
189
|
+
background-color: transparent;
|
|
190
|
+
color: var(--a63-text-primary);
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
font: inherit;
|
|
193
|
+
outline: none;
|
|
194
|
+
transition:
|
|
195
|
+
color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
196
|
+
background-color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
197
|
+
border-radius var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
198
|
+
box-shadow var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Hover on any non-selected day. */
|
|
202
|
+
.a63-Calendar-day:not([data-selected]) .a63-Calendar-day-button:hover {
|
|
203
|
+
background-color: var(--a63-surface-control-hover);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Selected fill = brand primary. */
|
|
207
|
+
.a63-Calendar-day[data-selected] .a63-Calendar-day-button {
|
|
208
|
+
background-color: var(--a63-action-primary);
|
|
209
|
+
color: var(--a63-action-primary-foreground);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Range: connected ends, tinted middle. */
|
|
213
|
+
.a63-Calendar-day.range-middle .a63-Calendar-day-button {
|
|
214
|
+
border-radius: 0;
|
|
215
|
+
background-color: var(--a63-surface-control-hover);
|
|
216
|
+
color: var(--a63-text-primary);
|
|
217
|
+
}
|
|
218
|
+
.a63-Calendar-day.range-start:not(.range-end) .a63-Calendar-day-button {
|
|
219
|
+
border-start-end-radius: 0;
|
|
220
|
+
border-end-end-radius: 0;
|
|
221
|
+
}
|
|
222
|
+
.a63-Calendar-day.range-end:not(.range-start) .a63-Calendar-day-button {
|
|
223
|
+
border-start-start-radius: 0;
|
|
224
|
+
border-end-start-radius: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Outside + disabled days read as muted; disabled dates strike through. */
|
|
228
|
+
.a63-Calendar-outside .a63-Calendar-day-button,
|
|
229
|
+
.a63-Calendar-day[data-disabled] .a63-Calendar-day-button {
|
|
230
|
+
color: color-mix(in oklch, var(--a63-text-secondary) 72%, transparent);
|
|
231
|
+
}
|
|
232
|
+
.a63-Calendar-day[data-selected].a63-Calendar-outside .a63-Calendar-day-button {
|
|
233
|
+
color: var(--a63-action-primary-foreground);
|
|
234
|
+
}
|
|
235
|
+
.a63-Calendar-day[data-disabled] .a63-Calendar-day-button {
|
|
236
|
+
pointer-events: none;
|
|
237
|
+
text-decoration: line-through;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.a63-Calendar-day-button:focus-visible {
|
|
241
|
+
z-index: 1;
|
|
242
|
+
box-shadow: 0 0 0 var(--a63-control-focus-ring-width)
|
|
243
|
+
color-mix(in oklch, var(--a63-focus-ring) 50%, transparent);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* ── Today — a small dot under the number ─────────────────────────────────── */
|
|
247
|
+
.a63-Calendar-today > .a63-Calendar-day-button::after {
|
|
248
|
+
content: '';
|
|
249
|
+
position: absolute;
|
|
250
|
+
bottom: 0.25rem;
|
|
251
|
+
left: 50%;
|
|
252
|
+
z-index: 1;
|
|
253
|
+
width: 3px;
|
|
254
|
+
height: 3px;
|
|
255
|
+
translate: -50% 0;
|
|
256
|
+
border-radius: 9999px;
|
|
257
|
+
background-color: var(--a63-action-primary);
|
|
258
|
+
pointer-events: none;
|
|
259
|
+
transition: background-color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
260
|
+
}
|
|
261
|
+
.a63-Calendar-today[data-selected]:not(.range-middle) > .a63-Calendar-day-button::after {
|
|
262
|
+
background-color: var(--a63-surface-page);
|
|
263
|
+
}
|
|
264
|
+
.a63-Calendar-today[data-disabled] > .a63-Calendar-day-button::after {
|
|
265
|
+
background-color: color-mix(in oklch, var(--a63-text-primary) 30%, transparent);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* rdp's utility for hidden filler cells. */
|
|
269
|
+
.a63-Calendar-hidden {
|
|
270
|
+
visibility: hidden;
|
|
271
|
+
}
|