@thecb/components 11.6.4-beta.0 → 11.6.4

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
  };
@@ -24121,7 +24171,7 @@ var errorFontSize = {
24121
24171
  "default": "0.75rem",
24122
24172
  disabled: "0.75rem"
24123
24173
  };
24124
- var fontWeight$2 = {
24174
+ var fontWeight$3 = {
24125
24175
  "default": "".concat(FONT_WEIGHT_REGULAR),
24126
24176
  disabled: "".concat(FONT_WEIGHT_REGULAR)
24127
24177
  };
@@ -24139,7 +24189,7 @@ var fallbackValues$j = {
24139
24189
  lineHeight: lineHeight$1,
24140
24190
  fontSize: fontSize$4,
24141
24191
  errorFontSize: errorFontSize,
24142
- fontWeight: fontWeight$2,
24192
+ fontWeight: fontWeight$3,
24143
24193
  hoverFocusStyles: hoverFocusStyles
24144
24194
  };
24145
24195
 
@@ -25865,7 +25915,7 @@ var errorFontSize$1 = {
25865
25915
  "default": "0.75rem",
25866
25916
  disabled: "0.75rem"
25867
25917
  };
25868
- var fontWeight$3 = {
25918
+ var fontWeight$4 = {
25869
25919
  "default": "".concat(FONT_WEIGHT_REGULAR),
25870
25920
  disabled: "".concat(FONT_WEIGHT_REGULAR)
25871
25921
  };
@@ -25886,7 +25936,7 @@ var fallbackValues$n = {
25886
25936
  lineHeight: lineHeight$2,
25887
25937
  fontSize: fontSize$6,
25888
25938
  errorFontSize: errorFontSize$1,
25889
- fontWeight: fontWeight$3,
25939
+ fontWeight: fontWeight$4,
25890
25940
  hoverFocusStyles: hoverFocusStyles$1,
25891
25941
  formFooterPanel: formFooterPanel
25892
25942
  };
@@ -26850,7 +26900,7 @@ var Jumbo = function Jumbo(_ref) {
26850
26900
  };
26851
26901
  var Jumbo$1 = withWindowSize(Jumbo);
26852
26902
 
26853
- var fontWeight$4 = {
26903
+ var fontWeight$5 = {
26854
26904
  // v1 variants
26855
26905
  "default": "600",
26856
26906
  pS: "600",
@@ -26867,7 +26917,7 @@ var fontWeight$4 = {
26867
26917
  large: "700" // fontsize Title small
26868
26918
  };
26869
26919
  var fallbackValues$t = {
26870
- fontWeight: fontWeight$4
26920
+ fontWeight: fontWeight$5
26871
26921
  };
26872
26922
 
26873
26923
  var LabeledAmountV1 = function LabeledAmountV1(_ref) {
@@ -38945,7 +38995,7 @@ var fontSize$9 = {
38945
38995
  largeTitle: "1.75rem",
38946
38996
  small: "1.25rem"
38947
38997
  };
38948
- var fontWeight$5 = {
38998
+ var fontWeight$6 = {
38949
38999
  "default": "600",
38950
39000
  largeTitle: "700",
38951
39001
  small: "600"
@@ -38992,7 +39042,7 @@ var backgroundColor$7 = {
38992
39042
  };
38993
39043
  var fallbackValues$G = {
38994
39044
  fontSize: fontSize$9,
38995
- fontWeight: fontWeight$5,
39045
+ fontWeight: fontWeight$6,
38996
39046
  fontColor: fontColor,
38997
39047
  lineHeight: lineHeight$3,
38998
39048
  textAlign: textAlign,
@@ -47633,7 +47683,7 @@ var fontSize$a = {
47633
47683
  var lineHeight$4 = {
47634
47684
  "default": "1.5rem"
47635
47685
  };
47636
- var fontWeight$6 = {
47686
+ var fontWeight$7 = {
47637
47687
  "default": FONT_WEIGHT_REGULAR
47638
47688
  };
47639
47689
  var modalLinkHoverFocus = {
@@ -47646,7 +47696,7 @@ var fallbackValues$R = {
47646
47696
  linkColor: linkColor$4,
47647
47697
  fontSize: fontSize$a,
47648
47698
  lineHeight: lineHeight$4,
47649
- fontWeight: fontWeight$6,
47699
+ fontWeight: fontWeight$7,
47650
47700
  modalLinkHoverFocus: modalLinkHoverFocus,
47651
47701
  linkTextDecoration: linkTextDecoration
47652
47702
  };
@@ -47728,7 +47778,7 @@ var lineHeight$5 = {
47728
47778
  "default": "1.5rem",
47729
47779
  footer: "1.25rem"
47730
47780
  };
47731
- var fontWeight$7 = {
47781
+ var fontWeight$8 = {
47732
47782
  "default": FONT_WEIGHT_REGULAR,
47733
47783
  footer: FONT_WEIGHT_SEMIBOLD
47734
47784
  };
@@ -47747,7 +47797,7 @@ var fallbackValues$S = {
47747
47797
  border: border$3,
47748
47798
  fontSize: fontSize$b,
47749
47799
  lineHeight: lineHeight$5,
47750
- fontWeight: fontWeight$7,
47800
+ fontWeight: fontWeight$8,
47751
47801
  modalLinkHoverFocus: modalLinkHoverFocus$1,
47752
47802
  modalLinkTextDecoration: modalLinkTextDecoration
47753
47803
  };
@@ -49604,13 +49654,13 @@ var ToastNotification = function ToastNotification(_ref) {
49604
49654
  }));
49605
49655
  };
49606
49656
 
49607
- var fontWeight$8 = "600";
49657
+ var fontWeight$9 = "600";
49608
49658
  var fontColor$1 = WHITE;
49609
49659
  var textAlign$1 = "left";
49610
49660
  var headerBackgroundColor$1 = BRIGHT_GREY;
49611
49661
  var imageBackgroundColor$1 = MATISSE_BLUE;
49612
49662
  var fallbackValues$Z = {
49613
- fontWeight: fontWeight$8,
49663
+ fontWeight: fontWeight$9,
49614
49664
  fontColor: fontColor$1,
49615
49665
  textAlign: textAlign$1,
49616
49666
  headerBackgroundColor: headerBackgroundColor$1,