@wishket/design-system 1.17.2 → 1.17.3
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/README.md +13 -0
- package/dist/Components/Base/TextWithIcons/TextWithIcons.d.ts +10 -0
- package/dist/Components/Base/TextWithIcons/TextWithIcons.js +2 -0
- package/dist/Components/Base/TextWithIcons/index.d.ts +1 -0
- package/dist/Components/DataDisplays/Accordion/Accordion.d.ts +33 -0
- package/dist/Components/DataDisplays/Accordion/Accordion.js +58 -0
- package/dist/Components/DataDisplays/Accordion/index.d.ts +1 -0
- package/dist/Components/DataDisplays/index.d.ts +1 -0
- package/dist/Components/Feedbacks/MessageBar/MessageBar.js +5 -5
- package/dist/Components/Feedbacks/MessageBox/MessageBox.js +6 -6
- package/dist/Components/Feedbacks/MessageBox/MessageBox.parts.js +2 -2
- package/dist/Components/Feedbacks/SnackBar/SnackBar.js +10 -10
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.js +3 -3
- package/dist/Components/Inputs/Autocomplete/Autocomplete.js +1 -1
- package/dist/Components/Inputs/Button/Button.parts.js +1 -1
- package/dist/Components/Inputs/Calendar/Calendar.js +6 -6
- package/dist/Components/Inputs/Calendar/Calendar.parts.js +1 -1
- package/dist/Components/Inputs/Checkbox/Checkbox.js +5 -5
- package/dist/Components/Inputs/Checkbox/Checkbox.parts.d.ts +1 -1
- package/dist/Components/Inputs/Checkbox/Checkbox.parts.js +2 -4
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.d.ts +2 -2
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.js +6 -6
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.parts.js +2 -2
- package/dist/Components/Inputs/ChoiceChip/ChoiceChip.js +3 -3
- package/dist/Components/Inputs/CommentArea/CommentArea.js +9 -9
- package/dist/Components/Inputs/FilterChip/FilterChip.js +5 -5
- package/dist/Components/Inputs/FilterList/FilterList.js +5 -5
- package/dist/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +3 -3
- package/dist/Components/Inputs/Input/LabelInput.d.ts +9 -0
- package/dist/Components/Inputs/Input/{LableInput.js → LabelInput.js} +4 -4
- package/dist/Components/Inputs/Input/PasswordInput.js +1 -1
- package/dist/Components/Inputs/Input/index.d.ts +2 -2
- package/dist/Components/Inputs/InputChip/InputChip.js +3 -3
- package/dist/Components/Inputs/List/List.js +4 -4
- package/dist/Components/Inputs/Radio/Radio.d.ts +14 -8
- package/dist/Components/Inputs/Radio/Radio.js +20 -14
- package/dist/Components/Inputs/Radio/index.d.ts +1 -1
- package/dist/Components/Inputs/Radio/types.d.ts +8 -0
- package/dist/Components/Inputs/RadioCard/RadioCard.js +6 -6
- package/dist/Components/Inputs/RadioCard/RadioCard.parts.d.ts +3 -3
- package/dist/Components/Inputs/RadioCard/RadioCard.parts.js +4 -4
- package/dist/Components/Inputs/RadioCard/RadioCard.types.d.ts +8 -8
- package/dist/Components/Inputs/RadioGroup/RadioGroup.d.ts +3 -3
- package/dist/Components/Inputs/RadioGroup/RadioGroup.js +2 -2
- package/dist/Components/Inputs/RadioList/RadioList.d.ts +2 -2
- package/dist/Components/Inputs/RadioList/RadioList.js +2 -2
- package/dist/Components/Inputs/RadioList/RadioList.types.d.ts +3 -2
- package/dist/Components/Inputs/RadioList/parts/RadioListItem.d.ts +4 -7
- package/dist/Components/Inputs/RadioList/parts/RadioListItem.js +3 -3
- package/dist/Components/Inputs/SearchField/SearchField.js +4 -4
- package/dist/Components/Inputs/TextButton/TextButton.js +3 -4
- package/dist/Components/Inputs/TextButtonDropdown/TextButtonDropdown.parts.js +1 -1
- package/dist/Components/Inputs/TextField/TextField.d.ts +6 -6
- package/dist/Components/Inputs/TextField/TextField.js +7 -7
- package/dist/Components/Inputs/TextFieldContainer/TextFieldContainer.js +1 -1
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.js +3 -3
- package/dist/Components/Inputs/Textarea/Textarea.js +3 -3
- package/dist/Components/Navigations/GNBList/GNBList.parts.js +1 -1
- package/dist/Components/Navigations/Menu/Menu.js +3 -3
- package/dist/Components/Navigations/Pagination/Pagination.parts.js +1 -1
- package/dist/Components/Navigations/TextLink/TextLink.d.ts +66 -0
- package/dist/Components/Navigations/TextLink/TextLink.js +61 -0
- package/dist/Components/Navigations/TextLink/index.d.ts +1 -0
- package/dist/Components/Navigations/TextTab/TextTab.parts.js +5 -5
- package/dist/Components/Navigations/index.d.ts +1 -0
- package/dist/Components/Wrappers/WithBadge/WithBadge.js +2 -2
- package/dist/Components/Wrappers/WithRichTooltip/WithRichTooltip.js +3 -3
- package/dist/Components/Wrappers/WithSnackBar/WithSnackBar.js +1 -1
- package/dist/cjs/Components/Base/TextWithIcons/TextWithIcons.js +2 -0
- package/dist/cjs/Components/DataDisplays/Accordion/Accordion.js +58 -0
- package/dist/cjs/Components/Feedbacks/MessageBar/MessageBar.js +47 -5
- package/dist/cjs/Components/Feedbacks/MessageBox/MessageBox.js +38 -3
- package/dist/cjs/Components/Feedbacks/MessageBox/MessageBox.parts.js +1 -1
- package/dist/cjs/Components/Feedbacks/SnackBar/SnackBar.js +6 -6
- package/dist/cjs/Components/Inputs/AutoCompleteList/AutoCompleteList.js +1 -1
- package/dist/cjs/Components/Inputs/Autocomplete/Autocomplete.js +1 -1
- package/dist/cjs/Components/Inputs/Button/Button.parts.js +2 -2
- package/dist/cjs/Components/Inputs/Calendar/Calendar.js +5 -5
- package/dist/cjs/Components/Inputs/Calendar/Calendar.parts.js +1 -1
- package/dist/cjs/Components/Inputs/Checkbox/Checkbox.js +4 -4
- package/dist/cjs/Components/Inputs/Checkbox/Checkbox.parts.js +2 -4
- package/dist/cjs/Components/Inputs/CheckboxCard/CheckboxCard.js +4 -4
- package/dist/cjs/Components/Inputs/CheckboxCard/CheckboxCard.parts.js +4 -4
- package/dist/cjs/Components/Inputs/ChoiceChip/ChoiceChip.js +4 -4
- package/dist/cjs/Components/Inputs/CommentArea/CommentArea.js +8 -8
- package/dist/cjs/Components/Inputs/FilterChip/FilterChip.js +4 -3
- package/dist/cjs/Components/Inputs/FilterList/FilterList.js +1 -1
- package/dist/cjs/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +3 -3
- package/dist/cjs/Components/Inputs/Input/{LableInput.js → LabelInput.js} +4 -4
- package/dist/cjs/Components/Inputs/Input/PasswordInput.js +3 -3
- package/dist/cjs/Components/Inputs/InputChip/InputChip.js +2 -2
- package/dist/cjs/Components/Inputs/List/List.js +1 -1
- package/dist/cjs/Components/Inputs/Radio/Radio.js +21 -15
- package/dist/cjs/Components/Inputs/RadioCard/RadioCard.js +4 -4
- package/dist/cjs/Components/Inputs/RadioCard/RadioCard.parts.js +4 -4
- package/dist/cjs/Components/Inputs/RadioGroup/RadioGroup.js +3 -3
- package/dist/cjs/Components/Inputs/RadioList/RadioList.js +3 -3
- package/dist/cjs/Components/Inputs/RadioList/parts/RadioListItem.js +3 -3
- package/dist/cjs/Components/Inputs/SearchField/SearchField.js +4 -4
- package/dist/cjs/Components/Inputs/TextButton/TextButton.js +3 -4
- package/dist/cjs/Components/Inputs/TextButtonDropdown/TextButtonDropdown.parts.js +1 -1
- package/dist/cjs/Components/Inputs/TextField/TextField.js +7 -7
- package/dist/cjs/Components/Inputs/TextFieldContainer/TextFieldContainer.js +1 -1
- package/dist/cjs/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.js +1 -1
- package/dist/cjs/Components/Inputs/Textarea/Textarea.js +5 -5
- package/dist/cjs/Components/Navigations/GNBList/GNBList.parts.js +1 -1
- package/dist/cjs/Components/Navigations/Menu/Menu.js +2 -2
- package/dist/cjs/Components/Navigations/Pagination/Pagination.parts.js +1 -1
- package/dist/cjs/Components/Navigations/TextLink/TextLink.js +61 -0
- package/dist/cjs/Components/Navigations/TextTab/TextTab.parts.js +3 -3
- package/dist/cjs/Components/Wrappers/WithBadge/WithBadge.js +1 -1
- package/dist/cjs/Components/Wrappers/WithRichTooltip/WithRichTooltip.js +2 -2
- package/dist/cjs/Components/Wrappers/WithSnackBar/WithSnackBar.js +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/checkbox.types.d.ts +0 -2
- package/dist/types/index.d.ts +0 -1
- package/package.json +12 -12
- package/dist/Components/Inputs/Input/LableInput.d.ts +0 -9
- package/dist/Components/Inputs/Radio/Radio.types.d.ts +0 -8
- package/dist/types/radio.types.d.ts +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{forwardRef as r}from"react";import{twMerge as a}from"tailwind-merge";import{Typography as i}from"../../Base/Typography/Typography.js";import{Box as s}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SystemIcon as o}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{CountBadge as l}from"../../DataDisplays/CountBadge/CountBadge.js";import"../../DataDisplays/Accordion/Accordion.js";
|
|
2
2
|
/**
|
|
3
3
|
* 필터 선택 및 상태를 표시하는 칩 컴포넌트입니다.
|
|
4
4
|
*
|
|
@@ -42,7 +42,7 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r}from"re
|
|
|
42
42
|
* <MenuItem>오래된순</MenuItem>
|
|
43
43
|
* </DropdownMenu>
|
|
44
44
|
* </FilterChip>
|
|
45
|
-
*/const
|
|
46
|
-
return
|
|
47
|
-
/*#__PURE__*/
|
|
48
|
-
/*#__PURE__*/
|
|
45
|
+
*/const n=/*#__PURE__*/r((({leadingIcon:r,trailingIcon:n,text:m,children:p,onClick:c,isOpen:d=!1,badgeCount:y,className:g},f)=>{const x=y&&Number(y)>0,u=d||x;/*#__PURE__*/
|
|
46
|
+
return t(s,{ref:f,"data-testid":"design-system-filter-chip--outer-container",className:a("relative w-fit",g),children:[
|
|
47
|
+
/*#__PURE__*/t(s,{"data-testid":"design-system-filter-chip",className:a("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",d&&"border-primary",x&&"border-2 border-primary bg-primary-10 px-[14px] py-[5px]"),onClick:c,children:[r&&/*#__PURE__*/e(o,{testId:"design-system-filter-chip--leading-icon",name:r,className:a("text-w-gray-900",u&&"text-primary")}),
|
|
48
|
+
/*#__PURE__*/e(i,{variant:"body1",className:a("text-w-gray-900",u&&"text-primary"),children:m}),n&&/*#__PURE__*/e(o,{testId:"design-system-filter-chip--trailing-icon",name:n,className:a("text-w-gray-400",u&&"text-primary")}),x&&/*#__PURE__*/e(l,{text:y,className:"-right-1 -top-1"})]}),d&&p&&/*#__PURE__*/e(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";export{n as FilterChip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as l}from"tailwind-merge";import{Typography as s}from"../../Base/Typography/Typography.js";import{Box as a}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"react";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Divider as i}from"../../DataDisplays/Divider/Divider.js";import{Button as n}from"../Button/Button.js";import{Checkbox as o}from"../Checkbox/Checkbox.js";import{CheckboxListItem as r}from"../CheckboxListItem/CheckboxListItem.js";
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as l}from"tailwind-merge";import{Typography as s}from"../../Base/Typography/Typography.js";import{Box as a}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"react";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Divider as i}from"../../DataDisplays/Divider/Divider.js";import"../../DataDisplays/Accordion/Accordion.js";import{Button as n}from"../Button/Button.js";import{Checkbox as o}from"../Checkbox/Checkbox.js";import{CheckboxListItem as r}from"../CheckboxListItem/CheckboxListItem.js";
|
|
2
2
|
/**
|
|
3
3
|
* 필터 목록을 표시하고 관리하는 컴포넌트입니다.
|
|
4
4
|
*
|
|
@@ -39,13 +39,13 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as l}from"tailw
|
|
|
39
39
|
* onSubmit={() => {}}
|
|
40
40
|
* />
|
|
41
41
|
* ```
|
|
42
|
-
*/const c=({title:c,buttonName:m="적용하기",name:d,onSelectAll:
|
|
42
|
+
*/const c=({title:c,buttonName:m="적용하기",name:d,onSelectAll:p,isAllSelected:u,isViewOnly:f=!1,data:y,className:h,selectedValues:x,onReset:g,onViewOnly:b,onSubmit:w})=>{console.log("selectedValues: ",x);/*#__PURE__*/
|
|
43
43
|
return e(a,{"data-testid":"design-system-filter-list",className:l("w-full rounded-xl bg-w-white shadow-graymedium desktop:w-[360px]",h),children:[
|
|
44
44
|
/*#__PURE__*/e(a,{className:"flex flex-col gap-5 px-8 py-6",children:[
|
|
45
45
|
/*#__PURE__*/e(a,{className:"flex items-center justify-between",children:[
|
|
46
|
-
/*#__PURE__*/t(s,{variant:"subTitle2",className:"font-medium text-w-gray-900",children:c}),
|
|
47
|
-
/*#__PURE__*/t(o,{type:"sub",checked:
|
|
48
|
-
/*#__PURE__*/t(s,{variant:"body2",className:"text-w-gray-600",children:
|
|
46
|
+
/*#__PURE__*/t(s,{variant:"subTitle2",className:"font-medium text-w-gray-900",children:c}),p&&/*#__PURE__*/e("button",{"data-testid":"design-system-filter--select-all",className:"group flex w-fit items-center gap-1",onClick:e=>{e.preventDefault(),null==p||p()},children:[
|
|
47
|
+
/*#__PURE__*/t(o,{type:"sub",checked:u}),
|
|
48
|
+
/*#__PURE__*/t(s,{variant:"body2",className:"text-w-gray-600",children:u?"선택 해제":"전체 선택"})]})]}),
|
|
49
49
|
/*#__PURE__*/e(a,{className:"flex flex-col gap-4",children:[y.map((e=>{const{value:l,label:s,onChange:a}=e;/*#__PURE__*/
|
|
50
50
|
return t(r,{name:d,label:s,value:l,checked:null==x?void 0:x.includes(l),onChange:a},l)})),b&&/*#__PURE__*/t(r,{type:"circle",label:"선택한 카테고리만 보기",checked:f,onChange:b})]})]}),
|
|
51
51
|
/*#__PURE__*/t(i,{}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twJoin as o}from"tailwind-merge";import"react";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{IconButton as i}from"../IconButton/IconButton.js";import{List as n}from"../List/List.js";import{useDropdown as l}from"../../../hooks/useDropdown.js";
|
|
1
|
+
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twJoin as o}from"tailwind-merge";import"react";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"../../DataDisplays/Accordion/Accordion.js";import{IconButton as i}from"../IconButton/IconButton.js";import{List as n}from"../List/List.js";import{useDropdown as l}from"../../../hooks/useDropdown.js";
|
|
2
2
|
/**
|
|
3
3
|
* 아이콘 버튼과 드롭다운 목록을 결합한 컴포넌트입니다.
|
|
4
4
|
* 버튼 클릭 시 드롭다운 목록이 표시되며, 키보드 탐색이 가능합니다.
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
* align="right"
|
|
31
31
|
* />
|
|
32
32
|
* ```
|
|
33
|
-
*/const a=({icon:a,items:
|
|
33
|
+
*/const a=({icon:a,items:r,selectedItem:m,onItemClick:c,size:d="sm",align:p="left",disabled:u=!1})=>{const{isListOpen:y,ref:f,focusedIndex:I,handleItemClick:g,toggleListOpen:h,handleKeyDown:w}=l({items:r,onItemClick:c});/*#__PURE__*/
|
|
34
34
|
return e("div",{"data-testid":"design-system-icon-button-dropdown",className:"relative w-fit outline-none",ref:f,onKeyDown:w,tabIndex:0,children:[
|
|
35
|
-
/*#__PURE__*/t(i,{onClick:h,size:d,className:"outline-none",disabled:
|
|
35
|
+
/*#__PURE__*/t(i,{onClick:h,size:d,className:"outline-none",disabled:u,children:/*#__PURE__*/t(s,{name:a,className:o(u&&"text-w-gray-300")})}),y&&/*#__PURE__*/t("div",{"data-testid":"design-system-icon-button-dropdown--list-container",className:o("absolute -bottom-2 z-40 translate-y-full transform transition-all","right"===p?"right-0":"left-0 "),children:/*#__PURE__*/t(n.Root,{className:"max-h-full min-w-40 overflow-y-visible",children:r.map(((e,o)=>/*#__PURE__*/t(n.Item,{text:e.value,leadingIcon:e.leadingIcon,onClick:()=>g(e),selected:e.key===(null==m?void 0:m.key),isFocused:o===I},e.key)))})})]})};export{a as IconButtonDropdown};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface LabelInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
isFixed: boolean;
|
|
4
|
+
isFocused?: boolean;
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const LabelInput: import("react").ForwardRefExoticComponent<LabelInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export { LabelInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r}from"react";import{twMerge as o}from"tailwind-merge";import{Box as n}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{InputTypeSelector as i}from"./InputTypeSelector.js";function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){l(e,t,r[t])}))}return e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const c=/*#__PURE__*/r(((r,l)=>{var{isFixed:c,isFocused:u,isError:y,
|
|
2
|
-
return e(n,{className:"relative flex h-[42px] w-full flex-col gap-0.5 py-px","data-testid":"design-system--
|
|
3
|
-
/*#__PURE__*/t("div",{className:o("absolute tracking-default",y?"text-w-red-500":u?"text-primary-500":"text-w-gray-400 group-hover:text-primary-500",c?"typo-caption2":u||m?"scale-[0.6875] -translate-y-0.5 origin-top-left transition-transform duration-300":"typo-body1 transition-transform duration-300 translate-y-2 origin-top-left"),"data-testid":"design-system--
|
|
4
|
-
/*#__PURE__*/t(i,s(a({type:O},d),{ref:l,className:"pt-[14px]"}))]})}));c.displayName="
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r}from"react";import{twMerge as o}from"tailwind-merge";import{Box as n}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{InputTypeSelector as i}from"./InputTypeSelector.js";function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){l(e,t,r[t])}))}return e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const c=/*#__PURE__*/r(((r,l)=>{var{isFixed:c,isFocused:u,isError:y,label:f,placeholder:b,value:m,type:O}=r,d=p(r,["isFixed","isFocused","isError","label","placeholder","value","type"]);/*#__PURE__*/
|
|
2
|
+
return e(n,{className:"relative flex h-[42px] w-full flex-col gap-0.5 py-px","data-testid":"design-system--label-input",children:[
|
|
3
|
+
/*#__PURE__*/t("div",{className:o("absolute tracking-default",y?"text-w-red-500":u?"text-primary-500":"text-w-gray-400 group-hover:text-primary-500",c?"typo-caption2":u||m?"scale-[0.6875] -translate-y-0.5 origin-top-left transition-transform duration-300":"typo-body1 transition-transform duration-300 translate-y-2 origin-top-left"),"data-testid":"design-system--label-text",children:f}),
|
|
4
|
+
/*#__PURE__*/t(i,s(a({type:O},d),{ref:l,className:"pt-[14px]"}))]})}));c.displayName="LabelInput";export{c as LabelInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r,useState as n}from"react";import"tailwind-merge";import{SystemIcon as o}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Box as s}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{Input as c}from"./Input.js";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const u=/*#__PURE__*/r(((r,i)=>{var{type:u,disabled:y}=r,m=p(r,["type","disabled"]);const[f,b]=n(!1);/*#__PURE__*/
|
|
1
|
+
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r,useState as n}from"react";import"tailwind-merge";import{SystemIcon as o}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Box as s}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"../../DataDisplays/Accordion/Accordion.js";import{Input as c}from"./Input.js";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const u=/*#__PURE__*/r(((r,i)=>{var{type:u,disabled:y}=r,m=p(r,["type","disabled"]);const[f,b]=n(!1);/*#__PURE__*/
|
|
2
2
|
return e(s,{className:"flex w-full items-center gap-2","data-testid":"design-system--password-input",children:[
|
|
3
3
|
/*#__PURE__*/t(c,l(a({type:f?"text":"password",ref:i},m),{disabled:y})),
|
|
4
4
|
/*#__PURE__*/t("button",{onClick:e=>{e.preventDefault(),b((e=>!e))},disabled:y,className:y?"cursor-not-allowed":"cursor-pointer",type:"button",children:/*#__PURE__*/t(o,{name:f?"medium_eye_slash":"medium_eye",className:"text-w-gray-400"})})]})}));u.displayName="PasswordInput";export{u as PasswordInput};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Input } from './Input';
|
|
2
2
|
export { PasswordInput } from './PasswordInput';
|
|
3
|
-
export {
|
|
3
|
+
export { LabelInput } from './LabelInput';
|
|
4
4
|
export { InputTypeSelector } from './InputTypeSelector';
|
|
5
5
|
export type { InputProps } from './Input';
|
|
6
|
-
export type {
|
|
6
|
+
export type { LabelInputProps } from './LabelInput';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as s}from"tailwind-merge";import"react";import{SystemIcon as a}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Typography as
|
|
1
|
+
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as s}from"tailwind-merge";import"react";import{SystemIcon as a}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Typography as o}from"../../Base/Typography/Typography.js";import{Box as r}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"../../DataDisplays/Accordion/Accordion.js";
|
|
2
2
|
/**
|
|
3
3
|
* 삭제 가능한 칩(chip) 형태의 입력 컴포넌트입니다.
|
|
4
4
|
*
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
* 커스텀 스타일 태그
|
|
24
24
|
* </InputChip>
|
|
25
25
|
* ```
|
|
26
|
-
*/const i=({children:i,onDelete:l,className:n})=>/*#__PURE__*/e(
|
|
27
|
-
/*#__PURE__*/t(
|
|
26
|
+
*/const i=({children:i,onDelete:l,className:n})=>/*#__PURE__*/e(r,{"data-testid":"design-system-input-chip--container",className:s("flex h-6 w-fit max-w-[100px] select-none items-center gap-0.5 rounded-lg bg-w-gray-100 px-2 py-px",!!l&&"pl-2 pr-1.5",n),children:[
|
|
27
|
+
/*#__PURE__*/t(o,{variant:"body2",className:"h-6 w-full overflow-hidden text-ellipsis whitespace-nowrap break-all text-w-gray-600",children:i}),!!l&&/*#__PURE__*/t(r,{onClick:l,"data-testid":"design-system-input-chip--delete",children:/*#__PURE__*/t(a,{name:"small_delete",className:"cursor-pointer text-w-gray-400"})})]});export{i as InputChip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,useState as n,useLayoutEffect as
|
|
1
|
+
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,useState as n,useLayoutEffect as o}from"react";import{twMerge as l}from"tailwind-merge";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Typography as i}from"../../Base/Typography/Typography.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"../../DataDisplays/Accordion/Accordion.js";function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function m(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}
|
|
2
2
|
/**
|
|
3
3
|
* List.Root 컴포넌트는 목록의 컨테이너 역할을 합니다.
|
|
4
4
|
*
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @param {boolean} [props.disableScroll=false] - 스크롤 비활성화 여부
|
|
8
8
|
* @param {ReactNode} props.children - 목록 항목들
|
|
9
9
|
* @param {string} [props.className] - 추가 CSS 클래스
|
|
10
|
-
*/(e,t);if(Object.getOwnPropertySymbols){var
|
|
11
|
-
return e("li",m(a({className:
|
|
10
|
+
*/(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const p={Root:e=>{var{children:s,className:i,disableScroll:c=!1}=e,p=d(e,["children","className","disableScroll"]);const u=r(null),[y,b]=n(!1);return o((()=>{const e=u.current;if(!e)return;const{scrollHeight:t,clientHeight:r}=e;b(t>r)}),[]),/*#__PURE__*/t("ul",m(a({ref:u,"data-testid":"design-system-list",className:l("flex max-h-60 w-full min-w-[220px] flex-col rounded-xl bg-w-white p-2 shadow-graymedium",c?"max-h-full overflow-visible":"overflow-y-auto scrollbar-list",y&&!c&&"pr-0",i)},p),{children:s}))},Item:r=>{var{leadingIcon:n,text:o,selected:c=!1,disabled:p=!1,canceled:u=!1,children:y,className:b,isFocused:f=!1}=r,g=d(r,["leadingIcon","text","selected","disabled","canceled","children","className","isFocused"]);const O=l(c?"text-primary-500":"text-w-gray-600",u&&"text-w-red-500",p&&"text-w-gray-300");/*#__PURE__*/
|
|
11
|
+
return e("li",m(a({className:l("visible flex cursor-pointer select-none items-center gap-2 rounded-xl bg-w-white px-4 py-3",!p&&f&&"bg-primary-10",!p&&"hover:bg-primary-10",b)},g),{onClick:e=>{var t;p||null===(t=g.onClick)||void 0===t||t.call(g,e)},"data-testid":"design-system-list-item",children:[n&&/*#__PURE__*/t(s,{name:n,className:O,testId:"design-system-list-item-leading-icon"}),o&&/*#__PURE__*/t(i,{variant:"body1",className:O,"data-testid":"design-system-list-item-text",children:o}),y]}))}};
|
|
12
12
|
/**
|
|
13
13
|
* List.Item 컴포넌트는 개별 목록 항목을 표시합니다.
|
|
14
14
|
*
|
|
@@ -22,4 +22,4 @@ return e("li",m(a({className:o("visible flex cursor-pointer select-none items-ce
|
|
|
22
22
|
* @param {boolean} [props.isFocused=false] - 포커스 상태
|
|
23
23
|
* @param {ReactNode} props.children - 추가 컨텐츠
|
|
24
24
|
* @param {string} [props.className] - 추가 CSS 클래스
|
|
25
|
-
*/export{
|
|
25
|
+
*/export{p as List};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { RadioProps } from './
|
|
1
|
+
import { RadioProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* 사용자가 여러 옵션 중 하나를 선택할 수 있는 라디오 버튼 컴포넌트입니다.
|
|
4
4
|
*
|
|
5
5
|
* @component
|
|
6
6
|
* @param {Object} props
|
|
7
7
|
* @param {string} [props.value=''] - 라디오 버튼의 값
|
|
8
|
-
* @param {boolean} [props.
|
|
9
|
-
* @param {boolean} [props.
|
|
8
|
+
* @param {boolean} [props.checked=false] - 라디오 버튼의 선택 상태
|
|
9
|
+
* @param {boolean} [props.disabled=false] - 라디오 버튼의 비활성화 상태
|
|
10
10
|
* @param {boolean} [props.isError=false] - 라디오 버튼의 에러 상태
|
|
11
11
|
* @param {string} [props.className] - 추가적인 스타일링을 위한 클래스명
|
|
12
12
|
*
|
|
@@ -15,16 +15,22 @@ import { RadioProps } from './Radio.types';
|
|
|
15
15
|
* <Radio value="option1" />
|
|
16
16
|
*
|
|
17
17
|
* // 선택된 상태
|
|
18
|
-
* <Radio value="option2"
|
|
18
|
+
* <Radio value="option2" checked={true} />
|
|
19
19
|
*
|
|
20
20
|
* // 비활성화 상태
|
|
21
|
-
* <Radio value="option3"
|
|
21
|
+
* <Radio value="option3" disabled={true} />
|
|
22
22
|
*
|
|
23
23
|
* // 에러 상태
|
|
24
24
|
* <Radio value="option4" isError={true} />
|
|
25
25
|
*
|
|
26
|
-
* //
|
|
27
|
-
* <
|
|
26
|
+
* // react-hook-form 사용 예시
|
|
27
|
+
* <Controller
|
|
28
|
+
* control={control}
|
|
29
|
+
* name="name"
|
|
30
|
+
* render={({ field }) => (
|
|
31
|
+
* <Radio value="option5" checked={field.value === 'option5'} onChange={field.onChange} />
|
|
32
|
+
* )}
|
|
33
|
+
* />
|
|
28
34
|
*/
|
|
29
|
-
declare const Radio: import("react").ForwardRefExoticComponent<
|
|
35
|
+
declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
36
|
export { Radio };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use client";import{jsxs as
|
|
1
|
+
"use client";import{jsxs as r,jsx as e}from"react/jsx-runtime";import{twMerge as t}from"tailwind-merge";import{forwardRef as o}from"react";import{Box as i}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";function a(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function n(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})))),o.forEach((function(e){a(r,e,t[e])}))}return r}function l(r,e){if(null==r)return{};var t,o,i=function(r,e){if(null==r)return{};var t,o,i={},a=Object.keys(r);for(o=0;o<a.length;o++)t=a[o],e.indexOf(t)>=0||(i[t]=r[t]);return i}(r,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(o=0;o<a.length;o++)t=a[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}const s=({disabled:r,checked:o,isError:i})=>/*#__PURE__*/e("div",{className:t("relative box-border flex h-[18px] w-[18px] items-center justify-center rounded-full border p-[4px]",!r&&!i&&"group-focus-within:border-primary-500",
|
|
2
2
|
// 체크되었고 비활성화 상태의 경우
|
|
3
|
-
o&&
|
|
3
|
+
o&&r?"bg-w-white border-primary-100 cursor-not-allowed":
|
|
4
4
|
// 비활성화 상태의 경우
|
|
5
|
-
|
|
5
|
+
r?"bg-w-gray-50 border-w-gray-200 cursor-not-allowed":
|
|
6
6
|
// 활성화 상태에서 체크되었고 오류가 없는 경우
|
|
7
7
|
o&&!i?"bg-w-white border-primary-500":
|
|
8
8
|
// 활성화 상태에서 체크되었고 오류가 있는 경우
|
|
9
9
|
o&&i?"bg-w-white border-w-red-500":
|
|
10
10
|
// 활성화 상태에서 체크되지 않았고 오류가 있는 경우
|
|
11
|
-
!o&&i?"border-w-red-500":"bg-white border-w-gray-200 group-hover:border-primary-500 cursor-pointer"
|
|
12
|
-
return
|
|
13
|
-
/*#__PURE__*/
|
|
14
|
-
/*#__PURE__*/
|
|
11
|
+
!o&&i?"border-w-red-500":"bg-white border-w-gray-200 group-hover:border-primary-500 cursor-pointer"),role:"radio-button",children:/*#__PURE__*/e("div",{className:t("size-2 rounded-full bg-primary transition-all duration-100 ease-in-out",!o&&"h-0 w-0",i&&"bg-w-red-500",r&&"bg-w-gray-200",o&&r&&"bg-primary-100")})}),c=/*#__PURE__*/o(((o,a)=>{var{value:c="",checked:d=!1,disabled:u=!1,isError:b=!1,className:p}=o,m=l(o,["value","checked","disabled","isError","className"]);/*#__PURE__*/
|
|
12
|
+
return r(i,{"data-testid":"design-system-radio",className:t("group relative cursor-pointer",p),children:[
|
|
13
|
+
/*#__PURE__*/e("input",n({ref:a,type:"radio",className:"absolute inset-0 z-10 cursor-pointer opacity-0",value:c,checked:d,disabled:u},m)),
|
|
14
|
+
/*#__PURE__*/e(s,{checked:d,isError:b,disabled:u})]})}));
|
|
15
15
|
/**
|
|
16
16
|
* 사용자가 여러 옵션 중 하나를 선택할 수 있는 라디오 버튼 컴포넌트입니다.
|
|
17
17
|
*
|
|
18
18
|
* @component
|
|
19
19
|
* @param {Object} props
|
|
20
20
|
* @param {string} [props.value=''] - 라디오 버튼의 값
|
|
21
|
-
* @param {boolean} [props.
|
|
22
|
-
* @param {boolean} [props.
|
|
21
|
+
* @param {boolean} [props.checked=false] - 라디오 버튼의 선택 상태
|
|
22
|
+
* @param {boolean} [props.disabled=false] - 라디오 버튼의 비활성화 상태
|
|
23
23
|
* @param {boolean} [props.isError=false] - 라디오 버튼의 에러 상태
|
|
24
24
|
* @param {string} [props.className] - 추가적인 스타일링을 위한 클래스명
|
|
25
25
|
*
|
|
@@ -28,14 +28,20 @@ return e(i,{"data-testid":"design-system-radio",className:"group cursor-pointer"
|
|
|
28
28
|
* <Radio value="option1" />
|
|
29
29
|
*
|
|
30
30
|
* // 선택된 상태
|
|
31
|
-
* <Radio value="option2"
|
|
31
|
+
* <Radio value="option2" checked={true} />
|
|
32
32
|
*
|
|
33
33
|
* // 비활성화 상태
|
|
34
|
-
* <Radio value="option3"
|
|
34
|
+
* <Radio value="option3" disabled={true} />
|
|
35
35
|
*
|
|
36
36
|
* // 에러 상태
|
|
37
37
|
* <Radio value="option4" isError={true} />
|
|
38
38
|
*
|
|
39
|
-
* //
|
|
40
|
-
* <
|
|
41
|
-
|
|
39
|
+
* // react-hook-form 사용 예시
|
|
40
|
+
* <Controller
|
|
41
|
+
* control={control}
|
|
42
|
+
* name="name"
|
|
43
|
+
* render={({ field }) => (
|
|
44
|
+
* <Radio value="option5" checked={field.value === 'option5'} onChange={field.onChange} />
|
|
45
|
+
* )}
|
|
46
|
+
* />
|
|
47
|
+
*/c.displayName="Radio";export{c as Radio};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Radio } from './Radio';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";import{twMerge as a}from"tailwind-merge";import{Typography as
|
|
2
|
-
return e("label",{"data-testid":f,role:"radio-card",className:"group",children:/*#__PURE__*/t(
|
|
3
|
-
/*#__PURE__*/e(
|
|
4
|
-
/*#__PURE__*/t(o,{isWide:
|
|
5
|
-
/*#__PURE__*/e(
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";import{twMerge as a}from"tailwind-merge";import{Typography as r}from"../../Base/Typography/Typography.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{RadioCardContainer as i,StyledRadio as d,RadioCardIcon as s,TitleContainer as o}from"./RadioCard.parts.js";import{useRadioCard as n}from"./useRadioCard.js";const l=l=>{const{disabled:c=!1,checked:m=!1,isError:p=!1,onChange:h,isWide:g=!1,className:y,iconName:u,title:x,description:C,testId:f,value:b,name:B}=l,N=null!=u?u:g?null:"receipt",{handleChange:j}=n({checked:m,disabled:c,onChange:h});/*#__PURE__*/
|
|
2
|
+
return e("label",{"data-testid":f,role:"radio-card",className:"group",children:/*#__PURE__*/t(i,{"data-testid":"design-system-radioCard--container",checked:m,isError:p,isWide:g,disabled:c,className:y,children:[
|
|
3
|
+
/*#__PURE__*/e(d,{name:B,value:b,isWide:g,checked:m,onChange:j,isError:p,disabled:c}),N&&/*#__PURE__*/e(s,{iconName:N,checked:m,isError:p,disabled:c}),
|
|
4
|
+
/*#__PURE__*/t(o,{isWide:g,"data-testid":"design-system-radioCard--titleBox",children:[
|
|
5
|
+
/*#__PURE__*/e(r,{"data-testid":"design-system-radioCard--title",variant:"body1",className:a("font-medium",g?"text-left":"text-center",c?"text-w-gray-300":"text-w-gray-900"),children:x}),C&&/*#__PURE__*/e(r,{variant:"body2",className:a("font-normal",g?"text-left":"text-center",c?"text-w-gray-300":"text-w-gray-600"),"data-testid":"design-system-radioCard--description",children:C})]})]})})};
|
|
6
6
|
/**
|
|
7
7
|
* 라디오 카드 컴포넌트
|
|
8
8
|
*
|
|
@@ -46,4 +46,4 @@ return e("label",{"data-testid":f,role:"radio-card",className:"group",children:/
|
|
|
46
46
|
* description="내일 오전까지 배송"
|
|
47
47
|
* onChange={(checked) => console.log('선택됨:', checked)}
|
|
48
48
|
* />
|
|
49
|
-
*/export{
|
|
49
|
+
*/export{l as RadioCard};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RadioCardPartsProps, RadioCardIconProps, TitleContainerProps } from './RadioCard.types';
|
|
2
|
-
export declare const RadioCardContainer: ({ children, isWide,
|
|
2
|
+
export declare const RadioCardContainer: ({ children, isWide, checked, isError, disabled, className, ...rest }: RadioCardPartsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const TitleContainer: ({ isWide, children }: TitleContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const StyledRadio: ({ isWide,
|
|
5
|
-
export declare const RadioCardIcon: ({ iconName, disabled,
|
|
4
|
+
export declare const StyledRadio: ({ isWide, disabled, isError, checked, ...rest }: RadioCardPartsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const RadioCardIcon: ({ iconName, disabled, checked, isError, }: RadioCardIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{twMerge as r,twJoin as t}from"tailwind-merge";import"react";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{ProductIcon as
|
|
2
|
-
return e("div",
|
|
3
|
-
return e(
|
|
4
|
-
return e("div",{className:r("flex size-[60px] flex-shrink-0 items-center justify-center",
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{twMerge as r,twJoin as t}from"tailwind-merge";import"react";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{ProductIcon as o}from"../../DataDisplays/ProductIcon/ProductIcon.js";import"../../DataDisplays/Accordion/Accordion.js";import{Radio as i}from"../Radio/Radio.js";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){n(e,r,t[r])}))}return e}function s(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}function a(e,r){if(null==e)return{};var t,o,i=function(e,r){if(null==e)return{};var t,o,i={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}const l=t=>{var{children:o,isWide:i,checked:n,isError:l,disabled:d,className:p}=t,u=a(t,["children","isWide","checked","isError","disabled","className"]);/*#__PURE__*/
|
|
2
|
+
return e("div",s(c({className:r("relative flex h-auto cursor-pointer items-center gap-2 rounded-xl border",i?"min-h-[94px] w-[298px] flex-row gap-3 px-5 py-4":"min-h-fit w-[224px] flex-col justify-center px-4 py-6",!d&&!l&&"group-focus-within:border-primary-500",d&&n&&!l?"cursor-not-allowed border-primary-100":d?"cursor-not-allowed border-w-gray-200":l?"border-w-red-500":n?"border-primary-500":"border-w-gray-200 group-hover:border-primary",d?n&&!l?"bg-primary-10":"bg-w-gray-10":n?l?"bg-w-red-10":"bg-primary-10":"bg-w-white",p)},u),{children:o}))},d=({isWide:r,children:o})=>/*#__PURE__*/e("div",{className:t("flex h-auto w-full flex-col justify-between gap-0.5",r?"items-start":"items-center"),children:o}),p=t=>{var{isWide:o,disabled:n,isError:s,checked:l}=t,d=a(t,["isWide","disabled","isError","checked"]);const p=s&&l&&n;/*#__PURE__*/
|
|
3
|
+
return e(i,c({className:r(!o&&"absolute left-[17px] top-[17px]"),disabled:n||p,checked:!p&&l,isError:s},d))},u=({iconName:t,disabled:i,checked:n,isError:c})=>{const s=c||!n;/*#__PURE__*/
|
|
4
|
+
return e("div",{className:r("flex size-[60px] flex-shrink-0 items-center justify-center",i&&"opacity-30"),"data-testid":"design-system-radioCard--icon",children:/*#__PURE__*/e(o,{name:t,disabled:s})})};export{l as RadioCardContainer,u as RadioCardIcon,p as StyledRadio,d as TitleContainer};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { RadioStatus } from '
|
|
2
|
+
import { RadioProps, RadioStatus } from '../Radio/types';
|
|
3
3
|
import { ProductIconName } from '../../DataDisplays/ProductIcon/ProductIcon.types';
|
|
4
4
|
interface RadioCardBaseProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
testId?: string;
|
|
7
7
|
isWide?: boolean;
|
|
8
8
|
}
|
|
9
|
-
interface RadioCardMainProps extends RadioCardBaseProps,
|
|
9
|
+
interface RadioCardMainProps extends RadioCardBaseProps, RadioProps {
|
|
10
10
|
title: string;
|
|
11
11
|
description?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
value?: string;
|
|
14
12
|
name?: string;
|
|
13
|
+
disabled?: boolean;
|
|
15
14
|
}
|
|
16
15
|
interface NormalLayoutProps extends RadioCardMainProps {
|
|
17
16
|
isWide?: false;
|
|
@@ -22,17 +21,18 @@ interface WideLayoutProps extends RadioCardMainProps {
|
|
|
22
21
|
iconName?: ProductIconName;
|
|
23
22
|
}
|
|
24
23
|
export type RadioCardProps = NormalLayoutProps | WideLayoutProps;
|
|
25
|
-
export interface RadioCardPartsProps extends
|
|
24
|
+
export interface RadioCardPartsProps extends RadioProps, PropsWithChildren {
|
|
26
25
|
isWide?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
iconName?: ProductIconName;
|
|
27
28
|
}
|
|
28
29
|
interface RadioCardIconBaseProps {
|
|
29
30
|
iconName: ProductIconName;
|
|
30
31
|
}
|
|
31
32
|
export interface RadioCardIconProps extends RadioCardIconBaseProps, RadioStatus {
|
|
32
|
-
isSelected: boolean;
|
|
33
|
-
disabled?: boolean;
|
|
34
33
|
checked?: boolean;
|
|
35
|
-
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
isError?: boolean;
|
|
36
36
|
}
|
|
37
37
|
export interface TitleContainerProps extends PropsWithChildren {
|
|
38
38
|
isWide: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ChangeEvent } from 'react';
|
|
2
|
-
import { RadioStatus } from '
|
|
2
|
+
import { RadioStatus } from '../Radio/types';
|
|
3
3
|
export interface RadioItemProps extends RadioStatus {
|
|
4
4
|
label?: string;
|
|
5
5
|
value?: string;
|
|
@@ -15,7 +15,7 @@ export interface RadioGroupProps {
|
|
|
15
15
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
16
|
children: (item: RadioItemProps) => React.ReactNode;
|
|
17
17
|
isError?: boolean;
|
|
18
|
-
|
|
18
|
+
disabled?: boolean;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* 라디오 버튼 그룹을 구성하는 컴포넌트입니다.
|
|
@@ -54,5 +54,5 @@ export interface RadioGroupProps {
|
|
|
54
54
|
* </RadioGroup>
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
declare const RadioGroup: ({ data, selectedValue, children, onChange, isError,
|
|
57
|
+
declare const RadioGroup: ({ data, selectedValue, children, onChange, isError, disabled, }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
export { RadioGroup };
|
|
@@ -35,5 +35,5 @@ import{jsx as e,Fragment as r}from"react/jsx-runtime";import{Fragment as t}from"
|
|
|
35
35
|
* )}
|
|
36
36
|
* </RadioGroup>
|
|
37
37
|
* ```
|
|
38
|
-
*/const i=({data:n,selectedValue:i,children:a,onChange:l,isError:
|
|
39
|
-
return e(t,{children:a(c(o({},r),{onChange:l,isError:
|
|
38
|
+
*/const i=({data:n,selectedValue:i,children:a,onChange:l,isError:u,disabled:b})=>/*#__PURE__*/e(r,{children:n.map((r=>{const n=i===r.value;/*#__PURE__*/
|
|
39
|
+
return e(t,{children:a(c(o({},r),{onChange:l,isError:u,disabled:b,checked:n}))},r.value)}))});export{i as RadioGroup};
|
|
@@ -9,7 +9,7 @@ import { RadioListProps } from './RadioList.types';
|
|
|
9
9
|
* @param {string} [props.selectedValue] - 선택된 라디오 버튼의 값
|
|
10
10
|
* @param {string} [props.testId] - 테스트를 위한 ID
|
|
11
11
|
* @param {Function} props.onChange - 선택 변경 시 호출되는 콜백 함수
|
|
12
|
-
* @param {boolean} [props.
|
|
12
|
+
* @param {boolean} [props.disabled] - 비활성화 여부
|
|
13
13
|
* @param {boolean} [props.isError] - 에러 상태 여부
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
@@ -28,5 +28,5 @@ import { RadioListProps } from './RadioList.types';
|
|
|
28
28
|
* isError={false}
|
|
29
29
|
* />
|
|
30
30
|
*/
|
|
31
|
-
declare const RadioList: ({ data, name, className, selectedValue, testId, onChange,
|
|
31
|
+
declare const RadioList: ({ data, name, className, selectedValue, testId, onChange, disabled, isError, }: RadioListProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export { RadioList };
|
|
@@ -9,7 +9,7 @@ import{jsx as e}from"react/jsx-runtime";import{RadioGroup as r}from"../RadioGrou
|
|
|
9
9
|
* @param {string} [props.selectedValue] - 선택된 라디오 버튼의 값
|
|
10
10
|
* @param {string} [props.testId] - 테스트를 위한 ID
|
|
11
11
|
* @param {Function} props.onChange - 선택 변경 시 호출되는 콜백 함수
|
|
12
|
-
* @param {boolean} [props.
|
|
12
|
+
* @param {boolean} [props.disabled] - 비활성화 여부
|
|
13
13
|
* @param {boolean} [props.isError] - 에러 상태 여부
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
@@ -28,4 +28,4 @@ import{jsx as e}from"react/jsx-runtime";import{RadioGroup as r}from"../RadioGrou
|
|
|
28
28
|
* isError={false}
|
|
29
29
|
* />
|
|
30
30
|
*/
|
|
31
|
-
const a=({data:a,name:i,className:s,selectedValue:c,testId:l,onChange:m,
|
|
31
|
+
const a=({data:a,name:i,className:s,selectedValue:c,testId:l,onChange:m,disabled:u,isError:d})=>/*#__PURE__*/e(t,{className:s,testId:l,children:/*#__PURE__*/e(r,{name:i,data:a,selectedValue:c,onChange:m,disabled:u,isError:d,children:r=>/*#__PURE__*/e(o,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){n(e,r,t[r])}))}return e}({},r))})});export{a as RadioList};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface RadioListData extends
|
|
2
|
+
import { RadioProps } from '../Radio/types';
|
|
3
|
+
export interface RadioListData extends RadioProps {
|
|
4
|
+
key?: string;
|
|
4
5
|
label: string;
|
|
5
6
|
value?: string;
|
|
6
7
|
description?: string;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { RadioProps } from '../../Radio/types';
|
|
2
|
+
interface RadioListProps extends RadioProps {
|
|
3
|
+
key?: string;
|
|
4
4
|
label?: string;
|
|
5
|
-
name: string;
|
|
6
|
-
value?: string;
|
|
7
5
|
description?: string;
|
|
8
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
6
|
className?: string;
|
|
10
7
|
RadioClassName?: string;
|
|
11
8
|
}
|
|
12
|
-
declare const RadioListItem: ({ name, value, label, description,
|
|
9
|
+
declare const RadioListItem: ({ name, value, label, description, checked, disabled, isError, className, RadioClassName, onChange, }: RadioListProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
10
|
export { RadioListItem };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{twMerge as t}from"tailwind-merge";import{Typography as i}from"../../../Base/Typography/Typography.js";import{Box as a}from"../../../Base/Layouts/Box/Box.js";import"../../../Base/Layouts/FullBleed/FullBleed.js";import{Radio as n}from"../../Radio/Radio.js";function
|
|
2
|
-
return r("label",
|
|
3
|
-
/*#__PURE__*/r(a,{className:"flex cursor-pointer pt-1 grid-in-radio",children:/*#__PURE__*/r(n,{name:
|
|
1
|
+
"use client";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{twMerge as t}from"tailwind-merge";import{Typography as i}from"../../../Base/Typography/Typography.js";import{Box as a}from"../../../Base/Layouts/Box/Box.js";import"../../../Base/Layouts/FullBleed/FullBleed.js";import{Radio as n}from"../../Radio/Radio.js";function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function s(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}function l(e,r){if(null==e)return{};var t,i,a=function(e,r){if(null==e)return{};var t,i,a={},n=Object.keys(e);for(i=0;i<n.length;i++)t=n[i],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)t=n[i],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}const c=e=>{var{children:i,disabled:a,className:n,hasDescription:c}=e,d=l(e,["children","disabled","className","hasDescription"]);/*#__PURE__*/
|
|
2
|
+
return r("label",s(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(r){o(e,r,t[r])}))}return e}({className:t("grid h-min grid-cols-radio-list-item-container grid-rows-radio-list-item-container gap-x-3 grid-areas-radio-list-item-container",a?"cursor-not-allowed":"cursor-pointer",c?"gap-y-0.5":"gap-y-0",n)},d),{children:i}))},d=({name:o,value:s,label:l,description:d,checked:p,disabled:m=!1,isError:u=!1,className:y,RadioClassName:b,onChange:f})=>/*#__PURE__*/e(c,{"data-testid":"design-system-radioList--item",disabled:m,hasDescription:!!d,className:t("group",y),children:[
|
|
3
|
+
/*#__PURE__*/r(a,{className:"flex cursor-pointer pt-1 grid-in-radio",children:/*#__PURE__*/r(n,{name:o,value:s,checked:p,isError:u,disabled:m,onChange:f,className:b})}),
|
|
4
4
|
/*#__PURE__*/r(a,{className:"flex w-full items-center grid-in-label",children:/*#__PURE__*/r(i,{variant:"body1",className:t("w-full whitespace-normal break-words",m?"text-w-gray-300":"text-w-gray-900"),"data-testid":"design-system-radioList--item-label",children:l})}),d&&/*#__PURE__*/r(a,{className:"flex items-center grid-in-description",children:/*#__PURE__*/r(i,{variant:"body2",className:m?"text-w-gray-300":"text-w-gray-600","data-testid":"design-system-radioList--item-description",children:d})})]});export{d as RadioListItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r}from"react";import{twMerge as n}from"tailwind-merge";import{Box as o}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{TextButtonDropdown as
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r}from"react";import{twMerge as n}from"tailwind-merge";import{Box as o}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../DataDisplays/Accordion/Accordion.js";import{TextButtonDropdown as i}from"../TextButtonDropdown/TextButtonDropdown.js";import{TextFieldContainer as l}from"../TextFieldContainer/TextFieldContainer.js";import{Input as a}from"../Input/Input.js";import"../Input/PasswordInput.js";import"../Input/LabelInput.js";import"../Input/InputTypeSelector.js";function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function m(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}
|
|
2
2
|
/**
|
|
3
3
|
* 검색 필드 컴포넌트
|
|
4
4
|
*
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* ]
|
|
35
35
|
* }}
|
|
36
36
|
* />
|
|
37
|
-
*/(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const p=c=>{var{type:p,onSearch:d,className:f,disabled:b,spellCheck:y,onFocus:
|
|
38
|
-
return e("form",{onSubmit:e=>{e.preventDefault(),d()},"data-testid":"design-system-search-field",children:/*#__PURE__*/e("label",{className:"cursor-text",children:/*#__PURE__*/t(
|
|
39
|
-
/*#__PURE__*/e(a,u({onFocus:e=>{w(!0),null==
|
|
37
|
+
*/(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const p=c=>{var{type:p,onSearch:d,className:f,disabled:b,spellCheck:y,onFocus:j,onBlur:h,filters:O}=c,g=m(c,["type","onSearch","className","disabled","spellCheck","onFocus","onBlur","filters"]);const[I,w]=r(!1);/*#__PURE__*/
|
|
38
|
+
return e("form",{onSubmit:e=>{e.preventDefault(),d()},"data-testid":"design-system-search-field",children:/*#__PURE__*/e("label",{className:"cursor-text",children:/*#__PURE__*/t(l,{isFocused:I,isDisabled:b,className:"overflow-visible",children:[!!O&&/*#__PURE__*/e(o,{className:"shrink-0",children:/*#__PURE__*/e(i,u({disabled:b},O))}),
|
|
39
|
+
/*#__PURE__*/e(a,u({onFocus:e=>{w(!0),null==j||j(e)},onBlur:e=>{w(!1),null==h||h(e)},spellCheck:y||!1,disabled:b},g)),
|
|
40
40
|
/*#__PURE__*/e("button",{type:"submit",className:"shrink-0","data-testid":"design-system-search-field--submit-button",disabled:b,children:/*#__PURE__*/e(s,{testId:"design-system-search-field--submit-button-icon",name:"medium_search",className:n("pointer-events-none text-w-gray-600",b&&"text-w-gray-300")})})]})})})};export{p as SearchField};
|