@instructure/ui-link 8.56.1 → 8.56.2-pr-snapshot-1721749364069

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,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
+ ## [8.56.2-pr-snapshot-1721749364069](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-pr-snapshot-1721749364069) (2024-07-23)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-link
9
+
10
+
11
+
12
+
13
+
6
14
  ## [8.56.1](https://github.com/instructure/instructure-ui/compare/v8.56.0...v8.56.1) (2024-06-13)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-link
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.LinkLocator = void 0;
7
- var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
7
+ var _uiTestLocator = require("@instructure/ui-test-locator");
8
8
  var _uiTestQueries = require("@instructure/ui-test-queries");
9
9
  var _index = require("./index");
10
10
  /*
@@ -32,7 +32,7 @@ var _index = require("./index");
32
32
  */
33
33
 
34
34
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
35
- const LinkLocator = exports.LinkLocator = (0, _locator.locator)(_index.Link.selector, {
35
+ const LinkLocator = exports.LinkLocator = (0, _uiTestLocator.locator)(_index.Link.selector, {
36
36
  click: async (element, ...args) => {
37
37
  return (await (0, _uiTestQueries.find)(element, 'a,button,[role="button"]')).click(...args);
38
38
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _IconTrashSolid = require("@instructure/ui-icons/lib/IconTrashSolid.js");
7
+ var _uiIcons = require("@instructure/ui-icons");
8
8
  /*
9
9
  * The MIT License (MIT)
10
10
  *
@@ -36,7 +36,7 @@ var _default = exports.default = {
36
36
  propValues: {
37
37
  children: [shortString, longString],
38
38
  iconPlacement: [null, 'start', 'end'],
39
- renderIcon: [null, _IconTrashSolid.IconTrashSolid]
39
+ renderIcon: [null, _uiIcons.IconTrashSolid]
40
40
  },
41
41
  getComponentProps: () => {
42
42
  return {
package/lib/Link/index.js CHANGED
@@ -8,17 +8,12 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = exports.Link = void 0;
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _View = require("@instructure/ui-view/lib/View");
12
- var _hasVisibleChildren = require("@instructure/ui-a11y-utils/lib/hasVisibleChildren.js");
13
- var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
14
- var _findFocusable = require("@instructure/ui-dom-utils/lib/findFocusable.js");
15
- var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
16
- var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js");
17
- var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
18
- var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
19
- var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
11
+ var _uiView = require("@instructure/ui-view");
12
+ var _uiA11yUtils = require("@instructure/ui-a11y-utils");
13
+ var _uiDomUtils = require("@instructure/ui-dom-utils");
14
+ var _uiReactUtils = require("@instructure/ui-react-utils");
20
15
  var _console = require("@instructure/console");
21
- var _testable = require("@instructure/ui-testable/lib/testable.js");
16
+ var _uiTestable = require("@instructure/ui-testable");
22
17
  var _emotion = require("@instructure/emotion");
23
18
  var _styles = _interopRequireDefault(require("./styles"));
24
19
  var _theme = _interopRequireDefault(require("./theme"));
@@ -54,7 +49,7 @@ var _dec, _dec2, _class, _class2;
54
49
  category: components
55
50
  ---
56
51
  **/
57
- let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Link extends _react.Component {
52
+ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Link extends _react.Component {
58
53
  constructor(...args) {
59
54
  super(...args);
60
55
  this.state = {
@@ -115,7 +110,7 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _them
115
110
  get containsTruncateText() {
116
111
  let truncateText = false;
117
112
  _react.default.Children.forEach(this.props.children, child => {
118
- if (child && (0, _matchComponentTypes.matchComponentTypes)(child, ['TruncateText'])) {
113
+ if (child && (0, _uiReactUtils.matchComponentTypes)(child, ['TruncateText'])) {
119
114
  truncateText = true;
120
115
  }
121
116
  });
@@ -137,22 +132,22 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _them
137
132
  }
138
133
  }
139
134
  get interaction() {
140
- return (0, _getInteraction.getInteraction)({
135
+ return (0, _uiReactUtils.getInteraction)({
141
136
  props: this.props,
142
137
  interactionTypes: ['disabled']
143
138
  });
144
139
  }
145
140
  get element() {
146
- return (0, _getElementType.getElementType)(Link, this.props);
141
+ return (0, _uiReactUtils.getElementType)(Link, this.props);
147
142
  }
148
143
  get focused() {
149
- return (0, _isActiveElement.isActiveElement)(this.ref);
144
+ return (0, _uiDomUtils.isActiveElement)(this.ref);
150
145
  }
151
146
  get focusable() {
152
- return (0, _findFocusable.findFocusable)(this.ref);
147
+ return (0, _uiDomUtils.findFocusable)(this.ref);
153
148
  }
154
149
  get hasVisibleChildren() {
155
- return (0, _hasVisibleChildren.hasVisibleChildren)(this.props.children);
150
+ return (0, _uiA11yUtils.hasVisibleChildren)(this.props.children);
156
151
  }
157
152
  get role() {
158
153
  const _this$props3 = this.props,
@@ -174,7 +169,7 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _them
174
169
  this.props.display === void 0, '[Link] Using the display property with an icon may cause layout issues.');
175
170
  return (0, _emotion.jsx)("span", {
176
171
  css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.icon
177
- }, (0, _callRenderProp.callRenderProp)(this.props.renderIcon));
172
+ }, (0, _uiReactUtils.callRenderProp)(this.props.renderIcon));
178
173
  }
179
174
  render() {
180
175
  var _this$props$styles2;
@@ -193,7 +188,7 @@ let Link = exports.Link = (_dec = (0, _emotion.withStyle)(_styles.default, _them
193
188
  const isDisabled = interaction === 'disabled';
194
189
  const type = this.element === 'button' || this.element === 'input' ? 'button' : void 0;
195
190
  const tabIndex = this.role === 'button' && !isDisabled ? 0 : void 0;
196
- return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
191
+ return (0, _emotion.jsx)(_uiView.View, Object.assign({}, (0, _uiReactUtils.passthroughProps)(props), {
197
192
  elementRef: this.handleElementRef,
198
193
  as: this.element,
199
194
  display: this.display,
package/lib/Link/theme.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _darken = require("@instructure/ui-color-utils/lib/darken.js");
7
+ var _uiColorUtils = require("@instructure/ui-color-utils");
8
8
  /*
9
9
  * The MIT License (MIT)
10
10
  *
@@ -47,7 +47,7 @@ const generateComponentTheme = theme => {
47
47
  canvas: {
48
48
  color: theme['ic-link-color'],
49
49
  focusOutlineColor: theme['ic-brand-primary'],
50
- hoverColor: (0, _darken.darken)(theme['ic-link-color'], 10)
50
+ hoverColor: (0, _uiColorUtils.darken)(theme['ic-link-color'], 10)
51
51
  },
52
52
  'canvas-high-contrast': {
53
53
  textDecorationOutsideText: 'underline',
@@ -68,7 +68,7 @@ const generateComponentTheme = theme => {
68
68
  focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
69
69
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style,
70
70
  focusOutlineBorderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusSmall,
71
- hoverColor: (0, _darken.darken)(colors === null || colors === void 0 ? void 0 : colors.textLink, 10),
71
+ hoverColor: (0, _uiColorUtils.darken)(colors === null || colors === void 0 ? void 0 : colors.textLink, 10),
72
72
  colorInverse: colors === null || colors === void 0 ? void 0 : colors.textLight,
73
73
  focusInverseOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderLightest,
74
74
  focusInverseIconOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderLightest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-link",
3
- "version": "8.56.1",
3
+ "version": "8.56.2-pr-snapshot-1721749364069",
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.56.1",
28
- "@instructure/emotion": "8.56.1",
29
- "@instructure/shared-types": "8.56.1",
30
- "@instructure/ui-a11y-utils": "8.56.1",
31
- "@instructure/ui-color-utils": "8.56.1",
32
- "@instructure/ui-dom-utils": "8.56.1",
33
- "@instructure/ui-icons": "8.56.1",
34
- "@instructure/ui-prop-types": "8.56.1",
35
- "@instructure/ui-react-utils": "8.56.1",
36
- "@instructure/ui-testable": "8.56.1",
37
- "@instructure/ui-view": "8.56.1",
27
+ "@instructure/console": "8.56.2-pr-snapshot-1721749364069",
28
+ "@instructure/emotion": "8.56.2-pr-snapshot-1721749364069",
29
+ "@instructure/shared-types": "8.56.2-pr-snapshot-1721749364069",
30
+ "@instructure/ui-a11y-utils": "8.56.2-pr-snapshot-1721749364069",
31
+ "@instructure/ui-color-utils": "8.56.2-pr-snapshot-1721749364069",
32
+ "@instructure/ui-dom-utils": "8.56.2-pr-snapshot-1721749364069",
33
+ "@instructure/ui-icons": "8.56.2-pr-snapshot-1721749364069",
34
+ "@instructure/ui-prop-types": "8.56.2-pr-snapshot-1721749364069",
35
+ "@instructure/ui-react-utils": "8.56.2-pr-snapshot-1721749364069",
36
+ "@instructure/ui-testable": "8.56.2-pr-snapshot-1721749364069",
37
+ "@instructure/ui-view": "8.56.2-pr-snapshot-1721749364069",
38
38
  "prop-types": "^15.8.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@instructure/ui-babel-preset": "8.56.1",
42
- "@instructure/ui-test-locator": "8.56.1",
43
- "@instructure/ui-test-queries": "8.56.1",
44
- "@instructure/ui-test-utils": "8.56.1",
45
- "@instructure/ui-themes": "8.56.1"
41
+ "@instructure/ui-babel-preset": "8.56.2-pr-snapshot-1721749364069",
42
+ "@instructure/ui-test-locator": "8.56.2-pr-snapshot-1721749364069",
43
+ "@instructure/ui-test-queries": "8.56.2-pr-snapshot-1721749364069",
44
+ "@instructure/ui-test-utils": "8.56.2-pr-snapshot-1721749364069",
45
+ "@instructure/ui-themes": "8.56.2-pr-snapshot-1721749364069"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": ">=16.8 <=18"