@thecb/components 11.6.3-beta.0 → 11.6.3-beta.2

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
@@ -599,6 +599,7 @@ interface BadgeProps {
599
599
  label: string;
600
600
  Icon?: JSX.Element;
601
601
  iconOnLeft?: boolean;
602
+ variant?: "info" | "warn" | "primary" | "primaryHeadline" | "secondary" | "secondaryHeadline" | "success" | "disabled";
602
603
  }
603
604
 
604
605
  declare const Badge: React.FC<Expand<BadgeProps> & HTMLAttributes<HTMLElement>>;
@@ -1294,8 +1295,8 @@ interface CollapsibleSectionProps {
1294
1295
  extraStyles?: string;
1295
1296
  }
1296
1297
 
1297
- declare const CollapsibleSection: React.FC<Expand<CollapsibleSectionProps> &
1298
- React.HTMLAttributes<HTMLElement>>;
1298
+ declare const CollapsibleSection: React.FC<Expand<CollapsibleSectionProps> &
1299
+ Omit<React.HTMLAttributes<HTMLElement>, 'title'>>; // ommitting title prop to avoid conflicts with component's title prop
1299
1300
 
1300
1301
  interface CopyableProps {
1301
1302
  content: string;
package/dist/index.esm.js CHANGED
@@ -348,6 +348,8 @@ var BORDER_RADIUS = {
348
348
  };
349
349
  var BORDER_THIN = "1px";
350
350
  var FONT_SIZE = {
351
+ XXS: "0.625rem",
352
+ // 10px
351
353
  XS: "0.750rem",
352
354
  // 12px
353
355
  SM: "0.875rem",
@@ -19715,7 +19717,9 @@ var background$1 = {
19715
19717
  info: "".concat(INFO_BLUE),
19716
19718
  warn: "".concat(HALF_COLONIAL_WHITE),
19717
19719
  primary: "".concat(CORNFLOWER_BLUE),
19720
+ primaryHeadline: "".concat(CORNFLOWER_BLUE),
19718
19721
  secondary: "".concat(ROYAL_BLUE_VIVID),
19722
+ secondaryHeadline: "".concat(ROYAL_BLUE_VIVID),
19719
19723
  success: "".concat(HINT_GREEN),
19720
19724
  disabled: "".concat(GRECIAN_GREY)
19721
19725
  };
@@ -19723,13 +19727,48 @@ var color$5 = {
19723
19727
  info: "".concat(MATISSE_BLUE),
19724
19728
  warn: "".concat(ZEST_ORANGE),
19725
19729
  primary: "".concat(ROYAL_BLUE_VIVID),
19730
+ primaryHeadline: "".concat(ROYAL_BLUE_VIVID),
19726
19731
  secondary: "".concat(CORNFLOWER_BLUE),
19732
+ secondaryHeadline: "".concat(CORNFLOWER_BLUE),
19727
19733
  success: "".concat(SEA_GREEN),
19728
19734
  disabled: "".concat(MANATEE_GREY)
19729
19735
  };
19736
+ var fontWeight$1 = {
19737
+ info: FONT_WEIGHT_REGULAR,
19738
+ warn: FONT_WEIGHT_REGULAR,
19739
+ primary: FONT_WEIGHT_REGULAR,
19740
+ primaryHeadline: FONT_WEIGHT_SEMIBOLD,
19741
+ secondary: FONT_WEIGHT_REGULAR,
19742
+ secondaryHeadline: FONT_WEIGHT_SEMIBOLD,
19743
+ success: FONT_WEIGHT_REGULAR,
19744
+ disabled: FONT_WEIGHT_REGULAR
19745
+ };
19746
+ var fontSizeMobile = {
19747
+ info: fallbackValues.fontSize.pXXS,
19748
+ warn: fallbackValues.fontSize.pXXS,
19749
+ primary: fallbackValues.fontSize.pXXS,
19750
+ primaryHeadline: fallbackValues.fontSize.pXS,
19751
+ secondary: fallbackValues.fontSize.pXXS,
19752
+ secondaryHeadline: fallbackValues.fontSize.pXS,
19753
+ success: fallbackValues.fontSize.pXXS,
19754
+ disabled: fallbackValues.fontSize.pXXS
19755
+ };
19756
+ var fontSizeDesktop = {
19757
+ info: fallbackValues.fontSize.pXS,
19758
+ warn: fallbackValues.fontSize.pXS,
19759
+ primary: fallbackValues.fontSize.pXS,
19760
+ primaryHeadline: fallbackValues.fontSize.pS,
19761
+ secondary: fallbackValues.fontSize.pXS,
19762
+ secondaryHeadline: fallbackValues.fontSize.pS,
19763
+ success: fallbackValues.fontSize.pXS,
19764
+ disabled: fallbackValues.fontSize.pXS
19765
+ };
19730
19766
  var fallbackValues$7 = {
19731
19767
  background: background$1,
19732
- color: color$5
19768
+ color: color$5,
19769
+ fontWeight: fontWeight$1,
19770
+ fontSizeMobile: fontSizeMobile,
19771
+ fontSizeDesktop: fontSizeDesktop
19733
19772
  };
19734
19773
 
19735
19774
  var StyledBadgeContainer = styled(Box).withConfig({
@@ -19739,22 +19778,31 @@ var StyledBadgeContainer = styled(Box).withConfig({
19739
19778
  var StyledBadge = styled(Text$1).withConfig({
19740
19779
  displayName: "Badge__StyledBadge",
19741
19780
  componentId: "sc-1g438j-1"
19742
- })(["font-family:\"Public Sans\",sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:150%;letter-spacing:0.2px;white-space:nowrap;@media screen and (min-width:1049px){font-size:12px;line-height:150%;letter-spacing:0.24px;}"]);
19781
+ })(["line-height:150%;letter-spacing:", ";white-space:nowrap;"], function (props) {
19782
+ return props.isMobile ? "0.2px" : "0.24px";
19783
+ });
19743
19784
  var Badge = function Badge(_ref) {
19744
19785
  var label = _ref.label,
19745
19786
  Icon = _ref.Icon,
19746
19787
  themeValues = _ref.themeValues,
19747
19788
  _ref$iconOnLeft = _ref.iconOnLeft,
19748
19789
  iconOnLeft = _ref$iconOnLeft === void 0 ? true : _ref$iconOnLeft,
19749
- id = _ref.id;
19790
+ id = _ref.id,
19791
+ extraStyles = _ref.extraStyles;
19792
+ var _useContext = useContext(ThemeContext),
19793
+ isMobile = _useContext.isMobile;
19750
19794
  return /*#__PURE__*/React__default.createElement(StyledBadgeContainer, {
19751
19795
  background: themeValues.background,
19752
- id: id
19796
+ id: id,
19797
+ extraStyles: extraStyles
19753
19798
  }, iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19754
19799
  color: themeValues.color,
19755
19800
  fill: themeValues.color
19756
19801
  }), /*#__PURE__*/React__default.createElement(StyledBadge, {
19757
- color: themeValues.color
19802
+ color: themeValues.color,
19803
+ weight: themeValues.fontWeight,
19804
+ fontSize: isMobile ? themeValues.fontSizeMobile : themeValues.fontSizeDesktop,
19805
+ isMobile: isMobile
19758
19806
  }, label), !iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19759
19807
  color: themeValues.color,
19760
19808
  fill: themeValues.color
@@ -21144,7 +21192,7 @@ var activeColor$2 = "".concat(STORM_GREY$1);
21144
21192
  var activeBreadcrumbColor = "".concat(STORM_GREY$1);
21145
21193
  var fontSize$2 = "0.875rem";
21146
21194
  var lineHeight = "1.25rem";
21147
- var fontWeight$1 = "400";
21195
+ var fontWeight$2 = "400";
21148
21196
  var margin = "0.5rem";
21149
21197
  var hover = "text-decoration: ".concat(LINK_TEXT_DECORATION$2, ";");
21150
21198
  var fallbackValues$9 = {
@@ -21153,7 +21201,7 @@ var fallbackValues$9 = {
21153
21201
  activeBreadcrumbColor: activeBreadcrumbColor,
21154
21202
  fontSize: fontSize$2,
21155
21203
  lineHeight: lineHeight,
21156
- fontWeight: fontWeight$1,
21204
+ fontWeight: fontWeight$2,
21157
21205
  margin: margin,
21158
21206
  hover: hover
21159
21207
  };
@@ -24114,7 +24162,7 @@ var errorFontSize = {
24114
24162
  "default": "0.75rem",
24115
24163
  disabled: "0.75rem"
24116
24164
  };
24117
- var fontWeight$2 = {
24165
+ var fontWeight$3 = {
24118
24166
  "default": "".concat(FONT_WEIGHT_REGULAR),
24119
24167
  disabled: "".concat(FONT_WEIGHT_REGULAR)
24120
24168
  };
@@ -24132,7 +24180,7 @@ var fallbackValues$j = {
24132
24180
  lineHeight: lineHeight$1,
24133
24181
  fontSize: fontSize$4,
24134
24182
  errorFontSize: errorFontSize,
24135
- fontWeight: fontWeight$2,
24183
+ fontWeight: fontWeight$3,
24136
24184
  hoverFocusStyles: hoverFocusStyles
24137
24185
  };
24138
24186
 
@@ -25858,7 +25906,7 @@ var errorFontSize$1 = {
25858
25906
  "default": "0.75rem",
25859
25907
  disabled: "0.75rem"
25860
25908
  };
25861
- var fontWeight$3 = {
25909
+ var fontWeight$4 = {
25862
25910
  "default": "".concat(FONT_WEIGHT_REGULAR),
25863
25911
  disabled: "".concat(FONT_WEIGHT_REGULAR)
25864
25912
  };
@@ -25879,7 +25927,7 @@ var fallbackValues$n = {
25879
25927
  lineHeight: lineHeight$2,
25880
25928
  fontSize: fontSize$6,
25881
25929
  errorFontSize: errorFontSize$1,
25882
- fontWeight: fontWeight$3,
25930
+ fontWeight: fontWeight$4,
25883
25931
  hoverFocusStyles: hoverFocusStyles$1,
25884
25932
  formFooterPanel: formFooterPanel
25885
25933
  };
@@ -26843,7 +26891,7 @@ var Jumbo = function Jumbo(_ref) {
26843
26891
  };
26844
26892
  var Jumbo$1 = withWindowSize(Jumbo);
26845
26893
 
26846
- var fontWeight$4 = {
26894
+ var fontWeight$5 = {
26847
26895
  // v1 variants
26848
26896
  "default": "600",
26849
26897
  pS: "600",
@@ -26860,7 +26908,7 @@ var fontWeight$4 = {
26860
26908
  large: "700" // fontsize Title small
26861
26909
  };
26862
26910
  var fallbackValues$t = {
26863
- fontWeight: fontWeight$4
26911
+ fontWeight: fontWeight$5
26864
26912
  };
26865
26913
 
26866
26914
  var LabeledAmountV1 = function LabeledAmountV1(_ref) {
@@ -38938,7 +38986,7 @@ var fontSize$9 = {
38938
38986
  largeTitle: "1.75rem",
38939
38987
  small: "1.25rem"
38940
38988
  };
38941
- var fontWeight$5 = {
38989
+ var fontWeight$6 = {
38942
38990
  "default": "600",
38943
38991
  largeTitle: "700",
38944
38992
  small: "600"
@@ -38985,7 +39033,7 @@ var backgroundColor$7 = {
38985
39033
  };
38986
39034
  var fallbackValues$G = {
38987
39035
  fontSize: fontSize$9,
38988
- fontWeight: fontWeight$5,
39036
+ fontWeight: fontWeight$6,
38989
39037
  fontColor: fontColor,
38990
39038
  lineHeight: lineHeight$3,
38991
39039
  textAlign: textAlign,
@@ -47626,7 +47674,7 @@ var fontSize$a = {
47626
47674
  var lineHeight$4 = {
47627
47675
  "default": "1.5rem"
47628
47676
  };
47629
- var fontWeight$6 = {
47677
+ var fontWeight$7 = {
47630
47678
  "default": FONT_WEIGHT_REGULAR
47631
47679
  };
47632
47680
  var modalLinkHoverFocus = {
@@ -47639,7 +47687,7 @@ var fallbackValues$R = {
47639
47687
  linkColor: linkColor$4,
47640
47688
  fontSize: fontSize$a,
47641
47689
  lineHeight: lineHeight$4,
47642
- fontWeight: fontWeight$6,
47690
+ fontWeight: fontWeight$7,
47643
47691
  modalLinkHoverFocus: modalLinkHoverFocus,
47644
47692
  linkTextDecoration: linkTextDecoration
47645
47693
  };
@@ -47721,7 +47769,7 @@ var lineHeight$5 = {
47721
47769
  "default": "1.5rem",
47722
47770
  footer: "1.25rem"
47723
47771
  };
47724
- var fontWeight$7 = {
47772
+ var fontWeight$8 = {
47725
47773
  "default": FONT_WEIGHT_REGULAR,
47726
47774
  footer: FONT_WEIGHT_SEMIBOLD
47727
47775
  };
@@ -47740,7 +47788,7 @@ var fallbackValues$S = {
47740
47788
  border: border$3,
47741
47789
  fontSize: fontSize$b,
47742
47790
  lineHeight: lineHeight$5,
47743
- fontWeight: fontWeight$7,
47791
+ fontWeight: fontWeight$8,
47744
47792
  modalLinkHoverFocus: modalLinkHoverFocus$1,
47745
47793
  modalLinkTextDecoration: modalLinkTextDecoration
47746
47794
  };
@@ -49597,13 +49645,13 @@ var ToastNotification = function ToastNotification(_ref) {
49597
49645
  }));
49598
49646
  };
49599
49647
 
49600
- var fontWeight$8 = "600";
49648
+ var fontWeight$9 = "600";
49601
49649
  var fontColor$1 = WHITE;
49602
49650
  var textAlign$1 = "left";
49603
49651
  var headerBackgroundColor$1 = BRIGHT_GREY;
49604
49652
  var imageBackgroundColor$1 = MATISSE_BLUE;
49605
49653
  var fallbackValues$Z = {
49606
- fontWeight: fontWeight$8,
49654
+ fontWeight: fontWeight$9,
49607
49655
  fontColor: fontColor$1,
49608
49656
  textAlign: textAlign$1,
49609
49657
  headerBackgroundColor: headerBackgroundColor$1,