@thecb/components 6.3.1-beta.7 → 6.3.1-beta.8

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/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ interface CardProps {
9
9
  extraStyles?: string;
10
10
  imgSrc?: string;
11
11
  imgHeight?: string;
12
+ imgAltText?: string;
12
13
  imgObjectFit?:
13
14
  | "contain"
14
15
  | "cover"
@@ -20,6 +21,7 @@ interface CardProps {
20
21
  | "revert"
21
22
  | "revert-layer"
22
23
  | "unset";
24
+ headerAs?: string;
23
25
  headerText?: string;
24
26
  headerVariant?: string;
25
27
  borderRadius?: string;
@@ -39,7 +41,7 @@ interface ButtonWithActionProps {
39
41
  textExtraStyles?: string;
40
42
  contentOverride?: boolean;
41
43
  extraStyles?: string;
42
- tabIndex?: number;
44
+ tabIndex?: number | string;
43
45
  }
44
46
 
45
47
  declare const ButtonWithAction: React.FC<Expand<ButtonWithActionProps> &
@@ -276,6 +278,26 @@ interface TitleProps {
276
278
  declare const Title: React.FC<Expand<TitleProps> &
277
279
  React.HTMLAttributes<HTMLElement>>;
278
280
 
281
+ interface CollapsibleSectionProps {
282
+ isOpen: boolean;
283
+ toggleSection?: () => void;
284
+ isMobile?: boolean;
285
+ supportsTouch?: boolean;
286
+ title?: string;
287
+ customPadding?: string;
288
+ initiallyOpen?: boolean;
289
+ openHeight?: string;
290
+ customTitle?: boolean;
291
+ stackTitle?: boolean;
292
+ stackTitleContent?: JSX.Element;
293
+ sectionGap?: string;
294
+ name?: string;
295
+ index?: number;
296
+ }
297
+
298
+ declare const CollapsibleSection: React.FC<Expand<CollapsibleSectionProps> &
299
+ React.HTMLAttributes<HTMLElement>>;
300
+
279
301
  interface FooterWithSubfooterProps {
280
302
  footerLargeSide?: "left" | "right";
281
303
  footerLargeSideSize?: string;
@@ -302,5 +324,5 @@ interface DefaultPageTemplateProps {
302
324
  declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
303
325
  React.HTMLAttributes<HTMLElement>>;
304
326
 
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 };
327
+ export { Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, Center, CenterProps, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, 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 };
306
328
  //# sourceMappingURL=index.d.ts.map
package/dist/index.esm.js CHANGED
@@ -35151,10 +35151,12 @@ var CardImage = styled.img.withConfig({
35151
35151
 
35152
35152
  var titleColor = BRIGHT_GREY;
35153
35153
  var titleWeight = FONT_WEIGHT_BOLD;
35154
- var fallbackValues$x = _defineProperty({
35154
+ var textColor$2 = BRIGHT_GREY;
35155
+ var fallbackValues$x = {
35155
35156
  titleColor: titleColor,
35156
- titleWeight: titleWeight
35157
- }, "titleWeight", titleWeight);
35157
+ titleWeight: titleWeight,
35158
+ textColor: textColor$2
35159
+ };
35158
35160
 
35159
35161
  var CardText = function CardText(_ref) {
35160
35162
  var padding = _ref.padding,
@@ -35166,9 +35168,10 @@ var CardText = function CardText(_ref) {
35166
35168
  return /*#__PURE__*/React.createElement(Box, {
35167
35169
  padding: padding
35168
35170
  }, /*#__PURE__*/React.createElement(Cover, null, /*#__PURE__*/React.createElement(Stack, null, titleText && /*#__PURE__*/React.createElement(Title$1, {
35171
+ as: "p",
35169
35172
  variant: titleVariant,
35170
35173
  color: themeValues.titleColor,
35171
- weight: themeValues === null || themeValues === void 0 ? void 0 : themeValues.titleWeight
35174
+ weight: themeValues.titleWeight
35172
35175
  }, titleText), /*#__PURE__*/React.createElement(Paragraph$1, {
35173
35176
  color: themeValues.textColor
35174
35177
  }, text))));
@@ -35176,45 +35179,50 @@ var CardText = function CardText(_ref) {
35176
35179
  var CardText$1 = themeComponent(withWindowSize(CardText), "CardText", fallbackValues$x);
35177
35180
 
35178
35181
  var CardHeader = function CardHeader(_ref) {
35179
- var headerText = _ref.headerText,
35182
+ var backgroundColor = _ref.backgroundColor,
35183
+ borderRadius = _ref.borderRadius,
35184
+ as = _ref.as,
35185
+ headerText = _ref.headerText,
35180
35186
  headerColor = _ref.headerColor,
35181
35187
  headerVariant = _ref.headerVariant,
35182
- backgroundColor = _ref.backgroundColor,
35183
- padding = _ref.padding,
35184
- borderRadius = _ref.borderRadius;
35188
+ padding = _ref.padding;
35185
35189
  return /*#__PURE__*/React.createElement(Box, {
35186
35190
  padding: padding,
35187
35191
  background: backgroundColor,
35188
35192
  borderRadius: "".concat(borderRadius, " ").concat(borderRadius, " 0 0")
35189
35193
  }, /*#__PURE__*/React.createElement(Title$1, {
35194
+ as: as,
35190
35195
  variant: headerVariant,
35191
35196
  color: headerColor
35192
35197
  }, headerText));
35193
35198
  };
35194
35199
 
35195
35200
  var Card = function Card(_ref) {
35196
- var themeValues = _ref.themeValues,
35197
- children = _ref.children,
35201
+ var _ref$borderRadius = _ref.borderRadius,
35202
+ borderRadius = _ref$borderRadius === void 0 ? "4px" : _ref$borderRadius,
35198
35203
  extraStyles = _ref.extraStyles,
35199
- _ref$width = _ref.width,
35200
- width = _ref$width === void 0 ? "276px" : _ref$width,
35201
- text = _ref.text,
35202
- titleText = _ref.titleText,
35203
- _ref$titleVariant = _ref.titleVariant,
35204
- titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
35204
+ _ref$headerAs = _ref.headerAs,
35205
+ headerAs = _ref$headerAs === void 0 ? "h2" : _ref$headerAs,
35206
+ headerText = _ref.headerText,
35207
+ _ref$headerVariant = _ref.headerVariant,
35208
+ headerVariant = _ref$headerVariant === void 0 ? "small" : _ref$headerVariant,
35205
35209
  imgSrc = _ref.imgSrc,
35206
35210
  _ref$imgHeight = _ref.imgHeight,
35207
35211
  imgHeight = _ref$imgHeight === void 0 ? "150px" : _ref$imgHeight,
35208
35212
  _ref$imgObjectFit = _ref.imgObjectFit,
35209
35213
  imgObjectFit = _ref$imgObjectFit === void 0 ? "none" : _ref$imgObjectFit,
35210
- headerText = _ref.headerText,
35211
- _ref$headerVariant = _ref.headerVariant,
35212
- headerVariant = _ref$headerVariant === void 0 ? "small" : _ref$headerVariant,
35213
- _ref$borderRadius = _ref.borderRadius,
35214
- borderRadius = _ref$borderRadius === void 0 ? "4px" : _ref$borderRadius,
35214
+ imgAltText = _ref.imgAltText,
35215
35215
  _ref$padding = _ref.padding,
35216
- padding = _ref$padding === void 0 ? "24px" : _ref$padding;
35217
- var numberOfChildren = (typeof children === "Array" ? children.length : 1) + (text ? 1 : 0) + (imgSrc ? 1 : 0) + (headerText ? 1 : 0);
35216
+ padding = _ref$padding === void 0 ? "24px" : _ref$padding,
35217
+ text = _ref.text,
35218
+ titleText = _ref.titleText,
35219
+ _ref$titleVariant = _ref.titleVariant,
35220
+ titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
35221
+ themeValues = _ref.themeValues,
35222
+ _ref$width = _ref.width,
35223
+ width = _ref$width === void 0 ? "276px" : _ref$width,
35224
+ children = _ref.children;
35225
+ var numberOfChildren = (Array.isArray(children) ? children.length : 1) + (text ? 1 : 0) + (imgSrc ? 1 : 0) + (headerText ? 1 : 0);
35218
35226
  return /*#__PURE__*/React.createElement(BoxWithShadow$1, {
35219
35227
  variant: "baseStandard",
35220
35228
  background: themeValues.backgroundColor,
@@ -35236,12 +35244,14 @@ var Card = function Card(_ref) {
35236
35244
  headerVariant: headerVariant,
35237
35245
  backgroundColor: themeValues.headerBackgroundColor,
35238
35246
  borderRadius: borderRadius,
35239
- padding: padding
35247
+ padding: padding,
35248
+ as: headerAs
35240
35249
  }), imgSrc && /*#__PURE__*/React.createElement(CardImage, {
35241
35250
  height: imgHeight,
35242
35251
  objectFit: imgObjectFit,
35243
35252
  backgroundColor: themeValues.imageBackgroundColor,
35244
- src: imgSrc
35253
+ src: imgSrc,
35254
+ alt: imgAltText
35245
35255
  }), text && /*#__PURE__*/React.createElement(CardText$1, {
35246
35256
  padding: padding,
35247
35257
  titleText: titleText,
@@ -37969,10 +37979,10 @@ ForgotPasswordForm.reducer = reducer$4;
37969
37979
  ForgotPasswordForm.mapStateToProps = mapStateToProps$5;
37970
37980
  ForgotPasswordForm.mapDispatchToProps = mapDispatchToProps$4;
37971
37981
 
37972
- var textColor$2 = "#ffffff";
37982
+ var textColor$3 = "#ffffff";
37973
37983
  var backgroundColor$6 = "#182848";
37974
37984
  var fallbackValues$B = {
37975
- textColor: textColor$2,
37985
+ textColor: textColor$3,
37976
37986
  backgroundColor: backgroundColor$6
37977
37987
  };
37978
37988