maru_design2 0.0.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/icon/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/Dropdown.d.ts +6 -10
- package/dist/components/molecules/dropdown/Menu.d.ts +1 -2
- package/dist/components/molecules/dropdown/toggles/Arrow.d.ts +2 -1
- package/dist/components/molecules/pagination/Pagination.d.ts +3 -3
- package/dist/index.js +116 -93
- package/package.json +3 -2
- package/.babelrc.json +0 -18
- package/.eslintrc.json +0 -110
- package/.github/workflows/chromatic.yml +0 -19
- package/.prettierrc +0 -8
- package/build-storybook.log +0 -29
- package/scripts/svg-parser.js +0 -224
|
@@ -20,7 +20,7 @@ interface DropdownProps<T extends Record<string, any>> {
|
|
|
20
20
|
/**
|
|
21
21
|
* 컴포넌트 위치의 기준이 될 엘리먼트 사용자 정의. (@v1 portalAnchor)
|
|
22
22
|
*/
|
|
23
|
-
anchorEl?: HTMLElement;
|
|
23
|
+
anchorEl?: HTMLElement | null;
|
|
24
24
|
className?: string;
|
|
25
25
|
/**
|
|
26
26
|
* ['primary', 'secondary', 'positive', 'warning', 'danger']
|
|
@@ -46,14 +46,6 @@ interface DropdownProps<T extends Record<string, any>> {
|
|
|
46
46
|
* 토글 안 좌측 상단에 노출할 라벨. (@v1 insideLabel)
|
|
47
47
|
*/
|
|
48
48
|
inlineLabel?: string;
|
|
49
|
-
/**
|
|
50
|
-
* 메뉴 세로 크기(px). default=auto. (@v1 menuPosition.height)
|
|
51
|
-
*/
|
|
52
|
-
height?: number;
|
|
53
|
-
/**
|
|
54
|
-
* 메뉴 아이템의 방향이 가로방향인지 여부. true인 경우 메뉴 뜨는 위치는 토글의 bottom-end. (@v1 isHorizonMenu)
|
|
55
|
-
*/
|
|
56
|
-
horizonMenu?: boolean;
|
|
57
49
|
label?: string;
|
|
58
50
|
/**
|
|
59
51
|
* 데이터가 없을때 메시지
|
|
@@ -84,6 +76,10 @@ interface DropdownProps<T extends Record<string, any>> {
|
|
|
84
76
|
* 토글, 메뉴 가로 크기(px). default=100%. (@v1 menuPosition.width)
|
|
85
77
|
*/
|
|
86
78
|
width?: number;
|
|
79
|
+
/**
|
|
80
|
+
* 메뉴 세로 크기(px). default=auto. (@v1 menuPosition.height)
|
|
81
|
+
*/
|
|
82
|
+
height?: number;
|
|
87
83
|
}
|
|
88
|
-
export declare function Dropdown<T extends Record<string, any>>({ data, selectedId, onSelect, idKey, displayKey, anchorEl, className, color, customButton, customMenuItem, disabled, errorMessage, inlineLabel,
|
|
84
|
+
export declare function Dropdown<T extends Record<string, any>>({ data, selectedId, onSelect, idKey, displayKey, anchorEl, className, color, customButton, customMenuItem, disabled, errorMessage, inlineLabel, label, noDataMessage, noSearchedMessage, onClear, placeholder, startArrow, toggleEndNode, type, width, height, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
89
85
|
export {};
|
|
@@ -6,7 +6,6 @@ interface Props<T extends Record<string, any>> {
|
|
|
6
6
|
idKey: string;
|
|
7
7
|
displayKey: string;
|
|
8
8
|
filteredData: T[];
|
|
9
|
-
horizonMenu?: boolean;
|
|
10
9
|
width?: number;
|
|
11
10
|
height?: number;
|
|
12
11
|
noMessage?: string;
|
|
@@ -17,5 +16,5 @@ interface Props<T extends Record<string, any>> {
|
|
|
17
16
|
onSelect: (id?: string) => void;
|
|
18
17
|
closeMenu: () => void;
|
|
19
18
|
}
|
|
20
|
-
declare function DropdownMenu<T extends Record<string, any>>({ parent, menuItemEls, selectedId, idKey, displayKey, filteredData,
|
|
19
|
+
declare function DropdownMenu<T extends Record<string, any>>({ parent, menuItemEls, selectedId, idKey, displayKey, filteredData, width, height, noMessage, customMenuItem: CustomMenuItem, onSelect, closeMenu, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export default DropdownMenu;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TColor } from '../../../../enums/color';
|
|
2
2
|
interface Props {
|
|
3
3
|
open: boolean;
|
|
4
|
+
focus: boolean;
|
|
4
5
|
color: TColor;
|
|
5
6
|
}
|
|
6
|
-
declare function Arrow({ open, color }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function Arrow({ open, focus, color }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export default Arrow;
|
|
@@ -15,12 +15,12 @@ export interface PaginationProps {
|
|
|
15
15
|
totalPage: number;
|
|
16
16
|
className?: string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* prev, next 버튼 공간 차지 여부
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
buttonVisibility?: 'visible' | 'hidden';
|
|
21
21
|
/**
|
|
22
22
|
* 데이터 타입. ['button', 'input'] (@v1 isSearch)
|
|
23
23
|
*/
|
|
24
24
|
type?: TButtonType;
|
|
25
25
|
}
|
|
26
|
-
export declare function Pagination({ page, onPageChange, totalPage, className,
|
|
26
|
+
export declare function Pagination({ page, onPageChange, totalPage, className, buttonVisibility, type, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -234,12 +234,7 @@ var iconmap = {
|
|
|
234
234
|
"d": "M3 3.8742L3.19433 2.25H7.8583L8.05263 3.8742C7.83887 4.12261 7.47611 4.34236 6.96437 4.53344V13.4761C7.47611 13.6799 7.83887 13.8965 8.05263 14.1258L7.8583 15.75H3.19433L3 14.1258C3.1749 13.9029 3.54089 13.6863 4.09798 13.4761V4.53344C3.54737 4.34236 3.18138 4.12261 3 3.8742ZM15 14.1258L14.796 15.75H11.4923L7.08097 8.7086L10.404 4.36146C10.0283 4.18312 9.76923 4.00796 9.62672 3.83599L9.82105 2.25H14.3587L14.5628 3.83599C14.3749 4.04618 14.0283 4.25318 13.5231 4.45701L10.0834 8.63217L13.2316 13.285C14.0802 13.4634 14.6696 13.7436 15 14.1258Z",
|
|
235
235
|
"fill": "#8C8C8C"
|
|
236
236
|
}],
|
|
237
|
-
"circles": [
|
|
238
|
-
"cx": "9",
|
|
239
|
-
"cy": "9",
|
|
240
|
-
"r": "9",
|
|
241
|
-
"fill": "white"
|
|
242
|
-
}]
|
|
237
|
+
"circles": []
|
|
243
238
|
},
|
|
244
239
|
"T": {
|
|
245
240
|
"width": "18",
|
|
@@ -261,12 +256,7 @@ var iconmap = {
|
|
|
261
256
|
"d": "M14.4038 4.60278L10.648 15.75H7.9166L4.12184 4.51739C3.54954 4.32133 3.17559 4.10313 3 3.86279L3.1951 2.25H7.87758L8.07269 3.86279C7.88409 4.11578 7.54591 4.32133 7.05815 4.47944L8.75555 10.2381C8.89862 10.6808 9.01243 11.1109 9.09698 11.5283C9.18152 11.9394 9.24005 12.3315 9.27257 12.7047L9.29208 13.0367H9.57498C9.58799 12.2461 9.75383 11.3259 10.0725 10.276L11.8479 4.49842C11.3472 4.3403 10.996 4.12843 10.7944 3.86279L10.9895 2.25H15.5451L15.75 3.86279C15.5094 4.1474 15.0606 4.39406 14.4038 4.60278Z",
|
|
262
257
|
"fill": "#8C8C8C"
|
|
263
258
|
}],
|
|
264
|
-
"circles": [
|
|
265
|
-
"cx": "9",
|
|
266
|
-
"cy": "9",
|
|
267
|
-
"r": "9",
|
|
268
|
-
"fill": "white"
|
|
269
|
-
}]
|
|
259
|
+
"circles": []
|
|
270
260
|
},
|
|
271
261
|
"AddLineThin": {
|
|
272
262
|
"width": "18",
|
|
@@ -2861,30 +2851,24 @@ function Icon(_a) {
|
|
|
2861
2851
|
fill: fill,
|
|
2862
2852
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2863
2853
|
}, {
|
|
2864
|
-
children: [circles.map(function (circle) {
|
|
2865
|
-
return (
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
stroke: path.stroke && keyColor,
|
|
2883
|
-
strokeWidth: path.strokeWidth,
|
|
2884
|
-
strokeLinecap: path.strokeLinecap,
|
|
2885
|
-
strokeLinejoin: path.strokeLinejoin
|
|
2886
|
-
})
|
|
2887
|
-
);
|
|
2854
|
+
children: [circles.map(function (circle, idx) {
|
|
2855
|
+
return jsx("circle", {
|
|
2856
|
+
cx: circle.cx,
|
|
2857
|
+
cy: circle.cy,
|
|
2858
|
+
r: circle.r,
|
|
2859
|
+
fill: circle.fill && keyColor
|
|
2860
|
+
}, "circle-".concat(idx));
|
|
2861
|
+
}), paths.map(function (path, idx) {
|
|
2862
|
+
return jsx("path", {
|
|
2863
|
+
d: path.d,
|
|
2864
|
+
fill: path.fill && keyColor,
|
|
2865
|
+
fillRule: path.fillRule,
|
|
2866
|
+
clipRule: path.clipRule,
|
|
2867
|
+
stroke: path.stroke && keyColor,
|
|
2868
|
+
strokeWidth: path.strokeWidth,
|
|
2869
|
+
strokeLinecap: path.strokeLinecap,
|
|
2870
|
+
strokeLinejoin: path.strokeLinejoin
|
|
2871
|
+
}, "path-".concat(idx));
|
|
2888
2872
|
})]
|
|
2889
2873
|
}));
|
|
2890
2874
|
}
|
|
@@ -2932,7 +2916,7 @@ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
2932
2916
|
}
|
|
2933
2917
|
return (_a = icon === null || icon === void 0 ? void 0 : icon.color) !== null && _a !== void 0 ? _a : 'secondary';
|
|
2934
2918
|
};
|
|
2935
|
-
return jsxs("button", __assign({
|
|
2919
|
+
return jsxs("button", __assign({}, props, {
|
|
2936
2920
|
ref: ref,
|
|
2937
2921
|
type: "button",
|
|
2938
2922
|
className: classNames('maru-button', "maru-button-".concat(color, "-").concat(variant), "size-".concat(size), {
|
|
@@ -2960,7 +2944,7 @@ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
2960
2944
|
onBlur: function onBlur() {
|
|
2961
2945
|
return setIsFocused(false);
|
|
2962
2946
|
}
|
|
2963
|
-
},
|
|
2947
|
+
}, {
|
|
2964
2948
|
children: [startIcon && jsx(Icon, {
|
|
2965
2949
|
name: startIcon.name,
|
|
2966
2950
|
size: startIcon.size,
|
|
@@ -3031,7 +3015,7 @@ function uuidv4(length) {
|
|
|
3031
3015
|
}
|
|
3032
3016
|
}
|
|
3033
3017
|
|
|
3034
|
-
var css_248z$9 = ".maru-checkbox-wrapper-4px {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n gap: 4px;\n}\n\n.maru-checkbox-wrapper-8px {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n gap: 8px;\n}\n\n.maru-checkbox-inner-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n\n.maru-checkbox {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.maru-checkbox-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: 500;\n color: #5c5c5c;\n cursor: pointer;\n}\n.maru-checkbox-label.label-disabled {\n color: #8c8c8c;\n}\n\n.maru-checkbox:disabled,\n.label-disabled {\n cursor: default;\n}";
|
|
3018
|
+
var css_248z$9 = ".maru-checkbox-wrapper-4px {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n gap: 4px;\n}\n\n.maru-checkbox-wrapper-8px {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n gap: 8px;\n}\n\n.maru-checkbox-inner-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n position: relative;\n}\n\n.maru-checkbox {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.maru-checkbox-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: 500;\n color: #5c5c5c;\n cursor: pointer;\n}\n.maru-checkbox-label.label-disabled {\n color: #8c8c8c;\n}\n\n.maru-checkbox:disabled,\n.label-disabled {\n cursor: default;\n}";
|
|
3035
3019
|
styleInject(css_248z$9);
|
|
3036
3020
|
|
|
3037
3021
|
var Checkbox = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
@@ -3098,11 +3082,10 @@ function Chip(_a) {
|
|
|
3098
3082
|
return jsxs("div", __assign({
|
|
3099
3083
|
className: classNames('maru-chip', "maru-chip-".concat(color, "-").concat(variant), "maru-chip-size-".concat(size), className)
|
|
3100
3084
|
}, {
|
|
3101
|
-
children: [variant === 'dot' &&
|
|
3102
|
-
// TODO: modify icon color to enum+string
|
|
3103
|
-
jsx(Icon, {
|
|
3085
|
+
children: [variant === 'dot' && jsx(Icon, {
|
|
3104
3086
|
name: ICONS.StateThin,
|
|
3105
|
-
size: 16
|
|
3087
|
+
size: 16,
|
|
3088
|
+
color: color
|
|
3106
3089
|
}), jsx("span", {
|
|
3107
3090
|
children: content.toLocaleString('en')
|
|
3108
3091
|
})]
|
|
@@ -5315,7 +5298,7 @@ function Toggle(_a) {
|
|
|
5315
5298
|
});
|
|
5316
5299
|
}
|
|
5317
5300
|
|
|
5318
|
-
var css_248z$3 = ".maru-tooltip
|
|
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: block;\n}\n.maru-tooltip[data-open=false] {\n display: none;\n}\n\n.maru-tooltip-default {\n background-color: rgba(92, 92, 92, 0.5019607843);\n}\n.maru-tooltip-default,\n.maru-tooltip-default span,\n.maru-tooltip-default p,\n.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\n.maru-tooltip-danger {\n background-color: rgba(229, 62, 62, 0.1019607843);\n}\n.maru-tooltip-danger,\n.maru-tooltip-danger span,\n.maru-tooltip-danger p,\n.maru-tooltip-danger 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}";
|
|
5319
5302
|
styleInject(css_248z$3);
|
|
5320
5303
|
|
|
5321
5304
|
function Tooltip(_a) {
|
|
@@ -5365,15 +5348,18 @@ function Tooltip(_a) {
|
|
|
5365
5348
|
instance_1.update();
|
|
5366
5349
|
}
|
|
5367
5350
|
}, [open]);
|
|
5368
|
-
var Tootip =
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5351
|
+
var Tootip = useMemo(function () {
|
|
5352
|
+
return jsx("div", __assign({
|
|
5353
|
+
className: classNames('maru-tooltip', "maru-tooltip-".concat(color)),
|
|
5354
|
+
ref: tooltipRef,
|
|
5355
|
+
role: "tooltip",
|
|
5356
|
+
"data-open": open
|
|
5357
|
+
}, {
|
|
5358
|
+
children: content
|
|
5359
|
+
}));
|
|
5360
|
+
}, [open]);
|
|
5375
5361
|
return jsxs("div", __assign({
|
|
5376
|
-
className:
|
|
5362
|
+
className: className,
|
|
5377
5363
|
ref: wrapperRef,
|
|
5378
5364
|
onMouseOver: function onMouseOver() {
|
|
5379
5365
|
return setOpen(true);
|
|
@@ -5450,13 +5436,14 @@ var setHighlightTextOnDataExceptSpace = function setHighlightTextOnDataExceptSpa
|
|
|
5450
5436
|
|
|
5451
5437
|
function Arrow(_a) {
|
|
5452
5438
|
var open = _a.open,
|
|
5439
|
+
focus = _a.focus,
|
|
5453
5440
|
color = _a.color;
|
|
5454
5441
|
return jsx("span", __assign({
|
|
5455
5442
|
className: "maru-dropdown-toggle-arrow"
|
|
5456
5443
|
}, {
|
|
5457
5444
|
children: jsx(Icon, {
|
|
5458
5445
|
name: open ? ICONS.ChevronUp : ICONS.ChevronDown,
|
|
5459
|
-
color: color,
|
|
5446
|
+
color: focus || open ? color : '#e4e4e4',
|
|
5460
5447
|
size: 16
|
|
5461
5448
|
})
|
|
5462
5449
|
}));
|
|
@@ -5484,7 +5471,6 @@ function Clear(_a) {
|
|
|
5484
5471
|
}, {
|
|
5485
5472
|
children: jsx(Icon, {
|
|
5486
5473
|
name: ICONS.XSmallThin,
|
|
5487
|
-
color: "gray",
|
|
5488
5474
|
size: 20
|
|
5489
5475
|
})
|
|
5490
5476
|
}))
|
|
@@ -5510,6 +5496,9 @@ function DropdownToggleButton(_a) {
|
|
|
5510
5496
|
clearSelected = _a.clearSelected,
|
|
5511
5497
|
onClear = _a.onClear,
|
|
5512
5498
|
onKeyDown = _a.onKeyDown;
|
|
5499
|
+
var _b = useState(false),
|
|
5500
|
+
focus = _b[0],
|
|
5501
|
+
setFocus = _b[1];
|
|
5513
5502
|
var handleClick = function handleClick() {
|
|
5514
5503
|
if (disabled) return;
|
|
5515
5504
|
initFilteredData();
|
|
@@ -5522,6 +5511,18 @@ function DropdownToggleButton(_a) {
|
|
|
5522
5511
|
}),
|
|
5523
5512
|
style: {
|
|
5524
5513
|
width: width || '100%'
|
|
5514
|
+
},
|
|
5515
|
+
onMouseOver: function onMouseOver() {
|
|
5516
|
+
return setFocus(true);
|
|
5517
|
+
},
|
|
5518
|
+
onMouseLeave: function onMouseLeave() {
|
|
5519
|
+
return setFocus(open);
|
|
5520
|
+
},
|
|
5521
|
+
onFocus: function onFocus() {
|
|
5522
|
+
return setFocus(true);
|
|
5523
|
+
},
|
|
5524
|
+
onBlur: function onBlur() {
|
|
5525
|
+
return setFocus(false);
|
|
5525
5526
|
}
|
|
5526
5527
|
}, {
|
|
5527
5528
|
children: [inlineLabel && jsx("span", __assign({
|
|
@@ -5537,6 +5538,7 @@ function DropdownToggleButton(_a) {
|
|
|
5537
5538
|
}, {
|
|
5538
5539
|
children: [startArrow && !disabled && jsx(Arrow, {
|
|
5539
5540
|
open: open,
|
|
5541
|
+
focus: focus,
|
|
5540
5542
|
color: color
|
|
5541
5543
|
}), jsx("span", __assign({
|
|
5542
5544
|
className: classNames('maru-dropdown-button-contents', {
|
|
@@ -5553,6 +5555,7 @@ function DropdownToggleButton(_a) {
|
|
|
5553
5555
|
initFilteredData: initFilteredData
|
|
5554
5556
|
}), !startArrow && !disabled && jsx(Arrow, {
|
|
5555
5557
|
open: open,
|
|
5558
|
+
focus: focus,
|
|
5556
5559
|
color: color
|
|
5557
5560
|
})]
|
|
5558
5561
|
}))]
|
|
@@ -5578,6 +5581,9 @@ function DropdownToggleInput(_a) {
|
|
|
5578
5581
|
clearSelected = _a.clearSelected,
|
|
5579
5582
|
onClear = _a.onClear,
|
|
5580
5583
|
onKeyDown = _a.onKeyDown;
|
|
5584
|
+
var _b = useState(false),
|
|
5585
|
+
focus = _b[0],
|
|
5586
|
+
setFocus = _b[1];
|
|
5581
5587
|
var handleClick = function handleClick() {
|
|
5582
5588
|
if (disabled) return;
|
|
5583
5589
|
initFilteredData();
|
|
@@ -5595,7 +5601,19 @@ function DropdownToggleInput(_a) {
|
|
|
5595
5601
|
style: {
|
|
5596
5602
|
width: width || '100%'
|
|
5597
5603
|
},
|
|
5598
|
-
onKeyDown: onKeyDown
|
|
5604
|
+
onKeyDown: onKeyDown,
|
|
5605
|
+
onMouseOver: function onMouseOver() {
|
|
5606
|
+
return setFocus(true);
|
|
5607
|
+
},
|
|
5608
|
+
onMouseLeave: function onMouseLeave() {
|
|
5609
|
+
return setFocus(open);
|
|
5610
|
+
},
|
|
5611
|
+
onFocus: function onFocus() {
|
|
5612
|
+
return setFocus(true);
|
|
5613
|
+
},
|
|
5614
|
+
onBlur: function onBlur() {
|
|
5615
|
+
return setFocus(false);
|
|
5616
|
+
}
|
|
5599
5617
|
}, {
|
|
5600
5618
|
children: [inlineLabel && jsx("span", __assign({
|
|
5601
5619
|
className: "inline-label"
|
|
@@ -5606,6 +5624,7 @@ function DropdownToggleInput(_a) {
|
|
|
5606
5624
|
}, {
|
|
5607
5625
|
children: [startArrow && !disabled && jsx(Arrow, {
|
|
5608
5626
|
open: open,
|
|
5627
|
+
focus: focus,
|
|
5609
5628
|
color: color
|
|
5610
5629
|
}), jsx("input", {
|
|
5611
5630
|
"aria-autocomplete": "none",
|
|
@@ -5622,6 +5641,7 @@ function DropdownToggleInput(_a) {
|
|
|
5622
5641
|
initFilteredData: initFilteredData
|
|
5623
5642
|
}), !startArrow && !disabled && jsx(Arrow, {
|
|
5624
5643
|
open: open,
|
|
5644
|
+
focus: focus,
|
|
5625
5645
|
color: color
|
|
5626
5646
|
})]
|
|
5627
5647
|
}))]
|
|
@@ -5635,11 +5655,9 @@ function DropdownMenu(_a) {
|
|
|
5635
5655
|
idKey = _a.idKey,
|
|
5636
5656
|
displayKey = _a.displayKey,
|
|
5637
5657
|
filteredData = _a.filteredData,
|
|
5638
|
-
horizonMenu = _a.horizonMenu,
|
|
5639
5658
|
width = _a.width,
|
|
5640
5659
|
height = _a.height,
|
|
5641
5660
|
noMessage = _a.noMessage,
|
|
5642
|
-
// menuBottomButton,
|
|
5643
5661
|
CustomMenuItem = _a.customMenuItem,
|
|
5644
5662
|
onSelect = _a.onSelect,
|
|
5645
5663
|
closeMenu = _a.closeMenu;
|
|
@@ -5656,12 +5674,12 @@ function DropdownMenu(_a) {
|
|
|
5656
5674
|
pl = _a.left;
|
|
5657
5675
|
var newWidth = width || pw;
|
|
5658
5676
|
menu.style.width = "".concat(newWidth, "px");
|
|
5659
|
-
if (!horizonMenu) {
|
|
5660
|
-
|
|
5661
|
-
} else {
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
}
|
|
5677
|
+
// if (!horizonMenu) {
|
|
5678
|
+
menu.style.left = "".concat(pl, "px");
|
|
5679
|
+
// } else {
|
|
5680
|
+
// TODO: horizon menu test
|
|
5681
|
+
// menu.style.left = `${pl + pw - newWidth}px`;
|
|
5682
|
+
// }
|
|
5665
5683
|
// FIXME: 무슨 조건인지 잘 모르겠음
|
|
5666
5684
|
if (ph + pt + menu.offsetHeight + 10 > document.body.offsetHeight) {
|
|
5667
5685
|
menu.style.top = "".concat(pt - menu.offsetHeight - 4, "px");
|
|
@@ -5672,7 +5690,8 @@ function DropdownMenu(_a) {
|
|
|
5672
5690
|
menuWrapperRef.current.style.display = 'block';
|
|
5673
5691
|
}
|
|
5674
5692
|
}
|
|
5675
|
-
}, [
|
|
5693
|
+
}, [width]);
|
|
5694
|
+
// }, [horizonMenu]);
|
|
5676
5695
|
var handleWrapperClick = function handleWrapperClick(e) {
|
|
5677
5696
|
e.stopPropagation();
|
|
5678
5697
|
closeMenu();
|
|
@@ -5760,6 +5779,7 @@ function DropdownMenu(_a) {
|
|
|
5760
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}";
|
|
5761
5780
|
styleInject(css_248z$2);
|
|
5762
5781
|
|
|
5782
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
5763
5783
|
function Dropdown(_a) {
|
|
5764
5784
|
var data = _a.data,
|
|
5765
5785
|
selectedId = _a.selectedId,
|
|
@@ -5775,8 +5795,6 @@ function Dropdown(_a) {
|
|
|
5775
5795
|
disabled = _a.disabled,
|
|
5776
5796
|
errorMessage = _a.errorMessage,
|
|
5777
5797
|
inlineLabel = _a.inlineLabel,
|
|
5778
|
-
height = _a.height,
|
|
5779
|
-
horizonMenu = _a.horizonMenu,
|
|
5780
5798
|
label = _a.label,
|
|
5781
5799
|
noDataMessage = _a.noDataMessage,
|
|
5782
5800
|
noSearchedMessage = _a.noSearchedMessage,
|
|
@@ -5786,7 +5804,8 @@ function Dropdown(_a) {
|
|
|
5786
5804
|
toggleEndNode = _a.toggleEndNode,
|
|
5787
5805
|
_c = _a.type,
|
|
5788
5806
|
type = _c === void 0 ? 'button' : _c,
|
|
5789
|
-
width = _a.width
|
|
5807
|
+
width = _a.width,
|
|
5808
|
+
height = _a.height;
|
|
5790
5809
|
var _d = useState(false),
|
|
5791
5810
|
open = _d[0],
|
|
5792
5811
|
setOpen = _d[1];
|
|
@@ -5957,11 +5976,9 @@ function Dropdown(_a) {
|
|
|
5957
5976
|
idKey: idKey,
|
|
5958
5977
|
displayKey: displayKey,
|
|
5959
5978
|
filteredData: filteredData,
|
|
5960
|
-
horizonMenu: horizonMenu,
|
|
5961
5979
|
width: width,
|
|
5962
5980
|
height: height,
|
|
5963
5981
|
noMessage: type === 'button' ? noDataMessage : noSearchedMessage,
|
|
5964
|
-
// menuBottomButton={menuBottomButton}
|
|
5965
5982
|
customMenuItem: customMenuItem,
|
|
5966
5983
|
onSelect: onSelect,
|
|
5967
5984
|
closeMenu: closeMenu
|
|
@@ -5970,7 +5987,7 @@ function Dropdown(_a) {
|
|
|
5970
5987
|
}));
|
|
5971
5988
|
}
|
|
5972
5989
|
|
|
5973
|
-
var css_248z$1 = ".maru-modal-wrapper {\n width: 100vw;\n height: 100vh;\n position: fixed;\n top: 0;\n left: 0;\n background-color: rgba(92, 92, 92, 0.5019607843);\n
|
|
5990
|
+
var css_248z$1 = ".maru-modal-wrapper {\n width: 100vw;\n height: 100vh;\n position: fixed;\n top: 0;\n left: 0;\n background-color: rgba(92, 92, 92, 0.5019607843);\n z-index: 6006;\n display: block;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n.maru-modal-wrapper .maru-modal {\n background-color: white;\n padding: 40px;\n border-radius: 20px;\n box-shadow: 0px 5px 20px 5px #8c8c8c;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-xs {\n width: 300px;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-s {\n width: 400px;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-m {\n width: 550px;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-m .maru-modal-header {\n padding-bottom: 8px;\n border-bottom: 1px solid #e4e4e4;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-l {\n width: 860px;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-l .maru-modal-header {\n padding-bottom: 8px;\n border-bottom: 1px solid #e4e4e4;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-xl {\n width: 1160px;\n}\n.maru-modal-wrapper .maru-modal.maru-modal-xl .maru-modal-header {\n padding-bottom: 8px;\n border-bottom: 1px solid #e4e4e4;\n}\n.maru-modal-wrapper .maru-modal .maru-modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n margin-bottom: 24px;\n}\n.maru-modal-wrapper .maru-modal .maru-modal-header > h1 {\n font-family: Pretendard;\n font-style: normal;\n line-height: 150%;\n font-size: 16px;\n letter-spacing: -0.64px;\n font-weight: 700;\n color: #5c5c5c;\n}\n.maru-modal-wrapper .maru-modal .maru-modal-footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-direction: row;\n margin-top: 24px;\n}\n.maru-modal-wrapper .maru-modal .maru-modal-footer button {\n margin: 0 0 0 8px;\n}";
|
|
5974
5991
|
styleInject(css_248z$1);
|
|
5975
5992
|
|
|
5976
5993
|
function Modal(_a) {
|
|
@@ -6009,6 +6026,9 @@ function Modal(_a) {
|
|
|
6009
6026
|
(_a = okButton === null || okButton === void 0 ? void 0 : okButton.onClick) === null || _a === void 0 ? void 0 : _a.call(okButton);
|
|
6010
6027
|
}
|
|
6011
6028
|
};
|
|
6029
|
+
var handleClose = function handleClose() {
|
|
6030
|
+
onClose();
|
|
6031
|
+
};
|
|
6012
6032
|
var handleModalClick = function handleModalClick(e) {
|
|
6013
6033
|
e.stopPropagation();
|
|
6014
6034
|
};
|
|
@@ -6016,9 +6036,6 @@ function Modal(_a) {
|
|
|
6016
6036
|
e.stopPropagation();
|
|
6017
6037
|
};
|
|
6018
6038
|
// FIXME: 취소에서 탭 > 엔터하면 confirm 동작. 확인 필요
|
|
6019
|
-
var handleCancelClick = function handleCancelClick() {
|
|
6020
|
-
onClose();
|
|
6021
|
-
};
|
|
6022
6039
|
var handleOkButtonClick = function handleOkButtonClick() {
|
|
6023
6040
|
var _a;
|
|
6024
6041
|
(_a = okButton === null || okButton === void 0 ? void 0 : okButton.onClick) === null || _a === void 0 ? void 0 : _a.call(okButton);
|
|
@@ -6031,7 +6048,6 @@ function Modal(_a) {
|
|
|
6031
6048
|
className: "maru-modal-wrapper",
|
|
6032
6049
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
6033
6050
|
tabIndex: 0,
|
|
6034
|
-
"data-show": open,
|
|
6035
6051
|
onClick: handleWrapperClick,
|
|
6036
6052
|
onKeyDown: handleWrapperKeyDown,
|
|
6037
6053
|
role: "presentation"
|
|
@@ -6048,8 +6064,14 @@ function Modal(_a) {
|
|
|
6048
6064
|
}, {
|
|
6049
6065
|
children: [title && jsx("h1", {
|
|
6050
6066
|
children: title
|
|
6051
|
-
}), !hiddenCloseButton && jsx(
|
|
6052
|
-
|
|
6067
|
+
}), !hiddenCloseButton && jsx(Button, {
|
|
6068
|
+
startIcon: {
|
|
6069
|
+
name: ICONS.XLarge,
|
|
6070
|
+
size: 20,
|
|
6071
|
+
color: '#5c5c5c'
|
|
6072
|
+
},
|
|
6073
|
+
color: "secondary",
|
|
6074
|
+
onClick: handleClose
|
|
6053
6075
|
})]
|
|
6054
6076
|
})), jsx("main", __assign({
|
|
6055
6077
|
className: "maru-modal-body"
|
|
@@ -6060,7 +6082,7 @@ function Modal(_a) {
|
|
|
6060
6082
|
}, {
|
|
6061
6083
|
children: [cancelButton && jsx(Button, __assign({
|
|
6062
6084
|
color: "secondary",
|
|
6063
|
-
onClick:
|
|
6085
|
+
onClick: handleClose,
|
|
6064
6086
|
onKeyDown: handleFooterKeyDown,
|
|
6065
6087
|
disabled: cancelButton.disabled
|
|
6066
6088
|
}, {
|
|
@@ -6093,36 +6115,37 @@ function Pagination(_a) {
|
|
|
6093
6115
|
onPageChange = _a.onPageChange,
|
|
6094
6116
|
totalPage = _a.totalPage,
|
|
6095
6117
|
className = _a.className,
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
prevDisabled = _c[0],
|
|
6101
|
-
setPrevDisabled = _c[1];
|
|
6118
|
+
_b = _a.buttonVisibility,
|
|
6119
|
+
buttonVisibility = _b === void 0 ? 'visible' : _b,
|
|
6120
|
+
_c = _a.type,
|
|
6121
|
+
type = _c === void 0 ? 'button' : _c;
|
|
6102
6122
|
var _d = useState(false),
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
var _e = useState(
|
|
6106
|
-
|
|
6107
|
-
|
|
6123
|
+
prevDisabled = _d[0],
|
|
6124
|
+
setPrevDisabled = _d[1];
|
|
6125
|
+
var _e = useState(false),
|
|
6126
|
+
nextDisabled = _e[0],
|
|
6127
|
+
setNextDisabled = _e[1];
|
|
6128
|
+
var _f = useState(-1),
|
|
6129
|
+
inputValue = _f[0],
|
|
6130
|
+
setInputValue = _f[1];
|
|
6108
6131
|
var prevVisibility = useMemo(function () {
|
|
6109
6132
|
if (totalPage > 1 && !prevDisabled) {
|
|
6110
6133
|
return 'visible';
|
|
6111
6134
|
}
|
|
6112
|
-
if (
|
|
6135
|
+
if (buttonVisibility === 'hidden') {
|
|
6113
6136
|
return 'hidden';
|
|
6114
6137
|
}
|
|
6115
6138
|
return undefined;
|
|
6116
|
-
}, [totalPage, prevDisabled,
|
|
6139
|
+
}, [totalPage, prevDisabled, buttonVisibility]);
|
|
6117
6140
|
var nextVisibility = useMemo(function () {
|
|
6118
6141
|
if (totalPage > 1 && !nextDisabled) {
|
|
6119
6142
|
return 'visible';
|
|
6120
6143
|
}
|
|
6121
|
-
if (
|
|
6144
|
+
if (buttonVisibility === 'hidden') {
|
|
6122
6145
|
return 'hidden';
|
|
6123
6146
|
}
|
|
6124
6147
|
return undefined;
|
|
6125
|
-
}, [totalPage, nextDisabled,
|
|
6148
|
+
}, [totalPage, nextDisabled, buttonVisibility]);
|
|
6126
6149
|
var defaultRange = useMemo(function () {
|
|
6127
6150
|
var pageRange = [];
|
|
6128
6151
|
var start = Math.floor((page - 1) / 10) * 10;
|
|
@@ -6305,4 +6328,4 @@ function Pagination(_a) {
|
|
|
6305
6328
|
}));
|
|
6306
6329
|
}
|
|
6307
6330
|
|
|
6308
|
-
export { Button, Checkbox, Chip, Dropdown, Icon, Input, Modal, Pagination, Popover, Radio, StyleProvider, Toggle, Tooltip };
|
|
6331
|
+
export { Button, Checkbox, Chip, Dropdown, ICONS, Icon, Input, Modal, Pagination, Popover, Radio, StyleProvider, Toggle, Tooltip };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maru_design2",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"author": "zena-42maru",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"storybook": "storybook dev -p 6006",
|
|
65
65
|
"build-storybook": "storybook build",
|
|
66
66
|
"build": "rollup -c",
|
|
67
|
-
"release": "rm -rf dist && yarn build && mv README.md temp.md && yarn publish && mv temp.md README.md"
|
|
67
|
+
"release": "rm -rf dist && yarn build && mv README.md temp.md && yarn publish && mv temp.md README.md",
|
|
68
|
+
"svg": "node ./scripts/svg-parser.js"
|
|
68
69
|
}
|
|
69
70
|
}
|
package/.babelrc.json
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"airbnb",
|
|
4
|
-
"plugin:react/recommended",
|
|
5
|
-
"plugin:@typescript-eslint/recommended"
|
|
6
|
-
],
|
|
7
|
-
"plugins": ["react", "@typescript-eslint", "prettier", "simple-import-sort"],
|
|
8
|
-
"rules": {
|
|
9
|
-
"no-tabs": [
|
|
10
|
-
"error",
|
|
11
|
-
{
|
|
12
|
-
"allowIndentationTabs": true
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"no-mixed-spaces-and-tabs": 0,
|
|
16
|
-
"simple-import-sort/imports": [
|
|
17
|
-
"warn",
|
|
18
|
-
{
|
|
19
|
-
"groups": [
|
|
20
|
-
["^react", "^(?!src)(?=@?\\w)"],
|
|
21
|
-
[
|
|
22
|
-
"constants",
|
|
23
|
-
"hooks",
|
|
24
|
-
"reducers",
|
|
25
|
-
"routes",
|
|
26
|
-
"store",
|
|
27
|
-
"types",
|
|
28
|
-
"utils"
|
|
29
|
-
],
|
|
30
|
-
[
|
|
31
|
-
"views",
|
|
32
|
-
"^\\.\\.(?!/?$)",
|
|
33
|
-
"^\\.\\./?$",
|
|
34
|
-
"^\\./(?=.*/)(?!/?$)",
|
|
35
|
-
"^\\.(?!/?$)",
|
|
36
|
-
"^\\./?$",
|
|
37
|
-
"components"
|
|
38
|
-
],
|
|
39
|
-
["assets", "^.+\\.s?css$"]
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"import/order": "off",
|
|
44
|
-
"import/extensions": [
|
|
45
|
-
"off",
|
|
46
|
-
{
|
|
47
|
-
"ts": "always",
|
|
48
|
-
"tsx": "always",
|
|
49
|
-
"js": "always",
|
|
50
|
-
"jsx": "always"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"import/no-unresolved": "off",
|
|
54
|
-
"react/jsx-filename-extension": [
|
|
55
|
-
"warn",
|
|
56
|
-
{
|
|
57
|
-
"extensions": [".ts", ".tsx"]
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"react/destructuring-assignment": 0,
|
|
61
|
-
"no-use-before-define": "off",
|
|
62
|
-
"@typescript-eslint/no-use-before-define": ["error"],
|
|
63
|
-
"import/no-extraneous-dependencies": [
|
|
64
|
-
"error",
|
|
65
|
-
{
|
|
66
|
-
"devDependencies": true,
|
|
67
|
-
"optionalDependencies": true,
|
|
68
|
-
"peerDependencies": true
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"linebreak-style": "off",
|
|
72
|
-
"object-curly-newline": "off",
|
|
73
|
-
"comma-dangle": "off",
|
|
74
|
-
"react/prop-types": "off",
|
|
75
|
-
"operator-linebreak": "off",
|
|
76
|
-
"import/prefer-default-export": "warn",
|
|
77
|
-
"no-console": "off",
|
|
78
|
-
"implicit-arrow-linebreak": "off",
|
|
79
|
-
"react/jsx-curly-newline": "off",
|
|
80
|
-
"no-param-reassign": [
|
|
81
|
-
"error",
|
|
82
|
-
{
|
|
83
|
-
"props": false
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
"@typescript-eslint/ban-types": "warn",
|
|
87
|
-
"no-nested-ternary": "off",
|
|
88
|
-
"indent": "off",
|
|
89
|
-
"camelcase": "off",
|
|
90
|
-
"no-confusing-arrow": "off",
|
|
91
|
-
"function-paren-newline": "off",
|
|
92
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
93
|
-
"no-plusplus": "warn",
|
|
94
|
-
"react/jsx-wrap-multilines": "off",
|
|
95
|
-
"no-restricted-syntax": "off",
|
|
96
|
-
"no-await-in-loop": "off",
|
|
97
|
-
"react/require-default-props": [
|
|
98
|
-
1,
|
|
99
|
-
{
|
|
100
|
-
"functions": "ignore"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"jsx-a11y/label-has-associated-control": [
|
|
104
|
-
2,
|
|
105
|
-
{
|
|
106
|
-
"labelAttributes": ["htmlFor"]
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: "Chromatic"
|
|
2
|
-
|
|
3
|
-
on: push
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
chromatic-release:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v2
|
|
10
|
-
with:
|
|
11
|
-
fetch-depth: 0
|
|
12
|
-
- uses: actions/setup-node@v3
|
|
13
|
-
with:
|
|
14
|
-
node-version: 18
|
|
15
|
-
- run: yarn
|
|
16
|
-
- uses: chromaui/action@latest
|
|
17
|
-
with:
|
|
18
|
-
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
19
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
package/.prettierrc
DELETED
package/build-storybook.log
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
yarn run v1.22.22
|
|
2
|
-
$ storybook build --output-dir /var/folders/px/wfswfhnj2_96379m3pn48snm0000gn/T/chromatic--60662-3uZghrajfe3J
|
|
3
|
-
@storybook/cli v8.0.6
|
|
4
|
-
|
|
5
|
-
info => Cleaning outputDir: ../../../../../var/folders/px/wfswfhnj2_96379m3pn48snm0000gn/T/chromatic--60662-3uZghrajfe3J
|
|
6
|
-
info => Loading presets
|
|
7
|
-
info => Building manager..
|
|
8
|
-
info => Manager built (106 ms)
|
|
9
|
-
info => Building preview..
|
|
10
|
-
WARN No story files found for the specified pattern: src/**/*.mdx
|
|
11
|
-
info Addon-docs: using MDX3
|
|
12
|
-
info => Using implicit CSS loaders
|
|
13
|
-
info => Using default Webpack5 setup
|
|
14
|
-
info Using tsconfig paths for react-docgen
|
|
15
|
-
WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
|
16
|
-
WARN This can impact web performance.
|
|
17
|
-
WARN Assets:
|
|
18
|
-
WARN 841.8b90d07c.iframe.bundle.js (1.51 MiB)
|
|
19
|
-
WARN 589.80a80dfc.iframe.bundle.js (628 KiB)
|
|
20
|
-
WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
|
|
21
|
-
WARN Entrypoints:
|
|
22
|
-
WARN main (1.53 MiB)
|
|
23
|
-
WARN runtime~main.fb7a63fd.iframe.bundle.js
|
|
24
|
-
WARN 841.8b90d07c.iframe.bundle.js
|
|
25
|
-
WARN main.26a48fe5.iframe.bundle.js
|
|
26
|
-
WARN
|
|
27
|
-
info => Preview built (5.97 s)
|
|
28
|
-
info => Output directory: /var/folders/px/wfswfhnj2_96379m3pn48snm0000gn/T/chromatic--60662-3uZghrajfe3J
|
|
29
|
-
Done in 8.54s.
|
package/scripts/svg-parser.js
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
const inputDir = './src/assets/icons';
|
|
6
|
-
const outputDir = './src/components/atoms/icon';
|
|
7
|
-
const svgs = fs.readdirSync(inputDir);
|
|
8
|
-
|
|
9
|
-
// 아이콘의 정보들을 모을 객체
|
|
10
|
-
const icons = {};
|
|
11
|
-
// 아이콘의 이름을 모을 객체
|
|
12
|
-
const names = {};
|
|
13
|
-
|
|
14
|
-
const toCamelCase = (pascalStr) =>
|
|
15
|
-
pascalStr
|
|
16
|
-
.split('-')
|
|
17
|
-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
18
|
-
.join('');
|
|
19
|
-
|
|
20
|
-
const readFile = (filePath, fileName, fileExtension) =>
|
|
21
|
-
new Promise((resolve, reject) => {
|
|
22
|
-
fs.readFile(filePath, 'utf8', (err, data) => {
|
|
23
|
-
if (err) {
|
|
24
|
-
reject(err);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
console.log('---------- parsing start ----------');
|
|
29
|
-
|
|
30
|
-
console.log('((data))', data);
|
|
31
|
-
|
|
32
|
-
// svg args 추출
|
|
33
|
-
const svgStartRegex = /<svg/g;
|
|
34
|
-
const svgEndRegex = />/;
|
|
35
|
-
const svgArgs = data.split(svgStartRegex)[1].split(svgEndRegex)[0];
|
|
36
|
-
|
|
37
|
-
console.log('**svgArgs', svgArgs);
|
|
38
|
-
|
|
39
|
-
// width 추출
|
|
40
|
-
const widthRegex = /width=".{1,9}"/g;
|
|
41
|
-
const width = svgArgs.match(widthRegex)?.[0]?.split('"')?.[1];
|
|
42
|
-
console.log('*width', width);
|
|
43
|
-
|
|
44
|
-
// height 추출
|
|
45
|
-
const heightRegex = /height=".{1,9}"/g;
|
|
46
|
-
const height = svgArgs.match(heightRegex)?.[0]?.split('"')?.[1];
|
|
47
|
-
console.log('*height', height);
|
|
48
|
-
|
|
49
|
-
// viewBox 추출
|
|
50
|
-
const viewBoxRegex = /viewBox="[0-9\s-.]*"/;
|
|
51
|
-
const viewBox = svgArgs.match(viewBoxRegex)?.[0]?.split('"')?.[1];
|
|
52
|
-
console.log('*viewBox', viewBox);
|
|
53
|
-
|
|
54
|
-
// svgFill 추출
|
|
55
|
-
const fillRegex = /fill=".{1,9}"/g;
|
|
56
|
-
const svgFill = svgArgs.match(fillRegex)?.[0]?.split('"')?.[1];
|
|
57
|
-
console.log('*svgFill', svgFill);
|
|
58
|
-
|
|
59
|
-
// path args 추출
|
|
60
|
-
const pathStartRegex = /<path/g;
|
|
61
|
-
const paths = data
|
|
62
|
-
.split(pathStartRegex)
|
|
63
|
-
.filter((_, idx) => idx > 0)
|
|
64
|
-
.map((pathArgs) => {
|
|
65
|
-
// d 추출
|
|
66
|
-
const dRegex = /d=".*"/g;
|
|
67
|
-
const d = pathArgs.match(dRegex)?.[0]?.split('"')?.[1];
|
|
68
|
-
console.log('*d', d);
|
|
69
|
-
|
|
70
|
-
// pathFill 추출
|
|
71
|
-
const pathFill = pathArgs.match(fillRegex)?.[0]?.split('"')?.[1];
|
|
72
|
-
console.log('*pathFill', pathFill);
|
|
73
|
-
|
|
74
|
-
// fillRule 추출
|
|
75
|
-
const fillRuleRegex = /fill-rule=".{1,9}"/g;
|
|
76
|
-
const fillRule = pathArgs.match(fillRuleRegex)?.[0]?.split('"')?.[1];
|
|
77
|
-
console.log('*fillRule', fillRule);
|
|
78
|
-
|
|
79
|
-
// clipRule 추출
|
|
80
|
-
const clipRuleRegex = /clip-rule=".{1,9}"/g;
|
|
81
|
-
const clipRule = pathArgs.match(clipRuleRegex)?.[0]?.split('"')?.[1];
|
|
82
|
-
console.log('*clipRule', clipRule);
|
|
83
|
-
|
|
84
|
-
// stroke 추출
|
|
85
|
-
const strokeRegex = /stroke=".{1,9}"/g;
|
|
86
|
-
const stroke = pathArgs.match(strokeRegex)?.[0]?.split('"')?.[1];
|
|
87
|
-
console.log('*stroke', stroke);
|
|
88
|
-
|
|
89
|
-
// strokeWidth 추출
|
|
90
|
-
const strokeWidthRegex = /stroke-width=".{1,9}"/g;
|
|
91
|
-
const strokeWidth = pathArgs
|
|
92
|
-
.match(strokeWidthRegex)?.[0]
|
|
93
|
-
?.split('"')?.[1];
|
|
94
|
-
console.log('*strokeWidth', strokeWidth);
|
|
95
|
-
|
|
96
|
-
// strokeLinecap 추출
|
|
97
|
-
const strokeLinecapRegex = /stroke-linecap=".{1,9}"/g;
|
|
98
|
-
const strokeLinecap = pathArgs
|
|
99
|
-
.match(strokeLinecapRegex)?.[0]
|
|
100
|
-
?.split('"')?.[1];
|
|
101
|
-
console.log('*strokeLinecap', strokeLinecap);
|
|
102
|
-
|
|
103
|
-
// strokeLinejoin 추출
|
|
104
|
-
const strokeLinejoinRegex = /stroke-linejoin=".{1,9}"/g;
|
|
105
|
-
const strokeLinejoin = pathArgs
|
|
106
|
-
.match(strokeLinejoinRegex)?.[0]
|
|
107
|
-
?.split('"')?.[1];
|
|
108
|
-
console.log('*strokeLinejoin', strokeLinejoin);
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
d,
|
|
112
|
-
fill: pathFill,
|
|
113
|
-
fillRule,
|
|
114
|
-
clipRule,
|
|
115
|
-
stroke,
|
|
116
|
-
strokeWidth,
|
|
117
|
-
strokeLinecap,
|
|
118
|
-
strokeLinejoin,
|
|
119
|
-
};
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
// circle args 추출
|
|
123
|
-
const circleStartRegex = /<circle/g;
|
|
124
|
-
const circles = data
|
|
125
|
-
.split(circleStartRegex)
|
|
126
|
-
.filter((_, idx) => idx > 0)
|
|
127
|
-
.map((circleArgs) => {
|
|
128
|
-
// cx 추출
|
|
129
|
-
const cxRegex = /cx=".{1,9}"/g;
|
|
130
|
-
const cx = circleArgs.match(cxRegex)?.[0]?.split('"')?.[1];
|
|
131
|
-
console.log('*cx', cx);
|
|
132
|
-
|
|
133
|
-
// cy 추출
|
|
134
|
-
const cyRegex = /cy=".{1,9}"/g;
|
|
135
|
-
const cy = circleArgs.match(cyRegex)?.[0]?.split('"')?.[1];
|
|
136
|
-
console.log('*cy', cy);
|
|
137
|
-
|
|
138
|
-
// r 추출
|
|
139
|
-
const rRegex = /r=".{1,9}"/g;
|
|
140
|
-
const r = circleArgs.match(rRegex)?.[0]?.split('"')?.[1];
|
|
141
|
-
console.log('*r', r);
|
|
142
|
-
|
|
143
|
-
// circleFill 추출
|
|
144
|
-
const circleFill = circleArgs.match(fillRegex)?.[0]?.split('"')?.[1];
|
|
145
|
-
console.log('*circleFill', circleFill);
|
|
146
|
-
|
|
147
|
-
return { cx, cy, r, fill: circleFill };
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
const fileNameWithoutExtension = toCamelCase(
|
|
151
|
-
fileName.split(fileExtension)[0],
|
|
152
|
-
);
|
|
153
|
-
console.log('fileNameWithoutExtension', fileNameWithoutExtension);
|
|
154
|
-
|
|
155
|
-
icons[fileNameWithoutExtension] = {
|
|
156
|
-
width,
|
|
157
|
-
height,
|
|
158
|
-
viewBox,
|
|
159
|
-
fill: svgFill,
|
|
160
|
-
paths,
|
|
161
|
-
circles,
|
|
162
|
-
};
|
|
163
|
-
names[fileNameWithoutExtension] = fileNameWithoutExtension;
|
|
164
|
-
|
|
165
|
-
resolve();
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
async function main() {
|
|
170
|
-
for (const svg of svgs) {
|
|
171
|
-
const extension = path.extname(svg);
|
|
172
|
-
if (extension === '.svg' && !svg.includes('NoConvert')) {
|
|
173
|
-
await readFile(`${inputDir}/${svg}`, svg, extension);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
console.log('### icons', icons);
|
|
178
|
-
console.log('### names', names);
|
|
179
|
-
|
|
180
|
-
fs.writeFileSync(
|
|
181
|
-
`${outputDir}/iconmap.ts`,
|
|
182
|
-
`/* eslint-disable no-multiple-empty-lines */
|
|
183
|
-
/* eslint-disable no-trailing-spaces */
|
|
184
|
-
/* eslint-disable eol-last */
|
|
185
|
-
/* eslint-disable object-curly-spacing */
|
|
186
|
-
/* eslint-disable comma-spacing */
|
|
187
|
-
/* eslint-disable key-spacing */
|
|
188
|
-
/* eslint-disable quotes */
|
|
189
|
-
/* eslint-disable quote-props */
|
|
190
|
-
export const iconmap: {
|
|
191
|
-
[key: string]: {
|
|
192
|
-
width: string;
|
|
193
|
-
height: string;
|
|
194
|
-
viewBox: string;
|
|
195
|
-
fill: string;
|
|
196
|
-
paths: {
|
|
197
|
-
d: string;
|
|
198
|
-
fill?: string;
|
|
199
|
-
fillRule?: string;
|
|
200
|
-
clipRule?: string;
|
|
201
|
-
stroke?: string;
|
|
202
|
-
strokeWidth?: string;
|
|
203
|
-
strokeLinecap?: string;
|
|
204
|
-
strokeLinejoin?: string;
|
|
205
|
-
}[];
|
|
206
|
-
circles: {
|
|
207
|
-
cx: string;
|
|
208
|
-
cy: string;
|
|
209
|
-
r: string;
|
|
210
|
-
fill: string;
|
|
211
|
-
}[];
|
|
212
|
-
};
|
|
213
|
-
} = ${JSON.stringify(icons)};
|
|
214
|
-
export const ICONS = ${JSON.stringify(names)} as const;
|
|
215
|
-
export type TIcons = (typeof ICONS)[keyof typeof ICONS];
|
|
216
|
-
`,
|
|
217
|
-
'utf8',
|
|
218
|
-
(error) => {
|
|
219
|
-
if (error) throw error;
|
|
220
|
-
},
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
main();
|