@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.
Files changed (91) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.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/OwpTable/OwpFieldTable.js +108 -92
  15. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  16. package/dist/components/OwpTable/OwpTable.js +161 -141
  17. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  18. package/dist/components/OwpTable/internal/FieldTableValue.js +43 -0
  19. package/dist/components/OwpTable/internal/FieldTableValue.js.map +1 -0
  20. package/dist/components/OwpTable/internal/defaultTableStyle.js +13 -10
  21. package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
  22. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +170 -169
  23. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  24. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +195 -147
  25. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  26. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +79 -76
  27. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  28. package/dist/configs/defaultConfig.js +110 -70
  29. package/dist/configs/defaultConfig.js.map +1 -1
  30. package/dist/constants/tableTheme.js +7 -6
  31. package/dist/constants/tableTheme.js.map +1 -1
  32. package/dist/features/themePreview/components/ThemePreviewCanvas.js +275 -273
  33. package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
  34. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +552 -316
  35. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
  36. package/dist/features/themePreview/components/ThemePreviewColorField.js +227 -202
  37. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  38. package/dist/features/themePreview/components/ThemePreviewControls.js +270 -220
  39. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
  40. package/dist/features/themePreview/components/themePreviewCanvas.shared.js +38 -38
  41. package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -1
  42. package/dist/features/themePreview/configs/settings.js +33 -20
  43. package/dist/features/themePreview/configs/settings.js.map +1 -1
  44. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +227 -220
  45. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  46. package/dist/features/themePreview/hooks/useThemePreview.js +250 -226
  47. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  48. package/dist/features/themePreview/utils/themePreviewDefinitions.js +63 -30
  49. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  50. package/dist/features/themePreview/utils/themePreviewSettings.js +188 -151
  51. package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -1
  52. package/dist/features/themePreview.js +18 -17
  53. package/dist/layout/components/navbar/NavbarToggleButton.js +46 -42
  54. package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
  55. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  56. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  57. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.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/constants.js +1 -1
  61. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.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/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  72. 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
  73. package/dist/owp-app.css +1 -1
  74. package/dist/types/components/OwpTable/OwpFieldTable.d.ts +7 -3
  75. package/dist/types/components/OwpTable/OwpTable.d.ts +3 -1
  76. package/dist/types/components/OwpTable/internal/FieldTableValue.d.ts +17 -0
  77. package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +3 -0
  78. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +3 -1
  79. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +1 -1
  80. package/dist/types/configs/defaultConfig.d.ts +42 -3
  81. package/dist/types/constants/tableTheme.d.ts +1 -0
  82. package/dist/types/features/themePreview/components/ThemePreviewCanvasSections.d.ts +8 -0
  83. package/dist/types/features/themePreview/components/themePreviewCanvas.shared.d.ts +3 -3
  84. package/dist/types/features/themePreview/configs/settings.d.ts +12 -0
  85. package/dist/types/features/themePreview/utils/index.d.ts +1 -1
  86. package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +11 -1
  87. package/dist/types/index.d.ts +1 -0
  88. package/dist/types/types/OwpMuiThemeTypes.d.ts +9 -0
  89. package/dist/types/types/OwpTableThemeTypes.d.ts +1 -0
  90. package/dist/types/types/index.d.ts +1 -0
  91. package/package.json +1 -1
@@ -1,74 +1,75 @@
1
- var oe = Object.defineProperty;
2
- var s = (r, d) => oe(r, "name", { value: d, configurable: !0 });
3
- import { jsx as o, jsxs as m } 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 { ButtonBase as te, Typography as g, Paper as $, TextField as L, MenuItem as S, Divider as le, Box as ne, IconButton as ae, FormControlLabel as ie, Checkbox as se } from "@mui/material";
5
- import de 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 { ThemeProvider as ce, createTheme as he } from "@mui/material/styles";
7
- import { useState as ue, useMemo as A } from "react";
8
- import { ThemePreviewColorField as _ } from "./ThemePreviewColorField.js";
9
- import { getThemePreviewPresetOptionsByMode as me, THEME_PREVIEW_CUSTOM_PRESET_KEY as O, isThemePreviewCustomSection as fe, getThemePreviewPaletteValue as G } from "../utils/themePreviewSettings.js";
10
- import { themePreviewFieldGroupsBySection as pe, themePreviewSectionOptions as q } from "../utils/themePreviewDefinitions.js";
11
- import { deriveThemePreviewPaletteGroupValues as be } from "../utils/color.js";
12
- function Ce(r) {
1
+ var ae = Object.defineProperty;
2
+ var s = (r, d) => ae(r, "name", { value: d, configurable: !0 });
3
+ import { jsx as o, jsxs as h } 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, ButtonBase as se, Typography as x, Paper as A, TextField as Z, Divider as q, Box as de, IconButton as ce, FormControlLabel as ue, Checkbox as he } 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 { ThemeProvider as fe, createTheme as pe } from "@mui/material/styles";
7
+ import { useState as be, useRef as Ce, useMemo as B, useEffect as ge } from "react";
8
+ import { toolbarCuratedPresetKeys as ve, designSystemPresetKeys as xe } from "../configs/presets.js";
9
+ import { ThemePreviewColorField as J } from "./ThemePreviewColorField.js";
10
+ import { getThemePreviewPresetOptionsByMode as ye, THEME_PREVIEW_CUSTOM_PRESET_KEY as O, isThemePreviewCustomSection as ke, getThemePreviewPaletteValue as R } from "../utils/themePreviewSettings.js";
11
+ import { themePreviewFieldGroupsBySection as Pe, themePreviewSectionOptions as ee } from "../utils/themePreviewDefinitions.js";
12
+ import { deriveThemePreviewPaletteGroupValues as we } from "../utils/color.js";
13
+ function Te(r) {
13
14
  return r.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (d) => d.toUpperCase());
14
15
  }
15
- s(Ce, "getThemePreviewFieldClusterLabel");
16
- function ve(r) {
17
- const d = r.find((p) => p.path.endsWith(".main")), b = r.find((p) => p.path.endsWith(".light")), f = r.find((p) => p.path.endsWith(".dark")), c = r.find((p) => p.path.endsWith(".contrastText"));
18
- return !d || !b && !f && !c ? null : {
16
+ s(Te, "getThemePreviewFieldClusterLabel");
17
+ function Be(r) {
18
+ const d = r.find((f) => f.path.endsWith(".main")), p = r.find((f) => f.path.endsWith(".light")), m = r.find((f) => f.path.endsWith(".dark")), c = r.find((f) => f.path.endsWith(".contrastText"));
19
+ return !d || !p && !m && !c ? null : {
19
20
  mainPath: d.path,
20
- lightPath: b == null ? void 0 : b.path,
21
- darkPath: f == null ? void 0 : f.path,
21
+ lightPath: p == null ? void 0 : p.path,
22
+ darkPath: m == null ? void 0 : m.path,
22
23
  contrastTextPath: c == null ? void 0 : c.path
23
24
  };
24
25
  }
25
- s(ve, "getThemePreviewAutoDerivedFieldPaths");
26
- function xe(r) {
26
+ s(Be, "getThemePreviewAutoDerivedFieldPaths");
27
+ function Me(r) {
27
28
  const d = r.reduce(
28
- (t, h) => {
29
- const n = h.path.split(".")[0] ?? "";
30
- return n && (t[n] || (t[n] = []), t[n].push(h)), t;
29
+ (t, u) => {
30
+ const i = u.path.split(".")[0] ?? "";
31
+ return i && (t[i] || (t[i] = []), t[i].push(u)), t;
31
32
  },
32
33
  {}
33
- ), b = Object.fromEntries(
34
- Object.entries(d).map(([t, h]) => [
34
+ ), p = Object.fromEntries(
35
+ Object.entries(d).map(([t, u]) => [
35
36
  t,
36
- h.length
37
+ u.length
37
38
  ])
38
- ), f = new Set(
39
- Object.entries(b).filter(([, t]) => t > 1).map(([t]) => t)
39
+ ), m = new Set(
40
+ Object.entries(p).filter(([, t]) => t > 1).map(([t]) => t)
40
41
  ), c = r.some(
41
- (t) => !f.has(t.path.split(".")[0] ?? "")
42
+ (t) => !m.has(t.path.split(".")[0] ?? "")
42
43
  );
43
- if (!(f.size > 1 || c))
44
+ if (!(m.size > 1 || c))
44
45
  return r.map((t) => ({
45
46
  key: t.path,
46
47
  fields: [t]
47
48
  }));
48
- const B = /* @__PURE__ */ new Set();
49
- return r.reduce((t, h) => {
50
- const n = h.path.split(".")[0] ?? "";
51
- if (!f.has(n))
49
+ const F = /* @__PURE__ */ new Set();
50
+ return r.reduce((t, u) => {
51
+ const i = u.path.split(".")[0] ?? "";
52
+ if (!m.has(i))
52
53
  return t.push({
53
- key: h.path,
54
- fields: [h]
54
+ key: u.path,
55
+ fields: [u]
55
56
  }), t;
56
- if (B.has(n))
57
+ if (F.has(i))
57
58
  return t;
58
- B.add(n);
59
- const F = d[n] ?? [h];
59
+ F.add(i);
60
+ const S = d[i] ?? [u];
60
61
  return t.push({
61
- key: n,
62
- label: Ce(n),
63
- fields: F,
64
- autoDerivedFieldPaths: ve(F) ?? void 0
62
+ key: i,
63
+ label: Te(i),
64
+ fields: S,
65
+ autoDerivedFieldPaths: Be(S) ?? void 0
65
66
  }), t;
66
67
  }, []);
67
68
  }
68
- s(xe, "getThemePreviewFieldClusters");
69
- const ge = Object.fromEntries(
70
- q.map((r) => [r.key, r])
71
- ), x = {
69
+ s(Me, "getThemePreviewFieldClusters");
70
+ const Fe = Object.fromEntries(
71
+ ee.map((r) => [r.key, r])
72
+ ), g = {
72
73
  active: {
73
74
  backgroundColor: "#1ea3e6",
74
75
  borderColor: "#1591cf",
@@ -81,23 +82,26 @@ const ge = Object.fromEntries(
81
82
  descriptionColor: "#6b7280",
82
83
  textColor: "#111827"
83
84
  }
84
- }, T = "#d8dee8", ke = "#d1d7e0", Pe = "#f8fafc", D = "#ffffff", k = "#111827", P = "#6b7280", Y = "#ffffff", J = "#cbd5e1", ye = "#94a3b8", E = "#1ea3e6", Z = "#111827", we = "#f8fafc", Te = "#f8fafc", Be = he({
85
+ }, M = "#d8dee8", Se = "#d1d7e0", Ee = "#f8fafc", D = "#ffffff", y = "#111827", v = "#6b7280", Q = "#ffffff", re = "#cbd5e1", Ne = "#94a3b8", z = "#1ea3e6", V = "#111827", Ie = "#f8fafc", We = "#f8fafc", ze = `특별한 경우가 아니면 연동 색상 편집은 권장하지 않습니다.
86
+
87
+ Primary Main 값을 선택하면 Light, Dark, Contrast 값이 자동으로 채워집니다.
88
+ 특수한 디자인 조정이 필요한 경우에만 직접 편집하세요.`, je = pe({
85
89
  palette: {
86
90
  mode: "light",
87
91
  background: {
88
92
  default: D,
89
93
  paper: D
90
94
  },
91
- divider: T,
95
+ divider: M,
92
96
  primary: {
93
- main: E
97
+ main: z
94
98
  },
95
99
  secondary: {
96
- main: E
100
+ main: z
97
101
  },
98
102
  text: {
99
- primary: k,
100
- secondary: P
103
+ primary: y,
104
+ secondary: v
101
105
  }
102
106
  },
103
107
  typography: {
@@ -110,266 +114,305 @@ const ge = Object.fromEntries(
110
114
  fontSize: "1.3rem"
111
115
  }
112
116
  }
113
- }), Fe = {
114
- color: k,
117
+ }), Ke = {
118
+ color: y,
115
119
  "& .MuiFormHelperText-root": {
116
- color: P
120
+ color: v
117
121
  },
118
122
  "& .MuiInputAdornment-root": {
119
- color: P
123
+ color: v
120
124
  },
121
125
  "& .MuiInputLabel-root": {
122
- color: P
126
+ color: v
123
127
  },
124
128
  "& .MuiInputLabel-root.Mui-focused": {
125
- color: k
129
+ color: y
126
130
  },
127
131
  "& .MuiInputBase-input": {
128
- color: k
132
+ color: y
129
133
  },
130
134
  "& .MuiOutlinedInput-root": {
131
- backgroundColor: Y,
132
- color: k,
135
+ backgroundColor: Q,
136
+ color: y,
133
137
  "& fieldset": {
134
- borderColor: J
138
+ borderColor: re
135
139
  },
136
140
  "&:hover fieldset": {
137
- borderColor: ye
141
+ borderColor: Ne
138
142
  },
139
143
  "&.Mui-focused fieldset": {
140
- borderColor: E,
144
+ borderColor: z,
141
145
  borderWidth: 1
142
146
  }
143
147
  },
144
148
  "& .MuiSelect-icon": {
145
- color: P
149
+ color: v
146
150
  },
147
151
  "& .MuiButton-outlined": {
148
- backgroundColor: Y,
149
- borderColor: Z,
150
- color: k,
152
+ backgroundColor: Q,
153
+ borderColor: V,
154
+ color: y,
151
155
  "&:hover": {
152
- backgroundColor: we,
153
- borderColor: Z
156
+ backgroundColor: Ie,
157
+ borderColor: V
154
158
  }
155
159
  },
156
160
  "& .MuiCheckbox-root": {
157
- color: P
161
+ color: v
158
162
  },
159
163
  "& .MuiCheckbox-root.Mui-checked": {
160
- color: E
164
+ color: z
161
165
  },
162
166
  "& .MuiDivider-root": {
163
- borderColor: T
167
+ borderColor: M
164
168
  }
165
- };
166
- function Ge({
169
+ }, Le = /* @__PURE__ */ new Set([
170
+ ...ve,
171
+ ...xe
172
+ ]), X = /* @__PURE__ */ new Set(["tableFieldHeader", "tableFieldCell"]);
173
+ function Je({
167
174
  activeSection: r,
168
175
  presetOptions: d,
169
- selectedMode: b,
170
- selectedPresetKey: f,
176
+ selectedMode: p,
177
+ selectedPresetKey: m,
171
178
  settings: c,
172
- resetVersion: p,
173
- onSectionChange: B,
179
+ resetVersion: f,
180
+ onSectionChange: F,
174
181
  onPaletteValueChange: t,
175
- onPaletteValuesChange: h,
176
- onPaletteValueReset: n,
177
- onPaletteValuesReset: F,
178
- onPresetKeyChange: Q,
179
- onPresetModeChange: V
182
+ onPaletteValuesChange: u,
183
+ onPaletteValueReset: i,
184
+ onPaletteValuesReset: S,
185
+ onPresetKeyChange: oe,
186
+ onPresetModeChange: te
180
187
  }) {
181
- const [X, ee] = ue({}), M = !fe(r), C = M ? r : null, re = A(
182
- () => M && C ? me(d, C, b) : [],
183
- [M, d, C, b]
184
- ), R = pe[r], N = A(
185
- () => R.map((e) => ({
188
+ const [le, ne] = be({}), j = Ce(null), E = !ke(r), b = E ? r : null, N = B(
189
+ () => E && b ? ye(d, b, p) : [],
190
+ [E, d, b, p]
191
+ ), G = B(
192
+ () => {
193
+ var e;
194
+ return (e = N.find(
195
+ (l) => !Le.has(l.key)
196
+ )) == null ? void 0 : e.key;
197
+ },
198
+ [N]
199
+ ), H = Pe[r], I = B(
200
+ () => H.map((e) => ({
186
201
  ...e,
187
- fieldClusters: xe(e.fields)
202
+ fieldClusters: Me(e.fields)
188
203
  })),
189
- [R]
190
- ), H = A(() => {
204
+ [H]
205
+ ), U = B(() => {
191
206
  if (r !== "table")
192
207
  return [
193
208
  {
194
209
  key: r,
195
- fieldGroups: N
210
+ fieldGroups: I
196
211
  }
197
212
  ];
198
- const e = /* @__PURE__ */ new Set(["tableFieldHeader", "tableFieldCell"]), l = N.filter(
199
- (u) => e.has(u.key)
200
- ), i = N.filter(
201
- (u) => !e.has(u.key)
213
+ const e = I.filter(
214
+ (n) => X.has(n.key)
215
+ ), l = I.filter(
216
+ (n) => !X.has(n.key)
202
217
  );
203
218
  return [
204
219
  {
205
220
  key: "table-field",
206
221
  label: "Field Table",
207
- fieldGroups: l
222
+ fieldGroups: e
208
223
  },
209
224
  {
210
225
  key: "table-base",
211
226
  label: "Table",
212
- fieldGroups: i
227
+ fieldGroups: l
213
228
  }
214
- ].filter((u) => u.fieldGroups.length > 0);
215
- }, [r, N]), W = ge[r], K = /* @__PURE__ */ s((e, l, i) => {
216
- const u = G(c, e, "common.white") || "#FFFFFF", y = G(c, e, "common.black") || "#111827", a = be(i, {
217
- whiteTextColor: u,
218
- blackTextColor: y
229
+ ].filter((n) => n.fieldGroups.length > 0);
230
+ }, [r, I]), K = Fe[r], ie = B(
231
+ () => N.flatMap((e) => {
232
+ const l = [];
233
+ return e.key === G && l.push(
234
+ /* @__PURE__ */ o(
235
+ q,
236
+ {
237
+ component: "li",
238
+ role: "presentation",
239
+ textAlign: "center",
240
+ sx: {
241
+ color: v,
242
+ fontSize: "1.2rem",
243
+ my: 0.5
244
+ },
245
+ children: "legacy"
246
+ },
247
+ "preset-legacy-divider"
248
+ )
249
+ ), l.push(
250
+ /* @__PURE__ */ o(W, { value: e.key, children: e.label }, e.key)
251
+ ), l;
252
+ }),
253
+ [G, N]
254
+ );
255
+ ge(() => {
256
+ j.current && (j.current.scrollTop = 0);
257
+ }, [r]);
258
+ const _ = /* @__PURE__ */ s((e, l, n) => {
259
+ const k = R(c, e, "common.white") || "#FFFFFF", w = R(c, e, "common.black") || "#111827", a = we(n, {
260
+ whiteTextColor: k,
261
+ blackTextColor: w
219
262
  });
220
263
  return a ? [
221
264
  l.lightPath ? { path: l.lightPath, value: a.light } : null,
222
265
  l.darkPath ? { path: l.darkPath, value: a.dark } : null,
223
266
  l.contrastTextPath ? { path: l.contrastTextPath, value: a.contrastText } : null
224
- ].filter((j) => !!j) : [];
225
- }, "getAutoDerivedUpdates"), U = /* @__PURE__ */ s((e) => {
267
+ ].filter((L) => !!L) : [];
268
+ }, "getAutoDerivedUpdates"), Y = /* @__PURE__ */ s((e) => {
226
269
  const l = e.fieldClusters.flatMap(
227
- (i) => i.fields.map((u) => u.path)
270
+ (n) => n.fields.map((k) => k.path)
228
271
  );
229
- return /* @__PURE__ */ m("div", { className: "flex flex-col gap-12", children: [
230
- e.label ? /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-8", children: [
231
- /* @__PURE__ */ o(g, { variant: "subtitle1", fontWeight: 700, children: e.label }),
272
+ return /* @__PURE__ */ h("div", { className: "flex flex-col gap-12", children: [
273
+ e.label ? /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-8", children: [
274
+ /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 700, children: e.label }),
232
275
  /* @__PURE__ */ o(
233
- ae,
276
+ ce,
234
277
  {
235
278
  size: "small",
236
279
  "aria-label": `${e.label} reset`,
237
280
  onClick: /* @__PURE__ */ s(() => {
238
- F(l);
281
+ S(l);
239
282
  }, "onClick"),
240
283
  sx: {
241
- border: `1px solid ${J}`,
284
+ border: `1px solid ${re}`,
242
285
  borderRadius: 1,
243
- color: P,
286
+ color: v,
244
287
  p: 0.5
245
288
  },
246
- children: /* @__PURE__ */ o(de, { sx: { fontSize: 18 } })
289
+ children: /* @__PURE__ */ o(me, { sx: { fontSize: 18 } })
247
290
  }
248
291
  )
249
292
  ] }) : null,
250
- /* @__PURE__ */ o("div", { className: "grid gap-12", children: e.fieldClusters.map((i) => {
251
- if (!i.label)
252
- return i.fields.map((v) => /* @__PURE__ */ o(
253
- _,
293
+ /* @__PURE__ */ o("div", { className: "grid gap-12", children: e.fieldClusters.map((n) => {
294
+ if (!n.label)
295
+ return n.fields.map((C) => /* @__PURE__ */ o(
296
+ J,
254
297
  {
255
- definition: v,
256
- resetVersion: p,
298
+ definition: C,
299
+ resetVersion: f,
257
300
  sectionKey: r,
258
301
  settings: c,
259
302
  onChange: t,
260
- onReset: n
303
+ onReset: i
261
304
  },
262
- v.path
305
+ C.path
263
306
  ));
264
- const u = `${r}:${e.key}:${i.key}`, y = !!X[u], a = i.autoDerivedFieldPaths, j = !!(a && C);
265
- return /* @__PURE__ */ m(
266
- $,
307
+ const k = `${r}:${e.key}:${n.key}`, w = !!le[k], a = n.autoDerivedFieldPaths, L = !!(a && b);
308
+ return /* @__PURE__ */ h(
309
+ A,
267
310
  {
268
311
  variant: "outlined",
269
312
  sx: {
270
- backgroundColor: Pe,
271
- borderColor: ke,
313
+ backgroundColor: Ee,
314
+ borderColor: Se,
272
315
  display: "flex",
273
316
  flexDirection: "column",
274
317
  gap: 1.5,
275
318
  p: 1.5
276
319
  },
277
320
  children: [
278
- /* @__PURE__ */ m("div", { className: "flex items-start justify-between gap-12", children: [
279
- /* @__PURE__ */ o(g, { variant: "body2", fontWeight: 700, children: i.label }),
280
- j ? /* @__PURE__ */ o(
281
- ie,
321
+ /* @__PURE__ */ h("div", { className: "flex items-start justify-between gap-12", children: [
322
+ /* @__PURE__ */ o(x, { variant: "body2", fontWeight: 700, children: n.label }),
323
+ L ? /* @__PURE__ */ o(
324
+ ue,
282
325
  {
283
326
  className: "m-0",
284
327
  control: /* @__PURE__ */ o(
285
- se,
328
+ he,
286
329
  {
287
330
  size: "small",
288
- checked: y,
289
- onChange: /* @__PURE__ */ s((v) => {
290
- const I = v.target.checked;
291
- ee((w) => ({
292
- ...w,
293
- [u]: I
294
- })), !I && (!C || !a || h(
295
- K(
296
- C,
331
+ checked: w,
332
+ onChange: /* @__PURE__ */ s((C) => {
333
+ const T = C.target.checked;
334
+ T && !window.confirm(
335
+ ze
336
+ ) || (ne((P) => ({
337
+ ...P,
338
+ [k]: T
339
+ })), !T && (!b || !a || u(
340
+ _(
341
+ b,
297
342
  a,
298
- G(
343
+ R(
299
344
  c,
300
345
  r,
301
346
  a.mainPath
302
347
  )
303
348
  )
304
- ));
349
+ )));
305
350
  }, "onChange")
306
351
  }
307
352
  ),
308
- label: /* @__PURE__ */ o(g, { variant: "caption", color: "text.secondary", children: "Edit derived colors" })
353
+ label: /* @__PURE__ */ o(x, { variant: "caption", color: "text.secondary", children: "연동 색상 편집" })
309
354
  }
310
355
  ) : null
311
356
  ] }),
312
- /* @__PURE__ */ o("div", { className: "grid gap-12", children: i.fields.map((v) => {
313
- const I = a && C ? !y && v.path !== a.mainPath : !1;
357
+ /* @__PURE__ */ o("div", { className: "grid gap-12", children: n.fields.map((C) => {
358
+ const T = a && b ? !w && C.path !== a.mainPath : !1;
314
359
  return /* @__PURE__ */ o(
315
- _,
360
+ J,
316
361
  {
317
- disabled: I,
318
- definition: v,
319
- resetVersion: p,
362
+ disabled: T,
363
+ definition: C,
364
+ resetVersion: f,
320
365
  sectionKey: r,
321
366
  settings: c,
322
- onChange: /* @__PURE__ */ s((w, z) => {
323
- if (!a || !C || y || w !== a.mainPath) {
324
- t(w, z);
367
+ onChange: /* @__PURE__ */ s((P, $) => {
368
+ if (!a || !b || w || P !== a.mainPath) {
369
+ t(P, $);
325
370
  return;
326
371
  }
327
- h(
328
- [
329
- { path: w, value: z },
330
- ...K(
331
- C,
332
- a,
333
- z
334
- )
335
- ]
336
- );
372
+ u([
373
+ { path: P, value: $ },
374
+ ..._(
375
+ b,
376
+ a,
377
+ $
378
+ )
379
+ ]);
337
380
  }, "onChange"),
338
- onReset: n
381
+ onReset: i
339
382
  },
340
- v.path
383
+ C.path
341
384
  );
342
385
  }) })
343
386
  ]
344
387
  },
345
- i.key
388
+ n.key
346
389
  );
347
390
  }) })
348
391
  ] }, e.key);
349
392
  }, "renderFieldGroup");
350
- return /* @__PURE__ */ o(ce, { theme: Be, children: /* @__PURE__ */ m(ne, { sx: Fe, className: "flex h-full min-h-0 flex-col gap-16", children: [
351
- /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children: q.map((e) => {
393
+ return /* @__PURE__ */ o(fe, { theme: je, children: /* @__PURE__ */ h(de, { sx: Ke, className: "flex h-full min-h-0 flex-col gap-16", children: [
394
+ /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children: ee.map((e) => {
352
395
  const l = e.key === r;
353
396
  return /* @__PURE__ */ o(
354
- te,
397
+ se,
355
398
  {
356
- onClick: /* @__PURE__ */ s(() => B(e.key), "onClick"),
399
+ onClick: /* @__PURE__ */ s(() => F(e.key), "onClick"),
357
400
  className: "w-full rounded-lg text-left",
358
401
  sx: {
359
402
  alignItems: "flex-start",
360
- backgroundColor: l ? x.active.backgroundColor : x.inactive.backgroundColor,
361
- border: `1px solid ${l ? x.active.borderColor : x.inactive.borderColor}`,
362
- color: l ? x.active.textColor : x.inactive.textColor,
403
+ backgroundColor: l ? g.active.backgroundColor : g.inactive.backgroundColor,
404
+ border: `1px solid ${l ? g.active.borderColor : g.inactive.borderColor}`,
405
+ color: l ? g.active.textColor : g.inactive.textColor,
363
406
  p: 2
364
407
  },
365
- children: /* @__PURE__ */ m("div", { className: "flex w-full flex-col gap-4", children: [
366
- /* @__PURE__ */ o(g, { variant: "subtitle1", fontWeight: 600, children: e.label }),
408
+ children: /* @__PURE__ */ h("div", { className: "flex w-full flex-col gap-4", children: [
409
+ /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 600, children: e.label }),
367
410
  e.description ? /* @__PURE__ */ o(
368
- g,
411
+ x,
369
412
  {
370
413
  variant: "body2",
371
414
  sx: {
372
- color: l ? x.active.descriptionColor : x.inactive.descriptionColor
415
+ color: l ? g.active.descriptionColor : g.inactive.descriptionColor
373
416
  },
374
417
  children: e.description
375
418
  }
@@ -379,86 +422,93 @@ function Ge({
379
422
  e.key
380
423
  );
381
424
  }) }),
382
- /* @__PURE__ */ m(
383
- $,
425
+ /* @__PURE__ */ h(
426
+ A,
384
427
  {
385
428
  className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg",
386
429
  sx: {
387
430
  backgroundColor: D,
388
- border: `1px solid ${T}`,
431
+ border: `1px solid ${M}`,
389
432
  boxShadow: "none"
390
433
  },
391
434
  children: [
392
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-14", children: [
393
- /* @__PURE__ */ o(g, { variant: "h6", sx: { color: k }, children: W == null ? void 0 : W.label }),
394
- M ? /* @__PURE__ */ m("div", { className: "grid gap-12 md:grid-cols-2", children: [
395
- /* @__PURE__ */ m(
396
- L,
435
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col gap-14", children: [
436
+ /* @__PURE__ */ o(x, { variant: "h6", sx: { color: y }, children: K == null ? void 0 : K.label }),
437
+ E ? /* @__PURE__ */ h("div", { className: "grid gap-12 md:grid-cols-2", children: [
438
+ /* @__PURE__ */ h(
439
+ Z,
397
440
  {
398
441
  select: !0,
399
442
  label: "Mode",
400
- value: b,
443
+ value: p,
401
444
  onChange: /* @__PURE__ */ s((e) => {
402
- V(e.target.value);
445
+ te(e.target.value);
403
446
  }, "onChange"),
404
447
  children: [
405
- /* @__PURE__ */ o(S, { value: "light", children: "light" }),
406
- /* @__PURE__ */ o(S, { value: "dark", children: "dark" })
448
+ /* @__PURE__ */ o(W, { value: "light", children: "light" }),
449
+ /* @__PURE__ */ o(W, { value: "dark", children: "dark" })
407
450
  ]
408
451
  }
409
452
  ),
410
- /* @__PURE__ */ m(
411
- L,
453
+ /* @__PURE__ */ h(
454
+ Z,
412
455
  {
413
456
  select: !0,
414
457
  label: "Preset",
415
- value: f,
458
+ value: m,
416
459
  onChange: /* @__PURE__ */ s((e) => {
417
- Q(e.target.value);
460
+ oe(e.target.value);
418
461
  }, "onChange"),
419
462
  children: [
420
- f === O ? /* @__PURE__ */ o(S, { value: O, children: "custom" }) : null,
421
- re.map((e) => /* @__PURE__ */ o(S, { value: e.key, children: e.label }, e.key))
463
+ m === O ? /* @__PURE__ */ o(W, { value: O, children: "custom" }) : null,
464
+ ie
422
465
  ]
423
466
  }
424
467
  )
425
468
  ] }) : null
426
469
  ] }) }),
427
470
  /* @__PURE__ */ o(
428
- le,
471
+ q,
429
472
  {
430
473
  sx: {
431
- borderColor: T
474
+ borderColor: M
432
475
  }
433
476
  }
434
477
  ),
435
- /* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20", children: H.map((e) => r === "table" && H.length > 1 ? /* @__PURE__ */ m(
436
- $,
478
+ /* @__PURE__ */ o(
479
+ "div",
437
480
  {
438
- variant: "outlined",
439
- sx: {
440
- backgroundColor: Te,
441
- borderColor: T,
442
- boxShadow: "none",
443
- display: "flex",
444
- flexDirection: "column",
445
- gap: 2,
446
- p: 2
447
- },
448
- children: [
449
- e.label ? /* @__PURE__ */ o(g, { variant: "subtitle1", fontWeight: 700, children: e.label }) : null,
450
- /* @__PURE__ */ o("div", { className: "grid gap-20", children: e.fieldGroups.map(U) })
451
- ]
452
- },
453
- e.key
454
- ) : e.fieldGroups.map(U)) })
481
+ ref: j,
482
+ className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20",
483
+ children: U.map((e) => r === "table" && U.length > 1 ? /* @__PURE__ */ h(
484
+ A,
485
+ {
486
+ variant: "outlined",
487
+ sx: {
488
+ backgroundColor: We,
489
+ borderColor: M,
490
+ boxShadow: "none",
491
+ display: "flex",
492
+ flexDirection: "column",
493
+ gap: 2,
494
+ p: 2
495
+ },
496
+ children: [
497
+ e.label ? /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 700, children: e.label }) : null,
498
+ /* @__PURE__ */ o("div", { className: "grid gap-20", children: e.fieldGroups.map(Y) })
499
+ ]
500
+ },
501
+ e.key
502
+ ) : e.fieldGroups.map(Y))
503
+ }
504
+ )
455
505
  ]
456
506
  }
457
507
  )
458
508
  ] }) });
459
509
  }
460
- s(Ge, "ThemePreviewControls");
510
+ s(Je, "ThemePreviewControls");
461
511
  export {
462
- Ge as ThemePreviewControls
512
+ Je as ThemePreviewControls
463
513
  };
464
514
  //# sourceMappingURL=ThemePreviewControls.js.map