@getaster/elements 0.3.0 → 0.4.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/NOTICE +4 -0
- package/README.md +13 -4
- package/bin/aster-theme-check.js +35 -4
- package/dist/base/element.d.ts +8 -1
- package/dist/base/element.js +7 -2
- package/dist/button/button.d.ts +17 -2
- package/dist/button/button.js +42 -8
- package/dist/composition/builtins.d.ts +623 -1
- package/dist/composition/builtins.js +232 -4
- package/dist/date/calendar.d.ts +3 -0
- package/dist/date/calendar.js +8 -2
- package/dist/date/date-field.d.ts +23 -3
- package/dist/date/date-field.js +77 -9
- package/dist/date/dates.d.ts +10 -2
- package/dist/date/dates.js +23 -3
- package/dist/dialog/config.d.ts +4 -0
- package/dist/dialog/config.js +8 -0
- package/dist/dialog/dialog.d.ts +34 -6
- package/dist/dialog/dialog.js +151 -14
- package/dist/field/bound-field.d.ts +17 -1
- package/dist/field/bound-field.js +68 -7
- package/dist/field/check.js +1 -0
- package/dist/field/field.js +1 -1
- package/dist/field/input.d.ts +1 -0
- package/dist/field/input.js +2 -2
- package/dist/field/number-field.js +2 -2
- package/dist/filter/filter-builder.d.ts +7 -1
- package/dist/filter/filter-builder.js +8 -1
- package/dist/form/controls.d.ts +40 -8
- package/dist/form/controls.js +58 -15
- package/dist/form/custom-field.d.ts +1 -0
- package/dist/form/custom-field.js +23 -0
- package/dist/form/features.d.ts +27 -0
- package/dist/form/features.js +52 -0
- package/dist/form/form.d.ts +67 -7
- package/dist/form/form.js +267 -24
- package/dist/form/policy.d.ts +29 -0
- package/dist/form/policy.js +16 -0
- package/dist/grid/appearance.d.ts +365 -0
- package/dist/grid/appearance.js +814 -0
- package/dist/grid/features.d.ts +38 -0
- package/dist/grid/features.js +78 -0
- package/dist/grid/grid.d.ts +216 -4
- package/dist/grid/grid.js +1853 -301
- package/dist/grid/policy.d.ts +58 -0
- package/dist/grid/policy.js +17 -0
- package/dist/grid/view.d.ts +32 -2
- package/dist/grid/view.js +89 -4
- package/dist/index.d.ts +14 -11
- package/dist/index.js +2 -1
- package/dist/menu/config.d.ts +7 -0
- package/dist/menu/config.js +44 -0
- package/dist/menu/menu.d.ts +23 -0
- package/dist/menu/menu.js +69 -17
- package/dist/picker/picker.js +8 -3
- package/dist/section/accordion.d.ts +26 -0
- package/dist/section/accordion.js +86 -8
- package/dist/section/policy.d.ts +8 -0
- package/dist/section/policy.js +17 -0
- package/dist/section/section.d.ts +30 -0
- package/dist/section/section.js +106 -3
- package/dist/select/choice-element.d.ts +12 -0
- package/dist/select/choice-element.js +36 -0
- package/dist/select/choice.d.ts +12 -2
- package/dist/select/choice.js +93 -28
- package/dist/select/select.d.ts +12 -0
- package/dist/select/select.js +37 -1
- package/dist/styles/contract.d.ts +14 -0
- package/dist/styles/contract.js +15 -0
- package/dist/switch/switch.d.ts +16 -0
- package/dist/switch/switch.js +56 -6
- package/dist/tree/navigator.d.ts +3 -0
- package/dist/tree/navigator.js +26 -2
- package/dist/window/chrome.d.ts +5 -1
- package/dist/window/chrome.js +4 -3
- package/dist/window/config.d.ts +71 -0
- package/dist/window/config.js +40 -0
- package/dist/window/window.d.ts +51 -13
- package/dist/window/window.js +233 -38
- package/dist/yaml.d.ts +19 -0
- package/dist/yaml.js +57 -0
- package/package.json +10 -4
- package/styles/aster-ui.css +233 -10
- package/styles/base.css +36 -0
- package/styles/contract.ts +16 -0
- package/styles/elements.css +197 -10
- package/styles/fonts/OFL-bricolage-grotesque.txt +93 -0
- package/styles/fonts/OFL-fraunces.txt +93 -0
- package/styles/fonts/bricolage-grotesque-latin-opsz-normal.woff2 +0 -0
- package/styles/fonts/fraunces-latin-full-normal.woff2 +0 -0
- package/styles/fonts.css +17 -0
- package/styles/theme-harbour.css +5 -0
- package/styles/theme-lamplight.css +5 -0
package/styles/aster-ui.css
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
@media (pointer: coarse) {
|
|
12
12
|
:root:not([data-density]) { --aster-ctl: 38px; --aster-ctl-tight: 32px; --aster-pad-y: 12px; --aster-row-y: 9px; --aster-pad: 16px; --aster-gap: 18px; }
|
|
13
13
|
}
|
|
14
|
+
/* Component geometry intents: defaults an identity or an app may override.
|
|
15
|
+
`auto` follows the content; lengths are floors a placement may raise. */
|
|
16
|
+
:root {
|
|
17
|
+
--aster-form-label-width: 9rem;
|
|
18
|
+
--aster-grid-header-height: calc(var(--aster-pad-y) * 2 + 16.8px);
|
|
19
|
+
--aster-grid-toolbar-height: auto;
|
|
20
|
+
--aster-grid-row-min-height: auto;
|
|
21
|
+
--aster-grid-tree-indent: 18px;
|
|
22
|
+
--aster-grid-summary-height: auto;
|
|
23
|
+
--aster-menu-cell-height: auto;
|
|
24
|
+
--aster-menu-icon-size: 14px;
|
|
25
|
+
--aster-window-header-height: calc(var(--aster-ctl) + var(--aster-pad) - 1px);
|
|
26
|
+
--aster-dialog-max-width: 100%;
|
|
27
|
+
}
|
|
14
28
|
|
|
15
29
|
*, *::before, *::after { box-sizing: border-box; }
|
|
16
30
|
html, body { margin: 0; height: 100%; }
|
|
@@ -36,6 +50,27 @@
|
|
|
36
50
|
button, input, select, textarea { font: inherit; color: inherit; }
|
|
37
51
|
/* Native controls inherit ink, so their surfaces must follow the same theme. */
|
|
38
52
|
select, option, optgroup { background-color: var(--aster-sunk); }
|
|
53
|
+
select {
|
|
54
|
+
min-height: var(--aster-ctl); max-width: 100%; padding: 0 10px;
|
|
55
|
+
border: 1px solid var(--aster-rule); border-radius: var(--aster-r-ctl);
|
|
56
|
+
box-shadow: var(--aster-well);
|
|
57
|
+
}
|
|
58
|
+
select:not([multiple]):not([size]) {
|
|
59
|
+
appearance: none; padding-inline-end: 28px;
|
|
60
|
+
background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
61
|
+
background-position: right 14px center, right 10px center;
|
|
62
|
+
background-size: 4px 4px; background-repeat: no-repeat;
|
|
63
|
+
}
|
|
64
|
+
select:not([multiple]):not([size]):dir(rtl) {
|
|
65
|
+
background-position: left 10px center, left 14px center;
|
|
66
|
+
}
|
|
67
|
+
select:disabled { opacity: .45; }
|
|
68
|
+
select[aria-invalid="true"] { border-color: var(--aster-negative); }
|
|
69
|
+
@media (forced-colors: active) {
|
|
70
|
+
select { border-color: ButtonText; }
|
|
71
|
+
select:not([multiple]):not([size]) { appearance: auto; background-image: none; }
|
|
72
|
+
select:disabled { color: GrayText; border-color: GrayText; opacity: 1; }
|
|
73
|
+
}
|
|
39
74
|
button { background: none; border: 0; padding: 0; margin: 0; text-align: inherit; }
|
|
40
75
|
h1, h2, h3 { text-wrap: balance; }
|
|
41
76
|
p { text-wrap: pretty; }
|
|
@@ -53,6 +88,7 @@
|
|
|
53
88
|
|
|
54
89
|
::selection { background: oklch(from var(--aster-accent) l c h / .2); }
|
|
55
90
|
input, textarea { caret-color: var(--aster-accent); }
|
|
91
|
+
input[type="checkbox"], input[type="radio"] { accent-color: var(--aster-accent); }
|
|
56
92
|
|
|
57
93
|
/* Cursor follows behaviour, by role. Passive rows keep the arrow. */
|
|
58
94
|
button, label:not([data-ring-owner]), select, summary, a[href], [data-click], input[type="checkbox"],
|
|
@@ -139,6 +175,8 @@
|
|
|
139
175
|
.aster-number:has(.aster-number-steps) { height:auto; min-height:48px; }
|
|
140
176
|
.aster-number-steps button, .aster-split-tools button, .aster-breadcrumbs :is(a,button) { min-width:44px; min-height:44px; }
|
|
141
177
|
.aster-accordion > .aster-accordion-item > aster-section > .aster-section-head button { min-height:44px; }
|
|
178
|
+
.aster-accordion-reorder button { width:44px; height:44px; }
|
|
179
|
+
.aster-section-head > .aster-section-close { width:44px; height:44px; }
|
|
142
180
|
}
|
|
143
181
|
@media (forced-colors:active) { .aster-number-steps button { border:1px solid ButtonText; } }
|
|
144
182
|
aster-component { display: block; min-width: 0; }
|
|
@@ -252,6 +290,17 @@
|
|
|
252
290
|
.aster-button[aria-busy="true"] .aster-label-swap { opacity: .75; }
|
|
253
291
|
.aster-button[aria-disabled="true"] { opacity: .45; box-shadow: var(--aster-ring); transform: none; }
|
|
254
292
|
.aster-button[data-variant="primary"][aria-disabled="true"] { background: var(--aster-text-3); }
|
|
293
|
+
.aster-button[data-tone="danger"] { color: var(--aster-negative); box-shadow: inset 0 0 0 .5px oklch(from var(--aster-negative) l c h / .55), var(--aster-e1); }
|
|
294
|
+
.aster-button[data-tone="danger"]:hover { background: oklch(from var(--aster-negative) l c h / .08); box-shadow: inset 0 0 0 .5px var(--aster-negative), var(--aster-e2); }
|
|
295
|
+
.aster-button[data-tone="danger"]:active { box-shadow: inset 1px 1px 2px var(--aster-press), inset 0 0 0 .5px var(--aster-negative); }
|
|
296
|
+
.aster-button[data-size="sm"] { height: var(--aster-ctl-tight); padding: 0 8px; font-size: 12.5px; }
|
|
297
|
+
.aster-button[data-size="lg"] { height: var(--aster-ctl); padding: 0 16px; font-size: 13.5px; }
|
|
298
|
+
@media (forced-colors: active) {
|
|
299
|
+
/* The button edge is a shadow; forced colours drop shadows, so draw it. */
|
|
300
|
+
.aster-button { border: 1px solid ButtonText; }
|
|
301
|
+
.aster-button[aria-disabled="true"], .aster-button:disabled { border-color: GrayText; color: GrayText; }
|
|
302
|
+
}
|
|
303
|
+
.aster-button:disabled { opacity: .45; box-shadow: var(--aster-ring); cursor: not-allowed; transform: none; }
|
|
255
304
|
.aster-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
|
|
256
305
|
.aster-label-swap { display: inline-grid; }
|
|
257
306
|
.aster-label-swap > * { grid-area: 1 / 1; transition: opacity 120ms; }
|
|
@@ -290,6 +339,10 @@
|
|
|
290
339
|
aster-switch:last-child { border-bottom: 0; }
|
|
291
340
|
aster-switch .aster-error { padding-bottom: 8px; }
|
|
292
341
|
.aster-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--aster-row-y) + 2px) 0; user-select: none; }
|
|
342
|
+
.aster-switch-end { display: flex; align-items: center; gap: 10px; flex: none; }
|
|
343
|
+
.aster-switch-state { font-size: 12px; color: var(--aster-text-3); }
|
|
344
|
+
.aster-switch-row[data-disabled] { opacity: .55; }
|
|
345
|
+
.aster-switch-row[data-disabled], .aster-switch-row[data-readonly] { cursor: default; }
|
|
293
346
|
.aster-switch {
|
|
294
347
|
position: relative; width: 28px; height: 16px; flex: none; border-radius: 999px;
|
|
295
348
|
background: var(--aster-sunk); box-shadow: var(--aster-well); transition: background var(--aster-t-micro);
|
|
@@ -350,10 +403,16 @@
|
|
|
350
403
|
.aster-dialog[open]::backdrop { opacity: 1; }
|
|
351
404
|
@starting-style { .aster-dialog[open]::backdrop { opacity: 0; } }
|
|
352
405
|
.aster-dialog-panel {
|
|
353
|
-
width: var(--dialog-width, 372px); max-width: 100
|
|
406
|
+
width: var(--dialog-width, 372px); max-width: min(var(--aster-dialog-max-width), 100%); border-radius: var(--aster-r-dialog); overflow: hidden;
|
|
354
407
|
background: var(--aster-surface); box-shadow: var(--aster-e3);
|
|
355
408
|
view-transition-name: aster-dialog-panel; corner-shape: squircle;
|
|
356
409
|
}
|
|
410
|
+
.aster-dialog-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 0 16px; }
|
|
411
|
+
.aster-dialog-title { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: var(--aster-weight-strong); }
|
|
412
|
+
.aster-dialog-close { display: grid; place-items: center; flex: none; width: var(--aster-ctl); height: var(--aster-ctl); border-radius: var(--aster-r-ctl); color: var(--aster-text-2); }
|
|
413
|
+
.aster-dialog-close:hover { background: var(--aster-accent-soft); color: var(--aster-text); }
|
|
414
|
+
.aster-dialog-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
|
|
415
|
+
.aster-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--aster-rule-2); }
|
|
357
416
|
::view-transition-group(aster-dialog-panel) { animation-duration: var(--aster-t-morph); animation-timing-function: var(--aster-ease); }
|
|
358
417
|
::view-transition-old(aster-dialog-panel) { animation: 90ms ease both aster-vt-out; }
|
|
359
418
|
::view-transition-new(aster-dialog-panel) { animation: var(--aster-t-ink) ease 80ms both aster-vt-in; }
|
|
@@ -387,12 +446,22 @@
|
|
|
387
446
|
/* Against an element, and every submenu: anchor positioning, flipping at the edges. */
|
|
388
447
|
.aster-menu[data-anchored] { left: auto; top: auto; translate: none; margin: 4px 0; position-area: bottom span-right; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
|
|
389
448
|
.aster-menu[data-depth]:not([data-depth="0"]) { margin: 0 2px; position-area: right span-bottom; position-try-fallbacks: flip-inline, flip-block, flip-inline flip-block; }
|
|
390
|
-
.aster-menu
|
|
449
|
+
.aster-menu[data-depth]:not([data-depth="0"])[data-submenu="end"] { position-area: right span-bottom; position-try-fallbacks: flip-block; }
|
|
450
|
+
.aster-menu[data-depth]:not([data-depth="0"])[data-submenu="start"] { position-area: left span-bottom; position-try-fallbacks: flip-block; }
|
|
451
|
+
:dir(rtl) .aster-menu[data-depth]:not([data-depth="0"])[data-submenu="end"] { position-area: left span-bottom; }
|
|
452
|
+
:dir(rtl) .aster-menu[data-depth]:not([data-depth="0"])[data-submenu="start"] { position-area: right span-bottom; }
|
|
453
|
+
.aster-menu [role^="menuitem"] { display: flex; align-items: center; gap: 6px; min-height: var(--aster-menu-cell-height); padding: var(--aster-row-y) 10px var(--aster-row-y) 6px; border-radius: var(--aster-r-ctl); text-align: left; }
|
|
391
454
|
.aster-menu [role^="menuitem"]:hover, .aster-menu [role^="menuitem"]:focus, .aster-menu [aria-expanded="true"] { background: var(--aster-accent-soft); outline: none; }
|
|
392
455
|
.aster-menu [role^="menuitem"]:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: -2px; }
|
|
393
456
|
.aster-menu [aria-disabled="true"] { color: var(--aster-text-3); }
|
|
394
457
|
.aster-menu-mark { width: 12px; flex: none; text-align: center; color: var(--aster-accent); }
|
|
458
|
+
.aster-menu-icon { display: grid; place-items: center; flex: none; width: calc(var(--aster-menu-icon-size) + 2px); color: var(--aster-text-2); }
|
|
459
|
+
.aster-menu-icon svg { width: var(--aster-menu-icon-size); height: var(--aster-menu-icon-size); fill: none; stroke: currentColor; stroke-width: 1.4; }
|
|
460
|
+
.aster-menu-shortcut { margin-inline-start: auto; padding-inline-start: 24px; color: var(--aster-text-3); font-size: 11.5px; white-space: nowrap; }
|
|
461
|
+
.aster-menu-shortcut + .aster-menu-more { margin-left: 8px; padding-left: 0; }
|
|
395
462
|
.aster-menu-more { margin-left: auto; padding-left: 16px; color: var(--aster-text-3); }
|
|
463
|
+
.aster-menu-empty { padding: calc(var(--aster-row-y) + 2px) 10px; color: var(--aster-text-2); font-size: 12.5px; }
|
|
464
|
+
.aster-menu:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: 2px; }
|
|
396
465
|
.aster-menu-separator { height: 1px; margin: 4px 6px; background: var(--aster-rule-2); }
|
|
397
466
|
.aster-menu-heading { padding: var(--aster-row-y) 10px 2px 24px; font-size: 11.5px; font-weight: var(--aster-weight-label); color: var(--aster-text-3); }
|
|
398
467
|
|
|
@@ -415,6 +484,9 @@
|
|
|
415
484
|
.aster-list-edit-row[data-new] .aster-field { box-shadow: var(--aster-well), inset 2px 0 0 var(--aster-accent); }
|
|
416
485
|
[data-readonly] .aster-field { background: transparent; box-shadow: inset 0 0 0 .5px var(--aster-rule); }
|
|
417
486
|
[data-readonly] .aster-field :is(input, select) { color: var(--aster-text-2); }
|
|
487
|
+
[data-disabled] .aster-field { background: var(--aster-sunk); opacity: .6; }
|
|
488
|
+
[data-disabled] .aster-field :is(input, textarea) { cursor: not-allowed; }
|
|
489
|
+
[data-disabled] .aster-field-head { opacity: .6; }
|
|
418
490
|
|
|
419
491
|
/* ── check ── */
|
|
420
492
|
aster-check { display: grid; gap: 6px; }
|
|
@@ -425,6 +497,15 @@
|
|
|
425
497
|
.aster-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; outline: none; user-select: none; }
|
|
426
498
|
.aster-select-value[data-placeholder] { color: var(--aster-text-3); }
|
|
427
499
|
[data-readonly] .aster-select-value { color: var(--aster-text-2); }
|
|
500
|
+
.aster-select:has([aria-disabled="true"]) { opacity: .55; cursor: not-allowed; }
|
|
501
|
+
.aster-select-clear {
|
|
502
|
+
display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 999px;
|
|
503
|
+
color: var(--aster-text-2);
|
|
504
|
+
}
|
|
505
|
+
.aster-select-clear:hover { background: oklch(from var(--aster-text) l c h / .08); color: var(--aster-text); }
|
|
506
|
+
.aster-select-clear:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: -1px; }
|
|
507
|
+
.aster-select-clear svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
|
|
508
|
+
.aster-choice-empty { padding: var(--aster-row-y) 10px; color: var(--aster-text-2); font-size: 12.5px; }
|
|
428
509
|
|
|
429
510
|
/* ── picker ── */
|
|
430
511
|
.aster-picker { position: relative; }
|
|
@@ -439,18 +520,28 @@
|
|
|
439
520
|
aster-window { display: contents; }
|
|
440
521
|
.aster-window {
|
|
441
522
|
position: fixed; inset: auto; margin: 0; left: var(--window-x, auto); top: var(--window-y, 24px); right: auto;
|
|
442
|
-
display: none; flex-direction: column; width: 340px; height: 420px;
|
|
443
|
-
|
|
523
|
+
display: none; flex-direction: column; width: 340px; height: 420px;
|
|
524
|
+
min-width: min(240px, var(--window-cap-width, calc(100vw - 16px))); min-height: min(160px, var(--window-cap-height, calc(100dvh - 16px)));
|
|
525
|
+
max-width: var(--window-cap-width, calc(100vw - 16px)); max-height: var(--window-cap-height, calc(100dvh - 16px));
|
|
526
|
+
padding: 0; border: 0; overflow: hidden; resize: both;
|
|
444
527
|
border-radius: var(--aster-r-pop); background: var(--aster-surface); color: inherit; box-shadow: var(--aster-e3);
|
|
445
528
|
}
|
|
446
529
|
.aster-window:popover-open { display: flex; }
|
|
530
|
+
/* A modal window is a native dialog's child: the dialog supplies inertness and focus containment. */
|
|
531
|
+
.aster-window-modal {
|
|
532
|
+
position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none;
|
|
533
|
+
margin: 0; padding: 0; border: 0; background: transparent; overflow: visible;
|
|
534
|
+
}
|
|
535
|
+
.aster-window-modal::backdrop { background: var(--aster-scrim); }
|
|
536
|
+
.aster-window-modal[open] > .aster-window { display: flex; }
|
|
537
|
+
.aster-window[data-resizer="false"] { resize: none; }
|
|
447
538
|
.aster-window[data-state="maximized"] {
|
|
448
539
|
left: 8px; top: 8px; width: calc(100vw - 16px) !important; height: calc(100dvh - 16px) !important; resize: none;
|
|
449
540
|
}
|
|
450
541
|
.aster-window[data-active="true"] { outline: 1px solid var(--aster-rule); }
|
|
451
542
|
.aster-window:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: 2px; }
|
|
452
543
|
.aster-window-bar {
|
|
453
|
-
display: flex; align-items: center; gap: 2px; padding: calc(var(--aster-pad) / 2) 6px calc(var(--aster-pad) / 2) 14px; cursor: grab; touch-action: none; user-select: none;
|
|
544
|
+
display: flex; align-items: center; gap: 2px; min-height: var(--aster-window-header-height); padding: calc(var(--aster-pad) / 2) 6px calc(var(--aster-pad) / 2) 14px; cursor: grab; touch-action: none; user-select: none;
|
|
454
545
|
border-bottom: 1px solid var(--aster-rule-2);
|
|
455
546
|
}
|
|
456
547
|
.aster-window-bar:active { cursor: grabbing; }
|
|
@@ -467,6 +558,8 @@
|
|
|
467
558
|
.aster-window-bar .aster-window-move, .aster-window-bar button[aria-describedby$="-resize-help"] { display:none; }
|
|
468
559
|
}
|
|
469
560
|
.aster-window-body { flex: 1; min-height: 0; overflow: auto; padding: var(--aster-pad) 14px; }
|
|
561
|
+
.aster-window-footer { flex: none; padding: calc(var(--aster-pad) / 2) 14px; border-top: 1px solid var(--aster-rule-2); }
|
|
562
|
+
.aster-window-status { flex: none; padding: 3px 14px; border-top: 1px solid var(--aster-rule-2); color: var(--aster-text-2); font-size: 11.5px; }
|
|
470
563
|
/* Dashboard geometry stays in CSS; stored sizes are column/row intent. */
|
|
471
564
|
aster-dashboard { display: block; min-width: 0; container-type: inline-size; }
|
|
472
565
|
.aster-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: var(--dashboard-row, 300px); gap: var(--dashboard-gap, 16px); }
|
|
@@ -516,6 +609,8 @@
|
|
|
516
609
|
.aster-calendar td[role="gridcell"]:hover { background: var(--aster-accent-soft); }
|
|
517
610
|
.aster-calendar td[aria-current="date"] { font-weight: var(--aster-weight-label); color: var(--aster-accent); }
|
|
518
611
|
.aster-calendar td[aria-selected="true"] { background: var(--aster-accent); color: var(--aster-on-accent); }
|
|
612
|
+
.aster-calendar td[aria-disabled="true"] { color: var(--aster-text-3); text-decoration: line-through; cursor: not-allowed; }
|
|
613
|
+
.aster-calendar td[aria-disabled="true"]:hover { background: none; }
|
|
519
614
|
.aster-calendar td:focus { outline: 2px solid var(--aster-focus); outline-offset: -2px; }
|
|
520
615
|
.aster-picker-list {
|
|
521
616
|
min-width: anchor-size(width); max-width: min(480px, 100vw - 32px); max-height: min(280px, 45vh); overflow: auto;
|
|
@@ -592,11 +687,34 @@
|
|
|
592
687
|
|
|
593
688
|
/* ── section ── */
|
|
594
689
|
aster-section { display: block; }
|
|
690
|
+
.aster-accordion-tools { display: flex; justify-content: flex-end; padding-bottom: 4px; }
|
|
691
|
+
.aster-accordion-tools button { min-height: var(--aster-ctl); padding: 0 8px; border-radius: var(--aster-r-ctl); color: var(--aster-accent); font-size: 12.5px; font-weight: var(--aster-weight-strong); }
|
|
692
|
+
.aster-accordion-tools button:hover { background: var(--aster-accent-soft); }
|
|
693
|
+
.aster-accordion-reorder { display: inline-flex; gap: 2px; }
|
|
694
|
+
.aster-accordion-reorder button { width: var(--aster-ctl); height: var(--aster-ctl); border-radius: var(--aster-r-ctl); color: var(--aster-text-2); }
|
|
695
|
+
.aster-accordion-reorder button:hover:not(:disabled) { background: var(--aster-accent-soft); color: var(--aster-text); }
|
|
696
|
+
.aster-accordion-reorder button:disabled { opacity: .4; }
|
|
595
697
|
.aster-section-head { display: flex; align-items: center; gap: 10px; margin: 0; padding: var(--aster-pad) 0 calc(var(--aster-pad) - 4px); font: inherit; border-bottom: 1px solid var(--aster-rule-2); }
|
|
596
698
|
.aster-section-head button { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: var(--aster-weight-strong); color: var(--aster-text); }
|
|
597
699
|
.aster-section-head svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: rotate var(--aster-t-micro) var(--aster-ease); }
|
|
598
|
-
aster-section[data-open] > .aster-section-head > button > svg { rotate: 90deg; }
|
|
700
|
+
aster-section[data-open] > .aster-section-head > button:not(.aster-section-close) > svg { rotate: 90deg; }
|
|
701
|
+
.aster-section-title { font-size: 13.5px; font-weight: var(--aster-weight-strong); color: var(--aster-text); }
|
|
599
702
|
.aster-section-summary { font-size: 12px; color: var(--aster-text-3); }
|
|
703
|
+
.aster-section-head > .aster-section-close {
|
|
704
|
+
flex: none; display: grid; place-items: center; width: calc(var(--aster-ctl) - 2px); height: calc(var(--aster-ctl) - 2px);
|
|
705
|
+
border-radius: var(--aster-r-ctl); color: var(--aster-text-2);
|
|
706
|
+
}
|
|
707
|
+
.aster-section-head > .aster-section-close:hover { background: var(--aster-accent-soft); color: var(--aster-text); }
|
|
708
|
+
.aster-section-head > .aster-section-close:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: -2px; }
|
|
709
|
+
.aster-section-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
|
|
710
|
+
/* The window bar without its drag affordance: an in-flow panel. */
|
|
711
|
+
aster-section > .aster-window-bar { cursor: default; touch-action: auto; user-select: auto; }
|
|
712
|
+
aster-section > .aster-window-bar > h2 { display: flex; align-items: baseline; gap: 6px; }
|
|
713
|
+
.aster-window-bar .aster-section-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
714
|
+
.aster-window-bar .aster-section-summary { flex: none; font-weight: var(--aster-weight); }
|
|
715
|
+
.aster-window-bar .aster-section-fold svg { transition: rotate var(--aster-t-micro) var(--aster-ease); }
|
|
716
|
+
aster-section[data-open] > .aster-window-bar > .aster-section-fold svg { rotate: 180deg; }
|
|
717
|
+
.aster-section-footer { margin-top: var(--aster-pad); padding-top: calc(var(--aster-pad) - 4px); border-top: 1px solid var(--aster-rule-2); }
|
|
600
718
|
/* Height animates as a grid track, so nothing is measured in JS. */
|
|
601
719
|
.aster-section-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--aster-t-morph) var(--aster-ease); }
|
|
602
720
|
aster-section[data-open] > .aster-section-body { grid-template-rows: 1fr; }
|
|
@@ -607,9 +725,26 @@
|
|
|
607
725
|
aster-form { display: block; container-type: inline-size; }
|
|
608
726
|
.aster-form-grid { display: grid; grid-template-columns: repeat(var(--columns, 2), minmax(0, 1fr)); gap: var(--aster-gap) calc(var(--aster-gap) + 4px); padding: var(--aster-gap) 0 calc(var(--aster-gap) + 4px); }
|
|
609
727
|
.aster-form-grid > * { grid-column: span min(var(--span, 1), var(--columns, 2)); }
|
|
728
|
+
.aster-form-summary {
|
|
729
|
+
margin: 0 0 var(--aster-gap); padding: var(--aster-pad); border-radius: var(--aster-r-card);
|
|
730
|
+
background: var(--aster-sunk); box-shadow: inset 0 0 0 .5px var(--aster-negative), var(--aster-well);
|
|
731
|
+
}
|
|
732
|
+
.aster-form-summary-title { margin: 0 0 4px; color: var(--aster-negative); font-size: 13px; font-weight: var(--aster-weight-strong); }
|
|
733
|
+
.aster-form-summary-form { margin: 4px 0; color: var(--aster-text); font-size: 12.5px; }
|
|
734
|
+
.aster-form-summary ul { display: grid; gap: 2px; margin: 0; padding-left: 18px; }
|
|
735
|
+
.aster-form-summary button { color: var(--aster-negative); font-size: 12.5px; text-align: left; text-decoration: underline; text-underline-offset: 2px; border-radius: 2px; }
|
|
736
|
+
.aster-form-summary button:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: 1px; }
|
|
737
|
+
aster-form[data-title-orientation="start"] .aster-form-grid > * {
|
|
738
|
+
display: grid; grid-template-columns: var(--aster-form-label-width, 9rem) minmax(0, 1fr);
|
|
739
|
+
column-gap: var(--aster-gap); row-gap: 6px; align-items: start;
|
|
740
|
+
}
|
|
741
|
+
aster-form[data-title-orientation="start"] .aster-form-grid > * > .aster-field-head { grid-column: 1; grid-row: 1; align-self: center; }
|
|
742
|
+
aster-form[data-title-orientation="start"] .aster-form-grid > * > :not(.aster-field-head) { grid-column: 2; }
|
|
610
743
|
@container (max-width: 520px) {
|
|
611
744
|
.aster-form-grid { grid-template-columns: minmax(0, 1fr); }
|
|
612
745
|
.aster-form-grid > * { grid-column: auto; }
|
|
746
|
+
aster-form[data-title-orientation="start"] .aster-form-grid > * { display: grid; grid-template-columns: minmax(0, 1fr); }
|
|
747
|
+
aster-form[data-title-orientation="start"] .aster-form-grid > * > :not(.aster-field-head) { grid-column: auto; }
|
|
613
748
|
}
|
|
614
749
|
|
|
615
750
|
/* ── split ── */
|
|
@@ -769,11 +904,22 @@
|
|
|
769
904
|
|
|
770
905
|
/* ── grid ── */
|
|
771
906
|
aster-grid { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; container: aster-grid / inline-size; }
|
|
907
|
+
/* The chrome row is always present: a hidden toolbar leaves it empty, and the table still takes the middle row. */
|
|
908
|
+
/* A hidden header stays in the accessibility tree so columnheader names and aria-rowcount arithmetic survive. */
|
|
909
|
+
.aster-grid-scroll[data-head-hidden] .aster-grid-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
772
910
|
|
|
773
911
|
aster-grid[data-dragging], aster-grid[data-dragging] * { cursor: grabbing; }
|
|
774
|
-
.aster-grid-
|
|
912
|
+
.aster-grid-chrome { min-width: 0; }
|
|
913
|
+
.aster-grid-toolbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: var(--aster-grid-toolbar-height); padding: var(--aster-row-y) 12px; border-bottom: 1px solid var(--aster-rule-2); }
|
|
914
|
+
/* Drift lives outside the toolbar: hiding the toolbar cannot silence it. */
|
|
915
|
+
.aster-grid-drift { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: var(--aster-row-y) 12px; border-bottom: 1px solid var(--aster-rule-2); font-size: 12.5px; color: var(--aster-text-2); background: var(--aster-surface); }
|
|
916
|
+
.aster-grid-drift > span { flex: 1; min-width: 0; }
|
|
917
|
+
.aster-grid-drift button { flex: none; color: var(--aster-accent); font-weight: var(--aster-weight-label); }
|
|
918
|
+
.aster-grid-paging { display: flex; align-items: center; gap: 4px; padding: var(--aster-row-y) 12px; border-bottom: 1px solid var(--aster-rule-2); background: var(--aster-surface); }
|
|
919
|
+
.aster-grid-page { flex: 1; min-width: 0; text-align: center; font-size: 12.5px; color: var(--aster-text-2); font-variant-numeric: tabular-nums; }
|
|
920
|
+
.aster-grid-paging button:disabled { opacity: .4; }
|
|
775
921
|
.aster-grid-group-tools { display: inline-flex; align-items: center; max-width: 100%; }
|
|
776
|
-
.aster-grid-summary { flex: none; padding: var(--aster-row-y) 12px; border-top: 1px solid var(--aster-rule-2); font-size: 12.5px; }
|
|
922
|
+
.aster-grid-summary { flex: none; min-height: var(--aster-grid-summary-height); padding: var(--aster-row-y) 12px; border-top: 1px solid var(--aster-rule-2); font-size: 12.5px; }
|
|
777
923
|
.aster-grid-summary dl { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
|
|
778
924
|
.aster-grid-summary dl > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
|
|
779
925
|
.aster-grid-summary dt { color: var(--aster-text-2); overflow-wrap: anywhere; }
|
|
@@ -839,6 +985,8 @@
|
|
|
839
985
|
.aster-drill-crumbs button { color: var(--aster-accent); font-size: 12.5px; }
|
|
840
986
|
.aster-drill-crumbs button:hover { text-decoration: underline; }
|
|
841
987
|
.aster-drill-crumbs button[aria-current] { color: var(--aster-text); font-weight: var(--aster-weight-strong); }
|
|
988
|
+
.aster-drill-search { flex: none; margin-inline-start: auto; }
|
|
989
|
+
.aster-drill-search input { width: 9rem; min-height: var(--aster-ctl); max-width: 34vw; font-size: 12.5px; }
|
|
842
990
|
.aster-drill-heading { margin: 0; font-size: 14px; font-weight: var(--aster-weight-label); }
|
|
843
991
|
.aster-drill-heading:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: 2px; border-radius: 2px; }
|
|
844
992
|
.aster-drill-viewport { position: relative; isolation: isolate; overflow: hidden; min-height: 48px; }
|
|
@@ -869,11 +1017,13 @@
|
|
|
869
1017
|
.aster-grid-row[data-drop="ok"] > .aster-grid-cell { background: var(--aster-accent-soft); box-shadow: inset 0 -2px 0 var(--aster-accent); }
|
|
870
1018
|
.aster-grid-row[data-drop="refused"] > .aster-grid-cell { background: oklch(from var(--aster-negative) l c h / .08); cursor: not-allowed; }
|
|
871
1019
|
/* Tree grid: the first column's indent and opener. */
|
|
872
|
-
.aster-grid-tree { display: inline-flex; align-items: center; flex: none; padding-left: calc(var(--level, 0) *
|
|
1020
|
+
.aster-grid-tree { display: inline-flex; align-items: center; flex: none; padding-left: calc(var(--level, 0) * var(--aster-grid-tree-indent)); margin-right: 4px; vertical-align: middle; }
|
|
873
1021
|
.aster-grid-opener { display: grid; place-items: center; width: 18px; height: 18px; border-radius: var(--aster-r-ctl); color: var(--aster-text-2); }
|
|
874
1022
|
button.aster-grid-opener:hover { background: var(--aster-accent-soft); color: var(--aster-text); }
|
|
875
1023
|
.aster-grid-opener svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: rotate var(--aster-t-micro) var(--aster-ease); }
|
|
876
1024
|
.aster-grid-opener[data-open] svg { rotate: 90deg; }
|
|
1025
|
+
.aster-grid-tree-icon { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; margin-inline-end: 4px; color: var(--aster-text-2); }
|
|
1026
|
+
.aster-grid-tree-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
|
|
877
1027
|
.aster-grid-note { font-size: 12.5px; color: var(--aster-text-2); }
|
|
878
1028
|
/* A popover under its toolbar button, aligned to the button's right edge. */
|
|
879
1029
|
.aster-grid-panel {
|
|
@@ -895,6 +1045,37 @@
|
|
|
895
1045
|
.aster-grid-panel-view { flex: 1; text-align: left; }
|
|
896
1046
|
.aster-grid-panel-save { display: flex; gap: 6px; }
|
|
897
1047
|
.aster-grid-panel-action { justify-self: start; font-size: 12.5px; font-weight: var(--aster-weight-label); color: var(--aster-accent); }
|
|
1048
|
+
/* Sort panel: one row per column, a direction toggle, and a clear for the active row. */
|
|
1049
|
+
.aster-grid-sort-panel { width: 240px; }
|
|
1050
|
+
.aster-grid-sort-panel li { gap: 8px; }
|
|
1051
|
+
.aster-grid-sort-name { flex: 1; min-width: 0; color: var(--aster-text-2); }
|
|
1052
|
+
.aster-grid-sort-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1053
|
+
.aster-grid-sort-reason { display: block; margin-top: 2px; font-size: 11px; color: var(--aster-text-3); overflow-wrap: anywhere; }
|
|
1054
|
+
.aster-grid-sort-panel li:has([aria-pressed="true"]) .aster-grid-sort-name { color: var(--aster-text); }
|
|
1055
|
+
.aster-grid-sort-actions { flex: none; display: flex; align-items: center; gap: 2px; }
|
|
1056
|
+
.aster-grid-sort-priority { width: 14px; flex: none; text-align: right; font-size: 10px; font-variant-numeric: tabular-nums; color: var(--aster-text-3); }
|
|
1057
|
+
.aster-grid-panel.aster-grid-sort-panel li button { display: grid; place-items: center; width: max(24px, var(--aster-ctl-tight)); height: max(24px, var(--aster-ctl-tight)); padding: 0; }
|
|
1058
|
+
.aster-grid-sort-panel li button[aria-pressed="true"], .aster-grid-sort-panel li button[aria-pressed="true"]:hover:not(:disabled) {
|
|
1059
|
+
color: var(--aster-accent); background: var(--aster-accent-soft);
|
|
1060
|
+
}
|
|
1061
|
+
.aster-grid-sort-panel li button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }
|
|
1062
|
+
/* Both controls keep their space; inactive ones stay hidden on a pointer device, and always show on touch. */
|
|
1063
|
+
.aster-grid-sort-panel li button.aster-grid-sort-direction { opacity: 0; }
|
|
1064
|
+
.aster-grid-sort-panel li button.aster-grid-sort-direction[aria-pressed="true"],
|
|
1065
|
+
.aster-grid-sort-panel li:hover button.aster-grid-sort-direction,
|
|
1066
|
+
.aster-grid-sort-panel li button.aster-grid-sort-direction:focus-visible { opacity: 1; }
|
|
1067
|
+
.aster-grid-sort-panel li button.aster-grid-sort-clear { color: var(--aster-text-3); }
|
|
1068
|
+
.aster-grid-sort-panel li button.aster-grid-sort-clear:disabled { visibility: hidden; opacity: .45; }
|
|
1069
|
+
@media (hover: none) {
|
|
1070
|
+
.aster-grid-sort-panel li button.aster-grid-sort-direction { opacity: 1; }
|
|
1071
|
+
.aster-grid-sort-panel li button.aster-grid-sort-clear:disabled { visibility: visible; }
|
|
1072
|
+
}
|
|
1073
|
+
.aster-grid-sort-panel > .aster-grid-panel-action { color: var(--aster-text-2); }
|
|
1074
|
+
.aster-grid-sort-panel > .aster-grid-panel-action:disabled { color: var(--aster-text-3); opacity: .55; }
|
|
1075
|
+
@media (forced-colors: active) {
|
|
1076
|
+
.aster-grid-panel { border: 1px solid CanvasText; }
|
|
1077
|
+
.aster-grid-sort-panel li button[aria-pressed="true"] { outline: 1px solid Highlight; outline-offset: -1px; }
|
|
1078
|
+
}
|
|
898
1079
|
/* One scroll container both ways; the header and frozen cells stick inside it. */
|
|
899
1080
|
.aster-grid-scroll { height: 100%; overflow: auto; overflow-anchor: none; scrollbar-gutter: stable; outline: none; }
|
|
900
1081
|
.aster-grid-scroll[data-fixed-columns] { width: fit-content; max-width: 100%; min-width: 0; }
|
|
@@ -906,10 +1087,42 @@
|
|
|
906
1087
|
min-width: 0; padding: var(--aster-pad-y) 12px; background: var(--aster-surface);
|
|
907
1088
|
overflow-wrap: anywhere; line-height: 1.4;
|
|
908
1089
|
}
|
|
1090
|
+
/* Record rows keep at least a single line's height; the header, filter row,
|
|
1091
|
+
group headers and the card layout set their own geometry. */
|
|
1092
|
+
.aster-grid-row:not(.aster-grid-head, .aster-grid-filters, .aster-grid-group) > .aster-grid-cell { min-height: var(--aster-grid-row-min-height); }
|
|
1093
|
+
.aster-grid-head .aster-grid-cell { min-height: var(--aster-grid-header-height); }
|
|
909
1094
|
.aster-grid-cell[data-numeric] { text-align: right; font-variant-numeric: tabular-nums; }
|
|
1095
|
+
.aster-grid-cell[data-align="start"] { text-align: start; }
|
|
1096
|
+
.aster-grid-cell[data-align="center"] { text-align: center; }
|
|
1097
|
+
.aster-grid-cell[data-align="end"] { text-align: end; }
|
|
1098
|
+
/* A row tone is a leading edge above the cells, never a background the cells cover. */
|
|
1099
|
+
.aster-grid-row[data-tone]::before {
|
|
1100
|
+
content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 3;
|
|
1101
|
+
width: 3px; background: var(--aster-text-3); pointer-events: none;
|
|
1102
|
+
}
|
|
1103
|
+
.aster-grid-row[data-tone="positive"]::before { background: var(--aster-positive); }
|
|
1104
|
+
.aster-grid-row[data-tone="caution"]::before { background: var(--aster-caution); }
|
|
1105
|
+
.aster-grid-row[data-tone="negative"]::before { background: var(--aster-negative); }
|
|
1106
|
+
@media (forced-colors: active) { .aster-grid-row[data-tone]::before { background: CanvasText; } }
|
|
910
1107
|
.aster-grid-cell[data-frozen] { position: sticky; z-index: 1; }
|
|
911
1108
|
.aster-grid-cell[data-frozen]:last-of-type, .aster-grid-cell[data-frozen]:has(+ :not([data-frozen])) { box-shadow: 1px 0 0 var(--aster-rule); }
|
|
912
1109
|
.aster-grid-row[aria-selected="true"] > .aster-grid-cell { background: color-mix(in oklch, var(--aster-accent-soft), var(--aster-surface)); }
|
|
1110
|
+
/* Cell selection: mark the active column instead of the whole row. */
|
|
1111
|
+
.aster-grid-scroll[data-selection-appearance="cell"] .aster-grid-row[aria-selected="true"] > .aster-grid-cell { background: var(--aster-surface); }
|
|
1112
|
+
.aster-grid-scroll[data-selection-appearance="cell"] .aster-grid-cell[data-selected-cell] { background: color-mix(in oklch, var(--aster-accent-soft), var(--aster-surface)); }
|
|
1113
|
+
.aster-grid-cell[data-tone="positive"] { background: color-mix(in oklch, var(--aster-positive) 9%, var(--aster-surface)); }
|
|
1114
|
+
.aster-grid-cell[data-tone="caution"] { background: color-mix(in oklch, var(--aster-caution) 9%, var(--aster-surface)); }
|
|
1115
|
+
.aster-grid-cell[data-tone="negative"] { background: color-mix(in oklch, var(--aster-negative) 9%, var(--aster-surface)); }
|
|
1116
|
+
.aster-grid-cell[data-tone="neutral"] { background: color-mix(in oklch, var(--aster-text-3) 9%, var(--aster-surface)); }
|
|
1117
|
+
/* The selection column: a leading, always-present track of its own. */
|
|
1118
|
+
.aster-grid-cell.aster-grid-select {
|
|
1119
|
+
position: sticky; left: 0; z-index: 1; display: grid; place-items: center; padding: 0;
|
|
1120
|
+
background: var(--aster-surface); box-shadow: inset -1px 0 0 var(--aster-rule-2);
|
|
1121
|
+
}
|
|
1122
|
+
.aster-grid-head .aster-grid-cell.aster-grid-select { z-index: 3; }
|
|
1123
|
+
.aster-grid-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--aster-accent); cursor: pointer; }
|
|
1124
|
+
.aster-grid-select input:focus-visible { outline: 2px solid var(--aster-focus); outline-offset: 2px; border-radius: 2px; }
|
|
1125
|
+
.aster-grid-select-rank { position: absolute; inset-inline-end: 2px; bottom: 1px; font-size: 10px; color: var(--aster-text-3); font-variant-numeric: tabular-nums; }
|
|
913
1126
|
/* The header and filter row stick together. */
|
|
914
1127
|
.aster-grid-headgroup { position: sticky; top: 0; z-index: 2; display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
|
|
915
1128
|
.aster-grid-head { border-bottom: 1px solid var(--aster-rule); }
|
|
@@ -923,6 +1136,7 @@
|
|
|
923
1136
|
.aster-grid-resize::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 2px; border-radius: 1px; background: transparent; transition: background var(--aster-t-micro); }
|
|
924
1137
|
.aster-grid-resize:hover::after { background: var(--aster-accent); }
|
|
925
1138
|
.aster-grid-filters .aster-grid-cell { padding: 4px 6px; background: var(--aster-surface); }
|
|
1139
|
+
.aster-grid-filter-refused { display: inline-flex; align-items: center; height: var(--aster-ctl-tight); font-size: 12.5px; color: var(--aster-text-3); }
|
|
926
1140
|
.aster-grid-filters .aster-field { height: var(--aster-ctl-tight); padding: 0 8px; font-size: 12.5px; }
|
|
927
1141
|
.aster-grid-filters .aster-error { font-size: 11.5px; }
|
|
928
1142
|
.aster-grid-sort {
|
|
@@ -930,6 +1144,9 @@
|
|
|
930
1144
|
font-size: 12px; font-weight: var(--aster-weight-label); color: var(--aster-text-2);
|
|
931
1145
|
}
|
|
932
1146
|
.aster-grid-header[data-numeric] .aster-grid-sort { justify-content: flex-end; }
|
|
1147
|
+
.aster-grid-header[data-align="start"] .aster-grid-sort { justify-content: flex-start; }
|
|
1148
|
+
.aster-grid-header[data-align="center"] .aster-grid-sort { justify-content: center; }
|
|
1149
|
+
.aster-grid-header[data-align="end"] .aster-grid-sort { justify-content: flex-end; }
|
|
933
1150
|
.aster-grid-sort:hover { color: var(--aster-text); }
|
|
934
1151
|
.aster-grid-sort-mark { width: 10px; height: 10px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
|
|
935
1152
|
.aster-grid-sort small { font-size: 10px; color: var(--aster-text-3); }
|
|
@@ -954,6 +1171,10 @@
|
|
|
954
1171
|
.aster-grid-row-note button { color: var(--aster-accent); font-weight: var(--aster-weight-strong); }
|
|
955
1172
|
.aster-grid-skeleton { display: block; height: 10px; margin-block: 4px; border-radius: 3px; background: oklch(from var(--aster-text) l c h / .06); }
|
|
956
1173
|
.aster-grid-empty { padding: 24px 14px; color: var(--aster-text-3); }
|
|
1174
|
+
.aster-grid-loading { padding: 24px 14px; color: var(--aster-text-2); }
|
|
1175
|
+
.aster-grid-failure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: var(--aster-row-y) 12px; border-bottom: 1px solid var(--aster-rule-2); background: var(--aster-surface); color: var(--aster-negative); font-size: 12.5px; }
|
|
1176
|
+
.aster-grid-failure > span { flex: 1; min-width: 0; }
|
|
1177
|
+
.aster-grid-failure button { flex: none; color: var(--aster-accent); font-weight: var(--aster-weight-label); }
|
|
957
1178
|
|
|
958
1179
|
/* Touch: larger targets, same look. */
|
|
959
1180
|
@media (pointer: coarse) {
|
|
@@ -979,13 +1200,15 @@
|
|
|
979
1200
|
.aster-grid-row:not(.aster-grid-head) { display: block; padding: calc(var(--aster-pad) - 4px) var(--aster-pad); border-bottom: 1px solid var(--aster-rule); }
|
|
980
1201
|
.aster-grid-row:not(.aster-grid-head) > .aster-grid-cell {
|
|
981
1202
|
position: static; display: grid; grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr); gap: 8px;
|
|
982
|
-
padding: 3px 0; box-shadow: none; text-align: left;
|
|
1203
|
+
min-height: 0; padding: 3px 0; box-shadow: none; text-align: left;
|
|
983
1204
|
}
|
|
984
1205
|
.aster-grid-row:not(.aster-grid-head) > .aster-grid-cell[data-numeric] { justify-content: initial; }
|
|
985
1206
|
/* The card, not its cells, carries the row's background, so selection and drop targets cover its padding too. */
|
|
986
1207
|
.aster-grid-row:not(.aster-grid-head) { background: var(--aster-surface); }
|
|
987
1208
|
.aster-grid-row:not(.aster-grid-head) > .aster-grid-cell { background: none; }
|
|
988
1209
|
.aster-grid-row[aria-selected="true"]:not(.aster-grid-head) { background: color-mix(in oklch, var(--aster-accent-soft), var(--aster-surface)); }
|
|
1210
|
+
.aster-grid-scroll[data-selection-appearance="cell"] .aster-grid-row[aria-selected="true"]:not(.aster-grid-head) { background: var(--aster-surface); }
|
|
1211
|
+
.aster-grid-row:not(.aster-grid-head) > .aster-grid-cell.aster-grid-select { position: static; box-shadow: none; padding: 3px 0; }
|
|
989
1212
|
.aster-grid-row[data-drop="ok"]:not(.aster-grid-head) { background: var(--aster-accent-soft); box-shadow: inset 0 -2px 0 var(--aster-accent); }
|
|
990
1213
|
.aster-grid-row[data-drop="refused"]:not(.aster-grid-head) { background: oklch(from var(--aster-negative) l c h / .08); }
|
|
991
1214
|
.aster-grid-row:not(.aster-grid-head) > .aster-grid-cell[data-label]::before {
|
package/styles/base.css
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
@media (pointer: coarse) {
|
|
12
12
|
:root:not([data-density]) { --aster-ctl: 38px; --aster-ctl-tight: 32px; --aster-pad-y: 12px; --aster-row-y: 9px; --aster-pad: 16px; --aster-gap: 18px; }
|
|
13
13
|
}
|
|
14
|
+
/* Component geometry intents: defaults an identity or an app may override.
|
|
15
|
+
`auto` follows the content; lengths are floors a placement may raise. */
|
|
16
|
+
:root {
|
|
17
|
+
--aster-form-label-width: 9rem;
|
|
18
|
+
--aster-grid-header-height: calc(var(--aster-pad-y) * 2 + 16.8px);
|
|
19
|
+
--aster-grid-toolbar-height: auto;
|
|
20
|
+
--aster-grid-row-min-height: auto;
|
|
21
|
+
--aster-grid-tree-indent: 18px;
|
|
22
|
+
--aster-grid-summary-height: auto;
|
|
23
|
+
--aster-menu-cell-height: auto;
|
|
24
|
+
--aster-menu-icon-size: 14px;
|
|
25
|
+
--aster-window-header-height: calc(var(--aster-ctl) + var(--aster-pad) - 1px);
|
|
26
|
+
--aster-dialog-max-width: 100%;
|
|
27
|
+
}
|
|
14
28
|
|
|
15
29
|
*, *::before, *::after { box-sizing: border-box; }
|
|
16
30
|
html, body { margin: 0; height: 100%; }
|
|
@@ -36,6 +50,27 @@
|
|
|
36
50
|
button, input, select, textarea { font: inherit; color: inherit; }
|
|
37
51
|
/* Native controls inherit ink, so their surfaces must follow the same theme. */
|
|
38
52
|
select, option, optgroup { background-color: var(--aster-sunk); }
|
|
53
|
+
select {
|
|
54
|
+
min-height: var(--aster-ctl); max-width: 100%; padding: 0 10px;
|
|
55
|
+
border: 1px solid var(--aster-rule); border-radius: var(--aster-r-ctl);
|
|
56
|
+
box-shadow: var(--aster-well);
|
|
57
|
+
}
|
|
58
|
+
select:not([multiple]):not([size]) {
|
|
59
|
+
appearance: none; padding-inline-end: 28px;
|
|
60
|
+
background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
61
|
+
background-position: right 14px center, right 10px center;
|
|
62
|
+
background-size: 4px 4px; background-repeat: no-repeat;
|
|
63
|
+
}
|
|
64
|
+
select:not([multiple]):not([size]):dir(rtl) {
|
|
65
|
+
background-position: left 10px center, left 14px center;
|
|
66
|
+
}
|
|
67
|
+
select:disabled { opacity: .45; }
|
|
68
|
+
select[aria-invalid="true"] { border-color: var(--aster-negative); }
|
|
69
|
+
@media (forced-colors: active) {
|
|
70
|
+
select { border-color: ButtonText; }
|
|
71
|
+
select:not([multiple]):not([size]) { appearance: auto; background-image: none; }
|
|
72
|
+
select:disabled { color: GrayText; border-color: GrayText; opacity: 1; }
|
|
73
|
+
}
|
|
39
74
|
button { background: none; border: 0; padding: 0; margin: 0; text-align: inherit; }
|
|
40
75
|
h1, h2, h3 { text-wrap: balance; }
|
|
41
76
|
p { text-wrap: pretty; }
|
|
@@ -53,6 +88,7 @@
|
|
|
53
88
|
|
|
54
89
|
::selection { background: oklch(from var(--aster-accent) l c h / .2); }
|
|
55
90
|
input, textarea { caret-color: var(--aster-accent); }
|
|
91
|
+
input[type="checkbox"], input[type="radio"] { accent-color: var(--aster-accent); }
|
|
56
92
|
|
|
57
93
|
/* Cursor follows behaviour, by role. Passive rows keep the arrow. */
|
|
58
94
|
button, label:not([data-ring-owner]), select, summary, a[href], [data-click], input[type="checkbox"],
|
package/styles/contract.ts
CHANGED
|
@@ -39,3 +39,19 @@ export const TOKEN_NAMES: readonly string[] = Object.values(TOKENS).flat().map((
|
|
|
39
39
|
export const DENSITY = ["ctl", "ctl-tight", "pad-y", "row-y", "pad", "gap"] as const;
|
|
40
40
|
export const DENSITIES = ["compact", "standard", "comfortable"] as const;
|
|
41
41
|
export const DENSITY_NAMES: readonly string[] = DENSITY.map((t) => `--aster-${t}`);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Component geometry intents, by component. Unlike [[TOKENS]] an identity
|
|
45
|
+
* need not define these: each has a default in `base.css`, and a component
|
|
46
|
+
* uses it for geometry CSS owns. An app may set one on a placement.
|
|
47
|
+
*/
|
|
48
|
+
export const COMPONENT_VARS = {
|
|
49
|
+
form: ["label-width"],
|
|
50
|
+
grid: ["header-height", "toolbar-height", "row-min-height", "tree-indent", "summary-height"],
|
|
51
|
+
menu: ["cell-height", "icon-size"],
|
|
52
|
+
window: ["header-height"],
|
|
53
|
+
dialog: ["max-width"],
|
|
54
|
+
} as const;
|
|
55
|
+
/** Every name in [[constant:COMPONENT_VARS]] as a full custom property name, such as `--aster-grid-header-height`. */
|
|
56
|
+
export const COMPONENT_VAR_NAMES: readonly string[] = Object.entries(COMPONENT_VARS)
|
|
57
|
+
.flatMap(([component, names]) => names.map((name) => `--aster-${component}-${name}`));
|