@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
package/dist/index.js CHANGED
@@ -5595,11 +5595,49 @@ var Alert_default = Alert;
5595
5595
 
5596
5596
  // src/components/AutoResizeTextArea/AutoResizeTextArea.tsx
5597
5597
  import React2 from "react";
5598
- import { jsx as jsx297 } from "react/jsx-runtime";
5598
+
5599
+ // src/components/FieldMessage/FieldMessage.tsx
5600
+ import { Fragment, jsx as jsx297, jsxs as jsxs191 } from "react/jsx-runtime";
5601
+ var ICON = {
5602
+ default: /* @__PURE__ */ jsx297(InfoIcon_default, {}),
5603
+ success: /* @__PURE__ */ jsx297(SuccessIcon_default, {}),
5604
+ warning: /* @__PURE__ */ jsx297(InfoIcon_default, {}),
5605
+ error: /* @__PURE__ */ jsx297(ErrorIcon_default, {})
5606
+ };
5607
+ var FieldMessage = (props) => {
5608
+ const { validations } = props;
5609
+ if (!validations || validations.length === 0) return null;
5610
+ return /* @__PURE__ */ jsx297("div", { className: "lib-xplat-field-message-wrap", children: validations.map((v, idx) => /* @__PURE__ */ jsxs191(
5611
+ "div",
5612
+ {
5613
+ className: clsx_default("lib-xplat-field-message", v.status),
5614
+ children: [
5615
+ /* @__PURE__ */ jsx297("div", { className: "icon", children: ICON[v.status] }),
5616
+ /* @__PURE__ */ jsx297("span", { children: v.message })
5617
+ ]
5618
+ },
5619
+ `${v.message}_${idx}`
5620
+ )) });
5621
+ };
5622
+ FieldMessage.displayName = "FieldMessage";
5623
+ var FieldMessage_default = FieldMessage;
5624
+ var Field = (props) => {
5625
+ const { validations, children } = props;
5626
+ if (!validations || validations.length === 0) return /* @__PURE__ */ jsx297(Fragment, { children });
5627
+ return /* @__PURE__ */ jsxs191("div", { className: "lib-xplat-field", children: [
5628
+ children,
5629
+ /* @__PURE__ */ jsx297(FieldMessage, { validations })
5630
+ ] });
5631
+ };
5632
+ Field.displayName = "Field";
5633
+ var hasError = (validations) => !!validations?.some((v) => v.status === "error");
5634
+
5635
+ // src/components/AutoResizeTextArea/AutoResizeTextArea.tsx
5636
+ import { jsx as jsx298 } from "react/jsx-runtime";
5599
5637
  var MAX_HEIGHT = 400;
5600
5638
  var AutoResizeTextArea = React2.forwardRef(
5601
5639
  (props, ref) => {
5602
- const { value, className, onChange, disabled, bare = false, ...textareaProps } = props;
5640
+ const { value, className, onChange, disabled, bare = false, validations, ...textareaProps } = props;
5603
5641
  const localRef = React2.useRef(null);
5604
5642
  const setRefs = (el) => {
5605
5643
  localRef.current = el;
@@ -5627,9 +5665,10 @@ var AutoResizeTextArea = React2.forwardRef(
5627
5665
  updateHeight();
5628
5666
  }, [value]);
5629
5667
  if (bare) {
5630
- return /* @__PURE__ */ jsx297(
5668
+ return /* @__PURE__ */ jsx298(
5631
5669
  "textarea",
5632
5670
  {
5671
+ "aria-invalid": hasError(validations) || void 0,
5633
5672
  ...textareaProps,
5634
5673
  ref: setRefs,
5635
5674
  className,
@@ -5639,9 +5678,10 @@ var AutoResizeTextArea = React2.forwardRef(
5639
5678
  }
5640
5679
  );
5641
5680
  }
5642
- return /* @__PURE__ */ jsx297("div", { className: clsx_default("lib-xplat-auto-resize-textarea-wrapper", className), children: /* @__PURE__ */ jsx297("div", { className: clsx_default("lib-xplat-auto-resize-textarea", disabled && "disabled"), children: /* @__PURE__ */ jsx297(
5681
+ const control = /* @__PURE__ */ jsx298("div", { className: clsx_default("lib-xplat-auto-resize-textarea-wrapper", className), children: /* @__PURE__ */ jsx298("div", { className: clsx_default("lib-xplat-auto-resize-textarea", disabled && "disabled"), children: /* @__PURE__ */ jsx298(
5643
5682
  "textarea",
5644
5683
  {
5684
+ "aria-invalid": hasError(validations) || void 0,
5645
5685
  ...textareaProps,
5646
5686
  ref: setRefs,
5647
5687
  disabled,
@@ -5649,13 +5689,14 @@ var AutoResizeTextArea = React2.forwardRef(
5649
5689
  onChange: handleChange
5650
5690
  }
5651
5691
  ) }) });
5692
+ return /* @__PURE__ */ jsx298(Field, { validations, children: control });
5652
5693
  }
5653
5694
  );
5654
5695
  AutoResizeTextArea.displayName = "AutoResizeTextArea";
5655
5696
  var AutoResizeTextArea_default = AutoResizeTextArea;
5656
5697
 
5657
5698
  // src/components/Avatar/Avatar.tsx
5658
- import { jsx as jsx298 } from "react/jsx-runtime";
5699
+ import { jsx as jsx299 } from "react/jsx-runtime";
5659
5700
  var CATEGORICAL_COUNT = 8;
5660
5701
  var getColorIndex = (name) => {
5661
5702
  if (!name) return 1;
@@ -5672,36 +5713,36 @@ var Avatar = (props) => {
5672
5713
  const fullInitials = name ? name.split(" ").map((s) => s[0]).join("").slice(0, 2).toUpperCase() : "";
5673
5714
  const initials = size === "sm" ? fullInitials.slice(0, 1) : fullInitials;
5674
5715
  const catIndex = getColorIndex(name || "");
5675
- return /* @__PURE__ */ jsx298("div", { className: clsx_default("lib-xplat-avatar", size), children: src ? /* @__PURE__ */ jsx298("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ jsx298("div", { className: clsx_default("fallback", `cat-${catIndex}`), children: initials || /* @__PURE__ */ jsx298("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx298("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" }) }) }) });
5716
+ return /* @__PURE__ */ jsx299("div", { className: clsx_default("lib-xplat-avatar", size), children: src ? /* @__PURE__ */ jsx299("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ jsx299("div", { className: clsx_default("fallback", `cat-${catIndex}`), children: initials || /* @__PURE__ */ jsx299("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx299("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" }) }) }) });
5676
5717
  };
5677
5718
  Avatar.displayName = "Avatar";
5678
5719
  var Avatar_default = Avatar;
5679
5720
 
5680
5721
  // src/components/Box/Box.tsx
5681
- import { jsx as jsx299, jsxs as jsxs191 } from "react/jsx-runtime";
5722
+ import { jsx as jsx300, jsxs as jsxs192 } from "react/jsx-runtime";
5682
5723
  var Box = ({
5683
5724
  children,
5684
5725
  title,
5685
5726
  variant = "outlined",
5686
5727
  padding = "md"
5687
5728
  }) => {
5688
- return /* @__PURE__ */ jsxs191("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
5689
- title && /* @__PURE__ */ jsx299("div", { className: "box-title", children: title }),
5690
- /* @__PURE__ */ jsx299("div", { className: "box-content", children })
5729
+ return /* @__PURE__ */ jsxs192("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
5730
+ title && /* @__PURE__ */ jsx300("div", { className: "box-title", children: title }),
5731
+ /* @__PURE__ */ jsx300("div", { className: "box-content", children })
5691
5732
  ] });
5692
5733
  };
5693
5734
  Box.displayName = "Box";
5694
5735
  var Box_default = Box;
5695
5736
 
5696
5737
  // src/components/Breadcrumb/Breadcrumb.tsx
5697
- import { jsx as jsx300, jsxs as jsxs192 } from "react/jsx-runtime";
5738
+ import { jsx as jsx301, jsxs as jsxs193 } from "react/jsx-runtime";
5698
5739
  var Breadcrumb = (props) => {
5699
5740
  const { items, separator = "/" } = props;
5700
- return /* @__PURE__ */ jsx300("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ jsx300("ol", { children: items.map((item, index) => {
5741
+ return /* @__PURE__ */ jsx301("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ jsx301("ol", { children: items.map((item, index) => {
5701
5742
  const isLast = index === items.length - 1;
5702
- return /* @__PURE__ */ jsxs192("li", { children: [
5703
- isLast ? /* @__PURE__ */ jsx300("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ jsx300("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ jsx300("button", { className: "link", onClick: item.onClick, children: item.label }),
5704
- !isLast && /* @__PURE__ */ jsx300("span", { className: "separator", children: separator })
5743
+ return /* @__PURE__ */ jsxs193("li", { children: [
5744
+ isLast ? /* @__PURE__ */ jsx301("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ jsx301("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ jsx301("button", { className: "link", onClick: item.onClick, children: item.label }),
5745
+ !isLast && /* @__PURE__ */ jsx301("span", { className: "separator", children: separator })
5705
5746
  ] }, index);
5706
5747
  }) }) });
5707
5748
  };
@@ -5709,7 +5750,7 @@ Breadcrumb.displayName = "Breadcrumb";
5709
5750
  var Breadcrumb_default = Breadcrumb;
5710
5751
 
5711
5752
  // src/components/Button/Button.tsx
5712
- import { jsx as jsx301 } from "react/jsx-runtime";
5753
+ import { jsx as jsx302 } from "react/jsx-runtime";
5713
5754
  var Button = (props) => {
5714
5755
  const {
5715
5756
  children,
@@ -5718,7 +5759,7 @@ var Button = (props) => {
5718
5759
  disabled,
5719
5760
  ...rest
5720
5761
  } = props;
5721
- return /* @__PURE__ */ jsx301(
5762
+ return /* @__PURE__ */ jsx302(
5722
5763
  "button",
5723
5764
  {
5724
5765
  className: clsx_default("lib-xplat-button", type, size),
@@ -5835,7 +5876,7 @@ var MONTH_LABELS = {
5835
5876
  };
5836
5877
 
5837
5878
  // src/components/Calendar/Calendar.tsx
5838
- import { Fragment, jsx as jsx302, jsxs as jsxs193 } from "react/jsx-runtime";
5879
+ import { Fragment as Fragment2, jsx as jsx303, jsxs as jsxs194 } from "react/jsx-runtime";
5839
5880
  var DayCell = React4.memo(
5840
5881
  ({
5841
5882
  day,
@@ -5847,7 +5888,7 @@ var DayCell = React4.memo(
5847
5888
  onEventClick
5848
5889
  }) => {
5849
5890
  if (renderDay) {
5850
- return /* @__PURE__ */ jsx302(
5891
+ return /* @__PURE__ */ jsx303(
5851
5892
  "div",
5852
5893
  {
5853
5894
  className: clsx_default(
@@ -5864,7 +5905,7 @@ var DayCell = React4.memo(
5864
5905
  }
5865
5906
  );
5866
5907
  }
5867
- return /* @__PURE__ */ jsxs193(
5908
+ return /* @__PURE__ */ jsxs194(
5868
5909
  "div",
5869
5910
  {
5870
5911
  className: clsx_default(
@@ -5880,9 +5921,9 @@ var DayCell = React4.memo(
5880
5921
  if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
5881
5922
  },
5882
5923
  children: [
5883
- /* @__PURE__ */ jsx302("span", { className: "calendar-day-number", children: day.day }),
5884
- dayEvents.length > 0 && /* @__PURE__ */ jsxs193("div", { className: "calendar-day-events", children: [
5885
- dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ jsx302(
5924
+ /* @__PURE__ */ jsx303("span", { className: "calendar-day-number", children: day.day }),
5925
+ dayEvents.length > 0 && /* @__PURE__ */ jsxs194("div", { className: "calendar-day-events", children: [
5926
+ dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ jsx303(
5886
5927
  "span",
5887
5928
  {
5888
5929
  className: "calendar-event-dot",
@@ -5895,7 +5936,7 @@ var DayCell = React4.memo(
5895
5936
  },
5896
5937
  ei
5897
5938
  )),
5898
- dayEvents.length > 3 && /* @__PURE__ */ jsxs193("span", { className: "calendar-event-more", children: [
5939
+ dayEvents.length > 3 && /* @__PURE__ */ jsxs194("span", { className: "calendar-event-more", children: [
5899
5940
  "+",
5900
5941
  dayEvents.length - 3
5901
5942
  ] })
@@ -6016,21 +6057,21 @@ var Calendar = (props) => {
6016
6057
  const weekdays = WEEKDAY_LABELS[locale];
6017
6058
  const monthLabels = MONTH_LABELS[locale];
6018
6059
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
6019
- return /* @__PURE__ */ jsxs193(
6060
+ return /* @__PURE__ */ jsxs194(
6020
6061
  "div",
6021
6062
  {
6022
6063
  className: "lib-xplat-calendar",
6023
6064
  style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
6024
6065
  children: [
6025
- /* @__PURE__ */ jsxs193("div", { className: "calendar-header", children: [
6026
- /* @__PURE__ */ jsx302("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ jsx302(ChevronLeftIcon_default, {}) }),
6027
- /* @__PURE__ */ jsx302("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
6028
- /* @__PURE__ */ jsx302("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ jsx302(ChevronRightIcon_default, {}) }),
6029
- showToday && /* @__PURE__ */ jsx302("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
6066
+ /* @__PURE__ */ jsxs194("div", { className: "calendar-header", children: [
6067
+ /* @__PURE__ */ jsx303("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ jsx303(ChevronLeftIcon_default, {}) }),
6068
+ /* @__PURE__ */ jsx303("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
6069
+ /* @__PURE__ */ jsx303("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ jsx303(ChevronRightIcon_default, {}) }),
6070
+ showToday && /* @__PURE__ */ jsx303("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
6030
6071
  ] }),
6031
- pickerMode === "years" && /* @__PURE__ */ jsx302("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
6072
+ pickerMode === "years" && /* @__PURE__ */ jsx303("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
6032
6073
  const y = yearRangeStart + i;
6033
- return /* @__PURE__ */ jsx302(
6074
+ return /* @__PURE__ */ jsx303(
6034
6075
  "button",
6035
6076
  {
6036
6077
  type: "button",
@@ -6041,7 +6082,7 @@ var Calendar = (props) => {
6041
6082
  y
6042
6083
  );
6043
6084
  }) }),
6044
- pickerMode === "months" && /* @__PURE__ */ jsx302("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx302(
6085
+ pickerMode === "months" && /* @__PURE__ */ jsx303("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx303(
6045
6086
  "button",
6046
6087
  {
6047
6088
  type: "button",
@@ -6051,8 +6092,8 @@ var Calendar = (props) => {
6051
6092
  },
6052
6093
  i
6053
6094
  )) }),
6054
- pickerMode === "days" && /* @__PURE__ */ jsxs193(Fragment, { children: [
6055
- /* @__PURE__ */ jsx302("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx302(
6095
+ pickerMode === "days" && /* @__PURE__ */ jsxs194(Fragment2, { children: [
6096
+ /* @__PURE__ */ jsx303("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx303(
6056
6097
  "div",
6057
6098
  {
6058
6099
  className: clsx_default(
@@ -6064,12 +6105,12 @@ var Calendar = (props) => {
6064
6105
  },
6065
6106
  label
6066
6107
  )) }),
6067
- /* @__PURE__ */ jsx302("div", { className: "calendar-grid", children: days.map((day, idx) => {
6108
+ /* @__PURE__ */ jsx303("div", { className: "calendar-grid", children: days.map((day, idx) => {
6068
6109
  const dayEvents = getEventsForDay(day.date);
6069
6110
  const t = day.date.getTime();
6070
6111
  const disabled = t < minTime || t > maxTime;
6071
6112
  const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
6072
- return /* @__PURE__ */ jsx302(
6113
+ return /* @__PURE__ */ jsx303(
6073
6114
  DayCell,
6074
6115
  {
6075
6116
  day,
@@ -6095,10 +6136,10 @@ var Calendar_default = Calendar;
6095
6136
  import React5 from "react";
6096
6137
 
6097
6138
  // src/components/CardTab/CardTabPanel.tsx
6098
- import { jsx as jsx303 } from "react/jsx-runtime";
6139
+ import { jsx as jsx304 } from "react/jsx-runtime";
6099
6140
  var CardTabPanel = (props) => {
6100
6141
  const { children, columns = 3 } = props;
6101
- return /* @__PURE__ */ jsx303(
6142
+ return /* @__PURE__ */ jsx304(
6102
6143
  "div",
6103
6144
  {
6104
6145
  className: "card-tab-panel",
@@ -6111,7 +6152,7 @@ CardTabPanel.displayName = "CardTab.Panel";
6111
6152
  var CardTabPanel_default = CardTabPanel;
6112
6153
 
6113
6154
  // src/components/CardTab/CardTab.tsx
6114
- import { jsx as jsx304, jsxs as jsxs194 } from "react/jsx-runtime";
6155
+ import { jsx as jsx305, jsxs as jsxs195 } from "react/jsx-runtime";
6115
6156
  var CardTabRoot = (props) => {
6116
6157
  const {
6117
6158
  tabs,
@@ -6135,10 +6176,10 @@ var CardTabRoot = (props) => {
6135
6176
  const activePanel = panels.find(
6136
6177
  (panel) => panel.props.value === activeValue
6137
6178
  );
6138
- return /* @__PURE__ */ jsxs194("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
6139
- /* @__PURE__ */ jsx304("div", { className: "card-tab-bar", children: tabs.map((tab) => {
6179
+ return /* @__PURE__ */ jsxs195("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
6180
+ /* @__PURE__ */ jsx305("div", { className: "card-tab-bar", children: tabs.map((tab) => {
6140
6181
  const isActive2 = tab.value === activeValue;
6141
- return /* @__PURE__ */ jsx304(
6182
+ return /* @__PURE__ */ jsx305(
6142
6183
  "button",
6143
6184
  {
6144
6185
  className: clsx_default("card-tab-trigger", isActive2 && "active"),
@@ -6150,7 +6191,7 @@ var CardTabRoot = (props) => {
6150
6191
  tab.value
6151
6192
  );
6152
6193
  }) }),
6153
- /* @__PURE__ */ jsx304("div", { className: "card-tab-body", children: activePanel })
6194
+ /* @__PURE__ */ jsx305("div", { className: "card-tab-body", children: activePanel })
6154
6195
  ] });
6155
6196
  };
6156
6197
  CardTabRoot.displayName = "CardTab";
@@ -6161,7 +6202,7 @@ var CardTab_default = CardTab;
6161
6202
 
6162
6203
  // src/components/Chart/Chart.tsx
6163
6204
  import React6 from "react";
6164
- import { Fragment as Fragment2, jsx as jsx305, jsxs as jsxs195 } from "react/jsx-runtime";
6205
+ import { Fragment as Fragment3, jsx as jsx306, jsxs as jsxs196 } from "react/jsx-runtime";
6165
6206
  var CATEGORICAL_COUNT2 = 8;
6166
6207
  var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
6167
6208
  const n = i + 1;
@@ -6304,12 +6345,12 @@ var formatTick = (value, maxVal) => {
6304
6345
  const fixed = value.toFixed(decimals);
6305
6346
  return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
6306
6347
  };
6307
- var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx305(Fragment2, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6348
+ var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx306(Fragment3, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6308
6349
  const y = PADDING.top + (1 - ratio) * chartH;
6309
6350
  const val = formatTick(maxVal * ratio, maxVal);
6310
- return /* @__PURE__ */ jsxs195("g", { children: [
6311
- /* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6312
- /* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6351
+ return /* @__PURE__ */ jsxs196("g", { children: [
6352
+ /* @__PURE__ */ jsx306("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6353
+ /* @__PURE__ */ jsx306("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6313
6354
  ] }, ratio);
6314
6355
  }) }));
6315
6356
  GridLines.displayName = "GridLines";
@@ -6321,10 +6362,10 @@ var getLabelStep = (count, chartW) => {
6321
6362
  };
6322
6363
  var AxisLabels = React6.memo(({ labels, count, chartW, height }) => {
6323
6364
  const step = getLabelStep(count, chartW);
6324
- return /* @__PURE__ */ jsx305(Fragment2, { children: labels.map((label, i) => {
6365
+ return /* @__PURE__ */ jsx306(Fragment3, { children: labels.map((label, i) => {
6325
6366
  if (i % step !== 0) return null;
6326
6367
  const x = PADDING.left + i / (count - 1 || 1) * chartW;
6327
- return /* @__PURE__ */ jsx305("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6368
+ return /* @__PURE__ */ jsx306("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6328
6369
  }) });
6329
6370
  });
6330
6371
  AxisLabels.displayName = "AxisLabels";
@@ -6400,7 +6441,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
6400
6441
  }, [animate, width]);
6401
6442
  const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
6402
6443
  const lineClipId = "line-area-clip";
6403
- return /* @__PURE__ */ jsxs195(
6444
+ return /* @__PURE__ */ jsxs196(
6404
6445
  "svg",
6405
6446
  {
6406
6447
  viewBox: `0 0 ${width} ${height}`,
@@ -6418,9 +6459,9 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
6418
6459
  onLeave();
6419
6460
  },
6420
6461
  children: [
6421
- animate && /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsx305("clipPath", { id: lineClipId, children: /* @__PURE__ */ jsx305("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
6422
- /* @__PURE__ */ jsx305(GridLines, { width, height, chartH, maxVal }),
6423
- /* @__PURE__ */ jsx305(AxisLabels, { labels, count, chartW, height }),
6462
+ animate && /* @__PURE__ */ jsx306("defs", { children: /* @__PURE__ */ jsx306("clipPath", { id: lineClipId, children: /* @__PURE__ */ jsx306("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
6463
+ /* @__PURE__ */ jsx306(GridLines, { width, height, chartH, maxVal }),
6464
+ /* @__PURE__ */ jsx306(AxisLabels, { labels, count, chartW, height }),
6424
6465
  entries.map(([key], di) => {
6425
6466
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
6426
6467
  const color = palette[2];
@@ -6429,16 +6470,16 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
6429
6470
  const gradientId = `line-gradient-${di}`;
6430
6471
  const polyPoints = points.map((p) => `${p.x},${p.y}`).join(" ");
6431
6472
  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`;
6432
- return /* @__PURE__ */ jsxs195("g", { children: [
6433
- /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsxs195("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6434
- /* @__PURE__ */ jsx305("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
6435
- /* @__PURE__ */ jsx305("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
6473
+ return /* @__PURE__ */ jsxs196("g", { children: [
6474
+ /* @__PURE__ */ jsx306("defs", { children: /* @__PURE__ */ jsxs196("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6475
+ /* @__PURE__ */ jsx306("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
6476
+ /* @__PURE__ */ jsx306("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
6436
6477
  ] }) }),
6437
- /* @__PURE__ */ jsxs195("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
6438
- /* @__PURE__ */ jsx305("path", { d: areaD, fill: `url(#${gradientId})` }),
6439
- /* @__PURE__ */ jsx305("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
6478
+ /* @__PURE__ */ jsxs196("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
6479
+ /* @__PURE__ */ jsx306("path", { d: areaD, fill: `url(#${gradientId})` }),
6480
+ /* @__PURE__ */ jsx306("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
6440
6481
  ] }),
6441
- activeIndex !== null && points[activeIndex] && /* @__PURE__ */ jsx305(
6482
+ activeIndex !== null && points[activeIndex] && /* @__PURE__ */ jsx306(
6442
6483
  "circle",
6443
6484
  {
6444
6485
  cx: points[activeIndex].x,
@@ -6450,7 +6491,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
6450
6491
  )
6451
6492
  ] }, di);
6452
6493
  }),
6453
- activeX !== null && /* @__PURE__ */ jsx305(
6494
+ activeX !== null && /* @__PURE__ */ jsx306(
6454
6495
  "line",
6455
6496
  {
6456
6497
  x1: activeX,
@@ -6460,7 +6501,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
6460
6501
  className: "chart-crosshair"
6461
6502
  }
6462
6503
  ),
6463
- /* @__PURE__ */ jsx305(
6504
+ /* @__PURE__ */ jsx306(
6464
6505
  "rect",
6465
6506
  {
6466
6507
  x: PADDING.left,
@@ -6509,7 +6550,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
6509
6550
  }, [animate, width]);
6510
6551
  const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
6511
6552
  const curveClipId = "curve-area-clip";
6512
- return /* @__PURE__ */ jsxs195(
6553
+ return /* @__PURE__ */ jsxs196(
6513
6554
  "svg",
6514
6555
  {
6515
6556
  viewBox: `0 0 ${width} ${height}`,
@@ -6528,9 +6569,9 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
6528
6569
  onLeave();
6529
6570
  },
6530
6571
  children: [
6531
- animate && /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsx305("clipPath", { id: curveClipId, children: /* @__PURE__ */ jsx305("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
6532
- /* @__PURE__ */ jsx305(GridLines, { width, height, chartH, maxVal }),
6533
- /* @__PURE__ */ jsx305(AxisLabels, { labels, count, chartW, height }),
6572
+ animate && /* @__PURE__ */ jsx306("defs", { children: /* @__PURE__ */ jsx306("clipPath", { id: curveClipId, children: /* @__PURE__ */ jsx306("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
6573
+ /* @__PURE__ */ jsx306(GridLines, { width, height, chartH, maxVal }),
6574
+ /* @__PURE__ */ jsx306(AxisLabels, { labels, count, chartW, height }),
6534
6575
  entries.map(([key], di) => {
6535
6576
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
6536
6577
  const color = palette[2];
@@ -6539,16 +6580,16 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
6539
6580
  const gradientId = `curve-gradient-${di}`;
6540
6581
  const linePath = toSmoothPath(points);
6541
6582
  const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
6542
- return /* @__PURE__ */ jsxs195("g", { children: [
6543
- /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsxs195("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6544
- /* @__PURE__ */ jsx305("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
6545
- /* @__PURE__ */ jsx305("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
6583
+ return /* @__PURE__ */ jsxs196("g", { children: [
6584
+ /* @__PURE__ */ jsx306("defs", { children: /* @__PURE__ */ jsxs196("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6585
+ /* @__PURE__ */ jsx306("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
6586
+ /* @__PURE__ */ jsx306("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
6546
6587
  ] }) }),
6547
- /* @__PURE__ */ jsxs195("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
6548
- /* @__PURE__ */ jsx305("path", { d: areaPath, fill: `url(#${gradientId})` }),
6549
- /* @__PURE__ */ jsx305("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
6588
+ /* @__PURE__ */ jsxs196("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
6589
+ /* @__PURE__ */ jsx306("path", { d: areaPath, fill: `url(#${gradientId})` }),
6590
+ /* @__PURE__ */ jsx306("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
6550
6591
  ] }),
6551
- activeIndex !== null && points[activeIndex] && /* @__PURE__ */ jsx305(
6592
+ activeIndex !== null && points[activeIndex] && /* @__PURE__ */ jsx306(
6552
6593
  "circle",
6553
6594
  {
6554
6595
  cx: points[activeIndex].x,
@@ -6560,7 +6601,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
6560
6601
  )
6561
6602
  ] }, di);
6562
6603
  }),
6563
- activeX !== null && /* @__PURE__ */ jsx305(
6604
+ activeX !== null && /* @__PURE__ */ jsx306(
6564
6605
  "line",
6565
6606
  {
6566
6607
  x1: activeX,
@@ -6570,7 +6611,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
6570
6611
  className: "chart-crosshair"
6571
6612
  }
6572
6613
  ),
6573
- /* @__PURE__ */ jsx305(
6614
+ /* @__PURE__ */ jsx306(
6574
6615
  "rect",
6575
6616
  {
6576
6617
  x: PADDING.left,
@@ -6613,11 +6654,11 @@ var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onM
6613
6654
  [entries, maxVal, chartH, groupW, barW, barGap, groupCount]
6614
6655
  );
6615
6656
  const barLabelStep = getLabelStep(count, chartW);
6616
- return /* @__PURE__ */ jsxs195("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6617
- /* @__PURE__ */ jsx305(GridLines, { width, height, chartH, maxVal }),
6657
+ return /* @__PURE__ */ jsxs196("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6658
+ /* @__PURE__ */ jsx306(GridLines, { width, height, chartH, maxVal }),
6618
6659
  labels.map((label, i) => {
6619
6660
  if (i % barLabelStep !== 0) return null;
6620
- return /* @__PURE__ */ jsx305("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6661
+ return /* @__PURE__ */ jsx306("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6621
6662
  }),
6622
6663
  entries.map(([key], di) => {
6623
6664
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
@@ -6626,7 +6667,7 @@ var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onM
6626
6667
  const r2 = Math.min(4, b.w / 2);
6627
6668
  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`;
6628
6669
  const delay = 100 + i * 80;
6629
- return /* @__PURE__ */ jsx305(
6670
+ return /* @__PURE__ */ jsx306(
6630
6671
  "path",
6631
6672
  {
6632
6673
  d,
@@ -6706,8 +6747,8 @@ var PieDonutChart = React6.memo(
6706
6747
  });
6707
6748
  }, [values, total, cx, cy, r2, innerR, labels]);
6708
6749
  const maskId = `pie-mask-${isDoughnut ? "d" : "p"}`;
6709
- return /* @__PURE__ */ jsxs195("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
6710
- animate && /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsx305("mask", { id: maskId, children: /* @__PURE__ */ jsx305(
6750
+ return /* @__PURE__ */ jsxs196("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
6751
+ animate && /* @__PURE__ */ jsx306("defs", { children: /* @__PURE__ */ jsx306("mask", { id: maskId, children: /* @__PURE__ */ jsx306(
6711
6752
  "circle",
6712
6753
  {
6713
6754
  ref: maskRef,
@@ -6720,7 +6761,7 @@ var PieDonutChart = React6.memo(
6720
6761
  transform: `rotate(-90 ${cx} ${cy})`
6721
6762
  }
6722
6763
  ) }) }),
6723
- /* @__PURE__ */ jsx305("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ jsx305("g", { children: /* @__PURE__ */ jsx305(
6764
+ /* @__PURE__ */ jsx306("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ jsx306("g", { children: /* @__PURE__ */ jsx306(
6724
6765
  "path",
6725
6766
  {
6726
6767
  d: s.d,
@@ -6755,15 +6796,15 @@ var ChartTooltip = ({ x, y, containerWidth, containerHeight, tooltipType, childr
6755
6796
  const sepIdx = content.indexOf(" \u2014 ");
6756
6797
  const title = sepIdx >= 0 ? content.slice(0, sepIdx) : content;
6757
6798
  const desc = sepIdx >= 0 ? content.slice(sepIdx + 3) : "";
6758
- return /* @__PURE__ */ jsxs195(
6799
+ return /* @__PURE__ */ jsxs196(
6759
6800
  "div",
6760
6801
  {
6761
6802
  ref,
6762
6803
  className: `lib-xplat-tooltip ${tooltipType} chart-tooltip-pos`,
6763
6804
  style: { left: pos.left, top: pos.top },
6764
6805
  children: [
6765
- title && /* @__PURE__ */ jsx305("div", { className: "tooltip-title", children: title }),
6766
- desc && /* @__PURE__ */ jsx305("div", { className: "tooltip-desc", children: desc })
6806
+ title && /* @__PURE__ */ jsx306("div", { className: "tooltip-title", children: title }),
6807
+ desc && /* @__PURE__ */ jsx306("div", { className: "tooltip-desc", children: desc })
6767
6808
  ]
6768
6809
  }
6769
6810
  );
@@ -6775,14 +6816,14 @@ var ChartLegend = ({ data, labels, type }) => {
6775
6816
  const total = values.reduce((a, b) => a + b, 0) || 1;
6776
6817
  const firstKey = entries[0]?.[0] ?? "";
6777
6818
  const colorOffset = hashString(firstKey);
6778
- return /* @__PURE__ */ jsx305("div", { className: "chart-legend", children: values.map((v, i) => {
6819
+ return /* @__PURE__ */ jsx306("div", { className: "chart-legend", children: values.map((v, i) => {
6779
6820
  const pct = Math.round(v / total * 100);
6780
6821
  const color = PIE_COLORS[(i + colorOffset) % PIE_COLORS.length];
6781
- return /* @__PURE__ */ jsxs195("div", { className: "chart-legend-item", children: [
6782
- /* @__PURE__ */ jsx305("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
6783
- /* @__PURE__ */ jsxs195("div", { className: "chart-legend-text", children: [
6784
- /* @__PURE__ */ jsx305("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
6785
- /* @__PURE__ */ jsxs195("span", { className: "chart-legend-value", children: [
6822
+ return /* @__PURE__ */ jsxs196("div", { className: "chart-legend-item", children: [
6823
+ /* @__PURE__ */ jsx306("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
6824
+ /* @__PURE__ */ jsxs196("div", { className: "chart-legend-text", children: [
6825
+ /* @__PURE__ */ jsx306("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
6826
+ /* @__PURE__ */ jsxs196("span", { className: "chart-legend-value", children: [
6786
6827
  v.toLocaleString(),
6787
6828
  "(",
6788
6829
  pct,
@@ -6792,16 +6833,16 @@ var ChartLegend = ({ data, labels, type }) => {
6792
6833
  ] }, i);
6793
6834
  }) });
6794
6835
  }
6795
- return /* @__PURE__ */ jsx305("div", { className: "chart-legend", children: entries.map(([key], di) => {
6836
+ return /* @__PURE__ */ jsx306("div", { className: "chart-legend", children: entries.map(([key], di) => {
6796
6837
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
6797
6838
  const color = palette[2];
6798
6839
  const values = entries[di][1];
6799
6840
  const sum = values.reduce((a, b) => a + b, 0);
6800
- return /* @__PURE__ */ jsxs195("div", { className: "chart-legend-item", children: [
6801
- /* @__PURE__ */ jsx305("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
6802
- /* @__PURE__ */ jsxs195("div", { className: "chart-legend-text", children: [
6803
- /* @__PURE__ */ jsx305("span", { className: "chart-legend-label", children: key }),
6804
- /* @__PURE__ */ jsx305("span", { className: "chart-legend-value", children: sum.toLocaleString() })
6841
+ return /* @__PURE__ */ jsxs196("div", { className: "chart-legend-item", children: [
6842
+ /* @__PURE__ */ jsx306("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
6843
+ /* @__PURE__ */ jsxs196("div", { className: "chart-legend-text", children: [
6844
+ /* @__PURE__ */ jsx306("span", { className: "chart-legend-label", children: key }),
6845
+ /* @__PURE__ */ jsx306("span", { className: "chart-legend-value", children: sum.toLocaleString() })
6805
6846
  ] })
6806
6847
  ] }, di);
6807
6848
  }) });
@@ -6815,14 +6856,14 @@ var Chart = React6.memo((props) => {
6815
6856
  const dataKey = React6.useMemo(() => JSON.stringify(labels), [labels]);
6816
6857
  const animate = useChartAnimation(containerRef, dataKey);
6817
6858
  const ready = width > 0 && height > 0;
6818
- return /* @__PURE__ */ jsxs195("div", { className: "lib-xplat-chart", ref: containerRef, children: [
6819
- ready && type === "line" && /* @__PURE__ */ jsx305(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6820
- ready && type === "curve" && /* @__PURE__ */ jsx305(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6821
- ready && type === "bar" && /* @__PURE__ */ jsx305(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6822
- ready && type === "pie" && /* @__PURE__ */ jsx305(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6823
- ready && type === "doughnut" && /* @__PURE__ */ jsx305(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
6824
- ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ jsx305(ChartLegend, { data: stableData, labels: stableLabels, type }),
6825
- tooltip.visible && tooltip.content && /* @__PURE__ */ jsx305(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
6859
+ return /* @__PURE__ */ jsxs196("div", { className: "lib-xplat-chart", ref: containerRef, children: [
6860
+ ready && type === "line" && /* @__PURE__ */ jsx306(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6861
+ ready && type === "curve" && /* @__PURE__ */ jsx306(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6862
+ ready && type === "bar" && /* @__PURE__ */ jsx306(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6863
+ ready && type === "pie" && /* @__PURE__ */ jsx306(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
6864
+ ready && type === "doughnut" && /* @__PURE__ */ jsx306(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
6865
+ ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ jsx306(ChartLegend, { data: stableData, labels: stableLabels, type }),
6866
+ tooltip.visible && tooltip.content && /* @__PURE__ */ jsx306(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
6826
6867
  ] });
6827
6868
  });
6828
6869
  Chart.displayName = "Chart";
@@ -6832,7 +6873,7 @@ var Chart_default = Chart;
6832
6873
  import React7 from "react";
6833
6874
 
6834
6875
  // src/components/IconButton/IconButton.tsx
6835
- import { jsx as jsx306 } from "react/jsx-runtime";
6876
+ import { jsx as jsx307 } from "react/jsx-runtime";
6836
6877
  var IconButton = (props) => {
6837
6878
  const {
6838
6879
  icon,
@@ -6841,7 +6882,7 @@ var IconButton = (props) => {
6841
6882
  disabled,
6842
6883
  ...rest
6843
6884
  } = props;
6844
- return /* @__PURE__ */ jsx306(
6885
+ return /* @__PURE__ */ jsx307(
6845
6886
  "button",
6846
6887
  {
6847
6888
  className: clsx_default("lib-xplat-icon-button", type, size),
@@ -6855,7 +6896,7 @@ IconButton.displayName = "IconButton";
6855
6896
  var IconButton_default = IconButton;
6856
6897
 
6857
6898
  // src/components/ChatInput/ChatInput.tsx
6858
- import { jsx as jsx307, jsxs as jsxs196 } from "react/jsx-runtime";
6899
+ import { jsx as jsx308, jsxs as jsxs197 } from "react/jsx-runtime";
6859
6900
  var ChatInput = React7.forwardRef(
6860
6901
  (props, ref) => {
6861
6902
  const {
@@ -6864,7 +6905,8 @@ var ChatInput = React7.forwardRef(
6864
6905
  disabled = false,
6865
6906
  buttonType = "primary",
6866
6907
  onSubmit,
6867
- onChange
6908
+ onChange,
6909
+ validations
6868
6910
  } = props;
6869
6911
  const isControlled = valueProp !== void 0;
6870
6912
  const [internalValue, setInternalValue] = React7.useState("");
@@ -6886,8 +6928,8 @@ var ChatInput = React7.forwardRef(
6886
6928
  handleSubmit();
6887
6929
  }
6888
6930
  };
6889
- return /* @__PURE__ */ jsxs196("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
6890
- /* @__PURE__ */ jsx307(
6931
+ const control = /* @__PURE__ */ jsxs197("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
6932
+ /* @__PURE__ */ jsx308(
6891
6933
  AutoResizeTextArea_default,
6892
6934
  {
6893
6935
  ref,
@@ -6898,13 +6940,14 @@ var ChatInput = React7.forwardRef(
6898
6940
  disabled,
6899
6941
  rows: 1,
6900
6942
  onChange: handleChange,
6943
+ "aria-invalid": hasError(validations) || void 0,
6901
6944
  onKeyDown: handleKeyDown
6902
6945
  }
6903
6946
  ),
6904
- /* @__PURE__ */ jsx307(
6947
+ /* @__PURE__ */ jsx308(
6905
6948
  IconButton_default,
6906
6949
  {
6907
- icon: /* @__PURE__ */ jsx307(MessageSquareIcon_default, {}),
6950
+ icon: /* @__PURE__ */ jsx308(MessageSquareIcon_default, {}),
6908
6951
  type: buttonType,
6909
6952
  size: "sm",
6910
6953
  disabled: !hasText || disabled,
@@ -6913,6 +6956,7 @@ var ChatInput = React7.forwardRef(
6913
6956
  }
6914
6957
  )
6915
6958
  ] });
6959
+ return /* @__PURE__ */ jsx308(Field, { validations, children: control });
6916
6960
  }
6917
6961
  );
6918
6962
  ChatInput.displayName = "ChatInput";
@@ -6938,7 +6982,7 @@ import { semantic } from "@x-plat/tokens-core";
6938
6982
  import { cssVar } from "@x-plat/tokens-core";
6939
6983
 
6940
6984
  // src/components/CheckBox/CheckBox.tsx
6941
- import { jsx as jsx308, jsxs as jsxs197 } from "react/jsx-runtime";
6985
+ import { jsx as jsx309, jsxs as jsxs198 } from "react/jsx-runtime";
6942
6986
  var CheckBox = (props) => {
6943
6987
  const {
6944
6988
  checked,
@@ -6948,6 +6992,7 @@ var CheckBox = (props) => {
6948
6992
  disabled,
6949
6993
  size = "md",
6950
6994
  type = "brand",
6995
+ validations,
6951
6996
  ...rest
6952
6997
  } = props;
6953
6998
  const handleChange = (e) => {
@@ -6957,33 +7002,35 @@ var CheckBox = (props) => {
6957
7002
  const checkedClasses = `checked`;
6958
7003
  const disabledClasses = "disabled";
6959
7004
  const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
6960
- return /* @__PURE__ */ jsxs197("label", { className: clsx_default("lib-xplat-checkbox", size, type, className), children: [
6961
- /* @__PURE__ */ jsx308(
7005
+ const control = /* @__PURE__ */ jsxs198("label", { className: clsx_default("lib-xplat-checkbox", size, type, className), children: [
7006
+ /* @__PURE__ */ jsx309(
6962
7007
  "input",
6963
7008
  {
6964
7009
  type: "checkbox",
6965
7010
  checked,
6966
7011
  onChange: handleChange,
6967
7012
  disabled,
7013
+ "aria-invalid": hasError(validations) || void 0,
6968
7014
  ...rest
6969
7015
  }
6970
7016
  ),
6971
- /* @__PURE__ */ jsx308("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ jsx308("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ jsx308(CheckIcon_default, {}) }) }),
6972
- label && /* @__PURE__ */ jsx308("span", { className: "label", children: label })
7017
+ /* @__PURE__ */ jsx309("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ jsx309("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ jsx309(CheckIcon_default, {}) }) }),
7018
+ label && /* @__PURE__ */ jsx309("span", { className: "label", children: label })
6973
7019
  ] });
7020
+ return /* @__PURE__ */ jsx309(Field, { validations, children: control });
6974
7021
  };
6975
7022
  CheckBox.displayName = "CheckBox";
6976
7023
  var CheckBox_default = CheckBox;
6977
7024
 
6978
7025
  // src/components/Chip/Chip.tsx
6979
- import { jsx as jsx309 } from "react/jsx-runtime";
7026
+ import { jsx as jsx310 } from "react/jsx-runtime";
6980
7027
  var Chip = (props) => {
6981
7028
  const {
6982
7029
  children,
6983
7030
  type = "primary",
6984
7031
  size = "md"
6985
7032
  } = props;
6986
- return /* @__PURE__ */ jsx309("div", { className: clsx_default("lib-xplat-chip", type, size), children });
7033
+ return /* @__PURE__ */ jsx310("div", { className: clsx_default("lib-xplat-chip", type, size), children });
6987
7034
  };
6988
7035
  Chip.displayName = "Chip";
6989
7036
  var Chip_default = Chip;
@@ -6994,23 +7041,6 @@ import React12 from "react";
6994
7041
  // src/components/Input/Input.tsx
6995
7042
  import React8 from "react";
6996
7043
 
6997
- // src/components/Input/InputValidations.tsx
6998
- import { jsx as jsx310, jsxs as jsxs198 } from "react/jsx-runtime";
6999
- var InputValidations = (props) => {
7000
- const { message, status = "default" } = props;
7001
- return /* @__PURE__ */ jsxs198("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
7002
- /* @__PURE__ */ jsxs198("div", { className: "icon", children: [
7003
- status === "default" && /* @__PURE__ */ jsx310(InfoIcon_default, {}),
7004
- status === "success" && /* @__PURE__ */ jsx310(SuccessIcon_default, {}),
7005
- status === "warning" && /* @__PURE__ */ jsx310(InfoIcon_default, {}),
7006
- status === "error" && /* @__PURE__ */ jsx310(ErrorIcon_default, {})
7007
- ] }),
7008
- /* @__PURE__ */ jsx310("div", { className: "message", children: message })
7009
- ] });
7010
- };
7011
- InputValidations.displayName = "InputValidations";
7012
- var InputValidations_default = InputValidations;
7013
-
7014
7044
  // src/components/Input/reg.ts
7015
7045
  var numberAndCommaReg = /^[0-9,]+$/;
7016
7046
  var phoneNumberMaxLengthReg = /^.{0,13}$/;
@@ -7047,7 +7077,6 @@ var handleTelBackspace = (prevValue, currValue) => {
7047
7077
 
7048
7078
  // src/components/Input/Input.tsx
7049
7079
  import { jsx as jsx311, jsxs as jsxs199 } from "react/jsx-runtime";
7050
- import { createElement } from "react";
7051
7080
  var formatValue = (type, value) => {
7052
7081
  if (value === null || value === void 0) return "";
7053
7082
  const strValue = Array.isArray(value) ? String(value[0] ?? "") : String(value);
@@ -7136,20 +7165,15 @@ var Input = React8.forwardRef((props, ref) => {
7136
7165
  disabled,
7137
7166
  type: type === "number" ? "text" : type,
7138
7167
  value: localValue,
7139
- onChange: handleChange
7168
+ onChange: handleChange,
7169
+ "aria-invalid": hasError(validations) || void 0
7140
7170
  }
7141
7171
  ),
7142
7172
  suffix && /* @__PURE__ */ jsx311("div", { className: "suffix", children: suffix })
7143
7173
  ]
7144
7174
  }
7145
7175
  ),
7146
- validations && /* @__PURE__ */ jsx311("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ createElement(
7147
- InputValidations_default,
7148
- {
7149
- ...validation,
7150
- key: `${validation.message}_${idx}`
7151
- }
7152
- )) })
7176
+ /* @__PURE__ */ jsx311(FieldMessage_default, { validations })
7153
7177
  ] });
7154
7178
  });
7155
7179
  Input.displayName = "Input";
@@ -7233,7 +7257,7 @@ var Modal_default = Modal;
7233
7257
 
7234
7258
  // src/components/DatePicker/SingleDatePicker/index.tsx
7235
7259
  import React11 from "react";
7236
- import { Fragment as Fragment3, jsx as jsx314, jsxs as jsxs200 } from "react/jsx-runtime";
7260
+ import { Fragment as Fragment4, jsx as jsx314, jsxs as jsxs200 } from "react/jsx-runtime";
7237
7261
  var DayCell2 = React11.memo(
7238
7262
  ({
7239
7263
  day,
@@ -7376,7 +7400,7 @@ var SingleDatePicker = (props) => {
7376
7400
  },
7377
7401
  i
7378
7402
  )) }),
7379
- pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment3, { children: [
7403
+ pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment4, { children: [
7380
7404
  /* @__PURE__ */ jsx314("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx314(
7381
7405
  "div",
7382
7406
  {
@@ -8665,7 +8689,8 @@ var FileUpload = (props) => {
8665
8689
  maxSize,
8666
8690
  onChange,
8667
8691
  label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
8668
- description
8692
+ description,
8693
+ validations
8669
8694
  } = props;
8670
8695
  const [isDragOver, setIsDragOver] = React22.useState(false);
8671
8696
  const inputRef = React22.useRef(null);
@@ -8698,7 +8723,7 @@ var FileUpload = (props) => {
8698
8723
  handleFiles(e.target.files);
8699
8724
  }
8700
8725
  };
8701
- return /* @__PURE__ */ jsxs209(
8726
+ const control = /* @__PURE__ */ jsxs209(
8702
8727
  "div",
8703
8728
  {
8704
8729
  className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
@@ -8714,7 +8739,8 @@ var FileUpload = (props) => {
8714
8739
  type: "file",
8715
8740
  accept,
8716
8741
  multiple,
8717
- onChange: handleChange
8742
+ onChange: handleChange,
8743
+ "aria-invalid": hasError(validations) || void 0
8718
8744
  }
8719
8745
  ),
8720
8746
  /* @__PURE__ */ jsx325("div", { className: "upload-icon", children: /* @__PURE__ */ jsx325(UploadIcon_default, {}) }),
@@ -8723,6 +8749,7 @@ var FileUpload = (props) => {
8723
8749
  ]
8724
8750
  }
8725
8751
  );
8752
+ return /* @__PURE__ */ jsx325(Field, { validations, children: control });
8726
8753
  };
8727
8754
  FileUpload.displayName = "FileUpload";
8728
8755
  var FileUpload_default = FileUpload;
@@ -8865,7 +8892,7 @@ var HtmlTypeWriter_default = HtmlTypeWriter;
8865
8892
  import React25 from "react";
8866
8893
  import { jsx as jsx327, jsxs as jsxs210 } from "react/jsx-runtime";
8867
8894
  var ImageSelector = (props) => {
8868
- const { value, label, onChange } = props;
8895
+ const { value, label, onChange, validations } = props;
8869
8896
  const [previewUrl, setPreviewUrl] = React25.useState();
8870
8897
  React25.useEffect(() => {
8871
8898
  if (!value) {
@@ -8889,7 +8916,7 @@ var ImageSelector = (props) => {
8889
8916
  const handleOpenFileDialog = () => {
8890
8917
  inputRef.current?.click();
8891
8918
  };
8892
- return /* @__PURE__ */ jsxs210("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
8919
+ const control = /* @__PURE__ */ jsxs210("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
8893
8920
  /* @__PURE__ */ jsx327(
8894
8921
  "input",
8895
8922
  {
@@ -8897,7 +8924,8 @@ var ImageSelector = (props) => {
8897
8924
  accept: "image/*",
8898
8925
  id: "image-input",
8899
8926
  onChange: handleFileChange,
8900
- ref: inputRef
8927
+ ref: inputRef,
8928
+ "aria-invalid": hasError(validations) || void 0
8901
8929
  }
8902
8930
  ),
8903
8931
  value && /* @__PURE__ */ jsxs210("div", { className: "action-bar", children: [
@@ -8909,6 +8937,7 @@ var ImageSelector = (props) => {
8909
8937
  /* @__PURE__ */ jsx327("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
8910
8938
  ] }) })
8911
8939
  ] });
8940
+ return /* @__PURE__ */ jsx327(Field, { validations, children: control });
8912
8941
  };
8913
8942
  ImageSelector.displayName = "ImageSelector";
8914
8943
  var ImageSelector_default = ImageSelector;
@@ -9167,6 +9196,7 @@ var Radio = (props) => {
9167
9196
  value,
9168
9197
  size: sizeProp,
9169
9198
  type = "brand",
9199
+ validations,
9170
9200
  ...rest
9171
9201
  } = props;
9172
9202
  const context = useRadioGroupContext();
@@ -9178,7 +9208,7 @@ var Radio = (props) => {
9178
9208
  value,
9179
9209
  onChange: rest.onChange
9180
9210
  };
9181
- return /* @__PURE__ */ jsxs215(
9211
+ const control = /* @__PURE__ */ jsxs215(
9182
9212
  "label",
9183
9213
  {
9184
9214
  className: clsx_default(
@@ -9189,7 +9219,16 @@ var Radio = (props) => {
9189
9219
  className
9190
9220
  ),
9191
9221
  children: [
9192
- /* @__PURE__ */ jsx334("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
9222
+ /* @__PURE__ */ jsx334(
9223
+ "input",
9224
+ {
9225
+ ...rest,
9226
+ ...inputProps,
9227
+ checked: localChecked,
9228
+ type: "radio",
9229
+ "aria-invalid": hasError(validations) || void 0
9230
+ }
9231
+ ),
9193
9232
  /* @__PURE__ */ jsx334(
9194
9233
  "div",
9195
9234
  {
@@ -9204,15 +9243,16 @@ var Radio = (props) => {
9204
9243
  ]
9205
9244
  }
9206
9245
  );
9246
+ return /* @__PURE__ */ jsx334(Field, { validations, children: control });
9207
9247
  };
9208
9248
  Radio.displayName = "Radio";
9209
9249
  var Radio_default = Radio;
9210
9250
 
9211
9251
  // src/components/Radio/RadioGroup.tsx
9212
- import { Fragment as Fragment4, jsx as jsx335 } from "react/jsx-runtime";
9252
+ import { Fragment as Fragment5, jsx as jsx335 } from "react/jsx-runtime";
9213
9253
  var RadioGroup = (props) => {
9214
9254
  const { children, ...rest } = props;
9215
- return /* @__PURE__ */ jsx335(Fragment4, { children: /* @__PURE__ */ jsx335(RadioGroupContext_default.Provider, { value: rest, children }) });
9255
+ return /* @__PURE__ */ jsx335(Fragment5, { children: /* @__PURE__ */ jsx335(RadioGroupContext_default.Provider, { value: rest, children }) });
9216
9256
  };
9217
9257
  RadioGroup.displayName = "RadioGroup";
9218
9258
  var RadioGroup_default = RadioGroup;
@@ -9271,6 +9311,7 @@ var SelectRoot = (props) => {
9271
9311
  children,
9272
9312
  disabled = false,
9273
9313
  error = false,
9314
+ validations,
9274
9315
  size = "md"
9275
9316
  } = props;
9276
9317
  const itemChildren = React30.Children.toArray(children).filter(
@@ -9341,14 +9382,14 @@ var SelectRoot = (props) => {
9341
9382
  if (disabled) return;
9342
9383
  toggle();
9343
9384
  };
9344
- return /* @__PURE__ */ jsx337(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs216(
9385
+ const control = /* @__PURE__ */ jsx337(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs216(
9345
9386
  "div",
9346
9387
  {
9347
9388
  className: clsx_default(
9348
9389
  "lib-xplat-select",
9349
9390
  size,
9350
9391
  disabled && "disabled",
9351
- error && "error",
9392
+ (error || hasError(validations)) && "error",
9352
9393
  mounted && "is-open"
9353
9394
  ),
9354
9395
  children: [
@@ -9359,14 +9400,14 @@ var SelectRoot = (props) => {
9359
9400
  className: clsx_default(
9360
9401
  "select-trigger",
9361
9402
  disabled && "disabled",
9362
- error && "error"
9403
+ (error || hasError(validations)) && "error"
9363
9404
  ),
9364
9405
  onClick: handleTriggerClick,
9365
9406
  role: "combobox",
9366
9407
  "aria-expanded": isOpen,
9367
9408
  "aria-haspopup": "listbox",
9368
9409
  "aria-disabled": disabled,
9369
- "aria-invalid": error,
9410
+ "aria-invalid": error || hasError(validations) || void 0,
9370
9411
  tabIndex: disabled ? -1 : 0,
9371
9412
  onKeyDown: (e) => {
9372
9413
  if (disabled) return;
@@ -9410,6 +9451,7 @@ var SelectRoot = (props) => {
9410
9451
  ]
9411
9452
  }
9412
9453
  ) });
9454
+ return /* @__PURE__ */ jsx337(Field, { validations, children: control });
9413
9455
  };
9414
9456
  SelectRoot.displayName = "Select";
9415
9457
  var Select = Object.assign(SelectRoot, {
@@ -9823,7 +9865,8 @@ var Switch = (props) => {
9823
9865
  size = "md",
9824
9866
  type = "brand",
9825
9867
  disabled,
9826
- onChange
9868
+ onChange,
9869
+ validations
9827
9870
  } = props;
9828
9871
  const [isAnimating, setIsAnimating] = React32.useState(false);
9829
9872
  const timeoutRef = React32.useRef(null);
@@ -9842,7 +9885,7 @@ var Switch = (props) => {
9842
9885
  timeoutRef.current = null;
9843
9886
  }, KNOB_TRANSITION_MS);
9844
9887
  };
9845
- return /* @__PURE__ */ jsx342(
9888
+ const control = /* @__PURE__ */ jsx342(
9846
9889
  "div",
9847
9890
  {
9848
9891
  className: clsx_default(
@@ -9854,10 +9897,12 @@ var Switch = (props) => {
9854
9897
  isAnimating && "animating"
9855
9898
  ),
9856
9899
  onClick: handleClick,
9900
+ "aria-invalid": hasError(validations) || void 0,
9857
9901
  "aria-disabled": disabled || isAnimating,
9858
9902
  children: /* @__PURE__ */ jsx342("div", { className: clsx_default("knob", value ? "checked" : void 0) })
9859
9903
  }
9860
9904
  );
9905
+ return /* @__PURE__ */ jsx342(Field, { validations, children: control });
9861
9906
  };
9862
9907
  Switch.displayName = "Switch";
9863
9908
  var Switch_default = Switch;
@@ -10097,22 +10142,25 @@ var TextArea = React38.forwardRef(
10097
10142
  const {
10098
10143
  className,
10099
10144
  size = "md",
10145
+ validations,
10100
10146
  resize = "vertical",
10101
10147
  rows = 3,
10102
10148
  disabled,
10103
10149
  ...textareaProps
10104
10150
  } = props;
10105
- return /* @__PURE__ */ jsx349("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ jsx349(
10151
+ const control = /* @__PURE__ */ jsx349("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ jsx349(
10106
10152
  "textarea",
10107
10153
  {
10108
10154
  ...textareaProps,
10109
10155
  ref,
10110
10156
  rows,
10111
10157
  disabled,
10158
+ "aria-invalid": hasError(validations) || void 0,
10112
10159
  className: clsx_default("lib-xplat-textarea", size, disabled && "disabled"),
10113
10160
  style: { resize }
10114
10161
  }
10115
10162
  ) });
10163
+ return /* @__PURE__ */ jsx349(Field, { validations, children: control });
10116
10164
  }
10117
10165
  );
10118
10166
  TextArea.displayName = "TextArea";
@@ -10211,7 +10259,7 @@ ToastProvider.displayName = "ToastProvider";
10211
10259
 
10212
10260
  // src/components/Tooltip/Tooltip.tsx
10213
10261
  import React40 from "react";
10214
- import { Fragment as Fragment5, jsx as jsx351, jsxs as jsxs222 } from "react/jsx-runtime";
10262
+ import { Fragment as Fragment6, jsx as jsx351, jsxs as jsxs222 } from "react/jsx-runtime";
10215
10263
  var OFFSET = 12;
10216
10264
  var GAP = 8;
10217
10265
  var SHOW_DELAY = 300;
@@ -10314,7 +10362,7 @@ var Tooltip = (props) => {
10314
10362
  window.clearTimeout(delayTimer.current);
10315
10363
  cancelAnimationFrame(rafRef.current);
10316
10364
  }, []);
10317
- if (!title && !description) return /* @__PURE__ */ jsx351(Fragment5, { children });
10365
+ if (!title && !description) return /* @__PURE__ */ jsx351(Fragment6, { children });
10318
10366
  return /* @__PURE__ */ jsxs222(
10319
10367
  "div",
10320
10368
  {
@@ -10788,11 +10836,11 @@ Header.displayName = "Header";
10788
10836
  var Header_default = Header;
10789
10837
 
10790
10838
  // src/layout/Layout/Layout.tsx
10791
- import { Fragment as Fragment6, jsx as jsx357, jsxs as jsxs225 } from "react/jsx-runtime";
10839
+ import { Fragment as Fragment7, jsx as jsx357, jsxs as jsxs225 } from "react/jsx-runtime";
10792
10840
  var Layout = (props) => {
10793
10841
  const { header, sideBar, children } = props;
10794
10842
  return /* @__PURE__ */ jsx357("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs225("div", { className: "lib-xplat-layout-content-wrapper", children: [
10795
- sideBar && /* @__PURE__ */ jsx357(Fragment6, { children: sideBar }),
10843
+ sideBar && /* @__PURE__ */ jsx357(Fragment7, { children: sideBar }),
10796
10844
  /* @__PURE__ */ jsxs225("div", { className: "lib-xplat-layout-content", children: [
10797
10845
  header && /* @__PURE__ */ jsx357("div", { className: "lib-xplat-layout-conent-header", children: header }),
10798
10846
  children
@@ -10979,6 +11027,8 @@ export {
10979
11027
  FacebookIcon_default as FacebookIcon,
10980
11028
  FastForwardIcon_default as FastForwardIcon,
10981
11029
  FeatherIcon_default as FeatherIcon,
11030
+ Field,
11031
+ FieldMessage_default as FieldMessage,
10982
11032
  FigmaIcon_default as FigmaIcon,
10983
11033
  FileIcon_default as FileIcon,
10984
11034
  FileMinusIcon_default as FileMinusIcon,
@@ -11207,6 +11257,7 @@ export {
11207
11257
  breakpoints,
11208
11258
  cssVar,
11209
11259
  gridColumns,
11260
+ hasError,
11210
11261
  isInRange,
11211
11262
  isSameDay,
11212
11263
  semantic,