@zohodesk/components 1.0.0-alpha-263 → 1.0.0-alpha-264

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 (53) hide show
  1. package/README.md +5 -0
  2. package/css_error.log +1 -0
  3. package/es/DropBox/DropBox.js +69 -243
  4. package/es/DropBox/DropBoxElement/DropBoxElement.js +118 -0
  5. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +432 -0
  6. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +89 -0
  7. package/es/DropBox/DropBoxElement/props/defaultProps.js +18 -0
  8. package/es/DropBox/DropBoxElement/props/propTypes.js +45 -0
  9. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +51 -0
  10. package/es/DropBox/css/DropBox.module.css +59 -0
  11. package/es/DropBox/css/cssJSLogic.js +14 -0
  12. package/es/DropBox/props/defaultProps.js +9 -17
  13. package/es/DropBox/props/propTypes.js +9 -43
  14. package/es/css.js +2 -1
  15. package/es/utils/css/mergeStyle.js +2 -1
  16. package/lib/DropBox/DropBox.js +67 -276
  17. package/lib/DropBox/DropBoxElement/DropBoxElement.js +117 -0
  18. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +432 -0
  19. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +72 -0
  20. package/lib/DropBox/DropBoxElement/props/defaultProps.js +25 -0
  21. package/lib/DropBox/DropBoxElement/props/propTypes.js +53 -0
  22. package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +55 -0
  23. package/lib/DropBox/css/DropBox.module.css +59 -0
  24. package/lib/DropBox/css/cssJSLogic.js +18 -0
  25. package/lib/DropBox/props/defaultProps.js +15 -19
  26. package/lib/DropBox/props/propTypes.js +15 -45
  27. package/lib/css.js +2 -1
  28. package/lib/utils/css/mergeStyle.js +2 -1
  29. package/package.json +1 -1
  30. package/docs/external/active-line.js +0 -72
  31. package/docs/external/autorefresh.js +0 -47
  32. package/docs/external/codemirror.js +0 -9681
  33. package/docs/external/css/hopscotch.css +0 -576
  34. package/docs/external/css/styleGuide.css +0 -1100
  35. package/docs/external/css.js +0 -466
  36. package/docs/external/designTokens.js +0 -1
  37. package/docs/external/foldcode.js +0 -152
  38. package/docs/external/format.js +0 -129
  39. package/docs/external/htmlmixed.js +0 -84
  40. package/docs/external/images/bottom.png +0 -0
  41. package/docs/external/images/bottombg.jpg +0 -0
  42. package/docs/external/images/desk.png +0 -0
  43. package/docs/external/images/desklogo.png +0 -0
  44. package/docs/external/images/menu.png +0 -0
  45. package/docs/external/index.html +0 -127
  46. package/docs/external/javascript.js +0 -422
  47. package/docs/external/jsx.js +0 -148
  48. package/docs/external/matchbrackets.js +0 -145
  49. package/docs/external/xml.js +0 -322
  50. package/docs/package.json +0 -41
  51. package/docs/src/index.js +0 -1311
  52. package/es/DropBox/DropBox.module.css +0 -405
  53. package/lib/DropBox/DropBox.module.css +0 -405
@@ -0,0 +1,432 @@
1
+ .main {
2
+ z-index: 3;
3
+ composes: varClass from '../../css/DropBox.module.css';
4
+ }
5
+
6
+ .container {
7
+ position: absolute;
8
+ }
9
+
10
+ .fixedContainer {
11
+ position: fixed;
12
+ }
13
+
14
+ .subContainer {
15
+ position: relative;
16
+ border-radius: var(--dropbox_border_radius);
17
+ padding: var(--dropbox_padding);
18
+ box-shadow: var(--dropbox_box_shadow);
19
+ }
20
+
21
+ .defaultPalette, .darkPalette {
22
+ background-color: var(--dropbox_bg_color);
23
+ }
24
+
25
+ .radius {
26
+ --dropbox_border_radius: 3px;
27
+ }
28
+
29
+ .mobRadius {
30
+ --dropbox_border_radius: 30px 30px 0 0;
31
+ --dropbox_padding: var(--zd_size10) 0 0 0;
32
+ }
33
+
34
+ /* sizes */
35
+ .mini {
36
+ width: var(--zd_size140);
37
+ }
38
+
39
+ .xmini {
40
+ width: var(--zd_size160);
41
+ }
42
+
43
+ .xsmall {
44
+ width: var(--zd_size180);
45
+ }
46
+
47
+ .small {
48
+ width: var(--zd_size200);
49
+ }
50
+
51
+ .medium {
52
+ width: var(--zd_size220);
53
+ }
54
+
55
+ .large {
56
+ width: var(--zd_size260);
57
+ }
58
+
59
+ .mlarge {
60
+ width: var(--zd_size280);
61
+ }
62
+
63
+ .xlarge {
64
+ width: var(--zd_size304);
65
+ }
66
+
67
+ .xxlarge {
68
+ width: var(--zd_size364);
69
+ }
70
+
71
+ .default {
72
+ width: 100%;
73
+ }
74
+
75
+ /* shadow */
76
+ .top_shadow {
77
+ --dropbox_box_shadow: 0 -3px 30px var(--zdt_dropbox_default_box_shadow);
78
+ }
79
+
80
+ .left_shadow {
81
+ --dropbox_box_shadow: -4px 0 30px var(--zdt_dropbox_default_box_shadow);
82
+ }
83
+
84
+ .right_shadow {
85
+ --dropbox_box_shadow: 4px 0 30px var(--zdt_dropbox_default_box_shadow);
86
+ }
87
+
88
+ .bottom_shadow {
89
+ --dropbox_box_shadow: 0 3px 30px var(--zdt_dropbox_default_box_shadow);
90
+ }
91
+
92
+ [dir=ltr] .defaultShadow {
93
+ box-shadow: 4px 3px 30px var(--zdt_dropbox_default_box_shadow);
94
+ }
95
+
96
+ [dir=rtl] .defaultShadow {
97
+ box-shadow: -4px 3px 30px var(--zdt_dropbox_default_box_shadow);
98
+ }
99
+
100
+ /* box direction styles */
101
+ .topStart {
102
+ bottom: 100%;
103
+ right: 0;
104
+ }
105
+
106
+ .topEnd {
107
+ bottom: 100%;
108
+ left: 0;
109
+ }
110
+
111
+ .topMid {
112
+ bottom: 100%;
113
+ left: 50%;
114
+ transform: translateX(-50%);
115
+ }
116
+
117
+ .bottomStart {
118
+ top: 100%;
119
+ right: 0;
120
+ }
121
+
122
+ .bottomEnd {
123
+ top: 100%;
124
+ left: 0;
125
+ }
126
+
127
+ .bottomMid {
128
+ top: 100%;
129
+ left: 50%;
130
+ transform: translateX(-50%);
131
+ }
132
+
133
+ .rightStart {
134
+ left: 100%;
135
+ bottom: 0;
136
+ }
137
+
138
+ .rightEnd {
139
+ left: 100%;
140
+ top: 0;
141
+ }
142
+
143
+ .rightMid {
144
+ left: 100%;
145
+ top: 50%;
146
+ transform: translateY(-50%);
147
+ }
148
+
149
+ .leftStart {
150
+ right: 100%;
151
+ bottom: 0;
152
+ }
153
+
154
+ .leftEnd {
155
+ right: 100%;
156
+ top: 0;
157
+ }
158
+
159
+ .leftMid {
160
+ right: 100%;
161
+ top: 50%;
162
+ transform: translateY(-50%);
163
+ }
164
+
165
+ /* space for arrow */
166
+ .arrowtop {
167
+ padding-bottom: var(--zd_size10);
168
+ }
169
+
170
+ .arrowright {
171
+ padding-left: var(--zd_size10);
172
+ }
173
+
174
+ .arrowleft {
175
+ padding-right: var(--zd_size10);
176
+ }
177
+
178
+ .arrowbottom {
179
+ padding-top: var(--zd_size10);
180
+ }
181
+
182
+ /* space from target */
183
+ .paddingSpace_top {
184
+ padding-bottom: var(--zd_size5);
185
+ }
186
+
187
+ .paddingSpace_right {
188
+ padding-left: var(--zd_size5);
189
+ }
190
+
191
+ .paddingSpace_left {
192
+ padding-right: var(--zd_size5);
193
+ }
194
+
195
+ .paddingSpace_bottom {
196
+ padding-top: var(--zd_size5);
197
+ }
198
+
199
+ .arrow {
200
+ position: absolute;
201
+ height: var(--zd_size34);
202
+ width: var(--zd_size34);
203
+ clip: rect(var(--zd_size3),
204
+ var(--zd_size29),
205
+ var(--zd_size17),
206
+ var(--zd_size8));
207
+ padding: var(--zd_size4);
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ }
212
+
213
+ .arrowShape {
214
+ height: var(--zd_size10);
215
+ width: var(--zd_size10);
216
+ box-shadow: 1px -1px 2px 0 var(--dropbox_arrow_box_shadow_color);
217
+ background-color: var(--dropbox_bg_color);
218
+ -webkit-transform: rotateZ(-45deg);
219
+ transform: rotateZ(-45deg);
220
+ }
221
+
222
+ /* arrow placement styles */
223
+ .start,
224
+ .end,
225
+ .mid {
226
+ composes: arrow;
227
+ }
228
+
229
+ .top .start,
230
+ .top .end,
231
+ .top .mid {
232
+ bottom: calc(var(--zd_size17) * -1);
233
+ }
234
+
235
+ .top .start {
236
+ left: var(--zd_size28);
237
+ }
238
+
239
+ .top .end {
240
+ right: var(--zd_size28);
241
+ transform: rotate(180deg) translateX(-50%);
242
+ }
243
+
244
+ .top .mid {
245
+ left: 50%;
246
+ }
247
+
248
+ .top .start,
249
+ .top .mid {
250
+ transform: rotate(180deg) translateX(50%);
251
+ }
252
+
253
+ .bottom .start,
254
+ .bottom .end,
255
+ .bottom .mid {
256
+ top: calc(var(--zd_size17) * -1);
257
+ }
258
+
259
+ .bottom .start {
260
+ left: var(--zd_size28);
261
+ }
262
+
263
+ .bottom .mid {
264
+ left: 50%;
265
+ }
266
+
267
+ .bottom .end {
268
+ right: var(--zd_size28);
269
+ transform: translateX(50%);
270
+ }
271
+
272
+ .bottom .mid,
273
+ .bottom .start {
274
+ transform: translateX(-50%);
275
+ }
276
+
277
+ .left .start,
278
+ .left .mid,
279
+ .left .end {
280
+ right: calc(var(--zd_size17) * -1);
281
+ }
282
+
283
+ .left .start {
284
+ top: var(--zd_size28);
285
+ }
286
+
287
+ .left .end {
288
+ transform: rotate(90deg) translateX(50%);
289
+ bottom: var(--zd_size28);
290
+ }
291
+
292
+ .left .mid {
293
+ top: 50%;
294
+ }
295
+
296
+ .left .start,
297
+ .left .mid {
298
+ transform: rotate(90deg) translateX(-50%);
299
+ }
300
+
301
+ .right .start,
302
+ .right .mid,
303
+ .right .end {
304
+ left: calc(var(--zd_size17) * -1);
305
+ }
306
+
307
+ .right .start {
308
+ top: var(--zd_size28);
309
+ }
310
+
311
+ .right .mid {
312
+ top: 50%;
313
+ }
314
+
315
+ .right .start,
316
+ .right .mid {
317
+ transform: rotate(-90deg) translateX(50%);
318
+ }
319
+
320
+ .right .end {
321
+ bottom: var(--zd_size28);
322
+ transform: rotate(-90deg) translateX(-50%);
323
+ }
324
+ .hidden {
325
+ visibility: hidden;
326
+ opacity: 0;
327
+ z-index: 0;
328
+ pointer-events: none;
329
+ }
330
+
331
+ .hidden .subContainer {
332
+ box-shadow: none;
333
+ }
334
+
335
+ [dir=ltr] .animationBasic {
336
+ animation-duration: var(--zd_transition2);
337
+ }
338
+
339
+ [dir=rtl] .animationBasic {
340
+ animation-duration: var(--zd_transition2);
341
+ }
342
+
343
+ .fadeIn {
344
+ composes: animationBasic;
345
+ composes: fadeInScale modeForward from '../../../common/animation.module.css';
346
+ }
347
+
348
+ .bounce {
349
+ composes: animationBasic;
350
+ }
351
+
352
+ [dir=ltr] .bounce {
353
+ animation-name: animation;
354
+ animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
355
+ }
356
+
357
+ [dir=rtl] .bounce {
358
+ animation-name: animation;
359
+ animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
360
+ }
361
+
362
+ .slideUp {
363
+ composes: modeForward from '../../../common/animation.module.css';
364
+ }
365
+
366
+ [dir=ltr] .slideUp {
367
+ animation-duration: var(--zd_transition3);
368
+ animation-name: slideUp;
369
+ animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1);
370
+ }
371
+
372
+ [dir=rtl] .slideUp {
373
+ animation-duration: var(--zd_transition3);
374
+ animation-name: slideUp;
375
+ animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1);
376
+ }
377
+
378
+ @keyframes animation {
379
+ 0% {
380
+ transform: scaleY(0.6) perspective(1px);
381
+ opacity: 0;
382
+ transform-origin: top center;
383
+ }
384
+
385
+ 100% {
386
+ transform-origin: top center;
387
+ opacity: 1;
388
+ transform: scaleY(1) perspective(1px);
389
+ }
390
+ }
391
+
392
+ @keyframes slideUp {
393
+ 0% {
394
+ transform: translateY(90%) perspective(1px);
395
+ }
396
+
397
+ 100% {
398
+ transform: translateY(0%) perspective(1px);
399
+ }
400
+ }
401
+
402
+ .responsive {
403
+ position: absolute;
404
+ bottom: 0;
405
+ width: 100%;
406
+ max-height: 90%;
407
+ }
408
+
409
+ [dir=ltr] .responsive {
410
+ left: 0;
411
+ }
412
+
413
+ [dir=rtl] .responsive {
414
+ right: 0;
415
+ }
416
+
417
+ .closeBar {
418
+ height: 6px;
419
+ width: 20%;
420
+ border-radius: 5px;
421
+ background-color: var(--dropbox_mob_close_bg_color);
422
+ cursor: pointer;
423
+ margin: 0 auto var(--zd_size10);
424
+ }
425
+
426
+ .boxPadding {
427
+ --dropbox_padding: var(--zd_size10) 0;
428
+ }
429
+
430
+ .darkPalette {
431
+ --dropbox_bg_color: var(--zdt_dropbox_dark_bg);
432
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = cssJSLogic;
7
+ var _react = require("react");
8
+ var _LibraryContextInit = _interopRequireDefault(require("../../../Provider/LibraryContextInit"));
9
+ var _utils = require("../../../utils");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
+ function cssJSLogic(_ref) {
16
+ var _compileClassNames, _compileClassNames2;
17
+ var props = _ref.props,
18
+ style = _ref.style,
19
+ customState = _ref.customState;
20
+ var DropBoxElementContext = (0, _react.useContext)(_LibraryContextInit["default"]);
21
+ var boxPosition = customState.boxPosition,
22
+ boxDirection = customState.boxDirection,
23
+ boxstyle = customState.boxstyle,
24
+ needBoxStyle = customState.needBoxStyle;
25
+ var _ref2 = DropBoxElementContext || {},
26
+ isReducedMotion = _ref2.isReducedMotion;
27
+ var isAnimate = props.isAnimate,
28
+ isArrow = props.isArrow,
29
+ size = props.size,
30
+ isRadius = props.isRadius,
31
+ animationStyle = props.animationStyle,
32
+ isActive = props.isActive,
33
+ isModel = props.isModel,
34
+ isAbsolutePositioningNeeded = props.isAbsolutePositioningNeeded,
35
+ isBoxPaddingNeed = props.isBoxPaddingNeed,
36
+ isPadding = props.isPadding,
37
+ customClass = props.customClass,
38
+ positionsOffset = props.positionsOffset,
39
+ targetOffset = props.targetOffset,
40
+ zIndexStyle = props.zIndexStyle,
41
+ customInlineStyle = props.customInlineStyle;
42
+ var _customClass$customDr = customClass.customDropBox,
43
+ customDropBox = _customClass$customDr === void 0 ? '' : _customClass$customDr,
44
+ _customClass$customMo = customClass.customMobileDropBox,
45
+ customMobileDropBox = _customClass$customMo === void 0 ? '' : _customClass$customMo,
46
+ _customClass$customDr2 = customClass.customDropBoxWrap,
47
+ customDropBoxWrap = _customClass$customDr2 === void 0 ? '' : _customClass$customDr2,
48
+ _customClass$customMo2 = customClass.customMobileDropBoxWrap,
49
+ customMobileDropBoxWrap = _customClass$customMo2 === void 0 ? '' : _customClass$customMo2;
50
+
51
+ // const {needBoxStyle,boxstyle} = useDropboxPosCalc(props)
52
+
53
+ var boxClassName = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.main, true), _defineProperty(_compileClassNames, style.hidden, !isActive), _defineProperty(_compileClassNames, style.responsive, !!isModel), _defineProperty(_compileClassNames, customMobileDropBoxWrap, !!isModel), _defineProperty(_compileClassNames, customDropBoxWrap, !isModel), _defineProperty(_compileClassNames, style.container, isAbsolutePositioningNeeded && !isModel), _defineProperty(_compileClassNames, style[boxPosition], isAbsolutePositioningNeeded && !isModel), _defineProperty(_compileClassNames, style.fixedContainer, !isAbsolutePositioningNeeded && !isModel), _defineProperty(_compileClassNames, style[size], size && !isModel), _defineProperty(_compileClassNames, style[boxDirection], !isModel && isActive && isArrow), _defineProperty(_compileClassNames, style["arrow".concat(boxDirection)], !isModel && isActive && isArrow && isAbsolutePositioningNeeded), _defineProperty(_compileClassNames, style["paddingSpace_".concat(boxDirection)], !isModel && isActive && !isArrow && isPadding), _compileClassNames));
54
+ var subContainerClass = (0, _utils.compileClassNames)((_compileClassNames2 = {}, _defineProperty(_compileClassNames2, style.subContainer, true), _defineProperty(_compileClassNames2, customMobileDropBox, !!isModel), _defineProperty(_compileClassNames2, style.mobRadius, !!isModel), _defineProperty(_compileClassNames2, style.slideUp, !!isModel && isActive), _defineProperty(_compileClassNames2, customDropBox, !isModel), _defineProperty(_compileClassNames2, style["".concat(boxDirection, "_shadow")], !isModel), _defineProperty(_compileClassNames2, style.boxPadding, !isModel && isBoxPaddingNeed), _defineProperty(_compileClassNames2, style.radius, !isModel && isRadius), _defineProperty(_compileClassNames2, style.fadeIn, !isModel && isAnimate && !isReducedMotion && isActive && animationStyle === 'default'), _defineProperty(_compileClassNames2, style.bounce, !isModel && isAnimate && !isReducedMotion && isActive && animationStyle === 'bounce'), _compileClassNames2));
55
+ var inlineStyle = !isModel ? isAbsolutePositioningNeeded ? needBoxStyle && boxstyle : positionsOffset && positionsOffset[boxPosition] || {} : {};
56
+ if (zIndexStyle) {
57
+ inlineStyle = Object.assign({}, inlineStyle, zIndexStyle);
58
+ }
59
+ if (!isModel && !isAbsolutePositioningNeeded && size === 'default' && targetOffset && isActive) {
60
+ inlineStyle = Object.assign({}, inlineStyle, {
61
+ width: targetOffset.width
62
+ });
63
+ }
64
+ if (customInlineStyle) {
65
+ inlineStyle = Object.assign({}, inlineStyle, customInlineStyle);
66
+ }
67
+ return {
68
+ boxClassName: boxClassName,
69
+ subContainerClass: subContainerClass,
70
+ inlineStyle: inlineStyle
71
+ };
72
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DropBoxElementDefaultProps = void 0;
7
+ var DropBoxElementDefaultProps = {
8
+ animationStyle: 'default',
9
+ boxPosition: 'bottomLeft',
10
+ dataId: 'dropBox',
11
+ dataSelectorId: 'dropBox',
12
+ isActive: false,
13
+ isAnimate: false,
14
+ isArrow: true,
15
+ isRadius: true,
16
+ size: 'default',
17
+ isAbsolutePositioningNeeded: true,
18
+ isBoxPaddingNeed: false,
19
+ isPadding: true,
20
+ customClass: {},
21
+ a11y: {},
22
+ palette: 'default',
23
+ customInlineStyle: false
24
+ };
25
+ exports.DropBoxElementDefaultProps = DropBoxElementDefaultProps;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DropBoxElementPropTypes = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ var DropBoxElementPropTypes = {
10
+ animationStyle: _propTypes["default"].oneOf(['default', 'bounce']),
11
+ arrowBottom: _propTypes["default"].number,
12
+ arrowLeft: _propTypes["default"].number,
13
+ arrowPosition: _propTypes["default"].oneOf(['start', 'mid', 'end']),
14
+ arrowRight: _propTypes["default"].number,
15
+ arrowTop: _propTypes["default"].number,
16
+ bottom: _propTypes["default"].number,
17
+ boxPosition: _propTypes["default"].oneOf(['bottomRight', 'bottomLeft', 'bottomCenter', 'topRight', 'topLeft', 'topCenter', 'rightTop', 'rightBottom', 'rightCenter', 'leftTop', 'leftBottom', 'leftCenter']),
18
+ children: _propTypes["default"].element,
19
+ dataId: _propTypes["default"].string,
20
+ dataSelectorId: _propTypes["default"].string,
21
+ forwardRef: _propTypes["default"].object,
22
+ getRef: _propTypes["default"].func,
23
+ isAbsolutePositioningNeeded: _propTypes["default"].bool,
24
+ isActive: _propTypes["default"].bool,
25
+ isAnimate: _propTypes["default"].bool,
26
+ isArrow: _propTypes["default"].bool,
27
+ isBoxPaddingNeed: _propTypes["default"].bool,
28
+ isPadding: _propTypes["default"].bool,
29
+ isRadius: _propTypes["default"].bool,
30
+ left: _propTypes["default"].number,
31
+ onClick: _propTypes["default"].func,
32
+ right: _propTypes["default"].number,
33
+ size: _propTypes["default"].oneOf(['mini', 'xmini', 'xsmall', 'small', 'medium', 'large', 'mlarge', 'xlarge', 'xxlarge', 'default']),
34
+ top: _propTypes["default"].number,
35
+ tourId: _propTypes["default"].string,
36
+ htmlId: _propTypes["default"].string,
37
+ tabIndex: _propTypes["default"].number,
38
+ customClass: _propTypes["default"].shape({
39
+ customDropBox: _propTypes["default"].string,
40
+ customMobileDropBox: _propTypes["default"].string,
41
+ customDropBoxWrap: _propTypes["default"].string,
42
+ customMobileDropBoxWrap: _propTypes["default"].string
43
+ }),
44
+ a11y: _propTypes["default"].shape({
45
+ role: _propTypes["default"].string,
46
+ ariaMultiselectable: _propTypes["default"].bool,
47
+ ariaLabelledby: _propTypes["default"].string
48
+ }),
49
+ palette: _propTypes["default"].oneOf(['default', 'dark']),
50
+ customStyle: _propTypes["default"].object,
51
+ customInlineStyle: _propTypes["default"].bool
52
+ };
53
+ exports.DropBoxElementPropTypes = DropBoxElementPropTypes;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = useDropboxPosCalc;
7
+ var _Common = require("../../utils/Common");
8
+ function useDropboxPosCalc(props) {
9
+ var right = props.right,
10
+ left = props.left,
11
+ top = props.top,
12
+ arrowRight = props.arrowRight,
13
+ arrowLeft = props.arrowLeft,
14
+ arrowTop = props.arrowTop,
15
+ arrowBottom = props.arrowBottom,
16
+ bottom = props.bottom,
17
+ isModel = props.isModel,
18
+ direction = props.direction;
19
+ var unit = 'rem';
20
+ var boxstyle = {};
21
+ var arrowstyle = {};
22
+ var needBoxStyle = right || left || top || bottom;
23
+ var needArrowStyle = arrowLeft || arrowRight || arrowTop || arrowBottom;
24
+ if (needBoxStyle) {
25
+ boxstyle = !isModel ? direction === 'rtl' ? {
26
+ right: [(0, _Common.remConvert)(left)] + unit,
27
+ left: [(0, _Common.remConvert)(right)] + unit,
28
+ top: [(0, _Common.remConvert)(top)] + unit,
29
+ bottom: [(0, _Common.remConvert)(bottom)] + unit
30
+ } : {
31
+ right: [(0, _Common.remConvert)(right)] + unit,
32
+ left: [(0, _Common.remConvert)(left)] + unit,
33
+ top: [(0, _Common.remConvert)(top)] + unit,
34
+ bottom: [(0, _Common.remConvert)(bottom)] + unit
35
+ } : {};
36
+ }
37
+ if (needArrowStyle) {
38
+ arrowstyle = !isModel ? direction === 'rtl' ? {
39
+ right: [(0, _Common.remConvert)(arrowLeft)] + unit,
40
+ left: [(0, _Common.remConvert)(arrowRight)] + unit,
41
+ top: [(0, _Common.remConvert)(arrowTop)] + unit,
42
+ bottom: [(0, _Common.remConvert)(arrowBottom)] + unit
43
+ } : {
44
+ right: [(0, _Common.remConvert)(arrowRight)] + unit,
45
+ left: [(0, _Common.remConvert)(arrowLeft)] + unit,
46
+ top: [(0, _Common.remConvert)(arrowTop)] + unit,
47
+ bottom: [(0, _Common.remConvert)(arrowBottom)] + unit
48
+ } : {};
49
+ }
50
+ return {
51
+ needBoxStyle: needBoxStyle,
52
+ boxstyle: boxstyle,
53
+ arrowstyle: arrowstyle
54
+ };
55
+ }
@@ -0,0 +1,59 @@
1
+ .varClass {
2
+ /* dropbox default variables */
3
+ --dropbox_bg_color: var(--zdt_dropbox_default_bg);
4
+ --dropbox_border_radius: 0;
5
+ --dropbox_padding: 0;
6
+ --dropbox_box_shadow: 0 3px 30px var(--zdt_dropbox_default_box_shadow);
7
+
8
+ /* dropbox arrow default variables */
9
+ --dropbox_arrow_box_shadow_color: var(--zdt_dropbox_arrow_shadow);
10
+
11
+ /* dropbox responsive default variables */
12
+ --dropbox_mob_bg_color: var(--zdt_dropbox_mob_bg);
13
+ --dropbox_mob_close_bg_color: var(--zdt_dropbox_mob_close_bg);
14
+ }
15
+
16
+ .activateInDelay {
17
+ composes: modeForward from '../../common/animation.module.css';
18
+ pointer-events: none;
19
+ }
20
+
21
+ [dir=ltr] .activateInDelay {
22
+ animation-duration: var(--zd_transition1);
23
+ animation-delay: var(--zd_transition2);
24
+ animation-name: activateInDelay;
25
+ }
26
+
27
+ [dir=rtl] .activateInDelay {
28
+ animation-duration: var(--zd_transition1);
29
+ animation-delay: var(--zd_transition2);
30
+ animation-name: activateInDelay;
31
+ }
32
+
33
+ .freezeLayer {
34
+ position: absolute;
35
+ top: 0;
36
+ bottom: 0;
37
+ composes: activateInDelay;
38
+ }
39
+
40
+ [dir=ltr] .freezeLayer {
41
+ left: 0;
42
+ right: 0;
43
+ }
44
+
45
+ [dir=rtl] .freezeLayer {
46
+ right: 0;
47
+ left: 0;
48
+ }
49
+
50
+ .freeze {
51
+ composes: varClass;
52
+ background: var(--dropbox_mob_bg_color);
53
+ }
54
+
55
+ @keyframes activateInDelay {
56
+ 100% {
57
+ pointer-events: initial;
58
+ }
59
+ }