@pdg/react-form 1.0.33 → 1.0.35
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/FormItemCustom/FormFile/FormFile.types.d.ts +1 -1
- package/dist/FormLayout/FormBlock/FormBlock.types.d.ts +1 -0
- package/dist/FormLayout/FormDivider/FormDivider.style.d.ts +16 -1
- package/dist/FormLayout/FormDivider/FormDivider.types.d.ts +1 -0
- package/dist/index.esm.js +29 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +29 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonSxProps, FormValueItemCommands, FormValueItemProps } from '../../@types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export interface FormFileProps extends CommonSxProps,
|
|
3
|
+
export interface FormFileProps extends CommonSxProps, FormValueItemProps {
|
|
4
4
|
required?: boolean;
|
|
5
5
|
accept?: string;
|
|
6
6
|
hideUrl?: boolean;
|
|
@@ -4,5 +4,6 @@ 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
5
|
collapse?: boolean;
|
|
6
6
|
collapseIn?: boolean;
|
|
7
|
+
error?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const FormBlockDefaultProps: {};
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const StyledLineBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
component?: import("react").ElementType<any> | undefined;
|
|
5
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
6
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
7
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
+
}, ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
|
+
export declare const StyledErrorLineBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
component?: import("react").ElementType<any> | undefined;
|
|
13
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
14
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
16
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
|
+
}, ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -12,6 +12,7 @@ export interface FormDividerProps extends CommonSxProps {
|
|
|
12
12
|
hidden?: boolean;
|
|
13
13
|
collapse?: boolean;
|
|
14
14
|
collapseIn?: boolean;
|
|
15
|
+
error?: boolean;
|
|
15
16
|
onCollapseChange?(collapseIn: boolean): void;
|
|
16
17
|
}
|
|
17
18
|
export declare const FormDividerDefaultProps: FormDividerProps;
|
package/dist/index.esm.js
CHANGED
|
@@ -872,13 +872,24 @@ var templateObject_1$5, templateObject_2$1;var FormLabel = React__default.forwar
|
|
|
872
872
|
FormLabel.displayName = 'FormLabel';
|
|
873
873
|
FormLabel.defaultProps = FormLabelDefaultProps;var FormBlockDefaultProps = {};var FormDividerDefaultProps = {
|
|
874
874
|
lineVerticalMargin: 9,
|
|
875
|
-
};var
|
|
875
|
+
};var StyledLineBox = styled(Box)(templateObject_1$4 || (templateObject_1$4 = __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"])));
|
|
876
|
+
var StyledErrorLineBox = styled(Box)(function (_a) {
|
|
877
|
+
var theme = _a.theme;
|
|
878
|
+
return ({
|
|
879
|
+
borderBottom: "thin solid ".concat(theme.palette.error.main),
|
|
880
|
+
position: 'absolute',
|
|
881
|
+
left: 0,
|
|
882
|
+
top: '50%',
|
|
883
|
+
width: '100%',
|
|
884
|
+
opacity: 0.4,
|
|
885
|
+
});
|
|
886
|
+
});
|
|
876
887
|
var templateObject_1$4;var DEFAULT_LINE_STYLE = { flex: 1, position: 'relative' };
|
|
877
888
|
var FormDivider = React__default.forwardRef(function (_a, ref) {
|
|
878
889
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
879
890
|
var initSize = _a.size,
|
|
880
891
|
//----------------------------------------------------------------------------------------------------------------
|
|
881
|
-
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin, hidden = _a.hidden, collapse = _a.collapse, collapseIn = _a.collapseIn, onCollapseChange = _a.onCollapseChange,
|
|
892
|
+
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin, hidden = _a.hidden, collapse = _a.collapse, collapseIn = _a.collapseIn, error = _a.error, onCollapseChange = _a.onCollapseChange,
|
|
882
893
|
//----------------------------------------------------------------------------------------------------------------
|
|
883
894
|
className = _a.className, initStyle = _a.style, sx = _a.sx;
|
|
884
895
|
var formSize = useFormState().size;
|
|
@@ -917,16 +928,15 @@ var FormDivider = React__default.forwardRef(function (_a, ref) {
|
|
|
917
928
|
padding: 0,
|
|
918
929
|
cursor: collapse ? 'pointer' : undefined,
|
|
919
930
|
}, onClick: handleClick },
|
|
920
|
-
icon && (React__default.createElement(FormIcon, { style: { opacity: 0.54, marginRight: 5 }, fontSize: size }, icon)),
|
|
931
|
+
icon && (React__default.createElement(FormIcon, { style: { opacity: 0.54, marginRight: 5 }, color: error ? 'error' : undefined, fontSize: size }, icon)),
|
|
921
932
|
label && (React__default.createElement(Box, { sx: {
|
|
922
933
|
paddingRight: '10px',
|
|
923
|
-
color: 'text.secondary',
|
|
934
|
+
color: error ? 'error.main' : 'text.secondary',
|
|
924
935
|
fontWeight: 700,
|
|
925
936
|
fontSize: size === 'small' ? '11.5px' : '12px',
|
|
926
937
|
} }, label)),
|
|
927
|
-
(line || collapse) &&
|
|
928
|
-
|
|
929
|
-
collapse && (React__default.createElement(FormIcon, { sx: { opacity: 0.6, ml: 1 } }, collapseIn ? 'KeyboardDoubleArrowUp' : 'KeyboardDoubleArrowDown')))));
|
|
938
|
+
(line || collapse) && React__default.createElement("div", { style: lineStyle }, error ? React__default.createElement(StyledErrorLineBox, null) : React__default.createElement(StyledLineBox, null)),
|
|
939
|
+
collapse && (React__default.createElement(FormIcon, { sx: { opacity: 0.6, ml: 1 }, color: error ? 'error' : undefined }, collapseIn ? 'KeyboardDoubleArrowUp' : 'KeyboardDoubleArrowDown')))));
|
|
930
940
|
});
|
|
931
941
|
FormDivider.displayName = 'FormDivider.';
|
|
932
942
|
FormDivider.defaultProps = FormDividerDefaultProps;function useFirstSkipEffect$1(effect, deps) {
|
|
@@ -996,7 +1006,7 @@ var templateObject_1$3;var FormBlock = React__default.forwardRef(function (_a, r
|
|
|
996
1006
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
997
1007
|
var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initSpacing = _a.spacing, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
|
|
998
1008
|
//----------------------------------------------------------------------------------------------------------------
|
|
999
|
-
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin,
|
|
1009
|
+
icon = _a.icon, label = _a.label, line = _a.line, lineVerticalMargin = _a.lineVerticalMargin, error = _a.error,
|
|
1000
1010
|
//----------------------------------------------------------------------------------------------------------------
|
|
1001
1011
|
hidden = _a.hidden, collapse = _a.collapse, initCollapseIn = _a.collapseIn,
|
|
1002
1012
|
//----------------------------------------------------------------------------------------------------------------
|
|
@@ -1036,7 +1046,7 @@ var templateObject_1$3;var FormBlock = React__default.forwardRef(function (_a, r
|
|
|
1036
1046
|
return (React__default.createElement(FormContext.Provider, { value: __assign$6({ variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth }, otherFormState) },
|
|
1037
1047
|
React__default.createElement(Grid, { item: true, ref: ref, xs: 12, className: classNames$1(className, 'FormBlock'), style: style, sx: sx },
|
|
1038
1048
|
React__default.createElement(Grid, { container: true, spacing: spacing },
|
|
1039
|
-
(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 })),
|
|
1049
|
+
(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, error: error, lineVerticalMargin: lineVerticalMargin, hidden: hidden, onCollapseChange: collapse ? function (newCollapseIn) { return setCollapseIn(newCollapseIn); } : undefined })),
|
|
1040
1050
|
React__default.createElement(StyledWrapGrid$1, { item: true, xs: 12 },
|
|
1041
1051
|
React__default.createElement(Container, __assign$6({}, containerProps),
|
|
1042
1052
|
React__default.createElement(Grid, { container: true, spacing: spacing },
|
|
@@ -1101,7 +1111,7 @@ var templateObject_1$2;var FormRow = React__default.forwardRef(function (_a, ref
|
|
|
1101
1111
|
return (React__default.createElement(FormContext.Provider, { value: __assign$6({ variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth, formColAutoXs: formColAutoXs, onAddFormCol: handleAddFormCol, onRemoveFormCol: handleRemoveFormCol }, otherFormState) },
|
|
1102
1112
|
React__default.createElement(Grid, { item: true, ref: ref, xs: 12, className: classNames$1(className, 'FormRow'), style: style, sx: sx },
|
|
1103
1113
|
React__default.createElement(Grid, { container: true, spacing: spacing },
|
|
1104
|
-
(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 })),
|
|
1114
|
+
(icon || label || line) && (React__default.createElement(FormDivider, { className: classNames$1(className, 'FormRow-header'), size: size, icon: icon, color: color, label: label, line: line, error: error, lineVerticalMargin: lineVerticalMargin, hidden: hidden })),
|
|
1105
1115
|
React__default.createElement(StyledWrapGrid, { item: true, xs: 12, className: 'FormRow-body' },
|
|
1106
1116
|
React__default.createElement(Grid, { className: 'FormRow-content', container: true, spacing: spacing, direction: 'row', style: { flexWrap: 'nowrap' } }, children),
|
|
1107
1117
|
helperText && (React__default.createElement(FormHelperText, { className: 'FormRow-helper-text', component: 'div', error: error }, helperText)))))));
|
|
@@ -2558,7 +2568,7 @@ styleInject(css_248z$h);var FormTag = React__default.forwardRef(function (_a, re
|
|
|
2558
2568
|
onBlur(e);
|
|
2559
2569
|
}, [appendTag, inputValue, onBlur]);
|
|
2560
2570
|
var handleRenderTags = useCallback(function (tags) {
|
|
2561
|
-
return tags.map(function (tag) { return (React__default.createElement(Chip, { className: 'MuiAutocomplete-tag', key: tag, label: tag, size: 'small', disabled: disabled, onDelete: readOnly || disabled ? undefined : function () { return removeTag(tag); } })); });
|
|
2571
|
+
return tags.map(function (tag) { return (React__default.createElement(Chip, { className: 'MuiAutocomplete-tag', key: tag, label: tag, size: 'small', disabled: readOnly || disabled, onDelete: readOnly || disabled ? undefined : function () { return removeTag(tag); } })); });
|
|
2562
2572
|
}, [disabled, readOnly, removeTag]);
|
|
2563
2573
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
2564
2574
|
return (React__default.createElement(FormContextProvider, { value: __assign$6({ fullWidth: formFullWidth, onAddValueItem: handleAddValueItem,
|
|
@@ -4110,6 +4120,7 @@ NumberFormatCustom.displayName = 'NumberFormatCustom';var FormNumberDefaultProps
|
|
|
4110
4120
|
var className = _a.className, allowLeadingZeros = _a.allowLeadingZeros, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, tabIndex = _a.tabIndex, initMuiInputProps = _a.InputProps, props = __rest$3(_a, ["className", "allowLeadingZeros", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "InputProps"]);
|
|
4111
4121
|
var muiInputProps = useMemo(function () {
|
|
4112
4122
|
var inputProps = {
|
|
4123
|
+
className: readOnly ? 'Mui-disabled' : undefined,
|
|
4113
4124
|
allowLeadingZeros: allowLeadingZeros,
|
|
4114
4125
|
allowNegative: allowNegative,
|
|
4115
4126
|
thousandSeparator: thousandSeparator,
|
|
@@ -7911,7 +7922,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
|
|
|
7911
7922
|
}
|
|
7912
7923
|
}, renderTags: function (value, getTagProps) {
|
|
7913
7924
|
return value.map(function (option, index) { return (React__default.createElement(Chip, __assign$6({ size: 'small', label: onRenderTag ? onRenderTag(option) : option.label }, getTagProps({ index: index })))); });
|
|
7914
|
-
}, renderInput: function (params) { return (React__default.createElement(FormTextField, __assign$6({}, 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$6(__assign$6({}, params.InputProps), { endAdornment: (React__default.createElement(React__default.Fragment, null,
|
|
7925
|
+
}, renderInput: function (params) { return (React__default.createElement(FormTextField, __assign$6({}, params, { ref: textFieldRef, name: name, variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, labelShrink: labelShrink, required: required, focused: focused, error: error, readOnly: readOnly, helperText: helperText, placeholder: placeholder, noFormValueItem: true, InputProps: __assign$6(__assign$6({}, params.InputProps), { endAdornment: (React__default.createElement(React__default.Fragment, null,
|
|
7915
7926
|
loading || isOnGetItemLoading ? React__default.createElement(CircularProgress$1, { color: 'inherit', size: 20 }) : null,
|
|
7916
7927
|
params.InputProps.endAdornment)) }), inputProps: readOnly || disabled ? __assign$6(__assign$6({}, params.inputProps), { tabIndex: -1 }) : params.inputProps }))); } }));
|
|
7917
7928
|
});
|
|
@@ -10501,6 +10512,7 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
|
|
|
10501
10512
|
var inputProps = __assign$6(__assign$6({}, initInputProps), { readOnly: readOnly });
|
|
10502
10513
|
if (readOnly) {
|
|
10503
10514
|
inputProps.tabIndex = -1;
|
|
10515
|
+
inputProps.className = classNames$1(inputProps.className, 'Mui-disabled');
|
|
10504
10516
|
}
|
|
10505
10517
|
var muiInputProps = __assign$6(__assign$6({}, initMuiInputProps), { endAdornment: undefined });
|
|
10506
10518
|
if (startAdornment || icon || muiInputProps.startAdornment) {
|
|
@@ -11070,6 +11082,7 @@ styleInject(css_248z$2);var InputDatePicker = function (_a) {
|
|
|
11070
11082
|
var inputProps = __assign$6({}, initInputProps);
|
|
11071
11083
|
if (readOnly) {
|
|
11072
11084
|
inputProps.tabIndex = -1;
|
|
11085
|
+
inputProps.className = classNames$1(inputProps.className, 'Mui-disabled');
|
|
11073
11086
|
}
|
|
11074
11087
|
return (React__default.createElement(TextField, __assign$6({}, params, { style: __assign$6(__assign$6({}, inputStyle), style), variant: variant, size: size, color: color, focused: focused, fullWidth: fullWidth, required: required, name: id, label: label, error: error || inputError, inputRef: function (ref) {
|
|
11075
11088
|
if (inputInputRef) {
|
|
@@ -11672,7 +11685,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
|
|
|
11672
11685
|
//----------------------------------------------------------------------------------------------------------------
|
|
11673
11686
|
accept = _a.accept, hideUrl = _a.hideUrl, hideLink = _a.hideLink, maxFileSize = _a.maxFileSize, preview = _a.preview, hidden = _a.hidden, onFile = _a.onFile, onLink = _a.onLink,
|
|
11674
11687
|
//----------------------------------------------------------------------------------------------------------------
|
|
11675
|
-
name = _a.name, labelIcon = _a.labelIcon, initLabel = _a.label, required = _a.required, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
|
|
11688
|
+
name = _a.name, labelIcon = _a.labelIcon, initLabel = _a.label, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
|
|
11676
11689
|
//----------------------------------------------------------------------------------------------------------------
|
|
11677
11690
|
className = _a.className;
|
|
11678
11691
|
var id = useId();
|
|
@@ -11907,16 +11920,16 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
|
|
|
11907
11920
|
React__default.createElement(TextField, { inputRef: textFieldRef, className: 'file-name', variant: variant, label: label, size: size, required: required, value: value || '', focused: focused, disabled: disabled, fullWidth: true, error: error, InputLabelProps: labelShrink ? { shrink: labelShrink } : undefined, inputProps: { readOnly: true, tabIndex: -1 }, InputProps: {
|
|
11908
11921
|
endAdornment: (React__default.createElement(InputAdornment, { position: 'end' },
|
|
11909
11922
|
React__default.createElement("div", { className: 'input-file-wrap' },
|
|
11910
|
-
React__default.createElement(Button, { variant: 'text', className: 'input-file-btn form-file-btn', color: error ? 'error' : color, disabled: disabled, ref: fileUploadBtnRef },
|
|
11923
|
+
React__default.createElement(Button, { variant: 'text', className: 'input-file-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, ref: fileUploadBtnRef },
|
|
11911
11924
|
React__default.createElement("label", { htmlFor: id },
|
|
11912
11925
|
React__default.createElement(FormIcon, null, "upload"),
|
|
11913
11926
|
"\uD30C\uC77C \uC5C5\uB85C\uB4DC")),
|
|
11914
11927
|
React__default.createElement("input", { type: 'file', accept: accept, id: id, value: fileValue, className: 'input-file', onChange: handleFileChange }),
|
|
11915
|
-
!hideLink && (React__default.createElement(Button, { variant: 'text', className: 'link-btn form-file-btn', color: error ? 'error' : color, disabled: disabled, onClick: handleLinkClick },
|
|
11928
|
+
!hideLink && (React__default.createElement(Button, { variant: 'text', className: 'link-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, onClick: handleLinkClick },
|
|
11916
11929
|
React__default.createElement("label", null,
|
|
11917
11930
|
React__default.createElement(FormIcon, null, "link"),
|
|
11918
11931
|
"\uB9C1\uD06C"))),
|
|
11919
|
-
notEmpty(value) && (React__default.createElement(Button, { variant: 'text', className: 'remove-btn form-file-btn', color: error ? 'error' : color, disabled: disabled, onClick: handleRemoveClick },
|
|
11932
|
+
notEmpty(value) && (React__default.createElement(Button, { variant: 'text', className: 'remove-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, onClick: handleRemoveClick },
|
|
11920
11933
|
React__default.createElement("label", null,
|
|
11921
11934
|
React__default.createElement(FormIcon, null, "Close"),
|
|
11922
11935
|
"\uC0AD\uC81C")))))),
|