ionbase-ui 0.70.0 → 0.75.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/components/Chart.d.ts +95 -0
- package/dist/components/Chart.d.ts.map +1 -0
- package/dist/components/Chart.js +60 -0
- package/dist/components/Chart.js.map +1 -0
- package/dist/components/SettingRow.d.ts +54 -0
- package/dist/components/SettingRow.d.ts.map +1 -0
- package/dist/components/SettingRow.js +60 -0
- package/dist/components/SettingRow.js.map +1 -0
- package/dist/components/StatTile.d.ts +65 -0
- package/dist/components/StatTile.d.ts.map +1 -0
- package/dist/components/StatTile.js +54 -0
- package/dist/components/StatTile.js.map +1 -0
- package/dist/components/agent-run.d.ts +147 -0
- package/dist/components/agent-run.d.ts.map +1 -0
- package/dist/components/agent-run.js +250 -0
- package/dist/components/agent-run.js.map +1 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +16 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/use-agent-run.d.ts +65 -0
- package/dist/components/use-agent-run.d.ts.map +1 -0
- package/dist/components/use-agent-run.js +127 -0
- package/dist/components/use-agent-run.js.map +1 -0
- package/dist/figma-descriptions.json +88 -63
- package/dist/figma-map.json +236 -2
- package/dist/meta/ChartLegend.json +125 -0
- package/dist/meta/ChartTooltip.json +126 -0
- package/dist/meta/SettingRow.json +102 -0
- package/dist/meta/StatGroup.json +65 -0
- package/dist/meta/StatTile.json +163 -0
- package/dist/meta/components.json +595 -1
- package/dist/meta/contrast.json +613 -1
- package/dist/meta/index.json +64 -1
- package/dist/meta/patterns/AgentRun.json +14 -0
- package/dist/meta/patterns/HumanApproval.json +4 -0
- package/dist/meta/patterns/SettingsPanel.json +2 -1
- package/dist/meta/patterns/index.json +4 -1
- package/dist/styles/chart.css +275 -0
- package/dist/styles/index.css +3 -0
- package/dist/styles/setting-row.css +58 -0
- package/dist/styles/stat-tile.css +66 -0
- package/dist/styles/tokens/base.css +36 -8
- package/dist/styles/tokens/theme-dark.css +12 -0
- package/dist/tokens/index.d.ts +193 -40
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +157 -32
- package/dist/tokens/index.js.map +1 -1
- package/eslint-plugin/meta-data.js +9 -0
- package/eslint-plugin/rules/needs-accessible-name.js +14 -1
- package/llms.txt +19 -2
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "StatGroup",
|
|
3
|
+
"source": "src/components/StatTile.tsx",
|
|
4
|
+
"propsType": "StatGroupProps",
|
|
5
|
+
"description": "StatGroup — a row of StatTiles.\n\nA `<dl>`: each tile is a term (the label) and its description (the figure),\nwhich is what a screen reader announces as a pair. The grid wraps on its own,\nso four tiles are one row on a desktop and two on a phone with no breakpoint\nin the caller's code.",
|
|
6
|
+
"import": "import { StatGroup } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"since": "0.71.0",
|
|
9
|
+
"summary": "A row of StatTiles, as a description list. Wraps on its own — no breakpoints in the caller's code.",
|
|
10
|
+
"useWhen": [
|
|
11
|
+
"two or more headline figures shown side by side"
|
|
12
|
+
],
|
|
13
|
+
"useInstead": [
|
|
14
|
+
{
|
|
15
|
+
"when": "the figures are rows of records to compare field by field",
|
|
16
|
+
"use": "Table"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"composition": {
|
|
20
|
+
"order": [
|
|
21
|
+
"StatGroup",
|
|
22
|
+
"StatTile"
|
|
23
|
+
],
|
|
24
|
+
"note": "StatGroup renders the <dl>; each StatTile renders a <dt> and a <dd> inside it. A StatTile outside a StatGroup is invalid HTML.",
|
|
25
|
+
"example": "<StatGroup><StatTile label=\"Runs\" value=\"1.2k\" change={4.1} goodWhen=\"neutral\" /><StatTile label=\"Median run time\" value=\"38s\" change={-6.2} goodWhen=\"down\" /></StatGroup>"
|
|
26
|
+
},
|
|
27
|
+
"slots": {
|
|
28
|
+
"children": {
|
|
29
|
+
"accepts": [
|
|
30
|
+
"StatTile"
|
|
31
|
+
],
|
|
32
|
+
"note": "StatTiles only — the group is a <dl>, so anything else inside it is invalid"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"a11y": {
|
|
36
|
+
"guarantees": [
|
|
37
|
+
"a <dl>, so each label is announced as the term for its figure"
|
|
38
|
+
],
|
|
39
|
+
"notes": [
|
|
40
|
+
"Give the group a heading or aria-label when the page has more than one, so a screen reader can tell them apart."
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"antiPatterns": [
|
|
44
|
+
{
|
|
45
|
+
"dont": "adding media queries to change the column count",
|
|
46
|
+
"why": "the grid already wraps by tile width; a breakpoint fights it"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"stylesheet": null,
|
|
50
|
+
"tokens": [],
|
|
51
|
+
"props": {
|
|
52
|
+
"children": {
|
|
53
|
+
"type": "React.ReactNode",
|
|
54
|
+
"required": false,
|
|
55
|
+
"origin": "own",
|
|
56
|
+
"description": "StatTile elements."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"propCounts": {
|
|
60
|
+
"own": 1,
|
|
61
|
+
"aria": 0,
|
|
62
|
+
"dom": 277,
|
|
63
|
+
"other": 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "StatTile",
|
|
3
|
+
"source": "src/components/StatTile.tsx",
|
|
4
|
+
"propsType": "StatTileProps",
|
|
5
|
+
"description": "StatTile — one headline figure, and how it moved.\n\nPromoted from the demo app, where it was built for the Overview KPI row and\nsurvived three phases unchanged.\n\nGOOD AND BAD ARE NOT UP AND DOWN\n\nA rising median run time is bad news and a rising success rate is good, so\nthe colour comes from `goodWhen` and the direction together — never from the\nsign alone. `neutral` never colours: a run count going up is not a verdict.\nThe verdict is also spoken, as visually hidden text after the change, so it\nnever rests on the badge's colour.\n\nThe change is rounded BEFORE it is judged, so −0.04 reads \"No change\" rather\nthan a red \"−0.0%\".\n\nIt must sit inside a StatGroup: the tile renders a `<dt>` and a `<dd>`, which\nare only valid inside a `<dl>`.",
|
|
6
|
+
"import": "import { StatTile } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"since": "0.71.0",
|
|
9
|
+
"summary": "One headline figure and how it moved against a comparison period. Good and bad come from `goodWhen`, never from the sign alone.",
|
|
10
|
+
"useWhen": [
|
|
11
|
+
"a dashboard or overview leads with a handful of key numbers",
|
|
12
|
+
"a change against a previous period is part of what the number means"
|
|
13
|
+
],
|
|
14
|
+
"useInstead": [
|
|
15
|
+
{
|
|
16
|
+
"when": "it is a summary with text and media rather than a number",
|
|
17
|
+
"use": "FullCard"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "the figure is progress toward a known total",
|
|
21
|
+
"use": "ProgressBar"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"when": "there are more than about six figures, or they need comparing across rows",
|
|
25
|
+
"use": "Table"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"composition": {
|
|
29
|
+
"order": [
|
|
30
|
+
"StatGroup",
|
|
31
|
+
"StatTile"
|
|
32
|
+
],
|
|
33
|
+
"note": "Always inside a StatGroup: the tile renders a <dt> and a <dd>, which are only valid inside a <dl>.",
|
|
34
|
+
"example": "<StatGroup><StatTile label=\"Success rate\" value=\"96.2%\" change={1.1} changeUnit=\"points\" /></StatGroup>"
|
|
35
|
+
},
|
|
36
|
+
"variants": {
|
|
37
|
+
"goodWhen": {
|
|
38
|
+
"up": {
|
|
39
|
+
"use": "the default — revenue, success rate, anything where more is better"
|
|
40
|
+
},
|
|
41
|
+
"down": {
|
|
42
|
+
"use": "costs, durations, error counts and queues, where a rise is bad news"
|
|
43
|
+
},
|
|
44
|
+
"neutral": {
|
|
45
|
+
"use": "a change that is neither — run volume, traffic — so it is never coloured"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"changeUnit": {
|
|
49
|
+
"percent": {
|
|
50
|
+
"use": "the default — a relative change"
|
|
51
|
+
},
|
|
52
|
+
"points": {
|
|
53
|
+
"use": "the metric is itself a percentage: 95% to 96% is +1.0 pts, not +1.1%"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"a11y": {
|
|
58
|
+
"guarantees": [
|
|
59
|
+
"the verdict is spoken as text (\"better\" or \"worse\") after the change, so it never rests on the badge's colour",
|
|
60
|
+
"the direction is in the text as a sign as well as in the arrow",
|
|
61
|
+
"`isLoading` marks the tile aria-busy while its placeholder shows"
|
|
62
|
+
],
|
|
63
|
+
"requires": [
|
|
64
|
+
"`value` already formatted — the tile cannot know the locale, precision or unit",
|
|
65
|
+
"the right `goodWhen` for the metric; the default `up` colours a rising cost green"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"antiPatterns": [
|
|
69
|
+
{
|
|
70
|
+
"dont": "leaving `goodWhen` at `up` for a duration, cost or error count",
|
|
71
|
+
"why": "a slower, costlier or more error-prone week is shown green and announced as better"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"dont": "a percentage change for a metric that is already a percentage",
|
|
75
|
+
"why": "95% to 96% is +1 point; +1.1% misreports it — use changeUnit=\"points\""
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"dont": "passing a change of 0 to mean \"no data\"",
|
|
79
|
+
"why": "0 renders \"No change\", a claim; omit `change` when there is nothing to compare"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"stylesheet": "src/styles/stat-tile.css",
|
|
83
|
+
"tokens": [
|
|
84
|
+
"--border-subtle",
|
|
85
|
+
"--border-width-default",
|
|
86
|
+
"--font-family-sans",
|
|
87
|
+
"--font-weight-semibold",
|
|
88
|
+
"--radius-lg",
|
|
89
|
+
"--spacing-12",
|
|
90
|
+
"--spacing-16",
|
|
91
|
+
"--spacing-6",
|
|
92
|
+
"--spacing-8",
|
|
93
|
+
"--surface-default",
|
|
94
|
+
"--text-default",
|
|
95
|
+
"--text-secondary",
|
|
96
|
+
"--text-tertiary",
|
|
97
|
+
"--type-body-sm",
|
|
98
|
+
"--type-body-sm-line-height",
|
|
99
|
+
"--type-caption",
|
|
100
|
+
"--type-caption-line-height",
|
|
101
|
+
"--type-h4",
|
|
102
|
+
"--type-h4-line-height"
|
|
103
|
+
],
|
|
104
|
+
"props": {
|
|
105
|
+
"label": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"required": true,
|
|
108
|
+
"origin": "own",
|
|
109
|
+
"description": "What is being measured. Short: \"Success rate\", not a sentence."
|
|
110
|
+
},
|
|
111
|
+
"value": {
|
|
112
|
+
"type": "React.ReactNode",
|
|
113
|
+
"required": true,
|
|
114
|
+
"origin": "own",
|
|
115
|
+
"description": "The figure, already formatted — \"1.2k\", \"96.2%\", \"38s\". Formatting is the\ncaller's: only it knows the locale, the precision and the unit."
|
|
116
|
+
},
|
|
117
|
+
"change": {
|
|
118
|
+
"type": "number | undefined",
|
|
119
|
+
"required": false,
|
|
120
|
+
"origin": "own",
|
|
121
|
+
"description": "Change against the comparison period. Omit when there is none."
|
|
122
|
+
},
|
|
123
|
+
"changeUnit": {
|
|
124
|
+
"type": "StatTileChangeUnit | undefined",
|
|
125
|
+
"required": false,
|
|
126
|
+
"origin": "own",
|
|
127
|
+
"description": "`percent` for a relative change; `points` for a metric that is already a\npercentage — 95% to 96% is +1 pt, and calling it +1.1% misreports it.",
|
|
128
|
+
"values": [
|
|
129
|
+
"points",
|
|
130
|
+
"percent"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"goodWhen": {
|
|
134
|
+
"type": "StatTileGoodWhen | undefined",
|
|
135
|
+
"required": false,
|
|
136
|
+
"origin": "own",
|
|
137
|
+
"description": "Which direction is good news. `down` for costs, durations and queues;\n`neutral` when a change is neither, so it is never coloured.",
|
|
138
|
+
"values": [
|
|
139
|
+
"neutral",
|
|
140
|
+
"up",
|
|
141
|
+
"down"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"comparison": {
|
|
145
|
+
"type": "string | undefined",
|
|
146
|
+
"required": false,
|
|
147
|
+
"origin": "own",
|
|
148
|
+
"description": "What `change` is measured against."
|
|
149
|
+
},
|
|
150
|
+
"isLoading": {
|
|
151
|
+
"type": "boolean | undefined",
|
|
152
|
+
"required": false,
|
|
153
|
+
"origin": "own",
|
|
154
|
+
"description": "Shows a placeholder for the value and change while data loads."
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"propCounts": {
|
|
158
|
+
"own": 7,
|
|
159
|
+
"aria": 0,
|
|
160
|
+
"dom": 277,
|
|
161
|
+
"other": 0
|
|
162
|
+
}
|
|
163
|
+
}
|