@salutejs/sdds-cs 0.238.0-canary.1719.12951148116.0 → 0.238.0-canary.1720.13005615941.0
Sign up to get free protection for your applications and to get access to all the features.
- package/api/sdds-cs.api.md +2 -2
- package/components/DatePicker/DatePicker.d.ts +2 -0
- package/components/Toast/Toast.config.d.ts +0 -10
- package/components/Toast/Toast.config.js +6 -16
- package/components/Toast/Toast.d.ts +0 -2
- package/emotion/cjs/components/Toast/Toast.config.js +6 -16
- package/emotion/cjs/components/Toast/Toast.stories.tsx +8 -13
- package/emotion/es/components/Toast/Toast.config.js +6 -16
- package/emotion/es/components/Toast/Toast.stories.tsx +8 -13
- package/es/components/Toast/Toast.config.js +6 -16
- package/package.json +3 -3
package/api/sdds-cs.api.md
CHANGED
@@ -1320,6 +1320,7 @@ true: PolymorphicClassName;
|
|
1320
1320
|
}> & DatePickerVariationProps & {
|
1321
1321
|
requiredPlacement?: "right" | "left" | undefined;
|
1322
1322
|
required?: boolean | undefined;
|
1323
|
+
value?: Date | null | undefined;
|
1323
1324
|
defaultDate?: Date | undefined;
|
1324
1325
|
placeholder?: string | undefined;
|
1325
1326
|
name?: string | undefined;
|
@@ -1365,6 +1366,7 @@ true: PolymorphicClassName;
|
|
1365
1366
|
}> & DatePickerVariationProps & {
|
1366
1367
|
requiredPlacement?: "right" | "left" | undefined;
|
1367
1368
|
required?: boolean | undefined;
|
1369
|
+
value?: [Date | null | undefined, Date | null | undefined] | undefined;
|
1368
1370
|
defaultFirstDate?: Date | undefined;
|
1369
1371
|
defaultSecondDate?: Date | undefined;
|
1370
1372
|
name?: string | undefined;
|
@@ -3863,8 +3865,6 @@ export { textXSBold }
|
|
3863
3865
|
export const Toast: FunctionComponent<PropsType< {
|
3864
3866
|
view: {
|
3865
3867
|
default: PolymorphicClassName;
|
3866
|
-
positive: PolymorphicClassName;
|
3867
|
-
negative: PolymorphicClassName;
|
3868
3868
|
dark: PolymorphicClassName;
|
3869
3869
|
light: PolymorphicClassName;
|
3870
3870
|
};
|
@@ -15,6 +15,7 @@ export declare const DatePicker: import("react").FunctionComponent<import("@salu
|
|
15
15
|
}> & import("@salutejs/plasma-new-hope/types/components/DatePicker/DatePickerBase.types").DatePickerVariationProps & {
|
16
16
|
requiredPlacement?: "right" | "left" | undefined;
|
17
17
|
required?: boolean | undefined;
|
18
|
+
value?: Date | null | undefined;
|
18
19
|
defaultDate?: Date | undefined;
|
19
20
|
placeholder?: string | undefined;
|
20
21
|
name?: string | undefined;
|
@@ -50,6 +51,7 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
|
|
50
51
|
}> & import("@salutejs/plasma-new-hope/types/components/DatePicker/DatePickerBase.types").DatePickerVariationProps & {
|
51
52
|
requiredPlacement?: "right" | "left" | undefined;
|
52
53
|
required?: boolean | undefined;
|
54
|
+
value?: [Date | null | undefined, Date | null | undefined] | undefined;
|
53
55
|
defaultFirstDate?: Date | undefined;
|
54
56
|
defaultSecondDate?: Date | undefined;
|
55
57
|
name?: string | undefined;
|
@@ -7,17 +7,7 @@ export declare const config: {
|
|
7
7
|
variations: {
|
8
8
|
view: {
|
9
9
|
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
10
|
-
positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
11
|
-
negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
12
|
-
/**
|
13
|
-
* @deprecated
|
14
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
15
|
-
*/
|
16
10
|
dark: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
17
|
-
/**
|
18
|
-
* @deprecated
|
19
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
20
|
-
*/
|
21
11
|
light: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
22
12
|
};
|
23
13
|
size: {
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.config = void 0;
|
7
7
|
var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
|
8
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
9
9
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
10
10
|
var config = exports.config = {
|
11
11
|
defaults: {
|
@@ -16,27 +16,17 @@ var config = exports.config = {
|
|
16
16
|
variations: {
|
17
17
|
view: {
|
18
18
|
"default": /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover),
|
19
|
-
|
20
|
-
|
21
|
-
/**
|
22
|
-
* @deprecated
|
23
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
24
|
-
*/
|
25
|
-
dark: /*#__PURE__*/(0, _styledComponents.css)(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover),
|
26
|
-
/**
|
27
|
-
* @deprecated
|
28
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
29
|
-
*/
|
30
|
-
light: /*#__PURE__*/(0, _styledComponents.css)(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover)
|
19
|
+
dark: /*#__PURE__*/(0, _styledComponents.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover),
|
20
|
+
light: /*#__PURE__*/(0, _styledComponents.css)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover)
|
31
21
|
},
|
32
22
|
size: {
|
33
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(
|
23
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n ", ": calc(100vw - 5rem);\n ", ": 0.5rem 0.75rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": -0.0625rem 0.5rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.125rem -0.0625rem 0.75rem;\n "])), _styledComponents.toastTokens.borderRadius, _styledComponents.toastTokens.maxWidth, _styledComponents.toastTokens.padding, _styledComponents.toastTokens.fontFamily, _styledComponents.toastTokens.fontSize, _styledComponents.toastTokens.fontStyle, _styledComponents.toastTokens.fontWeight, _styledComponents.toastTokens.letterSpacing, _styledComponents.toastTokens.lineHeight, _styledComponents.toastTokens.leftContentMargin, _styledComponents.toastTokens.closeIconMargin)
|
34
24
|
},
|
35
25
|
closeIconType: {
|
36
|
-
thin: /*#__PURE__*/(0, _styledComponents.css)(
|
26
|
+
thin: /*#__PURE__*/(0, _styledComponents.css)(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), _styledComponents.toastTokens.closeIconButtonSize, _styledComponents.toastTokens.closeIconSize)
|
37
27
|
},
|
38
28
|
pilled: {
|
39
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)(
|
29
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n\n ", ": -0.0625rem 0.375rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.25rem -0.0625rem 0.375rem;\n "])), _styledComponents.toastTokens.pilledBorderRadius, _styledComponents.toastTokens.leftContentMargin, _styledComponents.toastTokens.closeIconMargin)
|
40
30
|
}
|
41
31
|
}
|
42
32
|
};
|
@@ -3,8 +3,6 @@ export { useToast } from '@salutejs/plasma-new-hope/styled-components';
|
|
3
3
|
export declare const Toast: import("react").FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
|
4
4
|
view: {
|
5
5
|
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
6
|
-
positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
7
|
-
negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
8
6
|
dark: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
9
7
|
light: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
10
8
|
};
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.config = void 0;
|
7
7
|
var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
|
8
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
9
9
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
10
10
|
var config = exports.config = {
|
11
11
|
defaults: {
|
@@ -16,27 +16,17 @@ var config = exports.config = {
|
|
16
16
|
variations: {
|
17
17
|
view: {
|
18
18
|
"default": /*#__PURE__*/(0, _emotion.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover),
|
19
|
-
|
20
|
-
|
21
|
-
/**
|
22
|
-
* @deprecated
|
23
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
24
|
-
*/
|
25
|
-
dark: /*#__PURE__*/(0, _emotion.css)(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover),
|
26
|
-
/**
|
27
|
-
* @deprecated
|
28
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
29
|
-
*/
|
30
|
-
light: /*#__PURE__*/(0, _emotion.css)(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover)
|
19
|
+
dark: /*#__PURE__*/(0, _emotion.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover),
|
20
|
+
light: /*#__PURE__*/(0, _emotion.css)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover)
|
31
21
|
},
|
32
22
|
size: {
|
33
|
-
s: /*#__PURE__*/(0, _emotion.css)(
|
23
|
+
s: /*#__PURE__*/(0, _emotion.css)(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n ", ": calc(100vw - 5rem);\n ", ": 0.5rem 0.75rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": -0.0625rem 0.5rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.125rem -0.0625rem 0.75rem;\n "])), _emotion.toastTokens.borderRadius, _emotion.toastTokens.maxWidth, _emotion.toastTokens.padding, _emotion.toastTokens.fontFamily, _emotion.toastTokens.fontSize, _emotion.toastTokens.fontStyle, _emotion.toastTokens.fontWeight, _emotion.toastTokens.letterSpacing, _emotion.toastTokens.lineHeight, _emotion.toastTokens.leftContentMargin, _emotion.toastTokens.closeIconMargin)
|
34
24
|
},
|
35
25
|
closeIconType: {
|
36
|
-
thin: /*#__PURE__*/(0, _emotion.css)(
|
26
|
+
thin: /*#__PURE__*/(0, _emotion.css)(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), _emotion.toastTokens.closeIconButtonSize, _emotion.toastTokens.closeIconSize)
|
37
27
|
},
|
38
28
|
pilled: {
|
39
|
-
"true": /*#__PURE__*/(0, _emotion.css)(
|
29
|
+
"true": /*#__PURE__*/(0, _emotion.css)(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n\n ", ": -0.0625rem 0.375rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.25rem -0.0625rem 0.375rem;\n "])), _emotion.toastTokens.pilledBorderRadius, _emotion.toastTokens.leftContentMargin, _emotion.toastTokens.closeIconMargin)
|
40
30
|
}
|
41
31
|
}
|
42
32
|
};
|
@@ -10,23 +10,23 @@ import { ToastController, ToastProvider } from './Toast';
|
|
10
10
|
|
11
11
|
import { Toast, useToast } from '.';
|
12
12
|
|
13
|
-
const views = ['default', 'positive', 'negative'];
|
14
|
-
|
15
13
|
const meta: Meta<typeof ToastController> = {
|
16
14
|
title: 'Overlay/Toast',
|
17
15
|
decorators: [InSpacingDecorator],
|
18
16
|
argTypes: {
|
19
17
|
view: {
|
20
|
-
options:
|
18
|
+
options: ['default', 'dark', 'light'],
|
21
19
|
control: {
|
22
20
|
type: 'select',
|
23
21
|
},
|
24
22
|
},
|
25
|
-
|
26
|
-
|
23
|
+
size: {
|
24
|
+
options: ['s'],
|
25
|
+
control: {
|
26
|
+
type: 'inline-radio',
|
27
|
+
},
|
27
28
|
},
|
28
|
-
|
29
|
-
...disableProps(['textColor', 'view', 'closeIconType', 'size', 'role', 'onShow', 'onHide', 'contentLeft']),
|
29
|
+
...disableProps(['role', 'onShow', 'onHide', 'contentLeft', 'size']),
|
30
30
|
},
|
31
31
|
};
|
32
32
|
|
@@ -54,6 +54,7 @@ const BellIcon = (props) => (
|
|
54
54
|
);
|
55
55
|
|
56
56
|
const ToastContainer = styled.div`
|
57
|
+
position: fixed;
|
57
58
|
transform: translateX(50%);
|
58
59
|
`;
|
59
60
|
|
@@ -65,9 +66,7 @@ const Container = styled.div`
|
|
65
66
|
export const ToastComponent: StoryComponent = {
|
66
67
|
args: {
|
67
68
|
text: 'Текст всплывающего уведомления',
|
68
|
-
textColor: undefined,
|
69
69
|
view: 'default',
|
70
|
-
closeIconType: 'thin',
|
71
70
|
size: 's',
|
72
71
|
hasClose: true,
|
73
72
|
enableContentLeft: true,
|
@@ -91,8 +90,6 @@ const StoryLiveDemo = ({
|
|
91
90
|
size,
|
92
91
|
hasClose,
|
93
92
|
enableContentLeft,
|
94
|
-
closeIconType,
|
95
|
-
textColor,
|
96
93
|
}: StoryProps) => {
|
97
94
|
const { showToast, hideToast } = useToast();
|
98
95
|
const contentLeft = enableContentLeft && <BellIcon width="1.5rem" height="1.5rem" />;
|
@@ -113,8 +110,6 @@ const StoryLiveDemo = ({
|
|
113
110
|
view,
|
114
111
|
size,
|
115
112
|
hasClose,
|
116
|
-
closeIconType,
|
117
|
-
textColor,
|
118
113
|
onHide: action('onHide'),
|
119
114
|
onShow: action('onShow'),
|
120
115
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
3
3
|
import { css, toastTokens } from '@salutejs/plasma-new-hope/emotion';
|
4
4
|
export var config = {
|
@@ -10,27 +10,17 @@ export var config = {
|
|
10
10
|
variations: {
|
11
11
|
view: {
|
12
12
|
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
13
|
-
|
14
|
-
|
15
|
-
/**
|
16
|
-
* @deprecated
|
17
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
18
|
-
*/
|
19
|
-
dark: /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
20
|
-
/**
|
21
|
-
* @deprecated
|
22
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
23
|
-
*/
|
24
|
-
light: /*#__PURE__*/css(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover)
|
13
|
+
dark: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
14
|
+
light: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover)
|
25
15
|
},
|
26
16
|
size: {
|
27
|
-
s: /*#__PURE__*/css(
|
17
|
+
s: /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n ", ": calc(100vw - 5rem);\n ", ": 0.5rem 0.75rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": -0.0625rem 0.5rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.125rem -0.0625rem 0.75rem;\n "])), toastTokens.borderRadius, toastTokens.maxWidth, toastTokens.padding, toastTokens.fontFamily, toastTokens.fontSize, toastTokens.fontStyle, toastTokens.fontWeight, toastTokens.letterSpacing, toastTokens.lineHeight, toastTokens.leftContentMargin, toastTokens.closeIconMargin)
|
28
18
|
},
|
29
19
|
closeIconType: {
|
30
|
-
thin: /*#__PURE__*/css(
|
20
|
+
thin: /*#__PURE__*/css(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), toastTokens.closeIconButtonSize, toastTokens.closeIconSize)
|
31
21
|
},
|
32
22
|
pilled: {
|
33
|
-
"true": /*#__PURE__*/css(
|
23
|
+
"true": /*#__PURE__*/css(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n\n ", ": -0.0625rem 0.375rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.25rem -0.0625rem 0.375rem;\n "])), toastTokens.pilledBorderRadius, toastTokens.leftContentMargin, toastTokens.closeIconMargin)
|
34
24
|
}
|
35
25
|
}
|
36
26
|
};
|
@@ -10,23 +10,23 @@ import { ToastController, ToastProvider } from './Toast';
|
|
10
10
|
|
11
11
|
import { Toast, useToast } from '.';
|
12
12
|
|
13
|
-
const views = ['default', 'positive', 'negative'];
|
14
|
-
|
15
13
|
const meta: Meta<typeof ToastController> = {
|
16
14
|
title: 'Overlay/Toast',
|
17
15
|
decorators: [InSpacingDecorator],
|
18
16
|
argTypes: {
|
19
17
|
view: {
|
20
|
-
options:
|
18
|
+
options: ['default', 'dark', 'light'],
|
21
19
|
control: {
|
22
20
|
type: 'select',
|
23
21
|
},
|
24
22
|
},
|
25
|
-
|
26
|
-
|
23
|
+
size: {
|
24
|
+
options: ['s'],
|
25
|
+
control: {
|
26
|
+
type: 'inline-radio',
|
27
|
+
},
|
27
28
|
},
|
28
|
-
|
29
|
-
...disableProps(['textColor', 'view', 'closeIconType', 'size', 'role', 'onShow', 'onHide', 'contentLeft']),
|
29
|
+
...disableProps(['role', 'onShow', 'onHide', 'contentLeft', 'size']),
|
30
30
|
},
|
31
31
|
};
|
32
32
|
|
@@ -54,6 +54,7 @@ const BellIcon = (props) => (
|
|
54
54
|
);
|
55
55
|
|
56
56
|
const ToastContainer = styled.div`
|
57
|
+
position: fixed;
|
57
58
|
transform: translateX(50%);
|
58
59
|
`;
|
59
60
|
|
@@ -65,9 +66,7 @@ const Container = styled.div`
|
|
65
66
|
export const ToastComponent: StoryComponent = {
|
66
67
|
args: {
|
67
68
|
text: 'Текст всплывающего уведомления',
|
68
|
-
textColor: undefined,
|
69
69
|
view: 'default',
|
70
|
-
closeIconType: 'thin',
|
71
70
|
size: 's',
|
72
71
|
hasClose: true,
|
73
72
|
enableContentLeft: true,
|
@@ -91,8 +90,6 @@ const StoryLiveDemo = ({
|
|
91
90
|
size,
|
92
91
|
hasClose,
|
93
92
|
enableContentLeft,
|
94
|
-
closeIconType,
|
95
|
-
textColor,
|
96
93
|
}: StoryProps) => {
|
97
94
|
const { showToast, hideToast } = useToast();
|
98
95
|
const contentLeft = enableContentLeft && <BellIcon width="1.5rem" height="1.5rem" />;
|
@@ -113,8 +110,6 @@ const StoryLiveDemo = ({
|
|
113
110
|
view,
|
114
111
|
size,
|
115
112
|
hasClose,
|
116
|
-
closeIconType,
|
117
|
-
textColor,
|
118
113
|
onHide: action('onHide'),
|
119
114
|
onShow: action('onShow'),
|
120
115
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
3
3
|
import { css, toastTokens } from '@salutejs/plasma-new-hope/styled-components';
|
4
4
|
export var config = {
|
@@ -10,27 +10,17 @@ export var config = {
|
|
10
10
|
variations: {
|
11
11
|
view: {
|
12
12
|
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
13
|
-
|
14
|
-
|
15
|
-
/**
|
16
|
-
* @deprecated
|
17
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
18
|
-
*/
|
19
|
-
dark: /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
20
|
-
/**
|
21
|
-
* @deprecated
|
22
|
-
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
23
|
-
*/
|
24
|
-
light: /*#__PURE__*/css(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover)
|
13
|
+
dark: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-solid-primary-brightness);\n\n ", ": var(--on-dark-text-accent);\n ", ": var(--on-dark-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
14
|
+
light: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-light-surface-solid-primary-brightness);\n\n ", ": var(--on-light-text-accent);\n ", ": var(--on-light-text-accent-hover);\n "])), toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover)
|
25
15
|
},
|
26
16
|
size: {
|
27
|
-
s: /*#__PURE__*/css(
|
17
|
+
s: /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n ", ": calc(100vw - 5rem);\n ", ": 0.5rem 0.75rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": -0.0625rem 0.5rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.125rem -0.0625rem 0.75rem;\n "])), toastTokens.borderRadius, toastTokens.maxWidth, toastTokens.padding, toastTokens.fontFamily, toastTokens.fontSize, toastTokens.fontStyle, toastTokens.fontWeight, toastTokens.letterSpacing, toastTokens.lineHeight, toastTokens.leftContentMargin, toastTokens.closeIconMargin)
|
28
18
|
},
|
29
19
|
closeIconType: {
|
30
|
-
thin: /*#__PURE__*/css(
|
20
|
+
thin: /*#__PURE__*/css(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), toastTokens.closeIconButtonSize, toastTokens.closeIconSize)
|
31
21
|
},
|
32
22
|
pilled: {
|
33
|
-
"true": /*#__PURE__*/css(
|
23
|
+
"true": /*#__PURE__*/css(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n\n ", ": -0.0625rem 0.375rem -0.0625rem 0rem;\n ", ": -0.0625rem 0.25rem -0.0625rem 0.375rem;\n "])), toastTokens.pilledBorderRadius, toastTokens.leftContentMargin, toastTokens.closeIconMargin)
|
34
24
|
}
|
35
25
|
}
|
36
26
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/sdds-cs",
|
3
|
-
"version": "0.238.0-canary.
|
3
|
+
"version": "0.238.0-canary.1720.13005615941.0",
|
4
4
|
"description": "Salute Design System / React UI kit for SDDS CS web applications",
|
5
5
|
"author": "Salute Frontend Team <salute.developers@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"directory": "packages/sdds-cs"
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
|
-
"@salutejs/plasma-new-hope": "0.249.0-canary.
|
33
|
+
"@salutejs/plasma-new-hope": "0.249.0-canary.1720.13005615941.0",
|
34
34
|
"@salutejs/sdds-themes": "0.31.0"
|
35
35
|
},
|
36
36
|
"peerDependencies": {
|
@@ -123,5 +123,5 @@
|
|
123
123
|
"Anton Vinogradov"
|
124
124
|
],
|
125
125
|
"sideEffects": false,
|
126
|
-
"gitHead": "
|
126
|
+
"gitHead": "3a9104465b3cd0e061a518b4ce51836fd0d47b1d"
|
127
127
|
}
|