@x-plat/design-system 0.8.2 → 0.9.0

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 (72) hide show
  1. package/dist/components/AutoResizeTextArea/index.cjs +140 -4
  2. package/dist/components/AutoResizeTextArea/index.css +38 -3
  3. package/dist/components/AutoResizeTextArea/index.d.cts +3 -0
  4. package/dist/components/AutoResizeTextArea/index.d.ts +3 -0
  5. package/dist/components/AutoResizeTextArea/index.js +140 -4
  6. package/dist/components/ChatInput/index.cjs +150 -9
  7. package/dist/components/ChatInput/index.css +38 -3
  8. package/dist/components/ChatInput/index.d.cts +3 -0
  9. package/dist/components/ChatInput/index.d.ts +3 -0
  10. package/dist/components/ChatInput/index.js +151 -10
  11. package/dist/components/CheckBox/index.cjs +132 -5
  12. package/dist/components/CheckBox/index.css +38 -0
  13. package/dist/components/CheckBox/index.d.cts +3 -0
  14. package/dist/components/CheckBox/index.d.ts +3 -0
  15. package/dist/components/CheckBox/index.js +132 -5
  16. package/dist/components/DatePicker/index.cjs +72 -59
  17. package/dist/components/DatePicker/index.css +38 -34
  18. package/dist/components/DatePicker/index.js +38 -25
  19. package/dist/components/FieldMessage/index.cjs +183 -0
  20. package/dist/components/FieldMessage/index.css +37 -0
  21. package/dist/components/FieldMessage/index.d.cts +37 -0
  22. package/dist/components/FieldMessage/index.d.ts +37 -0
  23. package/dist/components/FieldMessage/index.js +154 -0
  24. package/dist/components/FileUpload/index.cjs +135 -8
  25. package/dist/components/FileUpload/index.css +38 -0
  26. package/dist/components/FileUpload/index.d.cts +3 -0
  27. package/dist/components/FileUpload/index.d.ts +3 -0
  28. package/dist/components/FileUpload/index.js +135 -8
  29. package/dist/components/ImageSelector/index.cjs +153 -11
  30. package/dist/components/ImageSelector/index.css +38 -0
  31. package/dist/components/ImageSelector/index.d.cts +3 -0
  32. package/dist/components/ImageSelector/index.d.ts +3 -0
  33. package/dist/components/ImageSelector/index.js +153 -11
  34. package/dist/components/Input/index.cjs +38 -25
  35. package/dist/components/Input/index.css +38 -34
  36. package/dist/components/Input/index.d.cts +3 -8
  37. package/dist/components/Input/index.d.ts +3 -8
  38. package/dist/components/Input/index.js +36 -23
  39. package/dist/components/Radio/index.cjs +152 -8
  40. package/dist/components/Radio/index.css +38 -0
  41. package/dist/components/Radio/index.d.cts +3 -0
  42. package/dist/components/Radio/index.d.ts +3 -0
  43. package/dist/components/Radio/index.js +152 -8
  44. package/dist/components/Select/index.cjs +139 -13
  45. package/dist/components/Select/index.css +38 -0
  46. package/dist/components/Select/index.d.cts +3 -0
  47. package/dist/components/Select/index.d.ts +3 -0
  48. package/dist/components/Select/index.js +139 -13
  49. package/dist/components/Switch/index.cjs +140 -4
  50. package/dist/components/Switch/index.css +38 -0
  51. package/dist/components/Switch/index.d.cts +3 -0
  52. package/dist/components/Switch/index.d.ts +3 -0
  53. package/dist/components/Switch/index.js +140 -4
  54. package/dist/components/TextArea/index.cjs +138 -2
  55. package/dist/components/TextArea/index.css +38 -3
  56. package/dist/components/TextArea/index.d.cts +3 -0
  57. package/dist/components/TextArea/index.d.ts +3 -0
  58. package/dist/components/TextArea/index.js +138 -2
  59. package/dist/components/index.cjs +439 -385
  60. package/dist/components/index.css +38 -40
  61. package/dist/components/index.d.cts +2 -0
  62. package/dist/components/index.d.ts +2 -0
  63. package/dist/components/index.js +222 -171
  64. package/dist/index.cjs +444 -390
  65. package/dist/index.css +38 -40
  66. package/dist/index.d.cts +2 -0
  67. package/dist/index.d.ts +2 -0
  68. package/dist/index.js +224 -173
  69. package/dist/validation-Dqo1zqhT.d.cts +13 -0
  70. package/dist/validation-Dqo1zqhT.d.ts +13 -0
  71. package/guidelines/components/form.md +26 -0
  72. package/package.json +1 -1
@@ -49,6 +49,8 @@ __export(components_exports, {
49
49
  Dropdown: () => Dropdown_default,
50
50
  Editor: () => Editor_default,
51
51
  EmptyState: () => EmptyState_default,
52
+ Field: () => Field,
53
+ FieldMessage: () => FieldMessage_default,
52
54
  FileUpload: () => FileUpload_default,
53
55
  HtmlTypeWriter: () => HtmlTypeWriter_default,
54
56
  HtmlTypewriter: () => HtmlTypeWriter_default,
@@ -87,6 +89,7 @@ __export(components_exports, {
87
89
  ToastProvider: () => ToastProvider,
88
90
  Tooltip: () => Tooltip_default,
89
91
  Video: () => Video_default,
92
+ hasError: () => hasError,
90
93
  isInRange: () => isInRange,
91
94
  isSameDay: () => isSameDay,
92
95
  useCalendar: () => useCalendar,
@@ -1601,11 +1604,49 @@ var Alert_default = Alert;
1601
1604
 
1602
1605
  // src/components/AutoResizeTextArea/AutoResizeTextArea.tsx
1603
1606
  var import_react2 = __toESM(require("react"), 1);
1607
+
1608
+ // src/components/FieldMessage/FieldMessage.tsx
1604
1609
  var import_jsx_runtime297 = require("react/jsx-runtime");
1610
+ var ICON = {
1611
+ default: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(InfoIcon_default, {}),
1612
+ success: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(SuccessIcon_default, {}),
1613
+ warning: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(InfoIcon_default, {}),
1614
+ error: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(ErrorIcon_default, {})
1615
+ };
1616
+ var FieldMessage = (props) => {
1617
+ const { validations } = props;
1618
+ if (!validations || validations.length === 0) return null;
1619
+ return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: "lib-xplat-field-message-wrap", children: validations.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
1620
+ "div",
1621
+ {
1622
+ className: clsx_default("lib-xplat-field-message", v.status),
1623
+ children: [
1624
+ /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: "icon", children: ICON[v.status] }),
1625
+ /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("span", { children: v.message })
1626
+ ]
1627
+ },
1628
+ `${v.message}_${idx}`
1629
+ )) });
1630
+ };
1631
+ FieldMessage.displayName = "FieldMessage";
1632
+ var FieldMessage_default = FieldMessage;
1633
+ var Field = (props) => {
1634
+ const { validations, children } = props;
1635
+ if (!validations || validations.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_jsx_runtime297.Fragment, { children });
1636
+ return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)("div", { className: "lib-xplat-field", children: [
1637
+ children,
1638
+ /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(FieldMessage, { validations })
1639
+ ] });
1640
+ };
1641
+ Field.displayName = "Field";
1642
+ var hasError = (validations) => !!validations?.some((v) => v.status === "error");
1643
+
1644
+ // src/components/AutoResizeTextArea/AutoResizeTextArea.tsx
1645
+ var import_jsx_runtime298 = require("react/jsx-runtime");
1605
1646
  var MAX_HEIGHT = 400;
1606
1647
  var AutoResizeTextArea = import_react2.default.forwardRef(
1607
1648
  (props, ref) => {
1608
- const { value, className, onChange, disabled, bare = false, ...textareaProps } = props;
1649
+ const { value, className, onChange, disabled, bare = false, validations, ...textareaProps } = props;
1609
1650
  const localRef = import_react2.default.useRef(null);
1610
1651
  const setRefs = (el) => {
1611
1652
  localRef.current = el;
@@ -1633,9 +1674,10 @@ var AutoResizeTextArea = import_react2.default.forwardRef(
1633
1674
  updateHeight();
1634
1675
  }, [value]);
1635
1676
  if (bare) {
1636
- return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
1677
+ return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
1637
1678
  "textarea",
1638
1679
  {
1680
+ "aria-invalid": hasError(validations) || void 0,
1639
1681
  ...textareaProps,
1640
1682
  ref: setRefs,
1641
1683
  className,
@@ -1645,9 +1687,10 @@ var AutoResizeTextArea = import_react2.default.forwardRef(
1645
1687
  }
1646
1688
  );
1647
1689
  }
1648
- return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: clsx_default("lib-xplat-auto-resize-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: clsx_default("lib-xplat-auto-resize-textarea", disabled && "disabled"), children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
1690
+ const control = /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: clsx_default("lib-xplat-auto-resize-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: clsx_default("lib-xplat-auto-resize-textarea", disabled && "disabled"), children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
1649
1691
  "textarea",
1650
1692
  {
1693
+ "aria-invalid": hasError(validations) || void 0,
1651
1694
  ...textareaProps,
1652
1695
  ref: setRefs,
1653
1696
  disabled,
@@ -1655,13 +1698,14 @@ var AutoResizeTextArea = import_react2.default.forwardRef(
1655
1698
  onChange: handleChange
1656
1699
  }
1657
1700
  ) }) });
1701
+ return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(Field, { validations, children: control });
1658
1702
  }
1659
1703
  );
1660
1704
  AutoResizeTextArea.displayName = "AutoResizeTextArea";
1661
1705
  var AutoResizeTextArea_default = AutoResizeTextArea;
1662
1706
 
1663
1707
  // src/components/Avatar/Avatar.tsx
1664
- var import_jsx_runtime298 = require("react/jsx-runtime");
1708
+ var import_jsx_runtime299 = require("react/jsx-runtime");
1665
1709
  var CATEGORICAL_COUNT = 8;
1666
1710
  var getColorIndex = (name) => {
1667
1711
  if (!name) return 1;
@@ -1678,36 +1722,36 @@ var Avatar = (props) => {
1678
1722
  const fullInitials = name ? name.split(" ").map((s) => s[0]).join("").slice(0, 2).toUpperCase() : "";
1679
1723
  const initials = size === "sm" ? fullInitials.slice(0, 1) : fullInitials;
1680
1724
  const catIndex = getColorIndex(name || "");
1681
- return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: clsx_default("lib-xplat-avatar", size), children: src ? /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: clsx_default("fallback", `cat-${catIndex}`), children: initials || /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) }) });
1725
+ return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: clsx_default("lib-xplat-avatar", size), children: src ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: clsx_default("fallback", `cat-${catIndex}`), children: initials || /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) }) });
1682
1726
  };
1683
1727
  Avatar.displayName = "Avatar";
1684
1728
  var Avatar_default = Avatar;
1685
1729
 
1686
1730
  // src/components/Box/Box.tsx
1687
- var import_jsx_runtime299 = require("react/jsx-runtime");
1731
+ var import_jsx_runtime300 = require("react/jsx-runtime");
1688
1732
  var Box = ({
1689
1733
  children,
1690
1734
  title,
1691
1735
  variant = "outlined",
1692
1736
  padding = "md"
1693
1737
  }) => {
1694
- return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
1695
- title && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "box-title", children: title }),
1696
- /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "box-content", children })
1738
+ return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
1739
+ title && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "box-title", children: title }),
1740
+ /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "box-content", children })
1697
1741
  ] });
1698
1742
  };
1699
1743
  Box.displayName = "Box";
1700
1744
  var Box_default = Box;
1701
1745
 
1702
1746
  // src/components/Breadcrumb/Breadcrumb.tsx
1703
- var import_jsx_runtime300 = require("react/jsx-runtime");
1747
+ var import_jsx_runtime301 = require("react/jsx-runtime");
1704
1748
  var Breadcrumb = (props) => {
1705
1749
  const { items, separator = "/" } = props;
1706
- return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ol", { children: items.map((item, index) => {
1750
+ return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("ol", { children: items.map((item, index) => {
1707
1751
  const isLast = index === items.length - 1;
1708
- return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("li", { children: [
1709
- isLast ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("button", { className: "link", onClick: item.onClick, children: item.label }),
1710
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: "separator", children: separator })
1752
+ return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("li", { children: [
1753
+ isLast ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("button", { className: "link", onClick: item.onClick, children: item.label }),
1754
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "separator", children: separator })
1711
1755
  ] }, index);
1712
1756
  }) }) });
1713
1757
  };
@@ -1715,7 +1759,7 @@ Breadcrumb.displayName = "Breadcrumb";
1715
1759
  var Breadcrumb_default = Breadcrumb;
1716
1760
 
1717
1761
  // src/components/Button/Button.tsx
1718
- var import_jsx_runtime301 = require("react/jsx-runtime");
1762
+ var import_jsx_runtime302 = require("react/jsx-runtime");
1719
1763
  var Button = (props) => {
1720
1764
  const {
1721
1765
  children,
@@ -1724,7 +1768,7 @@ var Button = (props) => {
1724
1768
  disabled,
1725
1769
  ...rest
1726
1770
  } = props;
1727
- return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
1771
+ return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
1728
1772
  "button",
1729
1773
  {
1730
1774
  className: clsx_default("lib-xplat-button", type, size),
@@ -1841,7 +1885,7 @@ var MONTH_LABELS = {
1841
1885
  };
1842
1886
 
1843
1887
  // src/components/Calendar/Calendar.tsx
1844
- var import_jsx_runtime302 = require("react/jsx-runtime");
1888
+ var import_jsx_runtime303 = require("react/jsx-runtime");
1845
1889
  var DayCell = import_react4.default.memo(
1846
1890
  ({
1847
1891
  day,
@@ -1853,7 +1897,7 @@ var DayCell = import_react4.default.memo(
1853
1897
  onEventClick
1854
1898
  }) => {
1855
1899
  if (renderDay) {
1856
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
1900
+ return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
1857
1901
  "div",
1858
1902
  {
1859
1903
  className: clsx_default(
@@ -1870,7 +1914,7 @@ var DayCell = import_react4.default.memo(
1870
1914
  }
1871
1915
  );
1872
1916
  }
1873
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
1917
+ return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
1874
1918
  "div",
1875
1919
  {
1876
1920
  className: clsx_default(
@@ -1886,9 +1930,9 @@ var DayCell = import_react4.default.memo(
1886
1930
  if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
1887
1931
  },
1888
1932
  children: [
1889
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("span", { className: "calendar-day-number", children: day.day }),
1890
- dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "calendar-day-events", children: [
1891
- dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
1933
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("span", { className: "calendar-day-number", children: day.day }),
1934
+ dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "calendar-day-events", children: [
1935
+ dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
1892
1936
  "span",
1893
1937
  {
1894
1938
  className: "calendar-event-dot",
@@ -1901,7 +1945,7 @@ var DayCell = import_react4.default.memo(
1901
1945
  },
1902
1946
  ei
1903
1947
  )),
1904
- dayEvents.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("span", { className: "calendar-event-more", children: [
1948
+ dayEvents.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("span", { className: "calendar-event-more", children: [
1905
1949
  "+",
1906
1950
  dayEvents.length - 3
1907
1951
  ] })
@@ -2022,21 +2066,21 @@ var Calendar = (props) => {
2022
2066
  const weekdays = WEEKDAY_LABELS[locale];
2023
2067
  const monthLabels = MONTH_LABELS[locale];
2024
2068
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
2025
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
2069
+ return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
2026
2070
  "div",
2027
2071
  {
2028
2072
  className: "lib-xplat-calendar",
2029
2073
  style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
2030
2074
  children: [
2031
- /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "calendar-header", children: [
2032
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ChevronLeftIcon_default, {}) }),
2033
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
2034
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ChevronRightIcon_default, {}) }),
2035
- showToday && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
2075
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "calendar-header", children: [
2076
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ChevronLeftIcon_default, {}) }),
2077
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
2078
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ChevronRightIcon_default, {}) }),
2079
+ showToday && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
2036
2080
  ] }),
2037
- pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
2081
+ pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
2038
2082
  const y = yearRangeStart + i;
2039
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
2083
+ return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
2040
2084
  "button",
2041
2085
  {
2042
2086
  type: "button",
@@ -2047,7 +2091,7 @@ var Calendar = (props) => {
2047
2091
  y
2048
2092
  );
2049
2093
  }) }),
2050
- pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
2094
+ pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
2051
2095
  "button",
2052
2096
  {
2053
2097
  type: "button",
@@ -2057,8 +2101,8 @@ var Calendar = (props) => {
2057
2101
  },
2058
2102
  i
2059
2103
  )) }),
2060
- pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(import_jsx_runtime302.Fragment, { children: [
2061
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
2104
+ pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
2105
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
2062
2106
  "div",
2063
2107
  {
2064
2108
  className: clsx_default(
@@ -2070,12 +2114,12 @@ var Calendar = (props) => {
2070
2114
  },
2071
2115
  label
2072
2116
  )) }),
2073
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
2117
+ /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
2074
2118
  const dayEvents = getEventsForDay(day.date);
2075
2119
  const t = day.date.getTime();
2076
2120
  const disabled = t < minTime || t > maxTime;
2077
2121
  const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
2078
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
2122
+ return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
2079
2123
  DayCell,
2080
2124
  {
2081
2125
  day,
@@ -2101,10 +2145,10 @@ var Calendar_default = Calendar;
2101
2145
  var import_react5 = __toESM(require("react"), 1);
2102
2146
 
2103
2147
  // src/components/CardTab/CardTabPanel.tsx
2104
- var import_jsx_runtime303 = require("react/jsx-runtime");
2148
+ var import_jsx_runtime304 = require("react/jsx-runtime");
2105
2149
  var CardTabPanel = (props) => {
2106
2150
  const { children, columns = 3 } = props;
2107
- return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
2151
+ return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2108
2152
  "div",
2109
2153
  {
2110
2154
  className: "card-tab-panel",
@@ -2117,7 +2161,7 @@ CardTabPanel.displayName = "CardTab.Panel";
2117
2161
  var CardTabPanel_default = CardTabPanel;
2118
2162
 
2119
2163
  // src/components/CardTab/CardTab.tsx
2120
- var import_jsx_runtime304 = require("react/jsx-runtime");
2164
+ var import_jsx_runtime305 = require("react/jsx-runtime");
2121
2165
  var CardTabRoot = (props) => {
2122
2166
  const {
2123
2167
  tabs,
@@ -2141,10 +2185,10 @@ var CardTabRoot = (props) => {
2141
2185
  const activePanel = panels.find(
2142
2186
  (panel) => panel.props.value === activeValue
2143
2187
  );
2144
- return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
2145
- /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "card-tab-bar", children: tabs.map((tab) => {
2188
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
2189
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "card-tab-bar", children: tabs.map((tab) => {
2146
2190
  const isActive2 = tab.value === activeValue;
2147
- return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2191
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2148
2192
  "button",
2149
2193
  {
2150
2194
  className: clsx_default("card-tab-trigger", isActive2 && "active"),
@@ -2156,7 +2200,7 @@ var CardTabRoot = (props) => {
2156
2200
  tab.value
2157
2201
  );
2158
2202
  }) }),
2159
- /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "card-tab-body", children: activePanel })
2203
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "card-tab-body", children: activePanel })
2160
2204
  ] });
2161
2205
  };
2162
2206
  CardTabRoot.displayName = "CardTab";
@@ -2167,7 +2211,7 @@ var CardTab_default = CardTab;
2167
2211
 
2168
2212
  // src/components/Chart/Chart.tsx
2169
2213
  var import_react6 = __toESM(require("react"), 1);
2170
- var import_jsx_runtime305 = require("react/jsx-runtime");
2214
+ var import_jsx_runtime306 = require("react/jsx-runtime");
2171
2215
  var CATEGORICAL_COUNT2 = 8;
2172
2216
  var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
2173
2217
  const n = i + 1;
@@ -2310,12 +2354,12 @@ var formatTick = (value, maxVal) => {
2310
2354
  const fixed = value.toFixed(decimals);
2311
2355
  return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
2312
2356
  };
2313
- var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2357
+ var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_jsx_runtime306.Fragment, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2314
2358
  const y = PADDING.top + (1 - ratio) * chartH;
2315
2359
  const val = formatTick(maxVal * ratio, maxVal);
2316
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2317
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
2318
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2360
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { children: [
2361
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
2362
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2319
2363
  ] }, ratio);
2320
2364
  }) }));
2321
2365
  GridLines.displayName = "GridLines";
@@ -2327,10 +2371,10 @@ var getLabelStep = (count, chartW) => {
2327
2371
  };
2328
2372
  var AxisLabels = import_react6.default.memo(({ labels, count, chartW, height }) => {
2329
2373
  const step = getLabelStep(count, chartW);
2330
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: labels.map((label, i) => {
2374
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_jsx_runtime306.Fragment, { children: labels.map((label, i) => {
2331
2375
  if (i % step !== 0) return null;
2332
2376
  const x = PADDING.left + i / (count - 1 || 1) * chartW;
2333
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2377
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2334
2378
  }) });
2335
2379
  });
2336
2380
  AxisLabels.displayName = "AxisLabels";
@@ -2406,7 +2450,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
2406
2450
  }, [animate, width]);
2407
2451
  const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
2408
2452
  const lineClipId = "line-area-clip";
2409
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
2453
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
2410
2454
  "svg",
2411
2455
  {
2412
2456
  viewBox: `0 0 ${width} ${height}`,
@@ -2424,9 +2468,9 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
2424
2468
  onLeave();
2425
2469
  },
2426
2470
  children: [
2427
- animate && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("clipPath", { id: lineClipId, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
2428
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(GridLines, { width, height, chartH, maxVal }),
2429
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(AxisLabels, { labels, count, chartW, height }),
2471
+ animate && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("clipPath", { id: lineClipId, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
2472
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(GridLines, { width, height, chartH, maxVal }),
2473
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(AxisLabels, { labels, count, chartW, height }),
2430
2474
  entries.map(([key], di) => {
2431
2475
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
2432
2476
  const color = palette[2];
@@ -2435,16 +2479,16 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
2435
2479
  const gradientId = `line-gradient-${di}`;
2436
2480
  const polyPoints = points.map((p) => `${p.x},${p.y}`).join(" ");
2437
2481
  const areaD = `M ${points[0].x},${points[0].y} ${points.map((p) => `L ${p.x},${p.y}`).join(" ")} L ${points[points.length - 1].x},${PADDING.top + chartH} L ${points[0].x},${PADDING.top + chartH} Z`;
2438
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2439
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
2440
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
2441
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
2482
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { children: [
2483
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
2484
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
2485
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
2442
2486
  ] }) }),
2443
- /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
2444
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: areaD, fill: `url(#${gradientId})` }),
2445
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
2487
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
2488
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("path", { d: areaD, fill: `url(#${gradientId})` }),
2489
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
2446
2490
  ] }),
2447
- activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2491
+ activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2448
2492
  "circle",
2449
2493
  {
2450
2494
  cx: points[activeIndex].x,
@@ -2456,7 +2500,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
2456
2500
  )
2457
2501
  ] }, di);
2458
2502
  }),
2459
- activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2503
+ activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2460
2504
  "line",
2461
2505
  {
2462
2506
  x1: activeX,
@@ -2466,7 +2510,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
2466
2510
  className: "chart-crosshair"
2467
2511
  }
2468
2512
  ),
2469
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2513
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2470
2514
  "rect",
2471
2515
  {
2472
2516
  x: PADDING.left,
@@ -2515,7 +2559,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
2515
2559
  }, [animate, width]);
2516
2560
  const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
2517
2561
  const curveClipId = "curve-area-clip";
2518
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
2562
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
2519
2563
  "svg",
2520
2564
  {
2521
2565
  viewBox: `0 0 ${width} ${height}`,
@@ -2534,9 +2578,9 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
2534
2578
  onLeave();
2535
2579
  },
2536
2580
  children: [
2537
- animate && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("clipPath", { id: curveClipId, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
2538
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(GridLines, { width, height, chartH, maxVal }),
2539
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(AxisLabels, { labels, count, chartW, height }),
2581
+ animate && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("clipPath", { id: curveClipId, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
2582
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(GridLines, { width, height, chartH, maxVal }),
2583
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(AxisLabels, { labels, count, chartW, height }),
2540
2584
  entries.map(([key], di) => {
2541
2585
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
2542
2586
  const color = palette[2];
@@ -2545,16 +2589,16 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
2545
2589
  const gradientId = `curve-gradient-${di}`;
2546
2590
  const linePath = toSmoothPath(points);
2547
2591
  const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
2548
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2549
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
2550
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
2551
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
2592
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { children: [
2593
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
2594
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
2595
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
2552
2596
  ] }) }),
2553
- /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
2554
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` }),
2555
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
2597
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
2598
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` }),
2599
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
2556
2600
  ] }),
2557
- activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2601
+ activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2558
2602
  "circle",
2559
2603
  {
2560
2604
  cx: points[activeIndex].x,
@@ -2566,7 +2610,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
2566
2610
  )
2567
2611
  ] }, di);
2568
2612
  }),
2569
- activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2613
+ activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2570
2614
  "line",
2571
2615
  {
2572
2616
  x1: activeX,
@@ -2576,7 +2620,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
2576
2620
  className: "chart-crosshair"
2577
2621
  }
2578
2622
  ),
2579
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2623
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2580
2624
  "rect",
2581
2625
  {
2582
2626
  x: PADDING.left,
@@ -2619,11 +2663,11 @@ var BarChart = import_react6.default.memo(({ data, labels, width, height, animat
2619
2663
  [entries, maxVal, chartH, groupW, barW, barGap, groupCount]
2620
2664
  );
2621
2665
  const barLabelStep = getLabelStep(count, chartW);
2622
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
2623
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(GridLines, { width, height, chartH, maxVal }),
2666
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
2667
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(GridLines, { width, height, chartH, maxVal }),
2624
2668
  labels.map((label, i) => {
2625
2669
  if (i % barLabelStep !== 0) return null;
2626
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2670
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2627
2671
  }),
2628
2672
  entries.map(([key], di) => {
2629
2673
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
@@ -2632,7 +2676,7 @@ var BarChart = import_react6.default.memo(({ data, labels, width, height, animat
2632
2676
  const r2 = Math.min(4, b.w / 2);
2633
2677
  const d = b.h <= r2 ? `M ${b.x} ${b.y + b.h} V ${b.y} H ${b.x + b.w} V ${b.y + b.h} Z` : `M ${b.x} ${b.y + b.h} V ${b.y + r2} Q ${b.x} ${b.y} ${b.x + r2} ${b.y} H ${b.x + b.w - r2} Q ${b.x + b.w} ${b.y} ${b.x + b.w} ${b.y + r2} V ${b.y + b.h} Z`;
2634
2678
  const delay = 100 + i * 80;
2635
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2679
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2636
2680
  "path",
2637
2681
  {
2638
2682
  d,
@@ -2712,8 +2756,8 @@ var PieDonutChart = import_react6.default.memo(
2712
2756
  });
2713
2757
  }, [values, total, cx, cy, r2, innerR, labels]);
2714
2758
  const maskId = `pie-mask-${isDoughnut ? "d" : "p"}`;
2715
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
2716
- animate && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("mask", { id: maskId, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2759
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
2760
+ animate && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("mask", { id: maskId, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2717
2761
  "circle",
2718
2762
  {
2719
2763
  ref: maskRef,
@@ -2726,7 +2770,7 @@ var PieDonutChart = import_react6.default.memo(
2726
2770
  transform: `rotate(-90 ${cx} ${cy})`
2727
2771
  }
2728
2772
  ) }) }),
2729
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2773
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2730
2774
  "path",
2731
2775
  {
2732
2776
  d: s.d,
@@ -2761,15 +2805,15 @@ var ChartTooltip = ({ x, y, containerWidth, containerHeight, tooltipType, childr
2761
2805
  const sepIdx = content.indexOf(" \u2014 ");
2762
2806
  const title = sepIdx >= 0 ? content.slice(0, sepIdx) : content;
2763
2807
  const desc = sepIdx >= 0 ? content.slice(sepIdx + 3) : "";
2764
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
2808
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
2765
2809
  "div",
2766
2810
  {
2767
2811
  ref,
2768
2812
  className: `lib-xplat-tooltip ${tooltipType} chart-tooltip-pos`,
2769
2813
  style: { left: pos.left, top: pos.top },
2770
2814
  children: [
2771
- title && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "tooltip-title", children: title }),
2772
- desc && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "tooltip-desc", children: desc })
2815
+ title && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "tooltip-title", children: title }),
2816
+ desc && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "tooltip-desc", children: desc })
2773
2817
  ]
2774
2818
  }
2775
2819
  );
@@ -2781,14 +2825,14 @@ var ChartLegend = ({ data, labels, type }) => {
2781
2825
  const total = values.reduce((a, b) => a + b, 0) || 1;
2782
2826
  const firstKey = entries[0]?.[0] ?? "";
2783
2827
  const colorOffset = hashString(firstKey);
2784
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "chart-legend", children: values.map((v, i) => {
2828
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "chart-legend", children: values.map((v, i) => {
2785
2829
  const pct = Math.round(v / total * 100);
2786
2830
  const color = PIE_COLORS[(i + colorOffset) % PIE_COLORS.length];
2787
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-item", children: [
2788
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
2789
- /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-text", children: [
2790
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
2791
- /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("span", { className: "chart-legend-value", children: [
2831
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-item", children: [
2832
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
2833
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-text", children: [
2834
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
2835
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("span", { className: "chart-legend-value", children: [
2792
2836
  v.toLocaleString(),
2793
2837
  "(",
2794
2838
  pct,
@@ -2798,16 +2842,16 @@ var ChartLegend = ({ data, labels, type }) => {
2798
2842
  ] }, i);
2799
2843
  }) });
2800
2844
  }
2801
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "chart-legend", children: entries.map(([key], di) => {
2845
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "chart-legend", children: entries.map(([key], di) => {
2802
2846
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
2803
2847
  const color = palette[2];
2804
2848
  const values = entries[di][1];
2805
2849
  const sum = values.reduce((a, b) => a + b, 0);
2806
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-item", children: [
2807
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
2808
- /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-text", children: [
2809
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-label", children: key }),
2810
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-value", children: sum.toLocaleString() })
2850
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-item", children: [
2851
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
2852
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-text", children: [
2853
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-label", children: key }),
2854
+ /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-value", children: sum.toLocaleString() })
2811
2855
  ] })
2812
2856
  ] }, di);
2813
2857
  }) });
@@ -2821,14 +2865,14 @@ var Chart = import_react6.default.memo((props) => {
2821
2865
  const dataKey = import_react6.default.useMemo(() => JSON.stringify(labels), [labels]);
2822
2866
  const animate = useChartAnimation(containerRef, dataKey);
2823
2867
  const ready = width > 0 && height > 0;
2824
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
2825
- ready && type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2826
- ready && type === "curve" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2827
- ready && type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2828
- ready && type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2829
- ready && type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
2830
- ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(ChartLegend, { data: stableData, labels: stableLabels, type }),
2831
- tooltip.visible && tooltip.content && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
2868
+ return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
2869
+ ready && type === "line" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2870
+ ready && type === "curve" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2871
+ ready && type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2872
+ ready && type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
2873
+ ready && type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
2874
+ ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(ChartLegend, { data: stableData, labels: stableLabels, type }),
2875
+ tooltip.visible && tooltip.content && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
2832
2876
  ] });
2833
2877
  });
2834
2878
  Chart.displayName = "Chart";
@@ -2838,7 +2882,7 @@ var Chart_default = Chart;
2838
2882
  var import_react7 = __toESM(require("react"), 1);
2839
2883
 
2840
2884
  // src/components/IconButton/IconButton.tsx
2841
- var import_jsx_runtime306 = require("react/jsx-runtime");
2885
+ var import_jsx_runtime307 = require("react/jsx-runtime");
2842
2886
  var IconButton = (props) => {
2843
2887
  const {
2844
2888
  icon,
@@ -2847,7 +2891,7 @@ var IconButton = (props) => {
2847
2891
  disabled,
2848
2892
  ...rest
2849
2893
  } = props;
2850
- return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
2894
+ return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
2851
2895
  "button",
2852
2896
  {
2853
2897
  className: clsx_default("lib-xplat-icon-button", type, size),
@@ -2861,7 +2905,7 @@ IconButton.displayName = "IconButton";
2861
2905
  var IconButton_default = IconButton;
2862
2906
 
2863
2907
  // src/components/ChatInput/ChatInput.tsx
2864
- var import_jsx_runtime307 = require("react/jsx-runtime");
2908
+ var import_jsx_runtime308 = require("react/jsx-runtime");
2865
2909
  var ChatInput = import_react7.default.forwardRef(
2866
2910
  (props, ref) => {
2867
2911
  const {
@@ -2870,7 +2914,8 @@ var ChatInput = import_react7.default.forwardRef(
2870
2914
  disabled = false,
2871
2915
  buttonType = "primary",
2872
2916
  onSubmit,
2873
- onChange
2917
+ onChange,
2918
+ validations
2874
2919
  } = props;
2875
2920
  const isControlled = valueProp !== void 0;
2876
2921
  const [internalValue, setInternalValue] = import_react7.default.useState("");
@@ -2892,8 +2937,8 @@ var ChatInput = import_react7.default.forwardRef(
2892
2937
  handleSubmit();
2893
2938
  }
2894
2939
  };
2895
- return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
2896
- /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
2940
+ const control = /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
2941
+ /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
2897
2942
  AutoResizeTextArea_default,
2898
2943
  {
2899
2944
  ref,
@@ -2904,13 +2949,14 @@ var ChatInput = import_react7.default.forwardRef(
2904
2949
  disabled,
2905
2950
  rows: 1,
2906
2951
  onChange: handleChange,
2952
+ "aria-invalid": hasError(validations) || void 0,
2907
2953
  onKeyDown: handleKeyDown
2908
2954
  }
2909
2955
  ),
2910
- /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
2956
+ /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
2911
2957
  IconButton_default,
2912
2958
  {
2913
- icon: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(MessageSquareIcon_default, {}),
2959
+ icon: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(MessageSquareIcon_default, {}),
2914
2960
  type: buttonType,
2915
2961
  size: "sm",
2916
2962
  disabled: !hasText || disabled,
@@ -2919,6 +2965,7 @@ var ChatInput = import_react7.default.forwardRef(
2919
2965
  }
2920
2966
  )
2921
2967
  ] });
2968
+ return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Field, { validations, children: control });
2922
2969
  }
2923
2970
  );
2924
2971
  ChatInput.displayName = "ChatInput";
@@ -2931,7 +2978,7 @@ var import_tokens_core = require("@x-plat/tokens-core");
2931
2978
  var import_tokens_core2 = require("@x-plat/tokens-core");
2932
2979
 
2933
2980
  // src/components/CheckBox/CheckBox.tsx
2934
- var import_jsx_runtime308 = require("react/jsx-runtime");
2981
+ var import_jsx_runtime309 = require("react/jsx-runtime");
2935
2982
  var CheckBox = (props) => {
2936
2983
  const {
2937
2984
  checked,
@@ -2941,6 +2988,7 @@ var CheckBox = (props) => {
2941
2988
  disabled,
2942
2989
  size = "md",
2943
2990
  type = "brand",
2991
+ validations,
2944
2992
  ...rest
2945
2993
  } = props;
2946
2994
  const handleChange = (e) => {
@@ -2950,60 +2998,45 @@ var CheckBox = (props) => {
2950
2998
  const checkedClasses = `checked`;
2951
2999
  const disabledClasses = "disabled";
2952
3000
  const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
2953
- return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size, type, className), children: [
2954
- /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
3001
+ const control = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size, type, className), children: [
3002
+ /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
2955
3003
  "input",
2956
3004
  {
2957
3005
  type: "checkbox",
2958
3006
  checked,
2959
3007
  onChange: handleChange,
2960
3008
  disabled,
3009
+ "aria-invalid": hasError(validations) || void 0,
2961
3010
  ...rest
2962
3011
  }
2963
3012
  ),
2964
- /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(CheckIcon_default, {}) }) }),
2965
- label && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { className: "label", children: label })
3013
+ /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(CheckIcon_default, {}) }) }),
3014
+ label && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("span", { className: "label", children: label })
2966
3015
  ] });
3016
+ return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(Field, { validations, children: control });
2967
3017
  };
2968
3018
  CheckBox.displayName = "CheckBox";
2969
3019
  var CheckBox_default = CheckBox;
2970
3020
 
2971
3021
  // src/components/Chip/Chip.tsx
2972
- var import_jsx_runtime309 = require("react/jsx-runtime");
3022
+ var import_jsx_runtime310 = require("react/jsx-runtime");
2973
3023
  var Chip = (props) => {
2974
3024
  const {
2975
3025
  children,
2976
3026
  type = "primary",
2977
3027
  size = "md"
2978
3028
  } = props;
2979
- return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size), children });
3029
+ return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size), children });
2980
3030
  };
2981
3031
  Chip.displayName = "Chip";
2982
3032
  var Chip_default = Chip;
2983
3033
 
2984
3034
  // src/components/DatePicker/InputDatePicker/index.tsx
2985
- var import_react13 = __toESM(require("react"), 1);
3035
+ var import_react12 = __toESM(require("react"), 1);
2986
3036
 
2987
3037
  // src/components/Input/Input.tsx
2988
3038
  var import_react8 = __toESM(require("react"), 1);
2989
3039
 
2990
- // src/components/Input/InputValidations.tsx
2991
- var import_jsx_runtime310 = require("react/jsx-runtime");
2992
- var InputValidations = (props) => {
2993
- const { message, status = "default" } = props;
2994
- return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
2995
- /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)("div", { className: "icon", children: [
2996
- status === "default" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(InfoIcon_default, {}),
2997
- status === "success" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(SuccessIcon_default, {}),
2998
- status === "warning" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(InfoIcon_default, {}),
2999
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(ErrorIcon_default, {})
3000
- ] }),
3001
- /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "message", children: message })
3002
- ] });
3003
- };
3004
- InputValidations.displayName = "InputValidations";
3005
- var InputValidations_default = InputValidations;
3006
-
3007
3040
  // src/components/Input/reg.ts
3008
3041
  var numberAndCommaReg = /^[0-9,]+$/;
3009
3042
  var phoneNumberMaxLengthReg = /^.{0,13}$/;
@@ -3040,7 +3073,6 @@ var handleTelBackspace = (prevValue, currValue) => {
3040
3073
 
3041
3074
  // src/components/Input/Input.tsx
3042
3075
  var import_jsx_runtime311 = require("react/jsx-runtime");
3043
- var import_react9 = require("react");
3044
3076
  var formatValue = (type, value) => {
3045
3077
  if (value === null || value === void 0) return "";
3046
3078
  const strValue = Array.isArray(value) ? String(value[0] ?? "") : String(value);
@@ -3129,32 +3161,27 @@ var Input = import_react8.default.forwardRef((props, ref) => {
3129
3161
  disabled,
3130
3162
  type: type === "number" ? "text" : type,
3131
3163
  value: localValue,
3132
- onChange: handleChange
3164
+ onChange: handleChange,
3165
+ "aria-invalid": hasError(validations) || void 0
3133
3166
  }
3134
3167
  ),
3135
3168
  suffix && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "suffix", children: suffix })
3136
3169
  ]
3137
3170
  }
3138
3171
  ),
3139
- validations && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ (0, import_react9.createElement)(
3140
- InputValidations_default,
3141
- {
3142
- ...validation,
3143
- key: `${validation.message}_${idx}`
3144
- }
3145
- )) })
3172
+ /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(FieldMessage_default, { validations })
3146
3173
  ] });
3147
3174
  });
3148
3175
  Input.displayName = "Input";
3149
3176
  var Input_default = Input;
3150
3177
 
3151
3178
  // src/components/Input/PasswordInput/PasswordInput.tsx
3152
- var import_react10 = __toESM(require("react"), 1);
3179
+ var import_react9 = __toESM(require("react"), 1);
3153
3180
  var import_jsx_runtime312 = require("react/jsx-runtime");
3154
- var PasswordInput = import_react10.default.forwardRef(
3181
+ var PasswordInput = import_react9.default.forwardRef(
3155
3182
  (props, ref) => {
3156
3183
  const { reg: _reg, ...inputProps } = props;
3157
- const [isView, setIsView] = import_react10.default.useState(false);
3184
+ const [isView, setIsView] = import_react9.default.useState(false);
3158
3185
  const handleChangeView = () => {
3159
3186
  setIsView((prev) => !prev);
3160
3187
  };
@@ -3173,16 +3200,16 @@ PasswordInput.displayName = "PasswordInput";
3173
3200
  var PasswordInput_default = PasswordInput;
3174
3201
 
3175
3202
  // src/components/Modal/Modal.tsx
3176
- var import_react11 = __toESM(require("react"), 1);
3203
+ var import_react10 = __toESM(require("react"), 1);
3177
3204
  var import_react_dom = require("react-dom");
3178
3205
  var import_jsx_runtime313 = require("react/jsx-runtime");
3179
3206
  var ANIMATION_DURATION_MS = 200;
3180
3207
  var Modal = (props) => {
3181
3208
  const { isOpen, onClose, children } = props;
3182
- const [mounted, setMounted] = import_react11.default.useState(false);
3183
- const [visible, setVisible] = import_react11.default.useState(false);
3184
- const [settled, setSettled] = import_react11.default.useState(false);
3185
- import_react11.default.useEffect(() => {
3209
+ const [mounted, setMounted] = import_react10.default.useState(false);
3210
+ const [visible, setVisible] = import_react10.default.useState(false);
3211
+ const [settled, setSettled] = import_react10.default.useState(false);
3212
+ import_react10.default.useEffect(() => {
3186
3213
  if (isOpen) {
3187
3214
  setMounted(true);
3188
3215
  const show = setTimeout(() => setVisible(true), 1);
@@ -3225,9 +3252,9 @@ Modal.displayName = "Modal";
3225
3252
  var Modal_default = Modal;
3226
3253
 
3227
3254
  // src/components/DatePicker/SingleDatePicker/index.tsx
3228
- var import_react12 = __toESM(require("react"), 1);
3255
+ var import_react11 = __toESM(require("react"), 1);
3229
3256
  var import_jsx_runtime314 = require("react/jsx-runtime");
3230
- var DayCell2 = import_react12.default.memo(
3257
+ var DayCell2 = import_react11.default.memo(
3231
3258
  ({
3232
3259
  day,
3233
3260
  disabled,
@@ -3279,26 +3306,26 @@ var SingleDatePicker = (props) => {
3279
3306
  initialYear,
3280
3307
  initialMonth
3281
3308
  );
3282
- const [pickerMode, setPickerMode] = import_react12.default.useState("days");
3283
- const [yearRangeStart, setYearRangeStart] = import_react12.default.useState(
3309
+ const [pickerMode, setPickerMode] = import_react11.default.useState("days");
3310
+ const [yearRangeStart, setYearRangeStart] = import_react11.default.useState(
3284
3311
  Math.floor((initialYear ?? (/* @__PURE__ */ new Date()).getFullYear()) / 12) * 12
3285
3312
  );
3286
- const minTime = import_react12.default.useMemo(
3313
+ const minTime = import_react11.default.useMemo(
3287
3314
  () => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
3288
3315
  [minDate]
3289
3316
  );
3290
- const maxTime = import_react12.default.useMemo(
3317
+ const maxTime = import_react11.default.useMemo(
3291
3318
  () => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
3292
3319
  [maxDate]
3293
3320
  );
3294
- const highlightSet = import_react12.default.useMemo(() => {
3321
+ const highlightSet = import_react11.default.useMemo(() => {
3295
3322
  const set = /* @__PURE__ */ new Set();
3296
3323
  for (const h of highlightDates) {
3297
3324
  set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
3298
3325
  }
3299
3326
  return set;
3300
3327
  }, [highlightDates]);
3301
- const handleSelect = import_react12.default.useCallback(
3328
+ const handleSelect = import_react11.default.useCallback(
3302
3329
  (date) => {
3303
3330
  onChange?.(date);
3304
3331
  },
@@ -3427,8 +3454,8 @@ var formatDate = (date) => {
3427
3454
  };
3428
3455
  var InputDatePicker = (props) => {
3429
3456
  const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
3430
- const [isOpen, setIsOpen] = import_react13.default.useState(false);
3431
- const [tempDate, setTempDate] = import_react13.default.useState(value ?? /* @__PURE__ */ new Date());
3457
+ const [isOpen, setIsOpen] = import_react12.default.useState(false);
3458
+ const [tempDate, setTempDate] = import_react12.default.useState(value ?? /* @__PURE__ */ new Date());
3432
3459
  const handleOpen = () => {
3433
3460
  if (disabled) return;
3434
3461
  setTempDate(value ?? /* @__PURE__ */ new Date());
@@ -3477,18 +3504,18 @@ InputDatePicker.displayName = "InputDatePicker";
3477
3504
  var InputDatePicker_default = InputDatePicker;
3478
3505
 
3479
3506
  // src/components/DatePicker/PopupPicker/index.tsx
3480
- var import_react17 = __toESM(require("react"), 1);
3507
+ var import_react16 = __toESM(require("react"), 1);
3481
3508
 
3482
3509
  // src/components/DatePicker/RangePicker/index.tsx
3483
- var import_react16 = __toESM(require("react"), 1);
3510
+ var import_react15 = __toESM(require("react"), 1);
3484
3511
 
3485
3512
  // src/components/Tab/Tab.tsx
3486
- var import_react15 = __toESM(require("react"), 1);
3513
+ var import_react14 = __toESM(require("react"), 1);
3487
3514
 
3488
3515
  // src/components/Tab/TabItem.tsx
3489
- var import_react14 = __toESM(require("react"), 1);
3516
+ var import_react13 = __toESM(require("react"), 1);
3490
3517
  var import_jsx_runtime316 = require("react/jsx-runtime");
3491
- var TabItem = import_react14.default.forwardRef((props, ref) => {
3518
+ var TabItem = import_react13.default.forwardRef((props, ref) => {
3492
3519
  const { isActive: isActive2, title, onClick } = props;
3493
3520
  return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3494
3521
  "div",
@@ -3507,15 +3534,15 @@ var TabItem_default = TabItem;
3507
3534
  var import_jsx_runtime317 = require("react/jsx-runtime");
3508
3535
  var Tab = (props) => {
3509
3536
  const { activeIndex, onChange, tabs, type, size = "md" } = props;
3510
- const [underlineStyle, setUnderlineStyle] = import_react15.default.useState({
3537
+ const [underlineStyle, setUnderlineStyle] = import_react14.default.useState({
3511
3538
  left: 0,
3512
3539
  width: 0
3513
3540
  });
3514
- const itemRefs = import_react15.default.useRef([]);
3541
+ const itemRefs = import_react14.default.useRef([]);
3515
3542
  const handleChangeActiveTab = (tabItem, tabIdx) => {
3516
3543
  onChange(tabItem, tabIdx);
3517
3544
  };
3518
- import_react15.default.useEffect(() => {
3545
+ import_react14.default.useEffect(() => {
3519
3546
  const el = itemRefs.current[activeIndex];
3520
3547
  if (el) {
3521
3548
  setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
@@ -3560,7 +3587,7 @@ var RangePicker = (props) => {
3560
3587
  maxDate,
3561
3588
  locale = "ko"
3562
3589
  } = props;
3563
- const [activeTab, setActiveTab] = import_react16.default.useState("start");
3590
+ const [activeTab, setActiveTab] = import_react15.default.useState("start");
3564
3591
  const handleStartChange = (date) => {
3565
3592
  if (!date) return;
3566
3593
  const newStart = date > endDate ? endDate : date;
@@ -3645,7 +3672,7 @@ var RangePicker_default = RangePicker;
3645
3672
  var import_jsx_runtime319 = require("react/jsx-runtime");
3646
3673
  var PopupPicker = (props) => {
3647
3674
  const { component, type, locale } = props;
3648
- const [isOpen, setIsOpen] = import_react17.default.useState(false);
3675
+ const [isOpen, setIsOpen] = import_react16.default.useState(false);
3649
3676
  const handleClick = () => setIsOpen(true);
3650
3677
  const handleClose = () => setIsOpen(false);
3651
3678
  const handleSingleChange = (date) => {
@@ -3654,7 +3681,7 @@ var PopupPicker = (props) => {
3654
3681
  handleClose();
3655
3682
  };
3656
3683
  return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
3657
- import_react17.default.cloneElement(component, { onClick: handleClick }),
3684
+ import_react16.default.cloneElement(component, { onClick: handleClick }),
3658
3685
  /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
3659
3686
  /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "popup-datepicker-content", children: [
3660
3687
  type === "single" && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
@@ -3713,15 +3740,15 @@ Divider.displayName = "Divider";
3713
3740
  var Divider_default = Divider;
3714
3741
 
3715
3742
  // src/components/Drawer/Drawer.tsx
3716
- var import_react18 = __toESM(require("react"), 1);
3743
+ var import_react17 = __toESM(require("react"), 1);
3717
3744
  var import_react_dom2 = require("react-dom");
3718
3745
  var import_jsx_runtime321 = require("react/jsx-runtime");
3719
3746
  var ANIMATION_DURATION_MS2 = 250;
3720
3747
  var Drawer = (props) => {
3721
3748
  const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
3722
- const [mounted, setMounted] = import_react18.default.useState(false);
3723
- const [visible, setVisible] = import_react18.default.useState(false);
3724
- import_react18.default.useEffect(() => {
3749
+ const [mounted, setMounted] = import_react17.default.useState(false);
3750
+ const [visible, setVisible] = import_react17.default.useState(false);
3751
+ import_react17.default.useEffect(() => {
3725
3752
  if (isOpen) {
3726
3753
  setMounted(true);
3727
3754
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3765,7 +3792,7 @@ Drawer.displayName = "Drawer";
3765
3792
  var Drawer_default = Drawer;
3766
3793
 
3767
3794
  // src/components/Dropdown/Dropdown.tsx
3768
- var import_react21 = __toESM(require("react"), 1);
3795
+ var import_react20 = __toESM(require("react"), 1);
3769
3796
 
3770
3797
  // src/tokens/hooks/Portal.tsx
3771
3798
  var import_react_dom3 = __toESM(require("react-dom"), 1);
@@ -3777,13 +3804,13 @@ Portal.displayName = "Portal";
3777
3804
  var Portal_default = Portal;
3778
3805
 
3779
3806
  // src/tokens/hooks/useAutoPosition.ts
3780
- var import_react19 = __toESM(require("react"), 1);
3807
+ var import_react18 = __toESM(require("react"), 1);
3781
3808
  var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3782
- const [position, setPosition] = import_react19.default.useState({
3809
+ const [position, setPosition] = import_react18.default.useState({
3783
3810
  position: {},
3784
3811
  direction: "bottom"
3785
3812
  });
3786
- const calculatePosition = import_react19.default.useCallback(() => {
3813
+ const calculatePosition = import_react18.default.useCallback(() => {
3787
3814
  if (!triggerRef.current || !popRef.current) return;
3788
3815
  const triggerRect = triggerRef.current.getBoundingClientRect();
3789
3816
  const popW = popRef.current.offsetWidth;
@@ -3810,13 +3837,13 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3810
3837
  direction
3811
3838
  });
3812
3839
  }, [triggerRef, popRef]);
3813
- import_react19.default.useLayoutEffect(() => {
3840
+ import_react18.default.useLayoutEffect(() => {
3814
3841
  if (!enabled) return;
3815
3842
  calculatePosition();
3816
3843
  const raf = requestAnimationFrame(calculatePosition);
3817
3844
  return () => cancelAnimationFrame(raf);
3818
3845
  }, [calculatePosition, enabled]);
3819
- import_react19.default.useEffect(() => {
3846
+ import_react18.default.useEffect(() => {
3820
3847
  if (!enabled || !popRef.current) return;
3821
3848
  const observer = new ResizeObserver(() => {
3822
3849
  calculatePosition();
@@ -3824,7 +3851,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3824
3851
  observer.observe(popRef.current);
3825
3852
  return () => observer.disconnect();
3826
3853
  }, [calculatePosition, enabled, popRef]);
3827
- import_react19.default.useEffect(() => {
3854
+ import_react18.default.useEffect(() => {
3828
3855
  if (!enabled) return;
3829
3856
  window.addEventListener("resize", calculatePosition);
3830
3857
  window.addEventListener("scroll", calculatePosition, true);
@@ -3838,9 +3865,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3838
3865
  var useAutoPosition_default = useAutoPosition;
3839
3866
 
3840
3867
  // src/tokens/hooks/useClickOutside.ts
3841
- var import_react20 = __toESM(require("react"), 1);
3868
+ var import_react19 = __toESM(require("react"), 1);
3842
3869
  var useClickOutside = (refs, handler, enabled = true) => {
3843
- import_react20.default.useEffect(() => {
3870
+ import_react19.default.useEffect(() => {
3844
3871
  if (!enabled) return;
3845
3872
  const refArray = Array.isArray(refs) ? refs : [refs];
3846
3873
  const listener = (event) => {
@@ -3866,14 +3893,14 @@ var useClickOutside_default = useClickOutside;
3866
3893
  var import_jsx_runtime322 = require("react/jsx-runtime");
3867
3894
  var Dropdown = (props) => {
3868
3895
  const { items, children } = props;
3869
- const [isOpen, setIsOpen] = import_react21.default.useState(false);
3870
- const [mounted, setMounted] = import_react21.default.useState(false);
3871
- const [visible, setVisible] = import_react21.default.useState(false);
3872
- const triggerRef = import_react21.default.useRef(null);
3873
- const menuRef = import_react21.default.useRef(null);
3896
+ const [isOpen, setIsOpen] = import_react20.default.useState(false);
3897
+ const [mounted, setMounted] = import_react20.default.useState(false);
3898
+ const [visible, setVisible] = import_react20.default.useState(false);
3899
+ const triggerRef = import_react20.default.useRef(null);
3900
+ const menuRef = import_react20.default.useRef(null);
3874
3901
  const { position, direction } = useAutoPosition_default(triggerRef, menuRef, mounted);
3875
3902
  useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
3876
- import_react21.default.useEffect(() => {
3903
+ import_react20.default.useEffect(() => {
3877
3904
  if (isOpen) {
3878
3905
  setMounted(true);
3879
3906
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3927,7 +3954,7 @@ Dropdown.displayName = "Dropdown";
3927
3954
  var Dropdown_default = Dropdown;
3928
3955
 
3929
3956
  // src/components/Editor/Editor.tsx
3930
- var import_react22 = __toESM(require("react"), 1);
3957
+ var import_react21 = __toESM(require("react"), 1);
3931
3958
  var import_jsx_runtime323 = require("react/jsx-runtime");
3932
3959
  var DEFAULT_TOOLBAR = [
3933
3960
  "bold",
@@ -4035,21 +4062,21 @@ var Editor = (props) => {
4035
4062
  onImageUpload,
4036
4063
  minHeight = 200
4037
4064
  } = props;
4038
- const editorRef = import_react22.default.useRef(null);
4039
- const lastRangeRef = import_react22.default.useRef(null);
4040
- const composingRef = import_react22.default.useRef(false);
4041
- const [isFocused, setIsFocused] = import_react22.default.useState(false);
4042
- const [isEmpty, setIsEmpty] = import_react22.default.useState(!value);
4043
- const [activeFormats, setActiveFormats] = import_react22.default.useState(/* @__PURE__ */ new Set());
4044
- const [slashOpen, setSlashOpen] = import_react22.default.useState(false);
4045
- const [slashFilter, setSlashFilter] = import_react22.default.useState("");
4046
- const [slashIdx, setSlashIdx] = import_react22.default.useState(0);
4047
- const [slashPos, setSlashPos] = import_react22.default.useState({ top: 0, left: 0 });
4048
- const slashStartRangeRef = import_react22.default.useRef(null);
4049
- const [linkOpen, setLinkOpen] = import_react22.default.useState(false);
4050
- const [linkValue, setLinkValue] = import_react22.default.useState("");
4051
- const [linkPos, setLinkPos] = import_react22.default.useState({ top: 0, left: 0 });
4052
- import_react22.default.useEffect(() => {
4065
+ const editorRef = import_react21.default.useRef(null);
4066
+ const lastRangeRef = import_react21.default.useRef(null);
4067
+ const composingRef = import_react21.default.useRef(false);
4068
+ const [isFocused, setIsFocused] = import_react21.default.useState(false);
4069
+ const [isEmpty, setIsEmpty] = import_react21.default.useState(!value);
4070
+ const [activeFormats, setActiveFormats] = import_react21.default.useState(/* @__PURE__ */ new Set());
4071
+ const [slashOpen, setSlashOpen] = import_react21.default.useState(false);
4072
+ const [slashFilter, setSlashFilter] = import_react21.default.useState("");
4073
+ const [slashIdx, setSlashIdx] = import_react21.default.useState(0);
4074
+ const [slashPos, setSlashPos] = import_react21.default.useState({ top: 0, left: 0 });
4075
+ const slashStartRangeRef = import_react21.default.useRef(null);
4076
+ const [linkOpen, setLinkOpen] = import_react21.default.useState(false);
4077
+ const [linkValue, setLinkValue] = import_react21.default.useState("");
4078
+ const [linkPos, setLinkPos] = import_react21.default.useState({ top: 0, left: 0 });
4079
+ import_react21.default.useEffect(() => {
4053
4080
  if (!editorRef.current) return;
4054
4081
  if (editorRef.current.innerHTML !== value) {
4055
4082
  editorRef.current.innerHTML = sanitizeHtml(value || "");
@@ -4163,7 +4190,7 @@ var Editor = (props) => {
4163
4190
  setSlashIdx(0);
4164
4191
  slashStartRangeRef.current = null;
4165
4192
  };
4166
- const filteredSlashItems = import_react22.default.useMemo(() => {
4193
+ const filteredSlashItems = import_react21.default.useMemo(() => {
4167
4194
  if (!slashFilter) return SLASH_ITEMS;
4168
4195
  const f = slashFilter.toLowerCase();
4169
4196
  return SLASH_ITEMS.filter((it) => it.label.toLowerCase().includes(f) || it.key.includes(f));
@@ -4556,7 +4583,7 @@ var EditorToolbar = ({ items, active, onAction }) => {
4556
4583
  )) });
4557
4584
  };
4558
4585
  var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
4559
- import_react22.default.useEffect(() => {
4586
+ import_react21.default.useEffect(() => {
4560
4587
  const handleClickOutside = (e) => {
4561
4588
  const target = e.target;
4562
4589
  const menu = document.querySelector(".lib-xplat-editor__slash-menu");
@@ -4590,8 +4617,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
4590
4617
  );
4591
4618
  };
4592
4619
  var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
4593
- const inputRef = import_react22.default.useRef(null);
4594
- import_react22.default.useEffect(() => {
4620
+ const inputRef = import_react21.default.useRef(null);
4621
+ import_react21.default.useEffect(() => {
4595
4622
  inputRef.current?.focus();
4596
4623
  }, []);
4597
4624
  return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
@@ -4649,7 +4676,7 @@ EmptyState.displayName = "EmptyState";
4649
4676
  var EmptyState_default = EmptyState;
4650
4677
 
4651
4678
  // src/components/FileUpload/FileUpload.tsx
4652
- var import_react23 = __toESM(require("react"), 1);
4679
+ var import_react22 = __toESM(require("react"), 1);
4653
4680
  var import_jsx_runtime325 = require("react/jsx-runtime");
4654
4681
  var FileUpload = (props) => {
4655
4682
  const {
@@ -4658,10 +4685,11 @@ var FileUpload = (props) => {
4658
4685
  maxSize,
4659
4686
  onChange,
4660
4687
  label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
4661
- description
4688
+ description,
4689
+ validations
4662
4690
  } = props;
4663
- const [isDragOver, setIsDragOver] = import_react23.default.useState(false);
4664
- const inputRef = import_react23.default.useRef(null);
4691
+ const [isDragOver, setIsDragOver] = import_react22.default.useState(false);
4692
+ const inputRef = import_react22.default.useRef(null);
4665
4693
  const handleFiles = (fileList) => {
4666
4694
  let files = Array.from(fileList);
4667
4695
  if (maxSize) {
@@ -4691,7 +4719,7 @@ var FileUpload = (props) => {
4691
4719
  handleFiles(e.target.files);
4692
4720
  }
4693
4721
  };
4694
- return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
4722
+ const control = /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
4695
4723
  "div",
4696
4724
  {
4697
4725
  className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
@@ -4707,7 +4735,8 @@ var FileUpload = (props) => {
4707
4735
  type: "file",
4708
4736
  accept,
4709
4737
  multiple,
4710
- onChange: handleChange
4738
+ onChange: handleChange,
4739
+ "aria-invalid": hasError(validations) || void 0
4711
4740
  }
4712
4741
  ),
4713
4742
  /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(UploadIcon_default, {}) }),
@@ -4716,15 +4745,16 @@ var FileUpload = (props) => {
4716
4745
  ]
4717
4746
  }
4718
4747
  );
4748
+ return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(Field, { validations, children: control });
4719
4749
  };
4720
4750
  FileUpload.displayName = "FileUpload";
4721
4751
  var FileUpload_default = FileUpload;
4722
4752
 
4723
4753
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
4724
- var import_react25 = __toESM(require("react"), 1);
4754
+ var import_react24 = __toESM(require("react"), 1);
4725
4755
 
4726
4756
  // src/components/HtmlTypeWriter/utils.ts
4727
- var import_react24 = __toESM(require("react"), 1);
4757
+ var import_react23 = __toESM(require("react"), 1);
4728
4758
  var voidTags = /* @__PURE__ */ new Set([
4729
4759
  "br",
4730
4760
  "img",
@@ -4792,15 +4822,15 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
4792
4822
  props[attr.name] = attr.value;
4793
4823
  });
4794
4824
  if (voidTags.has(tag)) {
4795
- return import_react24.default.createElement(tag, props);
4825
+ return import_react23.default.createElement(tag, props);
4796
4826
  }
4797
4827
  const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
4798
- return import_react24.default.createElement(tag, props, ...children);
4828
+ return import_react23.default.createElement(tag, props, ...children);
4799
4829
  };
4800
4830
  var htmlToReactProgressive = (root, typedLen, rangeMap) => {
4801
4831
  const nodes = Array.from(root.childNodes).map((child, idx) => {
4802
4832
  const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
4803
- return node == null ? null : import_react24.default.createElement(import_react24.default.Fragment, { key: idx }, node);
4833
+ return node == null ? null : import_react23.default.createElement(import_react23.default.Fragment, { key: idx }, node);
4804
4834
  }).filter(Boolean);
4805
4835
  return nodes.length === 0 ? null : nodes;
4806
4836
  };
@@ -4813,20 +4843,20 @@ var HtmlTypeWriter = ({
4813
4843
  onDone,
4814
4844
  onChange
4815
4845
  }) => {
4816
- const [typedLen, setTypedLen] = import_react25.default.useState(0);
4817
- const doneCalledRef = import_react25.default.useRef(false);
4818
- const { doc, rangeMap, totalLength } = import_react25.default.useMemo(() => {
4846
+ const [typedLen, setTypedLen] = import_react24.default.useState(0);
4847
+ const doneCalledRef = import_react24.default.useRef(false);
4848
+ const { doc, rangeMap, totalLength } = import_react24.default.useMemo(() => {
4819
4849
  if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
4820
4850
  const decoded = decodeHtmlEntities(html);
4821
4851
  const doc2 = new DOMParser().parseFromString(decoded, "text/html");
4822
4852
  const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
4823
4853
  return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
4824
4854
  }, [html]);
4825
- import_react25.default.useEffect(() => {
4855
+ import_react24.default.useEffect(() => {
4826
4856
  setTypedLen(0);
4827
4857
  doneCalledRef.current = false;
4828
4858
  }, [html]);
4829
- import_react25.default.useEffect(() => {
4859
+ import_react24.default.useEffect(() => {
4830
4860
  if (!totalLength) return;
4831
4861
  if (typedLen >= totalLength) return;
4832
4862
  const timer = window.setInterval(() => {
@@ -4834,18 +4864,18 @@ var HtmlTypeWriter = ({
4834
4864
  }, duration);
4835
4865
  return () => window.clearInterval(timer);
4836
4866
  }, [typedLen, totalLength, duration]);
4837
- import_react25.default.useEffect(() => {
4867
+ import_react24.default.useEffect(() => {
4838
4868
  if (typedLen > 0 && typedLen < totalLength) {
4839
4869
  onChange?.();
4840
4870
  }
4841
4871
  }, [typedLen, totalLength, onChange]);
4842
- import_react25.default.useEffect(() => {
4872
+ import_react24.default.useEffect(() => {
4843
4873
  if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
4844
4874
  doneCalledRef.current = true;
4845
4875
  onDone?.();
4846
4876
  }
4847
4877
  }, [typedLen, totalLength, onDone]);
4848
- const parsed = import_react25.default.useMemo(
4878
+ const parsed = import_react24.default.useMemo(
4849
4879
  () => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
4850
4880
  [doc, typedLen, rangeMap]
4851
4881
  );
@@ -4855,12 +4885,12 @@ HtmlTypeWriter.displayName = "HtmlTypeWriter";
4855
4885
  var HtmlTypeWriter_default = HtmlTypeWriter;
4856
4886
 
4857
4887
  // src/components/ImageSelector/ImageSelector.tsx
4858
- var import_react26 = __toESM(require("react"), 1);
4888
+ var import_react25 = __toESM(require("react"), 1);
4859
4889
  var import_jsx_runtime327 = require("react/jsx-runtime");
4860
4890
  var ImageSelector = (props) => {
4861
- const { value, label, onChange } = props;
4862
- const [previewUrl, setPreviewUrl] = import_react26.default.useState();
4863
- import_react26.default.useEffect(() => {
4891
+ const { value, label, onChange, validations } = props;
4892
+ const [previewUrl, setPreviewUrl] = import_react25.default.useState();
4893
+ import_react25.default.useEffect(() => {
4864
4894
  if (!value) {
4865
4895
  setPreviewUrl(void 0);
4866
4896
  return;
@@ -4869,7 +4899,7 @@ var ImageSelector = (props) => {
4869
4899
  setPreviewUrl(url);
4870
4900
  return () => URL.revokeObjectURL(url);
4871
4901
  }, [value]);
4872
- const inputRef = import_react26.default.useRef(null);
4902
+ const inputRef = import_react25.default.useRef(null);
4873
4903
  const handleFileChange = (e) => {
4874
4904
  const selectedFile = e.target.files?.[0];
4875
4905
  if (selectedFile) {
@@ -4882,7 +4912,7 @@ var ImageSelector = (props) => {
4882
4912
  const handleOpenFileDialog = () => {
4883
4913
  inputRef.current?.click();
4884
4914
  };
4885
- return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
4915
+ const control = /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
4886
4916
  /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
4887
4917
  "input",
4888
4918
  {
@@ -4890,7 +4920,8 @@ var ImageSelector = (props) => {
4890
4920
  accept: "image/*",
4891
4921
  id: "image-input",
4892
4922
  onChange: handleFileChange,
4893
- ref: inputRef
4923
+ ref: inputRef,
4924
+ "aria-invalid": hasError(validations) || void 0
4894
4925
  }
4895
4926
  ),
4896
4927
  value && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: "action-bar", children: [
@@ -4902,6 +4933,7 @@ var ImageSelector = (props) => {
4902
4933
  /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
4903
4934
  ] }) })
4904
4935
  ] });
4936
+ return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(Field, { validations, children: control });
4905
4937
  };
4906
4938
  ImageSelector.displayName = "ImageSelector";
4907
4939
  var ImageSelector_default = ImageSelector;
@@ -5048,17 +5080,17 @@ Pagination.displayName = "Pagination";
5048
5080
  var Pagination_default = Pagination;
5049
5081
 
5050
5082
  // src/components/PopOver/PopOver.tsx
5051
- var import_react27 = __toESM(require("react"), 1);
5083
+ var import_react26 = __toESM(require("react"), 1);
5052
5084
  var import_jsx_runtime332 = require("react/jsx-runtime");
5053
5085
  var PopOver = (props) => {
5054
5086
  const { children, isOpen, onClose, PopOverEl } = props;
5055
- const popRef = import_react27.default.useRef(null);
5056
- const triggerRef = import_react27.default.useRef(null);
5057
- const [localOpen, setLocalOpen] = import_react27.default.useState(false);
5058
- const [eventTrigger, setEventTrigger] = import_react27.default.useState(false);
5087
+ const popRef = import_react26.default.useRef(null);
5088
+ const triggerRef = import_react26.default.useRef(null);
5089
+ const [localOpen, setLocalOpen] = import_react26.default.useState(false);
5090
+ const [eventTrigger, setEventTrigger] = import_react26.default.useState(false);
5059
5091
  useClickOutside_default([popRef, triggerRef], onClose, isOpen);
5060
5092
  const position = useAutoPosition_default(triggerRef, popRef, localOpen);
5061
- import_react27.default.useEffect(() => {
5093
+ import_react26.default.useEffect(() => {
5062
5094
  if (isOpen) {
5063
5095
  setLocalOpen(isOpen);
5064
5096
  setTimeout(() => {
@@ -5142,12 +5174,12 @@ Progress.displayName = "Progress";
5142
5174
  var Progress_default = Progress;
5143
5175
 
5144
5176
  // src/components/Radio/RadioGroupContext.tsx
5145
- var import_react28 = __toESM(require("react"), 1);
5146
- var RadioGroupContext = import_react28.default.createContext(
5177
+ var import_react27 = __toESM(require("react"), 1);
5178
+ var RadioGroupContext = import_react27.default.createContext(
5147
5179
  null
5148
5180
  );
5149
5181
  var useRadioGroupContext = () => {
5150
- return import_react28.default.useContext(RadioGroupContext);
5182
+ return import_react27.default.useContext(RadioGroupContext);
5151
5183
  };
5152
5184
  var RadioGroupContext_default = RadioGroupContext;
5153
5185
 
@@ -5160,6 +5192,7 @@ var Radio = (props) => {
5160
5192
  value,
5161
5193
  size: sizeProp,
5162
5194
  type = "brand",
5195
+ validations,
5163
5196
  ...rest
5164
5197
  } = props;
5165
5198
  const context = useRadioGroupContext();
@@ -5171,7 +5204,7 @@ var Radio = (props) => {
5171
5204
  value,
5172
5205
  onChange: rest.onChange
5173
5206
  };
5174
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(
5207
+ const control = /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(
5175
5208
  "label",
5176
5209
  {
5177
5210
  className: clsx_default(
@@ -5182,7 +5215,16 @@ var Radio = (props) => {
5182
5215
  className
5183
5216
  ),
5184
5217
  children: [
5185
- /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
5218
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
5219
+ "input",
5220
+ {
5221
+ ...rest,
5222
+ ...inputProps,
5223
+ checked: localChecked,
5224
+ type: "radio",
5225
+ "aria-invalid": hasError(validations) || void 0
5226
+ }
5227
+ ),
5186
5228
  /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
5187
5229
  "div",
5188
5230
  {
@@ -5197,6 +5239,7 @@ var Radio = (props) => {
5197
5239
  ]
5198
5240
  }
5199
5241
  );
5242
+ return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Field, { validations, children: control });
5200
5243
  };
5201
5244
  Radio.displayName = "Radio";
5202
5245
  var Radio_default = Radio;
@@ -5211,19 +5254,19 @@ RadioGroup.displayName = "RadioGroup";
5211
5254
  var RadioGroup_default = RadioGroup;
5212
5255
 
5213
5256
  // src/components/Select/Select.tsx
5214
- var import_react31 = __toESM(require("react"), 1);
5257
+ var import_react30 = __toESM(require("react"), 1);
5215
5258
 
5216
5259
  // src/components/Select/context.ts
5217
- var import_react29 = __toESM(require("react"), 1);
5218
- var SelectContext = import_react29.default.createContext(null);
5260
+ var import_react28 = __toESM(require("react"), 1);
5261
+ var SelectContext = import_react28.default.createContext(null);
5219
5262
  var context_default = SelectContext;
5220
5263
 
5221
5264
  // src/components/Select/SelectItem.tsx
5222
- var import_react30 = __toESM(require("react"), 1);
5265
+ var import_react29 = __toESM(require("react"), 1);
5223
5266
  var import_jsx_runtime336 = require("react/jsx-runtime");
5224
5267
  var SelectItem = (props) => {
5225
5268
  const { children, value, onClick, disabled = false } = props;
5226
- const ctx = import_react30.default.useContext(context_default);
5269
+ const ctx = import_react29.default.useContext(context_default);
5227
5270
  const handleClick = (e) => {
5228
5271
  e.preventDefault();
5229
5272
  e.stopPropagation();
@@ -5264,30 +5307,31 @@ var SelectRoot = (props) => {
5264
5307
  children,
5265
5308
  disabled = false,
5266
5309
  error = false,
5310
+ validations,
5267
5311
  size = "md"
5268
5312
  } = props;
5269
- const itemChildren = import_react31.default.Children.toArray(children).filter(
5270
- (child) => import_react31.default.isValidElement(child) && child.type === SelectItem_default
5313
+ const itemChildren = import_react30.default.Children.toArray(children).filter(
5314
+ (child) => import_react30.default.isValidElement(child) && child.type === SelectItem_default
5271
5315
  );
5272
5316
  const isControlled = valueProp !== void 0;
5273
- const [isOpen, setOpen] = import_react31.default.useState(false);
5274
- const [uncontrolledLabel, setUncontrolledLabel] = import_react31.default.useState(null);
5275
- const [uncontrolledValue, setUncontrolledValue] = import_react31.default.useState(void 0);
5276
- const controlledLabel = import_react31.default.useMemo(() => {
5317
+ const [isOpen, setOpen] = import_react30.default.useState(false);
5318
+ const [uncontrolledLabel, setUncontrolledLabel] = import_react30.default.useState(null);
5319
+ const [uncontrolledValue, setUncontrolledValue] = import_react30.default.useState(void 0);
5320
+ const controlledLabel = import_react30.default.useMemo(() => {
5277
5321
  if (!isControlled) return null;
5278
5322
  const match = itemChildren.find((child) => child.props.value === valueProp);
5279
5323
  return match ? match.props.children : null;
5280
5324
  }, [isControlled, valueProp, itemChildren]);
5281
5325
  const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
5282
5326
  const selectedValue = isControlled ? valueProp : uncontrolledValue;
5283
- const triggerRef = import_react31.default.useRef(null);
5284
- const contentRef = import_react31.default.useRef(null);
5285
- const [mounted, setMounted] = import_react31.default.useState(false);
5286
- const [visible, setVisible] = import_react31.default.useState(false);
5287
- import_react31.default.useEffect(() => {
5327
+ const triggerRef = import_react30.default.useRef(null);
5328
+ const contentRef = import_react30.default.useRef(null);
5329
+ const [mounted, setMounted] = import_react30.default.useState(false);
5330
+ const [visible, setVisible] = import_react30.default.useState(false);
5331
+ import_react30.default.useEffect(() => {
5288
5332
  if (disabled && isOpen) setOpen(false);
5289
5333
  }, [disabled, isOpen]);
5290
- import_react31.default.useEffect(() => {
5334
+ import_react30.default.useEffect(() => {
5291
5335
  if (isOpen) {
5292
5336
  setMounted(true);
5293
5337
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -5297,12 +5341,12 @@ var SelectRoot = (props) => {
5297
5341
  const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
5298
5342
  return () => clearTimeout(t);
5299
5343
  }, [isOpen]);
5300
- const open = import_react31.default.useCallback(() => setOpen(true), []);
5301
- const close = import_react31.default.useCallback(() => setOpen(false), []);
5302
- const toggle = import_react31.default.useCallback(() => setOpen((prev) => !prev), []);
5344
+ const open = import_react30.default.useCallback(() => setOpen(true), []);
5345
+ const close = import_react30.default.useCallback(() => setOpen(false), []);
5346
+ const toggle = import_react30.default.useCallback(() => setOpen((prev) => !prev), []);
5303
5347
  useClickOutside_default([contentRef, triggerRef], close, isOpen);
5304
5348
  const position = useAutoPosition_default(triggerRef, contentRef, mounted);
5305
- const setSelected = import_react31.default.useCallback(
5349
+ const setSelected = import_react30.default.useCallback(
5306
5350
  (label, itemValue) => {
5307
5351
  if (!isControlled) {
5308
5352
  setUncontrolledLabel(label);
@@ -5312,7 +5356,7 @@ var SelectRoot = (props) => {
5312
5356
  },
5313
5357
  [isControlled, onChange]
5314
5358
  );
5315
- const ctxValue = import_react31.default.useMemo(
5359
+ const ctxValue = import_react30.default.useMemo(
5316
5360
  () => ({
5317
5361
  isOpen,
5318
5362
  mounted,
@@ -5334,14 +5378,14 @@ var SelectRoot = (props) => {
5334
5378
  if (disabled) return;
5335
5379
  toggle();
5336
5380
  };
5337
- return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
5381
+ const control = /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
5338
5382
  "div",
5339
5383
  {
5340
5384
  className: clsx_default(
5341
5385
  "lib-xplat-select",
5342
5386
  size,
5343
5387
  disabled && "disabled",
5344
- error && "error",
5388
+ (error || hasError(validations)) && "error",
5345
5389
  mounted && "is-open"
5346
5390
  ),
5347
5391
  children: [
@@ -5352,14 +5396,14 @@ var SelectRoot = (props) => {
5352
5396
  className: clsx_default(
5353
5397
  "select-trigger",
5354
5398
  disabled && "disabled",
5355
- error && "error"
5399
+ (error || hasError(validations)) && "error"
5356
5400
  ),
5357
5401
  onClick: handleTriggerClick,
5358
5402
  role: "combobox",
5359
5403
  "aria-expanded": isOpen,
5360
5404
  "aria-haspopup": "listbox",
5361
5405
  "aria-disabled": disabled,
5362
- "aria-invalid": error,
5406
+ "aria-invalid": error || hasError(validations) || void 0,
5363
5407
  tabIndex: disabled ? -1 : 0,
5364
5408
  onKeyDown: (e) => {
5365
5409
  if (disabled) return;
@@ -5403,6 +5447,7 @@ var SelectRoot = (props) => {
5403
5447
  ]
5404
5448
  }
5405
5449
  ) });
5450
+ return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(Field, { validations, children: control });
5406
5451
  };
5407
5452
  SelectRoot.displayName = "Select";
5408
5453
  var Select = Object.assign(SelectRoot, {
@@ -5504,7 +5549,7 @@ Steps.displayName = "Steps";
5504
5549
  var Steps_default = Steps;
5505
5550
 
5506
5551
  // src/components/Swiper/Swiper.tsx
5507
- var import_react32 = __toESM(require("react"), 1);
5552
+ var import_react31 = __toESM(require("react"), 1);
5508
5553
  var import_jsx_runtime341 = require("react/jsx-runtime");
5509
5554
  var Swiper = (props) => {
5510
5555
  const {
@@ -5529,26 +5574,26 @@ var Swiper = (props) => {
5529
5574
  const maxIndex = Math.max(0, totalSlides - viewItemCount);
5530
5575
  const useLoop = loop && canSlide;
5531
5576
  const cloneCount = useLoop ? totalSlides : 0;
5532
- const extendedItems = import_react32.default.useMemo(() => {
5577
+ const extendedItems = import_react31.default.useMemo(() => {
5533
5578
  if (!useLoop) return items;
5534
5579
  return [...items, ...items, ...items];
5535
5580
  }, [items, useLoop]);
5536
5581
  const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
5537
- const [innerIndex, setInnerIndex] = import_react32.default.useState(
5582
+ const [innerIndex, setInnerIndex] = import_react31.default.useState(
5538
5583
  useLoop ? cloneCount + initialIdx : initialIdx
5539
5584
  );
5540
- const [isDragging, setIsDragging] = import_react32.default.useState(false);
5541
- const [dragOffset, setDragOffset] = import_react32.default.useState(0);
5542
- const [animated, setAnimated] = import_react32.default.useState(false);
5543
- const [containerWidth, setContainerWidth] = import_react32.default.useState(0);
5544
- const containerRef = import_react32.default.useRef(null);
5545
- const startXRef = import_react32.default.useRef(0);
5546
- const startTimeRef = import_react32.default.useRef(0);
5547
- const autoplayTimerRef = import_react32.default.useRef(null);
5548
- const resumeTimeoutRef = import_react32.default.useRef(null);
5549
- const [paused, setPaused] = import_react32.default.useState(false);
5550
- const initializedRef = import_react32.default.useRef(false);
5551
- import_react32.default.useEffect(() => {
5585
+ const [isDragging, setIsDragging] = import_react31.default.useState(false);
5586
+ const [dragOffset, setDragOffset] = import_react31.default.useState(0);
5587
+ const [animated, setAnimated] = import_react31.default.useState(false);
5588
+ const [containerWidth, setContainerWidth] = import_react31.default.useState(0);
5589
+ const containerRef = import_react31.default.useRef(null);
5590
+ const startXRef = import_react31.default.useRef(0);
5591
+ const startTimeRef = import_react31.default.useRef(0);
5592
+ const autoplayTimerRef = import_react31.default.useRef(null);
5593
+ const resumeTimeoutRef = import_react31.default.useRef(null);
5594
+ const [paused, setPaused] = import_react31.default.useState(false);
5595
+ const initializedRef = import_react31.default.useRef(false);
5596
+ import_react31.default.useEffect(() => {
5552
5597
  const el = containerRef.current;
5553
5598
  if (!el) return;
5554
5599
  const ro = new ResizeObserver((entries) => {
@@ -5571,7 +5616,7 @@ var Swiper = (props) => {
5571
5616
  return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
5572
5617
  };
5573
5618
  const realIndex = getRealIndex(innerIndex);
5574
- const moveToInner = import_react32.default.useCallback(
5619
+ const moveToInner = import_react31.default.useCallback(
5575
5620
  (idx, withAnim = true) => {
5576
5621
  if (!useLoop) {
5577
5622
  setAnimated(withAnim);
@@ -5599,7 +5644,7 @@ var Swiper = (props) => {
5599
5644
  },
5600
5645
  [useLoop, cloneCount, totalSlides]
5601
5646
  );
5602
- const handleTransitionEnd = import_react32.default.useCallback(() => {
5647
+ const handleTransitionEnd = import_react31.default.useCallback(() => {
5603
5648
  if (!useLoop) return;
5604
5649
  const real = getRealIndex(innerIndex);
5605
5650
  const canonical = cloneCount + real;
@@ -5609,7 +5654,7 @@ var Swiper = (props) => {
5609
5654
  }
5610
5655
  onChange?.(Math.min(real, maxIndex));
5611
5656
  }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
5612
- const slideTo = import_react32.default.useCallback(
5657
+ const slideTo = import_react31.default.useCallback(
5613
5658
  (logicalIndex) => {
5614
5659
  if (!canSlide) return;
5615
5660
  const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
@@ -5619,7 +5664,7 @@ var Swiper = (props) => {
5619
5664
  },
5620
5665
  [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
5621
5666
  );
5622
- const slideNext = import_react32.default.useCallback(() => {
5667
+ const slideNext = import_react31.default.useCallback(() => {
5623
5668
  if (!canSlide) return;
5624
5669
  const nextInner = innerIndex + slideBy;
5625
5670
  if (useLoop) {
@@ -5628,7 +5673,7 @@ var Swiper = (props) => {
5628
5673
  moveToInner(Math.min(nextInner, maxIndex), true);
5629
5674
  }
5630
5675
  }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
5631
- const slidePrev = import_react32.default.useCallback(() => {
5676
+ const slidePrev = import_react31.default.useCallback(() => {
5632
5677
  if (!canSlide) return;
5633
5678
  const prevInner = innerIndex - slideBy;
5634
5679
  if (useLoop) {
@@ -5637,7 +5682,7 @@ var Swiper = (props) => {
5637
5682
  moveToInner(Math.max(prevInner, 0), true);
5638
5683
  }
5639
5684
  }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
5640
- import_react32.default.useEffect(() => {
5685
+ import_react31.default.useEffect(() => {
5641
5686
  if (indexProp === void 0) return;
5642
5687
  const clamped = Math.max(0, Math.min(indexProp, maxIndex));
5643
5688
  const target = useLoop ? cloneCount + clamped : clamped;
@@ -5645,12 +5690,12 @@ var Swiper = (props) => {
5645
5690
  moveToInner(target, true);
5646
5691
  }
5647
5692
  }, [indexProp]);
5648
- import_react32.default.useImperativeHandle(swiperRef, () => ({
5693
+ import_react31.default.useImperativeHandle(swiperRef, () => ({
5649
5694
  slidePrev,
5650
5695
  slideNext,
5651
5696
  slideTo
5652
5697
  }));
5653
- import_react32.default.useEffect(() => {
5698
+ import_react31.default.useEffect(() => {
5654
5699
  if (!auto || !canSlide || paused) return;
5655
5700
  autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
5656
5701
  return () => {
@@ -5676,7 +5721,7 @@ var Swiper = (props) => {
5676
5721
  resumeTimeoutRef.current = null;
5677
5722
  }, pauseOnInteraction);
5678
5723
  };
5679
- import_react32.default.useEffect(() => {
5724
+ import_react31.default.useEffect(() => {
5680
5725
  return () => {
5681
5726
  if (resumeTimeoutRef.current) clearTimeout(resumeTimeoutRef.current);
5682
5727
  };
@@ -5694,7 +5739,7 @@ var Swiper = (props) => {
5694
5739
  startXRef.current = getClientX(e);
5695
5740
  startTimeRef.current = Date.now();
5696
5741
  };
5697
- import_react32.default.useEffect(() => {
5742
+ import_react31.default.useEffect(() => {
5698
5743
  if (!isDragging) return;
5699
5744
  const handleMove = (e) => {
5700
5745
  setDragOffset(getClientX(e) - startXRef.current);
@@ -5733,7 +5778,7 @@ var Swiper = (props) => {
5733
5778
  }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
5734
5779
  const slideWidthPercent = 100 / viewItemCount;
5735
5780
  const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
5736
- const slideElements = import_react32.default.useMemo(
5781
+ const slideElements = import_react31.default.useMemo(
5737
5782
  () => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
5738
5783
  "div",
5739
5784
  {
@@ -5807,7 +5852,7 @@ Swiper.displayName = "Swiper";
5807
5852
  var Swiper_default = Swiper;
5808
5853
 
5809
5854
  // src/components/Switch/Switch.tsx
5810
- var import_react33 = __toESM(require("react"), 1);
5855
+ var import_react32 = __toESM(require("react"), 1);
5811
5856
  var import_jsx_runtime342 = require("react/jsx-runtime");
5812
5857
  var KNOB_TRANSITION_MS = 250;
5813
5858
  var Switch = (props) => {
@@ -5816,11 +5861,12 @@ var Switch = (props) => {
5816
5861
  size = "md",
5817
5862
  type = "brand",
5818
5863
  disabled,
5819
- onChange
5864
+ onChange,
5865
+ validations
5820
5866
  } = props;
5821
- const [isAnimating, setIsAnimating] = import_react33.default.useState(false);
5822
- const timeoutRef = import_react33.default.useRef(null);
5823
- import_react33.default.useEffect(() => {
5867
+ const [isAnimating, setIsAnimating] = import_react32.default.useState(false);
5868
+ const timeoutRef = import_react32.default.useRef(null);
5869
+ import_react32.default.useEffect(() => {
5824
5870
  return () => {
5825
5871
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5826
5872
  };
@@ -5835,7 +5881,7 @@ var Switch = (props) => {
5835
5881
  timeoutRef.current = null;
5836
5882
  }, KNOB_TRANSITION_MS);
5837
5883
  };
5838
- return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
5884
+ const control = /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
5839
5885
  "div",
5840
5886
  {
5841
5887
  className: clsx_default(
@@ -5847,19 +5893,21 @@ var Switch = (props) => {
5847
5893
  isAnimating && "animating"
5848
5894
  ),
5849
5895
  onClick: handleClick,
5896
+ "aria-invalid": hasError(validations) || void 0,
5850
5897
  "aria-disabled": disabled || isAnimating,
5851
5898
  children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
5852
5899
  }
5853
5900
  );
5901
+ return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(Field, { validations, children: control });
5854
5902
  };
5855
5903
  Switch.displayName = "Switch";
5856
5904
  var Switch_default = Switch;
5857
5905
 
5858
5906
  // src/components/Table/TableContext.tsx
5859
- var import_react34 = __toESM(require("react"), 1);
5860
- var TableContext = import_react34.default.createContext(null);
5907
+ var import_react33 = __toESM(require("react"), 1);
5908
+ var TableContext = import_react33.default.createContext(null);
5861
5909
  var useTableContext = () => {
5862
- const ctx = import_react34.default.useContext(TableContext);
5910
+ const ctx = import_react33.default.useContext(TableContext);
5863
5911
  if (!ctx) throw new Error("Table components must be used inside <Table>");
5864
5912
  return ctx;
5865
5913
  };
@@ -5902,24 +5950,24 @@ TableBody.displayName = "TableBody";
5902
5950
  var TableBody_default = TableBody;
5903
5951
 
5904
5952
  // src/components/Table/TableCell.tsx
5905
- var import_react37 = __toESM(require("react"), 1);
5953
+ var import_react36 = __toESM(require("react"), 1);
5906
5954
 
5907
5955
  // src/components/Table/TableHeadContext.tsx
5908
- var import_react35 = __toESM(require("react"), 1);
5909
- var TableHeadContext = import_react35.default.createContext(
5956
+ var import_react34 = __toESM(require("react"), 1);
5957
+ var TableHeadContext = import_react34.default.createContext(
5910
5958
  null
5911
5959
  );
5912
5960
  var useTableHeadContext = () => {
5913
- const ctx = import_react35.default.useContext(TableHeadContext);
5961
+ const ctx = import_react34.default.useContext(TableHeadContext);
5914
5962
  return ctx;
5915
5963
  };
5916
5964
  var TableHeadContext_default = TableHeadContext;
5917
5965
 
5918
5966
  // src/components/Table/TableRowContext.tsx
5919
- var import_react36 = __toESM(require("react"), 1);
5920
- var TableRowContext = import_react36.default.createContext(null);
5967
+ var import_react35 = __toESM(require("react"), 1);
5968
+ var TableRowContext = import_react35.default.createContext(null);
5921
5969
  var useTableRowContext = () => {
5922
- const ctx = import_react36.default.useContext(TableRowContext);
5970
+ const ctx = import_react35.default.useContext(TableRowContext);
5923
5971
  if (!ctx) throw new Error("Table components must be used inside <Table>");
5924
5972
  return ctx;
5925
5973
  };
@@ -5927,7 +5975,7 @@ var TableRowContext_default = TableRowContext;
5927
5975
 
5928
5976
  // src/components/Table/TableCell.tsx
5929
5977
  var import_jsx_runtime345 = require("react/jsx-runtime");
5930
- var TableCell = import_react37.default.memo((props) => {
5978
+ var TableCell = import_react36.default.memo((props) => {
5931
5979
  const {
5932
5980
  children,
5933
5981
  align = "center",
@@ -5941,9 +5989,9 @@ var TableCell = import_react37.default.memo((props) => {
5941
5989
  const { registerStickyCell, stickyCells } = useTableRowContext();
5942
5990
  const { stickyShadow } = useTableContext();
5943
5991
  const headContext = useTableHeadContext();
5944
- const [left, setLeft] = import_react37.default.useState(0);
5945
- const cellRef = import_react37.default.useRef(null);
5946
- const calculateLeft = import_react37.default.useCallback(() => {
5992
+ const [left, setLeft] = import_react36.default.useState(0);
5993
+ const cellRef = import_react36.default.useRef(null);
5994
+ const calculateLeft = import_react36.default.useCallback(() => {
5947
5995
  if (!cellRef.current) return 0;
5948
5996
  let totalLeft = 0;
5949
5997
  for (const ref of stickyCells) {
@@ -5952,7 +6000,7 @@ var TableCell = import_react37.default.memo((props) => {
5952
6000
  }
5953
6001
  return totalLeft;
5954
6002
  }, [stickyCells]);
5955
- import_react37.default.useEffect(() => {
6003
+ import_react36.default.useEffect(() => {
5956
6004
  if (!isSticky || !cellRef.current) return;
5957
6005
  registerStickyCell(cellRef);
5958
6006
  setLeft(calculateLeft());
@@ -6010,9 +6058,9 @@ TableHead.displayName = "TableHead";
6010
6058
  var TableHead_default = TableHead;
6011
6059
 
6012
6060
  // src/components/Table/TableRow.tsx
6013
- var import_react38 = __toESM(require("react"), 1);
6061
+ var import_react37 = __toESM(require("react"), 1);
6014
6062
  var import_jsx_runtime347 = require("react/jsx-runtime");
6015
- var TableRow = import_react38.default.memo((props) => {
6063
+ var TableRow = import_react37.default.memo((props) => {
6016
6064
  const {
6017
6065
  children,
6018
6066
  type = "secondary",
@@ -6021,7 +6069,7 @@ var TableRow = import_react38.default.memo((props) => {
6021
6069
  onClick
6022
6070
  } = props;
6023
6071
  const { rowBorderUse } = useTableContext();
6024
- const [stickyCells, setStickyCells] = import_react38.default.useState([]);
6072
+ const [stickyCells, setStickyCells] = import_react37.default.useState([]);
6025
6073
  const registerStickyCell = (ref) => {
6026
6074
  setStickyCells((prev) => {
6027
6075
  if (prev.includes(ref)) return prev;
@@ -6083,49 +6131,52 @@ Tag.displayName = "Tag";
6083
6131
  var Tag_default = Tag;
6084
6132
 
6085
6133
  // src/components/TextArea/TextArea.tsx
6086
- var import_react39 = __toESM(require("react"), 1);
6134
+ var import_react38 = __toESM(require("react"), 1);
6087
6135
  var import_jsx_runtime349 = require("react/jsx-runtime");
6088
- var TextArea = import_react39.default.forwardRef(
6136
+ var TextArea = import_react38.default.forwardRef(
6089
6137
  (props, ref) => {
6090
6138
  const {
6091
6139
  className,
6092
6140
  size = "md",
6141
+ validations,
6093
6142
  resize = "vertical",
6094
6143
  rows = 3,
6095
6144
  disabled,
6096
6145
  ...textareaProps
6097
6146
  } = props;
6098
- return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
6147
+ const control = /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
6099
6148
  "textarea",
6100
6149
  {
6101
6150
  ...textareaProps,
6102
6151
  ref,
6103
6152
  rows,
6104
6153
  disabled,
6154
+ "aria-invalid": hasError(validations) || void 0,
6105
6155
  className: clsx_default("lib-xplat-textarea", size, disabled && "disabled"),
6106
6156
  style: { resize }
6107
6157
  }
6108
6158
  ) });
6159
+ return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(Field, { validations, children: control });
6109
6160
  }
6110
6161
  );
6111
6162
  TextArea.displayName = "TextArea";
6112
6163
  var TextArea_default = TextArea;
6113
6164
 
6114
6165
  // src/components/Toast/Toast.tsx
6115
- var import_react40 = __toESM(require("react"), 1);
6166
+ var import_react39 = __toESM(require("react"), 1);
6116
6167
  var import_react_dom4 = require("react-dom");
6117
6168
  var import_jsx_runtime350 = require("react/jsx-runtime");
6118
- var ToastContext = import_react40.default.createContext(null);
6169
+ var ToastContext = import_react39.default.createContext(null);
6119
6170
  var useToast = () => {
6120
- const ctx = import_react40.default.useContext(ToastContext);
6171
+ const ctx = import_react39.default.useContext(ToastContext);
6121
6172
  if (!ctx) throw new Error("useToast must be used within ToastProvider");
6122
6173
  return ctx;
6123
6174
  };
6124
6175
  var EXIT_DURATION = 300;
6125
6176
  var ToastItemComponent = ({ item, isExiting, onClose }) => {
6126
- const ref = import_react40.default.useRef(null);
6127
- const [height, setHeight] = import_react40.default.useState(void 0);
6128
- import_react40.default.useEffect(() => {
6177
+ const ref = import_react39.default.useRef(null);
6178
+ const [height, setHeight] = import_react39.default.useState(void 0);
6179
+ import_react39.default.useEffect(() => {
6129
6180
  if (ref.current && !isExiting) {
6130
6181
  setHeight(ref.current.offsetHeight);
6131
6182
  }
@@ -6157,13 +6208,13 @@ var ToastProvider = ({
6157
6208
  children,
6158
6209
  position = "top-right"
6159
6210
  }) => {
6160
- const [toasts, setToasts] = import_react40.default.useState([]);
6161
- const [removing, setRemoving] = import_react40.default.useState(/* @__PURE__ */ new Set());
6162
- const [mounted, setMounted] = import_react40.default.useState(false);
6163
- import_react40.default.useEffect(() => {
6211
+ const [toasts, setToasts] = import_react39.default.useState([]);
6212
+ const [removing, setRemoving] = import_react39.default.useState(/* @__PURE__ */ new Set());
6213
+ const [mounted, setMounted] = import_react39.default.useState(false);
6214
+ import_react39.default.useEffect(() => {
6164
6215
  setMounted(true);
6165
6216
  }, []);
6166
- const remove = import_react40.default.useCallback((id) => {
6217
+ const remove = import_react39.default.useCallback((id) => {
6167
6218
  setRemoving((prev) => new Set(prev).add(id));
6168
6219
  setTimeout(() => {
6169
6220
  setToasts((prev) => prev.filter((t) => t.id !== id));
@@ -6174,7 +6225,7 @@ var ToastProvider = ({
6174
6225
  });
6175
6226
  }, EXIT_DURATION);
6176
6227
  }, []);
6177
- const toast = import_react40.default.useCallback(
6228
+ const toast = import_react39.default.useCallback(
6178
6229
  (type, message, duration = 3e3) => {
6179
6230
  const id = `${Date.now()}-${Math.random()}`;
6180
6231
  setToasts((prev) => [...prev, { id, type, message }]);
@@ -6203,7 +6254,7 @@ var ToastProvider = ({
6203
6254
  ToastProvider.displayName = "ToastProvider";
6204
6255
 
6205
6256
  // src/components/Tooltip/Tooltip.tsx
6206
- var import_react41 = __toESM(require("react"), 1);
6257
+ var import_react40 = __toESM(require("react"), 1);
6207
6258
  var import_jsx_runtime351 = require("react/jsx-runtime");
6208
6259
  var OFFSET = 12;
6209
6260
  var GAP = 8;
@@ -6217,14 +6268,14 @@ var Tooltip = (props) => {
6217
6268
  follow = false,
6218
6269
  disabled = false
6219
6270
  } = props;
6220
- const triggerRef = import_react41.default.useRef(null);
6221
- const tooltipRef = import_react41.default.useRef(null);
6222
- const [visible, setVisible] = import_react41.default.useState(false);
6223
- const [pos, setPos] = import_react41.default.useState({ left: 0, top: 0 });
6224
- const delayTimer = import_react41.default.useRef(0);
6225
- const rafRef = import_react41.default.useRef(0);
6226
- const cursor = import_react41.default.useRef(null);
6227
- const clamp = import_react41.default.useCallback((left, top, w, h) => {
6271
+ const triggerRef = import_react40.default.useRef(null);
6272
+ const tooltipRef = import_react40.default.useRef(null);
6273
+ const [visible, setVisible] = import_react40.default.useState(false);
6274
+ const [pos, setPos] = import_react40.default.useState({ left: 0, top: 0 });
6275
+ const delayTimer = import_react40.default.useRef(0);
6276
+ const rafRef = import_react40.default.useRef(0);
6277
+ const cursor = import_react40.default.useRef(null);
6278
+ const clamp = import_react40.default.useCallback((left, top, w, h) => {
6228
6279
  const vw = window.innerWidth;
6229
6280
  const vh = window.innerHeight;
6230
6281
  return {
@@ -6232,7 +6283,7 @@ var Tooltip = (props) => {
6232
6283
  top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
6233
6284
  };
6234
6285
  }, []);
6235
- const placeAtCursor = import_react41.default.useCallback((x, y) => {
6286
+ const placeAtCursor = import_react40.default.useCallback((x, y) => {
6236
6287
  const el = tooltipRef.current;
6237
6288
  if (!el) return;
6238
6289
  const w = el.offsetWidth;
@@ -6243,7 +6294,7 @@ var Tooltip = (props) => {
6243
6294
  if (top < GAP) top = y + OFFSET;
6244
6295
  setPos(clamp(left, top, w, h));
6245
6296
  }, [clamp]);
6246
- const placeAtTrigger = import_react41.default.useCallback(() => {
6297
+ const placeAtTrigger = import_react40.default.useCallback(() => {
6247
6298
  const el = tooltipRef.current;
6248
6299
  const trigger = triggerRef.current;
6249
6300
  if (!el || !trigger) return;
@@ -6255,19 +6306,19 @@ var Tooltip = (props) => {
6255
6306
  const left = rect.left + rect.width / 2 - w / 2;
6256
6307
  setPos(clamp(left, top, w, h));
6257
6308
  }, [clamp]);
6258
- const reposition = import_react41.default.useCallback(() => {
6309
+ const reposition = import_react40.default.useCallback(() => {
6259
6310
  if (follow && cursor.current) {
6260
6311
  placeAtCursor(cursor.current.x, cursor.current.y);
6261
6312
  } else {
6262
6313
  placeAtTrigger();
6263
6314
  }
6264
6315
  }, [follow, placeAtCursor, placeAtTrigger]);
6265
- const handleMouseEnter = import_react41.default.useCallback((e) => {
6316
+ const handleMouseEnter = import_react40.default.useCallback((e) => {
6266
6317
  if (disabled) return;
6267
6318
  cursor.current = { x: e.clientX, y: e.clientY };
6268
6319
  delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
6269
6320
  }, [disabled]);
6270
- const handleMouseMove = import_react41.default.useCallback((e) => {
6321
+ const handleMouseMove = import_react40.default.useCallback((e) => {
6271
6322
  cursor.current = { x: e.clientX, y: e.clientY };
6272
6323
  if (!visible || !follow) return;
6273
6324
  cancelAnimationFrame(rafRef.current);
@@ -6275,25 +6326,25 @@ var Tooltip = (props) => {
6275
6326
  if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
6276
6327
  });
6277
6328
  }, [visible, follow, placeAtCursor]);
6278
- const close = import_react41.default.useCallback(() => {
6329
+ const close = import_react40.default.useCallback(() => {
6279
6330
  window.clearTimeout(delayTimer.current);
6280
6331
  cancelAnimationFrame(rafRef.current);
6281
6332
  setVisible(false);
6282
6333
  }, []);
6283
- const handleMouseLeave = import_react41.default.useCallback(() => {
6334
+ const handleMouseLeave = import_react40.default.useCallback(() => {
6284
6335
  cursor.current = null;
6285
6336
  close();
6286
6337
  }, [close]);
6287
- const handleFocus = import_react41.default.useCallback(() => {
6338
+ const handleFocus = import_react40.default.useCallback(() => {
6288
6339
  if (disabled) return;
6289
6340
  cursor.current = null;
6290
6341
  setVisible(true);
6291
6342
  }, [disabled]);
6292
- import_react41.default.useLayoutEffect(() => {
6343
+ import_react40.default.useLayoutEffect(() => {
6293
6344
  if (!visible) return;
6294
6345
  reposition();
6295
6346
  }, [visible, reposition]);
6296
- import_react41.default.useEffect(() => {
6347
+ import_react40.default.useEffect(() => {
6297
6348
  if (!visible || follow) return;
6298
6349
  const onChange = () => placeAtTrigger();
6299
6350
  window.addEventListener("scroll", onChange, true);
@@ -6303,7 +6354,7 @@ var Tooltip = (props) => {
6303
6354
  window.removeEventListener("resize", onChange);
6304
6355
  };
6305
6356
  }, [visible, follow, placeAtTrigger]);
6306
- import_react41.default.useEffect(() => () => {
6357
+ import_react40.default.useEffect(() => () => {
6307
6358
  window.clearTimeout(delayTimer.current);
6308
6359
  cancelAnimationFrame(rafRef.current);
6309
6360
  }, []);
@@ -6342,7 +6393,7 @@ Tooltip.displayName = "Tooltip";
6342
6393
  var Tooltip_default = Tooltip;
6343
6394
 
6344
6395
  // src/components/Video/Video.tsx
6345
- var import_react42 = __toESM(require("react"), 1);
6396
+ var import_react41 = __toESM(require("react"), 1);
6346
6397
  var import_jsx_runtime352 = require("react/jsx-runtime");
6347
6398
  var PipIcon = () => /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
6348
6399
  /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
@@ -6354,7 +6405,7 @@ var formatTime = (sec) => {
6354
6405
  const s = Math.floor(sec % 60);
6355
6406
  return `${m}:${s.toString().padStart(2, "0")}`;
6356
6407
  };
6357
- var Video = import_react42.default.forwardRef((props, ref) => {
6408
+ var Video = import_react41.default.forwardRef((props, ref) => {
6358
6409
  const {
6359
6410
  src,
6360
6411
  poster,
@@ -6378,21 +6429,21 @@ var Video = import_react42.default.forwardRef((props, ref) => {
6378
6429
  children,
6379
6430
  ...rest
6380
6431
  } = props;
6381
- const containerRef = import_react42.default.useRef(null);
6382
- const videoRef = import_react42.default.useRef(null);
6383
- const [isPlaying, setIsPlaying] = import_react42.default.useState(Boolean(autoPlay));
6384
- const [isLoaded, setIsLoaded] = import_react42.default.useState(false);
6385
- const [currentTime, setCurrentTime] = import_react42.default.useState(0);
6386
- const [duration, setDuration] = import_react42.default.useState(0);
6387
- const [buffered, setBuffered] = import_react42.default.useState(0);
6388
- const [volume, setVolume] = import_react42.default.useState(1);
6389
- const [isMuted, setIsMuted] = import_react42.default.useState(Boolean(muted));
6390
- const [isFullscreen, setIsFullscreen] = import_react42.default.useState(false);
6391
- const [playbackRate, setPlaybackRate] = import_react42.default.useState(1);
6392
- const [rateMenuOpen, setRateMenuOpen] = import_react42.default.useState(false);
6393
- const [captionsOn, setCaptionsOn] = import_react42.default.useState(false);
6394
- const [isPip, setIsPip] = import_react42.default.useState(false);
6395
- const setRefs = import_react42.default.useCallback(
6432
+ const containerRef = import_react41.default.useRef(null);
6433
+ const videoRef = import_react41.default.useRef(null);
6434
+ const [isPlaying, setIsPlaying] = import_react41.default.useState(Boolean(autoPlay));
6435
+ const [isLoaded, setIsLoaded] = import_react41.default.useState(false);
6436
+ const [currentTime, setCurrentTime] = import_react41.default.useState(0);
6437
+ const [duration, setDuration] = import_react41.default.useState(0);
6438
+ const [buffered, setBuffered] = import_react41.default.useState(0);
6439
+ const [volume, setVolume] = import_react41.default.useState(1);
6440
+ const [isMuted, setIsMuted] = import_react41.default.useState(Boolean(muted));
6441
+ const [isFullscreen, setIsFullscreen] = import_react41.default.useState(false);
6442
+ const [playbackRate, setPlaybackRate] = import_react41.default.useState(1);
6443
+ const [rateMenuOpen, setRateMenuOpen] = import_react41.default.useState(false);
6444
+ const [captionsOn, setCaptionsOn] = import_react41.default.useState(false);
6445
+ const [isPip, setIsPip] = import_react41.default.useState(false);
6446
+ const setRefs = import_react41.default.useCallback(
6396
6447
  (el) => {
6397
6448
  videoRef.current = el;
6398
6449
  if (typeof ref === "function") ref(el);
@@ -6400,14 +6451,14 @@ var Video = import_react42.default.forwardRef((props, ref) => {
6400
6451
  },
6401
6452
  [ref]
6402
6453
  );
6403
- import_react42.default.useEffect(() => {
6454
+ import_react41.default.useEffect(() => {
6404
6455
  const onFsChange = () => {
6405
6456
  setIsFullscreen(document.fullscreenElement === containerRef.current);
6406
6457
  };
6407
6458
  document.addEventListener("fullscreenchange", onFsChange);
6408
6459
  return () => document.removeEventListener("fullscreenchange", onFsChange);
6409
6460
  }, []);
6410
- import_react42.default.useEffect(() => {
6461
+ import_react41.default.useEffect(() => {
6411
6462
  const v = videoRef.current;
6412
6463
  if (!v) return;
6413
6464
  const onEnter = () => setIsPip(true);
@@ -6723,6 +6774,8 @@ var Video_default = Video;
6723
6774
  Dropdown,
6724
6775
  Editor,
6725
6776
  EmptyState,
6777
+ Field,
6778
+ FieldMessage,
6726
6779
  FileUpload,
6727
6780
  HtmlTypeWriter,
6728
6781
  HtmlTypewriter,
@@ -6761,6 +6814,7 @@ var Video_default = Video;
6761
6814
  ToastProvider,
6762
6815
  Tooltip,
6763
6816
  Video,
6817
+ hasError,
6764
6818
  isInRange,
6765
6819
  isSameDay,
6766
6820
  useCalendar,