@imfusion/web-ui 0.11.1-dev.45.gf7b49f57 → 0.11.1-dev.48.g0fcb0d30

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.
@@ -0,0 +1,305 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { a as t } from "./utils-J6vbjIt1.js";
3
+ import { cva as n, cx as r } from "class-variance-authority";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { createContext as a, useCallback as o, useContext as s } from "react";
6
+ import { Switch as c } from "@base-ui/react/switch";
7
+ import { Tabs as l } from "@base-ui/react/tabs";
8
+ var u = {
9
+ alignCenter: "imf-ui-stack-module-alignCenter",
10
+ alignEnd: "imf-ui-stack-module-alignEnd",
11
+ alignStart: "imf-ui-stack-module-alignStart",
12
+ alignStretch: "imf-ui-stack-module-alignStretch",
13
+ gap0: "imf-ui-stack-module-gap0",
14
+ gap1: "imf-ui-stack-module-gap1",
15
+ gap10: "imf-ui-stack-module-gap10",
16
+ gap2: "imf-ui-stack-module-gap2",
17
+ gap3: "imf-ui-stack-module-gap3",
18
+ gap4: "imf-ui-stack-module-gap4",
19
+ gap5: "imf-ui-stack-module-gap5",
20
+ gap6: "imf-ui-stack-module-gap6",
21
+ gap7: "imf-ui-stack-module-gap7",
22
+ gap8: "imf-ui-stack-module-gap8",
23
+ gap9: "imf-ui-stack-module-gap9",
24
+ justifyAround: "imf-ui-stack-module-justifyAround",
25
+ justifyBetween: "imf-ui-stack-module-justifyBetween",
26
+ justifyCenter: "imf-ui-stack-module-justifyCenter",
27
+ justifyEnd: "imf-ui-stack-module-justifyEnd",
28
+ justifyEvenly: "imf-ui-stack-module-justifyEvenly",
29
+ justifyStart: "imf-ui-stack-module-justifyStart",
30
+ root: "imf-ui-stack-module-root"
31
+ }, d = n(u.root, { variants: {
32
+ gap: {
33
+ 0: u.gap0,
34
+ 1: u.gap1,
35
+ 2: u.gap2,
36
+ 3: u.gap3,
37
+ 4: u.gap4,
38
+ 5: u.gap5,
39
+ 6: u.gap6,
40
+ 7: u.gap7,
41
+ 8: u.gap8,
42
+ 9: u.gap9,
43
+ 10: u.gap10
44
+ },
45
+ align: {
46
+ start: u.alignStart,
47
+ center: u.alignCenter,
48
+ end: u.alignEnd,
49
+ stretch: u.alignStretch
50
+ },
51
+ justify: {
52
+ start: u.justifyStart,
53
+ center: u.justifyCenter,
54
+ end: u.justifyEnd,
55
+ between: u.justifyBetween,
56
+ around: u.justifyAround,
57
+ evenly: u.justifyEvenly
58
+ }
59
+ } });
60
+ function f({ gap: e = "4", align: t = "stretch", justify: n = "start", ...r }) {
61
+ return /* @__PURE__ */ i("div", {
62
+ ...r,
63
+ "data-imf-ui-component": "Stack",
64
+ className: d({
65
+ gap: e,
66
+ align: t,
67
+ justify: n,
68
+ className: r.className
69
+ })
70
+ });
71
+ }
72
+ var p = {
73
+ root: "imf-ui-switch-module-root",
74
+ thumb: "imf-ui-switch-module-thumb"
75
+ }, m = /* @__PURE__ */ e({
76
+ Root: () => _,
77
+ Thumb: () => v
78
+ }), h = n(p.root), g = n(p.thumb);
79
+ function _(e) {
80
+ return /* @__PURE__ */ i(c.Root, {
81
+ ...e,
82
+ "data-imf-ui-component": "Switch.Root",
83
+ className: (n) => h({ className: t(e.className, n) })
84
+ });
85
+ }
86
+ _.displayName = "Switch.Root";
87
+ function v(e) {
88
+ return /* @__PURE__ */ i(c.Thumb, {
89
+ ...e,
90
+ "data-imf-ui-component": "Switch.Thumb",
91
+ className: (n) => g({ className: t(e.className, n) })
92
+ });
93
+ }
94
+ v.displayName = "Switch.Thumb";
95
+ var y = {
96
+ alignCenter: "imf-ui-row-module-alignCenter",
97
+ alignEnd: "imf-ui-row-module-alignEnd",
98
+ alignStart: "imf-ui-row-module-alignStart",
99
+ alignStretch: "imf-ui-row-module-alignStretch",
100
+ gap1: "imf-ui-row-module-gap1",
101
+ gap10: "imf-ui-row-module-gap10",
102
+ gap2: "imf-ui-row-module-gap2",
103
+ gap3: "imf-ui-row-module-gap3",
104
+ gap4: "imf-ui-row-module-gap4",
105
+ gap5: "imf-ui-row-module-gap5",
106
+ gap6: "imf-ui-row-module-gap6",
107
+ gap7: "imf-ui-row-module-gap7",
108
+ gap8: "imf-ui-row-module-gap8",
109
+ gap9: "imf-ui-row-module-gap9",
110
+ justifyAround: "imf-ui-row-module-justifyAround",
111
+ justifyBetween: "imf-ui-row-module-justifyBetween",
112
+ justifyCenter: "imf-ui-row-module-justifyCenter",
113
+ justifyEnd: "imf-ui-row-module-justifyEnd",
114
+ justifyEvenly: "imf-ui-row-module-justifyEvenly",
115
+ justifyStart: "imf-ui-row-module-justifyStart",
116
+ root: "imf-ui-row-module-root",
117
+ wrap: "imf-ui-row-module-wrap"
118
+ }, b = n(y.root, { variants: {
119
+ gap: {
120
+ 1: y.gap1,
121
+ 2: y.gap2,
122
+ 3: y.gap3,
123
+ 4: y.gap4,
124
+ 5: y.gap5,
125
+ 6: y.gap6,
126
+ 7: y.gap7,
127
+ 8: y.gap8,
128
+ 9: y.gap9,
129
+ 10: y.gap10
130
+ },
131
+ align: {
132
+ start: y.alignStart,
133
+ center: y.alignCenter,
134
+ end: y.alignEnd,
135
+ stretch: y.alignStretch
136
+ },
137
+ justify: {
138
+ start: y.justifyStart,
139
+ center: y.justifyCenter,
140
+ end: y.justifyEnd,
141
+ between: y.justifyBetween,
142
+ around: y.justifyAround,
143
+ evenly: y.justifyEvenly
144
+ },
145
+ wrap: {
146
+ true: y.wrap,
147
+ false: null
148
+ }
149
+ } });
150
+ function x({ gap: e = "2", align: t = "stretch", justify: n = "start", wrap: r = !1, ...a }) {
151
+ return /* @__PURE__ */ i("div", {
152
+ ...a,
153
+ "data-imf-ui-component": "Row",
154
+ className: b({
155
+ gap: e,
156
+ align: t,
157
+ justify: n,
158
+ wrap: r,
159
+ className: a.className
160
+ })
161
+ });
162
+ }
163
+ var S = {
164
+ item: "imf-ui-tabs-underline-module-item",
165
+ rule: "imf-ui-tabs-underline-module-rule"
166
+ }, C = n(S.rule), w = n(S.item), T = {
167
+ indicator: "imf-ui-tabs-module-indicator",
168
+ indicatorUnderline: "imf-ui-tabs-module-indicatorUnderline",
169
+ list: "imf-ui-tabs-module-list",
170
+ listFill: "imf-ui-tabs-module-listFill",
171
+ listUnderline: "imf-ui-tabs-module-listUnderline",
172
+ panel: "imf-ui-tabs-module-panel",
173
+ panelUnderline: "imf-ui-tabs-module-panelUnderline",
174
+ panelViewport: "imf-ui-tabs-module-panelViewport",
175
+ panelViewportUnderline: "imf-ui-tabs-module-panelViewportUnderline",
176
+ root: "imf-ui-tabs-module-root",
177
+ tab: "imf-ui-tabs-module-tab",
178
+ tabUnderline: "imf-ui-tabs-module-tabUnderline"
179
+ }, E = /* @__PURE__ */ e({
180
+ Indicator: () => z,
181
+ List: () => L,
182
+ Panel: () => V,
183
+ PanelViewport: () => B,
184
+ Root: () => I,
185
+ Tab: () => R
186
+ }), D = n(T.list, { variants: {
187
+ fill: {
188
+ true: T.listFill,
189
+ false: null
190
+ },
191
+ appearance: {
192
+ boxed: null,
193
+ underline: r(T.listUnderline, C())
194
+ }
195
+ } }), O = n(T.root), k = n(null, { variants: { appearance: {
196
+ boxed: T.tab,
197
+ underline: r(T.tabUnderline, w())
198
+ } } }), A = n(null, { variants: { appearance: {
199
+ boxed: T.indicator,
200
+ underline: T.indicatorUnderline
201
+ } } }), j = n(T.panelViewport, { variants: { appearance: {
202
+ boxed: null,
203
+ underline: T.panelViewportUnderline
204
+ } } }), M = n(T.panel, { variants: { appearance: {
205
+ boxed: null,
206
+ underline: T.panelUnderline
207
+ } } }), N = a("boxed");
208
+ function P(e, t) {
209
+ typeof e == "function" ? e(t) : e && (e.current = t);
210
+ }
211
+ function F(e) {
212
+ let t = new ResizeObserver(() => {
213
+ let t = e.dataset.orientation === "vertical" ? e.scrollHeight > e.clientHeight : e.scrollWidth > e.clientWidth;
214
+ e.toggleAttribute("data-overflowing", t);
215
+ }), n = () => {
216
+ t.disconnect(), t.observe(e);
217
+ for (let n of e.children) t.observe(n);
218
+ }, r = new MutationObserver(n);
219
+ return r.observe(e, { childList: !0 }), n(), () => {
220
+ t.disconnect(), r.disconnect();
221
+ };
222
+ }
223
+ function I({ appearance: e = "boxed", ...n }) {
224
+ let r = n.orientation === "vertical" ? "boxed" : e;
225
+ return /* @__PURE__ */ i(N, {
226
+ value: r,
227
+ children: /* @__PURE__ */ i(l.Root, {
228
+ ...n,
229
+ "data-imf-ui-component": "Tabs.Root",
230
+ className: (e) => O({ className: t(n.className, e) })
231
+ })
232
+ });
233
+ }
234
+ I.displayName = "Tabs.Root";
235
+ function L({ fill: e = !1, ref: n, ...r }) {
236
+ let a = s(N), c = o((e) => {
237
+ if (!e) return;
238
+ P(n, e);
239
+ let t = F(e);
240
+ return () => {
241
+ t(), P(n, null);
242
+ };
243
+ }, [n]);
244
+ return /* @__PURE__ */ i(l.List, {
245
+ ...r,
246
+ ref: c,
247
+ "data-imf-ui-component": "Tabs.List",
248
+ className: (n) => D({
249
+ fill: e,
250
+ appearance: a,
251
+ className: t(r.className, n)
252
+ })
253
+ });
254
+ }
255
+ L.displayName = "Tabs.List";
256
+ function R(e) {
257
+ let n = s(N);
258
+ return /* @__PURE__ */ i(l.Tab, {
259
+ ...e,
260
+ "data-imf-ui-component": "Tabs.Tab",
261
+ className: (r) => k({
262
+ appearance: n,
263
+ className: t(e.className, r)
264
+ })
265
+ });
266
+ }
267
+ R.displayName = "Tabs.Tab";
268
+ function z(e) {
269
+ let n = s(N);
270
+ return /* @__PURE__ */ i(l.Indicator, {
271
+ ...e,
272
+ "data-imf-ui-component": "Tabs.Indicator",
273
+ className: (r) => A({
274
+ appearance: n,
275
+ className: t(e.className, r)
276
+ })
277
+ });
278
+ }
279
+ z.displayName = "Tabs.Indicator";
280
+ function B(e) {
281
+ let t = s(N);
282
+ return /* @__PURE__ */ i("div", {
283
+ ...e,
284
+ "data-imf-ui-component": "Tabs.PanelViewport",
285
+ className: j({
286
+ appearance: t,
287
+ className: e.className
288
+ })
289
+ });
290
+ }
291
+ B.displayName = "Tabs.PanelViewport";
292
+ function V(e) {
293
+ let n = s(N);
294
+ return /* @__PURE__ */ i(l.Panel, {
295
+ ...e,
296
+ "data-imf-ui-component": "Tabs.Panel",
297
+ className: (r) => M({
298
+ appearance: n,
299
+ className: t(e.className, r)
300
+ })
301
+ });
302
+ }
303
+ V.displayName = "Tabs.Panel";
304
+ //#endregion
305
+ export { I as a, w as c, _ as d, v as f, B as i, C as l, f as m, L as n, R as o, m as p, V as r, E as s, z as t, x as u };
@@ -0,0 +1,31 @@
1
+ import { t as e } from "./meta-V_KyLeGn.js";
2
+ import "./toggle-group-eGr6_hgQ.js";
3
+ //#region src/components/toggle/toggle.meta.ts
4
+ var t = {
5
+ name: "Toggle",
6
+ category: e.inputs,
7
+ status: "experimental",
8
+ description: "Two-state button for a pressed or unpressed option. Compose several in ToggleGroup for a segmented control.",
9
+ origin: "adapted",
10
+ internalDependencies: ["Kbd"],
11
+ upstream: {
12
+ name: "Base UI",
13
+ websiteLink: "https://base-ui.com/",
14
+ docLink: "https://base-ui.com/react/components/toggle",
15
+ llmDocLink: "https://base-ui.com/react/components/toggle.md"
16
+ }
17
+ }, n = {
18
+ name: "ToggleGroup",
19
+ category: e.inputs,
20
+ status: "experimental",
21
+ description: "Group of connected Toggle buttons that share a selection. Also called a segmented control; set `multiple` for more than one active option.",
22
+ origin: "adapted",
23
+ upstream: {
24
+ name: "Base UI",
25
+ websiteLink: "https://base-ui.com/",
26
+ docLink: "https://base-ui.com/react/components/toggle-group",
27
+ llmDocLink: "https://base-ui.com/react/components/toggle-group.md"
28
+ }
29
+ };
30
+ //#endregion
31
+ export { t as n, n as t };
@@ -0,0 +1,125 @@
1
+ import { _M as e, mh as t } from "./icons-vc1WZCxX.js";
2
+ import { t as n } from "./meta-V_KyLeGn.js";
3
+ import { a as r, o as i } from "./utils-J6vbjIt1.js";
4
+ import { cva as a } from "class-variance-authority";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { Children as c, createContext as l, useContext as u } from "react";
7
+ import { Toggle as d } from "@base-ui/react/toggle";
8
+ import { ToggleGroup as f } from "@base-ui/react/toggle-group";
9
+ var p = {
10
+ flat: "imf-ui-kbd-module-flat",
11
+ icon: "imf-ui-kbd-module-icon",
12
+ primary: "imf-ui-kbd-module-primary",
13
+ root: "imf-ui-kbd-module-root"
14
+ }, m = a(p.root, { variants: { variant: {
15
+ default: null,
16
+ primary: p.primary,
17
+ flat: p.flat
18
+ } } });
19
+ function h({ variant: n = "default", icon: r = !1, children: i, ...a }) {
20
+ return /* @__PURE__ */ s("kbd", {
21
+ ...a,
22
+ "data-imf-ui-component": "Kbd",
23
+ className: m({
24
+ variant: n,
25
+ className: a.className
26
+ }),
27
+ children: [r && /* @__PURE__ */ o(e, {
28
+ glyph: t,
29
+ strokeWidth: 2,
30
+ "aria-hidden": !0,
31
+ className: p.icon
32
+ }), i]
33
+ });
34
+ }
35
+ //#endregion
36
+ //#region src/components/kbd/kbd.meta.ts
37
+ var g = {
38
+ name: "Kbd",
39
+ category: n.display,
40
+ status: "experimental",
41
+ 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.",
42
+ origin: "native",
43
+ internalDependencies: ["Icon"]
44
+ }, _ = {
45
+ ctrl: "Control",
46
+ control: "Control",
47
+ cmd: "Meta",
48
+ "⌘": "Meta",
49
+ meta: "Meta",
50
+ opt: "Alt",
51
+ option: "Alt",
52
+ "⌥": "Alt",
53
+ alt: "Alt",
54
+ shift: "Shift",
55
+ "⇧": "Shift",
56
+ esc: "Escape",
57
+ escape: "Escape"
58
+ };
59
+ function v(e) {
60
+ let t = e.trim().split(/\s+/).filter(Boolean);
61
+ if (t.length !== 0) return t.map((e) => _[e.toLowerCase()] ?? (e.length === 1 ? e.toUpperCase() : e)).join("+");
62
+ }
63
+ //#endregion
64
+ //#region src/components/toggle-group/toggle-group-size.ts
65
+ var y = l("md"), b = {
66
+ root: "imf-ui-toggle-module-root",
67
+ shortcut: "imf-ui-toggle-module-shortcut",
68
+ sizeSm: "imf-ui-toggle-module-sizeSm"
69
+ }, x = a(b.root, { variants: { size: {
70
+ sm: b.sizeSm,
71
+ md: null
72
+ } } }), S = 2;
73
+ function C(e) {
74
+ let t = 0;
75
+ return c.forEach(e, (e) => {
76
+ typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += S);
77
+ }), t;
78
+ }
79
+ function w({ style: e, shortcut: t, size: n, children: a, ...c }) {
80
+ let l = u(y), f = {
81
+ "--glyph-count": C(a),
82
+ "--max-glyphs": S
83
+ };
84
+ return /* @__PURE__ */ s(d, {
85
+ "aria-keyshortcuts": t ? v(t) : void 0,
86
+ ...c,
87
+ "data-imf-ui-component": "Toggle",
88
+ style: (t) => ({
89
+ ...f,
90
+ ...i(e, t)
91
+ }),
92
+ className: (e) => x({
93
+ size: n ?? l,
94
+ className: r(c.className, e)
95
+ }),
96
+ children: [a, t && /* @__PURE__ */ o(h, {
97
+ variant: "flat",
98
+ className: b.shortcut,
99
+ "aria-hidden": !0,
100
+ children: t
101
+ })]
102
+ });
103
+ }
104
+ var T = {
105
+ root: "imf-ui-toggle-group-module-root",
106
+ sizeSm: "imf-ui-toggle-group-module-sizeSm"
107
+ }, E = a(T.root, { variants: { size: {
108
+ sm: T.sizeSm,
109
+ md: null
110
+ } } });
111
+ function D({ size: e = "md", ...t }) {
112
+ return /* @__PURE__ */ o(y.Provider, {
113
+ value: e ?? "md",
114
+ children: /* @__PURE__ */ o(f, {
115
+ ...t,
116
+ "data-imf-ui-component": "ToggleGroup",
117
+ className: (n) => E({
118
+ size: e,
119
+ className: r(t.className, n)
120
+ })
121
+ })
122
+ });
123
+ }
124
+ //#endregion
125
+ export { h as a, g as i, w as n, v as r, D as t };
@@ -1,28 +1,18 @@
1
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
2
  //#region src/utils/resolve-state-props.ts
13
- function l(e, t) {
3
+ function s(e, t) {
14
4
  return e instanceof Function ? e(t) : e;
15
5
  }
16
- function u(e, t) {
17
- return l(e, t);
6
+ function c(e, t) {
7
+ return s(e, t);
18
8
  }
19
- function d(e, t) {
20
- return l(e, t);
9
+ function l(e, t) {
10
+ return s(e, t);
21
11
  }
22
12
  //#endregion
23
13
  //#region src/utils/item-parts.tsx
24
- var f = e(null);
25
- function p() {
14
+ var u = e(null);
15
+ function d() {
26
16
  let e = i(), t = i(), [n, r] = o(!1), [s, c] = o(!1);
27
17
  return {
28
18
  context: a(() => ({
@@ -37,13 +27,13 @@ function p() {
37
27
  }
38
28
  };
39
29
  }
40
- function m(e) {
41
- let t = n(f), i = e === "label" ? t?.setHasLabel : t?.setHasDescription;
30
+ function f(e) {
31
+ let t = n(u), i = e === "label" ? t?.setHasLabel : t?.setHasDescription;
42
32
  return r(() => (i?.(!0), () => i?.(!1)), [i]), e === "label" ? t?.labelId : t?.descriptionId;
43
33
  }
44
34
  //#endregion
45
35
  //#region src/utils/stable-popup-height.ts
46
- function h({ ref: e }) {
36
+ function p({ ref: e }) {
47
37
  let [n, r] = o();
48
38
  return {
49
39
  ref: t((t) => {
@@ -53,4 +43,4 @@ function h({ ref: e }) {
53
43
  };
54
44
  }
55
45
  //#endregion
56
- export { u as a, p as i, f as n, d as o, m as r, c as s, h as t };
46
+ export { c as a, d as i, u as n, l as o, f as r, p as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.11.1-dev.45.gf7b49f57",
3
+ "version": "0.11.1-dev.48.g0fcb0d30",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "homepage": "https://imfusion.com",
@@ -14160,5 +14160,112 @@
14160
14160
  ]
14161
14161
  },
14162
14162
  "subComponents": []
14163
+ },
14164
+ "layout-mode": {
14165
+ "root": {
14166
+ "name": "LayoutMode",
14167
+ "description": "LayoutMode - picks the ImFusion viewer's layout mode: Auto, Rows, Focus + stack, or Focus + rows.\n`compact` is a row of icon toggles; `labeled` stacks them vertically with each mode's name beside its icon.\n\nMust render inside `ImFusionReady`, within an `ImFusionProvider`.",
14168
+ "props": [
14169
+ {
14170
+ "name": "autoLabel",
14171
+ "required": false,
14172
+ "type": "string",
14173
+ "defaultValue": null,
14174
+ "description": "Name of the toggle that lets the viewer choose between Rows and Focus + stack."
14175
+ },
14176
+ {
14177
+ "name": "className",
14178
+ "required": false,
14179
+ "type": "string | ((state: ToggleGroupState) => string)",
14180
+ "defaultValue": null,
14181
+ "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
14182
+ },
14183
+ {
14184
+ "name": "disabled",
14185
+ "required": false,
14186
+ "type": "boolean",
14187
+ "defaultValue": "false",
14188
+ "description": "Whether the toggle group should ignore user interaction."
14189
+ },
14190
+ {
14191
+ "name": "focusPlusRowsLabel",
14192
+ "required": false,
14193
+ "type": "string",
14194
+ "defaultValue": null,
14195
+ "description": "Name of the toggle that shows one large view with the others in rows beside it."
14196
+ },
14197
+ {
14198
+ "name": "focusPlusStackLabel",
14199
+ "required": false,
14200
+ "type": "string",
14201
+ "defaultValue": null,
14202
+ "description": "Name of the toggle that shows one large view with the others stacked beside it."
14203
+ },
14204
+ {
14205
+ "name": "label",
14206
+ "required": false,
14207
+ "type": "string",
14208
+ "defaultValue": null,
14209
+ "description": "Accessible name of the group."
14210
+ },
14211
+ {
14212
+ "name": "loopFocus",
14213
+ "required": false,
14214
+ "type": "boolean",
14215
+ "defaultValue": "true",
14216
+ "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys."
14217
+ },
14218
+ {
14219
+ "name": "orientation",
14220
+ "required": false,
14221
+ "type": "Orientation",
14222
+ "defaultValue": "horizontal",
14223
+ "description": ""
14224
+ },
14225
+ {
14226
+ "name": "ref",
14227
+ "required": false,
14228
+ "type": "Ref<HTMLDivElement>",
14229
+ "defaultValue": null,
14230
+ "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}"
14231
+ },
14232
+ {
14233
+ "name": "render",
14234
+ "required": false,
14235
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToggleGroupState>",
14236
+ "defaultValue": null,
14237
+ "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."
14238
+ },
14239
+ {
14240
+ "name": "rowsLabel",
14241
+ "required": false,
14242
+ "type": "string",
14243
+ "defaultValue": null,
14244
+ "description": "Name of the toggle that arranges the views in up to two rows."
14245
+ },
14246
+ {
14247
+ "name": "size",
14248
+ "required": false,
14249
+ "type": "\"sm\" | \"md\" | null",
14250
+ "defaultValue": null,
14251
+ "description": ""
14252
+ },
14253
+ {
14254
+ "name": "style",
14255
+ "required": false,
14256
+ "type": "| CSSProperties\n| ((state: ToggleGroupState) => CSSProperties)",
14257
+ "defaultValue": null,
14258
+ "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
14259
+ },
14260
+ {
14261
+ "name": "variant",
14262
+ "required": false,
14263
+ "type": "\"compact\" | \"labeled\" | null",
14264
+ "defaultValue": null,
14265
+ "description": ""
14266
+ }
14267
+ ]
14268
+ },
14269
+ "subComponents": []
14163
14270
  }
14164
14271
  }
@@ -157,6 +157,12 @@ Single-line text input for form data entry. Also called a text field; it support
157
157
  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.
158
158
  - 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)
159
159
 
160
+ ## LayoutMode
161
+ - category: Inputs, status: experimental
162
+ Picker bound to the ImFusion viewer's layout mode: Auto, Rows, Focus + stack, or Focus + rows, as a compact icon row or a labeled vertical list. Also called a layout or view arrangement switch; for a segmented choice not tied to the SDK, use ToggleGroup.
163
+ - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .layout-mode (jq: jq '.layout-mode' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
164
+ - further reading (usage/anatomy, not props): https://docs.imfusion.com/
165
+
160
166
  ## Logo
161
167
  - category: Display, status: stable
162
168
  Renders a logo from a URL or inline React element with consistent sizing. Also called a wordmark or brand mark.
@@ -46,6 +46,7 @@ sections one to one — change a topic's sections and this file follows in the s
46
46
  - [ ] Grouping
47
47
  - [ ] One file or a folder
48
48
  - [ ] Colocation
49
+ - [ ] Semantic elements
49
50
 
50
51
  ## TypeScript & code style — `typescript`
51
52
 
@@ -127,7 +128,8 @@ sections one to one — change a topic's sections and this file follows in the s
127
128
  ## Assets — `assets`
128
129
 
129
130
  - [ ] Importing
130
- - [ ] Photographs: WebP
131
+ - [ ] Photographs: AVIF and WebP
132
+ - [ ] Loading
131
133
  - [ ] Other formats
132
134
  - [ ] Scope
133
135