@xsolla/xui-controls 0.149.1 → 0.151.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/README.md +55 -21
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -1,36 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Controls
|
|
2
2
|
|
|
3
|
-
Convenience re-
|
|
3
|
+
Convenience meta-package that re-exports every form-control component from the toolkit. Install one package instead of many; refer to each component's own page for detailed API and accessibility notes.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npm install @xsolla/xui-controls
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Imports
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Button, Input, Select, Switch, Checkbox, RadioGroup } from '@xsolla/xui-controls';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
12
18
|
|
|
13
19
|
```tsx
|
|
14
|
-
import { Button,
|
|
20
|
+
import { Button, Input } from '@xsolla/xui-controls';
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
export default function Example() {
|
|
23
|
+
const [name, setName] = React.useState('');
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<Input value={name} onChangeText={setName} label="Name" />
|
|
27
|
+
<Button variant="primary" onPress={() => console.log(name)}>Save</Button>
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
17
31
|
```
|
|
18
32
|
|
|
19
|
-
##
|
|
33
|
+
## Re-exported packages
|
|
34
|
+
|
|
35
|
+
| Component(s) | Source package |
|
|
36
|
+
| :----------- | :------------- |
|
|
37
|
+
| Autocomplete | `@xsolla/xui-autocomplete` |
|
|
38
|
+
| Button | `@xsolla/xui-button` |
|
|
39
|
+
| Calendar | `@xsolla/xui-calendar` |
|
|
40
|
+
| Checkbox | `@xsolla/xui-checkbox` |
|
|
41
|
+
| CheckboxTagGroup | `@xsolla/xui-checkbox-tag-group` |
|
|
42
|
+
| DatePicker | `@xsolla/xui-date-picker` |
|
|
43
|
+
| Dropdown | `@xsolla/xui-dropdown` |
|
|
44
|
+
| Input | `@xsolla/xui-input` |
|
|
45
|
+
| InputCopy | `@xsolla/xui-input-copy` |
|
|
46
|
+
| InputPassword | `@xsolla/xui-input-password` |
|
|
47
|
+
| InputPayment | `@xsolla/xui-input-payment` |
|
|
48
|
+
| InputPhone | `@xsolla/xui-input-phone` |
|
|
49
|
+
| InputPin | `@xsolla/xui-input-pin` |
|
|
50
|
+
| MultiSelect | `@xsolla/xui-multi-select` |
|
|
51
|
+
| Radio | `@xsolla/xui-radio` |
|
|
52
|
+
| RadioGroup | `@xsolla/xui-radio-group` |
|
|
53
|
+
| Select | `@xsolla/xui-select` |
|
|
54
|
+
| Slider | `@xsolla/xui-slider` |
|
|
55
|
+
| Switch | `@xsolla/xui-switch` |
|
|
56
|
+
| Textarea | `@xsolla/xui-textarea` |
|
|
57
|
+
| ToggleButtonGroup | `@xsolla/xui-toggle-button-group` |
|
|
58
|
+
| Uploader | `@xsolla/xui-uploader` |
|
|
20
59
|
|
|
21
|
-
|
|
60
|
+
See each component's dedicated page for props, examples, and accessibility details.
|
|
22
61
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `@xsolla/xui-select`, `@xsolla/xui-multi-select`
|
|
31
|
-
- `@xsolla/xui-autocomplete`
|
|
32
|
-
- `@xsolla/xui-dropdown`
|
|
33
|
-
- `@xsolla/xui-textarea`
|
|
34
|
-
- `@xsolla/xui-uploader`
|
|
62
|
+
## Utilities
|
|
63
|
+
|
|
64
|
+
### `getMonthInLocale`
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
getMonthInLocale(month: number, locale?: CalendarLocaleType): string
|
|
68
|
+
```
|
|
35
69
|
|
|
36
|
-
|
|
70
|
+
Re-exported from `@xsolla/xui-calendar`. Returns the localised month name (`"LLLL"` format) for a 0-indexed month, using the supplied `date-fns` locale (defaults to the calendar's default locale).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-controls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.151.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"types": "./web/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -8,28 +8,28 @@
|
|
|
8
8
|
"build:native": "PLATFORM=native tsup"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@xsolla/xui-autocomplete": "0.
|
|
12
|
-
"@xsolla/xui-button": "0.
|
|
13
|
-
"@xsolla/xui-calendar": "0.
|
|
14
|
-
"@xsolla/xui-checkbox": "0.
|
|
15
|
-
"@xsolla/xui-checkbox-tag-group": "0.
|
|
16
|
-
"@xsolla/xui-date-picker": "0.
|
|
17
|
-
"@xsolla/xui-dropdown": "0.
|
|
18
|
-
"@xsolla/xui-input": "0.
|
|
19
|
-
"@xsolla/xui-input-copy": "0.
|
|
20
|
-
"@xsolla/xui-input-password": "0.
|
|
21
|
-
"@xsolla/xui-input-payment": "0.
|
|
22
|
-
"@xsolla/xui-input-phone": "0.
|
|
23
|
-
"@xsolla/xui-input-pin": "0.
|
|
24
|
-
"@xsolla/xui-multi-select": "0.
|
|
25
|
-
"@xsolla/xui-radio": "0.
|
|
26
|
-
"@xsolla/xui-radio-group": "0.
|
|
27
|
-
"@xsolla/xui-select": "0.
|
|
28
|
-
"@xsolla/xui-slider": "0.
|
|
29
|
-
"@xsolla/xui-switch": "0.
|
|
30
|
-
"@xsolla/xui-textarea": "0.
|
|
31
|
-
"@xsolla/xui-toggle-button-group": "0.
|
|
32
|
-
"@xsolla/xui-uploader": "0.
|
|
11
|
+
"@xsolla/xui-autocomplete": "0.151.0",
|
|
12
|
+
"@xsolla/xui-button": "0.151.0",
|
|
13
|
+
"@xsolla/xui-calendar": "0.151.0",
|
|
14
|
+
"@xsolla/xui-checkbox": "0.151.0",
|
|
15
|
+
"@xsolla/xui-checkbox-tag-group": "0.151.0",
|
|
16
|
+
"@xsolla/xui-date-picker": "0.151.0",
|
|
17
|
+
"@xsolla/xui-dropdown": "0.151.0",
|
|
18
|
+
"@xsolla/xui-input": "0.151.0",
|
|
19
|
+
"@xsolla/xui-input-copy": "0.151.0",
|
|
20
|
+
"@xsolla/xui-input-password": "0.151.0",
|
|
21
|
+
"@xsolla/xui-input-payment": "0.151.0",
|
|
22
|
+
"@xsolla/xui-input-phone": "0.151.0",
|
|
23
|
+
"@xsolla/xui-input-pin": "0.151.0",
|
|
24
|
+
"@xsolla/xui-multi-select": "0.151.0",
|
|
25
|
+
"@xsolla/xui-radio": "0.151.0",
|
|
26
|
+
"@xsolla/xui-radio-group": "0.151.0",
|
|
27
|
+
"@xsolla/xui-select": "0.151.0",
|
|
28
|
+
"@xsolla/xui-slider": "0.151.0",
|
|
29
|
+
"@xsolla/xui-switch": "0.151.0",
|
|
30
|
+
"@xsolla/xui-textarea": "0.151.0",
|
|
31
|
+
"@xsolla/xui-toggle-button-group": "0.151.0",
|
|
32
|
+
"@xsolla/xui-uploader": "0.151.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@vitest/coverage-v8": "^4.0.18",
|