@instructure/emotion 8.12.1-snapshot.44 → 8.12.1-snapshot.50
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/EmotionThemeProvider/index.js +7 -5
- package/es/InstUISettingsProvider/index.js +5 -5
- package/lib/EmotionThemeProvider/index.js +7 -5
- package/lib/InstUISettingsProvider/index.js +5 -5
- package/lib/index.js +10 -10
- package/lib/styleUtils/ThemeablePropTypes.js +1 -1
- package/lib/styleUtils/ThemeablePropValues.js +1 -1
- package/lib/styleUtils/getShorthandPropValue.js +1 -1
- package/lib/styleUtils/index.js +8 -8
- package/lib/styleUtils/makeThemeVars.js +1 -1
- package/lib/styleUtils/mirrorShorthand.js +1 -1
- package/lib/styleUtils/mirrorShorthandCorners.js +1 -1
- package/lib/styleUtils/mirrorShorthandEdges.js +1 -1
- package/package.json +10 -10
|
@@ -74,10 +74,10 @@ const baseThemeProps = ['borders', 'breakpoints', 'colors', 'forms', 'media', 's
|
|
|
74
74
|
* @module EmotionThemeProvider
|
|
75
75
|
*/
|
|
76
76
|
|
|
77
|
-
function EmotionThemeProvider({
|
|
78
|
-
children,
|
|
79
|
-
|
|
80
|
-
}
|
|
77
|
+
function EmotionThemeProvider(_ref) {
|
|
78
|
+
let children = _ref.children,
|
|
79
|
+
_ref$theme = _ref.theme,
|
|
80
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
81
81
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
82
82
|
theme: getTheme(theme)
|
|
83
83
|
}, children);
|
|
@@ -99,9 +99,11 @@ EmotionThemeProvider.defaultProps = {
|
|
|
99
99
|
* @module getTheme
|
|
100
100
|
*/
|
|
101
101
|
|
|
102
|
-
const getTheme = themeOrOverride => (
|
|
102
|
+
const getTheme = themeOrOverride => function () {
|
|
103
103
|
var _themeOrOverride, _themeOrOverride$them;
|
|
104
104
|
|
|
105
|
+
let ancestorTheme = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
106
|
+
|
|
105
107
|
try {
|
|
106
108
|
// If a valid InstUI theme is given, it just returns the theme.
|
|
107
109
|
if (isBaseTheme(themeOrOverride)) {
|
|
@@ -90,11 +90,11 @@ import { getTheme } from '../EmotionThemeProvider';
|
|
|
90
90
|
* @param {InstUISettingsProviderSettings} settings - A settings object
|
|
91
91
|
* @returns {ReactElement} The settings provider
|
|
92
92
|
*/
|
|
93
|
-
function InstUISettingsProvider({
|
|
94
|
-
children,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
function InstUISettingsProvider(_ref) {
|
|
94
|
+
let children = _ref.children,
|
|
95
|
+
_ref$theme = _ref.theme,
|
|
96
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme,
|
|
97
|
+
dir = _ref.dir;
|
|
98
98
|
const finalDir = dir || useContext(TextDirectionContext);
|
|
99
99
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
100
100
|
theme: getTheme(theme)
|
|
@@ -88,10 +88,10 @@ const baseThemeProps = ['borders', 'breakpoints', 'colors', 'forms', 'media', 's
|
|
|
88
88
|
* @module EmotionThemeProvider
|
|
89
89
|
*/
|
|
90
90
|
|
|
91
|
-
function EmotionThemeProvider({
|
|
92
|
-
children,
|
|
93
|
-
|
|
94
|
-
}
|
|
91
|
+
function EmotionThemeProvider(_ref) {
|
|
92
|
+
let children = _ref.children,
|
|
93
|
+
_ref$theme = _ref.theme,
|
|
94
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
95
95
|
return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
|
|
96
96
|
theme: getTheme(theme)
|
|
97
97
|
}, children);
|
|
@@ -113,9 +113,11 @@ EmotionThemeProvider.defaultProps = {
|
|
|
113
113
|
* @module getTheme
|
|
114
114
|
*/
|
|
115
115
|
|
|
116
|
-
const getTheme = themeOrOverride => (
|
|
116
|
+
const getTheme = themeOrOverride => function () {
|
|
117
117
|
var _themeOrOverride, _themeOrOverride$them;
|
|
118
118
|
|
|
119
|
+
let ancestorTheme = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
120
|
+
|
|
119
121
|
try {
|
|
120
122
|
// If a valid InstUI theme is given, it just returns the theme.
|
|
121
123
|
if (isBaseTheme(themeOrOverride)) {
|
|
@@ -104,11 +104,11 @@ var _EmotionThemeProvider = require("../EmotionThemeProvider");
|
|
|
104
104
|
* @param {InstUISettingsProviderSettings} settings - A settings object
|
|
105
105
|
* @returns {ReactElement} The settings provider
|
|
106
106
|
*/
|
|
107
|
-
function InstUISettingsProvider({
|
|
108
|
-
children,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
function InstUISettingsProvider(_ref) {
|
|
108
|
+
let children = _ref.children,
|
|
109
|
+
_ref$theme = _ref.theme,
|
|
110
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme,
|
|
111
|
+
dir = _ref.dir;
|
|
112
112
|
const finalDir = dir || (0, _react.useContext)(_TextDirectionContext.TextDirectionContext);
|
|
113
113
|
return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
|
|
114
114
|
theme: (0, _EmotionThemeProvider.getTheme)(theme)
|
package/lib/index.js
CHANGED
|
@@ -26,10 +26,10 @@ Object.defineProperty(exports, "InstUISettingsProvider", {
|
|
|
26
26
|
return _InstUISettingsProvider.InstUISettingsProvider;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
Object.defineProperty(exports, "
|
|
29
|
+
Object.defineProperty(exports, "ThemeablePropTypes", {
|
|
30
30
|
enumerable: true,
|
|
31
31
|
get: function () {
|
|
32
|
-
return
|
|
32
|
+
return _styleUtils.ThemeablePropTypes;
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "ThemeablePropValues", {
|
|
@@ -38,10 +38,10 @@ Object.defineProperty(exports, "ThemeablePropValues", {
|
|
|
38
38
|
return _styleUtils.ThemeablePropValues;
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
Object.defineProperty(exports, "
|
|
41
|
+
Object.defineProperty(exports, "getShorthandPropValue", {
|
|
42
42
|
enumerable: true,
|
|
43
43
|
get: function () {
|
|
44
|
-
return _styleUtils.
|
|
44
|
+
return _styleUtils.getShorthandPropValue;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "makeThemeVars", {
|
|
@@ -50,12 +50,6 @@ Object.defineProperty(exports, "makeThemeVars", {
|
|
|
50
50
|
return _styleUtils.makeThemeVars;
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
Object.defineProperty(exports, "getShorthandPropValue", {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
get: function () {
|
|
56
|
-
return _styleUtils.getShorthandPropValue;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
53
|
Object.defineProperty(exports, "mirrorShorthandCorners", {
|
|
60
54
|
enumerable: true,
|
|
61
55
|
get: function () {
|
|
@@ -68,6 +62,12 @@ Object.defineProperty(exports, "mirrorShorthandEdges", {
|
|
|
68
62
|
return _styleUtils.mirrorShorthandEdges;
|
|
69
63
|
}
|
|
70
64
|
});
|
|
65
|
+
Object.defineProperty(exports, "withStyle", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _withStyle.withStyle;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
71
|
|
|
72
72
|
var _react = require("@emotion/react");
|
|
73
73
|
|
|
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.default = exports.ThemeablePropTypes = void 0;
|
|
8
9
|
exports.shorthandPropType = shorthandPropType;
|
|
9
|
-
exports.ThemeablePropTypes = exports.default = void 0;
|
|
10
10
|
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getShorthandPropValue = getShorthandPropValue;
|
|
7
6
|
exports.default = void 0;
|
|
7
|
+
exports.getShorthandPropValue = getShorthandPropValue;
|
|
8
8
|
|
|
9
9
|
var _isEmpty = require("@instructure/ui-utils/lib/isEmpty.js");
|
|
10
10
|
|
package/lib/styleUtils/index.js
CHANGED
|
@@ -3,22 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "ThemeablePropValues", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _ThemeablePropValues.ThemeablePropValues;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "ThemeablePropTypes", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function () {
|
|
15
9
|
return _ThemeablePropTypes.ThemeablePropTypes;
|
|
16
10
|
}
|
|
17
11
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "ThemeablePropValues", {
|
|
19
13
|
enumerable: true,
|
|
20
14
|
get: function () {
|
|
21
|
-
return
|
|
15
|
+
return _ThemeablePropValues.ThemeablePropValues;
|
|
22
16
|
}
|
|
23
17
|
});
|
|
24
18
|
Object.defineProperty(exports, "getShorthandPropValue", {
|
|
@@ -27,6 +21,12 @@ Object.defineProperty(exports, "getShorthandPropValue", {
|
|
|
27
21
|
return _getShorthandPropValue.getShorthandPropValue;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "makeThemeVars", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _makeThemeVars.makeThemeVars;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
30
|
Object.defineProperty(exports, "mirrorShorthandCorners", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function () {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.mirrorShorthandEdges = mirrorShorthandEdges;
|
|
7
6
|
exports.mirrorShorthandCorners = mirrorShorthandCorners;
|
|
7
|
+
exports.mirrorShorthandEdges = mirrorShorthandEdges;
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
* The MIT License (MIT)
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.default = void 0;
|
|
6
7
|
Object.defineProperty(exports, "mirrorShorthandCorners", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function () {
|
|
9
10
|
return _mirrorShorthand.mirrorShorthandCorners;
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
|
-
exports.default = void 0;
|
|
13
13
|
|
|
14
14
|
var _mirrorShorthand = require("./mirrorShorthand");
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.default = void 0;
|
|
6
7
|
Object.defineProperty(exports, "mirrorShorthandEdges", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function () {
|
|
9
10
|
return _mirrorShorthand.mirrorShorthandEdges;
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
|
-
exports.default = void 0;
|
|
13
13
|
|
|
14
14
|
var _mirrorShorthand = require("./mirrorShorthand");
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/emotion",
|
|
3
|
-
"version": "8.12.1-snapshot.
|
|
3
|
+
"version": "8.12.1-snapshot.50+3786369ec",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
28
|
"@emotion/react": "^11.4.1",
|
|
29
|
-
"@instructure/console": "8.12.1-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.12.1-snapshot.
|
|
31
|
-
"@instructure/ui-decorator": "8.12.1-snapshot.
|
|
32
|
-
"@instructure/ui-i18n": "8.12.1-snapshot.
|
|
33
|
-
"@instructure/ui-themes": "8.12.1-snapshot.
|
|
34
|
-
"@instructure/ui-utils": "8.12.1-snapshot.
|
|
29
|
+
"@instructure/console": "8.12.1-snapshot.50+3786369ec",
|
|
30
|
+
"@instructure/shared-types": "8.12.1-snapshot.50+3786369ec",
|
|
31
|
+
"@instructure/ui-decorator": "8.12.1-snapshot.50+3786369ec",
|
|
32
|
+
"@instructure/ui-i18n": "8.12.1-snapshot.50+3786369ec",
|
|
33
|
+
"@instructure/ui-themes": "8.12.1-snapshot.50+3786369ec",
|
|
34
|
+
"@instructure/ui-utils": "8.12.1-snapshot.50+3786369ec",
|
|
35
35
|
"emotion-theming": "^10.0.27",
|
|
36
36
|
"hoist-non-react-statics": "^3.3.2",
|
|
37
37
|
"lodash": "^4",
|
|
38
38
|
"prop-types": "^15"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@instructure/ui-babel-preset": "8.12.1-snapshot.
|
|
42
|
-
"@instructure/ui-test-utils": "8.12.1-snapshot.
|
|
41
|
+
"@instructure/ui-babel-preset": "8.12.1-snapshot.50+3786369ec",
|
|
42
|
+
"@instructure/ui-test-utils": "8.12.1-snapshot.50+3786369ec",
|
|
43
43
|
"@types/lodash": "^4.14.171",
|
|
44
44
|
"cpy-cli": "^3.1.1"
|
|
45
45
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "3786369ec892bc0f716844828cc2729447adb8be"
|
|
54
54
|
}
|