@thecb/components 11.6.2 → 11.6.3-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.
package/dist/index.cjs.js CHANGED
@@ -356,6 +356,8 @@ var BORDER_RADIUS = {
356
356
  };
357
357
  var BORDER_THIN = "1px";
358
358
  var FONT_SIZE = {
359
+ XXS: "0.625rem",
360
+ // 10px
359
361
  XS: "0.750rem",
360
362
  // 12px
361
363
  SM: "0.875rem",
@@ -19723,6 +19725,9 @@ var background$1 = {
19723
19725
  info: "".concat(INFO_BLUE),
19724
19726
  warn: "".concat(HALF_COLONIAL_WHITE),
19725
19727
  primary: "".concat(CORNFLOWER_BLUE),
19728
+ primaryHeadline: "".concat(CORNFLOWER_BLUE),
19729
+ secondary: "".concat(ROYAL_BLUE_VIVID),
19730
+ secondaryHeadline: "".concat(ROYAL_BLUE_VIVID),
19726
19731
  success: "".concat(HINT_GREEN),
19727
19732
  disabled: "".concat(GRECIAN_GREY)
19728
19733
  };
@@ -19730,12 +19735,48 @@ var color$5 = {
19730
19735
  info: "".concat(MATISSE_BLUE),
19731
19736
  warn: "".concat(ZEST_ORANGE),
19732
19737
  primary: "".concat(ROYAL_BLUE_VIVID),
19738
+ primaryHeadline: "".concat(ROYAL_BLUE_VIVID),
19739
+ secondary: "".concat(CORNFLOWER_BLUE),
19740
+ secondaryHeadline: "".concat(CORNFLOWER_BLUE),
19733
19741
  success: "".concat(SEA_GREEN),
19734
19742
  disabled: "".concat(MANATEE_GREY)
19735
19743
  };
19744
+ var fontWeight$1 = {
19745
+ info: FONT_WEIGHT_REGULAR,
19746
+ warn: FONT_WEIGHT_REGULAR,
19747
+ primary: FONT_WEIGHT_REGULAR,
19748
+ primaryHeadline: FONT_WEIGHT_SEMIBOLD,
19749
+ secondary: FONT_WEIGHT_REGULAR,
19750
+ secondaryHeadline: FONT_WEIGHT_SEMIBOLD,
19751
+ success: FONT_WEIGHT_REGULAR,
19752
+ disabled: FONT_WEIGHT_REGULAR
19753
+ };
19754
+ var fontSizeMobile = {
19755
+ info: fallbackValues.fontSize.pXXS,
19756
+ warn: fallbackValues.fontSize.pXXS,
19757
+ primary: fallbackValues.fontSize.pXXS,
19758
+ primaryHeadline: fallbackValues.fontSize.pXS,
19759
+ secondary: fallbackValues.fontSize.pXXS,
19760
+ secondaryHeadline: fallbackValues.fontSize.pXS,
19761
+ success: fallbackValues.fontSize.pXXS,
19762
+ disabled: fallbackValues.fontSize.pXXS
19763
+ };
19764
+ var fontSizeDesktop = {
19765
+ info: fallbackValues.fontSize.pXS,
19766
+ warn: fallbackValues.fontSize.pXS,
19767
+ primary: fallbackValues.fontSize.pXS,
19768
+ primaryHeadline: fallbackValues.fontSize.pS,
19769
+ secondary: fallbackValues.fontSize.pXS,
19770
+ secondaryHeadline: fallbackValues.fontSize.pS,
19771
+ success: fallbackValues.fontSize.pXS,
19772
+ disabled: fallbackValues.fontSize.pXS
19773
+ };
19736
19774
  var fallbackValues$7 = {
19737
19775
  background: background$1,
19738
- color: color$5
19776
+ color: color$5,
19777
+ fontWeight: fontWeight$1,
19778
+ fontSizeMobile: fontSizeMobile,
19779
+ fontSizeDesktop: fontSizeDesktop
19739
19780
  };
19740
19781
 
19741
19782
  var StyledBadgeContainer = styled__default(Box).withConfig({
@@ -19745,22 +19786,31 @@ var StyledBadgeContainer = styled__default(Box).withConfig({
19745
19786
  var StyledBadge = styled__default(Text$1).withConfig({
19746
19787
  displayName: "Badge__StyledBadge",
19747
19788
  componentId: "sc-1g438j-1"
19748
- })(["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;}"]);
19789
+ })(["line-height:150%;letter-spacing:", ";white-space:nowrap;"], function (props) {
19790
+ return props.isMobile ? "0.2px" : "0.24px";
19791
+ });
19749
19792
  var Badge = function Badge(_ref) {
19750
19793
  var label = _ref.label,
19751
19794
  Icon = _ref.Icon,
19752
19795
  themeValues = _ref.themeValues,
19753
19796
  _ref$iconOnLeft = _ref.iconOnLeft,
19754
19797
  iconOnLeft = _ref$iconOnLeft === void 0 ? true : _ref$iconOnLeft,
19755
- id = _ref.id;
19798
+ id = _ref.id,
19799
+ extraStyles = _ref.extraStyles;
19800
+ var _useContext = React.useContext(styled.ThemeContext),
19801
+ isMobile = _useContext.isMobile;
19756
19802
  return /*#__PURE__*/React__default.createElement(StyledBadgeContainer, {
19757
19803
  background: themeValues.background,
19758
- id: id
19804
+ id: id,
19805
+ extraStyles: extraStyles
19759
19806
  }, iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19760
19807
  color: themeValues.color,
19761
19808
  fill: themeValues.color
19762
19809
  }), /*#__PURE__*/React__default.createElement(StyledBadge, {
19763
- color: themeValues.color
19810
+ color: themeValues.color,
19811
+ weight: themeValues.fontWeight,
19812
+ fontSize: isMobile ? themeValues.fontSizeMobile : themeValues.fontSizeDesktop,
19813
+ isMobile: isMobile
19764
19814
  }, label), !iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19765
19815
  color: themeValues.color,
19766
19816
  fill: themeValues.color
@@ -21150,7 +21200,7 @@ var activeColor$2 = "".concat(STORM_GREY$1);
21150
21200
  var activeBreadcrumbColor = "".concat(STORM_GREY$1);
21151
21201
  var fontSize$2 = "0.875rem";
21152
21202
  var lineHeight = "1.25rem";
21153
- var fontWeight$1 = "400";
21203
+ var fontWeight$2 = "400";
21154
21204
  var margin = "0.5rem";
21155
21205
  var hover = "text-decoration: ".concat(LINK_TEXT_DECORATION$2, ";");
21156
21206
  var fallbackValues$9 = {
@@ -21159,7 +21209,7 @@ var fallbackValues$9 = {
21159
21209
  activeBreadcrumbColor: activeBreadcrumbColor,
21160
21210
  fontSize: fontSize$2,
21161
21211
  lineHeight: lineHeight,
21162
- fontWeight: fontWeight$1,
21212
+ fontWeight: fontWeight$2,
21163
21213
  margin: margin,
21164
21214
  hover: hover
21165
21215
  };
@@ -24120,7 +24170,7 @@ var errorFontSize = {
24120
24170
  "default": "0.75rem",
24121
24171
  disabled: "0.75rem"
24122
24172
  };
24123
- var fontWeight$2 = {
24173
+ var fontWeight$3 = {
24124
24174
  "default": "".concat(FONT_WEIGHT_REGULAR),
24125
24175
  disabled: "".concat(FONT_WEIGHT_REGULAR)
24126
24176
  };
@@ -24138,7 +24188,7 @@ var fallbackValues$j = {
24138
24188
  lineHeight: lineHeight$1,
24139
24189
  fontSize: fontSize$4,
24140
24190
  errorFontSize: errorFontSize,
24141
- fontWeight: fontWeight$2,
24191
+ fontWeight: fontWeight$3,
24142
24192
  hoverFocusStyles: hoverFocusStyles
24143
24193
  };
24144
24194
 
@@ -25864,7 +25914,7 @@ var errorFontSize$1 = {
25864
25914
  "default": "0.75rem",
25865
25915
  disabled: "0.75rem"
25866
25916
  };
25867
- var fontWeight$3 = {
25917
+ var fontWeight$4 = {
25868
25918
  "default": "".concat(FONT_WEIGHT_REGULAR),
25869
25919
  disabled: "".concat(FONT_WEIGHT_REGULAR)
25870
25920
  };
@@ -25885,7 +25935,7 @@ var fallbackValues$n = {
25885
25935
  lineHeight: lineHeight$2,
25886
25936
  fontSize: fontSize$6,
25887
25937
  errorFontSize: errorFontSize$1,
25888
- fontWeight: fontWeight$3,
25938
+ fontWeight: fontWeight$4,
25889
25939
  hoverFocusStyles: hoverFocusStyles$1,
25890
25940
  formFooterPanel: formFooterPanel
25891
25941
  };
@@ -26849,7 +26899,7 @@ var Jumbo = function Jumbo(_ref) {
26849
26899
  };
26850
26900
  var Jumbo$1 = withWindowSize(Jumbo);
26851
26901
 
26852
- var fontWeight$4 = {
26902
+ var fontWeight$5 = {
26853
26903
  // v1 variants
26854
26904
  "default": "600",
26855
26905
  pS: "600",
@@ -26866,7 +26916,7 @@ var fontWeight$4 = {
26866
26916
  large: "700" // fontsize Title small
26867
26917
  };
26868
26918
  var fallbackValues$t = {
26869
- fontWeight: fontWeight$4
26919
+ fontWeight: fontWeight$5
26870
26920
  };
26871
26921
 
26872
26922
  var LabeledAmountV1 = function LabeledAmountV1(_ref) {
@@ -38944,7 +38994,7 @@ var fontSize$9 = {
38944
38994
  largeTitle: "1.75rem",
38945
38995
  small: "1.25rem"
38946
38996
  };
38947
- var fontWeight$5 = {
38997
+ var fontWeight$6 = {
38948
38998
  "default": "600",
38949
38999
  largeTitle: "700",
38950
39000
  small: "600"
@@ -38991,7 +39041,7 @@ var backgroundColor$7 = {
38991
39041
  };
38992
39042
  var fallbackValues$G = {
38993
39043
  fontSize: fontSize$9,
38994
- fontWeight: fontWeight$5,
39044
+ fontWeight: fontWeight$6,
38995
39045
  fontColor: fontColor,
38996
39046
  lineHeight: lineHeight$3,
38997
39047
  textAlign: textAlign,
@@ -47632,7 +47682,7 @@ var fontSize$a = {
47632
47682
  var lineHeight$4 = {
47633
47683
  "default": "1.5rem"
47634
47684
  };
47635
- var fontWeight$6 = {
47685
+ var fontWeight$7 = {
47636
47686
  "default": FONT_WEIGHT_REGULAR
47637
47687
  };
47638
47688
  var modalLinkHoverFocus = {
@@ -47645,7 +47695,7 @@ var fallbackValues$R = {
47645
47695
  linkColor: linkColor$4,
47646
47696
  fontSize: fontSize$a,
47647
47697
  lineHeight: lineHeight$4,
47648
- fontWeight: fontWeight$6,
47698
+ fontWeight: fontWeight$7,
47649
47699
  modalLinkHoverFocus: modalLinkHoverFocus,
47650
47700
  linkTextDecoration: linkTextDecoration
47651
47701
  };
@@ -47727,7 +47777,7 @@ var lineHeight$5 = {
47727
47777
  "default": "1.5rem",
47728
47778
  footer: "1.25rem"
47729
47779
  };
47730
- var fontWeight$7 = {
47780
+ var fontWeight$8 = {
47731
47781
  "default": FONT_WEIGHT_REGULAR,
47732
47782
  footer: FONT_WEIGHT_SEMIBOLD
47733
47783
  };
@@ -47746,7 +47796,7 @@ var fallbackValues$S = {
47746
47796
  border: border$3,
47747
47797
  fontSize: fontSize$b,
47748
47798
  lineHeight: lineHeight$5,
47749
- fontWeight: fontWeight$7,
47799
+ fontWeight: fontWeight$8,
47750
47800
  modalLinkHoverFocus: modalLinkHoverFocus$1,
47751
47801
  modalLinkTextDecoration: modalLinkTextDecoration
47752
47802
  };
@@ -49603,13 +49653,13 @@ var ToastNotification = function ToastNotification(_ref) {
49603
49653
  }));
49604
49654
  };
49605
49655
 
49606
- var fontWeight$8 = "600";
49656
+ var fontWeight$9 = "600";
49607
49657
  var fontColor$1 = WHITE;
49608
49658
  var textAlign$1 = "left";
49609
49659
  var headerBackgroundColor$1 = BRIGHT_GREY;
49610
49660
  var imageBackgroundColor$1 = MATISSE_BLUE;
49611
49661
  var fallbackValues$Z = {
49612
- fontWeight: fontWeight$8,
49662
+ fontWeight: fontWeight$9,
49613
49663
  fontColor: fontColor$1,
49614
49664
  textAlign: textAlign$1,
49615
49665
  headerBackgroundColor: headerBackgroundColor$1,