maru_design2 2.0.0 → 2.0.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/dist/components/atoms/input/Input.d.ts +4 -4
- package/dist/components/atoms/tooltip/Tooltip.d.ts +6 -6
- package/dist/components/molecules/dropdown/Dropdown.d.ts +1 -9
- package/dist/components/molecules/dropdown/Menu.d.ts +1 -2
- package/dist/enums/color.d.ts +0 -2
- package/dist/enums/variant.d.ts +2 -0
- package/dist/hooks/useButtonState.d.ts +1 -3
- package/dist/index.js +88 -142
- package/package.json +1 -1
|
@@ -2,15 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { TInputType } from '../../../enums/type';
|
|
3
3
|
import './input.scss';
|
|
4
4
|
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
5
|
+
/**
|
|
6
|
+
* 초기화 함수 (@v1 hasClearBtn, onClear)
|
|
7
|
+
*/
|
|
8
|
+
onClear: () => void;
|
|
5
9
|
/**
|
|
6
10
|
* 에러났을때 메시지. (@v1 isValid, validMessage)
|
|
7
11
|
*/
|
|
8
12
|
errorMessage?: string;
|
|
9
13
|
label?: string;
|
|
10
|
-
/**
|
|
11
|
-
* 초기화 함수 (@v1 hasClearBtn, onClear)
|
|
12
|
-
*/
|
|
13
|
-
onClear?: () => void;
|
|
14
14
|
/**
|
|
15
15
|
* 데이터 타입. ['text', 'password', 'number']
|
|
16
16
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TTooltipColor } from '../../../enums/color';
|
|
3
2
|
import { TDirection } from '../../../enums/direction';
|
|
3
|
+
import { TTooltipVariant } from '../../../enums/variant';
|
|
4
4
|
import './tooltip.scss';
|
|
5
5
|
export interface TooltipProps {
|
|
6
6
|
children: React.ReactNode;
|
|
@@ -9,14 +9,14 @@ export interface TooltipProps {
|
|
|
9
9
|
*/
|
|
10
10
|
content: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* ['default', 'danger']
|
|
14
|
-
*/
|
|
15
|
-
color?: TTooltipColor;
|
|
16
12
|
direction?: TDirection;
|
|
17
13
|
/**
|
|
18
14
|
* 컴포넌트 createPortal 여부. (@v1 isOnDocument)
|
|
19
15
|
*/
|
|
20
16
|
portal?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* ['default', 'error']. error는 앞에 항상 아이콘 있음.
|
|
19
|
+
*/
|
|
20
|
+
variant?: TTooltipVariant;
|
|
21
21
|
}
|
|
22
|
-
export declare function Tooltip({ children, content, className,
|
|
22
|
+
export declare function Tooltip({ children, content, className, direction, portal, variant, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -47,14 +47,6 @@ interface DropdownProps<T extends Record<string, any>> {
|
|
|
47
47
|
*/
|
|
48
48
|
inlineLabel?: string;
|
|
49
49
|
label?: string;
|
|
50
|
-
/**
|
|
51
|
-
* 데이터가 없을때 메시지
|
|
52
|
-
*/
|
|
53
|
-
noDataMessage?: string;
|
|
54
|
-
/**
|
|
55
|
-
* 검색 결과가 없을때 메시지
|
|
56
|
-
*/
|
|
57
|
-
noSearchedMessage?: string;
|
|
58
50
|
/**
|
|
59
51
|
* 초기화 함수 (@v1 hasClearBtn, onClear)
|
|
60
52
|
*/
|
|
@@ -81,5 +73,5 @@ interface DropdownProps<T extends Record<string, any>> {
|
|
|
81
73
|
*/
|
|
82
74
|
height?: number;
|
|
83
75
|
}
|
|
84
|
-
export declare function Dropdown<T extends Record<string, any>>({ data, selectedId, onSelect, idKey, displayKey, anchorEl, className, color, customButton, customMenuItem, disabled, errorMessage, inlineLabel, label,
|
|
76
|
+
export declare function Dropdown<T extends Record<string, any>>({ data, selectedId, onSelect, idKey, displayKey, anchorEl, className, color, customButton, customMenuItem, disabled, errorMessage, inlineLabel, label, onClear, placeholder, startArrow, toggleEndNode, type, width, height, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
85
77
|
export {};
|
|
@@ -8,7 +8,6 @@ interface Props<T extends Record<string, any>> {
|
|
|
8
8
|
filteredData: T[];
|
|
9
9
|
width?: number;
|
|
10
10
|
height?: number;
|
|
11
|
-
noMessage?: string;
|
|
12
11
|
customMenuItem?: ({ children, rowId, }: {
|
|
13
12
|
children: React.ReactNode;
|
|
14
13
|
rowId: string | number;
|
|
@@ -16,5 +15,5 @@ interface Props<T extends Record<string, any>> {
|
|
|
16
15
|
onSelect: (id?: string) => void;
|
|
17
16
|
closeMenu: () => void;
|
|
18
17
|
}
|
|
19
|
-
declare function DropdownMenu<T extends Record<string, any>>({ parent, menuItemEls, selectedId, idKey, displayKey, filteredData, width, height,
|
|
18
|
+
declare function DropdownMenu<T extends Record<string, any>>({ parent, menuItemEls, selectedId, idKey, displayKey, filteredData, width, height, customMenuItem: CustomMenuItem, onSelect, closeMenu, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export default DropdownMenu;
|
package/dist/enums/color.d.ts
CHANGED
package/dist/enums/variant.d.ts
CHANGED
|
@@ -2,3 +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];
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/**
|
|
3
|
-
* 버튼 hover/active
|
|
3
|
+
* 버튼 hover/active 상태를 추적할 때 사용.
|
|
4
4
|
*/
|
|
5
5
|
interface IButtonState {
|
|
6
6
|
isHover: boolean;
|
|
7
7
|
isActive: boolean;
|
|
8
|
-
isFocused: boolean;
|
|
9
8
|
}
|
|
10
9
|
declare function useButtonState(): [
|
|
11
10
|
IButtonState,
|
|
12
11
|
{
|
|
13
12
|
setIsHover: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
13
|
setIsActive: React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
|
-
setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
14
|
}
|
|
17
15
|
];
|
|
18
16
|
export default useButtonState;
|
package/dist/index.js
CHANGED
|
@@ -184,17 +184,12 @@ function useButtonState() {
|
|
|
184
184
|
var _b = useState(false),
|
|
185
185
|
isActive = _b[0],
|
|
186
186
|
setIsActive = _b[1];
|
|
187
|
-
var _c = useState(false),
|
|
188
|
-
isFocused = _c[0],
|
|
189
|
-
setIsFocused = _c[1];
|
|
190
187
|
return [{
|
|
191
188
|
isHover: isHover,
|
|
192
|
-
isActive: isActive
|
|
193
|
-
isFocused: isFocused
|
|
189
|
+
isActive: isActive
|
|
194
190
|
}, {
|
|
195
191
|
setIsHover: setIsHover,
|
|
196
|
-
setIsActive: setIsActive
|
|
197
|
-
setIsFocused: setIsFocused
|
|
192
|
+
setIsActive: setIsActive
|
|
198
193
|
}];
|
|
199
194
|
}
|
|
200
195
|
|
|
@@ -2873,7 +2868,7 @@ function Icon(_a) {
|
|
|
2873
2868
|
}));
|
|
2874
2869
|
}
|
|
2875
2870
|
|
|
2876
|
-
var css_248z$a = ".size-small {\n padding: 6px 12px;\n border-radius: 6px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 12px;\n letter-spacing: -0.48px;\n font-weight: 600;\n}\n\n.size-normal {\n padding: 8px 10px;\n border-radius: 8px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n}\n\n.size-large {\n padding: 4px 12px;\n border-radius: 8px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n}\n\n.maru-button {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n border: 0;\n cursor: pointer;\n gap: 8px;\n}\n.maru-button:focus-within {\n outline: none;\n}\n.maru-button:disabled {\n cursor: default;\n opacity: 0.5;\n pointer-events: none;\n}\n.maru-button-primary-default {\n background-color: var(--p);\n color: white;\n}\n.maru-button-primary-default:hover {\n box-shadow: 0 0 6px var(--p);\n}\n.maru-button-primary-default:focus, .maru-button-primary-default:active {\n box-shadow: none;\n background-color: var(--p-10);\n color: var(--p);\n}\n.maru-button-primary-default-light {\n background-color: var(--p-10);\n color: var(--p);\n}\n.maru-button-primary-default-light:hover {\n box-shadow: 0 0 6px var(--p-50-per);\n}\n.maru-button-primary-default-light:focus, .maru-button-primary-default-light:active {\n box-shadow: none;\n background-color: var(--p);\n color: white;\n}\n.maru-button-primary-outline {\n background-color: white;\n color: var(--p);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-primary-outline:hover {\n box-shadow: 0 0 6px var(--p-20);\n}\n.maru-button-primary-outline:focus, .maru-button-primary-outline:active {\n box-shadow: none;\n background-color: var(--p-20);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-primary-outline:hover {\n box-shadow: 0 0 6px var(--p-50-per);\n}\n.maru-button-primary-outline:focus, .maru-button-primary-outline:active {\n box-shadow: none;\n background-color: var(--p-10);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-primary-text {\n background-color: white;\n color: var(--p);\n}\n.maru-button-primary-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-primary-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-primary-color-on-focus:focus, .maru-button-primary-color-on-focus:active {\n background-color: var(--p-10);\n color: var(--p);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-secondary-default {\n background-color: #8c8c8c;\n color: white;\n background-color: #e4e4e4;\n color: #8c8c8c;\n}\n.maru-button-secondary-default:hover {\n box-shadow: 0 0 6px #8c8c8c;\n}\n.maru-button-secondary-default:focus, .maru-button-secondary-default:active {\n box-shadow: none;\n background-color: #fafafa;\n color: #8c8c8c;\n}\n.maru-button-secondary-default:hover {\n box-shadow: 0 0 6px #e4e4e4;\n}\n.maru-button-secondary-default:focus, .maru-button-secondary-default:active {\n box-shadow: none;\n background-color: #8c8c8c;\n color: white;\n}\n.maru-button-secondary-default-light {\n background-color: #fafafa;\n color: #8c8c8c;\n}\n.maru-button-secondary-default-light:hover {\n box-shadow: 0 0 6px;\n}\n.maru-button-secondary-default-light:focus, .maru-button-secondary-default-light:active {\n box-shadow: none;\n background-color: #8c8c8c;\n color: white;\n}\n.maru-button-secondary-outline {\n background-color: white;\n color: #8c8c8c;\n box-shadow: 0 0 0 1px #8c8c8c inset;\n}\n.maru-button-secondary-outline:hover {\n box-shadow: 0 0 6px #e4e4e4;\n}\n.maru-button-secondary-outline:focus, .maru-button-secondary-outline:active {\n box-shadow: none;\n background-color: #e4e4e4;\n box-shadow: 0 0 0 1px #8c8c8c inset;\n}\n.maru-button-secondary-text {\n background-color: white;\n color: #8c8c8c;\n}\n.maru-button-secondary-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-secondary-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-secondary-color-on-focus:focus, .maru-button-secondary-color-on-focus:active {\n background-color: #e4e4e4;\n color: #5c5c5c;\n box-shadow: 0 0 0 1px #5c5c5c inset;\n}\n.maru-button-positive-default {\n background-color: #58c5a6;\n color: white;\n}\n.maru-button-positive-default:hover {\n box-shadow: 0 0 6px #58c5a6;\n}\n.maru-button-positive-default:focus, .maru-button-positive-default:active {\n box-shadow: none;\n color: #58c5a6;\n}\n.maru-button-positive-default-light {\n color: #58c5a6;\n}\n.maru-button-positive-default-light:hover {\n box-shadow: 0 0 6px rgba(88, 196, 166, 0.5019607843);\n}\n.maru-button-positive-default-light:focus, .maru-button-positive-default-light:active {\n box-shadow: none;\n background-color: #58c5a6;\n color: white;\n}\n.maru-button-positive-outline {\n background-color: white;\n color: #58c5a6;\n box-shadow: 0 0 0 1px #58c5a6 inset;\n}\n.maru-button-positive-outline:hover {\n box-shadow: 0 0 6px #def3ed;\n}\n.maru-button-positive-outline:focus, .maru-button-positive-outline:active {\n box-shadow: none;\n background-color: #def3ed;\n box-shadow: 0 0 0 1px #58c5a6 inset;\n}\n.maru-button-positive-text {\n background-color: white;\n color: #58c5a6;\n}\n.maru-button-positive-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-positive-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-positive-color-on-focus:focus, .maru-button-positive-color-on-focus:active {\n color: #58c5a6;\n box-shadow: 0 0 0 1px #58c5a6 inset;\n}\n.maru-button-warning-default {\n background-color: #ffb020;\n color: white;\n}\n.maru-button-warning-default:hover {\n box-shadow: 0 0 6px #ffb020;\n}\n.maru-button-warning-default:focus, .maru-button-warning-default:active {\n box-shadow: none;\n background-color: #ffefd2;\n color: #ffb020;\n}\n.maru-button-warning-default-light {\n background-color: #fff7e9;\n color: #ffb020;\n}\n.maru-button-warning-default-light:hover {\n box-shadow: 0 0 6px rgba(255, 177, 32, 0.5019607843);\n}\n.maru-button-warning-default-light:focus, .maru-button-warning-default-light:active {\n box-shadow: none;\n background-color: #ffb020;\n color: white;\n}\n.maru-button-warning-outline {\n background-color: white;\n color: #ffb020;\n box-shadow: 0 0 0 1px #ffb020 inset;\n}\n.maru-button-warning-outline:hover {\n box-shadow: 0 0 6px #ffefd2;\n}\n.maru-button-warning-outline:focus, .maru-button-warning-outline:active {\n box-shadow: none;\n background-color: #ffefd2;\n box-shadow: 0 0 0 1px #ffb020 inset;\n}\n.maru-button-warning-text {\n background-color: white;\n color: #ffb020;\n}\n.maru-button-warning-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-warning-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-warning-color-on-focus:focus, .maru-button-warning-color-on-focus:active {\n background-color: #ffefd2;\n color: #ffb020;\n box-shadow: 0 0 0 1px #ffb020 inset;\n}\n.maru-button-danger-default {\n background-color: #e53e3e;\n color: white;\n}\n.maru-button-danger-default:hover {\n box-shadow: 0 0 6px #e53e3e;\n}\n.maru-button-danger-default:focus, .maru-button-danger-default:active {\n box-shadow: none;\n background-color: #fcecec;\n color: #e53e3e;\n}\n.maru-button-danger-default-light {\n background-color: #fcecec;\n color: #e53e3e;\n}\n.maru-button-danger-default-light:hover {\n box-shadow: 0 0 6px rgba(229, 62, 62, 0.5019607843);\n}\n.maru-button-danger-default-light:focus, .maru-button-danger-default-light:active {\n box-shadow: none;\n background-color: #e53e3e;\n color: white;\n}\n.maru-button-danger-outline {\n background-color: white;\n color: #e53e3e;\n box-shadow: 0 0 0 1px #e53e3e inset;\n}\n.maru-button-danger-outline:hover {\n box-shadow: 0 0 6px #fad8d8;\n}\n.maru-button-danger-outline:focus, .maru-button-danger-outline:active {\n box-shadow: none;\n background-color: #fad8d8;\n box-shadow: 0 0 0 1px #e53e3e inset;\n}\n.maru-button-danger-text {\n background-color: white;\n color: #e53e3e;\n}\n.maru-button-danger-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-danger-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-danger-color-on-focus:focus, .maru-button-danger-color-on-focus:active {\n background-color: #fcecec;\n color: #e53e3e;\n box-shadow: 0 0 0 1px #e53e3e inset;\n}\n\n.maru-button-with-start-icon.size-normal,\n.maru-button-with-end-icon.size-normal {\n padding: 8px 14px;\n}\n.maru-button-with-start-icon.size-small,\n.maru-button-with-end-icon.size-small {\n padding: 6px 12px;\n}\n.maru-button-with-start-icon.maru-button-primary-text:hover, .maru-button-with-start-icon.maru-button-primary-text:focus, .maru-button-with-start-icon.maru-button-primary-text:active,\n.maru-button-with-end-icon.maru-button-primary-text:hover,\n.maru-button-with-end-icon.maru-button-primary-text:focus,\n.maru-button-with-end-icon.maru-button-primary-text:active {\n background-color: var(--p-10);\n color: var(--p);\n}\n.maru-button-with-start-icon.maru-button-secondary-default-light:hover, .maru-button-with-start-icon.maru-button-secondary-default-light:focus, .maru-button-with-start-icon.maru-button-secondary-default-light:active,\n.maru-button-with-end-icon.maru-button-secondary-default-light:hover,\n.maru-button-with-end-icon.maru-button-secondary-default-light:focus,\n.maru-button-with-end-icon.maru-button-secondary-default-light:active {\n box-shadow: none;\n background-color: #fafafa;\n color: #8c8c8c;\n}\n\n.maru-button-only-icon {\n padding: 0;\n justify-content: center;\n background-color: transparent;\n}\n.maru-button-only-icon:hover, .maru-button-only-icon:focus, .maru-button-only-icon:active {\n box-shadow: none;\n background-color: transparent;\n}";
|
|
2871
|
+
var css_248z$a = ".size-small {\n padding: 6px 12px;\n border-radius: 6px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 12px;\n letter-spacing: -0.48px;\n font-weight: 600;\n}\n\n.size-normal {\n padding: 8px 10px;\n border-radius: 8px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n}\n\n.size-large {\n padding: 4px 12px;\n border-radius: 8px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n}\n\n.maru-button {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n border: 0;\n cursor: pointer;\n gap: 8px;\n}\n.maru-button:focus-within {\n outline: none;\n}\n.maru-button:disabled {\n cursor: default;\n opacity: 0.5;\n pointer-events: none;\n}\n.maru-button-primary-default {\n background-color: var(--p);\n color: white;\n}\n.maru-button-primary-default:hover {\n box-shadow: 0 0 6px var(--p);\n}\n.maru-button-primary-default:focus-visible, .maru-button-primary-default:active {\n box-shadow: none;\n background-color: var(--p-10);\n color: var(--p);\n}\n.maru-button-primary-default-light {\n background-color: var(--p-10);\n color: var(--p);\n}\n.maru-button-primary-default-light:hover {\n box-shadow: 0 0 6px var(--p-50-per);\n}\n.maru-button-primary-default-light:focus-visible, .maru-button-primary-default-light:active {\n box-shadow: none;\n background-color: var(--p);\n color: white;\n}\n.maru-button-primary-outline {\n background-color: white;\n color: var(--p);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-primary-outline:hover {\n box-shadow: 0 0 6px var(--p-20);\n}\n.maru-button-primary-outline:focus-visible, .maru-button-primary-outline:active {\n box-shadow: none;\n background-color: var(--p-20);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-primary-outline:hover {\n box-shadow: 0 0 6px var(--p-50-per);\n}\n.maru-button-primary-outline:focus-visible, .maru-button-primary-outline:active {\n box-shadow: none;\n background-color: var(--p-10);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-primary-text {\n background-color: white;\n color: var(--p);\n}\n.maru-button-primary-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-primary-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-primary-color-on-focus:focus-visible, .maru-button-primary-color-on-focus:active {\n background-color: var(--p-10);\n color: var(--p);\n box-shadow: 0 0 0 1px var(--p) inset;\n}\n.maru-button-secondary-default {\n background-color: #8c8c8c;\n color: white;\n background-color: #e4e4e4;\n color: #8c8c8c;\n}\n.maru-button-secondary-default:hover {\n box-shadow: 0 0 6px #8c8c8c;\n}\n.maru-button-secondary-default:focus-visible, .maru-button-secondary-default:active {\n box-shadow: none;\n background-color: #fafafa;\n color: #8c8c8c;\n}\n.maru-button-secondary-default:hover {\n box-shadow: 0 0 6px #e4e4e4;\n}\n.maru-button-secondary-default:focus-visible, .maru-button-secondary-default:active {\n box-shadow: none;\n background-color: #8c8c8c;\n color: white;\n}\n.maru-button-secondary-default-light {\n background-color: #fafafa;\n color: #8c8c8c;\n}\n.maru-button-secondary-default-light:hover {\n box-shadow: 0 0 6px;\n}\n.maru-button-secondary-default-light:focus-visible, .maru-button-secondary-default-light:active {\n box-shadow: none;\n background-color: #8c8c8c;\n color: white;\n}\n.maru-button-secondary-outline {\n background-color: white;\n color: #8c8c8c;\n box-shadow: 0 0 0 1px #8c8c8c inset;\n}\n.maru-button-secondary-outline:hover {\n box-shadow: 0 0 6px #e4e4e4;\n}\n.maru-button-secondary-outline:focus-visible, .maru-button-secondary-outline:active {\n box-shadow: none;\n background-color: #e4e4e4;\n box-shadow: 0 0 0 1px #8c8c8c inset;\n}\n.maru-button-secondary-text {\n background-color: white;\n color: #8c8c8c;\n}\n.maru-button-secondary-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-secondary-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-secondary-color-on-focus:focus-visible, .maru-button-secondary-color-on-focus:active {\n background-color: #e4e4e4;\n color: #5c5c5c;\n box-shadow: 0 0 0 1px #5c5c5c inset;\n}\n.maru-button-positive-default {\n background-color: #58c5a6;\n color: white;\n}\n.maru-button-positive-default:hover {\n box-shadow: 0 0 6px #58c5a6;\n}\n.maru-button-positive-default:focus-visible, .maru-button-positive-default:active {\n box-shadow: none;\n color: #58c5a6;\n}\n.maru-button-positive-default-light {\n color: #58c5a6;\n}\n.maru-button-positive-default-light:hover {\n box-shadow: 0 0 6px rgba(88, 196, 166, 0.5019607843);\n}\n.maru-button-positive-default-light:focus-visible, .maru-button-positive-default-light:active {\n box-shadow: none;\n background-color: #58c5a6;\n color: white;\n}\n.maru-button-positive-outline {\n background-color: white;\n color: #58c5a6;\n box-shadow: 0 0 0 1px #58c5a6 inset;\n}\n.maru-button-positive-outline:hover {\n box-shadow: 0 0 6px #def3ed;\n}\n.maru-button-positive-outline:focus-visible, .maru-button-positive-outline:active {\n box-shadow: none;\n background-color: #def3ed;\n box-shadow: 0 0 0 1px #58c5a6 inset;\n}\n.maru-button-positive-text {\n background-color: white;\n color: #58c5a6;\n}\n.maru-button-positive-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-positive-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-positive-color-on-focus:focus-visible, .maru-button-positive-color-on-focus:active {\n color: #58c5a6;\n box-shadow: 0 0 0 1px #58c5a6 inset;\n}\n.maru-button-warning-default {\n background-color: #ffb020;\n color: white;\n}\n.maru-button-warning-default:hover {\n box-shadow: 0 0 6px #ffb020;\n}\n.maru-button-warning-default:focus-visible, .maru-button-warning-default:active {\n box-shadow: none;\n background-color: #ffefd2;\n color: #ffb020;\n}\n.maru-button-warning-default-light {\n background-color: #fff7e9;\n color: #ffb020;\n}\n.maru-button-warning-default-light:hover {\n box-shadow: 0 0 6px rgba(255, 177, 32, 0.5019607843);\n}\n.maru-button-warning-default-light:focus-visible, .maru-button-warning-default-light:active {\n box-shadow: none;\n background-color: #ffb020;\n color: white;\n}\n.maru-button-warning-outline {\n background-color: white;\n color: #ffb020;\n box-shadow: 0 0 0 1px #ffb020 inset;\n}\n.maru-button-warning-outline:hover {\n box-shadow: 0 0 6px #ffefd2;\n}\n.maru-button-warning-outline:focus-visible, .maru-button-warning-outline:active {\n box-shadow: none;\n background-color: #ffefd2;\n box-shadow: 0 0 0 1px #ffb020 inset;\n}\n.maru-button-warning-text {\n background-color: white;\n color: #ffb020;\n}\n.maru-button-warning-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-warning-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-warning-color-on-focus:focus-visible, .maru-button-warning-color-on-focus:active {\n background-color: #ffefd2;\n color: #ffb020;\n box-shadow: 0 0 0 1px #ffb020 inset;\n}\n.maru-button-danger-default {\n background-color: #e53e3e;\n color: white;\n}\n.maru-button-danger-default:hover {\n box-shadow: 0 0 6px #e53e3e;\n}\n.maru-button-danger-default:focus-visible, .maru-button-danger-default:active {\n box-shadow: none;\n background-color: #fcecec;\n color: #e53e3e;\n}\n.maru-button-danger-default-light {\n background-color: #fcecec;\n color: #e53e3e;\n}\n.maru-button-danger-default-light:hover {\n box-shadow: 0 0 6px rgba(229, 62, 62, 0.5019607843);\n}\n.maru-button-danger-default-light:focus-visible, .maru-button-danger-default-light:active {\n box-shadow: none;\n background-color: #e53e3e;\n color: white;\n}\n.maru-button-danger-outline {\n background-color: white;\n color: #e53e3e;\n box-shadow: 0 0 0 1px #e53e3e inset;\n}\n.maru-button-danger-outline:hover {\n box-shadow: 0 0 6px #fad8d8;\n}\n.maru-button-danger-outline:focus-visible, .maru-button-danger-outline:active {\n box-shadow: none;\n background-color: #fad8d8;\n box-shadow: 0 0 0 1px #e53e3e inset;\n}\n.maru-button-danger-text {\n background-color: white;\n color: #e53e3e;\n}\n.maru-button-danger-color-on-focus {\n background-color: white;\n color: #bdbdbd;\n box-shadow: 0 0 0 1px #bdbdbd inset;\n padding: 5px 8px !important;\n gap: 4px;\n}\n.maru-button-danger-color-on-focus:hover {\n box-shadow: 0px 0px 6px 0px #e4e4e4;\n}\n.maru-button-danger-color-on-focus:focus-visible, .maru-button-danger-color-on-focus:active {\n background-color: #fcecec;\n color: #e53e3e;\n box-shadow: 0 0 0 1px #e53e3e inset;\n}\n\n.maru-button-with-start-icon.size-normal,\n.maru-button-with-end-icon.size-normal {\n padding: 8px 14px;\n}\n.maru-button-with-start-icon.size-small,\n.maru-button-with-end-icon.size-small {\n padding: 6px 12px;\n}\n.maru-button-with-start-icon.maru-button-primary-text:hover, .maru-button-with-start-icon.maru-button-primary-text:focus-visible, .maru-button-with-start-icon.maru-button-primary-text:active,\n.maru-button-with-end-icon.maru-button-primary-text:hover,\n.maru-button-with-end-icon.maru-button-primary-text:focus-visible,\n.maru-button-with-end-icon.maru-button-primary-text:active {\n background-color: var(--p-10);\n color: var(--p);\n}\n.maru-button-with-start-icon.maru-button-secondary-default-light:hover, .maru-button-with-start-icon.maru-button-secondary-default-light:focus-visible, .maru-button-with-start-icon.maru-button-secondary-default-light:active,\n.maru-button-with-end-icon.maru-button-secondary-default-light:hover,\n.maru-button-with-end-icon.maru-button-secondary-default-light:focus-visible,\n.maru-button-with-end-icon.maru-button-secondary-default-light:active {\n box-shadow: none;\n background-color: #fafafa;\n color: #8c8c8c;\n}\n\n.maru-button-only-icon {\n padding: 0;\n justify-content: center;\n background-color: transparent;\n}\n.maru-button-only-icon:hover, .maru-button-only-icon:focus-visible, .maru-button-only-icon:active {\n box-shadow: none;\n background-color: transparent;\n}";
|
|
2877
2872
|
styleInject(css_248z$a);
|
|
2878
2873
|
|
|
2879
2874
|
var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
@@ -2891,15 +2886,14 @@ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
2891
2886
|
mouseState = _e[0],
|
|
2892
2887
|
_f = _e[1],
|
|
2893
2888
|
setIsHover = _f.setIsHover,
|
|
2894
|
-
setIsActive = _f.setIsActive
|
|
2895
|
-
setIsFocused = _f.setIsFocused;
|
|
2889
|
+
setIsActive = _f.setIsActive;
|
|
2896
2890
|
var getIconColor = function getIconColor(icon) {
|
|
2897
2891
|
var _a;
|
|
2898
|
-
if (color === 'primary' && variant === 'default' &&
|
|
2892
|
+
if (color === 'primary' && variant === 'default' && mouseState.isActive) {
|
|
2899
2893
|
return 'primary';
|
|
2900
2894
|
}
|
|
2901
2895
|
if (color === 'primary' && !children) {
|
|
2902
|
-
if (mouseState.isActive
|
|
2896
|
+
if (mouseState.isActive) {
|
|
2903
2897
|
return 'primary';
|
|
2904
2898
|
}
|
|
2905
2899
|
if (mouseState.isHover) {
|
|
@@ -2907,7 +2901,7 @@ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
2907
2901
|
}
|
|
2908
2902
|
}
|
|
2909
2903
|
if (color === 'danger' && !children) {
|
|
2910
|
-
if (mouseState.isActive
|
|
2904
|
+
if (mouseState.isActive) {
|
|
2911
2905
|
return 'danger';
|
|
2912
2906
|
}
|
|
2913
2907
|
if (mouseState.isHover) {
|
|
@@ -2937,12 +2931,6 @@ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
2937
2931
|
},
|
|
2938
2932
|
onMouseUp: function onMouseUp() {
|
|
2939
2933
|
return setIsActive(false);
|
|
2940
|
-
},
|
|
2941
|
-
onFocus: function onFocus() {
|
|
2942
|
-
return setIsFocused(true);
|
|
2943
|
-
},
|
|
2944
|
-
onBlur: function onBlur() {
|
|
2945
|
-
return setIsFocused(false);
|
|
2946
2934
|
}
|
|
2947
2935
|
}, {
|
|
2948
2936
|
children: [startIcon && jsx(Icon, {
|
|
@@ -3092,60 +3080,54 @@ function Chip(_a) {
|
|
|
3092
3080
|
}));
|
|
3093
3081
|
}
|
|
3094
3082
|
|
|
3095
|
-
var css_248z$7 = ".maru-input-wrapper .maru-input-label {\n margin-bottom: 8px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n}\n.maru-input-wrapper .maru-input {\n border: 1px solid #e4e4e4;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n height: 37px;\n padding: 8px 10px 8px 14px;\n border-radius: 8px;\n}\n.maru-input-wrapper .maru-input:focus-visible, .maru-input-wrapper .maru-input:focus-within {\n border: 2px solid #e4e4e4;\n background-color: #fafafa;\n}\n.maru-input-wrapper .maru-input.errored {\n border: 2px solid #e53e3e;\n}\n.maru-input-wrapper .maru-input.errored:focus-visible, .maru-input-wrapper .maru-input.errored:focus-within {\n border: 2px solid #e4e4e4;\n background-color: #fafafa;\n}\n.maru-input-wrapper .maru-input:hover {\n border: 2px solid #e4e4e4;\n background-color: #fafafa;\n}\n.maru-input-wrapper .maru-input > input {\n width: 100%;\n border: unset;\n outline: unset;\n background-color: transparent;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n color: #5c5c5c;\n}\n.maru-input-wrapper .maru-input > input::-webkit-input-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input::-moz-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input:-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input::-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input::placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input-start-node {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n margin-right: 10px;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper > button {\n padding: unset;\n margin: unset;\n border: unset;\n background-color: unset;\n cursor: pointer;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper > button:last-of-type {\n margin-left:
|
|
3083
|
+
var css_248z$7 = ".maru-input-wrapper.disabled input {\n opacity: 0.5;\n pointer-events: none;\n}\n.maru-input-wrapper.disabled .maru-input-default:hover,\n.maru-input-wrapper.disabled .maru-input-default:focus-within,\n.maru-input-wrapper.disabled .maru-input-underline:hover,\n.maru-input-wrapper.disabled .maru-input-underline:focus-within {\n border-color: transparent;\n outline: transparent;\n}\n.maru-input-wrapper .maru-input-label {\n margin-bottom: 8px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n}\n.maru-input-wrapper .maru-input {\n border: 1px solid #e4e4e4;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n height: 37px;\n padding: 8px 10px 8px 14px;\n border-radius: 8px;\n}\n.maru-input-wrapper .maru-input:focus-visible, .maru-input-wrapper .maru-input:focus-within {\n border: 2px solid #e4e4e4;\n background-color: #fafafa;\n}\n.maru-input-wrapper .maru-input.errored {\n border: 2px solid #e53e3e;\n}\n.maru-input-wrapper .maru-input.errored:focus-visible, .maru-input-wrapper .maru-input.errored:focus-within {\n border: 2px solid #e4e4e4;\n background-color: #fafafa;\n}\n.maru-input-wrapper .maru-input:hover {\n border: 2px solid #e4e4e4;\n background-color: #fafafa;\n}\n.maru-input-wrapper .maru-input > input {\n width: 100%;\n border: unset;\n outline: unset;\n background-color: transparent;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n color: #5c5c5c;\n}\n.maru-input-wrapper .maru-input > input::-webkit-input-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input::-moz-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input:-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input::-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input > input::placeholder {\n color: #bdbdbd;\n}\n.maru-input-wrapper .maru-input-start-node {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n margin-right: 10px;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper > button {\n padding: unset;\n margin: unset;\n border: unset;\n background-color: unset;\n cursor: pointer;\n width: 16px;\n height: 16px;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper > button:last-of-type {\n margin-left: 10px;\n}\n.maru-input-wrapper .maru-input-end-node-wrapper .maru-input-end-node {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n margin-left: 10px;\n}\n.maru-input-wrapper .maru-input-footer {\n display: block;\n margin-top: 4px;\n}\n.maru-input-wrapper .maru-input-footer > span {\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 12px;\n letter-spacing: -0.48px;\n font-weight: 500;\n color: #e53e3e;\n}";
|
|
3096
3084
|
styleInject(css_248z$7);
|
|
3097
3085
|
|
|
3098
3086
|
var Input = /*#__PURE__*/forwardRef(function (_a, inputRef) {
|
|
3099
|
-
var
|
|
3087
|
+
var onClear = _a.onClear,
|
|
3088
|
+
errorMessage = _a.errorMessage,
|
|
3100
3089
|
label = _a.label,
|
|
3101
|
-
onClear = _a.onClear,
|
|
3102
3090
|
_b = _a.type,
|
|
3103
3091
|
type = _b === void 0 ? 'text' : _b,
|
|
3104
3092
|
wrapperRef = _a.wrapperRef,
|
|
3105
3093
|
startNode = _a.startNode,
|
|
3106
3094
|
endNode = _a.endNode,
|
|
3107
|
-
props = __rest(_a, ["
|
|
3095
|
+
props = __rest(_a, ["onClear", "errorMessage", "label", "type", "wrapperRef", "startNode", "endNode"]);
|
|
3108
3096
|
var _c = useState(true),
|
|
3109
|
-
|
|
3110
|
-
|
|
3097
|
+
pwdVision = _c[0],
|
|
3098
|
+
setPwdVision = _c[1];
|
|
3111
3099
|
var _d = useState(false),
|
|
3112
3100
|
showClearButton = _d[0],
|
|
3113
3101
|
setShowClearButton = _d[1];
|
|
3114
3102
|
var combineRef = useCombineRef(inputRef);
|
|
3115
3103
|
var hashId = uuidv4(4);
|
|
3116
|
-
var currType = type !== 'password' ? 'text' : !isPwdInVisible ? 'text' : 'password';
|
|
3117
|
-
var setShowClearButtnWithClearProp = function setShowClearButtnWithClearProp(bool) {
|
|
3118
|
-
if (onClear) {
|
|
3119
|
-
setShowClearButton(bool);
|
|
3120
|
-
}
|
|
3121
|
-
};
|
|
3122
3104
|
useEffect(function () {
|
|
3123
3105
|
return function () {
|
|
3124
|
-
|
|
3125
|
-
|
|
3106
|
+
setPwdVision(false);
|
|
3107
|
+
setShowClearButton(false);
|
|
3126
3108
|
};
|
|
3127
3109
|
}, []);
|
|
3128
3110
|
useEffect(function () {
|
|
3129
3111
|
if (props.defaultValue) {
|
|
3130
|
-
|
|
3112
|
+
setShowClearButton(true);
|
|
3131
3113
|
}
|
|
3132
3114
|
}, [props.defaultValue]);
|
|
3133
3115
|
useEffect(function () {
|
|
3134
3116
|
var _a;
|
|
3135
3117
|
if ((_a = combineRef.current) === null || _a === void 0 ? void 0 : _a.value) {
|
|
3136
|
-
|
|
3118
|
+
setShowClearButton(true);
|
|
3137
3119
|
}
|
|
3138
3120
|
}, [combineRef.current]);
|
|
3139
3121
|
var handleInputChange = function handleInputChange(e) {
|
|
3140
3122
|
var _a, _b;
|
|
3141
|
-
|
|
3142
|
-
var
|
|
3143
|
-
if (!
|
|
3144
|
-
|
|
3123
|
+
setShowClearButton(true);
|
|
3124
|
+
var curValue = e.currentTarget.value;
|
|
3125
|
+
if (!curValue) {
|
|
3126
|
+
setShowClearButton(false);
|
|
3145
3127
|
}
|
|
3146
|
-
if (type === 'number' && !!
|
|
3147
|
-
if (!/[0-9,-]/.test(
|
|
3148
|
-
e.currentTarget.value =
|
|
3128
|
+
if (type === 'number' && !!curValue.at(-1)) {
|
|
3129
|
+
if (!/[0-9,-]/.test(curValue.at(-1)) || /^-*/.test(curValue) && (((_a = curValue.match(/-/g)) === null || _a === void 0 ? void 0 : _a.length) || 0) > 1) {
|
|
3130
|
+
e.currentTarget.value = curValue.slice(0, curValue.length - 1);
|
|
3149
3131
|
}
|
|
3150
3132
|
}
|
|
3151
3133
|
(_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, e);
|
|
@@ -3153,88 +3135,23 @@ var Input = /*#__PURE__*/forwardRef(function (_a, inputRef) {
|
|
|
3153
3135
|
var handleInputBlur = function handleInputBlur(e) {
|
|
3154
3136
|
var _a;
|
|
3155
3137
|
if (type === 'number') {
|
|
3156
|
-
var
|
|
3157
|
-
e.currentTarget.value = "".concat(
|
|
3138
|
+
var curValue = e.currentTarget.value;
|
|
3139
|
+
e.currentTarget.value = "".concat(curValue != null && curValue !== '' ? +curValue : '');
|
|
3158
3140
|
}
|
|
3159
3141
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
3160
3142
|
};
|
|
3161
|
-
var
|
|
3162
|
-
return function () {
|
|
3163
|
-
setIsPwdInVisible(isVisible);
|
|
3164
|
-
};
|
|
3165
|
-
};
|
|
3166
|
-
var handleQueryClearClick = function handleQueryClearClick() {
|
|
3143
|
+
var handleClearClick = function handleClearClick() {
|
|
3167
3144
|
if (combineRef.current) {
|
|
3168
|
-
|
|
3145
|
+
setShowClearButton(false);
|
|
3169
3146
|
combineRef.current.value = '';
|
|
3170
3147
|
combineRef.current.focus();
|
|
3171
3148
|
}
|
|
3172
|
-
onClear
|
|
3173
|
-
};
|
|
3174
|
-
var EndNode = function EndNode() {
|
|
3175
|
-
var passwordElement = null;
|
|
3176
|
-
var clearElement = null;
|
|
3177
|
-
var nodeElement = null;
|
|
3178
|
-
if (type === 'password') {
|
|
3179
|
-
if (!isPwdInVisible) {
|
|
3180
|
-
passwordElement = jsx("button", __assign({
|
|
3181
|
-
type: "button",
|
|
3182
|
-
onClick: handlePwdVisibleClick(true),
|
|
3183
|
-
className: "maru-input-end-icon-wrapper",
|
|
3184
|
-
tabIndex: -1
|
|
3185
|
-
}, {
|
|
3186
|
-
children: jsx(Icon, {
|
|
3187
|
-
name: ICONS.FiEyeOffThin,
|
|
3188
|
-
color: "#bdbdbd",
|
|
3189
|
-
size: 16
|
|
3190
|
-
})
|
|
3191
|
-
}));
|
|
3192
|
-
} else {
|
|
3193
|
-
passwordElement = jsx("button", __assign({
|
|
3194
|
-
type: "button",
|
|
3195
|
-
onClick: handlePwdVisibleClick(false),
|
|
3196
|
-
className: "maru-input-end-icon-wrapper",
|
|
3197
|
-
tabIndex: -1
|
|
3198
|
-
}, {
|
|
3199
|
-
children: jsx(Icon, {
|
|
3200
|
-
name: ICONS.FiEyeThin,
|
|
3201
|
-
color: "#bdbdbd",
|
|
3202
|
-
size: 16
|
|
3203
|
-
})
|
|
3204
|
-
}));
|
|
3205
|
-
}
|
|
3206
|
-
}
|
|
3207
|
-
if (endNode) {
|
|
3208
|
-
nodeElement = jsx("span", __assign({
|
|
3209
|
-
className: "maru-input-end-node"
|
|
3210
|
-
}, {
|
|
3211
|
-
children: endNode
|
|
3212
|
-
}));
|
|
3213
|
-
}
|
|
3214
|
-
if (onClear && showClearButton) {
|
|
3215
|
-
clearElement = jsx("button", __assign({
|
|
3216
|
-
type: "button",
|
|
3217
|
-
onClick: handleQueryClearClick,
|
|
3218
|
-
className: "maru-input-end-icon-wrapper",
|
|
3219
|
-
tabIndex: -1
|
|
3220
|
-
}, {
|
|
3221
|
-
children: jsx(Icon, {
|
|
3222
|
-
name: ICONS.XSmallThin,
|
|
3223
|
-
color: "#bdbdbd",
|
|
3224
|
-
size: 16
|
|
3225
|
-
})
|
|
3226
|
-
}));
|
|
3227
|
-
}
|
|
3228
|
-
return jsxs("div", __assign({
|
|
3229
|
-
className: "maru-input-end-node-wrapper"
|
|
3230
|
-
}, {
|
|
3231
|
-
children: [!props.disabled && passwordElement, !clearElement ? nodeElement : null, !props.disabled && clearElement]
|
|
3232
|
-
}));
|
|
3149
|
+
onClear();
|
|
3233
3150
|
};
|
|
3234
3151
|
return jsxs("div", __assign({
|
|
3235
3152
|
ref: wrapperRef,
|
|
3236
3153
|
className: classNames('maru-input-wrapper', props.className, {
|
|
3237
|
-
|
|
3154
|
+
disabled: props.disabled
|
|
3238
3155
|
})
|
|
3239
3156
|
}, {
|
|
3240
3157
|
children: [label && jsx("div", __assign({
|
|
@@ -3250,17 +3167,49 @@ var Input = /*#__PURE__*/forwardRef(function (_a, inputRef) {
|
|
|
3250
3167
|
errored: errorMessage
|
|
3251
3168
|
})
|
|
3252
3169
|
}, {
|
|
3253
|
-
children: [startNode && jsx("
|
|
3170
|
+
children: [startNode && jsx("div", __assign({
|
|
3254
3171
|
className: "maru-input-start-node"
|
|
3255
3172
|
}, {
|
|
3256
3173
|
children: startNode
|
|
3257
3174
|
})), jsx("input", __assign({}, props, {
|
|
3258
3175
|
id: "maru-input-".concat(hashId),
|
|
3259
3176
|
ref: combineRef,
|
|
3260
|
-
type:
|
|
3177
|
+
type: type === 'password' && pwdVision ? 'password' : 'text',
|
|
3261
3178
|
onChange: handleInputChange,
|
|
3262
3179
|
onBlur: handleInputBlur
|
|
3263
|
-
})),
|
|
3180
|
+
})), jsxs("div", __assign({
|
|
3181
|
+
className: "maru-input-end-node-wrapper"
|
|
3182
|
+
}, {
|
|
3183
|
+
children: [type === 'password' && !props.disabled && jsx("button", __assign({
|
|
3184
|
+
type: "button",
|
|
3185
|
+
onClick: function onClick() {
|
|
3186
|
+
return setPwdVision(function (prev) {
|
|
3187
|
+
return !prev;
|
|
3188
|
+
});
|
|
3189
|
+
},
|
|
3190
|
+
tabIndex: -1
|
|
3191
|
+
}, {
|
|
3192
|
+
children: jsx(Icon, {
|
|
3193
|
+
name: pwdVision ? ICONS.FiEyeThin : ICONS.FiEyeOffThin,
|
|
3194
|
+
color: "#bdbdbd",
|
|
3195
|
+
size: 16
|
|
3196
|
+
})
|
|
3197
|
+
})), endNode && jsx("div", __assign({
|
|
3198
|
+
className: "maru-input-end-node"
|
|
3199
|
+
}, {
|
|
3200
|
+
children: endNode
|
|
3201
|
+
})), showClearButton && !props.disabled && jsx("button", __assign({
|
|
3202
|
+
type: "button",
|
|
3203
|
+
onClick: handleClearClick,
|
|
3204
|
+
tabIndex: -1
|
|
3205
|
+
}, {
|
|
3206
|
+
children: jsx(Icon, {
|
|
3207
|
+
name: ICONS.XSmallThin,
|
|
3208
|
+
color: "#bdbdbd",
|
|
3209
|
+
size: 16
|
|
3210
|
+
})
|
|
3211
|
+
}))]
|
|
3212
|
+
}))]
|
|
3264
3213
|
})), errorMessage && jsx("div", __assign({
|
|
3265
3214
|
className: "maru-input-footer"
|
|
3266
3215
|
}, {
|
|
@@ -3273,7 +3222,6 @@ var Input = /*#__PURE__*/forwardRef(function (_a, inputRef) {
|
|
|
3273
3222
|
Input.defaultProps = {
|
|
3274
3223
|
errorMessage: undefined,
|
|
3275
3224
|
label: undefined,
|
|
3276
|
-
onClear: undefined,
|
|
3277
3225
|
type: 'text',
|
|
3278
3226
|
wrapperRef: undefined,
|
|
3279
3227
|
startNode: undefined,
|
|
@@ -5298,19 +5246,19 @@ function Toggle(_a) {
|
|
|
5298
5246
|
});
|
|
5299
5247
|
}
|
|
5300
5248
|
|
|
5301
|
-
var css_248z$3 = ".maru-tooltip {\n z-index: 1612;\n border-radius: 5px;\n padding: 2px 4px;\n display: none;\n}\n.maru-tooltip[data-open=true] {\n display:
|
|
5249
|
+
var css_248z$3 = ".maru-tooltip-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n\n.maru-tooltip {\n z-index: 1612;\n border-radius: 5px;\n padding: 2px 4px;\n display: none;\n}\n.maru-tooltip[data-open=true] {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n.maru-tooltip[data-open=false] {\n display: none;\n}\n.maru-tooltip.maru-tooltip-default {\n background-color: rgba(92, 92, 92, 0.5019607843);\n}\n.maru-tooltip.maru-tooltip-default,\n.maru-tooltip.maru-tooltip-default span,\n.maru-tooltip.maru-tooltip-default p,\n.maru-tooltip.maru-tooltip-default pre {\n color: white;\n white-space: pre-wrap;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n}\n.maru-tooltip.maru-tooltip-error {\n background-color: rgba(229, 62, 62, 0.1019607843);\n}\n.maru-tooltip.maru-tooltip-error .maru-tooltip-error-icon-wrapper {\n width: 16px;\n height: 16px;\n margin-right: 4px;\n transform: translateY(-1px);\n}\n.maru-tooltip.maru-tooltip-error,\n.maru-tooltip.maru-tooltip-error span,\n.maru-tooltip.maru-tooltip-error p,\n.maru-tooltip.maru-tooltip-error pre {\n color: #e53e3e;\n white-space: pre-wrap;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n}";
|
|
5302
5250
|
styleInject(css_248z$3);
|
|
5303
5251
|
|
|
5304
5252
|
function Tooltip(_a) {
|
|
5305
5253
|
var children = _a.children,
|
|
5306
5254
|
content = _a.content,
|
|
5307
5255
|
className = _a.className,
|
|
5308
|
-
_b = _a.
|
|
5309
|
-
|
|
5310
|
-
_c = _a.
|
|
5311
|
-
|
|
5312
|
-
_d = _a.
|
|
5313
|
-
|
|
5256
|
+
_b = _a.direction,
|
|
5257
|
+
direction = _b === void 0 ? 'bottom-start' : _b,
|
|
5258
|
+
_c = _a.portal,
|
|
5259
|
+
portal = _c === void 0 ? false : _c,
|
|
5260
|
+
_d = _a.variant,
|
|
5261
|
+
variant = _d === void 0 ? 'default' : _d;
|
|
5314
5262
|
var _e = useState(false),
|
|
5315
5263
|
open = _e[0],
|
|
5316
5264
|
setOpen = _e[1];
|
|
@@ -5349,17 +5297,25 @@ function Tooltip(_a) {
|
|
|
5349
5297
|
}
|
|
5350
5298
|
}, [open]);
|
|
5351
5299
|
var Tootip = useMemo(function () {
|
|
5352
|
-
return
|
|
5353
|
-
className: classNames('maru-tooltip', "maru-tooltip-".concat(
|
|
5300
|
+
return jsxs("div", __assign({
|
|
5301
|
+
className: classNames('maru-tooltip', "maru-tooltip-".concat(variant)),
|
|
5354
5302
|
ref: tooltipRef,
|
|
5355
5303
|
role: "tooltip",
|
|
5356
5304
|
"data-open": open
|
|
5357
5305
|
}, {
|
|
5358
|
-
children:
|
|
5306
|
+
children: [variant === 'error' && jsx("div", __assign({
|
|
5307
|
+
className: "maru-tooltip-error-icon-wrapper"
|
|
5308
|
+
}, {
|
|
5309
|
+
children: jsx(Icon, {
|
|
5310
|
+
name: ICONS.AlertCircleThin,
|
|
5311
|
+
size: 16,
|
|
5312
|
+
color: "danger"
|
|
5313
|
+
})
|
|
5314
|
+
})), content]
|
|
5359
5315
|
}));
|
|
5360
5316
|
}, [open]);
|
|
5361
5317
|
return jsxs("div", __assign({
|
|
5362
|
-
className: className,
|
|
5318
|
+
className: classNames('maru-tooltip-wrapper', className),
|
|
5363
5319
|
ref: wrapperRef,
|
|
5364
5320
|
onMouseOver: function onMouseOver() {
|
|
5365
5321
|
return setOpen(true);
|
|
@@ -5657,7 +5613,6 @@ function DropdownMenu(_a) {
|
|
|
5657
5613
|
filteredData = _a.filteredData,
|
|
5658
5614
|
width = _a.width,
|
|
5659
5615
|
height = _a.height,
|
|
5660
|
-
noMessage = _a.noMessage,
|
|
5661
5616
|
CustomMenuItem = _a.customMenuItem,
|
|
5662
5617
|
onSelect = _a.onSelect,
|
|
5663
5618
|
closeMenu = _a.closeMenu;
|
|
@@ -5733,7 +5688,7 @@ function DropdownMenu(_a) {
|
|
|
5733
5688
|
maxHeight: height ? "".concat(height, "px") : 'auto'
|
|
5734
5689
|
}
|
|
5735
5690
|
}, {
|
|
5736
|
-
children: filteredData
|
|
5691
|
+
children: filteredData === null || filteredData === void 0 ? void 0 : filteredData.map(function (item) {
|
|
5737
5692
|
return jsx("button", __assign({
|
|
5738
5693
|
type: "button",
|
|
5739
5694
|
className: classNames('maru-dropdown-menu-item', {
|
|
@@ -5764,19 +5719,13 @@ function DropdownMenu(_a) {
|
|
|
5764
5719
|
}
|
|
5765
5720
|
})
|
|
5766
5721
|
}), "maru-dropdown-menu-item-".concat(item[idKey]));
|
|
5767
|
-
})
|
|
5768
|
-
className: "maru-dropdown-menu-no-data"
|
|
5769
|
-
}, {
|
|
5770
|
-
children: jsx("span", {
|
|
5771
|
-
children: noMessage
|
|
5772
|
-
})
|
|
5773
|
-
}))
|
|
5722
|
+
})
|
|
5774
5723
|
}))
|
|
5775
5724
|
}))
|
|
5776
5725
|
}));
|
|
5777
5726
|
}
|
|
5778
5727
|
|
|
5779
|
-
var css_248z$2 = ".maru-dropdown .maru-dropdown-label {\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n color: #5c5c5c;\n display: block;\n margin-bottom: 4px;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper {\n width: 100%;\n border-radius: 8px;\n border: 1px solid #e4e4e4;\n cursor: pointer;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:hover {\n border: 1px solid var(--p);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:hover .maru-dropdown-input > input {\n color: var(--p);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:focus-within {\n border: 1px solid var(--p);\n outline: none;\n background-color: var(--p-10);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:focus-within .maru-dropdown-input > input {\n color: var(--p);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:hover {\n border: 1px solid #8c8c8c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:hover .maru-dropdown-input > input {\n color: #8c8c8c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:focus-within {\n border: 1px solid #8c8c8c;\n outline: none;\n background-color: #fafafa;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:focus-within .maru-dropdown-input > input {\n color: #8c8c8c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:hover {\n border: 1px solid #58c5a6;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:hover .maru-dropdown-input > input {\n color: #58c5a6;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:focus-within {\n border: 1px solid #58c5a6;\n outline: none;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:focus-within .maru-dropdown-input > input {\n color: #58c5a6;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:hover {\n border: 1px solid #ffb020;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:hover .maru-dropdown-input > input {\n color: #ffb020;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:focus-within {\n border: 1px solid #ffb020;\n outline: none;\n background-color: #fff7e9;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:focus-within .maru-dropdown-input > input {\n color: #ffb020;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:hover {\n border: 1px solid #e53e3e;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:hover .maru-dropdown-input > input {\n color: #e53e3e;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:focus-within {\n border: 1px solid #e53e3e;\n outline: none;\n background-color: #fcecec;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:focus-within .maru-dropdown-input > input {\n color: #e53e3e;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.inline-label-wrapper .maru-dropdown-button {\n padding: 2px 10px 2px 14px;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .inline-label {\n display: block;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 10px;\n letter-spacing: -0.4px;\n font-weight: 500;\n color: #bdbdbd;\n padding: 2px 10px 0 14px;\n transform: translateY(3px);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n width: 100%;\n height: 37px;\n border: unset;\n border-radius: 8px;\n background-color: transparent;\n cursor: pointer;\n padding: 8px 10px 8px 14px;\n color: #5c5c5c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-button .maru-dropdown-button-contents {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-button .maru-dropdown-button-contents.placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n width: 100%;\n height: 37px;\n border: unset;\n border-radius: 8px;\n background-color: transparent;\n cursor: pointer;\n padding: 8px 10px 8px 14px;\n color: #5c5c5c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input {\n width: 100%;\n height: 100%;\n border: unset;\n outline: unset;\n background-color: unset;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::-webkit-input-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::-moz-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input:-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-toggle-arrow {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.errored {\n border: 2px solid #e53e3e;\n}\n.maru-dropdown .maru-dropdown-error-message {\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 12px;\n letter-spacing: -0.48px;\n font-weight: 500;\n color: #e53e3e;\n display: block;\n margin-top: 4px;\n}\n\n.maru-dropdown-menu-wrapper {\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n position: fixed;\n z-index: 1600;\n display: none;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu {\n margin-top: 4px;\n position: absolute;\n z-index: 1601;\n border-radius: 8px;\n box-shadow: 0px 0px 6px #e4e4e4;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper {\n overflow-y: auto;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n width: 100%;\n background-color: white;\n border: unset;\n cursor: pointer;\n height: 37px;\n padding: 8px 14px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n color: #5c5c5c;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item-selected, .maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item:hover {\n background-color: #fafafa;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item-span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n text-align: start;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item-span em {\n font-style: unset;\n background-color: var(--p-20-per);\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-no-data {\n background-color: transparent;\n border: unset;\n}";
|
|
5728
|
+
var css_248z$2 = ".maru-dropdown .maru-dropdown-label {\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 600;\n color: #5c5c5c;\n display: block;\n margin-bottom: 4px;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper {\n width: 100%;\n border-radius: 8px;\n border: 1px solid #e4e4e4;\n cursor: pointer;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:hover {\n border: 1px solid var(--p);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:hover .maru-dropdown-input > input {\n color: var(--p);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:focus-within {\n border: 1px solid var(--p);\n outline: none;\n background-color: var(--p-10);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-primary:focus-within .maru-dropdown-input > input {\n color: var(--p);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:hover {\n border: 1px solid #8c8c8c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:hover .maru-dropdown-input > input {\n color: #8c8c8c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:focus-within {\n border: 1px solid #8c8c8c;\n outline: none;\n background-color: #fafafa;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-secondary:focus-within .maru-dropdown-input > input {\n color: #8c8c8c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:hover {\n border: 1px solid #58c5a6;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:hover .maru-dropdown-input > input {\n color: #58c5a6;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:focus-within {\n border: 1px solid #58c5a6;\n outline: none;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-positive:focus-within .maru-dropdown-input > input {\n color: #58c5a6;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:hover {\n border: 1px solid #ffb020;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:hover .maru-dropdown-input > input {\n color: #ffb020;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:focus-within {\n border: 1px solid #ffb020;\n outline: none;\n background-color: #fff7e9;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-warning:focus-within .maru-dropdown-input > input {\n color: #ffb020;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:hover {\n border: 1px solid #e53e3e;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:hover .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:hover .maru-dropdown-input > input {\n color: #e53e3e;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:active, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:focus-within {\n border: 1px solid #e53e3e;\n outline: none;\n background-color: #fcecec;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:active .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:active .maru-dropdown-input > input, .maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:focus-within .maru-dropdown-button,\n.maru-dropdown .maru-dropdown-toggle-wrapper.maru-dropdown-toggle-wrapper-danger:focus-within .maru-dropdown-input > input {\n color: #e53e3e;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.inline-label-wrapper .maru-dropdown-button {\n padding: 2px 10px 2px 14px;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .inline-label {\n display: block;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 10px;\n letter-spacing: -0.4px;\n font-weight: 500;\n color: #bdbdbd;\n padding: 2px 10px 0 14px;\n transform: translateY(3px);\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n width: 100%;\n height: 37px;\n border: unset;\n border-radius: 8px;\n background-color: transparent;\n cursor: pointer;\n padding: 8px 10px 8px 14px;\n color: #5c5c5c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-button .maru-dropdown-button-contents {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-button .maru-dropdown-button-contents.placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n width: 100%;\n height: 37px;\n border: unset;\n border-radius: 8px;\n background-color: transparent;\n cursor: pointer;\n padding: 8px 10px 8px 14px;\n color: #5c5c5c;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input {\n width: 100%;\n height: 100%;\n border: unset;\n outline: unset;\n background-color: unset;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::-webkit-input-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::-moz-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input:-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::-ms-input-placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-input > input::placeholder {\n color: #bdbdbd;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper .maru-dropdown-toggle-arrow {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n.maru-dropdown .maru-dropdown-toggle-wrapper.errored {\n border: 2px solid #e53e3e;\n}\n.maru-dropdown .maru-dropdown-error-message {\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 12px;\n letter-spacing: -0.48px;\n font-weight: 500;\n color: #e53e3e;\n display: block;\n margin-top: 4px;\n}\n\n.maru-dropdown-menu-wrapper {\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n position: fixed;\n z-index: 1600;\n display: none;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu {\n margin-top: 4px;\n position: absolute;\n z-index: 1601;\n border-radius: 8px;\n box-shadow: 0px 0px 6px #e4e4e4;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper {\n overflow-y: auto;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n width: 100%;\n background-color: white;\n border: unset;\n cursor: pointer;\n height: 37px;\n padding: 8px 14px;\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 14px;\n letter-spacing: -0.56px;\n font-weight: 500;\n color: #5c5c5c;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item-selected, .maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item:hover {\n background-color: #fafafa;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item-span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n text-align: start;\n}\n.maru-dropdown-menu-wrapper .maru-dropdown-menu .maru-dropdown-menu-item-wrapper .maru-dropdown-menu-item-span em {\n font-style: unset;\n background-color: var(--p-20-per);\n}";
|
|
5780
5729
|
styleInject(css_248z$2);
|
|
5781
5730
|
|
|
5782
5731
|
// eslint-disable-next-line import/prefer-default-export
|
|
@@ -5796,8 +5745,6 @@ function Dropdown(_a) {
|
|
|
5796
5745
|
errorMessage = _a.errorMessage,
|
|
5797
5746
|
inlineLabel = _a.inlineLabel,
|
|
5798
5747
|
label = _a.label,
|
|
5799
|
-
noDataMessage = _a.noDataMessage,
|
|
5800
|
-
noSearchedMessage = _a.noSearchedMessage,
|
|
5801
5748
|
onClear = _a.onClear,
|
|
5802
5749
|
placeholder = _a.placeholder,
|
|
5803
5750
|
startArrow = _a.startArrow,
|
|
@@ -5966,7 +5913,7 @@ function Dropdown(_a) {
|
|
|
5966
5913
|
className: "maru-dropdown-error-message"
|
|
5967
5914
|
}, {
|
|
5968
5915
|
children: errorMessage
|
|
5969
|
-
})), open && jsx(CreatePortal, __assign({
|
|
5916
|
+
})), open && filteredData.length > 0 && jsx(CreatePortal, __assign({
|
|
5970
5917
|
parent: anchorEl || wrapperRef.current
|
|
5971
5918
|
}, {
|
|
5972
5919
|
children: jsx(DropdownMenu, {
|
|
@@ -5978,7 +5925,6 @@ function Dropdown(_a) {
|
|
|
5978
5925
|
filteredData: filteredData,
|
|
5979
5926
|
width: width,
|
|
5980
5927
|
height: height,
|
|
5981
|
-
noMessage: type === 'button' ? noDataMessage : noSearchedMessage,
|
|
5982
5928
|
customMenuItem: customMenuItem,
|
|
5983
5929
|
onSelect: onSelect,
|
|
5984
5930
|
closeMenu: closeMenu
|