@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.
Files changed (31) hide show
  1. package/dist/index.css +18 -4
  2. package/dist/index.js +1 -1
  3. package/dist/types/components/Avatars/Avatar/index.d.ts +34 -0
  4. package/dist/types/components/Avatars/index.d.ts +15 -0
  5. package/dist/types/components/Badges/Badge/index.d.ts +26 -0
  6. package/dist/types/components/Badges/index.d.ts +10 -0
  7. package/dist/types/components/Checkboxes/Checkbox/index.d.ts +49 -0
  8. package/dist/types/components/Checkboxes/CheckboxGroup/index.d.ts +63 -0
  9. package/dist/types/components/Checkboxes/index.d.ts +8 -0
  10. package/dist/types/components/DatePickers/DatePicker/index.d.ts +54 -0
  11. package/dist/types/components/DatePickers/index.d.ts +7 -0
  12. package/dist/types/components/IconButtons/IconButton/index.d.ts +46 -0
  13. package/dist/types/components/IconButtons/index.d.ts +30 -0
  14. package/dist/types/components/Icons/index.d.ts +4 -1
  15. package/dist/types/components/Links/Link/index.d.ts +37 -0
  16. package/dist/types/components/Links/index.d.ts +8 -0
  17. package/dist/types/components/Radios/Radio/index.d.ts +45 -0
  18. package/dist/types/components/Radios/RadioGroup/index.d.ts +63 -0
  19. package/dist/types/components/Radios/index.d.ts +8 -0
  20. package/dist/types/components/Ratings/Rating/index.d.ts +45 -0
  21. package/dist/types/components/Ratings/index.d.ts +15 -0
  22. package/dist/types/components/Selects/Select/index.d.ts +84 -0
  23. package/dist/types/components/Selects/index.d.ts +8 -0
  24. package/dist/types/components/Tags/Tag/index.d.ts +26 -0
  25. package/dist/types/components/Tags/index.d.ts +11 -0
  26. package/dist/types/components/Textareas/Textarea/index.d.ts +49 -0
  27. package/dist/types/components/Textareas/index.d.ts +9 -0
  28. package/dist/types/components/Toggles/Toggle/index.d.ts +41 -0
  29. package/dist/types/components/Toggles/index.d.ts +7 -0
  30. package/dist/types/components/index.d.ts +12 -0
  31. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ export declare enum RadioThemes {
2
+ primary = "primary"
3
+ }
4
+ export declare const getRadioThemeClass: ({ theme }: {
5
+ theme: RadioThemes;
6
+ }) => string;
7
+ export * from './Radio';
8
+ export * from './RadioGroup';
@@ -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,8 @@
1
+ export declare enum SelectThemes {
2
+ primary = "primary",
3
+ dark = "dark"
4
+ }
5
+ export declare const getSelectThemeClass: ({ theme }: {
6
+ theme: SelectThemes;
7
+ }) => string;
8
+ export * from './Select';
@@ -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,9 @@
1
+ export declare enum TextareaThemes {
2
+ primary = "primary",
3
+ secondary = "secondary",
4
+ tertiary = "tertiary"
5
+ }
6
+ export declare const getTextareaThemeClass: ({ theme }: {
7
+ theme: TextareaThemes;
8
+ }) => string;
9
+ export * from './Textarea';
@@ -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>;
@@ -0,0 +1,7 @@
1
+ export declare enum ToggleThemes {
2
+ primary = "primary"
3
+ }
4
+ export declare const getToggleThemeClass: ({ theme }: {
5
+ theme: ToggleThemes;
6
+ }) => string;
7
+ export * from './Toggle';
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleleba/ro-ut-ui",
3
- "version": "4.2.1",
3
+ "version": "4.4.0",
4
4
  "description": "UI Component for Ro-ut App",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/components/index.d.ts",