@instructure/ui-heading 8.10.3-snapshot.2 → 8.10.3-snapshot.25
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/es/Heading/index.js +14 -12
- package/lib/Heading/index.js +14 -12
- package/package.json +13 -13
- package/src/Heading/index.tsx +6 -1
- package/src/Heading/props.ts +5 -2
- package/types/Heading/index.d.ts.map +1 -1
- package/types/Heading/props.d.ts +2 -2
- package/types/Heading/props.d.ts.map +1 -1
package/es/Heading/index.js
CHANGED
|
@@ -48,10 +48,12 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
48
48
|
this.ref = null;
|
|
49
49
|
|
|
50
50
|
this.handleRef = el => {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
const elementRef = this.props.elementRef;
|
|
53
52
|
this.ref = el;
|
|
54
|
-
|
|
53
|
+
|
|
54
|
+
if (typeof elementRef === 'function') {
|
|
55
|
+
elementRef(el);
|
|
56
|
+
}
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -66,15 +68,15 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
66
68
|
render() {
|
|
67
69
|
var _this$props$styles;
|
|
68
70
|
|
|
69
|
-
const _this$
|
|
70
|
-
border = _this$
|
|
71
|
-
children = _this$
|
|
72
|
-
color = _this$
|
|
73
|
-
level = _this$
|
|
74
|
-
margin = _this$
|
|
75
|
-
elementRef = _this$
|
|
76
|
-
makeStyles = _this$
|
|
77
|
-
props = _objectWithoutProperties(_this$
|
|
71
|
+
const _this$props = this.props,
|
|
72
|
+
border = _this$props.border,
|
|
73
|
+
children = _this$props.children,
|
|
74
|
+
color = _this$props.color,
|
|
75
|
+
level = _this$props.level,
|
|
76
|
+
margin = _this$props.margin,
|
|
77
|
+
elementRef = _this$props.elementRef,
|
|
78
|
+
makeStyles = _this$props.makeStyles,
|
|
79
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
78
80
|
|
|
79
81
|
const ElementType = getElementType(Heading, this.props, () => {
|
|
80
82
|
if (level === 'reset') {
|
package/lib/Heading/index.js
CHANGED
|
@@ -42,10 +42,12 @@ let Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
42
42
|
this.ref = null;
|
|
43
43
|
|
|
44
44
|
this.handleRef = el => {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const elementRef = this.props.elementRef;
|
|
47
46
|
this.ref = el;
|
|
48
|
-
|
|
47
|
+
|
|
48
|
+
if (typeof elementRef === 'function') {
|
|
49
|
+
elementRef(el);
|
|
50
|
+
}
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
|
|
@@ -60,15 +62,15 @@ let Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
60
62
|
render() {
|
|
61
63
|
var _this$props$styles;
|
|
62
64
|
|
|
63
|
-
const _this$
|
|
64
|
-
border = _this$
|
|
65
|
-
children = _this$
|
|
66
|
-
color = _this$
|
|
67
|
-
level = _this$
|
|
68
|
-
margin = _this$
|
|
69
|
-
elementRef = _this$
|
|
70
|
-
makeStyles = _this$
|
|
71
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
65
|
+
const _this$props = this.props,
|
|
66
|
+
border = _this$props.border,
|
|
67
|
+
children = _this$props.children,
|
|
68
|
+
color = _this$props.color,
|
|
69
|
+
level = _this$props.level,
|
|
70
|
+
margin = _this$props.margin,
|
|
71
|
+
elementRef = _this$props.elementRef,
|
|
72
|
+
makeStyles = _this$props.makeStyles,
|
|
73
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
72
74
|
const ElementType = (0, _getElementType.getElementType)(Heading, this.props, () => {
|
|
73
75
|
if (level === 'reset') {
|
|
74
76
|
return 'span';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-heading",
|
|
3
|
-
"version": "8.10.3-snapshot.
|
|
3
|
+
"version": "8.10.3-snapshot.25+ed32a6c3b",
|
|
4
4
|
"description": "A component for creating typographic headings",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.10.3-snapshot.
|
|
29
|
-
"@instructure/emotion": "8.10.3-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.10.3-snapshot.
|
|
31
|
-
"@instructure/ui-prop-types": "8.10.3-snapshot.
|
|
32
|
-
"@instructure/ui-react-utils": "8.10.3-snapshot.
|
|
33
|
-
"@instructure/ui-testable": "8.10.3-snapshot.
|
|
34
|
-
"@instructure/ui-view": "8.10.3-snapshot.
|
|
28
|
+
"@instructure/console": "8.10.3-snapshot.25+ed32a6c3b",
|
|
29
|
+
"@instructure/emotion": "8.10.3-snapshot.25+ed32a6c3b",
|
|
30
|
+
"@instructure/shared-types": "8.10.3-snapshot.25+ed32a6c3b",
|
|
31
|
+
"@instructure/ui-prop-types": "8.10.3-snapshot.25+ed32a6c3b",
|
|
32
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.25+ed32a6c3b",
|
|
33
|
+
"@instructure/ui-testable": "8.10.3-snapshot.25+ed32a6c3b",
|
|
34
|
+
"@instructure/ui-view": "8.10.3-snapshot.25+ed32a6c3b",
|
|
35
35
|
"prop-types": "^15"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@instructure/ui-babel-preset": "8.10.3-snapshot.
|
|
39
|
-
"@instructure/ui-test-locator": "8.10.3-snapshot.
|
|
40
|
-
"@instructure/ui-test-utils": "8.10.3-snapshot.
|
|
41
|
-
"@instructure/ui-themes": "8.10.3-snapshot.
|
|
38
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.25+ed32a6c3b",
|
|
39
|
+
"@instructure/ui-test-locator": "8.10.3-snapshot.25+ed32a6c3b",
|
|
40
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.25+ed32a6c3b",
|
|
41
|
+
"@instructure/ui-themes": "8.10.3-snapshot.25+ed32a6c3b"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8 <=17"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "ed32a6c3b14ddb7fbbb5b543d9871a296f06e4c0"
|
|
51
51
|
}
|
package/src/Heading/index.tsx
CHANGED
|
@@ -58,8 +58,13 @@ class Heading extends Component<HeadingProps> {
|
|
|
58
58
|
ref: Element | null = null
|
|
59
59
|
|
|
60
60
|
handleRef = (el: Element | null) => {
|
|
61
|
+
const { elementRef } = this.props
|
|
62
|
+
|
|
61
63
|
this.ref = el
|
|
62
|
-
|
|
64
|
+
|
|
65
|
+
if (typeof elementRef === 'function') {
|
|
66
|
+
elementRef(el)
|
|
67
|
+
}
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
componentDidMount() {
|
package/src/Heading/props.ts
CHANGED
|
@@ -30,7 +30,8 @@ import { ThemeablePropTypes } from '@instructure/emotion'
|
|
|
30
30
|
import type {
|
|
31
31
|
AsElementType,
|
|
32
32
|
PropValidators,
|
|
33
|
-
HeadingTheme
|
|
33
|
+
HeadingTheme,
|
|
34
|
+
OtherHTMLAttributes
|
|
34
35
|
} from '@instructure/shared-types'
|
|
35
36
|
import type {
|
|
36
37
|
Spacing,
|
|
@@ -59,7 +60,9 @@ type PropKeys = keyof HeadingOwnProps
|
|
|
59
60
|
|
|
60
61
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
61
62
|
|
|
62
|
-
type HeadingProps = HeadingOwnProps &
|
|
63
|
+
type HeadingProps = HeadingOwnProps &
|
|
64
|
+
WithStyleProps<HeadingTheme, HeadingStyle> &
|
|
65
|
+
OtherHTMLAttributes<HeadingOwnProps>
|
|
63
66
|
|
|
64
67
|
type HeadingStyle = ComponentStyle<'heading'>
|
|
65
68
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Heading/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;GAIG;AACH,cAEM,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,WAAW,aAAY;IAEvC,MAAM,CAAC,SAAS;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKT;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Heading/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;GAIG;AACH,cAEM,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,WAAW,aAAY;IAEvC,MAAM,CAAC,SAAS;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKT;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAKjB,kBAAkB;IAKlB,MAAM;CAgCP;AAED,eAAe,OAAO,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/types/Heading/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { AsElementType, PropValidators, HeadingTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { AsElementType, PropValidators, HeadingTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
3
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type HeadingLevel<U extends keyof JSX.IntrinsicElements> = U;
|
|
5
5
|
declare type HeadingOwnProps = {
|
|
@@ -13,7 +13,7 @@ declare type HeadingOwnProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare type PropKeys = keyof HeadingOwnProps;
|
|
15
15
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
16
|
-
declare type HeadingProps = HeadingOwnProps & WithStyleProps<HeadingTheme, HeadingStyle>;
|
|
16
|
+
declare type HeadingProps = HeadingOwnProps & WithStyleProps<HeadingTheme, HeadingStyle> & OtherHTMLAttributes<HeadingOwnProps>;
|
|
17
17
|
declare type HeadingStyle = ComponentStyle<'heading'>;
|
|
18
18
|
declare const propTypes: PropValidators<PropKeys>;
|
|
19
19
|
declare const allowedProps: AllowedPropKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Heading/props.ts"],"names":[],"mappings":";AA6BA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Heading/props.ts"],"names":[],"mappings":";AA6BA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,mBAAmB,EACpB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