@imfusion/web-ui 0.11.1-dev.42.ge966e634 → 0.11.1-dev.45.gf7b49f57

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.
@@ -13,16 +13,16 @@ var g = {
13
13
  icon: "imf-ui-kbd-module-icon",
14
14
  primary: "imf-ui-kbd-module-primary",
15
15
  root: "imf-ui-kbd-module-root"
16
- }, ne = o(g.root, { variants: { variant: {
16
+ }, _ = o(g.root, { variants: { variant: {
17
17
  default: null,
18
18
  primary: g.primary,
19
19
  flat: g.flat
20
20
  } } });
21
- function _({ variant: e = "default", icon: t = !1, children: n, ...a }) {
21
+ function v({ variant: e = "default", icon: t = !1, children: n, ...a }) {
22
22
  return /* @__PURE__ */ l("kbd", {
23
23
  ...a,
24
24
  "data-imf-ui-component": "Kbd",
25
- className: ne({
25
+ className: _({
26
26
  variant: e,
27
27
  className: a.className
28
28
  }),
@@ -36,14 +36,14 @@ function _({ variant: e = "default", icon: t = !1, children: n, ...a }) {
36
36
  }
37
37
  //#endregion
38
38
  //#region src/components/kbd/kbd.meta.ts
39
- var v = {
39
+ var y = {
40
40
  name: "Kbd",
41
41
  category: a.display,
42
42
  status: "experimental",
43
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.",
44
44
  origin: "native",
45
45
  internalDependencies: ["Icon"]
46
- }, re = {
46
+ }, ne = {
47
47
  ctrl: "Control",
48
48
  control: "Control",
49
49
  cmd: "Meta",
@@ -58,95 +58,159 @@ var v = {
58
58
  esc: "Escape",
59
59
  escape: "Escape"
60
60
  };
61
- function y(e) {
61
+ function b(e) {
62
62
  let t = e.trim().split(/\s+/).filter(Boolean);
63
- if (t.length !== 0) return t.map((e) => re[e.toLowerCase()] ?? (e.length === 1 ? e.toUpperCase() : e)).join("+");
63
+ if (t.length !== 0) return t.map((e) => ne[e.toLowerCase()] ?? (e.length === 1 ? e.toUpperCase() : e)).join("+");
64
64
  }
65
65
  //#endregion
66
66
  //#region src/components/toggle-group/toggle-group-size.ts
67
- var b = d("md"), x = {
67
+ var x = d("md"), S = {
68
68
  root: "imf-ui-toggle-module-root",
69
69
  shortcut: "imf-ui-toggle-module-shortcut",
70
70
  sizeSm: "imf-ui-toggle-module-sizeSm"
71
- }, ie = o(x.root, { variants: { size: {
72
- sm: x.sizeSm,
71
+ }, re = o(S.root, { variants: { size: {
72
+ sm: S.sizeSm,
73
73
  md: null
74
- } } }), S = 2;
75
- function ae(e) {
74
+ } } }), C = 2;
75
+ function ie(e) {
76
76
  let t = 0;
77
77
  return u.forEach(e, (e) => {
78
- typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += S);
78
+ typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += C);
79
79
  }), t;
80
80
  }
81
- function C({ style: n, shortcut: r, size: i, children: a, ...o }) {
82
- let s = p(b), u = {
83
- "--glyph-count": ae(a),
84
- "--max-glyphs": S
81
+ function w({ style: n, shortcut: r, size: i, children: a, ...o }) {
82
+ let s = p(x), u = {
83
+ "--glyph-count": ie(a),
84
+ "--max-glyphs": C
85
85
  };
86
86
  return /* @__PURE__ */ l(ee, {
87
- "aria-keyshortcuts": r ? y(r) : void 0,
87
+ "aria-keyshortcuts": r ? b(r) : void 0,
88
88
  ...o,
89
89
  "data-imf-ui-component": "Toggle",
90
90
  style: (e) => ({
91
91
  ...u,
92
92
  ...t(n, e)
93
93
  }),
94
- className: (t) => ie({
94
+ className: (t) => re({
95
95
  size: i ?? s,
96
96
  className: e(o.className, t)
97
97
  }),
98
- children: [a, r && /* @__PURE__ */ c(_, {
98
+ children: [a, r && /* @__PURE__ */ c(v, {
99
99
  variant: "flat",
100
- className: x.shortcut,
100
+ className: S.shortcut,
101
101
  "aria-hidden": !0,
102
102
  children: r
103
103
  })]
104
104
  });
105
105
  }
106
- var w = {
106
+ var T = {
107
107
  root: "imf-ui-toggle-group-module-root",
108
108
  sizeSm: "imf-ui-toggle-group-module-sizeSm"
109
- }, T = o(w.root, { variants: { size: {
110
- sm: w.sizeSm,
109
+ }, E = o(T.root, { variants: { size: {
110
+ sm: T.sizeSm,
111
111
  md: null
112
112
  } } });
113
- function E({ size: t = "md", ...n }) {
114
- return /* @__PURE__ */ c(b.Provider, {
113
+ function D({ size: t = "md", ...n }) {
114
+ return /* @__PURE__ */ c(x.Provider, {
115
115
  value: t ?? "md",
116
116
  children: /* @__PURE__ */ c(te, {
117
117
  ...n,
118
118
  "data-imf-ui-component": "ToggleGroup",
119
- className: (r) => T({
119
+ className: (r) => E({
120
120
  size: t,
121
121
  className: e(n.className, r)
122
122
  })
123
123
  })
124
124
  });
125
125
  }
126
- var D = {
126
+ var O = {
127
+ alignCenter: "imf-ui-stack-module-alignCenter",
128
+ alignEnd: "imf-ui-stack-module-alignEnd",
129
+ alignStart: "imf-ui-stack-module-alignStart",
130
+ alignStretch: "imf-ui-stack-module-alignStretch",
131
+ gap0: "imf-ui-stack-module-gap0",
132
+ gap1: "imf-ui-stack-module-gap1",
133
+ gap10: "imf-ui-stack-module-gap10",
134
+ gap2: "imf-ui-stack-module-gap2",
135
+ gap3: "imf-ui-stack-module-gap3",
136
+ gap4: "imf-ui-stack-module-gap4",
137
+ gap5: "imf-ui-stack-module-gap5",
138
+ gap6: "imf-ui-stack-module-gap6",
139
+ gap7: "imf-ui-stack-module-gap7",
140
+ gap8: "imf-ui-stack-module-gap8",
141
+ gap9: "imf-ui-stack-module-gap9",
142
+ justifyAround: "imf-ui-stack-module-justifyAround",
143
+ justifyBetween: "imf-ui-stack-module-justifyBetween",
144
+ justifyCenter: "imf-ui-stack-module-justifyCenter",
145
+ justifyEnd: "imf-ui-stack-module-justifyEnd",
146
+ justifyEvenly: "imf-ui-stack-module-justifyEvenly",
147
+ justifyStart: "imf-ui-stack-module-justifyStart",
148
+ root: "imf-ui-stack-module-root"
149
+ }, k = o(O.root, { variants: {
150
+ gap: {
151
+ 0: O.gap0,
152
+ 1: O.gap1,
153
+ 2: O.gap2,
154
+ 3: O.gap3,
155
+ 4: O.gap4,
156
+ 5: O.gap5,
157
+ 6: O.gap6,
158
+ 7: O.gap7,
159
+ 8: O.gap8,
160
+ 9: O.gap9,
161
+ 10: O.gap10
162
+ },
163
+ align: {
164
+ start: O.alignStart,
165
+ center: O.alignCenter,
166
+ end: O.alignEnd,
167
+ stretch: O.alignStretch
168
+ },
169
+ justify: {
170
+ start: O.justifyStart,
171
+ center: O.justifyCenter,
172
+ end: O.justifyEnd,
173
+ between: O.justifyBetween,
174
+ around: O.justifyAround,
175
+ evenly: O.justifyEvenly
176
+ }
177
+ } });
178
+ function ae({ gap: e = "4", align: t = "stretch", justify: n = "start", ...r }) {
179
+ return /* @__PURE__ */ c("div", {
180
+ ...r,
181
+ "data-imf-ui-component": "Stack",
182
+ className: k({
183
+ gap: e,
184
+ align: t,
185
+ justify: n,
186
+ className: r.className
187
+ })
188
+ });
189
+ }
190
+ var A = {
127
191
  root: "imf-ui-switch-module-root",
128
192
  thumb: "imf-ui-switch-module-thumb"
129
193
  }, oe = /* @__PURE__ */ n({
130
- Root: () => O,
131
- Thumb: () => k
132
- }), se = o(D.root), ce = o(D.thumb);
133
- function O(t) {
194
+ Root: () => j,
195
+ Thumb: () => M
196
+ }), se = o(A.root), ce = o(A.thumb);
197
+ function j(t) {
134
198
  return /* @__PURE__ */ c(m.Root, {
135
199
  ...t,
136
200
  "data-imf-ui-component": "Switch.Root",
137
201
  className: (n) => se({ className: e(t.className, n) })
138
202
  });
139
203
  }
140
- O.displayName = "Switch.Root";
141
- function k(t) {
204
+ j.displayName = "Switch.Root";
205
+ function M(t) {
142
206
  return /* @__PURE__ */ c(m.Thumb, {
143
207
  ...t,
144
208
  "data-imf-ui-component": "Switch.Thumb",
145
209
  className: (n) => ce({ className: e(t.className, n) })
146
210
  });
147
211
  }
148
- k.displayName = "Switch.Thumb";
149
- var A = {
212
+ M.displayName = "Switch.Thumb";
213
+ var N = {
150
214
  alignCenter: "imf-ui-row-module-alignCenter",
151
215
  alignEnd: "imf-ui-row-module-alignEnd",
152
216
  alignStart: "imf-ui-row-module-alignStart",
@@ -169,77 +233,8 @@ var A = {
169
233
  justifyStart: "imf-ui-row-module-justifyStart",
170
234
  root: "imf-ui-row-module-root",
171
235
  wrap: "imf-ui-row-module-wrap"
172
- }, j = o(A.root, { variants: {
173
- gap: {
174
- 1: A.gap1,
175
- 2: A.gap2,
176
- 3: A.gap3,
177
- 4: A.gap4,
178
- 5: A.gap5,
179
- 6: A.gap6,
180
- 7: A.gap7,
181
- 8: A.gap8,
182
- 9: A.gap9,
183
- 10: A.gap10
184
- },
185
- align: {
186
- start: A.alignStart,
187
- center: A.alignCenter,
188
- end: A.alignEnd,
189
- stretch: A.alignStretch
190
- },
191
- justify: {
192
- start: A.justifyStart,
193
- center: A.justifyCenter,
194
- end: A.justifyEnd,
195
- between: A.justifyBetween,
196
- around: A.justifyAround,
197
- evenly: A.justifyEvenly
198
- },
199
- wrap: {
200
- true: A.wrap,
201
- false: null
202
- }
203
- } });
204
- function M({ gap: e = "2", align: t = "stretch", justify: n = "start", wrap: r = !1, ...i }) {
205
- return /* @__PURE__ */ c("div", {
206
- ...i,
207
- "data-imf-ui-component": "Row",
208
- className: j({
209
- gap: e,
210
- align: t,
211
- justify: n,
212
- wrap: r,
213
- className: i.className
214
- })
215
- });
216
- }
217
- var N = {
218
- alignCenter: "imf-ui-stack-module-alignCenter",
219
- alignEnd: "imf-ui-stack-module-alignEnd",
220
- alignStart: "imf-ui-stack-module-alignStart",
221
- alignStretch: "imf-ui-stack-module-alignStretch",
222
- gap0: "imf-ui-stack-module-gap0",
223
- gap1: "imf-ui-stack-module-gap1",
224
- gap10: "imf-ui-stack-module-gap10",
225
- gap2: "imf-ui-stack-module-gap2",
226
- gap3: "imf-ui-stack-module-gap3",
227
- gap4: "imf-ui-stack-module-gap4",
228
- gap5: "imf-ui-stack-module-gap5",
229
- gap6: "imf-ui-stack-module-gap6",
230
- gap7: "imf-ui-stack-module-gap7",
231
- gap8: "imf-ui-stack-module-gap8",
232
- gap9: "imf-ui-stack-module-gap9",
233
- justifyAround: "imf-ui-stack-module-justifyAround",
234
- justifyBetween: "imf-ui-stack-module-justifyBetween",
235
- justifyCenter: "imf-ui-stack-module-justifyCenter",
236
- justifyEnd: "imf-ui-stack-module-justifyEnd",
237
- justifyEvenly: "imf-ui-stack-module-justifyEvenly",
238
- justifyStart: "imf-ui-stack-module-justifyStart",
239
- root: "imf-ui-stack-module-root"
240
236
  }, P = o(N.root, { variants: {
241
237
  gap: {
242
- 0: N.gap0,
243
238
  1: N.gap1,
244
239
  2: N.gap2,
245
240
  3: N.gap3,
@@ -264,17 +259,22 @@ var N = {
264
259
  between: N.justifyBetween,
265
260
  around: N.justifyAround,
266
261
  evenly: N.justifyEvenly
262
+ },
263
+ wrap: {
264
+ true: N.wrap,
265
+ false: null
267
266
  }
268
267
  } });
269
- function F({ gap: e = "4", align: t = "stretch", justify: n = "start", ...r }) {
268
+ function F({ gap: e = "2", align: t = "stretch", justify: n = "start", wrap: r = !1, ...i }) {
270
269
  return /* @__PURE__ */ c("div", {
271
- ...r,
272
- "data-imf-ui-component": "Stack",
270
+ ...i,
271
+ "data-imf-ui-component": "Row",
273
272
  className: P({
274
273
  gap: e,
275
274
  align: t,
276
275
  justify: n,
277
- className: r.className
276
+ wrap: r,
277
+ className: i.className
278
278
  })
279
279
  });
280
280
  }
@@ -316,17 +316,17 @@ var I = {
316
316
  } } }), W = o(null, { variants: { appearance: {
317
317
  boxed: z.indicator,
318
318
  underline: z.indicatorUnderline
319
- } } }), le = o(z.panelViewport, { variants: { appearance: {
319
+ } } }), G = o(z.panelViewport, { variants: { appearance: {
320
320
  boxed: null,
321
321
  underline: z.panelViewportUnderline
322
- } } }), ue = o(z.panel, { variants: { appearance: {
322
+ } } }), le = o(z.panel, { variants: { appearance: {
323
323
  boxed: null,
324
324
  underline: z.panelUnderline
325
- } } }), G = d("boxed");
326
- function K(e, t) {
325
+ } } }), K = d("boxed");
326
+ function q(e, t) {
327
327
  typeof e == "function" ? e(t) : e && (e.current = t);
328
328
  }
329
- function q(e) {
329
+ function ue(e) {
330
330
  let t = new ResizeObserver(() => {
331
331
  let t = e.dataset.orientation === "vertical" ? e.scrollHeight > e.clientHeight : e.scrollWidth > e.clientWidth;
332
332
  e.toggleAttribute("data-overflowing", t);
@@ -340,7 +340,7 @@ function q(e) {
340
340
  }
341
341
  function J({ appearance: t = "boxed", ...n }) {
342
342
  let r = n.orientation === "vertical" ? "boxed" : t;
343
- return /* @__PURE__ */ c(G, {
343
+ return /* @__PURE__ */ c(K, {
344
344
  value: r,
345
345
  children: /* @__PURE__ */ c(h.Root, {
346
346
  ...n,
@@ -351,12 +351,12 @@ function J({ appearance: t = "boxed", ...n }) {
351
351
  }
352
352
  J.displayName = "Tabs.Root";
353
353
  function Y({ fill: t = !1, ref: n, ...r }) {
354
- let i = p(G), a = f((e) => {
354
+ let i = p(K), a = f((e) => {
355
355
  if (!e) return;
356
- K(n, e);
357
- let t = q(e);
356
+ q(n, e);
357
+ let t = ue(e);
358
358
  return () => {
359
- t(), K(n, null);
359
+ t(), q(n, null);
360
360
  };
361
361
  }, [n]);
362
362
  return /* @__PURE__ */ c(h.List, {
@@ -372,7 +372,7 @@ function Y({ fill: t = !1, ref: n, ...r }) {
372
372
  }
373
373
  Y.displayName = "Tabs.List";
374
374
  function X(t) {
375
- let n = p(G);
375
+ let n = p(K);
376
376
  return /* @__PURE__ */ c(h.Tab, {
377
377
  ...t,
378
378
  "data-imf-ui-component": "Tabs.Tab",
@@ -384,7 +384,7 @@ function X(t) {
384
384
  }
385
385
  X.displayName = "Tabs.Tab";
386
386
  function Z(t) {
387
- let n = p(G);
387
+ let n = p(K);
388
388
  return /* @__PURE__ */ c(h.Indicator, {
389
389
  ...t,
390
390
  "data-imf-ui-component": "Tabs.Indicator",
@@ -396,11 +396,11 @@ function Z(t) {
396
396
  }
397
397
  Z.displayName = "Tabs.Indicator";
398
398
  function Q(e) {
399
- let t = p(G);
399
+ let t = p(K);
400
400
  return /* @__PURE__ */ c("div", {
401
401
  ...e,
402
402
  "data-imf-ui-component": "Tabs.PanelViewport",
403
- className: le({
403
+ className: G({
404
404
  appearance: t,
405
405
  className: e.className
406
406
  })
@@ -408,11 +408,11 @@ function Q(e) {
408
408
  }
409
409
  Q.displayName = "Tabs.PanelViewport";
410
410
  function $(t) {
411
- let n = p(G);
411
+ let n = p(K);
412
412
  return /* @__PURE__ */ c(h.Panel, {
413
413
  ...t,
414
414
  "data-imf-ui-component": "Tabs.Panel",
415
- className: (r) => ue({
415
+ className: (r) => le({
416
416
  appearance: n,
417
417
  className: e(t.className, r)
418
418
  })
@@ -420,4 +420,4 @@ function $(t) {
420
420
  }
421
421
  $.displayName = "Tabs.Panel";
422
422
  //#endregion
423
- export { y as _, J as a, R as c, M as d, O as f, C as g, E as h, Q as i, L as l, oe as m, Y as n, X as o, k as p, $ as r, B as s, Z as t, F as u, v, _ as y };
423
+ export { b as _, J as a, R as c, j as d, M as f, w as g, D as h, Q as i, L as l, ae as m, Y as n, X as o, oe as p, $ as r, B as s, Z as t, F as u, y as v, v as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.11.1-dev.42.ge966e634",
3
+ "version": "0.11.1-dev.45.gf7b49f57",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "homepage": "https://imfusion.com",