@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.
Files changed (50) hide show
  1. package/configs/theme.d.ts +3 -0
  2. package/configs/theme.js +1 -0
  3. package/dist/_virtual/index10.js +2 -2
  4. package/dist/_virtual/index12.js +2 -2
  5. package/dist/_virtual/index13.js +2 -2
  6. package/dist/_virtual/index14.js +2 -2
  7. package/dist/_virtual/index15.js +2 -2
  8. package/dist/_virtual/index5.js +2 -2
  9. package/dist/configs/defaultConfig.js +1 -1
  10. package/dist/configs/theme.js +28 -0
  11. package/dist/configs/theme.js.map +1 -0
  12. package/dist/features/themePreview/components/ThemePreviewColorField.js +279 -208
  13. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  14. package/dist/features/themePreview/configs/presets.js +6 -38
  15. package/dist/features/themePreview/configs/presets.js.map +1 -1
  16. package/dist/features/themePreview/configs/previewStorage.js +28 -27
  17. package/dist/features/themePreview/configs/previewStorage.js.map +1 -1
  18. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +166 -154
  19. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  20. package/dist/features/themePreview/hooks/useThemePreview.js +202 -157
  21. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  22. package/dist/features/themePreview/utils/themePreviewExport.js +276 -67
  23. package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -1
  24. package/dist/features/themePreview.js +52 -52
  25. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  37. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  38. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  39. package/dist/owp-app.css +1 -1
  40. package/dist/types/configs/theme/index.d.ts +6 -0
  41. package/dist/types/features/themePreview/configs/index.d.ts +1 -1
  42. package/dist/types/features/themePreview/configs/presets.d.ts +0 -1
  43. package/dist/types/features/themePreview/configs/previewStorage.d.ts +1 -0
  44. package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +2 -1
  45. package/dist/types/features/themePreview/utils/index.d.ts +1 -1
  46. package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +38 -1083
  47. package/dist/types/utils/zipUtil.d.ts +1 -0
  48. package/dist/utils/zipUtil.js +38 -36
  49. package/dist/utils/zipUtil.js.map +1 -1
  50. package/package.json +2 -1
@@ -1,15 +1,15 @@
1
- var G = Object.defineProperty;
2
- var t = (a, e) => G(a, "name", { value: e, configurable: !0 });
3
- import { jsxs as h, jsx as l, Fragment as L } 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, TextField as R, Typography as f, Button as U, Box as _, Popover as K, InputAdornment as Y } from "@mui/material";
5
- import { blue as q, lightBlue as J, cyan as Q, teal as X, green as Z, amber as ee, orange as re, deepOrange as le, red as te, pink as ae, purple as ne, deepPurple as oe, indigo as ue, grey as ie, blueGrey as ce } from "@mui/material/colors";
6
- import { useState as g, useRef as se, useEffect as B } from "react";
7
- import { getThemePreviewPaletteValue as pe } from "../utils/themePreviewSettings.js";
8
- import { getColorAlphaValue as de, toColorPickerValue as S, applyColorPickerValue as j } from "../utils/color.js";
9
- const me = {
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
- }, he = [
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
- ], fe = [
28
- ["Blue", q],
29
- ["Light Blue", J],
30
- ["Cyan", Q],
31
- ["Teal", X],
32
- ["Green", Z],
33
- ["Amber", ee],
34
- ["Orange", re],
35
- ["Deep Orange", le],
36
- ["Red", te],
37
- ["Pink", ae],
38
- ["Purple", ne],
39
- ["Deep Purple", oe],
40
- ["Indigo", ue],
41
- ["Grey", ie],
42
- ["Blue Grey", ce]
43
- ], xe = fe.map(([a, e]) => ({
44
- label: a,
45
- colors: he.reduce((p, c) => {
46
- const i = e[c];
47
- return i && p.push({
48
- key: `${a}-${c}`,
49
- shade: c,
50
- value: i
51
- }), p;
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
- })), ge = 500;
54
- function ve(a, e) {
55
- return a.replace(new RegExp(`${e}$`, "i"), "");
53
+ })), ye = 500, U = 32, L = 20;
54
+ function ke(t, e) {
55
+ return t.replace(new RegExp(`${e}$`, "i"), "");
56
56
  }
57
- t(ve, "getUnitInputDisplayValue");
58
- function Pe(a, e) {
59
- const p = a.replace(/[^0-9.,]/g, "").replace(/,/g, "."), [c = "", ...i] = p.split("."), x = i.join(""), m = x ? `${c}.${x}` : c;
60
- return m ? `${m}${e}` : "";
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
- t(Pe, "normalizeUnitInputValue");
63
- function we(a) {
64
- return (a ? me[a] : null) ?? null;
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
- t(we, "getUnitValueFormat");
67
- function Ae({
68
- disabled: a = !1,
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: p,
71
- settings: c,
72
- onChange: i
83
+ sectionKey: n,
84
+ settings: s,
85
+ onChange: a
73
86
  }) {
74
- var $, F;
75
- const [x, m] = g(null), n = pe(c, p, e.path), o = we(e.valueFormat), V = e.showColorPicker !== !1, C = e.allowAlpha ? de(n) : null, A = [e.description];
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
- C ? `알파값은 ${C}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
90
+ E ? `알파값은 ${E}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
78
91
  );
79
- const H = A.filter(Boolean).join(" "), P = !!o, w = !!(($ = e.options) != null && $.length), y = !!(e.allowAlpha && V && !w && !o), v = o ? ve(n, o) : n, d = !w && !o && !y, [k, I] = g(v), [E, T] = g(!1), [M, O] = g(S(n)), [b, z] = g(!1), s = se(null);
80
- B(() => {
81
- !d || E || I(v);
82
- }, [d, v, E]), B(() => {
83
- b || O(S(n));
84
- }, [b, n]), B(() => () => {
85
- s.current && window.clearTimeout(s.current);
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__ */ t((r) => {
88
- i(e.path, r);
89
- }, "commitBufferedTextValue"), N = /* @__PURE__ */ t((r) => {
90
- s.current && (window.clearTimeout(s.current), s.current = null), z(!1), i(e.path, j(n, r));
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__ */ h("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] gap-12", children: [
93
- /* @__PURE__ */ l(
94
- R,
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: w,
112
+ select: P,
97
113
  label: e.label,
98
- value: d ? k : v,
99
- disabled: a,
100
- onChange: /* @__PURE__ */ t((r) => {
101
- if (y)
114
+ size: "small",
115
+ value: p ? w : x,
116
+ disabled: t,
117
+ onChange: /* @__PURE__ */ l((r) => {
118
+ if (v)
102
119
  return;
103
- const u = o ? Pe(r.target.value, o) : r.target.value;
104
- if (d) {
105
- I(u);
120
+ const d = u ? G(r.target.value) : r.target.value;
121
+ if (p) {
122
+ B(d);
106
123
  return;
107
124
  }
108
- i(e.path, u);
125
+ a(e.path, d);
109
126
  }, "onChange"),
110
- onFocus: /* @__PURE__ */ t(() => {
111
- d && T(!0);
127
+ onFocus: /* @__PURE__ */ l(() => {
128
+ p && y(!0);
112
129
  }, "onFocus"),
113
- onBlur: /* @__PURE__ */ t(() => {
114
- d && (T(!1), D(k));
130
+ onBlur: /* @__PURE__ */ l(() => {
131
+ p && (y(!1), D(w));
115
132
  }, "onBlur"),
116
- onKeyDown: /* @__PURE__ */ t((r) => {
117
- !d || r.key !== "Enter" || (r.preventDefault(), T(!1), D(k), r.currentTarget.blur());
133
+ onKeyDown: /* @__PURE__ */ l((r) => {
134
+ !p || r.key !== "Enter" || (r.preventDefault(), y(!1), D(w), r.currentTarget.blur());
118
135
  }, "onKeyDown"),
119
- helperText: H,
136
+ helperText: N,
120
137
  slotProps: {
121
138
  htmlInput: {
122
- ...o ? {
139
+ ...u ? {
123
140
  inputMode: "decimal"
124
141
  } : {},
125
- ...y ? {
142
+ ...v ? {
126
143
  readOnly: !0
127
144
  } : {}
128
145
  },
129
- input: o ? {
130
- endAdornment: /* @__PURE__ */ l(Y, { position: "end", children: o })
146
+ input: u ? {
147
+ endAdornment: /* @__PURE__ */ o(X, { position: "end", children: u })
131
148
  } : void 0
132
149
  },
133
- children: (F = e.options) == null ? void 0 : F.map((r) => /* @__PURE__ */ l(W, { value: r.value, children: r.label }, r.value))
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__ */ h("div", { className: "flex flex-col gap-6", children: [
137
- V ? /* @__PURE__ */ h(L, { children: [
138
- /* @__PURE__ */ l(
139
- R,
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
- value: M,
144
- disabled: a,
145
- onChange: /* @__PURE__ */ t((r) => {
146
- const u = r.target.value;
147
- O(u), z(!0), s.current && window.clearTimeout(s.current), s.current = window.setTimeout(() => {
148
- N(u);
149
- }, ge);
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__ */ t(() => {
152
- b && N(M);
169
+ onBlur: /* @__PURE__ */ l(() => {
170
+ k && W(z);
153
171
  }, "onBlur"),
172
+ slotProps: {
173
+ inputLabel: {
174
+ shrink: !0
175
+ }
176
+ },
154
177
  sx: {
155
- "& .MuiInputBase-input": {
156
- minHeight: 56,
157
- p: 0.5
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__ */ l(
163
- U,
211
+ /* @__PURE__ */ o(
212
+ Z,
164
213
  {
165
214
  size: "small",
215
+ fullWidth: !0,
166
216
  variant: "outlined",
167
- disabled: a,
168
- onClick: /* @__PURE__ */ t((r) => {
169
- m(r.currentTarget);
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
- x ? /* @__PURE__ */ l(
175
- K,
229
+ I ? /* @__PURE__ */ o(
230
+ Q,
176
231
  {
177
232
  open: !0,
178
- anchorEl: x,
179
- onClose: /* @__PURE__ */ t(() => {
180
- m(null);
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: 420,
249
+ maxHeight: "calc(100vh - 32px)",
250
+ maxWidth: "calc(100vw - 32px)",
251
+ minWidth: 320,
252
+ overflow: "auto",
194
253
  p: 1.5,
195
- width: "min(388px, calc(100vw - 48px))"
254
+ width: "min(760px, calc(100vw - 32px))"
196
255
  }
197
256
  }
198
257
  },
199
- children: /* @__PURE__ */ l("div", { className: "flex flex-col gap-10", children: xe.map((r) => /* @__PURE__ */ h(
200
- "div",
201
- {
202
- className: "grid grid-cols-[84px_264px] items-start gap-8",
203
- children: [
204
- /* @__PURE__ */ l(f, { variant: "caption", color: "text.secondary", children: r.label }),
205
- /* @__PURE__ */ l("div", { className: "overflow-x-auto", children: /* @__PURE__ */ l("div", { className: "flex w-max gap-6 pr-2", children: r.colors.map((u) => /* @__PURE__ */ h(
206
- U,
207
- {
208
- size: "small",
209
- variant: "outlined",
210
- onClick: /* @__PURE__ */ t(() => {
211
- i(
212
- e.path,
213
- j(n, u.value)
214
- ), m(null);
215
- }, "onClick"),
216
- sx: {
217
- alignItems: "center",
218
- display: "flex",
219
- flexDirection: "column",
220
- gap: 0.5,
221
- minWidth: 0,
222
- p: 0.5,
223
- width: 68
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
- width: 30,
231
- height: 30,
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
- fontSize: "0.75rem",
246
- fontWeight: 600,
247
- lineHeight: 1
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: u.shade
250
- }
251
- )
252
- ]
253
- },
254
- u.key
255
- )) }) })
256
- ]
257
- },
258
- r.label
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
- ] }) : /* @__PURE__ */ l(
263
- _,
264
- {
265
- className: "rounded border border-solid border-slate-200",
266
- sx: {
267
- height: 56,
268
- alignItems: "center",
269
- backgroundColor: e.allowAlpha ? n : "transparent",
270
- display: "flex",
271
- justifyContent: "center",
272
- px: 1
273
- },
274
- children: e.allowAlpha ? null : /* @__PURE__ */ l(
275
- f,
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
- t(Ae, "ThemePreviewColorField");
368
+ l(_e, "ThemePreviewColorField");
298
369
  export {
299
- Ae as ThemePreviewColorField
370
+ _e as ThemePreviewColorField
300
371
  };
301
372
  //# sourceMappingURL=ThemePreviewColorField.js.map