@instructure/ui-heading 8.18.0 → 8.18.1-snapshot.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/LICENSE.md +27 -0
- package/es/Heading/index.js +18 -12
- package/es/Heading/theme.js +31 -31
- package/lib/Heading/index.js +18 -12
- package/lib/Heading/theme.js +31 -31
- package/package.json +14 -13
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The MIT License (MIT)
|
|
3
|
+
category: Getting Started
|
|
4
|
+
order: 9
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The MIT License (MIT)
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
+
|
|
11
|
+
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions.**
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
package/es/Heading/index.js
CHANGED
|
@@ -59,23 +59,29 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
componentDidMount() {
|
|
62
|
-
|
|
62
|
+
var _this$props$makeStyle, _this$props;
|
|
63
|
+
|
|
64
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
componentDidUpdate() {
|
|
66
|
-
|
|
68
|
+
var _this$props$makeStyle2, _this$props2;
|
|
69
|
+
|
|
70
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
render() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
var _this$props$styles;
|
|
75
|
+
|
|
76
|
+
const _this$props3 = this.props,
|
|
77
|
+
border = _this$props3.border,
|
|
78
|
+
children = _this$props3.children,
|
|
79
|
+
color = _this$props3.color,
|
|
80
|
+
level = _this$props3.level,
|
|
81
|
+
margin = _this$props3.margin,
|
|
82
|
+
elementRef = _this$props3.elementRef,
|
|
83
|
+
makeStyles = _this$props3.makeStyles,
|
|
84
|
+
props = _objectWithoutProperties(_this$props3, _excluded);
|
|
79
85
|
|
|
80
86
|
const ElementType = getElementType(Heading, this.props, () => {
|
|
81
87
|
if (level === 'reset') {
|
|
@@ -85,7 +91,7 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
85
91
|
}
|
|
86
92
|
});
|
|
87
93
|
return jsx(View, Object.assign({}, passthroughProps(props), {
|
|
88
|
-
css: this.props.styles
|
|
94
|
+
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.heading,
|
|
89
95
|
as: ElementType,
|
|
90
96
|
elementRef: this.handleRef,
|
|
91
97
|
margin: margin
|
package/es/Heading/theme.js
CHANGED
|
@@ -38,41 +38,41 @@ const generateComponentTheme = theme => {
|
|
|
38
38
|
primaryColor: theme['ic-brand-font-color-dark']
|
|
39
39
|
},
|
|
40
40
|
instructure: {
|
|
41
|
-
h1FontFamily: typography
|
|
42
|
-
h2FontFamily: typography
|
|
43
|
-
h3FontWeight: typography
|
|
41
|
+
h1FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamilyHeading,
|
|
42
|
+
h2FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamilyHeading,
|
|
43
|
+
h3FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
44
44
|
h3FontSize: '2.125rem',
|
|
45
|
-
h4FontWeight: typography
|
|
46
|
-
h4FontSize: typography
|
|
47
|
-
h5FontWeight: typography
|
|
48
|
-
h5FontSize: typography
|
|
45
|
+
h4FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
46
|
+
h4FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
|
|
47
|
+
h5FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
48
|
+
h5FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
const componentVariables = {
|
|
52
|
-
lineHeight: typography
|
|
53
|
-
h1FontSize: typography
|
|
54
|
-
h1FontWeight: typography
|
|
55
|
-
h1FontFamily: typography
|
|
56
|
-
h2FontSize: typography
|
|
57
|
-
h2FontWeight: typography
|
|
58
|
-
h2FontFamily: typography
|
|
59
|
-
h3FontSize: typography
|
|
60
|
-
h3FontWeight: typography
|
|
61
|
-
h3FontFamily: typography
|
|
62
|
-
h4FontSize: typography
|
|
63
|
-
h4FontWeight: typography
|
|
64
|
-
h4FontFamily: typography
|
|
65
|
-
h5FontSize: typography
|
|
66
|
-
h5FontWeight: typography
|
|
67
|
-
h5FontFamily: typography
|
|
68
|
-
primaryInverseColor: colors
|
|
69
|
-
primaryColor: colors
|
|
70
|
-
secondaryColor: colors
|
|
71
|
-
secondaryInverseColor: colors
|
|
72
|
-
borderPadding: spacing
|
|
73
|
-
borderColor: colors
|
|
74
|
-
borderWidth: borders
|
|
75
|
-
borderStyle: borders
|
|
52
|
+
lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightFit,
|
|
53
|
+
h1FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXXLarge,
|
|
54
|
+
h1FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightLight,
|
|
55
|
+
h1FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
56
|
+
h2FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXLarge,
|
|
57
|
+
h2FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
|
|
58
|
+
h2FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
59
|
+
h3FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
|
|
60
|
+
h3FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
61
|
+
h3FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
62
|
+
h4FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
|
|
63
|
+
h4FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
64
|
+
h4FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
65
|
+
h5FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
|
|
66
|
+
h5FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
|
|
67
|
+
h5FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
68
|
+
primaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
69
|
+
primaryColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
|
|
70
|
+
secondaryColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
|
|
71
|
+
secondaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLight,
|
|
72
|
+
borderPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
|
|
73
|
+
borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
|
|
74
|
+
borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
|
|
75
|
+
borderStyle: borders === null || borders === void 0 ? void 0 : borders.style
|
|
76
76
|
};
|
|
77
77
|
return { ...componentVariables,
|
|
78
78
|
...themeSpecificStyle[themeName]
|
package/lib/Heading/index.js
CHANGED
|
@@ -53,23 +53,29 @@ let Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
componentDidMount() {
|
|
56
|
-
|
|
56
|
+
var _this$props$makeStyle, _this$props;
|
|
57
|
+
|
|
58
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
componentDidUpdate() {
|
|
60
|
-
|
|
62
|
+
var _this$props$makeStyle2, _this$props2;
|
|
63
|
+
|
|
64
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
render() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
var _this$props$styles;
|
|
69
|
+
|
|
70
|
+
const _this$props3 = this.props,
|
|
71
|
+
border = _this$props3.border,
|
|
72
|
+
children = _this$props3.children,
|
|
73
|
+
color = _this$props3.color,
|
|
74
|
+
level = _this$props3.level,
|
|
75
|
+
margin = _this$props3.margin,
|
|
76
|
+
elementRef = _this$props3.elementRef,
|
|
77
|
+
makeStyles = _this$props3.makeStyles,
|
|
78
|
+
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
73
79
|
const ElementType = (0, _getElementType.getElementType)(Heading, this.props, () => {
|
|
74
80
|
if (level === 'reset') {
|
|
75
81
|
return 'span';
|
|
@@ -78,7 +84,7 @@ let Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
78
84
|
}
|
|
79
85
|
});
|
|
80
86
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
81
|
-
css: this.props.styles
|
|
87
|
+
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.heading,
|
|
82
88
|
as: ElementType,
|
|
83
89
|
elementRef: this.handleRef,
|
|
84
90
|
margin: margin
|
package/lib/Heading/theme.js
CHANGED
|
@@ -45,41 +45,41 @@ const generateComponentTheme = theme => {
|
|
|
45
45
|
primaryColor: theme['ic-brand-font-color-dark']
|
|
46
46
|
},
|
|
47
47
|
instructure: {
|
|
48
|
-
h1FontFamily: typography
|
|
49
|
-
h2FontFamily: typography
|
|
50
|
-
h3FontWeight: typography
|
|
48
|
+
h1FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamilyHeading,
|
|
49
|
+
h2FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamilyHeading,
|
|
50
|
+
h3FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
51
51
|
h3FontSize: '2.125rem',
|
|
52
|
-
h4FontWeight: typography
|
|
53
|
-
h4FontSize: typography
|
|
54
|
-
h5FontWeight: typography
|
|
55
|
-
h5FontSize: typography
|
|
52
|
+
h4FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
53
|
+
h4FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
|
|
54
|
+
h5FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
55
|
+
h5FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
const componentVariables = {
|
|
59
|
-
lineHeight: typography
|
|
60
|
-
h1FontSize: typography
|
|
61
|
-
h1FontWeight: typography
|
|
62
|
-
h1FontFamily: typography
|
|
63
|
-
h2FontSize: typography
|
|
64
|
-
h2FontWeight: typography
|
|
65
|
-
h2FontFamily: typography
|
|
66
|
-
h3FontSize: typography
|
|
67
|
-
h3FontWeight: typography
|
|
68
|
-
h3FontFamily: typography
|
|
69
|
-
h4FontSize: typography
|
|
70
|
-
h4FontWeight: typography
|
|
71
|
-
h4FontFamily: typography
|
|
72
|
-
h5FontSize: typography
|
|
73
|
-
h5FontWeight: typography
|
|
74
|
-
h5FontFamily: typography
|
|
75
|
-
primaryInverseColor: colors
|
|
76
|
-
primaryColor: colors
|
|
77
|
-
secondaryColor: colors
|
|
78
|
-
secondaryInverseColor: colors
|
|
79
|
-
borderPadding: spacing
|
|
80
|
-
borderColor: colors
|
|
81
|
-
borderWidth: borders
|
|
82
|
-
borderStyle: borders
|
|
59
|
+
lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightFit,
|
|
60
|
+
h1FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXXLarge,
|
|
61
|
+
h1FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightLight,
|
|
62
|
+
h1FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
63
|
+
h2FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXLarge,
|
|
64
|
+
h2FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
|
|
65
|
+
h2FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
66
|
+
h3FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
|
|
67
|
+
h3FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
68
|
+
h3FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
69
|
+
h4FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
|
|
70
|
+
h4FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
71
|
+
h4FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
72
|
+
h5FontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
|
|
73
|
+
h5FontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
|
|
74
|
+
h5FontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
75
|
+
primaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
76
|
+
primaryColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
|
|
77
|
+
secondaryColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
|
|
78
|
+
secondaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLight,
|
|
79
|
+
borderPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
|
|
80
|
+
borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
|
|
81
|
+
borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
|
|
82
|
+
borderStyle: borders === null || borders === void 0 ? void 0 : borders.style
|
|
83
83
|
};
|
|
84
84
|
return { ...componentVariables,
|
|
85
85
|
...themeSpecificStyle[themeName]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-heading",
|
|
3
|
-
"version": "8.18.
|
|
3
|
+
"version": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
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.13.10",
|
|
27
|
-
"@instructure/console": "8.18.
|
|
28
|
-
"@instructure/emotion": "8.18.
|
|
29
|
-
"@instructure/shared-types": "8.18.
|
|
30
|
-
"@instructure/ui-prop-types": "8.18.
|
|
31
|
-
"@instructure/ui-react-utils": "8.18.
|
|
32
|
-
"@instructure/ui-testable": "8.18.
|
|
33
|
-
"@instructure/ui-view": "8.18.
|
|
27
|
+
"@instructure/console": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
28
|
+
"@instructure/emotion": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
29
|
+
"@instructure/shared-types": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
30
|
+
"@instructure/ui-prop-types": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
31
|
+
"@instructure/ui-react-utils": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
32
|
+
"@instructure/ui-testable": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
33
|
+
"@instructure/ui-view": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
34
34
|
"prop-types": "^15"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-babel-preset": "8.18.
|
|
38
|
-
"@instructure/ui-test-locator": "8.18.
|
|
39
|
-
"@instructure/ui-test-utils": "8.18.
|
|
40
|
-
"@instructure/ui-themes": "8.18.
|
|
37
|
+
"@instructure/ui-babel-preset": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
38
|
+
"@instructure/ui-test-locator": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
39
|
+
"@instructure/ui-test-utils": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
40
|
+
"@instructure/ui-themes": "8.18.1-snapshot.2+ca4c1ff9d"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=16.8 <=17"
|
|
@@ -45,5 +45,6 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"sideEffects": false
|
|
48
|
+
"sideEffects": false,
|
|
49
|
+
"gitHead": "ca4c1ff9d3985151ae0758fb596de41652dbb58b"
|
|
49
50
|
}
|