maru_design2 2.30.0 → 2.31.1
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 +14 -0
- package/dist/components/atoms/badge/Badge.d.ts +23 -0
- package/dist/components/atoms/badge/index.d.ts +1 -0
- package/dist/components/atoms/icon/iconmap.d.ts +1 -0
- package/dist/components/molecules/buttonGroup/ButtonGroup.d.ts +56 -0
- package/dist/components/molecules/buttonGroup/index.d.ts +1 -0
- package/dist/components/molecules/toast/Toast.d.ts +4 -0
- package/dist/components/molecules/toast/ToastStyle.d.ts +5 -1
- package/dist/enums/color.d.ts +2 -2
- package/dist/enums/variant.d.ts +4 -0
- package/dist/fontProvider/index.d.ts +1 -0
- package/dist/fonts.js +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +146 -45
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.31.1](https://github.com/42maru-ai/maru-design2/compare/v2.31.0...v2.31.1) (2026-03-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* readme ([986e2bd](https://github.com/42maru-ai/maru-design2/commit/986e2bd0ae434d045efcafd08b37982e3820ed8d))
|
|
9
|
+
|
|
10
|
+
## [2.31.0](https://github.com/42maru-ai/maru-design2/compare/v2.30.0...v2.31.0) (2026-02-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* :hammer: Badge & Toast & ButtonGroups ([d096c12](https://github.com/42maru-ai/maru-design2/commit/d096c1201ad014d4fa9854fe5d535b0de9e60244))
|
|
16
|
+
|
|
3
17
|
## [2.30.0](https://github.com/42maru-ai/maru-design2/compare/v2.29.1...v2.30.0) (2026-01-30)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TBadgeColor, TBadgeVariant } from '../../../enums/variant';
|
|
3
|
+
import './badge.scss';
|
|
4
|
+
export interface BadgeProps {
|
|
5
|
+
/**
|
|
6
|
+
* 컴포넌트에 들어갈 내용
|
|
7
|
+
*/
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* 배지 색상
|
|
11
|
+
*/
|
|
12
|
+
color?: TBadgeColor;
|
|
13
|
+
/**
|
|
14
|
+
* 배지 스타일 변형
|
|
15
|
+
*/
|
|
16
|
+
variant?: TBadgeVariant;
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 설정하면 X아이콘이 렌더링되고 클릭 이벤트가 할당됩니다.
|
|
20
|
+
*/
|
|
21
|
+
onXIconClick?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function Badge({ children, color, variant, className, onXIconClick, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -37,6 +37,7 @@ export declare const iconmap: {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
export declare const ICONS: {
|
|
40
|
+
readonly X_s1210: "X_s1210";
|
|
40
41
|
readonly AlertCircle_s1413: "AlertCircle_s1413";
|
|
41
42
|
readonly AlertCircle_s1610: "AlertCircle_s1610";
|
|
42
43
|
readonly AlertCircle_s1615: "AlertCircle_s1615";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './button-group.scss';
|
|
3
|
+
export interface ButtonGroupButton<T extends string> {
|
|
4
|
+
/**
|
|
5
|
+
* 표시할 라벨
|
|
6
|
+
*/
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 선택 값
|
|
10
|
+
*/
|
|
11
|
+
value: T;
|
|
12
|
+
/**
|
|
13
|
+
* 버튼 커스텀 클래스
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ButtonGroupProps<T extends string> {
|
|
18
|
+
/**
|
|
19
|
+
* 선택된 값
|
|
20
|
+
*/
|
|
21
|
+
value: T;
|
|
22
|
+
/**
|
|
23
|
+
* 값 변경 함수
|
|
24
|
+
*/
|
|
25
|
+
onChange: (value: T) => void;
|
|
26
|
+
/**
|
|
27
|
+
* 버튼 리스트
|
|
28
|
+
*
|
|
29
|
+
* ```tsx
|
|
30
|
+
* {
|
|
31
|
+
* label: React.ReactNode;
|
|
32
|
+
* value: T;
|
|
33
|
+
* className?: string;
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
buttons: ButtonGroupButton<T>[];
|
|
38
|
+
/**
|
|
39
|
+
* 스타일 타입
|
|
40
|
+
* - segmented: 버튼들을 간격을 두고 묶여있는 형태 (기본값).
|
|
41
|
+
* - segmented-secondary: segmented와 동일한 래퍼,
|
|
42
|
+
* 선택된 버튼이 흰색 배경 + primary색 텍스트 컬러.
|
|
43
|
+
* - icon: 아웃라인 버튼 안에 간격없이 붙어있는 형태.
|
|
44
|
+
*/
|
|
45
|
+
variant?: 'segmented' | 'segmented-secondary' | 'icon';
|
|
46
|
+
/**
|
|
47
|
+
* 사이즈
|
|
48
|
+
*/
|
|
49
|
+
size?: 'sm' | 'md';
|
|
50
|
+
/**
|
|
51
|
+
* 전체 비활성화 여부
|
|
52
|
+
*/
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function ButtonGroup<T extends string>({ value, onChange, buttons, variant, size, disabled, className, }: ButtonGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ButtonGroup';
|
|
@@ -12,7 +12,11 @@ export interface ToastStyleProps {
|
|
|
12
12
|
content: string;
|
|
13
13
|
onClick: () => void;
|
|
14
14
|
};
|
|
15
|
+
revert?: {
|
|
16
|
+
label: string;
|
|
17
|
+
onRevert: () => void;
|
|
18
|
+
};
|
|
15
19
|
details?: IToastDetailItem[];
|
|
16
20
|
onClose: () => void;
|
|
17
21
|
}
|
|
18
|
-
export declare function ToastStyle({ variant, content, title, closeButton, details, onClose, }: ToastStyleProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ToastStyle({ variant, content, title, closeButton, revert, details, onClose, }: ToastStyleProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/enums/color.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export type TTheme = 'blue' | 'green' | 'navy';
|
|
|
2
2
|
declare const DColor: {
|
|
3
3
|
readonly primary: "var(--p)";
|
|
4
4
|
readonly secondary: "#8c8c8c";
|
|
5
|
-
readonly positive: "#
|
|
5
|
+
readonly positive: "#308acc";
|
|
6
6
|
readonly warning: "#ffb020";
|
|
7
7
|
readonly danger: "#e53e3e";
|
|
8
|
-
readonly success: "#
|
|
8
|
+
readonly success: "#32a483";
|
|
9
9
|
};
|
|
10
10
|
export declare const COLORS: string[];
|
|
11
11
|
export type TColor = (typeof COLORS)[number];
|
package/dist/enums/variant.d.ts
CHANGED
|
@@ -6,3 +6,7 @@ export declare const TOAST_VARIANTS: readonly ["success", "warning", "danger"];
|
|
|
6
6
|
export type TToastVariant = (typeof TOAST_VARIANTS)[number];
|
|
7
7
|
export declare const SKELETON_VARIANTS: readonly ["frame"];
|
|
8
8
|
export type TSkeletonVariant = (typeof SKELETON_VARIANTS)[number];
|
|
9
|
+
export declare const BADGE_COLORS: readonly ["primary", "secondary", "blue", "green", "purple"];
|
|
10
|
+
export type TBadgeColor = (typeof BADGE_COLORS)[number];
|
|
11
|
+
export declare const BADGE_VARIANTS: readonly ["default", "outlined"];
|
|
12
|
+
export type TBadgeVariant = (typeof BADGE_VARIANTS)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './fonts.scss';
|