@zohodesk/components 1.0.0-temp-205 → 1.0.0-temp-206

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 (94) hide show
  1. package/.cli/PropUnificationExcludeFilesArray.js +230 -230
  2. package/.cli/PropValidationExcludeFilesArray.js +1 -1
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +0 -4
  5. package/css_error.log +1 -1
  6. package/es/AppContainer/AppContainer.js +1 -0
  7. package/es/Avatar/Avatar.js +9 -9
  8. package/es/Avatar/Avatar.module.css +2 -2
  9. package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -591
  10. package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -705
  11. package/es/Button/css/Button.module.css +6 -22
  12. package/es/Buttongroup/Buttongroup.module.css +1 -1
  13. package/es/DateTime/DateTime.module.css +8 -11
  14. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +9 -24
  15. package/es/DropBox/css/DropBox.module.css +1 -1
  16. package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -312
  17. package/es/ListItem/ListItemWithAvatar.js +9 -5
  18. package/es/ListItem/props/defaultProps.js +1 -0
  19. package/es/ListItem/props/propTypes.js +4 -1
  20. package/es/MultiSelect/Suggestions.js +2 -0
  21. package/es/MultiSelect/props/propTypes.js +1 -0
  22. package/es/Radio/Radio.js +2 -3
  23. package/es/Radio/Radio.module.css +1 -2
  24. package/es/Radio/props/propTypes.js +1 -2
  25. package/es/Ribbon/Ribbon.module.css +6 -6
  26. package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -374
  27. package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -89
  28. package/es/Switch/Switch.module.css +1 -2
  29. package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -831
  30. package/es/Tab/Tabs.js +124 -20
  31. package/es/Tab/Tabs.module.css +32 -1
  32. package/es/Tab/props/defaultProps.js +3 -1
  33. package/es/Tab/props/propTypes.js +6 -1
  34. package/es/Tag/Tag.js +4 -2
  35. package/es/Tag/props/propTypes.js +2 -1
  36. package/es/Tooltip/Tooltip.module.css +0 -3
  37. package/es/v1/AppContainer/AppContainer.js +1 -0
  38. package/es/v1/Avatar/Avatar.js +5 -5
  39. package/es/v1/AvatarTeam/AvatarTeam.js +4 -4
  40. package/es/v1/Button/Button.js +4 -4
  41. package/es/v1/Card/Card.js +4 -4
  42. package/es/v1/ListItem/ListItemWithAvatar.js +9 -5
  43. package/es/v1/ListItem/props/defaultProps.js +1 -0
  44. package/es/v1/ListItem/props/propTypes.js +4 -1
  45. package/es/v1/MultiSelect/Suggestions.js +2 -0
  46. package/es/v1/MultiSelect/props/propTypes.js +1 -0
  47. package/es/v1/Tab/v1Tabs.module.css +3 -3
  48. package/lib/AppContainer/AppContainer.js +2 -0
  49. package/lib/Avatar/Avatar.js +9 -9
  50. package/lib/Avatar/Avatar.module.css +2 -2
  51. package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -591
  52. package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -705
  53. package/lib/Button/css/Button.module.css +6 -22
  54. package/lib/Buttongroup/Buttongroup.module.css +1 -1
  55. package/lib/DateTime/DateTime.module.css +8 -11
  56. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +9 -24
  57. package/lib/DropBox/css/DropBox.module.css +1 -1
  58. package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -312
  59. package/lib/ListItem/ListItemWithAvatar.js +9 -5
  60. package/lib/ListItem/props/defaultProps.js +1 -0
  61. package/lib/ListItem/props/propTypes.js +4 -2
  62. package/lib/MultiSelect/Suggestions.js +2 -0
  63. package/lib/MultiSelect/props/propTypes.js +1 -0
  64. package/lib/Radio/Radio.js +2 -3
  65. package/lib/Radio/Radio.module.css +1 -2
  66. package/lib/Radio/props/propTypes.js +1 -2
  67. package/lib/Ribbon/Ribbon.module.css +6 -6
  68. package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -374
  69. package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -89
  70. package/lib/Switch/Switch.module.css +1 -2
  71. package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -831
  72. package/lib/Tab/Tabs.js +125 -27
  73. package/lib/Tab/Tabs.module.css +32 -1
  74. package/lib/Tab/props/defaultProps.js +3 -1
  75. package/lib/Tab/props/propTypes.js +6 -1
  76. package/lib/Tag/Tag.js +4 -2
  77. package/lib/Tag/props/propTypes.js +2 -1
  78. package/lib/Tooltip/Tooltip.module.css +0 -3
  79. package/lib/v1/AppContainer/AppContainer.js +2 -0
  80. package/lib/v1/Avatar/Avatar.js +5 -5
  81. package/lib/v1/AvatarTeam/AvatarTeam.js +4 -4
  82. package/lib/v1/Button/Button.js +4 -4
  83. package/lib/v1/Card/Card.js +4 -4
  84. package/lib/v1/ListItem/ListItemWithAvatar.js +9 -5
  85. package/lib/v1/ListItem/props/defaultProps.js +1 -0
  86. package/lib/v1/ListItem/props/propTypes.js +4 -2
  87. package/lib/v1/MultiSelect/Suggestions.js +2 -0
  88. package/lib/v1/MultiSelect/props/propTypes.js +1 -0
  89. package/lib/v1/Tab/v1Tabs.module.css +3 -3
  90. package/package.json +12 -16
  91. package/propValidationArg.json +11 -11
  92. package/result.json +1 -1
  93. /package/es/{deprecated → common}/boxShadow.module.css +0 -0
  94. /package/lib/{deprecated → common}/boxShadow.module.css +0 -0
package/es/Tab/Tabs.js CHANGED
@@ -8,6 +8,7 @@
8
8
  }]
9
9
  */
10
10
  import React from 'react';
11
+ import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
11
12
  import Tab from './Tab';
12
13
  import { Tabs_defaultProps } from './props/defaultProps';
13
14
  import { Tabs_propTypes } from './props/propTypes';
@@ -18,6 +19,7 @@ import ListItem from '../ListItem/ListItem';
18
19
  import { Icon } from '@zohodesk/icons';
19
20
  import tabsStyle from './Tabs.module.css';
20
21
  import Popup from '../Popup/Popup';
22
+ import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
21
23
  import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
22
24
  import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
23
25
  import btnstyle from '../semantic/Button/semanticButton.module.css';
@@ -30,9 +32,10 @@ class Tabs extends React.Component {
30
32
  tabDimensions: {},
31
33
  highlightInitialDimension: null,
32
34
  renderVirtualTabs: true,
33
- tabKeys: []
35
+ tabKeys: [],
36
+ searchValue: ''
34
37
  };
35
- bind.apply(this, ['moreTabSelect', 'onResize', 'onTabResize', 'getHighlightRef', 'getTabsRef', 'getTabRef', 'getHighlightDim', 'onSizeChange', 'onScroll', 'togglePopup', 'setMaxDim']);
38
+ bind.apply(this, ['moreTabSelect', 'onResize', 'onTabResize', 'getHighlightRef', 'getTabsRef', 'getTabRef', 'getHighlightDim', 'onSizeChange', 'onScroll', 'togglePopup', 'setMaxDim', 'handleChange', 'handleSearchValueClear', 'getMoreList', 'renderEmptyState']);
36
39
  this.tabsObserver = new ResizeObserver(this.onResize);
37
40
  this.tabObserver = {};
38
41
  }
@@ -130,12 +133,14 @@ class Tabs extends React.Component {
130
133
  let {
131
134
  children,
132
135
  selectedTab,
133
- childType
136
+ childType,
137
+ isPopupOpen
134
138
  } = this.props;
135
139
  let {
136
140
  tabDimensions,
137
141
  totalDimension,
138
- tabKeys
142
+ tabKeys,
143
+ searchValue
139
144
  } = this.state;
140
145
 
141
146
  if (prevProps.children && children) {
@@ -169,6 +174,10 @@ class Tabs extends React.Component {
169
174
  if (prevProps.selectedTab !== selectedTab || newTabKeys.length === 1) {
170
175
  this.moveHighlight();
171
176
  }
177
+
178
+ if (prevProps.isPopupOpen != isPopupOpen && searchValue.length) {
179
+ this.handleSearchValueClear();
180
+ }
172
181
  }
173
182
  }
174
183
 
@@ -373,6 +382,7 @@ class Tabs extends React.Component {
373
382
 
374
383
  e.preventDefault();
375
384
  onSelect(tab);
385
+ this.togglePopup();
376
386
  }
377
387
 
378
388
  onScroll(e) {
@@ -407,6 +417,69 @@ class Tabs extends React.Component {
407
417
  };
408
418
  }
409
419
 
420
+ handleChange(value, e) {
421
+ this.setState({
422
+ searchValue: value
423
+ });
424
+ }
425
+
426
+ handleSearchValueClear(e) {
427
+ this.setState({
428
+ searchValue: ''
429
+ });
430
+ }
431
+
432
+ getMoreList(_ref2) {
433
+ let {
434
+ moreTabs
435
+ } = _ref2;
436
+ const valideElements = [];
437
+ {
438
+ React.Children.map(moreTabs, child => {
439
+ const isValidElement = /*#__PURE__*/React.isValidElement(child);
440
+
441
+ if (isValidElement) {
442
+ valideElements.push(child.props);
443
+ }
444
+ });
445
+ }
446
+ return valideElements;
447
+ }
448
+
449
+ handleFilterSuggestions(_ref3) {
450
+ let {
451
+ moreTabs
452
+ } = _ref3;
453
+ const {
454
+ searchValue
455
+ } = this.state;
456
+ const options = this.getMoreList({
457
+ moreTabs
458
+ });
459
+ const filteredOptions = options.filter(list => {
460
+ const {
461
+ id = ''
462
+ } = list;
463
+ const value = id;
464
+ return value.toLowerCase().includes(searchValue);
465
+ });
466
+ return filteredOptions;
467
+ }
468
+
469
+ renderEmptyState() {
470
+ const {
471
+ searchErrorText
472
+ } = this.props;
473
+ return /*#__PURE__*/React.createElement("div", {
474
+ className: tabsStyle.emptyStateContainer
475
+ }, /*#__PURE__*/React.createElement(EmptySearch, {
476
+ size: "small"
477
+ }), /*#__PURE__*/React.createElement("div", {
478
+ className: tabsStyle.emptyStateTitle
479
+ }, searchErrorText));
480
+ return ''; // return <EmptySearch size='small' />;
481
+ }
482
+
410
483
  renderTabs(mainTabs, moreTabs, isVirtual) {
411
484
  let {
412
485
  selectedTab,
@@ -434,14 +507,26 @@ class Tabs extends React.Component {
434
507
  customProps,
435
508
  getCustomDropBoxHeaderPlaceHolder,
436
509
  dataSelectorId,
437
- dataId
510
+ dataId,
511
+ placeHolderText,
512
+ searchBoxSize,
513
+ ariaTitleId,
514
+ TextBoxIconProps,
515
+ removeClose
438
516
  } = this.props;
517
+ const {
518
+ searchValue
519
+ } = this.state;
439
520
  let {
440
521
  DropBoxProps = {},
441
522
  ListItemProps = {},
442
523
  MoreButtonProps = {}
443
524
  } = customProps;
444
525
  let popupClass = align === 'vertical' ? tabsStyle[position] ? tabsStyle[position] : '' : '';
526
+ const listItemArray = this.handleFilterSuggestions({
527
+ moreTabs
528
+ });
529
+ const isSearch = moreTabs.length > 4;
445
530
  return /*#__PURE__*/React.createElement(React.Fragment, null, React.Children.map(mainTabs, child => {
446
531
  if (!child) {
447
532
  return null;
@@ -491,10 +576,10 @@ class Tabs extends React.Component {
491
576
  })), isPopupOpen && /*#__PURE__*/React.createElement(ResponsiveReceiver, {
492
577
  query: this.responsiveFunc,
493
578
  responsiveId: "Helmet"
494
- }, _ref2 => {
579
+ }, _ref4 => {
495
580
  let {
496
581
  tabletMode
497
- } = _ref2;
582
+ } = _ref4;
498
583
  return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
499
584
  isActive: isPopupReady,
500
585
  isAnimate: true,
@@ -504,25 +589,44 @@ class Tabs extends React.Component {
504
589
  },
505
590
  boxPosition: position,
506
591
  getRef: getContainerRef,
507
- isBoxPaddingNeed: true,
592
+ isBoxPaddingNeed: false,
508
593
  isArrow: false,
509
594
  ...DropBoxProps,
510
595
  isResponsivePadding: true,
511
596
  needFocusScope: true,
512
- onClose: this.togglePopup,
513
- dataId: `${dataId}_dropbox`
514
- }, getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
597
+ dataId: `${dataId}_dropbox`,
598
+ onClick: removeClose
599
+ }, getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), isSearch ? /*#__PURE__*/React.createElement(Box, {
600
+ className: tabsStyle.search
601
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
602
+ placeHolder: placeHolderText,
603
+ onChange: this.handleChange,
604
+ value: searchValue,
605
+ onClear: this.handleSearchValueClear,
606
+ size: searchBoxSize,
607
+ customProps: {
608
+ TextBoxProps: {
609
+ 'data-a11y-autofocus': true
610
+ }
611
+ } //search
612
+ ,
613
+ dataId: `${dataId}_search`,
614
+ a11y: {
615
+ role: 'combobox',
616
+ ariaOwns: ariaTitleId,
617
+ ariaAutocomplete: 'list',
618
+ ariaHaspopup: true,
619
+ ariaExpanded: true
620
+ },
621
+ ...TextBoxIconProps
622
+ })) : null, /*#__PURE__*/React.createElement(Box, {
515
623
  flexible: true,
516
624
  shrink: true,
517
625
  scroll: "vertical",
518
- className: `${tabletMode ? '' : tabsStyle.menuBox} ${moreBoxClass}`,
626
+ className: `${tabsStyle.listWrapper} ${tabletMode ? '' : tabsStyle.menuBox} ${moreBoxClass}`,
519
627
  onScroll: this.onScroll,
520
628
  dataId: `${dataId}_Tabs`
521
- }, React.Children.map(moreTabs, child => {
522
- if (!child) {
523
- return null;
524
- }
525
-
629
+ }, listItemArray.length ? listItemArray.map(data => {
526
630
  let {
527
631
  text,
528
632
  id,
@@ -531,9 +635,9 @@ class Tabs extends React.Component {
531
635
  href,
532
636
  children,
533
637
  dataId
534
- } = child.props;
638
+ } = data;
535
639
  const value = text ? text : showTitleInMoreOptions ? title : null;
536
- return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, {
640
+ return /*#__PURE__*/React.createElement(ListItem, {
537
641
  key: id,
538
642
  value: value,
539
643
  onClick: this.moreTabSelect,
@@ -549,7 +653,7 @@ class Tabs extends React.Component {
549
653
  dataId: `${dataId}_Tab`,
550
654
  ...ListItemProps
551
655
  }, !showTitleInMoreOptions ? children : null);
552
- })));
656
+ }) : this.renderEmptyState()));
553
657
  })) : null);
554
658
  }
555
659
 
@@ -31,7 +31,7 @@
31
31
  bottom: 0 ;
32
32
  height: var(--zd_size10) ;
33
33
  border-radius: 100px / 5px;
34
- box-shadow: 0 -2px 9px var(--zdt_tabs_alpha_box_shadow);
34
+ box-shadow: var(--zd_bs_tabs_shadow);
35
35
  }
36
36
 
37
37
  [dir=ltr] .alpha::after {
@@ -134,4 +134,35 @@
134
134
 
135
135
  .hidden {
136
136
  visibility: hidden;
137
+ }
138
+
139
+ .search {
140
+ padding: 0 var(--zd_size20) 0 ;
141
+ }
142
+
143
+ .emptyStateContainer {
144
+ padding-bottom: var(--zd_size25);
145
+ }
146
+
147
+ .emptyStateTitle {
148
+ font-family: var(--zd_semibold);
149
+ color: var(--zdt_commonEmptyState_default_title);
150
+ word-wrap: break-word;
151
+ font-size: var(--zd_font_size16) ;
152
+ max-width: var(--zd_size430) ;
153
+ text-align: center;
154
+ }
155
+
156
+ [dir=ltr] .emptyStateTitle {
157
+ margin-left: auto ;
158
+ margin-right: auto ;
159
+ }
160
+
161
+ [dir=rtl] .emptyStateTitle {
162
+ margin-right: auto ;
163
+ margin-left: auto ;
164
+ }
165
+
166
+ .listWrapper {
167
+ padding: var(--zd_size10) 0 ;
137
168
  }
@@ -30,7 +30,9 @@ export const Tabs_defaultProps = {
30
30
  iconSize: '7',
31
31
  containerClass: '',
32
32
  customProps: {},
33
- dataSelectorId: 'tabs'
33
+ dataSelectorId: 'tabs',
34
+ searchBoxSize: 'small',
35
+ searchErrorText: 'No results'
34
36
  };
35
37
  export const TabWrapper_defaultProps = {
36
38
  hookToDisableInternalState: false,
@@ -89,7 +89,12 @@ export const Tabs_propTypes = {
89
89
  MoreButtonProps: PropTypes.object
90
90
  }),
91
91
  getCustomDropBoxHeaderPlaceHolder: PropTypes.func,
92
- dataSelectorId: PropTypes.string
92
+ dataSelectorId: PropTypes.string,
93
+ placeHolderText: PropTypes.string,
94
+ searchBoxSize: PropTypes.string,
95
+ ariaTitleId: PropTypes.string,
96
+ TextBoxIconProps: PropTypes.object,
97
+ searchErrorText: PropTypes.string
93
98
  };
94
99
  export const TabWrapper_propTypes = {
95
100
  align: PropTypes.oneOf(['vertical', 'horizontal']),
package/es/Tag/Tag.js CHANGED
@@ -83,7 +83,8 @@ export default class Tag extends PureComponent {
83
83
  customAttributes,
84
84
  a11y,
85
85
  needEffect,
86
- isReadOnly
86
+ isReadOnly,
87
+ onAvatarClick
87
88
  } = this.props;
88
89
  let {
89
90
  customTag = '',
@@ -116,7 +117,8 @@ export default class Tag extends PureComponent {
116
117
  size: "small",
117
118
  src: imageURL,
118
119
  textPalette: isDarkPalette ? 'white' : '',
119
- customClass: customAvatar
120
+ customClass: customAvatar,
121
+ onClick: onAvatarClick
120
122
  })) : null, iconName ? /*#__PURE__*/React.createElement("div", {
121
123
  className: `${style.icon} ${customTagIcon}`,
122
124
  "aria-hidden": true
@@ -32,5 +32,6 @@ export const propTypes = {
32
32
  }),
33
33
  needEffect: PropTypes.bool,
34
34
  isReadOnly: PropTypes.bool,
35
- dataSelectorId: PropTypes.string
35
+ dataSelectorId: PropTypes.string,
36
+ onAvatarClick: PropTypes.func
36
37
  };
@@ -3,7 +3,6 @@
3
3
  z-index: 9999999;
4
4
  /*Hook for editor alert*/
5
5
  pointer-events: none;
6
- /*css:validation:ignore*/
7
6
  box-shadow: 0 4px 12px 0 var(--zdt_tooltip_default_box_shadow);
8
7
  border-radius: var(--zd_size4);
9
8
  }[dir=ltr] .tooltiptext {
@@ -52,7 +51,6 @@
52
51
  border-left: solid 6px var(--zdt_tooltip_default_bg);
53
52
  border-right: solid 6px transparent;
54
53
  border-bottom: solid 6px transparent;
55
- /*css:validation:ignore*/
56
54
  box-shadow: 0 4px 12px 0 var(--zdt_tooltip_default_box_shadow);
57
55
  z-index: -1;
58
56
  }
@@ -73,7 +71,6 @@
73
71
  border-left: solid 6px var(--zdt_tooltip_default_bg);
74
72
  border-right: solid 6px transparent;
75
73
  border-bottom: solid 6px transparent;
76
- /*css:validation:ignore*/
77
74
  box-shadow: 0 4px 12px 0 var(--zdt_tooltip_default_box_shadow);
78
75
  z-index: -1;
79
76
  }
@@ -12,6 +12,7 @@ import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
12
12
  import '@zohodesk/variables/assets/transitionVariables.module.css';
13
13
  import '@zohodesk/variables/assets/no_transitionVariables.module.css';
14
14
  import '../../common/a11y.module.css';
15
+ import '../../common/boxShadow.module.css';
15
16
  import style from '../../AppContainer/AppContainer.module.css';
16
17
  import { getLibraryConfig, setLibraryConfig } from '../../Provider/Config';
17
18
  export default function AppContainer(props) {
@@ -5,11 +5,11 @@ import { propTypes } from './props/propTypes';
5
5
  import { getInitial } from '../../utils/getInitial';
6
6
  import AvatarSize from '../../Provider/AvatarSize';
7
7
  import style from '../../Avatar/Avatar.module.css';
8
- /*
9
- 1. need to change name into firstName lastName
10
- 2. pattern support via context as well as props
11
- 3. prop high priority to arrange firstName lastName
12
- 4. team pass name as lastName and pass pattern via prop
8
+ /*
9
+ 1. need to change name into firstName lastName
10
+ 2. pattern support via context as well as props
11
+ 3. prop high priority to arrange firstName lastName
12
+ 4. team pass name as lastName and pass pattern via prop
13
13
  */
14
14
 
15
15
  function Avatar(props) {
@@ -3,10 +3,10 @@ import { defaultProps } from './props/defaultProps';
3
3
  import { propTypes } from './props/propTypes';
4
4
  import Avatar from '../Avatar/Avatar';
5
5
  import style from '../../AvatarTeam/AvatarTeam.module.css';
6
- /* once avatar support firstname lastname and pattern
7
- pass lastName as team name and pattern ["FIRST_NAME","LAST_NAME"] as props
8
-
9
- Not going to export to external then can kept inside supportapp
6
+ /* once avatar support firstname lastname and pattern
7
+ pass lastName as team name and pattern ["FIRST_NAME","LAST_NAME"] as props
8
+
9
+ Not going to export to external then can kept inside supportapp
10
10
  */
11
11
 
12
12
  export default function AvatarTeam(props) {
@@ -4,10 +4,10 @@ import { propTypes } from './props/propTypes';
4
4
  import cssJSLogic from '../../Button/css/cssJSLogic';
5
5
  import { mergeStyle } from '@zohodesk/utils';
6
6
  import style from '../../Button/css/Button.module.css';
7
- /*
8
- Button text and children props?
9
- use children for both cases
10
- toLowerCase check needed?
7
+ /*
8
+ Button text and children props?
9
+ use children for both cases
10
+ toLowerCase check needed?
11
11
  */
12
12
 
13
13
  export default function Button(props) {
@@ -7,10 +7,10 @@ import { getLibraryConfig } from '../../Provider/Config';
7
7
  import style from '../../Card/Card.module.css';
8
8
  /* eslint-disable react/forbid-component-props */
9
9
 
10
- /*
11
- isscroll header border change use ref
12
- scroll logic remove from here
13
- scroll logic move to virtualizer list
10
+ /*
11
+ isscroll header border change use ref
12
+ scroll logic remove from here
13
+ scroll logic move to virtualizer list
14
14
  */
15
15
 
16
16
  /* performance handling pending in card component moving to ref instead of setState */
@@ -16,6 +16,7 @@ import style from '../../ListItem/ListItem.module.css';
16
16
  const ListItemWithAvatar = props => {
17
17
  let {
18
18
  size,
19
+ avatarSize,
19
20
  active,
20
21
  highlight,
21
22
  value,
@@ -42,7 +43,8 @@ const ListItemWithAvatar = props => {
42
43
  id,
43
44
  getRef,
44
45
  onClick,
45
- onMouseEnter
46
+ onMouseEnter,
47
+ onAvatarClick
46
48
  } = props;
47
49
 
48
50
  function handleRef(ele) {
@@ -100,7 +102,7 @@ const ListItemWithAvatar = props => {
100
102
  className: style.leftAvatar
101
103
  }, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
102
104
  name: name,
103
- size: "small",
105
+ size: avatarSize,
104
106
  src: imgSrc,
105
107
  needTitle: needAvatarTitle,
106
108
  textPalette: isDarkPalette ? 'white' : '',
@@ -108,16 +110,18 @@ const ListItemWithAvatar = props => {
108
110
  customClass: {
109
111
  customAvatar: customAvatar,
110
112
  customAvatarTeam: customAvatarTeam
111
- }
113
+ },
114
+ onClick: onAvatarClick
112
115
  }) : /*#__PURE__*/React.createElement(Avatar, {
113
116
  name: name,
114
- size: "small",
117
+ size: avatarSize,
115
118
  src: imgSrc,
116
119
  initial: initial,
117
120
  textPalette: isDarkPalette ? 'white' : '',
118
121
  needTitle: needAvatarTitle,
119
122
  palette: isDarkPalette ? 'info' : avatarPalette,
120
- customClass: customAvatar
123
+ customClass: customAvatar,
124
+ onClick: onAvatarClick
121
125
  })) : null, value ? /*#__PURE__*/React.createElement(Box, {
122
126
  flexible: true,
123
127
  shrink: true,
@@ -39,6 +39,7 @@ export const ListItemWithAvatarDefaultProps = {
39
39
  needTick: false,
40
40
  palette: 'default',
41
41
  size: 'medium',
42
+ avatarSize: 'small',
42
43
  value: 'List',
43
44
  dataId: 'listAvatar',
44
45
  needBorder: true,
@@ -1,4 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
+ import { propTypes as AvatarProps } from '../../Avatar/props/propTypes.js';
2
3
  export const ListContainer_Props = {
3
4
  active: PropTypes.bool,
4
5
  autoHover: PropTypes.bool,
@@ -87,6 +88,7 @@ export const ListItemWithAvatar_Props = {
87
88
  onMouseEnter: PropTypes.func,
88
89
  palette: PropTypes.oneOf(['dark']),
89
90
  size: PropTypes.string,
91
+ avatarSize: AvatarProps.size,
90
92
  title: PropTypes.string,
91
93
  value: PropTypes.string,
92
94
  a11y: PropTypes.shape({
@@ -102,7 +104,8 @@ export const ListItemWithAvatar_Props = {
102
104
  needMultiLineText: PropTypes.bool,
103
105
  customProps: PropTypes.shape({
104
106
  ListItemProps: PropTypes.object
105
- })
107
+ }),
108
+ onAvatarClick: PropTypes.func
106
109
  };
107
110
  export const ListItemWithCheckBox_Props = {
108
111
  active: PropTypes.bool,
@@ -15,6 +15,7 @@ export default class Suggestions extends React.PureComponent {
15
15
  getRef,
16
16
  hoverOption,
17
17
  onClick,
18
+ onAvatarClick,
18
19
  onMouseEnter,
19
20
  needTick,
20
21
  needBorder,
@@ -83,6 +84,7 @@ export default class Suggestions extends React.PureComponent {
83
84
  key: `${id}avatarListItem`,
84
85
  name: value,
85
86
  onClick: onClick,
87
+ onAvatarClick: onAvatarClick,
86
88
  onMouseEnter: onMouseEnter,
87
89
  value: value,
88
90
  title: value,
@@ -158,6 +158,7 @@ export const Suggestions_propTypes = {
158
158
  needBorder: PropTypes.bool,
159
159
  needTick: PropTypes.bool,
160
160
  onClick: PropTypes.func,
161
+ onAvatarClick: PropTypes.func,
161
162
  onMouseEnter: PropTypes.func,
162
163
  palette: PropTypes.string,
163
164
  selectedOptions: PropTypes.array,
@@ -31,7 +31,7 @@
31
31
  bottom: 0 ;
32
32
  height: var(--zd_size10) ;
33
33
  border-radius: 100px / 5px;
34
- box-shadow: 0 -2px 9px var(--zdt_tabs_alpha_box_shadow);
34
+ box-shadow: var(--zd_bs_tabs_shadow);
35
35
  }
36
36
 
37
37
  [dir=ltr] .alpha::after {
@@ -123,13 +123,13 @@
123
123
  .bottomRightToLeft,
124
124
  .topRightToLeft,
125
125
  .bottomCenterToLeft {
126
- right: calc(var(--tab_position_gap) * -1);
126
+ right: calc(var(--tab_position_gap) * -1);
127
127
  }
128
128
 
129
129
  .bottomLeftToRight,
130
130
  .topLeftToRight,
131
131
  .bottomCenterToRight {
132
- left: calc(var(--tab_position_gap) * -1);
132
+ left: calc(var(--tab_position_gap) * -1);
133
133
  }
134
134
 
135
135
  .hidden {
@@ -35,6 +35,8 @@ require("@zohodesk/variables/assets/no_transitionVariables.module.css");
35
35
 
36
36
  require("../common/a11y.module.css");
37
37
 
38
+ require("../common/boxShadow.module.css");
39
+
38
40
  var _AppContainerModule = _interopRequireDefault(require("./AppContainer.module.css"));
39
41
 
40
42
  var _Config = require("../Provider/Config");
@@ -55,17 +55,17 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
55
55
 
56
56
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
57
57
 
58
- /*
59
- 1. need to change name into firstName lastName
60
- 2. pattern support via context as well as props
61
- 3. prop high priority to arrange firstName lastName
62
- 4. team pass name as lastName and pass pattern via prop
58
+ /*
59
+ 1. need to change name into firstName lastName
60
+ 2. pattern support via context as well as props
61
+ 3. prop high priority to arrange firstName lastName
62
+ 4. team pass name as lastName and pass pattern via prop
63
63
  */
64
64
 
65
- /*
66
- eslint css-modules/no-unused-class: [2, { markAsUsed: ['circle', 'square',
67
- 'small','medium','xmedium',"xsmall", "large", "xlarge", "primary", "secondary",
68
- "info","default"] }]
65
+ /*
66
+ eslint css-modules/no-unused-class: [2, { markAsUsed: ['circle', 'square',
67
+ 'small','medium','xmedium',"xsmall", "large", "xlarge", "primary", "secondary",
68
+ "info","default"] }]
69
69
  */
70
70
  var Avatar = /*#__PURE__*/function (_React$Component) {
71
71
  _inherits(Avatar, _React$Component);
@@ -53,11 +53,11 @@
53
53
  }
54
54
 
55
55
  .shadow.black {
56
- box-shadow: inset 0px 0px 5px var(--avatar_boxshadow);
56
+ box-shadow: var(--zd_bs_avatar_black);
57
57
  }
58
58
 
59
59
  .shadow.white {
60
- box-shadow: inset 0px 0px 11px var(--avatar_boxshadow);
60
+ box-shadow: var(--zd_bs_avatar_white);
61
61
  }
62
62
 
63
63
  .avatar, .circle {