@zohodesk/components 1.0.0-alpha-256 → 1.0.0-alpha-258

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 (228) hide show
  1. package/README.md +11 -0
  2. package/assets/Appearance/dark/mode/darkMode.module.css +1 -1
  3. package/assets/Appearance/default/mode/defaultMode.module.css +1 -1
  4. package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +1 -1
  5. package/es/Accordion/Accordion.js +13 -8
  6. package/es/Accordion/AccordionItem.js +9 -7
  7. package/es/Accordion/props/defaultProps.js +6 -2
  8. package/es/Accordion/props/propTypes.js +3 -0
  9. package/es/Animation/Animation.js +9 -8
  10. package/es/AppContainer/AppContainer.js +11 -7
  11. package/es/AppContainer/props/defaultProps.js +2 -1
  12. package/es/AppContainer/props/propTypes.js +1 -0
  13. package/es/Avatar/Avatar.js +15 -11
  14. package/es/Avatar/props/defaultProps.js +2 -1
  15. package/es/Avatar/props/propTypes.js +1 -0
  16. package/es/AvatarTeam/AvatarTeam.js +11 -8
  17. package/es/AvatarTeam/props/defaultProps.js +1 -0
  18. package/es/AvatarTeam/props/propTypes.js +1 -0
  19. package/es/Button/Button.js +10 -7
  20. package/es/Button/props/defaultProps.js +1 -0
  21. package/es/Button/props/propTypes.js +1 -0
  22. package/es/Buttongroup/Buttongroup.js +21 -14
  23. package/es/Buttongroup/props/defaultProps.js +3 -1
  24. package/es/Buttongroup/props/propTypes.js +3 -1
  25. package/es/Card/Card.js +29 -18
  26. package/es/Card/props/defaultProps.js +12 -1
  27. package/es/CheckBox/CheckBox.js +10 -8
  28. package/es/CheckBox/props/propTypes.js +1 -0
  29. package/es/DateTime/DateWidget.js +17 -12
  30. package/es/DateTime/props/propTypes.js +3 -1
  31. package/es/DropBox/DropBox.js +13 -9
  32. package/es/DropBox/props/defaultProps.js +1 -0
  33. package/es/DropBox/props/propTypes.js +1 -0
  34. package/es/DropDown/DropDown.js +8 -6
  35. package/es/DropDown/DropDownHeading.js +13 -8
  36. package/es/DropDown/props/defaultProps.js +3 -1
  37. package/es/Heading/Heading.js +7 -6
  38. package/es/Label/Label.js +9 -6
  39. package/es/Label/props/defaultProps.js +2 -1
  40. package/es/Label/props/propTypes.js +1 -0
  41. package/es/Layout/Box.js +2 -1
  42. package/es/Layout/Container.js +2 -1
  43. package/es/Layout/props/defaultProps.js +4 -2
  44. package/es/Layout/props/propTypes.js +2 -0
  45. package/es/ListItem/ListContainer.js +9 -6
  46. package/es/ListItem/ListItem.js +11 -7
  47. package/es/ListItem/ListItemWithAvatar.js +10 -7
  48. package/es/ListItem/ListItemWithCheckBox.js +8 -6
  49. package/es/ListItem/ListItemWithIcon.js +11 -7
  50. package/es/ListItem/ListItemWithRadio.js +9 -6
  51. package/es/ListItem/props/defaultProps.js +12 -6
  52. package/es/ListItem/props/propTypes.js +6 -0
  53. package/es/Modal/Modal.js +9 -8
  54. package/es/MultiSelect/AdvancedGroupMultiSelect.js +10 -7
  55. package/es/MultiSelect/AdvancedMultiSelect.js +14 -10
  56. package/es/MultiSelect/MultiSelect.js +10 -7
  57. package/es/MultiSelect/MultiSelectWithAvatar.js +13 -9
  58. package/es/MultiSelect/props/defaultProps.js +8 -4
  59. package/es/MultiSelect/props/propTypes.js +8 -4
  60. package/es/PopOver/PopOver.js +8 -8
  61. package/es/Radio/Radio.js +6 -6
  62. package/es/Ribbon/Ribbon.js +18 -14
  63. package/es/Ribbon/props/defaultProps.js +2 -1
  64. package/es/Ribbon/props/propTypes.js +2 -1
  65. package/es/RippleEffect/RippleEffect.js +7 -6
  66. package/es/Select/GroupSelect.js +13 -10
  67. package/es/Select/Select.js +15 -12
  68. package/es/Select/SelectWithAvatar.js +14 -10
  69. package/es/Select/SelectWithIcon.js +11 -8
  70. package/es/Select/props/defaultProps.js +4 -0
  71. package/es/Select/props/propTypes.js +8 -4
  72. package/es/Stencils/Stencils.js +9 -8
  73. package/es/Switch/Switch.js +10 -7
  74. package/es/Switch/props/defaultProps.js +2 -1
  75. package/es/Switch/props/propTypes.js +1 -0
  76. package/es/Tab/Tab.js +10 -7
  77. package/es/Tab/TabContent.js +4 -2
  78. package/es/Tab/TabContentWrapper.js +4 -2
  79. package/es/Tab/TabWrapper.js +4 -2
  80. package/es/Tab/Tabs.js +8 -4
  81. package/es/Tab/props/defaultProps.js +10 -5
  82. package/es/Tab/props/propTypes.js +10 -5
  83. package/es/Tag/Tag.js +9 -7
  84. package/es/Tag/props/defaultProps.js +2 -1
  85. package/es/Tag/props/propTypes.js +2 -1
  86. package/es/TextBox/TextBox.js +12 -9
  87. package/es/TextBox/props/defaultProps.js +2 -1
  88. package/es/TextBox/props/propTypes.js +2 -1
  89. package/es/TextBoxIcon/TextBoxIcon.js +10 -8
  90. package/es/TextBoxIcon/props/defaultProps.js +2 -1
  91. package/es/TextBoxIcon/props/propTypes.js +1 -0
  92. package/es/Textarea/Textarea.js +12 -9
  93. package/es/Textarea/props/defaultProps.js +2 -1
  94. package/es/Textarea/props/propTypes.js +1 -0
  95. package/es/Tooltip/Tooltip.js +9 -8
  96. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +5 -5
  97. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +6 -5
  98. package/es/deprecated/PortalLayer/PortalLayer.js +7 -6
  99. package/es/semantic/Button/Button.js +6 -6
  100. package/install.md +10 -0
  101. package/lib/Accordion/Accordion.js +16 -9
  102. package/lib/Accordion/AccordionItem.js +12 -8
  103. package/lib/Accordion/props/defaultProps.js +6 -2
  104. package/lib/Accordion/props/propTypes.js +3 -0
  105. package/lib/Animation/Animation.js +12 -9
  106. package/lib/AppContainer/AppContainer.js +14 -8
  107. package/lib/AppContainer/props/defaultProps.js +2 -1
  108. package/lib/AppContainer/props/propTypes.js +1 -0
  109. package/lib/Avatar/Avatar.js +19 -13
  110. package/lib/Avatar/props/defaultProps.js +2 -1
  111. package/lib/Avatar/props/propTypes.js +1 -0
  112. package/lib/AvatarTeam/AvatarTeam.js +14 -9
  113. package/lib/AvatarTeam/props/defaultProps.js +1 -0
  114. package/lib/AvatarTeam/props/propTypes.js +1 -0
  115. package/lib/Button/Button.js +13 -8
  116. package/lib/Button/props/defaultProps.js +1 -0
  117. package/lib/Button/props/propTypes.js +1 -0
  118. package/lib/Buttongroup/Buttongroup.js +26 -16
  119. package/lib/Buttongroup/props/defaultProps.js +3 -1
  120. package/lib/Buttongroup/props/propTypes.js +3 -1
  121. package/lib/Card/Card.js +30 -22
  122. package/lib/Card/props/defaultProps.js +16 -3
  123. package/lib/CheckBox/CheckBox.js +13 -9
  124. package/lib/CheckBox/props/propTypes.js +1 -0
  125. package/lib/DateTime/CalendarView.js +5 -2
  126. package/lib/DateTime/DateTime.js +5 -3
  127. package/lib/DateTime/DateTimePopupFooter.js +3 -1
  128. package/lib/DateTime/DateTimePopupHeader.js +3 -1
  129. package/lib/DateTime/DateWidget.js +19 -13
  130. package/lib/DateTime/DaysRow.js +3 -1
  131. package/lib/DateTime/Time.js +3 -1
  132. package/lib/DateTime/YearView.js +3 -1
  133. package/lib/DateTime/dateFormatUtils/timeChange.js +2 -2
  134. package/lib/DateTime/props/propTypes.js +3 -1
  135. package/lib/DateTime/validator.js +3 -3
  136. package/lib/DropBox/DropBox.js +16 -10
  137. package/lib/DropBox/props/defaultProps.js +1 -0
  138. package/lib/DropBox/props/propTypes.js +1 -0
  139. package/lib/DropDown/DropDown.js +12 -8
  140. package/lib/DropDown/DropDownHeading.js +16 -9
  141. package/lib/DropDown/DropDownItem.js +3 -1
  142. package/lib/DropDown/DropDownSearch.js +5 -2
  143. package/lib/DropDown/DropDownSeparator.js +3 -1
  144. package/lib/DropDown/props/defaultProps.js +3 -1
  145. package/lib/DropDown/props/propTypes.js +4 -1
  146. package/lib/Heading/Heading.js +11 -8
  147. package/lib/Label/Label.js +12 -7
  148. package/lib/Label/props/defaultProps.js +2 -1
  149. package/lib/Label/props/propTypes.js +1 -0
  150. package/lib/Layout/Box.js +2 -1
  151. package/lib/Layout/Container.js +2 -1
  152. package/lib/Layout/props/defaultProps.js +4 -2
  153. package/lib/Layout/props/propTypes.js +2 -0
  154. package/lib/ListItem/ListContainer.js +9 -8
  155. package/lib/ListItem/ListItem.js +14 -8
  156. package/lib/ListItem/ListItemWithAvatar.js +13 -8
  157. package/lib/ListItem/ListItemWithCheckBox.js +11 -7
  158. package/lib/ListItem/ListItemWithIcon.js +14 -8
  159. package/lib/ListItem/ListItemWithRadio.js +12 -7
  160. package/lib/ListItem/props/defaultProps.js +12 -6
  161. package/lib/ListItem/props/propTypes.js +10 -2
  162. package/lib/Modal/Modal.js +12 -9
  163. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +15 -11
  164. package/lib/MultiSelect/AdvancedMultiSelect.js +17 -12
  165. package/lib/MultiSelect/EmptyState.js +3 -1
  166. package/lib/MultiSelect/MultiSelect.js +15 -10
  167. package/lib/MultiSelect/MultiSelectHeader.js +3 -1
  168. package/lib/MultiSelect/MultiSelectWithAvatar.js +15 -10
  169. package/lib/MultiSelect/SelectedOptions.js +5 -2
  170. package/lib/MultiSelect/Suggestions.js +4 -2
  171. package/lib/MultiSelect/props/defaultProps.js +8 -4
  172. package/lib/MultiSelect/props/propTypes.js +8 -4
  173. package/lib/PopOver/PopOver.js +11 -9
  174. package/lib/Popup/Popup.js +4 -2
  175. package/lib/Popup/__tests__/Popup.spec.js +3 -1
  176. package/lib/Provider/LibraryContext.js +5 -3
  177. package/lib/Provider/NumberGenerator/NumberGenerator.js +1 -1
  178. package/lib/Radio/Radio.js +9 -7
  179. package/lib/Responsive/CustomResponsive.js +6 -4
  180. package/lib/Responsive/RefWrapper.js +4 -2
  181. package/lib/Responsive/ResizeComponent.js +9 -4
  182. package/lib/Responsive/ResizeObserver.js +4 -1
  183. package/lib/Responsive/Responsive.js +6 -4
  184. package/lib/Responsive/sizeObservers.js +4 -2
  185. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +3 -1
  186. package/lib/Ribbon/Ribbon.js +21 -15
  187. package/lib/Ribbon/props/defaultProps.js +2 -1
  188. package/lib/Ribbon/props/propTypes.js +2 -1
  189. package/lib/RippleEffect/RippleEffect.js +7 -6
  190. package/lib/Select/GroupSelect.js +18 -15
  191. package/lib/Select/Select.js +18 -15
  192. package/lib/Select/SelectWithAvatar.js +16 -11
  193. package/lib/Select/SelectWithIcon.js +14 -9
  194. package/lib/Select/__tests__/Select.spec.js +2 -2
  195. package/lib/Select/props/defaultProps.js +8 -2
  196. package/lib/Select/props/propTypes.js +8 -4
  197. package/lib/Stencils/Stencils.js +12 -9
  198. package/lib/Switch/Switch.js +13 -8
  199. package/lib/Switch/props/defaultProps.js +2 -1
  200. package/lib/Switch/props/propTypes.js +1 -0
  201. package/lib/Tab/Tab.js +10 -7
  202. package/lib/Tab/TabContent.js +4 -2
  203. package/lib/Tab/TabContentWrapper.js +4 -2
  204. package/lib/Tab/TabWrapper.js +6 -4
  205. package/lib/Tab/Tabs.js +12 -6
  206. package/lib/Tab/props/defaultProps.js +10 -5
  207. package/lib/Tab/props/propTypes.js +10 -5
  208. package/lib/Tag/Tag.js +12 -8
  209. package/lib/Tag/props/defaultProps.js +2 -1
  210. package/lib/Tag/props/propTypes.js +2 -1
  211. package/lib/TextBox/TextBox.js +15 -10
  212. package/lib/TextBox/props/defaultProps.js +2 -1
  213. package/lib/TextBox/props/propTypes.js +5 -2
  214. package/lib/TextBoxIcon/TextBoxIcon.js +15 -10
  215. package/lib/TextBoxIcon/props/defaultProps.js +2 -1
  216. package/lib/TextBoxIcon/props/propTypes.js +1 -0
  217. package/lib/Textarea/Textarea.js +15 -10
  218. package/lib/Textarea/props/defaultProps.js +2 -1
  219. package/lib/Textarea/props/propTypes.js +1 -0
  220. package/lib/Tooltip/Tooltip.js +12 -9
  221. package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -1
  222. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +8 -6
  223. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +10 -7
  224. package/lib/deprecated/PortalLayer/PortalLayer.js +10 -7
  225. package/lib/semantic/Button/Button.js +9 -7
  226. package/lib/utils/constructFullName.js +2 -2
  227. package/lib/utils/dropDownUtils.js +5 -3
  228. package/package.json +11 -6
@@ -32,6 +32,7 @@ export default class Switch extends React.Component {
32
32
  title,
33
33
  disableTitle,
34
34
  dataId,
35
+ dataSelectorId,
35
36
  customClass,
36
37
  customProps
37
38
  } = this.props;
@@ -55,7 +56,8 @@ export default class Switch extends React.Component {
55
56
  "data-title": disabled ? disableTitle : title,
56
57
  "aria-checked": checked,
57
58
  role: "switch",
58
- tabIndex: isReadOnly || disabled ? '-1' : '0'
59
+ tabIndex: isReadOnly || disabled ? '-1' : '0',
60
+ dataSelectorId: dataSelectorId
59
61
  }, SwitchProps), /*#__PURE__*/React.createElement(Box, {
60
62
  className: `${style[size]} ${customSwitchSize}`
61
63
  }, /*#__PURE__*/React.createElement("input", {
@@ -85,9 +87,10 @@ export default class Switch extends React.Component {
85
87
  }
86
88
  Switch.defaultProps = defaultProps;
87
89
  Switch.propTypes = propTypes;
88
- if (false) {
89
- Switch.docs = {
90
- componentGroup: 'Form Elements',
91
- folderName: 'Style Guide'
92
- };
93
- }
90
+
91
+ // if (__DOCS__) {
92
+ // Switch.docs = {
93
+ // componentGroup: 'Form Elements',
94
+ // folderName: 'Style Guide'
95
+ // };
96
+ // }
@@ -6,5 +6,6 @@ export const defaultProps = {
6
6
  size: 'medium',
7
7
  isReadOnly: false,
8
8
  customClass: {},
9
- customProps: {}
9
+ customProps: {},
10
+ dataSelectorId: 'switch'
10
11
  };
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
2
2
  export const propTypes = {
3
3
  checked: PropTypes.bool,
4
4
  dataId: PropTypes.string,
5
+ dataSelectorId: PropTypes.string,
5
6
  disableTitle: PropTypes.string,
6
7
  disabled: PropTypes.bool,
7
8
  id: PropTypes.string.isRequired,
package/es/Tab/Tab.js CHANGED
@@ -30,6 +30,7 @@ export default function Tab(_ref) {
30
30
  children,
31
31
  className,
32
32
  dataId,
33
+ dataSelectorId,
33
34
  title,
34
35
  titlePosition,
35
36
  activeClass,
@@ -84,7 +85,8 @@ export default function Tab(_ref) {
84
85
  "aria-controls": id,
85
86
  "aria-selected": isActive ? true : false,
86
87
  tabIndex: isLink ? undefined : isActive && !isDisabled ? '0' : '0',
87
- "aria-label": text ? text : null
88
+ "aria-label": text ? text : null,
89
+ dataSelectorId: dataSelectorId
88
90
  }, customProps), /*#__PURE__*/React.createElement(Container, {
89
91
  alignBox: "row",
90
92
  align: "both",
@@ -99,9 +101,10 @@ export default function Tab(_ref) {
99
101
  }
100
102
  Tab.defaultProps = Tab_defaultProps;
101
103
  Tab.propTypes = Tab_propTypes;
102
- if (false) {
103
- Tab.docs = {
104
- componentGroup: 'Tab',
105
- folderName: 'Style Guide'
106
- };
107
- }
104
+
105
+ // if (__DOCS__) {
106
+ // Tab.docs = {
107
+ // componentGroup: 'Tab',
108
+ // folderName: 'Style Guide'
109
+ // };
110
+ // }
@@ -10,7 +10,8 @@ const TabContent = _ref => {
10
10
  children,
11
11
  scroll,
12
12
  dataId,
13
- id
13
+ id,
14
+ dataSelectorId
14
15
  } = _ref;
15
16
  return /*#__PURE__*/React.createElement(Container, {
16
17
  className: style.container,
@@ -19,7 +20,8 @@ const TabContent = _ref => {
19
20
  isScrollAttribute: true,
20
21
  "aria-labelledby": id,
21
22
  tabindex: "-1",
22
- role: "tabpanel"
23
+ role: "tabpanel",
24
+ dataSelectorId: dataSelectorId
23
25
  }, children);
24
26
  };
25
27
  TabContent.defaultProps = TabContent_defaultProps;
@@ -10,14 +10,16 @@ const TabContentWrapper = _ref => {
10
10
  children,
11
11
  dataId,
12
12
  selectedTab,
13
- onScroll
13
+ onScroll,
14
+ dataSelectorId
14
15
  } = _ref;
15
16
  return /*#__PURE__*/React.createElement(Box, {
16
17
  flexible: true,
17
18
  style: style,
18
19
  dataId: dataId,
19
20
  className: className,
20
- onScroll: onScroll
21
+ onScroll: onScroll,
22
+ dataSelectorId: dataSelectorId
21
23
  }, React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
22
24
  };
23
25
  TabContentWrapper.defaultProps = TabContentWrapper_defaultProps;
@@ -16,7 +16,8 @@ function TabWrapper(_ref) {
16
16
  needAppearance,
17
17
  align,
18
18
  dataId,
19
- children
19
+ children,
20
+ dataSelectorId
20
21
  } = _ref;
21
22
  let [selectedTabInternal, setSelected] = useState(!hookToDisableInternalState ? defaultTab || 0 : null);
22
23
  const setSelectedTab = useCallback(id => {
@@ -27,7 +28,8 @@ function TabWrapper(_ref) {
27
28
  }, [hookToDisableInternalState, onSelect]);
28
29
  return /*#__PURE__*/React.createElement(Container, {
29
30
  alignBox: align === 'vertical' ? 'column' : 'row',
30
- dataId: dataId
31
+ dataId: dataId,
32
+ dataSelectorId: dataSelectorId
31
33
  }, React.Children.map(children, child => {
32
34
  let TabsChild = child.type;
33
35
  let selectedTab = hookToDisableInternalState ? defaultTab : selectedTabInternal;
package/es/Tab/Tabs.js CHANGED
@@ -389,7 +389,8 @@ class Tabs extends React.Component {
389
389
  getTargetRef,
390
390
  position,
391
391
  customProps,
392
- getCustomDropBoxHeaderPlaceHolder
392
+ getCustomDropBoxHeaderPlaceHolder,
393
+ dataSelectorId
393
394
  } = this.props;
394
395
  let {
395
396
  DropBoxProps = {},
@@ -423,7 +424,8 @@ class Tabs extends React.Component {
423
424
  isVirtual: isVirtual
424
425
  }, classProps));
425
426
  }), React.Children.count(moreTabs) ? /*#__PURE__*/React.createElement(Box, {
426
- className: `${tabsStyle.menu} `
427
+ className: `${tabsStyle.menu} `,
428
+ dataSelectorId: `${dataSelectorId}_moreIcon`
427
429
  }, /*#__PURE__*/React.createElement(Container, _extends({
428
430
  className: `${btnstyle.buttonReset} ${moreButtonClass} ${isPopupOpen ? moreButtonActiveClass : ''}`,
429
431
  align: "both",
@@ -511,7 +513,8 @@ class Tabs extends React.Component {
511
513
  align,
512
514
  needAppearance,
513
515
  children,
514
- containerClass
516
+ containerClass,
517
+ dataSelectorId
515
518
  } = this.props;
516
519
  let {
517
520
  totalDimension,
@@ -527,7 +530,8 @@ class Tabs extends React.Component {
527
530
  let tabsClass = cs([tabsStyle.tab, className, needAppearance && appearanceClass]);
528
531
  let hlClass = cs([tabsStyle.highlight, highlightClass, isAnimate && tabsStyle.lineAnimate]);
529
532
  return /*#__PURE__*/React.createElement(Box, {
530
- className: containerClass
533
+ className: containerClass,
534
+ dataSelectorId: dataSelectorId
531
535
  }, /*#__PURE__*/React.createElement(Container, {
532
536
  alignBox: align === 'vertical' ? 'row' : 'column',
533
537
  className: tabsClass,
@@ -1,12 +1,15 @@
1
1
  export const Tab_defaultProps = {
2
2
  dataId: 'tabMenu',
3
- customProps: {}
3
+ customProps: {},
4
+ dataSelectorId: 'tab'
4
5
  };
5
6
  export const TabContent_defaultProps = {
6
- dataId: 'tabContent'
7
+ dataId: 'tabContent',
8
+ dataSelectorId: 'tabContent'
7
9
  };
8
10
  export const TabContentWrapper_defaultProps = {
9
- children: []
11
+ children: [],
12
+ dataSelectorId: 'tabContentWrapper'
10
13
  };
11
14
  export const Tabs_defaultProps = {
12
15
  isAnimate: false,
@@ -25,7 +28,8 @@ export const Tabs_defaultProps = {
25
28
  iconName: 'ZD-TB-menu',
26
29
  iconSize: '7',
27
30
  containerClass: '',
28
- customProps: {}
31
+ customProps: {},
32
+ dataSelectorId: 'tabs'
29
33
  };
30
34
  export const TabWrapper_defaultProps = {
31
35
  hookToDisableInternalState: false,
@@ -35,5 +39,6 @@ export const TabWrapper_defaultProps = {
35
39
  needTabBorder: false,
36
40
  type: 'alpha',
37
41
  align: 'vertical',
38
- needAppearance: true
42
+ needAppearance: true,
43
+ dataSelectorId: 'tabWrapper'
39
44
  };
@@ -23,13 +23,15 @@ export const Tab_propTypes = {
23
23
  tourId: PropTypes.string,
24
24
  type: PropTypes.string,
25
25
  customProps: PropTypes.object,
26
- isVirtual: PropTypes.bool
26
+ isVirtual: PropTypes.bool,
27
+ dataSelectorId: PropTypes.string
27
28
  };
28
29
  export const TabContent_propTypes = {
29
30
  children: PropTypes.node,
30
31
  dataId: PropTypes.string,
31
32
  id: PropTypes.string,
32
- scroll: PropTypes.oneOf(['vertical', 'horizontal', 'both', 'none'])
33
+ scroll: PropTypes.oneOf(['vertical', 'horizontal', 'both', 'none']),
34
+ dataSelectorId: PropTypes.string
33
35
  };
34
36
  export const TabContentWrapper_propTypes = {
35
37
  children: PropTypes.node,
@@ -37,7 +39,8 @@ export const TabContentWrapper_propTypes = {
37
39
  dataId: PropTypes.string,
38
40
  onScroll: PropTypes.func,
39
41
  selectedTab: PropTypes.string,
40
- style: PropTypes.object
42
+ style: PropTypes.object,
43
+ dataSelectorId: PropTypes.string
41
44
  };
42
45
  export const Tabs_propTypes = {
43
46
  align: PropTypes.oneOf(['vertical', 'horizontal']),
@@ -84,7 +87,8 @@ export const Tabs_propTypes = {
84
87
  ListItemProps: PropTypes.object,
85
88
  MoreButtonProps: PropTypes.object
86
89
  }),
87
- getCustomDropBoxHeaderPlaceHolder: PropTypes.func
90
+ getCustomDropBoxHeaderPlaceHolder: PropTypes.func,
91
+ dataSelectorId: PropTypes.string
88
92
  };
89
93
  export const TabWrapper_propTypes = {
90
94
  align: PropTypes.oneOf(['vertical', 'horizontal']),
@@ -98,5 +102,6 @@ export const TabWrapper_propTypes = {
98
102
  needPadding: PropTypes.bool,
99
103
  needTabBorder: PropTypes.bool,
100
104
  onSelect: PropTypes.func,
101
- type: PropTypes.oneOf(['alpha', 'beta', 'zeta'])
105
+ type: PropTypes.oneOf(['alpha', 'beta', 'zeta']),
106
+ dataSelectorId: PropTypes.string
102
107
  };
package/es/Tag/Tag.js CHANGED
@@ -71,6 +71,7 @@ export default class Tag extends PureComponent {
71
71
  onSelectTag,
72
72
  closeTitle,
73
73
  dataId,
74
+ dataSelectorId,
74
75
  iconName,
75
76
  iconSize,
76
77
  tooltip,
@@ -99,7 +100,8 @@ export default class Tag extends PureComponent {
99
100
  ref: this.getRef,
100
101
  "data-title": tooltip ? tooltip : text,
101
102
  tabIndex: disabled ? '-1' : '0',
102
- "aria-labelledby": getAriaId
103
+ "aria-labelledby": getAriaId,
104
+ "data-selector-id": dataSelectorId
103
105
  }, hasAvatar ? /*#__PURE__*/React.createElement("div", {
104
106
  className: style.avatar
105
107
  }, /*#__PURE__*/React.createElement(Avatar, {
@@ -140,9 +142,9 @@ export default class Tag extends PureComponent {
140
142
  }
141
143
  Tag.defaultProps = defaultProps;
142
144
  Tag.propTypes = propTypes;
143
- if (false) {
144
- Tag.docs = {
145
- componentGroup: 'Molecule',
146
- folderName: 'Style Guide'
147
- };
148
- }
145
+ // if (__DOCS__) {
146
+ // Tag.docs = {
147
+ // componentGroup: 'Molecule',
148
+ // folderName: 'Style Guide'
149
+ // };
150
+ // }
@@ -9,5 +9,6 @@ export const defaultProps = {
9
9
  customClass: {},
10
10
  a11y: {},
11
11
  needEffect: true,
12
- isReadOnly: false
12
+ isReadOnly: false,
13
+ dataSelectorId: 'tag'
13
14
  };
@@ -30,5 +30,6 @@ export const propTypes = {
30
30
  clearLabel: PropTypes.string
31
31
  }),
32
32
  needEffect: PropTypes.bool,
33
- isReadOnly: PropTypes.bool
33
+ isReadOnly: PropTypes.bool,
34
+ dataSelectorId: PropTypes.string
34
35
  };
@@ -86,7 +86,8 @@ export default class Textbox extends React.PureComponent {
86
86
  a11y,
87
87
  customClass,
88
88
  isFocus,
89
- customProps
89
+ customProps,
90
+ dataSelectorId
90
91
  } = this.props;
91
92
  let {
92
93
  ariaLabel,
@@ -136,6 +137,7 @@ export default class Textbox extends React.PureComponent {
136
137
  "aria-multiselectable": ariaMultiselectable,
137
138
  className: `${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${isClickable ? style.pointer : ''} ${classList} ${style[`borderColor_${borderColor}`]} ${customClass ? customClass : ''}`,
138
139
  "data-id": `${dataId}`,
140
+ "data-selector-id": dataSelectorId,
139
141
  id: htmlId || id,
140
142
  maxLength: maxLength,
141
143
  name: name,
@@ -156,11 +158,12 @@ export default class Textbox extends React.PureComponent {
156
158
  }
157
159
  Textbox.defaultProps = defaultProps;
158
160
  Textbox.propTypes = propTypes;
159
- if (false) {
160
- Textbox.docs = {
161
- componentGroup: 'Form Elements',
162
- folderName: 'Style Guide',
163
- external: true,
164
- description: ' '
165
- };
166
- }
161
+
162
+ // if (__DOCS__) {
163
+ // Textbox.docs = {
164
+ // componentGroup: 'Form Elements',
165
+ // folderName: 'Style Guide',
166
+ // external: true,
167
+ // description: ' '
168
+ // };
169
+ // }
@@ -15,5 +15,6 @@ export const defaultProps = {
15
15
  borderColor: 'default',
16
16
  a11y: {},
17
17
  isFocus: false,
18
- customProps: {}
18
+ customProps: {},
19
+ dataSelectorId: 'textBox'
19
20
  };
@@ -49,5 +49,6 @@ export const propTypes = {
49
49
  ariaMultiselectable: PropTypes.bool
50
50
  }),
51
51
  isFocus: PropTypes.bool,
52
- customProps: PropTypes.object
52
+ customProps: PropTypes.object,
53
+ dataSelectorId: PropTypes.string
53
54
  };
@@ -63,6 +63,7 @@ export default class TextBoxIcon extends React.Component {
63
63
  onChange,
64
64
  title,
65
65
  dataId,
66
+ dataSelectorId,
66
67
  needReadOnlyStyle,
67
68
  isClickable,
68
69
  needEffect,
@@ -97,6 +98,7 @@ export default class TextBoxIcon extends React.Component {
97
98
  alignBox: "row",
98
99
  isCover: false,
99
100
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? needEffect ? style.effect : style.readonly : style.effect} ${isActive || isFocus ? style.effectFocused : ''} ${customTBoxWrap} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
101
+ dataSelectorId: dataSelectorId,
100
102
  "data-title": isDisabled ? title : null
101
103
  }, /*#__PURE__*/React.createElement(Box, {
102
104
  flexible: true
@@ -153,11 +155,11 @@ export default class TextBoxIcon extends React.Component {
153
155
  }
154
156
  TextBoxIcon.defaultProps = defaultProps;
155
157
  TextBoxIcon.propTypes = propTypes;
156
- if (false) {
157
- TextBoxIcon.docs = {
158
- componentGroup: 'Form Elements',
159
- folderName: 'Style Guide',
160
- external: true,
161
- description: ' '
162
- };
163
- }
158
+ // if (__DOCS__) {
159
+ // TextBoxIcon.docs = {
160
+ // componentGroup: 'Form Elements',
161
+ // folderName: 'Style Guide',
162
+ // external: true,
163
+ // description: ' '
164
+ // };
165
+ // }
@@ -17,5 +17,6 @@ export const defaultProps = {
17
17
  customClass: {},
18
18
  iconOnHover: false,
19
19
  isFocus: false,
20
- customProps: {}
20
+ customProps: {},
21
+ dataSelectorId: 'textBoxIcon'
21
22
  };
@@ -3,6 +3,7 @@ export const propTypes = {
3
3
  borderColor: PropTypes.oneOf(['transparent', 'default', 'error']),
4
4
  children: PropTypes.node,
5
5
  dataId: PropTypes.string,
6
+ dataSelectorId: PropTypes.string,
6
7
  htmlId: PropTypes.string,
7
8
  i18nKeys: PropTypes.shape({
8
9
  clearText: PropTypes.string
@@ -45,6 +45,7 @@ export default class Textarea extends React.Component {
45
45
  getRef,
46
46
  onFocus,
47
47
  dataId,
48
+ dataSelectorId,
48
49
  isReadOnly,
49
50
  needAppearance,
50
51
  needReadOnlyStyle,
@@ -90,17 +91,19 @@ export default class Textarea extends React.Component {
90
91
  onBlur: this.onBlur,
91
92
  ref: getRef,
92
93
  value: text,
93
- id: htmlId
94
+ id: htmlId,
95
+ "data-selector-id": dataSelectorId
94
96
  }));
95
97
  }
96
98
  }
97
99
  Textarea.defaultProps = defaultProps;
98
100
  Textarea.propTypes = propTypes;
99
- if (false) {
100
- Textarea.docs = {
101
- componentGroup: 'Form Elements',
102
- folderName: 'Style Guide',
103
- external: true,
104
- description: ' '
105
- };
106
- }
101
+
102
+ // if (__DOCS__) {
103
+ // Textarea.docs = {
104
+ // componentGroup: 'Form Elements',
105
+ // folderName: 'Style Guide',
106
+ // external: true,
107
+ // description: ' '
108
+ // };
109
+ // }
@@ -12,5 +12,6 @@ export const defaultProps = {
12
12
  needEffect: true,
13
13
  autoFocus: false,
14
14
  customClass: '',
15
- a11y: {}
15
+ a11y: {},
16
+ dataSelectorId: 'textarea'
16
17
  };
@@ -5,6 +5,7 @@ export const propTypes = {
5
5
  borderColor: PropTypes.oneOf(['transparent', 'default']),
6
6
  className: PropTypes.string,
7
7
  dataId: PropTypes.string,
8
+ dataSelectorId: PropTypes.string,
8
9
  getRef: PropTypes.func,
9
10
  htmlId: PropTypes.string,
10
11
  isDisabled: PropTypes.bool,
@@ -462,11 +462,12 @@ export default class Tooltip extends React.Component {
462
462
  }
463
463
  Tooltip.propTypes = propTypes;
464
464
  Tooltip.defaultProps = defaultProps;
465
- if (false) {
466
- Tooltip.docs = {
467
- componentGroup: 'Atom',
468
- folderName: 'Style Guide',
469
- description: ' ',
470
- external: true
471
- };
472
- }
465
+
466
+ // if (__DOCS__) {
467
+ // Tooltip.docs = {
468
+ // componentGroup: 'Atom',
469
+ // folderName: 'Style Guide',
470
+ // description: ' ',
471
+ // external: true
472
+ // };
473
+ // }
@@ -69,8 +69,8 @@ export default class VelocityAnimation extends React.Component {
69
69
  VelocityAnimation.defaultProps = defaultProps;
70
70
  VelocityAnimation.propTypes = propTypes;
71
71
  VelocityAnimation.contextType = LibraryContext;
72
- if (false) {
73
- VelocityAnimation.docs = {
74
- componentGroup: 'Animation'
75
- };
76
- }
72
+ // if (__DOCS__) {
73
+ // VelocityAnimation.docs = {
74
+ // componentGroup: 'Animation'
75
+ // };
76
+ // }
@@ -98,8 +98,9 @@ VelocityAnimationGroup.defaultProps = {
98
98
  };
99
99
  VelocityAnimationGroup.propTypes = propTypes;
100
100
  VelocityAnimationGroup.contextType = LibraryContext;
101
- if (false) {
102
- VelocityAnimationGroup.docs = {
103
- componentGroup: 'Animation'
104
- };
105
- }
101
+
102
+ // if (__DOCS__) {
103
+ // VelocityAnimationGroup.docs = {
104
+ // componentGroup: 'Animation'
105
+ // };
106
+ // }
@@ -91,9 +91,10 @@ export default class PortalLayer extends React.Component {
91
91
  }
92
92
  PortalLayer.defaultProps = defaultProps;
93
93
  PortalLayer.propTypes = propTypes;
94
- if (false) {
95
- PortalLayer.docs = {
96
- componentGroup: 'Atom',
97
- folderName: 'Style Guide'
98
- };
99
- }
94
+
95
+ // if (__DOCS__) {
96
+ // PortalLayer.docs = {
97
+ // componentGroup: 'Atom',
98
+ // folderName: 'Style Guide'
99
+ // };
100
+ // }
@@ -50,9 +50,9 @@ export default class Button extends React.Component {
50
50
  }
51
51
  Button.defaultProps = defaultProps;
52
52
  Button.propTypes = propTypes;
53
- if (false) {
54
- Button.docs = {
55
- componentGroup: 'semantic',
56
- folderName: 'DefaultComponents'
57
- };
58
- }
53
+ // if (__DOCS__) {
54
+ // Button.docs = {
55
+ // componentGroup: 'semantic',
56
+ // folderName: 'DefaultComponents'
57
+ // };
58
+ // }
package/install.md ADDED
@@ -0,0 +1,10 @@
1
+ - For New :
2
+
3
+ # npm i
4
+ # npm run common_package_build
5
+
6
+ For Update:
7
+
8
+ # npm run download
9
+ # npm run common_package_build
10
+
@@ -10,8 +10,10 @@ var _defaultProps = require("./props/defaultProps");
10
10
  var _propTypes = require("./props/propTypes");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
12
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
13
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
14
14
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
17
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
18
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
17
19
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -64,7 +66,9 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
64
66
  unMount = _this$props2.unMount,
65
67
  disableInternalState = _this$props2.disableInternalState,
66
68
  propSelectedItem = _this$props2.selectedItem,
67
- a11y = _this$props2.a11y;
69
+ a11y = _this$props2.a11y,
70
+ dataId = _this$props2.dataId,
71
+ dataSelectorId = _this$props2.dataSelectorId;
68
72
  var selectedItem = this.state.selectedItem;
69
73
  var children = _react["default"].Children.map(this.props.children, function (child) {
70
74
  if (child) {
@@ -85,7 +89,9 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
85
89
  },
86
90
  role: role,
87
91
  "aria-expanded": ariaExpanded,
88
- "aria-haspopup": ariaHaspopup
92
+ "aria-haspopup": ariaHaspopup,
93
+ "data-id": dataId,
94
+ "data-selector-id": dataSelectorId
89
95
  }, children);
90
96
  }
91
97
  }]);
@@ -94,9 +100,10 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
94
100
  exports["default"] = Accordion;
95
101
  Accordion.propTypes = _propTypes.Accordion_propTypes;
96
102
  Accordion.defaultProps = _defaultProps.Accordion_defaultProps;
97
- if (false) {
98
- Accordion.docs = {
99
- componentGroup: 'Animation',
100
- folderName: 'Style Guide'
101
- };
102
- }
103
+
104
+ // if (__DOCS__) {
105
+ // Accordion.docs = {
106
+ // componentGroup: 'Animation',
107
+ // folderName: 'Style Guide'
108
+ // };
109
+ // }