@dtdot/lego 0.13.5 → 0.14.6

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 (28) hide show
  1. package/build/components/ActionMessage/ActionMessage.component.js +2 -2
  2. package/build/components/Card/Card.component.d.ts +5 -2
  3. package/build/components/Card/Card.component.js +52 -9
  4. package/build/components/Card/Card.context.d.ts +3 -0
  5. package/build/components/Card/Card.context.js +4 -0
  6. package/build/components/Card/Card.stories.d.ts +2 -0
  7. package/build/components/Card/Card.stories.js +40 -0
  8. package/build/components/Card/_CardActions.component.d.ts +10 -0
  9. package/build/components/Card/_CardActions.component.js +56 -0
  10. package/build/components/ControlGroup/ControlGroup.component.js +6 -2
  11. package/build/components/Heading/Heading.component.d.ts +5 -1
  12. package/build/components/Heading/Heading.component.js +4 -0
  13. package/build/components/Heading/Heading.stories.d.ts +2 -0
  14. package/build/components/Heading/Heading.stories.js +2 -0
  15. package/build/components/Heading/_FormHeading.component.d.ts +2 -0
  16. package/build/components/Heading/_FormHeading.component.js +16 -0
  17. package/build/components/{SubHeading/SubHeading.component.d.ts → Heading/_SubHeading.component.d.ts} +1 -1
  18. package/build/components/{SubHeading/SubHeading.component.js → Heading/_SubHeading.component.js} +1 -1
  19. package/build/components/ImageUpload/ImageUpload.component.js +1 -0
  20. package/build/components/Menu/Menu.stories.js +3 -3
  21. package/build/{components/SubHeading/SubHeading.stories.d.ts → examples/Form.stories.d.ts} +0 -0
  22. package/build/examples/Form.stories.js +19 -0
  23. package/build/index.d.ts +0 -1
  24. package/build/index.js +0 -1
  25. package/build/theme/dark.theme.js +3 -1
  26. package/build/theme/default.theme.js +2 -0
  27. package/package.json +1 -1
  28. 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))),
@@ -1,12 +1,15 @@
1
1
  import React from 'react';
2
2
  import { CardSize } from './Card.context';
3
- export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ export interface CardProps {
4
4
  children: React.ReactNode;
5
5
  size?: CardSize;
6
6
  padded?: boolean;
7
+ onClick?: () => void;
7
8
  }
8
9
  declare const Card: {
9
- ({ children, padded, size, onClick, ...props }: CardProps): JSX.Element;
10
+ ({ children, padded, size, onClick }: CardProps): JSX.Element;
11
+ Actions: ({ children }: import("./_CardActions.component").CardActionsProps) => React.ReactPortal | null;
12
+ Action: ({ children, onClick }: import("./_CardActions.component").CardActionProps) => JSX.Element;
10
13
  Content: ({ children }: import("./_CardContent.component").CardContentProps) => JSX.Element;
11
14
  SubContent: ({ children }: import("./_CardSubContent.component").CardSubContentProps) => JSX.Element;
12
15
  Media: ({ children }: import("./_CardMedia.component").CardMediaProps) => JSX.Element;
@@ -1,13 +1,27 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
1
+ import { motion } from 'framer-motion';
2
+ import React, { useEffect, useRef, useState } from 'react';
3
+ import styled, { useTheme } from 'styled-components';
3
4
  import responsive from '../../responsive/responsive';
4
5
  import CardContext from './Card.context';
6
+ import { CardActions, CardAction } from './_CardActions.component';
5
7
  import CardContent from './_CardContent.component';
6
8
  import CardHeader from './_CardHeader.component';
7
9
  import CardMedia from './_CardMedia.component';
8
10
  import CardSpacer from './_CardSpacer.component';
9
11
  import CardSubContent from './_CardSubContent.component';
10
- const CardOuter = styled.div `
12
+ const CardActionsContainer = styled.div `
13
+ position: absolute;
14
+ top: -32px;
15
+ `;
16
+ const CardInner = styled.div `
17
+ position: relative;
18
+ z-index: 1;
19
+ width: 100%;
20
+
21
+ background-color: ${(props) => props.theme.colours.cardBackground};
22
+ box-shadow: ${(props) => props.theme.shadows.small};
23
+ `;
24
+ const CardOuter = styled(motion.div) `
11
25
  ${(props) => {
12
26
  switch (props.size) {
13
27
  case 'fill':
@@ -46,16 +60,45 @@ const CardOuter = styled.div `
46
60
  }
47
61
  }}
48
62
 
49
- cursor: ${(props) => (props.usePointer ? 'cursor' : 'default')};
63
+ &:hover {
64
+ z-index: 1;
65
+ }
50
66
 
67
+ position: relative;
68
+ cursor: ${(props) => (props.usePointer ? 'pointer' : 'default')};
51
69
  padding: ${(props) => (props.padded ? '16px' : 0)};
52
- background-color: ${(props) => props.theme.colours.cardBackground};
53
- box-shadow: ${(props) => props.theme.shadows.small};
54
70
  `;
55
- const Card = ({ children, padded, size = 'sm', onClick, ...props }) => {
56
- return (React.createElement(CardContext.Provider, { value: { size } },
57
- React.createElement(CardOuter, Object.assign({ size: size, padded: padded, onClick: onClick, usePointer: !!onClick }, props), children)));
71
+ const Card = ({ children, padded, size = 'sm', onClick }) => {
72
+ const actionsRef = useRef(null);
73
+ const [htmlActionsRef, setHtmlActionsRef] = useState();
74
+ const [showActions, setShowActions] = useState(false);
75
+ const [hasActions, setHasActions] = useState(false);
76
+ const theme = useTheme();
77
+ useEffect(() => {
78
+ if (actionsRef.current) {
79
+ setHtmlActionsRef(actionsRef.current);
80
+ }
81
+ }, [actionsRef]);
82
+ const handleClick = (e) => {
83
+ if (e.isActionClick) {
84
+ return;
85
+ }
86
+ if (onClick) {
87
+ onClick();
88
+ }
89
+ };
90
+ return (React.createElement(CardContext.Provider, { value: { size, actionsRef: htmlActionsRef, showActions, setHasActions } },
91
+ React.createElement(CardOuter, { onHoverStart: () => setShowActions(true), onHoverEnd: () => setShowActions(false), key: 'actions-container', transition: { type: 'spring', bounce: 0, duration: 0.6 }, whileHover: hasActions
92
+ ? {
93
+ scale: 1.005,
94
+ boxShadow: theme.shadows.xlarge,
95
+ }
96
+ : {}, size: size, padded: padded, onClick: handleClick, usePointer: !!onClick },
97
+ React.createElement(CardActionsContainer, { ref: actionsRef }),
98
+ React.createElement(CardInner, null, children))));
58
99
  };
100
+ Card.Actions = CardActions;
101
+ Card.Action = CardAction;
59
102
  Card.Content = CardContent;
60
103
  Card.SubContent = CardSubContent;
61
104
  Card.Media = CardMedia;
@@ -2,6 +2,9 @@
2
2
  export declare type CardSize = 'fill' | 'xs' | 'sm' | 'md' | 'lg';
3
3
  interface CardContextProps {
4
4
  size: CardSize;
5
+ actionsRef?: HTMLDivElement;
6
+ showActions: boolean;
7
+ setHasActions: (hasActions: boolean) => void;
5
8
  }
6
9
  declare const CardContext: import("react").Context<CardContextProps>;
7
10
  export default CardContext;
@@ -1,5 +1,9 @@
1
1
  import { createContext } from 'react';
2
2
  const CardContext = createContext({
3
3
  size: 'lg',
4
+ actionsRef: undefined,
5
+ showActions: false,
6
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
7
+ setHasActions: () => { },
4
8
  });
5
9
  export default CardContext;
@@ -3,5 +3,7 @@ import { Meta } from '@storybook/react/types-6-0';
3
3
  export declare const Standard: () => JSX.Element;
4
4
  export declare const Sizes: () => JSX.Element;
5
5
  export declare const CardHeader: () => JSX.Element;
6
+ export declare const Clickable: () => JSX.Element;
7
+ export declare const WithActions: () => JSX.Element;
6
8
  declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
7
9
  export default _default;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Card, CardGroup, LiveInput, Badge } from '../..';
3
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
+ import { faPen, faTrash } from '@fortawesome/free-solid-svg-icons';
3
5
  export const Standard = () => (React.createElement(CardGroup, null,
4
6
  React.createElement(Card, { size: 'sm' },
5
7
  React.createElement(Card.Content, null, "Some content"),
@@ -34,6 +36,44 @@ export const CardHeader = () => (React.createElement(CardGroup, null,
34
36
  React.createElement(Card.Header, { heading: 'Mario & Luigi', subHeading: 'mario@gmail.com', meta: React.createElement(Badge, { variant: 'success' }, "approved") }),
35
37
  React.createElement(Card.Content, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."),
36
38
  React.createElement(Card.Content, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."))));
39
+ export const Clickable = () => (React.createElement(CardGroup, null,
40
+ React.createElement(Card, { size: 'sm', onClick: () => console.log('test') },
41
+ React.createElement(Card.Content, null, "Some content"),
42
+ React.createElement(Card.Spacer, null),
43
+ React.createElement(Card.Content, null, "Some more content..."),
44
+ React.createElement(Card.Spacer, null),
45
+ React.createElement(Card.SubContent, null, "Some sub content..."))));
46
+ export const WithActions = () => (React.createElement(React.Fragment, null,
47
+ React.createElement("br", null),
48
+ React.createElement("br", null),
49
+ React.createElement(CardGroup, null,
50
+ React.createElement(Card, { size: 'sm', onClick: () => console.log('Card Clicked') },
51
+ React.createElement(Card.Actions, null,
52
+ React.createElement(Card.Action, { onClick: () => console.log('Edit Clicked') },
53
+ React.createElement(FontAwesomeIcon, { icon: faPen })),
54
+ React.createElement(Card.Action, { onClick: () => console.log('Delete Clicked') },
55
+ React.createElement(FontAwesomeIcon, { icon: faTrash }))),
56
+ React.createElement(Card.Header, { heading: 'Mario & Luigi', subHeading: 'mario@gmail.com', meta: React.createElement(Badge, { variant: 'success' }, "approved") }),
57
+ React.createElement(Card.Content, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."),
58
+ React.createElement(Card.Content, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.")),
59
+ React.createElement(Card, { size: 'sm', onClick: () => console.log('Card Clicked') },
60
+ React.createElement(Card.Actions, null,
61
+ React.createElement(Card.Action, { onClick: () => console.log('Edit Clicked') },
62
+ React.createElement(FontAwesomeIcon, { icon: faPen })),
63
+ React.createElement(Card.Action, { onClick: () => console.log('Delete Clicked') },
64
+ React.createElement(FontAwesomeIcon, { icon: faTrash }))),
65
+ React.createElement(Card.Header, { heading: 'Mario & Luigi', subHeading: 'mario@gmail.com', meta: React.createElement(Badge, { variant: 'success' }, "approved") }),
66
+ React.createElement(Card.Content, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."),
67
+ React.createElement(Card.Content, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.")),
68
+ React.createElement(Card, { size: 'sm', onClick: () => console.log('Card Clicked') },
69
+ React.createElement(Card.Actions, null,
70
+ React.createElement(Card.Action, { onClick: () => console.log('Edit Clicked') },
71
+ React.createElement(FontAwesomeIcon, { icon: faPen })),
72
+ React.createElement(Card.Action, { onClick: () => console.log('Delete Clicked') },
73
+ React.createElement(FontAwesomeIcon, { icon: faTrash }))),
74
+ React.createElement(Card.Header, { heading: 'Mario & Luigi', subHeading: 'mario@gmail.com', meta: React.createElement(Badge, { variant: 'success' }, "approved") }),
75
+ React.createElement(Card.Content, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."),
76
+ React.createElement(Card.Content, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.")))));
37
77
  export default {
38
78
  title: 'Components/Card',
39
79
  component: Card,
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface CardActionsProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const CardActions: ({ children }: CardActionsProps) => React.ReactPortal | null;
6
+ export interface CardActionProps {
7
+ children: React.ReactNode;
8
+ onClick?: () => void;
9
+ }
10
+ export declare const CardAction: ({ children, onClick }: CardActionProps) => JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { AnimatePresence, motion } from 'framer-motion';
2
+ import React, { useContext, useEffect } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import styled from 'styled-components';
5
+ import CardContext from './Card.context';
6
+ const actionsHeight = 32;
7
+ const ActionsContainer = styled(motion.div) `
8
+ display: flex;
9
+ padding: 0 8px;
10
+
11
+ cursor: default;
12
+ `;
13
+ const ActionContainer = styled.div `
14
+ height: ${actionsHeight}px;
15
+ width: 48px;
16
+
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+
21
+ color: ${(props) => props.theme.colours.defaultFont};
22
+ background-color: ${(props) => props.theme.colours.cardBackground};
23
+ padding: 4px;
24
+ border-radius: 4px 4px 0 0;
25
+
26
+ box-shadow: ${(props) => props.theme.shadows.xlarge};
27
+
28
+ margin-right: 8px;
29
+ cursor: pointer;
30
+ `;
31
+ export const CardActions = ({ children }) => {
32
+ const { actionsRef, showActions, setHasActions } = useContext(CardContext);
33
+ useEffect(() => {
34
+ setHasActions(true);
35
+ return () => {
36
+ setHasActions(false);
37
+ };
38
+ }, [setHasActions]);
39
+ if (!showActions) {
40
+ return null;
41
+ }
42
+ if (!actionsRef) {
43
+ return null;
44
+ }
45
+ return createPortal(React.createElement(AnimatePresence, null,
46
+ React.createElement(ActionsContainer, { key: 'actions-container', initial: { y: actionsHeight }, animate: { y: 0 }, exit: { y: actionsHeight }, transition: { type: 'spring', bounce: 0, duration: 0.6 } }, children)), actionsRef);
47
+ };
48
+ export const CardAction = ({ children, onClick }) => {
49
+ const handleClick = (e) => {
50
+ e.isActionClick = true;
51
+ if (onClick) {
52
+ onClick();
53
+ }
54
+ };
55
+ return React.createElement(ActionContainer, { onClick: handleClick }, children);
56
+ };
@@ -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,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,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
@@ -22,7 +22,6 @@ export { default as Menu } from './components/Menu/Menu.component';
22
22
  export { default as Modal } from './components/Modal/Modal.component';
23
23
  export { default as ProfileImage } from './components/ProfileImage/ProfileImage.component';
24
24
  export { default as QrCode } from './components/QrCode/QrCode.component';
25
- export { default as SubHeading } from './components/SubHeading/SubHeading.component';
26
25
  export { default as Spacer } from './components/Spacer/Spacer.component';
27
26
  export { default as SquareButton } from './components/SquareButton/SquareButton.component';
28
27
  export { default as Table } from './components/Table/Table.component';
package/build/index.js CHANGED
@@ -22,7 +22,6 @@ export { default as Menu } from './components/Menu/Menu.component';
22
22
  export { default as Modal } from './components/Modal/Modal.component';
23
23
  export { default as ProfileImage } from './components/ProfileImage/ProfileImage.component';
24
24
  export { default as QrCode } from './components/QrCode/QrCode.component';
25
- export { default as SubHeading } from './components/SubHeading/SubHeading.component';
26
25
  export { default as Spacer } from './components/Spacer/Spacer.component';
27
26
  export { default as SquareButton } from './components/SquareButton/SquareButton.component';
28
27
  export { default as Table } from './components/Table/Table.component';
@@ -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
  },
@@ -68,6 +68,8 @@ const darkTheme = {
68
68
  shadows: {
69
69
  small: '0px 0px 2px rgba(0, 0, 0, 0.15)',
70
70
  medium: '0px 0px 4px rgba(0, 0, 0, 0.15)',
71
+ large: '0px 0px 8px rgba(0, 0, 0, 0.15)',
72
+ xlarge: '0px 0px 16px rgba(0, 0, 0, 0.25)',
71
73
  },
72
74
  };
73
75
  export default darkTheme;
@@ -69,6 +69,8 @@ const defaultTheme = {
69
69
  shadows: {
70
70
  small: '0px 0px 2px rgba(0, 0, 0, 0.15)',
71
71
  medium: '0px 0px 4px rgba(0, 0, 0, 0.15)',
72
+ large: '0px 0px 8px rgba(0, 0, 0, 0.15)',
73
+ xlarge: '0px 0px 16px rgba(0, 0, 0, 0.25)',
72
74
  },
73
75
  };
74
76
  export default defaultTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtdot/lego",
3
- "version": "0.13.5",
3
+ "version": "0.14.6",
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
- };