@salutejs/plasma-new-hope 0.324.1-canary.1996.15273628835.0 → 0.324.1-canary.1998.15294767801.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 (89) 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/components/NumberFormat/NumberFormat.js +2 -7
  13. package/cjs/components/NumberFormat/NumberFormat.js.map +1 -1
  14. package/cjs/index.css +12 -12
  15. package/emotion/cjs/components/Notification/Notification.js +5 -1
  16. package/emotion/cjs/components/Notification/Notification.styles.js +43 -36
  17. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +44 -0
  18. package/emotion/cjs/components/Notification/variations/_layout/base.js +1 -1
  19. package/emotion/cjs/components/NumberFormat/NumberFormat.js +2 -7
  20. package/emotion/cjs/components/TextField/TextField.template-doc.mdx +16 -1
  21. package/emotion/cjs/examples/fixtures/Notification.js +1 -1
  22. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  23. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
  24. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  25. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  26. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +23 -22
  27. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  28. package/emotion/es/components/Notification/Notification.js +5 -1
  29. package/emotion/es/components/Notification/Notification.styles.js +43 -36
  30. package/emotion/es/components/Notification/Notification.template-doc.mdx +44 -0
  31. package/emotion/es/components/Notification/variations/_layout/base.js +1 -1
  32. package/emotion/es/components/NumberFormat/NumberFormat.js +2 -7
  33. package/emotion/es/components/TextField/TextField.template-doc.mdx +16 -1
  34. package/emotion/es/examples/fixtures/Notification.js +1 -1
  35. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  36. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
  37. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  38. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  39. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +23 -22
  40. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  41. package/es/components/Notification/Notification.css +12 -12
  42. package/es/components/Notification/Notification.js +5 -1
  43. package/es/components/Notification/Notification.js.map +1 -1
  44. package/es/components/Notification/Notification.styles.js +63 -48
  45. package/es/components/Notification/Notification.styles.js.map +1 -1
  46. package/es/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
  47. package/es/components/Notification/Notification.types.js.map +1 -1
  48. package/es/components/Notification/NotificationsProvider.css +11 -11
  49. package/es/components/Notification/variations/_layout/base.js +1 -1
  50. package/es/components/Notification/variations/_layout/base.js.map +1 -1
  51. package/es/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
  52. package/es/components/NumberFormat/NumberFormat.js +2 -7
  53. package/es/components/NumberFormat/NumberFormat.js.map +1 -1
  54. package/es/index.css +12 -12
  55. package/package.json +4 -4
  56. package/styled-components/cjs/components/Notification/Notification.js +5 -1
  57. package/styled-components/cjs/components/Notification/Notification.styles.js +33 -26
  58. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +44 -0
  59. package/styled-components/cjs/components/Notification/variations/_layout/base.js +1 -1
  60. package/styled-components/cjs/components/NumberFormat/NumberFormat.js +2 -7
  61. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +16 -1
  62. package/styled-components/cjs/examples/fixtures/Notification.js +1 -1
  63. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  64. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
  65. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  66. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  67. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -6
  68. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  69. package/styled-components/es/components/Notification/Notification.js +5 -1
  70. package/styled-components/es/components/Notification/Notification.styles.js +33 -26
  71. package/styled-components/es/components/Notification/Notification.template-doc.mdx +44 -0
  72. package/styled-components/es/components/Notification/variations/_layout/base.js +1 -1
  73. package/styled-components/es/components/NumberFormat/NumberFormat.js +2 -7
  74. package/styled-components/es/components/TextField/TextField.template-doc.mdx +16 -1
  75. package/styled-components/es/examples/fixtures/Notification.js +1 -1
  76. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  77. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
  78. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  79. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  80. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -6
  81. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  82. package/types/components/Notification/Notification.d.ts.map +1 -1
  83. package/types/components/Notification/Notification.styles.d.ts +3 -1
  84. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  85. package/types/components/Notification/Notification.types.d.ts +9 -0
  86. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  87. package/types/components/NumberFormat/NumberFormat.d.ts.map +1 -1
  88. package/cjs/components/Notification/variations/_layout/base_qkc3i4.css +0 -1
  89. 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
  };