@owp/core 2.5.7 → 2.5.9

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 (89) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index11.js +2 -2
  3. package/dist/_virtual/index12.js +2 -2
  4. package/dist/_virtual/index13.js +2 -2
  5. package/dist/_virtual/index15.js +2 -2
  6. package/dist/_virtual/index16.js +4 -4
  7. package/dist/_virtual/index17.js +4 -4
  8. package/dist/_virtual/index18.js +4 -4
  9. package/dist/_virtual/index19.js +4 -4
  10. package/dist/_virtual/index20.js +2 -2
  11. package/dist/_virtual/index21.js +2 -2
  12. package/dist/_virtual/index22.js +2 -2
  13. package/dist/_virtual/index5.js +2 -2
  14. package/dist/components/OwpDialog/OwpDialog.js +67 -46
  15. package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
  16. package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
  17. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +162 -153
  18. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  19. package/dist/components/OwpTable/OwpDataTable.js +297 -283
  20. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  21. package/dist/components/OwpTable/OwpFieldTable.js +109 -94
  22. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  23. package/dist/components/OwpTable/OwpTable.js +145 -127
  24. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  25. package/dist/components/OwpTable/internal/defaultTableStyle.js +21 -15
  26. package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
  27. package/dist/components/OwpTable/internal/treeGridTableStyle.js +16 -10
  28. package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -1
  29. package/dist/constants/tableTheme.js.map +1 -1
  30. package/dist/constants.js +23 -20
  31. package/dist/constants.js.map +1 -1
  32. package/dist/features/themePreview/components/ThemePreviewCanvas.js +300 -263
  33. package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
  34. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +148 -141
  35. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
  36. package/dist/features/themePreview/components/ThemePreviewColorField.js +169 -138
  37. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  38. package/dist/features/themePreview/components/ThemePreviewControls.js +370 -212
  39. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
  40. package/dist/features/themePreview/components/themePreviewCanvas.shared.js +145 -125
  41. package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -1
  42. package/dist/features/themePreview/configs/table.js +4 -2
  43. package/dist/features/themePreview/configs/table.js.map +1 -1
  44. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +124 -118
  45. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  46. package/dist/features/themePreview/hooks/useThemePreview.js +257 -190
  47. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  48. package/dist/features/themePreview/utils/themePreviewDefinitions.js +8 -0
  49. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  50. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  51. package/dist/layout/components/toolbar/ToolbarLayout.js +36 -35
  52. package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
  53. 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
  54. 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
  55. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  56. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  57. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  58. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  59. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  60. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  61. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  62. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  63. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  64. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  65. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  66. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  67. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  68. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  69. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  70. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  71. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  72. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  73. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  74. 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
  75. package/dist/owp-app.css +1 -1
  76. package/dist/types/components/OwpDialog/OwpDialog.d.ts +2 -0
  77. package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +1 -1
  78. package/dist/types/components/OwpTable/OwpFieldTable.d.ts +3 -2
  79. package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +2 -0
  80. package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +1 -0
  81. package/dist/types/constants/index.d.ts +1 -0
  82. package/dist/types/constants/tableTheme.d.ts +1 -0
  83. package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +3 -1
  84. package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +4 -1
  85. package/dist/types/features/themePreview/configs/settings.d.ts +2 -0
  86. package/dist/types/features/themePreview/configs/table.d.ts +2 -0
  87. package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +3 -0
  88. package/dist/types/types/OwpTableThemeTypes.d.ts +8 -0
  89. package/package.json +1 -1
@@ -1,15 +1,16 @@
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 = {
1
+ var J = Object.defineProperty;
2
+ var l = (t, e) => J(t, "name", { value: e, configurable: !0 });
3
+ import { jsx as o, jsxs as c, Fragment as Q } 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 X, Typography as v, InputAdornment as Z, MenuItem as ee, TextField as L, Box as h, Divider as re, Popover as te, Button as le } from "@mui/material";
5
+ import oe 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 ne, lightBlue as ae, cyan as ie, teal as ue, green as ce, amber as se, orange as pe, deepOrange as de, red as me, pink as he, purple as fe, deepPurple as xe, indigo as ge, grey as be, blueGrey as Pe } from "@mui/material/colors";
7
+ import { useState as x, useRef as ve, useEffect as w } from "react";
8
+ import { getThemePreviewPaletteValue as we } from "../utils/themePreviewSettings.js";
9
+ import { getColorAlphaValue as ye, toColorPickerValue as z, applyColorPickerValue as N } from "../utils/color.js";
10
+ const ke = {
10
11
  "px-number": "px",
11
12
  "rem-number": "rem"
12
- }, Pe = [
13
+ }, Ce = [
13
14
  "50",
14
15
  "100",
15
16
  "200",
@@ -24,159 +25,207 @@ const be = {
24
25
  "A200",
25
26
  "A400",
26
27
  "A700"
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]) => ({
28
+ ], Te = [
29
+ ["Blue", ne],
30
+ ["Light Blue", ae],
31
+ ["Cyan", ie],
32
+ ["Teal", ue],
33
+ ["Green", ce],
34
+ ["Amber", se],
35
+ ["Orange", pe],
36
+ ["Deep Orange", de],
37
+ ["Red", me],
38
+ ["Pink", he],
39
+ ["Purple", fe],
40
+ ["Deep Purple", xe],
41
+ ["Indigo", ge],
42
+ ["Grey", be],
43
+ ["Blue Grey", Pe]
44
+ ], Ie = Te.map(([t, e]) => ({
44
45
  label: t,
45
- colors: Pe.reduce((n, s) => {
46
- const a = e[s];
47
- return a && n.push({
46
+ colors: Ce.reduce((n, s) => {
47
+ const m = e[s];
48
+ return m && n.push({
48
49
  key: `${t}-${s}`,
49
50
  shade: s,
50
- value: a
51
+ value: m
51
52
  }), n;
52
53
  }, [])
53
- })), ye = 500, U = 32, L = 20;
54
- function ke(t, e) {
54
+ })), Ee = 500, G = 32, j = 20;
55
+ function Ve(t, e) {
55
56
  return t.replace(new RegExp(`${e}$`, "i"), "");
56
57
  }
57
- l(ke, "getUnitInputDisplayValue");
58
- function G(t) {
58
+ l(Ve, "getUnitInputDisplayValue");
59
+ function K(t) {
59
60
  const e = t.replace(/[^0-9.,]/g, "").replace(/,/g, "."), n = e.indexOf(".");
60
61
  if (n < 0)
61
62
  return e;
62
- const s = e.slice(0, n), a = e.slice(n + 1).replace(/\./g, "");
63
- return `${s}.${a}`;
63
+ const s = e.slice(0, n), m = e.slice(n + 1).replace(/\./g, "");
64
+ return `${s}.${m}`;
64
65
  }
65
- l(G, "normalizeUnitInputDisplayValue");
66
- function Ce(t) {
67
- const e = G(t);
66
+ l(K, "normalizeUnitInputDisplayValue");
67
+ function Ae(t) {
68
+ const e = K(t);
68
69
  return !e || e === "." ? "" : e.startsWith(".") ? `0${e}` : e.endsWith(".") ? e.slice(0, -1) : e;
69
70
  }
70
- l(Ce, "normalizeCommittedUnitInputDisplayValue");
71
- function Te(t, e) {
72
- const n = Ce(t);
71
+ l(Ae, "normalizeCommittedUnitInputDisplayValue");
72
+ function Be(t, e) {
73
+ const n = Ae(t);
73
74
  return n ? `${n}${e}` : "";
74
75
  }
75
- l(Te, "normalizeUnitInputValue");
76
- function Ie(t) {
77
- return (t ? be[t] : null) ?? null;
76
+ l(Be, "normalizeUnitInputValue");
77
+ function ze(t) {
78
+ return (t ? ke[t] : null) ?? null;
78
79
  }
79
- l(Ie, "getUnitValueFormat");
80
- function _e({
80
+ l(ze, "getUnitValueFormat");
81
+ function Se({
81
82
  disabled: t = !1,
82
83
  definition: e,
83
- sectionKey: n,
84
- settings: s,
85
- onChange: a
84
+ resetVersion: n,
85
+ sectionKey: s,
86
+ settings: m,
87
+ onChange: g,
88
+ onReset: y
86
89
  }) {
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];
89
- e.allowAlpha && A.push(
90
- E ? `알파값은 ${E}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
90
+ var F, U;
91
+ const [D, k] = x(null), i = we(m, s, e.path), u = ze(e.valueFormat), M = e.showColorPicker !== !1, R = e.allowAlpha ? ye(i) : null, _ = [e.description];
92
+ e.allowAlpha && _.push(
93
+ R ? `알파값은 ${R}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
91
94
  );
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);
99
- }, []);
100
- const D = /* @__PURE__ */ l((r) => {
101
- a(
95
+ const Y = _.filter(Boolean).join(" "), C = !!((F = e.options) != null && F.length), T = !!(e.allowAlpha && M && !C && !u), f = u ? Ve(i, u) : i, q = M, p = !C && !T, [I, E] = x(f), [W, b] = x(!1), [O, V] = x(z(i)), [A, B] = x(!1), a = ve(null);
96
+ w(() => {
97
+ !p || W || E(f);
98
+ }, [p, f, W]), w(() => {
99
+ A || V(z(i));
100
+ }, [A, i]), w(() => () => {
101
+ a.current && window.clearTimeout(a.current);
102
+ }, []), w(() => {
103
+ typeof n > "u" || (a.current && (window.clearTimeout(a.current), a.current = null), E(f), b(!1), V(z(i)), B(!1));
104
+ }, [n]);
105
+ const H = /* @__PURE__ */ l((r) => {
106
+ g(
102
107
  e.path,
103
- u ? Te(r, u) : r
108
+ u ? Be(r, u) : r
104
109
  );
105
- }, "commitBufferedTextValue"), W = /* @__PURE__ */ l((r) => {
106
- c.current && (window.clearTimeout(c.current), c.current = null), _(!1), a(e.path, S(i, r));
107
- }, "commitBufferedPickerValue");
108
- return /* @__PURE__ */ m("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
110
+ }, "commitBufferedTextValue"), $ = /* @__PURE__ */ l((r) => {
111
+ a.current && (window.clearTimeout(a.current), a.current = null), B(!1), g(e.path, N(i, r));
112
+ }, "commitBufferedPickerValue"), S = y || u ? /* @__PURE__ */ o(Z, { position: "end", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
113
+ y ? /* @__PURE__ */ o(
114
+ X,
115
+ {
116
+ size: "small",
117
+ "aria-label": `${e.label} reset`,
118
+ disabled: t,
119
+ edge: "end",
120
+ onMouseDown: /* @__PURE__ */ l((r) => {
121
+ r.preventDefault();
122
+ }, "onMouseDown"),
123
+ onClick: /* @__PURE__ */ l(() => {
124
+ y(e.path);
125
+ }, "onClick"),
126
+ sx: {
127
+ border: "1px solid #cbd5e1",
128
+ borderRadius: 1,
129
+ color: "#6b7280",
130
+ p: 0.25
131
+ },
132
+ children: /* @__PURE__ */ o(oe, { sx: { fontSize: 16 } })
133
+ }
134
+ ) : null,
135
+ u ? /* @__PURE__ */ o(v, { variant: "body2", children: u }) : null
136
+ ] }) }) : void 0;
137
+ return /* @__PURE__ */ c("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
109
138
  /* @__PURE__ */ o(
110
- $,
139
+ L,
111
140
  {
112
- select: P,
141
+ select: C,
113
142
  label: e.label,
114
143
  size: "small",
115
- value: p ? w : x,
144
+ value: p ? I : f,
116
145
  disabled: t,
117
146
  onChange: /* @__PURE__ */ l((r) => {
118
- if (v)
147
+ if (T)
119
148
  return;
120
- const d = u ? G(r.target.value) : r.target.value;
149
+ const d = u ? K(r.target.value) : r.target.value;
121
150
  if (p) {
122
- B(d);
151
+ E(d);
123
152
  return;
124
153
  }
125
- a(e.path, d);
154
+ g(e.path, d);
126
155
  }, "onChange"),
127
156
  onFocus: /* @__PURE__ */ l(() => {
128
- p && y(!0);
157
+ p && b(!0);
129
158
  }, "onFocus"),
130
159
  onBlur: /* @__PURE__ */ l(() => {
131
- p && (y(!1), D(w));
160
+ p && (b(!1), H(I));
132
161
  }, "onBlur"),
133
162
  onKeyDown: /* @__PURE__ */ l((r) => {
134
- !p || r.key !== "Enter" || (r.preventDefault(), y(!1), D(w), r.currentTarget.blur());
163
+ !p || r.key !== "Enter" || (r.preventDefault(), b(!1), H(I), r.currentTarget.blur());
135
164
  }, "onKeyDown"),
136
- helperText: N,
165
+ helperText: Y,
137
166
  slotProps: {
138
167
  htmlInput: {
139
168
  ...u ? {
140
169
  inputMode: "decimal"
141
170
  } : {},
142
- ...v ? {
171
+ ...T ? {
143
172
  readOnly: !0
144
173
  } : {}
145
174
  },
146
- input: u ? {
147
- endAdornment: /* @__PURE__ */ o(X, { position: "end", children: u })
148
- } : void 0
175
+ input: {
176
+ ...S ? {
177
+ endAdornment: S
178
+ } : {}
179
+ }
149
180
  },
150
- children: (O = e.options) == null ? void 0 : O.map((r) => /* @__PURE__ */ o(q, { value: r.value, children: r.label }, r.value))
181
+ children: (U = e.options) == null ? void 0 : U.map((r) => /* @__PURE__ */ o(ee, { value: r.value, children: r.label }, r.value))
151
182
  }
152
183
  ),
153
- j ? /* @__PURE__ */ m("div", { className: "grid grid-cols-2 gap-6", children: [
154
- /* @__PURE__ */ m(Y, { children: [
184
+ q ? /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-6", children: [
185
+ /* @__PURE__ */ c(Q, { children: [
155
186
  /* @__PURE__ */ o(
156
- $,
187
+ le,
157
188
  {
158
- label: "Pick",
189
+ size: "small",
190
+ fullWidth: !0,
191
+ variant: "outlined",
192
+ disabled: t,
193
+ sx: {
194
+ fontSize: "1.2rem",
195
+ height: G,
196
+ minWidth: 0
197
+ },
198
+ onClick: /* @__PURE__ */ l((r) => {
199
+ k(r.currentTarget);
200
+ }, "onClick"),
201
+ children: "MUI"
202
+ }
203
+ ),
204
+ /* @__PURE__ */ o(
205
+ L,
206
+ {
207
+ hiddenLabel: !0,
159
208
  type: "color",
160
209
  size: "small",
161
- value: z,
210
+ value: O,
162
211
  disabled: t,
163
212
  onChange: /* @__PURE__ */ l((r) => {
164
213
  const d = r.target.value;
165
- M(d), _(!0), c.current && window.clearTimeout(c.current), c.current = window.setTimeout(() => {
166
- W(d);
167
- }, ye);
214
+ V(d), B(!0), a.current && window.clearTimeout(a.current), a.current = window.setTimeout(() => {
215
+ $(d);
216
+ }, Ee);
168
217
  }, "onChange"),
169
218
  onBlur: /* @__PURE__ */ l(() => {
170
- k && W(z);
219
+ A && $(O);
171
220
  }, "onBlur"),
172
221
  slotProps: {
173
- inputLabel: {
174
- shrink: !0
222
+ htmlInput: {
223
+ "aria-label": "Pick color"
175
224
  }
176
225
  },
177
226
  sx: {
178
227
  "& .MuiOutlinedInput-root": {
179
- height: U,
228
+ height: G,
180
229
  px: 0.5
181
230
  },
182
231
  '& input[type="color"]': {
@@ -186,8 +235,8 @@ function _e({
186
235
  border: 0,
187
236
  borderRadius: 0,
188
237
  display: "block",
189
- height: L,
190
- minHeight: L,
238
+ height: j,
239
+ minHeight: j,
191
240
  overflow: "hidden",
192
241
  padding: 0,
193
242
  p: 0,
@@ -208,32 +257,14 @@ function _e({
208
257
  }
209
258
  }
210
259
  ),
211
- /* @__PURE__ */ o(
212
- Z,
213
- {
214
- size: "small",
215
- fullWidth: !0,
216
- variant: "outlined",
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);
225
- }, "onClick"),
226
- children: "MUI"
227
- }
228
- ),
229
- I ? /* @__PURE__ */ o(
230
- Q,
260
+ D ? /* @__PURE__ */ o(
261
+ te,
231
262
  {
232
263
  open: !0,
233
- anchorEl: I,
264
+ anchorEl: D,
234
265
  transitionDuration: 0,
235
266
  onClose: /* @__PURE__ */ l(() => {
236
- b(null);
267
+ k(null);
237
268
  }, "onClose"),
238
269
  anchorOrigin: {
239
270
  vertical: "bottom",
@@ -255,9 +286,9 @@ function _e({
255
286
  }
256
287
  }
257
288
  },
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(
289
+ children: /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-col gap-10", children: Ie.map((r, d) => /* @__PURE__ */ c(h, { className: "flex flex-col gap-10", children: [
290
+ d > 0 ? /* @__PURE__ */ o(re, { flexItem: !0 }) : null,
291
+ /* @__PURE__ */ c(
261
292
  h,
262
293
  {
263
294
  sx: {
@@ -269,7 +300,7 @@ function _e({
269
300
  }
270
301
  },
271
302
  children: [
272
- /* @__PURE__ */ o(C, { variant: "caption", color: "text.secondary", children: r.label }),
303
+ /* @__PURE__ */ o(v, { variant: "caption", color: "text.secondary", children: r.label }),
273
304
  /* @__PURE__ */ o(
274
305
  h,
275
306
  {
@@ -279,16 +310,16 @@ function _e({
279
310
  gridTemplateColumns: "repeat(auto-fit, minmax(68px, 1fr))",
280
311
  minWidth: 0
281
312
  },
282
- children: r.colors.map((g) => /* @__PURE__ */ m(
313
+ children: r.colors.map((P) => /* @__PURE__ */ c(
283
314
  h,
284
315
  {
285
316
  component: "button",
286
317
  type: "button",
287
318
  onClick: /* @__PURE__ */ l(() => {
288
- a(
319
+ g(
289
320
  e.path,
290
- S(i, g.value)
291
- ), b(null);
321
+ N(i, P.value)
322
+ ), k(null);
292
323
  }, "onClick"),
293
324
  sx: {
294
325
  alignItems: "center",
@@ -319,7 +350,7 @@ function _e({
319
350
  width: 30,
320
351
  height: 30,
321
352
  borderRadius: 1,
322
- backgroundColor: g.value,
353
+ backgroundColor: P.value,
323
354
  border: "1px solid",
324
355
  borderColor: "divider"
325
356
  }
@@ -334,12 +365,12 @@ function _e({
334
365
  fontWeight: 600,
335
366
  lineHeight: 1
336
367
  },
337
- children: g.shade
368
+ children: P.shade
338
369
  }
339
370
  )
340
371
  ]
341
372
  },
342
- g.key
373
+ P.key
343
374
  ))
344
375
  }
345
376
  )
@@ -350,10 +381,10 @@ function _e({
350
381
  }
351
382
  ) : null
352
383
  ] }),
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" }),
384
+ e.allowAlpha ? /* @__PURE__ */ c("div", { className: "col-span-2 flex flex-col gap-2", children: [
385
+ /* @__PURE__ */ o(v, { variant: "caption", color: "text.secondary", children: "Current" }),
355
386
  /* @__PURE__ */ o(
356
- C,
387
+ v,
357
388
  {
358
389
  variant: "caption",
359
390
  color: "text.secondary",
@@ -365,8 +396,8 @@ function _e({
365
396
  ] }) : /* @__PURE__ */ o("div", {})
366
397
  ] });
367
398
  }
368
- l(_e, "ThemePreviewColorField");
399
+ l(Se, "ThemePreviewColorField");
369
400
  export {
370
- _e as ThemePreviewColorField
401
+ Se as ThemePreviewColorField
371
402
  };
372
403
  //# sourceMappingURL=ThemePreviewColorField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemePreviewColorField.js","sources":["../../../../src/features/themePreview/components/ThemePreviewColorField.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Divider,\n InputAdornment,\n MenuItem,\n Popover,\n TextField,\n Typography,\n} from '@mui/material';\nimport {\n amber,\n blue,\n blueGrey,\n cyan,\n deepOrange,\n deepPurple,\n green,\n grey,\n indigo,\n lightBlue,\n orange,\n pink,\n purple,\n red,\n teal,\n} from '@mui/material/colors';\nimport type {\n ThemePreviewFieldDefinition,\n ThemePreviewSectionKey,\n ThemePreviewSettings,\n} from '../types';\nimport {\n applyColorPickerValue,\n getColorAlphaValue,\n getThemePreviewPaletteValue,\n toColorPickerValue,\n} from '../utils';\nimport { useEffect, useRef, useState } from 'react';\n\ninterface ThemePreviewColorFieldProps {\n disabled?: boolean;\n definition: ThemePreviewFieldDefinition;\n sectionKey: ThemePreviewSectionKey;\n settings: ThemePreviewSettings;\n onChange: (path: string, value: string) => void;\n}\n\nconst themePreviewInputUnits = {\n 'px-number': 'px',\n 'rem-number': 'rem',\n} as const;\n\ntype ThemePreviewInputUnit = (typeof themePreviewInputUnits)[keyof typeof themePreviewInputUnits];\n\nconst themePreviewMuiColorShades = [\n '50',\n '100',\n '200',\n '300',\n '400',\n '500',\n '600',\n '700',\n '800',\n '900',\n 'A100',\n 'A200',\n 'A400',\n 'A700',\n] as const;\nconst themePreviewMuiColorPalettes = [\n ['Blue', blue],\n ['Light Blue', lightBlue],\n ['Cyan', cyan],\n ['Teal', teal],\n ['Green', green],\n ['Amber', amber],\n ['Orange', orange],\n ['Deep Orange', deepOrange],\n ['Red', red],\n ['Pink', pink],\n ['Purple', purple],\n ['Deep Purple', deepPurple],\n ['Indigo', indigo],\n ['Grey', grey],\n ['Blue Grey', blueGrey],\n] as const;\nconst themePreviewMuiPaletteColorRows = themePreviewMuiColorPalettes.map(([label, palette]) => ({\n label,\n colors: themePreviewMuiColorShades.reduce<Array<{\n key: string;\n shade: string;\n value: string;\n }>>((acc, shade) => {\n const paletteValue = (palette as Record<string, string>)[shade];\n\n if (!paletteValue) {\n return acc;\n }\n\n acc.push({\n key: `${label}-${shade}`,\n shade,\n value: paletteValue,\n });\n\n return acc;\n }, []),\n}));\nconst THEME_PREVIEW_COLOR_PICKER_APPLY_DELAY_MS = 500;\nconst THEME_PREVIEW_SMALL_FIELD_HEIGHT = 32;\nconst THEME_PREVIEW_PICKER_SWATCH_HEIGHT = 20;\n\nfunction getUnitInputDisplayValue(value: string, unit: ThemePreviewInputUnit) {\n return value.replace(new RegExp(`${unit}$`, 'i'), '');\n}\n\nfunction normalizeUnitInputDisplayValue(value: string) {\n const sanitizedValue = value.replace(/[^0-9.,]/g, '').replace(/,/g, '.');\n const decimalPointIndex = sanitizedValue.indexOf('.');\n\n if (decimalPointIndex < 0) {\n return sanitizedValue;\n }\n\n const integerPart = sanitizedValue.slice(0, decimalPointIndex);\n const decimalPart = sanitizedValue.slice(decimalPointIndex + 1).replace(/\\./g, '');\n\n return `${integerPart}.${decimalPart}`;\n}\n\nfunction normalizeCommittedUnitInputDisplayValue(value: string) {\n const normalizedValue = normalizeUnitInputDisplayValue(value);\n\n if (!normalizedValue || normalizedValue === '.') {\n return '';\n }\n\n if (normalizedValue.startsWith('.')) {\n return `0${normalizedValue}`;\n }\n\n if (normalizedValue.endsWith('.')) {\n return normalizedValue.slice(0, -1);\n }\n\n return normalizedValue;\n}\n\nfunction normalizeUnitInputValue(value: string, unit: ThemePreviewInputUnit) {\n const normalizedValue = normalizeCommittedUnitInputDisplayValue(value);\n\n return normalizedValue ? `${normalizedValue}${unit}` : '';\n}\n\nfunction getUnitValueFormat(valueFormat?: ThemePreviewFieldDefinition['valueFormat']) {\n return (valueFormat ? themePreviewInputUnits[valueFormat] : null) ?? null;\n}\n\nexport function ThemePreviewColorField({\n disabled = false,\n definition,\n sectionKey,\n settings,\n onChange,\n}: ThemePreviewColorFieldProps) {\n const [muiPaletteAnchorElement, setMuiPaletteAnchorElement] = useState<HTMLElement | null>(null);\n const value = getThemePreviewPaletteValue(settings, sectionKey, definition.path);\n const unitValueFormat = getUnitValueFormat(definition.valueFormat);\n const showColorPicker = definition.showColorPicker !== false;\n const alphaValue = definition.allowAlpha ? getColorAlphaValue(value) : null;\n const helperText = [definition.description];\n\n if (definition.allowAlpha) {\n helperText.push(\n alphaValue\n ? `알파값은 ${alphaValue}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.`\n : '알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.',\n );\n }\n\n const resolvedHelperText = helperText.filter(Boolean).join(' ');\n const hasOptions = Boolean(definition.options?.length);\n const isReadOnlyColorTextInput = Boolean(\n definition.allowAlpha && showColorPicker && !hasOptions && !unitValueFormat,\n );\n const displayValue =\n unitValueFormat ? getUnitInputDisplayValue(value, unitValueFormat) : value;\n const hasPickerControls = showColorPicker;\n const canBufferTextInput = !hasOptions && !isReadOnlyColorTextInput;\n const [bufferedTextValue, setBufferedTextValue] = useState(displayValue);\n const [isBufferedTextInputFocused, setIsBufferedTextInputFocused] = useState(false);\n const [bufferedPickerValue, setBufferedPickerValue] = useState(toColorPickerValue(value));\n const [isBufferedPickerDirty, setIsBufferedPickerDirty] = useState(false);\n const colorPickerApplyTimeoutRef = useRef<number | null>(null);\n\n useEffect(() => {\n if (!canBufferTextInput || isBufferedTextInputFocused) {\n return;\n }\n\n setBufferedTextValue(displayValue);\n }, [canBufferTextInput, displayValue, isBufferedTextInputFocused]);\n\n useEffect(() => {\n if (isBufferedPickerDirty) {\n return;\n }\n\n setBufferedPickerValue(toColorPickerValue(value));\n }, [isBufferedPickerDirty, value]);\n\n useEffect(() => {\n return () => {\n if (!colorPickerApplyTimeoutRef.current) {\n return;\n }\n\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n };\n }, []);\n\n const commitBufferedTextValue = (nextValue: string) => {\n onChange(\n definition.path,\n unitValueFormat ? normalizeUnitInputValue(nextValue, unitValueFormat) : nextValue,\n );\n };\n const commitBufferedPickerValue = (nextPickerValue: string) => {\n if (colorPickerApplyTimeoutRef.current) {\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n colorPickerApplyTimeoutRef.current = null;\n }\n\n setIsBufferedPickerDirty(false);\n onChange(definition.path, applyColorPickerValue(value, nextPickerValue));\n };\n\n return (\n <div className=\"grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12\">\n <TextField\n select={hasOptions}\n label={definition.label}\n size=\"small\"\n value={canBufferTextInput ? bufferedTextValue : displayValue}\n disabled={disabled}\n onChange={(event) => {\n if (isReadOnlyColorTextInput) {\n return;\n }\n\n const nextValue = unitValueFormat\n ? normalizeUnitInputDisplayValue(event.target.value)\n : event.target.value;\n\n if (canBufferTextInput) {\n setBufferedTextValue(nextValue);\n return;\n }\n\n onChange(definition.path, nextValue);\n }}\n onFocus={() => {\n if (!canBufferTextInput) {\n return;\n }\n\n setIsBufferedTextInputFocused(true);\n }}\n onBlur={() => {\n if (!canBufferTextInput) {\n return;\n }\n\n setIsBufferedTextInputFocused(false);\n commitBufferedTextValue(bufferedTextValue);\n }}\n onKeyDown={(event) => {\n if (!canBufferTextInput || event.key !== 'Enter') {\n return;\n }\n\n event.preventDefault();\n setIsBufferedTextInputFocused(false);\n commitBufferedTextValue(bufferedTextValue);\n event.currentTarget.blur();\n }}\n helperText={resolvedHelperText}\n slotProps={{\n htmlInput:\n {\n ...(unitValueFormat\n ? {\n inputMode: 'decimal',\n }\n : {}),\n ...(isReadOnlyColorTextInput\n ? {\n readOnly: true,\n }\n : {}),\n },\n input:\n unitValueFormat\n ? {\n endAdornment: <InputAdornment position=\"end\">{unitValueFormat}</InputAdornment>,\n }\n : undefined,\n }}\n >\n {definition.options?.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </TextField>\n\n {hasPickerControls ? (\n <div className=\"grid grid-cols-2 gap-6\">\n <>\n <TextField\n label=\"Pick\"\n type=\"color\"\n size=\"small\"\n value={bufferedPickerValue}\n disabled={disabled}\n onChange={(event) => {\n const nextPickerValue = event.target.value;\n\n setBufferedPickerValue(nextPickerValue);\n setIsBufferedPickerDirty(true);\n\n if (colorPickerApplyTimeoutRef.current) {\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n }\n\n colorPickerApplyTimeoutRef.current = window.setTimeout(() => {\n commitBufferedPickerValue(nextPickerValue);\n }, THEME_PREVIEW_COLOR_PICKER_APPLY_DELAY_MS);\n }}\n onBlur={() => {\n if (!isBufferedPickerDirty) {\n return;\n }\n\n commitBufferedPickerValue(bufferedPickerValue);\n }}\n slotProps={{\n inputLabel: {\n shrink: true,\n },\n }}\n sx={{\n '& .MuiOutlinedInput-root': {\n height: THEME_PREVIEW_SMALL_FIELD_HEIGHT,\n px: 0.5,\n },\n '& input[type=\"color\"]': {\n WebkitAppearance: 'none',\n alignSelf: 'center',\n boxSizing: 'border-box',\n border: 0,\n borderRadius: 0,\n display: 'block',\n height: THEME_PREVIEW_PICKER_SWATCH_HEIGHT,\n minHeight: THEME_PREVIEW_PICKER_SWATCH_HEIGHT,\n overflow: 'hidden',\n padding: 0,\n p: 0,\n width: '100%',\n },\n '& input[type=\"color\"]::-webkit-color-swatch-wrapper': {\n borderRadius: 0,\n p: 0,\n },\n '& input[type=\"color\"]::-webkit-color-swatch': {\n borderColor: '#94a3b8',\n borderRadius: 0,\n },\n '& input[type=\"color\"]::-moz-color-swatch': {\n borderColor: '#94a3b8',\n borderRadius: 0,\n },\n }}\n />\n <Button\n size=\"small\"\n fullWidth\n variant=\"outlined\"\n disabled={disabled}\n sx={{\n fontSize: '1.2rem',\n height: THEME_PREVIEW_SMALL_FIELD_HEIGHT,\n minWidth: 0,\n }}\n onClick={(event) => {\n setMuiPaletteAnchorElement(event.currentTarget);\n }}\n >\n MUI\n </Button>\n {muiPaletteAnchorElement ? (\n <Popover\n open\n anchorEl={muiPaletteAnchorElement}\n transitionDuration={0}\n onClose={() => {\n setMuiPaletteAnchorElement(null);\n }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n slotProps={{\n paper: {\n sx: {\n maxHeight: 'calc(100vh - 32px)',\n maxWidth: 'calc(100vw - 32px)',\n minWidth: 320,\n overflow: 'auto',\n p: 1.5,\n width: 'min(760px, calc(100vw - 32px))',\n },\n },\n }}\n >\n <div className=\"flex min-w-0 flex-col gap-10\">\n {themePreviewMuiPaletteColorRows.map((paletteRow, paletteRowIndex) => (\n <Box key={paletteRow.label} className=\"flex flex-col gap-10\">\n {paletteRowIndex > 0 ? <Divider flexItem /> : null}\n <Box\n sx={{\n display: 'grid',\n gap: 1,\n gridTemplateColumns: {\n xs: 'minmax(0, 1fr)',\n sm: '84px minmax(0, 1fr)',\n },\n }}\n >\n <Typography variant=\"caption\" color=\"text.secondary\">\n {paletteRow.label}\n </Typography>\n <Box\n sx={{\n display: 'grid',\n gap: 0.75,\n gridTemplateColumns: 'repeat(auto-fit, minmax(68px, 1fr))',\n minWidth: 0,\n }}\n >\n {paletteRow.colors.map((colorItem) => (\n <Box\n key={colorItem.key}\n component=\"button\"\n type=\"button\"\n onClick={() => {\n onChange(\n definition.path,\n applyColorPickerValue(value, colorItem.value),\n );\n setMuiPaletteAnchorElement(null);\n }}\n sx={{\n alignItems: 'center',\n backgroundColor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 1,\n color: 'text.secondary',\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'column',\n gap: 0.5,\n justifyContent: 'center',\n minWidth: 0,\n p: 0.5,\n transition: 'background-color 120ms ease, border-color 120ms ease',\n width: '100%',\n '&:hover': {\n backgroundColor: 'action.hover',\n borderColor: 'text.secondary',\n },\n }}\n >\n <Box\n sx={{\n width: 30,\n height: 30,\n borderRadius: 1,\n backgroundColor: colorItem.value,\n border: '1px solid',\n borderColor: 'divider',\n }}\n />\n <Box\n component=\"span\"\n sx={{\n fontSize: '0.75rem',\n fontWeight: 600,\n lineHeight: 1,\n }}\n >\n {colorItem.shade}\n </Box>\n </Box>\n ))}\n </Box>\n </Box>\n </Box>\n ))}\n </div>\n </Popover>\n ) : null}\n </>\n {definition.allowAlpha ? (\n <div className=\"col-span-2 flex flex-col gap-2\">\n <Typography variant=\"caption\" color=\"text.secondary\">\n Current\n </Typography>\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n className=\"truncate whitespace-nowrap\"\n >\n {value || '-'}\n </Typography>\n </div>\n ) : null}\n </div>\n ) : (\n <div />\n )}\n </div>\n );\n}\n"],"names":["themePreviewInputUnits","themePreviewMuiColorShades","themePreviewMuiColorPalettes","blue","lightBlue","cyan","teal","green","amber","orange","deepOrange","red","pink","purple","deepPurple","indigo","grey","blueGrey","themePreviewMuiPaletteColorRows","label","palette","acc","shade","paletteValue","THEME_PREVIEW_COLOR_PICKER_APPLY_DELAY_MS","THEME_PREVIEW_SMALL_FIELD_HEIGHT","THEME_PREVIEW_PICKER_SWATCH_HEIGHT","getUnitInputDisplayValue","value","unit","__name","normalizeUnitInputDisplayValue","sanitizedValue","decimalPointIndex","integerPart","decimalPart","normalizeCommittedUnitInputDisplayValue","normalizedValue","normalizeUnitInputValue","getUnitValueFormat","valueFormat","ThemePreviewColorField","disabled","definition","sectionKey","settings","onChange","muiPaletteAnchorElement","setMuiPaletteAnchorElement","useState","getThemePreviewPaletteValue","unitValueFormat","showColorPicker","alphaValue","getColorAlphaValue","helperText","resolvedHelperText","hasOptions","_a","isReadOnlyColorTextInput","displayValue","hasPickerControls","canBufferTextInput","bufferedTextValue","setBufferedTextValue","isBufferedTextInputFocused","setIsBufferedTextInputFocused","bufferedPickerValue","setBufferedPickerValue","toColorPickerValue","isBufferedPickerDirty","setIsBufferedPickerDirty","colorPickerApplyTimeoutRef","useRef","useEffect","commitBufferedTextValue","nextValue","commitBufferedPickerValue","nextPickerValue","applyColorPickerValue","jsxs","jsx","TextField","event","InputAdornment","_b","option","MenuItem","Fragment","Button","Popover","paletteRow","paletteRowIndex","Box","Divider","Typography","colorItem"],"mappings":";;;;;;;;AAgDA,MAAMA,KAAyB;AAAA,EAC7B,aAAa;AAAA,EACb,cAAc;AAChB,GAIMC,KAA6B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACMC,KAA+B;AAAA,EACnC,CAAC,QAAQC,EAAI;AAAA,EACb,CAAC,cAAcC,EAAS;AAAA,EACxB,CAAC,QAAQC,EAAI;AAAA,EACb,CAAC,QAAQC,EAAI;AAAA,EACb,CAAC,SAASC,EAAK;AAAA,EACf,CAAC,SAASC,EAAK;AAAA,EACf,CAAC,UAAUC,EAAM;AAAA,EACjB,CAAC,eAAeC,EAAU;AAAA,EAC1B,CAAC,OAAOC,EAAG;AAAA,EACX,CAAC,QAAQC,EAAI;AAAA,EACb,CAAC,UAAUC,EAAM;AAAA,EACjB,CAAC,eAAeC,EAAU;AAAA,EAC1B,CAAC,UAAUC,EAAM;AAAA,EACjB,CAAC,QAAQC,EAAI;AAAA,EACb,CAAC,aAAaC,EAAQ;AACxB,GACMC,KAAkChB,GAA6B,IAAI,CAAC,CAACiB,GAAOC,CAAO,OAAO;AAAA,EAC9F,OAAAD;AAAA,EACA,QAAQlB,GAA2B,OAI/B,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AAAqC,EAAC,OAAA,EAAI,WAAU,kCACb,UAAA;AAAA,QAAA,gBAAAC,EAACc,GAAA,EAAW,SAAQ,WAAU,OAAM,kBAAiB,UAAA,WAErD;AAAA,QACA,gBAAAd;AAAA,UAACc;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,WAAU;AAAA,YAET,UAAAnE,KAAS;AAAA,UAAA;AAAA,QAAA;AAAA,MACZ,EAAA,CACF,IACE;AAAA,IAAA,GACN,sBAEC,OAAA,CAAA,CAAI;AAAA,EAAA,GAET;AAEJ;AA5XgBE,EAAAW,IAAA;"}
1
+ {"version":3,"file":"ThemePreviewColorField.js","sources":["../../../../src/features/themePreview/components/ThemePreviewColorField.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Divider,\n IconButton,\n InputAdornment,\n MenuItem,\n Popover,\n TextField,\n Typography,\n} from '@mui/material';\nimport RestartAltOutlinedIcon from '@mui/icons-material/RestartAltOutlined';\nimport {\n amber,\n blue,\n blueGrey,\n cyan,\n deepOrange,\n deepPurple,\n green,\n grey,\n indigo,\n lightBlue,\n orange,\n pink,\n purple,\n red,\n teal,\n} from '@mui/material/colors';\nimport type {\n ThemePreviewFieldDefinition,\n ThemePreviewSectionKey,\n ThemePreviewSettings,\n} from '../types';\nimport {\n applyColorPickerValue,\n getColorAlphaValue,\n getThemePreviewPaletteValue,\n toColorPickerValue,\n} from '../utils';\nimport { useEffect, useRef, useState } from 'react';\n\ninterface ThemePreviewColorFieldProps {\n disabled?: boolean;\n definition: ThemePreviewFieldDefinition;\n resetVersion?: number;\n sectionKey: ThemePreviewSectionKey;\n settings: ThemePreviewSettings;\n onChange: (path: string, value: string) => void;\n onReset?: (path: string) => void;\n}\n\nconst themePreviewInputUnits = {\n 'px-number': 'px',\n 'rem-number': 'rem',\n} as const;\n\ntype ThemePreviewInputUnit = (typeof themePreviewInputUnits)[keyof typeof themePreviewInputUnits];\n\nconst themePreviewMuiColorShades = [\n '50',\n '100',\n '200',\n '300',\n '400',\n '500',\n '600',\n '700',\n '800',\n '900',\n 'A100',\n 'A200',\n 'A400',\n 'A700',\n] as const;\nconst themePreviewMuiColorPalettes = [\n ['Blue', blue],\n ['Light Blue', lightBlue],\n ['Cyan', cyan],\n ['Teal', teal],\n ['Green', green],\n ['Amber', amber],\n ['Orange', orange],\n ['Deep Orange', deepOrange],\n ['Red', red],\n ['Pink', pink],\n ['Purple', purple],\n ['Deep Purple', deepPurple],\n ['Indigo', indigo],\n ['Grey', grey],\n ['Blue Grey', blueGrey],\n] as const;\nconst themePreviewMuiPaletteColorRows = themePreviewMuiColorPalettes.map(([label, palette]) => ({\n label,\n colors: themePreviewMuiColorShades.reduce<Array<{\n key: string;\n shade: string;\n value: string;\n }>>((acc, shade) => {\n const paletteValue = (palette as Record<string, string>)[shade];\n\n if (!paletteValue) {\n return acc;\n }\n\n acc.push({\n key: `${label}-${shade}`,\n shade,\n value: paletteValue,\n });\n\n return acc;\n }, []),\n}));\nconst THEME_PREVIEW_COLOR_PICKER_APPLY_DELAY_MS = 500;\nconst THEME_PREVIEW_SMALL_FIELD_HEIGHT = 32;\nconst THEME_PREVIEW_PICKER_SWATCH_HEIGHT = 20;\n\nfunction getUnitInputDisplayValue(value: string, unit: ThemePreviewInputUnit) {\n return value.replace(new RegExp(`${unit}$`, 'i'), '');\n}\n\nfunction normalizeUnitInputDisplayValue(value: string) {\n const sanitizedValue = value.replace(/[^0-9.,]/g, '').replace(/,/g, '.');\n const decimalPointIndex = sanitizedValue.indexOf('.');\n\n if (decimalPointIndex < 0) {\n return sanitizedValue;\n }\n\n const integerPart = sanitizedValue.slice(0, decimalPointIndex);\n const decimalPart = sanitizedValue.slice(decimalPointIndex + 1).replace(/\\./g, '');\n\n return `${integerPart}.${decimalPart}`;\n}\n\nfunction normalizeCommittedUnitInputDisplayValue(value: string) {\n const normalizedValue = normalizeUnitInputDisplayValue(value);\n\n if (!normalizedValue || normalizedValue === '.') {\n return '';\n }\n\n if (normalizedValue.startsWith('.')) {\n return `0${normalizedValue}`;\n }\n\n if (normalizedValue.endsWith('.')) {\n return normalizedValue.slice(0, -1);\n }\n\n return normalizedValue;\n}\n\nfunction normalizeUnitInputValue(value: string, unit: ThemePreviewInputUnit) {\n const normalizedValue = normalizeCommittedUnitInputDisplayValue(value);\n\n return normalizedValue ? `${normalizedValue}${unit}` : '';\n}\n\nfunction getUnitValueFormat(valueFormat?: ThemePreviewFieldDefinition['valueFormat']) {\n return (valueFormat ? themePreviewInputUnits[valueFormat] : null) ?? null;\n}\n\nexport function ThemePreviewColorField({\n disabled = false,\n definition,\n resetVersion,\n sectionKey,\n settings,\n onChange,\n onReset,\n}: ThemePreviewColorFieldProps) {\n const [muiPaletteAnchorElement, setMuiPaletteAnchorElement] = useState<HTMLElement | null>(null);\n const value = getThemePreviewPaletteValue(settings, sectionKey, definition.path);\n const unitValueFormat = getUnitValueFormat(definition.valueFormat);\n const showColorPicker = definition.showColorPicker !== false;\n const alphaValue = definition.allowAlpha ? getColorAlphaValue(value) : null;\n const helperText = [definition.description];\n\n if (definition.allowAlpha) {\n helperText.push(\n alphaValue\n ? `알파값은 ${alphaValue}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.`\n : '알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.',\n );\n }\n\n const resolvedHelperText = helperText.filter(Boolean).join(' ');\n const hasOptions = Boolean(definition.options?.length);\n const isReadOnlyColorTextInput = Boolean(\n definition.allowAlpha && showColorPicker && !hasOptions && !unitValueFormat,\n );\n const displayValue =\n unitValueFormat ? getUnitInputDisplayValue(value, unitValueFormat) : value;\n const hasPickerControls = showColorPicker;\n const canBufferTextInput = !hasOptions && !isReadOnlyColorTextInput;\n const [bufferedTextValue, setBufferedTextValue] = useState(displayValue);\n const [isBufferedTextInputFocused, setIsBufferedTextInputFocused] = useState(false);\n const [bufferedPickerValue, setBufferedPickerValue] = useState(toColorPickerValue(value));\n const [isBufferedPickerDirty, setIsBufferedPickerDirty] = useState(false);\n const colorPickerApplyTimeoutRef = useRef<number | null>(null);\n\n useEffect(() => {\n if (!canBufferTextInput || isBufferedTextInputFocused) {\n return;\n }\n\n setBufferedTextValue(displayValue);\n }, [canBufferTextInput, displayValue, isBufferedTextInputFocused]);\n\n useEffect(() => {\n if (isBufferedPickerDirty) {\n return;\n }\n\n setBufferedPickerValue(toColorPickerValue(value));\n }, [isBufferedPickerDirty, value]);\n\n useEffect(() => {\n return () => {\n if (!colorPickerApplyTimeoutRef.current) {\n return;\n }\n\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n };\n }, []);\n\n useEffect(() => {\n if (typeof resetVersion === 'undefined') {\n return;\n }\n\n if (colorPickerApplyTimeoutRef.current) {\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n colorPickerApplyTimeoutRef.current = null;\n }\n\n setBufferedTextValue(displayValue);\n setIsBufferedTextInputFocused(false);\n setBufferedPickerValue(toColorPickerValue(value));\n setIsBufferedPickerDirty(false);\n }, [resetVersion]);\n\n const commitBufferedTextValue = (nextValue: string) => {\n onChange(\n definition.path,\n unitValueFormat ? normalizeUnitInputValue(nextValue, unitValueFormat) : nextValue,\n );\n };\n const commitBufferedPickerValue = (nextPickerValue: string) => {\n if (colorPickerApplyTimeoutRef.current) {\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n colorPickerApplyTimeoutRef.current = null;\n }\n\n setIsBufferedPickerDirty(false);\n onChange(definition.path, applyColorPickerValue(value, nextPickerValue));\n };\n const inputEndAdornment = onReset || unitValueFormat ? (\n <InputAdornment position=\"end\">\n <div className=\"flex items-center gap-2\">\n {onReset ? (\n <IconButton\n size=\"small\"\n aria-label={`${definition.label} reset`}\n disabled={disabled}\n edge=\"end\"\n onMouseDown={(event) => {\n event.preventDefault();\n }}\n onClick={() => {\n onReset(definition.path);\n }}\n sx={{\n border: '1px solid #cbd5e1',\n borderRadius: 1,\n color: '#6b7280',\n p: 0.25,\n }}\n >\n <RestartAltOutlinedIcon sx={{ fontSize: 16 }} />\n </IconButton>\n ) : null}\n {unitValueFormat ? <Typography variant=\"body2\">{unitValueFormat}</Typography> : null}\n </div>\n </InputAdornment>\n ) : undefined;\n\n return (\n <div className=\"grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12\">\n <TextField\n select={hasOptions}\n label={definition.label}\n size=\"small\"\n value={canBufferTextInput ? bufferedTextValue : displayValue}\n disabled={disabled}\n onChange={(event) => {\n if (isReadOnlyColorTextInput) {\n return;\n }\n\n const nextValue = unitValueFormat\n ? normalizeUnitInputDisplayValue(event.target.value)\n : event.target.value;\n\n if (canBufferTextInput) {\n setBufferedTextValue(nextValue);\n return;\n }\n\n onChange(definition.path, nextValue);\n }}\n onFocus={() => {\n if (!canBufferTextInput) {\n return;\n }\n\n setIsBufferedTextInputFocused(true);\n }}\n onBlur={() => {\n if (!canBufferTextInput) {\n return;\n }\n\n setIsBufferedTextInputFocused(false);\n commitBufferedTextValue(bufferedTextValue);\n }}\n onKeyDown={(event) => {\n if (!canBufferTextInput || event.key !== 'Enter') {\n return;\n }\n\n event.preventDefault();\n setIsBufferedTextInputFocused(false);\n commitBufferedTextValue(bufferedTextValue);\n event.currentTarget.blur();\n }}\n helperText={resolvedHelperText}\n slotProps={{\n htmlInput:\n {\n ...(unitValueFormat\n ? {\n inputMode: 'decimal',\n }\n : {}),\n ...(isReadOnlyColorTextInput\n ? {\n readOnly: true,\n }\n : {}),\n },\n input:\n {\n ...(inputEndAdornment\n ? {\n endAdornment: inputEndAdornment,\n }\n : {}),\n },\n }}\n >\n {definition.options?.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </TextField>\n\n {hasPickerControls ? (\n <div className=\"grid grid-cols-2 gap-6\">\n <>\n <Button\n size=\"small\"\n fullWidth\n variant=\"outlined\"\n disabled={disabled}\n sx={{\n fontSize: '1.2rem',\n height: THEME_PREVIEW_SMALL_FIELD_HEIGHT,\n minWidth: 0,\n }}\n onClick={(event) => {\n setMuiPaletteAnchorElement(event.currentTarget);\n }}\n >\n MUI\n </Button>\n <TextField\n hiddenLabel\n type=\"color\"\n size=\"small\"\n value={bufferedPickerValue}\n disabled={disabled}\n onChange={(event) => {\n const nextPickerValue = event.target.value;\n\n setBufferedPickerValue(nextPickerValue);\n setIsBufferedPickerDirty(true);\n\n if (colorPickerApplyTimeoutRef.current) {\n window.clearTimeout(colorPickerApplyTimeoutRef.current);\n }\n\n colorPickerApplyTimeoutRef.current = window.setTimeout(() => {\n commitBufferedPickerValue(nextPickerValue);\n }, THEME_PREVIEW_COLOR_PICKER_APPLY_DELAY_MS);\n }}\n onBlur={() => {\n if (!isBufferedPickerDirty) {\n return;\n }\n\n commitBufferedPickerValue(bufferedPickerValue);\n }}\n slotProps={{\n htmlInput: {\n 'aria-label': 'Pick color',\n },\n }}\n sx={{\n '& .MuiOutlinedInput-root': {\n height: THEME_PREVIEW_SMALL_FIELD_HEIGHT,\n px: 0.5,\n },\n '& input[type=\"color\"]': {\n WebkitAppearance: 'none',\n alignSelf: 'center',\n boxSizing: 'border-box',\n border: 0,\n borderRadius: 0,\n display: 'block',\n height: THEME_PREVIEW_PICKER_SWATCH_HEIGHT,\n minHeight: THEME_PREVIEW_PICKER_SWATCH_HEIGHT,\n overflow: 'hidden',\n padding: 0,\n p: 0,\n width: '100%',\n },\n '& input[type=\"color\"]::-webkit-color-swatch-wrapper': {\n borderRadius: 0,\n p: 0,\n },\n '& input[type=\"color\"]::-webkit-color-swatch': {\n borderColor: '#94a3b8',\n borderRadius: 0,\n },\n '& input[type=\"color\"]::-moz-color-swatch': {\n borderColor: '#94a3b8',\n borderRadius: 0,\n },\n }}\n />\n {muiPaletteAnchorElement ? (\n <Popover\n open\n anchorEl={muiPaletteAnchorElement}\n transitionDuration={0}\n onClose={() => {\n setMuiPaletteAnchorElement(null);\n }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n slotProps={{\n paper: {\n sx: {\n maxHeight: 'calc(100vh - 32px)',\n maxWidth: 'calc(100vw - 32px)',\n minWidth: 320,\n overflow: 'auto',\n p: 1.5,\n width: 'min(760px, calc(100vw - 32px))',\n },\n },\n }}\n >\n <div className=\"flex min-w-0 flex-col gap-10\">\n {themePreviewMuiPaletteColorRows.map((paletteRow, paletteRowIndex) => (\n <Box key={paletteRow.label} className=\"flex flex-col gap-10\">\n {paletteRowIndex > 0 ? <Divider flexItem /> : null}\n <Box\n sx={{\n display: 'grid',\n gap: 1,\n gridTemplateColumns: {\n xs: 'minmax(0, 1fr)',\n sm: '84px minmax(0, 1fr)',\n },\n }}\n >\n <Typography variant=\"caption\" color=\"text.secondary\">\n {paletteRow.label}\n </Typography>\n <Box\n sx={{\n display: 'grid',\n gap: 0.75,\n gridTemplateColumns: 'repeat(auto-fit, minmax(68px, 1fr))',\n minWidth: 0,\n }}\n >\n {paletteRow.colors.map((colorItem) => (\n <Box\n key={colorItem.key}\n component=\"button\"\n type=\"button\"\n onClick={() => {\n onChange(\n definition.path,\n applyColorPickerValue(value, colorItem.value),\n );\n setMuiPaletteAnchorElement(null);\n }}\n sx={{\n alignItems: 'center',\n backgroundColor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 1,\n color: 'text.secondary',\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'column',\n gap: 0.5,\n justifyContent: 'center',\n minWidth: 0,\n p: 0.5,\n transition: 'background-color 120ms ease, border-color 120ms ease',\n width: '100%',\n '&:hover': {\n backgroundColor: 'action.hover',\n borderColor: 'text.secondary',\n },\n }}\n >\n <Box\n sx={{\n width: 30,\n height: 30,\n borderRadius: 1,\n backgroundColor: colorItem.value,\n border: '1px solid',\n borderColor: 'divider',\n }}\n />\n <Box\n component=\"span\"\n sx={{\n fontSize: '0.75rem',\n fontWeight: 600,\n lineHeight: 1,\n }}\n >\n {colorItem.shade}\n </Box>\n </Box>\n ))}\n </Box>\n </Box>\n </Box>\n ))}\n </div>\n </Popover>\n ) : null}\n </>\n {definition.allowAlpha ? (\n <div className=\"col-span-2 flex flex-col gap-2\">\n <Typography variant=\"caption\" color=\"text.secondary\">\n Current\n </Typography>\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n className=\"truncate whitespace-nowrap\"\n >\n {value || '-'}\n </Typography>\n </div>\n ) : null}\n </div>\n ) : (\n <div />\n )}\n </div>\n );\n}\n"],"names":["themePreviewInputUnits","themePreviewMuiColorShades","themePreviewMuiColorPalettes","blue","lightBlue","cyan","teal","green","amber","orange","deepOrange","red","pink","purple","deepPurple","indigo","grey","blueGrey","themePreviewMuiPaletteColorRows","label","palette","acc","shade","paletteValue","THEME_PREVIEW_COLOR_PICKER_APPLY_DELAY_MS","THEME_PREVIEW_SMALL_FIELD_HEIGHT","THEME_PREVIEW_PICKER_SWATCH_HEIGHT","getUnitInputDisplayValue","value","unit","__name","normalizeUnitInputDisplayValue","sanitizedValue","decimalPointIndex","integerPart","decimalPart","normalizeCommittedUnitInputDisplayValue","normalizedValue","normalizeUnitInputValue","getUnitValueFormat","valueFormat","ThemePreviewColorField","disabled","definition","resetVersion","sectionKey","settings","onChange","onReset","muiPaletteAnchorElement","setMuiPaletteAnchorElement","useState","getThemePreviewPaletteValue","unitValueFormat","showColorPicker","alphaValue","getColorAlphaValue","helperText","resolvedHelperText","hasOptions","_a","isReadOnlyColorTextInput","displayValue","hasPickerControls","canBufferTextInput","bufferedTextValue","setBufferedTextValue","isBufferedTextInputFocused","setIsBufferedTextInputFocused","bufferedPickerValue","setBufferedPickerValue","toColorPickerValue","isBufferedPickerDirty","setIsBufferedPickerDirty","colorPickerApplyTimeoutRef","useRef","useEffect","commitBufferedTextValue","nextValue","commitBufferedPickerValue","nextPickerValue","applyColorPickerValue","inputEndAdornment","jsx","InputAdornment","jsxs","IconButton","event","RestartAltOutlinedIcon","Typography","TextField","_b","option","MenuItem","Fragment","Button","Popover","paletteRow","paletteRowIndex","Box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