@instructure/ui-avatar 11.7.3 → 11.7.4-pr-snapshot-1781695314229
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 +8 -0
- package/LICENSE.md +1 -0
- package/{lib/Avatar/v1/props.js → babel.config.cjs} +12 -7
- package/es/Avatar/v1/index.js +8 -5
- package/es/Avatar/v2/index.js +2 -2
- package/es/exports/a.js +1 -1
- package/es/exports/b.js +1 -1
- package/package.json +12 -17
- package/src/Avatar/v1/index.tsx +9 -4
- package/src/Avatar/v1/styles.ts +1 -1
- package/src/Avatar/v2/index.tsx +2 -2
- package/src/Avatar/v2/styles.ts +1 -1
- package/src/exports/a.ts +1 -1
- package/src/exports/b.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Avatar/v1/index.d.ts.map +1 -1
- package/types/Avatar/v1/styles.d.ts +1 -1
- package/types/Avatar/v1/styles.d.ts.map +1 -1
- package/types/Avatar/v2/index.d.ts +1 -1
- package/types/Avatar/v2/index.d.ts.map +1 -1
- package/types/Avatar/v2/styles.d.ts +1 -1
- package/types/Avatar/v2/styles.d.ts.map +1 -1
- package/types/exports/a.d.ts +1 -1
- package/types/exports/a.d.ts.map +1 -1
- package/types/exports/b.d.ts +1 -1
- package/types/exports/b.d.ts.map +1 -1
- package/lib/Avatar/v1/index.js +0 -165
- package/lib/Avatar/v1/styles.js +0 -241
- package/lib/Avatar/v1/theme.js +0 -69
- package/lib/Avatar/v2/index.js +0 -165
- package/lib/Avatar/v2/props.js +0 -40
- package/lib/Avatar/v2/styles.js +0 -174
- package/lib/exports/a.js +0 -12
- package/lib/exports/b.js +0 -12
- package/lib/package.json +0 -1
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.4-pr-snapshot-1781695314229](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-pr-snapshot-1781695314229) (2026-06-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-avatar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.7.3](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3) (2026-05-07)
|
|
7
15
|
|
|
8
16
|
|
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
1
|
/*
|
|
8
2
|
* The MIT License (MIT)
|
|
9
3
|
*
|
|
@@ -28,4 +22,15 @@ exports.allowedProps = void 0;
|
|
|
28
22
|
* SOFTWARE.
|
|
29
23
|
*/
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
module.exports = {
|
|
26
|
+
presets: [
|
|
27
|
+
[
|
|
28
|
+
require('@instructure/ui-babel-preset'),
|
|
29
|
+
{
|
|
30
|
+
esModules: Boolean(process.env.ES_MODULES),
|
|
31
|
+
removeConsole: process.env.NODE_ENV === 'production',
|
|
32
|
+
transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
]
|
|
36
|
+
}
|
package/es/Avatar/v1/index.js
CHANGED
|
@@ -26,8 +26,9 @@ import { useStyle as useStyleNew } from '@instructure/emotion';
|
|
|
26
26
|
import { useState, useEffect, forwardRef, useRef } from 'react';
|
|
27
27
|
import { View } from '@instructure/ui-view/v11_6';
|
|
28
28
|
import { callRenderProp, passthroughProps } from '@instructure/ui-react-utils';
|
|
29
|
-
import generateStyle from
|
|
30
|
-
import generateComponentTheme from
|
|
29
|
+
import generateStyle from './styles.js';
|
|
30
|
+
import generateComponentTheme from './theme.js';
|
|
31
|
+
|
|
31
32
|
/**
|
|
32
33
|
---
|
|
33
34
|
category: components
|
|
@@ -151,9 +152,11 @@ const Avatar = /*#__PURE__*/forwardRef(({
|
|
|
151
152
|
}), !loaded && renderContent()]
|
|
152
153
|
});
|
|
153
154
|
});
|
|
154
|
-
Avatar
|
|
155
|
+
// Ensures React DevTools shows "Avatar" instead of "ForwardRef"
|
|
156
|
+
Avatar.displayName = 'Avatar'
|
|
155
157
|
|
|
156
|
-
//
|
|
157
|
-
|
|
158
|
+
// expose generateComponentTheme so Document can render "Default Theme Variables" for v11.6
|
|
159
|
+
;
|
|
160
|
+
Avatar.generateComponentTheme = generateComponentTheme;
|
|
158
161
|
export default Avatar;
|
|
159
162
|
export { Avatar };
|
package/es/Avatar/v2/index.js
CHANGED
|
@@ -26,8 +26,8 @@ import { useStyleNew } from '@instructure/emotion';
|
|
|
26
26
|
import { useState, useEffect, forwardRef } from 'react';
|
|
27
27
|
import { passthroughProps } from '@instructure/ui-react-utils';
|
|
28
28
|
import { renderIconWithProps } from '@instructure/ui-icons';
|
|
29
|
-
import { avatarSizeToIconSize } from
|
|
30
|
-
import generateStyle from
|
|
29
|
+
import { avatarSizeToIconSize } from './props.js';
|
|
30
|
+
import generateStyle from './styles.js';
|
|
31
31
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
32
32
|
const ICON_COLOR_MAP = {
|
|
33
33
|
accent1: 'accentBlueColor',
|
package/es/exports/a.js
CHANGED
package/es/exports/b.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-avatar",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.4-pr-snapshot-1781695314229",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "An image or letters that represents a user.",
|
|
5
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
7
|
"module": "./es/index.js",
|
|
7
|
-
"main": "./lib/index.js",
|
|
8
8
|
"types": "./types/index.d.ts",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.2",
|
|
18
|
-
"@instructure/emotion": "11.7.
|
|
19
|
-
"@instructure/shared-types": "11.7.
|
|
20
|
-
"@instructure/ui-react-utils": "11.7.
|
|
21
|
-
"@instructure/ui-
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/ui-view": "11.7.
|
|
18
|
+
"@instructure/emotion": "11.7.4-pr-snapshot-1781695314229",
|
|
19
|
+
"@instructure/shared-types": "11.7.4-pr-snapshot-1781695314229",
|
|
20
|
+
"@instructure/ui-react-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
21
|
+
"@instructure/ui-themes": "11.7.4-pr-snapshot-1781695314229",
|
|
22
|
+
"@instructure/ui-icons": "11.7.4-pr-snapshot-1781695314229",
|
|
23
|
+
"@instructure/ui-view": "11.7.4-pr-snapshot-1781695314229"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@testing-library/jest-dom": "^6.6.3",
|
|
27
27
|
"@testing-library/react": "15.0.7",
|
|
28
28
|
"vitest": "^3.2.2",
|
|
29
|
-
"@instructure/ui-axe-check": "11.7.
|
|
30
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
31
|
-
"@instructure/ui-color-utils": "11.7.
|
|
29
|
+
"@instructure/ui-axe-check": "11.7.4-pr-snapshot-1781695314229",
|
|
30
|
+
"@instructure/ui-babel-preset": "11.7.4-pr-snapshot-1781695314229",
|
|
31
|
+
"@instructure/ui-color-utils": "11.7.4-pr-snapshot-1781695314229"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=18 <=19"
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"exports": {
|
|
41
|
-
"./lib/*": "./lib/*",
|
|
42
41
|
"./es/*": "./es/*",
|
|
43
42
|
"./types/*": "./types/*",
|
|
44
43
|
"./package.json": "./package.json",
|
|
@@ -47,28 +46,24 @@
|
|
|
47
46
|
"src": "./src/exports/a.ts",
|
|
48
47
|
"types": "./types/exports/a.d.ts",
|
|
49
48
|
"import": "./es/exports/a.js",
|
|
50
|
-
"require": "./lib/exports/a.js",
|
|
51
49
|
"default": "./es/exports/a.js"
|
|
52
50
|
},
|
|
53
51
|
"./v11_6": {
|
|
54
52
|
"src": "./src/exports/a.ts",
|
|
55
53
|
"types": "./types/exports/a.d.ts",
|
|
56
54
|
"import": "./es/exports/a.js",
|
|
57
|
-
"require": "./lib/exports/a.js",
|
|
58
55
|
"default": "./es/exports/a.js"
|
|
59
56
|
},
|
|
60
57
|
"./v11_7": {
|
|
61
58
|
"src": "./src/exports/b.ts",
|
|
62
59
|
"types": "./types/exports/b.d.ts",
|
|
63
60
|
"import": "./es/exports/b.js",
|
|
64
|
-
"require": "./lib/exports/b.js",
|
|
65
61
|
"default": "./es/exports/b.js"
|
|
66
62
|
},
|
|
67
63
|
"./latest": {
|
|
68
64
|
"src": "./src/exports/b.ts",
|
|
69
65
|
"types": "./types/exports/b.d.ts",
|
|
70
66
|
"import": "./es/exports/b.js",
|
|
71
|
-
"require": "./lib/exports/b.js",
|
|
72
67
|
"default": "./es/exports/b.js"
|
|
73
68
|
}
|
|
74
69
|
},
|
|
@@ -76,7 +71,7 @@
|
|
|
76
71
|
"lint": "ui-scripts lint",
|
|
77
72
|
"lint:fix": "ui-scripts lint --fix",
|
|
78
73
|
"clean": "ui-scripts clean",
|
|
79
|
-
"build": "ui-scripts build
|
|
74
|
+
"build": "ui-scripts build",
|
|
80
75
|
"build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
|
|
81
76
|
"build:types": "tsc -p tsconfig.build.json",
|
|
82
77
|
"ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
|
package/src/Avatar/v1/index.tsx
CHANGED
|
@@ -36,8 +36,8 @@ import { View } from '@instructure/ui-view/v11_6'
|
|
|
36
36
|
import { callRenderProp, passthroughProps } from '@instructure/ui-react-utils'
|
|
37
37
|
import type { AvatarProps } from './props'
|
|
38
38
|
|
|
39
|
-
import generateStyle from './styles'
|
|
40
|
-
import generateComponentTheme from './theme'
|
|
39
|
+
import generateStyle from './styles.js'
|
|
40
|
+
import generateComponentTheme from './theme.js'
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
---
|
|
@@ -175,10 +175,15 @@ const Avatar = forwardRef(
|
|
|
175
175
|
)
|
|
176
176
|
}
|
|
177
177
|
)
|
|
178
|
+
// Ensures React DevTools shows "Avatar" instead of "ForwardRef"
|
|
178
179
|
Avatar.displayName = 'Avatar'
|
|
179
180
|
|
|
180
|
-
//
|
|
181
|
-
|
|
181
|
+
// expose generateComponentTheme so Document can render "Default Theme Variables" for v11.6
|
|
182
|
+
;(
|
|
183
|
+
Avatar as typeof Avatar & {
|
|
184
|
+
generateComponentTheme: typeof generateComponentTheme
|
|
185
|
+
}
|
|
186
|
+
).generateComponentTheme = generateComponentTheme
|
|
182
187
|
|
|
183
188
|
export default Avatar
|
|
184
189
|
export { Avatar }
|
package/src/Avatar/v1/styles.ts
CHANGED
package/src/Avatar/v2/index.tsx
CHANGED
|
@@ -27,9 +27,9 @@ import { useState, useEffect, forwardRef, SyntheticEvent } from 'react'
|
|
|
27
27
|
|
|
28
28
|
import { passthroughProps } from '@instructure/ui-react-utils'
|
|
29
29
|
import { renderIconWithProps } from '@instructure/ui-icons'
|
|
30
|
-
import { AvatarProps, avatarSizeToIconSize } from './props'
|
|
30
|
+
import { AvatarProps, avatarSizeToIconSize } from './props.js'
|
|
31
31
|
|
|
32
|
-
import generateStyle from './styles'
|
|
32
|
+
import generateStyle from './styles.js'
|
|
33
33
|
|
|
34
34
|
const ICON_COLOR_MAP = {
|
|
35
35
|
accent1: 'accentBlueColor',
|
package/src/Avatar/v2/styles.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import { calcSpacingFromShorthand } from '@instructure/emotion'
|
|
26
26
|
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes'
|
|
27
|
-
import { AvatarProps, AvatarStyle } from './props'
|
|
27
|
+
import { AvatarProps, AvatarStyle } from './props.js'
|
|
28
28
|
|
|
29
29
|
type StyleParams = {
|
|
30
30
|
loaded: boolean
|
package/src/exports/a.ts
CHANGED
package/src/exports/b.ts
CHANGED