@integrigo/integrigo-ui 1.6.14 → 1.6.15
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/lib/index.d.ts +23 -2
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/src/components/atoms/Avatar/Avatar.stories.d.ts +2 -2
- package/lib/src/components/atoms/Dot/Dot.stories.d.ts +3 -3
- package/lib/src/components/atoms/Icon/Icon.d.ts +35 -35
- package/lib/src/components/atoms/Initials/Initials.stories.d.ts +2 -2
- package/lib/src/components/molecules/Checkbox/Checkbox.stories.d.ts +4 -4
- package/lib/src/components/molecules/Input/Input.stories.d.ts +9 -9
- package/lib/src/components/molecules/Profile/Profile.stories.d.ts +3 -3
- package/lib/src/components/molecules/Tile/Tile.d.ts +8 -0
- package/lib/src/components/molecules/Tile/Tile.stories.d.ts +6 -0
- package/lib/src/components/molecules/Tile/index.d.ts +1 -0
- package/lib/src/components/molecules/index.d.ts +1 -0
- package/lib/src/index.d.ts +4 -4
- package/package.json +2 -1
- package/rollup.config.js +2 -1
- package/src/components/atoms/Icon/Icon.tsx +72 -36
- package/src/components/molecules/Tile/Tile.stories.tsx +26 -0
- package/src/components/molecules/Tile/Tile.tsx +56 -0
- package/src/components/molecules/Tile/index.ts +1 -0
- package/src/components/molecules/index.ts +1 -0
- package/src/index.ts +5 -4
- package/lib/src/components/atoms/Icon/icons/ChechSquare.d.ts +0 -3
@@ -1,40 +1,40 @@
|
|
1
1
|
import React from "react";
|
2
2
|
export declare const iconHashMap: {
|
3
|
-
"angle-down":
|
4
|
-
"arrow-left":
|
5
|
-
"arrow-right":
|
6
|
-
bars:
|
7
|
-
bell:
|
8
|
-
"check-circle":
|
9
|
-
"check-square":
|
10
|
-
"clipboad-notes":
|
11
|
-
close:
|
12
|
-
"create-dashboard":
|
13
|
-
"dice-five":
|
14
|
-
edit:
|
15
|
-
"ellipsis-horizontal":
|
16
|
-
"ellipsis-vertical":
|
17
|
-
envelope:
|
18
|
-
"exclamation-circle":
|
19
|
-
"exclamation-triangle":
|
20
|
-
exit:
|
21
|
-
facebook:
|
22
|
-
home:
|
23
|
-
"image-edit":
|
24
|
-
instagram:
|
25
|
-
linkedin:
|
26
|
-
lock:
|
27
|
-
minus:
|
28
|
-
phone:
|
29
|
-
plus:
|
30
|
-
process:
|
31
|
-
"points-circle":
|
32
|
-
redo:
|
33
|
-
setting:
|
34
|
-
user:
|
35
|
-
"user-circle":
|
36
|
-
"user-plus":
|
37
|
-
users:
|
3
|
+
"angle-down": React.FCS<{}>;
|
4
|
+
"arrow-left": React.FCS<{}>;
|
5
|
+
"arrow-right": React.FCS<{}>;
|
6
|
+
bars: React.FCS<{}>;
|
7
|
+
bell: React.FCS<{}>;
|
8
|
+
"check-circle": React.FCS<{}>;
|
9
|
+
"check-square": React.FCS<{}>;
|
10
|
+
"clipboad-notes": React.FCS<{}>;
|
11
|
+
close: React.FCS<{}>;
|
12
|
+
"create-dashboard": React.FCS<{}>;
|
13
|
+
"dice-five": React.FCS<{}>;
|
14
|
+
edit: React.FCS<{}>;
|
15
|
+
"ellipsis-horizontal": React.FCS<{}>;
|
16
|
+
"ellipsis-vertical": React.FCS<{}>;
|
17
|
+
envelope: React.FCS<{}>;
|
18
|
+
"exclamation-circle": React.FCS<{}>;
|
19
|
+
"exclamation-triangle": React.FCS<{}>;
|
20
|
+
exit: React.FCS<{}>;
|
21
|
+
facebook: React.FCS<{}>;
|
22
|
+
home: React.FCS<{}>;
|
23
|
+
"image-edit": React.FCS<{}>;
|
24
|
+
instagram: React.FCS<{}>;
|
25
|
+
linkedin: React.FCS<{}>;
|
26
|
+
lock: React.FCS<{}>;
|
27
|
+
minus: React.FCS<{}>;
|
28
|
+
phone: React.FCS<{}>;
|
29
|
+
plus: React.FCS<{}>;
|
30
|
+
process: React.FCS<{}>;
|
31
|
+
"points-circle": React.FCS<{}>;
|
32
|
+
redo: React.FCS<{}>;
|
33
|
+
setting: React.FCS<{}>;
|
34
|
+
user: React.FCS<{}>;
|
35
|
+
"user-circle": React.FCS<{}>;
|
36
|
+
"user-plus": React.FCS<{}>;
|
37
|
+
users: React.FCS<{}>;
|
38
38
|
};
|
39
39
|
export declare type IconType = keyof typeof iconHashMap;
|
40
40
|
declare type IconProps = React.SVGProps<SVGSVGElement> & {
|
@@ -2,10 +2,10 @@
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
3
|
declare const _default: ComponentMeta<import("react").FC<{
|
4
4
|
text: string;
|
5
|
-
size?: "s" | "
|
5
|
+
size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
|
6
6
|
}>>;
|
7
7
|
export default _default;
|
8
8
|
export declare const Basic: ComponentStory<import("react").FC<{
|
9
9
|
text: string;
|
10
|
-
size?: "s" | "
|
10
|
+
size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
|
11
11
|
}>>;
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
3
|
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
4
|
-
size?: "s" | "
|
4
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
5
5
|
label?: string | undefined;
|
6
6
|
} & React.RefAttributes<HTMLInputElement>>>;
|
7
7
|
export default _default;
|
8
8
|
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
9
|
-
size?: "s" | "
|
9
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
10
10
|
label?: string | undefined;
|
11
11
|
} & React.RefAttributes<HTMLInputElement>>>;
|
12
12
|
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
13
|
-
size?: "s" | "
|
13
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
14
14
|
label?: string | undefined;
|
15
15
|
} & React.RefAttributes<HTMLInputElement>>>;
|
16
16
|
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
17
|
-
size?: "s" | "
|
17
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
18
18
|
label?: string | undefined;
|
19
19
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -4,7 +4,7 @@ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React
|
|
4
4
|
label?: string | undefined;
|
5
5
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
6
6
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
7
|
-
size?: "s" | "
|
7
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
8
8
|
direction?: "rtl" | "ltr" | undefined;
|
9
9
|
onIconClick?: (() => void) | undefined;
|
10
10
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -13,7 +13,7 @@ export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<
|
|
13
13
|
label?: string | undefined;
|
14
14
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
15
15
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
16
|
-
size?: "s" | "
|
16
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
17
17
|
direction?: "rtl" | "ltr" | undefined;
|
18
18
|
onIconClick?: (() => void) | undefined;
|
19
19
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -21,7 +21,7 @@ export declare const Success: ComponentStory<React.ForwardRefExoticComponent<Omi
|
|
21
21
|
label?: string | undefined;
|
22
22
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
23
23
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
24
|
-
size?: "s" | "
|
24
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
25
25
|
direction?: "rtl" | "ltr" | undefined;
|
26
26
|
onIconClick?: (() => void) | undefined;
|
27
27
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -29,7 +29,7 @@ export declare const Error: ComponentStory<React.ForwardRefExoticComponent<Omit<
|
|
29
29
|
label?: string | undefined;
|
30
30
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
31
31
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
32
|
-
size?: "s" | "
|
32
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
33
33
|
direction?: "rtl" | "ltr" | undefined;
|
34
34
|
onIconClick?: (() => void) | undefined;
|
35
35
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -37,7 +37,7 @@ export declare const Disabled: ComponentStory<React.ForwardRefExoticComponent<Om
|
|
37
37
|
label?: string | undefined;
|
38
38
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
39
39
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
40
|
-
size?: "s" | "
|
40
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
41
41
|
direction?: "rtl" | "ltr" | undefined;
|
42
42
|
onIconClick?: (() => void) | undefined;
|
43
43
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -45,7 +45,7 @@ export declare const IconLTR: ComponentStory<React.ForwardRefExoticComponent<Omi
|
|
45
45
|
label?: string | undefined;
|
46
46
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
47
47
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
48
|
-
size?: "s" | "
|
48
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
49
49
|
direction?: "rtl" | "ltr" | undefined;
|
50
50
|
onIconClick?: (() => void) | undefined;
|
51
51
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -53,7 +53,7 @@ export declare const IconRTL: ComponentStory<React.ForwardRefExoticComponent<Omi
|
|
53
53
|
label?: string | undefined;
|
54
54
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
55
55
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
56
|
-
size?: "s" | "
|
56
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
57
57
|
direction?: "rtl" | "ltr" | undefined;
|
58
58
|
onIconClick?: (() => void) | undefined;
|
59
59
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -61,7 +61,7 @@ export declare const DisabledIcon: ComponentStory<React.ForwardRefExoticComponen
|
|
61
61
|
label?: string | undefined;
|
62
62
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
63
63
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
64
|
-
size?: "s" | "
|
64
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
65
65
|
direction?: "rtl" | "ltr" | undefined;
|
66
66
|
onIconClick?: (() => void) | undefined;
|
67
67
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -69,7 +69,7 @@ export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<O
|
|
69
69
|
label?: string | undefined;
|
70
70
|
validationType?: import("../../../types/validation").ValidationType | undefined;
|
71
71
|
icon?: "close" | "angle-down" | "arrow-left" | "arrow-right" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "create-dashboard" | "dice-five" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
|
72
|
-
size?: "s" | "
|
72
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
73
73
|
direction?: "rtl" | "ltr" | undefined;
|
74
74
|
onIconClick?: (() => void) | undefined;
|
75
75
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -3,7 +3,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
declare const _default: ComponentMeta<import("react").FC<Partial<{
|
4
4
|
src: string;
|
5
5
|
alt: string;
|
6
|
-
size?: "s" | "
|
6
|
+
size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
|
7
7
|
} & {
|
8
8
|
children?: import("react").ReactNode;
|
9
9
|
}> & {
|
@@ -14,7 +14,7 @@ export default _default;
|
|
14
14
|
export declare const Basic: ComponentStory<import("react").FC<Partial<{
|
15
15
|
src: string;
|
16
16
|
alt: string;
|
17
|
-
size?: "s" | "
|
17
|
+
size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
|
18
18
|
} & {
|
19
19
|
children?: import("react").ReactNode;
|
20
20
|
}> & {
|
@@ -24,7 +24,7 @@ export declare const Basic: ComponentStory<import("react").FC<Partial<{
|
|
24
24
|
export declare const WithInitials: ComponentStory<import("react").FC<Partial<{
|
25
25
|
src: string;
|
26
26
|
alt: string;
|
27
|
-
size?: "s" | "
|
27
|
+
size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
|
28
28
|
} & {
|
29
29
|
children?: import("react").ReactNode;
|
30
30
|
}> & {
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
3
|
+
declare const _default: ComponentMeta<React.FC<React.PropsWithChildren<import("./Tile").TileProps>>>;
|
4
|
+
export default _default;
|
5
|
+
export declare const Basic: ComponentStory<React.FC<React.PropsWithChildren<import("./Tile").TileProps>>>;
|
6
|
+
export declare const Interactive: ComponentStory<React.FC<React.PropsWithChildren<import("./Tile").TileProps>>>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Tile } from './Tile';
|
package/lib/src/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { Alert, Avatar, Card, Divider, Icon, Nav, Pill, Typography, Spinner, Chip, Dot, } from
|
2
|
-
export { InfoCard, Input, TextArea, Button, Checkbox, Dropdown, Profile, Radio, } from
|
3
|
-
export { Menu, Setting } from
|
4
|
-
export { GlobalStyles as IntegrigoUI, Color } from
|
1
|
+
export { Alert, Avatar, Card, Divider, Icon, Nav, Pill, Typography, Spinner, Chip, Dot, } from "./components/atoms";
|
2
|
+
export { InfoCard, Input, TextArea, Button, Checkbox, Dropdown, Profile, Radio, Tile, } from "./components/molecules";
|
3
|
+
export { Menu, Setting } from "./components/organisms";
|
4
|
+
export { GlobalStyles as IntegrigoUI, Color } from "./styles";
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"publishConfig": {
|
4
4
|
"registry": "https://npm.pkg.github.com/integrigo"
|
5
5
|
},
|
6
|
-
"version": "1.6.
|
6
|
+
"version": "1.6.15",
|
7
7
|
"main": "lib/index.js",
|
8
8
|
"module": "lib/index.esm.js",
|
9
9
|
"types": "lib/index.d.ts",
|
@@ -46,6 +46,7 @@
|
|
46
46
|
"rollup": "^2.69.0",
|
47
47
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
48
48
|
"rollup-plugin-postcss": "^4.0.2",
|
49
|
+
"rollup-plugin-terser": "^7.0.2",
|
49
50
|
"rollup-plugin-typescript2": "^0.31.2",
|
50
51
|
"rollup-plugin-uglify": "^6.0.4",
|
51
52
|
"styled-components": "^5.3.3",
|
package/rollup.config.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
2
2
|
import resolve from "@rollup/plugin-node-resolve";
|
3
3
|
import commonjs from "@rollup/plugin-commonjs";
|
4
|
+
import { terser } from "rollup-plugin-terser";
|
4
5
|
import typescript from "rollup-plugin-typescript2";
|
5
6
|
import postcss from "rollup-plugin-postcss";
|
6
7
|
import { uglify } from "rollup-plugin-uglify";
|
@@ -9,7 +10,6 @@ const packageJson = require("./package.json");
|
|
9
10
|
|
10
11
|
export default {
|
11
12
|
input: "src/index.ts",
|
12
|
-
inlineDynamicImports: true,
|
13
13
|
output: [
|
14
14
|
{
|
15
15
|
file: packageJson.main,
|
@@ -26,6 +26,7 @@ export default {
|
|
26
26
|
peerDepsExternal(),
|
27
27
|
resolve(),
|
28
28
|
commonjs(),
|
29
|
+
terser(),
|
29
30
|
typescript({ useTsconfigDeclarationDir: true }),
|
30
31
|
postcss({
|
31
32
|
extensions: [".css"],
|
@@ -1,42 +1,78 @@
|
|
1
1
|
import React, { Suspense } from "react";
|
2
2
|
import { Color } from "../../../styles";
|
3
3
|
|
4
|
+
import AngleDown from "./icons/AngleDown";
|
5
|
+
import ArrowLeft from "./icons/ArrowLeft";
|
6
|
+
import ArrowRight from "./icons/ArrowRight";
|
7
|
+
import Bars from "./icons/Bars";
|
8
|
+
import Bell from "./icons/Bell";
|
9
|
+
import CheckCircle from "./icons/CheckCircle";
|
10
|
+
import CheckSquare from "./icons/CheckSquare";
|
11
|
+
import ClipboardNotes from "./icons/ClipboardNotes";
|
12
|
+
import Close from "./icons/Close";
|
13
|
+
import CreateDashboard from "./icons/CreateDashboard";
|
14
|
+
import DiceFive from "./icons/DiceFive";
|
15
|
+
import Edit from "./icons/Edit";
|
16
|
+
import EllipsisVertical from "./icons/EllipsisVertical";
|
17
|
+
import EllipsisHorizontal from "./icons/EllipsisHorizontal";
|
18
|
+
import Envelope from "./icons/Envelope";
|
19
|
+
import ExclamationCircle from "./icons/ExclamationCircle";
|
20
|
+
import ExclamationTriangle from "./icons/ExclamationTriangle";
|
21
|
+
import Exit from "./icons/Exit";
|
22
|
+
import Facebook from "./icons/Facebook";
|
23
|
+
import Home from "./icons/Home";
|
24
|
+
import ImageEdit from "./icons/ImageEdit";
|
25
|
+
import Instagram from "./icons/Instagram";
|
26
|
+
import Linkedin from "./icons/Linkedin";
|
27
|
+
import Lock from "./icons/Lock";
|
28
|
+
import Minus from "./icons/Minus";
|
29
|
+
import Phone from "./icons/Phone";
|
30
|
+
import Plus from "./icons/Plus";
|
31
|
+
import PointsCircle from "./icons/PointsCircle";
|
32
|
+
import Process from "./icons/Process";
|
33
|
+
import Redo from "./icons/Redo";
|
34
|
+
import Setting from "./icons/Setting";
|
35
|
+
import User from "./icons/User";
|
36
|
+
import UserCircle from "./icons/UserCircle";
|
37
|
+
import UserPlus from "./icons/UserPlus";
|
38
|
+
import Users from "./icons/Users";
|
39
|
+
|
4
40
|
export const iconHashMap = {
|
5
|
-
"angle-down":
|
6
|
-
"arrow-left":
|
7
|
-
"arrow-right":
|
8
|
-
bars:
|
9
|
-
bell:
|
10
|
-
"check-circle":
|
11
|
-
"check-square":
|
12
|
-
"clipboad-notes":
|
13
|
-
close:
|
14
|
-
"create-dashboard":
|
15
|
-
"dice-five":
|
16
|
-
edit:
|
17
|
-
"ellipsis-horizontal":
|
18
|
-
"ellipsis-vertical":
|
19
|
-
envelope:
|
20
|
-
"exclamation-circle":
|
21
|
-
"exclamation-triangle":
|
22
|
-
exit:
|
23
|
-
facebook:
|
24
|
-
home:
|
25
|
-
"image-edit":
|
26
|
-
instagram:
|
27
|
-
linkedin:
|
28
|
-
lock:
|
29
|
-
minus:
|
30
|
-
phone:
|
31
|
-
plus:
|
32
|
-
process:
|
33
|
-
"points-circle":
|
34
|
-
redo:
|
35
|
-
setting:
|
36
|
-
user:
|
37
|
-
"user-circle":
|
38
|
-
"user-plus":
|
39
|
-
users:
|
41
|
+
"angle-down": AngleDown,
|
42
|
+
"arrow-left": ArrowLeft,
|
43
|
+
"arrow-right": ArrowRight,
|
44
|
+
bars: Bars,
|
45
|
+
bell: Bell,
|
46
|
+
"check-circle": CheckCircle,
|
47
|
+
"check-square": CheckSquare,
|
48
|
+
"clipboad-notes": ClipboardNotes,
|
49
|
+
close: Close,
|
50
|
+
"create-dashboard": CreateDashboard,
|
51
|
+
"dice-five": DiceFive,
|
52
|
+
edit: Edit,
|
53
|
+
"ellipsis-horizontal": EllipsisHorizontal,
|
54
|
+
"ellipsis-vertical": EllipsisVertical,
|
55
|
+
envelope: Envelope,
|
56
|
+
"exclamation-circle": ExclamationCircle,
|
57
|
+
"exclamation-triangle": ExclamationTriangle,
|
58
|
+
exit: Exit,
|
59
|
+
facebook: Facebook,
|
60
|
+
home: Home,
|
61
|
+
"image-edit": ImageEdit,
|
62
|
+
instagram: Instagram,
|
63
|
+
linkedin: Linkedin,
|
64
|
+
lock: Lock,
|
65
|
+
minus: Minus,
|
66
|
+
phone: Phone,
|
67
|
+
plus: Plus,
|
68
|
+
process: Process,
|
69
|
+
"points-circle": PointsCircle,
|
70
|
+
redo: Redo,
|
71
|
+
setting: Setting,
|
72
|
+
user: User,
|
73
|
+
"user-circle": UserCircle,
|
74
|
+
"user-plus": UserPlus,
|
75
|
+
users: Users,
|
40
76
|
};
|
41
77
|
|
42
78
|
export type IconType = keyof typeof iconHashMap;
|
@@ -76,7 +112,7 @@ export const Icon: React.FCS<IconProps> = ({
|
|
76
112
|
size = "ultra-small",
|
77
113
|
...props
|
78
114
|
}) => {
|
79
|
-
const Component =
|
115
|
+
const Component = iconHashMap[type];
|
80
116
|
const sizes = typeof size === "string" ? sizeHashMap[size] : size;
|
81
117
|
|
82
118
|
return (
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
3
|
+
|
4
|
+
import { Tile } from "./Tile";
|
5
|
+
|
6
|
+
export default {
|
7
|
+
title: "Molecules/Tile",
|
8
|
+
component: Tile,
|
9
|
+
} as ComponentMeta<typeof Tile>;
|
10
|
+
|
11
|
+
const Template: ComponentStory<typeof Tile> = (args) => <Tile {...args} />;
|
12
|
+
|
13
|
+
export const Basic = Template.bind({});
|
14
|
+
Basic.args = {
|
15
|
+
src: 'https://img.freepik.com/darmowe-zdjecie/dosc-usmiechnieta-radosnie-kobieta-o-jasnych-wlosach-ubrana-swobodnie-wygladajaca-z-zadowoleniem_176420-15187.jpg?w=1380&t=st=1660198496~exp=1660199096~hmac=7401572065d2cd7bb67d9f43dbde5c116b90aad419b179fffac1196df24869f2',
|
16
|
+
alt: 'Jane Doe',
|
17
|
+
title: 'Tile Card'
|
18
|
+
};
|
19
|
+
|
20
|
+
export const Interactive = Template.bind({});
|
21
|
+
Interactive.args = {
|
22
|
+
src: 'https://img.freepik.com/darmowe-zdjecie/dosc-usmiechnieta-radosnie-kobieta-o-jasnych-wlosach-ubrana-swobodnie-wygladajaca-z-zadowoleniem_176420-15187.jpg?w=1380&t=st=1660198496~exp=1660199096~hmac=7401572065d2cd7bb67d9f43dbde5c116b90aad419b179fffac1196df24869f2',
|
23
|
+
alt: 'Jane Doe',
|
24
|
+
title: 'Tile Card',
|
25
|
+
interactive: true
|
26
|
+
};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
2
|
+
import styled, { css } from "styled-components";
|
3
|
+
import { Avatar, Card, Typography } from "../../atoms";
|
4
|
+
|
5
|
+
const { Hero } = Typography;
|
6
|
+
|
7
|
+
export interface TileProps {
|
8
|
+
src: string;
|
9
|
+
alt: string;
|
10
|
+
title: string;
|
11
|
+
interactive?: boolean;
|
12
|
+
}
|
13
|
+
|
14
|
+
export const Tile: React.FC<PropsWithChildren<TileProps>> = ({
|
15
|
+
src,
|
16
|
+
alt,
|
17
|
+
title,
|
18
|
+
interactive = false,
|
19
|
+
children,
|
20
|
+
}) => {
|
21
|
+
return (
|
22
|
+
<Root size="s" flat interactive={interactive}>
|
23
|
+
<Info>
|
24
|
+
<Avatar size="xl" src={src} alt={alt} />
|
25
|
+
<Hero size="s">{title}</Hero>
|
26
|
+
</Info>
|
27
|
+
|
28
|
+
<Action>{children}</Action>
|
29
|
+
</Root>
|
30
|
+
);
|
31
|
+
};
|
32
|
+
|
33
|
+
const Root = styled(Card)<{ interactive: boolean }>`
|
34
|
+
border: 1px solid var(--shades-of-grey-40);
|
35
|
+
display: flex;
|
36
|
+
flex-direction: row;
|
37
|
+
justify-content: space-between;
|
38
|
+
align-items: center;
|
39
|
+
|
40
|
+
${(p) =>
|
41
|
+
p.interactive &&
|
42
|
+
css`
|
43
|
+
&:hover {
|
44
|
+
border-color: var(--color-orange);
|
45
|
+
cursor: pointer;
|
46
|
+
}
|
47
|
+
`}
|
48
|
+
`;
|
49
|
+
|
50
|
+
const Info = styled.div`
|
51
|
+
display: flex;
|
52
|
+
align-items: center;
|
53
|
+
gap: var(--padding-m);
|
54
|
+
`;
|
55
|
+
|
56
|
+
const Action = styled.div``;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Tile } from './Tile'
|
package/src/index.ts
CHANGED
@@ -10,7 +10,7 @@ export {
|
|
10
10
|
Spinner,
|
11
11
|
Chip,
|
12
12
|
Dot,
|
13
|
-
} from
|
13
|
+
} from "./components/atoms";
|
14
14
|
|
15
15
|
export {
|
16
16
|
InfoCard,
|
@@ -21,8 +21,9 @@ export {
|
|
21
21
|
Dropdown,
|
22
22
|
Profile,
|
23
23
|
Radio,
|
24
|
-
|
24
|
+
Tile,
|
25
|
+
} from "./components/molecules";
|
25
26
|
|
26
|
-
export { Menu, Setting } from
|
27
|
+
export { Menu, Setting } from "./components/organisms";
|
27
28
|
|
28
|
-
export { GlobalStyles as IntegrigoUI, Color } from
|
29
|
+
export { GlobalStyles as IntegrigoUI, Color } from "./styles";
|