@sia.soul/sia-react-ui 0.1.6 → 0.1.8

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;
@@ -30,6 +42,8 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
30
42
  onSearch?: (query: string) => void;
31
43
  filterOption?: (query: string, option: SelectOption) => boolean;
32
44
  showSelectAll?: boolean;
45
+ /** 是否显示下拉面板底部的条数统计与操作行;默认单选隐藏、多选显示,不影响弹框模式。 */
46
+ showActions?: boolean;
33
47
  /** 最多显示的标签数;空间不足时会继续折叠,并为 +N 预留宽度。 */
34
48
  maxTagCount?: number;
35
49
  virtual?: boolean;
@@ -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;
@@ -30,6 +42,8 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
30
42
  onSearch?: (query: string) => void;
31
43
  filterOption?: (query: string, option: SelectOption) => boolean;
32
44
  showSelectAll?: boolean;
45
+ /** 是否显示下拉面板底部的条数统计与操作行;默认单选隐藏、多选显示,不影响弹框模式。 */
46
+ showActions?: boolean;
33
47
  /** 最多显示的标签数;空间不足时会继续折叠,并为 +N 预留宽度。 */
34
48
  maxTagCount?: number;
35
49
  virtual?: boolean;
@@ -1,13 +1,11 @@
1
1
  import {
2
2
  Dropdown,
3
+ Icon,
3
4
  Input
4
- } from "./chunk-IHTODT53.js";
5
+ } from "./chunk-JJVD2ITI.js";
5
6
  import {
6
7
  Button
7
8
  } from "./chunk-MBS2HXLZ.js";
8
- import {
9
- Icon
10
- } from "./chunk-EJ23MVR6.js";
11
9
  import {
12
10
  useFloatingPlaceholder
13
11
  } from "./chunk-EJDPRAU2.js";