@zohodesk/components 1.0.0-temp-256.1 → 1.0.0-temp-257.1

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 (91) hide show
  1. package/README.md +2 -19
  2. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +0 -2
  3. package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +5 -20
  4. package/assets/Appearance/dark/themes/blue/blue_componentsCTA_DarkModifyCategory.module.css +0 -1
  5. package/assets/Appearance/dark/themes/green/green_componentsCTA_DarkModifyCategory.module.css +0 -1
  6. package/assets/Appearance/dark/themes/orange/orange_componentsCTA_DarkModifyCategory.module.css +0 -1
  7. package/assets/Appearance/dark/themes/red/red_componentsCTA_DarkModifyCategory.module.css +0 -1
  8. package/assets/Appearance/dark/themes/yellow/yellow_componentsCTA_DarkModifyCategory.module.css +0 -1
  9. package/assets/Appearance/light/mode/Component_LightMode.module.css +0 -2
  10. package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +5 -20
  11. package/assets/Appearance/light/themes/blue/blue_componentsCTA_LightModifyCategory.module.css +0 -1
  12. package/assets/Appearance/light/themes/green/green_componentsCTA_LightModifyCategory.module.css +0 -1
  13. package/assets/Appearance/light/themes/orange/orange_componentsCTA_LightModifyCategory.module.css +0 -1
  14. package/assets/Appearance/light/themes/red/red_componentsCTA_LightModifyCategory.module.css +0 -1
  15. package/assets/Appearance/light/themes/yellow/yellow_componentsCTA_LightModifyCategory.module.css +0 -1
  16. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +0 -2
  17. package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +5 -20
  18. package/assets/Appearance/pureDark/themes/blue/blue_componentsCTA_PureDarkModifyCategory.module.css +0 -1
  19. package/assets/Appearance/pureDark/themes/green/green_componentsCTA_PureDarkModifyCategory.module.css +0 -1
  20. package/assets/Appearance/pureDark/themes/orange/orange_componentsCTA_PureDarkModifyCategory.module.css +0 -1
  21. package/assets/Appearance/pureDark/themes/red/red_componentsCTA_PureDarkModifyCategory.module.css +0 -1
  22. package/assets/Appearance/pureDark/themes/yellow/yellow_componentsCTA_PureDarkModifyCategory.module.css +0 -1
  23. package/es/ListItem/ListItem.js +1 -2
  24. package/es/ListItem/ListItemWithAvatar.js +3 -9
  25. package/es/ListItem/ListItemWithCheckBox.js +3 -9
  26. package/es/ListItem/ListItemWithIcon.js +2 -8
  27. package/es/ListItem/ListItemWithRadio.js +3 -9
  28. package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -19
  29. package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -19
  30. package/es/ListItem/__tests__/ListItemWithIcon.spec.js +0 -17
  31. package/es/ListItem/__tests__/ListItemWithRadio.spec.js +0 -19
  32. package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +0 -108
  33. package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +0 -212
  34. package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +0 -108
  35. package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +0 -210
  36. package/es/ListItem/props/defaultProps.js +0 -1
  37. package/es/ListItem/props/propTypes.js +3 -12
  38. package/es/Tab/Tab.js +13 -56
  39. package/es/Tab/Tab.module.css +4 -72
  40. package/es/Tab/TabWrapper.js +2 -6
  41. package/es/Tab/Tabs.js +14 -60
  42. package/es/Tab/Tabs.module.css +15 -84
  43. package/es/Tab/__tests__/Tab.spec.js +0 -87
  44. package/es/Tab/__tests__/Tabs.spec.js +0 -11
  45. package/es/Tab/__tests__/__snapshots__/Tab.spec.js.snap +0 -287
  46. package/es/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +0 -32
  47. package/es/Tab/props/defaultProps.js +3 -10
  48. package/es/Tab/props/propTypes.js +4 -26
  49. package/es/Tab/utils/tabConfigs.js +0 -11
  50. package/es/v1/Button/Button.js +163 -106
  51. package/es/v1/Button/css/Button_v1.module.css +28 -16
  52. package/es/v1/Button/css/cssJSLogic.js +18 -3
  53. package/es/v1/Button/props/propTypes.js +14 -3
  54. package/es/v1/helpers/colorHelpers/background/backgroundColor.module.css +35 -35
  55. package/es/v1/helpers/colorHelpers/border/borderColor.module.css +20 -20
  56. package/es/v1/helpers/colorHelpers/text/textColor.module.css +35 -35
  57. package/lib/ListItem/ListItem.js +1 -3
  58. package/lib/ListItem/ListItemWithAvatar.js +3 -11
  59. package/lib/ListItem/ListItemWithCheckBox.js +3 -11
  60. package/lib/ListItem/ListItemWithIcon.js +2 -8
  61. package/lib/ListItem/ListItemWithRadio.js +3 -11
  62. package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -23
  63. package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -23
  64. package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +0 -21
  65. package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +0 -23
  66. package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +0 -108
  67. package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +0 -212
  68. package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +0 -108
  69. package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +0 -210
  70. package/lib/ListItem/props/defaultProps.js +0 -1
  71. package/lib/ListItem/props/propTypes.js +4 -12
  72. package/lib/Tab/Tab.js +11 -59
  73. package/lib/Tab/Tab.module.css +4 -72
  74. package/lib/Tab/TabWrapper.js +2 -6
  75. package/lib/Tab/Tabs.js +11 -57
  76. package/lib/Tab/Tabs.module.css +15 -84
  77. package/lib/Tab/__tests__/Tab.spec.js +0 -88
  78. package/lib/Tab/__tests__/Tabs.spec.js +0 -12
  79. package/lib/Tab/__tests__/__snapshots__/Tab.spec.js.snap +0 -287
  80. package/lib/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +0 -32
  81. package/lib/Tab/props/defaultProps.js +3 -10
  82. package/lib/Tab/props/propTypes.js +4 -28
  83. package/lib/Tab/utils/tabConfigs.js +2 -15
  84. package/lib/v1/Button/Button.js +182 -118
  85. package/lib/v1/Button/css/Button_v1.module.css +28 -16
  86. package/lib/v1/Button/css/cssJSLogic.js +19 -7
  87. package/lib/v1/Button/props/propTypes.js +14 -3
  88. package/lib/v1/helpers/colorHelpers/background/backgroundColor.module.css +35 -35
  89. package/lib/v1/helpers/colorHelpers/border/borderColor.module.css +20 -20
  90. package/lib/v1/helpers/colorHelpers/text/textColor.module.css +35 -35
  91. package/package.json +7 -7
@@ -100,7 +100,6 @@ export const ListItemWithAvatar_Props = {
100
100
  value: PropTypes.string,
101
101
  secondaryValue: PropTypes.string,
102
102
  renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
103
- renderLeftValuePlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
104
103
  lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end']),
105
104
  a11y: PropTypes.shape({
106
105
  role: PropTypes.string,
@@ -111,8 +110,7 @@ export const ListItemWithAvatar_Props = {
111
110
  customListItem: PropTypes.string,
112
111
  customAvatar: PropTypes.string,
113
112
  customAvatarTeam: PropTypes.string,
114
- customValueRightPlaceholder: PropTypes.string,
115
- customLeftValuePlaceholder: PropTypes.string
113
+ customValueRightPlaceholder: PropTypes.string
116
114
  }),
117
115
  needMultiLineText: PropTypes.bool,
118
116
  customProps: PropTypes.shape({
@@ -143,7 +141,6 @@ export const ListItemWithCheckBox_Props = {
143
141
  secondaryValue: PropTypes.string,
144
142
  needBorder: PropTypes.bool,
145
143
  renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
146
- renderLeftValuePlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
147
144
  lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end']),
148
145
  lhsJustifyContent: PropTypes.oneOf(['start', 'center', 'end']),
149
146
  a11y: PropTypes.shape({
@@ -155,8 +152,7 @@ export const ListItemWithCheckBox_Props = {
155
152
  customListItem: PropTypes.string,
156
153
  customCheckBox: PropTypes.string,
157
154
  customLabel: PropTypes.string,
158
- customValueRightPlaceholder: PropTypes.string,
159
- customLeftValuePlaceholder: PropTypes.string
155
+ customValueRightPlaceholder: PropTypes.string
160
156
  }),
161
157
  customProps: PropTypes.object
162
158
  };
@@ -184,7 +180,6 @@ export const ListItemWithIcon_Props = {
184
180
  value: PropTypes.string,
185
181
  secondaryValue: PropTypes.string,
186
182
  renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
187
- renderLeftValuePlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
188
183
  lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end']),
189
184
  lhsJustifyContent: PropTypes.oneOf(['start', 'center', 'end']),
190
185
  a11y: PropTypes.shape({
@@ -195,8 +190,6 @@ export const ListItemWithIcon_Props = {
195
190
  needMultiLineText: PropTypes.bool,
196
191
  customClass: PropTypes.string,
197
192
  customValueRightPlaceholderClass: PropTypes.string,
198
- customLeftValuePlaceholderClass: PropTypes.string,
199
- customTitleBoxClass: PropTypes.string,
200
193
  customProps: PropTypes.shape({
201
194
  ListItemProps: PropTypes.object
202
195
  }),
@@ -225,7 +218,6 @@ export const ListItemWithRadio_Props = {
225
218
  secondaryValue: PropTypes.string,
226
219
  needBorder: PropTypes.bool,
227
220
  renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
228
- renderLeftValuePlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
229
221
  lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end']),
230
222
  lhsJustifyContent: PropTypes.oneOf(['start', 'center', 'end']),
231
223
  a11y: PropTypes.shape({
@@ -237,8 +229,7 @@ export const ListItemWithRadio_Props = {
237
229
  customListItem: PropTypes.string,
238
230
  customRadio: PropTypes.string,
239
231
  customRadioWrap: PropTypes.string,
240
- customValueRightPlaceholder: PropTypes.string,
241
- customLeftValuePlaceholder: PropTypes.string
232
+ customValueRightPlaceholder: PropTypes.string
242
233
  }),
243
234
  customProps: PropTypes.object
244
235
  };
package/es/Tab/Tab.js CHANGED
@@ -2,15 +2,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  /* eslint-disable react/forbid-component-props */
4
4
 
5
- /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['text', 'icon', 'iconWithText', 'iconWrapper', 'tabAlpha', 'alphaActive', 'gammaActive', 'betaActive', 'deltaActive', 'tabGamma', 'tabBeta', 'tabDelta',', 'specialActive', 'tabSpecial', 'alphaActive_border', 'gammaActive_border', 'betaActive_border', 'deltaActive_border', 'tabDefault', 'defaultHover', 'defaultActive', 'defaultActive_border', 'left_borderTab', 'right_borderTab', 'top_borderTab', 'bottom_borderTab', 'alpha_inline', 'beta_inline', 'delta_inline', 'default_inline', 'alpha_block', 'beta_block', 'delta_block', 'default_block', 'icon_inline', 'icon_block', 'iconWithText_block', 'text_block'] }] */
5
+ /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['text', 'tabAlpha', 'alphaActive', 'gammaActive', 'betaActive', 'deltaActive', 'tabGamma', 'tabBeta', 'tabDelta',', 'specialActive', 'tabSpecial', 'alphaActive_border', 'gammaActive_border', 'betaActive_border', 'deltaActive_border'] }] */
6
6
  import React, { useMemo, useCallback } from 'react';
7
7
  import { Tab_defaultProps } from "./props/defaultProps";
8
8
  import { Tab_propTypes } from "./props/propTypes";
9
9
  import { Box, Container } from "../Layout";
10
- import { Icon } from '@zohodesk/icons';
11
- import { renderNode, isRenderable } from '@zohodesk/utils';
12
10
  import { cs } from "../utils/Common";
13
- import { TAB_DIRECTION_MAPPING, VARIANT } from "./utils/tabConfigs";
11
+ import { TAB_DIRECTION_MAPPING } from "./utils/tabConfigs";
14
12
  import styles from "./Tab.module.css";
15
13
  const tabTypes = {
16
14
  alpha: {
@@ -24,10 +22,6 @@ const tabTypes = {
24
22
  delta: {
25
23
  active: 'deltaActive',
26
24
  tab: 'tabDelta'
27
- },
28
- default: {
29
- active: 'defaultActive',
30
- tab: 'tabDefault'
31
25
  }
32
26
  };
33
27
  export default function Tab({
@@ -53,28 +47,12 @@ export default function Tab({
53
47
  isAnimate,
54
48
  needBorder,
55
49
  needAppearance,
56
- needHover,
57
- hoverOnActive,
58
50
  align,
59
51
  isVirtual,
60
52
  contentAlign,
61
53
  contentAlignBox,
62
- customProps,
63
- customClass,
64
- variant,
65
- iconName,
66
- iconSize,
67
- renderBefore,
68
- renderAfter,
69
- borderPosition
54
+ customProps
70
55
  }) {
71
- let {
72
- customTextContainer = '',
73
- customText = '',
74
- customHover = '',
75
- customIconContainer = '',
76
- customIcon = ''
77
- } = customClass;
78
56
  let clickListener = useCallback(event => {
79
57
  if (isLink && event && (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)) {
80
58
  event && event.stopPropagation();
@@ -90,33 +68,10 @@ export default function Tab({
90
68
  tab: 'tab'
91
69
  }, [type]);
92
70
  let getTab = useCallback(ref => getTabRef && getTabRef(id, ref, isVirtual), [id, isVirtual]);
93
- let activeWithAppearance = cs([styles[styleContent.active], needBorder && !isAnimate && styles[`${styleContent.active}_border`], needHover && hoverOnActive && tabTypes[type] && styles[`${type}Hover`], hoverOnActive && customHover]);
71
+ let activeWithAppearance = cs([styles[styleContent.active], needBorder && !isAnimate && styles[`${styleContent.active}_border`]]);
94
72
  let activeClasses = cs([needAppearance && activeWithAppearance, activeClass]);
95
- let inActiveClasses = needAppearance && cs([styles[styleContent.tab], needHover && tabTypes[type] && styles[`${type}Hover`], customHover]);
96
- const isVerticalAlign = TAB_DIRECTION_MAPPING[align] === 'column';
97
- const isIconWithText = variant === VARIANT.ICON_WITH_TEXT;
98
- let tabClass = cs([styles.tab, isVerticalAlign ? styles.vertical : styles.horizontal, needAppearance && styles[`${type}_${isVerticalAlign ? 'inline' : 'block'}`], isDisabled && styles.disabled, needBorder && borderPosition && !isAnimate && needAppearance && styles[`${borderPosition}_border`], isActive ? activeClasses : inActiveClasses, className]);
99
-
100
- const _renderIcon = () => {
101
- const showIcon = variant !== VARIANT.TEXT && iconName;
102
- return /*#__PURE__*/React.createElement(React.Fragment, null, showIcon ? /*#__PURE__*/React.createElement(Box, {
103
- className: cs([styles.iconWrapper, customIconContainer])
104
- }, /*#__PURE__*/React.createElement(Icon, {
105
- name: iconName,
106
- size: iconSize,
107
- className: customIcon
108
- })) : null);
109
- };
110
-
111
- const _renderLabel = () => {
112
- const showText = variant !== VARIANT.ICON && text !== undefined && text !== null;
113
- return /*#__PURE__*/React.createElement(React.Fragment, null, showText ? /*#__PURE__*/React.createElement(Box, {
114
- flexible: true,
115
- adjust: true,
116
- className: cs([styles.tabText, customText])
117
- }, text) : null);
118
- };
119
-
73
+ let inActiveClasses = needAppearance && cs([styles[styleContent.tab], tabTypes[type] && styles[`${`${type}Hover`}`]]);
74
+ let tabClass = cs([styles.tab, TAB_DIRECTION_MAPPING[align] === 'column' ? styles.vertical : styles.horizontal, isDisabled && styles.disabled, needBorder && !isAnimate && needAppearance && styles.border, isActive ? activeClasses : inActiveClasses, className]);
120
75
  return /*#__PURE__*/React.createElement(Box, _extends({
121
76
  tourId: tourId,
122
77
  tagName: isLink ? 'a' : 'div',
@@ -139,12 +94,14 @@ export default function Tab({
139
94
  }, customProps), /*#__PURE__*/React.createElement(Container, {
140
95
  alignBox: contentAlignBox,
141
96
  align: contentAlign,
142
- className: cs([styles.textContainer, customTextContainer])
143
- }, isRenderable(renderBefore) ? /*#__PURE__*/React.createElement(Box, {
144
- shrink: true
145
- }, renderNode(renderBefore)) : null, _renderIcon(), _renderLabel(), isRenderable(renderAfter) || children ? /*#__PURE__*/React.createElement(Box, {
97
+ className: styles.textContainer
98
+ }, text && /*#__PURE__*/React.createElement(Box, {
99
+ flexible: true,
100
+ adjust: true,
101
+ className: styles.tabText
102
+ }, text), children ? /*#__PURE__*/React.createElement(Box, {
146
103
  shrink: true
147
- }, isRenderable(renderAfter) ? renderNode(renderAfter) : children) : null));
104
+ }, children) : null));
148
105
  }
149
106
  Tab.defaultProps = Tab_defaultProps;
150
107
  Tab.propTypes = Tab_propTypes; // if (__DOCS__) {
@@ -11,9 +11,6 @@
11
11
  width: 100% ;
12
12
  max-width: 100% ;
13
13
  }
14
- .textContainer {
15
- gap: var(--zd_size4) ;
16
- }
17
14
  .textContainer,
18
15
  .tabText {
19
16
  max-width: inherit ;
@@ -24,17 +21,8 @@
24
21
  .disabled {
25
22
  cursor: not-allowed;
26
23
  }
27
- .left_border {
28
- border-inline-start: 1px solid var(--zdt_tab_default_border);
29
- }
30
- .right_border {
31
- border-inline-end: 1px solid var(--zdt_tab_default_border);
32
- }
33
- .top_border {
34
- border-block-start: 1px solid var(--zdt_tab_default_border);
35
- }
36
- .bottom_border {
37
- border-block-end: 1px solid var(--zdt_tab_default_border);
24
+ .border {
25
+ border-bottom: 1px solid var(--zdt_tab_default_border);
38
26
  }
39
27
 
40
28
  .alpha,
@@ -71,6 +59,7 @@
71
59
  padding-block:0 ;
72
60
  font-size: var(--zd_font_size14) ;
73
61
  line-height: 4.2857;
62
+ margin-inline-end: var(--zd_size40) ;
74
63
  text-transform: capitalize;
75
64
  }
76
65
  .tabBeta {
@@ -89,6 +78,7 @@
89
78
  padding-block:0 ;
90
79
  font-size: var(--zd_font_size11) ;
91
80
  line-height: 3;
81
+ margin-inline-end: var(--zd_size10) ;
92
82
  }
93
83
  .tabDelta {
94
84
  composes: delta;
@@ -101,61 +91,3 @@
101
91
  composes: delta;
102
92
  color: var(--zdt_tab_alpha_active_text);
103
93
  }
104
-
105
- .default {
106
- transition: all var(--zd_transition2);
107
- padding-inline: 0 ;
108
- padding-block: 0 ;
109
- font-size: var(--zd_font_size11) ;
110
- line-height: 3;
111
- }
112
- .tabDefault {
113
- composes: default;
114
- color: var(--zd-text-secondary);
115
- }
116
-
117
- .defaultHover:hover {
118
- background-color: var(--zdt_tab_default_hover_bg);
119
- }
120
-
121
- .defaultActive {
122
- composes: default;
123
- color: var(--zd-text-primary);
124
- }
125
-
126
- .defaultActive_border {
127
- border-color: var(--zdt_tab_default_border_active);
128
- }
129
-
130
- /* vertical / vertical-reverse: margin-inline-end */
131
- .beta_inline {
132
- margin-inline-end: var(--zd_size40) ;
133
- }
134
- .delta_inline {
135
- margin-inline-end: var(--zd_size10) ;
136
- }
137
- .default_inline {
138
- margin-inline-end: var(--zd_size34) ;
139
- }
140
- /* horizontal / horizontal-reverse: margin-block-end */
141
- .beta_block {
142
- margin-block-end: var(--zd_size40) ;
143
- }
144
- .delta_block {
145
- margin-block-end: var(--zd_size10) ;
146
- }
147
- .default_block {
148
- margin-block-end: var(--zd_size6) ;
149
- }
150
- .iconWrapper {
151
- composes: dflex alignVertical alignHorizontal from '../common/common.module.css';
152
- flex: 0 0 var(--zd_size24) ;
153
- min-width: var(--zd_size24) ;
154
- }
155
- .icon_block, .icon_inline {
156
- padding: var(--zd_size10) ;
157
- }
158
- .text_block,
159
- .iconWithText_block {
160
- padding-inline: var(--zd_size10) ;
161
- }
@@ -17,11 +17,9 @@ function TabWrapper({
17
17
  needPadding,
18
18
  needAppearance,
19
19
  align,
20
- alignBorderPosition,
21
20
  dataId,
22
21
  children,
23
- dataSelectorId,
24
- borderPosition
22
+ dataSelectorId
25
23
  }) {
26
24
  let [selectedTabInternal, setSelected] = useState(!hookToDisableInternalState ? defaultTab || 0 : null);
27
25
  const setSelectedTab = useCallback(id => {
@@ -49,9 +47,7 @@ function TabWrapper({
49
47
  needPadding: needPadding,
50
48
  needAppearance: needAppearance,
51
49
  hookToDisableInternalState: hookToDisableInternalState,
52
- align: align,
53
- alignBorderPosition: alignBorderPosition,
54
- borderPosition: borderPosition
50
+ align: align
55
51
  }));
56
52
  }));
57
53
  }
package/es/Tab/Tabs.js CHANGED
@@ -4,10 +4,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
4
4
 
5
5
  /* eslint css-modules/no-unused-class: [2, {
6
6
  markAsUsed: [
7
- 'hidden','alpha','gamma','beta','delta','default','special','text','maxWidth','widgetList','menuContainer','border','tabText','block','tabAlpha','alphaActive','gammaActive','betaActive','deltaActive','tabGamma','tabBeta','tabDelta','specialActive','tabSpecial',
8
- 'alpha_inline','alpha_block','alpha_border','gamma_inline','gamma_block','gamma_border','beta_inline','beta_block','beta_border','delta_inline','delta_block','delta_border','default_inline','default_block','default_border','textContainer','disabled','alphaActive_border','gammaActive_border','betaActive_border','deltaActive_border',
9
- 'defaultMoreButton','defaultMoreButtonActive','defaultMenuListItem',
10
- 'left_borderContainer','right_borderContainer','top_borderContainer','bottom_borderContainer'
7
+ 'hidden','alpha','gamma','beta','delta','special','text','maxWidth','widgetList','menuContainer','border','tabText','block','tabAlpha','alphaActive','gammaActive','betaActive','deltaActive','tabGamma','tabBeta','tabDelta','specialActive','tabSpecial',
8
+ 'alpha_padding','alpha_border','gamma_padding','gamma_border','beta_padding','beta_border','delta_padding','delta_border','textContainer','disabled','alphaActive_border','gammaActive_border','betaActive_border','deltaActive_border'
11
9
  ]
12
10
  }]
13
11
  */
@@ -20,7 +18,6 @@ import { remConvert, getTotalDimension, cs, bind, throttle, cancelBubblingEffect
20
18
  import { Box, Container } from "../Layout";
21
19
  import ResizeObserver from "../Responsive/ResizeObserver";
22
20
  import ListItem from "../ListItem/ListItem";
23
- import ListItemWithIcon from "../ListItem/ListItemWithIcon";
24
21
  import { Icon } from '@zohodesk/icons';
25
22
  import { cn } from "@dot-system/css-utility";
26
23
  import tabsStyle from "./Tabs.module.css";
@@ -28,8 +25,7 @@ import Popup from "../Popup/Popup";
28
25
  import TextBoxIcon from "../TextBoxIcon/TextBoxIcon";
29
26
  import ResponsiveDropBox from "../ResponsiveDropBox/ResponsiveDropBox";
30
27
  import { ResponsiveReceiver } from "../Responsive/CustomResponsive";
31
- import { TAB_DIRECTION_MAPPING, TAB_POPUP_POSITION_MAPPING, BORDER_POSITION_BY_ALIGN, VARIANT } from "./utils/tabConfigs";
32
- import { renderNode, isRenderable } from '@zohodesk/utils';
28
+ import { TAB_DIRECTION_MAPPING, TAB_POPUP_POSITION_MAPPING } from "./utils/tabConfigs";
33
29
  import btnstyle from "../semantic/Button/semanticButton.module.css";
34
30
 
35
31
  class Tabs extends React.Component {
@@ -485,7 +481,7 @@ class Tabs extends React.Component {
485
481
  }, searchErrorText));
486
482
  }
487
483
 
488
- renderTabs(mainTabs, moreTabs, isVirtual, borderPosition) {
484
+ renderTabs(mainTabs, moreTabs, isVirtual) {
489
485
  let {
490
486
  selectedTab,
491
487
  moreButtonClass,
@@ -507,7 +503,6 @@ class Tabs extends React.Component {
507
503
  needTabBorder,
508
504
  needAppearance,
509
505
  iconSize,
510
- renderMoreTarget,
511
506
  getTargetRef,
512
507
  position,
513
508
  customProps,
@@ -536,10 +531,6 @@ class Tabs extends React.Component {
536
531
  moreTabs
537
532
  });
538
533
  const hasSearch = moreTabs.length > 4;
539
- const isDefaultType = type === 'default';
540
- const defaultMoreClass = isDefaultType ? tabsStyle.defaultMoreButton : '';
541
- const defaultMoreActiveClass = isDefaultType ? tabsStyle.defaultMoreButtonActive : '';
542
- const effectiveMenuItemClass = isDefaultType ? `${tabsStyle.defaultMenuListItem}${menuItemClass ? ` ${menuItemClass}` : ''}` : menuItemClass;
543
534
  return /*#__PURE__*/React.createElement(React.Fragment, null, React.Children.map(mainTabs, child => {
544
535
  if (!child) {
545
536
  return null;
@@ -567,14 +558,13 @@ class Tabs extends React.Component {
567
558
  needBorder: needTabBorder,
568
559
  needAppearance: needAppearance,
569
560
  align: align,
570
- isVirtual: isVirtual,
571
- borderPosition: borderPosition
561
+ isVirtual: isVirtual
572
562
  }, classProps));
573
563
  }), React.Children.count(moreTabs) ? /*#__PURE__*/React.createElement(Box, {
574
564
  className: `${tabsStyle.menu} `,
575
565
  dataSelectorId: `${dataSelectorId}_moreIcon`
576
566
  }, /*#__PURE__*/React.createElement(Container, _extends({
577
- className: `${btnstyle.buttonReset} ${defaultMoreClass} ${moreButtonClass} ${isPopupOpen ? `${defaultMoreActiveClass} ${moreButtonActiveClass}` : ''}`,
567
+ className: `${btnstyle.buttonReset} ${moreButtonClass} ${isPopupOpen ? moreButtonActiveClass : ''}`,
578
568
  align: "both",
579
569
  onClick: this.togglePopup,
580
570
  dataId: "moreTabs",
@@ -583,7 +573,7 @@ class Tabs extends React.Component {
583
573
  "aria-label": "MoreTabs",
584
574
  role: "link",
585
575
  tagName: "button"
586
- }), isRenderable(renderMoreTarget) ? renderNode(renderMoreTarget) : /*#__PURE__*/React.createElement(Icon, {
576
+ }), /*#__PURE__*/React.createElement(Icon, {
587
577
  name: iconName,
588
578
  size: iconSize
589
579
  })), isPopupOpen && /*#__PURE__*/React.createElement(ResponsiveReceiver, {
@@ -643,37 +633,9 @@ class Tabs extends React.Component {
643
633
  isLink,
644
634
  href,
645
635
  children,
646
- dataId,
647
- variant,
648
- iconName,
649
- iconSize,
650
- renderBefore,
651
- renderAfter
636
+ dataId
652
637
  } = data;
653
638
  const value = text ? text : showTitleInMoreOptions ? title : null;
654
- const showIconInDropdown = variant !== VARIANT.TEXT && iconName;
655
-
656
- if (showIconInDropdown) {
657
- return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
658
- key: id,
659
- value: value,
660
- onClick: this.moreTabSelect,
661
- id: id,
662
- title: title || text,
663
- isLink: isLink,
664
- href: href,
665
- autoHover: true,
666
- iconName: iconName,
667
- iconSize: iconSize,
668
- renderLeftValuePlaceholderNode: renderBefore,
669
- renderValueRightPlaceholderNode: isRenderable(renderAfter) ? renderAfter : !showTitleInMoreOptions ? children : null,
670
- customClass: effectiveMenuItemClass,
671
- customTitleBoxClass: tabsStyle.listItemTitleBox,
672
- target: "self",
673
- dataId: `${dataId}_Tab`
674
- }, ListItemProps));
675
- }
676
-
677
639
  return /*#__PURE__*/React.createElement(ListItem, _extends({
678
640
  key: id,
679
641
  value: value,
@@ -683,16 +645,12 @@ class Tabs extends React.Component {
683
645
  isLink: isLink,
684
646
  href: href,
685
647
  autoHover: true,
686
- renderBeforeChildren: renderBefore,
687
- renderValueRightPlaceholderNode: isRenderable(renderAfter) ? renderAfter : !showTitleInMoreOptions ? children : null,
688
648
  customClass: {
689
- customListItem: effectiveMenuItemClass,
690
- customTitleBox: tabsStyle.listItemTitleBox,
691
- customLeftValuePlaceholder: tabsStyle.listItemLeftValuePlaceholder
649
+ customListItem: menuItemClass
692
650
  },
693
651
  target: "self",
694
652
  dataId: `${dataId}_Tab`
695
- }, ListItemProps));
653
+ }, ListItemProps), !showTitleInMoreOptions ? children : null);
696
654
  }) : this.renderEmptyState())))) : null);
697
655
  }
698
656
 
@@ -708,15 +666,11 @@ class Tabs extends React.Component {
708
666
  needBorder,
709
667
  needPadding,
710
668
  align,
711
- alignBorderPosition,
712
669
  needAppearance,
713
670
  children,
714
671
  containerClass,
715
- dataSelectorId,
716
- borderPosition
672
+ dataSelectorId
717
673
  } = this.props;
718
- const effectiveBorderPosition = alignBorderPosition && (needBorder || needTabBorder) ? BORDER_POSITION_BY_ALIGN[align] : borderPosition;
719
- const isVerticalAlign = TAB_DIRECTION_MAPPING[align] === 'column';
720
674
  let {
721
675
  totalDimension,
722
676
  tabDimensions,
@@ -727,7 +681,7 @@ class Tabs extends React.Component {
727
681
  moreTabs,
728
682
  otherTabs
729
683
  } = this.responsiveTab(totalDimension, tabDimensions);
730
- let appearanceClass = cs([tabsStyle[type], needBorder && tabsStyle[`${type}_border`], needBorder && tabsStyle.border, needBorder && effectiveBorderPosition && tabsStyle[`${effectiveBorderPosition}_borderContainer`], needPadding && tabsStyle[`${type}_${isVerticalAlign ? 'block' : 'inline'}`]]);
684
+ let appearanceClass = cs([tabsStyle[type], needBorder && tabsStyle[`${type}_border`], needPadding && tabsStyle[`${type}_padding`]]);
731
685
  let tabsClass = cs([tabsStyle.tab, className, needAppearance && appearanceClass]);
732
686
  let hlClass = cs([tabsStyle.highlight, highlightClass, isAnimate && tabsStyle.lineAnimate]);
733
687
  return /*#__PURE__*/React.createElement(Box, {
@@ -743,9 +697,9 @@ class Tabs extends React.Component {
743
697
  }, renderVirtualTabs && /*#__PURE__*/React.createElement(Container, {
744
698
  alignBox: TAB_DIRECTION_MAPPING[align] === 'column' ? 'row' : 'column',
745
699
  className: tabsStyle.hidden
746
- }, this.renderTabs(children, [], true, effectiveBorderPosition)), /*#__PURE__*/React.createElement(Container, {
700
+ }, this.renderTabs(children, [], true)), /*#__PURE__*/React.createElement(Container, {
747
701
  alignBox: TAB_DIRECTION_MAPPING[align] === 'column' ? 'row' : 'column'
748
- }, this.renderTabs(mainTabs, moreTabs, false, effectiveBorderPosition))), otherTabs.length ? /*#__PURE__*/React.createElement(Box, null, otherTabs) : null, isAnimate && needTabBorder && needAppearance && /*#__PURE__*/React.createElement("div", {
702
+ }, this.renderTabs(mainTabs, moreTabs, false))), otherTabs.length ? /*#__PURE__*/React.createElement(Box, null, otherTabs) : null, isAnimate && needTabBorder && needAppearance && /*#__PURE__*/React.createElement("div", {
749
703
  className: cn(hlClass),
750
704
  ref: this.getHighlightRef,
751
705
  "data-id": dataId,
@@ -9,16 +9,14 @@
9
9
  background-color: var(--zdt_tabs_alpha_bg);
10
10
  }
11
11
 
12
- .alpha_inline { padding-block-start: var(--zd_size15) ; }
13
- .alpha_block { padding-inline-start: var(--zd_size15) ; }
14
-
15
- .border {
16
- border-width: 0;
17
- border-style: solid;
12
+ .alpha_padding {
13
+ padding-inline-start: var(--zd_size15) ;
18
14
  }
19
15
 
20
16
  .alpha_border {
17
+ border-width: 0 0 1px 0;
21
18
  border-color: var(--zdt_tabs_alpha_border);
19
+ border-style: solid;
22
20
  }
23
21
 
24
22
  .alpha::after {
@@ -63,11 +61,12 @@
63
61
  background-color: var(--zdt_tabs_alpha_bg);
64
62
  }
65
63
 
66
- .beta_inline { padding-block-start: var(--zd_size13) ; }
67
- .beta_block { padding-inline-start: var(--zd_size13) ; }
64
+ .beta_padding {
65
+ padding-inline-start: var(--zd_size13) ;
66
+ }
68
67
 
69
68
  .beta_border {
70
- border-color: var(--zdt_tabs_alpha_border);
69
+ border-bottom: 1px solid var(--zdt_tabs_alpha_border);
71
70
  }
72
71
 
73
72
  .delta {
@@ -75,55 +74,12 @@
75
74
  background-color: var(--zdt_tabs_alpha_bg);
76
75
  }
77
76
 
78
- .delta_inline { padding-block-start: var(--zd_size10) ; }
79
- .delta_block { padding-inline-start: var(--zd_size10) ; }
80
-
81
- .delta_border {
82
- border-color: var(--zdt_tabs_alpha_border);
83
- }
84
-
85
- .default {
86
- height: var(--zd_size35) ;
87
- transition: padding var(--zd_transition3);
88
- z-index: 2;
89
- background-color: var(--zd-bg-secondary);
90
- }
91
-
92
- .default_inline { padding-block-start: var(--zd_size10) ; }
93
- .default_block { padding-inline-start: var(--zd_size10) ; }
94
-
95
- .default_border {
96
- border-color: var(--zd-border-primary);
77
+ .delta_padding {
78
+ padding-inline-start: var(--zd_size10) ;
97
79
  }
98
80
 
99
- .defaultMoreButton {
100
- max-height: var(--zd_size28) ;
101
- color: var(--zd-text-secondary);
102
- padding: var(--zd_size6) ;
103
- border: 1px solid var(--zd-border-transparent);
104
- border-radius: 4px;
105
- margin-top: var(--zd_size3) ;
106
- cursor: pointer;
107
- }
108
-
109
- .defaultMoreButton:hover {
110
- border-color: var(--zdt_rippleeffect_navy_border);
111
- }
112
-
113
- .defaultMoreButtonActive {
114
- border-color: var(--zdt_cta_secondary_light_border);
115
- background: var(--zd-bg-brandLight);
116
- }
117
-
118
- .defaultMoreButtonActive:hover {
119
- border-color: var(--zdt_cta_secondary_light_border);
120
- background: var(--zd-bg-brandLight);
121
- }
122
-
123
- .defaultMenuListItem {
124
- font-size: var(--zd_font_size11) ;
125
- text-transform: uppercase;
126
- letter-spacing: 0.4px;
81
+ .delta_border {
82
+ border-bottom: 1px dotted var(--zdt_tabs_alpha_border);
127
83
  }
128
84
 
129
85
  .delta .highlight {
@@ -137,7 +93,7 @@
137
93
  .highlight {
138
94
  position: absolute;
139
95
  bottom: 0 ;
140
- border-block-end: 1px solid var(--zdt_tabs_highlight_border);
96
+ border-bottom: 1px solid var(--zdt_tabs_highlight_border);
141
97
  }
142
98
 
143
99
  .lineAnimate {
@@ -170,7 +126,7 @@
170
126
 
171
127
  .search {
172
128
  padding-block: var(--zd_size6) 0 ;
173
- padding-inline: var(--zd_size20) ;
129
+ padding-inline:var(--zd_size20) ;
174
130
  }
175
131
 
176
132
  .emptyStateContainer {
@@ -197,30 +153,5 @@
197
153
 
198
154
  .listWrapper {
199
155
  padding-block: var(--zd_size10) ;
200
- padding-inline: 0 ;
201
- }
202
-
203
- .listItemTitleBox {
204
- gap: var(--zd_size4) ;
156
+ padding-inline:0 ;
205
157
  }
206
-
207
- .left_borderContainer {
208
- border-inline-start-width: 1px;
209
- }
210
-
211
- .right_borderContainer {
212
- border-inline-end-width: 1px;
213
- }
214
-
215
- .top_borderContainer {
216
- border-block-start-width: 1px;
217
- }
218
-
219
- .bottom_borderContainer {
220
- border-block-end-width: 1px;
221
- }
222
-
223
- .listItemLeftValuePlaceholder {
224
- height: auto ;
225
- margin: 0 ;
226
- }