@pdg/react-form 1.0.39 → 1.0.40
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.esm.js +15 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -11780,7 +11780,7 @@ FormDateRangePicker.defaultProps = FormDateRangePickerDefaultProps;var FormFileD
|
|
|
11780
11780
|
React__default.createElement(Button, { variant: 'text', onClick: handleSubmit }, "\uD655\uC778"))));
|
|
11781
11781
|
};
|
|
11782
11782
|
LinkDialog.displayName = 'LinkDialog';
|
|
11783
|
-
LinkDialog.defaultProps = LinkDialogDefaultProps;var css_248z$1 = ".FormFile .control-wrap {\n display: inline-flex;\n}\n.FormFile .control-wrap .file-name-wrap .file-name {\n min-width: 350px;\n}\n.FormFile .control-wrap .file-name-wrap .file-name .MuiInputBase-root {\n padding-right: 7px;\n}\n.FormFile .control-wrap .input-file {\n display: none;\n}\n.FormFile .control-wrap .form-file-btn {\n padding: 0;\n}\n.FormFile .control-wrap .form-file-btn label {\n cursor: pointer;\n display: flex;\n width: 100%;\n height: 100%;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n}\n.FormFile .control-wrap .form-file-btn label .FormIcon {\n margin-right: 5px;\n}\n.FormFile .control-wrap .input-file-wrap {\n display: flex;\n}\n.FormFile .control-wrap .input-file-wrap .input-file-btn .FormIcon {\n margin-left: -3px;\n}\n.FormFile .control-wrap .input-file-wrap .
|
|
11783
|
+
LinkDialog.defaultProps = LinkDialogDefaultProps;var css_248z$1 = ".FormFile .control-wrap {\n display: inline-flex;\n}\n.FormFile .control-wrap .file-name-wrap .file-name {\n min-width: 350px;\n}\n.FormFile .control-wrap .file-name-wrap .file-name .MuiInputBase-root {\n padding-right: 7px;\n}\n.FormFile .control-wrap .input-file {\n display: none;\n}\n.FormFile .control-wrap .form-file-btn {\n padding: 0;\n}\n.FormFile .control-wrap .form-file-btn label {\n cursor: pointer;\n display: flex;\n width: 100%;\n height: 100%;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n}\n.FormFile .control-wrap .form-file-btn label .FormIcon {\n margin-right: 5px;\n}\n.FormFile .control-wrap .input-file-wrap {\n display: flex;\n}\n.FormFile .control-wrap .input-file-wrap .input-file-btn .FormIcon {\n margin-left: -3px;\n}\n.FormFile .control-wrap .input-file-wrap .form-file-btn:first-of-type:not(:last-of-type) {\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.FormFile .control-wrap .input-file-wrap .form-file-btn:last-of-type:not(:first-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.FormFile .control-wrap .input-file-wrap .form-file-btn:not(:first-of-type):not(:last-of-type) {\n border-right: 0;\n border-radius: 0;\n}\n.FormFile.full-width .control-wrap {\n display: flex;\n}\n.FormFile.full-width .control-wrap .file-name-wrap {\n flex: 1;\n}\n.FormFile.variant-standard .file-name-wrap .file-name .MuiInputBase-root {\n padding-right: 0;\n}\n\n.FormFile:not(.hide-file-name).variant-outlined .form-file-btn label, .FormFile:not(.hide-file-name).variant-filled .form-file-btn label {\n padding-top: 10px;\n padding-bottom: 10px;\n}\n.FormFile:not(.hide-file-name).variant-standard .form-file-btn label {\n padding-top: 5px;\n padding-bottom: 5px;\n}\n.FormFile:not(.hide-file-name).size-small .form-file-btn label {\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n.FormFile.hide-file-name:not(.with-label).variant-outlined .form-file-btn {\n height: 52px;\n}\n.FormFile.hide-file-name:not(.with-label).variant-filled .form-file-btn {\n height: 52px;\n}\n.FormFile.hide-file-name:not(.with-label).variant-standard .form-file-btn {\n height: 28px;\n}\n.FormFile.hide-file-name:not(.with-label).size-small.variant-outlined .form-file-btn {\n height: 37px;\n}\n.FormFile.hide-file-name:not(.with-label).size-small.variant-filled .form-file-btn {\n height: 44px;\n}\n.FormFile.hide-file-name:not(.with-label).size-small.variant-standard .form-file-btn {\n height: 26px;\n}\n.FormFile.hide-file-name.with-label.variant-outlined .form-file-btn {\n height: 37px;\n}\n.FormFile.hide-file-name.with-label.variant-filled .form-file-btn {\n height: 37px;\n}\n.FormFile.hide-file-name.with-label.variant-standard .form-file-btn {\n height: 28px;\n}\n.FormFile.hide-file-name.with-label.size-small.variant-outlined .form-file-btn {\n height: 24px;\n}\n.FormFile.hide-file-name.with-label.size-small.variant-filled .form-file-btn {\n height: 31px;\n}\n.FormFile.hide-file-name.with-label.size-small.variant-standard .form-file-btn {\n height: 26px;\n}\n\n.Form .FormCol.with-label .FormFile.hide-file-name.variant-outlined .form-file-btn {\n height: 37px;\n}\n.Form .FormCol.with-label .FormFile.hide-file-name.variant-filled .form-file-btn {\n height: 37px;\n}\n.Form .FormCol.with-label .FormFile.hide-file-name.variant-standard .form-file-btn {\n height: 28px;\n}\n.Form .FormCol.with-label .FormFile.hide-file-name.size-small.variant-outlined .form-file-btn {\n height: 24px;\n}\n.Form .FormCol.with-label .FormFile.hide-file-name.size-small.variant-filled .form-file-btn {\n height: 31px;\n}\n.Form .FormCol.with-label .FormFile.hide-file-name.size-small.variant-standard .form-file-btn {\n height: 26px;\n}";
|
|
11784
11784
|
styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, ref) {
|
|
11785
11785
|
// ID --------------------------------------------------------------------------------------------------------------
|
|
11786
11786
|
var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
|
|
@@ -12019,7 +12019,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
|
|
|
12019
12019
|
}
|
|
12020
12020
|
}, [name, onLink, onValueChangeByUser, setValue]);
|
|
12021
12021
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
12022
|
-
return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormFile', "variant-".concat(variant), "size-".concat(size), !!initLabel && 'with-label', !!fullWidth && 'full-width', !!hideUrl && 'hide-file-name', !!hideLink && 'hide-link', notEmpty(value) && 'with-value'), labelIcon: hideUrl ? labelIcon : undefined, label: hideUrl ? initLabel : undefined, error: error, required: required, fullWidth: fullWidth, hidden: hidden, helperText: React__default.createElement("div", null,
|
|
12022
|
+
return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormFile', "variant-".concat(variant), "size-".concat(size), !!initLabel && 'with-label', !!fullWidth && 'full-width', !!hideUrl && 'hide-file-name', !!hideLink && 'hide-link', !!hideUpload && 'hide-upload', !!hideRemove && 'hide-remove', notEmpty(value) && 'with-value'), labelIcon: hideUrl ? labelIcon : undefined, label: hideUrl ? initLabel : undefined, error: error, required: required, fullWidth: fullWidth, hidden: hidden, helperText: React__default.createElement("div", null,
|
|
12023
12023
|
preview,
|
|
12024
12024
|
React__default.createElement("div", null, helperText)), hideLabel: !hideUrl, helperTextProps: {
|
|
12025
12025
|
style: {
|
|
@@ -12031,26 +12031,28 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
|
|
|
12031
12031
|
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: {
|
|
12032
12032
|
endAdornment: (React__default.createElement(InputAdornment, { position: 'end' },
|
|
12033
12033
|
React__default.createElement("div", { className: 'input-file-wrap' },
|
|
12034
|
-
React__default.createElement(
|
|
12035
|
-
React__default.createElement(
|
|
12036
|
-
React__default.createElement(
|
|
12037
|
-
|
|
12038
|
-
|
|
12034
|
+
!hideUpload && (React__default.createElement(React__default.Fragment, null,
|
|
12035
|
+
React__default.createElement(Button, { variant: 'text', className: 'input-file-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, ref: fileUploadBtnRef },
|
|
12036
|
+
React__default.createElement("label", { htmlFor: id },
|
|
12037
|
+
React__default.createElement(FormIcon, null, "upload"),
|
|
12038
|
+
"\uD30C\uC77C \uC5C5\uB85C\uB4DC")),
|
|
12039
|
+
React__default.createElement("input", { type: 'file', accept: accept, id: id, value: fileValue, className: 'input-file', onChange: handleFileChange }))),
|
|
12039
12040
|
!hideLink && (React__default.createElement(Button, { variant: 'text', className: 'link-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, onClick: handleLinkClick },
|
|
12040
12041
|
React__default.createElement("label", null,
|
|
12041
12042
|
React__default.createElement(FormIcon, null, "link"),
|
|
12042
12043
|
"\uB9C1\uD06C"))),
|
|
12043
|
-
notEmpty(value) && (React__default.createElement(Button, { variant: 'text', className: 'remove-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, onClick: handleRemoveClick },
|
|
12044
|
+
!hideRemove && notEmpty(value) && (React__default.createElement(Button, { variant: 'text', className: 'remove-btn form-file-btn', color: error ? 'error' : color, disabled: readOnly || disabled, onClick: handleRemoveClick },
|
|
12044
12045
|
React__default.createElement("label", null,
|
|
12045
12046
|
React__default.createElement(FormIcon, null, "Close"),
|
|
12046
12047
|
"\uC0AD\uC81C")))))),
|
|
12047
12048
|
}, placeholder: '\uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694' }))),
|
|
12048
12049
|
!!hideUrl && (React__default.createElement("div", { className: 'input-file-wrap' },
|
|
12049
|
-
!hideUpload && (React__default.createElement(
|
|
12050
|
-
React__default.createElement(
|
|
12051
|
-
React__default.createElement(
|
|
12052
|
-
|
|
12053
|
-
|
|
12050
|
+
!hideUpload && (React__default.createElement(React__default.Fragment, null,
|
|
12051
|
+
React__default.createElement(Button, { variant: 'outlined', className: 'input-file-btn form-file-btn', color: error ? 'error' : color, ref: fileUploadBtnRef, disabled: disabled },
|
|
12052
|
+
React__default.createElement("label", { htmlFor: id },
|
|
12053
|
+
React__default.createElement(FormIcon, null, "upload"),
|
|
12054
|
+
"\uD30C\uC77C \uC5C5\uB85C\uB4DC")),
|
|
12055
|
+
React__default.createElement("input", { type: 'file', accept: accept, id: id, value: fileValue, className: 'input-file', onChange: handleFileChange }))),
|
|
12054
12056
|
!hideLink && (React__default.createElement(Button, { variant: 'outlined', className: 'link-btn form-file-btn', color: error ? 'error' : color, onClick: handleLinkClick, disabled: disabled },
|
|
12055
12057
|
React__default.createElement("label", null,
|
|
12056
12058
|
React__default.createElement(FormIcon, null, "link"),
|