@instructure/ui-avatar 10.26.1-snapshot-1 → 11.0.0
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 +23 -2
- package/es/Avatar/index.js +3 -0
- package/es/Avatar/props.js +1 -18
- package/lib/Avatar/index.js +3 -0
- package/lib/Avatar/props.js +1 -19
- package/package.json +12 -14
- package/src/Avatar/index.tsx +3 -0
- package/src/Avatar/props.ts +2 -40
- package/tsconfig.build.json +0 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Avatar/index.d.ts.map +1 -1
- package/types/Avatar/props.d.ts +2 -3
- package/types/Avatar/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,30 @@
|
|
|
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
|
-
|
|
6
|
+
# [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **many:** InstUI v11 contains the following breaking changes:
|
|
17
|
+
- React 16 and 17 are no longer supported
|
|
18
|
+
- remove `PropTypes` from all packages
|
|
19
|
+
- remove `CodeEditor` component
|
|
20
|
+
- remove `@instui/theme-registry` package
|
|
21
|
+
- remove `@testable`, `@experimental`, `@hack` decorators
|
|
22
|
+
- InstUISettingsProvider's `as` prop is removed
|
|
23
|
+
- `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
24
|
+
- `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
25
|
+
- `variables` field on theme objects are removed
|
|
26
|
+
- remove deprecated props from Table: Row's `isStacked`, Body's
|
|
27
|
+
`isStacked`, `hover`, and `headers`
|
|
28
|
+
- `Table`'s `caption` prop is now required
|
|
29
|
+
- `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
9
30
|
|
|
10
31
|
|
|
11
32
|
|
package/es/Avatar/index.js
CHANGED
package/es/Avatar/props.js
CHANGED
|
@@ -22,22 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
const propTypes = {
|
|
27
|
-
name: PropTypes.string.isRequired,
|
|
28
|
-
src: PropTypes.string,
|
|
29
|
-
alt: PropTypes.string,
|
|
30
|
-
size: PropTypes.oneOf(['auto', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
31
|
-
color: PropTypes.oneOf(['default', 'shamrock', 'barney', 'crimson', 'fire', 'licorice', 'ash', 'ai']),
|
|
32
|
-
hasInverseColor: PropTypes.bool,
|
|
33
|
-
showBorder: PropTypes.oneOf(['auto', 'always', 'never']),
|
|
34
|
-
shape: PropTypes.oneOf(['circle', 'rectangle']),
|
|
35
|
-
margin: PropTypes.string,
|
|
36
|
-
display: PropTypes.oneOf(['inline-block', 'block']),
|
|
37
|
-
onImageLoaded: PropTypes.func,
|
|
38
|
-
as: PropTypes.elementType,
|
|
39
|
-
elementRef: PropTypes.func,
|
|
40
|
-
renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
41
|
-
};
|
|
42
25
|
const allowedProps = ['name', 'src', 'alt', 'size', 'color', 'hasInverseColor', 'shape', 'margin', 'display', 'onImageLoaded', 'as', 'elementRef', 'renderIcon', 'showBorder'];
|
|
43
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/lib/Avatar/index.js
CHANGED
package/lib/Avatar/props.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
+
exports.allowedProps = void 0;
|
|
9
7
|
/*
|
|
10
8
|
* The MIT License (MIT)
|
|
11
9
|
*
|
|
@@ -30,20 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
30
28
|
* SOFTWARE.
|
|
31
29
|
*/
|
|
32
30
|
|
|
33
|
-
const propTypes = exports.propTypes = {
|
|
34
|
-
name: _propTypes.default.string.isRequired,
|
|
35
|
-
src: _propTypes.default.string,
|
|
36
|
-
alt: _propTypes.default.string,
|
|
37
|
-
size: _propTypes.default.oneOf(['auto', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
38
|
-
color: _propTypes.default.oneOf(['default', 'shamrock', 'barney', 'crimson', 'fire', 'licorice', 'ash', 'ai']),
|
|
39
|
-
hasInverseColor: _propTypes.default.bool,
|
|
40
|
-
showBorder: _propTypes.default.oneOf(['auto', 'always', 'never']),
|
|
41
|
-
shape: _propTypes.default.oneOf(['circle', 'rectangle']),
|
|
42
|
-
margin: _propTypes.default.string,
|
|
43
|
-
display: _propTypes.default.oneOf(['inline-block', 'block']),
|
|
44
|
-
onImageLoaded: _propTypes.default.func,
|
|
45
|
-
as: _propTypes.default.elementType,
|
|
46
|
-
elementRef: _propTypes.default.func,
|
|
47
|
-
renderIcon: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func])
|
|
48
|
-
};
|
|
49
31
|
const allowedProps = exports.allowedProps = ['name', 'src', 'alt', 'size', 'color', 'hasInverseColor', 'shape', 'margin', 'display', 'onImageLoaded', 'as', 'elementRef', 'renderIcon', 'showBorder'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-avatar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "An image or letters that represents a user.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,25 +24,23 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.27.6",
|
|
27
|
-
"@instructure/emotion": "
|
|
28
|
-
"@instructure/shared-types": "
|
|
29
|
-
"@instructure/ui-icons": "
|
|
30
|
-
"@instructure/ui-react-utils": "
|
|
31
|
-
"@instructure/ui-
|
|
32
|
-
"@instructure/ui-view": "10.26.1-snapshot-1",
|
|
33
|
-
"prop-types": "^15.8.1"
|
|
27
|
+
"@instructure/emotion": "11.0.0",
|
|
28
|
+
"@instructure/shared-types": "11.0.0",
|
|
29
|
+
"@instructure/ui-icons": "11.0.0",
|
|
30
|
+
"@instructure/ui-react-utils": "11.0.0",
|
|
31
|
+
"@instructure/ui-view": "11.0.0"
|
|
34
32
|
},
|
|
35
33
|
"devDependencies": {
|
|
36
|
-
"@instructure/ui-axe-check": "
|
|
37
|
-
"@instructure/ui-babel-preset": "
|
|
38
|
-
"@instructure/ui-color-utils": "
|
|
39
|
-
"@instructure/ui-themes": "
|
|
34
|
+
"@instructure/ui-axe-check": "11.0.0",
|
|
35
|
+
"@instructure/ui-babel-preset": "11.0.0",
|
|
36
|
+
"@instructure/ui-color-utils": "11.0.0",
|
|
37
|
+
"@instructure/ui-themes": "11.0.0",
|
|
40
38
|
"@testing-library/jest-dom": "^6.6.3",
|
|
41
|
-
"@testing-library/react": "
|
|
39
|
+
"@testing-library/react": "15.0.7",
|
|
42
40
|
"vitest": "^3.2.2"
|
|
43
41
|
},
|
|
44
42
|
"peerDependencies": {
|
|
45
|
-
"react": ">=
|
|
43
|
+
"react": ">=18 <=19"
|
|
46
44
|
},
|
|
47
45
|
"publishConfig": {
|
|
48
46
|
"access": "public"
|
package/src/Avatar/index.tsx
CHANGED
package/src/Avatar/props.ts
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import { SyntheticEvent } from 'react'
|
|
26
|
-
import PropTypes from 'prop-types'
|
|
27
26
|
|
|
28
27
|
import type {
|
|
29
28
|
Spacing,
|
|
@@ -33,8 +32,7 @@ import type {
|
|
|
33
32
|
import type {
|
|
34
33
|
AsElementType,
|
|
35
34
|
AvatarTheme,
|
|
36
|
-
OtherHTMLAttributes
|
|
37
|
-
PropValidators
|
|
35
|
+
OtherHTMLAttributes
|
|
38
36
|
} from '@instructure/shared-types'
|
|
39
37
|
import { Renderable } from '@instructure/shared-types'
|
|
40
38
|
|
|
@@ -120,42 +118,6 @@ type AvatarProps = AvatarOwnProps &
|
|
|
120
118
|
type AvatarStyle = ComponentStyle<
|
|
121
119
|
'avatar' | 'initials' | 'loadImage' | 'iconSVG'
|
|
122
120
|
>
|
|
123
|
-
|
|
124
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
125
|
-
name: PropTypes.string.isRequired,
|
|
126
|
-
src: PropTypes.string,
|
|
127
|
-
alt: PropTypes.string,
|
|
128
|
-
size: PropTypes.oneOf([
|
|
129
|
-
'auto',
|
|
130
|
-
'xx-small',
|
|
131
|
-
'x-small',
|
|
132
|
-
'small',
|
|
133
|
-
'medium',
|
|
134
|
-
'large',
|
|
135
|
-
'x-large',
|
|
136
|
-
'xx-large'
|
|
137
|
-
]),
|
|
138
|
-
color: PropTypes.oneOf([
|
|
139
|
-
'default',
|
|
140
|
-
'shamrock',
|
|
141
|
-
'barney',
|
|
142
|
-
'crimson',
|
|
143
|
-
'fire',
|
|
144
|
-
'licorice',
|
|
145
|
-
'ash',
|
|
146
|
-
'ai'
|
|
147
|
-
]),
|
|
148
|
-
hasInverseColor: PropTypes.bool,
|
|
149
|
-
showBorder: PropTypes.oneOf(['auto', 'always', 'never']),
|
|
150
|
-
shape: PropTypes.oneOf(['circle', 'rectangle']),
|
|
151
|
-
margin: PropTypes.string,
|
|
152
|
-
display: PropTypes.oneOf(['inline-block', 'block']),
|
|
153
|
-
onImageLoaded: PropTypes.func,
|
|
154
|
-
as: PropTypes.elementType,
|
|
155
|
-
elementRef: PropTypes.func,
|
|
156
|
-
renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
157
|
-
}
|
|
158
|
-
|
|
159
121
|
const allowedProps: AllowedPropKeys = [
|
|
160
122
|
'name',
|
|
161
123
|
'src',
|
|
@@ -174,4 +136,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
174
136
|
]
|
|
175
137
|
|
|
176
138
|
export type { AvatarProps, AvatarStyle }
|
|
177
|
-
export {
|
|
139
|
+
export { allowedProps }
|