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