@x-plat/design-system 0.1.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 (165) hide show
  1. package/README.md +123 -0
  2. package/dist/attributes-DJIWir_0.d.cts +7 -0
  3. package/dist/attributes-DJIWir_0.d.ts +7 -0
  4. package/dist/breakpoints-DsXkJgdl.d.cts +35 -0
  5. package/dist/breakpoints-DsXkJgdl.d.ts +35 -0
  6. package/dist/colors-BG91q_uV.d.cts +133 -0
  7. package/dist/colors-BG91q_uV.d.ts +133 -0
  8. package/dist/components/Button/index.cjs +203 -0
  9. package/dist/components/Button/index.css +1231 -0
  10. package/dist/components/Button/index.d.cts +132 -0
  11. package/dist/components/Button/index.d.ts +132 -0
  12. package/dist/components/Button/index.js +176 -0
  13. package/dist/components/Card/index.cjs +56 -0
  14. package/dist/components/Card/index.css +27 -0
  15. package/dist/components/Card/index.d.cts +13 -0
  16. package/dist/components/Card/index.d.ts +13 -0
  17. package/dist/components/Card/index.js +29 -0
  18. package/dist/components/Chart/index.cjs +393 -0
  19. package/dist/components/Chart/index.css +4 -0
  20. package/dist/components/Chart/index.d.cts +10 -0
  21. package/dist/components/Chart/index.d.ts +10 -0
  22. package/dist/components/Chart/index.js +367 -0
  23. package/dist/components/CheckBox/index.cjs +1116 -0
  24. package/dist/components/CheckBox/index.css +598 -0
  25. package/dist/components/CheckBox/index.d.cts +132 -0
  26. package/dist/components/CheckBox/index.d.ts +132 -0
  27. package/dist/components/CheckBox/index.js +1089 -0
  28. package/dist/components/Chip/index.cjs +193 -0
  29. package/dist/components/Chip/index.css +1227 -0
  30. package/dist/components/Chip/index.d.cts +132 -0
  31. package/dist/components/Chip/index.d.ts +132 -0
  32. package/dist/components/Chip/index.js +166 -0
  33. package/dist/components/DatePicker/index.cjs +1653 -0
  34. package/dist/components/DatePicker/index.css +1417 -0
  35. package/dist/components/DatePicker/index.d.cts +56 -0
  36. package/dist/components/DatePicker/index.d.ts +56 -0
  37. package/dist/components/DatePicker/index.js +1613 -0
  38. package/dist/components/HtmlTypeWriter/index.cjs +172 -0
  39. package/dist/components/HtmlTypeWriter/index.css +23 -0
  40. package/dist/components/HtmlTypeWriter/index.d.cts +14 -0
  41. package/dist/components/HtmlTypeWriter/index.d.ts +14 -0
  42. package/dist/components/HtmlTypeWriter/index.js +135 -0
  43. package/dist/components/ImageSelector/index.cjs +1063 -0
  44. package/dist/components/ImageSelector/index.css +85 -0
  45. package/dist/components/ImageSelector/index.d.cts +10 -0
  46. package/dist/components/ImageSelector/index.d.ts +10 -0
  47. package/dist/components/ImageSelector/index.js +1026 -0
  48. package/dist/components/Input/index.cjs +410 -0
  49. package/dist/components/Input/index.css +74 -0
  50. package/dist/components/Input/index.d.cts +23 -0
  51. package/dist/components/Input/index.d.ts +23 -0
  52. package/dist/components/Input/index.js +372 -0
  53. package/dist/components/Modal/index.cjs +101 -0
  54. package/dist/components/Modal/index.css +39 -0
  55. package/dist/components/Modal/index.d.cts +16 -0
  56. package/dist/components/Modal/index.d.ts +16 -0
  57. package/dist/components/Modal/index.js +64 -0
  58. package/dist/components/PopOver/index.cjs +176 -0
  59. package/dist/components/PopOver/index.css +27 -0
  60. package/dist/components/PopOver/index.d.cts +15 -0
  61. package/dist/components/PopOver/index.d.ts +15 -0
  62. package/dist/components/PopOver/index.js +139 -0
  63. package/dist/components/Radio/index.cjs +257 -0
  64. package/dist/components/Radio/index.css +777 -0
  65. package/dist/components/Radio/index.d.cts +154 -0
  66. package/dist/components/Radio/index.d.ts +154 -0
  67. package/dist/components/Radio/index.js +219 -0
  68. package/dist/components/Select/index.cjs +1203 -0
  69. package/dist/components/Select/index.css +136 -0
  70. package/dist/components/Select/index.d.cts +44 -0
  71. package/dist/components/Select/index.d.ts +44 -0
  72. package/dist/components/Select/index.js +1165 -0
  73. package/dist/components/Swiper/index.cjs +144 -0
  74. package/dist/components/Swiper/index.d.cts +24 -0
  75. package/dist/components/Swiper/index.d.ts +24 -0
  76. package/dist/components/Swiper/index.js +128 -0
  77. package/dist/components/Switch/index.cjs +240 -0
  78. package/dist/components/Switch/index.css +780 -0
  79. package/dist/components/Switch/index.d.cts +131 -0
  80. package/dist/components/Switch/index.d.ts +131 -0
  81. package/dist/components/Switch/index.js +203 -0
  82. package/dist/components/Tab/index.cjs +122 -0
  83. package/dist/components/Tab/index.css +59 -0
  84. package/dist/components/Tab/index.d.cts +18 -0
  85. package/dist/components/Tab/index.d.ts +18 -0
  86. package/dist/components/Tab/index.js +85 -0
  87. package/dist/components/Table/index.cjs +384 -0
  88. package/dist/components/Table/index.css +4093 -0
  89. package/dist/components/Table/index.d.cts +174 -0
  90. package/dist/components/Table/index.d.ts +174 -0
  91. package/dist/components/Table/index.js +343 -0
  92. package/dist/components/TextArea/index.cjs +114 -0
  93. package/dist/components/TextArea/index.css +34 -0
  94. package/dist/components/TextArea/index.d.cts +6 -0
  95. package/dist/components/TextArea/index.d.ts +6 -0
  96. package/dist/components/TextArea/index.js +77 -0
  97. package/dist/components/Tooltip/index.cjs +210 -0
  98. package/dist/components/Tooltip/index.css +599 -0
  99. package/dist/components/Tooltip/index.d.cts +134 -0
  100. package/dist/components/Tooltip/index.d.ts +134 -0
  101. package/dist/components/Tooltip/index.js +173 -0
  102. package/dist/components/Video/index.cjs +269 -0
  103. package/dist/components/Video/index.css +71 -0
  104. package/dist/components/Video/index.d.cts +15 -0
  105. package/dist/components/Video/index.d.ts +15 -0
  106. package/dist/components/Video/index.js +232 -0
  107. package/dist/components/index.cjs +3221 -0
  108. package/dist/components/index.css +9972 -0
  109. package/dist/components/index.d.cts +23 -0
  110. package/dist/components/index.d.ts +23 -0
  111. package/dist/components/index.js +3167 -0
  112. package/dist/index.cjs +8216 -0
  113. package/dist/index.css +10087 -0
  114. package/dist/index.d.cts +31 -0
  115. package/dist/index.d.ts +31 -0
  116. package/dist/index.js +7855 -0
  117. package/dist/layout/Grid/FullGrid/index.cjs +54 -0
  118. package/dist/layout/Grid/FullGrid/index.css +21 -0
  119. package/dist/layout/Grid/FullGrid/index.d.cts +9 -0
  120. package/dist/layout/Grid/FullGrid/index.d.ts +9 -0
  121. package/dist/layout/Grid/FullGrid/index.js +27 -0
  122. package/dist/layout/Grid/FullScreen/index.cjs +54 -0
  123. package/dist/layout/Grid/FullScreen/index.css +23 -0
  124. package/dist/layout/Grid/FullScreen/index.d.cts +9 -0
  125. package/dist/layout/Grid/FullScreen/index.d.ts +9 -0
  126. package/dist/layout/Grid/FullScreen/index.js +27 -0
  127. package/dist/layout/Grid/GapGrid/index.cjs +32 -0
  128. package/dist/layout/Grid/GapGrid/index.d.cts +12 -0
  129. package/dist/layout/Grid/GapGrid/index.d.ts +12 -0
  130. package/dist/layout/Grid/GapGrid/index.js +11 -0
  131. package/dist/layout/Grid/Item/index.cjs +71 -0
  132. package/dist/layout/Grid/Item/index.css +19 -0
  133. package/dist/layout/Grid/Item/index.d.cts +20 -0
  134. package/dist/layout/Grid/Item/index.d.ts +20 -0
  135. package/dist/layout/Grid/Item/index.js +44 -0
  136. package/dist/layout/Grid/index.cjs +95 -0
  137. package/dist/layout/Grid/index.css +65 -0
  138. package/dist/layout/Grid/index.d.cts +5 -0
  139. package/dist/layout/Grid/index.d.ts +5 -0
  140. package/dist/layout/Grid/index.js +65 -0
  141. package/dist/layout/Header/index.cjs +45 -0
  142. package/dist/layout/Header/index.css +11 -0
  143. package/dist/layout/Header/index.d.cts +10 -0
  144. package/dist/layout/Header/index.d.ts +10 -0
  145. package/dist/layout/Header/index.js +18 -0
  146. package/dist/layout/Layout/index.cjs +44 -0
  147. package/dist/layout/Layout/index.css +23 -0
  148. package/dist/layout/Layout/index.d.cts +15 -0
  149. package/dist/layout/Layout/index.d.ts +15 -0
  150. package/dist/layout/Layout/index.js +17 -0
  151. package/dist/layout/SideBar/index.cjs +101 -0
  152. package/dist/layout/SideBar/index.css +10 -0
  153. package/dist/layout/SideBar/index.d.cts +16 -0
  154. package/dist/layout/SideBar/index.d.ts +16 -0
  155. package/dist/layout/SideBar/index.js +62 -0
  156. package/dist/layout/index.cjs +188 -0
  157. package/dist/layout/index.css +112 -0
  158. package/dist/layout/index.d.cts +8 -0
  159. package/dist/layout/index.d.ts +8 -0
  160. package/dist/layout/index.js +143 -0
  161. package/dist/tokens/index.cjs +6225 -0
  162. package/dist/tokens/index.d.cts +593 -0
  163. package/dist/tokens/index.d.ts +593 -0
  164. package/dist/tokens/index.js +5900 -0
  165. package/package.json +86 -0
package/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # @x-plat/design-system
2
+
3
+ XPLAT UI 디자인 시스템. React 컴포넌트, 레이아웃, 토큰(색상·브레이크포인트)을 제공합니다.
4
+
5
+ ---
6
+
7
+ ## 요구 사항
8
+
9
+ | 항목 | 버전 |
10
+ |------|------|
11
+ | Node.js | 18+ |
12
+ | React | 18+ |
13
+
14
+ ---
15
+
16
+ ## 설치
17
+
18
+ ```bash
19
+ yarn add @x-plat/design-system
20
+ ```
21
+
22
+ 또는
23
+
24
+ ```bash
25
+ npm install @x-plat/design-system
26
+ ```
27
+
28
+ ---
29
+
30
+ ## 사용법
31
+
32
+ ### 1. 스타일 로드 (필수)
33
+
34
+ 앱 진입점에서 한 번만 불러옵니다. **반드시 `style.css` 경로를 사용하세요.** (`index.css`는 패키지에서 export되지 않습니다.)
35
+
36
+ ```tsx
37
+ import "@x-plat/design-system/style.css";
38
+ ```
39
+
40
+ ### 2. Import 방식 요약
41
+
42
+ | 방식 | 예시 |
43
+ |------|------|
44
+ | **루트 barrel** | `import { Button, colors } from "@x-plat/design-system"` |
45
+ | **서브패스 barrel** | `import { Button } from "@x-plat/design-system/components"` |
46
+ | **Deep import** | `import Button from "@x-plat/design-system/components/Button"` |
47
+
48
+ ### 3. 루트 barrel
49
+
50
+ ```tsx
51
+ import { Button, Layout, FullGrid, GridItem, colors } from "@x-plat/design-system";
52
+ ```
53
+
54
+ ### 4. 서브패스 barrel
55
+
56
+ ```tsx
57
+ import { Button, Chip } from "@x-plat/design-system/components";
58
+ import { Layout, Grid, Header, SideBar } from "@x-plat/design-system/layout";
59
+ import { colors, breakpoints } from "@x-plat/design-system";
60
+ ```
61
+
62
+ ### 5. Deep import
63
+
64
+ ```tsx
65
+ import Button from "@x-plat/design-system/components/Button";
66
+ import Layout from "@x-plat/design-system/layout/Layout";
67
+ import FullGrid from "@x-plat/design-system/layout/Grid/FullGrid";
68
+ import GridItem from "@x-plat/design-system/layout/Grid/Item";
69
+ ```
70
+
71
+ ---
72
+
73
+ ## 개발
74
+
75
+ ### 스크립트
76
+
77
+ | 명령어 | 설명 |
78
+ |--------|------|
79
+ | `npm run build` | 테마·그리드 생성 후 빌드 |
80
+ | `npm run generate-theme` | `tokens/colors.ts` → `styles/colors.scss` |
81
+ | `npm run generate-grid` | `tokens/breakpoints.ts` → `styles/_screen-generated.scss` |
82
+ | `npm run dev` | tsup watch |
83
+ | `npm run clean` | `dist` 삭제 |
84
+ | `npm run lint` | ESLint (import 순서 등) |
85
+ | `npm run lint:fix` | import 순서 자동 수정 |
86
+
87
+ ### 코드 생성 흐름
88
+
89
+ - **색상**: `src/tokens/colors.ts` 수정 → `npm run generate-theme` → `src/styles/colors.scss` 갱신
90
+ - **브레이크포인트/그리드**: `src/tokens/breakpoints.ts` 수정 → `npm run generate-grid` → `src/styles/_screen-generated.scss` 갱신
91
+
92
+ ---
93
+
94
+ ## 프로젝트 구조
95
+
96
+ ```
97
+ src/
98
+ ├── index.ts
99
+ ├── components/ # Button, Card, Chart, CheckBox, Chip, DatePicker, Input, Modal, Radio, Switch, Tab, Table, TextArea, Tooltip, Swiper, ...
100
+ ├── layout/ # Layout, Header, SideBar, Grid(FullGrid, FullScreen, GapGrid, Item)
101
+ ├── tokens/ # colors, breakpoints, interface, hooks, svg
102
+ ├── styles/ # colors.scss, screen.scss, utils, _screen-generated.scss
103
+ └── util/
104
+ ```
105
+
106
+ ---
107
+
108
+ ## 세부 문서
109
+
110
+ | 경로 | 내용 |
111
+ |------|------|
112
+ | [src/components/README.md](src/components/README.md) | 컴포넌트 목록, import |
113
+ | [src/layout/README.md](src/layout/README.md) | 레이아웃 |
114
+ | [src/layout/Grid/README.md](src/layout/Grid/README.md) | Grid, 브레이크포인트 |
115
+ | [src/tokens/README.md](src/tokens/README.md) | 토큰(colors, breakpoints) |
116
+ | [src/tokens/interface/README.md](src/tokens/interface/README.md) | 타입 정의 |
117
+ | [src/styles/README.md](src/styles/README.md) | 글로벌 SCSS |
118
+
119
+ ---
120
+
121
+ ## 라이선스
122
+
123
+ Private. XPLAT WOONG.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+
3
+ type InputAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "color" | "error">;
4
+ type ButtonAttributes = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "color" | "error">;
5
+ type TextareaAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "type" | "color" | "error">;
6
+
7
+ export type { ButtonAttributes as B, InputAttributes as I, TextareaAttributes as T };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+
3
+ type InputAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "color" | "error">;
4
+ type ButtonAttributes = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "color" | "error">;
5
+ type TextareaAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "type" | "color" | "error">;
6
+
7
+ export type { ButtonAttributes as B, InputAttributes as I, TextareaAttributes as T };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 브레이크포인트/그리드 설정 (세팅값만).
3
+ * 수정 후 `npm run generate-grid` 실행 → styles/_screen-generated.scss 갱신.
4
+ * 타입은 tokens/interface/breakpoints.ts 또는 src/tokens 에서 export.
5
+ */
6
+ /** 브레이크포인트 키 (뷰포트 큰 순). 새 브레이크 추가 시 breakpoints·gridColumns 에 동일 키 추가 */
7
+ declare const BREAKPOINT_KEYS_ORDERED: readonly ["laptop", "tablet", "mobile"];
8
+ /** 각 브레이크의 min-width(px). SCSS 미디어 쿼리 min/max 는 generate-grid 에서 자동 계산 */
9
+ declare const breakpoints: {
10
+ readonly laptop: 1024;
11
+ readonly tablet: 768;
12
+ readonly mobile: 0;
13
+ };
14
+ /** 브레이크포인트별 최대 컬럼 수 */
15
+ declare const gridColumns: {
16
+ readonly laptop: 12;
17
+ readonly tablet: 8;
18
+ readonly mobile: 4;
19
+ };
20
+
21
+ type BreakpointKey = (typeof BREAKPOINT_KEYS_ORDERED)[number];
22
+ type TupleOfLength<N extends number, Acc extends unknown[] = []> = Acc["length"] extends N ? Acc : TupleOfLength<N, [...Acc, unknown]>;
23
+ type Enumerate<T extends unknown[]> = T extends [unknown, ...infer R] ? R["length"] | Enumerate<R> : never;
24
+ type OneToN<N extends number> = Exclude<Enumerate<[...TupleOfLength<N>, unknown]>, 0>;
25
+ /** 특정 브레이크의 span 타입 (1 ~ gridColumns[K]) */
26
+ type GridSpanFor<K extends BreakpointKey> = OneToN<(typeof gridColumns)[K]>;
27
+ type DefaultBreakpointKey = (typeof BREAKPOINT_KEYS_ORDERED)[0];
28
+ /** GridItem column prop — 브레이크 추가 시 자동으로 해당 키 타입 추가됨 */
29
+ type GridColumnConfig = {
30
+ default: GridSpanFor<DefaultBreakpointKey>;
31
+ } & {
32
+ [K in BreakpointKey]?: GridSpanFor<K>;
33
+ };
34
+
35
+ export { BREAKPOINT_KEYS_ORDERED as B, type GridSpanFor as G, type BreakpointKey as a, type GridColumnConfig as b, breakpoints as c, gridColumns as g };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 브레이크포인트/그리드 설정 (세팅값만).
3
+ * 수정 후 `npm run generate-grid` 실행 → styles/_screen-generated.scss 갱신.
4
+ * 타입은 tokens/interface/breakpoints.ts 또는 src/tokens 에서 export.
5
+ */
6
+ /** 브레이크포인트 키 (뷰포트 큰 순). 새 브레이크 추가 시 breakpoints·gridColumns 에 동일 키 추가 */
7
+ declare const BREAKPOINT_KEYS_ORDERED: readonly ["laptop", "tablet", "mobile"];
8
+ /** 각 브레이크의 min-width(px). SCSS 미디어 쿼리 min/max 는 generate-grid 에서 자동 계산 */
9
+ declare const breakpoints: {
10
+ readonly laptop: 1024;
11
+ readonly tablet: 768;
12
+ readonly mobile: 0;
13
+ };
14
+ /** 브레이크포인트별 최대 컬럼 수 */
15
+ declare const gridColumns: {
16
+ readonly laptop: 12;
17
+ readonly tablet: 8;
18
+ readonly mobile: 4;
19
+ };
20
+
21
+ type BreakpointKey = (typeof BREAKPOINT_KEYS_ORDERED)[number];
22
+ type TupleOfLength<N extends number, Acc extends unknown[] = []> = Acc["length"] extends N ? Acc : TupleOfLength<N, [...Acc, unknown]>;
23
+ type Enumerate<T extends unknown[]> = T extends [unknown, ...infer R] ? R["length"] | Enumerate<R> : never;
24
+ type OneToN<N extends number> = Exclude<Enumerate<[...TupleOfLength<N>, unknown]>, 0>;
25
+ /** 특정 브레이크의 span 타입 (1 ~ gridColumns[K]) */
26
+ type GridSpanFor<K extends BreakpointKey> = OneToN<(typeof gridColumns)[K]>;
27
+ type DefaultBreakpointKey = (typeof BREAKPOINT_KEYS_ORDERED)[0];
28
+ /** GridItem column prop — 브레이크 추가 시 자동으로 해당 키 타입 추가됨 */
29
+ type GridColumnConfig = {
30
+ default: GridSpanFor<DefaultBreakpointKey>;
31
+ } & {
32
+ [K in BreakpointKey]?: GridSpanFor<K>;
33
+ };
34
+
35
+ export { BREAKPOINT_KEYS_ORDERED as B, type GridSpanFor as G, type BreakpointKey as a, type GridColumnConfig as b, breakpoints as c, gridColumns as g };
@@ -0,0 +1,133 @@
1
+ /**
2
+ * 색상 토큰 설정 (세팅값만).
3
+ * generate-theme 으로 styles/colors.scss 갱신.
4
+ * 타입은 tokens/interface/colors.ts 또는 src/tokens 에서 export.
5
+ */
6
+ declare const colors: {
7
+ readonly xplat: {
8
+ readonly red: {
9
+ readonly 50: "#FFF0F0";
10
+ readonly 100: "#FFDDDE";
11
+ readonly 200: "#FFC1C2";
12
+ readonly 300: "#FF9698";
13
+ readonly 400: "#FF5A5D";
14
+ readonly 500: "#FF272B";
15
+ readonly 600: "#F80409";
16
+ readonly 700: "#D40105";
17
+ readonly 800: "#AE0609";
18
+ readonly 900: "#900C0F";
19
+ };
20
+ readonly green: {
21
+ readonly 50: "#E5F6EA";
22
+ readonly 100: "#C1E7CC";
23
+ readonly 200: "#98D8AC";
24
+ readonly 300: "#6CCA8B";
25
+ readonly 400: "#47BE72";
26
+ readonly 500: "#10B259";
27
+ readonly 600: "#00A34F";
28
+ readonly 700: "#009143";
29
+ readonly 800: "#007F38";
30
+ readonly 900: "#006024";
31
+ };
32
+ readonly orange: {
33
+ readonly 50: "#FFF8EC";
34
+ readonly 100: "#FFF0D3";
35
+ readonly 200: "#FFDDA5";
36
+ readonly 300: "#FFC46D";
37
+ readonly 400: "#FF9F32";
38
+ readonly 500: "#FF820A";
39
+ readonly 600: "#FF6900";
40
+ readonly 700: "#CC4B02";
41
+ readonly 800: "#A13A0B";
42
+ readonly 900: "#82320C";
43
+ };
44
+ readonly yellow: {
45
+ readonly 50: "#FFFDE7";
46
+ readonly 100: "#FFFAC1";
47
+ readonly 200: "#FFF186";
48
+ readonly 300: "#FFE041";
49
+ readonly 400: "#FFCC0D";
50
+ readonly 500: "#F0B100";
51
+ readonly 600: "#D18800";
52
+ readonly 700: "#A66002";
53
+ readonly 800: "#894B0A";
54
+ readonly 900: "#743D0F";
55
+ };
56
+ readonly blue: {
57
+ readonly 50: "#F1F4FD";
58
+ readonly 100: "#DFE7FA";
59
+ readonly 200: "#C5D4F8";
60
+ readonly 300: "#9EB8F2";
61
+ readonly 400: "#7093EA";
62
+ readonly 500: "#4D6DE3";
63
+ readonly 600: "#3950D7";
64
+ readonly 700: "#303EC5";
65
+ readonly 800: "#2D35A0";
66
+ readonly 900: "#29317F";
67
+ };
68
+ readonly lightblue: {
69
+ readonly 50: "#EEFAFF";
70
+ readonly 100: "#D9F4FF";
71
+ readonly 200: "#BBEDFF";
72
+ readonly 300: "#8DE3FF";
73
+ readonly 400: "#57D0FF";
74
+ readonly 500: "#30B6FF";
75
+ readonly 600: "#1999F7";
76
+ readonly 700: "#1280E3";
77
+ readonly 800: "#1566B8";
78
+ readonly 900: "#175791";
79
+ };
80
+ readonly purple: {
81
+ readonly 50: "#FBF6FE";
82
+ readonly 100: "#F5EAFD";
83
+ readonly 200: "#EDD8FC";
84
+ readonly 300: "#E0BAF8";
85
+ readonly 400: "#CD8DF3";
86
+ readonly 500: "#B961EB";
87
+ readonly 600: "#A541DC";
88
+ readonly 700: "#9230C5";
89
+ readonly 800: "#782B9E";
90
+ readonly 900: "#62247F";
91
+ };
92
+ readonly pink: {
93
+ readonly 50: "#FFF4FE";
94
+ readonly 100: "#FFE7FD";
95
+ readonly 200: "#FFCFFA";
96
+ readonly 300: "#FEA9F1";
97
+ readonly 400: "#FD75E7";
98
+ readonly 500: "#F553DA";
99
+ readonly 600: "#D821B6";
100
+ readonly 700: "#B31892";
101
+ readonly 800: "#921676";
102
+ readonly 900: "#781761";
103
+ };
104
+ readonly neutral: {
105
+ readonly 50: "#FAFAFA";
106
+ readonly 100: "#F5F5F5";
107
+ readonly 200: "#E5E5E5";
108
+ readonly 300: "#D4D4D4";
109
+ readonly 400: "#A1A1A1";
110
+ readonly 500: "#737373";
111
+ readonly 600: "#525252";
112
+ readonly 700: "#404040";
113
+ readonly 800: "#262626";
114
+ readonly 900: "#171717";
115
+ };
116
+ readonly black: "#000000";
117
+ readonly white: "#FFFFFF";
118
+ };
119
+ readonly test: {
120
+ readonly default: "#ffffff";
121
+ };
122
+ };
123
+
124
+ type ColorNamespace = keyof typeof colors;
125
+ type ColorName<C extends ColorNamespace> = keyof (typeof colors)[C];
126
+ type ColorDepth<C extends ColorNamespace, K extends ColorName<C>> = (typeof colors)[C][K] extends string ? undefined : keyof (typeof colors)[C][K];
127
+ interface ColorProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> {
128
+ colorNamespace?: N;
129
+ color?: C;
130
+ colorDepth?: ColorDepth<N, C>;
131
+ }
132
+
133
+ export { type ColorNamespace as C, type ColorName as a, type ColorDepth as b, colors as c, type ColorProps as d };
@@ -0,0 +1,133 @@
1
+ /**
2
+ * 색상 토큰 설정 (세팅값만).
3
+ * generate-theme 으로 styles/colors.scss 갱신.
4
+ * 타입은 tokens/interface/colors.ts 또는 src/tokens 에서 export.
5
+ */
6
+ declare const colors: {
7
+ readonly xplat: {
8
+ readonly red: {
9
+ readonly 50: "#FFF0F0";
10
+ readonly 100: "#FFDDDE";
11
+ readonly 200: "#FFC1C2";
12
+ readonly 300: "#FF9698";
13
+ readonly 400: "#FF5A5D";
14
+ readonly 500: "#FF272B";
15
+ readonly 600: "#F80409";
16
+ readonly 700: "#D40105";
17
+ readonly 800: "#AE0609";
18
+ readonly 900: "#900C0F";
19
+ };
20
+ readonly green: {
21
+ readonly 50: "#E5F6EA";
22
+ readonly 100: "#C1E7CC";
23
+ readonly 200: "#98D8AC";
24
+ readonly 300: "#6CCA8B";
25
+ readonly 400: "#47BE72";
26
+ readonly 500: "#10B259";
27
+ readonly 600: "#00A34F";
28
+ readonly 700: "#009143";
29
+ readonly 800: "#007F38";
30
+ readonly 900: "#006024";
31
+ };
32
+ readonly orange: {
33
+ readonly 50: "#FFF8EC";
34
+ readonly 100: "#FFF0D3";
35
+ readonly 200: "#FFDDA5";
36
+ readonly 300: "#FFC46D";
37
+ readonly 400: "#FF9F32";
38
+ readonly 500: "#FF820A";
39
+ readonly 600: "#FF6900";
40
+ readonly 700: "#CC4B02";
41
+ readonly 800: "#A13A0B";
42
+ readonly 900: "#82320C";
43
+ };
44
+ readonly yellow: {
45
+ readonly 50: "#FFFDE7";
46
+ readonly 100: "#FFFAC1";
47
+ readonly 200: "#FFF186";
48
+ readonly 300: "#FFE041";
49
+ readonly 400: "#FFCC0D";
50
+ readonly 500: "#F0B100";
51
+ readonly 600: "#D18800";
52
+ readonly 700: "#A66002";
53
+ readonly 800: "#894B0A";
54
+ readonly 900: "#743D0F";
55
+ };
56
+ readonly blue: {
57
+ readonly 50: "#F1F4FD";
58
+ readonly 100: "#DFE7FA";
59
+ readonly 200: "#C5D4F8";
60
+ readonly 300: "#9EB8F2";
61
+ readonly 400: "#7093EA";
62
+ readonly 500: "#4D6DE3";
63
+ readonly 600: "#3950D7";
64
+ readonly 700: "#303EC5";
65
+ readonly 800: "#2D35A0";
66
+ readonly 900: "#29317F";
67
+ };
68
+ readonly lightblue: {
69
+ readonly 50: "#EEFAFF";
70
+ readonly 100: "#D9F4FF";
71
+ readonly 200: "#BBEDFF";
72
+ readonly 300: "#8DE3FF";
73
+ readonly 400: "#57D0FF";
74
+ readonly 500: "#30B6FF";
75
+ readonly 600: "#1999F7";
76
+ readonly 700: "#1280E3";
77
+ readonly 800: "#1566B8";
78
+ readonly 900: "#175791";
79
+ };
80
+ readonly purple: {
81
+ readonly 50: "#FBF6FE";
82
+ readonly 100: "#F5EAFD";
83
+ readonly 200: "#EDD8FC";
84
+ readonly 300: "#E0BAF8";
85
+ readonly 400: "#CD8DF3";
86
+ readonly 500: "#B961EB";
87
+ readonly 600: "#A541DC";
88
+ readonly 700: "#9230C5";
89
+ readonly 800: "#782B9E";
90
+ readonly 900: "#62247F";
91
+ };
92
+ readonly pink: {
93
+ readonly 50: "#FFF4FE";
94
+ readonly 100: "#FFE7FD";
95
+ readonly 200: "#FFCFFA";
96
+ readonly 300: "#FEA9F1";
97
+ readonly 400: "#FD75E7";
98
+ readonly 500: "#F553DA";
99
+ readonly 600: "#D821B6";
100
+ readonly 700: "#B31892";
101
+ readonly 800: "#921676";
102
+ readonly 900: "#781761";
103
+ };
104
+ readonly neutral: {
105
+ readonly 50: "#FAFAFA";
106
+ readonly 100: "#F5F5F5";
107
+ readonly 200: "#E5E5E5";
108
+ readonly 300: "#D4D4D4";
109
+ readonly 400: "#A1A1A1";
110
+ readonly 500: "#737373";
111
+ readonly 600: "#525252";
112
+ readonly 700: "#404040";
113
+ readonly 800: "#262626";
114
+ readonly 900: "#171717";
115
+ };
116
+ readonly black: "#000000";
117
+ readonly white: "#FFFFFF";
118
+ };
119
+ readonly test: {
120
+ readonly default: "#ffffff";
121
+ };
122
+ };
123
+
124
+ type ColorNamespace = keyof typeof colors;
125
+ type ColorName<C extends ColorNamespace> = keyof (typeof colors)[C];
126
+ type ColorDepth<C extends ColorNamespace, K extends ColorName<C>> = (typeof colors)[C][K] extends string ? undefined : keyof (typeof colors)[C][K];
127
+ interface ColorProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> {
128
+ colorNamespace?: N;
129
+ color?: C;
130
+ colorDepth?: ColorDepth<N, C>;
131
+ }
132
+
133
+ export { type ColorNamespace as C, type ColorName as a, type ColorDepth as b, colors as c, type ColorProps as d };
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/Button/index.ts
21
+ var Button_exports = {};
22
+ __export(Button_exports, {
23
+ Button: () => Button_default
24
+ });
25
+ module.exports = __toCommonJS(Button_exports);
26
+
27
+ // src/tokens/colors.ts
28
+ var colors = {
29
+ xplat: {
30
+ red: {
31
+ 50: "#FFF0F0",
32
+ 100: "#FFDDDE",
33
+ 200: "#FFC1C2",
34
+ 300: "#FF9698",
35
+ 400: "#FF5A5D",
36
+ 500: "#FF272B",
37
+ 600: "#F80409",
38
+ 700: "#D40105",
39
+ 800: "#AE0609",
40
+ 900: "#900C0F"
41
+ },
42
+ green: {
43
+ 50: "#E5F6EA",
44
+ 100: "#C1E7CC",
45
+ 200: "#98D8AC",
46
+ 300: "#6CCA8B",
47
+ 400: "#47BE72",
48
+ 500: "#10B259",
49
+ 600: "#00A34F",
50
+ 700: "#009143",
51
+ 800: "#007F38",
52
+ 900: "#006024"
53
+ },
54
+ orange: {
55
+ 50: "#FFF8EC",
56
+ 100: "#FFF0D3",
57
+ 200: "#FFDDA5",
58
+ 300: "#FFC46D",
59
+ 400: "#FF9F32",
60
+ 500: "#FF820A",
61
+ 600: "#FF6900",
62
+ 700: "#CC4B02",
63
+ 800: "#A13A0B",
64
+ 900: "#82320C"
65
+ },
66
+ yellow: {
67
+ 50: "#FFFDE7",
68
+ 100: "#FFFAC1",
69
+ 200: "#FFF186",
70
+ 300: "#FFE041",
71
+ 400: "#FFCC0D",
72
+ 500: "#F0B100",
73
+ 600: "#D18800",
74
+ 700: "#A66002",
75
+ 800: "#894B0A",
76
+ 900: "#743D0F"
77
+ },
78
+ blue: {
79
+ 50: "#F1F4FD",
80
+ 100: "#DFE7FA",
81
+ 200: "#C5D4F8",
82
+ 300: "#9EB8F2",
83
+ 400: "#7093EA",
84
+ 500: "#4D6DE3",
85
+ 600: "#3950D7",
86
+ 700: "#303EC5",
87
+ 800: "#2D35A0",
88
+ 900: "#29317F"
89
+ },
90
+ lightblue: {
91
+ 50: "#EEFAFF",
92
+ 100: "#D9F4FF",
93
+ 200: "#BBEDFF",
94
+ 300: "#8DE3FF",
95
+ 400: "#57D0FF",
96
+ 500: "#30B6FF",
97
+ 600: "#1999F7",
98
+ 700: "#1280E3",
99
+ 800: "#1566B8",
100
+ 900: "#175791"
101
+ },
102
+ purple: {
103
+ 50: "#FBF6FE",
104
+ 100: "#F5EAFD",
105
+ 200: "#EDD8FC",
106
+ 300: "#E0BAF8",
107
+ 400: "#CD8DF3",
108
+ 500: "#B961EB",
109
+ 600: "#A541DC",
110
+ 700: "#9230C5",
111
+ 800: "#782B9E",
112
+ 900: "#62247F"
113
+ },
114
+ pink: {
115
+ 50: "#FFF4FE",
116
+ 100: "#FFE7FD",
117
+ 200: "#FFCFFA",
118
+ 300: "#FEA9F1",
119
+ 400: "#FD75E7",
120
+ 500: "#F553DA",
121
+ 600: "#D821B6",
122
+ 700: "#B31892",
123
+ 800: "#921676",
124
+ 900: "#781761"
125
+ },
126
+ neutral: {
127
+ 50: "#FAFAFA",
128
+ 100: "#F5F5F5",
129
+ 200: "#E5E5E5",
130
+ 300: "#D4D4D4",
131
+ 400: "#A1A1A1",
132
+ 500: "#737373",
133
+ 600: "#525252",
134
+ 700: "#404040",
135
+ 800: "#262626",
136
+ 900: "#171717"
137
+ },
138
+ black: "#000000",
139
+ white: "#FFFFFF"
140
+ },
141
+ test: {
142
+ default: "#ffffff"
143
+ }
144
+ };
145
+
146
+ // src/util/getColor.ts
147
+ var getColorClass = (namespace, palette, shade) => {
148
+ const namespaceMap = colors[namespace];
149
+ const paletteMap = namespaceMap[palette];
150
+ const hasShade = paletteMap && typeof paletteMap === "object" && shade !== void 0 && shade in paletteMap;
151
+ return `${String(namespace)}-${String(palette)}${hasShade ? `-${String(shade)}` : ""}`;
152
+ };
153
+
154
+ // node_modules/clsx/dist/clsx.mjs
155
+ function r(e) {
156
+ var t, f, n = "";
157
+ if ("string" == typeof e || "number" == typeof e) n += e;
158
+ else if ("object" == typeof e) if (Array.isArray(e)) {
159
+ var o = e.length;
160
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
161
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
162
+ return n;
163
+ }
164
+ function clsx() {
165
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
166
+ return n;
167
+ }
168
+ var clsx_default = clsx;
169
+
170
+ // src/components/Button/Button.tsx
171
+ var import_jsx_runtime = require("react/jsx-runtime");
172
+ var Button = (props) => {
173
+ const {
174
+ children,
175
+ type = "primary",
176
+ colorNamespace = "xplat",
177
+ color = "black",
178
+ colorDepth,
179
+ disabled,
180
+ className,
181
+ ...rest
182
+ } = props;
183
+ const colorClass = getColorClass(
184
+ colorNamespace,
185
+ color,
186
+ colorDepth ?? 500
187
+ );
188
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
189
+ "button",
190
+ {
191
+ className: clsx_default("lib-xplat-button", type, colorClass, className),
192
+ disabled,
193
+ ...rest,
194
+ children
195
+ }
196
+ );
197
+ };
198
+ Button.displayName = "Button";
199
+ var Button_default = Button;
200
+ // Annotate the CommonJS export names for ESM import in node:
201
+ 0 && (module.exports = {
202
+ Button
203
+ });