@aleleba/ro-ut-ui 4.3.0 → 4.5.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 (28) hide show
  1. package/dist/index.css +15 -3
  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/Carousels/Carousel/index.d.ts +57 -0
  8. package/dist/types/components/Carousels/index.d.ts +7 -0
  9. package/dist/types/components/DropdownMenus/DropdownMenu/index.d.ts +60 -0
  10. package/dist/types/components/DropdownMenus/index.d.ts +11 -0
  11. package/dist/types/components/IconButtons/IconButton/index.d.ts +46 -0
  12. package/dist/types/components/IconButtons/index.d.ts +31 -0
  13. package/dist/types/components/Icons/index.d.ts +2 -1
  14. package/dist/types/components/Links/Link/index.d.ts +37 -0
  15. package/dist/types/components/Links/index.d.ts +8 -0
  16. package/dist/types/components/Ratings/Rating/index.d.ts +45 -0
  17. package/dist/types/components/Ratings/index.d.ts +15 -0
  18. package/dist/types/components/SelectableTiles/SelectableTile/index.d.ts +46 -0
  19. package/dist/types/components/SelectableTiles/SelectableTileGroup/index.d.ts +79 -0
  20. package/dist/types/components/SelectableTiles/index.d.ts +8 -0
  21. package/dist/types/components/Tables/Table/index.d.ts +60 -0
  22. package/dist/types/components/Tables/index.d.ts +7 -0
  23. package/dist/types/components/Tabs/Tabs/index.d.ts +52 -0
  24. package/dist/types/components/Tabs/index.d.ts +8 -0
  25. package/dist/types/components/Tags/Tag/index.d.ts +26 -0
  26. package/dist/types/components/Tags/index.d.ts +11 -0
  27. package/dist/types/components/index.d.ts +11 -0
  28. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ import { FC } from 'react';
2
+ import { IconNames } from '@components';
3
+ import { SelectableTileThemes } from '..';
4
+ export type TSelectableTileProps = {
5
+ /**
6
+ * Is this the id of the selectable tile.
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 you want to add to the selectable tile
15
+ */
16
+ theme?: SelectableTileThemes;
17
+ /**
18
+ * Is this the icon shown inside the tile
19
+ */
20
+ icon: IconNames;
21
+ /**
22
+ * Is this the label shown under the icon
23
+ */
24
+ label?: string;
25
+ /**
26
+ * Is this the secondary label shown under the label
27
+ */
28
+ sublabel?: string;
29
+ /**
30
+ * Is this the value of the tile (passed to onSelect)
31
+ */
32
+ value?: string;
33
+ /**
34
+ * Is this the selected state of the tile
35
+ */
36
+ selected?: boolean;
37
+ /**
38
+ * Is this the disabled state of the tile
39
+ */
40
+ disabled?: boolean;
41
+ /**
42
+ * Is this the onSelect event of the tile, called with the value of the tile
43
+ */
44
+ onSelect?: (value?: string) => void;
45
+ };
46
+ export declare const SelectableTile: FC<TSelectableTileProps>;
@@ -0,0 +1,79 @@
1
+ import { IconNames } from '@components';
2
+ import { SelectableTileThemes } from '..';
3
+ export declare enum SelectableTileGroupDirections {
4
+ horizontal = "horizontal",
5
+ vertical = "vertical"
6
+ }
7
+ export type TSelectableTileOption = {
8
+ /**
9
+ * Is this the icon shown inside the tile
10
+ */
11
+ icon: IconNames;
12
+ /**
13
+ * Is this the value of the tile
14
+ */
15
+ value: string;
16
+ /**
17
+ * Is this the label shown under the icon
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Is this the secondary label shown under the label
22
+ */
23
+ sublabel?: string;
24
+ /**
25
+ * Is this the disabled state of the tile
26
+ */
27
+ disabled?: boolean;
28
+ };
29
+ export type TSelectableTileGroupProps = {
30
+ /**
31
+ * Is this the id of the selectable tile group.
32
+ */
33
+ id?: string;
34
+ /**
35
+ * Is this the classes that you want to add
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Is this the theme you want to add to the tiles
40
+ */
41
+ theme?: SelectableTileThemes;
42
+ /**
43
+ * Is this the list of options of the group
44
+ */
45
+ options?: TSelectableTileOption[];
46
+ /**
47
+ * Is this the value if the group allows selecting several tiles at once
48
+ */
49
+ multiple?: boolean;
50
+ /**
51
+ * Is this the selected value of the group (controlled, single mode)
52
+ */
53
+ value?: string;
54
+ /**
55
+ * Is this the initial selected value of the group (uncontrolled, single mode)
56
+ */
57
+ defaultValue?: string;
58
+ /**
59
+ * Is this the list of selected values of the group (controlled, multiple mode)
60
+ */
61
+ values?: string[];
62
+ /**
63
+ * Is this the initial list of selected values of the group (uncontrolled, multiple mode)
64
+ */
65
+ defaultValues?: string[];
66
+ /**
67
+ * Is this the layout direction of the group
68
+ */
69
+ direction?: SelectableTileGroupDirections;
70
+ /**
71
+ * Is this the disabled state of the whole group
72
+ */
73
+ disabled?: boolean;
74
+ /**
75
+ * Is this the onChange event of the group, called with the selected value (single mode) or the list of selected values (multiple mode)
76
+ */
77
+ onChange?: (value: string | string[]) => void;
78
+ };
79
+ export declare const SelectableTileGroup: ({ id, className, theme, options, multiple, value, defaultValue, values, defaultValues, direction, disabled, onChange, }: TSelectableTileGroupProps) => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare enum SelectableTileThemes {
2
+ primary = "primary"
3
+ }
4
+ export declare const getSelectableTileThemeClass: ({ theme }: {
5
+ theme: SelectableTileThemes;
6
+ }) => string;
7
+ export * from './SelectableTile';
8
+ export * from './SelectableTileGroup';
@@ -0,0 +1,60 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { TableThemes } from '..';
3
+ export type TTableAlign = 'left' | 'center' | 'right';
4
+ export type TTableColumn<T> = {
5
+ /**
6
+ * Is this the unique key of the column
7
+ */
8
+ key: string;
9
+ /**
10
+ * Is this the content shown in the header cell of the column
11
+ */
12
+ header: ReactNode;
13
+ /**
14
+ * Is this the custom renderer for the cell of the column; receives the row
15
+ */
16
+ render?: (row: T) => ReactNode;
17
+ /**
18
+ * Is this the horizontal alignment of the column cells
19
+ */
20
+ align?: TTableAlign;
21
+ /**
22
+ * Is this the fixed width of the column (px number or any CSS width)
23
+ */
24
+ width?: string | number;
25
+ };
26
+ export type TTableProps<T> = {
27
+ /**
28
+ * Is this the id of the table.
29
+ */
30
+ id?: string;
31
+ /**
32
+ * Is this the classes that you want to add
33
+ */
34
+ className?: string;
35
+ /**
36
+ * Is this the theme you want to add to the table
37
+ */
38
+ theme?: TableThemes;
39
+ /**
40
+ * Is this the list of columns of the table
41
+ */
42
+ columns: TTableColumn<T>[];
43
+ /**
44
+ * Is this the list of rows of the table
45
+ */
46
+ data: T[];
47
+ /**
48
+ * Is this the function that returns the unique key of a row
49
+ */
50
+ rowKey: (row: T) => string;
51
+ /**
52
+ * Is this the onClick event of a row, called with the clicked row
53
+ */
54
+ onRowClick?: (row: T) => void;
55
+ /**
56
+ * Is this the message shown when there are no rows
57
+ */
58
+ emptyMessage?: string;
59
+ };
60
+ export declare const Table: <T>({ id, className, theme, columns, data, rowKey, onRowClick, emptyMessage, }: TTableProps<T>) => ReactElement;
@@ -0,0 +1,7 @@
1
+ export declare enum TableThemes {
2
+ primary = "primary"
3
+ }
4
+ export declare const getTableThemeClass: ({ theme }: {
5
+ theme: TableThemes;
6
+ }) => string;
7
+ export * from './Table';
@@ -0,0 +1,52 @@
1
+ import { FC } from 'react';
2
+ import { IconNames } from '@components';
3
+ import { TabsVariants } from '..';
4
+ export type TTab = {
5
+ /**
6
+ * Is this the value of the tab
7
+ */
8
+ value: string;
9
+ /**
10
+ * Is this the visible label of the tab
11
+ */
12
+ label: string;
13
+ /**
14
+ * Is this the icon shown in the tab
15
+ */
16
+ icon?: IconNames;
17
+ /**
18
+ * Is this the disabled state of the tab
19
+ */
20
+ disabled?: boolean;
21
+ };
22
+ export type TTabsProps = {
23
+ /**
24
+ * Is this the id of the tabs.
25
+ */
26
+ id?: string;
27
+ /**
28
+ * Is this the classes that you want to add
29
+ */
30
+ className?: string;
31
+ /**
32
+ * Is this the variant of the tabs
33
+ */
34
+ variant?: TabsVariants;
35
+ /**
36
+ * Is this the list of tabs
37
+ */
38
+ tabs: TTab[];
39
+ /**
40
+ * Is this the value of the active tab (controlled)
41
+ */
42
+ active?: string;
43
+ /**
44
+ * Is this the value of the initially active tab (uncontrolled)
45
+ */
46
+ defaultActive?: string;
47
+ /**
48
+ * Is this the onChange event of the tabs, called with the value of the selected tab
49
+ */
50
+ onChange?: (value: string) => void;
51
+ };
52
+ export declare const Tabs: FC<TTabsProps>;
@@ -0,0 +1,8 @@
1
+ export declare enum TabsVariants {
2
+ iconTab = "iconTab",
3
+ segmented = "segmented"
4
+ }
5
+ export declare const getTabsVariantClass: ({ variant }: {
6
+ variant: TabsVariants;
7
+ }) => string;
8
+ export * from './Tabs';
@@ -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';
@@ -10,3 +10,14 @@ export * from './Toggles';
10
10
  export * from './Textareas';
11
11
  export * from './Selects';
12
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';
19
+ export * from './Tables';
20
+ export * from './SelectableTiles';
21
+ export * from './Carousels';
22
+ export * from './DropdownMenus';
23
+ export * from './Tabs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleleba/ro-ut-ui",
3
- "version": "4.3.0",
3
+ "version": "4.5.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",