@salutejs/sdds-cs 0.318.0-canary.2014.15531870271.0 → 0.318.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.
@@ -27,7 +27,7 @@ export declare const DatePicker: import("react").FunctionComponent<import("@salu
27
27
  textBefore?: string;
28
28
  textAfter?: string;
29
29
  autoComplete?: string;
30
- onCommitDate?: (value: Date | string, error?: boolean, success?: boolean, dateInfo?: import("src/components/Calendar/Calendar.types").DateInfo, originalDate?: Date, isoDate?: string) => void;
30
+ onCommitDate?: (value: Date | string, error?: boolean, success?: boolean, dateInfo?: DateInfo, originalDate?: Date, isoDate?: string) => void;
31
31
  onChangeValue?: (event: import("react").SyntheticEvent<HTMLInputElement> | null, value?: string, originalDate?: DateType, isoDate?: string) => void;
32
32
  onChange?: (event: {
33
33
  target: {
@@ -105,5 +105,4 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
105
105
  } & 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"> & {
106
106
  placement?: import("@salutejs/plasma-new-hope/styled-components").DatePickerRangePlacement | Array<import("@salutejs/plasma-new-hope/types/components/DatePicker/RangeDate/RangeDate.types").DatePickerRangePlacementBasic>;
107
107
  isDoubleCalendar?: boolean;
108
- closeAfterDateSelect?: boolean;
109
108
  } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<import("@salutejs/plasma-new-hope/styled-components").RangeInputRefs>>;
@@ -1,7 +1,7 @@
1
- import React, { ReactNode } from 'react';
2
- import { NotificationProps, NotificationIconPlacement, NotificationPlacement, NotificationLayout, addNotification, closeNotification } from '@salutejs/plasma-new-hope/styled-components';
3
- export { modalClasses } from '../Modal';
4
- export declare const Notification: React.FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
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
  };
@@ -17,11 +17,12 @@ export declare const Notification: React.FunctionComponent<import("@salutejs/pla
17
17
  thin: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
18
18
  };
19
19
  }> & (React.HTMLAttributes<HTMLElement> | import("@salutejs/plasma-new-hope/types/engines/types").HTMLAttributesWithoutOnChange<HTMLElement> | import("@salutejs/plasma-new-hope/types/engines/types").HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>)>;
20
+ type ConfigProps = 'size' | 'view' | 'layout' | 'closeIconType';
21
+ type NotificationProps = Pick<ComponentProps<typeof NotificationNewHope>, ConfigProps> & Omit<NotificationPropsNewHope, ConfigProps>;
22
+ export declare const Notification: ForwardRefExoticComponent<NotificationProps>;
20
23
  export declare const NotificationsProvider: React.FC<{
21
24
  children: ReactNode;
22
25
  frame?: string;
23
26
  placement?: NotificationPlacement;
24
27
  UNSAFE_SSR_ENABLED?: boolean;
25
28
  }>;
26
- export type { NotificationIconPlacement, NotificationPlacement, NotificationLayout, NotificationProps };
27
- export { addNotification, closeNotification };
@@ -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 Notification = exports.Notification = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
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,
@@ -1,2 +1,3 @@
1
- export { NotificationsProvider, Notification, addNotification, closeNotification } from './Notification';
2
- export type { NotificationIconPlacement, NotificationLayout, NotificationProps } from './Notification';
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';
@@ -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 _Notification.addNotification;
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 _Notification.closeNotification;
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");
@@ -107,7 +107,10 @@ const StoryDefault = ({
107
107
  contentRight={enableContentRight ? <IconCalendarOutline size={iconSize} /> : undefined}
108
108
  onBlur={onBlur}
109
109
  onFocus={onFocus}
110
- onToggle={(is) => setIsOpen(is)}
110
+ onToggle={(is) => {
111
+ setIsOpen(is);
112
+ onToggle(is);
113
+ }}
111
114
  onChangeValue={onChangeValue}
112
115
  onCommitDate={onCommitDate}
113
116
  {...rest}
@@ -143,6 +146,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
143
146
  includeEdgeDates: true,
144
147
  min: new Date(2024, 1, 1),
145
148
  max: new Date(2024, 12, 29),
149
+ closeAfterDateSelect: true,
146
150
  maskWithFormat: false,
147
151
  required: false,
148
152
  requiredPlacement: 'right',
@@ -238,7 +242,10 @@ const StoryRange = ({
238
242
  secondTextfieldTextBefore={
239
243
  showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
240
244
  }
241
- onToggle={(is) => setIsOpen(is)}
245
+ onToggle={(is) => {
246
+ setIsOpen(is);
247
+ onToggle(is);
248
+ }}
242
249
  onChangeFirstValue={onChangeFirstValue}
243
250
  onChangeSecondValue={onChangeSecondValue}
244
251
  {...dividerIconProps}
@@ -275,6 +282,7 @@ export const Range: StoryObj<StoryPropsRange> = {
275
282
  includeEdgeDates: true,
276
283
  min: new Date(2024, 1, 1),
277
284
  max: new Date(2024, 12, 29),
285
+ closeAfterDateSelect: true,
278
286
  renderFromDate: new Date(2024, 4, 14),
279
287
  maskWithFormat: false,
280
288
  required: false,
@@ -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 Notification = exports.Notification = /*#__PURE__*/(0, _emotion.component)(mergedConfig);
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, IconSber } from '@salutejs/plasma-icons';
5
5
  import { disableProps, 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 _Notification.addNotification;
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 _Notification.closeNotification;
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");
@@ -107,7 +107,10 @@ const StoryDefault = ({
107
107
  contentRight={enableContentRight ? <IconCalendarOutline size={iconSize} /> : undefined}
108
108
  onBlur={onBlur}
109
109
  onFocus={onFocus}
110
- onToggle={(is) => setIsOpen(is)}
110
+ onToggle={(is) => {
111
+ setIsOpen(is);
112
+ onToggle(is);
113
+ }}
111
114
  onChangeValue={onChangeValue}
112
115
  onCommitDate={onCommitDate}
113
116
  {...rest}
@@ -143,6 +146,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
143
146
  includeEdgeDates: true,
144
147
  min: new Date(2024, 1, 1),
145
148
  max: new Date(2024, 12, 29),
149
+ closeAfterDateSelect: true,
146
150
  maskWithFormat: false,
147
151
  required: false,
148
152
  requiredPlacement: 'right',
@@ -238,7 +242,10 @@ const StoryRange = ({
238
242
  secondTextfieldTextBefore={
239
243
  showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
240
244
  }
241
- onToggle={(is) => setIsOpen(is)}
245
+ onToggle={(is) => {
246
+ setIsOpen(is);
247
+ onToggle(is);
248
+ }}
242
249
  onChangeFirstValue={onChangeFirstValue}
243
250
  onChangeSecondValue={onChangeSecondValue}
244
251
  {...dividerIconProps}
@@ -275,6 +282,7 @@ export const Range: StoryObj<StoryPropsRange> = {
275
282
  includeEdgeDates: true,
276
283
  min: new Date(2024, 1, 1),
277
284
  max: new Date(2024, 12, 29),
285
+ closeAfterDateSelect: true,
278
286
  renderFromDate: new Date(2024, 4, 14),
279
287
  maskWithFormat: false,
280
288
  required: false,
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { component, mergeConfig, notificationConfig, NotificationsProvider as Provider, addNotification, closeNotification } from '@salutejs/plasma-new-hope/emotion';
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 Notification = /*#__PURE__*/component(mergedConfig);
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, IconSber } from '@salutejs/plasma-icons';
5
5
  import { disableProps, 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, addNotification, closeNotification } from './Notification';
1
+ export { NotificationsProvider, Notification } from './Notification';
2
+ export { addNotification, closeNotification } from '@salutejs/plasma-new-hope/emotion';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { component, mergeConfig, notificationConfig, NotificationsProvider as Provider, addNotification, closeNotification } from '@salutejs/plasma-new-hope/styled-components';
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 Notification = /*#__PURE__*/component(mergedConfig);
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, addNotification, closeNotification } from './Notification';
1
+ export { NotificationsProvider, Notification } from './Notification';
2
+ export { addNotification, closeNotification } from '@salutejs/plasma-new-hope/styled-components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/sdds-cs",
3
- "version": "0.318.0-canary.2014.15531870271.0",
3
+ "version": "0.318.0-canary.2015.15553048256.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,8 +30,8 @@
30
30
  "directory": "packages/sdds-cs"
31
31
  },
32
32
  "dependencies": {
33
- "@salutejs/plasma-new-hope": "0.326.0-canary.2014.15531870271.0",
34
- "@salutejs/sdds-themes": "0.38.0-canary.2014.15531870271.0"
33
+ "@salutejs/plasma-new-hope": "0.326.0-canary.2015.15553048256.0",
34
+ "@salutejs/sdds-themes": "0.38.0-canary.2015.15553048256.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@emotion/react": ">=11",
@@ -54,10 +54,10 @@
54
54
  "@microsoft/api-extractor": "7.38.3",
55
55
  "@originjs/vite-plugin-commonjs": "1.0.3",
56
56
  "@salutejs/plasma-colors": "0.15.0",
57
- "@salutejs/plasma-core": "1.198.0-canary.2014.15531870271.0",
58
- "@salutejs/plasma-cy-utils": "0.129.0-canary.2014.15531870271.0",
57
+ "@salutejs/plasma-core": "1.198.0-canary.2015.15553048256.0",
58
+ "@salutejs/plasma-cy-utils": "0.129.0-canary.2015.15553048256.0",
59
59
  "@salutejs/plasma-icons": "1.218.0",
60
- "@salutejs/plasma-sb-utils": "0.199.0-canary.2014.15531870271.0",
60
+ "@salutejs/plasma-sb-utils": "0.199.0-canary.2015.15553048256.0",
61
61
  "@storybook/addon-docs": "7.6.17",
62
62
  "@storybook/addon-essentials": "7.6.17",
63
63
  "@storybook/addons": "7.6.17",
@@ -123,5 +123,5 @@
123
123
  "Anton Vinogradov"
124
124
  ],
125
125
  "sideEffects": false,
126
- "gitHead": "5f82a222af198e1c2e02daee64f9f4ca75d25e3b"
126
+ "gitHead": "0f3b21f34120c63eebbf76acdd19fcf3693bdd79"
127
127
  }