maru_design2 2.31.1 → 3.1.0
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/CHANGELOG.md +59 -0
- package/dist/components/atoms/badge/Badge.d.ts +40 -3
- package/dist/components/atoms/button/Button.d.ts +18 -0
- package/dist/components/atoms/checkbox/Checkbox.d.ts +6 -2
- package/dist/components/atoms/chip/Chip.d.ts +36 -3
- package/dist/components/atoms/code/Code.d.ts +2 -1
- package/dist/components/atoms/icon/Icon.d.ts +5 -3
- package/dist/components/atoms/icon/iconmap.d.ts +4 -0
- package/dist/components/atoms/input/Input.d.ts +10 -0
- package/dist/components/atoms/popover/Popover.d.ts +1 -1
- package/dist/components/atoms/radio/Radio.d.ts +9 -5
- package/dist/components/atoms/radio/index.d.ts +1 -0
- package/dist/components/atoms/skeleton/Contents.d.ts +2 -1
- package/dist/components/atoms/skeleton/Skeleton.d.ts +2 -1
- package/dist/components/atoms/slider/Slider.d.ts +3 -5
- package/dist/components/atoms/toggle/Toggle.d.ts +8 -23
- package/dist/components/atoms/toggle/index.d.ts +1 -0
- package/dist/components/atoms/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/molecules/buttonGroup/ButtonGroup.d.ts +4 -4
- package/dist/components/molecules/calendar/Calendar.d.ts +40 -2
- package/dist/components/molecules/calendar/DatePickerHeader.d.ts +9 -1
- package/dist/components/molecules/calendar/DatePickerWrapper.d.ts +5 -6
- package/dist/components/molecules/calendar/calendar-utils.d.ts +11 -0
- package/dist/components/molecules/dropdown/Dropdown.d.ts +28 -3
- package/dist/components/molecules/dropdown/OverflowText.d.ts +5 -0
- package/dist/components/molecules/dropdown/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/menu/MenuItem.d.ts +5 -7
- package/dist/components/molecules/dropdown/menu/index.d.ts +13 -8
- package/dist/components/molecules/dropdown/toggleButton/Arrow.d.ts +5 -8
- package/dist/components/molecules/dropdown/toggleButton/Clear.d.ts +4 -5
- package/dist/components/molecules/dropdown/toggleButton/index.d.ts +16 -2
- package/dist/components/molecules/dropdown/types.d.ts +28 -0
- package/dist/components/molecules/inputWithAction/InputWithAction.d.ts +14 -0
- package/dist/components/molecules/inputWithAction/index.d.ts +1 -0
- package/dist/components/molecules/modal/Modal.d.ts +20 -2
- package/dist/components/molecules/multiSelectDropdown/MultiSelectDropdown.d.ts +19 -2
- package/dist/components/molecules/multiSelectDropdown/menu/MenuItem.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/menu/index.d.ts +10 -3
- package/dist/components/molecules/multiSelectDropdown/toggleButton/Arrow.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/Clear.d.ts +3 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/index.d.ts +10 -2
- package/dist/components/molecules/numberInput/NumberInput.d.ts +18 -0
- package/dist/components/molecules/numberInput/index.d.ts +1 -0
- package/dist/components/molecules/pagination/Pagination.d.ts +26 -15
- package/dist/components/molecules/searchInput/SearchInput.d.ts +1 -1
- package/dist/components/molecules/searchInput/filter/FilterPopover.d.ts +1 -1
- package/dist/components/molecules/searchInput/filter/index.d.ts +1 -1
- package/dist/components/molecules/table/Colgroup.d.ts +2 -1
- package/dist/components/molecules/table/Table.d.ts +2 -1
- package/dist/components/molecules/table/body/BinButtonTd.d.ts +2 -1
- package/dist/components/molecules/table/body/ChartButtonTd.d.ts +2 -1
- package/dist/components/molecules/table/body/CheckboxTd.d.ts +4 -1
- package/dist/components/molecules/table/body/EmptyTr.d.ts +1 -1
- package/dist/components/molecules/table/body/KebabMenuTd.d.ts +1 -1
- package/dist/components/molecules/table/body/RadioTd.d.ts +3 -1
- package/dist/components/molecules/table/body/Tr.d.ts +2 -1
- package/dist/components/molecules/table/body/index.d.ts +2 -1
- package/dist/components/molecules/table/header/FilterButtonsTh.d.ts +2 -1
- package/dist/components/molecules/table/header/FilterTh.d.ts +1 -1
- package/dist/components/molecules/table/header/SortableColumn.d.ts +2 -8
- package/dist/components/molecules/table/header/index.d.ts +3 -1
- package/dist/components/molecules/table/types.d.ts +15 -0
- package/dist/components/molecules/tabs/Tab.d.ts +12 -0
- package/dist/components/molecules/tabs/Tabs.d.ts +27 -0
- package/dist/components/molecules/tabs/TabsContext.d.ts +4 -0
- package/dist/components/molecules/tabs/index.d.ts +2 -0
- package/dist/components/molecules/tagInput/TagInput.d.ts +22 -0
- package/dist/components/molecules/tagInput/index.d.ts +2 -0
- package/dist/components/molecules/toast/Details.d.ts +3 -2
- package/dist/components/molecules/toast/DetailsItem.d.ts +6 -0
- package/dist/components/molecules/toast/Toast.d.ts +5 -21
- package/dist/components/molecules/toast/ToastContext.d.ts +2 -2
- package/dist/components/molecules/toast/ToastStyle.d.ts +4 -2
- package/dist/components/molecules/toast/index.d.ts +2 -0
- package/dist/components/molecules/toast/types.d.ts +1 -4
- package/dist/components/styleProvider/StyleProvider.d.ts +7 -3
- package/dist/constants/color.d.ts +676 -0
- package/dist/constants/figmaColor.d.ts +327 -0
- package/dist/constants/input.d.ts +2 -0
- package/dist/constants/toast.d.ts +2 -0
- package/dist/enums/color.d.ts +165 -6
- package/dist/enums/size.d.ts +6 -3
- package/dist/enums/variant.d.ts +7 -2
- package/dist/fonts.js +1 -1
- package/dist/hooks/useColor.d.ts +2 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +4385 -1750
- package/dist/types/color.d.ts +4 -0
- package/dist/types/input.d.ts +7 -0
- package/dist/types/radio.d.ts +12 -0
- package/dist/types/tabs.d.ts +12 -0
- package/dist/types/toast.d.ts +29 -0
- package/dist/types/toggle.d.ts +5 -0
- package/package.json +37 -8
- package/mise.toml +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.1.0](https://github.com/42maru-ai/maru-design2/compare/v3.0.2...v3.1.0) (2026-09-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add single-date calendar mode ([a996bd1](https://github.com/42maru-ai/maru-design2/commit/a996bd1f9e63d6e57d0f5ed343790a57c1bd39b7))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* :sparkles: Design System - UPDATE Figma 토큰과 컴포넌트 및 사용 가이드 ([acf9bf6](https://github.com/42maru-ai/maru-design2/commit/acf9bf6b47f43beca3bc6ddb4141347ee0f896a2))
|
|
14
|
+
* update component variants and harden calendar interactions ([c87cee0](https://github.com/42maru-ai/maru-design2/commit/c87cee0603d738a57e75e5f4666638d4c2518cbc))
|
|
15
|
+
|
|
16
|
+
## [3.0.2](https://github.com/42maru-ai/maru-design2/compare/v3.0.1...v3.0.2) (2026-07-27)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* restore package ESM configuration ([40b766d](https://github.com/42maru-ai/maru-design2/commit/40b766d3d70c5ed97d2695d5bcd7d5324d0074eb))
|
|
22
|
+
|
|
23
|
+
## [3.0.1](https://github.com/42maru-ai/maru-design2/compare/v3.0.0...v3.0.1) (2026-07-27)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* apply Pretendard globally in Storybook ([e30df92](https://github.com/42maru-ai/maru-design2/commit/e30df92466d50b1c32aad5da64411461338c4729))
|
|
29
|
+
* improve input styles and table filter ([94a4c57](https://github.com/42maru-ai/maru-design2/commit/94a4c573709b8a8fdffb3f255c0a097678ae218c))
|
|
30
|
+
* improve input styles and table filter ([fd8e0f8](https://github.com/42maru-ai/maru-design2/commit/fd8e0f82cf066b08c35f08c0e1aa0ca3d203aa5b))
|
|
31
|
+
* initialize table filter visibility ([52d35c3](https://github.com/42maru-ai/maru-design2/commit/52d35c3668d9ba7ccbe8a73322de21567d9103ee))
|
|
32
|
+
* keep table filter story empty ([33e35b8](https://github.com/42maru-ai/maru-design2/commit/33e35b885bc11baf3c40a249aba7dc227a3c9453))
|
|
33
|
+
* refine table header and toast details ([5992c77](https://github.com/42maru-ai/maru-design2/commit/5992c778a823e7fcf688bf99d4cc6e184c7ea08e))
|
|
34
|
+
|
|
35
|
+
## [3.0.0](https://github.com/42maru-ai/maru-design2/compare/v2.32.0...v3.0.0) (2026-07-24)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### ⚠ BREAKING CHANGES
|
|
39
|
+
|
|
40
|
+
* MaruDesign v3는 React 18과 ESM만 지원하며 React 17, CommonJS, 레거시 Badge 색상 및 Toggle API를 지원하지 않습니다.
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* MaruDesign v3 릴리즈 계약과 접근성 완성 ([20a44a0](https://github.com/42maru-ai/maru-design2/commit/20a44a04e03dc0a966796cdb08b5f266aea78b1e))
|
|
45
|
+
* update Badge and Chip for v3 sizes, icons, and states ([8723178](https://github.com/42maru-ai/maru-design2/commit/87231787052f9110bc22238ad8b3a2439454ab14))
|
|
46
|
+
* update Button for v3 variants, sizes, and custom icons ([2bb27b0](https://github.com/42maru-ai/maru-design2/commit/2bb27b0806005f674ef6f187589a4b5a18487f54))
|
|
47
|
+
* update design system components and add tabs ([dbbe235](https://github.com/42maru-ai/maru-design2/commit/dbbe235b770f9505124c1e6f10c02f619184181e))
|
|
48
|
+
* update Input for v3 and add related input molecules ([ab6df75](https://github.com/42maru-ai/maru-design2/commit/ab6df75cabd44008ce9f3111d82533c51b3abf76))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* align Button only-icon, Modal overlay, and TagInput with v3 ([389a89e](https://github.com/42maru-ai/maru-design2/commit/389a89e7fb50df659e6e6c209b7fc03e9a3a8254))
|
|
54
|
+
|
|
55
|
+
## [2.32.0](https://github.com/42maru-ai/maru-design2/compare/v2.31.1...v2.32.0) (2026-07-13)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
* improve table interaction states and styling ([1a3c242](https://github.com/42maru-ai/maru-design2/commit/1a3c2423357b820aa583f7fdf533845821f90dea))
|
|
61
|
+
|
|
3
62
|
## [2.31.1](https://github.com/42maru-ai/maru-design2/compare/v2.31.0...v2.31.1) (2026-03-19)
|
|
4
63
|
|
|
5
64
|
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { TBadgeSize } from '../../../enums/size';
|
|
2
3
|
import { TBadgeColor, TBadgeVariant } from '../../../enums/variant';
|
|
4
|
+
import { IconProps } from '../icon';
|
|
3
5
|
import './badge.scss';
|
|
4
6
|
export interface BadgeProps {
|
|
5
7
|
/**
|
|
6
|
-
* 컴포넌트에 들어갈
|
|
8
|
+
* 컴포넌트에 들어갈 내용.
|
|
9
|
+
* iconOnly(아이콘만)일 때는 생략할 수 있습니다.
|
|
7
10
|
*/
|
|
8
|
-
children
|
|
11
|
+
children?: React.ReactNode;
|
|
9
12
|
/**
|
|
10
13
|
* 배지 색상
|
|
11
14
|
*/
|
|
@@ -14,10 +17,44 @@ export interface BadgeProps {
|
|
|
14
17
|
* 배지 스타일 변형
|
|
15
18
|
*/
|
|
16
19
|
variant?: TBadgeVariant;
|
|
20
|
+
/**
|
|
21
|
+
* 사이즈. Figma sm/md/lg ↔ small/normal/large. 기본값 `normal`.
|
|
22
|
+
*/
|
|
23
|
+
size?: TBadgeSize;
|
|
17
24
|
className?: string;
|
|
18
25
|
/**
|
|
19
26
|
* 설정하면 X아이콘이 렌더링되고 클릭 이벤트가 할당됩니다.
|
|
20
27
|
*/
|
|
21
28
|
onXIconClick?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* 마루 Icon 시작 아이콘. `customStartIcon`과 함께 넘기면 custom이 우선입니다.
|
|
31
|
+
*/
|
|
32
|
+
startIcon?: IconProps;
|
|
33
|
+
/**
|
|
34
|
+
* 마루 Icon 끝 아이콘. `customEndIcon`과 함께 넘기면 custom이 우선입니다.
|
|
35
|
+
* `onXIconClick`이 있으면 X 버튼이 end 쪽에 렌더되고 이 prop은 무시됩니다.
|
|
36
|
+
*/
|
|
37
|
+
endIcon?: IconProps;
|
|
38
|
+
/**
|
|
39
|
+
* 마루 Icon 외 커스텀 시작 아이콘(Lucide 등). `startIcon`보다 우선합니다.
|
|
40
|
+
*/
|
|
41
|
+
customStartIcon?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* 마루 Icon 외 커스텀 끝 아이콘(Lucide 등). `endIcon`보다 우선합니다.
|
|
44
|
+
* `onXIconClick`이 있으면 무시됩니다.
|
|
45
|
+
*/
|
|
46
|
+
customEndIcon?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Figma `Icon=Dot`에 대응하는 상태점 표시 여부.
|
|
49
|
+
*/
|
|
50
|
+
showDot?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 비활성 상태. opacity 50% 적용.
|
|
53
|
+
*/
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* X 아이콘 버튼의 접근성 레이블.
|
|
57
|
+
*/
|
|
58
|
+
closeButtonAriaLabel?: string;
|
|
22
59
|
}
|
|
23
|
-
export declare function Badge({ children, color, variant, className, onXIconClick, }: BadgeProps):
|
|
60
|
+
export declare function Badge({ children, color, variant, size, className, onXIconClick, startIcon, endIcon, customStartIcon, customEndIcon, showDot, disabled, closeButtonAriaLabel, }: BadgeProps): React.JSX.Element;
|
|
@@ -15,19 +15,37 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
15
15
|
color?: TColor;
|
|
16
16
|
/**
|
|
17
17
|
* 사이즈 (@v1 kind)
|
|
18
|
+
* Figma `xxs`/`xs`/`sm`/`md`/`lg` ↔ `xxs`/`xs`/`small`/`normal`/`large`
|
|
19
|
+
* `xs`/`xxs`는 주로 icon-only용
|
|
20
|
+
* `comfortable-small`/`comfortable-normal`/`comfortable-large`는 같은 높이에 좌우 패딩 16px.
|
|
21
|
+
* 라벨이 있는 default/default-light/outline/text/round에 적용하며, 나머지는 대응 기본 크기를 사용합니다.
|
|
18
22
|
*/
|
|
19
23
|
size?: TButtonSize;
|
|
20
24
|
/**
|
|
21
25
|
* 모양 (@v1 kind)
|
|
26
|
+
* - `link` / `link-outline`: 컴팩트 텍스트·칩 (Round의 작은 버전이 아님)
|
|
27
|
+
* - `round`: pill shape 컨테이너
|
|
22
28
|
*/
|
|
23
29
|
variant?: TButtonVariant;
|
|
24
30
|
/**
|
|
25
31
|
* 컴포넌트 시작점에 위치시킬 아이콘 (@v1 icon)
|
|
32
|
+
* `customStartIcon`과 함께 넘기면 custom이 우선이며 개발 환경에서 console.warn을 출력합니다.
|
|
26
33
|
*/
|
|
27
34
|
startIcon?: IconProps;
|
|
28
35
|
/**
|
|
29
36
|
* 컴포넌트 끝점에 위치시킬 아이콘 (@v1 icon)
|
|
37
|
+
* `customEndIcon`과 함께 넘기면 custom이 우선이며 개발 환경에서 console.warn을 출력합니다.
|
|
30
38
|
*/
|
|
31
39
|
endIcon?: IconProps;
|
|
40
|
+
/**
|
|
41
|
+
* 마루 Icon 외 커스텀 시작 아이콘 노드
|
|
42
|
+
* `startIcon`보다 우선합니다. 함께 넘기면 개발 환경에서 console.warn을 출력합니다.
|
|
43
|
+
*/
|
|
44
|
+
customStartIcon?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* 마루 Icon 외 커스텀 끝 아이콘 노드
|
|
47
|
+
* `endIcon`보다 우선합니다. 함께 넘기면 개발 환경에서 console.warn을 출력합니다.
|
|
48
|
+
*/
|
|
49
|
+
customEndIcon?: React.ReactNode;
|
|
32
50
|
}
|
|
33
51
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { TColorValue } from '../../../types/color';
|
|
2
3
|
import { TGap } from '../../../enums/gap';
|
|
3
4
|
import { TCheckboxSize } from '../../../enums/size';
|
|
4
5
|
import './checkbox.scss';
|
|
5
6
|
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'type'> {
|
|
6
7
|
checked?: boolean;
|
|
8
|
+
/** 부분 선택 상태. 네이티브 input의 indeterminate에도 반영합니다. */
|
|
9
|
+
indeterminate?: boolean;
|
|
7
10
|
label?: string;
|
|
11
|
+
labelPosition?: 'left' | 'right';
|
|
8
12
|
/**
|
|
9
13
|
* (@v1 variant)
|
|
10
14
|
*/
|
|
11
|
-
color?:
|
|
15
|
+
color?: TColorValue;
|
|
12
16
|
/**
|
|
13
17
|
* 컴포넌트와 라벨 사이의 거리
|
|
14
18
|
*/
|
|
15
19
|
gap?: TGap;
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
21
|
+
* Figma sm: 16, md: 20. 기존 18, 24도 지원합니다.
|
|
18
22
|
*/
|
|
19
23
|
size?: TCheckboxSize;
|
|
20
24
|
}
|
|
@@ -2,18 +2,21 @@ import React from 'react';
|
|
|
2
2
|
import { TColor } from '../../../enums/color';
|
|
3
3
|
import { TChipSize } from '../../../enums/size';
|
|
4
4
|
import { TChipVariant } from '../../../enums/variant';
|
|
5
|
+
import { IconProps } from '../icon';
|
|
5
6
|
import './chip.scss';
|
|
6
7
|
export interface ChipProps {
|
|
7
8
|
/**
|
|
8
|
-
* 컴포넌트에 들어갈 내용. number인 경우 천의 자리마다 컴마(,)
|
|
9
|
+
* 컴포넌트에 들어갈 내용. number인 경우 천의 자리마다 컴마(,) 표시됨.
|
|
10
|
+
* iconOnly(아이콘만)일 때는 생략할 수 있습니다.
|
|
9
11
|
*/
|
|
10
|
-
children
|
|
12
|
+
children?: React.ReactNode | string | number;
|
|
11
13
|
/**
|
|
12
14
|
* (@v1 variant)
|
|
13
15
|
*/
|
|
14
16
|
color?: TColor;
|
|
15
17
|
/**
|
|
16
18
|
* (@v1 kind)
|
|
19
|
+
* Figma sm/md/lg ↔ small/normal/large
|
|
17
20
|
*/
|
|
18
21
|
size?: TChipSize;
|
|
19
22
|
/**
|
|
@@ -25,5 +28,35 @@ export interface ChipProps {
|
|
|
25
28
|
* 설정하면 X아이콘 생기며, 해당 아이콘에 클릭 이벤트를 할당함.
|
|
26
29
|
*/
|
|
27
30
|
onXIconClick?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 마루 Icon 시작 아이콘. `customStartIcon`과 함께 넘기면 custom이 우선입니다.
|
|
33
|
+
*/
|
|
34
|
+
startIcon?: IconProps;
|
|
35
|
+
/**
|
|
36
|
+
* 마루 Icon 끝 아이콘. `customEndIcon`과 함께 넘기면 custom이 우선입니다.
|
|
37
|
+
* `onXIconClick`이 있으면 X 버튼이 end 쪽에 렌더되고 이 prop은 무시됩니다.
|
|
38
|
+
*/
|
|
39
|
+
endIcon?: IconProps;
|
|
40
|
+
/**
|
|
41
|
+
* 마루 Icon 외 커스텀 시작 아이콘(Lucide 등). `startIcon`보다 우선합니다.
|
|
42
|
+
*/
|
|
43
|
+
customStartIcon?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* 마루 Icon 외 커스텀 끝 아이콘(Lucide 등). `endIcon`보다 우선합니다.
|
|
46
|
+
* `onXIconClick`이 있으면 무시됩니다.
|
|
47
|
+
*/
|
|
48
|
+
customEndIcon?: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Figma `Icon=Dot`에 대응하는 상태점 표시 여부.
|
|
51
|
+
*/
|
|
52
|
+
showDot?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 비활성 상태. opacity 50% 적용.
|
|
55
|
+
*/
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* X 아이콘 버튼의 접근성 레이블.
|
|
59
|
+
*/
|
|
60
|
+
closeButtonAriaLabel?: string;
|
|
28
61
|
}
|
|
29
|
-
export declare function Chip({ children, color, size, variant, className, onXIconClick, }: ChipProps):
|
|
62
|
+
export declare function Chip({ children, color, size, variant, className, onXIconClick, startIcon, endIcon, customStartIcon, customEndIcon, showDot, disabled, closeButtonAriaLabel, }: ChipProps): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import 'highlight.js/styles/a11y-light.css';
|
|
2
3
|
import './code.scss';
|
|
3
4
|
export interface CodeProps {
|
|
4
5
|
value: string;
|
|
5
6
|
copyable?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function Code({ value, copyable }: CodeProps):
|
|
8
|
+
export declare function Code({ value, copyable }: CodeProps): React.JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TColorValue } from '../../../types/color';
|
|
1
3
|
import { TIcons } from './iconmap';
|
|
2
4
|
export interface IconProps {
|
|
3
5
|
/**
|
|
@@ -7,10 +9,10 @@ export interface IconProps {
|
|
|
7
9
|
/**
|
|
8
10
|
* primary, secondary, positive, warning, danger + rgb. (@v1 fill)
|
|
9
11
|
*/
|
|
10
|
-
color?:
|
|
12
|
+
color?: TColorValue;
|
|
11
13
|
/**
|
|
12
14
|
* primary, secondary, positive, warning, danger + rgb. (@v1 fill)
|
|
13
15
|
*/
|
|
14
|
-
hoverColor?:
|
|
16
|
+
hoverColor?: TColorValue;
|
|
15
17
|
}
|
|
16
|
-
export declare function Icon({ name, color, hoverColor }: IconProps):
|
|
18
|
+
export declare function Icon({ name, color, hoverColor }: IconProps): React.JSX.Element;
|
|
@@ -45,6 +45,7 @@ export declare const ICONS: {
|
|
|
45
45
|
readonly AlertTriangle_s1615: "AlertTriangle_s1615";
|
|
46
46
|
readonly ArrowCross_s1613: "ArrowCross_s1613";
|
|
47
47
|
readonly ArrowDownCircle_s1413: "ArrowDownCircle_s1413";
|
|
48
|
+
readonly ArrowDown_s1215: "ArrowDown_s1215";
|
|
48
49
|
readonly ArrowLeftIn_s1613: "ArrowLeftIn_s1613";
|
|
49
50
|
readonly ArrowLeftOut_s1810: "ArrowLeftOut_s1810";
|
|
50
51
|
readonly ArrowLeft_s1613: "ArrowLeft_s1613";
|
|
@@ -56,6 +57,7 @@ export declare const ICONS: {
|
|
|
56
57
|
readonly ArrowRight_s1613: "ArrowRight_s1613";
|
|
57
58
|
readonly ArrowRight_s1813: "ArrowRight_s1813";
|
|
58
59
|
readonly ArrowRight_s2420: "ArrowRight_s2420";
|
|
60
|
+
readonly ArrowUp_s1215: "ArrowUp_s1215";
|
|
59
61
|
readonly Atom01_s1615: "Atom01_s1615";
|
|
60
62
|
readonly BackToLines_s1615: "BackToLines_s1615";
|
|
61
63
|
readonly BagSetting_s2415: "BagSetting_s2415";
|
|
@@ -118,6 +120,7 @@ export declare const ICONS: {
|
|
|
118
120
|
readonly ChevronRight_s1615: "ChevronRight_s1615";
|
|
119
121
|
readonly ChevronRight_s2020: "ChevronRight_s2020";
|
|
120
122
|
readonly ChevronRight_s2420: "ChevronRight_s2420";
|
|
123
|
+
readonly ChevronSelectorVertical_s1215: "ChevronSelectorVertical_s1215";
|
|
121
124
|
readonly ChevronSelectorVertical_s2020: "ChevronSelectorVertical_s2020";
|
|
122
125
|
readonly ChevronUp_s1613: "ChevronUp_s1613";
|
|
123
126
|
readonly ChevronUp_s1615: "ChevronUp_s1615";
|
|
@@ -318,6 +321,7 @@ export declare const ICONS: {
|
|
|
318
321
|
readonly PlusDownLines_s1413: "PlusDownLines_s1413";
|
|
319
322
|
readonly PlusLines_s1210: "PlusLines_s1210";
|
|
320
323
|
readonly PlusUpLines_s1413: "PlusUpLines_s1413";
|
|
324
|
+
readonly Plus_s1210: "Plus_s1210";
|
|
321
325
|
readonly Plus_s1610: "Plus_s1610";
|
|
322
326
|
readonly PreviewEye_s1413: "PreviewEye_s1413";
|
|
323
327
|
readonly PreviewLine_s2013: "PreviewLine_s2013";
|
|
@@ -10,6 +10,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
10
10
|
message?: string;
|
|
11
11
|
};
|
|
12
12
|
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 인풋 하단에 표시할 도움말
|
|
15
|
+
*/
|
|
16
|
+
helperText?: React.ReactNode;
|
|
13
17
|
/**
|
|
14
18
|
* 데이터 타입
|
|
15
19
|
*/
|
|
@@ -22,6 +26,8 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
22
26
|
* 초기화 버튼 숨기기
|
|
23
27
|
*/
|
|
24
28
|
hiddenClearButton?: boolean;
|
|
29
|
+
/** 초기화 버튼의 번역된 접근성 이름 */
|
|
30
|
+
clearAriaLabel?: string;
|
|
25
31
|
/**
|
|
26
32
|
* input을 감싸고 있는 div의 ref, input은 일반 ref 사용
|
|
27
33
|
*/
|
|
@@ -39,5 +45,9 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
39
45
|
* true이면 placeholder가 없어지지 않음
|
|
40
46
|
*/
|
|
41
47
|
persistentPlaceholder?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 입력값에서 feature highlight 색상으로 강조할 문자열
|
|
50
|
+
*/
|
|
51
|
+
highlightText?: string;
|
|
42
52
|
}
|
|
43
53
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -16,4 +16,4 @@ export interface PopoverProps {
|
|
|
16
16
|
portal?: boolean;
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare function Popover({ anchorEl, children, open, className, direction, onClose, portal, }: PopoverProps):
|
|
19
|
+
export declare function Popover({ anchorEl, children, open, className, direction, onClose, portal, }: PopoverProps): React.JSX.Element | null;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { TRadioGap, TRadioSize } from '../../../types/radio';
|
|
2
3
|
import { TRadioColor } from '../../../enums/color';
|
|
3
|
-
import { TGap } from '../../../enums/gap';
|
|
4
4
|
import './radio.scss';
|
|
5
|
-
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'type'> {
|
|
5
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'size' | 'type'> {
|
|
6
6
|
/**
|
|
7
7
|
* 라디오 토글의 값
|
|
8
8
|
*/
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* 메인 테마색, 기존 회색 ['default']
|
|
12
12
|
*/
|
|
13
13
|
color?: TRadioColor;
|
|
14
14
|
/**
|
|
15
|
-
* 컴포넌트와 라벨 사이의 거리. ['8px', '4px', '2px']
|
|
15
|
+
* 컴포넌트와 라벨 사이의 거리. ['8px', '6px', '4px', '2px']
|
|
16
16
|
*/
|
|
17
|
-
gap?:
|
|
17
|
+
gap?: TRadioGap;
|
|
18
18
|
/**
|
|
19
19
|
* 라디오 버튼 옆 문자 내용
|
|
20
20
|
*/
|
|
21
21
|
label?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 라디오 버튼 크기
|
|
24
|
+
*/
|
|
25
|
+
size?: TRadioSize;
|
|
22
26
|
}
|
|
23
27
|
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function Contents(): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TSkeletonVariant } from '../../../enums/variant';
|
|
2
3
|
import './skeleton.scss';
|
|
3
4
|
export interface SkeletonProps {
|
|
4
5
|
variant: TSkeletonVariant;
|
|
5
6
|
}
|
|
6
|
-
export declare function Skeleton({ variant }: SkeletonProps):
|
|
7
|
+
export declare function Skeleton({ variant }: SkeletonProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TColor } from '../../../enums/color';
|
|
2
3
|
import './slider.scss';
|
|
3
4
|
export interface SliderProps {
|
|
@@ -26,13 +27,10 @@ export interface SliderProps {
|
|
|
26
27
|
*/
|
|
27
28
|
step?: number;
|
|
28
29
|
/**
|
|
29
|
-
* 값 표시 여부
|
|
30
|
+
* 포인터 위에 현재 값 표시 여부
|
|
30
31
|
*/
|
|
31
32
|
showValue?: boolean;
|
|
32
33
|
disabled?: boolean;
|
|
33
34
|
className?: string;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
* showValue에 관한 글: showValue가 true면 기존 input에 있는 thumb를 숨기고 custom thumb를 보여준다.
|
|
37
|
-
*/
|
|
38
|
-
export declare function Slider({ value, onChange, color, min, max, step, showValue, disabled, className, }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function Slider({ value, onChange, color, min, max, step, showValue, disabled, className, }: SliderProps): React.JSX.Element;
|
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TToggleSize } from '../../../types/toggle';
|
|
2
3
|
import './toggle.scss';
|
|
3
|
-
export interface ToggleProps {
|
|
4
|
+
export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'onChange' | 'size' | 'type'> {
|
|
4
5
|
checked: boolean;
|
|
5
6
|
onChange: (checked: boolean) => void;
|
|
6
|
-
className?: string;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 토글 오른쪽에 표시할 텍스트
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
text?: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 토글 크기
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 텍스트가 있는 토글.
|
|
17
|
-
*/
|
|
18
|
-
text?: {
|
|
19
|
-
left?: string;
|
|
20
|
-
right?: string;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* 토글 아이콘 표시 여부
|
|
24
|
-
*/
|
|
25
|
-
showIcon?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* 토글 크기 배율 (기본값: 1)
|
|
28
|
-
*/
|
|
29
|
-
scale?: number;
|
|
14
|
+
size?: TToggleSize;
|
|
30
15
|
}
|
|
31
|
-
export declare function Toggle({ checked, onChange, className,
|
|
16
|
+
export declare function Toggle({ checked, onChange, className, disabled, text, size, ...props }: ToggleProps): React.JSX.Element;
|
|
@@ -26,4 +26,4 @@ export interface TooltipProps {
|
|
|
26
26
|
*/
|
|
27
27
|
gap?: TTooltipGap;
|
|
28
28
|
}
|
|
29
|
-
export declare function Tooltip({ children, content, className, hidden, direction, portal, gap, }: TooltipProps):
|
|
29
|
+
export declare function Tooltip({ children, content, className, hidden, direction, portal, gap, }: TooltipProps): React.JSX.Element;
|
|
@@ -37,14 +37,14 @@ export interface ButtonGroupProps<T extends string> {
|
|
|
37
37
|
buttons: ButtonGroupButton<T>[];
|
|
38
38
|
/**
|
|
39
39
|
* 스타일 타입
|
|
40
|
-
* - segmented:
|
|
41
|
-
* - segmented-secondary:
|
|
40
|
+
* - segmented: 간격 없이 연결된 아웃라인 버튼, 선택 시 브랜드 배경 (기본값).
|
|
41
|
+
* - segmented-secondary: 회색 래퍼 안에 간격을 두고 배치,
|
|
42
42
|
* 선택된 버튼이 흰색 배경 + primary색 텍스트 컬러.
|
|
43
43
|
* - icon: 아웃라인 버튼 안에 간격없이 붙어있는 형태.
|
|
44
44
|
*/
|
|
45
45
|
variant?: 'segmented' | 'segmented-secondary' | 'icon';
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* 사이즈. segmented 기준 sm: 36px (Figma 기본), md: 40px.
|
|
48
48
|
*/
|
|
49
49
|
size?: 'sm' | 'md';
|
|
50
50
|
/**
|
|
@@ -53,4 +53,4 @@ export interface ButtonGroupProps<T extends string> {
|
|
|
53
53
|
disabled?: boolean;
|
|
54
54
|
className?: string;
|
|
55
55
|
}
|
|
56
|
-
export declare function ButtonGroup<T extends string>({ value, onChange, buttons, variant, size, disabled, className, }: ButtonGroupProps<T>):
|
|
56
|
+
export declare function ButtonGroup<T extends string>({ value, onChange, buttons, variant, size, disabled, className, }: ButtonGroupProps<T>): React.JSX.Element;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './calendar.scss';
|
|
3
|
+
export type CalendarMode = 'range' | 'single';
|
|
4
|
+
export interface CalendarTimeValue {
|
|
5
|
+
/** 시간 설정이 켜져 있으면 HH:mm, 꺼져 있으면 undefined */
|
|
6
|
+
startTime?: string;
|
|
7
|
+
/** 기간 선택의 종료 시간 (HH:mm) */
|
|
8
|
+
endTime?: string;
|
|
9
|
+
}
|
|
3
10
|
export interface CalendarProps {
|
|
4
11
|
/**
|
|
5
12
|
* Maru Datepicker를 띄울 대상이 되는 컴포넌트. setOpen을 변수로 전달해서 외부에서 datepicker를 띄울 수 있도록 설정
|
|
@@ -15,13 +22,44 @@ export interface CalendarProps {
|
|
|
15
22
|
* @example minStartDate를 오늘 날짜로 지정하면 시작일 지정은 오늘 날짜부터 가능
|
|
16
23
|
*/
|
|
17
24
|
minStartDate?: Date | null;
|
|
25
|
+
/**
|
|
26
|
+
* 날짜 선택 방식
|
|
27
|
+
* @default 'range'
|
|
28
|
+
*/
|
|
29
|
+
mode?: CalendarMode;
|
|
30
|
+
/** 선택 가능한 마지막 날짜. 날짜 단위로 제한합니다. */
|
|
31
|
+
maxDate?: Date | null;
|
|
32
|
+
/** 동시에 표시할 월 수. 기본값 1 */
|
|
33
|
+
monthsToShow?: 1 | 2;
|
|
34
|
+
/** 연·월 선택 드롭다운 표시. 기본값 false */
|
|
35
|
+
showMonthYearDropdown?: boolean;
|
|
36
|
+
/** 시간 설정 토글과 시간 선택 표시. 기본값 false */
|
|
37
|
+
showTime?: boolean;
|
|
38
|
+
/** 시간 선택을 필수로 설정합니다. true이면 showTime과 무관하게 시간 UI를 표시하고 끌 수 없게 합니다. 기본값 false */
|
|
39
|
+
timeRequired?: boolean;
|
|
40
|
+
/** 확인 시 실행하는 동기 검증. 오류 문구를 반환하면 표시하고 저장을 막으며, undefined 또는 빈 문자열이면 허용합니다. */
|
|
41
|
+
validate?: (startDate?: string, endDate?: string, time?: CalendarTimeValue) => string | undefined;
|
|
42
|
+
/** 오늘·최근 7/30/90일·이전 3개 연도 프리셋 표시. range에서만 적용됩니다. */
|
|
43
|
+
showPresets?: boolean;
|
|
44
|
+
/** 하단 날짜 직접 입력 표시. 기본값 true */
|
|
45
|
+
showDateInputs?: boolean;
|
|
46
|
+
/** 취소 버튼 표시. 기본값 false */
|
|
47
|
+
showCancelButton?: boolean;
|
|
48
|
+
/** 취소 버튼 문구. 기본값 취소 */
|
|
49
|
+
cancelButtonContent?: string;
|
|
50
|
+
/** 열 때 선택할 시작 날짜. 저장한 값을 넘기면 다시 열 때 복원됩니다. */
|
|
51
|
+
startDate?: Date | null;
|
|
52
|
+
/** 열 때 선택할 종료 날짜. single에서는 무시합니다. */
|
|
53
|
+
endDate?: Date | null;
|
|
54
|
+
/** 열 때 복원할 시간. showTime과 함께 사용합니다. */
|
|
55
|
+
timeValue?: CalendarTimeValue;
|
|
18
56
|
saveButtonContent: string;
|
|
19
57
|
/**
|
|
20
58
|
* 캘린더 하단 버튼을 누르면 동작할 함수, 선택한 startDate와 endDate를 전달
|
|
21
59
|
* @param startDate 시작일
|
|
22
60
|
* @param endDate 마지막일
|
|
23
61
|
*/
|
|
24
|
-
onSaveClick: (startDate?: string, endDate?: string) => void;
|
|
62
|
+
onSaveClick: (startDate?: string, endDate?: string, time?: CalendarTimeValue) => void;
|
|
25
63
|
className?: string;
|
|
26
64
|
}
|
|
27
|
-
export declare function Calendar({ children, minStartDate, saveButtonContent, onSaveClick, className, }: CalendarProps):
|
|
65
|
+
export declare function Calendar({ children, minStartDate, mode, saveButtonContent, onSaveClick, className, ...options }: CalendarProps): React.JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
|
|
2
|
-
|
|
3
|
+
interface Props extends ReactDatePickerCustomHeaderProps {
|
|
4
|
+
monthsToShow?: 1 | 2;
|
|
5
|
+
showMonthYearDropdown?: boolean;
|
|
6
|
+
minDate?: Date | null;
|
|
7
|
+
maxDate?: Date | null;
|
|
8
|
+
onNavigate?: (date: Date) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function DatePickerHeader({ monthDate, customHeaderCount, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, monthsToShow, showMonthYearDropdown, minDate, maxDate, onNavigate, }: Props): React.JSX.Element;
|
|
3
11
|
export default DatePickerHeader;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CalendarProps } from './Calendar';
|
|
1
3
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
2
|
-
|
|
3
|
-
minStartDate?: Date | null;
|
|
4
|
-
saveButtonContent?: string;
|
|
5
|
-
onSaveClick: (startDate?: string, endDate?: string) => void;
|
|
4
|
+
type Props = Omit<CalendarProps, 'children' | 'className'> & {
|
|
6
5
|
setOpen: (open: boolean) => void;
|
|
7
|
-
}
|
|
8
|
-
declare function DatePickerWrapper({ minStartDate, saveButtonContent, onSaveClick, setOpen, }: Props):
|
|
6
|
+
};
|
|
7
|
+
declare function DatePickerWrapper({ minStartDate, maxDate, mode, monthsToShow, showMonthYearDropdown, showTime, timeRequired, validate, showPresets, showDateInputs, showCancelButton, cancelButtonContent, startDate: initialStart, endDate: initialEnd, timeValue, saveButtonContent, onSaveClick, setOpen, }: Props): React.JSX.Element;
|
|
9
8
|
export default DatePickerWrapper;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DATE_FORMAT = "yyyy-MM-dd";
|
|
2
|
+
export declare const formatDate: (date: Date | null) => string;
|
|
3
|
+
export declare function validDay(date?: Date | null): Date | null;
|
|
4
|
+
export declare function clampDate(date: Date, min: Date | null, max: Date | null): Date;
|
|
5
|
+
export declare function parseDate(text: string, min: Date | null, max: Date | null): Date | null;
|
|
6
|
+
export declare const validTime: (time?: string) => boolean;
|
|
7
|
+
export declare function calendarPresets(today: Date): {
|
|
8
|
+
label: string;
|
|
9
|
+
start: Date;
|
|
10
|
+
end: Date;
|
|
11
|
+
}[];
|