@zohodesk/components 1.2.43 → 1.2.44

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/README.md CHANGED
@@ -32,6 +32,17 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
+ # 1.2.44
36
+
37
+ - **Tabs (v0&v1), AdvancedGroupMultiSelect (v1)**
38
+ - `isAbsolutePositioningNeeded` `isRestrictScroll` `positionsOffset` `targetOffset` props supported for fixed position.
39
+
40
+ - **Tabs (v0&v1)**
41
+ - padding css fix
42
+
43
+ - **DropDownSearch (v1)**
44
+ - Input not focus on mount issue fixed
45
+
35
46
  # 1.2.43
36
47
 
37
48
  - **AdvancedMultiSelect, MultiSelect, MultiSelectWithAvatar, GroupSelect, SelectWithIcon** - Fixed position support added.
package/es/Tab/Tabs.js CHANGED
@@ -512,7 +512,11 @@ class Tabs extends React.Component {
512
512
  dataId,
513
513
  placeHolderText,
514
514
  searchBoxSize,
515
- removeClose
515
+ removeClose,
516
+ isAbsolutePositioningNeeded,
517
+ isRestrictScroll,
518
+ positionsOffset,
519
+ targetOffset
516
520
  } = this.props;
517
521
  const {
518
522
  searchValue
@@ -590,8 +594,12 @@ class Tabs extends React.Component {
590
594
  },
591
595
  boxPosition: position,
592
596
  getRef: getContainerRef,
593
- isBoxPaddingNeed: true,
597
+ isBoxPaddingNeed: false,
594
598
  isArrow: false,
599
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
600
+ isRestrictScroll: isRestrictScroll,
601
+ positionsOffset: positionsOffset,
602
+ targetOffset: targetOffset,
595
603
  ...DropBoxProps,
596
604
  isResponsivePadding: true,
597
605
  needFocusScope: true,
@@ -612,6 +620,8 @@ class Tabs extends React.Component {
612
620
  }
613
621
  },
614
622
  dataId: `${dataId}_search`,
623
+ autoComplete: false,
624
+ name: "search",
615
625
  ...TextBoxIconProps
616
626
  })) : null, /*#__PURE__*/React.createElement(Box, {
617
627
  flexible: true,
@@ -137,7 +137,7 @@
137
137
  }
138
138
 
139
139
  .search {
140
- padding: 0 var(--zd_size20) 0 ;
140
+ padding: var(--zd_size6) var(--zd_size20) 0 ;
141
141
  }
142
142
 
143
143
  .emptyStateContainer {
@@ -163,5 +163,5 @@
163
163
  }
164
164
 
165
165
  .listWrapper {
166
- padding-top: var(--zd_size10) ;
166
+ padding: var(--zd_size10) 0 ;
167
167
  }
@@ -33,7 +33,10 @@ export const Tabs_defaultProps = {
33
33
  dataSelectorId: 'tabs',
34
34
  searchBoxSize: 'small',
35
35
  searchErrorText: 'No results',
36
- placeHolderText: 'Search'
36
+ placeHolderText: 'Search',
37
+ isAbsolutePositioningNeeded: true,
38
+ isRestrictScroll: false,
39
+ moreContainerClass: ''
37
40
  };
38
41
  export const TabWrapper_defaultProps = {
39
42
  hookToDisableInternalState: false,
@@ -94,7 +94,11 @@ export const Tabs_propTypes = {
94
94
  placeHolderText: PropTypes.string,
95
95
  searchBoxSize: PropTypes.string,
96
96
  searchErrorText: PropTypes.string,
97
- closePopupOnly: PropTypes.func
97
+ closePopupOnly: PropTypes.func,
98
+ isAbsolutePositioningNeeded: PropTypes.bool,
99
+ isRestrictScroll: PropTypes.bool,
100
+ positionsOffset: PropTypes.object,
101
+ targetOffset: PropTypes.object
98
102
  };
99
103
  export const TabWrapper_propTypes = {
100
104
  align: PropTypes.oneOf(['vertical', 'horizontal']),
@@ -26,7 +26,7 @@ export default function DropDownSearch(props) {
26
26
  const inputRef = useRef(null); // eslint-disable-next-line func-call-spacing
27
27
 
28
28
  useEffect(() => {
29
- inputRef.current && input.current.focus({
29
+ inputRef.current && inputRef.current.focus({
30
30
  preventScroll: true
31
31
  });
32
32
  }, []);
@@ -1001,6 +1001,10 @@ class AdvancedGroupMultiSelect extends React.Component {
1001
1001
  needResponsive: needResponsive,
1002
1002
  isPadding: isPadding,
1003
1003
  isBoxPaddingNeed: !needSelectAll,
1004
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
1005
+ positionsOffset: positionsOffset,
1006
+ targetOffset: targetOffset,
1007
+ isRestrictScroll: isRestrictScroll,
1004
1008
  htmlId: setAriaId,
1005
1009
  a11y: {
1006
1010
  role: 'listbox',
package/es/v1/Tab/Tabs.js CHANGED
@@ -435,7 +435,11 @@ const Tabs = props => {
435
435
  position,
436
436
  customProps,
437
437
  getCustomDropBoxHeaderPlaceHolder,
438
- dataId
438
+ dataId,
439
+ isAbsolutePositioningNeeded,
440
+ isRestrictScroll,
441
+ positionsOffset,
442
+ targetOffset
439
443
  } = props;
440
444
  let {
441
445
  DropBoxProps = {},
@@ -510,8 +514,12 @@ const Tabs = props => {
510
514
  },
511
515
  boxPosition: position,
512
516
  getRef: getContainerRef,
513
- isBoxPaddingNeed: true,
517
+ isBoxPaddingNeed: false,
514
518
  isArrow: false,
519
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
520
+ isRestrictScroll: isRestrictScroll,
521
+ positionsOffset: positionsOffset,
522
+ targetOffset: targetOffset,
515
523
  ...DropBoxProps,
516
524
  isResponsivePadding: true,
517
525
  needFocusScope: true,
@@ -532,6 +540,8 @@ const Tabs = props => {
532
540
  }
533
541
  },
534
542
  dataId: `${dataId}_search`,
543
+ autoComplete: false,
544
+ name: "search",
535
545
  ...TextBoxIconProps
536
546
  })) : null, /*#__PURE__*/React.createElement(Box, {
537
547
  flexible: true,
@@ -33,7 +33,10 @@ export const Tabs_defaultProps = {
33
33
  dataSelectorId: 'tabs',
34
34
  searchBoxSize: 'small',
35
35
  searchErrorText: 'No results',
36
- placeHolderText: 'Search'
36
+ placeHolderText: 'Search',
37
+ isAbsolutePositioningNeeded: true,
38
+ isRestrictScroll: false,
39
+ moreContainerClass: ''
37
40
  };
38
41
  export const TabWrapper_defaultProps = {
39
42
  hookToDisableInternalState: false,
@@ -94,7 +94,11 @@ export const Tabs_propTypes = {
94
94
  placeHolderText: PropTypes.string,
95
95
  searchBoxSize: PropTypes.string,
96
96
  searchErrorText: PropTypes.string,
97
- closePopupOnly: PropTypes.func
97
+ closePopupOnly: PropTypes.func,
98
+ isAbsolutePositioningNeeded: PropTypes.bool,
99
+ isRestrictScroll: PropTypes.bool,
100
+ positionsOffset: PropTypes.object,
101
+ targetOffset: PropTypes.object
98
102
  };
99
103
  export const TabWrapper_propTypes = {
100
104
  align: PropTypes.oneOf(['vertical', 'horizontal']),
@@ -137,7 +137,7 @@
137
137
  }
138
138
 
139
139
  .search {
140
- padding: 0 var(--zd_size20) 0 ;
140
+ padding: var(--zd_size6) var(--zd_size20) 0 ;
141
141
  }
142
142
 
143
143
  .emptyStateContainer {
@@ -163,5 +163,5 @@
163
163
  }
164
164
 
165
165
  .listWrapper {
166
- padding-top: var(--zd_size10) ;
166
+ padding: var(--zd_size10) 0 ;
167
167
  }
package/lib/Tab/Tabs.js CHANGED
@@ -578,7 +578,11 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
578
578
  dataId = _this$props9.dataId,
579
579
  placeHolderText = _this$props9.placeHolderText,
580
580
  searchBoxSize = _this$props9.searchBoxSize,
581
- removeClose = _this$props9.removeClose;
581
+ removeClose = _this$props9.removeClose,
582
+ isAbsolutePositioningNeeded = _this$props9.isAbsolutePositioningNeeded,
583
+ isRestrictScroll = _this$props9.isRestrictScroll,
584
+ positionsOffset = _this$props9.positionsOffset,
585
+ targetOffset = _this$props9.targetOffset;
582
586
  var searchValue = this.state.searchValue;
583
587
  var _customProps$DropBoxP = customProps.DropBoxProps,
584
588
  DropBoxProps = _customProps$DropBoxP === void 0 ? {} : _customProps$DropBoxP,
@@ -652,8 +656,12 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
652
656
  },
653
657
  boxPosition: position,
654
658
  getRef: getContainerRef,
655
- isBoxPaddingNeed: true,
656
- isArrow: false
659
+ isBoxPaddingNeed: false,
660
+ isArrow: false,
661
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
662
+ isRestrictScroll: isRestrictScroll,
663
+ positionsOffset: positionsOffset,
664
+ targetOffset: targetOffset
657
665
  }, DropBoxProps, {
658
666
  isResponsivePadding: true,
659
667
  needFocusScope: true,
@@ -673,7 +681,9 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
673
681
  'data-a11y-autofocus': true
674
682
  }
675
683
  },
676
- dataId: "".concat(dataId, "_search")
684
+ dataId: "".concat(dataId, "_search"),
685
+ autoComplete: false,
686
+ name: "search"
677
687
  }, TextBoxIconProps))) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
678
688
  flexible: true,
679
689
  shrink: true,
@@ -137,7 +137,7 @@
137
137
  }
138
138
 
139
139
  .search {
140
- padding: 0 var(--zd_size20) 0 ;
140
+ padding: var(--zd_size6) var(--zd_size20) 0 ;
141
141
  }
142
142
 
143
143
  .emptyStateContainer {
@@ -163,5 +163,5 @@
163
163
  }
164
164
 
165
165
  .listWrapper {
166
- padding-top: var(--zd_size10) ;
166
+ padding: var(--zd_size10) 0 ;
167
167
  }
@@ -42,7 +42,10 @@ var Tabs_defaultProps = {
42
42
  dataSelectorId: 'tabs',
43
43
  searchBoxSize: 'small',
44
44
  searchErrorText: 'No results',
45
- placeHolderText: 'Search'
45
+ placeHolderText: 'Search',
46
+ isAbsolutePositioningNeeded: true,
47
+ isRestrictScroll: false,
48
+ moreContainerClass: ''
46
49
  };
47
50
  exports.Tabs_defaultProps = Tabs_defaultProps;
48
51
  var TabWrapper_defaultProps = {
@@ -107,7 +107,11 @@ var Tabs_propTypes = {
107
107
  placeHolderText: _propTypes["default"].string,
108
108
  searchBoxSize: _propTypes["default"].string,
109
109
  searchErrorText: _propTypes["default"].string,
110
- closePopupOnly: _propTypes["default"].func
110
+ closePopupOnly: _propTypes["default"].func,
111
+ isAbsolutePositioningNeeded: _propTypes["default"].bool,
112
+ isRestrictScroll: _propTypes["default"].bool,
113
+ positionsOffset: _propTypes["default"].object,
114
+ targetOffset: _propTypes["default"].object
111
115
  };
112
116
  exports.Tabs_propTypes = Tabs_propTypes;
113
117
  var TabWrapper_propTypes = {
@@ -44,7 +44,7 @@ function DropDownSearch(props) {
44
44
  var inputRef = (0, _react.useRef)(null); // eslint-disable-next-line func-call-spacing
45
45
 
46
46
  (0, _react.useEffect)(function () {
47
- inputRef.current && input.current.focus({
47
+ inputRef.current && inputRef.current.focus({
48
48
  preventScroll: true
49
49
  });
50
50
  }, []);
@@ -1087,6 +1087,10 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
1087
1087
  needResponsive: needResponsive,
1088
1088
  isPadding: isPadding,
1089
1089
  isBoxPaddingNeed: !needSelectAll,
1090
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
1091
+ positionsOffset: positionsOffset,
1092
+ targetOffset: targetOffset,
1093
+ isRestrictScroll: isRestrictScroll,
1090
1094
  htmlId: setAriaId,
1091
1095
  a11y: {
1092
1096
  role: 'listbox',
@@ -507,7 +507,11 @@ var Tabs = function Tabs(props) {
507
507
  position = props.position,
508
508
  customProps = props.customProps,
509
509
  getCustomDropBoxHeaderPlaceHolder = props.getCustomDropBoxHeaderPlaceHolder,
510
- dataId = props.dataId;
510
+ dataId = props.dataId,
511
+ isAbsolutePositioningNeeded = props.isAbsolutePositioningNeeded,
512
+ isRestrictScroll = props.isRestrictScroll,
513
+ positionsOffset = props.positionsOffset,
514
+ targetOffset = props.targetOffset;
511
515
  var _customProps$DropBoxP = customProps.DropBoxProps,
512
516
  DropBoxProps = _customProps$DropBoxP === void 0 ? {} : _customProps$DropBoxP,
513
517
  _customProps$ListItem = customProps.ListItemProps,
@@ -580,8 +584,12 @@ var Tabs = function Tabs(props) {
580
584
  },
581
585
  boxPosition: position,
582
586
  getRef: getContainerRef,
583
- isBoxPaddingNeed: true,
584
- isArrow: false
587
+ isBoxPaddingNeed: false,
588
+ isArrow: false,
589
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
590
+ isRestrictScroll: isRestrictScroll,
591
+ positionsOffset: positionsOffset,
592
+ targetOffset: targetOffset
585
593
  }, DropBoxProps, {
586
594
  isResponsivePadding: true,
587
595
  needFocusScope: true,
@@ -601,7 +609,9 @@ var Tabs = function Tabs(props) {
601
609
  'data-a11y-autofocus': true
602
610
  }
603
611
  },
604
- dataId: "".concat(dataId, "_search")
612
+ dataId: "".concat(dataId, "_search"),
613
+ autoComplete: false,
614
+ name: "search"
605
615
  }, TextBoxIconProps))) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
606
616
  flexible: true,
607
617
  shrink: true,
@@ -42,7 +42,10 @@ var Tabs_defaultProps = {
42
42
  dataSelectorId: 'tabs',
43
43
  searchBoxSize: 'small',
44
44
  searchErrorText: 'No results',
45
- placeHolderText: 'Search'
45
+ placeHolderText: 'Search',
46
+ isAbsolutePositioningNeeded: true,
47
+ isRestrictScroll: false,
48
+ moreContainerClass: ''
46
49
  };
47
50
  exports.Tabs_defaultProps = Tabs_defaultProps;
48
51
  var TabWrapper_defaultProps = {
@@ -107,7 +107,11 @@ var Tabs_propTypes = {
107
107
  placeHolderText: _propTypes["default"].string,
108
108
  searchBoxSize: _propTypes["default"].string,
109
109
  searchErrorText: _propTypes["default"].string,
110
- closePopupOnly: _propTypes["default"].func
110
+ closePopupOnly: _propTypes["default"].func,
111
+ isAbsolutePositioningNeeded: _propTypes["default"].bool,
112
+ isRestrictScroll: _propTypes["default"].bool,
113
+ positionsOffset: _propTypes["default"].object,
114
+ targetOffset: _propTypes["default"].object
111
115
  };
112
116
  exports.Tabs_propTypes = Tabs_propTypes;
113
117
  var TabWrapper_propTypes = {
@@ -137,7 +137,7 @@
137
137
  }
138
138
 
139
139
  .search {
140
- padding: 0 var(--zd_size20) 0 ;
140
+ padding: var(--zd_size6) var(--zd_size20) 0 ;
141
141
  }
142
142
 
143
143
  .emptyStateContainer {
@@ -163,5 +163,5 @@
163
163
  }
164
164
 
165
165
  .listWrapper {
166
- padding-top: var(--zd_size10) ;
166
+ padding: var(--zd_size10) 0 ;
167
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.2.43",
3
+ "version": "1.2.44",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -68,10 +68,10 @@
68
68
  "@zohodesk-private/css-variable-migrator": "^1.0.7",
69
69
  "@zohodesk-private/node-plugins": "1.1.8",
70
70
  "@zohodesk-private/react-prop-validator": "1.2.3",
71
- "@zohodesk/a11y": "2.2.5",
71
+ "@zohodesk/a11y": "2.2.6",
72
72
  "@zohodesk/docstool": "1.0.0-alpha-2",
73
73
  "@zohodesk/hooks": "2.0.5",
74
- "@zohodesk/icons": "1.0.59",
74
+ "@zohodesk/icons": "1.0.60",
75
75
  "@zohodesk/svg": "1.1.19",
76
76
  "@zohodesk/utils": "1.3.14",
77
77
  "@zohodesk/variables": "1.0.0",
@@ -86,7 +86,7 @@
86
86
  "selectn": "1.1.2"
87
87
  },
88
88
  "peerDependencies": {
89
- "@zohodesk/icons": "1.0.59",
89
+ "@zohodesk/icons": "1.0.60",
90
90
  "@zohodesk/variables": "1.0.0",
91
91
  "@zohodesk/svg": "1.1.19",
92
92
  "@zohodesk/virtualizer": "1.0.3",
@@ -94,6 +94,6 @@
94
94
  "react-sortable-hoc": "^0.8.3",
95
95
  "@zohodesk/hooks": "2.0.5",
96
96
  "@zohodesk/utils": "1.3.14",
97
- "@zohodesk/a11y": "2.2.5"
97
+ "@zohodesk/a11y": "2.2.6"
98
98
  }
99
99
  }