@daeryun/dr_components 0.0.10 → 0.0.12
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/babel.config.json +7 -2
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.jsx +19 -0
- package/next.config.js +21 -5
- package/package.json +1 -1
- package/pages/_app.tsx +0 -1
- package/pages/index.tsx +3 -112
- package/tsconfig.json +31 -19
- package/dist/components/Button/Button.js +0 -28
package/babel.config.json
CHANGED
|
@@ -7,5 +7,5 @@ interface IButtonPropsTypes extends React.ButtonHTMLAttributes<HTMLButtonElement
|
|
|
7
7
|
className?: string;
|
|
8
8
|
ref?: any;
|
|
9
9
|
}
|
|
10
|
-
declare const Button: (props: IButtonPropsTypes) =>
|
|
10
|
+
declare const Button: (props: IButtonPropsTypes) => React.JSX.Element;
|
|
11
11
|
export default Button;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
const Button = (props) => {
|
|
14
|
+
const { isRound, borderColor, textColor, bgColor, className, ref, children } = props, others = __rest(props, ["isRound", "borderColor", "textColor", "bgColor", "className", "ref", "children"]);
|
|
15
|
+
return (<button {...others} ref={ref} className={className + ' flex items-center justify-center'} style={Object.assign(Object.assign(Object.assign(Object.assign({}, (borderColor && { border: '1px solid ' + borderColor })), (bgColor && { backgroundColor: bgColor })), (textColor && { color: textColor })), (isRound && { borderRadius: '9999px' }))}>
|
|
16
|
+
{children}
|
|
17
|
+
</button>);
|
|
18
|
+
};
|
|
19
|
+
export default Button;
|
package/next.config.js
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// next.config.js
|
|
2
|
+
module.exports = {
|
|
3
|
+
webpack: (config, { isServer }) => {
|
|
4
|
+
// ES 모듈을 처리할 수 있도록 설정
|
|
5
|
+
if (!isServer) {
|
|
6
|
+
config.resolve.extensions.push('.js', '.jsx', '.ts', '.tsx');
|
|
7
|
+
config.module.rules.push({
|
|
8
|
+
test: /\.m?js$/,
|
|
9
|
+
exclude: /node_modules/,
|
|
10
|
+
use: {
|
|
11
|
+
loader: 'babel-loader',
|
|
12
|
+
options: {
|
|
13
|
+
presets: ['next/babel'],
|
|
14
|
+
plugins: ['@babel/plugin-transform-modules-commonjs']
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
5
19
|
|
|
6
|
-
|
|
20
|
+
return config;
|
|
21
|
+
},
|
|
22
|
+
};
|
package/package.json
CHANGED
package/pages/_app.tsx
CHANGED
package/pages/index.tsx
CHANGED
|
@@ -1,118 +1,9 @@
|
|
|
1
|
-
import Image from 'next/image'
|
|
2
|
-
import { Inter } from 'next/font/google'
|
|
3
1
|
|
|
4
|
-
const inter = Inter({ subsets: ['latin'] })
|
|
5
2
|
|
|
6
|
-
export default function Home() {
|
|
7
|
-
return (
|
|
8
|
-
<main
|
|
9
|
-
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`}
|
|
10
|
-
>
|
|
11
|
-
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
|
|
12
|
-
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
13
|
-
Get started by editing
|
|
14
|
-
<code className="font-mono font-bold">pages/index.tsx</code>
|
|
15
|
-
</p>
|
|
16
|
-
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
|
|
17
|
-
<a
|
|
18
|
-
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
|
|
19
|
-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
20
|
-
target="_blank"
|
|
21
|
-
rel="noopener noreferrer"
|
|
22
|
-
>
|
|
23
|
-
By{' '}
|
|
24
|
-
<Image
|
|
25
|
-
src="/vercel.svg"
|
|
26
|
-
alt="Vercel Logo"
|
|
27
|
-
className="dark:invert"
|
|
28
|
-
width={100}
|
|
29
|
-
height={24}
|
|
30
|
-
priority
|
|
31
|
-
/>
|
|
32
|
-
</a>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]">
|
|
37
|
-
<Image
|
|
38
|
-
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
|
39
|
-
src="/next.svg"
|
|
40
|
-
alt="Next.js Logo"
|
|
41
|
-
width={180}
|
|
42
|
-
height={37}
|
|
43
|
-
priority
|
|
44
|
-
/>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
|
|
48
|
-
<a
|
|
49
|
-
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
50
|
-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
51
|
-
target="_blank"
|
|
52
|
-
rel="noopener noreferrer"
|
|
53
|
-
>
|
|
54
|
-
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
55
|
-
Docs{' '}
|
|
56
|
-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
57
|
-
->
|
|
58
|
-
</span>
|
|
59
|
-
</h2>
|
|
60
|
-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
61
|
-
Find in-depth information about Next.js features and API.
|
|
62
|
-
</p>
|
|
63
|
-
</a>
|
|
64
3
|
|
|
65
|
-
<a
|
|
66
|
-
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
67
|
-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
68
|
-
target="_blank"
|
|
69
|
-
rel="noopener noreferrer"
|
|
70
|
-
>
|
|
71
|
-
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
72
|
-
Learn{' '}
|
|
73
|
-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
74
|
-
->
|
|
75
|
-
</span>
|
|
76
|
-
</h2>
|
|
77
|
-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
78
|
-
Learn about Next.js in an interactive course with quizzes!
|
|
79
|
-
</p>
|
|
80
|
-
</a>
|
|
81
4
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
target="_blank"
|
|
86
|
-
rel="noopener noreferrer"
|
|
87
|
-
>
|
|
88
|
-
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
89
|
-
Templates{' '}
|
|
90
|
-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
91
|
-
->
|
|
92
|
-
</span>
|
|
93
|
-
</h2>
|
|
94
|
-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
95
|
-
Discover and deploy boilerplate example Next.js projects.
|
|
96
|
-
</p>
|
|
97
|
-
</a>
|
|
98
|
-
|
|
99
|
-
<a
|
|
100
|
-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
101
|
-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
102
|
-
target="_blank"
|
|
103
|
-
rel="noopener noreferrer"
|
|
104
|
-
>
|
|
105
|
-
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
106
|
-
Deploy{' '}
|
|
107
|
-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
108
|
-
->
|
|
109
|
-
</span>
|
|
110
|
-
</h2>
|
|
111
|
-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
112
|
-
Instantly deploy your Next.js site to a shareable URL with Vercel.
|
|
113
|
-
</p>
|
|
114
|
-
</a>
|
|
115
|
-
</div>
|
|
116
|
-
</main>
|
|
5
|
+
export default function Home() {
|
|
6
|
+
return (
|
|
7
|
+
<></>
|
|
117
8
|
)
|
|
118
9
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"lib": [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
3
|
+
"target": "es6", // 컴파일된 JS 코드의 ECMAScript 버전
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
], // 포함할 라이브러리 목록
|
|
9
|
+
"allowJs": true, // JS 파일 컴파일 허용
|
|
10
|
+
"noEmit": false, // 컴파일러가 출력 파일 생성
|
|
11
|
+
"declaration": true, // .d.ts 선언 파일 생성
|
|
12
|
+
"outDir": "dist", // 컴파일된 파일 저장 디렉토리
|
|
13
|
+
"skipLibCheck": true, // 라이브러리 파일 타입 체크 스킵
|
|
14
|
+
"esModuleInterop": true, // CommonJS 모듈을 ES6처럼 사용
|
|
15
|
+
"allowSyntheticDefaultImports": true, // 디폴트 모듈 import 문법 사용 허용
|
|
16
|
+
"strict": true, // 엄격한 타입 체킹 활성화
|
|
17
|
+
"forceConsistentCasingInFileNames": true, // 파일 이름 대소문자 일관성 강제
|
|
18
|
+
"noFallthroughCasesInSwitch": true, // switch문의 case문 넘어감 방지
|
|
19
|
+
"module": "esnext", // 모듈 시스템 (최신 ECMAScript)
|
|
20
|
+
"moduleResolution": "node", // 모듈 해석 방식 (Node.js)
|
|
21
|
+
"resolveJsonModule": true, // JSON 모듈 가져오기 허용
|
|
22
|
+
"isolatedModules": true, // 파일을 독립적 모듈로 컴파일
|
|
23
|
+
"jsx": "preserve" // JSX 코드 처리 방식 (React JSX)
|
|
24
|
+
,
|
|
25
|
+
"incremental": true
|
|
20
26
|
},
|
|
21
27
|
// 컴파일할 파일 패턴
|
|
22
|
-
"include": [
|
|
23
|
-
|
|
28
|
+
"include": [
|
|
29
|
+
"./src/lib/**/*.tsx",
|
|
30
|
+
"./src/lib/**/*.ts"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"node_modules"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
var Button = function (props) {
|
|
25
|
-
var isRound = props.isRound, borderColor = props.borderColor, textColor = props.textColor, bgColor = props.bgColor, className = props.className, ref = props.ref, children = props.children, others = __rest(props, ["isRound", "borderColor", "textColor", "bgColor", "className", "ref", "children"]);
|
|
26
|
-
return (_jsx("button", __assign({}, others, { ref: ref, className: className + ' flex items-center justify-center', style: __assign(__assign(__assign(__assign({}, (borderColor && { border: '1px solid ' + borderColor })), (bgColor && { backgroundColor: bgColor })), (textColor && { color: textColor })), (isRound && { borderRadius: '9999px' })), children: children })));
|
|
27
|
-
};
|
|
28
|
-
export default Button;
|