@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,196 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Accordion recipe — a stack of collapsible sections (Base UI Accordion),
|
|
3
|
+
* faithful to prod @atom63/ui. Visually this is a static surface stack with
|
|
4
|
+
* disclosure triggers: item separators read --a63-border-subtle, while the
|
|
5
|
+
* clickable header uses the TRIGGER contract for hover/open/focus timing instead
|
|
6
|
+
* of the Button/Action contract. The indicator glyph reads --a63-text-secondary
|
|
7
|
+
* and rotates/cross-fades on open. The panel height animates via Base UI's
|
|
8
|
+
* --accordion-panel-height.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.a63-Accordion {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
font-family: var(--a63-control-font-family);
|
|
15
|
+
color: var(--a63-text-primary);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* ── Item ──────────────────────────────────────────────────────────────── */
|
|
19
|
+
|
|
20
|
+
.a63-Accordion-item {
|
|
21
|
+
border-bottom: 1px solid color-mix(in oklch, var(--a63-border-subtle) 70%, transparent);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.a63-Accordion-item:last-child {
|
|
25
|
+
border-bottom: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ── Header + Trigger ──────────────────────────────────────────────────── */
|
|
29
|
+
|
|
30
|
+
.a63-Accordion-header {
|
|
31
|
+
display: flex;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.a63-Accordion-trigger {
|
|
36
|
+
position: relative;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex: 1;
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
gap: var(--a63-space-4);
|
|
42
|
+
padding: var(--a63-space-4) var(--a63-space-2);
|
|
43
|
+
border: 0;
|
|
44
|
+
border-radius: var(--a63-trigger-radius, var(--radius-md));
|
|
45
|
+
background: transparent;
|
|
46
|
+
color: inherit;
|
|
47
|
+
font-family: inherit;
|
|
48
|
+
font-size: var(--a63-control-font-size-md);
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
line-height: 1.4;
|
|
51
|
+
text-align: start;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
outline: none;
|
|
54
|
+
transition:
|
|
55
|
+
background-color var(--a63-trigger-feedback-duration) var(--a63-trigger-feedback-ease),
|
|
56
|
+
box-shadow var(--a63-trigger-feedback-duration) var(--a63-trigger-feedback-ease),
|
|
57
|
+
color var(--a63-trigger-feedback-duration) var(--a63-trigger-feedback-ease);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.a63-Accordion-item .a63-Accordion-trigger {
|
|
61
|
+
border-radius: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.a63-Accordion-trigger:hover {
|
|
65
|
+
background: var(
|
|
66
|
+
--a63-trigger-hover-background,
|
|
67
|
+
color-mix(in oklch, var(--a63-surface-control-hover) 50%, transparent)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.a63-Accordion-trigger[data-panel-open] {
|
|
72
|
+
background: var(
|
|
73
|
+
--a63-trigger-open-background,
|
|
74
|
+
color-mix(in oklch, var(--a63-surface-control-hover) 40%, transparent)
|
|
75
|
+
);
|
|
76
|
+
box-shadow: var(--a63-trigger-open-shadow);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.a63-Accordion-trigger:focus-visible {
|
|
80
|
+
box-shadow:
|
|
81
|
+
var(--a63-trigger-open-shadow),
|
|
82
|
+
0 0 0 var(--a63-trigger-focus-ring-width)
|
|
83
|
+
var(--a63-control-focus-ring-color, var(--a63-focus-ring));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.a63-Accordion-trigger[data-disabled] {
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
opacity: 0.5;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ── Indicator ─────────────────────────────────────────────────────────── */
|
|
92
|
+
|
|
93
|
+
.a63-Accordion-indicator {
|
|
94
|
+
position: relative;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
width: 1rem;
|
|
100
|
+
height: 1rem;
|
|
101
|
+
translate: 0 0.125rem;
|
|
102
|
+
color: var(--a63-text-secondary);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.a63-Accordion-indicator svg {
|
|
106
|
+
display: block;
|
|
107
|
+
width: 1rem;
|
|
108
|
+
height: 1rem;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* chevron: rotates 180° on open */
|
|
113
|
+
.a63-Accordion-indicator-chevron {
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
transition: rotate 0.2s var(--a63-control-feedback-ease);
|
|
116
|
+
}
|
|
117
|
+
.a63-Accordion-trigger[data-panel-open][data-icon='chevron'] .a63-Accordion-indicator-chevron {
|
|
118
|
+
rotate: 180deg;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* plus/minus: cross-fade + rotate on open */
|
|
122
|
+
.a63-Accordion-indicator-plus,
|
|
123
|
+
.a63-Accordion-indicator-minus {
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 0;
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
transition:
|
|
130
|
+
opacity 0.2s var(--a63-control-feedback-ease),
|
|
131
|
+
scale 0.2s var(--a63-control-feedback-ease),
|
|
132
|
+
rotate 0.2s var(--a63-control-feedback-ease);
|
|
133
|
+
}
|
|
134
|
+
.a63-Accordion-indicator-minus {
|
|
135
|
+
opacity: 0;
|
|
136
|
+
scale: 0;
|
|
137
|
+
}
|
|
138
|
+
.a63-Accordion-trigger[data-panel-open] .a63-Accordion-indicator-plus {
|
|
139
|
+
opacity: 0;
|
|
140
|
+
scale: 0;
|
|
141
|
+
rotate: 90deg;
|
|
142
|
+
}
|
|
143
|
+
.a63-Accordion-trigger[data-panel-open] .a63-Accordion-indicator-minus {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
scale: 1;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ── Panel ─────────────────────────────────────────────────────────────── */
|
|
149
|
+
|
|
150
|
+
.a63-Accordion-panel {
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
font-size: var(--a63-control-font-size-md);
|
|
153
|
+
color: var(--a63-text-secondary);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.a63-Accordion-panel[data-open] {
|
|
157
|
+
animation: a63-accordion-down 0.2s var(--a63-control-feedback-ease);
|
|
158
|
+
}
|
|
159
|
+
.a63-Accordion-panel[data-closed] {
|
|
160
|
+
animation: a63-accordion-up 0.2s var(--a63-control-feedback-ease);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.a63-Accordion-content-inner {
|
|
164
|
+
padding: var(--a63-space-2) var(--a63-space-2) var(--a63-space-4);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@keyframes a63-accordion-down {
|
|
168
|
+
from {
|
|
169
|
+
height: 0;
|
|
170
|
+
}
|
|
171
|
+
to {
|
|
172
|
+
height: var(--accordion-panel-height);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@keyframes a63-accordion-up {
|
|
177
|
+
from {
|
|
178
|
+
height: var(--accordion-panel-height);
|
|
179
|
+
}
|
|
180
|
+
to {
|
|
181
|
+
height: 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (prefers-reduced-motion: reduce) {
|
|
186
|
+
.a63-Accordion-indicator-chevron,
|
|
187
|
+
.a63-Accordion-indicator-plus,
|
|
188
|
+
.a63-Accordion-indicator-minus,
|
|
189
|
+
.a63-Accordion-trigger {
|
|
190
|
+
transition: none;
|
|
191
|
+
}
|
|
192
|
+
.a63-Accordion-panel[data-open],
|
|
193
|
+
.a63-Accordion-panel[data-closed] {
|
|
194
|
+
animation: none;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Alert recipe — a status callout. Faithful to prod @atom63/ui alert.tsx: a
|
|
3
|
+
* bordered status surface that re-flows its columns for a leading icon slot and
|
|
4
|
+
* a trailing action slot. The default variant is neutral; four semantic tones
|
|
5
|
+
* (error/info/success/warning) recolor border/bg/icon from --a63-status-* +
|
|
6
|
+
* --a63-action-danger. It uses the SURFACE contract for wrapper treatment;
|
|
7
|
+
* controls inside the action slot keep their own action/control styling.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.a63-Alert {
|
|
11
|
+
--alert-action-inset: var(--a63-space-2);
|
|
12
|
+
--alert-action-reserve: calc(var(--a63-space-6) * 3);
|
|
13
|
+
--alert-gap-x: var(--a63-space-2);
|
|
14
|
+
--alert-gap-y: var(--a63-space-0_5);
|
|
15
|
+
--alert-icon-size: var(--a63-space-4);
|
|
16
|
+
--alert-padding-block: var(--a63-space-3);
|
|
17
|
+
--alert-padding-inline: 0.875rem;
|
|
18
|
+
--alert-accent: var(--a63-text-secondary);
|
|
19
|
+
--alert-action-foreground: var(--a63-text-primary);
|
|
20
|
+
--alert-action-hover-background: color-mix(
|
|
21
|
+
in oklch,
|
|
22
|
+
var(--a63-surface-control-hover) 72%,
|
|
23
|
+
transparent
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
position: relative;
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: 1fr;
|
|
29
|
+
align-items: start;
|
|
30
|
+
gap: var(--alert-gap-y) var(--alert-gap-x);
|
|
31
|
+
width: 100%;
|
|
32
|
+
padding: var(--alert-padding-block) var(--alert-padding-inline);
|
|
33
|
+
border: var(--a63-surface-border-width) var(--a63-surface-border-style) var(--a63-border-subtle);
|
|
34
|
+
border-radius: var(--a63-surface-radius, var(--radius-lg));
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
background-image: var(--a63-surface-gloss), var(--a63-surface-texture-image);
|
|
37
|
+
background-blend-mode: normal, var(--a63-surface-texture-blend);
|
|
38
|
+
backdrop-filter: var(--a63-surface-backdrop);
|
|
39
|
+
box-shadow: var(--a63-surface-inner-shadow, none), var(--a63-surface-shadow, none);
|
|
40
|
+
color: var(--a63-text-primary);
|
|
41
|
+
font-family: var(--a63-font-app, var(--font-family-sans));
|
|
42
|
+
font-size: var(--typography-sm-font-size);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Leading icon: reserve a fixed first column. Direct-child SVG is kept as a
|
|
46
|
+
compatibility path; prefer AlertIcon. */
|
|
47
|
+
.a63-Alert:has(> [data-slot='alert-icon']),
|
|
48
|
+
.a63-Alert:has(> svg) {
|
|
49
|
+
grid-template-columns: var(--alert-icon-size) 1fr;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.a63-Alert:has(> [data-slot='alert-action']) {
|
|
53
|
+
padding-inline-end: max(var(--alert-padding-inline), var(--alert-action-reserve));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.a63-Alert-icon {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
width: var(--alert-icon-size);
|
|
61
|
+
height: 1lh;
|
|
62
|
+
color: var(--a63-text-secondary);
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.a63-Alert-icon > svg {
|
|
67
|
+
width: var(--alert-icon-size);
|
|
68
|
+
height: 1lh;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.a63-Alert > svg {
|
|
72
|
+
width: var(--alert-icon-size);
|
|
73
|
+
height: 1lh;
|
|
74
|
+
color: var(--a63-text-secondary);
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ── Slots ─────────────────────────────────────────────────────────────── */
|
|
79
|
+
.a63-Alert-title {
|
|
80
|
+
font-weight: 500;
|
|
81
|
+
line-height: 1.4;
|
|
82
|
+
}
|
|
83
|
+
/* When an icon precedes the title, keep title in the content column. */
|
|
84
|
+
.a63-Alert > [data-slot='alert-icon'] ~ .a63-Alert-title,
|
|
85
|
+
.a63-Alert > svg ~ .a63-Alert-title {
|
|
86
|
+
grid-column-start: 2;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.a63-Alert-description {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: 0.625rem;
|
|
93
|
+
color: var(--a63-text-secondary);
|
|
94
|
+
line-height: 1.4;
|
|
95
|
+
}
|
|
96
|
+
.a63-Alert > [data-slot='alert-icon'] ~ .a63-Alert-description,
|
|
97
|
+
.a63-Alert > svg ~ .a63-Alert-description {
|
|
98
|
+
grid-column-start: 2;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.a63-Alert-action {
|
|
102
|
+
position: absolute;
|
|
103
|
+
top: var(--alert-action-inset);
|
|
104
|
+
right: var(--alert-action-inset);
|
|
105
|
+
display: flex;
|
|
106
|
+
gap: var(--a63-space-1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.a63-Alert .a63-Alert-action .a63-Button[data-variant='ghost'],
|
|
110
|
+
.a63-Alert .a63-Alert-action .a63-Button[data-variant='link'] {
|
|
111
|
+
--button-background: transparent;
|
|
112
|
+
--button-border-color: transparent;
|
|
113
|
+
--button-focus-ring: var(--alert-accent);
|
|
114
|
+
--button-foreground: var(--alert-action-foreground);
|
|
115
|
+
--button-gloss: none;
|
|
116
|
+
--button-highlight: none;
|
|
117
|
+
--button-shadow: 0 0 #0000;
|
|
118
|
+
--button-state-active-background: var(--alert-action-hover-background);
|
|
119
|
+
--button-state-active-border-color: transparent;
|
|
120
|
+
--button-state-hover-background: var(--alert-action-hover-background);
|
|
121
|
+
--button-state-hover-border-color: transparent;
|
|
122
|
+
--button-tint-drop: 0 0 transparent;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ── Variants (default is the neutral base above) ──────────────────────── */
|
|
126
|
+
/* Default tone gets a faint fill in dark mode (prod dark:bg-input/32). */
|
|
127
|
+
:is(.dark, [data-a63-mode='dark']) .a63-Alert[data-variant='default'] {
|
|
128
|
+
background-color: color-mix(in oklch, var(--a63-surface-control) 32%, transparent);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.a63-Alert[data-variant='error'] {
|
|
132
|
+
--alert-accent: var(--a63-action-danger);
|
|
133
|
+
--alert-action-foreground: var(--a63-action-danger);
|
|
134
|
+
--alert-action-hover-background: color-mix(in oklch, var(--a63-action-danger) 10%, transparent);
|
|
135
|
+
|
|
136
|
+
border-color: color-mix(in oklch, var(--a63-action-danger) 32%, transparent);
|
|
137
|
+
background-color: color-mix(in oklch, var(--a63-action-danger) 4%, transparent);
|
|
138
|
+
}
|
|
139
|
+
.a63-Alert[data-variant='error'] > svg {
|
|
140
|
+
color: var(--a63-action-danger);
|
|
141
|
+
}
|
|
142
|
+
.a63-Alert[data-variant='error'] > [data-slot='alert-icon'] {
|
|
143
|
+
color: var(--a63-action-danger);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.a63-Alert[data-variant='info'] {
|
|
147
|
+
--alert-accent: var(--a63-status-info);
|
|
148
|
+
--alert-action-foreground: var(--a63-status-info);
|
|
149
|
+
--alert-action-hover-background: color-mix(in oklch, var(--a63-status-info) 10%, transparent);
|
|
150
|
+
|
|
151
|
+
border-color: color-mix(in oklch, var(--a63-status-info) 32%, transparent);
|
|
152
|
+
background-color: color-mix(in oklch, var(--a63-status-info) 4%, transparent);
|
|
153
|
+
}
|
|
154
|
+
.a63-Alert[data-variant='info'] > svg {
|
|
155
|
+
color: var(--a63-status-info);
|
|
156
|
+
}
|
|
157
|
+
.a63-Alert[data-variant='info'] > [data-slot='alert-icon'] {
|
|
158
|
+
color: var(--a63-status-info);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.a63-Alert[data-variant='success'] {
|
|
162
|
+
--alert-accent: var(--a63-status-success);
|
|
163
|
+
--alert-action-foreground: var(--a63-status-success);
|
|
164
|
+
--alert-action-hover-background: color-mix(in oklch, var(--a63-status-success) 10%, transparent);
|
|
165
|
+
|
|
166
|
+
border-color: color-mix(in oklch, var(--a63-status-success) 32%, transparent);
|
|
167
|
+
background-color: color-mix(in oklch, var(--a63-status-success) 4%, transparent);
|
|
168
|
+
}
|
|
169
|
+
.a63-Alert[data-variant='success'] > svg {
|
|
170
|
+
color: var(--a63-status-success);
|
|
171
|
+
}
|
|
172
|
+
.a63-Alert[data-variant='success'] > [data-slot='alert-icon'] {
|
|
173
|
+
color: var(--a63-status-success);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.a63-Alert[data-variant='warning'] {
|
|
177
|
+
--alert-accent: var(--a63-status-warning);
|
|
178
|
+
--alert-action-foreground: var(--a63-status-warning);
|
|
179
|
+
--alert-action-hover-background: color-mix(in oklch, var(--a63-status-warning) 12%, transparent);
|
|
180
|
+
|
|
181
|
+
border-color: color-mix(in oklch, var(--a63-status-warning) 32%, transparent);
|
|
182
|
+
background-color: color-mix(in oklch, var(--a63-status-warning) 4%, transparent);
|
|
183
|
+
}
|
|
184
|
+
.a63-Alert[data-variant='warning'] > svg {
|
|
185
|
+
color: var(--a63-status-warning);
|
|
186
|
+
}
|
|
187
|
+
.a63-Alert[data-variant='warning'] > [data-slot='alert-icon'] {
|
|
188
|
+
color: var(--a63-status-warning);
|
|
189
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* AlertDialog recipe — the OVERLAY archetype in its dismiss-guarded modal form.
|
|
3
|
+
* Faithful port of prod @atom63/ui alert-dialog.tsx. Base UI sets
|
|
4
|
+
* data-open/data-closed + data-starting-style/data-ending-style on the
|
|
5
|
+
* Backdrop/Popup; the recipe keys its entrance/exit off those. Chrome reads a63
|
|
6
|
+
* tokens: the popup is a raised overlay surface (--a63-surface-overlay +
|
|
7
|
+
* --a63-overlay-shadow + --a63-border-subtle), the backdrop scrim + stacking
|
|
8
|
+
* read the --z-layer-scrim / --z-layer-modal foundation. The five popup
|
|
9
|
+
* variants (default/destructive/info/success/warning) tint the media chip via
|
|
10
|
+
* a local --alert-dialog-accent. No new global --a63-* tokens.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
.a63-AlertDialog-backdrop {
|
|
14
|
+
position: fixed;
|
|
15
|
+
inset: 0;
|
|
16
|
+
z-index: var(--z-layer-scrim, 500);
|
|
17
|
+
background-color: var(--a63-scrim);
|
|
18
|
+
backdrop-filter: blur(4px);
|
|
19
|
+
transition:
|
|
20
|
+
opacity var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
21
|
+
backdrop-filter var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
22
|
+
}
|
|
23
|
+
.a63-AlertDialog-backdrop[data-starting-style],
|
|
24
|
+
.a63-AlertDialog-backdrop[data-ending-style] {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.a63-AlertDialog-viewport {
|
|
29
|
+
position: fixed;
|
|
30
|
+
inset: 0;
|
|
31
|
+
z-index: var(--z-layer-modal, 600);
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-rows: 1fr auto 3fr;
|
|
34
|
+
justify-items: center;
|
|
35
|
+
block-size: var(--a63-viewport-height, 100vh);
|
|
36
|
+
max-block-size: var(--a63-viewport-height, 100vh);
|
|
37
|
+
padding-block: max(var(--a63-space-4), var(--a63-safe-area-top, 0px))
|
|
38
|
+
max(var(--a63-space-4), var(--a63-safe-area-bottom, 0px));
|
|
39
|
+
padding-inline: max(var(--a63-space-4), var(--a63-safe-area-left, 0px))
|
|
40
|
+
max(var(--a63-space-4), var(--a63-safe-area-right, 0px));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.a63-AlertDialog-popup {
|
|
44
|
+
--alert-dialog-accent: var(--a63-action-primary);
|
|
45
|
+
|
|
46
|
+
position: relative;
|
|
47
|
+
grid-row-start: 2;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
width: 100%;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
max-width: 32rem;
|
|
53
|
+
max-height: 100%;
|
|
54
|
+
min-height: 0;
|
|
55
|
+
transform-origin: center;
|
|
56
|
+
border: var(--a63-overlay-border-width) var(--a63-overlay-border-style) var(--a63-border-subtle);
|
|
57
|
+
border-radius: var(--a63-overlay-radius, var(--radius-2xl));
|
|
58
|
+
background-color: var(--a63-surface-overlay);
|
|
59
|
+
background-image: var(--a63-overlay-gloss), var(--a63-overlay-texture-image);
|
|
60
|
+
background-blend-mode: normal, var(--a63-overlay-texture-blend);
|
|
61
|
+
backdrop-filter: var(--a63-overlay-backdrop);
|
|
62
|
+
box-shadow: var(--a63-overlay-inner-shadow, none), var(--a63-overlay-shadow);
|
|
63
|
+
color: var(--a63-text-primary);
|
|
64
|
+
outline: none;
|
|
65
|
+
transition:
|
|
66
|
+
opacity var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
67
|
+
transform var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
68
|
+
}
|
|
69
|
+
.a63-AlertDialog-popup[data-size='sm'] {
|
|
70
|
+
max-width: 24rem;
|
|
71
|
+
}
|
|
72
|
+
.a63-AlertDialog-popup[data-starting-style],
|
|
73
|
+
.a63-AlertDialog-popup[data-ending-style] {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
transform: scale(0.98);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ── Per-variant accent (drives the media chip tint) ─────────────────────
|
|
79
|
+
default = brand action; destructive = danger; feedback variants map to the
|
|
80
|
+
canonical status tokens (NOT action-primary) so the media chip reads with the
|
|
81
|
+
correct semantic hue. */
|
|
82
|
+
.a63-AlertDialog-popup[data-variant='default'] {
|
|
83
|
+
--alert-dialog-accent: var(--a63-action-primary);
|
|
84
|
+
}
|
|
85
|
+
.a63-AlertDialog-popup[data-variant='destructive'] {
|
|
86
|
+
--alert-dialog-accent: var(--a63-action-danger);
|
|
87
|
+
}
|
|
88
|
+
.a63-AlertDialog-popup[data-variant='info'] {
|
|
89
|
+
--alert-dialog-accent: var(--a63-status-info);
|
|
90
|
+
}
|
|
91
|
+
.a63-AlertDialog-popup[data-variant='success'] {
|
|
92
|
+
--alert-dialog-accent: var(--a63-status-success);
|
|
93
|
+
}
|
|
94
|
+
.a63-AlertDialog-popup[data-variant='warning'] {
|
|
95
|
+
--alert-dialog-accent: var(--a63-status-warning);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ── Mobile: stick the sheet to the bottom edge ────────────────────────── */
|
|
99
|
+
@media (max-width: 639px) {
|
|
100
|
+
.a63-AlertDialog-viewport[data-stick-bottom] {
|
|
101
|
+
grid-template-rows: 1fr auto;
|
|
102
|
+
padding: max(3rem, var(--a63-safe-area-top, 0px)) 0 0;
|
|
103
|
+
}
|
|
104
|
+
.a63-AlertDialog-popup[data-stick-bottom] {
|
|
105
|
+
max-width: none;
|
|
106
|
+
transform-origin: bottom;
|
|
107
|
+
border-inline-width: 0;
|
|
108
|
+
border-block-end-width: 0;
|
|
109
|
+
border-radius: 0;
|
|
110
|
+
padding-bottom: var(--a63-safe-area-bottom, 0px);
|
|
111
|
+
}
|
|
112
|
+
.a63-AlertDialog-popup[data-stick-bottom][data-starting-style],
|
|
113
|
+
.a63-AlertDialog-popup[data-stick-bottom][data-ending-style] {
|
|
114
|
+
transform: translateY(1rem);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ── Header / footer / media / title / description ─────────────────────── */
|
|
119
|
+
.a63-AlertDialog-header {
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
gap: var(--a63-space-2);
|
|
123
|
+
padding: var(--a63-space-5);
|
|
124
|
+
text-align: center;
|
|
125
|
+
}
|
|
126
|
+
@media (max-width: 639px) {
|
|
127
|
+
.a63-AlertDialog-header {
|
|
128
|
+
padding-bottom: var(--a63-space-4);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
@media (min-width: 640px) {
|
|
132
|
+
.a63-AlertDialog-header {
|
|
133
|
+
text-align: left;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.a63-AlertDialog-footer {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column-reverse;
|
|
140
|
+
gap: var(--a63-space-2);
|
|
141
|
+
padding-inline: var(--a63-space-5);
|
|
142
|
+
}
|
|
143
|
+
.a63-AlertDialog-footer[data-variant='default'] {
|
|
144
|
+
padding-block: var(--a63-space-3);
|
|
145
|
+
border-top: var(--a63-control-border-width) solid var(--a63-border-subtle);
|
|
146
|
+
background: color-mix(in oklch, var(--a63-surface-muted) 72%, transparent);
|
|
147
|
+
}
|
|
148
|
+
.a63-AlertDialog-footer[data-variant='bare'] {
|
|
149
|
+
padding-bottom: var(--a63-space-5);
|
|
150
|
+
}
|
|
151
|
+
@media (max-width: 639px) {
|
|
152
|
+
.a63-AlertDialog-footer > [data-slot] {
|
|
153
|
+
width: 100%;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
@media (min-width: 640px) {
|
|
157
|
+
.a63-AlertDialog-footer {
|
|
158
|
+
flex-direction: row;
|
|
159
|
+
justify-content: flex-end;
|
|
160
|
+
border-end-start-radius: calc(var(--radius-2xl) - 1px);
|
|
161
|
+
border-end-end-radius: calc(var(--radius-2xl) - 1px);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.a63-AlertDialog-media {
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
width: 2.5rem;
|
|
170
|
+
height: 2.5rem;
|
|
171
|
+
margin: 0 auto var(--a63-space-2);
|
|
172
|
+
border-radius: var(--a63-radius-control);
|
|
173
|
+
border: var(--a63-control-border-width) solid
|
|
174
|
+
color-mix(in oklch, var(--alert-dialog-accent) 32%, transparent);
|
|
175
|
+
background: color-mix(in oklch, var(--alert-dialog-accent) 8%, transparent);
|
|
176
|
+
color: var(--alert-dialog-accent);
|
|
177
|
+
}
|
|
178
|
+
.a63-AlertDialog-media svg {
|
|
179
|
+
width: 1.5rem;
|
|
180
|
+
height: 1.5rem;
|
|
181
|
+
}
|
|
182
|
+
@media (min-width: 640px) {
|
|
183
|
+
.a63-AlertDialog-media {
|
|
184
|
+
margin-inline: 0;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.a63-AlertDialog-title {
|
|
189
|
+
font-weight: 600;
|
|
190
|
+
font-size: var(--typography-xl-font-size);
|
|
191
|
+
line-height: 1;
|
|
192
|
+
color: var(--a63-text-primary);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.a63-AlertDialog-description {
|
|
196
|
+
font-size: var(--typography-sm-font-size);
|
|
197
|
+
color: var(--a63-text-secondary);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (prefers-reduced-motion: reduce) {
|
|
201
|
+
.a63-AlertDialog-backdrop,
|
|
202
|
+
.a63-AlertDialog-popup {
|
|
203
|
+
transition: none;
|
|
204
|
+
}
|
|
205
|
+
}
|