@thecb/components 10.10.0 → 10.11.0-beta.1

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
@@ -4864,8 +4864,8 @@ var createThemeValues = function createThemeValues(themeContext, fallbackValues,
4864
4864
  }, {});
4865
4865
  return createdTheme;
4866
4866
  };
4867
- var themeComponent = function themeComponent(component, componentThemeId, fallbackValues, defaultVariant) {
4868
- return function (_ref7) {
4867
+ var themeComponent = function themeComponent(Component, componentThemeId, fallbackValues, defaultVariant) {
4868
+ return /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
4869
4869
  var _themeContext$metadat;
4870
4870
  var _ref7$variant = _ref7.variant,
4871
4871
  variant = _ref7$variant === void 0 ? defaultVariant : _ref7$variant,
@@ -4873,12 +4873,13 @@ var themeComponent = function themeComponent(component, componentThemeId, fallba
4873
4873
  var themeContext = React.useContext(styled.ThemeContext);
4874
4874
  var metadata = (_themeContext$metadat = themeContext === null || themeContext === void 0 ? void 0 : themeContext.metadata) !== null && _themeContext$metadat !== void 0 ? _themeContext$metadat : {};
4875
4875
  var themeValues = themeContext ? createThemeValues(themeContext, fallbackValues, componentThemeId, variant) : fallbackValues;
4876
- return component(_objectSpread2(_objectSpread2({}, props), {}, {
4876
+ return /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
4877
4877
  themeValues: themeValues,
4878
4878
  variant: variant,
4879
- metadata: metadata
4879
+ metadata: metadata,
4880
+ ref: ref
4880
4881
  }));
4881
- };
4882
+ });
4882
4883
  };
4883
4884
 
4884
4885
  /*
@@ -6450,7 +6451,7 @@ var _excluded$2 = ["activeStyles", "focusStyles", "hoverStyles", "disabledStyles
6450
6451
  */
6451
6452
 
6452
6453
  /* eslint-disable no-unused-vars */
6453
- var BoxWrapper = styled__default(function (_ref) {
6454
+ var BoxWrapper = styled__default( /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6454
6455
  var activeStyles = _ref.activeStyles,
6455
6456
  focusStyles = _ref.focusStyles,
6456
6457
  hoverStyles = _ref.hoverStyles,
@@ -6471,10 +6472,11 @@ var BoxWrapper = styled__default(function (_ref) {
6471
6472
  ariaLabel = _ref.ariaLabel,
6472
6473
  props = _objectWithoutProperties(_ref, _excluded$2);
6473
6474
  return /*#__PURE__*/React__default.createElement("div", _extends({
6475
+ ref: ref,
6474
6476
  "aria-controls": ariaControls,
6475
6477
  "aria-label": ariaLabel
6476
6478
  }, props));
6477
- }).withConfig({
6479
+ })).withConfig({
6478
6480
  displayName: "Boxstyled__BoxWrapper",
6479
6481
  componentId: "sc-1f9ij0d-0"
6480
6482
  })(["position:relative;box-sizing:border-box;padding:", ";border:", ";box-shadow:", ";background-color:", ";min-height:", ";", " min-width:", ";max-width:", ";color:", ";border-radius:", ";border-width:", ";text-align:", ";&:hover{", "}&:focus{", "}&:active{", "}&:disabled{", "}&[aria-disabled=\"true\"]{", "}& *{color:", ";}", " ", ""], function (_ref2) {
@@ -18833,6 +18835,28 @@ var NoResultsIcon = function NoResultsIcon(_ref) {
18833
18835
  }))))));
18834
18836
  };
18835
18837
 
18838
+ var _excluded$l = ["color"];
18839
+ var AgencyIcon = function AgencyIcon(_ref) {
18840
+ var _ref$color = _ref.color,
18841
+ color = _ref$color === void 0 ? "#292A33" : _ref$color,
18842
+ props = _objectWithoutProperties(_ref, _excluded$l);
18843
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
18844
+ xmlns: "http://www.w3.org/2000/svg",
18845
+ width: "20",
18846
+ height: "21",
18847
+ viewBox: "0 0 20 21",
18848
+ fill: "none"
18849
+ }, props), /*#__PURE__*/React__default.createElement("g", {
18850
+ id: "Agency / Agency - S"
18851
+ }, /*#__PURE__*/React__default.createElement("path", {
18852
+ id: "Icon - Agency",
18853
+ fillRule: "evenodd",
18854
+ clipRule: "evenodd",
18855
+ d: "M9.5625 4.375H3.875L3.875 16.625H9.5625V7.875V7V4.375ZM10.4375 7.875V16.625H16.125V7.875H10.4375ZM10.4375 7H16.125C16.6082 7 17 7.39175 17 7.875V16.625C17 17.1082 16.6082 17.5 16.125 17.5H10.4375H9.5625H3.875C3.39175 17.5 3 17.1082 3 16.625V4.375C3 3.89175 3.39175 3.5 3.875 3.5H9.5625C10.0457 3.5 10.4375 3.89175 10.4375 4.375V7ZM8.46875 6.5625H4.96875V7.4375H8.46875V6.5625ZM4.96875 8.3125H8.46875V9.1875H4.96875V8.3125ZM8.46875 10.0625H4.96875V10.9375H8.46875V10.0625ZM4.96875 11.8125H8.46875V12.6875H4.96875V11.8125ZM4.96875 13.5625H8.46875V14.4375H4.96875V13.5625ZM11.5312 10.0625H15.0312V10.9375H11.5312V10.0625ZM11.5312 11.8125H15.0312V12.6875H11.5312V11.8125ZM15.0312 13.5625H11.5312V14.4375H15.0312V13.5625Z",
18856
+ fill: color
18857
+ })));
18858
+ };
18859
+
18836
18860
  var color$2 = "#15749D";
18837
18861
  var hoverColor$1 = "#116285";
18838
18862
  var activeColor$1 = "#0E506D";
@@ -19486,7 +19510,7 @@ var mobileFallbackValues = {
19486
19510
  };
19487
19511
  var MOBILE_BREAKPOINT = 768;
19488
19512
 
19489
- var _excluded$l = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
19513
+ var _excluded$m = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
19490
19514
 
19491
19515
  /*
19492
19516
  New responsive text component for Title elements
@@ -19533,7 +19557,7 @@ var Title = function Title(_ref) {
19533
19557
  as = _ref$as === void 0 ? "h1" : _ref$as,
19534
19558
  dataQa = _ref.dataQa,
19535
19559
  children = _ref.children,
19536
- rest = _objectWithoutProperties(_ref, _excluded$l);
19560
+ rest = _objectWithoutProperties(_ref, _excluded$m);
19537
19561
  return /*#__PURE__*/React__default.createElement(TitleText, _extends({
19538
19562
  variant: variant,
19539
19563
  as: as,
@@ -20961,12 +20985,12 @@ var fallbackValues$8 = {
20961
20985
  linkColor: linkColor
20962
20986
  };
20963
20987
 
20964
- var _excluded$m = ["variant", "themeValues", "children"];
20988
+ var _excluded$n = ["variant", "themeValues", "children"];
20965
20989
  var BoxWithShadow = function BoxWithShadow(_ref) {
20966
20990
  var variant = _ref.variant,
20967
20991
  themeValues = _ref.themeValues,
20968
20992
  children = _ref.children,
20969
- props = _objectWithoutProperties(_ref, _excluded$m);
20993
+ props = _objectWithoutProperties(_ref, _excluded$n);
20970
20994
  var shadowRegistry = {
20971
20995
  baseStandard: "0px 3px 7px 2px ".concat(rgba$1(BLACK, 0.1), ", 0px 1px 2px 1px ").concat(rgba$1(BLACK, 0.1), ";"),
20972
20996
  baseHover: "0px 1px 7px 0px ".concat(rgba$1(BLACK, 0.3), ", 0px 1px 4px 0px ").concat(rgba$1(BLACK, 0.2), ", 0px 7px 12px 0px ").concat(rgba$1(BLACK, 0.2), ";"),
@@ -21026,7 +21050,7 @@ var fallbackValues$a = {
21026
21050
  externalLinkColor: externalLinkColor
21027
21051
  };
21028
21052
 
21029
- var _excluded$n = ["hoverColor", "activeColor", "extrastyles"];
21053
+ var _excluded$o = ["hoverColor", "activeColor", "extrastyles"];
21030
21054
  var ROYAL_BLUE$1 = ROYAL_BLUE;
21031
21055
  var LINK_TEXT_DECORATION$3 = LINK_TEXT_DECORATION;
21032
21056
 
@@ -21040,7 +21064,7 @@ var StyledExternalLink = styled__default( /*#__PURE__*/React.forwardRef(function
21040
21064
  var hoverColor = _ref.hoverColor,
21041
21065
  activeColor = _ref.activeColor,
21042
21066
  extrastyles = _ref.extrastyles,
21043
- props = _objectWithoutProperties(_ref, _excluded$n);
21067
+ props = _objectWithoutProperties(_ref, _excluded$o);
21044
21068
  return /*#__PURE__*/React__default.createElement("a", _extends({}, props, {
21045
21069
  ref: ref
21046
21070
  }));
@@ -21115,7 +21139,7 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
21115
21139
  }, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
21116
21140
  });
21117
21141
 
21118
- var _excluded$o = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
21142
+ var _excluded$p = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
21119
21143
  var ROYAL_BLUE$2 = ROYAL_BLUE;
21120
21144
  var LINK_TEXT_DECORATION$4 = LINK_TEXT_DECORATION;
21121
21145
 
@@ -21131,7 +21155,7 @@ var StyledInternalLink = styled__default( /*#__PURE__*/React.forwardRef(function
21131
21155
  active = _ref.active,
21132
21156
  color = _ref.color,
21133
21157
  extrastyles = _ref.extrastyles,
21134
- props = _objectWithoutProperties(_ref, _excluded$o);
21158
+ props = _objectWithoutProperties(_ref, _excluded$p);
21135
21159
  return /*#__PURE__*/React__default.createElement(reactRouterDom.Link, _extends({}, props, {
21136
21160
  ref: ref
21137
21161
  }));
@@ -22814,7 +22838,7 @@ _curry2(function test(pattern, str) {
22814
22838
  return _cloneRegExp(pattern).test(str);
22815
22839
  });
22816
22840
 
22817
- var _excluded$p = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
22841
+ var _excluded$q = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
22818
22842
  var ButtonWithLink = function ButtonWithLink(_ref) {
22819
22843
  var _ref$url = _ref.url,
22820
22844
  url = _ref$url === void 0 ? "/" : _ref$url,
@@ -22829,7 +22853,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
22829
22853
  _ref$newTab = _ref.newTab,
22830
22854
  newTab = _ref$newTab === void 0 ? false : _ref$newTab,
22831
22855
  dataQa = _ref.dataQa,
22832
- otherProps = _objectWithoutProperties(_ref, _excluded$p);
22856
+ otherProps = _objectWithoutProperties(_ref, _excluded$q);
22833
22857
  var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
22834
22858
  var children = _ref2.children,
22835
22859
  url = _ref2.url,
@@ -22917,7 +22941,7 @@ var ParagraphText = styled__default.p.withConfig({
22917
22941
  return extraStyles;
22918
22942
  });
22919
22943
 
22920
- var _excluded$q = ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"];
22944
+ var _excluded$r = ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"];
22921
22945
  var Paragraph = function Paragraph(_ref) {
22922
22946
  var themeValues = _ref.themeValues,
22923
22947
  _ref$weight = _ref.weight,
@@ -22931,7 +22955,7 @@ var Paragraph = function Paragraph(_ref) {
22931
22955
  dataQa = _ref.dataQa,
22932
22956
  children = _ref.children,
22933
22957
  as = _ref.as,
22934
- rest = _objectWithoutProperties(_ref, _excluded$q);
22958
+ rest = _objectWithoutProperties(_ref, _excluded$r);
22935
22959
  return /*#__PURE__*/React__default.createElement(ParagraphText, _extends({
22936
22960
  weight: weight,
22937
22961
  color: color,
@@ -23173,6 +23197,7 @@ var ENTER = 13;
23173
23197
  var ESCAPE = 27;
23174
23198
  var SPACEBAR = 32;
23175
23199
 
23200
+ var _excluded$s = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles"];
23176
23201
  var CheckboxContainer = styled__default.span.withConfig({
23177
23202
  displayName: "Checkbox__CheckboxContainer",
23178
23203
  componentId: "sc-36kqbv-0"
@@ -23199,7 +23224,7 @@ var HiddenCheckbox = styled__default.input.attrs({
23199
23224
  var StyledCheckbox = styled__default.span.withConfig({
23200
23225
  displayName: "Checkbox__StyledCheckbox",
23201
23226
  componentId: "sc-36kqbv-4"
23202
- })(["display:inline-block;width:24px;height:24px;border-radius:2px;transition:all 150ms;", "{visibility:", ";}", ";"], CheckboxIcon, function (_ref2) {
23227
+ })(["display:inline-block;width:24px;height:24px;border-radius:2px;transition:all 150ms;", "{visibility:", ";}", ";", ""], CheckboxIcon, function (_ref2) {
23203
23228
  var checked = _ref2.checked;
23204
23229
  return checked ? "visible" : "hidden";
23205
23230
  }, function (_ref3) {
@@ -23214,27 +23239,32 @@ var StyledCheckbox = styled__default.span.withConfig({
23214
23239
  disabledStyles = _ref3.disabledStyles,
23215
23240
  disabledCheckedStyles = _ref3.disabledCheckedStyles;
23216
23241
  return error ? styled.css(["", " ", ""], errorStyles, focused && focusedStyles) : disabled ? styled.css(["", ""], checked ? disabledCheckedStyles : disabledStyles) : checked ? styled.css(["", " ", ""], checkedStyles, focused && focusedStyles) : styled.css(["", " ", ""], defaultStyles, focused && focusedStyles);
23242
+ }, function (_ref4) {
23243
+ var checkboxExtraStyles = _ref4.checkboxExtraStyles;
23244
+ return styled.css(["", ""], checkboxExtraStyles);
23217
23245
  });
23218
- var Checkbox = function Checkbox(_ref4) {
23219
- var title = _ref4.title,
23220
- name = _ref4.name,
23221
- checked = _ref4.checked,
23222
- _ref4$onChange = _ref4.onChange,
23223
- onChange = _ref4$onChange === void 0 ? noop : _ref4$onChange,
23224
- _ref4$disabled = _ref4.disabled,
23225
- disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
23226
- themeValues = _ref4.themeValues,
23227
- _ref4$hidden = _ref4.hidden,
23228
- hidden = _ref4$hidden === void 0 ? false : _ref4$hidden,
23229
- _ref4$error = _ref4.error,
23230
- error = _ref4$error === void 0 ? false : _ref4$error,
23231
- _ref4$checkboxMargin = _ref4.checkboxMargin,
23232
- checkboxMargin = _ref4$checkboxMargin === void 0 ? "0 16px 0 0" : _ref4$checkboxMargin,
23233
- extraStyles = _ref4.extraStyles,
23234
- textExtraStyles = _ref4.textExtraStyles,
23235
- labelledById = _ref4.labelledById,
23236
- _ref4$dataQa = _ref4.dataQa,
23237
- dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
23246
+ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
23247
+ var title = _ref5.title,
23248
+ name = _ref5.name,
23249
+ checked = _ref5.checked,
23250
+ _ref5$onChange = _ref5.onChange,
23251
+ onChange = _ref5$onChange === void 0 ? noop : _ref5$onChange,
23252
+ _ref5$disabled = _ref5.disabled,
23253
+ disabled = _ref5$disabled === void 0 ? false : _ref5$disabled,
23254
+ themeValues = _ref5.themeValues,
23255
+ _ref5$hidden = _ref5.hidden,
23256
+ hidden = _ref5$hidden === void 0 ? false : _ref5$hidden,
23257
+ _ref5$error = _ref5.error,
23258
+ error = _ref5$error === void 0 ? false : _ref5$error,
23259
+ _ref5$checkboxMargin = _ref5.checkboxMargin,
23260
+ checkboxMargin = _ref5$checkboxMargin === void 0 ? "0 16px 0 0" : _ref5$checkboxMargin,
23261
+ extraStyles = _ref5.extraStyles,
23262
+ textExtraStyles = _ref5.textExtraStyles,
23263
+ labelledById = _ref5.labelledById,
23264
+ _ref5$dataQa = _ref5.dataQa,
23265
+ dataQa = _ref5$dataQa === void 0 ? null : _ref5$dataQa,
23266
+ checkboxExtraStyles = _ref5.checkboxExtraStyles,
23267
+ rest = _objectWithoutProperties(_ref5, _excluded$s);
23238
23268
  var _useState = React.useState(false),
23239
23269
  _useState2 = _slicedToArray(_useState, 2),
23240
23270
  focused = _useState2[0],
@@ -23247,7 +23277,8 @@ var Checkbox = function Checkbox(_ref4) {
23247
23277
  var titleId = title ? "checkboxlabel-".concat(name) : undefined;
23248
23278
  var ariaLabelledById = labelledById !== null && labelledById !== void 0 ? labelledById : titleId;
23249
23279
  var ariaLabel = ariaLabelledById ? undefined : name;
23250
- return /*#__PURE__*/React__default.createElement(Box, {
23280
+ return /*#__PURE__*/React__default.createElement(Box, _extends({
23281
+ ref: ref,
23251
23282
  padding: "0",
23252
23283
  tabIndex: "0",
23253
23284
  onFocus: function onFocus() {
@@ -23262,7 +23293,7 @@ var Checkbox = function Checkbox(_ref4) {
23262
23293
  hiddenStyles: hidden,
23263
23294
  background: themeValues.backgroundColor,
23264
23295
  extraStyles: "outline: none; ".concat(extraStyles, "; margin: ").concat(checkboxMargin, ";")
23265
- }, /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
23296
+ }, rest), /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
23266
23297
  "data-qa": dataQa
23267
23298
  }, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
23268
23299
  "data-qa": "Checkbox"
@@ -23289,7 +23320,8 @@ var Checkbox = function Checkbox(_ref4) {
23289
23320
  errorStyles: themeValues.errorStyles,
23290
23321
  disabledStyles: themeValues.disabledStyles,
23291
23322
  disabledCheckedStyles: themeValues.disabledCheckedStyles,
23292
- focusedStyles: themeValues.focusedStyles
23323
+ focusedStyles: themeValues.focusedStyles,
23324
+ checkboxExtraStyles: checkboxExtraStyles
23293
23325
  }, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
23294
23326
  viewBox: "0 0 24 24",
23295
23327
  disabled: disabled,
@@ -23304,7 +23336,7 @@ var Checkbox = function Checkbox(_ref4) {
23304
23336
  color: themeValues.textColor,
23305
23337
  extraStyles: textExtraStyles ? "".concat(textExtraStyles, " ").concat(disabled && "color: #6e727e; background-color: #f7f7f7;", " ") : "margin-left: 1rem ".concat(disabled && "color: #6e727e; background-color: #f7f7f7;")
23306
23338
  }, title)));
23307
- };
23339
+ });
23308
23340
  var Checkbox$1 = themeComponent(Checkbox, "Checkbox", fallbackValues$d, "default");
23309
23341
 
23310
23342
  var listBackgroundColor = {
@@ -23588,7 +23620,7 @@ var TableRowWrapper = styled__default.tr.withConfig({
23588
23620
  return extraStyles;
23589
23621
  });
23590
23622
 
23591
- var _excluded$r = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
23623
+ var _excluded$t = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
23592
23624
  var TableRow = function TableRow(_ref) {
23593
23625
  var children = _ref.children,
23594
23626
  extraStyles = _ref.extraStyles,
@@ -23597,7 +23629,7 @@ var TableRow = function TableRow(_ref) {
23597
23629
  hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
23598
23630
  onClick = _ref.onClick,
23599
23631
  themeValues = _ref.themeValues,
23600
- props = _objectWithoutProperties(_ref, _excluded$r);
23632
+ props = _objectWithoutProperties(_ref, _excluded$t);
23601
23633
  return /*#__PURE__*/React__default.createElement(TableRowWrapper, _extends({
23602
23634
  onClick: onClick,
23603
23635
  hoverEffect: hoverEffect,
@@ -26422,7 +26454,7 @@ var mobileFallbackValues$1 = {
26422
26454
  };
26423
26455
  var MOBILE_BREAKPOINT$1 = 768;
26424
26456
 
26425
- var _excluded$s = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26457
+ var _excluded$u = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26426
26458
 
26427
26459
  /*
26428
26460
  New responsive text component for Detail elements
@@ -26472,7 +26504,7 @@ var Detail = function Detail(_ref) {
26472
26504
  as = _ref$as === void 0 ? "p" : _ref$as,
26473
26505
  dataQa = _ref.dataQa,
26474
26506
  children = _ref.children,
26475
- rest = _objectWithoutProperties(_ref, _excluded$s);
26507
+ rest = _objectWithoutProperties(_ref, _excluded$u);
26476
26508
  return /*#__PURE__*/React__default.createElement(DetailText, _extends({
26477
26509
  variant: variant,
26478
26510
  as: as,
@@ -27055,83 +27087,79 @@ var createFormat = function createFormat(formats, formatChar) {
27055
27087
  var FormattedInput = function FormattedInput(_ref) {
27056
27088
  var value = _ref.value,
27057
27089
  formatter = _ref.formatter,
27058
- onChange = _ref.onChange,
27090
+ _onChange = _ref.onChange,
27059
27091
  props = _objectWithoutProperties$1(_ref, ["value", "formatter", "onChange"]);
27060
27092
 
27061
- var _useState = React.useState(format$1(formatter)(value)),
27062
- _useState2 = _slicedToArray$1(_useState, 2),
27063
- formattedValue = _useState2[0],
27064
- setFormattedValue = _useState2[1];
27065
-
27066
27093
  var inputEl = React.useRef(null);
27067
- var stateRefs = React.useRef({
27094
+
27095
+ var _useState = React.useState({
27068
27096
  selectionStart: 0,
27069
27097
  selectionEnd: 0,
27070
- isDelete: false,
27071
- rawValue: ''
27072
- });
27098
+ rawValue: value,
27099
+ "delete": false,
27100
+ formattedValue: format$1(formatter)(value)
27101
+ }),
27102
+ _useState2 = _slicedToArray$1(_useState, 2),
27103
+ state = _useState2[0],
27104
+ setState = _useState2[1];
27105
+
27073
27106
  React.useLayoutEffect(function () {
27074
27107
  // A lot of the work here is cursor manipulation
27075
27108
  if (inputEl.current && inputEl.current === document.activeElement) {
27076
- inputEl.current.setSelectionRange(stateRefs.current.selectionStart, stateRefs.current.selectionEnd);
27109
+ inputEl.current.setSelectionRange(state.selectionStart, state.selectionEnd);
27077
27110
  }
27078
- }, [stateRefs]);
27079
-
27080
- var handleChange = function handleChange(event) {
27081
- var deleteKeyPressed = stateRefs.current.isDelete;
27082
- var maxFormatExceeded = stateRefs.current.rawValue.length >= formatter.formats.length - 1;
27083
-
27084
- if (maxFormatExceeded && !deleteKeyPressed) {
27085
- return;
27086
- }
27087
- /* At the beginning of onChange, event.target.value is a concat of the previous formatted value
27088
- * and an unformatted injection at the start, end, or in the middle (maybe a deletion). To prepare
27089
- * the unformatted value for the user's onChange, the formatted string and unformatted injection need
27090
- * to be separated, then unformat the formatted string, then insert (or delete) the injection from the
27091
- * old unformatted value.
27092
- */
27093
-
27094
-
27095
- var injectionLength = event.target.value.length - formattedValue.length;
27096
- var end = stateRefs.current.selectionStart === stateRefs.current.selectionEnd ? stateRefs.current.selectionStart + injectionLength : stateRefs.current.selectionEnd - 1;
27097
- var injection = event.target.value.substring(stateRefs.current.selectionStart, end); // Injection is the new unformatted piece of the input
27098
- // Need to find where to put it
27099
-
27100
- var rawInjectionPointStart = formattedToUnformattedIndex(stateRefs.current.selectionStart, stateRefs.current.rawValue, formatter);
27101
- var rawInjectionPointEnd = formattedToUnformattedIndex(stateRefs.current.selectionEnd, stateRefs.current.rawValue, formatter); // Unformat the previous formatted value for injection
27102
- // Using the relevant format string, strips away chars not marked with the formatChar
27103
-
27104
- var unformattedOldValue = unformat(formatter)(formattedValue, stateRefs.current.rawValue.length); // Edit the previous unformatted value (either add, update or delete)
27105
-
27106
- var injectIntoOldValue = inject(unformattedOldValue);
27107
- var unformattedNewValue = deleteKeyPressed ? rawInjectionPointStart === rawInjectionPointEnd ? injectIntoOldValue(rawInjectionPointStart - 1, rawInjectionPointStart, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, injection);
27108
- var lengthDifference = unformattedNewValue.length - stateRefs.current.rawValue.length;
27109
- var rawIndex = formattedToUnformattedIndex(stateRefs.current.selectionStart, stateRefs.current.rawValue, formatter) + lengthDifference; // Find the new cursor position for the potential formatted value
27110
- // Applied by useLayoutEffect
27111
-
27112
- var newFormattedCursorPosition = stateRefs.current.selectionStart === stateRefs.current.selectionEnd ? unformattedToFormattedIndex(rawIndex, unformattedNewValue, formatter, deleteKeyPressed) : deleteKeyPressed ? stateRefs.current.selectionStart : stateRefs.current.selectionEnd;
27113
- var formattedNewValue = format$1(formatter)(unformattedNewValue);
27114
- setFormattedValue(formattedNewValue); // Apply the external onChange function to the raw underlying string
27115
- // This is where the user generally updates the input value
27116
-
27117
- if (onChange) {
27118
- onChange(unformattedNewValue);
27119
- }
27120
- };
27121
-
27111
+ });
27122
27112
  return React__default.createElement("input", _extends$2({}, props, {
27123
27113
  ref: inputEl,
27124
27114
  value: format$1(formatter)(value),
27125
27115
  onKeyDown: function onKeyDown(event) {
27126
- // Keep track of the state of the input before onChange
27127
- stateRefs.current = {
27128
- isDelete: event.key === "Backspace" || event.key === "Delete",
27116
+ // Keep track of the state of the input before onChange, including if user is hitting delete
27117
+ setState({
27118
+ rawValue: value,
27129
27119
  selectionStart: event.target.selectionStart,
27130
27120
  selectionEnd: event.target.selectionEnd,
27131
- rawValue: value
27132
- };
27121
+ "delete": event.key === "Backspace" || event.key === "Delete",
27122
+ formattedValue: event.target.value
27123
+ });
27133
27124
  },
27134
- onChange: handleChange
27125
+ onChange: function onChange(event) {
27126
+ /* At the beginning of onChange, event.target.value is a concat of the previous formatted value
27127
+ * and an unformatted injection at the start, end, or in the middle (maybe a deletion). To prepare
27128
+ * the unformatted value for the user's onChange, the formatted string and unformatted injection need
27129
+ * to be separated, then unformat the formatted string, then insert (or delete) the injection from the
27130
+ * old unformatted value.
27131
+ */
27132
+ var injectionLength = event.target.value.length - state.formattedValue.length;
27133
+ var end = state.selectionStart === state.selectionEnd ? state.selectionStart + injectionLength : state.selectionEnd - 1;
27134
+ var injection = event.target.value.substring(state.selectionStart, end); // Injection is the new unformatted piece of the input
27135
+ // Need to find where to put it
27136
+
27137
+ var rawInjectionPointStart = formattedToUnformattedIndex(state.selectionStart, state.rawValue, formatter);
27138
+ var rawInjectionPointEnd = formattedToUnformattedIndex(state.selectionEnd, state.rawValue, formatter); // Unformat the previous formatted value for injection
27139
+ // Using the relevant format string, strips away chars not marked with the formatChar
27140
+
27141
+ var unformattedOldValue = unformat(formatter)(state.formattedValue, state.rawValue.length); // Edit the previous unformatted value (either add, update or delete)
27142
+
27143
+ var injectIntoOldValue = inject(unformattedOldValue);
27144
+ var unformattedNewValue = state["delete"] ? rawInjectionPointStart === rawInjectionPointEnd ? injectIntoOldValue(rawInjectionPointStart - 1, rawInjectionPointStart, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, injection);
27145
+ var lengthDifference = unformattedNewValue.length - state.rawValue.length;
27146
+ var rawIndex = formattedToUnformattedIndex(state.selectionStart, state.rawValue, formatter) + lengthDifference; // Find the new cursor position for the potential formatted value
27147
+ // Applied by useLayoutEffect
27148
+
27149
+ var newFormattedCursorPosition = state.selectionStart == state.selectionEnd ? unformattedToFormattedIndex(rawIndex, unformattedNewValue, formatter, state["delete"]) : state["delete"] ? state.selectionStart : state.selectionEnd;
27150
+ setState({
27151
+ selectionStart: newFormattedCursorPosition,
27152
+ selectionEnd: newFormattedCursorPosition,
27153
+ rawValue: state.rawValue,
27154
+ "delete": false,
27155
+ formattedValue: state.formattedValue
27156
+ }); // Apply the external onChange function to the raw underlying string
27157
+ // This is where the user generally updates the input value
27158
+
27159
+ if (_onChange) {
27160
+ _onChange(unformattedNewValue);
27161
+ }
27162
+ }
27135
27163
  }));
27136
27164
  };
27137
27165
 
@@ -27199,8 +27227,8 @@ var fallbackValues$n = {
27199
27227
  formFooterPanel: formFooterPanel
27200
27228
  };
27201
27229
 
27202
- var _excluded$t = ["showErrors", "themeValues"],
27203
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
27230
+ var _excluded$v = ["showErrors", "themeValues"],
27231
+ _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow"];
27204
27232
  var InputField = styled__default.input.withConfig({
27205
27233
  displayName: "FormInput__InputField",
27206
27234
  componentId: "sc-l094r1-0"
@@ -27234,7 +27262,7 @@ var InputField = styled__default.input.withConfig({
27234
27262
  var FormattedInputField = styled__default(function (_ref8) {
27235
27263
  var showErrors = _ref8.showErrors,
27236
27264
  themeValues = _ref8.themeValues,
27237
- props = _objectWithoutProperties(_ref8, _excluded$t);
27265
+ props = _objectWithoutProperties(_ref8, _excluded$v);
27238
27266
  return /*#__PURE__*/React__default.createElement(FormattedInput, props);
27239
27267
  }).withConfig({
27240
27268
  displayName: "FormInput__FormattedInputField",
@@ -27288,6 +27316,9 @@ var FormInput = function FormInput(_ref15) {
27288
27316
  dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
27289
27317
  _ref15$isRequired = _ref15.isRequired,
27290
27318
  isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
27319
+ errorFieldExtraStyles = _ref15.errorFieldExtraStyles,
27320
+ _ref15$showFieldError = _ref15.showFieldErrorRow,
27321
+ showFieldErrorRow = _ref15$showFieldError === void 0 ? true : _ref15$showFieldError,
27291
27322
  props = _objectWithoutProperties(_ref15, _excluded2);
27292
27323
  var _useState = React.useState(false),
27293
27324
  _useState2 = _slicedToArray(_useState, 2),
@@ -27413,7 +27444,7 @@ var FormInput = function FormInput(_ref15) {
27413
27444
  "data-qa": dataQa || labelTextWhenNoError,
27414
27445
  autoComplete: autocompleteValue,
27415
27446
  required: isRequired
27416
- }, props))), /*#__PURE__*/React__default.createElement(Stack, {
27447
+ }, props))), showFieldErrorRow && /*#__PURE__*/React__default.createElement(Stack, {
27417
27448
  direction: "row",
27418
27449
  justify: "space-between",
27419
27450
  "aria-live": "polite",
@@ -27422,17 +27453,17 @@ var FormInput = function FormInput(_ref15) {
27422
27453
  color: ERROR_COLOR,
27423
27454
  variant: "pXS",
27424
27455
  weight: themeValues.fontWeight,
27425
- extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
27456
+ extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }\n ".concat(errorFieldExtraStyles, ";"),
27426
27457
  id: createIdFromString(labelTextWhenNoError, "error message")
27427
27458
  }, errorMessages[field.errors[0]]) : /*#__PURE__*/React__default.createElement(Text$1, {
27428
- extraStyles: "height: ".concat(themeValues.lineHeight, ";")
27459
+ extraStyles: "height: ".concat(themeValues.lineHeight, "; ").concat(errorFieldExtraStyles, ";")
27429
27460
  }), !isMobile && decorator && /*#__PURE__*/React__default.createElement(Box, {
27430
27461
  padding: "0 0 0 auto"
27431
27462
  }, decorator)));
27432
27463
  };
27433
27464
  var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$n, "default");
27434
27465
 
27435
- var _excluded$u = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
27466
+ var _excluded$w = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
27436
27467
  var FormInputRow = function FormInputRow(_ref) {
27437
27468
  var _ref$breakpoint = _ref.breakpoint,
27438
27469
  breakpoint = _ref$breakpoint === void 0 ? "30rem" : _ref$breakpoint,
@@ -27441,7 +27472,7 @@ var FormInputRow = function FormInputRow(_ref) {
27441
27472
  largeChild = _ref.largeChild,
27442
27473
  largeChildSize = _ref.largeChildSize,
27443
27474
  children = _ref.children,
27444
- rest = _objectWithoutProperties(_ref, _excluded$u);
27475
+ rest = _objectWithoutProperties(_ref, _excluded$w);
27445
27476
  return /*#__PURE__*/React__default.createElement(Box, _extends({
27446
27477
  padding: "0"
27447
27478
  }, rest), /*#__PURE__*/React__default.createElement(Switcher, {
@@ -27452,24 +27483,24 @@ var FormInputRow = function FormInputRow(_ref) {
27452
27483
  }, children));
27453
27484
  };
27454
27485
 
27455
- var _excluded$v = ["childGap", "bottomItem", "children"];
27486
+ var _excluded$x = ["childGap", "bottomItem", "children"];
27456
27487
  var FormInputColumn = function FormInputColumn(_ref) {
27457
27488
  var _ref$childGap = _ref.childGap,
27458
27489
  childGap = _ref$childGap === void 0 ? "0.5rem" : _ref$childGap,
27459
27490
  bottomItem = _ref.bottomItem,
27460
27491
  children = _ref.children,
27461
- rest = _objectWithoutProperties(_ref, _excluded$v);
27492
+ rest = _objectWithoutProperties(_ref, _excluded$x);
27462
27493
  return /*#__PURE__*/React__default.createElement(Stack, _extends({
27463
27494
  childGap: childGap,
27464
27495
  bottomItem: bottomItem
27465
27496
  }, rest), children);
27466
27497
  };
27467
27498
 
27468
- var _excluded$w = ["themeValues", "children"];
27499
+ var _excluded$y = ["themeValues", "children"];
27469
27500
  var FormContainer = function FormContainer(_ref) {
27470
27501
  var themeValues = _ref.themeValues,
27471
27502
  children = _ref.children,
27472
- rest = _objectWithoutProperties(_ref, _excluded$w);
27503
+ rest = _objectWithoutProperties(_ref, _excluded$y);
27473
27504
  var _useContext = React.useContext(styled.ThemeContext),
27474
27505
  isMobile = _useContext.isMobile;
27475
27506
  return /*#__PURE__*/React__default.createElement(Box, _extends({
@@ -27779,7 +27810,7 @@ var fallbackValues$r = {
27779
27810
  fontSize: fontSize$8
27780
27811
  };
27781
27812
 
27782
- var _excluded$x = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
27813
+ var _excluded$z = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
27783
27814
  var Heading = function Heading(_ref) {
27784
27815
  var themeValues = _ref.themeValues,
27785
27816
  _ref$weight = _ref.weight,
@@ -27798,7 +27829,7 @@ var Heading = function Heading(_ref) {
27798
27829
  as = _ref$as === void 0 ? variant : _ref$as,
27799
27830
  dataQa = _ref.dataQa,
27800
27831
  children = _ref.children,
27801
- rest = _objectWithoutProperties(_ref, _excluded$x);
27832
+ rest = _objectWithoutProperties(_ref, _excluded$z);
27802
27833
  return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
27803
27834
  variant: variant,
27804
27835
  as: as,
@@ -27999,11 +28030,11 @@ var LabeledAmountV2 = function LabeledAmountV2(_ref) {
27999
28030
  }, /*#__PURE__*/React__default.createElement("span", null, label), /*#__PURE__*/React__default.createElement("span", null, amount));
28000
28031
  };
28001
28032
 
28002
- var _excluded$y = ["version"];
28033
+ var _excluded$A = ["version"];
28003
28034
  var LabeledAmount = function LabeledAmount(_ref) {
28004
28035
  var _ref$version = _ref.version,
28005
28036
  version = _ref$version === void 0 ? "v1" : _ref$version,
28006
- rest = _objectWithoutProperties(_ref, _excluded$y);
28037
+ rest = _objectWithoutProperties(_ref, _excluded$A);
28007
28038
  var LabeledAmountComponent = version === "v1" ? LabeledAmountV1 : LabeledAmountV2;
28008
28039
  return /*#__PURE__*/React__default.createElement(LabeledAmountComponent, rest);
28009
28040
  };
@@ -28148,7 +28179,7 @@ var Loading = function Loading() {
28148
28179
  })))));
28149
28180
  };
28150
28181
 
28151
- var _excluded$z = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
28182
+ var _excluded$B = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
28152
28183
  var NavFooter = function NavFooter(_ref) {
28153
28184
  var leftContent = _ref.leftContent,
28154
28185
  rightContent = _ref.rightContent,
@@ -28163,7 +28194,7 @@ var NavFooter = function NavFooter(_ref) {
28163
28194
  footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
28164
28195
  isMobile = _ref.isMobile,
28165
28196
  footerWidth = _ref.footerWidth,
28166
- rest = _objectWithoutProperties(_ref, _excluded$z);
28197
+ rest = _objectWithoutProperties(_ref, _excluded$B);
28167
28198
  return /*#__PURE__*/React__default.createElement(Box, _extends({
28168
28199
  padding: footerPadding,
28169
28200
  background: backgroundColor,
@@ -28194,7 +28225,7 @@ var NavFooter = function NavFooter(_ref) {
28194
28225
  }, rightContent)))))));
28195
28226
  };
28196
28227
 
28197
- var _excluded$A = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
28228
+ var _excluded$C = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
28198
28229
  var NavHeader = function NavHeader(_ref) {
28199
28230
  var leftContent = _ref.leftContent,
28200
28231
  rightContent = _ref.rightContent,
@@ -28203,7 +28234,7 @@ var NavHeader = function NavHeader(_ref) {
28203
28234
  isMobile = _ref.isMobile,
28204
28235
  backgroundColor = _ref.backgroundColor,
28205
28236
  headerWidth = _ref.headerWidth,
28206
- rest = _objectWithoutProperties(_ref, _excluded$A);
28237
+ rest = _objectWithoutProperties(_ref, _excluded$C);
28207
28238
  return /*#__PURE__*/React__default.createElement(Box, _extends({
28208
28239
  padding: "0 16px 4px",
28209
28240
  background: backgroundColor,
@@ -46576,11 +46607,11 @@ var Modal$2 = function Modal(_ref) {
46576
46607
  };
46577
46608
  var ModalControlV2 = withWindowSize(Modal$2);
46578
46609
 
46579
- var _excluded$B = ["version"];
46610
+ var _excluded$D = ["version"];
46580
46611
  var Modal$3 = function Modal(_ref) {
46581
46612
  var _ref$version = _ref.version,
46582
46613
  version = _ref$version === void 0 ? "v1" : _ref$version,
46583
- rest = _objectWithoutProperties(_ref, _excluded$B);
46614
+ rest = _objectWithoutProperties(_ref, _excluded$D);
46584
46615
  var ModalControl = version === "v1" ? Modal$1 : ModalControlV2;
46585
46616
  return /*#__PURE__*/React__default.createElement(ModalControl, rest);
46586
46617
  };
@@ -47882,7 +47913,7 @@ var fallbackValues$P = {
47882
47913
  labeledAmountTotal: labeledAmountTotal
47883
47914
  };
47884
47915
 
47885
- var _excluded$C = ["amount"],
47916
+ var _excluded$E = ["amount"],
47886
47917
  _excluded2$1 = ["amount"];
47887
47918
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
47888
47919
  var lineItemElems = _ref.lineItemElems,
@@ -48125,7 +48156,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
48125
48156
  return fee.amount > 0;
48126
48157
  }).map(function (_ref5) {
48127
48158
  var amount = _ref5.amount,
48128
- rest = _objectWithoutProperties(_ref5, _excluded$C);
48159
+ rest = _objectWithoutProperties(_ref5, _excluded$E);
48129
48160
  return _objectSpread2(_objectSpread2({}, rest), {}, {
48130
48161
  amount: displayCurrency(amount)
48131
48162
  });
@@ -48562,11 +48593,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
48562
48593
  }, errorMessage))))));
48563
48594
  };
48564
48595
 
48565
- var _excluded$D = ["version"];
48596
+ var _excluded$F = ["version"];
48566
48597
  var TermsAndConditions = function TermsAndConditions(_ref) {
48567
48598
  var _ref$version = _ref.version,
48568
48599
  version = _ref$version === void 0 ? "v1" : _ref$version,
48569
- rest = _objectWithoutProperties(_ref, _excluded$D);
48600
+ rest = _objectWithoutProperties(_ref, _excluded$F);
48570
48601
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
48571
48602
  return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
48572
48603
  };
@@ -49368,7 +49399,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
49368
49399
  }, section.content))));
49369
49400
  };
49370
49401
 
49371
- var _excluded$E = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections", "borderOverride"];
49402
+ var _excluded$G = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections", "borderOverride"];
49372
49403
 
49373
49404
  /**
49374
49405
  - The RadioSection component takes either a flat array (via the 'sections'
@@ -49417,7 +49448,7 @@ var RadioSection = function RadioSection(_ref) {
49417
49448
  isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
49418
49449
  groupedSections = _ref.groupedSections,
49419
49450
  borderOverride = _ref.borderOverride,
49420
- rest = _objectWithoutProperties(_ref, _excluded$E);
49451
+ rest = _objectWithoutProperties(_ref, _excluded$G);
49421
49452
  var _useState = React.useState(null),
49422
49453
  _useState2 = _slicedToArray(_useState, 2),
49423
49454
  focused = _useState2[0],
@@ -49964,7 +49995,7 @@ var Timeout = function Timeout(_ref) {
49964
49995
  };
49965
49996
  var Timeout$1 = withWindowSize(Timeout);
49966
49997
 
49967
- var _excluded$F = ["variant", "message", "toastOpen", "closeToastNotification", "extraStyles", "minWidth", "maxWidth", "height", "childGap", "backgroundColor", "role", "ariaLive", "screenReaderMessage", "showScreenReaderMessage"];
49998
+ var _excluded$H = ["variant", "message", "toastOpen", "closeToastNotification", "extraStyles", "minWidth", "maxWidth", "height", "childGap", "backgroundColor", "role", "ariaLive", "screenReaderMessage", "showScreenReaderMessage"];
49968
49999
  var VARIANTS = {
49969
50000
  SUCCESS: "success",
49970
50001
  ERROR: "error"
@@ -49993,7 +50024,7 @@ var ToastNotification = function ToastNotification(_ref) {
49993
50024
  screenReaderMessage = _ref.screenReaderMessage,
49994
50025
  _ref$showScreenReader = _ref.showScreenReaderMessage,
49995
50026
  showScreenReaderMessage = _ref$showScreenReader === void 0 ? true : _ref$showScreenReader,
49996
- rest = _objectWithoutProperties(_ref, _excluded$F);
50027
+ rest = _objectWithoutProperties(_ref, _excluded$H);
49997
50028
  var screenReaderMessageRef = React.useRef();
49998
50029
  var LIVEREGION_TRANSITION_DELAY = 1000;
49999
50030
  React.useEffect(function () {
@@ -50176,7 +50207,7 @@ var PopupMenuItemContainer = styled__default(ButtonWithAction).withConfig({
50176
50207
  return "\n background-color: ".concat(isDeleteAction ? theme.menuItemHoverBackgroundColorDelete : theme.menuItemHoverBackgroundColor, ";\n ");
50177
50208
  });
50178
50209
 
50179
- var _excluded$G = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
50210
+ var _excluded$I = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
50180
50211
  var PopupMenuItem = function PopupMenuItem(_ref) {
50181
50212
  var id = _ref.id,
50182
50213
  closeMenuCallback = _ref.closeMenuCallback,
@@ -50192,7 +50223,7 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
50192
50223
  hoverStyles = _ref.hoverStyles,
50193
50224
  activeStyles = _ref.activeStyles,
50194
50225
  extraStyles = _ref.extraStyles,
50195
- rest = _objectWithoutProperties(_ref, _excluded$G);
50226
+ rest = _objectWithoutProperties(_ref, _excluded$I);
50196
50227
  return /*#__PURE__*/React__default.createElement(PopupMenuItemContainer, _extends({
50197
50228
  id: id,
50198
50229
  role: "menuItem",
@@ -50365,8 +50396,392 @@ var PopupMenu = function PopupMenu(_ref) {
50365
50396
  };
50366
50397
  var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$Z);
50367
50398
 
50368
- var pageBackground = "#FBFCFD";
50399
+ var primaryColor$1 = INFO_BLUE;
50400
+ var secondaryColor = MATISSE_BLUE;
50369
50401
  var fallbackValues$_ = {
50402
+ primaryColor: primaryColor$1,
50403
+ secondaryColor: secondaryColor
50404
+ };
50405
+
50406
+ var _excluded$J = ["width", "height", "color"];
50407
+ var DropdownIconV2 = function DropdownIconV2(_ref) {
50408
+ var _ref$width = _ref.width,
50409
+ width = _ref$width === void 0 ? "18" : _ref$width,
50410
+ _ref$height = _ref.height,
50411
+ height = _ref$height === void 0 ? "19" : _ref$height,
50412
+ _ref$color = _ref.color,
50413
+ color = _ref$color === void 0 ? "#292A33" : _ref$color,
50414
+ props = _objectWithoutProperties(_ref, _excluded$J);
50415
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
50416
+ width: width,
50417
+ height: height,
50418
+ viewBox: "0 0 ".concat(width, " ").concat(height),
50419
+ xmlns: "http://www.w3.org/2000/svg",
50420
+ fill: "none"
50421
+ }, props), /*#__PURE__*/React__default.createElement("g", {
50422
+ id: "Carrot - Down / Carrot - Down - XS"
50423
+ }, /*#__PURE__*/React__default.createElement("path", {
50424
+ id: "Combined Shape",
50425
+ fillRule: "evenodd",
50426
+ clipRule: "evenodd",
50427
+ d: "M14.1075 7.45743C13.9122 7.26217 13.5956 7.26216 13.4003 7.45743L8.99233 11.8654L4.59199 7.46509C4.39673 7.26983 4.08014 7.26983 3.88488 7.46509L3.45355 7.89643C3.25828 8.09169 3.25828 8.40827 3.45355 8.60354L8.65078 13.8008C8.84604 13.996 9.16263 13.996 9.35789 13.8008L9.78922 13.3694C9.81738 13.3413 9.84147 13.3106 9.86151 13.2781L14.5413 8.59836C14.7365 8.4031 14.7365 8.08652 14.5413 7.89126L14.1075 7.45743Z",
50428
+ fill: color
50429
+ }), /*#__PURE__*/React__default.createElement("mask", {
50430
+ id: "mask0_3043_4463",
50431
+ style: {
50432
+ maskType: "luminance"
50433
+ },
50434
+ maskUnits: "userSpaceOnUse",
50435
+ x: "3",
50436
+ y: "7",
50437
+ width: "12",
50438
+ height: "7"
50439
+ }, /*#__PURE__*/React__default.createElement("path", {
50440
+ id: "Combined Shape_2",
50441
+ fillRule: "evenodd",
50442
+ clipRule: "evenodd",
50443
+ d: "M14.1075 7.45743C13.9122 7.26217 13.5956 7.26216 13.4003 7.45743L8.99233 11.8654L4.59199 7.46509C4.39673 7.26983 4.08014 7.26983 3.88488 7.46509L3.45355 7.89643C3.25828 8.09169 3.25828 8.40827 3.45355 8.60354L8.65078 13.8008C8.84604 13.996 9.16263 13.996 9.35789 13.8008L9.78922 13.3694C9.81738 13.3413 9.84147 13.3106 9.86151 13.2781L14.5413 8.59836C14.7365 8.4031 14.7365 8.08652 14.5413 7.89126L14.1075 7.45743Z",
50444
+ fill: "white"
50445
+ })), /*#__PURE__*/React__default.createElement("g", {
50446
+ mask: "url(#mask0_3043_4463)"
50447
+ }, /*#__PURE__*/React__default.createElement("path", {
50448
+ id: "Path",
50449
+ d: "M0 0.5H18V18.5H0V0.5Z",
50450
+ fill: color
50451
+ }))));
50452
+ };
50453
+
50454
+ var StyledFilterContainer = styled__default(Box).withConfig({
50455
+ displayName: "MultipleSelectFilterstyled__StyledFilterContainer",
50456
+ componentId: "sc-126xgc2-0"
50457
+ })(["position:relative;box-sizing:border-box;padding:0;", ""], function (_ref) {
50458
+ var extraStyles = _ref.extraStyles;
50459
+ return extraStyles;
50460
+ });
50461
+ var FilterContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
50462
+ return /*#__PURE__*/React__default.createElement(StyledFilterContainer, _extends({
50463
+ ref: ref
50464
+ }, props));
50465
+ });
50466
+ var StyledFilterDropdown = styled__default(Box).withConfig({
50467
+ displayName: "MultipleSelectFilterstyled__StyledFilterDropdown",
50468
+ componentId: "sc-126xgc2-1"
50469
+ })(["position:absolute;top:calc(100% + 0.5rem);left:0;width:100%;background-color:white;z-index:1000;border-radius:0.25rem;box-shadow:0px 1px 0px 0px rgba(41,42,51,0.1),0px 2px 4px 0px rgba(41,42,51,0.2),0px 1px 2px 0px rgba(41,42,51,0.1);padding:0;max-width:18.625rem;"]);
50470
+ var FilterDropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
50471
+ return /*#__PURE__*/React__default.createElement(StyledFilterDropdown, _extends({
50472
+ ref: ref
50473
+ }, props));
50474
+ });
50475
+ var StyledFilterButton = styled__default(ButtonWithAction).withConfig({
50476
+ displayName: "MultipleSelectFilterstyled__StyledFilterButton",
50477
+ componentId: "sc-126xgc2-2"
50478
+ })(["min-width:auto;min-height:2.3125rem;margin:0;padding:0.5rem;border-radius:0.25rem;box-shadow:0px 1px 2px 0px rgba(41,42,51,0.1);", " ", ""], function (_ref2) {
50479
+ var textColor = _ref2.textColor;
50480
+ return "\n color: ".concat(textColor, ";\n ");
50481
+ }, function (_ref3) {
50482
+ var backgroundColor = _ref3.backgroundColor;
50483
+ return "\n background-color: ".concat(backgroundColor, ";\n :hover,\n :active,\n :focus {\n background-color: ").concat(backgroundColor, ";\n }\n ");
50484
+ });
50485
+ var FilterButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
50486
+ return /*#__PURE__*/React__default.createElement(StyledFilterButton, _extends({
50487
+ ref: ref
50488
+ }, props));
50489
+ });
50490
+
50491
+ var ScrollableOptionsList = function ScrollableOptionsList(_ref) {
50492
+ var id = _ref.id,
50493
+ optionsList = _ref.optionsList,
50494
+ selectedOptions = _ref.selectedOptions,
50495
+ themeValues = _ref.themeValues,
50496
+ selectOption = _ref.selectOption,
50497
+ maxSelections = _ref.maxSelections,
50498
+ name = _ref.name;
50499
+ var _useState = React.useState(-1),
50500
+ _useState2 = _slicedToArray(_useState, 2),
50501
+ focusedIndex = _useState2[0],
50502
+ setFocusedIndex = _useState2[1];
50503
+ var checkboxRefs = React.useRef([]);
50504
+ var isMaxSelectionReached = maxSelections && maxSelections === (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length);
50505
+ var isChecked = function isChecked(option) {
50506
+ return selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.some(function (selectedOption) {
50507
+ return (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.name) === (option === null || option === void 0 ? void 0 : option.name);
50508
+ });
50509
+ };
50510
+ React.useEffect(function () {
50511
+ if (focusedIndex !== -1 && checkboxRefs.current && checkboxRefs.current[focusedIndex]) {
50512
+ checkboxRefs.current[focusedIndex].focus(); // move focus to the active option
50513
+ }
50514
+ }, [focusedIndex]);
50515
+ var handleKeyDown = function handleKeyDown(event) {
50516
+ if (event.key === "ArrowDown") {
50517
+ event.preventDefault();
50518
+ setFocusedIndex(function (prevIndex) {
50519
+ return prevIndex < optionsList.length - 1 ? prevIndex + 1 : 0;
50520
+ });
50521
+ } else if (event.key === "ArrowUp") {
50522
+ event.preventDefault();
50523
+ setFocusedIndex(function (prevIndex) {
50524
+ return prevIndex > 0 ? prevIndex - 1 : optionsList.length - 1;
50525
+ });
50526
+ } else if (event.key === " ") {
50527
+ event.preventDefault();
50528
+ // Select option on spacebar press if the maximum selection hasn't been reached.
50529
+ var validFocusedIndex = focusedIndex < 0 ? 0 : focusedIndex;
50530
+ if (!isMaxSelectionReached || focusedIndex !== -1 && isChecked(optionsList[validFocusedIndex])) {
50531
+ selectOption(optionsList[validFocusedIndex]);
50532
+ }
50533
+ } else if (event.key === "Tab") {
50534
+ // Reset focus when tabbing out of the list.
50535
+ setTimeout(function () {
50536
+ setFocusedIndex(-1);
50537
+ }, 500);
50538
+ }
50539
+ };
50540
+ return /*#__PURE__*/React__default.createElement(Box, {
50541
+ id: id,
50542
+ role: "listbox",
50543
+ padding: "0",
50544
+ extraStyles: "\n overflow-y: auto; \n max-height: 250px; \n display: flex; \n flex-flow: column;\n ",
50545
+ onKeyDown: handleKeyDown
50546
+ }, optionsList.map(function (option, index) {
50547
+ var checked = isChecked(option);
50548
+ var isDisabled = isMaxSelectionReached && !checked;
50549
+ var tabIndex = index === focusedIndex || index === 0 && focusedIndex === -1 ? "0" : "-1";
50550
+ return /*#__PURE__*/React__default.createElement(Box, {
50551
+ padding: "0",
50552
+ key: index,
50553
+ extraStyles: "\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryColor, ";\n }\n ")
50554
+ }, /*#__PURE__*/React__default.createElement(Checkbox$1, {
50555
+ ref: function ref(el) {
50556
+ return checkboxRefs.current[index] = el;
50557
+ },
50558
+ title: option.name,
50559
+ name: option.name,
50560
+ checked: checked,
50561
+ onChange: function onChange() {
50562
+ return isDisabled ? noop : selectOption(option);
50563
+ },
50564
+ textExtraStyles: "font-size: 0.875rem; margin: 0;",
50565
+ disabled: isDisabled,
50566
+ extraStyles: "\n padding: 0.075rem 0.325rem; \n margin: 0;\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryColor, ";\n }\n "),
50567
+ checkboxMargin: "0.3rem",
50568
+ role: "option",
50569
+ checkboxExtraStyles: "\n width: 1.375rem; \n height: 1.375rem; \n ".concat(checked && !isDisabled ? "background: " + themeValues.secondaryColor + ";" : ""),
50570
+ tabIndex: tabIndex,
50571
+ dataQa: "".concat(name, "-option-").concat(index)
50572
+ }));
50573
+ }));
50574
+ };
50575
+ var MultipleSelectFilter = function MultipleSelectFilter(_ref2) {
50576
+ var actions = _ref2.actions,
50577
+ autocompleteValue = _ref2.autocompleteValue,
50578
+ btnContentOverride = _ref2.btnContentOverride,
50579
+ disabled = _ref2.disabled,
50580
+ extraStyles = _ref2.extraStyles,
50581
+ fields = _ref2.fields,
50582
+ filterLabel = _ref2.filterLabel,
50583
+ _ref2$hasIcon = _ref2.hasIcon,
50584
+ hasIcon = _ref2$hasIcon === void 0 ? false : _ref2$hasIcon,
50585
+ Icon = _ref2.icon,
50586
+ maxSelections = _ref2.maxSelections,
50587
+ _ref2$name = _ref2.name,
50588
+ name = _ref2$name === void 0 ? "MultipleSelectFilter" : _ref2$name,
50589
+ _ref2$onApply = _ref2.onApply,
50590
+ onApply = _ref2$onApply === void 0 ? noop : _ref2$onApply,
50591
+ _ref2$onClear = _ref2.onClear,
50592
+ onClear = _ref2$onClear === void 0 ? noop : _ref2$onClear,
50593
+ options = _ref2.options,
50594
+ _ref2$placeholder = _ref2.placeholder,
50595
+ placeholder = _ref2$placeholder === void 0 ? "Search" : _ref2$placeholder,
50596
+ _ref2$searchable = _ref2.searchable,
50597
+ searchable = _ref2$searchable === void 0 ? true : _ref2$searchable,
50598
+ selectedOptions = _ref2.selectedOptions,
50599
+ setSelectedOptions = _ref2.setSelectedOptions,
50600
+ themeValues = _ref2.themeValues,
50601
+ _ref2$truncateBtnText = _ref2.truncateBtnTextWidth,
50602
+ truncateBtnTextWidth = _ref2$truncateBtnText === void 0 ? "15rem" : _ref2$truncateBtnText;
50603
+ var _useState3 = React.useState([]),
50604
+ _useState4 = _slicedToArray(_useState3, 2),
50605
+ itemList = _useState4[0],
50606
+ setItemList = _useState4[1];
50607
+ var _useState5 = React.useState(false),
50608
+ _useState6 = _slicedToArray(_useState5, 2),
50609
+ opened = _useState6[0],
50610
+ setOpened = _useState6[1];
50611
+ var containerRef = React.useRef(null);
50612
+ var dropdownRef = React.useRef(null);
50613
+ var filterButtonRef = React.useRef(null);
50614
+ var applyFilterButtonRef = React.useRef(null);
50615
+ var filterDropdownID = "".concat(name, "-filter-dropdown");
50616
+ var checkboxListID = "".concat(name, "-checkbox-list");
50617
+ var backgroundColor = opened ? themeValues.primaryColor : selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? themeValues.secondaryColor : WHITE;
50618
+ var contentColor = !opened && selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? WHITE : "#292A33";
50619
+ var completeOptionsList = itemList.sort(function (a, b) {
50620
+ return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
50621
+ });
50622
+ var selectValues = function selectValues(items) {
50623
+ return items.map(function (item) {
50624
+ return item.value;
50625
+ });
50626
+ };
50627
+ var selectOption = function selectOption(selectedOption) {
50628
+ if (selectValues(selectedOptions).includes(selectedOption.value)) {
50629
+ var fewerOptions = selectedOptions.filter(function (option) {
50630
+ return option.value !== selectedOption.value;
50631
+ });
50632
+ setSelectedOptions(fewerOptions);
50633
+ } else {
50634
+ var moreOptions = selectedOptions.concat(selectedOption);
50635
+ setSelectedOptions(moreOptions);
50636
+ }
50637
+ };
50638
+ React.useEffect(function () {
50639
+ return setItemList(options);
50640
+ }, [options]);
50641
+ React.useEffect(function () {
50642
+ var filteredItems = options.filter(function (item) {
50643
+ var _item$name, _fields$searchTerm;
50644
+ return item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.toLowerCase().includes(fields === null || fields === void 0 || (_fields$searchTerm = fields.searchTerm) === null || _fields$searchTerm === void 0 || (_fields$searchTerm = _fields$searchTerm.rawValue) === null || _fields$searchTerm === void 0 ? void 0 : _fields$searchTerm.toLowerCase());
50645
+ });
50646
+ // If no items are filtered, display the entire list of options.
50647
+ if (filteredItems !== null && filteredItems !== void 0 && filteredItems.length) {
50648
+ setItemList(filteredItems);
50649
+ } else {
50650
+ setItemList(options);
50651
+ }
50652
+ }, [fields.searchTerm.rawValue]);
50653
+ React.useEffect(function () {
50654
+ var handleKeyDown = function handleKeyDown(event) {
50655
+ if (event.key === "Escape") {
50656
+ event.preventDefault();
50657
+ }
50658
+ /*
50659
+ Close the dropdown if we hit the Escape key,
50660
+ or if we are tabbing forward away from the last button (apply button)
50661
+ or tabbing backward past the filter button.
50662
+ */
50663
+ if (event.key === "Escape" || event.key === "Tab" && !event.shiftKey && applyFilterButtonRef.current && applyFilterButtonRef.current.contains(event.target) || event.key === "Tab" && event.shiftKey && filterButtonRef.current && filterButtonRef.current.contains(event.target)) {
50664
+ setOpened(false);
50665
+ actions.fields.searchTerm.set("");
50666
+ onApply(selectedOptions);
50667
+ }
50668
+ };
50669
+ var handleClickOutside = function handleClickOutside(event) {
50670
+ if (containerRef.current && !containerRef.current.contains(event.target) && dropdownRef.current && !dropdownRef.current.contains(event.target)) {
50671
+ setOpened(false);
50672
+ actions.fields.searchTerm.set("");
50673
+ onApply(selectedOptions);
50674
+ }
50675
+ };
50676
+ document.addEventListener("mousedown", handleClickOutside);
50677
+ document.addEventListener("keydown", handleKeyDown);
50678
+ return function () {
50679
+ document.addEventListener("mousedown", handleClickOutside);
50680
+ document.removeEventListener("keydown", handleKeyDown);
50681
+ };
50682
+ }, []);
50683
+ return /*#__PURE__*/React__default.createElement(FilterContainer, {
50684
+ ref: containerRef,
50685
+ extraStyles: "".concat(extraStyles)
50686
+ }, /*#__PURE__*/React__default.createElement(FilterButton, {
50687
+ ref: filterButtonRef,
50688
+ variant: "tertiary",
50689
+ action: function action() {
50690
+ actions.fields.searchTerm.set("");
50691
+ setOpened(!opened);
50692
+ },
50693
+ "aria-haspopup": "listbox",
50694
+ "aria-expanded": opened,
50695
+ "aria-controls": filterDropdownID,
50696
+ backgroundColor: backgroundColor,
50697
+ dataQa: "".concat(name, "-filter-button"),
50698
+ contentOverride: true
50699
+ }, btnContentOverride ? btnContentOverride : /*#__PURE__*/React__default.createElement(Center, {
50700
+ as: "span",
50701
+ style: {
50702
+ display: "flex",
50703
+ flexDirection: "row"
50704
+ },
50705
+ intrinsic: true
50706
+ }, hasIcon && /*#__PURE__*/React__default.createElement(Icon, {
50707
+ color: contentColor
50708
+ }), /*#__PURE__*/React__default.createElement(Center, {
50709
+ as: "span",
50710
+ style: {
50711
+ display: "flex",
50712
+ flexDirection: "row",
50713
+ padding: "0 0.5rem 0 0.25rem"
50714
+ },
50715
+ intrinsic: true
50716
+ }, /*#__PURE__*/React__default.createElement(Text$1, {
50717
+ variant: "pS",
50718
+ color: contentColor,
50719
+ extraStyles: "\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ".concat(truncateBtnTextWidth && "max-width:" + truncateBtnTextWidth, "\n ")
50720
+ }, selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? filterLabel + ": " : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "")), /*#__PURE__*/React__default.createElement(Text$1, {
50721
+ color: contentColor,
50722
+ variant: "pS"
50723
+ }, selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length && (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 1 ? ", +".concat((selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) - 1, " More") : "")), /*#__PURE__*/React__default.createElement(DropdownIconV2, {
50724
+ color: contentColor
50725
+ }))), /*#__PURE__*/React__default.createElement(FilterDropdown, {
50726
+ id: filterDropdownID,
50727
+ ref: dropdownRef,
50728
+ hidden: !opened,
50729
+ role: "combobox",
50730
+ "aria-expanded": opened,
50731
+ "aria-haspopup": "listbox",
50732
+ "aria-owns": checkboxListID
50733
+ }, /*#__PURE__*/React__default.createElement(Box, {
50734
+ padding: "0 0 0.5rem"
50735
+ }, searchable && (options === null || options === void 0 ? void 0 : options.length) > 8 && /*#__PURE__*/React__default.createElement(FormInput$1, {
50736
+ autocompleteValue: autocompleteValue,
50737
+ showFieldErrorRow: false,
50738
+ errorMessages: {},
50739
+ field: fields.searchTerm,
50740
+ fieldActions: actions.fields.searchTerm,
50741
+ placeholder: placeholder,
50742
+ disabled: disabled,
50743
+ extraStyles: "\n height: 2.875rem;\n border: 0; \n border-radius: 0;\n padding: 0.45rem;\n font-size: 0.875rem;\n border-bottom: 1px solid ".concat(GHOST_GREY, ";\n ")
50744
+ })), /*#__PURE__*/React__default.createElement(ScrollableOptionsList, {
50745
+ id: checkboxListID,
50746
+ optionsList: completeOptionsList,
50747
+ selectedOptions: selectedOptions,
50748
+ themeValues: themeValues,
50749
+ selectOption: selectOption,
50750
+ maxSelections: maxSelections,
50751
+ name: name
50752
+ }), /*#__PURE__*/React__default.createElement(Box, {
50753
+ padding: "0 0.5rem 0.0625rem 0.5rem",
50754
+ extraStyles: "\n max-height: 100px; \n display: flex; \n flex-flow: row; \n justify-content: space-between;\n border-top: 1px solid ".concat(GHOST_GREY, ";\n ")
50755
+ }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
50756
+ action: function action() {
50757
+ setOpened(false);
50758
+ setSelectedOptions([]);
50759
+ actions.fields.searchTerm.set("");
50760
+ onClear();
50761
+ },
50762
+ variant: "tertiary",
50763
+ extraStyles: "\n padding: 0.2rem; \n margin: 0.5rem; \n min-height: auto; \n min-width: auto;\n ",
50764
+ textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, ";"),
50765
+ text: "Clear",
50766
+ dataQa: "".concat(name, "-clear-filters")
50767
+ }), /*#__PURE__*/React__default.createElement(ButtonWithAction, {
50768
+ ref: applyFilterButtonRef,
50769
+ action: function action() {
50770
+ setOpened(false);
50771
+ actions.fields.searchTerm.set("");
50772
+ onApply(selectedOptions);
50773
+ },
50774
+ variant: "tertiary",
50775
+ extraStyles: "\n padding: 0.2rem; \n margin: 0.5rem; \n min-height: auto; \n min-width: auto;\n ",
50776
+ textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, ";"),
50777
+ text: "Apply",
50778
+ dataQa: "".concat(name, "-apply-filters")
50779
+ }))));
50780
+ };
50781
+ var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$_);
50782
+
50783
+ var pageBackground = "#FBFCFD";
50784
+ var fallbackValues$$ = {
50370
50785
  pageBackground: pageBackground
50371
50786
  };
50372
50787
 
@@ -50414,7 +50829,7 @@ var CenterSingle = function CenterSingle(_ref) {
50414
50829
  padding: "0"
50415
50830
  })));
50416
50831
  };
50417
- var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$_));
50832
+ var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$$));
50418
50833
 
50419
50834
  var CenterStack = function CenterStack(_ref) {
50420
50835
  var header = _ref.header,
@@ -50457,7 +50872,7 @@ var CenterStack = function CenterStack(_ref) {
50457
50872
  padding: "0"
50458
50873
  })));
50459
50874
  };
50460
- var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$_));
50875
+ var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$$));
50461
50876
 
50462
50877
  var CenterSingle$2 = function CenterSingle(_ref) {
50463
50878
  var header = _ref.header,
@@ -50503,7 +50918,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
50503
50918
  padding: "0"
50504
50919
  })));
50505
50920
  };
50506
- var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$_));
50921
+ var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$$));
50507
50922
 
50508
50923
  var SidebarSingleContent = function SidebarSingleContent(_ref) {
50509
50924
  var header = _ref.header,
@@ -50556,7 +50971,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
50556
50971
  padding: "0"
50557
50972
  })));
50558
50973
  };
50559
- var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$_));
50974
+ var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$$));
50560
50975
 
50561
50976
  var SidebarStackContent = function SidebarStackContent(_ref) {
50562
50977
  var header = _ref.header,
@@ -50626,7 +51041,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
50626
51041
  key: "footer-box"
50627
51042
  })));
50628
51043
  };
50629
- var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$_));
51044
+ var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$$));
50630
51045
 
50631
51046
  var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
50632
51047
  var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
@@ -50665,6 +51080,7 @@ exports.AccountsIconSmall = AccountsIconSmall$1;
50665
51080
  exports.AchReturnIcon = AchReturnIcon;
50666
51081
  exports.AddObligation = AddObligation$1;
50667
51082
  exports.AddressForm = AddressForm;
51083
+ exports.AgencyIcon = AgencyIcon;
50668
51084
  exports.Alert = Alert$1;
50669
51085
  exports.AllocatedIcon = AllocatedIcon;
50670
51086
  exports.AmountCallout = AmountCallout$1;
@@ -50774,6 +51190,7 @@ exports.Modal = Modal$3;
50774
51190
  exports.Module = Module$1;
50775
51191
  exports.Motion = Motion;
50776
51192
  exports.MultiCartIcon = MultiCartIcon;
51193
+ exports.MultipleSelectFilter = MultipleSelectFilter$1;
50777
51194
  exports.NavFooter = NavFooter;
50778
51195
  exports.NavHeader = NavHeader;
50779
51196
  exports.NavMenuDesktop = NavMenuDesktop$1;