@mailstep/design-system 0.8.16-beta.2 → 0.8.16-beta.20

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 (121) hide show
  1. package/package.json +12 -6
  2. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +4 -2
  3. package/ui/Blocks/CommonGrid/components/ControlButtons/styles.d.ts +1 -0
  4. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +9 -8
  5. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.js +1 -2
  6. package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.js +5 -4
  7. package/ui/Blocks/CommonGrid/components/Filters/TextRange/TextRange.js +1 -1
  8. package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +1 -1
  9. package/ui/Blocks/CommonGrid/components/ManageColumnForm/styles.d.ts +2 -2
  10. package/ui/Blocks/CommonGrid/components/MobileFilterModal.js +2 -2
  11. package/ui/Blocks/CommonGrid/components/MobileSortModal.js +1 -1
  12. package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.js +1 -4
  13. package/ui/Blocks/CommonGrid/components/Table.d.ts +28 -28
  14. package/ui/Blocks/CommonGrid/components/Table.js +1 -1
  15. package/ui/Blocks/CommonGrid/hooks/useAddFilter.d.ts +1 -1
  16. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +1 -1
  17. package/ui/Blocks/CommonGrid/hooks/useEvent.d.ts +1 -1
  18. package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.d.ts +1 -1
  19. package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +1 -1
  20. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.d.ts +1 -1
  21. package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.d.ts +1 -1
  22. package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +1 -1
  23. package/ui/Blocks/CommonGrid/store/index.d.ts +14 -14
  24. package/ui/Blocks/CommonGrid/styles.d.ts +6 -5
  25. package/ui/Blocks/CommonGrid/styles.js +6 -9
  26. package/ui/Blocks/CommonGrid/utils/index.d.ts +1 -1
  27. package/ui/Blocks/Header/components/MenuItems/styles.d.ts +1 -1
  28. package/ui/Blocks/Header/components/MenuItems/styles.js +1 -1
  29. package/ui/Blocks/Header/hooks/useChangeLanguage.js +0 -1
  30. package/ui/Blocks/Header/stories/Header.stories.d.ts +16 -16
  31. package/ui/Blocks/Header/styles.js +2 -2
  32. package/ui/Blocks/ImageList/components/AddPhoto/index.js +2 -2
  33. package/ui/Blocks/ImageList/components/AddPhoto/styles.d.ts +2 -2
  34. package/ui/Blocks/ImageList/components/CloseButton/styles.d.ts +1 -1
  35. package/ui/Blocks/ImageList/components/ImageElement/styles.d.ts +1 -1
  36. package/ui/Blocks/ImageList/styles.d.ts +2 -2
  37. package/ui/Blocks/LanguageSwitch/LanguageSwitch.js +10 -5
  38. package/ui/Blocks/LanguageSwitch/styles.d.ts +2 -7
  39. package/ui/Blocks/LanguageSwitch/styles.js +3 -11
  40. package/ui/Blocks/LoginPage/stories/LoginPage.stories.js +2 -2
  41. package/ui/Blocks/LoginPage/styles.d.ts +2 -3
  42. package/ui/Blocks/Modal/styles.d.ts +7 -7
  43. package/ui/Blocks/Modal/styles.js +8 -8
  44. package/ui/Blocks/Scheduler/components/Groups/styles.d.ts +1 -1
  45. package/ui/Blocks/Scheduler/components/TimeSlots/styles.d.ts +1 -1
  46. package/ui/Blocks/SideMenu/components/Footer.d.ts +1 -1
  47. package/ui/Blocks/SideMenu/components/HamburgerMenu.js +2 -3
  48. package/ui/Blocks/SideMenu/stories/SideMenu.stories.d.ts +1 -0
  49. package/ui/Blocks/SideMenu/styles.d.ts +15 -15
  50. package/ui/Blocks/Stepper/components/StepCircle/styles.d.ts +2 -2
  51. package/ui/Blocks/Stepper/components/StepItem/styles.d.ts +3 -3
  52. package/ui/Blocks/Table/stories/Table.stories.d.ts +3 -2
  53. package/ui/Blocks/Tabs/styles.d.ts +6 -5
  54. package/ui/Elements/Alert/styles.d.ts +18 -17
  55. package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.d.ts +2 -1
  56. package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.js +2 -2
  57. package/ui/Elements/BarChartSymbol/styles.d.ts +2 -2
  58. package/ui/Elements/BorderedBox/types.d.ts +1 -0
  59. package/ui/Elements/Button/styles.d.ts +6 -5
  60. package/ui/Elements/Card/styles.d.ts +2 -2
  61. package/ui/Elements/Card/types.d.ts +1 -0
  62. package/ui/Elements/CheckedCircle/storries/CheckedCircle.stories.d.ts +2 -2
  63. package/ui/Elements/DatePicker/Datetime/components/FooterRow.d.ts +1 -1
  64. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +1 -1
  65. package/ui/Elements/DatePicker/styles.d.ts +2 -1
  66. package/ui/Elements/DropdownMenu/components/DefaultItem.js +1 -1
  67. package/ui/Elements/Icon/Icon.js +6 -6
  68. package/ui/Elements/Icon/icons/FlagHU.js +1 -1
  69. package/ui/Elements/Icon/stories/BadgeIcon.stories.d.ts +1 -1
  70. package/ui/Elements/Label/Label.d.ts +1 -1
  71. package/ui/Elements/Label/stories/Label.stories.d.ts +1 -1
  72. package/ui/Elements/Link/stories/Link.stories.d.ts +12 -12
  73. package/ui/Elements/Logo/Logo.js +2 -2
  74. package/ui/Elements/Pagination/styled.d.ts +2 -1
  75. package/ui/Elements/ProgressBar/stories/ProgressBar.stories.d.ts +5 -5
  76. package/ui/Elements/ProgressBar/styles.d.ts +1 -1
  77. package/ui/Elements/Select/Select.js +6 -6
  78. package/ui/Elements/Select/components/ConnectedMenu.js +2 -3
  79. package/ui/Elements/Select/components/CountMultiValue.d.ts +10 -1
  80. package/ui/Elements/Select/components/CountMultiValue.js +16 -7
  81. package/ui/Elements/Select/components/DropdownIndicator.d.ts +6 -1
  82. package/ui/Elements/Select/components/DropdownIndicator.js +3 -2
  83. package/ui/Elements/Select/components/IconValueContainer.js +1 -1
  84. package/ui/Elements/Select/components/SimplifiedOption.d.ts +1 -0
  85. package/ui/Elements/Select/stories/Select.stories.d.ts +10 -0
  86. package/ui/Elements/Select/stories/Select.stories.js +15 -0
  87. package/ui/Elements/Select/themes/index.d.ts +1 -1
  88. package/ui/Elements/Select/themes/index.js +4 -14
  89. package/ui/Elements/Select/themes/selectStyles.d.ts +1 -1
  90. package/ui/Elements/Select/themes/selectStyles.js +29 -30
  91. package/ui/Elements/Select/types.d.ts +11 -7
  92. package/ui/Elements/SingleSelect/SingleSelect.d.ts +2 -2
  93. package/ui/Elements/SingleSelect/SingleSelect.js +13 -22
  94. package/ui/Elements/SpaceAround/types.d.ts +1 -0
  95. package/ui/Elements/Spinner/styles.d.ts +1 -1
  96. package/ui/Elements/Tag/types.d.ts +1 -0
  97. package/ui/Elements/Toast/styles.d.ts +1 -1
  98. package/ui/Forms/Checkbox/styles.d.ts +2 -1
  99. package/ui/Forms/Checkbox/styles.js +1 -1
  100. package/ui/Forms/Input/styles.d.ts +3 -3
  101. package/ui/Forms/Input/styles.js +2 -2
  102. package/ui/Forms/TextArea/styles.d.ts +5 -5
  103. package/ui/ThemeProvider/ThemeProvider.d.ts +2 -1
  104. package/ui/ThemeProvider/ThemeProvider.js +1 -1
  105. package/ui/ThemeProvider/themes/dark.d.ts +154 -0
  106. package/ui/ThemeProvider/themes/dark.js +14 -0
  107. package/ui/ThemeProvider/themes/default.d.ts +2 -0
  108. package/ui/ThemeProvider/themes/default.js +13 -9
  109. package/ui/ThemeProvider/themes/index.d.ts +155 -1
  110. package/ui/ThemeProvider/themes/index.js +3 -3
  111. package/ui/ThemeProvider/themes/mailwise.js +1 -1
  112. package/ui/ThemeProvider/types.d.ts +13 -33
  113. package/ui/index.es.js +9598 -9614
  114. package/ui/index.umd.js +621 -637
  115. package/ui/utils/index.js +1 -1
  116. package/ui/utils/translations.d.ts +4 -1
  117. package/ui/utils/translations.js +2 -2
  118. package/ui/Elements/Select/components/ResetAll.d.ts +0 -5
  119. package/ui/Elements/Select/components/ResetAll.js +0 -15
  120. package/ui/ThemeProvider/themes/light.d.ts +0 -4
  121. package/ui/ThemeProvider/themes/light.js +0 -7
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export type CardProps = {
2
3
  children: React.ReactNode;
3
4
  display?: Display;
@@ -3,8 +3,8 @@ import { StoryObj } from '@storybook/react-webpack5';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: import('react').FC<{
6
- checked?: boolean;
7
- color?: string;
6
+ checked?: boolean | undefined;
7
+ color?: string | undefined;
8
8
  }>;
9
9
  tags: string[];
10
10
  argTypes: {};
@@ -1,3 +1,3 @@
1
1
  export declare const FooterRow: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
2
- disabled?: boolean;
2
+ disabled?: boolean | undefined;
3
3
  }, never>;
@@ -24,7 +24,7 @@ var __assign = (this && this.__assign) || function () {
24
24
  };
25
25
  return __assign.apply(this, arguments);
26
26
  };
27
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
28
28
  // @ts-nocheck
29
29
  import React from 'react';
30
30
  import { DateRepeater } from '../components/DateRepeater';
@@ -1 +1,2 @@
1
- export declare const DatePickerBase: import('styled-components').StyledComponent<(props: Omit<JSX.IntrinsicElements[string], "color">) => import('react').ReactElement<any, string>, import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, "color">;
1
+ /// <reference types="react" />
2
+ export declare const DatePickerBase: import('styled-components').StyledComponent<(props: Omit<JSX.IntrinsicElements, "color">) => import('react').ReactElement<any, string>, import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, "color">;
@@ -4,7 +4,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  };
5
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  import styled, { css } from '@xstyled/styled-components';
7
- var StyledListItem = styled.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 8px 10px;\n font-size: 14px;\n color: typoPrimary;\n font-weight: normal;\n\n :hover {\n background-color: bgLightGray1;\n cursor: pointer;\n }\n\n ", ";\n"], ["\n padding: 8px 10px;\n font-size: 14px;\n color: typoPrimary;\n font-weight: normal;\n\n :hover {\n background-color: bgLightGray1;\n cursor: pointer;\n }\n\n ", ";\n"])), function (props) {
7
+ var StyledListItem = styled.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 8px 10px;\n font-size: 14px;\n color: typoPrimary;\n font-weight: normal;\n display: flex;\n\n :hover {\n background-color: bgLightGray1;\n cursor: pointer;\n }\n\n ", ";\n"], ["\n padding: 8px 10px;\n font-size: 14px;\n color: typoPrimary;\n font-weight: normal;\n display: flex;\n\n :hover {\n background-color: bgLightGray1;\n cursor: pointer;\n }\n\n ", ";\n"])), function (props) {
8
8
  return props.hasSeparator && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: slim;\n border-color: lightGray2;\n "], ["\n border-top: slim;\n border-color: lightGray2;\n "])));
9
9
  });
10
10
  var IconWrap = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-right: 10px;\n"], ["\n margin-right: 10px;\n"])));
@@ -146,12 +146,12 @@ export var iconDictionary = {
146
146
  chevronDown: faChevronDown,
147
147
  chevronRight: farChevronRight,
148
148
  clock: faClock,
149
- complaint: faFileAlt, // 'file-lines'
149
+ complaint: faFileAlt,
150
150
  computerMouseScrollwheel: faComputerMouseScrollwheel,
151
151
  mailLight: faEnvelopeLight,
152
152
  eshop: faStore,
153
- expedition: faShippingFast, // 'truck-fast'
154
- equals: faEquals, // 'truck-fast'
153
+ expedition: faShippingFast,
154
+ equals: faEquals,
155
155
  fluxCapacitor: faFluxCapacitor,
156
156
  wineGlassCrack: faWineGlassCrack,
157
157
  paperPlane: faPaperPlane,
@@ -181,10 +181,10 @@ export var iconDictionary = {
181
181
  boxChecked: faBoxCircleCheck,
182
182
  shelves: faShelves,
183
183
  reservation: faHandHoldingBox,
184
- return: [faShareSquare, 'horizontal'], // 'fa-share-from-square'
185
- search: faSearch, // 'magnifying-glass'
184
+ return: [faShareSquare, 'horizontal'],
185
+ search: faSearch,
186
186
  supplier: farTriangleExclamation,
187
- transfer: faExchange, // 'arrow-right-arrow-left'
187
+ transfer: faExchange,
188
188
  users: faUsersGear,
189
189
  warning: farTriangleExclamation,
190
190
  close: fasXmark,
@@ -10,4 +10,4 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- export var FlagHU = function (props) { return (_jsxs("svg", __assign({ width: "28", height: "20" }, props, { children: [_jsx("path", { d: "M0 0h1200v600H0", fill: "#477050" }), _jsx("path", { d: "M0 0h1200v400H0", fill: "#fff" }), _jsx("path", { d: "M0 0h1200v200H0", fill: "#ce2939" })] }))); };
13
+ export var FlagHU = function (props) { return (_jsxs("svg", __assign({ width: "28", height: "20", viewBox: "0 0 9 6" }, props, { children: [_jsx("rect", { fill: "#477050", width: "9", height: "6" }), _jsx("rect", { fill: "#FFF", width: "9", height: "4" }), _jsx("rect", { fill: "#ce2939", width: "9", height: "2" })] }))); };
@@ -11,7 +11,7 @@ declare const meta: {
11
11
  style?: "normal" | "light" | "solid" | undefined;
12
12
  fill?: string | undefined;
13
13
  stroke?: string | undefined;
14
- size?: number | string | undefined;
14
+ size?: string | number | undefined;
15
15
  className?: string | undefined;
16
16
  fixedWidth?: boolean | undefined;
17
17
  spinning?: boolean | undefined;
@@ -1,4 +1,4 @@
1
1
  export declare const Label: import('styled-components').StyledComponent<"label", import('@xstyled/system').Theme, {
2
- fontSize?: number | string;
2
+ fontSize?: string | number | undefined;
3
3
  }, never>;
4
4
  export declare const FieldLabel: import('styled-components').StyledComponent<"label", import('@xstyled/system').Theme, {}, never>;
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react-webpack5';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: import('styled-components').StyledComponent<"label", import('@xstyled/system').Theme, {
6
- fontSize?: number | string;
6
+ fontSize?: string | number | undefined;
7
7
  }, never>;
8
8
  tags: string[];
9
9
  argTypes: {};
@@ -4,18 +4,18 @@ declare const meta: {
4
4
  title: string;
5
5
  component: import('react').FC<{
6
6
  as?: any;
7
- children?: React.ReactNode;
8
- to?: string | {
9
- pathname?: string;
10
- search?: string;
11
- hash?: string;
12
- state?: object;
13
- } | Function;
14
- target?: string;
15
- color?: string;
16
- size?: number | "inherit";
17
- disabled?: boolean;
18
- onClick?: Function;
7
+ children?: import('react').ReactNode;
8
+ to?: string | Function | {
9
+ pathname?: string | undefined;
10
+ search?: string | undefined;
11
+ hash?: string | undefined;
12
+ state?: object | undefined;
13
+ } | undefined;
14
+ target?: string | undefined;
15
+ color?: string | undefined;
16
+ size?: number | "inherit" | undefined;
17
+ disabled?: boolean | undefined;
18
+ onClick?: Function | undefined;
19
19
  }>;
20
20
  tags: string[];
21
21
  argTypes: {};
@@ -41,8 +41,8 @@ import warehouseManager3 from './assets/warehouse/manager3.svg';
41
41
  import warehouseManager from './assets/warehouse/manager.svg';
42
42
  import styled from '@xstyled/styled-components';
43
43
  var defaultSizes = {
44
- small: '30px', // cca 100px width on full logo
45
- medium: '46px', // cca 150px width on full logo
44
+ small: '30px',
45
+ medium: '46px',
46
46
  big: '61px' // cca 200px width on full logo
47
47
  };
48
48
  var variantMap = {
@@ -1,4 +1,5 @@
1
- export declare const Wrapper: import('styled-components').StyledComponent<(props: Omit<JSX.IntrinsicElements[string], "color">) => import('react').ReactElement<any, string>, import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, "color">;
1
+ /// <reference types="react" />
2
+ export declare const Wrapper: import('styled-components').StyledComponent<(props: Omit<JSX.IntrinsicElements, "color">) => import('react').ReactElement<any, string>, import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, "color">;
2
3
  export declare const Btn: import('styled-components').StyledComponent<"button", import('@xstyled/system').Theme, {
3
4
  disabled: boolean;
4
5
  }, never>;
@@ -3,11 +3,11 @@ import { StoryObj } from '@storybook/react-webpack5';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: import('react').FC<{
6
- progress?: number;
7
- status?: "loading" | "finished" | "error";
8
- errorMessage?: string;
9
- noText?: boolean;
10
- variant?: "normal" | "thin";
6
+ progress?: number | undefined;
7
+ status?: "error" | "loading" | "finished" | undefined;
8
+ errorMessage?: string | undefined;
9
+ noText?: boolean | undefined;
10
+ variant?: "normal" | "thin" | undefined;
11
11
  }>;
12
12
  tags: string[];
13
13
  argTypes: {};
@@ -1,6 +1,6 @@
1
1
  export declare const StyledProgressBar: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
2
2
  status: string | null | undefined;
3
- variant?: "normal" | "thin";
3
+ variant?: "normal" | "thin" | undefined;
4
4
  }, never>;
5
5
  export declare const Progress: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
6
6
  progress: number;
@@ -19,8 +19,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19
19
  });
20
20
  };
21
21
  var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
23
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
@@ -69,7 +69,7 @@ var emptyOptions = [];
69
69
  var noOptionsMessage = function () { return i18n._({ id: 'select.noOptions', message: 'no options' }); };
70
70
  var loadingMessage = function () { return i18n._({ id: 'components.dropdown.loading', message: 'Loading...' }); };
71
71
  var Select = function (_a) {
72
- var label = _a.label, name = _a.name, _b = _a.value, value = _b === void 0 ? '' : _b, _c = _a.options, options = _c === void 0 ? emptyOptions : _c, defaultOptions = _a.defaultOptions, loadOptions = _a.loadOptions, onChange = _a.onChange, onBlur = _a.onBlur, error = _a.error, isInvalid = _a.isInvalid, isLoading = _a.isLoading, isDarkPlaceholderText = _a.isDarkPlaceholderText, _d = _a.spaceAround, spaceAround = _d === void 0 ? false : _d, disabled = _a.disabled, onInputChange = _a.onInputChange, isSearchable = _a.isSearchable, isMulti = _a.isMulti, className = _a.className, _e = _a.useSimplifiedOptions, useSimplifiedOptions = _e === void 0 ? false : _e, _f = _a.showSelectAllButton, showSelectAllButton = _f === void 0 ? false : _f, _g = _a.showResetGridButton, showResetGridButton = _g === void 0 ? false : _g, _h = _a.shortValues, shortValues = _h === void 0 ? true : _h, style = _a.style, optionVariant = _a.optionVariant, multiLabelVariant = _a.multiLabelVariant, containerVariant = _a.containerVariant, placeholder = _a.placeholder, placeholderIcon = _a.placeholderIcon, innerRef = _a.innerRef, maxMenuHeight = _a.maxMenuHeight, getOptionValue = _a.getOptionValue, resetGrid = _a.resetGrid, onIconClick = _a.onIconClick, passTroughProps = __rest(_a, ["label", "name", "value", "options", "defaultOptions", "loadOptions", "onChange", "onBlur", "error", "isInvalid", "isLoading", "isDarkPlaceholderText", "spaceAround", "disabled", "onInputChange", "isSearchable", "isMulti", "className", "useSimplifiedOptions", "showSelectAllButton", "showResetGridButton", "shortValues", "style", "optionVariant", "multiLabelVariant", "containerVariant", "placeholder", "placeholderIcon", "innerRef", "maxMenuHeight", "getOptionValue", "resetGrid", "onIconClick"]);
72
+ var label = _a.label, name = _a.name, _b = _a.value, value = _b === void 0 ? '' : _b, _c = _a.options, options = _c === void 0 ? emptyOptions : _c, defaultOptions = _a.defaultOptions, loadOptions = _a.loadOptions, onChange = _a.onChange, onBlur = _a.onBlur, error = _a.error, isInvalid = _a.isInvalid, isLoading = _a.isLoading, isDarkPlaceholderText = _a.isDarkPlaceholderText, _d = _a.spaceAround, spaceAround = _d === void 0 ? false : _d, disabled = _a.disabled, onInputChange = _a.onInputChange, isSearchable = _a.isSearchable, isMulti = _a.isMulti, className = _a.className, _e = _a.useSimplifiedOptions, useSimplifiedOptions = _e === void 0 ? false : _e, _f = _a.showSelectAllButton, showSelectAllButton = _f === void 0 ? false : _f, _g = _a.shortValues, shortValues = _g === void 0 ? true : _g, _h = _a.shortVariant, shortVariant = _h === void 0 ? 'block' : _h, style = _a.style, optionVariant = _a.optionVariant, multiLabelVariant = _a.multiLabelVariant, containerVariant = _a.containerVariant, placeholder = _a.placeholder, placeholderIcon = _a.placeholderIcon, innerRef = _a.innerRef, maxMenuHeight = _a.maxMenuHeight, getOptionValue = _a.getOptionValue, onIconClick = _a.onIconClick, passTroughProps = __rest(_a, ["label", "name", "value", "options", "defaultOptions", "loadOptions", "onChange", "onBlur", "error", "isInvalid", "isLoading", "isDarkPlaceholderText", "spaceAround", "disabled", "onInputChange", "isSearchable", "isMulti", "className", "useSimplifiedOptions", "showSelectAllButton", "shortValues", "shortVariant", "style", "optionVariant", "multiLabelVariant", "containerVariant", "placeholder", "placeholderIcon", "innerRef", "maxMenuHeight", "getOptionValue", "onIconClick"]);
73
73
  var isAsync = !!loadOptions;
74
74
  if (showSelectAllButton && !isMulti) {
75
75
  console.error('CheckboxSelect incompatible props');
@@ -84,8 +84,8 @@ var Select = function (_a) {
84
84
  }
85
85
  }, [onChange]);
86
86
  var icon = containerVariant === 'search' && !placeholderIcon && placeholderIcon !== null ? 'search' : placeholderIcon || undefined;
87
- var modifiedMaxMenuHeight = showResetGridButton && showSelectAllButton && maxMenuHeight ? maxMenuHeight - 30 : maxMenuHeight;
88
- var _j = useStylesAndComponents(style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton, showResetGridButton), customComponents = _j[0], customTheme = _j[1], customStyles = _j[2];
87
+ var modifiedMaxMenuHeight = showSelectAllButton && maxMenuHeight ? maxMenuHeight - 30 : maxMenuHeight;
88
+ var _j = useStylesAndComponents(style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton), customComponents = _j[0], customTheme = _j[1], customStyles = _j[2];
89
89
  var RenderComponent = isAsync ? StyledAsyncSelect : StyledReactSelect;
90
90
  var selectedOption;
91
91
  var localGetOptionValue = useMemo(function () { return getOptionValue || (function (option) { return option === null || option === void 0 ? void 0 : option.value; }); }, [getOptionValue]);
@@ -106,6 +106,6 @@ var Select = function (_a) {
106
106
  }
107
107
  }); }); } : undefined;
108
108
  }, [loadOptions]);
109
- return (_jsxs(SpaceAroundWrap, { spaceAround: spaceAround, className: className, children: [_jsxs(Wrapper, { children: [label && _jsx(FieldLabel, { htmlFor: name, children: label }), _jsx(RenderComponent, __assign({ id: name, name: name, options: options, loadOptions: handleLoadOptions, defaultOptions: defaultOptions, value: selectedOption, onChange: onChange, onBlur: onBlur, isDisabled: disabled || isLoading, isLoading: isLoading, isInvalid: isInvalid !== undefined ? isInvalid : !!error, isDarkPlaceholderText: isDarkPlaceholderText, placeholder: placeholder || i18n._({ id: 'components.dropdown.placeholder', message: 'Select...' }), styles: customStyles, theme: customTheme, icon: icon, onIconClick: onIconClick, hideSelectedOptions: !!(isMulti && multiLabelVariant != 'count'), onInputChange: onInputChange, isSearchable: isAsync || isSearchable, isMulti: isMulti, classNamePrefix: "react-select", components: customComponents, closeMenuOnSelect: isMulti ? false : undefined, noOptionsMessage: noOptionsMessage }, passTroughProps, { ref: innerRef, tabIndex: null, systemTheme: theme, resetGrid: resetGrid, onCustomSelectAll: setAllOptions, onCustomDeselectAll: unsetAllOptions, selectAllButton: showSelectAllButton, resetGridButton: showResetGridButton, maxMenuHeight: modifiedMaxMenuHeight, getOptionValue: getOptionValue, loadingMessage: loadingMessage, shortValues: shortValues }))] }), error && _jsx(ErrorMessage, { children: error })] }));
109
+ return (_jsxs(SpaceAroundWrap, { spaceAround: spaceAround, className: className, children: [_jsxs(Wrapper, { children: [label && _jsx(FieldLabel, { htmlFor: name, children: label }), _jsx(RenderComponent, __assign({ id: name, name: name, options: options, loadOptions: handleLoadOptions, defaultOptions: defaultOptions, value: selectedOption, onChange: onChange, onBlur: onBlur, isDisabled: disabled || isLoading, isLoading: isLoading, isInvalid: isInvalid !== undefined ? isInvalid : !!error, isDarkPlaceholderText: isDarkPlaceholderText, placeholder: placeholder || i18n._({ id: 'components.dropdown.placeholder', message: 'Select...' }), styles: customStyles, theme: customTheme, icon: icon, onIconClick: onIconClick, hideSelectedOptions: !!(isMulti && multiLabelVariant !== 'count'), onInputChange: onInputChange, isSearchable: isAsync || isSearchable, isMulti: isMulti, classNamePrefix: "react-select", components: customComponents, closeMenuOnSelect: isMulti ? false : undefined, noOptionsMessage: noOptionsMessage }, passTroughProps, { ref: innerRef, tabIndex: null, systemTheme: theme, onCustomSelectAll: setAllOptions, onCustomDeselectAll: unsetAllOptions, selectAllButton: showSelectAllButton, maxMenuHeight: modifiedMaxMenuHeight, getOptionValue: getOptionValue, loadingMessage: loadingMessage, shortValues: shortValues, shortVariant: shortVariant, containerVariant: containerVariant }))] }), error && _jsx(ErrorMessage, { children: error })] }));
110
110
  };
111
111
  export default Select;
@@ -12,17 +12,16 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useMemo } from 'react';
14
14
  import { components as selectComponents } from 'react-select';
15
- import ResetAll from '../components/ResetAll';
16
15
  import SelectAll from '../components/SelectAll';
17
16
  var ConnectedMenu = function (props) {
18
17
  var theme = props.theme;
19
- var _a = props.selectProps, resetGrid = _a.resetGrid, onCustomSelectAll = _a.onCustomSelectAll, onCustomDeselectAll = _a.onCustomDeselectAll, value = _a.value, resetGridButton = _a.resetGridButton, selectAllButton = _a.selectAllButton, maxMenuHeight = _a.maxMenuHeight, isLoading = _a.isLoading;
18
+ var _a = props.selectProps, onCustomSelectAll = _a.onCustomSelectAll, onCustomDeselectAll = _a.onCustomDeselectAll, value = _a.value, selectAllButton = _a.selectAllButton, maxMenuHeight = _a.maxMenuHeight, isLoading = _a.isLoading;
20
19
  // because the filterd options (filterd by the search input) are not passed to the menu list (there are all options),
21
20
  // we need to specify them here by children
22
21
  var filteredOptions = useMemo(function () { var _a, _b; return (_b = (_a = props.children) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, function (_a) {
23
22
  var _b = _a.props, value = _b.value, label = _b.label;
24
23
  return ({ label: label, value: value });
25
24
  }); }, [props.children]);
26
- return (_jsxs(selectComponents.MenuList, __assign({}, props, { children: [selectAllButton && !isLoading && (_jsx(SelectAll, { theme: theme, onCustomSelectAll: onCustomSelectAll, onCustomDeselectAll: onCustomDeselectAll, value: value, options: filteredOptions, maxMenuHeight: maxMenuHeight })), props.children, resetGridButton && _jsx(ResetAll, { onReset: resetGrid })] })));
25
+ return (_jsxs(selectComponents.MenuList, __assign({}, props, { children: [selectAllButton && !isLoading && (_jsx(SelectAll, { theme: theme, onCustomSelectAll: onCustomSelectAll, onCustomDeselectAll: onCustomDeselectAll, value: value, options: filteredOptions, maxMenuHeight: maxMenuHeight })), props.children] })));
27
26
  };
28
27
  export default ConnectedMenu;
@@ -1,2 +1,11 @@
1
- declare const CountMultiValue: (props: any) => any;
1
+ import { MultiValueProps } from 'react-select';
2
+
3
+ type CountMultiValueProps = MultiValueProps & {
4
+ data: unknown;
5
+ selectProps: MultiValueProps<unknown, boolean, any>['selectProps'] & {
6
+ shortValues?: boolean;
7
+ shortVariant?: 'block' | 'join';
8
+ };
9
+ };
10
+ declare const CountMultiValue: (props: CountMultiValueProps) => React.ReactNode;
2
11
  export default CountMultiValue;
@@ -17,21 +17,30 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
17
17
  import { components as selectComponents } from 'react-select';
18
18
  import styled, { th } from '@xstyled/styled-components';
19
19
  // MultiValue container with count of selected options
20
- var StyledNumber = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n height: 25px;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: md;\n padding: 2px 6px;\n"], ["\n background: ", ";\n height: 25px;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: md;\n padding: 2px 6px;\n"])), th.color('lightGray7'));
20
+ var StyledNumber = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n height: 25px;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: md;\n padding: 2px 6px;\n"], ["\n background-color: ", ";\n height: 25px;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: md;\n padding: 2px 6px;\n"])), th.color('lightGray7'));
21
+ var JoinedMultiValue = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n white-space: nowrap;\n position: absolute;\n color: gray3;\n padding-left: ", ";\n"], ["\n white-space: nowrap;\n position: absolute;\n color: gray3;\n padding-left: ", ";\n"])), function (_a) {
22
+ var isFocused = _a.isFocused;
23
+ return (isFocused ? '8px' : '0');
24
+ });
21
25
  var CountMultiValue = function (props) {
22
- var _a, _b;
26
+ var _a;
23
27
  var shortValues = props.selectProps.shortValues;
24
28
  var selectVal = props.selectProps.value;
25
29
  var inputVal = props.selectProps.inputValue;
30
+ var shortVariant = props.selectProps.shortVariant;
31
+ var data = props.data;
32
+ var isFirst = (data === null || data === void 0 ? void 0 : data.value) === ((_a = selectVal[0]) === null || _a === void 0 ? void 0 : _a.value);
33
+ var menuIsOpen = props.selectProps.menuIsOpen;
26
34
  if (!shortValues) {
27
35
  return _jsx(selectComponents.MultiValue, __assign({}, props, { children: props.children }));
28
36
  }
29
- if (!inputVal && ((_a = props.data) === null || _a === void 0 ? void 0 : _a.value) == ((_b = selectVal[0]) === null || _b === void 0 ? void 0 : _b.value)) {
30
- return (_jsxs(_Fragment, { children: [_jsx(selectComponents.MultiValue, __assign({}, props, { children: props.children })), selectVal.length > 1 ? _jsxs(StyledNumber, { children: ["+", selectVal.length - 1] }) : null] }));
31
- }
32
- else {
37
+ if (!isFirst || inputVal) {
33
38
  return null;
34
39
  }
40
+ if (shortVariant === 'join') {
41
+ return (_jsxs(JoinedMultiValue, { isFocused: menuIsOpen, children: [selectVal.length > 1 ? "(".concat(Number(selectVal.length), ") ") : '', selectVal.map(function (option) { return option.label; }).join(', ')] }));
42
+ }
43
+ return (_jsxs(_Fragment, { children: [_jsx(selectComponents.MultiValue, __assign({}, props, { children: props.children })), selectVal.length > 1 ? _jsxs(StyledNumber, { children: ["+", selectVal.length - 1] }) : null] }));
35
44
  };
36
45
  export default CountMultiValue;
37
- var templateObject_1;
46
+ var templateObject_1, templateObject_2;
@@ -1,2 +1,7 @@
1
- export declare const DropdownIndicator: (props: any) => any;
1
+ import { DropdownIndicatorProps } from 'react-select';
2
+
3
+ type DropdownIndicatorCustomProps = DropdownIndicatorProps & {
4
+ theme: any;
5
+ };
6
+ export declare const DropdownIndicator: (props: DropdownIndicatorCustomProps) => any;
2
7
  export default DropdownIndicator;
@@ -15,14 +15,15 @@ var __assign = (this && this.__assign) || function () {
15
15
  };
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { components as selectComponents } from 'react-select';
18
- import styled from '@xstyled/styled-components';
19
18
  import { ArrowDown } from '../../Icon/icons/ArrowDown';
20
19
  import { ArrowUp } from '../../Icon/icons/ArrowUp';
20
+ import styled from '@xstyled/styled-components';
21
21
  // Option with chevron form new design
22
22
  var ChevronDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-self: center;\n display: flex;\n"], ["\n align-self: center;\n display: flex;\n"])));
23
23
  export var DropdownIndicator = function (props) {
24
24
  var _a = props.selectProps, menuIsOpen = _a.menuIsOpen, name = _a.name;
25
- return (_jsx(selectComponents.DropdownIndicator, __assign({}, props, { children: _jsx(ChevronDiv, { className: "chevron", "data-cy": "".concat(name, "ChevronBtn"), children: menuIsOpen ? _jsx(ArrowUp, { width: "16px" }) : _jsx(ArrowDown, { width: "16px" }) }) })));
25
+ var iconColor = props.theme.colors.placeholderTextColor;
26
+ return (_jsx(selectComponents.DropdownIndicator, __assign({}, props, { children: _jsx(ChevronDiv, { className: "chevron", "data-cy": "".concat(name || '', "ChevronBtn"), children: menuIsOpen ? _jsx(ArrowUp, { width: "16px", stroke: iconColor }) : _jsx(ArrowDown, { width: "16px", stroke: iconColor }) }) })));
26
27
  };
27
28
  export default DropdownIndicator;
28
29
  var templateObject_1;
@@ -29,7 +29,7 @@ import { components } from 'react-select';
29
29
  import Icon from '../../Icon/Icon';
30
30
  import styled from '@xstyled/styled-components';
31
31
  // Value container with icon
32
- var IconDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: 12px;\n align-self: center;\n & > * {\n color: ", ";\n }\n"], ["\n padding-left: 12px;\n align-self: center;\n & > * {\n color: ", ";\n }\n"])), function (_a) {
32
+ var IconDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: 7px;\n margin-right: -3px;\n align-self: center;\n & > * {\n color: ", ";\n }\n"], ["\n padding-left: 7px;\n margin-right: -3px;\n align-self: center;\n & > * {\n color: ", ";\n }\n"])), function (_a) {
33
33
  var hasValue = _a.hasValue;
34
34
  return (hasValue ? 'black' : '#a3b3c1');
35
35
  });
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SimplifiedOption: import('react').MemoExoticComponent<(props: any) => any>;
2
3
  export default SimplifiedOption;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: FC<import('../types').SelectProps>;
6
+ argTypes: {};
7
+ };
8
+ export default meta;
9
+ export declare const Default: FC;
10
+ export declare const MultiSelect: FC;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Select from '../Select';
3
+ var meta = {
4
+ title: 'Forms/Select',
5
+ component: Select,
6
+ argTypes: {}
7
+ };
8
+ export default meta;
9
+ var options = [
10
+ { value: '1', label: 'Option 1' },
11
+ { value: '2', label: 'Option 2' },
12
+ { value: '3', label: 'Option 3' }
13
+ ];
14
+ export var Default = function () { return (_jsx(Select, { label: "Primary Select", onChange: console.log, options: options })); };
15
+ export var MultiSelect = function () { return (_jsx(Select, { label: "Multi Select Input", onChange: console.log, options: options, isMulti: true, value: ['1', '2'] })); };
@@ -1,4 +1,4 @@
1
1
  import { StylesConfig, SelectComponentsConfig } from 'react-select';
2
2
  import { SelectProps } from '../types';
3
3
 
4
- export declare const useStylesAndComponents: (style?: SelectProps["style"], optionVariant?: SelectProps["optionVariant"], multiLabelVariant?: SelectProps["multiLabelVariant"], containerVariant?: SelectProps["containerVariant"], useSimplifiedOptions?: SelectProps["useSimplifiedOptions"], showSelectAllButton?: SelectProps["showSelectAllButton"], showResetGridButton?: SelectProps["showResetGridButton"]) => [SelectComponentsConfig<unknown, boolean, any>, any, StylesConfig];
4
+ export declare const useStylesAndComponents: (style?: SelectProps['style'], optionVariant?: SelectProps['optionVariant'], multiLabelVariant?: SelectProps['multiLabelVariant'], containerVariant?: SelectProps['containerVariant'], useSimplifiedOptions?: SelectProps['useSimplifiedOptions'], showSelectAllButton?: SelectProps['showSelectAllButton']) => [SelectComponentsConfig<unknown, boolean, any>, any, StylesConfig];
@@ -8,14 +8,13 @@ import IconValueContainer from '../components/IconValueContainer';
8
8
  import SimplifiedOption from '../components/SimplifiedOption';
9
9
  import { useTheme } from '@xstyled/styled-components';
10
10
  import { getCustomTheme as getFormCustomTheme, CustomStyles as SelectCustomStyles } from './selectStyles';
11
- export var useStylesAndComponents = function (style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton, showResetGridButton) {
11
+ export var useStylesAndComponents = function (style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton) {
12
12
  if (style === void 0) { style = 'form'; }
13
13
  if (optionVariant === void 0) { optionVariant = 'default'; }
14
14
  if (multiLabelVariant === void 0) { multiLabelVariant = 'default'; }
15
15
  if (containerVariant === void 0) { containerVariant = 'default'; }
16
16
  if (useSimplifiedOptions === void 0) { useSimplifiedOptions = false; }
17
17
  if (showSelectAllButton === void 0) { showSelectAllButton = false; }
18
- if (showResetGridButton === void 0) { showResetGridButton = false; }
19
18
  var systemTheme = useTheme();
20
19
  return useMemo(function () {
21
20
  var components = {
@@ -28,25 +27,16 @@ export var useStylesAndComponents = function (style, optionVariant, multiLabelVa
28
27
  if (containerVariant === 'search') {
29
28
  components.DropdownIndicator = null;
30
29
  }
31
- if (showResetGridButton || showSelectAllButton) {
30
+ if (showSelectAllButton) {
32
31
  components.MenuList = ConnectedMenu;
33
32
  }
34
33
  components.Input = CustomInput;
35
- var themes = getFormCustomTheme(systemTheme, optionVariant, style == 'gridFilter');
34
+ var themes = getFormCustomTheme(systemTheme, optionVariant, style === 'gridFilter');
36
35
  var styles = SelectCustomStyles;
37
36
  components.Option = ChevronOption;
38
37
  // performance reasons
39
38
  if (useSimplifiedOptions)
40
39
  components.Option = SimplifiedOption;
41
40
  return [components, themes, styles];
42
- }, [
43
- multiLabelVariant,
44
- containerVariant,
45
- showResetGridButton,
46
- showSelectAllButton,
47
- style,
48
- useSimplifiedOptions,
49
- systemTheme,
50
- optionVariant
51
- ]);
41
+ }, [multiLabelVariant, containerVariant, showSelectAllButton, style, useSimplifiedOptions, systemTheme, optionVariant]);
52
42
  };
@@ -2,5 +2,5 @@ import { SelectProps, StylesConfig, CustomTheme } from '../types';
2
2
 
3
3
  export declare const CustomStyles: StylesConfig<State>;
4
4
  type ThemeGetter = (theme: any) => CustomTheme;
5
- export declare const getCustomTheme: (theme: any, optionVariant: Required<SelectProps>["optionVariant"], useFilterSubvariant: boolean) => ThemeGetter;
5
+ export declare const getCustomTheme: (theme: any, optionVariant: Required<SelectProps>['optionVariant'], useFilterSubvariant: boolean) => ThemeGetter;
6
6
  export {};
@@ -16,16 +16,16 @@ export var CustomStyles = {
16
16
  var _b;
17
17
  var selectProps = _a.selectProps, theme = _a.theme, isFocused = _a.isFocused, isDisabled = _a.isDisabled;
18
18
  var colors = theme.colors;
19
- return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid ? colors.primary : isFocused ? colors.inputTextColor : colors.inputBorderColor, backgroundColor: isDisabled ? colors.menuHoverBackgroundColor : colors.whiteBackgroundColor, boxShadow: theme.focusBoxShadow, borderRadius: theme.borderRadius, '& input': {
19
+ return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid ? colors.primary : isFocused ? colors.inputTextColor : colors.inputBorderColor, backgroundColor: isDisabled ? colors.backgroundColorDisabled : colors.backgroundColor, boxShadow: theme.focusBoxShadow, borderRadius: theme.borderRadius, '& input': {
20
20
  fontWeight: theme.textWeightNormal,
21
- fontFamily: theme.font,
21
+ fontFamily: theme.font
22
22
  }, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: colors.inputBorderHoverColor }), fontSize: '14px', minWidth: 'min-content', '.inputIcon': {
23
- color: isDisabled ? colors.defaultControlColor : !!selectProps.value ? colors.inputTextColor : colors.defaultControlColor,
23
+ color: isDisabled ? colors.defaultControlColor : selectProps.value ? colors.inputTextColor : colors.defaultControlColor
24
24
  } });
25
25
  },
26
26
  valueContainer: function (styles, _a) {
27
27
  var theme = _a.theme;
28
- return __assign(__assign({}, styles), { width: '50px', flexWrap: theme.flexWrap });
28
+ return __assign(__assign({}, styles), { width: '50px', paddingLeft: '7px', flexWrap: theme.flexWrap });
29
29
  },
30
30
  singleValue: function (styles, _a) {
31
31
  var selectProps = _a.selectProps, theme = _a.theme, isDisabled = _a.isDisabled;
@@ -37,10 +37,10 @@ export var CustomStyles = {
37
37
  },
38
38
  multiValue: function (styles, state) {
39
39
  var theme = state.theme;
40
- return __assign(__assign({}, styles), { color: theme.colors.inputTextColor, fontWeight: theme.textWeightNormal, backgroundColor: '#E7EBEF', borderRadius: '4px', '& svg': {
41
- color: theme.colors.inputTextColor,
40
+ return __assign(__assign({}, styles), { color: theme.colors.inputTextColor, fontWeight: theme.textWeightNormal, backgroundColor: theme.colors.multiValueBackgroundColor, borderRadius: '4px', '& svg': {
41
+ color: theme.colors.inputTextColor
42
42
  }, ' > div': {
43
- fontSize: '12px',
43
+ fontSize: '12px'
44
44
  } });
45
45
  },
46
46
  multiValueLabel: function (styles) { return (__assign(__assign({}, styles), { fontSize: 'unset', padding: '5px' })); },
@@ -87,64 +87,63 @@ export var CustomStyles = {
87
87
  ? theme.colors.hoverToActiveOptionBackground
88
88
  : !isDisabled
89
89
  ? theme.colors.menuHoverBackgroundColor
90
- : undefined,
91
- },
90
+ : undefined
91
+ }
92
92
  };
93
93
  },
94
94
  menu: function (styles, state) {
95
95
  var theme = state.theme;
96
- return __assign(__assign({}, styles), { boxShadow: '0 2px 20px 0 rgba(0, 0, 0, 0.10);', marginTop: '4px', paddingTop: '0', borderRadius: '10px', zIndex: 3, minWidth: 'max-content', backgroundColor: theme.colors.whiteBackgroundColor });
96
+ return __assign(__assign({}, styles), { boxShadow: '0 2px 20px 0 rgba(0, 0, 0, 0.10);', marginTop: '4px', paddingTop: '0', borderRadius: '10px', zIndex: 3, minWidth: 'max-content', color: theme.colors.textPrimary, backgroundColor: theme.colors.menuBackgroundColor });
97
97
  },
98
98
  menuList: function (styles, _a) {
99
99
  var theme = _a.theme;
100
- return __assign(__assign({}, styles), { margin: '8px 4px 8px 8px', '::-webkit-scrollbar-thumb': {
100
+ return __assign(__assign({}, styles), { margin: '8px 4px 8px 8px', color: theme.colors.textPrimary, '::-webkit-scrollbar-thumb': {
101
101
  border: 'none',
102
102
  borderRadius: '4px',
103
103
  height: '47px',
104
104
  backgroundColor: theme.colors.defaultControlColor,
105
105
  '&:hover': {
106
- backgroundColor: theme.colors.dropdownIndicatorColor,
107
- },
106
+ backgroundColor: theme.colors.dropdownIndicatorColor
107
+ }
108
108
  }, '::-webkit-scrollbar': {
109
- width: '10px',
109
+ width: '10px'
110
110
  }, '::-webkit-scrollbar-track': {
111
111
  backgroundColor: theme.colors.menuHoverBackgroundColor,
112
- borderRadius: '6px',
112
+ borderRadius: '6px'
113
113
  } });
114
114
  },
115
- dropdownIndicator: function (styles, state) {
116
- var theme = state.theme, isDisabled = state.isDisabled;
117
- return __assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', '& svg': {
118
- stroke: isDisabled ? theme.colors.dropdownIndicatorColor : theme.colors.inputTextColor,
119
- }, padding: '0px 5px 0px 0px', '@media (min-width: 1024px)': {
120
- padding: '0px 10px 0px 1px',
121
- } });
115
+ dropdownIndicator: function (styles) {
116
+ return __assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0px 7px 0px 0px' });
122
117
  },
123
118
  clearIndicator: function (styles, state) {
124
- var theme = state.theme;
125
- return __assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: theme.narrowIndicators ? '0px 4px 0px 0px' : '0px 4px', color: theme.colors.dropdownIndicatorColor });
119
+ var theme = state.theme, selectProps = state.selectProps;
120
+ return __assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: theme.narrowIndicators && selectProps.containerVariant !== 'search' ? '0px' : '0px 4px', color: theme.colors.clearIndicatorColor, cursor: 'pointer' });
126
121
  },
127
122
  indicatorSeparator: function () { return ({
128
- display: 'none',
123
+ display: 'none'
129
124
  }); }
130
125
  };
131
126
  export var getCustomTheme = function (theme, optionVariant, useFilterSubvariant) {
132
- var inputTextColor = th.color('blue2')({ theme: theme });
133
127
  var customColors = {
128
+ textPrimary: th.color('textPrimary')({ theme: theme }),
134
129
  primary: th.color('red1')({ theme: theme }),
135
- inputTextColor: inputTextColor,
136
- whiteBackgroundColor: th.color('white')({ theme: theme }),
130
+ inputTextColor: th.color('blue1')({ theme: theme }),
131
+ backgroundColor: th.color('white')({ theme: theme }),
132
+ backgroundColorDisabled: th.color('neutral20')({ theme: theme }),
133
+ multiValueBackgroundColor: th.color('lightGray7')({ theme: theme }),
134
+ menuBackgroundColor: th.color('white')({ theme: theme }),
137
135
  optionTextColor: th.color('blue2')({ theme: theme }),
138
- menuHoverBackgroundColor: th.color('bgLightGray1')({ theme: theme }),
136
+ menuHoverBackgroundColor: th.color('neutral20')({ theme: theme }),
139
137
  inputDisabledColor: th.color('lightGray1')({ theme: theme }),
140
138
  inputBorderColor: th.color('lightGray3')({ theme: theme }),
141
139
  placeholderTextColor: th.color('lightGray3')({ theme: theme }),
140
+ clearIndicatorColor: th.color('lightGray4')({ theme: theme }),
142
141
  defaultControlColor: th.color('lightGray5')({ theme: theme }),
143
142
  disabledTextColor: th.color('lightGray6')({ theme: theme }),
144
143
  dropdownIndicatorColor: th.color('gray1')({ theme: theme }),
145
144
  inputBorderHoverColor: th.color('gray5')({ theme: theme }),
146
145
  activeOptionBackground: th.color('red20')({ theme: theme }),
147
- hoverToActiveOptionBackground: th.color('red30')({ theme: theme }),
146
+ hoverToActiveOptionBackground: th.color('red30')({ theme: theme })
148
147
  };
149
148
  return function (reactSelectTheme) {
150
149
  return __assign(__assign({}, reactSelectTheme), { colors: customColors, focusBoxShadow: null, height: '38px', flexWrap: useFilterSubvariant ? 'nowrap' : 'wrap', textWeightNormal: th.fontWeight('normal')({ theme: theme }), optionVariant: optionVariant, borderRadius: th.radius('lg')({ theme: theme }), font: th.font('primary')({ theme: theme }), narrowIndicators: !!useFilterSubvariant });