@x-plat/design-system 0.19.0 → 0.21.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 (296) hide show
  1. package/dist/chunk-2EGVOUGV.cjs +93 -0
  2. package/dist/chunk-2T3BVV7R.js +0 -0
  3. package/dist/chunk-3FYYFDKQ.js +159 -0
  4. package/dist/chunk-3M3GFSHJ.js +67 -0
  5. package/dist/chunk-3WBHUFOA.cjs +48 -0
  6. package/dist/chunk-3XYYZQR5.cjs +22 -0
  7. package/dist/chunk-4EF7NVAL.js +67 -0
  8. package/dist/chunk-4ISERXK2.cjs +1 -0
  9. package/dist/chunk-4KYHHJ6Z.cjs +250 -0
  10. package/dist/chunk-4NSRDRXC.cjs +70 -0
  11. package/dist/chunk-4OXMRSVE.cjs +99 -0
  12. package/dist/chunk-55EPYLXN.js +30 -0
  13. package/dist/chunk-5CE3ADO5.js +254 -0
  14. package/dist/chunk-5F6Y2JD6.cjs +1 -0
  15. package/dist/chunk-5FMTMXSP.cjs +127 -0
  16. package/dist/chunk-5POCKDDY.js +36 -0
  17. package/dist/chunk-5VDI56BV.js +33 -0
  18. package/dist/chunk-5WLBUPSK.js +77 -0
  19. package/dist/chunk-5WNNWQHD.cjs +272 -0
  20. package/dist/chunk-66STZB6I.cjs +404 -0
  21. package/dist/chunk-6AIKCZN7.js +1455 -0
  22. package/dist/chunk-6IUJJUVP.js +18 -0
  23. package/dist/chunk-6P2B3ZGP.js +79 -0
  24. package/dist/chunk-764ILIDG.cjs +22 -0
  25. package/dist/chunk-7B44DWC4.js +0 -0
  26. package/dist/chunk-7BE6ETFY.js +18 -0
  27. package/dist/chunk-7BSUS5A4.js +97 -0
  28. package/dist/chunk-7RPWCDEW.cjs +20 -0
  29. package/dist/chunk-7ULXHGLO.cjs +77 -0
  30. package/dist/chunk-7YOI5XOW.js +55 -0
  31. package/dist/chunk-AFVTM5CP.js +0 -0
  32. package/dist/chunk-AN2WSL3B.cjs +1 -0
  33. package/dist/chunk-AT5Y5GLS.cjs +118 -0
  34. package/dist/chunk-AWPO2FI7.js +404 -0
  35. package/dist/chunk-BGXHIDUR.js +103 -0
  36. package/dist/chunk-BPZXL5TP.js +99 -0
  37. package/dist/chunk-BRTS5GWV.js +275 -0
  38. package/dist/chunk-BS3MLZCK.cjs +97 -0
  39. package/dist/chunk-BSPYYE2U.js +36 -0
  40. package/dist/chunk-BWJAEB42.js +48 -0
  41. package/dist/chunk-C4RMTISI.cjs +18 -0
  42. package/dist/chunk-C6M4XVR7.cjs +36 -0
  43. package/dist/chunk-CGC4D5MP.cjs +89 -0
  44. package/dist/chunk-CIRQYSQW.js +70 -0
  45. package/dist/chunk-CLOTWJNP.cjs +310 -0
  46. package/dist/chunk-CS7ZY35M.cjs +49 -0
  47. package/dist/chunk-CUV4RLDE.js +89 -0
  48. package/dist/chunk-CZAMLFSE.cjs +275 -0
  49. package/dist/chunk-D7QZLJ3Z.cjs +18 -0
  50. package/dist/chunk-DMSAAZ3M.cjs +92 -0
  51. package/dist/chunk-DUIZC7VJ.cjs +36 -0
  52. package/dist/chunk-DVBF4BDH.js +43 -0
  53. package/dist/chunk-EETYMP6K.cjs +584 -0
  54. package/dist/chunk-EFQL7JPX.js +0 -0
  55. package/dist/chunk-EFU7IAF5.cjs +12 -0
  56. package/dist/chunk-F3M2H5EX.cjs +79 -0
  57. package/dist/chunk-F436V2SX.cjs +254 -0
  58. package/dist/chunk-F664X2OY.js +250 -0
  59. package/dist/chunk-FF7ELUQW.cjs +1 -0
  60. package/dist/chunk-G3HE4S3Q.cjs +296 -0
  61. package/dist/chunk-GOPD5KUK.js +23 -0
  62. package/dist/chunk-GYTB24V6.cjs +107 -0
  63. package/dist/chunk-GZ657SGO.js +310 -0
  64. package/dist/chunk-H2QN65L6.cjs +1 -0
  65. package/dist/chunk-H6WUT7CK.js +22 -0
  66. package/dist/chunk-H76OQ75T.js +49 -0
  67. package/dist/chunk-HA3XONYI.js +18 -0
  68. package/dist/chunk-HF3UFXEU.js +296 -0
  69. package/dist/chunk-HGA47QVV.cjs +55 -0
  70. package/dist/chunk-HHPPAMXF.cjs +674 -0
  71. package/dist/chunk-HLV2XIE2.cjs +385 -0
  72. package/dist/chunk-HNQGIL45.cjs +96 -0
  73. package/dist/chunk-HQ37R7T3.js +53 -0
  74. package/dist/chunk-HXUGW4RR.js +187 -0
  75. package/dist/chunk-HYPRLWD3.js +272 -0
  76. package/dist/chunk-I7TLJUTP.cjs +6 -0
  77. package/dist/chunk-ICTWDTKC.cjs +1 -0
  78. package/dist/chunk-IPYKHDP4.cjs +187 -0
  79. package/dist/chunk-IRKREQ2X.cjs +18 -0
  80. package/dist/chunk-IVJJBMRY.js +92 -0
  81. package/dist/chunk-JPVIVOFG.js +26 -0
  82. package/dist/chunk-JYNBNSNF.js +151 -0
  83. package/dist/chunk-JZC3BXAC.js +93 -0
  84. package/dist/chunk-K5XPQWXN.cjs +92 -0
  85. package/dist/chunk-KQ3GOMHL.js +31 -0
  86. package/dist/chunk-KUJH72U6.cjs +159 -0
  87. package/dist/chunk-KVUXLC6M.cjs +479 -0
  88. package/dist/chunk-KZOJN57Q.js +19 -0
  89. package/dist/chunk-L3XPL4NP.cjs +53 -0
  90. package/dist/chunk-LOEMSXYB.js +0 -0
  91. package/dist/chunk-LU4KBPNG.cjs +23 -0
  92. package/dist/chunk-MWWWPQDB.js +26 -0
  93. package/dist/chunk-NCBB3WUJ.js +562 -0
  94. package/dist/chunk-NGCZTZST.cjs +562 -0
  95. package/dist/chunk-NSDKALIS.cjs +67 -0
  96. package/dist/chunk-NZHCRLNB.cjs +26 -0
  97. package/dist/chunk-OL4NANHB.js +0 -0
  98. package/dist/chunk-OTJRNKLR.js +96 -0
  99. package/dist/chunk-OWWFKTSK.js +0 -0
  100. package/dist/chunk-P2E3PB62.cjs +99 -0
  101. package/dist/chunk-P2QVFR7S.js +20 -0
  102. package/dist/chunk-P6ZGIYY7.cjs +18 -0
  103. package/dist/chunk-PFGSJJRY.cjs +19 -0
  104. package/dist/chunk-PNIUW7AJ.cjs +32 -0
  105. package/dist/chunk-Q2M2ONGO.js +70 -0
  106. package/dist/chunk-Q4PGP5KE.cjs +562 -0
  107. package/dist/chunk-QAI2YQPY.cjs +51 -0
  108. package/dist/chunk-QCD7UEZ3.cjs +59 -0
  109. package/dist/chunk-QEZ4R3SK.js +6 -0
  110. package/dist/chunk-QKDCPM2D.cjs +23 -0
  111. package/dist/chunk-QRGG3V7W.cjs +59 -0
  112. package/dist/chunk-QURIHUEC.js +107 -0
  113. package/dist/chunk-QY742LWN.js +30 -0
  114. package/dist/chunk-QYMRGYTN.js +127 -0
  115. package/dist/chunk-RLKJ2RZG.js +23 -0
  116. package/dist/chunk-RRR5BUOM.cjs +30 -0
  117. package/dist/chunk-RU3FCVXM.cjs +1 -0
  118. package/dist/chunk-RYTDVTV2.js +32 -0
  119. package/dist/chunk-RYYGUYDE.js +92 -0
  120. package/dist/chunk-SGLP4U3Y.cjs +67 -0
  121. package/dist/chunk-SJC543ZK.js +71 -0
  122. package/dist/chunk-SLYQK4SC.js +20 -0
  123. package/dist/chunk-SMLCOMLS.js +2888 -0
  124. package/dist/chunk-SNMOPLMH.cjs +372 -0
  125. package/dist/chunk-TRJUJYW7.cjs +151 -0
  126. package/dist/chunk-TTY5PE3P.js +30 -0
  127. package/dist/chunk-TXARYG3J.js +22 -0
  128. package/dist/chunk-TYXJU4EF.js +18 -0
  129. package/dist/chunk-U3PC7FYZ.cjs +26 -0
  130. package/dist/chunk-U67JM2WL.cjs +34 -0
  131. package/dist/chunk-UARGO5UG.js +59 -0
  132. package/dist/chunk-UCYE3H3F.cjs +43 -0
  133. package/dist/chunk-UGEGN35F.js +118 -0
  134. package/dist/chunk-UHUA3GQC.cjs +30 -0
  135. package/dist/chunk-UJQN477L.js +59 -0
  136. package/dist/chunk-UMX7DTFZ.cjs +70 -0
  137. package/dist/chunk-UT42P54P.js +372 -0
  138. package/dist/chunk-V76ZRGHQ.cjs +1 -0
  139. package/dist/chunk-VCIK366Y.cjs +1455 -0
  140. package/dist/chunk-VMA74ABT.cjs +137 -0
  141. package/dist/chunk-VSA62N2O.js +12 -0
  142. package/dist/chunk-WDAFLVQK.js +479 -0
  143. package/dist/chunk-WHMLMAMO.js +674 -0
  144. package/dist/chunk-WNBLKKLM.js +0 -0
  145. package/dist/chunk-WQ2GY7F3.js +46 -0
  146. package/dist/chunk-WRLCCK3M.cjs +30 -0
  147. package/dist/chunk-WVCZIOLY.js +562 -0
  148. package/dist/chunk-WZLGJQLW.js +385 -0
  149. package/dist/chunk-XB6FEBK6.js +34 -0
  150. package/dist/chunk-XMERDSRE.js +75 -0
  151. package/dist/chunk-XMLFKZYY.js +137 -0
  152. package/dist/chunk-XMM52J3T.js +584 -0
  153. package/dist/chunk-XZ7C5CGB.cjs +103 -0
  154. package/dist/chunk-YGFBAOKX.js +51 -0
  155. package/dist/chunk-YIN552MF.cjs +20 -0
  156. package/dist/chunk-YLC42E65.cjs +31 -0
  157. package/dist/chunk-YOTXRYJL.cjs +46 -0
  158. package/dist/chunk-ZAUGJZK7.js +99 -0
  159. package/dist/chunk-ZIZOQTDG.cjs +75 -0
  160. package/dist/chunk-ZMSV5VZI.cjs +2888 -0
  161. package/dist/chunk-ZN6MLZAE.cjs +71 -0
  162. package/dist/chunk-ZNCT6HXA.cjs +33 -0
  163. package/dist/components/Accordion/index.cjs +5 -1036
  164. package/dist/components/Accordion/index.js +5 -999
  165. package/dist/components/Alert/index.cjs +4 -69
  166. package/dist/components/Alert/index.js +4 -42
  167. package/dist/components/AutoResizeTextArea/index.cjs +6 -260
  168. package/dist/components/AutoResizeTextArea/index.js +6 -223
  169. package/dist/components/Avatar/index.cjs +4 -65
  170. package/dist/components/Avatar/index.js +4 -38
  171. package/dist/components/Badge/index.cjs +6 -69
  172. package/dist/components/Badge/index.js +5 -40
  173. package/dist/components/Box/index.cjs +4 -58
  174. package/dist/components/Box/index.js +4 -31
  175. package/dist/components/Breadcrumb/index.cjs +4 -42
  176. package/dist/components/Breadcrumb/index.js +3 -14
  177. package/dist/components/Button/index.cjs +5 -65
  178. package/dist/components/Button/index.js +5 -38
  179. package/dist/components/Calendar/index.cjs +6 -1317
  180. package/dist/components/Calendar/index.js +10 -1281
  181. package/dist/components/CardTab/index.cjs +4 -120
  182. package/dist/components/CardTab/index.js +4 -83
  183. package/dist/components/Chart/index.cjs +5 -708
  184. package/dist/components/Chart/index.js +4 -670
  185. package/dist/components/ChatInput/index.cjs +9 -390
  186. package/dist/components/ChatInput/index.js +9 -353
  187. package/dist/components/CheckBox/index.cjs +20 -1125
  188. package/dist/components/CheckBox/index.js +17 -1095
  189. package/dist/components/Chip/index.cjs +5 -55
  190. package/dist/components/Chip/index.js +5 -28
  191. package/dist/components/DatePicker/index.cjs +16 -2136
  192. package/dist/components/DatePicker/index.js +19 -2099
  193. package/dist/components/Divider/index.cjs +4 -58
  194. package/dist/components/Divider/index.js +4 -31
  195. package/dist/components/Drawer/index.cjs +5 -190
  196. package/dist/components/Drawer/index.js +5 -153
  197. package/dist/components/Dropdown/index.cjs +7 -375
  198. package/dist/components/Dropdown/index.js +7 -338
  199. package/dist/components/Editor/index.cjs +6 -1486
  200. package/dist/components/Editor/index.css +53 -0
  201. package/dist/components/Editor/index.d.cts +13 -0
  202. package/dist/components/Editor/index.d.ts +13 -0
  203. package/dist/components/Editor/index.js +6 -1453
  204. package/dist/components/EmptyState/index.cjs +4 -42
  205. package/dist/components/EmptyState/index.js +3 -14
  206. package/dist/components/FieldMessage/index.cjs +7 -182
  207. package/dist/components/FieldMessage/index.js +8 -154
  208. package/dist/components/FileUpload/index.cjs +7 -1171
  209. package/dist/components/FileUpload/index.js +7 -1134
  210. package/dist/components/HtmlTypeWriter/index.cjs +3 -171
  211. package/dist/components/HtmlTypeWriter/index.js +3 -133
  212. package/dist/components/IconButton/index.cjs +4 -65
  213. package/dist/components/IconButton/index.js +4 -38
  214. package/dist/components/ImageSelector/index.cjs +8 -1214
  215. package/dist/components/ImageSelector/index.js +8 -1177
  216. package/dist/components/Input/index.cjs +7 -429
  217. package/dist/components/Input/index.js +8 -392
  218. package/dist/components/Link/index.cjs +4 -61
  219. package/dist/components/Link/index.js +4 -34
  220. package/dist/components/LinkButton/index.cjs +5 -61
  221. package/dist/components/LinkButton/index.js +5 -34
  222. package/dist/components/Modal/index.cjs +5 -190
  223. package/dist/components/Modal/index.js +5 -153
  224. package/dist/components/NotificationBadge/index.cjs +5 -68
  225. package/dist/components/NotificationBadge/index.js +5 -40
  226. package/dist/components/Pagination/index.cjs +6 -1034
  227. package/dist/components/Pagination/index.js +6 -1007
  228. package/dist/components/PopOver/index.cjs +7 -363
  229. package/dist/components/PopOver/index.js +7 -326
  230. package/dist/components/Progress/index.cjs +5 -84
  231. package/dist/components/Progress/index.js +5 -57
  232. package/dist/components/Radio/index.cjs +7 -274
  233. package/dist/components/Radio/index.js +8 -237
  234. package/dist/components/Select/index.cjs +10 -1577
  235. package/dist/components/Select/index.js +11 -1540
  236. package/dist/components/Skeleton/index.cjs +4 -71
  237. package/dist/components/Skeleton/index.js +4 -44
  238. package/dist/components/Spinner/index.cjs +5 -88
  239. package/dist/components/Spinner/index.js +5 -61
  240. package/dist/components/Stat/index.cjs +5 -81
  241. package/dist/components/Stat/index.js +5 -54
  242. package/dist/components/Steps/index.cjs +7 -968
  243. package/dist/components/Steps/index.js +7 -941
  244. package/dist/components/Swiper/index.cjs +4 -357
  245. package/dist/components/Swiper/index.js +4 -320
  246. package/dist/components/Switch/index.cjs +7 -252
  247. package/dist/components/Switch/index.js +7 -215
  248. package/dist/components/Tab/index.cjs +4 -144
  249. package/dist/components/Tab/index.js +4 -107
  250. package/dist/components/Table/index.cjs +4 -310
  251. package/dist/components/Table/index.css +31 -5
  252. package/dist/components/Table/index.js +8 -273
  253. package/dist/components/Tag/index.cjs +6 -969
  254. package/dist/components/Tag/index.js +6 -942
  255. package/dist/components/TextArea/index.cjs +6 -229
  256. package/dist/components/TextArea/index.js +6 -192
  257. package/dist/components/TimePicker/index.cjs +9 -579
  258. package/dist/components/TimePicker/index.js +9 -542
  259. package/dist/components/Toast/index.cjs +5 -146
  260. package/dist/components/Toast/index.js +5 -108
  261. package/dist/components/ToggleChip/index.cjs +5 -66
  262. package/dist/components/ToggleChip/index.js +5 -39
  263. package/dist/components/Tooltip/index.cjs +6 -204
  264. package/dist/components/Tooltip/index.js +6 -167
  265. package/dist/components/Tour/index.cjs +6 -414
  266. package/dist/components/Tour/index.js +6 -377
  267. package/dist/components/Video/index.cjs +7 -796
  268. package/dist/components/Video/index.js +7 -759
  269. package/dist/components/index.cjs +140 -8315
  270. package/dist/components/index.css +31 -5
  271. package/dist/components/index.js +190 -8261
  272. package/dist/index.cjs +903 -13291
  273. package/dist/index.css +31 -5
  274. package/dist/index.js +524 -12499
  275. package/dist/layout/Grid/FullGrid/index.cjs +4 -46
  276. package/dist/layout/Grid/FullGrid/index.js +3 -18
  277. package/dist/layout/Grid/FullScreen/index.cjs +4 -46
  278. package/dist/layout/Grid/FullScreen/index.js +3 -18
  279. package/dist/layout/Grid/Item/index.cjs +5 -68
  280. package/dist/layout/Grid/Item/index.js +5 -41
  281. package/dist/layout/Grid/index.cjs +14 -109
  282. package/dist/layout/Grid/index.js +14 -79
  283. package/dist/layout/Header/index.cjs +4 -44
  284. package/dist/layout/Header/index.js +3 -16
  285. package/dist/layout/Layout/index.cjs +4 -42
  286. package/dist/layout/Layout/index.js +3 -14
  287. package/dist/layout/SideBar/index.cjs +6 -96
  288. package/dist/layout/SideBar/index.js +6 -57
  289. package/dist/layout/index.cjs +38 -209
  290. package/dist/layout/index.js +27 -153
  291. package/dist/tokens/index.cjs +627 -6119
  292. package/dist/tokens/index.js +324 -5489
  293. package/guidelines/components/editor.md +3 -0
  294. package/guidelines/components/table.md +23 -0
  295. package/guidelines/setup.md +7 -0
  296. package/package.json +6 -3
@@ -0,0 +1,479 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkP2E3PB62cjs = require('./chunk-P2E3PB62.cjs');
4
+
5
+
6
+ var _chunkNSDKALIScjs = require('./chunk-NSDKALIS.cjs');
7
+
8
+
9
+ var _chunkIPYKHDP4cjs = require('./chunk-IPYKHDP4.cjs');
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var _chunkGYTB24V6cjs = require('./chunk-GYTB24V6.cjs');
17
+
18
+
19
+ var _chunkUHUA3GQCcjs = require('./chunk-UHUA3GQC.cjs');
20
+
21
+
22
+ var _chunkAT5Y5GLScjs = require('./chunk-AT5Y5GLS.cjs');
23
+
24
+
25
+
26
+ var _chunkEETYMP6Kcjs = require('./chunk-EETYMP6K.cjs');
27
+
28
+
29
+ var _chunkHGA47QVVcjs = require('./chunk-HGA47QVV.cjs');
30
+
31
+
32
+ var _chunkPFGSJJRYcjs = require('./chunk-PFGSJJRY.cjs');
33
+
34
+ // src/components/DatePicker/InputDatePicker/index.tsx
35
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
36
+
37
+ // src/components/DatePicker/SingleDatePicker/index.tsx
38
+
39
+ var _jsxruntime = require('react/jsx-runtime');
40
+ var DayCell = _react2.default.memo(
41
+ ({
42
+ day,
43
+ disabled,
44
+ selected,
45
+ highlighted,
46
+ isStart,
47
+ isEnd,
48
+ inRange,
49
+ onSelect
50
+ }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
51
+ "button",
52
+ {
53
+ type: "button",
54
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0,
55
+ "datepicker-day",
56
+ !day.isCurrentMonth && "outside",
57
+ disabled && "disabled",
58
+ (selected || isStart || isEnd) && "selected",
59
+ highlighted && !selected && "highlighted",
60
+ inRange && !isStart && !isEnd && "in-range",
61
+ day.isToday && "today",
62
+ day.isSunday && "sunday",
63
+ day.isSaturday && "saturday"
64
+ ),
65
+ disabled: disabled || !day.isCurrentMonth,
66
+ onClick: () => {
67
+ if (!disabled && day.isCurrentMonth) onSelect(day.date);
68
+ },
69
+ children: day.day
70
+ }
71
+ ),
72
+ (prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.isStart === next.isStart && prev.isEnd === next.isEnd && prev.inRange === next.inRange && prev.day === next.day
73
+ );
74
+ DayCell.displayName = "DayCell";
75
+ var SingleDatePicker = (props) => {
76
+ const {
77
+ value,
78
+ onChange,
79
+ minDate,
80
+ maxDate,
81
+ highlightDates = [],
82
+ locale = "ko",
83
+ rangeStart,
84
+ rangeEnd,
85
+ label,
86
+ required,
87
+ validations
88
+ } = props;
89
+ const labelId = _react2.default.useId();
90
+ const initialYear = _optionalChain([value, 'optionalAccess', _2 => _2.getFullYear, 'call', _3 => _3()]);
91
+ const initialMonth = _optionalChain([value, 'optionalAccess', _4 => _4.getMonth, 'call', _5 => _5()]);
92
+ const { year, month, days, goToPrevMonth, goToNextMonth, setYear, setMonth } = _chunkGYTB24V6cjs.useCalendar.call(void 0,
93
+ initialYear,
94
+ initialMonth
95
+ );
96
+ const [pickerMode, setPickerMode] = _react2.default.useState("days");
97
+ const [yearRangeStart, setYearRangeStart] = _react2.default.useState(
98
+ Math.floor((_nullishCoalesce(initialYear, () => ( (/* @__PURE__ */ new Date()).getFullYear()))) / 12) * 12
99
+ );
100
+ const minTime = _react2.default.useMemo(
101
+ () => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
102
+ [minDate]
103
+ );
104
+ const maxTime = _react2.default.useMemo(
105
+ () => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
106
+ [maxDate]
107
+ );
108
+ const highlightSet = _react2.default.useMemo(() => {
109
+ const set = /* @__PURE__ */ new Set();
110
+ for (const h of highlightDates) {
111
+ set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
112
+ }
113
+ return set;
114
+ }, [highlightDates]);
115
+ const handleSelect = _react2.default.useCallback(
116
+ (date) => {
117
+ _optionalChain([onChange, 'optionalCall', _6 => _6(date)]);
118
+ },
119
+ [onChange]
120
+ );
121
+ const handlePrev = () => {
122
+ if (pickerMode === "days") goToPrevMonth();
123
+ else if (pickerMode === "months") setYear(year - 1);
124
+ else setYearRangeStart((s) => s - 12);
125
+ };
126
+ const handleNext = () => {
127
+ if (pickerMode === "days") goToNextMonth();
128
+ else if (pickerMode === "months") setYear(year + 1);
129
+ else setYearRangeStart((s) => s + 12);
130
+ };
131
+ const handleTitleClick = () => {
132
+ if (pickerMode === "days") setPickerMode("months");
133
+ else if (pickerMode === "months") {
134
+ setYearRangeStart(Math.floor(year / 12) * 12);
135
+ setPickerMode("years");
136
+ } else {
137
+ setPickerMode("days");
138
+ }
139
+ };
140
+ const handleMonthSelect = (m) => {
141
+ setMonth(m);
142
+ setPickerMode("days");
143
+ };
144
+ const handleYearSelect = (y) => {
145
+ setYear(y);
146
+ setPickerMode("months");
147
+ };
148
+ const weekdays = _chunkGYTB24V6cjs.WEEKDAY_LABELS[locale];
149
+ const monthLabels = _chunkGYTB24V6cjs.MONTH_LABELS[locale];
150
+ const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
151
+ const hasRange = rangeStart != null && rangeEnd != null;
152
+ const calendar = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
153
+ "div",
154
+ {
155
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "lib-xplat-datepicker", "single"),
156
+ role: "group",
157
+ "aria-labelledby": label ? labelId : void 0,
158
+ children: [
159
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "datepicker-header", children: [
160
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEETYMP6Kcjs.ChevronLeftIcon_default, {}) }),
161
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
162
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEETYMP6Kcjs.ChevronRightIcon_default, {}) })
163
+ ] }),
164
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "datepicker-body", children: [
165
+ pickerMode === "years" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
166
+ const y = yearRangeStart + i;
167
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
168
+ "button",
169
+ {
170
+ type: "button",
171
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "datepicker-picker-cell", y === year && "active"),
172
+ onClick: () => handleYearSelect(y),
173
+ children: y
174
+ },
175
+ y
176
+ );
177
+ }) }),
178
+ pickerMode === "months" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "datepicker-picker-grid", children: monthLabels.map((label2, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
179
+ "button",
180
+ {
181
+ type: "button",
182
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "datepicker-picker-cell", i === month && "active"),
183
+ onClick: () => handleMonthSelect(i),
184
+ children: label2
185
+ },
186
+ i
187
+ )) }),
188
+ pickerMode === "days" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
189
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "datepicker-weekdays", children: weekdays.map((label2, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
190
+ "div",
191
+ {
192
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0,
193
+ "datepicker-weekday",
194
+ i === 0 && "sunday",
195
+ i === 6 && "saturday"
196
+ ),
197
+ children: label2
198
+ },
199
+ label2
200
+ )) }),
201
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "datepicker-grid", children: days.map((day, idx) => {
202
+ const t = day.date.getTime();
203
+ const disabled = t < minTime || t > maxTime;
204
+ const selected = value ? _chunkGYTB24V6cjs.isSameDay.call(void 0, day.date, value) : false;
205
+ const highlighted = highlightSet.has(
206
+ `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
207
+ );
208
+ const isStart = hasRange ? _chunkGYTB24V6cjs.isSameDay.call(void 0, day.date, rangeStart) : false;
209
+ const isEnd = hasRange ? _chunkGYTB24V6cjs.isSameDay.call(void 0, day.date, rangeEnd) : false;
210
+ const inRangeVal = hasRange ? _chunkGYTB24V6cjs.isInRange.call(void 0, day.date, rangeStart, rangeEnd) : false;
211
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
212
+ DayCell,
213
+ {
214
+ day,
215
+ disabled,
216
+ selected,
217
+ highlighted,
218
+ isStart,
219
+ isEnd,
220
+ inRange: inRangeVal,
221
+ onSelect: handleSelect
222
+ },
223
+ idx
224
+ );
225
+ }) })
226
+ ] })
227
+ ] })
228
+ ]
229
+ }
230
+ );
231
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHGA47QVVcjs.Field, { label, required, labelId, validations, children: calendar });
232
+ };
233
+ SingleDatePicker.displayName = "SingleDatePicker";
234
+ var SingleDatePicker_default = SingleDatePicker;
235
+
236
+ // src/components/DatePicker/InputDatePicker/index.tsx
237
+
238
+ var formatDate = (date) => {
239
+ if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
240
+ const y = date.getFullYear();
241
+ const m = String(date.getMonth() + 1).padStart(2, "0");
242
+ const d = String(date.getDate()).padStart(2, "0");
243
+ return `${y}/${m}/${d}`;
244
+ };
245
+ var InputDatePicker = (props) => {
246
+ const {
247
+ value,
248
+ onChange,
249
+ minDate,
250
+ maxDate,
251
+ disabled,
252
+ locale = "ko",
253
+ placeholder,
254
+ label,
255
+ required,
256
+ validations
257
+ } = props;
258
+ const [isOpen, setIsOpen] = _react2.default.useState(false);
259
+ const [tempDate, setTempDate] = _react2.default.useState(_nullishCoalesce(value, () => ( /* @__PURE__ */ new Date())));
260
+ const handleOpen = () => {
261
+ if (disabled) return;
262
+ setTempDate(_nullishCoalesce(value, () => ( /* @__PURE__ */ new Date())));
263
+ setIsOpen(true);
264
+ };
265
+ const handleSelect = (date) => {
266
+ if (date) setTempDate(date);
267
+ };
268
+ const handleApply = () => {
269
+ _optionalChain([onChange, 'optionalCall', _7 => _7(tempDate)]);
270
+ setIsOpen(false);
271
+ };
272
+ const handleClose = () => {
273
+ setIsOpen(false);
274
+ };
275
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
276
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
277
+ _chunkIPYKHDP4cjs.Input_default,
278
+ {
279
+ value: formatDate(value),
280
+ placeholder,
281
+ suffix: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAT5Y5GLScjs.CalenderIcon_default, {}),
282
+ disabled,
283
+ label,
284
+ required,
285
+ validations,
286
+ readOnly: true
287
+ }
288
+ ) }),
289
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNSDKALIScjs.Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "lib-xplat-popup-datepicker-card", children: [
290
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "popup-datepicker-content", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
291
+ SingleDatePicker_default,
292
+ {
293
+ value: tempDate,
294
+ onChange: handleSelect,
295
+ minDate,
296
+ maxDate,
297
+ locale
298
+ }
299
+ ) }),
300
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "popup-datepicker-footer", children: [
301
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUHUA3GQCcjs.Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
302
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUHUA3GQCcjs.Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
303
+ ] })
304
+ ] }) })
305
+ ] });
306
+ };
307
+ InputDatePicker.displayName = "InputDatePicker";
308
+ var InputDatePicker_default = InputDatePicker;
309
+
310
+ // src/components/DatePicker/PopupPicker/index.tsx
311
+
312
+
313
+ // src/components/DatePicker/RangePicker/index.tsx
314
+
315
+
316
+ var RangePicker = (props) => {
317
+ const {
318
+ startDate,
319
+ endDate,
320
+ onChange,
321
+ minDate,
322
+ maxDate,
323
+ locale = "ko",
324
+ label,
325
+ required,
326
+ validations
327
+ } = props;
328
+ const labelId = _react2.default.useId();
329
+ const [activeTab, setActiveTab] = _react2.default.useState("start");
330
+ const handleStartChange = (date) => {
331
+ if (!date) return;
332
+ const newStart = date > endDate ? endDate : date;
333
+ _optionalChain([onChange, 'optionalCall', _8 => _8({ startDate: newStart, endDate })]);
334
+ };
335
+ const handleEndChange = (date) => {
336
+ if (!date) return;
337
+ const newEnd = date < startDate ? startDate : date;
338
+ _optionalChain([onChange, 'optionalCall', _9 => _9({ startDate, endDate: newEnd })]);
339
+ };
340
+ const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
341
+ const endMinDate = minDate && startDate > minDate ? startDate : startDate;
342
+ const calendar = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
343
+ "div",
344
+ {
345
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "lib-xplat-datepicker", "range"),
346
+ role: "group",
347
+ "aria-labelledby": label ? labelId : void 0,
348
+ children: [
349
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
350
+ _chunkP2E3PB62cjs.Tab_default,
351
+ {
352
+ activeIndex: activeTab === "start" ? 0 : 1,
353
+ tabs: [
354
+ { value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
355
+ { value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
356
+ ],
357
+ onChange: (tab) => setActiveTab(tab.value),
358
+ type: "toggle",
359
+ size: "sm"
360
+ }
361
+ ) }),
362
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "datepicker-range-panels", children: [
363
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
364
+ SingleDatePicker_default,
365
+ {
366
+ value: startDate,
367
+ onChange: handleStartChange,
368
+ minDate,
369
+ maxDate: startMaxDate,
370
+ rangeStart: startDate,
371
+ rangeEnd: endDate,
372
+ locale
373
+ }
374
+ ),
375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
376
+ SingleDatePicker_default,
377
+ {
378
+ value: endDate,
379
+ onChange: handleEndChange,
380
+ minDate: endMinDate,
381
+ maxDate,
382
+ rangeStart: startDate,
383
+ rangeEnd: endDate,
384
+ locale
385
+ }
386
+ )
387
+ ] }),
388
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
389
+ SingleDatePicker_default,
390
+ {
391
+ value: startDate,
392
+ onChange: handleStartChange,
393
+ minDate,
394
+ maxDate: startMaxDate,
395
+ rangeStart: startDate,
396
+ rangeEnd: endDate,
397
+ locale
398
+ }
399
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
400
+ SingleDatePicker_default,
401
+ {
402
+ value: endDate,
403
+ onChange: handleEndChange,
404
+ minDate: endMinDate,
405
+ maxDate,
406
+ rangeStart: startDate,
407
+ rangeEnd: endDate,
408
+ locale
409
+ }
410
+ ) })
411
+ ]
412
+ }
413
+ );
414
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHGA47QVVcjs.Field, { label, required, labelId, validations, children: calendar });
415
+ };
416
+ RangePicker.displayName = "RangePicker";
417
+ var RangePicker_default = RangePicker;
418
+
419
+ // src/components/DatePicker/PopupPicker/index.tsx
420
+
421
+ var PopupPicker = (props) => {
422
+ const { component, type, locale } = props;
423
+ const [isOpen, setIsOpen] = _react2.default.useState(false);
424
+ const handleClick = () => setIsOpen(true);
425
+ const handleClose = () => setIsOpen(false);
426
+ const handleSingleChange = (date) => {
427
+ if (!date) return;
428
+ _optionalChain([props, 'access', _10 => _10.onChange, 'optionalCall', _11 => _11(date)]);
429
+ handleClose();
430
+ };
431
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "lib-xplat-popup-datepicker", children: [
432
+ _react2.default.cloneElement(component, { onClick: handleClick }),
433
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNSDKALIScjs.Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
434
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "popup-datepicker-content", children: [
435
+ type === "single" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
436
+ SingleDatePicker_default,
437
+ {
438
+ value: props.value,
439
+ onChange: handleSingleChange,
440
+ minDate: props.minDate,
441
+ maxDate: props.maxDate,
442
+ locale
443
+ }
444
+ ),
445
+ type === "range" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
446
+ RangePicker_default,
447
+ {
448
+ startDate: props.startDate,
449
+ endDate: props.endDate,
450
+ onChange: props.onChange,
451
+ minDate: props.minDate,
452
+ maxDate: props.maxDate,
453
+ locale
454
+ }
455
+ )
456
+ ] }),
457
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "popup-datepicker-footer", children: [
458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
459
+ _chunkUHUA3GQCcjs.Button_default,
460
+ {
461
+ type: "secondary",
462
+ onClick: handleClose,
463
+ children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
464
+ }
465
+ ),
466
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUHUA3GQCcjs.Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
467
+ ] })
468
+ ] }) })
469
+ ] });
470
+ };
471
+ PopupPicker.displayName = "PopupPicker";
472
+ var PopupPicker_default = PopupPicker;
473
+
474
+
475
+
476
+
477
+
478
+
479
+ exports.SingleDatePicker_default = SingleDatePicker_default; exports.InputDatePicker_default = InputDatePicker_default; exports.RangePicker_default = RangePicker_default; exports.PopupPicker_default = PopupPicker_default;
@@ -0,0 +1,19 @@
1
+ // ../../node_modules/clsx/dist/clsx.mjs
2
+ function r(e) {
3
+ var t, f, n = "";
4
+ if ("string" == typeof e || "number" == typeof e) n += e;
5
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6
+ var o = e.length;
7
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
8
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
9
+ return n;
10
+ }
11
+ function clsx() {
12
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
13
+ return n;
14
+ }
15
+ var clsx_default = clsx;
16
+
17
+ export {
18
+ clsx_default
19
+ };
@@ -0,0 +1,53 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkI7TLJUTPcjs = require('./chunk-I7TLJUTP.cjs');
4
+
5
+
6
+ var _chunkPFGSJJRYcjs = require('./chunk-PFGSJJRY.cjs');
7
+
8
+ // src/components/Spinner/Spinner.tsx
9
+ var _jsxruntime = require('react/jsx-runtime');
10
+ var Spinner = (props) => {
11
+ const {
12
+ size = "md",
13
+ type = "primary"
14
+ } = props;
15
+ const statusType = _chunkI7TLJUTPcjs.normalizeStatus.call(void 0, type);
16
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
17
+ "div",
18
+ {
19
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "lib-xplat-spinner", size, statusType),
20
+ role: "status",
21
+ "aria-label": "\uB85C\uB529 \uC911",
22
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
23
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24
+ "circle",
25
+ {
26
+ className: "track",
27
+ cx: "12",
28
+ cy: "12",
29
+ r: "10",
30
+ strokeWidth: "3"
31
+ }
32
+ ),
33
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
34
+ "circle",
35
+ {
36
+ className: "indicator",
37
+ cx: "12",
38
+ cy: "12",
39
+ r: "10",
40
+ strokeWidth: "3",
41
+ strokeLinecap: "round"
42
+ }
43
+ )
44
+ ] })
45
+ }
46
+ );
47
+ };
48
+ Spinner.displayName = "Spinner";
49
+ var Spinner_default = Spinner;
50
+
51
+
52
+
53
+ exports.Spinner_default = Spinner_default;
File without changes
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPFGSJJRYcjs = require('./chunk-PFGSJJRY.cjs');
4
+
5
+ // src/components/Divider/Divider.tsx
6
+ var _jsxruntime = require('react/jsx-runtime');
7
+ var Divider = (props) => {
8
+ const { orientation = "horizontal" } = props;
9
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10
+ "div",
11
+ {
12
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, "lib-xplat-divider", orientation),
13
+ role: "separator",
14
+ "aria-orientation": orientation
15
+ }
16
+ );
17
+ };
18
+ Divider.displayName = "Divider";
19
+ var Divider_default = Divider;
20
+
21
+
22
+
23
+ exports.Divider_default = Divider_default;
@@ -0,0 +1,26 @@
1
+ import {
2
+ clsx_default
3
+ } from "./chunk-KZOJN57Q.js";
4
+
5
+ // src/components/LinkButton/LinkButton.tsx
6
+ import { jsx } from "react/jsx-runtime";
7
+ var LinkButton = (props) => {
8
+ const { children, href, type = "primary", size = "md", target, rel, ...rest } = props;
9
+ return /* @__PURE__ */ jsx(
10
+ "a",
11
+ {
12
+ className: clsx_default("lib-xplat-button", type, size),
13
+ href,
14
+ target,
15
+ rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
16
+ ...rest,
17
+ children
18
+ }
19
+ );
20
+ };
21
+ LinkButton.displayName = "LinkButton";
22
+ var LinkButton_default = LinkButton;
23
+
24
+ export {
25
+ LinkButton_default
26
+ };