@owp/core 2.5.8 → 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 (78) 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/OwpDialog/OwpDialog.js +67 -46
  15. package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
  16. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +162 -153
  17. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  18. package/dist/components/OwpTable/OwpDataTable.js +297 -283
  19. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  20. package/dist/components/OwpTable/OwpFieldTable.js +98 -86
  21. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  22. package/dist/components/OwpTable/OwpTable.js +145 -127
  23. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  24. package/dist/components/OwpTable/internal/defaultTableStyle.js +21 -15
  25. package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
  26. package/dist/constants/tableTheme.js.map +1 -1
  27. package/dist/features/themePreview/components/ThemePreviewCanvas.js +300 -263
  28. package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
  29. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +148 -141
  30. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
  31. package/dist/features/themePreview/components/ThemePreviewColorField.js +169 -138
  32. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  33. package/dist/features/themePreview/components/ThemePreviewControls.js +370 -212
  34. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
  35. package/dist/features/themePreview/components/themePreviewCanvas.shared.js +145 -125
  36. package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -1
  37. package/dist/features/themePreview/configs/table.js +4 -2
  38. package/dist/features/themePreview/configs/table.js.map +1 -1
  39. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +124 -118
  40. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  41. package/dist/features/themePreview/hooks/useThemePreview.js +257 -190
  42. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  43. package/dist/features/themePreview/utils/themePreviewDefinitions.js +8 -0
  44. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  45. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  46. package/dist/layout/components/toolbar/ToolbarLayout.js +36 -35
  47. package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
  48. 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
  49. 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
  50. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  51. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  52. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  53. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  54. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  55. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  56. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  57. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  58. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  59. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  60. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  61. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  62. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  63. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  64. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  65. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  66. 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
  67. package/dist/owp-app.css +1 -1
  68. package/dist/types/components/OwpDialog/OwpDialog.d.ts +2 -0
  69. package/dist/types/components/OwpTable/OwpFieldTable.d.ts +3 -2
  70. package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +2 -0
  71. package/dist/types/constants/tableTheme.d.ts +1 -0
  72. package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +3 -1
  73. package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +4 -1
  74. package/dist/types/features/themePreview/configs/settings.d.ts +2 -0
  75. package/dist/types/features/themePreview/configs/table.d.ts +2 -0
  76. package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +3 -0
  77. package/dist/types/types/OwpTableThemeTypes.d.ts +8 -0
  78. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var a = {};
2
2
  export {
3
- r as __exports
3
+ a as __exports
4
4
  };
5
5
  //# sourceMappingURL=index10.js.map
@@ -1,5 +1,5 @@
1
- var a = {};
1
+ var r = {};
2
2
  export {
3
- a as __exports
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index12.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var e = {};
2
2
  export {
3
- r as __exports
3
+ e as __exports
4
4
  };
5
5
  //# sourceMappingURL=index13.js.map
@@ -1,5 +1,5 @@
1
- var e = {};
1
+ var r = {};
2
2
  export {
3
- e as __exports
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index14.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index15.js.map
@@ -1,8 +1,8 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as o } from "../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js";
3
- var p = /* @__PURE__ */ o();
4
- const s = /* @__PURE__ */ r(p);
2
+ import { __require as t } from "../node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js";
3
+ var o = t();
4
+ const m = /* @__PURE__ */ r(o);
5
5
  export {
6
- s as default
6
+ m as default
7
7
  };
8
8
  //# sourceMappingURL=index16.js.map
@@ -1,8 +1,8 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as t } from "../node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js";
3
- var o = t();
4
- const m = /* @__PURE__ */ r(o);
2
+ import { __require as e } from "../node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js";
3
+ var o = e();
4
+ const s = /* @__PURE__ */ r(o);
5
5
  export {
6
- m as default
6
+ s as default
7
7
  };
8
8
  //# sourceMappingURL=index17.js.map
@@ -1,8 +1,8 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as e } from "../node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js";
3
- var o = e();
4
- const s = /* @__PURE__ */ r(o);
2
+ import { __require as t } from "../node_modules/.pnpm/react-autosuggest@10.1.0_react@19.2.4/node_modules/react-autosuggest/dist/index.js";
3
+ var o = t();
4
+ const i = /* @__PURE__ */ r(o);
5
5
  export {
6
- s as default
6
+ i as default
7
7
  };
8
8
  //# sourceMappingURL=index18.js.map
@@ -1,8 +1,8 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as t } from "../node_modules/.pnpm/react-autosuggest@10.1.0_react@19.2.4/node_modules/react-autosuggest/dist/index.js";
3
- var o = t();
4
- const i = /* @__PURE__ */ r(o);
2
+ import { __require as o } from "../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
5
5
  export {
6
- i as default
6
+ s as default
7
7
  };
8
8
  //# sourceMappingURL=index19.js.map
@@ -1,5 +1,5 @@
1
- var p = { exports: {} };
1
+ var a = { exports: {} };
2
2
  export {
3
- p as __module
3
+ a as __module
4
4
  };
5
5
  //# sourceMappingURL=index20.js.map
@@ -1,5 +1,5 @@
1
- var a = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- a as __module
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index21.js.map
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- e as __module
3
+ p as __module
4
4
  };
5
5
  //# sourceMappingURL=index22.js.map
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index5.js.map
@@ -1,71 +1,92 @@
1
- var v = Object.defineProperty;
2
- var c = (i, e) => v(i, "name", { value: e, configurable: !0 });
3
- import { jsxs as l, jsx as r } 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 { useOwpTranslation as s } from "../../hooks/useOwpTranslation.js";
5
- import { DialogContent as O, DialogActions as j, Dialog as K, DialogTitle as N, Box as b, Button as m } from "@mui/material";
6
- import { forwardRef as A } from "react";
7
- const R = A(
1
+ var O = Object.defineProperty;
2
+ var n = (e, c) => O(e, "name", { value: c, configurable: !0 });
3
+ import { jsxs as s, jsx as r } 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 { useOwpTranslation as I } from "../../hooks/useOwpTranslation.js";
5
+ import { DialogContent as K, DialogActions as N, Dialog as P, DialogTitle as z, CircularProgress as H, Box as m, Button as y } from "@mui/material";
6
+ import { forwardRef as R } from "react";
7
+ const W = R(
8
8
  ({
9
- title: i,
10
- children: e,
11
- canCancel: x = !0,
12
- canConfirm: a = !0,
9
+ title: e,
10
+ children: c,
11
+ loading: o = !1,
12
+ canCancel: h = !0,
13
+ canConfirm: d = !0,
13
14
  confirmText: D,
14
- cancelText: h,
15
- onConfirm: f,
16
- onCancel: o,
15
+ cancelText: g,
16
+ onConfirm: l,
17
+ onCancel: u,
17
18
  onClose: t,
18
- useSubmit: n,
19
- actions: u,
20
- contentProps: w,
21
- ...y
22
- }, g) => {
23
- const { t: d } = s(), T = D ?? d("Button.저장"), B = h ?? d(a ? "Button.취소" : "Button.닫기");
24
- return /* @__PURE__ */ l(
25
- K,
19
+ useSubmit: a,
20
+ actions: f,
21
+ contentProps: v,
22
+ ...w
23
+ }, T) => {
24
+ const { t: p } = I(), B = D ?? p("Button.저장"), k = g ?? p(d ? "Button.취소" : "Button.닫기"), { sx: i, ...b } = v ?? {}, j = [
25
+ { position: "relative", minHeight: o ? 120 : void 0 },
26
+ ...Array.isArray(i) ? i : i ? [i] : []
27
+ ];
28
+ return /* @__PURE__ */ s(
29
+ P,
26
30
  {
27
- ref: g,
31
+ ref: T,
28
32
  fullWidth: !0,
29
- component: n ? "form" : void 0,
30
- onClose: /* @__PURE__ */ c((k, p) => {
31
- p !== "backdropClick" && (t == null || t(k, p));
33
+ component: a ? "form" : void 0,
34
+ onClose: /* @__PURE__ */ n((A, x) => {
35
+ x !== "backdropClick" && (t == null || t(A, x));
32
36
  }, "onClose"),
33
- ...y,
37
+ ...w,
34
38
  children: [
35
- i && /* @__PURE__ */ r(N, { children: i }),
36
- /* @__PURE__ */ r(O, { dividers: !0, ...w, children: e }),
37
- /* @__PURE__ */ l(j, { children: [
38
- u && /* @__PURE__ */ r(b, { className: "flex w-full items-start", children: u }),
39
- x && /* @__PURE__ */ r(
39
+ e && /* @__PURE__ */ r(z, { children: e }),
40
+ /* @__PURE__ */ s(K, { dividers: !0, "aria-busy": o, ...b, sx: j, children: [
41
+ c,
42
+ o && /* @__PURE__ */ r(
40
43
  m,
44
+ {
45
+ "aria-hidden": "true",
46
+ sx: {
47
+ position: "absolute",
48
+ inset: 0,
49
+ zIndex: 1,
50
+ display: "flex",
51
+ alignItems: "center",
52
+ justifyContent: "center"
53
+ },
54
+ children: /* @__PURE__ */ r(H, { color: "secondary" })
55
+ }
56
+ )
57
+ ] }),
58
+ /* @__PURE__ */ s(N, { children: [
59
+ f && /* @__PURE__ */ r(m, { className: "flex w-full items-start", children: f }),
60
+ h && /* @__PURE__ */ r(
61
+ y,
41
62
  {
42
63
  variant: "outlined",
43
- onClick: /* @__PURE__ */ c(() => {
44
- if (typeof o == "function") {
45
- o();
64
+ onClick: /* @__PURE__ */ n(() => {
65
+ if (typeof u == "function") {
66
+ u();
46
67
  return;
47
68
  }
48
69
  t == null || t({}, "escapeKeyDown");
49
70
  }, "onClick"),
50
- children: B
71
+ children: k
51
72
  }
52
73
  ),
53
- a && /* @__PURE__ */ r(
54
- m,
74
+ d && /* @__PURE__ */ r(
75
+ y,
55
76
  {
56
77
  variant: "contained",
57
78
  color: "secondary",
58
- type: n ? "submit" : "button",
59
- onClick: /* @__PURE__ */ c(() => {
60
- if (!n) {
61
- if (typeof f == "function") {
62
- f();
79
+ type: a ? "submit" : "button",
80
+ onClick: /* @__PURE__ */ n(() => {
81
+ if (!a) {
82
+ if (typeof l == "function") {
83
+ l();
63
84
  return;
64
85
  }
65
86
  t == null || t({}, "escapeKeyDown");
66
87
  }
67
88
  }, "onClick"),
68
- children: T
89
+ children: B
69
90
  }
70
91
  )
71
92
  ] })
@@ -74,8 +95,8 @@ const R = A(
74
95
  );
75
96
  }
76
97
  );
77
- R.displayName = "OwpDialog";
98
+ W.displayName = "OwpDialog";
78
99
  export {
79
- R as OwpDialog
100
+ W as OwpDialog
80
101
  };
81
102
  //# sourceMappingURL=OwpDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OwpDialog.js","sources":["../../../src/components/OwpDialog/OwpDialog.tsx"],"sourcesContent":["import { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport {\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentProps,\n DialogProps,\n DialogTitle,\n} from '@mui/material';\nimport { forwardRef, ReactNode } from 'react';\n\nexport interface OwpDialogProps extends Omit<DialogProps, 'title'> {\n title?: ReactNode;\n children?: ReactNode;\n canConfirm?: boolean;\n canCancel?: boolean;\n confirmText?: string;\n cancelText?: string;\n useSubmit?: boolean;\n actions?: ReactNode;\n contentProps?: DialogContentProps;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\n/**\n * OwpDialog 컴포넌트\n * @param title 제목\n * @param children 하위 콘텐츠\n * @param canCancel canCancel 값\n * @param canConfirm canConfirm 값\n * @param onConfirm onConfirm 핸들러\n * @param onCancel onCancel 핸들러\n */\nconst OwpDialog = forwardRef<HTMLDivElement, OwpDialogProps>(\n (\n {\n title,\n children,\n canCancel = true,\n canConfirm = true,\n confirmText: confirmTextProp,\n cancelText: cancelTextProp,\n onConfirm,\n onCancel,\n onClose,\n useSubmit,\n actions,\n contentProps,\n ...dialogProps\n },\n ref,\n ) => {\n const { t } = useOwpTranslation();\n const confirmText = confirmTextProp ?? t('Button.저장');\n const cancelText = cancelTextProp ?? t(canConfirm ? 'Button.취소' : 'Button.닫기');\n\n return (\n <Dialog\n ref={ref}\n fullWidth\n component={useSubmit ? 'form' : undefined}\n onClose={(event, reason) => {\n if (reason === 'backdropClick') {\n return;\n }\n\n onClose?.(event, reason);\n }}\n {...dialogProps}\n >\n {title && <DialogTitle>{title}</DialogTitle>}\n <DialogContent dividers {...contentProps}>\n {children}\n </DialogContent>\n <DialogActions>\n {actions && <Box className=\"flex w-full items-start\">{actions}</Box>}\n {canCancel && (\n <Button\n variant=\"outlined\"\n onClick={() => {\n if (typeof onCancel === 'function') {\n onCancel();\n return;\n }\n\n onClose?.({}, 'escapeKeyDown');\n }}\n >\n {cancelText}\n </Button>\n )}\n {canConfirm && (\n <Button\n variant=\"contained\"\n color=\"secondary\"\n type={useSubmit ? 'submit' : 'button'}\n onClick={() => {\n if (useSubmit) {\n return;\n }\n\n if (typeof onConfirm === 'function') {\n onConfirm();\n return;\n }\n\n onClose?.({}, 'escapeKeyDown');\n }}\n >\n {confirmText}\n </Button>\n )}\n </DialogActions>\n </Dialog>\n );\n },\n);\n\nOwpDialog.displayName = 'OwpDialog';\nexport { OwpDialog };\n"],"names":["OwpDialog","forwardRef","title","children","canCancel","canConfirm","confirmTextProp","cancelTextProp","onConfirm","onCancel","onClose","useSubmit","actions","contentProps","dialogProps","ref","t","useOwpTranslation","confirmText","cancelText","jsxs","Dialog","__name","event","reason","jsx","DialogTitle","DialogContent","DialogActions","Box","Button"],"mappings":";;;;;;AAoCA,MAAMA,IAAYC;AAAA,EAChB,CACE;AAAA,IACE,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,YAAAC,IAAa;AAAA,IACb,aAAaC;AAAA,IACb,YAAYC;AAAA,IACZ,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAcZ,KAAmBU,EAAE,WAAW,GAC9CG,IAAaZ,KAAkBS,EAAEX,IAAa,cAAc,WAAW;AAE7E,WACE,gBAAAe;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAN;AAAA,QACA,WAAS;AAAA,QACT,WAAWJ,IAAY,SAAS;AAAA,QAChC,SAAS,gBAAAW,EAAA,CAACC,GAAOC,MAAW;AAC1B,UAAIA,MAAW,oBAIfd,KAAA,QAAAA,EAAUa,GAAOC;AAAA,QACnB,GANS;AAAA,QAOR,GAAGV;AAAA,QAEH,UAAA;AAAA,UAAAZ,KAAS,gBAAAuB,EAACC,KAAa,UAAAxB,EAAA,CAAM;AAAA,4BAC7ByB,GAAA,EAAc,UAAQ,IAAE,GAAGd,GACzB,UAAAV,GACH;AAAA,4BACCyB,GAAA,EACE,UAAA;AAAA,YAAAhB,KAAW,gBAAAa,EAACI,GAAA,EAAI,WAAU,2BAA2B,UAAAjB,GAAQ;AAAA,YAC7DR,KACC,gBAAAqB;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,SAAS,gBAAAR,EAAA,MAAM;AACb,sBAAI,OAAOb,KAAa,YAAY;AAClC,oBAAAA,EAAA;AACA;AAAA,kBACF;AAEA,kBAAAC,KAAA,QAAAA,EAAU,CAAA,GAAI;AAAA,gBAChB,GAPS;AAAA,gBASR,UAAAS;AAAA,cAAA;AAAA,YAAA;AAAA,YAGJd,KACC,gBAAAoB;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAMnB,IAAY,WAAW;AAAA,gBAC7B,SAAS,gBAAAW,EAAA,MAAM;AACb,sBAAI,CAAAX,GAIJ;AAAA,wBAAI,OAAOH,KAAc,YAAY;AACnC,sBAAAA,EAAA;AACA;AAAA,oBACF;AAEA,oBAAAE,KAAA,QAAAA,EAAU,CAAA,GAAI;AAAA;AAAA,gBAChB,GAXS;AAAA,gBAaR,UAAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACH,EAAA,CAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAlB,EAAU,cAAc;"}
1
+ {"version":3,"file":"OwpDialog.js","sources":["../../../src/components/OwpDialog/OwpDialog.tsx"],"sourcesContent":["import { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport {\n Box,\n Button,\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentProps,\n DialogProps,\n DialogTitle,\n} from '@mui/material';\nimport { forwardRef, ReactNode } from 'react';\n\nexport interface OwpDialogProps extends Omit<DialogProps, 'title'> {\n title?: ReactNode;\n children?: ReactNode;\n loading?: boolean;\n canConfirm?: boolean;\n canCancel?: boolean;\n confirmText?: string;\n cancelText?: string;\n useSubmit?: boolean;\n actions?: ReactNode;\n contentProps?: DialogContentProps;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\n/**\n * OwpDialog 컴포넌트\n * @param title 제목\n * @param children 하위 콘텐츠\n * @param loading 본문 로딩 여부\n * @param canCancel canCancel 값\n * @param canConfirm canConfirm 값\n * @param onConfirm onConfirm 핸들러\n * @param onCancel onCancel 핸들러\n */\nconst OwpDialog = forwardRef<HTMLDivElement, OwpDialogProps>(\n (\n {\n title,\n children,\n loading = false,\n canCancel = true,\n canConfirm = true,\n confirmText: confirmTextProp,\n cancelText: cancelTextProp,\n onConfirm,\n onCancel,\n onClose,\n useSubmit,\n actions,\n contentProps,\n ...dialogProps\n },\n ref,\n ) => {\n const { t } = useOwpTranslation();\n const confirmText = confirmTextProp ?? t('Button.저장');\n const cancelText = cancelTextProp ?? t(canConfirm ? 'Button.취소' : 'Button.닫기');\n const { sx: contentSx, ...restContentProps } = contentProps ?? {};\n const resolvedContentSx = [\n { position: 'relative', minHeight: loading ? 120 : undefined },\n ...(Array.isArray(contentSx) ? contentSx : contentSx ? [contentSx] : []),\n ];\n\n return (\n <Dialog\n ref={ref}\n fullWidth\n component={useSubmit ? 'form' : undefined}\n onClose={(event, reason) => {\n if (reason === 'backdropClick') {\n return;\n }\n\n onClose?.(event, reason);\n }}\n {...dialogProps}\n >\n {title && <DialogTitle>{title}</DialogTitle>}\n <DialogContent dividers aria-busy={loading} {...restContentProps} sx={resolvedContentSx}>\n {children}\n {loading && (\n <Box\n aria-hidden=\"true\"\n sx={{\n position: 'absolute',\n inset: 0,\n zIndex: 1,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <CircularProgress color=\"secondary\" />\n </Box>\n )}\n </DialogContent>\n <DialogActions>\n {actions && <Box className=\"flex w-full items-start\">{actions}</Box>}\n {canCancel && (\n <Button\n variant=\"outlined\"\n onClick={() => {\n if (typeof onCancel === 'function') {\n onCancel();\n return;\n }\n\n onClose?.({}, 'escapeKeyDown');\n }}\n >\n {cancelText}\n </Button>\n )}\n {canConfirm && (\n <Button\n variant=\"contained\"\n color=\"secondary\"\n type={useSubmit ? 'submit' : 'button'}\n onClick={() => {\n if (useSubmit) {\n return;\n }\n\n if (typeof onConfirm === 'function') {\n onConfirm();\n return;\n }\n\n onClose?.({}, 'escapeKeyDown');\n }}\n >\n {confirmText}\n </Button>\n )}\n </DialogActions>\n </Dialog>\n );\n },\n);\n\nOwpDialog.displayName = 'OwpDialog';\nexport { OwpDialog };\n"],"names":["OwpDialog","forwardRef","title","children","loading","canCancel","canConfirm","confirmTextProp","cancelTextProp","onConfirm","onCancel","onClose","useSubmit","actions","contentProps","dialogProps","ref","t","useOwpTranslation","confirmText","cancelText","contentSx","restContentProps","resolvedContentSx","jsxs","Dialog","__name","event","reason","jsx","DialogTitle","DialogContent","Box","CircularProgress","DialogActions","Button"],"mappings":"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"}