@cloud-ru/uikit-product-mobile-modal 0.9.18 → 0.9.20
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 +22 -0
- package/dist/cjs/components/AdaptiveDrawer/AdaptiveDrawer.d.ts +10 -0
- package/dist/cjs/components/AdaptiveDrawer/AdaptiveDrawer.js +34 -0
- package/dist/cjs/components/AdaptiveDrawer/index.d.ts +1 -0
- package/dist/cjs/components/AdaptiveDrawer/index.js +17 -0
- package/dist/cjs/components/AdaptiveModal/AdaptiveModal.d.ts +10 -0
- package/dist/cjs/components/AdaptiveModal/AdaptiveModal.js +31 -0
- package/dist/cjs/components/AdaptiveModal/index.d.ts +1 -0
- package/dist/cjs/components/AdaptiveModal/index.js +17 -0
- package/dist/cjs/components/MobileModal/MobileModal.d.ts +46 -0
- package/dist/cjs/components/MobileModal/MobileModal.js +47 -0
- package/dist/cjs/components/MobileModal/index.d.ts +1 -0
- package/dist/cjs/components/MobileModal/index.js +17 -0
- package/dist/cjs/components/MobileModal/styles.module.css +21 -0
- package/dist/cjs/components/MobileModalCustom/MobileModalCustom.d.ts +28 -0
- package/dist/cjs/components/MobileModalCustom/MobileModalCustom.js +27 -0
- package/dist/cjs/components/MobileModalCustom/index.d.ts +1 -0
- package/dist/cjs/components/MobileModalCustom/index.js +17 -0
- package/dist/cjs/components/index.d.ts +4 -0
- package/dist/cjs/components/index.js +20 -0
- package/dist/cjs/constants.d.ts +37 -0
- package/dist/cjs/constants.js +40 -0
- package/dist/cjs/helperComponents/Body/Body.d.ts +11 -0
- package/dist/cjs/helperComponents/Body/Body.js +27 -0
- package/dist/cjs/helperComponents/Body/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Body/index.js +17 -0
- package/dist/cjs/helperComponents/Body/styles.module.css +16 -0
- package/dist/cjs/helperComponents/Footer/Footer.d.ts +13 -0
- package/dist/cjs/helperComponents/Footer/Footer.js +26 -0
- package/dist/cjs/helperComponents/Footer/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Footer/index.js +17 -0
- package/dist/cjs/helperComponents/Footer/styles.module.css +37 -0
- package/dist/cjs/helperComponents/Header/Header.d.ts +16 -0
- package/dist/cjs/helperComponents/Header/Header.js +28 -0
- package/dist/cjs/helperComponents/Header/index.d.ts +2 -0
- package/dist/cjs/helperComponents/Header/index.js +18 -0
- package/dist/cjs/helperComponents/Header/styles.module.css +56 -0
- package/dist/cjs/helperComponents/Header/types.d.ts +4 -0
- package/dist/cjs/helperComponents/Header/types.js +2 -0
- package/dist/cjs/helperComponents/index.d.ts +3 -0
- package/dist/cjs/helperComponents/index.js +19 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/cjs/types.d.ts +6 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/utils.d.ts +17 -0
- package/dist/cjs/utils.js +28 -0
- package/dist/esm/components/AdaptiveDrawer/AdaptiveDrawer.d.ts +10 -0
- package/dist/esm/components/AdaptiveDrawer/AdaptiveDrawer.js +30 -0
- package/dist/esm/components/AdaptiveDrawer/index.d.ts +1 -0
- package/dist/esm/components/AdaptiveDrawer/index.js +1 -0
- package/dist/esm/components/AdaptiveModal/AdaptiveModal.d.ts +10 -0
- package/dist/esm/components/AdaptiveModal/AdaptiveModal.js +27 -0
- package/dist/esm/components/AdaptiveModal/index.d.ts +1 -0
- package/dist/esm/components/AdaptiveModal/index.js +1 -0
- package/dist/esm/components/MobileModal/MobileModal.d.ts +46 -0
- package/dist/esm/components/MobileModal/MobileModal.js +41 -0
- package/dist/esm/components/MobileModal/index.d.ts +1 -0
- package/dist/esm/components/MobileModal/index.js +1 -0
- package/dist/esm/components/MobileModal/styles.module.css +21 -0
- package/dist/esm/components/MobileModalCustom/MobileModalCustom.d.ts +28 -0
- package/dist/esm/components/MobileModalCustom/MobileModalCustom.js +24 -0
- package/dist/esm/components/MobileModalCustom/index.d.ts +1 -0
- package/dist/esm/components/MobileModalCustom/index.js +1 -0
- package/dist/esm/components/index.d.ts +4 -0
- package/dist/esm/components/index.js +4 -0
- package/dist/esm/constants.d.ts +37 -0
- package/dist/esm/constants.js +37 -0
- package/dist/esm/helperComponents/Body/Body.d.ts +11 -0
- package/dist/esm/helperComponents/Body/Body.js +21 -0
- package/dist/esm/helperComponents/Body/index.d.ts +1 -0
- package/dist/esm/helperComponents/Body/index.js +1 -0
- package/dist/esm/helperComponents/Body/styles.module.css +16 -0
- package/dist/esm/helperComponents/Footer/Footer.d.ts +13 -0
- package/dist/esm/helperComponents/Footer/Footer.js +20 -0
- package/dist/esm/helperComponents/Footer/index.d.ts +1 -0
- package/dist/esm/helperComponents/Footer/index.js +1 -0
- package/dist/esm/helperComponents/Footer/styles.module.css +37 -0
- package/dist/esm/helperComponents/Header/Header.d.ts +16 -0
- package/dist/esm/helperComponents/Header/Header.js +22 -0
- package/dist/esm/helperComponents/Header/index.d.ts +2 -0
- package/dist/esm/helperComponents/Header/index.js +2 -0
- package/dist/esm/helperComponents/Header/styles.module.css +56 -0
- package/dist/esm/helperComponents/Header/types.d.ts +4 -0
- package/dist/esm/helperComponents/Header/types.js +1 -0
- package/dist/esm/helperComponents/index.d.ts +3 -0
- package/dist/esm/helperComponents/index.js +3 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/types.d.ts +6 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils.d.ts +17 -0
- package/dist/esm/utils.js +24 -0
- package/package.json +6 -5
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const SIZE = {
|
|
2
|
+
Full: 'full',
|
|
3
|
+
Auto: 'auto',
|
|
4
|
+
};
|
|
5
|
+
export const MODE = {
|
|
6
|
+
Regular: 'regular',
|
|
7
|
+
Aggressive: 'aggressive',
|
|
8
|
+
Forced: 'forced',
|
|
9
|
+
};
|
|
10
|
+
export const ALIGN = {
|
|
11
|
+
Default: 'default',
|
|
12
|
+
Center: 'center',
|
|
13
|
+
Vertical: 'vertical',
|
|
14
|
+
};
|
|
15
|
+
export const CONTENT_ALIGN = {
|
|
16
|
+
Default: 'default',
|
|
17
|
+
Center: 'center',
|
|
18
|
+
};
|
|
19
|
+
export const TEST_IDS = {
|
|
20
|
+
overlay: 'modal__overlay',
|
|
21
|
+
closeButton: 'modal__close-button',
|
|
22
|
+
header: 'modal__header',
|
|
23
|
+
title: 'modal__title',
|
|
24
|
+
subtitle: 'modal__subtitle',
|
|
25
|
+
tooltip: 'modal__title-tooltip',
|
|
26
|
+
icon: 'modal__icon',
|
|
27
|
+
image: 'modal__image',
|
|
28
|
+
content: 'modal__body',
|
|
29
|
+
footer: 'modal__footer',
|
|
30
|
+
approveButton: 'modal__approve-button',
|
|
31
|
+
cancelButton: 'modal__cancel-button',
|
|
32
|
+
additionalButton: 'modal__additional-button',
|
|
33
|
+
disclaimer: 'modal__disclaimer',
|
|
34
|
+
disclaimerText: 'modal__disclaimer-text',
|
|
35
|
+
disclaimerLink: 'modal__disclaimer-link',
|
|
36
|
+
loadingSpinner: 'modal__loading-spinner',
|
|
37
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@snack-uikit/utils';
|
|
3
|
+
import { ContentAlign } from '../../types';
|
|
4
|
+
export type ModalBodyProps = WithSupportProps<{
|
|
5
|
+
/** Содержимое модального окна */
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
/** Выравнивание контента */
|
|
8
|
+
align?: ContentAlign;
|
|
9
|
+
className?: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function ModalBody({ content, align, className, ...rest }: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { MobileDrawerCustom } from '@sbercloud/uikit-product-mobile-drawer';
|
|
15
|
+
import { extractSupportProps } from '@snack-uikit/utils';
|
|
16
|
+
import { CONTENT_ALIGN, TEST_IDS } from '../../constants';
|
|
17
|
+
import styles from './styles.module.css';
|
|
18
|
+
export function ModalBody(_a) {
|
|
19
|
+
var { content, align = CONTENT_ALIGN.Default, className } = _a, rest = __rest(_a, ["content", "align", "className"]);
|
|
20
|
+
return (_jsx(MobileDrawerCustom.Body, Object.assign({ content: content, className: cn(styles.modalBody, className) }, extractSupportProps(rest), { "data-align": align, "data-test-id": TEST_IDS.content })));
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Body';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Body';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.modalBody{
|
|
2
|
+
font-family:var(--sans-body-m-font-family, SB Sans Interface);
|
|
3
|
+
font-weight:var(--sans-body-m-font-weight, Regular);
|
|
4
|
+
line-height:var(--sans-body-m-line-height, 20px);
|
|
5
|
+
font-size:var(--sans-body-m-font-size, 14px);
|
|
6
|
+
letter-spacing:var(--sans-body-m-letter-spacing, 0.1px);
|
|
7
|
+
paragraph-spacing:var(--sans-body-m-paragraph-spacing, 7.7px);
|
|
8
|
+
padding:var(--dimension-3m, 24px) var(--dimension-2m, 16px);
|
|
9
|
+
flex:1 1 auto;
|
|
10
|
+
box-sizing:border-box;
|
|
11
|
+
min-height:var(--dimension-2m, 16px);
|
|
12
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
13
|
+
}
|
|
14
|
+
.modalBody[data-align=center]{
|
|
15
|
+
text-align:center;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@snack-uikit/utils';
|
|
3
|
+
import { Align } from '../../types';
|
|
4
|
+
export type ModalFooterProps = WithSupportProps<{
|
|
5
|
+
/** Параметр для передачи кнопок */
|
|
6
|
+
actions: ReactNode;
|
|
7
|
+
/** Параметр для небольшого текста под кнопками */
|
|
8
|
+
disclaimer?: ReactNode;
|
|
9
|
+
/** Выравнивание контента */
|
|
10
|
+
align?: Align;
|
|
11
|
+
className?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function ModalFooter({ actions, disclaimer, align, className, ...rest }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { extractSupportProps } from '@snack-uikit/utils';
|
|
15
|
+
import { ALIGN, TEST_IDS } from '../../constants';
|
|
16
|
+
import styles from './styles.module.css';
|
|
17
|
+
export function ModalFooter(_a) {
|
|
18
|
+
var { actions, disclaimer, align = ALIGN.Default, className } = _a, rest = __rest(_a, ["actions", "disclaimer", "align", "className"]);
|
|
19
|
+
return (_jsxs("div", Object.assign({ "data-align": align, className: cn(styles.footer, className) }, extractSupportProps(rest), { "data-test-id": TEST_IDS.footer, children: [_jsx("div", { className: styles.footerActions, children: actions }), disclaimer && (_jsx("div", { className: styles.footerDisclaimer, "data-test-id": TEST_IDS.disclaimer, children: disclaimer }))] })));
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Footer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Footer';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.footerActions{
|
|
2
|
+
gap:var(--space-modal-footer-action-row-gap, 8px);
|
|
3
|
+
display:flex;
|
|
4
|
+
flex-direction:row-reverse;
|
|
5
|
+
flex-wrap:wrap-reverse;
|
|
6
|
+
align-items:center;
|
|
7
|
+
justify-content:center;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.footerDisclaimer{
|
|
11
|
+
display:flex;
|
|
12
|
+
flex-direction:column;
|
|
13
|
+
align-items:flex-end;
|
|
14
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.footer{
|
|
18
|
+
padding:0 var(--dimension-2m, 16px) var(--dimension-3m, 24px) var(--dimension-2m, 16px);
|
|
19
|
+
gap:var(--dimension-2m, 16px);
|
|
20
|
+
display:flex;
|
|
21
|
+
flex-direction:column;
|
|
22
|
+
}
|
|
23
|
+
.footer[data-align=vertical]{
|
|
24
|
+
align-items:center;
|
|
25
|
+
}
|
|
26
|
+
.footer[data-align=vertical] .footerActions{
|
|
27
|
+
width:100%;
|
|
28
|
+
}
|
|
29
|
+
.footer[data-align=vertical] .footerDisclaimer{
|
|
30
|
+
align-items:center;
|
|
31
|
+
}
|
|
32
|
+
.footer[data-align=center]{
|
|
33
|
+
align-items:center;
|
|
34
|
+
}
|
|
35
|
+
.footer[data-align=center] .footerDisclaimer{
|
|
36
|
+
align-items:center;
|
|
37
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MobileQuestionTooltipProps } from '@sbercloud/uikit-product-mobile-tooltip';
|
|
3
|
+
import { WithSupportProps } from '@snack-uikit/utils';
|
|
4
|
+
import { ContentAlign } from '../../types';
|
|
5
|
+
export type ModalHeaderProps = WithSupportProps<{
|
|
6
|
+
/** Заголовок модального окна */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** Тултип для заголовка */
|
|
9
|
+
titleTooltip?: MobileQuestionTooltipProps['tip'];
|
|
10
|
+
/** Подзаголовок */
|
|
11
|
+
subtitle?: ReactNode;
|
|
12
|
+
/** Выравнивание контента */
|
|
13
|
+
align?: ContentAlign;
|
|
14
|
+
className?: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function ModalHeader({ title, titleTooltip, subtitle, align, className, ...rest }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { MobileQuestionTooltip } from '@sbercloud/uikit-product-mobile-tooltip';
|
|
15
|
+
import { Typography } from '@snack-uikit/typography';
|
|
16
|
+
import { extractSupportProps } from '@snack-uikit/utils';
|
|
17
|
+
import { CONTENT_ALIGN, TEST_IDS } from '../../constants';
|
|
18
|
+
import styles from './styles.module.css';
|
|
19
|
+
export function ModalHeader(_a) {
|
|
20
|
+
var { title, titleTooltip, subtitle, align = CONTENT_ALIGN.Default, className } = _a, rest = __rest(_a, ["title", "titleTooltip", "subtitle", "align", "className"]);
|
|
21
|
+
return (_jsx("div", Object.assign({ className: cn(styles.header, className) }, extractSupportProps(rest), { "data-test-id": TEST_IDS.header, children: _jsxs("div", { className: styles.headlineLayout, "data-align": align, children: [_jsx("div", { className: styles.headline, children: _jsxs(Typography.SansHeadlineS, { className: styles.title, "data-test-id": TEST_IDS.title, children: [title, titleTooltip && (_jsx("span", { className: styles.questionTooltip, children: _jsx(MobileQuestionTooltip, { tip: titleTooltip, size: 's', "data-test-id": TEST_IDS.tooltip }) }))] }) }), subtitle && (_jsx(Typography.SansBodyM, { className: styles.subtitle, "data-test-id": TEST_IDS.subtitle, children: subtitle }))] }) })));
|
|
22
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.header{
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.title{
|
|
5
|
+
display:inline;
|
|
6
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
7
|
+
word-break:break-word;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.subtitle{
|
|
11
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.questionTooltip{
|
|
15
|
+
display:inline-flex;
|
|
16
|
+
height:var(--dimension-4m, 32px);
|
|
17
|
+
padding-left:4px;
|
|
18
|
+
}
|
|
19
|
+
.questionTooltip > span{
|
|
20
|
+
transform:translate(0, 4px);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.image{
|
|
24
|
+
border-top-left-radius:var(--radius-modal-modal-window, 12px);
|
|
25
|
+
border-top-right-radius:var(--radius-modal-modal-window, 12px);
|
|
26
|
+
height:var(--size-modal-image, 184px);
|
|
27
|
+
display:block;
|
|
28
|
+
width:100%;
|
|
29
|
+
-o-object-fit:cover;
|
|
30
|
+
object-fit:cover;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.icon{
|
|
34
|
+
padding-top:var(--space-modal-icon-decor, 32px);
|
|
35
|
+
display:flex;
|
|
36
|
+
justify-content:center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.headlineLayout{
|
|
40
|
+
padding:var(--dimension-3m, 24px) var(--dimension-2m, 16px) 0;
|
|
41
|
+
gap:var(--dimension-1m, 8px);
|
|
42
|
+
display:flex;
|
|
43
|
+
flex-direction:column;
|
|
44
|
+
}
|
|
45
|
+
.headlineLayout[data-align=center]{
|
|
46
|
+
align-items:center;
|
|
47
|
+
}
|
|
48
|
+
.headlineLayout[data-align=center] .title, .headlineLayout[data-align=center] .subtitle{
|
|
49
|
+
text-align:center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.headline{
|
|
53
|
+
gap:var(--space-modal-headline-layout-headline, 4px);
|
|
54
|
+
display:flex;
|
|
55
|
+
align-items:center;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ValueOf } from '@snack-uikit/utils';
|
|
2
|
+
import { ALIGN, CONTENT_ALIGN, MODE, SIZE } from './constants';
|
|
3
|
+
export type Size = ValueOf<typeof SIZE>;
|
|
4
|
+
export type Mode = ValueOf<typeof MODE>;
|
|
5
|
+
export type Align = ValueOf<typeof ALIGN>;
|
|
6
|
+
export type ContentAlign = ValueOf<typeof CONTENT_ALIGN>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Align } from './types';
|
|
2
|
+
export declare function getAlignProps({ align }: {
|
|
3
|
+
align: Align;
|
|
4
|
+
}): {
|
|
5
|
+
header: "default";
|
|
6
|
+
body: "default";
|
|
7
|
+
footer: "vertical";
|
|
8
|
+
} | {
|
|
9
|
+
header: "center";
|
|
10
|
+
body: "center";
|
|
11
|
+
footer: "center";
|
|
12
|
+
} | {
|
|
13
|
+
header: "center";
|
|
14
|
+
body: "center";
|
|
15
|
+
footer: "vertical";
|
|
16
|
+
};
|
|
17
|
+
export declare function getButtonsSize(): "m";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ALIGN, CONTENT_ALIGN } from './constants';
|
|
2
|
+
const MAP_ALIGNS = {
|
|
3
|
+
[ALIGN.Default]: {
|
|
4
|
+
header: CONTENT_ALIGN.Default,
|
|
5
|
+
body: CONTENT_ALIGN.Default,
|
|
6
|
+
footer: ALIGN.Vertical,
|
|
7
|
+
},
|
|
8
|
+
[ALIGN.Center]: {
|
|
9
|
+
header: CONTENT_ALIGN.Center,
|
|
10
|
+
body: CONTENT_ALIGN.Center,
|
|
11
|
+
footer: ALIGN.Center,
|
|
12
|
+
},
|
|
13
|
+
[ALIGN.Vertical]: {
|
|
14
|
+
header: CONTENT_ALIGN.Center,
|
|
15
|
+
body: CONTENT_ALIGN.Center,
|
|
16
|
+
footer: ALIGN.Vertical,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export function getAlignProps({ align }) {
|
|
20
|
+
return MAP_ALIGNS[align];
|
|
21
|
+
}
|
|
22
|
+
export function getButtonsSize() {
|
|
23
|
+
return 'm';
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-mobile-modal",
|
|
3
3
|
"title": "Mobile Modal",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.20",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -30,15 +30,16 @@
|
|
|
30
30
|
"name": "Akhremenko Grigorii",
|
|
31
31
|
"url": "https://github.com/AGrigorii"
|
|
32
32
|
},
|
|
33
|
+
"contributors": [],
|
|
33
34
|
"license": "Apache-2.0",
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@cloud-ru/uikit-product-mobile-drawer": "0.9.
|
|
40
|
-
"@cloud-ru/uikit-product-mobile-tooltip": "0.4.
|
|
41
|
-
"@cloud-ru/uikit-product-utils": "7.0.
|
|
40
|
+
"@cloud-ru/uikit-product-mobile-drawer": "0.9.17",
|
|
41
|
+
"@cloud-ru/uikit-product-mobile-tooltip": "0.4.67",
|
|
42
|
+
"@cloud-ru/uikit-product-utils": "7.0.2",
|
|
42
43
|
"@snack-uikit/button": "0.19.15",
|
|
43
44
|
"@snack-uikit/drawer": "0.13.2",
|
|
44
45
|
"@snack-uikit/link": "0.17.9",
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"@snack-uikit/utils": "3.10.1",
|
|
49
50
|
"classnames": "2.5.1"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "bf479ecf7238ef20b78f20acaef439efa535d1a1"
|
|
52
53
|
}
|