@hlf-fe/pulmo-ui 1.0.1 → 1.2.0
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/README.md +21 -54
- package/dist/components/buttons/button/button.js +1 -1
- package/dist/components/buttons/button/button.stories.js +6 -1
- package/dist/components/buttons/loading-button/loading-button.d.ts +14 -0
- package/dist/components/buttons/loading-button/loading-button.js +26 -0
- package/dist/components/buttons/loading-button/loading-button.stories.d.ts +7 -0
- package/dist/components/buttons/loading-button/loading-button.stories.js +23 -0
- package/dist/components/buttons/text-button/text-button.d.ts +20 -0
- package/dist/components/buttons/text-button/text-button.js +61 -0
- package/dist/components/buttons/text-button/text-button.stories.d.ts +6 -0
- package/dist/components/buttons/text-button/text-button.stories.js +16 -0
- package/dist/components/decorator/decorator.d.ts +7 -0
- package/dist/components/decorator/decorator.js +13 -0
- package/dist/components/feedback/alert/alert.d.ts +17 -0
- package/dist/components/feedback/alert/alert.js +68 -0
- package/dist/components/feedback/alert/alert.stories.d.ts +6 -0
- package/dist/components/feedback/alert/alert.stories.js +23 -0
- package/dist/components/icons/chevron-left-icon/chevron-left-icon.d.ts +7 -0
- package/dist/components/icons/chevron-left-icon/chevron-left-icon.js +3 -0
- package/dist/components/icons/chevron-left-icon/chevron-left-icon.stories.d.ts +6 -0
- package/dist/components/icons/chevron-left-icon/chevron-left-icon.stories.js +14 -0
- package/dist/components/icons/chevron-right-icon/chevron-right-icon.d.ts +7 -0
- package/dist/components/icons/chevron-right-icon/chevron-right-icon.js +3 -0
- package/dist/components/icons/chevron-right-icon/chevron-right-icon.stories.d.ts +6 -0
- package/dist/components/icons/chevron-right-icon/chevron-right-icon.stories.js +14 -0
- package/dist/components/icons/close-icon/close-icon.d.ts +12 -0
- package/dist/components/icons/close-icon/close-icon.js +9 -0
- package/dist/components/icons/close-icon/close-icon.stories.d.ts +6 -0
- package/dist/components/icons/close-icon/close-icon.stories.js +16 -0
- package/dist/components/icons/exclamation-mark-icon/exclamation-mark-icon.d.ts +3 -0
- package/dist/components/icons/exclamation-mark-icon/exclamation-mark-icon.js +3 -0
- package/dist/components/icons/exclamation-mark-icon/exclamation-mark-icon.stories.d.ts +6 -0
- package/dist/components/icons/exclamation-mark-icon/exclamation-mark-icon.stories.js +16 -0
- package/dist/components/icons/external-icon/external-icon.d.ts +5 -0
- package/dist/components/icons/external-icon/external-icon.js +2 -0
- package/dist/components/icons/external-icon/external-icon.stories.d.ts +6 -0
- package/dist/components/icons/external-icon/external-icon.stories.js +14 -0
- package/dist/components/icons/hamburger-icon/hamburger-icon.d.ts +1 -0
- package/dist/components/icons/hamburger-icon/hamburger-icon.js +2 -0
- package/dist/components/icons/hamburger-icon/hamburger-icon.stories.d.ts +6 -0
- package/dist/components/icons/hamburger-icon/hamburger-icon.stories.js +14 -0
- package/dist/components/icons/heart-icon/heart-icon.d.ts +1 -0
- package/dist/components/icons/heart-icon/heart-icon.js +2 -0
- package/dist/components/icons/heart-icon/heart-icon.stories.d.ts +6 -0
- package/dist/components/icons/heart-icon/heart-icon.stories.js +12 -0
- package/dist/components/icons/loading-spinner/loading-spinner.d.ts +20 -0
- package/dist/components/icons/loading-spinner/loading-spinner.js +32 -0
- package/dist/components/icons/loading-spinner/loading-spinner.stories.d.ts +6 -0
- package/dist/components/icons/loading-spinner/loading-spinner.stories.js +18 -0
- package/dist/components/icons/menu-close-icon/menu-close-icon.d.ts +1 -0
- package/dist/components/icons/menu-close-icon/menu-close-icon.js +2 -0
- package/dist/components/icons/menu-close-icon/menu-close-icon.stories.d.ts +6 -0
- package/dist/components/icons/menu-close-icon/menu-close-icon.stories.js +14 -0
- package/dist/components/icons/search-icon/search-icon.d.ts +5 -0
- package/dist/components/icons/search-icon/search-icon.js +3 -0
- package/dist/components/icons/search-icon/search-icon.stories.d.ts +6 -0
- package/dist/components/icons/search-icon/search-icon.stories.js +18 -0
- package/dist/components/icons/toggable-chevron/toggable-chevron.d.ts +12 -0
- package/dist/components/icons/toggable-chevron/toggable-chevron.js +20 -0
- package/dist/components/icons/toggable-chevron/toggable-chevron.stories.d.ts +7 -0
- package/dist/components/icons/toggable-chevron/toggable-chevron.stories.js +21 -0
- package/dist/components/icons/toggable-plus-minus-icon/toggable-plus-minus-icon.d.ts +6 -0
- package/dist/components/icons/toggable-plus-minus-icon/toggable-plus-minus-icon.js +13 -0
- package/dist/components/icons/toggable-plus-minus-icon/toggable-plus-minus-icon.stories.d.ts +7 -0
- package/dist/components/icons/toggable-plus-minus-icon/toggable-plus-minus-icon.stories.js +21 -0
- package/dist/components/icons/warning-icon/warning-icon.d.ts +3 -0
- package/dist/components/icons/warning-icon/warning-icon.js +3 -0
- package/dist/components/icons/warning-icon/warning-icon.stories.d.ts +6 -0
- package/dist/components/icons/warning-icon/warning-icon.stories.js +16 -0
- package/dist/components/inputs/dropdown/dropdown-list-item.d.ts +6 -0
- package/dist/components/inputs/dropdown/dropdown-list-item.js +33 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts +13 -0
- package/dist/components/inputs/dropdown/dropdown.js +109 -0
- package/dist/components/inputs/dropdown/dropdown.stories.d.ts +7 -0
- package/dist/components/inputs/dropdown/dropdown.stories.js +84 -0
- package/dist/components/inputs/form-error/form-error.d.ts +11 -0
- package/dist/components/inputs/form-error/form-error.js +16 -0
- package/dist/components/inputs/form-error/form-error.stories.d.ts +6 -0
- package/dist/components/inputs/form-error/form-error.stories.js +22 -0
- package/dist/components/inputs/form-label/form-label.d.ts +7 -0
- package/dist/components/inputs/form-label/form-label.js +12 -0
- package/dist/components/inputs/form-label/form-label.stories.d.ts +6 -0
- package/dist/components/inputs/form-label/form-label.stories.js +16 -0
- package/dist/components/inputs/text-field/text-field.d.ts +32 -0
- package/dist/components/inputs/text-field/text-field.js +65 -0
- package/dist/components/inputs/text-field/text-field.stories.d.ts +11 -0
- package/dist/components/inputs/text-field/text-field.stories.js +51 -0
- package/dist/components/layout/accordion/accordion.d.ts +13 -0
- package/dist/components/layout/accordion/accordion.js +115 -0
- package/dist/components/layout/accordion/accordion.stories.d.ts +6 -0
- package/dist/components/layout/accordion/accordion.stories.js +14 -0
- package/dist/components/layout/container/container.d.ts +10 -0
- package/dist/components/layout/container/container.js +19 -0
- package/dist/components/layout/container/container.stories.d.ts +9 -0
- package/dist/components/layout/container/container.stories.js +47 -0
- package/dist/components/layout/image/image.d.ts +22 -0
- package/dist/components/layout/image/image.js +27 -0
- package/dist/components/layout/image/image.stories.d.ts +6 -0
- package/dist/components/layout/image/image.stories.js +33 -0
- package/dist/components/modules/email-signup-form/email-signup-form.d.ts +16 -0
- package/dist/components/modules/email-signup-form/email-signup-form.js +63 -0
- package/dist/components/modules/email-signup-form/email-signup-form.stories.d.ts +9 -0
- package/dist/components/modules/email-signup-form/email-signup-form.stories.js +51 -0
- package/dist/components/modules/entry-list/entry-list.d.ts +27 -0
- package/dist/components/modules/entry-list/entry-list.js +54 -0
- package/dist/components/modules/entry-list/entry-list.stories.d.ts +6 -0
- package/dist/components/modules/entry-list/entry-list.stories.js +14 -0
- package/dist/components/navigation/nav-cell/nav-cell.d.ts +6 -0
- package/dist/components/navigation/nav-cell/nav-cell.js +67 -0
- package/dist/components/navigation/nav-cell/nav-cell.stories.d.ts +7 -0
- package/dist/components/navigation/nav-cell/nav-cell.stories.js +23 -0
- package/dist/components/navigation/nav-item/nav-item.d.ts +18 -0
- package/dist/components/navigation/nav-item/nav-item.js +106 -0
- package/dist/components/navigation/nav-item/nav-item.stories.d.ts +9 -0
- package/dist/components/navigation/nav-item/nav-item.stories.js +73 -0
- package/dist/components/navigation/pagination/pagination.d.ts +12 -0
- package/dist/components/navigation/pagination/pagination.js +114 -0
- package/dist/components/navigation/pagination/pagination.stories.d.ts +6 -0
- package/dist/components/navigation/pagination/pagination.stories.js +21 -0
- package/dist/components/surfaces/cards/card-banner/card-banner.d.ts +14 -0
- package/dist/components/surfaces/cards/card-banner/card-banner.js +62 -0
- package/dist/components/surfaces/cards/card-banner/card-banner.stories.d.ts +6 -0
- package/dist/components/surfaces/cards/card-banner/card-banner.stories.js +29 -0
- package/dist/constants/general.d.ts +4 -0
- package/dist/constants/general.js +5 -0
- package/dist/hoc/withDefaultTheme.d.ts +1 -1
- package/dist/hoc/withDefaultTheme.js +4 -8
- package/dist/index.d.ts +50 -2
- package/dist/index.js +52 -2
- package/dist/mocks/image-mocks.d.ts +30 -0
- package/dist/mocks/image-mocks.js +32 -0
- package/dist/models/sanity-types.d.ts +9 -0
- package/dist/models/web-page-url.d.ts +10 -0
- package/dist/models/web-page-url.js +1 -0
- package/dist/styles/mixins.js +8 -4
- package/dist/styles/theme.d.ts +11 -9
- package/dist/styles/theme.js +12 -11
- package/package.json +78 -67
- package/dist/App.d.ts +0 -3
- package/dist/App.js +0 -10
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -6
- package/dist/stories/Button.d.ts +0 -14
- package/dist/stories/Button.js +0 -20
- package/dist/stories/Button.stories.d.ts +0 -23
- package/dist/stories/Button.stories.js +0 -44
- package/dist/stories/Header.d.ts +0 -12
- package/dist/stories/Header.js +0 -4
- package/dist/stories/Header.stories.d.ts +0 -18
- package/dist/stories/Header.stories.js +0 -26
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.js +0 -7
- package/dist/stories/Page.stories.d.ts +0 -12
- package/dist/stories/Page.stories.js +0 -24
- package/dist/styles/styles/mixins/theme-mixins.d.ts +0 -5
- package/dist/styles/styles/mixins/theme-mixins.js +0 -37
- package/dist/styles/styles/mixins/units.d.ts +0 -3
- package/dist/styles/styles/mixins/units.js +0 -3
- package/dist/styles/styles/mixins.d.ts +0 -48
- package/dist/styles/styles/mixins.js +0 -336
- package/dist/styles/styles/theme.d.ts +0 -135
- package/dist/styles/styles/theme.js +0 -77
- package/dist/styles/types.d.ts +0 -3
- package/dist/styles/withDefaultTheme.d.ts +0 -1
- package/dist/styles/withDefaultTheme.js +0 -12
- /package/dist/{styles/types.js → models/sanity-types.js} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Pagination } from "./pagination";
|
|
4
|
+
import { Decorator } from "../../../components/decorator/decorator";
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Navigation/Pagination",
|
|
7
|
+
component: Pagination,
|
|
8
|
+
decorators: [
|
|
9
|
+
(Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const Default = {
|
|
14
|
+
render: () => {
|
|
15
|
+
const [page, setPage] = useState(0);
|
|
16
|
+
return (_jsx(Pagination, { currentPage: page, numberOfPages: 27, indexStartsAt: 0, onChange: (newPage) => setPage(newPage), localeText: {
|
|
17
|
+
prePage: "Previous page",
|
|
18
|
+
nextPage: "Next page",
|
|
19
|
+
} }));
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SanityImage } from '../../../../models/sanity-types';
|
|
2
|
+
export type CardBannerProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
text: string;
|
|
5
|
+
image?: SanityImage;
|
|
6
|
+
backgroundColor?: {
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
externalUrl?: string;
|
|
10
|
+
internalLink?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const CardBanner: ({ title, text, image, externalUrl, internalLink, onClick, }: CardBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default CardBanner;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Image } from '../../../../components/layout/image/image';
|
|
3
|
+
import { Link } from 'gatsby';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { media } from '../../../../styles/mixins';
|
|
6
|
+
import { rem } from "../../../../styles/units";
|
|
7
|
+
export const CardBanner = ({ title, text, image, externalUrl, internalLink, onClick, }) => {
|
|
8
|
+
return (_jsxs(Wrapper, { "data-test": "card-banner", as: externalUrl ? 'a' : !internalLink ? 'div' : Link, href: externalUrl || undefined, to: internalLink || undefined, target: externalUrl ? '_blank' : undefined, onClick: () => onClick?.(), children: [_jsx(ImageWrapper, { children: _jsx(StyledImage, { image: image?.asset }) }), _jsxs(TextWrapper, { children: [_jsx(Title, { children: title }), _jsx(StyledParagraph, { children: text })] })] }));
|
|
9
|
+
};
|
|
10
|
+
const Wrapper = styled(Link) `
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
background-color: white;
|
|
14
|
+
border-radius: ${rem(6)};
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
box-shadow: 0 ${rem(4)} ${rem(16)} 0 rgba(0,0,0,0.08);
|
|
17
|
+
padding: ${rem(16)};
|
|
18
|
+
`;
|
|
19
|
+
const ImageWrapper = styled.div `
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
width: ${rem(64)};
|
|
24
|
+
height: ${rem(64)};
|
|
25
|
+
|
|
26
|
+
${media.L `
|
|
27
|
+
width: ${rem(72)};
|
|
28
|
+
height: ${rem(72)};
|
|
29
|
+
`}
|
|
30
|
+
`;
|
|
31
|
+
const StyledImage = styled(Image) `
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
object-fit: cover;
|
|
35
|
+
`;
|
|
36
|
+
const TextWrapper = styled.div `
|
|
37
|
+
word-break: break-word;
|
|
38
|
+
margin-left: ${rem(16)};
|
|
39
|
+
`;
|
|
40
|
+
const Title = styled.h3 `
|
|
41
|
+
margin: 0;
|
|
42
|
+
margin-bottom: ${rem(5)};
|
|
43
|
+
|
|
44
|
+
${({ theme }) => css `
|
|
45
|
+
color: ${theme.blackLight};
|
|
46
|
+
font-family: ${theme.valueBold};
|
|
47
|
+
font-size: ${rem(20)};
|
|
48
|
+
line-height: ${rem(28)};
|
|
49
|
+
|
|
50
|
+
`};
|
|
51
|
+
`;
|
|
52
|
+
const StyledParagraph = styled.p `
|
|
53
|
+
margin: 0;
|
|
54
|
+
|
|
55
|
+
${({ theme }) => css `
|
|
56
|
+
color: ${theme.blackLight};
|
|
57
|
+
font-family: ${theme.valueRegular};
|
|
58
|
+
font-size: ${rem(16)};
|
|
59
|
+
line-height: ${rem(24)};
|
|
60
|
+
`};
|
|
61
|
+
`;
|
|
62
|
+
export default CardBanner;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CardBanner } from "./card-banner";
|
|
3
|
+
import { Decorator } from "../../../../components/decorator/decorator";
|
|
4
|
+
import { mockImage_128_128 } from '../../../../mocks/image-mocks';
|
|
5
|
+
const mockWebUrlItem = {
|
|
6
|
+
externalUrl: 'https://example.com',
|
|
7
|
+
internalLink: {
|
|
8
|
+
slug: {
|
|
9
|
+
current: '/sub-item-2/'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const meta = {
|
|
14
|
+
title: "Surfaces/Cards/CardBanner",
|
|
15
|
+
component: CardBanner,
|
|
16
|
+
decorators: [
|
|
17
|
+
(Story) => (_jsx(Decorator, { children: _jsx("div", { style: { width: '300px' }, children: _jsx(Story, {}) }) })),
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export const Default = {
|
|
22
|
+
args: {
|
|
23
|
+
title: 'Rubrik',
|
|
24
|
+
text: 'Lorem ipsum dolor sit amet, sit amet dolor.',
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
image: mockImage_128_128,
|
|
27
|
+
webPageUrl: mockWebUrlItem
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const withDefaultTheme: <T extends object>(Component: React.ComponentType<T>) => React.FC<T>;
|
|
@@ -2,11 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext } from "react";
|
|
3
3
|
import { THEME_SETTINGS } from "../styles/theme";
|
|
4
4
|
import { ThemeContext, ThemeProvider } from "styled-components";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return _jsx(Component, { ...props });
|
|
10
|
-
return (_jsx(ThemeProvider, { theme: THEME_SETTINGS, children: _jsx(Component, { ...props }) }));
|
|
11
|
-
};
|
|
12
|
-
}
|
|
5
|
+
export const withDefaultTheme = (Component) => (props) => {
|
|
6
|
+
const theme = useContext(ThemeContext);
|
|
7
|
+
return theme ? (_jsx(Component, { ...props })) : (_jsx(ThemeProvider, { theme: THEME_SETTINGS, children: _jsx(Component, { ...props }) }));
|
|
8
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
import { ButtonProps } from "./components/buttons/button/button";
|
|
2
|
-
|
|
1
|
+
import { type ButtonProps } from "./components/buttons/button/button";
|
|
2
|
+
import { type TextButtonProps } from "./components/buttons/text-button/text-button";
|
|
3
|
+
import { type LoadingButtonProps } from "./components/buttons/loading-button/loading-button";
|
|
4
|
+
import { type AlertProps } from "./components/feedback/alert/alert";
|
|
5
|
+
import { type LoadingSpinnerProps } from "./components/icons/loading-spinner/loading-spinner";
|
|
6
|
+
import { type FormErrorProps } from "./components/inputs/form-error/form-error";
|
|
7
|
+
import { type FormLabelProps } from "./components/inputs/form-label/form-label";
|
|
8
|
+
import { type TextFieldProps } from "./components/inputs/text-field/text-field";
|
|
9
|
+
import { type EmailSignupFormProps } from "./components/modules/email-signup-form/email-signup-form";
|
|
10
|
+
import { type ImageProps } from "./components/layout/image/image";
|
|
11
|
+
import { type ContainerProps } from "./components/layout/container/container";
|
|
12
|
+
import { type EntryListProps, type EntryListItemProps, type EntryListHeadingProps, type EntryListTextProps } from "./components/modules/entry-list/entry-list";
|
|
13
|
+
import { type DropdownProps } from "./components/inputs/dropdown/dropdown";
|
|
14
|
+
import { type PaginationProps } from "./components/navigation/pagination/pagination";
|
|
15
|
+
import { type AccordionItemProps } from "./components/layout/accordion/accordion";
|
|
16
|
+
import { type NavigationCellProps } from "./components/navigation/nav-cell/nav-cell";
|
|
17
|
+
import { type NavigationItemProps } from "./components/navigation/nav-item/nav-item";
|
|
18
|
+
import { type CardBannerProps } from "./components/surfaces/cards/card-banner/card-banner";
|
|
19
|
+
export type { ButtonProps, LoadingButtonProps, TextButtonProps, EmailSignupFormProps, ImageProps, ContainerProps, AlertProps, EntryListHeadingProps, EntryListTextProps, PaginationProps, NavigationCellProps, NavigationItemProps, CardBannerProps };
|
|
20
|
+
export { CloseIcon } from "./components/icons/close-icon/close-icon";
|
|
21
|
+
export { ExclamationMarkIcon } from "./components/icons/exclamation-mark-icon/exclamation-mark-icon";
|
|
22
|
+
export { WarningIcon } from "./components/icons/warning-icon/warning-icon";
|
|
23
|
+
export { SearchIcon } from "./components/icons/search-icon/search-icon";
|
|
24
|
+
export { ToggableChevron } from "./components/icons/toggable-chevron/toggable-chevron";
|
|
25
|
+
export { HamburgerIcon } from "./components/icons/hamburger-icon/hamburger-icon";
|
|
26
|
+
export { MenuCloseIcon } from "./components/icons/menu-close-icon/menu-close-icon";
|
|
27
|
+
export { ExternalIcon } from "./components/icons/external-icon/external-icon";
|
|
28
|
+
export declare const LoadingSpinner: import("react").FC<LoadingSpinnerProps>;
|
|
3
29
|
export declare const Button: import("react").FC<ButtonProps>;
|
|
30
|
+
export declare const LoadingButton: import("react").FC<LoadingButtonProps>;
|
|
31
|
+
export declare const TextButton: import("react").FC<TextButtonProps>;
|
|
32
|
+
export declare const Alert: import("react").FC<AlertProps>;
|
|
33
|
+
export declare const FormError: import("react").FC<FormErrorProps>;
|
|
34
|
+
export declare const FormLabel: import("react").FC<FormLabelProps>;
|
|
35
|
+
export declare const TextField: import("react").FC<TextFieldProps>;
|
|
36
|
+
export declare const EmailSignupForm: import("react").FC<EmailSignupFormProps>;
|
|
37
|
+
export declare const Image: import("react").FC<ImageProps>;
|
|
38
|
+
export declare const Container: import("react").FC<ContainerProps>;
|
|
39
|
+
export declare const EntryList: import("react").FC<EntryListProps>;
|
|
40
|
+
export declare const EntryListItem: import("react").FC<EntryListItemProps>;
|
|
41
|
+
export declare const EntryListText: import("react").FC<EntryListTextProps>;
|
|
42
|
+
export declare const EntryListHeading: import("react").FC<EntryListHeadingProps>;
|
|
43
|
+
export declare const Dropdown: import("react").FC<DropdownProps>;
|
|
44
|
+
export declare const Pagination: import("react").FC<PaginationProps>;
|
|
45
|
+
export declare const Accordion: import("react").FC<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
}>>;
|
|
48
|
+
export declare const AccordionItem: import("react").FC<AccordionItemProps>;
|
|
49
|
+
export declare const NavigationCell: import("react").FC<NavigationCellProps>;
|
|
50
|
+
export declare const NavigationItem: import("react").FC<NavigationItemProps>;
|
|
51
|
+
export declare const CardBanner: import("react").FC<CardBannerProps>;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
1
|
import { withDefaultTheme } from "./hoc/withDefaultTheme";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// Buttons
|
|
3
|
+
import { Button as ButtonComponent, } from "./components/buttons/button/button";
|
|
4
|
+
import { TextButton as TextButtonComponent, } from "./components/buttons/text-button/text-button";
|
|
5
|
+
import { LoadingButton as LoadingButtonComponent, } from "./components/buttons/loading-button/loading-button";
|
|
6
|
+
// Components
|
|
7
|
+
import { Alert as AlertComponent, } from "./components/feedback/alert/alert";
|
|
8
|
+
import { LoadingSpinner as LoadingSpinnerComponent, } from "./components/icons/loading-spinner/loading-spinner";
|
|
9
|
+
import { FormError as FormErrorComponent, } from "./components/inputs/form-error/form-error";
|
|
10
|
+
import { FormLabel as FormLabelComponent, } from "./components/inputs/form-label/form-label";
|
|
11
|
+
import { TextField as TextFieldComponent, } from "./components/inputs/text-field/text-field";
|
|
12
|
+
import { EmailSignupForm as EmailSignupFormComponent, } from "./components/modules/email-signup-form/email-signup-form";
|
|
13
|
+
import { Image as ImageComponent, } from "./components/layout/image/image";
|
|
14
|
+
import { Container as ContainerComponent, } from "./components/layout/container/container";
|
|
15
|
+
import { EntryList as EntryListComponent, EntryListItem as EntryListItemComponent, EntryListText as EntryListTextComponent, EntryListHeading as EntryListHeadingComoponent, } from "./components/modules/entry-list/entry-list";
|
|
16
|
+
import { Dropdown as DropdownComponent, } from "./components/inputs/dropdown/dropdown";
|
|
17
|
+
import { Pagination as PaginationComponent, } from "./components/navigation/pagination/pagination";
|
|
18
|
+
import { Accordion as AccordionComponent, AccordionItem as AccordionItemComponent, } from "./components/layout/accordion/accordion";
|
|
19
|
+
import { NavigationCell as NavigationCellComponent, } from "./components/navigation/nav-cell/nav-cell";
|
|
20
|
+
import { NavigationItem as NavigationItemComponent, } from "./components/navigation/nav-item/nav-item";
|
|
21
|
+
import { CardBanner as CardBannerComponent, } from "./components/surfaces/cards/card-banner/card-banner";
|
|
22
|
+
// Icons
|
|
23
|
+
export { CloseIcon } from "./components/icons/close-icon/close-icon";
|
|
24
|
+
export { ExclamationMarkIcon } from "./components/icons/exclamation-mark-icon/exclamation-mark-icon";
|
|
25
|
+
export { WarningIcon } from "./components/icons/warning-icon/warning-icon";
|
|
26
|
+
export { SearchIcon } from "./components/icons/search-icon/search-icon";
|
|
27
|
+
export { ToggableChevron } from "./components/icons/toggable-chevron/toggable-chevron";
|
|
28
|
+
export { HamburgerIcon } from "./components/icons/hamburger-icon/hamburger-icon";
|
|
29
|
+
export { MenuCloseIcon } from "./components/icons/menu-close-icon/menu-close-icon";
|
|
30
|
+
export { ExternalIcon } from "./components/icons/external-icon/external-icon";
|
|
31
|
+
export const LoadingSpinner = withDefaultTheme(LoadingSpinnerComponent);
|
|
32
|
+
// Components
|
|
33
|
+
export const Button = withDefaultTheme(ButtonComponent);
|
|
34
|
+
export const LoadingButton = withDefaultTheme(LoadingButtonComponent);
|
|
35
|
+
export const TextButton = withDefaultTheme(TextButtonComponent);
|
|
36
|
+
export const Alert = withDefaultTheme(AlertComponent);
|
|
37
|
+
export const FormError = withDefaultTheme(FormErrorComponent);
|
|
38
|
+
export const FormLabel = withDefaultTheme(FormLabelComponent);
|
|
39
|
+
export const TextField = withDefaultTheme(TextFieldComponent);
|
|
40
|
+
export const EmailSignupForm = withDefaultTheme(EmailSignupFormComponent);
|
|
41
|
+
export const Image = withDefaultTheme(ImageComponent);
|
|
42
|
+
export const Container = withDefaultTheme(ContainerComponent);
|
|
43
|
+
export const EntryList = withDefaultTheme(EntryListComponent);
|
|
44
|
+
export const EntryListItem = withDefaultTheme(EntryListItemComponent);
|
|
45
|
+
export const EntryListText = withDefaultTheme(EntryListTextComponent);
|
|
46
|
+
export const EntryListHeading = withDefaultTheme(EntryListHeadingComoponent);
|
|
47
|
+
export const Dropdown = withDefaultTheme(DropdownComponent);
|
|
48
|
+
export const Pagination = withDefaultTheme(PaginationComponent);
|
|
49
|
+
export const Accordion = withDefaultTheme(AccordionComponent);
|
|
50
|
+
export const AccordionItem = withDefaultTheme(AccordionItemComponent);
|
|
51
|
+
export const NavigationCell = withDefaultTheme(NavigationCellComponent);
|
|
52
|
+
export const NavigationItem = withDefaultTheme(NavigationItemComponent);
|
|
53
|
+
export const CardBanner = withDefaultTheme(CardBannerComponent);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const mockImage_128_128: {
|
|
2
|
+
asset: {
|
|
3
|
+
description: string;
|
|
4
|
+
gatsbyImageData: {
|
|
5
|
+
images: {
|
|
6
|
+
sources: {
|
|
7
|
+
srcSet: string;
|
|
8
|
+
sizes: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}[];
|
|
11
|
+
fallback: {
|
|
12
|
+
src: string;
|
|
13
|
+
srcSet: string;
|
|
14
|
+
sizes: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
layout: string;
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const svgMock: {
|
|
25
|
+
asset: {
|
|
26
|
+
description: string;
|
|
27
|
+
url: string;
|
|
28
|
+
extension: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const mockImage_128_128 = {
|
|
2
|
+
asset: {
|
|
3
|
+
description: 'lorem ipsum',
|
|
4
|
+
gatsbyImageData: {
|
|
5
|
+
images: {
|
|
6
|
+
sources: [
|
|
7
|
+
{
|
|
8
|
+
srcSet: '//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=452&h=650&q=50&fm=webp 452w,\n//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=904&h=1300&q=50&fm=webp 904w,\n//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=1808&h=2599&q=50&fm=webp 1808w',
|
|
9
|
+
sizes: '(min-width: 128px) 128px, 100vw',
|
|
10
|
+
type: 'image/webp',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
fallback: {
|
|
14
|
+
src: '//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=1808&h=2599&fl=progressive&q=50&fm=jpg',
|
|
15
|
+
srcSet: '//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=452&h=650&fl=progressive&q=50&fm=jpg 452w,\n//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=904&h=1300&fl=progressive&q=50&fm=jpg 904w,\n//images.ctfassets.net/e8gvzq1fwq00/4KETnnG9zWRzgrz8C6txFE/593a0fa983e140a49f78ed7ce6b16313/Blodtrycket_liten.jpg?w=1808&h=2599&fl=progressive&q=50&fm=jpg 1808w',
|
|
16
|
+
sizes: '(min-width: 128px) 128px, 100vw',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
layout: 'constrained',
|
|
20
|
+
backgroundColor: '#e89888',
|
|
21
|
+
width: 128,
|
|
22
|
+
height: 128,
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export const svgMock = {
|
|
27
|
+
asset: {
|
|
28
|
+
description: 'lorem ipsum',
|
|
29
|
+
url: 'https://cdn.sanity.io/images/1mvwv0jt/development/c3fd17a2e85054afbc33b99672c469f82cdde69c-189x135.svg',
|
|
30
|
+
extension: 'svg'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/styles/mixins.js
CHANGED
|
@@ -94,8 +94,8 @@ export const siteWidthRow = () => css `
|
|
|
94
94
|
${media.M `
|
|
95
95
|
margin-bottom: ${SPACING.spacingXL};
|
|
96
96
|
margin-top: ${SPACING.spacingXL};
|
|
97
|
-
margin-left: ${rem(
|
|
98
|
-
margin-right: ${rem(
|
|
97
|
+
margin-left: ${rem(SPACING.blockSpacingM)};
|
|
98
|
+
margin-right: ${rem(SPACING.blockSpacingM)};
|
|
99
99
|
`}
|
|
100
100
|
|
|
101
101
|
${media.L `
|
|
@@ -103,6 +103,8 @@ export const siteWidthRow = () => css `
|
|
|
103
103
|
margin-right: auto;
|
|
104
104
|
margin-bottom: ${SPACING.spacingXXL};
|
|
105
105
|
margin-left: auto;
|
|
106
|
+
padding-left: ${rem(SPACING.blockSpacingM)};
|
|
107
|
+
padding-right: ${rem(SPACING.blockSpacingM)};
|
|
106
108
|
`}
|
|
107
109
|
`;
|
|
108
110
|
export const siteWidthRowXL = () => css `
|
|
@@ -120,8 +122,8 @@ export const siteWidthRowXL = () => css `
|
|
|
120
122
|
${media.M `
|
|
121
123
|
margin-bottom: ${SPACING.spacingXL};
|
|
122
124
|
margin-top: ${SPACING.spacingXL};
|
|
123
|
-
margin-left: ${rem(
|
|
124
|
-
margin-right: ${rem(
|
|
125
|
+
margin-left: ${rem(SPACING.blockSpacingM)};
|
|
126
|
+
margin-right: ${rem(SPACING.blockSpacingM)};
|
|
125
127
|
`}
|
|
126
128
|
|
|
127
129
|
${media.XL `
|
|
@@ -129,6 +131,8 @@ export const siteWidthRowXL = () => css `
|
|
|
129
131
|
margin-right: auto;
|
|
130
132
|
margin-bottom: ${SPACING.spacingXXL};
|
|
131
133
|
margin-left: auto;
|
|
134
|
+
padding-left: ${rem(SPACING.blockSpacingM)};
|
|
135
|
+
padding-right: ${rem(SPACING.blockSpacingM)};
|
|
132
136
|
`}
|
|
133
137
|
`;
|
|
134
138
|
export const fullWidthRow = () => css `
|
package/dist/styles/theme.d.ts
CHANGED
|
@@ -7,6 +7,16 @@ export declare const BREAKPOINT_VALUES: {
|
|
|
7
7
|
XL: number;
|
|
8
8
|
XXL: number;
|
|
9
9
|
};
|
|
10
|
+
export declare const SPACING: {
|
|
11
|
+
spacingXXS: string;
|
|
12
|
+
spacingXS: string;
|
|
13
|
+
spacingS: string;
|
|
14
|
+
spacingM: string;
|
|
15
|
+
spacingL: string;
|
|
16
|
+
spacingXL: string;
|
|
17
|
+
spacingXXL: string;
|
|
18
|
+
blockSpacingM: number;
|
|
19
|
+
};
|
|
10
20
|
export declare const VARIABLES: {
|
|
11
21
|
siteWidthS: string;
|
|
12
22
|
siteWidth: string;
|
|
@@ -20,15 +30,6 @@ export declare const THEME_SPACING: {
|
|
|
20
30
|
lg: string;
|
|
21
31
|
xl: string;
|
|
22
32
|
};
|
|
23
|
-
export declare const SPACING: {
|
|
24
|
-
spacingXXS: string;
|
|
25
|
-
spacingXS: string;
|
|
26
|
-
spacingS: string;
|
|
27
|
-
spacingM: string;
|
|
28
|
-
spacingL: string;
|
|
29
|
-
spacingXL: string;
|
|
30
|
-
spacingXXL: string;
|
|
31
|
-
};
|
|
32
33
|
export declare const FONTS: {
|
|
33
34
|
valueRegular: string;
|
|
34
35
|
valueMedium: string;
|
|
@@ -81,6 +82,7 @@ export declare const THEME_SETTINGS: {
|
|
|
81
82
|
spacingL: string;
|
|
82
83
|
spacingXL: string;
|
|
83
84
|
spacingXXL: string;
|
|
85
|
+
blockSpacingM: number;
|
|
84
86
|
skyBlue: string;
|
|
85
87
|
black: string;
|
|
86
88
|
blackLight: string;
|
package/dist/styles/theme.js
CHANGED
|
@@ -8,10 +8,20 @@ export const BREAKPOINT_VALUES = {
|
|
|
8
8
|
XL: 1200,
|
|
9
9
|
XXL: 1440,
|
|
10
10
|
};
|
|
11
|
+
export const SPACING = {
|
|
12
|
+
spacingXXS: rem(6),
|
|
13
|
+
spacingXS: rem(8),
|
|
14
|
+
spacingS: rem(12),
|
|
15
|
+
spacingM: rem(16),
|
|
16
|
+
spacingL: rem(32),
|
|
17
|
+
spacingXL: rem(40),
|
|
18
|
+
spacingXXL: rem(48),
|
|
19
|
+
blockSpacingM: 24,
|
|
20
|
+
};
|
|
11
21
|
export const VARIABLES = {
|
|
12
22
|
siteWidthS: rem(BREAKPOINT_VALUES.S_ALT),
|
|
13
|
-
siteWidth: rem(BREAKPOINT_VALUES.L),
|
|
14
|
-
siteWidthXL: rem(BREAKPOINT_VALUES.XL),
|
|
23
|
+
siteWidth: rem(BREAKPOINT_VALUES.L + SPACING.blockSpacingM * 2),
|
|
24
|
+
siteWidthXL: rem(BREAKPOINT_VALUES.XL + SPACING.blockSpacingM * 2),
|
|
15
25
|
siteMaxWidth: rem(1920),
|
|
16
26
|
mobileNavHeight: 56,
|
|
17
27
|
};
|
|
@@ -21,15 +31,6 @@ export const THEME_SPACING = {
|
|
|
21
31
|
lg: rem(32),
|
|
22
32
|
xl: rem(40),
|
|
23
33
|
};
|
|
24
|
-
export const SPACING = {
|
|
25
|
-
spacingXXS: rem(6),
|
|
26
|
-
spacingXS: rem(8),
|
|
27
|
-
spacingS: rem(12),
|
|
28
|
-
spacingM: rem(16),
|
|
29
|
-
spacingL: rem(32),
|
|
30
|
-
spacingXL: rem(40),
|
|
31
|
-
spacingXXL: rem(48),
|
|
32
|
-
};
|
|
33
34
|
export const FONTS = {
|
|
34
35
|
valueRegular: '"ValueRegular", Arial, sans-serif',
|
|
35
36
|
valueMedium: '"ValueMedium", Arial, sans-serif',
|