@dreamcommerce/aurora 2.2.1-2 → 2.2.1-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/slide/index.js +8 -2
- package/build/cjs/packages/aurora/src/components/slide/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/css/slide/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/components/slide/index.js +8 -2
- package/build/esm/packages/aurora/src/components/slide/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/slide/types.d.ts +6 -0
- package/build/esm/packages/aurora/src/css/slide/main.module.less.js +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
|
-
const Slide = ({ isOpen, autoOpen, direction = 'left', animationDurationMs = 300, children }) => {
|
|
13
|
+
const Slide = ({ isOpen, autoOpen, direction = 'left', position, animationDurationMs = 300, children }) => {
|
|
14
14
|
if (autoOpen)
|
|
15
15
|
isOpen = true;
|
|
16
16
|
let directionClass;
|
|
@@ -28,7 +28,13 @@ const Slide = ({ isOpen, autoOpen, direction = 'left', animationDurationMs = 300
|
|
|
28
28
|
directionClass = css_classes['default'].slideDirectionLeft;
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
|
-
return (React__default['default'].createElement("div", { className: `${main_module['default'][css_classes['default'].slide]} ${main_module['default'][directionClass]} ${isOpen ? main_module['default'][css_classes['default'].slideIsOpen] : ''}`, style: {
|
|
31
|
+
return (React__default['default'].createElement("div", { className: `${main_module['default'][css_classes['default'].slide]} ${main_module['default'][directionClass]} ${isOpen ? main_module['default'][css_classes['default'].slideIsOpen] : ''}`, style: {
|
|
32
|
+
animationDuration: `${animationDurationMs}ms`,
|
|
33
|
+
top: (position === null || position === void 0 ? void 0 : position.top) ? `${position.top}px` : '',
|
|
34
|
+
right: (position === null || position === void 0 ? void 0 : position.right) ? `${position.right}px` : '',
|
|
35
|
+
bottom: (position === null || position === void 0 ? void 0 : position.bottom) ? `${position.bottom}px` : '',
|
|
36
|
+
left: (position === null || position === void 0 ? void 0 : position.left) ? `${position.left}px` : ''
|
|
37
|
+
} }, children));
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
exports.default = Slide;
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -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 = "@-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 width: 100%;\n height:
|
|
7
|
+
var css_248z = "@-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 width: 100%;\n height: 100%;\n background-color: white;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: auto;\n z-index: 1;\n}\n.main-module_slide_direction-left__Rg5kV {\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_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
|
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import CSS_CLASSES from './css_classes.js';
|
|
3
3
|
import cssClasses from '../../css/slide/main.module.less.js';
|
|
4
4
|
|
|
5
|
-
const Slide = ({ isOpen, autoOpen, direction = 'left', animationDurationMs = 300, children }) => {
|
|
5
|
+
const Slide = ({ isOpen, autoOpen, direction = 'left', position, animationDurationMs = 300, children }) => {
|
|
6
6
|
if (autoOpen)
|
|
7
7
|
isOpen = true;
|
|
8
8
|
let directionClass;
|
|
@@ -20,7 +20,13 @@ const Slide = ({ isOpen, autoOpen, direction = 'left', animationDurationMs = 300
|
|
|
20
20
|
directionClass = CSS_CLASSES.slideDirectionLeft;
|
|
21
21
|
break;
|
|
22
22
|
}
|
|
23
|
-
return (React.createElement("div", { className: `${cssClasses[CSS_CLASSES.slide]} ${cssClasses[directionClass]} ${isOpen ? cssClasses[CSS_CLASSES.slideIsOpen] : ''}`, style: {
|
|
23
|
+
return (React.createElement("div", { className: `${cssClasses[CSS_CLASSES.slide]} ${cssClasses[directionClass]} ${isOpen ? cssClasses[CSS_CLASSES.slideIsOpen] : ''}`, style: {
|
|
24
|
+
animationDuration: `${animationDurationMs}ms`,
|
|
25
|
+
top: (position === null || position === void 0 ? void 0 : position.top) ? `${position.top}px` : '',
|
|
26
|
+
right: (position === null || position === void 0 ? void 0 : position.right) ? `${position.right}px` : '',
|
|
27
|
+
bottom: (position === null || position === void 0 ? void 0 : position.bottom) ? `${position.bottom}px` : '',
|
|
28
|
+
left: (position === null || position === void 0 ? void 0 : position.left) ? `${position.left}px` : ''
|
|
29
|
+
} }, children));
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export default Slide;
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -3,6 +3,12 @@ export interface ISlideProps {
|
|
|
3
3
|
isOpen?: boolean;
|
|
4
4
|
autoOpen?: boolean;
|
|
5
5
|
direction?: 'top' | 'right' | 'bottom' | 'left';
|
|
6
|
+
position?: {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
6
12
|
animationDurationMs?: number;
|
|
7
13
|
children: ReactNode;
|
|
8
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@-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 width: 100%;\n height:
|
|
3
|
+
var css_248z = "@-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 width: 100%;\n height: 100%;\n background-color: white;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: auto;\n z-index: 1;\n}\n.main-module_slide_direction-left__Rg5kV {\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_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
|
|