@thecb/components 6.3.1-beta.2 → 6.3.1-beta.5

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.
Files changed (28) hide show
  1. package/README.md +39 -0
  2. package/dist/index.cjs.js +587 -414
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +51 -24
  5. package/dist/index.esm.js +585 -411
  6. package/dist/index.esm.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/atoms/card/Card.js +60 -21
  9. package/src/components/atoms/card/Card.theme.js +9 -2
  10. package/src/components/atoms/card/CardHeader.js +27 -0
  11. package/src/components/atoms/card/CardImage.styled.js +9 -0
  12. package/src/components/atoms/card/CardText.js +41 -0
  13. package/src/components/{molecules/welcome-card/WelcomeCard.theme.js → atoms/card/CardText.theme.js} +3 -6
  14. package/src/components/atoms/card/index.d.ts +21 -1
  15. package/src/components/atoms/display-card/DisplayCard.js +1 -1
  16. package/src/components/atoms/index.d.ts +1 -0
  17. package/src/components/atoms/layouts/Switcher.d.ts +17 -0
  18. package/src/components/atoms/layouts/index.d.ts +1 -0
  19. package/src/components/atoms/text/index.d.ts +16 -0
  20. package/src/components/molecules/index.d.ts +0 -2
  21. package/src/components/molecules/index.js +0 -2
  22. package/src/components/molecules/card-with-header/CardWithHeader.js +0 -34
  23. package/src/components/molecules/card-with-header/CardWithHeader.theme.js +0 -9
  24. package/src/components/molecules/card-with-header/index.d.ts +0 -11
  25. package/src/components/molecules/card-with-header/index.js +0 -2
  26. package/src/components/molecules/welcome-card/WelcomeCard.js +0 -64
  27. package/src/components/molecules/welcome-card/index.d.ts +0 -15
  28. package/src/components/molecules/welcome-card/index.js +0 -3
package/dist/index.esm.js CHANGED
@@ -6330,7 +6330,7 @@ var general = /*#__PURE__*/Object.freeze({
6330
6330
  throttle: throttle
6331
6331
  });
6332
6332
 
6333
- var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children"];
6333
+ var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
6334
6334
 
6335
6335
  var Text = function Text(_ref) {
6336
6336
  var themeValues = _ref.themeValues,
@@ -6348,6 +6348,8 @@ var Text = function Text(_ref) {
6348
6348
  as = _ref.as,
6349
6349
  dataQa = _ref.dataQa,
6350
6350
  children = _ref.children,
6351
+ _ref$variant = _ref.variant,
6352
+ variant = _ref$variant === void 0 ? "p" : _ref$variant,
6351
6353
  rest = _objectWithoutProperties(_ref, _excluded$1);
6352
6354
 
6353
6355
  return /*#__PURE__*/React.createElement(TextSpan, _extends({
@@ -6361,7 +6363,8 @@ var Text = function Text(_ref) {
6361
6363
  onClick: onClick,
6362
6364
  onKeyPress: onKeyPress,
6363
6365
  "data-qa": dataQa,
6364
- $textWrap: textWrap
6366
+ $textWrap: textWrap,
6367
+ $variant: variant
6365
6368
  }, rest), safeChildren(children, /*#__PURE__*/React.createElement("span", null)));
6366
6369
  };
6367
6370
 
@@ -22385,53 +22388,6 @@ var DisplayBox = function DisplayBox(_ref) {
22385
22388
 
22386
22389
  var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$h);
22387
22390
 
22388
- var DisplayCard = function DisplayCard(_ref) {
22389
- var title = _ref.title,
22390
- item = _ref.item,
22391
- buttonText = _ref.buttonText,
22392
- buttonAction = _ref.buttonAction,
22393
- url = _ref.url,
22394
- _ref$link = _ref.link,
22395
- link = _ref$link === void 0 ? false : _ref$link;
22396
- return /*#__PURE__*/React.createElement(Box, {
22397
- padding: "0 0 16px"
22398
- }, /*#__PURE__*/React.createElement(Stack, {
22399
- childGap: "0rem"
22400
- }, /*#__PURE__*/React.createElement(Box, {
22401
- padding: "0 0 8px 0"
22402
- }, /*#__PURE__*/React.createElement(Paragraph$1, {
22403
- variant: "pL",
22404
- color: CHARADE_GREY,
22405
- extraStyles: "letter-spacing: 0.29px"
22406
- }, title)), /*#__PURE__*/React.createElement(Box, {
22407
- padding: "0"
22408
- }, /*#__PURE__*/React.createElement(Box, {
22409
- padding: "24px",
22410
- borderSize: "1px",
22411
- borderRadius: "4px",
22412
- background: WHITE,
22413
- boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
22414
- }, /*#__PURE__*/React.createElement(Cluster, {
22415
- justify: "space-between",
22416
- align: "center"
22417
- }, /*#__PURE__*/React.createElement(Text$1, {
22418
- variant: "p",
22419
- color: CHARADE_GREY
22420
- }, item), link ? /*#__PURE__*/React.createElement(ButtonWithLink, {
22421
- text: buttonText,
22422
- url: url,
22423
- variant: "smallGhost",
22424
- dataQa: buttonText,
22425
- extraStyles: "min-width: 0;"
22426
- }) : buttonAction ? /*#__PURE__*/React.createElement(ButtonWithAction, {
22427
- text: buttonText,
22428
- action: buttonAction,
22429
- variant: "smallGhost",
22430
- dataQa: buttonText,
22431
- extraStyles: "min-width: 0;"
22432
- }) : /*#__PURE__*/React.createElement(Fragment$1, null))))));
22433
- };
22434
-
22435
22391
  function _extends$2() {
22436
22392
  _extends$2 = Object.assign || function (target) {
22437
22393
  for (var i = 1; i < arguments.length; i++) {
@@ -22710,6 +22666,284 @@ var FormattedInput = function FormattedInput(_ref) {
22710
22666
  }));
22711
22667
  };
22712
22668
 
22669
+ var formatDelimiter = "_";
22670
+ var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
22671
+ var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
22672
+ var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
22673
+ var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
22674
+ var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
22675
+ var zipFormat = createFormat(zipFormats, formatDelimiter);
22676
+ var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
22677
+ var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
22678
+ var phoneFormat = createFormat(phoneFormats, formatDelimiter);
22679
+ var moneyFormat = createFormat(moneyFormats, formatDelimiter);
22680
+
22681
+ var formats = /*#__PURE__*/Object.freeze({
22682
+ __proto__: null,
22683
+ formatDelimiter: formatDelimiter,
22684
+ phoneFormats: phoneFormats,
22685
+ moneyFormats: moneyFormats,
22686
+ expirationDateFormats: expirationDateFormats,
22687
+ zipFormat: zipFormat,
22688
+ creditCardFormat: creditCardFormat,
22689
+ expirationDateFormat: expirationDateFormat,
22690
+ phoneFormat: phoneFormat,
22691
+ moneyFormat: moneyFormat
22692
+ });
22693
+
22694
+ var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
22695
+ var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
22696
+ // Only move focus when "hasErrors" is true
22697
+ // "hasErrors" is managed by container page of form
22698
+ // typically set to "true" on attempted form submission, if errors exist
22699
+ // Reset errors, if provided, resets the error state tracking in order to properly re-run
22700
+ useEffect$1(function () {
22701
+ if (hasErrors) {
22702
+ var _inputsWithErrors$;
22703
+
22704
+ var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
22705
+ inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
22706
+ }
22707
+
22708
+ return function () {
22709
+ return resetHasErrors(false);
22710
+ };
22711
+ });
22712
+ };
22713
+
22714
+ /*
22715
+ Hook that assigns a click event listener to the main document element
22716
+ Returns a ref to attach to another element (like an icon/button that triggers a popover)
22717
+ If a click event gets captured by the document and the assigned element isn't the target
22718
+ hook will run whatever handler is passed (eg a function that closes a popover)
22719
+
22720
+ See popover component for implementation
22721
+
22722
+ */
22723
+
22724
+ var useOutsideClickHook$1 = function useOutsideClickHook(handler) {
22725
+ var ref = useRef();
22726
+ useEffect$1(function () {
22727
+ }, [ref]);
22728
+ return ref;
22729
+ };
22730
+
22731
+
22732
+
22733
+ var index$4 = /*#__PURE__*/Object.freeze({
22734
+ __proto__: null,
22735
+ formats: formats,
22736
+ general: general,
22737
+ theme: themeUtils,
22738
+ useFocusInvalidInput: useFocusInvalidInput,
22739
+ useOutsideClick: useOutsideClickHook$1
22740
+ });
22741
+
22742
+ var hoverColor$4 = "#116285";
22743
+ var activeColor$4 = "#0E506D";
22744
+ var popoverTriggerColor = "#15749D";
22745
+ var fallbackValues$i = {
22746
+ hoverColor: hoverColor$4,
22747
+ activeColor: activeColor$4,
22748
+ popoverTriggerColor: popoverTriggerColor
22749
+ };
22750
+
22751
+ var Popover = function Popover(_ref) {
22752
+ var themeValues = _ref.themeValues,
22753
+ _ref$triggerText = _ref.triggerText,
22754
+ triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
22755
+ _ref$content = _ref.content,
22756
+ content = _ref$content === void 0 ? "" : _ref$content,
22757
+ _ref$hasIcon = _ref.hasIcon,
22758
+ hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
22759
+ Icon = _ref.icon,
22760
+ _ref$iconHelpText = _ref.iconHelpText,
22761
+ iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
22762
+ _ref$popoverID = _ref.popoverID,
22763
+ popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
22764
+ _ref$popoverFocus = _ref.popoverFocus,
22765
+ popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
22766
+ extraStyles = _ref.extraStyles,
22767
+ textExtraStyles = _ref.textExtraStyles,
22768
+ _ref$minWidth = _ref.minWidth,
22769
+ minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
22770
+ _ref$maxWidth = _ref.maxWidth,
22771
+ maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
22772
+ _ref$height = _ref.height,
22773
+ height = _ref$height === void 0 ? "auto" : _ref$height,
22774
+ position = _ref.position,
22775
+ arrowPosition = _ref.arrowPosition;
22776
+ var hoverColor = themeValues.hoverColor,
22777
+ activeColor = themeValues.activeColor,
22778
+ popoverTriggerColor = themeValues.popoverTriggerColor;
22779
+
22780
+ var _ref2 = position !== null && position !== void 0 ? position : {},
22781
+ _ref2$top = _ref2.top,
22782
+ top = _ref2$top === void 0 ? "-110px" : _ref2$top,
22783
+ _ref2$right = _ref2.right,
22784
+ right = _ref2$right === void 0 ? "auto" : _ref2$right,
22785
+ _ref2$bottom = _ref2.bottom,
22786
+ bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
22787
+ _ref2$left = _ref2.left,
22788
+ left = _ref2$left === void 0 ? "-225px" : _ref2$left;
22789
+
22790
+ var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
22791
+ _ref3$arrowTop = _ref3.arrowTop,
22792
+ arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
22793
+ _ref3$arrowRight = _ref3.arrowRight,
22794
+ arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
22795
+ _ref3$arrowBottom = _ref3.arrowBottom,
22796
+ arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
22797
+ _ref3$arrowLeft = _ref3.arrowLeft,
22798
+ arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
22799
+
22800
+ var _useState = useState(false),
22801
+ _useState2 = _slicedToArray(_useState, 2),
22802
+ popoverOpen = _useState2[0],
22803
+ togglePopover = _useState2[1];
22804
+
22805
+ var handleTogglePopover = function handleTogglePopover(popoverState) {
22806
+ if (popoverOpen !== popoverState) {
22807
+ togglePopover(popoverState);
22808
+ }
22809
+ };
22810
+
22811
+ var triggerRef = useOutsideClickHook(function () {
22812
+ return handleTogglePopover(false);
22813
+ });
22814
+ return /*#__PURE__*/React.createElement(Box, {
22815
+ padding: "0",
22816
+ extraStyles: "position: relative; ".concat(extraStyles)
22817
+ }, /*#__PURE__*/React.createElement(ButtonWithAction, {
22818
+ action: function action() {
22819
+ return noop;
22820
+ },
22821
+ onFocus: function onFocus() {
22822
+ handleTogglePopover(true);
22823
+ },
22824
+ onBlur: function onBlur() {
22825
+ handleTogglePopover(false);
22826
+ },
22827
+ onKeyDown: function onKeyDown(e) {
22828
+ if (e.keyCode === 27) {
22829
+ handleTogglePopover(false);
22830
+ }
22831
+ },
22832
+ onTouchStart: function onTouchStart() {
22833
+ return handleTogglePopover(true);
22834
+ },
22835
+ onTouchEnd: function onTouchEnd() {
22836
+ return handleTogglePopover(false);
22837
+ },
22838
+ onMouseEnter: function onMouseEnter() {
22839
+ return handleTogglePopover(true);
22840
+ },
22841
+ onMouseLeave: function onMouseLeave() {
22842
+ return handleTogglePopover(false);
22843
+ },
22844
+ contentOverride: true,
22845
+ variant: "smallGhost",
22846
+ tabIndex: "0",
22847
+ id: "btnPopover".concat(popoverID),
22848
+ "aria-expanded": popoverOpen,
22849
+ "aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
22850
+ "aria-describedby": "Disclosure".concat(popoverID),
22851
+ "aria-controls": "Disclosed".concat(popoverID),
22852
+ ref: triggerRef
22853
+ }, hasIcon && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, null), /*#__PURE__*/React.createElement(Box, {
22854
+ padding: "0",
22855
+ srOnly: true
22856
+ }, /*#__PURE__*/React.createElement(Text$1, {
22857
+ id: "btnPopover".concat(popoverID, "_info")
22858
+ }, iconHelpText))), !hasIcon && /*#__PURE__*/React.createElement(Text$1, {
22859
+ color: popoverTriggerColor,
22860
+ extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
22861
+ }, triggerText)), /*#__PURE__*/React.createElement(Box, {
22862
+ background: "white",
22863
+ borderRadius: "4px",
22864
+ boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
22865
+ id: "Disclosed".concat(popoverID),
22866
+ role: "region",
22867
+ "aria-describedby": "Disclosure".concat(popoverID),
22868
+ tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
22869
+ minWidth: minWidth,
22870
+ maxWidth: maxWidth,
22871
+ extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, "\n ")
22872
+ }, /*#__PURE__*/React.createElement(Paragraph$1, null, content), /*#__PURE__*/React.createElement(Box, {
22873
+ padding: "0",
22874
+ extraStyles: "position: absolute; content: \"\"; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid rgba(255, 255, 255, 0.85); filter: drop-shadow(2px 8px 14px black); bottom: ".concat(arrowBottom, "; right: ").concat(arrowRight, "; top: ").concat(arrowTop, "; left: ").concat(arrowLeft, ";")
22875
+ })));
22876
+ };
22877
+
22878
+ var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$i);
22879
+
22880
+ var DisplayCard = function DisplayCard(_ref) {
22881
+ var title = _ref.title,
22882
+ item = _ref.item,
22883
+ buttonText = _ref.buttonText,
22884
+ buttonAction = _ref.buttonAction,
22885
+ url = _ref.url,
22886
+ _ref$link = _ref.link,
22887
+ link = _ref$link === void 0 ? false : _ref$link,
22888
+ helpText = _ref.helpText,
22889
+ _ref$hasPopover = _ref.hasPopover,
22890
+ hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
22891
+ _ref$popoverTriggerTe = _ref.popoverTriggerText,
22892
+ popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
22893
+ _ref$popoverContent = _ref.popoverContent,
22894
+ popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
22895
+ popoverExtraStyles = _ref.popoverExtraStyles,
22896
+ popoverTextExtraStyles = _ref.popoverTextExtraStyles;
22897
+ return /*#__PURE__*/React.createElement(Box, {
22898
+ padding: "0 0 16px"
22899
+ }, /*#__PURE__*/React.createElement(Stack, {
22900
+ childGap: "0rem"
22901
+ }, /*#__PURE__*/React.createElement(Box, {
22902
+ padding: "0 0 8px 0"
22903
+ }, /*#__PURE__*/React.createElement(Cluster, {
22904
+ justify: "space-between",
22905
+ align: "center",
22906
+ overflow: true
22907
+ }, /*#__PURE__*/React.createElement(Paragraph$1, {
22908
+ variant: "pL",
22909
+ color: CHARADE_GREY,
22910
+ extraStyles: "letter-spacing: 0.29px"
22911
+ }, title), hasPopover && /*#__PURE__*/React.createElement(Popover$1, {
22912
+ triggerText: popoverTriggerText,
22913
+ content: popoverContent,
22914
+ popoverExtraStyles: popoverExtraStyles,
22915
+ popoverTextExtraStyles: popoverTextExtraStyles
22916
+ }))), /*#__PURE__*/React.createElement(Box, {
22917
+ padding: "0"
22918
+ }, /*#__PURE__*/React.createElement(Box, {
22919
+ padding: "24px",
22920
+ borderSize: "1px",
22921
+ borderRadius: "4px",
22922
+ background: WHITE,
22923
+ boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
22924
+ }, /*#__PURE__*/React.createElement(Cluster, {
22925
+ justify: "space-between",
22926
+ align: "center"
22927
+ }, /*#__PURE__*/React.createElement(Text$1, {
22928
+ color: CHARADE_GREY
22929
+ }, item), link ? /*#__PURE__*/React.createElement(ButtonWithLink, {
22930
+ text: buttonText,
22931
+ url: url,
22932
+ variant: "smallGhost",
22933
+ dataQa: buttonText,
22934
+ extraStyles: "min-width: 0;"
22935
+ }) : buttonAction ? /*#__PURE__*/React.createElement(ButtonWithAction, {
22936
+ text: buttonText,
22937
+ action: buttonAction,
22938
+ variant: "smallGhost",
22939
+ dataQa: buttonText,
22940
+ extraStyles: "min-width: 0;"
22941
+ }) : helpText ? /*#__PURE__*/React.createElement(Text$1, {
22942
+ color: STORM_GREY,
22943
+ extraStyles: "font-style: italic;"
22944
+ }, helpText) : /*#__PURE__*/React.createElement(Fragment$1, null))))));
22945
+ };
22946
+
22713
22947
  var linkColor$2 = {
22714
22948
  "default": "".concat(MATISSE_BLUE),
22715
22949
  disabled: "".concat(MATISSE_BLUE)
@@ -22759,7 +22993,7 @@ var hoverFocusStyles$1 = {
22759
22993
  var formFooterPanel = {
22760
22994
  "default": "".concat(INFO_BLUE)
22761
22995
  };
22762
- var fallbackValues$i = {
22996
+ var fallbackValues$j = {
22763
22997
  linkColor: linkColor$2,
22764
22998
  formBackgroundColor: formBackgroundColor$1,
22765
22999
  inputBackgroundColor: inputBackgroundColor$1,
@@ -22981,7 +23215,7 @@ var FormInput = function FormInput(_ref15) {
22981
23215
  }, decorator)));
22982
23216
  };
22983
23217
 
22984
- var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$i, "default");
23218
+ var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$j, "default");
22985
23219
 
22986
23220
  var _excluded$q = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
22987
23221
 
@@ -23037,7 +23271,7 @@ var FormContainer = function FormContainer(_ref) {
23037
23271
  }, rest), children);
23038
23272
  };
23039
23273
 
23040
- var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$i, "default");
23274
+ var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$j, "default");
23041
23275
 
23042
23276
  var FormFooterPanel = function FormFooterPanel(_ref) {
23043
23277
  var themeValues = _ref.themeValues,
@@ -23061,7 +23295,7 @@ var FormFooterPanel = function FormFooterPanel(_ref) {
23061
23295
  })));
23062
23296
  };
23063
23297
 
23064
- var FormFooterPanel$1 = themeComponent(withWindowSize(FormFooterPanel), "FormFooterPanel", fallbackValues$i, "default");
23298
+ var FormFooterPanel$1 = themeComponent(withWindowSize(FormFooterPanel), "FormFooterPanel", fallbackValues$j, "default");
23065
23299
 
23066
23300
  var fontSize$7 = {
23067
23301
  "default": "1rem",
@@ -23075,7 +23309,7 @@ var color$7 = {
23075
23309
  "default": "".concat(CHARADE_GREY),
23076
23310
  radio: "".concat(MINESHAFT_GREY)
23077
23311
  };
23078
- var fallbackValues$j = {
23312
+ var fallbackValues$k = {
23079
23313
  fontSize: fontSize$7,
23080
23314
  padding: padding$1,
23081
23315
  color: color$7
@@ -23118,11 +23352,11 @@ var FormattedAddress = function FormattedAddress(_ref) {
23118
23352
  }, city, ", ", stateProvince, " ".concat(zip), country ? " ".concat(country) : "")));
23119
23353
  };
23120
23354
 
23121
- var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$j, "default");
23355
+ var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$k, "default");
23122
23356
 
23123
23357
  var textColor$1 = "".concat(CHARADE_GREY);
23124
23358
  var autopayTextColor = "".concat(REGENT_GREY);
23125
- var fallbackValues$k = {
23359
+ var fallbackValues$l = {
23126
23360
  textColor: textColor$1,
23127
23361
  autopayTextColor: autopayTextColor
23128
23362
  };
@@ -23188,7 +23422,7 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
23188
23422
  }, "Autopay Enabled")));
23189
23423
  };
23190
23424
 
23191
- var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$k);
23425
+ var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$l);
23192
23426
 
23193
23427
  var Hamburger = styled.button.withConfig({
23194
23428
  displayName: "HamburgerButton__Hamburger",
@@ -23270,7 +23504,7 @@ var fontSize$8 = {
23270
23504
  h5: "1.375rem",
23271
23505
  h6: "1.25rem"
23272
23506
  };
23273
- var fallbackValues$l = {
23507
+ var fallbackValues$m = {
23274
23508
  fontFamily: fontFamily$5,
23275
23509
  fontSize: fontSize$8
23276
23510
  };
@@ -23312,7 +23546,7 @@ var Heading = function Heading(_ref) {
23312
23546
  }, rest), safeChildren(children, /*#__PURE__*/React.createElement("span", null)));
23313
23547
  };
23314
23548
 
23315
- var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$l, "h1");
23549
+ var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$m, "h1");
23316
23550
 
23317
23551
  var Jumbo = function Jumbo(_ref) {
23318
23552
  var showButton = _ref.showButton,
@@ -23386,7 +23620,7 @@ var fontWeight$4 = {
23386
23620
  pL: "600",
23387
23621
  h6: "700"
23388
23622
  };
23389
- var fallbackValues$m = {
23623
+ var fallbackValues$n = {
23390
23624
  fontWeight: fontWeight$4
23391
23625
  };
23392
23626
 
@@ -23414,7 +23648,7 @@ var LabeledAmount = function LabeledAmount(_ref) {
23414
23648
  }, amount));
23415
23649
  };
23416
23650
 
23417
- var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$m, "default");
23651
+ var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$n, "default");
23418
23652
 
23419
23653
  var weightTitle = {
23420
23654
  "default": "600",
@@ -23424,7 +23658,7 @@ var paragraphVariant = {
23424
23658
  "default": "pL",
23425
23659
  small: "pS"
23426
23660
  };
23427
- var fallbackValues$n = {
23661
+ var fallbackValues$o = {
23428
23662
  weightTitle: weightTitle,
23429
23663
  paragraphVariant: paragraphVariant
23430
23664
  };
@@ -23453,10 +23687,10 @@ var LineItem = function LineItem(_ref) {
23453
23687
  }, amount));
23454
23688
  };
23455
23689
 
23456
- var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$n, "default");
23690
+ var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$o, "default");
23457
23691
 
23458
23692
  var color$8 = "#15749D";
23459
- var fallbackValues$o = {
23693
+ var fallbackValues$p = {
23460
23694
  color: color$8
23461
23695
  };
23462
23696
 
@@ -23495,7 +23729,7 @@ var Spinner$1 = function Spinner(_ref4) {
23495
23729
  })));
23496
23730
  };
23497
23731
 
23498
- var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$o);
23732
+ var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$p);
23499
23733
 
23500
23734
  var Loading = function Loading() {
23501
23735
  return /*#__PURE__*/React.createElement(Box, {
@@ -23761,7 +23995,7 @@ var height$1 = {
23761
23995
  "default": "3rem",
23762
23996
  large: "192px"
23763
23997
  };
23764
- var fallbackValues$p = {
23998
+ var fallbackValues$q = {
23765
23999
  color: color$9,
23766
24000
  height: height$1
23767
24001
  };
@@ -23854,12 +24088,12 @@ var Placeholder = function Placeholder(_ref2) {
23854
24088
  }, text)))))))))));
23855
24089
  };
23856
24090
 
23857
- var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$p, "default");
24091
+ var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$q, "default");
23858
24092
 
23859
24093
  var backgroundColor$4 = {
23860
24094
  "default": "".concat(WHITE)
23861
24095
  };
23862
- var fallbackValues$q = {
24096
+ var fallbackValues$r = {
23863
24097
  backgroundColor: backgroundColor$4
23864
24098
  };
23865
24099
 
@@ -23887,12 +24121,12 @@ var ProcessingFee = function ProcessingFee(_ref) {
23887
24121
  }));
23888
24122
  };
23889
24123
 
23890
- var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$q, "default");
24124
+ var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$r, "default");
23891
24125
 
23892
- var activeColor$4 = "".concat(MATISSE_BLUE);
24126
+ var activeColor$5 = "".concat(MATISSE_BLUE);
23893
24127
  var inactiveColor = "".concat(GREY_CHATEAU);
23894
- var fallbackValues$r = {
23895
- activeColor: activeColor$4,
24128
+ var fallbackValues$s = {
24129
+ activeColor: activeColor$5,
23896
24130
  inactiveColor: inactiveColor
23897
24131
  };
23898
24132
 
@@ -23981,12 +24215,12 @@ var RadioButton$1 = function RadioButton(_ref2) {
23981
24215
  })));
23982
24216
  };
23983
24217
 
23984
- var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$r);
24218
+ var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$s);
23985
24219
 
23986
24220
  var border$2 = {
23987
24221
  "default": "1px solid #caced8"
23988
24222
  };
23989
- var fallbackValues$s = {
24223
+ var fallbackValues$t = {
23990
24224
  border: border$2
23991
24225
  };
23992
24226
 
@@ -24061,7 +24295,7 @@ var SearchableSelect = function SearchableSelect(_ref) {
24061
24295
  })))));
24062
24296
  };
24063
24297
 
24064
- var SearchableSelect$1 = themeComponent(SearchableSelect, "SearchableSelect", fallbackValues$s, "default");
24298
+ var SearchableSelect$1 = themeComponent(SearchableSelect, "SearchableSelect", fallbackValues$t, "default");
24065
24299
 
24066
24300
  var borderColor$2 = {
24067
24301
  "default": "".concat(GREY_CHATEAU)
@@ -24069,7 +24303,7 @@ var borderColor$2 = {
24069
24303
  var borderSize = {
24070
24304
  "default": "1px"
24071
24305
  };
24072
- var fallbackValues$t = {
24306
+ var fallbackValues$u = {
24073
24307
  borderColor: borderColor$2,
24074
24308
  borderSize: borderSize
24075
24309
  };
@@ -24086,7 +24320,7 @@ var SolidDivider = function SolidDivider(_ref) {
24086
24320
  });
24087
24321
  };
24088
24322
 
24089
- var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$t, "default");
24323
+ var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$u, "default");
24090
24324
 
24091
24325
  var placeHolderOptionUS = {
24092
24326
  text: "Please select state",
@@ -34670,7 +34904,7 @@ var offBackground = "".concat(REGENT_GREY);
34670
34904
  var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
34671
34905
  var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
34672
34906
  var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
34673
- var fallbackValues$u = {
34907
+ var fallbackValues$v = {
34674
34908
  onBackground: onBackground,
34675
34909
  disabledBackground: disabledBackground,
34676
34910
  white: white,
@@ -34845,7 +35079,7 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
34845
35079
  }, label))));
34846
35080
  };
34847
35081
 
34848
- var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$u);
35082
+ var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$v);
34849
35083
 
34850
35084
  var background$1 = "".concat(ATHENS_GREY);
34851
35085
  var white$1 = "".concat(WHITE);
@@ -34891,58 +35125,136 @@ var TypeaheadInput = function TypeaheadInput(_ref) {
34891
35125
  };
34892
35126
 
34893
35127
  var backgroundColor$5 = WHITE;
34894
- var fallbackValues$v = {
34895
- backgroundColor: backgroundColor$5
35128
+ var imageBackgroundColor = INFO_BLUE;
35129
+ var headerBackgroundColor = STORM_GREY;
35130
+ var headerColor = WHITE;
35131
+ var fallbackValues$w = {
35132
+ backgroundColor: backgroundColor$5,
35133
+ imageBackgroundColor: imageBackgroundColor,
35134
+ headerBackgroundColor: headerBackgroundColor,
35135
+ headerColor: headerColor
34896
35136
  };
34897
35137
 
34898
- var _excluded$w = ["themeValues", "variant", "children", "extraStyles"];
35138
+ var CardImage = styled.img.withConfig({
35139
+ displayName: "CardImagestyled__CardImage",
35140
+ componentId: "sc-ug7kyn-0"
35141
+ })(["background:", ";object-fit:", ";height:", ";"], function (_ref) {
35142
+ var backgroundColor = _ref.backgroundColor;
35143
+ return backgroundColor;
35144
+ }, function (_ref2) {
35145
+ var objectFit = _ref2.objectFit;
35146
+ return objectFit;
35147
+ }, function (_ref3) {
35148
+ var height = _ref3.height;
35149
+ return height;
35150
+ });
35151
+
35152
+ var titleColor = BRIGHT_GREY;
35153
+ var titleWeight = FONT_WEIGHT_BOLD;
35154
+ var fallbackValues$x = _defineProperty({
35155
+ titleColor: titleColor,
35156
+ titleWeight: titleWeight
35157
+ }, "titleWeight", titleWeight);
34899
35158
 
34900
- var CardVariantSwitcher$1 = function CardVariantSwitcher(_ref) {
34901
- var variant = _ref.variant,
34902
- children = _ref.children;
34903
- return variant === "vertical" ? /*#__PURE__*/React.createElement(Fragment$1, null, children) : /*#__PURE__*/React.createElement(Box, {
34904
- padding: "0",
34905
- extraStyles: "width: 100%"
34906
- }, /*#__PURE__*/React.createElement(Stack, {
34907
- childGap: "0",
34908
- maxWidth: "100%",
34909
- fullHeight: true
34910
- }, children));
35159
+ var CardText = function CardText(_ref) {
35160
+ var text = _ref.text,
35161
+ titleText = _ref.titleText,
35162
+ _ref$titleVariant = _ref.titleVariant,
35163
+ titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
35164
+ themeValues = _ref.themeValues;
35165
+ return /*#__PURE__*/React.createElement(Cover, null, /*#__PURE__*/React.createElement(Stack, null, titleText && /*#__PURE__*/React.createElement(Title$1, {
35166
+ variant: titleVariant,
35167
+ color: themeValues.titleColor,
35168
+ weight: themeValues === null || themeValues === void 0 ? void 0 : themeValues.titleWeight
35169
+ }, titleText), /*#__PURE__*/React.createElement(Paragraph$1, {
35170
+ color: themeValues.textColor
35171
+ }, text)));
34911
35172
  };
35173
+ var CardText$1 = themeComponent(withWindowSize(CardText), "CardText", fallbackValues$x);
34912
35174
 
34913
- var Card = function Card(_ref2) {
34914
- var themeValues = _ref2.themeValues,
34915
- variant = _ref2.variant,
34916
- children = _ref2.children,
34917
- extraStyles = _ref2.extraStyles,
34918
- props = _objectWithoutProperties(_ref2, _excluded$w);
35175
+ var CardHeader = function CardHeader(_ref) {
35176
+ var headerText = _ref.headerText,
35177
+ headerColor = _ref.headerColor,
35178
+ headerVariant = _ref.headerVariant,
35179
+ backgroundColor = _ref.backgroundColor,
35180
+ padding = _ref.padding,
35181
+ borderRadius = _ref.borderRadius;
35182
+ return /*#__PURE__*/React.createElement(Box, {
35183
+ padding: padding,
35184
+ background: backgroundColor,
35185
+ borderRadius: "".concat(borderRadius, " ").concat(borderRadius, " 0 0")
35186
+ }, /*#__PURE__*/React.createElement(Title$1, {
35187
+ variant: headerVariant,
35188
+ color: headerColor
35189
+ }, headerText));
35190
+ };
34919
35191
 
34920
- return /*#__PURE__*/React.createElement(BoxWithShadow$1, _extends({
35192
+ var Card = function Card(_ref) {
35193
+ var themeValues = _ref.themeValues,
35194
+ children = _ref.children,
35195
+ extraStyles = _ref.extraStyles,
35196
+ _ref$width = _ref.width,
35197
+ width = _ref$width === void 0 ? "276px" : _ref$width,
35198
+ text = _ref.text,
35199
+ titleText = _ref.titleText,
35200
+ _ref$titleVariant = _ref.titleVariant,
35201
+ titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
35202
+ imgSrc = _ref.imgSrc,
35203
+ _ref$imgHeight = _ref.imgHeight,
35204
+ imgHeight = _ref$imgHeight === void 0 ? "150px" : _ref$imgHeight,
35205
+ _ref$imgObjectFit = _ref.imgObjectFit,
35206
+ imgObjectFit = _ref$imgObjectFit === void 0 ? "none" : _ref$imgObjectFit,
35207
+ headerText = _ref.headerText,
35208
+ _ref$headerVariant = _ref.headerVariant,
35209
+ headerVariant = _ref$headerVariant === void 0 ? "small" : _ref$headerVariant,
35210
+ _ref$borderRadius = _ref.borderRadius,
35211
+ borderRadius = _ref$borderRadius === void 0 ? "4px" : _ref$borderRadius,
35212
+ _ref$padding = _ref.padding,
35213
+ padding = _ref$padding === void 0 ? "24px" : _ref$padding;
35214
+ var numberOfChildren = children.length + (imgSrc ? 1 : 0) + (text ? 1 : 0) + (headerText ? 1 : 0);
35215
+ return /*#__PURE__*/React.createElement(BoxWithShadow$1, {
34921
35216
  variant: "baseStandard",
34922
35217
  background: themeValues.backgroundColor,
34923
- borderRadius: "4px",
35218
+ borderRadius: borderRadius,
34924
35219
  padding: "0",
34925
35220
  margin: "0",
34926
- maxWidth: variant !== "vertical" ? "100%" : "276px",
34927
- minHeight: "100%",
34928
- minWidth: variant !== "vertical" && "276px",
35221
+ minWidth: width,
34929
35222
  extraStyles: extraStyles
34930
- }, props), /*#__PURE__*/React.createElement(Cover, {
34931
- singleChild: true,
34932
- fillCenter: true
34933
- }, /*#__PURE__*/React.createElement(CardVariantSwitcher$1, {
34934
- variant: variant
34935
- }, children)));
35223
+ }, /*#__PURE__*/React.createElement(Cover, {
35224
+ singleChild: true
35225
+ }, /*#__PURE__*/React.createElement(Stack, {
35226
+ fullHeight: true,
35227
+ childGap: "0",
35228
+ bottomItem: numberOfChildren
35229
+ }, headerText && /*#__PURE__*/React.createElement(CardHeader, {
35230
+ headerText: headerText,
35231
+ headerColor: themeValues.headerColor,
35232
+ headerVariant: headerVariant,
35233
+ backgroundColor: themeValues.headerBackgroundColor,
35234
+ borderRadius: borderRadius,
35235
+ padding: padding
35236
+ }), imgSrc && /*#__PURE__*/React.createElement(CardImage, {
35237
+ height: imgHeight,
35238
+ objectFit: imgObjectFit,
35239
+ backgroundColor: themeValues.imageBackgroundColor,
35240
+ src: imgSrc
35241
+ }), /*#__PURE__*/React.createElement(Box, {
35242
+ padding: padding
35243
+ }, text && /*#__PURE__*/React.createElement(CardText$1, {
35244
+ titleText: titleText,
35245
+ text: text,
35246
+ titleVariant: titleVariant
35247
+ }), children))));
34936
35248
  };
34937
35249
 
34938
- var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$v);
35250
+ var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$w);
34939
35251
 
34940
35252
  var fontFamily$6 = "Public Sans, sans-serif";
34941
- var activeColor$5 = MATISSE_BLUE;
35253
+ var activeColor$6 = MATISSE_BLUE;
34942
35254
  var linkColor$3 = CHARADE_GREY;
34943
- var fallbackValues$w = {
35255
+ var fallbackValues$y = {
34944
35256
  fontFamily: fontFamily$6,
34945
- activeColor: activeColor$5,
35257
+ activeColor: activeColor$6,
34946
35258
  linkColor: linkColor$3
34947
35259
  };
34948
35260
 
@@ -34973,7 +35285,7 @@ var NavTab = function NavTab(_ref) {
34973
35285
  }, label));
34974
35286
  };
34975
35287
 
34976
- var NavTab$1 = themeComponent(NavTab, "NavTab", fallbackValues$w);
35288
+ var NavTab$1 = themeComponent(NavTab, "NavTab", fallbackValues$y);
34977
35289
 
34978
35290
  var NavTabs = function NavTabs(_ref) {
34979
35291
  var tabsConfig = _ref.tabsConfig,
@@ -36752,31 +37064,6 @@ const createFormState = formConfig => ({
36752
37064
  mapStateToProps: mapStateToProps
36753
37065
  });
36754
37066
 
36755
- var formatDelimiter = "_";
36756
- var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
36757
- var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
36758
- var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
36759
- var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
36760
- var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
36761
- var zipFormat = createFormat(zipFormats, formatDelimiter);
36762
- var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
36763
- var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
36764
- var phoneFormat = createFormat(phoneFormats, formatDelimiter);
36765
- var moneyFormat = createFormat(moneyFormats, formatDelimiter);
36766
-
36767
- var formats = /*#__PURE__*/Object.freeze({
36768
- __proto__: null,
36769
- formatDelimiter: formatDelimiter,
36770
- phoneFormats: phoneFormats,
36771
- moneyFormats: moneyFormats,
36772
- expirationDateFormats: expirationDateFormats,
36773
- zipFormat: zipFormat,
36774
- creditCardFormat: creditCardFormat,
36775
- expirationDateFormat: expirationDateFormat,
36776
- phoneFormat: phoneFormat,
36777
- moneyFormat: moneyFormat
36778
- });
36779
-
36780
37067
  var AddressForm = function AddressForm(_ref) {
36781
37068
  var _zipErrorMessages;
36782
37069
 
@@ -36924,39 +37211,6 @@ AddressForm.reducer = reducer;
36924
37211
  AddressForm.mapStateToProps = mapStateToProps$1;
36925
37212
  AddressForm.mapDispatchToProps = mapDispatchToProps;
36926
37213
 
36927
- var headerBackgroundColor = STORM_GREY;
36928
- var headerTextColor = WHITE;
36929
- var fallbackValues$x = {
36930
- headerBackgroundColor: headerBackgroundColor,
36931
- headerTextColor: headerTextColor
36932
- };
36933
-
36934
- var _excluded$x = ["themeValues", "children", "header", "extraStyles", "variant"];
36935
-
36936
- var CardWithHeader = function CardWithHeader(_ref) {
36937
- var themeValues = _ref.themeValues,
36938
- children = _ref.children,
36939
- header = _ref.header,
36940
- extraStyles = _ref.extraStyles,
36941
- variant = _ref.variant,
36942
- props = _objectWithoutProperties(_ref, _excluded$x);
36943
-
36944
- return /*#__PURE__*/React.createElement(Card$1, _extends({
36945
- extraStyles: extraStyles
36946
- }, props), /*#__PURE__*/React.createElement(Box, {
36947
- padding: "24px",
36948
- background: themeValues.headerBackgroundColor,
36949
- extraStyles: "\n border-radius: 4px 4px 0 0;\n "
36950
- }, /*#__PURE__*/React.createElement(Title$1, {
36951
- variant: "small",
36952
- color: themeValues.headerTextColor
36953
- }, header)), /*#__PURE__*/React.createElement(Box, {
36954
- padding: "24px"
36955
- }, children));
36956
- };
36957
-
36958
- var CardWithHeader$1 = themeComponent(CardWithHeader, "CardWithHeader", fallbackValues$x);
36959
-
36960
37214
  var ChangePasswordForm = function ChangePasswordForm(_ref) {
36961
37215
  var _newPasswordErrorMess;
36962
37216
 
@@ -37094,11 +37348,11 @@ ChangePasswordForm.reducer = reducer$1;
37094
37348
  ChangePasswordForm.mapStateToProps = mapStateToProps$2;
37095
37349
  ChangePasswordForm.mapDispatchToProps = mapDispatchToProps$1;
37096
37350
 
37097
- var titleColor = "#292A33";
37351
+ var titleColor$1 = "#292A33";
37098
37352
  var headingBackgroundColor = "transparent";
37099
37353
  var bodyBackgroundColor = "transparent";
37100
- var fallbackValues$y = {
37101
- titleColor: titleColor,
37354
+ var fallbackValues$z = {
37355
+ titleColor: titleColor$1,
37102
37356
  headingBackgroundColor: headingBackgroundColor,
37103
37357
  bodyBackgroundColor: bodyBackgroundColor
37104
37358
  };
@@ -37224,7 +37478,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
37224
37478
  }, children))));
37225
37479
  };
37226
37480
 
37227
- var CollapsibleSection$1 = themeComponent(CollapsibleSection, "CollapsibleSection", fallbackValues$y);
37481
+ var CollapsibleSection$1 = themeComponent(CollapsibleSection, "CollapsibleSection", fallbackValues$z);
37228
37482
 
37229
37483
  var EditNameForm = function EditNameForm(_ref) {
37230
37484
  var fields = _ref.fields,
@@ -37630,7 +37884,7 @@ EmailForm.mapDispatchToProps = mapDispatchToProps$3;
37630
37884
 
37631
37885
  var footerBackgroundColor = BRIGHT_GREY;
37632
37886
  var subfooterBackgroundColor = STORM_GREY;
37633
- var fallbackValues$z = {
37887
+ var fallbackValues$A = {
37634
37888
  footerBackgroundColor: footerBackgroundColor,
37635
37889
  subfooterBackgroundColor: subfooterBackgroundColor
37636
37890
  };
@@ -37662,7 +37916,7 @@ var FooterWithSubfooter = function FooterWithSubfooter(_ref) {
37662
37916
  }));
37663
37917
  };
37664
37918
 
37665
- var FooterWithSubfooter$1 = themeComponent(FooterWithSubfooter, "FooterWithSubfooter", fallbackValues$z);
37919
+ var FooterWithSubfooter$1 = themeComponent(FooterWithSubfooter, "FooterWithSubfooter", fallbackValues$A);
37666
37920
 
37667
37921
  var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
37668
37922
  var _EmailErrorMessages;
@@ -37714,7 +37968,7 @@ ForgotPasswordForm.mapDispatchToProps = mapDispatchToProps$4;
37714
37968
 
37715
37969
  var textColor$2 = "#ffffff";
37716
37970
  var backgroundColor$6 = "#182848";
37717
- var fallbackValues$A = {
37971
+ var fallbackValues$B = {
37718
37972
  textColor: textColor$2,
37719
37973
  backgroundColor: backgroundColor$6
37720
37974
  };
@@ -37771,7 +38025,7 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
37771
38025
  }), repeat( /*#__PURE__*/React.createElement(Box, null), boxesAfter))));
37772
38026
  };
37773
38027
 
37774
- var HighlightTabRow$1 = /*#__PURE__*/memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$A));
38028
+ var HighlightTabRow$1 = /*#__PURE__*/memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$B));
37775
38029
 
37776
38030
  var AccountBillIcon = function AccountBillIcon() {
37777
38031
  return /*#__PURE__*/React.createElement("svg", {
@@ -43179,7 +43433,7 @@ var backgroundColor$7 = {
43179
43433
  largeTitle: WHITE,
43180
43434
  small: WHITE
43181
43435
  };
43182
- var fallbackValues$B = {
43436
+ var fallbackValues$C = {
43183
43437
  fontSize: fontSize$9,
43184
43438
  fontWeight: fontWeight$5,
43185
43439
  fontColor: fontColor,
@@ -43238,7 +43492,7 @@ var Module = function Module(_ref) {
43238
43492
  }, children)));
43239
43493
  };
43240
43494
 
43241
- var Module$1 = /*#__PURE__*/memo(themeComponent(Module, "Module", fallbackValues$B, "default"));
43495
+ var Module$1 = /*#__PURE__*/memo(themeComponent(Module, "Module", fallbackValues$C, "default"));
43242
43496
 
43243
43497
  var backgroundColor$8 = {
43244
43498
  profile: "#3b414d",
@@ -43248,7 +43502,7 @@ var shadowColor = {
43248
43502
  profile: "#292A33",
43249
43503
  cms: "#292A33"
43250
43504
  };
43251
- var fallbackValues$C = {
43505
+ var fallbackValues$D = {
43252
43506
  backgroundColor: backgroundColor$8,
43253
43507
  shadowColor: shadowColor
43254
43508
  };
@@ -43289,7 +43543,7 @@ var NavMenuDesktop = function NavMenuDesktop(_ref) {
43289
43543
  }, menuContent));
43290
43544
  };
43291
43545
 
43292
- var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$C, "profile");
43546
+ var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$D, "profile");
43293
43547
 
43294
43548
  var menu = posed.div({
43295
43549
  invisible: {
@@ -43345,7 +43599,7 @@ var NavMenuMobile = function NavMenuMobile(_ref) {
43345
43599
  }, menuContent));
43346
43600
  };
43347
43601
 
43348
- var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$C, "profile");
43602
+ var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$D, "profile");
43349
43603
 
43350
43604
  var IconsModule = function IconsModule(_ref) {
43351
43605
  var icon = _ref.icon,
@@ -43397,15 +43651,15 @@ var TitleModule = function TitleModule(_ref) {
43397
43651
  };
43398
43652
 
43399
43653
  var color$a = "#15749D";
43400
- var hoverColor$4 = "#116285";
43401
- var activeColor$6 = "#0E506D";
43654
+ var hoverColor$5 = "#116285";
43655
+ var activeColor$7 = "#0E506D";
43402
43656
  var linkColor$4 = "#3176AA";
43403
43657
  var fontWeight$6 = FONT_WEIGHT_REGULAR;
43404
43658
  var modalLinkHoverFocus = "outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;";
43405
- var fallbackValues$D = {
43659
+ var fallbackValues$E = {
43406
43660
  color: color$a,
43407
- hoverColor: hoverColor$4,
43408
- activeColor: activeColor$6,
43661
+ hoverColor: hoverColor$5,
43662
+ activeColor: activeColor$7,
43409
43663
  linkColor: linkColor$4,
43410
43664
  fontWeight: fontWeight$6,
43411
43665
  modalLinkHoverFocus: modalLinkHoverFocus
@@ -43514,7 +43768,7 @@ var AutopayModal = function AutopayModal(_ref) {
43514
43768
  }, modalExtraProps), renderAutoPayControl());
43515
43769
  };
43516
43770
 
43517
- var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$D);
43771
+ var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$E);
43518
43772
 
43519
43773
  var AmountModule = function AmountModule(_ref) {
43520
43774
  var totalAmountDue = _ref.totalAmountDue,
@@ -44326,14 +44580,14 @@ var labeledAmountTotal = {
44326
44580
  "default": "h6",
44327
44581
  small: "p"
44328
44582
  };
44329
- var fallbackValues$E = {
44583
+ var fallbackValues$F = {
44330
44584
  backgroundColor: backgroundColor$9,
44331
44585
  lineItem: lineItem,
44332
44586
  labeledAmountSubtotal: labeledAmountSubtotal,
44333
44587
  labeledAmountTotal: labeledAmountTotal
44334
44588
  };
44335
44589
 
44336
- var _excluded$y = ["amount"],
44590
+ var _excluded$w = ["amount"],
44337
44591
  _excluded2$1 = ["amount"];
44338
44592
 
44339
44593
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
@@ -44478,7 +44732,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
44478
44732
  return fee.amount > 0;
44479
44733
  }).map(function (_ref5) {
44480
44734
  var amount = _ref5.amount,
44481
- rest = _objectWithoutProperties(_ref5, _excluded$y);
44735
+ rest = _objectWithoutProperties(_ref5, _excluded$w);
44482
44736
 
44483
44737
  return _objectSpread2(_objectSpread2({}, rest), {}, {
44484
44738
  amount: displayCurrency(amount)
@@ -44577,7 +44831,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
44577
44831
  });
44578
44832
  };
44579
44833
 
44580
- var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$E, "default");
44834
+ var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$F, "default");
44581
44835
 
44582
44836
  var linkColor$5 = {
44583
44837
  "default": "#3176AA"
@@ -44594,7 +44848,7 @@ var fontWeight$7 = {
44594
44848
  var modalLinkHoverFocus$1 = {
44595
44849
  "default": "outline: none; text-decoration: underline;"
44596
44850
  };
44597
- var fallbackValues$F = {
44851
+ var fallbackValues$G = {
44598
44852
  linkColor: linkColor$5,
44599
44853
  fontSize: fontSize$a,
44600
44854
  lineHeight: lineHeight$4,
@@ -44653,7 +44907,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
44653
44907
  }, link));
44654
44908
  };
44655
44909
 
44656
- var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$F, "default");
44910
+ var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$G, "default");
44657
44911
 
44658
44912
  var PaymentFormACH = function PaymentFormACH(_ref) {
44659
44913
  var _routingNumberErrors, _accountNumberErrors;
@@ -45018,6 +45272,129 @@ PaymentFormCard$1.reducer = reducer$8;
45018
45272
  PaymentFormCard$1.mapStateToProps = mapStateToProps$9;
45019
45273
  PaymentFormCard$1.mapDispatchToProps = mapDispatchToProps$8;
45020
45274
 
45275
+ var DashboardIframe = styled.iframe.withConfig({
45276
+ displayName: "PeriscopeDashboardIframestyled__DashboardIframe",
45277
+ componentId: "sc-j0cucj-0"
45278
+ })(["border:none;box-shadow:0 0 5px 0 ", ";display:none;"], ALTO_GREY);
45279
+
45280
+ /**
45281
+ * Component: PeriscopeDashboardIframe
45282
+ *
45283
+ * Used for rendering Citybase's periscope reporting dashboards in iframes.
45284
+ * Receives action props to trigger a request on mount for the iframe's url.
45285
+ * Receives a string prop if/when we receive the url result.
45286
+ * And receives action props to emit errors from failed iframe loading.
45287
+ *
45288
+ * The logic and api client methods to handle requests/response,
45289
+ * store the url, etc. should be provided from the app consuming this library.
45290
+ *
45291
+ * If the url request is pending, render a spinner.
45292
+ * If the url request failed, render a UI error state.
45293
+ **/
45294
+
45295
+ var DASHBOARD_SIZE_MESSAGE_TYPE = "dashboard_resize";
45296
+ var PERISCOPE_ORIGIN = "https://app.periscopedata.com";
45297
+
45298
+ var isValidMessage = function isValidMessage(message) {
45299
+ return message.isTrusted && message.origin === PERISCOPE_ORIGIN && message.data && message.data.event_type === DASHBOARD_SIZE_MESSAGE_TYPE;
45300
+ };
45301
+
45302
+ var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
45303
+ var url = _ref.url,
45304
+ requestDashboardUrl = _ref.requestDashboardUrl,
45305
+ periscopeDataPending = _ref.periscopeDataPending,
45306
+ periscopeDataSuccess = _ref.periscopeDataSuccess,
45307
+ periscopeDataFailure = _ref.periscopeDataFailure,
45308
+ periscopeDataRequestSuccess = _ref.periscopeDataRequestSuccess,
45309
+ periscopeDataRequestFailure = _ref.periscopeDataRequestFailure,
45310
+ _ref$timerMS = _ref.timerMS,
45311
+ timerMS = _ref$timerMS === void 0 ? 20000 : _ref$timerMS;
45312
+
45313
+ var _useState = useState(0),
45314
+ _useState2 = _slicedToArray(_useState, 2),
45315
+ height = _useState2[0],
45316
+ setHeight = _useState2[1];
45317
+
45318
+ var time = {
45319
+ timer: null
45320
+ };
45321
+ useEffect$1(function () {
45322
+ time.timer = setTimeout(function () {
45323
+ if (!periscopeDataSuccess) {
45324
+ periscopeDataRequestFailure();
45325
+ }
45326
+ }, timerMS);
45327
+ return function () {
45328
+ return clearTimeout(time.timer);
45329
+ };
45330
+ }, [periscopeDataSuccess]);
45331
+
45332
+ var Dashboard = function Dashboard(height) {
45333
+ return function (url) {
45334
+ return /*#__PURE__*/React.createElement(DashboardIframe, {
45335
+ src: url,
45336
+ width: "100%",
45337
+ height: height,
45338
+ "data-qa": "DashboardIframe",
45339
+ onLoad: function onLoad() {
45340
+ var iframe = document.querySelector("iframe");
45341
+ iframe.style.display = "initial";
45342
+ }
45343
+ });
45344
+ };
45345
+ };
45346
+
45347
+ var validatePeriscope = function validatePeriscope(message) {
45348
+ if (isValidMessage(message)) {
45349
+ setHeight(message.data.dashboard_height + 100);
45350
+
45351
+ if (!periscopeDataSuccess) {
45352
+ clearTimeout(time.timer);
45353
+ periscopeDataRequestSuccess();
45354
+ }
45355
+ }
45356
+ };
45357
+
45358
+ useLayoutEffect(function () {
45359
+ window.addEventListener("message", validatePeriscope);
45360
+ requestDashboardUrl();
45361
+ return function () {
45362
+ return window.removeEventListener("message", validatePeriscope);
45363
+ };
45364
+ }, [requestDashboardUrl]);
45365
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(BoxWithShadow$1, {
45366
+ padding: "0",
45367
+ minWidth: "100%",
45368
+ minHeight: "592px",
45369
+ variant: "baseStandard",
45370
+ background: "#fff",
45371
+ borderRadius: "4px",
45372
+ extraStyles: "display: flex; justify-content: center; align-items: center; flex-direction: column;"
45373
+ }, periscopeDataPending && !periscopeDataSuccess && /*#__PURE__*/React.createElement(Cover, {
45374
+ minHeight: "100%",
45375
+ singleChild: true
45376
+ }, /*#__PURE__*/React.createElement(Center, {
45377
+ intrinsic: true
45378
+ }, /*#__PURE__*/React.createElement(Spinner$2, {
45379
+ size: "100"
45380
+ }))), periscopeDataFailure && !periscopeDataSuccess && /*#__PURE__*/React.createElement(Box, {
45381
+ padding: "64px"
45382
+ }, /*#__PURE__*/React.createElement(Center, {
45383
+ intrinsic: true
45384
+ }, /*#__PURE__*/React.createElement(Box, {
45385
+ padding: "0 0 2rem"
45386
+ }, /*#__PURE__*/React.createElement(PeriscopeFailedIcon, null)), /*#__PURE__*/React.createElement(Heading$1, {
45387
+ variant: "h3",
45388
+ weight: "700"
45389
+ }, "Something Went Wrong"), /*#__PURE__*/React.createElement(Paragraph$1, {
45390
+ variant: "p",
45391
+ extraStyles: "text-align: center;"
45392
+ }, "There was an issue trying to load the dashboard."), /*#__PURE__*/React.createElement(Paragraph$1, {
45393
+ variant: "p",
45394
+ extraStyles: "text-align: center;"
45395
+ }, "Your organization may not have a dashboard configured."))), !periscopeDataFailure && url && Dashboard(height)(url)));
45396
+ };
45397
+
45021
45398
  var PhoneForm = function PhoneForm(_ref) {
45022
45399
  var _phoneErrorMessage;
45023
45400
 
@@ -45087,7 +45464,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
45087
45464
  var bodyBackgroundColor$1 = "#eeeeee";
45088
45465
  var borderColor$3 = "".concat(GREY_CHATEAU);
45089
45466
  var focusStyles = "outline: none;";
45090
- var fallbackValues$G = {
45467
+ var fallbackValues$H = {
45091
45468
  headingBackgroundColor: headingBackgroundColor$1,
45092
45469
  headingDisabledColor: headingDisabledColor,
45093
45470
  bodyBackgroundColor: bodyBackgroundColor$1,
@@ -45306,7 +45683,7 @@ var RadioSection = function RadioSection(_ref) {
45306
45683
  })));
45307
45684
  };
45308
45685
 
45309
- var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$G);
45686
+ var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$H);
45310
45687
 
45311
45688
  var RegistrationForm = function RegistrationForm(_ref) {
45312
45689
  var _emailErrorMessages, _passwordErrorMessage;
@@ -45603,7 +45980,7 @@ var ResetPasswordSuccess = withWindowSize(ResetConfirmationForm$2);
45603
45980
  var activeTabBackground = "#FFFFFF";
45604
45981
  var activeTabAccent = "#15749D";
45605
45982
  var activeTabHover = "#B8D5E1";
45606
- var fallbackValues$H = {
45983
+ var fallbackValues$I = {
45607
45984
  activeTabBackground: activeTabBackground,
45608
45985
  activeTabAccent: activeTabAccent,
45609
45986
  activeTabHover: activeTabHover
@@ -45682,12 +46059,12 @@ var Tabs = function Tabs(_ref) {
45682
46059
  }))));
45683
46060
  };
45684
46061
 
45685
- var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$H);
46062
+ var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$I);
45686
46063
 
45687
46064
  var activeTabBackground$1 = "#FFFFFF";
45688
46065
  var activeTabAccent$1 = "#15749D";
45689
46066
  var activeTabHover$1 = "#B8D5E1";
45690
- var fallbackValues$I = {
46067
+ var fallbackValues$J = {
45691
46068
  activeTabBackground: activeTabBackground$1,
45692
46069
  activeTabAccent: activeTabAccent$1,
45693
46070
  activeTabHover: activeTabHover$1
@@ -45743,7 +46120,7 @@ var TabSidebar = function TabSidebar(_ref) {
45743
46120
  })));
45744
46121
  };
45745
46122
 
45746
- var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$I);
46123
+ var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$J);
45747
46124
 
45748
46125
  var backgroundColor$a = {
45749
46126
  "default": "#ffffff",
@@ -45774,7 +46151,7 @@ var modalLinkHoverFocus$2 = {
45774
46151
  "default": standardInteractionStyles,
45775
46152
  footer: standardInteractionStyles
45776
46153
  };
45777
- var fallbackValues$J = {
46154
+ var fallbackValues$K = {
45778
46155
  backgroundColor: backgroundColor$a,
45779
46156
  linkColor: linkColor$6,
45780
46157
  border: border$3,
@@ -45836,7 +46213,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
45836
46213
  }, link));
45837
46214
  };
45838
46215
 
45839
- var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$J, "default");
46216
+ var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$K, "default");
45840
46217
 
45841
46218
  var TermsAndConditions = function TermsAndConditions(_ref) {
45842
46219
  var onCheck = _ref.onCheck,
@@ -45906,56 +46283,6 @@ var Timeout = function Timeout(_ref) {
45906
46283
 
45907
46284
  var Timeout$1 = withWindowSize(Timeout);
45908
46285
 
45909
- var titleColor$1 = BRIGHT_GREY;
45910
- var textColor$3 = BRIGHT_GREY;
45911
- var titleWeight = FONT_WEIGHT_BOLD;
45912
- var imageBackgroundColor = INFO_BLUE;
45913
- var fallbackValues$K = {
45914
- textColor: textColor$3,
45915
- titleColor: titleColor$1,
45916
- titleWeight: titleWeight,
45917
- imageBackgroundColor: imageBackgroundColor
45918
- };
45919
-
45920
- var WelcomeCard = function WelcomeCard(_ref) {
45921
- var themeValues = _ref.themeValues,
45922
- title = _ref.title,
45923
- text = _ref.text,
45924
- buttonText = _ref.buttonText,
45925
- url = _ref.url,
45926
- imageSrc = _ref.imageSrc,
45927
- newTab = _ref.newTab,
45928
- variant = _ref.variant;
45929
- return /*#__PURE__*/React.createElement(Card$1, {
45930
- variant: variant
45931
- }, imageSrc && /*#__PURE__*/React.createElement(Cover, null, /*#__PURE__*/React.createElement("img", {
45932
- src: imageSrc,
45933
- style: {
45934
- background: "".concat(themeValues.imageBackgroundColor),
45935
- objectFit: "none",
45936
- height: "150px"
45937
- }
45938
- })), /*#__PURE__*/React.createElement(Box, {
45939
- padding: "24px"
45940
- }, /*#__PURE__*/React.createElement(Title$1, {
45941
- variant: "small",
45942
- color: themeValues.titleColor,
45943
- weight: themeValues.titleWeight
45944
- }, title), /*#__PURE__*/React.createElement(Paragraph$1, {
45945
- color: themeValues.textColor
45946
- }, text), url && buttonText && /*#__PURE__*/React.createElement(Box, {
45947
- extraStyles: "margin-top: 4rem; padding: 0"
45948
- }, /*#__PURE__*/React.createElement(ButtonWithLink, {
45949
- extraStyles: "margin: 0; width: 100%",
45950
- linkExtraStyles: "text-decoration:none",
45951
- url: url,
45952
- text: buttonText,
45953
- newTab: newTab
45954
- }))));
45955
- };
45956
-
45957
- var WelcomeCard$1 = themeComponent(WelcomeCard, "WelcomeCard", fallbackValues$K);
45958
-
45959
46286
  var fontWeight$9 = "600";
45960
46287
  var fontColor$1 = WHITE;
45961
46288
  var textAlign$1 = "left";
@@ -46057,129 +46384,6 @@ var WorkflowTile = function WorkflowTile(_ref) {
46057
46384
  }))));
46058
46385
  };
46059
46386
 
46060
- var DashboardIframe = styled.iframe.withConfig({
46061
- displayName: "PeriscopeDashboardIframestyled__DashboardIframe",
46062
- componentId: "sc-j0cucj-0"
46063
- })(["border:none;box-shadow:0 0 5px 0 ", ";display:none;"], ALTO_GREY);
46064
-
46065
- /**
46066
- * Component: PeriscopeDashboardIframe
46067
- *
46068
- * Used for rendering Citybase's periscope reporting dashboards in iframes.
46069
- * Receives action props to trigger a request on mount for the iframe's url.
46070
- * Receives a string prop if/when we receive the url result.
46071
- * And receives action props to emit errors from failed iframe loading.
46072
- *
46073
- * The logic and api client methods to handle requests/response,
46074
- * store the url, etc. should be provided from the app consuming this library.
46075
- *
46076
- * If the url request is pending, render a spinner.
46077
- * If the url request failed, render a UI error state.
46078
- **/
46079
-
46080
- var DASHBOARD_SIZE_MESSAGE_TYPE = "dashboard_resize";
46081
- var PERISCOPE_ORIGIN = "https://app.periscopedata.com";
46082
-
46083
- var isValidMessage = function isValidMessage(message) {
46084
- return message.isTrusted && message.origin === PERISCOPE_ORIGIN && message.data && message.data.event_type === DASHBOARD_SIZE_MESSAGE_TYPE;
46085
- };
46086
-
46087
- var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
46088
- var url = _ref.url,
46089
- requestDashboardUrl = _ref.requestDashboardUrl,
46090
- periscopeDataPending = _ref.periscopeDataPending,
46091
- periscopeDataSuccess = _ref.periscopeDataSuccess,
46092
- periscopeDataFailure = _ref.periscopeDataFailure,
46093
- periscopeDataRequestSuccess = _ref.periscopeDataRequestSuccess,
46094
- periscopeDataRequestFailure = _ref.periscopeDataRequestFailure,
46095
- _ref$timerMS = _ref.timerMS,
46096
- timerMS = _ref$timerMS === void 0 ? 20000 : _ref$timerMS;
46097
-
46098
- var _useState = useState(0),
46099
- _useState2 = _slicedToArray(_useState, 2),
46100
- height = _useState2[0],
46101
- setHeight = _useState2[1];
46102
-
46103
- var time = {
46104
- timer: null
46105
- };
46106
- useEffect$1(function () {
46107
- time.timer = setTimeout(function () {
46108
- if (!periscopeDataSuccess) {
46109
- periscopeDataRequestFailure();
46110
- }
46111
- }, timerMS);
46112
- return function () {
46113
- return clearTimeout(time.timer);
46114
- };
46115
- }, [periscopeDataSuccess]);
46116
-
46117
- var Dashboard = function Dashboard(height) {
46118
- return function (url) {
46119
- return /*#__PURE__*/React.createElement(DashboardIframe, {
46120
- src: url,
46121
- width: "100%",
46122
- height: height,
46123
- "data-qa": "DashboardIframe",
46124
- onLoad: function onLoad() {
46125
- var iframe = document.querySelector("iframe");
46126
- iframe.style.display = "initial";
46127
- }
46128
- });
46129
- };
46130
- };
46131
-
46132
- var validatePeriscope = function validatePeriscope(message) {
46133
- if (isValidMessage(message)) {
46134
- setHeight(message.data.dashboard_height + 100);
46135
-
46136
- if (!periscopeDataSuccess) {
46137
- clearTimeout(time.timer);
46138
- periscopeDataRequestSuccess();
46139
- }
46140
- }
46141
- };
46142
-
46143
- useLayoutEffect(function () {
46144
- window.addEventListener("message", validatePeriscope);
46145
- requestDashboardUrl();
46146
- return function () {
46147
- return window.removeEventListener("message", validatePeriscope);
46148
- };
46149
- }, [requestDashboardUrl]);
46150
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(BoxWithShadow$1, {
46151
- padding: "0",
46152
- minWidth: "100%",
46153
- minHeight: "592px",
46154
- variant: "baseStandard",
46155
- background: "#fff",
46156
- borderRadius: "4px",
46157
- extraStyles: "display: flex; justify-content: center; align-items: center; flex-direction: column;"
46158
- }, periscopeDataPending && !periscopeDataSuccess && /*#__PURE__*/React.createElement(Cover, {
46159
- minHeight: "100%",
46160
- singleChild: true
46161
- }, /*#__PURE__*/React.createElement(Center, {
46162
- intrinsic: true
46163
- }, /*#__PURE__*/React.createElement(Spinner$2, {
46164
- size: "100"
46165
- }))), periscopeDataFailure && !periscopeDataSuccess && /*#__PURE__*/React.createElement(Box, {
46166
- padding: "64px"
46167
- }, /*#__PURE__*/React.createElement(Center, {
46168
- intrinsic: true
46169
- }, /*#__PURE__*/React.createElement(Box, {
46170
- padding: "0 0 2rem"
46171
- }, /*#__PURE__*/React.createElement(PeriscopeFailedIcon, null)), /*#__PURE__*/React.createElement(Heading$1, {
46172
- variant: "h3",
46173
- weight: "700"
46174
- }, "Something Went Wrong"), /*#__PURE__*/React.createElement(Paragraph$1, {
46175
- variant: "p",
46176
- extraStyles: "text-align: center;"
46177
- }, "There was an issue trying to load the dashboard."), /*#__PURE__*/React.createElement(Paragraph$1, {
46178
- variant: "p",
46179
- extraStyles: "text-align: center;"
46180
- }, "Your organization may not have a dashboard configured."))), !periscopeDataFailure && url && Dashboard(height)(url)));
46181
- };
46182
-
46183
46387
  var pageBackground = "#FBFCFD";
46184
46388
  var fallbackValues$M = {
46185
46389
  pageBackground: pageBackground
@@ -46444,41 +46648,11 @@ var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "
46444
46648
 
46445
46649
 
46446
46650
 
46447
- var index$4 = /*#__PURE__*/Object.freeze({
46651
+ var index$5 = /*#__PURE__*/Object.freeze({
46448
46652
  __proto__: null,
46449
46653
  colors: colors,
46450
46654
  fontWeights: style_constants
46451
46655
  });
46452
46656
 
46453
- var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
46454
- var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
46455
- // Only move focus when "hasErrors" is true
46456
- // "hasErrors" is managed by container page of form
46457
- // typically set to "true" on attempted form submission, if errors exist
46458
- // Reset errors, if provided, resets the error state tracking in order to properly re-run
46459
- useEffect$1(function () {
46460
- if (hasErrors) {
46461
- var _inputsWithErrors$;
46462
-
46463
- var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
46464
- inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
46465
- }
46466
-
46467
- return function () {
46468
- return resetHasErrors(false);
46469
- };
46470
- });
46471
- };
46472
-
46473
-
46474
-
46475
- var index$5 = /*#__PURE__*/Object.freeze({
46476
- __proto__: null,
46477
- formats: formats,
46478
- general: general,
46479
- theme: themeUtils,
46480
- useFocusInvalidInput: useFocusInvalidInput
46481
- });
46482
-
46483
- export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, AutopayOnIcon, BankIcon, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, Card$1 as Card, CardWithHeader$1 as CardWithHeader, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackReversalIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, ErroredIcon, ExternalLink, ExternalLinkIcon, FailedIcon, FooterWithSubfooter$1 as FooterWithSubfooter, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, IconAdd, IconQuitLarge, Imposter, InternalLink, InternalUserInfoForm, Jumbo$1 as Jumbo, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, Loading, LoginForm, Modal$1 as Modal, Module$1 as Module, Motion, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NavTabs, NoCustomerResultsIcon, NoPaymentResultsIcon, NotFoundIcon, Obligation, iconsMap as ObligationIcons, Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentIcon, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioSection$1 as RadioSection, Reel, RefundIcon, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess, RoutingNumberImage, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, Switcher, TabSidebar$1 as TabSidebar, TableListItem, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletIcon$1 as WalletIcon, WarningIconXS, WelcomeCard$1 as WelcomeCard, WelcomeModule$1 as WelcomeModule, WorkflowTile, cardRegistry, index$4 as constants, createPartialAmountFormState, index$5 as util, withWindowSize };
46657
+ export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, AutopayOnIcon, BankIcon, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, Card$1 as Card, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackReversalIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, ErroredIcon, ExternalLink, ExternalLinkIcon, FailedIcon, FooterWithSubfooter$1 as FooterWithSubfooter, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, IconAdd, IconQuitLarge, Imposter, InternalLink, InternalUserInfoForm, Jumbo$1 as Jumbo, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, Loading, LoginForm, Modal$1 as Modal, Module$1 as Module, Motion, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NavTabs, NoCustomerResultsIcon, NoPaymentResultsIcon, NotFoundIcon, Obligation, iconsMap as ObligationIcons, Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentIcon, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, Popover$1 as Popover, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioSection$1 as RadioSection, Reel, RefundIcon, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess, RoutingNumberImage, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, Switcher, TabSidebar$1 as TabSidebar, TableListItem, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletIcon$1 as WalletIcon, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, cardRegistry, index$5 as constants, createPartialAmountFormState, index$4 as util, withWindowSize };
46484
46658
  //# sourceMappingURL=index.esm.js.map