@geneui/components 2.16.0-canary-12a636d-09092024 → 2.16.0-canary-7376102-11092024
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/ActionableList/index.js +5 -6
- package/AdvancedSearch/index.js +4 -5
- package/Alert/index.js +2 -2
- package/Avatar/index.js +1 -1
- package/Badge/index.js +1 -1
- package/Breadcrumb/index.js +3 -4
- package/BusyLoader/index.js +1 -1
- package/Button/index.js +1 -1
- package/CHANGELOG.md +7 -0
- package/Card/index.js +3 -4
- package/CardList/index.js +9 -10
- package/{CellMeasurerCache-b172f99b.js → CellMeasurerCache-b31d12fe.js} +1 -1
- package/Charts/index.js +18 -18
- package/Checkbox/index.js +3 -3
- package/CheckboxGroup/index.js +3 -3
- package/CheckboxGroupWithSearch/index.js +4 -5
- package/Collapse/index.js +1 -1
- package/ColorPicker/index.js +1 -1
- package/ComboBox/index.js +5 -5
- package/Copy/index.js +4 -4
- package/Counter/index.js +3 -4
- package/DateFilter/index.js +4 -5
- package/DatePicker/index.js +1 -1
- package/DatePickerInput/index.js +5 -6
- package/Divider/index.js +1 -1
- package/Drawer/index.js +4 -4
- package/Dropdown/index.js +6 -7
- package/Editor/index.js +2 -2
- package/Empty/index.js +1 -1
- package/ExtendedInput/index.js +4 -4
- package/Form/index.js +6 -7
- package/FormContainer/index.js +1 -1
- package/FormableCheckbox/index.js +4 -4
- package/FormableDatePicker/index.js +5 -6
- package/FormableDropdown/index.js +6 -7
- package/FormableEditor/index.js +2 -2
- package/{FormableHOC-b26c5b16.js → FormableHOC-8c6104f7.js} +1 -1
- package/FormableMultiSelectDropdown/index.js +6 -7
- package/FormableNumberInput/index.js +4 -4
- package/FormableRadio/index.js +2 -2
- package/FormableSwitcher/index.js +2 -2
- package/FormableTextInput/index.js +4 -4
- package/FormableUploader/index.js +3 -4
- package/GeneUIProvider/index.js +2 -1
- package/Grid/index.js +2 -2
- package/Holder/index.js +3 -4
- package/Icon/index.js +1 -1
- package/Image/index.js +6 -7
- package/ImagePreview/index.js +3 -4
- package/InteractiveWidget/index.js +3 -4
- package/KeyValue/index.js +1 -1
- package/Label/index.js +1 -1
- package/LinkButton/index.js +1 -1
- package/Menu/index.js +4 -4
- package/MobileNavigation/index.js +1 -1
- package/MobilePopup/index.js +4 -4
- package/Modal/index.js +2 -2
- package/ModuleTitle/index.js +4 -4
- package/NavigationMenu/index.js +5 -5
- package/Notification/index.js +2 -2
- package/Option/index.js +4 -4
- package/Overlay/index.js +3 -4
- package/Overspread/index.js +7 -8
- package/Pagination/index.js +3 -4
- package/Paper/index.js +1 -1
- package/Popover/index.js +410 -5
- package/PopoverV2/index.js +2 -2
- package/Products/index.js +2 -2
- package/Profile/index.js +3 -4
- package/Progress/index.js +1 -1
- package/Radio/index.js +1 -1
- package/RadioGroup/index.js +1 -1
- package/Range/index.js +2 -2
- package/Rating/index.js +4 -4
- package/RichEditor/index.js +1 -1
- package/{RichEditor-a3f1150e.js → RichEditor-de21fe2b.js} +1 -1
- package/Scrollbar/index.js +2 -2
- package/Search/index.js +3 -3
- package/SearchWithDropdown/index.js +7 -8
- package/Section/index.js +2 -2
- package/SkeletonLoader/index.js +1 -1
- package/Slider/index.js +4 -4
- package/Status/index.js +5 -5
- package/Steps/index.js +5 -5
- package/SuggestionList/index.js +2 -2
- package/Switcher/index.js +2 -2
- package/Table/index.js +15 -16
- package/TableCompositions/index.js +12 -13
- package/Tabs/index.js +1 -1
- package/Tag/index.js +2 -2
- package/Textarea/index.js +3 -3
- package/Time/index.js +1 -1
- package/TimePicker/index.js +5 -5
- package/Timeline/index.js +2 -2
- package/Title/index.js +2 -2
- package/Toaster/index.js +2 -2
- package/Tooltip/index.js +10 -153
- package/TransferList/index.js +7 -8
- package/Uploader/index.js +6 -7
- package/ValidatableCheckbox/index.js +3 -3
- package/ValidatableDatePicker/index.js +4 -5
- package/ValidatableDropdown/index.js +5 -6
- package/ValidatableElements/index.js +5 -6
- package/ValidatableMultiSelectDropdown/index.js +5 -6
- package/ValidatableNumberInput/index.js +3 -3
- package/ValidatableRadio/index.js +1 -1
- package/ValidatableSwitcher/index.js +1 -1
- package/ValidatableTextInput/index.js +3 -3
- package/ValidatableTimeInput/index.js +3 -3
- package/ValidatableUploader/index.js +2 -3
- package/Widget/index.js +3 -4
- package/{configs-1fb8eed2.js → configs-00612ce0.js} +1 -1
- package/hooks/useDeviceType.js +1 -1
- package/{index-617ffc3a.js → index-1d3b2bbf.js} +10 -9
- package/index-464ea32b.js +3064 -0
- package/{index-18431aad.js → index-664c705c.js} +2 -2
- package/{index-34914e4c.js → index-898121d3.js} +1 -1
- package/{index-1beae3bb.js → index-9e11ebfb.js} +4 -4
- package/index.js +12 -13
- package/lib/atoms/Button/Button.d.ts +1 -1
- package/lib/molecules/Tooltip/Tooltip.d.ts +62 -0
- package/lib/molecules/Tooltip/index.d.ts +1 -0
- package/package.json +2 -1
- package/{rangeAndSlider-63c5d423.js → rangeAndSlider-693a3d41.js} +16 -8
- package/{react-beautiful-dnd.esm-04c14563.js → react-beautiful-dnd.esm-be4bf1e2.js} +2 -1
- package/{index-b1e429a7.js → redux-b3e598ca.js} +1 -272
- package/Popover-f4d1cac0.js +0 -411
package/Popover/index.js
CHANGED
|
@@ -1,26 +1,431 @@
|
|
|
1
1
|
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { forwardRef, useRef, useState, useContext, useCallback, useMemo, Children, useEffect } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { c as commonjsGlobal } from '../_commonjsHelpers-24198af3.js';
|
|
4
|
+
import ReactDOM__default from 'react-dom';
|
|
4
5
|
import { u as useSwipeable } from '../index-122432cd.js';
|
|
5
6
|
import { c as classnames } from '../index-031ff73c.js';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
8
|
import { n as noop, s as stopEvent } from '../index-a0e4e333.js';
|
|
8
9
|
import useDeviceType from '../hooks/useDeviceType.js';
|
|
9
10
|
import useUpdatableRef from '../hooks/useUpdatableRef.js';
|
|
10
|
-
import {
|
|
11
|
+
import { g as popoverConfig, s as screenTypes } from '../configs-00612ce0.js';
|
|
11
12
|
import { GeneUIDesignSystemContext } from '../GeneUIProvider/index.js';
|
|
12
13
|
import Portal from '../Portal/index.js';
|
|
13
14
|
import CustomScrollbar from '../Scrollbar/index.js';
|
|
14
15
|
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
15
16
|
import { g as guid } from '../guid-8ddf77b3.js';
|
|
16
|
-
import '../_commonjsHelpers-24198af3.js';
|
|
17
|
-
import 'react-dom';
|
|
18
17
|
import '../dateValidation-67caec66.js';
|
|
19
18
|
import '../hooks/useWindowSize.js';
|
|
20
19
|
import '../hooks/useDebounce.js';
|
|
21
20
|
import '../hooks/useForceUpdate.js';
|
|
22
21
|
|
|
23
|
-
var
|
|
22
|
+
var Popover$2 = {};
|
|
23
|
+
|
|
24
|
+
var util = {};
|
|
25
|
+
|
|
26
|
+
Object.defineProperty(util, "__esModule", { value: true });
|
|
27
|
+
util.Constants = {
|
|
28
|
+
POPOVER_CONTAINER_CLASS_NAME: 'react-tiny-popover-container',
|
|
29
|
+
DEFAULT_PADDING: 6,
|
|
30
|
+
DEFAULT_WINDOW_PADDING: 6,
|
|
31
|
+
FADE_TRANSITION: 0.35,
|
|
32
|
+
DEFAULT_ARROW_COLOR: 'black',
|
|
33
|
+
DEFAULT_POSITIONS: ['top', 'left', 'right', 'bottom'],
|
|
34
|
+
EMPTY_CLIENT_RECT: {
|
|
35
|
+
top: 0,
|
|
36
|
+
left: 0,
|
|
37
|
+
bottom: 0,
|
|
38
|
+
height: 0,
|
|
39
|
+
right: 0,
|
|
40
|
+
width: 0,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
util.arrayUnique = function (array) { return array.filter(function (value, index, self) { return self.indexOf(value) === index; }); };
|
|
44
|
+
|
|
45
|
+
var ArrowContainer$1 = {};
|
|
46
|
+
|
|
47
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
48
|
+
__assign = Object.assign || function(t) {
|
|
49
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
50
|
+
s = arguments[i];
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
52
|
+
t[p] = s[p];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
return __assign.apply(this, arguments);
|
|
57
|
+
};
|
|
58
|
+
Object.defineProperty(ArrowContainer$1, "__esModule", { value: true });
|
|
59
|
+
var React$1 = React__default;
|
|
60
|
+
var util_1$1 = util;
|
|
61
|
+
var ArrowContainer = function (_a) {
|
|
62
|
+
var position = _a.position, children = _a.children, style = _a.style, _b = _a.arrowColor, arrowColor = _b === void 0 ? util_1$1.Constants.DEFAULT_ARROW_COLOR : _b, _c = _a.arrowSize, arrowSize = _c === void 0 ? 10 : _c, arrowStyle = _a.arrowStyle, popoverRect = _a.popoverRect, targetRect = _a.targetRect;
|
|
63
|
+
return (React$1.createElement("div", { style: __assign({ paddingLeft: position === 'right' ? arrowSize : 0, paddingTop: position === 'bottom' ? arrowSize : 0, paddingBottom: position === 'top' ? arrowSize : 0, paddingRight: position === 'left' ? arrowSize : 0 }, style) },
|
|
64
|
+
React$1.createElement("div", { style: __assign({ position: 'absolute' }, (function () {
|
|
65
|
+
var arrowWidth = arrowSize * 2;
|
|
66
|
+
var top = (targetRect.top - popoverRect.top) + (targetRect.height / 2) - (arrowWidth / 2);
|
|
67
|
+
var left = (targetRect.left - popoverRect.left) + (targetRect.width / 2) - (arrowWidth / 2);
|
|
68
|
+
left = left < 0 ? 0 : left;
|
|
69
|
+
left = left + arrowWidth > popoverRect.width ? popoverRect.width - arrowWidth : left;
|
|
70
|
+
top = top < 0 ? 0 : top;
|
|
71
|
+
top = top + arrowWidth > popoverRect.height ? popoverRect.height - arrowWidth : top;
|
|
72
|
+
switch (position) {
|
|
73
|
+
case 'right':
|
|
74
|
+
return {
|
|
75
|
+
borderTop: arrowSize + "px solid transparent",
|
|
76
|
+
borderBottom: arrowSize + "px solid transparent",
|
|
77
|
+
borderRight: arrowSize + "px solid " + arrowColor,
|
|
78
|
+
left: 0,
|
|
79
|
+
top: top,
|
|
80
|
+
};
|
|
81
|
+
case 'left':
|
|
82
|
+
return {
|
|
83
|
+
borderTop: arrowSize + "px solid transparent",
|
|
84
|
+
borderBottom: arrowSize + "px solid transparent",
|
|
85
|
+
borderLeft: arrowSize + "px solid " + arrowColor,
|
|
86
|
+
right: 0,
|
|
87
|
+
top: top,
|
|
88
|
+
};
|
|
89
|
+
case 'bottom':
|
|
90
|
+
return {
|
|
91
|
+
borderLeft: arrowSize + "px solid transparent",
|
|
92
|
+
borderRight: arrowSize + "px solid transparent",
|
|
93
|
+
borderBottom: arrowSize + "px solid " + arrowColor,
|
|
94
|
+
top: 0,
|
|
95
|
+
left: left,
|
|
96
|
+
};
|
|
97
|
+
case 'top':
|
|
98
|
+
default:
|
|
99
|
+
return {
|
|
100
|
+
borderLeft: arrowSize + "px solid transparent",
|
|
101
|
+
borderRight: arrowSize + "px solid transparent",
|
|
102
|
+
borderTop: arrowSize + "px solid " + arrowColor,
|
|
103
|
+
bottom: 0,
|
|
104
|
+
left: left,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
})(), arrowStyle) }),
|
|
108
|
+
children));
|
|
109
|
+
};
|
|
110
|
+
ArrowContainer$1.ArrowContainer = ArrowContainer;
|
|
111
|
+
|
|
112
|
+
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
|
113
|
+
var extendStatics = function (d, b) {
|
|
114
|
+
extendStatics = Object.setPrototypeOf ||
|
|
115
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
116
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
117
|
+
return extendStatics(d, b);
|
|
118
|
+
};
|
|
119
|
+
return function (d, b) {
|
|
120
|
+
extendStatics(d, b);
|
|
121
|
+
function __() { this.constructor = d; }
|
|
122
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
123
|
+
};
|
|
124
|
+
})();
|
|
125
|
+
Object.defineProperty(Popover$2, "__esModule", { value: true });
|
|
126
|
+
var React = React__default;
|
|
127
|
+
var react_dom_1 = ReactDOM__default;
|
|
128
|
+
var util_1 = util;
|
|
129
|
+
var ArrowContainer_1 = ArrowContainer$1;
|
|
130
|
+
Popover$2.ArrowContainer = ArrowContainer_1.ArrowContainer;
|
|
131
|
+
var Popover$1 = /** @class */ (function (_super) {
|
|
132
|
+
__extends(Popover, _super);
|
|
133
|
+
function Popover() {
|
|
134
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
135
|
+
_this.target = null;
|
|
136
|
+
_this.targetRect = null;
|
|
137
|
+
_this.targetPositionIntervalHandler = null;
|
|
138
|
+
_this.popoverDiv = null;
|
|
139
|
+
_this.positionOrder = null;
|
|
140
|
+
_this.willUnmount = false;
|
|
141
|
+
_this.willMount = false;
|
|
142
|
+
_this.onResize = function (e) {
|
|
143
|
+
_this.renderPopover();
|
|
144
|
+
};
|
|
145
|
+
_this.onClick = function (e) {
|
|
146
|
+
var _a = _this.props, onClickOutside = _a.onClickOutside, isOpen = _a.isOpen;
|
|
147
|
+
if (!_this.willUnmount && !_this.willMount && !_this.popoverDiv.contains(e.target) && !_this.target.contains(e.target) && onClickOutside && isOpen) {
|
|
148
|
+
onClickOutside(e);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
return _this;
|
|
152
|
+
}
|
|
153
|
+
Popover.prototype.componentDidMount = function () {
|
|
154
|
+
var _this = this;
|
|
155
|
+
window.setTimeout(function () { return _this.willMount = false; });
|
|
156
|
+
var _a = this.props, position = _a.position, isOpen = _a.isOpen;
|
|
157
|
+
this.target = react_dom_1.findDOMNode(this);
|
|
158
|
+
this.positionOrder = this.getPositionPriorityOrder(position);
|
|
159
|
+
this.updatePopover(isOpen);
|
|
160
|
+
};
|
|
161
|
+
Popover.prototype.componentDidUpdate = function (prevProps) {
|
|
162
|
+
if (this.target == null) {
|
|
163
|
+
this.target = react_dom_1.findDOMNode(this);
|
|
164
|
+
}
|
|
165
|
+
var prevIsOpen = prevProps.isOpen, prevPosition = prevProps.position, prevBody = prevProps.content;
|
|
166
|
+
var _a = this.props, isOpen = _a.isOpen, content = _a.content, position = _a.position;
|
|
167
|
+
this.positionOrder = this.getPositionPriorityOrder(this.props.position);
|
|
168
|
+
var hasNewDestination = prevProps.contentDestination !== this.props.contentDestination;
|
|
169
|
+
if (prevIsOpen !== isOpen ||
|
|
170
|
+
prevBody !== content ||
|
|
171
|
+
prevPosition !== position ||
|
|
172
|
+
hasNewDestination) {
|
|
173
|
+
if (hasNewDestination) {
|
|
174
|
+
this.removePopover();
|
|
175
|
+
this.popoverDiv.remove();
|
|
176
|
+
}
|
|
177
|
+
this.updatePopover(isOpen);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
Popover.prototype.componentWillMount = function () {
|
|
181
|
+
this.willUnmount = false;
|
|
182
|
+
this.willMount = true;
|
|
183
|
+
};
|
|
184
|
+
Popover.prototype.componentWillUnmount = function () {
|
|
185
|
+
this.willUnmount = true;
|
|
186
|
+
this.removePopover();
|
|
187
|
+
};
|
|
188
|
+
Popover.prototype.render = function () {
|
|
189
|
+
return this.props.children;
|
|
190
|
+
};
|
|
191
|
+
Popover.prototype.updatePopover = function (isOpen) {
|
|
192
|
+
if (isOpen && this.target != null) {
|
|
193
|
+
if (!this.popoverDiv || !this.popoverDiv.parentNode) {
|
|
194
|
+
var transitionDuration = this.props.transitionDuration;
|
|
195
|
+
this.popoverDiv = this.createContainer();
|
|
196
|
+
this.popoverDiv.style.opacity = '0';
|
|
197
|
+
this.popoverDiv.style.transition = "opacity " + (transitionDuration || util_1.Constants.FADE_TRANSITION) + "s";
|
|
198
|
+
(this.props.contentDestination || window.document.body).appendChild(this.popoverDiv);
|
|
199
|
+
window.addEventListener('resize', this.onResize);
|
|
200
|
+
window.addEventListener('click', this.onClick);
|
|
201
|
+
}
|
|
202
|
+
this.renderPopover();
|
|
203
|
+
}
|
|
204
|
+
else if (this.popoverDiv && this.popoverDiv.parentNode) {
|
|
205
|
+
this.removePopover();
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
Popover.prototype.renderPopover = function (positionIndex) {
|
|
209
|
+
var _this = this;
|
|
210
|
+
if (positionIndex === void 0) { positionIndex = 0; }
|
|
211
|
+
if (positionIndex >= this.positionOrder.length) {
|
|
212
|
+
this.removePopover();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
this.renderWithPosition({ position: this.positionOrder[positionIndex], targetRect: this.target.getBoundingClientRect() }, function (violation, rect) {
|
|
216
|
+
var _a;
|
|
217
|
+
var _b = _this.props, disableReposition = _b.disableReposition, contentLocation = _b.contentLocation;
|
|
218
|
+
if (violation && !disableReposition && !(typeof contentLocation === 'object')) {
|
|
219
|
+
_this.renderPopover(positionIndex + 1);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
var _c = _this.props, contentLocation_1 = _c.contentLocation, align = _c.align;
|
|
223
|
+
var _d = _this.getNudgedPopoverPosition(rect), nudgedTop = _d.top, nudgedLeft = _d.left;
|
|
224
|
+
var rectTop = rect.top, rectLeft = rect.left;
|
|
225
|
+
var position = _this.positionOrder[positionIndex];
|
|
226
|
+
var _e = disableReposition ? { top: rectTop, left: rectLeft } : { top: nudgedTop, left: nudgedLeft }, top_1 = _e.top, left = _e.left;
|
|
227
|
+
if (contentLocation_1) {
|
|
228
|
+
var targetRect = _this.target.getBoundingClientRect();
|
|
229
|
+
var popoverRect = _this.popoverDiv.getBoundingClientRect();
|
|
230
|
+
(_a = typeof contentLocation_1 === 'function' ? contentLocation_1({ targetRect: targetRect, popoverRect: popoverRect, position: position, align: align, nudgedLeft: nudgedLeft, nudgedTop: nudgedTop }) : contentLocation_1, top_1 = _a.top, left = _a.left);
|
|
231
|
+
_this.popoverDiv.style.left = left.toFixed() + "px";
|
|
232
|
+
_this.popoverDiv.style.top = top_1.toFixed() + "px";
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
var destinationTopOffset = 0;
|
|
236
|
+
var destinationLeftOffset = 0;
|
|
237
|
+
if (_this.props.contentDestination) {
|
|
238
|
+
var destRect = _this.props.contentDestination.getBoundingClientRect();
|
|
239
|
+
destinationTopOffset = -destRect.top;
|
|
240
|
+
destinationLeftOffset = -destRect.left;
|
|
241
|
+
}
|
|
242
|
+
var _f = [top_1 + window.pageYOffset, left + window.pageXOffset], absoluteTop = _f[0], absoluteLeft = _f[1];
|
|
243
|
+
var finalLeft = absoluteLeft + destinationTopOffset;
|
|
244
|
+
var finalTop = absoluteTop + destinationLeftOffset;
|
|
245
|
+
_this.popoverDiv.style.left = finalLeft.toFixed() + "px";
|
|
246
|
+
_this.popoverDiv.style.top = finalTop.toFixed() + "px";
|
|
247
|
+
}
|
|
248
|
+
_this.popoverDiv.style.width = null;
|
|
249
|
+
_this.popoverDiv.style.height = null;
|
|
250
|
+
_this.renderWithPosition({
|
|
251
|
+
position: position,
|
|
252
|
+
nudgedTop: nudgedTop - rect.top,
|
|
253
|
+
nudgedLeft: nudgedLeft - rect.left,
|
|
254
|
+
targetRect: _this.target.getBoundingClientRect(),
|
|
255
|
+
popoverRect: _this.popoverDiv.getBoundingClientRect(),
|
|
256
|
+
}, function () {
|
|
257
|
+
_this.startTargetPositionListener(10);
|
|
258
|
+
if (_this.popoverDiv.style.opacity !== '1') {
|
|
259
|
+
_this.popoverDiv.style.opacity = '1';
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
};
|
|
265
|
+
Popover.prototype.startTargetPositionListener = function (checkInterval) {
|
|
266
|
+
var _this = this;
|
|
267
|
+
if (this.targetPositionIntervalHandler === null) {
|
|
268
|
+
this.targetPositionIntervalHandler = window.setInterval(function () {
|
|
269
|
+
var newTargetRect = _this.target.getBoundingClientRect();
|
|
270
|
+
if (_this.targetPositionHasChanged(_this.targetRect, newTargetRect)) {
|
|
271
|
+
_this.renderPopover();
|
|
272
|
+
}
|
|
273
|
+
_this.targetRect = newTargetRect;
|
|
274
|
+
}, checkInterval);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
Popover.prototype.renderWithPosition = function (_a, callback) {
|
|
278
|
+
var _this = this;
|
|
279
|
+
var position = _a.position, _b = _a.nudgedLeft, nudgedLeft = _b === void 0 ? 0 : _b, _c = _a.nudgedTop, nudgedTop = _c === void 0 ? 0 : _c, _d = _a.targetRect, targetRect = _d === void 0 ? util_1.Constants.EMPTY_CLIENT_RECT : _d, _e = _a.popoverRect, popoverRect = _e === void 0 ? util_1.Constants.EMPTY_CLIENT_RECT : _e;
|
|
280
|
+
var _f = this.props, padding = _f.windowBorderPadding, content = _f.content, align = _f.align;
|
|
281
|
+
var getContent = function (args) {
|
|
282
|
+
return typeof content === 'function'
|
|
283
|
+
? content(args)
|
|
284
|
+
: content;
|
|
285
|
+
};
|
|
286
|
+
react_dom_1.unstable_renderSubtreeIntoContainer(this, getContent({ position: position, nudgedLeft: nudgedLeft, nudgedTop: nudgedTop, targetRect: targetRect, popoverRect: popoverRect, align: align }), this.popoverDiv, function () {
|
|
287
|
+
if (_this.willUnmount) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
var targetRect = _this.target.getBoundingClientRect();
|
|
291
|
+
var popoverRect = _this.popoverDiv.getBoundingClientRect();
|
|
292
|
+
var _a = _this.getLocationForPosition(position, targetRect, popoverRect), top = _a.top, left = _a.left;
|
|
293
|
+
callback(position === 'top' && top < padding ||
|
|
294
|
+
position === 'left' && left < padding ||
|
|
295
|
+
position === 'right' && left + popoverRect.width > window.innerWidth - padding ||
|
|
296
|
+
position === 'bottom' && top + popoverRect.height > window.innerHeight - padding, { width: popoverRect.width, height: popoverRect.height, top: top, left: left });
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
Popover.prototype.getNudgedPopoverPosition = function (_a) {
|
|
300
|
+
var top = _a.top, left = _a.left, width = _a.width, height = _a.height;
|
|
301
|
+
var padding = this.props.windowBorderPadding;
|
|
302
|
+
top = top < padding ? padding : top;
|
|
303
|
+
top = top + height > window.innerHeight - padding ? window.innerHeight - padding - height : top;
|
|
304
|
+
left = left < padding ? padding : left;
|
|
305
|
+
left = left + width > window.innerWidth - padding ? window.innerWidth - padding - width : left;
|
|
306
|
+
return { top: top, left: left };
|
|
307
|
+
};
|
|
308
|
+
Popover.prototype.removePopover = function () {
|
|
309
|
+
var _this = this;
|
|
310
|
+
if (this.popoverDiv) {
|
|
311
|
+
var transitionDuration = this.props.transitionDuration;
|
|
312
|
+
this.popoverDiv.style.opacity = '0';
|
|
313
|
+
var remove = function () {
|
|
314
|
+
if (_this.willUnmount || !_this.props.isOpen || !_this.popoverDiv.parentNode) {
|
|
315
|
+
window.clearInterval(_this.targetPositionIntervalHandler);
|
|
316
|
+
window.removeEventListener('resize', _this.onResize);
|
|
317
|
+
window.removeEventListener('click', _this.onClick);
|
|
318
|
+
_this.targetPositionIntervalHandler = null;
|
|
319
|
+
if (_this.popoverDiv.parentNode) {
|
|
320
|
+
_this.popoverDiv.parentNode.removeChild(_this.popoverDiv);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
if (!this.willUnmount) {
|
|
325
|
+
window.setTimeout(remove, (transitionDuration || util_1.Constants.FADE_TRANSITION) * 1000);
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
remove();
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
Popover.prototype.getPositionPriorityOrder = function (position) {
|
|
333
|
+
if (position && typeof position !== 'string') {
|
|
334
|
+
if (util_1.Constants.DEFAULT_POSITIONS.every(function (defaultPosition) { return position.find(function (p) { return p === defaultPosition; }) !== undefined; })) {
|
|
335
|
+
return util_1.arrayUnique(position);
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
var remainingPositions = util_1.Constants.DEFAULT_POSITIONS.filter(function (defaultPosition) { return position.find(function (p) { return p === defaultPosition; }) === undefined; });
|
|
339
|
+
return util_1.arrayUnique(position.concat(remainingPositions));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
else if (position && typeof position === 'string') {
|
|
343
|
+
var remainingPositions = util_1.Constants.DEFAULT_POSITIONS.filter(function (defaultPosition) { return defaultPosition !== position; });
|
|
344
|
+
return util_1.arrayUnique([position].concat(remainingPositions));
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
Popover.prototype.createContainer = function () {
|
|
348
|
+
var _a = this.props, containerStyle = _a.containerStyle, containerClassName = _a.containerClassName;
|
|
349
|
+
var container = window.document.createElement('div');
|
|
350
|
+
container.style.overflow = 'hidden';
|
|
351
|
+
if (containerStyle) {
|
|
352
|
+
Object.keys(containerStyle).forEach(function (key) { return container.style[key] = containerStyle[key]; });
|
|
353
|
+
}
|
|
354
|
+
container.className = containerClassName;
|
|
355
|
+
container.style.position = 'absolute';
|
|
356
|
+
container.style.top = '0';
|
|
357
|
+
container.style.left = '0';
|
|
358
|
+
return container;
|
|
359
|
+
};
|
|
360
|
+
Popover.prototype.getLocationForPosition = function (position, newTargetRect, popoverRect) {
|
|
361
|
+
var _a = this.props, padding = _a.padding, align = _a.align;
|
|
362
|
+
var targetMidX = newTargetRect.left + (newTargetRect.width / 2);
|
|
363
|
+
var targetMidY = newTargetRect.top + (newTargetRect.height / 2);
|
|
364
|
+
var top;
|
|
365
|
+
var left;
|
|
366
|
+
switch (position) {
|
|
367
|
+
case 'top':
|
|
368
|
+
top = newTargetRect.top - popoverRect.height - padding;
|
|
369
|
+
left = targetMidX - (popoverRect.width / 2);
|
|
370
|
+
if (align === 'start') {
|
|
371
|
+
left = newTargetRect.left;
|
|
372
|
+
}
|
|
373
|
+
if (align === 'end') {
|
|
374
|
+
left = newTargetRect.right - popoverRect.width;
|
|
375
|
+
}
|
|
376
|
+
break;
|
|
377
|
+
case 'left':
|
|
378
|
+
top = targetMidY - (popoverRect.height / 2);
|
|
379
|
+
left = newTargetRect.left - padding - popoverRect.width;
|
|
380
|
+
if (align === 'start') {
|
|
381
|
+
top = newTargetRect.top;
|
|
382
|
+
}
|
|
383
|
+
if (align === 'end') {
|
|
384
|
+
top = newTargetRect.bottom - popoverRect.height;
|
|
385
|
+
}
|
|
386
|
+
break;
|
|
387
|
+
case 'bottom':
|
|
388
|
+
top = newTargetRect.bottom + padding;
|
|
389
|
+
left = targetMidX - (popoverRect.width / 2);
|
|
390
|
+
if (align === 'start') {
|
|
391
|
+
left = newTargetRect.left;
|
|
392
|
+
}
|
|
393
|
+
if (align === 'end') {
|
|
394
|
+
left = newTargetRect.right - popoverRect.width;
|
|
395
|
+
}
|
|
396
|
+
break;
|
|
397
|
+
case 'right':
|
|
398
|
+
top = targetMidY - (popoverRect.height / 2);
|
|
399
|
+
left = newTargetRect.right + padding;
|
|
400
|
+
if (align === 'start') {
|
|
401
|
+
top = newTargetRect.top;
|
|
402
|
+
}
|
|
403
|
+
if (align === 'end') {
|
|
404
|
+
top = newTargetRect.bottom - popoverRect.height;
|
|
405
|
+
}
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
return { top: top, left: left };
|
|
409
|
+
};
|
|
410
|
+
Popover.prototype.targetPositionHasChanged = function (oldTargetRect, newTargetRect) {
|
|
411
|
+
return oldTargetRect === null
|
|
412
|
+
|| oldTargetRect.left !== newTargetRect.left
|
|
413
|
+
|| oldTargetRect.top !== newTargetRect.top
|
|
414
|
+
|| oldTargetRect.width !== newTargetRect.width
|
|
415
|
+
|| oldTargetRect.height !== newTargetRect.height;
|
|
416
|
+
};
|
|
417
|
+
Popover.defaultProps = {
|
|
418
|
+
padding: util_1.Constants.DEFAULT_PADDING,
|
|
419
|
+
windowBorderPadding: util_1.Constants.DEFAULT_WINDOW_PADDING,
|
|
420
|
+
position: ['top', 'right', 'left', 'bottom'],
|
|
421
|
+
align: 'center',
|
|
422
|
+
containerClassName: util_1.Constants.POPOVER_CONTAINER_CLASS_NAME,
|
|
423
|
+
};
|
|
424
|
+
return Popover;
|
|
425
|
+
}(React.Component));
|
|
426
|
+
var _default = Popover$2.default = Popover$1;
|
|
427
|
+
|
|
428
|
+
var css_248z = "[data-gene-ui-version=\"2.15.1\"] .popover-positioner{--popover-border-radius:1rem;--popover-shadow:0 0.2rem 0.4rem 0 #0000000d,0 0 0 1px rgba(var(--background-sc-rgb),0.08);z-index:400}[data-gene-ui-version=\"2.15.1\"] .popover-positioner.cr-smooth-radius{--popover-border-radius:0.4rem}[data-gene-ui-version=\"2.15.1\"] .popover-positioner.mobile-view{--popover-border-radius:0.8rem 0.8rem 0 0;--popover-shadow:0 -1px 0.2rem 0 #0000000d;bottom:0;left:0!important;overflow:hidden;position:fixed!important;top:0!important;width:100%}[data-gene-ui-version=\"2.15.1\"] .popover-positioner .popover-top-bottom-padding{padding:1rem 0;width:100%}[data-gene-ui-version=\"2.15.1\"] .popover-positioner .popover-top-bottom-padding>div[style*=width]{width:100%!important}[data-gene-ui-version=\"2.15.1\"] .popover{width:100%}[data-gene-ui-version=\"2.15.1\"] .popover-positioner.mobile-view .popover{height:100%;position:relative}[data-gene-ui-version=\"2.15.1\"] .popover-content{background:var(--background);border-radius:var(--popover-border-radius);box-shadow:var(--popover-shadow);overflow:hidden;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s;width:100%}[data-gene-ui-version=\"2.15.1\"] .popover-positioner.mobile-view .popover-content{-webkit-overflow-scrolling:auto;bottom:0;left:0;max-height:calc(100% - 10rem);overflow-x:hidden;overflow-y:auto;position:absolute;z-index:1}[data-gene-ui-version=\"2.15.1\"] .popover-positioner.mobile-view[style*=\"opacity: 0\"] .popover-content{transform:translateY(100%)}[data-gene-ui-version=\"2.15.1\"] .popover-positioner.mobile-view .popover-content{transform:translateY(0)}[data-gene-ui-version=\"2.15.1\"] .fullHeight{height:100%}[data-gene-ui-version=\"2.15.1\"] .popover-mobile-backdrop{background:#0003;height:100%;left:0;opacity:1;position:absolute;top:0;width:100%;z-index:0}[data-gene-ui-version=\"2.15.1\"] .popover-footer,[data-gene-ui-version=\"2.15.1\"] .popover-header{background:var(--background);position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"2.15.1\"] .popover-header{border-bottom:1px solid rgba(var(--background-sc-rgb),.1);top:0}[data-gene-ui-version=\"2.15.1\"] .popover-footer{align-items:stretch;border-top:1px solid rgba(var(--background-sc-rgb),.1);bottom:calc(env(safe-area-inset-bottom)*-1);display:flex;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s}[data-gene-ui-version=\"2.15.1\"] .popover-body{position:relative;z-index:0}[data-gene-ui-version=\"2.15.1\"] .popover-search{padding:1.4rem 1.5rem}[data-gene-ui-version=\"2.15.1\"] .empty-data-holder{align-items:center;display:flex;height:19rem;justify-content:center;width:100%}[data-gene-ui-version=\"2.15.1\"] .popover-disabled{opacity:.5;pointer-events:none;transition:opacity .5s}";
|
|
24
429
|
styleInject(css_248z);
|
|
25
430
|
|
|
26
431
|
const setRef = (ref, currentRef) => {
|
package/PopoverV2/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { P as default } from '../index-
|
|
3
|
+
export { P as default } from '../index-664c705c.js';
|
|
4
4
|
import '../index-122432cd.js';
|
|
5
5
|
import '../index-031ff73c.js';
|
|
6
6
|
import 'prop-types';
|
|
7
7
|
import '../index-a0e4e333.js';
|
|
8
8
|
import '../hooks/useDeviceType.js';
|
|
9
9
|
import '../hooks/useClickOutside.js';
|
|
10
|
-
import '../configs-
|
|
10
|
+
import '../configs-00612ce0.js';
|
|
11
11
|
import '../Scrollbar/index.js';
|
|
12
12
|
import '../GeneUIProvider/index.js';
|
|
13
13
|
import '../debounce-4419bc2f.js';
|
package/Products/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classnames } from '../index-031ff73c.js';
|
|
5
|
-
import { s as screenTypes } from '../configs-
|
|
5
|
+
import { s as screenTypes } from '../configs-00612ce0.js';
|
|
6
6
|
import '../dateValidation-67caec66.js';
|
|
7
7
|
import 'react-dom';
|
|
8
8
|
import useDeviceType from '../hooks/useDeviceType.js';
|
|
@@ -14,7 +14,7 @@ import '../hooks/useWindowSize.js';
|
|
|
14
14
|
import '../hooks/useDebounce.js';
|
|
15
15
|
import '../tslib.es6-f211516f.js';
|
|
16
16
|
|
|
17
|
-
var css_248z = "[data-gene-ui-version=\"2.15.
|
|
17
|
+
var css_248z = "[data-gene-ui-version=\"2.15.1\"] .products-switcher-holder{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:.5rem 2rem;text-align:center;width:100%}[data-gene-ui-version=\"2.15.1\"] .products-switcher-holder .divider{margin-left:auto;margin-right:auto}[data-gene-ui-version=\"2.15.1\"] .product-item{border:1px solid #0000;border-radius:1rem;cursor:pointer;display:flex;flex-wrap:wrap;font:600 1.2rem/1.42 var(--font-family);justify-content:center;margin:.5rem 0;padding:1rem .5rem;text-align:center;width:33.3333333333%}[data-gene-ui-version=\"2.15.1\"] .product-item .icon{align-items:center;background:rgba(var(--background-sc-rgb),.05);border-radius:100%;display:flex;height:5rem;justify-content:center;margin:0 0 .5rem;transition:color .2s,background .2s;width:5rem}[data-gene-ui-version=\"2.15.1\"] .product-item p{width:100%}@media (hover:hover){[data-gene-ui-version=\"2.15.1\"] .product-item:hover .icon{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.15.1\"] .product-item.active .icon{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"2.15.1\"] .product-item.active{pointer-events:none}@media (hover:hover){[data-gene-ui-version=\"2.15.1\"] .product-item:hover{border-color:rgba(var(--background-sc-rgb),.11)}}";
|
|
18
18
|
styleInject(css_248z);
|
|
19
19
|
|
|
20
20
|
function Products(_ref) {
|
package/Profile/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
|
2
2
|
import React__default, { useRef, useState, useEffect, useMemo, useCallback } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classnames } from '../index-031ff73c.js';
|
|
5
|
-
import { s as screenTypes } from '../configs-
|
|
5
|
+
import { s as screenTypes } from '../configs-00612ce0.js';
|
|
6
6
|
import { c as childrenOf, n as noop } from '../index-a0e4e333.js';
|
|
7
7
|
import useToggle from '../hooks/useToggle.js';
|
|
8
8
|
import useDeviceType from '../hooks/useDeviceType.js';
|
|
@@ -11,7 +11,7 @@ import Empty from '../Empty/index.js';
|
|
|
11
11
|
import Icon from '../Icon/index.js';
|
|
12
12
|
import Popover from '../Popover/index.js';
|
|
13
13
|
import Avatar from '../Avatar/index.js';
|
|
14
|
-
import Tooltip from '../
|
|
14
|
+
import { T as Tooltip } from '../index-464ea32b.js';
|
|
15
15
|
import Menu from '../Menu/index.js';
|
|
16
16
|
import Search from '../Search/index.js';
|
|
17
17
|
import Divider from '../Divider/index.js';
|
|
@@ -22,7 +22,6 @@ import 'react-dom';
|
|
|
22
22
|
import '../hooks/useWindowSize.js';
|
|
23
23
|
import '../hooks/useDebounce.js';
|
|
24
24
|
import '../tslib.es6-f211516f.js';
|
|
25
|
-
import '../Popover-f4d1cac0.js';
|
|
26
25
|
import '../index-122432cd.js';
|
|
27
26
|
import '../hooks/useUpdatableRef.js';
|
|
28
27
|
import '../hooks/useForceUpdate.js';
|
|
@@ -38,7 +37,7 @@ import '../hooks/useKeyDown.js';
|
|
|
38
37
|
import '../config-1053d64d.js';
|
|
39
38
|
import '../callAfterDelay-7272faca.js';
|
|
40
39
|
|
|
41
|
-
var css_248z = "[data-gene-ui-version=\"2.15.
|
|
40
|
+
var css_248z = "[data-gene-ui-version=\"2.15.1\"] .profile-menu-holder{min-width:25rem;width:100%}[data-gene-ui-version=\"2.15.1\"] .user-profile-c{align-items:center;background:rgba(var(--background-sc-rgb),.05);border-radius:1.6rem;box-shadow:0 .3rem .6rem 0 #00000029;color:var(--background-sc);cursor:pointer;display:flex;font:600 1.2rem/1.6rem var(--font-family);padding:.3rem;transition:color .3s,background .3s}[data-gene-ui-version=\"2.15.1\"] .user-profile-c:focus-visible{border-radius:1.6rem;outline:.2rem var(--hero) solid}[data-gene-ui-version=\"2.15.1\"] .user-profile-c>p{max-width:25.6rem;padding:.3rem 1.6rem;-webkit-user-select:none;user-select:none}[data-gene-ui-version=\"2.15.1\"] .user-profile-c .user-profile-text-select{-webkit-user-select:auto;user-select:auto}[data-gene-ui-version=\"2.15.1\"] .user-profile-c>.icon{margin:0 .7rem 0 0}html[dir=rtl] .user-profile-c>.icon{margin:0 0 0 .7rem}[data-gene-ui-version=\"2.15.1\"] .user-profile-c:hover{background:rgba(var(--background-sc-rgb),.2)}[data-gene-ui-version=\"2.15.1\"] .user-profile-c.active{background-color:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.15.1\"] .profile-module{align-items:center;display:flex;font:600 1.7rem/2.3rem var(--font-family);margin:20px 0;width:100%}[data-gene-ui-version=\"2.15.1\"] .popover-content .profile-module{padding:0 1.5rem}[data-gene-ui-version=\"2.15.1\"] .profile-module>li:first-child{flex-shrink:0}html:not([dir=rtl]) .profile-module>li:first-child{padding-right:1.8rem}html[dir=rtl] .profile-module>li:first-child{padding-left:1.8rem}[data-gene-ui-version=\"2.15.1\"] .profile-module>li:nth-child(2){flex:auto;overflow:hidden}[data-gene-ui-version=\"2.15.1\"] .popover-holder.mobile-view .profile-module{border-bottom:1px solid rgba(var(--background-sc-rgb),.05);margin-bottom:2rem;padding:.8rem 1.4rem}[data-gene-ui-version=\"2.15.1\"] .profile-module-sub-title{font:600 1.3rem/1.7rem var(--font-family);margin:.4rem 0 0;opacity:.7}[data-gene-ui-version=\"2.15.1\"] .popover-content:has(#partners){max-height:100%;overflow:hidden}[data-gene-ui-version=\"2.15.1\"] .languages__imgWrapper{border-radius:100%;height:2.4rem;overflow:hidden;position:relative;width:2.4rem}[data-gene-ui-version=\"2.15.1\"] .languages__flagImg{display:block;height:100%;left:50%;max-width:inherit;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"2.15.1\"] .languages__title{align-items:center;display:flex;height:100%}[data-gene-ui-version=\"2.15.1\"] .languages__titleImgContainer{border-radius:100%;display:inline-block;height:1.6rem;margin:0 .8rem;overflow:hidden;position:relative;width:1.6rem}[data-gene-ui-version=\"2.15.1\"] .languages__selectedTitle{margin-inline-start:.8rem}[data-gene-ui-version=\"2.15.1\"] .languages__titleImg{display:block;height:100%;left:50%;max-width:inherit;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"2.15.1\"] .partners__searchHolder{background:var(--background);left:0;padding:10px;position:-webkit-sticky;position:sticky;top:0;z-index:10}[data-gene-ui-version=\"2.15.1\"] .partners__emptyTitle{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"2.15.1\"] .partners__title{display:flex}";
|
|
42
41
|
styleInject(css_248z);
|
|
43
42
|
|
|
44
43
|
function ProfileModule(_ref) {
|
package/Progress/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import '../_commonjsHelpers-24198af3.js';
|
|
|
11
11
|
import 'react-dom';
|
|
12
12
|
import '../tslib.es6-f211516f.js';
|
|
13
13
|
|
|
14
|
-
var css_248z = "[data-gene-ui-version=\"2.15.
|
|
14
|
+
var css_248z = "[data-gene-ui-version=\"2.15.1\"] .progress-holder{color:rgba(var(--background-sc-rgb),.64);display:flex;flex-direction:column;font:600 1.6rem/2rem var(--font-family)}[data-gene-ui-version=\"2.15.1\"] .progress-holder:not(.a-circular){width:100%}[data-gene-ui-version=\"2.15.1\"] .progress-holder.a-default.s-medium{font-size:1.4rem}[data-gene-ui-version=\"2.15.1\"] .progress-holder.a-default.s-small{font-size:1.2rem}[data-gene-ui-version=\"2.15.1\"] .progress-holder.a-default .progress-line{margin:.5rem 0 0}[data-gene-ui-version=\"2.15.1\"] .progress-holder:not(.a-default){font:700 1.2rem/1.6rem var(--font-family)}[data-gene-ui-version=\"2.15.1\"] .progress-holder:not(.a-default) .progress-sub-title{font:600 1rem/1.4rem var(--font-family);margin:.5rem 0 0;text-transform:capitalize}[data-gene-ui-version=\"2.15.1\"] .progress-holder.c-success{--hero:var(--confirm);--hero-hover:var(--confirm-hover);--hero-sc:var(--confirm-sc);--hero-rgb:var(--confirm-rgb);--hero-sc-rgb:var(--confirm-sc-rgb)}[data-gene-ui-version=\"2.15.1\"] .progress-holder.c-fail{--hero:var(--danger);--hero-hover:var(--danger-hover);--hero-sc:var(--danger-sc);--hero-rgb:var(--danger-rgb);--hero-sc-rgb:var(--danger-sc-rgb)}[data-gene-ui-version=\"2.15.1\"] .progress-holder .to-be-colored{color:var(--hero)}[data-gene-ui-version=\"2.15.1\"] .progress-holder.a-box-bar,[data-gene-ui-version=\"2.15.1\"] .progress-holder.a-box-circular{background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.1);box-shadow:0 .6rem .9rem 0 #0000000d}[data-gene-ui-version=\"2.15.1\"] .progress-holder.a-box-circular{border-radius:2rem}[data-gene-ui-version=\"2.15.1\"] .progress-line{background:rgba(var(--background-sc-rgb),.06);border-radius:1rem;display:flex;height:.8rem;width:100%}[data-gene-ui-version=\"2.15.1\"] .a-box-bar>.progress-line{background:none;border-radius:0;height:.5rem}[data-gene-ui-version=\"2.15.1\"] .s-medium .progress-line{height:.6rem}[data-gene-ui-version=\"2.15.1\"] .s-small .progress-line{height:.3rem}[data-gene-ui-version=\"2.15.1\"] .progress-line .progress-line-fill{background:var(--hero);border-radius:inherit;max-width:100%;transition:width .3s}[data-gene-ui-version=\"2.15.1\"] .a-linear .progress-line{background:rgba(var(--background-sc-rgb),.19);height:1.6rem}[data-gene-ui-version=\"2.15.1\"] .a-linear .progress-line .progress-line-fill{animation:linear-animation .8s linear infinite;background:repeating-linear-gradient(-45deg,rgba(var(--background-sc-rgb),.34),rgba(var(--background-sc-rgb),.34) 1rem,#0000 1rem,#0000 2rem) 0 0/11.3rem 10rem}@keyframes linear-animation{to{background-position:11.3rem 0}}[data-gene-ui-version=\"2.15.1\"] .a-linear.s-small .progress-line{height:.8rem}[data-gene-ui-version=\"2.15.1\"] .progress-structure{align-items:center;display:flex}[data-gene-ui-version=\"2.15.1\"] .a-detailed>.progress-structure{min-height:5.2rem}[data-gene-ui-version=\"2.15.1\"] .a-box-bar>.progress-structure,[data-gene-ui-version=\"2.15.1\"] .a-box-circular>.progress-structure{min-height:7.3rem;padding:0 2rem}[data-gene-ui-version=\"2.15.1\"] .a-box-circular>.progress-structure{min-height:7.8rem}[data-gene-ui-version=\"2.15.1\"] .progress-structure .left-info{flex:auto;overflow:hidden}[data-gene-ui-version=\"2.15.1\"] .progress-structure .right-info{flex-shrink:0}[data-gene-ui-version=\"2.15.1\"] .progress-structure .blended{color:rgba(var(--background-sc-rgb),.06)}[data-gene-ui-version=\"2.15.1\"] .progress-structure .bc-icon-success{color:var(--confirm);margin:0 .8rem}[data-gene-ui-version=\"2.15.1\"] .progress-structure .left-additional-info{font:600 1.6rem/2rem var(--font-family);margin:0 4rem 0 0;width:5rem}html[dir=rtl] .progress-structure .left-additional-info{margin:0 0 0 4rem}[data-gene-ui-version=\"2.15.1\"] .progress-actions{align-items:center;display:flex}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner{--size:12rem;--borderSize:0.8rem;font:600 2.2rem/2.6rem var(--font-family);height:var(--size);position:relative;width:var(--size)}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner:hover .layer-text,[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner:not(:hover) .layer-action{opacity:0}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner .icon{cursor:pointer}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner:not(.s-very-small) .icon{font-size:3.6rem}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner.s-medium{--size:10rem;--borderSize:0.6rem;font-size:2rem}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner.s-small{--size:8rem;--borderSize:0.5rem;font-size:1.8rem}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner.s-small .icon{font-size:3rem}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner.s-very-small{--size:5rem;--borderSize:0.4rem;font-size:1.2rem;font-weight:700}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner svg{display:block;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.15.1\"] .circular-progress-inner svg path{stroke:var(--hero);stroke-dasharray:0,30rem;stroke-dashoffset:0;stroke-linecap:round;stroke-width:6;fill-opacity:0}[data-gene-ui-version=\"2.15.1\"] .circular-progress-back{border:var(--borderSize) solid rgba(var(--background-sc-rgb),.06);border-radius:100%;height:100%;width:100%}[data-gene-ui-version=\"2.15.1\"] .circular-progress-layer{display:flex;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%}[data-gene-ui-version=\"2.15.1\"] .circular-progress-layer>div{transition:opacity .3s}[data-gene-ui-version=\"2.15.1\"] .circular-progress-layer .layer-action{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}[data-gene-ui-version=\"2.15.1\"] .linear-progress-text{font:600 1.8rem/2.2rem var(--font-family);margin:.5rem 0 0;text-align:center;width:100%}[data-gene-ui-version=\"2.15.1\"] .on-hover-layers{align-items:center;display:flex;justify-content:center;min-height:4rem;min-width:4rem;position:relative}[data-gene-ui-version=\"2.15.1\"] .on-hover-layers>li{transition:opacity .3s}[data-gene-ui-version=\"2.15.1\"] .on-hover-layers>li:nth-child(2){height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.15.1\"] .progress-holder:hover .on-hover-layers>li:nth-child(2){opacity:1}[data-gene-ui-version=\"2.15.1\"] .progress-holder:hover .on-hover-layers>li:nth-last-child(2){opacity:0}";
|
|
15
15
|
styleInject(css_248z);
|
|
16
16
|
|
|
17
17
|
function Progress(_ref) {
|
package/Radio/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
|
2
2
|
import React__default, { forwardRef, useMemo } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classnames } from '../index-031ff73c.js';
|
|
5
|
-
import { c as checkboxRadioSwitcherConfig } from '../configs-
|
|
5
|
+
import { c as checkboxRadioSwitcherConfig } from '../configs-00612ce0.js';
|
|
6
6
|
import { i as interceptValue } from '../index-a0e4e333.js';
|
|
7
7
|
import '../checkboxRadioSwitcher-5b69d7bd.js';
|
|
8
8
|
import { g as guid } from '../guid-8ddf77b3.js';
|
package/RadioGroup/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import Radio from '../Radio/index.js';
|
|
|
7
7
|
import '../dateValidation-67caec66.js';
|
|
8
8
|
import '../_commonjsHelpers-24198af3.js';
|
|
9
9
|
import 'react-dom';
|
|
10
|
-
import '../configs-
|
|
10
|
+
import '../configs-00612ce0.js';
|
|
11
11
|
import '../checkboxRadioSwitcher-5b69d7bd.js';
|
|
12
12
|
import '../style-inject.es-746bb8ed.js';
|
|
13
13
|
import '../guid-8ddf77b3.js';
|
package/Range/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
|
2
2
|
import React__default, { useState, useRef, useCallback } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classnames } from '../index-031ff73c.js';
|
|
5
|
-
import { c as createSliderWithTooltip, R as Range } from '../rangeAndSlider-
|
|
5
|
+
import { c as createSliderWithTooltip, R as Range } from '../rangeAndSlider-693a3d41.js';
|
|
6
6
|
import useWidth from '../hooks/useWidth.js';
|
|
7
7
|
import '../dateValidation-67caec66.js';
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import useToggle from '../hooks/useToggle.js';
|
|
10
|
-
import '../configs-
|
|
10
|
+
import '../configs-00612ce0.js';
|
|
11
11
|
import '../_commonjsHelpers-24198af3.js';
|
|
12
12
|
import '../index-45eafea6.js';
|
|
13
13
|
import '../react-lifecycles-compat.es-6e1f3768.js';
|
package/Rating/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function SvgSquareMajor(props) {
|
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
var css_248z = "[data-gene-ui-version=\"2.15.
|
|
24
|
+
var css_248z = "[data-gene-ui-version=\"2.15.1\"] .rating{box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}[data-gene-ui-version=\"2.15.1\"] .rating *>svg{color:unset!important}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper{display:flex;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;justify-content:center;position:relative;transition:transform .1s ease-in;width:100%}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper:hover{cursor:pointer;transform:scale(1.1)}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper-readonly{pointer-events:none}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper:focus-visible{outline:.02rem solid var(--hero)}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper-small:not(:first-child){margin-inline-start:.4rem}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper-medium:not(:first-child){margin-inline-start:.8rem}[data-gene-ui-version=\"2.15.1\"] .rating__wrapper-big:not(:first-child){margin-inline-start:1.2rem}[data-gene-ui-version=\"2.15.1\"] .rating__element{height:100%;inset-inline-start:0;overflow:hidden;position:absolute;top:0;width:100%;z-index:7}[data-gene-ui-version=\"2.15.1\"] .rating__icon-small{font-size:3.2rem}[data-gene-ui-version=\"2.15.1\"] .rating__icon-medium{font-size:3.6rem}[data-gene-ui-version=\"2.15.1\"] .rating__icon-big{font-size:4.2rem}";
|
|
25
25
|
styleInject(css_248z);
|
|
26
26
|
|
|
27
27
|
const sizes = { small: 32, medium: 36, big: 42 };
|
|
@@ -49,9 +49,9 @@ const Rating = (props) => {
|
|
|
49
49
|
const [temporaryRating, setTemporaryRating] = useState(0);
|
|
50
50
|
const [disableMouseMove, setDisableMouseMove] = useState(false);
|
|
51
51
|
const calculateRegardingPosition = (e) => {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const getRelativeWidth = Math.abs((getClientPosition /
|
|
52
|
+
const { left, width } = e.currentTarget.getBoundingClientRect();
|
|
53
|
+
const getClientPosition = e.clientX - (isRTLMode ? left + width : left);
|
|
54
|
+
const getRelativeWidth = Math.abs((getClientPosition / width) * 100);
|
|
55
55
|
return halfAllow && getRelativeWidth <= 50 ? 50 : 100;
|
|
56
56
|
};
|
|
57
57
|
const handleMouseMoveForElement = (e, currentRating) => {
|