x-ui-design 0.5.23 → 0.5.25

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.
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { FormItemProps } from '../../../types/form';
3
3
  import './style.css';
4
4
  declare const FormItem: {
5
- ({ prefixCls, name, label, rules, children, className, layout, style, dependencies, initialValue, feedbackIcons, extra, removeErrorMessageHeight, ...props }: FormItemProps): React.JSX.Element;
5
+ ({ prefixCls, name, label, rules, children, className, layout, style, dependencies, initialValue, feedbackIcons, extra, hideLabel, removeErrorMessageHeight, ...props }: FormItemProps): React.JSX.Element;
6
6
  displayName: string;
7
7
  };
8
8
  export default FormItem;
@@ -67,6 +67,7 @@ export type FormItemProps = DefaultProps & {
67
67
  normalize?: (value: RuleType, prevValue: RuleType, allValues: RuleType) => RuleType;
68
68
  feedbackIcons?: boolean;
69
69
  extra?: ReactNode;
70
+ hideLabel?: boolean;
70
71
  removeErrorMessageHeight?: boolean;
71
72
  };
72
73
  export interface FormItemChildComponentProps {
package/dist/index.esm.js CHANGED
@@ -979,6 +979,7 @@ const FormItem$1 = ({
979
979
  initialValue,
980
980
  feedbackIcons,
981
981
  extra,
982
+ hideLabel = false,
982
983
  removeErrorMessageHeight = false,
983
984
  ...props
984
985
  }) => {
@@ -1038,7 +1039,7 @@ const FormItem$1 = ({
1038
1039
  [className]: className,
1039
1040
  noStyle: props.noStyle
1040
1041
  }])
1041
- }, !props.noStyle && (label || name) && /*#__PURE__*/React.createElement("label", {
1042
+ }, !props.noStyle && (label || name) && !hideLabel && /*#__PURE__*/React.createElement("label", {
1042
1043
  className: `${prefixCls}-label`,
1043
1044
  htmlFor: name
1044
1045
  }, label || name, isRequired && /*#__PURE__*/React.createElement("span", {
@@ -3438,8 +3439,8 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3438
3439
  return;
3439
3440
  }
3440
3441
  const updatedSelected = [...selected, newOptionValue];
3441
- onChange?.(updatedSelected);
3442
3442
  onSelect?.(updatedSelected);
3443
+ onChange?.(updatedSelected);
3443
3444
  const input = selectRef.current?.querySelector('input');
3444
3445
  if (input) {
3445
3446
  input.value = '';
@@ -3463,16 +3464,16 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3463
3464
  } else {
3464
3465
  setIsOpen(defaultOpen);
3465
3466
  setSelected(optionValue);
3466
- onChange?.(optionValue, option);
3467
3467
  onSelect?.(optionValue, option);
3468
+ onChange?.(optionValue, option);
3468
3469
  }
3469
3470
  handleClearInputValue();
3470
3471
  };
3471
3472
  const handleClear = () => {
3472
3473
  const value = hasMode ? [] : '';
3473
3474
  setSelected(value);
3474
- onChange?.('');
3475
3475
  onSelect?.('');
3476
+ onChange?.('');
3476
3477
  onClear?.();
3477
3478
  handleClearInputValue();
3478
3479
  };