@instructure/ui-link 11.7.4-snapshot-4 → 11.7.4-snapshot-183
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 +50 -2
- package/es/Link/v2/index.js +4 -23
- package/lib/Link/v2/index.js +4 -23
- package/package.json +14 -14
- package/src/Link/v2/README.md +0 -22
- package/src/Link/v2/index.tsx +4 -42
- package/src/Link/v2/props.ts +1 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Link/v2/index.d.ts +1 -2
- package/types/Link/v2/index.d.ts.map +1 -1
- package/types/Link/v2/props.d.ts +1 -5
- package/types/Link/v2/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,57 @@
|
|
|
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-snapshot-
|
|
6
|
+
## [11.7.4-snapshot-183](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.7.4-snapshot-183) (2026-05-14)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** a11y requirement fix, interactive links must be underlined on interaction and isWithinText prop was removed ([8531756](https://github.com/instructure/instructure-ui/commit/8531756c564a3220a8266d02a72fb26c3bbcc977))
|
|
12
|
+
* **many:** fix doc component previews, update dark theme text and code block styles, and replace old icons ([34b7369](https://github.com/instructure/instructure-ui/commit/34b73699cefaf5877b1e497c50a41a27d15c88aa))
|
|
13
|
+
* **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([98ff8e8](https://github.com/instructure/instructure-ui/commit/98ff8e8126a70d8496d6967795a8fbb2779c6fd9))
|
|
14
|
+
* **ui-many:** fix imports of the multiversion support ([6b84f05](https://github.com/instructure/instructure-ui/commit/6b84f05ecd6e95e7698e14f9672023aee5e5e868))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **many:** add solution for using both old and new token system in the same app ([688a713](https://github.com/instructure/instructure-ui/commit/688a713ff715433bb085323dbad61285387c5141))
|
|
20
|
+
* **many:** remove deprecated v2 items ([eaf8876](https://github.com/instructure/instructure-ui/commit/eaf88767c9beb95c4e09ee5705c387dfd79e4cb7))
|
|
21
|
+
* **ui-breadcrumb:** migrate to new theming system and add new lucide icon and change separator style calculation ([d6c8006](https://github.com/instructure/instructure-ui/commit/d6c8006d213e95c6502d611d9a8e6792ba46e55d))
|
|
22
|
+
* **ui-link:** migrate to new theming system and deprecate old variants and add new size prop ([b83f73b](https://github.com/instructure/instructure-ui/commit/b83f73b6b6782ff48af88c5fa78b9ced0363e327))
|
|
23
|
+
* **ui-link:** migrate to new theming system and deprecate old variants and add new size prop ([777836e](https://github.com/instructure/instructure-ui/commit/777836ecf40f9df152885b4df2fa6f2a4abac1da))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### BREAKING CHANGES
|
|
27
|
+
|
|
28
|
+
* **many:** Removed FormFieldLabel component
|
|
29
|
+
|
|
30
|
+
Removed _content prop from DrawerLayout.Tray and DrawerLayout.Content
|
|
31
|
+
|
|
32
|
+
Removed _link prop from Link
|
|
33
|
+
|
|
34
|
+
Removed _node prop from Menu.Item
|
|
35
|
+
|
|
36
|
+
Removed _root prop from Pagination, TreeBrowser
|
|
37
|
+
|
|
38
|
+
Removed _select prop from SimpleSelect and TimeSelect
|
|
39
|
+
|
|
40
|
+
Removed _ref prop from TruncateText
|
|
41
|
+
|
|
42
|
+
Removed _element prop from View
|
|
43
|
+
|
|
44
|
+
Removed color="ai" from Heading
|
|
45
|
+
|
|
46
|
+
Removed variant="inline-small" and variant="standalone-small" from Link
|
|
47
|
+
|
|
48
|
+
Removed title prop from Tag
|
|
49
|
+
|
|
50
|
+
Removed focusRingBorderRadius prop from View
|
|
51
|
+
|
|
52
|
+
Removed hideActionsUserSeparator prop from TopNavBar.Layout
|
|
53
|
+
|
|
54
|
+
Removed handleFocusOutlineColor, handleFocusOutlineWidth, handleShadowColor from RangeInput
|
|
55
|
+
|
|
56
|
+
INSTUI-5025
|
|
9
57
|
|
|
10
58
|
|
|
11
59
|
|
package/es/Link/v2/index.js
CHANGED
|
@@ -54,9 +54,6 @@ let Link = (_dec = withStyleNew(generateStyle), _dec(_class = class Link extends
|
|
|
54
54
|
state = {
|
|
55
55
|
hasFocus: false
|
|
56
56
|
};
|
|
57
|
-
get _link() {
|
|
58
|
-
return this.ref;
|
|
59
|
-
}
|
|
60
57
|
ref = null;
|
|
61
58
|
componentDidMount() {
|
|
62
59
|
this.props.makeStyles?.(this.makeStyleProps());
|
|
@@ -66,23 +63,11 @@ let Link = (_dec = withStyleNew(generateStyle), _dec(_class = class Link extends
|
|
|
66
63
|
}
|
|
67
64
|
makeStyleProps = () => {
|
|
68
65
|
const {
|
|
69
|
-
variant
|
|
66
|
+
variant,
|
|
70
67
|
size: sizeProp
|
|
71
68
|
} = this.props;
|
|
72
|
-
|
|
73
|
-
// Handle deprecated variant values by mapping them to new variant + size props
|
|
74
|
-
let variant = variantProp;
|
|
75
69
|
let size = sizeProp;
|
|
76
|
-
if (
|
|
77
|
-
warn(false, `[Link] The variant value "${variantProp}" is deprecated. Use variant="${variantProp.replace('-small', '')}" with size="small" instead.`);
|
|
78
|
-
variant = variantProp.replace('-small', '');
|
|
79
|
-
// Only set size from deprecated variant if size prop is not explicitly provided
|
|
80
|
-
if (!sizeProp) {
|
|
81
|
-
size = 'small';
|
|
82
|
-
}
|
|
83
|
-
} else if ((variantProp === 'inline' || variantProp === 'standalone') && !sizeProp) {
|
|
84
|
-
// When using new variant values without explicit size, default to medium
|
|
85
|
-
// This maintains the old behavior where 'inline' and 'standalone' were medium-sized
|
|
70
|
+
if ((variant === 'inline' || variant === 'standalone') && !sizeProp) {
|
|
86
71
|
size = 'medium';
|
|
87
72
|
}
|
|
88
73
|
return {
|
|
@@ -192,18 +177,14 @@ let Link = (_dec = withStyleNew(generateStyle), _dec(_class = class Link extends
|
|
|
192
177
|
const {
|
|
193
178
|
display,
|
|
194
179
|
renderIcon,
|
|
195
|
-
variant
|
|
180
|
+
variant,
|
|
196
181
|
size: sizeProp
|
|
197
182
|
} = this.props;
|
|
198
183
|
warn(
|
|
199
184
|
// if display prop is used, warn about icon or TruncateText
|
|
200
185
|
display === undefined, '[Link] Using the display property with an icon may cause layout issues.');
|
|
201
|
-
|
|
202
|
-
// Determine the actual size being used (considering deprecated variants)
|
|
203
186
|
let size = sizeProp;
|
|
204
|
-
if (
|
|
205
|
-
size = sizeProp || 'small';
|
|
206
|
-
} else if ((variantProp === 'inline' || variantProp === 'standalone') && !sizeProp) {
|
|
187
|
+
if ((variant === 'inline' || variant === 'standalone') && !sizeProp) {
|
|
207
188
|
size = 'medium';
|
|
208
189
|
}
|
|
209
190
|
|
package/lib/Link/v2/index.js
CHANGED
|
@@ -64,9 +64,6 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyleNew)(_styles.default), _
|
|
|
64
64
|
state = {
|
|
65
65
|
hasFocus: false
|
|
66
66
|
};
|
|
67
|
-
get _link() {
|
|
68
|
-
return this.ref;
|
|
69
|
-
}
|
|
70
67
|
ref = null;
|
|
71
68
|
componentDidMount() {
|
|
72
69
|
this.props.makeStyles?.(this.makeStyleProps());
|
|
@@ -76,23 +73,11 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyleNew)(_styles.default), _
|
|
|
76
73
|
}
|
|
77
74
|
makeStyleProps = () => {
|
|
78
75
|
const {
|
|
79
|
-
variant
|
|
76
|
+
variant,
|
|
80
77
|
size: sizeProp
|
|
81
78
|
} = this.props;
|
|
82
|
-
|
|
83
|
-
// Handle deprecated variant values by mapping them to new variant + size props
|
|
84
|
-
let variant = variantProp;
|
|
85
79
|
let size = sizeProp;
|
|
86
|
-
if (
|
|
87
|
-
(0, _console.logWarn)(false, `[Link] The variant value "${variantProp}" is deprecated. Use variant="${variantProp.replace('-small', '')}" with size="small" instead.`);
|
|
88
|
-
variant = variantProp.replace('-small', '');
|
|
89
|
-
// Only set size from deprecated variant if size prop is not explicitly provided
|
|
90
|
-
if (!sizeProp) {
|
|
91
|
-
size = 'small';
|
|
92
|
-
}
|
|
93
|
-
} else if ((variantProp === 'inline' || variantProp === 'standalone') && !sizeProp) {
|
|
94
|
-
// When using new variant values without explicit size, default to medium
|
|
95
|
-
// This maintains the old behavior where 'inline' and 'standalone' were medium-sized
|
|
80
|
+
if ((variant === 'inline' || variant === 'standalone') && !sizeProp) {
|
|
96
81
|
size = 'medium';
|
|
97
82
|
}
|
|
98
83
|
return {
|
|
@@ -202,18 +187,14 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyleNew)(_styles.default), _
|
|
|
202
187
|
const {
|
|
203
188
|
display,
|
|
204
189
|
renderIcon,
|
|
205
|
-
variant
|
|
190
|
+
variant,
|
|
206
191
|
size: sizeProp
|
|
207
192
|
} = this.props;
|
|
208
193
|
(0, _console.logWarn)(
|
|
209
194
|
// if display prop is used, warn about icon or TruncateText
|
|
210
195
|
display === undefined, '[Link] Using the display property with an icon may cause layout issues.');
|
|
211
|
-
|
|
212
|
-
// Determine the actual size being used (considering deprecated variants)
|
|
213
196
|
let size = sizeProp;
|
|
214
|
-
if (
|
|
215
|
-
size = sizeProp || 'small';
|
|
216
|
-
} else if ((variantProp === 'inline' || variantProp === 'standalone') && !sizeProp) {
|
|
197
|
+
if ((variant === 'inline' || variant === 'standalone') && !sizeProp) {
|
|
217
198
|
size = 'medium';
|
|
218
199
|
}
|
|
219
200
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-link",
|
|
3
|
-
"version": "11.7.4-snapshot-
|
|
3
|
+
"version": "11.7.4-snapshot-183",
|
|
4
4
|
"description": "A component for creating links",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.2",
|
|
18
|
-
"@instructure/
|
|
19
|
-
"@instructure/ui-a11y-utils": "11.7.4-snapshot-
|
|
20
|
-
"@instructure/ui-
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/
|
|
23
|
-
"@instructure/ui-
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-
|
|
28
|
-
"@instructure/ui-
|
|
18
|
+
"@instructure/emotion": "11.7.4-snapshot-183",
|
|
19
|
+
"@instructure/ui-a11y-utils": "11.7.4-snapshot-183",
|
|
20
|
+
"@instructure/ui-icons": "11.7.4-snapshot-183",
|
|
21
|
+
"@instructure/shared-types": "11.7.4-snapshot-183",
|
|
22
|
+
"@instructure/console": "11.7.4-snapshot-183",
|
|
23
|
+
"@instructure/ui-color-utils": "11.7.4-snapshot-183",
|
|
24
|
+
"@instructure/ui-dom-utils": "11.7.4-snapshot-183",
|
|
25
|
+
"@instructure/ui-react-utils": "11.7.4-snapshot-183",
|
|
26
|
+
"@instructure/ui-themes": "11.7.4-snapshot-183",
|
|
27
|
+
"@instructure/ui-utils": "11.7.4-snapshot-183",
|
|
28
|
+
"@instructure/ui-view": "11.7.4-snapshot-183"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/jest-dom": "^6.6.3",
|
|
32
32
|
"@testing-library/react": "15.0.7",
|
|
33
33
|
"@testing-library/user-event": "^14.6.1",
|
|
34
34
|
"vitest": "^3.2.2",
|
|
35
|
-
"@instructure/ui-axe-check": "11.7.4-snapshot-
|
|
36
|
-
"@instructure/ui-babel-preset": "11.7.4-snapshot-
|
|
35
|
+
"@instructure/ui-axe-check": "11.7.4-snapshot-183",
|
|
36
|
+
"@instructure/ui-babel-preset": "11.7.4-snapshot-183"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=18 <=19"
|
package/src/Link/v2/README.md
CHANGED
|
@@ -97,28 +97,6 @@ type: example
|
|
|
97
97
|
</div>
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
#### Deprecated variant values
|
|
101
|
-
|
|
102
|
-
**The following variant values are deprecated and will be removed in a future version:**
|
|
103
|
-
|
|
104
|
-
- `inline-small`
|
|
105
|
-
- `standalone-small`
|
|
106
|
-
|
|
107
|
-
These deprecated values are still supported for backward compatibility but will trigger console warnings. Please update your code to use the new `variant` + `size` prop combination.
|
|
108
|
-
|
|
109
|
-
```js
|
|
110
|
-
---
|
|
111
|
-
type: code
|
|
112
|
-
---
|
|
113
|
-
// Deprecated (still works but triggers warning)
|
|
114
|
-
<Link variant="inline-small" href="#">Link</Link>
|
|
115
|
-
<Link variant="standalone-small" href="#">Link</Link>
|
|
116
|
-
|
|
117
|
-
// Recommended
|
|
118
|
-
<Link variant="inline" size="small" href="#">Link</Link>
|
|
119
|
-
<Link variant="standalone" size="small" href="#">Link</Link>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
100
|
### Adding margin
|
|
123
101
|
|
|
124
102
|
Use the `margin` prop to add space to the left or right of the Link. Because
|
package/src/Link/v2/index.tsx
CHANGED
|
@@ -65,13 +65,6 @@ class Link extends Component<LinkProps, LinkState> {
|
|
|
65
65
|
|
|
66
66
|
state = { hasFocus: false }
|
|
67
67
|
|
|
68
|
-
get _link() {
|
|
69
|
-
console.warn(
|
|
70
|
-
'_link property is deprecated and will be removed in v9, please use ref instead'
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
return this.ref
|
|
74
|
-
}
|
|
75
68
|
ref: Element | null = null
|
|
76
69
|
|
|
77
70
|
componentDidMount() {
|
|
@@ -86,31 +79,11 @@ class Link extends Component<LinkProps, LinkState> {
|
|
|
86
79
|
variant?: LinkProps['variant']
|
|
87
80
|
size?: LinkProps['size']
|
|
88
81
|
} => {
|
|
89
|
-
const { variant
|
|
82
|
+
const { variant, size: sizeProp } = this.props
|
|
90
83
|
|
|
91
|
-
// Handle deprecated variant values by mapping them to new variant + size props
|
|
92
|
-
let variant: 'inline' | 'standalone' | undefined = variantProp as any
|
|
93
84
|
let size = sizeProp
|
|
94
85
|
|
|
95
|
-
if (
|
|
96
|
-
warn(
|
|
97
|
-
false,
|
|
98
|
-
`[Link] The variant value "${variantProp}" is deprecated. Use variant="${variantProp.replace(
|
|
99
|
-
'-small',
|
|
100
|
-
''
|
|
101
|
-
)}" with size="small" instead.`
|
|
102
|
-
)
|
|
103
|
-
variant = variantProp.replace('-small', '') as 'inline' | 'standalone'
|
|
104
|
-
// Only set size from deprecated variant if size prop is not explicitly provided
|
|
105
|
-
if (!sizeProp) {
|
|
106
|
-
size = 'small'
|
|
107
|
-
}
|
|
108
|
-
} else if (
|
|
109
|
-
(variantProp === 'inline' || variantProp === 'standalone') &&
|
|
110
|
-
!sizeProp
|
|
111
|
-
) {
|
|
112
|
-
// When using new variant values without explicit size, default to medium
|
|
113
|
-
// This maintains the old behavior where 'inline' and 'standalone' were medium-sized
|
|
86
|
+
if ((variant === 'inline' || variant === 'standalone') && !sizeProp) {
|
|
114
87
|
size = 'medium'
|
|
115
88
|
}
|
|
116
89
|
|
|
@@ -225,12 +198,7 @@ class Link extends Component<LinkProps, LinkState> {
|
|
|
225
198
|
}
|
|
226
199
|
|
|
227
200
|
renderIcon() {
|
|
228
|
-
const {
|
|
229
|
-
display,
|
|
230
|
-
renderIcon,
|
|
231
|
-
variant: variantProp,
|
|
232
|
-
size: sizeProp
|
|
233
|
-
} = this.props
|
|
201
|
+
const { display, renderIcon, variant, size: sizeProp } = this.props
|
|
234
202
|
|
|
235
203
|
warn(
|
|
236
204
|
// if display prop is used, warn about icon or TruncateText
|
|
@@ -238,14 +206,8 @@ class Link extends Component<LinkProps, LinkState> {
|
|
|
238
206
|
'[Link] Using the display property with an icon may cause layout issues.'
|
|
239
207
|
)
|
|
240
208
|
|
|
241
|
-
// Determine the actual size being used (considering deprecated variants)
|
|
242
209
|
let size = sizeProp
|
|
243
|
-
if (
|
|
244
|
-
size = sizeProp || 'small'
|
|
245
|
-
} else if (
|
|
246
|
-
(variantProp === 'inline' || variantProp === 'standalone') &&
|
|
247
|
-
!sizeProp
|
|
248
|
-
) {
|
|
210
|
+
if ((variant === 'inline' || variant === 'standalone') && !sizeProp) {
|
|
249
211
|
size = 'medium'
|
|
250
212
|
}
|
|
251
213
|
|
package/src/Link/v2/props.ts
CHANGED
|
@@ -127,12 +127,8 @@ type LinkOwnProps = {
|
|
|
127
127
|
* Sets pre-defined values for the component to achieve specific roles for the component
|
|
128
128
|
* - `inline`
|
|
129
129
|
* - `standalone`
|
|
130
|
-
*
|
|
131
|
-
* __Deprecated values:__
|
|
132
|
-
* - `inline-small`
|
|
133
|
-
* - `standalone-small`
|
|
134
130
|
*/
|
|
135
|
-
variant?: 'inline' | 'standalone'
|
|
131
|
+
variant?: 'inline' | 'standalone'
|
|
136
132
|
|
|
137
133
|
/**
|
|
138
134
|
* Sets the size of the link (font size, line height, and icon gap)
|