@thecb/components 6.3.0-beta.2 → 6.3.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -6338,7 +6338,7 @@ var general = /*#__PURE__*/Object.freeze({
6338
6338
  throttle: throttle
6339
6339
  });
6340
6340
 
6341
- var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children"];
6341
+ var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
6342
6342
 
6343
6343
  var Text = function Text(_ref) {
6344
6344
  var themeValues = _ref.themeValues,
@@ -6356,6 +6356,8 @@ var Text = function Text(_ref) {
6356
6356
  as = _ref.as,
6357
6357
  dataQa = _ref.dataQa,
6358
6358
  children = _ref.children,
6359
+ _ref$variant = _ref.variant,
6360
+ variant = _ref$variant === void 0 ? "p" : _ref$variant,
6359
6361
  rest = _objectWithoutProperties(_ref, _excluded$1);
6360
6362
 
6361
6363
  return /*#__PURE__*/React__default.createElement(TextSpan, _extends({
@@ -6369,7 +6371,8 @@ var Text = function Text(_ref) {
6369
6371
  onClick: onClick,
6370
6372
  onKeyPress: onKeyPress,
6371
6373
  "data-qa": dataQa,
6372
- $textWrap: textWrap
6374
+ $textWrap: textWrap,
6375
+ $variant: variant
6373
6376
  }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
6374
6377
  };
6375
6378
 
@@ -22393,53 +22396,6 @@ var DisplayBox = function DisplayBox(_ref) {
22393
22396
 
22394
22397
  var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$h);
22395
22398
 
22396
- var DisplayCard = function DisplayCard(_ref) {
22397
- var title = _ref.title,
22398
- item = _ref.item,
22399
- buttonText = _ref.buttonText,
22400
- buttonAction = _ref.buttonAction,
22401
- url = _ref.url,
22402
- _ref$link = _ref.link,
22403
- link = _ref$link === void 0 ? false : _ref$link;
22404
- return /*#__PURE__*/React__default.createElement(Box, {
22405
- padding: "0 0 16px"
22406
- }, /*#__PURE__*/React__default.createElement(Stack, {
22407
- childGap: "0rem"
22408
- }, /*#__PURE__*/React__default.createElement(Box, {
22409
- padding: "0 0 8px 0"
22410
- }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
22411
- variant: "pL",
22412
- color: CHARADE_GREY,
22413
- extraStyles: "letter-spacing: 0.29px"
22414
- }, title)), /*#__PURE__*/React__default.createElement(Box, {
22415
- padding: "0"
22416
- }, /*#__PURE__*/React__default.createElement(Box, {
22417
- padding: "24px",
22418
- borderSize: "1px",
22419
- borderRadius: "4px",
22420
- background: WHITE,
22421
- boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
22422
- }, /*#__PURE__*/React__default.createElement(Cluster, {
22423
- justify: "space-between",
22424
- align: "center"
22425
- }, /*#__PURE__*/React__default.createElement(Text$1, {
22426
- variant: "p",
22427
- color: CHARADE_GREY
22428
- }, item), link ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
22429
- text: buttonText,
22430
- url: url,
22431
- variant: "smallGhost",
22432
- dataQa: buttonText,
22433
- extraStyles: "min-width: 0;"
22434
- }) : buttonAction ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
22435
- text: buttonText,
22436
- action: buttonAction,
22437
- variant: "smallGhost",
22438
- dataQa: buttonText,
22439
- extraStyles: "min-width: 0;"
22440
- }) : /*#__PURE__*/React__default.createElement(React.Fragment, null))))));
22441
- };
22442
-
22443
22399
  function _extends$2() {
22444
22400
  _extends$2 = Object.assign || function (target) {
22445
22401
  for (var i = 1; i < arguments.length; i++) {
@@ -22718,6 +22674,284 @@ var FormattedInput = function FormattedInput(_ref) {
22718
22674
  }));
22719
22675
  };
22720
22676
 
22677
+ var formatDelimiter = "_";
22678
+ var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
22679
+ var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
22680
+ var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
22681
+ var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
22682
+ var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
22683
+ var zipFormat = createFormat(zipFormats, formatDelimiter);
22684
+ var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
22685
+ var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
22686
+ var phoneFormat = createFormat(phoneFormats, formatDelimiter);
22687
+ var moneyFormat = createFormat(moneyFormats, formatDelimiter);
22688
+
22689
+ var formats = /*#__PURE__*/Object.freeze({
22690
+ __proto__: null,
22691
+ formatDelimiter: formatDelimiter,
22692
+ phoneFormats: phoneFormats,
22693
+ moneyFormats: moneyFormats,
22694
+ expirationDateFormats: expirationDateFormats,
22695
+ zipFormat: zipFormat,
22696
+ creditCardFormat: creditCardFormat,
22697
+ expirationDateFormat: expirationDateFormat,
22698
+ phoneFormat: phoneFormat,
22699
+ moneyFormat: moneyFormat
22700
+ });
22701
+
22702
+ var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
22703
+ var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
22704
+ // Only move focus when "hasErrors" is true
22705
+ // "hasErrors" is managed by container page of form
22706
+ // typically set to "true" on attempted form submission, if errors exist
22707
+ // Reset errors, if provided, resets the error state tracking in order to properly re-run
22708
+ React.useEffect(function () {
22709
+ if (hasErrors) {
22710
+ var _inputsWithErrors$;
22711
+
22712
+ var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
22713
+ inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
22714
+ }
22715
+
22716
+ return function () {
22717
+ return resetHasErrors(false);
22718
+ };
22719
+ });
22720
+ };
22721
+
22722
+ /*
22723
+ Hook that assigns a click event listener to the main document element
22724
+ Returns a ref to attach to another element (like an icon/button that triggers a popover)
22725
+ If a click event gets captured by the document and the assigned element isn't the target
22726
+ hook will run whatever handler is passed (eg a function that closes a popover)
22727
+
22728
+ See popover component for implementation
22729
+
22730
+ */
22731
+
22732
+ var useOutsideClickHook$1 = function useOutsideClickHook(handler) {
22733
+ var ref = React.useRef();
22734
+ React.useEffect(function () {
22735
+ }, [ref]);
22736
+ return ref;
22737
+ };
22738
+
22739
+
22740
+
22741
+ var index$4 = /*#__PURE__*/Object.freeze({
22742
+ __proto__: null,
22743
+ formats: formats,
22744
+ general: general,
22745
+ theme: themeUtils,
22746
+ useFocusInvalidInput: useFocusInvalidInput,
22747
+ useOutsideClick: useOutsideClickHook$1
22748
+ });
22749
+
22750
+ var hoverColor$4 = "#116285";
22751
+ var activeColor$4 = "#0E506D";
22752
+ var popoverTriggerColor = "#15749D";
22753
+ var fallbackValues$i = {
22754
+ hoverColor: hoverColor$4,
22755
+ activeColor: activeColor$4,
22756
+ popoverTriggerColor: popoverTriggerColor
22757
+ };
22758
+
22759
+ var Popover = function Popover(_ref) {
22760
+ var themeValues = _ref.themeValues,
22761
+ _ref$triggerText = _ref.triggerText,
22762
+ triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
22763
+ _ref$content = _ref.content,
22764
+ content = _ref$content === void 0 ? "" : _ref$content,
22765
+ _ref$hasIcon = _ref.hasIcon,
22766
+ hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
22767
+ Icon = _ref.icon,
22768
+ _ref$iconHelpText = _ref.iconHelpText,
22769
+ iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
22770
+ _ref$popoverID = _ref.popoverID,
22771
+ popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
22772
+ _ref$popoverFocus = _ref.popoverFocus,
22773
+ popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
22774
+ extraStyles = _ref.extraStyles,
22775
+ textExtraStyles = _ref.textExtraStyles,
22776
+ _ref$minWidth = _ref.minWidth,
22777
+ minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
22778
+ _ref$maxWidth = _ref.maxWidth,
22779
+ maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
22780
+ _ref$height = _ref.height,
22781
+ height = _ref$height === void 0 ? "auto" : _ref$height,
22782
+ position = _ref.position,
22783
+ arrowPosition = _ref.arrowPosition;
22784
+ var hoverColor = themeValues.hoverColor,
22785
+ activeColor = themeValues.activeColor,
22786
+ popoverTriggerColor = themeValues.popoverTriggerColor;
22787
+
22788
+ var _ref2 = position !== null && position !== void 0 ? position : {},
22789
+ _ref2$top = _ref2.top,
22790
+ top = _ref2$top === void 0 ? "-110px" : _ref2$top,
22791
+ _ref2$right = _ref2.right,
22792
+ right = _ref2$right === void 0 ? "auto" : _ref2$right,
22793
+ _ref2$bottom = _ref2.bottom,
22794
+ bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
22795
+ _ref2$left = _ref2.left,
22796
+ left = _ref2$left === void 0 ? "-225px" : _ref2$left;
22797
+
22798
+ var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
22799
+ _ref3$arrowTop = _ref3.arrowTop,
22800
+ arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
22801
+ _ref3$arrowRight = _ref3.arrowRight,
22802
+ arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
22803
+ _ref3$arrowBottom = _ref3.arrowBottom,
22804
+ arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
22805
+ _ref3$arrowLeft = _ref3.arrowLeft,
22806
+ arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
22807
+
22808
+ var _useState = React.useState(false),
22809
+ _useState2 = _slicedToArray(_useState, 2),
22810
+ popoverOpen = _useState2[0],
22811
+ togglePopover = _useState2[1];
22812
+
22813
+ var handleTogglePopover = function handleTogglePopover(popoverState) {
22814
+ if (popoverOpen !== popoverState) {
22815
+ togglePopover(popoverState);
22816
+ }
22817
+ };
22818
+
22819
+ var triggerRef = useOutsideClickHook(function () {
22820
+ return handleTogglePopover(false);
22821
+ });
22822
+ return /*#__PURE__*/React__default.createElement(Box, {
22823
+ padding: "0",
22824
+ extraStyles: "position: relative; ".concat(extraStyles)
22825
+ }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
22826
+ action: function action() {
22827
+ return noop;
22828
+ },
22829
+ onFocus: function onFocus() {
22830
+ handleTogglePopover(true);
22831
+ },
22832
+ onBlur: function onBlur() {
22833
+ handleTogglePopover(false);
22834
+ },
22835
+ onKeyDown: function onKeyDown(e) {
22836
+ if (e.keyCode === 27) {
22837
+ handleTogglePopover(false);
22838
+ }
22839
+ },
22840
+ onTouchStart: function onTouchStart() {
22841
+ return handleTogglePopover(true);
22842
+ },
22843
+ onTouchEnd: function onTouchEnd() {
22844
+ return handleTogglePopover(false);
22845
+ },
22846
+ onMouseEnter: function onMouseEnter() {
22847
+ return handleTogglePopover(true);
22848
+ },
22849
+ onMouseLeave: function onMouseLeave() {
22850
+ return handleTogglePopover(false);
22851
+ },
22852
+ contentOverride: true,
22853
+ variant: "smallGhost",
22854
+ tabIndex: "0",
22855
+ id: "btnPopover".concat(popoverID),
22856
+ "aria-expanded": popoverOpen,
22857
+ "aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
22858
+ "aria-describedby": "Disclosure".concat(popoverID),
22859
+ "aria-controls": "Disclosed".concat(popoverID),
22860
+ ref: triggerRef
22861
+ }, hasIcon && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, null), /*#__PURE__*/React__default.createElement(Box, {
22862
+ padding: "0",
22863
+ srOnly: true
22864
+ }, /*#__PURE__*/React__default.createElement(Text$1, {
22865
+ id: "btnPopover".concat(popoverID, "_info")
22866
+ }, iconHelpText))), !hasIcon && /*#__PURE__*/React__default.createElement(Text$1, {
22867
+ color: popoverTriggerColor,
22868
+ extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
22869
+ }, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
22870
+ background: "white",
22871
+ borderRadius: "4px",
22872
+ boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
22873
+ id: "Disclosed".concat(popoverID),
22874
+ role: "region",
22875
+ "aria-describedby": "Disclosure".concat(popoverID),
22876
+ tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
22877
+ minWidth: minWidth,
22878
+ maxWidth: maxWidth,
22879
+ 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 ")
22880
+ }, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
22881
+ padding: "0",
22882
+ 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, ";")
22883
+ })));
22884
+ };
22885
+
22886
+ var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$i);
22887
+
22888
+ var DisplayCard = function DisplayCard(_ref) {
22889
+ var title = _ref.title,
22890
+ item = _ref.item,
22891
+ buttonText = _ref.buttonText,
22892
+ buttonAction = _ref.buttonAction,
22893
+ url = _ref.url,
22894
+ _ref$link = _ref.link,
22895
+ link = _ref$link === void 0 ? false : _ref$link,
22896
+ helpText = _ref.helpText,
22897
+ _ref$hasPopover = _ref.hasPopover,
22898
+ hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
22899
+ _ref$popoverTriggerTe = _ref.popoverTriggerText,
22900
+ popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
22901
+ _ref$popoverContent = _ref.popoverContent,
22902
+ popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
22903
+ popoverExtraStyles = _ref.popoverExtraStyles,
22904
+ popoverTextExtraStyles = _ref.popoverTextExtraStyles;
22905
+ return /*#__PURE__*/React__default.createElement(Box, {
22906
+ padding: "0 0 16px"
22907
+ }, /*#__PURE__*/React__default.createElement(Stack, {
22908
+ childGap: "0rem"
22909
+ }, /*#__PURE__*/React__default.createElement(Box, {
22910
+ padding: "0 0 8px 0"
22911
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
22912
+ justify: "space-between",
22913
+ align: "center",
22914
+ overflow: true
22915
+ }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
22916
+ variant: "pL",
22917
+ color: CHARADE_GREY,
22918
+ extraStyles: "letter-spacing: 0.29px"
22919
+ }, title), hasPopover && /*#__PURE__*/React__default.createElement(Popover$1, {
22920
+ triggerText: popoverTriggerText,
22921
+ content: popoverContent,
22922
+ popoverExtraStyles: popoverExtraStyles,
22923
+ popoverTextExtraStyles: popoverTextExtraStyles
22924
+ }))), /*#__PURE__*/React__default.createElement(Box, {
22925
+ padding: "0"
22926
+ }, /*#__PURE__*/React__default.createElement(Box, {
22927
+ padding: "24px",
22928
+ borderSize: "1px",
22929
+ borderRadius: "4px",
22930
+ background: WHITE,
22931
+ boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
22932
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
22933
+ justify: "space-between",
22934
+ align: "center"
22935
+ }, /*#__PURE__*/React__default.createElement(Text$1, {
22936
+ color: CHARADE_GREY
22937
+ }, item), link ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
22938
+ text: buttonText,
22939
+ url: url,
22940
+ variant: "smallGhost",
22941
+ dataQa: buttonText,
22942
+ extraStyles: "min-width: 0;"
22943
+ }) : buttonAction ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
22944
+ text: buttonText,
22945
+ action: buttonAction,
22946
+ variant: "smallGhost",
22947
+ dataQa: buttonText,
22948
+ extraStyles: "min-width: 0;"
22949
+ }) : helpText ? /*#__PURE__*/React__default.createElement(Text$1, {
22950
+ color: STORM_GREY,
22951
+ extraStyles: "font-style: italic;"
22952
+ }, helpText) : /*#__PURE__*/React__default.createElement(React.Fragment, null))))));
22953
+ };
22954
+
22721
22955
  var linkColor$2 = {
22722
22956
  "default": "".concat(MATISSE_BLUE),
22723
22957
  disabled: "".concat(MATISSE_BLUE)
@@ -22767,7 +23001,7 @@ var hoverFocusStyles$1 = {
22767
23001
  var formFooterPanel = {
22768
23002
  "default": "".concat(INFO_BLUE)
22769
23003
  };
22770
- var fallbackValues$i = {
23004
+ var fallbackValues$j = {
22771
23005
  linkColor: linkColor$2,
22772
23006
  formBackgroundColor: formBackgroundColor$1,
22773
23007
  inputBackgroundColor: inputBackgroundColor$1,
@@ -22989,7 +23223,7 @@ var FormInput = function FormInput(_ref15) {
22989
23223
  }, decorator)));
22990
23224
  };
22991
23225
 
22992
- var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$i, "default");
23226
+ var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$j, "default");
22993
23227
 
22994
23228
  var _excluded$q = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
22995
23229
 
@@ -23045,7 +23279,7 @@ var FormContainer = function FormContainer(_ref) {
23045
23279
  }, rest), children);
23046
23280
  };
23047
23281
 
23048
- var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$i, "default");
23282
+ var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$j, "default");
23049
23283
 
23050
23284
  var FormFooterPanel = function FormFooterPanel(_ref) {
23051
23285
  var themeValues = _ref.themeValues,
@@ -23069,7 +23303,7 @@ var FormFooterPanel = function FormFooterPanel(_ref) {
23069
23303
  })));
23070
23304
  };
23071
23305
 
23072
- var FormFooterPanel$1 = themeComponent(withWindowSize(FormFooterPanel), "FormFooterPanel", fallbackValues$i, "default");
23306
+ var FormFooterPanel$1 = themeComponent(withWindowSize(FormFooterPanel), "FormFooterPanel", fallbackValues$j, "default");
23073
23307
 
23074
23308
  var fontSize$7 = {
23075
23309
  "default": "1rem",
@@ -23083,7 +23317,7 @@ var color$7 = {
23083
23317
  "default": "".concat(CHARADE_GREY),
23084
23318
  radio: "".concat(MINESHAFT_GREY)
23085
23319
  };
23086
- var fallbackValues$j = {
23320
+ var fallbackValues$k = {
23087
23321
  fontSize: fontSize$7,
23088
23322
  padding: padding$1,
23089
23323
  color: color$7
@@ -23126,11 +23360,11 @@ var FormattedAddress = function FormattedAddress(_ref) {
23126
23360
  }, city, ", ", stateProvince, " ".concat(zip), country ? " ".concat(country) : "")));
23127
23361
  };
23128
23362
 
23129
- var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$j, "default");
23363
+ var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$k, "default");
23130
23364
 
23131
23365
  var textColor$1 = "".concat(CHARADE_GREY);
23132
23366
  var autopayTextColor = "".concat(REGENT_GREY);
23133
- var fallbackValues$k = {
23367
+ var fallbackValues$l = {
23134
23368
  textColor: textColor$1,
23135
23369
  autopayTextColor: autopayTextColor
23136
23370
  };
@@ -23196,7 +23430,7 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
23196
23430
  }, "Autopay Enabled")));
23197
23431
  };
23198
23432
 
23199
- var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$k);
23433
+ var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$l);
23200
23434
 
23201
23435
  var Hamburger = styled__default.button.withConfig({
23202
23436
  displayName: "HamburgerButton__Hamburger",
@@ -23278,7 +23512,7 @@ var fontSize$8 = {
23278
23512
  h5: "1.375rem",
23279
23513
  h6: "1.25rem"
23280
23514
  };
23281
- var fallbackValues$l = {
23515
+ var fallbackValues$m = {
23282
23516
  fontFamily: fontFamily$5,
23283
23517
  fontSize: fontSize$8
23284
23518
  };
@@ -23320,7 +23554,7 @@ var Heading = function Heading(_ref) {
23320
23554
  }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
23321
23555
  };
23322
23556
 
23323
- var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$l, "h1");
23557
+ var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$m, "h1");
23324
23558
 
23325
23559
  var Jumbo = function Jumbo(_ref) {
23326
23560
  var showButton = _ref.showButton,
@@ -23394,7 +23628,7 @@ var fontWeight$4 = {
23394
23628
  pL: "600",
23395
23629
  h6: "700"
23396
23630
  };
23397
- var fallbackValues$m = {
23631
+ var fallbackValues$n = {
23398
23632
  fontWeight: fontWeight$4
23399
23633
  };
23400
23634
 
@@ -23422,7 +23656,7 @@ var LabeledAmount = function LabeledAmount(_ref) {
23422
23656
  }, amount));
23423
23657
  };
23424
23658
 
23425
- var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$m, "default");
23659
+ var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$n, "default");
23426
23660
 
23427
23661
  var weightTitle = {
23428
23662
  "default": "600",
@@ -23432,7 +23666,7 @@ var paragraphVariant = {
23432
23666
  "default": "pL",
23433
23667
  small: "pS"
23434
23668
  };
23435
- var fallbackValues$n = {
23669
+ var fallbackValues$o = {
23436
23670
  weightTitle: weightTitle,
23437
23671
  paragraphVariant: paragraphVariant
23438
23672
  };
@@ -23461,10 +23695,10 @@ var LineItem = function LineItem(_ref) {
23461
23695
  }, amount));
23462
23696
  };
23463
23697
 
23464
- var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$n, "default");
23698
+ var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$o, "default");
23465
23699
 
23466
23700
  var color$8 = "#15749D";
23467
- var fallbackValues$o = {
23701
+ var fallbackValues$p = {
23468
23702
  color: color$8
23469
23703
  };
23470
23704
 
@@ -23503,7 +23737,7 @@ var Spinner$1 = function Spinner(_ref4) {
23503
23737
  })));
23504
23738
  };
23505
23739
 
23506
- var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$o);
23740
+ var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$p);
23507
23741
 
23508
23742
  var Loading = function Loading() {
23509
23743
  return /*#__PURE__*/React__default.createElement(Box, {
@@ -23769,7 +24003,7 @@ var height$1 = {
23769
24003
  "default": "3rem",
23770
24004
  large: "192px"
23771
24005
  };
23772
- var fallbackValues$p = {
24006
+ var fallbackValues$q = {
23773
24007
  color: color$9,
23774
24008
  height: height$1
23775
24009
  };
@@ -23862,12 +24096,12 @@ var Placeholder = function Placeholder(_ref2) {
23862
24096
  }, text)))))))))));
23863
24097
  };
23864
24098
 
23865
- var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$p, "default");
24099
+ var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$q, "default");
23866
24100
 
23867
24101
  var backgroundColor$4 = {
23868
24102
  "default": "".concat(WHITE)
23869
24103
  };
23870
- var fallbackValues$q = {
24104
+ var fallbackValues$r = {
23871
24105
  backgroundColor: backgroundColor$4
23872
24106
  };
23873
24107
 
@@ -23895,12 +24129,12 @@ var ProcessingFee = function ProcessingFee(_ref) {
23895
24129
  }));
23896
24130
  };
23897
24131
 
23898
- var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$q, "default");
24132
+ var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$r, "default");
23899
24133
 
23900
- var activeColor$4 = "".concat(MATISSE_BLUE);
24134
+ var activeColor$5 = "".concat(MATISSE_BLUE);
23901
24135
  var inactiveColor = "".concat(GREY_CHATEAU);
23902
- var fallbackValues$r = {
23903
- activeColor: activeColor$4,
24136
+ var fallbackValues$s = {
24137
+ activeColor: activeColor$5,
23904
24138
  inactiveColor: inactiveColor
23905
24139
  };
23906
24140
 
@@ -23989,12 +24223,12 @@ var RadioButton$1 = function RadioButton(_ref2) {
23989
24223
  })));
23990
24224
  };
23991
24225
 
23992
- var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$r);
24226
+ var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$s);
23993
24227
 
23994
24228
  var border$2 = {
23995
24229
  "default": "1px solid #caced8"
23996
24230
  };
23997
- var fallbackValues$s = {
24231
+ var fallbackValues$t = {
23998
24232
  border: border$2
23999
24233
  };
24000
24234
 
@@ -24069,7 +24303,7 @@ var SearchableSelect = function SearchableSelect(_ref) {
24069
24303
  })))));
24070
24304
  };
24071
24305
 
24072
- var SearchableSelect$1 = themeComponent(SearchableSelect, "SearchableSelect", fallbackValues$s, "default");
24306
+ var SearchableSelect$1 = themeComponent(SearchableSelect, "SearchableSelect", fallbackValues$t, "default");
24073
24307
 
24074
24308
  var borderColor$2 = {
24075
24309
  "default": "".concat(GREY_CHATEAU)
@@ -24077,7 +24311,7 @@ var borderColor$2 = {
24077
24311
  var borderSize = {
24078
24312
  "default": "1px"
24079
24313
  };
24080
- var fallbackValues$t = {
24314
+ var fallbackValues$u = {
24081
24315
  borderColor: borderColor$2,
24082
24316
  borderSize: borderSize
24083
24317
  };
@@ -24094,7 +24328,7 @@ var SolidDivider = function SolidDivider(_ref) {
24094
24328
  });
24095
24329
  };
24096
24330
 
24097
- var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$t, "default");
24331
+ var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$u, "default");
24098
24332
 
24099
24333
  var placeHolderOptionUS = {
24100
24334
  text: "Please select state",
@@ -34678,7 +34912,7 @@ var offBackground = "".concat(REGENT_GREY);
34678
34912
  var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
34679
34913
  var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
34680
34914
  var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
34681
- var fallbackValues$u = {
34915
+ var fallbackValues$v = {
34682
34916
  onBackground: onBackground,
34683
34917
  disabledBackground: disabledBackground,
34684
34918
  white: white,
@@ -34853,7 +35087,7 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
34853
35087
  }, label))));
34854
35088
  };
34855
35089
 
34856
- var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$u);
35090
+ var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$v);
34857
35091
 
34858
35092
  var background$1 = "".concat(ATHENS_GREY);
34859
35093
  var white$1 = "".concat(WHITE);
@@ -34899,31 +35133,20 @@ var TypeaheadInput = function TypeaheadInput(_ref) {
34899
35133
  };
34900
35134
 
34901
35135
  var backgroundColor$5 = WHITE;
34902
- var fallbackValues$v = {
35136
+ var fallbackValues$w = {
34903
35137
  backgroundColor: backgroundColor$5
34904
35138
  };
34905
35139
 
34906
- var _excluded$w = ["themeValues", "variant", "children", "extraStyles"];
35140
+ var _excluded$w = ["themeValues", "variant", "children", "extraStyles", "width"];
34907
35141
 
34908
- var CardVariantSwitcher$1 = function CardVariantSwitcher(_ref) {
34909
- var variant = _ref.variant,
34910
- children = _ref.children;
34911
- return variant === "vertical" ? /*#__PURE__*/React__default.createElement(React.Fragment, null, children) : /*#__PURE__*/React__default.createElement(Box, {
34912
- padding: "0",
34913
- extraStyles: "width: 100%"
34914
- }, /*#__PURE__*/React__default.createElement(Stack, {
34915
- childGap: "0",
34916
- maxWidth: "100%",
34917
- fullHeight: true
34918
- }, children));
34919
- };
34920
-
34921
- var Card = function Card(_ref2) {
34922
- var themeValues = _ref2.themeValues,
34923
- variant = _ref2.variant,
34924
- children = _ref2.children,
34925
- extraStyles = _ref2.extraStyles,
34926
- props = _objectWithoutProperties(_ref2, _excluded$w);
35142
+ var Card = function Card(_ref) {
35143
+ var themeValues = _ref.themeValues,
35144
+ variant = _ref.variant,
35145
+ children = _ref.children,
35146
+ extraStyles = _ref.extraStyles,
35147
+ _ref$width = _ref.width,
35148
+ width = _ref$width === void 0 ? "276px" : _ref$width,
35149
+ props = _objectWithoutProperties(_ref, _excluded$w);
34927
35150
 
34928
35151
  return /*#__PURE__*/React__default.createElement(BoxWithShadow$1, _extends({
34929
35152
  variant: "baseStandard",
@@ -34931,26 +35154,19 @@ var Card = function Card(_ref2) {
34931
35154
  borderRadius: "4px",
34932
35155
  padding: "0",
34933
35156
  margin: "0",
34934
- maxWidth: variant !== "vertical" ? "100%" : "276px",
34935
- minHeight: "100%",
34936
- minWidth: variant !== "vertical" && "276px",
35157
+ minWidth: width,
34937
35158
  extraStyles: extraStyles
34938
- }, props), /*#__PURE__*/React__default.createElement(Cover, {
34939
- singleChild: true,
34940
- fillCenter: true
34941
- }, /*#__PURE__*/React__default.createElement(CardVariantSwitcher$1, {
34942
- variant: variant
34943
- }, children)));
35159
+ }, props), /*#__PURE__*/React__default.createElement(Cover, null, children));
34944
35160
  };
34945
35161
 
34946
- var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$v);
35162
+ var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$w);
34947
35163
 
34948
35164
  var fontFamily$6 = "Public Sans, sans-serif";
34949
- var activeColor$5 = MATISSE_BLUE;
35165
+ var activeColor$6 = MATISSE_BLUE;
34950
35166
  var linkColor$3 = CHARADE_GREY;
34951
- var fallbackValues$w = {
35167
+ var fallbackValues$x = {
34952
35168
  fontFamily: fontFamily$6,
34953
- activeColor: activeColor$5,
35169
+ activeColor: activeColor$6,
34954
35170
  linkColor: linkColor$3
34955
35171
  };
34956
35172
 
@@ -34981,7 +35197,7 @@ var NavTab = function NavTab(_ref) {
34981
35197
  }, label));
34982
35198
  };
34983
35199
 
34984
- var NavTab$1 = themeComponent(NavTab, "NavTab", fallbackValues$w);
35200
+ var NavTab$1 = themeComponent(NavTab, "NavTab", fallbackValues$x);
34985
35201
 
34986
35202
  var NavTabs = function NavTabs(_ref) {
34987
35203
  var tabsConfig = _ref.tabsConfig,
@@ -36760,31 +36976,6 @@ const createFormState = formConfig => ({
36760
36976
  mapStateToProps: mapStateToProps
36761
36977
  });
36762
36978
 
36763
- var formatDelimiter = "_";
36764
- var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
36765
- var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
36766
- var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
36767
- var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
36768
- var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
36769
- var zipFormat = createFormat(zipFormats, formatDelimiter);
36770
- var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
36771
- var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
36772
- var phoneFormat = createFormat(phoneFormats, formatDelimiter);
36773
- var moneyFormat = createFormat(moneyFormats, formatDelimiter);
36774
-
36775
- var formats = /*#__PURE__*/Object.freeze({
36776
- __proto__: null,
36777
- formatDelimiter: formatDelimiter,
36778
- phoneFormats: phoneFormats,
36779
- moneyFormats: moneyFormats,
36780
- expirationDateFormats: expirationDateFormats,
36781
- zipFormat: zipFormat,
36782
- creditCardFormat: creditCardFormat,
36783
- expirationDateFormat: expirationDateFormat,
36784
- phoneFormat: phoneFormat,
36785
- moneyFormat: moneyFormat
36786
- });
36787
-
36788
36979
  var AddressForm = function AddressForm(_ref) {
36789
36980
  var _zipErrorMessages;
36790
36981
 
@@ -36932,38 +37123,6 @@ AddressForm.reducer = reducer;
36932
37123
  AddressForm.mapStateToProps = mapStateToProps$1;
36933
37124
  AddressForm.mapDispatchToProps = mapDispatchToProps;
36934
37125
 
36935
- var headerBackgroundColor = STORM_GREY;
36936
- var headerTextColor = WHITE;
36937
- var fallbackValues$x = {
36938
- headerBackgroundColor: headerBackgroundColor,
36939
- headerTextColor: headerTextColor
36940
- };
36941
-
36942
- var _excluded$x = ["themeValues", "children", "header", "extraStyles"];
36943
-
36944
- var CardWithHeader = function CardWithHeader(_ref) {
36945
- var themeValues = _ref.themeValues,
36946
- children = _ref.children,
36947
- header = _ref.header,
36948
- extraStyles = _ref.extraStyles,
36949
- props = _objectWithoutProperties(_ref, _excluded$x);
36950
-
36951
- return /*#__PURE__*/React__default.createElement(Card$1, _extends({
36952
- extraStyles: extraStyles
36953
- }, props), /*#__PURE__*/React__default.createElement(Box, {
36954
- padding: "24px",
36955
- background: themeValues.headerBackgroundColor,
36956
- extraStyles: "\n border-radius: 4px 4px 0 0;\n "
36957
- }, /*#__PURE__*/React__default.createElement(Title$1, {
36958
- variant: "small",
36959
- color: themeValues.headerTextColor
36960
- }, header)), /*#__PURE__*/React__default.createElement(Box, {
36961
- padding: "24px"
36962
- }, children));
36963
- };
36964
-
36965
- var CardWithHeader$1 = themeComponent(CardWithHeader, "CardWithHeader", fallbackValues$x);
36966
-
36967
37126
  var ChangePasswordForm = function ChangePasswordForm(_ref) {
36968
37127
  var _newPasswordErrorMess;
36969
37128
 
@@ -43404,15 +43563,15 @@ var TitleModule = function TitleModule(_ref) {
43404
43563
  };
43405
43564
 
43406
43565
  var color$a = "#15749D";
43407
- var hoverColor$4 = "#116285";
43408
- var activeColor$6 = "#0E506D";
43566
+ var hoverColor$5 = "#116285";
43567
+ var activeColor$7 = "#0E506D";
43409
43568
  var linkColor$4 = "#3176AA";
43410
43569
  var fontWeight$6 = FONT_WEIGHT_REGULAR;
43411
43570
  var modalLinkHoverFocus = "outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;";
43412
43571
  var fallbackValues$D = {
43413
43572
  color: color$a,
43414
- hoverColor: hoverColor$4,
43415
- activeColor: activeColor$6,
43573
+ hoverColor: hoverColor$5,
43574
+ activeColor: activeColor$7,
43416
43575
  linkColor: linkColor$4,
43417
43576
  fontWeight: fontWeight$6,
43418
43577
  modalLinkHoverFocus: modalLinkHoverFocus
@@ -44340,7 +44499,7 @@ var fallbackValues$E = {
44340
44499
  labeledAmountTotal: labeledAmountTotal
44341
44500
  };
44342
44501
 
44343
- var _excluded$y = ["amount"],
44502
+ var _excluded$x = ["amount"],
44344
44503
  _excluded2$1 = ["amount"];
44345
44504
 
44346
44505
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
@@ -44485,7 +44644,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
44485
44644
  return fee.amount > 0;
44486
44645
  }).map(function (_ref5) {
44487
44646
  var amount = _ref5.amount,
44488
- rest = _objectWithoutProperties(_ref5, _excluded$y);
44647
+ rest = _objectWithoutProperties(_ref5, _excluded$x);
44489
44648
 
44490
44649
  return _objectSpread2(_objectSpread2({}, rest), {}, {
44491
44650
  amount: displayCurrency(amount)
@@ -45025,6 +45184,129 @@ PaymentFormCard$1.reducer = reducer$8;
45025
45184
  PaymentFormCard$1.mapStateToProps = mapStateToProps$9;
45026
45185
  PaymentFormCard$1.mapDispatchToProps = mapDispatchToProps$8;
45027
45186
 
45187
+ var DashboardIframe = styled__default.iframe.withConfig({
45188
+ displayName: "PeriscopeDashboardIframestyled__DashboardIframe",
45189
+ componentId: "sc-j0cucj-0"
45190
+ })(["border:none;box-shadow:0 0 5px 0 ", ";display:none;"], ALTO_GREY);
45191
+
45192
+ /**
45193
+ * Component: PeriscopeDashboardIframe
45194
+ *
45195
+ * Used for rendering Citybase's periscope reporting dashboards in iframes.
45196
+ * Receives action props to trigger a request on mount for the iframe's url.
45197
+ * Receives a string prop if/when we receive the url result.
45198
+ * And receives action props to emit errors from failed iframe loading.
45199
+ *
45200
+ * The logic and api client methods to handle requests/response,
45201
+ * store the url, etc. should be provided from the app consuming this library.
45202
+ *
45203
+ * If the url request is pending, render a spinner.
45204
+ * If the url request failed, render a UI error state.
45205
+ **/
45206
+
45207
+ var DASHBOARD_SIZE_MESSAGE_TYPE = "dashboard_resize";
45208
+ var PERISCOPE_ORIGIN = "https://app.periscopedata.com";
45209
+
45210
+ var isValidMessage = function isValidMessage(message) {
45211
+ return message.isTrusted && message.origin === PERISCOPE_ORIGIN && message.data && message.data.event_type === DASHBOARD_SIZE_MESSAGE_TYPE;
45212
+ };
45213
+
45214
+ var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
45215
+ var url = _ref.url,
45216
+ requestDashboardUrl = _ref.requestDashboardUrl,
45217
+ periscopeDataPending = _ref.periscopeDataPending,
45218
+ periscopeDataSuccess = _ref.periscopeDataSuccess,
45219
+ periscopeDataFailure = _ref.periscopeDataFailure,
45220
+ periscopeDataRequestSuccess = _ref.periscopeDataRequestSuccess,
45221
+ periscopeDataRequestFailure = _ref.periscopeDataRequestFailure,
45222
+ _ref$timerMS = _ref.timerMS,
45223
+ timerMS = _ref$timerMS === void 0 ? 20000 : _ref$timerMS;
45224
+
45225
+ var _useState = React.useState(0),
45226
+ _useState2 = _slicedToArray(_useState, 2),
45227
+ height = _useState2[0],
45228
+ setHeight = _useState2[1];
45229
+
45230
+ var time = {
45231
+ timer: null
45232
+ };
45233
+ React.useEffect(function () {
45234
+ time.timer = setTimeout(function () {
45235
+ if (!periscopeDataSuccess) {
45236
+ periscopeDataRequestFailure();
45237
+ }
45238
+ }, timerMS);
45239
+ return function () {
45240
+ return clearTimeout(time.timer);
45241
+ };
45242
+ }, [periscopeDataSuccess]);
45243
+
45244
+ var Dashboard = function Dashboard(height) {
45245
+ return function (url) {
45246
+ return /*#__PURE__*/React__default.createElement(DashboardIframe, {
45247
+ src: url,
45248
+ width: "100%",
45249
+ height: height,
45250
+ "data-qa": "DashboardIframe",
45251
+ onLoad: function onLoad() {
45252
+ var iframe = document.querySelector("iframe");
45253
+ iframe.style.display = "initial";
45254
+ }
45255
+ });
45256
+ };
45257
+ };
45258
+
45259
+ var validatePeriscope = function validatePeriscope(message) {
45260
+ if (isValidMessage(message)) {
45261
+ setHeight(message.data.dashboard_height + 100);
45262
+
45263
+ if (!periscopeDataSuccess) {
45264
+ clearTimeout(time.timer);
45265
+ periscopeDataRequestSuccess();
45266
+ }
45267
+ }
45268
+ };
45269
+
45270
+ React.useLayoutEffect(function () {
45271
+ window.addEventListener("message", validatePeriscope);
45272
+ requestDashboardUrl();
45273
+ return function () {
45274
+ return window.removeEventListener("message", validatePeriscope);
45275
+ };
45276
+ }, [requestDashboardUrl]);
45277
+ return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(BoxWithShadow$1, {
45278
+ padding: "0",
45279
+ minWidth: "100%",
45280
+ minHeight: "592px",
45281
+ variant: "baseStandard",
45282
+ background: "#fff",
45283
+ borderRadius: "4px",
45284
+ extraStyles: "display: flex; justify-content: center; align-items: center; flex-direction: column;"
45285
+ }, periscopeDataPending && !periscopeDataSuccess && /*#__PURE__*/React__default.createElement(Cover, {
45286
+ minHeight: "100%",
45287
+ singleChild: true
45288
+ }, /*#__PURE__*/React__default.createElement(Center, {
45289
+ intrinsic: true
45290
+ }, /*#__PURE__*/React__default.createElement(Spinner$2, {
45291
+ size: "100"
45292
+ }))), periscopeDataFailure && !periscopeDataSuccess && /*#__PURE__*/React__default.createElement(Box, {
45293
+ padding: "64px"
45294
+ }, /*#__PURE__*/React__default.createElement(Center, {
45295
+ intrinsic: true
45296
+ }, /*#__PURE__*/React__default.createElement(Box, {
45297
+ padding: "0 0 2rem"
45298
+ }, /*#__PURE__*/React__default.createElement(PeriscopeFailedIcon, null)), /*#__PURE__*/React__default.createElement(Heading$1, {
45299
+ variant: "h3",
45300
+ weight: "700"
45301
+ }, "Something Went Wrong"), /*#__PURE__*/React__default.createElement(Paragraph$1, {
45302
+ variant: "p",
45303
+ extraStyles: "text-align: center;"
45304
+ }, "There was an issue trying to load the dashboard."), /*#__PURE__*/React__default.createElement(Paragraph$1, {
45305
+ variant: "p",
45306
+ extraStyles: "text-align: center;"
45307
+ }, "Your organization may not have a dashboard configured."))), !periscopeDataFailure && url && Dashboard(height)(url)));
45308
+ };
45309
+
45028
45310
  var PhoneForm = function PhoneForm(_ref) {
45029
45311
  var _phoneErrorMessage;
45030
45312
 
@@ -45913,64 +46195,17 @@ var Timeout = function Timeout(_ref) {
45913
46195
 
45914
46196
  var Timeout$1 = withWindowSize(Timeout);
45915
46197
 
45916
- var titleColor$1 = BRIGHT_GREY;
45917
- var textColor$3 = BRIGHT_GREY;
45918
- var titleWeight = FONT_WEIGHT_BOLD;
45919
- var imageBackgroundColor = INFO_BLUE;
45920
- var fallbackValues$K = {
45921
- textColor: textColor$3,
45922
- titleColor: titleColor$1,
45923
- titleWeight: titleWeight,
45924
- imageBackgroundColor: imageBackgroundColor
45925
- };
45926
-
45927
- var WelcomeCard = function WelcomeCard(_ref) {
45928
- var themeValues = _ref.themeValues,
45929
- title = _ref.title,
45930
- text = _ref.text,
45931
- buttonText = _ref.buttonText,
45932
- url = _ref.url,
45933
- imageSrc = _ref.imageSrc,
45934
- newTab = _ref.newTab;
45935
- return /*#__PURE__*/React__default.createElement(Card$1, null, imageSrc && /*#__PURE__*/React__default.createElement(Cover, null, /*#__PURE__*/React__default.createElement("img", {
45936
- src: imageSrc,
45937
- style: {
45938
- background: "".concat(themeValues.imageBackgroundColor),
45939
- objectFit: "none",
45940
- height: "150px"
45941
- }
45942
- })), /*#__PURE__*/React__default.createElement(Box, {
45943
- padding: "24px"
45944
- }, /*#__PURE__*/React__default.createElement(Title$1, {
45945
- variant: "small",
45946
- color: themeValues.titleColor,
45947
- weight: themeValues.titleWeight
45948
- }, title), /*#__PURE__*/React__default.createElement(Paragraph$1, {
45949
- color: themeValues.textColor
45950
- }, text), url && buttonText && /*#__PURE__*/React__default.createElement(Box, {
45951
- extraStyles: "margin-top: 4rem; padding: 0"
45952
- }, /*#__PURE__*/React__default.createElement(ButtonWithLink, {
45953
- extraStyles: "margin: 0; width: 100%",
45954
- linkExtraStyles: "text-decoration:none",
45955
- url: url,
45956
- text: buttonText,
45957
- newTab: newTab
45958
- }))));
45959
- };
45960
-
45961
- var WelcomeCard$1 = themeComponent(WelcomeCard, "WelcomeCard", fallbackValues$K);
45962
-
45963
46198
  var fontWeight$9 = "600";
45964
46199
  var fontColor$1 = WHITE;
45965
46200
  var textAlign$1 = "left";
45966
- var headerBackgroundColor$1 = BRIGHT_GREY;
45967
- var imageBackgroundColor$1 = MATISSE_BLUE;
45968
- var fallbackValues$L = {
46201
+ var headerBackgroundColor = BRIGHT_GREY;
46202
+ var imageBackgroundColor = MATISSE_BLUE;
46203
+ var fallbackValues$K = {
45969
46204
  fontWeight: fontWeight$9,
45970
46205
  fontColor: fontColor$1,
45971
46206
  textAlign: textAlign$1,
45972
- headerBackgroundColor: headerBackgroundColor$1,
45973
- imageBackgroundColor: imageBackgroundColor$1
46207
+ headerBackgroundColor: headerBackgroundColor,
46208
+ imageBackgroundColor: imageBackgroundColor
45974
46209
  };
45975
46210
 
45976
46211
  var WelcomeImage = styled__default.img.withConfig({
@@ -46012,7 +46247,7 @@ var WelcomeModule = function WelcomeModule(_ref) {
46012
46247
  })))));
46013
46248
  };
46014
46249
 
46015
- var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$L));
46250
+ var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$K));
46016
46251
 
46017
46252
  var WorkflowTile = function WorkflowTile(_ref) {
46018
46253
  var _ref$workflowName = _ref.workflowName,
@@ -46061,131 +46296,8 @@ var WorkflowTile = function WorkflowTile(_ref) {
46061
46296
  }))));
46062
46297
  };
46063
46298
 
46064
- var DashboardIframe = styled__default.iframe.withConfig({
46065
- displayName: "PeriscopeDashboardIframestyled__DashboardIframe",
46066
- componentId: "sc-j0cucj-0"
46067
- })(["border:none;box-shadow:0 0 5px 0 ", ";display:none;"], ALTO_GREY);
46068
-
46069
- /**
46070
- * Component: PeriscopeDashboardIframe
46071
- *
46072
- * Used for rendering Citybase's periscope reporting dashboards in iframes.
46073
- * Receives action props to trigger a request on mount for the iframe's url.
46074
- * Receives a string prop if/when we receive the url result.
46075
- * And receives action props to emit errors from failed iframe loading.
46076
- *
46077
- * The logic and api client methods to handle requests/response,
46078
- * store the url, etc. should be provided from the app consuming this library.
46079
- *
46080
- * If the url request is pending, render a spinner.
46081
- * If the url request failed, render a UI error state.
46082
- **/
46083
-
46084
- var DASHBOARD_SIZE_MESSAGE_TYPE = "dashboard_resize";
46085
- var PERISCOPE_ORIGIN = "https://app.periscopedata.com";
46086
-
46087
- var isValidMessage = function isValidMessage(message) {
46088
- return message.isTrusted && message.origin === PERISCOPE_ORIGIN && message.data && message.data.event_type === DASHBOARD_SIZE_MESSAGE_TYPE;
46089
- };
46090
-
46091
- var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
46092
- var url = _ref.url,
46093
- requestDashboardUrl = _ref.requestDashboardUrl,
46094
- periscopeDataPending = _ref.periscopeDataPending,
46095
- periscopeDataSuccess = _ref.periscopeDataSuccess,
46096
- periscopeDataFailure = _ref.periscopeDataFailure,
46097
- periscopeDataRequestSuccess = _ref.periscopeDataRequestSuccess,
46098
- periscopeDataRequestFailure = _ref.periscopeDataRequestFailure,
46099
- _ref$timerMS = _ref.timerMS,
46100
- timerMS = _ref$timerMS === void 0 ? 20000 : _ref$timerMS;
46101
-
46102
- var _useState = React.useState(0),
46103
- _useState2 = _slicedToArray(_useState, 2),
46104
- height = _useState2[0],
46105
- setHeight = _useState2[1];
46106
-
46107
- var time = {
46108
- timer: null
46109
- };
46110
- React.useEffect(function () {
46111
- time.timer = setTimeout(function () {
46112
- if (!periscopeDataSuccess) {
46113
- periscopeDataRequestFailure();
46114
- }
46115
- }, timerMS);
46116
- return function () {
46117
- return clearTimeout(time.timer);
46118
- };
46119
- }, [periscopeDataSuccess]);
46120
-
46121
- var Dashboard = function Dashboard(height) {
46122
- return function (url) {
46123
- return /*#__PURE__*/React__default.createElement(DashboardIframe, {
46124
- src: url,
46125
- width: "100%",
46126
- height: height,
46127
- "data-qa": "DashboardIframe",
46128
- onLoad: function onLoad() {
46129
- var iframe = document.querySelector("iframe");
46130
- iframe.style.display = "initial";
46131
- }
46132
- });
46133
- };
46134
- };
46135
-
46136
- var validatePeriscope = function validatePeriscope(message) {
46137
- if (isValidMessage(message)) {
46138
- setHeight(message.data.dashboard_height + 100);
46139
-
46140
- if (!periscopeDataSuccess) {
46141
- clearTimeout(time.timer);
46142
- periscopeDataRequestSuccess();
46143
- }
46144
- }
46145
- };
46146
-
46147
- React.useLayoutEffect(function () {
46148
- window.addEventListener("message", validatePeriscope);
46149
- requestDashboardUrl();
46150
- return function () {
46151
- return window.removeEventListener("message", validatePeriscope);
46152
- };
46153
- }, [requestDashboardUrl]);
46154
- return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(BoxWithShadow$1, {
46155
- padding: "0",
46156
- minWidth: "100%",
46157
- minHeight: "592px",
46158
- variant: "baseStandard",
46159
- background: "#fff",
46160
- borderRadius: "4px",
46161
- extraStyles: "display: flex; justify-content: center; align-items: center; flex-direction: column;"
46162
- }, periscopeDataPending && !periscopeDataSuccess && /*#__PURE__*/React__default.createElement(Cover, {
46163
- minHeight: "100%",
46164
- singleChild: true
46165
- }, /*#__PURE__*/React__default.createElement(Center, {
46166
- intrinsic: true
46167
- }, /*#__PURE__*/React__default.createElement(Spinner$2, {
46168
- size: "100"
46169
- }))), periscopeDataFailure && !periscopeDataSuccess && /*#__PURE__*/React__default.createElement(Box, {
46170
- padding: "64px"
46171
- }, /*#__PURE__*/React__default.createElement(Center, {
46172
- intrinsic: true
46173
- }, /*#__PURE__*/React__default.createElement(Box, {
46174
- padding: "0 0 2rem"
46175
- }, /*#__PURE__*/React__default.createElement(PeriscopeFailedIcon, null)), /*#__PURE__*/React__default.createElement(Heading$1, {
46176
- variant: "h3",
46177
- weight: "700"
46178
- }, "Something Went Wrong"), /*#__PURE__*/React__default.createElement(Paragraph$1, {
46179
- variant: "p",
46180
- extraStyles: "text-align: center;"
46181
- }, "There was an issue trying to load the dashboard."), /*#__PURE__*/React__default.createElement(Paragraph$1, {
46182
- variant: "p",
46183
- extraStyles: "text-align: center;"
46184
- }, "Your organization may not have a dashboard configured."))), !periscopeDataFailure && url && Dashboard(height)(url)));
46185
- };
46186
-
46187
46299
  var pageBackground = "#FBFCFD";
46188
- var fallbackValues$M = {
46300
+ var fallbackValues$L = {
46189
46301
  pageBackground: pageBackground
46190
46302
  };
46191
46303
 
@@ -46232,7 +46344,7 @@ var CenterSingle = function CenterSingle(_ref) {
46232
46344
  })));
46233
46345
  };
46234
46346
 
46235
- var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$M));
46347
+ var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$L));
46236
46348
 
46237
46349
  var CenterStack = function CenterStack(_ref) {
46238
46350
  var header = _ref.header,
@@ -46274,7 +46386,7 @@ var CenterStack = function CenterStack(_ref) {
46274
46386
  })));
46275
46387
  };
46276
46388
 
46277
- var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$M));
46389
+ var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$L));
46278
46390
 
46279
46391
  var CenterSingle$2 = function CenterSingle(_ref) {
46280
46392
  var header = _ref.header,
@@ -46319,7 +46431,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
46319
46431
  })));
46320
46432
  };
46321
46433
 
46322
- var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$M));
46434
+ var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$L));
46323
46435
 
46324
46436
  var SidebarSingleContent = function SidebarSingleContent(_ref) {
46325
46437
  var header = _ref.header,
@@ -46373,7 +46485,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
46373
46485
  })));
46374
46486
  };
46375
46487
 
46376
- var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$M));
46488
+ var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$L));
46377
46489
 
46378
46490
  var SidebarStackContent = function SidebarStackContent(_ref) {
46379
46491
  var header = _ref.header,
@@ -46444,46 +46556,16 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
46444
46556
  })));
46445
46557
  };
46446
46558
 
46447
- var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$M));
46559
+ var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$L));
46448
46560
 
46449
46561
 
46450
46562
 
46451
- var index$4 = /*#__PURE__*/Object.freeze({
46563
+ var index$5 = /*#__PURE__*/Object.freeze({
46452
46564
  __proto__: null,
46453
46565
  colors: colors,
46454
46566
  fontWeights: style_constants
46455
46567
  });
46456
46568
 
46457
- var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
46458
- var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
46459
- // Only move focus when "hasErrors" is true
46460
- // "hasErrors" is managed by container page of form
46461
- // typically set to "true" on attempted form submission, if errors exist
46462
- // Reset errors, if provided, resets the error state tracking in order to properly re-run
46463
- React.useEffect(function () {
46464
- if (hasErrors) {
46465
- var _inputsWithErrors$;
46466
-
46467
- var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
46468
- inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
46469
- }
46470
-
46471
- return function () {
46472
- return resetHasErrors(false);
46473
- };
46474
- });
46475
- };
46476
-
46477
-
46478
-
46479
- var index$5 = /*#__PURE__*/Object.freeze({
46480
- __proto__: null,
46481
- formats: formats,
46482
- general: general,
46483
- theme: themeUtils,
46484
- useFocusInvalidInput: useFocusInvalidInput
46485
- });
46486
-
46487
46569
  exports.AccountNumberImage = AccountNumberImage;
46488
46570
  exports.AccountsAddIcon = AccountsAddIcon$1;
46489
46571
  exports.AccountsIcon = AccountsIcon$1;
@@ -46503,7 +46585,6 @@ exports.ButtonWithAction = ButtonWithAction;
46503
46585
  exports.ButtonWithLink = ButtonWithLink;
46504
46586
  exports.CalendarIcon = CalendarIcon;
46505
46587
  exports.Card = Card$1;
46506
- exports.CardWithHeader = CardWithHeader$1;
46507
46588
  exports.CarrotIcon = CarrotIcon$1;
46508
46589
  exports.CashIcon = CashIcon;
46509
46590
  exports.Center = Center;
@@ -46597,6 +46678,7 @@ exports.PeriscopeDashboardIframe = PeriscopeDashboardIframe;
46597
46678
  exports.PeriscopeFailedIcon = PeriscopeFailedIcon;
46598
46679
  exports.PhoneForm = PhoneForm;
46599
46680
  exports.Placeholder = Placeholder$1;
46681
+ exports.Popover = Popover$1;
46600
46682
  exports.ProcessingFee = ProcessingFee$1;
46601
46683
  exports.ProfileIcon = ProfileIcon$1;
46602
46684
  exports.ProfileIconSmall = ProfileIconSmall$1;
@@ -46644,12 +46726,11 @@ exports.VerifiedEmailIcon = VerifiedEmailIcon$1;
46644
46726
  exports.VoidedIcon = VoidedIcon;
46645
46727
  exports.WalletIcon = WalletIcon$1;
46646
46728
  exports.WarningIconXS = WarningIconXS;
46647
- exports.WelcomeCard = WelcomeCard$1;
46648
46729
  exports.WelcomeModule = WelcomeModule$1;
46649
46730
  exports.WorkflowTile = WorkflowTile;
46650
46731
  exports.cardRegistry = cardRegistry;
46651
- exports.constants = index$4;
46732
+ exports.constants = index$5;
46652
46733
  exports.createPartialAmountFormState = createPartialAmountFormState;
46653
- exports.util = index$5;
46734
+ exports.util = index$4;
46654
46735
  exports.withWindowSize = withWindowSize;
46655
46736
  //# sourceMappingURL=index.cjs.js.map