@zohodesk/components 1.2.11 → 1.2.13

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 (73) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/propValidation_report.html +1 -1
  3. package/README.md +9 -0
  4. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +1 -0
  5. package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -0
  6. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +1 -0
  7. package/coverage/Button/Button.js.html +1 -1
  8. package/coverage/Button/css/Button.module.css.html +1 -1
  9. package/coverage/Button/css/cssJSLogic.js.html +1 -1
  10. package/coverage/Button/css/index.html +1 -1
  11. package/coverage/Button/index.html +1 -1
  12. package/coverage/Button/props/defaultProps.js.html +1 -1
  13. package/coverage/Button/props/index.html +1 -1
  14. package/coverage/Button/props/propTypes.js.html +1 -1
  15. package/coverage/Buttongroup/Buttongroup.js.html +1 -1
  16. package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
  17. package/coverage/Buttongroup/index.html +1 -1
  18. package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
  19. package/coverage/Buttongroup/props/index.html +1 -1
  20. package/coverage/Buttongroup/props/propTypes.js.html +1 -1
  21. package/coverage/coverage-final.json +10 -10
  22. package/coverage/coverage-summary.json +10 -10
  23. package/coverage/index.html +1 -1
  24. package/coverage/utils/dummyFunction.js.html +1 -1
  25. package/coverage/utils/index.html +1 -1
  26. package/es/DateTime/DateTime.module.css +12 -1
  27. package/es/v1/Card/index.js +4 -0
  28. package/es/v1/DateTime/CalendarView.js +43 -10
  29. package/es/v1/DateTime/DateTime.js +8 -4
  30. package/es/v1/DateTime/DateTimePopupFooter.js +2 -2
  31. package/es/v1/DateTime/DateTimePopupHeader.js +1 -1
  32. package/es/v1/DateTime/DateWidget.js +8 -4
  33. package/es/v1/DateTime/DaysRow.js +1 -1
  34. package/es/v1/DateTime/Time.js +2 -2
  35. package/es/v1/DateTime/YearView.js +2 -2
  36. package/es/v1/DateTime/props/defaultProps.js +57 -0
  37. package/es/v1/DateTime/props/propTypes.js +195 -0
  38. package/es/v1/DropDown/DropDown.js +31 -52
  39. package/es/v1/DropDown/DropDownHeading.js +29 -37
  40. package/es/v1/DropDown/DropDownItem.js +38 -58
  41. package/es/v1/DropDown/DropDownSearch.js +41 -49
  42. package/es/v1/DropDown/DropDownSeparator.js +7 -10
  43. package/es/v1/Provider/CssProvider.js +1 -1
  44. package/es/v1/Typography/Typography.js +4 -4
  45. package/es/v1/Typography/css/Typography.module.css +33 -0
  46. package/es/v1/Typography/css/cssJSLogic.js +14 -8
  47. package/es/v1/Typography/props/defaultProps.js +4 -4
  48. package/es/v1/Typography/props/propTypes.js +8 -5
  49. package/lib/DateTime/DateTime.module.css +12 -1
  50. package/lib/v1/Card/index.js +37 -0
  51. package/lib/v1/DateTime/CalendarView.js +44 -10
  52. package/lib/v1/DateTime/DateTime.js +8 -4
  53. package/lib/v1/DateTime/DateTimePopupFooter.js +2 -2
  54. package/lib/v1/DateTime/DateTimePopupHeader.js +1 -1
  55. package/lib/v1/DateTime/DateWidget.js +8 -4
  56. package/lib/v1/DateTime/DaysRow.js +1 -1
  57. package/lib/v1/DateTime/Time.js +2 -2
  58. package/lib/v1/DateTime/YearView.js +2 -2
  59. package/lib/v1/DateTime/props/defaultProps.js +70 -0
  60. package/lib/v1/DateTime/props/propTypes.js +227 -0
  61. package/lib/v1/DropDown/DropDown.js +34 -130
  62. package/lib/v1/DropDown/DropDownHeading.js +29 -75
  63. package/lib/v1/DropDown/DropDownItem.js +50 -102
  64. package/lib/v1/DropDown/DropDownSearch.js +50 -89
  65. package/lib/v1/DropDown/DropDownSeparator.js +8 -48
  66. package/lib/v1/Provider/CssProvider.js +1 -1
  67. package/lib/v1/Typography/Typography.js +3 -3
  68. package/lib/v1/Typography/css/Typography.module.css +33 -0
  69. package/lib/v1/Typography/css/cssJSLogic.js +8 -5
  70. package/lib/v1/Typography/props/defaultProps.js +4 -4
  71. package/lib/v1/Typography/props/propTypes.js +8 -5
  72. package/package.json +6 -6
  73. 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"] = DropDownItem;
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
 
@@ -17,111 +17,59 @@ var _DropDownItemModule = _interopRequireDefault(require("../../DropDown/DropDow
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
19
 
20
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
-
22
- 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); } }
23
-
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
-
26
- 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); }
27
-
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
-
30
- 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); }; }
31
-
32
- 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); }
33
-
34
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
-
36
- 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; } }
37
-
38
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
-
40
- var DropDownItem = /*#__PURE__*/function (_React$Component) {
41
- _inherits(DropDownItem, _React$Component);
42
-
43
- var _super = _createSuper(DropDownItem);
20
+ 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); }
21
+
22
+ 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; }
23
+
24
+ function DropDownItem(props) {
25
+ var value = props.value,
26
+ active = props.active,
27
+ children = props.children,
28
+ hightlight = props.hightlight,
29
+ dataId = props.dataId,
30
+ _props$customClass = props.customClass,
31
+ customClass = _props$customClass === void 0 ? '' : _props$customClass,
32
+ index = props.index,
33
+ getRef = props.getRef,
34
+ onClick = props.onClick,
35
+ id = props.id,
36
+ onHover = props.onHover;
37
+ var eleRef = (0, _react.useRef)(null);
38
+
39
+ function getReference(ele) {
40
+ eleRef.current = ele;
41
+ getRef && getRef(ele, index);
42
+ }
44
43
 
45
- function DropDownItem(props) {
46
- var _this;
44
+ function getSelectedElement() {
45
+ return eleRef.current ? eleRef.current : null;
46
+ }
47
47
 
48
- _classCallCheck(this, DropDownItem);
48
+ function handleClick(e) {
49
+ onClick && onClick(id, value, index, e);
50
+ }
49
51
 
50
- _this = _super.call(this, props);
51
- _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
52
- _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
53
- _this.getSelectedElement = _this.getSelectedElement.bind(_assertThisInitialized(_this));
54
- _this.onHover = _this.onHover.bind(_assertThisInitialized(_this));
55
- return _this;
52
+ function handleHover(e) {
53
+ onHover && onHover(id, value, index, e);
56
54
  }
57
55
 
58
- _createClass(DropDownItem, [{
59
- key: "getRef",
60
- value: function getRef(ele) {
61
- this.ele = ele;
62
- var _this$props = this.props,
63
- index = _this$props.index,
64
- getRef = _this$props.getRef;
65
- getRef && getRef(ele, index);
66
- }
67
- }, {
68
- key: "getSelectedElement",
69
- value: function getSelectedElement() {
70
- return this.ele ? this.ele : null;
71
- }
72
- }, {
73
- key: "onClick",
74
- value: function onClick(e) {
75
- var _this$props2 = this.props,
76
- onClick = _this$props2.onClick,
77
- id = _this$props2.id,
78
- value = _this$props2.value,
79
- index = _this$props2.index;
80
- onClick && onClick(id, value, index, e);
81
- }
82
- }, {
83
- key: "onHover",
84
- value: function onHover(e) {
85
- var _this$props3 = this.props,
86
- onHover = _this$props3.onHover,
87
- id = _this$props3.id,
88
- value = _this$props3.value,
89
- index = _this$props3.index;
90
- onHover && onHover(id, value, index, e);
91
- }
92
- }, {
93
- key: "render",
94
- value: function render() {
95
- var _this$props4 = this.props,
96
- value = _this$props4.value,
97
- active = _this$props4.active,
98
- children = _this$props4.children,
99
- hightlight = _this$props4.hightlight,
100
- dataId = _this$props4.dataId,
101
- _this$props4$customCl = _this$props4.customClass,
102
- customClass = _this$props4$customCl === void 0 ? '' : _this$props4$customCl;
103
- return /*#__PURE__*/_react["default"].createElement("div", {
104
- className: "".concat(_DropDownItemModule["default"].list, " ").concat(customClass, " ").concat(active ? _DropDownItemModule["default"].listActive : hightlight ? _DropDownItemModule["default"].listHover : '', " ").concat(children && children[1] ? _DropDownItemModule["default"].padding : ''),
105
- onClick: this.onClick,
106
- onMouseOver: this.onHover,
107
- ref: this.getRef,
108
- "data-id": dataId,
109
- "data-test-id": dataId
110
- }, children && children[0] ? /*#__PURE__*/_react["default"].createElement("span", {
111
- className: _DropDownItemModule["default"].children
112
- }, " ", children[0], " ") : children !== undefined ? /*#__PURE__*/_react["default"].createElement("span", {
113
- className: _DropDownItemModule["default"].children
114
- }, " ", children, " ") : null, value ? /*#__PURE__*/_react["default"].createElement("span", {
115
- className: _DropDownItemModule["default"].value
116
- }, value) : '', children && children[1] ? /*#__PURE__*/_react["default"].createElement("span", {
117
- className: _DropDownItemModule["default"].user
118
- }, " ", children[1], " ") : '');
119
- }
120
- }]);
121
-
122
- return DropDownItem;
123
- }(_react["default"].Component);
56
+ return /*#__PURE__*/_react["default"].createElement("div", {
57
+ className: "".concat(_DropDownItemModule["default"].list, " ").concat(customClass, " ").concat(active ? _DropDownItemModule["default"].listActive : hightlight ? _DropDownItemModule["default"].listHover : '', " ").concat(children && children[1] ? _DropDownItemModule["default"].padding : ''),
58
+ onClick: handleClick,
59
+ onMouseOver: handleHover,
60
+ ref: getReference,
61
+ "data-id": dataId,
62
+ "data-test-id": dataId
63
+ }, children && children[0] ? /*#__PURE__*/_react["default"].createElement("span", {
64
+ className: _DropDownItemModule["default"].children
65
+ }, " ", children[0], " ") : children !== undefined ? /*#__PURE__*/_react["default"].createElement("span", {
66
+ className: _DropDownItemModule["default"].children
67
+ }, " ", children, " ") : null, value ? /*#__PURE__*/_react["default"].createElement("span", {
68
+ className: _DropDownItemModule["default"].value
69
+ }, value) : '', children && children[1] ? /*#__PURE__*/_react["default"].createElement("span", {
70
+ className: _DropDownItemModule["default"].user
71
+ }, " ", children[1], " ") : '');
72
+ }
124
73
 
125
- exports["default"] = DropDownItem;
126
74
  DropDownItem.propTypes = _propTypes.DropDownItem_propTypes;
127
75
  DropDownItem.defaultProps = _defaultProps.DropDownItem_defaultProps;
@@ -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
 
@@ -31,8 +31,8 @@ var Typography = function Typography(props) {
31
31
  $i18n_dataTitle = props.$i18n_dataTitle,
32
32
  testId = props.testId,
33
33
  customId = props.customId,
34
- tagAttributes = props.tagAttributes,
35
- a11yAttributes = props.a11yAttributes,
34
+ $tagAttributes_text = props.$tagAttributes_text,
35
+ $a11yAttributes_text = props.$a11yAttributes_text,
36
36
  customStyle = props.customStyle;
37
37
  var style = (0, _utils.mergeStyle)(_TypographyModule["default"], customStyle);
38
38
 
@@ -47,7 +47,7 @@ var Typography = function Typography(props) {
47
47
  'data-title': $i18n_dataTitle,
48
48
  'data-id': customId,
49
49
  'data-test-id': testId
50
- }, tagAttributes), a11yAttributes), children);
50
+ }, $tagAttributes_text), $a11yAttributes_text), children);
51
51
  };
52
52
 
53
53
  Typography.propTypes = _propTypes.propTypes;
@@ -106,6 +106,39 @@
106
106
  composes:dotted_clamp;
107
107
  }
108
108
 
109
+ .wordBreak_breakAll{
110
+ word-break: break-all
111
+ }
112
+ .wordBreak_keepAll{
113
+ word-break: keep-all
114
+ }
115
+ .wordBreak_breakWord{
116
+ word-break: break-word
117
+ }
118
+
119
+ .wordWrap_normal{
120
+ word-wrap:normal;
121
+ }
122
+ .wordWrap_break{
123
+ word-wrap:break-word
124
+ }
125
+
126
+ .whiteSpace_normal{
127
+ white-space:normal
128
+ }
129
+ .whiteSpace_noWrap{
130
+ white-space:nowrap
131
+ }
132
+ .whiteSpace_pre{
133
+ white-space:pre
134
+ }
135
+ .whiteSpace_preLine{
136
+ white-space:pre-line
137
+ }
138
+ .whiteSpace_preWrap{
139
+ white-space:pre-wrap
140
+ }
141
+
109
142
 
110
143
 
111
144
  /*...............Font Size Start.........*/
@@ -16,25 +16,28 @@ function cssJSLogic(_ref) {
16
16
 
17
17
  var props = _ref.props,
18
18
  style = _ref.style;
19
- var $ui_isReset = props.$ui_isReset,
20
- $ui_isDotted = props.$ui_isDotted,
19
+ var $flag_reset = props.$flag_reset,
20
+ $flag_dotted = props.$flag_dotted,
21
21
  $ui_size = props.$ui_size,
22
22
  $ui_lineClamp = props.$ui_lineClamp,
23
23
  $ui_lineHeight = props.$ui_lineHeight,
24
24
  $ui_display = props.$ui_display,
25
- $ui_variant = props.$ui_variant,
25
+ $ui_weight = props.$ui_weight,
26
26
  $ui_typeFace = props.$ui_typeFace,
27
27
  $ui_textAlign = props.$ui_textAlign,
28
28
  $ui_letterSpacing = props.$ui_letterSpacing,
29
29
  $ui_transform = props.$ui_transform,
30
30
  $ui_decoration = props.$ui_decoration,
31
- $ui_className = props.$ui_className;
31
+ $ui_className = props.$ui_className,
32
+ $ui_wordBreak = props.$ui_wordBreak,
33
+ $ui_wordWrap = props.$ui_wordWrap,
34
+ $ui_whiteSpace = props.$ui_whiteSpace;
32
35
 
33
36
  if ($ui_letterSpacing && $ui_letterSpacing.match(/\./g)) {
34
37
  $ui_letterSpacing = _letterSpacingMap.letterspacingMapping[$ui_letterSpacing];
35
38
  }
36
39
 
37
- var typographyClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.reset, $ui_isReset), _defineProperty(_compileClassNames, style.dotted, $ui_isDotted), _defineProperty(_compileClassNames, style["size".concat($ui_size)], !!$ui_size), _defineProperty(_compileClassNames, style["lineclamp_".concat($ui_lineClamp)], !!$ui_lineClamp), _defineProperty(_compileClassNames, style["lineheight_".concat($ui_lineHeight)], !!$ui_lineHeight), _defineProperty(_compileClassNames, style["display_".concat($ui_display)], !!$ui_display), _defineProperty(_compileClassNames, style["font_".concat($ui_variant)], !!$ui_variant), _defineProperty(_compileClassNames, style["fontStyles_".concat($ui_typeFace)], !!$ui_typeFace), _defineProperty(_compileClassNames, style["textalign_".concat($ui_textAlign)], !!$ui_textAlign), _defineProperty(_compileClassNames, style["letterspacing_".concat($ui_letterSpacing)], !!$ui_letterSpacing), _defineProperty(_compileClassNames, style["transform_".concat($ui_transform)], !!$ui_transform), _defineProperty(_compileClassNames, style["decoration_".concat($ui_decoration)], !!$ui_decoration), _defineProperty(_compileClassNames, $ui_className, !!$ui_className), _compileClassNames));
40
+ var typographyClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.reset, $flag_reset), _defineProperty(_compileClassNames, style.dotted, $flag_dotted), _defineProperty(_compileClassNames, style["size".concat($ui_size)], !!$ui_size), _defineProperty(_compileClassNames, style["lineclamp_".concat($ui_lineClamp)], !!$ui_lineClamp), _defineProperty(_compileClassNames, style["lineheight_".concat($ui_lineHeight)], !!$ui_lineHeight), _defineProperty(_compileClassNames, style["display_".concat($ui_display)], !!$ui_display), _defineProperty(_compileClassNames, style["font_".concat($ui_weight)], !!$ui_weight), _defineProperty(_compileClassNames, style["fontStyles_".concat($ui_typeFace)], !!$ui_typeFace), _defineProperty(_compileClassNames, style["textalign_".concat($ui_textAlign)], !!$ui_textAlign), _defineProperty(_compileClassNames, style["letterspacing_".concat($ui_letterSpacing)], !!$ui_letterSpacing), _defineProperty(_compileClassNames, style["transform_".concat($ui_transform)], !!$ui_transform), _defineProperty(_compileClassNames, style["decoration_".concat($ui_decoration)], !!$ui_decoration), _defineProperty(_compileClassNames, $ui_className, !!$ui_className), _defineProperty(_compileClassNames, style["wordBreak_".concat($ui_wordBreak)], !!$ui_wordBreak), _defineProperty(_compileClassNames, style["wordWrap_".concat($ui_wordWrap)], !!$ui_wordWrap), _defineProperty(_compileClassNames, style["whiteSpace_".concat($ui_whiteSpace)], !!$ui_whiteSpace), _compileClassNames));
38
41
  return {
39
42
  typographyClass: typographyClass
40
43
  };
@@ -7,9 +7,9 @@ exports.defaultProps = void 0;
7
7
  var defaultProps = {
8
8
  $ui_className: '',
9
9
  $ui_tagName: 'div',
10
- $ui_isReset: false,
11
- $ui_isDotted: false,
12
- a11yAttributes: {},
13
- tagAttributes: {}
10
+ $flag_reset: false,
11
+ $flag_dotted: false,
12
+ $tagAttributes_text: {},
13
+ $a11yAttributes_text: {}
14
14
  };
15
15
  exports.defaultProps = defaultProps;
@@ -13,10 +13,10 @@ var propTypes = {
13
13
  children: _propTypes["default"].node,
14
14
  $ui_className: _propTypes["default"].string,
15
15
  $ui_tagName: _propTypes["default"].string,
16
- $ui_isReset: _propTypes["default"].bool,
17
- $ui_isDotted: _propTypes["default"].bool,
16
+ $flag_reset: _propTypes["default"].bool,
17
+ $flag_dotted: _propTypes["default"].bool,
18
18
  $ui_display: _propTypes["default"].oneOf(['block', 'inlineBlock', 'inline', 'initial']),
19
- $ui_variant: _propTypes["default"].oneOf(['regular', 'light', 'semibold', 'bold']),
19
+ $ui_weight: _propTypes["default"].oneOf(['regular', 'light', 'semibold', 'bold']),
20
20
  $ui_textAlign: _propTypes["default"].oneOf(['left', 'right', 'center', 'justify']),
21
21
  $ui_transform: _propTypes["default"].oneOf(['default', 'upper', 'lower', 'capital']),
22
22
  $ui_lineClamp: _propTypes["default"].oneOf(['1', '2', '3', '4', '5']),
@@ -25,11 +25,14 @@ var propTypes = {
25
25
  $ui_size: _propTypes["default"].oneOf(['7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '24', '25', '26', '28', '29', '30', '32', '34', '35', '36', '40', '50', 'inherit']),
26
26
  $ui_lineHeight: _propTypes["default"].oneOf(['0', '1', '8', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '24', '25', '26', '27', '28', '29', '30', '32', '33', '34', '35', '36', '38', '40', '41', '42', '45', '50', '52', '54', '55', '60', '70', '75', '120', 'inherit']),
27
27
  $ui_letterSpacing: _propTypes["default"].oneOf(['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '2', '4', 'inherit']),
28
+ $ui_wordBreak: _propTypes["default"].oneOf(['breakAll', 'keepAll', 'breakWord']),
29
+ $ui_wordWrap: _propTypes["default"].oneOf(['normal', 'break']),
30
+ $ui_whiteSpace: _propTypes["default"].oneOf(['normal', 'noWrap', 'pre', 'preLine', 'preWrap']),
28
31
  $i18n_dataTitle: _propTypes["default"].string,
29
32
  testId: _propTypes["default"].string,
30
33
  customId: _propTypes["default"].string,
31
34
  customStyle: _propTypes["default"].object,
32
- a11yAttributes: _propTypes["default"].object,
33
- tagAttributes: _propTypes["default"].object
35
+ $a11yAttributes_text: _propTypes["default"].object,
36
+ $tagAttributes_text: _propTypes["default"].object
34
37
  };
35
38
  exports.propTypes = propTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
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
+ }