@salutejs/sdds-cs 0.237.2-canary.1732.13046307319.0 → 0.238.0-canary.1719.12951148116.0
Sign up to get free protection for your applications and to get access to all the features.
- package/api/sdds-cs.api.md +6 -16
- package/components/Dropdown/Dropdown.d.ts +1 -37
- package/components/Dropdown/index.d.ts +0 -2
- package/components/Select/Select.d.ts +1 -1
- package/components/Select/index.d.ts +0 -2
- package/components/Toast/Toast.config.d.ts +10 -0
- package/components/Toast/Toast.config.js +16 -6
- package/components/Toast/Toast.d.ts +2 -0
- package/emotion/cjs/components/Toast/Toast.config.js +16 -6
- package/emotion/cjs/components/Toast/Toast.stories.tsx +13 -8
- package/emotion/es/components/Toast/Toast.config.js +16 -6
- package/emotion/es/components/Toast/Toast.stories.tsx +13 -8
- package/es/components/Toast/Toast.config.js +16 -6
- package/package.json +3 -3
package/api/sdds-cs.api.md
CHANGED
@@ -94,7 +94,7 @@ import { DrawerContentProps } from '@salutejs/plasma-new-hope/styled-components'
|
|
94
94
|
import { DrawerFooterProps } from '@salutejs/plasma-new-hope/styled-components';
|
95
95
|
import { DrawerHeaderProps } from '@salutejs/plasma-new-hope/styled-components';
|
96
96
|
import { DrawerProps } from '@salutejs/plasma-new-hope/styled-components';
|
97
|
-
import { DropdownItemOption } from '@salutejs/plasma-new-hope';
|
97
|
+
import type { DropdownItemOption } from '@salutejs/plasma-new-hope';
|
98
98
|
import type { DropdownNewProps } from '@salutejs/plasma-new-hope';
|
99
99
|
import { DropdownNodeSelect } from '@salutejs/plasma-new-hope/styled-components';
|
100
100
|
import { DropdownPlacement } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
|
@@ -136,6 +136,7 @@ import { IndicatorProps } from '@salutejs/plasma-new-hope/styled-components';
|
|
136
136
|
import { InputHTMLAttributes } from '@salutejs/plasma-new-hope/styled-components';
|
137
137
|
import { InputHTMLAttributes as InputHTMLAttributes_2 } from 'react';
|
138
138
|
import type { ItemOption } from '@salutejs/plasma-new-hope';
|
139
|
+
import type { ItemOptionSelect } from '@salutejs/plasma-new-hope';
|
139
140
|
import { JSXElementConstructor } from 'react';
|
140
141
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
141
142
|
import { LabelProps } from '@salutejs/plasma-new-hope/types/components/TextField/TextField.types';
|
@@ -194,7 +195,6 @@ import { SegmentGroupProps } from '@salutejs/plasma-new-hope/styled-components';
|
|
194
195
|
import { SegmentItemProps } from '@salutejs/plasma-new-hope/styled-components';
|
195
196
|
import { SegmentProvider } from '@salutejs/plasma-new-hope/styled-components';
|
196
197
|
import { SegmentProviderProps } from '@salutejs/plasma-new-hope/styled-components';
|
197
|
-
import { ItemOptionSelect as SelectItemOption } from '@salutejs/plasma-new-hope';
|
198
198
|
import { SelectPlacement } from '@salutejs/plasma-new-hope/types/components/Select/Select.types';
|
199
199
|
import { SelectPlacementBasic } from '@salutejs/plasma-new-hope/types/components/Select/Select.types';
|
200
200
|
import type { SelectProps as SelectProps_2 } from '@salutejs/plasma-new-hope';
|
@@ -1532,13 +1532,6 @@ default: PolymorphicClassName;
|
|
1532
1532
|
hoverIndex?: number | undefined;
|
1533
1533
|
} & React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>, "size" | "view"> & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | null;
|
1534
1534
|
|
1535
|
-
export { DropdownItemOption }
|
1536
|
-
|
1537
|
-
// Warning: (ae-forgotten-export) The symbol "DropdownNewHope" needs to be exported by the entry point index.d.ts
|
1538
|
-
//
|
1539
|
-
// @public (undocumented)
|
1540
|
-
export type DropdownProps<T extends DropdownItemOption> = Omit<DropdownNewProps<T>, 'size' | 'view'> & Pick<ComponentProps<typeof DropdownNewHope>, 'size' | 'view'>;
|
1541
|
-
|
1542
1535
|
// @public (undocumented)
|
1543
1536
|
export const Dropzone: FunctionComponent<PropsType< {
|
1544
1537
|
view: {
|
@@ -2810,15 +2803,10 @@ export { SegmentProvider }
|
|
2810
2803
|
|
2811
2804
|
export { SegmentProviderProps }
|
2812
2805
|
|
2813
|
-
//
|
2814
|
-
export const Select: <K extends SelectItemOption>(props: SelectProps<K> & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | null;
|
2815
|
-
|
2816
|
-
export { SelectItemOption }
|
2817
|
-
|
2818
|
-
// Warning: (ae-forgotten-export) The symbol "SelectNewHope" needs to be exported by the entry point index.d.ts
|
2806
|
+
// Warning: (ae-forgotten-export) The symbol "SelectProps" needs to be exported by the entry point index.d.ts
|
2819
2807
|
//
|
2820
2808
|
// @public (undocumented)
|
2821
|
-
export
|
2809
|
+
export const Select: <K extends ItemOptionSelect>(props: SelectProps<K> & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | null;
|
2822
2810
|
|
2823
2811
|
// @public
|
2824
2812
|
export const Sheet: FunctionComponent<PropsType< {
|
@@ -3875,6 +3863,8 @@ export { textXSBold }
|
|
3875
3863
|
export const Toast: FunctionComponent<PropsType< {
|
3876
3864
|
view: {
|
3877
3865
|
default: PolymorphicClassName;
|
3866
|
+
positive: PolymorphicClassName;
|
3867
|
+
negative: PolymorphicClassName;
|
3878
3868
|
dark: PolymorphicClassName;
|
3879
3869
|
light: PolymorphicClassName;
|
3880
3870
|
};
|
@@ -1,41 +1,5 @@
|
|
1
1
|
import type { DropdownItemOption, DropdownNewProps } from '@salutejs/plasma-new-hope';
|
2
|
-
import React
|
3
|
-
declare const DropdownNewHope: React.FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
|
4
|
-
size: {
|
5
|
-
s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
6
|
-
};
|
7
|
-
view: {
|
8
|
-
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
9
|
-
};
|
10
|
-
}> & {
|
11
|
-
items: DropdownItemOption[];
|
12
|
-
alwaysOpened?: boolean | undefined;
|
13
|
-
children?: React.ReactNode;
|
14
|
-
itemRole?: string | undefined;
|
15
|
-
onHover?: ((index: number) => void) | undefined;
|
16
|
-
onItemSelect?: ((item: DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
17
|
-
trigger?: import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownTrigger | undefined;
|
18
|
-
placement?: import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownPlacement | undefined;
|
19
|
-
offset?: [number, number] | undefined;
|
20
|
-
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
21
|
-
hasArrow?: boolean | undefined;
|
22
|
-
closeOnSelect?: boolean | undefined;
|
23
|
-
closeOnOverlayClick?: boolean | undefined;
|
24
|
-
onToggle?: ((isOpen: boolean, event: Event | React.SyntheticEvent<Element, Event>) => void) | undefined;
|
25
|
-
size?: string | undefined;
|
26
|
-
view?: string | undefined;
|
27
|
-
variant?: "normal" | "tight" | undefined;
|
28
|
-
portal?: string | React.RefObject<HTMLElement> | undefined;
|
29
|
-
renderItem?: ((item: DropdownItemOption) => React.ReactNode) | undefined;
|
30
|
-
zIndex?: import("csstype").Property.ZIndex | undefined;
|
31
|
-
beforeList?: React.ReactNode;
|
32
|
-
afterList?: React.ReactNode;
|
33
|
-
onItemClick?: ((item: DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
34
|
-
listOverflow?: import("csstype").Property.Overflow | undefined;
|
35
|
-
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
36
|
-
hoverIndex?: number | undefined;
|
37
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
38
|
-
export declare type DropdownProps<T extends DropdownItemOption> = Omit<DropdownNewProps<T>, 'size' | 'view'> & Pick<ComponentProps<typeof DropdownNewHope>, 'size' | 'view'>;
|
2
|
+
import React from 'react';
|
39
3
|
declare const Dropdown: <T extends DropdownItemOption>(props: Omit<DropdownNewProps<T>, "size" | "view"> & Pick<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
|
40
4
|
size: {
|
41
5
|
s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
@@ -307,6 +307,6 @@ declare const SelectNewHope: React.FunctionComponent<import("@salutejs/plasma-ne
|
|
307
307
|
hasItems?: boolean | undefined;
|
308
308
|
isOpen?: boolean | undefined;
|
309
309
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "nonce" | "onResize" | "onResizeCapture" | "value"> & React.RefAttributes<HTMLButtonElement>))>;
|
310
|
-
|
310
|
+
declare type SelectProps<K extends ItemOptionSelect> = DistributiveOmit<SelectPropsNewHope<K>, 'size' | 'view' | 'chipView' | 'disabled'> & DistributivePick<ComponentProps<typeof SelectNewHope>, 'size' | 'view' | 'chipView' | 'disabled'>;
|
311
311
|
declare const Select: <K extends ItemOptionSelect>(props: SelectProps<K> & React.RefAttributes<HTMLButtonElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
312
312
|
export { Select };
|
@@ -7,7 +7,17 @@ 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
|
+
*/
|
10
16
|
dark: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
17
|
+
/**
|
18
|
+
* @deprecated
|
19
|
+
* светлый и темный фон регулировать через `view` компонента `ViewContainer`
|
20
|
+
*/
|
11
21
|
light: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
12
22
|
};
|
13
23
|
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, _templateObject7, _templateObject8;
|
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,17 +16,27 @@ 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
|
-
|
19
|
+
positive: /*#__PURE__*/(0, _styledComponents.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-positive);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.contentLeftColor, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover),
|
20
|
+
negative: /*#__PURE__*/(0, _styledComponents.css)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-negative);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), _styledComponents.toastTokens.color, _styledComponents.toastTokens.background, _styledComponents.toastTokens.contentLeftColor, _styledComponents.toastTokens.closeIconColor, _styledComponents.toastTokens.closeIconColorOnHover),
|
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)
|
21
31
|
},
|
22
32
|
size: {
|
23
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(
|
33
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(_templateObject6 || (_templateObject6 = /*#__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.contentLeftMargin, _styledComponents.toastTokens.closeIconMargin)
|
24
34
|
},
|
25
35
|
closeIconType: {
|
26
|
-
thin: /*#__PURE__*/(0, _styledComponents.css)(
|
36
|
+
thin: /*#__PURE__*/(0, _styledComponents.css)(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), _styledComponents.toastTokens.closeIconButtonSize, _styledComponents.toastTokens.closeIconSize)
|
27
37
|
},
|
28
38
|
pilled: {
|
29
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)(
|
39
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)(_templateObject8 || (_templateObject8 = /*#__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.contentLeftMargin, _styledComponents.toastTokens.closeIconMargin)
|
30
40
|
}
|
31
41
|
}
|
32
42
|
};
|
@@ -3,6 +3,8 @@ 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;
|
6
8
|
dark: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
7
9
|
light: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
8
10
|
};
|
@@ -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, _templateObject7, _templateObject8;
|
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,17 +16,27 @@ 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
|
-
|
19
|
+
positive: /*#__PURE__*/(0, _emotion.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-positive);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.contentLeftColor, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover),
|
20
|
+
negative: /*#__PURE__*/(0, _emotion.css)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-negative);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), _emotion.toastTokens.color, _emotion.toastTokens.background, _emotion.toastTokens.contentLeftColor, _emotion.toastTokens.closeIconColor, _emotion.toastTokens.closeIconColorOnHover),
|
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)
|
21
31
|
},
|
22
32
|
size: {
|
23
|
-
s: /*#__PURE__*/(0, _emotion.css)(
|
33
|
+
s: /*#__PURE__*/(0, _emotion.css)(_templateObject6 || (_templateObject6 = /*#__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.contentLeftMargin, _emotion.toastTokens.closeIconMargin)
|
24
34
|
},
|
25
35
|
closeIconType: {
|
26
|
-
thin: /*#__PURE__*/(0, _emotion.css)(
|
36
|
+
thin: /*#__PURE__*/(0, _emotion.css)(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), _emotion.toastTokens.closeIconButtonSize, _emotion.toastTokens.closeIconSize)
|
27
37
|
},
|
28
38
|
pilled: {
|
29
|
-
"true": /*#__PURE__*/(0, _emotion.css)(
|
39
|
+
"true": /*#__PURE__*/(0, _emotion.css)(_templateObject8 || (_templateObject8 = /*#__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.contentLeftMargin, _emotion.toastTokens.closeIconMargin)
|
30
40
|
}
|
31
41
|
}
|
32
42
|
};
|
@@ -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
|
+
|
13
15
|
const meta: Meta<typeof ToastController> = {
|
14
16
|
title: 'Overlay/Toast',
|
15
17
|
decorators: [InSpacingDecorator],
|
16
18
|
argTypes: {
|
17
19
|
view: {
|
18
|
-
options:
|
20
|
+
options: views,
|
19
21
|
control: {
|
20
22
|
type: 'select',
|
21
23
|
},
|
22
24
|
},
|
23
|
-
|
24
|
-
|
25
|
-
control: {
|
26
|
-
type: 'inline-radio',
|
27
|
-
},
|
25
|
+
textColor: {
|
26
|
+
control: 'color',
|
28
27
|
},
|
29
|
-
|
28
|
+
// NOTE: контролы 'textColor' и 'view' временно скрыты для сторибуков sdds-cs и sdds-insol
|
29
|
+
...disableProps(['textColor', 'view', 'closeIconType', 'size', 'role', 'onShow', 'onHide', 'contentLeft']),
|
30
30
|
},
|
31
31
|
};
|
32
32
|
|
@@ -54,7 +54,6 @@ const BellIcon = (props) => (
|
|
54
54
|
);
|
55
55
|
|
56
56
|
const ToastContainer = styled.div`
|
57
|
-
position: fixed;
|
58
57
|
transform: translateX(50%);
|
59
58
|
`;
|
60
59
|
|
@@ -66,7 +65,9 @@ const Container = styled.div`
|
|
66
65
|
export const ToastComponent: StoryComponent = {
|
67
66
|
args: {
|
68
67
|
text: 'Текст всплывающего уведомления',
|
68
|
+
textColor: undefined,
|
69
69
|
view: 'default',
|
70
|
+
closeIconType: 'thin',
|
70
71
|
size: 's',
|
71
72
|
hasClose: true,
|
72
73
|
enableContentLeft: true,
|
@@ -90,6 +91,8 @@ const StoryLiveDemo = ({
|
|
90
91
|
size,
|
91
92
|
hasClose,
|
92
93
|
enableContentLeft,
|
94
|
+
closeIconType,
|
95
|
+
textColor,
|
93
96
|
}: StoryProps) => {
|
94
97
|
const { showToast, hideToast } = useToast();
|
95
98
|
const contentLeft = enableContentLeft && <BellIcon width="1.5rem" height="1.5rem" />;
|
@@ -110,6 +113,8 @@ const StoryLiveDemo = ({
|
|
110
113
|
view,
|
111
114
|
size,
|
112
115
|
hasClose,
|
116
|
+
closeIconType,
|
117
|
+
textColor,
|
113
118
|
onHide: action('onHide'),
|
114
119
|
onShow: action('onShow'),
|
115
120
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
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,17 +10,27 @@ 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
|
-
|
13
|
+
positive: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-positive);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), toastTokens.color, toastTokens.background, toastTokens.contentLeftColor, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
14
|
+
negative: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-negative);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), toastTokens.color, toastTokens.background, toastTokens.contentLeftColor, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
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)
|
15
25
|
},
|
16
26
|
size: {
|
17
|
-
s: /*#__PURE__*/css(
|
27
|
+
s: /*#__PURE__*/css(_templateObject6 || (_templateObject6 = /*#__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.contentLeftMargin, toastTokens.closeIconMargin)
|
18
28
|
},
|
19
29
|
closeIconType: {
|
20
|
-
thin: /*#__PURE__*/css(
|
30
|
+
thin: /*#__PURE__*/css(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), toastTokens.closeIconButtonSize, toastTokens.closeIconSize)
|
21
31
|
},
|
22
32
|
pilled: {
|
23
|
-
"true": /*#__PURE__*/css(
|
33
|
+
"true": /*#__PURE__*/css(_templateObject8 || (_templateObject8 = /*#__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.contentLeftMargin, toastTokens.closeIconMargin)
|
24
34
|
}
|
25
35
|
}
|
26
36
|
};
|
@@ -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
|
+
|
13
15
|
const meta: Meta<typeof ToastController> = {
|
14
16
|
title: 'Overlay/Toast',
|
15
17
|
decorators: [InSpacingDecorator],
|
16
18
|
argTypes: {
|
17
19
|
view: {
|
18
|
-
options:
|
20
|
+
options: views,
|
19
21
|
control: {
|
20
22
|
type: 'select',
|
21
23
|
},
|
22
24
|
},
|
23
|
-
|
24
|
-
|
25
|
-
control: {
|
26
|
-
type: 'inline-radio',
|
27
|
-
},
|
25
|
+
textColor: {
|
26
|
+
control: 'color',
|
28
27
|
},
|
29
|
-
|
28
|
+
// NOTE: контролы 'textColor' и 'view' временно скрыты для сторибуков sdds-cs и sdds-insol
|
29
|
+
...disableProps(['textColor', 'view', 'closeIconType', 'size', 'role', 'onShow', 'onHide', 'contentLeft']),
|
30
30
|
},
|
31
31
|
};
|
32
32
|
|
@@ -54,7 +54,6 @@ const BellIcon = (props) => (
|
|
54
54
|
);
|
55
55
|
|
56
56
|
const ToastContainer = styled.div`
|
57
|
-
position: fixed;
|
58
57
|
transform: translateX(50%);
|
59
58
|
`;
|
60
59
|
|
@@ -66,7 +65,9 @@ const Container = styled.div`
|
|
66
65
|
export const ToastComponent: StoryComponent = {
|
67
66
|
args: {
|
68
67
|
text: 'Текст всплывающего уведомления',
|
68
|
+
textColor: undefined,
|
69
69
|
view: 'default',
|
70
|
+
closeIconType: 'thin',
|
70
71
|
size: 's',
|
71
72
|
hasClose: true,
|
72
73
|
enableContentLeft: true,
|
@@ -90,6 +91,8 @@ const StoryLiveDemo = ({
|
|
90
91
|
size,
|
91
92
|
hasClose,
|
92
93
|
enableContentLeft,
|
94
|
+
closeIconType,
|
95
|
+
textColor,
|
93
96
|
}: StoryProps) => {
|
94
97
|
const { showToast, hideToast } = useToast();
|
95
98
|
const contentLeft = enableContentLeft && <BellIcon width="1.5rem" height="1.5rem" />;
|
@@ -110,6 +113,8 @@ const StoryLiveDemo = ({
|
|
110
113
|
view,
|
111
114
|
size,
|
112
115
|
hasClose,
|
116
|
+
closeIconType,
|
117
|
+
textColor,
|
113
118
|
onHide: action('onHide'),
|
114
119
|
onShow: action('onShow'),
|
115
120
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
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,17 +10,27 @@ 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
|
-
|
13
|
+
positive: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-positive);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), toastTokens.color, toastTokens.background, toastTokens.contentLeftColor, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
14
|
+
negative: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--surface-solid-card-brightness);\n ", ": var(--text-negative);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n "])), toastTokens.color, toastTokens.background, toastTokens.contentLeftColor, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover),
|
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)
|
15
25
|
},
|
16
26
|
size: {
|
17
|
-
s: /*#__PURE__*/css(
|
27
|
+
s: /*#__PURE__*/css(_templateObject6 || (_templateObject6 = /*#__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.contentLeftMargin, toastTokens.closeIconMargin)
|
18
28
|
},
|
19
29
|
closeIconType: {
|
20
|
-
thin: /*#__PURE__*/css(
|
30
|
+
thin: /*#__PURE__*/css(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.5rem;\n ", ": 1.5rem;\n "])), toastTokens.closeIconButtonSize, toastTokens.closeIconSize)
|
21
31
|
},
|
22
32
|
pilled: {
|
23
|
-
"true": /*#__PURE__*/css(
|
33
|
+
"true": /*#__PURE__*/css(_templateObject8 || (_templateObject8 = /*#__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.contentLeftMargin, toastTokens.closeIconMargin)
|
24
34
|
}
|
25
35
|
}
|
26
36
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/sdds-cs",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.238.0-canary.1719.12951148116.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.
|
33
|
+
"@salutejs/plasma-new-hope": "0.249.0-canary.1719.12951148116.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": "948aef0496344b4eb08549a4a05ae39eaca108a4"
|
127
127
|
}
|