@thecb/components 10.12.3-beta.1 → 10.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/index.cjs.js +309 -185
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.esm.js +308 -186
  5. package/dist/index.esm.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/components/atoms/checkbox/Checkbox.js +22 -9
  8. package/src/components/atoms/checkbox/Checkbox.stories.js +17 -13
  9. package/src/components/atoms/checkbox/Checkbox.theme.js +6 -2
  10. package/src/components/atoms/icons/CheckboxCheckmarkIcon.js +45 -0
  11. package/src/components/atoms/icons/PaymentStatusIcon.d.ts +1 -0
  12. package/src/components/atoms/icons/PaymentStatusIcon.js +28 -0
  13. package/src/components/atoms/icons/PersonIcon.d.ts +1 -0
  14. package/src/components/atoms/icons/PersonIcon.js +28 -0
  15. package/src/components/atoms/icons/icons.stories.js +5 -1
  16. package/src/components/atoms/icons/index.js +5 -1
  17. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +33 -25
  18. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.stories.js +2 -4
  19. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +15 -7
  20. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.theme.js +7 -3
  21. package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +16 -13
  22. package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +24 -14
  23. package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +22 -18
  24. package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +43 -41
  25. package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +52 -41
  26. package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +10 -7
  27. package/src/components/molecules/multiple-select-filter/index.d.ts +2 -2
  28. package/src/components/atoms/.DS_Store +0 -0
package/dist/index.esm.js CHANGED
@@ -18849,6 +18849,52 @@ var AgencyIcon = function AgencyIcon(_ref) {
18849
18849
  })));
18850
18850
  };
18851
18851
 
18852
+ var _excluded$m = ["width", "height", "color"];
18853
+ var PersonIcon = function PersonIcon(_ref) {
18854
+ var _ref$width = _ref.width,
18855
+ width = _ref$width === void 0 ? "20" : _ref$width,
18856
+ _ref$height = _ref.height,
18857
+ height = _ref$height === void 0 ? "21" : _ref$height,
18858
+ _ref$color = _ref.color,
18859
+ color = _ref$color === void 0 ? CHARADE_GREY : _ref$color,
18860
+ props = _objectWithoutProperties(_ref, _excluded$m);
18861
+ return /*#__PURE__*/React.createElement("svg", _extends({
18862
+ xmlns: "http://www.w3.org/2000/svg",
18863
+ width: width,
18864
+ height: height,
18865
+ viewBox: "0 0 ".concat(width, " ").concat(height),
18866
+ fill: "none"
18867
+ }, props), /*#__PURE__*/React.createElement("path", {
18868
+ fillRule: "evenodd",
18869
+ clipRule: "evenodd",
18870
+ d: "M15.25 4.8125H4.75C4.50838 4.8125 4.3125 5.00838 4.3125 5.25V15.75C4.3125 15.9916 4.50838 16.1875 4.75 16.1875H5.625V14.7778C5.625 12.8985 7.02411 11.375 8.75 11.375H11.25C12.9759 11.375 14.375 12.8985 14.375 14.7778V16.1875H15.25C15.4916 16.1875 15.6875 15.9916 15.6875 15.75V5.25C15.6875 5.00838 15.4916 4.8125 15.25 4.8125ZM4.75 17.5H5.625H14.375H15.25C16.2165 17.5 17 16.7165 17 15.75V5.25C17 4.2835 16.2165 3.5 15.25 3.5H4.75C3.7835 3.5 3 4.2835 3 5.25V15.75C3 16.7165 3.7835 17.5 4.75 17.5ZM10 10.5C11.2081 10.5 12.1875 9.52062 12.1875 8.3125C12.1875 7.10438 11.2081 6.125 10 6.125C8.79188 6.125 7.8125 7.10438 7.8125 8.3125C7.8125 9.52062 8.79188 10.5 10 10.5Z",
18871
+ fill: color
18872
+ }));
18873
+ };
18874
+
18875
+ var _excluded$n = ["width", "height", "color"];
18876
+ var PaymentStatusIcon = function PaymentStatusIcon(_ref) {
18877
+ var _ref$width = _ref.width,
18878
+ width = _ref$width === void 0 ? "20" : _ref$width,
18879
+ _ref$height = _ref.height,
18880
+ height = _ref$height === void 0 ? "21" : _ref$height,
18881
+ _ref$color = _ref.color,
18882
+ color = _ref$color === void 0 ? CHARADE_GREY : _ref$color,
18883
+ props = _objectWithoutProperties(_ref, _excluded$n);
18884
+ return /*#__PURE__*/React.createElement("svg", _extends({
18885
+ xmlns: "http://www.w3.org/2000/svg",
18886
+ width: width,
18887
+ height: height,
18888
+ viewBox: "0 0 ".concat(width, " ").concat(height),
18889
+ fill: "none"
18890
+ }, props), /*#__PURE__*/React.createElement("path", {
18891
+ fillRule: "evenodd",
18892
+ clipRule: "evenodd",
18893
+ d: "M10.875 4.375C10.875 3.89175 11.2668 3.5 11.75 3.5H16.125C16.6082 3.5 17 3.89175 17 4.375V8.75C17 9.23325 16.6082 9.625 16.125 9.625H15.25V15.75C15.25 16.7165 14.4665 17.5 13.5 17.5H4.75C3.7835 17.5 3 16.7165 3 15.75V7C3 6.0335 3.7835 5.25 4.75 5.25H10.875V4.375ZM10.875 8.75V6.5625H4.75C4.50838 6.5625 4.3125 6.75838 4.3125 7V15.75C4.3125 15.9916 4.50838 16.1875 4.75 16.1875H13.5C13.7416 16.1875 13.9375 15.9916 13.9375 15.75V9.625H11.75C11.2668 9.625 10.875 9.23325 10.875 8.75ZM13.9375 7.875C14.6624 7.875 15.25 7.28737 15.25 6.5625C15.25 5.83763 14.6624 5.25 13.9375 5.25C13.2126 5.25 12.625 5.83763 12.625 6.5625C12.625 7.28737 13.2126 7.875 13.9375 7.875Z",
18894
+ fill: color
18895
+ }));
18896
+ };
18897
+
18852
18898
  var color$2 = "#15749D";
18853
18899
  var hoverColor$1 = "#116285";
18854
18900
  var activeColor$1 = "#0E506D";
@@ -19502,7 +19548,7 @@ var mobileFallbackValues = {
19502
19548
  };
19503
19549
  var MOBILE_BREAKPOINT = 768;
19504
19550
 
19505
- var _excluded$m = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
19551
+ var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
19506
19552
 
19507
19553
  /*
19508
19554
  New responsive text component for Title elements
@@ -19549,7 +19595,7 @@ var Title = function Title(_ref) {
19549
19595
  as = _ref$as === void 0 ? "h1" : _ref$as,
19550
19596
  dataQa = _ref.dataQa,
19551
19597
  children = _ref.children,
19552
- rest = _objectWithoutProperties(_ref, _excluded$m);
19598
+ rest = _objectWithoutProperties(_ref, _excluded$o);
19553
19599
  return /*#__PURE__*/React.createElement(TitleText, _extends({
19554
19600
  variant: variant,
19555
19601
  as: as,
@@ -20977,12 +21023,12 @@ var fallbackValues$8 = {
20977
21023
  linkColor: linkColor
20978
21024
  };
20979
21025
 
20980
- var _excluded$n = ["variant", "themeValues", "children"];
21026
+ var _excluded$p = ["variant", "themeValues", "children"];
20981
21027
  var BoxWithShadow = function BoxWithShadow(_ref) {
20982
21028
  var variant = _ref.variant,
20983
21029
  themeValues = _ref.themeValues,
20984
21030
  children = _ref.children,
20985
- props = _objectWithoutProperties(_ref, _excluded$n);
21031
+ props = _objectWithoutProperties(_ref, _excluded$p);
20986
21032
  var shadowRegistry = {
20987
21033
  baseStandard: "0px 3px 7px 2px ".concat(rgba$1(BLACK, 0.1), ", 0px 1px 2px 1px ").concat(rgba$1(BLACK, 0.1), ";"),
20988
21034
  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), ";"),
@@ -21042,7 +21088,7 @@ var fallbackValues$a = {
21042
21088
  externalLinkColor: externalLinkColor
21043
21089
  };
21044
21090
 
21045
- var _excluded$o = ["hoverColor", "activeColor", "extrastyles"];
21091
+ var _excluded$q = ["hoverColor", "activeColor", "extrastyles"];
21046
21092
  var ROYAL_BLUE$1 = ROYAL_BLUE;
21047
21093
  var LINK_TEXT_DECORATION$3 = LINK_TEXT_DECORATION;
21048
21094
 
@@ -21056,7 +21102,7 @@ var StyledExternalLink = styled( /*#__PURE__*/forwardRef(function (_ref, ref) {
21056
21102
  var hoverColor = _ref.hoverColor,
21057
21103
  activeColor = _ref.activeColor,
21058
21104
  extrastyles = _ref.extrastyles,
21059
- props = _objectWithoutProperties(_ref, _excluded$o);
21105
+ props = _objectWithoutProperties(_ref, _excluded$q);
21060
21106
  return /*#__PURE__*/React.createElement("a", _extends({}, props, {
21061
21107
  ref: ref
21062
21108
  }));
@@ -21131,7 +21177,7 @@ var ExternalLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
21131
21177
  }, safeChildren(children, /*#__PURE__*/React.createElement("span", null)));
21132
21178
  });
21133
21179
 
21134
- var _excluded$p = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
21180
+ var _excluded$r = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
21135
21181
  var ROYAL_BLUE$2 = ROYAL_BLUE;
21136
21182
  var LINK_TEXT_DECORATION$4 = LINK_TEXT_DECORATION;
21137
21183
 
@@ -21147,7 +21193,7 @@ var StyledInternalLink = styled( /*#__PURE__*/forwardRef(function (_ref, ref) {
21147
21193
  active = _ref.active,
21148
21194
  color = _ref.color,
21149
21195
  extrastyles = _ref.extrastyles,
21150
- props = _objectWithoutProperties(_ref, _excluded$p);
21196
+ props = _objectWithoutProperties(_ref, _excluded$r);
21151
21197
  return /*#__PURE__*/React.createElement(Link, _extends({}, props, {
21152
21198
  ref: ref
21153
21199
  }));
@@ -22830,7 +22876,7 @@ _curry2(function test(pattern, str) {
22830
22876
  return _cloneRegExp(pattern).test(str);
22831
22877
  });
22832
22878
 
22833
- var _excluded$q = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
22879
+ var _excluded$s = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
22834
22880
  var ButtonWithLink = function ButtonWithLink(_ref) {
22835
22881
  var _ref$url = _ref.url,
22836
22882
  url = _ref$url === void 0 ? "/" : _ref$url,
@@ -22845,7 +22891,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
22845
22891
  _ref$newTab = _ref.newTab,
22846
22892
  newTab = _ref$newTab === void 0 ? false : _ref$newTab,
22847
22893
  dataQa = _ref.dataQa,
22848
- otherProps = _objectWithoutProperties(_ref, _excluded$q);
22894
+ otherProps = _objectWithoutProperties(_ref, _excluded$s);
22849
22895
  var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
22850
22896
  var children = _ref2.children,
22851
22897
  url = _ref2.url,
@@ -22933,7 +22979,7 @@ var ParagraphText = styled.p.withConfig({
22933
22979
  return extraStyles;
22934
22980
  });
22935
22981
 
22936
- var _excluded$r = ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"];
22982
+ var _excluded$t = ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"];
22937
22983
  var Paragraph = function Paragraph(_ref) {
22938
22984
  var themeValues = _ref.themeValues,
22939
22985
  _ref$weight = _ref.weight,
@@ -22947,7 +22993,7 @@ var Paragraph = function Paragraph(_ref) {
22947
22993
  dataQa = _ref.dataQa,
22948
22994
  children = _ref.children,
22949
22995
  as = _ref.as,
22950
- rest = _objectWithoutProperties(_ref, _excluded$r);
22996
+ rest = _objectWithoutProperties(_ref, _excluded$t);
22951
22997
  return /*#__PURE__*/React.createElement(ParagraphText, _extends({
22952
22998
  weight: weight,
22953
22999
  color: color,
@@ -23151,7 +23197,7 @@ var errorStyles = {
23151
23197
  "default": "border: 1px solid ".concat(RED, ";")
23152
23198
  };
23153
23199
  var focusedStyles = {
23154
- "default": "box-shadow: 0 0 5px 0 ".concat(MATISSE_BLUE, ";")
23200
+ "default": "\n outline: 3px solid ".concat(ROYAL_BLUE, "; \n outline-offset: 3px;\n ")
23155
23201
  };
23156
23202
  var disabledCheckedStyles = {
23157
23203
  "default": "\n background: #6d717e;\n border: 1px solid #6d717e;\n"
@@ -23189,7 +23235,7 @@ var ENTER = 13;
23189
23235
  var ESCAPE = 27;
23190
23236
  var SPACEBAR = 32;
23191
23237
 
23192
- var _excluded$s = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles"];
23238
+ var _excluded$u = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles", "hasIconOverride", "icon"];
23193
23239
  var CheckboxContainer = styled.span.withConfig({
23194
23240
  displayName: "Checkbox__CheckboxContainer",
23195
23241
  componentId: "sc-36kqbv-0"
@@ -23197,7 +23243,7 @@ var CheckboxContainer = styled.span.withConfig({
23197
23243
  var CheckboxLabelContainer = styled.label.withConfig({
23198
23244
  displayName: "Checkbox__CheckboxLabelContainer",
23199
23245
  componentId: "sc-36kqbv-1"
23200
- })(["display:flex;align-items:center;column-gap:1rem;"]);
23246
+ })(["display:flex;align-items:center;column-gap:1rem;cursor:pointer;"]);
23201
23247
  var CheckboxIcon = styled.svg.withConfig({
23202
23248
  displayName: "Checkbox__CheckboxIcon",
23203
23249
  componentId: "sc-36kqbv-2"
@@ -23256,7 +23302,10 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref5, ref) {
23256
23302
  _ref5$dataQa = _ref5.dataQa,
23257
23303
  dataQa = _ref5$dataQa === void 0 ? null : _ref5$dataQa,
23258
23304
  checkboxExtraStyles = _ref5.checkboxExtraStyles,
23259
- rest = _objectWithoutProperties(_ref5, _excluded$s);
23305
+ _ref5$hasIconOverride = _ref5.hasIconOverride,
23306
+ hasIconOverride = _ref5$hasIconOverride === void 0 ? false : _ref5$hasIconOverride,
23307
+ Icon = _ref5.icon,
23308
+ rest = _objectWithoutProperties(_ref5, _excluded$u);
23260
23309
  var _useState = useState(false),
23261
23310
  _useState2 = _slicedToArray(_useState, 2),
23262
23311
  focused = _useState2[0],
@@ -23284,7 +23333,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref5, ref) {
23284
23333
  },
23285
23334
  hiddenStyles: hidden,
23286
23335
  background: themeValues.backgroundColor,
23287
- extraStyles: "outline: none; ".concat(extraStyles, "; margin: ").concat(checkboxMargin, ";")
23336
+ extraStyles: "\n :focus {\n outline: 0;\n }\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
23288
23337
  }, rest), /*#__PURE__*/React.createElement(CheckboxLabelContainer, {
23289
23338
  "data-qa": dataQa
23290
23339
  }, /*#__PURE__*/React.createElement(CheckboxContainer, {
@@ -23314,7 +23363,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref5, ref) {
23314
23363
  disabledCheckedStyles: themeValues.disabledCheckedStyles,
23315
23364
  focusedStyles: themeValues.focusedStyles,
23316
23365
  checkboxExtraStyles: checkboxExtraStyles
23317
- }, /*#__PURE__*/React.createElement(CheckboxIcon, {
23366
+ }, hasIconOverride ? /*#__PURE__*/React.createElement(Icon, null) : /*#__PURE__*/React.createElement(CheckboxIcon, {
23318
23367
  viewBox: "0 0 24 24",
23319
23368
  disabled: disabled,
23320
23369
  disabledCheckColor: themeValues.disabledCheckColor,
@@ -23612,7 +23661,7 @@ var TableRowWrapper = styled.tr.withConfig({
23612
23661
  return extraStyles;
23613
23662
  });
23614
23663
 
23615
- var _excluded$t = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
23664
+ var _excluded$v = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
23616
23665
  var TableRow = function TableRow(_ref) {
23617
23666
  var children = _ref.children,
23618
23667
  extraStyles = _ref.extraStyles,
@@ -23621,7 +23670,7 @@ var TableRow = function TableRow(_ref) {
23621
23670
  hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
23622
23671
  onClick = _ref.onClick,
23623
23672
  themeValues = _ref.themeValues,
23624
- props = _objectWithoutProperties(_ref, _excluded$t);
23673
+ props = _objectWithoutProperties(_ref, _excluded$v);
23625
23674
  return /*#__PURE__*/React.createElement(TableRowWrapper, _extends({
23626
23675
  onClick: onClick,
23627
23676
  hoverEffect: hoverEffect,
@@ -26455,7 +26504,7 @@ var mobileFallbackValues$1 = {
26455
26504
  };
26456
26505
  var MOBILE_BREAKPOINT$1 = 768;
26457
26506
 
26458
- var _excluded$u = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26507
+ var _excluded$w = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26459
26508
 
26460
26509
  /*
26461
26510
  New responsive text component for Detail elements
@@ -26505,7 +26554,7 @@ var Detail = function Detail(_ref) {
26505
26554
  as = _ref$as === void 0 ? "p" : _ref$as,
26506
26555
  dataQa = _ref.dataQa,
26507
26556
  children = _ref.children,
26508
- rest = _objectWithoutProperties(_ref, _excluded$u);
26557
+ rest = _objectWithoutProperties(_ref, _excluded$w);
26509
26558
  return /*#__PURE__*/React.createElement(DetailText, _extends({
26510
26559
  variant: variant,
26511
26560
  as: as,
@@ -27099,83 +27148,79 @@ var createFormat = function createFormat(formats, formatChar) {
27099
27148
  var FormattedInput = function FormattedInput(_ref) {
27100
27149
  var value = _ref.value,
27101
27150
  formatter = _ref.formatter,
27102
- onChange = _ref.onChange,
27151
+ _onChange = _ref.onChange,
27103
27152
  props = _objectWithoutProperties$1(_ref, ["value", "formatter", "onChange"]);
27104
27153
 
27105
- var _useState = useState(format$1(formatter)(value)),
27106
- _useState2 = _slicedToArray$1(_useState, 2),
27107
- formattedValue = _useState2[0],
27108
- setFormattedValue = _useState2[1];
27109
-
27110
27154
  var inputEl = useRef(null);
27111
- var stateRefs = useRef({
27155
+
27156
+ var _useState = useState({
27112
27157
  selectionStart: 0,
27113
27158
  selectionEnd: 0,
27114
- isDelete: false,
27115
- rawValue: ''
27116
- });
27159
+ rawValue: value,
27160
+ "delete": false,
27161
+ formattedValue: format$1(formatter)(value)
27162
+ }),
27163
+ _useState2 = _slicedToArray$1(_useState, 2),
27164
+ state = _useState2[0],
27165
+ setState = _useState2[1];
27166
+
27117
27167
  useLayoutEffect(function () {
27118
27168
  // A lot of the work here is cursor manipulation
27119
27169
  if (inputEl.current && inputEl.current === document.activeElement) {
27120
- inputEl.current.setSelectionRange(stateRefs.current.selectionStart, stateRefs.current.selectionEnd);
27121
- }
27122
- }, [stateRefs]);
27123
-
27124
- var handleChange = function handleChange(event) {
27125
- var deleteKeyPressed = stateRefs.current.isDelete;
27126
- var maxFormatExceeded = stateRefs.current.rawValue.length >= formatter.formats.length - 1;
27127
-
27128
- if (maxFormatExceeded && !deleteKeyPressed) {
27129
- return;
27130
- }
27131
- /* At the beginning of onChange, event.target.value is a concat of the previous formatted value
27132
- * and an unformatted injection at the start, end, or in the middle (maybe a deletion). To prepare
27133
- * the unformatted value for the user's onChange, the formatted string and unformatted injection need
27134
- * to be separated, then unformat the formatted string, then insert (or delete) the injection from the
27135
- * old unformatted value.
27136
- */
27137
-
27138
-
27139
- var injectionLength = event.target.value.length - formattedValue.length;
27140
- var end = stateRefs.current.selectionStart === stateRefs.current.selectionEnd ? stateRefs.current.selectionStart + injectionLength : stateRefs.current.selectionEnd - 1;
27141
- var injection = event.target.value.substring(stateRefs.current.selectionStart, end); // Injection is the new unformatted piece of the input
27142
- // Need to find where to put it
27143
-
27144
- var rawInjectionPointStart = formattedToUnformattedIndex(stateRefs.current.selectionStart, stateRefs.current.rawValue, formatter);
27145
- var rawInjectionPointEnd = formattedToUnformattedIndex(stateRefs.current.selectionEnd, stateRefs.current.rawValue, formatter); // Unformat the previous formatted value for injection
27146
- // Using the relevant format string, strips away chars not marked with the formatChar
27147
-
27148
- var unformattedOldValue = unformat(formatter)(formattedValue, stateRefs.current.rawValue.length); // Edit the previous unformatted value (either add, update or delete)
27149
-
27150
- var injectIntoOldValue = inject(unformattedOldValue);
27151
- var unformattedNewValue = deleteKeyPressed ? rawInjectionPointStart === rawInjectionPointEnd ? injectIntoOldValue(rawInjectionPointStart - 1, rawInjectionPointStart, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, injection);
27152
- var lengthDifference = unformattedNewValue.length - stateRefs.current.rawValue.length;
27153
- var rawIndex = formattedToUnformattedIndex(stateRefs.current.selectionStart, stateRefs.current.rawValue, formatter) + lengthDifference; // Find the new cursor position for the potential formatted value
27154
- // Applied by useLayoutEffect
27155
-
27156
- var newFormattedCursorPosition = stateRefs.current.selectionStart === stateRefs.current.selectionEnd ? unformattedToFormattedIndex(rawIndex, unformattedNewValue, formatter, deleteKeyPressed) : deleteKeyPressed ? stateRefs.current.selectionStart : stateRefs.current.selectionEnd;
27157
- var formattedNewValue = format$1(formatter)(unformattedNewValue);
27158
- setFormattedValue(formattedNewValue); // Apply the external onChange function to the raw underlying string
27159
- // This is where the user generally updates the input value
27160
-
27161
- if (onChange) {
27162
- onChange(unformattedNewValue);
27170
+ inputEl.current.setSelectionRange(state.selectionStart, state.selectionEnd);
27163
27171
  }
27164
- };
27165
-
27172
+ });
27166
27173
  return React.createElement("input", _extends$2({}, props, {
27167
27174
  ref: inputEl,
27168
27175
  value: format$1(formatter)(value),
27169
27176
  onKeyDown: function onKeyDown(event) {
27170
- // Keep track of the state of the input before onChange
27171
- stateRefs.current = {
27172
- isDelete: event.key === "Backspace" || event.key === "Delete",
27177
+ // Keep track of the state of the input before onChange, including if user is hitting delete
27178
+ setState({
27179
+ rawValue: value,
27173
27180
  selectionStart: event.target.selectionStart,
27174
27181
  selectionEnd: event.target.selectionEnd,
27175
- rawValue: value
27176
- };
27182
+ "delete": event.key === "Backspace" || event.key === "Delete",
27183
+ formattedValue: event.target.value
27184
+ });
27177
27185
  },
27178
- onChange: handleChange
27186
+ onChange: function onChange(event) {
27187
+ /* At the beginning of onChange, event.target.value is a concat of the previous formatted value
27188
+ * and an unformatted injection at the start, end, or in the middle (maybe a deletion). To prepare
27189
+ * the unformatted value for the user's onChange, the formatted string and unformatted injection need
27190
+ * to be separated, then unformat the formatted string, then insert (or delete) the injection from the
27191
+ * old unformatted value.
27192
+ */
27193
+ var injectionLength = event.target.value.length - state.formattedValue.length;
27194
+ var end = state.selectionStart === state.selectionEnd ? state.selectionStart + injectionLength : state.selectionEnd - 1;
27195
+ var injection = event.target.value.substring(state.selectionStart, end); // Injection is the new unformatted piece of the input
27196
+ // Need to find where to put it
27197
+
27198
+ var rawInjectionPointStart = formattedToUnformattedIndex(state.selectionStart, state.rawValue, formatter);
27199
+ var rawInjectionPointEnd = formattedToUnformattedIndex(state.selectionEnd, state.rawValue, formatter); // Unformat the previous formatted value for injection
27200
+ // Using the relevant format string, strips away chars not marked with the formatChar
27201
+
27202
+ var unformattedOldValue = unformat(formatter)(state.formattedValue, state.rawValue.length); // Edit the previous unformatted value (either add, update or delete)
27203
+
27204
+ var injectIntoOldValue = inject(unformattedOldValue);
27205
+ var unformattedNewValue = state["delete"] ? rawInjectionPointStart === rawInjectionPointEnd ? injectIntoOldValue(rawInjectionPointStart - 1, rawInjectionPointStart, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, injection);
27206
+ var lengthDifference = unformattedNewValue.length - state.rawValue.length;
27207
+ var rawIndex = formattedToUnformattedIndex(state.selectionStart, state.rawValue, formatter) + lengthDifference; // Find the new cursor position for the potential formatted value
27208
+ // Applied by useLayoutEffect
27209
+
27210
+ var newFormattedCursorPosition = state.selectionStart == state.selectionEnd ? unformattedToFormattedIndex(rawIndex, unformattedNewValue, formatter, state["delete"]) : state["delete"] ? state.selectionStart : state.selectionEnd;
27211
+ setState({
27212
+ selectionStart: newFormattedCursorPosition,
27213
+ selectionEnd: newFormattedCursorPosition,
27214
+ rawValue: state.rawValue,
27215
+ "delete": false,
27216
+ formattedValue: state.formattedValue
27217
+ }); // Apply the external onChange function to the raw underlying string
27218
+ // This is where the user generally updates the input value
27219
+
27220
+ if (_onChange) {
27221
+ _onChange(unformattedNewValue);
27222
+ }
27223
+ }
27179
27224
  }));
27180
27225
  };
27181
27226
 
@@ -27243,7 +27288,7 @@ var fallbackValues$n = {
27243
27288
  formFooterPanel: formFooterPanel
27244
27289
  };
27245
27290
 
27246
- var _excluded$v = ["showErrors", "themeValues"],
27291
+ var _excluded$x = ["showErrors", "themeValues"],
27247
27292
  _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
27248
27293
  var InputField = styled.input.withConfig({
27249
27294
  displayName: "FormInput__InputField",
@@ -27278,7 +27323,7 @@ var InputField = styled.input.withConfig({
27278
27323
  var FormattedInputField = styled(function (_ref8) {
27279
27324
  var showErrors = _ref8.showErrors,
27280
27325
  themeValues = _ref8.themeValues,
27281
- props = _objectWithoutProperties(_ref8, _excluded$v);
27326
+ props = _objectWithoutProperties(_ref8, _excluded$x);
27282
27327
  return /*#__PURE__*/React.createElement(FormattedInput, props);
27283
27328
  }).withConfig({
27284
27329
  displayName: "FormInput__FormattedInputField",
@@ -27483,7 +27528,7 @@ var FormInput = function FormInput(_ref15) {
27483
27528
  };
27484
27529
  var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$n, "default");
27485
27530
 
27486
- var _excluded$w = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
27531
+ var _excluded$y = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
27487
27532
  var FormInputRow = function FormInputRow(_ref) {
27488
27533
  var _ref$breakpoint = _ref.breakpoint,
27489
27534
  breakpoint = _ref$breakpoint === void 0 ? "30rem" : _ref$breakpoint,
@@ -27492,7 +27537,7 @@ var FormInputRow = function FormInputRow(_ref) {
27492
27537
  largeChild = _ref.largeChild,
27493
27538
  largeChildSize = _ref.largeChildSize,
27494
27539
  children = _ref.children,
27495
- rest = _objectWithoutProperties(_ref, _excluded$w);
27540
+ rest = _objectWithoutProperties(_ref, _excluded$y);
27496
27541
  return /*#__PURE__*/React.createElement(Box, _extends({
27497
27542
  padding: "0"
27498
27543
  }, rest), /*#__PURE__*/React.createElement(Switcher, {
@@ -27503,24 +27548,24 @@ var FormInputRow = function FormInputRow(_ref) {
27503
27548
  }, children));
27504
27549
  };
27505
27550
 
27506
- var _excluded$x = ["childGap", "bottomItem", "children"];
27551
+ var _excluded$z = ["childGap", "bottomItem", "children"];
27507
27552
  var FormInputColumn = function FormInputColumn(_ref) {
27508
27553
  var _ref$childGap = _ref.childGap,
27509
27554
  childGap = _ref$childGap === void 0 ? "0.5rem" : _ref$childGap,
27510
27555
  bottomItem = _ref.bottomItem,
27511
27556
  children = _ref.children,
27512
- rest = _objectWithoutProperties(_ref, _excluded$x);
27557
+ rest = _objectWithoutProperties(_ref, _excluded$z);
27513
27558
  return /*#__PURE__*/React.createElement(Stack, _extends({
27514
27559
  childGap: childGap,
27515
27560
  bottomItem: bottomItem
27516
27561
  }, rest), children);
27517
27562
  };
27518
27563
 
27519
- var _excluded$y = ["themeValues", "children"];
27564
+ var _excluded$A = ["themeValues", "children"];
27520
27565
  var FormContainer = function FormContainer(_ref) {
27521
27566
  var themeValues = _ref.themeValues,
27522
27567
  children = _ref.children,
27523
- rest = _objectWithoutProperties(_ref, _excluded$y);
27568
+ rest = _objectWithoutProperties(_ref, _excluded$A);
27524
27569
  var _useContext = useContext(ThemeContext),
27525
27570
  isMobile = _useContext.isMobile;
27526
27571
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -27830,7 +27875,7 @@ var fallbackValues$r = {
27830
27875
  fontSize: fontSize$8
27831
27876
  };
27832
27877
 
27833
- var _excluded$z = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
27878
+ var _excluded$B = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
27834
27879
  var Heading = function Heading(_ref) {
27835
27880
  var themeValues = _ref.themeValues,
27836
27881
  _ref$weight = _ref.weight,
@@ -27849,7 +27894,7 @@ var Heading = function Heading(_ref) {
27849
27894
  as = _ref$as === void 0 ? variant : _ref$as,
27850
27895
  dataQa = _ref.dataQa,
27851
27896
  children = _ref.children,
27852
- rest = _objectWithoutProperties(_ref, _excluded$z);
27897
+ rest = _objectWithoutProperties(_ref, _excluded$B);
27853
27898
  return /*#__PURE__*/React.createElement(HeadingText, _extends({
27854
27899
  variant: variant,
27855
27900
  as: as,
@@ -28050,11 +28095,11 @@ var LabeledAmountV2 = function LabeledAmountV2(_ref) {
28050
28095
  }, /*#__PURE__*/React.createElement("span", null, label), /*#__PURE__*/React.createElement("span", null, amount));
28051
28096
  };
28052
28097
 
28053
- var _excluded$A = ["version"];
28098
+ var _excluded$C = ["version"];
28054
28099
  var LabeledAmount = function LabeledAmount(_ref) {
28055
28100
  var _ref$version = _ref.version,
28056
28101
  version = _ref$version === void 0 ? "v1" : _ref$version,
28057
- rest = _objectWithoutProperties(_ref, _excluded$A);
28102
+ rest = _objectWithoutProperties(_ref, _excluded$C);
28058
28103
  var LabeledAmountComponent = version === "v1" ? LabeledAmountV1 : LabeledAmountV2;
28059
28104
  return /*#__PURE__*/React.createElement(LabeledAmountComponent, rest);
28060
28105
  };
@@ -28199,7 +28244,7 @@ var Loading = function Loading() {
28199
28244
  })))));
28200
28245
  };
28201
28246
 
28202
- var _excluded$B = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
28247
+ var _excluded$D = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
28203
28248
  var NavFooter = function NavFooter(_ref) {
28204
28249
  var leftContent = _ref.leftContent,
28205
28250
  rightContent = _ref.rightContent,
@@ -28214,7 +28259,7 @@ var NavFooter = function NavFooter(_ref) {
28214
28259
  footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
28215
28260
  isMobile = _ref.isMobile,
28216
28261
  footerWidth = _ref.footerWidth,
28217
- rest = _objectWithoutProperties(_ref, _excluded$B);
28262
+ rest = _objectWithoutProperties(_ref, _excluded$D);
28218
28263
  return /*#__PURE__*/React.createElement(Box, _extends({
28219
28264
  padding: footerPadding,
28220
28265
  background: backgroundColor,
@@ -28245,7 +28290,7 @@ var NavFooter = function NavFooter(_ref) {
28245
28290
  }, rightContent)))))));
28246
28291
  };
28247
28292
 
28248
- var _excluded$C = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
28293
+ var _excluded$E = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
28249
28294
  var NavHeader = function NavHeader(_ref) {
28250
28295
  var leftContent = _ref.leftContent,
28251
28296
  rightContent = _ref.rightContent,
@@ -28254,7 +28299,7 @@ var NavHeader = function NavHeader(_ref) {
28254
28299
  isMobile = _ref.isMobile,
28255
28300
  backgroundColor = _ref.backgroundColor,
28256
28301
  headerWidth = _ref.headerWidth,
28257
- rest = _objectWithoutProperties(_ref, _excluded$C);
28302
+ rest = _objectWithoutProperties(_ref, _excluded$E);
28258
28303
  return /*#__PURE__*/React.createElement(Box, _extends({
28259
28304
  padding: "0 16px 4px",
28260
28305
  background: backgroundColor,
@@ -46674,11 +46719,11 @@ var Modal$2 = function Modal(_ref) {
46674
46719
  };
46675
46720
  var ModalControlV2 = withWindowSize(Modal$2);
46676
46721
 
46677
- var _excluded$D = ["version"];
46722
+ var _excluded$F = ["version"];
46678
46723
  var Modal$3 = function Modal(_ref) {
46679
46724
  var _ref$version = _ref.version,
46680
46725
  version = _ref$version === void 0 ? "v1" : _ref$version,
46681
- rest = _objectWithoutProperties(_ref, _excluded$D);
46726
+ rest = _objectWithoutProperties(_ref, _excluded$F);
46682
46727
  var ModalControl = version === "v1" ? Modal$1 : ModalControlV2;
46683
46728
  return /*#__PURE__*/React.createElement(ModalControl, rest);
46684
46729
  };
@@ -47980,7 +48025,7 @@ var fallbackValues$P = {
47980
48025
  labeledAmountTotal: labeledAmountTotal
47981
48026
  };
47982
48027
 
47983
- var _excluded$E = ["amount"],
48028
+ var _excluded$G = ["amount"],
47984
48029
  _excluded2$1 = ["amount"];
47985
48030
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
47986
48031
  var lineItemElems = _ref.lineItemElems,
@@ -48223,7 +48268,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
48223
48268
  return fee.amount > 0;
48224
48269
  }).map(function (_ref5) {
48225
48270
  var amount = _ref5.amount,
48226
- rest = _objectWithoutProperties(_ref5, _excluded$E);
48271
+ rest = _objectWithoutProperties(_ref5, _excluded$G);
48227
48272
  return _objectSpread2(_objectSpread2({}, rest), {}, {
48228
48273
  amount: displayCurrency(amount)
48229
48274
  });
@@ -48660,11 +48705,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
48660
48705
  }, errorMessage))))));
48661
48706
  };
48662
48707
 
48663
- var _excluded$F = ["version"];
48708
+ var _excluded$H = ["version"];
48664
48709
  var TermsAndConditions = function TermsAndConditions(_ref) {
48665
48710
  var _ref$version = _ref.version,
48666
48711
  version = _ref$version === void 0 ? "v1" : _ref$version,
48667
- rest = _objectWithoutProperties(_ref, _excluded$F);
48712
+ rest = _objectWithoutProperties(_ref, _excluded$H);
48668
48713
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
48669
48714
  return /*#__PURE__*/React.createElement(TermsAndConditionsControl, rest);
48670
48715
  };
@@ -49472,7 +49517,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
49472
49517
  }, section.content))));
49473
49518
  };
49474
49519
 
49475
- var _excluded$G = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections", "borderOverride"];
49520
+ var _excluded$I = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections", "borderOverride"];
49476
49521
 
49477
49522
  /**
49478
49523
  - The RadioSection component takes either a flat array (via the 'sections'
@@ -49521,7 +49566,7 @@ var RadioSection = function RadioSection(_ref) {
49521
49566
  isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
49522
49567
  groupedSections = _ref.groupedSections,
49523
49568
  borderOverride = _ref.borderOverride,
49524
- rest = _objectWithoutProperties(_ref, _excluded$G);
49569
+ rest = _objectWithoutProperties(_ref, _excluded$I);
49525
49570
  var _useState = useState(null),
49526
49571
  _useState2 = _slicedToArray(_useState, 2),
49527
49572
  focused = _useState2[0],
@@ -50068,7 +50113,7 @@ var Timeout = function Timeout(_ref) {
50068
50113
  };
50069
50114
  var Timeout$1 = withWindowSize(Timeout);
50070
50115
 
50071
- var _excluded$H = ["variant", "message", "toastOpen", "closeToastNotification", "extraStyles", "minWidth", "maxWidth", "height", "childGap", "backgroundColor", "role", "ariaLive", "screenReaderMessage", "showScreenReaderMessage"];
50116
+ var _excluded$J = ["variant", "message", "toastOpen", "closeToastNotification", "extraStyles", "minWidth", "maxWidth", "height", "childGap", "backgroundColor", "role", "ariaLive", "screenReaderMessage", "showScreenReaderMessage"];
50072
50117
  var VARIANTS = {
50073
50118
  SUCCESS: "success",
50074
50119
  ERROR: "error"
@@ -50097,7 +50142,7 @@ var ToastNotification = function ToastNotification(_ref) {
50097
50142
  screenReaderMessage = _ref.screenReaderMessage,
50098
50143
  _ref$showScreenReader = _ref.showScreenReaderMessage,
50099
50144
  showScreenReaderMessage = _ref$showScreenReader === void 0 ? true : _ref$showScreenReader,
50100
- rest = _objectWithoutProperties(_ref, _excluded$H);
50145
+ rest = _objectWithoutProperties(_ref, _excluded$J);
50101
50146
  var screenReaderMessageRef = useRef();
50102
50147
  var LIVEREGION_TRANSITION_DELAY = 1000;
50103
50148
  useEffect$1(function () {
@@ -50280,7 +50325,7 @@ var PopupMenuItemContainer = styled(ButtonWithAction).withConfig({
50280
50325
  return "\n background-color: ".concat(isDeleteAction ? theme.menuItemHoverBackgroundColorDelete : theme.menuItemHoverBackgroundColor, ";\n ");
50281
50326
  });
50282
50327
 
50283
- var _excluded$I = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
50328
+ var _excluded$K = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
50284
50329
  var PopupMenuItem = function PopupMenuItem(_ref) {
50285
50330
  var id = _ref.id,
50286
50331
  closeMenuCallback = _ref.closeMenuCallback,
@@ -50296,7 +50341,7 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
50296
50341
  hoverStyles = _ref.hoverStyles,
50297
50342
  activeStyles = _ref.activeStyles,
50298
50343
  extraStyles = _ref.extraStyles,
50299
- rest = _objectWithoutProperties(_ref, _excluded$I);
50344
+ rest = _objectWithoutProperties(_ref, _excluded$K);
50300
50345
  return /*#__PURE__*/React.createElement(PopupMenuItemContainer, _extends({
50301
50346
  id: id,
50302
50347
  role: "menuItem",
@@ -50469,20 +50514,21 @@ var PopupMenu = function PopupMenu(_ref) {
50469
50514
  };
50470
50515
  var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$Z);
50471
50516
 
50472
- var primaryColor$1 = INFO_BLUE;
50517
+ var primaryColor$1 = WHITE;
50518
+ var primaryHoverColor = INFO_BLUE;
50473
50519
  var secondaryColor = MATISSE_BLUE;
50520
+ var secondaryHoverColor = "#115D7E";
50474
50521
  var fallbackValues$_ = {
50475
50522
  primaryColor: primaryColor$1,
50476
- secondaryColor: secondaryColor
50523
+ primaryHoverColor: primaryHoverColor,
50524
+ secondaryColor: secondaryColor,
50525
+ secondaryHoverColor: secondaryHoverColor
50477
50526
  };
50478
50527
 
50479
50528
  var StyledFilterContainer = styled(Box).withConfig({
50480
50529
  displayName: "MultipleSelectFilterstyled__StyledFilterContainer",
50481
50530
  componentId: "sc-126xgc2-0"
50482
- })(["position:relative;box-sizing:border-box;padding:0;", ""], function (_ref) {
50483
- var extraStyles = _ref.extraStyles;
50484
- return extraStyles;
50485
- });
50531
+ })(["position:relative;overflow:visible;box-sizing:border-box;padding:0;"]);
50486
50532
  var FilterContainer = /*#__PURE__*/forwardRef(function (props, ref) {
50487
50533
  return /*#__PURE__*/React.createElement(StyledFilterContainer, _extends({
50488
50534
  ref: ref
@@ -50491,7 +50537,7 @@ var FilterContainer = /*#__PURE__*/forwardRef(function (props, ref) {
50491
50537
  var StyledFilterDropdown = styled(Box).withConfig({
50492
50538
  displayName: "MultipleSelectFilterstyled__StyledFilterDropdown",
50493
50539
  componentId: "sc-126xgc2-1"
50494
- })(["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;"]);
50540
+ })(["position:absolute;top:calc(100% + 0.5rem);left:0;width:18.4rem;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;"]);
50495
50541
  var FilterDropdownContainer = /*#__PURE__*/forwardRef(function (props, ref) {
50496
50542
  return /*#__PURE__*/React.createElement(StyledFilterDropdown, _extends({
50497
50543
  ref: ref
@@ -50500,12 +50546,16 @@ var FilterDropdownContainer = /*#__PURE__*/forwardRef(function (props, ref) {
50500
50546
  var FilterButton = styled(ButtonWithAction).withConfig({
50501
50547
  displayName: "MultipleSelectFilterstyled__FilterButton",
50502
50548
  componentId: "sc-126xgc2-2"
50503
- })(["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) {
50504
- var textColor = _ref2.textColor;
50505
- return "\n color: ".concat(textColor, ";\n ");
50506
- }, function (_ref3) {
50507
- var backgroundColor = _ref3.backgroundColor;
50508
- return "\n background-color: ".concat(backgroundColor, ";\n :hover,\n :active,\n :focus {\n background-color: ").concat(backgroundColor, ";\n }\n ");
50549
+ })(["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 (_ref) {
50550
+ var opened = _ref.opened,
50551
+ textColor = _ref.textColor,
50552
+ textHoverColor = _ref.textHoverColor;
50553
+ return "\n color: ".concat(opened ? textHoverColor : textColor, ";\n :hover,\n :active,\n :focus {\n color: ").concat(textHoverColor, ";\n > * {\n color: ").concat(textHoverColor, ";\n }\n }\n ");
50554
+ }, function (_ref2) {
50555
+ var opened = _ref2.opened,
50556
+ backgroundColor = _ref2.backgroundColor,
50557
+ backgroundHoverColor = _ref2.backgroundHoverColor;
50558
+ return "\n background-color: ".concat(opened ? backgroundHoverColor : backgroundColor, "; \n :hover,\n :active,\n :focus {\n background-color: ").concat(backgroundHoverColor, ";\n }\n ");
50509
50559
  });
50510
50560
  var StyledFilterButton = /*#__PURE__*/forwardRef(function (props, ref) {
50511
50561
  return /*#__PURE__*/React.createElement(FilterButton, _extends({
@@ -50516,7 +50566,8 @@ var StyledFilterButton = /*#__PURE__*/forwardRef(function (props, ref) {
50516
50566
  var ActionLinkButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
50517
50567
  var action = _ref.action,
50518
50568
  text = _ref.text,
50519
- dataQa = _ref.dataQa;
50569
+ dataQa = _ref.dataQa,
50570
+ ariaLabel = _ref.ariaLabel;
50520
50571
  return /*#__PURE__*/React.createElement(ButtonWithAction, {
50521
50572
  ref: ref,
50522
50573
  action: action,
@@ -50524,11 +50575,12 @@ var ActionLinkButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
50524
50575
  extraStyles: "\n padding: 0.2rem; \n margin: 0.5rem; \n min-height: auto; \n min-width: auto;\n ",
50525
50576
  textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, ";"),
50526
50577
  text: text,
50527
- dataQa: dataQa
50578
+ dataQa: dataQa,
50579
+ "aria-label": ariaLabel
50528
50580
  });
50529
50581
  });
50530
50582
 
50531
- var _excluded$J = ["width", "height", "color"];
50583
+ var _excluded$L = ["width", "height", "color"];
50532
50584
  var DropdownIconV2 = function DropdownIconV2(_ref) {
50533
50585
  var _ref$width = _ref.width,
50534
50586
  width = _ref$width === void 0 ? "18" : _ref$width,
@@ -50536,7 +50588,7 @@ var DropdownIconV2 = function DropdownIconV2(_ref) {
50536
50588
  height = _ref$height === void 0 ? "19" : _ref$height,
50537
50589
  _ref$color = _ref.color,
50538
50590
  color = _ref$color === void 0 ? "#292A33" : _ref$color,
50539
- props = _objectWithoutProperties(_ref, _excluded$J);
50591
+ props = _objectWithoutProperties(_ref, _excluded$L);
50540
50592
  return /*#__PURE__*/React.createElement("svg", _extends({
50541
50593
  width: width,
50542
50594
  height: height,
@@ -50582,7 +50634,9 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50582
50634
  action = _ref$action === void 0 ? noop$1 : _ref$action,
50583
50635
  opened = _ref.opened,
50584
50636
  backgroundColor = _ref.backgroundColor,
50585
- contentColor = _ref.contentColor,
50637
+ backgroundHoverColor = _ref.backgroundHoverColor,
50638
+ textColor = _ref.textColor,
50639
+ textHoverColor = _ref.textHoverColor,
50586
50640
  name = _ref.name,
50587
50641
  filterDropdownID = _ref.filterDropdownID,
50588
50642
  _ref$hasIcon = _ref.hasIcon,
@@ -50590,7 +50644,10 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50590
50644
  Icon = _ref.icon,
50591
50645
  truncateBtnTextWidth = _ref.truncateBtnTextWidth,
50592
50646
  filterLabel = _ref.filterLabel,
50593
- selectedOptions = _ref.selectedOptions;
50647
+ selectedOptions = _ref.selectedOptions,
50648
+ extraStyles = _ref.extraStyles;
50649
+ var btnTextFilterDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? "".concat(filterLabel, ": ") : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "");
50650
+ var btnTextItemsDescription = 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") : "";
50594
50651
  return /*#__PURE__*/React.createElement(StyledFilterButton, {
50595
50652
  ref: ref,
50596
50653
  variant: "tertiary",
@@ -50599,7 +50656,13 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50599
50656
  "aria-expanded": opened,
50600
50657
  "aria-controls": filterDropdownID,
50601
50658
  backgroundColor: backgroundColor,
50659
+ backgroundHoverColor: backgroundHoverColor,
50660
+ textColor: textColor,
50661
+ textHoverColor: textHoverColor,
50662
+ opened: opened,
50602
50663
  dataQa: "".concat(name, "-filter-button"),
50664
+ extraStyles: extraStyles,
50665
+ "aria-label": "".concat(filterLabel, " Filter: ").concat(btnTextFilterDescription, " ").concat(btnTextItemsDescription),
50603
50666
  contentOverride: true
50604
50667
  }, btnContentOverride ? btnContentOverride : /*#__PURE__*/React.createElement(Center, {
50605
50668
  as: "span",
@@ -50609,7 +50672,7 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50609
50672
  },
50610
50673
  intrinsic: true
50611
50674
  }, hasIcon && /*#__PURE__*/React.createElement(Icon, {
50612
- color: contentColor
50675
+ color: opened ? textHoverColor : textColor
50613
50676
  }), /*#__PURE__*/React.createElement(Center, {
50614
50677
  as: "span",
50615
50678
  style: {
@@ -50620,20 +50683,22 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50620
50683
  intrinsic: true
50621
50684
  }, /*#__PURE__*/React.createElement(Text$1, {
50622
50685
  variant: "pS",
50623
- color: contentColor,
50686
+ color: opened ? textHoverColor : textColor,
50624
50687
  extraStyles: "\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ".concat(truncateBtnTextWidth && "max-width:" + truncateBtnTextWidth, "\n ")
50625
- }, selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? filterLabel + ": " : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "")), /*#__PURE__*/React.createElement(Text$1, {
50626
- color: contentColor,
50688
+ }, btnTextFilterDescription), /*#__PURE__*/React.createElement(Text$1, {
50689
+ color: opened ? textHoverColor : textColor,
50627
50690
  variant: "pS"
50628
- }, 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.createElement(DropdownIconV2, {
50629
- color: contentColor
50691
+ }, btnTextItemsDescription)), /*#__PURE__*/React.createElement(DropdownIconV2, {
50692
+ color: opened ? textHoverColor : textColor
50630
50693
  })));
50631
50694
  });
50632
50695
 
50633
50696
  var FilterDropdown = /*#__PURE__*/forwardRef(function (_ref, ref) {
50634
50697
  var id = _ref.id,
50635
50698
  ariaOwns = _ref.ariaOwns,
50699
+ ariaControls = _ref.ariaControls,
50636
50700
  opened = _ref.opened,
50701
+ extraStyles = _ref.extraStyles,
50637
50702
  children = _ref.children;
50638
50703
  return /*#__PURE__*/React.createElement(React.Fragment, null, opened && /*#__PURE__*/React.createElement(FilterDropdownContainer, {
50639
50704
  ref: ref,
@@ -50641,7 +50706,9 @@ var FilterDropdown = /*#__PURE__*/forwardRef(function (_ref, ref) {
50641
50706
  role: "combobox",
50642
50707
  "aria-expanded": opened,
50643
50708
  "aria-haspopup": "listbox",
50644
- "aria-owns": ariaOwns
50709
+ "aria-owns": ariaOwns,
50710
+ "aria-controls": ariaControls,
50711
+ extraStyles: extraStyles
50645
50712
  }, children));
50646
50713
  });
50647
50714
 
@@ -50662,10 +50729,54 @@ var SearchBox = function SearchBox(_ref) {
50662
50729
  fieldActions: actions.fields.searchTerm,
50663
50730
  placeholder: placeholder,
50664
50731
  disabled: disabled,
50665
- 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 ")
50732
+ 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 :focus {\n outline-offset: -3px;\n }\n ")
50666
50733
  }));
50667
50734
  };
50668
50735
 
50736
+ var _excluded$M = ["width", "height", "color"];
50737
+ var CheckboxCheckmarkIcon = function CheckboxCheckmarkIcon(_ref) {
50738
+ var _ref$width = _ref.width,
50739
+ width = _ref$width === void 0 ? "18" : _ref$width,
50740
+ _ref$height = _ref.height,
50741
+ height = _ref$height === void 0 ? "18" : _ref$height,
50742
+ _ref$color = _ref.color,
50743
+ color = _ref$color === void 0 ? "#FEFEFE" : _ref$color,
50744
+ props = _objectWithoutProperties(_ref, _excluded$M);
50745
+ return /*#__PURE__*/React.createElement("svg", _extends({
50746
+ xmlns: "http://www.w3.org/2000/svg",
50747
+ width: width,
50748
+ height: height,
50749
+ viewBox: "0 0 ".concat(width, " ").concat(height),
50750
+ fill: "none"
50751
+ }, props), /*#__PURE__*/React.createElement("path", {
50752
+ fillRule: "evenodd",
50753
+ clipRule: "evenodd",
50754
+ d: "M13.7503 5.35354C13.555 5.15828 13.2385 5.15828 13.0432 5.35354L7.52373 10.873L5.52808 8.87735C5.33282 8.68209 5.01624 8.68209 4.82097 8.87735L4.35348 9.34484C4.15822 9.54011 4.15822 9.85669 4.35348 10.052L6.70268 12.4012L7.17018 12.8687C7.36544 13.0639 7.68203 13.0639 7.87729 12.8687L8.34478 12.4012L14.2178 6.52814C14.4131 6.33288 14.4131 6.0163 14.2178 5.82104L13.7503 5.35354Z",
50755
+ fill: "#FEFEFE"
50756
+ }), /*#__PURE__*/React.createElement("mask", {
50757
+ id: "mask0_3361_1486",
50758
+ style: {
50759
+ maskType: "luminance"
50760
+ },
50761
+ maskUnits: "userSpaceOnUse",
50762
+ x: "4",
50763
+ y: "5",
50764
+ width: "11",
50765
+ height: "9"
50766
+ }, /*#__PURE__*/React.createElement("path", {
50767
+ fillRule: "evenodd",
50768
+ clipRule: "evenodd",
50769
+ d: "M13.7503 5.35354C13.555 5.15828 13.2385 5.15828 13.0432 5.35354L7.52373 10.873L5.52808 8.87735C5.33282 8.68209 5.01624 8.68209 4.82097 8.87735L4.35348 9.34484C4.15822 9.54011 4.15822 9.85669 4.35348 10.052L6.70268 12.4012L7.17018 12.8687C7.36544 13.0639 7.68203 13.0639 7.87729 12.8687L8.34478 12.4012L14.2178 6.52814C14.4131 6.33288 14.4131 6.0163 14.2178 5.82104L13.7503 5.35354Z",
50770
+ fill: "white"
50771
+ })), /*#__PURE__*/React.createElement("g", {
50772
+ mask: "url(#mask0_3361_1486)"
50773
+ }, /*#__PURE__*/React.createElement("rect", {
50774
+ width: width,
50775
+ height: height,
50776
+ fill: color
50777
+ })));
50778
+ };
50779
+
50669
50780
  var FilterableListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
50670
50781
  var index = _ref.index,
50671
50782
  option = _ref.option,
@@ -50674,28 +50785,31 @@ var FilterableListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
50674
50785
  disabled = _ref.disabled,
50675
50786
  tabIndex = _ref.tabIndex,
50676
50787
  name = _ref.name,
50788
+ showDivider = _ref.showDivider,
50789
+ extraStyles = _ref.extraStyles,
50677
50790
  themeValues = _ref.themeValues;
50678
- return /*#__PURE__*/React.createElement(Box, {
50679
- padding: "0",
50791
+ var dividerStyles = "\n ::after {\n content: '';\n position: absolute;\n width: 100%;\n display: block;\n height: 1px;\n background-color: ".concat(GHOST_GREY, ";\n bottom: -0.5rem;\n left: 0;\n }");
50792
+ return /*#__PURE__*/React.createElement(Checkbox$1, {
50680
50793
  key: index,
50681
- extraStyles: "\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryColor, ";\n }\n ")
50682
- }, /*#__PURE__*/React.createElement(Checkbox$1, {
50683
50794
  ref: ref,
50684
50795
  title: option.name,
50685
50796
  name: option.name,
50797
+ role: "option",
50798
+ "aria-selected": checked,
50799
+ tabIndex: tabIndex,
50800
+ dataQa: "".concat(name, "-option-").concat(index),
50686
50801
  checked: checked,
50687
50802
  onChange: function onChange() {
50688
50803
  return selectOption(option);
50689
50804
  },
50690
50805
  textExtraStyles: "font-size: 0.875rem; margin: 0;",
50691
50806
  disabled: disabled,
50692
- extraStyles: "\n padding: 0.075rem 0.325rem; \n margin: 0;\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryColor, ";\n }\n "),
50693
- checkboxMargin: "0.3rem",
50694
- role: "option",
50695
- checkboxExtraStyles: "\n width: 1.375rem; \n height: 1.375rem;\n ".concat(checked && !disabled ? "background: " + themeValues.secondaryColor + ";" : "", "\n "),
50696
- tabIndex: tabIndex,
50697
- dataQa: "".concat(name, "-option-").concat(index)
50698
- }));
50807
+ extraStyles: "\n padding: 0.375rem 0.625rem; \n margin: 0;\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryHoverColor, ";\n }\n ").concat(showDivider && dividerStyles, "\n ").concat(extraStyles, "\n "),
50808
+ checkboxMargin: showDivider ? "0 0 1rem" : "0",
50809
+ hasIconOverride: true,
50810
+ icon: CheckboxCheckmarkIcon,
50811
+ checkboxExtraStyles: "\n display: flex;\n justify-content: center;\n align-items: center;\n height: 20px;\n width: 20px;\n ".concat(checked && !disabled ? "background: " + themeValues.secondaryColor + ";" : "", "\n ")
50812
+ });
50699
50813
  });
50700
50814
 
50701
50815
  var filterItemsList = function filterItemsList(list, searchTerm) {
@@ -50860,14 +50974,12 @@ var FilterableList = function FilterableList(_ref) {
50860
50974
  handleKeyDown = _useKeyboardNavigatio.handleKeyDown;
50861
50975
  return /*#__PURE__*/React.createElement(Box, {
50862
50976
  id: id,
50863
- role: "listbox",
50864
50977
  padding: "0",
50865
- extraStyles: "\n overflow-y: auto;\n max-height: 250px;\n display: flex;\n flex-flow: column;\n ",
50866
- onKeyDown: handleKeyDown
50867
- }, (sortedAppliedOptions === null || sortedAppliedOptions === void 0 ? void 0 : sortedAppliedOptions.length) > 0 && /*#__PURE__*/React.createElement(Box, {
50868
- padding: "0",
50869
- extraStyles: sortedOptions.length > 0 && "border-bottom: 1px solid ".concat(GHOST_GREY)
50870
- }, sortedAppliedOptions.map(function (option, index) {
50978
+ role: "listbox",
50979
+ "aria-label": "Filter options container",
50980
+ onKeyDown: handleKeyDown,
50981
+ extraStyles: "\n overflow-y: auto;\n max-height: 250px;\n display: flex;\n flex-flow: column;\n padding-bottom: 0.5rem;\n "
50982
+ }, (sortedAppliedOptions === null || sortedAppliedOptions === void 0 ? void 0 : sortedAppliedOptions.length) > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, sortedAppliedOptions.map(function (option, index) {
50871
50983
  var checked = isChecked(option, selectedOptions);
50872
50984
  var tabIndex = index === focusedIndex || index === 0 && focusedIndex === -1 ? "0" : "-1";
50873
50985
  return /*#__PURE__*/React.createElement(FilterableListItem, {
@@ -50881,9 +50993,10 @@ var FilterableList = function FilterableList(_ref) {
50881
50993
  selectOption: handleSelectOption,
50882
50994
  tabIndex: tabIndex,
50883
50995
  name: name,
50884
- themeValues: themeValues
50996
+ themeValues: themeValues,
50997
+ showDivider: sortedOptions.length > 0 && index === sortedAppliedOptions.length - 1
50885
50998
  });
50886
- })), sortedOptions.map(function (option, index) {
50999
+ })), /*#__PURE__*/React.createElement(React.Fragment, null, sortedOptions.map(function (option, index) {
50887
51000
  var checked = isChecked(option, selectedOptions);
50888
51001
  var isDisabled = isMaxSelectionReached(maxSelections, selectedOptions) && !checked;
50889
51002
  var indexOffset = sortedAppliedOptions !== null && sortedAppliedOptions !== void 0 && sortedAppliedOptions.length ? sortedAppliedOptions === null || sortedAppliedOptions === void 0 ? void 0 : sortedAppliedOptions.length : 0;
@@ -50903,7 +51016,7 @@ var FilterableList = function FilterableList(_ref) {
50903
51016
  name: name,
50904
51017
  themeValues: themeValues
50905
51018
  });
50906
- }));
51019
+ })));
50907
51020
  };
50908
51021
  var FilterableList$1 = /*#__PURE__*/React.memo(FilterableList);
50909
51022
 
@@ -50911,7 +51024,9 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50911
51024
  var actions = _ref.actions,
50912
51025
  autocompleteValue = _ref.autocompleteValue,
50913
51026
  btnContentOverride = _ref.btnContentOverride,
51027
+ btnExtraStyles = _ref.btnExtraStyles,
50914
51028
  disabled = _ref.disabled,
51029
+ dropdownExtraStyles = _ref.dropdownExtraStyles,
50915
51030
  extraStyles = _ref.extraStyles,
50916
51031
  fields = _ref.fields,
50917
51032
  filterLabel = _ref.filterLabel,
@@ -50930,8 +51045,6 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50930
51045
  placeholder = _ref$placeholder === void 0 ? "Search" : _ref$placeholder,
50931
51046
  _ref$searchable = _ref.searchable,
50932
51047
  searchable = _ref$searchable === void 0 ? true : _ref$searchable,
50933
- selectedOptions = _ref.selectedOptions,
50934
- setSelectedOptions = _ref.setSelectedOptions,
50935
51048
  themeValues = _ref.themeValues,
50936
51049
  _ref$truncateBtnTextW = _ref.truncateBtnTextWidth,
50937
51050
  truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW;
@@ -50941,22 +51054,29 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50941
51054
  setOpened = _useState2[1];
50942
51055
  var _useState3 = useState([]),
50943
51056
  _useState4 = _slicedToArray(_useState3, 2),
50944
- appliedOptions = _useState4[0],
50945
- setAppliedOptions = _useState4[1];
50946
- var handleClickOutsideContainer = function handleClickOutsideContainer() {
50947
- setOpened(false);
50948
- actions.fields.searchTerm.set("");
50949
- onApply(selectedOptions);
51057
+ selectedOptions = _useState4[0],
51058
+ setSelectedOptions = _useState4[1];
51059
+ var _useState5 = useState([]),
51060
+ _useState6 = _slicedToArray(_useState5, 2),
51061
+ appliedOptions = _useState6[0],
51062
+ setAppliedOptions = _useState6[1];
51063
+ var openedRef = useRef(opened);
51064
+ var handleOnClose = function handleOnClose() {
51065
+ if (openedRef.current) {
51066
+ setOpened(false);
51067
+ actions.fields.searchTerm.set("");
51068
+ }
50950
51069
  };
50951
51070
  var containerRef = useOutsideClickHook(function () {
50952
- return handleClickOutsideContainer();
51071
+ return handleOnClose();
50953
51072
  });
50954
51073
  var dropdownRef = useRef(null);
50955
51074
  var filterButtonRef = useRef(null);
50956
51075
  var applyFilterButtonRef = useRef(null);
50957
51076
  var filterDropdownID = "".concat(name, "-filter-dropdown");
50958
- var checkboxListID = "".concat(name, "-checkbox-list");
51077
+ var listGroupID = "".concat(name, "-list-group");
50959
51078
  useEffect$1(function () {
51079
+ openedRef.current = opened;
50960
51080
  if (!opened) {
50961
51081
  onApply(selectedOptions);
50962
51082
  setAppliedOptions(selectedOptions);
@@ -50973,9 +51093,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50973
51093
  or tabbing backward past the filter button.
50974
51094
  */
50975
51095
  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)) {
50976
- setOpened(false);
50977
- actions.fields.searchTerm.set("");
50978
- onApply(selectedOptions);
51096
+ handleOnClose();
50979
51097
  }
50980
51098
  };
50981
51099
  document.addEventListener("keydown", handleKeyDown);
@@ -50994,20 +51112,25 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50994
51112
  setOpened(!opened);
50995
51113
  },
50996
51114
  opened: opened,
50997
- backgroundColor: opened ? themeValues.primaryColor : selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? themeValues.secondaryColor : WHITE,
50998
- contentColor: !opened && selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? WHITE : CHARADE_GREY,
51115
+ backgroundHoverColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? themeValues.secondaryHoverColor : themeValues.primaryHoverColor,
51116
+ backgroundColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? themeValues.secondaryColor : themeValues.primaryColor,
51117
+ textColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? WHITE : CHARADE_GREY,
51118
+ textHoverColor: opened && !(appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length) ? CHARADE_GREY : WHITE,
50999
51119
  name: name,
51000
51120
  filterDropdownID: filterDropdownID,
51001
51121
  hasIcon: hasIcon,
51002
51122
  icon: Icon,
51003
51123
  truncateBtnTextWidth: truncateBtnTextWidth,
51004
51124
  filterLabel: filterLabel,
51005
- selectedOptions: selectedOptions
51125
+ selectedOptions: selectedOptions,
51126
+ extraStyles: btnExtraStyles
51006
51127
  }), /*#__PURE__*/React.createElement(FilterDropdown, {
51007
51128
  id: filterDropdownID,
51008
51129
  ref: dropdownRef,
51009
- ariaOwns: checkboxListID,
51010
- opened: opened
51130
+ ariaOwns: listGroupID,
51131
+ ariaControls: listGroupID,
51132
+ opened: opened,
51133
+ extraStyles: dropdownExtraStyles
51011
51134
  }, /*#__PURE__*/React.createElement(SearchBox, {
51012
51135
  showSearchBox: searchable && (options === null || options === void 0 ? void 0 : options.length) > 8,
51013
51136
  autocompleteValue: autocompleteValue,
@@ -51016,7 +51139,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51016
51139
  placeholder: placeholder,
51017
51140
  disabled: disabled
51018
51141
  }), /*#__PURE__*/React.createElement(FilterableList$1, {
51019
- id: checkboxListID,
51142
+ id: listGroupID,
51020
51143
  options: options,
51021
51144
  appliedOptions: appliedOptions,
51022
51145
  themeValues: themeValues,
@@ -51030,22 +51153,21 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51030
51153
  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 ")
51031
51154
  }, /*#__PURE__*/React.createElement(ActionLinkButton, {
51032
51155
  action: function action() {
51033
- setOpened(false);
51034
51156
  setSelectedOptions([]);
51035
- actions.fields.searchTerm.set("");
51157
+ handleOnClose();
51036
51158
  onClear();
51037
51159
  },
51038
51160
  text: "Clear",
51039
- dataQa: "".concat(name, "-clear-filters")
51161
+ dataQa: "".concat(name, "-clear-filters"),
51162
+ ariaLabel: "Clear all filters"
51040
51163
  }), /*#__PURE__*/React.createElement(ActionLinkButton, {
51041
51164
  ref: applyFilterButtonRef,
51042
51165
  action: function action() {
51043
- setOpened(false);
51044
- actions.fields.searchTerm.set("");
51045
- onApply(selectedOptions);
51166
+ return handleOnClose();
51046
51167
  },
51047
51168
  text: "Apply",
51048
- dataQa: "".concat(name, "-apply-filters")
51169
+ dataQa: "".concat(name, "-apply-filters"),
51170
+ ariaLabel: "Apply all filters"
51049
51171
  }))));
51050
51172
  };
51051
51173
  var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$_);
@@ -51343,5 +51465,5 @@ var index$6 = /*#__PURE__*/Object.freeze({
51343
51465
  useToastNotification: useToastNotification
51344
51466
  });
51345
51467
 
51346
- export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, AgencyIcon, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, ArrowDownCircleIconSmall, ArrowLeftCircleIconMedium, ArrowLeftCircleIconSmall, ArrowRightCircleIconSmall, ArrowRightIcon, ArrowUpCircleIconSmall, AutopayIcon, AutopayOnIcon, Badge$1 as Badge, BankIcon, BankIconLarge, Banner$1 as Banner, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, Card$1 as Card, CaretArrowDown$1 as CaretArrowDown, CaretArrowUp$1 as CaretArrowUp, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackIconMedium, ChargebackIconSmall, ChargebackReversalIcon, ChargebackReversalIconMedium, ChargebackReversalIconSmall, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, CloseIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, Copyable, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisabledAccountsAddIcon, DisabledPaymentMethodsAddIcon, DisabledPropertiesAddIcon, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, EmptyCartIconV2$1 as EmptyCartIconV2, ErroredIcon, ExternalLink, ExternalLinkIcon, FailedIcon, FindIconSmall$1 as FindIconSmall, FooterWithSubfooter$1 as FooterWithSubfooter, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedBankAccount$1 as FormattedBankAccount, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GenericErrorIcon, GoToEmailIcon$1 as GoToEmailIcon, Grid, GuidedCheckoutImage, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, HistoryIconSmall$1 as HistoryIconSmall, IconAdd, IconQuitLarge, ImageBox, Imposter, InternalLink, Jumbo$1 as Jumbo, KebabMenuIcon, KioskImage, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, LinkCard$1 as LinkCard, Loading, LoadingLine, LoginForm, Modal$3 as Modal, Module$1 as Module, Motion, MultiCartIcon, MultipleSelectFilter$1 as MultipleSelectFilter, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NavTabs, NoResultsIcon, NotFoundIcon, Obligation$1 as Obligation, iconsMap as ObligationIcons, OverageIcon, Pagination$1 as Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PencilIcon$1 as PencilIcon, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, PlusCircleIcon, PointOfSaleImage, Popover$1 as Popover, PopupMenu$1 as PopupMenu, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, ProfileImage, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioButtonWithLabel$1 as RadioButtonWithLabel, RadioGroup, RadioSection$1 as RadioSection, Reel, RefundIcon, RefundIconMedium, RefundIconSmall, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess$1 as ResetPasswordSuccess, RevenueManagementImage, ReversalNeededIcon, RoutingNumberImage, Search$1 as Search, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, ShortageIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, SortableTableHeading$1 as SortableTableHeading, Spinner$2 as Spinner, Stack, StandardCheckoutImage, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, SuccessfulIconMedium, SuccessfulIconSmall, Switcher, TabSidebar$1 as TabSidebar, Table_styled as Table, TableBody_styled as TableBody, TableCell_styled as TableCell, TableHead$1 as TableHead, TableHeading, TableListItem, TableRow$1 as TableRow, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToastNotification, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TrashIconV2$1 as TrashIconV2, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletBannerIcon$1 as WalletBannerIcon, WalletIcon$1 as WalletIcon, WalletIconSmall$1 as WalletIconSmall, WalletName, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, XCircleIconMedium, XCircleIconSmall, cardRegistry, index$4 as constants, createPartialAmountFormState, createPartialAmountFormValidators, index$5 as hooks, index$6 as util, withWindowSize };
51468
+ export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, AgencyIcon, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, ArrowDownCircleIconSmall, ArrowLeftCircleIconMedium, ArrowLeftCircleIconSmall, ArrowRightCircleIconSmall, ArrowRightIcon, ArrowUpCircleIconSmall, AutopayIcon, AutopayOnIcon, Badge$1 as Badge, BankIcon, BankIconLarge, Banner$1 as Banner, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, Card$1 as Card, CaretArrowDown$1 as CaretArrowDown, CaretArrowUp$1 as CaretArrowUp, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackIconMedium, ChargebackIconSmall, ChargebackReversalIcon, ChargebackReversalIconMedium, ChargebackReversalIconSmall, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, CloseIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, Copyable, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisabledAccountsAddIcon, DisabledPaymentMethodsAddIcon, DisabledPropertiesAddIcon, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, EmptyCartIconV2$1 as EmptyCartIconV2, ErroredIcon, ExternalLink, ExternalLinkIcon, FailedIcon, FindIconSmall$1 as FindIconSmall, FooterWithSubfooter$1 as FooterWithSubfooter, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedBankAccount$1 as FormattedBankAccount, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GenericErrorIcon, GoToEmailIcon$1 as GoToEmailIcon, Grid, GuidedCheckoutImage, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, HistoryIconSmall$1 as HistoryIconSmall, IconAdd, IconQuitLarge, ImageBox, Imposter, InternalLink, Jumbo$1 as Jumbo, KebabMenuIcon, KioskImage, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, LinkCard$1 as LinkCard, Loading, LoadingLine, LoginForm, Modal$3 as Modal, Module$1 as Module, Motion, MultiCartIcon, MultipleSelectFilter$1 as MultipleSelectFilter, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NavTabs, NoResultsIcon, NotFoundIcon, Obligation$1 as Obligation, iconsMap as ObligationIcons, OverageIcon, Pagination$1 as Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentStatusIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PencilIcon$1 as PencilIcon, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PersonIcon, PhoneForm, Placeholder$1 as Placeholder, PlusCircleIcon, PointOfSaleImage, Popover$1 as Popover, PopupMenu$1 as PopupMenu, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, ProfileImage, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioButtonWithLabel$1 as RadioButtonWithLabel, RadioGroup, RadioSection$1 as RadioSection, Reel, RefundIcon, RefundIconMedium, RefundIconSmall, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess$1 as ResetPasswordSuccess, RevenueManagementImage, ReversalNeededIcon, RoutingNumberImage, Search$1 as Search, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, ShortageIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, SortableTableHeading$1 as SortableTableHeading, Spinner$2 as Spinner, Stack, StandardCheckoutImage, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, SuccessfulIconMedium, SuccessfulIconSmall, Switcher, TabSidebar$1 as TabSidebar, Table_styled as Table, TableBody_styled as TableBody, TableCell_styled as TableCell, TableHead$1 as TableHead, TableHeading, TableListItem, TableRow$1 as TableRow, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToastNotification, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TrashIconV2$1 as TrashIconV2, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletBannerIcon$1 as WalletBannerIcon, WalletIcon$1 as WalletIcon, WalletIconSmall$1 as WalletIconSmall, WalletName, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, XCircleIconMedium, XCircleIconSmall, cardRegistry, index$4 as constants, createPartialAmountFormState, createPartialAmountFormValidators, index$5 as hooks, index$6 as util, withWindowSize };
51347
51469
  //# sourceMappingURL=index.esm.js.map