@alfalab/core-components-modal 8.1.3 → 9.0.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/Component.js +3 -3
- package/Component.responsive.d.ts +3 -2
- package/Component.responsive.js +7 -7
- package/components/content/Component.js +3 -3
- package/components/content/desktop.css +7 -7
- package/components/content/index.css +4 -4
- package/components/content/mobile.css +3 -3
- package/components/controls/Component.d.ts +29 -0
- package/components/controls/Component.js +30 -0
- package/components/controls/index.css +4 -0
- package/components/controls/index.d.ts +1 -0
- package/components/controls/index.js +13 -0
- package/components/footer/Component.js +5 -8
- package/components/footer/desktop.css +9 -9
- package/components/footer/index.css +9 -9
- package/components/footer/layout.css +17 -35
- package/components/footer/mobile.css +3 -3
- package/components/header/Component.js +3 -3
- package/components/header/desktop.css +16 -16
- package/components/header/index.css +9 -9
- package/components/header/mobile.css +4 -4
- package/cssm/Component.responsive.d.ts +3 -2
- package/cssm/Component.responsive.js +8 -8
- package/cssm/components/controls/Component.d.ts +29 -0
- package/cssm/components/controls/Component.js +30 -0
- package/cssm/components/controls/index.d.ts +1 -0
- package/cssm/components/controls/index.js +14 -0
- package/cssm/components/controls/index.module.css +3 -0
- package/cssm/components/footer/Component.js +0 -1
- package/cssm/components/footer/index.module.css +5 -5
- package/cssm/components/footer/layout.module.css +8 -26
- package/cssm/components/header/desktop.module.css +1 -1
- package/cssm/components/header/index.module.css +5 -5
- package/cssm/desktop/Component.desktop.d.ts +5 -3
- package/cssm/desktop/Component.desktop.js +4 -1
- package/cssm/desktop/index.js +3 -1
- package/cssm/index.js +4 -2
- package/cssm/mobile/Component.mobile.d.ts +2 -0
- package/cssm/mobile/Component.mobile.js +4 -1
- package/cssm/mobile/index.js +3 -1
- package/cssm/typings.d.ts +4 -0
- package/desktop/Component.desktop.d.ts +5 -3
- package/desktop/Component.desktop.js +3 -0
- package/desktop/desktop.css +9 -9
- package/desktop/index.js +2 -0
- package/esm/Component.js +3 -3
- package/esm/Component.responsive.d.ts +3 -2
- package/esm/Component.responsive.js +7 -7
- package/esm/components/content/Component.js +3 -3
- package/esm/components/content/desktop.css +7 -7
- package/esm/components/content/index.css +4 -4
- package/esm/components/content/mobile.css +3 -3
- package/esm/components/controls/Component.d.ts +29 -0
- package/esm/components/controls/Component.js +21 -0
- package/esm/components/controls/index.css +4 -0
- package/esm/components/controls/index.d.ts +1 -0
- package/esm/components/controls/index.js +5 -0
- package/esm/components/footer/Component.js +4 -7
- package/esm/components/footer/desktop.css +9 -9
- package/esm/components/footer/index.css +9 -9
- package/esm/components/footer/layout.css +17 -35
- package/esm/components/footer/mobile.css +3 -3
- package/esm/components/header/Component.js +3 -3
- package/esm/components/header/desktop.css +16 -16
- package/esm/components/header/index.css +9 -9
- package/esm/components/header/mobile.css +4 -4
- package/esm/desktop/Component.desktop.d.ts +5 -3
- package/esm/desktop/Component.desktop.js +3 -0
- package/esm/desktop/desktop.css +9 -9
- package/esm/desktop/index.js +2 -0
- package/esm/index.js +3 -1
- package/esm/layout.module-9ffd30f9.js +4 -0
- package/esm/mobile/Component.mobile.d.ts +2 -0
- package/esm/mobile/Component.mobile.js +3 -0
- package/esm/mobile/index.js +2 -0
- package/esm/mobile/mobile.css +2 -2
- package/esm/transitions.css +8 -8
- package/esm/typings.d.ts +4 -0
- package/index.js +3 -1
- package/layout.module-57c7b9be.js +6 -0
- package/mobile/Component.mobile.d.ts +2 -0
- package/mobile/Component.mobile.js +3 -0
- package/mobile/index.js +2 -0
- package/mobile/mobile.css +2 -2
- package/modern/Component.js +3 -3
- package/modern/Component.responsive.d.ts +3 -2
- package/modern/Component.responsive.js +7 -7
- package/modern/components/content/Component.js +3 -3
- package/modern/components/content/desktop.css +7 -7
- package/modern/components/content/index.css +4 -4
- package/modern/components/content/mobile.css +3 -3
- package/modern/components/controls/Component.d.ts +29 -0
- package/modern/components/controls/Component.js +20 -0
- package/modern/components/controls/index.css +4 -0
- package/modern/components/controls/index.d.ts +1 -0
- package/modern/components/controls/index.js +5 -0
- package/modern/components/footer/Component.js +4 -7
- package/modern/components/footer/desktop.css +9 -9
- package/modern/components/footer/index.css +9 -9
- package/modern/components/footer/layout.css +17 -35
- package/modern/components/footer/mobile.css +3 -3
- package/modern/components/header/Component.js +3 -3
- package/modern/components/header/desktop.css +16 -16
- package/modern/components/header/index.css +9 -9
- package/modern/components/header/mobile.css +4 -4
- package/modern/desktop/Component.desktop.d.ts +5 -3
- package/modern/desktop/Component.desktop.js +4 -1
- package/modern/desktop/desktop.css +9 -9
- package/modern/desktop/index.js +2 -0
- package/modern/index.js +3 -1
- package/modern/layout.module-29d4c7c9.js +4 -0
- package/modern/mobile/Component.mobile.d.ts +2 -0
- package/modern/mobile/Component.mobile.js +3 -0
- package/modern/mobile/index.js +2 -0
- package/modern/mobile/mobile.css +2 -2
- package/modern/transitions.css +8 -8
- package/modern/typings.d.ts +4 -0
- package/package.json +4 -4
- package/src/Component.responsive.tsx +7 -13
- package/src/components/controls/Component.tsx +72 -0
- package/src/components/controls/index.module.css +3 -0
- package/src/components/controls/index.ts +1 -0
- package/src/components/footer/Component.tsx +0 -1
- package/src/components/footer/layout.module.css +8 -34
- package/src/desktop/Component.desktop.tsx +4 -5
- package/src/mobile/Component.mobile.tsx +2 -0
- package/src/typings.ts +5 -0
- package/src/vars.css +7 -7
- package/transitions.css +8 -8
- package/typings.d.ts +4 -0
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { ControlsProps } from "../components/controls/index";
|
|
4
|
+
import { HeaderProps } from "../components/header/Component";
|
|
5
|
+
declare const ModalDesktop: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
|
|
5
6
|
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
6
7
|
fullscreen?: boolean | undefined;
|
|
7
8
|
fixedPosition?: boolean | undefined;
|
|
8
9
|
hasCloser?: boolean | undefined;
|
|
9
10
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
10
11
|
Content: React.FC<import("../typings").ContentProps>;
|
|
11
|
-
Header: React.FC<
|
|
12
|
+
Header: React.FC<Omit<HeaderProps, "titleSize" | "subtitle">>;
|
|
12
13
|
Footer: React.FC<import("../components/footer/Component").FooterProps>;
|
|
14
|
+
Controls: React.FC<Omit<ControlsProps, "mobileLayout">>;
|
|
13
15
|
};
|
|
14
16
|
export { ModalDesktop };
|
|
@@ -2,6 +2,7 @@ import { __assign } from 'tslib';
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { Modal } from '../Component.js';
|
|
4
4
|
import { Content } from '../components/content/Component.js';
|
|
5
|
+
import { Controls } from '../components/controls/Component.js';
|
|
5
6
|
import { Footer } from '../components/footer/Component.js';
|
|
6
7
|
import { Header } from '../components/header/Component.js';
|
|
7
8
|
import 'react-merge-refs';
|
|
@@ -9,6 +10,7 @@ import 'classnames';
|
|
|
9
10
|
import '@alfalab/core-components-base-modal/esm';
|
|
10
11
|
import '../ResponsiveContext.js';
|
|
11
12
|
import '../Context.js';
|
|
13
|
+
import '../layout.module-9ffd30f9.js';
|
|
12
14
|
import '@alfalab/core-components-navigation-bar/esm';
|
|
13
15
|
|
|
14
16
|
var ModalDesktopComponent = forwardRef(function (props, ref) { return (React.createElement(Modal, __assign({}, props, { ref: ref, view: 'desktop' }))); });
|
|
@@ -16,6 +18,7 @@ var ModalDesktop = Object.assign(ModalDesktopComponent, {
|
|
|
16
18
|
Content: Content,
|
|
17
19
|
Header: Header,
|
|
18
20
|
Footer: Footer,
|
|
21
|
+
Controls: Controls,
|
|
19
22
|
});
|
|
20
23
|
|
|
21
24
|
export { ModalDesktop };
|
package/esm/desktop/desktop.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ps40 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
/* mobile */
|
|
36
36
|
|
|
37
37
|
/* paddings */
|
|
38
|
-
} .
|
|
38
|
+
} .modal__wrapper_1hhc8 {
|
|
39
39
|
padding-top: var(--modal-vertical-padding);
|
|
40
40
|
padding-bottom: var(--modal-vertical-padding);
|
|
41
|
-
} .
|
|
41
|
+
} .modal__component_1hhc8 {
|
|
42
42
|
width: 100%;
|
|
43
43
|
max-width: 100%;
|
|
44
44
|
border-radius: var(--modal-border-radius);
|
|
45
|
-
} .
|
|
45
|
+
} .modal__fullscreen_1hhc8 {
|
|
46
46
|
padding-top: 0;
|
|
47
47
|
padding-bottom: 0
|
|
48
|
-
} .
|
|
48
|
+
} .modal__fullscreen_1hhc8 .modal__component_1hhc8 {
|
|
49
49
|
flex: 1;
|
|
50
50
|
border-radius: 0;
|
|
51
|
-
} .
|
|
51
|
+
} .modal__s_1hhc8 {
|
|
52
52
|
width: var(--modal-s-width);
|
|
53
|
-
} .
|
|
53
|
+
} .modal__m_1hhc8 {
|
|
54
54
|
width: var(--modal-m-width);
|
|
55
|
-
} .
|
|
55
|
+
} .modal__l_1hhc8 {
|
|
56
56
|
width: var(--modal-l-width);
|
|
57
|
-
} .
|
|
57
|
+
} .modal__xl_1hhc8 {
|
|
58
58
|
width: var(--modal-xl-width);
|
|
59
59
|
}
|
package/esm/desktop/index.js
CHANGED
|
@@ -8,6 +8,8 @@ import '@alfalab/core-components-base-modal/esm';
|
|
|
8
8
|
import '../ResponsiveContext.js';
|
|
9
9
|
import '../components/content/Component.js';
|
|
10
10
|
import '../Context.js';
|
|
11
|
+
import '../components/controls/Component.js';
|
|
12
|
+
import '../layout.module-9ffd30f9.js';
|
|
11
13
|
import '../components/footer/Component.js';
|
|
12
14
|
import '../components/header/Component.js';
|
|
13
15
|
import '@alfalab/core-components-navigation-bar/esm';
|
package/esm/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export { ModalResponsive as Modal } from './Component.responsive.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '@alfalab/
|
|
4
|
+
import '@alfalab/core-components-mq/esm';
|
|
5
5
|
import './components/content/Component.js';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import './Context.js';
|
|
8
8
|
import '@alfalab/core-components-base-modal/esm';
|
|
9
9
|
import './ResponsiveContext.js';
|
|
10
|
+
import './components/controls/Component.js';
|
|
11
|
+
import './layout.module-9ffd30f9.js';
|
|
10
12
|
import './components/footer/Component.js';
|
|
11
13
|
import './components/header/Component.js';
|
|
12
14
|
import '@alfalab/core-components-navigation-bar/esm';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var layoutStyles = {"column":"modal__column_1gona","gap-16":"modal__gap-16_1gona","gap-24":"modal__gap-24_1gona","gap-32":"modal__gap-32_1gona","start":"modal__start_1gona","center":"modal__center_1gona","space-between":"modal__space-between_1gona"};
|
|
2
|
+
require('./components/footer/layout.css')
|
|
3
|
+
|
|
4
|
+
export { layoutStyles as l };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { ControlsProps } from "../components/controls/index";
|
|
3
4
|
import { ModalMobileProps } from "../typings";
|
|
4
5
|
declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
5
6
|
Content: React.FC<import("../typings").ContentProps>;
|
|
6
7
|
Header: React.FC<import("../components/header/Component").HeaderProps>;
|
|
7
8
|
Footer: React.FC<import("../components/footer/Component").FooterProps>;
|
|
9
|
+
Controls: React.FC<Omit<ControlsProps, "mobileLayout">>;
|
|
8
10
|
};
|
|
9
11
|
export { ModalMobile };
|
|
@@ -2,6 +2,7 @@ import { __assign } from 'tslib';
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { Modal } from '../Component.js';
|
|
4
4
|
import { Content } from '../components/content/Component.js';
|
|
5
|
+
import { Controls } from '../components/controls/Component.js';
|
|
5
6
|
import { Footer } from '../components/footer/Component.js';
|
|
6
7
|
import { Header } from '../components/header/Component.js';
|
|
7
8
|
import 'react-merge-refs';
|
|
@@ -9,6 +10,7 @@ import 'classnames';
|
|
|
9
10
|
import '@alfalab/core-components-base-modal/esm';
|
|
10
11
|
import '../ResponsiveContext.js';
|
|
11
12
|
import '../Context.js';
|
|
13
|
+
import '../layout.module-9ffd30f9.js';
|
|
12
14
|
import '@alfalab/core-components-navigation-bar/esm';
|
|
13
15
|
|
|
14
16
|
var ModalMobileComponent = forwardRef(function (props, ref) { return (React.createElement(Modal, __assign({}, props, { ref: ref, view: 'mobile' }))); });
|
|
@@ -16,6 +18,7 @@ var ModalMobile = Object.assign(ModalMobileComponent, {
|
|
|
16
18
|
Content: Content,
|
|
17
19
|
Header: Header,
|
|
18
20
|
Footer: Footer,
|
|
21
|
+
Controls: Controls,
|
|
19
22
|
});
|
|
20
23
|
|
|
21
24
|
export { ModalMobile };
|
package/esm/mobile/index.js
CHANGED
|
@@ -8,6 +8,8 @@ import '@alfalab/core-components-base-modal/esm';
|
|
|
8
8
|
import '../ResponsiveContext.js';
|
|
9
9
|
import '../components/content/Component.js';
|
|
10
10
|
import '../Context.js';
|
|
11
|
+
import '../components/controls/Component.js';
|
|
12
|
+
import '../layout.module-9ffd30f9.js';
|
|
11
13
|
import '../components/footer/Component.js';
|
|
12
14
|
import '../components/header/Component.js';
|
|
13
15
|
import '@alfalab/core-components-navigation-bar/esm';
|
package/esm/mobile/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1hozm */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/* mobile */
|
|
28
28
|
|
|
29
29
|
/* paddings */
|
|
30
|
-
} .
|
|
30
|
+
} .modal__component_odxlq {
|
|
31
31
|
flex: 1;
|
|
32
32
|
width: 100%;
|
|
33
33
|
max-width: 600px;
|
package/esm/transitions.css
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
3
|
-
.
|
|
1
|
+
/* hash: i34gk */
|
|
2
|
+
.modal__appear_4gu03,
|
|
3
|
+
.modal__enter_4gu03 {
|
|
4
4
|
opacity: 0;
|
|
5
5
|
transform: translateY(15px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
9
|
-
.
|
|
8
|
+
.modal__appearActive_4gu03,
|
|
9
|
+
.modal__enterActive_4gu03 {
|
|
10
10
|
opacity: 1;
|
|
11
11
|
transform: translateY(0);
|
|
12
12
|
transition: opacity 200ms ease-in, transform 200ms ease-in;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.modal__exit_4gu03 {
|
|
16
16
|
opacity: 1;
|
|
17
17
|
transform: translateY(0);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
21
|
-
.
|
|
20
|
+
.modal__exitActive_4gu03,
|
|
21
|
+
.modal__exitDone_4gu03 {
|
|
22
22
|
opacity: 0;
|
|
23
23
|
transform: translateY(15px);
|
|
24
24
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
package/esm/typings.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ type ModalResponsiveProps = ModalDesktopProps & {
|
|
|
29
29
|
* @default 1024
|
|
30
30
|
*/
|
|
31
31
|
breakpoint?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Значение по-умолчанию для хука useMatchMedia
|
|
34
|
+
*/
|
|
35
|
+
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
32
36
|
};
|
|
33
37
|
type View = 'desktop' | 'mobile';
|
|
34
38
|
type TResponsiveModalContext = {
|
package/index.js
CHANGED
|
@@ -5,12 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var Component_responsive = require('./Component.responsive.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
|
-
require('@alfalab/
|
|
8
|
+
require('@alfalab/core-components-mq');
|
|
9
9
|
require('./components/content/Component.js');
|
|
10
10
|
require('classnames');
|
|
11
11
|
require('./Context.js');
|
|
12
12
|
require('@alfalab/core-components-base-modal');
|
|
13
13
|
require('./ResponsiveContext.js');
|
|
14
|
+
require('./components/controls/Component.js');
|
|
15
|
+
require('./layout.module-57c7b9be.js');
|
|
14
16
|
require('./components/footer/Component.js');
|
|
15
17
|
require('./components/header/Component.js');
|
|
16
18
|
require('@alfalab/core-components-navigation-bar');
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var layoutStyles = {"column":"modal__column_1gona","gap-16":"modal__gap-16_1gona","gap-24":"modal__gap-24_1gona","gap-32":"modal__gap-32_1gona","start":"modal__start_1gona","center":"modal__center_1gona","space-between":"modal__space-between_1gona"};
|
|
4
|
+
require('./components/footer/layout.css')
|
|
5
|
+
|
|
6
|
+
exports.layoutStyles = layoutStyles;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { ControlsProps } from "../components/controls/index";
|
|
3
4
|
import { ModalMobileProps } from "../typings";
|
|
4
5
|
declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
5
6
|
Content: React.FC<import("../typings").ContentProps>;
|
|
6
7
|
Header: React.FC<import("../components/header/Component").HeaderProps>;
|
|
7
8
|
Footer: React.FC<import("../components/footer/Component").FooterProps>;
|
|
9
|
+
Controls: React.FC<Omit<ControlsProps, "mobileLayout">>;
|
|
8
10
|
};
|
|
9
11
|
export { ModalMobile };
|
|
@@ -6,6 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var Component = require('../Component.js');
|
|
8
8
|
var components_content_Component = require('../components/content/Component.js');
|
|
9
|
+
var components_controls_Component = require('../components/controls/Component.js');
|
|
9
10
|
var components_footer_Component = require('../components/footer/Component.js');
|
|
10
11
|
var components_header_Component = require('../components/header/Component.js');
|
|
11
12
|
require('react-merge-refs');
|
|
@@ -13,6 +14,7 @@ require('classnames');
|
|
|
13
14
|
require('@alfalab/core-components-base-modal');
|
|
14
15
|
require('../ResponsiveContext.js');
|
|
15
16
|
require('../Context.js');
|
|
17
|
+
require('../layout.module-57c7b9be.js');
|
|
16
18
|
require('@alfalab/core-components-navigation-bar');
|
|
17
19
|
|
|
18
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -24,6 +26,7 @@ var ModalMobile = Object.assign(ModalMobileComponent, {
|
|
|
24
26
|
Content: components_content_Component.Content,
|
|
25
27
|
Header: components_header_Component.Header,
|
|
26
28
|
Footer: components_footer_Component.Footer,
|
|
29
|
+
Controls: components_controls_Component.Controls,
|
|
27
30
|
});
|
|
28
31
|
|
|
29
32
|
exports.ModalMobile = ModalMobile;
|
package/mobile/index.js
CHANGED
|
@@ -12,6 +12,8 @@ require('@alfalab/core-components-base-modal');
|
|
|
12
12
|
require('../ResponsiveContext.js');
|
|
13
13
|
require('../components/content/Component.js');
|
|
14
14
|
require('../Context.js');
|
|
15
|
+
require('../components/controls/Component.js');
|
|
16
|
+
require('../layout.module-57c7b9be.js');
|
|
15
17
|
require('../components/footer/Component.js');
|
|
16
18
|
require('../components/header/Component.js');
|
|
17
19
|
require('@alfalab/core-components-navigation-bar');
|
package/mobile/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1hozm */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/* mobile */
|
|
28
28
|
|
|
29
29
|
/* paddings */
|
|
30
|
-
} .
|
|
30
|
+
} .modal__component_odxlq {
|
|
31
31
|
flex: 1;
|
|
32
32
|
width: 100%;
|
|
33
33
|
max-width: 600px;
|
package/modern/Component.js
CHANGED
|
@@ -4,13 +4,13 @@ import cn from 'classnames';
|
|
|
4
4
|
import { BaseModal } from '@alfalab/core-components-base-modal/modern';
|
|
5
5
|
import { ResponsiveContext } from './ResponsiveContext.js';
|
|
6
6
|
|
|
7
|
-
const desktopStyles = {"wrapper":"
|
|
7
|
+
const desktopStyles = {"wrapper":"modal__wrapper_1hhc8","component":"modal__component_1hhc8","fullscreen":"modal__fullscreen_1hhc8","s":"modal__s_1hhc8","m":"modal__m_1hhc8","l":"modal__l_1hhc8","xl":"modal__xl_1hhc8"};
|
|
8
8
|
require('./desktop/desktop.css')
|
|
9
9
|
|
|
10
|
-
const mobileStyles = {"component":"
|
|
10
|
+
const mobileStyles = {"component":"modal__component_odxlq"};
|
|
11
11
|
require('./mobile/mobile.css')
|
|
12
12
|
|
|
13
|
-
const transitions = {"appear":"
|
|
13
|
+
const transitions = {"appear":"modal__appear_4gu03","enter":"modal__enter_4gu03","appearActive":"modal__appearActive_4gu03","enterActive":"modal__enterActive_4gu03","exit":"modal__exit_4gu03","exitActive":"modal__exitActive_4gu03","exitDone":"modal__exitDone_4gu03"};
|
|
14
14
|
require('./transitions.css')
|
|
15
15
|
|
|
16
16
|
const Modal = forwardRef(({ size = 's', fixedPosition, fullscreen, children, className, wrapperClassName, transitionProps = {}, view, ...restProps }, ref) => {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
declare const ModalResponsive: React.ForwardRefExoticComponent<BaseModalProps & {
|
|
3
|
+
declare const ModalResponsive: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
|
|
5
4
|
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
6
5
|
fullscreen?: boolean | undefined;
|
|
7
6
|
fixedPosition?: boolean | undefined;
|
|
8
7
|
hasCloser?: boolean | undefined;
|
|
9
8
|
} & {
|
|
10
9
|
breakpoint?: number | undefined;
|
|
10
|
+
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
11
11
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
12
12
|
Header: React.FC<import("./components/header/Component").HeaderProps>;
|
|
13
13
|
Content: React.FC<import("./typings").ContentProps>;
|
|
14
14
|
Footer: React.FC<import("./components/footer/Component").FooterProps>;
|
|
15
|
+
Controls: React.FC<import("./components/controls/index").ControlsProps>;
|
|
15
16
|
};
|
|
16
17
|
export { ModalResponsive };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useMatchMedia } from '@alfalab/core-components-mq/modern';
|
|
3
3
|
import { Content } from './components/content/Component.js';
|
|
4
|
+
import { Controls } from './components/controls/Component.js';
|
|
4
5
|
import { Footer } from './components/footer/Component.js';
|
|
5
6
|
import { Header } from './components/header/Component.js';
|
|
6
7
|
import { Modal } from './Component.js';
|
|
@@ -8,20 +9,19 @@ import 'classnames';
|
|
|
8
9
|
import './Context.js';
|
|
9
10
|
import '@alfalab/core-components-base-modal/modern';
|
|
10
11
|
import './ResponsiveContext.js';
|
|
12
|
+
import './layout.module-29d4c7c9.js';
|
|
11
13
|
import '@alfalab/core-components-navigation-bar/modern';
|
|
12
14
|
import 'react-merge-refs';
|
|
13
15
|
|
|
14
|
-
const ModalResponsiveComponent = forwardRef(({ children, breakpoint = 1024, ...restProps }, ref) => {
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
['desktop', `(min-width: ${breakpoint}px)`],
|
|
18
|
-
], 'desktop');
|
|
19
|
-
return (React.createElement(Modal, { ref: ref, ...restProps, view: view }, children));
|
|
16
|
+
const ModalResponsiveComponent = forwardRef(({ children, breakpoint = 1024, defaultMatchMediaValue = true, ...restProps }, ref) => {
|
|
17
|
+
const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
|
|
18
|
+
return (React.createElement(Modal, { ref: ref, ...restProps, view: isDesktop ? 'desktop' : 'mobile' }, children));
|
|
20
19
|
});
|
|
21
20
|
const ModalResponsive = Object.assign(ModalResponsiveComponent, {
|
|
22
21
|
Header,
|
|
23
22
|
Content,
|
|
24
23
|
Footer,
|
|
24
|
+
Controls,
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
export { ModalResponsive };
|
|
@@ -4,13 +4,13 @@ import { ModalContext } from '../../Context.js';
|
|
|
4
4
|
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
5
5
|
import '@alfalab/core-components-base-modal/modern';
|
|
6
6
|
|
|
7
|
-
const desktopStyles = {"s":"
|
|
7
|
+
const desktopStyles = {"s":"modal__s_1ps95","m":"modal__m_1ps95","l":"modal__l_1ps95","xl":"modal__xl_1ps95","fullscreen":"modal__fullscreen_1ps95"};
|
|
8
8
|
require('./desktop.css')
|
|
9
9
|
|
|
10
|
-
const styles = {"content":"
|
|
10
|
+
const styles = {"content":"modal__content_1ug4p","withHeader":"modal__withHeader_1ug4p","flex":"modal__flex_1ug4p"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
|
-
const mobileStyles = {"content":"
|
|
13
|
+
const mobileStyles = {"content":"modal__content_y4sbt"};
|
|
14
14
|
require('./mobile.css')
|
|
15
15
|
|
|
16
16
|
const Content = ({ children, flex, className }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vsqki */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
/* mobile */
|
|
31
31
|
|
|
32
32
|
/* paddings */
|
|
33
|
-
} .
|
|
34
|
-
.
|
|
35
|
-
.
|
|
36
|
-
.
|
|
37
|
-
.
|
|
33
|
+
} .modal__s_1ps95,
|
|
34
|
+
.modal__m_1ps95,
|
|
35
|
+
.modal__l_1ps95,
|
|
36
|
+
.modal__xl_1ps95,
|
|
37
|
+
.modal__fullscreen_1ps95 {
|
|
38
38
|
padding: var(--modal-s-content-paddings)
|
|
39
|
-
} .
|
|
39
|
+
} .modal__s_1ps95:last-child, .modal__m_1ps95:last-child, .modal__l_1ps95:last-child, .modal__xl_1ps95:last-child, .modal__fullscreen_1ps95:last-child {
|
|
40
40
|
padding-bottom: var(--modal-s-content-only-bottom-padding);
|
|
41
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: e0vq9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
/* mobile */
|
|
28
28
|
|
|
29
29
|
/* paddings */
|
|
30
|
-
} .
|
|
30
|
+
} .modal__content_1ug4p {
|
|
31
31
|
position: relative;
|
|
32
32
|
box-sizing: border-box;
|
|
33
33
|
width: 100%;
|
|
34
34
|
z-index: 0
|
|
35
|
-
} .
|
|
35
|
+
} .modal__content_1ug4p.modal__withHeader_1ug4p {
|
|
36
36
|
padding-top: 0;
|
|
37
|
-
} .
|
|
37
|
+
} .modal__flex_1ug4p {
|
|
38
38
|
flex: 1;
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: pcf58 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
/* mobile */
|
|
29
29
|
|
|
30
30
|
/* paddings */
|
|
31
|
-
} .
|
|
31
|
+
} .modal__content_y4sbt {
|
|
32
32
|
padding: var(--gap-m) var(--gap-m) 0
|
|
33
|
-
} .
|
|
33
|
+
} .modal__content_y4sbt:last-child {
|
|
34
34
|
padding-bottom: var(--gap-m);
|
|
35
35
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
interface ControlsProps {
|
|
5
|
+
/**
|
|
6
|
+
* Основной слот
|
|
7
|
+
*/
|
|
8
|
+
primary?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Дополнительный слот
|
|
11
|
+
*/
|
|
12
|
+
secondary?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Выравнивание элементов футера
|
|
15
|
+
* @default start
|
|
16
|
+
*/
|
|
17
|
+
layout?: 'start' | 'center' | 'space-between' | 'column';
|
|
18
|
+
/**
|
|
19
|
+
* Выравнивание элементов футера (мобильный view)
|
|
20
|
+
* @default start
|
|
21
|
+
*/
|
|
22
|
+
mobileLayout?: 'start' | 'center' | 'space-between' | 'column';
|
|
23
|
+
/**
|
|
24
|
+
* Отступы между элементами футера
|
|
25
|
+
*/
|
|
26
|
+
gap?: 16 | 24 | 32;
|
|
27
|
+
}
|
|
28
|
+
declare const Controls: React.FC<ControlsProps>;
|
|
29
|
+
export { ControlsProps, Controls };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
4
|
+
import { l as layoutStyles } from '../../layout.module-29d4c7c9.js';
|
|
5
|
+
|
|
6
|
+
const styles = {"component":"modal__component_hhndl"};
|
|
7
|
+
require('./index.css')
|
|
8
|
+
|
|
9
|
+
const Controls = ({ primary, secondary, gap = 16, layout: layoutProp = 'start', mobileLayout = layoutProp, }) => {
|
|
10
|
+
const { view } = useContext(ResponsiveContext);
|
|
11
|
+
const layout = view === 'mobile' ? mobileLayout : layoutProp;
|
|
12
|
+
const shouldReverse = view === 'mobile' && layout !== 'column';
|
|
13
|
+
return (React.createElement("div", { className: cn(styles.component, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`]) }, shouldReverse ? (React.createElement(React.Fragment, null,
|
|
14
|
+
secondary,
|
|
15
|
+
primary)) : (React.createElement(React.Fragment, null,
|
|
16
|
+
primary,
|
|
17
|
+
secondary))));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { Controls };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -2,18 +2,16 @@ import React, { useContext, useEffect } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ModalContext } from '../../Context.js';
|
|
4
4
|
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
5
|
+
import { l as layoutStyles } from '../../layout.module-29d4c7c9.js';
|
|
5
6
|
import '@alfalab/core-components-base-modal/modern';
|
|
6
7
|
|
|
7
|
-
const desktopStyles = {"footer":"
|
|
8
|
+
const desktopStyles = {"footer":"modal__footer_kkmzz","sticky":"modal__sticky_kkmzz","fullscreen":"modal__fullscreen_kkmzz","s":"modal__s_kkmzz","m":"modal__m_kkmzz","l":"modal__l_kkmzz","xl":"modal__xl_kkmzz"};
|
|
8
9
|
require('./desktop.css')
|
|
9
10
|
|
|
10
|
-
const styles = {"footer":"
|
|
11
|
+
const styles = {"footer":"modal__footer_d1tnp","sticky":"modal__sticky_d1tnp","highlighted":"modal__highlighted_d1tnp"};
|
|
11
12
|
require('./index.css')
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
-
require('./layout.css')
|
|
15
|
-
|
|
16
|
-
const mobileStyles = {"footer":"modal__footer_159cp","sticky":"modal__sticky_159cp"};
|
|
14
|
+
const mobileStyles = {"footer":"modal__footer_1d9qk","sticky":"modal__sticky_1d9qk"};
|
|
17
15
|
require('./mobile.css')
|
|
18
16
|
|
|
19
17
|
const Footer = ({ children, className, sticky, layout = 'start', gap }) => {
|
|
@@ -30,7 +28,6 @@ const Footer = ({ children, className, sticky, layout = 'start', gap }) => {
|
|
|
30
28
|
[desktopStyles[size]]: view === 'desktop',
|
|
31
29
|
[mobileStyles.footer]: view === 'mobile',
|
|
32
30
|
[mobileStyles.sticky]: view === 'mobile' && sticky,
|
|
33
|
-
[layoutStyles[`${layout}-mobile`]]: view === 'mobile',
|
|
34
31
|
}) }, children));
|
|
35
32
|
};
|
|
36
33
|
|