@instructure/ui-byline 8.10.3-snapshot.3 → 8.11.1-snapshot.0
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 +4 -0
- package/es/Byline/index.js +5 -3
- package/es/Byline/props.js +4 -0
- package/lib/Byline/index.js +5 -3
- package/lib/Byline/props.js +4 -0
- package/package.json +11 -11
- package/src/Byline/index.tsx +6 -1
- package/src/Byline/props.ts +11 -2
- package/types/Byline/index.d.ts.map +1 -1
- package/types/Byline/props.d.ts +2 -2
- package/types/Byline/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.11.0](https://github.com/instructure/instructure-ui/compare/v8.10.2...v8.11.0) (2021-10-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-byline
|
|
9
|
+
|
|
6
10
|
## [8.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-byline
|
package/es/Byline/index.js
CHANGED
|
@@ -44,10 +44,12 @@ let Byline = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_cla
|
|
|
44
44
|
this.ref = null;
|
|
45
45
|
|
|
46
46
|
this.handleRef = el => {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const elementRef = this.props.elementRef;
|
|
49
48
|
this.ref = el;
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
if (typeof elementRef === 'function') {
|
|
51
|
+
elementRef(el);
|
|
52
|
+
}
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
55
|
|
package/es/Byline/props.js
CHANGED
|
@@ -51,6 +51,10 @@ const propTypes = {
|
|
|
51
51
|
*/
|
|
52
52
|
margin: ThemeablePropTypes.spacing,
|
|
53
53
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* provides a reference to the underlying html root element
|
|
57
|
+
*/
|
|
54
58
|
elementRef: PropTypes.func
|
|
55
59
|
};
|
|
56
60
|
const allowedProps = ['alignContent', 'children', 'description', 'elementRef', 'margin', 'size', 'title'];
|
package/lib/Byline/index.js
CHANGED
|
@@ -34,10 +34,12 @@ let Byline = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
|
|
|
34
34
|
this.ref = null;
|
|
35
35
|
|
|
36
36
|
this.handleRef = el => {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const elementRef = this.props.elementRef;
|
|
39
38
|
this.ref = el;
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
if (typeof elementRef === 'function') {
|
|
41
|
+
elementRef(el);
|
|
42
|
+
}
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
|
package/lib/Byline/props.js
CHANGED
|
@@ -62,6 +62,10 @@ const propTypes = {
|
|
|
62
62
|
*/
|
|
63
63
|
margin: _emotion.ThemeablePropTypes.spacing,
|
|
64
64
|
size: _propTypes.default.oneOf(['small', 'medium', 'large']),
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* provides a reference to the underlying html root element
|
|
68
|
+
*/
|
|
65
69
|
elementRef: _propTypes.default.func
|
|
66
70
|
};
|
|
67
71
|
exports.propTypes = propTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-byline",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.1-snapshot.0+8536a1c9b",
|
|
4
4
|
"description": "A Byline component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/emotion": "8.
|
|
29
|
-
"@instructure/shared-types": "8.
|
|
30
|
-
"@instructure/ui-react-utils": "8.
|
|
31
|
-
"@instructure/ui-testable": "8.
|
|
32
|
-
"@instructure/ui-view": "8.
|
|
28
|
+
"@instructure/emotion": "8.11.1-snapshot.0+8536a1c9b",
|
|
29
|
+
"@instructure/shared-types": "8.11.1-snapshot.0+8536a1c9b",
|
|
30
|
+
"@instructure/ui-react-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
31
|
+
"@instructure/ui-testable": "8.11.1-snapshot.0+8536a1c9b",
|
|
32
|
+
"@instructure/ui-view": "8.11.1-snapshot.0+8536a1c9b",
|
|
33
33
|
"prop-types": "^15"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@instructure/ui-babel-preset": "8.
|
|
37
|
-
"@instructure/ui-color-utils": "8.
|
|
38
|
-
"@instructure/ui-test-utils": "8.
|
|
39
|
-
"@instructure/ui-themes": "8.
|
|
36
|
+
"@instructure/ui-babel-preset": "8.11.1-snapshot.0+8536a1c9b",
|
|
37
|
+
"@instructure/ui-color-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
38
|
+
"@instructure/ui-test-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
39
|
+
"@instructure/ui-themes": "8.11.1-snapshot.0+8536a1c9b"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8 <=17"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "8536a1c9badcd8c1d2ce55dfb462d1899e3ca500"
|
|
49
49
|
}
|
package/src/Byline/index.tsx
CHANGED
|
@@ -55,8 +55,13 @@ class Byline extends Component<BylineProps> {
|
|
|
55
55
|
ref: Element | null = null
|
|
56
56
|
|
|
57
57
|
handleRef = (el: Element | null) => {
|
|
58
|
+
const { elementRef } = this.props
|
|
59
|
+
|
|
58
60
|
this.ref = el
|
|
59
|
-
|
|
61
|
+
|
|
62
|
+
if (typeof elementRef === 'function') {
|
|
63
|
+
elementRef(el)
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
componentDidMount() {
|
package/src/Byline/props.ts
CHANGED
|
@@ -32,7 +32,11 @@ import type {
|
|
|
32
32
|
WithStyleProps,
|
|
33
33
|
ComponentStyle
|
|
34
34
|
} from '@instructure/emotion'
|
|
35
|
-
import type {
|
|
35
|
+
import type {
|
|
36
|
+
PropValidators,
|
|
37
|
+
BylineTheme,
|
|
38
|
+
OtherHTMLAttributes
|
|
39
|
+
} from '@instructure/shared-types'
|
|
36
40
|
|
|
37
41
|
type BylineOwnProps = {
|
|
38
42
|
children: React.ReactNode
|
|
@@ -48,7 +52,9 @@ type PropKeys = keyof BylineOwnProps
|
|
|
48
52
|
|
|
49
53
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
50
54
|
|
|
51
|
-
type BylineProps = BylineOwnProps &
|
|
55
|
+
type BylineProps = BylineOwnProps &
|
|
56
|
+
WithStyleProps<BylineTheme, BylineStyle> &
|
|
57
|
+
OtherHTMLAttributes<BylineOwnProps>
|
|
52
58
|
|
|
53
59
|
type BylineStyle = ComponentStyle<
|
|
54
60
|
'byline' | 'figure' | 'caption' | 'title' | 'description' | 'maxWidth'
|
|
@@ -78,6 +84,9 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
78
84
|
*/
|
|
79
85
|
margin: ThemeablePropTypes.spacing,
|
|
80
86
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
87
|
+
/**
|
|
88
|
+
* provides a reference to the underlying html root element
|
|
89
|
+
*/
|
|
81
90
|
elementRef: PropTypes.func
|
|
82
91
|
}
|
|
83
92
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Byline/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AAEH,cACM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Byline/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AAEH,cACM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CA8BP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/types/Byline/props.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
-
import type { PropValidators, BylineTheme } from '@instructure/shared-types';
|
|
3
|
+
import type { PropValidators, BylineTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
4
|
declare type BylineOwnProps = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
title?: React.ReactNode;
|
|
@@ -12,7 +12,7 @@ declare type BylineOwnProps = {
|
|
|
12
12
|
};
|
|
13
13
|
declare type PropKeys = keyof BylineOwnProps;
|
|
14
14
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
15
|
-
declare type BylineProps = BylineOwnProps & WithStyleProps<BylineTheme, BylineStyle>;
|
|
15
|
+
declare type BylineProps = BylineOwnProps & WithStyleProps<BylineTheme, BylineStyle> & OtherHTMLAttributes<BylineOwnProps>;
|
|
16
16
|
declare type BylineStyle = ComponentStyle<'byline' | 'figure' | 'caption' | 'title' | 'description' | 'maxWidth'>;
|
|
17
17
|
declare const propTypes: PropValidators<PropKeys>;
|
|
18
18
|
declare const allowedProps: AllowedPropKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Byline/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Byline/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,cAAc,EACd,WA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