@sia.soul/sia-react-ui 0.1.5 → 0.1.7

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.
@@ -9,10 +9,20 @@ type SelectOption = {
9
9
  label: ReactNode;
10
10
  value: SelectValue;
11
11
  disabled?: boolean;
12
+ /** 弹框模式中的分组标题。 */
13
+ group?: string;
12
14
  };
13
15
  interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "defaultValue" | "onChange" | "value"> {
14
16
  options: readonly SelectOption[];
15
17
  mode?: SelectMode;
18
+ popupMode?: "dropdown" | "modal";
19
+ modalConfig?: {
20
+ title?: ReactNode;
21
+ width?: number | string;
22
+ columns?: number;
23
+ maxHeight?: number;
24
+ footerExtra?: ReactNode;
25
+ };
16
26
  value?: SelectChangeValue;
17
27
  defaultValue?: SelectChangeValue;
18
28
  onChange?: (value: SelectChangeValue, option: SelectOption | SelectOption[] | null) => void;
@@ -23,6 +33,8 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
23
33
  allowClear?: boolean;
24
34
  loading?: boolean;
25
35
  showSearch?: boolean;
36
+ /** 在选项名称下方显示对应的 value。 */
37
+ showValue?: boolean;
26
38
  /** 允许将搜索框内容作为自定义选项提交。 */
27
39
  allowInput?: boolean;
28
40
  inputMaxLength?: number;
@@ -9,10 +9,20 @@ type SelectOption = {
9
9
  label: ReactNode;
10
10
  value: SelectValue;
11
11
  disabled?: boolean;
12
+ /** 弹框模式中的分组标题。 */
13
+ group?: string;
12
14
  };
13
15
  interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "defaultValue" | "onChange" | "value"> {
14
16
  options: readonly SelectOption[];
15
17
  mode?: SelectMode;
18
+ popupMode?: "dropdown" | "modal";
19
+ modalConfig?: {
20
+ title?: ReactNode;
21
+ width?: number | string;
22
+ columns?: number;
23
+ maxHeight?: number;
24
+ footerExtra?: ReactNode;
25
+ };
16
26
  value?: SelectChangeValue;
17
27
  defaultValue?: SelectChangeValue;
18
28
  onChange?: (value: SelectChangeValue, option: SelectOption | SelectOption[] | null) => void;
@@ -23,6 +33,8 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
23
33
  allowClear?: boolean;
24
34
  loading?: boolean;
25
35
  showSearch?: boolean;
36
+ /** 在选项名称下方显示对应的 value。 */
37
+ showValue?: boolean;
26
38
  /** 允许将搜索框内容作为自定义选项提交。 */
27
39
  allowInput?: boolean;
28
40
  inputMaxLength?: number;