@dreamcommerce/aurora 2.4.3-6 → 2.4.3
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/build/cjs/packages/aurora/src/components/dropdown/components/content.js +6 -5
- package/build/cjs/packages/aurora/src/components/dropdown/components/content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/utilities.js +5 -1
- package/build/cjs/packages/aurora/src/components/dropdown/utilities.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/label/index.js +3 -2
- package/build/cjs/packages/aurora/src/components/label/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/loader/constants.js +8 -6
- package/build/cjs/packages/aurora/src/components/loader/constants.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/loader/css_classes.js +2 -0
- package/build/cjs/packages/aurora/src/components/loader/css_classes.js.map +1 -1
- package/build/cjs/packages/aurora/src/css/loader/main.module.less.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/content.js +7 -6
- package/build/esm/packages/aurora/src/components/dropdown/components/content.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/utilities.d.ts +2 -1
- package/build/esm/packages/aurora/src/components/dropdown/utilities.js +5 -2
- package/build/esm/packages/aurora/src/components/dropdown/utilities.js.map +1 -1
- package/build/esm/packages/aurora/src/components/label/index.js +3 -2
- package/build/esm/packages/aurora/src/components/label/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/loader/constants.d.ts +8 -6
- package/build/esm/packages/aurora/src/components/loader/constants.js +9 -7
- package/build/esm/packages/aurora/src/components/loader/constants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/loader/css_classes.d.ts +1 -0
- package/build/esm/packages/aurora/src/components/loader/css_classes.js +2 -1
- package/build/esm/packages/aurora/src/components/loader/css_classes.js.map +1 -1
- package/build/esm/packages/aurora/src/css/loader/main.module.less.js +2 -2
- package/package.json +1 -1
|
@@ -45,14 +45,14 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
45
45
|
const checkIfIsOutsideTopViewport = () => {
|
|
46
46
|
if (!contentRef.current)
|
|
47
47
|
return;
|
|
48
|
-
const bounding = contentRef.current
|
|
48
|
+
const bounding = utilities.getBounding(contentRef.current);
|
|
49
49
|
return bounding.top <= 0;
|
|
50
50
|
};
|
|
51
51
|
const checkIfIsOutsideBottomViewport = () => {
|
|
52
52
|
if (!contentRef.current)
|
|
53
53
|
return;
|
|
54
54
|
const element = contentRef.current;
|
|
55
|
-
const elementHeight =
|
|
55
|
+
const elementHeight = utilities.getBounding(element).height;
|
|
56
56
|
return elementHeight + element.offsetTop > window.innerHeight + windowYScroll;
|
|
57
57
|
};
|
|
58
58
|
const dropdownIsOutsideTopViewport = checkIfIsOutsideTopViewport();
|
|
@@ -60,7 +60,8 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
60
60
|
const contentClassName = classNames.classNames([
|
|
61
61
|
css_classes.cssDropdownContent,
|
|
62
62
|
arrowSide === 'right' && css_classes.cssDropdownArrowHorizontalDirectionRight,
|
|
63
|
-
dropdownIsOutsideBottomViewport &&
|
|
63
|
+
(dropdownIsOutsideBottomViewport || (verticalPosition === 'top' && !dropdownIsOutsideTopViewport)) &&
|
|
64
|
+
css_classes.cssDropdownArrowVerticalDirectionBottom,
|
|
64
65
|
cssClass
|
|
65
66
|
], main_module['default']);
|
|
66
67
|
const screenWidthName = use_screen_detect.useScreenDetect();
|
|
@@ -75,8 +76,8 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
75
76
|
});
|
|
76
77
|
React.useEffect(() => {
|
|
77
78
|
if ((wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) && contentRef.current) {
|
|
78
|
-
const { x: wrapperXPosition, y: wrapperYPosition, width: wrapperWidth, height: wrapperHeight } = wrapperRef.current
|
|
79
|
-
const { width: contentWidth } = contentRef.current
|
|
79
|
+
const { x: wrapperXPosition, y: wrapperYPosition, width: wrapperWidth, height: wrapperHeight } = utilities.getBounding(wrapperRef.current);
|
|
80
|
+
const { width: contentWidth } = utilities.getBounding(contentRef.current);
|
|
80
81
|
const { xModifier, yModifier } = utilities.getXYModifiersForNestedDropdowns(portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current);
|
|
81
82
|
const yOffset = 10;
|
|
82
83
|
const isInModal = utilities.isChildOfModal(wrapperRef);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAwE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAwE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('react');
|
|
6
6
|
var main_module$1 = require('../../css/modal/main.module.less.js');
|
|
7
7
|
var css_classes = require('./css_classes.js');
|
|
8
|
-
var fuzzy_search = require('../../utilities/fuzzy_search/fuzzy_search.js');
|
|
9
8
|
var main_module = require('../../css/dropdown/main.module.less.js');
|
|
9
|
+
var fuzzy_search = require('../../utilities/fuzzy_search/fuzzy_search.js');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* checks if the given option is selected within array of selectedValues array
|
|
@@ -69,8 +69,12 @@ const isChildOfModal = (ref) => {
|
|
|
69
69
|
currentParent = currentParent === null || currentParent === void 0 ? void 0 : currentParent.parentElement;
|
|
70
70
|
}
|
|
71
71
|
return false;
|
|
72
|
+
};
|
|
73
|
+
const getBounding = (element) => {
|
|
74
|
+
return element.getBoundingClientRect();
|
|
72
75
|
};
|
|
73
76
|
|
|
77
|
+
exports.getBounding = getBounding;
|
|
74
78
|
exports.getXYModifiersForNestedDropdowns = getXYModifiersForNestedDropdowns;
|
|
75
79
|
exports.handleItemClick = handleItemClick;
|
|
76
80
|
exports.handleSearchKeyUp = handleSearchKeyUp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -21,8 +21,9 @@ const Label = ({ isRequired = false, children, additionalInfo, ...props }) => {
|
|
|
21
21
|
[main_module['default'][css_classes.cssLabelError]]: errors
|
|
22
22
|
});
|
|
23
23
|
return (React__default['default'].createElement("label", { className: labelClasses, ...props },
|
|
24
|
-
|
|
25
|
-
additionalInfo && React__default['default'].createElement(
|
|
24
|
+
children,
|
|
25
|
+
additionalInfo && (React__default['default'].createElement(index['default'], { as: "span" },
|
|
26
|
+
React__default['default'].createElement("span", { className: main_module['default'][css_classes.cssLabelAdditionalInfo] }, additionalInfo)))));
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
exports.default = Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,14 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var css_classes = require('./css_classes.js');
|
|
6
6
|
|
|
7
7
|
const LOADER_SIZE = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
xs: 'xs',
|
|
9
|
+
s: 's',
|
|
10
|
+
l: 'l',
|
|
11
|
+
xl: 'xl'
|
|
11
12
|
};
|
|
12
13
|
const LOADER_SIZE_CSS_CLASS_MAP = {
|
|
13
|
-
[LOADER_SIZE.
|
|
14
|
-
[LOADER_SIZE.
|
|
15
|
-
[LOADER_SIZE.
|
|
14
|
+
[LOADER_SIZE.xs]: css_classes.cssLoaderSizeExtraSmall,
|
|
15
|
+
[LOADER_SIZE.s]: css_classes.cssLoaderSizeSmall,
|
|
16
|
+
[LOADER_SIZE.l]: css_classes.cssLoaderSizeLarge,
|
|
17
|
+
[LOADER_SIZE.xl]: css_classes.cssLoaderSizeExtraLarge
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
exports.LOADER_SIZE = LOADER_SIZE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const cssLoader = 'loader';
|
|
6
|
+
const cssLoaderSizeExtraSmall = `${cssLoader}_xs`;
|
|
6
7
|
const cssLoaderSizeSmall = `${cssLoader}_s`;
|
|
7
8
|
const cssLoaderSizeLarge = `${cssLoader}_l`;
|
|
8
9
|
const cssLoaderSizeExtraLarge = `${cssLoader}_xl`;
|
|
9
10
|
|
|
10
11
|
exports.cssLoader = cssLoader;
|
|
11
12
|
exports.cssLoaderSizeExtraLarge = cssLoaderSizeExtraLarge;
|
|
13
|
+
exports.cssLoaderSizeExtraSmall = cssLoaderSizeExtraSmall;
|
|
12
14
|
exports.cssLoaderSizeLarge = cssLoaderSizeLarge;
|
|
13
15
|
exports.cssLoaderSizeSmall = cssLoaderSizeSmall;
|
|
14
16
|
//# sourceMappingURL=css_classes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
6
|
|
|
7
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_loader__2k0x_ {\n display: inline-block;\n vertical-align: middle;\n width: 16px;\n height: 16px;\n border-style: solid;\n border-width: 1.5px;\n border-color: #ececec #ececec #ececec #3c83ec;\n border-radius: 50%;\n transform: translateZ(0);\n -webkit-animation: main-module_load__1yy35 1.1s infinite linear;\n animation: main-module_load__1yy35 1.1s infinite linear;\n}\n.main-module_loader_s__3DDj4 {\n width: 12px;\n height: 12px;\n}\n.main-module_loader_l__1X43e {\n width: 24px;\n height: 24px;\n}\n.main-module_loader_xl__2hfeE {\n width: 30px;\n height: 30px;\n}\n@-webkit-keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
8
|
-
var cssClasses = {"loader":"main-module_loader__2k0x_","load":"main-module_load__1yy35","loader_s":"main-module_loader_s__3DDj4","loader_l":"main-module_loader_l__1X43e","loader_xl":"main-module_loader_xl__2hfeE"};
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_loader__2k0x_ {\n display: inline-block;\n vertical-align: middle;\n width: 16px;\n height: 16px;\n border-style: solid;\n border-width: 1.5px;\n border-color: #ececec #ececec #ececec #3c83ec;\n border-radius: 50%;\n transform: translateZ(0);\n -webkit-animation: main-module_load__1yy35 1.1s infinite linear;\n animation: main-module_load__1yy35 1.1s infinite linear;\n}\n.main-module_loader_xs__3JXYp {\n width: 8px;\n height: 8px;\n}\n.main-module_loader_s__3DDj4 {\n width: 12px;\n height: 12px;\n}\n.main-module_loader_l__1X43e {\n width: 24px;\n height: 24px;\n}\n.main-module_loader_xl__2hfeE {\n width: 30px;\n height: 30px;\n}\n@-webkit-keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
8
|
+
var cssClasses = {"loader":"main-module_loader__2k0x_","load":"main-module_load__1yy35","loader_xs":"main-module_loader_xs__3JXYp","loader_s":"main-module_loader_s__3DDj4","loader_l":"main-module_loader_l__1X43e","loader_xl":"main-module_loader_xl__2hfeE"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
11
11
|
exports.default = cssClasses;
|
|
@@ -11,7 +11,7 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
|
|
11
11
|
import { DROPDOWN_Z_INDEX, DROPDOWN_ON_MODAL_Z_INDEX } from '../constants.js';
|
|
12
12
|
import { cssDropdownContent, cssDropdownArrowHorizontalDirectionRight, cssDropdownArrowVerticalDirectionBottom, cssDropdownHeader, cssDropdownHeaderContent, cssDropdownHeaderTitle } from '../css_classes.js';
|
|
13
13
|
import cssClasses from '../../../css/dropdown/main.module.less.js';
|
|
14
|
-
import { getXYModifiersForNestedDropdowns, isChildOfModal } from '../utilities.js';
|
|
14
|
+
import { getBounding, getXYModifiersForNestedDropdowns, isChildOfModal } from '../utilities.js';
|
|
15
15
|
import { useClickOutside } from '../../../hooks/use_click_outside.js';
|
|
16
16
|
import IconArrow from '../../../assets/icon_arrow.js';
|
|
17
17
|
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
@@ -37,14 +37,14 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
37
37
|
const checkIfIsOutsideTopViewport = () => {
|
|
38
38
|
if (!contentRef.current)
|
|
39
39
|
return;
|
|
40
|
-
const bounding = contentRef.current
|
|
40
|
+
const bounding = getBounding(contentRef.current);
|
|
41
41
|
return bounding.top <= 0;
|
|
42
42
|
};
|
|
43
43
|
const checkIfIsOutsideBottomViewport = () => {
|
|
44
44
|
if (!contentRef.current)
|
|
45
45
|
return;
|
|
46
46
|
const element = contentRef.current;
|
|
47
|
-
const elementHeight = element
|
|
47
|
+
const elementHeight = getBounding(element).height;
|
|
48
48
|
return elementHeight + element.offsetTop > window.innerHeight + windowYScroll;
|
|
49
49
|
};
|
|
50
50
|
const dropdownIsOutsideTopViewport = checkIfIsOutsideTopViewport();
|
|
@@ -52,7 +52,8 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
52
52
|
const contentClassName = classNames([
|
|
53
53
|
cssDropdownContent,
|
|
54
54
|
arrowSide === 'right' && cssDropdownArrowHorizontalDirectionRight,
|
|
55
|
-
dropdownIsOutsideBottomViewport &&
|
|
55
|
+
(dropdownIsOutsideBottomViewport || (verticalPosition === 'top' && !dropdownIsOutsideTopViewport)) &&
|
|
56
|
+
cssDropdownArrowVerticalDirectionBottom,
|
|
56
57
|
cssClass
|
|
57
58
|
], cssClasses);
|
|
58
59
|
const screenWidthName = useScreenDetect();
|
|
@@ -67,8 +68,8 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
67
68
|
});
|
|
68
69
|
useEffect(() => {
|
|
69
70
|
if ((wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) && contentRef.current) {
|
|
70
|
-
const { x: wrapperXPosition, y: wrapperYPosition, width: wrapperWidth, height: wrapperHeight } = wrapperRef.current
|
|
71
|
-
const { width: contentWidth } = contentRef.current
|
|
71
|
+
const { x: wrapperXPosition, y: wrapperYPosition, width: wrapperWidth, height: wrapperHeight } = getBounding(wrapperRef.current);
|
|
72
|
+
const { width: contentWidth } = getBounding(contentRef.current);
|
|
72
73
|
const { xModifier, yModifier } = getXYModifiersForNestedDropdowns(portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current);
|
|
73
74
|
const yOffset = 10;
|
|
74
75
|
const isInModal = isChildOfModal(wrapperRef);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
1
|
import { ISelectOption } from './types';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* checks if the given option is selected within array of selectedValues array
|
|
5
5
|
* @param {ISelectOption} option select/multiselect option
|
|
@@ -30,3 +30,4 @@ export declare const getXYModifiersForNestedDropdowns: (portalContainer: HTMLEle
|
|
|
30
30
|
yModifier: number;
|
|
31
31
|
};
|
|
32
32
|
export declare const isChildOfModal: (ref: RefObject<HTMLElement>) => boolean;
|
|
33
|
+
export declare const getBounding: (element: HTMLElement) => DOMRect;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import cssClasses$1 from '../../css/modal/main.module.less.js';
|
|
3
3
|
import { cssDropdownContent } from './css_classes.js';
|
|
4
|
-
import { fuzzySearch } from '../../utilities/fuzzy_search/fuzzy_search.js';
|
|
5
4
|
import cssClasses from '../../css/dropdown/main.module.less.js';
|
|
5
|
+
import { fuzzySearch } from '../../utilities/fuzzy_search/fuzzy_search.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* checks if the given option is selected within array of selectedValues array
|
|
@@ -65,7 +65,10 @@ const isChildOfModal = (ref) => {
|
|
|
65
65
|
currentParent = currentParent === null || currentParent === void 0 ? void 0 : currentParent.parentElement;
|
|
66
66
|
}
|
|
67
67
|
return false;
|
|
68
|
+
};
|
|
69
|
+
const getBounding = (element) => {
|
|
70
|
+
return element.getBoundingClientRect();
|
|
68
71
|
};
|
|
69
72
|
|
|
70
|
-
export { getXYModifiersForNestedDropdowns, handleItemClick, handleSearchKeyUp, isChildOfModal, isSelected };
|
|
73
|
+
export { getBounding, getXYModifiersForNestedDropdowns, handleItemClick, handleSearchKeyUp, isChildOfModal, isSelected };
|
|
71
74
|
//# sourceMappingURL=utilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -12,8 +12,9 @@ const Label = ({ isRequired = false, children, additionalInfo, ...props }) => {
|
|
|
12
12
|
[cssClasses[cssLabelError]]: errors
|
|
13
13
|
});
|
|
14
14
|
return (React.createElement("label", { className: labelClasses, ...props },
|
|
15
|
-
|
|
16
|
-
additionalInfo && React.createElement(
|
|
15
|
+
children,
|
|
16
|
+
additionalInfo && (React.createElement(Stack, { as: "span" },
|
|
17
|
+
React.createElement("span", { className: cssClasses[cssLabelAdditionalInfo] }, additionalInfo)))));
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export default Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export declare const LOADER_SIZE: {
|
|
2
|
-
readonly
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
2
|
+
readonly xs: "xs";
|
|
3
|
+
readonly s: "s";
|
|
4
|
+
readonly l: "l";
|
|
5
|
+
readonly xl: "xl";
|
|
5
6
|
};
|
|
6
7
|
export declare const LOADER_SIZE_CSS_CLASS_MAP: {
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
8
|
+
readonly xs: string;
|
|
9
|
+
readonly s: string;
|
|
10
|
+
readonly l: string;
|
|
11
|
+
readonly xl: string;
|
|
10
12
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { cssLoaderSizeSmall, cssLoaderSizeLarge, cssLoaderSizeExtraLarge } from './css_classes.js';
|
|
1
|
+
import { cssLoaderSizeExtraSmall, cssLoaderSizeSmall, cssLoaderSizeLarge, cssLoaderSizeExtraLarge } from './css_classes.js';
|
|
2
2
|
|
|
3
3
|
const LOADER_SIZE = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
xs: 'xs',
|
|
5
|
+
s: 's',
|
|
6
|
+
l: 'l',
|
|
7
|
+
xl: 'xl'
|
|
7
8
|
};
|
|
8
9
|
const LOADER_SIZE_CSS_CLASS_MAP = {
|
|
9
|
-
[LOADER_SIZE.
|
|
10
|
-
[LOADER_SIZE.
|
|
11
|
-
[LOADER_SIZE.
|
|
10
|
+
[LOADER_SIZE.xs]: cssLoaderSizeExtraSmall,
|
|
11
|
+
[LOADER_SIZE.s]: cssLoaderSizeSmall,
|
|
12
|
+
[LOADER_SIZE.l]: cssLoaderSizeLarge,
|
|
13
|
+
[LOADER_SIZE.xl]: cssLoaderSizeExtraLarge
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
export { LOADER_SIZE, LOADER_SIZE_CSS_CLASS_MAP };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const cssLoader = 'loader';
|
|
2
|
+
const cssLoaderSizeExtraSmall = `${cssLoader}_xs`;
|
|
2
3
|
const cssLoaderSizeSmall = `${cssLoader}_s`;
|
|
3
4
|
const cssLoaderSizeLarge = `${cssLoader}_l`;
|
|
4
5
|
const cssLoaderSizeExtraLarge = `${cssLoader}_xl`;
|
|
5
6
|
|
|
6
|
-
export { cssLoader, cssLoaderSizeExtraLarge, cssLoaderSizeLarge, cssLoaderSizeSmall };
|
|
7
|
+
export { cssLoader, cssLoaderSizeExtraLarge, cssLoaderSizeExtraSmall, cssLoaderSizeLarge, cssLoaderSizeSmall };
|
|
7
8
|
//# sourceMappingURL=css_classes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_loader__2k0x_ {\n display: inline-block;\n vertical-align: middle;\n width: 16px;\n height: 16px;\n border-style: solid;\n border-width: 1.5px;\n border-color: #ececec #ececec #ececec #3c83ec;\n border-radius: 50%;\n transform: translateZ(0);\n -webkit-animation: main-module_load__1yy35 1.1s infinite linear;\n animation: main-module_load__1yy35 1.1s infinite linear;\n}\n.main-module_loader_s__3DDj4 {\n width: 12px;\n height: 12px;\n}\n.main-module_loader_l__1X43e {\n width: 24px;\n height: 24px;\n}\n.main-module_loader_xl__2hfeE {\n width: 30px;\n height: 30px;\n}\n@-webkit-keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
4
|
-
var cssClasses = {"loader":"main-module_loader__2k0x_","load":"main-module_load__1yy35","loader_s":"main-module_loader_s__3DDj4","loader_l":"main-module_loader_l__1X43e","loader_xl":"main-module_loader_xl__2hfeE"};
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_loader__2k0x_ {\n display: inline-block;\n vertical-align: middle;\n width: 16px;\n height: 16px;\n border-style: solid;\n border-width: 1.5px;\n border-color: #ececec #ececec #ececec #3c83ec;\n border-radius: 50%;\n transform: translateZ(0);\n -webkit-animation: main-module_load__1yy35 1.1s infinite linear;\n animation: main-module_load__1yy35 1.1s infinite linear;\n}\n.main-module_loader_xs__3JXYp {\n width: 8px;\n height: 8px;\n}\n.main-module_loader_s__3DDj4 {\n width: 12px;\n height: 12px;\n}\n.main-module_loader_l__1X43e {\n width: 24px;\n height: 24px;\n}\n.main-module_loader_xl__2hfeE {\n width: 30px;\n height: 30px;\n}\n@-webkit-keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes main-module_load__1yy35 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
4
|
+
var cssClasses = {"loader":"main-module_loader__2k0x_","load":"main-module_load__1yy35","loader_xs":"main-module_loader_xs__3JXYp","loader_s":"main-module_loader_s__3DDj4","loader_l":"main-module_loader_l__1X43e","loader_xl":"main-module_loader_xl__2hfeE"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export default cssClasses;
|