@activecollab/components 1.0.15 → 1.0.16
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/dist/cjs/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js +19 -46
- package/dist/cjs/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js.map +1 -1
- package/dist/cjs/components/Transitions/SlideLeftRightTransition/Styles.js +28 -0
- package/dist/cjs/components/Transitions/SlideLeftRightTransition/Styles.js.map +1 -0
- package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.d.ts +1 -1
- package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.d.ts.map +1 -1
- package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js +15 -39
- package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js.map +1 -1
- package/dist/esm/components/Transitions/SlideLeftRightTransition/Styles.d.ts +5 -0
- package/dist/esm/components/Transitions/SlideLeftRightTransition/Styles.d.ts.map +1 -0
- package/dist/esm/components/Transitions/SlideLeftRightTransition/Styles.js +12 -0
- package/dist/esm/components/Transitions/SlideLeftRightTransition/Styles.js.map +1 -0
- package/dist/index.js +125 -141
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js
CHANGED
|
@@ -1,66 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.SlideLeftRightTransition = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Styles = require("./Styles");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
var _excluded = ["children", "direction", "className"];
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
23
|
|
|
24
24
|
var SlideLeftRightTransition = function SlideLeftRightTransition(_ref) {
|
|
25
|
-
var
|
|
26
|
-
inProp = _ref$in === void 0 ? false : _ref$in,
|
|
25
|
+
var children = _ref.children,
|
|
27
26
|
_ref$direction = _ref.direction,
|
|
28
27
|
direction = _ref$direction === void 0 ? "left" : _ref$direction,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
transform: direction === "left" ? "translateX(100%)" : "translateX(-100%)"
|
|
39
|
-
},
|
|
40
|
-
entered: {
|
|
41
|
-
transform: "translateX(0%)",
|
|
42
|
-
transition: "all ".concat(timeout, "ms ease")
|
|
43
|
-
},
|
|
44
|
-
exiting: {
|
|
45
|
-
position: "absolute"
|
|
46
|
-
},
|
|
47
|
-
exited: {
|
|
48
|
-
transform: direction === "left" ? "translateX(-100%)" : "translateX(100%)",
|
|
49
|
-
transition: "all ".concat(timeout, "ms ease")
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.Transition, {
|
|
53
|
-
in: inProp,
|
|
54
|
-
timeout: 0,
|
|
55
|
-
onEnter: onEnter,
|
|
56
|
-
onExited: onExited
|
|
57
|
-
}, function (state) {
|
|
58
|
-
return /*#__PURE__*/(0, _react.cloneElement)(children, {
|
|
59
|
-
style: _objectSpread(_objectSpread(_objectSpread({
|
|
60
|
-
visibility: state === "exited" && !inProp ? "hidden" : undefined
|
|
61
|
-
}, transitionStyles[state]), style), children.props.style)
|
|
62
|
-
});
|
|
63
|
-
});
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_Styles.StyledSlideLeftRightTransition, _extends({
|
|
32
|
+
timeout: 200,
|
|
33
|
+
classNames: (0, _classnames.default)(className, "c-slide"),
|
|
34
|
+
unmountOnExit: true,
|
|
35
|
+
$direction: direction
|
|
36
|
+
}, props), children);
|
|
64
37
|
};
|
|
65
38
|
|
|
66
39
|
exports.SlideLeftRightTransition = SlideLeftRightTransition;
|
package/dist/cjs/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.tsx"],"names":["SlideLeftRightTransition","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.tsx"],"names":["SlideLeftRightTransition","children","direction","className","props","displayName"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;;;;;;;;;AAQO,IAAMA,wBAAuD,GAAG,SAA1DA,wBAA0D,OAKjE;AAAA,MAJJC,QAII,QAJJA,QAII;AAAA,4BAHJC,SAGI;AAAA,MAHJA,SAGI,+BAHQ,MAGR;AAAA,MAFJC,SAEI,QAFJA,SAEI;AAAA,MADDC,KACC;;AACJ,sBACE,6BAAC,sCAAD;AACE,IAAA,OAAO,EAAE,GADX;AAEE,IAAA,UAAU,EAAE,yBAAWD,SAAX,EAAsB,SAAtB,CAFd;AAGE,IAAA,aAAa,MAHf;AAIE,IAAA,UAAU,EAAED;AAJd,KAKME,KALN,GAOGH,QAPH,CADF;AAWD,CAjBM;;;AAmBPD,wBAAwB,CAACK,WAAzB,GAAuC,0BAAvC","sourcesContent":["import React, { FC, ReactElement } from \"react\";\nimport { TransitionProps } from \"../types\";\nimport { StyledSlideLeftRightTransition } from \"./Styles\";\nimport classnames from \"classnames\";\n\ninterface ISlideLeftRightTransition extends TransitionProps {\n children: ReactElement;\n direction?: \"left\" | \"right\";\n className?: string;\n}\n\nexport const SlideLeftRightTransition: FC<ISlideLeftRightTransition> = ({\n children,\n direction = \"left\",\n className,\n ...props\n}) => {\n return (\n <StyledSlideLeftRightTransition\n timeout={200}\n classNames={classnames(className, \"c-slide\")}\n unmountOnExit\n $direction={direction}\n {...props}\n >\n {children}\n </StyledSlideLeftRightTransition>\n );\n};\n\nSlideLeftRightTransition.displayName = \"SlideLeftRightTransition\";\n"],"file":"SlideLeftRightTransition.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.StyledSlideLeftRightTransition = void 0;
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _reactTransitionGroup = require("react-transition-group");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
var StyledSlideLeftRightTransition = (0, _styledComponents.default)(_reactTransitionGroup.CSSTransition).withConfig({
|
|
19
|
+
displayName: "Styles__StyledSlideLeftRightTransition",
|
|
20
|
+
componentId: "sc-ewkpq8-0"
|
|
21
|
+
})(["", " ", ""], function (props) {
|
|
22
|
+
return props.$direction === "left" && (0, _styledComponents.css)(["&.c-slide-enter{position:absolute;transform:translateX(100%);}&.c-slide-enter-active{transform:translateX(0%);transition:all 200ms ease;}&.c-slide-exit{position:absolute;}&.c-slide-exit-active{transform:translateX(-100%);transition:all 200ms ease;}"]);
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.$direction === "right" && (0, _styledComponents.css)(["&.c-slide-enter{position:absolute;transform:translateX(-100%);}&.c-slide-enter-active{transform:translateX(0%);transition:all 200ms ease;}&.c-slide-exit{position:absolute;}&.c-slide-exit-active{transform:translateX(100%);transition:all 200ms ease;}"]);
|
|
25
|
+
});
|
|
26
|
+
exports.StyledSlideLeftRightTransition = StyledSlideLeftRightTransition;
|
|
27
|
+
StyledSlideLeftRightTransition.displayName = "StyledSlideLeftRightTransition";
|
|
28
|
+
//# sourceMappingURL=Styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/Styles.ts"],"names":["StyledSlideLeftRightTransition","CSSTransition","props","$direction","css","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;AAEO,IAAMA,8BAA8B,GAAG,+BAAOC,mCAAP,CAAH;AAAA;AAAA;AAAA,kBAGvC,UAACC,KAAD;AAAA,SACAA,KAAK,CAACC,UAAN,KAAqB,MAArB,QACAC,qBADA,+PADA;AAAA,CAHuC,EAuBvC,UAACF,KAAD;AAAA,SACAA,KAAK,CAACC,UAAN,KAAqB,OAArB,QACAC,qBADA,+PADA;AAAA,CAvBuC,CAApC;;AA8CPJ,8BAA8B,CAACK,WAA/B,GAA6C,gCAA7C","sourcesContent":["import styled, { css } from \"styled-components\";\nimport { CSSTransition } from \"react-transition-group\";\n\nexport const StyledSlideLeftRightTransition = styled(CSSTransition)<{\n $direction: \"left\" | \"right\";\n}>`\n ${(props) =>\n props.$direction === \"left\" &&\n css`\n &.c-slide-enter {\n position: absolute;\n transform: translateX(100%);\n }\n &.c-slide-enter-active {\n transform: translateX(0%);\n transition: all 200ms ease;\n }\n &.c-slide-exit {\n position: absolute;\n }\n &.c-slide-exit-active {\n transform: translateX(-100%);\n transition: all 200ms ease;\n }\n `}\n\n ${(props) =>\n props.$direction === \"right\" &&\n css`\n &.c-slide-enter {\n position: absolute;\n transform: translateX(-100%);\n }\n &.c-slide-enter-active {\n transform: translateX(0%);\n transition: all 200ms ease;\n }\n\n &.c-slide-exit {\n position: absolute;\n }\n\n &.c-slide-exit-active {\n transform: translateX(100%);\n transition: all 200ms ease;\n }\n `}\n`;\n\nStyledSlideLeftRightTransition.displayName = \"StyledSlideLeftRightTransition\";\n"],"file":"Styles.js"}
|
package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { FC, ReactElement } from "react";
|
|
|
2
2
|
import { TransitionProps } from "../types";
|
|
3
3
|
interface ISlideLeftRightTransition extends TransitionProps {
|
|
4
4
|
children: ReactElement;
|
|
5
|
-
timeout?: number;
|
|
6
5
|
direction?: "left" | "right";
|
|
6
|
+
className?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const SlideLeftRightTransition: FC<ISlideLeftRightTransition>;
|
|
9
9
|
export {};
|
package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideLeftRightTransition.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"SlideLeftRightTransition.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,UAAU,yBAA0B,SAAQ,eAAe;IACzD,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,yBAAyB,CAiBlE,CAAC"}
|
package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js
CHANGED
|
@@ -1,46 +1,22 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["children", "direction", "className"];
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { StyledSlideLeftRightTransition } from "./Styles";
|
|
6
|
+
import classnames from "classnames";
|
|
4
7
|
export var SlideLeftRightTransition = function SlideLeftRightTransition(_ref) {
|
|
5
|
-
var
|
|
6
|
-
inProp = _ref$in === void 0 ? false : _ref$in,
|
|
8
|
+
var children = _ref.children,
|
|
7
9
|
_ref$direction = _ref.direction,
|
|
8
10
|
direction = _ref$direction === void 0 ? "left" : _ref$direction,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
transform: direction === "left" ? "translateX(100%)" : "translateX(-100%)"
|
|
19
|
-
},
|
|
20
|
-
entered: {
|
|
21
|
-
transform: "translateX(0%)",
|
|
22
|
-
transition: "all " + timeout + "ms ease"
|
|
23
|
-
},
|
|
24
|
-
exiting: {
|
|
25
|
-
position: "absolute"
|
|
26
|
-
},
|
|
27
|
-
exited: {
|
|
28
|
-
transform: direction === "left" ? "translateX(-100%)" : "translateX(100%)",
|
|
29
|
-
transition: "all " + timeout + "ms ease"
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return /*#__PURE__*/React.createElement(Transition, {
|
|
33
|
-
in: inProp,
|
|
34
|
-
timeout: 0,
|
|
35
|
-
onEnter: onEnter,
|
|
36
|
-
onExited: onExited
|
|
37
|
-
}, function (state) {
|
|
38
|
-
return /*#__PURE__*/cloneElement(children, {
|
|
39
|
-
style: _extends({
|
|
40
|
-
visibility: state === "exited" && !inProp ? "hidden" : undefined
|
|
41
|
-
}, transitionStyles[state], style, children.props.style)
|
|
42
|
-
});
|
|
43
|
-
});
|
|
11
|
+
className = _ref.className,
|
|
12
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
|
+
|
|
14
|
+
return /*#__PURE__*/React.createElement(StyledSlideLeftRightTransition, _extends({
|
|
15
|
+
timeout: 200,
|
|
16
|
+
classNames: classnames(className, "c-slide"),
|
|
17
|
+
unmountOnExit: true,
|
|
18
|
+
$direction: direction
|
|
19
|
+
}, props), children);
|
|
44
20
|
};
|
|
45
21
|
SlideLeftRightTransition.displayName = "SlideLeftRightTransition";
|
|
46
22
|
//# sourceMappingURL=SlideLeftRightTransition.js.map
|
package/dist/esm/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.tsx"],"names":["React","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/SlideLeftRightTransition.tsx"],"names":["React","StyledSlideLeftRightTransition","classnames","SlideLeftRightTransition","children","direction","className","props","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,MAAwC,OAAxC;AAEA,SAASC,8BAAT,QAA+C,UAA/C;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAQA,OAAO,IAAMC,wBAAuD,GAAG,SAA1DA,wBAA0D,OAKjE;AAAA,MAJJC,QAII,QAJJA,QAII;AAAA,4BAHJC,SAGI;AAAA,MAHJA,SAGI,+BAHQ,MAGR;AAAA,MAFJC,SAEI,QAFJA,SAEI;AAAA,MADDC,KACC;;AACJ,sBACE,oBAAC,8BAAD;AACE,IAAA,OAAO,EAAE,GADX;AAEE,IAAA,UAAU,EAAEL,UAAU,CAACI,SAAD,EAAY,SAAZ,CAFxB;AAGE,IAAA,aAAa,MAHf;AAIE,IAAA,UAAU,EAAED;AAJd,KAKME,KALN,GAOGH,QAPH,CADF;AAWD,CAjBM;AAmBPD,wBAAwB,CAACK,WAAzB,GAAuC,0BAAvC","sourcesContent":["import React, { FC, ReactElement } from \"react\";\nimport { TransitionProps } from \"../types\";\nimport { StyledSlideLeftRightTransition } from \"./Styles\";\nimport classnames from \"classnames\";\n\ninterface ISlideLeftRightTransition extends TransitionProps {\n children: ReactElement;\n direction?: \"left\" | \"right\";\n className?: string;\n}\n\nexport const SlideLeftRightTransition: FC<ISlideLeftRightTransition> = ({\n children,\n direction = \"left\",\n className,\n ...props\n}) => {\n return (\n <StyledSlideLeftRightTransition\n timeout={200}\n classNames={classnames(className, \"c-slide\")}\n unmountOnExit\n $direction={direction}\n {...props}\n >\n {children}\n </StyledSlideLeftRightTransition>\n );\n};\n\nSlideLeftRightTransition.displayName = \"SlideLeftRightTransition\";\n"],"file":"SlideLeftRightTransition.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/Styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,eAAO,MAAM,8BAA8B;gBAC7B,MAAM,GAAG,OAAO;SA2C7B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { CSSTransition } from "react-transition-group";
|
|
3
|
+
export var StyledSlideLeftRightTransition = styled(CSSTransition).withConfig({
|
|
4
|
+
displayName: "Styles__StyledSlideLeftRightTransition",
|
|
5
|
+
componentId: "sc-ewkpq8-0"
|
|
6
|
+
})(["", " ", ""], function (props) {
|
|
7
|
+
return props.$direction === "left" && css(["&.c-slide-enter{position:absolute;transform:translateX(100%);}&.c-slide-enter-active{transform:translateX(0%);transition:all 200ms ease;}&.c-slide-exit{position:absolute;}&.c-slide-exit-active{transform:translateX(-100%);transition:all 200ms ease;}"]);
|
|
8
|
+
}, function (props) {
|
|
9
|
+
return props.$direction === "right" && css(["&.c-slide-enter{position:absolute;transform:translateX(-100%);}&.c-slide-enter-active{transform:translateX(0%);transition:all 200ms ease;}&.c-slide-exit{position:absolute;}&.c-slide-exit-active{transform:translateX(100%);transition:all 200ms ease;}"]);
|
|
10
|
+
});
|
|
11
|
+
StyledSlideLeftRightTransition.displayName = "StyledSlideLeftRightTransition";
|
|
12
|
+
//# sourceMappingURL=Styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Transitions/SlideLeftRightTransition/Styles.ts"],"names":["styled","css","CSSTransition","StyledSlideLeftRightTransition","props","$direction","displayName"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAASC,aAAT,QAA8B,wBAA9B;AAEA,OAAO,IAAMC,8BAA8B,GAAGH,MAAM,CAACE,aAAD,CAAT;AAAA;AAAA;AAAA,kBAGvC,UAACE,KAAD;AAAA,SACAA,KAAK,CAACC,UAAN,KAAqB,MAArB,IACAJ,GADA,8PADA;AAAA,CAHuC,EAuBvC,UAACG,KAAD;AAAA,SACAA,KAAK,CAACC,UAAN,KAAqB,OAArB,IACAJ,GADA,8PADA;AAAA,CAvBuC,CAApC;AA8CPE,8BAA8B,CAACG,WAA/B,GAA6C,gCAA7C","sourcesContent":["import styled, { css } from \"styled-components\";\nimport { CSSTransition } from \"react-transition-group\";\n\nexport const StyledSlideLeftRightTransition = styled(CSSTransition)<{\n $direction: \"left\" | \"right\";\n}>`\n ${(props) =>\n props.$direction === \"left\" &&\n css`\n &.c-slide-enter {\n position: absolute;\n transform: translateX(100%);\n }\n &.c-slide-enter-active {\n transform: translateX(0%);\n transition: all 200ms ease;\n }\n &.c-slide-exit {\n position: absolute;\n }\n &.c-slide-exit-active {\n transform: translateX(-100%);\n transition: all 200ms ease;\n }\n `}\n\n ${(props) =>\n props.$direction === \"right\" &&\n css`\n &.c-slide-enter {\n position: absolute;\n transform: translateX(-100%);\n }\n &.c-slide-enter-active {\n transform: translateX(0%);\n transition: all 200ms ease;\n }\n\n &.c-slide-exit {\n position: absolute;\n }\n\n &.c-slide-exit-active {\n transform: translateX(100%);\n transition: all 200ms ease;\n }\n `}\n`;\n\nStyledSlideLeftRightTransition.displayName = \"StyledSlideLeftRightTransition\";\n"],"file":"Styles.js"}
|