@x-plat/design-system 0.4.6 → 0.5.1

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 (178) hide show
  1. package/dist/components/Accordion/index.cjs +4 -4
  2. package/dist/components/Accordion/index.css +11 -11
  3. package/dist/components/Accordion/index.js +4 -4
  4. package/dist/components/Alert/index.css +19 -19
  5. package/dist/components/Avatar/index.cjs +11 -5
  6. package/dist/components/Avatar/index.css +41 -11
  7. package/dist/components/Avatar/index.d.cts +1 -2
  8. package/dist/components/Avatar/index.d.ts +1 -2
  9. package/dist/components/Avatar/index.js +11 -5
  10. package/dist/components/Badge/index.cjs +3 -4
  11. package/dist/components/Badge/index.css +32 -19
  12. package/dist/components/Badge/index.d.cts +3 -2
  13. package/dist/components/Badge/index.d.ts +3 -2
  14. package/dist/components/Badge/index.js +3 -4
  15. package/dist/components/Breadcrumb/index.css +6 -6
  16. package/dist/components/Button/index.cjs +1 -3
  17. package/dist/components/Button/index.css +67 -23
  18. package/dist/components/Button/index.d.cts +2 -3
  19. package/dist/components/Button/index.d.ts +2 -3
  20. package/dist/components/Button/index.js +1 -3
  21. package/dist/components/Calendar/index.cjs +10 -10
  22. package/dist/components/Calendar/index.css +51 -52
  23. package/dist/components/Calendar/index.d.cts +3 -3
  24. package/dist/components/Calendar/index.d.ts +3 -3
  25. package/dist/components/Calendar/index.js +10 -10
  26. package/dist/components/Card/index.css +6 -6
  27. package/dist/components/CardTab/index.css +28 -28
  28. package/dist/components/Chart/index.cjs +228 -14548
  29. package/dist/components/Chart/index.css +57 -0
  30. package/dist/components/Chart/index.d.cts +3 -2
  31. package/dist/components/Chart/index.d.ts +3 -2
  32. package/dist/components/Chart/index.js +219 -14541
  33. package/dist/components/CheckBox/index.cjs +13 -8
  34. package/dist/components/CheckBox/index.css +50 -27
  35. package/dist/components/CheckBox/index.d.cts +3 -2
  36. package/dist/components/CheckBox/index.d.ts +3 -2
  37. package/dist/components/CheckBox/index.js +13 -8
  38. package/dist/components/Chip/index.cjs +1 -3
  39. package/dist/components/Chip/index.css +35 -23
  40. package/dist/components/Chip/index.d.cts +2 -3
  41. package/dist/components/Chip/index.d.ts +2 -3
  42. package/dist/components/Chip/index.js +1 -3
  43. package/dist/components/DatePicker/index.cjs +37 -46
  44. package/dist/components/DatePicker/index.css +175 -122
  45. package/dist/components/DatePicker/index.d.cts +2 -3
  46. package/dist/components/DatePicker/index.d.ts +2 -3
  47. package/dist/components/DatePicker/index.js +37 -46
  48. package/dist/components/Divider/index.css +2 -2
  49. package/dist/components/Drawer/index.css +7 -7
  50. package/dist/components/Dropdown/index.css +10 -10
  51. package/dist/components/EmptyState/index.css +8 -9
  52. package/dist/components/FileUpload/index.cjs +4 -4
  53. package/dist/components/FileUpload/index.css +13 -14
  54. package/dist/components/FileUpload/index.js +4 -4
  55. package/dist/components/HtmlTypeWriter/index.cjs +10 -10
  56. package/dist/components/HtmlTypeWriter/index.css +3 -3
  57. package/dist/components/HtmlTypeWriter/index.js +10 -10
  58. package/dist/components/ImageSelector/index.cjs +4 -4
  59. package/dist/components/ImageSelector/index.css +15 -15
  60. package/dist/components/ImageSelector/index.js +4 -4
  61. package/dist/components/Input/index.css +37 -26
  62. package/dist/components/Modal/index.css +5 -4
  63. package/dist/components/Pagination/index.cjs +9 -10
  64. package/dist/components/Pagination/index.css +37 -26
  65. package/dist/components/Pagination/index.d.cts +3 -2
  66. package/dist/components/Pagination/index.d.ts +3 -2
  67. package/dist/components/Pagination/index.js +9 -10
  68. package/dist/components/PopOver/index.css +3 -3
  69. package/dist/components/Progress/index.cjs +4 -5
  70. package/dist/components/Progress/index.css +23 -9
  71. package/dist/components/Progress/index.d.cts +3 -2
  72. package/dist/components/Progress/index.d.ts +3 -2
  73. package/dist/components/Progress/index.js +4 -5
  74. package/dist/components/Radio/index.cjs +3 -4
  75. package/dist/components/Radio/index.css +61 -29
  76. package/dist/components/Radio/index.d.cts +3 -2
  77. package/dist/components/Radio/index.d.ts +3 -2
  78. package/dist/components/Radio/index.js +3 -4
  79. package/dist/components/Select/index.cjs +4 -4
  80. package/dist/components/Select/index.css +46 -40
  81. package/dist/components/Select/index.js +4 -4
  82. package/dist/components/Skeleton/index.css +3 -3
  83. package/dist/components/Spinner/index.cjs +2 -3
  84. package/dist/components/Spinner/index.css +22 -8
  85. package/dist/components/Spinner/index.d.cts +3 -2
  86. package/dist/components/Spinner/index.d.ts +3 -2
  87. package/dist/components/Spinner/index.js +2 -3
  88. package/dist/components/Steps/index.cjs +8 -9
  89. package/dist/components/Steps/index.css +77 -22
  90. package/dist/components/Steps/index.d.cts +3 -2
  91. package/dist/components/Steps/index.d.ts +3 -2
  92. package/dist/components/Steps/index.js +8 -9
  93. package/dist/components/Swiper/index.css +10 -10
  94. package/dist/components/Switch/index.cjs +4 -5
  95. package/dist/components/Switch/index.css +58 -26
  96. package/dist/components/Switch/index.d.cts +3 -2
  97. package/dist/components/Switch/index.d.ts +3 -2
  98. package/dist/components/Switch/index.js +4 -5
  99. package/dist/components/Tab/index.css +15 -15
  100. package/dist/components/Table/index.cjs +0 -3
  101. package/dist/components/Table/index.css +15 -15
  102. package/dist/components/Table/index.d.cts +1 -2
  103. package/dist/components/Table/index.d.ts +1 -2
  104. package/dist/components/Table/index.js +0 -3
  105. package/dist/components/Tag/index.cjs +23 -10
  106. package/dist/components/Tag/index.css +58 -17
  107. package/dist/components/Tag/index.d.cts +5 -2
  108. package/dist/components/Tag/index.d.ts +5 -2
  109. package/dist/components/Tag/index.js +23 -10
  110. package/dist/components/TextArea/index.css +20 -9
  111. package/dist/components/Toast/index.css +22 -22
  112. package/dist/components/Tooltip/index.cjs +1 -3
  113. package/dist/components/Tooltip/index.css +6 -6
  114. package/dist/components/Tooltip/index.d.cts +1 -2
  115. package/dist/components/Tooltip/index.d.ts +1 -2
  116. package/dist/components/Tooltip/index.js +1 -3
  117. package/dist/components/Video/index.css +5 -5
  118. package/dist/components/index.cjs +970 -15289
  119. package/dist/components/index.css +2167 -1061
  120. package/dist/components/index.d.cts +1 -2
  121. package/dist/components/index.d.ts +1 -2
  122. package/dist/components/index.js +871 -15192
  123. package/dist/index.cjs +1077 -15378
  124. package/dist/index.css +2164 -1058
  125. package/dist/index.d.cts +3 -3
  126. package/dist/index.d.ts +3 -3
  127. package/dist/index.js +877 -15182
  128. package/dist/layout/Grid/FullGrid/index.cjs +9 -18
  129. package/dist/layout/Grid/FullGrid/index.d.cts +1 -1
  130. package/dist/layout/Grid/FullGrid/index.d.ts +1 -1
  131. package/dist/layout/Grid/FullGrid/index.js +9 -18
  132. package/dist/layout/Grid/FullScreen/index.cjs +9 -18
  133. package/dist/layout/Grid/FullScreen/index.d.cts +3 -3
  134. package/dist/layout/Grid/FullScreen/index.d.ts +3 -3
  135. package/dist/layout/Grid/FullScreen/index.js +9 -18
  136. package/dist/layout/Grid/index.cjs +34 -20
  137. package/dist/layout/Grid/index.js +34 -20
  138. package/dist/layout/index.cjs +34 -20
  139. package/dist/layout/index.css +1000 -295
  140. package/dist/layout/index.js +34 -20
  141. package/dist/tokens/index.cjs +33 -142
  142. package/dist/tokens/index.d.cts +23 -6
  143. package/dist/tokens/index.d.ts +23 -6
  144. package/dist/tokens/index.js +29 -140
  145. package/guidelines/Guidelines.md +57 -0
  146. package/guidelines/components/accordion.md +72 -0
  147. package/guidelines/components/avatar.md +35 -0
  148. package/guidelines/components/button.md +58 -0
  149. package/guidelines/components/card.md +28 -0
  150. package/guidelines/components/chart.md +58 -0
  151. package/guidelines/components/chip-tag.md +49 -0
  152. package/guidelines/components/data-display.md +96 -0
  153. package/guidelines/components/datepicker.md +60 -0
  154. package/guidelines/components/dropdown.md +49 -0
  155. package/guidelines/components/feedback.md +64 -0
  156. package/guidelines/components/file-media.md +95 -0
  157. package/guidelines/components/form.md +60 -0
  158. package/guidelines/components/html-typewriter.md +38 -0
  159. package/guidelines/components/input.md +55 -0
  160. package/guidelines/components/navigation.md +80 -0
  161. package/guidelines/components/overlay.md +72 -0
  162. package/guidelines/components/select.md +44 -0
  163. package/guidelines/components/swiper.md +84 -0
  164. package/guidelines/components/table.md +62 -0
  165. package/guidelines/composition/grid.md +95 -0
  166. package/guidelines/composition/layout.md +30 -0
  167. package/guidelines/foundations/color.md +81 -0
  168. package/guidelines/foundations/icons.md +55 -0
  169. package/guidelines/foundations/spacing.md +51 -0
  170. package/guidelines/foundations/typography.md +63 -0
  171. package/guidelines/setup.md +42 -0
  172. package/package.json +5 -5
  173. package/dist/colors-CY4JXVHj.d.cts +0 -137
  174. package/dist/colors-CY4JXVHj.d.ts +0 -137
  175. package/dist/layout/Grid/GapGrid/index.cjs +0 -32
  176. package/dist/layout/Grid/GapGrid/index.d.cts +0 -12
  177. package/dist/layout/Grid/GapGrid/index.d.ts +0 -12
  178. package/dist/layout/Grid/GapGrid/index.js +0 -11
@@ -12,123 +12,7 @@ var gridColumns = {
12
12
  };
13
13
 
14
14
  // src/tokens/colors.ts
15
- var colors = {
16
- xplat: {
17
- red: {
18
- 50: "#FFF0F0",
19
- 100: "#FFDDDE",
20
- 200: "#FFC1C2",
21
- 300: "#FF9698",
22
- 400: "#FF5A5D",
23
- 500: "#FF272B",
24
- 600: "#F80409",
25
- 700: "#D40105",
26
- 800: "#AE0609",
27
- 900: "#900C0F"
28
- },
29
- green: {
30
- 50: "#E5F6EA",
31
- 100: "#C1E7CC",
32
- 200: "#98D8AC",
33
- 300: "#6CCA8B",
34
- 400: "#47BE72",
35
- 500: "#10B259",
36
- 600: "#00A34F",
37
- 700: "#009143",
38
- 800: "#007F38",
39
- 900: "#006024"
40
- },
41
- orange: {
42
- 50: "#FFF8EC",
43
- 100: "#FFF0D3",
44
- 200: "#FFDDA5",
45
- 300: "#FFC46D",
46
- 400: "#FF9F32",
47
- 500: "#FF820A",
48
- 600: "#FF6900",
49
- 700: "#CC4B02",
50
- 800: "#A13A0B",
51
- 900: "#82320C"
52
- },
53
- yellow: {
54
- 50: "#FFFDE7",
55
- 100: "#FFFAC1",
56
- 200: "#FFF186",
57
- 300: "#FFE041",
58
- 400: "#FFCC0D",
59
- 500: "#F0B100",
60
- 600: "#D18800",
61
- 700: "#A66002",
62
- 800: "#894B0A",
63
- 900: "#743D0F"
64
- },
65
- blue: {
66
- 50: "#F1F4FD",
67
- 100: "#DFE7FA",
68
- 200: "#C5D4F8",
69
- 300: "#9EB8F2",
70
- 400: "#7093EA",
71
- 500: "#4D6DE3",
72
- 600: "#3950D7",
73
- 700: "#303EC5",
74
- 800: "#2D35A0",
75
- 900: "#29317F"
76
- },
77
- lightblue: {
78
- 50: "#EEFAFF",
79
- 100: "#D9F4FF",
80
- 200: "#BBEDFF",
81
- 300: "#8DE3FF",
82
- 400: "#57D0FF",
83
- 500: "#30B6FF",
84
- 600: "#1999F7",
85
- 700: "#1280E3",
86
- 800: "#1566B8",
87
- 900: "#175791"
88
- },
89
- purple: {
90
- 50: "#FBF6FE",
91
- 100: "#F5EAFD",
92
- 200: "#EDD8FC",
93
- 300: "#E0BAF8",
94
- 400: "#CD8DF3",
95
- 500: "#B961EB",
96
- 600: "#A541DC",
97
- 700: "#9230C5",
98
- 800: "#782B9E",
99
- 900: "#62247F"
100
- },
101
- pink: {
102
- 50: "#FFF4FE",
103
- 100: "#FFE7FD",
104
- 200: "#FFCFFA",
105
- 300: "#FEA9F1",
106
- 400: "#FD75E7",
107
- 500: "#F553DA",
108
- 600: "#D821B6",
109
- 700: "#B31892",
110
- 800: "#921676",
111
- 900: "#781761"
112
- },
113
- neutral: {
114
- 50: "#FAFAFA",
115
- 100: "#F5F5F5",
116
- 200: "#E5E5E5",
117
- 300: "#D4D4D4",
118
- 400: "#A1A1A1",
119
- 500: "#737373",
120
- 600: "#525252",
121
- 700: "#404040",
122
- 800: "#262626",
123
- 900: "#171717"
124
- },
125
- black: "#000000",
126
- white: "#FFFFFF"
127
- },
128
- test: {
129
- default: "#ffffff"
130
- }
131
- };
15
+ import { primitive, semantic } from "@x-plat/tokens-core";
132
16
 
133
17
  // src/tokens/svg/action/CopyIcon.tsx
134
18
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -2410,9 +2294,9 @@ var BookIcon = () => /* @__PURE__ */ jsx127(
2410
2294
  );
2411
2295
  var BookIcon_default = BookIcon;
2412
2296
 
2413
- // src/tokens/svg/file/BookOpenIcon.tsx
2297
+ // src/tokens/svg/file/BookmarkIcon.tsx
2414
2298
  import { jsx as jsx128 } from "react/jsx-runtime";
2415
- var BookOpenIcon = () => /* @__PURE__ */ jsx128(
2299
+ var BookmarkIcon = () => /* @__PURE__ */ jsx128(
2416
2300
  "svg",
2417
2301
  {
2418
2302
  xmlns: "http://www.w3.org/2000/svg",
@@ -2420,14 +2304,14 @@ var BookOpenIcon = () => /* @__PURE__ */ jsx128(
2420
2304
  height: "1em",
2421
2305
  viewBox: "0 0 20 20",
2422
2306
  fill: "none",
2423
- children: /* @__PURE__ */ jsx128("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.66699 1.75C7.74978 1.75013 8.78903 2.18063 9.55469 2.94629C9.71947 3.11114 9.86728 3.28969 10 3.47754C10.1329 3.28956 10.2813 3.11125 10.4463 2.94629C11.212 2.18059 12.2502 1.75009 13.333 1.75H18.333C18.7472 1.75 19.083 2.08579 19.083 2.5V15C19.083 15.4142 18.7472 15.75 18.333 15.75H12.5C12.0359 15.75 11.5909 15.9345 11.2627 16.2627C10.9345 16.5909 10.75 17.0359 10.75 17.5L10.7461 17.5771C10.7364 17.6716 10.7094 17.761 10.668 17.8418C10.6473 17.8821 10.623 17.9204 10.5957 17.9561C10.4586 18.1348 10.2427 18.25 10 18.25L9.92285 18.2461C9.903 18.2441 9.88363 18.2399 9.86426 18.2363C9.86104 18.2357 9.85769 18.236 9.85449 18.2354C9.83874 18.2323 9.82398 18.2257 9.80859 18.2217C9.777 18.2133 9.74564 18.2056 9.71582 18.1934C9.69645 18.1854 9.67868 18.1745 9.66016 18.165C9.63759 18.1535 9.61492 18.1426 9.59375 18.1289C9.57353 18.1158 9.55495 18.1008 9.53613 18.0859C9.5185 18.072 9.50067 18.0584 9.48438 18.043C9.46761 18.0271 9.45274 18.0096 9.4375 17.9922C9.42115 17.9735 9.40508 17.9548 9.39062 17.9346C9.3792 17.9186 9.36954 17.9016 9.35938 17.8848C9.34577 17.8622 9.3325 17.8395 9.32129 17.8154C9.31153 17.7945 9.30373 17.7729 9.2959 17.751C9.28823 17.7295 9.2811 17.7079 9.27539 17.6855C9.26017 17.626 9.25 17.5643 9.25 17.5C9.25 17.036 9.06534 16.5909 8.7373 16.2627C8.40925 15.9347 7.96388 15.7501 7.5 15.75H1.66699C1.25278 15.75 0.916016 15.4142 0.916016 15V2.5C0.916016 2.08579 1.25278 1.75 1.66699 1.75H6.66699ZM2.41699 14.25H7.5C8.1248 14.2501 8.7316 14.4305 9.25 14.7617V5.83301C9.24991 5.14825 8.97818 4.49117 8.49414 4.00684C8.00979 3.52248 7.35196 3.25013 6.66699 3.25H2.41699V14.25ZM13.333 3.25C12.648 3.25009 11.9912 3.52244 11.5068 4.00684C11.0224 4.49123 10.7501 5.14798 10.75 5.83301V14.7617C11.2686 14.4303 11.8749 14.25 12.5 14.25H17.583V3.25H13.333Z", fill: "currentColor" })
2307
+ children: /* @__PURE__ */ jsx128("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.167 1.75C14.8078 1.75013 15.4229 2.00491 15.876 2.45801C16.3289 2.91118 16.584 3.52624 16.584 4.16699V17.5C16.584 17.7808 16.4263 18.0384 16.1768 18.167C15.9271 18.2954 15.626 18.2734 15.3975 18.1104L10 14.2539L4.60254 18.1104C4.37419 18.2733 4.07377 18.2951 3.82422 18.167C3.57442 18.0384 3.41602 17.7809 3.41602 17.5V4.16699C3.41602 3.52605 3.67179 2.91122 4.125 2.45801C4.57819 2.00495 5.19316 1.75 5.83398 1.75H14.167ZM5.83398 3.25C5.59098 3.25 5.35743 3.3468 5.18555 3.51855C5.01364 3.69046 4.91699 3.92388 4.91699 4.16699V16.042L9.56445 12.7227L9.66602 12.6621C9.91127 12.54 10.2084 12.5597 10.4365 12.7227L15.084 16.042V4.16699C15.084 3.92407 14.9871 3.69042 14.8154 3.51855C14.6436 3.34676 14.4099 3.25013 14.167 3.25H5.83398Z", fill: "currentColor" })
2424
2308
  }
2425
2309
  );
2426
- var BookOpenIcon_default = BookOpenIcon;
2310
+ var BookmarkIcon_default = BookmarkIcon;
2427
2311
 
2428
- // src/tokens/svg/file/BookmarkIcon.tsx
2312
+ // src/tokens/svg/file/BookOpenIcon.tsx
2429
2313
  import { jsx as jsx129 } from "react/jsx-runtime";
2430
- var BookmarkIcon = () => /* @__PURE__ */ jsx129(
2314
+ var BookOpenIcon = () => /* @__PURE__ */ jsx129(
2431
2315
  "svg",
2432
2316
  {
2433
2317
  xmlns: "http://www.w3.org/2000/svg",
@@ -2435,10 +2319,10 @@ var BookmarkIcon = () => /* @__PURE__ */ jsx129(
2435
2319
  height: "1em",
2436
2320
  viewBox: "0 0 20 20",
2437
2321
  fill: "none",
2438
- children: /* @__PURE__ */ jsx129("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.167 1.75C14.8078 1.75013 15.4229 2.00491 15.876 2.45801C16.3289 2.91118 16.584 3.52624 16.584 4.16699V17.5C16.584 17.7808 16.4263 18.0384 16.1768 18.167C15.9271 18.2954 15.626 18.2734 15.3975 18.1104L10 14.2539L4.60254 18.1104C4.37419 18.2733 4.07377 18.2951 3.82422 18.167C3.57442 18.0384 3.41602 17.7809 3.41602 17.5V4.16699C3.41602 3.52605 3.67179 2.91122 4.125 2.45801C4.57819 2.00495 5.19316 1.75 5.83398 1.75H14.167ZM5.83398 3.25C5.59098 3.25 5.35743 3.3468 5.18555 3.51855C5.01364 3.69046 4.91699 3.92388 4.91699 4.16699V16.042L9.56445 12.7227L9.66602 12.6621C9.91127 12.54 10.2084 12.5597 10.4365 12.7227L15.084 16.042V4.16699C15.084 3.92407 14.9871 3.69042 14.8154 3.51855C14.6436 3.34676 14.4099 3.25013 14.167 3.25H5.83398Z", fill: "currentColor" })
2322
+ children: /* @__PURE__ */ jsx129("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.66699 1.75C7.74978 1.75013 8.78903 2.18063 9.55469 2.94629C9.71947 3.11114 9.86728 3.28969 10 3.47754C10.1329 3.28956 10.2813 3.11125 10.4463 2.94629C11.212 2.18059 12.2502 1.75009 13.333 1.75H18.333C18.7472 1.75 19.083 2.08579 19.083 2.5V15C19.083 15.4142 18.7472 15.75 18.333 15.75H12.5C12.0359 15.75 11.5909 15.9345 11.2627 16.2627C10.9345 16.5909 10.75 17.0359 10.75 17.5L10.7461 17.5771C10.7364 17.6716 10.7094 17.761 10.668 17.8418C10.6473 17.8821 10.623 17.9204 10.5957 17.9561C10.4586 18.1348 10.2427 18.25 10 18.25L9.92285 18.2461C9.903 18.2441 9.88363 18.2399 9.86426 18.2363C9.86104 18.2357 9.85769 18.236 9.85449 18.2354C9.83874 18.2323 9.82398 18.2257 9.80859 18.2217C9.777 18.2133 9.74564 18.2056 9.71582 18.1934C9.69645 18.1854 9.67868 18.1745 9.66016 18.165C9.63759 18.1535 9.61492 18.1426 9.59375 18.1289C9.57353 18.1158 9.55495 18.1008 9.53613 18.0859C9.5185 18.072 9.50067 18.0584 9.48438 18.043C9.46761 18.0271 9.45274 18.0096 9.4375 17.9922C9.42115 17.9735 9.40508 17.9548 9.39062 17.9346C9.3792 17.9186 9.36954 17.9016 9.35938 17.8848C9.34577 17.8622 9.3325 17.8395 9.32129 17.8154C9.31153 17.7945 9.30373 17.7729 9.2959 17.751C9.28823 17.7295 9.2811 17.7079 9.27539 17.6855C9.26017 17.626 9.25 17.5643 9.25 17.5C9.25 17.036 9.06534 16.5909 8.7373 16.2627C8.40925 15.9347 7.96388 15.7501 7.5 15.75H1.66699C1.25278 15.75 0.916016 15.4142 0.916016 15V2.5C0.916016 2.08579 1.25278 1.75 1.66699 1.75H6.66699ZM2.41699 14.25H7.5C8.1248 14.2501 8.7316 14.4305 9.25 14.7617V5.83301C9.24991 5.14825 8.97818 4.49117 8.49414 4.00684C8.00979 3.52248 7.35196 3.25013 6.66699 3.25H2.41699V14.25ZM13.333 3.25C12.648 3.25009 11.9912 3.52244 11.5068 4.00684C11.0224 4.49123 10.7501 5.14798 10.75 5.83301V14.7617C11.2686 14.4303 11.8749 14.25 12.5 14.25H17.583V3.25H13.333Z", fill: "currentColor" })
2439
2323
  }
2440
2324
  );
2441
- var BookmarkIcon_default = BookmarkIcon;
2325
+ var BookOpenIcon_default = BookOpenIcon;
2442
2326
 
2443
2327
  // src/tokens/svg/file/ClipboardIcon.tsx
2444
2328
  import { jsx as jsx130 } from "react/jsx-runtime";
@@ -5317,9 +5201,9 @@ var UserPlusIcon = () => /* @__PURE__ */ jsxs178(
5317
5201
  );
5318
5202
  var UserPlusIcon_default = UserPlusIcon;
5319
5203
 
5320
- // src/tokens/svg/user/UserXIcon.tsx
5204
+ // src/tokens/svg/user/UsersIcon.tsx
5321
5205
  import { jsx as jsx281, jsxs as jsxs179 } from "react/jsx-runtime";
5322
- var UserXIcon = () => /* @__PURE__ */ jsxs179(
5206
+ var UsersIcon = () => /* @__PURE__ */ jsxs179(
5323
5207
  "svg",
5324
5208
  {
5325
5209
  xmlns: "http://www.w3.org/2000/svg",
@@ -5328,17 +5212,18 @@ var UserXIcon = () => /* @__PURE__ */ jsxs179(
5328
5212
  viewBox: "0 0 20 20",
5329
5213
  fill: "none",
5330
5214
  children: [
5331
- /* @__PURE__ */ jsx281("path", { d: "M10.001 11.75C11.0837 11.7502 12.1221 12.1807 12.8877 12.9463C13.6532 13.712 14.0839 14.7503 14.084 15.833V17.5C14.084 17.9141 13.748 18.2497 13.334 18.25C12.9198 18.25 12.584 17.9142 12.584 17.5V15.833C12.5839 15.1481 12.3114 14.4912 11.8271 14.0068C11.3429 13.5226 10.6858 13.2502 10.001 13.25H4.16699C3.48208 13.2501 2.82519 13.5226 2.34082 14.0068C1.85643 14.4912 1.58407 15.148 1.58398 15.833V17.5C1.58398 17.9141 1.24797 18.2497 0.833984 18.25C0.419771 18.25 0.0830079 17.9142 0.0830078 17.5V15.833C0.083094 14.7502 0.514577 13.712 1.28027 12.9463C2.04595 12.1807 3.08426 11.7501 4.16699 11.75H10.001Z", fill: "currentColor" }),
5332
- /* @__PURE__ */ jsx281("path", { d: "M18.6367 6.13672C18.9296 5.84399 19.4044 5.84388 19.6973 6.13672C19.9898 6.42958 19.9899 6.90445 19.6973 7.19727L18.1436 8.75L19.6973 10.3037C19.9897 10.5966 19.99 11.0715 19.6973 11.3643C19.4045 11.6569 18.9296 11.6567 18.6367 11.3643L17.083 9.81055L15.5303 11.3643C15.2375 11.6568 14.7625 11.6568 14.4697 11.3643C14.1769 11.0715 14.1771 10.5966 14.4697 10.3037L16.0225 8.75L14.4697 7.19727C14.1769 6.90441 14.177 6.42962 14.4697 6.13672C14.7626 5.84383 15.2374 5.84383 15.5303 6.13672L17.083 7.68945L18.6367 6.13672Z", fill: "currentColor" }),
5333
- /* @__PURE__ */ jsx281("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.08301 1.75C9.33806 1.75 11.1668 3.57799 11.167 5.83301C11.167 8.08817 9.33817 9.91699 7.08301 9.91699C4.82799 9.91682 3 8.08806 3 5.83301C3.00018 3.5781 4.8281 1.75018 7.08301 1.75ZM7.08301 3.25C5.65653 3.25018 4.50018 4.40653 4.5 5.83301C4.5 7.25963 5.65642 8.41682 7.08301 8.41699C8.50974 8.41699 9.66699 7.25974 9.66699 5.83301C9.66682 4.40642 8.50963 3.25 7.08301 3.25Z", fill: "currentColor" })
5215
+ /* @__PURE__ */ jsx281("path", { d: "M10.834 11.75C11.9168 11.7501 12.956 12.1806 13.7217 12.9463C14.487 13.7119 14.9169 14.7504 14.917 15.833V17.5C14.917 17.9141 14.581 18.2497 14.167 18.25C13.7529 18.2498 13.417 17.9141 13.417 17.5V15.833C13.4169 15.1483 13.1452 14.4912 12.6611 14.0068C12.1768 13.5225 11.519 13.2501 10.834 13.25H4.16699C3.48208 13.2501 2.82519 13.5226 2.34082 14.0068C1.85643 14.4912 1.58407 15.148 1.58398 15.833V17.5C1.58398 17.9141 1.24797 18.2497 0.833984 18.25C0.419771 18.25 0.0830079 17.9142 0.0830078 17.5V15.833C0.083094 14.7502 0.514577 13.712 1.28027 12.9463C2.04595 12.1807 3.08426 11.7501 4.16699 11.75H10.834Z", fill: "currentColor" }),
5216
+ /* @__PURE__ */ jsx281("path", { d: "M15.9404 12.4209C16.044 12.0199 16.4535 11.7783 16.8545 11.8818C17.7302 12.1081 18.5064 12.6192 19.0605 13.334C19.6147 14.049 19.9163 14.9284 19.917 15.833V17.5C19.9169 17.9139 19.5809 18.2497 19.167 18.25C18.7529 18.25 18.4171 17.9141 18.417 17.5V15.834L18.4082 15.6201C18.3667 15.1243 18.1816 14.6487 17.875 14.2529C17.5245 13.8009 17.0333 13.4781 16.4795 13.335C16.0785 13.2314 15.837 12.8219 15.9404 12.4209Z", fill: "currentColor" }),
5217
+ /* @__PURE__ */ jsx281("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.5 1.75C9.75483 1.75026 11.5838 3.57816 11.584 5.83301C11.584 8.08801 9.75494 9.91673 7.5 9.91699C5.24499 9.91682 3.41699 8.08806 3.41699 5.83301C3.41717 3.5781 5.2451 1.75018 7.5 1.75ZM7.5 3.25C6.07352 3.25018 4.91717 4.40653 4.91699 5.83301C4.91699 7.25963 6.07341 8.41682 7.5 8.41699C8.92651 8.41673 10.084 7.25958 10.084 5.83301C10.0838 4.40658 8.9264 3.25026 7.5 3.25Z", fill: "currentColor" }),
5218
+ /* @__PURE__ */ jsx281("path", { d: "M12.6074 2.42285C12.7101 2.02173 13.1184 1.77939 13.5195 1.88184C14.3976 2.10679 15.1766 2.61793 15.7324 3.33398C16.2882 4.05014 16.5908 4.93138 16.5908 5.83789C16.5907 6.74433 16.2882 7.62574 15.7324 8.3418C15.1766 9.05767 14.3975 9.56807 13.5195 9.79297C13.1186 9.89542 12.7103 9.65377 12.6074 9.25293C12.5047 8.85166 12.7472 8.44258 13.1484 8.33984C13.7037 8.19746 14.1963 7.87464 14.5479 7.42188C14.8994 6.96892 15.0907 6.41126 15.0908 5.83789C15.0908 5.26453 14.8993 4.70692 14.5479 4.25391C14.1963 3.80105 13.7037 3.47737 13.1484 3.33496C12.7474 3.23227 12.5051 2.82394 12.6074 2.42285Z", fill: "currentColor" })
5334
5219
  ]
5335
5220
  }
5336
5221
  );
5337
- var UserXIcon_default = UserXIcon;
5222
+ var UsersIcon_default = UsersIcon;
5338
5223
 
5339
- // src/tokens/svg/user/UsersIcon.tsx
5224
+ // src/tokens/svg/user/UserXIcon.tsx
5340
5225
  import { jsx as jsx282, jsxs as jsxs180 } from "react/jsx-runtime";
5341
- var UsersIcon = () => /* @__PURE__ */ jsxs180(
5226
+ var UserXIcon = () => /* @__PURE__ */ jsxs180(
5342
5227
  "svg",
5343
5228
  {
5344
5229
  xmlns: "http://www.w3.org/2000/svg",
@@ -5347,14 +5232,13 @@ var UsersIcon = () => /* @__PURE__ */ jsxs180(
5347
5232
  viewBox: "0 0 20 20",
5348
5233
  fill: "none",
5349
5234
  children: [
5350
- /* @__PURE__ */ jsx282("path", { d: "M10.834 11.75C11.9168 11.7501 12.956 12.1806 13.7217 12.9463C14.487 13.7119 14.9169 14.7504 14.917 15.833V17.5C14.917 17.9141 14.581 18.2497 14.167 18.25C13.7529 18.2498 13.417 17.9141 13.417 17.5V15.833C13.4169 15.1483 13.1452 14.4912 12.6611 14.0068C12.1768 13.5225 11.519 13.2501 10.834 13.25H4.16699C3.48208 13.2501 2.82519 13.5226 2.34082 14.0068C1.85643 14.4912 1.58407 15.148 1.58398 15.833V17.5C1.58398 17.9141 1.24797 18.2497 0.833984 18.25C0.419771 18.25 0.0830079 17.9142 0.0830078 17.5V15.833C0.083094 14.7502 0.514577 13.712 1.28027 12.9463C2.04595 12.1807 3.08426 11.7501 4.16699 11.75H10.834Z", fill: "currentColor" }),
5351
- /* @__PURE__ */ jsx282("path", { d: "M15.9404 12.4209C16.044 12.0199 16.4535 11.7783 16.8545 11.8818C17.7302 12.1081 18.5064 12.6192 19.0605 13.334C19.6147 14.049 19.9163 14.9284 19.917 15.833V17.5C19.9169 17.9139 19.5809 18.2497 19.167 18.25C18.7529 18.25 18.4171 17.9141 18.417 17.5V15.834L18.4082 15.6201C18.3667 15.1243 18.1816 14.6487 17.875 14.2529C17.5245 13.8009 17.0333 13.4781 16.4795 13.335C16.0785 13.2314 15.837 12.8219 15.9404 12.4209Z", fill: "currentColor" }),
5352
- /* @__PURE__ */ jsx282("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.5 1.75C9.75483 1.75026 11.5838 3.57816 11.584 5.83301C11.584 8.08801 9.75494 9.91673 7.5 9.91699C5.24499 9.91682 3.41699 8.08806 3.41699 5.83301C3.41717 3.5781 5.2451 1.75018 7.5 1.75ZM7.5 3.25C6.07352 3.25018 4.91717 4.40653 4.91699 5.83301C4.91699 7.25963 6.07341 8.41682 7.5 8.41699C8.92651 8.41673 10.084 7.25958 10.084 5.83301C10.0838 4.40658 8.9264 3.25026 7.5 3.25Z", fill: "currentColor" }),
5353
- /* @__PURE__ */ jsx282("path", { d: "M12.6074 2.42285C12.7101 2.02173 13.1184 1.77939 13.5195 1.88184C14.3976 2.10679 15.1766 2.61793 15.7324 3.33398C16.2882 4.05014 16.5908 4.93138 16.5908 5.83789C16.5907 6.74433 16.2882 7.62574 15.7324 8.3418C15.1766 9.05767 14.3975 9.56807 13.5195 9.79297C13.1186 9.89542 12.7103 9.65377 12.6074 9.25293C12.5047 8.85166 12.7472 8.44258 13.1484 8.33984C13.7037 8.19746 14.1963 7.87464 14.5479 7.42188C14.8994 6.96892 15.0907 6.41126 15.0908 5.83789C15.0908 5.26453 14.8993 4.70692 14.5479 4.25391C14.1963 3.80105 13.7037 3.47737 13.1484 3.33496C12.7474 3.23227 12.5051 2.82394 12.6074 2.42285Z", fill: "currentColor" })
5235
+ /* @__PURE__ */ jsx282("path", { d: "M10.001 11.75C11.0837 11.7502 12.1221 12.1807 12.8877 12.9463C13.6532 13.712 14.0839 14.7503 14.084 15.833V17.5C14.084 17.9141 13.748 18.2497 13.334 18.25C12.9198 18.25 12.584 17.9142 12.584 17.5V15.833C12.5839 15.1481 12.3114 14.4912 11.8271 14.0068C11.3429 13.5226 10.6858 13.2502 10.001 13.25H4.16699C3.48208 13.2501 2.82519 13.5226 2.34082 14.0068C1.85643 14.4912 1.58407 15.148 1.58398 15.833V17.5C1.58398 17.9141 1.24797 18.2497 0.833984 18.25C0.419771 18.25 0.0830079 17.9142 0.0830078 17.5V15.833C0.083094 14.7502 0.514577 13.712 1.28027 12.9463C2.04595 12.1807 3.08426 11.7501 4.16699 11.75H10.001Z", fill: "currentColor" }),
5236
+ /* @__PURE__ */ jsx282("path", { d: "M18.6367 6.13672C18.9296 5.84399 19.4044 5.84388 19.6973 6.13672C19.9898 6.42958 19.9899 6.90445 19.6973 7.19727L18.1436 8.75L19.6973 10.3037C19.9897 10.5966 19.99 11.0715 19.6973 11.3643C19.4045 11.6569 18.9296 11.6567 18.6367 11.3643L17.083 9.81055L15.5303 11.3643C15.2375 11.6568 14.7625 11.6568 14.4697 11.3643C14.1769 11.0715 14.1771 10.5966 14.4697 10.3037L16.0225 8.75L14.4697 7.19727C14.1769 6.90441 14.177 6.42962 14.4697 6.13672C14.7626 5.84383 15.2374 5.84383 15.5303 6.13672L17.083 7.68945L18.6367 6.13672Z", fill: "currentColor" }),
5237
+ /* @__PURE__ */ jsx282("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.08301 1.75C9.33806 1.75 11.1668 3.57799 11.167 5.83301C11.167 8.08817 9.33817 9.91699 7.08301 9.91699C4.82799 9.91682 3 8.08806 3 5.83301C3.00018 3.5781 4.8281 1.75018 7.08301 1.75ZM7.08301 3.25C5.65653 3.25018 4.50018 4.40653 4.5 5.83301C4.5 7.25963 5.65642 8.41682 7.08301 8.41699C8.50974 8.41699 9.66699 7.25974 9.66699 5.83301C9.66682 4.40642 8.50963 3.25 7.08301 3.25Z", fill: "currentColor" })
5354
5238
  ]
5355
5239
  }
5356
5240
  );
5357
- var UsersIcon_default = UsersIcon;
5241
+ var UserXIcon_default = UserXIcon;
5358
5242
 
5359
5243
  // src/tokens/svg/weather/CloudDrizzleIcon.tsx
5360
5244
  import { jsx as jsx283, jsxs as jsxs181 } from "react/jsx-runtime";
@@ -5597,6 +5481,9 @@ var WindIcon = () => /* @__PURE__ */ jsxs188(
5597
5481
  }
5598
5482
  );
5599
5483
  var WindIcon_default = WindIcon;
5484
+
5485
+ // src/tokens/index.ts
5486
+ import { cssVar } from "@x-plat/tokens-core";
5600
5487
  export {
5601
5488
  ActivityIcon_default as ActivityIcon,
5602
5489
  AirplayIcon_default as AirplayIcon,
@@ -5895,6 +5782,8 @@ export {
5895
5782
  ZoomInIcon_default as ZoomInIcon,
5896
5783
  ZoomOutIcon_default as ZoomOutIcon,
5897
5784
  breakpoints,
5898
- colors,
5899
- gridColumns
5785
+ cssVar,
5786
+ gridColumns,
5787
+ primitive,
5788
+ semantic
5900
5789
  };
@@ -0,0 +1,57 @@
1
+ # @x-plat/design-system Guidelines
2
+
3
+ React 기반 디자인 시스템 라이브러리이다. Figma Make Kit과 1:1 대응한다.
4
+
5
+ ---
6
+
7
+ ## 핵심 규칙
8
+
9
+ 1. **컴포넌트에 `color`, `className`, `style` prop이 없다.** 색상과 스타일은 내부 semantic 토큰으로 고정한다.
10
+ 2. **레이아웃 조절은 래퍼 `<div>`로 감싸서 래퍼에만 스타일을 적용한다.**
11
+ 3. **CSS로 DS 컴포넌트 스타일을 오버라이드하지 않는다.**
12
+
13
+ ```tsx
14
+ // 올바른 방법
15
+ <div className="button-wrapper">
16
+ <Button type="primary">저장</Button>
17
+ </div>
18
+
19
+ // 금지
20
+ <Button style={{ marginBottom: "1rem" }}>저장</Button>
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 읽기 순서
26
+
27
+ 아래 순서로 읽는다.
28
+
29
+ 1. **[설치 및 설정](./setup.md)** - CSS/컴포넌트 import, ToastProvider 설정
30
+ 2. **파운데이션**
31
+ - [컬러](./foundations/color.md) - 4레이어 semantic 토큰
32
+ - [스페이싱](./foundations/spacing.md) - space, radius, stroke
33
+ - [타이포그래피](./foundations/typography.md) - font, size, weight
34
+ - [아이콘](./foundations/icons.md) - import, 크기/색상, 카테고리
35
+ 3. **컴포넌트**
36
+ - [Button](./components/button.md)
37
+ - [Input](./components/input.md) - Input, PasswordInput, TextArea
38
+ - [Select](./components/select.md)
39
+ - [Table](./components/table.md)
40
+ - [피드백](./components/feedback.md) - Alert, Toast, Badge
41
+ - [오버레이](./components/overlay.md) - Modal, Drawer, PopOver, Tooltip
42
+ - [폼 컨트롤](./components/form.md) - CheckBox, Radio, Switch
43
+ - [Chip & Tag](./components/chip-tag.md)
44
+ - [내비게이션](./components/navigation.md) - Tab, CardTab, Breadcrumb, Pagination, Steps
45
+ - [DatePicker](./components/datepicker.md) - Calendar, DatePicker 4종
46
+ - [Accordion](./components/accordion.md)
47
+ - [Avatar](./components/avatar.md)
48
+ - [Card](./components/card.md)
49
+ - [Chart](./components/chart.md)
50
+ - [데이터 표시](./components/data-display.md) - Divider, EmptyState, Skeleton, Spinner
51
+ - [Dropdown](./components/dropdown.md)
52
+ - [파일 & 미디어](./components/file-media.md) - FileUpload, ImageSelector, Video
53
+ - [Swiper](./components/swiper.md)
54
+ - [HtmlTypeWriter](./components/html-typewriter.md)
55
+ 4. **컴포지션**
56
+ - [Grid](./composition/grid.md) - Grid 시스템, 위젯 패턴
57
+ - [Layout](./composition/layout.md) - Layout, Header, SideBar
@@ -0,0 +1,72 @@
1
+ # Accordion
2
+
3
+ 접이식 패널을 표시한다. 단일/다중 모드를 지원하며, controlled/uncontrolled 모두 가능하다.
4
+
5
+ ```tsx
6
+ import { Accordion } from "@xplat/design-system";
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ### 공통
12
+
13
+ | Prop | 타입 | 기본값 | 설명 |
14
+ |------|------|--------|------|
15
+ | items `*` | `AccordionItemData[]` | — | 아코디언 아이템 배열 |
16
+ | multiple | `boolean` | `false` | 다중 열기 허용 |
17
+
18
+ ### AccordionItemData
19
+
20
+ | 필드 | 타입 | 설명 |
21
+ |------|------|------|
22
+ | key `*` | `string` | 고유 식별자 |
23
+ | title `*` | `ReactNode` | 헤더 영역 |
24
+ | content `*` | `ReactNode` | 본문 영역 |
25
+
26
+ ### 단일 모드 (multiple 미지정 또는 false)
27
+
28
+ | Prop | 타입 | 설명 |
29
+ |------|------|------|
30
+ | activeKey | `string \| null` | 열린 아이템 key (controlled) |
31
+ | defaultActiveKey | `string` | 초기 열린 아이템 key (uncontrolled) |
32
+ | onChange | `(key: string \| null) => void` | 변경 콜백 |
33
+
34
+ ### 다중 모드 (multiple={true})
35
+
36
+ | Prop | 타입 | 설명 |
37
+ |------|------|------|
38
+ | activeKeys | `string[]` | 열린 아이템 key 목록 (controlled) |
39
+ | defaultActiveKeys | `string[]` | 초기 열린 아이템 key 목록 (uncontrolled) |
40
+ | onChange | `(keys: string[]) => void` | 변경 콜백 |
41
+
42
+ ---
43
+
44
+ ## 사용 예시
45
+
46
+ ### 단일 모드 (uncontrolled)
47
+
48
+ ```tsx
49
+ <Accordion
50
+ defaultActiveKey="faq-1"
51
+ items={[
52
+ { key: "faq-1", title: "질문 1", content: "답변 1" },
53
+ { key: "faq-2", title: "질문 2", content: "답변 2" },
54
+ ]}
55
+ />
56
+ ```
57
+
58
+ ### 다중 모드 (controlled)
59
+
60
+ ```tsx
61
+ const [openKeys, setOpenKeys] = useState<string[]>([]);
62
+
63
+ <Accordion
64
+ multiple
65
+ activeKeys={openKeys}
66
+ onChange={setOpenKeys}
67
+ items={[
68
+ { key: "a", title: "섹션 A", content: <div>내용 A</div> },
69
+ { key: "b", title: "섹션 B", content: <div>내용 B</div> },
70
+ ]}
71
+ />
72
+ ```
@@ -0,0 +1,35 @@
1
+ # Avatar
2
+
3
+ 프로필 이미지 또는 이니셜을 표시한다. `src`가 있으면 이미지를 렌더하고, 없으면 `name` 기반 이니셜을 표시한다. 둘 다 없으면 기본 사람 아이콘을 표시한다.
4
+
5
+ ```tsx
6
+ import { Avatar } from "@xplat/design-system";
7
+ ```
8
+
9
+ ## Props
10
+
11
+ | Prop | 타입 | 기본값 | 설명 |
12
+ |------|------|--------|------|
13
+ | src | `string` | — | 이미지 URL |
14
+ | alt | `string` | name 또는 `"avatar"` | 이미지 alt 텍스트 |
15
+ | name | `string` | — | 이니셜 생성용 이름 (예: `"홍 길동"` → `"홍길"`) |
16
+ | size | `"sm" \| "md" \| "lg"` | `"md"` | 크기 |
17
+
18
+ ## 색상 자동 배정
19
+
20
+ `name`의 첫 글자 charCode 기반으로 8가지 categorical color 중 하나를 자동 배정한다. 같은 이름은 항상 같은 색상이 된다.
21
+
22
+ ---
23
+
24
+ ## 사용 예시
25
+
26
+ ```tsx
27
+ // 이미지
28
+ <Avatar src="/profile.jpg" name="김철수" size="lg" />
29
+
30
+ // 이니셜 (이미지 없음)
31
+ <Avatar name="홍 길동" size="md" />
32
+
33
+ // 기본 아이콘 (이름도 없음)
34
+ <Avatar size="sm" />
35
+ ```
@@ -0,0 +1,58 @@
1
+ # Button
2
+
3
+ ## Type
4
+
5
+ | type | 용도 |
6
+ |------|------|
7
+ | primary | 주요 액션 |
8
+ | secondary | 보조 액션 |
9
+ | danger | 삭제/위험 액션 |
10
+ | ghost | 텍스트만 표시 |
11
+
12
+ ## Size
13
+
14
+ | size | 높이 |
15
+ |------|------|
16
+ | sm | 32px |
17
+ | md | 40px |
18
+ | lg | 48px |
19
+
20
+ ## 상태
21
+
22
+ | 상태 | 설명 |
23
+ |------|------|
24
+ | default | 기본 |
25
+ | hover | 마우스 오버 |
26
+ | pressed (`:active`) | 클릭 중 |
27
+ | focused (`:focus-visible`) | 키보드 포커스 |
28
+ | disabled | 비활성화 |
29
+
30
+ ---
31
+
32
+ ## 올바른 예시
33
+
34
+ ```tsx
35
+ <Button type="primary" size="md">확인</Button>
36
+ <Button type="secondary" size="lg">취소</Button>
37
+ <Button type="danger">삭제</Button>
38
+ <Button type="primary" disabled>비활성</Button>
39
+ ```
40
+
41
+ ## 잘못된 예시
42
+
43
+ ```tsx
44
+ // 금지: style prop 사용
45
+ <Button style={{ backgroundColor: "red" }}>삭제</Button>
46
+
47
+ // 금지: className 사용
48
+ <Button className="custom-btn">확인</Button>
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 유사 컴포넌트 구분
54
+
55
+ | 목적 | 사용할 것 |
56
+ |------|----------|
57
+ | 페이지/외부 링크 이동 | `<a>` 또는 라우터 Link |
58
+ | 액션 실행 | Button |
@@ -0,0 +1,28 @@
1
+ # Card
2
+
3
+ 콘텐츠를 카드 형태로 감싸는 컨테이너이다.
4
+
5
+ ```tsx
6
+ import { Card } from "@xplat/design-system";
7
+ ```
8
+
9
+ ## Props
10
+
11
+ | Prop | 타입 | 기본값 | 설명 |
12
+ |------|------|--------|------|
13
+ | children `*` | `ReactNode` | — | 카드 본문 |
14
+ | title | `string` | — | 카드 상단 제목 |
15
+
16
+ ---
17
+
18
+ ## 사용 예시
19
+
20
+ ```tsx
21
+ <Card title="매출 현황">
22
+ <p>이번 달 매출: 1,200만원</p>
23
+ </Card>
24
+
25
+ <Card>
26
+ <p>제목 없는 카드</p>
27
+ </Card>
28
+ ```
@@ -0,0 +1,58 @@
1
+ # Chart
2
+
3
+ SVG 기반 차트를 렌더한다. line, bar, pie, doughnut 4가지 타입을 지원한다.
4
+
5
+ ```tsx
6
+ import { Chart } from "@xplat/design-system";
7
+ ```
8
+
9
+ ## Props
10
+
11
+ | Prop | 타입 | 기본값 | 설명 |
12
+ |------|------|--------|------|
13
+ | type `*` | `"line" \| "bar" \| "pie" \| "doughnut"` | — | 차트 타입 |
14
+ | data `*` | `Record<string, number[]>` | — | 데이터셋 (key: 시리즈 이름, value: 값 배열) |
15
+ | labels `*` | `string[]` | — | x축 라벨 배열 |
16
+ | tooltip | `boolean` | `true` | 호버 시 툴팁 표시 |
17
+
18
+ ## 색상
19
+
20
+ primitive 팔레트 기반으로 시리즈별 색상을 자동 배정한다. line/bar는 `LINE_BAR_PALETTES`, pie/doughnut는 `PIE_PALETTES`를 사용한다.
21
+
22
+ ---
23
+
24
+ ## 사용 예시
25
+
26
+ ### Line
27
+
28
+ ```tsx
29
+ <Chart
30
+ type="line"
31
+ labels={["1월", "2월", "3월", "4월"]}
32
+ data={{
33
+ 매출: [100, 200, 150, 300],
34
+ 비용: [80, 120, 100, 200],
35
+ }}
36
+ />
37
+ ```
38
+
39
+ ### Bar
40
+
41
+ ```tsx
42
+ <Chart
43
+ type="bar"
44
+ labels={["서울", "부산", "대구"]}
45
+ data={{ 방문자: [500, 300, 200] }}
46
+ />
47
+ ```
48
+
49
+ ### Pie / Doughnut
50
+
51
+ ```tsx
52
+ <Chart
53
+ type="doughnut"
54
+ labels={["모바일", "데스크톱", "태블릿"]}
55
+ data={{ 점유율: [60, 30, 10] }}
56
+ tooltip={false}
57
+ />
58
+ ```
@@ -0,0 +1,49 @@
1
+ # Chip & Tag
2
+
3
+ ## Chip
4
+
5
+ 읽기 전용 라벨이다. 삭제 기능이 없다.
6
+
7
+ ```tsx
8
+ <Chip type="primary">진행중</Chip>
9
+ <Chip type="success">완료</Chip>
10
+ <Chip type="error">실패</Chip>
11
+ ```
12
+
13
+ | type | 용도 |
14
+ |------|------|
15
+ | primary | 기본 강조 |
16
+ | secondary | 보조 |
17
+ | neutral | 중립 |
18
+ | success | 성공 |
19
+ | error | 에러 |
20
+ | warning | 경고 |
21
+ | info | 정보 |
22
+
23
+ ---
24
+
25
+ ## Tag
26
+
27
+ 제거 가능한 태그이다. `onClose`로 삭제를 처리한다.
28
+
29
+ ```tsx
30
+ <Tag onClose={() => handleRemove("react")}>React</Tag>
31
+ <Tag type="categorical" colorIndex={1} onClose={handleRemove}>TypeScript</Tag>
32
+ <Tag disabled>삭제 불가</Tag>
33
+ ```
34
+
35
+ | Prop | 설명 |
36
+ |------|------|
37
+ | type | `"neutral" \| "categorical"` |
38
+ | onClose | 삭제 콜백 |
39
+ | colorIndex | categorical 타입의 색상 인덱스 |
40
+ | disabled | 비활성화 |
41
+
42
+ ---
43
+
44
+ ## 의사결정
45
+
46
+ | 상황 | 사용할 것 |
47
+ |------|----------|
48
+ | 상태/분류 라벨 (삭제 불필요) | Chip |
49
+ | 사용자가 제거할 수 있는 태그 | Tag |