@synerise/ds-select 0.14.0 → 0.14.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.14.4](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@0.14.3...@synerise/ds-select@0.14.4) (2021-12-29)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-select
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.14.3](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@0.14.2...@synerise/ds-select@0.14.3) (2021-12-22)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-select
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.14.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@0.14.1...@synerise/ds-select@0.14.2) (2021-11-22)
23
+
24
+ **Note:** Version bump only for package @synerise/ds-select
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.14.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@0.13.49...@synerise/ds-select@0.14.1) (2021-11-09)
31
+
32
+ **Note:** Version bump only for package @synerise/ds-select
33
+
34
+
35
+
36
+
37
+
6
38
  # [0.14.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@0.13.49...@synerise/ds-select@0.14.0) (2021-11-09)
7
39
 
8
40
  **Note:** Version bump only for package @synerise/ds-select
package/dist/Select.js CHANGED
@@ -1,34 +1,12 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
-
3
1
  var _excluded = ["label", "description", "errorText", "error", "tooltip", "clearTooltip", "prefixel", "suffixel", "style", "listHeight", "className", "getPopupContainer", "grey"];
4
2
 
5
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
4
 
7
- 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; }
8
-
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
-
11
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
6
 
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
-
15
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
16
-
17
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
18
-
19
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
-
21
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
-
23
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
24
8
 
25
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
-
27
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
-
29
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
30
-
31
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9
+ 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; }
32
10
 
33
11
  import * as React from 'react';
34
12
  import { ErrorText, Description } from '@synerise/ds-typography';
@@ -41,83 +19,82 @@ import classNames from 'classnames';
41
19
  import * as S from './Select.styles';
42
20
 
43
21
  var Select = /*#__PURE__*/function (_React$Component) {
44
- _inherits(Select, _React$Component);
45
-
46
- var _super = _createSuper(Select);
22
+ _inheritsLoose(Select, _React$Component);
47
23
 
48
24
  function Select() {
49
- _classCallCheck(this, Select);
50
-
51
- return _super.apply(this, arguments);
25
+ return _React$Component.apply(this, arguments) || this;
52
26
  }
53
27
 
54
- _createClass(Select, [{
55
- key: "render",
56
- value: function render() {
57
- var _this$props = this.props,
58
- label = _this$props.label,
59
- description = _this$props.description,
60
- errorText = _this$props.errorText,
61
- error = _this$props.error,
62
- tooltip = _this$props.tooltip,
63
- clearTooltip = _this$props.clearTooltip,
64
- prefixel = _this$props.prefixel,
65
- suffixel = _this$props.suffixel,
66
- style = _this$props.style,
67
- listHeight = _this$props.listHeight,
68
- className = _this$props.className,
69
- _this$props$getPopupC = _this$props.getPopupContainer,
70
- getPopupContainer = _this$props$getPopupC === void 0 ? defaultGetPopupContainer : _this$props$getPopupC,
71
- grey = _this$props.grey,
72
- antdProps = _objectWithoutProperties(_this$props, _excluded);
73
-
74
- var size = antdProps.size;
75
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Label, {
76
- label: label,
77
- tooltip: tooltip
78
- }), /*#__PURE__*/React.createElement(S.SelectWrapper, {
79
- grey: grey,
80
- error: Boolean(errorText),
81
- className: classNames('ds-select-wrapper', {
82
- error: errorText || error
83
- }, _defineProperty({}, className, !!className)),
84
- style: style
85
- }, !!prefixel && /*#__PURE__*/React.createElement(S.PrefixWrapper, null, prefixel), /*#__PURE__*/React.createElement(S.AntdSelect, _extends({
86
- dropdownAlign: {
87
- offset: [0, 8]
88
- } // STOR-588
89
-
90
- }, antdProps, {
91
- getPopupContainer: getPopupContainer,
92
- listHeight: listHeight,
93
- size: size,
94
- prefixel: !!prefixel,
95
- suffixel: !!suffixel,
96
- clearIcon: /*#__PURE__*/React.createElement(Tooltip, {
97
- title: clearTooltip
98
- }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icon, {
99
- component: /*#__PURE__*/React.createElement(Close3M, null),
100
- size: size === 'small' ? 18 : 24
101
- }))),
102
- removeIcon: /*#__PURE__*/React.createElement(Icon, {
103
- component: /*#__PURE__*/React.createElement(CloseS, null)
104
- }),
105
- className: classNames({
106
- error: errorText || error
107
- })
108
- })), !!suffixel && /*#__PURE__*/React.createElement(S.SuffixWrapper, null, suffixel)), errorText && /*#__PURE__*/React.createElement(S.ErrorWrapper, {
109
- description: Boolean(description)
110
- }, /*#__PURE__*/React.createElement(ErrorText, null, errorText)), description && /*#__PURE__*/React.createElement(S.DescWrapper, {
111
- withError: Boolean(errorText)
112
- }, description && /*#__PURE__*/React.createElement(Description, {
113
- disabled: antdProps.disabled
114
- }, description)));
115
- }
116
- }]);
28
+ var _proto = Select.prototype;
29
+
30
+ _proto.render = function render() {
31
+ var _classNames;
32
+
33
+ var _this$props = this.props,
34
+ label = _this$props.label,
35
+ description = _this$props.description,
36
+ errorText = _this$props.errorText,
37
+ error = _this$props.error,
38
+ tooltip = _this$props.tooltip,
39
+ clearTooltip = _this$props.clearTooltip,
40
+ prefixel = _this$props.prefixel,
41
+ suffixel = _this$props.suffixel,
42
+ style = _this$props.style,
43
+ listHeight = _this$props.listHeight,
44
+ className = _this$props.className,
45
+ _this$props$getPopupC = _this$props.getPopupContainer,
46
+ getPopupContainer = _this$props$getPopupC === void 0 ? defaultGetPopupContainer : _this$props$getPopupC,
47
+ grey = _this$props.grey,
48
+ antdProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
49
+
50
+ var size = antdProps.size;
51
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Label, {
52
+ label: label,
53
+ tooltip: tooltip
54
+ }), /*#__PURE__*/React.createElement(S.SelectWrapper, {
55
+ grey: grey,
56
+ error: Boolean(errorText),
57
+ className: classNames('ds-select-wrapper', {
58
+ error: errorText || error
59
+ }, (_classNames = {}, _classNames[className] = !!className, _classNames)),
60
+ style: style
61
+ }, !!prefixel && /*#__PURE__*/React.createElement(S.PrefixWrapper, null, prefixel), /*#__PURE__*/React.createElement(S.AntdSelect, _extends({
62
+ dropdownAlign: {
63
+ offset: [0, 8]
64
+ } // STOR-588
65
+
66
+ }, antdProps, {
67
+ getPopupContainer: getPopupContainer,
68
+ listHeight: listHeight,
69
+ size: size,
70
+ prefixel: !!prefixel,
71
+ suffixel: !!suffixel,
72
+ clearIcon: /*#__PURE__*/React.createElement(Tooltip, {
73
+ title: clearTooltip
74
+ }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icon, {
75
+ component: /*#__PURE__*/React.createElement(Close3M, null),
76
+ size: size === 'small' ? 18 : 24
77
+ }))),
78
+ removeIcon: /*#__PURE__*/React.createElement(Icon, {
79
+ component: /*#__PURE__*/React.createElement(CloseS, null)
80
+ }),
81
+ className: classNames({
82
+ error: errorText || error
83
+ })
84
+ })), !!suffixel && /*#__PURE__*/React.createElement(S.SuffixWrapper, null, suffixel)), errorText && /*#__PURE__*/React.createElement(S.ErrorWrapper, {
85
+ description: Boolean(description)
86
+ }, /*#__PURE__*/React.createElement(ErrorText, null, errorText)), description && /*#__PURE__*/React.createElement(S.DescWrapper, {
87
+ withError: Boolean(errorText)
88
+ }, description && /*#__PURE__*/React.createElement(Description, {
89
+ disabled: antdProps.disabled
90
+ }, description)));
91
+ };
117
92
 
118
93
  return Select;
119
94
  }(React.Component);
120
95
 
121
- Select.Option = S.AntdSelectOption;
122
- Select.OptGroup = S.AntdSelectOptGroup;
96
+ _defineProperty(Select, "Option", S.AntdSelectOption);
97
+
98
+ _defineProperty(Select, "OptGroup", S.AntdSelectOptGroup);
99
+
123
100
  export default Select;
@@ -5,12 +5,12 @@ var OptGroup = Select.OptGroup,
5
5
  Option = Select.Option;
6
6
 
7
7
  var errorStyle = function errorStyle(props) {
8
- return "\nborder-color: ".concat(props.theme.palette['red-600'], ";\nbox-shadow: inset 0 0 0 1px ").concat(props.theme.palette['red-600'], ";\nbackground: ").concat(props.theme.palette['red-050'], ";\n");
8
+ return "\nborder-color: " + props.theme.palette['red-600'] + ";\nbox-shadow: inset 0 0 0 1px " + props.theme.palette['red-600'] + ";\nbackground: " + props.theme.palette['red-050'] + ";\n";
9
9
  };
10
10
 
11
11
  var searchIconWithCustomColor = function searchIconWithCustomColor(color) {
12
12
  var colorValueForSvg = color.replace(/#/, '%23');
13
- var iconWithColor = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-6 -6 36 36' >/><path fill='none' d='M0 0h24v24H0z' /><path style='fill: ".concat(colorValueForSvg, ";' d='M10.734 17.234a6.463 6.463 0 004.03-1.41l3.721 3.722a.75.75 0 001.06-1.06l-3.72-3.722a6.494 6.494 0 10-5.09 2.47zm0-11.5a5 5 0 11-5 5 5.006 5.006 0 015-5z'/></svg>");
13
+ var iconWithColor = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-6 -6 36 36' >/><path fill='none' d='M0 0h24v24H0z' /><path style='fill: " + colorValueForSvg + ";' d='M10.734 17.234a6.463 6.463 0 004.03-1.41l3.721 3.722a.75.75 0 001.06-1.06l-3.72-3.722a6.494 6.494 0 10-5.09 2.47zm0-11.5a5 5 0 11-5 5 5.006 5.006 0 015-5z'/></svg>";
14
14
  return iconWithColor;
15
15
  };
16
16
 
@@ -23,7 +23,7 @@ var withSuffixStyles = function withSuffixStyles() {
23
23
  };
24
24
 
25
25
  var addonStyles = function addonStyles(props) {
26
- return "\n display: flex;\n align-items: center;\n background: ".concat(props.theme.palette['grey-050'], ";\n box-shadow: inset 0 0 0 1px ").concat(props.theme.palette['grey-300'], ";\n color: ").concat(props.theme.palette['grey-500'], ";\n font-size:13px;\n line-height: 1.39;\n ");
26
+ return "\n display: flex;\n align-items: center;\n background: " + props.theme.palette['grey-050'] + ";\n box-shadow: inset 0 0 0 1px " + props.theme.palette['grey-300'] + ";\n color: " + props.theme.palette['grey-500'] + ";\n font-size:13px;\n line-height: 1.39;\n ";
27
27
  };
28
28
 
29
29
  export var AntdSelect = styled(Select).withConfig({
@@ -36,7 +36,7 @@ export var AntdSelect = styled(Select).withConfig({
36
36
  }, function (props) {
37
37
  return !!props.suffixel && withSuffixStyles();
38
38
  }, function (props) {
39
- return "url(\"".concat(searchIconWithCustomColor(props.theme.palette['grey-400']), "\")");
39
+ return "url(\"" + searchIconWithCustomColor(props.theme.palette['grey-400']) + "\")";
40
40
  }, function (props) {
41
41
  return errorStyle(props);
42
42
  }, function (props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-select",
3
- "version": "0.14.0",
3
+ "version": "0.14.4",
4
4
  "description": "Select UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -32,8 +32,9 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-input": "^0.18.0",
36
- "@synerise/ds-typography": "^0.12.0",
35
+ "@synerise/ds-icon": "^0.46.2",
36
+ "@synerise/ds-input": "^0.18.3",
37
+ "@synerise/ds-typography": "^0.12.2",
37
38
  "classnames": "^2.2.6"
38
39
  },
39
40
  "peerDependencies": {
@@ -44,5 +45,5 @@
44
45
  "devDependencies": {
45
46
  "@synerise/ds-utils": "^0.19.0"
46
47
  },
47
- "gitHead": "a797e1d5e1233f121f8f7dfbeaf97b48a8195d25"
48
+ "gitHead": "7ddae11318ca2906145c9f48e74df41ca5f15d49"
48
49
  }