@instructure/ui-spinner 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-spinner
|
|
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-spinner
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
var _react = _interopRequireDefault(require("react"));
|
|
5
5
|
var _react2 = require("@testing-library/react");
|
|
6
|
-
var
|
|
6
|
+
var _uiAxeCheck = require("@instructure/ui-axe-check");
|
|
7
7
|
var _vitest = require("vitest");
|
|
8
8
|
require("@testing-library/jest-dom");
|
|
9
|
-
var
|
|
9
|
+
var _uiView = require("@instructure/ui-view");
|
|
10
10
|
var _index = _interopRequireDefault(require("../index"));
|
|
11
11
|
var _Spinner, _Spinner2, _Spinner3, _Spinner4;
|
|
12
12
|
/*
|
|
@@ -65,7 +65,7 @@ describe('<Spinner />', () => {
|
|
|
65
65
|
size: "small"
|
|
66
66
|
}))),
|
|
67
67
|
container = _render3.container;
|
|
68
|
-
const axeCheck = await (0,
|
|
68
|
+
const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
|
|
69
69
|
(0, _vitest.expect)(axeCheck).toBe(true);
|
|
70
70
|
});
|
|
71
71
|
it('should render the contents of a component used in renderTitle', async () => {
|
|
@@ -78,7 +78,7 @@ describe('<Spinner />', () => {
|
|
|
78
78
|
})),
|
|
79
79
|
container = _render4.container;
|
|
80
80
|
const spinner = container.querySelector('div[class$="-spinner"]');
|
|
81
|
-
const axeCheck = await (0,
|
|
81
|
+
const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
|
|
82
82
|
(0, _vitest.expect)(axeCheck).toBe(true);
|
|
83
83
|
(0, _vitest.expect)(spinner).toHaveTextContent('I have translated Loading');
|
|
84
84
|
});
|
|
@@ -88,7 +88,7 @@ describe('<Spinner />', () => {
|
|
|
88
88
|
elementRef: () => {},
|
|
89
89
|
as: 'div'
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
_uiView.View.allowedProps.filter(prop => prop !== 'children').forEach(prop => {
|
|
92
92
|
if (Object.keys(allowedProps).indexOf(prop) < 0) {
|
|
93
93
|
it(`should NOT allow the '${prop}' prop`, async () => {
|
|
94
94
|
const props = {
|
package/lib/Spinner/index.js
CHANGED
|
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Spinner = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
13
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
9
|
+
var _uiView = require("@instructure/ui-view");
|
|
10
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
11
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
14
12
|
var _console = require("@instructure/console");
|
|
15
13
|
var _emotion = require("@instructure/emotion");
|
|
16
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -46,7 +44,7 @@ var _dec, _dec2, _dec3, _class, _Spinner;
|
|
|
46
44
|
category: components
|
|
47
45
|
---
|
|
48
46
|
**/
|
|
49
|
-
let Spinner = exports.Spinner = (_dec = (0,
|
|
47
|
+
let Spinner = exports.Spinner = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_Spinner = class Spinner extends _react.Component {
|
|
50
48
|
constructor(props) {
|
|
51
49
|
super(props);
|
|
52
50
|
this.ref = null;
|
|
@@ -97,10 +95,10 @@ let Spinner = exports.Spinner = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
97
95
|
}
|
|
98
96
|
renderSpinner() {
|
|
99
97
|
var _this$props$styles, _this$props$styles2, _this$props$styles3, _this$props$styles4;
|
|
100
|
-
const passthroughProps =
|
|
98
|
+
const passthroughProps = _uiView.View.omitViewProps((0, _uiReactUtils.omitProps)(this.props, Spinner.allowedProps), Spinner);
|
|
101
99
|
const hasTitle = this.props.renderTitle;
|
|
102
100
|
(0, _console.logError)(!!hasTitle, '[Spinner] The renderTitle prop is necessary for screen reader support.');
|
|
103
|
-
return (0, _emotion.jsx)(
|
|
101
|
+
return (0, _emotion.jsx)(_uiView.View, Object.assign({}, passthroughProps, {
|
|
104
102
|
as: this.props.as,
|
|
105
103
|
elementRef: this.handleRef,
|
|
106
104
|
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.spinner,
|
|
@@ -112,7 +110,7 @@ let Spinner = exports.Spinner = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
112
110
|
focusable: "false"
|
|
113
111
|
}, (0, _emotion.jsx)("title", {
|
|
114
112
|
id: this.titleId
|
|
115
|
-
}, (0,
|
|
113
|
+
}, (0, _uiReactUtils.callRenderProp)(this.props.renderTitle)), (0, _emotion.jsx)("g", {
|
|
116
114
|
role: "presentation"
|
|
117
115
|
}, this.props.variant !== 'inverse' && (0, _emotion.jsx)("circle", {
|
|
118
116
|
css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.circleTrack,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-spinner",
|
|
3
|
-
"version": "10.13.
|
|
3
|
+
"version": "10.13.1-pr-snapshot-1741357986437",
|
|
4
4
|
"description": "A spinner/loading component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.26.0",
|
|
27
|
-
"@instructure/console": "10.13.
|
|
28
|
-
"@instructure/emotion": "10.13.
|
|
29
|
-
"@instructure/shared-types": "10.13.
|
|
30
|
-
"@instructure/ui-color-utils": "10.13.
|
|
31
|
-
"@instructure/ui-react-utils": "10.13.
|
|
32
|
-
"@instructure/ui-testable": "10.13.
|
|
33
|
-
"@instructure/ui-utils": "10.13.
|
|
34
|
-
"@instructure/ui-view": "10.13.
|
|
35
|
-
"@instructure/uid": "10.13.
|
|
27
|
+
"@instructure/console": "10.13.1-pr-snapshot-1741357986437",
|
|
28
|
+
"@instructure/emotion": "10.13.1-pr-snapshot-1741357986437",
|
|
29
|
+
"@instructure/shared-types": "10.13.1-pr-snapshot-1741357986437",
|
|
30
|
+
"@instructure/ui-color-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
31
|
+
"@instructure/ui-react-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
32
|
+
"@instructure/ui-testable": "10.13.1-pr-snapshot-1741357986437",
|
|
33
|
+
"@instructure/ui-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
34
|
+
"@instructure/ui-view": "10.13.1-pr-snapshot-1741357986437",
|
|
35
|
+
"@instructure/uid": "10.13.1-pr-snapshot-1741357986437",
|
|
36
36
|
"prop-types": "^15.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-axe-check": "10.13.
|
|
40
|
-
"@instructure/ui-babel-preset": "10.13.
|
|
41
|
-
"@instructure/ui-test-utils": "10.13.
|
|
42
|
-
"@instructure/ui-themes": "10.13.
|
|
39
|
+
"@instructure/ui-axe-check": "10.13.1-pr-snapshot-1741357986437",
|
|
40
|
+
"@instructure/ui-babel-preset": "10.13.1-pr-snapshot-1741357986437",
|
|
41
|
+
"@instructure/ui-test-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
42
|
+
"@instructure/ui-themes": "10.13.1-pr-snapshot-1741357986437",
|
|
43
43
|
"@testing-library/jest-dom": "^6.6.3",
|
|
44
44
|
"@testing-library/react": "^16.0.1",
|
|
45
45
|
"vitest": "^2.1.8"
|