@aortl/admin-css 0.15.1 → 0.16.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/admin.css +238 -20
- package/dist/admin.min.css +1 -1
- package/dist/admin.scoped.css +236 -20
- package/dist/admin.scoped.min.css +50 -15
- package/package.json +1 -1
- package/src/components/button-group.css +2 -2
- package/src/components/card.css +2 -3
- package/src/components/chart.css +3 -4
- package/src/components/checkbox.css +24 -0
- package/src/components/dialog.css +13 -3
- package/src/components/index.css +1 -0
- package/src/components/kbd.css +1 -2
- package/src/components/property-list.css +7 -13
- package/src/components/prose.css +115 -0
- package/src/components/radio.css +17 -0
- package/src/components/select.css +7 -3
- package/src/components/sidebar.css +1 -1
- package/src/components/tabs.css +1 -1
- package/src/components/textarea.css +3 -3
- package/src/theme.css +5 -0
package/src/components/chart.css
CHANGED
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
color: var(--color-info);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/* Single-series semantic variants — recolour currentColor, like progress.
|
|
36
|
+
/* Single-series semantic variants — recolour currentColor, like progress.
|
|
37
|
+
`info` is the base colour (`.chart` above), so it needs no class — the
|
|
38
|
+
default `variant="info"` simply emits no modifier. */
|
|
37
39
|
.chart-success {
|
|
38
40
|
color: var(--color-success);
|
|
39
41
|
}
|
|
@@ -43,9 +45,6 @@
|
|
|
43
45
|
.chart-danger {
|
|
44
46
|
color: var(--color-danger);
|
|
45
47
|
}
|
|
46
|
-
.chart-info {
|
|
47
|
-
color: var(--color-info);
|
|
48
|
-
}
|
|
49
48
|
|
|
50
49
|
/* --------------------------------------------------------------------- *
|
|
51
50
|
* BAR CHART — horizontal (default) *
|
|
@@ -25,6 +25,30 @@
|
|
|
25
25
|
@apply inline-flex items-center justify-center size-3 text-primary-content;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/* Native input variant: state is driven by :checked / :indeterminate, the
|
|
29
|
+
glyph is masked onto ::after. Mirrors the Base UI button variant above so a
|
|
30
|
+
vanilla <input class="checkbox"> renders identically (indeterminate reads
|
|
31
|
+
the same as checked, matching the data-* rule). The mask is the same
|
|
32
|
+
checkmark polyline the React indicator draws. */
|
|
33
|
+
input.checkbox {
|
|
34
|
+
@apply appearance-none border-border-strong hover:border-text-muted;
|
|
35
|
+
--checkbox-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
input.checkbox:checked,
|
|
39
|
+
input.checkbox:indeterminate {
|
|
40
|
+
@apply bg-primary border-primary hover:bg-primary-hover;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input.checkbox:checked::after,
|
|
44
|
+
input.checkbox:indeterminate::after {
|
|
45
|
+
content: "";
|
|
46
|
+
@apply size-3;
|
|
47
|
+
background-color: var(--color-primary-content);
|
|
48
|
+
-webkit-mask: var(--checkbox-check) center / contain no-repeat;
|
|
49
|
+
mask: var(--checkbox-check) center / contain no-repeat;
|
|
50
|
+
}
|
|
51
|
+
|
|
28
52
|
/* A <label> wrapping a checkbox + text lays out inline with a small gap.
|
|
29
53
|
Covers both the vanilla input.checkbox and Base UI's button.checkbox. */
|
|
30
54
|
label:has(> .checkbox) {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.dialog::backdrop {
|
|
29
|
-
background:
|
|
29
|
+
background: var(--color-scrim);
|
|
30
30
|
transition:
|
|
31
31
|
display 150ms allow-discrete,
|
|
32
32
|
overlay 150ms allow-discrete,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
transform: translateY(-0.5rem) scale(0.98);
|
|
41
41
|
}
|
|
42
42
|
.dialog[open]::backdrop {
|
|
43
|
-
background:
|
|
43
|
+
background: transparent;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -66,8 +66,18 @@
|
|
|
66
66
|
@apply px-5 -mt-2 mb-3 text-sm text-text-muted;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/* `flex-1 min-h-0` lets the body fill the remaining height and shrink below
|
|
70
|
+
its content (a flex item's default `min-height: auto` would refuse to), so
|
|
71
|
+
tall content scrolls here while the header/footer stay pinned. */
|
|
69
72
|
.dialog-body {
|
|
70
|
-
@apply px-5 py-3 overflow-y-auto flex flex-col gap-3;
|
|
73
|
+
@apply flex-1 min-h-0 px-5 py-3 overflow-y-auto flex flex-col gap-3;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* When the body is wrapped in a `<form>` (the form-dialog pattern), the form
|
|
77
|
+
becomes the dialog's sole flex child — make it the flex column so the body's
|
|
78
|
+
`flex-1 min-h-0` still resolves and scrolls. */
|
|
79
|
+
.dialog > form {
|
|
80
|
+
@apply flex flex-col min-h-0 flex-1;
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
.dialog-footer {
|
package/src/components/index.css
CHANGED
package/src/components/kbd.css
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
rounded border border-border
|
|
8
8
|
bg-surface-strong text-text-muted
|
|
9
9
|
text-[0.75em] font-mono leading-none align-middle
|
|
10
|
-
whitespace-nowrap;
|
|
11
|
-
font-variant-numeric: tabular-nums;
|
|
10
|
+
whitespace-nowrap tabular-nums;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
/* Cluster of `.kbd` chips. Always emitted by the React `<Kbd>` component so
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
/* Outer section — owns striped,
|
|
2
|
+
/* Outer section — owns striped, hide-if-empty modifiers. Title
|
|
3
3
|
(optional) and the items grid stack vertically. */
|
|
4
4
|
.property-list {
|
|
5
5
|
@apply flex flex-col text-sm text-text;
|
|
@@ -18,23 +18,18 @@
|
|
|
18
18
|
|
|
19
19
|
.property-list-label,
|
|
20
20
|
.property-list-value {
|
|
21
|
-
|
|
22
|
-
align-items: center;
|
|
23
|
-
padding: 0.375rem 0.75rem;
|
|
24
|
-
min-height: 2rem;
|
|
21
|
+
@apply flex items-center px-3 py-1.5 min-h-8;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
.property-list-label {
|
|
28
25
|
@apply text-text-muted;
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
/* `min-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
/* `min-w-0` lets the value's grid track shrink below its content; pair it
|
|
29
|
+
with `break-words` so long unbreakable values (IDs, hashes, emails, URLs,
|
|
30
|
+
file paths) break instead of overflowing the column. */
|
|
34
31
|
.property-list-value {
|
|
35
|
-
gap
|
|
36
|
-
min-width: 0;
|
|
37
|
-
overflow-wrap: break-word;
|
|
32
|
+
@apply gap-2 min-w-0 break-words;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
/* Compact density — tighter rows for sidebar info blocks or very many
|
|
@@ -45,8 +40,7 @@
|
|
|
45
40
|
|
|
46
41
|
.property-list-compact .property-list-label,
|
|
47
42
|
.property-list-compact .property-list-value {
|
|
48
|
-
|
|
49
|
-
min-height: 1.5rem;
|
|
43
|
+
@apply px-2 py-0.5 min-h-6;
|
|
50
44
|
}
|
|
51
45
|
|
|
52
46
|
/* Numeric — right-align + tabular-nums on the value. */
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/*
|
|
3
|
+
* Long-form rendered HTML — markdown output, CMS bodies, anything you can't
|
|
4
|
+
* annotate with the system's semantic class names. The global reset strips
|
|
5
|
+
* margins, list markers, and link styling from bare elements (so admin chrome
|
|
6
|
+
* stays neutral); `.prose` re-establishes them for its descendants only, using
|
|
7
|
+
* the semantic tokens so it follows dark mode and `--color-*` overrides.
|
|
8
|
+
*
|
|
9
|
+
* Descendant rules use `:where()` to stay at specificity 0 — a consumer's own
|
|
10
|
+
* `.prose a { … }` wins without `!important`.
|
|
11
|
+
*/
|
|
12
|
+
.prose {
|
|
13
|
+
@apply text-sm leading-normal text-text;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Vertical rhythm — space between flow blocks, none at the container edges. */
|
|
17
|
+
.prose :where(p, ul, ol, blockquote, pre, table, figure) {
|
|
18
|
+
@apply my-3;
|
|
19
|
+
}
|
|
20
|
+
.prose > :first-child {
|
|
21
|
+
margin-top: 0;
|
|
22
|
+
}
|
|
23
|
+
.prose > :last-child {
|
|
24
|
+
margin-bottom: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Headings — base.css already sizes h1–h3; here we add h4–h6 and the
|
|
28
|
+
sectioning rhythm. The edge reset above zeroes a leading heading's margin. */
|
|
29
|
+
.prose :where(h1, h2, h3, h4, h5, h6) {
|
|
30
|
+
@apply mt-6 mb-2 font-semibold leading-tight;
|
|
31
|
+
}
|
|
32
|
+
.prose :where(h4) {
|
|
33
|
+
@apply text-sm;
|
|
34
|
+
}
|
|
35
|
+
.prose :where(h5, h6) {
|
|
36
|
+
@apply text-xs uppercase tracking-wide text-text-muted;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Lists — restore the markers the reset removes. */
|
|
40
|
+
.prose :where(ul) {
|
|
41
|
+
@apply list-disc ps-5;
|
|
42
|
+
}
|
|
43
|
+
.prose :where(ol) {
|
|
44
|
+
@apply list-decimal ps-5;
|
|
45
|
+
}
|
|
46
|
+
.prose :where(li) {
|
|
47
|
+
@apply my-1;
|
|
48
|
+
}
|
|
49
|
+
/* Loose lists wrap each item's text in <p> — tighten those back down. */
|
|
50
|
+
.prose :where(li) :where(p) {
|
|
51
|
+
@apply my-1;
|
|
52
|
+
}
|
|
53
|
+
/* Nested lists hug their parent item rather than taking full block spacing. */
|
|
54
|
+
.prose :where(li > ul, li > ol) {
|
|
55
|
+
@apply my-1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Links — the .link treatment without needing the class on every anchor. */
|
|
59
|
+
.prose :where(a) {
|
|
60
|
+
@apply rounded-sm text-link underline underline-offset-2
|
|
61
|
+
hover:text-link-hover
|
|
62
|
+
focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Inline code — a tinted chip. */
|
|
66
|
+
.prose :where(code) {
|
|
67
|
+
@apply rounded border border-border bg-code-surface px-1 py-0.5
|
|
68
|
+
font-mono text-code-text;
|
|
69
|
+
font-size: 0.85em;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Code blocks — the .code-block surface; strip the inline chip off nested
|
|
73
|
+
<code> so a highlighter's own tokens show through. */
|
|
74
|
+
.prose :where(pre) {
|
|
75
|
+
@apply rounded-lg bg-code-surface p-3 font-mono text-sm text-code-text;
|
|
76
|
+
white-space: pre;
|
|
77
|
+
overflow-x: auto;
|
|
78
|
+
}
|
|
79
|
+
.prose :where(pre) code {
|
|
80
|
+
@apply rounded-none border-0 bg-transparent p-0;
|
|
81
|
+
font-size: inherit;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Blockquote — a quiet inline-start rule. */
|
|
85
|
+
.prose :where(blockquote) {
|
|
86
|
+
@apply border-s-2 border-border-strong ps-3 text-text-muted;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Thematic break. */
|
|
90
|
+
.prose :where(hr) {
|
|
91
|
+
@apply my-6 border-0 border-t border-border;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Tables — adopt the .table look for markdown's simple grids. */
|
|
95
|
+
.prose :where(table) {
|
|
96
|
+
@apply w-full border-collapse text-sm;
|
|
97
|
+
}
|
|
98
|
+
.prose :where(th, td) {
|
|
99
|
+
@apply border-b border-border px-3 py-2 text-start align-top;
|
|
100
|
+
}
|
|
101
|
+
.prose :where(thead th) {
|
|
102
|
+
@apply font-semibold text-text-muted;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Media + emphasis. */
|
|
106
|
+
.prose :where(img) {
|
|
107
|
+
@apply h-auto max-w-full rounded-md;
|
|
108
|
+
}
|
|
109
|
+
.prose :where(figcaption) {
|
|
110
|
+
@apply mt-1 text-xs text-text-muted;
|
|
111
|
+
}
|
|
112
|
+
.prose :where(strong) {
|
|
113
|
+
@apply font-semibold;
|
|
114
|
+
}
|
|
115
|
+
}
|
package/src/components/radio.css
CHANGED
|
@@ -24,6 +24,23 @@
|
|
|
24
24
|
@apply inline-flex size-1.5 rounded-full bg-primary-content;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/* Native input variant: state is driven by :checked, the dot is ::after.
|
|
28
|
+
Mirrors the Base UI span variant above so a vanilla <input class="radio">
|
|
29
|
+
renders identically (the dot matches .radio-indicator's size + colour). */
|
|
30
|
+
input.radio {
|
|
31
|
+
@apply appearance-none border-border-strong hover:border-text-muted;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
input.radio:checked {
|
|
35
|
+
@apply bg-primary border-primary hover:bg-primary-hover;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
input.radio:checked::after {
|
|
39
|
+
content: "";
|
|
40
|
+
@apply size-1.5 rounded-full;
|
|
41
|
+
background-color: var(--color-primary-content);
|
|
42
|
+
}
|
|
43
|
+
|
|
27
44
|
.radio-group {
|
|
28
45
|
@apply inline-flex flex-wrap gap-4;
|
|
29
46
|
}
|
|
@@ -37,12 +37,16 @@
|
|
|
37
37
|
|
|
38
38
|
/* Native <select> usage: same class, but suppress the native chevron and
|
|
39
39
|
supply our own via background-image so the look matches the Base UI
|
|
40
|
-
trigger.
|
|
41
|
-
|
|
40
|
+
trigger. A bare native <select> is a replaced element and can't host a
|
|
41
|
+
tinted `::after` (the React trigger uses a real `.select-icon` SVG), and
|
|
42
|
+
data URIs can't read CSS variables — so the chevron can't ride the
|
|
43
|
+
`--color-text-muted` token directly. The stroke is Flexoki `base-500`
|
|
44
|
+
(#848484), the same mid-gray as the token's dark-mode value, which reads
|
|
45
|
+
as a neutral chevron in both light and dark mode. */
|
|
42
46
|
select.select {
|
|
43
47
|
appearance: none;
|
|
44
48
|
padding-right: 2rem;
|
|
45
|
-
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%
|
|
49
|
+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23848484' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
|
|
46
50
|
background-repeat: no-repeat;
|
|
47
51
|
background-position: right 0.5rem center;
|
|
48
52
|
background-size: 1rem;
|
package/src/components/tabs.css
CHANGED
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
@apply pt-3 outline-none;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
/* Vanilla radio-input pattern: only the panel whose data-
|
|
201
|
+
/* Vanilla radio-input pattern: only the panel whose data-value matches the
|
|
202
202
|
checked input is shown. Each .tabs root scopes its own selectors. */
|
|
203
203
|
.tabs .tab-panel {
|
|
204
204
|
display: none;
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* Grow with content (Chromium 123+; degrades to a fixed resizable box
|
|
36
|
-
elsewhere). `min-h-*`
|
|
37
|
-
with a consumer `max-height`. Manual drag-resize is
|
|
38
|
-
content-driven. */
|
|
36
|
+
elsewhere). The floor is the larger of the base `min-h-*` and the `rows`
|
|
37
|
+
attribute; cap growth with a consumer `max-height`. Manual drag-resize is
|
|
38
|
+
off — height is content-driven. */
|
|
39
39
|
.textarea-autosize {
|
|
40
40
|
field-sizing: content;
|
|
41
41
|
resize: none;
|
package/src/theme.css
CHANGED
|
@@ -219,6 +219,11 @@
|
|
|
219
219
|
--color-code-surface: light-dark(var(--color-base-150), var(--color-base-950));
|
|
220
220
|
--color-code-text: light-dark(var(--color-base-800), var(--color-base-200));
|
|
221
221
|
|
|
222
|
+
/* Modal scrim — the dimming layer behind a `<dialog>` and the mobile
|
|
223
|
+
sidebar drawer. One tint from black so both overlays match and stay
|
|
224
|
+
retintable from a single token. */
|
|
225
|
+
--color-scrim: color-mix(in oklab, var(--color-black) 40%, transparent);
|
|
226
|
+
|
|
222
227
|
/* Primary — high-contrast neutral (ink). Inverts with the mode: near-black
|
|
223
228
|
on light surfaces, near-white on dark ones, so a solid `btn-primary` fill
|
|
224
229
|
always reads against the surface. Unlike the colored accents, `-hover`
|