@aleleba/ro-ut-ui 4.2.1 → 4.4.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/index.css +18 -4
- package/dist/index.js +1 -1
- package/dist/types/components/Avatars/Avatar/index.d.ts +34 -0
- package/dist/types/components/Avatars/index.d.ts +15 -0
- package/dist/types/components/Badges/Badge/index.d.ts +26 -0
- package/dist/types/components/Badges/index.d.ts +10 -0
- package/dist/types/components/Checkboxes/Checkbox/index.d.ts +49 -0
- package/dist/types/components/Checkboxes/CheckboxGroup/index.d.ts +63 -0
- package/dist/types/components/Checkboxes/index.d.ts +8 -0
- package/dist/types/components/DatePickers/DatePicker/index.d.ts +54 -0
- package/dist/types/components/DatePickers/index.d.ts +7 -0
- package/dist/types/components/IconButtons/IconButton/index.d.ts +46 -0
- package/dist/types/components/IconButtons/index.d.ts +30 -0
- package/dist/types/components/Icons/index.d.ts +4 -1
- package/dist/types/components/Links/Link/index.d.ts +37 -0
- package/dist/types/components/Links/index.d.ts +8 -0
- package/dist/types/components/Radios/Radio/index.d.ts +45 -0
- package/dist/types/components/Radios/RadioGroup/index.d.ts +63 -0
- package/dist/types/components/Radios/index.d.ts +8 -0
- package/dist/types/components/Ratings/Rating/index.d.ts +45 -0
- package/dist/types/components/Ratings/index.d.ts +15 -0
- package/dist/types/components/Selects/Select/index.d.ts +84 -0
- package/dist/types/components/Selects/index.d.ts +8 -0
- package/dist/types/components/Tags/Tag/index.d.ts +26 -0
- package/dist/types/components/Tags/index.d.ts +11 -0
- package/dist/types/components/Textareas/Textarea/index.d.ts +49 -0
- package/dist/types/components/Textareas/index.d.ts +9 -0
- package/dist/types/components/Toggles/Toggle/index.d.ts +41 -0
- package/dist/types/components/Toggles/index.d.ts +7 -0
- package/dist/types/components/index.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { RatingThemes, RatingSizes } from '..';
|
|
3
|
+
export type TRatingProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the rating.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the rating
|
|
14
|
+
*/
|
|
15
|
+
theme?: RatingThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the size of the rating stars
|
|
18
|
+
*/
|
|
19
|
+
size?: RatingSizes;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the rating value (controlled, supports halves)
|
|
22
|
+
*/
|
|
23
|
+
value?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the initial rating value (uncontrolled)
|
|
26
|
+
*/
|
|
27
|
+
defaultValue?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the maximum number of stars
|
|
30
|
+
*/
|
|
31
|
+
max?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the read-only state (no interaction)
|
|
34
|
+
*/
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the disabled state of the rating
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Is this the onChange event, called with the selected value
|
|
42
|
+
*/
|
|
43
|
+
onChange?: (value: number) => void;
|
|
44
|
+
};
|
|
45
|
+
export declare const Rating: FC<TRatingProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum RatingThemes {
|
|
2
|
+
primary = "primary"
|
|
3
|
+
}
|
|
4
|
+
export declare enum RatingSizes {
|
|
5
|
+
sm = "sm",
|
|
6
|
+
md = "md",
|
|
7
|
+
lg = "lg"
|
|
8
|
+
}
|
|
9
|
+
export declare const getRatingThemeClass: ({ theme }: {
|
|
10
|
+
theme: RatingThemes;
|
|
11
|
+
}) => string;
|
|
12
|
+
export declare const getRatingSizeClass: ({ size }: {
|
|
13
|
+
size: RatingSizes;
|
|
14
|
+
}) => string;
|
|
15
|
+
export * from './Rating';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconNames } from '@components';
|
|
3
|
+
import { SelectThemes } from '..';
|
|
4
|
+
export type TSelectOption = {
|
|
5
|
+
/**
|
|
6
|
+
* Is this the visible label of the option
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Is this the value of the option
|
|
11
|
+
*/
|
|
12
|
+
value: string;
|
|
13
|
+
/**
|
|
14
|
+
* Is this the disabled state of the option
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type TSelectProps = {
|
|
19
|
+
/**
|
|
20
|
+
* Is this the id of the select.
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Is this the classes that you want to add
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Is this the theme you want to add to the select
|
|
29
|
+
*/
|
|
30
|
+
theme?: SelectThemes;
|
|
31
|
+
/**
|
|
32
|
+
* Is this the list of options of the select
|
|
33
|
+
*/
|
|
34
|
+
options?: TSelectOption[];
|
|
35
|
+
/**
|
|
36
|
+
* Is this the value if the select allows checking several options at once
|
|
37
|
+
*/
|
|
38
|
+
multiple?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Is this the selected value of the select (controlled, single mode)
|
|
41
|
+
*/
|
|
42
|
+
value?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Is this the initial selected value of the select (uncontrolled, single mode)
|
|
45
|
+
*/
|
|
46
|
+
defaultValue?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Is this the list of selected values of the select (controlled, multiple mode)
|
|
49
|
+
*/
|
|
50
|
+
values?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Is this the initial list of selected values of the select (uncontrolled, multiple mode)
|
|
53
|
+
*/
|
|
54
|
+
defaultValues?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* Is this the text shown when there is no selected value
|
|
57
|
+
*/
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Is this the value if the select allows filtering options by text
|
|
61
|
+
*/
|
|
62
|
+
searchable?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Is this the icon shown at the left of the select
|
|
65
|
+
*/
|
|
66
|
+
icon?: IconNames;
|
|
67
|
+
/**
|
|
68
|
+
* Is this the message shown when no option matches the search
|
|
69
|
+
*/
|
|
70
|
+
emptyMessage?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Is this the value if the select have hard border
|
|
73
|
+
*/
|
|
74
|
+
hardBorder?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Is this the disabled state of the select
|
|
77
|
+
*/
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Is this the onChange event of the select, called with the selected value (single mode) or the list of selected values (multiple mode)
|
|
81
|
+
*/
|
|
82
|
+
onChange?: (value: string | string[]) => void;
|
|
83
|
+
};
|
|
84
|
+
export declare const Select: FC<TSelectProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconNames } from '@components';
|
|
3
|
+
import { TagThemes } from '..';
|
|
4
|
+
export type TTagProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Is this the id of the tag.
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Is this the classes that you want to add
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Is this the theme (color) you want to add to the tag
|
|
15
|
+
*/
|
|
16
|
+
theme?: TagThemes;
|
|
17
|
+
/**
|
|
18
|
+
* Is this the icon shown inside the tag
|
|
19
|
+
*/
|
|
20
|
+
icon: IconNames;
|
|
21
|
+
/**
|
|
22
|
+
* Is this the optional label shown below the tag box
|
|
23
|
+
*/
|
|
24
|
+
label?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const Tag: FC<TTagProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum TagThemes {
|
|
2
|
+
primary = "primary",
|
|
3
|
+
secondary = "secondary",
|
|
4
|
+
tertiary = "tertiary",
|
|
5
|
+
quaternary = "quaternary",
|
|
6
|
+
quinary = "quinary"
|
|
7
|
+
}
|
|
8
|
+
export declare const getTagThemeClass: ({ theme }: {
|
|
9
|
+
theme: TagThemes;
|
|
10
|
+
}) => string;
|
|
11
|
+
export * from './Tag';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ChangeEventHandler } from 'react';
|
|
2
|
+
import { TextareaThemes } from '..';
|
|
3
|
+
export type TTextareaProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the textarea.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the textarea
|
|
14
|
+
*/
|
|
15
|
+
theme?: TextareaThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the value of the textarea (controlled)
|
|
18
|
+
*/
|
|
19
|
+
value?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the initial value of the textarea (uncontrolled)
|
|
22
|
+
*/
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the text you want to add to the textarea placeholder
|
|
26
|
+
*/
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the number of visible text lines of the textarea
|
|
30
|
+
*/
|
|
31
|
+
rows?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the value if the textarea grows automatically with its content
|
|
34
|
+
*/
|
|
35
|
+
autoResize?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the value if the textarea have hard border
|
|
38
|
+
*/
|
|
39
|
+
hardBorder?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Is this the disabled state of the textarea
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Is this the onChange event of the textarea
|
|
46
|
+
*/
|
|
47
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
48
|
+
};
|
|
49
|
+
export declare const Textarea: FC<TTextareaProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ToggleThemes } from '..';
|
|
3
|
+
export type TToggleProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the toggle button.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the toggle
|
|
14
|
+
*/
|
|
15
|
+
theme?: ToggleThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the checked state of the toggle (controlled)
|
|
18
|
+
*/
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the initial checked state of the toggle (uncontrolled)
|
|
22
|
+
*/
|
|
23
|
+
defaultChecked?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the optional label shown at the left of the toggle
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the text shown inside the toggle pill
|
|
30
|
+
*/
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the disabled state of the toggle
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the onChange event of the toggle, called with the next checked state
|
|
38
|
+
*/
|
|
39
|
+
onChange?: (checked: boolean) => void;
|
|
40
|
+
};
|
|
41
|
+
export declare const Toggle: FC<TToggleProps>;
|
|
@@ -4,3 +4,15 @@ export * from './Buttons';
|
|
|
4
4
|
export * from './Cards';
|
|
5
5
|
export * from './Inputs';
|
|
6
6
|
export * from './Navbar';
|
|
7
|
+
export * from './Radios';
|
|
8
|
+
export * from './Checkboxes';
|
|
9
|
+
export * from './Toggles';
|
|
10
|
+
export * from './Textareas';
|
|
11
|
+
export * from './Selects';
|
|
12
|
+
export * from './DatePickers';
|
|
13
|
+
export * from './Avatars';
|
|
14
|
+
export * from './Badges';
|
|
15
|
+
export * from './Tags';
|
|
16
|
+
export * from './IconButtons';
|
|
17
|
+
export * from './Links';
|
|
18
|
+
export * from './Ratings';
|