@zohodesk/components 1.0.0-temp-252 → 1.0.0-temp-253

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
@@ -1,9 +1,6 @@
1
1
  # DOT Style Guide
2
2
 
3
3
  Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
4
- # 1.6.12
5
-
6
- - Added support for custom component suggestion status in SelectDropdown.
7
4
 
8
5
  # 1.6.12
9
6
 
@@ -27,6 +27,7 @@ export default function DropBoxElement(props) {
27
27
  tabIndex,
28
28
  palette,
29
29
  subContainerRef,
30
+ getSubContainerRef,
30
31
  customStyle,
31
32
  animationStyle
32
33
  } = props;
@@ -54,6 +55,14 @@ export default function DropBoxElement(props) {
54
55
  }
55
56
  };
56
57
 
58
+ const setSubContainerRef = ele => {
59
+ if (subContainerRef) {
60
+ subContainerRef.current = ele;
61
+ }
62
+
63
+ getSubContainerRef && getSubContainerRef(ele);
64
+ };
65
+
57
66
  if (!isAbsolutePositioningNeeded && size === 'default' && !isActive) {
58
67
  isAbsolute = true;
59
68
  }
@@ -120,7 +129,7 @@ export default function DropBoxElement(props) {
120
129
  "data-id": `${dataId}_subcontainer`,
121
130
  "data-test-id": `${dataId}_subcontainer`,
122
131
  "data-selector-id": `${dataSelectorId}_subcontainer`,
123
- ref: subContainerRef
132
+ ref: setSubContainerRef
124
133
  }, isModel ? /*#__PURE__*/React.createElement("div", {
125
134
  className: style.closeBar
126
135
  }) : null, isArrow && !isModel && /*#__PURE__*/React.createElement("div", {
@@ -13,9 +13,13 @@
13
13
 
14
14
  .subContainer {
15
15
  position: relative;
16
+ display: flex;
17
+ flex-direction: column;
18
+ /* overflow: hidden; */
16
19
  border-radius: var(--dropbox_border_radius);
17
20
  padding: var(--dropbox_padding);
18
21
  box-shadow: var(--dropbox_box_shadow);
22
+
19
23
  }
20
24
 
21
25
  .defaultPalette,
@@ -430,8 +434,8 @@
430
434
  height: 6px;
431
435
  /*css:theme-validation:ignore*/
432
436
  width: 20% ;
433
- margin-block:0 var(--zd_size10) ;
434
- margin-inline:auto ;
437
+ margin-block: 0 var(--zd_size10) ;
438
+ margin-inline: auto ;
435
439
  border-radius: 5px;
436
440
  background-color: var(--dropbox_mob_close_bg_color);
437
441
  cursor: pointer;
@@ -443,4 +447,4 @@
443
447
 
444
448
  .darkPalette {
445
449
  --dropbox_bg_color: var(--zdt_dropbox_dark_bg);
446
- }
450
+ }
@@ -47,5 +47,6 @@ export const DropBoxElementPropTypes = {
47
47
  positionsOffset: PropTypes.object,
48
48
  targetOffset: PropTypes.object,
49
49
  zIndexStyle: PropTypes.object,
50
- subContainerRef: PropTypes.func
50
+ subContainerRef: PropTypes.func,
51
+ getSubContainerRef: PropTypes.func
51
52
  };
@@ -57,6 +57,7 @@ export default class ResponsiveDropBox extends Component {
57
57
  return /*#__PURE__*/React.createElement(Container, {
58
58
  alignBox: alignBox,
59
59
  isCover: false,
60
+ flexible: true,
60
61
  className: `${tabletMode ? style.dropBoxContainer : ''} ${tabletMode && isResponsivePadding ? style.boxPadding : ''} ${customResponsiveContainer}`
61
62
  }, children);
62
63
  }));
@@ -813,8 +813,7 @@ export class SelectComponent extends Component {
813
813
  renderCustomSearchClearComponent,
814
814
  renderCustomSelectedValue,
815
815
  inputFieldLineA11y,
816
- customClass,
817
- renderSuggestedStatus
816
+ customClass
818
817
  } = this.props;
819
818
  let {
820
819
  TextBoxIcon_i18n,
@@ -845,8 +844,7 @@ export class SelectComponent extends Component {
845
844
  } = customProps;
846
845
  const {
847
846
  dropBox: dropBoxClass = '',
848
- cardContent: cardContentClass = '',
849
- suggestedStatusWrapper = ''
847
+ cardContent: cardContentClass = ''
850
848
  } = customClass;
851
849
  const inputFieldLineA11yAttributes = this.getInputFieldLineA11y({
852
850
  setAriaId,
@@ -1023,90 +1021,81 @@ export class SelectComponent extends Component {
1023
1021
  isRestrictScroll: isRestrictScroll,
1024
1022
  portalId: dropBoxPortalId,
1025
1023
  customClass: {
1026
- customDropBox: `${dropBoxClass} ${renderSuggestedStatus ? style.dropBoxWithSuggestedStatus : ''}`
1024
+ customDropBox: dropBoxClass
1027
1025
  }
1028
- }, (() => {
1029
- const dropdownContent = isLoading ? /*#__PURE__*/React.createElement(Container, {
1030
- align: "both",
1031
- className: style.loader
1032
- }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, !getChildren ? /*#__PURE__*/React.createElement(Box, {
1033
- flexible: true
1034
- }, /*#__PURE__*/React.createElement(Card, {
1035
- onScroll: this.handleScroll
1036
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
1037
- className: `${style.search} ${style[size]}`
1038
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
1039
- a11y: {
1040
- ariaControls: setAriaId,
1041
- ariaAutocomplete: 'list',
1042
- ariaDescribedby: ariaErrorId
1043
- },
1044
- inputRef: this.searchInputRef,
1045
- maxLength: maxLength,
1046
- onChange: this.handleSearch,
1047
- onKeyDown: this.handleKeyDown,
1048
- placeHolder: searchBoxPlaceHolder,
1049
- size: searchBoxSize,
1050
- value: searchStr,
1051
- onClear: this.handleClearSearch,
1052
- dataId: `${dataId}_search`,
1053
- i18nKeys: TextBoxIcon_i18n,
1054
- autoComplete: autoComplete,
1055
- customProps: {
1056
- TextBoxProps: DropdownSearchTextBoxProps
1057
- },
1058
- renderCustomClearComponent: renderCustomSearchClearComponent
1059
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
1060
- shrink: true,
1061
- customClass: `
1026
+ }, isLoading ? /*#__PURE__*/React.createElement(Container, {
1027
+ align: "both",
1028
+ className: style.loader
1029
+ }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, !getChildren ? /*#__PURE__*/React.createElement(Box, {
1030
+ flexible: true
1031
+ }, /*#__PURE__*/React.createElement(Card, {
1032
+ onScroll: this.handleScroll
1033
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
1034
+ className: `${style.search} ${style[size]}`
1035
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
1036
+ a11y: {
1037
+ ariaControls: setAriaId,
1038
+ ariaAutocomplete: 'list',
1039
+ ariaDescribedby: ariaErrorId
1040
+ },
1041
+ inputRef: this.searchInputRef,
1042
+ maxLength: maxLength,
1043
+ onChange: this.handleSearch,
1044
+ onKeyDown: this.handleKeyDown,
1045
+ placeHolder: searchBoxPlaceHolder,
1046
+ size: searchBoxSize,
1047
+ value: searchStr,
1048
+ onClear: this.handleClearSearch,
1049
+ dataId: `${dataId}_search`,
1050
+ i18nKeys: TextBoxIcon_i18n,
1051
+ autoComplete: autoComplete,
1052
+ customProps: {
1053
+ TextBoxProps: DropdownSearchTextBoxProps
1054
+ },
1055
+ renderCustomClearComponent: renderCustomSearchClearComponent
1056
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
1057
+ shrink: true,
1058
+ customClass: `
1062
1059
  ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
1063
- eleRef: this.suggestionContainerRef
1064
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
1065
- key: searchStr.trim(),
1066
- activeId: selectedId,
1067
- isVirtualizerEnabled: isVirtualizerEnabled,
1068
- getVirtualizerPublicMethods: this.getVirtualizerPublicMethods,
1069
- setVirtualizerContainerRefFunction: this.setSuggestionsVirtualizerContainerRefFunction,
1070
- suggestions: suggestions,
1071
- getRef: this.suggestionItemRef,
1072
- hoverOption: hoverIndex,
1073
- onClick: this.handleChange,
1074
- onMouseEnter: this.handleMouseEnter,
1075
- dataId: `${dataId}_Options`,
1076
- needTick: needTick,
1077
- needBorder: needListBorder,
1078
- selectedOptions: [selectedId],
1079
- className: `${tabletMode ? style.responsivelistItemContainer : style.listItemContainer}`,
1080
- listItemSize: listItemSize,
1081
- htmlId: setAriaId,
1082
- a11y: {
1083
- ariaParentRole: 'listbox',
1084
- role: 'option'
1085
- }
1086
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
1087
- isLoading: isFetchingOptions,
1088
- options: options,
1089
- searchString: searchStr,
1090
- suggestions: suggestions,
1091
- dataId: dataId,
1092
- renderCustomEmptyState: renderCustomEmptyState,
1093
- getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
1094
- i18nKeys: i18nKeys,
1095
- htmlId: ariaErrorId
1096
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
1097
- isCover: false,
1098
- align: "both"
1099
- }, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : /*#__PURE__*/React.createElement(Box, {
1100
- flexible: true
1101
- }, getChildren()));
1102
- return renderSuggestedStatus ? /*#__PURE__*/React.createElement("div", {
1103
- className: style.dropBoxListContainer
1104
- }, /*#__PURE__*/React.createElement("div", {
1105
- className: `${suggestedStatusWrapper} ${style.suggestedStatusContainer}`
1106
- }, renderSuggestedStatus), /*#__PURE__*/React.createElement("div", {
1107
- className: style.dropdownOptions
1108
- }, dropdownContent)) : dropdownContent;
1109
- })());
1060
+ eleRef: this.suggestionContainerRef
1061
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
1062
+ key: searchStr.trim(),
1063
+ activeId: selectedId,
1064
+ isVirtualizerEnabled: isVirtualizerEnabled,
1065
+ getVirtualizerPublicMethods: this.getVirtualizerPublicMethods,
1066
+ setVirtualizerContainerRefFunction: this.setSuggestionsVirtualizerContainerRefFunction,
1067
+ suggestions: suggestions,
1068
+ getRef: this.suggestionItemRef,
1069
+ hoverOption: hoverIndex,
1070
+ onClick: this.handleChange,
1071
+ onMouseEnter: this.handleMouseEnter,
1072
+ dataId: `${dataId}_Options`,
1073
+ needTick: needTick,
1074
+ needBorder: needListBorder,
1075
+ selectedOptions: [selectedId],
1076
+ className: `${tabletMode ? style.responsivelistItemContainer : style.listItemContainer}`,
1077
+ listItemSize: listItemSize,
1078
+ htmlId: setAriaId,
1079
+ a11y: {
1080
+ ariaParentRole: 'listbox',
1081
+ role: 'option'
1082
+ }
1083
+ }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
1084
+ isLoading: isFetchingOptions,
1085
+ options: options,
1086
+ searchString: searchStr,
1087
+ suggestions: suggestions,
1088
+ dataId: dataId,
1089
+ renderCustomEmptyState: renderCustomEmptyState,
1090
+ getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
1091
+ i18nKeys: i18nKeys,
1092
+ htmlId: ariaErrorId
1093
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
1094
+ isCover: false,
1095
+ align: "both"
1096
+ }, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : /*#__PURE__*/React.createElement(Box, {
1097
+ flexible: true
1098
+ }, getChildren())));
1110
1099
  }) : null);
1111
1100
  }
1112
1101
 
@@ -22,12 +22,12 @@
22
22
 
23
23
  .box_small .emptyState {
24
24
  padding-block: var(--zd_size12) ;
25
- padding-inline: var(--zd_size6) ;
25
+ padding-inline:var(--zd_size6) ;
26
26
  }
27
27
 
28
28
  .box_medium .emptyState {
29
29
  padding-block: var(--zd_size12) ;
30
- padding-inline: var(--zd_size15) ;
30
+ padding-inline:var(--zd_size15) ;
31
31
  }
32
32
 
33
33
  .hide {
@@ -37,7 +37,6 @@
37
37
  .container {
38
38
  position: relative;
39
39
  }
40
-
41
40
  /* css:lineheight-validation:ignore */
42
41
  .arrowIcon {
43
42
  height: var(--zd_size8) ;
@@ -46,12 +45,12 @@
46
45
 
47
46
  .small.search {
48
47
  padding-block: 0 ;
49
- padding-inline: var(--zd_size5) ;
48
+ padding-inline:var(--zd_size5) ;
50
49
  }
51
50
 
52
51
  .medium.search {
53
52
  padding-block: var(--zd_size3) 0 ;
54
- padding-inline: var(--zd_size20) ;
53
+ padding-inline:var(--zd_size20) ;
55
54
  }
56
55
 
57
56
  .title {
@@ -60,17 +59,17 @@
60
59
 
61
60
  .groupTitle {
62
61
  margin-block: var(--zd_size6) ;
63
- margin-inline: 0 ;
62
+ margin-inline:0 ;
64
63
  }
65
64
 
66
65
  .listItemContainer {
67
66
  padding-block: var(--zd_size10) ;
68
- padding-inline: 0 ;
67
+ padding-inline:0 ;
69
68
  }
70
69
 
71
70
  .responsivelistItemContainer {
72
71
  padding-block: var(--zd_size10) 0 ;
73
- padding-inline: 0 ;
72
+ padding-inline:0 ;
74
73
  }
75
74
 
76
75
  .readonly {
@@ -112,19 +111,18 @@
112
111
 
113
112
  .dropBoxList {
114
113
  padding-block: var(--zd_size10) ;
115
- padding-inline: 0 ;
114
+ padding-inline:0 ;
116
115
  }
117
116
 
118
117
  .responsivedropBoxList {
119
118
  padding-block: var(--zd_size10) 0 ;
120
- padding-inline: 0 ;
119
+ padding-inline:0 ;
121
120
  }
122
121
 
123
122
  .rotate {
124
123
  transform: rotateX(180deg);
125
124
  }
126
-
127
- .rightPlaceholder {
125
+ .rightPlaceholder{
128
126
  height: 100% ;
129
127
  }
130
128
 
@@ -143,29 +141,3 @@
143
141
  .loader {
144
142
  padding: var(--zd_size10) ;
145
143
  }
146
-
147
- .dropBoxWithSuggestedStatus {
148
- border-radius: 7px;
149
- }
150
-
151
- .dropBoxListContainer {
152
- width: 100% ;
153
- border-radius: 7px;
154
- padding: var(--zd_size10) ;
155
- border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
156
- background: var(--zdt_statusdropdown_wrapper_container_bg);
157
- box-shadow: var(--zd_bs_statusdropdown_wrapper_container);
158
- }
159
-
160
- .dropdownOptions {
161
- padding-inline: var(--zd_size1) ;
162
- padding-block: var(--zd_size1) ;
163
- background-color: var(--zdt_commentList_normal_bg);
164
- border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
165
- border-radius: 7px;
166
- }
167
-
168
- .suggestedStatusContainer {
169
- margin-block-end: var(--zd_size6) ;
170
- margin-inline: var(--zd_size1) ;
171
- }
@@ -38,8 +38,7 @@ export const Select_defaultProps = {
38
38
  isAbsolutePositioningNeeded: true,
39
39
  allowValueFallback: true,
40
40
  inputFieldLineA11y: {},
41
- customClass: {},
42
- renderSuggestedStatus: null
41
+ customClass: {}
43
42
  };
44
43
  export const GroupSelect_defaultProps = {
45
44
  animationStyle: 'bounce',
@@ -108,8 +108,7 @@ export const Select_propTypes = {
108
108
  customClass: PropTypes.shape({
109
109
  dropBox: PropTypes.string,
110
110
  cardContent: PropTypes.string
111
- }),
112
- renderSuggestedStatus: PropTypes.node
111
+ })
113
112
  };
114
113
  export const GroupSelect_propTypes = {
115
114
  groupedOptions: PropTypes.arrayOf(PropTypes.shape({
@@ -43,6 +43,7 @@ function DropBoxElement(props) {
43
43
  tabIndex = props.tabIndex,
44
44
  palette = props.palette,
45
45
  subContainerRef = props.subContainerRef,
46
+ getSubContainerRef = props.getSubContainerRef,
46
47
  customStyle = props.customStyle,
47
48
  animationStyle = props.animationStyle;
48
49
  var isAbsolute = isAbsolutePositioningNeeded;
@@ -67,6 +68,14 @@ function DropBoxElement(props) {
67
68
  }
68
69
  };
69
70
 
71
+ var setSubContainerRef = function setSubContainerRef(ele) {
72
+ if (subContainerRef) {
73
+ subContainerRef.current = ele;
74
+ }
75
+
76
+ getSubContainerRef && getSubContainerRef(ele);
77
+ };
78
+
70
79
  if (!isAbsolutePositioningNeeded && size === 'default' && !isActive) {
71
80
  isAbsolute = true;
72
81
  }
@@ -132,7 +141,7 @@ function DropBoxElement(props) {
132
141
  "data-id": "".concat(dataId, "_subcontainer"),
133
142
  "data-test-id": "".concat(dataId, "_subcontainer"),
134
143
  "data-selector-id": "".concat(dataSelectorId, "_subcontainer"),
135
- ref: subContainerRef
144
+ ref: setSubContainerRef
136
145
  }, isModel ? /*#__PURE__*/_react["default"].createElement("div", {
137
146
  className: _DropBoxElementModule["default"].closeBar
138
147
  }) : null, isArrow && !isModel && /*#__PURE__*/_react["default"].createElement("div", {
@@ -13,9 +13,13 @@
13
13
 
14
14
  .subContainer {
15
15
  position: relative;
16
+ display: flex;
17
+ flex-direction: column;
18
+ /* overflow: hidden; */
16
19
  border-radius: var(--dropbox_border_radius);
17
20
  padding: var(--dropbox_padding);
18
21
  box-shadow: var(--dropbox_box_shadow);
22
+
19
23
  }
20
24
 
21
25
  .defaultPalette,
@@ -430,8 +434,8 @@
430
434
  height: 6px;
431
435
  /*css:theme-validation:ignore*/
432
436
  width: 20% ;
433
- margin-block:0 var(--zd_size10) ;
434
- margin-inline:auto ;
437
+ margin-block: 0 var(--zd_size10) ;
438
+ margin-inline: auto ;
435
439
  border-radius: 5px;
436
440
  background-color: var(--dropbox_mob_close_bg_color);
437
441
  cursor: pointer;
@@ -443,4 +447,4 @@
443
447
 
444
448
  .darkPalette {
445
449
  --dropbox_bg_color: var(--zdt_dropbox_dark_bg);
446
- }
450
+ }
@@ -57,6 +57,7 @@ var DropBoxElementPropTypes = {
57
57
  positionsOffset: _propTypes["default"].object,
58
58
  targetOffset: _propTypes["default"].object,
59
59
  zIndexStyle: _propTypes["default"].object,
60
- subContainerRef: _propTypes["default"].func
60
+ subContainerRef: _propTypes["default"].func,
61
+ getSubContainerRef: _propTypes["default"].func
61
62
  };
62
63
  exports.DropBoxElementPropTypes = DropBoxElementPropTypes;
@@ -110,6 +110,7 @@ var ResponsiveDropBox = /*#__PURE__*/function (_Component) {
110
110
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
111
111
  alignBox: alignBox,
112
112
  isCover: false,
113
+ flexible: true,
113
114
  className: "".concat(tabletMode ? _ResponsiveDropBoxModule["default"].dropBoxContainer : '', " ").concat(tabletMode && isResponsivePadding ? _ResponsiveDropBoxModule["default"].boxPadding : '', " ").concat(customResponsiveContainer)
114
115
  }, children);
115
116
  }));
@@ -860,8 +860,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
860
860
  renderCustomSearchClearComponent = _this$props11.renderCustomSearchClearComponent,
861
861
  renderCustomSelectedValue = _this$props11.renderCustomSelectedValue,
862
862
  inputFieldLineA11y = _this$props11.inputFieldLineA11y,
863
- customClass = _this$props11.customClass,
864
- renderSuggestedStatus = _this$props11.renderSuggestedStatus;
863
+ customClass = _this$props11.customClass;
865
864
  var _i18nKeys = i18nKeys,
866
865
  TextBoxIcon_i18n = _i18nKeys.TextBoxIcon_i18n,
867
866
  _i18nKeys$TextBox_all = _i18nKeys.TextBox_ally_label,
@@ -894,9 +893,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
894
893
  var _customClass$dropBox = customClass.dropBox,
895
894
  dropBoxClass = _customClass$dropBox === void 0 ? '' : _customClass$dropBox,
896
895
  _customClass$cardCont = customClass.cardContent,
897
- cardContentClass = _customClass$cardCont === void 0 ? '' : _customClass$cardCont,
898
- _customClass$suggeste = customClass.suggestedStatusWrapper,
899
- suggestedStatusWrapper = _customClass$suggeste === void 0 ? '' : _customClass$suggeste;
896
+ cardContentClass = _customClass$cardCont === void 0 ? '' : _customClass$cardCont;
900
897
  var inputFieldLineA11yAttributes = this.getInputFieldLineA11y({
901
898
  setAriaId: setAriaId,
902
899
  isReadOnly: isReadOnly,
@@ -1068,89 +1065,80 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
1068
1065
  isRestrictScroll: isRestrictScroll,
1069
1066
  portalId: dropBoxPortalId,
1070
1067
  customClass: {
1071
- customDropBox: "".concat(dropBoxClass, " ").concat(renderSuggestedStatus ? _SelectModule["default"].dropBoxWithSuggestedStatus : '')
1068
+ customDropBox: dropBoxClass
1072
1069
  }
1073
- }, function () {
1074
- var dropdownContent = isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
1075
- align: "both",
1076
- className: _SelectModule["default"].loader
1077
- }, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, !getChildren ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
1078
- flexible: true
1079
- }, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
1080
- onScroll: _this7.handleScroll
1081
- }, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
1082
- className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
1083
- }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
1084
- a11y: {
1085
- ariaControls: setAriaId,
1086
- ariaAutocomplete: 'list',
1087
- ariaDescribedby: ariaErrorId
1088
- },
1089
- inputRef: _this7.searchInputRef,
1090
- maxLength: maxLength,
1091
- onChange: _this7.handleSearch,
1092
- onKeyDown: _this7.handleKeyDown,
1093
- placeHolder: searchBoxPlaceHolder,
1094
- size: searchBoxSize,
1095
- value: searchStr,
1096
- onClear: _this7.handleClearSearch,
1097
- dataId: "".concat(dataId, "_search"),
1098
- i18nKeys: TextBoxIcon_i18n,
1099
- autoComplete: autoComplete,
1100
- customProps: {
1101
- TextBoxProps: DropdownSearchTextBoxProps
1102
- },
1103
- renderCustomClearComponent: renderCustomSearchClearComponent
1104
- }))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
1105
- shrink: true,
1106
- customClass: "\n ".concat(!tabletMode && dropBoxSize ? _SelectModule["default"][dropBoxSize] : '', " ").concat(cardContentClass),
1107
- eleRef: _this7.suggestionContainerRef
1108
- }, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
1109
- key: searchStr.trim(),
1110
- activeId: selectedId,
1111
- isVirtualizerEnabled: isVirtualizerEnabled,
1112
- getVirtualizerPublicMethods: _this7.getVirtualizerPublicMethods,
1113
- setVirtualizerContainerRefFunction: _this7.setSuggestionsVirtualizerContainerRefFunction,
1114
- suggestions: suggestions,
1115
- getRef: _this7.suggestionItemRef,
1116
- hoverOption: hoverIndex,
1117
- onClick: _this7.handleChange,
1118
- onMouseEnter: _this7.handleMouseEnter,
1119
- dataId: "".concat(dataId, "_Options"),
1120
- needTick: needTick,
1121
- needBorder: needListBorder,
1122
- selectedOptions: [selectedId],
1123
- className: "".concat(tabletMode ? _SelectModule["default"].responsivelistItemContainer : _SelectModule["default"].listItemContainer),
1124
- listItemSize: listItemSize,
1125
- htmlId: setAriaId,
1126
- a11y: {
1127
- ariaParentRole: 'listbox',
1128
- role: 'option'
1129
- }
1130
- }, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
1131
- isLoading: isFetchingOptions,
1132
- options: options,
1133
- searchString: searchStr,
1134
- suggestions: suggestions,
1135
- dataId: dataId,
1136
- renderCustomEmptyState: renderCustomEmptyState,
1137
- getCustomEmptyState: getCustomEmptyState ? _this7.handleGetAddNewOptionText : null,
1138
- i18nKeys: i18nKeys,
1139
- htmlId: ariaErrorId
1140
- }), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
1141
- isCover: false,
1142
- align: "both"
1143
- }, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null))), getFooter ? /*#__PURE__*/_react["default"].createElement(_Card.CardFooter, null, getFooter()) : null)) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
1144
- flexible: true
1145
- }, getChildren()));
1146
- return renderSuggestedStatus ? /*#__PURE__*/_react["default"].createElement("div", {
1147
- className: _SelectModule["default"].dropBoxListContainer
1148
- }, /*#__PURE__*/_react["default"].createElement("div", {
1149
- className: "".concat(suggestedStatusWrapper, " ").concat(_SelectModule["default"].suggestedStatusContainer)
1150
- }, renderSuggestedStatus), /*#__PURE__*/_react["default"].createElement("div", {
1151
- className: _SelectModule["default"].dropdownOptions
1152
- }, dropdownContent)) : dropdownContent;
1153
- }());
1070
+ }, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
1071
+ align: "both",
1072
+ className: _SelectModule["default"].loader
1073
+ }, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, !getChildren ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
1074
+ flexible: true
1075
+ }, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
1076
+ onScroll: _this7.handleScroll
1077
+ }, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
1078
+ className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
1079
+ }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
1080
+ a11y: {
1081
+ ariaControls: setAriaId,
1082
+ ariaAutocomplete: 'list',
1083
+ ariaDescribedby: ariaErrorId
1084
+ },
1085
+ inputRef: _this7.searchInputRef,
1086
+ maxLength: maxLength,
1087
+ onChange: _this7.handleSearch,
1088
+ onKeyDown: _this7.handleKeyDown,
1089
+ placeHolder: searchBoxPlaceHolder,
1090
+ size: searchBoxSize,
1091
+ value: searchStr,
1092
+ onClear: _this7.handleClearSearch,
1093
+ dataId: "".concat(dataId, "_search"),
1094
+ i18nKeys: TextBoxIcon_i18n,
1095
+ autoComplete: autoComplete,
1096
+ customProps: {
1097
+ TextBoxProps: DropdownSearchTextBoxProps
1098
+ },
1099
+ renderCustomClearComponent: renderCustomSearchClearComponent
1100
+ }))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
1101
+ shrink: true,
1102
+ customClass: "\n ".concat(!tabletMode && dropBoxSize ? _SelectModule["default"][dropBoxSize] : '', " ").concat(cardContentClass),
1103
+ eleRef: _this7.suggestionContainerRef
1104
+ }, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
1105
+ key: searchStr.trim(),
1106
+ activeId: selectedId,
1107
+ isVirtualizerEnabled: isVirtualizerEnabled,
1108
+ getVirtualizerPublicMethods: _this7.getVirtualizerPublicMethods,
1109
+ setVirtualizerContainerRefFunction: _this7.setSuggestionsVirtualizerContainerRefFunction,
1110
+ suggestions: suggestions,
1111
+ getRef: _this7.suggestionItemRef,
1112
+ hoverOption: hoverIndex,
1113
+ onClick: _this7.handleChange,
1114
+ onMouseEnter: _this7.handleMouseEnter,
1115
+ dataId: "".concat(dataId, "_Options"),
1116
+ needTick: needTick,
1117
+ needBorder: needListBorder,
1118
+ selectedOptions: [selectedId],
1119
+ className: "".concat(tabletMode ? _SelectModule["default"].responsivelistItemContainer : _SelectModule["default"].listItemContainer),
1120
+ listItemSize: listItemSize,
1121
+ htmlId: setAriaId,
1122
+ a11y: {
1123
+ ariaParentRole: 'listbox',
1124
+ role: 'option'
1125
+ }
1126
+ }, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
1127
+ isLoading: isFetchingOptions,
1128
+ options: options,
1129
+ searchString: searchStr,
1130
+ suggestions: suggestions,
1131
+ dataId: dataId,
1132
+ renderCustomEmptyState: renderCustomEmptyState,
1133
+ getCustomEmptyState: getCustomEmptyState ? _this7.handleGetAddNewOptionText : null,
1134
+ i18nKeys: i18nKeys,
1135
+ htmlId: ariaErrorId
1136
+ }), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
1137
+ isCover: false,
1138
+ align: "both"
1139
+ }, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null))), getFooter ? /*#__PURE__*/_react["default"].createElement(_Card.CardFooter, null, getFooter()) : null)) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
1140
+ flexible: true
1141
+ }, getChildren())));
1154
1142
  }) : null);
1155
1143
  }
1156
1144
  }]);
@@ -22,12 +22,12 @@
22
22
 
23
23
  .box_small .emptyState {
24
24
  padding-block: var(--zd_size12) ;
25
- padding-inline: var(--zd_size6) ;
25
+ padding-inline:var(--zd_size6) ;
26
26
  }
27
27
 
28
28
  .box_medium .emptyState {
29
29
  padding-block: var(--zd_size12) ;
30
- padding-inline: var(--zd_size15) ;
30
+ padding-inline:var(--zd_size15) ;
31
31
  }
32
32
 
33
33
  .hide {
@@ -37,7 +37,6 @@
37
37
  .container {
38
38
  position: relative;
39
39
  }
40
-
41
40
  /* css:lineheight-validation:ignore */
42
41
  .arrowIcon {
43
42
  height: var(--zd_size8) ;
@@ -46,12 +45,12 @@
46
45
 
47
46
  .small.search {
48
47
  padding-block: 0 ;
49
- padding-inline: var(--zd_size5) ;
48
+ padding-inline:var(--zd_size5) ;
50
49
  }
51
50
 
52
51
  .medium.search {
53
52
  padding-block: var(--zd_size3) 0 ;
54
- padding-inline: var(--zd_size20) ;
53
+ padding-inline:var(--zd_size20) ;
55
54
  }
56
55
 
57
56
  .title {
@@ -60,17 +59,17 @@
60
59
 
61
60
  .groupTitle {
62
61
  margin-block: var(--zd_size6) ;
63
- margin-inline: 0 ;
62
+ margin-inline:0 ;
64
63
  }
65
64
 
66
65
  .listItemContainer {
67
66
  padding-block: var(--zd_size10) ;
68
- padding-inline: 0 ;
67
+ padding-inline:0 ;
69
68
  }
70
69
 
71
70
  .responsivelistItemContainer {
72
71
  padding-block: var(--zd_size10) 0 ;
73
- padding-inline: 0 ;
72
+ padding-inline:0 ;
74
73
  }
75
74
 
76
75
  .readonly {
@@ -112,19 +111,18 @@
112
111
 
113
112
  .dropBoxList {
114
113
  padding-block: var(--zd_size10) ;
115
- padding-inline: 0 ;
114
+ padding-inline:0 ;
116
115
  }
117
116
 
118
117
  .responsivedropBoxList {
119
118
  padding-block: var(--zd_size10) 0 ;
120
- padding-inline: 0 ;
119
+ padding-inline:0 ;
121
120
  }
122
121
 
123
122
  .rotate {
124
123
  transform: rotateX(180deg);
125
124
  }
126
-
127
- .rightPlaceholder {
125
+ .rightPlaceholder{
128
126
  height: 100% ;
129
127
  }
130
128
 
@@ -143,29 +141,3 @@
143
141
  .loader {
144
142
  padding: var(--zd_size10) ;
145
143
  }
146
-
147
- .dropBoxWithSuggestedStatus {
148
- border-radius: 7px;
149
- }
150
-
151
- .dropBoxListContainer {
152
- width: 100% ;
153
- border-radius: 7px;
154
- padding: var(--zd_size10) ;
155
- border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
156
- background: var(--zdt_statusdropdown_wrapper_container_bg);
157
- box-shadow: var(--zd_bs_statusdropdown_wrapper_container);
158
- }
159
-
160
- .dropdownOptions {
161
- padding-inline: var(--zd_size1) ;
162
- padding-block: var(--zd_size1) ;
163
- background-color: var(--zdt_commentList_normal_bg);
164
- border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
165
- border-radius: 7px;
166
- }
167
-
168
- .suggestedStatusContainer {
169
- margin-block-end: var(--zd_size6) ;
170
- margin-inline: var(--zd_size1) ;
171
- }
@@ -50,8 +50,7 @@ var Select_defaultProps = {
50
50
  isAbsolutePositioningNeeded: true,
51
51
  allowValueFallback: true,
52
52
  inputFieldLineA11y: {},
53
- customClass: {},
54
- renderSuggestedStatus: null
53
+ customClass: {}
55
54
  };
56
55
  exports.Select_defaultProps = Select_defaultProps;
57
56
  var GroupSelect_defaultProps = {
@@ -124,8 +124,7 @@ var Select_propTypes = {
124
124
  customClass: _propTypes["default"].shape({
125
125
  dropBox: _propTypes["default"].string,
126
126
  cardContent: _propTypes["default"].string
127
- }),
128
- renderSuggestedStatus: _propTypes["default"].node
127
+ })
129
128
  };
130
129
  exports.Select_propTypes = Select_propTypes;
131
130
  var GroupSelect_propTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-252",
3
+ "version": "1.0.0-temp-253",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,