@owp/core 2.5.5 → 2.5.6
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/configs/theme.d.ts +3 -0
- package/configs/theme.js +1 -0
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/configs/defaultConfig.js +1 -1
- package/dist/configs/theme.js +28 -0
- package/dist/configs/theme.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewColorField.js +279 -208
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
- package/dist/features/themePreview/configs/presets.js +6 -38
- package/dist/features/themePreview/configs/presets.js.map +1 -1
- package/dist/features/themePreview/configs/previewStorage.js +28 -27
- package/dist/features/themePreview/configs/previewStorage.js.map +1 -1
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +166 -154
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +202 -157
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewExport.js +276 -67
- package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -1
- package/dist/features/themePreview.js +52 -52
- 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/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.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/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.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/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/configs/theme/index.d.ts +6 -0
- package/dist/types/features/themePreview/configs/index.d.ts +1 -1
- package/dist/types/features/themePreview/configs/presets.d.ts +0 -1
- package/dist/types/features/themePreview/configs/previewStorage.d.ts +1 -0
- package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +2 -1
- package/dist/types/features/themePreview/utils/index.d.ts +1 -1
- package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +38 -1083
- package/dist/types/utils/zipUtil.d.ts +1 -0
- package/dist/utils/zipUtil.js +38 -36
- package/dist/utils/zipUtil.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { MenuItem as
|
|
5
|
-
import { blue as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { getThemePreviewPaletteValue as
|
|
8
|
-
import { getColorAlphaValue as
|
|
9
|
-
const
|
|
1
|
+
var K = Object.defineProperty;
|
|
2
|
+
var l = (t, e) => K(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsxs as m, jsx as o, Fragment as Y } 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 q, TextField as $, Box as h, Divider as J, Typography as C, Popover as Q, InputAdornment as X, Button as Z } from "@mui/material";
|
|
5
|
+
import { blue as ee, lightBlue as re, cyan as te, teal as le, green as oe, amber as ne, orange as ae, deepOrange as ie, red as ue, pink as ce, purple as se, deepPurple as pe, indigo as de, grey as me, blueGrey as he } from "@mui/material/colors";
|
|
6
|
+
import { useState as f, useRef as fe, useEffect as T } from "react";
|
|
7
|
+
import { getThemePreviewPaletteValue as xe } from "../utils/themePreviewSettings.js";
|
|
8
|
+
import { getColorAlphaValue as ge, toColorPickerValue as F, applyColorPickerValue as S } from "../utils/color.js";
|
|
9
|
+
const be = {
|
|
10
10
|
"px-number": "px",
|
|
11
11
|
"rem-number": "rem"
|
|
12
|
-
},
|
|
12
|
+
}, Pe = [
|
|
13
13
|
"50",
|
|
14
14
|
"100",
|
|
15
15
|
"200",
|
|
@@ -24,160 +24,216 @@ const me = {
|
|
|
24
24
|
"A200",
|
|
25
25
|
"A400",
|
|
26
26
|
"A700"
|
|
27
|
-
],
|
|
28
|
-
["Blue",
|
|
29
|
-
["Light Blue",
|
|
30
|
-
["Cyan",
|
|
31
|
-
["Teal",
|
|
32
|
-
["Green",
|
|
33
|
-
["Amber",
|
|
34
|
-
["Orange",
|
|
35
|
-
["Deep Orange",
|
|
36
|
-
["Red",
|
|
37
|
-
["Pink",
|
|
38
|
-
["Purple",
|
|
39
|
-
["Deep Purple",
|
|
40
|
-
["Indigo",
|
|
41
|
-
["Grey",
|
|
42
|
-
["Blue Grey",
|
|
43
|
-
],
|
|
44
|
-
label:
|
|
45
|
-
colors:
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
key: `${
|
|
49
|
-
shade:
|
|
50
|
-
value:
|
|
51
|
-
}),
|
|
27
|
+
], ve = [
|
|
28
|
+
["Blue", ee],
|
|
29
|
+
["Light Blue", re],
|
|
30
|
+
["Cyan", te],
|
|
31
|
+
["Teal", le],
|
|
32
|
+
["Green", oe],
|
|
33
|
+
["Amber", ne],
|
|
34
|
+
["Orange", ae],
|
|
35
|
+
["Deep Orange", ie],
|
|
36
|
+
["Red", ue],
|
|
37
|
+
["Pink", ce],
|
|
38
|
+
["Purple", se],
|
|
39
|
+
["Deep Purple", pe],
|
|
40
|
+
["Indigo", de],
|
|
41
|
+
["Grey", me],
|
|
42
|
+
["Blue Grey", he]
|
|
43
|
+
], we = ve.map(([t, e]) => ({
|
|
44
|
+
label: t,
|
|
45
|
+
colors: Pe.reduce((n, s) => {
|
|
46
|
+
const a = e[s];
|
|
47
|
+
return a && n.push({
|
|
48
|
+
key: `${t}-${s}`,
|
|
49
|
+
shade: s,
|
|
50
|
+
value: a
|
|
51
|
+
}), n;
|
|
52
52
|
}, [])
|
|
53
|
-
})),
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
})), ye = 500, U = 32, L = 20;
|
|
54
|
+
function ke(t, e) {
|
|
55
|
+
return t.replace(new RegExp(`${e}$`, "i"), "");
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
|
|
57
|
+
l(ke, "getUnitInputDisplayValue");
|
|
58
|
+
function G(t) {
|
|
59
|
+
const e = t.replace(/[^0-9.,]/g, "").replace(/,/g, "."), n = e.indexOf(".");
|
|
60
|
+
if (n < 0)
|
|
61
|
+
return e;
|
|
62
|
+
const s = e.slice(0, n), a = e.slice(n + 1).replace(/\./g, "");
|
|
63
|
+
return `${s}.${a}`;
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
+
l(G, "normalizeUnitInputDisplayValue");
|
|
66
|
+
function Ce(t) {
|
|
67
|
+
const e = G(t);
|
|
68
|
+
return !e || e === "." ? "" : e.startsWith(".") ? `0${e}` : e.endsWith(".") ? e.slice(0, -1) : e;
|
|
65
69
|
}
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
|
|
70
|
+
l(Ce, "normalizeCommittedUnitInputDisplayValue");
|
|
71
|
+
function Te(t, e) {
|
|
72
|
+
const n = Ce(t);
|
|
73
|
+
return n ? `${n}${e}` : "";
|
|
74
|
+
}
|
|
75
|
+
l(Te, "normalizeUnitInputValue");
|
|
76
|
+
function Ie(t) {
|
|
77
|
+
return (t ? be[t] : null) ?? null;
|
|
78
|
+
}
|
|
79
|
+
l(Ie, "getUnitValueFormat");
|
|
80
|
+
function _e({
|
|
81
|
+
disabled: t = !1,
|
|
69
82
|
definition: e,
|
|
70
|
-
sectionKey:
|
|
71
|
-
settings:
|
|
72
|
-
onChange:
|
|
83
|
+
sectionKey: n,
|
|
84
|
+
settings: s,
|
|
85
|
+
onChange: a
|
|
73
86
|
}) {
|
|
74
|
-
var
|
|
75
|
-
const [
|
|
87
|
+
var H, O;
|
|
88
|
+
const [I, b] = f(null), i = xe(s, n, e.path), u = Ie(e.valueFormat), V = e.showColorPicker !== !1, E = e.allowAlpha ? ge(i) : null, A = [e.description];
|
|
76
89
|
e.allowAlpha && A.push(
|
|
77
|
-
|
|
90
|
+
E ? `알파값은 ${E}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
|
|
78
91
|
);
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
!
|
|
82
|
-
}, [
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
|
|
92
|
+
const N = A.filter(Boolean).join(" "), P = !!((H = e.options) != null && H.length), v = !!(e.allowAlpha && V && !P && !u), x = u ? ke(i, u) : i, j = V, p = !P && !v, [w, B] = f(x), [R, y] = f(!1), [z, M] = f(F(i)), [k, _] = f(!1), c = fe(null);
|
|
93
|
+
T(() => {
|
|
94
|
+
!p || R || B(x);
|
|
95
|
+
}, [p, x, R]), T(() => {
|
|
96
|
+
k || M(F(i));
|
|
97
|
+
}, [k, i]), T(() => () => {
|
|
98
|
+
c.current && window.clearTimeout(c.current);
|
|
86
99
|
}, []);
|
|
87
|
-
const D = /* @__PURE__ */
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
const D = /* @__PURE__ */ l((r) => {
|
|
101
|
+
a(
|
|
102
|
+
e.path,
|
|
103
|
+
u ? Te(r, u) : r
|
|
104
|
+
);
|
|
105
|
+
}, "commitBufferedTextValue"), W = /* @__PURE__ */ l((r) => {
|
|
106
|
+
c.current && (window.clearTimeout(c.current), c.current = null), _(!1), a(e.path, S(i, r));
|
|
91
107
|
}, "commitBufferedPickerValue");
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
108
|
+
return /* @__PURE__ */ m("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
|
|
109
|
+
/* @__PURE__ */ o(
|
|
110
|
+
$,
|
|
95
111
|
{
|
|
96
|
-
select:
|
|
112
|
+
select: P,
|
|
97
113
|
label: e.label,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
size: "small",
|
|
115
|
+
value: p ? w : x,
|
|
116
|
+
disabled: t,
|
|
117
|
+
onChange: /* @__PURE__ */ l((r) => {
|
|
118
|
+
if (v)
|
|
102
119
|
return;
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
105
|
-
|
|
120
|
+
const d = u ? G(r.target.value) : r.target.value;
|
|
121
|
+
if (p) {
|
|
122
|
+
B(d);
|
|
106
123
|
return;
|
|
107
124
|
}
|
|
108
|
-
|
|
125
|
+
a(e.path, d);
|
|
109
126
|
}, "onChange"),
|
|
110
|
-
onFocus: /* @__PURE__ */
|
|
111
|
-
|
|
127
|
+
onFocus: /* @__PURE__ */ l(() => {
|
|
128
|
+
p && y(!0);
|
|
112
129
|
}, "onFocus"),
|
|
113
|
-
onBlur: /* @__PURE__ */
|
|
114
|
-
|
|
130
|
+
onBlur: /* @__PURE__ */ l(() => {
|
|
131
|
+
p && (y(!1), D(w));
|
|
115
132
|
}, "onBlur"),
|
|
116
|
-
onKeyDown: /* @__PURE__ */
|
|
117
|
-
!
|
|
133
|
+
onKeyDown: /* @__PURE__ */ l((r) => {
|
|
134
|
+
!p || r.key !== "Enter" || (r.preventDefault(), y(!1), D(w), r.currentTarget.blur());
|
|
118
135
|
}, "onKeyDown"),
|
|
119
|
-
helperText:
|
|
136
|
+
helperText: N,
|
|
120
137
|
slotProps: {
|
|
121
138
|
htmlInput: {
|
|
122
|
-
...
|
|
139
|
+
...u ? {
|
|
123
140
|
inputMode: "decimal"
|
|
124
141
|
} : {},
|
|
125
|
-
...
|
|
142
|
+
...v ? {
|
|
126
143
|
readOnly: !0
|
|
127
144
|
} : {}
|
|
128
145
|
},
|
|
129
|
-
input:
|
|
130
|
-
endAdornment: /* @__PURE__ */
|
|
146
|
+
input: u ? {
|
|
147
|
+
endAdornment: /* @__PURE__ */ o(X, { position: "end", children: u })
|
|
131
148
|
} : void 0
|
|
132
149
|
},
|
|
133
|
-
children: (
|
|
150
|
+
children: (O = e.options) == null ? void 0 : O.map((r) => /* @__PURE__ */ o(q, { value: r.value, children: r.label }, r.value))
|
|
134
151
|
}
|
|
135
152
|
),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
153
|
+
j ? /* @__PURE__ */ m("div", { className: "grid grid-cols-2 gap-6", children: [
|
|
154
|
+
/* @__PURE__ */ m(Y, { children: [
|
|
155
|
+
/* @__PURE__ */ o(
|
|
156
|
+
$,
|
|
140
157
|
{
|
|
141
158
|
label: "Pick",
|
|
142
159
|
type: "color",
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
size: "small",
|
|
161
|
+
value: z,
|
|
162
|
+
disabled: t,
|
|
163
|
+
onChange: /* @__PURE__ */ l((r) => {
|
|
164
|
+
const d = r.target.value;
|
|
165
|
+
M(d), _(!0), c.current && window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
166
|
+
W(d);
|
|
167
|
+
}, ye);
|
|
150
168
|
}, "onChange"),
|
|
151
|
-
onBlur: /* @__PURE__ */
|
|
152
|
-
|
|
169
|
+
onBlur: /* @__PURE__ */ l(() => {
|
|
170
|
+
k && W(z);
|
|
153
171
|
}, "onBlur"),
|
|
172
|
+
slotProps: {
|
|
173
|
+
inputLabel: {
|
|
174
|
+
shrink: !0
|
|
175
|
+
}
|
|
176
|
+
},
|
|
154
177
|
sx: {
|
|
155
|
-
"& .
|
|
156
|
-
|
|
157
|
-
|
|
178
|
+
"& .MuiOutlinedInput-root": {
|
|
179
|
+
height: U,
|
|
180
|
+
px: 0.5
|
|
181
|
+
},
|
|
182
|
+
'& input[type="color"]': {
|
|
183
|
+
WebkitAppearance: "none",
|
|
184
|
+
alignSelf: "center",
|
|
185
|
+
boxSizing: "border-box",
|
|
186
|
+
border: 0,
|
|
187
|
+
borderRadius: 0,
|
|
188
|
+
display: "block",
|
|
189
|
+
height: L,
|
|
190
|
+
minHeight: L,
|
|
191
|
+
overflow: "hidden",
|
|
192
|
+
padding: 0,
|
|
193
|
+
p: 0,
|
|
194
|
+
width: "100%"
|
|
195
|
+
},
|
|
196
|
+
'& input[type="color"]::-webkit-color-swatch-wrapper': {
|
|
197
|
+
borderRadius: 0,
|
|
198
|
+
p: 0
|
|
199
|
+
},
|
|
200
|
+
'& input[type="color"]::-webkit-color-swatch': {
|
|
201
|
+
borderColor: "#94a3b8",
|
|
202
|
+
borderRadius: 0
|
|
203
|
+
},
|
|
204
|
+
'& input[type="color"]::-moz-color-swatch': {
|
|
205
|
+
borderColor: "#94a3b8",
|
|
206
|
+
borderRadius: 0
|
|
158
207
|
}
|
|
159
208
|
}
|
|
160
209
|
}
|
|
161
210
|
),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
211
|
+
/* @__PURE__ */ o(
|
|
212
|
+
Z,
|
|
164
213
|
{
|
|
165
214
|
size: "small",
|
|
215
|
+
fullWidth: !0,
|
|
166
216
|
variant: "outlined",
|
|
167
|
-
disabled:
|
|
168
|
-
|
|
169
|
-
|
|
217
|
+
disabled: t,
|
|
218
|
+
sx: {
|
|
219
|
+
fontSize: "1.2rem",
|
|
220
|
+
height: U,
|
|
221
|
+
minWidth: 0
|
|
222
|
+
},
|
|
223
|
+
onClick: /* @__PURE__ */ l((r) => {
|
|
224
|
+
b(r.currentTarget);
|
|
170
225
|
}, "onClick"),
|
|
171
226
|
children: "MUI"
|
|
172
227
|
}
|
|
173
228
|
),
|
|
174
|
-
|
|
175
|
-
|
|
229
|
+
I ? /* @__PURE__ */ o(
|
|
230
|
+
Q,
|
|
176
231
|
{
|
|
177
232
|
open: !0,
|
|
178
|
-
anchorEl:
|
|
179
|
-
|
|
180
|
-
|
|
233
|
+
anchorEl: I,
|
|
234
|
+
transitionDuration: 0,
|
|
235
|
+
onClose: /* @__PURE__ */ l(() => {
|
|
236
|
+
b(null);
|
|
181
237
|
}, "onClose"),
|
|
182
238
|
anchorOrigin: {
|
|
183
239
|
vertical: "bottom",
|
|
@@ -190,112 +246,127 @@ function Ae({
|
|
|
190
246
|
slotProps: {
|
|
191
247
|
paper: {
|
|
192
248
|
sx: {
|
|
193
|
-
maxHeight:
|
|
249
|
+
maxHeight: "calc(100vh - 32px)",
|
|
250
|
+
maxWidth: "calc(100vw - 32px)",
|
|
251
|
+
minWidth: 320,
|
|
252
|
+
overflow: "auto",
|
|
194
253
|
p: 1.5,
|
|
195
|
-
width: "min(
|
|
254
|
+
width: "min(760px, calc(100vw - 32px))"
|
|
196
255
|
}
|
|
197
256
|
}
|
|
198
257
|
},
|
|
199
|
-
children: /* @__PURE__ */
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
children: [
|
|
226
|
-
/* @__PURE__ */ l(
|
|
227
|
-
_,
|
|
258
|
+
children: /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-col gap-10", children: we.map((r, d) => /* @__PURE__ */ m(h, { className: "flex flex-col gap-10", children: [
|
|
259
|
+
d > 0 ? /* @__PURE__ */ o(J, { flexItem: !0 }) : null,
|
|
260
|
+
/* @__PURE__ */ m(
|
|
261
|
+
h,
|
|
262
|
+
{
|
|
263
|
+
sx: {
|
|
264
|
+
display: "grid",
|
|
265
|
+
gap: 1,
|
|
266
|
+
gridTemplateColumns: {
|
|
267
|
+
xs: "minmax(0, 1fr)",
|
|
268
|
+
sm: "84px minmax(0, 1fr)"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
children: [
|
|
272
|
+
/* @__PURE__ */ o(C, { variant: "caption", color: "text.secondary", children: r.label }),
|
|
273
|
+
/* @__PURE__ */ o(
|
|
274
|
+
h,
|
|
275
|
+
{
|
|
276
|
+
sx: {
|
|
277
|
+
display: "grid",
|
|
278
|
+
gap: 0.75,
|
|
279
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(68px, 1fr))",
|
|
280
|
+
minWidth: 0
|
|
281
|
+
},
|
|
282
|
+
children: r.colors.map((g) => /* @__PURE__ */ m(
|
|
283
|
+
h,
|
|
228
284
|
{
|
|
285
|
+
component: "button",
|
|
286
|
+
type: "button",
|
|
287
|
+
onClick: /* @__PURE__ */ l(() => {
|
|
288
|
+
a(
|
|
289
|
+
e.path,
|
|
290
|
+
S(i, g.value)
|
|
291
|
+
), b(null);
|
|
292
|
+
}, "onClick"),
|
|
229
293
|
sx: {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
borderRadius: 1,
|
|
233
|
-
backgroundColor: u.value,
|
|
294
|
+
alignItems: "center",
|
|
295
|
+
backgroundColor: "background.paper",
|
|
234
296
|
border: "1px solid",
|
|
235
|
-
borderColor: "divider"
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ l(
|
|
240
|
-
f,
|
|
241
|
-
{
|
|
242
|
-
variant: "caption",
|
|
243
|
-
sx: {
|
|
297
|
+
borderColor: "divider",
|
|
298
|
+
borderRadius: 1,
|
|
244
299
|
color: "text.secondary",
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
300
|
+
cursor: "pointer",
|
|
301
|
+
display: "flex",
|
|
302
|
+
flexDirection: "column",
|
|
303
|
+
gap: 0.5,
|
|
304
|
+
justifyContent: "center",
|
|
305
|
+
minWidth: 0,
|
|
306
|
+
p: 0.5,
|
|
307
|
+
transition: "background-color 120ms ease, border-color 120ms ease",
|
|
308
|
+
width: "100%",
|
|
309
|
+
"&:hover": {
|
|
310
|
+
backgroundColor: "action.hover",
|
|
311
|
+
borderColor: "text.secondary"
|
|
312
|
+
}
|
|
248
313
|
},
|
|
249
|
-
children:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
314
|
+
children: [
|
|
315
|
+
/* @__PURE__ */ o(
|
|
316
|
+
h,
|
|
317
|
+
{
|
|
318
|
+
sx: {
|
|
319
|
+
width: 30,
|
|
320
|
+
height: 30,
|
|
321
|
+
borderRadius: 1,
|
|
322
|
+
backgroundColor: g.value,
|
|
323
|
+
border: "1px solid",
|
|
324
|
+
borderColor: "divider"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ o(
|
|
329
|
+
h,
|
|
330
|
+
{
|
|
331
|
+
component: "span",
|
|
332
|
+
sx: {
|
|
333
|
+
fontSize: "0.75rem",
|
|
334
|
+
fontWeight: 600,
|
|
335
|
+
lineHeight: 1
|
|
336
|
+
},
|
|
337
|
+
children: g.shade
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
g.key
|
|
343
|
+
))
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
)
|
|
349
|
+
] }, r.label)) })
|
|
260
350
|
}
|
|
261
351
|
) : null
|
|
262
|
-
] })
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
{
|
|
277
|
-
variant: P ? "caption" : "body2",
|
|
278
|
-
sx: {
|
|
279
|
-
...P ? {
|
|
280
|
-
color: "text.secondary"
|
|
281
|
-
} : {
|
|
282
|
-
fontSize: n || "inherit"
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
children: P ? "Sample" : n || "-"
|
|
286
|
-
}
|
|
287
|
-
)
|
|
288
|
-
}
|
|
289
|
-
),
|
|
290
|
-
e.allowAlpha ? /* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
|
|
291
|
-
/* @__PURE__ */ l(f, { variant: "caption", color: "text.secondary", children: "Current" }),
|
|
292
|
-
/* @__PURE__ */ l(f, { variant: "caption", color: "text.secondary", className: "truncate whitespace-nowrap", children: n || "-" })
|
|
293
|
-
] }) : /* @__PURE__ */ l(f, { variant: "caption", color: "text.secondary", children: "Preview" })
|
|
294
|
-
] })
|
|
352
|
+
] }),
|
|
353
|
+
e.allowAlpha ? /* @__PURE__ */ m("div", { className: "col-span-2 flex flex-col gap-2", children: [
|
|
354
|
+
/* @__PURE__ */ o(C, { variant: "caption", color: "text.secondary", children: "Current" }),
|
|
355
|
+
/* @__PURE__ */ o(
|
|
356
|
+
C,
|
|
357
|
+
{
|
|
358
|
+
variant: "caption",
|
|
359
|
+
color: "text.secondary",
|
|
360
|
+
className: "truncate whitespace-nowrap",
|
|
361
|
+
children: i || "-"
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
] }) : null
|
|
365
|
+
] }) : /* @__PURE__ */ o("div", {})
|
|
295
366
|
] });
|
|
296
367
|
}
|
|
297
|
-
|
|
368
|
+
l(_e, "ThemePreviewColorField");
|
|
298
369
|
export {
|
|
299
|
-
|
|
370
|
+
_e as ThemePreviewColorField
|
|
300
371
|
};
|
|
301
372
|
//# sourceMappingURL=ThemePreviewColorField.js.map
|