@ilo-org/react 0.12.0 → 0.14.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/.storybook/main.ts +41 -0
- package/.storybook/manager-head.html +92 -0
- package/.storybook/manager.ts +6 -0
- package/.storybook/preview-head.html +5 -0
- package/.storybook/preview.tsx +81 -0
- package/.storybook/styles.scss +25 -0
- package/.storybook/theme.ts +46 -0
- package/.turbo/turbo-build:lib.log +15 -0
- package/CHANGELOG.md +43 -0
- package/lib/cjs/components/Cards/CardGroup/CardGroup.js +41 -0
- package/lib/cjs/components/Cards/CardGroup/index.js +796 -0
- package/lib/cjs/components/Cards/DataCard/DataCard.js +27 -0
- package/lib/cjs/components/Cards/DataCard/index.js +73 -19
- package/lib/cjs/components/Cards/DetailCard/DetailCard.js +20 -0
- package/lib/cjs/components/Cards/DetailCard/index.js +17 -12
- package/lib/cjs/components/Cards/FactlistCard/FactListCard.js +22 -0
- package/lib/cjs/components/Cards/FactlistCard/index.js +16 -15
- package/lib/cjs/components/Cards/FeatureCard/FeatureCard.js +24 -0
- package/lib/cjs/components/Cards/FeatureCard/index.js +31 -16
- package/lib/cjs/components/Cards/MultilinkCard/MultiLinkCard.js +24 -0
- package/lib/cjs/components/Cards/MultilinkCard/index.js +35 -16
- package/lib/cjs/components/Cards/PromoCard/PromoCard.js +23 -0
- package/lib/cjs/components/Cards/PromoCard/index.js +18 -15
- package/lib/cjs/components/Cards/StatCard/StatCard.js +21 -0
- package/lib/cjs/components/Cards/StatCard/index.js +15 -13
- package/lib/cjs/components/Cards/TextCard/TextCard.js +23 -0
- package/lib/cjs/components/Cards/TextCard/index.js +22 -17
- package/lib/cjs/components/Footer/Footer.js +1 -1
- package/lib/cjs/components/List/List.js +9 -11
- package/lib/cjs/components/List/ListItem.js +4 -7
- package/lib/cjs/components/List/index.js +1 -2
- package/lib/cjs/components/Navigation/Navigation.js +3 -3
- package/lib/cjs/components/Pagination/Pagination.js +1 -1
- package/lib/cjs/components/index.js +10 -13
- package/lib/cjs/index.js +10 -13
- package/lib/esm/components/Cards/CardGroup/CardGroup.js +39 -0
- package/lib/esm/components/Cards/CardGroup/index.js +793 -0
- package/lib/esm/components/Cards/DataCard/DataCard.js +25 -0
- package/lib/esm/components/Cards/DataCard/index.js +72 -19
- package/lib/esm/components/Cards/DetailCard/DetailCard.js +18 -0
- package/lib/esm/components/Cards/DetailCard/index.js +16 -12
- package/lib/esm/components/Cards/FactlistCard/FactListCard.js +20 -0
- package/lib/esm/components/Cards/FactlistCard/index.js +15 -15
- package/lib/esm/components/Cards/FeatureCard/FeatureCard.js +22 -0
- package/lib/esm/components/Cards/FeatureCard/index.js +30 -16
- package/lib/esm/components/Cards/MultilinkCard/MultiLinkCard.js +22 -0
- package/lib/esm/components/Cards/MultilinkCard/index.js +34 -16
- package/lib/esm/components/Cards/PromoCard/PromoCard.js +21 -0
- package/lib/esm/components/Cards/PromoCard/index.js +17 -15
- package/lib/esm/components/Cards/StatCard/StatCard.js +19 -0
- package/lib/esm/components/Cards/StatCard/index.js +14 -13
- package/lib/esm/components/Cards/TextCard/TextCard.js +21 -0
- package/lib/esm/components/Cards/TextCard/index.js +21 -17
- package/lib/esm/components/Footer/Footer.js +1 -1
- package/lib/esm/components/List/List.js +10 -12
- package/lib/esm/components/List/ListItem.js +4 -7
- package/lib/esm/components/List/index.js +1 -2
- package/lib/esm/components/Navigation/Navigation.js +3 -3
- package/lib/esm/components/Pagination/Pagination.js +1 -1
- package/lib/esm/components/index.js +9 -11
- package/lib/esm/index.js +9 -11
- package/lib/types/react/src/components/Cards/CardGroup/CardGroup.args.d.ts +13 -0
- package/lib/types/react/src/components/Cards/CardGroup/CardGroup.props.d.ts +58 -0
- package/lib/types/react/src/components/Cards/CardGroup/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.args.d.ts +2 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.props.d.ts +50 -0
- package/lib/types/react/src/components/Cards/DataCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.props.d.ts +35 -0
- package/lib/types/react/src/components/Cards/DetailCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.props.d.ts +16 -0
- package/lib/types/react/src/components/Cards/FactlistCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.props.d.ts +31 -0
- package/lib/types/react/src/components/Cards/FeatureCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/MultilinkCard/MultiLinkCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.args.d.ts +2 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.props.d.ts +25 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.props.d.ts +30 -0
- package/lib/types/react/src/components/Cards/PromoCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/StatCard/StatCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.props.d.ts +18 -0
- package/lib/types/react/src/components/Cards/StatCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/TextCard/TextCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.props.d.ts +26 -0
- package/lib/types/react/src/components/Cards/TextCard/index.d.ts +3 -4
- package/lib/types/react/src/components/List/List.props.d.ts +2 -9
- package/lib/types/react/src/components/List/ListItem.props.d.ts +0 -6
- package/lib/types/react/src/components/index.d.ts +1 -1
- package/lib/types/react/src/types/index.d.ts +4 -2
- package/package.json +32 -12
- package/public/react.svg +8 -0
- package/rollup.config.mjs +2 -0
- package/src/__tests__/Accordion.test.tsx +16 -0
- package/src/__tests__/Button.test.tsx +60 -0
- package/src/__tests__/Callout.test.tsx +43 -0
- package/src/__tests__/ContextMenu.test.tsx +19 -0
- package/src/__tests__/Dropdown.test.tsx +38 -0
- package/src/__tests__/Heading.test.tsx +51 -0
- package/src/__tests__/Image.test.tsx +21 -0
- package/src/__tests__/LinkList.test.tsx +17 -0
- package/src/__tests__/List.test.tsx +25 -0
- package/src/__tests__/Loading.test.tsx +33 -0
- package/src/__tests__/Notification.test.tsx +39 -0
- package/src/__tests__/Pagination.test.tsx +58 -0
- package/src/__tests__/Profile.test.tsx +48 -0
- package/src/__tests__/ReadMore.test.tsx +43 -0
- package/src/__tests__/RichText.test.tsx +16 -0
- package/src/__tests__/SearchField.test.tsx +35 -0
- package/src/__tests__/TableOfContents.test.tsx +12 -0
- package/src/__tests__/Tag.test.tsx +10 -0
- package/src/components/Cards/{CardGroup.args.ts → CardGroup/CardGroup.args.ts} +299 -437
- package/src/components/Cards/CardGroup/CardGroup.props.ts +78 -0
- package/src/components/Cards/CardGroup/CardGroup.tsx +54 -0
- package/src/components/Cards/CardGroup/index.tsx +3 -0
- package/src/components/Cards/DataCard/DataCard.args.ts +69 -0
- package/src/components/Cards/DataCard/DataCard.props.ts +60 -0
- package/src/components/Cards/DataCard/DataCard.tsx +107 -0
- package/src/components/Cards/DataCard/index.tsx +3 -107
- package/src/components/Cards/DetailCard/DetailCard.args.ts +17 -0
- package/src/components/Cards/DetailCard/DetailCard.props.ts +43 -0
- package/src/components/Cards/DetailCard/DetailCard.tsx +62 -0
- package/src/components/Cards/DetailCard/index.tsx +3 -62
- package/src/components/Cards/FactlistCard/FactListCard.args.ts +14 -0
- package/src/components/Cards/FactlistCard/FactListCard.props.ts +19 -0
- package/src/components/Cards/FactlistCard/FactListCard.tsx +42 -0
- package/src/components/Cards/FactlistCard/index.tsx +3 -42
- package/src/components/Cards/FeatureCard/FeatureCard.args.ts +30 -0
- package/src/components/Cards/FeatureCard/FeatureCard.props.ts +38 -0
- package/src/components/Cards/FeatureCard/FeatureCard.tsx +69 -0
- package/src/components/Cards/FeatureCard/index.tsx +3 -69
- package/src/components/Cards/MultilinkCard/MultiLinkCard.tsx +76 -0
- package/src/components/Cards/MultilinkCard/MultilinkCard.args.ts +33 -0
- package/src/components/Cards/MultilinkCard/MultilinkCard.props.ts +30 -0
- package/src/components/Cards/MultilinkCard/index.tsx +3 -76
- package/src/components/Cards/PromoCard/PromoCard.args.ts +19 -0
- package/src/components/Cards/PromoCard/PromoCard.props.ts +36 -0
- package/src/components/Cards/PromoCard/PromoCard.tsx +60 -0
- package/src/components/Cards/PromoCard/index.tsx +3 -60
- package/src/components/Cards/StatCard/StatCard.args.ts +14 -0
- package/src/components/Cards/StatCard/StatCard.props.ts +21 -0
- package/src/components/Cards/StatCard/StatCard.tsx +36 -0
- package/src/components/Cards/StatCard/index.tsx +3 -36
- package/src/components/Cards/TextCard/TextCard.args.ts +21 -0
- package/src/components/Cards/TextCard/TextCard.props.ts +32 -0
- package/src/components/Cards/TextCard/TextCard.tsx +62 -0
- package/src/components/Cards/TextCard/index.tsx +3 -63
- package/src/components/Footer/Footer.args.ts +4 -16
- package/src/components/Footer/Footer.tsx +41 -37
- package/src/components/List/List.props.ts +2 -10
- package/src/components/List/List.tsx +17 -22
- package/src/components/List/ListItem.props.ts +0 -7
- package/src/components/List/ListItem.tsx +6 -11
- package/src/components/Navigation/Navigation.tsx +5 -5
- package/src/components/Pagination/Pagination.tsx +2 -1
- package/src/components/index.ts +1 -1
- package/src/setup.ts +6 -0
- package/src/stories/Accordion/Accordion.stories.tsx +145 -0
- package/src/stories/Breadcrumb/Breadcrumb.mdx +17 -0
- package/src/stories/Breadcrumb/Breadcrumb.stories.tsx +20 -0
- package/src/stories/Button/Button.mdx +94 -0
- package/src/stories/Button/Button.stories.tsx +68 -0
- package/src/stories/Callout/Callout.mdx +35 -0
- package/src/stories/Callout/Callout.stories.tsx +43 -0
- package/src/stories/Card/DataCard.stories.tsx +45 -0
- package/src/stories/Card/DetailCard.stories.tsx +41 -0
- package/src/stories/Card/FactlistCard.stories.tsx +48 -0
- package/src/stories/Card/FeatureCard.stories.tsx +56 -0
- package/src/stories/Card/MultilinkCard.stories.tsx +48 -0
- package/src/stories/Card/PromoCard.stories.tsx +48 -0
- package/src/stories/Card/StatCard.stories.tsx +45 -0
- package/src/stories/Card/TextCard.stories.tsx +45 -0
- package/src/stories/CardGroup/CardGroup.mdx +17 -0
- package/src/stories/CardGroup/CardGroup.stories.tsx +50 -0
- package/src/stories/Checkbox/Checkbox.stories.tsx +118 -0
- package/src/stories/ContextMenu/ContextMenu.stories.tsx +83 -0
- package/src/stories/DatePicker/DatePicker.stories.tsx +110 -0
- package/src/stories/Dropdown/Dropdown.stories.tsx +145 -0
- package/src/stories/Empty/Empty.stories.tsx +53 -0
- package/src/stories/Fieldset/Fieldset.stories.tsx +167 -0
- package/src/stories/FileUpload/FileUpload.stories.tsx +103 -0
- package/src/stories/Footer/Footer.mdx +17 -0
- package/src/stories/Footer/Footer.stories.tsx +15 -0
- package/src/stories/Form/Form.mdx +58 -0
- package/src/stories/Form/Form.stories.tsx +162 -0
- package/src/stories/GetStarted.mdx +57 -0
- package/src/stories/Heading/Heading.stories.tsx +193 -0
- package/src/stories/Hero/Hero.stories.tsx +68 -0
- package/src/stories/Image/Image.stories.tsx +50 -0
- package/src/stories/Link/Link.stories.tsx +81 -0
- package/src/stories/LinkList/LinkList.args.ts +190 -0
- package/src/stories/LinkList/LinkList.stories.tsx +60 -0
- package/src/stories/List/List.stories.tsx +167 -0
- package/src/stories/Loading/Loading.stories.tsx +97 -0
- package/src/stories/LocalNav/LocalNav.mdx +17 -0
- package/src/stories/LocalNav/LocalNav.stories.tsx +15 -0
- package/src/stories/Logo/Logo.stories.tsx +172 -0
- package/src/stories/LogoGrid/LogoGrid.stories.tsx +59 -0
- package/src/stories/Navigation/Navigation.mdx +17 -0
- package/src/stories/Navigation/Navigation.stories.tsx +15 -0
- package/src/stories/Notification/Notification.stories.tsx +187 -0
- package/src/stories/NumberPicker/NumberPicker.stories.tsx +69 -0
- package/src/stories/Pagination/Pagination.stories.tsx +86 -0
- package/src/stories/Profile/Profile.stories.tsx +64 -0
- package/src/stories/Radio/Radio.stories.tsx +232 -0
- package/src/stories/ReadMore/ReadMore.stories.tsx +59 -0
- package/src/stories/RichText/RichText.stories.tsx +63 -0
- package/src/stories/SearchField/SearchField.stories.tsx +91 -0
- package/src/stories/SocialMedia/SocialMedia.stories.tsx +60 -0
- package/src/stories/TableOfContents/TableOfContents.stories.tsx +55 -0
- package/src/stories/Tabs/Tabs.mdx +17 -0
- package/src/stories/Tabs/Tabs.stories.tsx +25 -0
- package/src/stories/Tag/Tag.stories.tsx +130 -0
- package/src/stories/TextInput/TextInput.stories.tsx +100 -0
- package/src/stories/Textarea/Textarea.stories.tsx +147 -0
- package/src/stories/Toggle/Toggle.stories.tsx +99 -0
- package/src/stories/Tooltip/Tooltip.stories.tsx +82 -0
- package/src/stories/Video/Video.stories.tsx +71 -0
- package/src/stories/Welcome.stories.mdx +37 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/welcome.scss +133 -0
- package/src/types/index.ts +6 -2
- package/lib/cjs/ListCtx-14aa546f.js +0 -9
- package/lib/cjs/components/Cards/Card.js +0 -40
- package/lib/cjs/components/Cards/CardGroup.js +0 -33
- package/lib/cjs/components/Cards/index.js +0 -37
- package/lib/esm/ListCtx-da435fdf.js +0 -6
- package/lib/esm/components/Cards/Card.js +0 -38
- package/lib/esm/components/Cards/CardGroup.js +0 -31
- package/lib/esm/components/Cards/index.js +0 -22
- package/lib/types/react/src/components/Cards/Card.d.ts +0 -4
- package/lib/types/react/src/components/Cards/Card.props.d.ts +0 -307
- package/lib/types/react/src/components/Cards/CardGroup.props.d.ts +0 -16
- package/lib/types/react/src/components/Cards/index.d.ts +0 -11
- package/lib/types/react/src/components/List/ListCtx.d.ts +0 -4
- package/src/components/Cards/Card.args.ts +0 -220
- package/src/components/Cards/Card.props.ts +0 -382
- package/src/components/Cards/Card.tsx +0 -36
- package/src/components/Cards/CardGroup.props.ts +0 -19
- package/src/components/Cards/CardGroup.tsx +0 -54
- package/src/components/Cards/index.ts +0 -22
- package/src/components/List/ListCtx.ts +0 -7
- /package/lib/types/react/src/components/Cards/{CardGroup.d.ts → CardGroup/CardGroup.d.ts} +0 -0
|
@@ -16,7 +16,7 @@ const Footer = ({ className, logo, tagline, subtagline, address, linkgroup, soci
|
|
|
16
16
|
const { prefix } = useGlobalSettings();
|
|
17
17
|
const baseClass = `${prefix}--footer`;
|
|
18
18
|
const footerClasses = classNames(className, baseClass);
|
|
19
|
-
return (jsxs("footer", Object.assign({ className: footerClasses }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--main` }, { children: [jsxs("div", Object.assign({ className: "site--info" }, { children: [jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }), jsx("h3", Object.assign({ className: `${baseClass}--headline` }, { children: tagline })), jsx("h4", Object.assign({ className: `${baseClass}--subhead` }, { children: subtagline }))] })), address && (jsx("div", Object.assign({ className: "address" }, { children: address.map((line, i) => (jsx("p", Object.assign({ className: "address--line" }, { children: line }), i))) }))), linkgroup && (jsx("nav", Object.assign({ className: "links" }, { children: jsx(LinkList, { linkgroup: linkgroup, theme: "dark" }) }))),
|
|
19
|
+
return (jsxs("footer", Object.assign({ className: footerClasses }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--main ${prefix}--container` }, { children: [jsxs("div", Object.assign({ className: "site--info" }, { children: [jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }), jsx("h3", Object.assign({ className: `${baseClass}--headline` }, { children: tagline })), jsx("h4", Object.assign({ className: `${baseClass}--subhead` }, { children: subtagline }))] })), address && (jsx("div", Object.assign({ className: "address" }, { children: address.map((line, i) => (jsx("p", Object.assign({ className: "address--line" }, { children: line }), i))) }))), linkgroup && (jsx("nav", Object.assign({ className: "links" }, { children: jsx(LinkList, { linkgroup: linkgroup, theme: "dark" }) }))), socialmedia && (jsx("div", Object.assign({ className: "connect" }, { children: jsx("div", Object.assign({ className: "social--links" }, { children: jsx(SocialMedia, Object.assign({}, socialmedia, { theme: "dark" })) })) }))), subscribe && (jsx("div", Object.assign({ className: "subscribe" }, { children: jsx(Button, { label: subscribe === null || subscribe === void 0 ? void 0 : subscribe.label, url: subscribe === null || subscribe === void 0 ? void 0 : subscribe.url, type: "primary", size: "large", target: "_blank" }) })))] })), jsx("div", Object.assign({ className: `${baseClass}--secondary` }, { children: jsxs("div", Object.assign({ className: `${prefix}--container` }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--secondary--details` }, { children: [jsx("div", Object.assign({ className: "legal" }, { children: legal })), secondarylinks && (jsx("nav", Object.assign({ className: "secondarylinks" }, { children: jsx("ul", Object.assign({ className: "secondarylinks--list" }, { children: secondarylinks.map((link, i) => (jsx("li", Object.assign({ className: "secondarylinks--list--item" }, { children: jsx("a", Object.assign({ href: link.url, className: "secondarylinks--list--link" }, { children: link === null || link === void 0 ? void 0 : link.label }), i) })))) })) })))] })), jsx("a", Object.assign({ href: anchorlink === null || anchorlink === void 0 ? void 0 : anchorlink.url, className: "anchorlink" }, { children: anchorlink === null || anchorlink === void 0 ? void 0 : anchorlink.label }))] })) }))] })));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export { Footer as default };
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { useState } from 'react';
|
|
4
3
|
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
5
|
-
import { L as ListContext } from '../../ListCtx-da435fdf.js';
|
|
6
4
|
import 'tslib';
|
|
5
|
+
import 'react';
|
|
7
6
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
7
|
|
|
9
|
-
const List = ({ children, className, alignment, ordered, title, }) => {
|
|
8
|
+
const List = ({ children, className, alignment = "default", ordered = "unstyled", title, }) => {
|
|
10
9
|
const { prefix } = useGlobalSettings();
|
|
11
10
|
const baseClass = `${prefix}--list`;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[
|
|
11
|
+
const unstyledClass = `${baseClass}__unstyled`;
|
|
12
|
+
const horizontalClass = `${baseClass}__horizontal`;
|
|
13
|
+
const titleClass = `${baseClass}--title`;
|
|
14
|
+
const listClasses = classNames(className, baseClass, {
|
|
15
|
+
[unstyledClass]: ordered === "unstyled",
|
|
16
|
+
[horizontalClass]: alignment === "horizontal",
|
|
17
17
|
});
|
|
18
|
-
return (
|
|
19
|
-
activeItems,
|
|
20
|
-
} }, { children: jsxs("div", Object.assign({ className: listClasses }, { children: [title && jsx("h5", Object.assign({ className: `${baseClass}__title` }, { children: title })), ordered && ordered === "ordered" && jsx("ol", { children: children }), ordered && ordered !== "ordered" && (jsx("ul", Object.assign({ className: `${baseClass}--${alignment}` }, { children: children })))] })) })));
|
|
18
|
+
return (jsxs("div", Object.assign({ className: listClasses }, { children: [title && jsx("h2", Object.assign({ className: titleClass }, { children: title })), ordered && ordered === "ordered" ? (jsx("ol", { children: children })) : (jsx("ul", { children: children }))] })));
|
|
21
19
|
};
|
|
22
20
|
|
|
23
21
|
export { List as default };
|
|
@@ -2,18 +2,15 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
5
|
-
import { a as ListItemContext } from '../../ListCtx-da435fdf.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
7
|
|
|
9
8
|
const ListItem = (_a) => {
|
|
10
|
-
var { children,
|
|
9
|
+
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
11
10
|
const { prefix } = useGlobalSettings();
|
|
12
|
-
const baseClass = `${prefix}--
|
|
13
|
-
const listItemClasses = classNames(className,
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
return (jsx(ListItemContext.Provider, Object.assign({ value: { id } }, { children: jsx("li", Object.assign({ className: listItemClasses }, rest, { children: children })) })));
|
|
11
|
+
const baseClass = `${prefix}--list--item`;
|
|
12
|
+
const listItemClasses = classNames(className, baseClass);
|
|
13
|
+
return (jsx("li", Object.assign({ className: listItemClasses }, rest, { children: children })));
|
|
17
14
|
};
|
|
18
15
|
|
|
19
16
|
export { ListItem as default };
|
|
@@ -2,8 +2,7 @@ export { default as List } from './List.js';
|
|
|
2
2
|
export { default as ListItem } from './ListItem.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'classnames';
|
|
5
|
-
import 'react';
|
|
6
5
|
import '../../hooks/useGlobalSettings.js';
|
|
7
6
|
import 'tslib';
|
|
7
|
+
import 'react';
|
|
8
8
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
9
|
-
import '../../ListCtx-da435fdf.js';
|
|
@@ -39,10 +39,10 @@ const Navigation = ({ logo, mobilelogo, siteurl, tagline, primarynav, subnav, me
|
|
|
39
39
|
const handleSubnavToggle = () => {
|
|
40
40
|
setSubnavToggleOpen(!toggleSubnavOpen);
|
|
41
41
|
};
|
|
42
|
-
return (jsxs("header", Object.assign({ className: NavigationClasses }, { children: [jsx("div", Object.assign({ className: `${baseClass}--utility-bar` }, { children: jsx("div", Object.assign({ className: `${prefix}--language-switcher` }, { children: jsxs("div", Object.assign({ className: `${prefix}--language-switcher--wrap` }, { children: [jsx("button", Object.assign({ className: `${prefix}--language-switcher--button`, type: "button" }, { children: languagelabel })), jsx(ContextMenu, { links: languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links })] })) })) })), jsx("div", Object.assign({ className: `${baseClass}--logo-bar` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }) })), jsxs("p", Object.assign({ className: `${baseClass}--logo-tagline` }, { children: [tagline === null || tagline === void 0 ? void 0 : tagline.tag, jsx("span", Object.assign({ className: `${baseClass}--logo-tagline--small` }, { children: tagline === null || tagline === void 0 ? void 0 : tagline.small }))] })), jsx("button", Object.assign({ className: `${baseClass}--menu`, onClick: handleMenuToggle }, { children: menulabel }))] })) })), jsxs("div", Object.assign({ className: `${baseClass}--navigation` }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav--logo` }, { children: [jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: mobilelogo, alt: "ILO Logo" }) })), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: menucloselabel }))] })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--search` }, { children: jsx(SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--switcher` }, { children: jsx("button", Object.assign({ className: `${prefix}--mobile--nav--language--switcher--button`, onClick: handleLanguageToggle, type: "button" }, { children: languagelabel })) })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--select` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleLanguageToggle, type: "button" }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilebacklabel })), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilecloselabel })), jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: languagelabel }))] })), jsx("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: (languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links) &&
|
|
42
|
+
return (jsxs("header", Object.assign({ className: NavigationClasses }, { children: [jsx("div", Object.assign({ className: `${baseClass}--utility-bar` }, { children: jsx("div", Object.assign({ className: `${prefix}--language-switcher` }, { children: jsxs("div", Object.assign({ className: `${prefix}--language-switcher--wrap` }, { children: [jsx("button", Object.assign({ className: `${prefix}--language-switcher--button`, type: "button" }, { children: languagelabel })), jsx(ContextMenu, { links: languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links })] })) })) })), jsx("div", Object.assign({ className: `${baseClass}--logo-bar` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner ${prefix}--container` }, { children: [jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }) })), jsxs("p", Object.assign({ className: `${baseClass}--logo-tagline` }, { children: [tagline === null || tagline === void 0 ? void 0 : tagline.tag, jsx("span", Object.assign({ className: `${baseClass}--logo-tagline--small` }, { children: tagline === null || tagline === void 0 ? void 0 : tagline.small }))] })), jsx("button", Object.assign({ className: `${baseClass}--menu`, onClick: handleMenuToggle }, { children: menulabel }))] })) })), jsxs("div", Object.assign({ className: `${baseClass}--navigation` }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--inner ${prefix}--container` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav--logo` }, { children: [jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: mobilelogo, alt: "ILO Logo" }) })), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: menucloselabel }))] })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--search` }, { children: jsx(SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--switcher` }, { children: jsx("button", Object.assign({ className: `${prefix}--mobile--nav--language--switcher--button`, onClick: handleLanguageToggle, type: "button" }, { children: languagelabel })) })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--select` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner ${prefix}--container` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleLanguageToggle, type: "button" }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilebacklabel })), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilecloselabel })), jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: languagelabel }))] })), jsx("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: (languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links) &&
|
|
43
43
|
languagecontextmenu.links.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link ${prefix}--nav--language` }, { children: item.label })) }), index))) }))] })) }))] })), jsxs("nav", Object.assign({ className: `${prefix}--nav`, "aria-labelledby": "primary-navigation" }, { children: [jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "primary-navigation" }, { children: primarynav === null || primarynav === void 0 ? void 0 : primarynav.navlabel })), jsxs("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: [(primarynav === null || primarynav === void 0 ? void 0 : primarynav.items) &&
|
|
44
|
-
primarynav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link` }, { children: item.label })) }), index))), subnav && (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("button", Object.assign({ className: `${prefix}--nav--trigger`, onClick: handleSubnavToggle }, { children: subnav.buttonlabel })) })))] }))] })), jsx("div", Object.assign({ className: `${prefix}--search` }, { children: jsx("button", Object.assign({ className: `${prefix}--search--button`, type: "button", onClick: handleSearchToggle }, { children: searchlabel })) }))] })), subnav && (jsx("nav", Object.assign({ className: `${prefix}--subnav`, "aria-labelledby": "secondary-navigation" }, { children: jsxs("div", Object.assign({ className: `${prefix}--subnav--inner` }, { children: [jsx("div", Object.assign({ className: `${prefix}--mobile--subnav` }, { children: jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleSubnavToggle, type: "button" }, { children: subnav.mobilebacklabel })), jsx("button", Object.assign({ className: `${prefix}--header--menu--close`, onClick: handleMenuToggle }, { children: subnav.mobilecloselabel })), jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: subnav.buttonlabel }))] })) })), jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "secondary-navigation" }, { children: subnav.navlabel })), jsx("ul", Object.assign({ className: `${prefix}--subnav--set` }, { children: (subnav === null || subnav === void 0 ? void 0 : subnav.items) &&
|
|
45
|
-
subnav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--subnav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--subnav--link` }, { children: item.label })) }), index))) }))] })) }))), jsx("div", Object.assign({ className: `${prefix}--search-box` }, { children: jsx("div", Object.assign({ className: `${prefix}--header--inner` }, { children: jsx(SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })) }))] }))] })));
|
|
44
|
+
primarynav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link` }, { children: item.label })) }), index))), subnav && (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("button", Object.assign({ className: `${prefix}--nav--trigger`, onClick: handleSubnavToggle }, { children: subnav.buttonlabel })) })))] }))] })), jsx("div", Object.assign({ className: `${prefix}--search` }, { children: jsx("button", Object.assign({ className: `${prefix}--search--button`, type: "button", onClick: handleSearchToggle }, { children: searchlabel })) }))] })), subnav && (jsx("nav", Object.assign({ className: `${prefix}--subnav`, "aria-labelledby": "secondary-navigation" }, { children: jsxs("div", Object.assign({ className: `${prefix}--subnav--inner ${prefix}--container` }, { children: [jsx("div", Object.assign({ className: `${prefix}--mobile--subnav` }, { children: jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleSubnavToggle, type: "button" }, { children: subnav.mobilebacklabel })), jsx("button", Object.assign({ className: `${prefix}--header--menu--close`, onClick: handleMenuToggle }, { children: subnav.mobilecloselabel })), jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: subnav.buttonlabel }))] })) })), jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "secondary-navigation" }, { children: subnav.navlabel })), jsx("ul", Object.assign({ className: `${prefix}--subnav--set` }, { children: (subnav === null || subnav === void 0 ? void 0 : subnav.items) &&
|
|
45
|
+
subnav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--subnav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--subnav--link` }, { children: item.label })) }), index))) }))] })) }))), jsx("div", Object.assign({ className: `${prefix}--search-box` }, { children: jsx("div", Object.assign({ className: `${prefix}--header--inner ${prefix}--container` }, { children: jsx(SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })) }))] }))] })));
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export { Navigation as default };
|
|
@@ -41,7 +41,7 @@ const Pagination = ({ className, callback, currentPage, firstPageUrl, firstPageT
|
|
|
41
41
|
callback(e);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
return (jsxs("div", Object.assign({ className: paginationClasses }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--previous-set` }, { children: [jsx("a", Object.assign({ className: firstClasses, onClick: (e) => handleClick(e), href: firstPageUrl, title: firstPageTitle }, { children: firstPageTitle })), jsx("a", Object.assign({ className: prevClasses, onClick: (e) => handleClick(e), href: prevPageUrl, title: prevPageTitle }, { children: prevPageTitle }))] })), jsxs("p", Object.assign({ className: `${baseClass}--page` }, { children: [jsx("span", { children: currentPage + 1 }), "
|
|
44
|
+
return (jsxs("div", Object.assign({ className: paginationClasses }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--previous-set` }, { children: [jsx("a", Object.assign({ className: firstClasses, onClick: (e) => handleClick(e), href: firstPageUrl, title: firstPageTitle }, { children: firstPageTitle })), jsx("a", Object.assign({ className: prevClasses, onClick: (e) => handleClick(e), href: prevPageUrl, title: prevPageTitle }, { children: prevPageTitle }))] })), jsxs("p", Object.assign({ className: `${baseClass}--page` }, { children: [jsx("span", { children: currentPage + 1 }), jsx("span", { children: pageCountPreposition }), jsx("span", { children: totalPages })] })), jsxs("div", Object.assign({ className: `${baseClass}--next-set` }, { children: [jsx("a", Object.assign({ className: nextClasses, onClick: (e) => handleClick(e), href: nextPageUrl, title: nextPageTitle }, { children: nextPageTitle })), jsx("a", Object.assign({ className: lastClasses, onClick: (e) => handleClick(e), href: lastPageUrl, title: lastPageTitle }, { children: lastPageTitle }))] }))] })));
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export { Pagination as default };
|
|
@@ -44,14 +44,12 @@ export { default as Video } from './Video/Video.js';
|
|
|
44
44
|
export { default as Dropdown } from './Dropdown/Dropdown.js';
|
|
45
45
|
export { default as Icon } from './Icon/Icon.js';
|
|
46
46
|
export { default as List } from './List/List.js';
|
|
47
|
-
import '../ListCtx-da435fdf.js';
|
|
48
47
|
export { default as Profile } from './Profile/Profile.js';
|
|
49
48
|
export { default as TableOfContents } from './TableOfContents/TableOfContents.js';
|
|
50
49
|
export { default as Footer } from './Footer/Footer.js';
|
|
51
50
|
export { default as LocalNav } from './LocalNav/LocalNav.js';
|
|
52
51
|
export { default as Navigation } from './Navigation/Navigation.js';
|
|
53
|
-
export { default as
|
|
54
|
-
export { default as CardGroup } from './Cards/CardGroup.js';
|
|
52
|
+
export { default as CardGroup } from './Cards/CardGroup/CardGroup.js';
|
|
55
53
|
export { default as Breadcrumb } from './Breadcrumb/Breadcrumb.js';
|
|
56
54
|
export { default as Tabs } from './Tabs/Tabs.js';
|
|
57
55
|
import '../hooks/useGlobalSettings.js';
|
|
@@ -77,12 +75,12 @@ import 'videojs-youtube';
|
|
|
77
75
|
import 'video.js';
|
|
78
76
|
import '@ilo-org/icons-react';
|
|
79
77
|
import './Logo/Logo.js';
|
|
80
|
-
import './Cards/
|
|
81
|
-
import './Cards/
|
|
82
|
-
import './Cards/
|
|
83
|
-
import './Cards/FactlistCard/index.js';
|
|
78
|
+
import './Cards/DataCard/DataCard.js';
|
|
79
|
+
import './Cards/DetailCard/DetailCard.js';
|
|
80
|
+
import './Cards/FactlistCard/FactListCard.js';
|
|
84
81
|
import './List/ListItem.js';
|
|
85
|
-
import './Cards/
|
|
86
|
-
import './Cards/
|
|
87
|
-
import './Cards/
|
|
88
|
-
import './Cards/
|
|
82
|
+
import './Cards/FeatureCard/FeatureCard.js';
|
|
83
|
+
import './Cards/MultilinkCard/MultiLinkCard.js';
|
|
84
|
+
import './Cards/PromoCard/PromoCard.js';
|
|
85
|
+
import './Cards/StatCard/StatCard.js';
|
|
86
|
+
import './Cards/TextCard/TextCard.js';
|
package/lib/esm/index.js
CHANGED
|
@@ -44,14 +44,12 @@ export { default as Video } from './components/Video/Video.js';
|
|
|
44
44
|
export { default as Dropdown } from './components/Dropdown/Dropdown.js';
|
|
45
45
|
export { default as Icon } from './components/Icon/Icon.js';
|
|
46
46
|
export { default as List } from './components/List/List.js';
|
|
47
|
-
import './ListCtx-da435fdf.js';
|
|
48
47
|
export { default as Profile } from './components/Profile/Profile.js';
|
|
49
48
|
export { default as TableOfContents } from './components/TableOfContents/TableOfContents.js';
|
|
50
49
|
export { default as Footer } from './components/Footer/Footer.js';
|
|
51
50
|
export { default as LocalNav } from './components/LocalNav/LocalNav.js';
|
|
52
51
|
export { default as Navigation } from './components/Navigation/Navigation.js';
|
|
53
|
-
export { default as
|
|
54
|
-
export { default as CardGroup } from './components/Cards/CardGroup.js';
|
|
52
|
+
export { default as CardGroup } from './components/Cards/CardGroup/CardGroup.js';
|
|
55
53
|
export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb.js';
|
|
56
54
|
export { default as Tabs } from './components/Tabs/Tabs.js';
|
|
57
55
|
import './hooks/useGlobalSettings.js';
|
|
@@ -77,12 +75,12 @@ import './components/Video/VideoPlayer.js';
|
|
|
77
75
|
import 'videojs-youtube';
|
|
78
76
|
import 'video.js';
|
|
79
77
|
import './components/Logo/Logo.js';
|
|
80
|
-
import './components/Cards/
|
|
81
|
-
import './components/Cards/
|
|
82
|
-
import './components/Cards/
|
|
83
|
-
import './components/Cards/FactlistCard/index.js';
|
|
78
|
+
import './components/Cards/DataCard/DataCard.js';
|
|
79
|
+
import './components/Cards/DetailCard/DetailCard.js';
|
|
80
|
+
import './components/Cards/FactlistCard/FactListCard.js';
|
|
84
81
|
import './components/List/ListItem.js';
|
|
85
|
-
import './components/Cards/
|
|
86
|
-
import './components/Cards/
|
|
87
|
-
import './components/Cards/
|
|
88
|
-
import './components/Cards/
|
|
82
|
+
import './components/Cards/FeatureCard/FeatureCard.js';
|
|
83
|
+
import './components/Cards/MultilinkCard/MultiLinkCard.js';
|
|
84
|
+
import './components/Cards/PromoCard/PromoCard.js';
|
|
85
|
+
import './components/Cards/StatCard/StatCard.js';
|
|
86
|
+
import './components/Cards/TextCard/TextCard.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardGroupProps } from "./CardGroup.props";
|
|
2
|
+
export declare const textCardGroup: CardGroupProps;
|
|
3
|
+
declare const CardGroupArgs: {
|
|
4
|
+
textCardGroup: import("./CardGroup.props").TextCardGroup;
|
|
5
|
+
statCardGroup: import("./CardGroup.props").StatCardGroup;
|
|
6
|
+
multilinkCardGroup: import("./CardGroup.props").MultilinkCardGroup;
|
|
7
|
+
promoCardGroup: import("./CardGroup.props").PromoCardGroup;
|
|
8
|
+
featureCardGroup: import("./CardGroup.props").FeatureCardGroup;
|
|
9
|
+
detailCardGroup: import("./CardGroup.props").DetailCardGroup;
|
|
10
|
+
factListCardGroup: import("./CardGroup.props").FactlistCardGroup;
|
|
11
|
+
dataCardGroup: import("./CardGroup.props").DataCardGroup;
|
|
12
|
+
};
|
|
13
|
+
export default CardGroupArgs;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
2
|
+
import { StatCardProps } from "../StatCard";
|
|
3
|
+
import { MultilinkCardProps } from "../MultilinkCard";
|
|
4
|
+
import { TextCardProps } from "../TextCard";
|
|
5
|
+
import { PromoCardProps } from "../PromoCard";
|
|
6
|
+
import { FeatureCardProps } from "../FeatureCard";
|
|
7
|
+
import { DetailCardProps } from "../DetailCard";
|
|
8
|
+
import { FactlistCardProps } from "../FactlistCard";
|
|
9
|
+
import { DataCardProps } from "../DataCard";
|
|
10
|
+
export interface CommonCardGroupProps {
|
|
11
|
+
/**
|
|
12
|
+
* Number of cards in the group
|
|
13
|
+
*/
|
|
14
|
+
cardCount: string;
|
|
15
|
+
/**
|
|
16
|
+
* A Button to display after all the cards in the group
|
|
17
|
+
*/
|
|
18
|
+
cta?: LinkProps;
|
|
19
|
+
}
|
|
20
|
+
export interface StatCardGroup extends CommonCardGroupProps {
|
|
21
|
+
/**
|
|
22
|
+
* Represents different types of card groups:
|
|
23
|
+
*/
|
|
24
|
+
type: "stat";
|
|
25
|
+
/**
|
|
26
|
+
* An array of card objects corresponding to the respective card type:
|
|
27
|
+
*/
|
|
28
|
+
cards: StatCardProps[];
|
|
29
|
+
}
|
|
30
|
+
export interface MultilinkCardGroup extends CommonCardGroupProps {
|
|
31
|
+
type: "multilink";
|
|
32
|
+
cards: MultilinkCardProps[];
|
|
33
|
+
}
|
|
34
|
+
export interface TextCardGroup extends CommonCardGroupProps {
|
|
35
|
+
type: "text";
|
|
36
|
+
cards: TextCardProps[];
|
|
37
|
+
}
|
|
38
|
+
export interface PromoCardGroup extends CommonCardGroupProps {
|
|
39
|
+
type: "promo";
|
|
40
|
+
cards: PromoCardProps[];
|
|
41
|
+
}
|
|
42
|
+
export interface FeatureCardGroup extends CommonCardGroupProps {
|
|
43
|
+
type: "feature";
|
|
44
|
+
cards: FeatureCardProps[];
|
|
45
|
+
}
|
|
46
|
+
export interface DetailCardGroup extends CommonCardGroupProps {
|
|
47
|
+
type: "detail";
|
|
48
|
+
cards: DetailCardProps[];
|
|
49
|
+
}
|
|
50
|
+
export interface FactlistCardGroup extends CommonCardGroupProps {
|
|
51
|
+
type: "factlist";
|
|
52
|
+
cards: FactlistCardProps[];
|
|
53
|
+
}
|
|
54
|
+
export interface DataCardGroup extends CommonCardGroupProps {
|
|
55
|
+
type: "data";
|
|
56
|
+
cards: DataCardProps[];
|
|
57
|
+
}
|
|
58
|
+
export type CardGroupProps = StatCardGroup | MultilinkCardGroup | TextCardGroup | PromoCardGroup | FeatureCardGroup | DetailCardGroup | FactlistCardGroup | DataCardGroup;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CardSize } from "../../../types";
|
|
2
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type DataCardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* A line of text that appears as a small heading at the top of the card
|
|
6
|
+
*/
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
/**
|
|
9
|
+
* How big should the card be
|
|
10
|
+
*/
|
|
11
|
+
size?: Omit<CardSize, "standard">;
|
|
12
|
+
/**
|
|
13
|
+
* The image to show in the card
|
|
14
|
+
*/
|
|
15
|
+
image?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Array of Content (label, copy), Files object (optional headline, array of items with label and url) and Links * * object (optional headline, array of items with label and url)
|
|
18
|
+
*/
|
|
19
|
+
dataset?: CardDataset;
|
|
20
|
+
/**
|
|
21
|
+
* Make the content appear in one or two columns. Only applies when the size is set to `wide` or `fluid`
|
|
22
|
+
*/
|
|
23
|
+
columns?: string;
|
|
24
|
+
};
|
|
25
|
+
interface CardDataset {
|
|
26
|
+
content?: DataContent;
|
|
27
|
+
files?: DataFile;
|
|
28
|
+
links?: DataLink;
|
|
29
|
+
cta?: Cta;
|
|
30
|
+
}
|
|
31
|
+
interface DataContent {
|
|
32
|
+
items?: Array<ContentItem>;
|
|
33
|
+
}
|
|
34
|
+
interface ContentItem {
|
|
35
|
+
label?: string;
|
|
36
|
+
copy?: string;
|
|
37
|
+
}
|
|
38
|
+
interface DataFile {
|
|
39
|
+
headline?: string;
|
|
40
|
+
items?: Array<LinkProps>;
|
|
41
|
+
}
|
|
42
|
+
interface DataLink {
|
|
43
|
+
headline?: string;
|
|
44
|
+
items?: Array<LinkProps>;
|
|
45
|
+
}
|
|
46
|
+
interface Cta {
|
|
47
|
+
headline?: string;
|
|
48
|
+
items?: Array<LinkProps>;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default DataCard;
|
|
1
|
+
export { default as DataCard } from "./DataCard";
|
|
2
|
+
export type { DataCardProps } from "./DataCard.props";
|
|
3
|
+
export { DataCardArgs } from "./DataCard.args";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CardSize, EventDate } from "../../../types";
|
|
2
|
+
export type DetailCardProps = {
|
|
3
|
+
/**
|
|
4
|
+
* A line of text that appears as a small heading above the title of the card
|
|
5
|
+
*/
|
|
6
|
+
eyebrow?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The title of the card
|
|
9
|
+
*/
|
|
10
|
+
title: string;
|
|
11
|
+
/**
|
|
12
|
+
* Introductory text in the card
|
|
13
|
+
*/
|
|
14
|
+
intro?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Specify the event Date, in both human and Unix format.
|
|
17
|
+
*/
|
|
18
|
+
date?: EventDate;
|
|
19
|
+
/**
|
|
20
|
+
* Information about an event
|
|
21
|
+
*/
|
|
22
|
+
eventdetails?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A URL to link to
|
|
25
|
+
*/
|
|
26
|
+
link?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The image to show in the card
|
|
29
|
+
*/
|
|
30
|
+
image?: string;
|
|
31
|
+
/**
|
|
32
|
+
* How big should the card be
|
|
33
|
+
*/
|
|
34
|
+
size?: Omit<CardSize, "standard">;
|
|
35
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default DetailCard;
|
|
1
|
+
export { default as DetailCard } from "./DetailCard";
|
|
2
|
+
export type { DetailCardProps } from "./DetailCard.props";
|
|
3
|
+
export { DetailCardArgs } from "./DetailCard.args";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ThemeTypes, CardSize } from "../../../types";
|
|
2
|
+
export type FactlistCardProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The title of the card
|
|
5
|
+
*/
|
|
6
|
+
title: string;
|
|
7
|
+
/**
|
|
8
|
+
* Will render the card to appear on light or dark backgrounds
|
|
9
|
+
*/
|
|
10
|
+
theme?: ThemeTypes;
|
|
11
|
+
/**
|
|
12
|
+
* How big should the card be
|
|
13
|
+
*/
|
|
14
|
+
size?: Omit<CardSize, "standard">;
|
|
15
|
+
list?: string[];
|
|
16
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default FactlistCard;
|
|
1
|
+
export { default as FactlistCard } from "./FactListCard";
|
|
2
|
+
export type { FactlistCardProps } from "./FactListCard.props";
|
|
3
|
+
export { FactlistCardArgs } from "./FactListCard.args";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ThemeTypes, CardSize, EventDate } from "../../../types";
|
|
2
|
+
import { LinkListProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type FeatureCardProps = {
|
|
4
|
+
isvideo?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A line of text that appears as a small heading above the title of the card
|
|
7
|
+
*/
|
|
8
|
+
eyebrow?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The title of the card
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Will render the card to appear on light or dark backgrounds
|
|
15
|
+
*/
|
|
16
|
+
theme?: ThemeTypes;
|
|
17
|
+
/**
|
|
18
|
+
* How big should the card be
|
|
19
|
+
*/
|
|
20
|
+
size?: Omit<CardSize, "standard">;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the event Date, in both human and Unix format.
|
|
23
|
+
*/
|
|
24
|
+
date?: EventDate;
|
|
25
|
+
link?: string;
|
|
26
|
+
linklist?: LinkListProps;
|
|
27
|
+
/**
|
|
28
|
+
* The image to show in the card
|
|
29
|
+
*/
|
|
30
|
+
image?: string;
|
|
31
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default FeatureCard;
|
|
1
|
+
export { default as FeatureCard } from "./FeatureCard";
|
|
2
|
+
export type { FeatureCardProps } from "./FeatureCard.props";
|
|
3
|
+
export { FeatureCardArgs } from "./FeatureCard.args";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CardAlignment, CardSize } from "../../../types";
|
|
2
|
+
import { LinkListProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type MultilinkCardProps = {
|
|
4
|
+
isvideo?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A line of text that appears as a small heading above the title of the card
|
|
7
|
+
*/
|
|
8
|
+
eyebrow?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The title of the card
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* How big should the card be
|
|
15
|
+
*/
|
|
16
|
+
size?: CardSize;
|
|
17
|
+
alignment?: CardAlignment;
|
|
18
|
+
intro?: string;
|
|
19
|
+
link?: string;
|
|
20
|
+
linklist?: LinkListProps;
|
|
21
|
+
/**
|
|
22
|
+
* The image to show in the card
|
|
23
|
+
*/
|
|
24
|
+
image?: string;
|
|
25
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default MultilinkCard;
|
|
1
|
+
export { default as MultilinkCard } from "./MultiLinkCard";
|
|
2
|
+
export type { MultilinkCardProps } from "./MultilinkCard.props";
|
|
3
|
+
export { MultilinkCardArgs } from "./MultilinkCard.args";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ThemeTypes, CardCornerType, CardSize } from "../../../types";
|
|
2
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type PromoCardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* A line of text that appears as a small heading above the title of the card
|
|
6
|
+
*/
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The title of the card
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* Will render the card to appear on light or dark backgrounds
|
|
14
|
+
*/
|
|
15
|
+
theme?: ThemeTypes;
|
|
16
|
+
/**
|
|
17
|
+
* How big should the card be
|
|
18
|
+
*/
|
|
19
|
+
size?: CardSize;
|
|
20
|
+
/**
|
|
21
|
+
* Apply an optional corner cut to the top of the card
|
|
22
|
+
*/
|
|
23
|
+
cornercut?: CardCornerType;
|
|
24
|
+
/**
|
|
25
|
+
* Introductory text in the card
|
|
26
|
+
*/
|
|
27
|
+
intro?: string;
|
|
28
|
+
link?: string;
|
|
29
|
+
cta?: LinkProps;
|
|
30
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default PromoCard;
|
|
1
|
+
export { default as PromoCard } from "./PromoCard";
|
|
2
|
+
export type { PromoCardProps } from "./PromoCard.props";
|
|
3
|
+
export { PromoCardArgs } from "./PromoCard.args";
|