@wipco/sdui 0.7.0 → 0.8.1

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 (79) hide show
  1. package/dist/DatePicker-BndreCPl.d.ts +35 -0
  2. package/dist/{chunk-XY2JKFAV.js → chunk-3PYMVHL3.js} +4 -2
  3. package/dist/{chunk-562QK2G3.js → chunk-4CZJF5PR.js} +4 -2
  4. package/dist/{chunk-73ZMMJRX.js → chunk-4IRLQWQC.js} +4 -2
  5. package/dist/{chunk-KAXPN6KT.js → chunk-5A7BWIGN.js} +8 -5
  6. package/dist/{chunk-B4A4KY4K.js → chunk-7AHNAX6T.js} +4 -2
  7. package/dist/{chunk-CRSY67TZ.js → chunk-B5JTXYDB.js} +19 -21
  8. package/dist/{chunk-7Y4J7EOK.js → chunk-BMZKZGJF.js} +3 -2
  9. package/dist/{chunk-63U54JAG.js → chunk-BT4HC3WR.js} +4 -2
  10. package/dist/{chunk-L4ORCIVN.js → chunk-JONNWN6N.js} +4 -2
  11. package/dist/{chunk-5O6PFLFJ.js → chunk-JWYBFODH.js} +4 -2
  12. package/dist/{chunk-TKB7H5DB.js → chunk-NIRR6KSQ.js} +1 -1
  13. package/dist/{chunk-USKRM22W.js → chunk-O4U7Y3XL.js} +3 -2
  14. package/dist/{chunk-H32WQHB7.js → chunk-OINKP2BE.js} +5 -3
  15. package/dist/{chunk-QBIVW7E6.js → chunk-SAN4IX6N.js} +77 -2
  16. package/dist/{chunk-57LLG32F.js → chunk-TBAIREB3.js} +5 -3
  17. package/dist/{chunk-2ARNY7WZ.js → chunk-TMAVD3WL.js} +4 -2
  18. package/dist/{chunk-HGFYXY7F.js → chunk-VK6KWB65.js} +4 -2
  19. package/dist/{chunk-GWVK3BHB.js → chunk-VV73LOAE.js} +5 -3
  20. package/dist/{chunk-J2DSDERS.js → chunk-WJEGCCPY.js} +4 -2
  21. package/dist/{chunk-TAFUDHIX.js → chunk-WLWWN5LW.js} +4 -2
  22. package/dist/{chunk-XMMYJSRV.js → chunk-WMPSOKNI.js} +4 -2
  23. package/dist/{chunk-Y3HYEWSY.js → chunk-X3DGYP4W.js} +4 -2
  24. package/dist/{chunk-DN5YNPJS.js → chunk-YFUQUWWH.js} +5 -3
  25. package/dist/{chunk-QZQDHSMD.js → chunk-Z3WGIFJP.js} +3 -2
  26. package/dist/{chunk-PJRXPMI3.js → chunk-ZH5MLOZS.js} +3 -2
  27. package/dist/index.d.ts +1044 -980
  28. package/dist/index.js +79 -36
  29. package/dist/{layout-BnYUuWC2.d.ts → layout-B1QrIBm6.d.ts} +59 -1
  30. package/dist/meta.d.ts +42 -1
  31. package/dist/meta.js +198 -57
  32. package/dist/rich.d.ts +2 -1
  33. package/dist/rich.js +4 -3
  34. package/dist/widgets/AutocompleteField.d.ts +6 -40
  35. package/dist/widgets/AutocompleteField.js +4 -3
  36. package/dist/widgets/ColumnBoard.d.ts +6 -14
  37. package/dist/widgets/ColumnBoard.js +3 -2
  38. package/dist/widgets/DiffView.d.ts +6 -11
  39. package/dist/widgets/DiffView.js +3 -2
  40. package/dist/widgets/Disclosure.d.ts +6 -9
  41. package/dist/widgets/Disclosure.js +3 -2
  42. package/dist/widgets/EventCalendar.d.ts +6 -1
  43. package/dist/widgets/EventCalendar.js +3 -2
  44. package/dist/widgets/ImageLightbox.d.ts +6 -10
  45. package/dist/widgets/ImageLightbox.js +3 -2
  46. package/dist/widgets/InlineEdit.d.ts +6 -10
  47. package/dist/widgets/InlineEdit.js +3 -2
  48. package/dist/widgets/JsonField.d.ts +6 -1
  49. package/dist/widgets/JsonField.js +3 -2
  50. package/dist/widgets/LiveClock.d.ts +6 -1
  51. package/dist/widgets/LiveClock.js +2 -1
  52. package/dist/widgets/OrgChart.d.ts +7 -3
  53. package/dist/widgets/OrgChart.js +3 -2
  54. package/dist/widgets/PeriodFilter.d.ts +6 -1
  55. package/dist/widgets/PeriodFilter.js +3 -2
  56. package/dist/widgets/PrintSheet.d.ts +6 -12
  57. package/dist/widgets/PrintSheet.js +3 -2
  58. package/dist/widgets/SearchableMultiPicker.d.ts +6 -11
  59. package/dist/widgets/SearchableMultiPicker.js +4 -3
  60. package/dist/widgets/SecureScreen.d.ts +6 -14
  61. package/dist/widgets/SecureScreen.js +3 -2
  62. package/dist/widgets/StackedMeter.d.ts +7 -3
  63. package/dist/widgets/StackedMeter.js +2 -1
  64. package/dist/widgets/Strip.d.ts +6 -10
  65. package/dist/widgets/Strip.js +2 -2
  66. package/dist/widgets/SummaryTable.d.ts +6 -9
  67. package/dist/widgets/SummaryTable.js +2 -1
  68. package/dist/widgets/TagMultiSelect.d.ts +6 -1
  69. package/dist/widgets/TagMultiSelect.js +3 -2
  70. package/dist/widgets/Timeline.d.ts +6 -10
  71. package/dist/widgets/Timeline.js +4 -3
  72. package/dist/widgets/TreePicker.d.ts +6 -1
  73. package/dist/widgets/TreePicker.js +4 -3
  74. package/dist/widgets/TreeView.d.ts +6 -1
  75. package/dist/widgets/TreeView.js +3 -2
  76. package/dist/widgets/index.d.ts +61 -61
  77. package/dist/widgets/index.js +44 -44
  78. package/package.json +1 -1
  79. package/dist/DatePicker-CTDcFR7V.d.ts +0 -48
@@ -0,0 +1,35 @@
1
+ import { S as SduiBoxProps } from './layout-B1QrIBm6.js';
2
+ import React__default from 'react';
3
+
4
+ interface DatePickerProps {
5
+ /** 선택된 날짜 (YYYY-MM-DD). 주어지면 controlled로 동작. */
6
+ value?: string;
7
+ onChange?: (value: string) => void;
8
+ /** 선택 가능 최소 날짜 (YYYY-MM-DD, 포함). */
9
+ min?: string;
10
+ /** 선택 가능 최대 날짜 (YYYY-MM-DD, 포함). */
11
+ max?: string;
12
+ placeholder?: string;
13
+ invalid?: boolean;
14
+ disabled?: boolean;
15
+ size?: 'sm' | 'md' | 'lg';
16
+ }
17
+ interface DateRangeValue {
18
+ from?: string;
19
+ to?: string;
20
+ }
21
+ interface DateRangePickerProps {
22
+ /** 선택된 기간 (YYYY-MM-DD). 주어지면 controlled로 동작. */
23
+ value?: DateRangeValue;
24
+ onChange?: (value: DateRangeValue) => void;
25
+ min?: string;
26
+ max?: string;
27
+ invalid?: boolean;
28
+ disabled?: boolean;
29
+ }
30
+ /** 바깥에서 온 `style`·`className`을 뿌리에 얹어 내보낸다. 까닭은 {@link ./boxed.tsx}에 있다. */
31
+ declare const DatePicker: React__default.FC<DatePickerProps & SduiBoxProps>;
32
+ /** 바깥에서 온 `style`·`className`을 뿌리에 얹어 내보낸다. 까닭은 {@link ./boxed.tsx}에 있다. */
33
+ declare const DateRangePicker: React__default.FC<DateRangePickerProps & SduiBoxProps>;
34
+
35
+ export { type DatePickerProps as D, type DateRangePickerProps as a, DatePicker as b, DateRangePicker as c, type DateRangeValue as d };
@@ -1,4 +1,5 @@
1
- import { IconButton } from './chunk-CRSY67TZ.js';
1
+ import { IconButton } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useState, useRef, useCallback, useEffect } from 'react';
3
4
  import { createPortal } from 'react-dom';
4
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -11,7 +12,7 @@ var INITIAL_VIEW = { scale: 1, x: 0, y: 0 };
11
12
  function clamp(value, min, max) {
12
13
  return Math.min(max, Math.max(min, value));
13
14
  }
14
- function ImageLightbox({ src, alt, thumbClassName, thumbStyle, children }) {
15
+ function ImageLightboxImpl({ src, alt, thumbClassName, thumbStyle, children }) {
15
16
  const [open, setOpen] = useState(false);
16
17
  const [view, setView] = useState(INITIAL_VIEW);
17
18
  const [dragging, setDragging] = useState(false);
@@ -305,5 +306,6 @@ function ImageLightbox({ src, alt, thumbClassName, thumbStyle, children }) {
305
306
  overlay
306
307
  ] });
307
308
  }
309
+ var ImageLightbox = boxed(ImageLightboxImpl, "ImageLightbox");
308
310
 
309
311
  export { ImageLightbox };
@@ -1,4 +1,5 @@
1
- import { Icon } from './chunk-CRSY67TZ.js';
1
+ import { Icon } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useRef, useState, useEffect } from 'react';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
@@ -28,7 +29,7 @@ function overwriteClipboard() {
28
29
  } catch {
29
30
  }
30
31
  }
31
- function SecureScreen({ enabled = true, notice, children }) {
32
+ function SecureScreenImpl({ enabled = true, notice, children }) {
32
33
  const hostRef = useRef(null);
33
34
  const [cover, setCover] = useState(null);
34
35
  const [prevEnabled, setPrevEnabled] = useState(enabled);
@@ -106,5 +107,6 @@ function SecureScreen({ enabled = true, notice, children }) {
106
107
  ] }) : null
107
108
  ] });
108
109
  }
110
+ var SecureScreen = boxed(SecureScreenImpl, "SecureScreen");
109
111
 
110
112
  export { SecureScreen };
@@ -1,4 +1,5 @@
1
- import { Icon, Badge } from './chunk-CRSY67TZ.js';
1
+ import { Icon, Badge } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import React from 'react';
3
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
5
 
@@ -16,7 +17,7 @@ var DIFF_CSS = `
16
17
  function DiffStyles() {
17
18
  return /* @__PURE__ */ jsx("style", { href: "erp-diffview", precedence: "medium", children: DIFF_CSS });
18
19
  }
19
- function DiffView({ fields, lists }) {
20
+ function DiffViewImpl({ fields, lists }) {
20
21
  const hasFields = fields !== void 0 && fields.length > 0;
21
22
  const hasLists = lists !== void 0 && lists.length > 0;
22
23
  if (!hasFields && !hasLists) {
@@ -68,5 +69,6 @@ function DiffView({ fields, lists }) {
68
69
  }) }) : null
69
70
  ] });
70
71
  }
72
+ var DiffView = boxed(DiffViewImpl, "DiffView");
71
73
 
72
74
  export { DiffView };
@@ -1,6 +1,7 @@
1
- import { Icon } from './chunk-CRSY67TZ.js';
2
- import { createContext, useContext, useState, useRef, useMemo, useCallback, useEffect, useLayoutEffect } from 'react';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { Icon } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
3
+ import { createContext, useState, useRef, useMemo, useCallback, useEffect, useLayoutEffect, useContext } from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
5
6
  // src/env.ts
6
7
  var DEV = (() => {
@@ -297,7 +298,7 @@ function triggerClassName(size, invalid) {
297
298
  if (invalid) classes.push("wp-input--invalid");
298
299
  return classes.join(" ");
299
300
  }
300
- function DatePicker({
301
+ function DatePickerImpl({
301
302
  value,
302
303
  onChange,
303
304
  min,
@@ -366,7 +367,7 @@ function DatePicker({
366
367
  ) }) }) : null
367
368
  ] });
368
369
  }
369
- function DateRangePicker({
370
+ function DateRangePickerImpl({
370
371
  value,
371
372
  onChange,
372
373
  min,
@@ -493,5 +494,7 @@ var DP_CSS = `
493
494
  .wp-dp__day--range-start .wp-dp__day-btn,.wp-dp__day--range-end .wp-dp__day-btn{background:var(--wp-action-primary-bg);color:var(--wp-action-primary-fg);font-weight:500}
494
495
  .wp-dp__day--range-start.wp-dp__day--today .wp-dp__day-btn,.wp-dp__day--range-end.wp-dp__day--today .wp-dp__day-btn{box-shadow:none}
495
496
  `;
497
+ var DatePicker = boxed(DatePickerImpl, "DatePicker");
498
+ var DateRangePicker = boxed(DateRangePickerImpl, "DateRangePicker");
496
499
 
497
500
  export { DEV, DatePicker, DateRangePicker, HoistedStyle, SduiAdapterContext, assetResolverOf, defaultAdapter, hostFetchOf, isSafeNavigationTarget, resolveAdapter, useSduiAdapter, useSduiAssetResolver, useSduiSandbox };
@@ -1,4 +1,5 @@
1
- import { IconButton, Input } from './chunk-CRSY67TZ.js';
1
+ import { IconButton, Input } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useState, useRef, useEffect, useCallback } from 'react';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
@@ -20,7 +21,7 @@ function saveErrorMessage(err) {
20
21
  if (err instanceof Error && err.message) return err.message;
21
22
  return "\uC800\uC7A5\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.";
22
23
  }
23
- function InlineEdit({
24
+ function InlineEditImpl({
24
25
  value,
25
26
  onSave,
26
27
  type = "text",
@@ -155,5 +156,6 @@ function InlineEdit({
155
156
  saveError !== null ? /* @__PURE__ */ jsx("span", { className: "wp-field__error", role: "alert", children: saveError }) : null
156
157
  ] });
157
158
  }
159
+ var InlineEdit = boxed(InlineEditImpl, "InlineEdit");
158
160
 
159
161
  export { InlineEdit };
@@ -1,8 +1,7 @@
1
+ import { mergeStyle, containerLayoutStyle, joinClass } from './chunk-SAN4IX6N.js';
1
2
  import React from 'react';
2
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
4
 
4
- // src/components.tsx
5
-
6
5
  // src/icons.ts
7
6
  var ICON_NODES = {
8
7
  "activity": [
@@ -697,9 +696,6 @@ function warnOnce(key, message, level = "error") {
697
696
  if (level === "warn") console.warn(message);
698
697
  else console.error(message);
699
698
  }
700
- function cx(...parts) {
701
- return parts.filter(Boolean).join(" ");
702
- }
703
699
  function Icon({ name, size = 18, strokeWidth = 1.5, className = "", style, title, ...rest }) {
704
700
  const nodes = Object.hasOwn(ICON_NODES, name) ? ICON_NODES[name] : void 0;
705
701
  if (!nodes) return null;
@@ -734,8 +730,10 @@ function Button({
734
730
  block = false,
735
731
  disabled = false,
736
732
  as = "button",
733
+ justify,
737
734
  children,
738
735
  className = "",
736
+ style,
739
737
  ...rest
740
738
  }) {
741
739
  const Tag2 = as;
@@ -749,6 +747,7 @@ function Button({
749
747
  Tag2,
750
748
  {
751
749
  className: classes.join(" "),
750
+ style: mergeStyle(containerLayoutStyle({ justify }), style),
752
751
  disabled: Tag2 === "button" ? disabled || loading : void 0,
753
752
  "aria-disabled": disabled || void 0,
754
753
  ...rest,
@@ -813,7 +812,7 @@ function Textarea({ invalid = false, rows = 3, className = "", ...rest }) {
813
812
  return /* @__PURE__ */ jsx(
814
813
  "textarea",
815
814
  {
816
- className: cx("wp-textarea", invalid && "wp-textarea--invalid", className),
815
+ className: joinClass("wp-textarea", invalid && "wp-textarea--invalid", className),
817
816
  rows,
818
817
  "aria-invalid": invalid || void 0,
819
818
  ...rest
@@ -872,7 +871,7 @@ function Checkbox({ label, description, indeterminate = false, disabled = false,
872
871
  React.useEffect(() => {
873
872
  if (ref.current) ref.current.indeterminate = indeterminate;
874
873
  }, [indeterminate]);
875
- return /* @__PURE__ */ jsxs("label", { className: cx("wp-check", disabled && "wp-check--disabled", className), children: [
874
+ return /* @__PURE__ */ jsxs("label", { className: joinClass("wp-check", disabled && "wp-check--disabled", className), children: [
876
875
  /* @__PURE__ */ jsx("input", { ref, type: "checkbox", disabled, ...rest }),
877
876
  /* @__PURE__ */ jsx("span", { className: "wp-check__box", children: /* @__PURE__ */ jsx(Icon, { name: indeterminate ? "minus" : "check", size: 12, strokeWidth: 2.5 }) }),
878
877
  label || description ? /* @__PURE__ */ jsxs("span", { className: "wp-check__text", children: [
@@ -882,14 +881,14 @@ function Checkbox({ label, description, indeterminate = false, disabled = false,
882
881
  ] });
883
882
  }
884
883
  function Switch({ label, size = "md", disabled = false, className = "", ...rest }) {
885
- return /* @__PURE__ */ jsxs("label", { className: cx("wp-switch", size === "sm" && "wp-switch--sm", className), children: [
884
+ return /* @__PURE__ */ jsxs("label", { className: joinClass("wp-switch", size === "sm" && "wp-switch--sm", className), children: [
886
885
  /* @__PURE__ */ jsx("input", { type: "checkbox", role: "switch", disabled, ...rest }),
887
886
  /* @__PURE__ */ jsx("span", { className: "wp-switch__track" }),
888
887
  label ? /* @__PURE__ */ jsx("span", { children: label }) : null
889
888
  ] });
890
889
  }
891
890
  function Field({ label, hint, error, required = false, htmlFor, layout = "stacked", children, className = "", ...rest }) {
892
- return /* @__PURE__ */ jsxs("div", { className: cx("wp-field", layout === "horizontal" && "wp-field--horizontal", className), ...rest, children: [
891
+ return /* @__PURE__ */ jsxs("div", { className: joinClass("wp-field", layout === "horizontal" && "wp-field--horizontal", className), ...rest, children: [
893
892
  label ? /* @__PURE__ */ jsxs("label", { className: "wp-field__label", htmlFor, children: [
894
893
  label,
895
894
  required ? /* @__PURE__ */ jsx("span", { className: "wp-field__req", "aria-hidden": "true", children: "*" }) : null
@@ -938,14 +937,14 @@ function Badge({ tone = "neutral", dot = false, size = "md", children, className
938
937
  return /* @__PURE__ */ jsx(
939
938
  "span",
940
939
  {
941
- className: cx("wp-badge", `wp-badge--${tone}`, dot && "wp-badge--dot", size === "lg" && "wp-badge--lg", className),
940
+ className: joinClass("wp-badge", `wp-badge--${tone}`, dot && "wp-badge--dot", size === "lg" && "wp-badge--lg", className),
942
941
  ...rest,
943
942
  children
944
943
  }
945
944
  );
946
945
  }
947
946
  function Tag({ color, filled = false, onRemove, children, className = "", ...rest }) {
948
- return /* @__PURE__ */ jsxs("span", { className: cx("wp-tag", filled && "wp-tag--filled", className), ...rest, children: [
947
+ return /* @__PURE__ */ jsxs("span", { className: joinClass("wp-tag", filled && "wp-tag--filled", className), ...rest, children: [
949
948
  color ? /* @__PURE__ */ jsx("span", { className: "wp-tag__dot", style: { background: color } }) : null,
950
949
  children,
951
950
  onRemove ? /* @__PURE__ */ jsx("span", { className: "wp-tag__x", role: "button", "aria-label": "\uC81C\uAC70", onClick: onRemove, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 10, strokeWidth: 2 }) }) : null
@@ -962,7 +961,7 @@ function Alert({ tone = "info", title, children, actions, onClose, bar = false,
962
961
  return /* @__PURE__ */ jsxs(
963
962
  "div",
964
963
  {
965
- className: cx("wp-alert", `wp-alert--${tone}`, bar && "wp-alert--bar", className),
964
+ className: joinClass("wp-alert", `wp-alert--${tone}`, bar && "wp-alert--bar", className),
966
965
  role: tone === "danger" ? "alert" : "status",
967
966
  ...rest,
968
967
  children: [
@@ -978,7 +977,7 @@ function Alert({ tone = "info", title, children, actions, onClose, bar = false,
978
977
  );
979
978
  }
980
979
  function Toast({ tone = "info", title, children, action, onClose, className = "", ...rest }) {
981
- return /* @__PURE__ */ jsxs("div", { className: cx("wp-toast", `wp-toast--${tone}`, className), role: "status", ...rest, children: [
980
+ return /* @__PURE__ */ jsxs("div", { className: joinClass("wp-toast", `wp-toast--${tone}`, className), role: "status", ...rest, children: [
982
981
  /* @__PURE__ */ jsx("span", { className: "wp-toast__icon", children: /* @__PURE__ */ jsx(Icon, { name: TONE_ICONS[tone] ?? "info", size: 16 }) }),
983
982
  /* @__PURE__ */ jsxs("div", { className: "wp-toast__body", children: [
984
983
  title ? /* @__PURE__ */ jsx("span", { className: "wp-toast__title", children: title }) : null,
@@ -992,7 +991,7 @@ function Tabs({ items = [], value, onChange, size = "md", onChrome = false, clas
992
991
  return /* @__PURE__ */ jsx(
993
992
  "div",
994
993
  {
995
- className: cx("wp-tabs", size === "lg" && "wp-tabs--lg", onChrome && "wp-tabs--onchrome", className),
994
+ className: joinClass("wp-tabs", size === "lg" && "wp-tabs--lg", onChrome && "wp-tabs--onchrome", className),
996
995
  role: "tablist",
997
996
  ...rest,
998
997
  children: items.map((item) => /* @__PURE__ */ jsxs(
@@ -1077,7 +1076,7 @@ function Table({
1077
1076
  }
1078
1077
  function StatCard({ label, value, unit, delta, trend = "flat", icon, footer, size = "md", className = "", ...rest }) {
1079
1078
  const arrow = trend === "up" ? "arrow-up-right" : trend === "down" ? "arrow-down" : "minus";
1080
- return /* @__PURE__ */ jsx("div", { className: cx("wp-card", className), ...rest, children: /* @__PURE__ */ jsx("div", { className: "wp-card__body", children: /* @__PURE__ */ jsxs("div", { className: size === "sm" ? "wp-stat wp-stat--sm" : "wp-stat", children: [
1079
+ return /* @__PURE__ */ jsx("div", { className: joinClass("wp-card", className), ...rest, children: /* @__PURE__ */ jsx("div", { className: "wp-card__body", children: /* @__PURE__ */ jsxs("div", { className: size === "sm" ? "wp-stat wp-stat--sm" : "wp-stat", children: [
1081
1080
  /* @__PURE__ */ jsxs("div", { className: "wp-stat__label", children: [
1082
1081
  icon ? /* @__PURE__ */ jsx(Icon, { name: icon, size: 14 }) : null,
1083
1082
  label
@@ -1094,7 +1093,7 @@ function StatCard({ label, value, unit, delta, trend = "flat", icon, footer, siz
1094
1093
  ] }) }) });
1095
1094
  }
1096
1095
  function EmptyState({ icon = "square-dashed", title, children, actions, tight = false, className = "", ...rest }) {
1097
- return /* @__PURE__ */ jsxs("div", { className: cx("wp-empty", tight && "wp-empty--tight", className), ...rest, children: [
1096
+ return /* @__PURE__ */ jsxs("div", { className: joinClass("wp-empty", tight && "wp-empty--tight", className), ...rest, children: [
1098
1097
  /* @__PURE__ */ jsx("span", { className: "wp-empty__mark", children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 20 }) }),
1099
1098
  title ? /* @__PURE__ */ jsx("div", { className: "wp-empty__title", children: title }) : null,
1100
1099
  children ? /* @__PURE__ */ jsx("div", { className: "wp-empty__text", children }) : null,
@@ -1105,7 +1104,7 @@ function Spinner({ size = "md", inverse = false, label, className = "", ...rest
1105
1104
  const el = /* @__PURE__ */ jsx(
1106
1105
  "span",
1107
1106
  {
1108
- className: cx("wp-spinner", size !== "md" && `wp-spinner--${size}`, inverse && "wp-spinner--inverse", className),
1107
+ className: joinClass("wp-spinner", size !== "md" && `wp-spinner--${size}`, inverse && "wp-spinner--inverse", className),
1109
1108
  role: "status",
1110
1109
  "aria-label": label || "\uB85C\uB529 \uC911",
1111
1110
  ...rest
@@ -1149,7 +1148,7 @@ function ProgressBar({
1149
1148
  if (!showValue && !label) {
1150
1149
  return /* @__PURE__ */ jsx("div", { className, ...rest, children: bar });
1151
1150
  }
1152
- return /* @__PURE__ */ jsxs("div", { className: cx("wp-col", className), style: { gap: 5 }, ...rest, children: [
1151
+ return /* @__PURE__ */ jsxs("div", { className: joinClass("wp-col", className), style: { gap: 5 }, ...rest, children: [
1153
1152
  label ? /* @__PURE__ */ jsxs("div", { className: "wp-row wp-row--between", children: [
1154
1153
  /* @__PURE__ */ jsx("span", { className: "wp-caption", children: label }),
1155
1154
  showValue ? /* @__PURE__ */ jsxs("span", { className: "wp-caption wp-num", children: [
@@ -1182,7 +1181,7 @@ function pageItems(page, total) {
1182
1181
  function Pagination({ page = 1, pageCount = 1, total, pageSize, onChange, className = "", ...rest }) {
1183
1182
  const from = total != null && pageSize ? (page - 1) * pageSize + 1 : null;
1184
1183
  const to = total != null && pageSize ? Math.min(total, page * pageSize) : null;
1185
- return /* @__PURE__ */ jsxs("div", { className: cx("wp-pager", className), ...rest, children: [
1184
+ return /* @__PURE__ */ jsxs("div", { className: joinClass("wp-pager", className), ...rest, children: [
1186
1185
  from != null ? /* @__PURE__ */ jsxs("span", { className: "wp-num", children: [
1187
1186
  from,
1188
1187
  "\u2013",
@@ -1309,11 +1308,10 @@ function Tooltip({ label, shortcut, placement = "top", wrap = false, children, c
1309
1308
  }[placement];
1310
1309
  const classes = ["wp-tooltip", "wp-tooltip--" + placement];
1311
1310
  if (wrap) classes.push("wp-tooltip--wrap");
1312
- if (className) classes.push(className);
1313
1311
  return /* @__PURE__ */ jsxs(
1314
1312
  "span",
1315
1313
  {
1316
- className: "wp-tooltip-host",
1314
+ className: joinClass("wp-tooltip-host", className),
1317
1315
  onMouseEnter: () => setOpen(true),
1318
1316
  onMouseLeave: () => setOpen(false),
1319
1317
  onFocus: () => setOpen(true),
@@ -1,6 +1,6 @@
1
+ import { boxed } from './chunk-SAN4IX6N.js';
1
2
  import { jsxs, jsx } from 'react/jsx-runtime';
2
3
 
3
- // src/widgets/StackedMeter.tsx
4
4
  var resolveColor = (color, index) => {
5
5
  if (!color) return `var(--wp-series-${index % 8 + 1})`;
6
6
  if (/^[1-8]$/.test(color)) return `var(--wp-series-${color})`;
@@ -15,7 +15,7 @@ var dotStyle = (color) => ({
15
15
  background: color,
16
16
  flexShrink: 0
17
17
  });
18
- function StackedMeter({
18
+ function StackedMeterImpl({
19
19
  segments,
20
20
  showLegend = true,
21
21
  height = 10
@@ -111,5 +111,6 @@ function StackedMeter({
111
111
  )
112
112
  ] });
113
113
  }
114
+ var StackedMeter = boxed(StackedMeterImpl, "StackedMeter");
114
115
 
115
116
  export { StackedMeter };
@@ -1,4 +1,5 @@
1
- import { IconButton, Badge } from './chunk-CRSY67TZ.js';
1
+ import { IconButton, Badge } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useRef, useState, useMemo, useCallback, useEffect } from 'react';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
@@ -101,7 +102,7 @@ var nodeCardStyle = (selected) => ({
101
102
  cursor: "pointer",
102
103
  transition: "box-shadow var(--wp-duration-fast), border-color var(--wp-duration-fast)"
103
104
  });
104
- function OrgChart({
105
+ function OrgChartImpl({
105
106
  root,
106
107
  onNodeClick,
107
108
  selectedId,
@@ -429,5 +430,6 @@ function OrgChart({
429
430
  }
430
431
  );
431
432
  }
433
+ var OrgChart = boxed(OrgChartImpl, "OrgChart");
432
434
 
433
435
  export { OrgChart };
@@ -1,4 +1,5 @@
1
- import { Textarea, Icon } from './chunk-CRSY67TZ.js';
1
+ import { Textarea, Icon } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useState, useRef, useId, useEffect, useCallback } from 'react';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
@@ -41,7 +42,7 @@ function describeParseError(err, text) {
41
42
  }
42
43
  return `JSON \uAD6C\uBB38 \uC624\uB958: ${message}`;
43
44
  }
44
- function JsonField({
45
+ function JsonFieldImpl({
45
46
  value,
46
47
  onChange,
47
48
  rows = 6,
@@ -115,5 +116,6 @@ function JsonField({
115
116
  }
116
117
  );
117
118
  }
119
+ var JsonField = boxed(JsonFieldImpl, "JsonField");
118
120
 
119
121
  export { JsonField };
@@ -1,4 +1,5 @@
1
- import { Button } from './chunk-CRSY67TZ.js';
1
+ import { Button } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useEffect } from 'react';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
@@ -18,7 +19,7 @@ var PRINT_CSS = `
18
19
  function PrintStyles() {
19
20
  return /* @__PURE__ */ jsx("style", { href: "erp-print", precedence: "medium", children: PRINT_CSS });
20
21
  }
21
- function PrintSheet({ title, children, autoPrint = false }) {
22
+ function PrintSheetImpl({ title, children, autoPrint = false }) {
22
23
  useEffect(() => {
23
24
  if (!autoPrint || !window.opener) return;
24
25
  const timer = window.setTimeout(() => window.print(), 500);
@@ -36,5 +37,6 @@ function PrintSheet({ title, children, autoPrint = false }) {
36
37
  ] })
37
38
  ] });
38
39
  }
40
+ var PrintSheet = boxed(PrintSheetImpl, "PrintSheet");
39
41
 
40
42
  export { PrintSheet };
@@ -1,4 +1,4 @@
1
- import { Tag, Input, Button, IconButton, Field, Checkbox } from './chunk-CRSY67TZ.js';
1
+ import { Tag, Input, Button, IconButton, Field, Checkbox } from './chunk-B5JTXYDB.js';
2
2
  import { useRef, useEffect, useState, useMemo } from 'react';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
 
@@ -1,6 +1,6 @@
1
+ import { boxed } from './chunk-SAN4IX6N.js';
1
2
  import { jsxs, jsx } from 'react/jsx-runtime';
2
3
 
3
- // src/widgets/SummaryTable.tsx
4
4
  var SUMMARY_TABLE_CSS = `
5
5
  .erp-sumtable tfoot td{height:var(--wp-row-h);padding:0 12px;background:var(--wp-surface-sunken);border-top:var(--wp-border-w) solid var(--wp-border-strong);color:var(--wp-text-strong);font-weight:var(--wp-weight-semibold);vertical-align:middle}
6
6
  .erp-sumtable.wp-table--dense tfoot td{height:var(--wp-row-h-dense)}
@@ -17,7 +17,7 @@ function cellClass(column) {
17
17
  if (column.strong) classes.push("wp-table__strong");
18
18
  return classes.length > 0 ? classes.join(" ") : void 0;
19
19
  }
20
- function SummaryTable({ columns, rows, footer, dense = false }) {
20
+ function SummaryTableImpl({ columns, rows, footer, dense = false }) {
21
21
  const tableClass = dense ? "wp-table wp-table--dense erp-sumtable" : "wp-table erp-sumtable";
22
22
  return /* @__PURE__ */ jsxs("div", { className: "erp-sumtable__scroll", children: [
23
23
  /* @__PURE__ */ jsx(SummaryTableStyles, {}),
@@ -35,5 +35,6 @@ function SummaryTable({ columns, rows, footer, dense = false }) {
35
35
  ] })
36
36
  ] });
37
37
  }
38
+ var SummaryTable = boxed(SummaryTableImpl, "SummaryTable");
38
39
 
39
40
  export { SummaryTable };
@@ -1,9 +1,10 @@
1
- import { includesLooseSearch } from './chunk-TKB7H5DB.js';
2
- import { Button, Dialog, Input, Tag, Checkbox } from './chunk-CRSY67TZ.js';
1
+ import { includesLooseSearch } from './chunk-NIRR6KSQ.js';
2
+ import { Button, Dialog, Input, Tag, Checkbox } from './chunk-B5JTXYDB.js';
3
+ import { boxed } from './chunk-SAN4IX6N.js';
3
4
  import React, { useMemo, useState, useEffect } from 'react';
4
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
6
 
6
- function SearchableMultiPicker({
7
+ function SearchableMultiPickerImpl({
7
8
  title,
8
9
  options,
9
10
  values,
@@ -182,5 +183,6 @@ function SearchableMultiPicker({
182
183
  ) : null
183
184
  ] });
184
185
  }
186
+ var SearchableMultiPicker = boxed(SearchableMultiPickerImpl, "SearchableMultiPicker");
185
187
 
186
188
  export { SearchableMultiPicker };
@@ -1,3 +1,5 @@
1
+ import React from 'react';
2
+
1
3
  // src/layout.ts
2
4
  var GAP_CSS = {
3
5
  "2": "2px",
@@ -34,6 +36,19 @@ var TEXT_ALIGN_CSS = {
34
36
  right: "right"
35
37
  };
36
38
  var COLUMNS = /* @__PURE__ */ new Set([1, 2, 3, 4, 5, 6]);
39
+ var SIZE_CSS = {
40
+ "96": "96px",
41
+ "128": "128px",
42
+ "160": "160px",
43
+ "192": "192px",
44
+ "224": "224px",
45
+ "256": "256px",
46
+ "288": "288px",
47
+ "320": "320px",
48
+ "384": "384px",
49
+ "480": "480px",
50
+ full: "100%"
51
+ };
37
52
  function lookup(table, value) {
38
53
  if (value === void 0 || value === null) return void 0;
39
54
  return table[String(value)];
@@ -57,7 +72,13 @@ var CHILD_LAYOUT_PROPS = /* @__PURE__ */ new Set([
57
72
  "shrink",
58
73
  "span",
59
74
  "selfAlign",
60
- "truncate"
75
+ "truncate",
76
+ "width",
77
+ "maxWidth",
78
+ "minWidth",
79
+ "marginTop",
80
+ "marginBottom",
81
+ "pushEnd"
61
82
  ]);
62
83
  function childLayoutFrom(props) {
63
84
  const style = {};
@@ -67,11 +88,31 @@ function childLayoutFrom(props) {
67
88
  if (Number.isInteger(span) && COLUMNS.has(span)) style.gridColumn = `span ${span}`;
68
89
  const alignSelf = lookup(ALIGN_CSS, props.selfAlign);
69
90
  if (alignSelf !== void 0) style.alignSelf = alignSelf;
91
+ const width = lookup(SIZE_CSS, props.width);
92
+ if (width !== void 0) style.width = width;
93
+ const maxWidth = lookup(SIZE_CSS, props.maxWidth);
94
+ if (maxWidth !== void 0) style.maxWidth = maxWidth;
95
+ const minWidth = lookup(SIZE_CSS, props.minWidth);
96
+ if (minWidth !== void 0) style.minWidth = minWidth;
97
+ const marginTop = lookup(GAP_CSS, props.marginTop);
98
+ if (marginTop !== void 0) style.marginTop = marginTop;
99
+ const marginBottom = lookup(GAP_CSS, props.marginBottom);
100
+ if (marginBottom !== void 0) style.marginBottom = marginBottom;
101
+ if (props.pushEnd === true) style.marginInlineStart = "auto";
70
102
  const className = props.truncate ? "wp-truncate" : void 0;
71
103
  const hasStyle = Object.keys(style).length > 0;
72
104
  if (!hasStyle && className === void 0) return void 0;
73
105
  return { style: hasStyle ? style : void 0, className };
74
106
  }
107
+ function mergeStyle(own, given) {
108
+ if (!own) return given;
109
+ if (!given) return own;
110
+ return { ...own, ...given };
111
+ }
112
+ function joinClass(...parts) {
113
+ const kept = parts.filter((part) => typeof part === "string" && part.length > 0);
114
+ return kept.length > 0 ? kept.join(" ") : void 0;
115
+ }
75
116
  function typographyStyle(props) {
76
117
  const fontWeight = lookup(WEIGHT_CSS, props.weight);
77
118
  const textAlign = lookup(TEXT_ALIGN_CSS, props.textAlign);
@@ -86,5 +127,39 @@ var LAYOUT_CSS = `
86
127
  @media (max-width:900px){.wp-grid--5,.wp-grid--6{grid-template-columns:repeat(2,minmax(0,1fr))}}
87
128
  @media (max-width:600px){.wp-grid--5,.wp-grid--6{grid-template-columns:minmax(0,1fr)}}
88
129
  `;
130
+ var BOXED = /* @__PURE__ */ Symbol.for("wipco.sdui.boxed");
131
+ function apply(element, box) {
132
+ const own = element.props;
133
+ return React.cloneElement(element, {
134
+ className: joinClass(own.className, box.className),
135
+ style: mergeStyle(own.style, box.style)
136
+ });
137
+ }
138
+ function boxed(Inner, displayName) {
139
+ if (Inner[BOXED] === true) return Inner;
140
+ const plainFunction = typeof Inner === "function" && Inner.prototype?.isReactComponent === void 0;
141
+ if (!plainFunction) return Inner;
142
+ const render = Inner;
143
+ const Wrapped = (props) => {
144
+ const { style, className, ...rest } = props;
145
+ const element = render(rest);
146
+ if (style === void 0 && className === void 0) return element;
147
+ if (!React.isValidElement(element)) return element;
148
+ if (element.type === React.Fragment) {
149
+ const kids = React.Children.toArray(
150
+ element.props.children
151
+ );
152
+ const at = kids.findIndex((kid) => React.isValidElement(kid));
153
+ if (at < 0) return element;
154
+ const next = kids.slice();
155
+ next[at] = apply(kids[at], { style, className });
156
+ return React.createElement(React.Fragment, null, ...next);
157
+ }
158
+ return apply(element, { style, className });
159
+ };
160
+ Wrapped[BOXED] = true;
161
+ Wrapped.displayName = displayName ?? `boxed(${Inner.displayName ?? Inner.name ?? "Component"})`;
162
+ return Wrapped;
163
+ }
89
164
 
90
- export { CHILD_LAYOUT_PROPS, LAYOUT_CSS, childLayoutFrom, columnsClass, containerLayoutStyle, typographyStyle };
165
+ export { CHILD_LAYOUT_PROPS, LAYOUT_CSS, boxed, childLayoutFrom, columnsClass, containerLayoutStyle, joinClass, mergeStyle, typographyStyle };
@@ -1,5 +1,6 @@
1
- import { includesLooseSearch } from './chunk-TKB7H5DB.js';
2
- import { Icon, Button, Input, Spinner } from './chunk-CRSY67TZ.js';
1
+ import { includesLooseSearch } from './chunk-NIRR6KSQ.js';
2
+ import { Icon, Button, Input, Spinner } from './chunk-B5JTXYDB.js';
3
+ import { boxed } from './chunk-SAN4IX6N.js';
3
4
  import { useId, useRef, useState, useEffect, useMemo } from 'react';
4
5
  import { jsxs, jsx } from 'react/jsx-runtime';
5
6
 
@@ -31,7 +32,7 @@ var ellipsisStyle = {
31
32
  var statusRowStyle = {
32
33
  padding: "var(--wp-space-2) var(--wp-space-3)"
33
34
  };
34
- function AutocompleteField({
35
+ function AutocompleteFieldImpl({
35
36
  search,
36
37
  options,
37
38
  labelKey = "label",
@@ -278,5 +279,6 @@ function AutocompleteField({
278
279
  ) }) : null
279
280
  ] });
280
281
  }
282
+ var AutocompleteField = boxed(AutocompleteFieldImpl, "AutocompleteField");
281
283
 
282
284
  export { AutocompleteField, toAutocompleteOptions };
@@ -1,8 +1,9 @@
1
- import { Badge, Tag } from './chunk-CRSY67TZ.js';
1
+ import { Badge, Tag } from './chunk-B5JTXYDB.js';
2
+ import { boxed } from './chunk-SAN4IX6N.js';
2
3
  import { useState, useMemo } from 'react';
3
4
  import { jsx } from 'react/jsx-runtime';
4
5
 
5
- function TagMultiSelect({
6
+ function TagMultiSelectImpl({
6
7
  options,
7
8
  values,
8
9
  onChange,
@@ -55,5 +56,6 @@ function TagMultiSelect({
55
56
  );
56
57
  }) });
57
58
  }
59
+ var TagMultiSelect = boxed(TagMultiSelectImpl, "TagMultiSelect");
58
60
 
59
61
  export { TagMultiSelect };