@dhis2-ui/select 8.1.11 → 8.2.2

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 (71) hide show
  1. package/build/cjs/multi-select/features/menu_width_matches_input/index.js +4 -2
  2. package/build/cjs/multi-select/features/position/index.js +12 -6
  3. package/build/cjs/multi-select/filterable-menu.js +25 -22
  4. package/build/cjs/multi-select/input.js +19 -18
  5. package/build/cjs/multi-select/menu.js +29 -25
  6. package/build/cjs/multi-select/multi-select.js +31 -30
  7. package/build/cjs/multi-select/multi-select.stories.e2e.js +30 -20
  8. package/build/cjs/multi-select/multi-select.stories.js +14 -23
  9. package/build/cjs/multi-select/selection-list.js +43 -37
  10. package/build/cjs/multi-select-field/multi-select-field.stories.js +5 -15
  11. package/build/cjs/multi-select-option/multi-select-option.js +31 -28
  12. package/build/cjs/select/debounce/debounce.js +8 -2
  13. package/build/cjs/select/empty.js +14 -11
  14. package/build/cjs/select/filter-input.js +24 -21
  15. package/build/cjs/select/filterable-menu.js +8 -7
  16. package/build/cjs/select/index.js +24 -24
  17. package/build/cjs/select/input-clear-button.js +16 -13
  18. package/build/cjs/select/input-placeholder.js +8 -6
  19. package/build/cjs/select/input-prefix.js +8 -6
  20. package/build/cjs/select/input-wrapper.js +15 -14
  21. package/build/cjs/select/loading.js +18 -15
  22. package/build/cjs/select/menu-wrapper.js +11 -10
  23. package/build/cjs/select/no-match.js +12 -9
  24. package/build/cjs/select/option-helpers.js +1 -1
  25. package/build/cjs/select/select.js +6 -6
  26. package/build/cjs/single-select/features/menu_width_matches_input/index.js +4 -2
  27. package/build/cjs/single-select/features/position/index.js +8 -4
  28. package/build/cjs/single-select/filterable-menu.js +25 -22
  29. package/build/cjs/single-select/input.js +19 -18
  30. package/build/cjs/single-select/menu.js +11 -10
  31. package/build/cjs/single-select/selection.js +8 -7
  32. package/build/cjs/single-select/single-select.js +31 -30
  33. package/build/cjs/single-select/single-select.stories.e2e.js +26 -17
  34. package/build/cjs/single-select/single-select.stories.js +14 -21
  35. package/build/cjs/single-select-field/single-select-field.stories.js +5 -15
  36. package/build/cjs/single-select-option/single-select-option.js +23 -20
  37. package/build/es/multi-select/features/menu_width_matches_input/index.js +4 -2
  38. package/build/es/multi-select/features/position/index.js +12 -6
  39. package/build/es/multi-select/filterable-menu.js +25 -22
  40. package/build/es/multi-select/input.js +19 -18
  41. package/build/es/multi-select/menu.js +28 -24
  42. package/build/es/multi-select/multi-select.js +31 -30
  43. package/build/es/multi-select/multi-select.stories.e2e.js +30 -20
  44. package/build/es/multi-select/multi-select.stories.js +13 -22
  45. package/build/es/multi-select/selection-list.js +43 -37
  46. package/build/es/multi-select-field/multi-select-field.stories.js +4 -14
  47. package/build/es/multi-select-option/multi-select-option.js +31 -28
  48. package/build/es/select/debounce/debounce.js +8 -2
  49. package/build/es/select/empty.js +14 -11
  50. package/build/es/select/filter-input.js +24 -21
  51. package/build/es/select/filterable-menu.js +8 -7
  52. package/build/es/select/input-clear-button.js +16 -13
  53. package/build/es/select/input-placeholder.js +8 -6
  54. package/build/es/select/input-prefix.js +8 -6
  55. package/build/es/select/input-wrapper.js +15 -14
  56. package/build/es/select/loading.js +18 -15
  57. package/build/es/select/menu-wrapper.js +11 -10
  58. package/build/es/select/no-match.js +12 -9
  59. package/build/es/select/select.js +6 -6
  60. package/build/es/single-select/features/menu_width_matches_input/index.js +4 -2
  61. package/build/es/single-select/features/position/index.js +8 -4
  62. package/build/es/single-select/filterable-menu.js +25 -22
  63. package/build/es/single-select/input.js +19 -18
  64. package/build/es/single-select/menu.js +11 -10
  65. package/build/es/single-select/selection.js +8 -7
  66. package/build/es/single-select/single-select.js +31 -30
  67. package/build/es/single-select/single-select.stories.e2e.js +26 -17
  68. package/build/es/single-select/single-select.stories.js +13 -20
  69. package/build/es/single-select-field/single-select-field.stories.js +4 -14
  70. package/build/es/single-select-option/single-select-option.js +23 -20
  71. package/package.json +14 -14
@@ -26,37 +26,40 @@ const {
26
26
  } = {
27
27
  styles: /*#__PURE__*/_react.default.createElement(_style.default, {
28
28
  id: "2013783366"
29
- }, [`.jsx-2013783366{padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp12};}`]),
29
+ }, [".jsx-2013783366{padding:".concat(_uiConstants.spacers.dp8, " ").concat(_uiConstants.spacers.dp12, ";}")]),
30
30
  className: "jsx-2013783366"
31
31
  };
32
32
 
33
- const MultiSelectOption = ({
34
- label,
35
- active,
36
- disabled,
37
- onClick,
38
- className,
39
- dataTest,
40
- value
41
- }) => /*#__PURE__*/_react.default.createElement("div", {
42
- "data-test": dataTest,
43
- "data-value": value,
44
- "data-label": label,
45
- className: _style.default.dynamic([["3813980210", [_uiConstants.colors.grey200]]]) + " " + ((0, _classnames.default)(className, {
46
- disabled
47
- }) || "")
48
- }, /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, {
49
- name: label,
50
- className: checkboxClassname,
51
- checked: active,
52
- label: label,
53
- onChange: onClick,
54
- disabled: disabled,
55
- dense: true
56
- }), styles, /*#__PURE__*/_react.default.createElement(_style.default, {
57
- id: "3813980210",
58
- dynamic: [_uiConstants.colors.grey200]
59
- }, [`div.__jsx-style-dynamic-selector:hover{background-color:${_uiConstants.colors.grey200};}`, "div.disabled.__jsx-style-dynamic-selector:hover{background-color:initial;}"]));
33
+ const MultiSelectOption = _ref => {
34
+ let {
35
+ label,
36
+ active,
37
+ disabled,
38
+ onClick,
39
+ className,
40
+ dataTest,
41
+ value
42
+ } = _ref;
43
+ return /*#__PURE__*/_react.default.createElement("div", {
44
+ "data-test": dataTest,
45
+ "data-value": value,
46
+ "data-label": label,
47
+ className: _style.default.dynamic([["3813980210", [_uiConstants.colors.grey200]]]) + " " + ((0, _classnames.default)(className, {
48
+ disabled
49
+ }) || "")
50
+ }, /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, {
51
+ name: label,
52
+ className: checkboxClassname,
53
+ checked: active,
54
+ label: label,
55
+ onChange: onClick,
56
+ disabled: disabled,
57
+ dense: true
58
+ }), styles, /*#__PURE__*/_react.default.createElement(_style.default, {
59
+ id: "3813980210",
60
+ dynamic: [_uiConstants.colors.grey200]
61
+ }, ["div.__jsx-style-dynamic-selector:hover{background-color:".concat(_uiConstants.colors.grey200, ";}"), "div.disabled.__jsx-style-dynamic-selector:hover{background-color:initial;}"]));
62
+ };
60
63
 
61
64
  exports.MultiSelectOption = MultiSelectOption;
62
65
  MultiSelectOption.defaultProps = {
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.debounce = void 0;
7
7
 
8
+ var _this = void 0;
9
+
8
10
  /**
9
11
  * Returns a function, that, as long as it continues to be invoked, will not be triggered. The
10
12
  * function will be called after it stops being called for N milliseconds. If `immediate` is
@@ -12,8 +14,12 @@ exports.debounce = void 0;
12
14
  */
13
15
  const debounce = (func, wait, immediate) => {
14
16
  let timeout;
15
- return (...args) => {
16
- const context = void 0;
17
+ return function () {
18
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19
+ args[_key] = arguments[_key];
20
+ }
21
+
22
+ const context = _this;
17
23
 
18
24
  const later = () => {
19
25
  timeout = null;
@@ -15,17 +15,20 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const Empty = ({
19
- message,
20
- className,
21
- dataTest
22
- }) => /*#__PURE__*/_react.default.createElement("div", {
23
- "data-test": dataTest,
24
- className: _style.default.dynamic([["849993029", [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]]) + " " + (className || "")
25
- }, message, /*#__PURE__*/_react.default.createElement(_style.default, {
26
- id: "849993029",
27
- dynamic: [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]
28
- }, [`div.__jsx-style-dynamic-selector{color:${_uiConstants.colors.grey700};font-family:${_uiConstants.theme.fonts};font-size:13px;line-height:16px;padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp24};text-align:center;}`]));
18
+ const Empty = _ref => {
19
+ let {
20
+ message,
21
+ className,
22
+ dataTest
23
+ } = _ref;
24
+ return /*#__PURE__*/_react.default.createElement("div", {
25
+ "data-test": dataTest,
26
+ className: _style.default.dynamic([["849993029", [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]]) + " " + (className || "")
27
+ }, message, /*#__PURE__*/_react.default.createElement(_style.default, {
28
+ id: "849993029",
29
+ dynamic: [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]
30
+ }, ["div.__jsx-style-dynamic-selector{color:".concat(_uiConstants.colors.grey700, ";font-family:").concat(_uiConstants.theme.fonts, ";font-size:13px;line-height:16px;padding:").concat(_uiConstants.spacers.dp8, " ").concat(_uiConstants.spacers.dp24, ";text-align:center;}")]));
31
+ };
29
32
 
30
33
  exports.Empty = Empty;
31
34
  Empty.propTypes = {
@@ -17,27 +17,30 @@ var _react = _interopRequireDefault(require("react"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- const FilterInput = ({
21
- value,
22
- onChange,
23
- placeholder,
24
- className,
25
- dataTest
26
- }) => /*#__PURE__*/_react.default.createElement("div", {
27
- className: _style.default.dynamic([["1544004171", [_uiConstants.colors.white, _uiConstants.spacers.dp8, _uiConstants.spacers.dp8, _uiConstants.spacers.dp4, _uiConstants.spacers.dp8]]]) + " " + (className || "")
28
- }, /*#__PURE__*/_react.default.createElement(_input.Input, {
29
- dense: true,
30
- dataTest: dataTest,
31
- value: value,
32
- onChange: onChange,
33
- type: "text",
34
- name: "filter",
35
- placeholder: placeholder,
36
- initialFocus: true
37
- }), /*#__PURE__*/_react.default.createElement(_style.default, {
38
- id: "1544004171",
39
- dynamic: [_uiConstants.colors.white, _uiConstants.spacers.dp8, _uiConstants.spacers.dp8, _uiConstants.spacers.dp4, _uiConstants.spacers.dp8]
40
- }, [`div.__jsx-style-dynamic-selector{position:-webkit-sticky;position:sticky;top:0;background:${_uiConstants.colors.white};padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp4} ${_uiConstants.spacers.dp8};z-index:1;}`]));
20
+ const FilterInput = _ref => {
21
+ let {
22
+ value,
23
+ onChange,
24
+ placeholder,
25
+ className,
26
+ dataTest
27
+ } = _ref;
28
+ return /*#__PURE__*/_react.default.createElement("div", {
29
+ className: _style.default.dynamic([["1544004171", [_uiConstants.colors.white, _uiConstants.spacers.dp8, _uiConstants.spacers.dp8, _uiConstants.spacers.dp4, _uiConstants.spacers.dp8]]]) + " " + (className || "")
30
+ }, /*#__PURE__*/_react.default.createElement(_input.Input, {
31
+ dense: true,
32
+ dataTest: dataTest,
33
+ value: value,
34
+ onChange: onChange,
35
+ type: "text",
36
+ name: "filter",
37
+ placeholder: placeholder,
38
+ initialFocus: true
39
+ }), /*#__PURE__*/_react.default.createElement(_style.default, {
40
+ id: "1544004171",
41
+ dynamic: [_uiConstants.colors.white, _uiConstants.spacers.dp8, _uiConstants.spacers.dp8, _uiConstants.spacers.dp4, _uiConstants.spacers.dp8]
42
+ }, ["div.__jsx-style-dynamic-selector{position:-webkit-sticky;position:sticky;top:0;background:".concat(_uiConstants.colors.white, ";padding:").concat(_uiConstants.spacers.dp8, " ").concat(_uiConstants.spacers.dp8, " ").concat(_uiConstants.spacers.dp4, " ").concat(_uiConstants.spacers.dp8, ";z-index:1;}")]));
43
+ };
41
44
 
42
45
  exports.FilterInput = FilterInput;
43
46
  FilterInput.propTypes = {
@@ -26,16 +26,17 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
26
26
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
27
 
28
28
  class FilterableMenu extends _react.Component {
29
- constructor(...args) {
30
- super(...args);
29
+ constructor() {
30
+ super(...arguments);
31
31
 
32
32
  _defineProperty(this, "state", {
33
33
  filter: ''
34
34
  });
35
35
 
36
- _defineProperty(this, "onFilterChange", ({
37
- value
38
- }) => {
36
+ _defineProperty(this, "onFilterChange", _ref => {
37
+ let {
38
+ value
39
+ } = _ref;
39
40
  this.setState({
40
41
  filter: value
41
42
  });
@@ -70,7 +71,7 @@ class FilterableMenu extends _react.Component {
70
71
 
71
72
  if (_react.default.Children.count(renderedOptions) === 0 || !filter) {
72
73
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_filterInput.FilterInput, {
73
- dataTest: `${dataTest}-filterinput`,
74
+ dataTest: "".concat(dataTest, "-filterinput"),
74
75
  placeholder: placeholder,
75
76
  value: filter,
76
77
  onChange: this.onFilterChange
@@ -96,7 +97,7 @@ class FilterableMenu extends _react.Component {
96
97
 
97
98
  const hasMatch = _react.default.Children.count(filtered) > 0;
98
99
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_filterInput.FilterInput, {
99
- dataTest: `${dataTest}-filterinput`,
100
+ dataTest: "".concat(dataTest, "-filterinput"),
100
101
  placeholder: placeholder,
101
102
  value: filter,
102
103
  onChange: this.onFilterChange
@@ -3,76 +3,76 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "Select", {
6
+ Object.defineProperty(exports, "Empty", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _select.Select;
9
+ return _empty.Empty;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "Loading", {
12
+ Object.defineProperty(exports, "FilterableMenu", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _loading.Loading;
15
+ return _filterableMenu.FilterableMenu;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "FilterableMenu", {
18
+ Object.defineProperty(exports, "InputClearButton", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _filterableMenu.FilterableMenu;
21
+ return _inputClearButton.InputClearButton;
22
22
  }
23
23
  });
24
- Object.defineProperty(exports, "Empty", {
24
+ Object.defineProperty(exports, "InputPlaceholder", {
25
25
  enumerable: true,
26
26
  get: function () {
27
- return _empty.Empty;
27
+ return _inputPlaceholder.InputPlaceholder;
28
28
  }
29
29
  });
30
- Object.defineProperty(exports, "checkIfValidOption", {
30
+ Object.defineProperty(exports, "InputPrefix", {
31
31
  enumerable: true,
32
32
  get: function () {
33
- return _optionHelpers.checkIfValidOption;
33
+ return _inputPrefix.InputPrefix;
34
34
  }
35
35
  });
36
- Object.defineProperty(exports, "filterIgnored", {
36
+ Object.defineProperty(exports, "Loading", {
37
37
  enumerable: true,
38
38
  get: function () {
39
- return _optionHelpers.filterIgnored;
39
+ return _loading.Loading;
40
40
  }
41
41
  });
42
- Object.defineProperty(exports, "findOptionChild", {
42
+ Object.defineProperty(exports, "Select", {
43
43
  enumerable: true,
44
44
  get: function () {
45
- return _optionHelpers.findOptionChild;
45
+ return _select.Select;
46
46
  }
47
47
  });
48
- Object.defineProperty(exports, "findOption", {
48
+ Object.defineProperty(exports, "checkIfValidOption", {
49
49
  enumerable: true,
50
50
  get: function () {
51
- return _optionHelpers.findOption;
51
+ return _optionHelpers.checkIfValidOption;
52
52
  }
53
53
  });
54
- Object.defineProperty(exports, "removeOption", {
54
+ Object.defineProperty(exports, "filterIgnored", {
55
55
  enumerable: true,
56
56
  get: function () {
57
- return _optionHelpers.removeOption;
57
+ return _optionHelpers.filterIgnored;
58
58
  }
59
59
  });
60
- Object.defineProperty(exports, "InputClearButton", {
60
+ Object.defineProperty(exports, "findOption", {
61
61
  enumerable: true,
62
62
  get: function () {
63
- return _inputClearButton.InputClearButton;
63
+ return _optionHelpers.findOption;
64
64
  }
65
65
  });
66
- Object.defineProperty(exports, "InputPlaceholder", {
66
+ Object.defineProperty(exports, "findOptionChild", {
67
67
  enumerable: true,
68
68
  get: function () {
69
- return _inputPlaceholder.InputPlaceholder;
69
+ return _optionHelpers.findOptionChild;
70
70
  }
71
71
  });
72
- Object.defineProperty(exports, "InputPrefix", {
72
+ Object.defineProperty(exports, "removeOption", {
73
73
  enumerable: true,
74
74
  get: function () {
75
- return _inputPrefix.InputPrefix;
75
+ return _optionHelpers.removeOption;
76
76
  }
77
77
  });
78
78
 
@@ -13,19 +13,22 @@ var _react = _interopRequireDefault(require("react"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- const InputClearButton = ({
17
- onClear,
18
- clearText,
19
- className,
20
- dataTest
21
- }) => /*#__PURE__*/_react.default.createElement(_button.Button, {
22
- small: true,
23
- secondary: true,
24
- dataTest: dataTest,
25
- onClick: onClear,
26
- type: "button",
27
- className: className
28
- }, clearText);
16
+ const InputClearButton = _ref => {
17
+ let {
18
+ onClear,
19
+ clearText,
20
+ className,
21
+ dataTest
22
+ } = _ref;
23
+ return /*#__PURE__*/_react.default.createElement(_button.Button, {
24
+ small: true,
25
+ secondary: true,
26
+ dataTest: dataTest,
27
+ onClick: onClear,
28
+ type: "button",
29
+ className: className
30
+ }, clearText);
31
+ };
29
32
 
30
33
  exports.InputClearButton = InputClearButton;
31
34
  InputClearButton.propTypes = {
@@ -15,11 +15,13 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const InputPlaceholder = ({
19
- placeholder,
20
- className,
21
- dataTest
22
- }) => {
18
+ const InputPlaceholder = _ref => {
19
+ let {
20
+ placeholder,
21
+ className,
22
+ dataTest
23
+ } = _ref;
24
+
23
25
  if (!placeholder) {
24
26
  return null;
25
27
  }
@@ -30,7 +32,7 @@ const InputPlaceholder = ({
30
32
  }, placeholder, /*#__PURE__*/_react.default.createElement(_style.default, {
31
33
  id: "1027033961",
32
34
  dynamic: [_uiConstants.colors.grey600]
33
- }, [`div.__jsx-style-dynamic-selector{color:${_uiConstants.colors.grey600};-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}`]));
35
+ }, ["div.__jsx-style-dynamic-selector{color:".concat(_uiConstants.colors.grey600, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")]));
34
36
  };
35
37
 
36
38
  exports.InputPlaceholder = InputPlaceholder;
@@ -15,11 +15,13 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const InputPrefix = ({
19
- prefix,
20
- className,
21
- dataTest
22
- }) => {
18
+ const InputPrefix = _ref => {
19
+ let {
20
+ prefix,
21
+ className,
22
+ dataTest
23
+ } = _ref;
24
+
23
25
  if (!prefix) {
24
26
  return null;
25
27
  }
@@ -30,7 +32,7 @@ const InputPrefix = ({
30
32
  }, prefix, /*#__PURE__*/_react.default.createElement(_style.default, {
31
33
  id: "153011991",
32
34
  dynamic: [_uiConstants.colors.grey600, _uiConstants.spacers.dp4]
33
- }, [`div.__jsx-style-dynamic-selector{color:${_uiConstants.colors.grey600};padding-right:${_uiConstants.spacers.dp4};font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}`]));
35
+ }, ["div.__jsx-style-dynamic-selector{color:".concat(_uiConstants.colors.grey600, ";padding-right:").concat(_uiConstants.spacers.dp4, ";font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")]));
34
36
  };
35
37
 
36
38
  exports.InputPrefix = InputPrefix;
@@ -19,19 +19,20 @@ var _react = _interopRequireDefault(require("react"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const InputWrapper = ({
23
- dataTest,
24
- onToggle,
25
- children,
26
- tabIndex,
27
- error,
28
- warning,
29
- valid,
30
- disabled,
31
- dense,
32
- className,
33
- inputRef
34
- }) => {
22
+ const InputWrapper = _ref => {
23
+ let {
24
+ dataTest,
25
+ onToggle,
26
+ children,
27
+ tabIndex,
28
+ error,
29
+ warning,
30
+ valid,
31
+ disabled,
32
+ dense,
33
+ className,
34
+ inputRef
35
+ } = _ref;
35
36
  const classNames = (0, _classnames.default)(className, 'root', {
36
37
  error,
37
38
  warning,
@@ -52,7 +53,7 @@ const InputWrapper = ({
52
53
  }, /*#__PURE__*/_react.default.createElement(_uiIcons.IconChevronDown16, null)), /*#__PURE__*/_react.default.createElement(_style.default, {
53
54
  id: "248041060",
54
55
  dynamic: [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]
55
- }, [`.root.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;border-radius:3px;border:1px solid ${_uiConstants.colors.grey500};box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:40px;padding:6px 12px;box-shadow:inset 0 1px 2px 0 rgba(48,54,60,0.1);}`, `.root.__jsx-style-dynamic-selector:not(.disabled):focus,.root.__jsx-style-dynamic-selector:not(.disabled):active{outline:none;box-shadow:inset 0 0 0 2px ${_uiConstants.theme.focus};border-color:${_uiConstants.theme.focus};}`, `.root.valid.__jsx-style-dynamic-selector{border-color:${_uiConstants.theme.valid};}`, `.root.warning.__jsx-style-dynamic-selector{border-color:${_uiConstants.theme.warning};}`, `.root.error.__jsx-style-dynamic-selector{border-color:${_uiConstants.theme.error};}`, `.root.disabled.__jsx-style-dynamic-selector{background-color:${_uiConstants.colors.grey100};border-color:${_uiConstants.colors.grey500};color:${_uiConstants.theme.disabled};cursor:not-allowed;}`, ".root.dense.__jsx-style-dynamic-selector{padding:4px 8px;min-height:32px;}", ".root-children.__jsx-style-dynamic-selector{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".root-right.__jsx-style-dynamic-selector{margin:4px 0px 0px 8px;}"]));
56
+ }, [".root.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;border-radius:3px;border:1px solid ".concat(_uiConstants.colors.grey500, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:40px;padding:6px 12px;box-shadow:inset 0 1px 2px 0 rgba(48,54,60,0.1);}"), ".root.__jsx-style-dynamic-selector:not(.disabled):focus,.root.__jsx-style-dynamic-selector:not(.disabled):active{outline:none;box-shadow:inset 0 0 0 2px ".concat(_uiConstants.theme.focus, ";border-color:").concat(_uiConstants.theme.focus, ";}"), ".root.valid.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.valid, ";}"), ".root.warning.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.warning, ";}"), ".root.error.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.error, ";}"), ".root.disabled.__jsx-style-dynamic-selector{background-color:".concat(_uiConstants.colors.grey100, ";border-color:").concat(_uiConstants.colors.grey500, ";color:").concat(_uiConstants.theme.disabled, ";cursor:not-allowed;}"), ".root.dense.__jsx-style-dynamic-selector{padding:4px 8px;min-height:32px;}", ".root-children.__jsx-style-dynamic-selector{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".root-right.__jsx-style-dynamic-selector{margin:4px 0px 0px 8px;}"]));
56
57
  };
57
58
 
58
59
  exports.InputWrapper = InputWrapper;
@@ -19,21 +19,24 @@ var _react = _interopRequireDefault(require("react"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const Loading = ({
23
- message,
24
- className,
25
- dataTest
26
- }) => /*#__PURE__*/_react.default.createElement("div", {
27
- "data-test": dataTest,
28
- className: _style.default.dynamic([["1068210086", [_uiConstants.spacers.dp16, _uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]]) + " " + ((0, _classnames.default)(className, 'container') || "")
29
- }, /*#__PURE__*/_react.default.createElement("div", {
30
- className: _style.default.dynamic([["1068210086", [_uiConstants.spacers.dp16, _uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]])
31
- }, /*#__PURE__*/_react.default.createElement(_loader.CircularLoader, {
32
- small: true
33
- })), message, /*#__PURE__*/_react.default.createElement(_style.default, {
34
- id: "1068210086",
35
- dynamic: [_uiConstants.spacers.dp16, _uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]
36
- }, [`.container.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:${_uiConstants.spacers.dp16};-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:${_uiConstants.colors.grey700};font-family:${_uiConstants.theme.fonts};font-size:13px;padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp24};}`]));
22
+ const Loading = _ref => {
23
+ let {
24
+ message,
25
+ className,
26
+ dataTest
27
+ } = _ref;
28
+ return /*#__PURE__*/_react.default.createElement("div", {
29
+ "data-test": dataTest,
30
+ className: _style.default.dynamic([["1068210086", [_uiConstants.spacers.dp16, _uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]]) + " " + ((0, _classnames.default)(className, 'container') || "")
31
+ }, /*#__PURE__*/_react.default.createElement("div", {
32
+ className: _style.default.dynamic([["1068210086", [_uiConstants.spacers.dp16, _uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]])
33
+ }, /*#__PURE__*/_react.default.createElement(_loader.CircularLoader, {
34
+ small: true
35
+ })), message, /*#__PURE__*/_react.default.createElement(_style.default, {
36
+ id: "1068210086",
37
+ dynamic: [_uiConstants.spacers.dp16, _uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]
38
+ }, [".container.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(_uiConstants.spacers.dp16, ";-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:").concat(_uiConstants.colors.grey700, ";font-family:").concat(_uiConstants.theme.fonts, ";font-size:13px;padding:").concat(_uiConstants.spacers.dp8, " ").concat(_uiConstants.spacers.dp24, ";}")]));
39
+ };
37
40
 
38
41
  exports.Loading = Loading;
39
42
  Loading.propTypes = {
@@ -19,14 +19,15 @@ var _react = _interopRequireDefault(require("react"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const MenuWrapper = ({
23
- children,
24
- dataTest,
25
- maxHeight,
26
- menuWidth,
27
- onClick,
28
- selectRef
29
- }) => {
22
+ const MenuWrapper = _ref => {
23
+ let {
24
+ children,
25
+ dataTest,
26
+ maxHeight,
27
+ menuWidth,
28
+ onClick,
29
+ selectRef
30
+ } = _ref;
30
31
  return /*#__PURE__*/_react.default.createElement(_layer.Layer, {
31
32
  onClick: onClick,
32
33
  transparent: true
@@ -35,12 +36,12 @@ const MenuWrapper = ({
35
36
  placement: "bottom-start",
36
37
  observeReferenceResize: true
37
38
  }, /*#__PURE__*/_react.default.createElement("div", {
38
- "data-test": `${dataTest}-menuwrapper`,
39
+ "data-test": "".concat(dataTest, "-menuwrapper"),
39
40
  className: _style.default.dynamic([["1363246346", [menuWidth, maxHeight, _uiConstants.colors.white, _uiConstants.colors.grey200, _uiConstants.elevations.e300]]])
40
41
  }, children, /*#__PURE__*/_react.default.createElement(_style.default, {
41
42
  id: "1363246346",
42
43
  dynamic: [menuWidth, maxHeight, _uiConstants.colors.white, _uiConstants.colors.grey200, _uiConstants.elevations.e300]
43
- }, [`div.__jsx-style-dynamic-selector{width:${menuWidth};height:auto;max-height:${maxHeight};overflow:auto;background:${_uiConstants.colors.white};border:1px solid ${_uiConstants.colors.grey200};border-radius:3px;box-shadow:${_uiConstants.elevations.e300};}`]))));
44
+ }, ["div.__jsx-style-dynamic-selector{width:".concat(menuWidth, ";height:auto;max-height:").concat(maxHeight, ";overflow:auto;background:").concat(_uiConstants.colors.white, ";border:1px solid ").concat(_uiConstants.colors.grey200, ";border-radius:3px;box-shadow:").concat(_uiConstants.elevations.e300, ";}")]))));
44
45
  };
45
46
 
46
47
  exports.MenuWrapper = MenuWrapper;
@@ -15,15 +15,18 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const NoMatch = ({
19
- message,
20
- className
21
- }) => /*#__PURE__*/_react.default.createElement("div", {
22
- className: _style.default.dynamic([["849993029", [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]]) + " " + (className || "")
23
- }, message, /*#__PURE__*/_react.default.createElement(_style.default, {
24
- id: "849993029",
25
- dynamic: [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]
26
- }, [`div.__jsx-style-dynamic-selector{color:${_uiConstants.colors.grey700};font-family:${_uiConstants.theme.fonts};font-size:13px;line-height:16px;padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp24};text-align:center;}`]));
18
+ const NoMatch = _ref => {
19
+ let {
20
+ message,
21
+ className
22
+ } = _ref;
23
+ return /*#__PURE__*/_react.default.createElement("div", {
24
+ className: _style.default.dynamic([["849993029", [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]]]) + " " + (className || "")
25
+ }, message, /*#__PURE__*/_react.default.createElement(_style.default, {
26
+ id: "849993029",
27
+ dynamic: [_uiConstants.colors.grey700, _uiConstants.theme.fonts, _uiConstants.spacers.dp8, _uiConstants.spacers.dp24]
28
+ }, ["div.__jsx-style-dynamic-selector{color:".concat(_uiConstants.colors.grey700, ";font-family:").concat(_uiConstants.theme.fonts, ";font-size:13px;line-height:16px;padding:").concat(_uiConstants.spacers.dp8, " ").concat(_uiConstants.spacers.dp24, ";text-align:center;}")]));
29
+ };
27
30
 
28
31
  exports.NoMatch = NoMatch;
29
32
  NoMatch.propTypes = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.removeOption = exports.findOption = exports.findOptionChild = exports.filterIgnored = exports.checkIfValidOption = void 0;
6
+ exports.removeOption = exports.findOptionChild = exports.findOption = exports.filterIgnored = exports.checkIfValidOption = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -32,8 +32,8 @@ const UP_KEY = 38;
32
32
  const DOWN_KEY = 40;
33
33
 
34
34
  class Select extends _react.Component {
35
- constructor(...args) {
36
- super(...args);
35
+ constructor() {
36
+ super(...arguments);
37
37
 
38
38
  _defineProperty(this, "state", {
39
39
  open: false,
@@ -174,8 +174,8 @@ class Select extends _react.Component {
174
174
  menuWidth
175
175
  } = this.state;
176
176
 
177
- if (offsetWidth && `${offsetWidth}px` !== menuWidth) {
178
- return `${offsetWidth}px`;
177
+ if (offsetWidth && "".concat(offsetWidth, "px") !== menuWidth) {
178
+ return "".concat(offsetWidth, "px");
179
179
  }
180
180
 
181
181
  return menuWidth;
@@ -236,13 +236,13 @@ class Select extends _react.Component {
236
236
  valid: valid,
237
237
  disabled: disabled,
238
238
  dense: dense,
239
- dataTest: `${dataTest}-input`
239
+ dataTest: "".concat(dataTest, "-input")
240
240
  }, input), open && /*#__PURE__*/_react.default.createElement(_menuWrapper.MenuWrapper, {
241
241
  onClick: this.onOutsideClick,
242
242
  maxHeight: maxHeight,
243
243
  selectRef: this.selectRef,
244
244
  menuWidth: menuWidth,
245
- dataTest: `${dataTest}-menu`
245
+ dataTest: "".concat(dataTest, "-menu")
246
246
  }, menu));
247
247
  }
248
248