@instructure/ui-avatar 10.26.1-snapshot-2 → 10.26.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,30 +3,9 @@
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.26.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1-snapshot-2) (2025-10-06)
6
+ ## [10.26.1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1) (2025-10-06)
7
7
 
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`
8
+ **Note:** Version bump only for package @instructure/ui-avatar
30
9
 
31
10
 
32
11
 
@@ -157,8 +157,5 @@ const Avatar = /*#__PURE__*/forwardRef(({
157
157
  });
158
158
  });
159
159
  Avatar.displayName = 'Avatar';
160
-
161
- // TODO - why is this needed?
162
- Avatar.displayName = 'Avatar';
163
160
  export default Avatar;
164
161
  export { Avatar };
@@ -22,5 +22,22 @@
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
+ };
25
42
  const allowedProps = ['name', 'src', 'alt', 'size', 'color', 'hasInverseColor', 'shape', 'margin', 'display', 'onImageLoaded', 'as', 'elementRef', 'renderIcon', 'showBorder'];
26
- export { allowedProps };
43
+ export { propTypes, allowedProps };
@@ -163,7 +163,4 @@ category: components
163
163
  });
164
164
  });
165
165
  Avatar.displayName = 'Avatar';
166
-
167
- // TODO - why is this needed?
168
- Avatar.displayName = 'Avatar';
169
166
  var _default = exports.default = Avatar;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.allowedProps = void 0;
7
+ exports.propTypes = exports.allowedProps = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
7
9
  /*
8
10
  * The MIT License (MIT)
9
11
  *
@@ -28,4 +30,20 @@ exports.allowedProps = void 0;
28
30
  * SOFTWARE.
29
31
  */
30
32
 
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
+ };
31
49
  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": "10.26.1-snapshot-2",
3
+ "version": "10.26.1",
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,23 +24,25 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/emotion": "10.26.1-snapshot-2",
28
- "@instructure/shared-types": "10.26.1-snapshot-2",
29
- "@instructure/ui-icons": "10.26.1-snapshot-2",
30
- "@instructure/ui-react-utils": "10.26.1-snapshot-2",
31
- "@instructure/ui-view": "10.26.1-snapshot-2"
27
+ "@instructure/emotion": "10.26.1",
28
+ "@instructure/shared-types": "10.26.1",
29
+ "@instructure/ui-icons": "10.26.1",
30
+ "@instructure/ui-react-utils": "10.26.1",
31
+ "@instructure/ui-testable": "10.26.1",
32
+ "@instructure/ui-view": "10.26.1",
33
+ "prop-types": "^15.8.1"
32
34
  },
33
35
  "devDependencies": {
34
- "@instructure/ui-axe-check": "10.26.1-snapshot-2",
35
- "@instructure/ui-babel-preset": "10.26.1-snapshot-2",
36
- "@instructure/ui-color-utils": "10.26.1-snapshot-2",
37
- "@instructure/ui-themes": "10.26.1-snapshot-2",
36
+ "@instructure/ui-axe-check": "10.26.1",
37
+ "@instructure/ui-babel-preset": "10.26.1",
38
+ "@instructure/ui-color-utils": "10.26.1",
39
+ "@instructure/ui-themes": "10.26.1",
38
40
  "@testing-library/jest-dom": "^6.6.3",
39
- "@testing-library/react": "15.0.7",
41
+ "@testing-library/react": "^16.0.1",
40
42
  "vitest": "^3.2.2"
41
43
  },
42
44
  "peerDependencies": {
43
- "react": ">=18 <=19"
45
+ "react": ">=16.14 <=18"
44
46
  },
45
47
  "publishConfig": {
46
48
  "access": "public"
@@ -177,8 +177,5 @@ const Avatar = forwardRef(
177
177
  )
178
178
  Avatar.displayName = 'Avatar'
179
179
 
180
- // TODO - why is this needed?
181
- Avatar.displayName = 'Avatar'
182
-
183
180
  export default Avatar
184
181
  export { Avatar }
@@ -23,6 +23,7 @@
23
23
  */
24
24
 
25
25
  import { SyntheticEvent } from 'react'
26
+ import PropTypes from 'prop-types'
26
27
 
27
28
  import type {
28
29
  Spacing,
@@ -32,7 +33,8 @@ import type {
32
33
  import type {
33
34
  AsElementType,
34
35
  AvatarTheme,
35
- OtherHTMLAttributes
36
+ OtherHTMLAttributes,
37
+ PropValidators
36
38
  } from '@instructure/shared-types'
37
39
  import { Renderable } from '@instructure/shared-types'
38
40
 
@@ -118,6 +120,42 @@ type AvatarProps = AvatarOwnProps &
118
120
  type AvatarStyle = ComponentStyle<
119
121
  'avatar' | 'initials' | 'loadImage' | 'iconSVG'
120
122
  >
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
+
121
159
  const allowedProps: AllowedPropKeys = [
122
160
  'name',
123
161
  'src',
@@ -136,4 +174,4 @@ const allowedProps: AllowedPropKeys = [
136
174
  ]
137
175
 
138
176
  export type { AvatarProps, AvatarStyle }
139
- export { allowedProps }
177
+ export { propTypes, allowedProps }
@@ -16,6 +16,9 @@
16
16
  {
17
17
  "path": "../ui-react-utils/tsconfig.build.json"
18
18
  },
19
+ {
20
+ "path": "../ui-testable/tsconfig.build.json"
21
+ },
19
22
  {
20
23
  "path": "../ui-view/tsconfig.build.json"
21
24
  },