@ghostvue/themes 0.1.0 → 0.2.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/dist/calm.css +24 -14
- package/dist/components.d.ts +7 -2
- package/dist/components.js +6 -1
- package/dist/default.css +1006 -752
- package/dist/define.js +21 -3
- package/dist/generated/tokens.d.ts +11 -0
- package/dist/generated/tokens.js +11 -0
- package/dist/ghost-checkbox-group.d.ts +50 -0
- package/dist/ghost-checkbox-group.js +56 -0
- package/dist/ghost-field.d.ts +12 -3
- package/dist/ghost-field.js +6 -1
- package/dist/ghost-select.d.ts +52 -113
- package/dist/ghost-select.js +45 -68
- package/dist/ghost-submenu-content.d.ts +22 -0
- package/dist/ghost-submenu-content.js +17 -0
- package/dist/ghost-submenu-trigger.d.ts +11 -0
- package/dist/ghost-submenu-trigger.js +11 -0
- package/dist/ghost-submenu.d.ts +1 -0
- package/dist/ghost-submenu.js +1 -0
- package/dist/ghost-tags-input.d.ts +75 -0
- package/dist/ghost-tags-input.js +54 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -1
- package/dist/manifest.json +471 -11
- package/dist/mono.css +24 -14
- package/dist/recipes/checkbox-group.css +30 -0
- package/dist/recipes/command-palette.css +52 -0
- package/dist/recipes/context-menu.css +95 -184
- package/dist/recipes/data-table.css +151 -144
- package/dist/recipes/dialog.css +68 -10
- package/dist/recipes/drawer.css +109 -11
- package/dist/recipes/dropdown-menu.css +95 -189
- package/dist/recipes/hover-card.css +19 -0
- package/dist/recipes/menubar.css +110 -191
- package/dist/recipes/popover.css +19 -0
- package/dist/recipes/progress.css +7 -2
- package/dist/recipes/scroll-area.css +43 -2
- package/dist/recipes/segmented-control.css +62 -3
- package/dist/recipes/tags-input.css +120 -0
- package/dist/tokens/semantic.json +5 -0
- package/dist/tokens.css +24 -14
- package/dist/tokens.json +15 -0
- package/dist/vibrant.css +24 -14
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/* Direct children keep nested tables out of the outer table's recipe.
|
|
1
|
+
/* Direct children keep nested tables out of the outer table's recipe.
|
|
2
|
+
Keep the nesting selector outside :where() so build tools can lower it. */
|
|
2
3
|
@layer ghostvue-theme {
|
|
3
4
|
:where(.ghost-data-table[data-themed], .ghost-theme .ghost-data-table) {
|
|
4
5
|
display: grid;
|
|
@@ -37,11 +38,12 @@
|
|
|
37
38
|
--_ghost-data-table-hover: var(--ghost-surface-subtle-bg);
|
|
38
39
|
--_ghost-data-table-selection-hover: var(--ghost-state-layer-hover);
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
&
|
|
42
|
+
> :where(
|
|
43
|
+
.ghost-data-table-header,
|
|
44
|
+
.ghost-data-table-bulk-actions,
|
|
45
|
+
.ghost-data-table-footer
|
|
46
|
+
) {
|
|
45
47
|
display: flex;
|
|
46
48
|
flex-wrap: wrap;
|
|
47
49
|
align-items: center;
|
|
@@ -49,36 +51,38 @@
|
|
|
49
51
|
min-inline-size: 0;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
&
|
|
55
|
+
> :where(.ghost-data-table-header)
|
|
56
|
+
> :where([data-part='search'])
|
|
57
|
+
> :where(label) {
|
|
53
58
|
display: grid;
|
|
54
59
|
gap: var(--ghost-space-gap-xs);
|
|
55
60
|
color: var(--ghost-surface-fg);
|
|
56
61
|
font-size: var(--ghost-type-size-sm);
|
|
57
62
|
}
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
& > :where(.ghost-data-table-header) > :where([data-part='toolbar-end']) {
|
|
60
65
|
margin-inline-start: auto;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
|
|
68
|
+
& > :where(.ghost-data-table-bulk-actions) {
|
|
64
69
|
background: var(--ghost-surface-muted-bg);
|
|
65
70
|
color: var(--ghost-surface-fg);
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
/* The themed GhostTable adds one scope wrapper around its table or scroll region. */
|
|
69
|
-
:where(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
& > :where(.ghost-table[data-ghost-data-table]),
|
|
75
|
+
&
|
|
76
|
+
> :where(.ghost-table-scroll-container, .ghost-themed-scope)
|
|
77
|
+
> :where(.ghost-table[data-ghost-data-table]),
|
|
78
|
+
&
|
|
79
|
+
> :where(.ghost-themed-scope)
|
|
80
|
+
> :where(.ghost-table-scroll-container)
|
|
81
|
+
> :where(.ghost-table[data-ghost-data-table]) {
|
|
74
82
|
&
|
|
75
|
-
> .ghost-
|
|
76
|
-
> .ghost-table-
|
|
77
|
-
> .ghost-table
|
|
78
|
-
) {
|
|
79
|
-
:where(
|
|
80
|
-
& > .ghost-table-head > .ghost-table-row > .ghost-table-header-cell
|
|
81
|
-
) {
|
|
83
|
+
> :where(.ghost-table-head)
|
|
84
|
+
> :where(.ghost-table-row)
|
|
85
|
+
> :where(.ghost-table-header-cell) {
|
|
82
86
|
position: var(--_ghost-data-table-header-position);
|
|
83
87
|
inset-block-start: 0;
|
|
84
88
|
z-index: 1;
|
|
@@ -87,7 +91,7 @@
|
|
|
87
91
|
padding-block: var(--_ghost-data-table-block);
|
|
88
92
|
padding-inline: var(--_ghost-data-table-inline);
|
|
89
93
|
|
|
90
|
-
|
|
94
|
+
& > :where(button) {
|
|
91
95
|
appearance: none;
|
|
92
96
|
display: inline-flex;
|
|
93
97
|
gap: var(--ghost-space-gap-xs);
|
|
@@ -104,7 +108,7 @@
|
|
|
104
108
|
text-align: start;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
& > :where(button:hover:not(:disabled)) {
|
|
108
112
|
background: color-mix(
|
|
109
113
|
in oklch,
|
|
110
114
|
var(--ghost-surface-fg) calc(100% * var(--ghost-state-layer-hover)),
|
|
@@ -112,23 +116,23 @@
|
|
|
112
116
|
);
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
|
|
119
|
+
& > :where(button:focus-visible) {
|
|
116
120
|
outline: var(--ghost-focus-ring-width) solid
|
|
117
121
|
var(--ghost-focus-ring-color);
|
|
118
122
|
outline-offset: calc(-1 * var(--ghost-focus-ring-width));
|
|
119
123
|
}
|
|
120
124
|
|
|
121
|
-
|
|
125
|
+
& > :where(button:disabled) {
|
|
122
126
|
color: var(--ghost-action-disabled-fg);
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
/* A CSS-painted mark adds no text and yields to consumer artwork. */
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
&
|
|
131
|
+
> :where(
|
|
132
|
+
button[data-part='sort-button']:not(
|
|
133
|
+
:has(> [data-part='sort-indicator'])
|
|
134
|
+
)
|
|
135
|
+
)::after {
|
|
132
136
|
content: '';
|
|
133
137
|
flex: none;
|
|
134
138
|
inline-size: var(--ghost-action-icon-size);
|
|
@@ -157,17 +161,17 @@
|
|
|
157
161
|
);
|
|
158
162
|
}
|
|
159
163
|
|
|
160
|
-
|
|
164
|
+
&:where(:not([data-sort])) > :where(button:is(:hover, :focus-visible)) {
|
|
161
165
|
--_ghost-data-table-mark: var(--ghost-text-muted);
|
|
162
166
|
}
|
|
163
167
|
|
|
164
|
-
|
|
168
|
+
&:where([data-sort]) {
|
|
165
169
|
--_ghost-data-table-mark: var(--ghost-text-primary);
|
|
166
170
|
color: var(--ghost-surface-fg);
|
|
167
171
|
border-block-end-color: var(--ghost-border-strong);
|
|
168
172
|
}
|
|
169
173
|
|
|
170
|
-
|
|
174
|
+
&:where([data-sort='asc']) {
|
|
171
175
|
--_ghost-data-table-chevron: polygon(
|
|
172
176
|
50% 22%,
|
|
173
177
|
88% 61%,
|
|
@@ -178,7 +182,7 @@
|
|
|
178
182
|
);
|
|
179
183
|
}
|
|
180
184
|
|
|
181
|
-
|
|
185
|
+
&:where([data-sort='desc']) {
|
|
182
186
|
--_ghost-data-table-chevron: polygon(
|
|
183
187
|
50% 78%,
|
|
184
188
|
12% 39%,
|
|
@@ -191,68 +195,59 @@
|
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
/* A static header cue leaves body contrast and row geometry intact. */
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
> .ghost-table-header-cell
|
|
199
|
-
) {
|
|
198
|
+
&:where([aria-busy='true'])
|
|
199
|
+
> :where(.ghost-table-head)
|
|
200
|
+
> :where(.ghost-table-row)
|
|
201
|
+
> :where(.ghost-table-header-cell) {
|
|
200
202
|
border-block-end-color: var(--ghost-border-primary);
|
|
201
203
|
box-shadow: inset 0 calc(-1 * var(--ghost-border-hairline-width))
|
|
202
204
|
var(--ghost-border-primary);
|
|
203
205
|
}
|
|
204
206
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
> :is(.ghost-table-cell, .ghost-table-header-cell)
|
|
210
|
-
) {
|
|
207
|
+
&
|
|
208
|
+
> :where(.ghost-table-body)
|
|
209
|
+
> :where(.ghost-table-row)
|
|
210
|
+
> :where(.ghost-table-cell, .ghost-table-header-cell) {
|
|
211
211
|
padding-block: var(--_ghost-data-table-block);
|
|
212
212
|
padding-inline: var(--_ghost-data-table-inline);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
):hover
|
|
222
|
-
> :is(.ghost-table-cell, .ghost-table-header-cell)
|
|
223
|
-
) {
|
|
215
|
+
&
|
|
216
|
+
> :where(.ghost-table-body)
|
|
217
|
+
> :where(
|
|
218
|
+
.ghost-table-row:not([data-selected='true'], [data-detail-row]):hover
|
|
219
|
+
)
|
|
220
|
+
> :where(.ghost-table-cell, .ghost-table-header-cell) {
|
|
224
221
|
background: var(--_ghost-data-table-hover);
|
|
225
222
|
}
|
|
226
223
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
> .ghost-table-cell
|
|
232
|
-
) {
|
|
224
|
+
&
|
|
225
|
+
> :where(.ghost-table-body)
|
|
226
|
+
> :where(.ghost-table-row[data-detail-row='true'])
|
|
227
|
+
> :where(.ghost-table-cell) {
|
|
233
228
|
background: var(--ghost-surface-subtle-bg);
|
|
234
229
|
}
|
|
235
230
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
> :is(.ghost-table-cell, .ghost-table-header-cell):first-child
|
|
241
|
-
) {
|
|
231
|
+
&
|
|
232
|
+
> :where(.ghost-table-body)
|
|
233
|
+
> :where(.ghost-table-row)
|
|
234
|
+
> :where(:is(.ghost-table-cell, .ghost-table-header-cell):first-child) {
|
|
242
235
|
border-inline-start: var(--ghost-focus-ring-width) solid transparent;
|
|
243
236
|
}
|
|
244
237
|
|
|
245
|
-
|
|
238
|
+
&
|
|
239
|
+
> :where(.ghost-table-body)
|
|
240
|
+
> :where(.ghost-table-row[data-selected='true']) {
|
|
246
241
|
--_ghost-data-table-wash: var(--ghost-state-mix-soft);
|
|
247
242
|
|
|
248
|
-
|
|
243
|
+
&:where(:hover) {
|
|
249
244
|
--_ghost-data-table-wash: calc(
|
|
250
245
|
var(--ghost-state-mix-soft) +
|
|
251
246
|
var(--_ghost-data-table-selection-hover)
|
|
252
247
|
);
|
|
253
248
|
}
|
|
254
249
|
|
|
255
|
-
|
|
250
|
+
& > :where(.ghost-table-cell, .ghost-table-header-cell) {
|
|
256
251
|
background: color-mix(
|
|
257
252
|
in oklch,
|
|
258
253
|
var(--ghost-action-primary-bg)
|
|
@@ -262,27 +257,26 @@
|
|
|
262
257
|
color: var(--ghost-surface-fg);
|
|
263
258
|
}
|
|
264
259
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
&
|
|
261
|
+
> :where(
|
|
262
|
+
:is(.ghost-table-cell, .ghost-table-header-cell):first-child
|
|
263
|
+
) {
|
|
268
264
|
border-inline-start-color: var(--ghost-border-primary);
|
|
269
265
|
}
|
|
270
266
|
|
|
271
267
|
@media (forced-colors: active) {
|
|
272
|
-
|
|
268
|
+
& > :where(.ghost-table-cell, .ghost-table-header-cell) {
|
|
273
269
|
forced-color-adjust: none;
|
|
274
270
|
background: SelectedItem;
|
|
275
271
|
color: SelectedItemText;
|
|
276
272
|
border-block-end-color: CanvasText;
|
|
277
273
|
|
|
278
|
-
:where(
|
|
279
|
-
& :is(button, input, select, textarea, a[href], [tabindex])
|
|
280
|
-
) {
|
|
274
|
+
& :where(button, input, select, textarea, a[href], [tabindex]) {
|
|
281
275
|
forced-color-adjust: auto;
|
|
282
276
|
}
|
|
283
277
|
|
|
284
|
-
|
|
285
|
-
|
|
278
|
+
&
|
|
279
|
+
:where(
|
|
286
280
|
:is(
|
|
287
281
|
button,
|
|
288
282
|
input,
|
|
@@ -291,7 +285,7 @@
|
|
|
291
285
|
a[href],
|
|
292
286
|
[tabindex]
|
|
293
287
|
):focus-visible
|
|
294
|
-
|
|
288
|
+
) {
|
|
295
289
|
outline: var(--ghost-focus-ring-width) solid SelectedItemText;
|
|
296
290
|
outline-offset: var(--ghost-border-hairline-width);
|
|
297
291
|
}
|
|
@@ -299,85 +293,95 @@
|
|
|
299
293
|
}
|
|
300
294
|
}
|
|
301
295
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
296
|
+
&
|
|
297
|
+
> :where(.ghost-table-body)
|
|
298
|
+
> :where(.ghost-table-row)
|
|
299
|
+
> :where(.ghost-table-cell)
|
|
300
|
+
> :where([data-part='expand-button']) {
|
|
301
|
+
appearance: none;
|
|
302
|
+
display: inline-grid;
|
|
303
|
+
place-items: center;
|
|
309
304
|
min-block-size: var(--ghost-control-size-sm-min);
|
|
310
305
|
min-inline-size: var(--ghost-control-size-sm-min);
|
|
306
|
+
padding: 0;
|
|
307
|
+
border: var(--ghost-border-hairline-width) solid
|
|
308
|
+
var(--ghost-border-default);
|
|
309
|
+
border-radius: var(--ghost-radius-sm);
|
|
310
|
+
background: var(--ghost-surface-bg);
|
|
311
|
+
color: var(--ghost-surface-fg);
|
|
312
|
+
font: inherit;
|
|
313
|
+
|
|
314
|
+
&:where(:hover:not(:disabled), [aria-expanded='true']) {
|
|
315
|
+
background: var(--ghost-surface-muted-bg);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
&:where(:focus-visible) {
|
|
319
|
+
outline: var(--ghost-focus-ring-width) solid
|
|
320
|
+
var(--ghost-focus-ring-color);
|
|
321
|
+
outline-offset: calc(-1 * var(--ghost-focus-ring-width));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&:where(:disabled) {
|
|
325
|
+
color: var(--ghost-action-disabled-fg);
|
|
326
|
+
}
|
|
311
327
|
}
|
|
312
328
|
|
|
313
329
|
@media (pointer: coarse) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
> :is([data-part='expand-button'], input[type='checkbox'])
|
|
325
|
-
) {
|
|
330
|
+
&
|
|
331
|
+
> :where(.ghost-table-head)
|
|
332
|
+
> :where(.ghost-table-row)
|
|
333
|
+
> :where(.ghost-table-header-cell)
|
|
334
|
+
> :where(button, input[type='checkbox']),
|
|
335
|
+
&
|
|
336
|
+
> :where(.ghost-table-body)
|
|
337
|
+
> :where(.ghost-table-row)
|
|
338
|
+
> :where(.ghost-table-cell)
|
|
339
|
+
> :where([data-part='expand-button'], input[type='checkbox']) {
|
|
326
340
|
min-block-size: var(--ghost-control-touch-min);
|
|
327
341
|
min-inline-size: var(--ghost-control-touch-min);
|
|
328
342
|
}
|
|
329
343
|
}
|
|
330
344
|
|
|
331
345
|
@media (forced-colors: active) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
> button
|
|
338
|
-
) {
|
|
346
|
+
&
|
|
347
|
+
> :where(.ghost-table-head)
|
|
348
|
+
> :where(.ghost-table-row)
|
|
349
|
+
> :where(.ghost-table-header-cell)
|
|
350
|
+
> :where(button) {
|
|
339
351
|
background: ButtonFace;
|
|
340
352
|
color: ButtonText;
|
|
341
353
|
--_ghost-data-table-mark: ButtonText;
|
|
342
354
|
}
|
|
343
355
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
> button:disabled
|
|
350
|
-
) {
|
|
356
|
+
&
|
|
357
|
+
> :where(.ghost-table-head)
|
|
358
|
+
> :where(.ghost-table-row)
|
|
359
|
+
> :where(.ghost-table-header-cell)
|
|
360
|
+
> :where(button:disabled) {
|
|
351
361
|
color: GrayText;
|
|
352
362
|
--_ghost-data-table-mark: GrayText;
|
|
353
363
|
}
|
|
354
364
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
> button:focus-visible
|
|
361
|
-
) {
|
|
365
|
+
&
|
|
366
|
+
> :where(.ghost-table-head)
|
|
367
|
+
> :where(.ghost-table-row)
|
|
368
|
+
> :where(.ghost-table-header-cell)
|
|
369
|
+
> :where(button:focus-visible) {
|
|
362
370
|
outline-color: Highlight;
|
|
363
371
|
}
|
|
364
372
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
> button[data-part='sort-button']
|
|
371
|
-
)::after {
|
|
373
|
+
&
|
|
374
|
+
> :where(.ghost-table-head)
|
|
375
|
+
> :where(.ghost-table-row)
|
|
376
|
+
> :where(.ghost-table-header-cell)
|
|
377
|
+
> :where(button[data-part='sort-button'])::after {
|
|
372
378
|
forced-color-adjust: none;
|
|
373
379
|
}
|
|
374
380
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
> .ghost-table-header-cell
|
|
380
|
-
) {
|
|
381
|
+
&:where([aria-busy='true'])
|
|
382
|
+
> :where(.ghost-table-head)
|
|
383
|
+
> :where(.ghost-table-row)
|
|
384
|
+
> :where(.ghost-table-header-cell) {
|
|
381
385
|
border-block-end-color: Highlight;
|
|
382
386
|
}
|
|
383
387
|
}
|
|
@@ -389,21 +393,22 @@
|
|
|
389
393
|
.ghost-data-table[data-themed][data-variant='card']
|
|
390
394
|
> .ghost-data-table-preset[data-themed]
|
|
391
395
|
) {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
396
|
+
&
|
|
397
|
+
> :where(
|
|
398
|
+
.ghost-data-table-header,
|
|
399
|
+
.ghost-data-table-bulk-actions,
|
|
400
|
+
.ghost-data-table-footer
|
|
401
|
+
) {
|
|
397
402
|
padding-block: var(--ghost-space-inset-sm);
|
|
398
403
|
padding-inline: var(--ghost-space-inset-md);
|
|
399
404
|
}
|
|
400
405
|
|
|
401
|
-
|
|
406
|
+
& > :where(.ghost-data-table-header, .ghost-data-table-bulk-actions) {
|
|
402
407
|
border-block-end: var(--ghost-border-hairline-width) solid
|
|
403
408
|
var(--ghost-border-default);
|
|
404
409
|
}
|
|
405
410
|
|
|
406
|
-
|
|
411
|
+
& > :where(.ghost-data-table-footer) {
|
|
407
412
|
border-block-start: var(--ghost-border-hairline-width) solid
|
|
408
413
|
var(--ghost-border-default);
|
|
409
414
|
}
|
|
@@ -417,9 +422,11 @@
|
|
|
417
422
|
--_ghost-data-table-block: var(--ghost-space-inset-xs);
|
|
418
423
|
--_ghost-data-table-inline: var(--ghost-space-inset-sm);
|
|
419
424
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
425
|
+
&
|
|
426
|
+
> :where(.ghost-data-table-header)
|
|
427
|
+
> :where([data-part='search'])
|
|
428
|
+
> :where(label)
|
|
429
|
+
> :where(.ghost-input) {
|
|
423
430
|
--_ghost-input-min-size: var(--ghost-control-size-sm-min);
|
|
424
431
|
--_ghost-input-padding-block: var(--ghost-control-size-sm-padding-block);
|
|
425
432
|
--_ghost-input-padding-inline: var(
|
package/dist/recipes/dialog.css
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Themed GhostDialog overlay and surface. Visual values come from semantic
|
|
3
|
-
* --ghost-* tokens with no component-specific tokens
|
|
3
|
+
* --ghost-* tokens with no component-specific tokens.
|
|
4
|
+
*
|
|
5
|
+
* Geometry and forced-colors paint match the part classes without
|
|
6
|
+
* [data-state='open'], so the exiting surface (data-state="closed", kept
|
|
7
|
+
* mounted by useGhostPresence) never loses position, centering, or system
|
|
8
|
+
* colors mid-fade. Exits run faster than entries (motion.md).
|
|
4
9
|
*/
|
|
5
10
|
@layer ghostvue-theme {
|
|
6
11
|
:where(
|
|
7
|
-
.ghost-theme .ghost-dialog-overlay
|
|
8
|
-
.ghost-themed-scope .ghost-dialog-overlay
|
|
9
|
-
.ghost-dialog-overlay[data-themed]
|
|
12
|
+
.ghost-theme .ghost-dialog-overlay,
|
|
13
|
+
.ghost-themed-scope .ghost-dialog-overlay,
|
|
14
|
+
.ghost-dialog-overlay[data-themed]
|
|
10
15
|
) {
|
|
11
16
|
background-color: var(--ghost-scrim);
|
|
12
17
|
inset: 0;
|
|
@@ -15,9 +20,9 @@
|
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
:where(
|
|
18
|
-
.ghost-theme .ghost-dialog-content
|
|
19
|
-
.ghost-themed-scope .ghost-dialog-content
|
|
20
|
-
.ghost-dialog-content[data-themed]
|
|
23
|
+
.ghost-theme .ghost-dialog-content,
|
|
24
|
+
.ghost-themed-scope .ghost-dialog-content,
|
|
25
|
+
.ghost-dialog-content[data-themed]
|
|
21
26
|
) {
|
|
22
27
|
background-color: var(--ghost-elevation-4-bg);
|
|
23
28
|
border: var(--ghost-border-hairline-width) solid
|
|
@@ -117,11 +122,64 @@
|
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
|
|
125
|
+
/* Exit: reduced motion keeps only a short opacity fade (no travel). */
|
|
126
|
+
:where(
|
|
127
|
+
.ghost-theme .ghost-dialog-content[data-state='closed'],
|
|
128
|
+
.ghost-themed-scope .ghost-dialog-content[data-state='closed'],
|
|
129
|
+
.ghost-dialog-content[data-themed][data-state='closed']
|
|
130
|
+
) {
|
|
131
|
+
opacity: 0;
|
|
132
|
+
transition: opacity var(--ghost-motion-fade-duration)
|
|
133
|
+
var(--ghost-motion-easing-standard);
|
|
134
|
+
|
|
135
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
136
|
+
transition:
|
|
137
|
+
opacity var(--ghost-motion-exit-duration)
|
|
138
|
+
var(--ghost-motion-exit-easing),
|
|
139
|
+
translate var(--ghost-motion-exit-duration)
|
|
140
|
+
var(--ghost-motion-exit-easing);
|
|
141
|
+
translate: 0 calc(var(--ghost-motion-translate) / 2);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:where(
|
|
146
|
+
.ghost-theme .ghost-dialog-overlay[data-state='open'],
|
|
147
|
+
.ghost-themed-scope .ghost-dialog-overlay[data-state='open'],
|
|
148
|
+
.ghost-dialog-overlay[data-themed][data-state='open']
|
|
149
|
+
) {
|
|
150
|
+
transition: opacity var(--ghost-motion-fade-duration)
|
|
151
|
+
var(--ghost-motion-easing-standard);
|
|
152
|
+
|
|
153
|
+
@starting-style {
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
158
|
+
transition: opacity var(--ghost-motion-duration-fast)
|
|
159
|
+
var(--ghost-motion-enter-easing);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:where(
|
|
164
|
+
.ghost-theme .ghost-dialog-overlay[data-state='closed'],
|
|
165
|
+
.ghost-themed-scope .ghost-dialog-overlay[data-state='closed'],
|
|
166
|
+
.ghost-dialog-overlay[data-themed][data-state='closed']
|
|
167
|
+
) {
|
|
168
|
+
opacity: 0;
|
|
169
|
+
transition: opacity var(--ghost-motion-fade-duration)
|
|
170
|
+
var(--ghost-motion-easing-standard);
|
|
171
|
+
|
|
172
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
173
|
+
transition: opacity var(--ghost-motion-exit-duration)
|
|
174
|
+
var(--ghost-motion-exit-easing);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
120
178
|
@media (forced-colors: active) {
|
|
121
179
|
:where(
|
|
122
|
-
.ghost-theme .ghost-dialog-content
|
|
123
|
-
.ghost-themed-scope .ghost-dialog-content
|
|
124
|
-
.ghost-dialog-content[data-themed]
|
|
180
|
+
.ghost-theme .ghost-dialog-content,
|
|
181
|
+
.ghost-themed-scope .ghost-dialog-content,
|
|
182
|
+
.ghost-dialog-content[data-themed]
|
|
125
183
|
) {
|
|
126
184
|
background-color: Canvas;
|
|
127
185
|
border-color: CanvasText;
|