@xsolla/xui-multi-select 0.74.0 → 0.76.0

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.
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Flowtype definitions for index
3
+ * Generated by Flowgen from a Typescript Definition
4
+ * Flowgen v1.21.0
5
+ * @flow
6
+ */
7
+
8
+ import React, { Node } from "react";
9
+ declare type MultiSelectValue = (string | number)[];
10
+ declare type MultiSelectVariant = "tag" | "text";
11
+ declare type MultiSelectSize = "xs" | "sm" | "md" | "lg" | "xl";
12
+ declare type MultiSelectState =
13
+ | "default"
14
+ | "hover"
15
+ | "focus"
16
+ | "disable"
17
+ | "error";
18
+ declare interface MultiSelectOption {
19
+ label: Node;
20
+ value: string | number;
21
+ disabled?: boolean;
22
+ }
23
+ declare interface MultiSelectProps {
24
+ /**
25
+ * Property to define options for the multi-select.
26
+ */
27
+ options: MultiSelectOption[];
28
+
29
+ /**
30
+ * Property for specifying the placeholder of the control.
31
+ * @default "Select"
32
+ */
33
+ placeholder?: string;
34
+
35
+ /**
36
+ * Property for specifying the value of the control.
37
+ */
38
+ value?: MultiSelectValue;
39
+
40
+ /**
41
+ * Function that will be called when the value changes.
42
+ */
43
+ onChange?: (values: MultiSelectValue) => void;
44
+
45
+ /**
46
+ * Property for displaying an error message and highlighting the control as invalid.
47
+ */
48
+ errorMessage?: string;
49
+
50
+ /**
51
+ * Property for changing the size of the control.
52
+ * @default "md"
53
+ */
54
+ size?: MultiSelectSize;
55
+
56
+ /**
57
+ * Property for changing the state of the control.
58
+ */
59
+ state?: MultiSelectState;
60
+
61
+ /**
62
+ * Label text displayed above the control.
63
+ */
64
+ label?: string;
65
+
66
+ /**
67
+ * Icon displayed on the left side of the control.
68
+ */
69
+ iconLeft?: Node;
70
+
71
+ /**
72
+ * Icon displayed on the right side of the control (overrides default caret).
73
+ */
74
+ iconRight?: Node;
75
+
76
+ /**
77
+ * Property to disable the control.
78
+ */
79
+ disabled?: boolean;
80
+
81
+ /**
82
+ * Display type of selected options (as Tag component or as plain text with comma-separated list).
83
+ * @default "tag"
84
+ */
85
+ variant?: MultiSelectVariant;
86
+
87
+ /**
88
+ * Makes the height fixed (if false) or dependent on the content inside (if true).
89
+ * @default true
90
+ */
91
+ flexible?: boolean;
92
+
93
+ /**
94
+ * Switch on displaying a remove button in each tag.
95
+ * @default true
96
+ */
97
+ removeTagsButtons?: boolean;
98
+
99
+ /**
100
+ * Add clear all button.
101
+ * @default false
102
+ */
103
+ extraClear?: boolean;
104
+
105
+ /**
106
+ * Maximum height of the dropdown menu.
107
+ * @default 300
108
+ */
109
+ maxHeight?: number;
110
+ }
111
+ declare var MultiSelect: React.ForwardRefExoticComponent<{
112
+ ...MultiSelectProps,
113
+ ...React.RefAttributes<HTMLDivElement>,
114
+ }>;
115
+ export type {
116
+ MultiSelectOption,
117
+ MultiSelectProps,
118
+ MultiSelectSize,
119
+ MultiSelectState,
120
+ MultiSelectValue,
121
+ MultiSelectVariant,
122
+ };
123
+ declare export { MultiSelect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-multi-select",
3
- "version": "0.74.0",
3
+ "version": "0.76.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -10,10 +10,10 @@
10
10
  "build:native": "PLATFORM=native tsup"
11
11
  },
12
12
  "dependencies": {
13
- "@xsolla/xui-checkbox": "0.74.0",
14
- "@xsolla/xui-core": "0.74.0",
15
- "@xsolla/xui-dropdown": "0.74.0",
16
- "@xsolla/xui-primitives-core": "0.74.0"
13
+ "@xsolla/xui-checkbox": "0.76.0",
14
+ "@xsolla/xui-core": "0.76.0",
15
+ "@xsolla/xui-dropdown": "0.76.0",
16
+ "@xsolla/xui-primitives-core": "0.76.0"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "react": ">=16.8.0",
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Flowtype definitions for index
3
+ * Generated by Flowgen from a Typescript Definition
4
+ * Flowgen v1.21.0
5
+ * @flow
6
+ */
7
+
8
+ import React, { Node } from "react";
9
+ declare type MultiSelectValue = (string | number)[];
10
+ declare type MultiSelectVariant = "tag" | "text";
11
+ declare type MultiSelectSize = "xs" | "sm" | "md" | "lg" | "xl";
12
+ declare type MultiSelectState =
13
+ | "default"
14
+ | "hover"
15
+ | "focus"
16
+ | "disable"
17
+ | "error";
18
+ declare interface MultiSelectOption {
19
+ label: Node;
20
+ value: string | number;
21
+ disabled?: boolean;
22
+ }
23
+ declare interface MultiSelectProps {
24
+ /**
25
+ * Property to define options for the multi-select.
26
+ */
27
+ options: MultiSelectOption[];
28
+
29
+ /**
30
+ * Property for specifying the placeholder of the control.
31
+ * @default "Select"
32
+ */
33
+ placeholder?: string;
34
+
35
+ /**
36
+ * Property for specifying the value of the control.
37
+ */
38
+ value?: MultiSelectValue;
39
+
40
+ /**
41
+ * Function that will be called when the value changes.
42
+ */
43
+ onChange?: (values: MultiSelectValue) => void;
44
+
45
+ /**
46
+ * Property for displaying an error message and highlighting the control as invalid.
47
+ */
48
+ errorMessage?: string;
49
+
50
+ /**
51
+ * Property for changing the size of the control.
52
+ * @default "md"
53
+ */
54
+ size?: MultiSelectSize;
55
+
56
+ /**
57
+ * Property for changing the state of the control.
58
+ */
59
+ state?: MultiSelectState;
60
+
61
+ /**
62
+ * Label text displayed above the control.
63
+ */
64
+ label?: string;
65
+
66
+ /**
67
+ * Icon displayed on the left side of the control.
68
+ */
69
+ iconLeft?: Node;
70
+
71
+ /**
72
+ * Icon displayed on the right side of the control (overrides default caret).
73
+ */
74
+ iconRight?: Node;
75
+
76
+ /**
77
+ * Property to disable the control.
78
+ */
79
+ disabled?: boolean;
80
+
81
+ /**
82
+ * Display type of selected options (as Tag component or as plain text with comma-separated list).
83
+ * @default "tag"
84
+ */
85
+ variant?: MultiSelectVariant;
86
+
87
+ /**
88
+ * Makes the height fixed (if false) or dependent on the content inside (if true).
89
+ * @default true
90
+ */
91
+ flexible?: boolean;
92
+
93
+ /**
94
+ * Switch on displaying a remove button in each tag.
95
+ * @default true
96
+ */
97
+ removeTagsButtons?: boolean;
98
+
99
+ /**
100
+ * Add clear all button.
101
+ * @default false
102
+ */
103
+ extraClear?: boolean;
104
+
105
+ /**
106
+ * Maximum height of the dropdown menu.
107
+ * @default 300
108
+ */
109
+ maxHeight?: number;
110
+ }
111
+ declare var MultiSelect: React.ForwardRefExoticComponent<{
112
+ ...MultiSelectProps,
113
+ ...React.RefAttributes<HTMLDivElement>,
114
+ }>;
115
+ export type {
116
+ MultiSelectOption,
117
+ MultiSelectProps,
118
+ MultiSelectSize,
119
+ MultiSelectState,
120
+ MultiSelectValue,
121
+ MultiSelectVariant,
122
+ };
123
+ declare export { MultiSelect };