@owp/core 2.5.9 → 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/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/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/_virtual/index20.js +2 -2
- package/dist/_virtual/index21.js +2 -2
- package/dist/_virtual/index22.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- 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/treeGridRuntime.js +195 -147
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.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 -202
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewControls.js +270 -220
- 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 +250 -226
- 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/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/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/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.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/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.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/features/themePreview/utils/index.d.ts +1 -1
- package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +11 -1
- 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,103 +25,122 @@ 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`,
|
|
118
138
|
disabled: t,
|
|
119
|
-
edge: "end",
|
|
120
139
|
onMouseDown: /* @__PURE__ */ l((r) => {
|
|
121
140
|
r.preventDefault();
|
|
122
141
|
}, "onMouseDown"),
|
|
123
142
|
onClick: /* @__PURE__ */ l(() => {
|
|
124
|
-
|
|
143
|
+
I(e.path);
|
|
125
144
|
}, "onClick"),
|
|
126
145
|
sx: {
|
|
127
146
|
border: "1px solid #cbd5e1",
|
|
@@ -129,62 +148,62 @@ function Se({
|
|
|
129
148
|
color: "#6b7280",
|
|
130
149
|
p: 0.25
|
|
131
150
|
},
|
|
132
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ n(me, { sx: { fontSize: 16 } })
|
|
133
152
|
}
|
|
134
153
|
) : null,
|
|
135
|
-
|
|
154
|
+
c ? /* @__PURE__ */ n(k, { variant: "body2", sx: { whiteSpace: "nowrap" }, children: c }) : null
|
|
136
155
|
] }) }) : void 0;
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
156
|
+
return /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
|
|
157
|
+
/* @__PURE__ */ n(
|
|
158
|
+
Q,
|
|
140
159
|
{
|
|
141
|
-
select:
|
|
160
|
+
select: A,
|
|
142
161
|
label: e.label,
|
|
143
162
|
size: "small",
|
|
144
|
-
value:
|
|
163
|
+
value: h ? R : x,
|
|
145
164
|
disabled: t,
|
|
146
165
|
onChange: /* @__PURE__ */ l((r) => {
|
|
147
|
-
if (
|
|
166
|
+
if (M)
|
|
148
167
|
return;
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
|
|
168
|
+
const u = c ? te(r.target.value) : r.target.value;
|
|
169
|
+
if (h) {
|
|
170
|
+
z(u);
|
|
152
171
|
return;
|
|
153
172
|
}
|
|
154
|
-
|
|
173
|
+
v(e.path, u);
|
|
155
174
|
}, "onChange"),
|
|
156
175
|
onFocus: /* @__PURE__ */ l(() => {
|
|
157
|
-
|
|
176
|
+
h && C(!0);
|
|
158
177
|
}, "onFocus"),
|
|
159
178
|
onBlur: /* @__PURE__ */ l(() => {
|
|
160
|
-
|
|
179
|
+
h && (C(!1), j(R));
|
|
161
180
|
}, "onBlur"),
|
|
162
181
|
onKeyDown: /* @__PURE__ */ l((r) => {
|
|
163
|
-
!
|
|
182
|
+
!h || r.key !== "Enter" || (r.preventDefault(), C(!1), j(R), r.currentTarget.blur());
|
|
164
183
|
}, "onKeyDown"),
|
|
165
|
-
helperText:
|
|
184
|
+
helperText: le,
|
|
166
185
|
slotProps: {
|
|
167
186
|
htmlInput: {
|
|
168
|
-
...
|
|
187
|
+
...c ? {
|
|
169
188
|
inputMode: "decimal"
|
|
170
189
|
} : {},
|
|
171
|
-
...
|
|
190
|
+
...M ? {
|
|
172
191
|
readOnly: !0
|
|
173
192
|
} : {}
|
|
174
193
|
},
|
|
175
194
|
input: {
|
|
176
|
-
...
|
|
177
|
-
endAdornment:
|
|
195
|
+
...q ? {
|
|
196
|
+
endAdornment: q
|
|
178
197
|
} : {}
|
|
179
198
|
}
|
|
180
199
|
},
|
|
181
|
-
children: (
|
|
200
|
+
children: (J = e.options) == null ? void 0 : J.map((r) => /* @__PURE__ */ n(ce, { value: r.value, children: r.label }, r.value))
|
|
182
201
|
}
|
|
183
202
|
),
|
|
184
|
-
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
|
|
203
|
+
H ? /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-6", children: [
|
|
204
|
+
/* @__PURE__ */ d(ae, { children: [
|
|
205
|
+
/* @__PURE__ */ n(
|
|
206
|
+
de,
|
|
188
207
|
{
|
|
189
208
|
size: "small",
|
|
190
209
|
fullWidth: !0,
|
|
@@ -192,31 +211,31 @@ function Se({
|
|
|
192
211
|
disabled: t,
|
|
193
212
|
sx: {
|
|
194
213
|
fontSize: "1.2rem",
|
|
195
|
-
height:
|
|
214
|
+
height: Z,
|
|
196
215
|
minWidth: 0
|
|
197
216
|
},
|
|
198
217
|
onClick: /* @__PURE__ */ l((r) => {
|
|
199
|
-
|
|
218
|
+
E(r.currentTarget);
|
|
200
219
|
}, "onClick"),
|
|
201
220
|
children: "MUI"
|
|
202
221
|
}
|
|
203
222
|
),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
223
|
+
/* @__PURE__ */ n(
|
|
224
|
+
Q,
|
|
206
225
|
{
|
|
207
226
|
hiddenLabel: !0,
|
|
208
227
|
type: "color",
|
|
209
228
|
size: "small",
|
|
210
|
-
value:
|
|
229
|
+
value: U,
|
|
211
230
|
disabled: t,
|
|
212
231
|
onChange: /* @__PURE__ */ l((r) => {
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
},
|
|
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);
|
|
217
236
|
}, "onChange"),
|
|
218
237
|
onBlur: /* @__PURE__ */ l(() => {
|
|
219
|
-
|
|
238
|
+
S && K(U);
|
|
220
239
|
}, "onBlur"),
|
|
221
240
|
slotProps: {
|
|
222
241
|
htmlInput: {
|
|
@@ -225,7 +244,7 @@ function Se({
|
|
|
225
244
|
},
|
|
226
245
|
sx: {
|
|
227
246
|
"& .MuiOutlinedInput-root": {
|
|
228
|
-
height:
|
|
247
|
+
height: Z,
|
|
229
248
|
px: 0.5
|
|
230
249
|
},
|
|
231
250
|
'& input[type="color"]': {
|
|
@@ -235,8 +254,8 @@ function Se({
|
|
|
235
254
|
border: 0,
|
|
236
255
|
borderRadius: 0,
|
|
237
256
|
display: "block",
|
|
238
|
-
height:
|
|
239
|
-
minHeight:
|
|
257
|
+
height: ee,
|
|
258
|
+
minHeight: ee,
|
|
240
259
|
overflow: "hidden",
|
|
241
260
|
padding: 0,
|
|
242
261
|
p: 0,
|
|
@@ -257,14 +276,14 @@ function Se({
|
|
|
257
276
|
}
|
|
258
277
|
}
|
|
259
278
|
),
|
|
260
|
-
|
|
261
|
-
|
|
279
|
+
P ? /* @__PURE__ */ n(
|
|
280
|
+
pe,
|
|
262
281
|
{
|
|
263
282
|
open: !0,
|
|
264
|
-
anchorEl:
|
|
283
|
+
anchorEl: P,
|
|
265
284
|
transitionDuration: 0,
|
|
266
285
|
onClose: /* @__PURE__ */ l(() => {
|
|
267
|
-
|
|
286
|
+
E(null);
|
|
268
287
|
}, "onClose"),
|
|
269
288
|
anchorOrigin: {
|
|
270
289
|
vertical: "bottom",
|
|
@@ -286,10 +305,10 @@ function Se({
|
|
|
286
305
|
}
|
|
287
306
|
}
|
|
288
307
|
},
|
|
289
|
-
children: /* @__PURE__ */
|
|
290
|
-
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
|
|
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,
|
|
293
312
|
{
|
|
294
313
|
sx: {
|
|
295
314
|
display: "grid",
|
|
@@ -300,9 +319,9 @@ function Se({
|
|
|
300
319
|
}
|
|
301
320
|
},
|
|
302
321
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
|
|
322
|
+
/* @__PURE__ */ n(k, { variant: "caption", color: "text.secondary", children: r.label }),
|
|
323
|
+
/* @__PURE__ */ n(
|
|
324
|
+
g,
|
|
306
325
|
{
|
|
307
326
|
sx: {
|
|
308
327
|
display: "grid",
|
|
@@ -310,68 +329,74 @@ function Se({
|
|
|
310
329
|
gridTemplateColumns: "repeat(auto-fit, minmax(68px, 1fr))",
|
|
311
330
|
minWidth: 0
|
|
312
331
|
},
|
|
313
|
-
children: r.colors.map((
|
|
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
|
-
{
|
|
349
|
-
sx: {
|
|
350
|
-
width: 30,
|
|
351
|
-
height: 30,
|
|
352
|
-
borderRadius: 1,
|
|
353
|
-
backgroundColor: P.value,
|
|
354
|
-
border: "1px solid",
|
|
355
|
-
borderColor: "divider"
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
),
|
|
359
|
-
/* @__PURE__ */ o(
|
|
360
|
-
h,
|
|
361
|
-
{
|
|
362
|
-
component: "span",
|
|
363
|
-
sx: {
|
|
364
|
-
fontSize: "0.75rem",
|
|
365
|
-
fontWeight: 600,
|
|
366
|
-
lineHeight: 1
|
|
367
|
-
},
|
|
368
|
-
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"
|
|
369
367
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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
|
+
})
|
|
375
400
|
}
|
|
376
401
|
)
|
|
377
402
|
]
|
|
@@ -381,23 +406,23 @@ function Se({
|
|
|
381
406
|
}
|
|
382
407
|
) : null
|
|
383
408
|
] }),
|
|
384
|
-
e.allowAlpha ? /* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
|
|
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,
|
|
388
413
|
{
|
|
389
414
|
variant: "caption",
|
|
390
415
|
color: "text.secondary",
|
|
391
416
|
className: "truncate whitespace-nowrap",
|
|
392
|
-
children:
|
|
417
|
+
children: a || "-"
|
|
393
418
|
}
|
|
394
419
|
)
|
|
395
420
|
] }) : null
|
|
396
|
-
] }) : /* @__PURE__ */
|
|
421
|
+
] }) : /* @__PURE__ */ n("div", {})
|
|
397
422
|
] });
|
|
398
423
|
}
|
|
399
|
-
l(
|
|
424
|
+
l(qe, "ThemePreviewColorField");
|
|
400
425
|
export {
|
|
401
|
-
|
|
426
|
+
qe as ThemePreviewColorField
|
|
402
427
|
};
|
|
403
428
|
//# sourceMappingURL=ThemePreviewColorField.js.map
|