@aveonline/ui-react 1.8.1 → 1.8.3
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/components/molecules/Card/Select/ISelect.d.ts +1 -1
- package/dist/components/molecules/Field/IField.d.ts +3 -1
- package/dist/components/molecules/Field/IFieldCustom.d.ts +86 -0
- package/dist/components/molecules/Flag/IFlag.d.ts +1 -1
- package/dist/components/molecules/Selectable/AsyncCreatableSelect/IAsyncCreatableSelect.d.ts +0 -2
- package/dist/components/molecules/Selectable/AsyncSelect/AsyncSelect.d.ts +1 -1
- package/dist/components/molecules/Selectable/Select/ISelect.d.ts +2 -0
- package/dist/components/molecules/Selectable/Select/Select.d.ts +1 -1
- package/dist/components/molecules/Selectable/SelectButton/SelectButton.d.ts +1 -1
- package/dist/components/molecules/Selectable/SelectCountry/SelectCountry.d.ts +1 -1
- package/dist/ui-react.mjs +1677 -1655
- package/dist/ui-react.umd.js +22 -22
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IKind } from '../../atoms/Icon';
|
|
2
2
|
import { ITooltipProps } from '../../atoms/Tooltip/ITooltip';
|
|
3
|
+
import type { IFieldCustom } from './IFieldCustom';
|
|
3
4
|
export interface IField {
|
|
4
5
|
/**
|
|
5
6
|
* ID available for link form
|
|
@@ -78,5 +79,6 @@ export interface IField {
|
|
|
78
79
|
/**
|
|
79
80
|
* Types input custom
|
|
80
81
|
*/
|
|
81
|
-
variant?: 'currency' | '';
|
|
82
|
+
variant?: 'currency' | 'custom' | '';
|
|
83
|
+
custom?: IFieldCustom;
|
|
82
84
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare type IFieldCustom = {
|
|
2
|
+
/**
|
|
3
|
+
* Allow decimals
|
|
4
|
+
*
|
|
5
|
+
* Default = true
|
|
6
|
+
*/
|
|
7
|
+
allowDecimals?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Allow user to enter negative value
|
|
10
|
+
*
|
|
11
|
+
* Default = true
|
|
12
|
+
*/
|
|
13
|
+
allowNegativeValue?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum characters the user can enter
|
|
16
|
+
*/
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Class names
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Limit length of decimals allowed
|
|
24
|
+
*
|
|
25
|
+
* Default = 2
|
|
26
|
+
*/
|
|
27
|
+
decimalsLimit?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Specify decimal scale for padding/trimming
|
|
30
|
+
*
|
|
31
|
+
* Example:
|
|
32
|
+
* 1.5 -> 1.50
|
|
33
|
+
* 1.234 -> 1.23
|
|
34
|
+
*/
|
|
35
|
+
decimalScale?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Value will always have the specified length of decimals
|
|
38
|
+
*
|
|
39
|
+
* Example:
|
|
40
|
+
* 123 -> 1.23
|
|
41
|
+
*
|
|
42
|
+
* Note: This formatting only happens onBlur
|
|
43
|
+
*/
|
|
44
|
+
fixedDecimalLength?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Include a prefix eg. £
|
|
47
|
+
*/
|
|
48
|
+
prefix?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Include a suffix eg. €
|
|
51
|
+
*/
|
|
52
|
+
suffix?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Incremental value change on arrow down and arrow up key press
|
|
55
|
+
*/
|
|
56
|
+
step?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Separator between integer part and fractional part of value.
|
|
59
|
+
*
|
|
60
|
+
* This cannot be a number
|
|
61
|
+
*/
|
|
62
|
+
decimalSeparator?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Separator between thousand, million and billion
|
|
65
|
+
*
|
|
66
|
+
* This cannot be a number
|
|
67
|
+
*/
|
|
68
|
+
groupSeparator?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Disable auto adding separator between values eg. 1000 -> 1,000
|
|
71
|
+
*
|
|
72
|
+
* Default = false
|
|
73
|
+
*/
|
|
74
|
+
disableGroupSeparators?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Disable abbreviations (m, k, b)
|
|
77
|
+
*
|
|
78
|
+
* Default = false
|
|
79
|
+
*/
|
|
80
|
+
disableAbbreviations?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Transform the raw value form the input before parsing
|
|
83
|
+
*/
|
|
84
|
+
transformRawValue?: (rawValue: string) => string;
|
|
85
|
+
};
|
|
86
|
+
export type { IFieldCustom };
|
package/dist/components/molecules/Selectable/AsyncCreatableSelect/IAsyncCreatableSelect.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IKindLogo } from '@/components/atoms/Logo';
|
|
2
1
|
import type { ISelect, IOption } from '../Select';
|
|
3
2
|
export interface IAsyncCreatableSelect extends Omit<ISelect, 'options'> {
|
|
4
3
|
/**
|
|
@@ -18,5 +17,4 @@ export interface IAsyncCreatableSelect extends Omit<ISelect, 'options'> {
|
|
|
18
17
|
allowCreateWhileLoading?: boolean;
|
|
19
18
|
/** Sets the position of the createOption element in your options list. Defaults to 'last' */
|
|
20
19
|
createOptionPosition?: 'first' | 'last';
|
|
21
|
-
logo?: IKindLogo;
|
|
22
20
|
}
|
|
@@ -3,5 +3,5 @@ import type { IAsyncSelect } from './IAsyncSelect';
|
|
|
3
3
|
* Molecule: AsyncSelect
|
|
4
4
|
* Async select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface. Data from network
|
|
5
5
|
*/
|
|
6
|
-
declare function AsyncSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, isLoading, loadOptions, isError, showErrorText, onBlur, value, menuIsOpen, instanceId, loadingMessage, noOptionsMessage }: IAsyncSelect): JSX.Element;
|
|
6
|
+
declare function AsyncSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, isLoading, loadOptions, isError, showErrorText, onBlur, value, menuIsOpen, instanceId, loadingMessage, noOptionsMessage, logo }: IAsyncSelect): JSX.Element;
|
|
7
7
|
export default AsyncSelect;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FocusEventHandler } from 'react';
|
|
2
|
+
import { IKindLogo } from '../../..';
|
|
2
3
|
export declare type IOption = {
|
|
3
4
|
label: string | number;
|
|
4
5
|
value: string | number;
|
|
@@ -72,4 +73,5 @@ export interface ISelect {
|
|
|
72
73
|
value?: any;
|
|
73
74
|
loadingMessage?: string;
|
|
74
75
|
noOptionsMessage?: string;
|
|
76
|
+
logo?: IKindLogo;
|
|
75
77
|
}
|
|
@@ -3,5 +3,5 @@ import type { ISelect } from './ISelect';
|
|
|
3
3
|
* Atom: Select
|
|
4
4
|
* Select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
|
|
5
5
|
*/
|
|
6
|
-
declare function Select({ options, placeholder, defaultValue, isDisabled, id, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, error, isError, showErrorText, onBlur, value, instanceId, menuIsOpen, loadingMessage, noOptionsMessage }: ISelect): JSX.Element;
|
|
6
|
+
declare function Select({ options, placeholder, defaultValue, isDisabled, id, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, error, isError, showErrorText, onBlur, value, instanceId, menuIsOpen, loadingMessage, noOptionsMessage, logo }: ISelect): JSX.Element;
|
|
7
7
|
export default Select;
|
|
@@ -3,5 +3,5 @@ import type { ISelectButton } from './ISelectButton';
|
|
|
3
3
|
* Molecule: SelectButton
|
|
4
4
|
* Select with button for first item lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
|
|
5
5
|
*/
|
|
6
|
-
declare function SelectButton({ options, placeholder, defaultValue, isDisabled, id, error, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, alignButton, onClickFirstItem, isError, showErrorText, onBlur, menuIsOpen, instanceId, value, loadingMessage, noOptionsMessage }: ISelectButton): JSX.Element;
|
|
6
|
+
declare function SelectButton({ options, placeholder, defaultValue, isDisabled, id, error, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, alignButton, onClickFirstItem, isError, showErrorText, onBlur, menuIsOpen, instanceId, value, loadingMessage, noOptionsMessage, logo }: ISelectButton): JSX.Element;
|
|
7
7
|
export default SelectButton;
|
|
@@ -3,5 +3,5 @@ import { ISelect } from '../Select/ISelect';
|
|
|
3
3
|
* Molecule: SelectCountry
|
|
4
4
|
* Select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
|
|
5
5
|
*/
|
|
6
|
-
declare function SelectCountry({ id, name, placeholder, options, defaultValue, isDisabled, error, isSearchable, helpText, onChange, isClearable, isError, showErrorText, onBlur, menuIsOpen, value, instanceId, loadingMessage, noOptionsMessage }: ISelect): JSX.Element;
|
|
6
|
+
declare function SelectCountry({ id, name, placeholder, options, defaultValue, isDisabled, error, isSearchable, helpText, onChange, isClearable, isError, showErrorText, onBlur, menuIsOpen, value, instanceId, loadingMessage, noOptionsMessage, logo }: ISelect): JSX.Element;
|
|
7
7
|
export default SelectCountry;
|