Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
52aaced
feat(endpoints): 태그 목록 조회를 위한 API 함수 추가
eggmun98 Feb 16, 2025
e8d5e5d
rename(tag): tag api 함수 선언 파일 폴더 경로 변경
eggmun98 Feb 16, 2025
3bd19f2
refactor: api 인스턴스 함수 응답 타입 변경
eggmun98 Feb 16, 2025
248844a
type(tag): Tag API 응답 타입 선언 및 타입만 내보내기 사용
eggmun98 Feb 16, 2025
4c95d1e
refactor(tag-type): getTags 함수 API 응답 타입 추가
eggmun98 Feb 16, 2025
7c617d1
chore(config): 모든 console 로그 제거 설정
eggmun98 Feb 16, 2025
21fd071
chore(eslint): autoFocus 관련 ESLint 규칙 비활성화
eggmun98 Feb 16, 2025
3c2a1e0
feat: Tag 리스트 조회 Api 연동 및 연관 검색어 기능 추가
eggmun98 Feb 16, 2025
13b9514
rename: configs 폴더 경로 변경
eggmun98 Feb 16, 2025
b9049ca
rename: Provider 폴더 경로 변경
eggmun98 Feb 16, 2025
ab39115
rename: Styles 폴더 경로 변경
eggmun98 Feb 16, 2025
afa8c4c
renmae: types 폴더 경로 변경
eggmun98 Feb 16, 2025
4df59e4
rename: utils 폴더 경로 변경
eggmun98 Feb 16, 2025
09fe91c
rename: components 폴더 경로 변경
eggmun98 Feb 16, 2025
338739e
feat: TagBox Atom 컴포넌트 구현
eggmun98 Feb 16, 2025
47dd4b4
refactor: TagBox 컴포넌트 사용
eggmun98 Feb 16, 2025
1d3eb9b
refactor(tag-box): TagBox에 tagName props로 받을 수 있도록 변경
eggmun98 Feb 16, 2025
cb150b9
feat(feature): TagList 컴포넌트 구현
eggmun98 Feb 16, 2025
ad51953
refactor:(tagList): TagList 컴포넌트 사용
eggmun98 Feb 16, 2025
ed5d91d
comment(remove): 불필요한 주석 제거
eggmun98 Feb 16, 2025
723e038
feat(feature): 연관 태그 컴포넌트 구현
eggmun98 Feb 16, 2025
b31a8b4
refactor(relatedTags): 연관 태그 컴포넌트 사용
eggmun98 Feb 16, 2025
f0642f7
refactor(glasses): 돋보기 아이콘을 감싸는 컴포넌트 제거
eggmun98 Feb 16, 2025
0b3f4b2
fix: keyDown 이벤트 중복 발생 부분 수정
eggmun98 Feb 16, 2025
5ca03a1
feat(feature): CollapsedSearch 컴포넌트 구현
eggmun98 Feb 16, 2025
e7edaaa
refactor(collapsedSearch): CollapsedSearch 컴포넌트 사용
eggmun98 Feb 16, 2025
f5a5f95
chore(next): 실제 운영서버에서만 로그를 지울 수 있도록 변경
eggmun98 Feb 16, 2025
011294b
feat(feature): ExpandedSearch 컴포넌트 구현
eggmun98 Feb 16, 2025
9256ee6
refactor(expandedSearch): ExpandedSearch 컴포넌트 사용
eggmun98 Feb 16, 2025
ce952e7
refactor(search): isExpanded가 true일 경우에는 onClick 이벤트 미사용하도록 변경
eggmun98 Feb 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"import/order": "off",
"no-console": "off",
"react/function-component-definition": "off",
"arrow-body-style": "off"
"arrow-body-style": "off",
"jsx-a11y/no-autofocus": "off"
}
}
8 changes: 6 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
const { createVanillaExtractPlugin } = require("@vanilla-extract/next-plugin");
const { createVanillaExtractPlugin } = require('@vanilla-extract/next-plugin');

const withVanillaExtract = createVanillaExtractPlugin();

/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
};

module.exports = withVanillaExtract(nextConfig);
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ThemeProvider from '@/providers/ThemeProvider/ThemeProvider';
import '../styles/globalStyles.css.ts';
import ThemeProvider from '@/commons/providers/ThemeProvider/ThemeProvider.tsx';
import '../commons/styles/globalStyles.css.ts';
import { Metadata } from 'next';

export const metadata: Metadata = {
Expand Down
10 changes: 5 additions & 5 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import RemoteControl from '@/components/features/Common/RemoteControl/RemoteControl';
import Card from '@/components/features/Items/Card/Card';
import Header from '@/components/widgets/Header/Header';
import SearchToolbar from '@/components/widgets/SearchToolbar/SearchToolbar';
import * as styles from '@/styles/rootStyles.css';
import RemoteControl from '@/commons/components/features/Common/RemoteControl/RemoteControl';
import Card from '@/commons/components/features/Items/Card/Card';
import Header from '@/commons/components/widgets/Header/Header';
import SearchToolbar from '@/commons/components/widgets/SearchToolbar/SearchToolbar';
import * as styles from '@/commons/styles/rootStyles.css';

export default function RootPage() {
return (
Expand Down
9 changes: 9 additions & 0 deletions src/commons/components/atoms/boxes/tagBox/tagBox.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { style } from '@vanilla-extract/css';

export const tagBox = style({
padding: '8px 10px',
borderRadius: '50px',
backgroundColor: '#6A6868',

fontSize: '12px',
});
5 changes: 5 additions & 0 deletions src/commons/components/atoms/boxes/tagBox/tagBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as styles from './tagBox.css';

export function TagBox({ tagName }: { tagName: string }) {
return <div className={styles.tagBox}>{tagName}</div>;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import ArrowUp from '@/components/atoms/Icons/ArrowUp/ArrowUp';
import { scrollToTop } from '@/utils/ui/scrollToTop/scrollToTop';
import ArrowUp from '@/commons/components/atoms/Icons/ArrowUp/ArrowUp';
import { scrollToTop } from '@/commons/utils/ui/scrollToTop/scrollToTop';
import * as styles from './RemoteControl.css';

export default function RemoteControl() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vars } from '@/styles/globalStyles.css';
import { vars } from '@/commons/styles/globalStyles.css';
import { keyframes, style } from '@vanilla-extract/css';

export const wrapper = style({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Moon from '@/components/atoms/Icons/Moon/Moon';
import Sun from '@/components/atoms/Icons/Sun/Sun';
import { Theme } from '@/types/theme';
import Moon from '@/commons/components/atoms/Icons/Moon/Moon';
import Sun from '@/commons/components/atoms/Icons/Sun/Sun';
import { Theme } from '@/commons/types/theme';
import { ThemeIconProps } from './ThemeIcon.types';

export default function ThemeIcon({ setTheme, resolvedTheme }: ThemeIconProps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { style } from '@vanilla-extract/css';

export const collapsedSearchWrapper = style({
display: 'flex',
flexDirection: 'row',

marginRight: 'auto',
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { collapsedSearchWrapper } from './CollapsedSearch.css';
import { KeyboardEvent } from 'react';
import Image from 'next/image';
import { TagList } from '../../Lists/TagList/TagList';

export const CollapsedSearch = ({
tagList,
handleKeyDown,
}: {
tagList: string[];
handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
}) => {
return (
<>
<div
className={collapsedSearchWrapper}
role="button"
tabIndex={0}
aria-label="검색 확장 버튼"
onKeyDown={handleKeyDown}
>
<TagList tags={tagList} />
</div>
<Image src="/images/buttons/readingGlasses.png" alt="ReadingGlasses" width={22} height={30} />
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
import { style } from '@vanilla-extract/css';

export const wrapper = style({
position: 'relative',

display: 'flex',
flexDirection: 'row',
backgroundColor: '#fff',

width: '27rem',
height: '3rem',
padding: '10px 20px',
borderRadius: '50px',

cursor: 'pointer',
});

export const glassesWrapper = style({
display: 'flex',
flexDirection: 'row',
});

export const tagWrapper = style({
display: 'flex',
flexDirection: 'row',

marginRight: 'auto',
});

export const tagBox = style({
padding: '6px',
borderRadius: '50px',
backgroundColor: '#6A6868',

fontSize: '12px',

marginRight: '10px',
});

export const OutExpandedWrapper = style({
position: 'fixed',
top: '0',
left: '0',
right: '0',
bottom: '0',

display: 'flex',
justifyContent: 'center',

width: '100vw', // 100%에서 100vw로 변경
height: '100vh', // 100%에서 100vh로 변경

padding: '80px 54px',

zIndex: '1000',
backgroundColor: 'rgba(0, 0, 0, 0.65)', // 반투명 검은색으로 변경
});

export const expandedWrapper = style({
position: 'absolute',
top: '0',
left: '0',
right: '0',
bottom: '0',

display: 'flex',
flexDirection: 'column',

width: '37rem',
height: '22rem',

backgroundColor: '#fff',

borderRadius: '25px',
padding: '20px',

zIndex: '2000',
});

export const searchInput = style({
width: '100%',
height: '16px',

marginBottom: '14px',

backgroundColor: 'transparent',
color: '#000',

fontSize: '14px',

border: 'none',
outline: 'none',
});

export const expandedTagWrapper = style({
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',

fontSize: '12px',
});

export const relatedTagWrapper = style({
display: 'flex',
flexDirection: 'column',

margin: '0',
padding: '0',
});

export const relatedTagBox = style({
display: 'flex',
flexDirection: 'row',
alignItems: 'center',

width: '100%',

gap: '10px',

cursor: 'pointer',

':focus': {
outline: 'none',
backgroundColor: 'rgba(106, 104, 104, 0.1)',
},

':hover': {
backgroundColor: 'rgba(106, 104, 104, 0.1)',
},
});

export const relatedTagText = style({
fontSize: '12px',

color: '#000',
});

export const focusedTag = style({
backgroundColor: 'rgba(106, 104, 104, 0.1)',
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { TagType } from '@/domains/tag/tpyes/tag.type';
import { RelatedTags } from '../../Lists/RelatedTags/RelatedTags';
import { TagList } from '../../Lists/TagList/TagList';
import * as styles from './ExpandedSearch.css';
import { KeyboardEvent } from 'react';

export const ExpandedSearch = ({
inputValue,
setInputValue,
handleKeyDown,
tagList,
relatedTags,
focusedIndex,
onClickRelatedTag,
onClickExpanded,
}: {
inputValue: string;
setInputValue: (value: string) => void;
handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
tagList: string[];
relatedTags: TagType[];
focusedIndex: number;
onClickRelatedTag: (tag: TagType) => void;
onClickExpanded: () => void;
}) => {
return (
<>
<div className={styles.expandedWrapper}>
<input
className={styles.searchInput}
type="text"
placeholder="검색어를 입력하세요"
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
onKeyDown={handleKeyDown}
autoFocus
/>

<TagList tags={tagList} />

<RelatedTags relatedTags={relatedTags} focusedIndex={focusedIndex} onClickRelatedTag={onClickRelatedTag} />
</div>

<div
className={styles.OutExpandedWrapper}
onClick={onClickExpanded}
role="button"
tabIndex={0}
aria-label="검색 축소 화면 버튼"
onKeyDown={handleKeyDown}
/>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,25 @@ export const relatedTagBox = style({
width: '100%',

gap: '10px',

cursor: 'pointer',

':focus': {
outline: 'none',
backgroundColor: 'rgba(106, 104, 104, 0.1)',
},

':hover': {
backgroundColor: 'rgba(106, 104, 104, 0.1)',
},
});

export const relatedTagText = style({
fontSize: '12px',

color: '#000',
});

export const focusedTag = style({
backgroundColor: 'rgba(106, 104, 104, 0.1)',
});
Loading