@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,16 +1,16 @@
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 = {
1
+ var oe = Object.defineProperty;
2
+ var l = (t, e) => oe(t, "name", { value: e, configurable: !0 });
3
+ import { jsx as n, jsxs as d, Fragment as ae } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
+ import { IconButton as ie, Typography as k, InputAdornment as ue, MenuItem as ce, TextField as Q, Box as g, Divider as se, Popover as pe, Button as de } from "@mui/material";
5
+ import me from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js";
6
+ import { blue as he, lightBlue as fe, cyan as xe, teal as ge, green as we, amber as be, orange as ve, deepOrange as Pe, red as ye, pink as Ce, purple as ke, deepPurple as Te, indigo as Ve, grey as Ie, blueGrey as Ee } from "@mui/material/colors";
7
+ import { useState as w, useRef as T, useEffect as b } from "react";
8
+ import { getThemePreviewPaletteValue as Ae } from "../utils/themePreviewSettings.js";
9
+ import { getColorAlphaValue as Me, toColorPickerValue as V, applyColorPickerValue as X } from "../utils/color.js";
10
+ const Be = {
11
11
  "px-number": "px",
12
12
  "rem-number": "rem"
13
- }, Ce = [
13
+ }, Re = [
14
14
  "50",
15
15
  "100",
16
16
  "200",
@@ -25,103 +25,122 @@ const ke = {
25
25
  "A200",
26
26
  "A400",
27
27
  "A700"
28
- ], 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]) => ({
28
+ ], ze = [
29
+ ["Blue", he],
30
+ ["Light Blue", fe],
31
+ ["Cyan", xe],
32
+ ["Teal", ge],
33
+ ["Green", we],
34
+ ["Amber", be],
35
+ ["Orange", ve],
36
+ ["Deep Orange", Pe],
37
+ ["Red", ye],
38
+ ["Pink", Ce],
39
+ ["Purple", ke],
40
+ ["Deep Purple", Te],
41
+ ["Indigo", Ve],
42
+ ["Grey", Ie],
43
+ ["Blue Grey", Ee]
44
+ ], re = ze.map(([t, e]) => ({
45
45
  label: t,
46
- colors: Ce.reduce((n, s) => {
47
- const m = e[s];
48
- return m && n.push({
49
- key: `${t}-${s}`,
50
- shade: s,
51
- value: m
52
- }), n;
46
+ colors: Re.reduce((o, m) => {
47
+ const f = e[m];
48
+ return f && o.push({
49
+ key: `${t}-${m}`,
50
+ shade: m,
51
+ value: f
52
+ }), o;
53
53
  }, [])
54
- })), Ee = 500, G = 32, j = 20;
55
- function Ve(t, e) {
54
+ })), De = new Set(
55
+ re.flatMap(
56
+ (t) => t.colors.map((e) => e.value.toLowerCase())
57
+ )
58
+ ), Se = 500, Z = 32, ee = 20;
59
+ function _e(t, e) {
56
60
  return t.replace(new RegExp(`${e}$`, "i"), "");
57
61
  }
58
- l(Ve, "getUnitInputDisplayValue");
59
- function K(t) {
60
- const e = t.replace(/[^0-9.,]/g, "").replace(/,/g, "."), n = e.indexOf(".");
61
- if (n < 0)
62
+ l(_e, "getUnitInputDisplayValue");
63
+ function te(t) {
64
+ const e = t.replace(/[^0-9.,]/g, "").replace(/,/g, "."), o = e.indexOf(".");
65
+ if (o < 0)
62
66
  return e;
63
- const s = e.slice(0, n), m = e.slice(n + 1).replace(/\./g, "");
64
- return `${s}.${m}`;
67
+ const m = e.slice(0, o), f = e.slice(o + 1).replace(/\./g, "");
68
+ return `${m}.${f}`;
65
69
  }
66
- l(K, "normalizeUnitInputDisplayValue");
67
- function Ae(t) {
68
- const e = K(t);
70
+ l(te, "normalizeUnitInputDisplayValue");
71
+ function We(t) {
72
+ const e = te(t);
69
73
  return !e || e === "." ? "" : e.startsWith(".") ? `0${e}` : e.endsWith(".") ? e.slice(0, -1) : e;
70
74
  }
71
- l(Ae, "normalizeCommittedUnitInputDisplayValue");
72
- function Be(t, e) {
73
- const n = Ae(t);
74
- return n ? `${n}${e}` : "";
75
+ l(We, "normalizeCommittedUnitInputDisplayValue");
76
+ function Oe(t, e) {
77
+ const o = We(t);
78
+ return o ? `${o}${e}` : "";
75
79
  }
76
- l(Be, "normalizeUnitInputValue");
77
- function ze(t) {
78
- return (t ? ke[t] : null) ?? null;
80
+ l(Oe, "normalizeUnitInputValue");
81
+ function $e(t) {
82
+ return (t ? Be[t] : null) ?? null;
79
83
  }
80
- l(ze, "getUnitValueFormat");
81
- function Se({
84
+ l($e, "getUnitValueFormat");
85
+ function qe({
82
86
  disabled: t = !1,
83
87
  definition: e,
84
- resetVersion: n,
85
- sectionKey: s,
86
- settings: m,
87
- onChange: g,
88
- onReset: y
88
+ resetVersion: o,
89
+ sectionKey: m,
90
+ settings: f,
91
+ onChange: v,
92
+ onReset: I
89
93
  }) {
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로 색상만 변경할 수 있습니다."
94
+ var Y, J;
95
+ const [P, E] = w(null), W = T(null), a = Ae(f, m, e.path), c = $e(e.valueFormat), O = e.showColorPicker !== !1, $ = e.allowAlpha ? Me(a) : null, F = [e.description];
96
+ e.allowAlpha && F.push(
97
+ $ ? `알파값은 ${$}로 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다.` : "알파값은 고정되고 색상만 변경됩니다. Pick 또는 MUI로 색상만 변경할 수 있습니다."
94
98
  );
95
- const 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(
99
+ const le = F.filter(Boolean).join(" "), A = !!((Y = e.options) != null && Y.length), M = !!(e.allowAlpha && O && !A && !c), x = c ? _e(a, c) : a, H = O, B = H ? V(a).toLowerCase() : null, y = B && De.has(B) ? B : null, h = !A && !M, [R, z] = w(x), [L, C] = w(!1), [U, D] = w(V(a)), [S, _] = w(!1), i = T(null), N = T(x), G = T(a);
100
+ N.current = x, G.current = a, b(() => {
101
+ !h || L || z(x);
102
+ }, [h, x, L]), b(() => {
103
+ S || D(V(a));
104
+ }, [S, a]), b(() => () => {
105
+ i.current && window.clearTimeout(i.current);
106
+ }, []), b(() => {
107
+ if (!P || !y)
108
+ return;
109
+ const r = window.requestAnimationFrame(() => {
110
+ var s;
111
+ const u = (s = W.current) == null ? void 0 : s.querySelector(
112
+ `[data-mui-palette-value="${y}"]`
113
+ );
114
+ u == null || u.scrollIntoView({
115
+ block: "center",
116
+ inline: "nearest"
117
+ });
118
+ });
119
+ return () => {
120
+ window.cancelAnimationFrame(r);
121
+ };
122
+ }, [y, P]), b(() => {
123
+ typeof o > "u" || (i.current && (window.clearTimeout(i.current), i.current = null), z(N.current), C(!1), D(V(G.current)), _(!1));
124
+ }, [o]);
125
+ const j = /* @__PURE__ */ l((r) => {
126
+ v(
107
127
  e.path,
108
- u ? Be(r, u) : r
128
+ c ? Oe(r, c) : r
109
129
  );
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,
130
+ }, "commitBufferedTextValue"), K = /* @__PURE__ */ l((r) => {
131
+ i.current && (window.clearTimeout(i.current), i.current = null), _(!1), v(e.path, X(a, r));
132
+ }, "commitBufferedPickerValue"), q = I || c ? /* @__PURE__ */ n(ue, { position: "end", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-6 pr-2", children: [
133
+ I ? /* @__PURE__ */ n(
134
+ ie,
115
135
  {
116
136
  size: "small",
117
137
  "aria-label": `${e.label} reset`,
118
138
  disabled: t,
119
- edge: "end",
120
139
  onMouseDown: /* @__PURE__ */ l((r) => {
121
140
  r.preventDefault();
122
141
  }, "onMouseDown"),
123
142
  onClick: /* @__PURE__ */ l(() => {
124
- y(e.path);
143
+ I(e.path);
125
144
  }, "onClick"),
126
145
  sx: {
127
146
  border: "1px solid #cbd5e1",
@@ -129,62 +148,62 @@ function Se({
129
148
  color: "#6b7280",
130
149
  p: 0.25
131
150
  },
132
- children: /* @__PURE__ */ o(oe, { sx: { fontSize: 16 } })
151
+ children: /* @__PURE__ */ n(me, { sx: { fontSize: 16 } })
133
152
  }
134
153
  ) : null,
135
- u ? /* @__PURE__ */ o(v, { variant: "body2", children: u }) : null
154
+ c ? /* @__PURE__ */ n(k, { variant: "body2", sx: { whiteSpace: "nowrap" }, children: c }) : null
136
155
  ] }) }) : void 0;
137
- return /* @__PURE__ */ c("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
138
- /* @__PURE__ */ o(
139
- L,
156
+ return /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_144px] items-start gap-12", children: [
157
+ /* @__PURE__ */ n(
158
+ Q,
140
159
  {
141
- select: C,
160
+ select: A,
142
161
  label: e.label,
143
162
  size: "small",
144
- value: p ? I : f,
163
+ value: h ? R : x,
145
164
  disabled: t,
146
165
  onChange: /* @__PURE__ */ l((r) => {
147
- if (T)
166
+ if (M)
148
167
  return;
149
- const d = u ? K(r.target.value) : r.target.value;
150
- if (p) {
151
- E(d);
168
+ const u = c ? te(r.target.value) : r.target.value;
169
+ if (h) {
170
+ z(u);
152
171
  return;
153
172
  }
154
- g(e.path, d);
173
+ v(e.path, u);
155
174
  }, "onChange"),
156
175
  onFocus: /* @__PURE__ */ l(() => {
157
- p && b(!0);
176
+ h && C(!0);
158
177
  }, "onFocus"),
159
178
  onBlur: /* @__PURE__ */ l(() => {
160
- p && (b(!1), H(I));
179
+ h && (C(!1), j(R));
161
180
  }, "onBlur"),
162
181
  onKeyDown: /* @__PURE__ */ l((r) => {
163
- !p || r.key !== "Enter" || (r.preventDefault(), b(!1), H(I), r.currentTarget.blur());
182
+ !h || r.key !== "Enter" || (r.preventDefault(), C(!1), j(R), r.currentTarget.blur());
164
183
  }, "onKeyDown"),
165
- helperText: Y,
184
+ helperText: le,
166
185
  slotProps: {
167
186
  htmlInput: {
168
- ...u ? {
187
+ ...c ? {
169
188
  inputMode: "decimal"
170
189
  } : {},
171
- ...T ? {
190
+ ...M ? {
172
191
  readOnly: !0
173
192
  } : {}
174
193
  },
175
194
  input: {
176
- ...S ? {
177
- endAdornment: S
195
+ ...q ? {
196
+ endAdornment: q
178
197
  } : {}
179
198
  }
180
199
  },
181
- children: (U = e.options) == null ? void 0 : U.map((r) => /* @__PURE__ */ o(ee, { value: r.value, children: r.label }, r.value))
200
+ children: (J = e.options) == null ? void 0 : J.map((r) => /* @__PURE__ */ n(ce, { value: r.value, children: r.label }, r.value))
182
201
  }
183
202
  ),
184
- q ? /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-6", children: [
185
- /* @__PURE__ */ c(Q, { children: [
186
- /* @__PURE__ */ o(
187
- le,
203
+ H ? /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-6", children: [
204
+ /* @__PURE__ */ d(ae, { children: [
205
+ /* @__PURE__ */ n(
206
+ de,
188
207
  {
189
208
  size: "small",
190
209
  fullWidth: !0,
@@ -192,31 +211,31 @@ function Se({
192
211
  disabled: t,
193
212
  sx: {
194
213
  fontSize: "1.2rem",
195
- height: G,
214
+ height: Z,
196
215
  minWidth: 0
197
216
  },
198
217
  onClick: /* @__PURE__ */ l((r) => {
199
- k(r.currentTarget);
218
+ E(r.currentTarget);
200
219
  }, "onClick"),
201
220
  children: "MUI"
202
221
  }
203
222
  ),
204
- /* @__PURE__ */ o(
205
- L,
223
+ /* @__PURE__ */ n(
224
+ Q,
206
225
  {
207
226
  hiddenLabel: !0,
208
227
  type: "color",
209
228
  size: "small",
210
- value: O,
229
+ value: U,
211
230
  disabled: t,
212
231
  onChange: /* @__PURE__ */ l((r) => {
213
- const d = r.target.value;
214
- V(d), B(!0), a.current && window.clearTimeout(a.current), a.current = window.setTimeout(() => {
215
- $(d);
216
- }, Ee);
232
+ const u = r.target.value;
233
+ D(u), _(!0), i.current && window.clearTimeout(i.current), i.current = window.setTimeout(() => {
234
+ K(u);
235
+ }, Se);
217
236
  }, "onChange"),
218
237
  onBlur: /* @__PURE__ */ l(() => {
219
- A && $(O);
238
+ S && K(U);
220
239
  }, "onBlur"),
221
240
  slotProps: {
222
241
  htmlInput: {
@@ -225,7 +244,7 @@ function Se({
225
244
  },
226
245
  sx: {
227
246
  "& .MuiOutlinedInput-root": {
228
- height: G,
247
+ height: Z,
229
248
  px: 0.5
230
249
  },
231
250
  '& input[type="color"]': {
@@ -235,8 +254,8 @@ function Se({
235
254
  border: 0,
236
255
  borderRadius: 0,
237
256
  display: "block",
238
- height: j,
239
- minHeight: j,
257
+ height: ee,
258
+ minHeight: ee,
240
259
  overflow: "hidden",
241
260
  padding: 0,
242
261
  p: 0,
@@ -257,14 +276,14 @@ function Se({
257
276
  }
258
277
  }
259
278
  ),
260
- D ? /* @__PURE__ */ o(
261
- te,
279
+ P ? /* @__PURE__ */ n(
280
+ pe,
262
281
  {
263
282
  open: !0,
264
- anchorEl: D,
283
+ anchorEl: P,
265
284
  transitionDuration: 0,
266
285
  onClose: /* @__PURE__ */ l(() => {
267
- k(null);
286
+ E(null);
268
287
  }, "onClose"),
269
288
  anchorOrigin: {
270
289
  vertical: "bottom",
@@ -286,10 +305,10 @@ function Se({
286
305
  }
287
306
  }
288
307
  },
289
- children: /* @__PURE__ */ 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(
292
- h,
308
+ children: /* @__PURE__ */ n("div", { ref: W, className: "flex min-w-0 flex-col gap-10", children: re.map((r, u) => /* @__PURE__ */ d(g, { className: "flex flex-col gap-10", children: [
309
+ u > 0 ? /* @__PURE__ */ n(se, { flexItem: !0 }) : null,
310
+ /* @__PURE__ */ d(
311
+ g,
293
312
  {
294
313
  sx: {
295
314
  display: "grid",
@@ -300,9 +319,9 @@ function Se({
300
319
  }
301
320
  },
302
321
  children: [
303
- /* @__PURE__ */ o(v, { variant: "caption", color: "text.secondary", children: r.label }),
304
- /* @__PURE__ */ o(
305
- h,
322
+ /* @__PURE__ */ n(k, { variant: "caption", color: "text.secondary", children: r.label }),
323
+ /* @__PURE__ */ n(
324
+ g,
306
325
  {
307
326
  sx: {
308
327
  display: "grid",
@@ -310,68 +329,74 @@ function Se({
310
329
  gridTemplateColumns: "repeat(auto-fit, minmax(68px, 1fr))",
311
330
  minWidth: 0
312
331
  },
313
- children: r.colors.map((P) => /* @__PURE__ */ c(
314
- h,
315
- {
316
- component: "button",
317
- type: "button",
318
- onClick: /* @__PURE__ */ l(() => {
319
- g(
320
- e.path,
321
- N(i, P.value)
322
- ), k(null);
323
- }, "onClick"),
324
- sx: {
325
- alignItems: "center",
326
- backgroundColor: "background.paper",
327
- border: "1px solid",
328
- borderColor: "divider",
329
- borderRadius: 1,
330
- color: "text.secondary",
331
- cursor: "pointer",
332
- display: "flex",
333
- flexDirection: "column",
334
- gap: 0.5,
335
- justifyContent: "center",
336
- minWidth: 0,
337
- p: 0.5,
338
- transition: "background-color 120ms ease, border-color 120ms ease",
339
- width: "100%",
340
- "&:hover": {
341
- backgroundColor: "action.hover",
342
- borderColor: "text.secondary"
343
- }
344
- },
345
- children: [
346
- /* @__PURE__ */ o(
347
- h,
348
- {
349
- sx: {
350
- width: 30,
351
- height: 30,
352
- borderRadius: 1,
353
- backgroundColor: P.value,
354
- border: "1px solid",
355
- borderColor: "divider"
356
- }
357
- }
358
- ),
359
- /* @__PURE__ */ o(
360
- h,
361
- {
362
- component: "span",
363
- sx: {
364
- fontSize: "0.75rem",
365
- fontWeight: 600,
366
- lineHeight: 1
367
- },
368
- children: P.shade
332
+ children: r.colors.map((s) => {
333
+ const p = y === s.value.toLowerCase();
334
+ return /* @__PURE__ */ d(
335
+ g,
336
+ {
337
+ component: "button",
338
+ type: "button",
339
+ "data-mui-palette-value": s.value.toLowerCase(),
340
+ "aria-current": p ? "true" : void 0,
341
+ onClick: /* @__PURE__ */ l(() => {
342
+ v(
343
+ e.path,
344
+ X(a, s.value)
345
+ ), E(null);
346
+ }, "onClick"),
347
+ sx: {
348
+ alignItems: "center",
349
+ backgroundColor: p ? "action.selected" : "background.paper",
350
+ border: "1px solid",
351
+ borderColor: p ? "primary.main" : "divider",
352
+ borderRadius: 1,
353
+ boxShadow: p ? (ne) => `0 0 0 1px ${ne.palette.primary.main}` : "none",
354
+ color: p ? "text.primary" : "text.secondary",
355
+ cursor: "pointer",
356
+ display: "flex",
357
+ flexDirection: "column",
358
+ gap: 0.5,
359
+ justifyContent: "center",
360
+ minWidth: 0,
361
+ p: 0.5,
362
+ transition: "background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease",
363
+ width: "100%",
364
+ "&:hover": {
365
+ backgroundColor: "action.hover",
366
+ borderColor: p ? "primary.main" : "text.secondary"
369
367
  }
370
- )
371
- ]
372
- },
373
- P.key
374
- ))
368
+ },
369
+ children: [
370
+ /* @__PURE__ */ n(
371
+ g,
372
+ {
373
+ sx: {
374
+ width: 30,
375
+ height: 30,
376
+ borderRadius: 1,
377
+ backgroundColor: s.value,
378
+ border: "1px solid",
379
+ borderColor: p ? "primary.main" : "divider"
380
+ }
381
+ }
382
+ ),
383
+ /* @__PURE__ */ n(
384
+ g,
385
+ {
386
+ component: "span",
387
+ sx: {
388
+ fontSize: "0.75rem",
389
+ fontWeight: p ? 700 : 600,
390
+ lineHeight: 1
391
+ },
392
+ children: s.shade
393
+ }
394
+ )
395
+ ]
396
+ },
397
+ s.key
398
+ );
399
+ })
375
400
  }
376
401
  )
377
402
  ]
@@ -381,23 +406,23 @@ function Se({
381
406
  }
382
407
  ) : null
383
408
  ] }),
384
- e.allowAlpha ? /* @__PURE__ */ c("div", { className: "col-span-2 flex flex-col gap-2", children: [
385
- /* @__PURE__ */ o(v, { variant: "caption", color: "text.secondary", children: "Current" }),
386
- /* @__PURE__ */ o(
387
- v,
409
+ e.allowAlpha ? /* @__PURE__ */ d("div", { className: "col-span-2 flex flex-col gap-2", children: [
410
+ /* @__PURE__ */ n(k, { variant: "caption", color: "text.secondary", children: "Current" }),
411
+ /* @__PURE__ */ n(
412
+ k,
388
413
  {
389
414
  variant: "caption",
390
415
  color: "text.secondary",
391
416
  className: "truncate whitespace-nowrap",
392
- children: i || "-"
417
+ children: a || "-"
393
418
  }
394
419
  )
395
420
  ] }) : null
396
- ] }) : /* @__PURE__ */ o("div", {})
421
+ ] }) : /* @__PURE__ */ n("div", {})
397
422
  ] });
398
423
  }
399
- l(Se, "ThemePreviewColorField");
424
+ l(qe, "ThemePreviewColorField");
400
425
  export {
401
- Se as ThemePreviewColorField
426
+ qe as ThemePreviewColorField
402
427
  };
403
428
  //# sourceMappingURL=ThemePreviewColorField.js.map