@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.
@@ -1,6 +1,6 @@
1
1
  import { s as e } from "../utils-RZJAXfcf.js";
2
2
  import { t } from "../meta-V_KyLeGn.js";
3
- import { i as n, n as r, r as i } from "../code-BXlEW54h.js";
3
+ import { i as n, n as r, r as i } from "../code-BX1Humcy.js";
4
4
  import { jsx as a } from "react/jsx-runtime";
5
5
  import { cloneElement as o, useMemo as s } from "react";
6
6
  import { createHighlighter as c, defineLanguage as l, renderNodesToHtml as u, renderTokens as d } from "@tanstack/highlight/core";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../meta-V_KyLeGn.js";
2
- import { a as t, d as n, f as r, g as i, h as a, i as o, n as s, o as c, p as l, r as u, t as d, u as f } from "../tabs-D5DTlk0d.js";
3
- import { a as p, i as m, n as h, o as g, r as _, s as v, t as y } from "../slider-BKDxeTmk.js";
4
- import { t as b } from "../scroll-area-CUo1NBaW.js";
2
+ import { a as t, d as n, f as r, g as i, h as a, i as o, m as s, n as c, o as l, r as u, t as d, u as f } from "../tabs-CLeLjFNy.js";
3
+ import { t as p } from "../scroll-area-CUo1NBaW.js";
4
+ import { a as m, i as h, n as g, o as _, r as v, s as y, t as b } from "../slider-BKDxeTmk.js";
5
5
  import { cva as x } from "class-variance-authority";
6
6
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
7
7
  import { useId as T, useMemo as E, useState as D } from "react";
@@ -74,29 +74,29 @@ function I(e, t) {
74
74
  //#endregion
75
75
  //#region src/integrations/image-display-options/image-display-options-view.tsx
76
76
  var L = x(A.root);
77
- function R({ spec: e, value: t, row: r, onChange: i }) {
78
- let a = /* @__PURE__ */ w(m, {
77
+ function R({ spec: e, value: t, row: n, onChange: r }) {
78
+ let i = /* @__PURE__ */ w(h, {
79
79
  value: t,
80
80
  min: e.min,
81
81
  max: e.max,
82
82
  step: e.step,
83
83
  format: e.format,
84
84
  onValueChange: (e) => {
85
- i(typeof e == "number" ? e : e[0]);
85
+ r(typeof e == "number" ? e : e[0]);
86
86
  },
87
- children: [/* @__PURE__ */ w(n, {
87
+ children: [/* @__PURE__ */ w(f, {
88
88
  justify: "between",
89
- children: [/* @__PURE__ */ C(_, { children: e.label }), /* @__PURE__ */ C(v, {})]
90
- }), /* @__PURE__ */ C(y, { children: /* @__PURE__ */ w(g, { children: [/* @__PURE__ */ C(h, {}), /* @__PURE__ */ C(p, { "aria-label": e.label })] }) })]
89
+ children: [/* @__PURE__ */ C(v, { children: e.label }), /* @__PURE__ */ C(y, {})]
90
+ }), /* @__PURE__ */ C(b, { children: /* @__PURE__ */ w(_, { children: [/* @__PURE__ */ C(g, {}), /* @__PURE__ */ C(m, { "aria-label": e.label })] }) })]
91
91
  });
92
- return r ? /* @__PURE__ */ C("div", {
92
+ return n ? /* @__PURE__ */ C("div", {
93
93
  className: A.rowField,
94
- children: a
95
- }) : a;
94
+ children: i
95
+ }) : i;
96
96
  }
97
97
  function z({ checked: e, row: t, onChange: i }) {
98
98
  let a = T();
99
- return /* @__PURE__ */ w(n, {
99
+ return /* @__PURE__ */ w(f, {
100
100
  align: "center",
101
101
  justify: t ? "start" : "between",
102
102
  gap: "2",
@@ -105,13 +105,13 @@ function z({ checked: e, row: t, onChange: i }) {
105
105
  id: a,
106
106
  className: A.invertLabel,
107
107
  children: "Invert"
108
- }), /* @__PURE__ */ C(r, {
108
+ }), /* @__PURE__ */ C(n, {
109
109
  "aria-labelledby": a,
110
110
  checked: e,
111
111
  onCheckedChange: (e) => {
112
112
  i(e);
113
113
  },
114
- children: /* @__PURE__ */ C(l, {})
114
+ children: /* @__PURE__ */ C(r, {})
115
115
  })]
116
116
  });
117
117
  }
@@ -150,65 +150,65 @@ function V({ dimension: e, fields: t, options: n, row: r, onChange: i }) {
150
150
  }
151
151
  })] });
152
152
  }
153
- function H({ variant: e = "default", options: r, intensityRange: i, ranges: a, onOptionsChange: l, className: p, ...m }) {
154
- let [h, g] = D("2d"), _ = P(i, a), v = (e) => {
155
- g(e === "3d" ? "3d" : "2d");
153
+ function H({ variant: e = "default", options: n, intensityRange: r, ranges: i, onOptionsChange: a, className: m, ...h }) {
154
+ let [g, _] = D("2d"), v = P(r, i), y = (e) => {
155
+ _(e === "3d" ? "3d" : "2d");
156
156
  };
157
157
  return /* @__PURE__ */ C("div", {
158
- ...m,
158
+ ...h,
159
159
  "data-imf-ui-component": "ImageDisplayOptions",
160
- className: L({ className: p }),
160
+ className: L({ className: m }),
161
161
  children: e === "default" ? /* @__PURE__ */ w(t, {
162
- value: h,
163
- onValueChange: v,
164
- children: [/* @__PURE__ */ w(s, { children: [
165
- /* @__PURE__ */ C(c, {
162
+ value: g,
163
+ onValueChange: y,
164
+ children: [/* @__PURE__ */ w(c, { children: [
165
+ /* @__PURE__ */ C(l, {
166
166
  value: "2d",
167
167
  children: "2D Slices"
168
168
  }),
169
- /* @__PURE__ */ C(c, {
169
+ /* @__PURE__ */ C(l, {
170
170
  value: "3d",
171
171
  children: "3D Volume"
172
172
  }),
173
173
  /* @__PURE__ */ C(d, {})
174
174
  ] }), /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(u, {
175
175
  value: "2d",
176
- children: /* @__PURE__ */ C(f, {
176
+ children: /* @__PURE__ */ C(s, {
177
177
  gap: "3",
178
178
  children: /* @__PURE__ */ C(V, {
179
179
  dimension: "2d",
180
- fields: _["2d"],
181
- options: r,
180
+ fields: v["2d"],
181
+ options: n,
182
182
  row: !1,
183
- onChange: l
183
+ onChange: a
184
184
  })
185
185
  })
186
186
  }), /* @__PURE__ */ C(u, {
187
187
  value: "3d",
188
- children: /* @__PURE__ */ C(f, {
188
+ children: /* @__PURE__ */ C(s, {
189
189
  gap: "3",
190
190
  children: /* @__PURE__ */ C(V, {
191
191
  dimension: "3d",
192
- fields: _["3d"],
193
- options: r,
192
+ fields: v["3d"],
193
+ options: n,
194
194
  row: !1,
195
- onChange: l
195
+ onChange: a
196
196
  })
197
197
  })
198
198
  })] })]
199
199
  }) : e === "horizontal" ? /* @__PURE__ */ w(t, {
200
200
  className: A.horizontalTabs,
201
201
  orientation: "vertical",
202
- value: h,
203
- onValueChange: v,
204
- children: [/* @__PURE__ */ w(s, {
202
+ value: g,
203
+ onValueChange: y,
204
+ children: [/* @__PURE__ */ w(c, {
205
205
  fill: !0,
206
206
  children: [
207
- /* @__PURE__ */ C(c, {
207
+ /* @__PURE__ */ C(l, {
208
208
  value: "2d",
209
209
  children: "2D"
210
210
  }),
211
- /* @__PURE__ */ C(c, {
211
+ /* @__PURE__ */ C(l, {
212
212
  value: "3d",
213
213
  children: "3D"
214
214
  }),
@@ -218,55 +218,55 @@ function H({ variant: e = "default", options: r, intensityRange: i, ranges: a, o
218
218
  className: A.horizontalPanel,
219
219
  children: [/* @__PURE__ */ C(u, {
220
220
  value: "2d",
221
- children: /* @__PURE__ */ C(b, {
221
+ children: /* @__PURE__ */ C(p, {
222
222
  orientation: "horizontal",
223
223
  className: A.strip,
224
- children: /* @__PURE__ */ C(n, {
224
+ children: /* @__PURE__ */ C(f, {
225
225
  align: "center",
226
226
  gap: "3",
227
227
  children: /* @__PURE__ */ C(V, {
228
228
  dimension: "2d",
229
- fields: _["2d"],
230
- options: r,
229
+ fields: v["2d"],
230
+ options: n,
231
231
  row: !0,
232
- onChange: l
232
+ onChange: a
233
233
  })
234
234
  })
235
235
  })
236
236
  }), /* @__PURE__ */ C(u, {
237
237
  value: "3d",
238
- children: /* @__PURE__ */ C(b, {
238
+ children: /* @__PURE__ */ C(p, {
239
239
  orientation: "horizontal",
240
240
  className: A.strip,
241
- children: /* @__PURE__ */ C(n, {
241
+ children: /* @__PURE__ */ C(f, {
242
242
  align: "center",
243
243
  gap: "3",
244
244
  children: /* @__PURE__ */ C(V, {
245
245
  dimension: "3d",
246
- fields: _["3d"],
247
- options: r,
246
+ fields: v["3d"],
247
+ options: n,
248
248
  row: !0,
249
- onChange: l
249
+ onChange: a
250
250
  })
251
251
  })
252
252
  })
253
253
  })]
254
254
  })]
255
- }) : /* @__PURE__ */ C(b, {
255
+ }) : /* @__PURE__ */ C(p, {
256
256
  orientation: "horizontal",
257
257
  className: A.strip,
258
- children: /* @__PURE__ */ w(n, {
258
+ children: /* @__PURE__ */ w(f, {
259
259
  align: "center",
260
260
  gap: "3",
261
261
  children: [/* @__PURE__ */ C(B, {
262
- active: h,
263
- onChange: g
262
+ active: g,
263
+ onChange: _
264
264
  }), /* @__PURE__ */ C(V, {
265
- dimension: h,
266
- fields: _[h],
267
- options: r,
265
+ dimension: g,
266
+ fields: v[g],
267
+ options: n,
268
268
  row: !0,
269
- onChange: l
269
+ onChange: a
270
270
  })]
271
271
  })
272
272
  })