@thecb/components 6.3.1-beta.2 → 6.3.1-beta.5

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 (28) hide show
  1. package/README.md +39 -0
  2. package/dist/index.cjs.js +587 -414
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +51 -24
  5. package/dist/index.esm.js +585 -411
  6. package/dist/index.esm.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/atoms/card/Card.js +60 -21
  9. package/src/components/atoms/card/Card.theme.js +9 -2
  10. package/src/components/atoms/card/CardHeader.js +27 -0
  11. package/src/components/atoms/card/CardImage.styled.js +9 -0
  12. package/src/components/atoms/card/CardText.js +41 -0
  13. package/src/components/{molecules/welcome-card/WelcomeCard.theme.js → atoms/card/CardText.theme.js} +3 -6
  14. package/src/components/atoms/card/index.d.ts +21 -1
  15. package/src/components/atoms/display-card/DisplayCard.js +1 -1
  16. package/src/components/atoms/index.d.ts +1 -0
  17. package/src/components/atoms/layouts/Switcher.d.ts +17 -0
  18. package/src/components/atoms/layouts/index.d.ts +1 -0
  19. package/src/components/atoms/text/index.d.ts +16 -0
  20. package/src/components/molecules/index.d.ts +0 -2
  21. package/src/components/molecules/index.js +0 -2
  22. package/src/components/molecules/card-with-header/CardWithHeader.js +0 -34
  23. package/src/components/molecules/card-with-header/CardWithHeader.theme.js +0 -9
  24. package/src/components/molecules/card-with-header/index.d.ts +0 -11
  25. package/src/components/molecules/card-with-header/index.js +0 -2
  26. package/src/components/molecules/welcome-card/WelcomeCard.js +0 -64
  27. package/src/components/molecules/welcome-card/index.d.ts +0 -15
  28. package/src/components/molecules/welcome-card/index.js +0 -3
package/dist/index.d.ts CHANGED
@@ -3,8 +3,28 @@ import React from 'react';
3
3
  type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
4
4
 
5
5
  interface CardProps {
6
- variant?: string;
6
+ text?: string;
7
+ titleText?: string;
8
+ titleVariant?: string;
7
9
  extraStyles?: string;
10
+ imgSrc?: string;
11
+ imgHeight?: string;
12
+ imgObjectFit?:
13
+ | "contain"
14
+ | "cover"
15
+ | "fill"
16
+ | "none"
17
+ | "scale-down"
18
+ | "inherit"
19
+ | "initial"
20
+ | "revert"
21
+ | "revert-layer"
22
+ | "unset";
23
+ headerText?: string;
24
+ headerVariant?: string;
25
+ borderRadius?: string;
26
+ width?: string;
27
+ padding?: string;
8
28
  }
9
29
 
10
30
  declare const Card: React.FC<Expand<CardProps> &
@@ -129,6 +149,21 @@ interface StackProps {
129
149
  declare const Stack: React.FC<Expand<StackProps> &
130
150
  React.HTMLAttributes<HTMLElement>>;
131
151
 
152
+ interface SwitcherProps {
153
+ breakpoint?: string;
154
+ childGap?: string;
155
+ largeChild?: string;
156
+ largeChildSize?: string;
157
+ maxChildren?: string;
158
+ maxChildrenOnly?: boolean;
159
+ padding?: string;
160
+ extraStyles?: string;
161
+ constrainMobile?: boolean;
162
+ }
163
+
164
+ declare const Switcher: React.FC<Expand<SwitcherProps> &
165
+ React.HTMLAttributes<HTMLElement>>;
166
+
132
167
  interface ExternalLinkProps {
133
168
  href: string;
134
169
  newTab?: boolean;
@@ -212,6 +247,20 @@ interface ParagraphProps {
212
247
  declare const Paragraph: React.FC<Expand<ParagraphProps> &
213
248
  React.HTMLAttributes<HTMLElement>>;
214
249
 
250
+ interface TextProps {
251
+ weight?: string;
252
+ color?: string;
253
+ textWrap?: boolean;
254
+ extraStyles?: string;
255
+ hoverStyles?: string;
256
+ as?: string;
257
+ dataQa?: string;
258
+ variant?: string;
259
+ }
260
+
261
+ declare const Text: React.FC<Expand<TextProps> &
262
+ React.HTMLAttributes<HTMLElement>>;
263
+
215
264
  interface TitleProps {
216
265
  variant?: string;
217
266
  color?: string;
@@ -227,15 +276,6 @@ interface TitleProps {
227
276
  declare const Title: React.FC<Expand<TitleProps> &
228
277
  React.HTMLAttributes<HTMLElement>>;
229
278
 
230
- interface CardWithHeaderProps {
231
- header: string;
232
- extraStyles?: string;
233
- variant?: string;
234
- }
235
-
236
- declare const CardWithHeader: React.FC<Expand<CardWithHeaderProps> &
237
- React.HTMLAttributes<HTMLElement>>;
238
-
239
279
  interface FooterWithSubfooterProps {
240
280
  footerLargeSide?: "left" | "right";
241
281
  footerLargeSideSize?: string;
@@ -248,19 +288,6 @@ interface FooterWithSubfooterProps {
248
288
  declare const FooterWithSubfooter: React.FC<Expand<FooterWithSubfooterProps> &
249
289
  React.HTMLAttributes<HTMLElement>>;
250
290
 
251
- interface WelcomeCardProps {
252
- title: string;
253
- text: string;
254
- url?: string;
255
- buttonText?: string;
256
- imageSrc?: string;
257
- newTab?: boolean;
258
- variant?: string;
259
- }
260
-
261
- declare const WelcomeCard: React.FC<Expand<WelcomeCardProps> &
262
- React.HTMLAttributes<HTMLElement>>;
263
-
264
291
  interface DefaultPageTemplateProps {
265
292
  content: JSX.Element;
266
293
  header?: JSX.Element;
@@ -275,5 +302,5 @@ interface DefaultPageTemplateProps {
275
302
  declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
276
303
  React.HTMLAttributes<HTMLElement>>;
277
304
 
278
- export { Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, CardWithHeader, CardWithHeaderProps, Center, CenterProps, Cluster, ClusterProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, ExternalLink, ExternalLinkProps, FooterWithSubfooter, FooterWithSubfooterProps, InternalLink, InternalLinkProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, Stack, StackProps, Title, TitleProps, WelcomeCard, WelcomeCardProps };
305
+ 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 };
279
306
  //# sourceMappingURL=index.d.ts.map