@thecb/components 5.7.0 → 5.8.0-beta.0

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
@@ -4628,14 +4628,21 @@ var fontFamily = {
4628
4628
  }; // Text uses the same variants as paragraph
4629
4629
  // Use a Paragraph if you want a block level element
4630
4630
  // Use a Text if you want an inline element
4631
+ // Comments assume base font size of 16px
4631
4632
 
4632
4633
  var fontSize = {
4633
4634
  p: "1rem",
4635
+ // 16px
4634
4636
  pL: "1.125rem",
4637
+ // 18px
4635
4638
  pS: "0.875rem",
4639
+ // 14px
4636
4640
  pXS: "0.75rem",
4641
+ // 12px
4637
4642
  pXXS: "0.65rem",
4638
- pXL: "1.5rem"
4643
+ // 10px
4644
+ pXL: "1.5rem" // 24px
4645
+
4639
4646
  };
4640
4647
  var fallbackValues = {
4641
4648
  fontFamily: fontFamily,
@@ -15848,10 +15855,10 @@ var Alert = function Alert(_ref) {
15848
15855
 
15849
15856
  var Alert$1 = themeComponent(Alert, "Alert", fallbackValues$4, "info");
15850
15857
 
15851
- var HeadingText = styled__default.h1.withConfig({
15852
- displayName: "Headingstyled__HeadingText",
15853
- componentId: "sc-1a3jd28-0"
15854
- })(["--font-size:", ";font-size:var(--font-size);line-height:calc(1.5 * var(--font-size));color:", ";font-weight:", ";margin:", ";text-align:", ";font-family:", ";", ";"], function (_ref) {
15858
+ var TitleText = styled__default.h1.withConfig({
15859
+ displayName: "Titlestyled__TitleText",
15860
+ componentId: "sc-11lhluq-0"
15861
+ })(["font-size:", ";line-height:1.5;color:", ";font-weight:", ";margin:", ";text-align:", ";font-family:", ";", ";"], function (_ref) {
15855
15862
  var fontSize = _ref.fontSize;
15856
15863
  return fontSize;
15857
15864
  }, function (_ref2) {
@@ -15874,26 +15881,63 @@ var HeadingText = styled__default.h1.withConfig({
15874
15881
  return extraStyles;
15875
15882
  });
15876
15883
 
15884
+ // Comments assume desktop base font size of 16px, mobile base font size of 14px
15885
+ var fontSize$1 = {
15886
+ large: "1.5rem",
15887
+ // 24px (at base font size of 16px)
15888
+ small: "1.25rem" // 20px
15889
+
15890
+ };
15877
15891
  var fontFamily$1 = {
15878
- primary: "Public Sans",
15879
- secondary: "Open Sans"
15892
+ large: "Public Sans",
15893
+ small: "Public Sans"
15880
15894
  };
15881
- var fontSize$1 = {
15882
- h1: "2.25rem",
15883
- h2: "2rem",
15884
- h3: "1.75rem",
15885
- h4: "1.5rem",
15886
- h5: "1.375rem",
15887
- h6: "1.25rem"
15895
+ var mobileFontSize = {
15896
+ large: "1.5rem",
15897
+ // 21px (at base font size of 14px)
15898
+ small: "1.2142rem" // 17px
15899
+
15888
15900
  };
15889
15901
  var fallbackValues$5 = {
15890
15902
  fontFamily: fontFamily$1,
15891
15903
  fontSize: fontSize$1
15892
15904
  };
15905
+ var mobileFallbackValues = {
15906
+ fontFamily: fontFamily$1,
15907
+ fontSize: mobileFontSize
15908
+ };
15909
+ var MOBILE_BREAKPOINT = 768;
15893
15910
 
15894
15911
  var _excluded$i = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
15912
+ /*
15913
+ New responsive text component for Title elements
15914
+ Size is decoupled from tag
15915
+ Comes with two variants - "large" and "small"
15916
+ Large variant results in text that is 1.5rem (24px desktop, 21px mobile)
15917
+ Small variant results in text that is 1.25rem/1.2142rem (20px desktop, 17px mobile)
15918
+
15919
+ If you need a smaller text size, use the <Detail /> atom, which has smaller variants
15920
+
15921
+ Use the "as" prop to specify element type, can use any of: h1/h2/h3/h4/h5/h6/p
15922
+ If you need an inline text element (span), use the <Text /> atom
15923
+ The "as" value should be dictated by the structure of your page, not what font-size you want
15895
15924
 
15896
- var Heading = function Heading(_ref) {
15925
+ Title / Detail both use slightly different desktop/mobile scales
15926
+ (Mobile scale is different to allow for design-friendly px values)
15927
+ Both atoms detect the presence of a mobile device on their own
15928
+ and apply the corresponding scale
15929
+
15930
+ Mobile breakpoint value is specified in Title.theme.js
15931
+
15932
+ If you want to disable mobile text scales (use the same rem scale for desktop/mobile), then use a theme in FCS to set both the "large" and "small" variants to use the same rem sizes. FCS themes override fallbacks defined in the .theme file
15933
+ */
15934
+
15935
+ var isBelowBreakpoint = window.innerWidth < MOBILE_BREAKPOINT;
15936
+ var isTouchDevice$1 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
15937
+ var mobileDeviceDetected = isBelowBreakpoint && isTouchDevice$1;
15938
+ var fallbacks = mobileDeviceDetected ? mobileFallbackValues : fallbackValues$5;
15939
+
15940
+ var Title = function Title(_ref) {
15897
15941
  var themeValues = _ref.themeValues,
15898
15942
  _ref$weight = _ref.weight,
15899
15943
  weight = _ref$weight === void 0 ? FONT_WEIGHT_REGULAR : _ref$weight,
@@ -15906,14 +15950,14 @@ var Heading = function Heading(_ref) {
15906
15950
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
15907
15951
  className = _ref.className,
15908
15952
  _ref$variant = _ref.variant,
15909
- variant = _ref$variant === void 0 ? "h1" : _ref$variant,
15953
+ variant = _ref$variant === void 0 ? "large" : _ref$variant,
15910
15954
  _ref$as = _ref.as,
15911
- as = _ref$as === void 0 ? variant : _ref$as,
15955
+ as = _ref$as === void 0 ? "h1" : _ref$as,
15912
15956
  dataQa = _ref.dataQa,
15913
15957
  children = _ref.children,
15914
15958
  rest = _objectWithoutProperties(_ref, _excluded$i);
15915
15959
 
15916
- return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
15960
+ return /*#__PURE__*/React__default.createElement(TitleText, _extends({
15917
15961
  variant: variant,
15918
15962
  as: as,
15919
15963
  weight: weight,
@@ -15928,23 +15972,11 @@ var Heading = function Heading(_ref) {
15928
15972
  }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
15929
15973
  };
15930
15974
 
15931
- var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$5, "h1");
15975
+ var Title$1 = themeComponent(Title, "Title", fallbacks, "large");
15932
15976
 
15933
- var fontSize$2 = {
15934
- large: "1.5rem",
15935
- medium: "1.25rem",
15936
- small: "1.094rem"
15937
- };
15938
15977
  var color$3 = "#15749D";
15939
- var lineHeight = {
15940
- large: "2rem",
15941
- medium: "1.875rem",
15942
- small: "1.641rem"
15943
- };
15944
15978
  var fallbackValues$6 = {
15945
- fontSize: fontSize$2,
15946
- color: color$3,
15947
- lineHeight: lineHeight
15979
+ color: color$3
15948
15980
  };
15949
15981
 
15950
15982
  var AmountCallout = function AmountCallout(_ref) {
@@ -15954,16 +15986,15 @@ var AmountCallout = function AmountCallout(_ref) {
15954
15986
  return /*#__PURE__*/React__default.createElement(Box, {
15955
15987
  padding: "0",
15956
15988
  textAlign: textAlign
15957
- }, /*#__PURE__*/React__default.createElement(Heading$1, {
15958
- variant: "h6",
15989
+ }, /*#__PURE__*/React__default.createElement(Title$1, {
15990
+ variant: "small",
15959
15991
  weight: FONT_WEIGHT_SEMIBOLD,
15960
- fontSize: themeValues.fontSize,
15961
15992
  color: themeValues.color,
15962
- lineHeight: themeValues.lineHeight
15993
+ as: "p"
15963
15994
  }, amount));
15964
15995
  };
15965
15996
 
15966
- var AmountCallout$1 = themeComponent(AmountCallout, "AmountCallout", fallbackValues$6, "medium");
15997
+ var AmountCallout$1 = themeComponent(AmountCallout, "AmountCallout", fallbackValues$6);
15967
15998
 
15968
15999
  function _extends$1() {
15969
16000
  _extends$1 = Object.assign || function (target) {
@@ -16818,8 +16849,8 @@ var BoxWithShadow$1 = themeComponent(BoxWithShadow, "BoxWithShadow", fallbackVal
16818
16849
  var color$4 = "".concat(MATISSE_BLUE);
16819
16850
  var activeColor$2 = "".concat(STORM_GREY);
16820
16851
  var activeBreadcrumbColor = "".concat(STORM_GREY);
16821
- var fontSize$3 = "0.875rem";
16822
- var lineHeight$1 = "1.25rem";
16852
+ var fontSize$2 = "0.875rem";
16853
+ var lineHeight = "1.25rem";
16823
16854
  var fontWeight$1 = "400";
16824
16855
  var margin = "0.5rem";
16825
16856
  var hover = "text-decoration: none;";
@@ -16827,8 +16858,8 @@ var fallbackValues$8 = {
16827
16858
  color: color$4,
16828
16859
  activeColor: activeColor$2,
16829
16860
  activeBreadcrumbColor: activeBreadcrumbColor,
16830
- fontSize: fontSize$3,
16831
- lineHeight: lineHeight$1,
16861
+ fontSize: fontSize$2,
16862
+ lineHeight: lineHeight,
16832
16863
  fontWeight: fontWeight$1,
16833
16864
  margin: margin,
16834
16865
  hover: hover
@@ -18679,18 +18710,25 @@ var fontFamily$3 = {
18679
18710
  pXS: "Public Sans",
18680
18711
  pXXS: "Public Sans",
18681
18712
  pXL: "Public Sans"
18682
- };
18683
- var fontSize$4 = {
18713
+ }; // Comments assume base font size of 16px
18714
+
18715
+ var fontSize$3 = {
18684
18716
  p: "1rem",
18717
+ // 16px
18685
18718
  pL: "1.125rem",
18719
+ // 18px
18686
18720
  pS: "0.875rem",
18721
+ // 14px
18687
18722
  pXS: "0.75rem",
18723
+ // 12px
18688
18724
  pXXS: "0.65rem",
18689
- pXL: "1.5rem"
18725
+ // 10px
18726
+ pXL: "1.5rem" // 24px
18727
+
18690
18728
  };
18691
18729
  var fallbackValues$a = {
18692
18730
  fontFamily: fontFamily$3,
18693
- fontSize: fontSize$4
18731
+ fontSize: fontSize$3
18694
18732
  };
18695
18733
 
18696
18734
  var ParagraphText = styled__default.p.withConfig({
@@ -19663,11 +19701,11 @@ var borderColor = {
19663
19701
  "default": "".concat(GREY_CHATEAU),
19664
19702
  disabled: "".concat(GREY_CHATEAU)
19665
19703
  };
19666
- var lineHeight$2 = {
19704
+ var lineHeight$1 = {
19667
19705
  "default": "1rem",
19668
19706
  disabled: "1rem"
19669
19707
  };
19670
- var fontSize$5 = {
19708
+ var fontSize$4 = {
19671
19709
  "default": "0.875rem",
19672
19710
  disabled: "0.875rem"
19673
19711
  };
@@ -19690,8 +19728,8 @@ var fallbackValues$f = {
19690
19728
  color: color$5,
19691
19729
  labelColor: labelColor,
19692
19730
  borderColor: borderColor,
19693
- lineHeight: lineHeight$2,
19694
- fontSize: fontSize$5,
19731
+ lineHeight: lineHeight$1,
19732
+ fontSize: fontSize$4,
19695
19733
  errorFontSize: errorFontSize,
19696
19734
  fontWeight: fontWeight$2,
19697
19735
  hoverFocusStyles: hoverFocusStyles
@@ -20568,11 +20606,16 @@ var DetailText = styled__default.p.withConfig({
20568
20606
  return extraStyles;
20569
20607
  });
20570
20608
 
20571
- var fontSize$6 = {
20609
+ // Comments assume desktop base font size of 16px, mobile base font size of 14px
20610
+ var fontSize$5 = {
20572
20611
  large: "1.125rem",
20612
+ // 18px (at base font size of 16)
20573
20613
  regular: "1rem",
20614
+ // 16px
20574
20615
  small: "0.875rem",
20575
- extraSmall: "0.75rem"
20616
+ // 14px
20617
+ extraSmall: "0.75rem" // 12px
20618
+
20576
20619
  };
20577
20620
  var fontFamily$4 = {
20578
20621
  large: "Public Sans",
@@ -20580,21 +20623,25 @@ var fontFamily$4 = {
20580
20623
  small: "Public Sans",
20581
20624
  extraSmall: "Public Sans"
20582
20625
  };
20583
- var mobileFontSize = {
20626
+ var mobileFontSize$1 = {
20584
20627
  large: "1.14285rem",
20628
+ // 16px (at base font size of 14)
20585
20629
  regular: "1",
20630
+ // 14px
20586
20631
  small: "0.85714rem",
20587
- extraSmall: "0.71428rem"
20632
+ // 12px
20633
+ extraSmall: "0.71428rem" // 10px
20634
+
20588
20635
  };
20589
20636
  var fallbackValues$g = {
20590
20637
  fontFamily: fontFamily$4,
20591
- fontSize: fontSize$6
20638
+ fontSize: fontSize$5
20592
20639
  };
20593
- var mobileFallbackValues = {
20640
+ var mobileFallbackValues$1 = {
20594
20641
  fontFamily: fontFamily$4,
20595
- fontSize: mobileFontSize
20642
+ fontSize: mobileFontSize$1
20596
20643
  };
20597
- var MOBILE_BREAKPOINT = 768;
20644
+ var MOBILE_BREAKPOINT$1 = 768;
20598
20645
 
20599
20646
  var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
20600
20647
  /*
@@ -20623,10 +20670,10 @@ var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "ext
20623
20670
  If you want to disable mobile text scales (use the same rem scale for desktop/mobile), then use a theme in FCS to set all of the variants to use the same rem sizes. FCS themes override fallbacks defined in the .theme file
20624
20671
  */
20625
20672
 
20626
- var isBelowBreakpoint = window.innerWidth < MOBILE_BREAKPOINT;
20627
- var isTouchDevice$1 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
20628
- var mobileDeviceDetected = isBelowBreakpoint && isTouchDevice$1;
20629
- var fallbacks = mobileDeviceDetected ? mobileFallbackValues : fallbackValues$g;
20673
+ var isBelowBreakpoint$1 = window.innerWidth < MOBILE_BREAKPOINT$1;
20674
+ var isTouchDevice$2 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
20675
+ var mobileDeviceDetected$1 = isBelowBreakpoint$1 && isTouchDevice$2;
20676
+ var fallbacks$1 = mobileDeviceDetected$1 ? mobileFallbackValues$1 : fallbackValues$g;
20630
20677
 
20631
20678
  var Detail = function Detail(_ref) {
20632
20679
  var themeValues = _ref.themeValues,
@@ -20663,7 +20710,7 @@ var Detail = function Detail(_ref) {
20663
20710
  }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
20664
20711
  };
20665
20712
 
20666
- var Detail$1 = themeComponent(Detail, "Detail", fallbacks, "regular");
20713
+ var Detail$1 = themeComponent(Detail, "Detail", fallbacks$1, "regular");
20667
20714
 
20668
20715
  var backgroundColor$3 = WHITE;
20669
20716
  var boxShadow = "0px 2px 14px 0px ".concat(ATHENS_GREY, ", 0px 3px 8px 0px ").concat(GHOST_GREY);
@@ -21041,11 +21088,11 @@ var borderColor$1 = {
21041
21088
  "default": "".concat(GREY_CHATEAU),
21042
21089
  disabled: "".concat(GREY_CHATEAU)
21043
21090
  };
21044
- var lineHeight$3 = {
21091
+ var lineHeight$2 = {
21045
21092
  "default": "1rem",
21046
21093
  disabled: "1rem"
21047
21094
  };
21048
- var fontSize$7 = {
21095
+ var fontSize$6 = {
21049
21096
  "default": "0.875rem",
21050
21097
  disabled: "0.875rem"
21051
21098
  };
@@ -21071,8 +21118,8 @@ var fallbackValues$i = {
21071
21118
  color: color$6,
21072
21119
  labelColor: labelColor$1,
21073
21120
  borderColor: borderColor$1,
21074
- lineHeight: lineHeight$3,
21075
- fontSize: fontSize$7,
21121
+ lineHeight: lineHeight$2,
21122
+ fontSize: fontSize$6,
21076
21123
  errorFontSize: errorFontSize$1,
21077
21124
  fontWeight: fontWeight$3,
21078
21125
  hoverFocusStyles: hoverFocusStyles$1,
@@ -21351,7 +21398,7 @@ var FormFooterPanel = function FormFooterPanel(_ref) {
21351
21398
 
21352
21399
  var FormFooterPanel$1 = themeComponent(withWindowSize(FormFooterPanel), "FormFooterPanel", fallbackValues$i, "default");
21353
21400
 
21354
- var fontSize$8 = {
21401
+ var fontSize$7 = {
21355
21402
  "default": "1rem",
21356
21403
  radio: "1.0625rem"
21357
21404
  };
@@ -21364,7 +21411,7 @@ var color$7 = {
21364
21411
  radio: "".concat(MINESHAFT_GREY)
21365
21412
  };
21366
21413
  var fallbackValues$j = {
21367
- fontSize: fontSize$8,
21414
+ fontSize: fontSize$7,
21368
21415
  padding: padding$1,
21369
21416
  color: color$7
21370
21417
  };
@@ -21520,10 +21567,10 @@ var HamburgerButton = function HamburgerButton(_ref4) {
21520
21567
  })));
21521
21568
  };
21522
21569
 
21523
- var TitleText = styled__default.h1.withConfig({
21524
- displayName: "Titlestyled__TitleText",
21525
- componentId: "sc-11lhluq-0"
21526
- })(["font-size:", ";line-height:1.5;color:", ";font-weight:", ";margin:", ";text-align:", ";font-family:", ";", ";"], function (_ref) {
21570
+ var HeadingText = styled__default.h1.withConfig({
21571
+ displayName: "Headingstyled__HeadingText",
21572
+ componentId: "sc-1a3jd28-0"
21573
+ })(["--font-size:", ";font-size:var(--font-size);line-height:calc(1.5 * var(--font-size));color:", ";font-weight:", ";margin:", ";text-align:", ";font-family:", ";", ";"], function (_ref) {
21527
21574
  var fontSize = _ref.fontSize;
21528
21575
  return fontSize;
21529
21576
  }, function (_ref2) {
@@ -21546,58 +21593,26 @@ var TitleText = styled__default.h1.withConfig({
21546
21593
  return extraStyles;
21547
21594
  });
21548
21595
 
21549
- var fontSize$9 = {
21550
- large: "1.5rem",
21551
- small: "1.25rem"
21552
- };
21553
21596
  var fontFamily$5 = {
21554
- large: "Public Sans",
21555
- small: "Public Sans"
21597
+ primary: "Public Sans",
21598
+ secondary: "Open Sans"
21556
21599
  };
21557
- var mobileFontSize$1 = {
21558
- large: "1.5rem",
21559
- small: "1.2142rem"
21600
+ var fontSize$8 = {
21601
+ h1: "2.25rem",
21602
+ h2: "2rem",
21603
+ h3: "1.75rem",
21604
+ h4: "1.5rem",
21605
+ h5: "1.375rem",
21606
+ h6: "1.25rem"
21560
21607
  };
21561
21608
  var fallbackValues$l = {
21562
21609
  fontFamily: fontFamily$5,
21563
- fontSize: fontSize$9
21564
- };
21565
- var mobileFallbackValues$1 = {
21566
- fontFamily: fontFamily$5,
21567
- fontSize: mobileFontSize$1
21610
+ fontSize: fontSize$8
21568
21611
  };
21569
- var MOBILE_BREAKPOINT$1 = 768;
21570
21612
 
21571
21613
  var _excluded$t = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
21572
- /*
21573
- New responsive text component for Title elements
21574
- Size is decoupled from tag
21575
- Comes with two variants - "large" and "small"
21576
- Large variant results in text that is 1.5rem (24px desktop, 21px mobile)
21577
- Small variant results in text that is 1.25rem/1.2142rem (20px desktop, 17px mobile)
21578
-
21579
- If you need a smaller text size, use the <Detail /> atom, which has smaller variants
21580
-
21581
- Use the "as" prop to specify element type, can use any of: h1/h2/h3/h4/h5/h6/p
21582
- If you need an inline text element (span), use the <Text /> atom
21583
- The "as" value should be dictated by the structure of your page, not what font-size you want
21584
-
21585
- Title / Detail both use slightly different desktop/mobile scales
21586
- (Mobile scale is different to allow for design-friendly px values)
21587
- Both atoms detect the presence of a mobile device on their own
21588
- and apply the corresponding scale
21589
21614
 
21590
- Mobile breakpoint value is specified in Title.theme.js
21591
-
21592
- If you want to disable mobile text scales (use the same rem scale for desktop/mobile), then use a theme in FCS to set both the "large" and "small" variants to use the same rem sizes. FCS themes override fallbacks defined in the .theme file
21593
- */
21594
-
21595
- var isBelowBreakpoint$1 = window.innerWidth < MOBILE_BREAKPOINT$1;
21596
- var isTouchDevice$2 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
21597
- var mobileDeviceDetected$1 = isBelowBreakpoint$1 && isTouchDevice$2;
21598
- var fallbacks$1 = mobileDeviceDetected$1 ? mobileFallbackValues$1 : fallbackValues$l;
21599
-
21600
- var Title = function Title(_ref) {
21615
+ var Heading = function Heading(_ref) {
21601
21616
  var themeValues = _ref.themeValues,
21602
21617
  _ref$weight = _ref.weight,
21603
21618
  weight = _ref$weight === void 0 ? FONT_WEIGHT_REGULAR : _ref$weight,
@@ -21610,14 +21625,14 @@ var Title = function Title(_ref) {
21610
21625
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
21611
21626
  className = _ref.className,
21612
21627
  _ref$variant = _ref.variant,
21613
- variant = _ref$variant === void 0 ? "large" : _ref$variant,
21628
+ variant = _ref$variant === void 0 ? "h1" : _ref$variant,
21614
21629
  _ref$as = _ref.as,
21615
- as = _ref$as === void 0 ? "h1" : _ref$as,
21630
+ as = _ref$as === void 0 ? variant : _ref$as,
21616
21631
  dataQa = _ref.dataQa,
21617
21632
  children = _ref.children,
21618
21633
  rest = _objectWithoutProperties(_ref, _excluded$t);
21619
21634
 
21620
- return /*#__PURE__*/React__default.createElement(TitleText, _extends({
21635
+ return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
21621
21636
  variant: variant,
21622
21637
  as: as,
21623
21638
  weight: weight,
@@ -21632,7 +21647,7 @@ var Title = function Title(_ref) {
21632
21647
  }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
21633
21648
  };
21634
21649
 
21635
- var Title$1 = themeComponent(Title, "Title", fallbacks$1, "large");
21650
+ var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$l, "h1");
21636
21651
 
21637
21652
  var Jumbo = function Jumbo(_ref) {
21638
21653
  var showButton = _ref.showButton,
@@ -38958,7 +38973,7 @@ var Modal$1 = function Modal(_ref) {
38958
38973
  })))))))), children);
38959
38974
  };
38960
38975
 
38961
- var fontSize$a = {
38976
+ var fontSize$9 = {
38962
38977
  "default": "1.375rem",
38963
38978
  largeTitle: "1.75rem",
38964
38979
  small: "1.25rem"
@@ -38973,7 +38988,7 @@ var fontColor = {
38973
38988
  largeTitle: CHARADE_GREY,
38974
38989
  small: CHARADE_GREY
38975
38990
  };
38976
- var lineHeight$4 = {
38991
+ var lineHeight$3 = {
38977
38992
  "default": "2rem",
38978
38993
  largeTitle: "2rem",
38979
38994
  small: "2rem"
@@ -39009,10 +39024,10 @@ var backgroundColor$6 = {
39009
39024
  small: WHITE
39010
39025
  };
39011
39026
  var fallbackValues$x = {
39012
- fontSize: fontSize$a,
39027
+ fontSize: fontSize$9,
39013
39028
  fontWeight: fontWeight$5,
39014
39029
  fontColor: fontColor,
39015
- lineHeight: lineHeight$4,
39030
+ lineHeight: lineHeight$3,
39016
39031
  textAlign: textAlign,
39017
39032
  titleType: titleType,
39018
39033
  titleSpacing: titleSpacing,
@@ -39211,14 +39226,17 @@ var TitleModule = function TitleModule(_ref) {
39211
39226
  padding: "0"
39212
39227
  }, /*#__PURE__*/React__default.createElement(Stack, {
39213
39228
  childGap: "0"
39214
- }, /*#__PURE__*/React__default.createElement(Heading$1, {
39215
- variant: "h6",
39229
+ }, /*#__PURE__*/React__default.createElement(Title$1, {
39230
+ variant: "small",
39216
39231
  weight: FONT_WEIGHT_SEMIBOLD,
39217
39232
  color: titleColor,
39218
- as: "h2"
39219
- }, title), /*#__PURE__*/React__default.createElement(Text$1, {
39220
- variant: "pS",
39221
- color: subtitleColor
39233
+ as: "h4",
39234
+ id: "obligation-title"
39235
+ }, title), /*#__PURE__*/React__default.createElement(Detail$1, {
39236
+ variant: "small",
39237
+ color: subtitleColor,
39238
+ as: "h5",
39239
+ id: "obligation-subtitle"
39222
39240
  }, subtitle)));
39223
39241
  };
39224
39242
 
@@ -39490,6 +39508,92 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
39490
39508
  }))));
39491
39509
  };
39492
39510
 
39511
+ var InactiveControlsModule = function InactiveControlsModule(_ref) {
39512
+ var autoPayEnabled = _ref.autoPayEnabled,
39513
+ autoPaySchedule = _ref.autoPaySchedule,
39514
+ navigateToSettings = _ref.navigateToSettings,
39515
+ deactivatePaymentSchedule = _ref.deactivatePaymentSchedule,
39516
+ isMobile = _ref.isMobile,
39517
+ paymentPlanSchedule = _ref.paymentPlanSchedule,
39518
+ isPaymentPlan = _ref.isPaymentPlan,
39519
+ nextAutopayDate = _ref.nextAutopayDate,
39520
+ obligationAssocID = _ref.obligationAssocID,
39521
+ actions = _ref.actions;
39522
+
39523
+ var _useState = React.useState(false),
39524
+ _useState2 = _slicedToArray(_useState, 2),
39525
+ modalOpen = _useState2[0],
39526
+ toggleModal = _useState2[1];
39527
+
39528
+ var removeAccount = actions.removeAccount;
39529
+
39530
+ var handleRemoveAccount = function handleRemoveAccount() {
39531
+ return removeAccount(obligationAssocID);
39532
+ };
39533
+
39534
+ return /*#__PURE__*/React__default.createElement(Box, {
39535
+ padding: isMobile ? "18px 0 0 0" : "0",
39536
+ border: isMobile ? "1px solid ".concat(GHOST_GREY) : "0px",
39537
+ borderWidthOverride: isMobile ? "1px 0 0 0" : "0px"
39538
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
39539
+ childGap: isMobile ? "8px" : "18px"
39540
+ }, autoPayEnabled && /*#__PURE__*/React__default.createElement(Box, {
39541
+ padding: "0",
39542
+ extraStyles: "flex-grow: 1;"
39543
+ }, /*#__PURE__*/React__default.createElement(AutopayModalModule, {
39544
+ autoPayActive: autoPayEnabled,
39545
+ autoPaySchedule: autoPaySchedule,
39546
+ toggleModal: toggleModal,
39547
+ modalOpen: modalOpen,
39548
+ navigateToSettings: navigateToSettings,
39549
+ deactivatePaymentSchedule: deactivatePaymentSchedule,
39550
+ buttonLinkType: true,
39551
+ isMobile: isMobile,
39552
+ paymentPlanSchedule: paymentPlanSchedule,
39553
+ isPaymentPlan: isPaymentPlan,
39554
+ nextAutopayDate: nextAutopayDate,
39555
+ obligationAssocID: obligationAssocID
39556
+ })), /*#__PURE__*/React__default.createElement(Box, {
39557
+ padding: "0",
39558
+ extraStyles: "flex-grow: 1;"
39559
+ }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
39560
+ variant: "tertiary",
39561
+ text: "Remove",
39562
+ action: handleRemoveAccount,
39563
+ dataQa: "Remove Account",
39564
+ extraStyles: isMobile && "flex-grow: 1; width: 100%;"
39565
+ }))));
39566
+ };
39567
+
39568
+ var InactiveTitleModule = function InactiveTitleModule(_ref) {
39569
+ var title = _ref.title,
39570
+ subtitle = _ref.subtitle,
39571
+ autoPayEnabled = _ref.autoPayEnabled;
39572
+ return /*#__PURE__*/React__default.createElement(Box, {
39573
+ padding: "0"
39574
+ }, /*#__PURE__*/React__default.createElement(Stack, {
39575
+ childGap: "0"
39576
+ }, /*#__PURE__*/React__default.createElement(Title$1, {
39577
+ variant: "small",
39578
+ as: "h4",
39579
+ color: CHARADE_GREY,
39580
+ weight: FONT_WEIGHT_SEMIBOLD
39581
+ }, title), /*#__PURE__*/React__default.createElement(Detail$1, {
39582
+ variant: "small",
39583
+ as: "h5",
39584
+ color: CHARADE_GREY
39585
+ }, subtitle), /*#__PURE__*/React__default.createElement(Detail$1, {
39586
+ variant: "small",
39587
+ as: "p",
39588
+ color: ZEST_ORANGE,
39589
+ weight: FONT_WEIGHT_SEMIBOLD
39590
+ }, "Unable to load account details"), /*#__PURE__*/React__default.createElement(Detail$1, {
39591
+ variant: "extraSmall",
39592
+ as: "p",
39593
+ color: BLACK
39594
+ }, "This may mean that the account has been paid off or there was an error loading it. If you have questions about this account, please contact us.".concat(autoPayEnabled ? " You may disable Autopay for this account by pressing the Turn off Autopay button." : ""))));
39595
+ };
39596
+
39493
39597
  var Obligation = function Obligation(_ref) {
39494
39598
  var config = _ref.config,
39495
39599
  obligations = _ref.obligations,
@@ -39503,13 +39607,25 @@ var Obligation = function Obligation(_ref) {
39503
39607
  navigateToSettings = _ref.navigateToSettings,
39504
39608
  isMobile = _ref.isMobile,
39505
39609
  isPaymentPlan = _ref.isPaymentPlan,
39506
- nextAutopayDate = _ref.nextAutopayDate;
39610
+ nextAutopayDate = _ref.nextAutopayDate,
39611
+ obligationAssocID = _ref.obligationAssocID,
39612
+ _ref$isActive = _ref.isActive,
39613
+ isActive = _ref$isActive === void 0 ? true : _ref$isActive,
39614
+ _ref$inactiveLookupTi = _ref.inactiveLookupTitle,
39615
+ inactiveLookupTitle = _ref$inactiveLookupTi === void 0 ? "" : _ref$inactiveLookupTi,
39616
+ _ref$inactiveLookupIn = _ref.inactiveLookupInput,
39617
+ inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
39618
+ _ref$inactiveLookupVa = _ref.inactiveLookupValue,
39619
+ inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa;
39507
39620
  var obligation = obligations[0];
39508
39621
  var customAttributes = obligation.customAttributes;
39509
- return /*#__PURE__*/React__default.createElement(Box, {
39622
+ var boxShadowValue = "0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
39623
+ var activeObligation = /*#__PURE__*/React__default.createElement(Box, {
39510
39624
  padding: "0",
39511
39625
  borderRadius: "4px",
39512
- boxShadow: "0px 0px 5px 0px ".concat(GHOST_GREY)
39626
+ boxShadow: boxShadowValue,
39627
+ as: "section",
39628
+ "aria-label": "".concat(obligation.description, " ").concat(obligation.subDescription)
39513
39629
  }, /*#__PURE__*/React__default.createElement(Box, {
39514
39630
  background: WHITE
39515
39631
  }, /*#__PURE__*/React__default.createElement(Stack, {
@@ -39580,6 +39696,66 @@ var Obligation = function Obligation(_ref) {
39580
39696
  isPaymentPlan: isPaymentPlan,
39581
39697
  nextAutopayDate: nextAutopayDate
39582
39698
  }));
39699
+ var inactiveObligation = /*#__PURE__*/React__default.createElement(Box, {
39700
+ padding: "0",
39701
+ borderRadius: "4px",
39702
+ boxShadow: boxShadowValue,
39703
+ as: "section",
39704
+ "aria-label": "".concat(inactiveLookupTitle, " ").concat(inactiveLookupInput, ": ").concat(inactiveLookupValue)
39705
+ }, /*#__PURE__*/React__default.createElement(Box, {
39706
+ background: ATHENS_GREY
39707
+ }, /*#__PURE__*/React__default.createElement(Stack, {
39708
+ childGap: "14px"
39709
+ }, /*#__PURE__*/React__default.createElement(Box, {
39710
+ key: "".concat(obligations[0].id, "-top"),
39711
+ padding: "0 8px",
39712
+ minWidth: "100%"
39713
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
39714
+ justify: "space-between",
39715
+ align: "center",
39716
+ childGap: "4px",
39717
+ nowrap: true
39718
+ }, /*#__PURE__*/React__default.createElement(Box, {
39719
+ padding: "0"
39720
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
39721
+ justify: "flex-start",
39722
+ align: "center"
39723
+ }, /*#__PURE__*/React__default.createElement(IconsModule, {
39724
+ icon: config.icon,
39725
+ iconDefault: config.iconDefault,
39726
+ configIconMap: config.iconMap,
39727
+ iconValue: config.iconValue,
39728
+ customAttributes: customAttributes
39729
+ }), /*#__PURE__*/React__default.createElement(InactiveTitleModule, {
39730
+ title: inactiveLookupTitle,
39731
+ subtitle: "".concat(inactiveLookupInput, ": ").concat(inactiveLookupValue),
39732
+ titleColor: BRIGHT_GREY,
39733
+ autoPayEnabled: autoPayEnabled,
39734
+ isMobile: isMobile
39735
+ }))), !isMobile && /*#__PURE__*/React__default.createElement(InactiveControlsModule, {
39736
+ obligations: obligations,
39737
+ autoPayEnabled: autoPayEnabled,
39738
+ deactivatePaymentSchedule: deactivatePaymentSchedule,
39739
+ autoPaySchedule: autoPaySchedule,
39740
+ paymentPlanSchedule: paymentPlanSchedule,
39741
+ config: config,
39742
+ actions: actions,
39743
+ isMobile: isMobile,
39744
+ nextAutopayDate: nextAutopayDate,
39745
+ obligationAssocID: obligationAssocID
39746
+ }))), isMobile && /*#__PURE__*/React__default.createElement(InactiveControlsModule, {
39747
+ obligations: obligations,
39748
+ autoPayEnabled: autoPayEnabled,
39749
+ deactivatePaymentSchedule: deactivatePaymentSchedule,
39750
+ autoPaySchedule: autoPaySchedule,
39751
+ paymentPlanSchedule: paymentPlanSchedule,
39752
+ config: config,
39753
+ actions: actions,
39754
+ isMobile: isMobile,
39755
+ nextAutopayDate: nextAutopayDate,
39756
+ obligationAssocID: obligationAssocID
39757
+ }))));
39758
+ return isActive ? activeObligation : inactiveObligation;
39583
39759
  };
39584
39760
 
39585
39761
  var PartialAmountForm = function PartialAmountForm(_ref) {
@@ -40072,10 +40248,10 @@ var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallback
40072
40248
  var linkColor$4 = {
40073
40249
  "default": "#357fb8"
40074
40250
  };
40075
- var fontSize$b = {
40251
+ var fontSize$a = {
40076
40252
  "default": "1rem"
40077
40253
  };
40078
- var lineHeight$5 = {
40254
+ var lineHeight$4 = {
40079
40255
  "default": "1.5rem"
40080
40256
  };
40081
40257
  var fontWeight$7 = {
@@ -40086,8 +40262,8 @@ var modalLinkHoverFocus$1 = {
40086
40262
  };
40087
40263
  var fallbackValues$B = {
40088
40264
  linkColor: linkColor$4,
40089
- fontSize: fontSize$b,
40090
- lineHeight: lineHeight$5,
40265
+ fontSize: fontSize$a,
40266
+ lineHeight: lineHeight$4,
40091
40267
  fontWeight: fontWeight$7,
40092
40268
  modalLinkHoverFocus: modalLinkHoverFocus$1
40093
40269
  };
@@ -41231,11 +41407,11 @@ var border$3 = {
41231
41407
  "default": "#cdcdcd",
41232
41408
  footer: "#cdcdcd"
41233
41409
  };
41234
- var fontSize$c = {
41410
+ var fontSize$b = {
41235
41411
  "default": "1rem",
41236
41412
  footer: "0.875rem"
41237
41413
  };
41238
- var lineHeight$6 = {
41414
+ var lineHeight$5 = {
41239
41415
  "default": "1.5rem",
41240
41416
  footer: "1.25rem"
41241
41417
  };
@@ -41252,8 +41428,8 @@ var fallbackValues$F = {
41252
41428
  backgroundColor: backgroundColor$9,
41253
41429
  linkColor: linkColor$5,
41254
41430
  border: border$3,
41255
- fontSize: fontSize$c,
41256
- lineHeight: lineHeight$6,
41431
+ fontSize: fontSize$b,
41432
+ lineHeight: lineHeight$5,
41257
41433
  fontWeight: fontWeight$8,
41258
41434
  modalLinkHoverFocus: modalLinkHoverFocus$2
41259
41435
  };