maru_design2 0.0.1 → 0.0.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/dist/components/atoms/button/Button.d.ts +24 -4
- package/dist/components/atoms/button/index.d.ts +1 -1
- package/dist/components/atoms/checkbox/Checkbox.d.ts +22 -0
- package/dist/components/atoms/checkbox/index.d.ts +1 -0
- package/dist/components/atoms/chip/Chip.d.ts +25 -0
- package/dist/components/atoms/chip/index.d.ts +1 -0
- package/dist/components/atoms/icon/Icon.d.ts +18 -0
- package/dist/components/atoms/icon/iconmap.d.ts +188 -0
- package/dist/components/atoms/icon/index.d.ts +1 -0
- package/dist/components/atoms/input/Input.d.ts +32 -0
- package/dist/components/atoms/input/index.d.ts +1 -0
- package/dist/components/atoms/popover/Popover.d.ts +24 -0
- package/dist/components/atoms/popover/index.d.ts +1 -0
- package/dist/components/atoms/radio/Radio.d.ts +13 -0
- package/dist/components/atoms/radio/index.d.ts +1 -0
- package/dist/components/atoms/toggle/Toggle.d.ts +21 -0
- package/dist/components/atoms/toggle/index.d.ts +1 -0
- package/dist/components/atoms/tooltip/Tooltip.d.ts +23 -0
- package/dist/components/atoms/tooltip/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/Dropdown.d.ts +89 -0
- package/dist/components/molecules/dropdown/Menu.d.ts +21 -0
- package/dist/components/molecules/dropdown/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/toggles/Arrow.d.ts +7 -0
- package/dist/components/molecules/dropdown/toggles/Button.d.ts +24 -0
- package/dist/components/molecules/dropdown/toggles/Clear.d.ts +8 -0
- package/dist/components/molecules/dropdown/toggles/Input.d.ts +24 -0
- package/dist/components/molecules/modal/Modal.d.ts +51 -0
- package/dist/components/molecules/modal/index.d.ts +1 -0
- package/dist/components/molecules/pagination/Pagination.d.ts +27 -0
- package/dist/components/molecules/pagination/index.d.ts +1 -0
- package/dist/components/styleProvider/StyleProvider.d.ts +10 -0
- package/dist/components/styleProvider/index.d.ts +1 -0
- package/dist/enums/color.d.ts +13 -0
- package/dist/enums/direction.d.ts +2 -0
- package/dist/enums/gap.d.ts +2 -0
- package/dist/enums/size.d.ts +10 -0
- package/dist/enums/type.d.ts +4 -0
- package/dist/enums/variant.d.ts +4 -0
- package/dist/hooks/useButtonState.d.ts +18 -0
- package/dist/hooks/useColor.d.ts +4 -0
- package/dist/hooks/useCombineRef.d.ts +1 -1
- package/dist/hooks/useCreatePortal.d.ts +1 -1
- package/dist/hooks/useId.d.ts +7 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3281 -8
- package/package.json +21 -18
- package/scripts/svg-parser.js +224 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TColor } from '../../../enums/color';
|
|
3
|
+
import { TModalSize } from '../../../enums/size';
|
|
4
|
+
import './modal.scss';
|
|
5
|
+
export interface ModalProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
open: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 배경 클릭 시 컴포넌트 닫히는지 여부. (@v1 backdropOff)
|
|
11
|
+
*/
|
|
12
|
+
backdrop?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 모달 취소버튼 설정. { content: string, disabled?: string}
|
|
15
|
+
*/
|
|
16
|
+
cancelButton?: {
|
|
17
|
+
content: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 엔터키 비활성화 여부. (@v1 disableEnterKeyDown)
|
|
23
|
+
*/
|
|
24
|
+
disabledEnter?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 모달 닫기 버튼 숨김 여부. (@v1 hasCloseButton)
|
|
27
|
+
*/
|
|
28
|
+
hiddenCloseButton?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 모달 확인버튼 설정.
|
|
31
|
+
* { content: string,
|
|
32
|
+
* color?: 'primary' | 'secondary' | 'positive' | 'warning' | 'danger',
|
|
33
|
+
* disabled?: boolean, onClick?: () => void }. (@v1 confirmButton)
|
|
34
|
+
*/
|
|
35
|
+
okButton?: {
|
|
36
|
+
content: string;
|
|
37
|
+
color?: TColor;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
onClick?: () => void;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* ['xs', 's', 'm', 'l', 'xl']
|
|
43
|
+
*/
|
|
44
|
+
size?: TModalSize;
|
|
45
|
+
/**
|
|
46
|
+
* 모달 제목
|
|
47
|
+
*/
|
|
48
|
+
title?: string;
|
|
49
|
+
}
|
|
50
|
+
declare function Modal({ children, onClose, open, backdrop, cancelButton, className, disabledEnter, hiddenCloseButton, okButton, size, title, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export default Modal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Modal';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TButtonType } from '../../../enums/type';
|
|
2
|
+
import './pagination.scss';
|
|
3
|
+
export interface PaginationProps {
|
|
4
|
+
/**
|
|
5
|
+
* 현재 페이지. (@v1 page.curPage)
|
|
6
|
+
*/
|
|
7
|
+
page: number;
|
|
8
|
+
/**
|
|
9
|
+
* 현재 페이지 설정 함수. (@v1 page.setPage)
|
|
10
|
+
*/
|
|
11
|
+
onPageChange: (page: number) => void;
|
|
12
|
+
/**
|
|
13
|
+
* 총 페이지
|
|
14
|
+
*/
|
|
15
|
+
totalPage: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 페이지네이션의 전후 버튼 숨김 여부. (@v1 buttonVisibility)
|
|
19
|
+
*/
|
|
20
|
+
hiddenButton?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 데이터 타입. ['button', 'input'] (@v1 isSearch)
|
|
23
|
+
*/
|
|
24
|
+
type?: TButtonType;
|
|
25
|
+
}
|
|
26
|
+
declare function Pagination({ page, onPageChange, totalPage, className, hiddenButton, type, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default Pagination;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Pagination';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TTheme } from '../../enums/color';
|
|
3
|
+
import './reset.scss';
|
|
4
|
+
import './style-provider.scss';
|
|
5
|
+
interface Props {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
theme: TTheme;
|
|
8
|
+
}
|
|
9
|
+
export declare function StyleProvider({ children, theme }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StyleProvider';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TTheme = 'blue';
|
|
2
|
+
declare const DColor: {
|
|
3
|
+
readonly primary: "var(--p)";
|
|
4
|
+
readonly secondary: "#8c8c8c";
|
|
5
|
+
readonly positive: "#58c5a6";
|
|
6
|
+
readonly warning: "#ffb020";
|
|
7
|
+
readonly danger: "#e53e3e";
|
|
8
|
+
};
|
|
9
|
+
export declare const COLORS: string[];
|
|
10
|
+
export type TColor = (typeof COLORS)[number];
|
|
11
|
+
export { DColor };
|
|
12
|
+
export declare const TOOLTIP_COLORS: readonly ["default", "danger"];
|
|
13
|
+
export type TTooltipColor = (typeof TOOLTIP_COLORS)[number];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const BUTTON_SIZES: readonly ["small", "normal", "large"];
|
|
2
|
+
export type TButtonSize = (typeof BUTTON_SIZES)[number];
|
|
3
|
+
export declare const CHECKBOX_SIZES: readonly [16, 18, 24];
|
|
4
|
+
export type TCheckboxSize = (typeof CHECKBOX_SIZES)[number];
|
|
5
|
+
export declare const CHIP_SIZES: readonly ["small", "normal"];
|
|
6
|
+
export type TChipSize = (typeof CHIP_SIZES)[number];
|
|
7
|
+
export declare const ICON_SIZES: readonly [14, 16, 18, 20, 24, 40, 48];
|
|
8
|
+
export type TIconSize = (typeof ICON_SIZES)[number];
|
|
9
|
+
export declare const MODAL_SIZES: readonly ["xs", "s", "m", "l", "xl"];
|
|
10
|
+
export type TModalSize = (typeof MODAL_SIZES)[number];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const BUTTON_VARIANTS: readonly ["default", "default-light", "outline", "text", "color-on-focus"];
|
|
2
|
+
export type TButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
3
|
+
export declare const CHIP_VARIANTS: readonly ["default", "outline", "dot"];
|
|
4
|
+
export type TChipVariant = (typeof CHIP_VARIANTS)[number];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* 버튼 hover/active/focus 상태를 추적할 때 사용.
|
|
4
|
+
*/
|
|
5
|
+
interface IButtonState {
|
|
6
|
+
isHover: boolean;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
isFocused: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function useButtonState(): [
|
|
11
|
+
IButtonState,
|
|
12
|
+
{
|
|
13
|
+
setIsHover: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
|
+
setIsActive: React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
|
+
setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
export default useButtonState;
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './components/styleProvider';
|
|
2
|
+
export * from './components/atoms/button';
|
|
3
|
+
export * from './components/atoms/checkbox';
|
|
4
|
+
export * from './components/atoms/chip';
|
|
5
|
+
export * from './components/atoms/icon';
|
|
6
|
+
export * from './components/atoms/input';
|
|
7
|
+
export * from './components/atoms/popover';
|
|
8
|
+
export * from './components/atoms/radio';
|
|
9
|
+
export * from './components/atoms/toggle';
|
|
10
|
+
export * from './components/atoms/tooltip';
|
|
11
|
+
export * from './components/molecules/dropdown';
|
|
12
|
+
export * from './components/molecules/modal';
|
|
13
|
+
export * from './components/molecules/pagination';
|