@causw/tokens 0.0.2 → 0.0.4

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.
@@ -0,0 +1,123 @@
1
+ // src/tokens/colors.ts
2
+ var colors = {
3
+ primary: {
4
+ 50: "#e3f2fd",
5
+ 100: "#bbdefb",
6
+ 200: "#90caf9",
7
+ 300: "#64b5f6",
8
+ 400: "#42a5f5",
9
+ 500: "#2196f3",
10
+ 600: "#1e88e5",
11
+ 700: "#1976d2",
12
+ 800: "#1565c0",
13
+ 900: "#0d47a1"
14
+ },
15
+ gray: {
16
+ 50: "#fafafa",
17
+ 100: "#f5f5f5",
18
+ 200: "#eeeeee",
19
+ 300: "#e0e0e0",
20
+ 400: "#bdbdbd",
21
+ 500: "#9e9e9e",
22
+ 600: "#757575",
23
+ 700: "#616161",
24
+ 800: "#424242",
25
+ 900: "#212121"
26
+ },
27
+ success: {
28
+ main: "#4caf50",
29
+ light: "#81c784",
30
+ dark: "#388e3c"
31
+ },
32
+ error: {
33
+ main: "#f44336",
34
+ light: "#e57373",
35
+ dark: "#d32f2f"
36
+ },
37
+ warning: {
38
+ main: "#ff9800",
39
+ light: "#ffb74d",
40
+ dark: "#f57c00"
41
+ },
42
+ info: {
43
+ main: "#2196f3",
44
+ light: "#64b5f6",
45
+ dark: "#1976d2"
46
+ }
47
+ };
48
+
49
+ // src/tokens/spacing.ts
50
+ var spacing = {
51
+ 0: "0",
52
+ 1: "0.25rem",
53
+ // 4px
54
+ 2: "0.5rem",
55
+ // 8px
56
+ 3: "0.75rem",
57
+ // 12px
58
+ 4: "1rem",
59
+ // 16px
60
+ 5: "1.25rem",
61
+ // 20px
62
+ 6: "1.5rem",
63
+ // 24px
64
+ 8: "2rem",
65
+ // 32px
66
+ 10: "2.5rem",
67
+ // 40px
68
+ 12: "3rem",
69
+ // 48px
70
+ 16: "4rem",
71
+ // 64px
72
+ 20: "5rem",
73
+ // 80px
74
+ 24: "6rem"
75
+ // 96px
76
+ };
77
+
78
+ // src/tokens/typography.ts
79
+ var typography = {
80
+ fontFamily: {
81
+ base: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
82
+ mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'
83
+ },
84
+ fontSize: {
85
+ xs: "0.75rem",
86
+ // 12px
87
+ sm: "0.875rem",
88
+ // 14px
89
+ base: "1rem",
90
+ // 16px
91
+ lg: "1.125rem",
92
+ // 18px
93
+ xl: "1.25rem",
94
+ // 20px
95
+ "2xl": "1.5rem",
96
+ // 24px
97
+ "3xl": "1.875rem",
98
+ // 30px
99
+ "4xl": "2.25rem",
100
+ // 36px
101
+ "5xl": "3rem"
102
+ // 48px
103
+ },
104
+ fontWeight: {
105
+ normal: "400",
106
+ medium: "500",
107
+ semibold: "600",
108
+ bold: "700"
109
+ },
110
+ lineHeight: {
111
+ none: "1",
112
+ tight: "1.25",
113
+ normal: "1.5",
114
+ relaxed: "1.75",
115
+ loose: "2"
116
+ }
117
+ };
118
+
119
+ export {
120
+ colors,
121
+ spacing,
122
+ typography
123
+ };
@@ -0,0 +1,44 @@
1
+ import { Config } from 'tailwindcss';
2
+
3
+ /**
4
+ * CAUSW Design System Tailwind CSS Configuration
5
+ *
6
+ * 이 파일은 `@config` 지시자와 함께 사용할 수 있는 완전한 Tailwind config입니다.
7
+ *
8
+ * @example CSS에서 사용
9
+ * ```css
10
+ * @import 'tailwindcss';
11
+ * @config '@causw/tokens/tailwind.config';
12
+ * ```
13
+ *
14
+ * @example JS/TS config에서 사용
15
+ * ```ts
16
+ * // tailwind.config.ts
17
+ * import caswConfig from '@causw/tokens/tailwind.config';
18
+ * export default {
19
+ * ...caswConfig,
20
+ * content: [...caswConfig.content, './src/**\/*.{js,ts,jsx,tsx}'],
21
+ * };
22
+ * ```
23
+ */
24
+ declare const caswConfig: Config;
25
+
26
+ /**
27
+ * CAUSW Design System Tailwind CSS Preset
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * // tailwind.config.ts
32
+ * import { caswPreset } from '@causw/design-system/tailwind-preset';
33
+ *
34
+ * export default {
35
+ * presets: [caswPreset],
36
+ * content: ['./src/**\/*.{js,ts,jsx,tsx}'],
37
+ * } satisfies Config;
38
+ * ```
39
+ */
40
+ declare const caswPreset: Partial<Config>;
41
+
42
+ declare const tailwindContent: string[];
43
+
44
+ export { caswConfig, caswPreset, caswConfig as default, tailwindContent };
@@ -0,0 +1,44 @@
1
+ import { Config } from 'tailwindcss';
2
+
3
+ /**
4
+ * CAUSW Design System Tailwind CSS Configuration
5
+ *
6
+ * 이 파일은 `@config` 지시자와 함께 사용할 수 있는 완전한 Tailwind config입니다.
7
+ *
8
+ * @example CSS에서 사용
9
+ * ```css
10
+ * @import 'tailwindcss';
11
+ * @config '@causw/tokens/tailwind.config';
12
+ * ```
13
+ *
14
+ * @example JS/TS config에서 사용
15
+ * ```ts
16
+ * // tailwind.config.ts
17
+ * import caswConfig from '@causw/tokens/tailwind.config';
18
+ * export default {
19
+ * ...caswConfig,
20
+ * content: [...caswConfig.content, './src/**\/*.{js,ts,jsx,tsx}'],
21
+ * };
22
+ * ```
23
+ */
24
+ declare const caswConfig: Config;
25
+
26
+ /**
27
+ * CAUSW Design System Tailwind CSS Preset
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * // tailwind.config.ts
32
+ * import { caswPreset } from '@causw/design-system/tailwind-preset';
33
+ *
34
+ * export default {
35
+ * presets: [caswPreset],
36
+ * content: ['./src/**\/*.{js,ts,jsx,tsx}'],
37
+ * } satisfies Config;
38
+ * ```
39
+ */
40
+ declare const caswPreset: Partial<Config>;
41
+
42
+ declare const tailwindContent: string[];
43
+
44
+ export { caswConfig, caswPreset, caswConfig as default, tailwindContent };
@@ -0,0 +1,186 @@
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/config/index.ts
21
+ var config_exports = {};
22
+ __export(config_exports, {
23
+ caswConfig: () => caswConfig,
24
+ caswPreset: () => caswPreset,
25
+ default: () => tailwind_config_default,
26
+ tailwindContent: () => tailwindContent
27
+ });
28
+ module.exports = __toCommonJS(config_exports);
29
+
30
+ // src/tokens/colors.ts
31
+ var colors = {
32
+ primary: {
33
+ 50: "#e3f2fd",
34
+ 100: "#bbdefb",
35
+ 200: "#90caf9",
36
+ 300: "#64b5f6",
37
+ 400: "#42a5f5",
38
+ 500: "#2196f3",
39
+ 600: "#1e88e5",
40
+ 700: "#1976d2",
41
+ 800: "#1565c0",
42
+ 900: "#0d47a1"
43
+ },
44
+ gray: {
45
+ 50: "#fafafa",
46
+ 100: "#f5f5f5",
47
+ 200: "#eeeeee",
48
+ 300: "#e0e0e0",
49
+ 400: "#bdbdbd",
50
+ 500: "#9e9e9e",
51
+ 600: "#757575",
52
+ 700: "#616161",
53
+ 800: "#424242",
54
+ 900: "#212121"
55
+ },
56
+ success: {
57
+ main: "#4caf50",
58
+ light: "#81c784",
59
+ dark: "#388e3c"
60
+ },
61
+ error: {
62
+ main: "#f44336",
63
+ light: "#e57373",
64
+ dark: "#d32f2f"
65
+ },
66
+ warning: {
67
+ main: "#ff9800",
68
+ light: "#ffb74d",
69
+ dark: "#f57c00"
70
+ },
71
+ info: {
72
+ main: "#2196f3",
73
+ light: "#64b5f6",
74
+ dark: "#1976d2"
75
+ }
76
+ };
77
+
78
+ // src/tokens/spacing.ts
79
+ var spacing = {
80
+ 0: "0",
81
+ 1: "0.25rem",
82
+ // 4px
83
+ 2: "0.5rem",
84
+ // 8px
85
+ 3: "0.75rem",
86
+ // 12px
87
+ 4: "1rem",
88
+ // 16px
89
+ 5: "1.25rem",
90
+ // 20px
91
+ 6: "1.5rem",
92
+ // 24px
93
+ 8: "2rem",
94
+ // 32px
95
+ 10: "2.5rem",
96
+ // 40px
97
+ 12: "3rem",
98
+ // 48px
99
+ 16: "4rem",
100
+ // 64px
101
+ 20: "5rem",
102
+ // 80px
103
+ 24: "6rem"
104
+ // 96px
105
+ };
106
+
107
+ // src/tokens/typography.ts
108
+ var typography = {
109
+ fontFamily: {
110
+ base: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
111
+ mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'
112
+ },
113
+ fontSize: {
114
+ xs: "0.75rem",
115
+ // 12px
116
+ sm: "0.875rem",
117
+ // 14px
118
+ base: "1rem",
119
+ // 16px
120
+ lg: "1.125rem",
121
+ // 18px
122
+ xl: "1.25rem",
123
+ // 20px
124
+ "2xl": "1.5rem",
125
+ // 24px
126
+ "3xl": "1.875rem",
127
+ // 30px
128
+ "4xl": "2.25rem",
129
+ // 36px
130
+ "5xl": "3rem"
131
+ // 48px
132
+ },
133
+ fontWeight: {
134
+ normal: "400",
135
+ medium: "500",
136
+ semibold: "600",
137
+ bold: "700"
138
+ },
139
+ lineHeight: {
140
+ none: "1",
141
+ tight: "1.25",
142
+ normal: "1.5",
143
+ relaxed: "1.75",
144
+ loose: "2"
145
+ }
146
+ };
147
+
148
+ // src/config/tailwind-config/tailwind-preset.ts
149
+ var caswPreset = {
150
+ theme: {
151
+ extend: {
152
+ colors,
153
+ spacing,
154
+ fontFamily: {
155
+ sans: typography.fontFamily.base,
156
+ mono: typography.fontFamily.mono
157
+ },
158
+ fontSize: typography.fontSize,
159
+ fontWeight: typography.fontWeight,
160
+ lineHeight: typography.lineHeight
161
+ }
162
+ }
163
+ };
164
+
165
+ // src/config/tailwind-config/tailwind.config.ts
166
+ var caswConfig = {
167
+ content: [
168
+ // CAUSW 컴포넌트 패키지의 빌드된 파일 스캔
169
+ "./node_modules/@causw/components/dist/**/*.{js,mjs}",
170
+ "./node_modules/@causw/tokens/dist/**/*.{js,mjs}"
171
+ ],
172
+ presets: [caswPreset]
173
+ };
174
+ var tailwind_config_default = caswConfig;
175
+
176
+ // src/config/tailwind-config/tailwind-content.ts
177
+ var tailwindContent = [
178
+ "./node_modules/@causw/components/dist/**/*.{js,mjs}",
179
+ "./node_modules/@causw/tokens/dist/**/*.{js,mjs}"
180
+ ];
181
+ // Annotate the CommonJS export names for ESM import in node:
182
+ 0 && (module.exports = {
183
+ caswConfig,
184
+ caswPreset,
185
+ tailwindContent
186
+ });
@@ -0,0 +1,45 @@
1
+ import {
2
+ colors,
3
+ spacing,
4
+ typography
5
+ } from "../chunk-DPNL4AJ4.mjs";
6
+
7
+ // src/config/tailwind-config/tailwind-preset.ts
8
+ var caswPreset = {
9
+ theme: {
10
+ extend: {
11
+ colors,
12
+ spacing,
13
+ fontFamily: {
14
+ sans: typography.fontFamily.base,
15
+ mono: typography.fontFamily.mono
16
+ },
17
+ fontSize: typography.fontSize,
18
+ fontWeight: typography.fontWeight,
19
+ lineHeight: typography.lineHeight
20
+ }
21
+ }
22
+ };
23
+
24
+ // src/config/tailwind-config/tailwind.config.ts
25
+ var caswConfig = {
26
+ content: [
27
+ // CAUSW 컴포넌트 패키지의 빌드된 파일 스캔
28
+ "./node_modules/@causw/components/dist/**/*.{js,mjs}",
29
+ "./node_modules/@causw/tokens/dist/**/*.{js,mjs}"
30
+ ],
31
+ presets: [caswPreset]
32
+ };
33
+ var tailwind_config_default = caswConfig;
34
+
35
+ // src/config/tailwind-config/tailwind-content.ts
36
+ var tailwindContent = [
37
+ "./node_modules/@causw/components/dist/**/*.{js,mjs}",
38
+ "./node_modules/@causw/tokens/dist/**/*.{js,mjs}"
39
+ ];
40
+ export {
41
+ caswConfig,
42
+ caswPreset,
43
+ tailwind_config_default as default,
44
+ tailwindContent
45
+ };
package/dist/index.d.mts CHANGED
@@ -78,17 +78,17 @@ declare const typography: {
78
78
  readonly '5xl': "3rem";
79
79
  };
80
80
  readonly fontWeight: {
81
- readonly normal: 400;
82
- readonly medium: 500;
83
- readonly semibold: 600;
84
- readonly bold: 700;
81
+ readonly normal: "400";
82
+ readonly medium: "500";
83
+ readonly semibold: "600";
84
+ readonly bold: "700";
85
85
  };
86
86
  readonly lineHeight: {
87
- readonly none: 1;
88
- readonly tight: 1.25;
89
- readonly normal: 1.5;
90
- readonly relaxed: 1.75;
91
- readonly loose: 2;
87
+ readonly none: "1";
88
+ readonly tight: "1.25";
89
+ readonly normal: "1.5";
90
+ readonly relaxed: "1.75";
91
+ readonly loose: "2";
92
92
  };
93
93
  };
94
94
 
package/dist/index.d.ts CHANGED
@@ -78,17 +78,17 @@ declare const typography: {
78
78
  readonly '5xl': "3rem";
79
79
  };
80
80
  readonly fontWeight: {
81
- readonly normal: 400;
82
- readonly medium: 500;
83
- readonly semibold: 600;
84
- readonly bold: 700;
81
+ readonly normal: "400";
82
+ readonly medium: "500";
83
+ readonly semibold: "600";
84
+ readonly bold: "700";
85
85
  };
86
86
  readonly lineHeight: {
87
- readonly none: 1;
88
- readonly tight: 1.25;
89
- readonly normal: 1.5;
90
- readonly relaxed: 1.75;
91
- readonly loose: 2;
87
+ readonly none: "1";
88
+ readonly tight: "1.25";
89
+ readonly normal: "1.5";
90
+ readonly relaxed: "1.75";
91
+ readonly loose: "2";
92
92
  };
93
93
  };
94
94
 
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ __export(index_exports, {
26
26
  });
27
27
  module.exports = __toCommonJS(index_exports);
28
28
 
29
- // src/colors.ts
29
+ // src/tokens/colors.ts
30
30
  var colors = {
31
31
  primary: {
32
32
  50: "#e3f2fd",
@@ -74,7 +74,7 @@ var colors = {
74
74
  }
75
75
  };
76
76
 
77
- // src/spacing.ts
77
+ // src/tokens/spacing.ts
78
78
  var spacing = {
79
79
  0: "0",
80
80
  1: "0.25rem",
@@ -103,7 +103,7 @@ var spacing = {
103
103
  // 96px
104
104
  };
105
105
 
106
- // src/typography.ts
106
+ // src/tokens/typography.ts
107
107
  var typography = {
108
108
  fontFamily: {
109
109
  base: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
@@ -130,17 +130,17 @@ var typography = {
130
130
  // 48px
131
131
  },
132
132
  fontWeight: {
133
- normal: 400,
134
- medium: 500,
135
- semibold: 600,
136
- bold: 700
133
+ normal: "400",
134
+ medium: "500",
135
+ semibold: "600",
136
+ bold: "700"
137
137
  },
138
138
  lineHeight: {
139
- none: 1,
140
- tight: 1.25,
141
- normal: 1.5,
142
- relaxed: 1.75,
143
- loose: 2
139
+ none: "1",
140
+ tight: "1.25",
141
+ normal: "1.5",
142
+ relaxed: "1.75",
143
+ loose: "2"
144
144
  }
145
145
  };
146
146
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -1,120 +1,8 @@
1
- // src/colors.ts
2
- var colors = {
3
- primary: {
4
- 50: "#e3f2fd",
5
- 100: "#bbdefb",
6
- 200: "#90caf9",
7
- 300: "#64b5f6",
8
- 400: "#42a5f5",
9
- 500: "#2196f3",
10
- 600: "#1e88e5",
11
- 700: "#1976d2",
12
- 800: "#1565c0",
13
- 900: "#0d47a1"
14
- },
15
- gray: {
16
- 50: "#fafafa",
17
- 100: "#f5f5f5",
18
- 200: "#eeeeee",
19
- 300: "#e0e0e0",
20
- 400: "#bdbdbd",
21
- 500: "#9e9e9e",
22
- 600: "#757575",
23
- 700: "#616161",
24
- 800: "#424242",
25
- 900: "#212121"
26
- },
27
- success: {
28
- main: "#4caf50",
29
- light: "#81c784",
30
- dark: "#388e3c"
31
- },
32
- error: {
33
- main: "#f44336",
34
- light: "#e57373",
35
- dark: "#d32f2f"
36
- },
37
- warning: {
38
- main: "#ff9800",
39
- light: "#ffb74d",
40
- dark: "#f57c00"
41
- },
42
- info: {
43
- main: "#2196f3",
44
- light: "#64b5f6",
45
- dark: "#1976d2"
46
- }
47
- };
48
-
49
- // src/spacing.ts
50
- var spacing = {
51
- 0: "0",
52
- 1: "0.25rem",
53
- // 4px
54
- 2: "0.5rem",
55
- // 8px
56
- 3: "0.75rem",
57
- // 12px
58
- 4: "1rem",
59
- // 16px
60
- 5: "1.25rem",
61
- // 20px
62
- 6: "1.5rem",
63
- // 24px
64
- 8: "2rem",
65
- // 32px
66
- 10: "2.5rem",
67
- // 40px
68
- 12: "3rem",
69
- // 48px
70
- 16: "4rem",
71
- // 64px
72
- 20: "5rem",
73
- // 80px
74
- 24: "6rem"
75
- // 96px
76
- };
77
-
78
- // src/typography.ts
79
- var typography = {
80
- fontFamily: {
81
- base: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
82
- mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'
83
- },
84
- fontSize: {
85
- xs: "0.75rem",
86
- // 12px
87
- sm: "0.875rem",
88
- // 14px
89
- base: "1rem",
90
- // 16px
91
- lg: "1.125rem",
92
- // 18px
93
- xl: "1.25rem",
94
- // 20px
95
- "2xl": "1.5rem",
96
- // 24px
97
- "3xl": "1.875rem",
98
- // 30px
99
- "4xl": "2.25rem",
100
- // 36px
101
- "5xl": "3rem"
102
- // 48px
103
- },
104
- fontWeight: {
105
- normal: 400,
106
- medium: 500,
107
- semibold: 600,
108
- bold: 700
109
- },
110
- lineHeight: {
111
- none: 1,
112
- tight: 1.25,
113
- normal: 1.5,
114
- relaxed: 1.75,
115
- loose: 2
116
- }
117
- };
1
+ import {
2
+ colors,
3
+ spacing,
4
+ typography
5
+ } from "./chunk-DPNL4AJ4.mjs";
118
6
  export {
119
7
  colors,
120
8
  spacing,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causw/tokens",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Design tokens for CAUSW Design System - CAU Software Community Service",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,12 +10,18 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.mjs",
12
12
  "require": "./dist/index.js"
13
+ },
14
+ "./config": {
15
+ "types": "./dist/config/index.d.ts",
16
+ "import": "./dist/config/index.mjs",
17
+ "require": "./dist/config/index.js"
13
18
  }
14
19
  },
15
20
  "files": [
16
21
  "dist"
17
22
  ],
18
23
  "devDependencies": {
24
+ "tailwindcss": "^4.1.17",
19
25
  "tsup": "^8.0.0",
20
26
  "typescript": "^5.3.0"
21
27
  },
@@ -29,9 +35,9 @@
29
35
  "provenance": true
30
36
  },
31
37
  "scripts": {
32
- "build": "tsup src/index.ts --format cjs,esm --dts",
33
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
34
- "lint": "eslint src --ext .ts",
38
+ "build": "tsup src/index.ts src/config/index.ts --format cjs,esm --dts",
39
+ "dev": "tsup src/index.ts src/config/index.ts --format cjs,esm --dts --watch",
40
+ "lint": "eslint src",
35
41
  "test": "echo \"No tests yet\""
36
42
  }
37
43
  }