ionbase-ui 0.73.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/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 +6 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +14 -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 +76 -66
- package/dist/figma-map.json +88 -2
- package/dist/meta/ChartLegend.json +125 -0
- package/dist/meta/ChartTooltip.json +126 -0
- package/dist/meta/components.json +265 -1
- package/dist/meta/contrast.json +348 -0
- package/dist/meta/index.json +33 -1
- package/dist/meta/patterns/AgentRun.json +14 -0
- package/dist/meta/patterns/HumanApproval.json +4 -0
- package/dist/meta/patterns/index.json +3 -1
- package/dist/styles/chart.css +275 -0
- package/dist/styles/index.css +1 -0
- package/llms.txt +11 -3
- package/package.json +1 -1
package/dist/figma-map.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "ionbase-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"figmaFile": "gaLbGd0QNb1fUl6BjSpfBA",
|
|
5
|
-
"figmaExported": "2026-09-
|
|
5
|
+
"figmaExported": "2026-09-25",
|
|
6
6
|
"usage": "Given a Figma node id or component name, look it up here for the React component, its import, and how each Figma property maps onto a real prop. Every mapping is verified against both the Figma export and the TypeScript API on each build.",
|
|
7
7
|
"generated": "by scripts/verify-figma-map.mjs — do not edit",
|
|
8
8
|
"byNodeId": {
|
|
@@ -2089,6 +2089,48 @@
|
|
|
2089
2089
|
"prop": "title"
|
|
2090
2090
|
}
|
|
2091
2091
|
}
|
|
2092
|
+
},
|
|
2093
|
+
"1432:282": {
|
|
2094
|
+
"figmaComponent": "Chart Tooltip",
|
|
2095
|
+
"figmaNodeId": "1432:282",
|
|
2096
|
+
"figmaPage": "Chart",
|
|
2097
|
+
"component": "ChartTooltip",
|
|
2098
|
+
"import": "import { ChartTooltip } from 'ionbase-ui';",
|
|
2099
|
+
"docs": "components/chart-tooltip/index.html.md",
|
|
2100
|
+
"props": {
|
|
2101
|
+
"Title#1432:18": {
|
|
2102
|
+
"prop": "title"
|
|
2103
|
+
},
|
|
2104
|
+
"Show Row 2#1432:19": {
|
|
2105
|
+
"prop": "rows",
|
|
2106
|
+
"note": "true draws a second entry in rows; the row count is the length of the array"
|
|
2107
|
+
},
|
|
2108
|
+
"Show Row 3#1432:20": {
|
|
2109
|
+
"prop": "rows",
|
|
2110
|
+
"note": "true draws a third entry in rows"
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
"1432:369": {
|
|
2115
|
+
"figmaComponent": "Chart Legend",
|
|
2116
|
+
"figmaNodeId": "1432:369",
|
|
2117
|
+
"figmaPage": "Chart",
|
|
2118
|
+
"component": "ChartLegend",
|
|
2119
|
+
"import": "import { ChartLegend } from 'ionbase-ui';",
|
|
2120
|
+
"docs": "components/chart-legend/index.html.md",
|
|
2121
|
+
"props": {
|
|
2122
|
+
"Shape": {
|
|
2123
|
+
"prop": "shape",
|
|
2124
|
+
"values": {
|
|
2125
|
+
"Square": "square",
|
|
2126
|
+
"Line": "line"
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
"Show Item 3#1432:38": {
|
|
2130
|
+
"prop": "items",
|
|
2131
|
+
"note": "true draws a third entry in items; the entry count is the length of the array"
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2092
2134
|
}
|
|
2093
2135
|
},
|
|
2094
2136
|
"byFigmaName": {
|
|
@@ -4175,12 +4217,56 @@
|
|
|
4175
4217
|
"prop": "title"
|
|
4176
4218
|
}
|
|
4177
4219
|
}
|
|
4220
|
+
},
|
|
4221
|
+
"Chart Tooltip": {
|
|
4222
|
+
"figmaComponent": "Chart Tooltip",
|
|
4223
|
+
"figmaNodeId": "1432:282",
|
|
4224
|
+
"figmaPage": "Chart",
|
|
4225
|
+
"component": "ChartTooltip",
|
|
4226
|
+
"import": "import { ChartTooltip } from 'ionbase-ui';",
|
|
4227
|
+
"docs": "components/chart-tooltip/index.html.md",
|
|
4228
|
+
"props": {
|
|
4229
|
+
"Title#1432:18": {
|
|
4230
|
+
"prop": "title"
|
|
4231
|
+
},
|
|
4232
|
+
"Show Row 2#1432:19": {
|
|
4233
|
+
"prop": "rows",
|
|
4234
|
+
"note": "true draws a second entry in rows; the row count is the length of the array"
|
|
4235
|
+
},
|
|
4236
|
+
"Show Row 3#1432:20": {
|
|
4237
|
+
"prop": "rows",
|
|
4238
|
+
"note": "true draws a third entry in rows"
|
|
4239
|
+
}
|
|
4240
|
+
}
|
|
4241
|
+
},
|
|
4242
|
+
"Chart Legend": {
|
|
4243
|
+
"figmaComponent": "Chart Legend",
|
|
4244
|
+
"figmaNodeId": "1432:369",
|
|
4245
|
+
"figmaPage": "Chart",
|
|
4246
|
+
"component": "ChartLegend",
|
|
4247
|
+
"import": "import { ChartLegend } from 'ionbase-ui';",
|
|
4248
|
+
"docs": "components/chart-legend/index.html.md",
|
|
4249
|
+
"props": {
|
|
4250
|
+
"Shape": {
|
|
4251
|
+
"prop": "shape",
|
|
4252
|
+
"values": {
|
|
4253
|
+
"Square": "square",
|
|
4254
|
+
"Line": "line"
|
|
4255
|
+
}
|
|
4256
|
+
},
|
|
4257
|
+
"Show Item 3#1432:38": {
|
|
4258
|
+
"prop": "items",
|
|
4259
|
+
"note": "true draws a third entry in items; the entry count is the length of the array"
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4178
4262
|
}
|
|
4179
4263
|
},
|
|
4180
4264
|
"unmapped": {
|
|
4181
4265
|
".Status Indicator": "The dot Avatar draws in its corners. Avatar owns both instances — Top is Intent=Primary with the check glyph, Bottom is Intent=Success with Show Icon off — and exposes them as `topIndicator` / `bottomIndicator`.\n\nThe leading dot in the name is Figma's own marker for a private component: it is excluded from the published library, so a designer cannot place one on a canvas even if they wanted to. That settles a question this entry used to argue: it is internal by the file's own declaration, not merely by our reading of it. The same call Line, Progress and Progress Heading get for being internal to ScrollProgress — with better evidence.\n\nMap it only if the dot is ever removed.",
|
|
4182
4266
|
"Calendar": "The open calendar both pickers render internally — Calendar and CalendarPopover are not exported, because a grid with no field to own its value is not a control a caller should mount. Mode=Single is DatePicker’s, Mode=Range is DateRangePicker’s; Months=Two is `visibleMonths={2}`, Show Presets is `presets` and Show Clear is `isClearable`, all on DateRangePicker. Drawn separately because a frame cannot both hug a field and overlay a grid on it — the same reason Combobox Menu is its own frame.",
|
|
4183
4267
|
"Calendar Day": "A day cell inside Calendar — internal to it the way Pagination Item is internal to Pagination. A caller never places one; `isDateUnavailable`, `minValue` and `maxValue` on the pickers decide which state each day draws in.",
|
|
4268
|
+
"Chart Legend Item": "One entry of Chart Legend — `items[n]` in code, `{ label, series }`. Its Shape follows the legend’s `shape`; Series picks chart/1…8. Internal to the legend.",
|
|
4269
|
+
"Chart Tooltip Row": "One entry of Chart Tooltip — `rows[n]` in code, `{ label, value, series }`. Series picks the swatch from chart/1…8, exactly as `series` does. Internal to the tooltip the way Pagination Item is internal to Pagination.",
|
|
4184
4270
|
"Combobox Menu": "The list Combobox opens. It is not a separate export: the React component renders its own menu, because the two are one control and splitting them would let a caller mount a listbox with no combobox to own it. Drawn separately in Figma because a frame cannot both hug a field and overlay a list on top of it.",
|
|
4185
4271
|
"Form Field": "Label, helper text and error wiring are built into Input and Select rather than a separate wrapper — the wrapper is how Figma composes them, not how React does.",
|
|
4186
4272
|
"Line": "An internal part of the Scroll Progress rail, not a component a caller composes.",
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ChartLegend",
|
|
3
|
+
"source": "src/components/Chart.tsx",
|
|
4
|
+
"propsType": "ChartLegendProps",
|
|
5
|
+
"description": "ChartLegend — which colour is which series.\n\nColour alone never identifies a series (SC 1.4.1), so any chart with more\nthan one series needs this, or direct labels on the lines. The swatch reads\nthe same `--chart-<n>` as the series itself, through `chartSeriesClass`, so\nthe two cannot drift apart.",
|
|
6
|
+
"import": "import { ChartLegend } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"since": "0.74.0",
|
|
9
|
+
"summary": "Which colour is which series, for a chart drawn with visx. The swatch reads the same token as the series.",
|
|
10
|
+
"useWhen": [
|
|
11
|
+
"a chart has more than one series",
|
|
12
|
+
"a single-series chart sits beside others and its colour needs naming"
|
|
13
|
+
],
|
|
14
|
+
"useInstead": [
|
|
15
|
+
{
|
|
16
|
+
"when": "the lines are few and there is room to label each at its end",
|
|
17
|
+
"use": "direct labels in the SVG, with the series class on the text"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "the scale is a magnitude ramp (a heatmap), not categories",
|
|
21
|
+
"use": "a Less-to-More row of .ion-chart__heat--0…5 cells"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"composition": {
|
|
25
|
+
"note": "Items are listed in the order the series are drawn, with the same series numbers the chart uses. Place it above or below the plot inside the same .ion-chart figure.",
|
|
26
|
+
"example": "<ChartLegend shape=\"line\" items={[{ label: 'Production', series: 1 }, { label: 'Staging', series: 2 }]} />"
|
|
27
|
+
},
|
|
28
|
+
"variants": {
|
|
29
|
+
"shape": {
|
|
30
|
+
"square": {
|
|
31
|
+
"use": "the default — bars, areas and heatmap-like marks"
|
|
32
|
+
},
|
|
33
|
+
"line": {
|
|
34
|
+
"use": "line charts, so the key looks like the mark it names"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"a11y": {
|
|
39
|
+
"guarantees": [
|
|
40
|
+
"a list, so a screen reader announces how many series there are",
|
|
41
|
+
"swatches are aria-hidden; every series is named in text"
|
|
42
|
+
],
|
|
43
|
+
"requires": [
|
|
44
|
+
"series numbers matching the chart — the legend cannot see the chart"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"antiPatterns": [
|
|
48
|
+
{
|
|
49
|
+
"dont": "a multi-series chart with no legend and no direct labels",
|
|
50
|
+
"why": "colour becomes the only way to tell series apart, which fails SC 1.4.1 and fails anyone who cannot tell blue from purple"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"dont": "listing series in a different order from the chart",
|
|
54
|
+
"why": "the reader matches legend to chart by position as much as by colour"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"stylesheet": "src/styles/chart.css",
|
|
58
|
+
"tokens": [
|
|
59
|
+
"--border-default",
|
|
60
|
+
"--border-strong",
|
|
61
|
+
"--border-stronger",
|
|
62
|
+
"--border-subtle",
|
|
63
|
+
"--border-width-default",
|
|
64
|
+
"--chart-1",
|
|
65
|
+
"--chart-2",
|
|
66
|
+
"--chart-3",
|
|
67
|
+
"--chart-4",
|
|
68
|
+
"--chart-5",
|
|
69
|
+
"--chart-6",
|
|
70
|
+
"--chart-7",
|
|
71
|
+
"--chart-8",
|
|
72
|
+
"--chart-sequential-1",
|
|
73
|
+
"--chart-sequential-2",
|
|
74
|
+
"--chart-sequential-3",
|
|
75
|
+
"--chart-sequential-4",
|
|
76
|
+
"--chart-sequential-5",
|
|
77
|
+
"--font-family-sans",
|
|
78
|
+
"--font-weight-medium",
|
|
79
|
+
"--font-weight-semibold",
|
|
80
|
+
"--ion-chart-series",
|
|
81
|
+
"--ion-shadow-shadow-lg",
|
|
82
|
+
"--radius-2xs",
|
|
83
|
+
"--radius-full",
|
|
84
|
+
"--radius-md",
|
|
85
|
+
"--spacing-12",
|
|
86
|
+
"--spacing-16",
|
|
87
|
+
"--spacing-4",
|
|
88
|
+
"--spacing-6",
|
|
89
|
+
"--spacing-8",
|
|
90
|
+
"--surface-default",
|
|
91
|
+
"--surface-raised",
|
|
92
|
+
"--surface-sunken",
|
|
93
|
+
"--text-default",
|
|
94
|
+
"--text-secondary",
|
|
95
|
+
"--text-tertiary",
|
|
96
|
+
"--type-body-sm",
|
|
97
|
+
"--type-body-sm-line-height",
|
|
98
|
+
"--type-caption",
|
|
99
|
+
"--type-caption-line-height"
|
|
100
|
+
],
|
|
101
|
+
"props": {
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "ChartLegendItem[]",
|
|
104
|
+
"required": true,
|
|
105
|
+
"origin": "own",
|
|
106
|
+
"description": "One per series, in the order the series are drawn."
|
|
107
|
+
},
|
|
108
|
+
"shape": {
|
|
109
|
+
"type": "ChartLegendShape | undefined",
|
|
110
|
+
"required": false,
|
|
111
|
+
"origin": "own",
|
|
112
|
+
"description": "`square` for bars and areas, `line` for line charts.",
|
|
113
|
+
"values": [
|
|
114
|
+
"square",
|
|
115
|
+
"line"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"propCounts": {
|
|
120
|
+
"own": 2,
|
|
121
|
+
"aria": 0,
|
|
122
|
+
"dom": 277,
|
|
123
|
+
"other": 0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ChartTooltip",
|
|
3
|
+
"source": "src/components/Chart.tsx",
|
|
4
|
+
"propsType": "ChartTooltipProps",
|
|
5
|
+
"description": "ChartTooltip — the panel that shows the values under the pointer.\n\nPut it inside visx's Tooltip with `chartTooltipProps`, so visx places it and\nthis draws it: raised, rimmed and shadowed like Popover and Toast.\n\nIT IS NOT THE ACCESSIBLE WAY TO THE DATA. It appears on hover, so a keyboard\nor screen-reader user never sees it. Every chart still needs a text summary\nand the values in a table (visually hidden is fine) — the tooltip is a\nconvenience for pointer users, never the only route to a number.",
|
|
6
|
+
"import": "import { ChartTooltip } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"since": "0.74.0",
|
|
9
|
+
"summary": "The panel showing the values under the pointer on a visx chart. visx positions it; this draws it.",
|
|
10
|
+
"useWhen": [
|
|
11
|
+
"a chart drawn with visx shows exact values on hover",
|
|
12
|
+
"several series share an x value and the reader compares them at a point"
|
|
13
|
+
],
|
|
14
|
+
"useInstead": [
|
|
15
|
+
{
|
|
16
|
+
"when": "it explains a control rather than a data point",
|
|
17
|
+
"use": "Tooltip"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "it holds interactive content",
|
|
21
|
+
"use": "Popover"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"when": "the reader needs every value, or needs them without a pointer",
|
|
25
|
+
"use": "Table"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"composition": {
|
|
29
|
+
"note": "Render it inside visx's Tooltip, TooltipWithBounds or TooltipInPortal with {...chartTooltipProps}, which turns off visx's own box so this one is the only panel. Axes take {...chartAxisProps} and gridlines {...chartGridProps}; a series takes className={chartSeriesClass(n)} plus ion-chart__line, __area, __bar or __point.",
|
|
30
|
+
"example": "<TooltipWithBounds top={top} left={left} {...chartTooltipProps}><ChartTooltip title=\"12 Sep\" rows={[{ label: 'Success rate', value: '96.2%', series: 1 }]} /></TooltipWithBounds>"
|
|
31
|
+
},
|
|
32
|
+
"a11y": {
|
|
33
|
+
"guarantees": [
|
|
34
|
+
"rows are a <dl>, so each value is announced with its label",
|
|
35
|
+
"the series swatch is aria-hidden; the label carries the name"
|
|
36
|
+
],
|
|
37
|
+
"requires": [
|
|
38
|
+
"a text summary and the values in a table (visually hidden is fine) — the tooltip appears on hover, so keyboard and screen-reader users never reach it",
|
|
39
|
+
"`value` already formatted — the tooltip cannot know the unit or precision"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"antiPatterns": [
|
|
43
|
+
{
|
|
44
|
+
"dont": "making the tooltip the only way to read a value",
|
|
45
|
+
"why": "it exists only under a mouse pointer; without a table the data is invisible to keyboard and screen-reader users"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"dont": "leaving visx's default tooltip styles on",
|
|
49
|
+
"why": "it draws a second white box with a hardcoded shadow around this one, and that box does not theme"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"dont": "a swatch colour that does not match the series",
|
|
53
|
+
"why": "pass the same `series` number the line or bar uses — the swatch reads the same token only if it is told the same index"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"stylesheet": "src/styles/chart.css",
|
|
57
|
+
"tokens": [
|
|
58
|
+
"--border-default",
|
|
59
|
+
"--border-strong",
|
|
60
|
+
"--border-stronger",
|
|
61
|
+
"--border-subtle",
|
|
62
|
+
"--border-width-default",
|
|
63
|
+
"--chart-1",
|
|
64
|
+
"--chart-2",
|
|
65
|
+
"--chart-3",
|
|
66
|
+
"--chart-4",
|
|
67
|
+
"--chart-5",
|
|
68
|
+
"--chart-6",
|
|
69
|
+
"--chart-7",
|
|
70
|
+
"--chart-8",
|
|
71
|
+
"--chart-sequential-1",
|
|
72
|
+
"--chart-sequential-2",
|
|
73
|
+
"--chart-sequential-3",
|
|
74
|
+
"--chart-sequential-4",
|
|
75
|
+
"--chart-sequential-5",
|
|
76
|
+
"--font-family-sans",
|
|
77
|
+
"--font-weight-medium",
|
|
78
|
+
"--font-weight-semibold",
|
|
79
|
+
"--ion-chart-series",
|
|
80
|
+
"--ion-shadow-shadow-lg",
|
|
81
|
+
"--radius-2xs",
|
|
82
|
+
"--radius-full",
|
|
83
|
+
"--radius-md",
|
|
84
|
+
"--spacing-12",
|
|
85
|
+
"--spacing-16",
|
|
86
|
+
"--spacing-4",
|
|
87
|
+
"--spacing-6",
|
|
88
|
+
"--spacing-8",
|
|
89
|
+
"--surface-default",
|
|
90
|
+
"--surface-raised",
|
|
91
|
+
"--surface-sunken",
|
|
92
|
+
"--text-default",
|
|
93
|
+
"--text-secondary",
|
|
94
|
+
"--text-tertiary",
|
|
95
|
+
"--type-body-sm",
|
|
96
|
+
"--type-body-sm-line-height",
|
|
97
|
+
"--type-caption",
|
|
98
|
+
"--type-caption-line-height"
|
|
99
|
+
],
|
|
100
|
+
"props": {
|
|
101
|
+
"title": {
|
|
102
|
+
"type": "React.ReactNode",
|
|
103
|
+
"required": false,
|
|
104
|
+
"origin": "own",
|
|
105
|
+
"description": "What the pointer is over — usually the x value, e.g. a date."
|
|
106
|
+
},
|
|
107
|
+
"rows": {
|
|
108
|
+
"type": "ChartTooltipRow[] | undefined",
|
|
109
|
+
"required": false,
|
|
110
|
+
"origin": "own",
|
|
111
|
+
"description": "One row per series at that point."
|
|
112
|
+
},
|
|
113
|
+
"children": {
|
|
114
|
+
"type": "React.ReactNode",
|
|
115
|
+
"required": false,
|
|
116
|
+
"origin": "own",
|
|
117
|
+
"description": "Free content after the rows, for anything that is not label/value."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"propCounts": {
|
|
121
|
+
"own": 3,
|
|
122
|
+
"aria": 0,
|
|
123
|
+
"dom": 276,
|
|
124
|
+
"other": 0
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "ionbase-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"generated": "by scripts/build-meta.mjs — do not edit; intent lives in meta/*.json",
|
|
5
5
|
"hooks": [
|
|
6
|
+
"useAgentRun",
|
|
6
7
|
"useToast"
|
|
7
8
|
],
|
|
9
|
+
"helpers": [
|
|
10
|
+
"agentRunFrom",
|
|
11
|
+
"agentRunHasEnded",
|
|
12
|
+
"agentRunLog",
|
|
13
|
+
"agentRunReducer",
|
|
14
|
+
"chartAxisProps",
|
|
15
|
+
"chartGridProps",
|
|
16
|
+
"chartSeriesClass",
|
|
17
|
+
"chartTooltipProps",
|
|
18
|
+
"initialAgentRunState",
|
|
19
|
+
"replayAgentRun"
|
|
20
|
+
],
|
|
8
21
|
"components": {
|
|
9
22
|
"Accordion": {
|
|
10
23
|
"name": "Accordion",
|
|
@@ -2652,6 +2665,257 @@
|
|
|
2652
2665
|
"other": 0
|
|
2653
2666
|
}
|
|
2654
2667
|
},
|
|
2668
|
+
"ChartLegend": {
|
|
2669
|
+
"name": "ChartLegend",
|
|
2670
|
+
"source": "src/components/Chart.tsx",
|
|
2671
|
+
"propsType": "ChartLegendProps",
|
|
2672
|
+
"description": "ChartLegend — which colour is which series.\n\nColour alone never identifies a series (SC 1.4.1), so any chart with more\nthan one series needs this, or direct labels on the lines. The swatch reads\nthe same `--chart-<n>` as the series itself, through `chartSeriesClass`, so\nthe two cannot drift apart.",
|
|
2673
|
+
"import": "import { ChartLegend } from 'ionbase-ui';",
|
|
2674
|
+
"status": "stable",
|
|
2675
|
+
"since": "0.74.0",
|
|
2676
|
+
"summary": "Which colour is which series, for a chart drawn with visx. The swatch reads the same token as the series.",
|
|
2677
|
+
"useWhen": [
|
|
2678
|
+
"a chart has more than one series",
|
|
2679
|
+
"a single-series chart sits beside others and its colour needs naming"
|
|
2680
|
+
],
|
|
2681
|
+
"useInstead": [
|
|
2682
|
+
{
|
|
2683
|
+
"when": "the lines are few and there is room to label each at its end",
|
|
2684
|
+
"use": "direct labels in the SVG, with the series class on the text"
|
|
2685
|
+
},
|
|
2686
|
+
{
|
|
2687
|
+
"when": "the scale is a magnitude ramp (a heatmap), not categories",
|
|
2688
|
+
"use": "a Less-to-More row of .ion-chart__heat--0…5 cells"
|
|
2689
|
+
}
|
|
2690
|
+
],
|
|
2691
|
+
"composition": {
|
|
2692
|
+
"note": "Items are listed in the order the series are drawn, with the same series numbers the chart uses. Place it above or below the plot inside the same .ion-chart figure.",
|
|
2693
|
+
"example": "<ChartLegend shape=\"line\" items={[{ label: 'Production', series: 1 }, { label: 'Staging', series: 2 }]} />"
|
|
2694
|
+
},
|
|
2695
|
+
"variants": {
|
|
2696
|
+
"shape": {
|
|
2697
|
+
"square": {
|
|
2698
|
+
"use": "the default — bars, areas and heatmap-like marks"
|
|
2699
|
+
},
|
|
2700
|
+
"line": {
|
|
2701
|
+
"use": "line charts, so the key looks like the mark it names"
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
},
|
|
2705
|
+
"a11y": {
|
|
2706
|
+
"guarantees": [
|
|
2707
|
+
"a list, so a screen reader announces how many series there are",
|
|
2708
|
+
"swatches are aria-hidden; every series is named in text"
|
|
2709
|
+
],
|
|
2710
|
+
"requires": [
|
|
2711
|
+
"series numbers matching the chart — the legend cannot see the chart"
|
|
2712
|
+
]
|
|
2713
|
+
},
|
|
2714
|
+
"antiPatterns": [
|
|
2715
|
+
{
|
|
2716
|
+
"dont": "a multi-series chart with no legend and no direct labels",
|
|
2717
|
+
"why": "colour becomes the only way to tell series apart, which fails SC 1.4.1 and fails anyone who cannot tell blue from purple"
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
"dont": "listing series in a different order from the chart",
|
|
2721
|
+
"why": "the reader matches legend to chart by position as much as by colour"
|
|
2722
|
+
}
|
|
2723
|
+
],
|
|
2724
|
+
"stylesheet": "src/styles/chart.css",
|
|
2725
|
+
"tokens": [
|
|
2726
|
+
"--border-default",
|
|
2727
|
+
"--border-strong",
|
|
2728
|
+
"--border-stronger",
|
|
2729
|
+
"--border-subtle",
|
|
2730
|
+
"--border-width-default",
|
|
2731
|
+
"--chart-1",
|
|
2732
|
+
"--chart-2",
|
|
2733
|
+
"--chart-3",
|
|
2734
|
+
"--chart-4",
|
|
2735
|
+
"--chart-5",
|
|
2736
|
+
"--chart-6",
|
|
2737
|
+
"--chart-7",
|
|
2738
|
+
"--chart-8",
|
|
2739
|
+
"--chart-sequential-1",
|
|
2740
|
+
"--chart-sequential-2",
|
|
2741
|
+
"--chart-sequential-3",
|
|
2742
|
+
"--chart-sequential-4",
|
|
2743
|
+
"--chart-sequential-5",
|
|
2744
|
+
"--font-family-sans",
|
|
2745
|
+
"--font-weight-medium",
|
|
2746
|
+
"--font-weight-semibold",
|
|
2747
|
+
"--ion-chart-series",
|
|
2748
|
+
"--ion-shadow-shadow-lg",
|
|
2749
|
+
"--radius-2xs",
|
|
2750
|
+
"--radius-full",
|
|
2751
|
+
"--radius-md",
|
|
2752
|
+
"--spacing-12",
|
|
2753
|
+
"--spacing-16",
|
|
2754
|
+
"--spacing-4",
|
|
2755
|
+
"--spacing-6",
|
|
2756
|
+
"--spacing-8",
|
|
2757
|
+
"--surface-default",
|
|
2758
|
+
"--surface-raised",
|
|
2759
|
+
"--surface-sunken",
|
|
2760
|
+
"--text-default",
|
|
2761
|
+
"--text-secondary",
|
|
2762
|
+
"--text-tertiary",
|
|
2763
|
+
"--type-body-sm",
|
|
2764
|
+
"--type-body-sm-line-height",
|
|
2765
|
+
"--type-caption",
|
|
2766
|
+
"--type-caption-line-height"
|
|
2767
|
+
],
|
|
2768
|
+
"props": {
|
|
2769
|
+
"items": {
|
|
2770
|
+
"type": "ChartLegendItem[]",
|
|
2771
|
+
"required": true,
|
|
2772
|
+
"origin": "own",
|
|
2773
|
+
"description": "One per series, in the order the series are drawn."
|
|
2774
|
+
},
|
|
2775
|
+
"shape": {
|
|
2776
|
+
"type": "ChartLegendShape | undefined",
|
|
2777
|
+
"required": false,
|
|
2778
|
+
"origin": "own",
|
|
2779
|
+
"description": "`square` for bars and areas, `line` for line charts.",
|
|
2780
|
+
"values": [
|
|
2781
|
+
"square",
|
|
2782
|
+
"line"
|
|
2783
|
+
]
|
|
2784
|
+
}
|
|
2785
|
+
},
|
|
2786
|
+
"propCounts": {
|
|
2787
|
+
"own": 2,
|
|
2788
|
+
"aria": 0,
|
|
2789
|
+
"dom": 277,
|
|
2790
|
+
"other": 0
|
|
2791
|
+
}
|
|
2792
|
+
},
|
|
2793
|
+
"ChartTooltip": {
|
|
2794
|
+
"name": "ChartTooltip",
|
|
2795
|
+
"source": "src/components/Chart.tsx",
|
|
2796
|
+
"propsType": "ChartTooltipProps",
|
|
2797
|
+
"description": "ChartTooltip — the panel that shows the values under the pointer.\n\nPut it inside visx's Tooltip with `chartTooltipProps`, so visx places it and\nthis draws it: raised, rimmed and shadowed like Popover and Toast.\n\nIT IS NOT THE ACCESSIBLE WAY TO THE DATA. It appears on hover, so a keyboard\nor screen-reader user never sees it. Every chart still needs a text summary\nand the values in a table (visually hidden is fine) — the tooltip is a\nconvenience for pointer users, never the only route to a number.",
|
|
2798
|
+
"import": "import { ChartTooltip } from 'ionbase-ui';",
|
|
2799
|
+
"status": "stable",
|
|
2800
|
+
"since": "0.74.0",
|
|
2801
|
+
"summary": "The panel showing the values under the pointer on a visx chart. visx positions it; this draws it.",
|
|
2802
|
+
"useWhen": [
|
|
2803
|
+
"a chart drawn with visx shows exact values on hover",
|
|
2804
|
+
"several series share an x value and the reader compares them at a point"
|
|
2805
|
+
],
|
|
2806
|
+
"useInstead": [
|
|
2807
|
+
{
|
|
2808
|
+
"when": "it explains a control rather than a data point",
|
|
2809
|
+
"use": "Tooltip"
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
"when": "it holds interactive content",
|
|
2813
|
+
"use": "Popover"
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
"when": "the reader needs every value, or needs them without a pointer",
|
|
2817
|
+
"use": "Table"
|
|
2818
|
+
}
|
|
2819
|
+
],
|
|
2820
|
+
"composition": {
|
|
2821
|
+
"note": "Render it inside visx's Tooltip, TooltipWithBounds or TooltipInPortal with {...chartTooltipProps}, which turns off visx's own box so this one is the only panel. Axes take {...chartAxisProps} and gridlines {...chartGridProps}; a series takes className={chartSeriesClass(n)} plus ion-chart__line, __area, __bar or __point.",
|
|
2822
|
+
"example": "<TooltipWithBounds top={top} left={left} {...chartTooltipProps}><ChartTooltip title=\"12 Sep\" rows={[{ label: 'Success rate', value: '96.2%', series: 1 }]} /></TooltipWithBounds>"
|
|
2823
|
+
},
|
|
2824
|
+
"a11y": {
|
|
2825
|
+
"guarantees": [
|
|
2826
|
+
"rows are a <dl>, so each value is announced with its label",
|
|
2827
|
+
"the series swatch is aria-hidden; the label carries the name"
|
|
2828
|
+
],
|
|
2829
|
+
"requires": [
|
|
2830
|
+
"a text summary and the values in a table (visually hidden is fine) — the tooltip appears on hover, so keyboard and screen-reader users never reach it",
|
|
2831
|
+
"`value` already formatted — the tooltip cannot know the unit or precision"
|
|
2832
|
+
]
|
|
2833
|
+
},
|
|
2834
|
+
"antiPatterns": [
|
|
2835
|
+
{
|
|
2836
|
+
"dont": "making the tooltip the only way to read a value",
|
|
2837
|
+
"why": "it exists only under a mouse pointer; without a table the data is invisible to keyboard and screen-reader users"
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
"dont": "leaving visx's default tooltip styles on",
|
|
2841
|
+
"why": "it draws a second white box with a hardcoded shadow around this one, and that box does not theme"
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
"dont": "a swatch colour that does not match the series",
|
|
2845
|
+
"why": "pass the same `series` number the line or bar uses — the swatch reads the same token only if it is told the same index"
|
|
2846
|
+
}
|
|
2847
|
+
],
|
|
2848
|
+
"stylesheet": "src/styles/chart.css",
|
|
2849
|
+
"tokens": [
|
|
2850
|
+
"--border-default",
|
|
2851
|
+
"--border-strong",
|
|
2852
|
+
"--border-stronger",
|
|
2853
|
+
"--border-subtle",
|
|
2854
|
+
"--border-width-default",
|
|
2855
|
+
"--chart-1",
|
|
2856
|
+
"--chart-2",
|
|
2857
|
+
"--chart-3",
|
|
2858
|
+
"--chart-4",
|
|
2859
|
+
"--chart-5",
|
|
2860
|
+
"--chart-6",
|
|
2861
|
+
"--chart-7",
|
|
2862
|
+
"--chart-8",
|
|
2863
|
+
"--chart-sequential-1",
|
|
2864
|
+
"--chart-sequential-2",
|
|
2865
|
+
"--chart-sequential-3",
|
|
2866
|
+
"--chart-sequential-4",
|
|
2867
|
+
"--chart-sequential-5",
|
|
2868
|
+
"--font-family-sans",
|
|
2869
|
+
"--font-weight-medium",
|
|
2870
|
+
"--font-weight-semibold",
|
|
2871
|
+
"--ion-chart-series",
|
|
2872
|
+
"--ion-shadow-shadow-lg",
|
|
2873
|
+
"--radius-2xs",
|
|
2874
|
+
"--radius-full",
|
|
2875
|
+
"--radius-md",
|
|
2876
|
+
"--spacing-12",
|
|
2877
|
+
"--spacing-16",
|
|
2878
|
+
"--spacing-4",
|
|
2879
|
+
"--spacing-6",
|
|
2880
|
+
"--spacing-8",
|
|
2881
|
+
"--surface-default",
|
|
2882
|
+
"--surface-raised",
|
|
2883
|
+
"--surface-sunken",
|
|
2884
|
+
"--text-default",
|
|
2885
|
+
"--text-secondary",
|
|
2886
|
+
"--text-tertiary",
|
|
2887
|
+
"--type-body-sm",
|
|
2888
|
+
"--type-body-sm-line-height",
|
|
2889
|
+
"--type-caption",
|
|
2890
|
+
"--type-caption-line-height"
|
|
2891
|
+
],
|
|
2892
|
+
"props": {
|
|
2893
|
+
"title": {
|
|
2894
|
+
"type": "React.ReactNode",
|
|
2895
|
+
"required": false,
|
|
2896
|
+
"origin": "own",
|
|
2897
|
+
"description": "What the pointer is over — usually the x value, e.g. a date."
|
|
2898
|
+
},
|
|
2899
|
+
"rows": {
|
|
2900
|
+
"type": "ChartTooltipRow[] | undefined",
|
|
2901
|
+
"required": false,
|
|
2902
|
+
"origin": "own",
|
|
2903
|
+
"description": "One row per series at that point."
|
|
2904
|
+
},
|
|
2905
|
+
"children": {
|
|
2906
|
+
"type": "React.ReactNode",
|
|
2907
|
+
"required": false,
|
|
2908
|
+
"origin": "own",
|
|
2909
|
+
"description": "Free content after the rows, for anything that is not label/value."
|
|
2910
|
+
}
|
|
2911
|
+
},
|
|
2912
|
+
"propCounts": {
|
|
2913
|
+
"own": 3,
|
|
2914
|
+
"aria": 0,
|
|
2915
|
+
"dom": 276,
|
|
2916
|
+
"other": 0
|
|
2917
|
+
}
|
|
2918
|
+
},
|
|
2655
2919
|
"Checkbox": {
|
|
2656
2920
|
"name": "Checkbox",
|
|
2657
2921
|
"source": "src/components/Checkbox.tsx",
|