@integrigo/integrigo-ui 1.6.14 → 1.6.15-b
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 +24 -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/Gradient/Gradient.d.ts +9 -0
- package/lib/src/components/atoms/Gradient/Gradient.stories.d.ts +16 -0
- package/lib/src/components/atoms/Gradient/index.d.ts +1 -0
- 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/atoms/index.d.ts +12 -11
- 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 +7 -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/Gradient/Gradient.stories.tsx +22 -0
- package/src/components/atoms/Gradient/Gradient.tsx +35 -0
- package/src/components/atoms/Gradient/index.tsx +1 -0
- package/src/components/atoms/Icon/Icon.tsx +72 -36
- package/src/components/atoms/index.ts +12 -11
- package/src/components/molecules/Tile/Tile.stories.tsx +31 -0
- package/src/components/molecules/Tile/Tile.tsx +67 -0
- package/src/components/molecules/Tile/index.ts +1 -0
- package/src/components/molecules/index.ts +1 -0
- package/src/index.ts +6 -4
- package/src/styles/global.ts +9 -0
- package/lib/src/components/atoms/Icon/icons/ChechSquare.d.ts +0 -3
@@ -0,0 +1,67 @@
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
2
|
+
import styled, { css } from "styled-components";
|
3
|
+
import { Avatar, Card, Gradient, 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
|
+
const stringToNumber = (name: string): number =>
|
15
|
+
name.split("").reduce((sum, element) => sum + element.charCodeAt(0), 0);
|
16
|
+
|
17
|
+
export const Tile: React.FC<PropsWithChildren<TileProps>> = ({
|
18
|
+
src,
|
19
|
+
alt,
|
20
|
+
title,
|
21
|
+
interactive = false,
|
22
|
+
children,
|
23
|
+
}) => {
|
24
|
+
return (
|
25
|
+
<Root size="s" flat interactive={interactive}>
|
26
|
+
<Info>
|
27
|
+
{src && alt ? (
|
28
|
+
<Avatar size="xl" src={src} alt={alt} />
|
29
|
+
) : (
|
30
|
+
<Gradient size="xl" variant={stringToNumber(title)} circle />
|
31
|
+
)}
|
32
|
+
<Hero size="s">{title}</Hero>
|
33
|
+
</Info>
|
34
|
+
|
35
|
+
<Action>{children}</Action>
|
36
|
+
</Root>
|
37
|
+
);
|
38
|
+
};
|
39
|
+
|
40
|
+
const Root = styled(Card)<{ interactive: boolean }>`
|
41
|
+
border: 1px solid var(--shades-of-grey-40);
|
42
|
+
display: flex;
|
43
|
+
flex-direction: row;
|
44
|
+
justify-content: space-between;
|
45
|
+
align-items: center;
|
46
|
+
|
47
|
+
${(p) =>
|
48
|
+
p.interactive &&
|
49
|
+
css`
|
50
|
+
&:hover {
|
51
|
+
border-color: var(--color-orange);
|
52
|
+
cursor: pointer;
|
53
|
+
}
|
54
|
+
`}
|
55
|
+
`;
|
56
|
+
|
57
|
+
const Info = styled.div`
|
58
|
+
display: flex;
|
59
|
+
align-items: center;
|
60
|
+
gap: var(--padding-m);
|
61
|
+
`;
|
62
|
+
|
63
|
+
const Action = styled.div`
|
64
|
+
display: flex;
|
65
|
+
align-items: center;
|
66
|
+
gap: var(--padding-s);
|
67
|
+
`;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Tile } from './Tile'
|
package/src/index.ts
CHANGED
@@ -10,7 +10,8 @@ export {
|
|
10
10
|
Spinner,
|
11
11
|
Chip,
|
12
12
|
Dot,
|
13
|
-
|
13
|
+
Gradient,
|
14
|
+
} from "./components/atoms";
|
14
15
|
|
15
16
|
export {
|
16
17
|
InfoCard,
|
@@ -21,8 +22,9 @@ export {
|
|
21
22
|
Dropdown,
|
22
23
|
Profile,
|
23
24
|
Radio,
|
24
|
-
|
25
|
+
Tile,
|
26
|
+
} from "./components/molecules";
|
25
27
|
|
26
|
-
export { Menu, Setting } from
|
28
|
+
export { Menu, Setting } from "./components/organisms";
|
27
29
|
|
28
|
-
export { GlobalStyles as IntegrigoUI, Color } from
|
30
|
+
export { GlobalStyles as IntegrigoUI, Color } from "./styles";
|
package/src/styles/global.ts
CHANGED
@@ -30,6 +30,15 @@ export const GlobalStyles = createGlobalStyle`
|
|
30
30
|
--color-orange-80: ${Color.Orange}80;
|
31
31
|
--color-orange-65: ${Color.Orange}65;
|
32
32
|
|
33
|
+
--gradient-natural-orange: linear-gradient(333.61deg, #E09A33 13.3%, #FFB241 90.98%);
|
34
|
+
--gradient-orange-red: radial-gradient(106.28% 106.28% at 76.05% 89.07%, #E09A33 0%, #CF544B 100%);
|
35
|
+
--gradient-red: linear-gradient(326.33deg, #CF544B -3.49%, #E09A33 149.87%);
|
36
|
+
--gradient-red-blue: linear-gradient(326.33deg, #172142 -3.49%, #CF544B 73.19%, #E09A33 149.87%);
|
37
|
+
--gradient-green-blue: linear-gradient(157.85deg, #6B8B4A 19.78%, #172142 117.27%);
|
38
|
+
--gradient-navy: linear-gradient(147.91deg, #3F4D7B 15.54%, #172142 87.63%);
|
39
|
+
--gradient-cyan-blue: linear-gradient(153.72deg, #008099 -10.13%, #172142 84.37%);
|
40
|
+
--gradient-natural-grey: linear-gradient(152.12deg, #DBDBDB -55.19%, #5F5A5A 89.06%);
|
41
|
+
|
33
42
|
--padding-s: 8px;
|
34
43
|
--padding-m: 16px;
|
35
44
|
--padding-l: 24px;
|