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
|
@@ -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",
|
|
@@ -9745,6 +10009,108 @@
|
|
|
9745
10009
|
"other": 0
|
|
9746
10010
|
}
|
|
9747
10011
|
},
|
|
10012
|
+
"SettingRow": {
|
|
10013
|
+
"name": "SettingRow",
|
|
10014
|
+
"source": "src/components/SettingRow.tsx",
|
|
10015
|
+
"propsType": "SettingRowProps",
|
|
10016
|
+
"description": "SettingRow — one setting: its name and what it does on the left, the control\non the right. The row the SettingsPanel pattern is built from.\n\nTHE WIRING IS THE POINT, NOT THE LAYOUT\n\nA label placed beside a Toggle looks labelled and is not: a screen reader\nannounces \"switch, off\" and nothing else, and the description is never read\nat all. The pattern names this as its first a11y requirement, and the demo\napp's stand-in handed the ids to a render function — which still left the\nwiring as a step to remember. Here an element child is cloned with\n`aria-labelledby` and `aria-describedby` already set, so the row cannot be\nused without them. A value the caller passes explicitly wins, so an\nexisting name is never overwritten.\n\nA CONTROL WITH ITS OWN TEXT KEEPS ITS OWN NAME\n\nA Button reading \"Delete workspace…\" must be announced by that text — WCAG\n2.5.3 wants the visible words inside the accessible name, and a row label of\n\"Danger zone\" would replace them. So a child with children of its own is\nleft named by them, and the row's label joins its description instead: the\nsetting is still announced, just as context rather than as the name.\n\nThe label is text rather than a `<label>` because the control may not be a\nform field, and a `<label>` pointing at a button is invalid.\n\nIt stacks below 30rem of its OWN width, not the viewport's, so the same row\nworks in a full page and in a narrow drawer.",
|
|
10017
|
+
"import": "import { SettingRow } from 'ionbase-ui';",
|
|
10018
|
+
"status": "stable",
|
|
10019
|
+
"since": "0.72.0",
|
|
10020
|
+
"summary": "One setting: its name and description on the left, the control on the right — and the control named and described by them automatically.",
|
|
10021
|
+
"useWhen": [
|
|
10022
|
+
"a settings or preferences panel, one row per setting",
|
|
10023
|
+
"a control whose meaning needs a sentence of explanation beside it"
|
|
10024
|
+
],
|
|
10025
|
+
"useInstead": [
|
|
10026
|
+
{
|
|
10027
|
+
"when": "it is a form field with its own visible label above it",
|
|
10028
|
+
"use": "Input",
|
|
10029
|
+
"why": "Input, Select and the pickers carry their own label and description; a SettingRow around them names the field twice"
|
|
10030
|
+
},
|
|
10031
|
+
{
|
|
10032
|
+
"when": "a group of options answers one question",
|
|
10033
|
+
"use": "RadioGroup",
|
|
10034
|
+
"why": "the group has its own label; put the RadioGroup under a heading rather than in a row"
|
|
10035
|
+
}
|
|
10036
|
+
],
|
|
10037
|
+
"slots": {
|
|
10038
|
+
"children": {
|
|
10039
|
+
"accepts": [
|
|
10040
|
+
"Toggle",
|
|
10041
|
+
"Checkbox",
|
|
10042
|
+
"Select",
|
|
10043
|
+
"Button"
|
|
10044
|
+
],
|
|
10045
|
+
"note": "an element is cloned with aria-labelledby and aria-describedby pointing at the row's text; a function receives the ids instead, for a control that needs them somewhere else"
|
|
10046
|
+
}
|
|
10047
|
+
},
|
|
10048
|
+
"a11y": {
|
|
10049
|
+
"namesChild": true,
|
|
10050
|
+
"guarantees": [
|
|
10051
|
+
"an element child with no text of its own — a Toggle, a Checkbox with no label — is named by the row's label and described by its description, so it is announced as \"Weekly digest, switch, off\" plus what it does, not \"switch, off\"",
|
|
10052
|
+
"a child with its own text — a Button — keeps that text as its name (WCAG 2.5.3), and the row's label and description are attached as its description instead",
|
|
10053
|
+
"an aria-labelledby or aria-describedby the caller passes explicitly is kept, never overwritten",
|
|
10054
|
+
"it stacks by its own width, so it reads the same in a page and in a narrow drawer"
|
|
10055
|
+
],
|
|
10056
|
+
"requires": [
|
|
10057
|
+
"one control per row — the ids name one element"
|
|
10058
|
+
],
|
|
10059
|
+
"notes": [
|
|
10060
|
+
"The label is text, not a <label>, because the control may be a Button; a <label> pointing at a button is invalid."
|
|
10061
|
+
]
|
|
10062
|
+
},
|
|
10063
|
+
"antiPatterns": [
|
|
10064
|
+
{
|
|
10065
|
+
"dont": "a Toggle or Checkbox with its own visible label inside a SettingRow",
|
|
10066
|
+
"why": "the control then names itself, the row's label becomes a description, and the setting's name is shown twice"
|
|
10067
|
+
},
|
|
10068
|
+
{
|
|
10069
|
+
"dont": "a Checkbox row that saves immediately",
|
|
10070
|
+
"why": "Toggle is immediate and Checkbox is saved with a submit — the SettingsPanel pattern's first rule"
|
|
10071
|
+
}
|
|
10072
|
+
],
|
|
10073
|
+
"stylesheet": "src/styles/setting-row.css",
|
|
10074
|
+
"tokens": [
|
|
10075
|
+
"--font-family-sans",
|
|
10076
|
+
"--font-weight-semibold",
|
|
10077
|
+
"--spacing-16",
|
|
10078
|
+
"--spacing-2",
|
|
10079
|
+
"--spacing-8",
|
|
10080
|
+
"--text-default",
|
|
10081
|
+
"--text-secondary",
|
|
10082
|
+
"--type-body",
|
|
10083
|
+
"--type-body-line-height",
|
|
10084
|
+
"--type-body-sm",
|
|
10085
|
+
"--type-body-sm-line-height"
|
|
10086
|
+
],
|
|
10087
|
+
"props": {
|
|
10088
|
+
"label": {
|
|
10089
|
+
"type": "React.ReactNode",
|
|
10090
|
+
"required": true,
|
|
10091
|
+
"origin": "own",
|
|
10092
|
+
"description": "The setting's name. It becomes the control's accessible name."
|
|
10093
|
+
},
|
|
10094
|
+
"description": {
|
|
10095
|
+
"type": "React.ReactNode",
|
|
10096
|
+
"required": false,
|
|
10097
|
+
"origin": "own",
|
|
10098
|
+
"description": "What the setting does, announced with the control."
|
|
10099
|
+
},
|
|
10100
|
+
"children": {
|
|
10101
|
+
"type": "React.ReactElement<{ 'aria-labelledby'?: string; 'aria-describedby'?: string; children?: React.ReactNode; }, string | React.JSXElementConstructor<any>> | ((ids: SettingRowIds) => React.ReactNode)",
|
|
10102
|
+
"required": true,
|
|
10103
|
+
"origin": "own",
|
|
10104
|
+
"description": "The control. Pass it as an element — `<Toggle />`, `<Select />`,\n`<Button />` — and the row names and describes it for you. Pass a\nfunction when the ids have to go somewhere other than the element's own\nprops; it receives them."
|
|
10105
|
+
}
|
|
10106
|
+
},
|
|
10107
|
+
"propCounts": {
|
|
10108
|
+
"own": 3,
|
|
10109
|
+
"aria": 0,
|
|
10110
|
+
"dom": 277,
|
|
10111
|
+
"other": 0
|
|
10112
|
+
}
|
|
10113
|
+
},
|
|
9748
10114
|
"Sidebar": {
|
|
9749
10115
|
"name": "Sidebar",
|
|
9750
10116
|
"source": "src/components/Sidebar.tsx",
|
|
@@ -10453,6 +10819,234 @@
|
|
|
10453
10819
|
"other": 0
|
|
10454
10820
|
}
|
|
10455
10821
|
},
|
|
10822
|
+
"StatGroup": {
|
|
10823
|
+
"name": "StatGroup",
|
|
10824
|
+
"source": "src/components/StatTile.tsx",
|
|
10825
|
+
"propsType": "StatGroupProps",
|
|
10826
|
+
"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.",
|
|
10827
|
+
"import": "import { StatGroup } from 'ionbase-ui';",
|
|
10828
|
+
"status": "stable",
|
|
10829
|
+
"since": "0.71.0",
|
|
10830
|
+
"summary": "A row of StatTiles, as a description list. Wraps on its own — no breakpoints in the caller's code.",
|
|
10831
|
+
"useWhen": [
|
|
10832
|
+
"two or more headline figures shown side by side"
|
|
10833
|
+
],
|
|
10834
|
+
"useInstead": [
|
|
10835
|
+
{
|
|
10836
|
+
"when": "the figures are rows of records to compare field by field",
|
|
10837
|
+
"use": "Table"
|
|
10838
|
+
}
|
|
10839
|
+
],
|
|
10840
|
+
"composition": {
|
|
10841
|
+
"order": [
|
|
10842
|
+
"StatGroup",
|
|
10843
|
+
"StatTile"
|
|
10844
|
+
],
|
|
10845
|
+
"note": "StatGroup renders the <dl>; each StatTile renders a <dt> and a <dd> inside it. A StatTile outside a StatGroup is invalid HTML.",
|
|
10846
|
+
"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>"
|
|
10847
|
+
},
|
|
10848
|
+
"slots": {
|
|
10849
|
+
"children": {
|
|
10850
|
+
"accepts": [
|
|
10851
|
+
"StatTile"
|
|
10852
|
+
],
|
|
10853
|
+
"note": "StatTiles only — the group is a <dl>, so anything else inside it is invalid"
|
|
10854
|
+
}
|
|
10855
|
+
},
|
|
10856
|
+
"a11y": {
|
|
10857
|
+
"guarantees": [
|
|
10858
|
+
"a <dl>, so each label is announced as the term for its figure"
|
|
10859
|
+
],
|
|
10860
|
+
"notes": [
|
|
10861
|
+
"Give the group a heading or aria-label when the page has more than one, so a screen reader can tell them apart."
|
|
10862
|
+
]
|
|
10863
|
+
},
|
|
10864
|
+
"antiPatterns": [
|
|
10865
|
+
{
|
|
10866
|
+
"dont": "adding media queries to change the column count",
|
|
10867
|
+
"why": "the grid already wraps by tile width; a breakpoint fights it"
|
|
10868
|
+
}
|
|
10869
|
+
],
|
|
10870
|
+
"stylesheet": null,
|
|
10871
|
+
"tokens": [],
|
|
10872
|
+
"props": {
|
|
10873
|
+
"children": {
|
|
10874
|
+
"type": "React.ReactNode",
|
|
10875
|
+
"required": false,
|
|
10876
|
+
"origin": "own",
|
|
10877
|
+
"description": "StatTile elements."
|
|
10878
|
+
}
|
|
10879
|
+
},
|
|
10880
|
+
"propCounts": {
|
|
10881
|
+
"own": 1,
|
|
10882
|
+
"aria": 0,
|
|
10883
|
+
"dom": 277,
|
|
10884
|
+
"other": 0
|
|
10885
|
+
}
|
|
10886
|
+
},
|
|
10887
|
+
"StatTile": {
|
|
10888
|
+
"name": "StatTile",
|
|
10889
|
+
"source": "src/components/StatTile.tsx",
|
|
10890
|
+
"propsType": "StatTileProps",
|
|
10891
|
+
"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>`.",
|
|
10892
|
+
"import": "import { StatTile } from 'ionbase-ui';",
|
|
10893
|
+
"status": "stable",
|
|
10894
|
+
"since": "0.71.0",
|
|
10895
|
+
"summary": "One headline figure and how it moved against a comparison period. Good and bad come from `goodWhen`, never from the sign alone.",
|
|
10896
|
+
"useWhen": [
|
|
10897
|
+
"a dashboard or overview leads with a handful of key numbers",
|
|
10898
|
+
"a change against a previous period is part of what the number means"
|
|
10899
|
+
],
|
|
10900
|
+
"useInstead": [
|
|
10901
|
+
{
|
|
10902
|
+
"when": "it is a summary with text and media rather than a number",
|
|
10903
|
+
"use": "FullCard"
|
|
10904
|
+
},
|
|
10905
|
+
{
|
|
10906
|
+
"when": "the figure is progress toward a known total",
|
|
10907
|
+
"use": "ProgressBar"
|
|
10908
|
+
},
|
|
10909
|
+
{
|
|
10910
|
+
"when": "there are more than about six figures, or they need comparing across rows",
|
|
10911
|
+
"use": "Table"
|
|
10912
|
+
}
|
|
10913
|
+
],
|
|
10914
|
+
"composition": {
|
|
10915
|
+
"order": [
|
|
10916
|
+
"StatGroup",
|
|
10917
|
+
"StatTile"
|
|
10918
|
+
],
|
|
10919
|
+
"note": "Always inside a StatGroup: the tile renders a <dt> and a <dd>, which are only valid inside a <dl>.",
|
|
10920
|
+
"example": "<StatGroup><StatTile label=\"Success rate\" value=\"96.2%\" change={1.1} changeUnit=\"points\" /></StatGroup>"
|
|
10921
|
+
},
|
|
10922
|
+
"variants": {
|
|
10923
|
+
"goodWhen": {
|
|
10924
|
+
"up": {
|
|
10925
|
+
"use": "the default — revenue, success rate, anything where more is better"
|
|
10926
|
+
},
|
|
10927
|
+
"down": {
|
|
10928
|
+
"use": "costs, durations, error counts and queues, where a rise is bad news"
|
|
10929
|
+
},
|
|
10930
|
+
"neutral": {
|
|
10931
|
+
"use": "a change that is neither — run volume, traffic — so it is never coloured"
|
|
10932
|
+
}
|
|
10933
|
+
},
|
|
10934
|
+
"changeUnit": {
|
|
10935
|
+
"percent": {
|
|
10936
|
+
"use": "the default — a relative change"
|
|
10937
|
+
},
|
|
10938
|
+
"points": {
|
|
10939
|
+
"use": "the metric is itself a percentage: 95% to 96% is +1.0 pts, not +1.1%"
|
|
10940
|
+
}
|
|
10941
|
+
}
|
|
10942
|
+
},
|
|
10943
|
+
"a11y": {
|
|
10944
|
+
"guarantees": [
|
|
10945
|
+
"the verdict is spoken as text (\"better\" or \"worse\") after the change, so it never rests on the badge's colour",
|
|
10946
|
+
"the direction is in the text as a sign as well as in the arrow",
|
|
10947
|
+
"`isLoading` marks the tile aria-busy while its placeholder shows"
|
|
10948
|
+
],
|
|
10949
|
+
"requires": [
|
|
10950
|
+
"`value` already formatted — the tile cannot know the locale, precision or unit",
|
|
10951
|
+
"the right `goodWhen` for the metric; the default `up` colours a rising cost green"
|
|
10952
|
+
]
|
|
10953
|
+
},
|
|
10954
|
+
"antiPatterns": [
|
|
10955
|
+
{
|
|
10956
|
+
"dont": "leaving `goodWhen` at `up` for a duration, cost or error count",
|
|
10957
|
+
"why": "a slower, costlier or more error-prone week is shown green and announced as better"
|
|
10958
|
+
},
|
|
10959
|
+
{
|
|
10960
|
+
"dont": "a percentage change for a metric that is already a percentage",
|
|
10961
|
+
"why": "95% to 96% is +1 point; +1.1% misreports it — use changeUnit=\"points\""
|
|
10962
|
+
},
|
|
10963
|
+
{
|
|
10964
|
+
"dont": "passing a change of 0 to mean \"no data\"",
|
|
10965
|
+
"why": "0 renders \"No change\", a claim; omit `change` when there is nothing to compare"
|
|
10966
|
+
}
|
|
10967
|
+
],
|
|
10968
|
+
"stylesheet": "src/styles/stat-tile.css",
|
|
10969
|
+
"tokens": [
|
|
10970
|
+
"--border-subtle",
|
|
10971
|
+
"--border-width-default",
|
|
10972
|
+
"--font-family-sans",
|
|
10973
|
+
"--font-weight-semibold",
|
|
10974
|
+
"--radius-lg",
|
|
10975
|
+
"--spacing-12",
|
|
10976
|
+
"--spacing-16",
|
|
10977
|
+
"--spacing-6",
|
|
10978
|
+
"--spacing-8",
|
|
10979
|
+
"--surface-default",
|
|
10980
|
+
"--text-default",
|
|
10981
|
+
"--text-secondary",
|
|
10982
|
+
"--text-tertiary",
|
|
10983
|
+
"--type-body-sm",
|
|
10984
|
+
"--type-body-sm-line-height",
|
|
10985
|
+
"--type-caption",
|
|
10986
|
+
"--type-caption-line-height",
|
|
10987
|
+
"--type-h4",
|
|
10988
|
+
"--type-h4-line-height"
|
|
10989
|
+
],
|
|
10990
|
+
"props": {
|
|
10991
|
+
"label": {
|
|
10992
|
+
"type": "string",
|
|
10993
|
+
"required": true,
|
|
10994
|
+
"origin": "own",
|
|
10995
|
+
"description": "What is being measured. Short: \"Success rate\", not a sentence."
|
|
10996
|
+
},
|
|
10997
|
+
"value": {
|
|
10998
|
+
"type": "React.ReactNode",
|
|
10999
|
+
"required": true,
|
|
11000
|
+
"origin": "own",
|
|
11001
|
+
"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."
|
|
11002
|
+
},
|
|
11003
|
+
"change": {
|
|
11004
|
+
"type": "number | undefined",
|
|
11005
|
+
"required": false,
|
|
11006
|
+
"origin": "own",
|
|
11007
|
+
"description": "Change against the comparison period. Omit when there is none."
|
|
11008
|
+
},
|
|
11009
|
+
"changeUnit": {
|
|
11010
|
+
"type": "StatTileChangeUnit | undefined",
|
|
11011
|
+
"required": false,
|
|
11012
|
+
"origin": "own",
|
|
11013
|
+
"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.",
|
|
11014
|
+
"values": [
|
|
11015
|
+
"points",
|
|
11016
|
+
"percent"
|
|
11017
|
+
]
|
|
11018
|
+
},
|
|
11019
|
+
"goodWhen": {
|
|
11020
|
+
"type": "StatTileGoodWhen | undefined",
|
|
11021
|
+
"required": false,
|
|
11022
|
+
"origin": "own",
|
|
11023
|
+
"description": "Which direction is good news. `down` for costs, durations and queues;\n`neutral` when a change is neither, so it is never coloured.",
|
|
11024
|
+
"values": [
|
|
11025
|
+
"neutral",
|
|
11026
|
+
"up",
|
|
11027
|
+
"down"
|
|
11028
|
+
]
|
|
11029
|
+
},
|
|
11030
|
+
"comparison": {
|
|
11031
|
+
"type": "string | undefined",
|
|
11032
|
+
"required": false,
|
|
11033
|
+
"origin": "own",
|
|
11034
|
+
"description": "What `change` is measured against."
|
|
11035
|
+
},
|
|
11036
|
+
"isLoading": {
|
|
11037
|
+
"type": "boolean | undefined",
|
|
11038
|
+
"required": false,
|
|
11039
|
+
"origin": "own",
|
|
11040
|
+
"description": "Shows a placeholder for the value and change while data loads."
|
|
11041
|
+
}
|
|
11042
|
+
},
|
|
11043
|
+
"propCounts": {
|
|
11044
|
+
"own": 7,
|
|
11045
|
+
"aria": 0,
|
|
11046
|
+
"dom": 277,
|
|
11047
|
+
"other": 0
|
|
11048
|
+
}
|
|
11049
|
+
},
|
|
10456
11050
|
"Stepper": {
|
|
10457
11051
|
"name": "Stepper",
|
|
10458
11052
|
"source": "src/components/Stepper.tsx",
|