@imfusion/web-ui 0.10.1-dev.3.gc9ea991e → 0.10.1-dev.34.gb01a818e
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 +154 -0
- package/README.md +4 -2
- package/THIRD_PARTY_NOTICES.md +110 -0
- package/dist/code-NTcddiYk.js +139 -0
- package/dist/components/account-card/account-card.d.ts +9 -26
- package/dist/components/app-shell/app-shell.d.ts +21 -11
- package/dist/components/callout/callout.d.ts +1 -1
- package/dist/components/chip/chip.d.ts +1 -1
- package/dist/components/color-scheme-toggle/color-scheme-preference.d.ts +3 -0
- package/dist/components/color-scheme-toggle/color-scheme-toggle.d.ts +17 -0
- package/dist/components/color-scheme-toggle/color-scheme-toggle.meta.d.ts +2 -0
- package/dist/components/color-scheme-toggle/index.d.ts +2 -0
- package/dist/components/dialog/dialog.d.ts +148 -0
- package/dist/components/dialog/dialog.meta.d.ts +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +49 -0
- package/dist/components/scroll-area/scroll-area.meta.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +17 -2
- package/dist/components/toggle/toggle.d.ts +8 -2
- package/dist/components/toggle-group/toggle-group-size.d.ts +3 -0
- package/dist/components/toggle-group/toggle-group.d.ts +7 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2336 -1898
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/frame-selection.js +1 -1
- package/dist/integrations/image-display-options.js +123 -113
- package/dist/{rolldown-runtime-Dy4uBu1J.js → resolve-state-props-DQf9WiGv.js} +12 -1
- package/dist/scroll-area-z9Lf9uIk.js +89 -0
- package/dist/slider-Bf274cMe.js +106 -0
- package/dist/style.css +1 -1
- package/dist/{tabs-DRyqtS04.js → tabs-CU46aGud.js} +106 -88
- package/docs/user-guide/UsagePatterns.mdx +4 -0
- package/package.json +2 -2
- package/src/docgen/doc.gen.json +1261 -47
- package/src/llms/llms.gen.txt +18 -1
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +15 -10
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +2 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +13 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +5 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +3 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +3 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +2 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +2 -0
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +2 -1
- package/src/llms/tokens.gen.json +1 -1
- package/dist/code-BYkr5k55.js +0 -134
- package/dist/slider-Cqpreglu.js +0 -116
|
@@ -1,50 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mh as
|
|
3
|
-
import { t as
|
|
4
|
-
import { l as i, u as a } from "./slider-Cqpreglu.js";
|
|
1
|
+
import { n as e, r as t, t as n } from "./resolve-state-props-DQf9WiGv.js";
|
|
2
|
+
import { mh as r, pM as i } from "./icons-BsK_o-Cb.js";
|
|
3
|
+
import { t as a } from "./meta-V_KyLeGn.js";
|
|
5
4
|
import { cva as o } from "class-variance-authority";
|
|
6
5
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
-
import { Children as l,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Tabs as
|
|
12
|
-
var
|
|
6
|
+
import { Children as l, createContext as u, useCallback as d, useContext as f } from "react";
|
|
7
|
+
import { Toggle as p } from "@base-ui/react/toggle";
|
|
8
|
+
import { ToggleGroup as ee } from "@base-ui/react/toggle-group";
|
|
9
|
+
import { Switch as m } from "@base-ui/react/switch";
|
|
10
|
+
import { Tabs as h } from "@base-ui/react/tabs";
|
|
11
|
+
var g = {
|
|
13
12
|
flat: "imf-ui-kbd-module-flat",
|
|
14
13
|
icon: "imf-ui-kbd-module-icon",
|
|
15
14
|
primary: "imf-ui-kbd-module-primary",
|
|
16
15
|
root: "imf-ui-kbd-module-root"
|
|
17
|
-
},
|
|
16
|
+
}, _ = o(g.root, { variants: { variant: {
|
|
18
17
|
default: null,
|
|
19
|
-
primary:
|
|
20
|
-
flat:
|
|
18
|
+
primary: g.primary,
|
|
19
|
+
flat: g.flat
|
|
21
20
|
} } });
|
|
22
|
-
function
|
|
21
|
+
function v({ variant: e = "default", icon: t = !1, children: n, ...a }) {
|
|
23
22
|
return /* @__PURE__ */ c("kbd", {
|
|
24
23
|
...a,
|
|
25
24
|
"data-imf-ui-component": "Kbd",
|
|
26
|
-
className:
|
|
25
|
+
className: _({
|
|
27
26
|
variant: e,
|
|
28
27
|
className: a.className
|
|
29
28
|
}),
|
|
30
|
-
children: [
|
|
31
|
-
glyph:
|
|
29
|
+
children: [t && /* @__PURE__ */ s(i, {
|
|
30
|
+
glyph: r,
|
|
32
31
|
strokeWidth: 2,
|
|
33
32
|
"aria-hidden": !0,
|
|
34
|
-
className:
|
|
35
|
-
}),
|
|
33
|
+
className: g.icon
|
|
34
|
+
}), n]
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
37
|
//#endregion
|
|
39
38
|
//#region src/components/kbd/kbd.meta.ts
|
|
40
|
-
var
|
|
39
|
+
var te = {
|
|
41
40
|
name: "Kbd",
|
|
42
|
-
category:
|
|
41
|
+
category: a.display,
|
|
43
42
|
status: "experimental",
|
|
44
43
|
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
44
|
origin: "native",
|
|
46
45
|
internalDependencies: ["Icon"]
|
|
47
|
-
},
|
|
46
|
+
}, y = {
|
|
48
47
|
ctrl: "Control",
|
|
49
48
|
control: "Control",
|
|
50
49
|
cmd: "Meta",
|
|
@@ -59,75 +58,94 @@ var ee = {
|
|
|
59
58
|
esc: "Escape",
|
|
60
59
|
escape: "Escape"
|
|
61
60
|
};
|
|
62
|
-
function
|
|
61
|
+
function b(e) {
|
|
63
62
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
64
|
-
if (t.length !== 0) return t.map((e) =>
|
|
63
|
+
if (t.length !== 0) return t.map((e) => y[e.toLowerCase()] ?? (e.length === 1 ? e.toUpperCase() : e)).join("+");
|
|
65
64
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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 = {
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/toggle-group/toggle-group-size.ts
|
|
67
|
+
var x = u("md"), S = {
|
|
90
68
|
root: "imf-ui-toggle-module-root",
|
|
91
|
-
shortcut: "imf-ui-toggle-module-shortcut"
|
|
92
|
-
|
|
93
|
-
|
|
69
|
+
shortcut: "imf-ui-toggle-module-shortcut",
|
|
70
|
+
sizeSm: "imf-ui-toggle-module-sizeSm"
|
|
71
|
+
}, C = o(S.root, { variants: { size: {
|
|
72
|
+
sm: S.sizeSm,
|
|
73
|
+
md: null
|
|
74
|
+
} } }), w = 2;
|
|
75
|
+
function T(e) {
|
|
94
76
|
let t = 0;
|
|
95
77
|
return l.forEach(e, (e) => {
|
|
96
|
-
typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t +=
|
|
78
|
+
typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += w);
|
|
97
79
|
}), t;
|
|
98
80
|
}
|
|
99
|
-
function
|
|
100
|
-
let
|
|
101
|
-
"--glyph-count":
|
|
102
|
-
"--max-glyphs":
|
|
81
|
+
function ne({ style: t, shortcut: r, size: i, children: a, ...o }) {
|
|
82
|
+
let l = f(x), u = {
|
|
83
|
+
"--glyph-count": T(a),
|
|
84
|
+
"--max-glyphs": w
|
|
103
85
|
};
|
|
104
|
-
return /* @__PURE__ */ c(
|
|
105
|
-
"aria-keyshortcuts":
|
|
106
|
-
...
|
|
86
|
+
return /* @__PURE__ */ c(p, {
|
|
87
|
+
"aria-keyshortcuts": r ? b(r) : void 0,
|
|
88
|
+
...o,
|
|
107
89
|
"data-imf-ui-component": "Toggle",
|
|
108
|
-
style: (
|
|
109
|
-
...
|
|
110
|
-
...
|
|
90
|
+
style: (n) => ({
|
|
91
|
+
...u,
|
|
92
|
+
...e(t, n)
|
|
93
|
+
}),
|
|
94
|
+
className: (e) => C({
|
|
95
|
+
size: i ?? l,
|
|
96
|
+
className: n(o.className, e)
|
|
111
97
|
}),
|
|
112
|
-
|
|
113
|
-
children: [n, t && /* @__PURE__ */ s(_, {
|
|
98
|
+
children: [a, r && /* @__PURE__ */ s(v, {
|
|
114
99
|
variant: "flat",
|
|
115
|
-
className:
|
|
100
|
+
className: S.shortcut,
|
|
116
101
|
"aria-hidden": !0,
|
|
117
|
-
children:
|
|
102
|
+
children: r
|
|
118
103
|
})]
|
|
119
104
|
});
|
|
120
105
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
106
|
+
var E = {
|
|
107
|
+
root: "imf-ui-toggle-group-module-root",
|
|
108
|
+
sizeSm: "imf-ui-toggle-group-module-sizeSm"
|
|
109
|
+
}, re = o(E.root, { variants: { size: {
|
|
110
|
+
sm: E.sizeSm,
|
|
111
|
+
md: null
|
|
112
|
+
} } });
|
|
113
|
+
function ie({ size: e = "md", ...t }) {
|
|
114
|
+
return /* @__PURE__ */ s(x.Provider, {
|
|
115
|
+
value: e ?? "md",
|
|
116
|
+
children: /* @__PURE__ */ s(ee, {
|
|
117
|
+
...t,
|
|
118
|
+
"data-imf-ui-component": "ToggleGroup",
|
|
119
|
+
className: (r) => re({
|
|
120
|
+
size: e,
|
|
121
|
+
className: n(t.className, r)
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
var D = {
|
|
127
|
+
root: "imf-ui-switch-module-root",
|
|
128
|
+
thumb: "imf-ui-switch-module-thumb"
|
|
129
|
+
}, ae = /* @__PURE__ */ t({
|
|
130
|
+
Root: () => A,
|
|
131
|
+
Thumb: () => j
|
|
132
|
+
}), O = o(D.root), k = o(D.thumb);
|
|
133
|
+
function A(e) {
|
|
134
|
+
return /* @__PURE__ */ s(m.Root, {
|
|
135
|
+
...e,
|
|
136
|
+
"data-imf-ui-component": "Switch.Root",
|
|
137
|
+
className: (t) => O({ className: n(e.className, t) })
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
A.displayName = "Switch.Root";
|
|
124
141
|
function j(e) {
|
|
125
|
-
return /* @__PURE__ */ s(
|
|
142
|
+
return /* @__PURE__ */ s(m.Thumb, {
|
|
126
143
|
...e,
|
|
127
|
-
"data-imf-ui-component": "
|
|
128
|
-
className: (t) =>
|
|
144
|
+
"data-imf-ui-component": "Switch.Thumb",
|
|
145
|
+
className: (t) => k({ className: n(e.className, t) })
|
|
129
146
|
});
|
|
130
147
|
}
|
|
148
|
+
j.displayName = "Switch.Thumb";
|
|
131
149
|
var M = {
|
|
132
150
|
alignCenter: "imf-ui-row-module-alignCenter",
|
|
133
151
|
alignEnd: "imf-ui-row-module-alignEnd",
|
|
@@ -268,7 +286,7 @@ var R = {
|
|
|
268
286
|
panelViewport: "imf-ui-tabs-module-panelViewport",
|
|
269
287
|
root: "imf-ui-tabs-module-root",
|
|
270
288
|
tab: "imf-ui-tabs-module-tab"
|
|
271
|
-
}, z = /* @__PURE__ */
|
|
289
|
+
}, z = /* @__PURE__ */ t({
|
|
272
290
|
Indicator: () => Z,
|
|
273
291
|
List: () => Y,
|
|
274
292
|
Panel: () => $,
|
|
@@ -295,15 +313,15 @@ function q(e) {
|
|
|
295
313
|
};
|
|
296
314
|
}
|
|
297
315
|
function J(e) {
|
|
298
|
-
return /* @__PURE__ */ s(
|
|
316
|
+
return /* @__PURE__ */ s(h.Root, {
|
|
299
317
|
...e,
|
|
300
318
|
"data-imf-ui-component": "Tabs.Root",
|
|
301
|
-
className: (t) => V({ className:
|
|
319
|
+
className: (t) => V({ className: n(e.className, t) })
|
|
302
320
|
});
|
|
303
321
|
}
|
|
304
322
|
J.displayName = "Tabs.Root";
|
|
305
|
-
function Y({ fill: e = !1, ref: t, ...
|
|
306
|
-
let
|
|
323
|
+
function Y({ fill: e = !1, ref: t, ...r }) {
|
|
324
|
+
let i = d((e) => {
|
|
307
325
|
if (!e) return;
|
|
308
326
|
K(t, e);
|
|
309
327
|
let n = q(e);
|
|
@@ -311,30 +329,30 @@ function Y({ fill: e = !1, ref: t, ...n }) {
|
|
|
311
329
|
n(), K(t, null);
|
|
312
330
|
};
|
|
313
331
|
}, [t]);
|
|
314
|
-
return /* @__PURE__ */ s(
|
|
315
|
-
...
|
|
316
|
-
ref:
|
|
332
|
+
return /* @__PURE__ */ s(h.List, {
|
|
333
|
+
...r,
|
|
334
|
+
ref: i,
|
|
317
335
|
"data-imf-ui-component": "Tabs.List",
|
|
318
336
|
className: (t) => B({
|
|
319
337
|
fill: e,
|
|
320
|
-
className:
|
|
338
|
+
className: n(r.className, t)
|
|
321
339
|
})
|
|
322
340
|
});
|
|
323
341
|
}
|
|
324
342
|
Y.displayName = "Tabs.List";
|
|
325
343
|
function X(e) {
|
|
326
|
-
return /* @__PURE__ */ s(
|
|
344
|
+
return /* @__PURE__ */ s(h.Tab, {
|
|
327
345
|
...e,
|
|
328
346
|
"data-imf-ui-component": "Tabs.Tab",
|
|
329
|
-
className: (t) => H({ className:
|
|
347
|
+
className: (t) => H({ className: n(e.className, t) })
|
|
330
348
|
});
|
|
331
349
|
}
|
|
332
350
|
X.displayName = "Tabs.Tab";
|
|
333
351
|
function Z(e) {
|
|
334
|
-
return /* @__PURE__ */ s(
|
|
352
|
+
return /* @__PURE__ */ s(h.Indicator, {
|
|
335
353
|
...e,
|
|
336
354
|
"data-imf-ui-component": "Tabs.Indicator",
|
|
337
|
-
className: (t) => U({ className:
|
|
355
|
+
className: (t) => U({ className: n(e.className, t) })
|
|
338
356
|
});
|
|
339
357
|
}
|
|
340
358
|
Z.displayName = "Tabs.Indicator";
|
|
@@ -347,12 +365,12 @@ function Q(e) {
|
|
|
347
365
|
}
|
|
348
366
|
Q.displayName = "Tabs.PanelViewport";
|
|
349
367
|
function $(e) {
|
|
350
|
-
return /* @__PURE__ */ s(
|
|
368
|
+
return /* @__PURE__ */ s(h.Panel, {
|
|
351
369
|
...e,
|
|
352
370
|
"data-imf-ui-component": "Tabs.Panel",
|
|
353
|
-
className: (t) => G({ className:
|
|
371
|
+
className: (t) => G({ className: n(e.className, t) })
|
|
354
372
|
});
|
|
355
373
|
}
|
|
356
374
|
$.displayName = "Tabs.Panel";
|
|
357
375
|
//#endregion
|
|
358
|
-
export { _, J as a, L as c,
|
|
376
|
+
export { v as _, J as a, L as c, j as d, ae as f, te as g, b as h, Q as i, P as l, ne as m, Y as n, X as o, ie as p, $ as r, z as s, Z as t, A as u };
|
|
@@ -120,4 +120,8 @@ component colors cannot disagree with them:
|
|
|
120
120
|
<WebUIProvider colorScheme="dark">{children}</WebUIProvider>
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
To let the user pick Light, System, or Dark, place a
|
|
124
|
+
[`ColorSchemeToggle`](?path=/docs/primitives-inputs-colorschemetoggle--docs). It stores the choice and works only while
|
|
125
|
+
the provider's `colorScheme` is unset.
|
|
126
|
+
|
|
123
127
|
<PageNav />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imfusion/web-ui",
|
|
3
|
-
"version": "0.10.1-dev.
|
|
3
|
+
"version": "0.10.1-dev.34.gb01a818e",
|
|
4
4
|
"description": "The official Web UI component library for ImFusion web apps",
|
|
5
5
|
"author": "ImFusion GmbH",
|
|
6
6
|
"homepage": "https://imfusion.com",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"skills:eval:compare": "tsx src/llms/evals/runner/compare.ts",
|
|
96
96
|
"skills:eval:affected": "tsx src/llms/evals/runner/affected.ts",
|
|
97
97
|
"skills:eval:report": "tsx src/llms/evals/runner/report.ts",
|
|
98
|
-
"git:config": "git config core.hooksPath .
|
|
98
|
+
"git:config": "git config core.hooksPath .vite-hooks/_ && vp config --no-agent && git config pull.rebase true && git config merge.ff only"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@imfusion/sdk": "*",
|