@peculiar/react-components 0.6.7 → 1.0.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/dist/cjs/Chip/chip.js +1 -3
- package/dist/cjs/Chip/chip.js.map +1 -1
- package/dist/cjs/NativeSelect/index.js +6 -0
- package/dist/cjs/NativeSelect/index.js.map +1 -0
- package/dist/cjs/NativeSelect/native_select.js +151 -0
- package/dist/cjs/NativeSelect/native_select.js.map +1 -0
- package/dist/cjs/Select/select.js +170 -53
- package/dist/cjs/Select/select.js.map +1 -1
- package/dist/cjs/Toast/toast.js +1 -1
- package/dist/cjs/Toast/toast.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Chip/chip.js +1 -3
- package/dist/esm/Chip/chip.js.map +1 -1
- package/dist/esm/NativeSelect/index.js +2 -0
- package/dist/esm/NativeSelect/index.js.map +1 -0
- package/dist/esm/NativeSelect/native_select.js +122 -0
- package/dist/esm/NativeSelect/native_select.js.map +1 -0
- package/dist/esm/Select/select.js +169 -30
- package/dist/esm/Select/select.js.map +1 -1
- package/dist/esm/Toast/toast.js +1 -1
- package/dist/esm/Toast/toast.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esnext/Chip/chip.js +1 -2
- package/dist/esnext/Chip/chip.js.map +1 -1
- package/dist/esnext/NativeSelect/index.js +2 -0
- package/dist/esnext/NativeSelect/index.js.map +1 -0
- package/dist/esnext/NativeSelect/native_select.js +129 -0
- package/dist/esnext/NativeSelect/native_select.js.map +1 -0
- package/dist/esnext/Select/select.js +184 -44
- package/dist/esnext/Select/select.js.map +1 -1
- package/dist/esnext/Toast/toast.js +1 -1
- package/dist/esnext/Toast/toast.js.map +1 -1
- package/dist/esnext/index.js +2 -2
- package/dist/esnext/index.js.map +1 -1
- package/dist/types/NativeSelect/index.d.ts +1 -0
- package/dist/types/NativeSelect/native_select.d.ts +76 -0
- package/dist/types/Select/select.d.ts +65 -33
- package/dist/types/index.d.ts +2 -2
- package/package.json +5 -5
- package/dist/cjs/Autocomplete/autocomplete.js +0 -269
- package/dist/cjs/Autocomplete/autocomplete.js.map +0 -1
- package/dist/cjs/Autocomplete/index.js +0 -6
- package/dist/cjs/Autocomplete/index.js.map +0 -1
- package/dist/esm/Autocomplete/autocomplete.js +0 -262
- package/dist/esm/Autocomplete/autocomplete.js.map +0 -1
- package/dist/esm/Autocomplete/index.js +0 -2
- package/dist/esm/Autocomplete/index.js.map +0 -1
- package/dist/esnext/Autocomplete/autocomplete.js +0 -272
- package/dist/esnext/Autocomplete/autocomplete.js.map +0 -1
- package/dist/esnext/Autocomplete/index.js +0 -2
- package/dist/esnext/Autocomplete/index.js.map +0 -1
- package/dist/types/Autocomplete/autocomplete.d.ts +0 -108
- package/dist/types/Autocomplete/index.d.ts +0 -1
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UseAutocompleteProps, UseAutocompleteReturnType, AutocompleteValue } from '../hooks';
|
|
3
|
-
/**
|
|
4
|
-
* Types.
|
|
5
|
-
*/
|
|
6
|
-
export declare type AutocompleteRenderGroupParams = {
|
|
7
|
-
key: string | number;
|
|
8
|
-
group: string;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
};
|
|
11
|
-
export declare type AutocompleteOwnProps<T, Multiple extends boolean | undefined = undefined> = UseAutocompleteProps<T, Multiple> & {
|
|
12
|
-
/**
|
|
13
|
-
* The className of the component.
|
|
14
|
-
*/
|
|
15
|
-
className?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The size of the root component.
|
|
18
|
-
*/
|
|
19
|
-
size?: ('small' | 'medium' | 'large');
|
|
20
|
-
/**
|
|
21
|
-
* The short hint displayed in the `input` before the user enters a value.
|
|
22
|
-
*/
|
|
23
|
-
placeholder?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The label content.
|
|
26
|
-
*/
|
|
27
|
-
label?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Text to display when there are no options.
|
|
30
|
-
*/
|
|
31
|
-
noOptionsText?: React.ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
* If `true`, the component is in a loading state.
|
|
34
|
-
* This shows the `loadingText` in place of suggestions (only if there are no
|
|
35
|
-
* suggestions to show, e.g. `options` are empty).
|
|
36
|
-
*/
|
|
37
|
-
loading?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Text to display when in a loading state.
|
|
40
|
-
*/
|
|
41
|
-
loadingText?: React.ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* The maximum number of tags that will be visible when not focused.
|
|
44
|
-
*/
|
|
45
|
-
limitTags?: number;
|
|
46
|
-
/**
|
|
47
|
-
* If `true`, the popup search input will be hidden.
|
|
48
|
-
*/
|
|
49
|
-
disableSearch?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* If `true`, the autocomplete will be disabled.
|
|
52
|
-
*/
|
|
53
|
-
disabled?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Name attribute of the `input` element.
|
|
56
|
-
*/
|
|
57
|
-
name?: string;
|
|
58
|
-
/**
|
|
59
|
-
* If `true`, the `input` element is required.
|
|
60
|
-
*/
|
|
61
|
-
required?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Text to display when in the create button element.
|
|
64
|
-
*/
|
|
65
|
-
createOptionText?: string;
|
|
66
|
-
/**
|
|
67
|
-
* If `true`, the create button element will be shown.
|
|
68
|
-
*/
|
|
69
|
-
allowCreateOption?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* If `true`, the `input` will indicate an error.
|
|
72
|
-
*/
|
|
73
|
-
error?: boolean;
|
|
74
|
-
errorText?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Render the root element.
|
|
77
|
-
*/
|
|
78
|
-
renderRoot?: (props: object, value: AutocompleteValue<T, Multiple>, getTagProps: UseAutocompleteReturnType<T, Multiple>['getTagProps']) => React.ReactNode;
|
|
79
|
-
/**
|
|
80
|
-
* Render the option, use `getOptionLabel` by default.
|
|
81
|
-
*/
|
|
82
|
-
renderOption?: (props: object, option: T) => React.ReactNode;
|
|
83
|
-
/**
|
|
84
|
-
* The label to display when the tags are truncated (`limitTags`).
|
|
85
|
-
*/
|
|
86
|
-
getLimitTagsText?: (more: number) => string;
|
|
87
|
-
/**
|
|
88
|
-
* Callback fired when the create button clicked.
|
|
89
|
-
*/
|
|
90
|
-
onCreate?: (event: React.SyntheticEvent, value: string) => void;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
export declare const Autocomplete: {
|
|
96
|
-
<T, Multiple extends boolean = false>(props: AutocompleteOwnProps<T, Multiple>): JSX.Element;
|
|
97
|
-
defaultProps: {
|
|
98
|
-
disableSearch: boolean;
|
|
99
|
-
noOptionsText: string;
|
|
100
|
-
loading: boolean;
|
|
101
|
-
loadingText: string;
|
|
102
|
-
limitTags: number;
|
|
103
|
-
required: boolean;
|
|
104
|
-
allowCreateOption: boolean;
|
|
105
|
-
createOptionText: string;
|
|
106
|
-
size: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Autocomplete } from './autocomplete';
|