@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.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,7 +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),
19726
19729
  secondary: "".concat(ROYAL_BLUE_VIVID),
19730
+ secondaryHeadline: "".concat(ROYAL_BLUE_VIVID),
19727
19731
  success: "".concat(HINT_GREEN),
19728
19732
  disabled: "".concat(GRECIAN_GREY)
19729
19733
  };
@@ -19731,13 +19735,48 @@ var color$5 = {
19731
19735
  info: "".concat(MATISSE_BLUE),
19732
19736
  warn: "".concat(ZEST_ORANGE),
19733
19737
  primary: "".concat(ROYAL_BLUE_VIVID),
19738
+ primaryHeadline: "".concat(ROYAL_BLUE_VIVID),
19734
19739
  secondary: "".concat(CORNFLOWER_BLUE),
19740
+ secondaryHeadline: "".concat(CORNFLOWER_BLUE),
19735
19741
  success: "".concat(SEA_GREEN),
19736
19742
  disabled: "".concat(MANATEE_GREY)
19737
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
+ };
19738
19774
  var fallbackValues$7 = {
19739
19775
  background: background$1,
19740
- color: color$5
19776
+ color: color$5,
19777
+ fontWeight: fontWeight$1,
19778
+ fontSizeMobile: fontSizeMobile,
19779
+ fontSizeDesktop: fontSizeDesktop
19741
19780
  };
19742
19781
 
19743
19782
  var StyledBadgeContainer = styled__default(Box).withConfig({
@@ -19747,22 +19786,31 @@ var StyledBadgeContainer = styled__default(Box).withConfig({
19747
19786
  var StyledBadge = styled__default(Text$1).withConfig({
19748
19787
  displayName: "Badge__StyledBadge",
19749
19788
  componentId: "sc-1g438j-1"
19750
- })(["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
+ });
19751
19792
  var Badge = function Badge(_ref) {
19752
19793
  var label = _ref.label,
19753
19794
  Icon = _ref.Icon,
19754
19795
  themeValues = _ref.themeValues,
19755
19796
  _ref$iconOnLeft = _ref.iconOnLeft,
19756
19797
  iconOnLeft = _ref$iconOnLeft === void 0 ? true : _ref$iconOnLeft,
19757
- id = _ref.id;
19798
+ id = _ref.id,
19799
+ extraStyles = _ref.extraStyles;
19800
+ var _useContext = React.useContext(styled.ThemeContext),
19801
+ isMobile = _useContext.isMobile;
19758
19802
  return /*#__PURE__*/React__default.createElement(StyledBadgeContainer, {
19759
19803
  background: themeValues.background,
19760
- id: id
19804
+ id: id,
19805
+ extraStyles: extraStyles
19761
19806
  }, iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19762
19807
  color: themeValues.color,
19763
19808
  fill: themeValues.color
19764
19809
  }), /*#__PURE__*/React__default.createElement(StyledBadge, {
19765
- color: themeValues.color
19810
+ color: themeValues.color,
19811
+ weight: themeValues.fontWeight,
19812
+ fontSize: isMobile ? themeValues.fontSizeMobile : themeValues.fontSizeDesktop,
19813
+ isMobile: isMobile
19766
19814
  }, label), !iconOnLeft && Icon && /*#__PURE__*/React__default.createElement(Icon, {
19767
19815
  color: themeValues.color,
19768
19816
  fill: themeValues.color
@@ -21152,7 +21200,7 @@ var activeColor$2 = "".concat(STORM_GREY$1);
21152
21200
  var activeBreadcrumbColor = "".concat(STORM_GREY$1);
21153
21201
  var fontSize$2 = "0.875rem";
21154
21202
  var lineHeight = "1.25rem";
21155
- var fontWeight$1 = "400";
21203
+ var fontWeight$2 = "400";
21156
21204
  var margin = "0.5rem";
21157
21205
  var hover = "text-decoration: ".concat(LINK_TEXT_DECORATION$2, ";");
21158
21206
  var fallbackValues$9 = {
@@ -21161,7 +21209,7 @@ var fallbackValues$9 = {
21161
21209
  activeBreadcrumbColor: activeBreadcrumbColor,
21162
21210
  fontSize: fontSize$2,
21163
21211
  lineHeight: lineHeight,
21164
- fontWeight: fontWeight$1,
21212
+ fontWeight: fontWeight$2,
21165
21213
  margin: margin,
21166
21214
  hover: hover
21167
21215
  };
@@ -24122,7 +24170,7 @@ var errorFontSize = {
24122
24170
  "default": "0.75rem",
24123
24171
  disabled: "0.75rem"
24124
24172
  };
24125
- var fontWeight$2 = {
24173
+ var fontWeight$3 = {
24126
24174
  "default": "".concat(FONT_WEIGHT_REGULAR),
24127
24175
  disabled: "".concat(FONT_WEIGHT_REGULAR)
24128
24176
  };
@@ -24140,7 +24188,7 @@ var fallbackValues$j = {
24140
24188
  lineHeight: lineHeight$1,
24141
24189
  fontSize: fontSize$4,
24142
24190
  errorFontSize: errorFontSize,
24143
- fontWeight: fontWeight$2,
24191
+ fontWeight: fontWeight$3,
24144
24192
  hoverFocusStyles: hoverFocusStyles
24145
24193
  };
24146
24194
 
@@ -25866,7 +25914,7 @@ var errorFontSize$1 = {
25866
25914
  "default": "0.75rem",
25867
25915
  disabled: "0.75rem"
25868
25916
  };
25869
- var fontWeight$3 = {
25917
+ var fontWeight$4 = {
25870
25918
  "default": "".concat(FONT_WEIGHT_REGULAR),
25871
25919
  disabled: "".concat(FONT_WEIGHT_REGULAR)
25872
25920
  };
@@ -25887,7 +25935,7 @@ var fallbackValues$n = {
25887
25935
  lineHeight: lineHeight$2,
25888
25936
  fontSize: fontSize$6,
25889
25937
  errorFontSize: errorFontSize$1,
25890
- fontWeight: fontWeight$3,
25938
+ fontWeight: fontWeight$4,
25891
25939
  hoverFocusStyles: hoverFocusStyles$1,
25892
25940
  formFooterPanel: formFooterPanel
25893
25941
  };
@@ -26851,7 +26899,7 @@ var Jumbo = function Jumbo(_ref) {
26851
26899
  };
26852
26900
  var Jumbo$1 = withWindowSize(Jumbo);
26853
26901
 
26854
- var fontWeight$4 = {
26902
+ var fontWeight$5 = {
26855
26903
  // v1 variants
26856
26904
  "default": "600",
26857
26905
  pS: "600",
@@ -26868,7 +26916,7 @@ var fontWeight$4 = {
26868
26916
  large: "700" // fontsize Title small
26869
26917
  };
26870
26918
  var fallbackValues$t = {
26871
- fontWeight: fontWeight$4
26919
+ fontWeight: fontWeight$5
26872
26920
  };
26873
26921
 
26874
26922
  var LabeledAmountV1 = function LabeledAmountV1(_ref) {
@@ -38946,7 +38994,7 @@ var fontSize$9 = {
38946
38994
  largeTitle: "1.75rem",
38947
38995
  small: "1.25rem"
38948
38996
  };
38949
- var fontWeight$5 = {
38997
+ var fontWeight$6 = {
38950
38998
  "default": "600",
38951
38999
  largeTitle: "700",
38952
39000
  small: "600"
@@ -38993,7 +39041,7 @@ var backgroundColor$7 = {
38993
39041
  };
38994
39042
  var fallbackValues$G = {
38995
39043
  fontSize: fontSize$9,
38996
- fontWeight: fontWeight$5,
39044
+ fontWeight: fontWeight$6,
38997
39045
  fontColor: fontColor,
38998
39046
  lineHeight: lineHeight$3,
38999
39047
  textAlign: textAlign,
@@ -47634,7 +47682,7 @@ var fontSize$a = {
47634
47682
  var lineHeight$4 = {
47635
47683
  "default": "1.5rem"
47636
47684
  };
47637
- var fontWeight$6 = {
47685
+ var fontWeight$7 = {
47638
47686
  "default": FONT_WEIGHT_REGULAR
47639
47687
  };
47640
47688
  var modalLinkHoverFocus = {
@@ -47647,7 +47695,7 @@ var fallbackValues$R = {
47647
47695
  linkColor: linkColor$4,
47648
47696
  fontSize: fontSize$a,
47649
47697
  lineHeight: lineHeight$4,
47650
- fontWeight: fontWeight$6,
47698
+ fontWeight: fontWeight$7,
47651
47699
  modalLinkHoverFocus: modalLinkHoverFocus,
47652
47700
  linkTextDecoration: linkTextDecoration
47653
47701
  };
@@ -47729,7 +47777,7 @@ var lineHeight$5 = {
47729
47777
  "default": "1.5rem",
47730
47778
  footer: "1.25rem"
47731
47779
  };
47732
- var fontWeight$7 = {
47780
+ var fontWeight$8 = {
47733
47781
  "default": FONT_WEIGHT_REGULAR,
47734
47782
  footer: FONT_WEIGHT_SEMIBOLD
47735
47783
  };
@@ -47748,7 +47796,7 @@ var fallbackValues$S = {
47748
47796
  border: border$3,
47749
47797
  fontSize: fontSize$b,
47750
47798
  lineHeight: lineHeight$5,
47751
- fontWeight: fontWeight$7,
47799
+ fontWeight: fontWeight$8,
47752
47800
  modalLinkHoverFocus: modalLinkHoverFocus$1,
47753
47801
  modalLinkTextDecoration: modalLinkTextDecoration
47754
47802
  };
@@ -49605,13 +49653,13 @@ var ToastNotification = function ToastNotification(_ref) {
49605
49653
  }));
49606
49654
  };
49607
49655
 
49608
- var fontWeight$8 = "600";
49656
+ var fontWeight$9 = "600";
49609
49657
  var fontColor$1 = WHITE;
49610
49658
  var textAlign$1 = "left";
49611
49659
  var headerBackgroundColor$1 = BRIGHT_GREY;
49612
49660
  var imageBackgroundColor$1 = MATISSE_BLUE;
49613
49661
  var fallbackValues$Z = {
49614
- fontWeight: fontWeight$8,
49662
+ fontWeight: fontWeight$9,
49615
49663
  fontColor: fontColor$1,
49616
49664
  textAlign: textAlign$1,
49617
49665
  headerBackgroundColor: headerBackgroundColor$1,