@salutejs/sdds-serv 0.313.0-canary.2014.15531870271.0 → 0.313.0-canary.2015.15553048256.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/components/DatePicker/DatePicker.d.ts +1 -2
- package/components/Notification/Notification.css +0 -2
- package/components/Notification/Notification.d.ts +7 -6
- package/components/Notification/Notification.js +3 -13
- package/components/Notification/Notification.js.map +1 -1
- package/components/Notification/index.d.ts +3 -2
- package/emotion/cjs/components/DatePicker/DatePicker.stories.tsx +11 -3
- package/emotion/cjs/components/Notification/Notification.js +3 -21
- package/emotion/cjs/components/Notification/Notification.stories.tsx +3 -8
- package/emotion/cjs/components/Notification/index.js +4 -3
- package/emotion/es/components/DatePicker/DatePicker.stories.tsx +11 -3
- package/emotion/es/components/Notification/Notification.js +4 -5
- package/emotion/es/components/Notification/Notification.stories.tsx +3 -8
- package/emotion/es/components/Notification/index.js +2 -1
- package/es/components/Notification/Notification.css +0 -2
- package/es/components/Notification/Notification.js +4 -4
- package/es/components/Notification/Notification.js.map +1 -1
- package/package.json +7 -7
- package/styled-components/cjs/components/Notification/Notification.js +3 -21
- package/styled-components/cjs/components/Notification/index.js +4 -3
- package/styled-components/es/components/Notification/Notification.js +4 -5
- package/styled-components/es/components/Notification/index.js +2 -1
@@ -30,7 +30,7 @@ export declare const DatePicker: import("react").FunctionComponent<import("@salu
|
|
30
30
|
textBefore?: string;
|
31
31
|
textAfter?: string;
|
32
32
|
autoComplete?: string;
|
33
|
-
onCommitDate?: (value: Date | string, error?: boolean, success?: boolean, dateInfo?:
|
33
|
+
onCommitDate?: (value: Date | string, error?: boolean, success?: boolean, dateInfo?: DateInfo, originalDate?: Date, isoDate?: string) => void;
|
34
34
|
onChangeValue?: (event: import("react").SyntheticEvent<HTMLInputElement> | null, value?: string, originalDate?: DateType, isoDate?: string) => void;
|
35
35
|
onChange?: (event: {
|
36
36
|
target: {
|
@@ -111,5 +111,4 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
|
|
111
111
|
} & import("@salutejs/plasma-new-hope/types/components/DatePicker/DatePickerBase.types").DatePickerCalendarProps & Omit<import("@salutejs/plasma-new-hope/types/components/DatePicker/SingleDate/SingleDate.types").DatePickerPopoverProps, "placement"> & {
|
112
112
|
placement?: import("@salutejs/plasma-new-hope/styled-components").DatePickerRangePlacement | Array<import("@salutejs/plasma-new-hope/types/components/DatePicker/RangeDate/RangeDate.types").DatePickerRangePlacementBasic>;
|
113
113
|
isDoubleCalendar?: boolean;
|
114
|
-
closeAfterDateSelect?: boolean;
|
115
114
|
} & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<import("@salutejs/plasma-new-hope/styled-components").RangeInputRefs>>;
|
@@ -8,5 +8,3 @@
|
|
8
8
|
.Notification_config_132q76f_djsygjg__1e3f7ddc{--plasma-notification-close-icon-button-size:1.5rem;--plasma-notification-close-icon-size:1.5rem;}
|
9
9
|
.Notification_config_132q76f_x5jqj9y__1e3f7ddc{--plasma-notification-close-icon-top:0.5rem;--plasma-notification-close-icon-right:0.5rem;--plasma-notification-padding:0.375rem;--plasma-notification-textbox-padding-top-with-top-icon:0rem;--plasma-notification-content-padding-top:0.125rem;--plasma-notification-content-padding-right:0.25rem;--plasma-notification-content-padding-bottom:0rem;--plasma-notification-content-padding-left:0.25rem;--plasma-notification-buttons-margin-left:0rem;}
|
10
10
|
.Notification_config_132q76f_x1e2dde6__1e3f7ddc{--plasma-notification-close-icon-top:0.8125rem;--plasma-notification-close-icon-right:1rem;--plasma-notification-padding:0.5625rem 1rem 1rem 1rem;--plasma-notification-textbox-padding-top-with-top-icon:0.1875rem;--plasma-notification-content-padding-top:0.25rem;--plasma-notification-content-padding-right:0rem;--plasma-notification-content-padding-bottom:0rem;--plasma-notification-content-padding-left:0rem;--plasma-notification-buttons-margin-left:2rem;}
|
11
|
-
|
12
|
-
.Modal_config_1c34cg3_d142ug3n__b666ae01{--plasma-modal-overlay-with-blur-color:rgba(35,35,35,0.2);--plasma-modal-overlay-color:var(--overlay-soft);--plasma-modal-body-background:var(--surface-solid-card);--plasma-modal-body-border-radius:1.25rem;--plasma-modal-body-padding:2rem;--plasma-modal-content-padding:0.625rem;--plasma-modal-close-button-radius:0.375rem;--plasma-modal-close-button-color:var(--text-secondary);--plasma-modal-close-button-hover-color:var(--text-secondary-hover);--plasma-modal-close-button-active-color:var(--text-secondary-active);--plasma-modal-outline-focus-color:var(--surface-accent);}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, { ReactNode } from 'react';
|
2
|
-
import { NotificationProps
|
3
|
-
export {
|
4
|
-
export declare const
|
1
|
+
import React, { ComponentProps, ForwardRefExoticComponent, ReactNode } from 'react';
|
2
|
+
import { NotificationProps as NotificationPropsNewHope, NotificationPlacement } from '@salutejs/plasma-new-hope/styled-components';
|
3
|
+
export type { NotificationPlacement };
|
4
|
+
export declare const NotificationNewHope: React.FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
|
5
5
|
view: {
|
6
6
|
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
7
7
|
negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
@@ -21,11 +21,12 @@ export declare const Notification: React.FunctionComponent<import("@salutejs/pla
|
|
21
21
|
xxs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
22
22
|
};
|
23
23
|
}> & (React.HTMLAttributes<HTMLElement> | import("@salutejs/plasma-new-hope/types/engines/types").HTMLAttributesWithoutOnChange<HTMLElement> | import("@salutejs/plasma-new-hope/types/engines/types").HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>)>;
|
24
|
+
type ConfigProps = 'size' | 'view' | 'layout' | 'closeIconType';
|
25
|
+
type NotificationProps = Pick<ComponentProps<typeof NotificationNewHope>, ConfigProps> & Omit<NotificationPropsNewHope, ConfigProps>;
|
26
|
+
export declare const Notification: ForwardRefExoticComponent<NotificationProps>;
|
24
27
|
export declare const NotificationsProvider: React.FC<{
|
25
28
|
children: ReactNode;
|
26
29
|
frame?: string;
|
27
30
|
placement?: NotificationPlacement;
|
28
31
|
UNSAFE_SSR_ENABLED?: boolean;
|
29
32
|
}>;
|
30
|
-
export type { NotificationIconPlacement, NotificationPlacement, NotificationLayout, NotificationProps };
|
31
|
-
export { addNotification, closeNotification };
|
@@ -11,7 +11,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
12
12
|
|
13
13
|
var mergedConfig = /*#__PURE__*/plasmaNewHope.mergeConfig(plasmaNewHope.notificationConfig, Notification_config.config);
|
14
|
-
var
|
14
|
+
var NotificationNewHope = /*#__PURE__*/plasmaNewHope.component(mergedConfig);
|
15
|
+
var Notification = NotificationNewHope;
|
15
16
|
var NotificationsProvider = function NotificationsProvider(_ref) {
|
16
17
|
var children = _ref.children,
|
17
18
|
_ref$frame = _ref.frame,
|
@@ -26,18 +27,7 @@ var NotificationsProvider = function NotificationsProvider(_ref) {
|
|
26
27
|
}, children);
|
27
28
|
};
|
28
29
|
|
29
|
-
Object.defineProperty(exports, 'addNotification', {
|
30
|
-
enumerable: true,
|
31
|
-
get: function () { return plasmaNewHope.addNotification; }
|
32
|
-
});
|
33
|
-
Object.defineProperty(exports, 'closeNotification', {
|
34
|
-
enumerable: true,
|
35
|
-
get: function () { return plasmaNewHope.closeNotification; }
|
36
|
-
});
|
37
|
-
Object.defineProperty(exports, 'modalClasses', {
|
38
|
-
enumerable: true,
|
39
|
-
get: function () { return plasmaNewHope.modalClasses; }
|
40
|
-
});
|
41
30
|
exports.Notification = Notification;
|
31
|
+
exports.NotificationNewHope = NotificationNewHope;
|
42
32
|
exports.NotificationsProvider = NotificationsProvider;
|
43
33
|
//# sourceMappingURL=Notification.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.js","sources":["../../src-css/components/Notification/Notification.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n
|
1
|
+
{"version":3,"file":"Notification.js","sources":["../../src-css/components/Notification/Notification.tsx"],"sourcesContent":["import React, { ComponentProps, ForwardRefExoticComponent, ReactNode } from 'react';\nimport {\n NotificationProps as NotificationPropsNewHope,\n NotificationPlacement,\n notificationConfig,\n NotificationsProvider as Provider,\n component,\n mergeConfig,\n} from '@salutejs/plasma-new-hope';\n\nimport { config } from './Notification.config';\n\nexport type { NotificationPlacement };\n\nconst mergedConfig = mergeConfig(notificationConfig, config);\n\nexport const NotificationNewHope = component(mergedConfig);\n\ntype ConfigProps = 'size' | 'view' | 'layout' | 'closeIconType';\ntype NotificationProps = Pick<ComponentProps<typeof NotificationNewHope>, ConfigProps> &\n Omit<NotificationPropsNewHope, ConfigProps>;\n\nexport const Notification = NotificationNewHope as ForwardRefExoticComponent<NotificationProps>;\n\nexport const NotificationsProvider: React.FC<{\n children: ReactNode;\n frame?: string;\n placement?: NotificationPlacement;\n UNSAFE_SSR_ENABLED?: boolean;\n}> = ({ children, frame = 'document', placement, UNSAFE_SSR_ENABLED }) => {\n return (\n <Provider config={mergedConfig} frame={frame} placement={placement} UNSAFE_SSR_ENABLED={UNSAFE_SSR_ENABLED}>\n {children}\n </Provider>\n );\n};\n"],"names":["mergedConfig","mergeConfig","notificationConfig","config","NotificationNewHope","component","Notification","NotificationsProvider","_ref","children","_ref$frame","frame","placement","UNSAFE_SSR_ENABLED","React","createElement","Provider"],"mappings":";;;;;;;;;;;;AAcA,IAAMA,YAAY,gBAAGC,yBAAW,CAACC,gCAAkB,EAAEC,0BAAM,CAAC,CAAA;IAE/CC,mBAAmB,gBAAGC,uBAAS,CAACL,YAAY,EAAC;AAMnD,IAAMM,YAAY,GAAGF,oBAAmE;IAElFG,qBAKX,GAAG,SALQA,qBAKXA,CAAAC,IAAA,EAAwE;AAAA,EAAA,IAAlEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,UAAA,GAAAF,IAAA,CAAEG,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;IAAEE,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB,CAAA;AAC/D,EAAA,oBACIC,sBAAA,CAAAC,aAAA,CAACC,mCAAQ,EAAA;AAACb,IAAAA,MAAM,EAAEH,YAAa;AAACW,IAAAA,KAAK,EAAEA,KAAM;AAACC,IAAAA,SAAS,EAAEA,SAAU;AAACC,IAAAA,kBAAkB,EAAEA,kBAAAA;AAAmB,GAAA,EACtGJ,QACK,CAAC,CAAA;AAEnB;;;;;;"}
|
@@ -1,2 +1,3 @@
|
|
1
|
-
export { NotificationsProvider, Notification
|
2
|
-
export
|
1
|
+
export { NotificationsProvider, Notification } from './Notification';
|
2
|
+
export { addNotification, closeNotification } from '@salutejs/plasma-new-hope/styled-components';
|
3
|
+
export type { NotificationProps, NotificationLayout, NotificationIconPlacement, } from '@salutejs/plasma-new-hope/styled-components';
|
@@ -122,7 +122,10 @@ const StoryDefault = ({
|
|
122
122
|
contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
|
123
123
|
onBlur={onBlur}
|
124
124
|
onFocus={onFocus}
|
125
|
-
onToggle={(is) =>
|
125
|
+
onToggle={(is) => {
|
126
|
+
setIsOpen(is);
|
127
|
+
onToggle(is);
|
128
|
+
}}
|
126
129
|
onChangeValue={onChangeValue}
|
127
130
|
onCommitDate={onCommitDate}
|
128
131
|
lang={lang}
|
@@ -162,6 +165,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
162
165
|
includeEdgeDates: true,
|
163
166
|
min: new Date(2024, 1, 1),
|
164
167
|
max: new Date(2024, 12, 29),
|
168
|
+
closeAfterDateSelect: true,
|
165
169
|
maskWithFormat: false,
|
166
170
|
required: false,
|
167
171
|
requiredPlacement: 'right',
|
@@ -257,7 +261,10 @@ const StoryRange = ({
|
|
257
261
|
secondTextfieldTextBefore={
|
258
262
|
showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
|
259
263
|
}
|
260
|
-
onToggle={(is) =>
|
264
|
+
onToggle={(is) => {
|
265
|
+
setIsOpen(is);
|
266
|
+
onToggle(is);
|
267
|
+
}}
|
261
268
|
onChangeFirstValue={onChangeFirstValue}
|
262
269
|
onChangeSecondValue={onChangeSecondValue}
|
263
270
|
{...dividerIconProps}
|
@@ -290,11 +297,11 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
290
297
|
calendarContainerHeight: 0,
|
291
298
|
stretched: false,
|
292
299
|
isDoubleCalendar: false,
|
293
|
-
closeAfterDateSelect: true,
|
294
300
|
dividerVariant: 'dash',
|
295
301
|
includeEdgeDates: true,
|
296
302
|
min: new Date(2024, 1, 1),
|
297
303
|
max: new Date(2024, 12, 29),
|
304
|
+
closeAfterDateSelect: true,
|
298
305
|
renderFromDate: new Date(2024, 4, 14),
|
299
306
|
lang: 'ru',
|
300
307
|
format: 'DD.MM.YYYY',
|
@@ -386,6 +393,7 @@ export const Deferred: StoryObj<StoryPropsDefault> = {
|
|
386
393
|
includeEdgeDates: true,
|
387
394
|
min: new Date(2024, 1, 1),
|
388
395
|
max: new Date(2024, 12, 29),
|
396
|
+
closeAfterDateSelect: true,
|
389
397
|
maskWithFormat: false,
|
390
398
|
required: false,
|
391
399
|
requiredPlacement: 'right',
|
@@ -3,32 +3,14 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.NotificationsProvider = exports.Notification = void 0;
|
7
|
-
Object.defineProperty(exports, "addNotification", {
|
8
|
-
enumerable: true,
|
9
|
-
get: function get() {
|
10
|
-
return _emotion.addNotification;
|
11
|
-
}
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "closeNotification", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function get() {
|
16
|
-
return _emotion.closeNotification;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
Object.defineProperty(exports, "modalClasses", {
|
20
|
-
enumerable: true,
|
21
|
-
get: function get() {
|
22
|
-
return _Modal.modalClasses;
|
23
|
-
}
|
24
|
-
});
|
6
|
+
exports.NotificationsProvider = exports.NotificationNewHope = exports.Notification = void 0;
|
25
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
26
8
|
var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
|
27
9
|
var _Notification = /*#__PURE__*/require("./Notification.config");
|
28
|
-
var _Modal = /*#__PURE__*/require("../Modal");
|
29
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
30
11
|
var mergedConfig = /*#__PURE__*/(0, _emotion.mergeConfig)(_emotion.notificationConfig, _Notification.config);
|
31
|
-
var
|
12
|
+
var NotificationNewHope = exports.NotificationNewHope = /*#__PURE__*/(0, _emotion.component)(mergedConfig);
|
13
|
+
var Notification = exports.Notification = NotificationNewHope;
|
32
14
|
var NotificationsProvider = exports.NotificationsProvider = function NotificationsProvider(_ref) {
|
33
15
|
var children = _ref.children,
|
34
16
|
_ref$frame = _ref.frame,
|
@@ -4,19 +4,14 @@ import type { StoryObj, Meta } from '@storybook/react';
|
|
4
4
|
import { IconDisclosureRight } from '@salutejs/plasma-icons';
|
5
5
|
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
|
6
6
|
import { action } from '@storybook/addon-actions';
|
7
|
+
import { addNotification } from '@salutejs/plasma-new-hope';
|
8
|
+
import type { NotificationIconPlacement, NotificationLayout } from '@salutejs/plasma-new-hope';
|
7
9
|
|
8
10
|
import { Button } from '../Button/Button';
|
9
11
|
import { Modal } from '../Modal/Modal';
|
10
12
|
import { PopupProvider } from '../Popup';
|
11
13
|
|
12
|
-
import {
|
13
|
-
Notification,
|
14
|
-
NotificationsProvider,
|
15
|
-
NotificationPlacement,
|
16
|
-
NotificationIconPlacement,
|
17
|
-
NotificationLayout,
|
18
|
-
addNotification,
|
19
|
-
} from './Notification';
|
14
|
+
import { Notification, NotificationsProvider, NotificationPlacement } from './Notification';
|
20
15
|
|
21
16
|
const titles = ['Выполнено', 'Внимание', 'Ошибка'];
|
22
17
|
const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
|
@@ -18,13 +18,14 @@ Object.defineProperty(exports, "NotificationsProvider", {
|
|
18
18
|
Object.defineProperty(exports, "addNotification", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function get() {
|
21
|
-
return
|
21
|
+
return _emotion.addNotification;
|
22
22
|
}
|
23
23
|
});
|
24
24
|
Object.defineProperty(exports, "closeNotification", {
|
25
25
|
enumerable: true,
|
26
26
|
get: function get() {
|
27
|
-
return
|
27
|
+
return _emotion.closeNotification;
|
28
28
|
}
|
29
29
|
});
|
30
|
-
var _Notification = /*#__PURE__*/require("./Notification");
|
30
|
+
var _Notification = /*#__PURE__*/require("./Notification");
|
31
|
+
var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
|
@@ -122,7 +122,10 @@ const StoryDefault = ({
|
|
122
122
|
contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
|
123
123
|
onBlur={onBlur}
|
124
124
|
onFocus={onFocus}
|
125
|
-
onToggle={(is) =>
|
125
|
+
onToggle={(is) => {
|
126
|
+
setIsOpen(is);
|
127
|
+
onToggle(is);
|
128
|
+
}}
|
126
129
|
onChangeValue={onChangeValue}
|
127
130
|
onCommitDate={onCommitDate}
|
128
131
|
lang={lang}
|
@@ -162,6 +165,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
162
165
|
includeEdgeDates: true,
|
163
166
|
min: new Date(2024, 1, 1),
|
164
167
|
max: new Date(2024, 12, 29),
|
168
|
+
closeAfterDateSelect: true,
|
165
169
|
maskWithFormat: false,
|
166
170
|
required: false,
|
167
171
|
requiredPlacement: 'right',
|
@@ -257,7 +261,10 @@ const StoryRange = ({
|
|
257
261
|
secondTextfieldTextBefore={
|
258
262
|
showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
|
259
263
|
}
|
260
|
-
onToggle={(is) =>
|
264
|
+
onToggle={(is) => {
|
265
|
+
setIsOpen(is);
|
266
|
+
onToggle(is);
|
267
|
+
}}
|
261
268
|
onChangeFirstValue={onChangeFirstValue}
|
262
269
|
onChangeSecondValue={onChangeSecondValue}
|
263
270
|
{...dividerIconProps}
|
@@ -290,11 +297,11 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
290
297
|
calendarContainerHeight: 0,
|
291
298
|
stretched: false,
|
292
299
|
isDoubleCalendar: false,
|
293
|
-
closeAfterDateSelect: true,
|
294
300
|
dividerVariant: 'dash',
|
295
301
|
includeEdgeDates: true,
|
296
302
|
min: new Date(2024, 1, 1),
|
297
303
|
max: new Date(2024, 12, 29),
|
304
|
+
closeAfterDateSelect: true,
|
298
305
|
renderFromDate: new Date(2024, 4, 14),
|
299
306
|
lang: 'ru',
|
300
307
|
format: 'DD.MM.YYYY',
|
@@ -386,6 +393,7 @@ export const Deferred: StoryObj<StoryPropsDefault> = {
|
|
386
393
|
includeEdgeDates: true,
|
387
394
|
min: new Date(2024, 1, 1),
|
388
395
|
max: new Date(2024, 12, 29),
|
396
|
+
closeAfterDateSelect: true,
|
389
397
|
maskWithFormat: false,
|
390
398
|
required: false,
|
391
399
|
requiredPlacement: 'right',
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { notificationConfig, NotificationsProvider as Provider, component, mergeConfig } from '@salutejs/plasma-new-hope/emotion';
|
3
3
|
import { config } from './Notification.config';
|
4
|
-
export { modalClasses } from '../Modal';
|
5
4
|
var mergedConfig = /*#__PURE__*/mergeConfig(notificationConfig, config);
|
6
|
-
export var
|
5
|
+
export var NotificationNewHope = /*#__PURE__*/component(mergedConfig);
|
6
|
+
export var Notification = NotificationNewHope;
|
7
7
|
export var NotificationsProvider = function NotificationsProvider(_ref) {
|
8
8
|
var children = _ref.children,
|
9
9
|
_ref$frame = _ref.frame,
|
@@ -16,5 +16,4 @@ export var NotificationsProvider = function NotificationsProvider(_ref) {
|
|
16
16
|
placement: placement,
|
17
17
|
UNSAFE_SSR_ENABLED: UNSAFE_SSR_ENABLED
|
18
18
|
}, children);
|
19
|
-
};
|
20
|
-
export { addNotification, closeNotification };
|
19
|
+
};
|
@@ -4,19 +4,14 @@ import type { StoryObj, Meta } from '@storybook/react';
|
|
4
4
|
import { IconDisclosureRight } from '@salutejs/plasma-icons';
|
5
5
|
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
|
6
6
|
import { action } from '@storybook/addon-actions';
|
7
|
+
import { addNotification } from '@salutejs/plasma-new-hope';
|
8
|
+
import type { NotificationIconPlacement, NotificationLayout } from '@salutejs/plasma-new-hope';
|
7
9
|
|
8
10
|
import { Button } from '../Button/Button';
|
9
11
|
import { Modal } from '../Modal/Modal';
|
10
12
|
import { PopupProvider } from '../Popup';
|
11
13
|
|
12
|
-
import {
|
13
|
-
Notification,
|
14
|
-
NotificationsProvider,
|
15
|
-
NotificationPlacement,
|
16
|
-
NotificationIconPlacement,
|
17
|
-
NotificationLayout,
|
18
|
-
addNotification,
|
19
|
-
} from './Notification';
|
14
|
+
import { Notification, NotificationsProvider, NotificationPlacement } from './Notification';
|
20
15
|
|
21
16
|
const titles = ['Выполнено', 'Внимание', 'Ошибка'];
|
22
17
|
const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
|
@@ -1 +1,2 @@
|
|
1
|
-
export { NotificationsProvider, Notification
|
1
|
+
export { NotificationsProvider, Notification } from './Notification';
|
2
|
+
export { addNotification, closeNotification } from '@salutejs/plasma-new-hope/emotion';
|
@@ -8,5 +8,3 @@
|
|
8
8
|
.Notification_config_132q76f_djsygjg__1e3f7ddc{--plasma-notification-close-icon-button-size:1.5rem;--plasma-notification-close-icon-size:1.5rem;}
|
9
9
|
.Notification_config_132q76f_x5jqj9y__1e3f7ddc{--plasma-notification-close-icon-top:0.5rem;--plasma-notification-close-icon-right:0.5rem;--plasma-notification-padding:0.375rem;--plasma-notification-textbox-padding-top-with-top-icon:0rem;--plasma-notification-content-padding-top:0.125rem;--plasma-notification-content-padding-right:0.25rem;--plasma-notification-content-padding-bottom:0rem;--plasma-notification-content-padding-left:0.25rem;--plasma-notification-buttons-margin-left:0rem;}
|
10
10
|
.Notification_config_132q76f_x1e2dde6__1e3f7ddc{--plasma-notification-close-icon-top:0.8125rem;--plasma-notification-close-icon-right:1rem;--plasma-notification-padding:0.5625rem 1rem 1rem 1rem;--plasma-notification-textbox-padding-top-with-top-icon:0.1875rem;--plasma-notification-content-padding-top:0.25rem;--plasma-notification-content-padding-right:0rem;--plasma-notification-content-padding-bottom:0rem;--plasma-notification-content-padding-left:0rem;--plasma-notification-buttons-margin-left:2rem;}
|
11
|
-
|
12
|
-
.Modal_config_1c34cg3_d142ug3n__b666ae01{--plasma-modal-overlay-with-blur-color:rgba(35,35,35,0.2);--plasma-modal-overlay-color:var(--overlay-soft);--plasma-modal-body-background:var(--surface-solid-card);--plasma-modal-body-border-radius:1.25rem;--plasma-modal-body-padding:2rem;--plasma-modal-content-padding:0.625rem;--plasma-modal-close-button-radius:0.375rem;--plasma-modal-close-button-color:var(--text-secondary);--plasma-modal-close-button-hover-color:var(--text-secondary-hover);--plasma-modal-close-button-active-color:var(--text-secondary-active);--plasma-modal-outline-focus-color:var(--surface-accent);}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
export { addNotification, closeNotification, modalClasses } from '@salutejs/plasma-new-hope';
|
2
|
+
import { NotificationsProvider as NotificationsProvider$1, mergeConfig, notificationConfig, component } from '@salutejs/plasma-new-hope';
|
4
3
|
import { config } from './Notification.config.js';
|
5
4
|
|
6
5
|
var mergedConfig = /*#__PURE__*/mergeConfig(notificationConfig, config);
|
7
|
-
var
|
6
|
+
var NotificationNewHope = /*#__PURE__*/component(mergedConfig);
|
7
|
+
var Notification = NotificationNewHope;
|
8
8
|
var NotificationsProvider = function NotificationsProvider(_ref) {
|
9
9
|
var children = _ref.children,
|
10
10
|
_ref$frame = _ref.frame,
|
@@ -19,5 +19,5 @@ var NotificationsProvider = function NotificationsProvider(_ref) {
|
|
19
19
|
}, children);
|
20
20
|
};
|
21
21
|
|
22
|
-
export { Notification, NotificationsProvider };
|
22
|
+
export { Notification, NotificationNewHope, NotificationsProvider };
|
23
23
|
//# sourceMappingURL=Notification.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.js","sources":["../../../src-css/components/Notification/Notification.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n
|
1
|
+
{"version":3,"file":"Notification.js","sources":["../../../src-css/components/Notification/Notification.tsx"],"sourcesContent":["import React, { ComponentProps, ForwardRefExoticComponent, ReactNode } from 'react';\nimport {\n NotificationProps as NotificationPropsNewHope,\n NotificationPlacement,\n notificationConfig,\n NotificationsProvider as Provider,\n component,\n mergeConfig,\n} from '@salutejs/plasma-new-hope';\n\nimport { config } from './Notification.config';\n\nexport type { NotificationPlacement };\n\nconst mergedConfig = mergeConfig(notificationConfig, config);\n\nexport const NotificationNewHope = component(mergedConfig);\n\ntype ConfigProps = 'size' | 'view' | 'layout' | 'closeIconType';\ntype NotificationProps = Pick<ComponentProps<typeof NotificationNewHope>, ConfigProps> &\n Omit<NotificationPropsNewHope, ConfigProps>;\n\nexport const Notification = NotificationNewHope as ForwardRefExoticComponent<NotificationProps>;\n\nexport const NotificationsProvider: React.FC<{\n children: ReactNode;\n frame?: string;\n placement?: NotificationPlacement;\n UNSAFE_SSR_ENABLED?: boolean;\n}> = ({ children, frame = 'document', placement, UNSAFE_SSR_ENABLED }) => {\n return (\n <Provider config={mergedConfig} frame={frame} placement={placement} UNSAFE_SSR_ENABLED={UNSAFE_SSR_ENABLED}>\n {children}\n </Provider>\n );\n};\n"],"names":["mergedConfig","mergeConfig","notificationConfig","config","NotificationNewHope","component","Notification","NotificationsProvider","_ref","children","_ref$frame","frame","placement","UNSAFE_SSR_ENABLED","React","createElement","Provider"],"mappings":";;;;AAcA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,kBAAkB,EAAEC,MAAM,CAAC,CAAA;IAE/CC,mBAAmB,gBAAGC,SAAS,CAACL,YAAY,EAAC;AAMnD,IAAMM,YAAY,GAAGF,oBAAmE;IAElFG,qBAKX,GAAG,SALQA,qBAKXA,CAAAC,IAAA,EAAwE;AAAA,EAAA,IAAlEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,UAAA,GAAAF,IAAA,CAAEG,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;IAAEE,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB,CAAA;AAC/D,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,uBAAQ,EAAA;AAACb,IAAAA,MAAM,EAAEH,YAAa;AAACW,IAAAA,KAAK,EAAEA,KAAM;AAACC,IAAAA,SAAS,EAAEA,SAAU;AAACC,IAAAA,kBAAkB,EAAEA,kBAAAA;AAAmB,GAAA,EACtGJ,QACK,CAAC,CAAA;AAEnB;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/sdds-serv",
|
3
|
-
"version": "0.313.0-canary.
|
3
|
+
"version": "0.313.0-canary.2015.15553048256.0",
|
4
4
|
"description": "Salute Design System / React UI kit for SDDS SERV web applications",
|
5
5
|
"author": "Salute Frontend Team <salute.developers@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -32,8 +32,8 @@
|
|
32
32
|
"directory": "packages/sdds-serv"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@salutejs/plasma-new-hope": "0.326.0-canary.
|
36
|
-
"@salutejs/sdds-themes": "0.38.0-canary.
|
35
|
+
"@salutejs/plasma-new-hope": "0.326.0-canary.2015.15553048256.0",
|
36
|
+
"@salutejs/sdds-themes": "0.38.0-canary.2015.15553048256.0"
|
37
37
|
},
|
38
38
|
"peerDependencies": {
|
39
39
|
"@emotion/react": ">=11",
|
@@ -63,10 +63,10 @@
|
|
63
63
|
"@rollup/plugin-commonjs": "^25.0.4",
|
64
64
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
65
65
|
"@salutejs/plasma-colors": "0.15.0",
|
66
|
-
"@salutejs/plasma-core": "1.198.0-canary.
|
67
|
-
"@salutejs/plasma-cy-utils": "0.129.0-canary.
|
66
|
+
"@salutejs/plasma-core": "1.198.0-canary.2015.15553048256.0",
|
67
|
+
"@salutejs/plasma-cy-utils": "0.129.0-canary.2015.15553048256.0",
|
68
68
|
"@salutejs/plasma-icons": "1.218.0",
|
69
|
-
"@salutejs/plasma-sb-utils": "0.199.0-canary.
|
69
|
+
"@salutejs/plasma-sb-utils": "0.199.0-canary.2015.15553048256.0",
|
70
70
|
"@storybook/addon-docs": "7.6.17",
|
71
71
|
"@storybook/addon-essentials": "7.6.17",
|
72
72
|
"@storybook/addons": "7.6.17",
|
@@ -137,5 +137,5 @@
|
|
137
137
|
"sideEffects": [
|
138
138
|
"*.css"
|
139
139
|
],
|
140
|
-
"gitHead": "
|
140
|
+
"gitHead": "0f3b21f34120c63eebbf76acdd19fcf3693bdd79"
|
141
141
|
}
|
@@ -3,32 +3,14 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.NotificationsProvider = exports.Notification = void 0;
|
7
|
-
Object.defineProperty(exports, "addNotification", {
|
8
|
-
enumerable: true,
|
9
|
-
get: function get() {
|
10
|
-
return _styledComponents.addNotification;
|
11
|
-
}
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "closeNotification", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function get() {
|
16
|
-
return _styledComponents.closeNotification;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
Object.defineProperty(exports, "modalClasses", {
|
20
|
-
enumerable: true,
|
21
|
-
get: function get() {
|
22
|
-
return _Modal.modalClasses;
|
23
|
-
}
|
24
|
-
});
|
6
|
+
exports.NotificationsProvider = exports.NotificationNewHope = exports.Notification = void 0;
|
25
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
26
8
|
var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
|
27
9
|
var _Notification = /*#__PURE__*/require("./Notification.config");
|
28
|
-
var _Modal = /*#__PURE__*/require("../Modal");
|
29
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
30
11
|
var mergedConfig = /*#__PURE__*/(0, _styledComponents.mergeConfig)(_styledComponents.notificationConfig, _Notification.config);
|
31
|
-
var
|
12
|
+
var NotificationNewHope = exports.NotificationNewHope = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
|
13
|
+
var Notification = exports.Notification = NotificationNewHope;
|
32
14
|
var NotificationsProvider = exports.NotificationsProvider = function NotificationsProvider(_ref) {
|
33
15
|
var children = _ref.children,
|
34
16
|
_ref$frame = _ref.frame,
|
@@ -18,13 +18,14 @@ Object.defineProperty(exports, "NotificationsProvider", {
|
|
18
18
|
Object.defineProperty(exports, "addNotification", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function get() {
|
21
|
-
return
|
21
|
+
return _styledComponents.addNotification;
|
22
22
|
}
|
23
23
|
});
|
24
24
|
Object.defineProperty(exports, "closeNotification", {
|
25
25
|
enumerable: true,
|
26
26
|
get: function get() {
|
27
|
-
return
|
27
|
+
return _styledComponents.closeNotification;
|
28
28
|
}
|
29
29
|
});
|
30
|
-
var _Notification = /*#__PURE__*/require("./Notification");
|
30
|
+
var _Notification = /*#__PURE__*/require("./Notification");
|
31
|
+
var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { notificationConfig, NotificationsProvider as Provider, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components';
|
3
3
|
import { config } from './Notification.config';
|
4
|
-
export { modalClasses } from '../Modal';
|
5
4
|
var mergedConfig = /*#__PURE__*/mergeConfig(notificationConfig, config);
|
6
|
-
export var
|
5
|
+
export var NotificationNewHope = /*#__PURE__*/component(mergedConfig);
|
6
|
+
export var Notification = NotificationNewHope;
|
7
7
|
export var NotificationsProvider = function NotificationsProvider(_ref) {
|
8
8
|
var children = _ref.children,
|
9
9
|
_ref$frame = _ref.frame,
|
@@ -16,5 +16,4 @@ export var NotificationsProvider = function NotificationsProvider(_ref) {
|
|
16
16
|
placement: placement,
|
17
17
|
UNSAFE_SSR_ENABLED: UNSAFE_SSR_ENABLED
|
18
18
|
}, children);
|
19
|
-
};
|
20
|
-
export { addNotification, closeNotification };
|
19
|
+
};
|
@@ -1 +1,2 @@
|
|
1
|
-
export { NotificationsProvider, Notification
|
1
|
+
export { NotificationsProvider, Notification } from './Notification';
|
2
|
+
export { addNotification, closeNotification } from '@salutejs/plasma-new-hope/styled-components';
|