@zohodesk/components 1.2.39 → 1.2.41

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.
@@ -98,7 +98,8 @@ var Radio = /*#__PURE__*/function (_React$Component) {
98
98
  customClass = _this$props3.customClass,
99
99
  customProps = _this$props3.customProps,
100
100
  children = _this$props3.children,
101
- a11y = _this$props3.a11y;
101
+ a11y = _this$props3.a11y,
102
+ renderRightPlaceholderNode = _this$props3.renderRightPlaceholderNode;
102
103
  var _customClass$customRa = customClass.customRadioWrap,
103
104
  customRadioWrap = _customClass$customRa === void 0 ? '' : _customClass$customRa,
104
105
  _customClass$customRa2 = customClass.customRadio,
@@ -173,7 +174,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
173
174
  variant: variant,
174
175
  title: toolTip ? toolTip : text,
175
176
  customClass: "".concat(checked && active ? "".concat(_RadioModule["default"]["".concat(palette, "checkedActive")]) : '', " \n ").concat(_RadioModule["default"]["".concat(palette, "Label")], " ").concat(accessMode, " ").concat(customLabel)
176
- }, LabelProps))), children);
177
+ }, LabelProps))), children, renderRightPlaceholderNode ? renderRightPlaceholderNode : null);
177
178
  }
178
179
  }]);
179
180
 
@@ -46,6 +46,7 @@ var propTypes = {
46
46
  }),
47
47
  children: _propTypes["default"].node,
48
48
  onChange: _propTypes["default"].func,
49
- text: _propTypes["default"].string
49
+ text: _propTypes["default"].string,
50
+ renderRightPlaceholderNode: _propTypes["default"].node
50
51
  };
51
52
  exports.propTypes = propTypes;
package/lib/Tab/Tabs.js CHANGED
@@ -9,6 +9,8 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
+ var _EmptySearch = _interopRequireDefault(require("@zohodesk/svg/lib/emptystate/version3/EmptySearch"));
13
+
12
14
  var _Tab = _interopRequireDefault(require("./Tab"));
13
15
 
14
16
  var _defaultProps = require("./props/defaultProps");
@@ -29,6 +31,8 @@ var _TabsModule = _interopRequireDefault(require("./Tabs.module.css"));
29
31
 
30
32
  var _Popup = _interopRequireDefault(require("../Popup/Popup"));
31
33
 
34
+ var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
35
+
32
36
  var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
33
37
 
34
38
  var _CustomResponsive = require("../Responsive/CustomResponsive");
@@ -81,10 +85,11 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
81
85
  tabDimensions: {},
82
86
  highlightInitialDimension: null,
83
87
  renderVirtualTabs: true,
84
- tabKeys: []
88
+ tabKeys: [],
89
+ searchValue: ''
85
90
  };
86
91
 
87
- _Common.bind.apply(_assertThisInitialized(_this), ['moreTabSelect', 'onResize', 'onTabResize', 'getHighlightRef', 'getTabsRef', 'getTabRef', 'getHighlightDim', 'onSizeChange', 'onScroll', 'togglePopup', 'setMaxDim']);
92
+ _Common.bind.apply(_assertThisInitialized(_this), ['moreTabSelect', 'onResize', 'onTabResize', 'getHighlightRef', 'getTabsRef', 'getTabRef', 'getHighlightDim', 'onSizeChange', 'onScroll', 'togglePopup', 'setMaxDim', 'handleChange', 'handleSearchValueClear', 'getMoreList', 'renderEmptyState']);
88
93
 
89
94
  _this.tabsObserver = new _ResizeObserver["default"](_this.onResize);
90
95
  _this.tabObserver = {};
@@ -188,11 +193,13 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
188
193
  var _this$props2 = this.props,
189
194
  children = _this$props2.children,
190
195
  selectedTab = _this$props2.selectedTab,
191
- childType = _this$props2.childType;
196
+ childType = _this$props2.childType,
197
+ isPopupOpen = _this$props2.isPopupOpen;
192
198
  var _this$state = this.state,
193
199
  tabDimensions = _this$state.tabDimensions,
194
200
  totalDimension = _this$state.totalDimension,
195
- tabKeys = _this$state.tabKeys;
201
+ tabKeys = _this$state.tabKeys,
202
+ searchValue = _this$state.searchValue;
196
203
 
197
204
  if (prevProps.children && children) {
198
205
  /**
@@ -230,6 +237,10 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
230
237
  if (prevProps.selectedTab !== selectedTab || newTabKeys.length === 1) {
231
238
  this.moveHighlight();
232
239
  }
240
+
241
+ if (prevProps.isPopupOpen != isPopupOpen && searchValue.length) {
242
+ this.handleSearchValueClear();
243
+ }
233
244
  }
234
245
  }
235
246
  }, {
@@ -431,7 +442,9 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
431
442
  }, {
432
443
  key: "moreTabSelect",
433
444
  value: function moreTabSelect(tab, value, index, e) {
434
- var onSelect = this.props.onSelect;
445
+ var _this$props7 = this.props,
446
+ onSelect = _this$props7.onSelect,
447
+ closePopupOnly = _this$props7.closePopupOnly;
435
448
 
436
449
  if (e && e.target && e.target.parentElement.tagName === 'A' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)) {
437
450
  (0, _Common.cancelBubblingEffect)(e);
@@ -440,6 +453,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
440
453
 
441
454
  e.preventDefault();
442
455
  onSelect(tab);
456
+ closePopupOnly();
443
457
  }
444
458
  }, {
445
459
  key: "onScroll",
@@ -451,11 +465,11 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
451
465
  }, {
452
466
  key: "togglePopup",
453
467
  value: function togglePopup(e) {
454
- var _this$props7 = this.props,
455
- boxPosition = _this$props7.boxPosition,
456
- togglePopup = _this$props7.togglePopup,
457
- align = _this$props7.align,
458
- removeClose = _this$props7.removeClose;
468
+ var _this$props8 = this.props,
469
+ boxPosition = _this$props8.boxPosition,
470
+ togglePopup = _this$props8.togglePopup,
471
+ align = _this$props8.align,
472
+ removeClose = _this$props8.removeClose;
459
473
  removeClose && removeClose(e);
460
474
  var popupPosition = align === 'vertical' ? 'bottomLeft' : 'rightTop';
461
475
  boxPosition = boxPosition ? boxPosition : popupPosition;
@@ -471,45 +485,114 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
471
485
  }])
472
486
  };
473
487
  }
488
+ }, {
489
+ key: "handleChange",
490
+ value: function handleChange(value, e) {
491
+ this.setState({
492
+ searchValue: value
493
+ });
494
+ }
495
+ }, {
496
+ key: "handleSearchValueClear",
497
+ value: function handleSearchValueClear(e) {
498
+ this.setState({
499
+ searchValue: ''
500
+ });
501
+ }
502
+ }, {
503
+ key: "getMoreList",
504
+ value: function getMoreList(_ref2) {
505
+ var moreTabs = _ref2.moreTabs;
506
+ var validElements = [];
507
+
508
+ _react["default"].Children.map(moreTabs, function (child) {
509
+ var isValidElement = /*#__PURE__*/_react["default"].isValidElement(child);
510
+
511
+ if (isValidElement) {
512
+ validElements.push(child.props);
513
+ }
514
+ });
515
+
516
+ return validElements;
517
+ }
518
+ }, {
519
+ key: "handleFilterSuggestions",
520
+ value: function handleFilterSuggestions(_ref3) {
521
+ var moreTabs = _ref3.moreTabs;
522
+ var showTitleInMoreOptions = this.props.showTitleInMoreOptions;
523
+ var searchValue = this.state.searchValue;
524
+ var options = this.getMoreList({
525
+ moreTabs: moreTabs
526
+ });
527
+ var filteredOptions = options.filter(function (list) {
528
+ var text = list.text,
529
+ title = list.title;
530
+ var value = text ? text : showTitleInMoreOptions ? title : '';
531
+ return value.toLowerCase().includes(searchValue.toLowerCase());
532
+ });
533
+ return filteredOptions;
534
+ }
535
+ }, {
536
+ key: "renderEmptyState",
537
+ value: function renderEmptyState() {
538
+ var searchErrorText = this.props.searchErrorText;
539
+ return /*#__PURE__*/_react["default"].createElement("div", {
540
+ className: _TabsModule["default"].emptyStateContainer
541
+ }, /*#__PURE__*/_react["default"].createElement(_EmptySearch["default"], {
542
+ size: "small"
543
+ }), /*#__PURE__*/_react["default"].createElement("div", {
544
+ className: _TabsModule["default"].emptyStateTitle
545
+ }, searchErrorText));
546
+ }
474
547
  }, {
475
548
  key: "renderTabs",
476
549
  value: function renderTabs(mainTabs, moreTabs, isVirtual) {
477
550
  var _this8 = this;
478
551
 
479
- var _this$props8 = this.props,
480
- selectedTab = _this$props8.selectedTab,
481
- moreButtonClass = _this$props8.moreButtonClass,
482
- moreButtonActiveClass = _this$props8.moreButtonActiveClass,
483
- moreBoxClass = _this$props8.moreBoxClass,
484
- menuItemClass = _this$props8.menuItemClass,
485
- itemClass = _this$props8.itemClass,
486
- itemActiveClass = _this$props8.itemActiveClass,
487
- iconName = _this$props8.iconName,
488
- isPopupReady = _this$props8.isPopupReady,
489
- isPopupOpen = _this$props8.isPopupOpen,
490
- getContainerRef = _this$props8.getContainerRef,
491
- showTitleInMoreOptions = _this$props8.showTitleInMoreOptions,
492
- onSelect = _this$props8.onSelect,
493
- moreContainerClass = _this$props8.moreContainerClass,
494
- align = _this$props8.align,
495
- type = _this$props8.type,
496
- isAnimate = _this$props8.isAnimate,
497
- needTabBorder = _this$props8.needTabBorder,
498
- needAppearance = _this$props8.needAppearance,
499
- iconSize = _this$props8.iconSize,
500
- getTargetRef = _this$props8.getTargetRef,
501
- position = _this$props8.position,
502
- customProps = _this$props8.customProps,
503
- getCustomDropBoxHeaderPlaceHolder = _this$props8.getCustomDropBoxHeaderPlaceHolder,
504
- dataSelectorId = _this$props8.dataSelectorId,
505
- dataId = _this$props8.dataId;
552
+ var _this$props9 = this.props,
553
+ selectedTab = _this$props9.selectedTab,
554
+ moreButtonClass = _this$props9.moreButtonClass,
555
+ moreButtonActiveClass = _this$props9.moreButtonActiveClass,
556
+ moreBoxClass = _this$props9.moreBoxClass,
557
+ menuItemClass = _this$props9.menuItemClass,
558
+ itemClass = _this$props9.itemClass,
559
+ itemActiveClass = _this$props9.itemActiveClass,
560
+ iconName = _this$props9.iconName,
561
+ isPopupReady = _this$props9.isPopupReady,
562
+ isPopupOpen = _this$props9.isPopupOpen,
563
+ getContainerRef = _this$props9.getContainerRef,
564
+ showTitleInMoreOptions = _this$props9.showTitleInMoreOptions,
565
+ onSelect = _this$props9.onSelect,
566
+ moreContainerClass = _this$props9.moreContainerClass,
567
+ align = _this$props9.align,
568
+ type = _this$props9.type,
569
+ isAnimate = _this$props9.isAnimate,
570
+ needTabBorder = _this$props9.needTabBorder,
571
+ needAppearance = _this$props9.needAppearance,
572
+ iconSize = _this$props9.iconSize,
573
+ getTargetRef = _this$props9.getTargetRef,
574
+ position = _this$props9.position,
575
+ customProps = _this$props9.customProps,
576
+ getCustomDropBoxHeaderPlaceHolder = _this$props9.getCustomDropBoxHeaderPlaceHolder,
577
+ dataSelectorId = _this$props9.dataSelectorId,
578
+ dataId = _this$props9.dataId,
579
+ placeHolderText = _this$props9.placeHolderText,
580
+ searchBoxSize = _this$props9.searchBoxSize,
581
+ removeClose = _this$props9.removeClose;
582
+ var searchValue = this.state.searchValue;
506
583
  var _customProps$DropBoxP = customProps.DropBoxProps,
507
584
  DropBoxProps = _customProps$DropBoxP === void 0 ? {} : _customProps$DropBoxP,
508
585
  _customProps$ListItem = customProps.ListItemProps,
509
586
  ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
510
587
  _customProps$MoreButt = customProps.MoreButtonProps,
511
- MoreButtonProps = _customProps$MoreButt === void 0 ? {} : _customProps$MoreButt;
588
+ MoreButtonProps = _customProps$MoreButt === void 0 ? {} : _customProps$MoreButt,
589
+ _customProps$TextBoxI = customProps.TextBoxIconProps,
590
+ TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI;
512
591
  var popupClass = align === 'vertical' ? _TabsModule["default"][position] ? _TabsModule["default"][position] : '' : '';
592
+ var moreTabsListItems = this.handleFilterSuggestions({
593
+ moreTabs: moreTabs
594
+ });
595
+ var hasSearch = moreTabs.length > 4;
513
596
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _react["default"].Children.map(mainTabs, function (child) {
514
597
  if (!child) {
515
598
  return null;
@@ -558,8 +641,8 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
558
641
  })), isPopupOpen && /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
559
642
  query: this.responsiveFunc,
560
643
  responsiveId: "Helmet"
561
- }, function (_ref2) {
562
- var tabletMode = _ref2.tabletMode;
644
+ }, function (_ref4) {
645
+ var tabletMode = _ref4.tabletMode;
563
646
  return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], _extends({
564
647
  isActive: isPopupReady,
565
648
  isAnimate: true,
@@ -574,30 +657,40 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
574
657
  }, DropBoxProps, {
575
658
  isResponsivePadding: true,
576
659
  needFocusScope: true,
577
- onClose: _this8.togglePopup,
578
- dataId: "".concat(dataId, "_dropbox")
579
- }), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(_this8.props), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
660
+ dataId: "".concat(dataId, "_dropbox"),
661
+ onClick: removeClose,
662
+ onClose: _this8.togglePopup
663
+ }), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(_this8.props), hasSearch ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
664
+ className: _TabsModule["default"].search
665
+ }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], _extends({
666
+ placeHolder: placeHolderText,
667
+ onChange: _this8.handleChange,
668
+ value: searchValue,
669
+ onClear: _this8.handleSearchValueClear,
670
+ size: searchBoxSize,
671
+ customProps: {
672
+ TextBoxProps: {
673
+ 'data-a11y-autofocus': true
674
+ }
675
+ },
676
+ dataId: "".concat(dataId, "_search")
677
+ }, TextBoxIconProps))) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
580
678
  flexible: true,
581
679
  shrink: true,
582
680
  scroll: "vertical",
583
- className: "".concat(tabletMode ? '' : _TabsModule["default"].menuBox, " ").concat(moreBoxClass),
681
+ className: "".concat(_TabsModule["default"].listWrapper, " ").concat(tabletMode ? '' : _TabsModule["default"].menuBox, " ").concat(moreBoxClass),
584
682
  onScroll: _this8.onScroll,
585
683
  dataId: "".concat(dataId, "_Tabs")
586
- }, _react["default"].Children.map(moreTabs, function (child) {
587
- if (!child) {
588
- return null;
589
- }
590
-
591
- var _child$props = child.props,
592
- text = _child$props.text,
593
- id = _child$props.id,
594
- title = _child$props.title,
595
- isLink = _child$props.isLink,
596
- href = _child$props.href,
597
- children = _child$props.children,
598
- dataId = _child$props.dataId;
684
+ }, moreTabsListItems.length ? moreTabsListItems.map(function (data) {
685
+ var text = data.text,
686
+ id = data.id,
687
+ title = data.title,
688
+ isLink = data.isLink,
689
+ href = data.href,
690
+ children = data.children,
691
+ dataId = data.dataId;
599
692
  var value = text ? text : showTitleInMoreOptions ? title : null;
600
- return /*#__PURE__*/_react["default"].isValidElement(child) && /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
693
+ return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
601
694
  key: id,
602
695
  value: value,
603
696
  onClick: _this8.moreTabSelect,
@@ -612,27 +705,27 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
612
705
  target: "self",
613
706
  dataId: "".concat(dataId, "_Tab")
614
707
  }, ListItemProps), !showTitleInMoreOptions ? children : null);
615
- })));
708
+ }) : _this8.renderEmptyState()));
616
709
  })) : null);
617
710
  }
618
711
  }, {
619
712
  key: "render",
620
713
  value: function render() {
621
- var _this$props9 = this.props,
622
- style = _this$props9.style,
623
- className = _this$props9.className,
624
- dataId = _this$props9.dataId,
625
- highlightClass = _this$props9.highlightClass,
626
- type = _this$props9.type,
627
- isAnimate = _this$props9.isAnimate,
628
- needTabBorder = _this$props9.needTabBorder,
629
- needBorder = _this$props9.needBorder,
630
- needPadding = _this$props9.needPadding,
631
- align = _this$props9.align,
632
- needAppearance = _this$props9.needAppearance,
633
- children = _this$props9.children,
634
- containerClass = _this$props9.containerClass,
635
- dataSelectorId = _this$props9.dataSelectorId;
714
+ var _this$props10 = this.props,
715
+ style = _this$props10.style,
716
+ className = _this$props10.className,
717
+ dataId = _this$props10.dataId,
718
+ highlightClass = _this$props10.highlightClass,
719
+ type = _this$props10.type,
720
+ isAnimate = _this$props10.isAnimate,
721
+ needTabBorder = _this$props10.needTabBorder,
722
+ needBorder = _this$props10.needBorder,
723
+ needPadding = _this$props10.needPadding,
724
+ align = _this$props10.align,
725
+ needAppearance = _this$props10.needAppearance,
726
+ children = _this$props10.children,
727
+ containerClass = _this$props10.containerClass,
728
+ dataSelectorId = _this$props10.dataSelectorId;
636
729
  var _this$state2 = this.state,
637
730
  totalDimension = _this$state2.totalDimension,
638
731
  tabDimensions = _this$state2.tabDimensions,
@@ -123,15 +123,45 @@
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 {
136
136
  visibility: hidden;
137
+ }
138
+
139
+ .search {
140
+ padding: 0 var(--zd_size20) 0 ;
141
+ }
142
+
143
+ .emptyStateContainer {
144
+ padding-bottom: var(--zd_size15) ;
145
+ }
146
+
147
+ .emptyStateTitle {
148
+ font-family: var(--zd_semibold);
149
+ word-wrap: break-word;
150
+ font-size: var(--zd_font_size16) ;
151
+ max-width: var(--zd_size430) ;
152
+ text-align: center;
153
+ }
154
+
155
+ [dir=ltr] .emptyStateTitle {
156
+ margin-left: auto ;
157
+ margin-right: auto ;
158
+ }
159
+
160
+ [dir=rtl] .emptyStateTitle {
161
+ margin-right: auto ;
162
+ margin-left: auto ;
163
+ }
164
+
165
+ .listWrapper {
166
+ padding-top: var(--zd_size10) ;
137
167
  }
@@ -39,7 +39,10 @@ var Tabs_defaultProps = {
39
39
  iconSize: '7',
40
40
  containerClass: '',
41
41
  customProps: {},
42
- dataSelectorId: 'tabs'
42
+ dataSelectorId: 'tabs',
43
+ searchBoxSize: 'small',
44
+ searchErrorText: 'No results',
45
+ placeHolderText: 'Search'
43
46
  };
44
47
  exports.Tabs_defaultProps = Tabs_defaultProps;
45
48
  var TabWrapper_defaultProps = {
@@ -97,12 +97,17 @@ var Tabs_propTypes = {
97
97
  getTargetRef: _propTypes["default"].func,
98
98
  containerClass: _propTypes["default"].string,
99
99
  customProps: _propTypes["default"].shape({
100
+ TextBoxIconProps: _propTypes["default"].object,
100
101
  DropBoxProps: _propTypes["default"].object,
101
102
  ListItemProps: _propTypes["default"].object,
102
103
  MoreButtonProps: _propTypes["default"].object
103
104
  }),
104
105
  getCustomDropBoxHeaderPlaceHolder: _propTypes["default"].func,
105
- dataSelectorId: _propTypes["default"].string
106
+ dataSelectorId: _propTypes["default"].string,
107
+ placeHolderText: _propTypes["default"].string,
108
+ searchBoxSize: _propTypes["default"].string,
109
+ searchErrorText: _propTypes["default"].string,
110
+ closePopupOnly: _propTypes["default"].func
106
111
  };
107
112
  exports.Tabs_propTypes = Tabs_propTypes;
108
113
  var TabWrapper_propTypes = {
@@ -10,7 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
 
12
12
  var CardHeader_propTypes = {
13
- children: _propTypes["default"].element,
13
+ children: _propTypes["default"].node,
14
14
  dataId: _propTypes["default"].string,
15
15
  isScroll: _propTypes["default"].bool,
16
16
  customClass: _propTypes["default"].string,
@@ -110,7 +110,7 @@ exports.DateTime_propTypes = DateTime_propTypes;
110
110
  var DateWidget_propTypes = {
111
111
  borderColor: _propTypes["default"].oneOf(['transparent', 'default']),
112
112
  cantEditOnPopupOpen: _propTypes["default"].bool,
113
- children: _propTypes["default"].object,
113
+ children: _propTypes["default"].node,
114
114
  className: _propTypes["default"].string,
115
115
  closePopupOnly: _propTypes["default"].func,
116
116
  dataId: _propTypes["default"].string,
@@ -18,7 +18,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
18
18
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
19
 
20
20
  var propTypes = _objectSpread(_objectSpread({}, _propTypes2.DropBoxPropTypes), {}, {
21
- children: _propTypes["default"].element,
21
+ children: _propTypes["default"].node,
22
22
  customClass: _propTypes["default"].object,
23
23
  isResponsivePadding: _propTypes["default"].bool,
24
24
  alignBox: _propTypes["default"].oneOf(['column', 'row'])
@@ -10,7 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
 
12
12
  var propTypes = {
13
- children: _propTypes["default"].element,
13
+ children: _propTypes["default"].node,
14
14
  dataId: _propTypes["default"].string,
15
15
  palette: _propTypes["default"].oneOf(['default', 'danger', 'primary', 'secondary', 'info', 'dark']),
16
16
  size: _propTypes["default"].oneOf(['small', 'medium', 'large', 'xlarge']),