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