@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.cjs.js CHANGED
@@ -18857,6 +18857,52 @@ var AgencyIcon = function AgencyIcon(_ref) {
18857
18857
  })));
18858
18858
  };
18859
18859
 
18860
+ var _excluded$m = ["width", "height", "color"];
18861
+ var PersonIcon = function PersonIcon(_ref) {
18862
+ var _ref$width = _ref.width,
18863
+ width = _ref$width === void 0 ? "20" : _ref$width,
18864
+ _ref$height = _ref.height,
18865
+ height = _ref$height === void 0 ? "21" : _ref$height,
18866
+ _ref$color = _ref.color,
18867
+ color = _ref$color === void 0 ? CHARADE_GREY : _ref$color,
18868
+ props = _objectWithoutProperties(_ref, _excluded$m);
18869
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
18870
+ xmlns: "http://www.w3.org/2000/svg",
18871
+ width: width,
18872
+ height: height,
18873
+ viewBox: "0 0 ".concat(width, " ").concat(height),
18874
+ fill: "none"
18875
+ }, props), /*#__PURE__*/React__default.createElement("path", {
18876
+ fillRule: "evenodd",
18877
+ clipRule: "evenodd",
18878
+ 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",
18879
+ fill: color
18880
+ }));
18881
+ };
18882
+
18883
+ var _excluded$n = ["width", "height", "color"];
18884
+ var PaymentStatusIcon = function PaymentStatusIcon(_ref) {
18885
+ var _ref$width = _ref.width,
18886
+ width = _ref$width === void 0 ? "20" : _ref$width,
18887
+ _ref$height = _ref.height,
18888
+ height = _ref$height === void 0 ? "21" : _ref$height,
18889
+ _ref$color = _ref.color,
18890
+ color = _ref$color === void 0 ? CHARADE_GREY : _ref$color,
18891
+ props = _objectWithoutProperties(_ref, _excluded$n);
18892
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
18893
+ xmlns: "http://www.w3.org/2000/svg",
18894
+ width: width,
18895
+ height: height,
18896
+ viewBox: "0 0 ".concat(width, " ").concat(height),
18897
+ fill: "none"
18898
+ }, props), /*#__PURE__*/React__default.createElement("path", {
18899
+ fillRule: "evenodd",
18900
+ clipRule: "evenodd",
18901
+ 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",
18902
+ fill: color
18903
+ }));
18904
+ };
18905
+
18860
18906
  var color$2 = "#15749D";
18861
18907
  var hoverColor$1 = "#116285";
18862
18908
  var activeColor$1 = "#0E506D";
@@ -19510,7 +19556,7 @@ var mobileFallbackValues = {
19510
19556
  };
19511
19557
  var MOBILE_BREAKPOINT = 768;
19512
19558
 
19513
- var _excluded$m = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
19559
+ var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
19514
19560
 
19515
19561
  /*
19516
19562
  New responsive text component for Title elements
@@ -19557,7 +19603,7 @@ var Title = function Title(_ref) {
19557
19603
  as = _ref$as === void 0 ? "h1" : _ref$as,
19558
19604
  dataQa = _ref.dataQa,
19559
19605
  children = _ref.children,
19560
- rest = _objectWithoutProperties(_ref, _excluded$m);
19606
+ rest = _objectWithoutProperties(_ref, _excluded$o);
19561
19607
  return /*#__PURE__*/React__default.createElement(TitleText, _extends({
19562
19608
  variant: variant,
19563
19609
  as: as,
@@ -20985,12 +21031,12 @@ var fallbackValues$8 = {
20985
21031
  linkColor: linkColor
20986
21032
  };
20987
21033
 
20988
- var _excluded$n = ["variant", "themeValues", "children"];
21034
+ var _excluded$p = ["variant", "themeValues", "children"];
20989
21035
  var BoxWithShadow = function BoxWithShadow(_ref) {
20990
21036
  var variant = _ref.variant,
20991
21037
  themeValues = _ref.themeValues,
20992
21038
  children = _ref.children,
20993
- props = _objectWithoutProperties(_ref, _excluded$n);
21039
+ props = _objectWithoutProperties(_ref, _excluded$p);
20994
21040
  var shadowRegistry = {
20995
21041
  baseStandard: "0px 3px 7px 2px ".concat(rgba$1(BLACK, 0.1), ", 0px 1px 2px 1px ").concat(rgba$1(BLACK, 0.1), ";"),
20996
21042
  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), ";"),
@@ -21050,7 +21096,7 @@ var fallbackValues$a = {
21050
21096
  externalLinkColor: externalLinkColor
21051
21097
  };
21052
21098
 
21053
- var _excluded$o = ["hoverColor", "activeColor", "extrastyles"];
21099
+ var _excluded$q = ["hoverColor", "activeColor", "extrastyles"];
21054
21100
  var ROYAL_BLUE$1 = ROYAL_BLUE;
21055
21101
  var LINK_TEXT_DECORATION$3 = LINK_TEXT_DECORATION;
21056
21102
 
@@ -21064,7 +21110,7 @@ var StyledExternalLink = styled__default( /*#__PURE__*/React.forwardRef(function
21064
21110
  var hoverColor = _ref.hoverColor,
21065
21111
  activeColor = _ref.activeColor,
21066
21112
  extrastyles = _ref.extrastyles,
21067
- props = _objectWithoutProperties(_ref, _excluded$o);
21113
+ props = _objectWithoutProperties(_ref, _excluded$q);
21068
21114
  return /*#__PURE__*/React__default.createElement("a", _extends({}, props, {
21069
21115
  ref: ref
21070
21116
  }));
@@ -21139,7 +21185,7 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
21139
21185
  }, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
21140
21186
  });
21141
21187
 
21142
- var _excluded$p = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
21188
+ var _excluded$r = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
21143
21189
  var ROYAL_BLUE$2 = ROYAL_BLUE;
21144
21190
  var LINK_TEXT_DECORATION$4 = LINK_TEXT_DECORATION;
21145
21191
 
@@ -21155,7 +21201,7 @@ var StyledInternalLink = styled__default( /*#__PURE__*/React.forwardRef(function
21155
21201
  active = _ref.active,
21156
21202
  color = _ref.color,
21157
21203
  extrastyles = _ref.extrastyles,
21158
- props = _objectWithoutProperties(_ref, _excluded$p);
21204
+ props = _objectWithoutProperties(_ref, _excluded$r);
21159
21205
  return /*#__PURE__*/React__default.createElement(reactRouterDom.Link, _extends({}, props, {
21160
21206
  ref: ref
21161
21207
  }));
@@ -22838,7 +22884,7 @@ _curry2(function test(pattern, str) {
22838
22884
  return _cloneRegExp(pattern).test(str);
22839
22885
  });
22840
22886
 
22841
- var _excluded$q = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
22887
+ var _excluded$s = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
22842
22888
  var ButtonWithLink = function ButtonWithLink(_ref) {
22843
22889
  var _ref$url = _ref.url,
22844
22890
  url = _ref$url === void 0 ? "/" : _ref$url,
@@ -22853,7 +22899,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
22853
22899
  _ref$newTab = _ref.newTab,
22854
22900
  newTab = _ref$newTab === void 0 ? false : _ref$newTab,
22855
22901
  dataQa = _ref.dataQa,
22856
- otherProps = _objectWithoutProperties(_ref, _excluded$q);
22902
+ otherProps = _objectWithoutProperties(_ref, _excluded$s);
22857
22903
  var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
22858
22904
  var children = _ref2.children,
22859
22905
  url = _ref2.url,
@@ -22941,7 +22987,7 @@ var ParagraphText = styled__default.p.withConfig({
22941
22987
  return extraStyles;
22942
22988
  });
22943
22989
 
22944
- var _excluded$r = ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"];
22990
+ var _excluded$t = ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"];
22945
22991
  var Paragraph = function Paragraph(_ref) {
22946
22992
  var themeValues = _ref.themeValues,
22947
22993
  _ref$weight = _ref.weight,
@@ -22955,7 +23001,7 @@ var Paragraph = function Paragraph(_ref) {
22955
23001
  dataQa = _ref.dataQa,
22956
23002
  children = _ref.children,
22957
23003
  as = _ref.as,
22958
- rest = _objectWithoutProperties(_ref, _excluded$r);
23004
+ rest = _objectWithoutProperties(_ref, _excluded$t);
22959
23005
  return /*#__PURE__*/React__default.createElement(ParagraphText, _extends({
22960
23006
  weight: weight,
22961
23007
  color: color,
@@ -23159,7 +23205,7 @@ var errorStyles = {
23159
23205
  "default": "border: 1px solid ".concat(RED, ";")
23160
23206
  };
23161
23207
  var focusedStyles = {
23162
- "default": "box-shadow: 0 0 5px 0 ".concat(MATISSE_BLUE, ";")
23208
+ "default": "\n outline: 3px solid ".concat(ROYAL_BLUE, "; \n outline-offset: 3px;\n ")
23163
23209
  };
23164
23210
  var disabledCheckedStyles = {
23165
23211
  "default": "\n background: #6d717e;\n border: 1px solid #6d717e;\n"
@@ -23197,7 +23243,7 @@ var ENTER = 13;
23197
23243
  var ESCAPE = 27;
23198
23244
  var SPACEBAR = 32;
23199
23245
 
23200
- var _excluded$s = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles"];
23246
+ var _excluded$u = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles", "hasIconOverride", "icon"];
23201
23247
  var CheckboxContainer = styled__default.span.withConfig({
23202
23248
  displayName: "Checkbox__CheckboxContainer",
23203
23249
  componentId: "sc-36kqbv-0"
@@ -23205,7 +23251,7 @@ var CheckboxContainer = styled__default.span.withConfig({
23205
23251
  var CheckboxLabelContainer = styled__default.label.withConfig({
23206
23252
  displayName: "Checkbox__CheckboxLabelContainer",
23207
23253
  componentId: "sc-36kqbv-1"
23208
- })(["display:flex;align-items:center;column-gap:1rem;"]);
23254
+ })(["display:flex;align-items:center;column-gap:1rem;cursor:pointer;"]);
23209
23255
  var CheckboxIcon = styled__default.svg.withConfig({
23210
23256
  displayName: "Checkbox__CheckboxIcon",
23211
23257
  componentId: "sc-36kqbv-2"
@@ -23264,7 +23310,10 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
23264
23310
  _ref5$dataQa = _ref5.dataQa,
23265
23311
  dataQa = _ref5$dataQa === void 0 ? null : _ref5$dataQa,
23266
23312
  checkboxExtraStyles = _ref5.checkboxExtraStyles,
23267
- rest = _objectWithoutProperties(_ref5, _excluded$s);
23313
+ _ref5$hasIconOverride = _ref5.hasIconOverride,
23314
+ hasIconOverride = _ref5$hasIconOverride === void 0 ? false : _ref5$hasIconOverride,
23315
+ Icon = _ref5.icon,
23316
+ rest = _objectWithoutProperties(_ref5, _excluded$u);
23268
23317
  var _useState = React.useState(false),
23269
23318
  _useState2 = _slicedToArray(_useState, 2),
23270
23319
  focused = _useState2[0],
@@ -23292,7 +23341,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
23292
23341
  },
23293
23342
  hiddenStyles: hidden,
23294
23343
  background: themeValues.backgroundColor,
23295
- extraStyles: "outline: none; ".concat(extraStyles, "; margin: ").concat(checkboxMargin, ";")
23344
+ extraStyles: "\n :focus {\n outline: 0;\n }\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
23296
23345
  }, rest), /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
23297
23346
  "data-qa": dataQa
23298
23347
  }, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
@@ -23322,7 +23371,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
23322
23371
  disabledCheckedStyles: themeValues.disabledCheckedStyles,
23323
23372
  focusedStyles: themeValues.focusedStyles,
23324
23373
  checkboxExtraStyles: checkboxExtraStyles
23325
- }, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
23374
+ }, hasIconOverride ? /*#__PURE__*/React__default.createElement(Icon, null) : /*#__PURE__*/React__default.createElement(CheckboxIcon, {
23326
23375
  viewBox: "0 0 24 24",
23327
23376
  disabled: disabled,
23328
23377
  disabledCheckColor: themeValues.disabledCheckColor,
@@ -23620,7 +23669,7 @@ var TableRowWrapper = styled__default.tr.withConfig({
23620
23669
  return extraStyles;
23621
23670
  });
23622
23671
 
23623
- var _excluded$t = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
23672
+ var _excluded$v = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
23624
23673
  var TableRow = function TableRow(_ref) {
23625
23674
  var children = _ref.children,
23626
23675
  extraStyles = _ref.extraStyles,
@@ -23629,7 +23678,7 @@ var TableRow = function TableRow(_ref) {
23629
23678
  hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
23630
23679
  onClick = _ref.onClick,
23631
23680
  themeValues = _ref.themeValues,
23632
- props = _objectWithoutProperties(_ref, _excluded$t);
23681
+ props = _objectWithoutProperties(_ref, _excluded$v);
23633
23682
  return /*#__PURE__*/React__default.createElement(TableRowWrapper, _extends({
23634
23683
  onClick: onClick,
23635
23684
  hoverEffect: hoverEffect,
@@ -26463,7 +26512,7 @@ var mobileFallbackValues$1 = {
26463
26512
  };
26464
26513
  var MOBILE_BREAKPOINT$1 = 768;
26465
26514
 
26466
- var _excluded$u = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26515
+ var _excluded$w = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26467
26516
 
26468
26517
  /*
26469
26518
  New responsive text component for Detail elements
@@ -26513,7 +26562,7 @@ var Detail = function Detail(_ref) {
26513
26562
  as = _ref$as === void 0 ? "p" : _ref$as,
26514
26563
  dataQa = _ref.dataQa,
26515
26564
  children = _ref.children,
26516
- rest = _objectWithoutProperties(_ref, _excluded$u);
26565
+ rest = _objectWithoutProperties(_ref, _excluded$w);
26517
26566
  return /*#__PURE__*/React__default.createElement(DetailText, _extends({
26518
26567
  variant: variant,
26519
26568
  as: as,
@@ -27107,83 +27156,79 @@ var createFormat = function createFormat(formats, formatChar) {
27107
27156
  var FormattedInput = function FormattedInput(_ref) {
27108
27157
  var value = _ref.value,
27109
27158
  formatter = _ref.formatter,
27110
- onChange = _ref.onChange,
27159
+ _onChange = _ref.onChange,
27111
27160
  props = _objectWithoutProperties$1(_ref, ["value", "formatter", "onChange"]);
27112
27161
 
27113
- var _useState = React.useState(format$1(formatter)(value)),
27114
- _useState2 = _slicedToArray$1(_useState, 2),
27115
- formattedValue = _useState2[0],
27116
- setFormattedValue = _useState2[1];
27117
-
27118
27162
  var inputEl = React.useRef(null);
27119
- var stateRefs = React.useRef({
27163
+
27164
+ var _useState = React.useState({
27120
27165
  selectionStart: 0,
27121
27166
  selectionEnd: 0,
27122
- isDelete: false,
27123
- rawValue: ''
27124
- });
27167
+ rawValue: value,
27168
+ "delete": false,
27169
+ formattedValue: format$1(formatter)(value)
27170
+ }),
27171
+ _useState2 = _slicedToArray$1(_useState, 2),
27172
+ state = _useState2[0],
27173
+ setState = _useState2[1];
27174
+
27125
27175
  React.useLayoutEffect(function () {
27126
27176
  // A lot of the work here is cursor manipulation
27127
27177
  if (inputEl.current && inputEl.current === document.activeElement) {
27128
- inputEl.current.setSelectionRange(stateRefs.current.selectionStart, stateRefs.current.selectionEnd);
27129
- }
27130
- }, [stateRefs]);
27131
-
27132
- var handleChange = function handleChange(event) {
27133
- var deleteKeyPressed = stateRefs.current.isDelete;
27134
- var maxFormatExceeded = stateRefs.current.rawValue.length >= formatter.formats.length - 1;
27135
-
27136
- if (maxFormatExceeded && !deleteKeyPressed) {
27137
- return;
27138
- }
27139
- /* At the beginning of onChange, event.target.value is a concat of the previous formatted value
27140
- * and an unformatted injection at the start, end, or in the middle (maybe a deletion). To prepare
27141
- * the unformatted value for the user's onChange, the formatted string and unformatted injection need
27142
- * to be separated, then unformat the formatted string, then insert (or delete) the injection from the
27143
- * old unformatted value.
27144
- */
27145
-
27146
-
27147
- var injectionLength = event.target.value.length - formattedValue.length;
27148
- var end = stateRefs.current.selectionStart === stateRefs.current.selectionEnd ? stateRefs.current.selectionStart + injectionLength : stateRefs.current.selectionEnd - 1;
27149
- var injection = event.target.value.substring(stateRefs.current.selectionStart, end); // Injection is the new unformatted piece of the input
27150
- // Need to find where to put it
27151
-
27152
- var rawInjectionPointStart = formattedToUnformattedIndex(stateRefs.current.selectionStart, stateRefs.current.rawValue, formatter);
27153
- var rawInjectionPointEnd = formattedToUnformattedIndex(stateRefs.current.selectionEnd, stateRefs.current.rawValue, formatter); // Unformat the previous formatted value for injection
27154
- // Using the relevant format string, strips away chars not marked with the formatChar
27155
-
27156
- var unformattedOldValue = unformat(formatter)(formattedValue, stateRefs.current.rawValue.length); // Edit the previous unformatted value (either add, update or delete)
27157
-
27158
- var injectIntoOldValue = inject(unformattedOldValue);
27159
- var unformattedNewValue = deleteKeyPressed ? rawInjectionPointStart === rawInjectionPointEnd ? injectIntoOldValue(rawInjectionPointStart - 1, rawInjectionPointStart, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, injection);
27160
- var lengthDifference = unformattedNewValue.length - stateRefs.current.rawValue.length;
27161
- var rawIndex = formattedToUnformattedIndex(stateRefs.current.selectionStart, stateRefs.current.rawValue, formatter) + lengthDifference; // Find the new cursor position for the potential formatted value
27162
- // Applied by useLayoutEffect
27163
-
27164
- var newFormattedCursorPosition = stateRefs.current.selectionStart === stateRefs.current.selectionEnd ? unformattedToFormattedIndex(rawIndex, unformattedNewValue, formatter, deleteKeyPressed) : deleteKeyPressed ? stateRefs.current.selectionStart : stateRefs.current.selectionEnd;
27165
- var formattedNewValue = format$1(formatter)(unformattedNewValue);
27166
- setFormattedValue(formattedNewValue); // Apply the external onChange function to the raw underlying string
27167
- // This is where the user generally updates the input value
27168
-
27169
- if (onChange) {
27170
- onChange(unformattedNewValue);
27178
+ inputEl.current.setSelectionRange(state.selectionStart, state.selectionEnd);
27171
27179
  }
27172
- };
27173
-
27180
+ });
27174
27181
  return React__default.createElement("input", _extends$2({}, props, {
27175
27182
  ref: inputEl,
27176
27183
  value: format$1(formatter)(value),
27177
27184
  onKeyDown: function onKeyDown(event) {
27178
- // Keep track of the state of the input before onChange
27179
- stateRefs.current = {
27180
- isDelete: event.key === "Backspace" || event.key === "Delete",
27185
+ // Keep track of the state of the input before onChange, including if user is hitting delete
27186
+ setState({
27187
+ rawValue: value,
27181
27188
  selectionStart: event.target.selectionStart,
27182
27189
  selectionEnd: event.target.selectionEnd,
27183
- rawValue: value
27184
- };
27190
+ "delete": event.key === "Backspace" || event.key === "Delete",
27191
+ formattedValue: event.target.value
27192
+ });
27185
27193
  },
27186
- onChange: handleChange
27194
+ onChange: function onChange(event) {
27195
+ /* At the beginning of onChange, event.target.value is a concat of the previous formatted value
27196
+ * and an unformatted injection at the start, end, or in the middle (maybe a deletion). To prepare
27197
+ * the unformatted value for the user's onChange, the formatted string and unformatted injection need
27198
+ * to be separated, then unformat the formatted string, then insert (or delete) the injection from the
27199
+ * old unformatted value.
27200
+ */
27201
+ var injectionLength = event.target.value.length - state.formattedValue.length;
27202
+ var end = state.selectionStart === state.selectionEnd ? state.selectionStart + injectionLength : state.selectionEnd - 1;
27203
+ var injection = event.target.value.substring(state.selectionStart, end); // Injection is the new unformatted piece of the input
27204
+ // Need to find where to put it
27205
+
27206
+ var rawInjectionPointStart = formattedToUnformattedIndex(state.selectionStart, state.rawValue, formatter);
27207
+ var rawInjectionPointEnd = formattedToUnformattedIndex(state.selectionEnd, state.rawValue, formatter); // Unformat the previous formatted value for injection
27208
+ // Using the relevant format string, strips away chars not marked with the formatChar
27209
+
27210
+ var unformattedOldValue = unformat(formatter)(state.formattedValue, state.rawValue.length); // Edit the previous unformatted value (either add, update or delete)
27211
+
27212
+ var injectIntoOldValue = inject(unformattedOldValue);
27213
+ var unformattedNewValue = state["delete"] ? rawInjectionPointStart === rawInjectionPointEnd ? injectIntoOldValue(rawInjectionPointStart - 1, rawInjectionPointStart, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, "") : injectIntoOldValue(rawInjectionPointStart, rawInjectionPointEnd, injection);
27214
+ var lengthDifference = unformattedNewValue.length - state.rawValue.length;
27215
+ var rawIndex = formattedToUnformattedIndex(state.selectionStart, state.rawValue, formatter) + lengthDifference; // Find the new cursor position for the potential formatted value
27216
+ // Applied by useLayoutEffect
27217
+
27218
+ var newFormattedCursorPosition = state.selectionStart == state.selectionEnd ? unformattedToFormattedIndex(rawIndex, unformattedNewValue, formatter, state["delete"]) : state["delete"] ? state.selectionStart : state.selectionEnd;
27219
+ setState({
27220
+ selectionStart: newFormattedCursorPosition,
27221
+ selectionEnd: newFormattedCursorPosition,
27222
+ rawValue: state.rawValue,
27223
+ "delete": false,
27224
+ formattedValue: state.formattedValue
27225
+ }); // Apply the external onChange function to the raw underlying string
27226
+ // This is where the user generally updates the input value
27227
+
27228
+ if (_onChange) {
27229
+ _onChange(unformattedNewValue);
27230
+ }
27231
+ }
27187
27232
  }));
27188
27233
  };
27189
27234
 
@@ -27251,7 +27296,7 @@ var fallbackValues$n = {
27251
27296
  formFooterPanel: formFooterPanel
27252
27297
  };
27253
27298
 
27254
- var _excluded$v = ["showErrors", "themeValues"],
27299
+ var _excluded$x = ["showErrors", "themeValues"],
27255
27300
  _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
27256
27301
  var InputField = styled__default.input.withConfig({
27257
27302
  displayName: "FormInput__InputField",
@@ -27286,7 +27331,7 @@ var InputField = styled__default.input.withConfig({
27286
27331
  var FormattedInputField = styled__default(function (_ref8) {
27287
27332
  var showErrors = _ref8.showErrors,
27288
27333
  themeValues = _ref8.themeValues,
27289
- props = _objectWithoutProperties(_ref8, _excluded$v);
27334
+ props = _objectWithoutProperties(_ref8, _excluded$x);
27290
27335
  return /*#__PURE__*/React__default.createElement(FormattedInput, props);
27291
27336
  }).withConfig({
27292
27337
  displayName: "FormInput__FormattedInputField",
@@ -27491,7 +27536,7 @@ var FormInput = function FormInput(_ref15) {
27491
27536
  };
27492
27537
  var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$n, "default");
27493
27538
 
27494
- var _excluded$w = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
27539
+ var _excluded$y = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
27495
27540
  var FormInputRow = function FormInputRow(_ref) {
27496
27541
  var _ref$breakpoint = _ref.breakpoint,
27497
27542
  breakpoint = _ref$breakpoint === void 0 ? "30rem" : _ref$breakpoint,
@@ -27500,7 +27545,7 @@ var FormInputRow = function FormInputRow(_ref) {
27500
27545
  largeChild = _ref.largeChild,
27501
27546
  largeChildSize = _ref.largeChildSize,
27502
27547
  children = _ref.children,
27503
- rest = _objectWithoutProperties(_ref, _excluded$w);
27548
+ rest = _objectWithoutProperties(_ref, _excluded$y);
27504
27549
  return /*#__PURE__*/React__default.createElement(Box, _extends({
27505
27550
  padding: "0"
27506
27551
  }, rest), /*#__PURE__*/React__default.createElement(Switcher, {
@@ -27511,24 +27556,24 @@ var FormInputRow = function FormInputRow(_ref) {
27511
27556
  }, children));
27512
27557
  };
27513
27558
 
27514
- var _excluded$x = ["childGap", "bottomItem", "children"];
27559
+ var _excluded$z = ["childGap", "bottomItem", "children"];
27515
27560
  var FormInputColumn = function FormInputColumn(_ref) {
27516
27561
  var _ref$childGap = _ref.childGap,
27517
27562
  childGap = _ref$childGap === void 0 ? "0.5rem" : _ref$childGap,
27518
27563
  bottomItem = _ref.bottomItem,
27519
27564
  children = _ref.children,
27520
- rest = _objectWithoutProperties(_ref, _excluded$x);
27565
+ rest = _objectWithoutProperties(_ref, _excluded$z);
27521
27566
  return /*#__PURE__*/React__default.createElement(Stack, _extends({
27522
27567
  childGap: childGap,
27523
27568
  bottomItem: bottomItem
27524
27569
  }, rest), children);
27525
27570
  };
27526
27571
 
27527
- var _excluded$y = ["themeValues", "children"];
27572
+ var _excluded$A = ["themeValues", "children"];
27528
27573
  var FormContainer = function FormContainer(_ref) {
27529
27574
  var themeValues = _ref.themeValues,
27530
27575
  children = _ref.children,
27531
- rest = _objectWithoutProperties(_ref, _excluded$y);
27576
+ rest = _objectWithoutProperties(_ref, _excluded$A);
27532
27577
  var _useContext = React.useContext(styled.ThemeContext),
27533
27578
  isMobile = _useContext.isMobile;
27534
27579
  return /*#__PURE__*/React__default.createElement(Box, _extends({
@@ -27838,7 +27883,7 @@ var fallbackValues$r = {
27838
27883
  fontSize: fontSize$8
27839
27884
  };
27840
27885
 
27841
- var _excluded$z = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
27886
+ var _excluded$B = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
27842
27887
  var Heading = function Heading(_ref) {
27843
27888
  var themeValues = _ref.themeValues,
27844
27889
  _ref$weight = _ref.weight,
@@ -27857,7 +27902,7 @@ var Heading = function Heading(_ref) {
27857
27902
  as = _ref$as === void 0 ? variant : _ref$as,
27858
27903
  dataQa = _ref.dataQa,
27859
27904
  children = _ref.children,
27860
- rest = _objectWithoutProperties(_ref, _excluded$z);
27905
+ rest = _objectWithoutProperties(_ref, _excluded$B);
27861
27906
  return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
27862
27907
  variant: variant,
27863
27908
  as: as,
@@ -28058,11 +28103,11 @@ var LabeledAmountV2 = function LabeledAmountV2(_ref) {
28058
28103
  }, /*#__PURE__*/React__default.createElement("span", null, label), /*#__PURE__*/React__default.createElement("span", null, amount));
28059
28104
  };
28060
28105
 
28061
- var _excluded$A = ["version"];
28106
+ var _excluded$C = ["version"];
28062
28107
  var LabeledAmount = function LabeledAmount(_ref) {
28063
28108
  var _ref$version = _ref.version,
28064
28109
  version = _ref$version === void 0 ? "v1" : _ref$version,
28065
- rest = _objectWithoutProperties(_ref, _excluded$A);
28110
+ rest = _objectWithoutProperties(_ref, _excluded$C);
28066
28111
  var LabeledAmountComponent = version === "v1" ? LabeledAmountV1 : LabeledAmountV2;
28067
28112
  return /*#__PURE__*/React__default.createElement(LabeledAmountComponent, rest);
28068
28113
  };
@@ -28207,7 +28252,7 @@ var Loading = function Loading() {
28207
28252
  })))));
28208
28253
  };
28209
28254
 
28210
- var _excluded$B = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
28255
+ var _excluded$D = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
28211
28256
  var NavFooter = function NavFooter(_ref) {
28212
28257
  var leftContent = _ref.leftContent,
28213
28258
  rightContent = _ref.rightContent,
@@ -28222,7 +28267,7 @@ var NavFooter = function NavFooter(_ref) {
28222
28267
  footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
28223
28268
  isMobile = _ref.isMobile,
28224
28269
  footerWidth = _ref.footerWidth,
28225
- rest = _objectWithoutProperties(_ref, _excluded$B);
28270
+ rest = _objectWithoutProperties(_ref, _excluded$D);
28226
28271
  return /*#__PURE__*/React__default.createElement(Box, _extends({
28227
28272
  padding: footerPadding,
28228
28273
  background: backgroundColor,
@@ -28253,7 +28298,7 @@ var NavFooter = function NavFooter(_ref) {
28253
28298
  }, rightContent)))))));
28254
28299
  };
28255
28300
 
28256
- var _excluded$C = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
28301
+ var _excluded$E = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
28257
28302
  var NavHeader = function NavHeader(_ref) {
28258
28303
  var leftContent = _ref.leftContent,
28259
28304
  rightContent = _ref.rightContent,
@@ -28262,7 +28307,7 @@ var NavHeader = function NavHeader(_ref) {
28262
28307
  isMobile = _ref.isMobile,
28263
28308
  backgroundColor = _ref.backgroundColor,
28264
28309
  headerWidth = _ref.headerWidth,
28265
- rest = _objectWithoutProperties(_ref, _excluded$C);
28310
+ rest = _objectWithoutProperties(_ref, _excluded$E);
28266
28311
  return /*#__PURE__*/React__default.createElement(Box, _extends({
28267
28312
  padding: "0 16px 4px",
28268
28313
  background: backgroundColor,
@@ -46682,11 +46727,11 @@ var Modal$2 = function Modal(_ref) {
46682
46727
  };
46683
46728
  var ModalControlV2 = withWindowSize(Modal$2);
46684
46729
 
46685
- var _excluded$D = ["version"];
46730
+ var _excluded$F = ["version"];
46686
46731
  var Modal$3 = function Modal(_ref) {
46687
46732
  var _ref$version = _ref.version,
46688
46733
  version = _ref$version === void 0 ? "v1" : _ref$version,
46689
- rest = _objectWithoutProperties(_ref, _excluded$D);
46734
+ rest = _objectWithoutProperties(_ref, _excluded$F);
46690
46735
  var ModalControl = version === "v1" ? Modal$1 : ModalControlV2;
46691
46736
  return /*#__PURE__*/React__default.createElement(ModalControl, rest);
46692
46737
  };
@@ -47988,7 +48033,7 @@ var fallbackValues$P = {
47988
48033
  labeledAmountTotal: labeledAmountTotal
47989
48034
  };
47990
48035
 
47991
- var _excluded$E = ["amount"],
48036
+ var _excluded$G = ["amount"],
47992
48037
  _excluded2$1 = ["amount"];
47993
48038
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
47994
48039
  var lineItemElems = _ref.lineItemElems,
@@ -48231,7 +48276,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
48231
48276
  return fee.amount > 0;
48232
48277
  }).map(function (_ref5) {
48233
48278
  var amount = _ref5.amount,
48234
- rest = _objectWithoutProperties(_ref5, _excluded$E);
48279
+ rest = _objectWithoutProperties(_ref5, _excluded$G);
48235
48280
  return _objectSpread2(_objectSpread2({}, rest), {}, {
48236
48281
  amount: displayCurrency(amount)
48237
48282
  });
@@ -48668,11 +48713,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
48668
48713
  }, errorMessage))))));
48669
48714
  };
48670
48715
 
48671
- var _excluded$F = ["version"];
48716
+ var _excluded$H = ["version"];
48672
48717
  var TermsAndConditions = function TermsAndConditions(_ref) {
48673
48718
  var _ref$version = _ref.version,
48674
48719
  version = _ref$version === void 0 ? "v1" : _ref$version,
48675
- rest = _objectWithoutProperties(_ref, _excluded$F);
48720
+ rest = _objectWithoutProperties(_ref, _excluded$H);
48676
48721
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
48677
48722
  return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
48678
48723
  };
@@ -49480,7 +49525,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
49480
49525
  }, section.content))));
49481
49526
  };
49482
49527
 
49483
- var _excluded$G = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections", "borderOverride"];
49528
+ var _excluded$I = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections", "borderOverride"];
49484
49529
 
49485
49530
  /**
49486
49531
  - The RadioSection component takes either a flat array (via the 'sections'
@@ -49529,7 +49574,7 @@ var RadioSection = function RadioSection(_ref) {
49529
49574
  isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
49530
49575
  groupedSections = _ref.groupedSections,
49531
49576
  borderOverride = _ref.borderOverride,
49532
- rest = _objectWithoutProperties(_ref, _excluded$G);
49577
+ rest = _objectWithoutProperties(_ref, _excluded$I);
49533
49578
  var _useState = React.useState(null),
49534
49579
  _useState2 = _slicedToArray(_useState, 2),
49535
49580
  focused = _useState2[0],
@@ -50076,7 +50121,7 @@ var Timeout = function Timeout(_ref) {
50076
50121
  };
50077
50122
  var Timeout$1 = withWindowSize(Timeout);
50078
50123
 
50079
- var _excluded$H = ["variant", "message", "toastOpen", "closeToastNotification", "extraStyles", "minWidth", "maxWidth", "height", "childGap", "backgroundColor", "role", "ariaLive", "screenReaderMessage", "showScreenReaderMessage"];
50124
+ var _excluded$J = ["variant", "message", "toastOpen", "closeToastNotification", "extraStyles", "minWidth", "maxWidth", "height", "childGap", "backgroundColor", "role", "ariaLive", "screenReaderMessage", "showScreenReaderMessage"];
50080
50125
  var VARIANTS = {
50081
50126
  SUCCESS: "success",
50082
50127
  ERROR: "error"
@@ -50105,7 +50150,7 @@ var ToastNotification = function ToastNotification(_ref) {
50105
50150
  screenReaderMessage = _ref.screenReaderMessage,
50106
50151
  _ref$showScreenReader = _ref.showScreenReaderMessage,
50107
50152
  showScreenReaderMessage = _ref$showScreenReader === void 0 ? true : _ref$showScreenReader,
50108
- rest = _objectWithoutProperties(_ref, _excluded$H);
50153
+ rest = _objectWithoutProperties(_ref, _excluded$J);
50109
50154
  var screenReaderMessageRef = React.useRef();
50110
50155
  var LIVEREGION_TRANSITION_DELAY = 1000;
50111
50156
  React.useEffect(function () {
@@ -50288,7 +50333,7 @@ var PopupMenuItemContainer = styled__default(ButtonWithAction).withConfig({
50288
50333
  return "\n background-color: ".concat(isDeleteAction ? theme.menuItemHoverBackgroundColorDelete : theme.menuItemHoverBackgroundColor, ";\n ");
50289
50334
  });
50290
50335
 
50291
- var _excluded$I = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
50336
+ var _excluded$K = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
50292
50337
  var PopupMenuItem = function PopupMenuItem(_ref) {
50293
50338
  var id = _ref.id,
50294
50339
  closeMenuCallback = _ref.closeMenuCallback,
@@ -50304,7 +50349,7 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
50304
50349
  hoverStyles = _ref.hoverStyles,
50305
50350
  activeStyles = _ref.activeStyles,
50306
50351
  extraStyles = _ref.extraStyles,
50307
- rest = _objectWithoutProperties(_ref, _excluded$I);
50352
+ rest = _objectWithoutProperties(_ref, _excluded$K);
50308
50353
  return /*#__PURE__*/React__default.createElement(PopupMenuItemContainer, _extends({
50309
50354
  id: id,
50310
50355
  role: "menuItem",
@@ -50477,20 +50522,21 @@ var PopupMenu = function PopupMenu(_ref) {
50477
50522
  };
50478
50523
  var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$Z);
50479
50524
 
50480
- var primaryColor$1 = INFO_BLUE;
50525
+ var primaryColor$1 = WHITE;
50526
+ var primaryHoverColor = INFO_BLUE;
50481
50527
  var secondaryColor = MATISSE_BLUE;
50528
+ var secondaryHoverColor = "#115D7E";
50482
50529
  var fallbackValues$_ = {
50483
50530
  primaryColor: primaryColor$1,
50484
- secondaryColor: secondaryColor
50531
+ primaryHoverColor: primaryHoverColor,
50532
+ secondaryColor: secondaryColor,
50533
+ secondaryHoverColor: secondaryHoverColor
50485
50534
  };
50486
50535
 
50487
50536
  var StyledFilterContainer = styled__default(Box).withConfig({
50488
50537
  displayName: "MultipleSelectFilterstyled__StyledFilterContainer",
50489
50538
  componentId: "sc-126xgc2-0"
50490
- })(["position:relative;box-sizing:border-box;padding:0;", ""], function (_ref) {
50491
- var extraStyles = _ref.extraStyles;
50492
- return extraStyles;
50493
- });
50539
+ })(["position:relative;overflow:visible;box-sizing:border-box;padding:0;"]);
50494
50540
  var FilterContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
50495
50541
  return /*#__PURE__*/React__default.createElement(StyledFilterContainer, _extends({
50496
50542
  ref: ref
@@ -50499,7 +50545,7 @@ var FilterContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
50499
50545
  var StyledFilterDropdown = styled__default(Box).withConfig({
50500
50546
  displayName: "MultipleSelectFilterstyled__StyledFilterDropdown",
50501
50547
  componentId: "sc-126xgc2-1"
50502
- })(["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;"]);
50548
+ })(["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;"]);
50503
50549
  var FilterDropdownContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
50504
50550
  return /*#__PURE__*/React__default.createElement(StyledFilterDropdown, _extends({
50505
50551
  ref: ref
@@ -50508,12 +50554,16 @@ var FilterDropdownContainer = /*#__PURE__*/React.forwardRef(function (props, ref
50508
50554
  var FilterButton = styled__default(ButtonWithAction).withConfig({
50509
50555
  displayName: "MultipleSelectFilterstyled__FilterButton",
50510
50556
  componentId: "sc-126xgc2-2"
50511
- })(["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) {
50512
- var textColor = _ref2.textColor;
50513
- return "\n color: ".concat(textColor, ";\n ");
50514
- }, function (_ref3) {
50515
- var backgroundColor = _ref3.backgroundColor;
50516
- return "\n background-color: ".concat(backgroundColor, ";\n :hover,\n :active,\n :focus {\n background-color: ").concat(backgroundColor, ";\n }\n ");
50557
+ })(["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) {
50558
+ var opened = _ref.opened,
50559
+ textColor = _ref.textColor,
50560
+ textHoverColor = _ref.textHoverColor;
50561
+ 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 ");
50562
+ }, function (_ref2) {
50563
+ var opened = _ref2.opened,
50564
+ backgroundColor = _ref2.backgroundColor,
50565
+ backgroundHoverColor = _ref2.backgroundHoverColor;
50566
+ return "\n background-color: ".concat(opened ? backgroundHoverColor : backgroundColor, "; \n :hover,\n :active,\n :focus {\n background-color: ").concat(backgroundHoverColor, ";\n }\n ");
50517
50567
  });
50518
50568
  var StyledFilterButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
50519
50569
  return /*#__PURE__*/React__default.createElement(FilterButton, _extends({
@@ -50524,7 +50574,8 @@ var StyledFilterButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
50524
50574
  var ActionLinkButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50525
50575
  var action = _ref.action,
50526
50576
  text = _ref.text,
50527
- dataQa = _ref.dataQa;
50577
+ dataQa = _ref.dataQa,
50578
+ ariaLabel = _ref.ariaLabel;
50528
50579
  return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
50529
50580
  ref: ref,
50530
50581
  action: action,
@@ -50532,11 +50583,12 @@ var ActionLinkButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50532
50583
  extraStyles: "\n padding: 0.2rem; \n margin: 0.5rem; \n min-height: auto; \n min-width: auto;\n ",
50533
50584
  textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, ";"),
50534
50585
  text: text,
50535
- dataQa: dataQa
50586
+ dataQa: dataQa,
50587
+ "aria-label": ariaLabel
50536
50588
  });
50537
50589
  });
50538
50590
 
50539
- var _excluded$J = ["width", "height", "color"];
50591
+ var _excluded$L = ["width", "height", "color"];
50540
50592
  var DropdownIconV2 = function DropdownIconV2(_ref) {
50541
50593
  var _ref$width = _ref.width,
50542
50594
  width = _ref$width === void 0 ? "18" : _ref$width,
@@ -50544,7 +50596,7 @@ var DropdownIconV2 = function DropdownIconV2(_ref) {
50544
50596
  height = _ref$height === void 0 ? "19" : _ref$height,
50545
50597
  _ref$color = _ref.color,
50546
50598
  color = _ref$color === void 0 ? "#292A33" : _ref$color,
50547
- props = _objectWithoutProperties(_ref, _excluded$J);
50599
+ props = _objectWithoutProperties(_ref, _excluded$L);
50548
50600
  return /*#__PURE__*/React__default.createElement("svg", _extends({
50549
50601
  width: width,
50550
50602
  height: height,
@@ -50590,7 +50642,9 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50590
50642
  action = _ref$action === void 0 ? noop$1 : _ref$action,
50591
50643
  opened = _ref.opened,
50592
50644
  backgroundColor = _ref.backgroundColor,
50593
- contentColor = _ref.contentColor,
50645
+ backgroundHoverColor = _ref.backgroundHoverColor,
50646
+ textColor = _ref.textColor,
50647
+ textHoverColor = _ref.textHoverColor,
50594
50648
  name = _ref.name,
50595
50649
  filterDropdownID = _ref.filterDropdownID,
50596
50650
  _ref$hasIcon = _ref.hasIcon,
@@ -50598,7 +50652,10 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50598
50652
  Icon = _ref.icon,
50599
50653
  truncateBtnTextWidth = _ref.truncateBtnTextWidth,
50600
50654
  filterLabel = _ref.filterLabel,
50601
- selectedOptions = _ref.selectedOptions;
50655
+ selectedOptions = _ref.selectedOptions,
50656
+ extraStyles = _ref.extraStyles;
50657
+ var btnTextFilterDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? "".concat(filterLabel, ": ") : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "");
50658
+ 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") : "";
50602
50659
  return /*#__PURE__*/React__default.createElement(StyledFilterButton, {
50603
50660
  ref: ref,
50604
50661
  variant: "tertiary",
@@ -50607,7 +50664,13 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50607
50664
  "aria-expanded": opened,
50608
50665
  "aria-controls": filterDropdownID,
50609
50666
  backgroundColor: backgroundColor,
50667
+ backgroundHoverColor: backgroundHoverColor,
50668
+ textColor: textColor,
50669
+ textHoverColor: textHoverColor,
50670
+ opened: opened,
50610
50671
  dataQa: "".concat(name, "-filter-button"),
50672
+ extraStyles: extraStyles,
50673
+ "aria-label": "".concat(filterLabel, " Filter: ").concat(btnTextFilterDescription, " ").concat(btnTextItemsDescription),
50611
50674
  contentOverride: true
50612
50675
  }, btnContentOverride ? btnContentOverride : /*#__PURE__*/React__default.createElement(Center, {
50613
50676
  as: "span",
@@ -50617,7 +50680,7 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50617
50680
  },
50618
50681
  intrinsic: true
50619
50682
  }, hasIcon && /*#__PURE__*/React__default.createElement(Icon, {
50620
- color: contentColor
50683
+ color: opened ? textHoverColor : textColor
50621
50684
  }), /*#__PURE__*/React__default.createElement(Center, {
50622
50685
  as: "span",
50623
50686
  style: {
@@ -50628,20 +50691,22 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50628
50691
  intrinsic: true
50629
50692
  }, /*#__PURE__*/React__default.createElement(Text$1, {
50630
50693
  variant: "pS",
50631
- color: contentColor,
50694
+ color: opened ? textHoverColor : textColor,
50632
50695
  extraStyles: "\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ".concat(truncateBtnTextWidth && "max-width:" + truncateBtnTextWidth, "\n ")
50633
- }, selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? filterLabel + ": " : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "")), /*#__PURE__*/React__default.createElement(Text$1, {
50634
- color: contentColor,
50696
+ }, btnTextFilterDescription), /*#__PURE__*/React__default.createElement(Text$1, {
50697
+ color: opened ? textHoverColor : textColor,
50635
50698
  variant: "pS"
50636
- }, 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, {
50637
- color: contentColor
50699
+ }, btnTextItemsDescription)), /*#__PURE__*/React__default.createElement(DropdownIconV2, {
50700
+ color: opened ? textHoverColor : textColor
50638
50701
  })));
50639
50702
  });
50640
50703
 
50641
50704
  var FilterDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50642
50705
  var id = _ref.id,
50643
50706
  ariaOwns = _ref.ariaOwns,
50707
+ ariaControls = _ref.ariaControls,
50644
50708
  opened = _ref.opened,
50709
+ extraStyles = _ref.extraStyles,
50645
50710
  children = _ref.children;
50646
50711
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, opened && /*#__PURE__*/React__default.createElement(FilterDropdownContainer, {
50647
50712
  ref: ref,
@@ -50649,7 +50714,9 @@ var FilterDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50649
50714
  role: "combobox",
50650
50715
  "aria-expanded": opened,
50651
50716
  "aria-haspopup": "listbox",
50652
- "aria-owns": ariaOwns
50717
+ "aria-owns": ariaOwns,
50718
+ "aria-controls": ariaControls,
50719
+ extraStyles: extraStyles
50653
50720
  }, children));
50654
50721
  });
50655
50722
 
@@ -50670,10 +50737,54 @@ var SearchBox = function SearchBox(_ref) {
50670
50737
  fieldActions: actions.fields.searchTerm,
50671
50738
  placeholder: placeholder,
50672
50739
  disabled: disabled,
50673
- 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 ")
50740
+ 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 ")
50674
50741
  }));
50675
50742
  };
50676
50743
 
50744
+ var _excluded$M = ["width", "height", "color"];
50745
+ var CheckboxCheckmarkIcon = function CheckboxCheckmarkIcon(_ref) {
50746
+ var _ref$width = _ref.width,
50747
+ width = _ref$width === void 0 ? "18" : _ref$width,
50748
+ _ref$height = _ref.height,
50749
+ height = _ref$height === void 0 ? "18" : _ref$height,
50750
+ _ref$color = _ref.color,
50751
+ color = _ref$color === void 0 ? "#FEFEFE" : _ref$color,
50752
+ props = _objectWithoutProperties(_ref, _excluded$M);
50753
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
50754
+ xmlns: "http://www.w3.org/2000/svg",
50755
+ width: width,
50756
+ height: height,
50757
+ viewBox: "0 0 ".concat(width, " ").concat(height),
50758
+ fill: "none"
50759
+ }, props), /*#__PURE__*/React__default.createElement("path", {
50760
+ fillRule: "evenodd",
50761
+ clipRule: "evenodd",
50762
+ 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",
50763
+ fill: "#FEFEFE"
50764
+ }), /*#__PURE__*/React__default.createElement("mask", {
50765
+ id: "mask0_3361_1486",
50766
+ style: {
50767
+ maskType: "luminance"
50768
+ },
50769
+ maskUnits: "userSpaceOnUse",
50770
+ x: "4",
50771
+ y: "5",
50772
+ width: "11",
50773
+ height: "9"
50774
+ }, /*#__PURE__*/React__default.createElement("path", {
50775
+ fillRule: "evenodd",
50776
+ clipRule: "evenodd",
50777
+ 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",
50778
+ fill: "white"
50779
+ })), /*#__PURE__*/React__default.createElement("g", {
50780
+ mask: "url(#mask0_3361_1486)"
50781
+ }, /*#__PURE__*/React__default.createElement("rect", {
50782
+ width: width,
50783
+ height: height,
50784
+ fill: color
50785
+ })));
50786
+ };
50787
+
50677
50788
  var FilterableListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50678
50789
  var index = _ref.index,
50679
50790
  option = _ref.option,
@@ -50682,28 +50793,31 @@ var FilterableListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50682
50793
  disabled = _ref.disabled,
50683
50794
  tabIndex = _ref.tabIndex,
50684
50795
  name = _ref.name,
50796
+ showDivider = _ref.showDivider,
50797
+ extraStyles = _ref.extraStyles,
50685
50798
  themeValues = _ref.themeValues;
50686
- return /*#__PURE__*/React__default.createElement(Box, {
50687
- padding: "0",
50799
+ 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 }");
50800
+ return /*#__PURE__*/React__default.createElement(Checkbox$1, {
50688
50801
  key: index,
50689
- extraStyles: "\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryColor, ";\n }\n ")
50690
- }, /*#__PURE__*/React__default.createElement(Checkbox$1, {
50691
50802
  ref: ref,
50692
50803
  title: option.name,
50693
50804
  name: option.name,
50805
+ role: "option",
50806
+ "aria-selected": checked,
50807
+ tabIndex: tabIndex,
50808
+ dataQa: "".concat(name, "-option-").concat(index),
50694
50809
  checked: checked,
50695
50810
  onChange: function onChange() {
50696
50811
  return selectOption(option);
50697
50812
  },
50698
50813
  textExtraStyles: "font-size: 0.875rem; margin: 0;",
50699
50814
  disabled: disabled,
50700
- extraStyles: "\n padding: 0.075rem 0.325rem; \n margin: 0;\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryColor, ";\n }\n "),
50701
- checkboxMargin: "0.3rem",
50702
- role: "option",
50703
- checkboxExtraStyles: "\n width: 1.375rem; \n height: 1.375rem;\n ".concat(checked && !disabled ? "background: " + themeValues.secondaryColor + ";" : "", "\n "),
50704
- tabIndex: tabIndex,
50705
- dataQa: "".concat(name, "-option-").concat(index)
50706
- }));
50815
+ 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 "),
50816
+ checkboxMargin: showDivider ? "0 0 1rem" : "0",
50817
+ hasIconOverride: true,
50818
+ icon: CheckboxCheckmarkIcon,
50819
+ 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 ")
50820
+ });
50707
50821
  });
50708
50822
 
50709
50823
  var filterItemsList = function filterItemsList(list, searchTerm) {
@@ -50868,14 +50982,12 @@ var FilterableList = function FilterableList(_ref) {
50868
50982
  handleKeyDown = _useKeyboardNavigatio.handleKeyDown;
50869
50983
  return /*#__PURE__*/React__default.createElement(Box, {
50870
50984
  id: id,
50871
- role: "listbox",
50872
50985
  padding: "0",
50873
- extraStyles: "\n overflow-y: auto;\n max-height: 250px;\n display: flex;\n flex-flow: column;\n ",
50874
- onKeyDown: handleKeyDown
50875
- }, (sortedAppliedOptions === null || sortedAppliedOptions === void 0 ? void 0 : sortedAppliedOptions.length) > 0 && /*#__PURE__*/React__default.createElement(Box, {
50876
- padding: "0",
50877
- extraStyles: sortedOptions.length > 0 && "border-bottom: 1px solid ".concat(GHOST_GREY)
50878
- }, sortedAppliedOptions.map(function (option, index) {
50986
+ role: "listbox",
50987
+ "aria-label": "Filter options container",
50988
+ onKeyDown: handleKeyDown,
50989
+ extraStyles: "\n overflow-y: auto;\n max-height: 250px;\n display: flex;\n flex-flow: column;\n padding-bottom: 0.5rem;\n "
50990
+ }, (sortedAppliedOptions === null || sortedAppliedOptions === void 0 ? void 0 : sortedAppliedOptions.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, sortedAppliedOptions.map(function (option, index) {
50879
50991
  var checked = isChecked(option, selectedOptions);
50880
50992
  var tabIndex = index === focusedIndex || index === 0 && focusedIndex === -1 ? "0" : "-1";
50881
50993
  return /*#__PURE__*/React__default.createElement(FilterableListItem, {
@@ -50889,9 +51001,10 @@ var FilterableList = function FilterableList(_ref) {
50889
51001
  selectOption: handleSelectOption,
50890
51002
  tabIndex: tabIndex,
50891
51003
  name: name,
50892
- themeValues: themeValues
51004
+ themeValues: themeValues,
51005
+ showDivider: sortedOptions.length > 0 && index === sortedAppliedOptions.length - 1
50893
51006
  });
50894
- })), sortedOptions.map(function (option, index) {
51007
+ })), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, sortedOptions.map(function (option, index) {
50895
51008
  var checked = isChecked(option, selectedOptions);
50896
51009
  var isDisabled = isMaxSelectionReached(maxSelections, selectedOptions) && !checked;
50897
51010
  var indexOffset = sortedAppliedOptions !== null && sortedAppliedOptions !== void 0 && sortedAppliedOptions.length ? sortedAppliedOptions === null || sortedAppliedOptions === void 0 ? void 0 : sortedAppliedOptions.length : 0;
@@ -50911,7 +51024,7 @@ var FilterableList = function FilterableList(_ref) {
50911
51024
  name: name,
50912
51025
  themeValues: themeValues
50913
51026
  });
50914
- }));
51027
+ })));
50915
51028
  };
50916
51029
  var FilterableList$1 = /*#__PURE__*/React__default.memo(FilterableList);
50917
51030
 
@@ -50919,7 +51032,9 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50919
51032
  var actions = _ref.actions,
50920
51033
  autocompleteValue = _ref.autocompleteValue,
50921
51034
  btnContentOverride = _ref.btnContentOverride,
51035
+ btnExtraStyles = _ref.btnExtraStyles,
50922
51036
  disabled = _ref.disabled,
51037
+ dropdownExtraStyles = _ref.dropdownExtraStyles,
50923
51038
  extraStyles = _ref.extraStyles,
50924
51039
  fields = _ref.fields,
50925
51040
  filterLabel = _ref.filterLabel,
@@ -50938,8 +51053,6 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50938
51053
  placeholder = _ref$placeholder === void 0 ? "Search" : _ref$placeholder,
50939
51054
  _ref$searchable = _ref.searchable,
50940
51055
  searchable = _ref$searchable === void 0 ? true : _ref$searchable,
50941
- selectedOptions = _ref.selectedOptions,
50942
- setSelectedOptions = _ref.setSelectedOptions,
50943
51056
  themeValues = _ref.themeValues,
50944
51057
  _ref$truncateBtnTextW = _ref.truncateBtnTextWidth,
50945
51058
  truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW;
@@ -50949,22 +51062,29 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50949
51062
  setOpened = _useState2[1];
50950
51063
  var _useState3 = React.useState([]),
50951
51064
  _useState4 = _slicedToArray(_useState3, 2),
50952
- appliedOptions = _useState4[0],
50953
- setAppliedOptions = _useState4[1];
50954
- var handleClickOutsideContainer = function handleClickOutsideContainer() {
50955
- setOpened(false);
50956
- actions.fields.searchTerm.set("");
50957
- onApply(selectedOptions);
51065
+ selectedOptions = _useState4[0],
51066
+ setSelectedOptions = _useState4[1];
51067
+ var _useState5 = React.useState([]),
51068
+ _useState6 = _slicedToArray(_useState5, 2),
51069
+ appliedOptions = _useState6[0],
51070
+ setAppliedOptions = _useState6[1];
51071
+ var openedRef = React.useRef(opened);
51072
+ var handleOnClose = function handleOnClose() {
51073
+ if (openedRef.current) {
51074
+ setOpened(false);
51075
+ actions.fields.searchTerm.set("");
51076
+ }
50958
51077
  };
50959
51078
  var containerRef = useOutsideClickHook(function () {
50960
- return handleClickOutsideContainer();
51079
+ return handleOnClose();
50961
51080
  });
50962
51081
  var dropdownRef = React.useRef(null);
50963
51082
  var filterButtonRef = React.useRef(null);
50964
51083
  var applyFilterButtonRef = React.useRef(null);
50965
51084
  var filterDropdownID = "".concat(name, "-filter-dropdown");
50966
- var checkboxListID = "".concat(name, "-checkbox-list");
51085
+ var listGroupID = "".concat(name, "-list-group");
50967
51086
  React.useEffect(function () {
51087
+ openedRef.current = opened;
50968
51088
  if (!opened) {
50969
51089
  onApply(selectedOptions);
50970
51090
  setAppliedOptions(selectedOptions);
@@ -50981,9 +51101,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
50981
51101
  or tabbing backward past the filter button.
50982
51102
  */
50983
51103
  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)) {
50984
- setOpened(false);
50985
- actions.fields.searchTerm.set("");
50986
- onApply(selectedOptions);
51104
+ handleOnClose();
50987
51105
  }
50988
51106
  };
50989
51107
  document.addEventListener("keydown", handleKeyDown);
@@ -51002,20 +51120,25 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51002
51120
  setOpened(!opened);
51003
51121
  },
51004
51122
  opened: opened,
51005
- backgroundColor: opened ? themeValues.primaryColor : selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? themeValues.secondaryColor : WHITE,
51006
- contentColor: !opened && selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? WHITE : CHARADE_GREY,
51123
+ backgroundHoverColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? themeValues.secondaryHoverColor : themeValues.primaryHoverColor,
51124
+ backgroundColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? themeValues.secondaryColor : themeValues.primaryColor,
51125
+ textColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? WHITE : CHARADE_GREY,
51126
+ textHoverColor: opened && !(appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length) ? CHARADE_GREY : WHITE,
51007
51127
  name: name,
51008
51128
  filterDropdownID: filterDropdownID,
51009
51129
  hasIcon: hasIcon,
51010
51130
  icon: Icon,
51011
51131
  truncateBtnTextWidth: truncateBtnTextWidth,
51012
51132
  filterLabel: filterLabel,
51013
- selectedOptions: selectedOptions
51133
+ selectedOptions: selectedOptions,
51134
+ extraStyles: btnExtraStyles
51014
51135
  }), /*#__PURE__*/React__default.createElement(FilterDropdown, {
51015
51136
  id: filterDropdownID,
51016
51137
  ref: dropdownRef,
51017
- ariaOwns: checkboxListID,
51018
- opened: opened
51138
+ ariaOwns: listGroupID,
51139
+ ariaControls: listGroupID,
51140
+ opened: opened,
51141
+ extraStyles: dropdownExtraStyles
51019
51142
  }, /*#__PURE__*/React__default.createElement(SearchBox, {
51020
51143
  showSearchBox: searchable && (options === null || options === void 0 ? void 0 : options.length) > 8,
51021
51144
  autocompleteValue: autocompleteValue,
@@ -51024,7 +51147,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51024
51147
  placeholder: placeholder,
51025
51148
  disabled: disabled
51026
51149
  }), /*#__PURE__*/React__default.createElement(FilterableList$1, {
51027
- id: checkboxListID,
51150
+ id: listGroupID,
51028
51151
  options: options,
51029
51152
  appliedOptions: appliedOptions,
51030
51153
  themeValues: themeValues,
@@ -51038,22 +51161,21 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51038
51161
  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 ")
51039
51162
  }, /*#__PURE__*/React__default.createElement(ActionLinkButton, {
51040
51163
  action: function action() {
51041
- setOpened(false);
51042
51164
  setSelectedOptions([]);
51043
- actions.fields.searchTerm.set("");
51165
+ handleOnClose();
51044
51166
  onClear();
51045
51167
  },
51046
51168
  text: "Clear",
51047
- dataQa: "".concat(name, "-clear-filters")
51169
+ dataQa: "".concat(name, "-clear-filters"),
51170
+ ariaLabel: "Clear all filters"
51048
51171
  }), /*#__PURE__*/React__default.createElement(ActionLinkButton, {
51049
51172
  ref: applyFilterButtonRef,
51050
51173
  action: function action() {
51051
- setOpened(false);
51052
- actions.fields.searchTerm.set("");
51053
- onApply(selectedOptions);
51174
+ return handleOnClose();
51054
51175
  },
51055
51176
  text: "Apply",
51056
- dataQa: "".concat(name, "-apply-filters")
51177
+ dataQa: "".concat(name, "-apply-filters"),
51178
+ ariaLabel: "Apply all filters"
51057
51179
  }))));
51058
51180
  };
51059
51181
  var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$_);
@@ -51490,11 +51612,13 @@ exports.PaymentFormCard = PaymentFormCard$1;
51490
51612
  exports.PaymentMethodAddIcon = PaymentMethodAddIcon$1;
51491
51613
  exports.PaymentMethodIcon = PaymentMethodIcon$1;
51492
51614
  exports.PaymentSearchIcon = PaymentSearchIcon;
51615
+ exports.PaymentStatusIcon = PaymentStatusIcon;
51493
51616
  exports.PaymentsIconSmall = PaymentsIconSmall$1;
51494
51617
  exports.PencilIcon = PencilIcon$1;
51495
51618
  exports.PendingIcon = PendingIcon;
51496
51619
  exports.PeriscopeDashboardIframe = PeriscopeDashboardIframe;
51497
51620
  exports.PeriscopeFailedIcon = PeriscopeFailedIcon;
51621
+ exports.PersonIcon = PersonIcon;
51498
51622
  exports.PhoneForm = PhoneForm;
51499
51623
  exports.Placeholder = Placeholder$1;
51500
51624
  exports.PlusCircleIcon = PlusCircleIcon;