@instructure/ui-motion 11.7.8 → 11.7.9-snapshot-1
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
|
+
## [11.7.9-snapshot-1](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-1) (2026-10-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-motion
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-motion
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.BaseTransition = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
12
|
-
var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
|
|
8
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
9
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
10
|
+
var _uiUtils = require("@instructure/ui-utils");
|
|
13
11
|
var _props = require("./props.js");
|
|
14
12
|
/*
|
|
15
13
|
* The MIT License (MIT)
|
|
@@ -127,7 +125,7 @@ class BaseTransition extends _react.Component {
|
|
|
127
125
|
const {
|
|
128
126
|
onTransition
|
|
129
127
|
} = this.props;
|
|
130
|
-
const classList = (0,
|
|
128
|
+
const classList = (0, _uiDomUtils.getClassList)(this.ref);
|
|
131
129
|
const transitionClassName = this.getTransitionClassName(toState);
|
|
132
130
|
const prevTransitionClassName = this.getTransitionClassName(fromState);
|
|
133
131
|
const baseTransitionClassName = this.props.transitionClassName;
|
|
@@ -158,7 +156,7 @@ class BaseTransition extends _react.Component {
|
|
|
158
156
|
transitioning: false
|
|
159
157
|
}, () => {
|
|
160
158
|
if (this._unmounted) return;
|
|
161
|
-
const classList = (0,
|
|
159
|
+
const classList = (0, _uiDomUtils.getClassList)(this.ref);
|
|
162
160
|
Object.values(STATES).forEach(state => {
|
|
163
161
|
const className = this.getTransitionClassName(state);
|
|
164
162
|
if (className) {
|
|
@@ -294,7 +292,7 @@ class BaseTransition extends _react.Component {
|
|
|
294
292
|
if (!this.props.children) {
|
|
295
293
|
return null;
|
|
296
294
|
}
|
|
297
|
-
const child = (0,
|
|
295
|
+
const child = (0, _uiReactUtils.ensureSingleChild)(this.props.children);
|
|
298
296
|
|
|
299
297
|
// Pass elementRef only to children that declare it. Emotion's wrapper
|
|
300
298
|
// around `<div css={...}>` accepts any prop and forwards it to the DOM
|
|
@@ -302,7 +300,7 @@ class BaseTransition extends _react.Component {
|
|
|
302
300
|
const acceptsElementRef = child.type?.allowedProps?.includes('elementRef');
|
|
303
301
|
const refProps = acceptsElementRef ? {
|
|
304
302
|
// chain so the child's own elementRef still fires instead of being overwritten
|
|
305
|
-
elementRef: (0,
|
|
303
|
+
elementRef: (0, _uiUtils.createChainedFunction)(child.props?.elementRef, this.handleRef),
|
|
306
304
|
// fallback for forwardRef children that expose their node via `ref`, not elementRef
|
|
307
305
|
ref: el => {
|
|
308
306
|
if (el instanceof Element) {
|
|
@@ -311,9 +309,9 @@ class BaseTransition extends _react.Component {
|
|
|
311
309
|
}
|
|
312
310
|
} : {
|
|
313
311
|
// host el / plain class|fn: findDOMNode is the fallback
|
|
314
|
-
ref: el => this.handleRef(el instanceof Element ? el : (0,
|
|
312
|
+
ref: el => this.handleRef(el instanceof Element ? el : (0, _uiDomUtils.findDOMNode)(el) ?? null)
|
|
315
313
|
};
|
|
316
|
-
return (0,
|
|
314
|
+
return (0, _uiReactUtils.safeCloneElement)(child, {
|
|
317
315
|
'aria-hidden': !this.props.in ? true : undefined,
|
|
318
316
|
...refProps
|
|
319
317
|
});
|
package/lib/Transition/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Transition = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _uiUtils = require("@instructure/ui-utils");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
11
11
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
12
12
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
@@ -104,7 +104,7 @@ let Transition = exports.Transition = (_dec = (0, _emotion.withStyle)(_styles.de
|
|
|
104
104
|
styles,
|
|
105
105
|
...props
|
|
106
106
|
} = this.props;
|
|
107
|
-
const duration = (0,
|
|
107
|
+
const duration = (0, _uiUtils.ms)(styles.duration);
|
|
108
108
|
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
109
109
|
children: [this.renderTransitionHelper(), (0, _jsxRuntime.jsx)(_index.BaseTransition, {
|
|
110
110
|
...props,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-motion",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.9-snapshot-1",
|
|
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",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/ui-
|
|
21
|
-
"@instructure/ui-react-utils": "11.7.
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/ui-utils": "11.7.
|
|
18
|
+
"@instructure/shared-types": "11.7.9-snapshot-1",
|
|
19
|
+
"@instructure/emotion": "11.7.9-snapshot-1",
|
|
20
|
+
"@instructure/ui-themes": "11.7.9-snapshot-1",
|
|
21
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-1",
|
|
22
|
+
"@instructure/ui-dom-utils": "11.7.9-snapshot-1",
|
|
23
|
+
"@instructure/ui-utils": "11.7.9-snapshot-1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"vitest": "^5.0.0",
|
|
27
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
27
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": ">=18 <=19"
|