@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.esm.js CHANGED
@@ -4620,14 +4620,21 @@ var fontFamily = {
4620
4620
  }; // Text uses the same variants as paragraph
4621
4621
  // Use a Paragraph if you want a block level element
4622
4622
  // Use a Text if you want an inline element
4623
+ // Comments assume base font size of 16px
4623
4624
 
4624
4625
  var fontSize = {
4625
4626
  p: "1rem",
4627
+ // 16px
4626
4628
  pL: "1.125rem",
4629
+ // 18px
4627
4630
  pS: "0.875rem",
4631
+ // 14px
4628
4632
  pXS: "0.75rem",
4633
+ // 12px
4629
4634
  pXXS: "0.65rem",
4630
- pXL: "1.5rem"
4635
+ // 10px
4636
+ pXL: "1.5rem" // 24px
4637
+
4631
4638
  };
4632
4639
  var fallbackValues = {
4633
4640
  fontFamily: fontFamily,
@@ -15840,10 +15847,10 @@ var Alert = function Alert(_ref) {
15840
15847
 
15841
15848
  var Alert$1 = themeComponent(Alert, "Alert", fallbackValues$4, "info");
15842
15849
 
15843
- var HeadingText = styled.h1.withConfig({
15844
- displayName: "Headingstyled__HeadingText",
15845
- componentId: "sc-1a3jd28-0"
15846
- })(["--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) {
15850
+ var TitleText = styled.h1.withConfig({
15851
+ displayName: "Titlestyled__TitleText",
15852
+ componentId: "sc-11lhluq-0"
15853
+ })(["font-size:", ";line-height:1.5;color:", ";font-weight:", ";margin:", ";text-align:", ";font-family:", ";", ";"], function (_ref) {
15847
15854
  var fontSize = _ref.fontSize;
15848
15855
  return fontSize;
15849
15856
  }, function (_ref2) {
@@ -15866,26 +15873,63 @@ var HeadingText = styled.h1.withConfig({
15866
15873
  return extraStyles;
15867
15874
  });
15868
15875
 
15876
+ // Comments assume desktop base font size of 16px, mobile base font size of 14px
15877
+ var fontSize$1 = {
15878
+ large: "1.5rem",
15879
+ // 24px (at base font size of 16px)
15880
+ small: "1.25rem" // 20px
15881
+
15882
+ };
15869
15883
  var fontFamily$1 = {
15870
- primary: "Public Sans",
15871
- secondary: "Open Sans"
15884
+ large: "Public Sans",
15885
+ small: "Public Sans"
15872
15886
  };
15873
- var fontSize$1 = {
15874
- h1: "2.25rem",
15875
- h2: "2rem",
15876
- h3: "1.75rem",
15877
- h4: "1.5rem",
15878
- h5: "1.375rem",
15879
- h6: "1.25rem"
15887
+ var mobileFontSize = {
15888
+ large: "1.5rem",
15889
+ // 21px (at base font size of 14px)
15890
+ small: "1.2142rem" // 17px
15891
+
15880
15892
  };
15881
15893
  var fallbackValues$5 = {
15882
15894
  fontFamily: fontFamily$1,
15883
15895
  fontSize: fontSize$1
15884
15896
  };
15897
+ var mobileFallbackValues = {
15898
+ fontFamily: fontFamily$1,
15899
+ fontSize: mobileFontSize
15900
+ };
15901
+ var MOBILE_BREAKPOINT = 768;
15885
15902
 
15886
15903
  var _excluded$i = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
15904
+ /*
15905
+ New responsive text component for Title elements
15906
+ Size is decoupled from tag
15907
+ Comes with two variants - "large" and "small"
15908
+ Large variant results in text that is 1.5rem (24px desktop, 21px mobile)
15909
+ Small variant results in text that is 1.25rem/1.2142rem (20px desktop, 17px mobile)
15910
+
15911
+ If you need a smaller text size, use the <Detail /> atom, which has smaller variants
15912
+
15913
+ Use the "as" prop to specify element type, can use any of: h1/h2/h3/h4/h5/h6/p
15914
+ If you need an inline text element (span), use the <Text /> atom
15915
+ The "as" value should be dictated by the structure of your page, not what font-size you want
15887
15916
 
15888
- var Heading = function Heading(_ref) {
15917
+ Title / Detail both use slightly different desktop/mobile scales
15918
+ (Mobile scale is different to allow for design-friendly px values)
15919
+ Both atoms detect the presence of a mobile device on their own
15920
+ and apply the corresponding scale
15921
+
15922
+ Mobile breakpoint value is specified in Title.theme.js
15923
+
15924
+ 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
15925
+ */
15926
+
15927
+ var isBelowBreakpoint = window.innerWidth < MOBILE_BREAKPOINT;
15928
+ var isTouchDevice$1 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
15929
+ var mobileDeviceDetected = isBelowBreakpoint && isTouchDevice$1;
15930
+ var fallbacks = mobileDeviceDetected ? mobileFallbackValues : fallbackValues$5;
15931
+
15932
+ var Title = function Title(_ref) {
15889
15933
  var themeValues = _ref.themeValues,
15890
15934
  _ref$weight = _ref.weight,
15891
15935
  weight = _ref$weight === void 0 ? FONT_WEIGHT_REGULAR : _ref$weight,
@@ -15898,14 +15942,14 @@ var Heading = function Heading(_ref) {
15898
15942
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
15899
15943
  className = _ref.className,
15900
15944
  _ref$variant = _ref.variant,
15901
- variant = _ref$variant === void 0 ? "h1" : _ref$variant,
15945
+ variant = _ref$variant === void 0 ? "large" : _ref$variant,
15902
15946
  _ref$as = _ref.as,
15903
- as = _ref$as === void 0 ? variant : _ref$as,
15947
+ as = _ref$as === void 0 ? "h1" : _ref$as,
15904
15948
  dataQa = _ref.dataQa,
15905
15949
  children = _ref.children,
15906
15950
  rest = _objectWithoutProperties(_ref, _excluded$i);
15907
15951
 
15908
- return /*#__PURE__*/React.createElement(HeadingText, _extends({
15952
+ return /*#__PURE__*/React.createElement(TitleText, _extends({
15909
15953
  variant: variant,
15910
15954
  as: as,
15911
15955
  weight: weight,
@@ -15920,23 +15964,11 @@ var Heading = function Heading(_ref) {
15920
15964
  }, rest), safeChildren(children, /*#__PURE__*/React.createElement("span", null)));
15921
15965
  };
15922
15966
 
15923
- var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$5, "h1");
15967
+ var Title$1 = themeComponent(Title, "Title", fallbacks, "large");
15924
15968
 
15925
- var fontSize$2 = {
15926
- large: "1.5rem",
15927
- medium: "1.25rem",
15928
- small: "1.094rem"
15929
- };
15930
15969
  var color$3 = "#15749D";
15931
- var lineHeight = {
15932
- large: "2rem",
15933
- medium: "1.875rem",
15934
- small: "1.641rem"
15935
- };
15936
15970
  var fallbackValues$6 = {
15937
- fontSize: fontSize$2,
15938
- color: color$3,
15939
- lineHeight: lineHeight
15971
+ color: color$3
15940
15972
  };
15941
15973
 
15942
15974
  var AmountCallout = function AmountCallout(_ref) {
@@ -15946,16 +15978,15 @@ var AmountCallout = function AmountCallout(_ref) {
15946
15978
  return /*#__PURE__*/React.createElement(Box, {
15947
15979
  padding: "0",
15948
15980
  textAlign: textAlign
15949
- }, /*#__PURE__*/React.createElement(Heading$1, {
15950
- variant: "h6",
15981
+ }, /*#__PURE__*/React.createElement(Title$1, {
15982
+ variant: "small",
15951
15983
  weight: FONT_WEIGHT_SEMIBOLD,
15952
- fontSize: themeValues.fontSize,
15953
15984
  color: themeValues.color,
15954
- lineHeight: themeValues.lineHeight
15985
+ as: "p"
15955
15986
  }, amount));
15956
15987
  };
15957
15988
 
15958
- var AmountCallout$1 = themeComponent(AmountCallout, "AmountCallout", fallbackValues$6, "medium");
15989
+ var AmountCallout$1 = themeComponent(AmountCallout, "AmountCallout", fallbackValues$6);
15959
15990
 
15960
15991
  function _extends$1() {
15961
15992
  _extends$1 = Object.assign || function (target) {
@@ -16810,8 +16841,8 @@ var BoxWithShadow$1 = themeComponent(BoxWithShadow, "BoxWithShadow", fallbackVal
16810
16841
  var color$4 = "".concat(MATISSE_BLUE);
16811
16842
  var activeColor$2 = "".concat(STORM_GREY);
16812
16843
  var activeBreadcrumbColor = "".concat(STORM_GREY);
16813
- var fontSize$3 = "0.875rem";
16814
- var lineHeight$1 = "1.25rem";
16844
+ var fontSize$2 = "0.875rem";
16845
+ var lineHeight = "1.25rem";
16815
16846
  var fontWeight$1 = "400";
16816
16847
  var margin = "0.5rem";
16817
16848
  var hover = "text-decoration: none;";
@@ -16819,8 +16850,8 @@ var fallbackValues$8 = {
16819
16850
  color: color$4,
16820
16851
  activeColor: activeColor$2,
16821
16852
  activeBreadcrumbColor: activeBreadcrumbColor,
16822
- fontSize: fontSize$3,
16823
- lineHeight: lineHeight$1,
16853
+ fontSize: fontSize$2,
16854
+ lineHeight: lineHeight,
16824
16855
  fontWeight: fontWeight$1,
16825
16856
  margin: margin,
16826
16857
  hover: hover
@@ -18671,18 +18702,25 @@ var fontFamily$3 = {
18671
18702
  pXS: "Public Sans",
18672
18703
  pXXS: "Public Sans",
18673
18704
  pXL: "Public Sans"
18674
- };
18675
- var fontSize$4 = {
18705
+ }; // Comments assume base font size of 16px
18706
+
18707
+ var fontSize$3 = {
18676
18708
  p: "1rem",
18709
+ // 16px
18677
18710
  pL: "1.125rem",
18711
+ // 18px
18678
18712
  pS: "0.875rem",
18713
+ // 14px
18679
18714
  pXS: "0.75rem",
18715
+ // 12px
18680
18716
  pXXS: "0.65rem",
18681
- pXL: "1.5rem"
18717
+ // 10px
18718
+ pXL: "1.5rem" // 24px
18719
+
18682
18720
  };
18683
18721
  var fallbackValues$a = {
18684
18722
  fontFamily: fontFamily$3,
18685
- fontSize: fontSize$4
18723
+ fontSize: fontSize$3
18686
18724
  };
18687
18725
 
18688
18726
  var ParagraphText = styled.p.withConfig({
@@ -19655,11 +19693,11 @@ var borderColor = {
19655
19693
  "default": "".concat(GREY_CHATEAU),
19656
19694
  disabled: "".concat(GREY_CHATEAU)
19657
19695
  };
19658
- var lineHeight$2 = {
19696
+ var lineHeight$1 = {
19659
19697
  "default": "1rem",
19660
19698
  disabled: "1rem"
19661
19699
  };
19662
- var fontSize$5 = {
19700
+ var fontSize$4 = {
19663
19701
  "default": "0.875rem",
19664
19702
  disabled: "0.875rem"
19665
19703
  };
@@ -19682,8 +19720,8 @@ var fallbackValues$f = {
19682
19720
  color: color$5,
19683
19721
  labelColor: labelColor,
19684
19722
  borderColor: borderColor,
19685
- lineHeight: lineHeight$2,
19686
- fontSize: fontSize$5,
19723
+ lineHeight: lineHeight$1,
19724
+ fontSize: fontSize$4,
19687
19725
  errorFontSize: errorFontSize,
19688
19726
  fontWeight: fontWeight$2,
19689
19727
  hoverFocusStyles: hoverFocusStyles
@@ -20560,11 +20598,16 @@ var DetailText = styled.p.withConfig({
20560
20598
  return extraStyles;
20561
20599
  });
20562
20600
 
20563
- var fontSize$6 = {
20601
+ // Comments assume desktop base font size of 16px, mobile base font size of 14px
20602
+ var fontSize$5 = {
20564
20603
  large: "1.125rem",
20604
+ // 18px (at base font size of 16)
20565
20605
  regular: "1rem",
20606
+ // 16px
20566
20607
  small: "0.875rem",
20567
- extraSmall: "0.75rem"
20608
+ // 14px
20609
+ extraSmall: "0.75rem" // 12px
20610
+
20568
20611
  };
20569
20612
  var fontFamily$4 = {
20570
20613
  large: "Public Sans",
@@ -20572,21 +20615,25 @@ var fontFamily$4 = {
20572
20615
  small: "Public Sans",
20573
20616
  extraSmall: "Public Sans"
20574
20617
  };
20575
- var mobileFontSize = {
20618
+ var mobileFontSize$1 = {
20576
20619
  large: "1.14285rem",
20620
+ // 16px (at base font size of 14)
20577
20621
  regular: "1",
20622
+ // 14px
20578
20623
  small: "0.85714rem",
20579
- extraSmall: "0.71428rem"
20624
+ // 12px
20625
+ extraSmall: "0.71428rem" // 10px
20626
+
20580
20627
  };
20581
20628
  var fallbackValues$g = {
20582
20629
  fontFamily: fontFamily$4,
20583
- fontSize: fontSize$6
20630
+ fontSize: fontSize$5
20584
20631
  };
20585
- var mobileFallbackValues = {
20632
+ var mobileFallbackValues$1 = {
20586
20633
  fontFamily: fontFamily$4,
20587
- fontSize: mobileFontSize
20634
+ fontSize: mobileFontSize$1
20588
20635
  };
20589
- var MOBILE_BREAKPOINT = 768;
20636
+ var MOBILE_BREAKPOINT$1 = 768;
20590
20637
 
20591
20638
  var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
20592
20639
  /*
@@ -20615,10 +20662,10 @@ var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "ext
20615
20662
  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
20616
20663
  */
20617
20664
 
20618
- var isBelowBreakpoint = window.innerWidth < MOBILE_BREAKPOINT;
20619
- var isTouchDevice$1 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
20620
- var mobileDeviceDetected = isBelowBreakpoint && isTouchDevice$1;
20621
- var fallbacks = mobileDeviceDetected ? mobileFallbackValues : fallbackValues$g;
20665
+ var isBelowBreakpoint$1 = window.innerWidth < MOBILE_BREAKPOINT$1;
20666
+ var isTouchDevice$2 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
20667
+ var mobileDeviceDetected$1 = isBelowBreakpoint$1 && isTouchDevice$2;
20668
+ var fallbacks$1 = mobileDeviceDetected$1 ? mobileFallbackValues$1 : fallbackValues$g;
20622
20669
 
20623
20670
  var Detail = function Detail(_ref) {
20624
20671
  var themeValues = _ref.themeValues,
@@ -20655,7 +20702,7 @@ var Detail = function Detail(_ref) {
20655
20702
  }, rest), safeChildren(children, /*#__PURE__*/React.createElement("span", null)));
20656
20703
  };
20657
20704
 
20658
- var Detail$1 = themeComponent(Detail, "Detail", fallbacks, "regular");
20705
+ var Detail$1 = themeComponent(Detail, "Detail", fallbacks$1, "regular");
20659
20706
 
20660
20707
  var backgroundColor$3 = WHITE;
20661
20708
  var boxShadow = "0px 2px 14px 0px ".concat(ATHENS_GREY, ", 0px 3px 8px 0px ").concat(GHOST_GREY);
@@ -21033,11 +21080,11 @@ var borderColor$1 = {
21033
21080
  "default": "".concat(GREY_CHATEAU),
21034
21081
  disabled: "".concat(GREY_CHATEAU)
21035
21082
  };
21036
- var lineHeight$3 = {
21083
+ var lineHeight$2 = {
21037
21084
  "default": "1rem",
21038
21085
  disabled: "1rem"
21039
21086
  };
21040
- var fontSize$7 = {
21087
+ var fontSize$6 = {
21041
21088
  "default": "0.875rem",
21042
21089
  disabled: "0.875rem"
21043
21090
  };
@@ -21063,8 +21110,8 @@ var fallbackValues$i = {
21063
21110
  color: color$6,
21064
21111
  labelColor: labelColor$1,
21065
21112
  borderColor: borderColor$1,
21066
- lineHeight: lineHeight$3,
21067
- fontSize: fontSize$7,
21113
+ lineHeight: lineHeight$2,
21114
+ fontSize: fontSize$6,
21068
21115
  errorFontSize: errorFontSize$1,
21069
21116
  fontWeight: fontWeight$3,
21070
21117
  hoverFocusStyles: hoverFocusStyles$1,
@@ -21343,7 +21390,7 @@ var FormFooterPanel = function FormFooterPanel(_ref) {
21343
21390
 
21344
21391
  var FormFooterPanel$1 = themeComponent(withWindowSize(FormFooterPanel), "FormFooterPanel", fallbackValues$i, "default");
21345
21392
 
21346
- var fontSize$8 = {
21393
+ var fontSize$7 = {
21347
21394
  "default": "1rem",
21348
21395
  radio: "1.0625rem"
21349
21396
  };
@@ -21356,7 +21403,7 @@ var color$7 = {
21356
21403
  radio: "".concat(MINESHAFT_GREY)
21357
21404
  };
21358
21405
  var fallbackValues$j = {
21359
- fontSize: fontSize$8,
21406
+ fontSize: fontSize$7,
21360
21407
  padding: padding$1,
21361
21408
  color: color$7
21362
21409
  };
@@ -21512,10 +21559,10 @@ var HamburgerButton = function HamburgerButton(_ref4) {
21512
21559
  })));
21513
21560
  };
21514
21561
 
21515
- var TitleText = styled.h1.withConfig({
21516
- displayName: "Titlestyled__TitleText",
21517
- componentId: "sc-11lhluq-0"
21518
- })(["font-size:", ";line-height:1.5;color:", ";font-weight:", ";margin:", ";text-align:", ";font-family:", ";", ";"], function (_ref) {
21562
+ var HeadingText = styled.h1.withConfig({
21563
+ displayName: "Headingstyled__HeadingText",
21564
+ componentId: "sc-1a3jd28-0"
21565
+ })(["--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) {
21519
21566
  var fontSize = _ref.fontSize;
21520
21567
  return fontSize;
21521
21568
  }, function (_ref2) {
@@ -21538,58 +21585,26 @@ var TitleText = styled.h1.withConfig({
21538
21585
  return extraStyles;
21539
21586
  });
21540
21587
 
21541
- var fontSize$9 = {
21542
- large: "1.5rem",
21543
- small: "1.25rem"
21544
- };
21545
21588
  var fontFamily$5 = {
21546
- large: "Public Sans",
21547
- small: "Public Sans"
21589
+ primary: "Public Sans",
21590
+ secondary: "Open Sans"
21548
21591
  };
21549
- var mobileFontSize$1 = {
21550
- large: "1.5rem",
21551
- small: "1.2142rem"
21592
+ var fontSize$8 = {
21593
+ h1: "2.25rem",
21594
+ h2: "2rem",
21595
+ h3: "1.75rem",
21596
+ h4: "1.5rem",
21597
+ h5: "1.375rem",
21598
+ h6: "1.25rem"
21552
21599
  };
21553
21600
  var fallbackValues$l = {
21554
21601
  fontFamily: fontFamily$5,
21555
- fontSize: fontSize$9
21556
- };
21557
- var mobileFallbackValues$1 = {
21558
- fontFamily: fontFamily$5,
21559
- fontSize: mobileFontSize$1
21602
+ fontSize: fontSize$8
21560
21603
  };
21561
- var MOBILE_BREAKPOINT$1 = 768;
21562
21604
 
21563
21605
  var _excluded$t = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
21564
- /*
21565
- New responsive text component for Title elements
21566
- Size is decoupled from tag
21567
- Comes with two variants - "large" and "small"
21568
- Large variant results in text that is 1.5rem (24px desktop, 21px mobile)
21569
- Small variant results in text that is 1.25rem/1.2142rem (20px desktop, 17px mobile)
21570
-
21571
- If you need a smaller text size, use the <Detail /> atom, which has smaller variants
21572
-
21573
- Use the "as" prop to specify element type, can use any of: h1/h2/h3/h4/h5/h6/p
21574
- If you need an inline text element (span), use the <Text /> atom
21575
- The "as" value should be dictated by the structure of your page, not what font-size you want
21576
-
21577
- Title / Detail both use slightly different desktop/mobile scales
21578
- (Mobile scale is different to allow for design-friendly px values)
21579
- Both atoms detect the presence of a mobile device on their own
21580
- and apply the corresponding scale
21581
21606
 
21582
- Mobile breakpoint value is specified in Title.theme.js
21583
-
21584
- 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
21585
- */
21586
-
21587
- var isBelowBreakpoint$1 = window.innerWidth < MOBILE_BREAKPOINT$1;
21588
- var isTouchDevice$2 = "ontouchstart" in window || navigator.maxTouchPoints > 1;
21589
- var mobileDeviceDetected$1 = isBelowBreakpoint$1 && isTouchDevice$2;
21590
- var fallbacks$1 = mobileDeviceDetected$1 ? mobileFallbackValues$1 : fallbackValues$l;
21591
-
21592
- var Title = function Title(_ref) {
21607
+ var Heading = function Heading(_ref) {
21593
21608
  var themeValues = _ref.themeValues,
21594
21609
  _ref$weight = _ref.weight,
21595
21610
  weight = _ref$weight === void 0 ? FONT_WEIGHT_REGULAR : _ref$weight,
@@ -21602,14 +21617,14 @@ var Title = function Title(_ref) {
21602
21617
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
21603
21618
  className = _ref.className,
21604
21619
  _ref$variant = _ref.variant,
21605
- variant = _ref$variant === void 0 ? "large" : _ref$variant,
21620
+ variant = _ref$variant === void 0 ? "h1" : _ref$variant,
21606
21621
  _ref$as = _ref.as,
21607
- as = _ref$as === void 0 ? "h1" : _ref$as,
21622
+ as = _ref$as === void 0 ? variant : _ref$as,
21608
21623
  dataQa = _ref.dataQa,
21609
21624
  children = _ref.children,
21610
21625
  rest = _objectWithoutProperties(_ref, _excluded$t);
21611
21626
 
21612
- return /*#__PURE__*/React.createElement(TitleText, _extends({
21627
+ return /*#__PURE__*/React.createElement(HeadingText, _extends({
21613
21628
  variant: variant,
21614
21629
  as: as,
21615
21630
  weight: weight,
@@ -21624,7 +21639,7 @@ var Title = function Title(_ref) {
21624
21639
  }, rest), safeChildren(children, /*#__PURE__*/React.createElement("span", null)));
21625
21640
  };
21626
21641
 
21627
- var Title$1 = themeComponent(Title, "Title", fallbacks$1, "large");
21642
+ var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$l, "h1");
21628
21643
 
21629
21644
  var Jumbo = function Jumbo(_ref) {
21630
21645
  var showButton = _ref.showButton,
@@ -38950,7 +38965,7 @@ var Modal$1 = function Modal(_ref) {
38950
38965
  })))))))), children);
38951
38966
  };
38952
38967
 
38953
- var fontSize$a = {
38968
+ var fontSize$9 = {
38954
38969
  "default": "1.375rem",
38955
38970
  largeTitle: "1.75rem",
38956
38971
  small: "1.25rem"
@@ -38965,7 +38980,7 @@ var fontColor = {
38965
38980
  largeTitle: CHARADE_GREY,
38966
38981
  small: CHARADE_GREY
38967
38982
  };
38968
- var lineHeight$4 = {
38983
+ var lineHeight$3 = {
38969
38984
  "default": "2rem",
38970
38985
  largeTitle: "2rem",
38971
38986
  small: "2rem"
@@ -39001,10 +39016,10 @@ var backgroundColor$6 = {
39001
39016
  small: WHITE
39002
39017
  };
39003
39018
  var fallbackValues$x = {
39004
- fontSize: fontSize$a,
39019
+ fontSize: fontSize$9,
39005
39020
  fontWeight: fontWeight$5,
39006
39021
  fontColor: fontColor,
39007
- lineHeight: lineHeight$4,
39022
+ lineHeight: lineHeight$3,
39008
39023
  textAlign: textAlign,
39009
39024
  titleType: titleType,
39010
39025
  titleSpacing: titleSpacing,
@@ -39203,14 +39218,17 @@ var TitleModule = function TitleModule(_ref) {
39203
39218
  padding: "0"
39204
39219
  }, /*#__PURE__*/React.createElement(Stack, {
39205
39220
  childGap: "0"
39206
- }, /*#__PURE__*/React.createElement(Heading$1, {
39207
- variant: "h6",
39221
+ }, /*#__PURE__*/React.createElement(Title$1, {
39222
+ variant: "small",
39208
39223
  weight: FONT_WEIGHT_SEMIBOLD,
39209
39224
  color: titleColor,
39210
- as: "h2"
39211
- }, title), /*#__PURE__*/React.createElement(Text$1, {
39212
- variant: "pS",
39213
- color: subtitleColor
39225
+ as: "h4",
39226
+ id: "obligation-title"
39227
+ }, title), /*#__PURE__*/React.createElement(Detail$1, {
39228
+ variant: "small",
39229
+ color: subtitleColor,
39230
+ as: "h5",
39231
+ id: "obligation-subtitle"
39214
39232
  }, subtitle)));
39215
39233
  };
39216
39234
 
@@ -39482,6 +39500,92 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
39482
39500
  }))));
39483
39501
  };
39484
39502
 
39503
+ var InactiveControlsModule = function InactiveControlsModule(_ref) {
39504
+ var autoPayEnabled = _ref.autoPayEnabled,
39505
+ autoPaySchedule = _ref.autoPaySchedule,
39506
+ navigateToSettings = _ref.navigateToSettings,
39507
+ deactivatePaymentSchedule = _ref.deactivatePaymentSchedule,
39508
+ isMobile = _ref.isMobile,
39509
+ paymentPlanSchedule = _ref.paymentPlanSchedule,
39510
+ isPaymentPlan = _ref.isPaymentPlan,
39511
+ nextAutopayDate = _ref.nextAutopayDate,
39512
+ obligationAssocID = _ref.obligationAssocID,
39513
+ actions = _ref.actions;
39514
+
39515
+ var _useState = useState(false),
39516
+ _useState2 = _slicedToArray(_useState, 2),
39517
+ modalOpen = _useState2[0],
39518
+ toggleModal = _useState2[1];
39519
+
39520
+ var removeAccount = actions.removeAccount;
39521
+
39522
+ var handleRemoveAccount = function handleRemoveAccount() {
39523
+ return removeAccount(obligationAssocID);
39524
+ };
39525
+
39526
+ return /*#__PURE__*/React.createElement(Box, {
39527
+ padding: isMobile ? "18px 0 0 0" : "0",
39528
+ border: isMobile ? "1px solid ".concat(GHOST_GREY) : "0px",
39529
+ borderWidthOverride: isMobile ? "1px 0 0 0" : "0px"
39530
+ }, /*#__PURE__*/React.createElement(Cluster, {
39531
+ childGap: isMobile ? "8px" : "18px"
39532
+ }, autoPayEnabled && /*#__PURE__*/React.createElement(Box, {
39533
+ padding: "0",
39534
+ extraStyles: "flex-grow: 1;"
39535
+ }, /*#__PURE__*/React.createElement(AutopayModalModule, {
39536
+ autoPayActive: autoPayEnabled,
39537
+ autoPaySchedule: autoPaySchedule,
39538
+ toggleModal: toggleModal,
39539
+ modalOpen: modalOpen,
39540
+ navigateToSettings: navigateToSettings,
39541
+ deactivatePaymentSchedule: deactivatePaymentSchedule,
39542
+ buttonLinkType: true,
39543
+ isMobile: isMobile,
39544
+ paymentPlanSchedule: paymentPlanSchedule,
39545
+ isPaymentPlan: isPaymentPlan,
39546
+ nextAutopayDate: nextAutopayDate,
39547
+ obligationAssocID: obligationAssocID
39548
+ })), /*#__PURE__*/React.createElement(Box, {
39549
+ padding: "0",
39550
+ extraStyles: "flex-grow: 1;"
39551
+ }, /*#__PURE__*/React.createElement(ButtonWithAction, {
39552
+ variant: "tertiary",
39553
+ text: "Remove",
39554
+ action: handleRemoveAccount,
39555
+ dataQa: "Remove Account",
39556
+ extraStyles: isMobile && "flex-grow: 1; width: 100%;"
39557
+ }))));
39558
+ };
39559
+
39560
+ var InactiveTitleModule = function InactiveTitleModule(_ref) {
39561
+ var title = _ref.title,
39562
+ subtitle = _ref.subtitle,
39563
+ autoPayEnabled = _ref.autoPayEnabled;
39564
+ return /*#__PURE__*/React.createElement(Box, {
39565
+ padding: "0"
39566
+ }, /*#__PURE__*/React.createElement(Stack, {
39567
+ childGap: "0"
39568
+ }, /*#__PURE__*/React.createElement(Title$1, {
39569
+ variant: "small",
39570
+ as: "h4",
39571
+ color: CHARADE_GREY,
39572
+ weight: FONT_WEIGHT_SEMIBOLD
39573
+ }, title), /*#__PURE__*/React.createElement(Detail$1, {
39574
+ variant: "small",
39575
+ as: "h5",
39576
+ color: CHARADE_GREY
39577
+ }, subtitle), /*#__PURE__*/React.createElement(Detail$1, {
39578
+ variant: "small",
39579
+ as: "p",
39580
+ color: ZEST_ORANGE,
39581
+ weight: FONT_WEIGHT_SEMIBOLD
39582
+ }, "Unable to load account details"), /*#__PURE__*/React.createElement(Detail$1, {
39583
+ variant: "extraSmall",
39584
+ as: "p",
39585
+ color: BLACK
39586
+ }, "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." : ""))));
39587
+ };
39588
+
39485
39589
  var Obligation = function Obligation(_ref) {
39486
39590
  var config = _ref.config,
39487
39591
  obligations = _ref.obligations,
@@ -39495,13 +39599,25 @@ var Obligation = function Obligation(_ref) {
39495
39599
  navigateToSettings = _ref.navigateToSettings,
39496
39600
  isMobile = _ref.isMobile,
39497
39601
  isPaymentPlan = _ref.isPaymentPlan,
39498
- nextAutopayDate = _ref.nextAutopayDate;
39602
+ nextAutopayDate = _ref.nextAutopayDate,
39603
+ obligationAssocID = _ref.obligationAssocID,
39604
+ _ref$isActive = _ref.isActive,
39605
+ isActive = _ref$isActive === void 0 ? true : _ref$isActive,
39606
+ _ref$inactiveLookupTi = _ref.inactiveLookupTitle,
39607
+ inactiveLookupTitle = _ref$inactiveLookupTi === void 0 ? "" : _ref$inactiveLookupTi,
39608
+ _ref$inactiveLookupIn = _ref.inactiveLookupInput,
39609
+ inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
39610
+ _ref$inactiveLookupVa = _ref.inactiveLookupValue,
39611
+ inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa;
39499
39612
  var obligation = obligations[0];
39500
39613
  var customAttributes = obligation.customAttributes;
39501
- return /*#__PURE__*/React.createElement(Box, {
39614
+ var boxShadowValue = "0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
39615
+ var activeObligation = /*#__PURE__*/React.createElement(Box, {
39502
39616
  padding: "0",
39503
39617
  borderRadius: "4px",
39504
- boxShadow: "0px 0px 5px 0px ".concat(GHOST_GREY)
39618
+ boxShadow: boxShadowValue,
39619
+ as: "section",
39620
+ "aria-label": "".concat(obligation.description, " ").concat(obligation.subDescription)
39505
39621
  }, /*#__PURE__*/React.createElement(Box, {
39506
39622
  background: WHITE
39507
39623
  }, /*#__PURE__*/React.createElement(Stack, {
@@ -39572,6 +39688,66 @@ var Obligation = function Obligation(_ref) {
39572
39688
  isPaymentPlan: isPaymentPlan,
39573
39689
  nextAutopayDate: nextAutopayDate
39574
39690
  }));
39691
+ var inactiveObligation = /*#__PURE__*/React.createElement(Box, {
39692
+ padding: "0",
39693
+ borderRadius: "4px",
39694
+ boxShadow: boxShadowValue,
39695
+ as: "section",
39696
+ "aria-label": "".concat(inactiveLookupTitle, " ").concat(inactiveLookupInput, ": ").concat(inactiveLookupValue)
39697
+ }, /*#__PURE__*/React.createElement(Box, {
39698
+ background: ATHENS_GREY
39699
+ }, /*#__PURE__*/React.createElement(Stack, {
39700
+ childGap: "14px"
39701
+ }, /*#__PURE__*/React.createElement(Box, {
39702
+ key: "".concat(obligations[0].id, "-top"),
39703
+ padding: "0 8px",
39704
+ minWidth: "100%"
39705
+ }, /*#__PURE__*/React.createElement(Cluster, {
39706
+ justify: "space-between",
39707
+ align: "center",
39708
+ childGap: "4px",
39709
+ nowrap: true
39710
+ }, /*#__PURE__*/React.createElement(Box, {
39711
+ padding: "0"
39712
+ }, /*#__PURE__*/React.createElement(Cluster, {
39713
+ justify: "flex-start",
39714
+ align: "center"
39715
+ }, /*#__PURE__*/React.createElement(IconsModule, {
39716
+ icon: config.icon,
39717
+ iconDefault: config.iconDefault,
39718
+ configIconMap: config.iconMap,
39719
+ iconValue: config.iconValue,
39720
+ customAttributes: customAttributes
39721
+ }), /*#__PURE__*/React.createElement(InactiveTitleModule, {
39722
+ title: inactiveLookupTitle,
39723
+ subtitle: "".concat(inactiveLookupInput, ": ").concat(inactiveLookupValue),
39724
+ titleColor: BRIGHT_GREY,
39725
+ autoPayEnabled: autoPayEnabled,
39726
+ isMobile: isMobile
39727
+ }))), !isMobile && /*#__PURE__*/React.createElement(InactiveControlsModule, {
39728
+ obligations: obligations,
39729
+ autoPayEnabled: autoPayEnabled,
39730
+ deactivatePaymentSchedule: deactivatePaymentSchedule,
39731
+ autoPaySchedule: autoPaySchedule,
39732
+ paymentPlanSchedule: paymentPlanSchedule,
39733
+ config: config,
39734
+ actions: actions,
39735
+ isMobile: isMobile,
39736
+ nextAutopayDate: nextAutopayDate,
39737
+ obligationAssocID: obligationAssocID
39738
+ }))), isMobile && /*#__PURE__*/React.createElement(InactiveControlsModule, {
39739
+ obligations: obligations,
39740
+ autoPayEnabled: autoPayEnabled,
39741
+ deactivatePaymentSchedule: deactivatePaymentSchedule,
39742
+ autoPaySchedule: autoPaySchedule,
39743
+ paymentPlanSchedule: paymentPlanSchedule,
39744
+ config: config,
39745
+ actions: actions,
39746
+ isMobile: isMobile,
39747
+ nextAutopayDate: nextAutopayDate,
39748
+ obligationAssocID: obligationAssocID
39749
+ }))));
39750
+ return isActive ? activeObligation : inactiveObligation;
39575
39751
  };
39576
39752
 
39577
39753
  var PartialAmountForm = function PartialAmountForm(_ref) {
@@ -40064,10 +40240,10 @@ var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallback
40064
40240
  var linkColor$4 = {
40065
40241
  "default": "#357fb8"
40066
40242
  };
40067
- var fontSize$b = {
40243
+ var fontSize$a = {
40068
40244
  "default": "1rem"
40069
40245
  };
40070
- var lineHeight$5 = {
40246
+ var lineHeight$4 = {
40071
40247
  "default": "1.5rem"
40072
40248
  };
40073
40249
  var fontWeight$7 = {
@@ -40078,8 +40254,8 @@ var modalLinkHoverFocus$1 = {
40078
40254
  };
40079
40255
  var fallbackValues$B = {
40080
40256
  linkColor: linkColor$4,
40081
- fontSize: fontSize$b,
40082
- lineHeight: lineHeight$5,
40257
+ fontSize: fontSize$a,
40258
+ lineHeight: lineHeight$4,
40083
40259
  fontWeight: fontWeight$7,
40084
40260
  modalLinkHoverFocus: modalLinkHoverFocus$1
40085
40261
  };
@@ -41223,11 +41399,11 @@ var border$3 = {
41223
41399
  "default": "#cdcdcd",
41224
41400
  footer: "#cdcdcd"
41225
41401
  };
41226
- var fontSize$c = {
41402
+ var fontSize$b = {
41227
41403
  "default": "1rem",
41228
41404
  footer: "0.875rem"
41229
41405
  };
41230
- var lineHeight$6 = {
41406
+ var lineHeight$5 = {
41231
41407
  "default": "1.5rem",
41232
41408
  footer: "1.25rem"
41233
41409
  };
@@ -41244,8 +41420,8 @@ var fallbackValues$F = {
41244
41420
  backgroundColor: backgroundColor$9,
41245
41421
  linkColor: linkColor$5,
41246
41422
  border: border$3,
41247
- fontSize: fontSize$c,
41248
- lineHeight: lineHeight$6,
41423
+ fontSize: fontSize$b,
41424
+ lineHeight: lineHeight$5,
41249
41425
  fontWeight: fontWeight$8,
41250
41426
  modalLinkHoverFocus: modalLinkHoverFocus$2
41251
41427
  };