@owp/core 2.5.10 → 2.5.11
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/OwpTable/OwpFieldTable.js +108 -92
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +161 -141
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/FieldTableValue.js +43 -0
- package/dist/components/OwpTable/internal/FieldTableValue.js.map +1 -0
- package/dist/components/OwpTable/internal/defaultTableStyle.js +13 -10
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +170 -169
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +79 -76
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/configs/defaultConfig.js +110 -70
- package/dist/configs/defaultConfig.js.map +1 -1
- package/dist/constants/tableTheme.js +7 -6
- package/dist/constants/tableTheme.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +275 -273
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +552 -316
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewColorField.js +227 -201
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewControls.js +176 -160
- package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js +38 -38
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -1
- package/dist/features/themePreview/configs/settings.js +33 -20
- package/dist/features/themePreview/configs/settings.js.map +1 -1
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +227 -220
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +213 -204
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewDefinitions.js +63 -30
- package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
- package/dist/layout/components/navbar/NavbarToggleButton.js +46 -42
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- 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/EAN_UPC/constants.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/OwpTable/OwpFieldTable.d.ts +7 -3
- package/dist/types/components/OwpTable/OwpTable.d.ts +3 -1
- package/dist/types/components/OwpTable/internal/FieldTableValue.d.ts +17 -0
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +3 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +3 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +1 -1
- package/dist/types/configs/defaultConfig.d.ts +42 -3
- package/dist/types/constants/tableTheme.d.ts +1 -0
- package/dist/types/features/themePreview/components/ThemePreviewCanvasSections.d.ts +8 -0
- package/dist/types/features/themePreview/components/themePreviewCanvas.shared.d.ts +3 -3
- package/dist/types/features/themePreview/configs/settings.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/OwpMuiThemeTypes.d.ts +9 -0
- package/dist/types/types/OwpTableThemeTypes.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var l = (t, e) =>
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { IconButton as
|
|
5
|
-
import
|
|
6
|
-
import { blue as
|
|
7
|
-
import { useState as
|
|
8
|
-
import { getThemePreviewPaletteValue as
|
|
9
|
-
import { getColorAlphaValue as
|
|
10
|
-
const
|
|
1
|
+
var oe = Object.defineProperty;
|
|
2
|
+
var l = (t, e) => oe(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as n, jsxs as d, Fragment as ae } 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 { IconButton as ie, Typography as k, InputAdornment as ue, MenuItem as ce, TextField as Q, Box as g, Divider as se, Popover as pe, Button as de } from "@mui/material";
|
|
5
|
+
import me 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 { blue as he, lightBlue as fe, cyan as xe, teal as ge, green as we, amber as be, orange as ve, deepOrange as Pe, red as ye, pink as Ce, purple as ke, deepPurple as Te, indigo as Ve, grey as Ie, blueGrey as Ee } from "@mui/material/colors";
|
|
7
|
+
import { useState as w, useRef as T, useEffect as b } from "react";
|
|
8
|
+
import { getThemePreviewPaletteValue as Ae } from "../utils/themePreviewSettings.js";
|
|
9
|
+
import { getColorAlphaValue as Me, toColorPickerValue as V, applyColorPickerValue as X } from "../utils/color.js";
|
|
10
|
+
const Be = {
|
|
11
11
|
"px-number": "px",
|
|
12
12
|
"rem-number": "rem"
|
|
13
|
-
},
|
|
13
|
+
}, Re = [
|
|
14
14
|
"50",
|
|
15
15
|
"100",
|
|
16
16
|
"200",
|
|
@@ -25,93 +25,113 @@ const ke = {
|
|
|
25
25
|
"A200",
|
|
26
26
|
"A400",
|
|
27
27
|
"A700"
|
|
28
|
-
],
|
|
29
|
-
["Blue",
|
|
30
|
-
["Light Blue",
|
|
31
|
-
["Cyan",
|
|
32
|
-
["Teal",
|
|
33
|
-
["Green",
|
|
34
|
-
["Amber",
|
|
35
|
-
["Orange",
|
|
36
|
-
["Deep Orange",
|
|
37
|
-
["Red",
|
|
38
|
-
["Pink",
|
|
39
|
-
["Purple",
|
|
40
|
-
["Deep Purple",
|
|
41
|
-
["Indigo",
|
|
42
|
-
["Grey",
|
|
43
|
-
["Blue Grey",
|
|
44
|
-
],
|
|
28
|
+
], ze = [
|
|
29
|
+
["Blue", he],
|
|
30
|
+
["Light Blue", fe],
|
|
31
|
+
["Cyan", xe],
|
|
32
|
+
["Teal", ge],
|
|
33
|
+
["Green", we],
|
|
34
|
+
["Amber", be],
|
|
35
|
+
["Orange", ve],
|
|
36
|
+
["Deep Orange", Pe],
|
|
37
|
+
["Red", ye],
|
|
38
|
+
["Pink", Ce],
|
|
39
|
+
["Purple", ke],
|
|
40
|
+
["Deep Purple", Te],
|
|
41
|
+
["Indigo", Ve],
|
|
42
|
+
["Grey", Ie],
|
|
43
|
+
["Blue Grey", Ee]
|
|
44
|
+
], re = ze.map(([t, e]) => ({
|
|
45
45
|
label: t,
|
|
46
|
-
colors:
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
-
key: `${t}-${
|
|
50
|
-
shade:
|
|
51
|
-
value:
|
|
52
|
-
}),
|
|
46
|
+
colors: Re.reduce((o, m) => {
|
|
47
|
+
const f = e[m];
|
|
48
|
+
return f && o.push({
|
|
49
|
+
key: `${t}-${m}`,
|
|
50
|
+
shade: m,
|
|
51
|
+
value: f
|
|
52
|
+
}), o;
|
|
53
53
|
}, [])
|
|
54
|
-
})),
|
|
55
|
-
|
|
54
|
+
})), De = new Set(
|
|
55
|
+
re.flatMap(
|
|
56
|
+
(t) => t.colors.map((e) => e.value.toLowerCase())
|
|
57
|
+
)
|
|
58
|
+
), Se = 500, Z = 32, ee = 20;
|
|
59
|
+
function _e(t, e) {
|
|
56
60
|
return t.replace(new RegExp(`${e}$`, "i"), "");
|
|
57
61
|
}
|
|
58
|
-
l(
|
|
59
|
-
function
|
|
60
|
-
const e = t.replace(/[^0-9.,]/g, "").replace(/,/g, "."),
|
|
61
|
-
if (
|
|
62
|
+
l(_e, "getUnitInputDisplayValue");
|
|
63
|
+
function te(t) {
|
|
64
|
+
const e = t.replace(/[^0-9.,]/g, "").replace(/,/g, "."), o = e.indexOf(".");
|
|
65
|
+
if (o < 0)
|
|
62
66
|
return e;
|
|
63
|
-
const
|
|
64
|
-
return `${
|
|
67
|
+
const m = e.slice(0, o), f = e.slice(o + 1).replace(/\./g, "");
|
|
68
|
+
return `${m}.${f}`;
|
|
65
69
|
}
|
|
66
|
-
l(
|
|
67
|
-
function
|
|
68
|
-
const e =
|
|
70
|
+
l(te, "normalizeUnitInputDisplayValue");
|
|
71
|
+
function We(t) {
|
|
72
|
+
const e = te(t);
|
|
69
73
|
return !e || e === "." ? "" : e.startsWith(".") ? `0${e}` : e.endsWith(".") ? e.slice(0, -1) : e;
|
|
70
74
|
}
|
|
71
|
-
l(
|
|
72
|
-
function
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
+
l(We, "normalizeCommittedUnitInputDisplayValue");
|
|
76
|
+
function Oe(t, e) {
|
|
77
|
+
const o = We(t);
|
|
78
|
+
return o ? `${o}${e}` : "";
|
|
75
79
|
}
|
|
76
|
-
l(
|
|
77
|
-
function
|
|
78
|
-
return (t ?
|
|
80
|
+
l(Oe, "normalizeUnitInputValue");
|
|
81
|
+
function $e(t) {
|
|
82
|
+
return (t ? Be[t] : null) ?? null;
|
|
79
83
|
}
|
|
80
|
-
l(
|
|
81
|
-
function
|
|
84
|
+
l($e, "getUnitValueFormat");
|
|
85
|
+
function qe({
|
|
82
86
|
disabled: t = !1,
|
|
83
87
|
definition: e,
|
|
84
|
-
resetVersion:
|
|
85
|
-
sectionKey:
|
|
86
|
-
settings:
|
|
87
|
-
onChange:
|
|
88
|
-
onReset:
|
|
88
|
+
resetVersion: o,
|
|
89
|
+
sectionKey: m,
|
|
90
|
+
settings: f,
|
|
91
|
+
onChange: v,
|
|
92
|
+
onReset: I
|
|
89
93
|
}) {
|
|
90
|
-
var
|
|
91
|
-
const [
|
|
92
|
-
e.allowAlpha &&
|
|
93
|
-
|
|
94
|
+
var Y, J;
|
|
95
|
+
const [P, E] = w(null), W = T(null), a = Ae(f, m, e.path), c = $e(e.valueFormat), O = e.showColorPicker !== !1, $ = e.allowAlpha ? Me(a) : null, F = [e.description];
|
|
96
|
+
e.allowAlpha && F.push(
|
|
97
|
+
$ ? `알파값은 ${$}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
|
|
94
98
|
);
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
!
|
|
98
|
-
}, [
|
|
99
|
-
|
|
100
|
-
}, [
|
|
101
|
-
|
|
102
|
-
}, []),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
const le = F.filter(Boolean).join(" "), A = !!((Y = e.options) != null && Y.length), M = !!(e.allowAlpha && O && !A && !c), x = c ? _e(a, c) : a, H = O, B = H ? V(a).toLowerCase() : null, y = B && De.has(B) ? B : null, h = !A && !M, [R, z] = w(x), [L, C] = w(!1), [U, D] = w(V(a)), [S, _] = w(!1), i = T(null), N = T(x), G = T(a);
|
|
100
|
+
N.current = x, G.current = a, b(() => {
|
|
101
|
+
!h || L || z(x);
|
|
102
|
+
}, [h, x, L]), b(() => {
|
|
103
|
+
S || D(V(a));
|
|
104
|
+
}, [S, a]), b(() => () => {
|
|
105
|
+
i.current && window.clearTimeout(i.current);
|
|
106
|
+
}, []), b(() => {
|
|
107
|
+
if (!P || !y)
|
|
108
|
+
return;
|
|
109
|
+
const r = window.requestAnimationFrame(() => {
|
|
110
|
+
var s;
|
|
111
|
+
const u = (s = W.current) == null ? void 0 : s.querySelector(
|
|
112
|
+
`[data-mui-palette-value="${y}"]`
|
|
113
|
+
);
|
|
114
|
+
u == null || u.scrollIntoView({
|
|
115
|
+
block: "center",
|
|
116
|
+
inline: "nearest"
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
return () => {
|
|
120
|
+
window.cancelAnimationFrame(r);
|
|
121
|
+
};
|
|
122
|
+
}, [y, P]), b(() => {
|
|
123
|
+
typeof o > "u" || (i.current && (window.clearTimeout(i.current), i.current = null), z(N.current), C(!1), D(V(G.current)), _(!1));
|
|
124
|
+
}, [o]);
|
|
125
|
+
const j = /* @__PURE__ */ l((r) => {
|
|
126
|
+
v(
|
|
107
127
|
e.path,
|
|
108
|
-
|
|
128
|
+
c ? Oe(r, c) : r
|
|
109
129
|
);
|
|
110
|
-
}, "commitBufferedTextValue"),
|
|
111
|
-
|
|
112
|
-
}, "commitBufferedPickerValue"),
|
|
113
|
-
|
|
114
|
-
|
|
130
|
+
}, "commitBufferedTextValue"), K = /* @__PURE__ */ l((r) => {
|
|
131
|
+
i.current && (window.clearTimeout(i.current), i.current = null), _(!1), v(e.path, X(a, r));
|
|
132
|
+
}, "commitBufferedPickerValue"), q = I || c ? /* @__PURE__ */ n(ue, { position: "end", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-6 pr-2", children: [
|
|
133
|
+
I ? /* @__PURE__ */ n(
|
|
134
|
+
ie,
|
|
115
135
|
{
|
|
116
136
|
size: "small",
|
|
117
137
|
"aria-label": `${e.label} reset`,
|
|
@@ -120,7 +140,7 @@ function $e({
|
|
|
120
140
|
r.preventDefault();
|
|
121
141
|
}, "onMouseDown"),
|
|
122
142
|
onClick: /* @__PURE__ */ l(() => {
|
|
123
|
-
|
|
143
|
+
I(e.path);
|
|
124
144
|
}, "onClick"),
|
|
125
145
|
sx: {
|
|
126
146
|
border: "1px solid #cbd5e1",
|
|
@@ -128,62 +148,62 @@ function $e({
|
|
|
128
148
|
color: "#6b7280",
|
|
129
149
|
p: 0.25
|
|
130
150
|
},
|
|
131
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ n(me, { sx: { fontSize: 16 } })
|
|
132
152
|
}
|
|
133
153
|
) : null,
|
|
134
|
-
|
|
154
|
+
c ? /* @__PURE__ */ n(k, { variant: "body2", sx: { whiteSpace: "nowrap" }, children: c }) : null
|
|
135
155
|
] }) }) : void 0;
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
156
|
+
return /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
|
|
157
|
+
/* @__PURE__ */ n(
|
|
158
|
+
Q,
|
|
139
159
|
{
|
|
140
|
-
select:
|
|
160
|
+
select: A,
|
|
141
161
|
label: e.label,
|
|
142
162
|
size: "small",
|
|
143
|
-
value:
|
|
163
|
+
value: h ? R : x,
|
|
144
164
|
disabled: t,
|
|
145
165
|
onChange: /* @__PURE__ */ l((r) => {
|
|
146
|
-
if (
|
|
166
|
+
if (M)
|
|
147
167
|
return;
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
|
|
168
|
+
const u = c ? te(r.target.value) : r.target.value;
|
|
169
|
+
if (h) {
|
|
170
|
+
z(u);
|
|
151
171
|
return;
|
|
152
172
|
}
|
|
153
|
-
|
|
173
|
+
v(e.path, u);
|
|
154
174
|
}, "onChange"),
|
|
155
175
|
onFocus: /* @__PURE__ */ l(() => {
|
|
156
|
-
|
|
176
|
+
h && C(!0);
|
|
157
177
|
}, "onFocus"),
|
|
158
178
|
onBlur: /* @__PURE__ */ l(() => {
|
|
159
|
-
|
|
179
|
+
h && (C(!1), j(R));
|
|
160
180
|
}, "onBlur"),
|
|
161
181
|
onKeyDown: /* @__PURE__ */ l((r) => {
|
|
162
|
-
!
|
|
182
|
+
!h || r.key !== "Enter" || (r.preventDefault(), C(!1), j(R), r.currentTarget.blur());
|
|
163
183
|
}, "onKeyDown"),
|
|
164
|
-
helperText:
|
|
184
|
+
helperText: le,
|
|
165
185
|
slotProps: {
|
|
166
186
|
htmlInput: {
|
|
167
|
-
...
|
|
187
|
+
...c ? {
|
|
168
188
|
inputMode: "decimal"
|
|
169
189
|
} : {},
|
|
170
|
-
...
|
|
190
|
+
...M ? {
|
|
171
191
|
readOnly: !0
|
|
172
192
|
} : {}
|
|
173
193
|
},
|
|
174
194
|
input: {
|
|
175
|
-
|
|
176
|
-
endAdornment:
|
|
195
|
+
...q ? {
|
|
196
|
+
endAdornment: q
|
|
177
197
|
} : {}
|
|
178
198
|
}
|
|
179
199
|
},
|
|
180
|
-
children: (
|
|
200
|
+
children: (J = e.options) == null ? void 0 : J.map((r) => /* @__PURE__ */ n(ce, { value: r.value, children: r.label }, r.value))
|
|
181
201
|
}
|
|
182
202
|
),
|
|
183
|
-
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
|
|
203
|
+
H ? /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-6", children: [
|
|
204
|
+
/* @__PURE__ */ d(ae, { children: [
|
|
205
|
+
/* @__PURE__ */ n(
|
|
206
|
+
de,
|
|
187
207
|
{
|
|
188
208
|
size: "small",
|
|
189
209
|
fullWidth: !0,
|
|
@@ -191,31 +211,31 @@ function $e({
|
|
|
191
211
|
disabled: t,
|
|
192
212
|
sx: {
|
|
193
213
|
fontSize: "1.2rem",
|
|
194
|
-
height:
|
|
214
|
+
height: Z,
|
|
195
215
|
minWidth: 0
|
|
196
216
|
},
|
|
197
217
|
onClick: /* @__PURE__ */ l((r) => {
|
|
198
|
-
|
|
218
|
+
E(r.currentTarget);
|
|
199
219
|
}, "onClick"),
|
|
200
220
|
children: "MUI"
|
|
201
221
|
}
|
|
202
222
|
),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
|
|
223
|
+
/* @__PURE__ */ n(
|
|
224
|
+
Q,
|
|
205
225
|
{
|
|
206
226
|
hiddenLabel: !0,
|
|
207
227
|
type: "color",
|
|
208
228
|
size: "small",
|
|
209
|
-
value:
|
|
229
|
+
value: U,
|
|
210
230
|
disabled: t,
|
|
211
231
|
onChange: /* @__PURE__ */ l((r) => {
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
},
|
|
232
|
+
const u = r.target.value;
|
|
233
|
+
D(u), _(!0), i.current && window.clearTimeout(i.current), i.current = window.setTimeout(() => {
|
|
234
|
+
K(u);
|
|
235
|
+
}, Se);
|
|
216
236
|
}, "onChange"),
|
|
217
237
|
onBlur: /* @__PURE__ */ l(() => {
|
|
218
|
-
|
|
238
|
+
S && K(U);
|
|
219
239
|
}, "onBlur"),
|
|
220
240
|
slotProps: {
|
|
221
241
|
htmlInput: {
|
|
@@ -224,7 +244,7 @@ function $e({
|
|
|
224
244
|
},
|
|
225
245
|
sx: {
|
|
226
246
|
"& .MuiOutlinedInput-root": {
|
|
227
|
-
height:
|
|
247
|
+
height: Z,
|
|
228
248
|
px: 0.5
|
|
229
249
|
},
|
|
230
250
|
'& input[type="color"]': {
|
|
@@ -234,8 +254,8 @@ function $e({
|
|
|
234
254
|
border: 0,
|
|
235
255
|
borderRadius: 0,
|
|
236
256
|
display: "block",
|
|
237
|
-
height:
|
|
238
|
-
minHeight:
|
|
257
|
+
height: ee,
|
|
258
|
+
minHeight: ee,
|
|
239
259
|
overflow: "hidden",
|
|
240
260
|
padding: 0,
|
|
241
261
|
p: 0,
|
|
@@ -256,14 +276,14 @@ function $e({
|
|
|
256
276
|
}
|
|
257
277
|
}
|
|
258
278
|
),
|
|
259
|
-
|
|
260
|
-
|
|
279
|
+
P ? /* @__PURE__ */ n(
|
|
280
|
+
pe,
|
|
261
281
|
{
|
|
262
282
|
open: !0,
|
|
263
|
-
anchorEl:
|
|
283
|
+
anchorEl: P,
|
|
264
284
|
transitionDuration: 0,
|
|
265
285
|
onClose: /* @__PURE__ */ l(() => {
|
|
266
|
-
|
|
286
|
+
E(null);
|
|
267
287
|
}, "onClose"),
|
|
268
288
|
anchorOrigin: {
|
|
269
289
|
vertical: "bottom",
|
|
@@ -285,10 +305,10 @@ function $e({
|
|
|
285
305
|
}
|
|
286
306
|
}
|
|
287
307
|
},
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
|
|
308
|
+
children: /* @__PURE__ */ n("div", { ref: W, className: "flex min-w-0 flex-col gap-10", children: re.map((r, u) => /* @__PURE__ */ d(g, { className: "flex flex-col gap-10", children: [
|
|
309
|
+
u > 0 ? /* @__PURE__ */ n(se, { flexItem: !0 }) : null,
|
|
310
|
+
/* @__PURE__ */ d(
|
|
311
|
+
g,
|
|
292
312
|
{
|
|
293
313
|
sx: {
|
|
294
314
|
display: "grid",
|
|
@@ -299,9 +319,9 @@ function $e({
|
|
|
299
319
|
}
|
|
300
320
|
},
|
|
301
321
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
|
|
322
|
+
/* @__PURE__ */ n(k, { variant: "caption", color: "text.secondary", children: r.label }),
|
|
323
|
+
/* @__PURE__ */ n(
|
|
324
|
+
g,
|
|
305
325
|
{
|
|
306
326
|
sx: {
|
|
307
327
|
display: "grid",
|
|
@@ -309,68 +329,74 @@ function $e({
|
|
|
309
329
|
gridTemplateColumns: "repeat(auto-fit, minmax(68px, 1fr))",
|
|
310
330
|
minWidth: 0
|
|
311
331
|
},
|
|
312
|
-
children: r.colors.map((
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
{
|
|
348
|
-
sx: {
|
|
349
|
-
width: 30,
|
|
350
|
-
height: 30,
|
|
351
|
-
borderRadius: 1,
|
|
352
|
-
backgroundColor: P.value,
|
|
353
|
-
border: "1px solid",
|
|
354
|
-
borderColor: "divider"
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
),
|
|
358
|
-
/* @__PURE__ */ o(
|
|
359
|
-
h,
|
|
360
|
-
{
|
|
361
|
-
component: "span",
|
|
362
|
-
sx: {
|
|
363
|
-
fontSize: "0.75rem",
|
|
364
|
-
fontWeight: 600,
|
|
365
|
-
lineHeight: 1
|
|
366
|
-
},
|
|
367
|
-
children: P.shade
|
|
332
|
+
children: r.colors.map((s) => {
|
|
333
|
+
const p = y === s.value.toLowerCase();
|
|
334
|
+
return /* @__PURE__ */ d(
|
|
335
|
+
g,
|
|
336
|
+
{
|
|
337
|
+
component: "button",
|
|
338
|
+
type: "button",
|
|
339
|
+
"data-mui-palette-value": s.value.toLowerCase(),
|
|
340
|
+
"aria-current": p ? "true" : void 0,
|
|
341
|
+
onClick: /* @__PURE__ */ l(() => {
|
|
342
|
+
v(
|
|
343
|
+
e.path,
|
|
344
|
+
X(a, s.value)
|
|
345
|
+
), E(null);
|
|
346
|
+
}, "onClick"),
|
|
347
|
+
sx: {
|
|
348
|
+
alignItems: "center",
|
|
349
|
+
backgroundColor: p ? "action.selected" : "background.paper",
|
|
350
|
+
border: "1px solid",
|
|
351
|
+
borderColor: p ? "primary.main" : "divider",
|
|
352
|
+
borderRadius: 1,
|
|
353
|
+
boxShadow: p ? (ne) => `0 0 0 1px ${ne.palette.primary.main}` : "none",
|
|
354
|
+
color: p ? "text.primary" : "text.secondary",
|
|
355
|
+
cursor: "pointer",
|
|
356
|
+
display: "flex",
|
|
357
|
+
flexDirection: "column",
|
|
358
|
+
gap: 0.5,
|
|
359
|
+
justifyContent: "center",
|
|
360
|
+
minWidth: 0,
|
|
361
|
+
p: 0.5,
|
|
362
|
+
transition: "background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease",
|
|
363
|
+
width: "100%",
|
|
364
|
+
"&:hover": {
|
|
365
|
+
backgroundColor: "action.hover",
|
|
366
|
+
borderColor: p ? "primary.main" : "text.secondary"
|
|
368
367
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
368
|
+
},
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ n(
|
|
371
|
+
g,
|
|
372
|
+
{
|
|
373
|
+
sx: {
|
|
374
|
+
width: 30,
|
|
375
|
+
height: 30,
|
|
376
|
+
borderRadius: 1,
|
|
377
|
+
backgroundColor: s.value,
|
|
378
|
+
border: "1px solid",
|
|
379
|
+
borderColor: p ? "primary.main" : "divider"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
),
|
|
383
|
+
/* @__PURE__ */ n(
|
|
384
|
+
g,
|
|
385
|
+
{
|
|
386
|
+
component: "span",
|
|
387
|
+
sx: {
|
|
388
|
+
fontSize: "0.75rem",
|
|
389
|
+
fontWeight: p ? 700 : 600,
|
|
390
|
+
lineHeight: 1
|
|
391
|
+
},
|
|
392
|
+
children: s.shade
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
s.key
|
|
398
|
+
);
|
|
399
|
+
})
|
|
374
400
|
}
|
|
375
401
|
)
|
|
376
402
|
]
|
|
@@ -380,23 +406,23 @@ function $e({
|
|
|
380
406
|
}
|
|
381
407
|
) : null
|
|
382
408
|
] }),
|
|
383
|
-
e.allowAlpha ? /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
|
|
409
|
+
e.allowAlpha ? /* @__PURE__ */ d("div", { className: "col-span-2 flex flex-col gap-2", children: [
|
|
410
|
+
/* @__PURE__ */ n(k, { variant: "caption", color: "text.secondary", children: "Current" }),
|
|
411
|
+
/* @__PURE__ */ n(
|
|
412
|
+
k,
|
|
387
413
|
{
|
|
388
414
|
variant: "caption",
|
|
389
415
|
color: "text.secondary",
|
|
390
416
|
className: "truncate whitespace-nowrap",
|
|
391
|
-
children:
|
|
417
|
+
children: a || "-"
|
|
392
418
|
}
|
|
393
419
|
)
|
|
394
420
|
] }) : null
|
|
395
|
-
] }) : /* @__PURE__ */
|
|
421
|
+
] }) : /* @__PURE__ */ n("div", {})
|
|
396
422
|
] });
|
|
397
423
|
}
|
|
398
|
-
l(
|
|
424
|
+
l(qe, "ThemePreviewColorField");
|
|
399
425
|
export {
|
|
400
|
-
|
|
426
|
+
qe as ThemePreviewColorField
|
|
401
427
|
};
|
|
402
428
|
//# sourceMappingURL=ThemePreviewColorField.js.map
|