@tensor_1/react 2.66.0 → 2.67.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.
Files changed (49) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -2
  2. package/component-inventory.json +1076 -0
  3. package/dist/{ChartCore-CY5a4teJ.d.cts → ChartCore-BX0frnUz.d.cts} +1 -8
  4. package/dist/ChartMetric-bCAW4yvf.d.cts +16 -0
  5. package/dist/{GlanceCharts-Cb39RqDC.d.cts → GlanceCharts-PVaEwyp2.d.cts} +1 -1
  6. package/dist/chart-analytic.cjs +41 -38
  7. package/dist/chart-analytic.d.cts +3 -2
  8. package/dist/chart-analytic.d.ts +2 -1
  9. package/dist/chart-preset.cjs +37 -34
  10. package/dist/chart-preset.d.cts +5 -4
  11. package/dist/chart-preset.d.ts +2 -1
  12. package/dist/chart.cjs +37 -34
  13. package/dist/chart.d.cts +5 -4
  14. package/dist/chart.d.ts +2 -1
  15. package/dist/components/Avatar.d.ts +6 -3
  16. package/dist/components/Avatar.js +9 -3
  17. package/dist/components/Chart.d.ts +2 -1
  18. package/dist/components/ChartCore.d.ts +3 -8
  19. package/dist/components/ChartCore.js +1 -7
  20. package/dist/components/ChartMetric.d.ts +16 -0
  21. package/dist/components/ChartMetric.js +12 -0
  22. package/dist/components/ChartPanels.d.ts +1 -0
  23. package/dist/components/FocusOnMount.d.ts +15 -15
  24. package/dist/components/GlanceCharts.d.ts +1 -0
  25. package/dist/components/Menu.js +1 -0
  26. package/dist/components/MotionList.d.ts +16 -16
  27. package/dist/components/RuleBuilder.d.ts +8 -1
  28. package/dist/components/RuleBuilder.js +34 -12
  29. package/dist/glyphs-BAAgp2Xv.d.cts +256 -0
  30. package/dist/icons/Icon.d.ts +23 -24
  31. package/dist/icons/Icon.js +13 -8
  32. package/dist/icons/glyphs.js +3 -3
  33. package/dist/icons/intrinsic-components.d.ts +273 -0
  34. package/dist/icons/intrinsic-components.js +540 -0
  35. package/dist/icons/types.d.ts +9 -2
  36. package/dist/icons-intrinsic.cjs +1383 -0
  37. package/dist/icons-intrinsic.d.cts +275 -0
  38. package/dist/icons-intrinsic.d.ts +4 -0
  39. package/dist/icons-intrinsic.js +5 -0
  40. package/dist/icons.cjs +16 -11
  41. package/dist/icons.d.cts +6 -257
  42. package/dist/index.cjs +356 -304
  43. package/dist/index.d.cts +17 -6
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.js +2 -0
  46. package/dist/rule-builder-model.d.ts +4 -2
  47. package/dist/rule-builder-model.js +7 -1
  48. package/dist/{types-B7OIndwg.d.cts → types-cpbqVqOW.d.cts} +9 -2
  49. package/package.json +7 -2
@@ -0,0 +1,256 @@
1
+ import { I as IconNode } from './types-cpbqVqOW.cjs';
2
+
3
+ /** Every glyph by its UIx name (the Lucide kebab-case name). Importing this pulls in the whole set. */
4
+ declare const ICON_GLYPHS: {
5
+ readonly accessibility: IconNode;
6
+ readonly activity: IconNode;
7
+ readonly archive: IconNode;
8
+ readonly 'archive-restore': IconNode;
9
+ readonly 'arrow-down': IconNode;
10
+ readonly 'arrow-left': IconNode;
11
+ readonly 'arrow-left-right': IconNode;
12
+ readonly 'arrow-right': IconNode;
13
+ readonly 'arrow-up': IconNode;
14
+ readonly 'arrow-up-down': IconNode;
15
+ readonly 'arrow-up-right': IconNode;
16
+ readonly award: IconNode;
17
+ readonly 'badge-check': IconNode;
18
+ readonly banknote: IconNode;
19
+ readonly bell: IconNode;
20
+ readonly 'bell-off': IconNode;
21
+ readonly 'bell-ring': IconNode;
22
+ readonly 'book-open': IconNode;
23
+ readonly bookmark: IconNode;
24
+ readonly bot: IconNode;
25
+ readonly boxes: IconNode;
26
+ readonly briefcase: IconNode;
27
+ readonly 'building-2': IconNode;
28
+ readonly calendar: IconNode;
29
+ readonly 'calendar-check': IconNode;
30
+ readonly 'calendar-clock': IconNode;
31
+ readonly 'calendar-days': IconNode;
32
+ readonly 'calendar-off': IconNode;
33
+ readonly 'calendar-sync': IconNode;
34
+ readonly 'calendar-x': IconNode;
35
+ readonly camera: IconNode;
36
+ readonly 'chart-column': IconNode;
37
+ readonly check: IconNode;
38
+ readonly 'check-check': IconNode;
39
+ readonly 'chevron-down': IconNode;
40
+ readonly 'chevron-left': IconNode;
41
+ readonly 'chevron-right': IconNode;
42
+ readonly 'chevron-up': IconNode;
43
+ readonly 'chevrons-down-up': IconNode;
44
+ readonly 'chevrons-left': IconNode;
45
+ readonly 'chevrons-right': IconNode;
46
+ readonly 'chevrons-up-down': IconNode;
47
+ readonly circle: IconNode;
48
+ readonly 'circle-alert': IconNode;
49
+ readonly 'circle-check': IconNode;
50
+ readonly 'circle-check-big': IconNode;
51
+ readonly 'circle-dot': IconNode;
52
+ readonly 'circle-pause': IconNode;
53
+ readonly 'circle-play': IconNode;
54
+ readonly 'circle-question-mark': IconNode;
55
+ readonly 'circle-x': IconNode;
56
+ readonly 'clipboard-check': IconNode;
57
+ readonly 'clipboard-list': IconNode;
58
+ readonly clock: IconNode;
59
+ readonly cloud: IconNode;
60
+ readonly 'cloud-off': IconNode;
61
+ readonly coins: IconNode;
62
+ readonly 'columns-3': IconNode;
63
+ readonly command: IconNode;
64
+ readonly component: IconNode;
65
+ readonly copy: IconNode;
66
+ readonly 'corner-up-left': IconNode;
67
+ readonly 'credit-card': IconNode;
68
+ readonly database: IconNode;
69
+ readonly 'database-backup': IconNode;
70
+ readonly 'door-open': IconNode;
71
+ readonly download: IconNode;
72
+ readonly ellipsis: IconNode;
73
+ readonly 'ellipsis-vertical': IconNode;
74
+ readonly 'external-link': IconNode;
75
+ readonly eye: IconNode;
76
+ readonly 'eye-off': IconNode;
77
+ readonly 'face-slightly-smiling': IconNode;
78
+ readonly 'face-slightly-smiling-plus': IconNode;
79
+ readonly file: IconNode;
80
+ readonly 'file-archive': IconNode;
81
+ readonly 'file-chart-column-increasing': IconNode;
82
+ readonly 'file-check': IconNode;
83
+ readonly 'file-check-corner': IconNode;
84
+ readonly 'file-code': IconNode;
85
+ readonly 'file-down': IconNode;
86
+ readonly 'file-image': IconNode;
87
+ readonly 'file-input': IconNode;
88
+ readonly 'file-key': IconNode;
89
+ readonly 'file-question-mark': IconNode;
90
+ readonly 'file-search': IconNode;
91
+ readonly 'file-spreadsheet': IconNode;
92
+ readonly 'file-terminal': IconNode;
93
+ readonly 'file-text': IconNode;
94
+ readonly 'file-up': IconNode;
95
+ readonly flag: IconNode;
96
+ readonly 'folder-check': IconNode;
97
+ readonly 'folder-kanban': IconNode;
98
+ readonly 'folder-tree': IconNode;
99
+ readonly funnel: IconNode;
100
+ readonly gauge: IconNode;
101
+ readonly 'git-branch': IconNode;
102
+ readonly 'git-branch-plus': IconNode;
103
+ readonly 'git-compare-arrows': IconNode;
104
+ readonly 'git-merge': IconNode;
105
+ readonly 'git-pull-request-arrow': IconNode;
106
+ readonly 'git-pull-request-closed': IconNode;
107
+ readonly globe: IconNode;
108
+ readonly 'graduation-cap': IconNode;
109
+ readonly 'grid-3x3': IconNode;
110
+ readonly 'grip-vertical': IconNode;
111
+ readonly 'hand-heart': IconNode;
112
+ readonly heart: IconNode;
113
+ readonly 'heart-pulse': IconNode;
114
+ readonly hexagon: IconNode;
115
+ readonly hourglass: IconNode;
116
+ readonly house: IconNode;
117
+ readonly 'id-card': IconNode;
118
+ readonly image: IconNode;
119
+ readonly inbox: IconNode;
120
+ readonly info: IconNode;
121
+ readonly key: IconNode;
122
+ readonly 'key-round': IconNode;
123
+ readonly keyboard: IconNode;
124
+ readonly landmark: IconNode;
125
+ readonly languages: IconNode;
126
+ readonly laptop: IconNode;
127
+ readonly layers: IconNode;
128
+ readonly 'layout-dashboard': IconNode;
129
+ readonly 'layout-template': IconNode;
130
+ readonly library: IconNode;
131
+ readonly 'life-buoy': IconNode;
132
+ readonly lightbulb: IconNode;
133
+ readonly link: IconNode;
134
+ readonly 'link-2': IconNode;
135
+ readonly 'link-2-off': IconNode;
136
+ readonly 'list-checks': IconNode;
137
+ readonly 'list-filter': IconNode;
138
+ readonly 'list-tree': IconNode;
139
+ readonly 'loader-circle': IconNode;
140
+ readonly lock: IconNode;
141
+ readonly 'log-in': IconNode;
142
+ readonly 'log-out': IconNode;
143
+ readonly mail: IconNode;
144
+ readonly 'map-pin': IconNode;
145
+ readonly 'maximize-2': IconNode;
146
+ readonly megaphone: IconNode;
147
+ readonly menu: IconNode;
148
+ readonly 'message-circle': IconNode;
149
+ readonly 'message-square': IconNode;
150
+ readonly 'minimize-2': IconNode;
151
+ readonly minus: IconNode;
152
+ readonly monitor: IconNode;
153
+ readonly 'monitor-cog': IconNode;
154
+ readonly moon: IconNode;
155
+ readonly newspaper: IconNode;
156
+ readonly 'notebook-pen': IconNode;
157
+ readonly 'octagon-alert': IconNode;
158
+ readonly package: IconNode;
159
+ readonly 'package-open': IconNode;
160
+ readonly 'package-search': IconNode;
161
+ readonly palette: IconNode;
162
+ readonly 'panel-left': IconNode;
163
+ readonly paperclip: IconNode;
164
+ readonly 'party-popper': IconNode;
165
+ readonly pause: IconNode;
166
+ readonly 'pen-line': IconNode;
167
+ readonly pencil: IconNode;
168
+ readonly phone: IconNode;
169
+ readonly plane: IconNode;
170
+ readonly play: IconNode;
171
+ readonly plug: IconNode;
172
+ readonly plus: IconNode;
173
+ readonly presentation: IconNode;
174
+ readonly printer: IconNode;
175
+ readonly 'qr-code': IconNode;
176
+ readonly radar: IconNode;
177
+ readonly radio: IconNode;
178
+ readonly 'radio-tower': IconNode;
179
+ readonly receipt: IconNode;
180
+ readonly 'refresh-cw': IconNode;
181
+ readonly 'rotate-ccw': IconNode;
182
+ readonly 'rotate-ccw-clock': IconNode;
183
+ readonly route: IconNode;
184
+ readonly 'rows-2': IconNode;
185
+ readonly 'rows-3': IconNode;
186
+ readonly 'rows-4': IconNode;
187
+ readonly save: IconNode;
188
+ readonly scale: IconNode;
189
+ readonly scan: IconNode;
190
+ readonly 'scan-barcode': IconNode;
191
+ readonly 'scan-search': IconNode;
192
+ readonly 'scroll-text': IconNode;
193
+ readonly search: IconNode;
194
+ readonly 'search-x': IconNode;
195
+ readonly send: IconNode;
196
+ readonly server: IconNode;
197
+ readonly settings: IconNode;
198
+ readonly 'settings-2': IconNode;
199
+ readonly shapes: IconNode;
200
+ readonly 'share-2': IconNode;
201
+ readonly shield: IconNode;
202
+ readonly 'shield-alert': IconNode;
203
+ readonly 'shield-check': IconNode;
204
+ readonly 'shield-half': IconNode;
205
+ readonly 'shield-off': IconNode;
206
+ readonly 'shield-x': IconNode;
207
+ readonly 'shopping-cart': IconNode;
208
+ readonly signpost: IconNode;
209
+ readonly siren: IconNode;
210
+ readonly 'sliders-horizontal': IconNode;
211
+ readonly sparkles: IconNode;
212
+ readonly square: IconNode;
213
+ readonly 'square-chart-gantt': IconNode;
214
+ readonly 'square-check-big': IconNode;
215
+ readonly stamp: IconNode;
216
+ readonly star: IconNode;
217
+ readonly 'star-off': IconNode;
218
+ readonly store: IconNode;
219
+ readonly sun: IconNode;
220
+ readonly tag: IconNode;
221
+ readonly tags: IconNode;
222
+ readonly 'thumbs-down': IconNode;
223
+ readonly 'thumbs-up': IconNode;
224
+ readonly ticket: IconNode;
225
+ readonly timer: IconNode;
226
+ readonly 'timer-off': IconNode;
227
+ readonly 'tower-control': IconNode;
228
+ readonly 'trash-2': IconNode;
229
+ readonly 'trending-down': IconNode;
230
+ readonly 'trending-up': IconNode;
231
+ readonly 'triangle-alert': IconNode;
232
+ readonly unlink: IconNode;
233
+ readonly upload: IconNode;
234
+ readonly user: IconNode;
235
+ readonly 'user-check': IconNode;
236
+ readonly 'user-cog': IconNode;
237
+ readonly 'user-plus': IconNode;
238
+ readonly 'user-round': IconNode;
239
+ readonly 'user-search': IconNode;
240
+ readonly 'user-x': IconNode;
241
+ readonly users: IconNode;
242
+ readonly 'users-round': IconNode;
243
+ readonly wallet: IconNode;
244
+ readonly waypoints: IconNode;
245
+ readonly webhook: IconNode;
246
+ readonly wifi: IconNode;
247
+ readonly 'wifi-off': IconNode;
248
+ readonly workflow: IconNode;
249
+ readonly wrench: IconNode;
250
+ readonly x: IconNode;
251
+ readonly zap: IconNode;
252
+ };
253
+ /** A glyph name for `<Icon name>`. */
254
+ type IconName = keyof typeof ICON_GLYPHS;
255
+
256
+ export { ICON_GLYPHS as I, type IconName as a };
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { CSSProperties } from 'react';
3
- import { IconNode, UixIcon, IconProps } from './types.js';
3
+ import { IconNode, IconProps, UixIcon } from './types.js';
4
4
 
5
5
  /** Renders a glyph as an inline SVG; the props contract shared by every icon. */
6
- declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, animate, className, style, ...rest }: IconProps, ref?: unknown, name?: string): react.ReactElement<{
6
+ declare function renderIcon(node: IconNode, props: IconProps, ref?: unknown, name?: string, defaults?: Pick<IconProps, 'size' | 'sizeMode'>): react.ReactElement<{
7
7
  string?: number | string | undefined | undefined;
8
8
  filter?: string | undefined | undefined;
9
9
  values?: string | undefined | undefined;
@@ -14,8 +14,8 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
14
14
  fontWeight?: number | string | undefined | undefined;
15
15
  fontSize?: number | string | undefined | undefined;
16
16
  fontFamily?: string | undefined | undefined;
17
- width?: number | string | undefined | undefined;
18
- height?: number | string | undefined | undefined;
17
+ width?: number | string | undefined;
18
+ height?: number | string | undefined;
19
19
  type?: string | undefined | undefined;
20
20
  z?: number | string | undefined | undefined;
21
21
  opacity?: number | string | undefined | undefined;
@@ -38,19 +38,16 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
38
38
  slope?: number | string | undefined | undefined;
39
39
  intercept?: number | string | undefined | undefined;
40
40
  points?: string | undefined | undefined;
41
- children?: react.ReactNode;
42
- clipPath?: string | undefined | undefined;
43
- media?: string | undefined | undefined;
44
41
  suppressHydrationWarning?: boolean | undefined | undefined;
45
42
  lang?: string | undefined | undefined;
46
43
  tabIndex?: number | undefined | undefined;
47
44
  role: string | undefined;
48
45
  "aria-activedescendant"?: string | undefined | undefined;
49
- "aria-atomic"?: (boolean | "false" | "true") | undefined;
46
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
50
47
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
51
48
  "aria-braillelabel"?: string | undefined | undefined;
52
49
  "aria-brailleroledescription"?: string | undefined | undefined;
53
- "aria-busy"?: (boolean | "false" | "true") | undefined;
50
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
54
51
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
55
52
  "aria-colcount"?: number | undefined | undefined;
56
53
  "aria-colindex"?: number | undefined | undefined;
@@ -61,37 +58,37 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
61
58
  "aria-describedby"?: string | undefined | undefined;
62
59
  "aria-description"?: string | undefined | undefined;
63
60
  "aria-details"?: string | undefined | undefined;
64
- "aria-disabled"?: (boolean | "false" | "true") | undefined;
61
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
65
62
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
66
63
  "aria-errormessage"?: string | undefined | undefined;
67
- "aria-expanded"?: (boolean | "false" | "true") | undefined;
64
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
68
65
  "aria-flowto"?: string | undefined | undefined;
69
- "aria-grabbed"?: (boolean | "false" | "true") | undefined;
66
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
70
67
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
71
- "aria-hidden": (boolean | "false" | "true") | undefined;
68
+ "aria-hidden": (boolean | "true" | "false") | undefined;
72
69
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
73
70
  "aria-keyshortcuts"?: string | undefined | undefined;
74
71
  "aria-label": string | undefined;
75
72
  "aria-labelledby"?: string | undefined | undefined;
76
73
  "aria-level"?: number | undefined | undefined;
77
74
  "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
78
- "aria-modal"?: (boolean | "false" | "true") | undefined;
79
- "aria-multiline"?: (boolean | "false" | "true") | undefined;
80
- "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
75
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
76
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
77
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
81
78
  "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
82
79
  "aria-owns"?: string | undefined | undefined;
83
80
  "aria-placeholder"?: string | undefined | undefined;
84
81
  "aria-posinset"?: number | undefined | undefined;
85
82
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
86
- "aria-readonly"?: (boolean | "false" | "true") | undefined;
83
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
87
84
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
88
- "aria-required"?: (boolean | "false" | "true") | undefined;
85
+ "aria-required"?: (boolean | "true" | "false") | undefined;
89
86
  "aria-roledescription"?: string | undefined | undefined;
90
87
  "aria-rowcount"?: number | undefined | undefined;
91
88
  "aria-rowindex"?: number | undefined | undefined;
92
89
  "aria-rowindextext"?: string | undefined | undefined;
93
90
  "aria-rowspan"?: number | undefined | undefined;
94
- "aria-selected"?: (boolean | "false" | "true") | undefined;
91
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
95
92
  "aria-setsize"?: number | undefined | undefined;
96
93
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
97
94
  "aria-valuemax"?: number | undefined | undefined;
@@ -259,6 +256,8 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
259
256
  onAnimationIterationCapture?: react.AnimationEventHandler<SVGSVGElement> | undefined;
260
257
  onTransitionEnd?: react.TransitionEventHandler<SVGSVGElement> | undefined;
261
258
  onTransitionEndCapture?: react.TransitionEventHandler<SVGSVGElement> | undefined;
259
+ clipPath?: string | undefined | undefined;
260
+ media?: string | undefined | undefined;
262
261
  alphabetic?: number | string | undefined | undefined;
263
262
  ideographic?: number | string | undefined | undefined;
264
263
  mathematical?: number | string | undefined | undefined;
@@ -289,7 +288,7 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
289
288
  ascent?: number | string | undefined | undefined;
290
289
  attributeName?: string | undefined | undefined;
291
290
  attributeType?: string | undefined | undefined;
292
- autoReverse?: (boolean | "false" | "true") | undefined;
291
+ autoReverse?: (boolean | "true" | "false") | undefined;
293
292
  azimuth?: number | string | undefined | undefined;
294
293
  baseFrequency?: number | string | undefined | undefined;
295
294
  baselineShift?: number | string | undefined | undefined;
@@ -321,7 +320,7 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
321
320
  elevation?: number | string | undefined | undefined;
322
321
  enableBackground?: number | string | undefined | undefined;
323
322
  exponent?: number | string | undefined | undefined;
324
- externalResourcesRequired?: (boolean | "false" | "true") | undefined;
323
+ externalResourcesRequired?: (boolean | "true" | "false") | undefined;
325
324
  fillOpacity?: number | string | undefined | undefined;
326
325
  fillRule?: "nonzero" | "evenodd" | "inherit" | undefined | undefined;
327
326
  filterRes?: number | string | undefined | undefined;
@@ -390,7 +389,7 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
390
389
  pointsAtX?: number | string | undefined | undefined;
391
390
  pointsAtY?: number | string | undefined | undefined;
392
391
  pointsAtZ?: number | string | undefined | undefined;
393
- preserveAlpha?: (boolean | "false" | "true") | undefined;
392
+ preserveAlpha?: (boolean | "true" | "false") | undefined;
394
393
  preserveAspectRatio?: string | undefined | undefined;
395
394
  primitiveUnits?: number | string | undefined | undefined;
396
395
  refX?: number | string | undefined | undefined;
@@ -478,14 +477,14 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, an
478
477
  y2?: number | string | undefined | undefined;
479
478
  yChannelSelector?: string | undefined | undefined;
480
479
  zoomAndPan?: string | undefined | undefined;
481
- ref: unknown;
482
480
  strokeWidth: string | number;
483
481
  className: string;
484
482
  style: CSSProperties | undefined;
485
483
  'data-icon': string | undefined;
486
484
  'data-animate': string | undefined;
485
+ ref: unknown;
487
486
  }, string | react.JSXElementConstructor<any>>;
488
487
  /** Makes a named, ref-forwarding component for one glyph (the generated `<Name>Icon` exports). */
489
- declare function createIcon(displayName: string, node: IconNode): UixIcon;
488
+ declare function createIcon(displayName: string, node: IconNode, defaults?: Pick<IconProps, 'size' | 'sizeMode'>): UixIcon;
490
489
 
491
490
  export { createIcon, renderIcon };
@@ -1,37 +1,42 @@
1
1
  import { createElement, forwardRef } from "react";
2
2
  import { cx } from "../cx.js";
3
3
  const SIZES = /* @__PURE__ */ new Set(["sm", "md", "lg"]);
4
- function renderIcon(node, { size = "md", tone = "current", label, strokeWidth = 2, animate, className, style, ...rest }, ref, name) {
4
+ function renderIcon(node, props, ref, name, defaults = {}) {
5
+ const { size = defaults.size ?? "md", sizeMode = defaults.sizeMode ?? "explicit", tone = "current", label, strokeWidth = 2, animate, className, style, children, ...rest } = props;
5
6
  const tokenSize = typeof size === "string" && SIZES.has(size);
7
+ const intrinsic = sizeMode === "intrinsic" && !tokenSize;
6
8
  const length = typeof size === "number" ? `${size}px` : tokenSize ? void 0 : size;
9
+ const accessibleSvg = Boolean(label) || sizeMode === "intrinsic" && (Boolean(children) || Object.keys(rest).some((key) => key.startsWith("aria-") || key === "role" || key === "title"));
10
+ const glyphChildren = node.map(([tag, attrs], i) => createElement(tag, { key: i, ...attrs }));
7
11
  return createElement(
8
12
  "svg",
9
13
  {
10
14
  ref,
11
15
  xmlns: "http://www.w3.org/2000/svg",
12
16
  viewBox: "0 0 24 24",
17
+ ...intrinsic ? { width: size, height: size } : {},
13
18
  fill: "none",
14
- stroke: "currentColor",
19
+ stroke: sizeMode === "intrinsic" ? rest.color ?? "currentColor" : "currentColor",
15
20
  strokeWidth,
16
21
  strokeLinecap: "round",
17
22
  strokeLinejoin: "round",
18
23
  focusable: "false",
19
- className: cx("uix-icon", tokenSize && size !== "md" && `uix-icon--${size}`, tone !== "current" && `uix-icon--${tone}`, className),
20
- style: length ? { width: length, height: length, ...style } : style,
24
+ className: cx(intrinsic ? "uix-icon-intrinsic" : "uix-icon", tokenSize && size !== "md" && `uix-icon--${size}`, tone !== "current" && `uix-icon--${tone}`, className),
25
+ style: !intrinsic && length ? { width: length, height: length, ...style } : style,
21
26
  role: label ? "img" : void 0,
22
27
  "aria-label": label || void 0,
23
- "aria-hidden": label ? void 0 : true,
28
+ "aria-hidden": accessibleSvg ? void 0 : true,
24
29
  // the animated icons (2.60): icon.css keys each motion on the glyph's name
25
30
  "data-icon": animate && name ? name : void 0,
26
31
  "data-animate": animate ? "" : void 0,
27
32
  ...rest
28
33
  },
29
- node.map(([tag, attrs], i) => createElement(tag, { key: i, ...attrs }))
34
+ sizeMode === "intrinsic" ? [...glyphChildren, ...Array.isArray(children) ? children : [children]] : glyphChildren
30
35
  );
31
36
  }
32
- function createIcon(displayName, node) {
37
+ function createIcon(displayName, node, defaults) {
33
38
  const name = displayName.replace(/Icon$/, "").replace(/([a-z0-9])([A-Z])|([a-zA-Z])(\d)/g, (_, a, b, c, d) => a ? `${a}-${b}` : `${c}-${d}`).toLowerCase();
34
- const Component = forwardRef((props, ref) => renderIcon(node, props, ref, name));
39
+ const Component = forwardRef((props, ref) => renderIcon(node, props, ref, name, defaults));
35
40
  Component.displayName = displayName;
36
41
  return Component;
37
42
  }
@@ -60,10 +60,10 @@ const glyphCommand = [["path", { "d": "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a
60
60
  const glyphComponent = [["path", { "d": "M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" }], ["path", { "d": "M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z" }], ["path", { "d": "M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z" }], ["path", { "d": "M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" }]];
61
61
  const glyphCopy = [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]];
62
62
  const glyphCornerUpLeft = [["path", { "d": "M20 20v-7a4 4 0 0 0-4-4H4" }], ["path", { "d": "M9 14 4 9l5-5" }]];
63
- const glyphCreditCard = [["rect", { "width": "20", "height": "14", "x": "2", "y": "5", "rx": "2" }], ["line", { "x1": "2", "x2": "22", "y1": "10", "y2": "10" }]];
63
+ const glyphCreditCard = [["rect", { "width": "20", "height": "14", "x": "2", "y": "5", "rx": "2" }], ["line", { "x1": "2", "x2": "22", "y1": "10", "y2": "10" }], ["path", { "d": "M6 14h2" }]];
64
64
  const glyphDatabase = [["ellipse", { "cx": "12", "cy": "5", "rx": "9", "ry": "3" }], ["path", { "d": "M3 5V19A9 3 0 0 0 21 19V5" }], ["path", { "d": "M3 12A9 3 0 0 0 21 12" }]];
65
65
  const glyphDatabaseBackup = [["ellipse", { "cx": "12", "cy": "5", "rx": "9", "ry": "3" }], ["path", { "d": "M3 12a9 3 0 0 0 5 2.69" }], ["path", { "d": "M21 9.3V5" }], ["path", { "d": "M3 5v14a9 3 0 0 0 6.47 2.88" }], ["path", { "d": "M12 12v4h4" }], ["path", { "d": "M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16" }]];
66
- const glyphDoorOpen = [["path", { "d": "M11 20H2" }], ["path", { "d": "M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z" }], ["path", { "d": "M11 4H8a2 2 0 0 0-2 2v14" }], ["path", { "d": "M14 12h.01" }], ["path", { "d": "M22 20h-3" }]];
66
+ const glyphDoorOpen = [["path", { "d": "M10 21H2" }], ["path", { "d": "M10 3H7a2 2 0 00-2 2v16" }], ["path", { "d": "M14 12h.01" }], ["path", { "d": "M19 21V5a2 2 0 00-1.675-1.974l-6.163-1.013A1 1 0 0010 3v18a1 1 0 001.124.992z" }], ["path", { "d": "M22 21h-3" }]];
67
67
  const glyphDownload = [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]];
68
68
  const glyphEllipsis = [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]];
69
69
  const glyphEllipsisVertical = [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "12", "cy": "5", "r": "1" }], ["circle", { "cx": "12", "cy": "19", "r": "1" }]];
@@ -110,7 +110,7 @@ const glyphHeartPulse = [["path", { "d": "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56
110
110
  const glyphHexagon = [["path", { "d": "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }]];
111
111
  const glyphHourglass = [["path", { "d": "M5 22h14" }], ["path", { "d": "M5 2h14" }], ["path", { "d": "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" }], ["path", { "d": "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" }]];
112
112
  const glyphHouse = [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]];
113
- const glyphIdCard = [["path", { "d": "M16 10h2" }], ["path", { "d": "M16 14h2" }], ["path", { "d": "M6.17 15a3 3 0 0 1 5.66 0" }], ["circle", { "cx": "9", "cy": "11", "r": "2" }], ["rect", { "x": "2", "y": "5", "width": "20", "height": "14", "rx": "2" }]];
113
+ const glyphIdCard = [["path", { "d": "M13 19a4 4 0 00-8 0" }], ["path", { "d": "M16 10h2" }], ["path", { "d": "M16 14h2" }], ["circle", { "cx": "9", "cy": "12", "r": "3" }], ["rect", { "x": "2", "y": "5", "width": "20", "height": "14", "rx": "2" }]];
114
114
  const glyphImage = [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]];
115
115
  const glyphInbox = [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]];
116
116
  const glyphInfo = [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]];