@salutejs/plasma-new-hope 0.324.1-canary.1997.15290839769.0 → 0.324.1-canary.1999.15295614542.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/cjs/components/Notification/Notification.css +12 -12
- package/cjs/components/Notification/Notification.js +5 -1
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +63 -48
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
- package/cjs/components/Notification/Notification.types.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.css +11 -11
- package/cjs/components/Notification/variations/_layout/base.js +1 -1
- package/cjs/components/Notification/variations/_layout/base.js.map +1 -1
- package/cjs/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
- package/cjs/index.css +12 -12
- package/emotion/cjs/components/Notification/Notification.js +5 -1
- package/emotion/cjs/components/Notification/Notification.styles.js +43 -36
- package/emotion/cjs/components/Notification/Notification.template-doc.mdx +44 -0
- package/emotion/cjs/components/Notification/variations/_layout/base.js +1 -1
- package/emotion/cjs/components/TextField/TextField.template-doc.mdx +16 -1
- package/emotion/cjs/examples/fixtures/Notification.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +23 -22
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
- package/emotion/es/components/Notification/Notification.js +5 -1
- package/emotion/es/components/Notification/Notification.styles.js +43 -36
- package/emotion/es/components/Notification/Notification.template-doc.mdx +44 -0
- package/emotion/es/components/Notification/variations/_layout/base.js +1 -1
- package/emotion/es/components/TextField/TextField.template-doc.mdx +16 -1
- package/emotion/es/examples/fixtures/Notification.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
- package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +23 -22
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
- package/es/components/Notification/Notification.css +12 -12
- package/es/components/Notification/Notification.js +5 -1
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +63 -48
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
- package/es/components/Notification/Notification.types.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.css +11 -11
- package/es/components/Notification/variations/_layout/base.js +1 -1
- package/es/components/Notification/variations/_layout/base.js.map +1 -1
- package/es/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
- package/es/index.css +12 -12
- package/package.json +2 -2
- package/styled-components/cjs/components/Notification/Notification.js +5 -1
- package/styled-components/cjs/components/Notification/Notification.styles.js +33 -26
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +44 -0
- package/styled-components/cjs/components/Notification/variations/_layout/base.js +1 -1
- package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +16 -1
- package/styled-components/cjs/examples/fixtures/Notification.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -6
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
- package/styled-components/es/components/Notification/Notification.js +5 -1
- package/styled-components/es/components/Notification/Notification.styles.js +33 -26
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +44 -0
- package/styled-components/es/components/Notification/variations/_layout/base.js +1 -1
- package/styled-components/es/components/TextField/TextField.template-doc.mdx +16 -1
- package/styled-components/es/examples/fixtures/Notification.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -6
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
- package/types/components/Notification/Notification.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts +3 -1
- package/types/components/Notification/Notification.styles.d.ts.map +1 -1
- package/types/components/Notification/Notification.types.d.ts +9 -0
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/cjs/components/Notification/variations/_layout/base_qkc3i4.css +0 -1
- package/es/components/Notification/variations/_layout/base_qkc3i4.css +0 -1
@@ -1,13 +1,14 @@
|
|
1
1
|
import React, { ComponentProps, useState } from 'react';
|
2
2
|
import type { StoryObj, Meta } from '@storybook/react';
|
3
3
|
import { action } from '@storybook/addon-actions';
|
4
|
-
import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
4
|
+
import { IconPlaceholder, getConfigVariations } from '@salutejs/plasma-sb-utils';
|
5
5
|
|
6
6
|
import { WithTheme } from '../../../_helpers';
|
7
7
|
import { IconCross, IconLock } from '../../../../components/_Icon';
|
8
8
|
import type { PopoverPlacement } from '../Popover/Popover';
|
9
9
|
|
10
10
|
import { TextField } from './TextField';
|
11
|
+
import { config } from './TextField.config';
|
11
12
|
|
12
13
|
const onChange = action('onChange');
|
13
14
|
const onFocus = action('onFocus');
|
@@ -15,8 +16,8 @@ const onBlur = action('onBlur');
|
|
15
16
|
const onSearch = action('onSearch');
|
16
17
|
const onChipsChange = action('onChipsChange');
|
17
18
|
|
18
|
-
const
|
19
|
-
|
19
|
+
const { views, sizes } = getConfigVariations(config);
|
20
|
+
|
20
21
|
const chipViews = ['default', 'secondary', 'accent', 'positive', 'warning', 'negative'];
|
21
22
|
const hintViews = ['default'];
|
22
23
|
const hintSizes = ['m', 's'];
|
@@ -63,6 +64,10 @@ const meta: Meta<typeof TextField> = {
|
|
63
64
|
control: {
|
64
65
|
type: 'select',
|
65
66
|
},
|
67
|
+
if: {
|
68
|
+
arg: 'optional',
|
69
|
+
truthy: false,
|
70
|
+
},
|
66
71
|
},
|
67
72
|
required: {
|
68
73
|
control: {
|
@@ -328,7 +333,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
328
333
|
},
|
329
334
|
parameters: {
|
330
335
|
controls: {
|
331
|
-
exclude: ['chipType'],
|
336
|
+
exclude: ['chipType', 'chipView'],
|
332
337
|
},
|
333
338
|
},
|
334
339
|
render: (args) => <StoryDemo {...args} />,
|
@@ -170,12 +170,14 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
|
|
170
170
|
placement?: NotificationPlacement;
|
171
171
|
};
|
172
172
|
|
173
|
-
const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
|
173
|
+
const StoryLiveDemo = ({ timeout, placement, width, maxWidth, ...rest }: StoryLiveDemoProps) => {
|
174
174
|
const count = useRef(0);
|
175
175
|
const handleClick = useCallback(() => {
|
176
176
|
addNotification(
|
177
177
|
{
|
178
178
|
icon: <IconDisclosureRight color="inherit" />,
|
179
|
+
width,
|
180
|
+
maxWidth,
|
179
181
|
...rest,
|
180
182
|
...getNotificationProps(count.current),
|
181
183
|
},
|
@@ -213,6 +215,8 @@ export const LiveDemo: StoryObj<StoryLiveDemoProps> = {
|
|
213
215
|
role: 'alert',
|
214
216
|
layout: 'vertical',
|
215
217
|
placement: 'bottom-right',
|
218
|
+
width: '',
|
219
|
+
maxWidth: '',
|
216
220
|
},
|
217
221
|
render: (args) => <StoryLiveDemo {...args} />,
|
218
222
|
};
|