@surreal-ui/catalog 0.9.1 → 0.10.1

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.
@@ -20,6 +20,7 @@
20
20
  }
21
21
 
22
22
 
23
+
23
24
  /* button */
24
25
  .sui-button {
25
26
  display: inline-flex;
@@ -199,6 +200,7 @@
199
200
  }
200
201
 
201
202
 
203
+
202
204
  /* input */
203
205
  .sui-input {
204
206
  display: flex;
@@ -264,6 +266,8 @@
264
266
  color: var(--sui-danger);
265
267
  }
266
268
 
269
+
270
+
267
271
  /* progress */
268
272
  .sui-progress {
269
273
  display: flex;
@@ -469,3 +473,4 @@
469
473
  opacity: 0.5;
470
474
  cursor: not-allowed;
471
475
  }
476
+
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  getComponent,
17
17
  replacementFor,
18
18
  resolveRole
19
- } from "./chunk-G2FSYMIB.js";
19
+ } from "./chunk-5E7QNEVK.js";
20
20
  import {
21
21
  mapDeprecatedProps,
22
22
  resolveStructure
package/dist/lazy.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  getAesthetic,
12
12
  getComponent,
13
13
  replacementFor
14
- } from "./chunk-G2FSYMIB.js";
14
+ } from "./chunk-5E7QNEVK.js";
15
15
  import "./chunk-HMNTTISG.js";
16
16
 
17
17
  // src/lazy.generated.ts
@@ -22,6 +22,107 @@ interface BarChartProps {
22
22
  /** Vertical bars comparing values across categories, one colour per series, with a value axis and a legend for several series. (editor `bar-chart`, coloured by the aesthetic's roles.) */
23
23
  declare function BarChart({ categories, series, title, unit, width, height, className, style }: BarChartProps): React.JSX.Element;
24
24
 
25
+ interface BraidProps {
26
+ /** What the strands twist into, labelled at the braid's start. */
27
+ root?: string;
28
+ /** The strands, each labelled at the braid's open end. */
29
+ strands: {
30
+ name: string;
31
+ value?: number;
32
+ }[];
33
+ /** Whole twists along the braid (default 2.5); a short braid takes fewer, so each twist keeps its shape. */
34
+ turns?: number;
35
+ /** Accessible name (default: built from the data). */
36
+ title?: string;
37
+ /** Controlled focus; leave out for the component to keep its own. */
38
+ focus?: string | null;
39
+ onFocusChange?: (focus: string | null) => void;
40
+ /** Draw-on progress, 0–1 (1 is the picture at rest). Leave out to draw on once when shown (not under reduced motion). */
41
+ progress?: number;
42
+ /** Draw on when shown (default true). Ignored when `progress` is given. */
43
+ animate?: boolean;
44
+ /** Length of the draw-on in ms (default 1600). */
45
+ duration?: number;
46
+ /** Width in CSS px. */
47
+ width?: number;
48
+ /** Height in CSS px. */
49
+ height?: number;
50
+ className?: string;
51
+ style?: React.CSSProperties;
52
+ }
53
+ /** Strands twisted into one root, passing over and under, weighted by value and labelled at the open end; draws on along the braid, and focusing a strand lights it. (editor `braid`, coloured by the aesthetic's roles.) */
54
+ declare function Braid({ root, strands, turns, title, focus, onFocusChange, progress, animate, duration, width, height, className, style }: BraidProps): React.JSX.Element;
55
+
56
+ interface DonutChartProps {
57
+ /** Parts of the whole, largest first reads best. */
58
+ slices: {
59
+ label: string;
60
+ value: number;
61
+ }[];
62
+ /** Title drawn above the chart and used as its accessible name. */
63
+ title?: string;
64
+ /** Written after every value, e.g. "%". */
65
+ unit?: string;
66
+ /** Width in CSS px. */
67
+ width?: number;
68
+ /** Height in CSS px. */
69
+ height?: number;
70
+ className?: string;
71
+ style?: React.CSSProperties;
72
+ }
73
+ /** Parts of a whole as slices of a ring, one colour per slice, with a legend. (editor `donut-chart`, coloured by the aesthetic's roles.) */
74
+ declare function DonutChart({ slices, title, unit, width, height, className, style }: DonutChartProps): React.JSX.Element;
75
+
76
+ interface LineChartProps {
77
+ /** Labels along the x axis, in order. */
78
+ categories: string[];
79
+ /** One line per series, one value per category. */
80
+ series: {
81
+ name: string;
82
+ values: number[];
83
+ }[];
84
+ /** Title drawn above the chart and used as its accessible name. */
85
+ title?: string;
86
+ /** Written after every tick and value, e.g. "%" or " kWh". */
87
+ unit?: string;
88
+ /** Width in CSS px. */
89
+ width?: number;
90
+ /** Height in CSS px. */
91
+ height?: number;
92
+ className?: string;
93
+ style?: React.CSSProperties;
94
+ }
95
+ /** Lines showing how values change across ordered categories (time), one colour per series, with a value axis and a legend for several series. (editor `line-chart`, coloured by the aesthetic's roles.) */
96
+ declare function LineChart({ categories, series, title, unit, width, height, className, style }: LineChartProps): React.JSX.Element;
97
+
98
+ interface LineageProps {
99
+ /** The root everything descends from, e.g. a team or a product. */
100
+ root: string;
101
+ /** The row it fans out to, in order. */
102
+ items: {
103
+ label: string;
104
+ }[];
105
+ /** Accessible name (default: built from the data). */
106
+ title?: string;
107
+ /** Controlled focus; leave out for the component to keep its own. */
108
+ focus?: string | null;
109
+ onFocusChange?: (focus: string | null) => void;
110
+ /** Draw-on progress, 0–1 (1 is the picture at rest). Leave out to draw on once when shown (not under reduced motion). */
111
+ progress?: number;
112
+ /** Draw on when shown (default true). Ignored when `progress` is given. */
113
+ animate?: boolean;
114
+ /** Length of the draw-on in ms (default 1600). */
115
+ duration?: number;
116
+ /** Width in CSS px. */
117
+ width?: number;
118
+ /** Height in CSS px. */
119
+ height?: number;
120
+ className?: string;
121
+ style?: React.CSSProperties;
122
+ }
123
+ /** One root fanned out to a row of items with rounded connectors that never cross, labels sized to fit their columns; draws on from the root, and focusing an item lights its branch. (editor `lineage`, coloured by the aesthetic's roles.) */
124
+ declare function Lineage({ root, items, title, focus, onFocusChange, progress, animate, duration, width, height, className, style }: LineageProps): React.JSX.Element;
125
+
25
126
  interface SparklineProps {
26
127
  /** The values in order, left to right. */
27
128
  values: number[];
@@ -37,4 +138,31 @@ interface SparklineProps {
37
138
  /** A word-sized line chart of one run of values, without axes or labels. (editor `sparkline`, coloured by the aesthetic's roles.) */
38
139
  declare function Sparkline({ values, label, width, height, className, style }: SparklineProps): React.JSX.Element;
39
140
 
40
- export { BarChart, type BarChartProps, Sparkline, type SparklineProps };
141
+ interface WeaveProps {
142
+ /** Items along the top, each with the tags it has; tags along the bottom in order of first appearance (at most 24). */
143
+ items: {
144
+ label: string;
145
+ tags: string[];
146
+ }[];
147
+ /** Accessible name (default: built from the data). */
148
+ title?: string;
149
+ /** Controlled focus; leave out for the component to keep its own. */
150
+ focus?: string | null;
151
+ onFocusChange?: (focus: string | null) => void;
152
+ /** Draw-on progress, 0–1 (1 is the picture at rest). Leave out to draw on once when shown (not under reduced motion). */
153
+ progress?: number;
154
+ /** Draw on when shown (default true). Ignored when `progress` is given. */
155
+ animate?: boolean;
156
+ /** Length of the draw-on in ms (default 1600). */
157
+ duration?: number;
158
+ /** Width in CSS px. */
159
+ width?: number;
160
+ /** Height in CSS px. */
161
+ height?: number;
162
+ className?: string;
163
+ style?: React.CSSProperties;
164
+ }
165
+ /** Items along the top joined to the tags they share along the bottom, many to many; focusing an item lights its tags, and focusing a tag lights its items. (editor `weave`, coloured by the aesthetic's roles.) */
166
+ declare function Weave({ items, title, focus, onFocusChange, progress, animate, duration, width, height, className, style }: WeaveProps): React.JSX.Element;
167
+
168
+ export { BarChart, type BarChartProps, Braid, type BraidProps, DonutChart, type DonutChartProps, LineChart, type LineChartProps, Lineage, type LineageProps, Sparkline, type SparklineProps, Weave, type WeaveProps };