@instructure/ui-heading 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/Heading/HeadingLocator.js +2 -2
- package/lib/Heading/index.js +7 -6
- package/lib/Heading/props.js +2 -2
- package/package.json +12 -12
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-heading
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HeadingLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
8
8
|
var _index = require("./index");
|
|
9
9
|
/*
|
|
10
10
|
* The MIT License (MIT)
|
|
@@ -31,4 +31,4 @@ var _index = require("./index");
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
34
|
-
const HeadingLocator = exports.HeadingLocator = (0,
|
|
34
|
+
const HeadingLocator = exports.HeadingLocator = (0, _locator.locator)(_index.Heading.selector);
|
package/lib/Heading/index.js
CHANGED
|
@@ -7,9 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.Heading = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
|
+
var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
|
|
12
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
13
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
13
14
|
var _emotion = require("@instructure/emotion");
|
|
14
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
15
16
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -45,7 +46,7 @@ var _dec, _dec2, _class, _class2;
|
|
|
45
46
|
category: components
|
|
46
47
|
---
|
|
47
48
|
**/
|
|
48
|
-
let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
49
|
+
let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Heading extends _react.Component {
|
|
49
50
|
constructor(...args) {
|
|
50
51
|
super(...args);
|
|
51
52
|
this.ref = null;
|
|
@@ -76,14 +77,14 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
|
|
|
76
77
|
elementRef = _this$props3.elementRef,
|
|
77
78
|
makeStyles = _this$props3.makeStyles,
|
|
78
79
|
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
79
|
-
const ElementType = (0,
|
|
80
|
+
const ElementType = (0, _getElementType.getElementType)(Heading, this.props, () => {
|
|
80
81
|
if (level === 'reset') {
|
|
81
82
|
return 'span';
|
|
82
83
|
} else {
|
|
83
84
|
return level;
|
|
84
85
|
}
|
|
85
86
|
});
|
|
86
|
-
return (0, _emotion.jsx)(
|
|
87
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
87
88
|
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.heading,
|
|
88
89
|
as: ElementType,
|
|
89
90
|
elementRef: this.handleRef,
|
package/lib/Heading/props.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var _childrenOrValue = require("@instructure/ui-prop-types/lib/childrenOrValue.js");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -34,7 +34,7 @@ var _emotion = require("@instructure/emotion");
|
|
|
34
34
|
|
|
35
35
|
const propTypes = exports.propTypes = {
|
|
36
36
|
border: _propTypes.default.oneOf(['none', 'top', 'bottom']),
|
|
37
|
-
children:
|
|
37
|
+
children: _childrenOrValue.childrenOrValue,
|
|
38
38
|
color: _propTypes.default.oneOf(['primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'inherit']),
|
|
39
39
|
level: _propTypes.default.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'reset']),
|
|
40
40
|
as: _propTypes.default.elementType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-heading",
|
|
3
|
-
"version": "8.56.2
|
|
3
|
+
"version": "8.56.2",
|
|
4
4
|
"description": "A component for creating typographic headings",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.23.2",
|
|
27
|
-
"@instructure/console": "8.56.2
|
|
28
|
-
"@instructure/emotion": "8.56.2
|
|
29
|
-
"@instructure/shared-types": "8.56.2
|
|
30
|
-
"@instructure/ui-prop-types": "8.56.2
|
|
31
|
-
"@instructure/ui-react-utils": "8.56.2
|
|
32
|
-
"@instructure/ui-testable": "8.56.2
|
|
33
|
-
"@instructure/ui-view": "8.56.2
|
|
27
|
+
"@instructure/console": "8.56.2",
|
|
28
|
+
"@instructure/emotion": "8.56.2",
|
|
29
|
+
"@instructure/shared-types": "8.56.2",
|
|
30
|
+
"@instructure/ui-prop-types": "8.56.2",
|
|
31
|
+
"@instructure/ui-react-utils": "8.56.2",
|
|
32
|
+
"@instructure/ui-testable": "8.56.2",
|
|
33
|
+
"@instructure/ui-view": "8.56.2",
|
|
34
34
|
"prop-types": "^15.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-babel-preset": "8.56.2
|
|
38
|
-
"@instructure/ui-test-locator": "8.56.2
|
|
39
|
-
"@instructure/ui-test-utils": "8.56.2
|
|
40
|
-
"@instructure/ui-themes": "8.56.2
|
|
37
|
+
"@instructure/ui-babel-preset": "8.56.2",
|
|
38
|
+
"@instructure/ui-test-locator": "8.56.2",
|
|
39
|
+
"@instructure/ui-test-utils": "8.56.2",
|
|
40
|
+
"@instructure/ui-themes": "8.56.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=16.8 <=18"
|