@pisodev/test-component-library 2.1.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Typography/H1/H1.web.d.ts +5 -0
- package/dist/components/Typography/H1/index.web.d.ts +2 -0
- package/dist/components/Typography/index.web.d.ts +2 -0
- package/dist/components/Typography/shared/Typography.base.types.d.ts +11 -0
- package/dist/components/index.web.d.ts +1 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.esm.js +53 -34
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +55 -35
- package/dist/index.js.map +1 -1
- package/dist/index.web.d.ts +2 -3
- package/dist/theme/build-colors.d.ts +1 -0
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.data.d.ts +28 -0
- package/dist/theme/colors.types.d.ts +14 -38
- package/dist/theme/index.d.ts +3 -5
- package/package.json +7 -6
- package/src/components/Typography/H1/H1.native.tsx +25 -0
- package/src/components/Typography/H1/H1.web.module.scss +10 -0
- package/src/components/Typography/H1/H1.web.tsx +19 -0
- package/src/components/Typography/H1/index.ts +2 -0
- package/src/components/Typography/H1/index.web.ts +2 -0
- package/src/components/Typography/index.ts +2 -0
- package/src/components/Typography/index.web.ts +2 -0
- package/src/components/Typography/shared/Typography.base.types.ts +14 -0
- package/src/components/index.ts +1 -0
- package/src/components/index.web.ts +1 -0
- package/src/index.ts +2 -0
- package/src/index.web.ts +2 -0
- package/src/theme/_colors.scss +41 -0
- package/{components → src}/theme/_index.scss +1 -0
- package/src/theme/build-colors.ts +103 -0
- package/src/theme/colors.css +67 -0
- package/src/theme/colors.data.ts +28 -0
- package/src/theme/colors.ts +14 -0
- package/src/theme/colors.types.ts +23 -0
- package/src/theme/index.ts +3 -0
- package/src/types/scss.d.ts +9 -0
- package/components/Anchor/Anchor.native.tsx +0 -44
- package/components/Anchor/Anchor.types.ts +0 -11
- package/components/Anchor/Anchor.web.module.scss +0 -33
- package/components/Anchor/Anchor.web.tsx +0 -35
- package/components/Anchor/README.md +0 -58
- package/components/Anchor/index.ts +0 -2
- package/components/Anchor/index.web.ts +0 -2
- package/components/StatusBar/README.md +0 -56
- package/components/StatusBar/StatusBar.tsx +0 -17
- package/components/StatusBar/StatusBar.types.ts +0 -5
- package/components/StatusBar/index.ts +0 -3
- package/components/StatusBar/index.web.ts +0 -14
- package/components/Tooltip/README.md +0 -45
- package/components/Tooltip/Tooltip.module.scss +0 -44
- package/components/Tooltip/Tooltip.tsx +0 -26
- package/components/Tooltip/Tooltip.types.ts +0 -7
- package/components/Tooltip/index.native.ts +0 -15
- package/components/Tooltip/index.ts +0 -3
- package/components/index.ts +0 -8
- package/components/index.web.ts +0 -8
- package/components/theme/ThemeContext.ts +0 -15
- package/components/theme/ThemeProvider.native.tsx +0 -36
- package/components/theme/ThemeProvider.tsx +0 -6
- package/components/theme/ThemeProvider.web.tsx +0 -67
- package/components/theme/_colors.scss +0 -89
- package/components/theme/colors.ts +0 -81
- package/components/theme/colors.types.ts +0 -48
- package/components/theme/index.ts +0 -5
- package/components/theme/index.web.ts +0 -4
- package/components/theme/useTheme.ts +0 -12
- package/dist/Anchor/Anchor.native.d.ts +0 -3
- package/dist/Anchor/Anchor.native.js +0 -34
- package/dist/Anchor/Anchor.types.d.ts +0 -10
- package/dist/Anchor/Anchor.types.js +0 -2
- package/dist/Anchor/Anchor.web.d.ts +0 -3
- package/dist/Anchor/index.d.ts +0 -2
- package/dist/Anchor/index.web.d.ts +0 -2
- package/dist/StatusBar/StatusBar.d.ts +0 -3
- package/dist/StatusBar/StatusBar.types.d.ts +0 -5
- package/dist/StatusBar/StatusBar.types.js +0 -2
- package/dist/StatusBar/index.d.ts +0 -2
- package/dist/StatusBar/index.web.d.ts +0 -3
- package/dist/Tooltip/Tooltip.d.ts +0 -3
- package/dist/Tooltip/Tooltip.types.d.ts +0 -6
- package/dist/Tooltip/Tooltip.types.js +0 -2
- package/dist/Tooltip/index.d.ts +0 -2
- package/dist/Tooltip/index.native.d.ts +0 -4
- package/dist/Tooltip/index.native.js +0 -12
- package/dist/theme/ThemeContext.d.ts +0 -7
- package/dist/theme/ThemeProvider.d.ts +0 -2
- package/dist/theme/ThemeProvider.native.d.ts +0 -8
- package/dist/theme/ThemeProvider.web.d.ts +0 -7
- package/dist/theme/index.web.d.ts +0 -4
- package/dist/theme/useTheme.d.ts +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TypographyBaseProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TypographyWebProps extends TypographyBaseProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TypographyNativeProps extends TypographyBaseProps {
|
|
10
|
+
testID?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography/index.web';
|
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -1,10 +1,55 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const grayScale = {
|
|
4
|
+
light: {
|
|
5
|
+
'00': '#FFFFFF',
|
|
6
|
+
'50': '#F6F8FA',
|
|
7
|
+
'100': '#EEF0F2',
|
|
8
|
+
'200': '#E6E8EA',
|
|
9
|
+
'300': '#DADCDD',
|
|
10
|
+
'400': '#CED0D2',
|
|
11
|
+
'500': '#AAACAE',
|
|
12
|
+
'600': '#86888A',
|
|
13
|
+
'700': '#4C4E50',
|
|
14
|
+
'800': '#2C2E30',
|
|
15
|
+
'900': '#0C0E10',
|
|
16
|
+
},
|
|
17
|
+
dark: {
|
|
18
|
+
'00': '#0C0E10',
|
|
19
|
+
'50': '#1A1C1E',
|
|
20
|
+
'100': '#282A2C',
|
|
21
|
+
'200': '#36383A',
|
|
22
|
+
'300': '#444648',
|
|
23
|
+
'400': '#525456',
|
|
24
|
+
'500': '#66686A',
|
|
25
|
+
'600': '#888A8C',
|
|
26
|
+
'700': '#AAACAE',
|
|
27
|
+
'800': '#CCCED0',
|
|
28
|
+
'900': '#FFFFFF',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var colors_data = /*#__PURE__*/Object.freeze({
|
|
33
|
+
__proto__: null,
|
|
34
|
+
grayScale: grayScale
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const lightColors = {
|
|
38
|
+
colors: {
|
|
39
|
+
gray: grayScale.light,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const darkColors = {
|
|
43
|
+
colors: {
|
|
44
|
+
gray: grayScale.dark,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
2
47
|
|
|
3
48
|
function styleInject(css, ref) {
|
|
4
49
|
if ( ref === void 0 ) ref = {};
|
|
5
50
|
var insertAt = ref.insertAt;
|
|
6
51
|
|
|
7
|
-
if (
|
|
52
|
+
if (typeof document === 'undefined') { return; }
|
|
8
53
|
|
|
9
54
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
10
55
|
var style = document.createElement('style');
|
|
@@ -27,40 +72,14 @@ function styleInject(css, ref) {
|
|
|
27
72
|
}
|
|
28
73
|
}
|
|
29
74
|
|
|
30
|
-
var css_248z
|
|
31
|
-
var styles
|
|
32
|
-
styleInject(css_248z$1);
|
|
33
|
-
|
|
34
|
-
const Anchor = ({ children, href, rel, title, target = '_self', className = '', onPress, }) => {
|
|
35
|
-
const anchorClasses = [styles$1.anchor, className].filter(Boolean).join(' ');
|
|
36
|
-
const handleClick = (e) => {
|
|
37
|
-
if (onPress) {
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
onPress();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
return (React.createElement("a", { href: href, rel: rel, title: title, target: target, className: anchorClasses, onClick: handleClick }, children));
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var css_248z = ".Tooltip-module_tooltipWrapper__xyNaw{display:inline-block;position:relative}.Tooltip-module_tooltip__5JYjr{background-color:rgba(0,0,0,.8);border-radius:4px;color:#fff;font-size:14px;padding:8px 12px;pointer-events:none;position:absolute;white-space:nowrap;z-index:1000}.Tooltip-module_tooltip__5JYjr.Tooltip-module_top__ne8AY{bottom:100%;left:50%;margin-bottom:8px;transform:translateX(-50%)}.Tooltip-module_tooltip__5JYjr.Tooltip-module_bottom__euTWK{left:50%;margin-top:8px;top:100%;transform:translateX(-50%)}.Tooltip-module_tooltip__5JYjr.Tooltip-module_left__vrkh0{margin-right:8px;right:100%;top:50%;transform:translateY(-50%)}.Tooltip-module_tooltip__5JYjr.Tooltip-module_right__jZEpK{left:100%;margin-left:8px;top:50%;transform:translateY(-50%)}";
|
|
46
|
-
var styles = {"tooltipWrapper":"Tooltip-module_tooltipWrapper__xyNaw","tooltip":"Tooltip-module_tooltip__5JYjr","top":"Tooltip-module_top__ne8AY","bottom":"Tooltip-module_bottom__euTWK","left":"Tooltip-module_left__vrkh0","right":"Tooltip-module_right__jZEpK"};
|
|
75
|
+
var css_248z = ".H1-web-module_h1__jMWPY {\n font-size: 32px;\n font-weight: 700;\n line-height: 40px;\n letter-spacing: -0.5px;\n margin: 0;\n color: var(--gray-900);\n}";
|
|
76
|
+
var styles = {"h1":"H1-web-module_h1__jMWPY"};
|
|
47
77
|
styleInject(css_248z);
|
|
48
78
|
|
|
49
|
-
const
|
|
50
|
-
const [
|
|
51
|
-
return (React.createElement("
|
|
52
|
-
children,
|
|
53
|
-
isVisible && (React.createElement("div", { className: `${styles.tooltip} ${styles[position]}` }, content))));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// 웹에서는 StatusBar 개념이 없음
|
|
57
|
-
const StatusBar = (_props) => {
|
|
58
|
-
if (process.env.NODE_ENV === 'development') {
|
|
59
|
-
console.warn('StatusBar is only available on React Native. ' +
|
|
60
|
-
'For web, you can use <meta name="theme-color"> in your HTML.');
|
|
61
|
-
}
|
|
62
|
-
return null;
|
|
79
|
+
const H1 = ({ children, className = '', id }) => {
|
|
80
|
+
const h1Classes = [styles.h1, className].filter(Boolean).join(' ');
|
|
81
|
+
return (React.createElement("h1", { id: id, className: h1Classes }, children));
|
|
63
82
|
};
|
|
64
83
|
|
|
65
|
-
export {
|
|
84
|
+
export { H1, colors_data as colorScales, darkColors, lightColors };
|
|
66
85
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js","../components/
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/theme/colors.data.ts","../src/theme/colors.ts","../../node_modules/style-inject/dist/style-inject.es.js","../src/components/Typography/H1/H1.web.tsx"],"sourcesContent":["export const grayScale = {\n light: {\n '00': '#FFFFFF',\n '50': '#F6F8FA',\n '100': '#EEF0F2',\n '200': '#E6E8EA',\n '300': '#DADCDD',\n '400': '#CED0D2',\n '500': '#AAACAE',\n '600': '#86888A',\n '700': '#4C4E50',\n '800': '#2C2E30',\n '900': '#0C0E10',\n },\n dark: {\n '00': '#0C0E10',\n '50': '#1A1C1E',\n '100': '#282A2C',\n '200': '#36383A',\n '300': '#444648',\n '400': '#525456',\n '500': '#66686A',\n '600': '#888A8C',\n '700': '#AAACAE',\n '800': '#CCCED0',\n '900': '#FFFFFF',\n },\n};\n","import { Theme } from './colors.types';\nimport * as colorScales from './colors.data'\n\nexport const lightColors: Theme = {\n colors: {\n gray: colorScales.grayScale.light,\n },\n};\n\nexport const darkColors: Theme = {\n colors: {\n gray: colorScales.grayScale.dark,\n },\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\nimport { TypographyWebProps } from '../shared/Typography.base.types';\nimport styles from './H1.web.module.scss';\n\nexport interface H1Props extends TypographyWebProps {}\n\nexport const H1: React.FC<H1Props> = ({ \n children, \n className = '', \n id \n}) => {\n const h1Classes = [styles.h1, className].filter(Boolean).join(' ');\n \n return (\n <h1 id={id} className={h1Classes}>\n {children}\n </h1>\n );\n};\n"],"names":["colorScales.grayScale"],"mappings":";;AAAO,MAAM,SAAS,GAAG;AACvB,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;CACF;;;;;;;ACxBM,MAAM,WAAW,GAAU;AAChC,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAEA,SAAqB,CA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H,IAAA,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAElE,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAA,EAC7B,QAAQ,CACN;AAET;;;;","x_google_ignoreList":[2]}
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
|
|
5
|
+
const grayScale = {
|
|
6
|
+
light: {
|
|
7
|
+
'00': '#FFFFFF',
|
|
8
|
+
'50': '#F6F8FA',
|
|
9
|
+
'100': '#EEF0F2',
|
|
10
|
+
'200': '#E6E8EA',
|
|
11
|
+
'300': '#DADCDD',
|
|
12
|
+
'400': '#CED0D2',
|
|
13
|
+
'500': '#AAACAE',
|
|
14
|
+
'600': '#86888A',
|
|
15
|
+
'700': '#4C4E50',
|
|
16
|
+
'800': '#2C2E30',
|
|
17
|
+
'900': '#0C0E10',
|
|
18
|
+
},
|
|
19
|
+
dark: {
|
|
20
|
+
'00': '#0C0E10',
|
|
21
|
+
'50': '#1A1C1E',
|
|
22
|
+
'100': '#282A2C',
|
|
23
|
+
'200': '#36383A',
|
|
24
|
+
'300': '#444648',
|
|
25
|
+
'400': '#525456',
|
|
26
|
+
'500': '#66686A',
|
|
27
|
+
'600': '#888A8C',
|
|
28
|
+
'700': '#AAACAE',
|
|
29
|
+
'800': '#CCCED0',
|
|
30
|
+
'900': '#FFFFFF',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var colors_data = /*#__PURE__*/Object.freeze({
|
|
35
|
+
__proto__: null,
|
|
36
|
+
grayScale: grayScale
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const lightColors = {
|
|
40
|
+
colors: {
|
|
41
|
+
gray: grayScale.light,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
const darkColors = {
|
|
45
|
+
colors: {
|
|
46
|
+
gray: grayScale.dark,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
5
50
|
function styleInject(css, ref) {
|
|
6
51
|
if ( ref === void 0 ) ref = {};
|
|
7
52
|
var insertAt = ref.insertAt;
|
|
8
53
|
|
|
9
|
-
if (
|
|
54
|
+
if (typeof document === 'undefined') { return; }
|
|
10
55
|
|
|
11
56
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
12
57
|
var style = document.createElement('style');
|
|
@@ -29,42 +74,17 @@ function styleInject(css, ref) {
|
|
|
29
74
|
}
|
|
30
75
|
}
|
|
31
76
|
|
|
32
|
-
var css_248z
|
|
33
|
-
var styles
|
|
34
|
-
styleInject(css_248z$1);
|
|
35
|
-
|
|
36
|
-
const Anchor = ({ children, href, rel, title, target = '_self', className = '', onPress, }) => {
|
|
37
|
-
const anchorClasses = [styles$1.anchor, className].filter(Boolean).join(' ');
|
|
38
|
-
const handleClick = (e) => {
|
|
39
|
-
if (onPress) {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
onPress();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return (React.createElement("a", { href: href, rel: rel, title: title, target: target, className: anchorClasses, onClick: handleClick }, children));
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
var css_248z = ".Tooltip-module_tooltipWrapper__xyNaw{display:inline-block;position:relative}.Tooltip-module_tooltip__5JYjr{background-color:rgba(0,0,0,.8);border-radius:4px;color:#fff;font-size:14px;padding:8px 12px;pointer-events:none;position:absolute;white-space:nowrap;z-index:1000}.Tooltip-module_tooltip__5JYjr.Tooltip-module_top__ne8AY{bottom:100%;left:50%;margin-bottom:8px;transform:translateX(-50%)}.Tooltip-module_tooltip__5JYjr.Tooltip-module_bottom__euTWK{left:50%;margin-top:8px;top:100%;transform:translateX(-50%)}.Tooltip-module_tooltip__5JYjr.Tooltip-module_left__vrkh0{margin-right:8px;right:100%;top:50%;transform:translateY(-50%)}.Tooltip-module_tooltip__5JYjr.Tooltip-module_right__jZEpK{left:100%;margin-left:8px;top:50%;transform:translateY(-50%)}";
|
|
48
|
-
var styles = {"tooltipWrapper":"Tooltip-module_tooltipWrapper__xyNaw","tooltip":"Tooltip-module_tooltip__5JYjr","top":"Tooltip-module_top__ne8AY","bottom":"Tooltip-module_bottom__euTWK","left":"Tooltip-module_left__vrkh0","right":"Tooltip-module_right__jZEpK"};
|
|
77
|
+
var css_248z = ".H1-web-module_h1__jMWPY {\n font-size: 32px;\n font-weight: 700;\n line-height: 40px;\n letter-spacing: -0.5px;\n margin: 0;\n color: var(--gray-900);\n}";
|
|
78
|
+
var styles = {"h1":"H1-web-module_h1__jMWPY"};
|
|
49
79
|
styleInject(css_248z);
|
|
50
80
|
|
|
51
|
-
const
|
|
52
|
-
const [
|
|
53
|
-
return (React.createElement("
|
|
54
|
-
children,
|
|
55
|
-
isVisible && (React.createElement("div", { className: `${styles.tooltip} ${styles[position]}` }, content))));
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// 웹에서는 StatusBar 개념이 없음
|
|
59
|
-
const StatusBar = (_props) => {
|
|
60
|
-
if (process.env.NODE_ENV === 'development') {
|
|
61
|
-
console.warn('StatusBar is only available on React Native. ' +
|
|
62
|
-
'For web, you can use <meta name="theme-color"> in your HTML.');
|
|
63
|
-
}
|
|
64
|
-
return null;
|
|
81
|
+
const H1 = ({ children, className = '', id }) => {
|
|
82
|
+
const h1Classes = [styles.h1, className].filter(Boolean).join(' ');
|
|
83
|
+
return (React.createElement("h1", { id: id, className: h1Classes }, children));
|
|
65
84
|
};
|
|
66
85
|
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
86
|
+
exports.H1 = H1;
|
|
87
|
+
exports.colorScales = colors_data;
|
|
88
|
+
exports.darkColors = darkColors;
|
|
89
|
+
exports.lightColors = lightColors;
|
|
70
90
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js","../components/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/theme/colors.data.ts","../src/theme/colors.ts","../../node_modules/style-inject/dist/style-inject.es.js","../src/components/Typography/H1/H1.web.tsx"],"sourcesContent":["export const grayScale = {\n light: {\n '00': '#FFFFFF',\n '50': '#F6F8FA',\n '100': '#EEF0F2',\n '200': '#E6E8EA',\n '300': '#DADCDD',\n '400': '#CED0D2',\n '500': '#AAACAE',\n '600': '#86888A',\n '700': '#4C4E50',\n '800': '#2C2E30',\n '900': '#0C0E10',\n },\n dark: {\n '00': '#0C0E10',\n '50': '#1A1C1E',\n '100': '#282A2C',\n '200': '#36383A',\n '300': '#444648',\n '400': '#525456',\n '500': '#66686A',\n '600': '#888A8C',\n '700': '#AAACAE',\n '800': '#CCCED0',\n '900': '#FFFFFF',\n },\n};\n","import { Theme } from './colors.types';\nimport * as colorScales from './colors.data'\n\nexport const lightColors: Theme = {\n colors: {\n gray: colorScales.grayScale.light,\n },\n};\n\nexport const darkColors: Theme = {\n colors: {\n gray: colorScales.grayScale.dark,\n },\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\nimport { TypographyWebProps } from '../shared/Typography.base.types';\nimport styles from './H1.web.module.scss';\n\nexport interface H1Props extends TypographyWebProps {}\n\nexport const H1: React.FC<H1Props> = ({ \n children, \n className = '', \n id \n}) => {\n const h1Classes = [styles.h1, className].filter(Boolean).join(' ');\n \n return (\n <h1 id={id} className={h1Classes}>\n {children}\n </h1>\n );\n};\n"],"names":["colorScales.grayScale"],"mappings":";;;;AAAO,MAAM,SAAS,GAAG;AACvB,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;CACF;;;;;;;ACxBM,MAAM,WAAW,GAAU;AAChC,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAEA,SAAqB,CAAC,KAAK;AAClC,KAAA;;AAGI,MAAM,UAAU,GAAU;AAC/B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAEA,SAAqB,CAAC,IAAI;AACjC,KAAA;;;ACZH,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,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S,EAAA,EAC7B,QAAQ,CACN;AAET;;;;;;;","x_google_ignoreList":[2]}
|
package/dist/index.web.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './StatusBar/index.web';
|
|
1
|
+
export * from './theme';
|
|
2
|
+
export * from './components/index.web';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/theme/colors.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Theme } from './colors.types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const lightColors: Theme;
|
|
3
|
+
export declare const darkColors: Theme;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const grayScale: {
|
|
2
|
+
light: {
|
|
3
|
+
'00': string;
|
|
4
|
+
'50': string;
|
|
5
|
+
'100': string;
|
|
6
|
+
'200': string;
|
|
7
|
+
'300': string;
|
|
8
|
+
'400': string;
|
|
9
|
+
'500': string;
|
|
10
|
+
'600': string;
|
|
11
|
+
'700': string;
|
|
12
|
+
'800': string;
|
|
13
|
+
'900': string;
|
|
14
|
+
};
|
|
15
|
+
dark: {
|
|
16
|
+
'00': string;
|
|
17
|
+
'50': string;
|
|
18
|
+
'100': string;
|
|
19
|
+
'200': string;
|
|
20
|
+
'300': string;
|
|
21
|
+
'400': string;
|
|
22
|
+
'500': string;
|
|
23
|
+
'600': string;
|
|
24
|
+
'700': string;
|
|
25
|
+
'800': string;
|
|
26
|
+
'900': string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -1,43 +1,19 @@
|
|
|
1
1
|
export interface ColorScale {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
500: string;
|
|
14
|
-
600: string;
|
|
15
|
-
};
|
|
16
|
-
blue: {
|
|
17
|
-
400: string;
|
|
18
|
-
500: string;
|
|
19
|
-
600: string;
|
|
20
|
-
};
|
|
21
|
-
red: {
|
|
22
|
-
400: string;
|
|
23
|
-
500: string;
|
|
24
|
-
600: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface SemanticColors {
|
|
28
|
-
info: string;
|
|
29
|
-
success: string;
|
|
30
|
-
error: string;
|
|
31
|
-
warning: string;
|
|
32
|
-
}
|
|
33
|
-
export interface PaperColors {
|
|
34
|
-
default: string;
|
|
35
|
-
neutral: string;
|
|
36
|
-
dialog: string;
|
|
2
|
+
'00': string;
|
|
3
|
+
'50': string;
|
|
4
|
+
'100': string;
|
|
5
|
+
'200': string;
|
|
6
|
+
'300': string;
|
|
7
|
+
'400': string;
|
|
8
|
+
'500': string;
|
|
9
|
+
'600': string;
|
|
10
|
+
'700': string;
|
|
11
|
+
'800': string;
|
|
12
|
+
'900': string;
|
|
37
13
|
}
|
|
38
14
|
export interface Theme {
|
|
39
|
-
colors:
|
|
40
|
-
|
|
41
|
-
|
|
15
|
+
colors: {
|
|
16
|
+
gray: ColorScale;
|
|
17
|
+
};
|
|
42
18
|
}
|
|
43
19
|
export type ThemeMode = 'light' | 'dark';
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export { lightTheme, darkTheme } from './colors';
|
|
5
|
-
export type { Theme, ThemeMode, ColorScale, SemanticColors, PaperColors } from './colors.types';
|
|
1
|
+
export type { ColorScale, Theme, ThemeMode } from './colors.types';
|
|
2
|
+
export { lightColors, darkColors } from './colors';
|
|
3
|
+
export * as colorScales from './colors.data';
|
package/package.json
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisodev/test-component-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "웹과 React Native를 위한 컴포넌트 라이브러리",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"react-native": "
|
|
8
|
+
"react-native": "src/index.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"
|
|
11
|
+
"src"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "
|
|
14
|
+
"build:colors": "ts-node src/theme/build-colors.ts",
|
|
15
15
|
"build:web": "rollup -c rollup.config.web.js",
|
|
16
|
-
"build
|
|
17
|
-
"prepublishOnly": "npm run build"
|
|
16
|
+
"build": "npm run build:colors && npm run build:web"
|
|
18
17
|
},
|
|
19
18
|
"keywords": [
|
|
20
19
|
"react",
|
|
@@ -42,6 +41,7 @@
|
|
|
42
41
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
43
42
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
44
43
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
44
|
+
"@types/node": "^22.0.0",
|
|
45
45
|
"@types/react": "^19.2.7",
|
|
46
46
|
"@types/react-dom": "^19.2.3",
|
|
47
47
|
"@types/react-native": "^0.73.0",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"rollup-plugin-postcss": "^4.0.2",
|
|
54
54
|
"postcss": "^8.4.49",
|
|
55
55
|
"sass": "^1.97.1",
|
|
56
|
+
"ts-node": "^10.9.2",
|
|
56
57
|
"tslib": "^2.8.1",
|
|
57
58
|
"typescript": "^5.9.3"
|
|
58
59
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import { TypographyNativeProps } from '../shared/Typography.base.types';
|
|
4
|
+
|
|
5
|
+
export interface H1Props extends TypographyNativeProps {}
|
|
6
|
+
|
|
7
|
+
export const H1: React.FC<H1Props> = ({
|
|
8
|
+
children,
|
|
9
|
+
testID
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Text style={styles.h1} testID={testID}>
|
|
13
|
+
{children}
|
|
14
|
+
</Text>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
h1: {
|
|
20
|
+
fontSize: 32,
|
|
21
|
+
fontWeight: '700',
|
|
22
|
+
lineHeight: 40,
|
|
23
|
+
letterSpacing: -0.5,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyWebProps } from '../shared/Typography.base.types';
|
|
3
|
+
import styles from './H1.web.module.scss';
|
|
4
|
+
|
|
5
|
+
export interface H1Props extends TypographyWebProps {}
|
|
6
|
+
|
|
7
|
+
export const H1: React.FC<H1Props> = ({
|
|
8
|
+
children,
|
|
9
|
+
className = '',
|
|
10
|
+
id
|
|
11
|
+
}) => {
|
|
12
|
+
const h1Classes = [styles.h1, className].filter(Boolean).join(' ');
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<h1 id={id} className={h1Classes}>
|
|
16
|
+
{children}
|
|
17
|
+
</h1>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TypographyBaseProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface TypographyWebProps extends TypographyBaseProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TypographyNativeProps extends TypographyBaseProps {
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography/index.web';
|
package/src/index.ts
ADDED
package/src/index.web.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// 이 파일은 자동 생성됩니다. 직접 수정하지 마세요.
|
|
2
|
+
// build-colors.ts 스크립트로 생성됨
|
|
3
|
+
|
|
4
|
+
// Gray Scale - Light
|
|
5
|
+
$gray-50-light: #F6F8FA;
|
|
6
|
+
$gray-100-light: #EEF0F2;
|
|
7
|
+
$gray-200-light: #E6E8EA;
|
|
8
|
+
$gray-300-light: #DADCDD;
|
|
9
|
+
$gray-400-light: #CED0D2;
|
|
10
|
+
$gray-500-light: #AAACAE;
|
|
11
|
+
$gray-600-light: #86888A;
|
|
12
|
+
$gray-700-light: #4C4E50;
|
|
13
|
+
$gray-800-light: #2C2E30;
|
|
14
|
+
$gray-900-light: #0C0E10;
|
|
15
|
+
$gray-00-light: #FFFFFF;
|
|
16
|
+
|
|
17
|
+
// Gray Scale - Dark
|
|
18
|
+
$gray-50-dark: #1A1C1E;
|
|
19
|
+
$gray-100-dark: #282A2C;
|
|
20
|
+
$gray-200-dark: #36383A;
|
|
21
|
+
$gray-300-dark: #444648;
|
|
22
|
+
$gray-400-dark: #525456;
|
|
23
|
+
$gray-500-dark: #66686A;
|
|
24
|
+
$gray-600-dark: #888A8C;
|
|
25
|
+
$gray-700-dark: #AAACAE;
|
|
26
|
+
$gray-800-dark: #CCCED0;
|
|
27
|
+
$gray-900-dark: #FFFFFF;
|
|
28
|
+
$gray-00-dark: #0C0E10;
|
|
29
|
+
|
|
30
|
+
// Default (CSS Variables 사용 - 테마 자동 전환)
|
|
31
|
+
$gray-50: var(--gray-50);
|
|
32
|
+
$gray-100: var(--gray-100);
|
|
33
|
+
$gray-200: var(--gray-200);
|
|
34
|
+
$gray-300: var(--gray-300);
|
|
35
|
+
$gray-400: var(--gray-400);
|
|
36
|
+
$gray-500: var(--gray-500);
|
|
37
|
+
$gray-600: var(--gray-600);
|
|
38
|
+
$gray-700: var(--gray-700);
|
|
39
|
+
$gray-800: var(--gray-800);
|
|
40
|
+
$gray-900: var(--gray-900);
|
|
41
|
+
$gray-00: var(--gray-00);
|