@daeryun/dr_components 0.1.8 → 0.1.10
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/Fix/index.jsx +42 -75
- package/dist/components/Fix/index.tsx +111 -147
- package/dist/components/banner/TopBanner.d.ts +4 -0
- package/dist/components/banner/TopBanner.jsx +239 -0
- package/dist/components/banner/TopBanner.module.css +111 -0
- package/dist/components/banner/TopBanner.tsx +341 -0
- package/dist/components/index.js +2 -4
- package/dist/components/index.ts +2 -4
- package/dist/lib/utils.d.ts +7 -17
- package/dist/lib/utils.js +195 -126
- package/dist/lib/utils.ts +185 -119
- package/dist/styles/globals.css +4 -237
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/dist/components/Cat/index.d.ts +0 -3
- package/dist/components/Cat/index.jsx +0 -9
- package/dist/components/Cat/index.tsx +0 -19
- package/dist/components/SearchBar/SearchBar.d.ts +0 -14
- package/dist/components/SearchBar/SearchBar.jsx +0 -73
- package/dist/components/SearchBar/SearchBar.tsx +0 -139
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daeryun/dr_components",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
|
|
3
|
+
"version": "0.1.10",
|
|
5
4
|
"private": false,
|
|
6
5
|
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,13 +26,16 @@
|
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
28
|
"axios": "^1.6.8",
|
|
29
|
+
"classnames": "^2.5.1",
|
|
30
|
+
"luxon": "^3.5.0",
|
|
30
31
|
"moment": "^2.29.4",
|
|
31
32
|
"next-transpile-modules": "^10.0.1",
|
|
32
33
|
"prettier-plugin-tailwindcss": "^0.6.6",
|
|
33
34
|
"react-query": "^3.39.3",
|
|
34
35
|
"react-uuid": "^2.0.0",
|
|
35
36
|
"remove-markdown": "^0.5.0",
|
|
36
|
-
"storybook": "^7.6.17"
|
|
37
|
+
"storybook": "^7.6.17",
|
|
38
|
+
"swiper": "^11.1.12"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
41
|
"@babel/cli": "^7.23.4",
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
"@storybook/react": "^7.6.17",
|
|
54
56
|
"@storybook/test": "^7.6.17",
|
|
55
57
|
"@svgr/webpack": "^8.1.0",
|
|
58
|
+
"@types/luxon": "^3.4.2",
|
|
56
59
|
"@types/node": "^20",
|
|
57
60
|
"@types/react": "^18",
|
|
58
61
|
"@types/react-dom": "^18",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
|
-
import catSrc from '../../asset/images/cat.png';
|
|
3
|
-
//이미지 임포트 테스트
|
|
4
|
-
const Index = () => {
|
|
5
|
-
return (<>
|
|
6
|
-
<Image src={catSrc} alt={'고양이'} height={100} width={100} className={'rounded-full lg:border-4 lg:border-amber-600 lg:border-solid x3l:border-red-500'}/>
|
|
7
|
-
</>);
|
|
8
|
-
};
|
|
9
|
-
export default Index;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image'
|
|
2
|
-
import catSrc from '../../asset/images/cat.png'
|
|
3
|
-
//이미지 임포트 테스트
|
|
4
|
-
|
|
5
|
-
const Index = () => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<Image
|
|
9
|
-
src={catSrc}
|
|
10
|
-
alt={'고양이'}
|
|
11
|
-
height={100}
|
|
12
|
-
width={100}
|
|
13
|
-
className={'rounded-full lg:border-4 lg:border-amber-600 lg:border-solid x3l:border-red-500'}
|
|
14
|
-
/>
|
|
15
|
-
</>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default Index
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const SearchBar: (props: {
|
|
3
|
-
onChange: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
4
|
-
onClick: () => void;
|
|
5
|
-
search: string;
|
|
6
|
-
isKeyPress?: boolean | undefined;
|
|
7
|
-
placeholder: string;
|
|
8
|
-
maxLength?: number | undefined;
|
|
9
|
-
isIntegrate?: boolean | undefined;
|
|
10
|
-
isMarginNotAuto?: boolean | undefined;
|
|
11
|
-
marginTop?: [number, number, number] | undefined;
|
|
12
|
-
marginBottom?: number | undefined;
|
|
13
|
-
}) => React.JSX.Element;
|
|
14
|
-
export default SearchBar;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import style from '../../pages/broadcast/index.module.css';
|
|
2
|
-
import Image from 'next/image';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTranslation } from 'next-i18next';
|
|
5
|
-
import { useRouter } from 'next/router';
|
|
6
|
-
const SearchBar = (props) => {
|
|
7
|
-
const { search, placeholder, maxLength, isIntegrate, isMarginNotAuto, marginTop, marginBottom } = props;
|
|
8
|
-
const router = useRouter();
|
|
9
|
-
const { t } = useTranslation('common');
|
|
10
|
-
const handleInputChange = (e) => {
|
|
11
|
-
props.onChange(e);
|
|
12
|
-
};
|
|
13
|
-
const handleOnKeyPress = (e) => {
|
|
14
|
-
if (props.isKeyPress) {
|
|
15
|
-
if (e.key === 'Enter') {
|
|
16
|
-
props.onClick();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const handleClick = () => {
|
|
21
|
-
props.onClick();
|
|
22
|
-
};
|
|
23
|
-
return (<div className={isIntegrate
|
|
24
|
-
? 'w-full h-auto '
|
|
25
|
-
: 'w-full h-auto ' +
|
|
26
|
-
`${marginTop
|
|
27
|
-
? 'mt-[' +
|
|
28
|
-
marginTop[0] +
|
|
29
|
-
'px] max-md:mt-[' +
|
|
30
|
-
marginTop[1] +
|
|
31
|
-
'px] max-sm:mt-[' +
|
|
32
|
-
marginTop[2] +
|
|
33
|
-
'px]'
|
|
34
|
-
: 'mt-[150px] max-md:mt-[80px] max-sm:mt-[50px]'}` +
|
|
35
|
-
`${marginBottom ? 'mb-[' + marginBottom + 'px]' : 'mb-[90px]'}`}>
|
|
36
|
-
<div className={'relative lg:w-[80%] sm:w-[90%] w-[100%] max-w-[855px] ' + `${isMarginNotAuto ? '' : 'm-auto'}`}>
|
|
37
|
-
<input name="sear_txt" id={style.sear_txt} placeholder={placeholder} maxLength={maxLength ? maxLength : 20} value={search} onChange={handleInputChange} onKeyUp={handleOnKeyPress} spellCheck={false} className={`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] px-[40px] py-[24px] rounded-full ` +
|
|
38
|
-
'text-2xl text-[#333333] tracking-[-0.6px] placeholder:text-[#adadad] ' +
|
|
39
|
-
//1500px
|
|
40
|
-
'max-3xl:text-xl ' +
|
|
41
|
-
//768px
|
|
42
|
-
'max-md:text-lg max-md:py-[20px] max-md:pl-[40px] max-md:pr-[150px] ' +
|
|
43
|
-
//640px
|
|
44
|
-
'max-sm:text-base max-sm:py-[18px] max-sm:pl-[25px] max-sm:pr-[65px] ' +
|
|
45
|
-
//325px
|
|
46
|
-
'max-3xs:text-sm max-3xs:py-[15px] max-3xs:pl-[20px] max-3xs:pr-[55px] '}/>
|
|
47
|
-
<div onClick={handleClick} className={'absolute top-[50%] translate-y-[-50%] right-[20px] z-10 ' +
|
|
48
|
-
'w-[140px] h-[65%] bg-[#2E2E2E] rounded-full cursor-pointer ' +
|
|
49
|
-
'flex justify-center items-center gap-[10px] ' +
|
|
50
|
-
//768px
|
|
51
|
-
'max-md:w-[120px] ' +
|
|
52
|
-
//640px
|
|
53
|
-
'max-sm:hidden '}>
|
|
54
|
-
<Image src="/images/integrate/search.webp" alt="로고" width={30} height={30} className="w-[22px] h-auto max-md:w-[18px]"/>
|
|
55
|
-
<span className={'text-[#fff] text-xl font-[800] tracking-[-0.5px] ' +
|
|
56
|
-
//1500px
|
|
57
|
-
'max-3xl:text-lg ' +
|
|
58
|
-
//768px
|
|
59
|
-
'max-md:text-base '}>
|
|
60
|
-
검색
|
|
61
|
-
</span>
|
|
62
|
-
</div>
|
|
63
|
-
<div onClick={handleClick} className={'bg-[#2E2E2E] cursor-pointer absolute z-10 right-[15px] top-[50%] translate-y-[-50%] rounded-[30px] flex justify-center items-center sm:hidden ' +
|
|
64
|
-
//650px
|
|
65
|
-
'w-[40px] h-[40px] ' +
|
|
66
|
-
//325px
|
|
67
|
-
'max-3xs:w-[32px] max-3xs:h-[32px]'}>
|
|
68
|
-
<Image src="/images/integrate/search.webp" alt="로고" width={26} height={26} className={'w-[18px] h-auto max-3xs:w-[16px]'}/>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</div>);
|
|
72
|
-
};
|
|
73
|
-
export default SearchBar;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import style from '../../pages/broadcast/index.module.css'
|
|
2
|
-
import Image from 'next/image'
|
|
3
|
-
import React, { useState } from 'react'
|
|
4
|
-
import { useTranslation } from 'next-i18next'
|
|
5
|
-
import { useRouter } from 'next/router'
|
|
6
|
-
|
|
7
|
-
const SearchBar = (props: {
|
|
8
|
-
// pathname: string
|
|
9
|
-
onChange: (e: React.FormEvent<HTMLInputElement>) => void
|
|
10
|
-
onClick: () => void
|
|
11
|
-
search: string
|
|
12
|
-
isKeyPress?: boolean
|
|
13
|
-
placeholder: string
|
|
14
|
-
maxLength?: number
|
|
15
|
-
isIntegrate?: boolean
|
|
16
|
-
isMarginNotAuto?: boolean //중앙정렬 아닐 시 true
|
|
17
|
-
marginTop?: [number, number, number] //기본값 존재, 순서대로 all, 768px, 640px
|
|
18
|
-
marginBottom?: number //기본값 존재
|
|
19
|
-
}) => {
|
|
20
|
-
const { search, placeholder, maxLength, isIntegrate, isMarginNotAuto, marginTop, marginBottom } = props
|
|
21
|
-
const router = useRouter()
|
|
22
|
-
const { t } = useTranslation('common')
|
|
23
|
-
|
|
24
|
-
const handleInputChange = (e: React.FormEvent<HTMLInputElement>) => {
|
|
25
|
-
props.onChange(e)
|
|
26
|
-
}
|
|
27
|
-
const handleOnKeyPress = (e: any) => {
|
|
28
|
-
if (props.isKeyPress) {
|
|
29
|
-
if (e.key === 'Enter') {
|
|
30
|
-
props.onClick()
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const handleClick = () => {
|
|
35
|
-
props.onClick()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<div
|
|
40
|
-
className={
|
|
41
|
-
isIntegrate
|
|
42
|
-
? 'w-full h-auto '
|
|
43
|
-
: 'w-full h-auto ' +
|
|
44
|
-
`${
|
|
45
|
-
marginTop
|
|
46
|
-
? 'mt-[' +
|
|
47
|
-
marginTop[0] +
|
|
48
|
-
'px] max-md:mt-[' +
|
|
49
|
-
marginTop[1] +
|
|
50
|
-
'px] max-sm:mt-[' +
|
|
51
|
-
marginTop[2] +
|
|
52
|
-
'px]'
|
|
53
|
-
: 'mt-[150px] max-md:mt-[80px] max-sm:mt-[50px]'
|
|
54
|
-
}` +
|
|
55
|
-
`${marginBottom ? 'mb-[' + marginBottom + 'px]' : 'mb-[90px]'}`
|
|
56
|
-
}
|
|
57
|
-
>
|
|
58
|
-
<div
|
|
59
|
-
className={
|
|
60
|
-
'relative lg:w-[80%] sm:w-[90%] w-[100%] max-w-[855px] ' + `${isMarginNotAuto ? '' : 'm-auto'}`
|
|
61
|
-
}
|
|
62
|
-
>
|
|
63
|
-
<input
|
|
64
|
-
name="sear_txt"
|
|
65
|
-
id={style.sear_txt}
|
|
66
|
-
placeholder={placeholder}
|
|
67
|
-
maxLength={maxLength ? maxLength : 20}
|
|
68
|
-
value={search}
|
|
69
|
-
onChange={handleInputChange}
|
|
70
|
-
onKeyUp={handleOnKeyPress}
|
|
71
|
-
spellCheck={false}
|
|
72
|
-
className={
|
|
73
|
-
`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] px-[40px] py-[24px] rounded-full ` +
|
|
74
|
-
'text-2xl text-[#333333] tracking-[-0.6px] placeholder:text-[#adadad] ' +
|
|
75
|
-
//1500px
|
|
76
|
-
'max-3xl:text-xl ' +
|
|
77
|
-
//768px
|
|
78
|
-
'max-md:text-lg max-md:py-[20px] max-md:pl-[40px] max-md:pr-[150px] ' +
|
|
79
|
-
//640px
|
|
80
|
-
'max-sm:text-base max-sm:py-[18px] max-sm:pl-[25px] max-sm:pr-[65px] ' +
|
|
81
|
-
//325px
|
|
82
|
-
'max-3xs:text-sm max-3xs:py-[15px] max-3xs:pl-[20px] max-3xs:pr-[55px] '
|
|
83
|
-
}
|
|
84
|
-
/>
|
|
85
|
-
<div
|
|
86
|
-
onClick={handleClick}
|
|
87
|
-
className={
|
|
88
|
-
'absolute top-[50%] translate-y-[-50%] right-[20px] z-10 ' +
|
|
89
|
-
'w-[140px] h-[65%] bg-[#2E2E2E] rounded-full cursor-pointer ' +
|
|
90
|
-
'flex justify-center items-center gap-[10px] ' +
|
|
91
|
-
//768px
|
|
92
|
-
'max-md:w-[120px] ' +
|
|
93
|
-
//640px
|
|
94
|
-
'max-sm:hidden '
|
|
95
|
-
}
|
|
96
|
-
>
|
|
97
|
-
<Image
|
|
98
|
-
src="/images/integrate/search.webp"
|
|
99
|
-
alt="로고"
|
|
100
|
-
width={30}
|
|
101
|
-
height={30}
|
|
102
|
-
className="w-[22px] h-auto max-md:w-[18px]"
|
|
103
|
-
/>
|
|
104
|
-
<span
|
|
105
|
-
className={
|
|
106
|
-
'text-[#fff] text-xl font-[800] tracking-[-0.5px] ' +
|
|
107
|
-
//1500px
|
|
108
|
-
'max-3xl:text-lg ' +
|
|
109
|
-
//768px
|
|
110
|
-
'max-md:text-base '
|
|
111
|
-
}
|
|
112
|
-
>
|
|
113
|
-
검색
|
|
114
|
-
</span>
|
|
115
|
-
</div>
|
|
116
|
-
<div
|
|
117
|
-
onClick={handleClick}
|
|
118
|
-
className={
|
|
119
|
-
'bg-[#2E2E2E] cursor-pointer absolute z-10 right-[15px] top-[50%] translate-y-[-50%] rounded-[30px] flex justify-center items-center sm:hidden ' +
|
|
120
|
-
//650px
|
|
121
|
-
'w-[40px] h-[40px] ' +
|
|
122
|
-
//325px
|
|
123
|
-
'max-3xs:w-[32px] max-3xs:h-[32px]'
|
|
124
|
-
}
|
|
125
|
-
>
|
|
126
|
-
<Image
|
|
127
|
-
src="/images/integrate/search.webp"
|
|
128
|
-
alt="로고"
|
|
129
|
-
width={26}
|
|
130
|
-
height={26}
|
|
131
|
-
className={'w-[18px] h-auto max-3xs:w-[16px]'}
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
)
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export default SearchBar
|