@pdg/react-form 1.0.115 → 1.0.116
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.
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { PartialPick } from '../../@types';
|
|
2
2
|
import { FormContextValue } from '../../FormContext';
|
|
3
|
-
import { PdgButtonProps
|
|
4
|
-
export interface FormButtonProps extends PartialPick<FormContextValue, 'color' | 'size'>, Omit<PdgButtonProps, 'color' | 'size'
|
|
3
|
+
import { PdgButtonProps } from '@pdg/react-component';
|
|
4
|
+
export interface FormButtonProps extends PartialPick<FormContextValue, 'color' | 'size'>, Omit<PdgButtonProps, 'color' | 'size'> {
|
|
5
5
|
type?: 'button' | 'submit';
|
|
6
|
-
icon?: PdgIconProps['children'];
|
|
7
|
-
startIcon?: PdgIconProps['children'];
|
|
8
|
-
endIcon?: PdgIconProps['children'];
|
|
9
6
|
}
|
|
10
7
|
export declare const FormButtonDefaultProps: FormButtonProps;
|
package/dist/index.esm.js
CHANGED
|
@@ -8591,17 +8591,17 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8591
8591
|
endAdornment: (React.createElement(InputAdornment, { position: 'end' },
|
|
8592
8592
|
React.createElement("div", { className: 'input-file-wrap' },
|
|
8593
8593
|
!hideUpload && (React.createElement(React.Fragment, null,
|
|
8594
|
-
React.createElement(StyledPdgButton, { variant: 'text', tabIndex: uploadTabIndex == null ? -1 : uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8594
|
+
React.createElement(StyledPdgButton, { variant: 'text', tabIndex: uploadTabIndex == null ? -1 : uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'upload', size: size, disabled: readOnly || disabled, ref: fileUploadBtnRef }, !hideUploadLabel && (uploadLabel || '파일 업로드')),
|
|
8595
8595
|
React.createElement("input", { type: 'file', accept: accept, id: id, value: FILE_VALUE, className: 'input-file', onChange: handleFileChange }))),
|
|
8596
|
-
!hideLink && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: linkTabIndex == null ? -1 : linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8597
|
-
!hideRemove && notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: removeTabIndex == null ? -1 : removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8596
|
+
!hideLink && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: linkTabIndex == null ? -1 : linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'link', size: size, disabled: readOnly || disabled, ref: linkBtnRef, onClick: handleLinkClick }, !hideLinkLabel && (linkLabel || '링크'))),
|
|
8597
|
+
!hideRemove && notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: removeTabIndex == null ? -1 : removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'close', size: size, disabled: readOnly || disabled, onClick: handleRemoveClick }, !hideRemoveLabel && (removeLabel || '삭제')))))),
|
|
8598
8598
|
}, placeholder: '\uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694' }))),
|
|
8599
8599
|
!!hideUrl && (React.createElement("div", { className: 'input-file-wrap' },
|
|
8600
8600
|
!hideUpload && (React.createElement(React.Fragment, null,
|
|
8601
|
-
React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8601
|
+
React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'upload', size: size, ref: fileUploadBtnRef, disabled: disabled }, !hideUploadLabel && (uploadLabel || '파일 업로드')),
|
|
8602
8602
|
React.createElement("input", { type: 'file', accept: accept, id: id, value: FILE_VALUE, className: 'input-file', onChange: handleFileChange }))),
|
|
8603
|
-
!hideLink && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8604
|
-
!hideRemove && notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8603
|
+
!hideLink && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'link', size: size, onClick: handleLinkClick, disabled: disabled, ref: linkBtnRef }, !hideLinkLabel && (linkLabel || '링크'))),
|
|
8604
|
+
!hideRemove && notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'close', size: size, disabled: disabled, onClick: handleRemoveClick }, !hideRemoveLabel && (removeLabel || '삭제'))))),
|
|
8605
8605
|
React.createElement(PrivateAlertDialog, __assign({}, alertDialogProps, { onClose: function () { return setAlertDialogProps({ open: false }); } })),
|
|
8606
8606
|
React.createElement(LinkDialog, { open: isOpenLinkDialog, onConfirm: handleLinkDialogConfirm, onClose: function () { return setIsOpenLinkDialog(false); } })) }));
|
|
8607
8607
|
});
|
|
@@ -10607,12 +10607,12 @@ SearchGroup.defaultProps = SearchGroupDefaultProps;var SearchButtonDefaultProps
|
|
|
10607
10607
|
/********************************************************************************************************************
|
|
10608
10608
|
* Memo
|
|
10609
10609
|
* ******************************************************************************************************************/
|
|
10610
|
-
var children = _a.children, className = _a.className, size = _a.size, initSx = _a.sx,
|
|
10610
|
+
var children = _a.children, className = _a.className, size = _a.size, initSx = _a.sx, props = __rest(_a, ["children", "className", "size", "sx"]);
|
|
10611
10611
|
var sx = useMemo(function () { return (__assign({ minWidth: 0, px: "".concat(!children ? 9 : 13, "px !important") }, initSx)); }, [children, initSx]);
|
|
10612
10612
|
/********************************************************************************************************************
|
|
10613
10613
|
* Render
|
|
10614
10614
|
* ******************************************************************************************************************/
|
|
10615
|
-
return (React.createElement(PdgButton, __assign({ className: classNames(className, 'SearchButton'), size: ifUndefined(size, 'medium'), sx: sx, fullWidth: false
|
|
10615
|
+
return (React.createElement(PdgButton, __assign({ className: classNames(className, 'SearchButton'), size: ifUndefined(size, 'medium'), sx: sx, fullWidth: false }, props), children));
|
|
10616
10616
|
};
|
|
10617
10617
|
SearchButton.defaultProps = SearchButtonDefaultProps;var SearchMenuButtonDefaultProps = {};var SearchMenuButton = function (_a) {
|
|
10618
10618
|
/********************************************************************************************************************
|
package/dist/index.js
CHANGED
|
@@ -8591,17 +8591,17 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8591
8591
|
endAdornment: (React.createElement(material.InputAdornment, { position: 'end' },
|
|
8592
8592
|
React.createElement("div", { className: 'input-file-wrap' },
|
|
8593
8593
|
!hideUpload && (React.createElement(React.Fragment, null,
|
|
8594
|
-
React.createElement(StyledPdgButton, { variant: 'text', tabIndex: uploadTabIndex == null ? -1 : uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8594
|
+
React.createElement(StyledPdgButton, { variant: 'text', tabIndex: uploadTabIndex == null ? -1 : uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'upload', size: size, disabled: readOnly || disabled, ref: fileUploadBtnRef }, !hideUploadLabel && (uploadLabel || '파일 업로드')),
|
|
8595
8595
|
React.createElement("input", { type: 'file', accept: accept, id: id, value: FILE_VALUE, className: 'input-file', onChange: handleFileChange }))),
|
|
8596
|
-
!hideLink && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: linkTabIndex == null ? -1 : linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8597
|
-
!hideRemove && util.notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: removeTabIndex == null ? -1 : removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8596
|
+
!hideLink && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: linkTabIndex == null ? -1 : linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'link', size: size, disabled: readOnly || disabled, ref: linkBtnRef, onClick: handleLinkClick }, !hideLinkLabel && (linkLabel || '링크'))),
|
|
8597
|
+
!hideRemove && util.notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: removeTabIndex == null ? -1 : removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'close', size: size, disabled: readOnly || disabled, onClick: handleRemoveClick }, !hideRemoveLabel && (removeLabel || '삭제')))))),
|
|
8598
8598
|
}, placeholder: '\uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694' }))),
|
|
8599
8599
|
!!hideUrl && (React.createElement("div", { className: 'input-file-wrap' },
|
|
8600
8600
|
!hideUpload && (React.createElement(React.Fragment, null,
|
|
8601
|
-
React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8601
|
+
React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'upload', size: size, ref: fileUploadBtnRef, disabled: disabled }, !hideUploadLabel && (uploadLabel || '파일 업로드')),
|
|
8602
8602
|
React.createElement("input", { type: 'file', accept: accept, id: id, value: FILE_VALUE, className: 'input-file', onChange: handleFileChange }))),
|
|
8603
|
-
!hideLink && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8604
|
-
!hideRemove && util.notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color,
|
|
8603
|
+
!hideLink && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'link', size: size, onClick: handleLinkClick, disabled: disabled, ref: linkBtnRef }, !hideLinkLabel && (linkLabel || '링크'))),
|
|
8604
|
+
!hideRemove && util.notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'outlined', tabIndex: removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'close', size: size, disabled: disabled, onClick: handleRemoveClick }, !hideRemoveLabel && (removeLabel || '삭제'))))),
|
|
8605
8605
|
React.createElement(PrivateAlertDialog, __assign({}, alertDialogProps, { onClose: function () { return setAlertDialogProps({ open: false }); } })),
|
|
8606
8606
|
React.createElement(LinkDialog, { open: isOpenLinkDialog, onConfirm: handleLinkDialogConfirm, onClose: function () { return setIsOpenLinkDialog(false); } })) }));
|
|
8607
8607
|
});
|
|
@@ -10607,12 +10607,12 @@ SearchGroup.defaultProps = SearchGroupDefaultProps;var SearchButtonDefaultProps
|
|
|
10607
10607
|
/********************************************************************************************************************
|
|
10608
10608
|
* Memo
|
|
10609
10609
|
* ******************************************************************************************************************/
|
|
10610
|
-
var children = _a.children, className = _a.className, size = _a.size, initSx = _a.sx,
|
|
10610
|
+
var children = _a.children, className = _a.className, size = _a.size, initSx = _a.sx, props = __rest(_a, ["children", "className", "size", "sx"]);
|
|
10611
10611
|
var sx = React.useMemo(function () { return (__assign({ minWidth: 0, px: "".concat(!children ? 9 : 13, "px !important") }, initSx)); }, [children, initSx]);
|
|
10612
10612
|
/********************************************************************************************************************
|
|
10613
10613
|
* Render
|
|
10614
10614
|
* ******************************************************************************************************************/
|
|
10615
|
-
return (React.createElement(reactComponent.PdgButton, __assign({ className: classNames(className, 'SearchButton'), size: util.ifUndefined(size, 'medium'), sx: sx, fullWidth: false
|
|
10615
|
+
return (React.createElement(reactComponent.PdgButton, __assign({ className: classNames(className, 'SearchButton'), size: util.ifUndefined(size, 'medium'), sx: sx, fullWidth: false }, props), children));
|
|
10616
10616
|
};
|
|
10617
10617
|
SearchButton.defaultProps = SearchButtonDefaultProps;var SearchMenuButtonDefaultProps = {};var SearchMenuButton = function (_a) {
|
|
10618
10618
|
/********************************************************************************************************************
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdg/react-form",
|
|
3
3
|
"title": "React Form",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.116",
|
|
5
5
|
"description": "React Form",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@mui/icons-material": "^5.15.13",
|
|
46
46
|
"@mui/material": "^5.15.13",
|
|
47
47
|
"@mui/x-date-pickers": "^6.19.7",
|
|
48
|
-
"@pdg/react-component": "^1.0.
|
|
48
|
+
"@pdg/react-component": "^1.0.21",
|
|
49
49
|
"@pdg/react-hook": "^1.0.16",
|
|
50
50
|
"@pdg/util": "^1.0.20",
|
|
51
51
|
"@tinymce/tinymce-react": "^4.3.2",
|