@semcore/side-panel 1.3.8 → 1.4.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/CHANGELOG.md +10 -0
- package/lib/cjs/SidePanel.js +10 -10
- package/lib/cjs/style/side-panel.shadow.css +11 -12
- package/lib/es6/SidePanel.js +10 -10
- package/lib/es6/style/side-panel.shadow.css +11 -12
- package/package.json +2 -1
- package/src/style/side-panel.shadow.css +11 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [1.4.0] - 2022-05-17
|
|
6
|
+
|
|
7
|
+
### BREAK
|
|
8
|
+
|
|
9
|
+
- Updated styles according to the library redesign policy.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added children components `Header, Footer, Body, Back, Title` for `SidePanel`.
|
|
14
|
+
|
|
5
15
|
## [1.3.8] - 2022-05-16
|
|
6
16
|
|
|
7
17
|
### Changed
|
package/lib/cjs/SidePanel.js
CHANGED
|
@@ -71,19 +71,19 @@ var style = (
|
|
|
71
71
|
/*__reshadow_css_start__*/
|
|
72
72
|
_core.sstyled.insert(
|
|
73
73
|
/*__inner_css_start__*/
|
|
74
|
-
".
|
|
74
|
+
".___SOverlay_148hv_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;overflow:hidden;z-index:10005;background:rgba(25,27,35,.7);-webkit-overflow-scrolling:touch}.___SPanel_148hv_gg_{padding:24px;width:260px;outline:none;position:fixed;box-sizing:border-box;will-change:transform;background:#fff;color:#191b23;z-index:1}.___SPanel_148hv_gg_._placement_top_148hv_gg_{box-shadow:1px 0 12px rgba(25,27,35,.15);width:100%;margin-bottom:auto;top:0;left:0}.___SPanel_148hv_gg_._placement_right_148hv_gg_{box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);height:100vh;margin-left:auto;top:0;right:0}.___SPanel_148hv_gg_._placement_bottom_148hv_gg_{box-shadow:1px 0 12px rgba(25,27,35,.15);width:100%;margin-top:auto;bottom:0;left:0}.___SPanel_148hv_gg_._placement_left_148hv_gg_{box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);height:100vh;margin-right:auto;top:0;left:0}.panel-right--enter{transform:translate(100%)}.panel-left--enter{transform:translate(-100%)}.panel-bottom--enter{transform:translateY(100%)}.panel-bottom--enter-active,.panel-bottom--exit,.panel-left--enter-active,.panel-left--exit,.panel-right--enter-active,.panel-right--exit{transform:translate(0)}.panel-right--exit-active{transform:translate(100%)}.panel-left--exit-active{transform:translate(-100%)}.panel-bottom--exit-active{transform:translateY(100%)}.___SClose_148hv_gg_{display:inline-flex;position:absolute;right:0;top:0;padding:12px 12px 16px 12px;color:#a9abb6;border:none;background:none;outline:none}.___SClose_148hv_gg_:hover{color:#8a8e9b}.___SClose_148hv_gg_.__keyboardFocused_148hv_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
|
|
75
75
|
/*__inner_css_end__*/
|
|
76
|
-
, "
|
|
76
|
+
, "sczs9x_gg_")
|
|
77
77
|
/*__reshadow_css_end__*/
|
|
78
78
|
, {
|
|
79
|
-
"__SOverlay": "
|
|
80
|
-
"__SPanel": "
|
|
81
|
-
"_placement_top": "
|
|
82
|
-
"_placement_right": "
|
|
83
|
-
"_placement_bottom": "
|
|
84
|
-
"_placement_left": "
|
|
85
|
-
"__SClose": "
|
|
86
|
-
"_keyboardFocused": "
|
|
79
|
+
"__SOverlay": "___SOverlay_148hv_gg_",
|
|
80
|
+
"__SPanel": "___SPanel_148hv_gg_",
|
|
81
|
+
"_placement_top": "_placement_top_148hv_gg_",
|
|
82
|
+
"_placement_right": "_placement_right_148hv_gg_",
|
|
83
|
+
"_placement_bottom": "_placement_bottom_148hv_gg_",
|
|
84
|
+
"_placement_left": "_placement_left_148hv_gg_",
|
|
85
|
+
"__SClose": "___SClose_148hv_gg_",
|
|
86
|
+
"_keyboardFocused": "__keyboardFocused_148hv_gg_"
|
|
87
87
|
});
|
|
88
88
|
var placementTransformMap = {
|
|
89
89
|
top: ['translate(0, -100%)', 'translate(0, 0)'],
|
|
@@ -10,23 +10,24 @@ SOverlay {
|
|
|
10
10
|
display: flex;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
z-index: 10005;
|
|
13
|
-
background:
|
|
13
|
+
background: color-mod(var(--gray-800) a(70%));
|
|
14
14
|
-webkit-overflow-scrolling: touch;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
SPanel {
|
|
18
18
|
padding: 24px;
|
|
19
|
-
width:
|
|
19
|
+
width: 260px;
|
|
20
20
|
outline: none;
|
|
21
21
|
position: fixed;
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
will-change: transform;
|
|
24
24
|
background: white;
|
|
25
|
+
color: var(--gray-800);
|
|
25
26
|
z-index: 1;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
SPanel[placement='top'] {
|
|
29
|
-
box-shadow:
|
|
30
|
+
box-shadow: 1px 0 12px rgba(25, 27, 35, 0.15);
|
|
30
31
|
width: 100%;
|
|
31
32
|
margin-bottom: auto;
|
|
32
33
|
top: 0;
|
|
@@ -34,7 +35,7 @@ SPanel[placement='top'] {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
SPanel[placement='right'] {
|
|
37
|
-
box-shadow:
|
|
38
|
+
box-shadow: var(--box-shadow-popper);
|
|
38
39
|
height: 100vh;
|
|
39
40
|
margin-left: auto;
|
|
40
41
|
top: 0;
|
|
@@ -42,7 +43,7 @@ SPanel[placement='right'] {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
SPanel[placement='bottom'] {
|
|
45
|
-
box-shadow:
|
|
46
|
+
box-shadow: 1px 0 12px rgba(25, 27, 35, 0.15);
|
|
46
47
|
width: 100%;
|
|
47
48
|
margin-top: auto;
|
|
48
49
|
bottom: 0;
|
|
@@ -50,7 +51,7 @@ SPanel[placement='bottom'] {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
SPanel[placement='left'] {
|
|
53
|
-
box-shadow:
|
|
54
|
+
box-shadow: var(--box-shadow-popper);
|
|
54
55
|
height: 100vh;
|
|
55
56
|
margin-right: auto;
|
|
56
57
|
top: 0;
|
|
@@ -89,19 +90,17 @@ SClose {
|
|
|
89
90
|
position: absolute;
|
|
90
91
|
right: 0;
|
|
91
92
|
top: 0;
|
|
92
|
-
padding: 12px;
|
|
93
|
-
color: var(--
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
z-index: 1;
|
|
93
|
+
padding: 12px 12px 16px 12px;
|
|
94
|
+
color: var(--gray-300);
|
|
96
95
|
border: none;
|
|
97
96
|
background: none;
|
|
98
97
|
outline: none;
|
|
99
98
|
|
|
100
99
|
&:hover {
|
|
101
|
-
color:
|
|
100
|
+
color: var(--gray-400);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
SClose[keyboardFocused] {
|
|
106
|
-
box-shadow: var(--
|
|
105
|
+
box-shadow: var(--keyboard-focus);
|
|
107
106
|
}
|
package/lib/es6/SidePanel.js
CHANGED
|
@@ -41,19 +41,19 @@ var style = (
|
|
|
41
41
|
/*__reshadow_css_start__*/
|
|
42
42
|
_sstyled.insert(
|
|
43
43
|
/*__inner_css_start__*/
|
|
44
|
-
".
|
|
44
|
+
".___SOverlay_148hv_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;overflow:hidden;z-index:10005;background:rgba(25,27,35,.7);-webkit-overflow-scrolling:touch}.___SPanel_148hv_gg_{padding:24px;width:260px;outline:none;position:fixed;box-sizing:border-box;will-change:transform;background:#fff;color:#191b23;z-index:1}.___SPanel_148hv_gg_._placement_top_148hv_gg_{box-shadow:1px 0 12px rgba(25,27,35,.15);width:100%;margin-bottom:auto;top:0;left:0}.___SPanel_148hv_gg_._placement_right_148hv_gg_{box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);height:100vh;margin-left:auto;top:0;right:0}.___SPanel_148hv_gg_._placement_bottom_148hv_gg_{box-shadow:1px 0 12px rgba(25,27,35,.15);width:100%;margin-top:auto;bottom:0;left:0}.___SPanel_148hv_gg_._placement_left_148hv_gg_{box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);height:100vh;margin-right:auto;top:0;left:0}.panel-right--enter{transform:translate(100%)}.panel-left--enter{transform:translate(-100%)}.panel-bottom--enter{transform:translateY(100%)}.panel-bottom--enter-active,.panel-bottom--exit,.panel-left--enter-active,.panel-left--exit,.panel-right--enter-active,.panel-right--exit{transform:translate(0)}.panel-right--exit-active{transform:translate(100%)}.panel-left--exit-active{transform:translate(-100%)}.panel-bottom--exit-active{transform:translateY(100%)}.___SClose_148hv_gg_{display:inline-flex;position:absolute;right:0;top:0;padding:12px 12px 16px 12px;color:#a9abb6;border:none;background:none;outline:none}.___SClose_148hv_gg_:hover{color:#8a8e9b}.___SClose_148hv_gg_.__keyboardFocused_148hv_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
|
|
45
45
|
/*__inner_css_end__*/
|
|
46
|
-
, "
|
|
46
|
+
, "sczs9x_gg_")
|
|
47
47
|
/*__reshadow_css_end__*/
|
|
48
48
|
, {
|
|
49
|
-
"__SOverlay": "
|
|
50
|
-
"__SPanel": "
|
|
51
|
-
"_placement_top": "
|
|
52
|
-
"_placement_right": "
|
|
53
|
-
"_placement_bottom": "
|
|
54
|
-
"_placement_left": "
|
|
55
|
-
"__SClose": "
|
|
56
|
-
"_keyboardFocused": "
|
|
49
|
+
"__SOverlay": "___SOverlay_148hv_gg_",
|
|
50
|
+
"__SPanel": "___SPanel_148hv_gg_",
|
|
51
|
+
"_placement_top": "_placement_top_148hv_gg_",
|
|
52
|
+
"_placement_right": "_placement_right_148hv_gg_",
|
|
53
|
+
"_placement_bottom": "_placement_bottom_148hv_gg_",
|
|
54
|
+
"_placement_left": "_placement_left_148hv_gg_",
|
|
55
|
+
"__SClose": "___SClose_148hv_gg_",
|
|
56
|
+
"_keyboardFocused": "__keyboardFocused_148hv_gg_"
|
|
57
57
|
});
|
|
58
58
|
var placementTransformMap = {
|
|
59
59
|
top: ['translate(0, -100%)', 'translate(0, 0)'],
|
|
@@ -10,23 +10,24 @@ SOverlay {
|
|
|
10
10
|
display: flex;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
z-index: 10005;
|
|
13
|
-
background:
|
|
13
|
+
background: color-mod(var(--gray-800) a(70%));
|
|
14
14
|
-webkit-overflow-scrolling: touch;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
SPanel {
|
|
18
18
|
padding: 24px;
|
|
19
|
-
width:
|
|
19
|
+
width: 260px;
|
|
20
20
|
outline: none;
|
|
21
21
|
position: fixed;
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
will-change: transform;
|
|
24
24
|
background: white;
|
|
25
|
+
color: var(--gray-800);
|
|
25
26
|
z-index: 1;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
SPanel[placement='top'] {
|
|
29
|
-
box-shadow:
|
|
30
|
+
box-shadow: 1px 0 12px rgba(25, 27, 35, 0.15);
|
|
30
31
|
width: 100%;
|
|
31
32
|
margin-bottom: auto;
|
|
32
33
|
top: 0;
|
|
@@ -34,7 +35,7 @@ SPanel[placement='top'] {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
SPanel[placement='right'] {
|
|
37
|
-
box-shadow:
|
|
38
|
+
box-shadow: var(--box-shadow-popper);
|
|
38
39
|
height: 100vh;
|
|
39
40
|
margin-left: auto;
|
|
40
41
|
top: 0;
|
|
@@ -42,7 +43,7 @@ SPanel[placement='right'] {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
SPanel[placement='bottom'] {
|
|
45
|
-
box-shadow:
|
|
46
|
+
box-shadow: 1px 0 12px rgba(25, 27, 35, 0.15);
|
|
46
47
|
width: 100%;
|
|
47
48
|
margin-top: auto;
|
|
48
49
|
bottom: 0;
|
|
@@ -50,7 +51,7 @@ SPanel[placement='bottom'] {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
SPanel[placement='left'] {
|
|
53
|
-
box-shadow:
|
|
54
|
+
box-shadow: var(--box-shadow-popper);
|
|
54
55
|
height: 100vh;
|
|
55
56
|
margin-right: auto;
|
|
56
57
|
top: 0;
|
|
@@ -89,19 +90,17 @@ SClose {
|
|
|
89
90
|
position: absolute;
|
|
90
91
|
right: 0;
|
|
91
92
|
top: 0;
|
|
92
|
-
padding: 12px;
|
|
93
|
-
color: var(--
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
z-index: 1;
|
|
93
|
+
padding: 12px 12px 16px 12px;
|
|
94
|
+
color: var(--gray-300);
|
|
96
95
|
border: none;
|
|
97
96
|
background: none;
|
|
98
97
|
outline: none;
|
|
99
98
|
|
|
100
99
|
&:hover {
|
|
101
|
-
color:
|
|
100
|
+
color: var(--gray-400);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
SClose[keyboardFocused] {
|
|
106
|
-
box-shadow: var(--
|
|
105
|
+
box-shadow: var(--keyboard-focus);
|
|
107
106
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/side-panel",
|
|
3
3
|
"description": "SEMRush SidePanel Component",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@semcore/animation": "^1",
|
|
18
18
|
"@semcore/flex-box": "^4",
|
|
19
19
|
"@semcore/portal": "^2",
|
|
20
|
+
"@semcore/typography": "^3",
|
|
20
21
|
"@semcore/outside-click": "^2",
|
|
21
22
|
"@semcore/icon": "^2.16",
|
|
22
23
|
"react-focus-lock": "2.3.1"
|
|
@@ -10,23 +10,24 @@ SOverlay {
|
|
|
10
10
|
display: flex;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
z-index: 10005;
|
|
13
|
-
background:
|
|
13
|
+
background: color-mod(var(--gray-800) a(70%));
|
|
14
14
|
-webkit-overflow-scrolling: touch;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
SPanel {
|
|
18
18
|
padding: 24px;
|
|
19
|
-
width:
|
|
19
|
+
width: 260px;
|
|
20
20
|
outline: none;
|
|
21
21
|
position: fixed;
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
will-change: transform;
|
|
24
24
|
background: white;
|
|
25
|
+
color: var(--gray-800);
|
|
25
26
|
z-index: 1;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
SPanel[placement='top'] {
|
|
29
|
-
box-shadow:
|
|
30
|
+
box-shadow: 1px 0 12px rgba(25, 27, 35, 0.15);
|
|
30
31
|
width: 100%;
|
|
31
32
|
margin-bottom: auto;
|
|
32
33
|
top: 0;
|
|
@@ -34,7 +35,7 @@ SPanel[placement='top'] {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
SPanel[placement='right'] {
|
|
37
|
-
box-shadow:
|
|
38
|
+
box-shadow: var(--box-shadow-popper);
|
|
38
39
|
height: 100vh;
|
|
39
40
|
margin-left: auto;
|
|
40
41
|
top: 0;
|
|
@@ -42,7 +43,7 @@ SPanel[placement='right'] {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
SPanel[placement='bottom'] {
|
|
45
|
-
box-shadow:
|
|
46
|
+
box-shadow: 1px 0 12px rgba(25, 27, 35, 0.15);
|
|
46
47
|
width: 100%;
|
|
47
48
|
margin-top: auto;
|
|
48
49
|
bottom: 0;
|
|
@@ -50,7 +51,7 @@ SPanel[placement='bottom'] {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
SPanel[placement='left'] {
|
|
53
|
-
box-shadow:
|
|
54
|
+
box-shadow: var(--box-shadow-popper);
|
|
54
55
|
height: 100vh;
|
|
55
56
|
margin-right: auto;
|
|
56
57
|
top: 0;
|
|
@@ -89,19 +90,17 @@ SClose {
|
|
|
89
90
|
position: absolute;
|
|
90
91
|
right: 0;
|
|
91
92
|
top: 0;
|
|
92
|
-
padding: 12px;
|
|
93
|
-
color: var(--
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
z-index: 1;
|
|
93
|
+
padding: 12px 12px 16px 12px;
|
|
94
|
+
color: var(--gray-300);
|
|
96
95
|
border: none;
|
|
97
96
|
background: none;
|
|
98
97
|
outline: none;
|
|
99
98
|
|
|
100
99
|
&:hover {
|
|
101
|
-
color:
|
|
100
|
+
color: var(--gray-400);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
SClose[keyboardFocused] {
|
|
106
|
-
box-shadow: var(--
|
|
105
|
+
box-shadow: var(--keyboard-focus);
|
|
107
106
|
}
|