@dtdot/lego 0.14.3 → 0.14.8

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 (37) hide show
  1. package/build/components/ActionMessage/ActionMessage.component.js +2 -2
  2. package/build/components/Card/Card.component.js +1 -1
  3. package/build/components/Card/Card.stories.js +4 -0
  4. package/build/components/Card/_CardHeader.component.d.ts +1 -1
  5. package/build/components/ControlGroup/ControlGroup.component.js +6 -2
  6. package/build/components/Heading/Heading.component.d.ts +5 -1
  7. package/build/components/Heading/Heading.component.js +4 -0
  8. package/build/components/Heading/Heading.stories.d.ts +2 -0
  9. package/build/components/Heading/Heading.stories.js +2 -0
  10. package/build/components/Heading/_FormHeading.component.d.ts +2 -0
  11. package/build/components/Heading/_FormHeading.component.js +16 -0
  12. package/build/components/{SubHeading/SubHeading.component.d.ts → Heading/_SubHeading.component.d.ts} +1 -1
  13. package/build/components/{SubHeading/SubHeading.component.js → Heading/_SubHeading.component.js} +1 -1
  14. package/build/components/ImageUpload/ImageUpload.component.js +1 -0
  15. package/build/components/InlineCard/InlineCard.component.d.ts +5 -2
  16. package/build/components/InlineCard/InlineCard.component.js +43 -2
  17. package/build/components/InlineCard/InlineCard.stories.js +4 -2
  18. package/build/components/InlineCard/_InlineCardContent.component.d.ts +2 -1
  19. package/build/components/InlineCard/_InlineCardContent.component.js +9 -2
  20. package/build/components/InlineCard/_InlineCardMeta.component.d.ts +6 -0
  21. package/build/components/InlineCard/_InlineCardMeta.component.js +15 -0
  22. package/build/components/Menu/Menu.stories.js +3 -3
  23. package/build/components/PageHeader/PageHeader.component.d.ts +6 -0
  24. package/build/components/PageHeader/PageHeader.component.js +12 -0
  25. package/build/components/{SubHeading/SubHeading.stories.d.ts → PageHeader/PageHeader.stories.d.ts} +0 -0
  26. package/build/components/PageHeader/PageHeader.stories.js +9 -0
  27. package/build/components/Swimlane/Swimlane.component.d.ts +7 -0
  28. package/build/components/Swimlane/Swimlane.component.js +31 -0
  29. package/build/components/Swimlane/Swimlane.stories.d.ts +5 -0
  30. package/build/components/Swimlane/Swimlane.stories.js +55 -0
  31. package/build/examples/Form.stories.d.ts +5 -0
  32. package/build/examples/Form.stories.js +19 -0
  33. package/build/index.d.ts +2 -1
  34. package/build/index.js +2 -1
  35. package/build/theme/dark.theme.js +2 -2
  36. package/package.json +1 -1
  37. package/build/components/SubHeading/SubHeading.stories.js +0 -7
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
- import { Button, Spacer, SubHeading, Text } from '../..';
3
+ import { Button, Heading, Spacer, Text } from '../..';
4
4
  const ActionMessageContainer = styled.div `
5
5
  width: 100%;
6
6
  padding: 64px 0;
@@ -16,7 +16,7 @@ const ActionMessageContainer = styled.div `
16
16
  const ActionMessage = ({ header, info, action, onAction }) => {
17
17
  return (React.createElement(ActionMessageContainer, null,
18
18
  React.createElement("div", null,
19
- React.createElement(SubHeading, null, header)),
19
+ React.createElement(Heading.SubHeading, null, header)),
20
20
  info && (React.createElement(React.Fragment, null,
21
21
  React.createElement(Spacer, { size: '1x' }),
22
22
  React.createElement(Text, null, info))),
@@ -30,7 +30,7 @@ const CardOuter = styled(motion.div) `
30
30
  `;
31
31
  case 'xs':
32
32
  return `
33
- width: 240px;
33
+ width: 360px;
34
34
  ${responsive.useStylesFor('mobile').andSmaller(`
35
35
  width: 100%;
36
36
  `)}
@@ -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: string;
5
+ subHeading?: string;
6
6
  meta?: React.ReactNode;
7
7
  }
8
8
  declare const CardHeader: ({ image, heading, subHeading, meta }: CardHeaderProps) => JSX.Element;
@@ -1,17 +1,21 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import ButtonContext from '../Button/Button.context';
4
- import SubHeading from '../SubHeading/SubHeading.component';
4
+ import Heading from '../Heading/Heading.component';
5
5
  import ControlGroupSpacer from './_ControlGroupSpacer.component';
6
6
  const ComfortableContainer = styled.div `
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
 
10
- ${SubHeading} {
10
+ ${Heading.SubHeading} {
11
11
  margin-top: 16px;
12
12
  margin-bottom: 16px;
13
13
  }
14
14
 
15
+ ${Heading.FormHeading} {
16
+ margin-top: 32px;
17
+ }
18
+
15
19
  & > * {
16
20
  margin-bottom: 16px;
17
21
 
@@ -2,5 +2,9 @@ import React from 'react';
2
2
  export interface HeadingProps {
3
3
  children: React.ReactNode;
4
4
  }
5
- declare const Heading: ({ children }: HeadingProps) => JSX.Element;
5
+ declare const Heading: {
6
+ ({ children }: HeadingProps): JSX.Element;
7
+ SubHeading: import("styled-components").StyledComponent<"h3", import("styled-components").DefaultTheme, {}, never>;
8
+ FormHeading: import("styled-components").StyledComponent<"h3", import("styled-components").DefaultTheme, {}, never>;
9
+ };
6
10
  export default Heading;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
+ import FormHeading from './_FormHeading.component';
4
+ import SubHeading from './_SubHeading.component';
3
5
  const HeadingContainer = styled.h2 `
4
6
  font-family: ${(props) => props.theme.fonts.heading.family};
5
7
  font-size: ${(props) => props.theme.fonts.heading.size};
@@ -10,4 +12,6 @@ const HeadingContainer = styled.h2 `
10
12
  margin: 0;
11
13
  `;
12
14
  const Heading = ({ children }) => React.createElement(HeadingContainer, null, children);
15
+ Heading.SubHeading = SubHeading;
16
+ Heading.FormHeading = FormHeading;
13
17
  export default Heading;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Meta } from '@storybook/react/types-6-0';
3
3
  export declare const Standard: () => JSX.Element;
4
+ export declare const SubHeading: () => JSX.Element;
5
+ export declare const FormHeading: () => JSX.Element;
4
6
  declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
5
7
  export default _default;
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Heading } from '../..';
3
3
  export const Standard = () => React.createElement(Heading, null, "A Standard Heading");
4
+ export const SubHeading = () => React.createElement(Heading.SubHeading, null, "A Standard Sub Heading");
5
+ export const FormHeading = () => React.createElement(Heading.FormHeading, null, "A Standard Sub Heading");
4
6
  export default {
5
7
  title: 'Components/Heading',
6
8
  component: Heading,
@@ -0,0 +1,2 @@
1
+ declare const FormHeading: import("styled-components").StyledComponent<"h3", import("styled-components").DefaultTheme, {}, never>;
2
+ export default FormHeading;
@@ -0,0 +1,16 @@
1
+ import styled from 'styled-components';
2
+ import getThemeControlColours from '../../theme/helpers/getThemeControlColours';
3
+ const FormHeading = styled.h3 `
4
+ font-family: ${(props) => props.theme.fonts.default.family};
5
+ font-size: ${(props) => props.theme.fonts.default.size};
6
+ font-weight: ${(props) => props.theme.fonts.default.weight};
7
+
8
+ color: ${(props) => props.theme.colours.defaultFont};
9
+
10
+ margin: 0;
11
+
12
+ border-left: 4px solid ${(props) => getThemeControlColours(props.theme).background};
13
+ line-height: 48px;
14
+ padding-left: 16px;
15
+ `;
16
+ export default FormHeading;
@@ -1,2 +1,2 @@
1
- declare const SubHeading: import("styled-components").StyledComponent<"h2", import("styled-components").DefaultTheme, {}, never>;
1
+ declare const SubHeading: import("styled-components").StyledComponent<"h3", import("styled-components").DefaultTheme, {}, never>;
2
2
  export default SubHeading;
@@ -1,5 +1,5 @@
1
1
  import styled from 'styled-components';
2
- const SubHeading = styled.h2 `
2
+ const SubHeading = styled.h3 `
3
3
  font-family: ${(props) => props.theme.fonts.subHeading.family};
4
4
  font-size: ${(props) => props.theme.fonts.subHeading.size};
5
5
  font-weight: ${(props) => props.theme.fonts.subHeading.weight};
@@ -9,6 +9,7 @@ const UploadContainer = styled.div `
9
9
  position: relative;
10
10
  min-height: 144px;
11
11
  background-color: ${(props) => props.theme.colours.uploadBackground};
12
+ border: 1px solid #565656;
12
13
 
13
14
  height: 100%;
14
15
  width: 100%;
@@ -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, null, children);
19
+ const InlineCardContent = ({ children, center }) => {
20
+ return React.createElement(ContentContainer, { center: center }, children);
14
21
  };
15
22
  export default InlineCardContent;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface InlineCardMetaProps {
3
+ children: React.ReactNode;
4
+ }
5
+ declare const InlineCardMeta: ({ children }: InlineCardMetaProps) => JSX.Element;
6
+ export default InlineCardMeta;
@@ -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;
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import { ControlGroup, Heading, Menu, Spacer, Text, FocusLayout, PaddedLayout, Input, Button, menuHelpers, ContentLayout, SubHeading, } from '../..';
2
+ import { ControlGroup, Heading, Menu, Spacer, Text, FocusLayout, PaddedLayout, Input, Button, menuHelpers, ContentLayout, } from '../..';
3
3
  import { faCalendarAlt, faCogs, faHamburger } from '@fortawesome/free-solid-svg-icons';
4
4
  export const Standard = () => {
5
5
  const [route, setRoute] = useState('/eat');
@@ -33,9 +33,9 @@ export const WithPanel = () => {
33
33
  React.createElement(Menu.Panel, null,
34
34
  React.createElement(PaddedLayout, null,
35
35
  React.createElement(ControlGroup, { variation: 'comfortable' },
36
- React.createElement(SubHeading, null, "You"),
36
+ React.createElement(Heading.SubHeading, null, "You"),
37
37
  React.createElement(Input, { label: 'Income', name: 'name', placeholder: '30,000' }),
38
- React.createElement(SubHeading, null, "Loan"),
38
+ React.createElement(Heading.SubHeading, null, "Loan"),
39
39
  React.createElement(Input, { label: 'Deposit', name: 'name', placeholder: '10,000' }),
40
40
  React.createElement(Input, { label: 'Interest Rate', name: 'name', placeholder: '4%' })))),
41
41
  React.createElement(Menu.Page, null,
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface PageHeaderProps {
3
+ heading: string;
4
+ }
5
+ declare const PageHeader: ({ heading }: PageHeaderProps) => JSX.Element;
6
+ export default PageHeader;
@@ -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,9 @@
1
+ import React from 'react';
2
+ import { PageHeader } from '../../';
3
+ export const Standard = () => {
4
+ return React.createElement(PageHeader, { heading: 'Frank the Drummer' });
5
+ };
6
+ export default {
7
+ title: 'Components/PageHeader',
8
+ component: PageHeader,
9
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface SwimlaneProps {
3
+ label: string;
4
+ children: React.ReactNode;
5
+ }
6
+ declare const Swimlane: ({ label, children }: SwimlaneProps) => JSX.Element;
7
+ export default Swimlane;
@@ -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,5 @@
1
+ /// <reference types="react" />
2
+ import { Meta } from '@storybook/react/types-6-0';
3
+ export declare const Standard: () => JSX.Element;
4
+ declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
5
+ export default _default;
@@ -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
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Meta } from '@storybook/react/types-6-0';
3
+ export declare const Standard: () => JSX.Element;
4
+ declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
5
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import React, { useState } from 'react';
2
+ import { ControlGroup, FocusLayout, Form, Heading, Input, ImageUpload } from '../';
3
+ /* eslint-disable @typescript-eslint/no-empty-function */
4
+ export const Standard = () => {
5
+ const [value, setValue] = useState({ dragon: '' });
6
+ return (React.createElement(FocusLayout, null,
7
+ React.createElement(Form, { value: value, onChange: setValue },
8
+ React.createElement(ControlGroup, { variation: 'comfortable' },
9
+ React.createElement(ImageUpload, { name: 'image' }),
10
+ React.createElement(Input, { name: 'name', placeholder: 'Something tasty..' }),
11
+ React.createElement(Heading.FormHeading, null, "Components"),
12
+ React.createElement(Input, { name: 'one', placeholder: 'Ingredient #1' }),
13
+ React.createElement(Input, { name: 'two', placeholder: 'Ingredient #2' }),
14
+ React.createElement(Input, { name: 'three', placeholder: 'Ingredient #3' })))));
15
+ };
16
+ export default {
17
+ title: 'Examples/Forms',
18
+ component: Form,
19
+ };
package/build/index.d.ts CHANGED
@@ -20,11 +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
- export { default as SubHeading } from './components/SubHeading/SubHeading.component';
26
26
  export { default as Spacer } from './components/Spacer/Spacer.component';
27
27
  export { default as SquareButton } from './components/SquareButton/SquareButton.component';
28
+ export { default as Swimlane } from './components/Swimlane/Swimlane.component';
28
29
  export { default as Table } from './components/Table/Table.component';
29
30
  export { default as Text } from './components/Text/Text.component';
30
31
  export { default as LoginScreen } from './screens/Login/Login.screen';
package/build/index.js CHANGED
@@ -20,11 +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
- export { default as SubHeading } from './components/SubHeading/SubHeading.component';
26
26
  export { default as Spacer } from './components/Spacer/Spacer.component';
27
27
  export { default as SquareButton } from './components/SquareButton/SquareButton.component';
28
+ export { default as Swimlane } from './components/Swimlane/Swimlane.component';
28
29
  export { default as Table } from './components/Table/Table.component';
29
30
  export { default as Text } from './components/Text/Text.component';
30
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: '#61a4f5',
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: '36px',
59
+ size: '28px',
60
60
  weight: '500',
61
61
  },
62
62
  subHeading: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtdot/lego",
3
- "version": "0.14.3",
3
+ "version": "0.14.8",
4
4
  "description": "Some reusable components for building my applications",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { SubHeading } from '../..';
3
- export const Standard = () => React.createElement(SubHeading, null, "A Standard Subheading");
4
- export default {
5
- title: 'Components/SubHeading',
6
- component: SubHeading,
7
- };