@dreamcommerce/aurora 2.4.4 → 2.4.5-11
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 +7 -6
- package/build/cjs/packages/aurora/src/components/dropdown/components/content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/tooltip/index.js +3 -3
- package/build/cjs/packages/aurora/src/css/slide/main.module.less.js +1 -1
- package/build/cjs/packages/aurora/src/css/tooltip/main.module.less.js +1 -1
- 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/tooltip/index.js +3 -3
- package/build/esm/packages/aurora/src/css/slide/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/css/tooltip/main.module.less.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var useTranslation = require('../../../../../../external/react-i18next/dist/es/useTranslation.js');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
|
-
var main_module$
|
|
8
|
+
var main_module$3 = require('../../../css/icons/main.module.less.js');
|
|
9
9
|
var classnames = require('classnames');
|
|
10
10
|
var index = require('../context/index.js');
|
|
11
11
|
var responsive_breakpoints = require('../../../constants/responsive_breakpoints.js');
|
|
@@ -20,6 +20,7 @@ var use_click_outside = require('../../../hooks/use_click_outside.js');
|
|
|
20
20
|
var icon_arrow = require('../../../assets/icon_arrow.js');
|
|
21
21
|
var utilities$1 = require('@dreamcommerce/utilities');
|
|
22
22
|
var main_module$1 = require('../../../css/hint/main.module.less.js');
|
|
23
|
+
var main_module$2 = require('../../../css/tooltip/main.module.less.js');
|
|
23
24
|
|
|
24
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
26
|
|
|
@@ -35,7 +36,7 @@ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
|
35
36
|
const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children, arrowSide = 'left', horizontalPosition = 'left', verticalPosition = 'bottom', cssClass, portalContainer }) => {
|
|
36
37
|
const [t] = useTranslation.useTranslation();
|
|
37
38
|
const contentRef = React.useRef(null);
|
|
38
|
-
const { wrapperRef, toggleDropdown, isOpen
|
|
39
|
+
const { wrapperRef, toggleDropdown, isOpen } = index.useDropdownContext();
|
|
39
40
|
const [styles, setStyles] = React.useState({
|
|
40
41
|
top: '0px',
|
|
41
42
|
bottom: '0px',
|
|
@@ -61,7 +62,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
61
62
|
const dropdownIsOutsideBottomViewport = checkIfIsOutsideBottomViewport();
|
|
62
63
|
const contentShouldAppearOnTop = dropdownIsOutsideBottomViewport || (verticalPosition === 'top' && !dropdownIsOutsideTopViewport);
|
|
63
64
|
const contentShouldAppearOnBottom = dropdownIsOutsideTopViewport || (verticalPosition === 'bottom' && !dropdownIsOutsideBottomViewport);
|
|
64
|
-
const contentClassName = classnames__default['default'](main_module['default'][css_classes.cssDropdownContent], contentShouldAppearOnTop && main_module$1['default'][css_classes.cssDropdownContentOnTop]
|
|
65
|
+
const contentClassName = classnames__default['default'](main_module['default'][css_classes.cssDropdownContent], contentShouldAppearOnTop && `${main_module$1['default'][css_classes.cssDropdownContentOnTop]} ${main_module$2['default'][css_classes.cssDropdownContentOnTop]}`, contentShouldAppearOnBottom && `${main_module$1['default'][css_classes.cssDropdownContentOnBottom]} ${main_module$2['default'][css_classes.cssDropdownContentOnBottom]}`, arrowSide === 'right' && main_module['default'][css_classes.cssDropdownArrowHorizontalDirectionRight], contentShouldAppearOnTop && main_module['default'][css_classes.cssDropdownArrowVerticalDirectionBottom], cssClass);
|
|
65
66
|
const screenWidthName = use_screen_detect.useScreenDetect();
|
|
66
67
|
const refs = [contentRef];
|
|
67
68
|
if (wrapperRef) {
|
|
@@ -128,8 +129,8 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
128
129
|
return;
|
|
129
130
|
const scrollableParent = (_a = utilities$1.UiDomUtils.getFirstScrollableParent(wrapperRef.current)) !== null && _a !== void 0 ? _a : document.body;
|
|
130
131
|
const handleWindowScroll = () => {
|
|
131
|
-
if (typeof
|
|
132
|
-
|
|
132
|
+
if (typeof toggleDropdown === 'function') {
|
|
133
|
+
toggleDropdown();
|
|
133
134
|
}
|
|
134
135
|
};
|
|
135
136
|
scrollableParent.addEventListener('scroll', handleWindowScroll, { once: true });
|
|
@@ -143,7 +144,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
143
144
|
React__default['default'].createElement("div", { ref: contentRef, style: styles, className: contentClassName },
|
|
144
145
|
React__default['default'].createElement("div", { className: main_module['default'][css_classes.cssDropdownHeader] },
|
|
145
146
|
React__default['default'].createElement("div", { onClick: () => typeof toggleDropdown === 'function' && toggleDropdown() }, headerComponent !== null && headerComponent !== void 0 ? headerComponent : (React__default['default'].createElement("div", { className: main_module['default'][css_classes.cssDropdownHeaderContent] },
|
|
146
|
-
headerGoBackIcon || React__default['default'].createElement(icon_arrow['default'], { className: main_module$
|
|
147
|
+
headerGoBackIcon || React__default['default'].createElement(icon_arrow['default'], { className: main_module$3['default']['icon_rotate-180'] }),
|
|
147
148
|
React__default['default'].createElement("span", { className: main_module['default'][css_classes.cssDropdownHeaderTitle] }, headerGoBackText !== null && headerGoBackText !== void 0 ? headerGoBackText : t('Go back')))))),
|
|
148
149
|
children))) : null), (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current) || document.body);
|
|
149
150
|
};
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var index = require('../dropdown/context/index.js');
|
|
7
|
+
var main_module = require('../../css/tooltip/main.module.less.js');
|
|
7
8
|
var use_toggle = require('../dropdown/hooks/use_toggle.js');
|
|
8
9
|
var index$1 = require('../dropdown/index.js');
|
|
9
10
|
var css_classes = require('./css_classes.js');
|
|
10
|
-
var main_module = require('../../css/tooltip/main.module.less.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
@@ -18,10 +18,10 @@ const Tooltip = ({ left, top, disabled, onToggle, children, content }) => {
|
|
|
18
18
|
const [isOpen, toggleDropdown] = use_toggle.useToggle(false, onToggle);
|
|
19
19
|
const value = React__default['default'].useMemo(() => ({ wrapperRef, isOpen, toggleDropdown }), [isOpen, toggleDropdown]);
|
|
20
20
|
const handleOnMouseEnter = () => {
|
|
21
|
-
toggleDropdown();
|
|
21
|
+
!isOpen && toggleDropdown();
|
|
22
22
|
};
|
|
23
23
|
const handleOnMouseLeave = () => {
|
|
24
|
-
toggleDropdown();
|
|
24
|
+
isOpen && toggleDropdown();
|
|
25
25
|
};
|
|
26
26
|
return (React__default['default'].createElement(index.DropdownContext.Provider, { value: value },
|
|
27
27
|
React__default['default'].createElement("span", { className: main_module['default'][css_classes.cssTooltip], ref: wrapperRef, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave },
|
|
@@ -4,7 +4,7 @@ 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@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 1px solid #abb4cd;\n background-color: #fff;\n display: flex;\n align-items: center;\n box-shadow: 0 0 9px 0 rgba(16, 47, 102, 0.16);\n}\n.main-module_slide__content__3KeZM {\n flex: 1;\n overflow-y: scroll;\n}\n.main-module_slide__footer__3wvMP {\n padding: 1.5rem 1rem 1.5rem 1rem;\n background-color: #fff;\n border-top: 1px solid #abb4cd;\n box-shadow: 0 1px 5px 0 rgba(171, 180, 205, 0.6);\n}\n.main-module_slide_direction-left__Rg5kV {\n right: 0;\n left: 0;\n -webkit-animation-name: main-module_directionLeftHide__QSuRw;\n animation-name: main-module_directionLeftHide__QSuRw;\n}\n.main-module_slide_direction-left__Rg5kV.main-module_slide_is-open__3twK9 {\n -webkit-animation-name: main-module_directionLeftShow__1VVi1;\n animation-name: main-module_directionLeftShow__1VVi1;\n}\n";
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 1px solid #abb4cd;\n background-color: #fff;\n display: flex;\n align-items: center;\n box-shadow: 0 0 9px 0 rgba(16, 47, 102, 0.16);\n}\n.main-module_slide__content__3KeZM {\n flex: 1;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.main-module_slide__footer__3wvMP {\n padding: 1.5rem 1rem 1.5rem 1rem;\n background-color: #fff;\n border-top: 1px solid #abb4cd;\n box-shadow: 0 1px 5px 0 rgba(171, 180, 205, 0.6);\n}\n.main-module_slide_direction-left__Rg5kV {\n right: 0;\n left: 0;\n -webkit-animation-name: main-module_directionLeftHide__QSuRw;\n animation-name: main-module_directionLeftHide__QSuRw;\n}\n.main-module_slide_direction-left__Rg5kV.main-module_slide_is-open__3twK9 {\n -webkit-animation-name: main-module_directionLeftShow__1VVi1;\n animation-name: main-module_directionLeftShow__1VVi1;\n}\n";
|
|
8
8
|
var cssClasses = {"slide":"main-module_slide__1kcca","slide__wrapper":"main-module_slide__wrapper__3mC8j","slide__header":"main-module_slide__header__11UTh","slide__content":"main-module_slide__content__3KeZM","slide__footer":"main-module_slide__footer__3wvMP","slide_direction-left":"main-module_slide_direction-left__Rg5kV","directionLeftHide":"main-module_directionLeftHide__QSuRw","slide_is-open":"main-module_slide_is-open__3twK9","directionLeftShow":"main-module_directionLeftShow__1VVi1"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ 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_tooltip__container__1T35Q {\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none;\n}\n";
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tooltip__container__1T35Q {\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748;\n box-shadow: none;\n pointer-events: none;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none;\n}\n";
|
|
8
8
|
var cssClasses = {"tooltip__container":"main-module_tooltip__container__1T35Q"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { useTranslation } from '../../../../../../external/react-i18next/dist/es/useTranslation.js';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import cssClasses$
|
|
4
|
+
import cssClasses$3 from '../../../css/icons/main.module.less.js';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import { useDropdownContext } from '../context/index.js';
|
|
7
7
|
import { SCREEN_XS } from '../../../constants/responsive_breakpoints.js';
|
|
@@ -16,6 +16,7 @@ import { useClickOutside } from '../../../hooks/use_click_outside.js';
|
|
|
16
16
|
import IconArrow from '../../../assets/icon_arrow.js';
|
|
17
17
|
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
18
18
|
import cssClasses$1 from '../../../css/hint/main.module.less.js';
|
|
19
|
+
import cssClasses$2 from '../../../css/tooltip/main.module.less.js';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Dropdown.Content component. This togglable part of dropdown.
|
|
@@ -26,7 +27,7 @@ import cssClasses$1 from '../../../css/hint/main.module.less.js';
|
|
|
26
27
|
const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children, arrowSide = 'left', horizontalPosition = 'left', verticalPosition = 'bottom', cssClass, portalContainer }) => {
|
|
27
28
|
const [t] = useTranslation();
|
|
28
29
|
const contentRef = useRef(null);
|
|
29
|
-
const { wrapperRef, toggleDropdown, isOpen
|
|
30
|
+
const { wrapperRef, toggleDropdown, isOpen } = useDropdownContext();
|
|
30
31
|
const [styles, setStyles] = useState({
|
|
31
32
|
top: '0px',
|
|
32
33
|
bottom: '0px',
|
|
@@ -52,7 +53,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
52
53
|
const dropdownIsOutsideBottomViewport = checkIfIsOutsideBottomViewport();
|
|
53
54
|
const contentShouldAppearOnTop = dropdownIsOutsideBottomViewport || (verticalPosition === 'top' && !dropdownIsOutsideTopViewport);
|
|
54
55
|
const contentShouldAppearOnBottom = dropdownIsOutsideTopViewport || (verticalPosition === 'bottom' && !dropdownIsOutsideBottomViewport);
|
|
55
|
-
const contentClassName = classnames(cssClasses[cssDropdownContent], contentShouldAppearOnTop && cssClasses$1[cssDropdownContentOnTop]
|
|
56
|
+
const contentClassName = classnames(cssClasses[cssDropdownContent], contentShouldAppearOnTop && `${cssClasses$1[cssDropdownContentOnTop]} ${cssClasses$2[cssDropdownContentOnTop]}`, contentShouldAppearOnBottom && `${cssClasses$1[cssDropdownContentOnBottom]} ${cssClasses$2[cssDropdownContentOnBottom]}`, arrowSide === 'right' && cssClasses[cssDropdownArrowHorizontalDirectionRight], contentShouldAppearOnTop && cssClasses[cssDropdownArrowVerticalDirectionBottom], cssClass);
|
|
56
57
|
const screenWidthName = useScreenDetect();
|
|
57
58
|
const refs = [contentRef];
|
|
58
59
|
if (wrapperRef) {
|
|
@@ -119,8 +120,8 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
119
120
|
return;
|
|
120
121
|
const scrollableParent = (_a = UiDomUtils.getFirstScrollableParent(wrapperRef.current)) !== null && _a !== void 0 ? _a : document.body;
|
|
121
122
|
const handleWindowScroll = () => {
|
|
122
|
-
if (typeof
|
|
123
|
-
|
|
123
|
+
if (typeof toggleDropdown === 'function') {
|
|
124
|
+
toggleDropdown();
|
|
124
125
|
}
|
|
125
126
|
};
|
|
126
127
|
scrollableParent.addEventListener('scroll', handleWindowScroll, { once: true });
|
|
@@ -134,7 +135,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
134
135
|
React.createElement("div", { ref: contentRef, style: styles, className: contentClassName },
|
|
135
136
|
React.createElement("div", { className: cssClasses[cssDropdownHeader] },
|
|
136
137
|
React.createElement("div", { onClick: () => typeof toggleDropdown === 'function' && toggleDropdown() }, headerComponent !== null && headerComponent !== void 0 ? headerComponent : (React.createElement("div", { className: cssClasses[cssDropdownHeaderContent] },
|
|
137
|
-
headerGoBackIcon || React.createElement(IconArrow, { className: cssClasses$
|
|
138
|
+
headerGoBackIcon || React.createElement(IconArrow, { className: cssClasses$3['icon_rotate-180'] }),
|
|
138
139
|
React.createElement("span", { className: cssClasses[cssDropdownHeaderTitle] }, headerGoBackText !== null && headerGoBackText !== void 0 ? headerGoBackText : t('Go back')))))),
|
|
139
140
|
children))) : null), (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current) || document.body);
|
|
140
141
|
};
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import { DropdownContext } from '../dropdown/context/index.js';
|
|
3
|
+
import cssClasses from '../../css/tooltip/main.module.less.js';
|
|
3
4
|
import { useToggle } from '../dropdown/hooks/use_toggle.js';
|
|
4
5
|
import Dropdown from '../dropdown/index.js';
|
|
5
6
|
import { cssTooltip, cssTooltipContainer } from './css_classes.js';
|
|
6
|
-
import cssClasses from '../../css/tooltip/main.module.less.js';
|
|
7
7
|
|
|
8
8
|
const Tooltip = ({ left, top, disabled, onToggle, children, content }) => {
|
|
9
9
|
const wrapperRef = useRef(null);
|
|
10
10
|
const [isOpen, toggleDropdown] = useToggle(false, onToggle);
|
|
11
11
|
const value = React.useMemo(() => ({ wrapperRef, isOpen, toggleDropdown }), [isOpen, toggleDropdown]);
|
|
12
12
|
const handleOnMouseEnter = () => {
|
|
13
|
-
toggleDropdown();
|
|
13
|
+
!isOpen && toggleDropdown();
|
|
14
14
|
};
|
|
15
15
|
const handleOnMouseLeave = () => {
|
|
16
|
-
toggleDropdown();
|
|
16
|
+
isOpen && toggleDropdown();
|
|
17
17
|
};
|
|
18
18
|
return (React.createElement(DropdownContext.Provider, { value: value },
|
|
19
19
|
React.createElement("span", { className: cssClasses[cssTooltip], ref: wrapperRef, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave },
|
|
@@ -1,6 +1,6 @@
|
|
|
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@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 1px solid #abb4cd;\n background-color: #fff;\n display: flex;\n align-items: center;\n box-shadow: 0 0 9px 0 rgba(16, 47, 102, 0.16);\n}\n.main-module_slide__content__3KeZM {\n flex: 1;\n overflow-y: scroll;\n}\n.main-module_slide__footer__3wvMP {\n padding: 1.5rem 1rem 1.5rem 1rem;\n background-color: #fff;\n border-top: 1px solid #abb4cd;\n box-shadow: 0 1px 5px 0 rgba(171, 180, 205, 0.6);\n}\n.main-module_slide_direction-left__Rg5kV {\n right: 0;\n left: 0;\n -webkit-animation-name: main-module_directionLeftHide__QSuRw;\n animation-name: main-module_directionLeftHide__QSuRw;\n}\n.main-module_slide_direction-left__Rg5kV.main-module_slide_is-open__3twK9 {\n -webkit-animation-name: main-module_directionLeftShow__1VVi1;\n animation-name: main-module_directionLeftShow__1VVi1;\n}\n";
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 1px solid #abb4cd;\n background-color: #fff;\n display: flex;\n align-items: center;\n box-shadow: 0 0 9px 0 rgba(16, 47, 102, 0.16);\n}\n.main-module_slide__content__3KeZM {\n flex: 1;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.main-module_slide__footer__3wvMP {\n padding: 1.5rem 1rem 1.5rem 1rem;\n background-color: #fff;\n border-top: 1px solid #abb4cd;\n box-shadow: 0 1px 5px 0 rgba(171, 180, 205, 0.6);\n}\n.main-module_slide_direction-left__Rg5kV {\n right: 0;\n left: 0;\n -webkit-animation-name: main-module_directionLeftHide__QSuRw;\n animation-name: main-module_directionLeftHide__QSuRw;\n}\n.main-module_slide_direction-left__Rg5kV.main-module_slide_is-open__3twK9 {\n -webkit-animation-name: main-module_directionLeftShow__1VVi1;\n animation-name: main-module_directionLeftShow__1VVi1;\n}\n";
|
|
4
4
|
var cssClasses = {"slide":"main-module_slide__1kcca","slide__wrapper":"main-module_slide__wrapper__3mC8j","slide__header":"main-module_slide__header__11UTh","slide__content":"main-module_slide__content__3KeZM","slide__footer":"main-module_slide__footer__3wvMP","slide_direction-left":"main-module_slide_direction-left__Rg5kV","directionLeftHide":"main-module_directionLeftHide__QSuRw","slide_is-open":"main-module_slide_is-open__3twK9","directionLeftShow":"main-module_directionLeftShow__1VVi1"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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_tooltip__container__1T35Q {\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none;\n}\n";
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tooltip__container__1T35Q {\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748;\n box-shadow: none;\n pointer-events: none;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none;\n}\n";
|
|
4
4
|
var cssClasses = {"tooltip__container":"main-module_tooltip__container__1T35Q"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|