maru_design2 2.5.2 → 2.6.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.6.0](https://github.com/42maru-ai/maru-design2/compare/v2.5.2...v2.6.0) (2024-05-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * :bento: ADD assets ([5d71dc6](https://github.com/42maru-ai/maru-design2/commit/5d71dc6dc5c6e7f1fff9e232a3801466ce94fb8c))
9
+ * :label: ADD variant type for toast ([3ee947b](https://github.com/42maru-ai/maru-design2/commit/3ee947b8b106d9f250ab876fefb150778273a909))
10
+ * :sparkles: ADD toast ([fd72b15](https://github.com/42maru-ai/maru-design2/commit/fd72b15ae376c3990f090474e77af90f64d823ff))
11
+ * ADD Calendar ([e119e76](https://github.com/42maru-ai/maru-design2/commit/e119e762ea81f01c868b7b296c33c30394ef6d9c))
12
+ * ADD error,success,warning icons, UPDATE parser ([de0facb](https://github.com/42maru-ai/maru-design2/commit/de0facb55886cee9b22eb863e2f2a5aeb5266920))
13
+ * ADD Input option - hiddenClearButton ([3828d12](https://github.com/42maru-ai/maru-design2/commit/3828d129839fc853e3e340ab612c447df3c6bccc))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * :adhesive_bandage: ADD id props ([d6e6186](https://github.com/42maru-ai/maru-design2/commit/d6e61869d3441335fcd5d71efcbcf2f1837aab44))
19
+ * :pencil2: FIX typo ([7c4895d](https://github.com/42maru-ai/maru-design2/commit/7c4895d972f0e47977faa5b20da4077141456869))
20
+ * calendar day-name parse error ([45f2190](https://github.com/42maru-ai/maru-design2/commit/45f219070f4b70e43c4093531e534117910be7a9))
21
+ * icon documents ([1254267](https://github.com/42maru-ai/maru-design2/commit/1254267f54ed1cc68dde3da01c53758ef120478e))
22
+ * UPDATE calendar footer input hidden clear btn ([cef27ec](https://github.com/42maru-ai/maru-design2/commit/cef27ecff581f3274f4633991d691c3ddf799e8e))
23
+
3
24
  ## [2.5.2](https://github.com/42maru-ai/maru-design2/compare/v2.5.1...v2.5.2) (2024-05-20)
4
25
 
5
26
 
@@ -20,6 +20,15 @@ export declare const iconmap: {
20
20
  r: string;
21
21
  fill: string;
22
22
  }[];
23
+ rects: {
24
+ x: string;
25
+ y: string;
26
+ width: string;
27
+ height: string;
28
+ rx: string;
29
+ transform: string;
30
+ fill: string;
31
+ }[];
23
32
  };
24
33
  };
25
34
  export declare const ICONS: {
@@ -84,6 +93,7 @@ export declare const ICONS: {
84
93
  readonly Download01Thin: "Download01Thin";
85
94
  readonly Downstream: "Downstream";
86
95
  readonly Edit03Thin: "Edit03Thin";
96
+ readonly Error: "Error";
87
97
  readonly ExpandThin: "ExpandThin";
88
98
  readonly FiEyeOffThin: "FiEyeOffThin";
89
99
  readonly FiEyeThin: "FiEyeThin";
@@ -151,6 +161,7 @@ export declare const ICONS: {
151
161
  readonly StopCircle: "StopCircle";
152
162
  readonly SubtractLineThin: "SubtractLineThin";
153
163
  readonly SuccessThin: "SuccessThin";
164
+ readonly Success: "Success";
154
165
  readonly SwitchHorizontal02Thin: "SwitchHorizontal02Thin";
155
166
  readonly TransformThin: "TransformThin";
156
167
  readonly Trash01Thin: "Trash01Thin";
@@ -162,6 +173,7 @@ export declare const ICONS: {
162
173
  readonly UserPlusThin: "UserPlusThin";
163
174
  readonly Users01Thin: "Users01Thin";
164
175
  readonly Users01: "Users01";
176
+ readonly Warning: "Warning";
165
177
  readonly XCircleThin: "XCircleThin";
166
178
  readonly XCircle: "XCircle";
167
179
  readonly XLarge: "XLarge";
@@ -15,6 +15,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
15
15
  * 초기화 함수 (@v1 hasClearBtn, onClear)
16
16
  */
17
17
  onClear?: () => void;
18
+ /**
19
+ * 초기화 버튼 숨기기
20
+ */
21
+ hiddenClearButton?: boolean;
18
22
  /**
19
23
  * input을 감싸고 있는 div의 ref, input은 일반 ref 사용
20
24
  */
@@ -0,0 +1,16 @@
1
+ import { TToastVariant } from '../../../enums/variant';
2
+ import './toast.scss';
3
+ export interface ToastProps {
4
+ /**
5
+ * ['success', 'warning', 'danger'].
6
+ */
7
+ variant: TToastVariant;
8
+ /**
9
+ * 컴포넌트에 들어갈 내용
10
+ */
11
+ content: string;
12
+ onClose: () => void;
13
+ className?: string;
14
+ id?: string;
15
+ }
16
+ export declare function Toast({ variant, content, onClose, className, id, }: ToastProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Toast';
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import './calendar.scss';
3
+ export interface CalendarProps {
4
+ /**
5
+ * Maru Datepicker를 띄울 대상이 되는 컴포넌트. setOpen을 변수로 전달해서 외부에서 datepicker를 띄울 수 있도록 설정
6
+ * @param setOpen 토글형태로 동작. children의 onClick 메서드에서 실행 필요
7
+ */
8
+ children: ({ setOpen }: {
9
+ setOpen: () => void;
10
+ }) => React.ReactNode;
11
+ saveButtonContent: string;
12
+ /**
13
+ * 캘린더 하단 버튼을 누르면 동작할 함수, 선택한 startDate와 endDate를 전달
14
+ * @param startDate 시작일
15
+ * @param endDate 마지막일
16
+ */
17
+ onSaveClick: (startDate?: string, endDate?: string) => void;
18
+ className?: string;
19
+ }
20
+ export declare function Calendar({ children, saveButtonContent, onSaveClick, className, }: CalendarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
2
+ declare function DatePickerHeader({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, }: ReactDatePickerCustomHeaderProps): import("react/jsx-runtime").JSX.Element;
3
+ export default DatePickerHeader;
@@ -0,0 +1,8 @@
1
+ import 'react-datepicker/dist/react-datepicker.css';
2
+ interface Props {
3
+ saveButtonContent?: string;
4
+ onSaveClick: (startDate?: string, endDate?: string) => void;
5
+ setOpen: (open: boolean) => void;
6
+ }
7
+ declare function DatePickerWrapper({ saveButtonContent, onSaveClick, setOpen }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export default DatePickerWrapper;
@@ -0,0 +1 @@
1
+ export * from './Calendar';
@@ -4,3 +4,5 @@ export declare const CHIP_VARIANTS: readonly ["default", "outline", "dot"];
4
4
  export type TChipVariant = (typeof CHIP_VARIANTS)[number];
5
5
  export declare const TOOLTIP_VARIANTS: readonly ["default", "error"];
6
6
  export type TTooltipVariant = (typeof TOOLTIP_VARIANTS)[number];
7
+ export declare const TOAST_VARIANTS: readonly ["success", "warning", "danger"];
8
+ export type TToastVariant = (typeof TOAST_VARIANTS)[number];
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export * from './components/atoms/popover';
8
8
  export * from './components/atoms/radio';
9
9
  export * from './components/atoms/toggle';
10
10
  export * from './components/atoms/tooltip';
11
+ export * from './components/atoms/toast';
12
+ export * from './components/molecules/calendar';
11
13
  export * from './components/molecules/dropdown';
12
14
  export * from './components/molecules/modal';
13
15
  export * from './components/molecules/pagination';