@adia-ai/web-components 0.5.20 → 0.5.21
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 +4 -0
- package/components/index.d.ts +4 -0
- package/components/stat/stat.a2ui.json +3 -1
- package/components/stat/stat.d.ts +26 -0
- package/components/stat/stat.yaml +2 -0
- package/package.json +22 -12
- package/styles/components.css +1 -1
- package/components/stat/stat-ui.d.ts +0 -38
- /package/components/stat/{stat-ui.css → stat.css} +0 -0
- /package/components/stat/{stat-ui.js → stat.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,10 @@ runtime ships in the sibling `@adia-ai/a2ui-runtime` package
|
|
|
11
11
|
|
|
12
12
|
_No pending changes._
|
|
13
13
|
|
|
14
|
+
## [0.5.21] - 2026-05-18
|
|
15
|
+
|
|
16
|
+
_Lockstep ride-along (no source change in this package; companion to web-components v0.5.21 — see root CHANGELOG)._
|
|
17
|
+
|
|
14
18
|
## [0.5.20] - 2026-05-18
|
|
15
19
|
|
|
16
20
|
### Added — §353 (v0.5.20) — `<pane-ui>` + `<tabs-ui>` bar-rule alignment
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<stat-ui>` — Metric/KPI display — value + label + optional change indicator and trend.
|
|
3
|
+
*
|
|
4
|
+
* @see https://ui-kit.exe.xyz/site/components/stat
|
|
5
|
+
*
|
|
6
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
7
|
+
* the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
|
|
8
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
9
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
10
|
+
* needed beyond what the yaml `events:` block can express.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { UIElement } from '../../core/element.js';
|
|
14
|
+
|
|
15
|
+
export class UIStat extends UIElement {
|
|
16
|
+
/** Change indicator text (e.g. '+12%', '-3%') */
|
|
17
|
+
change: string;
|
|
18
|
+
/** Icon name displayed in the icon slot */
|
|
19
|
+
icon: string;
|
|
20
|
+
/** Eyebrow label describing the metric */
|
|
21
|
+
label: string;
|
|
22
|
+
/** Trend direction or narrative subtitle. Canonical values color the change badge (up=success, down=danger, neutral/flat=muted); any other string renders as caption-style text under the primary value. */
|
|
23
|
+
trend: string;
|
|
24
|
+
/** The primary metric value to display */
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,48 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"description": "AdiaUI web components — 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",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
|
+
"import": "./index.js",
|
|
10
11
|
"default": "./index.js"
|
|
11
12
|
},
|
|
12
13
|
"./css": "./index.css",
|
|
13
14
|
"./core": {
|
|
14
15
|
"types": "./core/index.d.ts",
|
|
16
|
+
"import": "./core/index.js",
|
|
15
17
|
"default": "./core/index.js"
|
|
16
18
|
},
|
|
17
19
|
"./core/*": {
|
|
18
20
|
"types": "./core/*.d.ts",
|
|
21
|
+
"import": "./core/*.js",
|
|
19
22
|
"default": "./core/*.js"
|
|
20
23
|
},
|
|
21
|
-
"./components":
|
|
24
|
+
"./components": {
|
|
25
|
+
"types": "./components/index.d.ts",
|
|
26
|
+
"import": "./components/index.js",
|
|
27
|
+
"default": "./components/index.js"
|
|
28
|
+
},
|
|
22
29
|
"./components/*": {
|
|
23
30
|
"types": "./components/*/*.d.ts",
|
|
31
|
+
"import": "./components/*/*.js",
|
|
24
32
|
"default": "./components/*/*.js"
|
|
25
33
|
},
|
|
26
|
-
"./components/stat": {
|
|
27
|
-
"types": "./components/stat/stat-ui.d.ts",
|
|
28
|
-
"default": "./components/stat/stat-ui.js"
|
|
29
|
-
},
|
|
30
|
-
"./components/stat/stat-ui.js": {
|
|
31
|
-
"types": "./components/stat/stat-ui.d.ts",
|
|
32
|
-
"default": "./components/stat/stat-ui.js"
|
|
33
|
-
},
|
|
34
34
|
"./components/*/class": {
|
|
35
35
|
"types": "./components/*/*.d.ts",
|
|
36
|
+
"import": "./components/*/class.js",
|
|
36
37
|
"default": "./components/*/class.js"
|
|
37
38
|
},
|
|
38
39
|
"./components/*.css": "./components/*/*.css",
|
|
39
40
|
"./components/*/*.css": "./components/*/*.css",
|
|
40
41
|
"./components/*/css/*.css": "./components/*/css/*.css",
|
|
41
42
|
"./styles/*": "./styles/*",
|
|
42
|
-
"./traits":
|
|
43
|
-
|
|
43
|
+
"./traits": {
|
|
44
|
+
"types": "./traits.d.ts",
|
|
45
|
+
"import": "./traits/index.js",
|
|
46
|
+
"default": "./traits/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./traits/*": {
|
|
49
|
+
"types": "./traits.d.ts",
|
|
50
|
+
"import": "./traits/*.js",
|
|
51
|
+
"default": "./traits/*.js"
|
|
52
|
+
},
|
|
44
53
|
"./color": {
|
|
45
54
|
"types": "./color/index.d.ts",
|
|
55
|
+
"import": "./color/index.js",
|
|
46
56
|
"default": "./color/index.js"
|
|
47
57
|
},
|
|
48
58
|
"./package.json": "./package.json"
|
package/styles/components.css
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
@import "../components/otp-input/otp-input.css";
|
|
78
78
|
@import "../components/image/image.css";
|
|
79
79
|
@import "../components/search/search.css";
|
|
80
|
-
@import "../components/stat/stat
|
|
80
|
+
@import "../components/stat/stat.css";
|
|
81
81
|
@import "../components/progress-row/progress-row.css";
|
|
82
82
|
@import "../components/action-list/action-list.css";
|
|
83
83
|
@import "../components/empty-state/empty-state.css";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<stat-ui>` — Metric/KPI display. Value + label + optional change indicator and trend.
|
|
3
|
-
*
|
|
4
|
-
* @see https://ui-kit.exe.xyz/site/components/stat
|
|
5
|
-
*
|
|
6
|
-
* HAND-AUTHORED (v0.5.12 §253 FB-30 close-out). The codegen pipeline's
|
|
7
|
-
* `isCssOnly()` check at `scripts/build/dts-codegen.mjs:186-194` looks for
|
|
8
|
-
* `${dirname}.js` — but stat ships `stat-ui.js` (irregular filename; the
|
|
9
|
-
* v0.6.0 §303 rename will normalize to `stat.js`). Pre-§303 the codegen
|
|
10
|
-
* false-positives `isCssOnly` and skips this directory entirely. Hand-author
|
|
11
|
-
* this file matching `stat.yaml` props until §303 lands.
|
|
12
|
-
*
|
|
13
|
-
* Filename mirrors the JS file (`stat-ui.js` → `stat-ui.d.ts`) so TypeScript
|
|
14
|
-
* resolves the side-effect import `import '@adia-ai/web-components/components/stat/stat-ui.js'`
|
|
15
|
-
* to a typed module. Post-§303, both files rename to `stat.{js,d.ts}` and
|
|
16
|
-
* codegen takes over.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { UIElement } from '../../core/element.js';
|
|
20
|
-
|
|
21
|
-
export class UIStat extends UIElement {
|
|
22
|
-
/** Eyebrow label describing the metric. */
|
|
23
|
-
label: string;
|
|
24
|
-
/** Primary metric value (large display number / string). */
|
|
25
|
-
value: string;
|
|
26
|
-
/** Change indicator text (e.g. "+12%", "-3%"). Slotted as a badge next to value. */
|
|
27
|
-
change: string;
|
|
28
|
-
/**
|
|
29
|
-
* Trend direction or narrative subtitle. Canonical values color the change
|
|
30
|
-
* badge: `up` = success (green), `down` = danger (red), `flat`/`neutral` =
|
|
31
|
-
* muted. Any other string renders as caption-style text under the primary
|
|
32
|
-
* value (not enum-validated; yaml documents the canonical set but the type
|
|
33
|
-
* stays `string` for narrative subtitles).
|
|
34
|
-
*/
|
|
35
|
-
trend: string;
|
|
36
|
-
/** Icon name displayed in the icon slot (Phosphor icon registry). */
|
|
37
|
-
icon: string;
|
|
38
|
-
}
|
|
File without changes
|
|
File without changes
|