@elliemae/ds-system 2.2.0-next.6 → 2.2.0-rc.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/cjs/styled/index.js +3 -4
- package/cjs/th.js +11 -14
- package/esm/styled/index.js +3 -4
- package/esm/th.js +11 -14
- package/package.json +2 -2
- package/types/styled/types.d.ts +1 -2
- package/types/th.d.ts +12 -12
package/cjs/styled/index.js
CHANGED
|
@@ -32,9 +32,8 @@ const styledFunction = function (tag) {
|
|
|
32
32
|
slot: null
|
|
33
33
|
};
|
|
34
34
|
const {
|
|
35
|
-
name: componentName,
|
|
36
|
-
slot: componentSlot
|
|
37
|
-
displayName: componentDisplayName = null
|
|
35
|
+
name: componentName = null,
|
|
36
|
+
slot: componentSlot = null
|
|
38
37
|
} = options;
|
|
39
38
|
|
|
40
39
|
const func = function (styleArg) {
|
|
@@ -95,7 +94,7 @@ const styledFunction = function (tag) {
|
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
let Component = /*#__PURE__*/styled_component__default["default"](tag);
|
|
98
|
-
const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName, "-").concat(componentSlot) :
|
|
97
|
+
const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName, "-").concat(componentSlot) : null;
|
|
99
98
|
|
|
100
99
|
if (displayName !== null) {
|
|
101
100
|
Component = Component.attrs({
|
package/cjs/th.js
CHANGED
|
@@ -6,21 +6,18 @@ require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
|
6
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
7
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
8
|
|
|
9
|
-
const th = property =>
|
|
10
|
-
|
|
11
|
-
return _ref => {
|
|
12
|
-
var _result;
|
|
9
|
+
const th = property => (value, dfault) => _ref => {
|
|
10
|
+
var _result;
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
12
|
+
let {
|
|
13
|
+
theme
|
|
14
|
+
} = _ref;
|
|
15
|
+
const parts = value.split('-');
|
|
16
|
+
let result = theme[property];
|
|
17
|
+
parts.forEach(part => {
|
|
18
|
+
if (result) result = result[part];
|
|
19
|
+
});
|
|
20
|
+
return (_result = result) !== null && _result !== void 0 ? _result : dfault;
|
|
24
21
|
};
|
|
25
22
|
th.space = th('space');
|
|
26
23
|
th.fontSize = th('fontSizes');
|
package/esm/styled/index.js
CHANGED
|
@@ -23,9 +23,8 @@ const styledFunction = function (tag) {
|
|
|
23
23
|
slot: null
|
|
24
24
|
};
|
|
25
25
|
const {
|
|
26
|
-
name: componentName,
|
|
27
|
-
slot: componentSlot
|
|
28
|
-
displayName: componentDisplayName = null
|
|
26
|
+
name: componentName = null,
|
|
27
|
+
slot: componentSlot = null
|
|
29
28
|
} = options;
|
|
30
29
|
|
|
31
30
|
const func = function (styleArg) {
|
|
@@ -86,7 +85,7 @@ const styledFunction = function (tag) {
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
let Component = /*#__PURE__*/styled_component(tag);
|
|
89
|
-
const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName, "-").concat(componentSlot) :
|
|
88
|
+
const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName, "-").concat(componentSlot) : null;
|
|
90
89
|
|
|
91
90
|
if (displayName !== null) {
|
|
92
91
|
Component = Component.attrs({
|
package/esm/th.js
CHANGED
|
@@ -2,21 +2,18 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
2
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
3
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
4
|
|
|
5
|
-
const th = property =>
|
|
6
|
-
|
|
7
|
-
return _ref => {
|
|
8
|
-
var _result;
|
|
5
|
+
const th = property => (value, dfault) => _ref => {
|
|
6
|
+
var _result;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
8
|
+
let {
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
|
+
const parts = value.split('-');
|
|
12
|
+
let result = theme[property];
|
|
13
|
+
parts.forEach(part => {
|
|
14
|
+
if (result) result = result[part];
|
|
15
|
+
});
|
|
16
|
+
return (_result = result) !== null && _result !== void 0 ? _result : dfault;
|
|
20
17
|
};
|
|
21
18
|
th.space = th('space');
|
|
22
19
|
th.fontSize = th('fontSizes');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-system",
|
|
3
|
-
"version": "2.2.0-
|
|
3
|
+
"version": "2.2.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"generateSubmodules": true
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@elliemae/ds-utilities": "2.2.0-
|
|
92
|
+
"@elliemae/ds-utilities": "2.2.0-rc.0",
|
|
93
93
|
"polished": "~3.6.7"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
package/types/styled/types.d.ts
CHANGED
|
@@ -23,6 +23,5 @@ export declare type StyledFunction = <C extends AnyStyledComponent | keyof JSX.I
|
|
|
23
23
|
name: string | null;
|
|
24
24
|
slot: string | null;
|
|
25
25
|
}) => ThemedStyledFunctionBase<C extends AnyStyledComponent ? StyledComponentInnerComponent<C> : C, Theme, C extends AnyStyledComponent ? StyledComponentInnerOtherProps<C> : {}, C extends AnyStyledComponent ? StyledComponentInnerAttrs<C> : never>;
|
|
26
|
-
export
|
|
27
|
-
}
|
|
26
|
+
export declare type StyledObject = ThemedStyledComponentFactories<Theme>;
|
|
28
27
|
export declare type Styled = StyledFunction & StyledObject;
|
package/types/th.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare type
|
|
2
|
-
declare type
|
|
3
|
-
space:
|
|
4
|
-
fontSize:
|
|
5
|
-
fontWeight:
|
|
6
|
-
lineHeight:
|
|
7
|
-
letterSpacing:
|
|
8
|
-
font:
|
|
9
|
-
color:
|
|
10
|
-
breakpoint:
|
|
11
|
-
media:
|
|
1
|
+
declare type thGetter = (value: string, dfault: string) => (theme: any) => string;
|
|
2
|
+
declare type thConstructor = ((property: string) => thGetter) & {
|
|
3
|
+
space: thGetter;
|
|
4
|
+
fontSize: thGetter;
|
|
5
|
+
fontWeight: thGetter;
|
|
6
|
+
lineHeight: thGetter;
|
|
7
|
+
letterSpacing: thGetter;
|
|
8
|
+
font: thGetter;
|
|
9
|
+
color: thGetter;
|
|
10
|
+
breakpoint: thGetter;
|
|
11
|
+
media: thGetter;
|
|
12
12
|
};
|
|
13
|
-
export declare const th:
|
|
13
|
+
export declare const th: thConstructor;
|
|
14
14
|
export {};
|