@ilo-org/react 0.11.0 → 0.12.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/lib/cjs/components/Cards/Card.js +40 -0
  3. package/lib/cjs/components/Cards/CardGroup.js +33 -0
  4. package/lib/cjs/components/Cards/DataCard/index.js +27 -0
  5. package/lib/cjs/components/Cards/DetailCard/index.js +20 -0
  6. package/lib/cjs/components/Cards/FactlistCard/index.js +23 -0
  7. package/lib/cjs/components/Cards/FeatureCard/index.js +24 -0
  8. package/lib/cjs/components/Cards/MultilinkCard/index.js +24 -0
  9. package/lib/cjs/components/Cards/PromoCard/index.js +23 -0
  10. package/lib/cjs/components/Cards/StatCard/index.js +21 -0
  11. package/lib/cjs/components/Cards/TextCard/index.js +25 -0
  12. package/lib/cjs/components/Cards/index.js +37 -0
  13. package/lib/cjs/components/LinkList/LinkList.js +1 -1
  14. package/lib/cjs/components/index.js +12 -4
  15. package/lib/cjs/index.js +12 -4
  16. package/lib/esm/components/Cards/Card.js +38 -0
  17. package/lib/esm/components/{Card → Cards}/CardGroup.js +14 -6
  18. package/lib/esm/components/Cards/DataCard/index.js +25 -0
  19. package/lib/esm/components/Cards/DetailCard/index.js +18 -0
  20. package/lib/esm/components/Cards/FactlistCard/index.js +21 -0
  21. package/lib/esm/components/Cards/FeatureCard/index.js +22 -0
  22. package/lib/esm/components/Cards/MultilinkCard/index.js +22 -0
  23. package/lib/esm/components/Cards/PromoCard/index.js +21 -0
  24. package/lib/esm/components/Cards/StatCard/index.js +19 -0
  25. package/lib/esm/components/Cards/TextCard/index.js +23 -0
  26. package/lib/esm/components/Cards/index.js +22 -0
  27. package/lib/esm/components/LinkList/LinkList.js +1 -1
  28. package/lib/esm/components/index.js +10 -2
  29. package/lib/esm/index.js +10 -2
  30. package/lib/types/react/src/components/Cards/Card.props.d.ts +307 -0
  31. package/lib/types/react/src/components/{Card → Cards}/CardGroup.props.d.ts +1 -1
  32. package/lib/types/react/src/components/Cards/DataCard/index.d.ts +4 -0
  33. package/lib/types/react/src/components/Cards/DetailCard/index.d.ts +4 -0
  34. package/lib/types/react/src/components/Cards/FactlistCard/index.d.ts +4 -0
  35. package/lib/types/react/src/components/Cards/FeatureCard/index.d.ts +4 -0
  36. package/lib/types/react/src/components/Cards/MultilinkCard/index.d.ts +4 -0
  37. package/lib/types/react/src/components/Cards/PromoCard/index.d.ts +4 -0
  38. package/lib/types/react/src/components/Cards/StatCard/index.d.ts +4 -0
  39. package/lib/types/react/src/components/Cards/TextCard/index.d.ts +4 -0
  40. package/lib/types/react/src/components/Cards/index.d.ts +11 -0
  41. package/lib/types/react/src/components/index.d.ts +1 -1
  42. package/lib/types/react/src/types/index.d.ts +3 -3
  43. package/package.json +2 -2
  44. package/src/components/{Card → Cards}/Card.args.ts +41 -36
  45. package/src/components/Cards/Card.props.ts +382 -0
  46. package/src/components/Cards/Card.tsx +36 -0
  47. package/src/components/{Card → Cards}/CardGroup.args.ts +26 -26
  48. package/src/components/{Card → Cards}/CardGroup.props.ts +1 -1
  49. package/src/components/{Card → Cards}/CardGroup.tsx +12 -13
  50. package/src/components/Cards/DataCard/index.tsx +107 -0
  51. package/src/components/Cards/DetailCard/index.tsx +62 -0
  52. package/src/components/Cards/FactlistCard/index.tsx +42 -0
  53. package/src/components/Cards/FeatureCard/index.tsx +69 -0
  54. package/src/components/Cards/MultilinkCard/index.tsx +76 -0
  55. package/src/components/Cards/PromoCard/index.tsx +60 -0
  56. package/src/components/Cards/StatCard/index.tsx +36 -0
  57. package/src/components/Cards/TextCard/index.tsx +63 -0
  58. package/src/components/Cards/index.ts +22 -0
  59. package/src/components/LinkList/LinkList.tsx +1 -1
  60. package/src/components/index.ts +1 -1
  61. package/src/types/index.ts +4 -4
  62. package/lib/cjs/components/Card/Card.js +0 -43
  63. package/lib/cjs/components/Card/CardGroup.js +0 -25
  64. package/lib/cjs/components/Card/index.js +0 -21
  65. package/lib/esm/components/Card/Card.js +0 -41
  66. package/lib/esm/components/Card/index.js +0 -14
  67. package/lib/types/react/src/components/Card/Card.props.d.ts +0 -110
  68. package/lib/types/react/src/components/Card/index.d.ts +0 -2
  69. package/src/components/Card/Card.props.ts +0 -142
  70. package/src/components/Card/Card.tsx +0 -183
  71. package/src/components/Card/index.ts +0 -2
  72. /package/lib/types/react/src/components/{Card → Cards}/Card.d.ts +0 -0
  73. /package/lib/types/react/src/components/{Card → Cards}/CardGroup.d.ts +0 -0
@@ -0,0 +1,36 @@
1
+ import { FC } from "react";
2
+ import classnames from "classnames";
3
+ import useGlobalSettings from "../../../hooks/useGlobalSettings";
4
+ import { StatCardProps } from "../Card.props";
5
+ import { Link } from "../../Link";
6
+
7
+ const StatCard: FC<StatCardProps> = ({
8
+ title,
9
+ color,
10
+ size = "standard",
11
+ intro,
12
+ source,
13
+ }) => {
14
+ const { prefix } = useGlobalSettings();
15
+
16
+ const baseClass = `${prefix}--card`;
17
+
18
+ const cardClasses = classnames(baseClass, `${baseClass}__type__stat`, {
19
+ [`${baseClass}__color__${color}`]: color,
20
+ [`${baseClass}__size__${size}`]: size,
21
+ });
22
+
23
+ return (
24
+ <div className={cardClasses}>
25
+ <div className={`${baseClass}--wrap`}>
26
+ <div className={`${baseClass}--content`}>
27
+ {title && <h5 className={`${baseClass}--title`}>{title}</h5>}
28
+ {intro && <p className={`${baseClass}--intro`}>{intro}</p>}
29
+ {source && <Link url={source.url}>{source.label}</Link>}
30
+ </div>
31
+ </div>
32
+ </div>
33
+ );
34
+ };
35
+
36
+ export default StatCard;
@@ -0,0 +1,63 @@
1
+ import { FC } from "react";
2
+ import classnames from "classnames";
3
+ import useGlobalSettings from "../../../hooks/useGlobalSettings";
4
+ import { TextCardProps } from "../Card.props";
5
+ import { Profile } from "../../Profile";
6
+
7
+ const TextCard: FC<TextCardProps> = ({
8
+ eyebrow,
9
+ title,
10
+ theme,
11
+ size,
12
+ date,
13
+ profile,
14
+ link,
15
+ }) => {
16
+ const { prefix } = useGlobalSettings();
17
+
18
+ const baseClass = `${prefix}--card`;
19
+
20
+ const wrapperClass = classnames(`${baseClass}--wrapper`);
21
+
22
+ const cardClasses = classnames(baseClass, `${baseClass}__type__text`, {
23
+ [`${baseClass}__action`]: link,
24
+ [`${baseClass}__size__${size}`]: size,
25
+ [`${baseClass}__theme__${theme}`]: theme,
26
+ });
27
+ console.log("heloo");
28
+ console.log(profile);
29
+ return (
30
+ <div className={wrapperClass}>
31
+ <div className={cardClasses}>
32
+ {link && (
33
+ <a className={`${baseClass}--link`} href={link} title={title}>
34
+ <span className={`${baseClass}--link--text`}>{title}</span>
35
+ </a>
36
+ )}
37
+ <div className={`${baseClass}--wrap`}>
38
+ <div className={`${baseClass}--content`}>
39
+ {eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
40
+ {title && <h5 className={`${baseClass}--title`}>{title}</h5>}
41
+ {date && (
42
+ <time className={`${baseClass}--date`} dateTime={date.unix}>
43
+ {date.human}
44
+ </time>
45
+ )}
46
+ {profile && profile.avatar && (
47
+ <Profile
48
+ avatar={profile.avatar}
49
+ description={profile.description}
50
+ link={profile.link}
51
+ name={profile.name}
52
+ role={profile.role}
53
+ className={`${prefix}--profile--contents--${theme}`}
54
+ />
55
+ )}
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ );
61
+ };
62
+
63
+ export default TextCard;
@@ -0,0 +1,22 @@
1
+ import FeatureCard from "./FeatureCard";
2
+ import DataCard from "./DataCard";
3
+ import DetailCard from "./DetailCard";
4
+ import FactlistCard from "./FactlistCard";
5
+ import MultilinkCard from "./MultilinkCard";
6
+ import PromoCard from "./PromoCard";
7
+ import StatCard from "./StatCard";
8
+ import TextCard from "./TextCard";
9
+
10
+ export {
11
+ FeatureCard,
12
+ DataCard,
13
+ DetailCard,
14
+ FactlistCard,
15
+ MultilinkCard,
16
+ PromoCard,
17
+ StatCard,
18
+ TextCard,
19
+ };
20
+
21
+ export { default as Card } from "./Card";
22
+ export { default as CardGroup } from "./CardGroup";
@@ -19,7 +19,7 @@ const LinkList: FC<LinkListProps> = ({
19
19
 
20
20
  return (
21
21
  <div className={linkListClasses}>
22
- <h3 className={`${baseClass}--headline`}>{headline}</h3>
22
+ {headline && <h3 className={`${baseClass}--headline`}>{headline}</h3>}
23
23
  <ul className={`${baseClass}--linkgroups`}>
24
24
  {linkgroup &&
25
25
  linkgroup.map((linkset, i) => (
@@ -41,6 +41,6 @@ export { TableOfContents } from "./TableOfContents";
41
41
  export { Footer } from "./Footer";
42
42
  export { LocalNav } from "./LocalNav";
43
43
  export { Navigation } from "./Navigation";
44
- export { Card, CardGroup } from "./Card";
44
+ export { Card, CardGroup } from "./Cards";
45
45
  export { Breadcrumb } from "./Breadcrumb";
46
46
  export { Tabs } from "./Tabs";
@@ -53,14 +53,14 @@ export type SocialTypes =
53
53
  | "tiktok"
54
54
  | "flickr";
55
55
  export type CardColor = "turquoise" | "green" | "yellow" | "blue";
56
- export type CardSize = "wide" | "standard" | "narrow";
57
- export type CardCornerType = "cornercut" | "corner";
56
+ export type CardSize = "wide" | "standard" | "narrow" | "fluid";
57
+ export type CardCornerType = boolean;
58
58
  export type CardAlignment = "left" | "right";
59
59
  export type CardTypes =
60
60
  | "stat"
61
61
  | "multilink"
62
- | "graphic"
63
- | "graphicpromo"
62
+ | "text"
63
+ | "promo"
64
64
  | "feature"
65
65
  | "detail"
66
66
  | "factlist"
@@ -1,43 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var classNames = require('classnames');
5
- var hooks_useGlobalSettings = require('../../hooks/useGlobalSettings.js');
6
- var components_Link_Link = require('../Link/Link.js');
7
- var components_List_List = require('../List/List.js');
8
- var components_List_ListItem = require('../List/ListItem.js');
9
- var components_LinkList_LinkList = require('../LinkList/LinkList.js');
10
- var components_Profile_Profile = require('../Profile/Profile.js');
11
- require('tslib');
12
- require('react');
13
- require('../../GlobalCtx-10114bdd.js');
14
- require('../../ListCtx-14aa546f.js');
15
-
16
- const Card = ({ isvideo, eyebrow, title, color, theme, variant, size, cornercut, alignment, intro, date, eventdetails, profile, listitems, link, linklist, cta, image, source, dataset, }) => {
17
- const { prefix } = hooks_useGlobalSettings();
18
- const baseClass = `${prefix}--card`;
19
- const cardClasses = classNames(baseClass, `${baseClass}--${variant}`, `${baseClass}--${color}`, {
20
- [`${baseClass}--${cornercut}`]: cornercut,
21
- [`${baseClass}--${alignment}`]: alignment,
22
- [`${baseClass}--action`]: link,
23
- [`${baseClass}--${size}`]: size,
24
- [`${baseClass}--isvideo`]: isvideo,
25
- [`${baseClass}--linklist`]: linklist,
26
- [`${baseClass}--${theme}`]: theme,
27
- });
28
- return (jsxRuntime.jsxs("div", Object.assign({ className: cardClasses }, { children: [link &&
29
- variant != "data" &&
30
- variant != "factlist" &&
31
- variant != "stat" && (jsxRuntime.jsx("a", Object.assign({ className: `${baseClass}--link`, href: link, title: title }, { children: jsxRuntime.jsx("span", Object.assign({ className: `${baseClass}--link--text` }, { children: title })) }))), jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--wrap` }, { children: [image && (jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--image--wrapper` }, { children: jsxRuntime.jsx("picture", { children: jsxRuntime.jsx("img", { className: `${baseClass}--image`, src: image, alt: title }) }) }))), jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--content` }, { children: [eyebrow && jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--eyebrow` }, { children: eyebrow })), title && jsxRuntime.jsx("h3", Object.assign({ className: `${baseClass}--title` }, { children: title })), (variant == "multilink" || (variant == "data" && image)) && (jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--image--wrapper` }, { children: jsxRuntime.jsx("picture", { children: jsxRuntime.jsx("img", { className: `${baseClass}--image`, src: image, alt: title }) }) }))), intro && jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--intro` }, { children: intro })), date &&
32
- variant != "stat" &&
33
- variant != "data" &&
34
- variant != "graphicpromo" &&
35
- variant != "factlist" && (jsxRuntime.jsx("time", Object.assign({ className: `${baseClass}--date`, dateTime: date.unix }, { children: date.human }))), eventdetails && (jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--event-date` }, { children: eventdetails }))), profile && profile.avatar && (jsxRuntime.jsx(components_Profile_Profile, { avatar: profile.avatar, description: profile.description, link: profile.link, name: profile.name, role: profile.role, className: `${prefix}--profile--contents--${theme}` })), listitems && (jsxRuntime.jsx(components_List_List, Object.assign({ alignment: "default", ordered: "unordered" }, { children: listitems.map((item, index) => (jsxRuntime.jsx(components_List_ListItem, Object.assign({ id: `list${index}` }, { children: jsxRuntime.jsx("p", { children: item }) })))) }))), cta && cta.label && (jsxRuntime.jsx("a", Object.assign({ className: `${baseClass}--cta ${prefix}--button ${prefix}--button--medium ${prefix}--button--primary`, href: cta.url }, { children: jsxRuntime.jsx("span", Object.assign({ className: "link__label" }, { children: cta.label })) }))), source && (jsxRuntime.jsx(components_Link_Link, Object.assign({ theme: theme, url: source.url }, { children: source.label }))), linklist && (jsxRuntime.jsx(components_LinkList_LinkList, { headline: linklist.headline, linkgroup: linklist.linkgroup })), dataset &&
36
- dataset.content &&
37
- dataset.content.items &&
38
- dataset.content.items.map((item) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: item.label })), jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--data--content-copy` }, { children: item.copy }))] }))), dataset && dataset.files && (jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--data--content-files` }, { children: [jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: dataset.files.headline })), dataset.files.items &&
39
- dataset.files.items.map((item) => (jsxRuntime.jsx("a", Object.assign({ className: `${baseClass}--data--file ${prefix}--button ${prefix}--button--primary ${prefix}--button--small`, href: item.url, download: true }, { children: jsxRuntime.jsx("span", Object.assign({ className: "button__label" }, { children: item.label })) }))))] }))), dataset && dataset.links && (jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--data--content-links` }, { children: [jsxRuntime.jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: dataset.links.headline })), dataset.links.items &&
40
- dataset.links.items.map((item) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(components_Link_Link, Object.assign({ url: item.url }, { children: item.label })), jsxRuntime.jsx("span", { children: "\u00A0\u00A0" })] })))] })))] }))] }))] })));
41
- };
42
-
43
- module.exports = Card;
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- var components_Card_Card = require('./Card.js');
4
- var jsxRuntime = require('react/jsx-runtime');
5
- var classNames = require('classnames');
6
- var hooks_useGlobalSettings = require('../../hooks/useGlobalSettings.js');
7
- require('../Link/Link.js');
8
- require('tslib');
9
- require('../List/List.js');
10
- require('react');
11
- require('../../ListCtx-14aa546f.js');
12
- require('../../GlobalCtx-10114bdd.js');
13
- require('../List/ListItem.js');
14
- require('../LinkList/LinkList.js');
15
- require('../Profile/Profile.js');
16
-
17
- const CardGroup = ({ cards, cardcount, cta }) => {
18
- const { prefix } = hooks_useGlobalSettings();
19
- const baseClass = `${prefix}--cardgroup`;
20
- const cardGroupClasses = classNames(baseClass, `${baseClass}--${cardcount}`);
21
- return (jsxRuntime.jsx("div", Object.assign({ className: cardGroupClasses }, { children: jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [cards &&
22
- cards.map((card) => (jsxRuntime.jsx(components_Card_Card, { title: card.title, image: card.image, intro: card.intro, eyebrow: card.eyebrow, date: card.date, dataset: card.dataset, link: card.link, profile: card.profile, cta: card.cta, source: card.source, listitems: card.listitems, linklist: card.linklist, color: card.color, theme: card.theme, cornercut: card.cornercut, alignment: card.alignment, variant: card.variant, size: card.size }))), cta && (jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--button-wrap` }, { children: jsxRuntime.jsx("a", Object.assign({ className: `${prefix}--button ${prefix}--button--medium ${prefix}--button--secondary`, href: cta.url }, { children: jsxRuntime.jsx("span", Object.assign({ className: "button__label" }, { children: cta.label })) })) })))] })) })));
23
- };
24
-
25
- module.exports = CardGroup;
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- var components_Card_Card = require('./Card.js');
4
- var components_Card_CardGroup = require('./CardGroup.js');
5
- require('react/jsx-runtime');
6
- require('classnames');
7
- require('../../hooks/useGlobalSettings.js');
8
- require('tslib');
9
- require('react');
10
- require('../../GlobalCtx-10114bdd.js');
11
- require('../Link/Link.js');
12
- require('../List/List.js');
13
- require('../../ListCtx-14aa546f.js');
14
- require('../List/ListItem.js');
15
- require('../LinkList/LinkList.js');
16
- require('../Profile/Profile.js');
17
-
18
-
19
-
20
- exports.Card = components_Card_Card;
21
- exports.CardGroup = components_Card_CardGroup;
@@ -1,41 +0,0 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import classNames from 'classnames';
3
- import useGlobalSettings from '../../hooks/useGlobalSettings.js';
4
- import Link from '../Link/Link.js';
5
- import List from '../List/List.js';
6
- import ListItem from '../List/ListItem.js';
7
- import LinkList from '../LinkList/LinkList.js';
8
- import Profile from '../Profile/Profile.js';
9
- import 'tslib';
10
- import 'react';
11
- import '../../GlobalCtx-7fb23cfa.js';
12
- import '../../ListCtx-da435fdf.js';
13
-
14
- const Card = ({ isvideo, eyebrow, title, color, theme, variant, size, cornercut, alignment, intro, date, eventdetails, profile, listitems, link, linklist, cta, image, source, dataset, }) => {
15
- const { prefix } = useGlobalSettings();
16
- const baseClass = `${prefix}--card`;
17
- const cardClasses = classNames(baseClass, `${baseClass}--${variant}`, `${baseClass}--${color}`, {
18
- [`${baseClass}--${cornercut}`]: cornercut,
19
- [`${baseClass}--${alignment}`]: alignment,
20
- [`${baseClass}--action`]: link,
21
- [`${baseClass}--${size}`]: size,
22
- [`${baseClass}--isvideo`]: isvideo,
23
- [`${baseClass}--linklist`]: linklist,
24
- [`${baseClass}--${theme}`]: theme,
25
- });
26
- return (jsxs("div", Object.assign({ className: cardClasses }, { children: [link &&
27
- variant != "data" &&
28
- variant != "factlist" &&
29
- variant != "stat" && (jsx("a", Object.assign({ className: `${baseClass}--link`, href: link, title: title }, { children: jsx("span", Object.assign({ className: `${baseClass}--link--text` }, { children: title })) }))), jsxs("div", Object.assign({ className: `${baseClass}--wrap` }, { children: [image && (jsx("div", Object.assign({ className: `${baseClass}--image--wrapper` }, { children: jsx("picture", { children: jsx("img", { className: `${baseClass}--image`, src: image, alt: title }) }) }))), jsxs("div", Object.assign({ className: `${baseClass}--content` }, { children: [eyebrow && jsx("p", Object.assign({ className: `${baseClass}--eyebrow` }, { children: eyebrow })), title && jsx("h3", Object.assign({ className: `${baseClass}--title` }, { children: title })), (variant == "multilink" || (variant == "data" && image)) && (jsx("div", Object.assign({ className: `${baseClass}--image--wrapper` }, { children: jsx("picture", { children: jsx("img", { className: `${baseClass}--image`, src: image, alt: title }) }) }))), intro && jsx("p", Object.assign({ className: `${baseClass}--intro` }, { children: intro })), date &&
30
- variant != "stat" &&
31
- variant != "data" &&
32
- variant != "graphicpromo" &&
33
- variant != "factlist" && (jsx("time", Object.assign({ className: `${baseClass}--date`, dateTime: date.unix }, { children: date.human }))), eventdetails && (jsx("p", Object.assign({ className: `${baseClass}--event-date` }, { children: eventdetails }))), profile && profile.avatar && (jsx(Profile, { avatar: profile.avatar, description: profile.description, link: profile.link, name: profile.name, role: profile.role, className: `${prefix}--profile--contents--${theme}` })), listitems && (jsx(List, Object.assign({ alignment: "default", ordered: "unordered" }, { children: listitems.map((item, index) => (jsx(ListItem, Object.assign({ id: `list${index}` }, { children: jsx("p", { children: item }) })))) }))), cta && cta.label && (jsx("a", Object.assign({ className: `${baseClass}--cta ${prefix}--button ${prefix}--button--medium ${prefix}--button--primary`, href: cta.url }, { children: jsx("span", Object.assign({ className: "link__label" }, { children: cta.label })) }))), source && (jsx(Link, Object.assign({ theme: theme, url: source.url }, { children: source.label }))), linklist && (jsx(LinkList, { headline: linklist.headline, linkgroup: linklist.linkgroup })), dataset &&
34
- dataset.content &&
35
- dataset.content.items &&
36
- dataset.content.items.map((item) => (jsxs(Fragment, { children: [jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: item.label })), jsx("p", Object.assign({ className: `${baseClass}--data--content-copy` }, { children: item.copy }))] }))), dataset && dataset.files && (jsxs("div", Object.assign({ className: `${baseClass}--data--content-files` }, { children: [jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: dataset.files.headline })), dataset.files.items &&
37
- dataset.files.items.map((item) => (jsx("a", Object.assign({ className: `${baseClass}--data--file ${prefix}--button ${prefix}--button--primary ${prefix}--button--small`, href: item.url, download: true }, { children: jsx("span", Object.assign({ className: "button__label" }, { children: item.label })) }))))] }))), dataset && dataset.links && (jsxs("div", Object.assign({ className: `${baseClass}--data--content-links` }, { children: [jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: dataset.links.headline })), dataset.links.items &&
38
- dataset.links.items.map((item) => (jsxs(Fragment, { children: [jsx(Link, Object.assign({ url: item.url }, { children: item.label })), jsx("span", { children: "\u00A0\u00A0" })] })))] })))] }))] }))] })));
39
- };
40
-
41
- export { Card as default };
@@ -1,14 +0,0 @@
1
- export { default as Card } from './Card.js';
2
- export { default as CardGroup } from './CardGroup.js';
3
- import 'react/jsx-runtime';
4
- import 'classnames';
5
- import '../../hooks/useGlobalSettings.js';
6
- import 'tslib';
7
- import 'react';
8
- import '../../GlobalCtx-7fb23cfa.js';
9
- import '../Link/Link.js';
10
- import '../List/List.js';
11
- import '../../ListCtx-da435fdf.js';
12
- import '../List/ListItem.js';
13
- import '../LinkList/LinkList.js';
14
- import '../Profile/Profile.js';
@@ -1,110 +0,0 @@
1
- import { CardAlignment, ThemeTypes, CardCornerType, CardColor, CardSize, CardTypes } from "../../types";
2
- import { LinkProps, LinkListProps } from "../LinkList/LinkList.props";
3
- import { ProfileProps } from "../Profile/Profile.props";
4
- export interface CardProps {
5
- /**
6
- * Specify whether the card should display a video icon (for Feature card). Possible options: true | false
7
- */
8
- isvideo?: boolean;
9
- /**
10
- * Eyebrow field for the card.
11
- */
12
- eyebrow: Required<string>;
13
- /**
14
- * Title field for the card
15
- */
16
- title: Required<string>;
17
- /**
18
- * Color of the stat cards, options are turquoise | green| yellow| blue. Only used for stat cards.
19
- */
20
- color?: CardColor;
21
- /**
22
- * The theme type for the card. Theme doesn't apply to these card types: Multilink, Data, Stat and Detail. Possible themes: light | dark.
23
- */
24
- theme?: ThemeTypes;
25
- /**
26
- * Different variations of card: Graphic | Stat | Graphic Promo | Multilink | Feature | Detail | Fact List | Data.
27
- */
28
- variant: Required<CardTypes>;
29
- /**
30
- * Size of the cards (usually reduces padding). `Wide` on Multilink and Feature cause a two column structure above a desktop breakpoint. Possible options: Wide | Standard | Narrow.
31
- */
32
- size?: CardSize;
33
- /**
34
- * Specify whether the card has a cut corner. The only cards that use this setting are `Graphic Promo` and `Factlist`. Possible options: cornercut | corner.
35
- */
36
- cornercut?: CardCornerType;
37
- /**
38
- * Specify whether a card image is right-aligned or left-aligned for `Multilink` cards. Possible options: left | right.
39
- */
40
- alignment?: CardAlignment;
41
- /**
42
- * Intro text field for the card
43
- */
44
- intro?: string;
45
- /**
46
- * Specify the event Date, in both human and Unix format.
47
- */
48
- date?: EventDate;
49
- /**
50
- * Event details for `Detail` card
51
- */
52
- eventdetails?: string;
53
- /**
54
- * Profile to embed in the card for `Graphic Text`
55
- */
56
- profile?: ProfileProps;
57
- /**
58
- * A list of text itmes to be embed in the card, specifically used in `Factlist` card.
59
- */
60
- listitems?: Array<string>;
61
- /**
62
- * A Link behind a clickable card. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
63
- */
64
- link?: string;
65
- /**
66
- * Props of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
67
- */
68
- linklist?: LinkListProps;
69
- /**
70
- * Items for clickable CTA button, specifically used for `Graphic Promo` card.
71
- */
72
- cta?: LinkProps;
73
- /**
74
- * The image used in a card. Images should be avoided on `Graphic Promo`, `Graphic Text`, `Factlist`, and `Stat` card.
75
- */
76
- image?: string;
77
- /**
78
- * Source link for `Stat` cards.
79
- */
80
- source?: LinkProps;
81
- /**
82
- * Dataset object for the `Data` card. An array of Content (label, copy), Files (optional headline, array of items with label and url), and Links (optional headline, array of items with label and url).
83
- */
84
- dataset?: CardDataset;
85
- }
86
- interface EventDate {
87
- unix?: string;
88
- human?: string;
89
- }
90
- interface CardDataset {
91
- content?: DataContent;
92
- files?: DataFile;
93
- links?: DataLink;
94
- }
95
- interface DataContent {
96
- items?: Array<ContentItem>;
97
- }
98
- interface ContentItem {
99
- label?: string;
100
- copy?: string;
101
- }
102
- interface DataFile {
103
- headline?: string;
104
- items?: Array<LinkProps>;
105
- }
106
- interface DataLink {
107
- headline?: string;
108
- items?: Array<LinkProps>;
109
- }
110
- export {};
@@ -1,2 +0,0 @@
1
- export { default as Card } from "./Card";
2
- export { default as CardGroup } from "./CardGroup";
@@ -1,142 +0,0 @@
1
- import {
2
- CardAlignment,
3
- ThemeTypes,
4
- CardCornerType,
5
- CardColor,
6
- CardSize,
7
- CardTypes,
8
- } from "../../types";
9
- import { LinkProps, LinkListProps } from "../LinkList/LinkList.props";
10
- import { ProfileProps } from "../Profile/Profile.props";
11
-
12
- export interface CardProps {
13
- /**
14
- * Specify whether the card should display a video icon (for Feature card). Possible options: true | false
15
- */
16
- isvideo?: boolean;
17
-
18
- /**
19
- * Eyebrow field for the card.
20
- */
21
- eyebrow: Required<string>;
22
-
23
- /**
24
- * Title field for the card
25
- */
26
- title: Required<string>;
27
-
28
- /**
29
- * Color of the stat cards, options are turquoise | green| yellow| blue. Only used for stat cards.
30
- */
31
- color?: CardColor;
32
-
33
- /**
34
- * The theme type for the card. Theme doesn't apply to these card types: Multilink, Data, Stat and Detail. Possible themes: light | dark.
35
- */
36
- theme?: ThemeTypes;
37
-
38
- /**
39
- * Different variations of card: Graphic | Stat | Graphic Promo | Multilink | Feature | Detail | Fact List | Data.
40
- */
41
- variant: Required<CardTypes>;
42
-
43
- /**
44
- * Size of the cards (usually reduces padding). `Wide` on Multilink and Feature cause a two column structure above a desktop breakpoint. Possible options: Wide | Standard | Narrow.
45
- */
46
- size?: CardSize;
47
-
48
- /**
49
- * Specify whether the card has a cut corner. The only cards that use this setting are `Graphic Promo` and `Factlist`. Possible options: cornercut | corner.
50
- */
51
- cornercut?: CardCornerType;
52
-
53
- /**
54
- * Specify whether a card image is right-aligned or left-aligned for `Multilink` cards. Possible options: left | right.
55
- */
56
- alignment?: CardAlignment;
57
-
58
- /**
59
- * Intro text field for the card
60
- */
61
- intro?: string;
62
-
63
- /**
64
- * Specify the event Date, in both human and Unix format.
65
- */
66
- date?: EventDate;
67
-
68
- /**
69
- * Event details for `Detail` card
70
- */
71
- eventdetails?: string;
72
-
73
- /**
74
- * Profile to embed in the card for `Graphic Text`
75
- */
76
- profile?: ProfileProps;
77
-
78
- /**
79
- * A list of text itmes to be embed in the card, specifically used in `Factlist` card.
80
- */
81
- listitems?: Array<string>;
82
-
83
- /**
84
- * A Link behind a clickable card. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
85
- */
86
- link?: string;
87
-
88
- /**
89
- * Props of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
90
- */
91
- linklist?: LinkListProps;
92
-
93
- /**
94
- * Items for clickable CTA button, specifically used for `Graphic Promo` card.
95
- */
96
- cta?: LinkProps;
97
-
98
- /**
99
- * The image used in a card. Images should be avoided on `Graphic Promo`, `Graphic Text`, `Factlist`, and `Stat` card.
100
- */
101
- image?: string;
102
-
103
- /**
104
- * Source link for `Stat` cards.
105
- */
106
- source?: LinkProps;
107
-
108
- /**
109
- * Dataset object for the `Data` card. An array of Content (label, copy), Files (optional headline, array of items with label and url), and Links (optional headline, array of items with label and url).
110
- */
111
- dataset?: CardDataset;
112
- }
113
-
114
- interface EventDate {
115
- unix?: string;
116
- human?: string;
117
- }
118
-
119
- interface CardDataset {
120
- content?: DataContent;
121
- files?: DataFile;
122
- links?: DataLink;
123
- }
124
-
125
- interface DataContent {
126
- items?: Array<ContentItem>;
127
- }
128
-
129
- interface ContentItem {
130
- label?: string;
131
- copy?: string;
132
- }
133
-
134
- interface DataFile {
135
- headline?: string;
136
- items?: Array<LinkProps>;
137
- }
138
-
139
- interface DataLink {
140
- headline?: string;
141
- items?: Array<LinkProps>;
142
- }