@zohodesk/components 1.0.0-alpha-239 → 1.0.0-alpha-242

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 (49) hide show
  1. package/README.md +20 -6
  2. package/assets/Appearance/dark/mode/darkMode.module.css +2 -2
  3. package/assets/Appearance/default/mode/defaultMode.module.css +3 -3
  4. package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +2 -2
  5. package/es/DateTime/DateTime.js +42 -21
  6. package/es/DateTime/DateWidget.module.css +0 -4
  7. package/es/MultiSelect/AdvancedGroupMultiSelect.js +100 -75
  8. package/es/MultiSelect/AdvancedMultiSelect.js +75 -49
  9. package/es/MultiSelect/MultiSelect.js +80 -55
  10. package/es/MultiSelect/MultiSelect.module.css +6 -1
  11. package/es/MultiSelect/MultiSelectWithAvatar.js +77 -52
  12. package/es/PopOver/PopOver.js +10 -4
  13. package/es/Provider.js +5 -105
  14. package/es/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
  15. package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
  16. package/es/Select/GroupSelect.js +99 -74
  17. package/es/Select/Select.js +95 -68
  18. package/es/Select/Select.module.css +6 -0
  19. package/es/Select/SelectWithAvatar.js +91 -66
  20. package/es/Select/SelectWithIcon.js +99 -74
  21. package/es/Tab/Tabs.js +68 -43
  22. package/es/Tab/Tabs.module.css +2 -1
  23. package/es/Tag/Tag.js +1 -1
  24. package/es/Tag/Tag.module.css +6 -2
  25. package/es/Tooltip/Tooltip.js +1 -1
  26. package/es/index.js +2 -1
  27. package/lib/DateTime/DateTime.js +42 -22
  28. package/lib/DateTime/DateWidget.module.css +0 -4
  29. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +99 -77
  30. package/lib/MultiSelect/AdvancedMultiSelect.js +76 -50
  31. package/lib/MultiSelect/MultiSelect.js +81 -56
  32. package/lib/MultiSelect/MultiSelect.module.css +6 -1
  33. package/lib/MultiSelect/MultiSelectWithAvatar.js +78 -53
  34. package/lib/PopOver/PopOver.js +11 -4
  35. package/lib/Provider.js +6 -123
  36. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
  37. package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
  38. package/lib/Select/GroupSelect.js +99 -76
  39. package/lib/Select/Select.js +102 -75
  40. package/lib/Select/Select.module.css +6 -0
  41. package/lib/Select/SelectWithAvatar.js +96 -71
  42. package/lib/Select/SelectWithIcon.js +97 -74
  43. package/lib/Tab/Tabs.js +67 -44
  44. package/lib/Tab/Tabs.module.css +2 -1
  45. package/lib/Tag/Tag.js +1 -1
  46. package/lib/Tag/Tag.module.css +6 -2
  47. package/lib/Tooltip/Tooltip.js +1 -1
  48. package/lib/index.js +10 -1
  49. package/package.json +3 -3
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
4
4
  /**** Components ****/
5
5
 
6
6
  import Popup from '../Popup/Popup';
7
- import DropBox from '../DropBox/DropBox';
8
7
  import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
9
8
  import { Container, Box } from '../Layout';
10
9
  import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
@@ -14,6 +13,8 @@ import EmptyState from './EmptyState';
14
13
  import MultiSelectHeader from './MultiSelectHeader';
15
14
  import CssProvider from '../Provider/CssProvider';
16
15
  import { getUniqueId } from '../Provider/IdProvider';
16
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
17
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
17
18
  /**** Icons ****/
18
19
 
19
20
  import Icon from '@zohodesk/icons/lib/Icon';
@@ -829,6 +830,17 @@ export class MultiSelectComponent extends React.Component {
829
830
  });
830
831
  }
831
832
 
833
+ responsiveFunc(_ref) {
834
+ let {
835
+ mediaQueryOR
836
+ } = _ref;
837
+ return {
838
+ tabletMode: mediaQueryOR([{
839
+ maxWidth: 700
840
+ }])
841
+ };
842
+ }
843
+
832
844
  render() {
833
845
  let {
834
846
  isReadOnly,
@@ -978,60 +990,73 @@ export class MultiSelectComponent extends React.Component {
978
990
  size: "15"
979
991
  })) : null, children ? /*#__PURE__*/React.createElement(Box, {
980
992
  dataId: `${dataId}_children`
981
- }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
982
- animationStyle: animationStyle,
983
- boxPosition: position || `${defaultDropBoxPosition}`,
984
- getRef: getContainerRef,
985
- isActive: isPopupReady,
986
- isAnimate: isAnimate,
987
- isArrow: false,
988
- onClick: removeClose,
989
- needResponsive: needResponsive,
990
- isPadding: false,
991
- isBoxPaddingNeed: isBoxPaddingNeed,
992
- palette: palette,
993
- htmlId: setAriaId,
994
- a11y: {
995
- role: 'listbox',
996
- ariaMultiselectable: true
997
- },
998
- size: boxSize
999
- }, /*#__PURE__*/React.createElement(Card, {
1000
- customClass: `${style.box} ${style[`${palette}Box`]}`,
1001
- onScroll: this.handleScroll
1002
- }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
1003
- needSelectAll: needSelectAll,
1004
- onSelect: this.handleSelectAll,
1005
- selectAllText: selectAllText,
1006
- suggestions: suggestions,
1007
- dataId: dataId
1008
- })), /*#__PURE__*/React.createElement(CardContent, {
1009
- customClass: dropBoxSize ? style[dropBoxSize] : '',
1010
- eleRef: this.suggestionContainerRef
1011
- }, isSearching ? /*#__PURE__*/React.createElement("div", {
1012
- className: style[palette]
1013
- }, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
1014
- suggestions: suggestions,
1015
- getRef: this.suggestionItemRef,
1016
- hoverOption: hoverOption,
1017
- onClick: this.handleSelectOption,
1018
- onMouseEnter: this.handleMouseEnter,
1019
- needBorder: false,
1020
- dataId: `${dataId}_Options`,
1021
- palette: palette,
1022
- a11y: {
1023
- role: 'option'
1024
- }
1025
- }) : /*#__PURE__*/React.createElement(EmptyState, {
1026
- isLoading: isFetchingOptions,
1027
- options: options,
1028
- searchString: searchStr,
1029
- suggestions: suggestions,
1030
- dataId: dataId,
1031
- palette: palette,
1032
- i18nKeys: i18nKeys,
1033
- htmlId: ariaErrorId
1034
- })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : null);
993
+ }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
994
+ query: this.responsiveFunc,
995
+ responsiveId: "Helmet"
996
+ }, _ref2 => {
997
+ let {
998
+ tabletMode
999
+ } = _ref2;
1000
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
1001
+ animationStyle: animationStyle,
1002
+ boxPosition: position || `${defaultDropBoxPosition}`,
1003
+ getRef: getContainerRef,
1004
+ isActive: isPopupReady,
1005
+ isAnimate: isAnimate,
1006
+ isArrow: false,
1007
+ onClick: removeClose,
1008
+ needResponsive: needResponsive,
1009
+ isPadding: false,
1010
+ isBoxPaddingNeed: isBoxPaddingNeed,
1011
+ palette: palette,
1012
+ htmlId: setAriaId,
1013
+ a11y: {
1014
+ role: 'listbox',
1015
+ ariaMultiselectable: true
1016
+ },
1017
+ size: boxSize,
1018
+ alignBox: "row",
1019
+ isResponsivePadding: getFooter ? false : true
1020
+ }, /*#__PURE__*/React.createElement(Box, {
1021
+ flexible: true
1022
+ }, /*#__PURE__*/React.createElement(Card, {
1023
+ customClass: `${style.box} ${style[`${palette}Box`]}`,
1024
+ onScroll: this.handleScroll
1025
+ }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
1026
+ needSelectAll: needSelectAll,
1027
+ onSelect: this.handleSelectAll,
1028
+ selectAllText: selectAllText,
1029
+ suggestions: suggestions,
1030
+ dataId: dataId
1031
+ })), /*#__PURE__*/React.createElement(CardContent, {
1032
+ shrink: true,
1033
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
1034
+ eleRef: this.suggestionContainerRef
1035
+ }, isSearching ? /*#__PURE__*/React.createElement("div", {
1036
+ className: style[palette]
1037
+ }, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
1038
+ suggestions: suggestions,
1039
+ getRef: this.suggestionItemRef,
1040
+ hoverOption: hoverOption,
1041
+ onClick: this.handleSelectOption,
1042
+ onMouseEnter: this.handleMouseEnter,
1043
+ needBorder: false,
1044
+ dataId: `${dataId}_Options`,
1045
+ palette: palette,
1046
+ a11y: {
1047
+ role: 'option'
1048
+ }
1049
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
1050
+ isLoading: isFetchingOptions,
1051
+ options: options,
1052
+ searchString: searchStr,
1053
+ suggestions: suggestions,
1054
+ dataId: dataId,
1055
+ palette: palette,
1056
+ i18nKeys: i18nKeys,
1057
+ htmlId: ariaErrorId
1058
+ })), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
1059
+ }) : null);
1035
1060
  }
1036
1061
 
1037
1062
  }
@@ -101,7 +101,9 @@
101
101
  [dir=rtl] .container.medium .tag {
102
102
  margin: var(--zd_size5) 0 0 var(--zd_size10);
103
103
  }
104
-
104
+ .responsiveParent{
105
+ width: 100%;
106
+ }
105
107
  .box {
106
108
  background: var(--zdt_multiselect_box_bg);
107
109
  }
@@ -191,3 +193,6 @@
191
193
  [dir=rtl] .clearIconSpace {
192
194
  padding-left: var(--zd_size37)
193
195
  }
196
+ .search{
197
+ padding: 0px 20px;
198
+ }
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
5
5
 
6
6
  import { MultiSelectComponent } from './MultiSelect';
7
7
  import Popup from '../Popup/Popup';
8
- import DropBox from '../DropBox/DropBox';
9
8
  import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
10
9
  import { Container, Box } from '../Layout';
11
10
  import Card, { CardContent, CardHeader } from '../Card/Card';
@@ -15,6 +14,8 @@ import EmptyState from './EmptyState';
15
14
  import MultiSelectHeader from './MultiSelectHeader';
16
15
  import CssProvider from '../Provider/CssProvider';
17
16
  import { getUniqueId } from '../Provider/IdProvider';
17
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
18
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
18
19
  /**** Icons ****/
19
20
 
20
21
  import Icon from '@zohodesk/icons/lib/Icon';
@@ -52,6 +53,17 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
52
53
  });
53
54
  }
54
55
 
56
+ responsiveFunc(_ref) {
57
+ let {
58
+ mediaQueryOR
59
+ } = _ref;
60
+ return {
61
+ tabletMode: mediaQueryOR([{
62
+ maxWidth: 700
63
+ }])
64
+ };
65
+ }
66
+
55
67
  render() {
56
68
  let {
57
69
  isReadOnly,
@@ -189,57 +201,70 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
189
201
  }, /*#__PURE__*/React.createElement(Icon, {
190
202
  name: "ZD-delete",
191
203
  size: "15"
192
- })) : null)))), popUpState ? /*#__PURE__*/React.createElement(DropBox, {
193
- animationStyle: animationStyle,
194
- boxPosition: position || `${defaultDropBoxPosition}Center`,
195
- getRef: getContainerRef,
196
- isActive: isPopupReady,
197
- isAnimate: isAnimate,
198
- isArrow: false,
199
- onClick: removeClose,
200
- needResponsive: needResponsive,
201
- isPadding: false,
202
- isBoxPaddingNeed: isBoxPaddingNeed,
203
- palette: palette,
204
- htmlId: setAriaId,
205
- a11y: {
206
- ariaMultiselectable: true,
207
- role: 'listbox'
208
- }
209
- }, /*#__PURE__*/React.createElement(Card, {
210
- customClass: `${style.box} ${style[`${palette}Box`]}`,
211
- onScroll: this.handleScroll
212
- }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
213
- needSelectAll: needSelectAll,
214
- onSelect: this.handleSelectAll,
215
- selectAllText: selectAllText,
216
- suggestions: suggestions,
217
- dataId: dataId
218
- })), /*#__PURE__*/React.createElement(CardContent, {
219
- customClass: dropBoxSize ? style[dropBoxSize] : '',
220
- eleRef: this.suggestionContainerRef
221
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
222
- suggestions: suggestions,
223
- getRef: this.suggestionItemRef,
224
- hoverOption: hoverOption,
225
- onClick: this.handleSelectOption,
226
- onMouseEnter: this.handleMouseEnter,
227
- needBorder: false,
228
- dataId: `${dataId}_Options`,
229
- palette: palette,
230
- a11y: {
231
- role: 'option'
232
- }
233
- }) : /*#__PURE__*/React.createElement(EmptyState, {
234
- isLoading: isFetchingOptions,
235
- options: options,
236
- searchString: searchStr,
237
- suggestions: suggestions,
238
- dataId: dataId,
239
- palette: palette,
240
- i18nKeys: i18nKeys,
241
- htmlId: ariaErrorId
242
- })))) : null);
204
+ })) : null)))), popUpState ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
205
+ query: this.responsiveFunc,
206
+ responsiveId: "Helmet"
207
+ }, _ref2 => {
208
+ let {
209
+ tabletMode
210
+ } = _ref2;
211
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
212
+ animationStyle: animationStyle,
213
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
214
+ getRef: getContainerRef,
215
+ isActive: isPopupReady,
216
+ isAnimate: isAnimate,
217
+ isArrow: false,
218
+ onClick: removeClose,
219
+ needResponsive: needResponsive,
220
+ isPadding: false,
221
+ isBoxPaddingNeed: isBoxPaddingNeed,
222
+ palette: palette,
223
+ htmlId: setAriaId,
224
+ a11y: {
225
+ ariaMultiselectable: true,
226
+ role: 'listbox'
227
+ },
228
+ isResponsivePadding: true,
229
+ alignBox: "row"
230
+ }, /*#__PURE__*/React.createElement(Box, {
231
+ flexible: true
232
+ }, /*#__PURE__*/React.createElement(Card, {
233
+ customClass: `${style.box} ${style[`${palette}Box`]}`,
234
+ onScroll: this.handleScroll
235
+ }, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
236
+ needSelectAll: needSelectAll,
237
+ onSelect: this.handleSelectAll,
238
+ selectAllText: selectAllText,
239
+ suggestions: suggestions,
240
+ dataId: dataId
241
+ })), /*#__PURE__*/React.createElement(CardContent, {
242
+ shrink: true,
243
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
244
+ eleRef: this.suggestionContainerRef
245
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
246
+ suggestions: suggestions,
247
+ getRef: this.suggestionItemRef,
248
+ hoverOption: hoverOption,
249
+ onClick: this.handleSelectOption,
250
+ onMouseEnter: this.handleMouseEnter,
251
+ needBorder: false,
252
+ dataId: `${dataId}_Options`,
253
+ palette: palette,
254
+ a11y: {
255
+ role: 'option'
256
+ }
257
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
258
+ isLoading: isFetchingOptions,
259
+ options: options,
260
+ searchString: searchStr,
261
+ suggestions: suggestions,
262
+ dataId: dataId,
263
+ palette: palette,
264
+ i18nKeys: i18nKeys,
265
+ htmlId: ariaErrorId
266
+ })))));
267
+ }) : null);
243
268
  }
244
269
 
245
270
  }
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Popup from '../Popup/Popup';
4
- import DropBox from '../DropBox/DropBox';
4
+ import { Box } from '../Layout';
5
+ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
5
6
  import style from './PopOver.module.css';
6
7
 
7
8
  class PopOver extends React.Component {
@@ -239,7 +240,7 @@ export class PopOverContainer extends React.Component {
239
240
  animationStyle,
240
241
  getRef
241
242
  } = this.props;
242
- return /*#__PURE__*/React.createElement(DropBox, {
243
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
243
244
  animationStyle: animationStyle,
244
245
  arrowBottom: arrowBottom,
245
246
  arrowLeft: arrowLeft,
@@ -255,8 +256,13 @@ export class PopOverContainer extends React.Component {
255
256
  left: left,
256
257
  right: right,
257
258
  size: size,
258
- top: top
259
- }, children);
259
+ top: top,
260
+ alignBox: "row"
261
+ }, /*#__PURE__*/React.createElement(Box, {
262
+ flexible: true,
263
+ shrink: true,
264
+ scroll: "vertical"
265
+ }, children));
260
266
  }
261
267
 
262
268
  }
package/es/Provider.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import AppContainer from './AppContainer/AppContainer';
3
3
  import { Container } from './Layout';
4
+ import ThemeTool from '../../common/lib/ThemeTool/ThemeTool';
4
5
  /* default mode & theme css */
5
6
 
6
7
  import '../assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css';
@@ -51,6 +52,7 @@ export default class Provider extends React.Component {
51
52
  themeName: 'blue'
52
53
  };
53
54
  this.setTheme = this.setTheme.bind(this);
55
+ this.setAppearance = this.setAppearance.bind(this);
54
56
  }
55
57
 
56
58
  setAppearance(mode) {
@@ -70,51 +72,6 @@ export default class Provider extends React.Component {
70
72
  appearanceName,
71
73
  themeName
72
74
  } = this.state;
73
- let themeClass = {
74
- width: '20px',
75
- height: '20px',
76
- borderRadius: '3px',
77
- display: 'flex',
78
- border: '1px solid #ccc',
79
- margin: '0 5px',
80
- cursor: 'pointer',
81
- backgroundColor: '#0a73eb'
82
- };
83
- let green = {
84
- backgroundColor: '#26a942'
85
- };
86
- let red = {
87
- backgroundColor: '#de3535'
88
- };
89
- let orange = {
90
- backgroundColor: '#e57717'
91
- };
92
- let yellow = {
93
- backgroundColor: '#e8b923'
94
- };
95
- let light = {
96
- backgroundColor: '#fff'
97
- };
98
- let night = {
99
- backgroundColor: '#232b38'
100
- };
101
- let dark = {
102
- backgroundColor: '#212121'
103
- };
104
- let fixedPosition = {
105
- position: 'fixed',
106
- bottom: '0',
107
- backgroundColor: '#272727',
108
- padding: '10px',
109
- borderRadius: '15px 15px 0 0',
110
- minWidth: '100px',
111
- textAlign: 'center',
112
- boxShadow: '0 0 3px #000',
113
- fontSize: '12px',
114
- zIndex: '3',
115
- display: 'flex',
116
- alignItems: 'center'
117
- };
118
75
  return /*#__PURE__*/React.createElement(LibraryContext.Provider, {
119
76
  value: {
120
77
  isReducedMotion: false,
@@ -129,66 +86,9 @@ export default class Provider extends React.Component {
129
86
  }
130
87
  }, /*#__PURE__*/React.createElement(Container, {
131
88
  scroll: "vertical"
132
- }, this.props.children), /*#__PURE__*/React.createElement("div", {
133
- style: Object.assign({}, fixedPosition, {
134
- left: '20%',
135
- transform: 'translate(-20%)'
136
- })
137
- }, /*#__PURE__*/React.createElement("div", {
138
- style: {
139
- color: '#fff'
140
- }
141
- }, "Appearance:"), /*#__PURE__*/React.createElement("div", {
142
- style: {
143
- display: 'flex'
144
- }
145
- }, /*#__PURE__*/React.createElement("span", {
146
- title: "Light Mode",
147
- style: Object.assign({}, themeClass, light),
148
- onClick: () => this.setAppearance('default')
149
- }), /*#__PURE__*/React.createElement("span", {
150
- title: "Night Mode",
151
- style: Object.assign({}, themeClass, night),
152
- onClick: () => this.setAppearance('dark')
153
- }), /*#__PURE__*/React.createElement("span", {
154
- title: "Dark Mode",
155
- style: Object.assign({}, themeClass, dark),
156
- onClick: () => this.setAppearance('pureDark')
157
- }))), /*#__PURE__*/React.createElement("div", {
158
- style: Object.assign({}, fixedPosition, {
159
- left: '80%',
160
- transform: 'translate(-80%)'
161
- })
162
- }, /*#__PURE__*/React.createElement("div", {
163
- style: {
164
- color: '#fff'
165
- }
166
- }, "Themes:"), /*#__PURE__*/React.createElement("div", {
167
- style: {
168
- display: 'flex'
169
- }
170
- }, /*#__PURE__*/React.createElement("span", {
171
- title: "Blue Theme",
172
- style: themeClass,
173
- onClick: () => this.setTheme('blue')
174
- }), /*#__PURE__*/React.createElement("span", {
175
- title: "Green Theme",
176
- style: Object.assign({}, themeClass, green),
177
- onClick: () => this.setTheme('green')
178
- }), /*#__PURE__*/React.createElement("span", {
179
- title: "Red Theme",
180
- style: Object.assign({}, themeClass, red),
181
- onClick: () => this.setTheme('red')
182
- }), /*#__PURE__*/React.createElement("span", {
183
- title: "Orange Theme",
184
- style: Object.assign({}, themeClass, orange),
185
- onClick: () => this.setTheme('orange')
186
- }), /*#__PURE__*/React.createElement("span", {
187
- title: "Yellow Theme",
188
- style: Object.assign({}, themeClass, yellow),
189
- onClick: () => this.setTheme('yellow')
190
- }))), /*#__PURE__*/React.createElement("div", {
191
- "data-portal": "portal1"
89
+ }, this.props.children), /*#__PURE__*/React.createElement(ThemeTool, {
90
+ onThemeChange: this.setTheme,
91
+ onAppearanceChange: this.setAppearance
192
92
  })));
193
93
  }
194
94
 
@@ -0,0 +1,74 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React, { Component } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import DropBox from '../DropBox/DropBox';
6
+ import { Container } from '../Layout';
7
+ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
8
+ import style from './ResponsiveDropBox.module.css';
9
+ export default class ResponsiveDropBox extends Component {
10
+ constructor(props) {
11
+ super(props);
12
+ this.responsiveFunc = this.responsiveFunc.bind(this);
13
+ }
14
+
15
+ responsiveFunc(_ref) {
16
+ let {
17
+ mediaQueryOR
18
+ } = _ref;
19
+ return {
20
+ tabletMode: mediaQueryOR([{
21
+ maxWidth: 700
22
+ }])
23
+ };
24
+ }
25
+
26
+ render() {
27
+ const {
28
+ children,
29
+ customClass = {},
30
+ isResponsivePadding,
31
+ alignBox
32
+ } = this.props;
33
+ const {
34
+ customDropBox = '',
35
+ customMobileDropBox = '',
36
+ customDropBoxWrap = '',
37
+ customMobileDropBoxWrap = '',
38
+ customResponsiveContainer = ''
39
+ } = customClass;
40
+ const dropBoxClasses = {
41
+ customDropBox: `${customDropBox}`,
42
+ customMobileDropBox: `${customMobileDropBox}`,
43
+ customDropBoxWrap: `${customDropBoxWrap}`,
44
+ customMobileDropBoxWrap: `${customMobileDropBoxWrap}`,
45
+ customResponsiveContainer: `${customResponsiveContainer}`
46
+ };
47
+ return /*#__PURE__*/React.createElement(DropBox, _extends({}, this.props, {
48
+ customClass: dropBoxClasses
49
+ }), /*#__PURE__*/React.createElement(ResponsiveReceiver, {
50
+ query: this.responsiveFunc,
51
+ responsiveId: "Helmet"
52
+ }, _ref2 => {
53
+ let {
54
+ tabletMode
55
+ } = _ref2;
56
+ return /*#__PURE__*/React.createElement(Container, {
57
+ alignBox: alignBox,
58
+ isCover: false,
59
+ className: `${tabletMode ? style.dropBoxContainer : ''} ${tabletMode && isResponsivePadding ? style.boxPadding : ''} ${customResponsiveContainer}`
60
+ }, children);
61
+ }));
62
+ }
63
+
64
+ }
65
+ ResponsiveDropBox.propTypes = {
66
+ children: PropTypes.element,
67
+ customClass: PropTypes.object,
68
+ isResponsivePadding: PropTypes.bool,
69
+ alignBox: PropTypes.oneOf(['column', 'row'])
70
+ };
71
+ ResponsiveDropBox.defaultProps = {
72
+ isResponsivePadding: false,
73
+ alignBox: 'column'
74
+ };
@@ -0,0 +1,6 @@
1
+ .dropBoxContainer {
2
+ max-height: 70vh;
3
+ }
4
+ .boxPadding{
5
+ padding-bottom: var(--zd_size10);
6
+ }