maru_design2 2.7.2 → 2.9.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 +76 -0
- package/dist/components/atoms/button/Button.d.ts +1 -1
- package/dist/components/atoms/icon/Icon.d.ts +2 -7
- package/dist/components/atoms/icon/iconmap.d.ts +171 -148
- package/dist/components/atoms/radio/Radio.d.ts +3 -1
- package/dist/components/atoms/tooltip/Tooltip.d.ts +1 -6
- package/dist/components/molecules/modal/Modal.d.ts +5 -1
- package/dist/components/molecules/pagination/Pagination.d.ts +2 -6
- package/dist/components/molecules/table/Colgroup.d.ts +2 -3
- package/dist/components/molecules/table/Table.d.ts +1 -1
- package/dist/components/molecules/table/body/TBody.d.ts +14 -11
- package/dist/components/molecules/table/body/TBodyEmptyContent.d.ts +2 -1
- package/dist/components/molecules/table/header/FilterButtonsTh.d.ts +7 -0
- package/dist/components/molecules/table/header/FilterTh.d.ts +8 -0
- package/dist/components/molecules/table/header/SortableColumn.d.ts +8 -0
- package/dist/components/molecules/table/header/THead.d.ts +6 -2
- package/dist/components/molecules/table/types.d.ts +28 -23
- package/dist/components/molecules/toast/Toast.d.ts +2 -0
- package/dist/components/molecules/toast/ToastStyle.d.ts +7 -2
- package/dist/enums/color.d.ts +2 -0
- package/dist/enums/gap.d.ts +1 -1
- package/dist/enums/size.d.ts +0 -2
- package/dist/enums/variant.d.ts +0 -2
- package/dist/index.js +1722 -1152
- package/package.json +4 -4
- package/dist/components/molecules/table/body/ExpandingRow.d.ts +0 -9
|
@@ -6,7 +6,11 @@ interface Props {
|
|
|
6
6
|
hasCheckbox?: boolean;
|
|
7
7
|
allCheckbox: boolean;
|
|
8
8
|
onAllCheck: (checked: boolean) => void;
|
|
9
|
-
|
|
9
|
+
hasActionCol: boolean;
|
|
10
|
+
filter?: {
|
|
11
|
+
on: boolean;
|
|
12
|
+
onReset: () => void;
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
|
-
declare function THead({ formats, currentSort, onSortClick, hasCheckbox, allCheckbox, onAllCheck,
|
|
15
|
+
declare function THead({ formats, currentSort, onSortClick, hasCheckbox, allCheckbox, onAllCheck, hasActionCol, filter, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
export default THead;
|
|
@@ -6,25 +6,21 @@ export interface ISort {
|
|
|
6
6
|
export interface IColumnFormats {
|
|
7
7
|
columnIdKey: string;
|
|
8
8
|
columnName?: string;
|
|
9
|
-
|
|
9
|
+
filter?: React.ReactNode;
|
|
10
10
|
customColumn?: (content: any, rowId: string) => React.ReactNode;
|
|
11
11
|
width?: string;
|
|
12
12
|
sortable?: boolean;
|
|
13
13
|
isHide?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
columnIdKeys: string[];
|
|
17
|
-
colSpan?: number;
|
|
18
|
-
customColumn?: (contents: any, rowId1: string, rowId2: string) => React.ReactNode;
|
|
19
|
-
}
|
|
15
|
+
export type TShow = 'none' | 'hover' | 'always';
|
|
20
16
|
export interface TableProps {
|
|
21
|
-
data: Record<string, any>[];
|
|
22
17
|
/**
|
|
23
18
|
* 행 아이디로 쓸 키
|
|
24
19
|
*/
|
|
25
20
|
rowIdKey: string;
|
|
21
|
+
data: Record<string, any>[];
|
|
26
22
|
/**
|
|
27
|
-
* { columnIdKey, columnName,
|
|
23
|
+
* { columnIdKey, columnName, filter, customColumn, width, sortable, isHide }
|
|
28
24
|
*/
|
|
29
25
|
formats: IColumnFormats[];
|
|
30
26
|
/**
|
|
@@ -44,37 +40,42 @@ export interface TableProps {
|
|
|
44
40
|
*/
|
|
45
41
|
onCheck?: (ids: string[]) => void;
|
|
46
42
|
/**
|
|
47
|
-
*
|
|
43
|
+
* 최우측 컬럼 헤더의 필터 영역. { on, onReset }
|
|
48
44
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
filter?: {
|
|
46
|
+
on: boolean;
|
|
47
|
+
onReset: () => void;
|
|
52
48
|
};
|
|
53
49
|
/**
|
|
54
|
-
*
|
|
50
|
+
* 최우측 컬럼 바디의 더보기 메뉴. binButton과 같이 쓸 수 없음. { content, width } (@v1 hamberger)
|
|
55
51
|
*/
|
|
56
|
-
|
|
52
|
+
kebabMenu?: {
|
|
53
|
+
content: (rowId: string, onClose: () => void) => React.ReactNode;
|
|
54
|
+
};
|
|
57
55
|
/**
|
|
58
|
-
*
|
|
56
|
+
* 최우측 컬럼 바디의 휴지통 버튼. kebabMenu와 같이 쓸 수 없음. { show, onClick }
|
|
59
57
|
*/
|
|
60
|
-
|
|
58
|
+
binButton?: {
|
|
59
|
+
show: (rowId?: string) => TShow;
|
|
60
|
+
onClick: (rowId: string) => void;
|
|
61
|
+
};
|
|
61
62
|
/**
|
|
62
|
-
* 테이블 행
|
|
63
|
+
* 테이블 행 click 이벤트. rowId를 콜백함수에게 전달.
|
|
63
64
|
*/
|
|
64
|
-
|
|
65
|
-
className?: string;
|
|
66
|
-
id?: string;
|
|
65
|
+
onRowClick?: (rowId: string) => void;
|
|
67
66
|
/**
|
|
68
|
-
* 선택된 행 스타일
|
|
67
|
+
* 선택된 행 스타일 지정, onRowClick과 조합해서 사용 가능 (@v1 focusedRowInfo)
|
|
69
68
|
*/
|
|
70
69
|
selectedRow?: {
|
|
71
70
|
rowId: string;
|
|
72
71
|
className?: string;
|
|
73
72
|
};
|
|
73
|
+
className?: string;
|
|
74
|
+
id?: string;
|
|
74
75
|
/**
|
|
75
|
-
* 최대 높이
|
|
76
|
+
* body의 최대 높이
|
|
76
77
|
*/
|
|
77
|
-
|
|
78
|
+
tableBodyMaxHeight?: number;
|
|
78
79
|
/**
|
|
79
80
|
* 데이터가 없을때의 조건과 문구
|
|
80
81
|
*/
|
|
@@ -89,4 +90,8 @@ export interface TableProps {
|
|
|
89
90
|
isLoading: boolean;
|
|
90
91
|
content?: React.ReactNode;
|
|
91
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* 데이터가 없거나 로딩일때 높이
|
|
95
|
+
*/
|
|
96
|
+
emptyContentHeight?: number;
|
|
92
97
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TToastVariant } from '../../../enums/variant';
|
|
2
3
|
import './toast.scss';
|
|
3
4
|
export interface ToastStyleProps {
|
|
@@ -6,13 +7,17 @@ export interface ToastStyleProps {
|
|
|
6
7
|
*/
|
|
7
8
|
variant: TToastVariant;
|
|
8
9
|
/**
|
|
9
|
-
* 컴포넌트에 들어갈 내용
|
|
10
|
+
* 컴포넌트에 들어갈 한 줄짜리 내용
|
|
10
11
|
*/
|
|
11
12
|
content: string;
|
|
13
|
+
/**
|
|
14
|
+
* 컴포넌트에 들어갈 커스텀 내용
|
|
15
|
+
*/
|
|
16
|
+
description?: React.ReactNode;
|
|
12
17
|
/**
|
|
13
18
|
* details, summary 태그를 활용하여 노출할 내용
|
|
14
19
|
*/
|
|
15
20
|
details?: string[];
|
|
16
21
|
onClose: () => void;
|
|
17
22
|
}
|
|
18
|
-
export declare function ToastStyle({ variant, content, details, onClose, }: ToastStyleProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function ToastStyle({ variant, content, description, details, onClose, }: ToastStyleProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/enums/color.d.ts
CHANGED
package/dist/enums/gap.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const GAPS: readonly ["8px", "4px"];
|
|
1
|
+
export declare const GAPS: readonly ["8px", "4px", "2px"];
|
|
2
2
|
export type TGap = (typeof GAPS)[number];
|
package/dist/enums/size.d.ts
CHANGED
|
@@ -4,7 +4,5 @@ export declare const CHECKBOX_SIZES: readonly [16, 18, 24];
|
|
|
4
4
|
export type TCheckboxSize = (typeof CHECKBOX_SIZES)[number];
|
|
5
5
|
export declare const CHIP_SIZES: readonly ["small", "normal"];
|
|
6
6
|
export type TChipSize = (typeof CHIP_SIZES)[number];
|
|
7
|
-
export declare const ICON_SIZES: readonly [14, 16, 18, 20, 24, 32, 40, 48];
|
|
8
|
-
export type TIconSize = (typeof ICON_SIZES)[number];
|
|
9
7
|
export declare const MODAL_SIZES: readonly ["xs", "s", "m", "l", "xl"];
|
|
10
8
|
export type TModalSize = (typeof MODAL_SIZES)[number];
|
package/dist/enums/variant.d.ts
CHANGED
|
@@ -2,7 +2,5 @@ export declare const BUTTON_VARIANTS: readonly ["default", "default-light", "out
|
|
|
2
2
|
export type TButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
3
3
|
export declare const CHIP_VARIANTS: readonly ["default", "outline", "dot"];
|
|
4
4
|
export type TChipVariant = (typeof CHIP_VARIANTS)[number];
|
|
5
|
-
export declare const TOOLTIP_VARIANTS: readonly ["default", "error"];
|
|
6
|
-
export type TTooltipVariant = (typeof TOOLTIP_VARIANTS)[number];
|
|
7
5
|
export declare const TOAST_VARIANTS: readonly ["success", "warning", "danger"];
|
|
8
6
|
export type TToastVariant = (typeof TOAST_VARIANTS)[number];
|