@instructure/ui-motion 10.13.0 → 10.13.1-pr-snapshot-1741357986437
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
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [10.13.1-pr-snapshot-1741357986437](https://github.com/instructure/instructure-ui/compare/v10.13.0...v10.13.1-pr-snapshot-1741357986437) (2025-03-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-motion
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [10.13.0](https://github.com/instructure/instructure-ui/compare/v10.12.0...v10.13.0) (2025-03-06)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-motion
|
|
@@ -6,10 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.BaseTransition = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var _ensureSingleChild = require("@instructure/ui-react-utils/lib/ensureSingleChild.js");
|
|
12
|
-
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
9
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
10
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
13
11
|
var _props = require("./props");
|
|
14
12
|
/*
|
|
15
13
|
* The MIT License (MIT)
|
|
@@ -78,7 +76,7 @@ class BaseTransition extends _react.default.Component {
|
|
|
78
76
|
this.transition = (toState, fromState, transitionCallback, transitionDuration = 0) => {
|
|
79
77
|
if (this._unmounted) return;
|
|
80
78
|
const onTransition = this.props.onTransition;
|
|
81
|
-
const classList = (0,
|
|
79
|
+
const classList = (0, _uiDomUtils.getClassList)(this.ref);
|
|
82
80
|
const transitionClassName = this.getTransitionClassName(toState);
|
|
83
81
|
const prevTransitionClassName = this.getTransitionClassName(fromState);
|
|
84
82
|
const baseTransitionClassName = this.props.transitionClassName;
|
|
@@ -230,7 +228,7 @@ class BaseTransition extends _react.default.Component {
|
|
|
230
228
|
transitioning: false
|
|
231
229
|
}, () => {
|
|
232
230
|
if (this._unmounted) return;
|
|
233
|
-
const classList = (0,
|
|
231
|
+
const classList = (0, _uiDomUtils.getClassList)(this.ref);
|
|
234
232
|
Object.values(STATES).forEach(state => {
|
|
235
233
|
const className = this.getTransitionClassName(state);
|
|
236
234
|
if (className) {
|
|
@@ -269,10 +267,10 @@ class BaseTransition extends _react.default.Component {
|
|
|
269
267
|
}
|
|
270
268
|
}
|
|
271
269
|
renderChildren() {
|
|
272
|
-
return this.props.children ? (0,
|
|
270
|
+
return this.props.children ? (0, _uiReactUtils.safeCloneElement)((0, _uiReactUtils.ensureSingleChild)(this.props.children), {
|
|
273
271
|
'aria-hidden': !this.props.in ? true : void 0,
|
|
274
272
|
ref: el => {
|
|
275
|
-
const ref = (0,
|
|
273
|
+
const ref = (0, _uiDomUtils.findDOMNode)(el) || null;
|
|
276
274
|
this.handleRef(ref);
|
|
277
275
|
}
|
|
278
276
|
}) : null;
|
package/lib/Transition/index.js
CHANGED
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = exports.Transition = void 0;
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _uiUtils = require("@instructure/ui-utils");
|
|
12
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
13
13
|
var _emotion = require("@instructure/emotion");
|
|
14
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
15
15
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -49,7 +49,7 @@ category: components/utilities
|
|
|
49
49
|
---
|
|
50
50
|
@module Transition
|
|
51
51
|
**/
|
|
52
|
-
let Transition = exports.Transition = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
52
|
+
let Transition = exports.Transition = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_Transition = class Transition extends _react.Component {
|
|
53
53
|
constructor(...args) {
|
|
54
54
|
super(...args);
|
|
55
55
|
this.ref = null;
|
|
@@ -96,7 +96,7 @@ let Transition = exports.Transition = (_dec = (0, _emotion.withStyle)(_styles.de
|
|
|
96
96
|
children = _this$props3.children,
|
|
97
97
|
styles = _this$props3.styles,
|
|
98
98
|
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
99
|
-
const duration = (0,
|
|
99
|
+
const duration = (0, _uiUtils.ms)(styles.duration);
|
|
100
100
|
return (0, _emotion.jsx)(_react.default.Fragment, null, this.renderTransitionHelper(), (0, _emotion.jsx)(_BaseTransition.BaseTransition, Object.assign({}, props, {
|
|
101
101
|
enterDelay: duration,
|
|
102
102
|
exitDelay: duration,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-motion",
|
|
3
|
-
"version": "10.13.
|
|
3
|
+
"version": "10.13.1-pr-snapshot-1741357986437",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "10.13.
|
|
27
|
-
"@instructure/ui-themes": "10.13.
|
|
26
|
+
"@instructure/ui-babel-preset": "10.13.1-pr-snapshot-1741357986437",
|
|
27
|
+
"@instructure/ui-themes": "10.13.1-pr-snapshot-1741357986437",
|
|
28
28
|
"@testing-library/jest-dom": "^6.6.3",
|
|
29
29
|
"@testing-library/react": "^16.0.1",
|
|
30
30
|
"vitest": "^2.1.8"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.26.0",
|
|
34
|
-
"@instructure/emotion": "10.13.
|
|
35
|
-
"@instructure/shared-types": "10.13.
|
|
36
|
-
"@instructure/ui-dom-utils": "10.13.
|
|
37
|
-
"@instructure/ui-react-utils": "10.13.
|
|
38
|
-
"@instructure/ui-testable": "10.13.
|
|
39
|
-
"@instructure/ui-utils": "10.13.
|
|
34
|
+
"@instructure/emotion": "10.13.1-pr-snapshot-1741357986437",
|
|
35
|
+
"@instructure/shared-types": "10.13.1-pr-snapshot-1741357986437",
|
|
36
|
+
"@instructure/ui-dom-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
37
|
+
"@instructure/ui-react-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
38
|
+
"@instructure/ui-testable": "10.13.1-pr-snapshot-1741357986437",
|
|
39
|
+
"@instructure/ui-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
40
40
|
"prop-types": "^15.8.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|