@zohodesk/components 1.0.0-temp-211.2 → 1.0.0-temp-217

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 (128) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +118 -31
  3. package/es/AvatarTeam/props/propTypes.js +2 -1
  4. package/es/CheckBox/CheckBox.js +6 -5
  5. package/es/CheckBox/CheckBox.module.css +5 -2
  6. package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
  7. package/es/DateTime/CalendarView.js +17 -12
  8. package/es/DateTime/DateTime.js +26 -8
  9. package/es/DateTime/DateTime.module.css +5 -5
  10. package/es/DateTime/DateWidget.js +13 -2
  11. package/es/DateTime/DaysRow.js +3 -2
  12. package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  13. package/es/DateTime/props/defaultProps.js +9 -3
  14. package/es/DateTime/props/propTypes.js +16 -4
  15. package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  16. package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
  17. package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
  18. package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
  19. package/es/ListItem/ListItemWithAvatar.js +7 -3
  20. package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
  21. package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
  22. package/es/ListItem/props/propTypes.js +6 -1
  23. package/es/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
  24. package/es/MultiSelect/AdvancedMultiSelect.js +4 -2
  25. package/es/MultiSelect/MultiSelect.js +11 -3
  26. package/es/MultiSelect/props/propTypes.js +6 -3
  27. package/es/Popup/Popup.js +125 -7
  28. package/es/Popup/intersectionObserver.js +49 -0
  29. package/es/Popup/props/propTypes.js +30 -0
  30. package/es/Radio/Radio.js +9 -7
  31. package/es/Radio/Radio.module.css +1 -1
  32. package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
  33. package/es/Responsive/ResizeObserver.js +21 -85
  34. package/es/Responsive/ResizeObserverWithPolyfill.js +140 -0
  35. package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
  36. package/es/Select/GroupSelect.js +15 -3
  37. package/es/Select/props/defaultProps.js +2 -1
  38. package/es/Select/props/propTypes.js +5 -1
  39. package/es/Tag/Tag.js +10 -3
  40. package/es/Tag/props/defaultProps.js +2 -1
  41. package/es/Tag/props/propTypes.js +7 -1
  42. package/es/TextBox/TextBox.js +1 -1
  43. package/es/Textarea/Textarea.js +4 -2
  44. package/es/Textarea/Textarea.module.css +1 -1
  45. package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
  46. package/es/Textarea/props/propTypes.js +2 -1
  47. package/es/Typography/Typography.js +38 -0
  48. package/es/Typography/css/Typography.module.css +489 -0
  49. package/es/Typography/css/cssJSLogic.js +56 -0
  50. package/es/Typography/props/defaultProps.js +8 -0
  51. package/es/Typography/props/propTypes.js +27 -0
  52. package/es/Typography/utils/index.js +50 -0
  53. package/es/index.js +1 -1
  54. package/es/v1/AppContainer/AppContainer.js +0 -6
  55. package/es/v1/DateTime/CalendarView.js +9 -6
  56. package/es/v1/DateTime/DateTime.js +18 -4
  57. package/es/v1/DateTime/DateWidget.js +5 -1
  58. package/es/v1/DateTime/DaysRow.js +3 -2
  59. package/es/v1/DateTime/props/defaultProps.js +9 -3
  60. package/es/v1/DateTime/props/propTypes.js +11 -4
  61. package/es/v1/MultiSelect/MultiSelect.js +7 -1
  62. package/es/v1/Select/GroupSelect.js +5 -0
  63. package/es/v1/Typography/Typography.js +1 -1
  64. package/lib/AvatarTeam/props/propTypes.js +3 -1
  65. package/lib/CheckBox/CheckBox.js +5 -4
  66. package/lib/CheckBox/CheckBox.module.css +5 -2
  67. package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
  68. package/lib/DateTime/CalendarView.js +17 -12
  69. package/lib/DateTime/DateTime.js +38 -9
  70. package/lib/DateTime/DateTime.module.css +5 -5
  71. package/lib/DateTime/DateWidget.js +13 -2
  72. package/lib/DateTime/DaysRow.js +3 -2
  73. package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  74. package/lib/DateTime/props/defaultProps.js +9 -3
  75. package/lib/DateTime/props/propTypes.js +16 -4
  76. package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  77. package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
  78. package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
  79. package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
  80. package/lib/ListItem/ListItemWithAvatar.js +8 -4
  81. package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
  82. package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
  83. package/lib/ListItem/props/propTypes.js +8 -1
  84. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
  85. package/lib/MultiSelect/AdvancedMultiSelect.js +4 -2
  86. package/lib/MultiSelect/MultiSelect.js +11 -3
  87. package/lib/MultiSelect/props/propTypes.js +8 -6
  88. package/lib/Popup/Popup.js +135 -8
  89. package/lib/Popup/intersectionObserver.js +72 -0
  90. package/lib/Popup/props/propTypes.js +51 -0
  91. package/lib/Radio/Radio.js +10 -7
  92. package/lib/Radio/Radio.module.css +1 -1
  93. package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
  94. package/lib/Responsive/ResizeObserver.js +20 -88
  95. package/lib/Responsive/ResizeObserverWithPolyfill.js +168 -0
  96. package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
  97. package/lib/Select/GroupSelect.js +17 -5
  98. package/lib/Select/props/defaultProps.js +2 -1
  99. package/lib/Select/props/propTypes.js +5 -1
  100. package/lib/Tag/Tag.js +10 -5
  101. package/lib/Tag/props/defaultProps.js +2 -1
  102. package/lib/Tag/props/propTypes.js +9 -1
  103. package/lib/TextBox/TextBox.js +1 -1
  104. package/lib/Textarea/Textarea.js +4 -2
  105. package/lib/Textarea/Textarea.module.css +1 -1
  106. package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
  107. package/lib/Textarea/props/propTypes.js +2 -1
  108. package/lib/Typography/Typography.js +56 -0
  109. package/lib/Typography/css/Typography.module.css +489 -0
  110. package/lib/Typography/css/cssJSLogic.js +48 -0
  111. package/lib/Typography/props/defaultProps.js +15 -0
  112. package/lib/Typography/props/propTypes.js +38 -0
  113. package/lib/Typography/utils/index.js +59 -0
  114. package/lib/index.js +1 -1
  115. package/lib/v1/AppContainer/AppContainer.js +0 -12
  116. package/lib/v1/DateTime/CalendarView.js +9 -6
  117. package/lib/v1/DateTime/DateTime.js +27 -4
  118. package/lib/v1/DateTime/DateWidget.js +5 -1
  119. package/lib/v1/DateTime/DaysRow.js +3 -2
  120. package/lib/v1/DateTime/props/defaultProps.js +9 -3
  121. package/lib/v1/DateTime/props/propTypes.js +11 -4
  122. package/lib/v1/MultiSelect/MultiSelect.js +7 -1
  123. package/lib/v1/Select/GroupSelect.js +5 -0
  124. package/lib/v1/Typography/Typography.js +2 -2
  125. package/package.json +8 -8
  126. package/propValidationArg.json +1 -1
  127. /package/es/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
  128. /package/lib/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
@@ -1,68 +1,45 @@
1
- const hasResizeObserver = !!window.ResizeObserver;
2
- const mutationObserverOptions = {
3
- //NOTE: we donot consider child Count
4
- // childList: true,
5
- attributes: true
6
- };
7
-
8
- function getSize(element) {
9
- let {
10
- offsetHeight,
11
- offsetWidth
12
- } = element; // const { height, width } = element.getBoundingClientRect();
1
+ function getBorderBoxSizeFromEntry(entry) {
2
+ const {
3
+ borderBoxSize
4
+ } = entry;
5
+ return borderBoxSize[0];
6
+ }
13
7
 
8
+ function getSize(entry) {
9
+ const borderBoxSize = getBorderBoxSizeFromEntry(entry);
14
10
  return {
15
- height: offsetHeight,
16
- width: offsetWidth
11
+ height: borderBoxSize.blockSize,
12
+ width: borderBoxSize.inlineSize
17
13
  };
18
14
  }
19
15
 
20
- function dispatch() {
21
- let resizeResponsive = new Event('resizeResponsive');
22
- window.dispatchEvent(resizeResponsive);
23
- }
24
-
25
- if (!hasResizeObserver) {
26
- let interval = null;
27
- window.addEventListener('resize', () => {
28
- clearTimeout(interval);
29
- interval = setTimeout(dispatch, 100);
30
- });
31
- } // NOTE: this is not full polyfill , we just wrote what types of changes wlli
32
-
33
-
34
16
  export default class ResizeObserverPolyfill {
35
17
  constructor(onResize) {
36
- // method finding
37
- this.transitionEndHandler = this.transitionEndHandler.bind(this);
38
- this.resizeHandlerDispatch = this.resizeHandlerDispatch.bind(this);
39
18
  this.resizeHandler = this.resizeHandler.bind(this);
40
- this.replaceResizeHandler = this.replaceResizeHandler.bind(this);
41
- this.debounce = this.debounce.bind(this);
42
19
  this.onResize = onResize;
43
20
  this.targetNode = null;
44
21
  this.size = {
45
22
  height: 0,
46
23
  width: 0
47
24
  };
48
-
49
- if (hasResizeObserver) {
50
- this.resizeObserverInstance = new window.ResizeObserver(this.resizeHandlerDispatch);
51
- } else {
52
- this.mutationObserverInstance = new window.MutationObserver(this.resizeHandlerDispatch);
53
- }
25
+ this.resizeObserverInstance = new window.ResizeObserver(this.resizeHandler);
54
26
  }
55
27
 
56
28
  replaceResizeHandler(onResize) {
57
29
  this.onResize = onResize;
58
30
  }
59
31
 
60
- resizeHandler() {
61
- if (!this.targetNode) {
32
+ getEntry(entries) {
33
+ return entries[0];
34
+ }
35
+
36
+ resizeHandler(entries) {
37
+ if (!this.targetNode || !entries.length) {
62
38
  return;
63
39
  }
64
40
 
65
- const currentSize = getSize(this.targetNode); // if (this.size && shallowCompare(currentSize, this.size)) {
41
+ const entry = this.getEntry(entries);
42
+ const currentSize = getSize(entry);
66
43
 
67
44
  if (this.size && currentSize.height === this.size.height && currentSize.width === this.size.width) {
68
45
  return;
@@ -73,48 +50,9 @@ export default class ResizeObserverPolyfill {
73
50
  return true;
74
51
  }
75
52
 
76
- resizeHandlerDispatch() {
77
- if (!this.resizeHandler() || hasResizeObserver) {
78
- return;
79
- }
80
-
81
- dispatch();
82
- }
83
-
84
- debounce() {
85
- clearTimeout(this.interval);
86
- this.interval = setTimeout(this.resizeHandler, 100);
87
- }
88
-
89
- transitionEndHandler(event) {
90
- if (event.propertyName.indexOf('color') === -1) {
91
- this.resizeHandlerDispatch();
92
- }
93
- }
94
-
95
- addEventListeners(targetNode) {
96
- targetNode.addEventListener('transitionend', this.transitionEndHandler);
97
- window.addEventListener('resizeResponsive', this.debounce);
98
- targetNode.addEventListener('animationend', this.resizeHandlerDispatch);
99
- targetNode.addEventListener('webkitAnimationEnd', this.resizeHandlerDispatch);
100
- }
101
-
102
- removeEventListeners(targetNode) {
103
- targetNode.removeEventListener('transitionend', this.transitionEndHandler);
104
- window.removeEventListener('resizeResponsive', this.debounce);
105
- targetNode.removeEventListener('animationend', this.resizeHandlerDispatch);
106
- targetNode.removeEventListener('webkitAnimationEnd', this.resizeHandlerDispatch);
107
- }
108
-
109
53
  observe(targetNode) {
110
54
  this.targetNode = targetNode;
111
-
112
- if (hasResizeObserver) {
113
- this.resizeObserverInstance.observe(targetNode);
114
- } else {
115
- this.addEventListeners(targetNode);
116
- this.mutationObserverInstance.observe(targetNode, mutationObserverOptions);
117
- }
55
+ this.resizeObserverInstance.observe(targetNode);
118
56
  }
119
57
 
120
58
  replaceObservationElement(targetNode) {
@@ -124,12 +62,10 @@ export default class ResizeObserverPolyfill {
124
62
 
125
63
  this.targetNode && this.disconnect();
126
64
  targetNode && this.observe(targetNode);
127
- targetNode && this.resizeHandlerDispatch();
128
65
  }
129
66
 
130
67
  disconnect() {
131
- this.targetNode && this.removeEventListeners(this.targetNode);
132
- hasResizeObserver ? this.resizeObserverInstance.disconnect() : this.mutationObserverInstance.disconnect();
68
+ this.resizeObserverInstance.disconnect();
133
69
  this.targetNode = null;
134
70
  this.size = {
135
71
  height: 0,
@@ -0,0 +1,140 @@
1
+ const hasResizeObserver = !!window.ResizeObserver;
2
+ const mutationObserverOptions = {
3
+ //NOTE: we donot consider child Count
4
+ // childList: true,
5
+ attributes: true
6
+ };
7
+
8
+ function getSize(element) {
9
+ let {
10
+ offsetHeight,
11
+ offsetWidth
12
+ } = element; // const { height, width } = element.getBoundingClientRect();
13
+
14
+ return {
15
+ height: offsetHeight,
16
+ width: offsetWidth
17
+ };
18
+ }
19
+
20
+ function dispatch() {
21
+ let resizeResponsive = new Event('resizeResponsive');
22
+ window.dispatchEvent(resizeResponsive);
23
+ }
24
+
25
+ if (!hasResizeObserver) {
26
+ let interval = null;
27
+ window.addEventListener('resize', () => {
28
+ clearTimeout(interval);
29
+ interval = setTimeout(dispatch, 100);
30
+ });
31
+ } // NOTE: this is not full polyfill , we just wrote what types of changes wlli
32
+
33
+
34
+ export default class ResizeObserverPolyfill {
35
+ constructor(onResize) {
36
+ // method finding
37
+ this.transitionEndHandler = this.transitionEndHandler.bind(this);
38
+ this.resizeHandlerDispatch = this.resizeHandlerDispatch.bind(this);
39
+ this.resizeHandler = this.resizeHandler.bind(this);
40
+ this.replaceResizeHandler = this.replaceResizeHandler.bind(this);
41
+ this.debounce = this.debounce.bind(this);
42
+ this.onResize = onResize;
43
+ this.targetNode = null;
44
+ this.size = {
45
+ height: 0,
46
+ width: 0
47
+ };
48
+
49
+ if (hasResizeObserver) {
50
+ this.resizeObserverInstance = new window.ResizeObserver(this.resizeHandlerDispatch);
51
+ } else {
52
+ this.mutationObserverInstance = new window.MutationObserver(this.resizeHandlerDispatch);
53
+ }
54
+ }
55
+
56
+ replaceResizeHandler(onResize) {
57
+ this.onResize = onResize;
58
+ }
59
+
60
+ resizeHandler() {
61
+ if (!this.targetNode) {
62
+ return;
63
+ }
64
+
65
+ const currentSize = getSize(this.targetNode); // if (this.size && shallowCompare(currentSize, this.size)) {
66
+
67
+ if (this.size && currentSize.height === this.size.height && currentSize.width === this.size.width) {
68
+ return;
69
+ }
70
+
71
+ this.size = currentSize;
72
+ this.onResize(this.size, this.targetNode);
73
+ return true;
74
+ }
75
+
76
+ resizeHandlerDispatch() {
77
+ if (!this.resizeHandler() || hasResizeObserver) {
78
+ return;
79
+ }
80
+
81
+ dispatch();
82
+ }
83
+
84
+ debounce() {
85
+ clearTimeout(this.interval);
86
+ this.interval = setTimeout(this.resizeHandler, 100);
87
+ }
88
+
89
+ transitionEndHandler(event) {
90
+ if (event.propertyName.indexOf('color') === -1) {
91
+ this.resizeHandlerDispatch();
92
+ }
93
+ }
94
+
95
+ addEventListeners(targetNode) {
96
+ targetNode.addEventListener('transitionend', this.transitionEndHandler);
97
+ window.addEventListener('resizeResponsive', this.debounce);
98
+ targetNode.addEventListener('animationend', this.resizeHandlerDispatch);
99
+ targetNode.addEventListener('webkitAnimationEnd', this.resizeHandlerDispatch);
100
+ }
101
+
102
+ removeEventListeners(targetNode) {
103
+ targetNode.removeEventListener('transitionend', this.transitionEndHandler);
104
+ window.removeEventListener('resizeResponsive', this.debounce);
105
+ targetNode.removeEventListener('animationend', this.resizeHandlerDispatch);
106
+ targetNode.removeEventListener('webkitAnimationEnd', this.resizeHandlerDispatch);
107
+ }
108
+
109
+ observe(targetNode) {
110
+ this.targetNode = targetNode;
111
+
112
+ if (hasResizeObserver) {
113
+ this.resizeObserverInstance.observe(targetNode);
114
+ } else {
115
+ this.addEventListeners(targetNode);
116
+ this.mutationObserverInstance.observe(targetNode, mutationObserverOptions);
117
+ }
118
+ }
119
+
120
+ replaceObservationElement(targetNode) {
121
+ if (this.targetNode === targetNode) {
122
+ return;
123
+ }
124
+
125
+ this.targetNode && this.disconnect();
126
+ targetNode && this.observe(targetNode);
127
+ targetNode && this.resizeHandlerDispatch();
128
+ }
129
+
130
+ disconnect() {
131
+ this.targetNode && this.removeEventListeners(this.targetNode);
132
+ hasResizeObserver ? this.resizeObserverInstance.disconnect() : this.mutationObserverInstance.disconnect();
133
+ this.targetNode = null;
134
+ this.size = {
135
+ height: 0,
136
+ width: 0
137
+ };
138
+ }
139
+
140
+ }
@@ -9,6 +9,7 @@ exports[`ResponsiveDropBox rendering the defult props 1`] = `
9
9
  data-position="bottomStart"
10
10
  data-selector-id="dropBox"
11
11
  data-test-id="dropBox"
12
+ dot-ui-element="dropbox"
12
13
  >
13
14
  <div
14
15
  class="subContainer bottom_shadow radius defaultPalette"
@@ -588,12 +588,17 @@ export class GroupSelectComponent extends PureComponent {
588
588
  htmlId,
589
589
  iconOnHover,
590
590
  isLoading,
591
- dataSelectorId
591
+ dataSelectorId,
592
+ customProps
592
593
  } = this.props;
593
594
  i18nKeys = Object.assign({}, i18nKeys, {
594
595
  emptyText: i18nKeys.emptyText || emptyMessage,
595
596
  searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
596
597
  });
598
+ const {
599
+ TextBoxIcon_i18n,
600
+ TextBox_ally_label = 'Click to select options'
601
+ } = i18nKeys;
597
602
  let {
598
603
  selectedId,
599
604
  hoverIndex,
@@ -613,6 +618,10 @@ export class GroupSelectComponent extends PureComponent {
613
618
  } = normalizedFormatOptions[selectedId] || {};
614
619
  let setAriaId = this.getNextAriaId();
615
620
  let ariaErrorId = this.getNextAriaId();
621
+ let {
622
+ TextBoxIconProps = {},
623
+ TextBoxProps = {}
624
+ } = customProps;
616
625
  return /*#__PURE__*/React.createElement("div", {
617
626
  className: `${style.container} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
618
627
  "data-id": dataIdSlctComp,
@@ -653,8 +662,10 @@ export class GroupSelectComponent extends PureComponent {
653
662
  ariaActivedescendant: selectedId,
654
663
  ariaOwns: setAriaId
655
664
  },
665
+ i18nKeys: TextBoxIcon_i18n,
656
666
  isFocus: isPopupReady,
657
- autoComplete: false
667
+ autoComplete: false,
668
+ ...TextBoxIconProps
658
669
  }, /*#__PURE__*/React.createElement(Container, {
659
670
  align: "both",
660
671
  dataId: dataIdDownIcon
@@ -691,7 +702,8 @@ export class GroupSelectComponent extends PureComponent {
691
702
  ariaOwns: setAriaId
692
703
  },
693
704
  autoComplete: false,
694
- isFocus: isPopupReady
705
+ isFocus: isPopupReady,
706
+ ...TextBoxProps
695
707
  }))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
696
708
  query: this.responsiveFunc,
697
709
  responsiveId: "Helmet"
@@ -69,7 +69,8 @@ export const GroupSelect_defaultProps = {
69
69
  isRestrictScroll: false,
70
70
  i18nKeys: {},
71
71
  iconOnHover: false,
72
- isLoading: false
72
+ isLoading: false,
73
+ customProps: {}
73
74
  };
74
75
  export const SelectWithAvatar_defaultProps = {
75
76
  animationStyle: 'bounce',
@@ -174,7 +174,11 @@ export const GroupSelect_propTypes = {
174
174
  }),
175
175
  isLoading: PropTypes.bool,
176
176
  dataSelectorId: PropTypes.string,
177
- isDefaultSelectValue: PropTypes.bool
177
+ isDefaultSelectValue: PropTypes.bool,
178
+ customProps: PropTypes.shape({
179
+ TextBoxProps: PropTypes.object,
180
+ TextBoxIconProps: PropTypes.object
181
+ })
178
182
  };
179
183
  export const SelectWithAvatar_propTypes = { ...Select_propTypes,
180
184
  textBoxClass: PropTypes.string,
package/es/Tag/Tag.js CHANGED
@@ -83,8 +83,13 @@ export default class Tag extends PureComponent {
83
83
  customAttributes,
84
84
  a11y,
85
85
  needEffect,
86
- isReadOnly
86
+ isReadOnly,
87
+ customProps
87
88
  } = this.props;
89
+ const {
90
+ avatarProps = {},
91
+ iconProps = {}
92
+ } = customProps;
88
93
  let {
89
94
  customTag = '',
90
95
  customTagClose = '',
@@ -116,13 +121,15 @@ export default class Tag extends PureComponent {
116
121
  size: "small",
117
122
  src: imageURL,
118
123
  textPalette: isDarkPalette ? 'white' : '',
119
- customClass: customAvatar
124
+ customClass: customAvatar,
125
+ ...avatarProps
120
126
  })) : null, iconName ? /*#__PURE__*/React.createElement("div", {
121
127
  className: `${style.icon} ${customTagIcon}`,
122
128
  "aria-hidden": true
123
129
  }, /*#__PURE__*/React.createElement(Icon, {
124
130
  name: iconName,
125
- size: iconSize
131
+ size: iconSize,
132
+ ...iconProps
126
133
  })) : null, /*#__PURE__*/React.createElement("div", {
127
134
  className: `${style.text} ${textSizes}`,
128
135
  "aria-hidden": true,
@@ -11,5 +11,6 @@ export const defaultProps = {
11
11
  a11y: {},
12
12
  needEffect: true,
13
13
  isReadOnly: false,
14
- dataSelectorId: 'tag'
14
+ dataSelectorId: 'tag',
15
+ customProps: {}
15
16
  };
@@ -1,4 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
+ import { propTypes as AvatarPropTypes } from '../../Avatar/props/propTypes.js';
3
+ import { IconProps as IconPropTypes } from '@zohodesk/icons/es/Icon/props/propTypes';
2
4
  export const propTypes = {
3
5
  active: PropTypes.bool,
4
6
  avatarPalette: PropTypes.string,
@@ -32,5 +34,9 @@ export const propTypes = {
32
34
  }),
33
35
  needEffect: PropTypes.bool,
34
36
  isReadOnly: PropTypes.bool,
35
- dataSelectorId: PropTypes.string
37
+ dataSelectorId: PropTypes.string,
38
+ customProps: PropTypes.shape({
39
+ avatarProps: PropTypes.exact(AvatarPropTypes),
40
+ iconProps: PropTypes.exact(IconPropTypes)
41
+ })
36
42
  };
@@ -169,7 +169,7 @@ export default class TextBox extends React.PureComponent {
169
169
  ref: this.inputRef,
170
170
  type: type,
171
171
  value: value,
172
- onScroll: isScrollPrevent ? this.handlePreventTextBoxScroll : '',
172
+ onScroll: isScrollPrevent ? this.handlePreventTextBoxScroll : null,
173
173
  onKeyPress: onKeyPress,
174
174
  onMouseDown: onMouseDown,
175
175
  ...options,
@@ -58,7 +58,8 @@ export default class Textarea extends React.Component {
58
58
  autoFocus,
59
59
  htmlId,
60
60
  a11y,
61
- customClass
61
+ customClass,
62
+ isFocus
62
63
  } = this.props;
63
64
  let {
64
65
  ariaLabel,
@@ -84,7 +85,8 @@ export default class Textarea extends React.Component {
84
85
  options.autoFocus = true;
85
86
  }
86
87
 
87
- let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated ? `${style[`${size}animated`]}` : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect}` : `${style.basic}`;
88
+ const isEditable = !(isReadOnly || isDisabled);
89
+ let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated ? `${style[`${size}animated`]}` : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect} ${isEditable && isFocus ? style.active : ''}` : `${style.basic}`;
88
90
  return /*#__PURE__*/React.createElement("textarea", {
89
91
  "aria-label": ariaLabel,
90
92
  "aria-labelledby": ariaLabelledby,
@@ -88,7 +88,7 @@
88
88
  .effect:hover {
89
89
  --textarea_border_color: var(--zdt_textarea_hover_border);
90
90
  }
91
- .effect:focus {
91
+ .effect:focus,.effect.active {
92
92
  --textarea_border_color: var(--zdt_textarea_focus_border);
93
93
  }
94
94
  .xsmall,