@instructure/ui-spinner 8.9.2-snapshot.2 → 8.9.2-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/es/Spinner/index.js +1 -1
- package/lib/Spinner/index.js +1 -1
- package/package.json +15 -15
- package/src/Spinner/index.tsx +1 -1
- package/src/Spinner/props.ts +16 -4
- package/src/Spinner/styles.ts +4 -3
- package/types/Spinner/props.d.ts +5 -4
- package/types/Spinner/props.d.ts.map +1 -1
- package/types/Spinner/styles.d.ts +3 -3
- package/types/Spinner/styles.d.ts.map +1 -1
package/es/Spinner/index.js
CHANGED
|
@@ -78,7 +78,7 @@ let Spinner = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
78
78
|
render() {
|
|
79
79
|
var _this$props$styles, _this$props$styles2, _this$props$styles3, _this$props$styles4;
|
|
80
80
|
|
|
81
|
-
const passthroughProps = View.omitViewProps(omitProps(this.props, Spinner.
|
|
81
|
+
const passthroughProps = View.omitViewProps(omitProps(this.props, Spinner.allowedProps), Spinner);
|
|
82
82
|
const hasTitle = this.props.renderTitle;
|
|
83
83
|
error(hasTitle, '[Spinner] The renderTitle prop is necessary for screen reader support.');
|
|
84
84
|
return jsx(View, Object.assign({}, passthroughProps, {
|
package/lib/Spinner/index.js
CHANGED
|
@@ -73,7 +73,7 @@ let Spinner = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
73
73
|
render() {
|
|
74
74
|
var _this$props$styles, _this$props$styles2, _this$props$styles3, _this$props$styles4;
|
|
75
75
|
|
|
76
|
-
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Spinner.
|
|
76
|
+
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Spinner.allowedProps), Spinner);
|
|
77
77
|
|
|
78
78
|
const hasTitle = this.props.renderTitle;
|
|
79
79
|
(0, _console.logError)(hasTitle, '[Spinner] The renderTitle prop is necessary for screen reader support.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-spinner",
|
|
3
|
-
"version": "8.9.2-snapshot.
|
|
3
|
+
"version": "8.9.2-snapshot.9+e92f12dda",
|
|
4
4
|
"description": "A spinner/loading component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.9.2-snapshot.
|
|
29
|
-
"@instructure/emotion": "8.9.2-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.9.2-snapshot.
|
|
31
|
-
"@instructure/ui-color-utils": "8.9.2-snapshot.
|
|
32
|
-
"@instructure/ui-react-utils": "8.9.2-snapshot.
|
|
33
|
-
"@instructure/ui-testable": "8.9.2-snapshot.
|
|
34
|
-
"@instructure/ui-utils": "8.9.2-snapshot.
|
|
35
|
-
"@instructure/ui-view": "8.9.2-snapshot.
|
|
36
|
-
"@instructure/uid": "8.9.2-snapshot.
|
|
28
|
+
"@instructure/console": "8.9.2-snapshot.9+e92f12dda",
|
|
29
|
+
"@instructure/emotion": "8.9.2-snapshot.9+e92f12dda",
|
|
30
|
+
"@instructure/shared-types": "8.9.2-snapshot.9+e92f12dda",
|
|
31
|
+
"@instructure/ui-color-utils": "8.9.2-snapshot.9+e92f12dda",
|
|
32
|
+
"@instructure/ui-react-utils": "8.9.2-snapshot.9+e92f12dda",
|
|
33
|
+
"@instructure/ui-testable": "8.9.2-snapshot.9+e92f12dda",
|
|
34
|
+
"@instructure/ui-utils": "8.9.2-snapshot.9+e92f12dda",
|
|
35
|
+
"@instructure/ui-view": "8.9.2-snapshot.9+e92f12dda",
|
|
36
|
+
"@instructure/uid": "8.9.2-snapshot.9+e92f12dda",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.9.2-snapshot.
|
|
41
|
-
"@instructure/ui-test-locator": "8.9.2-snapshot.
|
|
42
|
-
"@instructure/ui-test-utils": "8.9.2-snapshot.
|
|
43
|
-
"@instructure/ui-themes": "8.9.2-snapshot.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.9.2-snapshot.9+e92f12dda",
|
|
41
|
+
"@instructure/ui-test-locator": "8.9.2-snapshot.9+e92f12dda",
|
|
42
|
+
"@instructure/ui-test-utils": "8.9.2-snapshot.9+e92f12dda",
|
|
43
|
+
"@instructure/ui-themes": "8.9.2-snapshot.9+e92f12dda"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.8 <=17"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e92f12dda2e003c834e8728072d6ab60e4212c89"
|
|
53
53
|
}
|
package/src/Spinner/index.tsx
CHANGED
package/src/Spinner/props.ts
CHANGED
|
@@ -25,8 +25,16 @@ import PropTypes from 'prop-types'
|
|
|
25
25
|
|
|
26
26
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
27
27
|
|
|
28
|
-
import type {
|
|
29
|
-
|
|
28
|
+
import type {
|
|
29
|
+
Spacing,
|
|
30
|
+
WithStyleProps,
|
|
31
|
+
ComponentStyle
|
|
32
|
+
} from '@instructure/emotion'
|
|
33
|
+
import type {
|
|
34
|
+
AsElementType,
|
|
35
|
+
PropValidators,
|
|
36
|
+
SpinnerTheme
|
|
37
|
+
} from '@instructure/shared-types'
|
|
30
38
|
|
|
31
39
|
type SpinnerOwnProps = {
|
|
32
40
|
renderTitle?: ((...args: any[]) => any) | React.ReactNode
|
|
@@ -41,7 +49,11 @@ type PropKeys = keyof SpinnerOwnProps
|
|
|
41
49
|
|
|
42
50
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
43
51
|
|
|
44
|
-
type SpinnerProps = SpinnerOwnProps & WithStyleProps
|
|
52
|
+
type SpinnerProps = SpinnerOwnProps & WithStyleProps<SpinnerTheme, SpinnerStyle>
|
|
53
|
+
|
|
54
|
+
type SpinnerStyle = ComponentStyle<
|
|
55
|
+
'spinner' | 'circle' | 'circleTrack' | 'circleSpin'
|
|
56
|
+
>
|
|
45
57
|
|
|
46
58
|
const propTypes: PropValidators<PropKeys> = {
|
|
47
59
|
/**
|
|
@@ -75,5 +87,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
75
87
|
'as'
|
|
76
88
|
]
|
|
77
89
|
|
|
78
|
-
export type { SpinnerProps }
|
|
90
|
+
export type { SpinnerProps, SpinnerStyle }
|
|
79
91
|
export { propTypes, allowedProps }
|
package/src/Spinner/styles.ts
CHANGED
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import { keyframes } from '@instructure/emotion'
|
|
26
|
-
|
|
27
|
-
import {
|
|
26
|
+
|
|
27
|
+
import type { SpinnerTheme } from '@instructure/shared-types'
|
|
28
|
+
import type { SpinnerProps, SpinnerStyle } from './props'
|
|
28
29
|
|
|
29
30
|
// keyframes have to be outside of 'generateStyle',
|
|
30
31
|
// since it is causing problems in style recalculation
|
|
@@ -61,7 +62,7 @@ const morph = keyframes`
|
|
|
61
62
|
const generateStyle = (
|
|
62
63
|
componentTheme: SpinnerTheme,
|
|
63
64
|
props: SpinnerProps
|
|
64
|
-
):
|
|
65
|
+
): SpinnerStyle => {
|
|
65
66
|
const { size, variant } = props
|
|
66
67
|
|
|
67
68
|
const spinnerSizes = {
|
package/types/Spinner/props.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import type { AsElementType, PropValidators, SpinnerTheme } from '@instructure/shared-types';
|
|
4
4
|
declare type SpinnerOwnProps = {
|
|
5
5
|
renderTitle?: ((...args: any[]) => any) | React.ReactNode;
|
|
6
6
|
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
@@ -11,9 +11,10 @@ declare type SpinnerOwnProps = {
|
|
|
11
11
|
};
|
|
12
12
|
declare type PropKeys = keyof SpinnerOwnProps;
|
|
13
13
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
14
|
-
declare type SpinnerProps = SpinnerOwnProps & WithStyleProps
|
|
14
|
+
declare type SpinnerProps = SpinnerOwnProps & WithStyleProps<SpinnerTheme, SpinnerStyle>;
|
|
15
|
+
declare type SpinnerStyle = ComponentStyle<'spinner' | 'circle' | 'circleTrack' | 'circleSpin'>;
|
|
15
16
|
declare const propTypes: PropValidators<PropKeys>;
|
|
16
17
|
declare const allowedProps: AllowedPropKeys;
|
|
17
|
-
export type { SpinnerProps };
|
|
18
|
+
export type { SpinnerProps, SpinnerStyle };
|
|
18
19
|
export { propTypes, allowedProps };
|
|
19
20
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Spinner/props.ts"],"names":[],"mappings":";AA2BA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Spinner/props.ts"],"names":[],"mappings":";AA2BA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAElC,aAAK,eAAe,GAAG;IACrB,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS,CAAA;IACzD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC/C,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;CACnB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,eAAe,CAAA;AAErC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AAEhF,aAAK,YAAY,GAAG,cAAc,CAChC,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,CACpD,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAqBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAOnB,CAAA;AAED,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SpinnerTheme } from '@instructure/shared-types';
|
|
2
|
-
import { SpinnerProps } from './props';
|
|
1
|
+
import type { SpinnerTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { SpinnerProps, SpinnerStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,6 +10,6 @@ import { SpinnerProps } from './props';
|
|
|
10
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
11
11
|
* @return {Object} The final style object, which will be used in the component
|
|
12
12
|
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: SpinnerTheme, props: SpinnerProps) =>
|
|
13
|
+
declare const generateStyle: (componentTheme: SpinnerTheme, props: SpinnerProps) => SpinnerStyle;
|
|
14
14
|
export default generateStyle;
|
|
15
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Spinner/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Spinner/styles.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAwBzD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,YAAY,SACrB,YAAY,KAClB,YA4HF,CAAA;AAED,eAAe,aAAa,CAAA"}
|