@zohodesk/components 1.0.0-temp-168 → 1.0.0-temp-169

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 (280) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropValidationExcludeFilesArray.js +13 -3
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +48 -0
  5. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +1 -0
  6. package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -0
  7. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +1 -0
  8. package/coverage/Button/Button.js.html +1 -1
  9. package/coverage/Button/css/Button.module.css.html +1 -1
  10. package/coverage/Button/css/cssJSLogic.js.html +1 -1
  11. package/coverage/Button/css/index.html +1 -1
  12. package/coverage/Button/index.html +1 -1
  13. package/coverage/Button/props/defaultProps.js.html +3 -6
  14. package/coverage/Button/props/index.html +1 -1
  15. package/coverage/Button/props/propTypes.js.html +9 -3
  16. package/coverage/Buttongroup/Buttongroup.js.html +1 -1
  17. package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
  18. package/coverage/Buttongroup/index.html +1 -1
  19. package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
  20. package/coverage/Buttongroup/props/index.html +1 -1
  21. package/coverage/Buttongroup/props/propTypes.js.html +1 -1
  22. package/coverage/coverage-final.json +10 -10
  23. package/coverage/coverage-summary.json +10 -10
  24. package/coverage/index.html +1 -1
  25. package/coverage/utils/dummyFunction.js.html +1 -1
  26. package/coverage/utils/index.html +1 -1
  27. package/es/AppContainer/AppContainer.js +3 -0
  28. package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
  29. package/es/Button/props/defaultProps.js +1 -2
  30. package/es/Button/props/propTypes.js +3 -1
  31. package/es/DateTime/DateTime.module.css +2 -0
  32. package/es/DateTime/DateWidget.js +2 -1
  33. package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
  34. package/es/DateTime/dateFormatUtils/index.js +1 -1
  35. package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
  36. package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
  37. package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
  38. package/es/DropBox/DropBox.js +10 -10
  39. package/es/DropDown/DropDown.js +1 -7
  40. package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -5
  41. package/es/MultiSelect/AdvancedMultiSelect.js +4 -4
  42. package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
  43. package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
  44. package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
  45. package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
  46. package/es/MultiSelect/MultiSelect.js +112 -91
  47. package/es/MultiSelect/MultiSelect.module.css +2 -5
  48. package/es/MultiSelect/MultiSelectHeader.js +1 -2
  49. package/es/MultiSelect/MultiSelectWithAvatar.js +15 -112
  50. package/es/MultiSelect/props/defaultProps.js +3 -1
  51. package/es/MultiSelect/props/propTypes.js +9 -57
  52. package/es/Responsive/RefWrapper.js +2 -1
  53. package/es/Select/GroupSelect.js +3 -5
  54. package/es/Select/Select.js +2 -5
  55. package/es/Select/SelectWithAvatar.js +2 -1
  56. package/es/Select/SelectWithIcon.js +5 -2
  57. package/es/TextBox/TextBox.js +3 -3
  58. package/es/TextBox/TextBox.module.css +5 -4
  59. package/es/Textarea/Textarea.module.css +3 -4
  60. package/es/deprecated/PortalLayer/props/propTypes.js +3 -1
  61. package/es/index.js +2 -1
  62. package/es/utils/Common.js +3 -0
  63. package/es/v1/Accordion/Accordion.js +66 -0
  64. package/es/v1/Accordion/AccordionItem.js +57 -0
  65. package/es/v1/Accordion/index.js +2 -0
  66. package/es/v1/Animation/Animation.js +127 -0
  67. package/es/v1/AppContainer/AppContainer.js +137 -0
  68. package/es/v1/Avatar/Avatar.js +139 -0
  69. package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
  70. package/es/v1/Button/Button.js +68 -0
  71. package/es/v1/Buttongroup/Buttongroup.js +31 -0
  72. package/es/v1/Card/Card.js +271 -0
  73. package/es/v1/CheckBox/CheckBox.js +155 -0
  74. package/es/v1/DateTime/CalendarView.js +218 -0
  75. package/es/v1/DateTime/DateTime.js +783 -0
  76. package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
  77. package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
  78. package/es/v1/DateTime/DateWidget.js +1098 -0
  79. package/es/v1/DateTime/DaysRow.js +31 -0
  80. package/es/v1/DateTime/Time.js +166 -0
  81. package/es/v1/DateTime/YearView.js +264 -0
  82. package/es/v1/DateTime/index.js +1 -0
  83. package/es/v1/DropBox/DropBox.js +91 -0
  84. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +132 -0
  85. package/es/v1/DropDown/DropDown.js +73 -0
  86. package/es/v1/DropDown/DropDownHeading.js +44 -0
  87. package/es/v1/DropDown/DropDownItem.js +76 -0
  88. package/es/v1/DropDown/DropDownSearch.js +63 -0
  89. package/es/v1/DropDown/DropDownSeparator.js +15 -0
  90. package/es/v1/Heading/Heading.js +32 -0
  91. package/es/v1/Label/Label.js +40 -0
  92. package/es/v1/Layout/Box.js +115 -0
  93. package/es/v1/Layout/Container.js +132 -0
  94. package/es/v1/Layout/index.js +2 -0
  95. package/es/v1/ListItem/ListContainer.js +102 -0
  96. package/es/v1/ListItem/ListItem.js +124 -0
  97. package/es/v1/ListItem/ListItemWithAvatar.js +145 -0
  98. package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
  99. package/es/v1/ListItem/ListItemWithIcon.js +127 -0
  100. package/es/v1/ListItem/ListItemWithRadio.js +105 -0
  101. package/es/v1/ListItem/index.js +6 -0
  102. package/es/v1/Modal/Modal.js +154 -0
  103. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
  104. package/es/v1/MultiSelect/AdvancedMultiSelect.js +568 -0
  105. package/es/v1/MultiSelect/EmptyState.js +64 -0
  106. package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
  107. package/es/v1/MultiSelect/MultiSelect.js +1120 -0
  108. package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
  109. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +216 -0
  110. package/es/v1/MultiSelect/SelectedOptions.js +82 -0
  111. package/es/v1/MultiSelect/Suggestions.js +142 -0
  112. package/es/v1/MultiSelect/index.js +4 -0
  113. package/es/v1/PopOver/PopOver.js +176 -0
  114. package/es/v1/Popup/Popup.js +645 -0
  115. package/es/v1/Radio/Radio.js +115 -0
  116. package/es/v1/Responsive/CustomResponsive.js +195 -0
  117. package/es/v1/Responsive/RefWrapper.js +39 -0
  118. package/es/v1/Responsive/ResizeComponent.js +197 -0
  119. package/es/v1/Responsive/ResizeObserver.js +140 -0
  120. package/es/v1/Responsive/Responsive.js +194 -0
  121. package/es/v1/Responsive/index.js +9 -0
  122. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +58 -0
  123. package/es/v1/Ribbon/Ribbon.js +33 -0
  124. package/es/v1/RippleEffect/RippleEffect.js +24 -0
  125. package/es/v1/Select/GroupSelect.js +800 -0
  126. package/es/v1/Select/Select.js +966 -0
  127. package/es/v1/Select/SelectWithAvatar.js +344 -0
  128. package/es/v1/Select/SelectWithIcon.js +535 -0
  129. package/es/v1/Select/index.js +4 -0
  130. package/es/v1/Stencils/Stencils.js +26 -0
  131. package/es/v1/Switch/Switch.js +94 -0
  132. package/es/v1/Tab/Tab.js +108 -0
  133. package/es/v1/Tab/TabContent.js +30 -0
  134. package/es/v1/Tab/TabContentWrapper.js +29 -0
  135. package/es/v1/Tab/TabWrapper.js +57 -0
  136. package/es/v1/Tab/Tabs.js +612 -0
  137. package/es/v1/Tab/index.js +5 -0
  138. package/es/v1/Tag/Tag.js +134 -0
  139. package/es/v1/TextBox/TextBox.js +154 -0
  140. package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
  141. package/es/v1/Textarea/Textarea.js +102 -0
  142. package/es/v1/Tooltip/Tooltip.js +518 -0
  143. package/es/v1/Typography/Typography.js +38 -0
  144. package/es/v1/Typography/css/Typography.module.css +376 -0
  145. package/es/v1/Typography/css/cssJSLogic.js +46 -0
  146. package/es/v1/Typography/css/letterSpacingMap.js +12 -0
  147. package/es/v1/Typography/props/defaultProps.js +8 -0
  148. package/es/v1/Typography/props/propTypes.js +24 -0
  149. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
  150. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +100 -0
  151. package/es/v1/semantic/Button/Button.js +53 -0
  152. package/es/v1/semantic/index.js +1 -0
  153. package/lib/AppContainer/AppContainer.js +5 -0
  154. package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
  155. package/lib/Button/props/defaultProps.js +1 -2
  156. package/lib/Button/props/propTypes.js +3 -1
  157. package/lib/DateTime/DateTime.module.css +2 -0
  158. package/lib/DateTime/DateWidget.js +2 -1
  159. package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
  160. package/lib/DateTime/dateFormatUtils/index.js +1 -1
  161. package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
  162. package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
  163. package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
  164. package/lib/DropBox/DropBox.js +15 -15
  165. package/lib/DropDown/DropDown.js +1 -6
  166. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -6
  167. package/lib/MultiSelect/AdvancedMultiSelect.js +4 -4
  168. package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
  169. package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
  170. package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
  171. package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
  172. package/lib/MultiSelect/MultiSelect.js +116 -96
  173. package/lib/MultiSelect/MultiSelect.module.css +2 -5
  174. package/lib/MultiSelect/MultiSelectHeader.js +1 -2
  175. package/lib/MultiSelect/MultiSelectWithAvatar.js +18 -113
  176. package/lib/MultiSelect/props/defaultProps.js +3 -1
  177. package/lib/MultiSelect/props/propTypes.js +19 -60
  178. package/lib/Responsive/RefWrapper.js +2 -1
  179. package/lib/Select/GroupSelect.js +2 -2
  180. package/lib/Select/Select.js +1 -2
  181. package/lib/Select/SelectWithAvatar.js +2 -1
  182. package/lib/Select/SelectWithIcon.js +5 -3
  183. package/lib/TextBox/TextBox.js +10 -10
  184. package/lib/TextBox/TextBox.module.css +5 -4
  185. package/lib/Textarea/Textarea.module.css +3 -4
  186. package/lib/deprecated/PortalLayer/props/propTypes.js +3 -1
  187. package/lib/index.js +10 -1
  188. package/lib/utils/Common.js +5 -0
  189. package/lib/v1/Accordion/Accordion.js +98 -0
  190. package/lib/v1/Accordion/AccordionItem.js +68 -0
  191. package/lib/v1/Accordion/index.js +23 -0
  192. package/lib/v1/Animation/Animation.js +143 -0
  193. package/lib/v1/AppContainer/AppContainer.js +209 -0
  194. package/lib/v1/Avatar/Avatar.js +190 -0
  195. package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
  196. package/lib/v1/Button/Button.js +82 -0
  197. package/lib/v1/Buttongroup/Buttongroup.js +44 -0
  198. package/lib/v1/Card/Card.js +365 -0
  199. package/lib/v1/CheckBox/CheckBox.js +166 -0
  200. package/lib/v1/DateTime/CalendarView.js +285 -0
  201. package/lib/v1/DateTime/DateTime.js +872 -0
  202. package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
  203. package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
  204. package/lib/v1/DateTime/DateWidget.js +1125 -0
  205. package/lib/v1/DateTime/DaysRow.js +80 -0
  206. package/lib/v1/DateTime/Time.js +254 -0
  207. package/lib/v1/DateTime/YearView.js +325 -0
  208. package/lib/v1/DateTime/index.js +15 -0
  209. package/lib/v1/DropBox/DropBox.js +119 -0
  210. package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +145 -0
  211. package/lib/v1/DropDown/DropDown.js +170 -0
  212. package/lib/v1/DropDown/DropDownHeading.js +93 -0
  213. package/lib/v1/DropDown/DropDownItem.js +127 -0
  214. package/lib/v1/DropDown/DropDownSearch.js +113 -0
  215. package/lib/v1/DropDown/DropDownSeparator.js +64 -0
  216. package/lib/v1/Heading/Heading.js +49 -0
  217. package/lib/v1/Label/Label.js +51 -0
  218. package/lib/v1/Layout/Box.js +128 -0
  219. package/lib/v1/Layout/Container.js +145 -0
  220. package/lib/v1/Layout/index.js +23 -0
  221. package/lib/v1/ListItem/ListContainer.js +120 -0
  222. package/lib/v1/ListItem/ListItem.js +138 -0
  223. package/lib/v1/ListItem/ListItemWithAvatar.js +162 -0
  224. package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
  225. package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
  226. package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
  227. package/lib/v1/ListItem/index.js +55 -0
  228. package/lib/v1/Modal/Modal.js +212 -0
  229. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
  230. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
  231. package/lib/v1/MultiSelect/EmptyState.js +112 -0
  232. package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
  233. package/lib/v1/MultiSelect/MultiSelect.js +1201 -0
  234. package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
  235. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +270 -0
  236. package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
  237. package/lib/v1/MultiSelect/Suggestions.js +195 -0
  238. package/lib/v1/MultiSelect/index.js +39 -0
  239. package/lib/v1/PopOver/PopOver.js +197 -0
  240. package/lib/v1/Popup/Popup.js +715 -0
  241. package/lib/v1/Radio/Radio.js +126 -0
  242. package/lib/v1/Responsive/CustomResponsive.js +242 -0
  243. package/lib/v1/Responsive/RefWrapper.js +57 -0
  244. package/lib/v1/Responsive/ResizeComponent.js +268 -0
  245. package/lib/v1/Responsive/ResizeObserver.js +168 -0
  246. package/lib/v1/Responsive/Responsive.js +274 -0
  247. package/lib/v1/Responsive/index.js +55 -0
  248. package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
  249. package/lib/v1/Ribbon/Ribbon.js +44 -0
  250. package/lib/v1/RippleEffect/RippleEffect.js +39 -0
  251. package/lib/v1/Select/GroupSelect.js +876 -0
  252. package/lib/v1/Select/Select.js +1012 -0
  253. package/lib/v1/Select/SelectWithAvatar.js +394 -0
  254. package/lib/v1/Select/SelectWithIcon.js +597 -0
  255. package/lib/v1/Select/index.js +39 -0
  256. package/lib/v1/Stencils/Stencils.js +43 -0
  257. package/lib/v1/Switch/Switch.js +108 -0
  258. package/lib/v1/Tab/Tab.js +132 -0
  259. package/lib/v1/Tab/TabContent.js +42 -0
  260. package/lib/v1/Tab/TabContentWrapper.js +42 -0
  261. package/lib/v1/Tab/TabWrapper.js +89 -0
  262. package/lib/v1/Tab/Tabs.js +680 -0
  263. package/lib/v1/Tab/index.js +47 -0
  264. package/lib/v1/Tag/Tag.js +154 -0
  265. package/lib/v1/TextBox/TextBox.js +168 -0
  266. package/lib/v1/TextBoxIcon/TextBoxIcon.js +196 -0
  267. package/lib/v1/Textarea/Textarea.js +118 -0
  268. package/lib/v1/Tooltip/Tooltip.js +586 -0
  269. package/lib/v1/Typography/Typography.js +56 -0
  270. package/lib/v1/Typography/css/Typography.module.css +376 -0
  271. package/lib/v1/Typography/css/cssJSLogic.js +41 -0
  272. package/lib/v1/Typography/css/letterSpacingMap.js +20 -0
  273. package/lib/v1/Typography/props/defaultProps.js +15 -0
  274. package/lib/v1/Typography/props/propTypes.js +35 -0
  275. package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
  276. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
  277. package/lib/v1/semantic/Button/Button.js +63 -0
  278. package/lib/v1/semantic/index.js +15 -0
  279. package/package.json +10 -10
  280. package/result.json +1 -1
@@ -4,28 +4,25 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
4
4
  import React from 'react';
5
5
  import { MultiSelectWithAvatar_propTypes } from './props/propTypes';
6
6
  import { MultiSelectWithAvatar_defaultProps } from './props/defaultProps';
7
+ import { defaultProps as MobileHeader_defaultProps } from './MobileHeader/props/defaultProps';
7
8
  /**** Components ****/
8
9
 
9
10
  import { MultiSelectComponent } from './MultiSelect';
10
11
  import Popup from '../Popup/Popup';
11
- import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
12
12
  import { Container, Box } from '../Layout';
13
13
  import Card, { CardContent, CardHeader } from '../Card/Card';
14
- import SelectedOptions from './SelectedOptions';
15
14
  import Suggestions from './Suggestions';
16
15
  import EmptyState from './EmptyState';
17
- import MultiSelectHeader from './MultiSelectHeader';
18
16
  import CssProvider from '../Provider/CssProvider';
19
17
  import { getUniqueId } from '../Provider/IdProvider';
20
18
  import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
21
19
  import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
22
20
  import Loader from '@zohodesk/svg/lib/Loader/Loader';
23
- /**** Icons ****/
24
-
25
- import { Icon } from '@zohodesk/icons';
21
+ import MultiSelectHeader from './MultiSelectHeader';
26
22
  /**** CSS ****/
27
23
 
28
24
  import style from './MultiSelect.module.css';
25
+ import MobileHeader from './MobileHeader/MobileHeader';
29
26
  /*eslint-disable react/sort-prop-types*/
30
27
 
31
28
  /* eslint-disable react/forbid-component-props */
@@ -76,7 +73,6 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
76
73
  emptyMessage,
77
74
  noMoreOptionsMessage,
78
75
  dropBoxSize,
79
- placeHolder,
80
76
  isPopupOpen,
81
77
  isPopupReady,
82
78
  position,
@@ -86,24 +82,15 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
86
82
  removeClose,
87
83
  isAnimate,
88
84
  animationStyle,
89
- textBoxSize,
90
- variant,
91
- size,
92
85
  isDisabled,
93
86
  title,
94
87
  dataId,
95
88
  dataSelectorId,
96
89
  needResponsive,
97
90
  borderColor,
98
- textBoxClass,
99
- needBorder,
100
91
  disableAction,
101
92
  palette,
102
- htmlId,
103
93
  i18nKeys,
104
- a11y,
105
- children,
106
- customChildrenClass,
107
94
  isBoxPaddingNeed,
108
95
  needEffect,
109
96
  isLoading,
@@ -111,16 +98,9 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
111
98
  customProps
112
99
  } = this.props;
113
100
  let {
114
- TextBoxProps = {},
115
101
  SuggestionsProps = {}
116
102
  } = customProps;
117
- const {
118
- clearText = 'Clear all'
119
- } = i18nKeys;
120
- const {
121
- clearLabel = 'Clear all'
122
- } = a11y;
123
- i18nKeys = Object.assign({}, i18nKeys, {
103
+ i18nKeys = Object.assign({}, MobileHeader_defaultProps.i18nKeys, i18nKeys, {
124
104
  emptyText: i18nKeys.emptyText || emptyMessage,
125
105
  searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage,
126
106
  noMoreText: i18nKeys.noMoreText || noMoreOptionsMessage
@@ -129,17 +109,14 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
129
109
  selectedOptions,
130
110
  searchStr,
131
111
  hoverOption,
132
- highLightedSelectOptions,
133
112
  options,
134
113
  isFetchingOptions,
135
- isActive,
136
114
  selectedOptionIds
137
115
  } = this.state;
138
116
  const suggestions = this.handleFilterSuggestions();
139
117
  const setAriaId = this.getNextAriaId();
140
118
  const ariaErrorId = this.getNextAriaId();
141
119
  const popUpState = !isReadOnly && !isDisabled && !disableAction && isPopupOpen;
142
- const isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
143
120
  return /*#__PURE__*/React.createElement("div", {
144
121
  className: ` ${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
145
122
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
@@ -147,79 +124,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
147
124
  "data-title": isDisabled ? title : null,
148
125
  onClick: this.handleInputFocus,
149
126
  "data-selector-id": dataSelectorId
150
- }, /*#__PURE__*/React.createElement(Container, {
151
- align: "vertical",
152
- alignBox: "row",
153
- className: `${style.container} ${style[size]} ${needBorder ? style[`borderColor_${borderColor}`] : ''} ${isActive && needBorder ? style.active : ''} ${textBoxClass ? textBoxClass : ''} ${needBorder ? style.hasBorder : ''}`,
154
- eleRef: this.selectedOptionContainerRef,
155
- wrap: "wrap"
156
- }, /*#__PURE__*/React.createElement(SelectedOptions, {
157
- selectedOptions: selectedOptions,
158
- highLightedSelectOptions: highLightedSelectOptions,
159
- isReadOnly: isReadOnly,
160
- getRef: this.selectedOptionRef,
161
- onRemove: this.handleRemoveOption,
162
- onSelect: this.handleClickSelectedOption,
163
- size: size,
164
- palette: palette
165
- }), /*#__PURE__*/React.createElement(Box, {
166
- flexible: true,
167
- className: style.wrapper,
168
- adjust: true,
169
- shrink: true
170
- }, /*#__PURE__*/React.createElement("span", {
171
- className: ` ${style.custmSpan} ${textBoxSize === 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} ${isShowClearIcon ? style.clearIconSpace : ''}
172
- ${customChildrenClass ? customChildrenClass : ''}`
173
- }, searchStr), /*#__PURE__*/React.createElement(TextBoxIcon, {
174
- isDisabled: isDisabled,
175
- inputRef: this.searchInputRef,
176
- needBorder: false,
177
- onBlur: this.handleInactive,
178
- onChange: this.handleSearch,
179
- onClick: this.handleInputCick,
180
- onFocus: this.handleActive,
181
- onKeyDown: this.handleKeyDown,
182
- placeHolder: selectedOptions.length >= 1 ? '' : placeHolder,
183
- size: textBoxSize,
184
- value: searchStr,
185
- variant: variant,
186
- dataId: `${dataId}_textBox`,
187
- isReadOnly: isReadOnly,
188
- tabindex: isDisabled && '-1',
189
- htmlId: htmlId,
190
- a11y: {
191
- ariaExpanded: popUpState ? true : false,
192
- ariaHaspopup: true,
193
- role: 'combobox',
194
- ariaControls: setAriaId,
195
- ariaOwns: setAriaId,
196
- ariaDescribedby: ariaErrorId
197
- },
198
- customClass: {
199
- customTBoxWrap: style.custmInputWrapper
200
- },
201
- autoComplete: false,
202
- customProps: {
203
- TextBoxProps: TextBoxProps
204
- }
205
- }, /*#__PURE__*/React.createElement(Container, {
206
- isCover: false,
207
- alignBox: "row",
208
- align: "vertical",
209
- className: style.iconContainer
210
- }, children ? /*#__PURE__*/React.createElement(Box, {
211
- dataId: `${dataId}_children`
212
- }, children) : null, isShowClearIcon ? /*#__PURE__*/React.createElement(Box, {
213
- className: `${style.delete} ${style[`${palette}Delete`]}`,
214
- dataId: `${dataId}_clearIcon`,
215
- "data-title": clearText,
216
- onClick: this.handleDeselectAll,
217
- tagName: "button",
218
- "aria-label": clearLabel
219
- }, /*#__PURE__*/React.createElement(Icon, {
220
- name: "ZD-delete",
221
- size: "15"
222
- })) : null)))), popUpState ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
127
+ }, this.getSelectionUI(), popUpState ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
223
128
  query: this.responsiveFunc,
224
129
  responsiveId: "Helmet"
225
130
  }, _ref2 => {
@@ -250,13 +155,18 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
250
155
  }, /*#__PURE__*/React.createElement(Card, {
251
156
  customClass: `${style.box} ${style[`${palette}Box`]}`,
252
157
  onScroll: this.handleScroll
253
- }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
254
- needSelectAll: needSelectAll,
158
+ }, tabletMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileHeader, {
159
+ selectedOptions: selectedOptions,
160
+ i18nKeys: i18nKeys,
161
+ onClick: this.handlePopupClose
162
+ }, /*#__PURE__*/React.createElement("div", {
163
+ className: style.effect
164
+ }, this.getSelectionUI(true)))), needSelectAll ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
255
165
  onSelect: this.handleSelectAll,
256
166
  selectAllText: selectAllText,
257
167
  suggestions: suggestions,
258
168
  dataId: dataId
259
- })), isLoading ? /*#__PURE__*/React.createElement(Container, {
169
+ })) : null, isLoading ? /*#__PURE__*/React.createElement(Container, {
260
170
  align: "both",
261
171
  className: style.loader
262
172
  }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(CardContent, {
@@ -299,13 +209,6 @@ MultiSelectWithAvatarComponent.propTypes = MultiSelectWithAvatar_propTypes;
299
209
  MultiSelectWithAvatarComponent.defaultProps = MultiSelectWithAvatar_defaultProps;
300
210
  MultiSelectWithAvatarComponent.displayName = 'MultiSelectWithAvatar';
301
211
  const MultiSelectWithAvatar = Popup(MultiSelectWithAvatarComponent);
302
- MultiSelectWithAvatar.defaultProps = MultiSelectWithAvatarComponent.defaultProps; // if (__DOCS__) {
303
- // MultiSelectWithAvatarComponent.docs = {
304
- // componentGroup: 'Form Elements',
305
- // folderName: 'Style Guide'
306
- // };
307
- // // eslint-disable-next-line react/forbid-foreign-prop-types
308
- // MultiSelectWithAvatar.propTypes = MultiSelectWithAvatarComponent.propTypes;
309
- // }
310
-
212
+ MultiSelectWithAvatar.defaultProps = MultiSelectWithAvatarComponent.defaultProps;
213
+ MultiSelectWithAvatar.propTypes = MultiSelectWithAvatarComponent.propTypes;
311
214
  export default MultiSelectWithAvatar;
@@ -107,7 +107,9 @@ export const MultiSelect_defaultProps = {
107
107
  boxSize: 'default',
108
108
  isLoading: false,
109
109
  dataSelectorId: 'multiSelect',
110
- keepSelectedOptions: false
110
+ keepSelectedOptions: false,
111
+ selectedOptionsCount: 0,
112
+ cardHeaderName: ''
111
113
  };
112
114
  export const MultiSelectHeader_defaultProps = {
113
115
  dataId: 'MultiSelectHeader'
@@ -62,7 +62,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
62
62
  onChange: PropTypes.func,
63
63
  needToCloseOnSelect: PropTypes.func,
64
64
  searchStr: PropTypes.string,
65
- children: PropTypes.node
65
+ children: PropTypes.node,
66
+ dataSelectorId: PropTypes.string
66
67
  };
67
68
  export const AdvancedMultiSelect_propTypes = {
68
69
  id: PropTypes.string.isRequired,
@@ -164,7 +165,7 @@ export const MultiSelect_propTypes = {
164
165
  borderColor: PropTypes.oneOf(['transparent', 'default', 'dark']),
165
166
  closePopupOnly: PropTypes.func,
166
167
  dataId: PropTypes.string,
167
- defaultDropBoxPosition: PropTypes.string,
168
+ defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
168
169
  disableAction: PropTypes.bool,
169
170
  dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
170
171
  emptyMessage: PropTypes.string.isRequired,
@@ -197,7 +198,6 @@ export const MultiSelect_propTypes = {
197
198
  needBorder: PropTypes.bool,
198
199
  needLocalSearch: PropTypes.bool,
199
200
  needResponsive: PropTypes.bool,
200
- needSelectAll: PropTypes.bool,
201
201
  needToCloseOnSelect: PropTypes.bool,
202
202
  //For Group multiSelect
203
203
  noMoreOptionsMessage: PropTypes.string,
@@ -219,7 +219,6 @@ export const MultiSelect_propTypes = {
219
219
  removeClose: PropTypes.func,
220
220
  searchDebounceTime: PropTypes.number,
221
221
  searchEmptyMessage: PropTypes.string,
222
- selectAllText: PropTypes.string,
223
222
  selectedOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,
224
223
  size: PropTypes.oneOf(['medium', 'xmedium']),
225
224
  textBoxClass: PropTypes.string,
@@ -239,77 +238,30 @@ export const MultiSelect_propTypes = {
239
238
  boxSize: PropTypes.string,
240
239
  isLoading: PropTypes.bool,
241
240
  dataSelectorId: PropTypes.string,
242
- keepSelectedOptions: PropTypes.bool
241
+ keepSelectedOptions: PropTypes.bool,
242
+ needSelectAll: PropTypes.bool,
243
+ selectAllText: PropTypes.string,
244
+ setAriaId: PropTypes.string,
245
+ ariaErrorId: PropTypes.string
243
246
  };
244
247
  export const MultiSelectHeader_propTypes = {
245
248
  dataId: PropTypes.string,
246
- needSelectAll: PropTypes.bool,
247
249
  onSelect: PropTypes.func,
248
250
  selectAllText: PropTypes.string,
249
251
  suggestions: PropTypes.array
250
252
  };
251
253
  export const MultiSelectWithAvatar_propTypes = {
252
- dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
253
254
  options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.arrayOf(PropTypes.shape({
254
255
  id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
255
256
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
256
257
  photoURL: PropTypes.string
257
258
  }))]).isRequired,
258
- placeHolder: PropTypes.string,
259
- emptyMessage: PropTypes.string.isRequired,
260
- valueField: PropTypes.string,
261
- textField: PropTypes.string,
262
259
  imageField: PropTypes.string,
263
- isReadOnly: PropTypes.bool,
264
- needSelectAll: PropTypes.bool,
265
- selectAllText: PropTypes.string,
266
- defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
267
- searchEmptyMessage: PropTypes.string,
268
- noMoreOptionsMessage: PropTypes.string,
269
- isAnimate: PropTypes.bool,
270
- animationStyle: PropTypes.string,
271
- size: PropTypes.oneOf(['medium', 'xmedium']),
272
- textBoxSize: PropTypes.oneOf(['small', 'medium', 'xmedium']),
273
- variant: PropTypes.string,
274
- isDisabled: PropTypes.bool,
275
- title: PropTypes.string,
276
- needResponsive: PropTypes.bool,
277
- dataId: PropTypes.string,
278
- borderColor: PropTypes.oneOf(['transparent', 'default']),
279
- textBoxClass: PropTypes.string,
280
- needBorder: PropTypes.bool,
281
- disableAction: PropTypes.bool,
282
- palette: PropTypes.oneOf(['default', 'dark']),
283
- htmlId: PropTypes.string,
284
- isBoxPaddingNeed: PropTypes.bool,
285
- needEffect: PropTypes.bool,
286
- keepSelectedOptions: PropTypes.bool,
287
260
  customProps: PropTypes.shape({
288
261
  SuggestionsProps: PropTypes.object,
289
262
  DropBoxProps: PropTypes.object
290
263
  }),
291
-
292
- /**** Popup props ****/
293
- isPopupOpen: PropTypes.bool,
294
- isPopupReady: PropTypes.bool,
295
- removeClose: PropTypes.func,
296
- position: PropTypes.string,
297
- getContainerRef: PropTypes.func,
298
- i18nKeys: PropTypes.shape({
299
- clearText: PropTypes.string,
300
- loadingText: PropTypes.string,
301
- emptyText: PropTypes.string,
302
- noMoreText: PropTypes.string,
303
- searchEmptyText: PropTypes.string
304
- }),
305
- a11y: PropTypes.shape({
306
- clearLabel: PropTypes.string
307
- }),
308
- children: PropTypes.node,
309
- customChildrenClass: PropTypes.string,
310
- disabledOptions: PropTypes.arrayOf(PropTypes.string),
311
- isLoading: PropTypes.bool,
312
- dataSelectorId: PropTypes.string
264
+ ...MultiSelect_propTypes
313
265
  };
314
266
  export const SelectedOptions_propTypes = {
315
267
  getRef: PropTypes.func,
@@ -32,6 +32,7 @@ DOMRefWrapper.defaultProps = {
32
32
  domRefKey: 'eleRef'
33
33
  };
34
34
  DOMRefWrapper.propTypes = {
35
- domRefKey: PropTypes.any
35
+ domRefKey: PropTypes.any,
36
+ children: PropTypes.any
36
37
  };
37
38
  export default DOMRefWrapper;
@@ -21,7 +21,7 @@ import style from './Select.module.css';
21
21
  /**** Methods ****/
22
22
 
23
23
  import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId } from '../utils/dropDownUtils';
24
- import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd } from '../utils/Common';
24
+ import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd, getKeyValue } from '../utils/Common';
25
25
  /* eslint-disable react/no-unused-prop-types */
26
26
 
27
27
  /* eslint-disable react/sort-prop-types */
@@ -425,10 +425,7 @@ export class GroupSelectComponent extends PureComponent {
425
425
  }
426
426
 
427
427
  handleValueInputChange(e) {
428
- let {
429
- which
430
- } = e;
431
- let typeString = String.fromCharCode(which);
428
+ let typeString = getKeyValue(e);
432
429
  let {
433
430
  isPopupOpen,
434
431
  autoSelectOnType
@@ -790,6 +787,7 @@ GroupSelectComponent.defaultProps = GroupSelect_defaultProps;
790
787
  GroupSelectComponent.displayName = 'GroupSelect';
791
788
  let GroupSelect = Popup(GroupSelectComponent);
792
789
  GroupSelect.defaultProps = GroupSelectComponent.defaultProps;
790
+ GroupSelect.propTypes = GroupSelectComponent.propTypes;
793
791
  export default GroupSelect; // if (__DOCS__) {
794
792
  // GroupSelect.docs = {
795
793
  // componentGroup: 'Form Elements',
@@ -21,7 +21,7 @@ import Loader from '@zohodesk/svg/lib/Loader/Loader';
21
21
  /**** Methods ****/
22
22
 
23
23
  import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetSelectedValueText as makeGetSelectedValue } from '../utils/dropDownUtils';
24
- import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd } from '../utils/Common.js';
24
+ import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd, getKeyValue } from '../utils/Common.js';
25
25
  /**** CSS ****/
26
26
 
27
27
  import style from './Select.module.css';
@@ -564,10 +564,7 @@ export class SelectComponent extends Component {
564
564
  }
565
565
 
566
566
  handleValueInputChange(e) {
567
- let {
568
- which
569
- } = e;
570
- let typeString = String.fromCharCode(which);
567
+ let typeString = getKeyValue(e);
571
568
  let {
572
569
  isPopupOpen,
573
570
  autoSelectOnType
@@ -331,7 +331,8 @@ SelectWithAvatarComponent.propTypes = SelectWithAvatar_propTypes;
331
331
  SelectWithAvatarComponent.defaultProps = SelectWithAvatar_defaultProps;
332
332
  SelectWithAvatarComponent.displayName = 'SelectWithAvatar';
333
333
  let SelectWithAvatar = Popup(SelectWithAvatarComponent);
334
- SelectWithAvatar.defaultProps = SelectWithAvatarComponent.defaultProps; // if (__DOCS__) {
334
+ SelectWithAvatar.defaultProps = SelectWithAvatarComponent.defaultProps;
335
+ SelectWithAvatar.propTypes = SelectWithAvatarComponent.propTypes; // if (__DOCS__) {
335
336
  // SelectWithAvatar.docs = {
336
337
  // componentGroup: 'Form Elements',
337
338
  // folderName: 'Style Guide'
@@ -520,11 +520,14 @@ class SelectWithIcon extends Component {
520
520
  }
521
521
 
522
522
  SelectWithIcon.propTypes = SelectWithIcon_propTypes;
523
- SelectWithIcon.defaultProps = SelectWithIcon_defaultProps; // if (__DOCS__) {
523
+ SelectWithIcon.defaultProps = SelectWithIcon_defaultProps;
524
+ const SelectWithIconComponent = Popup(SelectWithIcon);
525
+ SelectWithIconComponent.defaultProps = SelectWithIcon.defaultProps;
526
+ SelectWithIconComponent.propTypes = SelectWithIcon.propTypes; // if (__DOCS__) {
524
527
  // SelectWithIcon.docs = {
525
528
  // componentGroup: 'Form Elements',
526
529
  // folderName: 'Style Guide'
527
530
  // };
528
531
  // }
529
532
 
530
- export default Popup(SelectWithIcon);
533
+ export default SelectWithIconComponent;
@@ -6,7 +6,7 @@ import { propTypes } from './props/propTypes';
6
6
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['xmedium', 'medium', 'small', 'default', 'primary', 'secondary'] }] */
7
7
 
8
8
  import style from './TextBox.module.css';
9
- export default class Textbox extends React.PureComponent {
9
+ export default class TextBox extends React.PureComponent {
10
10
  constructor(props) {
11
11
  super(props);
12
12
  this.onChange = this.onChange.bind(this);
@@ -171,8 +171,8 @@ export default class Textbox extends React.PureComponent {
171
171
  }
172
172
 
173
173
  }
174
- Textbox.defaultProps = defaultProps;
175
- Textbox.propTypes = propTypes; // if (__DOCS__) {
174
+ TextBox.defaultProps = defaultProps;
175
+ TextBox.propTypes = propTypes; // if (__DOCS__) {
176
176
  // Textbox.docs = {
177
177
  // componentGroup: 'Form Elements',
178
178
  // folderName: 'Style Guide',
@@ -13,7 +13,6 @@
13
13
  /* Variable:Ignore */
14
14
  --textbox_letter_spacing: 0.1px;
15
15
  --textbox_padding: 0;
16
- --textbox_cursor: auto;
17
16
  --textbox_line_height: 35px;
18
17
 
19
18
  /* textbox placeholder default variable */
@@ -26,7 +25,7 @@
26
25
  appearance: none;
27
26
  letter-spacing: var(--textbox_letter_spacing);
28
27
  border: var(--textbox_border_width);
29
- cursor: var(--textbox_cursor);
28
+ cursor: text;
30
29
  }
31
30
  .basic::placeholder {
32
31
  color: var(--textbox_placeholder_text_color);
@@ -60,9 +59,11 @@
60
59
  .basic:disabled,
61
60
  .container:disabled,
62
61
  .container:disabled:hover {
63
- --textbox_cursor: not-allowed;
64
62
  --textbox_text_color: var(--zdt_textbox_disabled_text);
65
63
  }
64
+ .basic:disabled, .container:disabled, .container:disabled:hover {
65
+ cursor: not-allowed;
66
+ }
66
67
  .container:disabled,
67
68
  .container:disabled:hover {
68
69
  --textbox_bg_color: none;
@@ -80,7 +81,7 @@
80
81
  color: var(--textbox_placeholder_text_color);
81
82
  }
82
83
  .pointer {
83
- --textbox_cursor: pointer;
84
+ cursor: pointer;
84
85
  }
85
86
  /* Need Border */
86
87
  .border, .effect:hover, .effect:focus {
@@ -2,7 +2,6 @@
2
2
  /* textarea default variables */
3
3
  --textarea_border_width: 0;
4
4
  --textarea_border_color: none;
5
- --textarea_cursor: auto;
6
5
  --textarea_text_color: var(--zdt_textarea_default_text);
7
6
  --textarea_font_size: var(--zd_font_size14);
8
7
  --textarea_line_height: 22px;
@@ -20,7 +19,7 @@
20
19
  outline: 0;
21
20
  letter-spacing: 0.1px;
22
21
  color: var(--textarea_text_color);
23
- cursor: var(--textarea_cursor);
22
+ cursor:text;
24
23
  }
25
24
  .basic, .noBorder {
26
25
  border-width: var(--textarea_border_width);
@@ -38,11 +37,11 @@
38
37
  color: var(--textarea_placeholder_text_color);
39
38
  }
40
39
  .basic:disabled {
41
- --textarea_cursor: not-allowed;
42
40
  --textarea_text_color: var(--zdt_textarea_default_text);
41
+ cursor: not-allowed;
43
42
  }
44
43
  .readonly {
45
- --textarea_cursor: not-allowed;
44
+ cursor: not-allowed;
46
45
  }
47
46
  .resizeX {
48
47
  composes: resizeX from '../common/common.module.css';
@@ -7,7 +7,9 @@ export const propTypes = {
7
7
  portalId: PropTypes.string,
8
8
  renderChildren: PropTypes.func,
9
9
  saveGetFunction: PropTypes.func,
10
- saveUpdateFunction: PropTypes.func
10
+ saveUpdateFunction: PropTypes.func,
11
+ isActive: PropTypes.bool,
12
+ name: PropTypes.string
11
13
  };
12
14
  export const RefElement_propTypes = {
13
15
  Element: PropTypes.node,
package/es/index.js CHANGED
@@ -38,4 +38,5 @@ export { default as Tooltip } from './Tooltip/Tooltip';
38
38
  import * as _utils from './utils';
39
39
  export { _utils as utils };
40
40
  export * from './VelocityAnimation';
41
- export * from './semantic';
41
+ export * from './semantic';
42
+ export { default as Typography } from './v1/Typography/Typography';
@@ -20,6 +20,9 @@ export const stopAllEventPropagation = e => {
20
20
  export function cancelBubblingEffect(e) {
21
21
  e && e.stopPropagation && e.stopPropagation();
22
22
  e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
23
+ }
24
+ export function getKeyValue(event) {
25
+ return event && event.key && event.key;
23
26
  } // export function getCommentsDetails(
24
27
  // commentIds = [],
25
28
  // comments = {},
@@ -0,0 +1,66 @@
1
+ import React, { useState } from 'react';
2
+ import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
3
+ import { Accordion_defaultProps } from '../../Accordion/props/defaultProps';
4
+ import { Accordion_propTypes } from '../../Accordion/props/propTypes';
5
+ export default function Accordion(props) {
6
+ const {
7
+ className,
8
+ height,
9
+ unMount,
10
+ disableInternalState,
11
+ selectedItem: propSelectedItem,
12
+ a11y,
13
+ dataId,
14
+ dataSelectorId,
15
+ onSelect,
16
+ children
17
+ } = props;
18
+ const {
19
+ role,
20
+ ariaExpanded,
21
+ ariaHaspopup
22
+ } = a11y;
23
+ const [selectedItem, setSelectedItem] = useState(propSelectedItem);
24
+
25
+ function selectMenu(selectedItem) {
26
+ if (onSelect) {
27
+ onSelect(selectedItem);
28
+ }
29
+
30
+ !disableInternalState && setSelectedItem(selectedItem);
31
+ }
32
+
33
+ useEffectCallOnlyAfterState(() => {
34
+ if (!disableInternalState) {
35
+ setSelectedItem(propSelectedItem);
36
+ }
37
+ }, [propSelectedItem]);
38
+ let renderChildren = React.Children.map(children, child => {
39
+ if (child) {
40
+ return /*#__PURE__*/React.cloneElement(child, {
41
+ selectedItem: disableInternalState ? propSelectedItem : selectedItem,
42
+ selectMenu: selectMenu,
43
+ unMount: unMount
44
+ });
45
+ }
46
+ });
47
+ return /*#__PURE__*/React.createElement("div", {
48
+ className: className ? className : '',
49
+ style: {
50
+ height
51
+ },
52
+ role: role,
53
+ "aria-expanded": ariaExpanded,
54
+ "aria-haspopup": ariaHaspopup,
55
+ "data-id": dataId,
56
+ "data-test-id": dataId,
57
+ "data-selector-id": dataSelectorId
58
+ }, renderChildren);
59
+ }
60
+ Accordion.propTypes = Accordion_propTypes;
61
+ Accordion.defaultProps = Accordion_defaultProps; // if (__DOCS__) {
62
+ // Accordion.docs = {
63
+ // componentGroup: 'Animation',
64
+ // folderName: 'Style Guide'
65
+ // };
66
+ // }