@zohodesk/components 1.0.0-temp-255 → 1.0.0-temp-252.4

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 (52) hide show
  1. package/es/AppContainer/AppContainer.js +2 -0
  2. package/es/Avatar/Avatar.js +2 -1
  3. package/es/Button/css/cssJSLogic.js +5 -4
  4. package/es/DateTime/DateTime.js +6 -3
  5. package/es/DateTime/DateWidget.js +5 -2
  6. package/es/DateTime/YearView.js +6 -5
  7. package/es/DateTime/common.js +9 -2
  8. package/es/DateTime/dateFormatUtils/dateFormat.js +76 -55
  9. package/es/DateTime/dateFormatUtils/index.js +12 -7
  10. package/es/DateTime/dateFormatUtils/timeChange.js +4 -3
  11. package/es/DateTime/dateFormatUtils/yearChange.js +4 -3
  12. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +6 -5
  13. package/es/Layout/utils.js +2 -1
  14. package/es/ListItem/ListContainer.js +5 -4
  15. package/es/Modal/Portal/Portal.js +5 -4
  16. package/es/MultiSelect/AdvancedGroupMultiSelect.js +103 -91
  17. package/es/MultiSelect/AdvancedMultiSelect.js +80 -74
  18. package/es/MultiSelect/MultiSelect.js +13 -4
  19. package/es/MultiSelect/Suggestions.js +17 -14
  20. package/es/Popup/Popup.js +4 -1
  21. package/es/Provider/IdProvider.js +5 -4
  22. package/es/Provider/LibraryContext.js +12 -11
  23. package/es/Provider/NumberGenerator/NumberGenerator.js +17 -15
  24. package/es/Provider/ZindexProvider.js +5 -4
  25. package/es/Responsive/CustomResponsive.js +11 -8
  26. package/es/Responsive/ResizeComponent.js +3 -1
  27. package/es/Responsive/Responsive.js +12 -9
  28. package/es/Responsive/sizeObservers.js +5 -1
  29. package/es/ResponsiveDropBox/ResponsiveDropBox.js +14 -10
  30. package/es/Select/GroupSelect.js +103 -98
  31. package/es/Select/Select.js +116 -108
  32. package/es/Select/SelectWithAvatar.js +95 -91
  33. package/es/Select/SelectWithIcon.js +109 -104
  34. package/es/Select/__tests__/Select.spec.js +9 -6
  35. package/es/Tab/Tab.js +30 -29
  36. package/es/Tab/TabContent.js +19 -16
  37. package/es/Tab/TabContentWrapper.js +22 -19
  38. package/es/Tab/TabWrapper.js +16 -15
  39. package/es/Tab/Tabs.js +87 -80
  40. package/es/Typography/css/cssJSLogic.js +5 -4
  41. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +2 -1
  42. package/es/utils/Common.js +31 -10
  43. package/es/utils/datetime/common.js +6 -2
  44. package/es/utils/dropDownUtils.js +11 -7
  45. package/es/utils/getInitial.js +3 -1
  46. package/es/v1/Button/css/cssJSLogic.js +8 -4
  47. package/es/v1/Label/css/cssJSLogic.js +5 -4
  48. package/es/v1/Switch/css/cssJSLogic.js +5 -4
  49. package/es/v1/helpers/colorHelpers/colorHelper.js +39 -28
  50. package/lib/AppContainer/AppContainer.js +4 -0
  51. package/lib/Select/Select.js +3 -1
  52. package/package.json +2 -2
@@ -118,9 +118,10 @@ class SelectWithAvatarComponent extends SelectComponent {
118
118
  }
119
119
  }
120
120
 
121
- responsiveFunc({
122
- mediaQueryOR
123
- }) {
121
+ responsiveFunc(_ref) {
122
+ let {
123
+ mediaQueryOR
124
+ } = _ref;
124
125
  return {
125
126
  tabletMode: mediaQueryOR([{
126
127
  maxWidth: 700
@@ -267,94 +268,97 @@ class SelectWithAvatarComponent extends SelectComponent {
267
268
  }, TextBoxProps)))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
268
269
  query: this.responsiveFunc,
269
270
  responsiveId: "Helmet"
270
- }, ({
271
- tabletMode
272
- }) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
273
- animationStyle: animationStyle,
274
- boxPosition: position || `${defaultDropBoxPosition}Center`,
275
- getRef: getContainerRef,
276
- isActive: isPopupReady,
277
- isAnimate: true,
278
- isArrow: false,
279
- onClick: removeClose,
280
- needResponsive: needResponsive,
281
- isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
282
- positionsOffset: positionsOffset,
283
- targetOffset: targetOffset,
284
- isRestrictScroll: isRestrictScroll,
285
- isPadding: false,
286
- isResponsivePadding: true,
287
- alignBox: "row",
288
- dataId: `${dataId}_dropbox`,
289
- customClass: {
290
- customDropBox: dropBoxClass
291
- }
292
- }, isLoading ? /*#__PURE__*/React.createElement(Container, {
293
- align: "both",
294
- className: style.loader
295
- }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
296
- flexible: true
297
- }, /*#__PURE__*/React.createElement(Card, {
298
- onScroll: this.handleScroll
299
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
300
- className: `${selectStyle.search} ${selectStyle[size]}`
301
- }, /*#__PURE__*/React.createElement(TextBoxIcon, _extends({
302
- inputRef: this.searchInputRef,
303
- maxLength: maxLength,
304
- onChange: this.handleSearch,
305
- onKeyDown: this.handleKeyDown,
306
- placeHolder: searchBoxPlaceHolder,
307
- size: searchBoxSize,
308
- value: searchStr,
309
- onClear: this.handleClearSearch,
310
- dataId: `${dataId}_search`,
311
- a11y: {
312
- ariaAutocomplete: 'list',
313
- ariaControls: setAriaId,
314
- ariaDescribedby: ariaErrorId
315
- },
316
- autoComplete: false
317
- }, DropdownSearchTextBoxProps)))) : null, /*#__PURE__*/React.createElement(CardContent, {
318
- shrink: true,
319
- customClass: `${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
320
- eleRef: this.suggestionContainerRef
321
- }, groupName ? /*#__PURE__*/React.createElement("div", {
322
- className: style.title
323
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
324
- text: groupName,
325
- a11y: {
326
- role: 'heading'
327
- }
328
- })) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
329
- dataId: `${dataId}_Options`,
330
- activeId: selectedId,
331
- suggestions: suggestions,
332
- getRef: this.suggestionItemRef,
333
- hoverOption: hoverIndex,
334
- onClick: this.handleChange,
335
- onMouseEnter: this.handleMouseEnter,
336
- needTick: true,
337
- needBorder: false,
338
- selectedOptions: [selectedId],
339
- className: selectStyle.listItemContainer,
340
- htmlId: setAriaId,
341
- a11y: {
342
- ariaParentRole: 'listbox',
343
- role: 'option'
344
- }
345
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
346
- isLoading: isFetchingOptions,
347
- options: options,
348
- searchString: searchStr,
349
- suggestions: suggestions,
350
- renderCustomEmptyState: renderCustomEmptyState,
351
- dataId: dataId,
352
- i18nKeys: i18nKeys,
353
- htmlId: ariaErrorId
354
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
355
- isCover: false,
356
- align: "both"
357
- }, /*#__PURE__*/React.createElement(Loader, null))))))) : null);
271
+ }, _ref2 => {
272
+ let {
273
+ tabletMode
274
+ } = _ref2;
275
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
276
+ animationStyle: animationStyle,
277
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
278
+ getRef: getContainerRef,
279
+ isActive: isPopupReady,
280
+ isAnimate: true,
281
+ isArrow: false,
282
+ onClick: removeClose,
283
+ needResponsive: needResponsive,
284
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
285
+ positionsOffset: positionsOffset,
286
+ targetOffset: targetOffset,
287
+ isRestrictScroll: isRestrictScroll,
288
+ isPadding: false,
289
+ isResponsivePadding: true,
290
+ alignBox: "row",
291
+ dataId: `${dataId}_dropbox`,
292
+ customClass: {
293
+ customDropBox: dropBoxClass
294
+ }
295
+ }, isLoading ? /*#__PURE__*/React.createElement(Container, {
296
+ align: "both",
297
+ className: style.loader
298
+ }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
299
+ flexible: true
300
+ }, /*#__PURE__*/React.createElement(Card, {
301
+ onScroll: this.handleScroll
302
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
303
+ className: `${selectStyle.search} ${selectStyle[size]}`
304
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, _extends({
305
+ inputRef: this.searchInputRef,
306
+ maxLength: maxLength,
307
+ onChange: this.handleSearch,
308
+ onKeyDown: this.handleKeyDown,
309
+ placeHolder: searchBoxPlaceHolder,
310
+ size: searchBoxSize,
311
+ value: searchStr,
312
+ onClear: this.handleClearSearch,
313
+ dataId: `${dataId}_search`,
314
+ a11y: {
315
+ ariaAutocomplete: 'list',
316
+ ariaControls: setAriaId,
317
+ ariaDescribedby: ariaErrorId
318
+ },
319
+ autoComplete: false
320
+ }, DropdownSearchTextBoxProps)))) : null, /*#__PURE__*/React.createElement(CardContent, {
321
+ shrink: true,
322
+ customClass: `${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
323
+ eleRef: this.suggestionContainerRef
324
+ }, groupName ? /*#__PURE__*/React.createElement("div", {
325
+ className: style.title
326
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
327
+ text: groupName,
328
+ a11y: {
329
+ role: 'heading'
330
+ }
331
+ })) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
332
+ dataId: `${dataId}_Options`,
333
+ activeId: selectedId,
334
+ suggestions: suggestions,
335
+ getRef: this.suggestionItemRef,
336
+ hoverOption: hoverIndex,
337
+ onClick: this.handleChange,
338
+ onMouseEnter: this.handleMouseEnter,
339
+ needTick: true,
340
+ needBorder: false,
341
+ selectedOptions: [selectedId],
342
+ className: selectStyle.listItemContainer,
343
+ htmlId: setAriaId,
344
+ a11y: {
345
+ ariaParentRole: 'listbox',
346
+ role: 'option'
347
+ }
348
+ }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
349
+ isLoading: isFetchingOptions,
350
+ options: options,
351
+ searchString: searchStr,
352
+ suggestions: suggestions,
353
+ renderCustomEmptyState: renderCustomEmptyState,
354
+ dataId: dataId,
355
+ i18nKeys: i18nKeys,
356
+ htmlId: ariaErrorId
357
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
358
+ isCover: false,
359
+ align: "both"
360
+ }, /*#__PURE__*/React.createElement(Loader, null))))));
361
+ }) : null);
358
362
  }
359
363
 
360
364
  }
@@ -268,7 +268,8 @@ class SelectWithIcon extends Component {
268
268
  isNextOptions && getNextOptions && this.handleFetchOptions(getNextOptions, searchValue);
269
269
  }
270
270
 
271
- handleFetchOptions(APICall, searchValue = '') {
271
+ handleFetchOptions(APICall) {
272
+ let searchValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
272
273
  let {
273
274
  isFetchingOptions = false
274
275
  } = this.state;
@@ -299,9 +300,10 @@ class SelectWithIcon extends Component {
299
300
  }
300
301
  }
301
302
 
302
- responsiveFunc({
303
- mediaQueryOR
304
- }) {
303
+ responsiveFunc(_ref) {
304
+ let {
305
+ mediaQueryOR
306
+ } = _ref;
305
307
  return {
306
308
  tabletMode: mediaQueryOR([{
307
309
  maxWidth: 700
@@ -457,109 +459,112 @@ class SelectWithIcon extends Component {
457
459
  })))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
458
460
  query: this.responsiveFunc,
459
461
  responsiveId: "Helmet"
460
- }, ({
461
- tabletMode
462
- }) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
463
- animationStyle: animationStyle,
464
- boxPosition: position,
465
- isActive: isPopupReady,
466
- isAnimate: true,
467
- isArrow: false,
468
- onClick: removeClose,
469
- getRef: getContainerRef,
470
- needResponsive: needResponsive,
471
- isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
472
- positionsOffset: positionsOffset,
473
- targetOffset: targetOffset,
474
- isRestrictScroll: isRestrictScroll,
475
- dataId: `${dataId}_suggestions`,
476
- size: boxSize,
477
- isPadding: false,
478
- isResponsivePadding: true,
479
- alignBox: "row",
480
- customClass: {
481
- customDropBox: dropBoxClass
482
- }
483
- }, isLoading ? /*#__PURE__*/React.createElement(Container, {
484
- align: "both",
485
- className: style.loader
486
- }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
487
- flexible: true
488
- }, /*#__PURE__*/React.createElement(Card, {
489
- onScroll: this.handleScroll,
490
- htmlId: setAriaId,
491
- a11y: {
492
- role: 'listbox'
493
- }
494
- }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
495
- className: `${style.search} ${style[size]}`
496
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
497
- onClear: this.onSearchClear,
498
- onChange: this.onSearch,
499
- placeHolder: searchBoxPlaceHolder,
500
- value: searchValue,
501
- maxLength: maxLength,
502
- onKeyDown: this.handleKeyDown,
503
- inputRef: this.searchInputRef,
504
- size: searchBoxSize,
505
- dataId: `${dataId}_search`,
506
- a11y: {
507
- ariaDescribedby: ariaErrorId
508
- },
509
- autoComplete: false,
510
- customProps: {
511
- TextBoxProps: DropdownSearchTextBoxProps
512
- }
513
- }))) : null, /*#__PURE__*/React.createElement(CardContent, {
514
- customClass: `${tabletMode ? style.responsivedropBoxList : style.dropBoxList} ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
515
- shrink: true,
516
- eleRef: this.scrollContentRef,
517
- dataId: `${dataId}_Options`
518
- }, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
462
+ }, _ref2 => {
519
463
  let {
520
- iconName,
521
- iconSize,
522
- iconColor
523
- } = options;
524
- return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
525
- key: options[idKey],
526
- value: options[valueKey],
527
- secondaryValue: options[secondaryValueKey],
528
- size: "medium",
529
- onClick: this.handleChange,
530
- id: options[idKey],
531
- index: i,
532
- title: options[valueKey],
533
- palette: "default",
534
- dataId: options[idKey],
535
- iconName: iconName,
536
- iconSize: iconSize,
537
- iconClass: iconColor,
538
- active: selectedId === options[idKey],
539
- needBorder: needListBorder,
540
- needTick: needTick,
541
- onMouseEnter: this.handleMouseEnter,
542
- highlight: selectedIndex === i,
543
- getRef: this.itemRef,
464
+ tabletMode
465
+ } = _ref2;
466
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
467
+ animationStyle: animationStyle,
468
+ boxPosition: position,
469
+ isActive: isPopupReady,
470
+ isAnimate: true,
471
+ isArrow: false,
472
+ onClick: removeClose,
473
+ getRef: getContainerRef,
474
+ needResponsive: needResponsive,
475
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
476
+ positionsOffset: positionsOffset,
477
+ targetOffset: targetOffset,
478
+ isRestrictScroll: isRestrictScroll,
479
+ dataId: `${dataId}_suggestions`,
480
+ size: boxSize,
481
+ isPadding: false,
482
+ isResponsivePadding: true,
483
+ alignBox: "row",
484
+ customClass: {
485
+ customDropBox: dropBoxClass
486
+ }
487
+ }, isLoading ? /*#__PURE__*/React.createElement(Container, {
488
+ align: "both",
489
+ className: style.loader
490
+ }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
491
+ flexible: true
492
+ }, /*#__PURE__*/React.createElement(Card, {
493
+ onScroll: this.handleScroll,
494
+ htmlId: setAriaId,
544
495
  a11y: {
545
- role: 'option',
546
- ariaSelected: selectedId === options[idKey],
547
- ariaLabel: options[valueKey]
496
+ role: 'listbox'
548
497
  }
549
- }, ListItemProps));
550
- })) : /*#__PURE__*/React.createElement(EmptyState, {
551
- isLoading: isFetchingOptions,
552
- options: options,
553
- searchString: searchValue,
554
- suggestions: options,
555
- renderCustomEmptyState: renderCustomEmptyState,
556
- dataId: dataId,
557
- i18nKeys: i18nKeys,
558
- htmlId: ariaErrorId
559
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
560
- isCover: false,
561
- align: "both"
562
- }, /*#__PURE__*/React.createElement(Loader, null))))))) : null);
498
+ }, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement("div", {
499
+ className: `${style.search} ${style[size]}`
500
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
501
+ onClear: this.onSearchClear,
502
+ onChange: this.onSearch,
503
+ placeHolder: searchBoxPlaceHolder,
504
+ value: searchValue,
505
+ maxLength: maxLength,
506
+ onKeyDown: this.handleKeyDown,
507
+ inputRef: this.searchInputRef,
508
+ size: searchBoxSize,
509
+ dataId: `${dataId}_search`,
510
+ a11y: {
511
+ ariaDescribedby: ariaErrorId
512
+ },
513
+ autoComplete: false,
514
+ customProps: {
515
+ TextBoxProps: DropdownSearchTextBoxProps
516
+ }
517
+ }))) : null, /*#__PURE__*/React.createElement(CardContent, {
518
+ customClass: `${tabletMode ? style.responsivedropBoxList : style.dropBoxList} ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''} ${cardContentClass}`,
519
+ shrink: true,
520
+ eleRef: this.scrollContentRef,
521
+ dataId: `${dataId}_Options`
522
+ }, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
523
+ let {
524
+ iconName,
525
+ iconSize,
526
+ iconColor
527
+ } = options;
528
+ return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
529
+ key: options[idKey],
530
+ value: options[valueKey],
531
+ secondaryValue: options[secondaryValueKey],
532
+ size: "medium",
533
+ onClick: this.handleChange,
534
+ id: options[idKey],
535
+ index: i,
536
+ title: options[valueKey],
537
+ palette: "default",
538
+ dataId: options[idKey],
539
+ iconName: iconName,
540
+ iconSize: iconSize,
541
+ iconClass: iconColor,
542
+ active: selectedId === options[idKey],
543
+ needBorder: needListBorder,
544
+ needTick: needTick,
545
+ onMouseEnter: this.handleMouseEnter,
546
+ highlight: selectedIndex === i,
547
+ getRef: this.itemRef,
548
+ a11y: {
549
+ role: 'option',
550
+ ariaSelected: selectedId === options[idKey],
551
+ ariaLabel: options[valueKey]
552
+ }
553
+ }, ListItemProps));
554
+ })) : /*#__PURE__*/React.createElement(EmptyState, {
555
+ isLoading: isFetchingOptions,
556
+ options: options,
557
+ searchString: searchValue,
558
+ suggestions: options,
559
+ renderCustomEmptyState: renderCustomEmptyState,
560
+ dataId: dataId,
561
+ i18nKeys: i18nKeys,
562
+ htmlId: ariaErrorId
563
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
564
+ isCover: false,
565
+ align: "both"
566
+ }, /*#__PURE__*/React.createElement(Loader, null))))));
567
+ }) : null);
563
568
  }
564
569
 
565
570
  }
@@ -618,12 +618,15 @@ describe('Select -', () => {
618
618
  });
619
619
  test('Should trigger onAddNewOption, when click on the custom search empty state button', () => {
620
620
  const addMessage = 'Add New Option';
621
- const getCustomEmptyState = jest.fn(({
622
- searchString,
623
- onAddNewOption
624
- }) => /*#__PURE__*/React.createElement("button", {
625
- onClick: onAddNewOption
626
- }, addMessage));
621
+ const getCustomEmptyState = jest.fn(_ref => {
622
+ let {
623
+ searchString,
624
+ onAddNewOption
625
+ } = _ref;
626
+ return /*#__PURE__*/React.createElement("button", {
627
+ onClick: onAddNewOption
628
+ }, addMessage);
629
+ });
627
630
  const mockOnAddNewOption = jest.fn();
628
631
  const {
629
632
  getByRole,
package/es/Tab/Tab.js CHANGED
@@ -24,35 +24,36 @@ const tabTypes = {
24
24
  tab: 'tabDelta'
25
25
  }
26
26
  };
27
- export default function Tab({
28
- id,
29
- style,
30
- text,
31
- children,
32
- className,
33
- dataId,
34
- dataSelectorId,
35
- title,
36
- titlePosition,
37
- activeClass,
38
- href,
39
- isLink,
40
- isDisabled,
41
- tourId,
42
- onClick,
43
- isActive,
44
- getTabRef,
45
- onSelect,
46
- type,
47
- isAnimate,
48
- needBorder,
49
- needAppearance,
50
- align,
51
- isVirtual,
52
- contentAlign,
53
- contentAlignBox,
54
- customProps
55
- }) {
27
+ export default function Tab(_ref) {
28
+ let {
29
+ id,
30
+ style,
31
+ text,
32
+ children,
33
+ className,
34
+ dataId,
35
+ dataSelectorId,
36
+ title,
37
+ titlePosition,
38
+ activeClass,
39
+ href,
40
+ isLink,
41
+ isDisabled,
42
+ tourId,
43
+ onClick,
44
+ isActive,
45
+ getTabRef,
46
+ onSelect,
47
+ type,
48
+ isAnimate,
49
+ needBorder,
50
+ needAppearance,
51
+ align,
52
+ isVirtual,
53
+ contentAlign,
54
+ contentAlignBox,
55
+ customProps
56
+ } = _ref;
56
57
  let clickListener = useCallback(event => {
57
58
  if (isLink && event && (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)) {
58
59
  event && event.stopPropagation();
@@ -5,22 +5,25 @@ import { Container } from "../Layout";
5
5
  import style from "./TabContent.module.css";
6
6
  /* eslint-disable react/forbid-component-props */
7
7
 
8
- const TabContent = ({
9
- children,
10
- scroll,
11
- dataId,
12
- id,
13
- dataSelectorId
14
- }) => /*#__PURE__*/React.createElement(Container, {
15
- className: style.container,
16
- scroll: scroll,
17
- dataId: `${dataId}_TabContent`,
18
- isScrollAttribute: true,
19
- "aria-labelledby": id,
20
- tabindex: "-1",
21
- role: "tabpanel",
22
- dataSelectorId: dataSelectorId
23
- }, children);
8
+ const TabContent = _ref => {
9
+ let {
10
+ children,
11
+ scroll,
12
+ dataId,
13
+ id,
14
+ dataSelectorId
15
+ } = _ref;
16
+ return /*#__PURE__*/React.createElement(Container, {
17
+ className: style.container,
18
+ scroll: scroll,
19
+ dataId: `${dataId}_TabContent`,
20
+ isScrollAttribute: true,
21
+ "aria-labelledby": id,
22
+ tabindex: "-1",
23
+ role: "tabpanel",
24
+ dataSelectorId: dataSelectorId
25
+ }, children);
26
+ };
24
27
 
25
28
  TabContent.defaultProps = TabContent_defaultProps;
26
29
  TabContent.propTypes = TabContent_propTypes;
@@ -6,25 +6,28 @@ import { TabContentWrapper_propTypes } from "./props/propTypes";
6
6
  import { Box } from "../Layout";
7
7
  /* eslint-disable react/forbid-component-props */
8
8
 
9
- const TabContentWrapper = ({
10
- style,
11
- className,
12
- children,
13
- dataId,
14
- selectedTab,
15
- onScroll,
16
- dataSelectorId,
17
- tagName,
18
- a11y
19
- }) => /*#__PURE__*/React.createElement(Box, _extends({
20
- flexible: true,
21
- style: style,
22
- dataId: dataId,
23
- className: className,
24
- onScroll: onScroll,
25
- dataSelectorId: dataSelectorId,
26
- tagName: tagName
27
- }, a11y), React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
9
+ const TabContentWrapper = _ref => {
10
+ let {
11
+ style,
12
+ className,
13
+ children,
14
+ dataId,
15
+ selectedTab,
16
+ onScroll,
17
+ dataSelectorId,
18
+ tagName,
19
+ a11y
20
+ } = _ref;
21
+ return /*#__PURE__*/React.createElement(Box, _extends({
22
+ flexible: true,
23
+ style: style,
24
+ dataId: dataId,
25
+ className: className,
26
+ onScroll: onScroll,
27
+ dataSelectorId: dataSelectorId,
28
+ tagName: tagName
29
+ }, a11y), React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
30
+ };
28
31
 
29
32
  TabContentWrapper.defaultProps = TabContentWrapper_defaultProps;
30
33
  TabContentWrapper.propTypes = TabContentWrapper_propTypes;
@@ -6,21 +6,22 @@ import { TabWrapper_propTypes } from "./props/propTypes";
6
6
  import { Container } from "../Layout";
7
7
  import { TAB_ALIGN_MAPPING } from "./utils/tabConfigs";
8
8
 
9
- function TabWrapper({
10
- defaultTab,
11
- hookToDisableInternalState,
12
- onSelect,
13
- type,
14
- isAnimate,
15
- needTabBorder,
16
- needBorder,
17
- needPadding,
18
- needAppearance,
19
- align,
20
- dataId,
21
- children,
22
- dataSelectorId
23
- }) {
9
+ function TabWrapper(_ref) {
10
+ let {
11
+ defaultTab,
12
+ hookToDisableInternalState,
13
+ onSelect,
14
+ type,
15
+ isAnimate,
16
+ needTabBorder,
17
+ needBorder,
18
+ needPadding,
19
+ needAppearance,
20
+ align,
21
+ dataId,
22
+ children,
23
+ dataSelectorId
24
+ } = _ref;
24
25
  let [selectedTabInternal, setSelected] = useState(!hookToDisableInternalState ? defaultTab || 0 : null);
25
26
  const setSelectedTab = useCallback(id => {
26
27
  if (!hookToDisableInternalState) {