@instructure/ui-link 8.47.1 → 8.47.2-snapshot-2
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 +11 -0
- package/es/Link/index.js +3 -1
- package/es/Link/props.js +3 -2
- package/lib/Link/index.js +3 -1
- package/lib/Link/props.js +3 -2
- package/package.json +17 -17
- package/src/Link/index.tsx +2 -0
- package/src/Link/props.ts +11 -4
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Link/index.d.ts +4 -2
- package/types/Link/index.d.ts.map +1 -1
- package/types/Link/props.d.ts +6 -2
- package/types/Link/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [8.47.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v8.47.1...v8.47.2-snapshot-2) (2023-11-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui-breadcrumb,ui-link:** add onMouseEnter prop ([a52f836](https://github.com/instructure/instructure-ui/commit/a52f836b48bfbd99763e9f5381675e8eabaa22c5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [8.47.1](https://github.com/instructure/instructure-ui/compare/v8.47.0...v8.47.1) (2023-11-06)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @instructure/ui-link
|
package/es/Link/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
const _excluded = ["children", "onClick", "color", "href", "margin", "renderIcon", "iconPlacement", "isWithinText"];
|
|
2
|
+
const _excluded = ["children", "onClick", "onMouseEnter", "color", "href", "margin", "renderIcon", "iconPlacement", "isWithinText"];
|
|
3
3
|
var _dec, _dec2, _class, _class2;
|
|
4
4
|
/*
|
|
5
5
|
* The MIT License (MIT)
|
|
@@ -169,6 +169,7 @@ let Link = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
169
169
|
const _this$props4 = this.props,
|
|
170
170
|
children = _this$props4.children,
|
|
171
171
|
onClick = _this$props4.onClick,
|
|
172
|
+
onMouseEnter = _this$props4.onMouseEnter,
|
|
172
173
|
color = _this$props4.color,
|
|
173
174
|
href = _this$props4.href,
|
|
174
175
|
margin = _this$props4.margin,
|
|
@@ -186,6 +187,7 @@ let Link = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
186
187
|
display: this.display,
|
|
187
188
|
margin: margin,
|
|
188
189
|
href: href,
|
|
190
|
+
onMouseEnter: onMouseEnter,
|
|
189
191
|
onClick: this.handleClick,
|
|
190
192
|
onFocus: this.handleFocus,
|
|
191
193
|
onBlur: this.handleBlur,
|
package/es/Link/props.js
CHANGED
|
@@ -38,9 +38,10 @@ const propTypes = {
|
|
|
38
38
|
iconPlacement: PropTypes.oneOf(['start', 'end']),
|
|
39
39
|
display: PropTypes.oneOf(['auto', 'block', 'inline-block', 'flex', 'inline-flex']),
|
|
40
40
|
isWithinText: PropTypes.bool,
|
|
41
|
+
onBlur: PropTypes.func,
|
|
41
42
|
onClick: PropTypes.func,
|
|
42
43
|
onFocus: PropTypes.func,
|
|
43
|
-
|
|
44
|
+
onMouseEnter: PropTypes.func
|
|
44
45
|
};
|
|
45
|
-
const allowedProps = ['children', 'href', 'color', 'elementRef', 'as', 'role', 'forceButtonRole', 'interaction', 'margin', 'renderIcon', 'iconPlacement', 'display', 'isWithinText', 'onClick', 'onFocus', '
|
|
46
|
+
const allowedProps = ['children', 'href', 'color', 'elementRef', 'as', 'role', 'forceButtonRole', 'interaction', 'margin', 'renderIcon', 'iconPlacement', 'display', 'isWithinText', 'onBlur', 'onClick', 'onFocus', 'onMouseEnter'];
|
|
46
47
|
export { propTypes, allowedProps };
|
package/lib/Link/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var _emotion = require("@instructure/emotion");
|
|
|
23
23
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
24
24
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
25
25
|
var _props = require("./props");
|
|
26
|
-
const _excluded = ["children", "onClick", "color", "href", "margin", "renderIcon", "iconPlacement", "isWithinText"];
|
|
26
|
+
const _excluded = ["children", "onClick", "onMouseEnter", "color", "href", "margin", "renderIcon", "iconPlacement", "isWithinText"];
|
|
27
27
|
var _dec, _dec2, _class, _class2;
|
|
28
28
|
/*
|
|
29
29
|
* The MIT License (MIT)
|
|
@@ -181,6 +181,7 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
181
181
|
const _this$props4 = this.props,
|
|
182
182
|
children = _this$props4.children,
|
|
183
183
|
onClick = _this$props4.onClick,
|
|
184
|
+
onMouseEnter = _this$props4.onMouseEnter,
|
|
184
185
|
color = _this$props4.color,
|
|
185
186
|
href = _this$props4.href,
|
|
186
187
|
margin = _this$props4.margin,
|
|
@@ -198,6 +199,7 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
198
199
|
display: this.display,
|
|
199
200
|
margin: margin,
|
|
200
201
|
href: href,
|
|
202
|
+
onMouseEnter: onMouseEnter,
|
|
201
203
|
onClick: this.handleClick,
|
|
202
204
|
onFocus: this.handleFocus,
|
|
203
205
|
onBlur: this.handleBlur,
|
package/lib/Link/props.js
CHANGED
|
@@ -45,8 +45,9 @@ const propTypes = exports.propTypes = {
|
|
|
45
45
|
iconPlacement: _propTypes.default.oneOf(['start', 'end']),
|
|
46
46
|
display: _propTypes.default.oneOf(['auto', 'block', 'inline-block', 'flex', 'inline-flex']),
|
|
47
47
|
isWithinText: _propTypes.default.bool,
|
|
48
|
+
onBlur: _propTypes.default.func,
|
|
48
49
|
onClick: _propTypes.default.func,
|
|
49
50
|
onFocus: _propTypes.default.func,
|
|
50
|
-
|
|
51
|
+
onMouseEnter: _propTypes.default.func
|
|
51
52
|
};
|
|
52
|
-
const allowedProps = exports.allowedProps = ['children', 'href', 'color', 'elementRef', 'as', 'role', 'forceButtonRole', 'interaction', 'margin', 'renderIcon', 'iconPlacement', 'display', 'isWithinText', 'onClick', 'onFocus', '
|
|
53
|
+
const allowedProps = exports.allowedProps = ['children', 'href', 'color', 'elementRef', 'as', 'role', 'forceButtonRole', 'interaction', 'margin', 'renderIcon', 'iconPlacement', 'display', 'isWithinText', 'onBlur', 'onClick', 'onFocus', 'onMouseEnter'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-link",
|
|
3
|
-
"version": "8.47.
|
|
3
|
+
"version": "8.47.2-snapshot-2",
|
|
4
4
|
"description": "A component for creating links",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,25 +24,25 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.23.2",
|
|
27
|
-
"@instructure/console": "8.47.
|
|
28
|
-
"@instructure/emotion": "8.47.
|
|
29
|
-
"@instructure/shared-types": "8.47.
|
|
30
|
-
"@instructure/ui-a11y-utils": "8.47.
|
|
31
|
-
"@instructure/ui-color-utils": "8.47.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.47.
|
|
33
|
-
"@instructure/ui-icons": "8.47.
|
|
34
|
-
"@instructure/ui-prop-types": "8.47.
|
|
35
|
-
"@instructure/ui-react-utils": "8.47.
|
|
36
|
-
"@instructure/ui-testable": "8.47.
|
|
37
|
-
"@instructure/ui-view": "8.47.
|
|
27
|
+
"@instructure/console": "8.47.2-snapshot-2",
|
|
28
|
+
"@instructure/emotion": "8.47.2-snapshot-2",
|
|
29
|
+
"@instructure/shared-types": "8.47.2-snapshot-2",
|
|
30
|
+
"@instructure/ui-a11y-utils": "8.47.2-snapshot-2",
|
|
31
|
+
"@instructure/ui-color-utils": "8.47.2-snapshot-2",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.47.2-snapshot-2",
|
|
33
|
+
"@instructure/ui-icons": "8.47.2-snapshot-2",
|
|
34
|
+
"@instructure/ui-prop-types": "8.47.2-snapshot-2",
|
|
35
|
+
"@instructure/ui-react-utils": "8.47.2-snapshot-2",
|
|
36
|
+
"@instructure/ui-testable": "8.47.2-snapshot-2",
|
|
37
|
+
"@instructure/ui-view": "8.47.2-snapshot-2",
|
|
38
38
|
"prop-types": "^15.8.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@instructure/ui-babel-preset": "8.47.
|
|
42
|
-
"@instructure/ui-test-locator": "8.47.
|
|
43
|
-
"@instructure/ui-test-queries": "8.47.
|
|
44
|
-
"@instructure/ui-test-utils": "8.47.
|
|
45
|
-
"@instructure/ui-themes": "8.47.
|
|
41
|
+
"@instructure/ui-babel-preset": "8.47.2-snapshot-2",
|
|
42
|
+
"@instructure/ui-test-locator": "8.47.2-snapshot-2",
|
|
43
|
+
"@instructure/ui-test-queries": "8.47.2-snapshot-2",
|
|
44
|
+
"@instructure/ui-test-utils": "8.47.2-snapshot-2",
|
|
45
|
+
"@instructure/ui-themes": "8.47.2-snapshot-2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=16.8 <=18"
|
package/src/Link/index.tsx
CHANGED
|
@@ -213,6 +213,7 @@ class Link extends Component<LinkProps, LinkState> {
|
|
|
213
213
|
const {
|
|
214
214
|
children,
|
|
215
215
|
onClick,
|
|
216
|
+
onMouseEnter,
|
|
216
217
|
color,
|
|
217
218
|
href,
|
|
218
219
|
margin,
|
|
@@ -241,6 +242,7 @@ class Link extends Component<LinkProps, LinkState> {
|
|
|
241
242
|
display={this.display}
|
|
242
243
|
margin={margin}
|
|
243
244
|
href={href}
|
|
245
|
+
onMouseEnter={onMouseEnter}
|
|
244
246
|
onClick={this.handleClick}
|
|
245
247
|
onFocus={this.handleFocus}
|
|
246
248
|
onBlur={this.handleBlur}
|
package/src/Link/props.ts
CHANGED
|
@@ -112,6 +112,11 @@ type LinkOwnProps = {
|
|
|
112
112
|
*/
|
|
113
113
|
isWithinText?: boolean
|
|
114
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Fires when the Link loses focus
|
|
117
|
+
*/
|
|
118
|
+
onBlur?: (event: React.FocusEvent<ViewOwnProps>) => void
|
|
119
|
+
|
|
115
120
|
/**
|
|
116
121
|
* Fires when the Link is clicked
|
|
117
122
|
*/
|
|
@@ -123,9 +128,9 @@ type LinkOwnProps = {
|
|
|
123
128
|
onFocus?: (event: React.FocusEvent<ViewOwnProps>) => void
|
|
124
129
|
|
|
125
130
|
/**
|
|
126
|
-
* Fires when the Link
|
|
131
|
+
* Fires when the Link is hovered
|
|
127
132
|
*/
|
|
128
|
-
|
|
133
|
+
onMouseEnter?: (event: React.MouseEvent<ViewOwnProps>) => void
|
|
129
134
|
}
|
|
130
135
|
|
|
131
136
|
export type LinkStyleProps = {
|
|
@@ -168,9 +173,10 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
168
173
|
'inline-flex'
|
|
169
174
|
]),
|
|
170
175
|
isWithinText: PropTypes.bool,
|
|
176
|
+
onBlur: PropTypes.func,
|
|
171
177
|
onClick: PropTypes.func,
|
|
172
178
|
onFocus: PropTypes.func,
|
|
173
|
-
|
|
179
|
+
onMouseEnter: PropTypes.func
|
|
174
180
|
}
|
|
175
181
|
|
|
176
182
|
const allowedProps: AllowedPropKeys = [
|
|
@@ -187,9 +193,10 @@ const allowedProps: AllowedPropKeys = [
|
|
|
187
193
|
'iconPlacement',
|
|
188
194
|
'display',
|
|
189
195
|
'isWithinText',
|
|
196
|
+
'onBlur',
|
|
190
197
|
'onClick',
|
|
191
198
|
'onFocus',
|
|
192
|
-
'
|
|
199
|
+
'onMouseEnter'
|
|
193
200
|
]
|
|
194
201
|
|
|
195
202
|
export type { LinkProps, LinkState, LinkStyle }
|