@salutejs/plasma-new-hope 0.176.1-canary.1510.11572230988.0 → 0.176.1-canary.1517.11571952534.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. package/cjs/components/Notification/Notification.css +11 -11
  2. package/cjs/components/Notification/Notification.js +2 -2
  3. package/cjs/components/Notification/Notification.js.map +1 -1
  4. package/cjs/components/Notification/Notification.styles.js +2 -11
  5. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  6. package/cjs/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
  7. package/cjs/components/Notification/Notification.tokens.js +1 -2
  8. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  9. package/cjs/components/Notification/Notification.types.js.map +1 -1
  10. package/cjs/components/Notification/NotificationsPortal.js +4 -8
  11. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  12. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  13. package/cjs/components/Notification/NotificationsProvider.js +1 -3
  14. package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
  15. package/cjs/components/Pagination/Pagination.css +12 -12
  16. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  17. package/cjs/components/Select/Select.css +12 -12
  18. package/cjs/components/Select/Select.tokens.js +1 -2
  19. package/cjs/components/Select/Select.tokens.js.map +1 -1
  20. package/cjs/components/Select/ui/Inner/Inner.css +12 -12
  21. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  22. package/cjs/components/Select/ui/Target/Target.css +12 -12
  23. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  24. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  25. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  26. package/{es/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
  27. package/cjs/components/Steps/Steps.css +9 -9
  28. package/cjs/components/Steps/Steps.tokens.js +1 -0
  29. package/cjs/components/Steps/Steps.tokens.js.map +1 -1
  30. package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
  31. package/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
  32. package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
  33. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
  34. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  35. package/cjs/components/Steps/ui/StepItem/StepItem.styles_1oh5gqm.css +9 -0
  36. package/cjs/index.css +31 -31
  37. package/cjs/index.js +1 -1
  38. package/emotion/cjs/components/Notification/Notification.js +2 -2
  39. package/emotion/cjs/components/Notification/Notification.styles.js +19 -14
  40. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +8 -17
  41. package/emotion/cjs/components/Notification/Notification.tokens.js +1 -2
  42. package/emotion/cjs/components/Notification/NotificationsPortal.js +5 -9
  43. package/emotion/cjs/components/Notification/NotificationsProvider.js +1 -3
  44. package/emotion/cjs/components/Notification/index.js +4 -4
  45. package/emotion/cjs/components/Select/Select.tokens.js +1 -2
  46. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  47. package/emotion/cjs/components/Steps/Steps.tokens.js +1 -0
  48. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
  49. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +17 -11
  50. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
  51. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  52. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
  53. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  54. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
  55. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  56. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
  57. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  58. package/emotion/es/components/Notification/Notification.js +1 -1
  59. package/emotion/es/components/Notification/Notification.styles.js +19 -14
  60. package/emotion/es/components/Notification/Notification.template-doc.mdx +8 -17
  61. package/emotion/es/components/Notification/Notification.tokens.js +1 -2
  62. package/emotion/es/components/Notification/NotificationsPortal.js +5 -9
  63. package/emotion/es/components/Notification/NotificationsProvider.js +1 -3
  64. package/emotion/es/components/Notification/index.js +1 -1
  65. package/emotion/es/components/Select/Select.tokens.js +1 -2
  66. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  67. package/emotion/es/components/Steps/Steps.tokens.js +1 -0
  68. package/emotion/es/components/Steps/ui/StepItem/StepItem.js +29 -7
  69. package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +17 -11
  70. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
  71. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  72. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
  73. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  74. package/emotion/es/examples/plasma_web/components/Notification/Notification.js +4 -6
  75. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  76. package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
  77. package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  78. package/es/components/Notification/Notification.css +11 -11
  79. package/es/components/Notification/Notification.js +2 -2
  80. package/es/components/Notification/Notification.js.map +1 -1
  81. package/es/components/Notification/Notification.styles.js +2 -11
  82. package/es/components/Notification/Notification.styles.js.map +1 -1
  83. package/es/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
  84. package/es/components/Notification/Notification.tokens.js +1 -2
  85. package/es/components/Notification/Notification.tokens.js.map +1 -1
  86. package/es/components/Notification/Notification.types.js.map +1 -1
  87. package/es/components/Notification/NotificationsPortal.js +4 -8
  88. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  89. package/es/components/Notification/NotificationsProvider.css +11 -11
  90. package/es/components/Notification/NotificationsProvider.js +1 -3
  91. package/es/components/Notification/NotificationsProvider.js.map +1 -1
  92. package/es/components/Pagination/Pagination.css +12 -12
  93. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  94. package/es/components/Select/Select.css +12 -12
  95. package/es/components/Select/Select.tokens.js +1 -2
  96. package/es/components/Select/Select.tokens.js.map +1 -1
  97. package/es/components/Select/ui/Inner/Inner.css +12 -12
  98. package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  99. package/es/components/Select/ui/Target/Target.css +12 -12
  100. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  101. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  102. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  103. package/{cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → es/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
  104. package/es/components/Steps/Steps.css +9 -9
  105. package/es/components/Steps/Steps.tokens.js +1 -0
  106. package/es/components/Steps/Steps.tokens.js.map +1 -1
  107. package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
  108. package/es/components/Steps/ui/StepItem/StepItem.js +30 -8
  109. package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
  110. package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
  111. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  112. package/es/components/Steps/ui/StepItem/StepItem.styles_1oh5gqm.css +9 -0
  113. package/es/index.css +31 -31
  114. package/es/index.js +1 -1
  115. package/package.json +2 -2
  116. package/styled-components/cjs/components/Notification/Notification.js +2 -2
  117. package/styled-components/cjs/components/Notification/Notification.styles.js +2 -5
  118. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +8 -17
  119. package/styled-components/cjs/components/Notification/Notification.tokens.js +1 -2
  120. package/styled-components/cjs/components/Notification/NotificationsPortal.js +4 -8
  121. package/styled-components/cjs/components/Notification/NotificationsProvider.js +1 -3
  122. package/styled-components/cjs/components/Notification/index.js +4 -4
  123. package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
  124. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  125. package/styled-components/cjs/components/Steps/Steps.tokens.js +1 -0
  126. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
  127. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +12 -6
  128. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
  129. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  130. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
  131. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  132. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
  133. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  134. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
  135. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  136. package/styled-components/es/components/Notification/Notification.js +1 -1
  137. package/styled-components/es/components/Notification/Notification.styles.js +2 -5
  138. package/styled-components/es/components/Notification/Notification.template-doc.mdx +8 -17
  139. package/styled-components/es/components/Notification/Notification.tokens.js +1 -2
  140. package/styled-components/es/components/Notification/NotificationsPortal.js +4 -8
  141. package/styled-components/es/components/Notification/NotificationsProvider.js +1 -3
  142. package/styled-components/es/components/Notification/index.js +1 -1
  143. package/styled-components/es/components/Select/Select.tokens.js +1 -2
  144. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  145. package/styled-components/es/components/Steps/Steps.tokens.js +1 -0
  146. package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +29 -7
  147. package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +12 -6
  148. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
  149. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  150. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
  151. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  152. package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +4 -6
  153. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  154. package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
  155. package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  156. package/types/components/Notification/Notification.d.ts +3 -3
  157. package/types/components/Notification/Notification.d.ts.map +1 -1
  158. package/types/components/Notification/Notification.styles.d.ts +2 -4
  159. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  160. package/types/components/Notification/Notification.tokens.d.ts +0 -1
  161. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  162. package/types/components/Notification/Notification.types.d.ts +5 -11
  163. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  164. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  165. package/types/components/Notification/NotificationsProvider.d.ts +3 -4
  166. package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
  167. package/types/components/Notification/index.d.ts +2 -2
  168. package/types/components/Notification/index.d.ts.map +1 -1
  169. package/types/components/Select/Select.tokens.d.ts +0 -1
  170. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  171. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  172. package/types/components/Steps/Steps.tokens.d.ts +1 -0
  173. package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
  174. package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
  175. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
  176. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
  177. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +2 -4
  178. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
  179. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
  180. package/types/examples/plasma_web/components/Notification/Notification.d.ts +13 -4
  181. package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
  182. package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
  183. package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
  184. package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
@@ -8,6 +8,7 @@ var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/requir
8
8
  var _Steps = /*#__PURE__*/require("../../Steps.tokens");
9
9
  var _engines = /*#__PURE__*/require("../../../../engines");
10
10
  var _Spinner = /*#__PURE__*/require("../../../Spinner");
11
+ var _mixins = /*#__PURE__*/require("../../../../mixins");
11
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
13
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Spinner.spinnerConfig);
13
14
  var Spinner = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -25,16 +26,21 @@ var StepItemContent = exports.StepItemContent = /*#__PURE__*/_styledComponents["
25
26
  })(["padding-top:var(", ");padding-right:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");word-break:break-word;color:var(", ");"], _Steps.tokens.contentPaddingTop, _Steps.tokens.contentSidePadding, _Steps.tokens.contentFontFamily, _Steps.tokens.contentFontSize, _Steps.tokens.contentFontStyle, _Steps.tokens.contentFontWeight, _Steps.tokens.contentLetterSpacing, _Steps.tokens.contentLineHeight, _Steps.tokens.contentColor);
26
27
  var BulletIndicatorWrapper = exports.BulletIndicatorWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
27
28
  componentId: "plasma-new-hope__sc-bjma6z-3"
28
- })(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;min-height:100%;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], _Steps.classes.simple, _Steps.classes.hasIndicator, _Steps.tokens.activeIndicatorSize, _Steps.classes.hasIndicator, _Steps.tokens.activeBulletSize, _Steps.classes.verticalOrientation, _Steps.tokens.verticalContentPaddingLeft, _Steps.classes.verticalOrientation, _Steps.classes.hasIndicator, _Steps.tokens.activeIndicatorSize, _Steps.classes.hasIndicator, _Steps.tokens.activeBulletSize, _Steps.classes.centered);
29
- var BulletIndicator = exports.BulletIndicator = /*#__PURE__*/_styledComponents["default"].div.withConfig({
29
+ })(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex:0;justify-content:center;&.", "{width:var(", ");min-height:var(", ");}&:not(.", "){width:var(", ");min-height:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;min-height:100%;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], _Steps.classes.simple, _Steps.classes.hasIndicator, _Steps.tokens.activeIndicatorSize, _Steps.classes.hasIndicator, _Steps.tokens.activeBulletSize, _Steps.classes.verticalOrientation, _Steps.tokens.verticalContentPaddingLeft, _Steps.classes.simple, _Steps.classes.hasIndicator, _Steps.tokens.activeIndicatorSize, _Steps.tokens.activeIndicatorSize, _Steps.classes.hasIndicator, _Steps.tokens.activeBulletSize, _Steps.tokens.activeBulletSize, _Steps.classes.verticalOrientation, _Steps.classes.hasIndicator, _Steps.tokens.activeIndicatorSize, _Steps.classes.hasIndicator, _Steps.tokens.activeBulletSize, _Steps.classes.centered);
30
+ var BulletIndicator = exports.BulletIndicator = /*#__PURE__*/_styledComponents["default"].button.withConfig({
30
31
  componentId: "plasma-new-hope__sc-bjma6z-4"
31
- })(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");background:var(", ");}&.", "{color:var(", ");background:var(", ");&:before,&:after{background:var(", ");}}"], _Steps.tokens.indicatorSize, _Steps.tokens.indicatorSize, _Steps.tokens.completedIndicatorColor, _Steps.tokens.completedIndicatorBackground, _Steps.tokens.indicatorFontFamily, _Steps.tokens.indicatorFontSize, _Steps.tokens.indicatorFontStyle, _Steps.tokens.indicatorFontWeight, _Steps.tokens.indicatorLetterSpacing, _Steps.tokens.indicatorLineHeight, _Steps.classes.active, _Steps.tokens.activeIndicatorSize, _Steps.tokens.activeIndicatorSize, _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorBorder, _Steps.tokens.activeIndicatorFontFamily, _Steps.tokens.activeIndicatorFontSize, _Steps.tokens.activeIndicatorFontStyle, _Steps.tokens.activeIndicatorFontWeight, _Steps.tokens.activeIndicatorLetterSpacing, _Steps.tokens.activeIndicatorLineHeight, _Steps.tokens.activeIndicatorColor, _Steps.tokens.activeIndicatorBackground, _Steps.classes.inactive, _Steps.tokens.inactiveIndicatorColor, _Steps.tokens.inactiveIndicatorBackground, _Steps.tokens.inactiveIndicatorBackground);
32
+ })(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;outline:none;padding:0;margin:0;border:none;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", " &.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");background:var(", ");}&.", "{color:var(", ");background:var(", ");&.", "{&:before,&:after{background:var(", ");}}}"], _Steps.tokens.indicatorSize, _Steps.tokens.indicatorSize, _Steps.tokens.completedIndicatorColor, _Steps.tokens.completedIndicatorBackground, _Steps.tokens.indicatorFontFamily, _Steps.tokens.indicatorFontSize, _Steps.tokens.indicatorFontStyle, _Steps.tokens.indicatorFontWeight, _Steps.tokens.indicatorLetterSpacing, _Steps.tokens.indicatorLineHeight, /*#__PURE__*/(0, _mixins.addFocus)({
33
+ outlineOffset: '-0.1875rem',
34
+ outlineSize: '0.0625rem',
35
+ outlineRadius: '50%',
36
+ outlineColor: /*#__PURE__*/"var(".concat(_Steps.tokens.focusColor, ")")
37
+ }), _Steps.classes.active, _Steps.tokens.activeIndicatorSize, _Steps.tokens.activeIndicatorSize, _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorBorder, _Steps.tokens.activeIndicatorFontFamily, _Steps.tokens.activeIndicatorFontSize, _Steps.tokens.activeIndicatorFontStyle, _Steps.tokens.activeIndicatorFontWeight, _Steps.tokens.activeIndicatorLetterSpacing, _Steps.tokens.activeIndicatorLineHeight, _Steps.tokens.activeIndicatorColor, _Steps.tokens.activeIndicatorBackground, _Steps.classes.inactive, _Steps.tokens.inactiveIndicatorColor, _Steps.tokens.inactiveIndicatorBackground, _Steps.classes.simple, _Steps.tokens.inactiveIndicatorBackground);
32
38
  var Bullet = exports.Bullet = /*#__PURE__*/(0, _styledComponents["default"])(BulletIndicator).withConfig({
33
39
  componentId: "plasma-new-hope__sc-bjma6z-5"
34
- })(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background-color:var(", ");}"], _Steps.tokens.bulletSize, _Steps.tokens.bulletSize, _Steps.classes.active, _Steps.tokens.activeBulletSize, _Steps.tokens.activeBulletSize, _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorBorder, _Steps.tokens.activeIndicatorBackground);
40
+ })(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background:var(", ");}"], _Steps.tokens.bulletSize, _Steps.tokens.bulletSize, _Steps.classes.active, _Steps.tokens.activeBulletSize, _Steps.tokens.activeBulletSize, _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorBorder, _Steps.tokens.activeIndicatorBackground);
35
41
  var StepItemDivider = exports.StepItemDivider = /*#__PURE__*/_styledComponents["default"].div.withConfig({
36
42
  componentId: "plasma-new-hope__sc-bjma6z-6"
37
- })(["width:100%;height:var(", ");flex:1;background-color:var(", ");&.", "{background-color:var(", ");}&.", "{background-color:transparent;}&.", "{width:var(", ");height:100%;}&.", "{height:", ";min-height:", ";max-height:", ";&.", "{height:auto;max-height:none;}}"], _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorColor, _Steps.classes.inactive, _Steps.tokens.inactiveIndicatorBackground, _Steps.classes.transparentDivider, _Steps.classes.verticalOrientation, _Steps.tokens.dividerThickness, _Steps.classes.indentDivider, function (_ref2) {
43
+ })(["width:100%;height:var(", ");flex:1;background:var(", ");&.", "{background:var(", ");}&.", "{background:transparent;}&.", "{width:var(", ");height:100%;}&.", "{height:", ";min-height:", ";max-height:", ";&.", "{height:auto;max-height:none;}}"], _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorColor, _Steps.classes.inactive, _Steps.tokens.inactiveIndicatorBackground, _Steps.classes.transparentDivider, _Steps.classes.verticalOrientation, _Steps.tokens.dividerThickness, _Steps.classes.indentDivider, function (_ref2) {
38
44
  var indentToken = _ref2.indentToken;
39
45
  return indentToken || '';
40
46
  }, function (_ref3) {
@@ -49,4 +55,4 @@ var StepItemContentWrapper = exports.StepItemContentWrapper = /*#__PURE__*/_styl
49
55
  })(["&.", "{", "{padding-top:var(", ");padding-right:0;}", "{padding-top:var(", ");padding-bottom:var(", ");padding-right:0;}}"], _Steps.classes.verticalOrientation, StepItemTitle, _Steps.tokens.contentVerticalPadding, StepItemContent, _Steps.tokens.contentVerticalPadding, _Steps.tokens.contentVerticalPadding);
50
56
  var StepItemStyled = exports.StepItemStyled = /*#__PURE__*/_styledComponents["default"].div.withConfig({
51
57
  componentId: "plasma-new-hope__sc-bjma6z-8"
52
- })(["display:flex;flex-direction:column;align-items:flex-start;flex:1;&.", "{flex-direction:row;align-items:stretch;", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{", "{color:var(", ");}}&.", "{&:not(.", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{flex:0;}&.", "{opacity:var(", ");}"], _Steps.classes.verticalOrientation, StepItemDivider, _Steps.tokens.dividerThickness, _Steps.classes.active, StepItemTitle, _Steps.tokens.activeTitleColor, _Steps.classes.inactive, StepItemTitle, _Steps.tokens.inactiveTitleColor, _Steps.classes.hovered, _Steps.classes.active, StepItemTitle, _Steps.tokens.activeTitleColorHover, BulletIndicator, Bullet, _Steps.tokens.completedIndicatorColorHover, _Steps.tokens.completedIndicatorBackgroundHover, _Steps.classes.inactive, StepItemTitle, _Steps.tokens.inactiveTitleColorHover, BulletIndicator, Bullet, _Steps.tokens.inactiveIndicatorColorHover, _Steps.tokens.inactiveIndicatorBackgroundHover, BulletIndicatorWrapper, _Steps.classes.centered, StepItemContentWrapper, _Steps.tokens.contentSidePadding, _Steps.tokens.contentSidePadding, StepItemTitle, StepItemTitle, StepItemContent, _Steps.classes.simple, _Steps.classes.disabled, _Steps.tokens.disabledOpacity);
58
+ })(["position:relative;display:flex;flex-direction:column;align-items:flex-start;flex:1;color:var(", ");&.", "{flex-direction:row;align-items:stretch;", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{color:var(", ");", "{color:var(", ");}}&.", "{flex:0;align-items:center;justify-content:center;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}&.", ",&:not(.", "){&:before,&:after{position:absolute;top:0;bottom:0;left:0;content:'';display:flex;align-self:center;width:calc((var(", ") - var(", ")) / 2);height:var(", ");background:var(", ");}&:after{left:auto;right:0;}&.", "{&:before,&:after{width:var(", ");height:calc((var(", ") - var(", ")) / 2);margin:0 auto;align-self:auto;}&:before{top:0;left:0;right:0;}&:after{top:auto;left:0;right:0;bottom:0;margin:0 auto;}}&.isFirst{&:before{display:none;}}&.isLast{&:after{display:none;}}}&.", "{&:after,&:before{background:var(", ");}}&.isPrevInactive{&:before{background:var(", ");}}&.isNextInactive{&:after{background:var(", ");}}}&:not(.", "):not(.", "){&.isNextActive{", "{width:calc(100% - (var(", ") - var(", ")) / 2);}}&.", "{", "{margin-left:calc((var(", ") - var(", ")) / -2);width:calc(100% + (var(", ") - var(", ")) / 2);}}}&.", "{&:not(.", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{opacity:var(", ");}"], _Steps.tokens.activeIndicatorColor, _Steps.classes.verticalOrientation, StepItemDivider, _Steps.tokens.dividerThickness, _Steps.classes.active, StepItemTitle, _Steps.tokens.activeTitleColor, _Steps.classes.inactive, _Steps.tokens.inactiveIndicatorColor, StepItemTitle, _Steps.tokens.inactiveTitleColor, _Steps.classes.simple, _Steps.classes.hasIndicator, _Steps.tokens.activeIndicatorSize, _Steps.classes.hasIndicator, _Steps.tokens.activeBulletSize, _Steps.classes.inactive, _Steps.classes.active, _Steps.tokens.activeIndicatorSize, _Steps.tokens.indicatorSize, _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorColor, _Steps.classes.verticalOrientation, _Steps.tokens.dividerThickness, _Steps.tokens.activeIndicatorSize, _Steps.tokens.indicatorSize, _Steps.classes.inactive, _Steps.tokens.inactiveIndicatorBackground, _Steps.tokens.inactiveIndicatorBackground, _Steps.tokens.inactiveIndicatorBackground, _Steps.classes.simple, _Steps.classes.verticalOrientation, BulletIndicatorWrapper, _Steps.tokens.activeIndicatorSize, _Steps.tokens.indicatorSize, _Steps.classes.active, BulletIndicatorWrapper, _Steps.tokens.activeIndicatorSize, _Steps.tokens.indicatorSize, _Steps.tokens.activeIndicatorSize, _Steps.tokens.indicatorSize, _Steps.classes.hovered, _Steps.classes.active, StepItemTitle, _Steps.tokens.activeTitleColorHover, BulletIndicator, Bullet, _Steps.tokens.completedIndicatorColorHover, _Steps.tokens.completedIndicatorBackgroundHover, _Steps.classes.inactive, StepItemTitle, _Steps.tokens.inactiveTitleColorHover, BulletIndicator, Bullet, _Steps.tokens.inactiveIndicatorColorHover, _Steps.tokens.inactiveIndicatorBackgroundHover, BulletIndicatorWrapper, _Steps.classes.centered, StepItemContentWrapper, _Steps.tokens.contentSidePadding, _Steps.tokens.contentSidePadding, StepItemTitle, StepItemTitle, StepItemContent, _Steps.classes.disabled, _Steps.tokens.disabledOpacity);
@@ -16,16 +16,14 @@ var _engines = /*#__PURE__*/require("../../../../engines");
16
16
  var _Notification2 = /*#__PURE__*/require("./Notification.config");
17
17
  var _Modal = /*#__PURE__*/require("../../../../components/Modal");
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
- var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Notification.notificationConfig, _Notification2.config);
19
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Notification.noticationConfig, _Notification2.config);
20
20
  var Notification = exports.Notification = /*#__PURE__*/(0, _engines.component)(mergedConfig);
21
21
  var NotificationsProvider = exports.NotificationsProvider = function NotificationsProvider(_ref) {
22
22
  var children = _ref.children,
23
23
  _ref$frame = _ref.frame,
24
- frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame,
25
- placement = _ref.placement;
24
+ frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame;
26
25
  return /*#__PURE__*/_react["default"].createElement(_Notification.NotificationsProvider, {
27
26
  config: mergedConfig,
28
- frame: frame,
29
- placement: placement
27
+ frame: frame
30
28
  }, children);
31
29
  };
@@ -5,7 +5,6 @@ import type { StoryObj, Meta } from '@storybook/react';
5
5
  import { Button } from '../Button/Button';
6
6
  import { Modal } from '../Modal/Modal';
7
7
  import {
8
- NotificationPlacement,
9
8
  NotificationIconPlacement,
10
9
  NotificationLayout,
11
10
  addNotification,
@@ -21,7 +20,6 @@ const titles = ['Выполнено', 'Внимание', 'Ошибка'];
21
20
  const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
22
21
  const size = ['xs', 'xxs'];
23
22
  const iconPlacement = ['top', 'left'];
24
- const notificationsPlacements = ['bottom-right', 'bottom-left'];
25
23
 
26
24
  const longText = `JavaScript frameworks are an essential part of modern front-end web development,
27
25
  providing developers with proven tools for building scalable, interactive web applications.
@@ -51,7 +49,6 @@ interface StoryDefaultProps {
51
49
  layout: NotificationLayout;
52
50
  size: 'xs' | 'xxs';
53
51
  iconPlacement: NotificationIconPlacement;
54
- placement?: NotificationPlacement;
55
52
  }
56
53
 
57
54
  const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIcon, ...rest }: StoryDefaultProps) => {
@@ -114,10 +111,9 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
114
111
  layout: NotificationLayout;
115
112
  size: 'xs' | 'xxs';
116
113
  iconPlacement: NotificationIconPlacement;
117
- placement?: NotificationPlacement;
118
114
  };
119
115
 
120
- const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
116
+ const StoryLiveDemo = ({ timeout, ...rest }: StoryLiveDemoProps) => {
121
117
  const count = useRef(0);
122
118
  const handleClick = useCallback(() => {
123
119
  addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
@@ -125,7 +121,7 @@ const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
125
121
  }, [count, rest]);
126
122
 
127
123
  return (
128
- <NotificationsProvider placement={placement}>
124
+ <NotificationsProvider>
129
125
  <Button text="Добавить уведомление" onClick={handleClick} />
130
126
  </NotificationsProvider>
131
127
  );
@@ -139,28 +135,20 @@ export const LiveDemo: StoryObj<StoryLiveDemoProps> = {
139
135
  type: 'select',
140
136
  },
141
137
  },
142
- placement: {
143
- options: notificationsPlacements,
144
- control: {
145
- type: 'select',
146
- },
147
- },
148
138
  },
149
139
  args: {
150
140
  timeout: 3000,
151
141
  role: 'alert',
152
142
  layout: 'vertical',
153
- placement: 'bottom-right',
154
143
  },
155
144
  render: (args) => <StoryLiveDemo {...args} />,
156
145
  };
157
146
 
158
147
  type StoryWithModalProps = ComponentProps<typeof Notification> & {
159
148
  timeout: number;
160
- placement?: NotificationPlacement;
161
149
  };
162
150
 
163
- const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
151
+ const StoryWithModal = ({ timeout }: StoryWithModalProps) => {
164
152
  const [isModalOpen, setIsModalOpen] = useState(false);
165
153
  const count = useRef(0);
166
154
  const handleClick = useCallback(() => {
@@ -169,7 +157,7 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
169
157
  }, [count]);
170
158
 
171
159
  return (
172
- <NotificationsProvider placement={placement}>
160
+ <NotificationsProvider>
173
161
  <PopupProvider>
174
162
  <Button text="Open modal" onClick={() => setIsModalOpen(true)} />
175
163
  <Modal frame="theme-root" opened={isModalOpen} onClose={() => setIsModalOpen(false)}>
@@ -184,15 +172,6 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
184
172
  export const WithModal: StoryObj<StoryLiveDemoProps> = {
185
173
  args: {
186
174
  timeout: 3500,
187
- placement: 'bottom-right',
188
- },
189
- argTypes: {
190
- placement: {
191
- options: notificationsPlacements,
192
- control: {
193
- type: 'select',
194
- },
195
- },
196
175
  },
197
176
  render: (args) => <StoryWithModal {...args} />,
198
177
  };
@@ -13,7 +13,7 @@ var config = exports.config = {
13
13
  },
14
14
  variations: {
15
15
  view: {
16
- "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], _Steps.stepsTokens.activeTitleColor, _Steps.stepsTokens.activeTitleColorHover, _Steps.stepsTokens.activeIndicatorBorder, _Steps.stepsTokens.activeIndicatorColor, _Steps.stepsTokens.activeIndicatorBackground, _Steps.stepsTokens.completedIndicatorColor, _Steps.stepsTokens.completedIndicatorColorHover, _Steps.stepsTokens.completedIndicatorBackground, _Steps.stepsTokens.completedIndicatorBackgroundHover, _Steps.stepsTokens.inactiveTitleColor, _Steps.stepsTokens.inactiveTitleColorHover, _Steps.stepsTokens.inactiveIndicatorColor, _Steps.stepsTokens.inactiveIndicatorColorHover, _Steps.stepsTokens.inactiveIndicatorBackground, _Steps.stepsTokens.inactiveIndicatorBackgroundHover, _Steps.stepsTokens.contentColor, _Steps.stepsTokens.disabledOpacity)
16
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":var(--surface-accent);", ":0.4;"], _Steps.stepsTokens.activeTitleColor, _Steps.stepsTokens.activeTitleColorHover, _Steps.stepsTokens.activeIndicatorBorder, _Steps.stepsTokens.activeIndicatorColor, _Steps.stepsTokens.activeIndicatorBackground, _Steps.stepsTokens.completedIndicatorColor, _Steps.stepsTokens.completedIndicatorColorHover, _Steps.stepsTokens.completedIndicatorBackground, _Steps.stepsTokens.completedIndicatorBackgroundHover, _Steps.stepsTokens.inactiveTitleColor, _Steps.stepsTokens.inactiveTitleColorHover, _Steps.stepsTokens.inactiveIndicatorColor, _Steps.stepsTokens.inactiveIndicatorColorHover, _Steps.stepsTokens.inactiveIndicatorBackground, _Steps.stepsTokens.inactiveIndicatorBackgroundHover, _Steps.stepsTokens.contentColor, _Steps.stepsTokens.focusColor, _Steps.stepsTokens.disabledOpacity)
17
17
  },
18
18
  size: {
19
19
  l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.125rem;"], _Steps.stepsTokens.indicatorSize, _Steps.stepsTokens.activeIndicatorSize, _Steps.stepsTokens.bulletSize, _Steps.stepsTokens.activeBulletSize, _Steps.stepsTokens.titlePaddingTop, _Steps.stepsTokens.contentPaddingTop, _Steps.stepsTokens.contentSidePadding, _Steps.stepsTokens.contentVerticalPadding, _Steps.stepsTokens.verticalContentPaddingLeft, _Steps.stepsTokens.smallIndicatorIndentHeight, _Steps.stepsTokens.largeIndicatorIndentHeight, _Steps.stepsTokens.smallBulletIndentHeight, _Steps.stepsTokens.largeBulletIndentHeight, _Steps.stepsTokens.indicatorFontFamily, _Steps.stepsTokens.indicatorFontSize, _Steps.stepsTokens.indicatorFontStyle, _Steps.stepsTokens.indicatorFontWeight, _Steps.stepsTokens.indicatorLetterSpacing, _Steps.stepsTokens.indicatorLineHeight, _Steps.stepsTokens.activeIndicatorFontFamily, _Steps.stepsTokens.activeIndicatorFontSize, _Steps.stepsTokens.activeIndicatorFontStyle, _Steps.stepsTokens.activeIndicatorFontWeight, _Steps.stepsTokens.activeIndicatorLetterSpacing, _Steps.stepsTokens.activeIndicatorLineHeight, _Steps.stepsTokens.titleFontFamily, _Steps.stepsTokens.titleFontSize, _Steps.stepsTokens.titleFontStyle, _Steps.stepsTokens.titleFontWeight, _Steps.stepsTokens.titleLetterSpacing, _Steps.stepsTokens.titleLineHeight, _Steps.stepsTokens.contentFontFamily, _Steps.stepsTokens.contentFontSize, _Steps.stepsTokens.contentFontStyle, _Steps.stepsTokens.contentFontWeight, _Steps.stepsTokens.contentLetterSpacing, _Steps.stepsTokens.contentLineHeight, _Steps.stepsTokens.dividerThickness),
@@ -118,7 +118,7 @@ const DefaultStory = (args) => {
118
118
  };
119
119
 
120
120
  return (
121
- <div style={{ maxWidth, height: '400px' }}>
121
+ <div style={{ maxWidth, height: '600px' }}>
122
122
  <Steps
123
123
  size={size}
124
124
  items={items}
@@ -16,16 +16,14 @@ var _engines = /*#__PURE__*/require("../../../../engines");
16
16
  var _Notification2 = /*#__PURE__*/require("./Notification.config");
17
17
  var _Modal = /*#__PURE__*/require("../../../../components/Modal");
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
- var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Notification.notificationConfig, _Notification2.config);
19
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Notification.noticationConfig, _Notification2.config);
20
20
  var Notification = exports.Notification = /*#__PURE__*/(0, _engines.component)(mergedConfig);
21
21
  var NotificationsProvider = exports.NotificationsProvider = function NotificationsProvider(_ref) {
22
22
  var children = _ref.children,
23
23
  _ref$frame = _ref.frame,
24
- frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame,
25
- placement = _ref.placement;
24
+ frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame;
26
25
  return /*#__PURE__*/_react["default"].createElement(_Notification.NotificationsProvider, {
27
26
  config: mergedConfig,
28
- frame: frame,
29
- placement: placement
27
+ frame: frame
30
28
  }, children);
31
29
  };
@@ -5,7 +5,6 @@ import type { StoryObj, Meta } from '@storybook/react';
5
5
  import { Button } from '../Button/Button';
6
6
  import { Modal } from '../Modal/Modal';
7
7
  import {
8
- NotificationPlacement,
9
8
  NotificationIconPlacement,
10
9
  NotificationLayout,
11
10
  addNotification,
@@ -21,7 +20,6 @@ const titles = ['Выполнено', 'Внимание', 'Ошибка'];
21
20
  const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
22
21
  const size = ['xs', 'xxs'];
23
22
  const iconPlacement = ['top', 'left'];
24
- const notificationsPlacements = ['bottom-right', 'bottom-left'];
25
23
 
26
24
  const longText = `JavaScript frameworks are an essential part of modern front-end web development,
27
25
  providing developers with proven tools for building scalable, interactive web applications.
@@ -51,7 +49,6 @@ interface StoryDefaultProps {
51
49
  layout: NotificationLayout;
52
50
  size: 'xs' | 'xxs';
53
51
  iconPlacement: NotificationIconPlacement;
54
- placement?: NotificationPlacement;
55
52
  }
56
53
 
57
54
  const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIcon, ...rest }: StoryDefaultProps) => {
@@ -114,10 +111,9 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
114
111
  layout: NotificationLayout;
115
112
  size: 'xs' | 'xxs';
116
113
  iconPlacement: NotificationIconPlacement;
117
- placement?: NotificationPlacement;
118
114
  };
119
115
 
120
- const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
116
+ const StoryLiveDemo = ({ timeout, ...rest }: StoryLiveDemoProps) => {
121
117
  const count = useRef(0);
122
118
  const handleClick = useCallback(() => {
123
119
  addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
@@ -125,7 +121,7 @@ const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
125
121
  }, [count, rest]);
126
122
 
127
123
  return (
128
- <NotificationsProvider placement={placement}>
124
+ <NotificationsProvider>
129
125
  <Button text="Добавить уведомление" onClick={handleClick} />
130
126
  </NotificationsProvider>
131
127
  );
@@ -139,28 +135,20 @@ export const LiveDemo: StoryObj<StoryLiveDemoProps> = {
139
135
  type: 'select',
140
136
  },
141
137
  },
142
- placement: {
143
- options: notificationsPlacements,
144
- control: {
145
- type: 'select',
146
- },
147
- },
148
138
  },
149
139
  args: {
150
140
  timeout: 3000,
151
141
  role: 'alert',
152
142
  layout: 'vertical',
153
- placement: 'bottom-right',
154
143
  },
155
144
  render: (args) => <StoryLiveDemo {...args} />,
156
145
  };
157
146
 
158
147
  type StoryWithModalProps = ComponentProps<typeof Notification> & {
159
148
  timeout: number;
160
- placement?: NotificationPlacement;
161
149
  };
162
150
 
163
- const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
151
+ const StoryWithModal = ({ timeout }: StoryWithModalProps) => {
164
152
  const [isModalOpen, setIsModalOpen] = useState(false);
165
153
  const count = useRef(0);
166
154
  const handleClick = useCallback(() => {
@@ -169,7 +157,7 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
169
157
  }, [count]);
170
158
 
171
159
  return (
172
- <NotificationsProvider placement={placement}>
160
+ <NotificationsProvider>
173
161
  <PopupProvider>
174
162
  <Button text="Open modal" onClick={() => setIsModalOpen(true)} />
175
163
  <Modal frame="theme-root" opened={isModalOpen} onClose={() => setIsModalOpen(false)}>
@@ -184,15 +172,6 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
184
172
  export const WithModal: StoryObj<StoryLiveDemoProps> = {
185
173
  args: {
186
174
  timeout: 3500,
187
- placement: 'bottom-right',
188
- },
189
- argTypes: {
190
- placement: {
191
- options: notificationsPlacements,
192
- control: {
193
- type: 'select',
194
- },
195
- },
196
175
  },
197
176
  render: (args) => <StoryWithModal {...args} />,
198
177
  };
@@ -13,7 +13,7 @@ var config = exports.config = {
13
13
  },
14
14
  variations: {
15
15
  view: {
16
- "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], _Steps.stepsTokens.activeTitleColor, _Steps.stepsTokens.activeTitleColorHover, _Steps.stepsTokens.activeIndicatorBorder, _Steps.stepsTokens.activeIndicatorColor, _Steps.stepsTokens.activeIndicatorBackground, _Steps.stepsTokens.completedIndicatorColor, _Steps.stepsTokens.completedIndicatorColorHover, _Steps.stepsTokens.completedIndicatorBackground, _Steps.stepsTokens.completedIndicatorBackgroundHover, _Steps.stepsTokens.inactiveTitleColor, _Steps.stepsTokens.inactiveTitleColorHover, _Steps.stepsTokens.inactiveIndicatorColor, _Steps.stepsTokens.inactiveIndicatorColorHover, _Steps.stepsTokens.inactiveIndicatorBackground, _Steps.stepsTokens.inactiveIndicatorBackgroundHover, _Steps.stepsTokens.contentColor, _Steps.stepsTokens.disabledOpacity)
16
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":var(--surface-accent);", ":0.4;"], _Steps.stepsTokens.activeTitleColor, _Steps.stepsTokens.activeTitleColorHover, _Steps.stepsTokens.activeIndicatorBorder, _Steps.stepsTokens.activeIndicatorColor, _Steps.stepsTokens.activeIndicatorBackground, _Steps.stepsTokens.completedIndicatorColor, _Steps.stepsTokens.completedIndicatorColorHover, _Steps.stepsTokens.completedIndicatorBackground, _Steps.stepsTokens.completedIndicatorBackgroundHover, _Steps.stepsTokens.inactiveTitleColor, _Steps.stepsTokens.inactiveTitleColorHover, _Steps.stepsTokens.inactiveIndicatorColor, _Steps.stepsTokens.inactiveIndicatorColorHover, _Steps.stepsTokens.inactiveIndicatorBackground, _Steps.stepsTokens.inactiveIndicatorBackgroundHover, _Steps.stepsTokens.contentColor, _Steps.stepsTokens.focusColor, _Steps.stepsTokens.disabledOpacity)
17
17
  },
18
18
  size: {
19
19
  l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.125rem;"], _Steps.stepsTokens.indicatorSize, _Steps.stepsTokens.activeIndicatorSize, _Steps.stepsTokens.bulletSize, _Steps.stepsTokens.activeBulletSize, _Steps.stepsTokens.titlePaddingTop, _Steps.stepsTokens.contentPaddingTop, _Steps.stepsTokens.contentSidePadding, _Steps.stepsTokens.contentVerticalPadding, _Steps.stepsTokens.verticalContentPaddingLeft, _Steps.stepsTokens.smallIndicatorIndentHeight, _Steps.stepsTokens.largeIndicatorIndentHeight, _Steps.stepsTokens.smallBulletIndentHeight, _Steps.stepsTokens.largeBulletIndentHeight, _Steps.stepsTokens.indicatorFontFamily, _Steps.stepsTokens.indicatorFontSize, _Steps.stepsTokens.indicatorFontStyle, _Steps.stepsTokens.indicatorFontWeight, _Steps.stepsTokens.indicatorLetterSpacing, _Steps.stepsTokens.indicatorLineHeight, _Steps.stepsTokens.activeIndicatorFontFamily, _Steps.stepsTokens.activeIndicatorFontSize, _Steps.stepsTokens.activeIndicatorFontStyle, _Steps.stepsTokens.activeIndicatorFontWeight, _Steps.stepsTokens.activeIndicatorLetterSpacing, _Steps.stepsTokens.activeIndicatorLineHeight, _Steps.stepsTokens.titleFontFamily, _Steps.stepsTokens.titleFontSize, _Steps.stepsTokens.titleFontStyle, _Steps.stepsTokens.titleFontWeight, _Steps.stepsTokens.titleLetterSpacing, _Steps.stepsTokens.titleLineHeight, _Steps.stepsTokens.contentFontFamily, _Steps.stepsTokens.contentFontSize, _Steps.stepsTokens.contentFontStyle, _Steps.stepsTokens.contentFontWeight, _Steps.stepsTokens.contentLetterSpacing, _Steps.stepsTokens.contentLineHeight, _Steps.stepsTokens.dividerThickness),
@@ -118,7 +118,7 @@ const DefaultStory = (args) => {
118
118
  };
119
119
 
120
120
  return (
121
- <div style={{ maxWidth, height: '400px' }}>
121
+ <div style={{ maxWidth, height: '600px' }}>
122
122
  <Steps
123
123
  size={size}
124
124
  items={items}
@@ -86,7 +86,7 @@ export var notificationRoot = function notificationRoot(Root) {
86
86
  })))));
87
87
  });
88
88
  };
89
- export var notificationConfig = {
89
+ export var noticationConfig = {
90
90
  name: 'Notification',
91
91
  tag: 'div',
92
92
  layout: notificationRoot,
@@ -58,10 +58,7 @@ export var StyledContent = /*#__PURE__*/styled.div.withConfig({
58
58
  })(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", ";color:var(", ");"], tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentFontLetterSpacing, tokens.contentFontLineHeight, /*#__PURE__*/String(applyHyphens), tokens.contentColor);
59
59
  export var StyledItemWrapper = /*#__PURE__*/styled.div.withConfig({
60
60
  componentId: "plasma-new-hope__sc-1iufy9r-8"
61
- })(["margin-top:1rem;opacity:1;&&.", "{animation:0.4s showAnimation ease-out;&.", "{animation:0.4s showLeftToRightAnimation ease-out;}}&&.", "{animation:0.4s hideAnimation ease-out;&.", "{animation:0.4s hideLeftToRightAnimation ease-out;}}@keyframes showLeftToRightAnimation{0%{transform:translateX(-100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideLeftToRightAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(-100%);opacity:0;}}@keyframes showAnimation{0%{transform:translateX(100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"], classes.notificationItemOpened, classes.notificationLeftToRightAnimation, classes.notificationItemHidden, classes.notificationLeftToRightAnimation);
61
+ })(["margin-top:1rem;opacity:1;&&.", "{animation:0.4s showAnimation ease-out;}&&.", "{animation:0.4s hideAnimation ease-out;}@keyframes showAnimation{0%{transform:translateX(100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"], classes.notificationItemOpened, classes.notificationItemHidden);
62
62
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
63
63
  componentId: "plasma-new-hope__sc-1iufy9r-9"
64
- })(["display:flex;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;align-items:", ";"], function (_ref8) {
65
- var placement = _ref8.placement;
66
- return placement === 'bottom-left' ? 'flex-start' : 'flex-end';
67
- });
64
+ })(["display:flex;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;align-items:flex-end;"]);
@@ -10,15 +10,14 @@ import { PropsTable, Description } from '@site/src/components';
10
10
  <PropsTable name="Notification" />
11
11
 
12
12
  ## Использование
13
- Компонент `Notification` может использоваться для создания собственных систем оповещения.
13
+ Компонент `Notification` может использоваться для создания собственных систем оповещения.
14
14
  Вид компонента контролируется свойствами (props).
15
- Текстовая часть оповещения состоит из `title` и `children`.
15
+ Текстовая часть оповещения состоит из `title` и `children`.
16
16
  Слева или сверху от нее, также можно пробросить иконку через свойство `icon`.
17
17
  Также есть часть `actions`, в которой предполагается отображение кнопок для взаимодействия.
18
18
 
19
19
  ### Провайдер контекста
20
- Поместите `NotificationsProvider` в [корень приложения](../../#корень-приложения) или там, где будете применять модальные окна.
21
- В качестве свойств можно указать контейнер для оповещений через `frame` и расположение в контейнере через свойство `placement`, как `bottom-right` _(по умолчанию)_ или `bottom-left`.
20
+ Поместите `NotificationsProvider` в [корень приложения](../../#корень-приложения) или там, где будете применять модальные окна:
22
21
 
23
22
  ```tsx title="index.ts"
24
23
  import ReactDOM from 'react-dom';
@@ -35,32 +34,24 @@ ReactDOM.render(
35
34
  ```
36
35
 
37
36
  ### Вызов уведомления
38
- После подключения `NotificationsProvider` станет возможен вызов функции `addNotification`, который приведет к отображению оповещения.
39
- Функция принимает значения свойств компонента `Notification`, включая необязательное поле `id`. И возвращает сгенерированный или переданный `id`, по которому можно закрыть оповещение через вызов `closeNotification`.
37
+ После подключения `NotificationsProvider` станет возможен вызов функции `addNotification`,который приведет к отображению оповещения.
38
+ Функция принимает значения свойств компонента `Notification`:
40
39
 
41
40
  ```tsx live
42
41
  import React from 'react';
43
- import { Button, ButtonGroup, addNotification, closeNotification, NotificationsProvider } from '@salutejs/{{ package }}';
42
+ import { Button, addNotification, NotificationsProvider } from '@salutejs/{{ package }}';
44
43
 
45
44
  export function App() {
46
- const handleShow = React.useCallback(() => {
45
+ const handleClick = React.useCallback(() => {
47
46
  addNotification({
48
- id: 'incoming-call',
49
47
  title: 'Входящий вызов',
50
48
  children: 'Принять?',
51
49
  }, 1000);
52
50
  }, []);
53
51
 
54
- const handleHide = React.useCallback(() => {
55
- closeNotification('incoming-call');
56
- }, []);
57
-
58
52
  return (
59
53
  <NotificationsProvider>
60
- <ButtonGroup>
61
- <Button text="Показать оповещение" onClick={handleShow} />
62
- <Button text="Скрыть оповещение" onClick={handleHide} />
63
- </ButtonGroup>
54
+ <Button text="Показать оповещение" onClick={handleClick} />
64
55
  </NotificationsProvider>
65
56
  );
66
57
  }
@@ -13,8 +13,7 @@ export var classes = {
13
13
  withoutIcon: 'notification-without-icon',
14
14
  withoutCloseIcon: 'notification-without-close-icon',
15
15
  notificationItemOpened: 'notification-item-opened',
16
- notificationItemHidden: 'notification-item-hidden',
17
- notificationLeftToRightAnimation: 'notification-left-to-right-animation'
16
+ notificationItemHidden: 'notification-item-hidden'
18
17
  };
19
18
  export var tokens = {
20
19
  background: '--plasma-notification-backgorund',
@@ -24,9 +24,7 @@ var StyledPopup = /*#__PURE__*/styled(Popup).withConfig({
24
24
  */
25
25
  export var NotificationsPortal = function NotificationsPortal(_ref) {
26
26
  var config = _ref.config,
27
- frame = _ref.frame,
28
- _ref$placement = _ref.placement,
29
- placement = _ref$placement === void 0 ? 'bottom-right' : _ref$placement;
27
+ frame = _ref.frame;
30
28
  var _useStoreon = useStoreon('notifications'),
31
29
  notifications = _useStoreon.notifications;
32
30
  var Notification = useMemo(function () {
@@ -35,17 +33,15 @@ export var NotificationsPortal = function NotificationsPortal(_ref) {
35
33
  return /*#__PURE__*/React.createElement(PopupProvider, null, notifications.length > 0 && /*#__PURE__*/React.createElement(StyledPopup, {
36
34
  opened: true,
37
35
  frame: frame,
38
- placement: placement,
36
+ placement: "bottom-right",
39
37
  zIndex: "9100"
40
- }, /*#__PURE__*/React.createElement(StyledRoot, {
41
- placement: placement
42
- }, notifications.map(function (_ref2) {
38
+ }, /*#__PURE__*/React.createElement(StyledRoot, null, notifications.map(function (_ref2) {
43
39
  var id = _ref2.id,
44
40
  isHidden = _ref2.isHidden,
45
41
  rest = _objectWithoutProperties(_ref2, _excluded);
46
42
  return /*#__PURE__*/React.createElement(StyledItemWrapper, {
47
43
  key: id,
48
- className: cx(isHidden ? classes.notificationItemHidden : classes.notificationItemOpened, placement === 'bottom-left' && classes.notificationLeftToRightAnimation),
44
+ className: cx(isHidden ? classes.notificationItemHidden : classes.notificationItemOpened),
49
45
  isHidden: isHidden || false
50
46
  }, /*#__PURE__*/React.createElement(Notification, _extends({
51
47
  key: id,
@@ -5,13 +5,11 @@ import { NotificationsPortal } from './NotificationsPortal';
5
5
  export var NotificationsProvider = function NotificationsProvider(_ref) {
6
6
  var children = _ref.children,
7
7
  config = _ref.config,
8
- frame = _ref.frame,
9
- placement = _ref.placement;
8
+ frame = _ref.frame;
10
9
  return /*#__PURE__*/React.createElement(StoreContext.Provider, {
11
10
  value: NotificationsStore
12
11
  }, children, /*#__PURE__*/React.createElement(NotificationsPortal, {
13
12
  frame: frame,
14
- placement: placement,
15
13
  config: config
16
14
  }));
17
15
  };
@@ -1,4 +1,4 @@
1
1
  export { NotificationsProvider } from './NotificationsProvider';
2
- export { notificationRoot, notificationConfig } from './Notification';
2
+ export { notificationRoot, noticationConfig } from './Notification';
3
3
  export { addNotification, closeNotification } from './NotificationsStore';
4
4
  export { classes as notificationClasses, tokens as notificationTokens } from './Notification.tokens';
@@ -93,8 +93,7 @@ export var tokens = {
93
93
  spinnerSize: '--plasma-select-spinner-size',
94
94
  spinnerSizeTight: '--plasma-select-spinner-size-tight',
95
95
  disclosureIconColor: '--plasma-select-disclosure-icon-color',
96
- disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover',
97
- contentLeftColor: '--plasma-select-content-left-color'
96
+ disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
98
97
  };
99
98
  export var constants = {
100
99
  focusColor: '--surface-accent',
@@ -63,7 +63,7 @@ export var InnerLabel = /*#__PURE__*/styled.label.withConfig({
63
63
  })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");text-align:left;"], constants.textfieldInnerLabelColor, constants.fontFamily, constants.fontSize, constants.fontStyle, constants.fontWeight, constants.fontLetterSpacing, constants.fontLineHeight);
64
64
  export var ContentLeftWrapper = /*#__PURE__*/styled.div.withConfig({
65
65
  componentId: "plasma-new-hope__sc-1akl2tk-10"
66
- })(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;color:var(", ");"], tokens.contentLeftColor);
66
+ })(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;"]);
67
67
  export var Value = /*#__PURE__*/styled.span.withConfig({
68
68
  componentId: "plasma-new-hope__sc-1akl2tk-11"
69
69
  })(["", ""], /*#__PURE__*/applyEllipsis());
@@ -56,6 +56,7 @@ export var tokens = {
56
56
  inactiveTitleColor: '--plasma-step-item-inactive-title-color',
57
57
  inactiveTitleColorHover: '--plasma-step-item-inactive-title-color-hover',
58
58
  contentColor: '--plasma-step-item-content-color',
59
+ focusColor: '--plasma-step-item-focus-color',
59
60
  activeIndicatorBorder: '--plasma-step-item-active-indicator-border',
60
61
  activeIndicatorBorderHover: '--plasma-step-item-active-indicator-border-hover',
61
62
  activeIndicatorColor: '--plasma-step-item-active-indicator-color',