@pdg/react-form 1.0.15 → 1.0.16
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/FormLayout/FormBlock/FormBlock.types.d.ts +2 -0
- package/dist/FormLayout/FormDivider/FormDivider.style.d.ts +2 -0
- package/dist/FormLayout/FormDivider/FormDivider.types.d.ts +3 -0
- package/dist/index.esm.js +72 -38
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +71 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,5 +2,7 @@ import { PartialPick, CommonSxProps } from '../../@types';
|
|
|
2
2
|
import { FormDividerProps } from '../FormDivider';
|
|
3
3
|
import { FormContextValue } from '../../FormContext';
|
|
4
4
|
export interface FormBlockProps extends CommonSxProps, PartialPick<FormContextValue, 'variant' | 'size' | 'color' | 'spacing' | 'focused' | 'labelShrink' | 'fullWidth'>, PartialPick<FormDividerProps, 'icon' | 'label' | 'line' | 'lineVerticalMargin' | 'hidden'> {
|
|
5
|
+
collapse?: boolean;
|
|
6
|
+
collapseIn?: boolean;
|
|
5
7
|
}
|
|
6
8
|
export declare const FormBlockDefaultProps: {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledLineDiv: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -10,5 +10,8 @@ export interface FormDividerProps extends CommonSxProps {
|
|
|
10
10
|
line?: boolean;
|
|
11
11
|
lineVerticalMargin?: string | number;
|
|
12
12
|
hidden?: boolean;
|
|
13
|
+
collapse?: boolean;
|
|
14
|
+
collapseIn?: boolean;
|
|
15
|
+
onCollapseChange?(collapseIn: boolean): void;
|
|
13
16
|
}
|
|
14
17
|
export declare const FormDividerDefaultProps: FormDividerProps;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as React from'react';import React__default,{useRef,useEffect,useState,useCallback,useLayoutEffect,createContext,useContext,cloneElement,isValidElement,createRef,PureComponent,useId
|
|
1
|
+
import*as React from'react';import React__default,{useRef,useEffect,useState,useCallback,useLayoutEffect,createContext,useContext,useMemo,cloneElement,isValidElement,createRef,PureComponent,useId}from'react';import {Box,Grid,Icon as Icon$1,Button,InputLabel,styled,Collapse,FormHelperText,InputAdornment,IconButton,TextField,Chip,Autocomplete,CircularProgress,MenuItem,Checkbox,FormControl,Input,OutlinedInput,FilledInput,FormControlLabel,Typography,useTheme,RadioGroup,Radio,ToggleButtonGroup,ToggleButton,Rating,Skeleton,darken,Tooltip,tooltipClasses,ClickAwayListener,Dialog,DialogTitle,DialogContent,DialogActions,Paper}from'@mui/material';import dayjs from'dayjs';import {findDOMNode}from'react-dom';import {CheckBox,CheckBoxOutlineBlank,RadioButtonUnchecked,RadioButtonChecked}from'@mui/icons-material';import CircularProgress$1 from'@mui/material/CircularProgress';import {AdapterDayjs}from'@mui/x-date-pickers/AdapterDayjs';import {PickersDay,StaticDatePicker,LocalizationProvider,DesktopDatePicker}from'@mui/x-date-pickers';import dayjsLocale from'dayjs/locale/ko';import dayjsIsSameOrAfter from'dayjs/plugin/isSameOrAfter';import dayjsIsSameOrBefore from'dayjs/plugin/isSameOrBefore';import dayjsIsBetween from'dayjs/plugin/isBetween';/******************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -965,12 +965,13 @@ FormButton.defaultProps = FormButtonDefaultProps;var FormLabelDefaultProps = {};
|
|
|
965
965
|
FormLabel.displayName = 'FormLabel';
|
|
966
966
|
FormLabel.defaultProps = FormLabelDefaultProps;var FormBlockDefaultProps = {};var FormDividerDefaultProps = {
|
|
967
967
|
lineVerticalMargin: 9,
|
|
968
|
-
};var
|
|
968
|
+
};var StyledLineDiv = styled('div')(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n border-bottom: thin solid #dfdfdf;\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n"], ["\n border-bottom: thin solid #dfdfdf;\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n"])));
|
|
969
|
+
var templateObject_1$3;var DEFAULT_LINE_STYLE = { flex: 1, position: 'relative' };
|
|
969
970
|
var FormDivider = React__default.forwardRef(function (_a, ref) {
|
|
970
971
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
971
972
|
var initSize = _a.size,
|
|
972
973
|
//----------------------------------------------------------------------------------------------------------------
|
|
973
|
-
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin, hidden = _a.hidden,
|
|
974
|
+
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin, hidden = _a.hidden, collapse = _a.collapse, collapseIn = _a.collapseIn, onCollapseChange = _a.onCollapseChange,
|
|
974
975
|
//----------------------------------------------------------------------------------------------------------------
|
|
975
976
|
className = _a.className, initStyle = _a.style, sx = _a.sx;
|
|
976
977
|
var formSize = useFormState().size;
|
|
@@ -994,9 +995,22 @@ var FormDivider = React__default.forwardRef(function (_a, ref) {
|
|
|
994
995
|
return DEFAULT_LINE_STYLE;
|
|
995
996
|
}
|
|
996
997
|
}, [lineVerticalMargin]))[0];
|
|
998
|
+
// Event Handler -----------------------------------------------------------------------------------------------------
|
|
999
|
+
var handleClick = useCallback(function () {
|
|
1000
|
+
if (collapse) {
|
|
1001
|
+
onCollapseChange && onCollapseChange(!collapseIn);
|
|
1002
|
+
}
|
|
1003
|
+
}, [collapse, collapseIn, onCollapseChange]);
|
|
997
1004
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
998
|
-
return (React__default.createElement(Grid, { ref: ref, item: true, xs: 12, style: style, className: className, sx: sx },
|
|
999
|
-
React__default.createElement(Box, { sx: {
|
|
1005
|
+
return (React__default.createElement(Grid, { ref: ref, item: true, xs: 12, style: style, className: classNames$1(className, 'FormDivider'), sx: sx },
|
|
1006
|
+
React__default.createElement(Box, { sx: {
|
|
1007
|
+
display: 'flex',
|
|
1008
|
+
py: 1,
|
|
1009
|
+
alignItems: 'center',
|
|
1010
|
+
justifyItems: 'center',
|
|
1011
|
+
padding: 0,
|
|
1012
|
+
cursor: collapse ? 'pointer' : undefined,
|
|
1013
|
+
}, onClick: handleClick },
|
|
1000
1014
|
icon && (React__default.createElement(FormIcon, { style: { opacity: 0.54, marginRight: 5 }, fontSize: size }, icon)),
|
|
1001
1015
|
label && (React__default.createElement(Box, { sx: {
|
|
1002
1016
|
paddingRight: '10px',
|
|
@@ -1004,14 +1018,9 @@ var FormDivider = React__default.forwardRef(function (_a, ref) {
|
|
|
1004
1018
|
fontWeight: 700,
|
|
1005
1019
|
fontSize: size === 'small' ? '11.5px' : '12px',
|
|
1006
1020
|
} }, label)),
|
|
1007
|
-
line && (React__default.createElement("div", { style: lineStyle },
|
|
1008
|
-
React__default.createElement(
|
|
1009
|
-
|
|
1010
|
-
position: 'absolute',
|
|
1011
|
-
left: 0,
|
|
1012
|
-
top: '50%',
|
|
1013
|
-
width: '100%',
|
|
1014
|
-
} }))))));
|
|
1021
|
+
(line || collapse) && (React__default.createElement("div", { style: lineStyle },
|
|
1022
|
+
React__default.createElement(StyledLineDiv, null))),
|
|
1023
|
+
collapse && (React__default.createElement(FormIcon, { sx: { opacity: 0.6, ml: 1 } }, collapseIn ? 'KeyboardDoubleArrowUp' : 'KeyboardDoubleArrowDown')))));
|
|
1015
1024
|
});
|
|
1016
1025
|
FormDivider.displayName = 'FormDivider.';
|
|
1017
1026
|
FormDivider.defaultProps = FormDividerDefaultProps;var StyledWrapGrid$1 = styled(Grid)(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
@@ -1021,7 +1030,7 @@ var templateObject_1$2;var FormBlock = React__default.forwardRef(function (_a, r
|
|
|
1021
1030
|
//----------------------------------------------------------------------------------------------------------------
|
|
1022
1031
|
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin,
|
|
1023
1032
|
//----------------------------------------------------------------------------------------------------------------
|
|
1024
|
-
hidden = _a.hidden,
|
|
1033
|
+
hidden = _a.hidden, collapse = _a.collapse, initCollapseIn = _a.collapseIn,
|
|
1025
1034
|
//----------------------------------------------------------------------------------------------------------------
|
|
1026
1035
|
children = _a.children, className = _a.className, initStyle = _a.style, sx = _a.sx;
|
|
1027
1036
|
var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formSpacing = _b.spacing, formFocused = _b.focused, formLabelShrink = _b.labelShrink, formFullWidth = _b.fullWidth, otherFormState = __rest$2(_b, ["variant", "size", "color", "spacing", "focused", "labelShrink", "fullWidth"]);
|
|
@@ -1033,6 +1042,8 @@ var templateObject_1$2;var FormBlock = React__default.forwardRef(function (_a, r
|
|
|
1033
1042
|
var focused = useAutoUpdateState$1(initFocused || formFocused)[0];
|
|
1034
1043
|
var labelShrink = useAutoUpdateState$1(initLabelShrink || formLabelShrink)[0];
|
|
1035
1044
|
var fullWidth = useAutoUpdateState$1(initFullWidth == null ? formFullWidth : initFullWidth)[0];
|
|
1045
|
+
// State -------------------------------------------------------------------------------------------------------------
|
|
1046
|
+
var _c = useState(initCollapseIn), collapseIn = _c[0], setCollapseIn = _c[1];
|
|
1036
1047
|
// State - style ---------------------------------------------------------------------------------------------------
|
|
1037
1048
|
var style = useAutoUpdateState$1(useCallback(function () {
|
|
1038
1049
|
if (hidden) {
|
|
@@ -1042,11 +1053,27 @@ var templateObject_1$2;var FormBlock = React__default.forwardRef(function (_a, r
|
|
|
1042
1053
|
return initStyle;
|
|
1043
1054
|
}
|
|
1044
1055
|
}, [initStyle, hidden]))[0];
|
|
1056
|
+
// Effect ------------------------------------------------------------------------------------------------------------
|
|
1057
|
+
useEffect(function () {
|
|
1058
|
+
setCollapseIn(initCollapseIn);
|
|
1059
|
+
}, [initCollapseIn]);
|
|
1060
|
+
// Memo --------------------------------------------------------------------------------------------------------------
|
|
1061
|
+
var Container = useMemo(function () {
|
|
1062
|
+
return collapse ? Collapse : React__default.Fragment;
|
|
1063
|
+
}, [collapse]);
|
|
1064
|
+
var containerProps = useMemo(function () {
|
|
1065
|
+
return collapse ? { in: collapseIn } : undefined;
|
|
1066
|
+
}, [collapse, collapseIn]);
|
|
1045
1067
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
1046
1068
|
return (React__default.createElement(FormContext.Provider, { value: __assign$4({ variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth }, otherFormState) },
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1069
|
+
React__default.createElement(Grid, { item: true, ref: ref, xs: 12, className: classNames$1(className, 'FormBlock'), style: style, sx: sx },
|
|
1070
|
+
React__default.createElement(Grid, { container: true, spacing: spacing },
|
|
1071
|
+
(icon || label || line || collapse) && (React__default.createElement(FormDivider, { className: 'FormBlock-header', collapse: collapse, collapseIn: collapseIn, size: size, icon: icon, color: color, label: label, line: line, lineVerticalMargin: lineVerticalMargin, hidden: hidden, onCollapseChange: collapse ? function (newCollapseIn) { return setCollapseIn(newCollapseIn); } : undefined })),
|
|
1072
|
+
React__default.createElement(StyledWrapGrid$1, { item: true, xs: 12 },
|
|
1073
|
+
React__default.createElement(Container, __assign$4({}, containerProps),
|
|
1074
|
+
React__default.createElement(Grid, { container: true, spacing: spacing },
|
|
1075
|
+
React__default.createElement(StyledWrapGrid$1, { item: true, xs: 12, className: 'FormBlock-body' },
|
|
1076
|
+
React__default.createElement(Grid, { className: 'FormBlock-content', container: true, spacing: spacing }, children)))))))));
|
|
1050
1077
|
});
|
|
1051
1078
|
FormBlock.displayName = 'FormBlock';
|
|
1052
1079
|
FormBlock.defaultProps = FormBlockDefaultProps;var FormRowDefaultProps = {};var StyledWrapGrid = styled(Grid)(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
@@ -1104,10 +1131,12 @@ var templateObject_1$1;var FormRow = React__default.forwardRef(function (_a, ref
|
|
|
1104
1131
|
}, []);
|
|
1105
1132
|
//------------------------------------------------------------------------------------------------------------------
|
|
1106
1133
|
return (React__default.createElement(FormContext.Provider, { value: __assign$4({ variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth, formColAutoXs: formColAutoXs, onAddFormCol: handleAddFormCol, onRemoveFormCol: handleRemoveFormCol }, otherFormState) },
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1134
|
+
React__default.createElement(Grid, { item: true, ref: ref, xs: 12, className: classNames$1(className, 'FormRow'), style: style, sx: sx },
|
|
1135
|
+
React__default.createElement(Grid, { container: true, spacing: spacing },
|
|
1136
|
+
(icon || label || line) && (React__default.createElement(FormDivider, { className: classNames$1(className, 'FormRow-header'), size: size, icon: icon, color: color, label: label, line: line, lineVerticalMargin: lineVerticalMargin, hidden: hidden })),
|
|
1137
|
+
React__default.createElement(StyledWrapGrid, { item: true, xs: 12, className: 'FormRow-body' },
|
|
1138
|
+
React__default.createElement(Grid, { className: 'FormRow-content', container: true, spacing: spacing, direction: 'row', style: { flexWrap: 'nowrap' } }, children),
|
|
1139
|
+
helperText && (React__default.createElement(FormHelperText, { className: 'FormRow-helper-text', component: 'div', error: error }, helperText)))))));
|
|
1111
1140
|
});
|
|
1112
1141
|
FormRow.displayName = 'FormRow';
|
|
1113
1142
|
FormRow.defaultProps = FormRowDefaultProps;/* global Reflect, Promise */
|
|
@@ -2012,12 +2041,12 @@ function useResizeDetector(props) {
|
|
|
2012
2041
|
return (React__default.createElement(FormContextProvider, { value: __assign$4({ variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth, formColXs: xs || formColAutoXs || 12, formColWidth: formColWidth, formColWithLabel: !!label, formColWithHelperText: !!helperText }, otherFormState) },
|
|
2013
2042
|
React__default.createElement(Grid, { ref: resizeDetectorRef, item: true, xs: xs || formColAutoXs || 12, className: classNames$1(className, 'FormCol', !!label && 'with-label', !!helperText && 'with-helper-text'), style: style, sx: sx },
|
|
2014
2043
|
React__default.createElement(Grid, { container: true, direction: 'column' },
|
|
2015
|
-
label && (React__default.createElement(Grid, { item: true },
|
|
2044
|
+
label && (React__default.createElement(Grid, { item: true, className: 'FormCol-header' },
|
|
2016
2045
|
React__default.createElement("div", { style: { position: 'relative', height: 20 } },
|
|
2017
2046
|
React__default.createElement(FormLabel, { className: 'FormCol-FormLabel', size: size, icon: icon, focused: focused, color: color, error: error, style: { position: 'absolute', left: 5, top: 0 } }, label)))),
|
|
2018
|
-
React__default.createElement(Grid, { item: true, xs: 2 },
|
|
2047
|
+
React__default.createElement(Grid, { item: true, xs: 2, className: 'FormCol-content' },
|
|
2019
2048
|
React__default.createElement(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: gap } }, children)),
|
|
2020
|
-
helperText && (React__default.createElement(Grid, { item: true },
|
|
2049
|
+
helperText && (React__default.createElement(Grid, { item: true, className: 'FormCol-helper-text' },
|
|
2021
2050
|
React__default.createElement(FormHelperText, { component: 'div', error: error, style: { marginLeft: helperTextShift ? 14 : 5 } }, helperText)))))));
|
|
2022
2051
|
});
|
|
2023
2052
|
FormCol.displayName = 'FormCol';
|
|
@@ -7667,7 +7696,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
|
|
|
7667
7696
|
}
|
|
7668
7697
|
}, [value, multiple, readOnly, getFinalValue, name, onValueChangeByUser, onRequestSearchSubmit, onAddItem]);
|
|
7669
7698
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
7670
|
-
return (React__default.createElement(Autocomplete, { options: items || [], className: classNames$1(className, 'FormAutocomplete'), sx: sx, multiple: multiple, fullWidth: !width && fullWidth, openOnFocus: openOnFocus, disableClearable: disableClearable, disablePortal: disablePortal, noOptionsText: noOptionsText, value: componentValue, style: style, isOptionEqualToValue: function (option, value) { return option.value === value.value; }, disabled: disabled, readOnly: readOnly, loading: loading || isOnGetItemLoading, loadingText: loadingText, limitTags: limitTags, onChange: function (e, value, reason, details) { return handleChange(value, reason, details); }, renderOption: function (props, option) { return (React__default.createElement("li", __assign$4({}, props, { key: option.value }), onRenderItem ? onRenderItem(option) : option.label)); }, renderTags: function (value, getTagProps) {
|
|
7699
|
+
return (React__default.createElement(Autocomplete, { options: items || [], className: classNames$1(className, 'FormValueItem', 'FormAutocomplete'), sx: sx, multiple: multiple, fullWidth: !width && fullWidth, openOnFocus: openOnFocus, disableClearable: disableClearable, disablePortal: disablePortal, noOptionsText: noOptionsText, value: componentValue, style: style, isOptionEqualToValue: function (option, value) { return option.value === value.value; }, disabled: disabled, readOnly: readOnly, loading: loading || isOnGetItemLoading, loadingText: loadingText, limitTags: limitTags, onChange: function (e, value, reason, details) { return handleChange(value, reason, details); }, renderOption: function (props, option) { return (React__default.createElement("li", __assign$4({}, props, { key: option.value }), onRenderItem ? onRenderItem(option) : option.label)); }, renderTags: function (value, getTagProps) {
|
|
7671
7700
|
return value.map(function (option, index) { return (React__default.createElement(Chip, __assign$4({ size: 'small', label: onRenderTag ? onRenderTag(option) : option.label }, getTagProps({ index: index })))); });
|
|
7672
7701
|
}, renderInput: function (params) { return (React__default.createElement(FormTextField, __assign$4({}, params, { ref: textFieldRef, name: name, variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, labelShrink: labelShrink, required: required, focused: focused, error: error, helperText: helperText, placeholder: placeholder, noFormValueItem: true, InputProps: __assign$4(__assign$4({}, params.InputProps), { endAdornment: (React__default.createElement(React__default.Fragment, null,
|
|
7673
7702
|
loading || isOnGetItemLoading ? React__default.createElement(CircularProgress$1, { color: 'inherit', size: 20 }) : null,
|
|
@@ -14494,7 +14523,7 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
|
|
|
14494
14523
|
//--------------------------------------------------------------------------------------------------------------------
|
|
14495
14524
|
name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, initHelperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, onChange = _a.onChange, onValidate = _a.onValidate,
|
|
14496
14525
|
//--------------------------------------------------------------------------------------------------------------------
|
|
14497
|
-
initStyle = _a.style, sx = _a.sx, otherProps = __rest$2(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "type", "time", "value", "label", "labelIcon", "format", "formValueFormat", "required", "readOnly", "disabled", "width", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "exceptValue", "icon", "startAdornment", "endAdornment", "align", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "readOnlyInput", "onChange", "onValidate", "style", "sx"]);
|
|
14526
|
+
className = _a.className, initStyle = _a.style, sx = _a.sx, otherProps = __rest$2(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "type", "time", "value", "label", "labelIcon", "format", "formValueFormat", "required", "readOnly", "disabled", "width", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "exceptValue", "icon", "startAdornment", "endAdornment", "align", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "readOnlyInput", "onChange", "onValidate", "className", "style", "sx"]);
|
|
14498
14527
|
var id = useId();
|
|
14499
14528
|
// Ref -------------------------------------------------------------------------------------------------------------
|
|
14500
14529
|
var privateStaticDatePickerRef = useRef(null);
|
|
@@ -14819,7 +14848,7 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
|
|
|
14819
14848
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
14820
14849
|
return (React__default.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: dayjsLocale },
|
|
14821
14850
|
React__default.createElement(ClickAwayListener, { mouseEvent: 'onMouseDown', touchEvent: 'onTouchStart', onClickAway: function () { return setOpen(false); } },
|
|
14822
|
-
React__default.createElement("div", { className: 'PrivateDatePicker', style: {
|
|
14851
|
+
React__default.createElement("div", { className: classNames$1(className, 'PrivateDatePicker'), style: {
|
|
14823
14852
|
display: fullWidth ? 'block' : 'inline-block',
|
|
14824
14853
|
flex: fullWidth ? 1 : undefined,
|
|
14825
14854
|
}, onMouseDown: handleContainerMouseDown, onFocus: handleContainerFocus, onBlur: handleContainerBlur },
|
|
@@ -14879,9 +14908,10 @@ PrivateDatePicker.defaultProps = PrivateDatePickerDefaultProps;var PrivateAlertD
|
|
|
14879
14908
|
React__default.createElement(Button, { variant: 'text', onClick: handleClose, autoFocus: true }, "\uD655\uC778"))));
|
|
14880
14909
|
};
|
|
14881
14910
|
PrivateAlertDialog.displayName = 'PrivateAlertDialog';
|
|
14882
|
-
PrivateAlertDialog.defaultProps = PrivateAlertDialogDefaultProps;var FormDatePicker = React__default.forwardRef(function (
|
|
14911
|
+
PrivateAlertDialog.defaultProps = PrivateAlertDialogDefaultProps;var FormDatePicker = React__default.forwardRef(function (_a, ref) {
|
|
14883
14912
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
14884
|
-
var
|
|
14913
|
+
var className = _a.className, props = __rest$2(_a, ["className"]);
|
|
14914
|
+
var _b = useFormState(), onAddValueItem = _b.onAddValueItem, otherFormState = __rest$2(_b, ["onAddValueItem"]);
|
|
14885
14915
|
// Event Handler ---------------------------------------------------------------------------------------------------
|
|
14886
14916
|
var handleAddValueItem = useCallback(function (id, commands) {
|
|
14887
14917
|
commands.getType = function () { return 'FormDatePicker'; };
|
|
@@ -14889,12 +14919,13 @@ PrivateAlertDialog.defaultProps = PrivateAlertDialogDefaultProps;var FormDatePic
|
|
|
14889
14919
|
}, [onAddValueItem]);
|
|
14890
14920
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
14891
14921
|
return (React__default.createElement(FormContextProvider, { value: __assign$4({ onAddValueItem: handleAddValueItem }, otherFormState) },
|
|
14892
|
-
React__default.createElement(PrivateDatePicker, __assign$4({}, props, { ref: ref, type: 'date' }))));
|
|
14922
|
+
React__default.createElement(PrivateDatePicker, __assign$4({ className: classNames$1(className, 'FormDatePicker') }, props, { ref: ref, type: 'date' }))));
|
|
14893
14923
|
});
|
|
14894
14924
|
FormDatePicker.displayName = 'FormDatePicker';
|
|
14895
|
-
FormDatePicker.defaultProps = FormDatePickerDefaultProps;var FormDateTimePickerDefaultProps = {};var FormDateTimePicker = React__default.forwardRef(function (
|
|
14925
|
+
FormDatePicker.defaultProps = FormDatePickerDefaultProps;var FormDateTimePickerDefaultProps = {};var FormDateTimePicker = React__default.forwardRef(function (_a, ref) {
|
|
14896
14926
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
14897
|
-
var
|
|
14927
|
+
var className = _a.className, props = __rest$2(_a, ["className"]);
|
|
14928
|
+
var _b = useFormState(), onAddValueItem = _b.onAddValueItem, otherFormState = __rest$2(_b, ["onAddValueItem"]);
|
|
14898
14929
|
// Event Handler ---------------------------------------------------------------------------------------------------
|
|
14899
14930
|
var handleAddValueItem = useCallback(function (id, commands) {
|
|
14900
14931
|
commands.getType = function () { return 'FormDateTimePicker'; };
|
|
@@ -14902,12 +14933,13 @@ FormDatePicker.defaultProps = FormDatePickerDefaultProps;var FormDateTimePickerD
|
|
|
14902
14933
|
}, [onAddValueItem]);
|
|
14903
14934
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
14904
14935
|
return (React__default.createElement(FormContextProvider, { value: __assign$4({ onAddValueItem: handleAddValueItem }, otherFormState) },
|
|
14905
|
-
React__default.createElement(PrivateDatePicker, __assign$4({}, props, { ref: ref, type: 'date_time' }))));
|
|
14936
|
+
React__default.createElement(PrivateDatePicker, __assign$4({ className: classNames$1(className, 'FormDateTimePicker') }, props, { ref: ref, type: 'date_time' }))));
|
|
14906
14937
|
});
|
|
14907
14938
|
FormDateTimePicker.displayName = 'FormDateTimePicker';
|
|
14908
|
-
FormDateTimePicker.defaultProps = FormDateTimePickerDefaultProps;var FormTimePickerDefaultProps = {};var FormTimePicker = React__default.forwardRef(function (
|
|
14939
|
+
FormDateTimePicker.defaultProps = FormDateTimePickerDefaultProps;var FormTimePickerDefaultProps = {};var FormTimePicker = React__default.forwardRef(function (_a, ref) {
|
|
14909
14940
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
14910
|
-
var
|
|
14941
|
+
var className = _a.className, props = __rest$2(_a, ["className"]);
|
|
14942
|
+
var _b = useFormState(), onAddValueItem = _b.onAddValueItem, otherFormState = __rest$2(_b, ["onAddValueItem"]);
|
|
14911
14943
|
// Event Handler ---------------------------------------------------------------------------------------------------
|
|
14912
14944
|
var handleAddValueItem = useCallback(function (id, commands) {
|
|
14913
14945
|
commands.getType = function () { return 'FormTimePicker'; };
|
|
@@ -14915,7 +14947,7 @@ FormDateTimePicker.defaultProps = FormDateTimePickerDefaultProps;var FormTimePic
|
|
|
14915
14947
|
}, [onAddValueItem]);
|
|
14916
14948
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
14917
14949
|
return (React__default.createElement(FormContextProvider, { value: __assign$4({ onAddValueItem: handleAddValueItem }, otherFormState) },
|
|
14918
|
-
React__default.createElement(PrivateDatePicker, __assign$4({}, props, { ref: ref, type: 'time' }))));
|
|
14950
|
+
React__default.createElement(PrivateDatePicker, __assign$4({ className: classNames$1(className, 'FormTimePicker') }, props, { ref: ref, type: 'time' }))));
|
|
14919
14951
|
});
|
|
14920
14952
|
FormTimePicker.displayName = 'FormTimePicker';
|
|
14921
14953
|
FormTimePicker.defaultProps = FormTimePickerDefaultProps;var FormDateRangePickerDefaultProps = {
|
|
@@ -15435,7 +15467,9 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
|
|
|
15435
15467
|
// ID --------------------------------------------------------------------------------------------------------------
|
|
15436
15468
|
var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
|
|
15437
15469
|
//--------------------------------------------------------------------------------------------------------------------
|
|
15438
|
-
name = _a.name, initValue = _a.value, startLabel = _a.startLabel, startLabelIcon = _a.startLabelIcon, endLabel = _a.endLabel, endLabelIcon = _a.endLabelIcon, initCalendarCount = _a.calendarCount, initFormat = _a.format, formValueFormat = _a.formValueFormat, allowSingleSelect = _a.allowSingleSelect, required = _a.required, requiredStart = _a.requiredStart, requiredEnd = _a.requiredEnd, readOnly = _a.readOnly, readOnlyStart = _a.readOnlyStart, readOnlyEnd = _a.readOnlyEnd, readOnlyInput = _a.readOnlyInput, initDisabled = _a.disabled, inputWidth = _a.inputWidth, exceptValue = _a.exceptValue, initError = _a.error, initHelperText = _a.helperText, formValueStartNameSuffix = _a.formValueStartNameSuffix, formValueEndNameSuffix = _a.formValueEndNameSuffix, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, startAdornment = _a.startAdornment, startStartAdornment = _a.startStartAdornment, endStartAdornment = _a.endStartAdornment, endAdornment = _a.endAdornment, startEndAdornment = _a.startEndAdornment, endEndAdornment = _a.endEndAdornment, disablePast = _a.disablePast, disableFuture = _a.disableFuture, minDate = _a.minDate, maxDate = _a.maxDate, onChange = _a.onChange, onValidate = _a.onValidate
|
|
15470
|
+
name = _a.name, initValue = _a.value, startLabel = _a.startLabel, startLabelIcon = _a.startLabelIcon, endLabel = _a.endLabel, endLabelIcon = _a.endLabelIcon, initCalendarCount = _a.calendarCount, initFormat = _a.format, formValueFormat = _a.formValueFormat, allowSingleSelect = _a.allowSingleSelect, required = _a.required, requiredStart = _a.requiredStart, requiredEnd = _a.requiredEnd, readOnly = _a.readOnly, readOnlyStart = _a.readOnlyStart, readOnlyEnd = _a.readOnlyEnd, readOnlyInput = _a.readOnlyInput, initDisabled = _a.disabled, inputWidth = _a.inputWidth, exceptValue = _a.exceptValue, initError = _a.error, initHelperText = _a.helperText, formValueStartNameSuffix = _a.formValueStartNameSuffix, formValueEndNameSuffix = _a.formValueEndNameSuffix, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, startAdornment = _a.startAdornment, startStartAdornment = _a.startStartAdornment, endStartAdornment = _a.endStartAdornment, endAdornment = _a.endAdornment, startEndAdornment = _a.startEndAdornment, endEndAdornment = _a.endEndAdornment, disablePast = _a.disablePast, disableFuture = _a.disableFuture, minDate = _a.minDate, maxDate = _a.maxDate, onChange = _a.onChange, onValidate = _a.onValidate,
|
|
15471
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
15472
|
+
className = _a.className;
|
|
15439
15473
|
var id = useId();
|
|
15440
15474
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
15441
15475
|
var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFocused = _b.focused, formLabelShrink = _b.labelShrink, formFullWidth = _b.fullWidth, formColWithHelperText = _b.formColWithHelperText, onAddValueItem = _b.onAddValueItem, onRemoveValueItem = _b.onRemoveValueItem, onValueChange = _b.onValueChange, onValueChangeByUser = _b.onValueChangeByUser, onRequestSearchSubmit = _b.onRequestSearchSubmit;
|
|
@@ -15912,7 +15946,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
|
|
|
15912
15946
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
15913
15947
|
return (React__default.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: dayjsLocale },
|
|
15914
15948
|
React__default.createElement(ClickAwayListener, { mouseEvent: 'onMouseDown', touchEvent: 'onTouchStart', onClickAway: function () { return setOpen(false); } },
|
|
15915
|
-
React__default.createElement("div", { style: {
|
|
15949
|
+
React__default.createElement("div", { className: classNames$1(className, 'FormDateRangePicker'), style: {
|
|
15916
15950
|
display: fullWidth ? 'block' : 'inline-block',
|
|
15917
15951
|
flex: fullWidth ? 1 : undefined,
|
|
15918
15952
|
}, onMouseDown: handleContainerMouseDown, onFocus: handleContainerFocus, onBlur: handleContainerBlur },
|