ionbase-ui 0.73.0 → 0.76.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.
Files changed (36) hide show
  1. package/dist/components/Chart.d.ts +95 -0
  2. package/dist/components/Chart.d.ts.map +1 -0
  3. package/dist/components/Chart.js +60 -0
  4. package/dist/components/Chart.js.map +1 -0
  5. package/dist/components/NavItem.d.ts +7 -0
  6. package/dist/components/NavItem.d.ts.map +1 -1
  7. package/dist/components/NavItem.js +3 -1
  8. package/dist/components/NavItem.js.map +1 -1
  9. package/dist/components/agent-run.d.ts +147 -0
  10. package/dist/components/agent-run.d.ts.map +1 -0
  11. package/dist/components/agent-run.js +250 -0
  12. package/dist/components/agent-run.js.map +1 -0
  13. package/dist/components/index.d.ts +6 -0
  14. package/dist/components/index.d.ts.map +1 -1
  15. package/dist/components/index.js +14 -0
  16. package/dist/components/index.js.map +1 -1
  17. package/dist/components/use-agent-run.d.ts +65 -0
  18. package/dist/components/use-agent-run.d.ts.map +1 -0
  19. package/dist/components/use-agent-run.js +127 -0
  20. package/dist/components/use-agent-run.js.map +1 -0
  21. package/dist/figma-descriptions.json +76 -66
  22. package/dist/figma-map.json +98 -4
  23. package/dist/meta/ChartLegend.json +125 -0
  24. package/dist/meta/ChartTooltip.json +126 -0
  25. package/dist/meta/NavItem.json +17 -3
  26. package/dist/meta/components.json +282 -4
  27. package/dist/meta/contrast.json +528 -0
  28. package/dist/meta/index.json +33 -1
  29. package/dist/meta/patterns/AgentRun.json +14 -0
  30. package/dist/meta/patterns/HumanApproval.json +4 -0
  31. package/dist/meta/patterns/index.json +3 -1
  32. package/dist/styles/chart.css +275 -0
  33. package/dist/styles/index.css +1 -0
  34. package/dist/styles/nav-item.css +37 -2
  35. package/llms.txt +11 -3
  36. package/package.json +1 -1
@@ -1,10 +1,23 @@
1
1
  {
2
2
  "package": "ionbase-ui",
3
- "version": "0.73.0",
3
+ "version": "0.76.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",
@@ -6851,7 +7115,8 @@
6851
7115
  "guarantees": [
6852
7116
  "hover state comes from React Aria's pointer-aware `useHover`, so a tap does not stay hovered until the next tap elsewhere",
6853
7117
  "the focus ring shows for keyboard navigation only",
6854
- "the CSS keeps its own `:hover` / `:focus-visible` rules, so the styling survives without React"
7118
+ "the CSS keeps its own `:hover` / `:focus-visible` rules, so the styling survives without React",
7119
+ "`isCurrent` sets `aria-current=\"page\"`, and the current item is marked by an underline as well as colour, which survives forced-colours mode"
6855
7120
  ],
6856
7121
  "requires": [
6857
7122
  "an accessible name — `children`, or `aria-label` on an icon-only item"
@@ -6869,6 +7134,10 @@
6869
7134
  "dont": "marking the current page with colour only",
6870
7135
  "do": "`aria-current=\"page\"`",
6871
7136
  "why": "a screen-reader user is otherwise never told where they are"
7137
+ },
7138
+ {
7139
+ "dont": "marking the current page with a className or colour of your own instead of `isCurrent`",
7140
+ "why": "a screen reader hears nothing without `aria-current`, and a colour-only marker fails anyone who cannot see the difference"
6872
7141
  }
6873
7142
  ],
6874
7143
  "deprecated": [
@@ -6880,11 +7149,13 @@
6880
7149
  "stylesheet": "src/styles/nav-item.css",
6881
7150
  "tokens": [
6882
7151
  "--border-focus",
7152
+ "--border-primary",
6883
7153
  "--border-width-thick",
6884
7154
  "--font-family-sans",
6885
- "--font-weight-regular",
7155
+ "--font-weight-medium",
6886
7156
  "--icon-disabled",
6887
7157
  "--icon-interactive-hover",
7158
+ "--icon-primary",
6888
7159
  "--icon-size-sm",
6889
7160
  "--icon-tertiary",
6890
7161
  "--ion-duration-base",
@@ -6892,6 +7163,7 @@
6892
7163
  "--radius-sm",
6893
7164
  "--spacing-4",
6894
7165
  "--spacing-8",
7166
+ "--text-default",
6895
7167
  "--text-disabled",
6896
7168
  "--text-interactive-hover",
6897
7169
  "--text-secondary",
@@ -6911,6 +7183,12 @@
6911
7183
  "origin": "own",
6912
7184
  "description": "Figma's `Show Chevron`. Set on a nav item that opens a menu, not a plain link."
6913
7185
  },
7186
+ "isCurrent": {
7187
+ "type": "boolean | undefined",
7188
+ "required": false,
7189
+ "origin": "own",
7190
+ "description": "The page the user is on. Marks the item `aria-current=\"page\"` and draws\nthe same indicator Tabs' underline does — so a section switcher built from\nNavItems says where you are, in words for a screen reader and in more than\ncolour for everyone else."
7191
+ },
6914
7192
  "isDisabled": {
6915
7193
  "type": "boolean | undefined",
6916
7194
  "required": false,
@@ -6941,7 +7219,7 @@
6941
7219
  }
6942
7220
  },
6943
7221
  "propCounts": {
6944
- "own": 7,
7222
+ "own": 8,
6945
7223
  "aria": 0,
6946
7224
  "dom": 276,
6947
7225
  "other": 0