@pdg/react-form 1.0.99 → 1.0.101

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,11 @@
1
1
  import { ButtonProps } from '@mui/material';
2
2
  import { PartialPick } from '../../@types';
3
3
  import { FormContextValue } from '../../FormContext';
4
+ import { PdgIconProps } from '@pdg/react-component';
4
5
  export interface FormButtonProps extends PartialPick<FormContextValue, 'color' | 'size'>, Omit<ButtonProps, 'color' | 'size' | 'startIcon' | 'endIcon'> {
5
6
  type?: 'button' | 'submit';
6
- icon?: string;
7
- startIcon?: string;
8
- endIcon?: string;
7
+ icon?: PdgIconProps['children'];
8
+ startIcon?: PdgIconProps['children'];
9
+ endIcon?: PdgIconProps['children'];
9
10
  }
10
11
  export declare const FormButtonDefaultProps: FormButtonProps;
package/dist/index.esm.js CHANGED
@@ -590,9 +590,9 @@ Form.defaultProps = FormDefaultProps;var FormButtonDefaultProps = {
590
590
  * ******************************************************************************************************************/
591
591
  return (React.createElement(Button, __assign({ ref: ref, className: classNames(className, 'FormButton'), type: type, variant: variant, size: size, color: color, fullWidth: fullWidth, onClick: onClick }, props),
592
592
  React.createElement(Box, { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' },
593
- (icon || startIcon) && (React.createElement(PdgIcon, { fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
593
+ (icon || startIcon) && (React.createElement(PdgIcon, { className: 'FormButton-StartIcon', fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
594
594
  children,
595
- endIcon && (React.createElement(PdgIcon, { fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
595
+ endIcon && (React.createElement(PdgIcon, { className: 'FormButton-EndIcon', fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
596
596
  });
597
597
  FormButton.displayName = 'FormButton';
598
598
  FormButton.defaultProps = FormButtonDefaultProps;var FormLabelDefaultProps = {};var IconPdgIcon = styled(PdgIcon)(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"], ["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"])));
package/dist/index.js CHANGED
@@ -590,9 +590,9 @@ Form.defaultProps = FormDefaultProps;var FormButtonDefaultProps = {
590
590
  * ******************************************************************************************************************/
591
591
  return (React.createElement(material.Button, __assign({ ref: ref, className: classNames(className, 'FormButton'), type: type, variant: variant, size: size, color: color, fullWidth: fullWidth, onClick: onClick }, props),
592
592
  React.createElement(material.Box, { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' },
593
- (icon || startIcon) && (React.createElement(reactComponent.PdgIcon, { fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
593
+ (icon || startIcon) && (React.createElement(reactComponent.PdgIcon, { className: 'FormButton-StartIcon', fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
594
594
  children,
595
- endIcon && (React.createElement(reactComponent.PdgIcon, { fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
595
+ endIcon && (React.createElement(reactComponent.PdgIcon, { className: 'FormButton-EndIcon', fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
596
596
  });
597
597
  FormButton.displayName = 'FormButton';
598
598
  FormButton.defaultProps = FormButtonDefaultProps;var FormLabelDefaultProps = {};var IconPdgIcon = material.styled(reactComponent.PdgIcon)(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"], ["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"])));
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.99",
4
+ "version": "1.0.101",
5
5
  "description": "React Form",
6
6
  "type": "module",
7
7
  "types": "dist/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "@mui/icons-material": "^5.15.13",
45
45
  "@mui/material": "^5.15.13",
46
46
  "@mui/x-date-pickers": "^6.19.7",
47
- "@pdg/react-component": "^1.0.10",
47
+ "@pdg/react-component": "^1.0.11",
48
48
  "@pdg/react-hook": "^1.0.8",
49
49
  "@pdg/util": "^1.0.19",
50
50
  "@tinymce/tinymce-react": "^4.3.2",