@pdg/react-form 1.0.45 → 1.0.46
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,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const IconFormIcon: import("@emotion/styled").StyledComponent<
|
|
2
|
+
export declare const IconFormIcon: import("@emotion/styled").StyledComponent<import("../FormIcon").FormIconProps & import("react").RefAttributes<HTMLAnchorElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
3
|
export declare const ChildrenSpan: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
package/dist/index.esm.js
CHANGED
|
@@ -4564,6 +4564,8 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
|
|
|
4564
4564
|
//----------------------------------------------------------------------------------------------------------------
|
|
4565
4565
|
className = _a.className, initStyle = _a.style, sx = _a.sx, props = __rest$3(_a, ["variant", "size", "color", "focused", "fullWidth", "name", "labelIcon", "label", "checked", "inputRef", "action", "readOnly", "disabled", "text", "error", "helperText", "value", "data", "uncheckedValue", "exceptValue", "hidden", "onChange", "onValidate", "className", "style", "sx"]);
|
|
4566
4566
|
var id = useId();
|
|
4567
|
+
// Use ---------------------------------------------------------------------------------------------------------------
|
|
4568
|
+
var theme = useTheme();
|
|
4567
4569
|
// FormState -------------------------------------------------------------------------------------------------------
|
|
4568
4570
|
var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFocused = _b.focused, formFullWidth = _b.fullWidth, onAddValueItem = _b.onAddValueItem, onRemoveValueItem = _b.onRemoveValueItem, onValueChange = _b.onValueChange, onValueChangeByUser = _b.onValueChangeByUser, onRequestSearchSubmit = _b.onRequestSearchSubmit;
|
|
4569
4571
|
// Memo - FormState ------------------------------------------------------------------------------------------------
|
|
@@ -4733,7 +4735,7 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
|
|
|
4733
4735
|
}
|
|
4734
4736
|
}, [readOnly, setChecked, onValueChangeByUser, name, onRequestSearchSubmit]);
|
|
4735
4737
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
4736
|
-
return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormCheckbox'), labelIcon: labelIcon, label: label, error: error, fullWidth: fullWidth, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(FormControlLabel, { ref: resizeDetectorRef, control: React__default.createElement(Checkbox, __assign$6({ name: name, color: color, size: size, inputRef: initInputRef ? initInputRef : inputRef, action: initAction ? initAction : actionRef, checked: !!checked, checkedIcon: React__default.createElement(CheckBox, { color: error ? 'error' : undefined }), icon: React__default.createElement(CheckBoxOutlineBlank, { color: error ? 'error' : undefined }), onChange: handleChange, disabled: disabled || readOnly }, props)), label: React__default.createElement(Typography, { color: error ? 'error' : undefined, whiteSpace: 'nowrap' }, text) }) }));
|
|
4738
|
+
return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormCheckbox'), labelIcon: labelIcon, label: label, error: error, fullWidth: fullWidth, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(FormControlLabel, { ref: resizeDetectorRef, control: React__default.createElement(Checkbox, __assign$6({ name: name, color: color, size: size, inputRef: initInputRef ? initInputRef : inputRef, action: initAction ? initAction : actionRef, checked: !!checked, checkedIcon: React__default.createElement(CheckBox, { color: error ? 'error' : undefined }), icon: React__default.createElement(CheckBoxOutlineBlank, { color: error ? 'error' : undefined }), onChange: handleChange, disabled: disabled || readOnly }, props)), label: React__default.createElement(Typography, { color: error ? 'error' : (readOnly || disabled) ? theme.palette.text.disabled : undefined, whiteSpace: 'nowrap' }, text) }) }));
|
|
4737
4739
|
});
|
|
4738
4740
|
FormCheckbox.displayName = 'FormCheckbox';
|
|
4739
4741
|
FormCheckbox.defaultProps = FormCheckboxDefaultProps;var FormRadioGroupDefaultProps = {
|