@instructure/ui-billboard 8.56.0 → 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 +16 -0
- package/lib/Billboard/__new-tests__/Billboard.test.js +4 -4
- package/lib/Billboard/index.js +8 -10
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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-billboard
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [8.56.1](https://github.com/instructure/instructure-ui/compare/v8.56.0...v8.56.1) (2024-06-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @instructure/ui-billboard
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [8.56.0](https://github.com/instructure/instructure-ui/compare/v8.55.1...v8.56.0) (2024-05-06)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @instructure/ui-billboard
|
|
@@ -6,8 +6,8 @@ var _react2 = require("@testing-library/react");
|
|
|
6
6
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
|
7
7
|
require("@testing-library/jest-dom");
|
|
8
8
|
var _index = require("../index");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
10
|
+
var _uiAxeCheck = require("@instructure/ui-axe-check");
|
|
11
11
|
var _IconUserLine, _Billboard, _Billboard2, _Billboard3, _Billboard4, _span, _span2, _Billboard5, _Billboard6, _Billboard7;
|
|
12
12
|
/*
|
|
13
13
|
* The MIT License (MIT)
|
|
@@ -35,7 +35,7 @@ var _IconUserLine, _Billboard, _Billboard2, _Billboard3, _Billboard4, _span, _sp
|
|
|
35
35
|
const TEST_HEADING = 'test-heading';
|
|
36
36
|
const TEST_MESSAGE = 'test-message';
|
|
37
37
|
const TEST_LINK = 'http://instructure-test.com';
|
|
38
|
-
const TEST_HERO = () => _IconUserLine || (_IconUserLine = /*#__PURE__*/_react.default.createElement(
|
|
38
|
+
const TEST_HERO = () => _IconUserLine || (_IconUserLine = /*#__PURE__*/_react.default.createElement(_uiIcons.IconUserLine, {
|
|
39
39
|
size: 'medium'
|
|
40
40
|
}));
|
|
41
41
|
describe('<Billboard />', () => {
|
|
@@ -51,7 +51,7 @@ describe('<Billboard />', () => {
|
|
|
51
51
|
hero: TEST_HERO
|
|
52
52
|
}))),
|
|
53
53
|
container = _render2.container;
|
|
54
|
-
const axeCheck = await (0,
|
|
54
|
+
const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
|
|
55
55
|
expect(axeCheck).toBe(true);
|
|
56
56
|
});
|
|
57
57
|
it('should render a heading with the correct tag', () => {
|
package/lib/Billboard/index.js
CHANGED
|
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Billboard = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
13
|
-
var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
|
|
9
|
+
var _uiHeading = require("@instructure/ui-heading");
|
|
10
|
+
var _uiView = require("@instructure/ui-view");
|
|
11
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
14
12
|
var _emotion = require("@instructure/emotion");
|
|
15
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
16
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -84,7 +82,7 @@ let Billboard = exports.Billboard = (_dec = (0, _emotion.withStyle)(_styles.defa
|
|
|
84
82
|
styles = _this$props4.styles;
|
|
85
83
|
return (0, _emotion.jsx)("span", {
|
|
86
84
|
css: styles === null || styles === void 0 ? void 0 : styles.heading
|
|
87
|
-
}, (0, _emotion.jsx)(
|
|
85
|
+
}, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
88
86
|
level: headingLevel,
|
|
89
87
|
as: headingAs,
|
|
90
88
|
color: "primary"
|
|
@@ -121,7 +119,7 @@ let Billboard = exports.Billboard = (_dec = (0, _emotion.withStyle)(_styles.defa
|
|
|
121
119
|
css: styles === null || styles === void 0 ? void 0 : styles.hero
|
|
122
120
|
}, this.renderHero()), heading && this.renderHeading(), message && (0, _emotion.jsx)("span", {
|
|
123
121
|
css: styles === null || styles === void 0 ? void 0 : styles.message
|
|
124
|
-
}, (0,
|
|
122
|
+
}, (0, _uiReactUtils.callRenderProp)(message)));
|
|
125
123
|
}
|
|
126
124
|
render() {
|
|
127
125
|
const _this$props6 = this.props,
|
|
@@ -130,11 +128,11 @@ let Billboard = exports.Billboard = (_dec = (0, _emotion.withStyle)(_styles.defa
|
|
|
130
128
|
readOnly = _this$props6.readOnly,
|
|
131
129
|
margin = _this$props6.margin,
|
|
132
130
|
styles = _this$props6.styles;
|
|
133
|
-
const Element = (0,
|
|
134
|
-
return (0, _emotion.jsx)(
|
|
131
|
+
const Element = (0, _uiReactUtils.getElementType)(Billboard, this.props);
|
|
132
|
+
return (0, _emotion.jsx)(_uiView.View, {
|
|
135
133
|
as: "div",
|
|
136
134
|
margin: margin
|
|
137
|
-
}, (0, _emotion.jsx)(
|
|
135
|
+
}, (0, _emotion.jsx)(_uiView.View, Object.assign({}, (0, _uiReactUtils.omitProps)(this.props, [...Billboard.allowedProps, ..._uiView.View.allowedProps]), {
|
|
138
136
|
type: Element === 'button' ? 'button' : void 0,
|
|
139
137
|
as: Element,
|
|
140
138
|
elementRef: this.handleRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-billboard",
|
|
3
|
-
"version": "8.56.
|
|
3
|
+
"version": "8.56.2-pr-snapshot-1721749364069",
|
|
4
4
|
"description": "A UI component to display empty states, 404 pages, redirects, etc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "8.56.
|
|
27
|
-
"@instructure/ui-babel-preset": "8.56.
|
|
28
|
-
"@instructure/ui-color-utils": "8.56.
|
|
29
|
-
"@instructure/ui-icons": "8.56.
|
|
30
|
-
"@instructure/ui-test-utils": "8.56.
|
|
31
|
-
"@instructure/ui-themes": "8.56.
|
|
26
|
+
"@instructure/ui-axe-check": "8.56.2-pr-snapshot-1721749364069",
|
|
27
|
+
"@instructure/ui-babel-preset": "8.56.2-pr-snapshot-1721749364069",
|
|
28
|
+
"@instructure/ui-color-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
29
|
+
"@instructure/ui-icons": "8.56.2-pr-snapshot-1721749364069",
|
|
30
|
+
"@instructure/ui-test-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
31
|
+
"@instructure/ui-themes": "8.56.2-pr-snapshot-1721749364069",
|
|
32
32
|
"@testing-library/jest-dom": "^6.1.4",
|
|
33
33
|
"@testing-library/react": "^14.1.2",
|
|
34
34
|
"@testing-library/user-event": "^14.5.1"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.23.2",
|
|
38
|
-
"@instructure/emotion": "8.56.
|
|
39
|
-
"@instructure/shared-types": "8.56.
|
|
40
|
-
"@instructure/ui-heading": "8.56.
|
|
41
|
-
"@instructure/ui-img": "8.56.
|
|
42
|
-
"@instructure/ui-react-utils": "8.56.
|
|
43
|
-
"@instructure/ui-view": "8.56.
|
|
38
|
+
"@instructure/emotion": "8.56.2-pr-snapshot-1721749364069",
|
|
39
|
+
"@instructure/shared-types": "8.56.2-pr-snapshot-1721749364069",
|
|
40
|
+
"@instructure/ui-heading": "8.56.2-pr-snapshot-1721749364069",
|
|
41
|
+
"@instructure/ui-img": "8.56.2-pr-snapshot-1721749364069",
|
|
42
|
+
"@instructure/ui-react-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
43
|
+
"@instructure/ui-view": "8.56.2-pr-snapshot-1721749364069",
|
|
44
44
|
"prop-types": "^15.8.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|