@zohodesk/components 1.0.0-temp-246 → 1.0.0-temp-242.1

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 (95) hide show
  1. package/README.md +23 -7
  2. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +0 -2
  3. package/assets/Appearance/light/mode/Component_LightMode.module.css +0 -2
  4. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +0 -2
  5. package/es/AppContainer/AppContainer.js +1 -0
  6. package/es/AppContainer/AppContainer.module.css +3 -2
  7. package/es/Button/css/Button.module.css +13 -4
  8. package/es/CheckBox/CheckBox.js +10 -21
  9. package/es/CheckBox/CheckBox.module.css +6 -21
  10. package/es/CheckBox/__tests__/CheckBox.spec.js +0 -9
  11. package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +93 -162
  12. package/es/CheckBox/props/propTypes.js +1 -4
  13. package/es/DateTime/DateTime.module.css +12 -9
  14. package/es/DateTime/YearView.module.css +1 -1
  15. package/es/DropBox/DropBoxElement/DropBoxElement.js +1 -1
  16. package/es/DropBox/utils/isMobilePopover.js +3 -14
  17. package/es/Heading/Heading.module.css +1 -1
  18. package/es/Label/Label.js +1 -19
  19. package/es/Label/Label.module.css +8 -8
  20. package/es/Label/__tests__/Label.spec.js +0 -58
  21. package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -66
  22. package/es/Label/props/defaultProps.js +0 -1
  23. package/es/Label/props/propTypes.js +1 -7
  24. package/es/MultiSelect/MultiSelect.module.css +1 -1
  25. package/es/Popup/Popup.js +21 -1045
  26. package/es/Radio/Radio.js +9 -20
  27. package/es/Radio/Radio.module.css +5 -38
  28. package/es/Radio/__tests__/Radio.spec.js +0 -10
  29. package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +81 -238
  30. package/es/Radio/props/propTypes.js +1 -4
  31. package/es/Tab/Tabs.module.css +1 -1
  32. package/es/TextBox/TextBox.module.css +4 -4
  33. package/es/TextBoxIcon/TextBoxIcon.module.css +0 -6
  34. package/es/Textarea/Textarea.module.css +1 -1
  35. package/es/Tooltip/Tooltip.module.css +1 -1
  36. package/es/Typography/css/Typography.module.css +4 -4
  37. package/es/common/basic.module.css +39 -6
  38. package/es/common/basicReset.module.css +2 -2
  39. package/es/common/common.module.css +5 -5
  40. package/es/shared/InputFieldLine/InputFieldLine.module.css +1 -1
  41. package/es/utils/Common.js +1 -1
  42. package/es/v1/Popup/Popup.js +1 -1
  43. package/es/v1/Tab/v1Tabs.module.css +1 -1
  44. package/es/v1/Typography/css/v1_Typography.module.css +4 -4
  45. package/lib/AppContainer/AppContainer.js +2 -0
  46. package/lib/AppContainer/AppContainer.module.css +3 -2
  47. package/lib/Button/css/Button.module.css +13 -4
  48. package/lib/CheckBox/CheckBox.js +9 -23
  49. package/lib/CheckBox/CheckBox.module.css +6 -21
  50. package/lib/CheckBox/__tests__/CheckBox.spec.js +12 -21
  51. package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +93 -162
  52. package/lib/CheckBox/props/propTypes.js +1 -5
  53. package/lib/DateTime/DateTime.module.css +12 -9
  54. package/lib/DateTime/YearView.module.css +1 -1
  55. package/lib/DropBox/DropBoxElement/DropBoxElement.js +5 -5
  56. package/lib/DropBox/utils/isMobilePopover.js +4 -14
  57. package/lib/Heading/Heading.module.css +1 -1
  58. package/lib/Label/Label.js +1 -21
  59. package/lib/Label/Label.module.css +8 -8
  60. package/lib/Label/__tests__/Label.spec.js +0 -58
  61. package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -66
  62. package/lib/Label/props/defaultProps.js +0 -1
  63. package/lib/Label/props/propTypes.js +1 -8
  64. package/lib/MultiSelect/MultiSelect.module.css +1 -1
  65. package/lib/Popup/Popup.js +25 -1152
  66. package/lib/Radio/Radio.js +8 -22
  67. package/lib/Radio/Radio.module.css +5 -38
  68. package/lib/Radio/__tests__/Radio.spec.js +0 -10
  69. package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +81 -238
  70. package/lib/Radio/props/propTypes.js +1 -5
  71. package/lib/Tab/Tabs.module.css +1 -1
  72. package/lib/TextBox/TextBox.module.css +4 -4
  73. package/lib/TextBoxIcon/TextBoxIcon.module.css +0 -6
  74. package/lib/Textarea/Textarea.module.css +1 -1
  75. package/lib/Tooltip/Tooltip.module.css +1 -1
  76. package/lib/Typography/css/Typography.module.css +4 -4
  77. package/lib/common/basic.module.css +39 -6
  78. package/lib/common/basicReset.module.css +2 -2
  79. package/lib/common/common.module.css +5 -5
  80. package/lib/shared/InputFieldLine/InputFieldLine.module.css +1 -1
  81. package/lib/utils/Common.js +1 -1
  82. package/lib/v1/Popup/Popup.js +1 -1
  83. package/lib/v1/Tab/v1Tabs.module.css +1 -1
  84. package/lib/v1/Typography/css/v1_Typography.module.css +4 -4
  85. package/package.json +5 -5
  86. package/es/DropBox/DropBoxPositionMapping.js +0 -142
  87. package/es/Popup/PositionMapping.js +0 -72
  88. package/es/Popup/Registry.js +0 -36
  89. package/es/Popup/intersectionObserver.js +0 -49
  90. package/es/Popup/viewPort.js +0 -373
  91. package/lib/DropBox/DropBoxPositionMapping.js +0 -149
  92. package/lib/Popup/PositionMapping.js +0 -81
  93. package/lib/Popup/Registry.js +0 -46
  94. package/lib/Popup/intersectionObserver.js +0 -72
  95. package/lib/Popup/viewPort.js +0 -367
@@ -7,15 +7,12 @@ exports.propTypes = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _propTypes2 = require("../../Typography/props/propTypes");
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
11
 
14
12
  var propTypes = {
15
13
  active: _propTypes["default"].bool,
16
14
  checked: _propTypes["default"].bool,
17
15
  disabled: _propTypes["default"].bool,
18
- secondaryText: _propTypes["default"].string,
19
16
  disabledTitle: _propTypes["default"].string,
20
17
  getRef: _propTypes["default"].func,
21
18
  id: _propTypes["default"].string,
@@ -36,8 +33,7 @@ var propTypes = {
36
33
  }),
37
34
  customProps: _propTypes["default"].exact({
38
35
  ContainerProps: _propTypes["default"].object,
39
- LabelProps: _propTypes["default"].object,
40
- secondaryTextProps: _propTypes["default"].exact(_propTypes2.propTypes)
36
+ LabelProps: _propTypes["default"].object
41
37
  }),
42
38
  a11y: _propTypes["default"].shape({
43
39
  ariaChecked: _propTypes["default"].bool,
@@ -145,7 +145,7 @@
145
145
  }
146
146
 
147
147
  .emptyStateTitle {
148
- font-family: var(--zd_semibold);
148
+ font-weight: var(--zd-fw-semibold);
149
149
  word-wrap: break-word;
150
150
  font-size: var(--zd_font_size16) ;
151
151
  max-width: var(--zd_size430) ;
@@ -9,7 +9,7 @@
9
9
  --textbox_width: 100%;
10
10
  --textbox_height: var(--zd_size35);
11
11
  --textbox_border_radius: none;
12
- --textbox_font_family: var(--zd_regular);
12
+ --textbox_font_weight: var(--zd-fw-normal);
13
13
  /* Variable:Ignore */
14
14
  --textbox_letter_spacing: 0.1px;
15
15
  --textbox_padding: 0;
@@ -166,18 +166,18 @@
166
166
  .primary,
167
167
  .secondary,
168
168
  .light {
169
- font-family: var(--textbox_font_family);
169
+ font-weight: var(--textbox_font_weight);
170
170
  }
171
171
 
172
172
  .primary {
173
173
  --textbox_text_color: var(--zdt_textbox_default_text);
174
- --textbox_font_family: var(--zd_semibold);
174
+ --textbox_font_weight: var(--zd-fw-semibold);
175
175
  composes: ftsmooth from '../common/common.module.css';
176
176
  }
177
177
 
178
178
  .secondary {
179
179
  --textbox_text_color: var(--zdt_textbox_secondary_text);
180
- --textbox_font_family: var(--zd_light);
180
+ --textbox_font_weight: var(--zd-fw-light);
181
181
  }
182
182
 
183
183
  .light {
@@ -1,8 +1,4 @@
1
1
  .varClass {
2
- /* textboxicon default variables */
3
- --textboxicon_line_height: 1px;
4
- --textboxicon_line_color: var(--zdt_textboxicon_default_line_bg);
5
-
6
2
  /* textboxicon icon default variables */
7
3
  --textboxicon_icon_margin: 0 var(--zd_size5);
8
4
  --textboxicon_icon_cursor: pointer;
@@ -11,8 +7,6 @@
11
7
  .container {
12
8
  composes: varClass;
13
9
  position: relative;
14
- --local_inputFieldLine_border_width: var(--textboxicon_line_height);
15
- --local_inputFieldLine_border_color: var(--textboxicon_line_color);
16
10
  }
17
11
  .disabled,.readonly {
18
12
  --textboxicon_icon_cursor: not-allowed;
@@ -139,7 +139,7 @@
139
139
  --textarea_height: var(--zd_size184);
140
140
  }
141
141
  .default {
142
- font-family: var(--zd_regular);
142
+ font-weight: var(--zd-fw-normal);
143
143
  --textarea_text_color: var(--zdt_textarea_black_text);
144
144
  }
145
145
  .primary {
@@ -14,7 +14,7 @@
14
14
  .tooltipcont {
15
15
  color: var(--zdt_tooltip_default_text);
16
16
  font-size: var(--zd_font_size13) ;
17
- font-family: var(--zd_semibold);
17
+ font-weight: var(--zd-fw-semibold);
18
18
  word-break: break-word;
19
19
  max-width: var(--zd_size420) ;
20
20
  line-height: 1.5385;
@@ -25,20 +25,20 @@
25
25
  }
26
26
 
27
27
  .font_regular {
28
- font-family: var(--zd_regular);
28
+ font-weight: var(--zd-fw-normal);
29
29
  }
30
30
 
31
31
  .font_light {
32
- font-family: var(--zd_light);
32
+ font-weight: var(--zd-fw-light);
33
33
  }
34
34
 
35
35
  .font_semibold {
36
- font-family: var(--zd_semibold);
36
+ font-weight: var(--zd-fw-semibold);
37
37
  composes: ftsmooth from '../../common/common.module.css';
38
38
  }
39
39
 
40
40
  .font_bold {
41
- font-family: var(--zd_bold);
41
+ font-weight: var(--zd-fw-bold);
42
42
  composes: ftsmooth from '../../common/common.module.css';
43
43
  }
44
44
 
@@ -1,15 +1,15 @@
1
1
  @font-face {
2
- font-family: Regular;
3
- src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');
4
- font-weight: 400;
2
+ font-family: Light;
3
+ src: url('https://static.zohocdn.com/webfonts/lato2light/font.woff2') format('woff2');
4
+ font-weight: 300;
5
5
  font-style: normal;
6
6
  font-display: swap;
7
7
  }
8
8
 
9
9
  @font-face {
10
- font-family: Light;
11
- src: url('https://static.zohocdn.com/webfonts/lato2light/font.woff2') format('woff2');
12
- font-weight: 300;
10
+ font-family: Regular;
11
+ src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');
12
+ font-weight: 400;
13
13
  font-style: normal;
14
14
  font-display: swap;
15
15
  }
@@ -29,3 +29,36 @@
29
29
  font-style: normal;
30
30
  font-display: swap;
31
31
  }
32
+
33
+
34
+ @font-face {
35
+ font-family: ZDLato;
36
+ src: url('https://static.zohocdn.com/webfonts/lato2light/font.woff2') format('woff2');
37
+ font-weight: 100 300;
38
+ font-style: normal;
39
+ font-display: swap;
40
+ }
41
+
42
+ @font-face {
43
+ font-family: ZDLato;
44
+ src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');
45
+ font-weight: 400;
46
+ font-style: normal;
47
+ font-display: swap;
48
+ }
49
+
50
+ @font-face {
51
+ font-family: ZDLato;
52
+ src: url('https://static.zohocdn.com/webfonts/lato2semibold/font.woff2') format('woff2');
53
+ font-weight: 500 600;
54
+ font-style: normal;
55
+ font-display: swap;
56
+ }
57
+
58
+ @font-face {
59
+ font-family: ZDLato;
60
+ src: url('https://static.zohocdn.com/webfonts/lato2bold/font.woff2') format('woff2');
61
+ font-weight: 700 900;
62
+ font-style: normal;
63
+ font-display: swap;
64
+ }
@@ -27,7 +27,7 @@ html {
27
27
  }
28
28
 
29
29
  textarea {
30
- font-family: var(--zd_regular);
30
+ font-weight: var(--zd-fw-normal);
31
31
  }
32
32
 
33
33
  label, input[type='button'], input[type='submit'], input[type='file'], button {
@@ -37,4 +37,4 @@ label, input[type='button'], input[type='submit'], input[type='file'], button {
37
37
  /*Moz Required Box shadow Isssue*/
38
38
  input[required]:-moz-ui-invalid {
39
39
  box-shadow: none;
40
- }
40
+ }
@@ -303,22 +303,22 @@
303
303
  resize: vertical;
304
304
  }
305
305
 
306
- /*font-family*/
306
+ /*font-weight*/
307
307
  .regular {
308
- font-family: var(--zd_regular, Regular);
308
+ font-weight: var(--zd-fw-normal);
309
309
  }
310
310
 
311
311
  .light {
312
- font-family: var(--zd_light, Light);
312
+ font-weight: var(--zd-fw-light);
313
313
  }
314
314
 
315
315
  .semibold {
316
- font-family: var(--zd_semibold, Semibold);
316
+ font-weight: var(--zd-fw-semibold);
317
317
  composes: ftsmooth;
318
318
  }
319
319
 
320
320
  .bold {
321
- font-family: var(--zd_bold, Bold);
321
+ font-weight: var(--zd-fw-bold);
322
322
  composes: ftsmooth;
323
323
  }
324
324
 
@@ -1,7 +1,7 @@
1
1
  .varClass {
2
2
  --local_inputFieldLine_border_color: var(--zdt_inputField_default_border);
3
3
  --local_inputFieldLine_border_width: 1px;
4
- --local_padding: var(--zd_size0);
4
+ --local_padding: 0;
5
5
  --local_cursor: pointer;
6
6
  }
7
7
 
@@ -38,7 +38,7 @@ exports.stopAllEventPropagation = exports.scrollTo = void 0;
38
38
  exports.stopPropagation = stopPropagation;
39
39
  exports.throttle = void 0;
40
40
 
41
- var _viewPort = _interopRequireDefault(require("../Popup/viewPort"));
41
+ var _viewPort = _interopRequireDefault(require("@zohodesk/dotkit/es/react/components/Popup/utils/viewPort.js"));
42
42
 
43
43
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
44
44
 
@@ -15,7 +15,7 @@ var _hoistNonReactStatics = _interopRequireDefault(require("hoist-non-react-stat
15
15
 
16
16
  var _Common = require("../../utils/Common.js");
17
17
 
18
- var _viewPort = _interopRequireDefault(require("../../Popup/viewPort"));
18
+ var _viewPort = _interopRequireDefault(require("@zohodesk/dotkit/es/react/components/Popup/utils/viewPort.js"));
19
19
 
20
20
  var _PositionMapping = require("../../Popup/PositionMapping.js");
21
21
 
@@ -145,7 +145,7 @@
145
145
  }
146
146
 
147
147
  .emptyStateTitle {
148
- font-family: var(--zd_semibold);
148
+ font-weight: var(--zd-fw-semibold);
149
149
  word-wrap: break-word;
150
150
  font-size: var(--zd_font_size16) ;
151
151
  max-width: var(--zd_size430) ;
@@ -19,17 +19,17 @@
19
19
  display: initial;
20
20
  }
21
21
  .font_regular {
22
- font-family: var(--zd_regular);
22
+ font-weight: var(--zd-fw-normal);
23
23
  }
24
24
  .font_light {
25
- font-family: var(--zd_light);
25
+ font-weight: var(--zd-fw-light);
26
26
  }
27
27
  .font_semibold {
28
- font-family: var(--zd_semibold);
28
+ font-weight: var(--zd-fw-semibold);
29
29
  composes: ftsmooth from '../../../common/common.module.css';
30
30
  }
31
31
  .font_bold {
32
- font-family: var(--zd_bold);
32
+ font-weight: var(--zd-fw-bold);
33
33
  composes: ftsmooth from '../../../common/common.module.css';
34
34
  }
35
35
  .fontStyles_normal{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-246",
3
+ "version": "1.0.0-temp-242.1",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -80,13 +80,13 @@
80
80
  "@zohodesk-private/react-prop-validator": "1.2.3",
81
81
  "@zohodesk/a11y": "2.3.8",
82
82
  "@zohodesk/docstool": "1.0.0-alpha-2",
83
- "@zohodesk/dotkit": "1.0.3",
83
+ "@zohodesk/dotkit": "1.0.0-temp-2.2",
84
84
  "@zohodesk/hooks": "2.0.6",
85
85
  "@zohodesk/icons": "1.1.3",
86
86
  "@zohodesk/layout": "3.1.0",
87
87
  "@zohodesk/svg": "1.2.3",
88
88
  "@zohodesk/utils": "1.3.15",
89
- "@zohodesk/variables": "1.1.0",
89
+ "@zohodesk/variables": "1.2.0",
90
90
  "@zohodesk/virtualizer": "1.0.13",
91
91
  "react-sortable-hoc": "^0.8.3",
92
92
  "velocity-react": "1.4.3",
@@ -101,7 +101,7 @@
101
101
  },
102
102
  "peerDependencies": {
103
103
  "@zohodesk/icons": "1.1.3",
104
- "@zohodesk/variables": "1.1.0",
104
+ "@zohodesk/variables": "1.2.0",
105
105
  "@zohodesk/svg": "1.2.3",
106
106
  "@zohodesk/virtualizer": "1.0.13",
107
107
  "velocity-react": "1.4.3",
@@ -110,7 +110,7 @@
110
110
  "@zohodesk/utils": "1.3.15",
111
111
  "@zohodesk/a11y": "2.3.8",
112
112
  "@zohodesk/layout": "3.1.0",
113
- "@zohodesk/dotkit": "1.0.3",
113
+ "@zohodesk/dotkit": "1.0.0-temp-2.2",
114
114
  "color": "4.2.3"
115
115
  }
116
116
  }
@@ -1,142 +0,0 @@
1
- export const positionMapping = {
2
- "bottomCenter": {
3
- "direction": "bottom",
4
- "arrowPosition": "mid",
5
- "positionStyle": "bottomMid"
6
- },
7
- "bottomLeftToRight": {
8
- "direction": "bottom",
9
- "arrowPosition": "start",
10
- "positionStyle": "bottomEnd"
11
- },
12
- "bottomCenterToRight": {
13
- "direction": "bottom",
14
- "arrowPosition": "start",
15
- "positionStyle": "bottomEnd"
16
- },
17
- "bottomRightToLeft": {
18
- "direction": "bottom",
19
- "arrowPosition": "end",
20
- "positionStyle": "bottomStart"
21
- },
22
- "bottomCenterToLeft": {
23
- "direction": "bottom",
24
- "arrowPosition": "end",
25
- "positionStyle": "bottomStart"
26
- },
27
- "topCenter": {
28
- "direction": "top",
29
- "arrowPosition": "mid",
30
- "positionStyle": "topMid"
31
- },
32
- "topLeftToRight": {
33
- "direction": "top",
34
- "arrowPosition": "start",
35
- "positionStyle": "topEnd"
36
- },
37
- "topCenterToRight": {
38
- "direction": "top",
39
- "arrowPosition": "start",
40
- "positionStyle": "topEnd"
41
- },
42
- "topRightToLeft": {
43
- "direction": "top",
44
- "arrowPosition": "end",
45
- "positionStyle": "topStart"
46
- },
47
- "topCenterToLeft": {
48
- "direction": "top",
49
- "arrowPosition": "end",
50
- "positionStyle": "topStart"
51
- },
52
- "rightCenter": {
53
- "direction": "right",
54
- "arrowPosition": "mid",
55
- "positionStyle": "rightMid"
56
- },
57
- "rightTopToBottom": {
58
- "direction": "right",
59
- "arrowPosition": "start",
60
- "positionStyle": "rightEnd"
61
- },
62
- "rightCenterToBottom": {
63
- "direction": "right",
64
- "arrowPosition": "start",
65
- "positionStyle": "rightEnd"
66
- },
67
- "rightBottomToTop": {
68
- "direction": "right",
69
- "arrowPosition": "end",
70
- "positionStyle": "rightStart"
71
- },
72
- "rightCenterToTop": {
73
- "direction": "right",
74
- "arrowPosition": "end",
75
- "positionStyle": "rightStart"
76
- },
77
- "leftCenter": {
78
- "direction": "left",
79
- "arrowPosition": "mid",
80
- "positionStyle": "leftMid"
81
- },
82
- "leftTopToBottom": {
83
- "direction": "left",
84
- "arrowPosition": "start",
85
- "positionStyle": "leftEnd"
86
- },
87
- "leftCenterToBottom": {
88
- "direction": "left",
89
- "arrowPosition": "start",
90
- "positionStyle": "leftEnd"
91
- },
92
- "leftBottomToTop": {
93
- "direction": "left",
94
- "arrowPosition": "end",
95
- "positionStyle": "leftStart"
96
- },
97
- "leftCenterToTop": {
98
- "direction": "left",
99
- "arrowPosition": "end",
100
- "positionStyle": "leftStart"
101
- },
102
- "bottomRight": {
103
- "direction": "bottom",
104
- "arrowPosition": "start",
105
- "positionStyle": "bottomEnd"
106
- },
107
- "bottomLeft": {
108
- "direction": "bottom",
109
- "arrowPosition": "end",
110
- "positionStyle": "bottomStart"
111
- },
112
- "topRight": {
113
- "direction": "top",
114
- "arrowPosition": "start",
115
- "positionStyle": "topEnd"
116
- },
117
- "topLeft": {
118
- "direction": "top",
119
- "arrowPosition": "end",
120
- "positionStyle": "topStart"
121
- },
122
- "rightBottom": {
123
- "direction": "right",
124
- "arrowPosition": "start",
125
- "positionStyle": "rightEnd"
126
- },
127
- "rightTop": {
128
- "direction": "right",
129
- "arrowPosition": "end",
130
- "positionStyle": "rightStart"
131
- },
132
- "leftBottom": {
133
- "direction": "left",
134
- "arrowPosition": "start",
135
- "positionStyle": "leftEnd"
136
- },
137
- "leftTop": {
138
- "direction": "left",
139
- "arrowPosition": "end",
140
- "positionStyle": "leftStart"
141
- }
142
- };
@@ -1,72 +0,0 @@
1
- export const absolutePositionMapping = {
2
- "bottomCenter": "bottomCenter",
3
- "bottomRight": "bottomLeftToRight",
4
- "bottomLeft": "bottomRightToLeft",
5
- "topCenter": "topCenter",
6
- "topRight": "topLeftToRight",
7
- "topLeft": "topRightToLeft",
8
- "rightCenter": "rightCenter",
9
- "rightBottom": "rightTopToBottom",
10
- "rightTop": "rightBottomToTop",
11
- "leftCenter": "leftCenter",
12
- "leftBottom": "leftTopToBottom",
13
- "leftTop": "leftBottomToTop",
14
- "bottomLeftToRight": "bottomLeftToRight",
15
- "bottomRightToLeft": "bottomRightToLeft",
16
- "topLeftToRight": "topLeftToRight",
17
- "topRightToLeft": "topRightToLeft",
18
- "rightTopToBottom": "rightTopToBottom",
19
- "rightBottomToTop": "rightBottomToTop",
20
- "leftTopToBottom": "leftTopToBottom"
21
- };
22
- export const rtlAbsolutePositionMapping = {
23
- "bottomCenter": "bottomCenter",
24
- "bottomRight": "bottomRightToLeft",
25
- "bottomLeft": "bottomLeftToRight",
26
- "topCenter": "topCenter",
27
- "topRight": "topRightToLeft",
28
- "topLeft": "topLeftToRight",
29
- "rightCenter": "leftCenter",
30
- "rightBottom": "leftTopToBottom",
31
- "rightTop": "leftBottomToTop",
32
- "leftCenter": "rightCenter",
33
- "leftBottom": "rightTopToBottom",
34
- "leftTop": "rightBottomToTop",
35
- "bottomLeftToRight": "bottomLeftToRight",
36
- "bottomRightToLeft": "bottomRightToLeft",
37
- "topLeftToRight": "topLeftToRight",
38
- "topRightToLeft": "topRightToLeft",
39
- "rightTopToBottom": "rightTopToBottom",
40
- "rightBottomToTop": "rightBottomToTop",
41
- "leftTopToBottom": "leftTopToBottom"
42
- };
43
- export const rtlFixedPositionMapping = {
44
- "bottomCenter": "bottomCenter",
45
- "bottomLeftToRight": "bottomRightToLeft",
46
- "bottomCenterToRight": "bottomCenterToLeft",
47
- "bottomRightToLeft": "bottomLeftToRight",
48
- "bottomCenterToLeft": "bottomCenterToRight",
49
- "topCenter": "topCenter",
50
- "topLeftToRight": "topRightToLeft",
51
- "topCenterToRight": "topCenterToLeft",
52
- "topRightToLeft": "topLeftToRight",
53
- "topCenterToLeft": "topCenterToRight",
54
- "rightTopToBottom": "leftTopToBottom",
55
- "rightCenterToBottom": "leftCenterToBottom",
56
- "rightCenter": "leftCenter",
57
- "rightBottomToTop": "leftBottomToTop",
58
- "rightCenterToTop": "leftCenterToTop",
59
- "leftTopToBottom": "rightTopToBottom",
60
- "leftCenterToBottom": "rightCenterToBottom",
61
- "leftCenter": "rightCenter",
62
- "leftBottomToTop": "rightBottomToTop",
63
- "leftCenterToTop": "rightCenterToTop",
64
- "bottomRight": "bottomLeft",
65
- "bottomLeft": "bottomRight",
66
- "topRight": "topLeft",
67
- "topLeft": "topRight",
68
- "rightBottom": "leftBottom",
69
- "rightTop": "leftTop",
70
- "leftBottom": "rightBottom",
71
- "leftTop": "rightTop"
72
- };
@@ -1,36 +0,0 @@
1
- import { getLibraryConfig } from "../Provider/Config.js";
2
- const Registry = {
3
- lastOpenedGroup: [],
4
- popups: {},
5
- listenerPopupRef: undefined,
6
- scrollBlockedListenerPopupRef: undefined,
7
- scrollableListenerPopupRef: undefined,
8
-
9
- getOpenedPopups() {
10
- return Object.values(Registry.popups).flat().filter(popup => popup.state.isPopupOpen);
11
- },
12
-
13
- getOpenedScrollBlockedFixedPopups() {
14
- return Registry.getOpenedPopups().filter(popup => popup.getIsOutsideScrollBlocked(popup) && !popup.getIsAbsolutePopup(popup));
15
- },
16
-
17
- getOpenedScrollableFixedPopups() {
18
- return Registry.getOpenedPopups().filter(popup => !popup.getIsOutsideScrollBlocked(popup) && !popup.getIsAbsolutePopup(popup));
19
- },
20
-
21
- getRootElement() {
22
- const getRootElement = getLibraryConfig('getRootElement');
23
-
24
- if (getRootElement && typeof getRootElement === 'function') {
25
- const parent = getRootElement();
26
-
27
- if (parent) {
28
- return parent;
29
- }
30
- }
31
-
32
- return document;
33
- }
34
-
35
- };
36
- export default Registry;
@@ -1,49 +0,0 @@
1
- let observerCallbacks = null;
2
- let intersectionObserver = null;
3
-
4
- function handleObserverCallbacks(entries) {
5
- entries.forEach(entry => {
6
- let oldCallbacks = observerCallbacks.get(entry.target);
7
-
8
- if (Array.isArray(oldCallbacks) && oldCallbacks.length) {
9
- oldCallbacks.forEach(callback => {
10
- callback && callback(entry);
11
- });
12
- }
13
- });
14
- }
15
-
16
- export function addIntersectionObserver(element, callback, options) {
17
- if (!!element && typeof callback == 'function') {
18
- if (intersectionObserver === null && observerCallbacks === null) {
19
- intersectionObserver = new IntersectionObserver(entries => {
20
- handleObserverCallbacks(entries);
21
- }, options);
22
- observerCallbacks = new Map();
23
- }
24
-
25
- intersectionObserver.observe(element);
26
- let oldCallbacks = observerCallbacks.get(element) || [];
27
- observerCallbacks.set(element, [...oldCallbacks, callback]);
28
- }
29
- }
30
- export function removeIntersectionObserver(element, callback) {
31
- if (!!element && typeof callback == 'function') {
32
- let oldCallbacks = observerCallbacks ? observerCallbacks.get(element) : null;
33
-
34
- if (Array.isArray(oldCallbacks)) {
35
- let callbacks = oldCallbacks.filter(handler => handler !== callback);
36
-
37
- if (intersectionObserver && callbacks.length === 0) {
38
- observerCallbacks.delete(element);
39
- intersectionObserver.unobserve(element);
40
- }
41
- }
42
-
43
- if (intersectionObserver && observerCallbacks && observerCallbacks.size === 0) {
44
- intersectionObserver.disconnect();
45
- intersectionObserver = null;
46
- observerCallbacks = null;
47
- }
48
- }
49
- }