@imfusion/web-ui 0.11.1-dev.3.ga6fcf91c → 0.11.1-dev.30.g5f35727d
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 +69 -0
- package/dist/{code-NTcddiYk.js → code-BXlEW54h.js} +7 -7
- package/dist/components/autocomplete/autocomplete.d.ts +144 -0
- package/dist/components/autocomplete/autocomplete.meta.d.ts +2 -0
- package/dist/components/autocomplete/index.d.ts +2 -0
- package/dist/components/checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/combobox/combobox.cva.d.ts +37 -0
- package/dist/components/combobox/combobox.d.ts +171 -0
- package/dist/components/combobox/combobox.meta.d.ts +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/select/select.cva.d.ts +7 -0
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/table/table.d.ts +8 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/textarea.d.ts +32 -0
- package/dist/components/textarea/textarea.meta.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +1 -1
- package/dist/components/typo/typo.d.ts +5 -1
- package/dist/docgen/component-sources.d.ts +4 -0
- package/dist/icons/catalog.gen.d.ts +28 -0
- package/dist/icons/icons.gen.d.ts +4 -0
- package/dist/{icons-BsK_o-Cb.js → icons-vc1WZCxX.js} +1027 -879
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2637 -1873
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/frame-selection.js +1 -1
- package/dist/integrations/image-display-options.js +3 -3
- package/dist/{scroll-area-z9Lf9uIk.js → scroll-area-CUo1NBaW.js} +20 -20
- package/dist/{slider-Bf274cMe.js → slider-BKDxeTmk.js} +23 -23
- package/dist/style.css +1 -1
- package/dist/{tabs-CU46aGud.js → tabs-U3Cg6YAw.js} +42 -42
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/item-parts.d.ts +23 -0
- package/dist/utils/stable-popup-height.d.ts +10 -0
- package/dist/utils-RZJAXfcf.js +56 -0
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +3235 -676
- package/src/llms/icon-catalog.gen.json +32 -0
- package/src/llms/llms.gen.txt +18 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +13 -0
- package/dist/resolve-state-props-DQf9WiGv.js +0 -22
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as e, o as t, s as n } from "./utils-RZJAXfcf.js";
|
|
2
|
+
import { _M as r, mh as i } from "./icons-vc1WZCxX.js";
|
|
3
3
|
import { t as a } from "./meta-V_KyLeGn.js";
|
|
4
4
|
import { cva as o } from "class-variance-authority";
|
|
5
5
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -26,8 +26,8 @@ function v({ variant: e = "default", icon: t = !1, children: n, ...a }) {
|
|
|
26
26
|
variant: e,
|
|
27
27
|
className: a.className
|
|
28
28
|
}),
|
|
29
|
-
children: [t && /* @__PURE__ */ s(
|
|
30
|
-
glyph:
|
|
29
|
+
children: [t && /* @__PURE__ */ s(r, {
|
|
30
|
+
glyph: i,
|
|
31
31
|
strokeWidth: 2,
|
|
32
32
|
"aria-hidden": !0,
|
|
33
33
|
className: g.icon
|
|
@@ -78,7 +78,7 @@ function T(e) {
|
|
|
78
78
|
typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += w);
|
|
79
79
|
}), t;
|
|
80
80
|
}
|
|
81
|
-
function ne({ style:
|
|
81
|
+
function ne({ style: n, shortcut: r, size: i, children: a, ...o }) {
|
|
82
82
|
let l = f(x), u = {
|
|
83
83
|
"--glyph-count": T(a),
|
|
84
84
|
"--max-glyphs": w
|
|
@@ -87,13 +87,13 @@ function ne({ style: t, shortcut: r, size: i, children: a, ...o }) {
|
|
|
87
87
|
"aria-keyshortcuts": r ? b(r) : void 0,
|
|
88
88
|
...o,
|
|
89
89
|
"data-imf-ui-component": "Toggle",
|
|
90
|
-
style: (
|
|
90
|
+
style: (e) => ({
|
|
91
91
|
...u,
|
|
92
|
-
...
|
|
92
|
+
...t(n, e)
|
|
93
93
|
}),
|
|
94
|
-
className: (
|
|
94
|
+
className: (t) => C({
|
|
95
95
|
size: i ?? l,
|
|
96
|
-
className:
|
|
96
|
+
className: e(o.className, t)
|
|
97
97
|
}),
|
|
98
98
|
children: [a, r && /* @__PURE__ */ s(v, {
|
|
99
99
|
variant: "flat",
|
|
@@ -110,15 +110,15 @@ var E = {
|
|
|
110
110
|
sm: E.sizeSm,
|
|
111
111
|
md: null
|
|
112
112
|
} } });
|
|
113
|
-
function ie({ size:
|
|
113
|
+
function ie({ size: t = "md", ...n }) {
|
|
114
114
|
return /* @__PURE__ */ s(x.Provider, {
|
|
115
|
-
value:
|
|
115
|
+
value: t ?? "md",
|
|
116
116
|
children: /* @__PURE__ */ s(ee, {
|
|
117
|
-
...
|
|
117
|
+
...n,
|
|
118
118
|
"data-imf-ui-component": "ToggleGroup",
|
|
119
119
|
className: (r) => re({
|
|
120
|
-
size:
|
|
121
|
-
className: n
|
|
120
|
+
size: t,
|
|
121
|
+
className: e(n.className, r)
|
|
122
122
|
})
|
|
123
123
|
})
|
|
124
124
|
});
|
|
@@ -126,23 +126,23 @@ function ie({ size: e = "md", ...t }) {
|
|
|
126
126
|
var D = {
|
|
127
127
|
root: "imf-ui-switch-module-root",
|
|
128
128
|
thumb: "imf-ui-switch-module-thumb"
|
|
129
|
-
}, ae = /* @__PURE__ */
|
|
129
|
+
}, ae = /* @__PURE__ */ n({
|
|
130
130
|
Root: () => A,
|
|
131
131
|
Thumb: () => j
|
|
132
132
|
}), O = o(D.root), k = o(D.thumb);
|
|
133
|
-
function A(
|
|
133
|
+
function A(t) {
|
|
134
134
|
return /* @__PURE__ */ s(m.Root, {
|
|
135
|
-
...
|
|
135
|
+
...t,
|
|
136
136
|
"data-imf-ui-component": "Switch.Root",
|
|
137
|
-
className: (
|
|
137
|
+
className: (n) => O({ className: e(t.className, n) })
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
A.displayName = "Switch.Root";
|
|
141
|
-
function j(
|
|
141
|
+
function j(t) {
|
|
142
142
|
return /* @__PURE__ */ s(m.Thumb, {
|
|
143
|
-
...
|
|
143
|
+
...t,
|
|
144
144
|
"data-imf-ui-component": "Switch.Thumb",
|
|
145
|
-
className: (
|
|
145
|
+
className: (n) => k({ className: e(t.className, n) })
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
j.displayName = "Switch.Thumb";
|
|
@@ -286,7 +286,7 @@ var R = {
|
|
|
286
286
|
panelViewport: "imf-ui-tabs-module-panelViewport",
|
|
287
287
|
root: "imf-ui-tabs-module-root",
|
|
288
288
|
tab: "imf-ui-tabs-module-tab"
|
|
289
|
-
}, z = /* @__PURE__ */
|
|
289
|
+
}, z = /* @__PURE__ */ n({
|
|
290
290
|
Indicator: () => Z,
|
|
291
291
|
List: () => Y,
|
|
292
292
|
Panel: () => $,
|
|
@@ -312,47 +312,47 @@ function q(e) {
|
|
|
312
312
|
t.disconnect(), r.disconnect();
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
|
-
function J(
|
|
315
|
+
function J(t) {
|
|
316
316
|
return /* @__PURE__ */ s(h.Root, {
|
|
317
|
-
...
|
|
317
|
+
...t,
|
|
318
318
|
"data-imf-ui-component": "Tabs.Root",
|
|
319
|
-
className: (
|
|
319
|
+
className: (n) => V({ className: e(t.className, n) })
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
J.displayName = "Tabs.Root";
|
|
323
|
-
function Y({ fill:
|
|
323
|
+
function Y({ fill: t = !1, ref: n, ...r }) {
|
|
324
324
|
let i = d((e) => {
|
|
325
325
|
if (!e) return;
|
|
326
|
-
K(
|
|
327
|
-
let
|
|
326
|
+
K(n, e);
|
|
327
|
+
let t = q(e);
|
|
328
328
|
return () => {
|
|
329
|
-
|
|
329
|
+
t(), K(n, null);
|
|
330
330
|
};
|
|
331
|
-
}, [
|
|
331
|
+
}, [n]);
|
|
332
332
|
return /* @__PURE__ */ s(h.List, {
|
|
333
333
|
...r,
|
|
334
334
|
ref: i,
|
|
335
335
|
"data-imf-ui-component": "Tabs.List",
|
|
336
|
-
className: (
|
|
337
|
-
fill:
|
|
338
|
-
className:
|
|
336
|
+
className: (n) => B({
|
|
337
|
+
fill: t,
|
|
338
|
+
className: e(r.className, n)
|
|
339
339
|
})
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
Y.displayName = "Tabs.List";
|
|
343
|
-
function X(
|
|
343
|
+
function X(t) {
|
|
344
344
|
return /* @__PURE__ */ s(h.Tab, {
|
|
345
|
-
...
|
|
345
|
+
...t,
|
|
346
346
|
"data-imf-ui-component": "Tabs.Tab",
|
|
347
|
-
className: (
|
|
347
|
+
className: (n) => H({ className: e(t.className, n) })
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
X.displayName = "Tabs.Tab";
|
|
351
|
-
function Z(
|
|
351
|
+
function Z(t) {
|
|
352
352
|
return /* @__PURE__ */ s(h.Indicator, {
|
|
353
|
-
...
|
|
353
|
+
...t,
|
|
354
354
|
"data-imf-ui-component": "Tabs.Indicator",
|
|
355
|
-
className: (
|
|
355
|
+
className: (n) => U({ className: e(t.className, n) })
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
Z.displayName = "Tabs.Indicator";
|
|
@@ -364,11 +364,11 @@ function Q(e) {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
Q.displayName = "Tabs.PanelViewport";
|
|
367
|
-
function $(
|
|
367
|
+
function $(t) {
|
|
368
368
|
return /* @__PURE__ */ s(h.Panel, {
|
|
369
|
-
...
|
|
369
|
+
...t,
|
|
370
370
|
"data-imf-ui-component": "Tabs.Panel",
|
|
371
|
-
className: (
|
|
371
|
+
className: (n) => G({ className: e(t.className, n) })
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
$.displayName = "Tabs.Panel";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface ItemParts {
|
|
2
|
+
labelId: string;
|
|
3
|
+
descriptionId: string;
|
|
4
|
+
setHasLabel: (has: boolean) => void;
|
|
5
|
+
setHasDescription: (has: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ItemPartsContext: import('react').Context<ItemParts | null>;
|
|
8
|
+
/** Creates the ids for one item. Spread `ariaProps` on the item and wrap its tree in `ItemPartsContext`. */
|
|
9
|
+
export declare function useItemParts(): {
|
|
10
|
+
context: {
|
|
11
|
+
labelId: string;
|
|
12
|
+
descriptionId: string;
|
|
13
|
+
setHasLabel: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
14
|
+
setHasDescription: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
15
|
+
};
|
|
16
|
+
ariaProps: {
|
|
17
|
+
"aria-labelledby": string | undefined;
|
|
18
|
+
"aria-describedby": string | undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
/** Returns the id an item's text or description part must render, or undefined outside an item. */
|
|
22
|
+
export declare function useItemPartId(part: "label" | "description"): string | undefined;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keeps a popup or inline list at the height it had when it mounted, so filtering does not shrink it under the pointer.
|
|
3
|
+
* Unmounting resets the height. Spread `style` before the consumer's style so theirs wins.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useStablePopupHeight({ ref: forwardedRef }: {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
}): {
|
|
8
|
+
ref: (node: HTMLDivElement | null) => void;
|
|
9
|
+
style: import('react').CSSProperties | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createContext as e, useCallback as t, useContext as n, useEffect as r, useId as i, useMemo as a, useState as o } from "react";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var s = Object.defineProperty, c = (e, t) => {
|
|
4
|
+
let n = {};
|
|
5
|
+
for (var r in e) s(n, r, {
|
|
6
|
+
get: e[r],
|
|
7
|
+
enumerable: !0
|
|
8
|
+
});
|
|
9
|
+
return t || s(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/utils/resolve-state-props.ts
|
|
13
|
+
function l(e, t) {
|
|
14
|
+
return e instanceof Function ? e(t) : e;
|
|
15
|
+
}
|
|
16
|
+
function u(e, t) {
|
|
17
|
+
return l(e, t);
|
|
18
|
+
}
|
|
19
|
+
function d(e, t) {
|
|
20
|
+
return l(e, t);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/utils/item-parts.tsx
|
|
24
|
+
var f = e(null);
|
|
25
|
+
function p() {
|
|
26
|
+
let e = i(), t = i(), [n, r] = o(!1), [s, c] = o(!1);
|
|
27
|
+
return {
|
|
28
|
+
context: a(() => ({
|
|
29
|
+
labelId: e,
|
|
30
|
+
descriptionId: t,
|
|
31
|
+
setHasLabel: r,
|
|
32
|
+
setHasDescription: c
|
|
33
|
+
}), [e, t]),
|
|
34
|
+
ariaProps: {
|
|
35
|
+
"aria-labelledby": n ? e : void 0,
|
|
36
|
+
"aria-describedby": s ? t : void 0
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function m(e) {
|
|
41
|
+
let t = n(f), i = e === "label" ? t?.setHasLabel : t?.setHasDescription;
|
|
42
|
+
return r(() => (i?.(!0), () => i?.(!1)), [i]), e === "label" ? t?.labelId : t?.descriptionId;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/utils/stable-popup-height.ts
|
|
46
|
+
function h({ ref: e }) {
|
|
47
|
+
let [n, r] = o();
|
|
48
|
+
return {
|
|
49
|
+
ref: t((t) => {
|
|
50
|
+
typeof e == "function" ? e(t) : e && (e.current = t), t && r((e) => e ?? t.offsetHeight);
|
|
51
|
+
}, [e]),
|
|
52
|
+
style: n === void 0 ? void 0 : { minBlockSize: `min(${String(n)}px, var(--available-height, ${String(n)}px))` }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { u as a, p as i, f as n, d as o, m as r, c as s, h as t };
|
package/package.json
CHANGED