@zohodesk/components 1.0.0-temp-51 → 1.0.0-temp-54

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.
@@ -70,6 +70,7 @@
70
70
  [dir=rtl] .large {
71
71
  --listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
72
72
  }
73
+
73
74
  .value,
74
75
  .children {
75
76
  composes: dotted from '../common/common.module.css';
@@ -741,7 +741,7 @@ export class MultiSelectComponent extends React.Component {
741
741
  defaultDropBoxPosition,
742
742
  isReadOnly
743
743
  } = this.props;
744
- !isReadOnly && togglePopup(e, defaultDropBoxPosition ? `${defaultDropBoxPosition}Center` : null);
744
+ !isReadOnly && togglePopup(e, defaultDropBoxPosition ? `${defaultDropBoxPosition}` : null);
745
745
  }
746
746
 
747
747
  handlePopupClose(e) {
@@ -982,7 +982,7 @@ export class MultiSelectComponent extends React.Component {
982
982
  dataId: `${dataId}_children`
983
983
  }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
984
984
  animationStyle: animationStyle,
985
- boxPosition: position || `${defaultDropBoxPosition}Center`,
985
+ boxPosition: position || `${defaultDropBoxPosition}`,
986
986
  getRef: getContainerRef,
987
987
  isActive: isPopupReady,
988
988
  isAnimate: isAnimate,
@@ -1041,7 +1041,7 @@ MultiSelectComponent.propTypes = {
1041
1041
  borderColor: PropTypes.oneOf(['transparent', 'default', 'dark']),
1042
1042
  closePopupOnly: PropTypes.func,
1043
1043
  dataId: PropTypes.string,
1044
- defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
1044
+ defaultDropBoxPosition: PropTypes.string,
1045
1045
  disableAction: PropTypes.bool,
1046
1046
  dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
1047
1047
  emptyMessage: PropTypes.string.isRequired,
@@ -1117,7 +1117,6 @@ MultiSelectComponent.propTypes = {
1117
1117
  MultiSelectComponent.defaultProps = {
1118
1118
  animationStyle: 'bounce',
1119
1119
  dataId: 'multiSelect',
1120
- defaultDropBoxPosition: 'bottom',
1121
1120
  dropBoxSize: 'small',
1122
1121
  isAnimate: true,
1123
1122
  isDisabled: false,
@@ -25,14 +25,7 @@ function rangeCheck(minValue, maxValue, screenValue) {
25
25
  return minValue <= screenValue && maxValue >= screenValue;
26
26
  }
27
27
 
28
- function isTouchDeviceFunc() {
29
- // return window.matchMedia("(pointer: coarse)").matches
30
- return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
31
- } // export const isTouchDevice =
32
- // 'ontouchstart' in window && navigator.userAgent.match(/mobi/i) ? true : false;
33
-
34
-
35
- export const isTouchDevice = isTouchDeviceFunc();
28
+ export const isTouchDevice = 'ontouchstart' in window && navigator.userAgent.match(/mobi/i) ? true : false;
36
29
  export function isBreackPointMatched(object, screen) {
37
30
  if (!isValideBreakPoint(object)) {
38
31
  // eslint-disable-next-line no-console
@@ -507,7 +507,7 @@ export class SelectComponent extends Component {
507
507
  onFocus,
508
508
  isPopupOpen
509
509
  } = this.props;
510
- !isReadOnly && togglePopup(e, defaultDropBoxPosition ? `${defaultDropBoxPosition}Center` : null);
510
+ !isReadOnly && togglePopup(e, defaultDropBoxPosition ? `${defaultDropBoxPosition}` : null);
511
511
  !isPopupOpen && typeof onFocus === 'function' && onFocus(e);
512
512
  }
513
513
 
@@ -835,7 +835,7 @@ export class SelectComponent extends Component {
835
835
  customProps: TextBoxProps
836
836
  })), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
837
837
  animationStyle: animationStyle,
838
- boxPosition: position || `${defaultDropBoxPosition}Center`,
838
+ boxPosition: position || `${defaultDropBoxPosition}`,
839
839
  getRef: getContainerRef,
840
840
  isActive: isPopupReady,
841
841
  isAnimate: true,
@@ -912,7 +912,7 @@ SelectComponent.propTypes = {
912
912
  className: PropTypes.string,
913
913
  closePopupOnly: PropTypes.func,
914
914
  dataId: PropTypes.string,
915
- defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
915
+ defaultDropBoxPosition: PropTypes.string,
916
916
  dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
917
917
  emptyMessage: PropTypes.string,
918
918
  excludeOptions: PropTypes.array,
@@ -992,7 +992,6 @@ SelectComponent.defaultProps = {
992
992
  animationStyle: 'bounce',
993
993
  autoSelectOnType: true,
994
994
  dataId: 'selectComponent',
995
- defaultDropBoxPosition: 'bottom',
996
995
  dropBoxSize: 'small',
997
996
  isDefaultSelectValue: true,
998
997
  isDisabled: false,
@@ -70,6 +70,7 @@
70
70
  [dir=rtl] .large {
71
71
  --listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
72
72
  }
73
+
73
74
  .value,
74
75
  .children {
75
76
  composes: dotted from '../common/common.module.css';
@@ -815,7 +815,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
815
815
  togglePopup = _this$props10.togglePopup,
816
816
  defaultDropBoxPosition = _this$props10.defaultDropBoxPosition,
817
817
  isReadOnly = _this$props10.isReadOnly;
818
- !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition, "Center") : null);
818
+ !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition) : null);
819
819
  }
820
820
  }, {
821
821
  key: "handlePopupClose",
@@ -1052,7 +1052,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
1052
1052
  dataId: "".concat(dataId, "_children")
1053
1053
  }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
1054
1054
  animationStyle: animationStyle,
1055
- boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
1055
+ boxPosition: position || "".concat(defaultDropBoxPosition),
1056
1056
  getRef: getContainerRef,
1057
1057
  isActive: isPopupReady,
1058
1058
  isAnimate: isAnimate,
@@ -1115,7 +1115,7 @@ MultiSelectComponent.propTypes = {
1115
1115
  borderColor: _propTypes["default"].oneOf(['transparent', 'default', 'dark']),
1116
1116
  closePopupOnly: _propTypes["default"].func,
1117
1117
  dataId: _propTypes["default"].string,
1118
- defaultDropBoxPosition: _propTypes["default"].oneOf(['bottom', 'top', 'left', 'right']),
1118
+ defaultDropBoxPosition: _propTypes["default"].string,
1119
1119
  disableAction: _propTypes["default"].bool,
1120
1120
  dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
1121
1121
  emptyMessage: _propTypes["default"].string.isRequired,
@@ -1191,7 +1191,6 @@ MultiSelectComponent.propTypes = {
1191
1191
  MultiSelectComponent.defaultProps = {
1192
1192
  animationStyle: 'bounce',
1193
1193
  dataId: 'multiSelect',
1194
- defaultDropBoxPosition: 'bottom',
1195
1194
  dropBoxSize: 'small',
1196
1195
  isAnimate: true,
1197
1196
  isDisabled: false,
@@ -62,14 +62,7 @@ function rangeCheck(minValue, maxValue, screenValue) {
62
62
  return minValue <= screenValue && maxValue >= screenValue;
63
63
  }
64
64
 
65
- function isTouchDeviceFunc() {
66
- // return window.matchMedia("(pointer: coarse)").matches
67
- return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
68
- } // export const isTouchDevice =
69
- // 'ontouchstart' in window && navigator.userAgent.match(/mobi/i) ? true : false;
70
-
71
-
72
- var isTouchDevice = isTouchDeviceFunc();
65
+ var isTouchDevice = 'ontouchstart' in window && navigator.userAgent.match(/mobi/i) ? true : false;
73
66
  exports.isTouchDevice = isTouchDevice;
74
67
 
75
68
  function isBreackPointMatched(object, screen) {
@@ -543,7 +543,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
543
543
  defaultDropBoxPosition = _this$props7.defaultDropBoxPosition,
544
544
  onFocus = _this$props7.onFocus,
545
545
  isPopupOpen = _this$props7.isPopupOpen;
546
- !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition, "Center") : null);
546
+ !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition) : null);
547
547
  !isPopupOpen && typeof onFocus === 'function' && onFocus(e);
548
548
  }
549
549
  }, {
@@ -870,7 +870,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
870
870
  customProps: TextBoxProps
871
871
  })), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
872
872
  animationStyle: animationStyle,
873
- boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
873
+ boxPosition: position || "".concat(defaultDropBoxPosition),
874
874
  getRef: getContainerRef,
875
875
  isActive: isPopupReady,
876
876
  isAnimate: true,
@@ -951,7 +951,7 @@ SelectComponent.propTypes = {
951
951
  className: _propTypes["default"].string,
952
952
  closePopupOnly: _propTypes["default"].func,
953
953
  dataId: _propTypes["default"].string,
954
- defaultDropBoxPosition: _propTypes["default"].oneOf(['bottom', 'top', 'left', 'right']),
954
+ defaultDropBoxPosition: _propTypes["default"].string,
955
955
  dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
956
956
  emptyMessage: _propTypes["default"].string,
957
957
  excludeOptions: _propTypes["default"].array,
@@ -1031,7 +1031,6 @@ SelectComponent.defaultProps = {
1031
1031
  animationStyle: 'bounce',
1032
1032
  autoSelectOnType: true,
1033
1033
  dataId: 'selectComponent',
1034
- defaultDropBoxPosition: 'bottom',
1035
1034
  dropBoxSize: 'small',
1036
1035
  isDefaultSelectValue: true,
1037
1036
  isDisabled: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-51",
3
+ "version": "1.0.0-temp-54",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",