@thecb/components 6.4.0 → 7.0.0-beta.1

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 (58) hide show
  1. package/README.md +43 -0
  2. package/dist/index.cjs.js +12076 -11826
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +308 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.esm.js +4176 -3929
  7. package/dist/index.esm.js.map +1 -1
  8. package/package.json +6 -2
  9. package/src/components/atoms/button-with-action/index.d.ts +17 -0
  10. package/src/components/atoms/button-with-link/index.d.ts +14 -0
  11. package/src/components/atoms/card/Card.js +87 -0
  12. package/src/components/atoms/card/Card.theme.js +14 -0
  13. package/src/components/atoms/card/CardHeader.js +28 -0
  14. package/src/components/atoms/card/CardImage.styled.js +9 -0
  15. package/src/components/atoms/card/CardText.js +46 -0
  16. package/src/components/atoms/card/CardText.theme.js +12 -0
  17. package/src/components/atoms/card/index.d.ts +32 -0
  18. package/src/components/atoms/card/index.js +3 -0
  19. package/src/components/atoms/{welcome-card/Card.theme.js → card-registry/CardRegistry.theme.js} +0 -0
  20. package/src/components/atoms/{welcome-card/Card.js → card-registry/CardRegistryCard.js} +7 -3
  21. package/src/components/atoms/{welcome-card → card-registry}/index.js +4 -4
  22. package/src/components/atoms/display-card/DisplayCard.js +1 -1
  23. package/src/components/atoms/index.d.ts +11 -0
  24. package/src/components/atoms/index.js +3 -1
  25. package/src/components/atoms/layouts/Box.d.ts +32 -0
  26. package/src/components/atoms/layouts/Center.d.ts +11 -0
  27. package/src/components/atoms/layouts/Cluster.d.ts +19 -0
  28. package/src/components/atoms/layouts/Cover.d.ts +14 -0
  29. package/src/components/atoms/layouts/Stack.d.ts +27 -0
  30. package/src/components/atoms/layouts/Switcher.d.ts +17 -0
  31. package/src/components/atoms/layouts/index.d.ts +6 -0
  32. package/src/components/atoms/link/ExternalLink.d.ts +18 -0
  33. package/src/components/atoms/link/InternalLink.d.ts +19 -0
  34. package/src/components/atoms/link/index.d.ts +2 -0
  35. package/src/components/atoms/nav-footer/index.d.ts +17 -0
  36. package/src/components/atoms/nav-header/index.d.ts +16 -0
  37. package/src/components/atoms/nav-tabs/NavTab.js +47 -0
  38. package/src/components/atoms/nav-tabs/NavTab.theme.js +11 -0
  39. package/src/components/atoms/nav-tabs/NavTabs.js +24 -0
  40. package/src/components/atoms/nav-tabs/index.d.ts +10 -0
  41. package/src/components/atoms/nav-tabs/index.js +3 -0
  42. package/src/components/atoms/paragraph/index.d.ts +15 -0
  43. package/src/components/atoms/text/index.d.ts +16 -0
  44. package/src/components/atoms/title/index.d.ts +17 -0
  45. package/src/components/index.d.ts +3 -0
  46. package/src/components/molecules/footer-with-subfooter/FooterWithSubfooter.js +42 -0
  47. package/src/components/molecules/footer-with-subfooter/FooterWithSubfooter.theme.js +8 -0
  48. package/src/components/molecules/footer-with-subfooter/index.d.ts +14 -0
  49. package/src/components/molecules/footer-with-subfooter/index.js +3 -0
  50. package/src/components/molecules/index.d.ts +1 -0
  51. package/src/components/molecules/index.js +1 -0
  52. package/src/components/molecules/modal/Modal.js +7 -1
  53. package/src/components/molecules/popover/Popover.js +1 -1
  54. package/src/components/templates/default-page-template/DefaultPageTemplate.js +7 -2
  55. package/src/components/templates/default-page-template/index.d.ts +16 -0
  56. package/src/components/templates/index.d.ts +1 -0
  57. package/src/index.d.ts +1 -0
  58. package/src/util/expand.d.ts +3 -0
@@ -0,0 +1,308 @@
1
+ import React from 'react';
2
+
3
+ type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
4
+
5
+ interface CardProps {
6
+ text?: string;
7
+ titleText?: string;
8
+ titleVariant?: string;
9
+ extraStyles?: string;
10
+ imgSrc?: string;
11
+ imgHeight?: string;
12
+ imgAltText?: string;
13
+ imgObjectFit?:
14
+ | "contain"
15
+ | "cover"
16
+ | "fill"
17
+ | "none"
18
+ | "scale-down"
19
+ | "inherit"
20
+ | "initial"
21
+ | "revert"
22
+ | "revert-layer"
23
+ | "unset";
24
+ headerAs?: string;
25
+ headerText?: string;
26
+ headerVariant?: string;
27
+ borderRadius?: string;
28
+ width?: string;
29
+ padding?: string;
30
+ }
31
+
32
+ declare const Card: React.FC<Expand<CardProps> &
33
+ React.HTMLAttributes<HTMLElement>>;
34
+
35
+ interface ButtonWithActionProps {
36
+ action?: React.SyntheticEvent;
37
+ variant?: string;
38
+ text?: string;
39
+ textWrap?: boolean;
40
+ isLoading?: boolean;
41
+ textExtraStyles?: string;
42
+ contentOverride?: boolean;
43
+ extraStyles?: string;
44
+ tabIndex?: string;
45
+ }
46
+
47
+ declare const ButtonWithAction: React.FC<Expand<ButtonWithActionProps> &
48
+ React.HTMLAttributes<HTMLElement>>;
49
+
50
+ interface ButtonWithLinkProps extends ButtonWithActionProps {
51
+ linkExtraStyles?: string;
52
+ url: string;
53
+ disabled?: boolean;
54
+ fileLink?: boolean;
55
+ newTab?: boolean;
56
+ }
57
+
58
+ declare const ButtonWithLink: React.FC<Expand<ButtonWithLinkProps> &
59
+ React.HTMLAttributes<HTMLElement>>;
60
+
61
+ interface BoxProps {
62
+ padding?: string;
63
+ borderSize?: string;
64
+ borderColor?: string;
65
+ borderRadius?: string;
66
+ boxShadow?: string;
67
+ background?: string;
68
+ color?: string;
69
+ minHeight?: string;
70
+ width?: string;
71
+ minWidth?: string;
72
+ maxWidth?: string;
73
+ borderWidthOverride?: string;
74
+ border?: string;
75
+ textAlign?: string;
76
+ hoverStyles?: string;
77
+ activeStyles?: string;
78
+ disabledStyles?: string;
79
+ variant?: string;
80
+ as?: string;
81
+ theme?: string;
82
+ hiddenStyles?: string;
83
+ extraStyles?: string;
84
+ srOnly?: boolean;
85
+ dataQa?: string;
86
+ }
87
+
88
+ declare const Box: React.FC<Expand<BoxProps> &
89
+ React.HTMLAttributes<HTMLElement>>;
90
+
91
+ interface CenterProps {
92
+ maxWidth?: string;
93
+ gutters?: string;
94
+ intrinsic?: boolean;
95
+ }
96
+
97
+ declare const Center: React.FC<Expand<CenterProps> &
98
+ React.HTMLAttributes<HTMLElement>>;
99
+
100
+ interface ClusterProps {
101
+ childGap?: string;
102
+ extraStyles?: string;
103
+ align?: string;
104
+ justify?: string;
105
+ minHeight?: string;
106
+ minWidth?: string;
107
+ nowrap?: boolean;
108
+ overflow?: boolean;
109
+ justifySelf?: string;
110
+ alignSelf?: string;
111
+ flexGrow?: string;
112
+ }
113
+
114
+ declare const Cluster: React.FC<Expand<ClusterProps> &
115
+ React.HTMLAttributes<HTMLElement>>;
116
+
117
+ interface CoverProps {
118
+ minHeight?: string;
119
+ childGap?: string;
120
+ padding?: string;
121
+ fillCenter?: boolean;
122
+ singleChild?: boolean;
123
+ centerOverride?: boolean;
124
+ }
125
+
126
+ declare const Cover: React.FC<Expand<CoverProps> &
127
+ React.HTMLAttributes<HTMLElement>>;
128
+
129
+ interface StackProps {
130
+ childGap?: string;
131
+ bottomItem?: number;
132
+ fullHeight?: boolean;
133
+ direction?:
134
+ | "row"
135
+ | "row-reverse"
136
+ | "column"
137
+ | "column-reverse"
138
+ | "initial"
139
+ | "inherit";
140
+ justify?:
141
+ | "flex-start"
142
+ | "flex-end"
143
+ | "center"
144
+ | "space-between"
145
+ | "space-around"
146
+ | "space-evenly"
147
+ | "initial"
148
+ | "inherit";
149
+ }
150
+
151
+ declare const Stack: React.FC<Expand<StackProps> &
152
+ React.HTMLAttributes<HTMLElement>>;
153
+
154
+ interface SwitcherProps {
155
+ breakpoint?: string;
156
+ childGap?: string;
157
+ largeChild?: string;
158
+ largeChildSize?: string;
159
+ maxChildren?: string;
160
+ maxChildrenOnly?: boolean;
161
+ padding?: string;
162
+ extraStyles?: string;
163
+ constrainMobile?: boolean;
164
+ }
165
+
166
+ declare const Switcher: React.FC<Expand<SwitcherProps> &
167
+ React.HTMLAttributes<HTMLElement>>;
168
+
169
+ interface ExternalLinkProps {
170
+ href: string;
171
+ newTab?: boolean;
172
+ size?: string;
173
+ lineHeight?: string;
174
+ weight?: string;
175
+ extraStyles?: string;
176
+ variant?: string;
177
+ tabIndex?: string;
178
+ dataQa?: string;
179
+ ariaLabel?: string;
180
+ }
181
+
182
+ declare const ExternalLink: React.FC<Expand<ExternalLinkProps> &
183
+ React.HTMLAttributes<HTMLElement>>;
184
+
185
+ interface InternalLinkProps {
186
+ to: string;
187
+ color?: string;
188
+ active?: boolean;
189
+ fontSize?: string;
190
+ lineheight?: string;
191
+ fontWeight?: string;
192
+ variant?: string;
193
+ margin?: string;
194
+ tabIndex?: string;
195
+ dataQa?: string;
196
+ extraStyles?: string;
197
+ }
198
+
199
+ declare const InternalLink: React.FC<Expand<InternalLinkProps> &
200
+ React.HTMLAttributes<HTMLElement>>;
201
+
202
+ interface NavFooterProps {
203
+ leftContent?: JSX.Element;
204
+ rightContent?: JSX.Element;
205
+ footerMinHeight?: string;
206
+ backgroundColor?: string;
207
+ largeSide?: "left" | "right";
208
+ largeSideSize?: string;
209
+ footerPadding?: string;
210
+ isMobile?: boolean;
211
+ footerWidth?: string;
212
+ }
213
+
214
+ declare const NavFooter: React.FC<Expand<NavFooterProps> &
215
+ React.HTMLAttributes<HTMLElement>>;
216
+
217
+ interface NavHeaderProps {
218
+ headerHeight?: string;
219
+ headerWith?: string;
220
+ backgroundColor?: string;
221
+ leftContent?: JSX.Element;
222
+ rightContent?: JSX.Element;
223
+ margin?: string;
224
+ extraStyles?: string;
225
+ isMobile?: boolean;
226
+ }
227
+
228
+ declare const NavHeader: React.FC<Expand<NavHeaderProps> &
229
+ React.HTMLAttributes<HTMLElement>>;
230
+
231
+ interface NavTabsProps {
232
+ tabsConfig: Array<{ path: string; label: string }>;
233
+ tabGap?: string;
234
+ }
235
+
236
+ declare const NavTabs: React.FC<Expand<NavTabsProps> &
237
+ React.HTMLAttributes<HTMLElement>>;
238
+
239
+ interface ParagraphProps {
240
+ color?: string;
241
+ themeValues?: string;
242
+ weight?: string;
243
+ margin?: string;
244
+ extraStyles?: string;
245
+ dataQa?: string;
246
+ as?: string;
247
+ }
248
+
249
+ declare const Paragraph: React.FC<Expand<ParagraphProps> &
250
+ React.HTMLAttributes<HTMLElement>>;
251
+
252
+ interface TextProps {
253
+ weight?: string;
254
+ color?: string;
255
+ textWrap?: boolean;
256
+ extraStyles?: string;
257
+ hoverStyles?: string;
258
+ as?: string;
259
+ dataQa?: string;
260
+ variant?: string;
261
+ }
262
+
263
+ declare const Text: React.FC<Expand<TextProps> &
264
+ React.HTMLAttributes<HTMLElement>>;
265
+
266
+ interface TitleProps {
267
+ variant?: string;
268
+ color?: string;
269
+ margin?: string;
270
+ extraStyles?: string;
271
+ weight?: string;
272
+ textAlign?: string;
273
+ className?: string;
274
+ as?: string;
275
+ dataQa?: string;
276
+ }
277
+
278
+ declare const Title: React.FC<Expand<TitleProps> &
279
+ React.HTMLAttributes<HTMLElement>>;
280
+
281
+ interface FooterWithSubfooterProps {
282
+ footerLargeSide?: "left" | "right";
283
+ footerLargeSideSize?: string;
284
+ leftFooterContent?: JSX.Element;
285
+ rightFooterContent?: JSX.Element;
286
+ leftSubfooterContent?: JSX.Element;
287
+ rightSubfooterContent?: JSX.Element;
288
+ }
289
+
290
+ declare const FooterWithSubfooter: React.FC<Expand<FooterWithSubfooterProps> &
291
+ React.HTMLAttributes<HTMLElement>>;
292
+
293
+ interface DefaultPageTemplateProps {
294
+ content: JSX.Element;
295
+ header?: JSX.Element;
296
+ subHeader?: JSX.Element;
297
+ footer?: JSX.Element;
298
+ hideMobileSubHeader?: boolean;
299
+ maxWidth?: string;
300
+ gutters?: string;
301
+ fillPageVertical?: Boolean;
302
+ }
303
+
304
+ declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
305
+ React.HTMLAttributes<HTMLElement>>;
306
+
307
+ export { Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, Center, CenterProps, Cluster, ClusterProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, ExternalLink, ExternalLinkProps, FooterWithSubfooter, FooterWithSubfooterProps, InternalLink, InternalLinkProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, Stack, StackProps, Switcher, SwitcherProps, Text, TextProps, Title, TitleProps };
308
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}