@salutejs/plasma-new-hope 0.176.1-canary.1510.11572230988.0 → 0.176.1-canary.1517.11571952534.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Notification/Notification.css +11 -11
- package/cjs/components/Notification/Notification.js +2 -2
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +2 -11
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
- package/cjs/components/Notification/Notification.tokens.js +1 -2
- package/cjs/components/Notification/Notification.tokens.js.map +1 -1
- package/cjs/components/Notification/Notification.types.js.map +1 -1
- package/cjs/components/Notification/NotificationsPortal.js +4 -8
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.css +11 -11
- package/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +12 -12
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
- package/cjs/components/Select/Select.css +12 -12
- package/cjs/components/Select/Select.tokens.js +1 -2
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +12 -12
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
- package/cjs/components/Select/ui/Target/Target.css +12 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/{es/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
- package/cjs/components/Steps/Steps.css +9 -9
- package/cjs/components/Steps/Steps.tokens.js +1 -0
- package/cjs/components/Steps/Steps.tokens.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_1oh5gqm.css +9 -0
- package/cjs/index.css +31 -31
- package/cjs/index.js +1 -1
- package/emotion/cjs/components/Notification/Notification.js +2 -2
- package/emotion/cjs/components/Notification/Notification.styles.js +19 -14
- package/emotion/cjs/components/Notification/Notification.template-doc.mdx +8 -17
- package/emotion/cjs/components/Notification/Notification.tokens.js +1 -2
- package/emotion/cjs/components/Notification/NotificationsPortal.js +5 -9
- package/emotion/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/emotion/cjs/components/Notification/index.js +4 -4
- package/emotion/cjs/components/Select/Select.tokens.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
- package/emotion/cjs/components/Steps/Steps.tokens.js +1 -0
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +17 -11
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/components/Notification/Notification.js +1 -1
- package/emotion/es/components/Notification/Notification.styles.js +19 -14
- package/emotion/es/components/Notification/Notification.template-doc.mdx +8 -17
- package/emotion/es/components/Notification/Notification.tokens.js +1 -2
- package/emotion/es/components/Notification/NotificationsPortal.js +5 -9
- package/emotion/es/components/Notification/NotificationsProvider.js +1 -3
- package/emotion/es/components/Notification/index.js +1 -1
- package/emotion/es/components/Select/Select.tokens.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
- package/emotion/es/components/Steps/Steps.tokens.js +1 -0
- package/emotion/es/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +17 -11
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Notification/Notification.js +4 -6
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/es/components/Notification/Notification.css +11 -11
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +2 -11
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
- package/es/components/Notification/Notification.tokens.js +1 -2
- package/es/components/Notification/Notification.tokens.js.map +1 -1
- package/es/components/Notification/Notification.types.js.map +1 -1
- package/es/components/Notification/NotificationsPortal.js +4 -8
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.css +11 -11
- package/es/components/Notification/NotificationsProvider.js +1 -3
- package/es/components/Notification/NotificationsProvider.js.map +1 -1
- package/es/components/Pagination/Pagination.css +12 -12
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
- package/es/components/Select/Select.css +12 -12
- package/es/components/Select/Select.tokens.js +1 -2
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +12 -12
- package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
- package/es/components/Select/ui/Target/Target.css +12 -12
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/{cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → es/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
- package/es/components/Steps/Steps.css +9 -9
- package/es/components/Steps/Steps.tokens.js +1 -0
- package/es/components/Steps/Steps.tokens.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/es/components/Steps/ui/StepItem/StepItem.js +30 -8
- package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles_1oh5gqm.css +9 -0
- package/es/index.css +31 -31
- package/es/index.js +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Notification/Notification.js +2 -2
- package/styled-components/cjs/components/Notification/Notification.styles.js +2 -5
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +8 -17
- package/styled-components/cjs/components/Notification/Notification.tokens.js +1 -2
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +4 -8
- package/styled-components/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/styled-components/cjs/components/Notification/index.js +4 -4
- package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/cjs/components/Steps/Steps.tokens.js +1 -0
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +12 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/components/Notification/Notification.js +1 -1
- package/styled-components/es/components/Notification/Notification.styles.js +2 -5
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +8 -17
- package/styled-components/es/components/Notification/Notification.tokens.js +1 -2
- package/styled-components/es/components/Notification/NotificationsPortal.js +4 -8
- package/styled-components/es/components/Notification/NotificationsProvider.js +1 -3
- package/styled-components/es/components/Notification/index.js +1 -1
- package/styled-components/es/components/Select/Select.tokens.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/es/components/Steps/Steps.tokens.js +1 -0
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +12 -6
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +4 -6
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/types/components/Notification/Notification.d.ts +3 -3
- package/types/components/Notification/Notification.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts +2 -4
- package/types/components/Notification/Notification.styles.d.ts.map +1 -1
- package/types/components/Notification/Notification.tokens.d.ts +0 -1
- package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
- package/types/components/Notification/Notification.types.d.ts +5 -11
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
- package/types/components/Notification/NotificationsProvider.d.ts +3 -4
- package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
- package/types/components/Notification/index.d.ts +2 -2
- package/types/components/Notification/index.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +0 -1
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Steps/Steps.tokens.d.ts +1 -0
- package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +2 -4
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Notification/Notification.d.ts +13 -4
- package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
- package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
@@ -16,16 +16,14 @@ var _engines = /*#__PURE__*/require("../../../../engines");
|
|
16
16
|
var _Notification2 = /*#__PURE__*/require("./Notification.config");
|
17
17
|
var _Modal = /*#__PURE__*/require("../../../../components/Modal");
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
19
|
-
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Notification.
|
19
|
+
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Notification.noticationConfig, _Notification2.config);
|
20
20
|
var Notification = exports.Notification = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
21
21
|
var NotificationsProvider = exports.NotificationsProvider = function NotificationsProvider(_ref) {
|
22
22
|
var children = _ref.children,
|
23
23
|
_ref$frame = _ref.frame,
|
24
|
-
frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame
|
25
|
-
placement = _ref.placement;
|
24
|
+
frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame;
|
26
25
|
return /*#__PURE__*/_react["default"].createElement(_Notification.NotificationsProvider, {
|
27
26
|
config: mergedConfig,
|
28
|
-
frame: frame
|
29
|
-
placement: placement
|
27
|
+
frame: frame
|
30
28
|
}, children);
|
31
29
|
};
|
@@ -5,7 +5,6 @@ import type { StoryObj, Meta } from '@storybook/react';
|
|
5
5
|
import { Button } from '../Button/Button';
|
6
6
|
import { Modal } from '../Modal/Modal';
|
7
7
|
import {
|
8
|
-
NotificationPlacement,
|
9
8
|
NotificationIconPlacement,
|
10
9
|
NotificationLayout,
|
11
10
|
addNotification,
|
@@ -21,7 +20,6 @@ const titles = ['Выполнено', 'Внимание', 'Ошибка'];
|
|
21
20
|
const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
|
22
21
|
const size = ['xs', 'xxs'];
|
23
22
|
const iconPlacement = ['top', 'left'];
|
24
|
-
const notificationsPlacements = ['bottom-right', 'bottom-left'];
|
25
23
|
|
26
24
|
const longText = `JavaScript frameworks are an essential part of modern front-end web development,
|
27
25
|
providing developers with proven tools for building scalable, interactive web applications.
|
@@ -51,7 +49,6 @@ interface StoryDefaultProps {
|
|
51
49
|
layout: NotificationLayout;
|
52
50
|
size: 'xs' | 'xxs';
|
53
51
|
iconPlacement: NotificationIconPlacement;
|
54
|
-
placement?: NotificationPlacement;
|
55
52
|
}
|
56
53
|
|
57
54
|
const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIcon, ...rest }: StoryDefaultProps) => {
|
@@ -114,10 +111,9 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
|
|
114
111
|
layout: NotificationLayout;
|
115
112
|
size: 'xs' | 'xxs';
|
116
113
|
iconPlacement: NotificationIconPlacement;
|
117
|
-
placement?: NotificationPlacement;
|
118
114
|
};
|
119
115
|
|
120
|
-
const StoryLiveDemo = ({ timeout,
|
116
|
+
const StoryLiveDemo = ({ timeout, ...rest }: StoryLiveDemoProps) => {
|
121
117
|
const count = useRef(0);
|
122
118
|
const handleClick = useCallback(() => {
|
123
119
|
addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
|
@@ -125,7 +121,7 @@ const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
|
|
125
121
|
}, [count, rest]);
|
126
122
|
|
127
123
|
return (
|
128
|
-
<NotificationsProvider
|
124
|
+
<NotificationsProvider>
|
129
125
|
<Button text="Добавить уведомление" onClick={handleClick} />
|
130
126
|
</NotificationsProvider>
|
131
127
|
);
|
@@ -139,28 +135,20 @@ export const LiveDemo: StoryObj<StoryLiveDemoProps> = {
|
|
139
135
|
type: 'select',
|
140
136
|
},
|
141
137
|
},
|
142
|
-
placement: {
|
143
|
-
options: notificationsPlacements,
|
144
|
-
control: {
|
145
|
-
type: 'select',
|
146
|
-
},
|
147
|
-
},
|
148
138
|
},
|
149
139
|
args: {
|
150
140
|
timeout: 3000,
|
151
141
|
role: 'alert',
|
152
142
|
layout: 'vertical',
|
153
|
-
placement: 'bottom-right',
|
154
143
|
},
|
155
144
|
render: (args) => <StoryLiveDemo {...args} />,
|
156
145
|
};
|
157
146
|
|
158
147
|
type StoryWithModalProps = ComponentProps<typeof Notification> & {
|
159
148
|
timeout: number;
|
160
|
-
placement?: NotificationPlacement;
|
161
149
|
};
|
162
150
|
|
163
|
-
const StoryWithModal = ({ timeout
|
151
|
+
const StoryWithModal = ({ timeout }: StoryWithModalProps) => {
|
164
152
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
165
153
|
const count = useRef(0);
|
166
154
|
const handleClick = useCallback(() => {
|
@@ -169,7 +157,7 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
|
|
169
157
|
}, [count]);
|
170
158
|
|
171
159
|
return (
|
172
|
-
<NotificationsProvider
|
160
|
+
<NotificationsProvider>
|
173
161
|
<PopupProvider>
|
174
162
|
<Button text="Open modal" onClick={() => setIsModalOpen(true)} />
|
175
163
|
<Modal frame="theme-root" opened={isModalOpen} onClose={() => setIsModalOpen(false)}>
|
@@ -184,15 +172,6 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
|
|
184
172
|
export const WithModal: StoryObj<StoryLiveDemoProps> = {
|
185
173
|
args: {
|
186
174
|
timeout: 3500,
|
187
|
-
placement: 'bottom-right',
|
188
|
-
},
|
189
|
-
argTypes: {
|
190
|
-
placement: {
|
191
|
-
options: notificationsPlacements,
|
192
|
-
control: {
|
193
|
-
type: 'select',
|
194
|
-
},
|
195
|
-
},
|
196
175
|
},
|
197
176
|
render: (args) => <StoryWithModal {...args} />,
|
198
177
|
};
|