x-ui-design 0.3.67 → 0.3.69
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 +17 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -13
- package/dist/index.js.map +1 -1
- package/lib/components/Button/Button.tsx +22 -20
- package/lib/components/Form/Item/Item.tsx +6 -4
- package/package.json +1 -1
- package/src/app/page.tsx +14 -1
package/dist/index.esm.js
CHANGED
|
@@ -1063,16 +1063,18 @@ const FormItemChildComponent = ({
|
|
|
1063
1063
|
}
|
|
1064
1064
|
return /*#__PURE__*/cloneElement(child, {
|
|
1065
1065
|
...props,
|
|
1066
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1067
|
+
// @ts-expect-error
|
|
1066
1068
|
name,
|
|
1067
1069
|
onChange: handleChange,
|
|
1068
1070
|
key: `${name}_${wasNormalize}`,
|
|
1069
1071
|
value: fieldValue ?? props.value,
|
|
1070
|
-
...(
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1072
|
+
...('dangerouslySetInnerHTML' in childProps ? {} : {
|
|
1073
|
+
__injected: true,
|
|
1074
|
+
...(error ? {
|
|
1075
|
+
error
|
|
1076
|
+
} : {})
|
|
1077
|
+
})
|
|
1076
1078
|
});
|
|
1077
1079
|
};
|
|
1078
1080
|
return injectPropsIntoFinalLeaf(child);
|
|
@@ -1294,13 +1296,15 @@ const ButtonComponent = ({
|
|
|
1294
1296
|
setInnerLoading(!!loading);
|
|
1295
1297
|
}
|
|
1296
1298
|
}, [loading]);
|
|
1297
|
-
const classes =
|
|
1298
|
-
[`${prefixCls}-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1299
|
+
const classes = useMemo(() => {
|
|
1300
|
+
return clsx([...new Set([prefixCls, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${variant}`, `${prefixCls}-${color}`, `${prefixCls}-${shape}`, `${prefixCls}-size-${size}`, {
|
|
1301
|
+
[`${prefixCls}-block`]: block,
|
|
1302
|
+
[`${prefixCls}-ghost`]: ghost,
|
|
1303
|
+
[`${prefixCls}-danger`]: danger,
|
|
1304
|
+
[`${prefixCls}-loading`]: innerLoading,
|
|
1305
|
+
[`${prefixCls}-disabled`]: disabled
|
|
1306
|
+
}, className])]);
|
|
1307
|
+
}, [block, className, color, danger, disabled, ghost, innerLoading, prefixCls, rootClassName, shape, size, type, variant]);
|
|
1304
1308
|
const iconNode = innerLoading ? typeof loading === 'object' && loading.icon || /*#__PURE__*/React$1.createElement("span", {
|
|
1305
1309
|
className: `${prefixCls}-spinner`
|
|
1306
1310
|
}) : icon;
|