@elliemae/ds-system 2.2.0-alpha.4 → 3.0.0-next.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/cjs/arithmetic.js +30 -42
- package/cjs/constants.js +15 -43
- package/cjs/globalStyles.js +22 -44
- package/cjs/index.js +83 -42
- package/cjs/mobileUtilities.js +26 -57
- package/cjs/spaceUtilities.js +46 -72
- package/cjs/styled/index.d.js +2 -27
- package/cjs/styled/index.js +93 -57
- package/cjs/styled/styleGetters.js +30 -42
- package/cjs/styled/types.js +11 -34
- package/cjs/styled/utils.js +23 -46
- package/cjs/th.js +29 -49
- package/cjs/theme.js +9 -36
- package/cjs/themeProviderHOC.js +29 -42
- package/cjs/utils.js +146 -256
- package/esm/arithmetic.js +25 -13
- package/esm/constants.js +9 -14
- package/esm/globalStyles.js +15 -16
- package/esm/index.js +11 -14
- package/esm/mobileUtilities.js +17 -26
- package/esm/spaceUtilities.js +35 -43
- package/esm/styled/index.d.js +1 -2
- package/esm/styled/index.js +79 -23
- package/esm/styled/styleGetters.js +23 -12
- package/esm/styled/types.js +1 -6
- package/esm/styled/utils.js +16 -16
- package/esm/th.js +25 -20
- package/esm/theme.js +4 -6
- package/esm/themeProviderHOC.js +20 -13
- package/esm/utils.js +98 -227
- package/package.json +5 -5
- package/types/styled/types.d.ts +2 -1
- package/types/utils.d.ts +2 -1
- package/cjs/arithmetic.js.map +0 -7
- package/cjs/constants.js.map +0 -7
- package/cjs/globalStyles.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/mobileUtilities.js.map +0 -7
- package/cjs/spaceUtilities.js.map +0 -7
- package/cjs/styled/index.d.js.map +0 -7
- package/cjs/styled/index.js.map +0 -7
- package/cjs/styled/styleGetters.js.map +0 -7
- package/cjs/styled/types.js.map +0 -7
- package/cjs/styled/utils.js.map +0 -7
- package/cjs/th.js.map +0 -7
- package/cjs/theme.js.map +0 -7
- package/cjs/themeProviderHOC.js.map +0 -7
- package/cjs/utils.js.map +0 -7
- package/esm/arithmetic.js.map +0 -7
- package/esm/constants.js.map +0 -7
- package/esm/globalStyles.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/mobileUtilities.js.map +0 -7
- package/esm/spaceUtilities.js.map +0 -7
- package/esm/styled/index.d.js.map +0 -7
- package/esm/styled/index.js.map +0 -7
- package/esm/styled/styleGetters.js.map +0 -7
- package/esm/styled/types.js.map +0 -7
- package/esm/styled/utils.js.map +0 -7
- package/esm/th.js.map +0 -7
- package/esm/theme.js.map +0 -7
- package/esm/themeProviderHOC.js.map +0 -7
- package/esm/utils.js.map +0 -7
package/esm/spaceUtilities.js
CHANGED
|
@@ -1,65 +1,57 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.some.js';
|
|
6
|
+
import { get } from 'lodash';
|
|
7
|
+
import { theme } from './theme.js';
|
|
8
|
+
|
|
4
9
|
function mapGap(gutter) {
|
|
5
|
-
if (!gutter)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return gutter;
|
|
9
|
-
return `${theme.space[gutter]}`;
|
|
10
|
+
if (!gutter) return '0rem';
|
|
11
|
+
if (String(gutter).includes('rem') || String(gutter).includes('px')) return gutter;
|
|
12
|
+
return "".concat(theme.space[gutter]);
|
|
10
13
|
}
|
|
11
14
|
function mapGutter(gutter) {
|
|
12
|
-
if (!gutter)
|
|
13
|
-
|
|
14
|
-
return `${theme.space[gutter]} * 2`;
|
|
15
|
+
if (!gutter) return '0rem';
|
|
16
|
+
return "".concat(theme.space[gutter], " * 2");
|
|
15
17
|
}
|
|
16
18
|
function mapSpace(width) {
|
|
17
|
-
if (typeof width ===
|
|
18
|
-
|
|
19
|
-
return `${width * 100}%`;
|
|
19
|
+
if (typeof width === 'string') return get(theme, width) ? "".concat(get(theme, width)) : width;
|
|
20
|
+
return "".concat(width * 100, "%");
|
|
20
21
|
}
|
|
21
22
|
function fixSpaceGutter(width, gutter) {
|
|
22
|
-
if (!width)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return width.map((w) => `calc(${mapSpace(w)} - (${mapGutter(gutter)}))`);
|
|
26
|
-
return `calc(${mapSpace(width)} - (${mapGutter(gutter)}))`;
|
|
23
|
+
if (!width) return '';
|
|
24
|
+
if (Array.isArray(width)) return width.map(w => "calc(".concat(mapSpace(w), " - (").concat(mapGutter(gutter), "))"));
|
|
25
|
+
return "calc(".concat(mapSpace(width), " - (").concat(mapGutter(gutter), "))");
|
|
27
26
|
}
|
|
28
27
|
function fixSpace(width) {
|
|
29
|
-
if (!width)
|
|
30
|
-
|
|
31
|
-
if (Array.isArray(width))
|
|
32
|
-
return width.map((w) => mapSpace(w));
|
|
28
|
+
if (!width) return '';
|
|
29
|
+
if (Array.isArray(width)) return width.map(w => mapSpace(w));
|
|
33
30
|
return mapSpace(width);
|
|
34
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Grid
|
|
34
|
+
*
|
|
35
|
+
* @param grid
|
|
36
|
+
*/
|
|
37
|
+
|
|
35
38
|
function numbersToFr(grid) {
|
|
36
|
-
const den = grid.map(
|
|
37
|
-
return den.map(
|
|
39
|
+
const den = grid.map(f => f < 1 ? Math.floor(1 / f) : f);
|
|
40
|
+
return den.map(d => "".concat(d, "fr"));
|
|
38
41
|
}
|
|
39
42
|
function mapGrid(width) {
|
|
40
|
-
if (get(theme, width))
|
|
41
|
-
|
|
42
|
-
if (typeof width === "string")
|
|
43
|
-
return width;
|
|
43
|
+
if (get(theme, width)) return "".concat(get(theme, width));
|
|
44
|
+
if (typeof width === 'string') return width;
|
|
44
45
|
const den = width < 1 ? Math.floor(1 / width) : width;
|
|
45
|
-
return
|
|
46
|
+
return "".concat(den, "fr");
|
|
46
47
|
}
|
|
47
48
|
function mapTemplateGrid(grid) {
|
|
48
49
|
if (Array.isArray(grid)) {
|
|
49
|
-
if (grid.some(
|
|
50
|
-
return grid.map((w) => mapGrid(w));
|
|
50
|
+
if (grid.some(w => typeof w === 'string')) return grid.map(w => mapGrid(w));
|
|
51
51
|
return numbersToFr(grid);
|
|
52
52
|
}
|
|
53
|
+
|
|
53
54
|
return mapGrid(grid);
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
fixSpaceGutter,
|
|
58
|
-
mapGap,
|
|
59
|
-
mapGrid,
|
|
60
|
-
mapGutter,
|
|
61
|
-
mapSpace,
|
|
62
|
-
mapTemplateGrid,
|
|
63
|
-
numbersToFr
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=spaceUtilities.js.map
|
|
56
|
+
|
|
57
|
+
export { fixSpace, fixSpaceGutter, mapGap, mapGrid, mapGutter, mapSpace, mapTemplateGrid, numbersToFr };
|
package/esm/styled/index.d.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.d.js.map
|
|
1
|
+
|
package/esm/styled/index.js
CHANGED
|
@@ -1,60 +1,116 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
11
|
+
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
12
|
+
import styled_component from 'styled-components';
|
|
13
|
+
import { getStyleOverrides, variantsResolver, getVariantStyles } from './styleGetters.js';
|
|
14
|
+
import { coerceWithDefaultTheme } from './utils.js';
|
|
15
|
+
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
+
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
|
|
20
|
+
const styledFunction = function (tag) {
|
|
21
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
22
|
+
name: null,
|
|
23
|
+
slot: null
|
|
24
|
+
};
|
|
25
|
+
const {
|
|
26
|
+
name: componentName,
|
|
27
|
+
slot: componentSlot,
|
|
28
|
+
displayName: componentDisplayName = null
|
|
29
|
+
} = options;
|
|
30
|
+
|
|
31
|
+
const func = function (styleArg) {
|
|
32
|
+
for (var _len = arguments.length, expressions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
33
|
+
expressions[_key - 1] = arguments[_key];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* These are the internal expression written in dimsum
|
|
38
|
+
* We just coerce with the default theme in case users
|
|
39
|
+
* forget to add the ThemeProvider
|
|
40
|
+
*/
|
|
41
|
+
const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => typeof stylesArg === 'function' ? props => stylesArg(_objectSpread(_objectSpread({}, props), {}, {
|
|
10
42
|
theme: coerceWithDefaultTheme(props.theme)
|
|
11
|
-
}) : stylesArg) : [];
|
|
43
|
+
})) : stylesArg) : [];
|
|
12
44
|
let transformedStyleArg = styleArg;
|
|
45
|
+
/*
|
|
46
|
+
* Here we get the style overrides from the user
|
|
47
|
+
*/
|
|
48
|
+
|
|
13
49
|
if (componentName && componentSlot) {
|
|
14
|
-
expressionsWithDefaultTheme.push(
|
|
50
|
+
expressionsWithDefaultTheme.push(props => {
|
|
15
51
|
const theme = coerceWithDefaultTheme(props.theme);
|
|
16
52
|
const styleOverrides = getStyleOverrides(componentName, theme);
|
|
53
|
+
|
|
17
54
|
if (styleOverrides) {
|
|
18
55
|
return [styleOverrides[componentSlot]];
|
|
19
56
|
}
|
|
57
|
+
|
|
20
58
|
return null;
|
|
21
59
|
});
|
|
22
60
|
}
|
|
23
|
-
|
|
24
|
-
|
|
61
|
+
/*
|
|
62
|
+
* Here we get the variant overrides from the user (only for the root)
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if (componentName && componentSlot === 'root') {
|
|
67
|
+
expressionsWithDefaultTheme.push(props => {
|
|
25
68
|
const theme = coerceWithDefaultTheme(props.theme);
|
|
26
69
|
return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
27
70
|
});
|
|
28
71
|
}
|
|
72
|
+
|
|
29
73
|
const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
|
|
74
|
+
|
|
30
75
|
if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {
|
|
31
|
-
|
|
76
|
+
// Here we are adding placeholders for all the new functions that we are gonna call
|
|
77
|
+
const placeholders = new Array(numOfCustomFnsApplied).fill('');
|
|
32
78
|
transformedStyleArg = Object.assign([...styleArg, ...placeholders], {
|
|
33
79
|
raw: [...styleArg.raw, ...placeholders]
|
|
34
80
|
});
|
|
35
|
-
} else if (typeof styleArg ===
|
|
36
|
-
|
|
81
|
+
} else if (typeof styleArg === 'function') {
|
|
82
|
+
// Here we just coerce with the default theme
|
|
83
|
+
transformedStyleArg = props => styleArg(_objectSpread(_objectSpread({}, props), {}, {
|
|
84
|
+
theme: coerceWithDefaultTheme(props.theme)
|
|
85
|
+
}));
|
|
37
86
|
}
|
|
38
|
-
|
|
39
|
-
|
|
87
|
+
|
|
88
|
+
let Component = /*#__PURE__*/styled_component(tag);
|
|
89
|
+
const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName, "-").concat(componentSlot) : componentDisplayName;
|
|
90
|
+
|
|
40
91
|
if (displayName !== null) {
|
|
41
|
-
Component = Component.attrs({
|
|
92
|
+
Component = Component.attrs({
|
|
93
|
+
className: "".concat(componentName, "-").concat(componentSlot)
|
|
94
|
+
});
|
|
42
95
|
}
|
|
96
|
+
|
|
43
97
|
Component = Component(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
98
|
+
|
|
44
99
|
if (displayName !== null) {
|
|
45
100
|
Component.displayName = displayName;
|
|
46
101
|
}
|
|
102
|
+
|
|
47
103
|
return Component;
|
|
48
104
|
};
|
|
105
|
+
|
|
49
106
|
return func;
|
|
50
107
|
};
|
|
108
|
+
|
|
51
109
|
const styledObject = Object.keys(styled_component).reduce((obj, key) => {
|
|
52
110
|
const castedKey = key;
|
|
53
111
|
obj[castedKey] = styledFunction(castedKey);
|
|
54
112
|
return obj;
|
|
55
113
|
}, {});
|
|
56
114
|
const styled = Object.assign(styledFunction, styledObject);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=index.js.map
|
|
115
|
+
|
|
116
|
+
export { styled };
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.every.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.every.js';
|
|
6
|
+
import { propsToClassKey } from './utils.js';
|
|
7
|
+
|
|
8
|
+
const getStyleOverrides = (name, theme) => {
|
|
9
|
+
var _theme$components, _theme$components$nam;
|
|
10
|
+
|
|
11
|
+
return ((_theme$components = theme.components) === null || _theme$components === void 0 ? void 0 : (_theme$components$nam = _theme$components[name]) === null || _theme$components$nam === void 0 ? void 0 : _theme$components$nam.styleOverrides) || null;
|
|
12
|
+
};
|
|
4
13
|
const getVariantStyles = (name, theme) => {
|
|
5
|
-
|
|
14
|
+
var _theme$components2, _theme$components2$na;
|
|
15
|
+
|
|
16
|
+
const variants = ((_theme$components2 = theme.components) === null || _theme$components2 === void 0 ? void 0 : (_theme$components2$na = _theme$components2[name]) === null || _theme$components2$na === void 0 ? void 0 : _theme$components2$na.variants) || [];
|
|
6
17
|
return variants.reduce((styles, definition) => {
|
|
7
18
|
const key = propsToClassKey(definition.props);
|
|
8
19
|
styles[key] = definition.style;
|
|
@@ -10,18 +21,18 @@ const getVariantStyles = (name, theme) => {
|
|
|
10
21
|
}, {});
|
|
11
22
|
};
|
|
12
23
|
const variantsResolver = (props, styles, theme, name) => {
|
|
13
|
-
|
|
24
|
+
var _theme$components3, _theme$components3$na;
|
|
25
|
+
|
|
26
|
+
const themeVariants = (theme === null || theme === void 0 ? void 0 : (_theme$components3 = theme.components) === null || _theme$components3 === void 0 ? void 0 : (_theme$components3$na = _theme$components3[name]) === null || _theme$components3$na === void 0 ? void 0 : _theme$components3$na.variants) || [];
|
|
14
27
|
return themeVariants.reduce((variantsStyles, themeVariant) => {
|
|
15
|
-
const isMatch = Object.keys(themeVariant.props).every(
|
|
28
|
+
const isMatch = Object.keys(themeVariant.props).every(key => props[key] === themeVariant.props[key]);
|
|
29
|
+
|
|
16
30
|
if (isMatch) {
|
|
17
31
|
variantsStyles.push(styles[propsToClassKey(themeVariant.props)]);
|
|
18
32
|
}
|
|
33
|
+
|
|
19
34
|
return variantsStyles;
|
|
20
35
|
}, []);
|
|
21
36
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
getVariantStyles,
|
|
25
|
-
variantsResolver
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=styleGetters.js.map
|
|
37
|
+
|
|
38
|
+
export { getStyleOverrides, getVariantStyles, variantsResolver };
|
package/esm/styled/types.js
CHANGED
package/esm/styled/utils.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
4
|
+
import { capitalize } from '@elliemae/ds-utilities';
|
|
5
|
+
import { theme } from '../theme.js';
|
|
6
|
+
|
|
7
|
+
const systemTheme = theme;
|
|
8
|
+
const isEmpty = string => string.length === 0;
|
|
9
|
+
const coerceWithDefaultTheme = themeInput => themeInput !== null && themeInput !== void 0 ? themeInput : systemTheme;
|
|
10
|
+
const propsToClassKey = props => Object.keys(props).sort().reduce((classKey, key) => {
|
|
11
|
+
if (key === 'color') {
|
|
9
12
|
return classKey + isEmpty(String(classKey)) ? String(props[key]) : capitalize(String(props[key]));
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
propsToClassKey
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=utils.js.map
|
|
14
|
+
|
|
15
|
+
return "".concat(classKey).concat(isEmpty(String(classKey)) ? key : capitalize(key)).concat(capitalize(props[key].toString()));
|
|
16
|
+
}, '');
|
|
17
|
+
|
|
18
|
+
export { coerceWithDefaultTheme, isEmpty, propsToClassKey };
|
package/esm/th.js
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
|
+
|
|
5
|
+
const th = property => (value, dfault) => _ref => {
|
|
6
|
+
var _result;
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
|
+
const parts = value.split('-');
|
|
4
12
|
let result = theme[property];
|
|
5
|
-
parts.forEach(
|
|
6
|
-
if (result)
|
|
7
|
-
result = result[part];
|
|
13
|
+
parts.forEach(part => {
|
|
14
|
+
if (result) result = result[part];
|
|
8
15
|
});
|
|
9
|
-
return result
|
|
16
|
+
return (_result = result) !== null && _result !== void 0 ? _result : dfault;
|
|
10
17
|
};
|
|
11
|
-
th.space = th(
|
|
12
|
-
th.fontSize = th(
|
|
13
|
-
th.fontWeight = th(
|
|
14
|
-
th.lineHeight = th(
|
|
15
|
-
th.letterSpacing = th(
|
|
16
|
-
th.font = th(
|
|
17
|
-
th.color = th(
|
|
18
|
-
th.breakpoint = th(
|
|
19
|
-
th.media = th(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=th.js.map
|
|
18
|
+
th.space = th('space');
|
|
19
|
+
th.fontSize = th('fontSizes');
|
|
20
|
+
th.fontWeight = th('fontWeights');
|
|
21
|
+
th.lineHeight = th('lineHeights');
|
|
22
|
+
th.letterSpacing = th('letterSpacings');
|
|
23
|
+
th.font = th('fonts');
|
|
24
|
+
th.color = th('colors');
|
|
25
|
+
th.breakpoint = th('breakpoints');
|
|
26
|
+
th.media = th('media');
|
|
27
|
+
|
|
28
|
+
export { th };
|
package/esm/theme.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { getDefaultTheme } from '@elliemae/pui-theme';
|
|
2
|
+
|
|
3
3
|
const theme = getDefaultTheme();
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=theme.js.map
|
|
4
|
+
|
|
5
|
+
export { theme };
|
package/esm/themeProviderHOC.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx2 from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'react';
|
|
9
|
+
import { ThemeProvider } from 'styled-components';
|
|
10
|
+
import { theme } from './theme.js';
|
|
11
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
|
+
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
const themeProviderHOC = Component => props => /*#__PURE__*/_jsx2(ThemeProvider, {
|
|
17
|
+
theme: theme
|
|
18
|
+
}, void 0, /*#__PURE__*/jsx(Component, _objectSpread({}, props)));
|
|
19
|
+
|
|
20
|
+
export { themeProviderHOC };
|