@adia-ai/web-components 0.7.5 → 0.7.6
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 +21 -0
- package/components/action-list/action-list.a2ui.json +2 -2
- package/components/action-list/action-list.yaml +2 -2
- package/components/badge/badge.yaml +1 -0
- package/components/block/block.class.js +20 -4
- package/components/block/block.css +18 -13
- package/components/button/button.a2ui.json +1 -2
- package/components/button/button.css +17 -6
- package/components/button/button.yaml +1 -0
- package/components/card/card.yaml +1 -0
- package/components/chart/chart.a2ui.json +1 -2
- package/components/chart/chart.d.ts +1 -1
- package/components/chart/chart.yaml +1 -0
- package/components/check/check.a2ui.json +0 -3
- package/components/check/check.yaml +0 -2
- package/components/combobox/combobox.a2ui.json +1 -2
- package/components/combobox/combobox.yaml +1 -0
- package/components/command/command.a2ui.json +0 -3
- package/components/command/command.class.js +19 -1
- package/components/command/command.yaml +0 -2
- package/components/context-menu/context-menu.class.js +1 -0
- package/components/description-list/description-list.a2ui.json +1 -2
- package/components/description-list/description-list.d.ts +1 -1
- package/components/description-list/description-list.yaml +1 -0
- package/components/field/field.class.js +1 -0
- package/components/fields/fields.class.js +1 -0
- package/components/grid/grid.yaml +2 -0
- package/components/input/input.a2ui.json +2 -14
- package/components/input/input.yaml +2 -0
- package/components/integration-card/integration-card.class.js +1 -0
- package/components/list/list.class.js +1 -0
- package/components/list/list.yaml +1 -0
- package/components/menu/menu.class.js +1 -0
- package/components/menu/menu.css +14 -2
- package/components/pipeline-status/pipeline-status.yaml +1 -0
- package/components/radio/radio.a2ui.json +0 -3
- package/components/radio/radio.yaml +0 -2
- package/components/rating/rating.yaml +1 -0
- package/components/search/search.a2ui.json +1 -8
- package/components/search/search.yaml +1 -5
- package/components/select/select.a2ui.json +1 -2
- package/components/select/select.class.js +46 -1
- package/components/select/select.test.js +33 -0
- package/components/select/select.yaml +2 -0
- package/components/slider/slider.a2ui.json +0 -3
- package/components/slider/slider.yaml +0 -2
- package/components/swatch/swatch.class.js +1 -0
- package/components/table/table.a2ui.json +2 -4
- package/components/table/table.d.ts +2 -2
- package/components/table/table.yaml +2 -0
- package/components/tabs/tabs.yaml +1 -0
- package/components/tag/tag.yaml +1 -0
- package/components/toggle-group/toggle-group.yaml +1 -0
- package/components/toolbar/toolbar.class.js +1 -0
- package/components/tree/tree.a2ui.json +2 -2
- package/components/tree/tree.yaml +2 -2
- package/dist/host.min.css +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +28 -28
- package/index.css +11 -17
- package/package.json +1 -1
- package/styles/api/sizing.css +18 -6
- package/styles/foundation/space.css +33 -0
- package/styles/host.css +20 -22
- package/styles/index.css +14 -17
- package/styles/verse.css +14 -0
package/index.css
CHANGED
|
@@ -3,25 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* <link rel="stylesheet" href="@adia-ai/web-components/css" />
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* tree) → component styles → global resets.
|
|
11
|
-
*
|
|
12
|
-
* Composite-element CSS (chat-shell, editor-shell, admin-shell, etc.)
|
|
13
|
-
* lives in the sibling `@adia-ai/web-modules` package as of 0.0.29
|
|
14
|
-
* (see ADR-0012). Each page links its own cluster CSS explicitly.
|
|
15
|
-
* Opinionated theme overrides live in `./styles/themes.css`; link
|
|
16
|
-
* them separately when you want the 8 named themes.
|
|
6
|
+
* Pulls, in cascade order: design tokens → global resets → page-frame →
|
|
7
|
+
* all primitive component styles. Composite-element CSS (chat-shell,
|
|
8
|
+
* editor-shell, admin-shell, etc.) lives in the sibling @adia-ai/web-modules
|
|
9
|
+
* package; link its barrel separately when needed.
|
|
17
10
|
*
|
|
18
11
|
* If you need a subset, skip this file and link the layers directly:
|
|
19
|
-
* @adia-ai/web-components/styles/
|
|
20
|
-
* @adia-ai/web-components/styles/
|
|
21
|
-
* @adia-ai/web-components/styles/
|
|
22
|
-
* @adia-ai/web-components/styles/themes.css
|
|
23
|
-
* @adia-ai/web-components/styles/prose.css
|
|
24
|
-
* @adia-ai/web-components/styles/
|
|
12
|
+
* @adia-ai/web-components/styles/host.css (tokens + resets + page-frame)
|
|
13
|
+
* @adia-ai/web-components/styles/index.css (primitives only)
|
|
14
|
+
* @adia-ai/web-components/styles/tokens.css (tokens only)
|
|
15
|
+
* @adia-ai/web-components/styles/themes.css (optional — named theme presets)
|
|
16
|
+
* @adia-ai/web-components/styles/prose.css (optional — prose context)
|
|
17
|
+
* @adia-ai/web-components/styles/verse.css (optional — compact density)
|
|
25
18
|
*/
|
|
26
19
|
|
|
20
|
+
@import "./styles/host.css";
|
|
27
21
|
@import "./styles/index.css";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "AdiaUI web components \u2014 vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|
package/styles/api/sizing.css
CHANGED
|
@@ -238,9 +238,16 @@
|
|
|
238
238
|
[padding="12"] { --a-padding: var(--a-space-12); }
|
|
239
239
|
[padding="16"] { --a-padding: var(--a-space-16); }
|
|
240
240
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
/* Named scale — parametric (value × --a-padding-k), xs–xl; references the
|
|
242
|
+
--a-padding-* tokens (foundation/space.css), so it tracks the --a-padding-k
|
|
243
|
+
knob and composes on --a-density. sm/md/lg keep their prior values
|
|
244
|
+
(16/24/32px @k=1) — behavior-neutral; xs (8) + xl (40) are new. Distinct
|
|
245
|
+
from the integer rules above, which are LITERAL space-rungs (k-independent). */
|
|
246
|
+
[padding="xs"] { --a-padding: var(--a-padding-xs); }
|
|
247
|
+
[padding="sm"] { --a-padding: var(--a-padding-sm); }
|
|
248
|
+
[padding="md"] { --a-padding: var(--a-padding-md); }
|
|
249
|
+
[padding="lg"] { --a-padding: var(--a-padding-lg); }
|
|
250
|
+
[padding="xl"] { --a-padding: var(--a-padding-xl); }
|
|
244
251
|
|
|
245
252
|
[margin="0"] { --a-margin: 0; }
|
|
246
253
|
[margin="1"] { --a-margin: var(--a-space-1); }
|
|
@@ -256,6 +263,11 @@
|
|
|
256
263
|
[margin="12"] { --a-margin: var(--a-space-12); }
|
|
257
264
|
[margin="16"] { --a-margin: var(--a-space-16); }
|
|
258
265
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
266
|
+
/* Named scale — parametric (value × --a-margin-k), xs–xl; references the
|
|
267
|
+
--a-margin-* tokens (foundation/space.css). sm/md/lg unchanged (16/24/32px
|
|
268
|
+
@k=1) — behavior-neutral; xs (8) + xl (40) added; tracks --a-margin-k. */
|
|
269
|
+
[margin="xs"] { --a-margin: var(--a-margin-xs); }
|
|
270
|
+
[margin="sm"] { --a-margin: var(--a-margin-sm); }
|
|
271
|
+
[margin="md"] { --a-margin: var(--a-margin-md); }
|
|
272
|
+
[margin="lg"] { --a-margin: var(--a-margin-lg); }
|
|
273
|
+
[margin="xl"] { --a-margin: var(--a-margin-xl); }
|
|
@@ -23,6 +23,22 @@
|
|
|
23
23
|
initial-value: 1;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/* Padding/margin-scale knobs — multiply the named [padding]/[margin] scale
|
|
27
|
+
(--a-{padding,margin}-{xs,sm,md,lg,xl}), same form + semantics as --a-gap-k.
|
|
28
|
+
k=1 (default) = base; <1 tightens, >1 loosens (k=0 → 0). Per-dimension so a
|
|
29
|
+
provider can retune box padding/margin independently of gap. Inherits — set
|
|
30
|
+
at a provider boundary (declaration-site compute, as with --a-density). */
|
|
31
|
+
@property --a-padding-k {
|
|
32
|
+
syntax: "<number>";
|
|
33
|
+
inherits: true;
|
|
34
|
+
initial-value: 1;
|
|
35
|
+
}
|
|
36
|
+
@property --a-margin-k {
|
|
37
|
+
syntax: "<number>";
|
|
38
|
+
inherits: true;
|
|
39
|
+
initial-value: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
26
42
|
:root {
|
|
27
43
|
/* ── Spacing ── */
|
|
28
44
|
--a-space-0: 0;
|
|
@@ -61,4 +77,21 @@
|
|
|
61
77
|
--a-gap-lg: calc(var(--a-space-3-5) * var(--a-gap-k)); /* 14px @k=1 */
|
|
62
78
|
--a-gap-xl: calc(var(--a-space-4) * var(--a-gap-k)); /* 16px @k=1 */
|
|
63
79
|
--a-gap: var(--a-gap-md);
|
|
80
|
+
|
|
81
|
+
/* ── Padding / margin — parametric named scale (value × --a-{padding,margin}-k),
|
|
82
|
+
xs–xl. Same FORM as the gap scale above, on the larger box-spacing rungs.
|
|
83
|
+
sm/md/lg keep their prior literal values (16/24/32px) so existing
|
|
84
|
+
[padding|margin="sm|md|lg"] are behavior-neutral; xs (8) + xl (40) are new.
|
|
85
|
+
Composes on --a-density (baked into --a-space-*). At k=1: 8/16/24/32/40px.
|
|
86
|
+
Consumed via the [padding] / [margin] attribute API (api/sizing.css). ── */
|
|
87
|
+
--a-padding-xs: calc(var(--a-space-2) * var(--a-padding-k)); /* 8px @k=1 */
|
|
88
|
+
--a-padding-sm: calc(var(--a-space-4) * var(--a-padding-k)); /* 16px @k=1 */
|
|
89
|
+
--a-padding-md: calc(var(--a-space-6) * var(--a-padding-k)); /* 24px @k=1 */
|
|
90
|
+
--a-padding-lg: calc(var(--a-space-8) * var(--a-padding-k)); /* 32px @k=1 */
|
|
91
|
+
--a-padding-xl: calc(var(--a-space-10) * var(--a-padding-k)); /* 40px @k=1 */
|
|
92
|
+
--a-margin-xs: calc(var(--a-space-2) * var(--a-margin-k)); /* 8px @k=1 */
|
|
93
|
+
--a-margin-sm: calc(var(--a-space-4) * var(--a-margin-k)); /* 16px @k=1 */
|
|
94
|
+
--a-margin-md: calc(var(--a-space-6) * var(--a-margin-k)); /* 24px @k=1 */
|
|
95
|
+
--a-margin-lg: calc(var(--a-space-8) * var(--a-margin-k)); /* 32px @k=1 */
|
|
96
|
+
--a-margin-xl: calc(var(--a-space-10) * var(--a-margin-k)); /* 40px @k=1 */
|
|
64
97
|
}
|
package/styles/host.css
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
/* adia:barrel/host — the host-page
|
|
1
|
+
/* adia:barrel/host — the slim host-page foundation.
|
|
2
2
|
|
|
3
3
|
One <link> turns a bare HTML document into an AdiaUI host:
|
|
4
4
|
|
|
5
5
|
<link rel="stylesheet" href="@adia-ai/web-components/styles/host.css" />
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
as `:where(html, body){ … font-family: var(--a-font) }` — a pattern that
|
|
13
|
-
was both redundant with resets.css and silently broken (the dead `--a-font`
|
|
14
|
-
token resolved to UA serif). Loading host.css means a host page declares
|
|
15
|
-
ZERO of that boilerplate.
|
|
7
|
+
Provides: design tokens + global resets + page-frame.
|
|
8
|
+
Does NOT include component styles — link the components barrel separately:
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="@adia-ai/web-components/styles/index.css" /> ← primitives
|
|
11
|
+
<link rel="stylesheet" href="@adia-ai/web-modules/index.css" /> ← composites (opt-in)
|
|
16
12
|
|
|
17
13
|
── Layer YOUR surface's chrome OVER it ──────────────────────────────
|
|
18
14
|
<link rel="stylesheet" href="@adia-ai/web-components/styles/host.css" />
|
|
15
|
+
<link rel="stylesheet" href="@adia-ai/web-components/styles/index.css" />
|
|
19
16
|
<link rel="stylesheet" href="/site/site.css" /> ← docs site, or
|
|
20
17
|
<style> main { max-inline-size: 60rem; … } </style> ← a demo's own CSS
|
|
21
18
|
|
|
22
|
-
Consumer rules sit ABOVE the
|
|
19
|
+
Consumer rules sit ABOVE the layered components, so they win
|
|
23
20
|
without a specificity fight.
|
|
24
21
|
|
|
25
|
-
──
|
|
22
|
+
── Opt-in add-ons (link separately when wanted) ─────────────────────
|
|
26
23
|
styles/themes.css the [data-theme] preset switcher (@layer context)
|
|
27
24
|
styles/prose.css the [prose] content context (@layer context)
|
|
28
|
-
|
|
25
|
+
styles/verse.css the [verse] compact register (opt-in density)
|
|
26
|
+
|
|
27
|
+
See ADR-0035 (foundation reorg) + ADR-0038 (cascade layers). */
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
published entry `@adia-ai/web-components/css` (index.css) stays byte-stable;
|
|
32
|
-
host.css composes it and adds the page-frame on top. */
|
|
29
|
+
@layer reset, tokens, elements, components, utilities, context, overrides;
|
|
33
30
|
|
|
34
|
-
@import "./
|
|
31
|
+
@import "./tokens.css";
|
|
32
|
+
@import "./resets.css" layer(reset);
|
|
35
33
|
|
|
36
34
|
@layer reset {
|
|
37
|
-
/* Page-frame. resets.css already floors `body
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
/* Page-frame. resets.css already floors `body`; this extends the same
|
|
36
|
+
defaults up to the document root so overscroll / rubber-band areas +
|
|
37
|
+
color-scheme match, and anchors the host font-family at :root so it
|
|
38
|
+
holds even before `body` inherits. Token-only; :where() keeps specificity
|
|
39
|
+
at (0,0,0) so any consumer html/body rule wins. */
|
|
42
40
|
:where(html) {
|
|
43
41
|
background: var(--a-bg);
|
|
44
42
|
color: var(--a-fg);
|
package/styles/index.css
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
/* adia:barrel/styles —
|
|
1
|
+
/* adia:barrel/styles — web-components primitives barrel.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.
|
|
3
|
+
Links every primitive component's styles in cascade-layer order.
|
|
4
|
+
Foundation (tokens + resets + page-frame) lives in host.css and must
|
|
5
|
+
be linked before this file:
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
<link rel="stylesheet" href="@adia-ai/web-components/styles/host.css" />
|
|
8
|
+
<link rel="stylesheet" href="@adia-ai/web-components/styles/index.css" />
|
|
9
|
+
|
|
10
|
+
Opt-in layers (theme presets, prose context, verse density) are linked
|
|
11
|
+
separately — styles/themes.css, styles/prose.css, styles/verse.css.
|
|
12
|
+
|
|
13
|
+
Composite-element CSS (chat-shell, editor-shell, admin-shell, etc.)
|
|
14
|
+
lives in @adia-ai/web-modules — link its barrel separately:
|
|
15
|
+
|
|
16
|
+
<link rel="stylesheet" href="@adia-ai/web-modules/index.css" /> */
|
|
11
17
|
|
|
12
|
-
/* Cascade-layer order — ADR-0038, GS-P2-SPEC-1 §8 step 1.
|
|
13
|
-
Declares the precedence order once, up front. INERT until rules are assigned
|
|
14
|
-
to layers: with every import below still unlayered, all rules stay in the
|
|
15
|
-
(highest-priority) unlayered context, so the resolved cascade is unchanged —
|
|
16
|
-
proven behavior-neutral by the dist-bundle fingerprint at commit time.
|
|
17
|
-
Later cuts move each import into its layer (e.g. `… layer(tokens)`), one at
|
|
18
|
-
a time, each re-fingerprinted. */
|
|
19
18
|
@layer reset, tokens, elements, components, utilities, context, overrides;
|
|
20
19
|
|
|
21
|
-
@import "./tokens.css";
|
|
22
20
|
@import "./components.css" layer(components);
|
|
23
|
-
@import "./resets.css" layer(reset);
|
package/styles/verse.css
CHANGED
|
@@ -63,6 +63,16 @@
|
|
|
63
63
|
--a-size-lg: calc(var(--a-density) * 1.5rem); /* 24px */
|
|
64
64
|
--a-size: var(--a-size-md);
|
|
65
65
|
|
|
66
|
+
/* ── Icon / caret — shifted down one tier so chrome tracks verse's
|
|
67
|
+
smaller type + controls. The select/combobox caret is an <icon-ui>
|
|
68
|
+
reading --a-icon-size; CSS-drawn carets (calendar / nav-group / pane)
|
|
69
|
+
read --a-caret-size — both shrink here. md = regular-sm (14/12),
|
|
70
|
+
lg = regular-md (16/14), sm one below (12/10). Like --a-size, these
|
|
71
|
+
need explicit [size] tier rules below: the global [size] icon/caret
|
|
72
|
+
rules live in the utilities layer, which `context` shadows. ── */
|
|
73
|
+
--a-icon-size: 14px;
|
|
74
|
+
--a-caret-size: 12px;
|
|
75
|
+
|
|
66
76
|
/* ── Typography — compact register (deduced; static, no fluid clamps;
|
|
67
77
|
floored at 10px). VALUES only — pointers live under :not([size]). ── */
|
|
68
78
|
--a-display-sm: 18px; --a-display-md: 23px; --a-display-lg: 29px;
|
|
@@ -112,11 +122,15 @@
|
|
|
112
122
|
--a-inset: var(--a-inset-lg);
|
|
113
123
|
--a-gap: var(--a-gap-lg);
|
|
114
124
|
--a-size: var(--a-size-lg);
|
|
125
|
+
--a-icon-size: 16px;
|
|
126
|
+
--a-caret-size: 14px;
|
|
115
127
|
}
|
|
116
128
|
[verse][size="sm"],
|
|
117
129
|
[verse] [size="sm"] {
|
|
118
130
|
--a-inset: var(--a-inset-sm);
|
|
119
131
|
--a-gap: var(--a-gap-sm);
|
|
120
132
|
--a-size: var(--a-size-sm);
|
|
133
|
+
--a-icon-size: 12px;
|
|
134
|
+
--a-caret-size: 10px;
|
|
121
135
|
}
|
|
122
136
|
}
|