@instructure/ui-byline 8.56.2-pr-snapshot-1721749364069 → 8.56.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 +1 -1
- package/lib/Byline/__new-tests__/Byline.test.js +7 -7
- package/lib/Byline/index.js +4 -4
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
|
6
|
+
## [8.56.2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2) (2024-08-06)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-byline
|
|
9
9
|
|
|
@@ -5,8 +5,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
5
5
|
var _react2 = require("@testing-library/react");
|
|
6
6
|
require("@testing-library/jest-dom");
|
|
7
7
|
var _index = require("../index");
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
|
|
9
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
10
10
|
var _div;
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -49,13 +49,13 @@ const renderByline = (props = {
|
|
|
49
49
|
}) => {
|
|
50
50
|
return (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.Byline, props, TEST_IMAGE));
|
|
51
51
|
};
|
|
52
|
-
const originalOmitViewProps =
|
|
52
|
+
const originalOmitViewProps = _View.View.omitViewProps;
|
|
53
53
|
describe('<Byline />', () => {
|
|
54
54
|
beforeAll(() => {
|
|
55
55
|
// View component read Component.name instead of Component.displayName
|
|
56
56
|
// causing [undefined] in error messages
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
_View.View.omitViewProps = (props, Component) => {
|
|
59
59
|
const ModifiedComponent = {
|
|
60
60
|
...Component,
|
|
61
61
|
name: 'Byline'
|
|
@@ -64,7 +64,7 @@ describe('<Byline />', () => {
|
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
66
|
afterAll(() => {
|
|
67
|
-
|
|
67
|
+
_View.View.omitViewProps = originalOmitViewProps;
|
|
68
68
|
});
|
|
69
69
|
it('should render', () => {
|
|
70
70
|
const _renderByline = renderByline(),
|
|
@@ -90,7 +90,7 @@ describe('<Byline />', () => {
|
|
|
90
90
|
it('should meet a11y standards', async () => {
|
|
91
91
|
const _renderByline2 = renderByline(),
|
|
92
92
|
container = _renderByline2.container;
|
|
93
|
-
const axeCheck = await (0,
|
|
93
|
+
const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
|
|
94
94
|
expect(axeCheck).toBe(true);
|
|
95
95
|
});
|
|
96
96
|
it(`should render a figure by default`, () => {
|
|
@@ -104,7 +104,7 @@ describe('<Byline />', () => {
|
|
|
104
104
|
margin: 'small'
|
|
105
105
|
};
|
|
106
106
|
const customIgnoredProps = ['elementRef', 'children'];
|
|
107
|
-
const allProps =
|
|
107
|
+
const allProps = _View.View.allowedProps;
|
|
108
108
|
const testPropsToAllow = Object.keys(customAllowedProps);
|
|
109
109
|
const testPropsToDisallow = allProps.filter(prop => {
|
|
110
110
|
return !(prop in customAllowedProps) && !customIgnoredProps.includes(prop);
|
package/lib/Byline/index.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Byline = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
11
|
var _emotion = require("@instructure/emotion");
|
|
12
12
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
13
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -64,8 +64,8 @@ let Byline = exports.Byline = (_dec = (0, _emotion.withStyle)(_styles.default, _
|
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
var _this$props$styles, _this$props$styles2, _this$props$styles3, _this$props$styles4, _this$props$styles5, _this$props$styles6;
|
|
67
|
-
const passthroughProps =
|
|
68
|
-
return (0, _emotion.jsx)(
|
|
67
|
+
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Byline.allowedProps), Byline);
|
|
68
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
|
|
69
69
|
elementRef: this.handleRef,
|
|
70
70
|
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.byline,
|
|
71
71
|
as: "figure",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-byline",
|
|
3
|
-
"version": "8.56.2
|
|
3
|
+
"version": "8.56.2",
|
|
4
4
|
"description": "A Byline component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.23.2",
|
|
27
|
-
"@instructure/emotion": "8.56.2
|
|
28
|
-
"@instructure/shared-types": "8.56.2
|
|
29
|
-
"@instructure/ui-react-utils": "8.56.2
|
|
30
|
-
"@instructure/ui-testable": "8.56.2
|
|
31
|
-
"@instructure/ui-view": "8.56.2
|
|
27
|
+
"@instructure/emotion": "8.56.2",
|
|
28
|
+
"@instructure/shared-types": "8.56.2",
|
|
29
|
+
"@instructure/ui-react-utils": "8.56.2",
|
|
30
|
+
"@instructure/ui-testable": "8.56.2",
|
|
31
|
+
"@instructure/ui-view": "8.56.2",
|
|
32
32
|
"prop-types": "^15.8.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@instructure/ui-axe-check": "8.56.2
|
|
36
|
-
"@instructure/ui-babel-preset": "8.56.2
|
|
37
|
-
"@instructure/ui-color-utils": "8.56.2
|
|
38
|
-
"@instructure/ui-test-utils": "8.56.2
|
|
39
|
-
"@instructure/ui-themes": "8.56.2
|
|
35
|
+
"@instructure/ui-axe-check": "8.56.2",
|
|
36
|
+
"@instructure/ui-babel-preset": "8.56.2",
|
|
37
|
+
"@instructure/ui-color-utils": "8.56.2",
|
|
38
|
+
"@instructure/ui-test-utils": "8.56.2",
|
|
39
|
+
"@instructure/ui-themes": "8.56.2",
|
|
40
40
|
"@testing-library/jest-dom": "^6.1.4",
|
|
41
41
|
"@testing-library/react": "^14.1.2"
|
|
42
42
|
},
|