@x-plat/design-system 0.12.0 → 0.14.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/{breakpoints-DsXkJgdl.d.cts → breakpoints-CKkNxA-y.d.cts} +1 -1
  2. package/dist/{breakpoints-DsXkJgdl.d.ts → breakpoints-CKkNxA-y.d.ts} +1 -1
  3. package/dist/components/AutoResizeTextArea/index.cjs +2 -2
  4. package/dist/components/AutoResizeTextArea/index.js +2 -2
  5. package/dist/components/Badge/index.d.cts +1 -1
  6. package/dist/components/Badge/index.d.ts +1 -1
  7. package/dist/components/ChatInput/index.cjs +2 -2
  8. package/dist/components/ChatInput/index.js +2 -2
  9. package/dist/components/CheckBox/index.cjs +2 -2
  10. package/dist/components/CheckBox/index.js +2 -2
  11. package/dist/components/DatePicker/index.cjs +109 -75
  12. package/dist/components/DatePicker/index.d.cts +19 -0
  13. package/dist/components/DatePicker/index.d.ts +19 -0
  14. package/dist/components/DatePicker/index.js +109 -75
  15. package/dist/components/Editor/index.css +3 -0
  16. package/dist/components/FieldMessage/index.cjs +2 -2
  17. package/dist/components/FieldMessage/index.d.cts +8 -0
  18. package/dist/components/FieldMessage/index.d.ts +8 -0
  19. package/dist/components/FieldMessage/index.js +2 -2
  20. package/dist/components/FileUpload/index.cjs +10 -6
  21. package/dist/components/FileUpload/index.d.cts +15 -2
  22. package/dist/components/FileUpload/index.d.ts +15 -2
  23. package/dist/components/FileUpload/index.js +10 -6
  24. package/dist/components/ImageSelector/index.cjs +7 -6
  25. package/dist/components/ImageSelector/index.d.cts +15 -2
  26. package/dist/components/ImageSelector/index.d.ts +15 -2
  27. package/dist/components/ImageSelector/index.js +7 -6
  28. package/dist/components/Input/index.cjs +2 -2
  29. package/dist/components/Input/index.d.cts +4 -0
  30. package/dist/components/Input/index.d.ts +4 -0
  31. package/dist/components/Input/index.js +2 -2
  32. package/dist/components/Radio/index.cjs +2 -2
  33. package/dist/components/Radio/index.js +2 -2
  34. package/dist/components/Select/index.cjs +2 -2
  35. package/dist/components/Select/index.d.cts +1 -2
  36. package/dist/components/Select/index.d.ts +1 -2
  37. package/dist/components/Select/index.js +2 -2
  38. package/dist/components/Switch/index.cjs +2 -2
  39. package/dist/components/Switch/index.js +2 -2
  40. package/dist/components/TextArea/index.cjs +2 -2
  41. package/dist/components/TextArea/index.js +2 -2
  42. package/dist/components/TimePicker/index.cjs +2 -2
  43. package/dist/components/TimePicker/index.js +2 -2
  44. package/dist/components/ToggleChip/index.cjs +69 -0
  45. package/dist/components/ToggleChip/index.css +102 -0
  46. package/dist/components/ToggleChip/index.d.cts +37 -0
  47. package/dist/components/ToggleChip/index.d.ts +37 -0
  48. package/dist/components/ToggleChip/index.js +42 -0
  49. package/dist/components/index.cjs +184 -119
  50. package/dist/components/index.css +40 -0
  51. package/dist/components/index.d.cts +2 -1
  52. package/dist/components/index.d.ts +2 -1
  53. package/dist/components/index.js +174 -110
  54. package/dist/index.cjs +203 -138
  55. package/dist/index.css +40 -0
  56. package/dist/index.d.cts +4 -3
  57. package/dist/index.d.ts +4 -3
  58. package/dist/index.js +191 -127
  59. package/dist/layout/Grid/Item/index.d.cts +1 -1
  60. package/dist/layout/Grid/Item/index.d.ts +1 -1
  61. package/dist/layout/Grid/index.d.cts +1 -1
  62. package/dist/layout/Grid/index.d.ts +1 -1
  63. package/dist/layout/index.d.cts +1 -1
  64. package/dist/layout/index.d.ts +1 -1
  65. package/dist/tokens/index.d.cts +1 -1
  66. package/dist/tokens/index.d.ts +1 -1
  67. package/guidelines/Guidelines.md +13 -1
  68. package/guidelines/MIGRATION.md +297 -0
  69. package/guidelines/components/chip-tag.md +75 -2
  70. package/guidelines/components/datepicker.md +26 -0
  71. package/guidelines/components/file-media.md +21 -4
  72. package/package.json +1 -1
@@ -32,4 +32,4 @@ type GridColumnConfig = {
32
32
  [K in BreakpointKey]?: GridSpanFor<K>;
33
33
  };
34
34
 
35
- export { BREAKPOINT_KEYS_ORDERED as B, type GridSpanFor as G, type BreakpointKey as a, type GridColumnConfig as b, breakpoints as c, gridColumns as g };
35
+ export { BREAKPOINT_KEYS_ORDERED as B, type GridColumnConfig as G, type BreakpointKey as a, type GridSpanFor as b, breakpoints as c, gridColumns as g };
@@ -32,4 +32,4 @@ type GridColumnConfig = {
32
32
  [K in BreakpointKey]?: GridSpanFor<K>;
33
33
  };
34
34
 
35
- export { BREAKPOINT_KEYS_ORDERED as B, type GridSpanFor as G, type BreakpointKey as a, type GridColumnConfig as b, breakpoints as c, gridColumns as g };
35
+ export { BREAKPOINT_KEYS_ORDERED as B, type GridColumnConfig as G, type BreakpointKey as a, type GridSpanFor as b, breakpoints as c, gridColumns as g };
@@ -176,11 +176,11 @@ var FieldMessage = (props) => {
176
176
  };
177
177
  FieldMessage.displayName = "FieldMessage";
178
178
  var Field = (props) => {
179
- const { label, required = false, htmlFor, validations, children } = props;
179
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
180
180
  const hasMessages = !!validations && validations.length > 0;
181
181
  if (!label && !hasMessages) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children });
182
182
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "lib-xplat-field", children: [
183
- label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: "lib-xplat-field-label", htmlFor, children: [
183
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
184
184
  label,
185
185
  required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "required", "aria-hidden": "true", children: "*" })
186
186
  ] }),
@@ -140,11 +140,11 @@ var FieldMessage = (props) => {
140
140
  };
141
141
  FieldMessage.displayName = "FieldMessage";
142
142
  var Field = (props) => {
143
- const { label, required = false, htmlFor, validations, children } = props;
143
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
144
144
  const hasMessages = !!validations && validations.length > 0;
145
145
  if (!label && !hasMessages) return /* @__PURE__ */ jsx4(Fragment, { children });
146
146
  return /* @__PURE__ */ jsxs3("div", { className: "lib-xplat-field", children: [
147
- label && /* @__PURE__ */ jsxs3("label", { className: "lib-xplat-field-label", htmlFor, children: [
147
+ label && /* @__PURE__ */ jsxs3("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
148
148
  label,
149
149
  required && /* @__PURE__ */ jsx4("span", { className: "required", "aria-hidden": "true", children: "*" })
150
150
  ] }),
@@ -1,4 +1,4 @@
1
- export { NotificationBadge as Badge, NotificationBadge, NotificationBadge as default } from '../NotificationBadge/index.cjs';
1
+ export { Badge, Badge as NotificationBadge, Badge as default } from '../NotificationBadge/index.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import '../../status-njWqQWFV.cjs';
@@ -1,4 +1,4 @@
1
- export { NotificationBadge as Badge, NotificationBadge, NotificationBadge as default } from '../NotificationBadge/index.js';
1
+ export { Badge, Badge as NotificationBadge, Badge as default } from '../NotificationBadge/index.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import '../../status-njWqQWFV.js';
@@ -235,11 +235,11 @@ var FieldMessage = (props) => {
235
235
  };
236
236
  FieldMessage.displayName = "FieldMessage";
237
237
  var Field = (props) => {
238
- const { label, required = false, htmlFor, validations, children } = props;
238
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
239
239
  const hasMessages = !!validations && validations.length > 0;
240
240
  if (!label && !hasMessages) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children });
241
241
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "lib-xplat-field", children: [
242
- label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "lib-xplat-field-label", htmlFor, children: [
242
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
243
243
  label,
244
244
  required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "required", "aria-hidden": "true", children: "*" })
245
245
  ] }),
@@ -199,11 +199,11 @@ var FieldMessage = (props) => {
199
199
  };
200
200
  FieldMessage.displayName = "FieldMessage";
201
201
  var Field = (props) => {
202
- const { label, required = false, htmlFor, validations, children } = props;
202
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
203
203
  const hasMessages = !!validations && validations.length > 0;
204
204
  if (!label && !hasMessages) return /* @__PURE__ */ jsx12(Fragment, { children });
205
205
  return /* @__PURE__ */ jsxs6("div", { className: "lib-xplat-field", children: [
206
- label && /* @__PURE__ */ jsxs6("label", { className: "lib-xplat-field-label", htmlFor, children: [
206
+ label && /* @__PURE__ */ jsxs6("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
207
207
  label,
208
208
  required && /* @__PURE__ */ jsx12("span", { className: "required", "aria-hidden": "true", children: "*" })
209
209
  ] }),
@@ -1063,11 +1063,11 @@ var FieldMessage = (props) => {
1063
1063
  };
1064
1064
  FieldMessage.displayName = "FieldMessage";
1065
1065
  var Field = (props) => {
1066
- const { label, required = false, htmlFor, validations, children } = props;
1066
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
1067
1067
  const hasMessages = !!validations && validations.length > 0;
1068
1068
  if (!label && !hasMessages) return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_jsx_runtime295.Fragment, { children });
1069
1069
  return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className: "lib-xplat-field", children: [
1070
- label && /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("label", { className: "lib-xplat-field-label", htmlFor, children: [
1070
+ label && /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
1071
1071
  label,
1072
1072
  required && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("span", { className: "required", "aria-hidden": "true", children: "*" })
1073
1073
  ] }),
@@ -1037,11 +1037,11 @@ var FieldMessage = (props) => {
1037
1037
  };
1038
1038
  FieldMessage.displayName = "FieldMessage";
1039
1039
  var Field = (props) => {
1040
- const { label, required = false, htmlFor, validations, children } = props;
1040
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
1041
1041
  const hasMessages = !!validations && validations.length > 0;
1042
1042
  if (!label && !hasMessages) return /* @__PURE__ */ jsx295(Fragment, { children });
1043
1043
  return /* @__PURE__ */ jsxs189("div", { className: "lib-xplat-field", children: [
1044
- label && /* @__PURE__ */ jsxs189("label", { className: "lib-xplat-field-label", htmlFor, children: [
1044
+ label && /* @__PURE__ */ jsxs189("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
1045
1045
  label,
1046
1046
  required && /* @__PURE__ */ jsx295("span", { className: "required", "aria-hidden": "true", children: "*" })
1047
1047
  ] }),
@@ -206,11 +206,11 @@ var FieldMessage = (props) => {
206
206
  FieldMessage.displayName = "FieldMessage";
207
207
  var FieldMessage_default = FieldMessage;
208
208
  var Field = (props) => {
209
- const { label, required = false, htmlFor, validations, children } = props;
209
+ const { label, required = false, htmlFor, labelId, validations, children } = props;
210
210
  const hasMessages = !!validations && validations.length > 0;
211
211
  if (!label && !hasMessages) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children });
212
212
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "lib-xplat-field", children: [
213
- label && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "lib-xplat-field-label", htmlFor, children: [
213
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
214
214
  label,
215
215
  required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "required", "aria-hidden": "true", children: "*" })
216
216
  ] }),
@@ -1648,8 +1648,12 @@ var SingleDatePicker = (props) => {
1648
1648
  highlightDates = [],
1649
1649
  locale = "ko",
1650
1650
  rangeStart,
1651
- rangeEnd
1651
+ rangeEnd,
1652
+ label,
1653
+ required,
1654
+ validations
1652
1655
  } = props;
1656
+ const labelId = import_react6.default.useId();
1653
1657
  const initialYear = value?.getFullYear();
1654
1658
  const initialMonth = value?.getMonth();
1655
1659
  const { year, month, days, goToPrevMonth, goToNextMonth, setYear, setMonth } = useCalendar(
@@ -1712,10 +1716,12 @@ var SingleDatePicker = (props) => {
1712
1716
  const monthLabels = MONTH_LABELS[locale];
1713
1717
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
1714
1718
  const hasRange = rangeStart != null && rangeEnd != null;
1715
- return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
1719
+ const calendar = /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
1716
1720
  "div",
1717
1721
  {
1718
1722
  className: clsx_default("lib-xplat-datepicker", "single"),
1723
+ role: "group",
1724
+ "aria-labelledby": label ? labelId : void 0,
1719
1725
  children: [
1720
1726
  /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "datepicker-header", children: [
1721
1727
  /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(ChevronLeftIcon_default, {}) }),
@@ -1736,18 +1742,18 @@ var SingleDatePicker = (props) => {
1736
1742
  y
1737
1743
  );
1738
1744
  }) }),
1739
- pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
1745
+ pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label2, i) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
1740
1746
  "button",
1741
1747
  {
1742
1748
  type: "button",
1743
1749
  className: clsx_default("datepicker-picker-cell", i === month && "active"),
1744
1750
  onClick: () => handleMonthSelect(i),
1745
- children: label
1751
+ children: label2
1746
1752
  },
1747
1753
  i
1748
1754
  )) }),
1749
1755
  pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
1750
- /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
1756
+ /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label2, i) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
1751
1757
  "div",
1752
1758
  {
1753
1759
  className: clsx_default(
@@ -1755,9 +1761,9 @@ var SingleDatePicker = (props) => {
1755
1761
  i === 0 && "sunday",
1756
1762
  i === 6 && "saturday"
1757
1763
  ),
1758
- children: label
1764
+ children: label2
1759
1765
  },
1760
- label
1766
+ label2
1761
1767
  )) }),
1762
1768
  /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
1763
1769
  const t = day.date.getTime();
@@ -1789,6 +1795,7 @@ var SingleDatePicker = (props) => {
1789
1795
  ]
1790
1796
  }
1791
1797
  );
1798
+ return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(Field, { label, required, labelId, validations, children: calendar });
1792
1799
  };
1793
1800
  SingleDatePicker.displayName = "SingleDatePicker";
1794
1801
  var SingleDatePicker_default = SingleDatePicker;
@@ -1803,7 +1810,18 @@ var formatDate = (date) => {
1803
1810
  return `${y}/${m}/${d}`;
1804
1811
  };
1805
1812
  var InputDatePicker = (props) => {
1806
- const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
1813
+ const {
1814
+ value,
1815
+ onChange,
1816
+ minDate,
1817
+ maxDate,
1818
+ disabled,
1819
+ locale = "ko",
1820
+ placeholder,
1821
+ label,
1822
+ required,
1823
+ validations
1824
+ } = props;
1807
1825
  const [isOpen, setIsOpen] = import_react7.default.useState(false);
1808
1826
  const [tempDate, setTempDate] = import_react7.default.useState(value ?? /* @__PURE__ */ new Date());
1809
1827
  const handleOpen = () => {
@@ -1829,6 +1847,9 @@ var InputDatePicker = (props) => {
1829
1847
  placeholder,
1830
1848
  suffix: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CalenderIcon_default, {}),
1831
1849
  disabled,
1850
+ label,
1851
+ required,
1852
+ validations,
1832
1853
  readOnly: true
1833
1854
  }
1834
1855
  ) }),
@@ -1960,8 +1981,12 @@ var RangePicker = (props) => {
1960
1981
  onChange,
1961
1982
  minDate,
1962
1983
  maxDate,
1963
- locale = "ko"
1984
+ locale = "ko",
1985
+ label,
1986
+ required,
1987
+ validations
1964
1988
  } = props;
1989
+ const labelId = import_react10.default.useId();
1965
1990
  const [activeTab, setActiveTab] = import_react10.default.useState("start");
1966
1991
  const handleStartChange = (date) => {
1967
1992
  if (!date) return;
@@ -1975,70 +2000,79 @@ var RangePicker = (props) => {
1975
2000
  };
1976
2001
  const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
1977
2002
  const endMinDate = minDate && startDate > minDate ? startDate : startDate;
1978
- return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
1979
- /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
1980
- Tab_default,
1981
- {
1982
- activeIndex: activeTab === "start" ? 0 : 1,
1983
- tabs: [
1984
- { value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
1985
- { value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
1986
- ],
1987
- onChange: (tab) => setActiveTab(tab.value),
1988
- type: "toggle",
1989
- size: "sm"
1990
- }
1991
- ) }),
1992
- /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: "datepicker-range-panels", children: [
1993
- /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
1994
- SingleDatePicker_default,
1995
- {
1996
- value: startDate,
1997
- onChange: handleStartChange,
1998
- minDate,
1999
- maxDate: startMaxDate,
2000
- rangeStart: startDate,
2001
- rangeEnd: endDate,
2002
- locale
2003
- }
2004
- ),
2005
- /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2006
- SingleDatePicker_default,
2007
- {
2008
- value: endDate,
2009
- onChange: handleEndChange,
2010
- minDate: endMinDate,
2011
- maxDate,
2012
- rangeStart: startDate,
2013
- rangeEnd: endDate,
2014
- locale
2015
- }
2016
- )
2017
- ] }),
2018
- /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2019
- SingleDatePicker_default,
2020
- {
2021
- value: startDate,
2022
- onChange: handleStartChange,
2023
- minDate,
2024
- maxDate: startMaxDate,
2025
- rangeStart: startDate,
2026
- rangeEnd: endDate,
2027
- locale
2028
- }
2029
- ) : /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2030
- SingleDatePicker_default,
2031
- {
2032
- value: endDate,
2033
- onChange: handleEndChange,
2034
- minDate: endMinDate,
2035
- maxDate,
2036
- rangeStart: startDate,
2037
- rangeEnd: endDate,
2038
- locale
2039
- }
2040
- ) })
2041
- ] });
2003
+ const calendar = /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)(
2004
+ "div",
2005
+ {
2006
+ className: clsx_default("lib-xplat-datepicker", "range"),
2007
+ role: "group",
2008
+ "aria-labelledby": label ? labelId : void 0,
2009
+ children: [
2010
+ /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2011
+ Tab_default,
2012
+ {
2013
+ activeIndex: activeTab === "start" ? 0 : 1,
2014
+ tabs: [
2015
+ { value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
2016
+ { value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
2017
+ ],
2018
+ onChange: (tab) => setActiveTab(tab.value),
2019
+ type: "toggle",
2020
+ size: "sm"
2021
+ }
2022
+ ) }),
2023
+ /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: "datepicker-range-panels", children: [
2024
+ /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2025
+ SingleDatePicker_default,
2026
+ {
2027
+ value: startDate,
2028
+ onChange: handleStartChange,
2029
+ minDate,
2030
+ maxDate: startMaxDate,
2031
+ rangeStart: startDate,
2032
+ rangeEnd: endDate,
2033
+ locale
2034
+ }
2035
+ ),
2036
+ /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2037
+ SingleDatePicker_default,
2038
+ {
2039
+ value: endDate,
2040
+ onChange: handleEndChange,
2041
+ minDate: endMinDate,
2042
+ maxDate,
2043
+ rangeStart: startDate,
2044
+ rangeEnd: endDate,
2045
+ locale
2046
+ }
2047
+ )
2048
+ ] }),
2049
+ /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2050
+ SingleDatePicker_default,
2051
+ {
2052
+ value: startDate,
2053
+ onChange: handleStartChange,
2054
+ minDate,
2055
+ maxDate: startMaxDate,
2056
+ rangeStart: startDate,
2057
+ rangeEnd: endDate,
2058
+ locale
2059
+ }
2060
+ ) : /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
2061
+ SingleDatePicker_default,
2062
+ {
2063
+ value: endDate,
2064
+ onChange: handleEndChange,
2065
+ minDate: endMinDate,
2066
+ maxDate,
2067
+ rangeStart: startDate,
2068
+ rangeEnd: endDate,
2069
+ locale
2070
+ }
2071
+ ) })
2072
+ ]
2073
+ }
2074
+ );
2075
+ return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(Field, { label, required, labelId, validations, children: calendar });
2042
2076
  };
2043
2077
  RangePicker.displayName = "RangePicker";
2044
2078
  var RangePicker_default = RangePicker;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { V as Validation } from '../../validation-Dqo1zqhT.cjs';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
 
4
5
  interface InputDatePickerProps {
@@ -9,6 +10,12 @@ interface InputDatePickerProps {
9
10
  disabled?: boolean;
10
11
  locale?: "ko" | "en";
11
12
  placeholder?: string;
13
+ /** 컨트롤 위에 붙는 라벨. 클릭하면 입력칸에 포커스가 간다 */
14
+ label?: React.ReactNode;
15
+ /** 라벨 뒤에 필수 표시(*)를 붙인다 */
16
+ required?: boolean;
17
+ /** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
18
+ validations?: Validation[];
12
19
  }
13
20
  declare const InputDatePicker: React.FC<InputDatePickerProps>;
14
21
 
@@ -47,6 +54,12 @@ interface RangePickerProps {
47
54
  minDate?: Date;
48
55
  maxDate?: Date;
49
56
  locale?: "ko" | "en";
57
+ /** 달력 위에 붙는 라벨 */
58
+ label?: React.ReactNode;
59
+ /** 라벨 뒤에 필수 표시(*)를 붙인다 */
60
+ required?: boolean;
61
+ /** 달력 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
62
+ validations?: Validation[];
50
63
  }
51
64
  declare const RangePicker: {
52
65
  (props: RangePickerProps): react_jsx_runtime.JSX.Element;
@@ -62,6 +75,12 @@ interface SingleDatePickerProps {
62
75
  locale?: "ko" | "en";
63
76
  rangeStart?: Date | null;
64
77
  rangeEnd?: Date | null;
78
+ /** 달력 위에 붙는 라벨 */
79
+ label?: React.ReactNode;
80
+ /** 라벨 뒤에 필수 표시(*)를 붙인다 */
81
+ required?: boolean;
82
+ /** 달력 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
83
+ validations?: Validation[];
65
84
  }
66
85
  declare const SingleDatePicker: {
67
86
  (props: SingleDatePickerProps): react_jsx_runtime.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { V as Validation } from '../../validation-Dqo1zqhT.js';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
 
4
5
  interface InputDatePickerProps {
@@ -9,6 +10,12 @@ interface InputDatePickerProps {
9
10
  disabled?: boolean;
10
11
  locale?: "ko" | "en";
11
12
  placeholder?: string;
13
+ /** 컨트롤 위에 붙는 라벨. 클릭하면 입력칸에 포커스가 간다 */
14
+ label?: React.ReactNode;
15
+ /** 라벨 뒤에 필수 표시(*)를 붙인다 */
16
+ required?: boolean;
17
+ /** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
18
+ validations?: Validation[];
12
19
  }
13
20
  declare const InputDatePicker: React.FC<InputDatePickerProps>;
14
21
 
@@ -47,6 +54,12 @@ interface RangePickerProps {
47
54
  minDate?: Date;
48
55
  maxDate?: Date;
49
56
  locale?: "ko" | "en";
57
+ /** 달력 위에 붙는 라벨 */
58
+ label?: React.ReactNode;
59
+ /** 라벨 뒤에 필수 표시(*)를 붙인다 */
60
+ required?: boolean;
61
+ /** 달력 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
62
+ validations?: Validation[];
50
63
  }
51
64
  declare const RangePicker: {
52
65
  (props: RangePickerProps): react_jsx_runtime.JSX.Element;
@@ -62,6 +75,12 @@ interface SingleDatePickerProps {
62
75
  locale?: "ko" | "en";
63
76
  rangeStart?: Date | null;
64
77
  rangeEnd?: Date | null;
78
+ /** 달력 위에 붙는 라벨 */
79
+ label?: React.ReactNode;
80
+ /** 라벨 뒤에 필수 표시(*)를 붙인다 */
81
+ required?: boolean;
82
+ /** 달력 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
83
+ validations?: Validation[];
65
84
  }
66
85
  declare const SingleDatePicker: {
67
86
  (props: SingleDatePickerProps): react_jsx_runtime.JSX.Element;