@integrigo/integrigo-ui 1.6.14-f → 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.js +1 -1
- package/lib/src/components/molecules/Checkbox/Checkbox.stories.d.ts +4 -4
- package/lib/src/components/molecules/Radio/Radio.stories.d.ts +4 -4
- 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 +1 -1
- 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
@@ -1,19 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
4
4
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
5
5
|
label?: string | undefined;
|
6
6
|
} & React.RefAttributes<HTMLInputElement>>>;
|
7
7
|
export default _default;
|
8
|
-
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
8
|
+
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
9
9
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
10
10
|
label?: string | undefined;
|
11
11
|
} & React.RefAttributes<HTMLInputElement>>>;
|
12
|
-
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
12
|
+
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
13
13
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
14
14
|
label?: string | undefined;
|
15
15
|
} & React.RefAttributes<HTMLInputElement>>>;
|
16
|
-
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
16
|
+
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
17
17
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
18
18
|
label?: string | undefined;
|
19
19
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -1,20 +1,20 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
3
3
|
import { Size } from './Radio';
|
4
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
4
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
5
5
|
size?: Size | undefined;
|
6
6
|
label?: string | undefined;
|
7
7
|
} & React.RefAttributes<HTMLInputElement>>>;
|
8
8
|
export default _default;
|
9
|
-
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
9
|
+
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
10
10
|
size?: Size | undefined;
|
11
11
|
label?: string | undefined;
|
12
12
|
} & React.RefAttributes<HTMLInputElement>>>;
|
13
|
-
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
13
|
+
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
14
14
|
size?: Size | undefined;
|
15
15
|
label?: string | undefined;
|
16
16
|
} & React.RefAttributes<HTMLInputElement>>>;
|
17
|
-
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
17
|
+
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
18
18
|
size?: Size | undefined;
|
19
19
|
label?: string | undefined;
|
20
20
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -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
@@ -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";
|