@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.
Files changed (80) hide show
  1. package/cjs/components/Notification/Notification.css +12 -12
  2. package/cjs/components/Notification/Notification.js +5 -1
  3. package/cjs/components/Notification/Notification.js.map +1 -1
  4. package/cjs/components/Notification/Notification.styles.js +63 -48
  5. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  6. package/cjs/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
  7. package/cjs/components/Notification/Notification.types.js.map +1 -1
  8. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  9. package/cjs/components/Notification/variations/_layout/base.js +1 -1
  10. package/cjs/components/Notification/variations/_layout/base.js.map +1 -1
  11. package/cjs/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
  12. package/cjs/index.css +12 -12
  13. package/emotion/cjs/components/Notification/Notification.js +5 -1
  14. package/emotion/cjs/components/Notification/Notification.styles.js +43 -36
  15. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +44 -0
  16. package/emotion/cjs/components/Notification/variations/_layout/base.js +1 -1
  17. package/emotion/cjs/components/TextField/TextField.template-doc.mdx +16 -1
  18. package/emotion/cjs/examples/fixtures/Notification.js +1 -1
  19. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  20. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
  21. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  22. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  23. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +23 -22
  24. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  25. package/emotion/es/components/Notification/Notification.js +5 -1
  26. package/emotion/es/components/Notification/Notification.styles.js +43 -36
  27. package/emotion/es/components/Notification/Notification.template-doc.mdx +44 -0
  28. package/emotion/es/components/Notification/variations/_layout/base.js +1 -1
  29. package/emotion/es/components/TextField/TextField.template-doc.mdx +16 -1
  30. package/emotion/es/examples/fixtures/Notification.js +1 -1
  31. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  32. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
  33. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  34. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  35. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +23 -22
  36. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  37. package/es/components/Notification/Notification.css +12 -12
  38. package/es/components/Notification/Notification.js +5 -1
  39. package/es/components/Notification/Notification.js.map +1 -1
  40. package/es/components/Notification/Notification.styles.js +63 -48
  41. package/es/components/Notification/Notification.styles.js.map +1 -1
  42. package/es/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
  43. package/es/components/Notification/Notification.types.js.map +1 -1
  44. package/es/components/Notification/NotificationsProvider.css +11 -11
  45. package/es/components/Notification/variations/_layout/base.js +1 -1
  46. package/es/components/Notification/variations/_layout/base.js.map +1 -1
  47. package/es/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
  48. package/es/index.css +12 -12
  49. package/package.json +2 -2
  50. package/styled-components/cjs/components/Notification/Notification.js +5 -1
  51. package/styled-components/cjs/components/Notification/Notification.styles.js +33 -26
  52. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +44 -0
  53. package/styled-components/cjs/components/Notification/variations/_layout/base.js +1 -1
  54. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +16 -1
  55. package/styled-components/cjs/examples/fixtures/Notification.js +1 -1
  56. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  57. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
  58. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  59. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  60. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -6
  61. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  62. package/styled-components/es/components/Notification/Notification.js +5 -1
  63. package/styled-components/es/components/Notification/Notification.styles.js +33 -26
  64. package/styled-components/es/components/Notification/Notification.template-doc.mdx +44 -0
  65. package/styled-components/es/components/Notification/variations/_layout/base.js +1 -1
  66. package/styled-components/es/components/TextField/TextField.template-doc.mdx +16 -1
  67. package/styled-components/es/examples/fixtures/Notification.js +1 -1
  68. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  69. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
  70. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  71. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  72. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -6
  73. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  74. package/types/components/Notification/Notification.d.ts.map +1 -1
  75. package/types/components/Notification/Notification.styles.d.ts +3 -1
  76. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  77. package/types/components/Notification/Notification.types.d.ts +9 -0
  78. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  79. package/cjs/components/Notification/variations/_layout/base_qkc3i4.css +0 -1
  80. 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 sizes = ['l', 'm', 's', 'xs'];
19
- const views = ['default', 'positive', 'warning', 'negative'];
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
  };