@adia-ai/web-components 0.6.47 → 0.6.49
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/CHANGELOG.md +73 -0
- package/components/badge/badge.d.ts +14 -0
- package/components/button/button.a2ui.json +1 -4
- package/components/button/button.d.ts +1 -1
- package/components/button/button.yaml +0 -3
- package/components/calendar-grid/calendar-grid.a2ui.json +5 -0
- package/components/calendar-grid/calendar-grid.class.js +8 -1
- package/components/calendar-grid/calendar-grid.css +20 -11
- package/components/calendar-grid/calendar-grid.d.ts +2 -0
- package/components/calendar-grid/calendar-grid.yaml +8 -0
- package/components/calendar-picker/calendar-picker.css +19 -10
- package/components/card/card.a2ui.json +2 -5
- package/components/card/card.css +3 -1
- package/components/card/card.d.ts +2 -2
- package/components/card/card.yaml +2 -5
- package/components/date-range-picker/date-range-picker.class.js +9 -0
- package/components/date-range-picker/date-range-picker.css +10 -1
- package/components/field/field.test.js +7 -2
- package/components/heatmap/heatmap.a2ui.json +2 -0
- package/components/heatmap/heatmap.d.ts +1 -1
- package/components/heatmap/heatmap.yaml +2 -0
- package/components/index.js +1 -0
- package/components/preview/preview.a2ui.json +93 -0
- package/components/preview/preview.class.js +178 -0
- package/components/preview/preview.css +176 -0
- package/components/preview/preview.d.ts +24 -0
- package/components/preview/preview.js +22 -0
- package/components/preview/preview.yaml +100 -0
- package/components/progress/progress.a2ui.json +2 -7
- package/components/progress/progress.d.ts +2 -2
- package/components/progress/progress.yaml +3 -8
- package/components/progress-row/progress-row.a2ui.json +1 -3
- package/components/progress-row/progress-row.d.ts +1 -1
- package/components/progress-row/progress-row.yaml +0 -2
- package/components/select/select.a2ui.json +2 -4
- package/components/select/select.yaml +2 -2
- package/components/tabs/tabs.a2ui.json +1 -4
- package/components/tabs/tabs.d.ts +2 -2
- package/components/tabs/tabs.yaml +2 -2
- package/core/anchor.js +5 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +75 -73
- package/index.css +6 -6
- package/package.json +1 -1
- package/styles/README.md +71 -36
- package/styles/api/layout.css +19 -0
- package/styles/api/sizing.css +225 -0
- package/styles/api/text.css +106 -0
- package/styles/colors/semantics/aliases.css +32 -0
- package/styles/colors/semantics/buckets.css +64 -0
- package/styles/colors/semantics/core.css +317 -0
- package/styles/colors/semantics/data-viz.css +129 -0
- package/styles/colors/semantics/features.css +114 -0
- package/styles/colors/semantics.css +10 -619
- package/styles/components.css +1 -0
- package/styles/foundation/elevation.css +29 -0
- package/styles/foundation/index.css +11 -0
- package/styles/foundation/motion.css +10 -0
- package/styles/foundation/radius.css +27 -0
- package/styles/foundation/size.css +33 -0
- package/styles/foundation/space.css +47 -0
- package/styles/index.css +14 -0
- package/styles/resets.css +17 -25
- package/styles/tokens.css +16 -384
- package/styles/type/elements.css +225 -0
- package/styles/type/roles.css +419 -0
- package/styles/type/scale.css +89 -0
- package/styles/typography.css +11 -809
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* adia:primitive/elevation — Shadow primitives (L1).
|
|
2
|
+
Material-style soft, diffused 4-layer shadows: ambient + penumbra +
|
|
3
|
+
umbra + contact edge. Hue-tinted via neutral hue. --a-shadow-intensity
|
|
4
|
+
lets themes control shadow strength (0 = flat, 2 = heavy).
|
|
5
|
+
Moved verbatim out of tokens.css (v0.6.48 foundation reorg, ADR-0035). */
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--a-shadow-intensity: 1;
|
|
9
|
+
--a-shadow-color: oklch(0.2 0.01 var(--a-neutral-hue));
|
|
10
|
+
/* Per-layer alpha is applied via the oklch(from …) relative-color
|
|
11
|
+
syntax — the legacy `var(--c) / alpha` form is invalid outside a
|
|
12
|
+
color function and silently resolved to `box-shadow: none` (latent
|
|
13
|
+
bug fixed 2026-04-27). */
|
|
14
|
+
--a-shadow-sm:
|
|
15
|
+
0 0.5px 0.5px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity))),
|
|
16
|
+
0 0.5px 1.5px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
17
|
+
0 2px 4px oklch(from var(--a-shadow-color) l c h / calc(0.02 * var(--a-shadow-intensity))),
|
|
18
|
+
0 0 1px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity)));
|
|
19
|
+
--a-shadow-md:
|
|
20
|
+
0 0.5px 1px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity))),
|
|
21
|
+
0 1.5px 3px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
22
|
+
0 4px 12px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
23
|
+
0 0 1px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity)));
|
|
24
|
+
--a-shadow-lg:
|
|
25
|
+
0 2px 4px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
26
|
+
0 4px 8px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
27
|
+
0 8px 24px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity))),
|
|
28
|
+
0 0 1px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity)));
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* adia:barrel/foundation — non-color, non-type primitive scales (L1).
|
|
2
|
+
Imported by the tokens.css compat barrel AFTER colors + typography,
|
|
3
|
+
reproducing the historical cascade position of these primitives
|
|
4
|
+
(they previously lived inline in the single :root block of tokens.css).
|
|
5
|
+
Splitting one :root into five is cascade-inert: every token is declared
|
|
6
|
+
exactly once, so block grouping cannot change any computed value. */
|
|
7
|
+
@import "./space.css";
|
|
8
|
+
@import "./radius.css";
|
|
9
|
+
@import "./size.css";
|
|
10
|
+
@import "./motion.css";
|
|
11
|
+
@import "./elevation.css";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* adia:primitive/motion — Duration + easing primitives (L1).
|
|
2
|
+
Moved verbatim out of tokens.css (v0.6.48 foundation reorg, ADR-0035). */
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--a-duration-fast: 120ms;
|
|
6
|
+
--a-duration: 250ms;
|
|
7
|
+
--a-duration-slow: 300ms;
|
|
8
|
+
--a-easing: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
9
|
+
--a-easing-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* adia:primitive/radius — Corner-radius primitive scale (L1).
|
|
2
|
+
Parametric: each token = clamp(min, --a-radius-k × base, max). At k=1,
|
|
3
|
+
values match the original fixed scale. k=0 → sharp (clamped to min);
|
|
4
|
+
k=2 → extra round (clamped to max).
|
|
5
|
+
Moved verbatim out of tokens.css (v0.6.48 foundation reorg, ADR-0035). */
|
|
6
|
+
|
|
7
|
+
@property --a-radius-k {
|
|
8
|
+
syntax: "<number>";
|
|
9
|
+
inherits: true;
|
|
10
|
+
initial-value: 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
--a-radius-min: 0.25rem;
|
|
15
|
+
--a-radius-max: 1.25rem;
|
|
16
|
+
/* §230-bundle (v0.5.9): xs scale notch added for badge / sub-tile / inline-pill use cases needing smaller radius than `sm`. */
|
|
17
|
+
--a-radius-xs-k: 0.166;
|
|
18
|
+
--a-radius-sm-k: 0.333;
|
|
19
|
+
--a-radius-md-k: 0.666;
|
|
20
|
+
--a-radius-lg-k: 1.000;
|
|
21
|
+
--a-radius-xs: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-xs-k)), var(--a-radius-max));
|
|
22
|
+
--a-radius-sm: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-sm-k)), var(--a-radius-max));
|
|
23
|
+
--a-radius-md: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-md-k)), var(--a-radius-max));
|
|
24
|
+
--a-radius-lg: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-lg-k)), var(--a-radius-max));
|
|
25
|
+
--a-radius-full: 100rem;
|
|
26
|
+
--a-radius: var(--a-radius-md);
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* adia:primitive/size — Component / chrome / icon sizing primitives (L1).
|
|
2
|
+
Component heights scale with --a-density (registered in space.css).
|
|
3
|
+
Chrome heights are fixed structural measurements (not density-scaled).
|
|
4
|
+
Moved verbatim out of tokens.css (v0.6.48 foundation reorg, ADR-0035). */
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
/* ── Sizing (component heights) ──
|
|
8
|
+
Heights scale with density via the space tokens. */
|
|
9
|
+
--a-size-sm: calc(var(--a-density) * 1.5rem); /* 24px at d=1 */
|
|
10
|
+
--a-size-md: calc(var(--a-density) * 1.875rem); /* 30px at d=1 */
|
|
11
|
+
--a-size-lg: calc(var(--a-density) * 2.25rem); /* 36px at d=1 */
|
|
12
|
+
--a-size: var(--a-size-md);
|
|
13
|
+
|
|
14
|
+
/* ── Chrome heights — global app/feature UI ──
|
|
15
|
+
App-level chrome (top-level headers, footers, toolbars) is 48px;
|
|
16
|
+
pane-level chrome (pane headers, footers, toolbars) is 36px.
|
|
17
|
+
Fixed values — these are structural measurements, not typographic,
|
|
18
|
+
so they don't scale with --a-density. */
|
|
19
|
+
--a-chrome-app-header-height: 48px;
|
|
20
|
+
--a-chrome-app-footer-height: 48px;
|
|
21
|
+
--a-chrome-app-toolbar-height: 48px;
|
|
22
|
+
--a-chrome-pane-header-height: 36px;
|
|
23
|
+
--a-chrome-pane-footer-height: 36px;
|
|
24
|
+
--a-chrome-pane-toolbar-height: 36px;
|
|
25
|
+
|
|
26
|
+
/* ── Toggle-control size (check, radio, switch) ──
|
|
27
|
+
Tighter additive scale than --a-size: 16 / 20 / 24 px at d=1. */
|
|
28
|
+
--a-toggle-size: calc(var(--a-size-sm) - var(--a-space-1)); /* 20px at d=1 — md default */
|
|
29
|
+
|
|
30
|
+
/* ── Icon / caret ── */
|
|
31
|
+
--a-icon-size: 1.00rem;
|
|
32
|
+
--a-caret-size: 0.875rem;
|
|
33
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* adia:primitive/space — Spacing primitive scale (L1).
|
|
2
|
+
Parametric: each token = --a-density × base. At d=1, values match the
|
|
3
|
+
original fixed scale. Base unit 0.5rem (8px); named by multiplier of
|
|
4
|
+
0.25rem. The --a-density knob is registered here (it is fundamentally
|
|
5
|
+
the spatial-scale multiplier; --a-size-* in size.css also reads it).
|
|
6
|
+
Moved verbatim out of tokens.css (v0.6.48 foundation reorg, ADR-0035). */
|
|
7
|
+
|
|
8
|
+
@property --a-density {
|
|
9
|
+
syntax: "<number>";
|
|
10
|
+
inherits: true;
|
|
11
|
+
initial-value: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
/* ── Spacing ── */
|
|
16
|
+
--a-space-0: 0;
|
|
17
|
+
--a-space-px: 1px;
|
|
18
|
+
--a-space-0-5: calc(var(--a-density) * 0.125rem); /* 2px at d=1 */
|
|
19
|
+
--a-space-1: calc(var(--a-density) * 0.25rem); /* 4px at d=1 */
|
|
20
|
+
--a-space-1-5: calc(var(--a-density) * 0.375rem); /* 6px at d=1 */
|
|
21
|
+
--a-space-2: calc(var(--a-density) * 0.5rem); /* 8px at d=1 */
|
|
22
|
+
--a-space-2-5: calc(var(--a-density) * 0.625rem); /* 10px at d=1 */
|
|
23
|
+
--a-space-3: calc(var(--a-density) * 0.75rem); /* 12px at d=1 */
|
|
24
|
+
--a-space-3-5: calc(var(--a-density) * 0.875rem); /* 14px at d=1 */
|
|
25
|
+
--a-space-4: calc(var(--a-density) * 1rem); /* 16px at d=1 */
|
|
26
|
+
--a-space-4-5: calc(var(--a-density) * 1.125rem); /* 18px at d=1 */
|
|
27
|
+
--a-space-5: calc(var(--a-density) * 1.25rem); /* 20px at d=1 */
|
|
28
|
+
--a-space-6: calc(var(--a-density) * 1.5rem); /* 24px at d=1 */
|
|
29
|
+
--a-space-7: calc(var(--a-density) * 1.75rem); /* 28px at d=1 */
|
|
30
|
+
--a-space-8: calc(var(--a-density) * 2rem); /* 32px at d=1 */
|
|
31
|
+
--a-space-9: calc(var(--a-density) * 2.25rem); /* 36px at d=1 */
|
|
32
|
+
--a-space-10: calc(var(--a-density) * 2.5rem); /* 40px at d=1 */
|
|
33
|
+
--a-space-12: calc(var(--a-density) * 3rem); /* 48px at d=1 */
|
|
34
|
+
--a-space-16: calc(var(--a-density) * 4rem); /* 64px at d=1 */
|
|
35
|
+
|
|
36
|
+
/* ── Inset ── */
|
|
37
|
+
--a-inset-sm: var(--a-space-2);
|
|
38
|
+
--a-inset-md: var(--a-space-4);
|
|
39
|
+
--a-inset-lg: var(--a-space-6);
|
|
40
|
+
--a-inset: var(--a-inset-md);
|
|
41
|
+
|
|
42
|
+
/* ── Gaps ── */
|
|
43
|
+
--a-gap-sm: var(--a-space-2);
|
|
44
|
+
--a-gap-md: var(--a-space-3);
|
|
45
|
+
--a-gap-lg: var(--a-space-4);
|
|
46
|
+
--a-gap: var(--a-gap-md);
|
|
47
|
+
}
|
package/styles/index.css
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* adia:barrel/styles — the real all-in-one barrel.
|
|
2
|
+
|
|
3
|
+
Imports, in cascade order: design tokens (foundation + type + color +
|
|
4
|
+
the spatial attribute API, via tokens.css) → component styles → global
|
|
5
|
+
resets. This is the canonical internal barrel; the package-root
|
|
6
|
+
`index.css` re-exports it so the published `@adia-ai/web-components/css`
|
|
7
|
+
entry and the dist bundle are byte-for-byte unchanged.
|
|
8
|
+
|
|
9
|
+
Opt-in layers (theme presets, prose context) are linked separately —
|
|
10
|
+
styles/themes.css and styles/prose.css. */
|
|
11
|
+
|
|
12
|
+
@import "./tokens.css";
|
|
13
|
+
@import "./components.css";
|
|
14
|
+
@import "./resets.css";
|
package/styles/resets.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Global resets — box-sizing, scrollbar hiding, focus management,
|
|
3
|
-
*
|
|
3
|
+
* universal normalize, and the size-query provider utility.
|
|
4
4
|
*
|
|
5
|
-
* Imported
|
|
6
|
-
* defaults and universal selectors;
|
|
7
|
-
* each component's own CSS under
|
|
5
|
+
* Imported via styles/index.css (the barrel) and linked directly by most
|
|
6
|
+
* surfaces. Targets document-level defaults and universal selectors;
|
|
7
|
+
* component-scoped rules live in each component's own CSS under
|
|
8
|
+
* `@scope (component-ui)`. Element-level *typographic* defaults live in
|
|
9
|
+
* styles/type/elements.css (v0.6.48 reorg, ADR-0035), not here.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
*,
|
|
@@ -94,9 +96,15 @@ ol[role='list'] {
|
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
|
|
99
|
+
/* Global focus fallback for focusable elements WITHOUT their own @scope
|
|
100
|
+
focus styling (plain <a>, [tabindex], etc.). Components override via
|
|
101
|
+
--a-focus-ring. `Highlight` (system color) is deliberate — it respects the
|
|
102
|
+
OS/user focus color and forced-colors mode. Fixed v0.6.48 (ADR-0035): the
|
|
103
|
+
width hook used the dead --ui-* namespace; --a-focus-width (2px) is the live
|
|
104
|
+
token, so the computed value is unchanged (2px solid Highlight). */
|
|
97
105
|
:focus-visible {
|
|
98
|
-
outline: var(--
|
|
99
|
-
outline-offset: 2px;
|
|
106
|
+
outline: var(--a-focus-width, 2px) solid Highlight;
|
|
107
|
+
outline-offset: var(--a-focus-offset, 2px);
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
::selection {
|
|
@@ -105,22 +113,6 @@ ol[role='list'] {
|
|
|
105
113
|
border-radius: var(--a-selection-radius);
|
|
106
114
|
}
|
|
107
115
|
|
|
108
|
-
h1,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
h4,
|
|
112
|
-
h5,
|
|
113
|
-
h6 {
|
|
114
|
-
text-wrap: balance;
|
|
115
|
-
line-height: 1.1;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
p,
|
|
119
|
-
li,
|
|
120
|
-
figcaption {
|
|
121
|
-
text-wrap: pretty;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
a:not([class]) {
|
|
125
|
-
text-underline-offset: 0.12em;
|
|
126
|
-
}
|
|
116
|
+
/* Native element typography (h1-h6 balance/leading, p/li/figcaption
|
|
117
|
+
text-wrap, a underline-offset) now lives in styles/type/elements.css —
|
|
118
|
+
one home for element-level typographic defaults (v0.6.48 reorg, ADR-0035). */
|
package/styles/tokens.css
CHANGED
|
@@ -1,389 +1,21 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Tokens — Design tokens for chat-ui component system.
|
|
3
|
-
OKLCH color space · light-dark() adaptive · rem spatial units
|
|
1
|
+
/* adia:barrel/tokens — COMPAT BARREL + foundation token entry point.
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
accent reserved strictly for interactive elements.
|
|
3
|
+
Public entry point: 1090+ HTML <link>s + the `@adia-ai/web-components/styles/tokens.css`
|
|
4
|
+
export point at it, so it MUST stay at this path. As of the v0.6.48
|
|
5
|
+
foundation reorg (ADR-0035) it no longer holds token declarations
|
|
6
|
+
inline — the real foundation now lives in dimension×layer files:
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
colors/ L1→L3 color system (parameters · primitives · surfaces · scrims · semantics)
|
|
9
|
+
typography.css the type system barrel (type/{scale,roles,elements} + api/{text,layout})
|
|
10
|
+
foundation/ non-color, non-type primitive scales (space · radius · size · motion · elevation)
|
|
11
|
+
api/sizing.css the spatial attribute API ([density][radius][size][gap][padding][margin])
|
|
12
|
+
|
|
13
|
+
The import order below reproduces the historical tokens.css cascade
|
|
14
|
+
exactly: colors → typography → foundation primitives → spatial attribute
|
|
15
|
+
API. Splitting the former single :root block into per-dimension files is
|
|
16
|
+
cascade-inert (every token is declared exactly once). */
|
|
18
17
|
|
|
19
|
-
/* Color ramps + semantic role aliases + typography scale are
|
|
20
|
-
primitive-layer — every component consumes `--a-fg`, `--a-bg-*`,
|
|
21
|
-
`--a-font-family`, `--a-body-size`, etc. Kept bundled. */
|
|
22
18
|
@import "./colors/index.css";
|
|
23
19
|
@import "./typography.css";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- styles/prose.css — opt-in per-page; [prose] attribute only
|
|
27
|
-
- styles/themes.css — opt-in per-page; 8 named themes + schemes
|
|
28
|
-
Link separately from HTML when needed. */
|
|
29
|
-
|
|
30
|
-
/* ═══════════════════════════════════════════════════════════════
|
|
31
|
-
PARAMETRIC MULTIPLIERS — @property declarations
|
|
32
|
-
Two knobs that rescale the entire spatial system.
|
|
33
|
-
Set on :root for global effect, or on [density]/[radius] for scoped.
|
|
34
|
-
|
|
35
|
-
--a-density Controls ALL spatial dimensions: spacing, padding,
|
|
36
|
-
gaps, component heights. One knob for everything.
|
|
37
|
-
--a-radius-k Controls corner rounding independently.
|
|
38
|
-
═══════════════════════════════════════════════════════════════ */
|
|
39
|
-
|
|
40
|
-
@property --a-density {
|
|
41
|
-
syntax: "<number>";
|
|
42
|
-
inherits: true;
|
|
43
|
-
initial-value: 1;
|
|
44
|
-
}
|
|
45
|
-
@property --a-radius-k {
|
|
46
|
-
syntax: "<number>";
|
|
47
|
-
inherits: true;
|
|
48
|
-
initial-value: 1;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:root {
|
|
52
|
-
/* ═══════════════════════════════════════════════════════════
|
|
53
|
-
PRIMITIVES — context-free building blocks
|
|
54
|
-
═══════════════════════════════════════════════════════════ */
|
|
55
|
-
|
|
56
|
-
/* ── Spacing ──
|
|
57
|
-
Parametric: each token = --a-density × base.
|
|
58
|
-
At d=1, values match the original fixed scale.
|
|
59
|
-
Base unit: 0.5rem (8px). Named by multiplier of 0.25rem. */
|
|
60
|
-
--a-space-0: 0;
|
|
61
|
-
--a-space-px: 1px;
|
|
62
|
-
--a-space-0-5: calc(var(--a-density) * 0.125rem); /* 2px at d=1 */
|
|
63
|
-
--a-space-1: calc(var(--a-density) * 0.25rem); /* 4px at d=1 */
|
|
64
|
-
--a-space-1-5: calc(var(--a-density) * 0.375rem); /* 6px at d=1 */
|
|
65
|
-
--a-space-2: calc(var(--a-density) * 0.5rem); /* 8px at d=1 */
|
|
66
|
-
--a-space-2-5: calc(var(--a-density) * 0.625rem); /* 10px at d=1 */
|
|
67
|
-
--a-space-3: calc(var(--a-density) * 0.75rem); /* 12px at d=1 */
|
|
68
|
-
--a-space-3-5: calc(var(--a-density) * 0.875rem); /* 14px at d=1 */
|
|
69
|
-
--a-space-4: calc(var(--a-density) * 1rem); /* 16px at d=1 */
|
|
70
|
-
--a-space-4-5: calc(var(--a-density) * 1.125rem); /* 18px at d=1 */
|
|
71
|
-
--a-space-5: calc(var(--a-density) * 1.25rem); /* 20px at d=1 */
|
|
72
|
-
--a-space-6: calc(var(--a-density) * 1.5rem); /* 24px at d=1 */
|
|
73
|
-
--a-space-7: calc(var(--a-density) * 1.75rem); /* 28px at d=1 */
|
|
74
|
-
--a-space-8: calc(var(--a-density) * 2rem); /* 32px at d=1 */
|
|
75
|
-
--a-space-9: calc(var(--a-density) * 2.25rem); /* 36px at d=1 */
|
|
76
|
-
--a-space-10: calc(var(--a-density) * 2.5rem); /* 40px at d=1 */
|
|
77
|
-
--a-space-12: calc(var(--a-density) * 3rem); /* 48px at d=1 */
|
|
78
|
-
--a-space-16: calc(var(--a-density) * 4rem); /* 64px at d=1 */
|
|
79
|
-
|
|
80
|
-
/* ── Radius ──
|
|
81
|
-
Parametric: each token = clamp(min, --a-radius-k × base, max).
|
|
82
|
-
At k=1, values match the original fixed scale.
|
|
83
|
-
k=0 → sharp (clamped to min). k=2 → extra round (clamped to max). */
|
|
84
|
-
--a-radius-min: 0.25rem;
|
|
85
|
-
--a-radius-max: 1.25rem;
|
|
86
|
-
/* §230-bundle (v0.5.9): xs scale notch added for badge / sub-tile / inline-pill use cases needing smaller radius than `sm`. */
|
|
87
|
-
--a-radius-xs-k: 0.166;
|
|
88
|
-
--a-radius-sm-k: 0.333;
|
|
89
|
-
--a-radius-md-k: 0.666;
|
|
90
|
-
--a-radius-lg-k: 1.000;
|
|
91
|
-
--a-radius-xs: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-xs-k)), var(--a-radius-max));
|
|
92
|
-
--a-radius-sm: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-sm-k)), var(--a-radius-max));
|
|
93
|
-
--a-radius-md: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-md-k)), var(--a-radius-max));
|
|
94
|
-
--a-radius-lg: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-lg-k)), var(--a-radius-max));
|
|
95
|
-
--a-radius-full: 100rem;
|
|
96
|
-
--a-radius: var(--a-radius-md);
|
|
97
|
-
|
|
98
|
-
/* ── Inset ── */
|
|
99
|
-
--a-inset-sm: var(--a-space-2);
|
|
100
|
-
--a-inset-md: var(--a-space-4);
|
|
101
|
-
--a-inset-lg: var(--a-space-6);
|
|
102
|
-
--a-inset: var(--a-inset-md);
|
|
103
|
-
|
|
104
|
-
/* ── Gaps ── */
|
|
105
|
-
--a-gap-sm: var(--a-space-2);
|
|
106
|
-
--a-gap-md: var(--a-space-3);
|
|
107
|
-
--a-gap-lg: var(--a-space-4);
|
|
108
|
-
--a-gap: var(--a-gap-md);
|
|
109
|
-
|
|
110
|
-
/* ── Sizing (component heights) ──
|
|
111
|
-
Heights scale with density via the space tokens. */
|
|
112
|
-
--a-size-sm: calc(var(--a-density) * 1.5rem); /* 24px at d=1 */
|
|
113
|
-
--a-size-md: calc(var(--a-density) * 1.875rem); /* 30px at d=1 */
|
|
114
|
-
--a-size-lg: calc(var(--a-density) * 2.25rem); /* 36px at d=1 */
|
|
115
|
-
--a-size: var(--a-size-md);
|
|
116
|
-
|
|
117
|
-
/* ── Chrome heights — global app/feature UI ──
|
|
118
|
-
App-level chrome (top-level headers, footers, toolbars) is 48px;
|
|
119
|
-
pane-level chrome (pane headers, footers, toolbars) is 36px.
|
|
120
|
-
Fixed values — these are structural measurements, not typographic,
|
|
121
|
-
so they don't scale with --a-density. */
|
|
122
|
-
--a-chrome-app-header-height: 48px;
|
|
123
|
-
--a-chrome-app-footer-height: 48px;
|
|
124
|
-
--a-chrome-app-toolbar-height: 48px;
|
|
125
|
-
--a-chrome-pane-header-height: 36px;
|
|
126
|
-
--a-chrome-pane-footer-height: 36px;
|
|
127
|
-
--a-chrome-pane-toolbar-height: 36px;
|
|
128
|
-
|
|
129
|
-
/* ── Toggle-control size (check, radio, switch) ──
|
|
130
|
-
Tighter additive scale than --a-size: 16 / 20 / 24 px at d=1. */
|
|
131
|
-
--a-toggle-size: calc(var(--a-size-sm) - var(--a-space-1)); /* 20px at d=1 — md default */
|
|
132
|
-
|
|
133
|
-
/* ── Motion ── */
|
|
134
|
-
--a-duration-fast: 120ms;
|
|
135
|
-
--a-duration: 250ms;
|
|
136
|
-
--a-duration-slow: 300ms;
|
|
137
|
-
--a-easing: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
138
|
-
--a-easing-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
139
|
-
|
|
140
|
-
/* ── Shadows ──
|
|
141
|
-
Material-style soft, diffused 4-layer shadows:
|
|
142
|
-
ambient + penumbra + umbra + contact edge.
|
|
143
|
-
Hue-tinted via neutral hue. Intensity multiplier
|
|
144
|
-
allows themes to control shadow strength (0 = flat, 2 = heavy). */
|
|
145
|
-
--a-shadow-intensity: 1;
|
|
146
|
-
--a-shadow-color: oklch(0.2 0.01 var(--a-neutral-hue));
|
|
147
|
-
/* Per-layer alpha is applied via the oklch(from …) relative-color
|
|
148
|
-
syntax — the legacy `var(--c) / alpha` form is invalid outside a
|
|
149
|
-
color function and silently resolved to `box-shadow: none` (latent
|
|
150
|
-
bug fixed 2026-04-27). */
|
|
151
|
-
--a-shadow-sm:
|
|
152
|
-
0 0.5px 0.5px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity))),
|
|
153
|
-
0 0.5px 1.5px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
154
|
-
0 2px 4px oklch(from var(--a-shadow-color) l c h / calc(0.02 * var(--a-shadow-intensity))),
|
|
155
|
-
0 0 1px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity)));
|
|
156
|
-
--a-shadow-md:
|
|
157
|
-
0 0.5px 1px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity))),
|
|
158
|
-
0 1.5px 3px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
159
|
-
0 4px 12px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
160
|
-
0 0 1px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity)));
|
|
161
|
-
--a-shadow-lg:
|
|
162
|
-
0 2px 4px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
163
|
-
0 4px 8px oklch(from var(--a-shadow-color) l c h / calc(0.03 * var(--a-shadow-intensity))),
|
|
164
|
-
0 8px 24px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity))),
|
|
165
|
-
0 0 1px oklch(from var(--a-shadow-color) l c h / calc(0.04 * var(--a-shadow-intensity)));
|
|
166
|
-
|
|
167
|
-
--a-icon-size: 1.00rem;
|
|
168
|
-
--a-caret-size: 0.875rem;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* ═══════════════════════════════════════════════════════════════
|
|
172
|
-
DENSITY PRESETS — scoped via [density] attribute.
|
|
173
|
-
--a-density controls spacing, padding, gaps, AND component heights.
|
|
174
|
-
--a-radius-k is coupled for visual consistency.
|
|
175
|
-
|
|
176
|
-
Usage:
|
|
177
|
-
<div density="compact">...tight layout...</div>
|
|
178
|
-
<div density="spacious">...generous layout...</div>
|
|
179
|
-
═══════════════════════════════════════════════════════════════ */
|
|
180
|
-
|
|
181
|
-
[density="compact"] {
|
|
182
|
-
--a-density: 0.85;
|
|
183
|
-
--a-radius-k: 0.75;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
[density="spacious"] {
|
|
187
|
-
--a-density: 1.15;
|
|
188
|
-
--a-radius-k: 1.25;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* ── Radius presets — scoped via [radius] attribute ── */
|
|
192
|
-
|
|
193
|
-
[radius="sharp"] {
|
|
194
|
-
--a-radius-k: 0;
|
|
195
|
-
--a-radius-min: 0rem;
|
|
196
|
-
--a-radius-max: 0rem;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
[radius="rounded"] {
|
|
200
|
-
--a-radius-k: 1.5;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
[radius="round"] {
|
|
204
|
-
--a-radius-k: 2;
|
|
205
|
-
--a-radius-max: 3rem;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* ═══════════════════════════════════════════════════════════════
|
|
209
|
-
SIZE PRESETS — universal [size="sm|md|lg"] attribute.
|
|
210
|
-
|
|
211
|
-
Sets BOTH component tokens AND container tokens.
|
|
212
|
-
Each tier shifts the entire typescale to its sm/md/lg variant.
|
|
213
|
-
|
|
214
|
-
Component: --a-size, --a-ui-px, --a-ui-size, --a-icon-size
|
|
215
|
-
Container: --a-inset, --a-gap
|
|
216
|
-
Typography: all 13 role sizes shift to the tier's variant
|
|
217
|
-
|
|
218
|
-
Usage:
|
|
219
|
-
<button-ui size="sm"> — compact button
|
|
220
|
-
<card-ui size="lg">...</card-ui> — spacious card + larger type inside
|
|
221
|
-
<div size="sm">...</div> — everything inside scales down
|
|
222
|
-
═══════════════════════════════════════════════════════════════ */
|
|
223
|
-
/* ── sm — dense data UIs, sidebars, inspectors ── */
|
|
224
|
-
[size] {
|
|
225
|
-
font-size: var(--a-body-size);
|
|
226
|
-
}
|
|
227
|
-
[size="sm"] {
|
|
228
|
-
/* Component */
|
|
229
|
-
--a-size: calc(var(--a-density) * 1.5rem);
|
|
230
|
-
--a-toggle-size: calc(var(--a-size-sm) - var(--a-space-2)); /* 16px at d=1 */
|
|
231
|
-
--a-ui-px: var(--a-space-1-5);
|
|
232
|
-
--a-ui-size: var(--a-ui-sm);
|
|
233
|
-
--a-icon-size: 0.875rem;
|
|
234
|
-
--a-caret-size: 0.75rem;
|
|
235
|
-
/* Container */
|
|
236
|
-
--a-inset: var(--a-inset-sm);
|
|
237
|
-
--a-gap: var(--a-gap-sm);
|
|
238
|
-
--a-radius: var(--a-radius-sm);
|
|
239
|
-
/* Typography — all roles shift to -sm */
|
|
240
|
-
--a-display-size: var(--a-display-sm);
|
|
241
|
-
--a-title-size: var(--a-title-sm);
|
|
242
|
-
--a-heading-size: var(--a-heading-sm);
|
|
243
|
-
--a-section-size: var(--a-section-sm);
|
|
244
|
-
--a-subsection-size: var(--a-subsection-sm);
|
|
245
|
-
--a-body-size: var(--a-body-sm);
|
|
246
|
-
--a-deck-size: var(--a-deck-sm);
|
|
247
|
-
--a-caption-size: var(--a-caption-sm);
|
|
248
|
-
--a-kicker-size: var(--a-kicker-sm);
|
|
249
|
-
--a-label-size: var(--a-label-sm);
|
|
250
|
-
--a-metric-size: var(--a-metric-sm);
|
|
251
|
-
--a-code-size: var(--a-code-sm);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/* [size="md"] is the default — no overrides needed */
|
|
255
|
-
|
|
256
|
-
/* ── lg — pages, hero sections, marketing ── */
|
|
257
|
-
[size="lg"] {
|
|
258
|
-
/* Component */
|
|
259
|
-
--a-size: calc(var(--a-density) * 2.25rem);
|
|
260
|
-
--a-toggle-size: var(--a-size-sm); /* 24px at d=1 */
|
|
261
|
-
--a-ui-px: var(--a-space-3);
|
|
262
|
-
--a-ui-size: var(--a-ui-lg);
|
|
263
|
-
--a-icon-size: 1.25rem;
|
|
264
|
-
--a-caret-size: 1rem;
|
|
265
|
-
/* Container */
|
|
266
|
-
--a-inset: var(--a-inset-lg);
|
|
267
|
-
--a-gap: var(--a-gap-lg);
|
|
268
|
-
--a-radius: var(--a-radius-lg);
|
|
269
|
-
/* Typography — all roles shift to -lg */
|
|
270
|
-
--a-display-size: var(--a-display-lg);
|
|
271
|
-
--a-title-size: var(--a-title-lg);
|
|
272
|
-
--a-heading-size: var(--a-heading-lg);
|
|
273
|
-
--a-section-size: var(--a-section-lg);
|
|
274
|
-
--a-subsection-size: var(--a-subsection-lg);
|
|
275
|
-
--a-body-size: var(--a-body-lg);
|
|
276
|
-
--a-deck-size: var(--a-deck-lg);
|
|
277
|
-
--a-caption-size: var(--a-caption-lg);
|
|
278
|
-
--a-kicker-size: var(--a-kicker-lg);
|
|
279
|
-
--a-label-size: var(--a-label-lg);
|
|
280
|
-
--a-metric-size: var(--a-metric-lg);
|
|
281
|
-
--a-code-size: var(--a-code-lg);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
[gap="0"] {
|
|
285
|
-
--a-gap: 0;
|
|
286
|
-
}
|
|
287
|
-
[gap="1"] {
|
|
288
|
-
--a-gap: var(--a-space-1);
|
|
289
|
-
}
|
|
290
|
-
[gap="2"] {
|
|
291
|
-
--a-gap: var(--a-space-2);
|
|
292
|
-
}
|
|
293
|
-
[gap="3"] {
|
|
294
|
-
--a-gap: var(--a-space-3);
|
|
295
|
-
}
|
|
296
|
-
[gap="4"] {
|
|
297
|
-
--a-gap: var(--a-space-4);
|
|
298
|
-
}
|
|
299
|
-
[gap="5"] {
|
|
300
|
-
--a-gap: var(--a-space-5);
|
|
301
|
-
}
|
|
302
|
-
[gap="6"] {
|
|
303
|
-
--a-gap: var(--a-space-6);
|
|
304
|
-
}
|
|
305
|
-
[gap="7"] {
|
|
306
|
-
--a-gap: var(--a-space-7);
|
|
307
|
-
}
|
|
308
|
-
[gap="8"] {
|
|
309
|
-
--a-gap: var(--a-space-8);
|
|
310
|
-
}
|
|
311
|
-
[gap="9"] {
|
|
312
|
-
--a-gap: var(--a-space-9);
|
|
313
|
-
}
|
|
314
|
-
[gap="10"] {
|
|
315
|
-
--a-gap: var(--a-space-10);
|
|
316
|
-
}
|
|
317
|
-
[gap="12"] {
|
|
318
|
-
--a-gap: var(--a-space-12);
|
|
319
|
-
}
|
|
320
|
-
[gap="16"] {
|
|
321
|
-
--a-gap: var(--a-space-16);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
[gap="sm"] {
|
|
325
|
-
--a-gap: var(--a-space-4);
|
|
326
|
-
}
|
|
327
|
-
[gap="md"] {
|
|
328
|
-
--a-gap: var(--a-space-6);
|
|
329
|
-
}
|
|
330
|
-
[gap="lg"] {
|
|
331
|
-
--a-gap: var(--a-space-8);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/* ── Universal [padding] / [margin] — same scale as [gap]. Layout
|
|
335
|
-
primitives (row-ui, col-ui, grid-ui, stack-ui) opt in by reading
|
|
336
|
-
var(--a-padding, 0) and var(--a-margin, 0). Components with their
|
|
337
|
-
own padding/margin contracts (block-ui, card-ui, drawer-ui) keep
|
|
338
|
-
their scoped declarations and aren't affected.
|
|
339
|
-
|
|
340
|
-
Registered as non-inheriting via @property so a parent's
|
|
341
|
-
[padding="6"] doesn't bleed into nested layout primitives —
|
|
342
|
-
children see the initial-value (0) unless they declare their own
|
|
343
|
-
[padding] / [margin]. */
|
|
344
|
-
@property --a-padding {
|
|
345
|
-
syntax: "<length>";
|
|
346
|
-
inherits: false;
|
|
347
|
-
initial-value: 0;
|
|
348
|
-
}
|
|
349
|
-
@property --a-margin {
|
|
350
|
-
syntax: "<length>";
|
|
351
|
-
inherits: false;
|
|
352
|
-
initial-value: 0;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
[padding="0"] { --a-padding: 0; }
|
|
356
|
-
[padding="1"] { --a-padding: var(--a-space-1); }
|
|
357
|
-
[padding="2"] { --a-padding: var(--a-space-2); }
|
|
358
|
-
[padding="3"] { --a-padding: var(--a-space-3); }
|
|
359
|
-
[padding="4"] { --a-padding: var(--a-space-4); }
|
|
360
|
-
[padding="5"] { --a-padding: var(--a-space-5); }
|
|
361
|
-
[padding="6"] { --a-padding: var(--a-space-6); }
|
|
362
|
-
[padding="7"] { --a-padding: var(--a-space-7); }
|
|
363
|
-
[padding="8"] { --a-padding: var(--a-space-8); }
|
|
364
|
-
[padding="9"] { --a-padding: var(--a-space-9); }
|
|
365
|
-
[padding="10"] { --a-padding: var(--a-space-10); }
|
|
366
|
-
[padding="12"] { --a-padding: var(--a-space-12); }
|
|
367
|
-
[padding="16"] { --a-padding: var(--a-space-16); }
|
|
368
|
-
|
|
369
|
-
[padding="sm"] { --a-padding: var(--a-space-4); }
|
|
370
|
-
[padding="md"] { --a-padding: var(--a-space-6); }
|
|
371
|
-
[padding="lg"] { --a-padding: var(--a-space-8); }
|
|
372
|
-
|
|
373
|
-
[margin="0"] { --a-margin: 0; }
|
|
374
|
-
[margin="1"] { --a-margin: var(--a-space-1); }
|
|
375
|
-
[margin="2"] { --a-margin: var(--a-space-2); }
|
|
376
|
-
[margin="3"] { --a-margin: var(--a-space-3); }
|
|
377
|
-
[margin="4"] { --a-margin: var(--a-space-4); }
|
|
378
|
-
[margin="5"] { --a-margin: var(--a-space-5); }
|
|
379
|
-
[margin="6"] { --a-margin: var(--a-space-6); }
|
|
380
|
-
[margin="7"] { --a-margin: var(--a-space-7); }
|
|
381
|
-
[margin="8"] { --a-margin: var(--a-space-8); }
|
|
382
|
-
[margin="9"] { --a-margin: var(--a-space-9); }
|
|
383
|
-
[margin="10"] { --a-margin: var(--a-space-10); }
|
|
384
|
-
[margin="12"] { --a-margin: var(--a-space-12); }
|
|
385
|
-
[margin="16"] { --a-margin: var(--a-space-16); }
|
|
386
|
-
|
|
387
|
-
[margin="sm"] { --a-margin: var(--a-space-4); }
|
|
388
|
-
[margin="md"] { --a-margin: var(--a-space-6); }
|
|
389
|
-
[margin="lg"] { --a-margin: var(--a-space-8); }
|
|
20
|
+
@import "./foundation/index.css";
|
|
21
|
+
@import "./api/sizing.css";
|