@owp/core 2.5.9 → 2.5.10

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.
Files changed (42) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index15.js +2 -2
  6. package/dist/_virtual/index20.js +2 -2
  7. package/dist/_virtual/index21.js +2 -2
  8. package/dist/_virtual/index22.js +2 -2
  9. package/dist/_virtual/index5.js +2 -2
  10. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +195 -147
  11. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  12. package/dist/features/themePreview/components/ThemePreviewColorField.js +10 -11
  13. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  14. package/dist/features/themePreview/components/ThemePreviewControls.js +232 -198
  15. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
  16. package/dist/features/themePreview/hooks/useThemePreview.js +214 -199
  17. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  18. package/dist/features/themePreview/utils/themePreviewSettings.js +188 -151
  19. package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -1
  20. package/dist/features/themePreview.js +18 -17
  21. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  22. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  23. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  24. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  25. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  37. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  38. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  39. package/dist/owp-app.css +1 -1
  40. package/dist/types/features/themePreview/utils/index.d.ts +1 -1
  41. package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +11 -1
  42. package/package.json +1 -1
@@ -1,74 +1,75 @@
1
- var oe = Object.defineProperty;
2
- var s = (r, d) => oe(r, "name", { value: d, configurable: !0 });
3
- import { jsx as o, jsxs as m } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
- import { ButtonBase as te, Typography as g, Paper as $, TextField as L, MenuItem as S, Divider as le, Box as ne, IconButton as ae, FormControlLabel as ie, Checkbox as se } from "@mui/material";
5
- import de from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js";
6
- import { ThemeProvider as ce, createTheme as he } from "@mui/material/styles";
7
- import { useState as ue, useMemo as A } from "react";
8
- import { ThemePreviewColorField as _ } from "./ThemePreviewColorField.js";
9
- import { getThemePreviewPresetOptionsByMode as me, THEME_PREVIEW_CUSTOM_PRESET_KEY as O, isThemePreviewCustomSection as fe, getThemePreviewPaletteValue as G } from "../utils/themePreviewSettings.js";
10
- import { themePreviewFieldGroupsBySection as pe, themePreviewSectionOptions as q } from "../utils/themePreviewDefinitions.js";
11
- import { deriveThemePreviewPaletteGroupValues as be } from "../utils/color.js";
12
- function Ce(r) {
1
+ var ie = Object.defineProperty;
2
+ var s = (r, d) => ie(r, "name", { value: d, configurable: !0 });
3
+ import { jsx as o, jsxs as u } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
+ import { MenuItem as W, ButtonBase as ae, Typography as x, Paper as A, TextField as Y, Divider as Z, Box as se, IconButton as de, FormControlLabel as ce, Checkbox as he } from "@mui/material";
5
+ import ue from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js";
6
+ import { ThemeProvider as me, createTheme as fe } from "@mui/material/styles";
7
+ import { useState as pe, useMemo as T } from "react";
8
+ import { toolbarCuratedPresetKeys as be, designSystemPresetKeys as Ce } from "../configs/presets.js";
9
+ import { ThemePreviewColorField as q } from "./ThemePreviewColorField.js";
10
+ import { getThemePreviewPresetOptionsByMode as ve, THEME_PREVIEW_CUSTOM_PRESET_KEY as J, isThemePreviewCustomSection as ge, getThemePreviewPaletteValue as G } from "../utils/themePreviewSettings.js";
11
+ import { themePreviewFieldGroupsBySection as xe, themePreviewSectionOptions as X } from "../utils/themePreviewDefinitions.js";
12
+ import { deriveThemePreviewPaletteGroupValues as ye } from "../utils/color.js";
13
+ function Pe(r) {
13
14
  return r.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (d) => d.toUpperCase());
14
15
  }
15
- s(Ce, "getThemePreviewFieldClusterLabel");
16
- function ve(r) {
17
- const d = r.find((p) => p.path.endsWith(".main")), b = r.find((p) => p.path.endsWith(".light")), f = r.find((p) => p.path.endsWith(".dark")), c = r.find((p) => p.path.endsWith(".contrastText"));
18
- return !d || !b && !f && !c ? null : {
16
+ s(Pe, "getThemePreviewFieldClusterLabel");
17
+ function ke(r) {
18
+ const d = r.find((f) => f.path.endsWith(".main")), p = r.find((f) => f.path.endsWith(".light")), m = r.find((f) => f.path.endsWith(".dark")), c = r.find((f) => f.path.endsWith(".contrastText"));
19
+ return !d || !p && !m && !c ? null : {
19
20
  mainPath: d.path,
20
- lightPath: b == null ? void 0 : b.path,
21
- darkPath: f == null ? void 0 : f.path,
21
+ lightPath: p == null ? void 0 : p.path,
22
+ darkPath: m == null ? void 0 : m.path,
22
23
  contrastTextPath: c == null ? void 0 : c.path
23
24
  };
24
25
  }
25
- s(ve, "getThemePreviewAutoDerivedFieldPaths");
26
- function xe(r) {
26
+ s(ke, "getThemePreviewAutoDerivedFieldPaths");
27
+ function we(r) {
27
28
  const d = r.reduce(
28
29
  (t, h) => {
29
- const n = h.path.split(".")[0] ?? "";
30
- return n && (t[n] || (t[n] = []), t[n].push(h)), t;
30
+ const i = h.path.split(".")[0] ?? "";
31
+ return i && (t[i] || (t[i] = []), t[i].push(h)), t;
31
32
  },
32
33
  {}
33
- ), b = Object.fromEntries(
34
+ ), p = Object.fromEntries(
34
35
  Object.entries(d).map(([t, h]) => [
35
36
  t,
36
37
  h.length
37
38
  ])
38
- ), f = new Set(
39
- Object.entries(b).filter(([, t]) => t > 1).map(([t]) => t)
39
+ ), m = new Set(
40
+ Object.entries(p).filter(([, t]) => t > 1).map(([t]) => t)
40
41
  ), c = r.some(
41
- (t) => !f.has(t.path.split(".")[0] ?? "")
42
+ (t) => !m.has(t.path.split(".")[0] ?? "")
42
43
  );
43
- if (!(f.size > 1 || c))
44
+ if (!(m.size > 1 || c))
44
45
  return r.map((t) => ({
45
46
  key: t.path,
46
47
  fields: [t]
47
48
  }));
48
- const B = /* @__PURE__ */ new Set();
49
+ const F = /* @__PURE__ */ new Set();
49
50
  return r.reduce((t, h) => {
50
- const n = h.path.split(".")[0] ?? "";
51
- if (!f.has(n))
51
+ const i = h.path.split(".")[0] ?? "";
52
+ if (!m.has(i))
52
53
  return t.push({
53
54
  key: h.path,
54
55
  fields: [h]
55
56
  }), t;
56
- if (B.has(n))
57
+ if (F.has(i))
57
58
  return t;
58
- B.add(n);
59
- const F = d[n] ?? [h];
59
+ F.add(i);
60
+ const M = d[i] ?? [h];
60
61
  return t.push({
61
- key: n,
62
- label: Ce(n),
63
- fields: F,
64
- autoDerivedFieldPaths: ve(F) ?? void 0
62
+ key: i,
63
+ label: Pe(i),
64
+ fields: M,
65
+ autoDerivedFieldPaths: ke(M) ?? void 0
65
66
  }), t;
66
67
  }, []);
67
68
  }
68
- s(xe, "getThemePreviewFieldClusters");
69
- const ge = Object.fromEntries(
70
- q.map((r) => [r.key, r])
71
- ), x = {
69
+ s(we, "getThemePreviewFieldClusters");
70
+ const Te = Object.fromEntries(
71
+ X.map((r) => [r.key, r])
72
+ ), v = {
72
73
  active: {
73
74
  backgroundColor: "#1ea3e6",
74
75
  borderColor: "#1591cf",
@@ -81,23 +82,23 @@ const ge = Object.fromEntries(
81
82
  descriptionColor: "#6b7280",
82
83
  textColor: "#111827"
83
84
  }
84
- }, T = "#d8dee8", ke = "#d1d7e0", Pe = "#f8fafc", D = "#ffffff", k = "#111827", P = "#6b7280", Y = "#ffffff", J = "#cbd5e1", ye = "#94a3b8", E = "#1ea3e6", Z = "#111827", we = "#f8fafc", Te = "#f8fafc", Be = he({
85
+ }, B = "#d8dee8", Be = "#d1d7e0", Fe = "#f8fafc", D = "#ffffff", y = "#111827", g = "#6b7280", O = "#ffffff", ee = "#cbd5e1", Me = "#94a3b8", z = "#1ea3e6", Q = "#111827", Se = "#f8fafc", Ne = "#f8fafc", Ie = fe({
85
86
  palette: {
86
87
  mode: "light",
87
88
  background: {
88
89
  default: D,
89
90
  paper: D
90
91
  },
91
- divider: T,
92
+ divider: B,
92
93
  primary: {
93
- main: E
94
+ main: z
94
95
  },
95
96
  secondary: {
96
- main: E
97
+ main: z
97
98
  },
98
99
  text: {
99
- primary: k,
100
- secondary: P
100
+ primary: y,
101
+ secondary: g
101
102
  }
102
103
  },
103
104
  typography: {
@@ -110,190 +111,225 @@ const ge = Object.fromEntries(
110
111
  fontSize: "1.3rem"
111
112
  }
112
113
  }
113
- }), Fe = {
114
- color: k,
114
+ }), Ee = {
115
+ color: y,
115
116
  "& .MuiFormHelperText-root": {
116
- color: P
117
+ color: g
117
118
  },
118
119
  "& .MuiInputAdornment-root": {
119
- color: P
120
+ color: g
120
121
  },
121
122
  "& .MuiInputLabel-root": {
122
- color: P
123
+ color: g
123
124
  },
124
125
  "& .MuiInputLabel-root.Mui-focused": {
125
- color: k
126
+ color: y
126
127
  },
127
128
  "& .MuiInputBase-input": {
128
- color: k
129
+ color: y
129
130
  },
130
131
  "& .MuiOutlinedInput-root": {
131
- backgroundColor: Y,
132
- color: k,
132
+ backgroundColor: O,
133
+ color: y,
133
134
  "& fieldset": {
134
- borderColor: J
135
+ borderColor: ee
135
136
  },
136
137
  "&:hover fieldset": {
137
- borderColor: ye
138
+ borderColor: Me
138
139
  },
139
140
  "&.Mui-focused fieldset": {
140
- borderColor: E,
141
+ borderColor: z,
141
142
  borderWidth: 1
142
143
  }
143
144
  },
144
145
  "& .MuiSelect-icon": {
145
- color: P
146
+ color: g
146
147
  },
147
148
  "& .MuiButton-outlined": {
148
- backgroundColor: Y,
149
- borderColor: Z,
150
- color: k,
149
+ backgroundColor: O,
150
+ borderColor: Q,
151
+ color: y,
151
152
  "&:hover": {
152
- backgroundColor: we,
153
- borderColor: Z
153
+ backgroundColor: Se,
154
+ borderColor: Q
154
155
  }
155
156
  },
156
157
  "& .MuiCheckbox-root": {
157
- color: P
158
+ color: g
158
159
  },
159
160
  "& .MuiCheckbox-root.Mui-checked": {
160
- color: E
161
+ color: z
161
162
  },
162
163
  "& .MuiDivider-root": {
163
- borderColor: T
164
+ borderColor: B
164
165
  }
165
- };
166
- function Ge({
166
+ }, We = /* @__PURE__ */ new Set([
167
+ ...be,
168
+ ...Ce
169
+ ]), V = /* @__PURE__ */ new Set(["tableFieldHeader", "tableFieldCell"]);
170
+ function _e({
167
171
  activeSection: r,
168
172
  presetOptions: d,
169
- selectedMode: b,
170
- selectedPresetKey: f,
173
+ selectedMode: p,
174
+ selectedPresetKey: m,
171
175
  settings: c,
172
- resetVersion: p,
173
- onSectionChange: B,
176
+ resetVersion: f,
177
+ onSectionChange: F,
174
178
  onPaletteValueChange: t,
175
179
  onPaletteValuesChange: h,
176
- onPaletteValueReset: n,
177
- onPaletteValuesReset: F,
178
- onPresetKeyChange: Q,
179
- onPresetModeChange: V
180
+ onPaletteValueReset: i,
181
+ onPaletteValuesReset: M,
182
+ onPresetKeyChange: re,
183
+ onPresetModeChange: oe
180
184
  }) {
181
- const [X, ee] = ue({}), M = !fe(r), C = M ? r : null, re = A(
182
- () => M && C ? me(d, C, b) : [],
183
- [M, d, C, b]
184
- ), R = pe[r], N = A(
185
- () => R.map((e) => ({
185
+ const [te, le] = pe({}), S = !ge(r), b = S ? r : null, N = T(
186
+ () => S && b ? ve(d, b, p) : [],
187
+ [S, d, b, p]
188
+ ), R = T(
189
+ () => {
190
+ var e;
191
+ return (e = N.find(
192
+ (l) => !We.has(l.key)
193
+ )) == null ? void 0 : e.key;
194
+ },
195
+ [N]
196
+ ), H = xe[r], I = T(
197
+ () => H.map((e) => ({
186
198
  ...e,
187
- fieldClusters: xe(e.fields)
199
+ fieldClusters: we(e.fields)
188
200
  })),
189
- [R]
190
- ), H = A(() => {
201
+ [H]
202
+ ), L = T(() => {
191
203
  if (r !== "table")
192
204
  return [
193
205
  {
194
206
  key: r,
195
- fieldGroups: N
207
+ fieldGroups: I
196
208
  }
197
209
  ];
198
- const e = /* @__PURE__ */ new Set(["tableFieldHeader", "tableFieldCell"]), l = N.filter(
199
- (u) => e.has(u.key)
200
- ), i = N.filter(
201
- (u) => !e.has(u.key)
210
+ const e = I.filter(
211
+ (n) => V.has(n.key)
212
+ ), l = I.filter(
213
+ (n) => !V.has(n.key)
202
214
  );
203
215
  return [
204
216
  {
205
217
  key: "table-field",
206
218
  label: "Field Table",
207
- fieldGroups: l
219
+ fieldGroups: e
208
220
  },
209
221
  {
210
222
  key: "table-base",
211
223
  label: "Table",
212
- fieldGroups: i
224
+ fieldGroups: l
213
225
  }
214
- ].filter((u) => u.fieldGroups.length > 0);
215
- }, [r, N]), W = ge[r], K = /* @__PURE__ */ s((e, l, i) => {
216
- const u = G(c, e, "common.white") || "#FFFFFF", y = G(c, e, "common.black") || "#111827", a = be(i, {
217
- whiteTextColor: u,
218
- blackTextColor: y
226
+ ].filter((n) => n.fieldGroups.length > 0);
227
+ }, [r, I]), j = Te[r], ne = T(
228
+ () => N.flatMap((e) => {
229
+ const l = [];
230
+ return e.key === R && l.push(
231
+ /* @__PURE__ */ o(
232
+ Z,
233
+ {
234
+ component: "li",
235
+ role: "presentation",
236
+ textAlign: "center",
237
+ sx: {
238
+ color: g,
239
+ fontSize: "1.2rem",
240
+ my: 0.5
241
+ },
242
+ children: "legacy"
243
+ },
244
+ "preset-legacy-divider"
245
+ )
246
+ ), l.push(
247
+ /* @__PURE__ */ o(W, { value: e.key, children: e.label }, e.key)
248
+ ), l;
249
+ }),
250
+ [R, N]
251
+ ), U = /* @__PURE__ */ s((e, l, n) => {
252
+ const P = G(c, e, "common.white") || "#FFFFFF", k = G(c, e, "common.black") || "#111827", a = ye(n, {
253
+ whiteTextColor: P,
254
+ blackTextColor: k
219
255
  });
220
256
  return a ? [
221
257
  l.lightPath ? { path: l.lightPath, value: a.light } : null,
222
258
  l.darkPath ? { path: l.darkPath, value: a.dark } : null,
223
259
  l.contrastTextPath ? { path: l.contrastTextPath, value: a.contrastText } : null
224
- ].filter((j) => !!j) : [];
225
- }, "getAutoDerivedUpdates"), U = /* @__PURE__ */ s((e) => {
260
+ ].filter((K) => !!K) : [];
261
+ }, "getAutoDerivedUpdates"), _ = /* @__PURE__ */ s((e) => {
226
262
  const l = e.fieldClusters.flatMap(
227
- (i) => i.fields.map((u) => u.path)
263
+ (n) => n.fields.map((P) => P.path)
228
264
  );
229
- return /* @__PURE__ */ m("div", { className: "flex flex-col gap-12", children: [
230
- e.label ? /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-8", children: [
231
- /* @__PURE__ */ o(g, { variant: "subtitle1", fontWeight: 700, children: e.label }),
265
+ return /* @__PURE__ */ u("div", { className: "flex flex-col gap-12", children: [
266
+ e.label ? /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-8", children: [
267
+ /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 700, children: e.label }),
232
268
  /* @__PURE__ */ o(
233
- ae,
269
+ de,
234
270
  {
235
271
  size: "small",
236
272
  "aria-label": `${e.label} reset`,
237
273
  onClick: /* @__PURE__ */ s(() => {
238
- F(l);
274
+ M(l);
239
275
  }, "onClick"),
240
276
  sx: {
241
- border: `1px solid ${J}`,
277
+ border: `1px solid ${ee}`,
242
278
  borderRadius: 1,
243
- color: P,
279
+ color: g,
244
280
  p: 0.5
245
281
  },
246
- children: /* @__PURE__ */ o(de, { sx: { fontSize: 18 } })
282
+ children: /* @__PURE__ */ o(ue, { sx: { fontSize: 18 } })
247
283
  }
248
284
  )
249
285
  ] }) : null,
250
- /* @__PURE__ */ o("div", { className: "grid gap-12", children: e.fieldClusters.map((i) => {
251
- if (!i.label)
252
- return i.fields.map((v) => /* @__PURE__ */ o(
253
- _,
286
+ /* @__PURE__ */ o("div", { className: "grid gap-12", children: e.fieldClusters.map((n) => {
287
+ if (!n.label)
288
+ return n.fields.map((C) => /* @__PURE__ */ o(
289
+ q,
254
290
  {
255
- definition: v,
256
- resetVersion: p,
291
+ definition: C,
292
+ resetVersion: f,
257
293
  sectionKey: r,
258
294
  settings: c,
259
295
  onChange: t,
260
- onReset: n
296
+ onReset: i
261
297
  },
262
- v.path
298
+ C.path
263
299
  ));
264
- const u = `${r}:${e.key}:${i.key}`, y = !!X[u], a = i.autoDerivedFieldPaths, j = !!(a && C);
265
- return /* @__PURE__ */ m(
266
- $,
300
+ const P = `${r}:${e.key}:${n.key}`, k = !!te[P], a = n.autoDerivedFieldPaths, K = !!(a && b);
301
+ return /* @__PURE__ */ u(
302
+ A,
267
303
  {
268
304
  variant: "outlined",
269
305
  sx: {
270
- backgroundColor: Pe,
271
- borderColor: ke,
306
+ backgroundColor: Fe,
307
+ borderColor: Be,
272
308
  display: "flex",
273
309
  flexDirection: "column",
274
310
  gap: 1.5,
275
311
  p: 1.5
276
312
  },
277
313
  children: [
278
- /* @__PURE__ */ m("div", { className: "flex items-start justify-between gap-12", children: [
279
- /* @__PURE__ */ o(g, { variant: "body2", fontWeight: 700, children: i.label }),
280
- j ? /* @__PURE__ */ o(
281
- ie,
314
+ /* @__PURE__ */ u("div", { className: "flex items-start justify-between gap-12", children: [
315
+ /* @__PURE__ */ o(x, { variant: "body2", fontWeight: 700, children: n.label }),
316
+ K ? /* @__PURE__ */ o(
317
+ ce,
282
318
  {
283
319
  className: "m-0",
284
320
  control: /* @__PURE__ */ o(
285
- se,
321
+ he,
286
322
  {
287
323
  size: "small",
288
- checked: y,
289
- onChange: /* @__PURE__ */ s((v) => {
290
- const I = v.target.checked;
291
- ee((w) => ({
324
+ checked: k,
325
+ onChange: /* @__PURE__ */ s((C) => {
326
+ const E = C.target.checked;
327
+ le((w) => ({
292
328
  ...w,
293
- [u]: I
294
- })), !I && (!C || !a || h(
295
- K(
296
- C,
329
+ [P]: E
330
+ })), !E && (!b || !a || h(
331
+ U(
332
+ b,
297
333
  a,
298
334
  G(
299
335
  c,
@@ -305,71 +341,69 @@ function Ge({
305
341
  }, "onChange")
306
342
  }
307
343
  ),
308
- label: /* @__PURE__ */ o(g, { variant: "caption", color: "text.secondary", children: "Edit derived colors" })
344
+ label: /* @__PURE__ */ o(x, { variant: "caption", color: "text.secondary", children: "Edit derived colors" })
309
345
  }
310
346
  ) : null
311
347
  ] }),
312
- /* @__PURE__ */ o("div", { className: "grid gap-12", children: i.fields.map((v) => {
313
- const I = a && C ? !y && v.path !== a.mainPath : !1;
348
+ /* @__PURE__ */ o("div", { className: "grid gap-12", children: n.fields.map((C) => {
349
+ const E = a && b ? !k && C.path !== a.mainPath : !1;
314
350
  return /* @__PURE__ */ o(
315
- _,
351
+ q,
316
352
  {
317
- disabled: I,
318
- definition: v,
319
- resetVersion: p,
353
+ disabled: E,
354
+ definition: C,
355
+ resetVersion: f,
320
356
  sectionKey: r,
321
357
  settings: c,
322
- onChange: /* @__PURE__ */ s((w, z) => {
323
- if (!a || !C || y || w !== a.mainPath) {
324
- t(w, z);
358
+ onChange: /* @__PURE__ */ s((w, $) => {
359
+ if (!a || !b || k || w !== a.mainPath) {
360
+ t(w, $);
325
361
  return;
326
362
  }
327
- h(
328
- [
329
- { path: w, value: z },
330
- ...K(
331
- C,
332
- a,
333
- z
334
- )
335
- ]
336
- );
363
+ h([
364
+ { path: w, value: $ },
365
+ ...U(
366
+ b,
367
+ a,
368
+ $
369
+ )
370
+ ]);
337
371
  }, "onChange"),
338
- onReset: n
372
+ onReset: i
339
373
  },
340
- v.path
374
+ C.path
341
375
  );
342
376
  }) })
343
377
  ]
344
378
  },
345
- i.key
379
+ n.key
346
380
  );
347
381
  }) })
348
382
  ] }, e.key);
349
383
  }, "renderFieldGroup");
350
- return /* @__PURE__ */ o(ce, { theme: Be, children: /* @__PURE__ */ m(ne, { sx: Fe, className: "flex h-full min-h-0 flex-col gap-16", children: [
351
- /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children: q.map((e) => {
384
+ return /* @__PURE__ */ o(me, { theme: Ie, children: /* @__PURE__ */ u(se, { sx: Ee, className: "flex h-full min-h-0 flex-col gap-16", children: [
385
+ /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children: X.map((e) => {
352
386
  const l = e.key === r;
353
387
  return /* @__PURE__ */ o(
354
- te,
388
+ ae,
355
389
  {
356
- onClick: /* @__PURE__ */ s(() => B(e.key), "onClick"),
390
+ onClick: /* @__PURE__ */ s(() => F(e.key), "onClick"),
357
391
  className: "w-full rounded-lg text-left",
358
392
  sx: {
359
393
  alignItems: "flex-start",
360
- backgroundColor: l ? x.active.backgroundColor : x.inactive.backgroundColor,
361
- border: `1px solid ${l ? x.active.borderColor : x.inactive.borderColor}`,
362
- color: l ? x.active.textColor : x.inactive.textColor,
394
+ backgroundColor: l ? v.active.backgroundColor : v.inactive.backgroundColor,
395
+ border: `1px solid ${l ? v.active.borderColor : v.inactive.borderColor}`,
396
+ color: l ? v.active.textColor : v.inactive.textColor,
363
397
  p: 2
364
398
  },
365
- children: /* @__PURE__ */ m("div", { className: "flex w-full flex-col gap-4", children: [
366
- /* @__PURE__ */ o(g, { variant: "subtitle1", fontWeight: 600, children: e.label }),
399
+ children: /* @__PURE__ */ u("div", { className: "flex w-full flex-col gap-4", children: [
400
+ /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 600, children: e.label }),
367
401
  e.description ? /* @__PURE__ */ o(
368
- g,
402
+ x,
369
403
  {
370
404
  variant: "body2",
371
405
  sx: {
372
- color: l ? x.active.descriptionColor : x.inactive.descriptionColor
406
+ color: l ? v.active.descriptionColor : v.inactive.descriptionColor
373
407
  },
374
408
  children: e.description
375
409
  }
@@ -379,66 +413,66 @@ function Ge({
379
413
  e.key
380
414
  );
381
415
  }) }),
382
- /* @__PURE__ */ m(
383
- $,
416
+ /* @__PURE__ */ u(
417
+ A,
384
418
  {
385
419
  className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg",
386
420
  sx: {
387
421
  backgroundColor: D,
388
- border: `1px solid ${T}`,
422
+ border: `1px solid ${B}`,
389
423
  boxShadow: "none"
390
424
  },
391
425
  children: [
392
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-14", children: [
393
- /* @__PURE__ */ o(g, { variant: "h6", sx: { color: k }, children: W == null ? void 0 : W.label }),
394
- M ? /* @__PURE__ */ m("div", { className: "grid gap-12 md:grid-cols-2", children: [
395
- /* @__PURE__ */ m(
396
- L,
426
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-14", children: [
427
+ /* @__PURE__ */ o(x, { variant: "h6", sx: { color: y }, children: j == null ? void 0 : j.label }),
428
+ S ? /* @__PURE__ */ u("div", { className: "grid gap-12 md:grid-cols-2", children: [
429
+ /* @__PURE__ */ u(
430
+ Y,
397
431
  {
398
432
  select: !0,
399
433
  label: "Mode",
400
- value: b,
434
+ value: p,
401
435
  onChange: /* @__PURE__ */ s((e) => {
402
- V(e.target.value);
436
+ oe(e.target.value);
403
437
  }, "onChange"),
404
438
  children: [
405
- /* @__PURE__ */ o(S, { value: "light", children: "light" }),
406
- /* @__PURE__ */ o(S, { value: "dark", children: "dark" })
439
+ /* @__PURE__ */ o(W, { value: "light", children: "light" }),
440
+ /* @__PURE__ */ o(W, { value: "dark", children: "dark" })
407
441
  ]
408
442
  }
409
443
  ),
410
- /* @__PURE__ */ m(
411
- L,
444
+ /* @__PURE__ */ u(
445
+ Y,
412
446
  {
413
447
  select: !0,
414
448
  label: "Preset",
415
- value: f,
449
+ value: m,
416
450
  onChange: /* @__PURE__ */ s((e) => {
417
- Q(e.target.value);
451
+ re(e.target.value);
418
452
  }, "onChange"),
419
453
  children: [
420
- f === O ? /* @__PURE__ */ o(S, { value: O, children: "custom" }) : null,
421
- re.map((e) => /* @__PURE__ */ o(S, { value: e.key, children: e.label }, e.key))
454
+ m === J ? /* @__PURE__ */ o(W, { value: J, children: "custom" }) : null,
455
+ ne
422
456
  ]
423
457
  }
424
458
  )
425
459
  ] }) : null
426
460
  ] }) }),
427
461
  /* @__PURE__ */ o(
428
- le,
462
+ Z,
429
463
  {
430
464
  sx: {
431
- borderColor: T
465
+ borderColor: B
432
466
  }
433
467
  }
434
468
  ),
435
- /* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20", children: H.map((e) => r === "table" && H.length > 1 ? /* @__PURE__ */ m(
436
- $,
469
+ /* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20", children: L.map((e) => r === "table" && L.length > 1 ? /* @__PURE__ */ u(
470
+ A,
437
471
  {
438
472
  variant: "outlined",
439
473
  sx: {
440
- backgroundColor: Te,
441
- borderColor: T,
474
+ backgroundColor: Ne,
475
+ borderColor: B,
442
476
  boxShadow: "none",
443
477
  display: "flex",
444
478
  flexDirection: "column",
@@ -446,19 +480,19 @@ function Ge({
446
480
  p: 2
447
481
  },
448
482
  children: [
449
- e.label ? /* @__PURE__ */ o(g, { variant: "subtitle1", fontWeight: 700, children: e.label }) : null,
450
- /* @__PURE__ */ o("div", { className: "grid gap-20", children: e.fieldGroups.map(U) })
483
+ e.label ? /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 700, children: e.label }) : null,
484
+ /* @__PURE__ */ o("div", { className: "grid gap-20", children: e.fieldGroups.map(_) })
451
485
  ]
452
486
  },
453
487
  e.key
454
- ) : e.fieldGroups.map(U)) })
488
+ ) : e.fieldGroups.map(_)) })
455
489
  ]
456
490
  }
457
491
  )
458
492
  ] }) });
459
493
  }
460
- s(Ge, "ThemePreviewControls");
494
+ s(_e, "ThemePreviewControls");
461
495
  export {
462
- Ge as ThemePreviewControls
496
+ _e as ThemePreviewControls
463
497
  };
464
498
  //# sourceMappingURL=ThemePreviewControls.js.map