@zohodesk/components 1.2.11 → 1.2.12

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 (35) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +4 -0
  3. package/coverage/Button/Button.js.html +1 -1
  4. package/coverage/Button/css/Button.module.css.html +1 -1
  5. package/coverage/Button/css/cssJSLogic.js.html +1 -1
  6. package/coverage/Button/css/index.html +1 -1
  7. package/coverage/Button/index.html +1 -1
  8. package/coverage/Button/props/defaultProps.js.html +1 -1
  9. package/coverage/Button/props/index.html +1 -1
  10. package/coverage/Button/props/propTypes.js.html +1 -1
  11. package/coverage/Buttongroup/Buttongroup.js.html +1 -1
  12. package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
  13. package/coverage/Buttongroup/index.html +1 -1
  14. package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
  15. package/coverage/Buttongroup/props/index.html +1 -1
  16. package/coverage/Buttongroup/props/propTypes.js.html +1 -1
  17. package/coverage/index.html +1 -1
  18. package/coverage/utils/dummyFunction.js.html +1 -1
  19. package/coverage/utils/index.html +1 -1
  20. package/es/v1/Card/index.js +4 -0
  21. package/es/v1/DropDown/DropDown.js +31 -52
  22. package/es/v1/DropDown/DropDownHeading.js +29 -37
  23. package/es/v1/DropDown/DropDownItem.js +38 -58
  24. package/es/v1/DropDown/DropDownSearch.js +41 -49
  25. package/es/v1/DropDown/DropDownSeparator.js +7 -10
  26. package/es/v1/Provider/CssProvider.js +1 -1
  27. package/lib/v1/Card/index.js +37 -0
  28. package/lib/v1/DropDown/DropDown.js +34 -130
  29. package/lib/v1/DropDown/DropDownHeading.js +29 -75
  30. package/lib/v1/DropDown/DropDownItem.js +50 -102
  31. package/lib/v1/DropDown/DropDownSearch.js +50 -89
  32. package/lib/v1/DropDown/DropDownSeparator.js +8 -48
  33. package/lib/v1/Provider/CssProvider.js +1 -1
  34. package/package.json +6 -6
  35. package/result.json +1 -1
@@ -5,9 +5,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = void 0;
8
+ exports["default"] = DropDownSearch;
9
9
 
10
- var _react = _interopRequireDefault(require("react"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _propTypes = require("../../DropDown/props/propTypes");
13
13
 
@@ -19,95 +19,56 @@ var _DropDownSearchModule = _interopRequireDefault(require("../../DropDown/DropD
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
21
 
22
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
-
24
- 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); } }
25
-
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
-
28
- 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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
-
30
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
-
32
- 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); }; }
33
-
34
- 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); }
35
-
36
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
-
38
- 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; } }
39
-
40
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
-
42
- var DropDownSearch = /*#__PURE__*/function (_React$Component) {
43
- _inherits(DropDownSearch, _React$Component);
44
-
45
- var _super = _createSuper(DropDownSearch);
46
-
47
- function DropDownSearch(props) {
48
- var _this;
49
-
50
- _classCallCheck(this, DropDownSearch);
51
-
52
- _this = _super.call(this, props);
53
- _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
54
- return _this;
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ function DropDownSearch(props) {
27
+ var name = props.name,
28
+ id = props.id,
29
+ maxLength = props.maxLength,
30
+ onKeyDown = props.onKeyDown,
31
+ onChange = props.onChange,
32
+ value = props.value,
33
+ onBlur = props.onBlur,
34
+ size = props.size,
35
+ textBoxSize = props.textBoxSize,
36
+ placeHolder = props.placeHolder,
37
+ customClass = props.customClass,
38
+ getRef = props.getRef;
39
+ var _customClass$searchCl = customClass.searchClass,
40
+ searchClass = _customClass$searchCl === void 0 ? '' : _customClass$searchCl,
41
+ _customClass$customTe = customClass.customTextBox,
42
+ customTextBox = _customClass$customTe === void 0 ? '' : _customClass$customTe;
43
+ var inputRef = (0, _react.useRef)(null); // eslint-disable-next-line func-call-spacing
44
+
45
+ (0, _react.useEffect)(function () {
46
+ inputRef.current && input.current.focus({
47
+ preventScroll: true
48
+ });
49
+ }, []);
50
+
51
+ function getReference(ele) {
52
+ inputRef.current = ele;
53
+ getRef && getRef(ele);
55
54
  }
56
55
 
57
- _createClass(DropDownSearch, [{
58
- key: "componentDidMount",
59
- value: function componentDidMount() {
60
- this.input && this.input.focus({
61
- preventScroll: true
62
- });
63
- }
64
- }, {
65
- key: "getRef",
66
- value: function getRef(ele) {
67
- var getRef = this.props.getRef;
68
- this.input = ele;
69
- getRef && getRef(ele);
70
- }
71
- }, {
72
- key: "render",
73
- value: function render() {
74
- var _this$props = this.props,
75
- name = _this$props.name,
76
- id = _this$props.id,
77
- maxLength = _this$props.maxLength,
78
- onKeyDown = _this$props.onKeyDown,
79
- onChange = _this$props.onChange,
80
- value = _this$props.value,
81
- onBlur = _this$props.onBlur,
82
- size = _this$props.size,
83
- textBoxSize = _this$props.textBoxSize,
84
- placeHolder = _this$props.placeHolder,
85
- customClass = _this$props.customClass;
86
- var _customClass$searchCl = customClass.searchClass,
87
- searchClass = _customClass$searchCl === void 0 ? '' : _customClass$searchCl,
88
- _customClass$customTe = customClass.customTextBox,
89
- customTextBox = _customClass$customTe === void 0 ? '' : _customClass$customTe;
90
- return /*#__PURE__*/_react["default"].createElement("div", {
91
- className: "".concat(_DropDownSearchModule["default"].search, " ").concat(_DropDownSearchModule["default"]["".concat(size, "Search")], " ").concat(searchClass)
92
- }, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
93
- id: id,
94
- inputRef: this.getRef,
95
- maxLength: maxLength,
96
- name: name,
97
- onBlur: onBlur,
98
- onChange: onChange,
99
- onKeyDown: onKeyDown,
100
- size: textBoxSize,
101
- value: value,
102
- placeHolder: placeHolder,
103
- customClass: customTextBox
104
- }));
105
- }
106
- }]);
56
+ return /*#__PURE__*/_react["default"].createElement("div", {
57
+ className: "".concat(_DropDownSearchModule["default"].search, " ").concat(_DropDownSearchModule["default"]["".concat(size, "Search")], " ").concat(searchClass)
58
+ }, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
59
+ id: id,
60
+ inputRef: getReference,
61
+ maxLength: maxLength,
62
+ name: name,
63
+ onBlur: onBlur,
64
+ onChange: onChange,
65
+ onKeyDown: onKeyDown,
66
+ size: textBoxSize,
67
+ value: value,
68
+ placeHolder: placeHolder,
69
+ customClass: customTextBox
70
+ }));
71
+ }
107
72
 
108
- return DropDownSearch;
109
- }(_react["default"].Component);
110
-
111
- exports["default"] = DropDownSearch;
112
73
  DropDownSearch.defaultProps = _defaultProps.DropDownSearch_defaultProps;
113
74
  DropDownSearch.propTypes = _propTypes.DropDownSearch_propTypes;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports["default"] = void 0;
6
+ exports["default"] = DropDownSeparator;
9
7
 
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
@@ -15,50 +13,12 @@ var _DropDownSeparatorModule = _interopRequireDefault(require("../../DropDown/Dr
15
13
 
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
15
 
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- 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); } }
21
-
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
-
24
- 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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
-
26
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
-
28
- 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); }; }
29
-
30
- 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); }
31
-
32
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
16
+ function DropDownSeparator(props) {
17
+ var _props$customClass = props.customClass,
18
+ customClass = _props$customClass === void 0 ? '' : _props$customClass;
19
+ return /*#__PURE__*/_react["default"].createElement("div", {
20
+ className: "".concat(_DropDownSeparatorModule["default"].separator, " ").concat(customClass)
21
+ });
22
+ }
33
23
 
34
- 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; } }
35
-
36
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
37
-
38
- var DropDownSeparator = /*#__PURE__*/function (_React$Component) {
39
- _inherits(DropDownSeparator, _React$Component);
40
-
41
- var _super = _createSuper(DropDownSeparator);
42
-
43
- function DropDownSeparator() {
44
- _classCallCheck(this, DropDownSeparator);
45
-
46
- return _super.apply(this, arguments);
47
- }
48
-
49
- _createClass(DropDownSeparator, [{
50
- key: "render",
51
- value: function render() {
52
- var _this$props$customCla = this.props.customClass,
53
- customClass = _this$props$customCla === void 0 ? '' : _this$props$customCla;
54
- return /*#__PURE__*/_react["default"].createElement("div", {
55
- className: "".concat(_DropDownSeparatorModule["default"].separator, " ").concat(customClass)
56
- });
57
- }
58
- }]);
59
-
60
- return DropDownSeparator;
61
- }(_react["default"].Component);
62
-
63
- exports["default"] = DropDownSeparator;
64
24
  DropDownSeparator.propTypes = _propTypes.DropDownSeparator_propTypes;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = CssProvider;
7
7
 
8
- var _commonModule = _interopRequireDefault(require("../common/common.module.css"));
8
+ var _commonModule = _interopRequireDefault(require("../../common/common.module.css"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -65,8 +65,8 @@
65
65
  "@zohodesk/a11y": "2.1.0",
66
66
  "@zohodesk/docstool": "1.0.0-alpha-2",
67
67
  "@zohodesk/hooks": "2.0.1",
68
- "@zohodesk/icons": "1.0.2",
69
- "@zohodesk/svg": "1.1.3",
68
+ "@zohodesk/icons": "1.0.10",
69
+ "@zohodesk/svg": "1.1.4",
70
70
  "@zohodesk/utils": "1.3.13",
71
71
  "@zohodesk/variables": "1.0.0",
72
72
  "@zohodesk/virtualizer": "1.0.3",
@@ -80,9 +80,9 @@
80
80
  "selectn": "1.1.2"
81
81
  },
82
82
  "peerDependencies": {
83
- "@zohodesk/icons": "1.0.2",
83
+ "@zohodesk/icons": "1.0.10",
84
84
  "@zohodesk/variables": "1.0.0",
85
- "@zohodesk/svg": "1.1.3",
85
+ "@zohodesk/svg": "1.1.4",
86
86
  "@zohodesk/virtualizer": "1.0.3",
87
87
  "velocity-react": "1.4.3",
88
88
  "react-sortable-hoc": "^0.8.3",
@@ -90,4 +90,4 @@
90
90
  "@zohodesk/utils": "1.3.13",
91
91
  "@zohodesk/a11y": "2.1.0"
92
92
  }
93
- }
93
+ }