@x-plat/design-system 0.20.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 (292) 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 -337
  251. package/dist/components/Table/index.js +8 -300
  252. package/dist/components/Tag/index.cjs +6 -969
  253. package/dist/components/Tag/index.js +6 -942
  254. package/dist/components/TextArea/index.cjs +6 -229
  255. package/dist/components/TextArea/index.js +6 -192
  256. package/dist/components/TimePicker/index.cjs +9 -579
  257. package/dist/components/TimePicker/index.js +9 -542
  258. package/dist/components/Toast/index.cjs +5 -146
  259. package/dist/components/Toast/index.js +5 -108
  260. package/dist/components/ToggleChip/index.cjs +5 -66
  261. package/dist/components/ToggleChip/index.js +5 -39
  262. package/dist/components/Tooltip/index.cjs +6 -204
  263. package/dist/components/Tooltip/index.js +6 -167
  264. package/dist/components/Tour/index.cjs +6 -414
  265. package/dist/components/Tour/index.js +6 -377
  266. package/dist/components/Video/index.cjs +7 -796
  267. package/dist/components/Video/index.js +7 -759
  268. package/dist/components/index.cjs +140 -8342
  269. package/dist/components/index.js +190 -8288
  270. package/dist/index.cjs +903 -13318
  271. package/dist/index.js +524 -12526
  272. package/dist/layout/Grid/FullGrid/index.cjs +4 -46
  273. package/dist/layout/Grid/FullGrid/index.js +3 -18
  274. package/dist/layout/Grid/FullScreen/index.cjs +4 -46
  275. package/dist/layout/Grid/FullScreen/index.js +3 -18
  276. package/dist/layout/Grid/Item/index.cjs +5 -68
  277. package/dist/layout/Grid/Item/index.js +5 -41
  278. package/dist/layout/Grid/index.cjs +14 -109
  279. package/dist/layout/Grid/index.js +14 -79
  280. package/dist/layout/Header/index.cjs +4 -44
  281. package/dist/layout/Header/index.js +3 -16
  282. package/dist/layout/Layout/index.cjs +4 -42
  283. package/dist/layout/Layout/index.js +3 -14
  284. package/dist/layout/SideBar/index.cjs +6 -96
  285. package/dist/layout/SideBar/index.js +6 -57
  286. package/dist/layout/index.cjs +38 -209
  287. package/dist/layout/index.js +27 -153
  288. package/dist/tokens/index.cjs +627 -6119
  289. package/dist/tokens/index.js +324 -5489
  290. package/guidelines/components/editor.md +3 -0
  291. package/guidelines/setup.md +7 -0
  292. package/package.json +6 -3
@@ -0,0 +1,296 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+ var _chunkPFGSJJRYcjs = require('./chunk-PFGSJJRY.cjs');
4
+
5
+ // src/components/Table/Table.tsx
6
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
7
+
8
+ // src/components/Table/TableContext.tsx
9
+
10
+ var TableContext = _react2.default.createContext(null);
11
+ var useTableContext = () => {
12
+ const ctx = _react2.default.useContext(TableContext);
13
+ if (!ctx) throw new Error("Table components must be used inside <Table>");
14
+ return ctx;
15
+ };
16
+ var TableContext_default = TableContext;
17
+
18
+ // src/components/Table/Table.tsx
19
+ var _jsxruntime = require('react/jsx-runtime');
20
+ var useScrollExtent = (scrollerRef, thumbXRef, thumbYRef) => {
21
+ const [scrollable, setScrollable] = _react2.default.useState({ x: false, y: false });
22
+ _react2.default.useEffect(() => {
23
+ const el = scrollerRef.current;
24
+ if (!el) return;
25
+ const MIN = 8;
26
+ const update = () => {
27
+ const maxX = el.scrollWidth - el.clientWidth;
28
+ const maxY = el.scrollHeight - el.clientHeight;
29
+ const canX = maxX > 1;
30
+ const canY = maxY > 1;
31
+ setScrollable(
32
+ (prev) => prev.x === canX && prev.y === canY ? prev : { x: canX, y: canY }
33
+ );
34
+ const thumbX = thumbXRef.current;
35
+ if (thumbX) {
36
+ const w = canX ? Math.max(el.clientWidth / el.scrollWidth * 100, MIN) : 100;
37
+ thumbX.style.width = `${w.toFixed(2)}%`;
38
+ thumbX.style.left = canX ? `${(el.scrollLeft / maxX * (100 - w)).toFixed(2)}%` : "0%";
39
+ }
40
+ const thumbY = thumbYRef.current;
41
+ if (thumbY) {
42
+ const h = canY ? Math.max(el.clientHeight / el.scrollHeight * 100, MIN) : 100;
43
+ thumbY.style.height = `${h.toFixed(2)}%`;
44
+ thumbY.style.top = canY ? `${(el.scrollTop / maxY * (100 - h)).toFixed(2)}%` : "0%";
45
+ }
46
+ };
47
+ update();
48
+ el.addEventListener("scroll", update, { passive: true });
49
+ const ro = new ResizeObserver(update);
50
+ ro.observe(el);
51
+ const table = el.firstElementChild;
52
+ if (table) ro.observe(table);
53
+ return () => {
54
+ el.removeEventListener("scroll", update);
55
+ ro.disconnect();
56
+ };
57
+ }, [scrollerRef, thumbXRef, thumbYRef]);
58
+ return scrollable;
59
+ };
60
+ var Table = (props) => {
61
+ const {
62
+ children,
63
+ size = "md",
64
+ rowBorderUse = true,
65
+ colBorderUse = true,
66
+ headerSticky = false,
67
+ stickyShadow = true,
68
+ minWidth
69
+ } = props;
70
+ const scrollerRef = _react2.default.useRef(null);
71
+ const thumbXRef = _react2.default.useRef(null);
72
+ const thumbYRef = _react2.default.useRef(null);
73
+ const scrollable = useScrollExtent(scrollerRef, thumbXRef, thumbYRef);
74
+ return (
75
+ /**
76
+ * 바깥 이름(`lib-xplat-table-wrapper`)을 그대로 둔다 — 소비처가 이 클래스를
77
+ * 자리 잡는 데 쓰고 있을 수 있어서다. 스크롤은 안쪽 `-scroller` 가 맡는다.
78
+ */
79
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
80
+ "div",
81
+ {
82
+ className: `lib-xplat-table-wrapper ${size}`,
83
+ style: minWidth === void 0 ? void 0 : {
84
+ "--table-min-width": typeof minWidth === "number" ? `${minWidth}px` : minWidth
85
+ },
86
+ children: [
87
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
88
+ "div",
89
+ {
90
+ ref: scrollerRef,
91
+ className: "lib-xplat-table-scroller",
92
+ "data-xplat-overlay-escape": "",
93
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
94
+ TableContext_default.Provider,
95
+ {
96
+ value: {
97
+ rowBorderUse,
98
+ colBorderUse,
99
+ headerSticky,
100
+ stickyShadow
101
+ },
102
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "table", { className: "lib-xplat-table", children })
103
+ }
104
+ )
105
+ }
106
+ ),
107
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
108
+ "div",
109
+ {
110
+ className: `lib-xplat-table-scrollbar-y${scrollable.y ? " scrollable" : ""}`,
111
+ "aria-hidden": true,
112
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: thumbYRef, className: "table-scrollbar-thumb" })
113
+ }
114
+ ),
115
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
116
+ "div",
117
+ {
118
+ className: `lib-xplat-table-scrollbar${scrollable.x ? " scrollable" : ""}`,
119
+ "aria-hidden": true,
120
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: thumbXRef, className: "table-scrollbar-thumb" })
121
+ }
122
+ )
123
+ ]
124
+ }
125
+ )
126
+ );
127
+ };
128
+ Table.displayName = "Table";
129
+ var Table_default = Table;
130
+
131
+ // src/components/Table/TableBody.tsx
132
+
133
+ var TableBody = (props) => {
134
+ const { children } = props;
135
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children });
136
+ };
137
+ TableBody.displayName = "TableBody";
138
+ var TableBody_default = TableBody;
139
+
140
+ // src/components/Table/TableCell.tsx
141
+
142
+
143
+ // src/components/Table/TableHeadContext.tsx
144
+
145
+ var TableHeadContext = _react2.default.createContext(
146
+ null
147
+ );
148
+ var useTableHeadContext = () => {
149
+ const ctx = _react2.default.useContext(TableHeadContext);
150
+ return ctx;
151
+ };
152
+ var TableHeadContext_default = TableHeadContext;
153
+
154
+ // src/components/Table/TableRowContext.tsx
155
+
156
+ var TableRowContext = _react2.default.createContext(null);
157
+ var useTableRowContext = () => {
158
+ const ctx = _react2.default.useContext(TableRowContext);
159
+ if (!ctx) throw new Error("Table components must be used inside <Table>");
160
+ return ctx;
161
+ };
162
+ var TableRowContext_default = TableRowContext;
163
+
164
+ // src/components/Table/TableCell.tsx
165
+
166
+ var TableCell = _react2.default.memo((props) => {
167
+ const {
168
+ children,
169
+ align = "center",
170
+ isSticky = false,
171
+ width,
172
+ nowrap = false,
173
+ scope = "col",
174
+ colSpan,
175
+ onClick
176
+ } = props;
177
+ const { registerStickyCell, stickyCells } = useTableRowContext();
178
+ const { stickyShadow } = useTableContext();
179
+ const headContext = useTableHeadContext();
180
+ const [left, setLeft] = _react2.default.useState(0);
181
+ const cellRef = _react2.default.useRef(null);
182
+ const calculateLeft = _react2.default.useCallback(() => {
183
+ if (!cellRef.current) return 0;
184
+ let totalLeft = 0;
185
+ for (const ref of stickyCells) {
186
+ if (ref === cellRef) break;
187
+ if (ref.current) totalLeft += ref.current.offsetWidth;
188
+ }
189
+ return totalLeft;
190
+ }, [stickyCells]);
191
+ _react2.default.useEffect(() => {
192
+ if (!isSticky || !cellRef.current) return;
193
+ registerStickyCell(cellRef);
194
+ setLeft(calculateLeft());
195
+ const observer = new ResizeObserver(() => {
196
+ requestAnimationFrame(() => {
197
+ setLeft(calculateLeft());
198
+ });
199
+ });
200
+ if (cellRef.current) observer.observe(cellRef.current);
201
+ for (const ref of stickyCells) {
202
+ if (ref.current) observer.observe(ref.current);
203
+ }
204
+ return () => observer.disconnect();
205
+ }, [isSticky, registerStickyCell, calculateLeft]);
206
+ const isHeaderCell = headContext !== null;
207
+ const CellTag = isHeaderCell ? "th" : "td";
208
+ const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
209
+ const enableHover = headContext && headContext.cellHover;
210
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
211
+ CellTag,
212
+ {
213
+ ref: cellRef,
214
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0,
215
+ `align-${align}`,
216
+ isSticky && "table-sticky",
217
+ isLastSticky && stickyShadow && "right-shadow",
218
+ onClick && "clickable",
219
+ enableHover && "cell-hover",
220
+ nowrap && "nowrap"
221
+ ),
222
+ scope: isHeaderCell ? scope : void 0,
223
+ colSpan,
224
+ style: {
225
+ ...isSticky ? { left } : null,
226
+ ...width != null ? { width: typeof width === "number" ? `${width}px` : width } : null
227
+ },
228
+ onClick,
229
+ children
230
+ }
231
+ );
232
+ });
233
+ TableCell.displayName = "TableCell";
234
+ var TableCell_default = TableCell;
235
+
236
+ // src/components/Table/TableHead.tsx
237
+
238
+ var TableHead = ({
239
+ children,
240
+ cellHover = false
241
+ }) => {
242
+ const { headerSticky } = useTableContext();
243
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { className: _chunkPFGSJJRYcjs.clsx_default.call(void 0, headerSticky ? "table-sticky" : null), children }) });
244
+ };
245
+ TableHead.displayName = "TableHead";
246
+ var TableHead_default = TableHead;
247
+
248
+ // src/components/Table/TableRow.tsx
249
+
250
+
251
+ var TableRow = _react2.default.memo((props) => {
252
+ const {
253
+ children,
254
+ type = "secondary",
255
+ color,
256
+ isHover,
257
+ onClick
258
+ } = props;
259
+ const { rowBorderUse } = useTableContext();
260
+ const [stickyCells, setStickyCells] = _react2.default.useState([]);
261
+ const registerStickyCell = (ref) => {
262
+ setStickyCells((prev) => {
263
+ if (prev.includes(ref)) return prev;
264
+ return [...prev, ref];
265
+ });
266
+ };
267
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
268
+ "tr",
269
+ {
270
+ className: _chunkPFGSJJRYcjs.clsx_default.call(void 0,
271
+ rowBorderUse ? "table-bottom-border" : null,
272
+ color != null ? "categorical" : type,
273
+ color === "neutral" && "cat-neutral",
274
+ isHover && "hover",
275
+ onClick && "clickable"
276
+ ),
277
+ onClick,
278
+ style: color != null && color !== "neutral" ? {
279
+ "--cat-fill": `var(--semantic-categorical-${color}-fill)`,
280
+ "--cat-text": `var(--semantic-categorical-${color}-text)`,
281
+ "--cat-bg": `var(--semantic-categorical-${color}-bg)`
282
+ } : void 0,
283
+ children
284
+ }
285
+ ) });
286
+ });
287
+ TableRow.displayName = "TableRow";
288
+ var TableRow_default = TableRow;
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+ exports.Table_default = Table_default; exports.TableBody_default = TableBody_default; exports.TableCell_default = TableCell_default; exports.TableHead_default = TableHead_default; exports.TableRow_default = TableRow_default;
@@ -0,0 +1,23 @@
1
+ import {
2
+ clsx_default
3
+ } from "./chunk-KZOJN57Q.js";
4
+
5
+ // src/components/Box/Box.tsx
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var Box = ({
8
+ children,
9
+ title,
10
+ variant = "outlined",
11
+ padding = "md"
12
+ }) => {
13
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
14
+ title && /* @__PURE__ */ jsx("div", { className: "box-title", children: title }),
15
+ /* @__PURE__ */ jsx("div", { className: "box-content", children })
16
+ ] });
17
+ };
18
+ Box.displayName = "Box";
19
+ var Box_default = Box;
20
+
21
+ export {
22
+ Box_default
23
+ };
@@ -0,0 +1,107 @@
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(); } }// src/components/Calendar/useCalendar.ts
2
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
3
+ var useCalendar = (initialYear, initialMonth) => {
4
+ const today = /* @__PURE__ */ new Date();
5
+ const [year, setYear] = _react2.default.useState(_nullishCoalesce(initialYear, () => ( today.getFullYear())));
6
+ const [month, setMonth] = _react2.default.useState(_nullishCoalesce(initialMonth, () => ( today.getMonth())));
7
+ const days = _react2.default.useMemo(() => {
8
+ const firstDay = new Date(year, month, 1);
9
+ const lastDay = new Date(year, month + 1, 0);
10
+ const startDayOfWeek = firstDay.getDay();
11
+ const result = [];
12
+ const prevMonthLast = new Date(year, month, 0);
13
+ for (let i = startDayOfWeek - 1; i >= 0; i--) {
14
+ const d = new Date(year, month - 1, prevMonthLast.getDate() - i);
15
+ result.push({
16
+ date: d,
17
+ day: d.getDate(),
18
+ isCurrentMonth: false,
19
+ isToday: false,
20
+ isSunday: d.getDay() === 0,
21
+ isSaturday: d.getDay() === 6
22
+ });
23
+ }
24
+ for (let d = 1; d <= lastDay.getDate(); d++) {
25
+ const date = new Date(year, month, d);
26
+ const isToday = date.getFullYear() === today.getFullYear() && date.getMonth() === today.getMonth() && date.getDate() === today.getDate();
27
+ result.push({
28
+ date,
29
+ day: d,
30
+ isCurrentMonth: true,
31
+ isToday,
32
+ isSunday: date.getDay() === 0,
33
+ isSaturday: date.getDay() === 6
34
+ });
35
+ }
36
+ const remaining = 42 - result.length;
37
+ for (let d = 1; d <= remaining; d++) {
38
+ const date = new Date(year, month + 1, d);
39
+ result.push({
40
+ date,
41
+ day: d,
42
+ isCurrentMonth: false,
43
+ isToday: false,
44
+ isSunday: date.getDay() === 0,
45
+ isSaturday: date.getDay() === 6
46
+ });
47
+ }
48
+ return result;
49
+ }, [year, month]);
50
+ const goToPrevMonth = _react2.default.useCallback(() => {
51
+ setMonth((prev) => {
52
+ if (prev === 0) {
53
+ setYear((y) => y - 1);
54
+ return 11;
55
+ }
56
+ return prev - 1;
57
+ });
58
+ }, []);
59
+ const goToNextMonth = _react2.default.useCallback(() => {
60
+ setMonth((prev) => {
61
+ if (prev === 11) {
62
+ setYear((y) => y + 1);
63
+ return 0;
64
+ }
65
+ return prev + 1;
66
+ });
67
+ }, []);
68
+ const goToToday = _react2.default.useCallback(() => {
69
+ setYear(today.getFullYear());
70
+ setMonth(today.getMonth());
71
+ }, []);
72
+ return {
73
+ year,
74
+ month,
75
+ days,
76
+ goToPrevMonth,
77
+ goToNextMonth,
78
+ goToToday,
79
+ setYear,
80
+ setMonth
81
+ };
82
+ };
83
+ var isSameDay = (a, b) => {
84
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
85
+ };
86
+ var isInRange = (date, start, end) => {
87
+ const d = date.getTime();
88
+ const s = new Date(start.getFullYear(), start.getMonth(), start.getDate()).getTime();
89
+ const e = new Date(end.getFullYear(), end.getMonth(), end.getDate()).getTime();
90
+ return d >= s && d <= e;
91
+ };
92
+ var WEEKDAY_LABELS = {
93
+ ko: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
94
+ en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
95
+ };
96
+ var MONTH_LABELS = {
97
+ ko: ["1\uC6D4", "2\uC6D4", "3\uC6D4", "4\uC6D4", "5\uC6D4", "6\uC6D4", "7\uC6D4", "8\uC6D4", "9\uC6D4", "10\uC6D4", "11\uC6D4", "12\uC6D4"],
98
+ en: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
99
+ };
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ exports.useCalendar = useCalendar; exports.isSameDay = isSameDay; exports.isInRange = isInRange; exports.WEEKDAY_LABELS = WEEKDAY_LABELS; exports.MONTH_LABELS = MONTH_LABELS;