@alfalab/core-components-modal 11.0.7 → 11.0.8-alfasans
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/components/content/desktop.css +6 -6
- package/components/content/desktop.module.css.js +1 -1
- package/components/content/index.css +3 -3
- package/components/content/index.module.css.js +1 -1
- package/components/content/mobile.css +6 -6
- package/components/content/mobile.module.css.js +1 -1
- package/components/content/mobile.module.css.js.map +1 -1
- package/components/controls/Component.js +7 -3
- package/components/controls/Component.js.map +1 -1
- package/components/controls/index.css +1 -1
- package/components/controls/index.module.css.js +1 -1
- package/components/controls/mobile.layout.css +13 -0
- package/components/controls/mobile.layout.module.css.js +8 -0
- package/components/controls/mobile.layout.module.css.js.map +1 -0
- package/components/footer/desktop.css +8 -8
- package/components/footer/desktop.module.css.js +1 -1
- package/components/footer/index.css +3 -3
- package/components/footer/index.module.css.js +1 -1
- package/components/footer/layout.css +16 -16
- package/components/footer/layout.module.css.js +1 -1
- package/components/footer/mobile.css +7 -7
- package/components/footer/mobile.module.css.js +1 -1
- package/components/footer/mobile.module.css.js.map +1 -1
- package/components/header/desktop.css +21 -18
- package/components/header/desktop.module.css.js +1 -1
- package/components/header/index.css +3 -3
- package/components/header/index.module.css.js +1 -1
- package/components/header/mobile.css +14 -10
- package/components/header/mobile.module.css.js +1 -1
- package/cssm/components/content/mobile.module.css +4 -4
- package/cssm/components/controls/Component.js +8 -3
- package/cssm/components/controls/Component.js.map +1 -1
- package/cssm/components/controls/mobile.layout.module.css +13 -0
- package/cssm/components/footer/mobile.module.css +4 -4
- package/cssm/components/header/desktop.module.css +7 -4
- package/cssm/components/header/mobile.module.css +10 -6
- package/desktop/desktop.css +8 -8
- package/desktop/desktop.module.css.js +1 -1
- package/esm/components/content/desktop.css +6 -6
- package/esm/components/content/desktop.module.css.js +1 -1
- package/esm/components/content/index.css +3 -3
- package/esm/components/content/index.module.css.js +1 -1
- package/esm/components/content/mobile.css +6 -6
- package/esm/components/content/mobile.module.css.js +1 -1
- package/esm/components/content/mobile.module.css.js.map +1 -1
- package/esm/components/controls/Component.js +7 -3
- package/esm/components/controls/Component.js.map +1 -1
- package/esm/components/controls/index.css +1 -1
- package/esm/components/controls/index.module.css.js +1 -1
- package/esm/components/controls/mobile.layout.css +13 -0
- package/esm/components/controls/mobile.layout.module.css.js +6 -0
- package/esm/components/controls/mobile.layout.module.css.js.map +1 -0
- package/esm/components/footer/desktop.css +8 -8
- package/esm/components/footer/desktop.module.css.js +1 -1
- package/esm/components/footer/index.css +3 -3
- package/esm/components/footer/index.module.css.js +1 -1
- package/esm/components/footer/layout.css +16 -16
- package/esm/components/footer/layout.module.css.js +1 -1
- package/esm/components/footer/mobile.css +7 -7
- package/esm/components/footer/mobile.module.css.js +1 -1
- package/esm/components/footer/mobile.module.css.js.map +1 -1
- package/esm/components/header/desktop.css +21 -18
- package/esm/components/header/desktop.module.css.js +1 -1
- package/esm/components/header/index.css +3 -3
- package/esm/components/header/index.module.css.js +1 -1
- package/esm/components/header/mobile.css +14 -10
- package/esm/components/header/mobile.module.css.js +1 -1
- package/esm/desktop/desktop.css +8 -8
- package/esm/desktop/desktop.module.css.js +1 -1
- package/esm/mobile/mobile.css +2 -2
- package/esm/mobile/mobile.module.css.js +1 -1
- package/esm/transitions.css +7 -7
- package/esm/transitions.module.css.js +1 -1
- package/mobile/mobile.css +2 -2
- package/mobile/mobile.module.css.js +1 -1
- package/modern/components/content/desktop.css +6 -6
- package/modern/components/content/desktop.module.css.js +1 -1
- package/modern/components/content/index.css +3 -3
- package/modern/components/content/index.module.css.js +1 -1
- package/modern/components/content/mobile.css +6 -6
- package/modern/components/content/mobile.module.css.js +1 -1
- package/modern/components/content/mobile.module.css.js.map +1 -1
- package/modern/components/controls/Component.js +4 -1
- package/modern/components/controls/Component.js.map +1 -1
- package/modern/components/controls/index.css +1 -1
- package/modern/components/controls/index.module.css.js +1 -1
- package/modern/components/controls/mobile.layout.css +13 -0
- package/modern/components/controls/mobile.layout.module.css.js +6 -0
- package/modern/components/controls/mobile.layout.module.css.js.map +1 -0
- package/modern/components/footer/desktop.css +8 -8
- package/modern/components/footer/desktop.module.css.js +1 -1
- package/modern/components/footer/index.css +3 -3
- package/modern/components/footer/index.module.css.js +1 -1
- package/modern/components/footer/layout.css +16 -16
- package/modern/components/footer/layout.module.css.js +1 -1
- package/modern/components/footer/mobile.css +7 -7
- package/modern/components/footer/mobile.module.css.js +1 -1
- package/modern/components/footer/mobile.module.css.js.map +1 -1
- package/modern/components/header/desktop.css +21 -18
- package/modern/components/header/desktop.module.css.js +1 -1
- package/modern/components/header/index.css +3 -3
- package/modern/components/header/index.module.css.js +1 -1
- package/modern/components/header/mobile.css +14 -10
- package/modern/components/header/mobile.module.css.js +1 -1
- package/modern/desktop/desktop.css +8 -8
- package/modern/desktop/desktop.module.css.js +1 -1
- package/modern/mobile/mobile.css +2 -2
- package/modern/mobile/mobile.module.css.js +1 -1
- package/modern/transitions.css +7 -7
- package/modern/transitions.module.css.js +1 -1
- package/moderncssm/components/content/mobile.module.css +2 -2
- package/moderncssm/components/controls/Component.js +4 -1
- package/moderncssm/components/controls/Component.js.map +1 -1
- package/moderncssm/components/controls/mobile.layout.module.css +13 -0
- package/moderncssm/components/footer/mobile.module.css +2 -2
- package/moderncssm/components/header/desktop.module.css +4 -2
- package/moderncssm/components/header/mobile.module.css +5 -4
- package/package.json +7 -7
- package/src/components/content/mobile.module.css +2 -2
- package/src/components/controls/Component.tsx +4 -0
- package/src/components/controls/mobile.layout.module.css +15 -0
- package/src/components/footer/mobile.module.css +2 -2
- package/src/vars.css +3 -2
- package/transitions.css +7 -7
- package/transitions.module.css.js +1 -1
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
--gap-40: var(--gap-3xl);
|
|
14
14
|
}
|
|
15
15
|
:root {
|
|
16
|
-
--font-family-
|
|
17
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
16
|
+
--font-family-alfasans:
|
|
17
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
18
|
+
Helvetica, sans-serif;
|
|
18
19
|
}
|
|
19
20
|
:root {
|
|
20
21
|
--modal-border-radius: var(--border-radius-24);
|
|
@@ -23,37 +24,39 @@
|
|
|
23
24
|
--modal-s-header-desktop-content-paddings: var(--gap-12);
|
|
24
25
|
--modal-l-header-desktop-content-paddings: var(--gap-6) var(--gap-12) var(--gap-16);
|
|
25
26
|
}
|
|
26
|
-
.
|
|
27
|
+
.modal__header_okz41 {
|
|
27
28
|
border-top-left-radius: var(--modal-border-radius);
|
|
28
29
|
border-top-right-radius: var(--modal-border-radius);
|
|
29
30
|
}
|
|
30
|
-
.modal__size-
|
|
31
|
-
.modal__size-
|
|
31
|
+
.modal__size-500_okz41 .modal__content_okz41,
|
|
32
|
+
.modal__size-600_okz41 .modal__content_okz41 {
|
|
32
33
|
padding: var(--modal-s-header-desktop-content-paddings);
|
|
33
34
|
font-size: 22px;
|
|
34
35
|
line-height: 26px;
|
|
35
36
|
font-weight: 700;
|
|
36
|
-
|
|
37
|
+
letter-spacing: 0.2px;
|
|
38
|
+
font-family: var(--font-family-alfasans);
|
|
37
39
|
}
|
|
38
|
-
.modal__size-
|
|
39
|
-
.modal__size-
|
|
40
|
-
.
|
|
40
|
+
.modal__size-800_okz41 .modal__content_okz41,
|
|
41
|
+
.modal__size-1140_okz41 .modal__content_okz41,
|
|
42
|
+
.modal__fullscreen_okz41 .modal__content_okz41 {
|
|
41
43
|
padding: var(--modal-l-header-desktop-content-paddings);
|
|
42
44
|
font-size: 30px;
|
|
43
45
|
line-height: 36px;
|
|
44
46
|
font-weight: 700;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
.modal__size-
|
|
49
|
-
.modal__size-
|
|
50
|
-
.modal__size-
|
|
51
|
-
.
|
|
47
|
+
letter-spacing: 0.1px;
|
|
48
|
+
font-family: var(--font-family-alfasans);
|
|
49
|
+
}
|
|
50
|
+
.modal__size-500_okz41,
|
|
51
|
+
.modal__size-600_okz41,
|
|
52
|
+
.modal__size-800_okz41,
|
|
53
|
+
.modal__size-1140_okz41,
|
|
54
|
+
.modal__fullscreen_okz41 {
|
|
52
55
|
padding: var(--modal-s-header-paddings);
|
|
53
56
|
}
|
|
54
|
-
.
|
|
57
|
+
.modal__sticky_okz41 {
|
|
55
58
|
top: calc(var(--modal-vertical-padding) * -1);
|
|
56
59
|
}
|
|
57
|
-
.
|
|
60
|
+
.modal__sticky_okz41.modal__fullscreen_okz41 {
|
|
58
61
|
top: var(--gap-0);
|
|
59
62
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './desktop.css';
|
|
2
2
|
|
|
3
|
-
const desktopStyles = {"header":"
|
|
3
|
+
const desktopStyles = {"header":"modal__header_okz41","size-500":"modal__size-500_okz41","content":"modal__content_okz41","size-600":"modal__size-600_okz41","size-800":"modal__size-800_okz41","size-1140":"modal__size-1140_okz41","fullscreen":"modal__fullscreen_okz41","sticky":"modal__sticky_okz41"};
|
|
4
4
|
|
|
5
5
|
export { desktopStyles as default };
|
|
6
6
|
//# sourceMappingURL=desktop.module.css.js.map
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
--modal-header-highlight-background: var(--color-light-modal-bg-primary);
|
|
8
8
|
--modal-header-highlight-box-shadow: 0 1px 0 0 var(--color-light-neutral-300);
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.modal__highlighted_1jvav {
|
|
11
11
|
background: var(--modal-header-highlight-background);
|
|
12
12
|
box-shadow: var(--modal-header-highlight-box-shadow);
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.modal__sticky_1jvav {
|
|
15
15
|
position: sticky;
|
|
16
16
|
z-index: 1;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.modal__sticky_1jvav.modal__hasContent_1jvav {
|
|
19
19
|
background: var(--modal-header-background);
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"highlighted":"
|
|
3
|
+
const styles = {"highlighted":"modal__highlighted_1jvav","sticky":"modal__sticky_1jvav","hasContent":"modal__hasContent_1jvav"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -4,36 +4,40 @@
|
|
|
4
4
|
:root {
|
|
5
5
|
--gap-2xs: 4px;
|
|
6
6
|
--gap-xs: 8px;
|
|
7
|
+
--gap-s: 12px;
|
|
7
8
|
--gap-0: 0px;
|
|
8
9
|
--gap-4: var(--gap-2xs);
|
|
9
10
|
--gap-8: var(--gap-xs);
|
|
10
11
|
--gap-10: 10px;
|
|
12
|
+
--gap-12: var(--gap-s);
|
|
11
13
|
}
|
|
12
14
|
:root {
|
|
13
|
-
--font-family-
|
|
14
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
15
|
+
--font-family-alfasans:
|
|
16
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
17
|
+
Helvetica, sans-serif;
|
|
15
18
|
}
|
|
16
19
|
:root {
|
|
17
20
|
--modal-header-mobile-content-paddings: var(--gap-10) var(--gap-8);
|
|
18
21
|
--modal-header-mobile-top-padding: var(--gap-4);
|
|
19
|
-
--modal-header-mobile-paddings: var(--modal-header-mobile-top-padding) var(--gap-
|
|
20
|
-
var(--gap-
|
|
22
|
+
--modal-header-mobile-paddings: var(--modal-header-mobile-top-padding) var(--gap-12)
|
|
23
|
+
var(--gap-4) var(--gap-12);
|
|
21
24
|
}
|
|
22
|
-
.
|
|
25
|
+
.modal__header_8lwnb {
|
|
23
26
|
padding: var(--modal-header-mobile-paddings);
|
|
24
27
|
}
|
|
25
28
|
@media (display-mode: standalone) {
|
|
26
|
-
.
|
|
29
|
+
.modal__header_8lwnb {
|
|
27
30
|
padding-top: calc(var(--sat) + var(--modal-header-mobile-top-padding));
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
|
-
.
|
|
33
|
+
.modal__sticky_8lwnb {
|
|
31
34
|
top: var(--gap-0);
|
|
32
35
|
}
|
|
33
|
-
.
|
|
36
|
+
.modal__content_8lwnb {
|
|
34
37
|
padding: var(--modal-header-mobile-content-paddings);
|
|
35
38
|
font-size: 20px;
|
|
36
39
|
line-height: 28px;
|
|
37
|
-
font-weight:
|
|
38
|
-
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
letter-spacing: -0.15px;
|
|
42
|
+
font-family: var(--font-family-alfasans);
|
|
39
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './mobile.css';
|
|
2
2
|
|
|
3
|
-
const mobileStyles = {"header":"
|
|
3
|
+
const mobileStyles = {"header":"modal__header_8lwnb","sticky":"modal__sticky_8lwnb","content":"modal__content_8lwnb"};
|
|
4
4
|
|
|
5
5
|
export { mobileStyles as default };
|
|
6
6
|
//# sourceMappingURL=mobile.module.css.js.map
|
|
@@ -16,34 +16,34 @@
|
|
|
16
16
|
--modal-l-width: 800px;
|
|
17
17
|
--modal-xl-width: 1140px;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
.modal__wrapper_7cgdp {
|
|
20
20
|
padding-top: var(--modal-vertical-padding);
|
|
21
21
|
padding-bottom: var(--modal-vertical-padding);
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
.modal__component_7cgdp {
|
|
24
24
|
width: 100%;
|
|
25
25
|
max-width: 100%;
|
|
26
26
|
border-radius: var(--modal-border-radius);
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.modal__fullscreen_7cgdp {
|
|
29
29
|
padding-top: var(--gap-0);
|
|
30
30
|
padding-bottom: var(--gap-0);
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.modal__fullscreen_7cgdp .modal__component_7cgdp {
|
|
34
34
|
flex: 1;
|
|
35
35
|
border-radius: var(--border-radius-0);
|
|
36
36
|
overflow: auto;
|
|
37
37
|
}
|
|
38
|
-
.modal__size-
|
|
38
|
+
.modal__size-500_7cgdp {
|
|
39
39
|
width: var(--modal-s-width);
|
|
40
40
|
}
|
|
41
|
-
.modal__size-
|
|
41
|
+
.modal__size-600_7cgdp {
|
|
42
42
|
width: var(--modal-m-width);
|
|
43
43
|
}
|
|
44
|
-
.modal__size-
|
|
44
|
+
.modal__size-800_7cgdp {
|
|
45
45
|
width: var(--modal-l-width);
|
|
46
46
|
}
|
|
47
|
-
.modal__size-
|
|
47
|
+
.modal__size-1140_7cgdp {
|
|
48
48
|
width: var(--modal-xl-width);
|
|
49
49
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './desktop.css';
|
|
2
2
|
|
|
3
|
-
const desktopStyles = {"wrapper":"
|
|
3
|
+
const desktopStyles = {"wrapper":"modal__wrapper_7cgdp","component":"modal__component_7cgdp","fullscreen":"modal__fullscreen_7cgdp","size-500":"modal__size-500_7cgdp","size-600":"modal__size-600_7cgdp","size-800":"modal__size-800_7cgdp","size-1140":"modal__size-1140_7cgdp"};
|
|
4
4
|
|
|
5
5
|
export { desktopStyles as default };
|
|
6
6
|
//# sourceMappingURL=desktop.module.css.js.map
|
package/modern/mobile/mobile.css
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
:root {
|
|
6
6
|
--gap-0: 0px;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
.modal__component_accd1 {
|
|
9
9
|
flex: 1;
|
|
10
10
|
width: 100%;
|
|
11
11
|
max-width: 600px;
|
|
12
12
|
}
|
|
13
13
|
@media (display-mode: standalone) {
|
|
14
|
-
.
|
|
14
|
+
.modal__content_accd1 {
|
|
15
15
|
padding-top: var(--sat);
|
|
16
16
|
padding-bottom: var(--sab);
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './mobile.css';
|
|
2
2
|
|
|
3
|
-
const mobileStyles = {"component":"
|
|
3
|
+
const mobileStyles = {"component":"modal__component_accd1","content":"modal__content_accd1"};
|
|
4
4
|
|
|
5
5
|
export { mobileStyles as default };
|
|
6
6
|
//# sourceMappingURL=mobile.module.css.js.map
|
package/modern/transitions.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
.modal__appear_1go5r,
|
|
2
|
+
.modal__enter_1go5r {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transform: translateY(15px);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
8
|
-
.
|
|
7
|
+
.modal__appearActive_1go5r,
|
|
8
|
+
.modal__enterActive_1go5r {
|
|
9
9
|
opacity: 1;
|
|
10
10
|
transform: translateY(0);
|
|
11
11
|
transition:
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
transform 200ms ease-in;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.modal__exit_1go5r {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
transform: translateY(0);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
22
|
-
.
|
|
21
|
+
.modal__exitActive_1go5r,
|
|
22
|
+
.modal__exitDone_1go5r {
|
|
23
23
|
opacity: 0;
|
|
24
24
|
transform: translateY(15px);
|
|
25
25
|
transition:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './transitions.css';
|
|
2
2
|
|
|
3
|
-
const transitions = {"appear":"
|
|
3
|
+
const transitions = {"appear":"modal__appear_1go5r","enter":"modal__enter_1go5r","appearActive":"modal__appearActive_1go5r","enterActive":"modal__enterActive_1go5r","exit":"modal__exit_1go5r","exitActive":"modal__exitActive_1go5r","exitDone":"modal__exitDone_1go5r"};
|
|
4
4
|
|
|
5
5
|
export { transitions as default };
|
|
6
6
|
//# sourceMappingURL=transitions.module.css.js.map
|
|
@@ -4,12 +4,15 @@ import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
|
|
|
4
4
|
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
5
5
|
import layoutStyles from '../footer/layout.module.css';
|
|
6
6
|
import styles from './index.module.css';
|
|
7
|
+
import mobileLayoutStyles from './mobile.layout.module.css';
|
|
7
8
|
|
|
8
9
|
const Controls = ({ primary, secondary, gap, layout: layoutProp = 'start', mobileLayout = layoutProp, }) => {
|
|
9
10
|
const { view, dataTestId } = useContext(ResponsiveContext);
|
|
10
11
|
const layout = view === 'mobile' ? mobileLayout : layoutProp;
|
|
11
12
|
const shouldReverse = view === 'mobile' && layout !== 'column';
|
|
12
|
-
return (React.createElement("div", { "data-test-id": getDataTestId(dataTestId, 'controls'), className: cn(styles.component, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`]
|
|
13
|
+
return (React.createElement("div", { "data-test-id": getDataTestId(dataTestId, 'controls'), className: cn(styles.component, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`], {
|
|
14
|
+
[mobileLayoutStyles[layout]]: view === 'mobile',
|
|
15
|
+
}) }, shouldReverse ? (React.createElement(React.Fragment, null,
|
|
13
16
|
secondary,
|
|
14
17
|
primary)) : (React.createElement(React.Fragment, null,
|
|
15
18
|
primary,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/controls/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { ResponsiveContext } from '../../ResponsiveContext';\n\nimport layoutStyles from '../footer/layout.module.css';\nimport styles from './index.module.css';\n\nexport interface ControlsProps {\n /**\n * Основной слот\n */\n primary?: ReactNode;\n\n /**\n * Дополнительный слот\n */\n secondary?: ReactNode;\n\n /**\n * Выравнивание элементов футера\n * @default start\n */\n layout?: 'start' | 'center' | 'space-between' | 'column';\n\n /**\n * Выравнивание элементов футера (мобильный view)\n * @default start\n */\n mobileLayout?: 'start' | 'center' | 'space-between' | 'column';\n\n /**\n * Отступы между элементами футера\n */\n gap?: 16 | 24 | 32;\n}\n\nexport const Controls: React.FC<ControlsProps> = ({\n primary,\n secondary,\n gap,\n layout: layoutProp = 'start',\n mobileLayout = layoutProp,\n}) => {\n const { view, dataTestId } = useContext(ResponsiveContext);\n\n const layout = view === 'mobile' ? mobileLayout : layoutProp;\n\n const shouldReverse = view === 'mobile' && layout !== 'column';\n\n return (\n <div\n data-test-id={getDataTestId(dataTestId, 'controls')}\n className={cn(\n styles.component,\n layoutStyles[layout],\n gap && layoutStyles[`gap-${gap}`],\n )}\n >\n {shouldReverse ? (\n <React.Fragment>\n {secondary}\n {primary}\n </React.Fragment>\n ) : (\n <React.Fragment>\n {primary}\n {secondary}\n </React.Fragment>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/controls/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { ResponsiveContext } from '../../ResponsiveContext';\n\nimport layoutStyles from '../footer/layout.module.css';\nimport styles from './index.module.css';\nimport mobileLayoutStyles from './mobile.layout.module.css';\n\nexport interface ControlsProps {\n /**\n * Основной слот\n */\n primary?: ReactNode;\n\n /**\n * Дополнительный слот\n */\n secondary?: ReactNode;\n\n /**\n * Выравнивание элементов футера\n * @default start\n */\n layout?: 'start' | 'center' | 'space-between' | 'column';\n\n /**\n * Выравнивание элементов футера (мобильный view)\n * @default start\n */\n mobileLayout?: 'start' | 'center' | 'space-between' | 'column';\n\n /**\n * Отступы между элементами футера\n */\n gap?: 16 | 24 | 32;\n}\n\nexport const Controls: React.FC<ControlsProps> = ({\n primary,\n secondary,\n gap,\n layout: layoutProp = 'start',\n mobileLayout = layoutProp,\n}) => {\n const { view, dataTestId } = useContext(ResponsiveContext);\n\n const layout = view === 'mobile' ? mobileLayout : layoutProp;\n\n const shouldReverse = view === 'mobile' && layout !== 'column';\n\n return (\n <div\n data-test-id={getDataTestId(dataTestId, 'controls')}\n className={cn(\n styles.component,\n layoutStyles[layout],\n gap && layoutStyles[`gap-${gap}`],\n {\n [mobileLayoutStyles[layout]]: view === 'mobile',\n },\n )}\n >\n {shouldReverse ? (\n <React.Fragment>\n {secondary}\n {primary}\n </React.Fragment>\n ) : (\n <React.Fragment>\n {primary}\n {secondary}\n </React.Fragment>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;MAwCa,QAAQ,GAA4B,CAAC,EAC9C,OAAO,EACP,SAAS,EACT,GAAG,EACH,MAAM,EAAE,UAAU,GAAG,OAAO,EAC5B,YAAY,GAAG,UAAU,GAC5B,KAAI;IACD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC;AAE1D,IAAA,MAAM,MAAM,GAAG,IAAI,KAAK,QAAQ,GAAG,YAAY,GAAG,UAAU;IAE5D,MAAM,aAAa,GAAG,IAAI,KAAK,QAAQ,IAAI,MAAM,KAAK,QAAQ;AAE9D,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,cAAA,EACkB,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC,EACnD,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,SAAS,EAChB,YAAY,CAAC,MAAM,CAAC,EACpB,GAAG,IAAI,YAAY,CAAC,CAAA,IAAA,EAAO,GAAG,CAAA,CAAE,CAAC,EACjC;YACI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,IAAI,KAAK,QAAQ;SAClD,CACJ,EAAA,EAEA,aAAa,IACV,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;QACV,SAAS;QACT,OAAO,CACK,KAEjB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;QACV,OAAO;AACP,QAAA,SAAS,CACG,CACpB,CACC;AAEd;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--modal-footer-mobile-default-gap: var(--gap-8);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.column > *:not(:last-child):not(:only-child) {
|
|
8
|
+
margin-bottom: var(--modal-footer-mobile-default-gap);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.start > *:not(:last-child):not(:only-child), .center > *:not(:last-child):not(:only-child), .space-between > *:not(:last-child):not(:only-child) {
|
|
12
|
+
margin-right: var(--modal-footer-mobile-default-gap);
|
|
13
|
+
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
--sab: env(safe-area-inset-bottom, var(--gap-0));
|
|
3
3
|
}
|
|
4
4
|
.footer {
|
|
5
|
-
padding: var(--gap-
|
|
5
|
+
padding: var(--gap-20);
|
|
6
6
|
}
|
|
7
7
|
@media (display-mode: standalone) {
|
|
8
8
|
.footer {
|
|
9
|
-
padding-bottom: calc(var(--sab) + var(--gap-
|
|
9
|
+
padding-bottom: calc(var(--sab) + var(--gap-20));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
.sticky {
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
font-size: 22px;
|
|
20
20
|
line-height: 26px;
|
|
21
21
|
font-weight: 700;
|
|
22
|
-
|
|
22
|
+
letter-spacing: 0.2px;
|
|
23
|
+
font-family: var(--font-family-alfasans);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.size-800 .content,
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
font-size: 30px;
|
|
30
31
|
line-height: 36px;
|
|
31
32
|
font-weight: 700;
|
|
32
|
-
|
|
33
|
+
letter-spacing: 0.1px;
|
|
34
|
+
font-family: var(--font-family-alfasans);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
.size-500,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
:root {
|
|
5
5
|
--modal-header-mobile-content-paddings: var(--gap-10) var(--gap-8);
|
|
6
6
|
--modal-header-mobile-top-padding: var(--gap-4);
|
|
7
|
-
--modal-header-mobile-paddings: var(--modal-header-mobile-top-padding) var(--gap-
|
|
8
|
-
var(--gap-
|
|
7
|
+
--modal-header-mobile-paddings: var(--modal-header-mobile-top-padding) var(--gap-12)
|
|
8
|
+
var(--gap-4) var(--gap-12);
|
|
9
9
|
}
|
|
10
10
|
.header {
|
|
11
11
|
padding: var(--modal-header-mobile-paddings);
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
padding: var(--modal-header-mobile-content-paddings);
|
|
23
23
|
font-size: 20px;
|
|
24
24
|
line-height: 28px;
|
|
25
|
-
font-weight:
|
|
26
|
-
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
letter-spacing: -0.15px;
|
|
27
|
+
font-family: var(--font-family-alfasans);
|
|
27
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-modal",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.8-alfasans",
|
|
4
4
|
"description": "Modal component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"module": "./esm/index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@alfalab/core-components-base-modal": "
|
|
14
|
-
"@alfalab/core-components-mq": "
|
|
15
|
-
"@alfalab/core-components-navigation-bar-private": "
|
|
16
|
-
"@alfalab/core-components-shared": "
|
|
13
|
+
"@alfalab/core-components-base-modal": "7.1.4-alfasans",
|
|
14
|
+
"@alfalab/core-components-mq": "6.0.3-alfasans",
|
|
15
|
+
"@alfalab/core-components-navigation-bar-private": "2.0.6-alfasans",
|
|
16
|
+
"@alfalab/core-components-shared": "2.1.1-alfasans",
|
|
17
17
|
"classnames": "^2.5.1",
|
|
18
18
|
"react-merge-refs": "^1.1.0",
|
|
19
19
|
"tslib": "^2.4.0"
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"access": "public",
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
|
-
"themesVersion": "15.0.
|
|
30
|
-
"varsVersion": "11.0.2"
|
|
29
|
+
"themesVersion": "15.0.4-alfasans",
|
|
30
|
+
"varsVersion": "11.0.2-alfasans"
|
|
31
31
|
}
|
|
@@ -7,6 +7,7 @@ import { ResponsiveContext } from '../../ResponsiveContext';
|
|
|
7
7
|
|
|
8
8
|
import layoutStyles from '../footer/layout.module.css';
|
|
9
9
|
import styles from './index.module.css';
|
|
10
|
+
import mobileLayoutStyles from './mobile.layout.module.css';
|
|
10
11
|
|
|
11
12
|
export interface ControlsProps {
|
|
12
13
|
/**
|
|
@@ -57,6 +58,9 @@ export const Controls: React.FC<ControlsProps> = ({
|
|
|
57
58
|
styles.component,
|
|
58
59
|
layoutStyles[layout],
|
|
59
60
|
gap && layoutStyles[`gap-${gap}`],
|
|
61
|
+
{
|
|
62
|
+
[mobileLayoutStyles[layout]]: view === 'mobile',
|
|
63
|
+
},
|
|
60
64
|
)}
|
|
61
65
|
>
|
|
62
66
|
{shouldReverse ? (
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.column {
|
|
4
|
+
& > *:not(:last-child):not(:only-child) {
|
|
5
|
+
margin-bottom: var(--modal-footer-mobile-default-gap);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.start,
|
|
10
|
+
.center,
|
|
11
|
+
.space-between {
|
|
12
|
+
& > *:not(:last-child):not(:only-child) {
|
|
13
|
+
margin-right: var(--modal-footer-mobile-default-gap);
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/vars.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
--modal-header-background: var(--color-light-modal-bg-primary);
|
|
7
7
|
--modal-footer-background: var(--color-light-modal-bg-primary);
|
|
8
8
|
--modal-footer-default-gap: var(--gap-16);
|
|
9
|
+
--modal-footer-mobile-default-gap: var(--gap-8);
|
|
9
10
|
|
|
10
11
|
/* sizes */
|
|
11
12
|
--modal-s-width: 500px;
|
|
@@ -34,6 +35,6 @@
|
|
|
34
35
|
|
|
35
36
|
/* paddings */
|
|
36
37
|
--modal-header-mobile-top-padding: var(--gap-4);
|
|
37
|
-
--modal-header-mobile-paddings: var(--modal-header-mobile-top-padding) var(--gap-
|
|
38
|
-
var(--gap-
|
|
38
|
+
--modal-header-mobile-paddings: var(--modal-header-mobile-top-padding) var(--gap-12)
|
|
39
|
+
var(--gap-4) var(--gap-12);
|
|
39
40
|
}
|
package/transitions.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
.modal__appear_1go5r,
|
|
2
|
+
.modal__enter_1go5r {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transform: translateY(15px);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
8
|
-
.
|
|
7
|
+
.modal__appearActive_1go5r,
|
|
8
|
+
.modal__enterActive_1go5r {
|
|
9
9
|
opacity: 1;
|
|
10
10
|
transform: translateY(0);
|
|
11
11
|
transition:
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
transform 200ms ease-in;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.modal__exit_1go5r {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
transform: translateY(0);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
22
|
-
.
|
|
21
|
+
.modal__exitActive_1go5r,
|
|
22
|
+
.modal__exitDone_1go5r {
|
|
23
23
|
opacity: 0;
|
|
24
24
|
transform: translateY(15px);
|
|
25
25
|
transition:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./transitions.css');
|
|
4
4
|
|
|
5
|
-
var transitions = {"appear":"
|
|
5
|
+
var transitions = {"appear":"modal__appear_1go5r","enter":"modal__enter_1go5r","appearActive":"modal__appearActive_1go5r","enterActive":"modal__enterActive_1go5r","exit":"modal__exit_1go5r","exitActive":"modal__exitActive_1go5r","exitDone":"modal__exitDone_1go5r"};
|
|
6
6
|
|
|
7
7
|
module.exports = transitions;
|
|
8
8
|
//# sourceMappingURL=transitions.module.css.js.map
|