@liner-fe/design-token 2.3.5 → 2.3.6

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 (58) hide show
  1. package/lib/components/ThemeProvider.d.ts +2 -2
  2. package/lib/helpers/setDarkModeScript.d.ts +1 -2
  3. package/lib/index.css +1 -0
  4. package/lib/index.d.ts +1 -1
  5. package/lib/index.js +293 -0
  6. package/lib/scripts/create-css/constants/PATH.d.ts +3 -0
  7. package/lib/scripts/create-css/constants/color/index.d.ts +8 -0
  8. package/lib/scripts/create-css/constants/color/types.d.ts +132 -0
  9. package/lib/scripts/create-css/constants/gap/index.d.ts +16 -0
  10. package/lib/scripts/create-css/constants/icon/index.d.ts +7 -0
  11. package/lib/scripts/create-css/constants/index.d.ts +10 -0
  12. package/lib/scripts/create-css/constants/opacity/index.d.ts +21 -0
  13. package/lib/scripts/create-css/constants/padding/index.d.ts +23 -0
  14. package/lib/scripts/create-css/constants/primitiveRoot.d.ts +1 -0
  15. package/lib/scripts/create-css/constants/radius/index.d.ts +2 -0
  16. package/lib/scripts/create-css/constants/radius/type.d.ts +10 -0
  17. package/lib/scripts/create-css/constants/rootScheme.d.ts +4 -0
  18. package/lib/scripts/create-css/constants/shadow/index.d.ts +2 -0
  19. package/lib/scripts/create-css/constants/size/index.d.ts +2 -0
  20. package/lib/scripts/create-css/constants/size/type.d.ts +31 -0
  21. package/lib/scripts/create-css/index.d.ts +1 -0
  22. package/lib/scripts/create-css/utils/convertFontFamily.d.ts +2 -0
  23. package/lib/scripts/create-css/utils/convertObjectToCSSVariables.d.ts +1 -0
  24. package/lib/scripts/create-css/utils/createFile.d.ts +2 -0
  25. package/lib/scripts/create-css/utils/fileToString.d.ts +1 -0
  26. package/lib/scripts/create-css/utils/generateTokenMap.d.ts +1 -0
  27. package/lib/scripts/create-css/utils/hexToRGBA.d.ts +1 -0
  28. package/lib/scripts/create-css/utils/makeDir.d.ts +1 -0
  29. package/lib/scripts/create-css/utils/removeTokenPrefix.d.ts +1 -0
  30. package/lib/scripts/create-css/utils/replaceValuesWithKeys.d.ts +1 -0
  31. package/lib/style/index.d.ts +1 -0
  32. package/package.json +9 -9
  33. package/src/assets/Merriweather-Black.ttf +0 -0
  34. package/src/assets/Merriweather-Bold.ttf +0 -0
  35. package/src/assets/Merriweather-Light.ttf +0 -0
  36. package/src/assets/Merriweather-Regular.ttf +0 -0
  37. package/src/assets/PretendardJPVariable.woff2 +0 -0
  38. package/src/assets/PretendardVariable.woff2 +0 -0
  39. package/src/index.ts +1 -1
  40. package/src/scripts/create-css/constants/font/font.css +6 -14
  41. package/src/scripts/create-css/constants/index.ts +1 -0
  42. package/src/scripts/create-css/constants/rootScheme.ts +4 -20
  43. package/src/scripts/create-css/index.ts +5 -14
  44. package/src/style/global.css +908 -0
  45. package/src/style/index.ts +1 -0
  46. package/global.css +0 -1160
  47. package/lib/components/Head.d.ts +0 -2
  48. package/lib/index.cjs +0 -654
  49. package/lib/index.cjs.map +0 -7
  50. package/lib/index.mjs +0 -623
  51. package/lib/index.mjs.map +0 -7
  52. package/src/components/Head.tsx +0 -36
  53. /package/{src/fonts/Merriweather-Black.ttf → lib/assets/Merriweather-Black-26IFHXBP.ttf} +0 -0
  54. /package/{src/fonts/Merriweather-Bold.ttf → lib/assets/Merriweather-Bold-OJOZX5RF.ttf} +0 -0
  55. /package/{src/fonts/Merriweather-Light.ttf → lib/assets/Merriweather-Light-CFMS753Z.ttf} +0 -0
  56. /package/{src/fonts/Merriweather-Regular.ttf → lib/assets/Merriweather-Regular-NACAIEN3.ttf} +0 -0
  57. /package/{src/fonts/PretendardJPVariable.woff2 → lib/assets/PretendardJPVariable-7Y3M4KVC.woff2} +0 -0
  58. /package/{src/fonts/PretendardVariable.woff2 → lib/assets/PretendardVariable-76CAZ7V7.woff2} +0 -0
@@ -0,0 +1,3 @@
1
+ export declare const PATH: {
2
+ SRC_GENERATED: string;
3
+ };
@@ -0,0 +1,8 @@
1
+ import { IColor } from './types';
2
+ export declare const color: IColor;
3
+ export declare const alphas: readonly [80, 72, 64, 56, 50, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 6, 4, 1, 0];
4
+ export type alphaPrimitiveKeys = 'lp-pri-achromatic-white' | 'lp-pri-gray-cool-dark' | 'lp-pri-gray-cool-light' | 'lp-pri-brand-original' | 'lp-pri-achromatic-black';
5
+ export declare const alphaPrimitive: {
6
+ name: alphaPrimitiveKeys;
7
+ value: string;
8
+ }[];
@@ -0,0 +1,132 @@
1
+ import { alphas, alphaPrimitiveKeys } from '.';
2
+ import { SystemKeys } from '../../../../types/color';
3
+ export interface IPrimitive {
4
+ 'lp-pri-achromatic-white': '#ffffff';
5
+ 'lp-pri-achromatic-black': '#000000';
6
+ 'lp-pri-gray-cool-980': '#F9F9FA';
7
+ 'lp-pri-gray-cool-970': '#F6F6F7';
8
+ 'lp-pri-gray-cool-940': '#EDEEF0';
9
+ 'lp-pri-gray-cool-920': '#E9E9EB';
10
+ 'lp-pri-gray-cool-900': '#E3E3E6';
11
+ 'lp-pri-gray-cool-850': '#D7D7D9';
12
+ 'lp-pri-gray-cool-750': '#BEBFC2';
13
+ 'lp-pri-gray-cool-600': '#939499';
14
+ 'lp-pri-gray-cool-450': '#6D6D70';
15
+ 'lp-pri-gray-cool-350': '#58595C';
16
+ 'lp-pri-gray-cool-300': '#4A4A4D';
17
+ 'lp-pri-gray-cool-250': '#3B3B3D';
18
+ 'lp-pri-gray-cool-200': '#313133';
19
+ 'lp-pri-gray-cool-100': '#1E1E1F';
20
+ 'lp-pri-brand-original-950': '#FAFBFF';
21
+ 'lp-pri-brand-original-900': '#F4F5FF';
22
+ 'lp-pri-brand-original-800': '#D9DEFF';
23
+ 'lp-pri-brand-original-700': '#B7C1FF';
24
+ 'lp-pri-brand-original-600': '#6B7FFF';
25
+ 'lp-pri-brand-original-500': '#4058FF';
26
+ 'lp-pri-brand-original-400': '#273FD9';
27
+ 'lp-pri-brand-original-200': '#152AB3';
28
+ 'lp-pri-brand-original-100': '#071780';
29
+ 'lp-pri-brand-original-50': '#041166';
30
+ 'lp-pri-brand-variation-950': '#FAFBFF';
31
+ 'lp-pri-brand-variation-900': '#F4F7FF';
32
+ 'lp-pri-brand-variation-800': '#D9E4FF';
33
+ 'lp-pri-brand-variation-700': '#B7CDFF';
34
+ 'lp-pri-brand-variation-600': '#759EFF';
35
+ 'lp-pri-brand-variation-500': '#5487FF';
36
+ 'lp-pri-brand-variation-400': '#4E70BF';
37
+ 'lp-pri-brand-variation-200': '#4A6299';
38
+ 'lp-pri-brand-variation-100': '#384666';
39
+ 'lp-pri-brand-variation-50': '#2C364D';
40
+ 'lp-pri-rainbow-red-950': '#FFF5F5';
41
+ 'lp-pri-rainbow-red-900': '#FFE7E7';
42
+ 'lp-pri-rainbow-red-800': '#FFC3C3';
43
+ 'lp-pri-rainbow-red-700': '#FF9090';
44
+ 'lp-pri-rainbow-red-600': '#FF6060';
45
+ 'lp-pri-rainbow-red-500': '#FF3333';
46
+ 'lp-pri-rainbow-red-400': '#DB2323';
47
+ 'lp-pri-rainbow-red-300': '#B81616';
48
+ 'lp-pri-rainbow-red-200': '#710808';
49
+ 'lp-pri-rainbow-red-100': '#410404';
50
+ 'lp-pri-rainbow-orange-950': '#FFFBF4';
51
+ 'lp-pri-rainbow-orange-900': '#FFF4E3';
52
+ 'lp-pri-rainbow-orange-800': '#FFE1B4';
53
+ 'lp-pri-rainbow-orange-700': '#FFC875';
54
+ 'lp-pri-rainbow-orange-600': '#FFB039';
55
+ 'lp-pri-rainbow-orange-500': '#FF9900';
56
+ 'lp-pri-rainbow-orange-400': '#DB8503';
57
+ 'lp-pri-rainbow-orange-300': '#B87005';
58
+ 'lp-pri-rainbow-orange-200': '#714605';
59
+ 'lp-pri-rainbow-orange-100': '#412803';
60
+ 'lp-pri-rainbow-yellow-950': '#FFFDF4';
61
+ 'lp-pri-rainbow-yellow-900': '#FFF9E3';
62
+ 'lp-pri-rainbow-yellow-800': '#FFF0B4';
63
+ 'lp-pri-rainbow-yellow-700': '#FFE375';
64
+ 'lp-pri-rainbow-yellow-600': '#FFD739';
65
+ 'lp-pri-rainbow-yellow-500': '#FFCC00';
66
+ 'lp-pri-rainbow-yellow-400': '#DBB003';
67
+ 'lp-pri-rainbow-yellow-300': '#B89405';
68
+ 'lp-pri-rainbow-yellow-200': '#715B05';
69
+ 'lp-pri-rainbow-yellow-100': '#413503';
70
+ 'lp-pri-rainbow-green-950': '#F5FEF7';
71
+ 'lp-pri-rainbow-green-900': '#E6FCEA';
72
+ 'lp-pri-rainbow-green-800': '#BFF5C8';
73
+ 'lp-pri-rainbow-green-700': '#8CEC9C';
74
+ 'lp-pri-rainbow-green-600': '#5DDF73';
75
+ 'lp-pri-rainbow-green-500': '#30BF48';
76
+ 'lp-pri-rainbow-green-400': '#20A536';
77
+ 'lp-pri-rainbow-green-300': '#148B28';
78
+ 'lp-pri-rainbow-green-200': '#075714';
79
+ 'lp-pri-rainbow-green-100': '#03350B';
80
+ 'lp-pri-rainbow-mint-950': '#F3FEFE';
81
+ 'lp-pri-rainbow-mint-900': '#AFF7F7';
82
+ 'lp-pri-rainbow-mint-800': '#6EF0F0';
83
+ 'lp-pri-rainbow-mint-700': '#33E6E6';
84
+ 'lp-pri-rainbow-mint-600': '#00CCCC';
85
+ 'lp-pri-rainbow-mint-500': '#02B0B0';
86
+ 'lp-pri-rainbow-mint-400': '#02B0B0';
87
+ 'lp-pri-rainbow-mint-300': '#049494';
88
+ 'lp-pri-rainbow-mint-200': '#045C5C';
89
+ 'lp-pri-rainbow-mint-100': '#033737';
90
+ 'lp-pri-rainbow-cyan-950': '#F6FBFF';
91
+ 'lp-pri-rainbow-cyan-900': '#E8F6FF';
92
+ 'lp-pri-rainbow-cyan-800': '#C6E8FF';
93
+ 'lp-pri-rainbow-cyan-700': '#97D5FF';
94
+ 'lp-pri-rainbow-cyan-600': '#6AC4FF';
95
+ 'lp-pri-rainbow-cyan-500': '#40B3FF';
96
+ 'lp-pri-rainbow-cyan-400': '#2B95DB';
97
+ 'lp-pri-rainbow-cyan-300': '#1A79B8';
98
+ 'lp-pri-rainbow-cyan-200': '#094771';
99
+ 'lp-pri-rainbow-cyan-100': '#042941';
100
+ 'lp-pri-rainbow-purple-950': '#FCF6FF';
101
+ 'lp-pri-rainbow-purple-900': '#F7EAFE';
102
+ 'lp-pri-rainbow-purple-800': '#EBCAFB';
103
+ 'lp-pri-rainbow-purple-700': '#DAA0F7';
104
+ 'lp-pri-rainbow-purple-600': '#C978F2';
105
+ 'lp-pri-rainbow-purple-500': '#B450E6';
106
+ 'lp-pri-rainbow-purple-400': '#9535C6';
107
+ 'lp-pri-rainbow-purple-300': '#7920A6';
108
+ 'lp-pri-rainbow-purple-200': '#480A67';
109
+ 'lp-pri-rainbow-purple-100': '#29043C';
110
+ 'lp-pri-rainbow-pink-950': '#FFF5F8';
111
+ 'lp-pri-rainbow-pink-900': '#FFE7EF';
112
+ 'lp-pri-rainbow-pink-800': '#FFC3D7';
113
+ 'lp-pri-rainbow-pink-700': '#FF90B5';
114
+ 'lp-pri-rainbow-pink-600': '#FF6095';
115
+ 'lp-pri-rainbow-pink-500': '#FF3377';
116
+ 'lp-pri-rainbow-pink-400': '#DB2360';
117
+ 'lp-pri-rainbow-pink-300': '#B8164C';
118
+ 'lp-pri-rainbow-pink-200': '#71082B';
119
+ 'lp-pri-rainbow-pink-100': '#120107';
120
+ }
121
+ export interface IPrimitiveWithAlpha extends Partial<Record<AlphasKey, string>>, IPrimitive {
122
+ }
123
+ type ISystem = Record<SystemKeys, keyof IPrimitiveWithAlpha>;
124
+ export interface IColor {
125
+ primitive: IPrimitiveWithAlpha;
126
+ system: {
127
+ dark: Partial<ISystem>;
128
+ light: Partial<ISystem>;
129
+ };
130
+ }
131
+ export type AlphasKey = `${alphaPrimitiveKeys}-alpha-${(typeof alphas)[number]}`;
132
+ export {};
@@ -0,0 +1,16 @@
1
+ export declare const gap: {
2
+ readonly 'lp-sys-gap-positive-50': "2px";
3
+ readonly 'lp-sys-gap-positive-100': "4px";
4
+ readonly 'lp-sys-gap-positive-150': "6px";
5
+ readonly 'lp-sys-gap-positive-200': "8px";
6
+ readonly 'lp-sys-gap-positive-300': "12px";
7
+ readonly 'lp-sys-gap-positive-400': "16px";
8
+ readonly 'lp-sys-gap-positive-500': "20px";
9
+ readonly 'lp-sys-gap-positive-600': "24px";
10
+ readonly 'lp-sys-gap-positive-700': "32px";
11
+ readonly 'lp-sys-gap-positive-800': "40px";
12
+ readonly 'lp-sys-gap-positive-900': "48px";
13
+ readonly 'lp-sys-gap-negative-700': "-2px";
14
+ readonly 'lp-sys-gap-negative-800': "-4px";
15
+ readonly 'lp-sys-gap-negative-900': "-6px";
16
+ };
@@ -0,0 +1,7 @@
1
+ export declare const iconSize: {
2
+ readonly 'lp-sys-icon-size-xs': "16px";
3
+ readonly 'lp-sys-icon-size-s': "20px";
4
+ readonly 'lp-sys-icon-size-m': "24px";
5
+ readonly 'lp-sys-icon-size-l': "32px";
6
+ readonly 'lp-sys-icon-size-xl': "40px";
7
+ };
@@ -0,0 +1,10 @@
1
+ export * from './color';
2
+ export * from './gap';
3
+ export * from './icon';
4
+ export * from './opacity';
5
+ export * from './padding';
6
+ export * from './radius';
7
+ export * from './shadow';
8
+ export * from './size';
9
+ export * from './typography';
10
+ export * from './breakpoint';
@@ -0,0 +1,21 @@
1
+ export declare const opacity: {
2
+ readonly 'lp-pri-opacity-80': "80%";
3
+ readonly 'lp-pri-opacity-72': "72%";
4
+ readonly 'lp-pri-opacity-64': "64%";
5
+ readonly 'lp-pri-opacity-56': "56%";
6
+ readonly 'lp-pri-opacity-50': "50%";
7
+ readonly 'lp-pri-opacity-48': "48%";
8
+ readonly 'lp-pri-opacity-44': "44%";
9
+ readonly 'lp-pri-opacity-40': "40%";
10
+ readonly 'lp-pri-opacity-36': "36%";
11
+ readonly 'lp-pri-opacity-32': "32%";
12
+ readonly 'lp-pri-opacity-28': "28%";
13
+ readonly 'lp-pri-opacity-24': "24%";
14
+ readonly 'lp-pri-opacity-20': "20%";
15
+ readonly 'lp-pri-opacity-16': "16%";
16
+ readonly 'lp-pri-opacity-12': "12%";
17
+ readonly 'lp-pri-opacity-8': "8%";
18
+ readonly 'lp-pri-opacity-4': "4%";
19
+ readonly 'lp-pri-opacity-1': "1%";
20
+ readonly 'lp-pri-opacity-0': "0%";
21
+ };
@@ -0,0 +1,23 @@
1
+ export declare const padding: {
2
+ readonly 'lp-sys-padding-component-50': "2px";
3
+ readonly 'lp-sys-padding-component-100': "4px";
4
+ readonly 'lp-sys-padding-component-150': "6px";
5
+ readonly 'lp-sys-padding-component-200': "8px";
6
+ readonly 'lp-sys-padding-component-300': "12px";
7
+ readonly 'lp-sys-padding-component-400': "16px";
8
+ readonly 'lp-sys-padding-component-500': "20px";
9
+ readonly 'lp-sys-padding-component-600': "24px";
10
+ readonly 'lp-sys-padding-component-700': "32px";
11
+ readonly 'lp-sys-padding-component-800': "40px";
12
+ readonly 'lp-sys-padding-component-900': "48px";
13
+ readonly 'lp-sys-padding-section-50': "20px";
14
+ readonly 'lp-sys-padding-section-100': "24px";
15
+ readonly 'lp-sys-padding-section-200': "32px";
16
+ readonly 'lp-sys-padding-section-300': "40px";
17
+ readonly 'lp-sys-padding-section-400': "48px";
18
+ readonly 'lp-sys-padding-section-500': "56px";
19
+ readonly 'lp-sys-padding-section-600': "64px";
20
+ readonly 'lp-sys-padding-section-700': "80px";
21
+ readonly 'lp-sys-padding-section-800': "100px";
22
+ readonly 'lp-sys-padding-section-900': "120px";
23
+ };
@@ -0,0 +1 @@
1
+ export declare const primitiveRoot: string;
@@ -0,0 +1,2 @@
1
+ import { IRadius } from './type';
2
+ export declare const radius: IRadius;
@@ -0,0 +1,10 @@
1
+ import { ISize } from '../size/type';
2
+ export interface IRadius {
3
+ 'lp-sys-radius-xxs': (typeof ISize)['lp-pri-size-2'];
4
+ 'lp-sys-radius-xs': (typeof ISize)['lp-pri-size-4'];
5
+ 'lp-sys-radius-s': (typeof ISize)['lp-pri-size-6'];
6
+ 'lp-sys-radius-m': (typeof ISize)['lp-pri-size-8'];
7
+ 'lp-sys-radius-l': (typeof ISize)['lp-pri-size-10'];
8
+ 'lp-sys-radius-xl': (typeof ISize)['lp-pri-size-12'];
9
+ 'lp-sys-radius-xxl': (typeof ISize)['lp-pri-size-200'];
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare const languageJapanese: string;
2
+ export declare const languageEnglish: string;
3
+ export declare const themeDark: string;
4
+ export declare const themeLight: string;
@@ -0,0 +1,2 @@
1
+ export declare const SHADOW_KEYS: readonly ["lp-sys-shadow-normal", "lp-sys-shadow-strong", "lp-sys-shadow-heavy"];
2
+ export declare const shadow: Record<(typeof SHADOW_KEYS)[number], [string, string]>;
@@ -0,0 +1,2 @@
1
+ import { ISize } from './type';
2
+ export declare const size: Record<keyof typeof ISize, (typeof ISize)[keyof typeof ISize]>;
@@ -0,0 +1,31 @@
1
+ export declare const ISize: {
2
+ readonly 'lp-pri-size-minus6': "-6px";
3
+ readonly 'lp-pri-size-minus4': "-4px";
4
+ readonly 'lp-pri-size-minus2': "-2px";
5
+ readonly 'lp-pri-size-0': "0px";
6
+ readonly 'lp-pri-size-1': "1px";
7
+ readonly 'lp-pri-size-2': "2px";
8
+ readonly 'lp-pri-size-3': "3px";
9
+ readonly 'lp-pri-size-4': "4px";
10
+ readonly 'lp-pri-size-6': "6px";
11
+ readonly 'lp-pri-size-8': "8px";
12
+ readonly 'lp-pri-size-10': "10px";
13
+ readonly 'lp-pri-size-12': "12px";
14
+ readonly 'lp-pri-size-14': "14px";
15
+ readonly 'lp-pri-size-16': "16px";
16
+ readonly 'lp-pri-size-18': "18px";
17
+ readonly 'lp-pri-size-20': "20px";
18
+ readonly 'lp-pri-size-24': "24px";
19
+ readonly 'lp-pri-size-32': "32px";
20
+ readonly 'lp-pri-size-40': "40px";
21
+ readonly 'lp-pri-size-48': "48px";
22
+ readonly 'lp-pri-size-56': "56px";
23
+ readonly 'lp-pri-size-64': "64px";
24
+ readonly 'lp-pri-size-80': "80px";
25
+ readonly 'lp-pri-size-100': "100px";
26
+ readonly 'lp-pri-size-120': "120px";
27
+ readonly 'lp-pri-size-140': "140px";
28
+ readonly 'lp-pri-size-160': "160px";
29
+ readonly 'lp-pri-size-180': "180px";
30
+ readonly 'lp-pri-size-200': "200px";
31
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FontFamily } from '../constants/typography';
2
+ export declare const convertFontFamily: (value: FontFamily) => "\"Pretendard JP Variable\"" | "\"Merriweather\", serif" | "\"Pretendard Variable\"";
@@ -0,0 +1 @@
1
+ export declare const convertObjectToCSSVariables: (obj: Record<string, string | number>) => string;
@@ -0,0 +1,2 @@
1
+ import { NoParamCallback, PathOrFileDescriptor } from 'fs';
2
+ export declare const createFile: (path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback?: NoParamCallback) => void;
@@ -0,0 +1 @@
1
+ export declare const fileToString: (url: string) => Promise<string>;
@@ -0,0 +1 @@
1
+ export declare const generateTokenMap: (tokens: Record<string, any>[]) => Record<string, any>;
@@ -0,0 +1 @@
1
+ export declare const hexToRgba: (hex: string, alpha: number) => string;
@@ -0,0 +1 @@
1
+ export declare const makeDir: (path: string) => void;
@@ -0,0 +1 @@
1
+ export declare const removeObjectPrefix: <T extends Record<string, any>>(target: T, prefixes: string[]) => Record<string, any>;
@@ -0,0 +1 @@
1
+ export declare const replaceValuesWithKeys: <T extends Record<string, any>>(obj: T) => Record<string, any>;
@@ -0,0 +1 @@
1
+ import './global.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/design-token",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "packageManager": "yarn@3.6.0",
5
5
  "devDependencies": {
6
6
  "@types/react": "^18.2.48",
@@ -11,29 +11,29 @@
11
11
  "typescript": "^5.1.3"
12
12
  },
13
13
  "dependencies": {
14
- "recoil": "^0.5.2"
14
+ "esbuild": "^0.24.0",
15
+ "recoil": "^0.5.2",
16
+ "tsc-alias": "^1.8.10"
15
17
  },
16
18
  "peerDependencies": {
17
19
  "react": "*"
18
20
  },
19
21
  "scripts": {
20
- "build": "yarn create-css && nanobundle build",
22
+ "build": "yarn create-css && node build.mjs && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
21
23
  "build:package": "yarn build",
22
24
  "prepack": "yarn build",
23
25
  "create-css": "ts-node ./src/scripts/create-css/index.ts"
24
26
  },
25
27
  "publishConfig": {
26
28
  "access": "public",
27
- "main": "./lib/index.mjs"
29
+ "main": "./lib/index.js"
28
30
  },
29
31
  "exports": {
30
32
  ".": {
31
33
  "types": "./lib/index.d.ts",
32
- "import": "./lib/index.mjs",
33
- "require": "./lib/index.cjs"
34
+ "import": "./lib/index.js"
34
35
  },
35
- "./global.css": "./global.css",
36
- "./globalStorybook.css": "./globalStorybook.css",
36
+ "./index.css": "./lib/index.css",
37
37
  "./package.json": "./package.json"
38
38
  },
39
39
  "maintainers": [
@@ -42,7 +42,7 @@
42
42
  "email": "eliot@linercorp.com"
43
43
  }
44
44
  ],
45
- "main": "./lib/index.cjs",
45
+ "main": "./lib/index.js",
46
46
  "types": "./lib/index.d.ts",
47
47
  "files": [
48
48
  "lib",
Binary file
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from './hooks/useDarkTheme';
2
2
  export * from './hooks/useLanguage';
3
- export * from './components/Head';
4
3
  export * from './generated/vars';
5
4
  export * from './generated/classNames';
6
5
  export * from './helpers/getTypoStyle';
@@ -9,3 +8,4 @@ export * from './components/ThemeProvider';
9
8
  export * from './scripts/create-css/constants/typography/types';
10
9
  export * from './scripts/create-css/constants/breakpoint/index';
11
10
  export * from './types/color';
11
+ export * from './style/index';
@@ -4,7 +4,7 @@
4
4
  font-weight: 45 920;
5
5
  font-style: normal;
6
6
  font-display: swap;
7
- src: url('./src/fonts/PretendardVariable.woff2') format('woff2-variations');
7
+ src: url('../assets/PretendardVariable.woff2') format('woff2-variations');
8
8
  }
9
9
 
10
10
  /* Pretendard JP */
@@ -13,7 +13,7 @@
13
13
  font-weight: 45 920;
14
14
  font-style: normal;
15
15
  font-display: swap;
16
- src: url('./src/fonts/PretendardJPVariable.woff2') format('woff2-variations');
16
+ src: url('../assets/PretendardJPVariable.woff2') format('woff2-variations');
17
17
  }
18
18
 
19
19
  /* Merryweather */
@@ -21,34 +21,26 @@
21
21
  font-family: 'Merriweather';
22
22
  font-weight: 900;
23
23
  font-display: swap;
24
- src:
25
- local('Merriweather Black'),
26
- url('./src/fonts/Merriweather-Black.ttf') format('woff2');
24
+ src: local('Merriweather Black'), url('../assets/Merriweather-Black.ttf') format('woff2');
27
25
  }
28
26
 
29
27
  @font-face {
30
28
  font-family: 'Merriweather';
31
29
  font-weight: 700;
32
30
  font-display: swap;
33
- src:
34
- local('Merriweather Bold'),
35
- url('./src/fonts/Merriweather-Bold.ttf') format('woff2');
31
+ src: local('Merriweather Bold'), url('../assets/Merriweather-Bold.ttf') format('woff2');
36
32
  }
37
33
 
38
34
  @font-face {
39
35
  font-family: 'Merriweather';
40
36
  font-weight: 400;
41
37
  font-display: swap;
42
- src:
43
- local('Merriweather Regular'),
44
- url('./src/fonts/Merriweather-Regular.ttf') format('woff2');
38
+ src: local('Merriweather Regular'), url('../assets/Merriweather-Regular.ttf') format('woff2');
45
39
  }
46
40
 
47
41
  @font-face {
48
42
  font-family: 'Merriweather';
49
43
  font-weight: 300;
50
44
  font-display: swap;
51
- src:
52
- local('Merriweather Light'),
53
- url('./src/fonts/Merriweather-Light.ttf') format('woff2');
45
+ src: local('Merriweather Light'), url('../assets/Merriweather-Light.ttf') format('woff2');
54
46
  }
@@ -7,3 +7,4 @@ export * from './radius';
7
7
  export * from './shadow';
8
8
  export * from './size';
9
9
  export * from './typography';
10
+ export * from './breakpoint';
@@ -48,18 +48,10 @@ Object.entries(shadow).map(([key, value]) => {
48
48
  });
49
49
 
50
50
  export const themeDark = `
51
- :root[color-theme='dark'] {
52
- ${convertObjectToCSSVariables(systemDarkColor)}
53
-
54
- ${convertObjectToCSSVariables(systemDarkShadow)}
55
- }
56
-
57
- `;
58
-
59
- export const themeDarkStorybook = `
51
+ :root[color-theme='dark'],
60
52
  :root[class='dark'] {
61
53
  ${convertObjectToCSSVariables(systemDarkColor)}
62
-
54
+
63
55
  ${convertObjectToCSSVariables(systemDarkShadow)}
64
56
  }
65
57
 
@@ -79,19 +71,11 @@ Object.entries(shadow).map(([key, value]) => {
79
71
 
80
72
  export const themeLight = `
81
73
 
82
- :root[color-theme='light'] {
83
- ${convertObjectToCSSVariables(systemLightColor)}
84
-
85
-
86
- ${convertObjectToCSSVariables(systemLightShadow)}
87
- }
88
- `;
89
-
90
- export const themeLightStorybook = `
91
-
74
+ :root[color-theme='light'],
92
75
  :root[class='light'] {
93
76
  ${convertObjectToCSSVariables(systemLightColor)}
94
77
 
78
+
95
79
  ${convertObjectToCSSVariables(systemLightShadow)}
96
80
  }
97
81
  `;
@@ -1,12 +1,6 @@
1
1
  import { color } from './constants/color';
2
2
  import { primitiveRoot } from './constants/primitiveRoot';
3
- import {
4
- languageEnglish,
5
- themeDark,
6
- themeDarkStorybook,
7
- themeLight,
8
- themeLightStorybook,
9
- } from './constants/rootScheme';
3
+ import { languageEnglish, themeDark, themeLight } from './constants/rootScheme';
10
4
  import { PATH } from './constants/PATH';
11
5
  import { makeDir } from './utils/makeDir';
12
6
  import { replaceValuesWithKeys } from './utils/replaceValuesWithKeys';
@@ -14,18 +8,15 @@ import { createFile } from './utils/createFile';
14
8
  import { generateTokenMap } from './utils/generateTokenMap';
15
9
  import { gap, iconSize, opacity, padding, radius, shadow, size, typographyClassName } from './constants';
16
10
  import { breakpoint } from './constants/breakpoint';
11
+ import { fileToString } from './utils/fileToString';
17
12
 
18
13
  const tokens = [{ radius }, { opacity }, { padding }, { size }, { gap }, { shadow }, { iconSize }, { breakpoint }];
19
14
 
20
15
  const start = async () => {
21
16
  try {
22
- // TODO: 폰트 파일을 번들링하는 번들러 로더 설정이 필요해 작업 후 반영 예정
23
- // const fontCss = await fileToString('../constants/font/font.css');
24
- const cssFile = [primitiveRoot, themeDark, themeLight, languageEnglish].join('\n');
25
- const cssFileStorybook = [primitiveRoot, themeDarkStorybook, themeLightStorybook, languageEnglish].join('\n');
26
-
27
- createFile('./global.css', cssFile);
28
- createFile('./globalStorybook.css', cssFileStorybook);
17
+ const fontCss = await fileToString('../constants/font/font.css');
18
+ const cssFile = [fontCss, primitiveRoot, themeDark, themeLight, languageEnglish].join('\n');
19
+ createFile('./src/style/global.css', cssFile);
29
20
 
30
21
  makeDir(PATH.SRC_GENERATED);
31
22