@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.
Files changed (260) hide show
  1. package/.storybook/main.ts +41 -0
  2. package/.storybook/manager-head.html +92 -0
  3. package/.storybook/manager.ts +6 -0
  4. package/.storybook/preview-head.html +5 -0
  5. package/.storybook/preview.tsx +81 -0
  6. package/.storybook/styles.scss +25 -0
  7. package/.storybook/theme.ts +46 -0
  8. package/.turbo/turbo-build:lib.log +15 -0
  9. package/CHANGELOG.md +43 -0
  10. package/lib/cjs/components/Cards/CardGroup/CardGroup.js +41 -0
  11. package/lib/cjs/components/Cards/CardGroup/index.js +796 -0
  12. package/lib/cjs/components/Cards/DataCard/DataCard.js +27 -0
  13. package/lib/cjs/components/Cards/DataCard/index.js +73 -19
  14. package/lib/cjs/components/Cards/DetailCard/DetailCard.js +20 -0
  15. package/lib/cjs/components/Cards/DetailCard/index.js +17 -12
  16. package/lib/cjs/components/Cards/FactlistCard/FactListCard.js +22 -0
  17. package/lib/cjs/components/Cards/FactlistCard/index.js +16 -15
  18. package/lib/cjs/components/Cards/FeatureCard/FeatureCard.js +24 -0
  19. package/lib/cjs/components/Cards/FeatureCard/index.js +31 -16
  20. package/lib/cjs/components/Cards/MultilinkCard/MultiLinkCard.js +24 -0
  21. package/lib/cjs/components/Cards/MultilinkCard/index.js +35 -16
  22. package/lib/cjs/components/Cards/PromoCard/PromoCard.js +23 -0
  23. package/lib/cjs/components/Cards/PromoCard/index.js +18 -15
  24. package/lib/cjs/components/Cards/StatCard/StatCard.js +21 -0
  25. package/lib/cjs/components/Cards/StatCard/index.js +15 -13
  26. package/lib/cjs/components/Cards/TextCard/TextCard.js +23 -0
  27. package/lib/cjs/components/Cards/TextCard/index.js +22 -17
  28. package/lib/cjs/components/Footer/Footer.js +1 -1
  29. package/lib/cjs/components/List/List.js +9 -11
  30. package/lib/cjs/components/List/ListItem.js +4 -7
  31. package/lib/cjs/components/List/index.js +1 -2
  32. package/lib/cjs/components/Navigation/Navigation.js +3 -3
  33. package/lib/cjs/components/Pagination/Pagination.js +1 -1
  34. package/lib/cjs/components/index.js +10 -13
  35. package/lib/cjs/index.js +10 -13
  36. package/lib/esm/components/Cards/CardGroup/CardGroup.js +39 -0
  37. package/lib/esm/components/Cards/CardGroup/index.js +793 -0
  38. package/lib/esm/components/Cards/DataCard/DataCard.js +25 -0
  39. package/lib/esm/components/Cards/DataCard/index.js +72 -19
  40. package/lib/esm/components/Cards/DetailCard/DetailCard.js +18 -0
  41. package/lib/esm/components/Cards/DetailCard/index.js +16 -12
  42. package/lib/esm/components/Cards/FactlistCard/FactListCard.js +20 -0
  43. package/lib/esm/components/Cards/FactlistCard/index.js +15 -15
  44. package/lib/esm/components/Cards/FeatureCard/FeatureCard.js +22 -0
  45. package/lib/esm/components/Cards/FeatureCard/index.js +30 -16
  46. package/lib/esm/components/Cards/MultilinkCard/MultiLinkCard.js +22 -0
  47. package/lib/esm/components/Cards/MultilinkCard/index.js +34 -16
  48. package/lib/esm/components/Cards/PromoCard/PromoCard.js +21 -0
  49. package/lib/esm/components/Cards/PromoCard/index.js +17 -15
  50. package/lib/esm/components/Cards/StatCard/StatCard.js +19 -0
  51. package/lib/esm/components/Cards/StatCard/index.js +14 -13
  52. package/lib/esm/components/Cards/TextCard/TextCard.js +21 -0
  53. package/lib/esm/components/Cards/TextCard/index.js +21 -17
  54. package/lib/esm/components/Footer/Footer.js +1 -1
  55. package/lib/esm/components/List/List.js +10 -12
  56. package/lib/esm/components/List/ListItem.js +4 -7
  57. package/lib/esm/components/List/index.js +1 -2
  58. package/lib/esm/components/Navigation/Navigation.js +3 -3
  59. package/lib/esm/components/Pagination/Pagination.js +1 -1
  60. package/lib/esm/components/index.js +9 -11
  61. package/lib/esm/index.js +9 -11
  62. package/lib/types/react/src/components/Cards/CardGroup/CardGroup.args.d.ts +13 -0
  63. package/lib/types/react/src/components/Cards/CardGroup/CardGroup.props.d.ts +58 -0
  64. package/lib/types/react/src/components/Cards/CardGroup/index.d.ts +3 -0
  65. package/lib/types/react/src/components/Cards/DataCard/DataCard.args.d.ts +2 -0
  66. package/lib/types/react/src/components/Cards/DataCard/DataCard.d.ts +4 -0
  67. package/lib/types/react/src/components/Cards/DataCard/DataCard.props.d.ts +50 -0
  68. package/lib/types/react/src/components/Cards/DataCard/index.d.ts +3 -4
  69. package/lib/types/react/src/components/Cards/DetailCard/DetailCard.args.d.ts +3 -0
  70. package/lib/types/react/src/components/Cards/DetailCard/DetailCard.d.ts +4 -0
  71. package/lib/types/react/src/components/Cards/DetailCard/DetailCard.props.d.ts +35 -0
  72. package/lib/types/react/src/components/Cards/DetailCard/index.d.ts +3 -4
  73. package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.args.d.ts +3 -0
  74. package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.d.ts +4 -0
  75. package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.props.d.ts +16 -0
  76. package/lib/types/react/src/components/Cards/FactlistCard/index.d.ts +3 -4
  77. package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.args.d.ts +3 -0
  78. package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.d.ts +4 -0
  79. package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.props.d.ts +31 -0
  80. package/lib/types/react/src/components/Cards/FeatureCard/index.d.ts +3 -4
  81. package/lib/types/react/src/components/Cards/MultilinkCard/MultiLinkCard.d.ts +4 -0
  82. package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.args.d.ts +2 -0
  83. package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.props.d.ts +25 -0
  84. package/lib/types/react/src/components/Cards/MultilinkCard/index.d.ts +3 -4
  85. package/lib/types/react/src/components/Cards/PromoCard/PromoCard.args.d.ts +3 -0
  86. package/lib/types/react/src/components/Cards/PromoCard/PromoCard.d.ts +4 -0
  87. package/lib/types/react/src/components/Cards/PromoCard/PromoCard.props.d.ts +30 -0
  88. package/lib/types/react/src/components/Cards/PromoCard/index.d.ts +3 -4
  89. package/lib/types/react/src/components/Cards/StatCard/StatCard.args.d.ts +3 -0
  90. package/lib/types/react/src/components/Cards/StatCard/StatCard.d.ts +4 -0
  91. package/lib/types/react/src/components/Cards/StatCard/StatCard.props.d.ts +18 -0
  92. package/lib/types/react/src/components/Cards/StatCard/index.d.ts +3 -4
  93. package/lib/types/react/src/components/Cards/TextCard/TextCard.args.d.ts +3 -0
  94. package/lib/types/react/src/components/Cards/TextCard/TextCard.d.ts +4 -0
  95. package/lib/types/react/src/components/Cards/TextCard/TextCard.props.d.ts +26 -0
  96. package/lib/types/react/src/components/Cards/TextCard/index.d.ts +3 -4
  97. package/lib/types/react/src/components/List/List.props.d.ts +2 -9
  98. package/lib/types/react/src/components/List/ListItem.props.d.ts +0 -6
  99. package/lib/types/react/src/components/index.d.ts +1 -1
  100. package/lib/types/react/src/types/index.d.ts +4 -2
  101. package/package.json +32 -12
  102. package/public/react.svg +8 -0
  103. package/rollup.config.mjs +2 -0
  104. package/src/__tests__/Accordion.test.tsx +16 -0
  105. package/src/__tests__/Button.test.tsx +60 -0
  106. package/src/__tests__/Callout.test.tsx +43 -0
  107. package/src/__tests__/ContextMenu.test.tsx +19 -0
  108. package/src/__tests__/Dropdown.test.tsx +38 -0
  109. package/src/__tests__/Heading.test.tsx +51 -0
  110. package/src/__tests__/Image.test.tsx +21 -0
  111. package/src/__tests__/LinkList.test.tsx +17 -0
  112. package/src/__tests__/List.test.tsx +25 -0
  113. package/src/__tests__/Loading.test.tsx +33 -0
  114. package/src/__tests__/Notification.test.tsx +39 -0
  115. package/src/__tests__/Pagination.test.tsx +58 -0
  116. package/src/__tests__/Profile.test.tsx +48 -0
  117. package/src/__tests__/ReadMore.test.tsx +43 -0
  118. package/src/__tests__/RichText.test.tsx +16 -0
  119. package/src/__tests__/SearchField.test.tsx +35 -0
  120. package/src/__tests__/TableOfContents.test.tsx +12 -0
  121. package/src/__tests__/Tag.test.tsx +10 -0
  122. package/src/components/Cards/{CardGroup.args.ts → CardGroup/CardGroup.args.ts} +299 -437
  123. package/src/components/Cards/CardGroup/CardGroup.props.ts +78 -0
  124. package/src/components/Cards/CardGroup/CardGroup.tsx +54 -0
  125. package/src/components/Cards/CardGroup/index.tsx +3 -0
  126. package/src/components/Cards/DataCard/DataCard.args.ts +69 -0
  127. package/src/components/Cards/DataCard/DataCard.props.ts +60 -0
  128. package/src/components/Cards/DataCard/DataCard.tsx +107 -0
  129. package/src/components/Cards/DataCard/index.tsx +3 -107
  130. package/src/components/Cards/DetailCard/DetailCard.args.ts +17 -0
  131. package/src/components/Cards/DetailCard/DetailCard.props.ts +43 -0
  132. package/src/components/Cards/DetailCard/DetailCard.tsx +62 -0
  133. package/src/components/Cards/DetailCard/index.tsx +3 -62
  134. package/src/components/Cards/FactlistCard/FactListCard.args.ts +14 -0
  135. package/src/components/Cards/FactlistCard/FactListCard.props.ts +19 -0
  136. package/src/components/Cards/FactlistCard/FactListCard.tsx +42 -0
  137. package/src/components/Cards/FactlistCard/index.tsx +3 -42
  138. package/src/components/Cards/FeatureCard/FeatureCard.args.ts +30 -0
  139. package/src/components/Cards/FeatureCard/FeatureCard.props.ts +38 -0
  140. package/src/components/Cards/FeatureCard/FeatureCard.tsx +69 -0
  141. package/src/components/Cards/FeatureCard/index.tsx +3 -69
  142. package/src/components/Cards/MultilinkCard/MultiLinkCard.tsx +76 -0
  143. package/src/components/Cards/MultilinkCard/MultilinkCard.args.ts +33 -0
  144. package/src/components/Cards/MultilinkCard/MultilinkCard.props.ts +30 -0
  145. package/src/components/Cards/MultilinkCard/index.tsx +3 -76
  146. package/src/components/Cards/PromoCard/PromoCard.args.ts +19 -0
  147. package/src/components/Cards/PromoCard/PromoCard.props.ts +36 -0
  148. package/src/components/Cards/PromoCard/PromoCard.tsx +60 -0
  149. package/src/components/Cards/PromoCard/index.tsx +3 -60
  150. package/src/components/Cards/StatCard/StatCard.args.ts +14 -0
  151. package/src/components/Cards/StatCard/StatCard.props.ts +21 -0
  152. package/src/components/Cards/StatCard/StatCard.tsx +36 -0
  153. package/src/components/Cards/StatCard/index.tsx +3 -36
  154. package/src/components/Cards/TextCard/TextCard.args.ts +21 -0
  155. package/src/components/Cards/TextCard/TextCard.props.ts +32 -0
  156. package/src/components/Cards/TextCard/TextCard.tsx +62 -0
  157. package/src/components/Cards/TextCard/index.tsx +3 -63
  158. package/src/components/Footer/Footer.args.ts +4 -16
  159. package/src/components/Footer/Footer.tsx +41 -37
  160. package/src/components/List/List.props.ts +2 -10
  161. package/src/components/List/List.tsx +17 -22
  162. package/src/components/List/ListItem.props.ts +0 -7
  163. package/src/components/List/ListItem.tsx +6 -11
  164. package/src/components/Navigation/Navigation.tsx +5 -5
  165. package/src/components/Pagination/Pagination.tsx +2 -1
  166. package/src/components/index.ts +1 -1
  167. package/src/setup.ts +6 -0
  168. package/src/stories/Accordion/Accordion.stories.tsx +145 -0
  169. package/src/stories/Breadcrumb/Breadcrumb.mdx +17 -0
  170. package/src/stories/Breadcrumb/Breadcrumb.stories.tsx +20 -0
  171. package/src/stories/Button/Button.mdx +94 -0
  172. package/src/stories/Button/Button.stories.tsx +68 -0
  173. package/src/stories/Callout/Callout.mdx +35 -0
  174. package/src/stories/Callout/Callout.stories.tsx +43 -0
  175. package/src/stories/Card/DataCard.stories.tsx +45 -0
  176. package/src/stories/Card/DetailCard.stories.tsx +41 -0
  177. package/src/stories/Card/FactlistCard.stories.tsx +48 -0
  178. package/src/stories/Card/FeatureCard.stories.tsx +56 -0
  179. package/src/stories/Card/MultilinkCard.stories.tsx +48 -0
  180. package/src/stories/Card/PromoCard.stories.tsx +48 -0
  181. package/src/stories/Card/StatCard.stories.tsx +45 -0
  182. package/src/stories/Card/TextCard.stories.tsx +45 -0
  183. package/src/stories/CardGroup/CardGroup.mdx +17 -0
  184. package/src/stories/CardGroup/CardGroup.stories.tsx +50 -0
  185. package/src/stories/Checkbox/Checkbox.stories.tsx +118 -0
  186. package/src/stories/ContextMenu/ContextMenu.stories.tsx +83 -0
  187. package/src/stories/DatePicker/DatePicker.stories.tsx +110 -0
  188. package/src/stories/Dropdown/Dropdown.stories.tsx +145 -0
  189. package/src/stories/Empty/Empty.stories.tsx +53 -0
  190. package/src/stories/Fieldset/Fieldset.stories.tsx +167 -0
  191. package/src/stories/FileUpload/FileUpload.stories.tsx +103 -0
  192. package/src/stories/Footer/Footer.mdx +17 -0
  193. package/src/stories/Footer/Footer.stories.tsx +15 -0
  194. package/src/stories/Form/Form.mdx +58 -0
  195. package/src/stories/Form/Form.stories.tsx +162 -0
  196. package/src/stories/GetStarted.mdx +57 -0
  197. package/src/stories/Heading/Heading.stories.tsx +193 -0
  198. package/src/stories/Hero/Hero.stories.tsx +68 -0
  199. package/src/stories/Image/Image.stories.tsx +50 -0
  200. package/src/stories/Link/Link.stories.tsx +81 -0
  201. package/src/stories/LinkList/LinkList.args.ts +190 -0
  202. package/src/stories/LinkList/LinkList.stories.tsx +60 -0
  203. package/src/stories/List/List.stories.tsx +167 -0
  204. package/src/stories/Loading/Loading.stories.tsx +97 -0
  205. package/src/stories/LocalNav/LocalNav.mdx +17 -0
  206. package/src/stories/LocalNav/LocalNav.stories.tsx +15 -0
  207. package/src/stories/Logo/Logo.stories.tsx +172 -0
  208. package/src/stories/LogoGrid/LogoGrid.stories.tsx +59 -0
  209. package/src/stories/Navigation/Navigation.mdx +17 -0
  210. package/src/stories/Navigation/Navigation.stories.tsx +15 -0
  211. package/src/stories/Notification/Notification.stories.tsx +187 -0
  212. package/src/stories/NumberPicker/NumberPicker.stories.tsx +69 -0
  213. package/src/stories/Pagination/Pagination.stories.tsx +86 -0
  214. package/src/stories/Profile/Profile.stories.tsx +64 -0
  215. package/src/stories/Radio/Radio.stories.tsx +232 -0
  216. package/src/stories/ReadMore/ReadMore.stories.tsx +59 -0
  217. package/src/stories/RichText/RichText.stories.tsx +63 -0
  218. package/src/stories/SearchField/SearchField.stories.tsx +91 -0
  219. package/src/stories/SocialMedia/SocialMedia.stories.tsx +60 -0
  220. package/src/stories/TableOfContents/TableOfContents.stories.tsx +55 -0
  221. package/src/stories/Tabs/Tabs.mdx +17 -0
  222. package/src/stories/Tabs/Tabs.stories.tsx +25 -0
  223. package/src/stories/Tag/Tag.stories.tsx +130 -0
  224. package/src/stories/TextInput/TextInput.stories.tsx +100 -0
  225. package/src/stories/Textarea/Textarea.stories.tsx +147 -0
  226. package/src/stories/Toggle/Toggle.stories.tsx +99 -0
  227. package/src/stories/Tooltip/Tooltip.stories.tsx +82 -0
  228. package/src/stories/Video/Video.stories.tsx +71 -0
  229. package/src/stories/Welcome.stories.mdx +37 -0
  230. package/src/stories/assets/code-brackets.svg +1 -0
  231. package/src/stories/assets/colors.svg +1 -0
  232. package/src/stories/assets/comments.svg +1 -0
  233. package/src/stories/assets/direction.svg +1 -0
  234. package/src/stories/assets/flow.svg +1 -0
  235. package/src/stories/assets/plugin.svg +1 -0
  236. package/src/stories/assets/repo.svg +1 -0
  237. package/src/stories/assets/stackalt.svg +1 -0
  238. package/src/stories/welcome.scss +133 -0
  239. package/src/types/index.ts +6 -2
  240. package/lib/cjs/ListCtx-14aa546f.js +0 -9
  241. package/lib/cjs/components/Cards/Card.js +0 -40
  242. package/lib/cjs/components/Cards/CardGroup.js +0 -33
  243. package/lib/cjs/components/Cards/index.js +0 -37
  244. package/lib/esm/ListCtx-da435fdf.js +0 -6
  245. package/lib/esm/components/Cards/Card.js +0 -38
  246. package/lib/esm/components/Cards/CardGroup.js +0 -31
  247. package/lib/esm/components/Cards/index.js +0 -22
  248. package/lib/types/react/src/components/Cards/Card.d.ts +0 -4
  249. package/lib/types/react/src/components/Cards/Card.props.d.ts +0 -307
  250. package/lib/types/react/src/components/Cards/CardGroup.props.d.ts +0 -16
  251. package/lib/types/react/src/components/Cards/index.d.ts +0 -11
  252. package/lib/types/react/src/components/List/ListCtx.d.ts +0 -4
  253. package/src/components/Cards/Card.args.ts +0 -220
  254. package/src/components/Cards/Card.props.ts +0 -382
  255. package/src/components/Cards/Card.tsx +0 -36
  256. package/src/components/Cards/CardGroup.props.ts +0 -19
  257. package/src/components/Cards/CardGroup.tsx +0 -54
  258. package/src/components/Cards/index.ts +0 -22
  259. package/src/components/List/ListCtx.ts +0 -7
  260. /package/lib/types/react/src/components/Cards/{CardGroup.d.ts → CardGroup/CardGroup.d.ts} +0 -0
@@ -1,307 +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 type DataCardProps = {
5
- /**
6
- * A line of text that appears as a small heading at the top of the card
7
- */
8
- eyebrow?: string;
9
- /**
10
- * How big should the card be
11
- */
12
- size?: Omit<CardSize, "standard">;
13
- /**
14
- * The image to show in the card
15
- */
16
- image?: string;
17
- /**
18
- * 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)
19
- */
20
- dataset?: CardDataset;
21
- /**
22
- * Make the content appear in one or two columns. Only applies when the size is set to `wide` or `fluid`
23
- */
24
- columns?: string;
25
- };
26
- export type DetailCardProps = {
27
- /**
28
- * A line of text that appears as a small heading above the title of the card
29
- */
30
- eyebrow?: string;
31
- /**
32
- * The title of the card
33
- */
34
- title: string;
35
- /**
36
- * Introductory text in the card
37
- */
38
- intro?: string;
39
- /**
40
- * Specify the event Date, in both human and Unix format.
41
- */
42
- date?: EventDate;
43
- /**
44
- * Information about an event
45
- */
46
- eventdetails?: string;
47
- /**
48
- * A URL to link to
49
- */
50
- link?: string;
51
- /**
52
- * The image to show in the card
53
- */
54
- image?: string;
55
- /**
56
- * How big should the card be
57
- */
58
- size?: Omit<CardSize, "standard">;
59
- };
60
- export type FactlistCardProps = {
61
- /**
62
- * The title of the card
63
- */
64
- title: string;
65
- /**
66
- * Will render the card to appear on light or dark backgrounds
67
- */
68
- theme?: ThemeTypes;
69
- /**
70
- * How big should the card be
71
- */
72
- size?: Omit<CardSize, "standard">;
73
- list?: string[];
74
- };
75
- export type FeatureCardProps = {
76
- isvideo?: boolean;
77
- /**
78
- * A line of text that appears as a small heading above the title of the card
79
- */
80
- eyebrow?: string;
81
- /**
82
- * The title of the card
83
- */
84
- title: string;
85
- /**
86
- * Will render the card to appear on light or dark backgrounds
87
- */
88
- theme?: ThemeTypes;
89
- /**
90
- * How big should the card be
91
- */
92
- size?: Omit<CardSize, "standard">;
93
- /**
94
- * Specify the event Date, in both human and Unix format.
95
- */
96
- date?: EventDate;
97
- link?: string;
98
- linklist?: LinkListProps;
99
- /**
100
- * The image to show in the card
101
- */
102
- image?: string;
103
- };
104
- export type MultilinkCardProps = {
105
- isvideo?: boolean;
106
- /**
107
- * A line of text that appears as a small heading above the title of the card
108
- */
109
- eyebrow?: string;
110
- /**
111
- * The title of the card
112
- */
113
- title: string;
114
- /**
115
- * How big should the card be
116
- */
117
- size?: CardSize;
118
- alignment?: CardAlignment;
119
- intro?: string;
120
- link?: string;
121
- linklist?: LinkListProps;
122
- /**
123
- * The image to show in the card
124
- */
125
- image?: string;
126
- };
127
- export type PromoCardProps = {
128
- /**
129
- * A line of text that appears as a small heading above the title of the card
130
- */
131
- eyebrow?: string;
132
- /**
133
- * The title of the card
134
- */
135
- title: string;
136
- /**
137
- * Will render the card to appear on light or dark backgrounds
138
- */
139
- theme?: ThemeTypes;
140
- /**
141
- * How big should the card be
142
- */
143
- size?: CardSize;
144
- /**
145
- * Apply an optional corner cut to the top of the card
146
- */
147
- cornercut?: CardCornerType;
148
- /**
149
- * Introductory text in the card
150
- */
151
- intro?: string;
152
- link?: string;
153
- cta?: LinkProps;
154
- };
155
- export type StatCardProps = {
156
- /**
157
- * The title of the card
158
- */
159
- title: string;
160
- color?: CardColor;
161
- /**
162
- * How big should the card be
163
- */
164
- size?: Omit<CardSize, "narrow" | "wide">;
165
- /**
166
- * Introductory text in the card
167
- */
168
- intro?: string;
169
- source?: LinkProps;
170
- };
171
- export type TextCardProps = {
172
- /**
173
- * A line of text that appears as a small heading above the title of the card
174
- */
175
- eyebrow?: string;
176
- /**
177
- * The title of the card
178
- */
179
- title: string;
180
- /**
181
- * Will render the card to appear on light or dark backgrounds
182
- */
183
- theme?: ThemeTypes;
184
- /**
185
- * How big should the card be
186
- */
187
- size?: Omit<CardSize, "standard">;
188
- /**
189
- * Specify the event Date, in both human and Unix format.
190
- */
191
- date?: EventDate;
192
- profile: ProfileProps;
193
- link?: string;
194
- };
195
- export interface CardProps {
196
- /**
197
- * Specify whether the card should display a video icon (for Feature card). Possible options: true | false
198
- */
199
- isvideo?: boolean;
200
- /**
201
- * Eyebrow field for the card.
202
- */
203
- eyebrow: string;
204
- /**
205
- * Title field for the card
206
- */
207
- title: string;
208
- /**
209
- * Color of the stat cards, options are turquoise | green| yellow| blue. Only used for stat cards.
210
- */
211
- color?: CardColor;
212
- /**
213
- * The theme type for the card. Theme doesn't apply to these card types: Multilink, Data, Stat and Detail. Possible themes: light | dark.
214
- */
215
- theme?: ThemeTypes;
216
- /**
217
- * Type - Sets the type of card to render.
218
- Option keys: feature, text, detail, promo, multilink, data, stat, factlist
219
- */
220
- type: CardTypes;
221
- /**
222
- * 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.
223
- */
224
- size?: CardSize;
225
- /**
226
- * Specify whether the card has a cut corner. The only card that uses this setting are `Promo`.
227
- */
228
- cornercut?: CardCornerType;
229
- /**
230
- * Specify whether a card image is right-aligned or left-aligned for `Multilink` cards. Possible options: left | right.
231
- */
232
- alignment?: CardAlignment;
233
- /**
234
- * Intro text field for the card
235
- */
236
- intro?: string;
237
- /**
238
- * Specify the event Date, in both human and Unix format.
239
- */
240
- date?: EventDate;
241
- /**
242
- * Event details for `Detail` card
243
- */
244
- eventdetails?: string;
245
- /**
246
- * Profile to embed in the card for `Text` card
247
- */
248
- profile?: ProfileProps;
249
- /**
250
- * A list of text itmes to be embed in the card, specifically used in `Factlist` card.
251
- */
252
- listitems?: Array<string>;
253
- /**
254
- * A Link behind a clickable card. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
255
- */
256
- link?: string;
257
- /**
258
- * Props of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
259
- */
260
- linklist?: LinkListProps;
261
- /**
262
- * Items for clickable CTA button, specifically used for `Promo` card.
263
- */
264
- cta?: LinkProps;
265
- /**
266
- * The image used in a card. Images should be avoided on `Promo`, `Text`, `Factlist`, and `Stat` card.
267
- */
268
- image?: string;
269
- /**
270
- * Source link for `Stat` cards.
271
- */
272
- source?: LinkProps;
273
- /**
274
- * 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).
275
- */
276
- dataset?: CardDataset;
277
- }
278
- interface EventDate {
279
- unix?: string;
280
- human?: string;
281
- }
282
- interface CardDataset {
283
- content?: DataContent;
284
- files?: DataFile;
285
- links?: DataLink;
286
- cta?: Cta;
287
- }
288
- interface DataContent {
289
- items?: Array<ContentItem>;
290
- }
291
- interface ContentItem {
292
- label?: string;
293
- copy?: string;
294
- }
295
- interface DataFile {
296
- headline?: string;
297
- items?: Array<LinkProps>;
298
- }
299
- interface DataLink {
300
- headline?: string;
301
- items?: Array<LinkProps>;
302
- }
303
- interface Cta {
304
- headline?: string;
305
- items?: Array<LinkProps>;
306
- }
307
- export {};
@@ -1,16 +0,0 @@
1
- import { CardProps } from "./Card.props";
2
- import { LinkProps } from "../LinkList/LinkList.props";
3
- export interface CardGroupProps {
4
- /**
5
- * An array of card objects
6
- */
7
- cards?: Required<CardProps>[];
8
- /**
9
- * Number of cards in the group
10
- */
11
- cardcount: Required<string>;
12
- /**
13
- * A Button to display after all the cards in the group
14
- */
15
- cta?: LinkProps;
16
- }
@@ -1,11 +0,0 @@
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
- export { FeatureCard, DataCard, DetailCard, FactlistCard, MultilinkCard, PromoCard, StatCard, TextCard, };
10
- export { default as Card } from "./Card";
11
- export { default as CardGroup } from "./CardGroup";
@@ -1,4 +0,0 @@
1
- import { ListContextProps } from "./List.props";
2
- import { ListItemContextProps } from "./ListItem.props";
3
- export declare const ListContext: import("react").Context<ListContextProps>;
4
- export declare const ListItemContext: import("react").Context<ListItemContextProps>;
@@ -1,220 +0,0 @@
1
- import {
2
- TextCardProps,
3
- StatCardProps,
4
- MultilinkCardProps,
5
- PromoCardProps,
6
- FeatureCardProps,
7
- DetailCardProps,
8
- FactlistCardProps,
9
- DataCardProps,
10
- } from "./Card.props";
11
-
12
- const textCard: TextCardProps = {
13
- title: "Why we need greater social justice",
14
- eyebrow: "Podcast",
15
- date: {
16
- human: "20 September 2022",
17
- unix: "1670389200",
18
- },
19
- theme: "light",
20
- link: "https:/www.ilo.org",
21
- profile: {
22
- avatar: "/ilo-dg.jpg",
23
- description:
24
- "Gilbert Houngbo is the Director-General of the International Labour Organization",
25
- name: "Gilbert Houngbo",
26
- role: "ILO Director-General",
27
- },
28
- };
29
-
30
- const statCard: StatCardProps = {
31
- title: "Global employment growth down by half in 2023",
32
- intro:
33
- "The current global economic slowdown is likely to force more workers to accept lower quality, poorly paid jobs which lack job security and social protection, so accentuating inequalities exacerbated by the COVID-19 crisis.",
34
- color: "turquoise",
35
- source: {
36
- label: "World Employment and Social Outlook: Trends 2023",
37
- url: "https://www.ilo.org",
38
- },
39
- };
40
-
41
- const multilinkCard: MultilinkCardProps = {
42
- title:
43
- "ILO welcomes G7 call to make a just transition to a green economy happen",
44
- eyebrow: "High-level meeting",
45
- intro:
46
- "At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health.",
47
- image: "/hero.jpg",
48
- alignment: "left",
49
- link: "https:/www.ilo.org",
50
- linklist: {
51
- headline: "",
52
- linkgroup: [
53
- {
54
- links: [
55
- {
56
- label: "Read the press release",
57
- url: "https://www.ilo.org",
58
- },
59
- {
60
- label: "See the statement",
61
- url: "https://www.ilo.org",
62
- },
63
- {
64
- label: "Remarks to G7 Openening Session",
65
- url: "https://www.ilo.org",
66
- },
67
- ],
68
- },
69
- ],
70
- },
71
- };
72
-
73
- const promoCard: PromoCardProps = {
74
- size: "standard",
75
- title:
76
- "ILO welcomes G7 call to make a just transition to a green economy happen",
77
- eyebrow: "High-level meeting",
78
- theme: "dark",
79
- cornercut: true,
80
- intro:
81
- "At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health.",
82
- link: "https:/www.ilo.org",
83
- cta: {
84
- label: "Read the press release",
85
- url: "https://www.ilo.org",
86
- },
87
- };
88
-
89
- const featureCard: FeatureCardProps = {
90
- isvideo: false,
91
- title:
92
- "ILO welcomes G7 call to make a just transition to a green economy happen",
93
- eyebrow: "High-level meeting",
94
- theme: "light",
95
- date: {
96
- human: "18 March 2023",
97
- unix: "1670389200",
98
- },
99
- image: "/hero.jpg",
100
- link: "https:/www.ilo.org",
101
- linklist: {
102
- headline: "",
103
- linkgroup: [
104
- {
105
- links: [
106
- {
107
- label: "Read the press release",
108
- url: "http://www.google.com",
109
- },
110
- ],
111
- },
112
- ],
113
- },
114
- };
115
-
116
- const detailCard: DetailCardProps = {
117
- title: "Technical meeting on digitalization in the construction sector",
118
- eyebrow: "Meeting",
119
- intro:
120
- "The purpose of the meeting will be to discuss opportunities and challenges for the future of work in the construction industry as a vehicle to ensure a human-centred economic recovery.",
121
- date: {
122
- human: "18 March 2023",
123
- unix: "1670389200",
124
- },
125
- image: "/medium.jpg",
126
- link: "https:/www.ilo.org",
127
- eventdetails: "8:30 - 12:00 CET | Geneva",
128
- };
129
-
130
- const factListCard: FactlistCardProps = {
131
- title:
132
- "Economic slowdown likely to force workers to accept lower quality jobs",
133
- theme: "light",
134
- list: [
135
- "Global employment growth will be only 1.0 per cent in 2023, less than half the level in 2022.",
136
- "The labour market deterioration is mainly due to emerging geopolitical tensions and the Ukraine conflict.",
137
- "The current slowdown means that many workers will have to accept lower quality jobs, often at very low pay.",
138
- ],
139
- };
140
-
141
- const dataCard: DataCardProps = {
142
- size: "wide",
143
- eyebrow: "Meeting",
144
- image: "/small.jpg",
145
- columns: "two",
146
- dataset: {
147
- content: {
148
- items: [
149
- {
150
- label: "Date",
151
- copy: "18 March 2023",
152
- },
153
- {
154
- label: "Event type",
155
- copy: "Technical meeting of experts",
156
- },
157
- ],
158
- },
159
- files: {
160
- headline: "Files",
161
- items: [
162
- {
163
- label: "Meeting agenda",
164
- url: "https://www.ilo.org",
165
- },
166
- {
167
- label: "Briefing notes",
168
- url: "https://www.ilo.org",
169
- },
170
- {
171
- label: "Practical info",
172
- url: "https://www.ilo.org",
173
- },
174
- ],
175
- },
176
- cta: {
177
- headline: "Read online",
178
- items: [
179
- {
180
- label: "HTML Version",
181
- url: "https://www.ilo.org",
182
- },
183
- {
184
- label: "InfoStories",
185
- url: "https://www.ilo.org/infostories/en-GB",
186
- },
187
- ],
188
- },
189
- links: {
190
- headline: "Languages",
191
- items: [
192
- {
193
- label: "English",
194
- url: "https://www.ilo.org",
195
- },
196
- {
197
- label: "Español",
198
- url: "https://www.ilo.org",
199
- },
200
- {
201
- label: "Français",
202
- url: "https://www.ilo.org",
203
- },
204
- ],
205
- },
206
- },
207
- };
208
-
209
- const CardArgs = {
210
- textCard,
211
- statCard,
212
- multilinkCard,
213
- promoCard,
214
- featureCard,
215
- detailCard,
216
- factListCard,
217
- dataCard,
218
- };
219
-
220
- export default CardArgs;