@instructure/ui-motion 8.12.1-snapshot.7 → 8.13.1-snapshot.9
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/CHANGELOG.md +4 -0
- package/es/Transition/BaseTransition/index.js +19 -12
- package/es/Transition/index.js +2 -2
- package/lib/Transition/BaseTransition/index.js +20 -13
- package/lib/Transition/BaseTransition/props.js +1 -1
- package/lib/Transition/index.js +3 -3
- package/lib/Transition/props.js +1 -1
- package/lib/Transition/styles.js +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-motion
|
|
9
|
+
|
|
6
10
|
# [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
|
@@ -40,8 +40,11 @@ private: true
|
|
|
40
40
|
**/
|
|
41
41
|
|
|
42
42
|
class BaseTransition extends React.Component {
|
|
43
|
-
constructor(
|
|
44
|
-
|
|
43
|
+
constructor() {
|
|
44
|
+
var _this;
|
|
45
|
+
|
|
46
|
+
super(...arguments);
|
|
47
|
+
_this = this;
|
|
45
48
|
this._timeouts = [];
|
|
46
49
|
this._unmounted = false;
|
|
47
50
|
this.state = {
|
|
@@ -60,15 +63,19 @@ class BaseTransition extends React.Component {
|
|
|
60
63
|
}
|
|
61
64
|
};
|
|
62
65
|
|
|
63
|
-
this.transition = (toState, fromState, transitionCallback
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
const
|
|
66
|
+
this.transition = function (toState, fromState, transitionCallback) {
|
|
67
|
+
let transitionDuration = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
68
|
+
if (_this._unmounted) return;
|
|
69
|
+
const onTransition = _this.props.onTransition;
|
|
70
|
+
const classList = getClassList(_this);
|
|
71
|
+
|
|
72
|
+
const transitionClassName = _this.getTransitionClassName(toState);
|
|
73
|
+
|
|
74
|
+
const prevTransitionClassName = _this.getTransitionClassName(fromState);
|
|
75
|
+
|
|
76
|
+
const baseTransitionClassName = _this.props.transitionClassName;
|
|
70
77
|
|
|
71
|
-
if (fromState && transitionDuration &&
|
|
78
|
+
if (fromState && transitionDuration && _this.transitionEnabled(toState)) {
|
|
72
79
|
baseTransitionClassName && classList.add(baseTransitionClassName);
|
|
73
80
|
} else {
|
|
74
81
|
baseTransitionClassName && classList.remove(baseTransitionClassName);
|
|
@@ -86,8 +93,8 @@ class BaseTransition extends React.Component {
|
|
|
86
93
|
onTransition(toState, fromState);
|
|
87
94
|
}
|
|
88
95
|
|
|
89
|
-
|
|
90
|
-
if (
|
|
96
|
+
_this._timeouts.push(setTimeout(() => {
|
|
97
|
+
if (_this._unmounted) return;
|
|
91
98
|
|
|
92
99
|
if (typeof transitionCallback === 'function') {
|
|
93
100
|
transitionCallback();
|
package/es/Transition/index.js
CHANGED
|
@@ -49,8 +49,8 @@ category: components/utilities
|
|
|
49
49
|
@tsProps
|
|
50
50
|
**/
|
|
51
51
|
let Transition = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class Transition extends Component {
|
|
52
|
-
constructor(
|
|
53
|
-
super(...
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments);
|
|
54
54
|
|
|
55
55
|
this.handleExited = () => {
|
|
56
56
|
if (typeof this.props.onExited === 'function') {
|
|
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.default = exports.BaseTransition = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -55,8 +55,11 @@ private: true
|
|
|
55
55
|
**/
|
|
56
56
|
|
|
57
57
|
class BaseTransition extends _react.default.Component {
|
|
58
|
-
constructor(
|
|
59
|
-
|
|
58
|
+
constructor() {
|
|
59
|
+
var _this;
|
|
60
|
+
|
|
61
|
+
super(...arguments);
|
|
62
|
+
_this = this;
|
|
60
63
|
this._timeouts = [];
|
|
61
64
|
this._unmounted = false;
|
|
62
65
|
this.state = {
|
|
@@ -75,15 +78,19 @@ class BaseTransition extends _react.default.Component {
|
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
80
|
|
|
78
|
-
this.transition = (toState, fromState, transitionCallback
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const
|
|
81
|
+
this.transition = function (toState, fromState, transitionCallback) {
|
|
82
|
+
let transitionDuration = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
83
|
+
if (_this._unmounted) return;
|
|
84
|
+
const onTransition = _this.props.onTransition;
|
|
85
|
+
const classList = (0, _getClassList.getClassList)(_this);
|
|
86
|
+
|
|
87
|
+
const transitionClassName = _this.getTransitionClassName(toState);
|
|
88
|
+
|
|
89
|
+
const prevTransitionClassName = _this.getTransitionClassName(fromState);
|
|
90
|
+
|
|
91
|
+
const baseTransitionClassName = _this.props.transitionClassName;
|
|
85
92
|
|
|
86
|
-
if (fromState && transitionDuration &&
|
|
93
|
+
if (fromState && transitionDuration && _this.transitionEnabled(toState)) {
|
|
87
94
|
baseTransitionClassName && classList.add(baseTransitionClassName);
|
|
88
95
|
} else {
|
|
89
96
|
baseTransitionClassName && classList.remove(baseTransitionClassName);
|
|
@@ -101,8 +108,8 @@ class BaseTransition extends _react.default.Component {
|
|
|
101
108
|
onTransition(toState, fromState);
|
|
102
109
|
}
|
|
103
110
|
|
|
104
|
-
|
|
105
|
-
if (
|
|
111
|
+
_this._timeouts.push(setTimeout(() => {
|
|
112
|
+
if (_this._unmounted) return;
|
|
106
113
|
|
|
107
114
|
if (typeof transitionCallback === 'function') {
|
|
108
115
|
transitionCallback();
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.transitionCommonPropTypes = exports.
|
|
8
|
+
exports.transitionCommonPropTypes = exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
package/lib/Transition/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.default = exports.Transition = void 0;
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
@@ -39,8 +39,8 @@ category: components/utilities
|
|
|
39
39
|
@tsProps
|
|
40
40
|
**/
|
|
41
41
|
let Transition = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class Transition extends _react.Component {
|
|
42
|
-
constructor(
|
|
43
|
-
super(...
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments);
|
|
44
44
|
|
|
45
45
|
this.handleExited = () => {
|
|
46
46
|
if (typeof this.props.onExited === 'function') {
|
package/lib/Transition/props.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.transitionTypePropType = exports.
|
|
8
|
+
exports.transitionTypePropType = exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
package/lib/Transition/styles.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-motion",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.13.1-snapshot.9+f32ba918e",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.
|
|
28
|
-
"@instructure/ui-test-locator": "8.
|
|
29
|
-
"@instructure/ui-test-utils": "8.
|
|
30
|
-
"@instructure/ui-themes": "8.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.13.1-snapshot.9+f32ba918e",
|
|
28
|
+
"@instructure/ui-test-locator": "8.13.1-snapshot.9+f32ba918e",
|
|
29
|
+
"@instructure/ui-test-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
30
|
+
"@instructure/ui-themes": "8.13.1-snapshot.9+f32ba918e"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/emotion": "8.
|
|
35
|
-
"@instructure/shared-types": "8.
|
|
36
|
-
"@instructure/ui-dom-utils": "8.
|
|
37
|
-
"@instructure/ui-react-utils": "8.
|
|
38
|
-
"@instructure/ui-testable": "8.
|
|
39
|
-
"@instructure/ui-utils": "8.
|
|
34
|
+
"@instructure/emotion": "8.13.1-snapshot.9+f32ba918e",
|
|
35
|
+
"@instructure/shared-types": "8.13.1-snapshot.9+f32ba918e",
|
|
36
|
+
"@instructure/ui-dom-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
37
|
+
"@instructure/ui-react-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
38
|
+
"@instructure/ui-testable": "8.13.1-snapshot.9+f32ba918e",
|
|
39
|
+
"@instructure/ui-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
40
40
|
"prop-types": "^15"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"sideEffects": false,
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "f32ba918e4d3ce76c6ee95c856584d00a9d80958"
|
|
50
50
|
}
|