@elliemae/ds-separator 2.4.2-rc.9 → 2.4.3-rc.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/v2/styles.js +31 -18
- package/esm/v2/styles.js +31 -14
- package/package.json +4 -4
package/cjs/v2/styles.js
CHANGED
|
@@ -2,61 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
6
|
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
11
|
-
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
13
7
|
const defaultColorTypes = {
|
|
14
8
|
primary: 'black',
|
|
15
9
|
secondary: 'gray'
|
|
16
10
|
};
|
|
17
|
-
const directionStyles = dsSystem.css
|
|
11
|
+
const directionStyles = dsSystem.css`
|
|
12
|
+
${_ref => {
|
|
18
13
|
let {
|
|
19
14
|
isVertical
|
|
20
15
|
} = _ref;
|
|
21
|
-
return isVertical ?
|
|
22
|
-
}
|
|
23
|
-
|
|
16
|
+
return isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`;
|
|
17
|
+
}}
|
|
18
|
+
`;
|
|
19
|
+
const dashedBorder = dsSystem.css`
|
|
20
|
+
background-image: linear-gradient(
|
|
21
|
+
to ${_ref2 => {
|
|
24
22
|
let {
|
|
25
23
|
isVertical
|
|
26
24
|
} = _ref2;
|
|
27
25
|
return !isVertical ? 'right' : 'bottom';
|
|
28
|
-
},
|
|
26
|
+
}},
|
|
27
|
+
${_ref3 => {
|
|
29
28
|
let {
|
|
30
29
|
color,
|
|
31
30
|
colorType
|
|
32
31
|
} = _ref3;
|
|
33
32
|
return color || defaultColorTypes[colorType];
|
|
34
|
-
}
|
|
33
|
+
}} 50%,
|
|
34
|
+
rgba(255, 255, 255, 0) 0%
|
|
35
|
+
);
|
|
36
|
+
background-position: bottom;
|
|
37
|
+
background-size: ${_ref4 => {
|
|
35
38
|
let {
|
|
36
39
|
isVertical
|
|
37
40
|
} = _ref4;
|
|
38
41
|
return isVertical ? '1px 5px' : '5px 1px';
|
|
39
|
-
}
|
|
42
|
+
}};
|
|
43
|
+
background-repeat: ${_ref5 => {
|
|
40
44
|
let {
|
|
41
45
|
isVertical
|
|
42
46
|
} = _ref5;
|
|
43
47
|
return isVertical ? 'repeat-y' : 'repeat-x';
|
|
44
|
-
}
|
|
45
|
-
|
|
48
|
+
}};
|
|
49
|
+
`;
|
|
50
|
+
const solidBorder = dsSystem.css`
|
|
51
|
+
background: ${_ref6 => {
|
|
46
52
|
let {
|
|
47
53
|
color,
|
|
48
54
|
colorType
|
|
49
55
|
} = _ref6;
|
|
50
56
|
return color || defaultColorTypes[colorType];
|
|
51
|
-
}
|
|
57
|
+
}};
|
|
58
|
+
`;
|
|
52
59
|
const StyledSeparator = dsSystem.styled('div', {
|
|
53
60
|
name: 'DS-Separator',
|
|
54
61
|
slot: 'root'
|
|
55
|
-
})
|
|
62
|
+
})`
|
|
63
|
+
${directionStyles}
|
|
64
|
+
${_ref7 => {
|
|
56
65
|
let {
|
|
57
66
|
isDashed
|
|
58
67
|
} = _ref7;
|
|
59
68
|
return isDashed ? dashedBorder : solidBorder;
|
|
60
|
-
}
|
|
69
|
+
}}
|
|
70
|
+
${dsSystem.spacing}
|
|
71
|
+
${dsSystem.space}
|
|
72
|
+
${dsSystem.layout}
|
|
73
|
+
`;
|
|
61
74
|
|
|
62
75
|
exports.StyledSeparator = StyledSeparator;
|
package/esm/v2/styles.js
CHANGED
|
@@ -1,54 +1,71 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
1
|
import { css, styled, spacing, space, layout } from '@elliemae/ds-system';
|
|
3
2
|
|
|
4
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
3
|
const defaultColorTypes = {
|
|
6
4
|
primary: 'black',
|
|
7
5
|
secondary: 'gray'
|
|
8
6
|
};
|
|
9
|
-
const directionStyles = css
|
|
7
|
+
const directionStyles = css`
|
|
8
|
+
${_ref => {
|
|
10
9
|
let {
|
|
11
10
|
isVertical
|
|
12
11
|
} = _ref;
|
|
13
|
-
return isVertical ?
|
|
14
|
-
}
|
|
15
|
-
|
|
12
|
+
return isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`;
|
|
13
|
+
}}
|
|
14
|
+
`;
|
|
15
|
+
const dashedBorder = css`
|
|
16
|
+
background-image: linear-gradient(
|
|
17
|
+
to ${_ref2 => {
|
|
16
18
|
let {
|
|
17
19
|
isVertical
|
|
18
20
|
} = _ref2;
|
|
19
21
|
return !isVertical ? 'right' : 'bottom';
|
|
20
|
-
},
|
|
22
|
+
}},
|
|
23
|
+
${_ref3 => {
|
|
21
24
|
let {
|
|
22
25
|
color,
|
|
23
26
|
colorType
|
|
24
27
|
} = _ref3;
|
|
25
28
|
return color || defaultColorTypes[colorType];
|
|
26
|
-
}
|
|
29
|
+
}} 50%,
|
|
30
|
+
rgba(255, 255, 255, 0) 0%
|
|
31
|
+
);
|
|
32
|
+
background-position: bottom;
|
|
33
|
+
background-size: ${_ref4 => {
|
|
27
34
|
let {
|
|
28
35
|
isVertical
|
|
29
36
|
} = _ref4;
|
|
30
37
|
return isVertical ? '1px 5px' : '5px 1px';
|
|
31
|
-
}
|
|
38
|
+
}};
|
|
39
|
+
background-repeat: ${_ref5 => {
|
|
32
40
|
let {
|
|
33
41
|
isVertical
|
|
34
42
|
} = _ref5;
|
|
35
43
|
return isVertical ? 'repeat-y' : 'repeat-x';
|
|
36
|
-
}
|
|
37
|
-
|
|
44
|
+
}};
|
|
45
|
+
`;
|
|
46
|
+
const solidBorder = css`
|
|
47
|
+
background: ${_ref6 => {
|
|
38
48
|
let {
|
|
39
49
|
color,
|
|
40
50
|
colorType
|
|
41
51
|
} = _ref6;
|
|
42
52
|
return color || defaultColorTypes[colorType];
|
|
43
|
-
}
|
|
53
|
+
}};
|
|
54
|
+
`;
|
|
44
55
|
const StyledSeparator = styled('div', {
|
|
45
56
|
name: 'DS-Separator',
|
|
46
57
|
slot: 'root'
|
|
47
|
-
})
|
|
58
|
+
})`
|
|
59
|
+
${directionStyles}
|
|
60
|
+
${_ref7 => {
|
|
48
61
|
let {
|
|
49
62
|
isDashed
|
|
50
63
|
} = _ref7;
|
|
51
64
|
return isDashed ? dashedBorder : solidBorder;
|
|
52
|
-
}
|
|
65
|
+
}}
|
|
66
|
+
${spacing}
|
|
67
|
+
${space}
|
|
68
|
+
${layout}
|
|
69
|
+
`;
|
|
53
70
|
|
|
54
71
|
export { StyledSeparator };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-separator",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Separator",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"build": "node ../../scripts/build/build.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@elliemae/ds-classnames": "2.4.
|
|
60
|
-
"@elliemae/ds-props-helpers": "2.4.
|
|
61
|
-
"@elliemae/ds-system": "2.4.
|
|
59
|
+
"@elliemae/ds-classnames": "2.4.3-rc.2",
|
|
60
|
+
"@elliemae/ds-props-helpers": "2.4.3-rc.2",
|
|
61
|
+
"@elliemae/ds-system": "2.4.3-rc.2",
|
|
62
62
|
"react-desc": "~4.1.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|