@imfusion/web-ui 0.8.1-dev.58.g0912b389 → 0.8.1-dev.64.gbde1f63f
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/CHANGELOG.md +10 -0
- package/dist/{code-GwkswukD.js → code-BYkr5k55.js} +12 -12
- package/dist/components/account-card/account-card.d.ts +1 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/button/button.d.ts +10 -4
- package/dist/components/card/card.d.ts +3 -3
- package/dist/components/chip/chip.cva.d.ts +1 -1
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/kbd/aria-key-shortcuts.d.ts +5 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/kbd.d.ts +14 -0
- package/dist/components/kbd/kbd.meta.d.ts +2 -0
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/row/row.d.ts +2 -2
- package/dist/components/stack/stack.d.ts +2 -2
- package/dist/components/toggle/toggle.d.ts +7 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/typo/typo.d.ts +1 -1
- package/dist/icons/catalog.gen.d.ts +7 -0
- package/dist/icons/icons.gen.d.ts +1 -0
- package/dist/{icons-DUxZcuf9.js → icons-BsK_o-Cb.js} +1833 -1814
- package/dist/icons.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1349 -1334
- package/dist/integrations/code-highlight.js +1 -1
- package/dist/integrations/frame-selection.js +7 -7
- package/dist/integrations/image-display-options.js +71 -71
- package/dist/style.css +1 -1
- package/dist/tabs-DRyqtS04.js +358 -0
- package/package.json +2 -1
- package/src/docgen/doc.gen.json +58 -0
- package/src/llms/icon-catalog.gen.json +8 -0
- package/src/llms/llms.gen.txt +5 -0
- package/src/llms/skills/imf-web-ui/SKILL.md +1 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +22 -19
- package/dist/tabs-Dsfp8Ogj.js +0 -295
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { mh as t, pM as n } from "./icons-BsK_o-Cb.js";
|
|
3
|
+
import { t as r } from "./meta-V_KyLeGn.js";
|
|
4
|
+
import { l as i, u as a } from "./slider-Cqpreglu.js";
|
|
5
|
+
import { cva as o } from "class-variance-authority";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { Children as l, useCallback as u } from "react";
|
|
8
|
+
import { Switch as d } from "@base-ui/react/switch";
|
|
9
|
+
import { Toggle as f } from "@base-ui/react/toggle";
|
|
10
|
+
import { ToggleGroup as p } from "@base-ui/react/toggle-group";
|
|
11
|
+
import { Tabs as m } from "@base-ui/react/tabs";
|
|
12
|
+
var h = {
|
|
13
|
+
flat: "imf-ui-kbd-module-flat",
|
|
14
|
+
icon: "imf-ui-kbd-module-icon",
|
|
15
|
+
primary: "imf-ui-kbd-module-primary",
|
|
16
|
+
root: "imf-ui-kbd-module-root"
|
|
17
|
+
}, g = o(h.root, { variants: { variant: {
|
|
18
|
+
default: null,
|
|
19
|
+
primary: h.primary,
|
|
20
|
+
flat: h.flat
|
|
21
|
+
} } });
|
|
22
|
+
function _({ variant: e = "default", icon: r = !1, children: i, ...a }) {
|
|
23
|
+
return /* @__PURE__ */ c("kbd", {
|
|
24
|
+
...a,
|
|
25
|
+
"data-imf-ui-component": "Kbd",
|
|
26
|
+
className: g({
|
|
27
|
+
variant: e,
|
|
28
|
+
className: a.className
|
|
29
|
+
}),
|
|
30
|
+
children: [r && /* @__PURE__ */ s(n, {
|
|
31
|
+
glyph: t,
|
|
32
|
+
strokeWidth: 2,
|
|
33
|
+
"aria-hidden": !0,
|
|
34
|
+
className: h.icon
|
|
35
|
+
}), i]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/kbd/kbd.meta.ts
|
|
40
|
+
var ee = {
|
|
41
|
+
name: "Kbd",
|
|
42
|
+
category: r.display,
|
|
43
|
+
status: "experimental",
|
|
44
|
+
description: "Shows a keyboard key or shortcut, such as the letter that activates a button. Also called a key hint; Button and Toggle render it through their `shortcut` prop.",
|
|
45
|
+
origin: "native",
|
|
46
|
+
internalDependencies: ["Icon"]
|
|
47
|
+
}, v = {
|
|
48
|
+
ctrl: "Control",
|
|
49
|
+
control: "Control",
|
|
50
|
+
cmd: "Meta",
|
|
51
|
+
"⌘": "Meta",
|
|
52
|
+
meta: "Meta",
|
|
53
|
+
opt: "Alt",
|
|
54
|
+
option: "Alt",
|
|
55
|
+
"⌥": "Alt",
|
|
56
|
+
alt: "Alt",
|
|
57
|
+
shift: "Shift",
|
|
58
|
+
"⇧": "Shift",
|
|
59
|
+
esc: "Escape",
|
|
60
|
+
escape: "Escape"
|
|
61
|
+
};
|
|
62
|
+
function y(e) {
|
|
63
|
+
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
64
|
+
if (t.length !== 0) return t.map((e) => v[e.toLowerCase()] ?? (e.length === 1 ? e.toUpperCase() : e)).join("+");
|
|
65
|
+
}
|
|
66
|
+
var b = {
|
|
67
|
+
root: "imf-ui-switch-module-root",
|
|
68
|
+
thumb: "imf-ui-switch-module-thumb"
|
|
69
|
+
}, x = /* @__PURE__ */ e({
|
|
70
|
+
Root: () => w,
|
|
71
|
+
Thumb: () => T
|
|
72
|
+
}), S = o(b.root), C = o(b.thumb);
|
|
73
|
+
function w(e) {
|
|
74
|
+
return /* @__PURE__ */ s(d.Root, {
|
|
75
|
+
...e,
|
|
76
|
+
"data-imf-ui-component": "Switch.Root",
|
|
77
|
+
className: (t) => S({ className: i(e.className, t) })
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
w.displayName = "Switch.Root";
|
|
81
|
+
function T(e) {
|
|
82
|
+
return /* @__PURE__ */ s(d.Thumb, {
|
|
83
|
+
...e,
|
|
84
|
+
"data-imf-ui-component": "Switch.Thumb",
|
|
85
|
+
className: (t) => C({ className: i(e.className, t) })
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
T.displayName = "Switch.Thumb";
|
|
89
|
+
var E = {
|
|
90
|
+
root: "imf-ui-toggle-module-root",
|
|
91
|
+
shortcut: "imf-ui-toggle-module-shortcut"
|
|
92
|
+
}, te = o(E.root), D = 2;
|
|
93
|
+
function O(e) {
|
|
94
|
+
let t = 0;
|
|
95
|
+
return l.forEach(e, (e) => {
|
|
96
|
+
typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += D);
|
|
97
|
+
}), t;
|
|
98
|
+
}
|
|
99
|
+
function k({ style: e, shortcut: t, children: n, ...r }) {
|
|
100
|
+
let o = {
|
|
101
|
+
"--glyph-count": O(n),
|
|
102
|
+
"--max-glyphs": D
|
|
103
|
+
};
|
|
104
|
+
return /* @__PURE__ */ c(f, {
|
|
105
|
+
"aria-keyshortcuts": t ? y(t) : void 0,
|
|
106
|
+
...r,
|
|
107
|
+
"data-imf-ui-component": "Toggle",
|
|
108
|
+
style: (t) => ({
|
|
109
|
+
...o,
|
|
110
|
+
...a(e, t)
|
|
111
|
+
}),
|
|
112
|
+
className: (e) => te({ className: i(r.className, e) }),
|
|
113
|
+
children: [n, t && /* @__PURE__ */ s(_, {
|
|
114
|
+
variant: "flat",
|
|
115
|
+
className: E.shortcut,
|
|
116
|
+
"aria-hidden": !0,
|
|
117
|
+
children: t
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/components/toggle-group/toggle-group.tsx
|
|
123
|
+
var A = o({ root: "imf-ui-toggle-group-module-root" }.root);
|
|
124
|
+
function j(e) {
|
|
125
|
+
return /* @__PURE__ */ s(p, {
|
|
126
|
+
...e,
|
|
127
|
+
"data-imf-ui-component": "ToggleGroup",
|
|
128
|
+
className: (t) => A({ className: i(e.className, t) })
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
var M = {
|
|
132
|
+
alignCenter: "imf-ui-row-module-alignCenter",
|
|
133
|
+
alignEnd: "imf-ui-row-module-alignEnd",
|
|
134
|
+
alignStart: "imf-ui-row-module-alignStart",
|
|
135
|
+
alignStretch: "imf-ui-row-module-alignStretch",
|
|
136
|
+
gap1: "imf-ui-row-module-gap1",
|
|
137
|
+
gap10: "imf-ui-row-module-gap10",
|
|
138
|
+
gap2: "imf-ui-row-module-gap2",
|
|
139
|
+
gap3: "imf-ui-row-module-gap3",
|
|
140
|
+
gap4: "imf-ui-row-module-gap4",
|
|
141
|
+
gap5: "imf-ui-row-module-gap5",
|
|
142
|
+
gap6: "imf-ui-row-module-gap6",
|
|
143
|
+
gap7: "imf-ui-row-module-gap7",
|
|
144
|
+
gap8: "imf-ui-row-module-gap8",
|
|
145
|
+
gap9: "imf-ui-row-module-gap9",
|
|
146
|
+
justifyAround: "imf-ui-row-module-justifyAround",
|
|
147
|
+
justifyBetween: "imf-ui-row-module-justifyBetween",
|
|
148
|
+
justifyCenter: "imf-ui-row-module-justifyCenter",
|
|
149
|
+
justifyEnd: "imf-ui-row-module-justifyEnd",
|
|
150
|
+
justifyEvenly: "imf-ui-row-module-justifyEvenly",
|
|
151
|
+
justifyStart: "imf-ui-row-module-justifyStart",
|
|
152
|
+
root: "imf-ui-row-module-root",
|
|
153
|
+
wrap: "imf-ui-row-module-wrap"
|
|
154
|
+
}, N = o(M.root, { variants: {
|
|
155
|
+
gap: {
|
|
156
|
+
1: M.gap1,
|
|
157
|
+
2: M.gap2,
|
|
158
|
+
3: M.gap3,
|
|
159
|
+
4: M.gap4,
|
|
160
|
+
5: M.gap5,
|
|
161
|
+
6: M.gap6,
|
|
162
|
+
7: M.gap7,
|
|
163
|
+
8: M.gap8,
|
|
164
|
+
9: M.gap9,
|
|
165
|
+
10: M.gap10
|
|
166
|
+
},
|
|
167
|
+
align: {
|
|
168
|
+
start: M.alignStart,
|
|
169
|
+
center: M.alignCenter,
|
|
170
|
+
end: M.alignEnd,
|
|
171
|
+
stretch: M.alignStretch
|
|
172
|
+
},
|
|
173
|
+
justify: {
|
|
174
|
+
start: M.justifyStart,
|
|
175
|
+
center: M.justifyCenter,
|
|
176
|
+
end: M.justifyEnd,
|
|
177
|
+
between: M.justifyBetween,
|
|
178
|
+
around: M.justifyAround,
|
|
179
|
+
evenly: M.justifyEvenly
|
|
180
|
+
},
|
|
181
|
+
wrap: {
|
|
182
|
+
true: M.wrap,
|
|
183
|
+
false: null
|
|
184
|
+
}
|
|
185
|
+
} });
|
|
186
|
+
function P({ gap: e = "2", align: t = "stretch", justify: n = "start", wrap: r = !1, ...i }) {
|
|
187
|
+
return /* @__PURE__ */ s("div", {
|
|
188
|
+
...i,
|
|
189
|
+
"data-imf-ui-component": "Row",
|
|
190
|
+
className: N({
|
|
191
|
+
gap: e,
|
|
192
|
+
align: t,
|
|
193
|
+
justify: n,
|
|
194
|
+
wrap: r,
|
|
195
|
+
className: i.className
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
var F = {
|
|
200
|
+
alignCenter: "imf-ui-stack-module-alignCenter",
|
|
201
|
+
alignEnd: "imf-ui-stack-module-alignEnd",
|
|
202
|
+
alignStart: "imf-ui-stack-module-alignStart",
|
|
203
|
+
alignStretch: "imf-ui-stack-module-alignStretch",
|
|
204
|
+
gap0: "imf-ui-stack-module-gap0",
|
|
205
|
+
gap1: "imf-ui-stack-module-gap1",
|
|
206
|
+
gap10: "imf-ui-stack-module-gap10",
|
|
207
|
+
gap2: "imf-ui-stack-module-gap2",
|
|
208
|
+
gap3: "imf-ui-stack-module-gap3",
|
|
209
|
+
gap4: "imf-ui-stack-module-gap4",
|
|
210
|
+
gap5: "imf-ui-stack-module-gap5",
|
|
211
|
+
gap6: "imf-ui-stack-module-gap6",
|
|
212
|
+
gap7: "imf-ui-stack-module-gap7",
|
|
213
|
+
gap8: "imf-ui-stack-module-gap8",
|
|
214
|
+
gap9: "imf-ui-stack-module-gap9",
|
|
215
|
+
justifyAround: "imf-ui-stack-module-justifyAround",
|
|
216
|
+
justifyBetween: "imf-ui-stack-module-justifyBetween",
|
|
217
|
+
justifyCenter: "imf-ui-stack-module-justifyCenter",
|
|
218
|
+
justifyEnd: "imf-ui-stack-module-justifyEnd",
|
|
219
|
+
justifyEvenly: "imf-ui-stack-module-justifyEvenly",
|
|
220
|
+
justifyStart: "imf-ui-stack-module-justifyStart",
|
|
221
|
+
root: "imf-ui-stack-module-root"
|
|
222
|
+
}, I = o(F.root, { variants: {
|
|
223
|
+
gap: {
|
|
224
|
+
0: F.gap0,
|
|
225
|
+
1: F.gap1,
|
|
226
|
+
2: F.gap2,
|
|
227
|
+
3: F.gap3,
|
|
228
|
+
4: F.gap4,
|
|
229
|
+
5: F.gap5,
|
|
230
|
+
6: F.gap6,
|
|
231
|
+
7: F.gap7,
|
|
232
|
+
8: F.gap8,
|
|
233
|
+
9: F.gap9,
|
|
234
|
+
10: F.gap10
|
|
235
|
+
},
|
|
236
|
+
align: {
|
|
237
|
+
start: F.alignStart,
|
|
238
|
+
center: F.alignCenter,
|
|
239
|
+
end: F.alignEnd,
|
|
240
|
+
stretch: F.alignStretch
|
|
241
|
+
},
|
|
242
|
+
justify: {
|
|
243
|
+
start: F.justifyStart,
|
|
244
|
+
center: F.justifyCenter,
|
|
245
|
+
end: F.justifyEnd,
|
|
246
|
+
between: F.justifyBetween,
|
|
247
|
+
around: F.justifyAround,
|
|
248
|
+
evenly: F.justifyEvenly
|
|
249
|
+
}
|
|
250
|
+
} });
|
|
251
|
+
function L({ gap: e = "4", align: t = "stretch", justify: n = "start", ...r }) {
|
|
252
|
+
return /* @__PURE__ */ s("div", {
|
|
253
|
+
...r,
|
|
254
|
+
"data-imf-ui-component": "Stack",
|
|
255
|
+
className: I({
|
|
256
|
+
gap: e,
|
|
257
|
+
align: t,
|
|
258
|
+
justify: n,
|
|
259
|
+
className: r.className
|
|
260
|
+
})
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
var R = {
|
|
264
|
+
indicator: "imf-ui-tabs-module-indicator",
|
|
265
|
+
list: "imf-ui-tabs-module-list",
|
|
266
|
+
listFill: "imf-ui-tabs-module-listFill",
|
|
267
|
+
panel: "imf-ui-tabs-module-panel",
|
|
268
|
+
panelViewport: "imf-ui-tabs-module-panelViewport",
|
|
269
|
+
root: "imf-ui-tabs-module-root",
|
|
270
|
+
tab: "imf-ui-tabs-module-tab"
|
|
271
|
+
}, z = /* @__PURE__ */ e({
|
|
272
|
+
Indicator: () => Z,
|
|
273
|
+
List: () => Y,
|
|
274
|
+
Panel: () => $,
|
|
275
|
+
PanelViewport: () => Q,
|
|
276
|
+
Root: () => J,
|
|
277
|
+
Tab: () => X
|
|
278
|
+
}), B = o(R.list, { variants: { fill: {
|
|
279
|
+
true: R.listFill,
|
|
280
|
+
false: null
|
|
281
|
+
} } }), V = o(R.root), H = o(R.tab), U = o(R.indicator), W = o(R.panelViewport), G = o(R.panel);
|
|
282
|
+
function K(e, t) {
|
|
283
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
284
|
+
}
|
|
285
|
+
function q(e) {
|
|
286
|
+
let t = new ResizeObserver(() => {
|
|
287
|
+
let t = e.dataset.orientation === "vertical" ? e.scrollHeight > e.clientHeight : e.scrollWidth > e.clientWidth;
|
|
288
|
+
e.toggleAttribute("data-overflowing", t);
|
|
289
|
+
}), n = () => {
|
|
290
|
+
t.disconnect(), t.observe(e);
|
|
291
|
+
for (let n of e.children) t.observe(n);
|
|
292
|
+
}, r = new MutationObserver(n);
|
|
293
|
+
return r.observe(e, { childList: !0 }), n(), () => {
|
|
294
|
+
t.disconnect(), r.disconnect();
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function J(e) {
|
|
298
|
+
return /* @__PURE__ */ s(m.Root, {
|
|
299
|
+
...e,
|
|
300
|
+
"data-imf-ui-component": "Tabs.Root",
|
|
301
|
+
className: (t) => V({ className: i(e.className, t) })
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
J.displayName = "Tabs.Root";
|
|
305
|
+
function Y({ fill: e = !1, ref: t, ...n }) {
|
|
306
|
+
let r = u((e) => {
|
|
307
|
+
if (!e) return;
|
|
308
|
+
K(t, e);
|
|
309
|
+
let n = q(e);
|
|
310
|
+
return () => {
|
|
311
|
+
n(), K(t, null);
|
|
312
|
+
};
|
|
313
|
+
}, [t]);
|
|
314
|
+
return /* @__PURE__ */ s(m.List, {
|
|
315
|
+
...n,
|
|
316
|
+
ref: r,
|
|
317
|
+
"data-imf-ui-component": "Tabs.List",
|
|
318
|
+
className: (t) => B({
|
|
319
|
+
fill: e,
|
|
320
|
+
className: i(n.className, t)
|
|
321
|
+
})
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
Y.displayName = "Tabs.List";
|
|
325
|
+
function X(e) {
|
|
326
|
+
return /* @__PURE__ */ s(m.Tab, {
|
|
327
|
+
...e,
|
|
328
|
+
"data-imf-ui-component": "Tabs.Tab",
|
|
329
|
+
className: (t) => H({ className: i(e.className, t) })
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
X.displayName = "Tabs.Tab";
|
|
333
|
+
function Z(e) {
|
|
334
|
+
return /* @__PURE__ */ s(m.Indicator, {
|
|
335
|
+
...e,
|
|
336
|
+
"data-imf-ui-component": "Tabs.Indicator",
|
|
337
|
+
className: (t) => U({ className: i(e.className, t) })
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
Z.displayName = "Tabs.Indicator";
|
|
341
|
+
function Q(e) {
|
|
342
|
+
return /* @__PURE__ */ s("div", {
|
|
343
|
+
...e,
|
|
344
|
+
"data-imf-ui-component": "Tabs.PanelViewport",
|
|
345
|
+
className: W({ className: e.className })
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
Q.displayName = "Tabs.PanelViewport";
|
|
349
|
+
function $(e) {
|
|
350
|
+
return /* @__PURE__ */ s(m.Panel, {
|
|
351
|
+
...e,
|
|
352
|
+
"data-imf-ui-component": "Tabs.Panel",
|
|
353
|
+
className: (t) => G({ className: i(e.className, t) })
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
$.displayName = "Tabs.Panel";
|
|
357
|
+
//#endregion
|
|
358
|
+
export { _, J as a, L as c, k as d, w as f, ee as g, y as h, Q as i, P as l, x as m, Y as n, X as o, T as p, $ as r, z as s, Z as t, j as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imfusion/web-ui",
|
|
3
|
-
"version": "0.8.1-dev.
|
|
3
|
+
"version": "0.8.1-dev.64.gbde1f63f",
|
|
4
4
|
"description": "The official Web UI component library for ImFusion web apps",
|
|
5
5
|
"author": "ImFusion GmbH",
|
|
6
6
|
"homepage": "https://imfusion.com",
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"@storybook/addon-vitest": "10.6.2",
|
|
131
131
|
"@storybook/react-vite": "10.6.2",
|
|
132
132
|
"@tanstack/highlight": "0.1.0",
|
|
133
|
+
"@tanstack/react-hotkeys": "0.13.0",
|
|
133
134
|
"@tanstack/react-pacer": "0.22.1",
|
|
134
135
|
"@types/culori": "4.0.1",
|
|
135
136
|
"@types/mdx": "2.0.13",
|
package/src/docgen/doc.gen.json
CHANGED
|
@@ -611,6 +611,13 @@
|
|
|
611
611
|
"defaultValue": null,
|
|
612
612
|
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
613
613
|
},
|
|
614
|
+
{
|
|
615
|
+
"name": "shortcut",
|
|
616
|
+
"required": false,
|
|
617
|
+
"type": "string",
|
|
618
|
+
"defaultValue": null,
|
|
619
|
+
"description": "Key hint shown in the top corner at the end of the line, such as `\"S\"` or `\"Ctrl Z\"`. It also sets\n`aria-keyshortcuts` in its notation (`Control+Z`), which an explicit\n`aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys."
|
|
620
|
+
},
|
|
614
621
|
{
|
|
615
622
|
"name": "size",
|
|
616
623
|
"required": false,
|
|
@@ -1471,6 +1478,13 @@
|
|
|
1471
1478
|
"defaultValue": null,
|
|
1472
1479
|
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
1473
1480
|
},
|
|
1481
|
+
{
|
|
1482
|
+
"name": "shortcut",
|
|
1483
|
+
"required": false,
|
|
1484
|
+
"type": "string",
|
|
1485
|
+
"defaultValue": null,
|
|
1486
|
+
"description": "Key hint shown in the top corner at the end of the line, such as `\"S\"` or `\"Ctrl Z\"`. It also sets\n`aria-keyshortcuts` in its notation (`Control+Z`), which an explicit\n`aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys."
|
|
1487
|
+
},
|
|
1474
1488
|
{
|
|
1475
1489
|
"name": "size",
|
|
1476
1490
|
"required": false,
|
|
@@ -2667,6 +2681,13 @@
|
|
|
2667
2681
|
"defaultValue": null,
|
|
2668
2682
|
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
2669
2683
|
},
|
|
2684
|
+
{
|
|
2685
|
+
"name": "shortcut",
|
|
2686
|
+
"required": false,
|
|
2687
|
+
"type": "string",
|
|
2688
|
+
"defaultValue": null,
|
|
2689
|
+
"description": "Key hint shown in the top corner at the end of the line, such as `\"S\"` or `\"Ctrl Z\"`. It also sets\n`aria-keyshortcuts` in its notation (`Control+Z`), which an explicit\n`aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys."
|
|
2690
|
+
},
|
|
2670
2691
|
{
|
|
2671
2692
|
"name": "size",
|
|
2672
2693
|
"required": false,
|
|
@@ -2771,6 +2792,36 @@
|
|
|
2771
2792
|
},
|
|
2772
2793
|
"subComponents": []
|
|
2773
2794
|
},
|
|
2795
|
+
"kbd": {
|
|
2796
|
+
"root": {
|
|
2797
|
+
"name": "Kbd",
|
|
2798
|
+
"description": "Kbd — a keyboard key or shortcut, drawn as a keycap tinted from the surrounding text. A combination such as `Ctrl Z` goes\nin one Kbd. `flat` drops the side face for a hint inside a control.",
|
|
2799
|
+
"props": [
|
|
2800
|
+
{
|
|
2801
|
+
"name": "icon",
|
|
2802
|
+
"required": false,
|
|
2803
|
+
"type": "boolean",
|
|
2804
|
+
"defaultValue": "false",
|
|
2805
|
+
"description": "Show a keyboard glyph before the key, to mark it as a shortcut in running text."
|
|
2806
|
+
},
|
|
2807
|
+
{
|
|
2808
|
+
"name": "ref",
|
|
2809
|
+
"required": false,
|
|
2810
|
+
"type": "Ref<HTMLElement>",
|
|
2811
|
+
"defaultValue": null,
|
|
2812
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
"name": "variant",
|
|
2816
|
+
"required": false,
|
|
2817
|
+
"type": "\"default\" | \"primary\" | \"flat\" | null",
|
|
2818
|
+
"defaultValue": "default",
|
|
2819
|
+
"description": ""
|
|
2820
|
+
}
|
|
2821
|
+
]
|
|
2822
|
+
},
|
|
2823
|
+
"subComponents": []
|
|
2824
|
+
},
|
|
2774
2825
|
"logo": {
|
|
2775
2826
|
"root": {
|
|
2776
2827
|
"name": "Logo",
|
|
@@ -8074,6 +8125,13 @@
|
|
|
8074
8125
|
"defaultValue": null,
|
|
8075
8126
|
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
8076
8127
|
},
|
|
8128
|
+
{
|
|
8129
|
+
"name": "shortcut",
|
|
8130
|
+
"required": false,
|
|
8131
|
+
"type": "string",
|
|
8132
|
+
"defaultValue": null,
|
|
8133
|
+
"description": "Key hint shown in the top corner at the end of the line, such as `\"P\"` or `\"Ctrl Z\"`. It also sets\n`aria-keyshortcuts` in its notation (`Control+Z`), which an explicit\n`aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys."
|
|
8134
|
+
},
|
|
8077
8135
|
{
|
|
8078
8136
|
"name": "style",
|
|
8079
8137
|
"required": false,
|
|
@@ -7259,6 +7259,14 @@
|
|
|
7259
7259
|
"origin": "iconoir",
|
|
7260
7260
|
"file": "regular/key-xmark.svg"
|
|
7261
7261
|
},
|
|
7262
|
+
{
|
|
7263
|
+
"name": "Keyboard",
|
|
7264
|
+
"category": "System",
|
|
7265
|
+
"tags": ["keyboard", "shortcut", "key", "hotkey", "input"],
|
|
7266
|
+
"style": "regular",
|
|
7267
|
+
"origin": "imfusion",
|
|
7268
|
+
"file": "regular/keyboard.svg"
|
|
7269
|
+
},
|
|
7262
7270
|
{
|
|
7263
7271
|
"name": "Keyframe",
|
|
7264
7272
|
"category": "Animations",
|
package/src/llms/llms.gen.txt
CHANGED
|
@@ -124,6 +124,11 @@ Single-line text input for form data entry. Also called a text field; it support
|
|
|
124
124
|
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .input (jq: jq '.input' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
125
125
|
- further reading (usage/anatomy, not props): https://base-ui.com/react/components/input.md
|
|
126
126
|
|
|
127
|
+
## Kbd
|
|
128
|
+
- category: Display, status: experimental
|
|
129
|
+
Shows a keyboard key or shortcut, such as the letter that activates a button. Also called a key hint; Button and Toggle render it through their `shortcut` prop.
|
|
130
|
+
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .kbd (jq: jq '.kbd' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
131
|
+
|
|
127
132
|
## Logo
|
|
128
133
|
- category: Display, status: stable
|
|
129
134
|
Renders a logo from a URL or inline React element with consistent sizing. Also called a wordmark or brand mark.
|
|
@@ -62,7 +62,7 @@ props and the conventions `tokens` topic for exact token names and defaults.
|
|
|
62
62
|
The host project's existing conventions win. The companion skills fill gaps; they do not justify refactoring a working
|
|
63
63
|
styling system, state library, or folder structure.
|
|
64
64
|
|
|
65
|
-
When a task needs TanStack Router, Query, Form, Table, or
|
|
65
|
+
When a task needs TanStack Router, Query, Form, Table, Store, or Hotkeys and the project has no incumbent, open
|
|
66
66
|
`imf-web-ui-conventions` for the house position on that layer, then read the library's current documentation with
|
|
67
67
|
`npx @tanstack/cli` before using it. The recommendation lives in the conventions topics, not here.
|
|
68
68
|
|
|
@@ -4,27 +4,28 @@ Use the tool's current documentation rather than memory.
|
|
|
4
4
|
|
|
5
5
|
## Topic-to-tool map
|
|
6
6
|
|
|
7
|
-
| Need | Default |
|
|
8
|
-
| --------------------- |
|
|
9
|
-
| Toolchain | Vite+ (`vite-plus`), driven through `vp`
|
|
10
|
-
| Routing and URL state | TanStack Router
|
|
11
|
-
| Server state | TanStack Query
|
|
12
|
-
| Forms | TanStack Form
|
|
13
|
-
| Data grids | TanStack Table plus Web UI `Table` parts
|
|
14
|
-
| App-wide client state | TanStack Store, after URL/server/local state |
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
7
|
+
| Need | Default | Docs |
|
|
8
|
+
| --------------------- | -------------------------------------------------------------- | ----------------------------------------- |
|
|
9
|
+
| Toolchain | Vite+ (`vite-plus`), driven through `vp` | https://viteplus.dev/guide |
|
|
10
|
+
| Routing and URL state | TanStack Router | `npx @tanstack/cli`, library `router` |
|
|
11
|
+
| Server state | TanStack Query | `npx @tanstack/cli`, library `query` |
|
|
12
|
+
| Forms | TanStack Form | `npx @tanstack/cli`, library `form` |
|
|
13
|
+
| Data grids | TanStack Table plus Web UI `Table` parts | `npx @tanstack/cli`, library `table` |
|
|
14
|
+
| App-wide client state | TanStack Store, after URL/server/local state | `npx @tanstack/cli`, library `store` |
|
|
15
|
+
| Keyboard shortcuts | TanStack Hotkeys; show the key with Web UI `shortcut` or `Kbd` | `npx @tanstack/cli`, library `hotkeys` |
|
|
16
|
+
| Schema validation | Zod at the boundary | https://zod.dev |
|
|
17
|
+
| Tests | Vitest through `vp test` | https://vitest.dev |
|
|
18
|
+
| Format | Oxfmt through `vp fmt` | https://oxc.rs/docs/guide/usage/formatter |
|
|
19
|
+
| Lint | Oxlint through `vp lint`, type-aware | https://oxc.rs/docs/guide/usage/linter |
|
|
20
|
+
| Types | `tsc --noEmit` | https://www.typescriptlang.org/docs |
|
|
21
|
+
| Pre-commit checks | `vp staged` against the staged state | https://viteplus.dev/guide |
|
|
22
|
+
| Dead code | Knip via `verify:knip` | https://knip.dev |
|
|
22
23
|
|
|
23
24
|
## When a library owns a layer
|
|
24
25
|
|
|
25
26
|
Use the library that already owns the problem. Adopt Form for form rules, Query for caching and refetching, Router for URL
|
|
26
|
-
state,
|
|
27
|
-
works.
|
|
27
|
+
state, Table for sorting and pagination, and Hotkeys for keyboard shortcuts instead of rebuilding those layers. Web UI only
|
|
28
|
+
shows a key; the app binds it. Keep an existing project choice when it works.
|
|
28
29
|
|
|
29
30
|
## Devtools
|
|
30
31
|
|
|
@@ -33,8 +34,10 @@ devtools package whenever a new TanStack dependency is added.
|
|
|
33
34
|
|
|
34
35
|
## Docs over memory
|
|
35
36
|
|
|
36
|
-
Use `npx @tanstack/cli` for TanStack documentation
|
|
37
|
-
|
|
37
|
+
Use `npx @tanstack/cli` for TanStack documentation, with the library id from the map: `search-docs "<query>" --library <id>`
|
|
38
|
+
finds a page, and `doc <id> <path>` prints it, for example
|
|
39
|
+
`npx @tanstack/cli doc hotkeys framework/react/reference/functions/useHotkey`. If TanStack Intent is configured, use it for
|
|
40
|
+
the Agent Skills the TanStack package provides.
|
|
38
41
|
|
|
39
42
|
## Vite+
|
|
40
43
|
|