@salutejs/plasma-new-hope 0.324.1-canary.1997.15290839769.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 +2 -2
  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,14 +16,14 @@ 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'];
23
24
  const hintTriggers = ['hover', 'click'];
24
- const hintTargetPlacements = ['outer', 'inner'];
25
25
  const labelPlacements = ['outer', 'inner'];
26
+ const hintTargetPlacements = ['outer', 'inner'];
26
27
  const placements: Array<PopoverPlacement> = [
27
28
  'top',
28
29
  'top-start',
@@ -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: {
@@ -322,7 +327,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
322
327
  },
323
328
  parameters: {
324
329
  controls: {
325
- exclude: ['chipType'],
330
+ exclude: ['chipType', 'chipView'],
326
331
  },
327
332
  },
328
333
  render: (args) => <StoryDemo {...args} />,
@@ -1,6 +1,6 @@
1
1
  .IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
2
2
 
3
- .base_qkc3i4_bg3tssa__4791b7ea .base_qkc3i4_notificationWrapper__4791b7ea{width:var(--plasma-notification-width);padding:var(--plasma-notification-padding);}.base_qkc3i4_bg3tssa__4791b7ea .base_qkc3i4_notificationWrapper__4791b7ea.base_qkc3i4_notificationLayoutHorizontal__4791b7ea{padding:var(--plasma-notification-horizontal-layout-padding);}.base_qkc3i4_bg3tssa__4791b7ea .base_qkc3i4_notificationWrapper__4791b7ea.base_qkc3i4_notificationLayoutHorizontal__4791b7ea.base_qkc3i4_notificationWithoutCloseIcon__4791b7ea{padding-right:var(--plasma-notification-horizontal-layout-right-padding-without-close-icon);}.base_qkc3i4_bg3tssa__4791b7ea .base_qkc3i4_notificationWrapper__4791b7ea.base_qkc3i4_notificationLayoutHorizontal__4791b7ea.base_qkc3i4_notificationOneLineTextbox__4791b7ea{padding:var(--plasma-notification-padding-one-line-textbox);}
3
+ .base_1g9g70c_bg3tssa__c76a6dea .base_1g9g70c_notificationWrapper__c76a6dea{padding:var(--plasma-notification-padding);}.base_1g9g70c_bg3tssa__c76a6dea .base_1g9g70c_notificationWrapper__c76a6dea.base_1g9g70c_notificationLayoutHorizontal__c76a6dea{padding:var(--plasma-notification-horizontal-layout-padding);}.base_1g9g70c_bg3tssa__c76a6dea .base_1g9g70c_notificationWrapper__c76a6dea.base_1g9g70c_notificationLayoutHorizontal__c76a6dea.base_1g9g70c_notificationWithoutCloseIcon__c76a6dea{padding-right:var(--plasma-notification-horizontal-layout-right-padding-without-close-icon);}.base_1g9g70c_bg3tssa__c76a6dea .base_1g9g70c_notificationWrapper__c76a6dea.base_1g9g70c_notificationLayoutHorizontal__c76a6dea.base_1g9g70c_notificationOneLineTextbox__c76a6dea{padding:var(--plasma-notification-padding-one-line-textbox);}
4
4
 
5
5
  .base_1insfd_bmb6i7f__cb9a5237 .base_1insfd_notificationContentBox__cb9a5237.base_1insfd_notificationLayoutVertical__cb9a5237{padding:var(--plasma-notification-content-padding-top) var(--plasma-notification-content-padding-right) var(--plasma-notification-content-padding-bottom) var(--plasma-notification-content-padding-left);}.base_1insfd_bmb6i7f__cb9a5237 .base_1insfd_notificationContentBox__cb9a5237.base_1insfd_notificationLayoutVertical__cb9a5237.base_1insfd_notificationWithoutIcon__cb9a5237{padding-top:var(--plasma-notification-content-padding-top-without-icon);}.base_1insfd_bmb6i7f__cb9a5237 .base_1insfd_notificationCloseIcon__cb9a5237.base_1insfd_notificationLayoutVertical__cb9a5237{top:var(--plasma-notification-close-icon-top);right:var(--plasma-notification-close-icon-right);}
6
6
 
@@ -30,14 +30,14 @@
30
30
  .Button_styles_8cvmld_s1rjh7ra__4694a0fa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);margin:var(--s1rjh7ra-0);}
31
31
  .Button_styles_8cvmld_b9ga1dj__4694a0fa{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_8cvmld_b9ga1dj__4694a0fa{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_buttonSquare__4694a0fa{width:var(--plasma-button-height);padding:0;}
32
32
 
33
- .Notification_styles_1yt699o_sb12p__ff5174fd{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
34
- .Notification_styles_1yt699o_crvd7hm__ff5174fd{position:absolute;width:var(--plasma-notification-close-icon-button-size);height:var(--plasma-notification-close-icon-button-size);-webkit-align-self:var(--plasma-notification-horizontal-icon-close-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-icon-close-align);align-self:var(--plasma-notification-horizontal-icon-close-align-self);color:var(--plasma-notification-close-icon-color);}.Notification_styles_1yt699o_crvd7hm__ff5174fd:hover{color:var(--plasma-notification-close-icon-color-on-hover);}.Notification_styles_1yt699o_crvd7hm__ff5174fd.Notification_styles_1yt699o_notificationLayoutHorizontal__ff5174fd{position:relative;}
35
- .Notification_styles_1yt699o_wg1ga5v__ff5174fd{position:relative;box-sizing:border-box;background:var(--wg1ga5v-0);border-radius:var(--plasma-notification-border-radius);border:var(--plasma-notification-border-width) solid var(--plasma-notification-border-color);}.Notification_styles_1yt699o_wg1ga5v__ff5174fd.Notification_styles_1yt699o_notificationLayoutHorizontal__ff5174fd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-notification-horizontal-layout-gap);}
36
- .Notification_styles_1yt699o_b1amsn8a__ff5174fd{margin-top:var(--plasma-notification-buttons-margin-top);margin-left:var(--b1amsn8a-0);-webkit-align-self:var(--plasma-notification-horizontal-actions-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-actions-align);align-self:var(--plasma-notification-horizontal-actions-align-self);}.Notification_styles_1yt699o_b1amsn8a__ff5174fd.Notification_styles_1yt699o_notificationLayoutHorizontal__ff5174fd{margin-top:unset;margin-left:unset;}
37
- .Notification_styles_1yt699o_i14raqr9__ff5174fd{width:var(--plasma-notification-content-left-icon-size);height:var(--plasma-notification-content-left-icon-size);-webkit-align-self:var(--plasma-notification-horizontal-icon-left-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-icon-left-align);align-self:var(--plasma-notification-horizontal-icon-left-align-self);color:var(--i14raqr9-0);margin-right:var(--i14raqr9-1);margin-bottom:var(--i14raqr9-2);}.Notification_styles_1yt699o_i14raqr9__ff5174fd.Notification_styles_1yt699o_notificationLayoutHorizontal__ff5174fd{margin-right:var(--plasma-notification-horizontal-layout-left-icon-margin);margin-bottom:unset;}
38
- .Notification_styles_1yt699o_c157peez__ff5174fd{display:var(--c157peez-0);padding-top:var(--c157peez-1);}.Notification_styles_1yt699o_c157peez__ff5174fd.Notification_styles_1yt699o_notificationLayoutHorizontal__ff5174fd{padding:unset;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
39
- .Notification_styles_1yt699o_t1vmb0f2__ff5174fd{padding:var(--plasma-notification-textbox-padding-top) var(--plasma-notification-textbox-padding-right) var(--plasma-notification-textbox-padding-bottom) var(--plasma-notification-textbox-padding-left);padding-top:var(--t1vmb0f2-0);padding-right:var(--t1vmb0f2-1);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:var(--plasma-notification-textbox-gap);word-break:break-word;}.Notification_styles_1yt699o_t1vmb0f2__ff5174fd.Notification_styles_1yt699o_notificationLayoutHorizontal__ff5174fd{padding:unset;}
40
- .Notification_styles_1yt699o_s1k4e58v__ff5174fd{font-family:var(--plasma-notification-title-font-family);font-size:var(--plasma-notification-title-font-size);font-style:var(--plasma-notification-title-font-style);font-weight:var(--plasma-notification-title-font-weight);-webkit-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-title-font-letter-spacing);letter-spacing:var(--plasma-notification-title-font-letter-spacing);line-height:var(--plasma-notification-title-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--s1k4e58v-0);}
41
- .Notification_styles_1yt699o_s92kmpm__ff5174fd{font-family:var(--plasma-notification-content-font-family);font-size:var(--plasma-notification-content-font-size);font-style:var(--plasma-notification-content-font-style);font-weight:var(--plasma-notification-content-font-weight);-webkit-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-content-font-letter-spacing);letter-spacing:var(--plasma-notification-content-font-letter-spacing);line-height:var(--plasma-notification-content-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--s92kmpm-0);}
42
- .Notification_styles_1yt699o_s18m0x6v__ff5174fd{margin-top:1rem;opacity:1;}.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_notificationItemOpened__ff5174fd{-webkit-animation:0.4s Notification_styles_1yt699o_showAnimationS18m0x6v__ff5174fd ease-out;animation:0.4s Notification_styles_1yt699o_showAnimationS18m0x6v__ff5174fd ease-out;}.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_notificationItemOpened__ff5174fd.Notification_styles_1yt699o_notificationLeftToRightAnimation__ff5174fd{-webkit-animation:0.4s Notification_styles_1yt699o_showLeftToRightAnimationS18m0x6v__ff5174fd ease-out;animation:0.4s Notification_styles_1yt699o_showLeftToRightAnimationS18m0x6v__ff5174fd ease-out;}.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_notificationItemOpened__ff5174fd.Notification_styles_1yt699o_notificationTopToCenterAnimation__ff5174fd{-webkit-animation:0.4s Notification_styles_1yt699o_showTopToCenterAnimationS18m0x6v__ff5174fd ease-out;animation:0.4s Notification_styles_1yt699o_showTopToCenterAnimationS18m0x6v__ff5174fd ease-out;}.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_notificationItemOpened__ff5174fd.Notification_styles_1yt699o_notificationBottomToCenterAnimation__ff5174fd{-webkit-animation:0.4s Notification_styles_1yt699o_showBottomToCenterAnimationS18m0x6v__ff5174fd ease-out;animation:0.4s Notification_styles_1yt699o_showBottomToCenterAnimationS18m0x6v__ff5174fd ease-out;}.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_notificationItemHidden__ff5174fd{-webkit-animation:0.4s Notification_styles_1yt699o_hideAnimationS18m0x6v__ff5174fd ease-out;animation:0.4s Notification_styles_1yt699o_hideAnimationS18m0x6v__ff5174fd ease-out;}.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_s18m0x6v__ff5174fd.Notification_styles_1yt699o_notificationItemHidden__ff5174fd.Notification_styles_1yt699o_notificationLeftToRightAnimation__ff5174fd{-webkit-animation:0.4s Notification_styles_1yt699o_hideLeftToRightAnimationS18m0x6v__ff5174fd ease-out;animation:0.4s Notification_styles_1yt699o_hideLeftToRightAnimationS18m0x6v__ff5174fd ease-out;}@-webkit-keyframes Notification_styles_1yt699o_showTopToCenterAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@keyframes Notification_styles_1yt699o_showTopToCenterAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@-webkit-keyframes Notification_styles_1yt699o_showBottomToCenterAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@keyframes Notification_styles_1yt699o_showBottomToCenterAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@-webkit-keyframes Notification_styles_1yt699o_showLeftToRightAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_1yt699o_showLeftToRightAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_1yt699o_hideLeftToRightAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@keyframes Notification_styles_1yt699o_hideLeftToRightAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@-webkit-keyframes Notification_styles_1yt699o_showAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_1yt699o_showAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_1yt699o_hideAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}@keyframes Notification_styles_1yt699o_hideAnimationS18m0x6v__ff5174fd{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}
43
- .Notification_styles_1yt699o_sfe5ql2__ff5174fd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;-webkit-align-items:var(--sfe5ql2-0);-webkit-box-align:var(--sfe5ql2-0);-ms-flex-align:var(--sfe5ql2-0);align-items:var(--sfe5ql2-0);}
33
+ .Notification_styles_1uyb7ob_sb12p__65d2ebe5{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
34
+ .Notification_styles_1uyb7ob_crvd7hm__65d2ebe5{position:absolute;width:var(--plasma-notification-close-icon-button-size);height:var(--plasma-notification-close-icon-button-size);-webkit-align-self:var(--plasma-notification-horizontal-icon-close-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-icon-close-align);align-self:var(--plasma-notification-horizontal-icon-close-align-self);color:var(--plasma-notification-close-icon-color);}.Notification_styles_1uyb7ob_crvd7hm__65d2ebe5:hover{color:var(--plasma-notification-close-icon-color-on-hover);}.Notification_styles_1uyb7ob_crvd7hm__65d2ebe5.Notification_styles_1uyb7ob_notificationLayoutHorizontal__65d2ebe5{position:relative;}
35
+ .Notification_styles_1uyb7ob_wg1ga5v__65d2ebe5{position:relative;width:var(--wg1ga5v-0);max-width:var(--wg1ga5v-1);border-radius:var(--plasma-notification-border-radius);border:var(--plasma-notification-border-width) solid var(--plasma-notification-border-color);background:var(--wg1ga5v-2);box-sizing:border-box;}.Notification_styles_1uyb7ob_wg1ga5v__65d2ebe5.Notification_styles_1uyb7ob_notificationLayoutHorizontal__65d2ebe5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-notification-horizontal-layout-gap);}
36
+ .Notification_styles_1uyb7ob_b1amsn8a__65d2ebe5{margin-top:var(--plasma-notification-buttons-margin-top);margin-left:var(--b1amsn8a-0);-webkit-align-self:var(--plasma-notification-horizontal-actions-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-actions-align);align-self:var(--plasma-notification-horizontal-actions-align-self);}.Notification_styles_1uyb7ob_b1amsn8a__65d2ebe5.Notification_styles_1uyb7ob_notificationLayoutHorizontal__65d2ebe5{margin-top:unset;margin-left:unset;}
37
+ .Notification_styles_1uyb7ob_i14raqr9__65d2ebe5{width:var(--plasma-notification-content-left-icon-size);height:var(--plasma-notification-content-left-icon-size);-webkit-align-self:var(--plasma-notification-horizontal-icon-left-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-icon-left-align);align-self:var(--plasma-notification-horizontal-icon-left-align-self);color:var(--i14raqr9-0);margin-right:var(--i14raqr9-1);margin-bottom:var(--i14raqr9-2);}.Notification_styles_1uyb7ob_i14raqr9__65d2ebe5.Notification_styles_1uyb7ob_notificationLayoutHorizontal__65d2ebe5{margin-right:var(--plasma-notification-horizontal-layout-left-icon-margin);margin-bottom:unset;}
38
+ .Notification_styles_1uyb7ob_c157peez__65d2ebe5{display:var(--c157peez-0);padding-top:var(--c157peez-1);}.Notification_styles_1uyb7ob_c157peez__65d2ebe5.Notification_styles_1uyb7ob_notificationLayoutHorizontal__65d2ebe5{padding:unset;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
39
+ .Notification_styles_1uyb7ob_t1vmb0f2__65d2ebe5{padding:var(--plasma-notification-textbox-padding-top) var(--plasma-notification-textbox-padding-right) var(--plasma-notification-textbox-padding-bottom) var(--plasma-notification-textbox-padding-left);padding-top:var(--t1vmb0f2-0);padding-right:var(--t1vmb0f2-1);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:var(--plasma-notification-textbox-gap);word-break:break-word;}.Notification_styles_1uyb7ob_t1vmb0f2__65d2ebe5.Notification_styles_1uyb7ob_notificationLayoutHorizontal__65d2ebe5{padding:unset;}
40
+ .Notification_styles_1uyb7ob_s1k4e58v__65d2ebe5{font-family:var(--plasma-notification-title-font-family);font-size:var(--plasma-notification-title-font-size);font-style:var(--plasma-notification-title-font-style);font-weight:var(--plasma-notification-title-font-weight);-webkit-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-title-font-letter-spacing);letter-spacing:var(--plasma-notification-title-font-letter-spacing);line-height:var(--plasma-notification-title-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--s1k4e58v-0);}
41
+ .Notification_styles_1uyb7ob_s92kmpm__65d2ebe5{font-family:var(--plasma-notification-content-font-family);font-size:var(--plasma-notification-content-font-size);font-style:var(--plasma-notification-content-font-style);font-weight:var(--plasma-notification-content-font-weight);-webkit-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-content-font-letter-spacing);letter-spacing:var(--plasma-notification-content-font-letter-spacing);line-height:var(--plasma-notification-content-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--s92kmpm-0);}
42
+ .Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5{margin-top:1rem;opacity:1;}.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_notificationItemOpened__65d2ebe5{-webkit-animation:0.4s Notification_styles_1uyb7ob_showAnimationS18m0x6v__65d2ebe5 ease-out;animation:0.4s Notification_styles_1uyb7ob_showAnimationS18m0x6v__65d2ebe5 ease-out;}.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_notificationItemOpened__65d2ebe5.Notification_styles_1uyb7ob_notificationLeftToRightAnimation__65d2ebe5{-webkit-animation:0.4s Notification_styles_1uyb7ob_showLeftToRightAnimationS18m0x6v__65d2ebe5 ease-out;animation:0.4s Notification_styles_1uyb7ob_showLeftToRightAnimationS18m0x6v__65d2ebe5 ease-out;}.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_notificationItemOpened__65d2ebe5.Notification_styles_1uyb7ob_notificationTopToCenterAnimation__65d2ebe5{-webkit-animation:0.4s Notification_styles_1uyb7ob_showTopToCenterAnimationS18m0x6v__65d2ebe5 ease-out;animation:0.4s Notification_styles_1uyb7ob_showTopToCenterAnimationS18m0x6v__65d2ebe5 ease-out;}.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_notificationItemOpened__65d2ebe5.Notification_styles_1uyb7ob_notificationBottomToCenterAnimation__65d2ebe5{-webkit-animation:0.4s Notification_styles_1uyb7ob_showBottomToCenterAnimationS18m0x6v__65d2ebe5 ease-out;animation:0.4s Notification_styles_1uyb7ob_showBottomToCenterAnimationS18m0x6v__65d2ebe5 ease-out;}.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_notificationItemHidden__65d2ebe5{-webkit-animation:0.4s Notification_styles_1uyb7ob_hideAnimationS18m0x6v__65d2ebe5 ease-out;animation:0.4s Notification_styles_1uyb7ob_hideAnimationS18m0x6v__65d2ebe5 ease-out;}.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_s18m0x6v__65d2ebe5.Notification_styles_1uyb7ob_notificationItemHidden__65d2ebe5.Notification_styles_1uyb7ob_notificationLeftToRightAnimation__65d2ebe5{-webkit-animation:0.4s Notification_styles_1uyb7ob_hideLeftToRightAnimationS18m0x6v__65d2ebe5 ease-out;animation:0.4s Notification_styles_1uyb7ob_hideLeftToRightAnimationS18m0x6v__65d2ebe5 ease-out;}@-webkit-keyframes Notification_styles_1uyb7ob_showTopToCenterAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@keyframes Notification_styles_1uyb7ob_showTopToCenterAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@-webkit-keyframes Notification_styles_1uyb7ob_showBottomToCenterAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@keyframes Notification_styles_1uyb7ob_showBottomToCenterAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);opacity:0;}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}}@-webkit-keyframes Notification_styles_1uyb7ob_showLeftToRightAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_1uyb7ob_showLeftToRightAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_1uyb7ob_hideLeftToRightAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@keyframes Notification_styles_1uyb7ob_hideLeftToRightAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@-webkit-keyframes Notification_styles_1uyb7ob_showAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_1uyb7ob_showAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_1uyb7ob_hideAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}@keyframes Notification_styles_1uyb7ob_hideAnimationS18m0x6v__65d2ebe5{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}
43
+ .Notification_styles_1uyb7ob_sfe5ql2__65d2ebe5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;-webkit-align-items:var(--sfe5ql2-0);-webkit-box-align:var(--sfe5ql2-0);-ms-flex-align:var(--sfe5ql2-0);align-items:var(--sfe5ql2-0);}
@@ -12,7 +12,7 @@ import { layouts } from './Notification.types.js';
12
12
  import { Wrapper, ContentBox, IconWrapper, TextBox, StyledTitle, StyledContent, ButtonsWrapper, CloseIconWrapper, StyledNotification } from './Notification.styles.js';
13
13
  import { getLayoutClass } from './utils/index.js';
14
14
 
15
- var _excluded = ["role", "title", "children", "actions", "view", "size", "iconPlacement", "showCloseIcon", "layout", "icon", "closeIconType", "textColor", "titleColor", "backgroundColor", "onCloseButtonClick"];
15
+ var _excluded = ["role", "title", "children", "actions", "view", "size", "iconPlacement", "showCloseIcon", "layout", "icon", "closeIconType", "textColor", "titleColor", "backgroundColor", "width", "maxWidth", "onCloseButtonClick"];
16
16
 
17
17
  /**
18
18
  * Компонент для небольших уведомлений пользователя
@@ -36,6 +36,8 @@ var notificationRoot = function notificationRoot(Root) {
36
36
  textColor = props.textColor,
37
37
  titleColor = props.titleColor,
38
38
  backgroundColor = props.backgroundColor,
39
+ width = props.width,
40
+ maxWidth = props.maxWidth,
39
41
  onCloseButtonClick = props.onCloseButtonClick,
40
42
  rest = _objectWithoutProperties(props, _excluded);
41
43
  var ariaLive = 'polite';
@@ -63,6 +65,8 @@ var notificationRoot = function notificationRoot(Root) {
63
65
  "aria-atomic": ariaAtomic
64
66
  }, rest), /*#__PURE__*/React.createElement(Wrapper, {
65
67
  backgroundColor: backgroundColor,
68
+ width: width,
69
+ maxWidth: maxWidth,
66
70
  className: cx(classes.wrapper, getLayoutClass(layout), oneLineClass, withoutCloseIconClass)
67
71
  }, /*#__PURE__*/React.createElement(ContentBox, {
68
72
  iconPlacement: IconPlacementInternal,
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCross } from '../_Icon/Icons/IconCross';\nimport { IconCrossThin } from '../_Icon/Icons/IconCrossThin';\n\nimport { classes, tokens } from './Notification.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as layoutCSS } from './variations/_layout/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as closeIconTypeCSS } from './variations/_closeIconType/base';\nimport { NotificationLayout, NotificationProps, layouts } from './Notification.types';\nimport {\n ButtonsWrapper,\n CloseIconWrapper,\n ContentBox,\n IconWrapper,\n StyledContent,\n StyledNotification,\n StyledTitle,\n TextBox,\n Wrapper,\n} from './Notification.styles';\nimport { getLayoutClass } from './utils';\n\n/**\n * Компонент для небольших уведомлений пользователя\n */\nexport const notificationRoot = (Root: RootProps<HTMLDivElement, Omit<NotificationProps, 'title'>>) =>\n forwardRef<HTMLDivElement, NotificationProps>((props, ref) => {\n const {\n role = 'status',\n title,\n children: content,\n actions,\n view,\n size,\n iconPlacement,\n showCloseIcon = true,\n layout = layouts.vertical as NotificationLayout,\n icon,\n closeIconType,\n textColor,\n titleColor,\n backgroundColor,\n onCloseButtonClick,\n ...rest\n } = props;\n\n let ariaLive: 'assertive' | 'polite' = 'polite';\n let ariaAtomic = false;\n\n if (role === 'alert') {\n ariaLive = 'assertive';\n } else if (role === 'status') {\n ariaAtomic = true;\n }\n\n const isOneLine = !content || !title;\n const oneLineClass = isOneLine ? classes.oneLine : undefined;\n const withoutIconClass = icon ? undefined : classes.withoutIcon;\n const withoutCloseIconClass = showCloseIcon ? undefined : classes.withoutCloseIcon;\n\n const IconPlacementInternal = useMemo(() => (icon ? iconPlacement : undefined), [icon, iconPlacement]);\n\n return (\n <Root\n view={view}\n size={size}\n layout={layout}\n closeIconType={closeIconType}\n ref={ref}\n role={role}\n aria-live={ariaLive}\n aria-atomic={ariaAtomic}\n {...rest}\n >\n <Wrapper\n backgroundColor={backgroundColor}\n className={cx(classes.wrapper, getLayoutClass(layout), oneLineClass, withoutCloseIconClass)}\n >\n <ContentBox\n iconPlacement={IconPlacementInternal}\n className={cx(classes.contentBox, getLayoutClass(layout), withoutIconClass)}\n >\n {icon && (\n <IconWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.icon, getLayoutClass(layout))}\n >\n {icon}\n </IconWrapper>\n )}\n <TextBox\n iconPlacement={IconPlacementInternal}\n showCloseIcon={showCloseIcon}\n className={cx(classes.textbox, getLayoutClass(layout))}\n >\n {title && (\n <StyledTitle className={classes.title} textColor={titleColor}>\n {title}\n </StyledTitle>\n )}\n {content && (\n <StyledContent className={classes.text} textColor={textColor}>\n {content}\n </StyledContent>\n )}\n </TextBox>\n </ContentBox>\n {actions && (\n <ButtonsWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.buttonsWrapper, getLayoutClass(layout))}\n >\n {actions}\n </ButtonsWrapper>\n )}\n\n {showCloseIcon && (\n <CloseIconWrapper\n view=\"clear\"\n size=\"s\"\n onClick={onCloseButtonClick}\n className={cx(classes.closeIcon, getLayoutClass(layout))}\n >\n {closeIconType === 'default' ? (\n <IconCross size=\"s\" sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n ) : (\n <IconCrossThin size=\"s\" sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n )}\n </CloseIconWrapper>\n )}\n </Wrapper>\n </Root>\n );\n });\n\nexport const notificationConfig = {\n name: 'Notification',\n tag: 'div',\n layout: notificationRoot,\n base: StyledNotification,\n variations: {\n layout: {\n css: layoutCSS,\n },\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n closeIconType: {\n css: closeIconTypeCSS,\n },\n },\n defaults: {\n view: 'default',\n layout: layouts.vertical,\n size: 'xs',\n closeIconType: 'default',\n },\n};\n"],"names":["notificationRoot","Root","forwardRef","props","ref","_props$role","role","title","content","children","actions","view","size","iconPlacement","_props$showCloseIcon","showCloseIcon","_props$layout","layout","layouts","vertical","icon","closeIconType","textColor","titleColor","backgroundColor","onCloseButtonClick","rest","_objectWithoutProperties","_excluded","ariaLive","ariaAtomic","isOneLine","oneLineClass","classes","oneLine","undefined","withoutIconClass","withoutIcon","withoutCloseIconClass","withoutCloseIcon","IconPlacementInternal","useMemo","React","createElement","_extends","Wrapper","className","cx","wrapper","getLayoutClass","ContentBox","contentBox","IconWrapper","TextBox","textbox","StyledTitle","StyledContent","text","ButtonsWrapper","buttonsWrapper","CloseIconWrapper","onClick","closeIcon","IconCross","sizeCustomProperty","tokens","closeIconSize","color","IconCrossThin","notificationConfig","name","tag","base","StyledNotification","variations","css","layoutCSS","viewCSS","sizeCSS","closeIconTypeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;AA0BA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAiE,EAAA;AAAA,EAAA,oBAC9FC,UAAU,CAAoC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC1D,IAAA,I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M,CAAC,CAAA;KAEtDI,EAAAA,aAAa,KAAK,SAAS,gBACxBqB,KAAA,CAAAC,aAAA,CAACoB,SAAS,EAAA;AAACnD,MAAAA,IAAI,EAAC,GAAG;MAACoD,kBAAkB,EAAEC,MAAM,CAACC,aAAc;AAACC,MAAAA,KAAK,EAAC,SAAA;AAAS,KAAE,CAAC,gBAEhFzB,KAAA,CAAAC,aAAA,CAACyB,aAAa,EAAA;AAACxD,MAAAA,IAAI,EAAC,GAAG;MAACoD,kBAAkB,EAAEC,MAAM,CAACC,aAAc;AAACC,MAAAA,KAAK,EAAC,SAAA;KAAW,CAEzE,CAEjB,CACP,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAME,kBAAkB,GAAG;AAC9BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACVtD,EAAAA,MAAM,EAAEjB,gBAAgB;AACxBwE,EAAAA,IAAI,EAAEC,kBAAkB;AACxBC,EAAAA,UAAU,EAAE;AACRzD,IAAAA,MAAM,EAAE;AACJ0D,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACDjE,IAAAA,IAAI,EAAE;AACFgE,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDjE,IAAAA,IAAI,EAAE;AACF+D,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDzD,IAAAA,aAAa,EAAE;AACXsD,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrE,IAAAA,IAAI,EAAE,SAAS;IACfM,MAAM,EAAEC,OAAO,CAACC,QAAQ;AACxBP,IAAAA,IAAI,EAAE,IAAI;AACVS,IAAAA,aAAa,EAAE,SAAA;AACnB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCross } from '../_Icon/Icons/IconCross';\nimport { IconCrossThin } from '../_Icon/Icons/IconCrossThin';\n\nimport { classes, tokens } from './Notification.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as layoutCSS } from './variations/_layout/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as closeIconTypeCSS } from './variations/_closeIconType/base';\nimport { NotificationLayout, NotificationProps, layouts } from './Notification.types';\nimport {\n ButtonsWrapper,\n CloseIconWrapper,\n ContentBox,\n IconWrapper,\n StyledContent,\n StyledNotification,\n StyledTitle,\n TextBox,\n Wrapper,\n} from './Notification.styles';\nimport { getLayoutClass } from './utils';\n\n/**\n * Компонент для небольших уведомлений пользователя\n */\nexport const notificationRoot = (Root: RootProps<HTMLDivElement, Omit<NotificationProps, 'title'>>) =>\n forwardRef<HTMLDivElement, NotificationProps>((props, ref) => {\n const {\n role = 'status',\n title,\n children: content,\n actions,\n view,\n size,\n iconPlacement,\n showCloseIcon = true,\n layout = layouts.vertical as NotificationLayout,\n icon,\n closeIconType,\n textColor,\n titleColor,\n backgroundColor,\n width,\n maxWidth,\n onCloseButtonClick,\n ...rest\n } = props;\n\n let ariaLive: 'assertive' | 'polite' = 'polite';\n let ariaAtomic = false;\n\n if (role === 'alert') {\n ariaLive = 'assertive';\n } else if (role === 'status') {\n ariaAtomic = true;\n }\n\n const isOneLine = !content || !title;\n const oneLineClass = isOneLine ? classes.oneLine : undefined;\n const withoutIconClass = icon ? undefined : classes.withoutIcon;\n const withoutCloseIconClass = showCloseIcon ? undefined : classes.withoutCloseIcon;\n\n const IconPlacementInternal = useMemo(() => (icon ? iconPlacement : undefined), [icon, iconPlacement]);\n\n return (\n <Root\n view={view}\n size={size}\n layout={layout}\n closeIconType={closeIconType}\n ref={ref}\n role={role}\n aria-live={ariaLive}\n aria-atomic={ariaAtomic}\n {...rest}\n >\n <Wrapper\n backgroundColor={backgroundColor}\n width={width}\n maxWidth={maxWidth}\n className={cx(classes.wrapper, getLayoutClass(layout), oneLineClass, withoutCloseIconClass)}\n >\n <ContentBox\n iconPlacement={IconPlacementInternal}\n className={cx(classes.contentBox, getLayoutClass(layout), withoutIconClass)}\n >\n {icon && (\n <IconWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.icon, getLayoutClass(layout))}\n >\n {icon}\n </IconWrapper>\n )}\n <TextBox\n iconPlacement={IconPlacementInternal}\n showCloseIcon={showCloseIcon}\n className={cx(classes.textbox, getLayoutClass(layout))}\n >\n {title && (\n <StyledTitle className={classes.title} textColor={titleColor}>\n {title}\n </StyledTitle>\n )}\n {content && (\n <StyledContent className={classes.text} textColor={textColor}>\n {content}\n </StyledContent>\n )}\n </TextBox>\n </ContentBox>\n {actions && (\n <ButtonsWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.buttonsWrapper, getLayoutClass(layout))}\n >\n {actions}\n </ButtonsWrapper>\n )}\n\n {showCloseIcon && (\n <CloseIconWrapper\n view=\"clear\"\n size=\"s\"\n onClick={onCloseButtonClick}\n className={cx(classes.closeIcon, getLayoutClass(layout))}\n >\n {closeIconType === 'default' ? (\n <IconCross size=\"s\" sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n ) : (\n <IconCrossThin size=\"s\" sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n )}\n </CloseIconWrapper>\n )}\n </Wrapper>\n </Root>\n );\n });\n\nexport const notificationConfig = {\n name: 'Notification',\n tag: 'div',\n layout: notificationRoot,\n base: StyledNotification,\n variations: {\n layout: {\n css: layoutCSS,\n },\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n closeIconType: {\n css: closeIconTypeCSS,\n },\n },\n defaults: {\n view: 'default',\n layout: layouts.vertical,\n size: 'xs',\n closeIconType: 'default',\n },\n};\n"],"names":["notificationRoot","Root","forwardRef","props","ref","_props$role","role","title","content","children","actions","view","size","iconPlacement","_props$showCloseIcon","showCloseIcon","_props$layout","layout","layouts","vertical","icon","closeIconType","textColor","titleColor","backgroundColor","width","maxWidth","onCloseButtonClick","rest","_objectWithoutProperties","_excluded","ariaLive","ariaAtomic","isOneLine","oneLineClass","classes","oneLine","undefined","withoutIconClass","withoutIcon","withoutCloseIconClass","withoutCloseIcon","IconPlacementInternal","useMemo","React","createElement","_extends","Wrapper","className","cx","wrapper","getLayoutClass","ContentBox","contentBox","IconWrapper","TextBox","textbox","StyledTitle","StyledContent","text","ButtonsWrapper","buttonsWrapper","CloseIconWrapper","onClick","closeIcon","IconCross","sizeCustomProperty","tokens","closeIconSize","color","IconCrossThin","notificationConfig","name","tag","base","StyledNotification","variations","css","layoutCSS","viewCSS","sizeCSS","closeIconTypeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;AA0BA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAiE,EAAA;AAAA,EAAA,oBAC9FC,UAAU,CAAoC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC1D,IAAA,IAAAC,WAAA,GAmBIF,KAAK,CAlBLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,WAAA;MACfE,KAAK,GAiBLJ,KAAK,CAjBLI,KAAK;MACKC,OAAO,GAgBjBL,KAAK,CAhBLM,QAAQ;MACRC,OAAO,GAePP,KAAK,CAfLO,OAAO;MACPC,IAAI,GAcJR,KAAK,CAdLQ,IAAI;MACJC,IAAI,GAaJT,KAAK,CAbLS,IAAI;MACJC,aAAa,GAYbV,KAAK,CAZLU,aAAa;MAAAC,oBAAA,GAYbX,KAAK,CAXLY,aAAa;AAAbA,MAAAA,aAAa,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;MAAAE,aAAA,GAWpBb,KAAK,CAVLc,MAAM;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAA,KAAA,CAAA,GAAGE,OAAO,CAACC,QAAQ,GAAAH,aAAA;MACzBI,IAAI,GASJjB,KAAK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9BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACVxD,EAAAA,MAAM,EAAEjB,gBAAgB;AACxB0E,EAAAA,IAAI,EAAEC,kBAAkB;AACxBC,EAAAA,UAAU,EAAE;AACR3D,IAAAA,MAAM,EAAE;AACJ4D,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACDnE,IAAAA,IAAI,EAAE;AACFkE,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDnE,IAAAA,IAAI,EAAE;AACFiE,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACD3D,IAAAA,aAAa,EAAE;AACXwD,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNvE,IAAAA,IAAI,EAAE,SAAS;IACfM,MAAM,EAAEC,OAAO,CAACC,QAAQ;AACxBP,IAAAA,IAAI,EAAE,IAAI;AACVS,IAAAA,aAAa,EAAE,SAAA;AACnB,GAAA;AACJ;;;;"}
@@ -1,4 +1,4 @@
1
- import './Notification.styles_1yt699o.css';
1
+ import './Notification.styles_1uyb7ob.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import { tokens } from './Notification.tokens.js';
4
4
  import { placements } from './Notification.types.js';
@@ -18,7 +18,20 @@ var CloseIconWrapper = /*#__PURE__*/styled(_exp())({
18
18
  });
19
19
  var _exp8 = function _exp8() {
20
20
  return function (_ref) {
21
- var backgroundColor = _ref.backgroundColor;
21
+ var _ref$width = _ref.width,
22
+ width = _ref$width === void 0 ? "var(".concat(tokens.width, ")") : _ref$width;
23
+ return width;
24
+ };
25
+ };
26
+ var _exp9 = function _exp9() {
27
+ return function (_ref2) {
28
+ var maxWidth = _ref2.maxWidth;
29
+ return maxWidth || 'unset';
30
+ };
31
+ };
32
+ var _exp13 = function _exp13() {
33
+ return function (_ref3) {
34
+ var backgroundColor = _ref3.backgroundColor;
22
35
  return backgroundColor || "var(".concat(tokens.background, ")");
23
36
  };
24
37
  };
@@ -27,12 +40,14 @@ var Wrapper = /*#__PURE__*/styled('div')({
27
40
  "class": "wg1ga5v",
28
41
  propsAsIs: false,
29
42
  vars: {
30
- "wg1ga5v-0": [/*#__PURE__*/_exp8()]
43
+ "wg1ga5v-0": [/*#__PURE__*/_exp8()],
44
+ "wg1ga5v-1": [/*#__PURE__*/_exp9()],
45
+ "wg1ga5v-2": [/*#__PURE__*/_exp13()]
31
46
  }
32
47
  });
33
- var _exp15 = function _exp15() {
34
- return function (_ref2) {
35
- var iconPlacement = _ref2.iconPlacement;
48
+ var _exp17 = function _exp17() {
49
+ return function (_ref4) {
50
+ var iconPlacement = _ref4.iconPlacement;
36
51
  return iconPlacement === placements.left ? "var(".concat(tokens.buttonsMarginLeft, ")") : 'unset';
37
52
  };
38
53
  };
@@ -41,24 +56,24 @@ var ButtonsWrapper = /*#__PURE__*/styled('div')({
41
56
  "class": "b1amsn8a",
42
57
  propsAsIs: false,
43
58
  vars: {
44
- "b1amsn8a-0": [/*#__PURE__*/_exp15()]
59
+ "b1amsn8a-0": [/*#__PURE__*/_exp17()]
45
60
  }
46
61
  });
47
- var _exp21 = function _exp21() {
48
- return function (_ref3) {
49
- var iconColor = _ref3.iconColor;
62
+ var _exp23 = function _exp23() {
63
+ return function (_ref5) {
64
+ var iconColor = _ref5.iconColor;
50
65
  return iconColor || "var(".concat(tokens.contentLeftIconColor, ")");
51
66
  };
52
67
  };
53
- var _exp22 = function _exp22() {
54
- return function (_ref4) {
55
- var iconPlacement = _ref4.iconPlacement;
68
+ var _exp24 = function _exp24() {
69
+ return function (_ref6) {
70
+ var iconPlacement = _ref6.iconPlacement;
56
71
  return iconPlacement === placements.left ? "var(".concat(tokens.contentLeftIconMargin, ")") : 'unset';
57
72
  };
58
73
  };
59
- var _exp23 = function _exp23() {
60
- return function (_ref5) {
61
- var iconPlacement = _ref5.iconPlacement;
74
+ var _exp25 = function _exp25() {
75
+ return function (_ref7) {
76
+ var iconPlacement = _ref7.iconPlacement;
62
77
  return iconPlacement === placements.top ? "var(".concat(tokens.contentTopIconMargin, ")") : 'unset';
63
78
  };
64
79
  };
@@ -67,20 +82,20 @@ var IconWrapper = /*#__PURE__*/styled('div')({
67
82
  "class": "i14raqr9",
68
83
  propsAsIs: false,
69
84
  vars: {
70
- "i14raqr9-0": [/*#__PURE__*/_exp21()],
71
- "i14raqr9-1": [/*#__PURE__*/_exp22()],
72
- "i14raqr9-2": [/*#__PURE__*/_exp23()]
85
+ "i14raqr9-0": [/*#__PURE__*/_exp23()],
86
+ "i14raqr9-1": [/*#__PURE__*/_exp24()],
87
+ "i14raqr9-2": [/*#__PURE__*/_exp25()]
73
88
  }
74
89
  });
75
- var _exp26 = function _exp26() {
76
- return function (_ref6) {
77
- var iconPlacement = _ref6.iconPlacement;
90
+ var _exp28 = function _exp28() {
91
+ return function (_ref8) {
92
+ var iconPlacement = _ref8.iconPlacement;
78
93
  return iconPlacement === placements.left ? 'flex' : 'block';
79
94
  };
80
95
  };
81
- var _exp27 = function _exp27() {
82
- return function (_ref7) {
83
- var iconPlacement = _ref7.iconPlacement;
96
+ var _exp29 = function _exp29() {
97
+ return function (_ref9) {
98
+ var iconPlacement = _ref9.iconPlacement;
84
99
  return iconPlacement ? "var(".concat(tokens.contentPaddingTop, ")") : "var(".concat(tokens.contentPaddingTopWithoutIcon, ")");
85
100
  };
86
101
  };
@@ -89,20 +104,20 @@ var ContentBox = /*#__PURE__*/styled('div')({
89
104
  "class": "c157peez",
90
105
  propsAsIs: false,
91
106
  vars: {
92
- "c157peez-0": [/*#__PURE__*/_exp26()],
93
- "c157peez-1": [/*#__PURE__*/_exp27()]
107
+ "c157peez-0": [/*#__PURE__*/_exp28()],
108
+ "c157peez-1": [/*#__PURE__*/_exp29()]
94
109
  }
95
110
  });
96
- var _exp33 = function _exp33() {
97
- return function (_ref8) {
98
- var iconPlacement = _ref8.iconPlacement;
111
+ var _exp35 = function _exp35() {
112
+ return function (_ref10) {
113
+ var iconPlacement = _ref10.iconPlacement;
99
114
  return !iconPlacement || iconPlacement === placements.top ? "var(".concat(tokens.textboxPaddingTopWithTopIcon, ")") : "var(".concat(tokens.textboxPaddingTop, ")");
100
115
  };
101
116
  };
102
- var _exp34 = function _exp34() {
103
- return function (_ref9) {
104
- var showCloseIcon = _ref9.showCloseIcon,
105
- iconPlacement = _ref9.iconPlacement;
117
+ var _exp36 = function _exp36() {
118
+ return function (_ref11) {
119
+ var showCloseIcon = _ref11.showCloseIcon,
120
+ iconPlacement = _ref11.iconPlacement;
106
121
  return showCloseIcon && iconPlacement !== placements.top ? "var(".concat(tokens.textboxPaddingRightWithCloseIcon, ")") : "var(".concat(tokens.textboxPaddingRight, ")");
107
122
  };
108
123
  };
@@ -111,13 +126,13 @@ var TextBox = /*#__PURE__*/styled('div')({
111
126
  "class": "t1vmb0f2",
112
127
  propsAsIs: false,
113
128
  vars: {
114
- "t1vmb0f2-0": [/*#__PURE__*/_exp33()],
115
- "t1vmb0f2-1": [/*#__PURE__*/_exp34()]
129
+ "t1vmb0f2-0": [/*#__PURE__*/_exp35()],
130
+ "t1vmb0f2-1": [/*#__PURE__*/_exp36()]
116
131
  }
117
132
  });
118
- var _exp44 = function _exp44() {
119
- return function (_ref10) {
120
- var textColor = _ref10.textColor;
133
+ var _exp46 = function _exp46() {
134
+ return function (_ref12) {
135
+ var textColor = _ref12.textColor;
121
136
  return textColor || "var(".concat(tokens.titleColor, ")");
122
137
  };
123
138
  };
@@ -126,12 +141,12 @@ var StyledTitle = /*#__PURE__*/styled('div')({
126
141
  "class": "s1k4e58v",
127
142
  propsAsIs: false,
128
143
  vars: {
129
- "s1k4e58v-0": [/*#__PURE__*/_exp44()]
144
+ "s1k4e58v-0": [/*#__PURE__*/_exp46()]
130
145
  }
131
146
  });
132
- var _exp52 = function _exp52() {
133
- return function (_ref11) {
134
- var textColor = _ref11.textColor;
147
+ var _exp54 = function _exp54() {
148
+ return function (_ref13) {
149
+ var textColor = _ref13.textColor;
135
150
  return textColor || "var(".concat(tokens.contentColor, ")");
136
151
  };
137
152
  };
@@ -140,7 +155,7 @@ var StyledContent = /*#__PURE__*/styled('div')({
140
155
  "class": "s92kmpm",
141
156
  propsAsIs: false,
142
157
  vars: {
143
- "s92kmpm-0": [/*#__PURE__*/_exp52()]
158
+ "s92kmpm-0": [/*#__PURE__*/_exp54()]
144
159
  }
145
160
  });
146
161
  var StyledItemWrapper = /*#__PURE__*/styled('div')({
@@ -148,9 +163,9 @@ var StyledItemWrapper = /*#__PURE__*/styled('div')({
148
163
  "class": "s18m0x6v",
149
164
  propsAsIs: false
150
165
  });
151
- var _exp59 = function _exp59() {
152
- return function (_ref12) {
153
- var placement = _ref12.placement;
166
+ var _exp61 = function _exp61() {
167
+ return function (_ref14) {
168
+ var placement = _ref14.placement;
154
169
  return placement === 'bottom-left' ? 'flex-start' : 'flex-end';
155
170
  };
156
171
  };
@@ -159,7 +174,7 @@ var StyledRoot = /*#__PURE__*/styled('div')({
159
174
  "class": "sfe5ql2",
160
175
  propsAsIs: false,
161
176
  vars: {
162
- "sfe5ql2-0": [/*#__PURE__*/_exp59()]
177
+ "sfe5ql2-0": [/*#__PURE__*/_exp61()]
163
178
  }
164
179
  });
165
180
 
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.styles.js","sources":["../../../src/components/Notification/Notification.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyHyphens } from '../../mixins';\nimport { buttonConfig } from '../Button';\nimport { component, mergeConfig } from '../../engines';\n\nimport { classes, tokens } from './Notification.tokens';\nimport { CloseIconType, IconPlacementType, NotificationPlacement, placements } from './Notification.types';\n\nexport const StyledNotification = css`\n width: fit-content;\n`;\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const CloseIconWrapper = styled(Button)`\n position: absolute;\n width: var(${tokens.closeIconButtonSize});\n height: var(${tokens.closeIconButtonSize});\n align-self: var(${tokens.horisontalIconCloseAlignSelf});\n\n color: var(${tokens.closeIconColor});\n\n :hover {\n color: var(${tokens.closeIconColorOnHover});\n }\n\n &.${classes.horizontal} {\n position: relative;\n }\n`;\n\nexport const Wrapper = styled.div<{ backgroundColor?: string }>`\n position: relative;\n box-sizing: border-box;\n\n background: ${({ backgroundColor }) => backgroundColor || `var(${tokens.background})`};\n border-radius: var(${tokens.borderRadius});\n border: var(${tokens.borderWidth}) solid var(${tokens.borderColor});\n\n &.${classes.horizontal} {\n display: flex;\n align-items: center;\n gap: var(${tokens.horizontalLayoutGap});\n }\n`;\n\nexport const ButtonsWrapper = styled.div<IconPlacementType>`\n margin-top: var(${tokens.buttonsMarginTop});\n margin-left: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.buttonsMarginLeft})` : 'unset'};\n\n align-self: var(${tokens.horisontalActionsAlignSelf});\n\n &.${classes.horizontal} {\n margin-top: unset;\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.div<IconPlacementType & { iconColor?: string }>`\n width: var(${tokens.contentLeftIconSize});\n height: var(${tokens.contentLeftIconSize});\n align-self: var(${tokens.horisontalIconLeftAlignSelf});\n color: ${({ iconColor }) => iconColor || `var(${tokens.contentLeftIconColor})`};\n\n margin-right: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.contentLeftIconMargin})` : 'unset'};\n margin-bottom: ${({ iconPlacement }) =>\n iconPlacement === placements.top ? `var(${tokens.contentTopIconMargin})` : 'unset'};\n\n &.${classes.horizontal} {\n margin-right: var(${tokens.horizontalLayoutLeftIconMargin});\n margin-bottom: unset;\n }\n`;\n\nexport const ContentBox = styled.div<IconPlacementType>`\n // TODO: переделать, когда научимся работать с токенами при пересечнии свойств\n // issue #909\n display: ${({ iconPlacement }) => (iconPlacement === placements.left ? 'flex' : 'block')};\n\n padding-top: ${({ iconPlacement }) =>\n iconPlacement ? `var(${tokens.contentPaddingTop})` : `var(${tokens.contentPaddingTopWithoutIcon})`};\n\n &.${classes.horizontal} {\n padding: unset;\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n`;\n\nexport const TextBox = styled.div<CloseIconType & IconPlacementType>`\n padding: var(${tokens.textboxPaddingTop}) var(${tokens.textboxPaddingRight}) var(${tokens.textboxPaddingBottom})\n var(${tokens.textboxPaddingLeft});\n\n padding-top: ${({ iconPlacement }) =>\n !iconPlacement || iconPlacement === placements.top\n ? `var(${tokens.textboxPaddingTopWithTopIcon})`\n : `var(${tokens.textboxPaddingTop})`};\n padding-right: ${({ showCloseIcon, iconPlacement }) =>\n showCloseIcon && iconPlacement !== placements.top\n ? `var(${tokens.textboxPaddingRightWithCloseIcon})`\n : `var(${tokens.textboxPaddingRight})`};\n\n display: flex;\n flex-direction: column;\n row-gap: var(${tokens.textboxGap});\n word-break: break-word;\n\n &.${classes.horizontal} {\n padding: unset;\n }\n`;\n\nexport const StyledTitle = styled.div<{ textColor?: string }>`\n font-family: var(${tokens.titleFontFamily});\n font-size: var(${tokens.titleFontSize});\n font-style: var(${tokens.titleFontStyle});\n font-weight: var(${tokens.titleFontWeight});\n letter-spacing: var(${tokens.titleFontLetterSpacing});\n line-height: var(${tokens.titleFontLineHeight});\n ${String(applyHyphens)};\n\n color: ${({ textColor }) => textColor || `var(${tokens.titleColor})`};\n`;\n\nexport const StyledContent = styled.div<{ textColor?: string }>`\n font-family: var(${tokens.contentFontFamily});\n font-size: var(${tokens.contentFontSize});\n font-style: var(${tokens.contentFontStyle});\n font-weight: var(${tokens.contentFontWeight});\n letter-spacing: var(${tokens.contentFontLetterSpacing});\n line-height: var(${tokens.contentFontLineHeight});\n ${String(applyHyphens)};\n\n color: ${({ textColor }) => textColor || `var(${tokens.contentColor})`};\n`;\n\nexport const StyledItemWrapper = styled.div<{ isHidden: boolean }>`\n margin-top: 1rem;\n opacity: 1;\n\n &&.${classes.notificationItemOpened} {\n animation: 0.4s showAnimation ease-out;\n\n &.${classes.notificationLeftToRightAnimation} {\n animation: 0.4s showLeftToRightAnimation ease-out;\n }\n\n &.${classes.notificationTopToCenterAnimation} {\n animation: 0.4s showTopToCenterAnimation ease-out;\n }\n\n &.${classes.notificationBottomToCenterAnimation} {\n animation: 0.4s showBottomToCenterAnimation ease-out;\n }\n }\n\n &&.${classes.notificationItemHidden} {\n animation: 0.4s hideAnimation ease-out;\n\n &.${classes.notificationLeftToRightAnimation} {\n animation: 0.4s hideLeftToRightAnimation ease-out;\n }\n }\n\n @keyframes showTopToCenterAnimation {\n 0% {\n transform: translateY(-100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n @keyframes showBottomToCenterAnimation {\n 0% {\n transform: translateY(100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n @keyframes showLeftToRightAnimation {\n 0% {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideLeftToRightAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(-100%);\n opacity: 0;\n }\n }\n\n @keyframes showAnimation {\n 0% {\n transform: translateX(100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n }\n`;\n\nexport const StyledRoot = styled.div<{ placement?: NotificationPlacement }>`\n display: flex;\n flex-direction: column-reverse;\n box-sizing: border-box;\n padding: 0 1.5rem 1.5rem;\n max-height: 100%;\n align-items: ${({ placement }) => (placement === 'bottom-left' ? 'flex-start' : 'flex-end')};\n`;\n"],"names":["StyledNotification","mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp","CloseIconWrapper","styled","name","class","propsAsIs","_exp8","_ref","backgroundColor","concat","tokens","background","Wrapper","vars","_exp15","_ref2","iconPlacement","placements","left","buttonsMarginLeft","ButtonsWrapper","_exp21","_ref3","iconColor","contentLeftIconColor","_exp22","_ref4","contentLeftIconMargin","_exp23","_ref5","top","contentTopIconMargin","IconWrapper","_exp26","_ref6","_exp27","_ref7","contentPaddingTop","contentPaddingTopWithoutIcon","ContentBox","_exp33","_ref8","textboxPaddingTopWithTopIcon","textboxPaddingTop","_exp34","_ref9","showCloseIcon","textboxPaddingRightWithCloseIcon","textboxPaddingRight","TextBox","_exp44","_ref10","textColor","titleColor","StyledTitle","_exp52","_ref11","contentColor","StyledContent","StyledItemWrapper","_exp59","_ref12","placement","StyledRoot"],"mappings":";;;;;;AAUO,IAAMA,kBAAkB,GAE9B,QAAA;AAED,IAAMC,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAd3BA,SAc2BA,IAAAA,GAAA;AAAA,EAAA,OAENF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMG,gBAAgB,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAerC,EAAA;AAAC,IAAAC,KAAA,GA/BgBA,SA+BhBA,KAAAA,GAAA;AAAA,EAAA,OAMgB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,eAAAA,GAAAA,IAAAA,CAAAA,eAAAA,CAAAA;AAAAA,IAAAA,OAAsBA,eAAe,IAAAC,MAAAA,CAAAA,MAAA,CAAWC,MAAM,CAACC,UAAU,EAAG,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAJlF,IAAMC,OAAO,gBAAGV,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,SAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AA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,IAAA3C,MAAAA,CAAAA,MAAA,CAAWC,MAAM,CAAC+C,YAAY,EAAG,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AATnE,IAAMC,aAAa,gBAAGxD,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAQ,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAStB0C,MAA6D,EAAA,CAAA;AAAA,GAAA;AAAA,CACzE,EAAA;AAEM,IAAMI,iBAAiB,gBAAGzD,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAmGtC,EAAA;AAAC,IAAAuD,MAAA,GAhPgBA,SAgPhBA,MAAAA,GAAA;AAAA,EAAA,OAQiB,UAAAC,MAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,MAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAiBA,SAAS,KAAK,aAAa,GAAG,YAAY,GAAG,UAAW,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AANxF,IAAMC,UAAU,gBAAG7D,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAQ,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAMb+C,MAA4E,EAAA,CAAA;AAAA,GAAA;AAAA,CAC9F;;;;"}
1
+ {"version":3,"file":"Notification.styles.js","sources":["../../../src/components/Notification/Notification.styles.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyHyphens } from '../../mixins';\nimport { buttonConfig } from '../Button';\nimport { component, mergeConfig } from '../../engines';\n\nimport { classes, tokens } from './Notification.tokens';\nimport { CloseIconType, IconPlacementType, NotificationPlacement, placements } from './Notification.types';\n\nexport const StyledNotification = css`\n width: fit-content;\n`;\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const CloseIconWrapper = styled(Button)`\n position: absolute;\n width: var(${tokens.closeIconButtonSize});\n height: var(${tokens.closeIconButtonSize});\n align-self: var(${tokens.horisontalIconCloseAlignSelf});\n\n color: var(${tokens.closeIconColor});\n\n :hover {\n color: var(${tokens.closeIconColorOnHover});\n }\n\n &.${classes.horizontal} {\n position: relative;\n }\n`;\n\nexport const Wrapper = styled.div<{\n backgroundColor?: string;\n width?: CSSProperties['width'];\n maxWidth?: CSSProperties['maxWidth'];\n}>`\n position: relative;\n width: ${({ width = `var(${tokens.width})` }) => width};\n max-width: ${({ maxWidth }) => maxWidth || 'unset'};\n\n border-radius: var(${tokens.borderRadius});\n border: var(${tokens.borderWidth}) solid var(${tokens.borderColor});\n\n background: ${({ backgroundColor }) => backgroundColor || `var(${tokens.background})`};\n box-sizing: border-box;\n\n &.${classes.horizontal} {\n display: flex;\n align-items: center;\n gap: var(${tokens.horizontalLayoutGap});\n }\n`;\n\nexport const ButtonsWrapper = styled.div<IconPlacementType>`\n margin-top: var(${tokens.buttonsMarginTop});\n margin-left: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.buttonsMarginLeft})` : 'unset'};\n\n align-self: var(${tokens.horisontalActionsAlignSelf});\n\n &.${classes.horizontal} {\n margin-top: unset;\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.div<IconPlacementType & { iconColor?: string }>`\n width: var(${tokens.contentLeftIconSize});\n height: var(${tokens.contentLeftIconSize});\n align-self: var(${tokens.horisontalIconLeftAlignSelf});\n color: ${({ iconColor }) => iconColor || `var(${tokens.contentLeftIconColor})`};\n\n margin-right: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.contentLeftIconMargin})` : 'unset'};\n margin-bottom: ${({ iconPlacement }) =>\n iconPlacement === placements.top ? `var(${tokens.contentTopIconMargin})` : 'unset'};\n\n &.${classes.horizontal} {\n margin-right: var(${tokens.horizontalLayoutLeftIconMargin});\n margin-bottom: unset;\n }\n`;\n\nexport const ContentBox = styled.div<IconPlacementType>`\n // TODO: переделать, когда научимся работать с токенами при пересечнии свойств\n // issue #909\n display: ${({ iconPlacement }) => (iconPlacement === placements.left ? 'flex' : 'block')};\n\n padding-top: ${({ iconPlacement }) =>\n iconPlacement ? `var(${tokens.contentPaddingTop})` : `var(${tokens.contentPaddingTopWithoutIcon})`};\n\n &.${classes.horizontal} {\n padding: unset;\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n`;\n\nexport const TextBox = styled.div<CloseIconType & IconPlacementType>`\n padding: var(${tokens.textboxPaddingTop}) var(${tokens.textboxPaddingRight}) var(${tokens.textboxPaddingBottom})\n var(${tokens.textboxPaddingLeft});\n\n padding-top: ${({ iconPlacement }) =>\n !iconPlacement || iconPlacement === placements.top\n ? `var(${tokens.textboxPaddingTopWithTopIcon})`\n : `var(${tokens.textboxPaddingTop})`};\n padding-right: ${({ showCloseIcon, iconPlacement }) =>\n showCloseIcon && iconPlacement !== placements.top\n ? `var(${tokens.textboxPaddingRightWithCloseIcon})`\n : `var(${tokens.textboxPaddingRight})`};\n\n display: flex;\n flex-direction: column;\n row-gap: var(${tokens.textboxGap});\n word-break: break-word;\n\n &.${classes.horizontal} {\n padding: unset;\n }\n`;\n\nexport const StyledTitle = styled.div<{ textColor?: string }>`\n font-family: var(${tokens.titleFontFamily});\n font-size: var(${tokens.titleFontSize});\n font-style: var(${tokens.titleFontStyle});\n font-weight: var(${tokens.titleFontWeight});\n letter-spacing: var(${tokens.titleFontLetterSpacing});\n line-height: var(${tokens.titleFontLineHeight});\n ${String(applyHyphens)};\n\n color: ${({ textColor }) => textColor || `var(${tokens.titleColor})`};\n`;\n\nexport const StyledContent = styled.div<{ textColor?: string }>`\n font-family: var(${tokens.contentFontFamily});\n font-size: var(${tokens.contentFontSize});\n font-style: var(${tokens.contentFontStyle});\n font-weight: var(${tokens.contentFontWeight});\n letter-spacing: var(${tokens.contentFontLetterSpacing});\n line-height: var(${tokens.contentFontLineHeight});\n ${String(applyHyphens)};\n\n color: ${({ textColor }) => textColor || `var(${tokens.contentColor})`};\n`;\n\nexport const StyledItemWrapper = styled.div<{ isHidden: boolean }>`\n margin-top: 1rem;\n opacity: 1;\n\n &&.${classes.notificationItemOpened} {\n animation: 0.4s showAnimation ease-out;\n\n &.${classes.notificationLeftToRightAnimation} {\n animation: 0.4s showLeftToRightAnimation ease-out;\n }\n\n &.${classes.notificationTopToCenterAnimation} {\n animation: 0.4s showTopToCenterAnimation ease-out;\n }\n\n &.${classes.notificationBottomToCenterAnimation} {\n animation: 0.4s showBottomToCenterAnimation ease-out;\n }\n }\n\n &&.${classes.notificationItemHidden} {\n animation: 0.4s hideAnimation ease-out;\n\n &.${classes.notificationLeftToRightAnimation} {\n animation: 0.4s hideLeftToRightAnimation ease-out;\n }\n }\n\n @keyframes showTopToCenterAnimation {\n 0% {\n transform: translateY(-100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n @keyframes showBottomToCenterAnimation {\n 0% {\n transform: translateY(100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n @keyframes showLeftToRightAnimation {\n 0% {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideLeftToRightAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(-100%);\n opacity: 0;\n }\n }\n\n @keyframes showAnimation {\n 0% {\n transform: translateX(100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n }\n`;\n\nexport const StyledRoot = styled.div<{ placement?: NotificationPlacement }>`\n display: flex;\n flex-direction: column-reverse;\n box-sizing: border-box;\n padding: 0 1.5rem 1.5rem;\n max-height: 100%;\n align-items: ${({ placement }) => (placement === 'bottom-left' ? 'flex-start' : 'flex-end')};\n`;\n"],"names":["StyledNotification","mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp","CloseIconWrapper","styled","name","class","propsAsIs","_exp8","_ref","_ref$width","width","concat","tokens","_exp9","_ref2","maxWidth","_exp13","_ref3","backgroundColor","background","Wrapper","vars","_exp17","_ref4","iconPlacement","placements","left","buttonsMarginLeft","ButtonsWrapper","_exp23","_ref5","iconColor","contentLeftIconColor","_exp24","_ref6","contentLeftIconMargin","_exp25","_ref7","top","contentTopIconMargin","IconWrapper","_exp28","_ref8","_exp29","_ref9","contentPaddingTop","contentPaddingTopWithoutIcon","ContentBox","_exp35","_ref10","textboxPaddingTopWithTopIcon","textboxPaddingTop","_exp36","_ref11","showCloseIcon","textboxPaddingRightWithCloseIcon","textboxPaddingRight","TextBox","_exp46","_ref12","textColor","titleColor","StyledTitle","_exp54","_ref13","contentColor","StyledContent","StyledItemWrapper","_exp61","_ref14","placement","StyledRoot"],"mappings":";;;;;;AAWO,IAAMA,kBAAkB,GAE9B,QAAA;AAED,IAAMC,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAf3BA,SAe2BA,IAAAA,GAAA;AAAA,EAAA,OAENF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMG,gBAAgB,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC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AAA,CAAWC,MAAM,CAACqD,YAAY,EAAG,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AATnE,IAAMC,aAAa,gBAAG/D,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAe,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAStB0C,MAA6D,EAAA,CAAA;AAAA,GAAA;AAAA,CACzE,EAAA;AAEM,IAAMI,iBAAiB,gBAAGhE,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAmGtC,EAAA;AAAC,IAAA8D,MAAA,GAxPgBA,SAwPhBA,MAAAA,GAAA;AAAA,EAAA,OAQiB,UAAAC,MAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,MAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAiBA,SAAS,KAAK,aAAa,GAAG,YAAY,GAAG,UAAW,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AANxF,IAAMC,UAAU,gBAAGpE,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAe,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAMb+C,MAA4E,EAAA,CAAA;AAAA,GAAA;AAAA,CAC9F;;;;"}
@@ -1,6 +1,6 @@
1
1
  .sb12p{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
2
2
  .crvd7hm{position:absolute;width:var(--plasma-notification-close-icon-button-size);height:var(--plasma-notification-close-icon-button-size);-webkit-align-self:var(--plasma-notification-horizontal-icon-close-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-icon-close-align);align-self:var(--plasma-notification-horizontal-icon-close-align-self);color:var(--plasma-notification-close-icon-color);}.crvd7hm:hover{color:var(--plasma-notification-close-icon-color-on-hover);}.crvd7hm.notification-layout-horizontal{position:relative;}
3
- .wg1ga5v{position:relative;box-sizing:border-box;background:var(--wg1ga5v-0);border-radius:var(--plasma-notification-border-radius);border:var(--plasma-notification-border-width) solid var(--plasma-notification-border-color);}.wg1ga5v.notification-layout-horizontal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-notification-horizontal-layout-gap);}
3
+ .wg1ga5v{position:relative;width:var(--wg1ga5v-0);max-width:var(--wg1ga5v-1);border-radius:var(--plasma-notification-border-radius);border:var(--plasma-notification-border-width) solid var(--plasma-notification-border-color);background:var(--wg1ga5v-2);box-sizing:border-box;}.wg1ga5v.notification-layout-horizontal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-notification-horizontal-layout-gap);}
4
4
  .b1amsn8a{margin-top:var(--plasma-notification-buttons-margin-top);margin-left:var(--b1amsn8a-0);-webkit-align-self:var(--plasma-notification-horizontal-actions-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-actions-align);align-self:var(--plasma-notification-horizontal-actions-align-self);}.b1amsn8a.notification-layout-horizontal{margin-top:unset;margin-left:unset;}
5
5
  .i14raqr9{width:var(--plasma-notification-content-left-icon-size);height:var(--plasma-notification-content-left-icon-size);-webkit-align-self:var(--plasma-notification-horizontal-icon-left-align-self);-ms-flex-item-align:var(--plasma-notification-horizontal-icon-left-align);align-self:var(--plasma-notification-horizontal-icon-left-align-self);color:var(--i14raqr9-0);margin-right:var(--i14raqr9-1);margin-bottom:var(--i14raqr9-2);}.i14raqr9.notification-layout-horizontal{margin-right:var(--plasma-notification-horizontal-layout-left-icon-margin);margin-bottom:unset;}
6
6
  .c157peez{display:var(--c157peez-0);padding-top:var(--c157peez-1);}.c157peez.notification-layout-horizontal{padding:unset;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.types.js","sources":["../../../src/components/Notification/Notification.types.ts"],"sourcesContent":["import type { AsProps } from '@salutejs/plasma-core';\nimport { HTMLAttributes, ReactNode } from 'react';\n\nimport { ComponentConfig, PropsType, Variants } from '../../engines/types';\nimport type { PopupPlacement } from '../Popup';\n\nexport const layouts = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n};\n\nexport type NotificationLayout = keyof typeof layouts;\n\nexport const placements = {\n top: 'top',\n left: 'left',\n};\n\nexport type NotificationIconPlacement = keyof typeof placements;\nexport type NotificationPlacement = PopupPlacement;\n\nexport type LayoutType = {\n layout?: NotificationLayout;\n};\n\nexport type IconPlacementType = {\n iconPlacement?: NotificationIconPlacement;\n};\n\nexport type CloseIconType = {\n showCloseIcon?: boolean;\n};\n\nexport interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Заголовок.\n */\n title?: ReactNode;\n /**\n * Контент под заголовком.\n */\n children?: ReactNode;\n /**\n * Кнопки снизу/справа для необходимых действий.\n */\n actions?: ReactNode;\n /**\n * Схема расположение блоков Notification.\n */\n layout?: NotificationLayout;\n /**\n * Иконка слева.\n */\n icon?: ReactNode;\n /**\n * Расположение иконки слева внутри Textbox.\n */\n iconPlacement?: NotificationIconPlacement;\n /**\n * Показывать ли иконку закрытия справа.\n * @default\n * true\n */\n showCloseIcon?: boolean;\n /**\n * Вид Notification.\n */\n view?: string;\n /**\n * Размер Notification (необходимо связать с размером используемых Button).\n */\n size?: string;\n /**\n * Вид закрывающей иконки в Notification.\n */\n closeIconType?: 'default' | 'thin';\n /**\n * @description Только для применения в рамках SSR.\n */\n UNSAFE_SSR_ENABLED?: boolean;\n /**\n * Цвет текста (по умолчанию берётся цвет из view)\n */\n textColor?: string;\n /**\n * Цвет заголовка (по умолчанию берётся цвет из view)\n */\n titleColor?: string;\n /**\n * Цвет заголовка (по умолчанию берётся цвет из view)\n */\n backgroundColor?: string;\n /**\n * Callback при нажатии на кнопку закрытия.\n */\n onCloseButtonClick?: () => void;\n /**\n * Callback, вызываемый при автоматическом закрытии по timeout.\n */\n onTimeoutClose?: () => void;\n /**\n * @deprecated\n * Не влияет на отображение компонента.\n * Статус компонента Notification.\n */\n status?: string;\n}\n\nexport interface NotificationPortalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Конфигурация компонента Notification.\n */\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & HTMLAttributes<HTMLDivElement>>;\n /**\n * В каком контейнере позиционируется(по умолчанию document), можно также указать id элемента или ref для него.\n */\n frame?: string;\n /**\n * Расположение компонента Notification во frame\n * @default bottom-right\n */\n placement?: NotificationPlacement;\n /**\n * @description Только для применения в рамках SSR.\n */\n UNSAFE_SSR_ENABLED?: boolean;\n}\n"],"names":["layouts","horizontal","vertical","placements","top","left"],"mappings":"AAMO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAIM,IAAMC,UAAU,GAAG;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAA;AACV;;;;"}
1
+ {"version":3,"file":"Notification.types.js","sources":["../../../src/components/Notification/Notification.types.ts"],"sourcesContent":["import type { AsProps } from '@salutejs/plasma-core';\nimport { HTMLAttributes, ReactNode } from 'react';\nimport type { CSSProperties } from 'react';\n\nimport { ComponentConfig, PropsType, Variants } from '../../engines/types';\nimport type { PopupPlacement } from '../Popup';\n\nexport const layouts = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n};\n\nexport type NotificationLayout = keyof typeof layouts;\n\nexport const placements = {\n top: 'top',\n left: 'left',\n};\n\nexport type NotificationIconPlacement = keyof typeof placements;\nexport type NotificationPlacement = PopupPlacement;\n\nexport type LayoutType = {\n layout?: NotificationLayout;\n};\n\nexport type IconPlacementType = {\n iconPlacement?: NotificationIconPlacement;\n};\n\nexport type CloseIconType = {\n showCloseIcon?: boolean;\n};\n\nexport interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Заголовок.\n */\n title?: ReactNode;\n /**\n * Контент под заголовком.\n */\n children?: ReactNode;\n /**\n * Кнопки снизу/справа для необходимых действий.\n */\n actions?: ReactNode;\n /**\n * Схема расположение блоков Notification.\n */\n layout?: NotificationLayout;\n /**\n * Иконка слева.\n */\n icon?: ReactNode;\n /**\n * Расположение иконки слева внутри Textbox.\n */\n iconPlacement?: NotificationIconPlacement;\n /**\n * Показывать ли иконку закрытия справа.\n * @default\n * true\n */\n showCloseIcon?: boolean;\n /**\n * Вид Notification.\n */\n view?: string;\n /**\n * Размер Notification (необходимо связать с размером используемых Button).\n */\n size?: string;\n /**\n * Вид закрывающей иконки в Notification.\n */\n closeIconType?: 'default' | 'thin';\n /**\n * @description Только для применения в рамках SSR.\n */\n UNSAFE_SSR_ENABLED?: boolean;\n /**\n * Цвет текста (по умолчанию берётся цвет из view)\n */\n textColor?: string;\n /**\n * Цвет заголовка (по умолчанию берётся цвет из view)\n */\n titleColor?: string;\n /**\n * Цвет заголовка (по умолчанию берётся цвет из view)\n */\n backgroundColor?: string;\n /**\n * Свойства для управления шириной уведомления\n */\n width?: CSSProperties['width'];\n /**\n * Свойства для ограничения ширины уведомления\n */\n maxWidth?: CSSProperties['maxWidth'];\n /**\n * Callback при нажатии на кнопку закрытия.\n */\n onCloseButtonClick?: () => void;\n /**\n * Callback, вызываемый при автоматическом закрытии по timeout.\n */\n onTimeoutClose?: () => void;\n /**\n * @deprecated\n * Не влияет на отображение компонента.\n * Статус компонента Notification.\n */\n status?: string;\n}\n\nexport interface NotificationPortalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Конфигурация компонента Notification.\n */\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & HTMLAttributes<HTMLDivElement>>;\n /**\n * В каком контейнере позиционируется(по умолчанию document), можно также указать id элемента или ref для него.\n */\n frame?: string;\n /**\n * Расположение компонента Notification во frame\n * @default bottom-right\n */\n placement?: NotificationPlacement;\n /**\n * @description Только для применения в рамках SSR.\n */\n UNSAFE_SSR_ENABLED?: boolean;\n}\n"],"names":["layouts","horizontal","vertical","placements","top","left"],"mappings":"AAOO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAIM,IAAMC,UAAU,GAAG;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAA;AACV;;;;"}