@zohodesk/components 1.0.0-temp-242.1 → 1.0.0-temp-247
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.
- package/README.md +0 -16
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +198 -198
- package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +8 -8
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +465 -465
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +33 -33
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +28 -28
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +465 -465
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +33 -33
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +28 -28
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +465 -465
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +33 -33
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +28 -28
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +465 -465
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +33 -33
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +28 -28
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +465 -465
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +33 -33
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +28 -28
- package/assets/Appearance/light/mode/Component_LightMode.module.css +194 -194
- package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +8 -8
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +465 -465
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +33 -33
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +28 -28
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +465 -465
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +33 -33
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +28 -28
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +465 -465
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +33 -33
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +28 -28
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +465 -465
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +33 -33
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +28 -28
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +465 -465
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +33 -33
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +28 -28
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +200 -200
- package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +8 -8
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +465 -465
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +33 -33
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +28 -28
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +465 -465
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +33 -33
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +28 -28
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +465 -465
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +33 -33
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +28 -28
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +465 -465
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +33 -33
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +28 -28
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +465 -465
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +33 -33
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +28 -28
- package/es/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/es/DropBox/DropBoxPositionMapping.js +142 -0
- package/es/DropBox/utils/isMobilePopover.js +14 -3
- package/es/Popup/Popup.js +1045 -21
- package/es/Popup/PositionMapping.js +72 -0
- package/es/Popup/Registry.js +36 -0
- package/es/Popup/intersectionObserver.js +49 -0
- package/es/Popup/viewPort.js +373 -0
- package/es/utils/Common.js +1 -1
- package/es/v1/Popup/Popup.js +1 -1
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +5 -5
- package/lib/DropBox/DropBoxPositionMapping.js +149 -0
- package/lib/DropBox/utils/isMobilePopover.js +14 -4
- package/lib/Popup/Popup.js +1152 -25
- package/lib/Popup/PositionMapping.js +81 -0
- package/lib/Popup/Registry.js +46 -0
- package/lib/Popup/intersectionObserver.js +72 -0
- package/lib/Popup/viewPort.js +367 -0
- package/lib/utils/Common.js +1 -1
- package/lib/v1/Popup/Popup.js +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.positionMapping = void 0;
|
|
7
|
+
var positionMapping = {
|
|
8
|
+
"bottomCenter": {
|
|
9
|
+
"direction": "bottom",
|
|
10
|
+
"arrowPosition": "mid",
|
|
11
|
+
"positionStyle": "bottomMid"
|
|
12
|
+
},
|
|
13
|
+
"bottomLeftToRight": {
|
|
14
|
+
"direction": "bottom",
|
|
15
|
+
"arrowPosition": "start",
|
|
16
|
+
"positionStyle": "bottomEnd"
|
|
17
|
+
},
|
|
18
|
+
"bottomCenterToRight": {
|
|
19
|
+
"direction": "bottom",
|
|
20
|
+
"arrowPosition": "start",
|
|
21
|
+
"positionStyle": "bottomEnd"
|
|
22
|
+
},
|
|
23
|
+
"bottomRightToLeft": {
|
|
24
|
+
"direction": "bottom",
|
|
25
|
+
"arrowPosition": "end",
|
|
26
|
+
"positionStyle": "bottomStart"
|
|
27
|
+
},
|
|
28
|
+
"bottomCenterToLeft": {
|
|
29
|
+
"direction": "bottom",
|
|
30
|
+
"arrowPosition": "end",
|
|
31
|
+
"positionStyle": "bottomStart"
|
|
32
|
+
},
|
|
33
|
+
"topCenter": {
|
|
34
|
+
"direction": "top",
|
|
35
|
+
"arrowPosition": "mid",
|
|
36
|
+
"positionStyle": "topMid"
|
|
37
|
+
},
|
|
38
|
+
"topLeftToRight": {
|
|
39
|
+
"direction": "top",
|
|
40
|
+
"arrowPosition": "start",
|
|
41
|
+
"positionStyle": "topEnd"
|
|
42
|
+
},
|
|
43
|
+
"topCenterToRight": {
|
|
44
|
+
"direction": "top",
|
|
45
|
+
"arrowPosition": "start",
|
|
46
|
+
"positionStyle": "topEnd"
|
|
47
|
+
},
|
|
48
|
+
"topRightToLeft": {
|
|
49
|
+
"direction": "top",
|
|
50
|
+
"arrowPosition": "end",
|
|
51
|
+
"positionStyle": "topStart"
|
|
52
|
+
},
|
|
53
|
+
"topCenterToLeft": {
|
|
54
|
+
"direction": "top",
|
|
55
|
+
"arrowPosition": "end",
|
|
56
|
+
"positionStyle": "topStart"
|
|
57
|
+
},
|
|
58
|
+
"rightCenter": {
|
|
59
|
+
"direction": "right",
|
|
60
|
+
"arrowPosition": "mid",
|
|
61
|
+
"positionStyle": "rightMid"
|
|
62
|
+
},
|
|
63
|
+
"rightTopToBottom": {
|
|
64
|
+
"direction": "right",
|
|
65
|
+
"arrowPosition": "start",
|
|
66
|
+
"positionStyle": "rightEnd"
|
|
67
|
+
},
|
|
68
|
+
"rightCenterToBottom": {
|
|
69
|
+
"direction": "right",
|
|
70
|
+
"arrowPosition": "start",
|
|
71
|
+
"positionStyle": "rightEnd"
|
|
72
|
+
},
|
|
73
|
+
"rightBottomToTop": {
|
|
74
|
+
"direction": "right",
|
|
75
|
+
"arrowPosition": "end",
|
|
76
|
+
"positionStyle": "rightStart"
|
|
77
|
+
},
|
|
78
|
+
"rightCenterToTop": {
|
|
79
|
+
"direction": "right",
|
|
80
|
+
"arrowPosition": "end",
|
|
81
|
+
"positionStyle": "rightStart"
|
|
82
|
+
},
|
|
83
|
+
"leftCenter": {
|
|
84
|
+
"direction": "left",
|
|
85
|
+
"arrowPosition": "mid",
|
|
86
|
+
"positionStyle": "leftMid"
|
|
87
|
+
},
|
|
88
|
+
"leftTopToBottom": {
|
|
89
|
+
"direction": "left",
|
|
90
|
+
"arrowPosition": "start",
|
|
91
|
+
"positionStyle": "leftEnd"
|
|
92
|
+
},
|
|
93
|
+
"leftCenterToBottom": {
|
|
94
|
+
"direction": "left",
|
|
95
|
+
"arrowPosition": "start",
|
|
96
|
+
"positionStyle": "leftEnd"
|
|
97
|
+
},
|
|
98
|
+
"leftBottomToTop": {
|
|
99
|
+
"direction": "left",
|
|
100
|
+
"arrowPosition": "end",
|
|
101
|
+
"positionStyle": "leftStart"
|
|
102
|
+
},
|
|
103
|
+
"leftCenterToTop": {
|
|
104
|
+
"direction": "left",
|
|
105
|
+
"arrowPosition": "end",
|
|
106
|
+
"positionStyle": "leftStart"
|
|
107
|
+
},
|
|
108
|
+
"bottomRight": {
|
|
109
|
+
"direction": "bottom",
|
|
110
|
+
"arrowPosition": "start",
|
|
111
|
+
"positionStyle": "bottomEnd"
|
|
112
|
+
},
|
|
113
|
+
"bottomLeft": {
|
|
114
|
+
"direction": "bottom",
|
|
115
|
+
"arrowPosition": "end",
|
|
116
|
+
"positionStyle": "bottomStart"
|
|
117
|
+
},
|
|
118
|
+
"topRight": {
|
|
119
|
+
"direction": "top",
|
|
120
|
+
"arrowPosition": "start",
|
|
121
|
+
"positionStyle": "topEnd"
|
|
122
|
+
},
|
|
123
|
+
"topLeft": {
|
|
124
|
+
"direction": "top",
|
|
125
|
+
"arrowPosition": "end",
|
|
126
|
+
"positionStyle": "topStart"
|
|
127
|
+
},
|
|
128
|
+
"rightBottom": {
|
|
129
|
+
"direction": "right",
|
|
130
|
+
"arrowPosition": "start",
|
|
131
|
+
"positionStyle": "rightEnd"
|
|
132
|
+
},
|
|
133
|
+
"rightTop": {
|
|
134
|
+
"direction": "right",
|
|
135
|
+
"arrowPosition": "end",
|
|
136
|
+
"positionStyle": "rightStart"
|
|
137
|
+
},
|
|
138
|
+
"leftBottom": {
|
|
139
|
+
"direction": "left",
|
|
140
|
+
"arrowPosition": "start",
|
|
141
|
+
"positionStyle": "leftEnd"
|
|
142
|
+
},
|
|
143
|
+
"leftTop": {
|
|
144
|
+
"direction": "left",
|
|
145
|
+
"arrowPosition": "end",
|
|
146
|
+
"positionStyle": "leftStart"
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
exports.positionMapping = positionMapping;
|
|
@@ -7,9 +7,19 @@ exports["default"] = isMobilePopover;
|
|
|
7
7
|
|
|
8
8
|
var _Config = require("../../Provider/Config");
|
|
9
9
|
|
|
10
|
-
var _utils = require("@zohodesk/dotkit/es/react/components/Popup/utils");
|
|
11
|
-
|
|
12
10
|
function isMobilePopover(needResponsive) {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// let { needResponsive } = props;
|
|
12
|
+
var windowWidth,
|
|
13
|
+
mobileWidth = (0, _Config.getLibraryConfig)('mobileWidth'),
|
|
14
|
+
isModel = false;
|
|
15
|
+
|
|
16
|
+
if (needResponsive) {
|
|
17
|
+
windowWidth = window.innerWidth;
|
|
18
|
+
|
|
19
|
+
if (windowWidth <= mobileWidth) {
|
|
20
|
+
isModel = true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return isModel ? true : false;
|
|
15
25
|
}
|