@ceed/cds 0.0.126 → 0.0.128
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/index.js +1 -6
- package/package.json +2 -3
- package/dist/components/Accordions/Accordions.js +0 -66
- package/dist/components/Accordions/index.js +0 -3
- package/dist/components/Autocomplete/Autocomplete.js +0 -251
- package/dist/components/Autocomplete/index.js +0 -3
- package/dist/components/Box/Box.js +0 -6
- package/dist/components/Box/index.js +0 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -67
- package/dist/components/Breadcrumbs/index.js +0 -3
- package/dist/components/Button/Button.js +0 -28
- package/dist/components/Button/index.js +0 -3
- package/dist/components/Calendar/Calendar.js +0 -383
- package/dist/components/Calendar/hooks/use-calendar-props.js +0 -80
- package/dist/components/Calendar/hooks/use-calendar.js +0 -244
- package/dist/components/Calendar/index.js +0 -3
- package/dist/components/Calendar/types.js +0 -1
- package/dist/components/Calendar/utils/index.js +0 -72
- package/dist/components/Card/Card.js +0 -22
- package/dist/components/Card/index.js +0 -3
- package/dist/components/Checkbox/Checkbox.js +0 -28
- package/dist/components/Checkbox/index.js +0 -3
- package/dist/components/Chip/Chip.js +0 -6
- package/dist/components/Chip/index.js +0 -3
- package/dist/components/Container/Container.js +0 -65
- package/dist/components/Container/index.js +0 -3
- package/dist/components/CurrencyInput/CurrencyInput.js +0 -108
- package/dist/components/CurrencyInput/hooks/use-currency-setting.js +0 -165
- package/dist/components/CurrencyInput/index.js +0 -3
- package/dist/components/DataTable/DataTable.js +0 -437
- package/dist/components/DataTable/index.js +0 -3
- package/dist/components/DataTable/types.js +0 -1
- package/dist/components/DatePicker/DatePicker.js +0 -207
- package/dist/components/DatePicker/index.js +0 -3
- package/dist/components/DateRangePicker/DateRangePicker.js +0 -209
- package/dist/components/DateRangePicker/index.js +0 -3
- package/dist/components/DialogActions/DialogActions.js +0 -15
- package/dist/components/DialogActions/index.js +0 -3
- package/dist/components/DialogContent/DialogContent.js +0 -12
- package/dist/components/DialogContent/index.js +0 -3
- package/dist/components/DialogFrame/DialogFrame.js +0 -51
- package/dist/components/DialogFrame/index.js +0 -3
- package/dist/components/DialogTitle/DialogTitle.js +0 -12
- package/dist/components/DialogTitle/index.js +0 -3
- package/dist/components/Divider/Divider.js +0 -28
- package/dist/components/Divider/index.js +0 -3
- package/dist/components/Dropdown/Dropdown.js +0 -6
- package/dist/components/Dropdown/index.js +0 -3
- package/dist/components/FormControl/FormControl.js +0 -17
- package/dist/components/FormControl/index.js +0 -3
- package/dist/components/FormHelperText/FormHelperText.js +0 -6
- package/dist/components/FormHelperText/index.js +0 -3
- package/dist/components/FormLabel/FormLabel.js +0 -6
- package/dist/components/FormLabel/index.js +0 -3
- package/dist/components/Grid/Grid.js +0 -6
- package/dist/components/Grid/index.js +0 -3
- package/dist/components/IconButton/IconButton.js +0 -28
- package/dist/components/IconButton/index.js +0 -3
- package/dist/components/Input/Input.js +0 -51
- package/dist/components/Input/index.js +0 -3
- package/dist/components/InsetDrawer/InsetDrawer.js +0 -45
- package/dist/components/InsetDrawer/index.js +0 -3
- package/dist/components/Markdown/Markdown.js +0 -59
- package/dist/components/Markdown/index.js +0 -3
- package/dist/components/Menu/Menu.js +0 -56
- package/dist/components/Menu/index.js +0 -3
- package/dist/components/Modal/Modal.js +0 -63
- package/dist/components/Modal/index.js +0 -3
- package/dist/components/MonthPicker/MonthPicker.js +0 -203
- package/dist/components/MonthPicker/index.js +0 -3
- package/dist/components/MonthRangePicker/MonthRangePicker.js +0 -207
- package/dist/components/MonthRangePicker/index.js +0 -3
- package/dist/components/Radio/Radio.js +0 -10
- package/dist/components/Radio/index.js +0 -3
- package/dist/components/RadioList/RadioList.js +0 -38
- package/dist/components/RadioList/index.js +0 -3
- package/dist/components/Select/Select.js +0 -76
- package/dist/components/Select/index.js +0 -3
- package/dist/components/Sheet/Sheet.js +0 -6
- package/dist/components/Sheet/index.js +0 -3
- package/dist/components/Stack/Stack.js +0 -6
- package/dist/components/Stack/index.js +0 -3
- package/dist/components/Switch/Switch.js +0 -54
- package/dist/components/Switch/index.js +0 -3
- package/dist/components/Table/Table.js +0 -89
- package/dist/components/Table/index.js +0 -3
- package/dist/components/Tabs/Tabs.js +0 -18
- package/dist/components/Tabs/index.js +0 -3
- package/dist/components/Textarea/Textarea.js +0 -50
- package/dist/components/Textarea/index.js +0 -3
- package/dist/components/ThemeProvider/ThemeProvider.js +0 -159
- package/dist/components/ThemeProvider/index.js +0 -3
- package/dist/components/Tooltip/Tooltip.js +0 -28
- package/dist/components/Tooltip/index.js +0 -3
- package/dist/components/Typography/Typography.js +0 -28
- package/dist/components/Typography/index.js +0 -3
- package/dist/components/Uploader/Uploader.js +0 -353
- package/dist/components/Uploader/index.js +0 -3
- package/dist/components/index.js +0 -44
- package/dist/index.mjs +0 -1
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
24
|
-
import { IMaskInput, IMask } from "react-imask";
|
|
25
|
-
// @ts-ignore: ESM import 해야만 프레이머에서 정상적으로 동작한다. https://github.com/mui/material-ui/issues/35233
|
|
26
|
-
import CalendarTodayIcon from "@mui/icons-material/esm/CalendarToday.js";
|
|
27
|
-
import { styled } from "@mui/joy";
|
|
28
|
-
import { FocusTrap, ClickAwayListener, Popper } from "@mui/base";
|
|
29
|
-
import Input from "../Input";
|
|
30
|
-
import IconButton from "../IconButton";
|
|
31
|
-
import Sheet from "../Sheet";
|
|
32
|
-
import Calendar from "../Calendar";
|
|
33
|
-
import DialogActions from "../DialogActions";
|
|
34
|
-
import Button from "../Button";
|
|
35
|
-
import FormControl from "../FormControl";
|
|
36
|
-
import FormLabel from "../FormLabel";
|
|
37
|
-
import FormHelperText from "../FormHelperText";
|
|
38
|
-
var StyledPopper = styled(Popper, {
|
|
39
|
-
name: "MonthRangePicker",
|
|
40
|
-
slot: "popper",
|
|
41
|
-
})(function (_a) {
|
|
42
|
-
var theme = _a.theme;
|
|
43
|
-
return ({
|
|
44
|
-
zIndex: theme.zIndex.tooltip,
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
var CalendarSheet = styled(Sheet, {
|
|
48
|
-
name: "MonthRangePicker",
|
|
49
|
-
slot: "sheet",
|
|
50
|
-
overridesResolver: function (props, styles) { return styles.root; },
|
|
51
|
-
})(function (_a) {
|
|
52
|
-
var theme = _a.theme;
|
|
53
|
-
return ({
|
|
54
|
-
zIndex: theme.zIndex.tooltip,
|
|
55
|
-
width: "264px",
|
|
56
|
-
boxShadow: theme.shadow.md,
|
|
57
|
-
borderRadius: theme.radius.md,
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
var MonthRangePickerContainer = styled("div", {
|
|
61
|
-
name: "MonthRangePicker",
|
|
62
|
-
slot: "container",
|
|
63
|
-
})({
|
|
64
|
-
width: "100%",
|
|
65
|
-
});
|
|
66
|
-
var formatDateMonth = function (date) {
|
|
67
|
-
var month = "".concat(date.getMonth() + 1);
|
|
68
|
-
var year = date.getFullYear();
|
|
69
|
-
if (Number(month) < 10)
|
|
70
|
-
month = "0" + month;
|
|
71
|
-
return [year, month].join("/");
|
|
72
|
-
};
|
|
73
|
-
var formatValueString = function (_a) {
|
|
74
|
-
var date1 = _a[0], date2 = _a[1];
|
|
75
|
-
var getStr = function (dateString) {
|
|
76
|
-
// YYYY/MM(/DD)
|
|
77
|
-
if (!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(dateString)) {
|
|
78
|
-
return dateString;
|
|
79
|
-
}
|
|
80
|
-
var yearMonthDay = dateString.split("/");
|
|
81
|
-
var date = new Date(Number(yearMonthDay[0]), Number(yearMonthDay[1]) - 1);
|
|
82
|
-
return formatDateMonth(date);
|
|
83
|
-
};
|
|
84
|
-
return [getStr(date1), getStr(date2)].join(" - ");
|
|
85
|
-
};
|
|
86
|
-
var parseDate = function (str) {
|
|
87
|
-
var date1 = str.split(" - ")[0] || "";
|
|
88
|
-
var date2 = str.split(" - ")[1] || "";
|
|
89
|
-
return [date1, date2];
|
|
90
|
-
};
|
|
91
|
-
var TextMaskAdapter = React.forwardRef(function TextMaskAdapter(props, ref) {
|
|
92
|
-
var onChange = props.onChange, other = __rest(props, ["onChange"]);
|
|
93
|
-
return (React.createElement(IMaskInput, __assign({}, other, { inputRef: ref, onAccept: function (value) {
|
|
94
|
-
return onChange({ target: { name: props.name, value: value } });
|
|
95
|
-
}, mask: Date,
|
|
96
|
-
// other options are optional
|
|
97
|
-
pattern: "Y/m - Y/m",
|
|
98
|
-
// you can provide your own blocks definitions, default blocks for date mask are:
|
|
99
|
-
blocks: {
|
|
100
|
-
m: {
|
|
101
|
-
mask: IMask.MaskedRange,
|
|
102
|
-
from: 1,
|
|
103
|
-
to: 12,
|
|
104
|
-
maxLength: 2,
|
|
105
|
-
},
|
|
106
|
-
Y: {
|
|
107
|
-
mask: IMask.MaskedRange,
|
|
108
|
-
from: 1900,
|
|
109
|
-
to: 9999,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
// define date -> str convertion
|
|
113
|
-
format: formatValueString,
|
|
114
|
-
// define str -> date convertion
|
|
115
|
-
parse: parseDate })));
|
|
116
|
-
});
|
|
117
|
-
var MonthRangePicker = forwardRef(function (props, ref) {
|
|
118
|
-
// prop destruction
|
|
119
|
-
var onChange = props.onChange, disabled = props.disabled, label = props.label, error = props.error, helperText = props.helperText, minDate = props.minDate, maxDate = props.maxDate, disableFuture = props.disableFuture, disablePast = props.disablePast, required = props.required, innerProps = __rest(props, ["onChange", "disabled", "label", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "required"]);
|
|
120
|
-
// lib hooks
|
|
121
|
-
// state, ref, querystring hooks
|
|
122
|
-
var innerRef = useRef(null);
|
|
123
|
-
var _a = useState(""), value = _a[0], setValue = _a[1];
|
|
124
|
-
var _b = useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
125
|
-
// form hooks
|
|
126
|
-
// query hooks
|
|
127
|
-
// calculated values
|
|
128
|
-
var open = Boolean(anchorEl);
|
|
129
|
-
var calendarValue = useMemo(function () {
|
|
130
|
-
return value
|
|
131
|
-
? parseDate(value).map(function (v) { return new Date(v); })
|
|
132
|
-
: undefined;
|
|
133
|
-
}, [value]);
|
|
134
|
-
// effects
|
|
135
|
-
useEffect(function () {
|
|
136
|
-
setValue(props.value ? formatValueString(parseDate(props.value)) : "");
|
|
137
|
-
}, [props.value]);
|
|
138
|
-
useEffect(function () {
|
|
139
|
-
var _a;
|
|
140
|
-
if (!anchorEl) {
|
|
141
|
-
// NOTE: 변경된 값을 blur이벤트 핸들러에서 다룰려면 calendar tooltip이 닫힐 때 blur 이벤트를 발생시켜야 한다.
|
|
142
|
-
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
143
|
-
}
|
|
144
|
-
}, [anchorEl, innerRef]);
|
|
145
|
-
useImperativeHandle(ref, function () { return innerRef.current; }, [
|
|
146
|
-
innerRef.current,
|
|
147
|
-
]);
|
|
148
|
-
// handlers
|
|
149
|
-
var handleChange = useCallback(function (event) {
|
|
150
|
-
setValue(event.target.value);
|
|
151
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
152
|
-
}, [onChange]);
|
|
153
|
-
var handleCalendarToggle = useCallback(function (event) {
|
|
154
|
-
var _a;
|
|
155
|
-
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
156
|
-
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
157
|
-
}, [anchorEl, setAnchorEl, innerRef]);
|
|
158
|
-
var handleCalendarChange = useCallback(function (_a) {
|
|
159
|
-
var date1 = _a[0], date2 = _a[1];
|
|
160
|
-
if (!date1 || !date2)
|
|
161
|
-
return;
|
|
162
|
-
setValue(formatValueString([
|
|
163
|
-
formatDateMonth(date1),
|
|
164
|
-
formatDateMonth(date2),
|
|
165
|
-
]));
|
|
166
|
-
setAnchorEl(null);
|
|
167
|
-
}, [setValue, setAnchorEl]);
|
|
168
|
-
var picker = (React.createElement(MonthRangePickerContainer, null,
|
|
169
|
-
React.createElement(FocusTrap, { open: true },
|
|
170
|
-
React.createElement(React.Fragment, null,
|
|
171
|
-
React.createElement(Input, __assign({}, innerProps, { color: error ? "danger" : innerProps.color, ref: ref, size: "sm", value: value, onChange: handleChange, disabled: disabled, required: required, placeholder: "YYYY/MM - YYYY/MM", slotProps: {
|
|
172
|
-
input: { component: TextMaskAdapter, ref: innerRef },
|
|
173
|
-
}, sx: {
|
|
174
|
-
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
175
|
-
fontFamily: "monospace",
|
|
176
|
-
}, endDecorator: React.createElement(IconButton, { variant: "plain", onClick: handleCalendarToggle },
|
|
177
|
-
React.createElement(CalendarTodayIcon, null)) })),
|
|
178
|
-
open && (React.createElement(ClickAwayListener, { onClickAway: function () { return setAnchorEl(null); } },
|
|
179
|
-
React.createElement(StyledPopper, { id: "date-range-picker-popper", open: true, anchorEl: anchorEl, placement: "bottom-end",
|
|
180
|
-
// NOTE: 값이 변경 되기전 blur 이벤트 방지
|
|
181
|
-
onMouseDown: function (e) { return e.preventDefault(); }, modifiers: [
|
|
182
|
-
{
|
|
183
|
-
name: "offset",
|
|
184
|
-
options: {
|
|
185
|
-
offset: [4, 4],
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
] },
|
|
189
|
-
React.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" },
|
|
190
|
-
React.createElement(Calendar, { view: "month", views: ["month"], rangeSelection: true, defaultValue: calendarValue, onChange: handleCalendarChange, minDate: minDate ? new Date(minDate) : undefined, maxDate: maxDate ? new Date(maxDate) : undefined, disableFuture: disableFuture, disablePast: disablePast }),
|
|
191
|
-
React.createElement(DialogActions, { sx: {
|
|
192
|
-
p: 1,
|
|
193
|
-
} },
|
|
194
|
-
React.createElement(Button, { size: "sm", variant: "plain", color: "neutral", onClick: function () {
|
|
195
|
-
setValue("");
|
|
196
|
-
setAnchorEl(null);
|
|
197
|
-
} }, "Clear"))))))))));
|
|
198
|
-
if (label) {
|
|
199
|
-
return (React.createElement(FormControl, { required: required, disabled: disabled, error: error, size: "sm" },
|
|
200
|
-
React.createElement(FormLabel, null, label),
|
|
201
|
-
picker,
|
|
202
|
-
helperText && React.createElement(FormHelperText, null, helperText)));
|
|
203
|
-
}
|
|
204
|
-
return picker;
|
|
205
|
-
});
|
|
206
|
-
export { MonthRangePicker };
|
|
207
|
-
MonthRangePicker.displayName = "MonthRangePicker";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
|
|
2
|
-
import { motion } from "framer-motion";
|
|
3
|
-
var MotionRadio = motion(JoyRadio);
|
|
4
|
-
var Radio = MotionRadio;
|
|
5
|
-
export { Radio };
|
|
6
|
-
Radio.displayName = "Radio";
|
|
7
|
-
var MotionRadioGroup = motion(JoyRadioGroup);
|
|
8
|
-
var RadioGroup = MotionRadioGroup;
|
|
9
|
-
export { RadioGroup };
|
|
10
|
-
RadioGroup.displayName = "RadioGroup";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from "react";
|
|
24
|
-
import { Radio, RadioGroup } from "../Radio/Radio";
|
|
25
|
-
function RadioList(props) {
|
|
26
|
-
// prop destruction
|
|
27
|
-
var items = props.items, innerProps = __rest(props, ["items"]);
|
|
28
|
-
// lib hooks
|
|
29
|
-
// state, ref, querystring hooks
|
|
30
|
-
// form hooks
|
|
31
|
-
// query hooks
|
|
32
|
-
// calculated values
|
|
33
|
-
// effects
|
|
34
|
-
// handlers
|
|
35
|
-
return (React.createElement(RadioGroup, __assign({}, innerProps), items.map(function (item) { return (React.createElement(Radio, { key: "".concat(item.value), value: item.value, label: item.label })); })));
|
|
36
|
-
}
|
|
37
|
-
export { RadioList };
|
|
38
|
-
RadioList.displayName = "RadioList";
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React, { useMemo } from "react";
|
|
24
|
-
import { Select as JoySelect, Option as JoyOption, } from "@mui/joy";
|
|
25
|
-
import { motion } from "framer-motion";
|
|
26
|
-
import FormControl from "../FormControl";
|
|
27
|
-
import FormLabel from "../FormLabel";
|
|
28
|
-
import FormHelperText from "../FormHelperText";
|
|
29
|
-
// NOTE: Context를 공유하는 컴포넌트는 한 파일로 번들링되어야 Framer에서 문제 없이 동작할수 있다.
|
|
30
|
-
// 파일별로 필요한 패키지를 모두 import 하도록 되어 있기 때문에 다른 파일에서 내보내면 Context가 고유하게 2개 생기는것이 원인이다.
|
|
31
|
-
var MotionOption = motion(JoyOption);
|
|
32
|
-
var Option = MotionOption;
|
|
33
|
-
export { Option };
|
|
34
|
-
Option.displayName = "Option";
|
|
35
|
-
function Select(props) {
|
|
36
|
-
// prop destruction
|
|
37
|
-
var label = props.label, helperText = props.helperText, error = props.error, size = props.size, color = props.color, disabled = props.disabled, required = props.required, onChange = props.onChange, innerProps = __rest(props, ["label", "helperText", "error", "size", "color", "disabled", "required", "onChange"]);
|
|
38
|
-
// lib hooks
|
|
39
|
-
// state, ref, querystring hooks
|
|
40
|
-
// form hooks
|
|
41
|
-
// query hooks
|
|
42
|
-
// calculated values
|
|
43
|
-
var options = useMemo(function () {
|
|
44
|
-
return props.options.map(function (option) {
|
|
45
|
-
if (typeof option !== "object") {
|
|
46
|
-
return {
|
|
47
|
-
value: option,
|
|
48
|
-
label: option,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return option;
|
|
52
|
-
});
|
|
53
|
-
}, [props.options]);
|
|
54
|
-
// effects
|
|
55
|
-
// handlers
|
|
56
|
-
var handleChange = function (event, newValue) {
|
|
57
|
-
var _a;
|
|
58
|
-
var _event = event || { target: {} };
|
|
59
|
-
var newEvent = __assign(__assign({}, _event), { target: {
|
|
60
|
-
// @ts-expect-error target에 name이 있을 수 있다.
|
|
61
|
-
name: ((_a = _event.target) === null || _a === void 0 ? void 0 : _a.name) || props.name,
|
|
62
|
-
value: newValue || undefined,
|
|
63
|
-
} });
|
|
64
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newEvent);
|
|
65
|
-
};
|
|
66
|
-
var select = (React.createElement(JoySelect, __assign({}, innerProps, { required: required, disabled: disabled, size: size, color: error ? "danger" : color, onChange: handleChange }), options.map(function (option) { return (React.createElement(Option, { key: option.value, value: option.value }, option.label)); })));
|
|
67
|
-
if (label) {
|
|
68
|
-
return (React.createElement(FormControl, { required: required, disabled: disabled, size: size, color: color, error: error },
|
|
69
|
-
React.createElement(FormLabel, null, label),
|
|
70
|
-
select,
|
|
71
|
-
helperText && React.createElement(FormHelperText, null, helperText)));
|
|
72
|
-
}
|
|
73
|
-
return select;
|
|
74
|
-
}
|
|
75
|
-
export { Select };
|
|
76
|
-
Select.displayName = "Select";
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var _a;
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { Switch as JoySwitch, styled, switchClasses, } from "@mui/joy";
|
|
15
|
-
import { motion } from "framer-motion";
|
|
16
|
-
var MotionSwitch = motion(JoySwitch);
|
|
17
|
-
var StyledThumb = styled(motion.div)((_a = {
|
|
18
|
-
"--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
|
|
19
|
-
display: "inline-flex",
|
|
20
|
-
justifyContent: "center",
|
|
21
|
-
alignItems: "center",
|
|
22
|
-
position: "absolute",
|
|
23
|
-
left: "var(--Switch-thumbOffset)",
|
|
24
|
-
width: "var(--Switch-thumbWidth)",
|
|
25
|
-
height: "var(--Switch-thumbSize)",
|
|
26
|
-
borderRadius: "var(--Switch-thumbRadius)",
|
|
27
|
-
boxShadow: "var(--Switch-thumbShadow)",
|
|
28
|
-
color: "var(--Switch-thumbColor)",
|
|
29
|
-
backgroundColor: "var(--Switch-thumbBackground)"
|
|
30
|
-
},
|
|
31
|
-
_a["&.".concat(switchClasses.checked)] = {
|
|
32
|
-
left: "unset",
|
|
33
|
-
right: "var(--Switch-thumbOffset)",
|
|
34
|
-
},
|
|
35
|
-
_a));
|
|
36
|
-
var Thumb = function (props) { return (React.createElement(StyledThumb, __assign({}, props, { layout: true, transition: spring }))); };
|
|
37
|
-
var spring = {
|
|
38
|
-
type: "spring",
|
|
39
|
-
stiffness: 700,
|
|
40
|
-
damping: 30,
|
|
41
|
-
};
|
|
42
|
-
var Switch = function (props) {
|
|
43
|
-
// prop destruction
|
|
44
|
-
// lib hooks
|
|
45
|
-
// state, ref, querystring hooks
|
|
46
|
-
// form hooks
|
|
47
|
-
// query hooks
|
|
48
|
-
// calculated values
|
|
49
|
-
// effects
|
|
50
|
-
// handlers
|
|
51
|
-
return (React.createElement(MotionSwitch, __assign({}, props, { slots: __assign({ thumb: Thumb }, props.slots) })));
|
|
52
|
-
};
|
|
53
|
-
export { Switch };
|
|
54
|
-
Switch.displayName = "Switch";
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from "react";
|
|
24
|
-
import { Table as JoyTable } from "@mui/joy";
|
|
25
|
-
import Checkbox from "../Checkbox";
|
|
26
|
-
var Table = function (props) {
|
|
27
|
-
// prop destruction
|
|
28
|
-
var children = props.children, inheritProps = __rest(props, ["children"]);
|
|
29
|
-
// lib hooks
|
|
30
|
-
// state, ref, querystring hooks
|
|
31
|
-
// form hooks
|
|
32
|
-
// query hooks
|
|
33
|
-
// calculated values
|
|
34
|
-
// effects
|
|
35
|
-
// handlers
|
|
36
|
-
return React.createElement(JoyTable, __assign({}, inheritProps), children);
|
|
37
|
-
};
|
|
38
|
-
export { Table };
|
|
39
|
-
Table.displayName = "Table";
|
|
40
|
-
function TableHead(props) {
|
|
41
|
-
// prop destruction
|
|
42
|
-
var headCells = props.headCells, showCheckbox = props.showCheckbox, onCheckboxChange = props.onCheckboxChange, _a = props.slots, _b = _a === void 0 ? {} : _a, _c = _b.checkbox, RenderCheckbox = _c === void 0 ? Checkbox : _c, _d = props.slotProps, _e = _d === void 0 ? {} : _d, _f = _e.checkbox, checkboxProps = _f === void 0 ? {} : _f;
|
|
43
|
-
// lib hooks
|
|
44
|
-
// state, ref, querystring hooks
|
|
45
|
-
// form hooks
|
|
46
|
-
// query hooks
|
|
47
|
-
// calculated values
|
|
48
|
-
// effects
|
|
49
|
-
// handlers
|
|
50
|
-
return (React.createElement("thead", null,
|
|
51
|
-
React.createElement("tr", null,
|
|
52
|
-
showCheckbox && (React.createElement("th", { style: {
|
|
53
|
-
width: "40px",
|
|
54
|
-
textAlign: "center",
|
|
55
|
-
} },
|
|
56
|
-
React.createElement(RenderCheckbox, __assign({ onChange: onCheckboxChange }, checkboxProps)))),
|
|
57
|
-
headCells.map(function (headCell) { return (React.createElement("th", { key: headCell.label, style: {
|
|
58
|
-
width: headCell.width,
|
|
59
|
-
minWidth: headCell.minWidth,
|
|
60
|
-
maxWidth: headCell.maxWidth,
|
|
61
|
-
textAlign: headCell.numeric ? "right" : "left",
|
|
62
|
-
} }, headCell.label)); }))));
|
|
63
|
-
}
|
|
64
|
-
TableHead.displayName = "TableHead";
|
|
65
|
-
export { TableHead };
|
|
66
|
-
function TableBody(props) {
|
|
67
|
-
// prop destruction
|
|
68
|
-
var rows = props.rows, cellOrder = props.cellOrder, rowOptions = props.rowOptions, showCheckbox = props.showCheckbox, onCheckboxChange = props.onCheckboxChange, _a = props.slots, _b = _a === void 0 ? {} : _a, _c = _b.checkbox, RenderCheckbox = _c === void 0 ? Checkbox : _c, _d = props.slotProps, _e = _d === void 0 ? {} : _d, _f = _e.checkbox, checkboxProps = _f === void 0 ? {} : _f;
|
|
69
|
-
// lib hooks
|
|
70
|
-
// state, ref, querystring hooks
|
|
71
|
-
// form hooks
|
|
72
|
-
// query hooks
|
|
73
|
-
// calculated values
|
|
74
|
-
// effects
|
|
75
|
-
// handlers
|
|
76
|
-
return (React.createElement("tbody", null, rows.map(function (row, rowIndex) { return (React.createElement("tr", { key: rowIndex },
|
|
77
|
-
showCheckbox && (React.createElement("td", { style: {
|
|
78
|
-
textAlign: "center",
|
|
79
|
-
} },
|
|
80
|
-
React.createElement(RenderCheckbox, __assign({ onChange: function (event) { return onCheckboxChange === null || onCheckboxChange === void 0 ? void 0 : onCheckboxChange(event, rowIndex); } }, checkboxProps)))),
|
|
81
|
-
cellOrder.map(function (cellKey) {
|
|
82
|
-
var _a;
|
|
83
|
-
return (React.createElement("td", { key: cellKey, style: {
|
|
84
|
-
textAlign: ((_a = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions[cellKey]) === null || _a === void 0 ? void 0 : _a.numeric) ? "right" : "left",
|
|
85
|
-
} }, row[cellKey]));
|
|
86
|
-
}))); })));
|
|
87
|
-
}
|
|
88
|
-
TableBody.displayName = "TableBody";
|
|
89
|
-
export { TableBody };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Tabs as JoyTabs, Tab as JoyTab, TabList as JoyTabList, TabPanel as JoyTabPanel } from "@mui/joy";
|
|
2
|
-
import { motion } from "framer-motion";
|
|
3
|
-
var MotionTabs = motion(JoyTabs);
|
|
4
|
-
var Tabs = MotionTabs;
|
|
5
|
-
export { Tabs };
|
|
6
|
-
Tabs.displayName = "Tabs";
|
|
7
|
-
var MotionTab = motion(JoyTab);
|
|
8
|
-
var Tab = MotionTab;
|
|
9
|
-
export { Tab };
|
|
10
|
-
Tab.displayName = "Tab";
|
|
11
|
-
var MotionTabList = motion(JoyTabList);
|
|
12
|
-
var TabList = MotionTabList;
|
|
13
|
-
export { TabList };
|
|
14
|
-
TabList.displayName = "TabList";
|
|
15
|
-
var MotionTabPanel = motion(JoyTabPanel);
|
|
16
|
-
var TabPanel = MotionTabPanel;
|
|
17
|
-
export { TabPanel };
|
|
18
|
-
TabPanel.displayName = "TabPanel";
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from "react";
|
|
24
|
-
import { Textarea as JoyTextarea } from "@mui/joy";
|
|
25
|
-
import { motion } from "framer-motion";
|
|
26
|
-
import FormControl from "../FormControl";
|
|
27
|
-
import FormLabel from "../FormLabel";
|
|
28
|
-
import FormHelperText from "../FormHelperText";
|
|
29
|
-
var MotionTextarea = motion(JoyTextarea);
|
|
30
|
-
var Textarea = function (props) {
|
|
31
|
-
// prop destruction
|
|
32
|
-
var label = props.label, error = props.error, helperText = props.helperText, color = props.color, size = props.size, disabled = props.disabled, required = props.required, _a = props.minRows, minRows = _a === void 0 ? 2 : _a, _b = props.maxRows, maxRows = _b === void 0 ? 4 : _b, innerProps = __rest(props, ["label", "error", "helperText", "color", "size", "disabled", "required", "minRows", "maxRows"]);
|
|
33
|
-
// lib hooks
|
|
34
|
-
// state, ref, querystring hooks
|
|
35
|
-
// form hooks
|
|
36
|
-
// query hooks
|
|
37
|
-
// calculated values
|
|
38
|
-
// effects
|
|
39
|
-
// handlers
|
|
40
|
-
var textarea = (React.createElement(MotionTextarea, __assign({ required: required, disabled: disabled, color: error ? "danger" : color, size: size, minRows: minRows, maxRows: maxRows }, innerProps)));
|
|
41
|
-
if (label) {
|
|
42
|
-
return (React.createElement(FormControl, { required: required, disabled: disabled, color: color, size: size, error: error },
|
|
43
|
-
React.createElement(FormLabel, null, label),
|
|
44
|
-
textarea,
|
|
45
|
-
helperText && React.createElement(FormHelperText, null, helperText)));
|
|
46
|
-
}
|
|
47
|
-
return textarea;
|
|
48
|
-
};
|
|
49
|
-
export { Textarea };
|
|
50
|
-
Textarea.displayName = "Textarea";
|