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 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
- ...(error ? {
1071
- error
1072
- } : {}),
1073
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1074
- // @ts-expect-error
1075
- __injected: true
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 = clsx(prefixCls, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${variant}`, `${prefixCls}-${color}`, `${prefixCls}-${shape}`, `${prefixCls}-size-${size}`, {
1298
- [`${prefixCls}-block`]: block,
1299
- [`${prefixCls}-ghost`]: ghost,
1300
- [`${prefixCls}-danger`]: danger,
1301
- [`${prefixCls}-loading`]: innerLoading,
1302
- [`${prefixCls}-disabled`]: disabled
1303
- }, className);
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;