@pop-ui/core 0.0.11 → 0.0.14
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/README.md +1 -1
- package/dist/assets/PretendardVariable.woff2 +0 -0
- package/dist/assets/core-O7aPPk54.css +1 -0
- package/dist/core.js +490 -463
- package/dist/core.umd.cjs +1 -1
- package/dist/types/index.d.ts +206 -1
- package/package.json +70 -79
- package/dist/components/Alert/Alert.stories.js +0 -18
- package/dist/components/Alert/index.js +0 -31
- package/dist/components/Button/Button.stories.js +0 -42
- package/dist/components/Button/index.js +0 -28
- package/dist/components/Checkbox/Checkbox.stories.js +0 -14
- package/dist/components/Checkbox/index.js +0 -23
- package/dist/components/DatePicker/DatePicker.stories.js +0 -27
- package/dist/components/DatePicker/index.js +0 -23
- package/dist/components/Dropdown/Dropdown.stories.js +0 -16
- package/dist/components/Dropdown/index.js +0 -40
- package/dist/components/ImageUploader/ImageUploader.stories.js +0 -9
- package/dist/components/ImageUploader/index.js +0 -28
- package/dist/components/Modal/Modal.stories.js +0 -13
- package/dist/components/Modal/index.js +0 -20
- package/dist/components/Pagination/Pagination.stories.js +0 -14
- package/dist/components/Pagination/index.js +0 -49
- package/dist/components/Radio/Radio.stories.js +0 -14
- package/dist/components/Radio/index.js +0 -15
- package/dist/components/SearchBar/SearchBar.stories.js +0 -16
- package/dist/components/SearchBar/index.js +0 -34
- package/dist/components/SegmentButton/SegmentButton.stories.js +0 -14
- package/dist/components/SegmentButton/index.js +0 -19
- package/dist/components/Tab/Tab.stories.js +0 -28
- package/dist/components/Tab/index.js +0 -8
- package/dist/components/Table/Table.stories.js +0 -127
- package/dist/components/Table/index.js +0 -112
- package/dist/components/TextField/TextField.stories.js +0 -36
- package/dist/components/TextField/index.js +0 -44
- package/dist/components/TimePicker/TimePicker.stories.js +0 -13
- package/dist/components/TimePicker/index.js +0 -26
- package/dist/components/Toggle/Toggle.stories.js +0 -15
- package/dist/components/Toggle/index.js +0 -34
- package/dist/components/Tooltip/Tooltip.stories.js +0 -24
- package/dist/components/Tooltip/index.js +0 -8
- package/dist/components/index.js +0 -17
- package/dist/components/shared/styles.js +0 -219
- package/dist/core.css +0 -1
- package/dist/helpers/checkMessage/checkMessage.test.js +0 -9
- package/dist/helpers/checkMessage/index.js +0 -8
- package/dist/index.js +0 -1
- package/dist/types/components/Alert/Alert.stories.d.ts +0 -3
- package/dist/types/components/Alert/index.d.ts +0 -9
- package/dist/types/components/Button/Button.stories.d.ts +0 -7
- package/dist/types/components/Button/index.d.ts +0 -8
- package/dist/types/components/Checkbox/Checkbox.stories.d.ts +0 -3
- package/dist/types/components/Checkbox/index.d.ts +0 -6
- package/dist/types/components/DatePicker/DatePicker.stories.d.ts +0 -5
- package/dist/types/components/DatePicker/index.d.ts +0 -9
- package/dist/types/components/Dropdown/Dropdown.stories.d.ts +0 -3
- package/dist/types/components/Dropdown/index.d.ts +0 -12
- package/dist/types/components/ImageUploader/ImageUploader.stories.d.ts +0 -3
- package/dist/types/components/ImageUploader/index.d.ts +0 -12
- package/dist/types/components/Modal/Modal.stories.d.ts +0 -3
- package/dist/types/components/Modal/index.d.ts +0 -7
- package/dist/types/components/Pagination/Pagination.stories.d.ts +0 -3
- package/dist/types/components/Pagination/index.d.ts +0 -10
- package/dist/types/components/Radio/Radio.stories.d.ts +0 -3
- package/dist/types/components/Radio/index.d.ts +0 -6
- package/dist/types/components/SearchBar/SearchBar.stories.d.ts +0 -3
- package/dist/types/components/SearchBar/index.d.ts +0 -14
- package/dist/types/components/SegmentButton/SegmentButton.stories.d.ts +0 -3
- package/dist/types/components/SegmentButton/index.d.ts +0 -7
- package/dist/types/components/Tab/Tab.stories.d.ts +0 -3
- package/dist/types/components/Tab/index.d.ts +0 -13
- package/dist/types/components/Table/Table.stories.d.ts +0 -5
- package/dist/types/components/Table/index.d.ts +0 -23
- package/dist/types/components/TextField/TextField.stories.d.ts +0 -5
- package/dist/types/components/TextField/index.d.ts +0 -18
- package/dist/types/components/TimePicker/TimePicker.stories.d.ts +0 -3
- package/dist/types/components/TimePicker/index.d.ts +0 -6
- package/dist/types/components/Toggle/Toggle.stories.d.ts +0 -3
- package/dist/types/components/Toggle/index.d.ts +0 -9
- package/dist/types/components/Tooltip/Tooltip.stories.d.ts +0 -3
- package/dist/types/components/Tooltip/index.d.ts +0 -7
- package/dist/types/components/index.d.ts +0 -17
- package/dist/types/components/shared/styles.d.ts +0 -86
- package/dist/types/helpers/checkMessage/checkMessage.test.d.ts +0 -1
- package/dist/types/helpers/checkMessage/index.d.ts +0 -1
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { createElement as _createElement } from "react";
|
|
3
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
import styles from "./styles.module.scss";
|
|
5
|
-
import { useCallback, useMemo, useState } from "react";
|
|
6
|
-
import { DragDropContext, Draggable, Droppable, } from "react-beautiful-dnd";
|
|
7
|
-
import ic_sortable from "../../assets/icons/ic_sortable.svg";
|
|
8
|
-
import ic_chevron_up from "../../assets/icons/ic_chevron_up.svg";
|
|
9
|
-
import ic_chevron_down from "../../assets/icons/ic_chevron_down.svg";
|
|
10
|
-
import ic_drag from "../../assets/icons/ic_drag.svg";
|
|
11
|
-
export const Table = ({ tableId, headerList, tableData, sortable, draggable = false, striped, onDragEnd, className, }) => {
|
|
12
|
-
const [rows, setRows] = useState();
|
|
13
|
-
const [sortedColIndex, setSortedColIndex] = useState();
|
|
14
|
-
const [sortedDirection, setSortedDirection] = useState();
|
|
15
|
-
const rowMaker = useCallback((sortedData) => {
|
|
16
|
-
const tableRows = sortedData?.map((data, index) => {
|
|
17
|
-
const dataKeys = Object.keys(data);
|
|
18
|
-
const row = (_jsx(_Fragment, { children: dataKeys.map((key, keyIndex) => (_jsx("td", { className: styles.td_cell, children: data[key].cell }, `table_${tableId || 0}_tr_${index}_col_${keyIndex}`))) }));
|
|
19
|
-
if (draggable && data[dataKeys[0]]?.dndId === undefined) {
|
|
20
|
-
console.error("draggable table을 사용할 때엔 tableData의 첫번째 필드에 고유한 dndId를 설정해주세요");
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
row: row,
|
|
24
|
-
dndId: data[dataKeys[0]]?.dndId,
|
|
25
|
-
trClassName: data[dataKeys[0]]?.trClassName,
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
setRows(tableRows);
|
|
29
|
-
}, [draggable, tableId]);
|
|
30
|
-
useMemo(() => {
|
|
31
|
-
// 테이블 데이터 변경시, sort option 삭제
|
|
32
|
-
setSortedColIndex(undefined);
|
|
33
|
-
setSortedDirection(undefined);
|
|
34
|
-
rowMaker(tableData);
|
|
35
|
-
}, [rowMaker, tableData]);
|
|
36
|
-
const sortingHandler = useCallback((colIndex) => {
|
|
37
|
-
if (tableData) {
|
|
38
|
-
const copyArr = tableData.slice(0);
|
|
39
|
-
// 정렬 기준 키
|
|
40
|
-
const sortBy = Object.keys(copyArr[0])[colIndex];
|
|
41
|
-
setSortedColIndex(colIndex);
|
|
42
|
-
let newSortedData;
|
|
43
|
-
/*
|
|
44
|
-
정렬 순서
|
|
45
|
-
1. 내림차순
|
|
46
|
-
2. 오름차순
|
|
47
|
-
3. 초기화
|
|
48
|
-
1, 2, 3을 반복
|
|
49
|
-
*/
|
|
50
|
-
if (!sortedDirection) {
|
|
51
|
-
newSortedData = copyArr?.sort((a, b) => String(b[sortBy].sortTarget || b[sortBy].cell).localeCompare(String(a[sortBy].sortTarget || a[sortBy].cell)));
|
|
52
|
-
setSortedDirection("desc");
|
|
53
|
-
}
|
|
54
|
-
else if (sortedDirection === "desc") {
|
|
55
|
-
newSortedData = copyArr?.sort((a, b) => String(a[sortBy].sortTarget || a[sortBy].cell).localeCompare(String(b[sortBy].sortTarget || b[sortBy].cell)));
|
|
56
|
-
setSortedDirection("asc");
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
newSortedData = copyArr;
|
|
60
|
-
setSortedColIndex(undefined);
|
|
61
|
-
setSortedDirection(undefined);
|
|
62
|
-
}
|
|
63
|
-
rowMaker(newSortedData);
|
|
64
|
-
}
|
|
65
|
-
}, [rowMaker, sortedDirection, tableData]);
|
|
66
|
-
const sortableArrow = useCallback((index) => {
|
|
67
|
-
if (!sortable) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
if (sortedColIndex === index) {
|
|
71
|
-
if (sortedDirection === "desc") {
|
|
72
|
-
return _jsx("img", { src: ic_chevron_down, alt: "ic_chevron_down" });
|
|
73
|
-
}
|
|
74
|
-
return _jsx("img", { src: ic_chevron_up, alt: "ic_chevron_up" });
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
return _jsx("img", { src: ic_sortable, alt: "ic_sortable" });
|
|
78
|
-
}
|
|
79
|
-
}, [sortable, sortedColIndex, sortedDirection]);
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
-
const reorder = useCallback((list, item, insertIdx) => {
|
|
82
|
-
const result = Array.from(list);
|
|
83
|
-
result.splice(insertIdx, 0, item);
|
|
84
|
-
return result;
|
|
85
|
-
}, []);
|
|
86
|
-
const onDragEndHandler = useCallback((result) => {
|
|
87
|
-
// 영역 밖에 drop한 경우
|
|
88
|
-
if (!result.destination) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
// rows가 존재하지 않는 경우
|
|
92
|
-
if (!rows) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
// reorder 처리를 위한 temp value 선언
|
|
96
|
-
const duplRows = rows?.slice(0);
|
|
97
|
-
const [newItem] = duplRows.splice(result.source.index, 1);
|
|
98
|
-
const items = reorder(duplRows, newItem, result.destination.index);
|
|
99
|
-
setRows(items);
|
|
100
|
-
if (onDragEnd) {
|
|
101
|
-
onDragEnd(items.map((el) => ({ dndId: el?.dndId })));
|
|
102
|
-
}
|
|
103
|
-
}, [onDragEnd, reorder, rows]);
|
|
104
|
-
return (_jsxs("table", { className: `${styles.table} ${className || ""}`, children: [_jsx("thead", { children: _jsxs("tr", { children: [draggable && (_jsx("th", { className: styles.th_cell, style: { padding: 0 } })), headerList?.map((header, index) => (_jsx("th", { className: sortable ? styles.th_cell_sortable : styles.th_cell, onClick: () => {
|
|
105
|
-
if (sortable) {
|
|
106
|
-
sortingHandler(index);
|
|
107
|
-
}
|
|
108
|
-
}, children: _jsxs("div", { children: [header, sortableArrow(index)] }) }, `table_header_col_${index}`)))] }) }), _jsx(DragDropContext, { onDragEnd: onDragEndHandler, children: _jsx(Droppable, { droppableId: `dnd_table_${tableId || 0}_drop_zone`, children: (dropProvided) => (_jsxs("tbody", { ref: dropProvided.innerRef, ...dropProvided.droppableProps, children: [rows?.map((rowData, index) => (_jsx(Draggable, { draggableId: `dnd_table_${tableId || 0}_drag_item_${rowData?.dndId}`, index: index, isDragDisabled: !draggable, children: (dragProvided) => (_createElement("tr", { ...dragProvided.dragHandleProps, ...dragProvided.draggableProps, ref: dragProvided.innerRef, key: `table_${tableId || 0}_tr_${index}`, className: `${striped && index % 2 === 1 ? styles.tr_gray : ""} ${rowData.trClassName}` },
|
|
109
|
-
draggable && (_jsx("td", { className: styles.td_cell, style: { padding: 0 }, children: _jsx("div", { children: _jsx("img", { src: ic_drag, alt: "ic_drag" }) }) })),
|
|
110
|
-
rowData?.row)) }, `dnd_table_${tableId || 0}_drag_item_${rowData?.dndId !== undefined ? rowData.dndId : index}`))), dropProvided.placeholder] })) }) })] }));
|
|
111
|
-
};
|
|
112
|
-
export default Table;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { TextField } from ".";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Core/TextField",
|
|
5
|
-
component: TextField,
|
|
6
|
-
};
|
|
7
|
-
const Template = (args) => _jsx(TextField, { ...args });
|
|
8
|
-
export const LabelTextField = Template.bind({});
|
|
9
|
-
LabelTextField.args = {
|
|
10
|
-
label: "label text",
|
|
11
|
-
labelPosition: "top",
|
|
12
|
-
size: "md",
|
|
13
|
-
required: false,
|
|
14
|
-
disabled: false,
|
|
15
|
-
};
|
|
16
|
-
export const ToolTipTextField = Template.bind({});
|
|
17
|
-
ToolTipTextField.args = {
|
|
18
|
-
label: "label text",
|
|
19
|
-
labelPosition: "top",
|
|
20
|
-
tooltip: "tootip text",
|
|
21
|
-
tooltipPosition: "top",
|
|
22
|
-
size: "md",
|
|
23
|
-
required: false,
|
|
24
|
-
disabled: false,
|
|
25
|
-
};
|
|
26
|
-
export const Textarea = Template.bind({});
|
|
27
|
-
Textarea.args = {
|
|
28
|
-
label: "label text",
|
|
29
|
-
labelPosition: "top",
|
|
30
|
-
size: "md",
|
|
31
|
-
required: false,
|
|
32
|
-
disabled: false,
|
|
33
|
-
textarea: true,
|
|
34
|
-
minRows: 4,
|
|
35
|
-
maxTextCount: 100,
|
|
36
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Input, Textarea, Tooltip } from "@mantine/core";
|
|
4
|
-
import ic_tooltip from "../../assets/icons/ic_tooltip.svg";
|
|
5
|
-
import ic_input_clear from "../../assets/icons/ic_input_clear.svg";
|
|
6
|
-
import styles from "./styles.module.scss";
|
|
7
|
-
import { useCallback, useState } from "react";
|
|
8
|
-
export const TextField = ({ label, labelPosition = "top", size = "md", required, tooltip, tooltipPosition = "top", errorMsg, description, textarea = false, minRows, maxTextCount, onChange, onClear, ...props }) => {
|
|
9
|
-
const [textCount, setTextCount] = useState(0);
|
|
10
|
-
let labelStyle = styles.md_label;
|
|
11
|
-
let textfieldStyle = styles.md_textfield;
|
|
12
|
-
let tooltipStyle = styles.md_tooltip;
|
|
13
|
-
if (size === "sm") {
|
|
14
|
-
labelStyle = styles.sm_label;
|
|
15
|
-
textfieldStyle = styles.sm_textfield;
|
|
16
|
-
tooltipStyle = styles.sm_tooltip;
|
|
17
|
-
}
|
|
18
|
-
else if (size === "lg") {
|
|
19
|
-
labelStyle = styles.lg_label;
|
|
20
|
-
textfieldStyle = styles.lg_textfield;
|
|
21
|
-
tooltipStyle = styles.lg_tooltip;
|
|
22
|
-
}
|
|
23
|
-
const onChangeHandler = useCallback(
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
-
(event) => {
|
|
26
|
-
if (maxTextCount) {
|
|
27
|
-
if (event.currentTarget?.value?.length > maxTextCount) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
setTextCount(event.currentTarget?.value?.length);
|
|
31
|
-
if (onChange) {
|
|
32
|
-
onChange(event);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (onChange) {
|
|
36
|
-
setTextCount(event.currentTarget?.value?.length);
|
|
37
|
-
onChange(event);
|
|
38
|
-
}
|
|
39
|
-
}, [maxTextCount, onChange]);
|
|
40
|
-
return (_jsxs("div", { className: labelPosition === "top"
|
|
41
|
-
? styles.top_label_textfield
|
|
42
|
-
: styles.left_label_textfield, children: [_jsxs("div", { children: [label && (_jsx(Input.Label, { required: required, className: labelStyle, children: label })), tooltip && (_jsx(Tooltip, { label: tooltip, position: tooltipPosition, children: _jsx("img", { className: tooltipStyle, src: ic_tooltip, alt: "tooltip_icon" }) }))] }), _jsxs("div", { children: [_jsxs("div", { className: styles.textfield_wrapper, children: [textarea ? (_jsx(Textarea, { className: styles.textarea, size: size, minRows: minRows, error: errorMsg, onChange: onChangeHandler, disabled: props?.disabled, ...props })) : (_jsx(Input, { className: textfieldStyle, error: errorMsg, onChange: onChangeHandler, rightSection: onClear && textCount > 0 ? (_jsx("div", { className: styles.clear_button, onClick: onClear, children: _jsx("img", { src: ic_input_clear }) })) : undefined, ...props })), maxTextCount && maxTextCount > 0 && (_jsx("span", { className: styles.text_counter, children: `${textCount}/${maxTextCount}` }))] }), description && (_jsx(Input.Description, { className: styles.input_description, children: description })), errorMsg && (_jsx(Input.Error, { className: styles.input_error_msg, children: errorMsg }))] })] }));
|
|
43
|
-
};
|
|
44
|
-
export default TextField;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { TimePicker } from ".";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Core/TimePicker",
|
|
5
|
-
component: TimePicker,
|
|
6
|
-
};
|
|
7
|
-
const Template = (args) => _jsx(TimePicker, { ...args });
|
|
8
|
-
export const defaultTimePicker = Template.bind({});
|
|
9
|
-
defaultTimePicker.args = {
|
|
10
|
-
size: "md",
|
|
11
|
-
disabled: false,
|
|
12
|
-
defaultValue: `${new Date().getHours()}:${new Date().getMinutes()}`,
|
|
13
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useRef } from "react";
|
|
4
|
-
import { ActionIcon } from "@mantine/core";
|
|
5
|
-
import { TimeInput } from "@mantine/dates";
|
|
6
|
-
import ic_clock from "../../assets/icons/ic_clock.svg";
|
|
7
|
-
import styles from "./styles.module.scss";
|
|
8
|
-
export const TimePicker = ({ size = "md", ...props }) => {
|
|
9
|
-
const timeInputRef = useRef(null);
|
|
10
|
-
let sizeStyle = styles.md_textfield;
|
|
11
|
-
let iconSize = 18;
|
|
12
|
-
if (size === "sm") {
|
|
13
|
-
sizeStyle = styles.sm_textfield;
|
|
14
|
-
iconSize = 14;
|
|
15
|
-
}
|
|
16
|
-
else if (size === "lg") {
|
|
17
|
-
sizeStyle = styles.lg_textfield;
|
|
18
|
-
iconSize = 24;
|
|
19
|
-
}
|
|
20
|
-
return (_jsx(TimeInput, { ref: timeInputRef, className: sizeStyle, size: size, ...props, rightSection: _jsx(ActionIcon, { onClick: () => {
|
|
21
|
-
if (timeInputRef) {
|
|
22
|
-
timeInputRef?.current?.showPicker();
|
|
23
|
-
}
|
|
24
|
-
}, children: _jsx("img", { width: iconSize, src: ic_clock, alt: "clock_icon" }) }) }));
|
|
25
|
-
};
|
|
26
|
-
export default TimePicker;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Toggle } from ".";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Core/Toggle",
|
|
5
|
-
component: Toggle,
|
|
6
|
-
};
|
|
7
|
-
const Template = (args) => _jsx(Toggle, { ...args });
|
|
8
|
-
export const defaultToggle = Template.bind({});
|
|
9
|
-
defaultToggle.args = {
|
|
10
|
-
label: "toggle label",
|
|
11
|
-
labelPosition: "left",
|
|
12
|
-
description: "description text",
|
|
13
|
-
size: "md",
|
|
14
|
-
disabled: false,
|
|
15
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Switch } from "@mantine/core";
|
|
4
|
-
import styles from "./styles.module.scss";
|
|
5
|
-
import { useCallback, useState } from "react";
|
|
6
|
-
export const Toggle = ({ size = "md", labelPosition = "right", disabled, onChange, ...props }) => {
|
|
7
|
-
const [isChecked, setIsChecked] = useState(props?.checked || false);
|
|
8
|
-
let sizeStyle = styles.md_toggle;
|
|
9
|
-
let trackWidth = 50;
|
|
10
|
-
if (size === "sm") {
|
|
11
|
-
sizeStyle = styles.sm_toggle;
|
|
12
|
-
trackWidth = 38;
|
|
13
|
-
}
|
|
14
|
-
else if (size === "lg") {
|
|
15
|
-
sizeStyle = styles.lg_toggle;
|
|
16
|
-
trackWidth = 67;
|
|
17
|
-
}
|
|
18
|
-
const onChangeHandler = useCallback(
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
(event) => {
|
|
21
|
-
if (onChange) {
|
|
22
|
-
onChange(event);
|
|
23
|
-
}
|
|
24
|
-
setIsChecked(event?.target?.checked);
|
|
25
|
-
}, [onChange]);
|
|
26
|
-
return (_jsx(Switch, { className: sizeStyle, size: size, labelPosition: labelPosition, disabled: disabled, onChange: onChangeHandler, styles: () => ({
|
|
27
|
-
track: {
|
|
28
|
-
backgroundColor: !disabled && isChecked ? "#0fd3d8 !important" : undefined,
|
|
29
|
-
borderColor: !disabled && isChecked ? "#0fd3d8 !important" : undefined,
|
|
30
|
-
width: trackWidth,
|
|
31
|
-
},
|
|
32
|
-
}), ...props }));
|
|
33
|
-
};
|
|
34
|
-
export default Toggle;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip } from ".";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Core/Tooltip",
|
|
5
|
-
component: Tooltip,
|
|
6
|
-
};
|
|
7
|
-
const Template = (args) => _jsx(Tooltip, { ...args });
|
|
8
|
-
export const defaultTooltip = Template.bind({});
|
|
9
|
-
defaultTooltip.args = {
|
|
10
|
-
title: "tooltip title",
|
|
11
|
-
content: "tooltip content content content content content content content content content content content",
|
|
12
|
-
maw: 220,
|
|
13
|
-
multiline: true,
|
|
14
|
-
position: "top",
|
|
15
|
-
children: (_jsx("div", { style: {
|
|
16
|
-
display: "flex",
|
|
17
|
-
alignItems: "center",
|
|
18
|
-
justifyContent: "center",
|
|
19
|
-
width: 280,
|
|
20
|
-
height: 50,
|
|
21
|
-
background: "#e0e0e0",
|
|
22
|
-
fontSize: 25,
|
|
23
|
-
}, children: "hover me" })),
|
|
24
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Tooltip as MantineTooltip, } from "@mantine/core";
|
|
4
|
-
import styles from "./styles.module.scss";
|
|
5
|
-
export const Tooltip = ({ title, content, maw = 280, multiline = true, ...props }) => {
|
|
6
|
-
return (_jsx(MantineTooltip, { ...props, maw: maw, multiline: multiline, label: _jsxs("div", { className: styles.tooltip_body, children: [title && _jsx("span", { className: styles.tooltip_title, children: title }), _jsx("span", { className: styles.tooltip_content, children: content })] }) }));
|
|
7
|
-
};
|
|
8
|
-
export default Tooltip;
|
package/dist/components/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { default as Button } from "./Button";
|
|
2
|
-
export { TextField } from "./TextField";
|
|
3
|
-
export { SearchBar } from "./SearchBar";
|
|
4
|
-
export { Dropdown } from "./Dropdown";
|
|
5
|
-
export { Checkbox } from "./Checkbox";
|
|
6
|
-
export { Radio } from "./Radio";
|
|
7
|
-
export { Toggle } from "./Toggle";
|
|
8
|
-
export { DatePicker } from "./DatePicker";
|
|
9
|
-
export { TimePicker } from "./TimePicker";
|
|
10
|
-
export { Pagination } from "./Pagination";
|
|
11
|
-
export { Tab } from "./Tab";
|
|
12
|
-
export { SegmentButton } from "./SegmentButton";
|
|
13
|
-
export { Alert } from "./Alert";
|
|
14
|
-
export { Tooltip } from "./Tooltip";
|
|
15
|
-
export { Table } from "./Table";
|
|
16
|
-
export { Modal } from "./Modal";
|
|
17
|
-
export { ImageUploader } from "./ImageUploader";
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { css } from "@storybook/theming";
|
|
2
|
-
import { rgba } from "polished";
|
|
3
|
-
export const background = {
|
|
4
|
-
app: "#F6F9FC",
|
|
5
|
-
appInverse: "#7A8997",
|
|
6
|
-
positive: "#E1FFD4",
|
|
7
|
-
negative: "#FEDED2",
|
|
8
|
-
warning: "#FFF5CF",
|
|
9
|
-
calmBlue: "#E3F3FF",
|
|
10
|
-
};
|
|
11
|
-
export const color = {
|
|
12
|
-
aqua: "#0FD3D8",
|
|
13
|
-
secondary: "#029CFD",
|
|
14
|
-
tertiary: "#E3E6E8",
|
|
15
|
-
orange: "#FC521F",
|
|
16
|
-
gold: "#FFAE00",
|
|
17
|
-
green: "#66BF3C",
|
|
18
|
-
seafoam: "#37D5D3",
|
|
19
|
-
purple: "#6F2CAC",
|
|
20
|
-
ultraviolet: "#2A0481",
|
|
21
|
-
red: "#ff4400",
|
|
22
|
-
bluelight: "#E3F3FF",
|
|
23
|
-
bluelighter: "#F5FBFF",
|
|
24
|
-
lightest: "#FFFFFF",
|
|
25
|
-
lighter: "#F7FAFC",
|
|
26
|
-
light: "#EEF3F6",
|
|
27
|
-
mediumlight: "#ECF4F9",
|
|
28
|
-
medium: "#D9E8F2",
|
|
29
|
-
mediumdark: "#73828C",
|
|
30
|
-
dark: "#5C6870",
|
|
31
|
-
darker: "#454E54",
|
|
32
|
-
darkest: "#2E3438",
|
|
33
|
-
tr10: "rgba(0, 0, 0, 0.1)",
|
|
34
|
-
tr5: "rgba(0, 0, 0, 0.05)",
|
|
35
|
-
border: "hsla(203, 50%, 30%, 0.15)",
|
|
36
|
-
positive: "#448028",
|
|
37
|
-
negative: "#D43900",
|
|
38
|
-
warning: "#A15C20",
|
|
39
|
-
selected: "#0271B6",
|
|
40
|
-
};
|
|
41
|
-
export const spacing = {
|
|
42
|
-
padding: {
|
|
43
|
-
small: 10,
|
|
44
|
-
medium: 20,
|
|
45
|
-
large: 30,
|
|
46
|
-
},
|
|
47
|
-
borderRadius: {
|
|
48
|
-
small: 5,
|
|
49
|
-
default: 10,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
export const typography = {
|
|
53
|
-
type: {
|
|
54
|
-
primary: '"Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
55
|
-
code: '"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace',
|
|
56
|
-
},
|
|
57
|
-
weight: {
|
|
58
|
-
regular: "400",
|
|
59
|
-
bold: "700",
|
|
60
|
-
extrabold: "800",
|
|
61
|
-
},
|
|
62
|
-
size: {
|
|
63
|
-
s1: 12,
|
|
64
|
-
s2: 14,
|
|
65
|
-
s3: 16,
|
|
66
|
-
m1: 20,
|
|
67
|
-
m2: 24,
|
|
68
|
-
m3: 28,
|
|
69
|
-
l1: 32,
|
|
70
|
-
l2: 40,
|
|
71
|
-
l3: 48,
|
|
72
|
-
code: 90,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
export const breakpoint = 600;
|
|
76
|
-
export const pageMargin = 5.55555;
|
|
77
|
-
export const pageMargins = css `
|
|
78
|
-
padding: 0 ${spacing.padding.medium}px;
|
|
79
|
-
@media (min-width: ${breakpoint * 1}px) {
|
|
80
|
-
margin: 0 ${pageMargin * 1}%;
|
|
81
|
-
}
|
|
82
|
-
@media (min-width: ${breakpoint * 2}px) {
|
|
83
|
-
margin: 0 ${pageMargin * 2}%;
|
|
84
|
-
}
|
|
85
|
-
@media (min-width: ${breakpoint * 3}px) {
|
|
86
|
-
margin: 0 ${pageMargin * 3}%;
|
|
87
|
-
}
|
|
88
|
-
@media (min-width: ${breakpoint * 4}px) {
|
|
89
|
-
margin: 0 ${pageMargin * 4}%;
|
|
90
|
-
}
|
|
91
|
-
`;
|
|
92
|
-
export const hoverEffect = css `
|
|
93
|
-
border: 1px solid ${color.border};
|
|
94
|
-
border-radius: ${spacing.borderRadius.small}px;
|
|
95
|
-
transition:
|
|
96
|
-
background 150ms ease-out,
|
|
97
|
-
border 150ms ease-out,
|
|
98
|
-
transform 150ms ease-out;
|
|
99
|
-
|
|
100
|
-
&:hover,
|
|
101
|
-
&.__hover {
|
|
102
|
-
border-color: ${rgba(color.secondary, 0.5)};
|
|
103
|
-
transform: translate3d(0, -3px, 0);
|
|
104
|
-
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&:active,
|
|
108
|
-
&.__active {
|
|
109
|
-
border-color: ${rgba(color.secondary, 1)};
|
|
110
|
-
transform: translate3d(0, 0, 0);
|
|
111
|
-
}
|
|
112
|
-
`;
|
|
113
|
-
export const zIndex = {
|
|
114
|
-
tooltip: 2147483647,
|
|
115
|
-
};
|
|
116
|
-
export const headers = {
|
|
117
|
-
hero1: css({
|
|
118
|
-
fontSize: typography.size.l3,
|
|
119
|
-
fontWeight: typography.weight.bold,
|
|
120
|
-
}),
|
|
121
|
-
hero2: css({
|
|
122
|
-
fontSize: typography.size.l2,
|
|
123
|
-
fontWeight: typography.weight.bold,
|
|
124
|
-
}),
|
|
125
|
-
h1: css({
|
|
126
|
-
fontSize: typography.size.l1,
|
|
127
|
-
fontWeight: typography.weight.bold,
|
|
128
|
-
}),
|
|
129
|
-
h2: css({
|
|
130
|
-
fontSize: typography.size.m3,
|
|
131
|
-
fontWeight: typography.weight.bold,
|
|
132
|
-
}),
|
|
133
|
-
h3: css({
|
|
134
|
-
fontSize: typography.size.m2,
|
|
135
|
-
fontWeight: typography.weight.bold,
|
|
136
|
-
}),
|
|
137
|
-
h4: css({
|
|
138
|
-
fontSize: typography.size.m1,
|
|
139
|
-
fontWeight: typography.weight.bold,
|
|
140
|
-
}),
|
|
141
|
-
h5: css({
|
|
142
|
-
fontSize: typography.size.s3,
|
|
143
|
-
fontWeight: typography.weight.bold,
|
|
144
|
-
}),
|
|
145
|
-
h6: css({
|
|
146
|
-
fontSize: typography.size.s2,
|
|
147
|
-
fontWeight: typography.weight.bold,
|
|
148
|
-
}),
|
|
149
|
-
};
|
|
150
|
-
export const subheading = {
|
|
151
|
-
regular: css({
|
|
152
|
-
fontSize: 13,
|
|
153
|
-
fontWeight: typography.weight.extrabold,
|
|
154
|
-
lineHeight: "18px",
|
|
155
|
-
letterSpacing: "0.38em",
|
|
156
|
-
}),
|
|
157
|
-
small: css({
|
|
158
|
-
fontSize: 11,
|
|
159
|
-
fontWeight: typography.weight.extrabold,
|
|
160
|
-
lineHeight: "16px",
|
|
161
|
-
letterSpacing: "0.38em",
|
|
162
|
-
}),
|
|
163
|
-
};
|
|
164
|
-
export const text = {
|
|
165
|
-
storybookMediumBold: css({
|
|
166
|
-
fontSize: 13,
|
|
167
|
-
fontWeight: typography.weight.bold,
|
|
168
|
-
lineHeight: "18px",
|
|
169
|
-
}),
|
|
170
|
-
storybookMedium: css({
|
|
171
|
-
fontSize: 13,
|
|
172
|
-
fontWeight: typography.weight.regular,
|
|
173
|
-
lineHeight: "18px",
|
|
174
|
-
}),
|
|
175
|
-
largeBold: css({
|
|
176
|
-
fontSize: typography.size.s3,
|
|
177
|
-
fontWeight: typography.weight.bold,
|
|
178
|
-
lineHeight: "24px",
|
|
179
|
-
}),
|
|
180
|
-
small: css({
|
|
181
|
-
fontSize: typography.size.s1,
|
|
182
|
-
fontWeight: typography.weight.regular,
|
|
183
|
-
lineHeight: "18px",
|
|
184
|
-
}),
|
|
185
|
-
regularBold: css({
|
|
186
|
-
fontSize: typography.size.s2,
|
|
187
|
-
fontWeight: typography.weight.bold,
|
|
188
|
-
lineHeight: "20px",
|
|
189
|
-
}),
|
|
190
|
-
smallBold: css({
|
|
191
|
-
fontSize: typography.size.s1,
|
|
192
|
-
fontWeight: typography.weight.bold,
|
|
193
|
-
lineHeight: "18px",
|
|
194
|
-
}),
|
|
195
|
-
large: css({
|
|
196
|
-
fontSize: typography.size.s3,
|
|
197
|
-
fontWeight: typography.weight.regular,
|
|
198
|
-
lineHeight: "24px",
|
|
199
|
-
}),
|
|
200
|
-
regular: css({
|
|
201
|
-
fontSize: typography.size.s2,
|
|
202
|
-
fontWeight: typography.weight.regular,
|
|
203
|
-
lineHeight: "20px",
|
|
204
|
-
}),
|
|
205
|
-
};
|
|
206
|
-
export const code = {
|
|
207
|
-
regular: css({
|
|
208
|
-
fontFamily: typography.type.code,
|
|
209
|
-
fontSize: typography.size.s2,
|
|
210
|
-
fontWeight: typography.weight.regular,
|
|
211
|
-
lineHeight: "17px",
|
|
212
|
-
}),
|
|
213
|
-
small: css({
|
|
214
|
-
fontFamily: typography.type.code,
|
|
215
|
-
fontSize: typography.size.s1,
|
|
216
|
-
fontWeight: typography.weight.regular,
|
|
217
|
-
lineHeight: "14px",
|
|
218
|
-
}),
|
|
219
|
-
};
|
package/dist/core.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._lg_button_18ipb_16{font-family:Pretendard;font-size:18;font-weight:700;line-height:130%;height:50px;padding:20;border-radius:6px}._md_button_18ipb_26{font-family:Pretendard;font-size:16;font-weight:SemiBold;line-height:130%;height:40px;padding:16;border-radius:6px}._sm_button_18ipb_36{font-family:Pretendard;font-size:14;font-weight:SemiBold;line-height:130%;height:30px;padding:12;border-radius:4px}._primary_18ipb_46{background-color:#0fd3d8;color:#fff;cursor:pointer}._primary_18ipb_46:focus{background-color:#11badd;color:#fff}._primary_18ipb_46:hover{background-color:#11badd;color:#fff}._primary_18ipb_46:active{background-color:#07a3c6;color:#fff}._primary_18ipb_46:disabled{background-color:#b0b0b0;color:#fff}._primaryline_18ipb_68{background-color:#fff;color:#0fd3d8;border-color:#0fd3d8;border-style:solid;border-width:1;cursor:pointer}._primaryline_18ipb_68:focus{background-color:#e7e7e7;color:#11badd;border-color:#11badd;border-style:solid;border-width:1}._primaryline_18ipb_68:hover{background-color:#e7e7e7;color:#11badd;border-color:#11badd;border-style:solid;border-width:1}._primaryline_18ipb_68:active{background-color:#cdcdcd;color:#07a3c6;border-color:#07a3c6;border-style:solid;border-width:1}._primaryline_18ipb_68:disabled{background-color:#b0b0b0;color:#fff}._basic_18ipb_102{background-color:#fff;color:#4a4a4a;border-color:#b0b0b0;border-style:solid;border-width:1;cursor:pointer}._basic_18ipb_102:focus{background-color:#e7e7e7;color:#4a4a4a;border-color:#b0b0b0;border-style:solid;border-width:1}._basic_18ipb_102:hover{background-color:#e7e7e7;color:#4a4a4a;border-color:#b0b0b0;border-style:solid;border-width:1}._basic_18ipb_102:active{background-color:#cdcdcd;color:#4a4a4a;border-color:#b0b0b0;border-width:1}._basic_18ipb_102:disabled{background-color:#b0b0b0;color:#fff}._danger_18ipb_135{background-color:#fa5252;color:#fff;cursor:pointer}._danger_18ipb_135:focus{background-color:#e03131;color:#fff}._danger_18ipb_135:hover{background-color:#e03131;color:#fff}._danger_18ipb_135:active{background-color:#c92a2a;color:#fff}._danger_18ipb_135:disabled{background-color:#b0b0b0;color:#fff}._setting_18ipb_157{background-color:#9b9b9b;color:#fff;cursor:pointer}._setting_18ipb_157:focus{background-color:gray;color:#fff}._setting_18ipb_157:hover{background-color:gray;color:#fff}._setting_18ipb_157:active{background-color:#666;color:#fff}._setting_18ipb_157:disabled{background-color:#b0b0b0;color:#fff}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._left_label_textfield_wii04_16{display:flex;flex-direction:row;gap:20px}._top_label_textfield_wii04_22{display:flex;flex-direction:column}._sm_label_wii04_27{font-family:Pretendard;font-size:14px;font-weight:600;letter-spacing:0em;text-align:left;margin:8px 3px}._md_label_wii04_36{font-family:Pretendard;font-size:16px;font-weight:600;letter-spacing:0em;text-align:left;margin:12px 4px}._lg_label_wii04_45{font-family:Pretendard;font-size:18px;font-weight:600;letter-spacing:0em;text-align:left;margin:16px 4px}._sm_tooltip_wii04_54{width:14px;height:14px}._md_tooltip_wii04_59{width:16px;height:16px}._lg_tooltip_wii04_64{width:18px;height:18px}._textfield_wrapper_wii04_69{position:relative}._text_counter_wii04_73{position:absolute;bottom:-16px;right:0;font-family:Pretendard;font-size:12px;font-weight:500;letter-spacing:0em;text-align:right;color:gray}._textarea_wii04_85 textarea:hover{outline:1.5px solid #72eef1;border-color:transparent}._textarea_wii04_85 textarea:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._sm_textfield_wii04_94 input{height:30px;min-height:30px;padding:8px;font-size:14px}._sm_textfield_wii04_94 input:hover{outline:1.5px solid #72eef1;border-color:transparent}._sm_textfield_wii04_94 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._md_textfield_wii04_109 input{height:40px;min-height:40px;padding:12px;font-size:14px}._md_textfield_wii04_109 input:hover{outline:1.5px solid #72eef1;border-color:transparent}._md_textfield_wii04_109 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._lg_textfield_wii04_124 input{height:50px;min-height:50px;padding:16px;font-size:16px}._lg_textfield_wii04_124 input:hover{outline:1.5px solid #72eef1;border-color:transparent}._lg_textfield_wii04_124 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._input_description_wii04_139{margin-top:8px}._input_error_msg_wii04_143{margin-top:4px}._clear_button_wii04_147{display:flex;align-items:center;justify-content:center;cursor:pointer}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._left_label_textfield_hosiw_16{display:flex;flex-direction:row;gap:20px}._top_label_textfield_hosiw_22{display:flex;flex-direction:column}._sm_label_hosiw_27{font-family:Pretendard;font-size:14px;font-weight:600;letter-spacing:0em;text-align:left;margin:8px 3px}._md_label_hosiw_36{font-family:Pretendard;font-size:16px;font-weight:600;letter-spacing:0em;text-align:left;margin:12px 4px}._lg_label_hosiw_45{font-family:Pretendard;font-size:18px;font-weight:600;letter-spacing:0em;text-align:left;margin:16px 4px}._sm_tooltip_hosiw_54{width:14px;height:14px}._md_tooltip_hosiw_59{width:16px;height:16px}._lg_tooltip_hosiw_64{width:18px;height:18px}._sm_textfield_hosiw_69 input{height:30px;padding:8px;font-size:14px;min-height:30px}._sm_textfield_hosiw_69 input:hover{outline:1.5px solid #72eef1;border-color:transparent}._sm_textfield_hosiw_69 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._md_textfield_hosiw_84 input{height:40px;padding:12px;font-size:14px;min-height:40px}._md_textfield_hosiw_84 input:hover{outline:1.5px solid #72eef1;border-color:transparent}._md_textfield_hosiw_84 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._lg_textfield_hosiw_99 input{height:50px;padding:16px;font-size:16px;min-height:50px}._lg_textfield_hosiw_99 input:hover{outline:1.5px solid #72eef1;border-color:transparent}._lg_textfield_hosiw_99 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._input_description_hosiw_114{margin-top:8px}._input_error_msg_hosiw_118{margin-top:4px}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._sm_checkbox_7y75g_16 input{width:18px;height:18px}._sm_checkbox_7y75g_16 input:hover{background-color:#edfcff;border-color:#72eef1;border-width:2px}._sm_checkbox_7y75g_16 input:checked{background-color:#0fd3d8;border-color:#0fd3d8}._sm_checkbox_7y75g_16 input:disabled{background-color:#e7e7e7;border-color:#d8d8d8;border-width:2px}._sm_checkbox_7y75g_16 label{height:18px;color:#333;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500;display:flex;align-items:center}._sm_checkbox_7y75g_16 div{color:gray;font-family:Pretendard;font-size:12px;font-style:normal;font-weight:500}._md_checkbox_7y75g_52 input{width:24px;height:24px}._md_checkbox_7y75g_52 input:hover{background-color:#edfcff;border-color:#72eef1;border-width:2px}._md_checkbox_7y75g_52 input:checked{background-color:#0fd3d8;border-color:#0fd3d8}._md_checkbox_7y75g_52 input:disabled{background-color:#e7e7e7;border-color:#d8d8d8;border-width:2px}._md_checkbox_7y75g_52 label{height:24px;color:#333;font-family:Pretendard;font-size:18px;font-style:normal;font-weight:600;display:flex;align-items:center}._md_checkbox_7y75g_52 div{color:gray;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500}._lg_checkbox_7y75g_88 input{width:32px;height:32px}._lg_checkbox_7y75g_88 input:hover{background-color:#edfcff;border-color:#72eef1;border-width:2px}._lg_checkbox_7y75g_88 input:checked{background-color:#0fd3d8;border-color:#0fd3d8}._lg_checkbox_7y75g_88 input:disabled{background-color:#e7e7e7;border-color:#d8d8d8;border-width:2px}._lg_checkbox_7y75g_88 label{height:32px;color:#333;font-family:Pretendard;font-size:24px;font-style:normal;font-weight:700;display:flex;align-items:center}._lg_checkbox_7y75g_88 div{color:gray;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._sm_radio_1ib4u_16 input{width:18px;height:18px}._sm_radio_1ib4u_16 input:hover{background-color:#edfcff;border-color:#72eef1;border-width:2px}._sm_radio_1ib4u_16 input:checked{background-color:#0fd3d8;border-color:#0fd3d8}._sm_radio_1ib4u_16 input:disabled{background-color:#e7e7e7;border-color:#d8d8d8;border-width:2px}._sm_radio_1ib4u_16 label{height:18px;color:#333;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500;display:flex;align-items:center}._sm_radio_1ib4u_16 div{color:gray;font-family:Pretendard;font-size:12px;font-style:normal;font-weight:500}._md_radio_1ib4u_52 input{width:24px;height:24px}._md_radio_1ib4u_52 input:hover{background-color:#edfcff;border-color:#72eef1;border-width:2px}._md_radio_1ib4u_52 input:checked{background-color:#0fd3d8;border-color:#0fd3d8}._md_radio_1ib4u_52 input:disabled{background-color:#e7e7e7;border-color:#d8d8d8;border-width:2px}._md_radio_1ib4u_52 label{height:24px;color:#333;font-family:Pretendard;font-size:18px;font-style:normal;font-weight:600;display:flex;align-items:center}._md_radio_1ib4u_52 div{color:gray;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500}._lg_radio_1ib4u_88 input{width:32px;height:32px}._lg_radio_1ib4u_88 input:hover{background-color:#edfcff;border-color:#72eef1;border-width:2px}._lg_radio_1ib4u_88 input:checked{background-color:#0fd3d8;border-color:#0fd3d8}._lg_radio_1ib4u_88 input:disabled{background-color:#e7e7e7;border-color:#d8d8d8;border-width:2px}._lg_radio_1ib4u_88 label{height:32px;color:#333;font-family:Pretendard;font-size:24px;font-style:normal;font-weight:700;display:flex;align-items:center}._lg_radio_1ib4u_88 div{color:gray;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._sm_toggle_jaqix_16 label{height:18px;color:#333;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500;display:flex;align-items:center}._sm_toggle_jaqix_16 div{color:gray;font-family:Pretendard;font-size:12px;font-style:normal;font-weight:500}._md_toggle_jaqix_34 label{height:24px;color:#333;font-family:Pretendard;font-size:18px;font-style:normal;font-weight:600;display:flex;align-items:center}._md_toggle_jaqix_34 div{color:gray;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500}._lg_toggle_jaqix_52 label{height:32px;color:#333;font-family:Pretendard;font-size:24px;font-style:normal;font-weight:700;display:flex;align-items:center}._lg_toggle_jaqix_52 div{color:gray;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._sm_textfield_2zkt2_16 button{height:30px;min-height:30px;padding:8px;font-size:14px;line-height:100%}._sm_textfield_2zkt2_16 button:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._sm_textfield_2zkt2_16 button:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._sm_textfield_2zkt2_16 button[data-in-range]{background-color:#edfcff}._sm_textfield_2zkt2_16 button[data-selected]{background-color:#0fd3d8}._sm_textfield_2zkt2_16 button[data-selected]:hover{outline:1.5px solid #72eef1;background-color:#edfcff;color:#000;border-color:transparent}._sm_textfield_2zkt2_16 input:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._sm_textfield_2zkt2_16 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._sm_textfield_2zkt2_16 input[data-in-range]{background-color:#edfcff}._sm_textfield_2zkt2_16 input[data-selected]{background-color:#0fd3d8}._sm_textfield_2zkt2_16 input[data-selected]:hover{outline:1.5px solid #72eef1;background-color:#edfcff;color:#000;border-color:transparent}._md_textfield_2zkt2_66 button{height:40px;min-height:40px;padding:12px;font-size:14px;line-height:100%}._md_textfield_2zkt2_66 button:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._md_textfield_2zkt2_66 button:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._md_textfield_2zkt2_66 button[data-in-range]{background-color:#edfcff}._md_textfield_2zkt2_66 button[data-selected]{background-color:#0fd3d8}._md_textfield_2zkt2_66 button[data-selected]:hover{outline:1.5px solid #72eef1;background-color:#edfcff;color:#000;border-color:transparent}._md_textfield_2zkt2_66 input:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._md_textfield_2zkt2_66 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._md_textfield_2zkt2_66 input[data-in-range]{background-color:#edfcff}._md_textfield_2zkt2_66 input[data-selected]{background-color:#0fd3d8}._md_textfield_2zkt2_66 input[data-selected]:hover{outline:1.5px solid #72eef1;background-color:#edfcff;color:#000;border-color:transparent}._lg_textfield_2zkt2_116 button{height:50px;min-height:50px;padding:16px;font-size:16px;line-height:100%}._lg_textfield_2zkt2_116 button:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._lg_textfield_2zkt2_116 button:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._lg_textfield_2zkt2_116 button[data-in-range]{background-color:#edfcff}._lg_textfield_2zkt2_116 button[data-selected]{background-color:#0fd3d8}._lg_textfield_2zkt2_116 button[data-selected]:hover{outline:1.5px solid #72eef1;background-color:#edfcff;color:#000;border-color:transparent}._lg_textfield_2zkt2_116 input:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._lg_textfield_2zkt2_116 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._lg_textfield_2zkt2_116 input[data-in-range]{background-color:#edfcff}._lg_textfield_2zkt2_116 input[data-selected]{background-color:#0fd3d8}._lg_textfield_2zkt2_116 input[data-selected]:hover{outline:1.5px solid #72eef1;background-color:#edfcff;color:#000;border-color:transparent}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._sm_textfield_8xl46_16 input{height:30px;min-height:30px;padding:8px;font-size:14px;line-height:100%}._sm_textfield_8xl46_16 input:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._sm_textfield_8xl46_16 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._md_textfield_8xl46_33 input{height:40px;min-height:40px;padding:12px;font-size:14px;line-height:100%}._md_textfield_8xl46_33 input:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._md_textfield_8xl46_33 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}._lg_textfield_8xl46_50 input{height:50px;min-height:50px;padding:16px;font-size:16px;line-height:100%}._lg_textfield_8xl46_50 input:hover{outline:1.5px solid #72eef1;border-color:transparent;background-color:#fff}._lg_textfield_8xl46_50 input:focus-within{outline:1.5px solid #0fd3d8;border-color:transparent}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._pagination_hiiqe_16{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center;flex-wrap:wrap}._pagination_hiiqe_16 ._page_index_hiiqe_24{display:flex;align-items:center;justify-content:center;min-width:40px;height:40px;border-radius:8px;gap:10px;font-family:Pretendard;font-size:14px;font-weight:400;letter-spacing:0px;text-align:center;color:gray;border:none;cursor:pointer;background-color:#fff0}._pagination_hiiqe_16 ._page_index_hiiqe_24:hover{background-color:#f6f6f6}._pagination_hiiqe_16 ._page_index_hiiqe_24:active{background-color:#e7e7e7}._pagination_hiiqe_16 ._page_index_active_hiiqe_48{display:flex;align-items:center;justify-content:center;min-width:40px;height:40px;border-radius:8px;gap:10px;font-family:Pretendard;font-size:14px;font-weight:400;letter-spacing:0px;text-align:center;color:gray;border:none;cursor:pointer;font-weight:700;background-color:#e7e7e7;color:#4a4a4a}._pagination_hiiqe_16 ._page_index_active_hiiqe_48:hover{background-color:#f6f6f6}._pagination_hiiqe_16 ._page_index_active_hiiqe_48:active{background-color:#e7e7e7}._pagination_hiiqe_16 ._arrow_hiiqe_74{display:flex;align-items:center;justify-content:center;min-width:40px;border-radius:8px;gap:10px;font-family:Pretendard;font-size:14px;font-weight:400;letter-spacing:0px;text-align:center;color:gray;border:none;cursor:pointer;border:1px solid #b0b0b0;margin:0 8px;width:40px;height:40px;background-color:#fff}._pagination_hiiqe_16 ._arrow_hiiqe_74:hover{background-color:#f6f6f6}._pagination_hiiqe_16 ._arrow_hiiqe_74:active{background-color:#e7e7e7}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._tab_title_list_1fmw0_16{border-bottom:2px solid #d8d8d8}._tab_title_list_1fmw0_16 button{margin-bottom:7px;display:flex;align-items:center;text-align:center;font-family:Pretendard;font-size:18px;font-style:normal;font-weight:700;height:50px;color:#b0b0b0;border-radius:6px;border:none;padding:0 20px;cursor:pointer}._tab_title_list_1fmw0_16 button:hover{background-color:#f6f6f6}._tab_title_list_1fmw0_16 button ._border_bottom_1fmw0_38{position:absolute;bottom:-9px;left:0;width:100%}._tab_title_list_1fmw0_16 button[data-active]{position:relative;color:#006180}._tab_title_list_1fmw0_16 button[data-active] ._border_bottom_1fmw0_38{position:absolute;bottom:-9px;left:0;width:100%;border-bottom:2px solid #006180;border-color:#006180}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._sm_segment_button_ok8t2_16 label{box-sizing:border-box;display:flex;align-items:center;color:#9b9b9b;height:30px;padding:0 8px;font-size:14px}._sm_segment_button_ok8t2_16 label[data-active]{color:#4a4a4a}._md_segment_button_ok8t2_29 label{box-sizing:border-box;display:flex;align-items:center;color:#9b9b9b;height:40px;padding:0 12px;font-size:14px}._md_segment_button_ok8t2_29 label[data-active]{color:#4a4a4a}._lg_segment_button_ok8t2_42 label{box-sizing:border-box;display:flex;align-items:center;color:#9b9b9b;height:50px;padding:0 16px;font-size:16px}._lg_segment_button_ok8t2_42 label[data-active]{color:#4a4a4a}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._light_success_gs18x_16{background-color:#efffef;border-radius:6px;border:1.5px solid #30cc37}._light_success_gs18x_16 span{font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%;color:#30cc37}._light_success_gs18x_16 div{color:#333;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%}._light_error_gs18x_38{background-color:#fef3f2;border-radius:6px;border:1.5px solid #fa5252}._light_error_gs18x_38 span{font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%;color:#fa5252}._light_error_gs18x_38 div{color:#333;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%}._fill_success_gs18x_60{background-color:#d1fcd3;border-radius:6px}._fill_success_gs18x_60 span{font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%;color:#30cc37}._fill_success_gs18x_60 div{color:#333;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%}._fill_error_gs18x_81{background-color:#fee4e2;border-radius:6px}._fill_error_gs18x_81 span{font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%;color:#fa5252}._fill_error_gs18x_81 div{color:#333;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._tooltip_body_iesd0_16{display:flex;flex-direction:column}._tooltip_title_iesd0_21{font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%;color:#fff;margin-bottom:8px}._tooltip_content_iesd0_31{font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:150%;color:#fff}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._table_16tlf_16{width:max-content;border-collapse:collapse}._table_16tlf_16 ._tr_gray_16tlf_20{background-color:#fbfbfb}._table_16tlf_16 th,._table_16tlf_16 td{font-family:Pretendard;font-size:14px;font-style:normal;box-sizing:border-box;height:52px;text-align:center;padding:16px}@media (max-width: 767px){._table_16tlf_16 th,._table_16tlf_16 td{white-space:nowrap}}._table_16tlf_16 ._th_cell_16tlf_39{border-bottom:1px solid #d8d8d8;background-color:#f6f6f6}._table_16tlf_16 ._th_cell_16tlf_39>div{color:#333;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:700;line-height:100%;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center}._table_16tlf_16 ._th_cell_sortable_16tlf_56{border-bottom:1px solid #d8d8d8;background-color:#f6f6f6}._table_16tlf_16 ._th_cell_sortable_16tlf_56>div{color:#333;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:700;line-height:100%;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center}._table_16tlf_16 ._th_cell_sortable_16tlf_56 img{width:14px;height:14px;margin-left:4px}._table_16tlf_16 ._th_cell_sortable_16tlf_56:hover{cursor:pointer;background-color:#e7e7e7}._table_16tlf_16 ._td_cell_16tlf_82{color:#4a4a4a;font-family:Pretendard;font-size:14px;font-style:normal;font-weight:500;line-height:140%;border-bottom:1px solid #e7e7e7}._table_16tlf_16 ._td_cell_16tlf_82>div{display:flex;align-items:center;justify-content:center}@font-face{font-family:Pretendard;font-weight:500;font-style:normal;font-display:swap;src:url(./PretendardVariable.woff2) format("woff2-variations")}._image_uploader_lv9hk_16{width:200px;height:200px;border:none;border-radius:6px;background-color:#edfcff;padding:0;overflow:hidden}._image_uploader_lv9hk_16[data-accept]{opacity:.7}._image_uploader_lv9hk_16:hover{background-color:#c8fdff}._image_uploader_lv9hk_16 ._preview_lv9hk_31{object-fit:cover;width:100%;height:100%}._image_uploader_lv9hk_16 div{display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:12px}._image_uploader_lv9hk_16 div span{color:#07a3c6;text-align:center;font-family:Pretendard;font-size:16px;font-style:normal;font-weight:500;line-height:140%}._image_uploader_wrapper_lv9hk_55{position:relative;width:fit-content;height:fit-content}._image_uploader_wrapper_lv9hk_55 ._file_clear_button_lv9hk_60{position:absolute;display:flex;align-items:center;justify-content:center;top:-12px;right:-12px;width:24px;height:24px;z-index:1;cursor:pointer}._image_uploader_wrapper_lv9hk_55 ._file_clear_button_lv9hk_60:hover{opacity:.9}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { checkMessage } from ".";
|
|
2
|
-
describe("checkMessage", () => {
|
|
3
|
-
it('should return "world" if message is "hello"', () => {
|
|
4
|
-
expect(checkMessage("hello")).toBe("world");
|
|
5
|
-
});
|
|
6
|
-
it('should return "error" if message is not "hello"', () => {
|
|
7
|
-
expect(checkMessage("")).toBe("error");
|
|
8
|
-
});
|
|
9
|
-
});
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import(".").AlertProps>;
|
|
2
|
-
export default _default;
|
|
3
|
-
export declare const defaultAlert: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, import(".").AlertProps>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AlertProps as MatineAlertProps } from "@mantine/core";
|
|
2
|
-
export interface AlertProps extends MatineAlertProps {
|
|
3
|
-
visible: boolean;
|
|
4
|
-
type?: "success" | "error";
|
|
5
|
-
variant?: "fill" | "light";
|
|
6
|
-
title?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const Alert: ({ visible, type, variant, top, right, ...props }: AlertProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
-
export default Alert;
|