@dtdot/lego 0.14.5 → 0.14.9
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/build/components/ActionMessage/ActionMessage.stories.js +2 -2
- package/build/components/Card/Card.component.js +1 -1
- package/build/components/Card/Card.stories.js +4 -0
- package/build/components/Card/_CardHeader.component.d.ts +1 -1
- package/build/components/InlineCard/InlineCard.component.d.ts +5 -2
- package/build/components/InlineCard/InlineCard.component.js +43 -2
- package/build/components/InlineCard/InlineCard.stories.js +4 -2
- package/build/components/InlineCard/_InlineCardContent.component.d.ts +2 -1
- package/build/components/InlineCard/_InlineCardContent.component.js +9 -2
- package/build/components/InlineCard/_InlineCardMeta.component.d.ts +6 -0
- package/build/components/InlineCard/_InlineCardMeta.component.js +15 -0
- package/build/components/Menu/Menu.component.d.ts +3 -3
- package/build/components/Menu/Menu.stories.js +5 -5
- package/build/components/Menu/_MenuContent.component.d.ts +1 -5
- package/build/components/Menu/_MenuContent.component.js +3 -14
- package/build/components/Menu/_MenuPage.component.d.ts +2 -1
- package/build/components/Menu/_MenuPage.component.js +8 -10
- package/build/components/Menu/_MenuPanel.component.d.ts +4 -1
- package/build/components/Menu/_MenuPanel.component.js +9 -11
- package/build/components/PageHeader/PageHeader.component.d.ts +6 -0
- package/build/components/PageHeader/PageHeader.component.js +12 -0
- package/build/components/PageHeader/PageHeader.stories.d.ts +5 -0
- package/build/components/PageHeader/PageHeader.stories.js +9 -0
- package/build/components/Swimlane/Swimlane.component.d.ts +7 -0
- package/build/components/Swimlane/Swimlane.component.js +31 -0
- package/build/components/Swimlane/Swimlane.stories.d.ts +5 -0
- package/build/components/Swimlane/Swimlane.stories.js +55 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/theme/dark.theme.js +2 -2
- package/package.json +1 -1
- package/build/components/Menu/_MenuContent.context.d.ts +0 -7
- package/build/components/Menu/_MenuContent.context.js +0 -6
|
@@ -8,8 +8,8 @@ export const Standard = () => (React.createElement(React.Fragment, null,
|
|
|
8
8
|
export const InPanel = () => (React.createElement(React.Fragment, null,
|
|
9
9
|
React.createElement(Menu, null,
|
|
10
10
|
React.createElement(Menu.Heading, null, "Action Message")),
|
|
11
|
-
React.createElement(Menu.Content,
|
|
12
|
-
React.createElement(Menu.Panel,
|
|
11
|
+
React.createElement(Menu.Content, null,
|
|
12
|
+
React.createElement(Menu.Panel, { panelSize: 'sm' },
|
|
13
13
|
React.createElement(ActionMessage, { header: 'Create an asset', info: "It looks like you don't have any assets, create one to get started", action: 'Create', onAction: () => {
|
|
14
14
|
console.log('testing');
|
|
15
15
|
} })),
|
|
@@ -15,6 +15,10 @@ export const Standard = () => (React.createElement(CardGroup, null,
|
|
|
15
15
|
React.createElement(Card.Content, null,
|
|
16
16
|
React.createElement(LiveInput, { name: 'test', placeholder: 'Name of characters' })))));
|
|
17
17
|
export const Sizes = () => (React.createElement(CardGroup, null,
|
|
18
|
+
React.createElement(Card, { size: 'xs' },
|
|
19
|
+
React.createElement(Card.Media, null,
|
|
20
|
+
React.createElement("img", { src: 'https://www.jotform.com/blog/wp-content/uploads/2012/07/mario-luigi-yoschi-figures-163036.jpeg' })),
|
|
21
|
+
React.createElement(Card.Content, null, "An extra small card!")),
|
|
18
22
|
React.createElement(Card, { size: 'sm' },
|
|
19
23
|
React.createElement(Card.Media, null,
|
|
20
24
|
React.createElement("img", { src: 'https://www.jotform.com/blog/wp-content/uploads/2012/07/mario-luigi-yoschi-figures-163036.jpeg' })),
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export interface CardHeaderProps {
|
|
3
3
|
image?: string;
|
|
4
4
|
heading: string;
|
|
5
|
-
subHeading
|
|
5
|
+
subHeading?: string;
|
|
6
6
|
meta?: React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
declare const CardHeader: ({ image, heading, subHeading, meta }: CardHeaderProps) => JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare type InlineCardSize = 'fill' | 'xs' | 'sm' | 'md' | 'lg';
|
|
2
3
|
export interface InlineCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
children: React.ReactNode;
|
|
5
|
+
size?: InlineCardSize;
|
|
4
6
|
}
|
|
5
7
|
declare const InlineCard: {
|
|
6
|
-
({ children, onClick }: InlineCardProps): JSX.Element;
|
|
8
|
+
({ children, size, onClick }: InlineCardProps): JSX.Element;
|
|
7
9
|
Media: ({ children }: import("./_InlineCardMedia.component").InlineCardMediaProps) => JSX.Element;
|
|
8
|
-
Content: ({ children }: import("./_InlineCardContent.component").InlineCardContentProps) => JSX.Element;
|
|
10
|
+
Content: ({ children, center }: import("./_InlineCardContent.component").InlineCardContentProps) => JSX.Element;
|
|
11
|
+
Meta: ({ children }: import("./_InlineCardMeta.component").InlineCardMetaProps) => JSX.Element;
|
|
9
12
|
};
|
|
10
13
|
export default InlineCard;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
+
import { responsive } from '../..';
|
|
3
4
|
import InlineCardContent from './_InlineCardContent.component';
|
|
4
5
|
import InlineCardMedia from './_InlineCardMedia.component';
|
|
6
|
+
import InlineCardMeta from './_InlineCardMeta.component';
|
|
5
7
|
const CardOuter = styled.div `
|
|
6
8
|
height: 64px;
|
|
7
9
|
width: 100%;
|
|
@@ -11,10 +13,49 @@ const CardOuter = styled.div `
|
|
|
11
13
|
|
|
12
14
|
background-color: ${(props) => props.theme.colours.cardBackground};
|
|
13
15
|
box-shadow: ${(props) => props.theme.shadows.small};
|
|
16
|
+
|
|
17
|
+
${(props) => {
|
|
18
|
+
switch (props.size) {
|
|
19
|
+
case 'fill':
|
|
20
|
+
return `
|
|
21
|
+
width: 100%;
|
|
22
|
+
`;
|
|
23
|
+
case 'xs':
|
|
24
|
+
return `
|
|
25
|
+
width: 360px;
|
|
26
|
+
${responsive.useStylesFor('mobile').andSmaller(`
|
|
27
|
+
width: 100%;
|
|
28
|
+
`)}
|
|
29
|
+
`;
|
|
30
|
+
case 'sm':
|
|
31
|
+
return `
|
|
32
|
+
width: ${responsive.getWidthFor('mobile')};
|
|
33
|
+
${responsive.useStylesFor('mobile').andSmaller(`
|
|
34
|
+
width: 100%;
|
|
35
|
+
`)}
|
|
36
|
+
`;
|
|
37
|
+
case 'md':
|
|
38
|
+
return `
|
|
39
|
+
width: ${responsive.getWidthFor('tablet')};
|
|
40
|
+
${responsive.useStylesFor('tablet').andSmaller(`
|
|
41
|
+
width: 100%;
|
|
42
|
+
`)}
|
|
43
|
+
`;
|
|
44
|
+
case 'lg':
|
|
45
|
+
default:
|
|
46
|
+
return `
|
|
47
|
+
width: ${responsive.getWidthFor('desktop')};
|
|
48
|
+
${responsive.useStylesFor('desktop').andSmaller(`
|
|
49
|
+
width: 100%;
|
|
50
|
+
`)}
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
}}
|
|
14
54
|
`;
|
|
15
|
-
const InlineCard = ({ children, onClick }) => {
|
|
16
|
-
return (React.createElement(CardOuter, { usePointer: !!onClick, onClick: onClick }, children));
|
|
55
|
+
const InlineCard = ({ children, size, onClick }) => {
|
|
56
|
+
return (React.createElement(CardOuter, { size: size, usePointer: !!onClick, onClick: onClick }, children));
|
|
17
57
|
};
|
|
18
58
|
InlineCard.Media = InlineCardMedia;
|
|
19
59
|
InlineCard.Content = InlineCardContent;
|
|
60
|
+
InlineCard.Meta = InlineCardMeta;
|
|
20
61
|
export default InlineCard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { InlineCard, InlineCardGroup } from '../..';
|
|
2
|
+
import { Badge, InlineCard, InlineCardGroup } from '../..';
|
|
3
3
|
export const Standard = () => (React.createElement(InlineCardGroup, null,
|
|
4
4
|
React.createElement(InlineCard, null,
|
|
5
5
|
React.createElement(InlineCard.Content, null, "Some content")),
|
|
@@ -10,7 +10,9 @@ export const Standard = () => (React.createElement(InlineCardGroup, null,
|
|
|
10
10
|
React.createElement(InlineCard, { onClick: () => {
|
|
11
11
|
console.log('Clicked');
|
|
12
12
|
} },
|
|
13
|
-
React.createElement(InlineCard.Content, null, "Clickable card")
|
|
13
|
+
React.createElement(InlineCard.Content, null, "Clickable card"),
|
|
14
|
+
React.createElement(InlineCard.Meta, null,
|
|
15
|
+
React.createElement(Badge, { variant: 'info' }, "Clickable")))));
|
|
14
16
|
export default {
|
|
15
17
|
title: 'Components/InlineCard',
|
|
16
18
|
component: InlineCard,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface InlineCardContentProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
center?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const InlineCardContent: ({ children }: InlineCardContentProps) => JSX.Element;
|
|
6
|
+
declare const InlineCardContent: ({ children, center }: InlineCardContentProps) => JSX.Element;
|
|
6
7
|
export default InlineCardContent;
|
|
@@ -8,8 +8,15 @@ const ContentContainer = styled.div `
|
|
|
8
8
|
font-weight: ${(props) => props.theme.fonts.default.weight};
|
|
9
9
|
font-size: ${(props) => props.theme.fonts.default.size};
|
|
10
10
|
color: ${(props) => props.theme.colours.defaultFont};
|
|
11
|
+
|
|
12
|
+
${(props) => props.center &&
|
|
13
|
+
`
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
|
|
17
|
+
`}
|
|
11
18
|
`;
|
|
12
|
-
const InlineCardContent = ({ children }) => {
|
|
13
|
-
return React.createElement(ContentContainer,
|
|
19
|
+
const InlineCardContent = ({ children, center }) => {
|
|
20
|
+
return React.createElement(ContentContainer, { center: center }, children);
|
|
14
21
|
};
|
|
15
22
|
export default InlineCardContent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const ContentContainer = styled.div `
|
|
4
|
+
height: 100%;
|
|
5
|
+
padding: 8px;
|
|
6
|
+
margin-left: 32px;
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
margin-left: auto;
|
|
11
|
+
`;
|
|
12
|
+
const InlineCardMeta = ({ children }) => {
|
|
13
|
+
return React.createElement(ContentContainer, null, children);
|
|
14
|
+
};
|
|
15
|
+
export default InlineCardMeta;
|
|
@@ -4,10 +4,10 @@ export interface MenuProps {
|
|
|
4
4
|
}
|
|
5
5
|
declare const Menu: {
|
|
6
6
|
({ children }: MenuProps): JSX.Element;
|
|
7
|
-
Page: ({ children }: import("./_MenuPage.component").MenuPageProps) => JSX.Element;
|
|
7
|
+
Page: ({ children, scrollable }: import("./_MenuPage.component").MenuPageProps) => JSX.Element;
|
|
8
8
|
Heading: ({ children }: import("./_MenuHeading.component").MenuHeadingProps) => JSX.Element;
|
|
9
9
|
Item: ({ children, icon, active, onClick }: import("./_MenuItem.component").MenuItemProps) => JSX.Element;
|
|
10
|
-
Content: ({
|
|
11
|
-
Panel: ({ children }: import("./_MenuPanel.component").MenuPanelProps) => JSX.Element;
|
|
10
|
+
Content: ({ children }: import("./_MenuContent.component").MenuContentProps) => JSX.Element;
|
|
11
|
+
Panel: ({ children, scrollable, panelSize }: import("./_MenuPanel.component").MenuPanelProps) => JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
export default Menu;
|
|
@@ -29,8 +29,8 @@ export const WithPanel = () => {
|
|
|
29
29
|
React.createElement(Menu.Item, { icon: faHamburger, active: menuHelpers.isActiveItem([/\/eat/g], route), onClick: () => setRoute('/eat') }, "Eat"),
|
|
30
30
|
React.createElement(Menu.Item, { icon: faCalendarAlt, active: menuHelpers.isActiveItem([/\/plan/g], route), onClick: () => setRoute('/plan') }, "Plan"),
|
|
31
31
|
React.createElement(Menu.Item, { icon: faCogs, active: menuHelpers.isActiveItem([/\/manage/g], route), onClick: () => setRoute('/manage') }, "Manage")),
|
|
32
|
-
React.createElement(Menu.Content,
|
|
33
|
-
React.createElement(Menu.Panel,
|
|
32
|
+
React.createElement(Menu.Content, null,
|
|
33
|
+
React.createElement(Menu.Panel, { panelSize: 'md' },
|
|
34
34
|
React.createElement(PaddedLayout, null,
|
|
35
35
|
React.createElement(ControlGroup, { variation: 'comfortable' },
|
|
36
36
|
React.createElement(Heading.SubHeading, null, "You"),
|
|
@@ -57,8 +57,8 @@ export const IndependentScrolling = () => {
|
|
|
57
57
|
React.createElement(Menu.Item, { icon: faHamburger, active: menuHelpers.isActiveItem([/\/eat/g], route), onClick: () => setRoute('/eat') }, "Eat"),
|
|
58
58
|
React.createElement(Menu.Item, { icon: faCalendarAlt, active: menuHelpers.isActiveItem([/\/plan/g], route), onClick: () => setRoute('/plan') }, "Plan"),
|
|
59
59
|
React.createElement(Menu.Item, { icon: faCogs, active: menuHelpers.isActiveItem([/\/manage/g], route), onClick: () => setRoute('/manage') }, "Manage")),
|
|
60
|
-
React.createElement(Menu.Content,
|
|
61
|
-
React.createElement(Menu.Panel,
|
|
60
|
+
React.createElement(Menu.Content, null,
|
|
61
|
+
React.createElement(Menu.Panel, { panelSize: 'sm', scrollable: true },
|
|
62
62
|
React.createElement(PaddedLayout, null,
|
|
63
63
|
React.createElement(Text, null,
|
|
64
64
|
"Suspendisse sit amet pellentesque nisi. Quisque eget velit sit amet mauris tincidunt dictum id et ex. Integer pulvinar tellus id viverra finibus. Cras dapibus diam a ante eleifend, ac ultrices ligula vestibulum. Nulla gravida ante nec mi tristique, vel elementum arcu volutpat. Nunc in lorem id ligula sodales tincidunt non ut ipsum. Fusce risus eros, dapibus sed lacus et, faucibus auctor purus. Nulla sed rhoncus ligula, at porttitor tellus. Aliquam vitae gravida quam. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque quis tempus risus.",
|
|
@@ -68,7 +68,7 @@ export const IndependentScrolling = () => {
|
|
|
68
68
|
React.createElement("br", null),
|
|
69
69
|
React.createElement("br", null),
|
|
70
70
|
"Aenean vestibulum aliquam purus ut fringilla. Maecenas aliquet a nunc eget scelerisque. Mauris varius dignissim velit, vitae faucibus massa posuere sit amet. Nulla rutrum enim tellus, eget interdum massa ultricies sed. Proin pulvinar odio non lectus scelerisque, et varius nisl blandit. Donec nisl ante, ultricies eu volutpat ut, dapibus sed ex. Aliquam risus ex, porttitor vel commodo in, convallis laoreet dolor. Proin pretium neque pretium, laoreet dolor ultrices, vulputate sapien. Aenean rutrum lorem non mauris egestas accumsan."))),
|
|
71
|
-
React.createElement(Menu.Page,
|
|
71
|
+
React.createElement(Menu.Page, { scrollable: true },
|
|
72
72
|
React.createElement(ContentLayout, null,
|
|
73
73
|
React.createElement(ContentLayout.Content, { size: 'sm' },
|
|
74
74
|
React.createElement(Text, null,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare type PanelSize = 'sm' | 'md';
|
|
3
|
-
export declare const getMaxSize: (size: PanelSize) => "tablet" | "desktop";
|
|
4
2
|
export interface MenuContentProps {
|
|
5
3
|
children: React.ReactNode;
|
|
6
|
-
panelSize?: PanelSize;
|
|
7
|
-
independentScroll?: boolean;
|
|
8
4
|
}
|
|
9
|
-
declare const MenuContent: ({
|
|
5
|
+
declare const MenuContent: ({ children }: MenuContentProps) => JSX.Element;
|
|
10
6
|
export default MenuContent;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import responsive from '../../responsive/responsive';
|
|
4
|
-
import MenuContentContext from './_MenuContent.context';
|
|
5
|
-
export const getMaxSize = (size) => {
|
|
6
|
-
switch (size) {
|
|
7
|
-
case 'sm':
|
|
8
|
-
return 'tablet';
|
|
9
|
-
case 'md':
|
|
10
|
-
default:
|
|
11
|
-
return 'desktop';
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
4
|
const MenuContentOuter = styled.div `
|
|
15
5
|
display: flex;
|
|
16
6
|
|
|
@@ -20,12 +10,11 @@ const MenuContentOuter = styled.div `
|
|
|
20
10
|
min-height: 100vh;
|
|
21
11
|
padding: 8px;
|
|
22
12
|
|
|
23
|
-
${
|
|
13
|
+
${responsive.useStylesFor('tablet').andSmaller(`
|
|
24
14
|
flex-direction: column;
|
|
25
15
|
`)}
|
|
26
16
|
`;
|
|
27
|
-
const MenuContent = ({
|
|
28
|
-
return
|
|
29
|
-
React.createElement(MenuContentOuter, { panelSize: panelSize }, children)));
|
|
17
|
+
const MenuContent = ({ children }) => {
|
|
18
|
+
return React.createElement(MenuContentOuter, null, children);
|
|
30
19
|
};
|
|
31
20
|
export default MenuContent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface MenuPageProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
scrollable?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const MenuPage: ({ children }: MenuPageProps) => JSX.Element;
|
|
6
|
+
declare const MenuPage: ({ children, scrollable }: MenuPageProps) => JSX.Element;
|
|
6
7
|
export default MenuPage;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import responsive from '../../responsive/responsive';
|
|
4
|
-
import { getMaxSize } from './_MenuContent.component';
|
|
5
|
-
import MenuContentContext from './_MenuContent.context';
|
|
6
4
|
const MenuPageInner = styled.div `
|
|
7
5
|
background-color: ${(props) => props.theme.colours.background};
|
|
8
6
|
border-radius: 2px;
|
|
9
7
|
min-height: calc(100vh - 16px);
|
|
10
8
|
flex-grow: 1;
|
|
11
9
|
|
|
12
|
-
${
|
|
10
|
+
${responsive.useStylesFor('tablet').andSmaller(`
|
|
13
11
|
min-height: unset;
|
|
14
12
|
`)}
|
|
15
13
|
|
|
16
|
-
${(props) => props.
|
|
17
|
-
`
|
|
14
|
+
${(props) => responsive.useStylesFor('desktop').andLarger(props.scrollable
|
|
15
|
+
? `
|
|
18
16
|
max-height: calc(100vh - 16px);
|
|
19
17
|
overflow-y: auto;
|
|
20
18
|
|
|
@@ -30,10 +28,10 @@ const MenuPageInner = styled.div `
|
|
|
30
28
|
&::-webkit-scrollbar-track {
|
|
31
29
|
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
|
32
30
|
}
|
|
33
|
-
`
|
|
31
|
+
`
|
|
32
|
+
: ``)}
|
|
34
33
|
`;
|
|
35
|
-
const MenuPage = ({ children }) => {
|
|
36
|
-
|
|
37
|
-
return (React.createElement(MenuPageInner, { panelSize: panelSize, independentScroll: independentScroll }, children));
|
|
34
|
+
const MenuPage = ({ children, scrollable }) => {
|
|
35
|
+
return React.createElement(MenuPageInner, { scrollable: scrollable }, children);
|
|
38
36
|
};
|
|
39
37
|
export default MenuPage;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare type PanelSize = 'sm' | 'md';
|
|
2
3
|
export interface MenuPanelProps {
|
|
3
4
|
children: React.ReactNode;
|
|
5
|
+
scrollable?: boolean;
|
|
6
|
+
panelSize: PanelSize;
|
|
4
7
|
}
|
|
5
|
-
declare const MenuPanel: ({ children }: MenuPanelProps) => JSX.Element;
|
|
8
|
+
declare const MenuPanel: ({ children, scrollable, panelSize }: MenuPanelProps) => JSX.Element;
|
|
6
9
|
export default MenuPanel;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import responsive from '../../responsive/responsive';
|
|
4
|
-
import { getMaxSize } from './_MenuContent.component';
|
|
5
|
-
import MenuContentContext from './_MenuContent.context';
|
|
6
4
|
const MenuPanelDiv = styled.div `
|
|
7
5
|
background-color: ${(props) => props.theme.colours.background};
|
|
8
6
|
border-radius: 2px;
|
|
@@ -27,7 +25,7 @@ const MenuPanelDiv = styled.div `
|
|
|
27
25
|
}
|
|
28
26
|
}}
|
|
29
27
|
|
|
30
|
-
${
|
|
28
|
+
${responsive.useStylesFor('tablet').andSmaller(`
|
|
31
29
|
max-width: unset;
|
|
32
30
|
min-width: unset;
|
|
33
31
|
min-height: unset;
|
|
@@ -36,9 +34,9 @@ const MenuPanelDiv = styled.div `
|
|
|
36
34
|
margin-bottom: 8px;
|
|
37
35
|
`)}
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
`
|
|
41
|
-
|
|
37
|
+
${(props) => responsive.useStylesFor('desktop').andLarger(props.scrollable
|
|
38
|
+
? `
|
|
39
|
+
max-height: calc(100vh - 16px);
|
|
42
40
|
overflow-y: auto;
|
|
43
41
|
|
|
44
42
|
&::-webkit-scrollbar {
|
|
@@ -53,10 +51,10 @@ const MenuPanelDiv = styled.div `
|
|
|
53
51
|
&::-webkit-scrollbar-track {
|
|
54
52
|
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
|
55
53
|
}
|
|
56
|
-
|
|
54
|
+
`
|
|
55
|
+
: ``)}
|
|
57
56
|
`;
|
|
58
|
-
const MenuPanel = ({ children }) => {
|
|
59
|
-
|
|
60
|
-
return (React.createElement(MenuPanelDiv, { panelSize: panelSize, independentScroll: independentScroll }, children));
|
|
57
|
+
const MenuPanel = ({ children, scrollable, panelSize = 'sm' }) => {
|
|
58
|
+
return (React.createElement(MenuPanelDiv, { panelSize: panelSize, scrollable: scrollable }, children));
|
|
61
59
|
};
|
|
62
60
|
export default MenuPanel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Heading } from '../..';
|
|
4
|
+
const HeaderOuter = styled.div `
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 32px;
|
|
7
|
+
`;
|
|
8
|
+
const PageHeader = ({ heading }) => {
|
|
9
|
+
return (React.createElement(HeaderOuter, null,
|
|
10
|
+
React.createElement(Heading, null, heading)));
|
|
11
|
+
};
|
|
12
|
+
export default PageHeader;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Heading } from '../..';
|
|
4
|
+
const SwimlaneOuter = styled.div `
|
|
5
|
+
padding: 8px;
|
|
6
|
+
margin: 0 16px;
|
|
7
|
+
border-top: thin solid ${(props) => props.theme.colours.controlBorder};
|
|
8
|
+
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
|
|
12
|
+
:last-child {
|
|
13
|
+
border-bottom: thin solid ${(props) => props.theme.colours.controlBorder};
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
const SwimlaneLabel = styled.div `
|
|
17
|
+
padding-right: 32px;
|
|
18
|
+
width: 240px;
|
|
19
|
+
min-width: 240px;
|
|
20
|
+
`;
|
|
21
|
+
const SwimlaneContent = styled.div `
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
`;
|
|
25
|
+
const Swimlane = ({ label, children }) => {
|
|
26
|
+
return (React.createElement(SwimlaneOuter, null,
|
|
27
|
+
React.createElement(SwimlaneLabel, null,
|
|
28
|
+
React.createElement(Heading.FormHeading, null, label)),
|
|
29
|
+
React.createElement(SwimlaneContent, null, children)));
|
|
30
|
+
};
|
|
31
|
+
export default Swimlane;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { InlineCard, Badge, Swimlane, CenteredLayout } from '../../';
|
|
4
|
+
const CardWrapper = styled.div `
|
|
5
|
+
margin: 8px;
|
|
6
|
+
`;
|
|
7
|
+
export const Standard = () => {
|
|
8
|
+
return (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement(Swimlane, { label: 'Jobs' },
|
|
10
|
+
React.createElement(CardWrapper, null,
|
|
11
|
+
React.createElement(InlineCard, { size: 'xs' },
|
|
12
|
+
React.createElement(InlineCard.Content, { center: true },
|
|
13
|
+
React.createElement(CenteredLayout, null,
|
|
14
|
+
"Jim",
|
|
15
|
+
`'`,
|
|
16
|
+
"s Mowing")),
|
|
17
|
+
React.createElement(InlineCard.Meta, null,
|
|
18
|
+
React.createElement(Badge, { variant: 'success' }, "Full Time"))))),
|
|
19
|
+
React.createElement(Swimlane, { label: 'Properties' },
|
|
20
|
+
React.createElement(CardWrapper, null,
|
|
21
|
+
React.createElement(InlineCard, { size: 'xs' },
|
|
22
|
+
React.createElement(InlineCard.Content, { center: true },
|
|
23
|
+
React.createElement(CenteredLayout, null, "33 Oak Street")),
|
|
24
|
+
React.createElement(InlineCard.Meta, null,
|
|
25
|
+
React.createElement(Badge, { variant: 'success' }, "Primary")))),
|
|
26
|
+
React.createElement(CardWrapper, null,
|
|
27
|
+
React.createElement(InlineCard, { size: 'xs' },
|
|
28
|
+
React.createElement(InlineCard.Content, { center: true },
|
|
29
|
+
React.createElement(CenteredLayout, null, "402 Main Street")),
|
|
30
|
+
React.createElement(InlineCard.Meta, null,
|
|
31
|
+
React.createElement(Badge, { variant: 'info' }, "Investment")))),
|
|
32
|
+
React.createElement(CardWrapper, null,
|
|
33
|
+
React.createElement(InlineCard, { size: 'xs' },
|
|
34
|
+
React.createElement(InlineCard.Content, { center: true },
|
|
35
|
+
React.createElement(CenteredLayout, null, "12 Heart Avenue")),
|
|
36
|
+
React.createElement(InlineCard.Meta, null,
|
|
37
|
+
React.createElement(Badge, { variant: 'info' }, "Investment"))))),
|
|
38
|
+
React.createElement(Swimlane, { label: 'Investments' },
|
|
39
|
+
React.createElement(CardWrapper, null,
|
|
40
|
+
React.createElement(InlineCard, { size: 'xs' },
|
|
41
|
+
React.createElement(InlineCard.Content, { center: true },
|
|
42
|
+
React.createElement(CenteredLayout, null, "ASX 200")),
|
|
43
|
+
React.createElement(InlineCard.Meta, null,
|
|
44
|
+
React.createElement(Badge, { variant: 'info' }, "Index Fund")))),
|
|
45
|
+
React.createElement(CardWrapper, null,
|
|
46
|
+
React.createElement(InlineCard, { size: 'xs' },
|
|
47
|
+
React.createElement(InlineCard.Content, { center: true },
|
|
48
|
+
React.createElement(CenteredLayout, null, "AMP Super")),
|
|
49
|
+
React.createElement(InlineCard.Meta, null,
|
|
50
|
+
React.createElement(Badge, { variant: 'info' }, "Super Fund")))))));
|
|
51
|
+
};
|
|
52
|
+
export default {
|
|
53
|
+
title: 'Components/Swimlane',
|
|
54
|
+
component: Swimlane,
|
|
55
|
+
};
|
package/build/index.d.ts
CHANGED
|
@@ -20,10 +20,12 @@ export { default as LiveInput } from './components/LiveInput/LiveInput.component
|
|
|
20
20
|
export { default as Loader } from './components/Loader/Loader.component';
|
|
21
21
|
export { default as Menu } from './components/Menu/Menu.component';
|
|
22
22
|
export { default as Modal } from './components/Modal/Modal.component';
|
|
23
|
+
export { default as PageHeader } from './components/PageHeader/PageHeader.component';
|
|
23
24
|
export { default as ProfileImage } from './components/ProfileImage/ProfileImage.component';
|
|
24
25
|
export { default as QrCode } from './components/QrCode/QrCode.component';
|
|
25
26
|
export { default as Spacer } from './components/Spacer/Spacer.component';
|
|
26
27
|
export { default as SquareButton } from './components/SquareButton/SquareButton.component';
|
|
28
|
+
export { default as Swimlane } from './components/Swimlane/Swimlane.component';
|
|
27
29
|
export { default as Table } from './components/Table/Table.component';
|
|
28
30
|
export { default as Text } from './components/Text/Text.component';
|
|
29
31
|
export { default as LoginScreen } from './screens/Login/Login.screen';
|
package/build/index.js
CHANGED
|
@@ -20,10 +20,12 @@ export { default as LiveInput } from './components/LiveInput/LiveInput.component
|
|
|
20
20
|
export { default as Loader } from './components/Loader/Loader.component';
|
|
21
21
|
export { default as Menu } from './components/Menu/Menu.component';
|
|
22
22
|
export { default as Modal } from './components/Modal/Modal.component';
|
|
23
|
+
export { default as PageHeader } from './components/PageHeader/PageHeader.component';
|
|
23
24
|
export { default as ProfileImage } from './components/ProfileImage/ProfileImage.component';
|
|
24
25
|
export { default as QrCode } from './components/QrCode/QrCode.component';
|
|
25
26
|
export { default as Spacer } from './components/Spacer/Spacer.component';
|
|
26
27
|
export { default as SquareButton } from './components/SquareButton/SquareButton.component';
|
|
28
|
+
export { default as Swimlane } from './components/Swimlane/Swimlane.component';
|
|
27
29
|
export { default as Table } from './components/Table/Table.component';
|
|
28
30
|
export { default as Text } from './components/Text/Text.component';
|
|
29
31
|
export { default as LoginScreen } from './screens/Login/Login.screen';
|
|
@@ -4,7 +4,7 @@ const darkTheme = {
|
|
|
4
4
|
background: '#424448',
|
|
5
5
|
overlayBackground: '#a4caf9',
|
|
6
6
|
primary: {
|
|
7
|
-
main: '#
|
|
7
|
+
main: '#94b8e3',
|
|
8
8
|
hover: '#83b7f7',
|
|
9
9
|
contrastText: '#191919',
|
|
10
10
|
},
|
|
@@ -56,7 +56,7 @@ const darkTheme = {
|
|
|
56
56
|
},
|
|
57
57
|
heading: {
|
|
58
58
|
family: `'Roboto', sans-serif`,
|
|
59
|
-
size: '
|
|
59
|
+
size: '28px',
|
|
60
60
|
weight: '500',
|
|
61
61
|
},
|
|
62
62
|
subHeading: {
|
package/package.json
CHANGED