@salutejs/plasma-new-hope 0.193.1-canary.1561.11839785759.0 → 0.194.0-canary.1558.11852073996.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. package/cjs/components/Modal/Modal.css +6 -0
  2. package/cjs/components/Modal/Modal.js +27 -13
  3. package/cjs/components/Modal/Modal.js.map +1 -1
  4. package/cjs/components/Modal/Modal.styles.js +27 -0
  5. package/cjs/components/Modal/Modal.styles.js.map +1 -0
  6. package/cjs/components/Modal/Modal.styles_tqsxxy.css +3 -0
  7. package/cjs/components/Modal/Modal.tokens.js +7 -1
  8. package/cjs/components/Modal/Modal.tokens.js.map +1 -1
  9. package/cjs/components/Pagination/Pagination.css +2 -2
  10. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
  11. package/cjs/components/Select/Select.css +2 -2
  12. package/cjs/components/Select/Select.js +4 -11
  13. package/cjs/components/Select/Select.js.map +1 -1
  14. package/cjs/components/Select/Select.tokens.js +1 -11
  15. package/cjs/components/Select/Select.tokens.js.map +1 -1
  16. package/cjs/components/Select/ui/Inner/Inner.css +2 -2
  17. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +2 -2
  18. package/cjs/components/Select/ui/Target/Target.css +2 -2
  19. package/cjs/components/Select/ui/Target/Target.js +4 -5
  20. package/cjs/components/Select/ui/Target/Target.js.map +1 -1
  21. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -2
  22. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -3
  23. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  24. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +7 -7
  25. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  26. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +3 -0
  27. package/cjs/index.css +6 -2
  28. package/emotion/cjs/components/Modal/Modal.js +26 -12
  29. package/emotion/cjs/components/Modal/Modal.styles.js +27 -0
  30. package/emotion/cjs/components/Modal/Modal.template-doc.mdx +47 -0
  31. package/emotion/cjs/components/Modal/Modal.tokens.js +7 -1
  32. package/emotion/cjs/components/Select/Select.js +4 -11
  33. package/emotion/cjs/components/Select/Select.tokens.js +1 -11
  34. package/emotion/cjs/components/Select/ui/Target/Target.js +4 -5
  35. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -3
  36. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +3 -3
  37. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  38. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +90 -1
  39. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +20 -20
  40. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +0 -25
  41. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  42. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +90 -1
  43. package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +20 -20
  44. package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +0 -24
  45. package/emotion/es/components/Modal/Modal.js +26 -12
  46. package/emotion/es/components/Modal/Modal.styles.js +20 -0
  47. package/emotion/es/components/Modal/Modal.template-doc.mdx +47 -0
  48. package/emotion/es/components/Modal/Modal.tokens.js +7 -1
  49. package/emotion/es/components/Select/Select.js +4 -11
  50. package/emotion/es/components/Select/Select.tokens.js +1 -11
  51. package/emotion/es/components/Select/ui/Target/Target.js +4 -5
  52. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -3
  53. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +3 -3
  54. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  55. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +90 -1
  56. package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +20 -20
  57. package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +0 -25
  58. package/emotion/es/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  59. package/emotion/es/examples/plasma_web/components/Modal/Modal.stories.tsx +90 -1
  60. package/emotion/es/examples/plasma_web/components/Select/Select.config.js +20 -20
  61. package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +0 -24
  62. package/es/components/Modal/Modal.css +6 -0
  63. package/es/components/Modal/Modal.js +27 -13
  64. package/es/components/Modal/Modal.js.map +1 -1
  65. package/es/components/Modal/Modal.styles.js +21 -0
  66. package/es/components/Modal/Modal.styles.js.map +1 -0
  67. package/es/components/Modal/Modal.styles_tqsxxy.css +3 -0
  68. package/es/components/Modal/Modal.tokens.js +7 -1
  69. package/es/components/Modal/Modal.tokens.js.map +1 -1
  70. package/es/components/Pagination/Pagination.css +2 -2
  71. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
  72. package/es/components/Select/Select.css +2 -2
  73. package/es/components/Select/Select.js +4 -11
  74. package/es/components/Select/Select.js.map +1 -1
  75. package/es/components/Select/Select.tokens.js +1 -11
  76. package/es/components/Select/Select.tokens.js.map +1 -1
  77. package/es/components/Select/ui/Inner/Inner.css +2 -2
  78. package/es/components/Select/ui/Inner/ui/Item/Item.css +2 -2
  79. package/es/components/Select/ui/Target/Target.css +2 -2
  80. package/es/components/Select/ui/Target/Target.js +4 -5
  81. package/es/components/Select/ui/Target/Target.js.map +1 -1
  82. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -2
  83. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -3
  84. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  85. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +7 -7
  86. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  87. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +3 -0
  88. package/es/index.css +6 -2
  89. package/package.json +2 -2
  90. package/styled-components/cjs/components/Modal/Modal.js +26 -12
  91. package/styled-components/cjs/components/Modal/Modal.styles.js +24 -0
  92. package/styled-components/cjs/components/Modal/Modal.template-doc.mdx +47 -0
  93. package/styled-components/cjs/components/Modal/Modal.tokens.js +7 -1
  94. package/styled-components/cjs/components/Select/Select.js +4 -11
  95. package/styled-components/cjs/components/Select/Select.tokens.js +1 -11
  96. package/styled-components/cjs/components/Select/ui/Target/Target.js +4 -5
  97. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -3
  98. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +2 -2
  99. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  100. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +90 -1
  101. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +8 -8
  102. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +0 -25
  103. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  104. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +90 -1
  105. package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +8 -8
  106. package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +0 -24
  107. package/styled-components/es/components/Modal/Modal.js +26 -12
  108. package/styled-components/es/components/Modal/Modal.styles.js +17 -0
  109. package/styled-components/es/components/Modal/Modal.template-doc.mdx +47 -0
  110. package/styled-components/es/components/Modal/Modal.tokens.js +7 -1
  111. package/styled-components/es/components/Select/Select.js +4 -11
  112. package/styled-components/es/components/Select/Select.tokens.js +1 -11
  113. package/styled-components/es/components/Select/ui/Target/Target.js +4 -5
  114. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -3
  115. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +2 -2
  116. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  117. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +90 -1
  118. package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +8 -8
  119. package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +0 -25
  120. package/styled-components/es/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  121. package/styled-components/es/examples/plasma_web/components/Modal/Modal.stories.tsx +90 -1
  122. package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +8 -8
  123. package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +0 -24
  124. package/types/components/Modal/Modal.d.ts.map +1 -1
  125. package/types/components/Modal/Modal.styles.d.ts +5 -0
  126. package/types/components/Modal/Modal.styles.d.ts.map +1 -0
  127. package/types/components/Modal/Modal.tokens.d.ts +6 -0
  128. package/types/components/Modal/Modal.tokens.d.ts.map +1 -1
  129. package/types/components/Modal/Modal.types.d.ts +21 -1
  130. package/types/components/Modal/Modal.types.d.ts.map +1 -1
  131. package/types/components/Modal/index.d.ts +1 -1
  132. package/types/components/Modal/index.d.ts.map +1 -1
  133. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +0 -96
  134. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  135. package/types/components/Select/Select.d.ts.map +1 -1
  136. package/types/components/Select/Select.tokens.d.ts +1 -11
  137. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  138. package/types/components/Select/Select.types.d.ts +2 -4
  139. package/types/components/Select/Select.types.d.ts.map +1 -1
  140. package/types/components/Select/ui/Target/Target.d.ts +1 -2
  141. package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
  142. package/types/components/Select/ui/Target/Target.types.d.ts +2 -3
  143. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  144. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  145. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  146. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  147. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  148. package/types/examples/plasma_b2c/components/Modal/Modal.config.d.ts.map +1 -1
  149. package/types/examples/plasma_b2c/components/Modal/Modal.d.ts +7 -1
  150. package/types/examples/plasma_b2c/components/Modal/Modal.d.ts.map +1 -1
  151. package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
  152. package/types/examples/plasma_b2c/components/Select/Select.d.ts +0 -96
  153. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  154. package/types/examples/plasma_web/components/Modal/Modal.config.d.ts.map +1 -1
  155. package/types/examples/plasma_web/components/Modal/Modal.d.ts +7 -1
  156. package/types/examples/plasma_web/components/Modal/Modal.d.ts.map +1 -1
  157. package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
  158. package/types/examples/plasma_web/components/Select/Select.d.ts +0 -96
  159. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  160. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_1b7iij0.css +0 -3
  161. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_1b7iij0.css +0 -3
@@ -79,25 +79,6 @@ const meta: Meta<StorySelectProps> = {
79
79
  eq: 'textfield-like',
80
80
  },
81
81
  },
82
- requiredPlacement: {
83
- options: ['left', 'right'],
84
- control: {
85
- type: 'select',
86
- },
87
- if: { arg: 'required', truthy: true },
88
- },
89
- required: {
90
- control: {
91
- type: 'boolean',
92
- },
93
- if: { arg: 'optional', truthy: false },
94
- },
95
- optional: {
96
- control: {
97
- type: 'boolean',
98
- },
99
- if: { arg: 'required', truthy: false },
100
- },
101
82
  },
102
83
  args: {
103
84
  target: 'textfield-like',
@@ -112,9 +93,6 @@ const meta: Meta<StorySelectProps> = {
112
93
  isTargetAmount: false,
113
94
  variant: 'normal',
114
95
  disabled: false,
115
- optional: false,
116
- required: false,
117
- requiredPlacement: 'right',
118
96
  },
119
97
  parameters: {
120
98
  controls: {
@@ -135,9 +113,6 @@ const meta: Meta<StorySelectProps> = {
135
113
  'listWidth',
136
114
  'listOverflow',
137
115
  'listHeight',
138
- 'optional',
139
- 'required',
140
- 'requiredPlacement',
141
116
  ],
142
117
  },
143
118
  },
@@ -12,7 +12,7 @@ var config = exports.config = {
12
12
  },
13
13
  variations: {
14
14
  view: {
15
- "default": /*#__PURE__*/(0, _react.css)(_Modal.modalTokens.modalOverlayWithBlurColor, ":var(--overlay-blur);", _Modal.modalTokens.modalOverlayColor, ":var(--overlay-soft);;label:plasma-new-hope__default;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Nb2RhbC9Nb2RhbC5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVXdCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Nb2RhbC9Nb2RhbC5jb25maWcudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IG1vZGFsVG9rZW5zIH0gZnJvbSAnLi4vLi4vLi4vLi4vY29tcG9uZW50cy9Nb2RhbCc7XG5cbmV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdmlldzogJ2RlZmF1bHQnLFxuICAgIH0sXG4gICAgdmFyaWF0aW9uczoge1xuICAgICAgICB2aWV3OiB7XG4gICAgICAgICAgICBkZWZhdWx0OiBjc3NgXG4gICAgICAgICAgICAgICAgJHttb2RhbFRva2Vucy5tb2RhbE92ZXJsYXlXaXRoQmx1ckNvbG9yfTogdmFyKC0tb3ZlcmxheS1ibHVyKTtcbiAgICAgICAgICAgICAgICAke21vZGFsVG9rZW5zLm1vZGFsT3ZlcmxheUNvbG9yfTogdmFyKC0tb3ZlcmxheS1zb2Z0KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgfSxcbn07XG4iXX0= */"))
15
+ "default": /*#__PURE__*/(0, _react.css)(_Modal.modalTokens.modalOverlayWithBlurColor, ":var(--overlay-blur);", _Modal.modalTokens.modalOverlayColor, ":var(--overlay-soft);", _Modal.modalTokens.modalBodyBackground, ":var(--surface-solid-card);", _Modal.modalTokens.modalBodyBorderRadius, ":1.25rem;", _Modal.modalTokens.modalBodyPadding, ":2rem;", _Modal.modalTokens.modalContentPadding, ":0.625rem;", _Modal.modalTokens.modalCloseButtonRadius, ":0.375rem;", _Modal.modalTokens.modalOutlineFocusColor, ":var(--surface-accent);;label:plasma-new-hope__default;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Nb2RhbC9Nb2RhbC5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVXdCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Nb2RhbC9Nb2RhbC5jb25maWcudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IG1vZGFsVG9rZW5zIH0gZnJvbSAnLi4vLi4vLi4vLi4vY29tcG9uZW50cy9Nb2RhbCc7XG5cbmV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdmlldzogJ2RlZmF1bHQnLFxuICAgIH0sXG4gICAgdmFyaWF0aW9uczoge1xuICAgICAgICB2aWV3OiB7XG4gICAgICAgICAgICBkZWZhdWx0OiBjc3NgXG4gICAgICAgICAgICAgICAgJHttb2RhbFRva2Vucy5tb2RhbE92ZXJsYXlXaXRoQmx1ckNvbG9yfTogdmFyKC0tb3ZlcmxheS1ibHVyKTtcbiAgICAgICAgICAgICAgICAke21vZGFsVG9rZW5zLm1vZGFsT3ZlcmxheUNvbG9yfTogdmFyKC0tb3ZlcmxheS1zb2Z0KTtcbiAgICAgICAgICAgICAgICAke21vZGFsVG9rZW5zLm1vZGFsQm9keUJhY2tncm91bmR9OiB2YXIoLS1zdXJmYWNlLXNvbGlkLWNhcmQpO1xuICAgICAgICAgICAgICAgICR7bW9kYWxUb2tlbnMubW9kYWxCb2R5Qm9yZGVyUmFkaXVzfTogMS4yNXJlbTtcbiAgICAgICAgICAgICAgICAke21vZGFsVG9rZW5zLm1vZGFsQm9keVBhZGRpbmd9OiAycmVtO1xuICAgICAgICAgICAgICAgICR7bW9kYWxUb2tlbnMubW9kYWxDb250ZW50UGFkZGluZ306IDAuNjI1cmVtO1xuICAgICAgICAgICAgICAgICR7bW9kYWxUb2tlbnMubW9kYWxDbG9zZUJ1dHRvblJhZGl1c306IDAuMzc1cmVtO1xuICAgICAgICAgICAgICAgICR7bW9kYWxUb2tlbnMubW9kYWxPdXRsaW5lRm9jdXNDb2xvcn06IHZhcigtLXN1cmZhY2UtYWNjZW50KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgfSxcbn07XG4iXX0= */"))
16
16
  }
17
17
  }
18
18
  };
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
3
3
  import type { ComponentProps } from 'react';
4
4
  import type { StoryObj, Meta } from '@storybook/react';
5
5
  import { SSRProvider } from '@salutejs/plasma-core';
6
+ import { disableProps } from '@salutejs/plasma-sb-utils';
6
7
 
7
8
  import { PopupProvider, popupClasses } from '../Popup/Popup';
8
9
  import { Button } from '../Button/Button';
@@ -18,6 +19,7 @@ export default {
18
19
  docs: { story: { inline: false, iframeHeight: '30rem' } },
19
20
  },
20
21
  argTypes: {
22
+ ...disableProps(['hasBody']),
21
23
  placement: {
22
24
  options: [
23
25
  'center',
@@ -75,6 +77,7 @@ type StoryModalProps = ComponentProps<typeof Modal> & {
75
77
  closeOnEsc: boolean;
76
78
  closeOnOverlayClick: boolean;
77
79
  withBlur: boolean;
80
+ hasClose?: boolean;
78
81
  };
79
82
 
80
83
  const StyledButton = styled(Button)`
@@ -135,6 +138,72 @@ const StoryModalDemo = ({ placement, offsetX, offsetY, ...rest }: StoryModalProp
135
138
  const [isOpenB, setIsOpenB] = useState(false);
136
139
  const [isOpenC, setIsOpenC] = useState(false);
137
140
 
141
+ return (
142
+ <SSRProvider>
143
+ <StyledWrapper>
144
+ <PopupProvider>
145
+ <ButtonWrapper>
146
+ <StyledButton text="Открыть A" onClick={() => setIsOpenA(true)} />
147
+ </ButtonWrapper>
148
+ <StyledModal
149
+ id="modalA"
150
+ frame="theme-root"
151
+ withAnimation
152
+ onClose={() => setIsOpenA(false)}
153
+ opened={isOpenA}
154
+ placement={placement}
155
+ offset={[offsetX, offsetY]}
156
+ hasBody
157
+ {...rest}
158
+ >
159
+ <Button onClick={() => setIsOpenA(false)}>Close</Button>
160
+ <ButtonWrapper>
161
+ <StyledButton text="Открыть B" onClick={() => setIsOpenB(true)} />
162
+ </ButtonWrapper>
163
+ <Modal
164
+ id="modalB"
165
+ frame="theme-root"
166
+ onClose={() => setIsOpenB(false)}
167
+ opened={isOpenB}
168
+ placement="left"
169
+ offset={[offsetX, offsetY]}
170
+ hasBody
171
+ {...rest}
172
+ >
173
+ <Button style={{ marginRight: '1rem' }} onClick={() => setIsOpenB(false)}>
174
+ Close
175
+ </Button>
176
+ <ButtonWrapper>
177
+ <StyledButton text="Открыть C" onClick={() => setIsOpenC(true)} />
178
+ </ButtonWrapper>
179
+ <Modal
180
+ id="modalC"
181
+ frame="theme-root"
182
+ onClose={() => setIsOpenC(false)}
183
+ opened={isOpenC}
184
+ placement="top"
185
+ offset={[offsetX, offsetY]}
186
+ hasBody
187
+ {...rest}
188
+ >
189
+ <Button style={{ marginRight: '1rem' }} onClick={() => setIsOpenC(false)}>
190
+ Close
191
+ </Button>
192
+ <>Content</>
193
+ </Modal>
194
+ </Modal>
195
+ </StyledModal>
196
+ </PopupProvider>
197
+ </StyledWrapper>
198
+ </SSRProvider>
199
+ );
200
+ };
201
+
202
+ const StoryCustomModalDemo = ({ placement, offsetX, offsetY, ...rest }: StoryModalProps) => {
203
+ const [isOpenA, setIsOpenA] = useState(false);
204
+ const [isOpenB, setIsOpenB] = useState(false);
205
+ const [isOpenC, setIsOpenC] = useState(false);
206
+
138
207
  return (
139
208
  <SSRProvider>
140
209
  <StyledWrapper>
@@ -199,7 +268,7 @@ const StoryModalDemo = ({ placement, offsetX, offsetY, ...rest }: StoryModalProp
199
268
  );
200
269
  };
201
270
 
202
- export const ModalDemo: StoryObj<StoryModalProps> = {
271
+ export const Default: StoryObj<StoryModalProps> = {
203
272
  args: {
204
273
  placement: 'center',
205
274
  withBlur: false,
@@ -207,10 +276,30 @@ export const ModalDemo: StoryObj<StoryModalProps> = {
207
276
  closeOnOverlayClick: true,
208
277
  offsetX: 0,
209
278
  offsetY: 0,
279
+ hasClose: true,
280
+ },
281
+ argTypes: {
282
+ hasClose: {
283
+ control: {
284
+ type: 'boolean',
285
+ },
286
+ },
210
287
  },
211
288
  render: (args) => <StoryModalDemo {...args} />,
212
289
  };
213
290
 
291
+ export const CustomModalDemo: StoryObj<StoryModalProps> = {
292
+ args: {
293
+ placement: 'center',
294
+ withBlur: false,
295
+ closeOnEsc: true,
296
+ closeOnOverlayClick: true,
297
+ offsetX: 0,
298
+ offsetY: 0,
299
+ },
300
+ render: (args) => <StoryCustomModalDemo {...args} />,
301
+ };
302
+
214
303
  const StyledModalAnimation = styled(Modal)`
215
304
  /* stylelint-disable */
216
305
  && .${popupClasses.root} {