@wishket/design-system 1.5.0 → 1.5.2
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/Base/Layouts/Box/Box.d.ts +6 -0
- package/dist/Components/Base/Layouts/Column/Column.d.ts +10 -0
- package/dist/Components/Base/Layouts/FullBleed/FullBleed.d.ts +8 -0
- package/dist/Components/Base/Layouts/GridLayout/GridLayout.d.ts +16 -0
- package/dist/Components/Base/Typography/Typography.d.ts +8 -0
- package/dist/Components/DataDisplays/CountBadge/CountBadge.d.ts +20 -0
- package/dist/Components/DataDisplays/Divider/Divider.d.ts +18 -0
- package/dist/Components/DataDisplays/ImageLabel/ImageLabel.d.ts +18 -0
- package/dist/Components/DataDisplays/Label/Label.d.ts +30 -0
- package/dist/Components/DataDisplays/NewBadge/NewBadge.d.ts +19 -0
- package/dist/Components/DataDisplays/ProductIcon/ProductIcon.d.ts +9 -0
- package/dist/Components/DataDisplays/{ProcessIndicator/ProcessIndicator.d.ts → ProgressIndicator/ProgressIndicator.d.ts} +4 -4
- package/dist/Components/DataDisplays/ProgressIndicator/ProgressIndicator.js +1 -0
- package/dist/Components/DataDisplays/ProgressIndicator/index.d.ts +2 -0
- package/dist/Components/DataDisplays/ProgressIndicator/index.js +1 -0
- package/dist/Components/DataDisplays/ServiceLogo/ServiceLogo.d.ts +18 -0
- package/dist/Components/DataDisplays/SkillLabel/SkillLabel.d.ts +6 -0
- package/dist/Components/DataDisplays/SkillLabel/SkillLabel.parts.d.ts +19 -0
- package/dist/Components/DataDisplays/SystemIcon/SystemIcon.d.ts +29 -0
- package/dist/Components/DataDisplays/index.d.ts +1 -1
- package/dist/Components/Feedbacks/Dialog/Dialog.d.ts +14 -0
- package/dist/Components/Feedbacks/DialogBox/DialogBox.js +1 -1
- package/dist/Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.d.ts +25 -0
- package/dist/Components/Feedbacks/LoadingIndicator/LoadingIndicator.d.ts +19 -0
- package/dist/Components/Feedbacks/MessageBar/MessageBar.d.ts +42 -0
- package/dist/Components/Feedbacks/MessageBar/MessageBar.js +1 -1
- package/dist/Components/Feedbacks/MessageBox/MessageBox.d.ts +35 -0
- package/dist/Components/Feedbacks/PlainTooltip/PlainTooltip.d.ts +36 -2
- package/dist/Components/Feedbacks/RichTooltip/RichTooltip.d.ts +26 -0
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.d.ts +23 -0
- package/dist/Components/Inputs/Autocomplete/Autocomplete.d.ts +39 -0
- package/dist/Components/Inputs/Button/Button.d.ts +47 -0
- package/dist/Components/Inputs/Button/Button.parts.js +1 -1
- package/dist/Components/Inputs/Calendar/Calendar.d.ts +36 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.d.ts +29 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.parts.js +1 -1
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.d.ts +45 -0
- package/dist/Components/Inputs/CheckboxList/CheckboxList.d.ts +24 -0
- package/dist/Components/Inputs/CheckboxList/CheckboxList.js +1 -1
- package/dist/Components/Inputs/CheckboxListItem/CheckboxListItem.d.ts +43 -0
- package/dist/Components/Inputs/CheckboxListItem/CheckboxListItem.js +1 -1
- package/dist/Components/Inputs/ChoiceChip/ChoiceChip.d.ts +38 -0
- package/dist/Components/Inputs/CommentArea/CommentArea.d.ts +15 -0
- package/dist/Components/Inputs/FilterChip/FilterChip.d.ts +57 -0
- package/dist/Components/Inputs/FilterChip/FilterChip.js +1 -0
- package/dist/Components/Inputs/FilterChip/index.d.ts +2 -0
- package/dist/Components/Inputs/FilterChip/index.js +1 -0
- package/dist/Components/Inputs/FilterList/FilterList.d.ts +47 -6
- package/dist/Components/Inputs/FilterList/index.d.ts +1 -0
- package/dist/Components/Inputs/IconButton/IconButton.d.ts +31 -0
- package/dist/Components/Inputs/IconButtonDropdown/IconButtonDropdown.d.ts +31 -0
- package/dist/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +1 -1
- package/dist/Components/Inputs/Input/Input.d.ts +25 -0
- package/dist/Components/Inputs/InputChip/InputChip.d.ts +25 -0
- package/dist/Components/Inputs/List/List.d.ts +30 -0
- package/dist/Components/Inputs/MultiColumnList/MultiColumnList.d.ts +28 -0
- package/dist/Components/Inputs/MultiColumnList/MultiColumnList.parts.d.ts +81 -0
- package/dist/Components/Inputs/Radio/Radio.d.ts +27 -0
- package/dist/Components/Inputs/RadioCard/RadioCard.d.ts +44 -0
- package/dist/Components/Inputs/RadioCard/RadioCard.js +1 -1
- package/dist/Components/Inputs/RadioCard/RadioCard.parts.js +1 -1
- package/dist/Components/Inputs/RadioGroup/RadioGroup.d.ts +37 -0
- package/dist/Components/Inputs/RadioList/RadioList.d.ts +29 -0
- package/dist/Components/Inputs/RadioList/RadioList.js +1 -1
- package/dist/Components/Inputs/RadioList/parts/RadioListContainer.d.ts +7 -0
- package/dist/Components/Inputs/RadioList/parts/RadioListContainer.js +1 -0
- package/dist/Components/Inputs/RadioList/{RadioListItem.d.ts → parts/RadioListItem.d.ts} +1 -1
- package/dist/Components/Inputs/RadioList/parts/RadioListItem.js +2 -0
- package/dist/Components/Inputs/RadioList/parts/index.d.ts +2 -0
- package/dist/Components/Inputs/RangeSlider/RangeSlider.d.ts +36 -0
- package/dist/Components/Inputs/SearchField/SearchField.d.ts +38 -2
- package/dist/Components/Inputs/SearchField/SearchField.js +1 -1
- package/dist/Components/Inputs/SegmentedControl/SegmentedControl.d.ts +28 -0
- package/dist/Components/Inputs/Switch/Switch.d.ts +20 -0
- package/dist/Components/Inputs/TextButton/TextButton.d.ts +25 -0
- package/dist/Components/Inputs/TextButtonDropdown/TextButtonDropdown.d.ts +30 -0
- package/dist/Components/Inputs/TextButtonDropdown/TextButtonDropdown.js +2 -0
- package/dist/Components/Inputs/{TextButtonsDropdown/TextButtonsDropdown.parts.d.ts → TextButtonDropdown/TextButtonDropdown.parts.d.ts} +1 -1
- package/dist/Components/Inputs/{TextButtonsDropdown/TextButtonsDropdown.parts.js → TextButtonDropdown/TextButtonDropdown.parts.js} +1 -1
- package/dist/Components/Inputs/{TextButtonsDropdown/TextButtonsDropdown.types.d.ts → TextButtonDropdown/TextButtonDropdown.types.d.ts} +1 -1
- package/dist/Components/Inputs/TextButtonDropdown/index.d.ts +2 -0
- package/dist/Components/Inputs/TextField/TextField.d.ts +41 -0
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.d.ts +32 -0
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.js +1 -1
- package/dist/Components/Inputs/Textarea/Textarea.d.ts +38 -0
- package/dist/Components/Inputs/index.d.ts +3 -2
- package/dist/Components/Navigations/BoxTab/BoxTab.d.ts +26 -0
- package/dist/Components/Navigations/BoxTab/BoxTab.parts.d.ts +69 -0
- package/dist/Components/Navigations/Drawer/Drawer.d.ts +27 -0
- package/dist/Components/Navigations/GNBList/GNBList.d.ts +48 -0
- package/dist/Components/Navigations/GNBList/GNBList.parts.d.ts +33 -0
- package/dist/Components/Navigations/Menu/Menu.d.ts +41 -0
- package/dist/Components/Navigations/Pagination/Pagination.d.ts +23 -0
- package/dist/Components/Navigations/TableOfContents/TableOfContents.d.ts +24 -0
- package/dist/Components/Navigations/TextTab/TextTab.d.ts +29 -0
- package/dist/Components/Navigations/TextTab/TextTab.parts.d.ts +69 -0
- package/dist/Components/Utils/Modal/Modal.d.ts +33 -0
- package/dist/Components/Wrappers/WithBadge/WithBadge.d.ts +21 -0
- package/dist/Components/Wrappers/WithRichTooltip/WithRichTooltip.d.ts +29 -0
- package/dist/Components/Wrappers/WithRichTooltip/WithRichTooltip.js +1 -1
- package/dist/Components/Wrappers/WithSnackBar/WithSnackBar.d.ts +23 -0
- package/dist/Components/Wrappers/WithSnackBar/WithSnackBar.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useDropdown.d.ts +21 -0
- package/dist/hooks/useDropdown.js +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Components/DataDisplays/ProcessIndicator/ProcessIndicator.js +0 -1
- package/dist/Components/DataDisplays/ProcessIndicator/index.d.ts +0 -2
- package/dist/Components/DataDisplays/ProcessIndicator/index.js +0 -1
- package/dist/Components/Inputs/RadioList/RadioListItem.js +0 -2
- package/dist/Components/Inputs/TextButtonsDropdown/TextButtonsDropdown.d.ts +0 -3
- package/dist/Components/Inputs/TextButtonsDropdown/TextButtonsDropdown.js +0 -2
- package/dist/Components/Inputs/TextButtonsDropdown/index.d.ts +0 -2
|
@@ -4,5 +4,31 @@ export interface RichTooltipProps extends PropsWithChildren {
|
|
|
4
4
|
description?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* 제목과 설명을 포함할 수 있는 리치 툴팁 컴포넌트입니다. UI만 제공하고 실제 사용은 WithRichTooltip 컴포넌트를 사용하는 것이 더 간편합니다.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @param {object} props - 컴포넌트 프로퍼티
|
|
12
|
+
* @param {string} [props.title] - 툴팁의 제목
|
|
13
|
+
* @param {string} [props.description] - 툴팁의 상세 설명
|
|
14
|
+
* @param {string} [props.className] - 추가적인 CSS 클래스
|
|
15
|
+
* @param {React.ReactNode} [props.children] - 자식 컴포넌트
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // 기본 사용법
|
|
19
|
+
* <RichTooltip
|
|
20
|
+
* title="알림"
|
|
21
|
+
* description="새로운 메시지가 도착했습니다."
|
|
22
|
+
* >
|
|
23
|
+
* <button>확인</button>
|
|
24
|
+
* </RichTooltip>
|
|
25
|
+
*
|
|
26
|
+
* // 커스텀 스타일 적용
|
|
27
|
+
* <RichTooltip
|
|
28
|
+
* title="경고"
|
|
29
|
+
* description="저장되지 않은 변경사항이 있습니다."
|
|
30
|
+
* className="absolute top-0 left-0"
|
|
31
|
+
* />
|
|
32
|
+
*/
|
|
7
33
|
declare const RichTooltip: ({ title, description, className, children, }: RichTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
34
|
export default RichTooltip;
|
|
@@ -10,6 +10,29 @@ export interface ItemProps extends ComponentProps<'li'> {
|
|
|
10
10
|
isFocused?: boolean;
|
|
11
11
|
inputValue?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* 자동완성 목록을 표시하는 컴포넌트입니다.
|
|
15
|
+
*
|
|
16
|
+
* @module AutoCompleteList
|
|
17
|
+
* @property {Component} Root - 자동완성 목록의 컨테이너 컴포넌트입니다. 스크롤 가능한 목록과 인덱스 바를 포함합니다.
|
|
18
|
+
* @property {Component} Item - 자동완성 목록의 개별 항목을 표시하는 컴포넌트입니다. 텍스트, 아이콘, 카운트 등을 표시할 수 있습니다.
|
|
19
|
+
* @property {Component} Divider - 자동완성 목록의 항목들을 구분하는 구분선 컴포넌트입니다.
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <AutoCompleteList.Root>
|
|
23
|
+
* <AutoCompleteList.Item
|
|
24
|
+
* text="검색 항목"
|
|
25
|
+
* leadingIcon="search"
|
|
26
|
+
* count={5}
|
|
27
|
+
* />
|
|
28
|
+
* <AutoCompleteList.Divider />
|
|
29
|
+
* <AutoCompleteList.Item
|
|
30
|
+
* text="다른 항목"
|
|
31
|
+
* iconUrl="/icons/custom.png"
|
|
32
|
+
* />
|
|
33
|
+
* </AutoCompleteList.Root>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
13
36
|
declare const AutoCompleteList: {
|
|
14
37
|
Root: ({ children, className, hasIndexBar, onIndexClick, ...rest }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
38
|
Item: ({ text, count, leadingIcon, iconUrl, isInputItem, isFocused, inputValue, className, ...rest }: ItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,42 @@
|
|
|
1
1
|
import { AutocompleteProps } from './Autocomplete.types';
|
|
2
|
+
/**
|
|
3
|
+
* 자동완성 입력 컴포넌트
|
|
4
|
+
*
|
|
5
|
+
* @param {AutocompleteProps} props
|
|
6
|
+
* @param {SkillItem[]} props.skillItems - 선택 가능한 기술 항목 목록
|
|
7
|
+
* @param {LegacySkillItem[]} props.legacySkillItems - 레거시 기술 항목 목록
|
|
8
|
+
* @param {string[]} props.selectedItems - 현재 선택된 항목들
|
|
9
|
+
* @param {(item: string) => void} props.onChipDelete - 선택된 항목 삭제 시 호출되는 콜백
|
|
10
|
+
* @param {string} props.value - 입력 필드의 현재 값
|
|
11
|
+
* @param {(value: string) => void} props.onValueChange - 입력 값 변경 시 호출되는 콜백
|
|
12
|
+
* @param {string} props.placeholder - 입력 필드의 플레이스홀더
|
|
13
|
+
* @param {(item: SkillItem) => void} props.onSkillItemClick - 기술 항목 선택 시 호출되는 콜백
|
|
14
|
+
* @param {(item: LegacySkillItem) => void} props.onLegacySkillItemClick - 레거시 항목 선택 시 호출되는 콜백
|
|
15
|
+
* @param {(value: string) => void} props.onInputItemClick - 직접 입력한 값 선택 시 호출되는 콜백
|
|
16
|
+
* @param {string} [props.supportingText] - 입력 필드 아래에 표시되는 도움말 텍스트
|
|
17
|
+
* @param {boolean} [props.hasIndexBar=false] - 알파벳 인덱스 바 표시 여부
|
|
18
|
+
* @param {boolean} [props.isError] - 오류 상태 여부
|
|
19
|
+
* @param {string} [props.errorMessage] - 오류 메시지
|
|
20
|
+
* @param {ReactNode} [props.leadingIcon] - 항목 앞에 표시될 아이콘
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <Autocomplete
|
|
25
|
+
* skillItems={[
|
|
26
|
+
* { value: 'JavaScript', iconUrl: '/js-icon.png' },
|
|
27
|
+
* { value: 'TypeScript', iconUrl: '/ts-icon.png' }
|
|
28
|
+
* ]}
|
|
29
|
+
* legacySkillItems={[
|
|
30
|
+
* { value: 'jQuery', count: 5 }
|
|
31
|
+
* ]}
|
|
32
|
+
* selectedItems={['React']}
|
|
33
|
+
* value=""
|
|
34
|
+
* onValueChange={(value) => console.log(value)}
|
|
35
|
+
* onChipDelete={(item) => console.log('deleted:', item)}
|
|
36
|
+
* onSkillItemClick={(item) => console.log('selected:', item)}
|
|
37
|
+
* placeholder="기술을 입력하세요"
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
2
41
|
declare const Autocomplete: ({ skillItems, legacySkillItems, selectedItems, onChipDelete, value, onValueChange, placeholder, onSkillItemClick, onLegacySkillItemClick, onInputItemClick, supportingText, hasIndexBar, isError, errorMessage, leadingIcon, }: AutocompleteProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
42
|
export default Autocomplete;
|
|
@@ -1,3 +1,50 @@
|
|
|
1
1
|
import { ButtonProps } from './Button.types';
|
|
2
|
+
/**
|
|
3
|
+
* 다양한 스타일과 기능을 제공하는 버튼 컴포넌트입니다.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props
|
|
6
|
+
* @param {'button' | 'submit' | 'reset'} [props.type='button'] - 버튼의 타입
|
|
7
|
+
* @param {React.RefObject<HTMLButtonElement>} [props.ref] - 버튼 요소에 대한 ref
|
|
8
|
+
* @param {boolean} [props.disabled=false] - 버튼 비활성화 여부
|
|
9
|
+
* @param {React.ReactNode} props.children - 버튼 내부 콘텐츠
|
|
10
|
+
* @param {string} [props.className] - 추가 CSS 클래스
|
|
11
|
+
* @param {function} [props.onClick] - 클릭 이벤트 핸들러
|
|
12
|
+
* @param {'sm' | 'md' | 'lg'} [props.size='md'] - 버튼 크기
|
|
13
|
+
* @param {'outlined' | 'solid' | 'outline_filled'} [props.variant='outlined'] - 버튼 스타일 변형
|
|
14
|
+
* @param {boolean} [props.rounded=false] - 둥근 모서리 적용 여부
|
|
15
|
+
* @param {React.ReactNode} [props.leadingIcon] - 버튼 앞쪽 아이콘
|
|
16
|
+
* @param {boolean} [props.isLeadingIconSolid=false] - 앞쪽 아이콘 solid 스타일 적용 여부
|
|
17
|
+
* @param {React.ReactNode} [props.trailingIcon] - 버튼 뒤쪽 아이콘
|
|
18
|
+
* @param {boolean} [props.isTrailingIconSolid=false] - 뒤쪽 아이콘 solid 스타일 적용 여부
|
|
19
|
+
* @param {string | number} [props.badgeNumber=''] - 버튼에 표시될 뱃지 숫자
|
|
20
|
+
* @param {boolean} [props.needThrottle=false] - 쓰로틀링 적용 여부
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // 기본 버튼
|
|
24
|
+
* <Button onClick={() => console.log('클릭됨')}>
|
|
25
|
+
* 버튼
|
|
26
|
+
* </Button>
|
|
27
|
+
*
|
|
28
|
+
* // 아이콘이 있는 비활성화된 버튼
|
|
29
|
+
* <Button
|
|
30
|
+
* disabled
|
|
31
|
+
* variant="contained"
|
|
32
|
+
* leadingIcon={<Icon name="search" />}
|
|
33
|
+
* size="lg"
|
|
34
|
+
* >
|
|
35
|
+
* 검색
|
|
36
|
+
* </Button>
|
|
37
|
+
*
|
|
38
|
+
* // 쓰로틀링이 적용된 둥근 버튼
|
|
39
|
+
* <Button
|
|
40
|
+
* rounded
|
|
41
|
+
* needThrottle
|
|
42
|
+
* variant="text"
|
|
43
|
+
* badgeNumber="5"
|
|
44
|
+
* onClick={handleClick}
|
|
45
|
+
* >
|
|
46
|
+
* 알림
|
|
47
|
+
* </Button>
|
|
48
|
+
*/
|
|
2
49
|
declare const Button: ({ type, ref, disabled, children, className, onClick, size, variant, rounded, leadingIcon, isLeadingIconSolid, trailingIcon, isTrailingIconSolid, badgeNumber, needThrottle, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
50
|
export default Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("tailwind-merge"),a=(require("../../DataDisplays/Avatar/Avatar.js"),require("../../DataDisplays/CountBadge/CountBadge.js")),s=(require("../../Base/Layouts/Box/Box.js"),require("../../Base/Layouts/FullBleed/FullBleed.js"),require("../../DataDisplays/Label/Label.js"),require("../../DataDisplays/SystemIcon/SystemIcon.js"));exports.ButtonContainer=function(t){function o(){return"solid"===p&&h?"text-w-white":"outline_filled"===p&&h||h?"text-primary-100":"solid"===p?"text-w-white":"text-primary-500"}var l=t.rounded,n=t.size,d=t.type,p=t.variant,
|
|
1
|
+
"use strict";var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("tailwind-merge"),a=(require("../../DataDisplays/Avatar/Avatar.js"),require("../../DataDisplays/CountBadge/CountBadge.js")),s=(require("../../Base/Layouts/Box/Box.js"),require("../../Base/Layouts/FullBleed/FullBleed.js"),require("../../DataDisplays/Label/Label.js"),require("../../DataDisplays/SystemIcon/SystemIcon.js"));exports.ButtonContainer=function(t){function o(){return"solid"===p&&h?"text-w-white":"outline_filled"===p&&h||h?"text-primary-100":"solid"===p?"text-w-white":"text-primary-500"}var l=t.rounded,n=t.size,d=t.type,p=t.variant,x=t.children,g=t.leadingIcon,u=t.isLeadingIconSolid,u=void 0!==u&&u,b=t.trailingIcon,m=t.isTrailingIconSolid,m=void 0!==m&&m,c=t.badgeNumber,c=void 0===c?"":c,y=t.className,h=t.disabled,v=t.onClick,t=e.__rest(t,["rounded","size","type","variant","children","leadingIcon","isLeadingIconSolid","trailingIcon","isTrailingIconSolid","badgeNumber","className","disabled","onClick"]);return r.jsxs("button",e.__assign({className:i.twMerge("box-border flex w-fit cursor-pointer items-center justify-center border","outlined"===p&&l?"rounded-full":"rounded-xl","sm"===n?"h-[36px] text-sm leading-6 gap-x-1":"lg"===n?"h-[60px] text-[20px] leading-[30px] gap-x-2":"h-[50px] text-base leading-[26px] gap-x-1.5",(l="solid"===p,"sm"===n?l?"px-3":"px-[11px]":"lg"===n?l?"px-6":"px-[23px]":l?"px-4":"px-[15px]"),o(),"solid"===p?"bg-primary-500 border-0 hover:bg-primary-700":"outline_filled"===p?"bg-primary-10 border-primary-200 hover:border-primary-500":"bg-w-white border-w-gray-200 hover:border-primary-500",h&&"cursor-not-allowed",h&&("solid"===p?"bg-primary-100 border-0 hover:bg-primary-100 hover:border-primary-100":"outline_filled"===p?"bg-primary-10 border-primary-200 hover:border-primary-200":"bg-w-white border-w-gray-200 hover:border-w-gray-200"),y),onClick:v,disabled:h,type:d},t,{children:[g&&r.jsx(s,{name:g,solid:u,testId:"design-system-button--leading-icon",className:i.twMerge("flex-shrink-0","sm"===n?"size-[14px]":"size-4",o())}),x,b&&r.jsx(s,{name:b,solid:m,testId:"design-system-button--trailing-icon",className:i.twMerge("flex-shrink-0","sm"===n?"size-[14px]":"size-4",o())}),c&&r.jsx(a,{text:c,className:"relative flex-shrink-0"})]}))};
|
|
@@ -6,5 +6,41 @@ export interface CalendarProps {
|
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
isError?: boolean;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* 날짜를 선택할 수 있는 캘린더 컴포넌트입니다.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} props - 컴포넌트 프로퍼티
|
|
16
|
+
* @param {string} [props.selected] - 선택된 날짜 (YYYY-MM-DD 형식)
|
|
17
|
+
* @param {(date: string) => void} [props.onChange] - 날짜 선택 시 호출되는 콜백 함수, YYYY-MM-DD 형식의 인자를 받음
|
|
18
|
+
* @param {string} [props.defaultDate] - 초기 기본 날짜 (YYYY-MM-DD 형식)
|
|
19
|
+
* @param {boolean} [props.disabled] - 캘린더 비활성화 여부
|
|
20
|
+
* @param {string} [props.placeholder] - 날짜가 선택되지 않았을 때 표시될 텍스트
|
|
21
|
+
* @param {boolean} [props.isError] - 에러 상태 표시 여부
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // 기본 사용법
|
|
26
|
+
* <Calendar
|
|
27
|
+
* selected="2024-03-21"
|
|
28
|
+
* onChange={(date) => console.log(date)}
|
|
29
|
+
* placeholder="날짜를 선택하세요"
|
|
30
|
+
* />
|
|
31
|
+
*
|
|
32
|
+
* // 비활성화된 상태
|
|
33
|
+
* <Calendar
|
|
34
|
+
* disabled={true}
|
|
35
|
+
* placeholder="선택 불가"
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* // 에러 상태
|
|
39
|
+
* <Calendar
|
|
40
|
+
* isError={true}
|
|
41
|
+
* selected="2024-03-21"
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
9
45
|
declare const Calendar: ({ defaultDate, selected, onChange, disabled, placeholder, isError, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
46
|
export default Calendar;
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CheckboxProps } from './Checkbox.types';
|
|
3
|
+
/**
|
|
4
|
+
* @component
|
|
5
|
+
* @param {Object} props - 체크박스 컴포넌트 프로퍼티
|
|
6
|
+
* @param {boolean} [props.checked=false] - 체크박스의 체크 상태
|
|
7
|
+
* @param {(event: ChangeEvent<HTMLInputElement>) => void} [props.onChange] - 체크박스 상태 변경 시 호출되는 콜백 함수
|
|
8
|
+
* @param {boolean} [props.disabled=false] - 체크박스 비활성화 여부
|
|
9
|
+
* @param {boolean} [props.isError=false] - 체크박스 에러 상태 여부
|
|
10
|
+
* @param {'box' | 'circle' | 'sub'} [props.type='box'] - 체크박스 타입
|
|
11
|
+
* @param {string} [props.className] - 추가 CSS 클래스
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // 기본 사용법
|
|
15
|
+
* <Checkbox checked={isChecked} onChange={handleChange} />
|
|
16
|
+
*
|
|
17
|
+
* // 비활성화된 체크박스
|
|
18
|
+
* <Checkbox disabled />
|
|
19
|
+
*
|
|
20
|
+
* // 에러 상태의 체크박스
|
|
21
|
+
* <Checkbox isError />
|
|
22
|
+
*
|
|
23
|
+
* // 커스텀 스타일이 적용된 체크박스
|
|
24
|
+
* <Checkbox className="custom-checkbox" />
|
|
25
|
+
*
|
|
26
|
+
* // 체크박스 상태 변경 핸들링
|
|
27
|
+
* const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
|
28
|
+
* console.log('체크박스 상태:', e.target.checked);
|
|
29
|
+
* };
|
|
30
|
+
* <Checkbox onChange={handleChange} />
|
|
31
|
+
*/
|
|
3
32
|
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
33
|
export default Checkbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=require("react/jsx-runtime"),e=require("tailwind-merge"),s="absolute h-[2px] origin-top-left rounded",a="transition-[width] duration-100 ease-linear",
|
|
1
|
+
"use strict";var r=require("react/jsx-runtime"),e=require("tailwind-merge"),s="absolute h-[2px] origin-top-left rounded",a="transition-[width] duration-100 ease-linear",t="left-[3.2px] top-[5.45px] rotate-45",o="left-[4.5px] top-[8.95px] -rotate-45",i="bg-w-gray-200 group-hover:bg-w-primary",d="bg-w-white group-hover:bg-w-white",l="bg-w-red-500 group-hover:bg-w-red-500",w="bg-w-gray-200 group-hover:bg-w-gray-200",c=function(i){var l=i.checked,c=i.isError,i=i.disabled;return r.jsxs("div",{className:"relative h-full w-full cursor-pointer bg-transparent",children:[r.jsx("div",{className:e.twMerge(s,t,a,d,c&&i&&w,l?"w-[5.65px]":"w-0")}),r.jsx("div",{className:e.twMerge(s,o,a,d,c&&i&&w,l?"w-[8.3px] delay-100":"w-0 delay-0")})]})},g=function(c){var g=c.checked,n=c.isError,c=c.disabled;return r.jsxs("div",{className:"relative h-full w-full cursor-pointer bg-transparent",children:[r.jsx("div",{className:e.twMerge(s,t,n?l:i,n&&c&&w,g?"w-0":"w-[5.65px]")}),r.jsx("div",{className:e.twMerge(s,o,n?l:i,n&&c&&w,g?"w-0":"w-[8.3px]")}),r.jsx("div",{className:e.twMerge(s,t,a,d,n&&c&&w,g?"w-[5.65px]":"w-0")}),r.jsx("div",{className:e.twMerge(s,o,a,d,n&&c&&w,g?"w-[8.3px] delay-100":"w-0 delay-0")})]})},n=function(s){var a=s.className,t=s.checked,o=s.disabled,s=s.isError,i="text-w-gray-100";return r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e.twMerge(s?o?i:"text-w-red-500":o?t?"text-primary-100":i:t?"text-primary":"text-w-gray-200 group-hover:text-primary",a),"data-testid":"design-system--sub-checkbox",children:r.jsx("path",{d:"M4 8.76667L7.75004 12.5L14.0001 5.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})};exports.CheckboxButton=function(s){var a=s.type,t=s.disabled,o=s.checked,o=void 0!==o&&o,i=s.isError,d=s.isFocused,s=s.className,w="circle"===a?"rounded-full":"rounded";return"sub"===a?r.jsx(n,{className:s,checked:o,disabled:t,isError:i}):r.jsxs("div",{className:e.twMerge("group relative m-px box-border size-4 cursor-pointer border",w,t?o?i?"bg-w-gray-50 border-w-gray-200 cursor-not-allowed":"bg-primary-100 border-primary-100 cursor-not-allowed":"border-w-gray-200 bg-w-gray-50 cursor-not-allowed":d&&!i?o?"bg-primary-500 border-primary-500":"border-primary-500 bg-w-white":i?o?"border-w-red-500 bg-w-red-500":"border-w-red-500 bg-w-white":o?"bg-primary-500 border-primary-500":"group-hover:border-primary-500 border-w-gray-200 bg-white",s),role:"checkbox-button",children:["box"===a&&r.jsx(c,{checked:o,isError:i,disabled:t}),"circle"===a&&r.jsx(g,{checked:o,isError:i,disabled:t})]})};
|
|
@@ -1,3 +1,48 @@
|
|
|
1
1
|
import { CheckboxCardProps } from './CheckboxCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* 체크박스와 함께 아이콘, 제목, 설명을 포함하는 카드 형태의 선택 컴포넌트입니다.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props
|
|
7
|
+
* @param {boolean} [props.disabled=false] - 컴포넌트의 비활성화 여부
|
|
8
|
+
* @param {boolean} [props.checked=false] - 체크박스의 선택 상태
|
|
9
|
+
* @param {boolean} [props.isError=false] - 오류 상태 표시 여부
|
|
10
|
+
* @param {(event: React.ChangeEvent<HTMLInputElement>) => void} props.onChange - 체크박스 상태 변경 시 호출되는 핸들러
|
|
11
|
+
* @param {boolean} [props.isWide=false] - 넓은 형태로 표시할지 여부
|
|
12
|
+
* @param {string} [props.className] - 추가적인 CSS 클래스
|
|
13
|
+
* @param {string} props.iconName - 표시할 아이콘의 이름
|
|
14
|
+
* @param {string} props.title - 카드의 제목
|
|
15
|
+
* @param {string} [props.description] - 카드의 설명 텍스트
|
|
16
|
+
* @param {string} [props.testId] - 테스트를 위한 ID
|
|
17
|
+
* @param {string} [props.name] - 체크박스의 name 속성
|
|
18
|
+
* @param {string} [props.value] - 체크박스의 value 속성
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 기본 사용 예시
|
|
22
|
+
* <CheckboxCard
|
|
23
|
+
* iconName="user"
|
|
24
|
+
* title="사용자 정보"
|
|
25
|
+
* description="사용자의 기본 정보를 포함합니다"
|
|
26
|
+
* onChange={(e) => console.log('체크박스 상태:', e.target.checked)}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* // 넓은 형태의 비활성화된 체크박스 카드
|
|
30
|
+
* <CheckboxCard
|
|
31
|
+
* iconName="settings"
|
|
32
|
+
* title="설정"
|
|
33
|
+
* description="시스템 설정을 관리합니다"
|
|
34
|
+
* isWide={true}
|
|
35
|
+
* disabled={true}
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* // 에러 상태의 체크박스 카드
|
|
39
|
+
* <CheckboxCard
|
|
40
|
+
* iconName="warning"
|
|
41
|
+
* title="오류 상태"
|
|
42
|
+
* description="오류가 발생했습니다"
|
|
43
|
+
* isError={true}
|
|
44
|
+
* checked={true}
|
|
45
|
+
* />
|
|
46
|
+
*/
|
|
2
47
|
declare const CheckboxCard: ({ disabled, checked, isError, onChange, isWide, className, iconName, title, description, testId, name, value, }: CheckboxCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
48
|
export default CheckboxCard;
|
|
@@ -1,3 +1,27 @@
|
|
|
1
1
|
import { CheckboxListProps } from './CheckboxList.types';
|
|
2
|
+
/**
|
|
3
|
+
* 체크박스 아이템들을 목록 형태로 표시하는 컴포넌트입니다.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props
|
|
6
|
+
* @param {Array} props.data - 체크박스 아이템 데이터 배열 ({label, checked, onChange}[])
|
|
7
|
+
* @param {string} [props.className] - 리스트 컨테이너에 적용할 스타일 클래스이름
|
|
8
|
+
* @param {string} [props.testId] - 테스트를 위한 ID
|
|
9
|
+
* @param {'box' | 'circle'} [props.type='box'] - 체크박스 스타일 타입
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const items = [
|
|
13
|
+
* { label: '항목 1', checked: false, onChange: () => {} },
|
|
14
|
+
* { label: '항목 2', checked: true, onChange: () => {} }
|
|
15
|
+
* ];
|
|
16
|
+
*
|
|
17
|
+
* return (
|
|
18
|
+
* <CheckboxList
|
|
19
|
+
* data={items}
|
|
20
|
+
* type="box"
|
|
21
|
+
* className="my-4"
|
|
22
|
+
* testId="checkbox-list"
|
|
23
|
+
* />
|
|
24
|
+
* );
|
|
25
|
+
*/
|
|
2
26
|
declare const CheckboxList: ({ data, className, testId, type, }: CheckboxListProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
27
|
export default CheckboxList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("tailwind-merge"),s=require("../CheckboxListItem/CheckboxListItem.js"),i=function(e){var s=e.children,i=e.className,e=e.testId;return t.jsx("div",{className:r.twMerge("
|
|
1
|
+
"use strict";var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("tailwind-merge"),s=require("../CheckboxListItem/CheckboxListItem.js"),i=function(e){var s=e.children,i=e.className,e=e.testId;return t.jsx("div",{className:r.twMerge("flex w-full flex-col gap-3",i),"data-testid":e,children:s})};module.exports=function(r){var a=r.data,l=r.className,c=r.testId,r=r.type,n=void 0===r?"box":r;return t.jsx(i,{className:l,testId:c,children:a.map(function(r,i){return t.jsx(s,e.__assign({},r,{type:n}),i)})})};
|
|
@@ -7,5 +7,48 @@ export interface CheckboxListItemProps extends CheckboxStatus, ComponentPropsWit
|
|
|
7
7
|
CheckboxClassName?: string;
|
|
8
8
|
type?: CheckboxType;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* 체크박스와 라벨, 설명을 포함하는 리스트 아이템 컴포넌트입니다.
|
|
12
|
+
*
|
|
13
|
+
* @component
|
|
14
|
+
* @param {Object} props
|
|
15
|
+
* @param {string} [props.label] - 체크박스 옆에 표시될 라벨 텍스트
|
|
16
|
+
* @param {string} [props.description] - 라벨 아래에 표시될 설명 텍스트
|
|
17
|
+
* @param {string} [props.CheckboxClassName] - 체크박스에 적용될 커스텀 클래스
|
|
18
|
+
* @param {CheckboxType} [props.type='box'] - 체크박스 타입 ('box' | 'circle' | 'sub')
|
|
19
|
+
* @param {boolean} [props.checked] - 체크박스의 선택 상태
|
|
20
|
+
* @param {boolean} [props.disabled=false] - 체크박스의 비활성화 상태
|
|
21
|
+
* @param {boolean} [props.isError=false] - 체크박스의 에러 상태
|
|
22
|
+
* @param {Function} [props.onChange] - 체크박스 상태 변경 시 호출되는 콜백 함수
|
|
23
|
+
* @param {ReactNode} [props.children] - 라벨 영역에 표시될 추가 컴포넌트
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // 기본 사용
|
|
27
|
+
* <CheckboxListItem
|
|
28
|
+
* label="이용약관 동의"
|
|
29
|
+
* description="서비스 이용을 위한 필수 약관입니다."
|
|
30
|
+
* checked={checked}
|
|
31
|
+
* onChange={handleChange}
|
|
32
|
+
* />
|
|
33
|
+
*
|
|
34
|
+
* // 비활성화 상태
|
|
35
|
+
* <CheckboxListItem
|
|
36
|
+
* label="선택 불가 항목"
|
|
37
|
+
* disabled={true}
|
|
38
|
+
* />
|
|
39
|
+
*
|
|
40
|
+
* // 에러 상태
|
|
41
|
+
* <CheckboxListItem
|
|
42
|
+
* label="필수 선택 항목"
|
|
43
|
+
* isError={true}
|
|
44
|
+
* description="이 항목은 필수로 선택해야 합니다."
|
|
45
|
+
* />
|
|
46
|
+
*
|
|
47
|
+
* // 원형 체크박스
|
|
48
|
+
* <CheckboxListItem
|
|
49
|
+
* label="원형 체크박스"
|
|
50
|
+
* type="circle"
|
|
51
|
+
* />
|
|
52
|
+
*/
|
|
10
53
|
declare const CheckboxListItem: ({ label, description, type, checked, disabled, isError, className, CheckboxClassName, onChange, children, ...rest }: CheckboxListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
54
|
export default CheckboxListItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var e=require("../../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("
|
|
2
|
+
"use strict";var e=require("../../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("tailwind-merge"),r=require("../../Base/Typography/Typography.js"),a=require("../../Base/Layouts/Box/Box.js"),t=(require("../../Base/Layouts/FullBleed/FullBleed.js"),require("../Checkbox/Checkbox.js")),c=function(r){var a=r.children,t=r.disabled,c=r.hasDescription,l=r.className,r=e.__rest(r,["children","disabled","hasDescription","className"]);return s.jsx("label",e.__assign({className:i.twMerge("grid h-min grid-cols-checkbox-list-item-container grid-rows-checkbox-list-item-container gap-x-3 grid-areas-checkbox-list-item-container",c?"gap-y-0.5":"gap-y-0",t?"cursor-not-allowed":"cursor-pointer",l)},r,{children:a}))};module.exports=function(l){var d=l.label,o=l.description,n=l.type,n=void 0===n?"box":n,h=l.checked,m=l.disabled,m=void 0!==m&&m,x=l.isError,x=void 0!==x&&x,b=l.className,g=l.CheckboxClassName,u=l.onChange,p=l.children,l=e.__rest(l,["label","description","type","checked","disabled","isError","className","CheckboxClassName","onChange","children"]);return s.jsxs(c,{"data-testid":"design-system-checkboxList--item",disabled:m,hasDescription:!!o,className:i.twMerge("group",b),children:[s.jsx(a,{className:"cursor-pointer pt-1 grid-in-checkbox",children:s.jsx(t,e.__assign({checked:h,isError:x,disabled:m,onChange:u,className:g,type:n},l))}),s.jsxs(a,{className:"flex w-full items-center grid-in-label","data-testid":"design-system-checkboxList--item-label-root",children:[d&&s.jsx(r,{variant:"body1",className:i.twJoin("w-full whitespace-normal break-words",m?"text-w-gray-300":"text-w-gray-900"),"data-testid":"design-system-checkboxList--item-label",children:d}),p]}),o&&s.jsx(a,{className:"flex items-center grid-in-description",children:s.jsx(r,{variant:"body2",className:m?"text-w-gray-300":"text-w-gray-600","data-testid":"design-system-checkboxList--item-description",children:o})})]})};
|
|
@@ -6,5 +6,43 @@ export interface ChoiceChipProps extends ComponentPropsWithoutRef<'input'> {
|
|
|
6
6
|
leadingIcon?: LargeSystemIconName;
|
|
7
7
|
trailingIcon?: MediumSystemIconName;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* 선택 가능한 칩 컴포넌트입니다.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @param {Object} props - 컴포넌트 속성
|
|
14
|
+
* @param {string} props.label - 칩에 표시될 텍스트 라벨
|
|
15
|
+
* @param {boolean} [props.checked=false] - 체크박스의 선택 상태를 제어
|
|
16
|
+
* @param {boolean} [props.error=false] - 에러 상태를 표시
|
|
17
|
+
* @param {LargeSystemIconName} [props.leadingIcon] - 칩 좌측에 표시되는 큰 아이콘
|
|
18
|
+
* @param {MediumSystemIconName} [props.trailingIcon] - 칩 우측에 표시되는 중간 크기 아이콘
|
|
19
|
+
* @param {function} [props.onChange] - 체크박스 상태 변경 시 호출되는 이벤트 핸들러
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // 기본 사용
|
|
23
|
+
* <ChoiceChip
|
|
24
|
+
* label="선택 옵션"
|
|
25
|
+
* />
|
|
26
|
+
*
|
|
27
|
+
* // 아이콘이 포함된 칩
|
|
28
|
+
* <ChoiceChip
|
|
29
|
+
* label="아이콘 옵션"
|
|
30
|
+
* leadingIcon="home"
|
|
31
|
+
* trailingIcon="close"
|
|
32
|
+
* />
|
|
33
|
+
*
|
|
34
|
+
* // 에러 상태의 칩
|
|
35
|
+
* <ChoiceChip
|
|
36
|
+
* label="에러 상태"
|
|
37
|
+
* error={true}
|
|
38
|
+
* />
|
|
39
|
+
*
|
|
40
|
+
* // 선택된 상태의 칩
|
|
41
|
+
* <ChoiceChip
|
|
42
|
+
* label="선택된 옵션"
|
|
43
|
+
* checked={true}
|
|
44
|
+
* onChange={(e) => console.log('선택 상태:', e.target.checked)}
|
|
45
|
+
* />
|
|
46
|
+
*/
|
|
9
47
|
declare const ChoiceChip: import("react").ForwardRefExoticComponent<ChoiceChipProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
48
|
export default ChoiceChip;
|
|
@@ -16,5 +16,20 @@ export interface CommentAreaProps extends ComponentPropsWithRef<'textarea'>, Inf
|
|
|
16
16
|
onClose?: () => void;
|
|
17
17
|
onSubmit?: () => void;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* 댓글 입력 영역 컴포넌트
|
|
21
|
+
* @param {Object} props
|
|
22
|
+
* @param {boolean} [props.isReply] - 답글 모드 여부
|
|
23
|
+
* @param {string|string[]} [props.guideText] - 가이드 텍스트
|
|
24
|
+
* @param {string} props.buttonName - 버튼 텍스트
|
|
25
|
+
* @param {string} props.value - 텍스트 영역 값
|
|
26
|
+
* @param {string} [props.cancelButtonName='취소'] - 취소 버튼 텍스트
|
|
27
|
+
* @param {boolean} [props.isSelected] - 선택 여부
|
|
28
|
+
* @param {string} [props.optionMessage] - 옵션 메시지
|
|
29
|
+
* @param {ReactNode} [props.children] - 커스텀 컨텐츠
|
|
30
|
+
* @param {() => void} [props.onCheck] - 체크박스 변경 핸들러
|
|
31
|
+
* @param {() => void} [props.onClose] - 닫기 핸들러
|
|
32
|
+
* @param {() => void} [props.onSubmit] - 제출 핸들러
|
|
33
|
+
*/
|
|
19
34
|
declare const CommentArea: import("react").ForwardRefExoticComponent<Omit<CommentAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
20
35
|
export default CommentArea;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SystemIconName } from '../../DataDisplays';
|
|
3
|
+
export interface FilterChipProps extends PropsWithChildren {
|
|
4
|
+
text: string;
|
|
5
|
+
leadingIcon?: SystemIconName;
|
|
6
|
+
trailingIcon?: SystemIconName;
|
|
7
|
+
badgeCount?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
isOpen?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 필터 선택 및 상태를 표시하는 칩 컴포넌트입니다.
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
* @param {Object} props
|
|
17
|
+
* @param {string} props.text - 칩에 표시될 텍스트
|
|
18
|
+
* @param {SystemIconName} [props.leadingIcon] - 텍스트 앞에 표시될 아이콘
|
|
19
|
+
* @param {SystemIconName} [props.trailingIcon] - 텍스트 뒤에 표시될 아이콘
|
|
20
|
+
* @param {string} [props.badgeCount] - 선택된 항목 수를 표시하는 뱃지 텍스트
|
|
21
|
+
* @param {string} [props.className] - 추가적인 스타일 클래스
|
|
22
|
+
* @param {boolean} [props.isOpen=false] - 드롭다운 메뉴의 열림 상태
|
|
23
|
+
* @param {() => void} [props.onClick] - 클릭 이벤트 핸들러
|
|
24
|
+
* @param {React.ReactNode} [props.children] - 드롭다운 메뉴의 내부 컨텐츠
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // 기본 사용
|
|
28
|
+
* <FilterChip text="카테고리" />
|
|
29
|
+
*
|
|
30
|
+
* // 아이콘과 함께 사용
|
|
31
|
+
* <FilterChip
|
|
32
|
+
* text="필터"
|
|
33
|
+
* leadingIcon="filter"
|
|
34
|
+
* trailingIcon="chevron-down"
|
|
35
|
+
* />
|
|
36
|
+
*
|
|
37
|
+
* // 선택된 항목 수 표시
|
|
38
|
+
* <FilterChip
|
|
39
|
+
* text="상태"
|
|
40
|
+
* badgeCount="3"
|
|
41
|
+
* leadingIcon="status"
|
|
42
|
+
* />
|
|
43
|
+
*
|
|
44
|
+
* // 드롭다운 메뉴와 함께 사용
|
|
45
|
+
* <FilterChip
|
|
46
|
+
* text="정렬"
|
|
47
|
+
* isOpen={true}
|
|
48
|
+
* leadingIcon="sort"
|
|
49
|
+
* >
|
|
50
|
+
* <DropdownMenu>
|
|
51
|
+
* <MenuItem>최신순</MenuItem>
|
|
52
|
+
* <MenuItem>오래된순</MenuItem>
|
|
53
|
+
* </DropdownMenu>
|
|
54
|
+
* </FilterChip>
|
|
55
|
+
*/
|
|
56
|
+
declare const FilterChip: import("react").ForwardRefExoticComponent<FilterChipProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export default FilterChip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("tailwind-merge"),a=require("../../Base/Typography/Typography.js"),s=require("../../Base/Layouts/Box/Box.js"),i=(require("../../Base/Layouts/FullBleed/FullBleed.js"),require("../../DataDisplays/Avatar/Avatar.js"),require("../../DataDisplays/CountBadge/CountBadge.js")),l=(require("../../DataDisplays/Label/Label.js"),require("../../../_virtual/_tslib.js"),require("../../DataDisplays/SystemIcon/SystemIcon.js")),n=r.forwardRef(function(r,n){var o=r.leadingIcon,d=r.trailingIcon,c=r.text,p=r.children,y=r.onClick,m=r.isOpen,m=void 0!==m&&m,u=r.badgeCount,r=r.className,g=u&&0<Number(u),x=m||g;return e.jsxs(s,{ref:n,"data-testid":"design-system-filter-chip--outer-container",className:t.twMerge("relative w-fit",r),children:[e.jsxs(s,{"data-testid":"design-system-filter-chip",className:t.twMerge("relative flex w-full cursor-pointer select-none items-center gap-1 rounded-full border border-w-gray-200 bg-w-white px-[15px] py-1.5 hover:border-primary",m&&"border-primary",g&&"border-2 border-primary bg-primary-10 px-[14px] py-[5px]"),onClick:y,children:[o&&e.jsx(l,{testId:"design-system-filter-chip--leading-icon",name:o,className:t.twMerge("text-w-gray-900",x&&"text-primary")}),e.jsx(a,{variant:"body1",className:t.twMerge("text-w-gray-900",x&&"text-primary"),children:c}),d&&e.jsx(l,{testId:"design-system-filter-chip--trailing-icon",name:d,className:t.twMerge("text-w-gray-400",x&&"text-primary")}),g&&e.jsx(i,{text:u,className:"-right-1 -top-1"})]}),m&&e.jsx(s,{"data-testid":"design-system-filter-chip--list",className:"absolute -bottom-2 left-0 z-40 translate-y-full transform transition-all",children:p})]})});n.displayName="FilterChip",module.exports=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./FilterChip.js");module.exports=e;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
+
export type FilterItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
};
|
|
2
7
|
export interface FilterListProps {
|
|
3
8
|
title: string;
|
|
4
9
|
buttonName: string;
|
|
5
|
-
data:
|
|
6
|
-
|
|
7
|
-
value: string;
|
|
8
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
-
}>;
|
|
10
|
+
data: FilterItem[];
|
|
11
|
+
className?: string;
|
|
10
12
|
selectedValues?: string[];
|
|
11
13
|
isAllSelected?: boolean;
|
|
12
14
|
onSelectAll?: () => void;
|
|
@@ -15,5 +17,44 @@ export interface FilterListProps {
|
|
|
15
17
|
isViewOnly?: boolean;
|
|
16
18
|
onSubmit?: () => void;
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 필터 목록을 표시하고 관리하는 컴포넌트입니다.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
*
|
|
25
|
+
* @param {object} props
|
|
26
|
+
* @param {string} props.title - 필터 목록의 제목
|
|
27
|
+
* @param {string} props.buttonName - 적용 버튼에 표시될 텍스트 (기본값: '적용하기')
|
|
28
|
+
* @param {FilterItem[]} props.data - 필터 항목 배열
|
|
29
|
+
* @param {string} [props.className] - 컴포넌트에 적용할 추가 클래스명
|
|
30
|
+
* @param {string[]} [props.selectedValues] - 선택된 필터 값들의 배열
|
|
31
|
+
* @param {boolean} [props.isAllSelected] - 전체 선택 여부
|
|
32
|
+
* @param {boolean} [props.isViewOnly] - 선택한 항목만 보기 모드 여부
|
|
33
|
+
* @param {() => void} [props.onSelectAll] - 전체 선택 버튼 클릭 시 호출될 함수
|
|
34
|
+
* @param {() => void} [props.onReset] - 초기화 버튼 클릭 시 호출될 함수
|
|
35
|
+
* @param {() => void} [props.onViewOnly] - 선택한 항목만 보기 토글 시 호출될 함수
|
|
36
|
+
* @param {() => void} [props.onSubmit] - 적용 버튼 클릭 시 호출될 함수
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* const filterItems: FilterItem[] = [
|
|
41
|
+
* {
|
|
42
|
+
* label: '카테고리 1',
|
|
43
|
+
* value: 'category1',
|
|
44
|
+
* onChange: (e) => console.log(e.target.checked)
|
|
45
|
+
* }
|
|
46
|
+
* ];
|
|
47
|
+
*
|
|
48
|
+
* <FilterList
|
|
49
|
+
* title="필터"
|
|
50
|
+
* buttonName="적용하기"
|
|
51
|
+
* data={filterItems}
|
|
52
|
+
* selectedValues={['category1']}
|
|
53
|
+
* onSelectAll={() => {}}
|
|
54
|
+
* onReset={() => {}}
|
|
55
|
+
* onSubmit={() => {}}
|
|
56
|
+
* />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
declare const FilterList: ({ title, buttonName, onSelectAll, isAllSelected, isViewOnly, data, className, selectedValues, onReset, onViewOnly, onSubmit, }: FilterListProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
60
|
export default FilterList;
|