@alfalab/core-components-bottom-sheet 2.0.1 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,76 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@2.1.1...@alfalab/core-components-bottom-sheet@3.0.0) (2021-11-26)
7
+
8
+
9
+ ### Features
10
+
11
+ * **button:** добавлена кнопка размера 40px, изменены скругления ([#886](https://github.com/alfa-laboratory/core-components/issues/886)) ([88e657a](https://github.com/alfa-laboratory/core-components/commit/88e657a9f0f68b8b58f6e9437053954ee984f83c)), closes [#890](https://github.com/alfa-laboratory/core-components/issues/890)
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **button:** Кнопка размера xs теперь имеет размер 40px. Тем, кто использовал размер xs, надо
17
+ заменить размер на xxs. Можно воспользоваться codemod.
18
+
19
+ * feat(codemod): add button xs to xxs transformer
20
+
21
+ * feat(tag): добавлен тэг размера 40px, изменены отступы
22
+
23
+ Добавлен тэг размером 40px, изменены отступы. Тем, кто использовал размер xs, надо заменить размер
24
+ на xxs.
25
+ * **button:** Тэг размера xs теперь имеет размер 40px. Тем, кто использовал размер xs, надо
26
+ заменить размер на xxs. Можно воспользоваться codemod.
27
+
28
+ * test: update screenshots
29
+
30
+ * test: update screenshots
31
+
32
+ * feat(button): linter fix
33
+
34
+ * feat(button): fix min-width
35
+
36
+ * feat(tag): remove vertical paddings
37
+
38
+ * feat(tag): remove vertical paddings
39
+
40
+ * feat(button): updates
41
+
42
+
43
+
44
+
45
+
46
+ ## [2.1.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@2.1.0...@alfalab/core-components-bottom-sheet@2.1.1) (2021-09-14)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * **base-modal:** modal scroll ([#820](https://github.com/alfa-laboratory/core-components/issues/820)) ([1b2d94a](https://github.com/alfa-laboratory/core-components/commit/1b2d94ad45e04145bf1292d749ae2028702dc622))
52
+
53
+
54
+
55
+
56
+
57
+ # [2.1.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@2.0.2...@alfalab/core-components-bottom-sheet@2.1.0) (2021-07-23)
58
+
59
+
60
+ ### Features
61
+
62
+ * **bottom-sheet:** fix marker gap, fix animation duration ([#750](https://github.com/alfa-laboratory/core-components/issues/750)) ([cb04ed8](https://github.com/alfa-laboratory/core-components/commit/cb04ed8cc214fac9dba32a0ab39a4399743d5bfc))
63
+
64
+
65
+
66
+
67
+
68
+ ## [2.0.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@2.0.1...@alfalab/core-components-bottom-sheet@2.0.2) (2021-07-19)
69
+
70
+ **Note:** Version bump only for package @alfalab/core-components-bottom-sheet
71
+
72
+
73
+
74
+
75
+
6
76
  ## [2.0.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@2.0.0...@alfalab/core-components-bottom-sheet@2.0.1) (2021-07-09)
7
77
 
8
78
  **Note:** Version bump only for package @alfalab/core-components-bottom-sheet
@@ -47,11 +47,8 @@ function __rest(s, e) {
47
47
  }
48
48
 
49
49
  var SwipeableBackdrop = function (_a) {
50
- var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout"]);
51
- return (React__default['default'].createElement("div", exports.__assign({}, handlers, { style: {
52
- opacity: opacity,
53
- transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '',
54
- } }),
50
+ var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, style = _a.style, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout", "style"]);
51
+ return (React__default['default'].createElement("div", exports.__assign({}, handlers, { style: exports.__assign({ opacity: opacity, transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '', position: 'relative' }, style) }),
55
52
  React__default['default'].createElement(coreComponentsBackdrop.Backdrop, exports.__assign({}, backdropProps))));
56
53
  };
57
54
 
package/dist/component.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_swipeableBackdrop_Component = require('./Component-13357572.js');
5
+ var components_swipeableBackdrop_Component = require('./Component-e3bb3949.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var reactSwipeable = require('react-swipeable');
@@ -16,7 +16,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
16
16
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
17
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
18
18
 
19
- var styles = {"modal":"bottom-sheet__modal_1kio3","component":"bottom-sheet__component_1kio3","withTransition":"bottom-sheet__withTransition_1kio3","marker":"bottom-sheet__marker_1kio3","scrollableContainer":"bottom-sheet__scrollableContainer_1kio3","withPadding":"bottom-sheet__withPadding_1kio3","content":"bottom-sheet__content_1kio3","title":"bottom-sheet__title_1kio3","scrollLocked":"bottom-sheet__scrollLocked_1kio3","appear":"bottom-sheet__appear_1kio3","enter":"bottom-sheet__enter_1kio3","appearActive":"bottom-sheet__appearActive_1kio3","enterActive":"bottom-sheet__enterActive_1kio3","enterDone":"bottom-sheet__enterDone_1kio3","appearDone":"bottom-sheet__appearDone_1kio3","exit":"bottom-sheet__exit_1kio3","exitActive":"bottom-sheet__exitActive_1kio3"};
19
+ var styles = {"modal":"bottom-sheet__modal_p2g7f","component":"bottom-sheet__component_p2g7f","withTransition":"bottom-sheet__withTransition_p2g7f","marker":"bottom-sheet__marker_p2g7f","scrollableContainer":"bottom-sheet__scrollableContainer_p2g7f","withPadding":"bottom-sheet__withPadding_p2g7f","content":"bottom-sheet__content_p2g7f","title":"bottom-sheet__title_p2g7f","scrollLocked":"bottom-sheet__scrollLocked_p2g7f","appear":"bottom-sheet__appear_p2g7f","enter":"bottom-sheet__enter_p2g7f","appearActive":"bottom-sheet__appearActive_p2g7f","enterActive":"bottom-sheet__enterActive_p2g7f","enterDone":"bottom-sheet__enterDone_p2g7f","appearDone":"bottom-sheet__appearDone_p2g7f","exit":"bottom-sheet__exit_p2g7f","exitActive":"bottom-sheet__exitActive_p2g7f"};
20
20
  require('./index.css')
21
21
 
22
22
  var TIMEOUT = 300;
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
13
13
 
14
- var styles = {"footer":"bottom-sheet__footer_qx44t","highlighted":"bottom-sheet__highlighted_qx44t"};
14
+ var styles = {"footer":"bottom-sheet__footer_dbwxf","highlighted":"bottom-sheet__highlighted_dbwxf"};
15
15
  require('./index.css')
16
16
 
17
17
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: qx44t */
1
+ /* hash: 18aaf */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -15,12 +15,12 @@
15
15
  --gap-m: 16px;
16
16
  --gap-3xl: 40px;
17
17
  }
18
- .bottom-sheet__footer_qx44t {
18
+ .bottom-sheet__footer_dbwxf {
19
19
  position: sticky;
20
20
  bottom: 0;
21
21
  padding: var(--gap-m) var(--gap-m) var(--gap-3xl);
22
22
  background-color: var(--color-light-bg-primary);
23
23
  }
24
- .bottom-sheet__highlighted_qx44t {
24
+ .bottom-sheet__highlighted_dbwxf {
25
25
  box-shadow: var(--shadow-s-up);
26
26
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_swipeableBackdrop_Component = require('../../Component-13357572.js');
5
+ var components_swipeableBackdrop_Component = require('../../Component-e3bb3949.js');
6
6
  require('react');
7
7
  require('@alfalab/core-components-backdrop');
8
8
 
@@ -47,11 +47,8 @@ function __rest(s, e) {
47
47
  }
48
48
 
49
49
  var SwipeableBackdrop = function (_a) {
50
- var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout"]);
51
- return (React__default['default'].createElement("div", exports.__assign({}, handlers, { style: {
52
- opacity: opacity,
53
- transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '',
54
- } }),
50
+ var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, style = _a.style, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout", "style"]);
51
+ return (React__default['default'].createElement("div", exports.__assign({}, handlers, { style: exports.__assign({ opacity: opacity, transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '', position: 'relative' }, style) }),
55
52
  React__default['default'].createElement(coreComponentsBackdrop.Backdrop, exports.__assign({}, backdropProps))));
56
53
  };
57
54
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_swipeableBackdrop_Component = require('./Component-3a3629ef.js');
5
+ var components_swipeableBackdrop_Component = require('./Component-24200d96.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var reactSwipeable = require('react-swipeable');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_swipeableBackdrop_Component = require('../../Component-3a3629ef.js');
5
+ var components_swipeableBackdrop_Component = require('../../Component-24200d96.js');
6
6
  require('react');
7
7
  require('@alfalab/core-components-backdrop/dist/cssm');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./Component-3a3629ef.js');
5
+ require('./Component-24200d96.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('react-swipeable');
@@ -12,13 +12,13 @@
12
12
  /* Hard up */
13
13
  }
14
14
  :root {
15
- --gap-2xs: 4px;
15
+ --gap-xs: 8px;
16
16
  --gap-m: 16px;
17
17
  --gap-xl: 24px;
18
18
  --gap-2xl: 32px;
19
19
  }
20
20
  :root {
21
- --bottom-sheet-in-transition: 0.7s cubic-bezier(0.09, 0.91, 0.18, 0.99);
21
+ --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
22
22
  --bottom-sheet-out-transition: 0.3s ease;
23
23
  }
24
24
  .modal {
@@ -43,7 +43,7 @@
43
43
  }
44
44
  .marker {
45
45
  position: absolute;
46
- top: var(--gap-2xs);
46
+ top: var(--gap-xs);
47
47
  left: 50%;
48
48
  width: 36px;
49
49
  height: 4px;
@@ -41,11 +41,8 @@ function __rest(s, e) {
41
41
  }
42
42
 
43
43
  var SwipeableBackdrop = function (_a) {
44
- var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout"]);
45
- return (React.createElement("div", __assign({}, handlers, { style: {
46
- opacity: opacity,
47
- transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '',
48
- } }),
44
+ var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, style = _a.style, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout", "style"]);
45
+ return (React.createElement("div", __assign({}, handlers, { style: __assign({ opacity: opacity, transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '', position: 'relative' }, style) }),
49
46
  React.createElement(Backdrop, __assign({}, backdropProps))));
50
47
  };
51
48
 
@@ -1,4 +1,4 @@
1
- import { S as SwipeableBackdrop, _ as __assign } from './Component-ac22cf12.js';
1
+ import { S as SwipeableBackdrop, _ as __assign } from './Component-949ec7bb.js';
2
2
  import React, { forwardRef, useState, useRef, useCallback, useEffect } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { useSwipeable } from 'react-swipeable';
@@ -7,7 +7,7 @@ import { Typography } from '@alfalab/core-components-typography/dist/esm';
7
7
  import { Footer } from './components/footer/Component.js';
8
8
  import '@alfalab/core-components-backdrop/dist/esm';
9
9
 
10
- var styles = {"modal":"bottom-sheet__modal_1kio3","component":"bottom-sheet__component_1kio3","withTransition":"bottom-sheet__withTransition_1kio3","marker":"bottom-sheet__marker_1kio3","scrollableContainer":"bottom-sheet__scrollableContainer_1kio3","withPadding":"bottom-sheet__withPadding_1kio3","content":"bottom-sheet__content_1kio3","title":"bottom-sheet__title_1kio3","scrollLocked":"bottom-sheet__scrollLocked_1kio3","appear":"bottom-sheet__appear_1kio3","enter":"bottom-sheet__enter_1kio3","appearActive":"bottom-sheet__appearActive_1kio3","enterActive":"bottom-sheet__enterActive_1kio3","enterDone":"bottom-sheet__enterDone_1kio3","appearDone":"bottom-sheet__appearDone_1kio3","exit":"bottom-sheet__exit_1kio3","exitActive":"bottom-sheet__exitActive_1kio3"};
10
+ var styles = {"modal":"bottom-sheet__modal_p2g7f","component":"bottom-sheet__component_p2g7f","withTransition":"bottom-sheet__withTransition_p2g7f","marker":"bottom-sheet__marker_p2g7f","scrollableContainer":"bottom-sheet__scrollableContainer_p2g7f","withPadding":"bottom-sheet__withPadding_p2g7f","content":"bottom-sheet__content_p2g7f","title":"bottom-sheet__title_p2g7f","scrollLocked":"bottom-sheet__scrollLocked_p2g7f","appear":"bottom-sheet__appear_p2g7f","enter":"bottom-sheet__enter_p2g7f","appearActive":"bottom-sheet__appearActive_p2g7f","enterActive":"bottom-sheet__enterActive_p2g7f","enterDone":"bottom-sheet__enterDone_p2g7f","appearDone":"bottom-sheet__appearDone_p2g7f","exit":"bottom-sheet__exit_p2g7f","exitActive":"bottom-sheet__exitActive_p2g7f"};
11
11
  require('./index.css')
12
12
 
13
13
  var TIMEOUT = 300;
@@ -2,7 +2,7 @@ import React, { useContext, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { BaseModalContext } from '@alfalab/core-components-base-modal/dist/esm';
4
4
 
5
- var styles = {"footer":"bottom-sheet__footer_qx44t","highlighted":"bottom-sheet__highlighted_qx44t"};
5
+ var styles = {"footer":"bottom-sheet__footer_dbwxf","highlighted":"bottom-sheet__highlighted_dbwxf"};
6
6
  require('./index.css')
7
7
 
8
8
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: qx44t */
1
+ /* hash: 18aaf */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -15,12 +15,12 @@
15
15
  --gap-m: 16px;
16
16
  --gap-3xl: 40px;
17
17
  }
18
- .bottom-sheet__footer_qx44t {
18
+ .bottom-sheet__footer_dbwxf {
19
19
  position: sticky;
20
20
  bottom: 0;
21
21
  padding: var(--gap-m) var(--gap-m) var(--gap-3xl);
22
22
  background-color: var(--color-light-bg-primary);
23
23
  }
24
- .bottom-sheet__highlighted_qx44t {
24
+ .bottom-sheet__highlighted_dbwxf {
25
25
  box-shadow: var(--shadow-s-up);
26
26
  }
@@ -1,3 +1,3 @@
1
- export { S as SwipeableBackdrop } from '../../Component-ac22cf12.js';
1
+ export { S as SwipeableBackdrop } from '../../Component-949ec7bb.js';
2
2
  import 'react';
3
3
  import '@alfalab/core-components-backdrop/dist/esm';
@@ -1,4 +1,4 @@
1
- /* hash: 1kio3 */
1
+ /* hash: 1bvaw */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-graphic-neutral: #dbdee1;
@@ -13,23 +13,23 @@
13
13
  /* Hard up */
14
14
  }
15
15
  :root {
16
- --gap-2xs: 4px;
16
+ --gap-xs: 8px;
17
17
  --gap-m: 16px;
18
18
  --gap-xl: 24px;
19
19
  --gap-2xl: 32px;
20
20
  }
21
21
  :root {
22
- --bottom-sheet-in-transition: 0.7s cubic-bezier(0.09, 0.91, 0.18, 0.99);
22
+ --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
23
23
  --bottom-sheet-out-transition: 0.3s ease;
24
24
  }
25
- .bottom-sheet__modal_1kio3 {
25
+ .bottom-sheet__modal_p2g7f {
26
26
  background-color: transparent;
27
27
  position: fixed;
28
28
  bottom: 0;
29
29
  width: 100%;
30
30
  max-width: 600px;
31
31
  }
32
- .bottom-sheet__component_1kio3 {
32
+ .bottom-sheet__component_p2g7f {
33
33
  position: relative;
34
34
  display: flex;
35
35
  flex-direction: column;
@@ -39,12 +39,12 @@
39
39
  background: var(--color-light-bg-primary);
40
40
  transform: translateY(100%);
41
41
  }
42
- .bottom-sheet__withTransition_1kio3 {
42
+ .bottom-sheet__withTransition_p2g7f {
43
43
  transition: var(--bottom-sheet-out-transition);
44
44
  }
45
- .bottom-sheet__marker_1kio3 {
45
+ .bottom-sheet__marker_p2g7f {
46
46
  position: absolute;
47
- top: var(--gap-2xs);
47
+ top: var(--gap-xs);
48
48
  left: 50%;
49
49
  width: 36px;
50
50
  height: 4px;
@@ -52,41 +52,41 @@
52
52
  transform: translateX(-50%);
53
53
  background-color: var(--color-light-graphic-neutral);
54
54
  }
55
- .bottom-sheet__scrollableContainer_1kio3 {
55
+ .bottom-sheet__scrollableContainer_p2g7f {
56
56
  overflow: auto;
57
57
  padding-top: var(--gap-2xl);
58
58
  }
59
- .bottom-sheet__withPadding_1kio3 {
59
+ .bottom-sheet__withPadding_p2g7f {
60
60
  padding-bottom: var(--gap-xl);
61
61
  }
62
- .bottom-sheet__content_1kio3 {
62
+ .bottom-sheet__content_p2g7f {
63
63
  display: flex;
64
64
  flex-direction: column;
65
65
  flex: 1;
66
66
  padding: 0 var(--gap-m) var(--gap-m);
67
67
  color: var(--color-light-text-primary);
68
68
  }
69
- .bottom-sheet__title_1kio3 {
69
+ .bottom-sheet__title_p2g7f {
70
70
  margin-bottom: var(--gap-xl);
71
71
  padding: 0 var(--gap-m);
72
72
  }
73
- .bottom-sheet__scrollLocked_1kio3 {
73
+ .bottom-sheet__scrollLocked_p2g7f {
74
74
  overflow: hidden;
75
75
  }
76
- .bottom-sheet__appear_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__enter_1kio3 .bottom-sheet__component_1kio3 {
76
+ .bottom-sheet__appear_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__enter_p2g7f .bottom-sheet__component_p2g7f {
77
77
  transition: none;
78
78
  }
79
- .bottom-sheet__appearActive_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__enterActive_1kio3 .bottom-sheet__component_1kio3 {
79
+ .bottom-sheet__appearActive_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__enterActive_p2g7f .bottom-sheet__component_p2g7f {
80
80
  transition: var(--bottom-sheet-in-transition);
81
81
  transform: translateY(0);
82
82
  }
83
- .bottom-sheet__enterDone_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__appearDone_1kio3 .bottom-sheet__component_1kio3 {
83
+ .bottom-sheet__enterDone_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__appearDone_p2g7f .bottom-sheet__component_p2g7f {
84
84
  transform: translateY(0);
85
85
  }
86
- .bottom-sheet__exit_1kio3 .bottom-sheet__component_1kio3 {
86
+ .bottom-sheet__exit_p2g7f .bottom-sheet__component_p2g7f {
87
87
  transform: translateY(0);
88
88
  }
89
- .bottom-sheet__exitActive_1kio3 .bottom-sheet__component_1kio3 {
89
+ .bottom-sheet__exitActive_p2g7f .bottom-sheet__component_p2g7f {
90
90
  transition: var(--bottom-sheet-out-transition);
91
91
  transform: translateY(100%);
92
92
  }
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './Component-ac22cf12.js';
1
+ import './Component-949ec7bb.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-swipeable';
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1kio3 */
1
+ /* hash: 1bvaw */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-graphic-neutral: #dbdee1;
@@ -13,23 +13,23 @@
13
13
  /* Hard up */
14
14
  }
15
15
  :root {
16
- --gap-2xs: 4px;
16
+ --gap-xs: 8px;
17
17
  --gap-m: 16px;
18
18
  --gap-xl: 24px;
19
19
  --gap-2xl: 32px;
20
20
  }
21
21
  :root {
22
- --bottom-sheet-in-transition: 0.7s cubic-bezier(0.09, 0.91, 0.18, 0.99);
22
+ --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
23
23
  --bottom-sheet-out-transition: 0.3s ease;
24
24
  }
25
- .bottom-sheet__modal_1kio3 {
25
+ .bottom-sheet__modal_p2g7f {
26
26
  background-color: transparent;
27
27
  position: fixed;
28
28
  bottom: 0;
29
29
  width: 100%;
30
30
  max-width: 600px;
31
31
  }
32
- .bottom-sheet__component_1kio3 {
32
+ .bottom-sheet__component_p2g7f {
33
33
  position: relative;
34
34
  display: flex;
35
35
  flex-direction: column;
@@ -39,12 +39,12 @@
39
39
  background: var(--color-light-bg-primary);
40
40
  transform: translateY(100%);
41
41
  }
42
- .bottom-sheet__withTransition_1kio3 {
42
+ .bottom-sheet__withTransition_p2g7f {
43
43
  transition: var(--bottom-sheet-out-transition);
44
44
  }
45
- .bottom-sheet__marker_1kio3 {
45
+ .bottom-sheet__marker_p2g7f {
46
46
  position: absolute;
47
- top: var(--gap-2xs);
47
+ top: var(--gap-xs);
48
48
  left: 50%;
49
49
  width: 36px;
50
50
  height: 4px;
@@ -52,41 +52,41 @@
52
52
  transform: translateX(-50%);
53
53
  background-color: var(--color-light-graphic-neutral);
54
54
  }
55
- .bottom-sheet__scrollableContainer_1kio3 {
55
+ .bottom-sheet__scrollableContainer_p2g7f {
56
56
  overflow: auto;
57
57
  padding-top: var(--gap-2xl);
58
58
  }
59
- .bottom-sheet__withPadding_1kio3 {
59
+ .bottom-sheet__withPadding_p2g7f {
60
60
  padding-bottom: var(--gap-xl);
61
61
  }
62
- .bottom-sheet__content_1kio3 {
62
+ .bottom-sheet__content_p2g7f {
63
63
  display: flex;
64
64
  flex-direction: column;
65
65
  flex: 1;
66
66
  padding: 0 var(--gap-m) var(--gap-m);
67
67
  color: var(--color-light-text-primary);
68
68
  }
69
- .bottom-sheet__title_1kio3 {
69
+ .bottom-sheet__title_p2g7f {
70
70
  margin-bottom: var(--gap-xl);
71
71
  padding: 0 var(--gap-m);
72
72
  }
73
- .bottom-sheet__scrollLocked_1kio3 {
73
+ .bottom-sheet__scrollLocked_p2g7f {
74
74
  overflow: hidden;
75
75
  }
76
- .bottom-sheet__appear_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__enter_1kio3 .bottom-sheet__component_1kio3 {
76
+ .bottom-sheet__appear_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__enter_p2g7f .bottom-sheet__component_p2g7f {
77
77
  transition: none;
78
78
  }
79
- .bottom-sheet__appearActive_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__enterActive_1kio3 .bottom-sheet__component_1kio3 {
79
+ .bottom-sheet__appearActive_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__enterActive_p2g7f .bottom-sheet__component_p2g7f {
80
80
  transition: var(--bottom-sheet-in-transition);
81
81
  transform: translateY(0);
82
82
  }
83
- .bottom-sheet__enterDone_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__appearDone_1kio3 .bottom-sheet__component_1kio3 {
83
+ .bottom-sheet__enterDone_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__appearDone_p2g7f .bottom-sheet__component_p2g7f {
84
84
  transform: translateY(0);
85
85
  }
86
- .bottom-sheet__exit_1kio3 .bottom-sheet__component_1kio3 {
86
+ .bottom-sheet__exit_p2g7f .bottom-sheet__component_p2g7f {
87
87
  transform: translateY(0);
88
88
  }
89
- .bottom-sheet__exitActive_1kio3 .bottom-sheet__component_1kio3 {
89
+ .bottom-sheet__exitActive_p2g7f .bottom-sheet__component_p2g7f {
90
90
  transition: var(--bottom-sheet-out-transition);
91
91
  transform: translateY(100%);
92
92
  }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./Component-13357572.js');
5
+ require('./Component-e3bb3949.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('react-swipeable');
@@ -7,7 +7,7 @@ import { Footer } from './components/footer/Component.js';
7
7
  import '@alfalab/core-components-backdrop/dist/modern';
8
8
  import { SwipeableBackdrop } from './components/swipeable-backdrop/Component.js';
9
9
 
10
- var styles = {"modal":"bottom-sheet__modal_1kio3","component":"bottom-sheet__component_1kio3","withTransition":"bottom-sheet__withTransition_1kio3","marker":"bottom-sheet__marker_1kio3","scrollableContainer":"bottom-sheet__scrollableContainer_1kio3","withPadding":"bottom-sheet__withPadding_1kio3","content":"bottom-sheet__content_1kio3","title":"bottom-sheet__title_1kio3","scrollLocked":"bottom-sheet__scrollLocked_1kio3","appear":"bottom-sheet__appear_1kio3","enter":"bottom-sheet__enter_1kio3","appearActive":"bottom-sheet__appearActive_1kio3","enterActive":"bottom-sheet__enterActive_1kio3","enterDone":"bottom-sheet__enterDone_1kio3","appearDone":"bottom-sheet__appearDone_1kio3","exit":"bottom-sheet__exit_1kio3","exitActive":"bottom-sheet__exitActive_1kio3"};
10
+ var styles = {"modal":"bottom-sheet__modal_p2g7f","component":"bottom-sheet__component_p2g7f","withTransition":"bottom-sheet__withTransition_p2g7f","marker":"bottom-sheet__marker_p2g7f","scrollableContainer":"bottom-sheet__scrollableContainer_p2g7f","withPadding":"bottom-sheet__withPadding_p2g7f","content":"bottom-sheet__content_p2g7f","title":"bottom-sheet__title_p2g7f","scrollLocked":"bottom-sheet__scrollLocked_p2g7f","appear":"bottom-sheet__appear_p2g7f","enter":"bottom-sheet__enter_p2g7f","appearActive":"bottom-sheet__appearActive_p2g7f","enterActive":"bottom-sheet__enterActive_p2g7f","enterDone":"bottom-sheet__enterDone_p2g7f","appearDone":"bottom-sheet__appearDone_p2g7f","exit":"bottom-sheet__exit_p2g7f","exitActive":"bottom-sheet__exitActive_p2g7f"};
11
11
  require('./index.css')
12
12
 
13
13
  const TIMEOUT = 300;
@@ -2,7 +2,7 @@ import React, { useContext, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { BaseModalContext } from '@alfalab/core-components-base-modal/dist/modern';
4
4
 
5
- var styles = {"footer":"bottom-sheet__footer_qx44t","highlighted":"bottom-sheet__highlighted_qx44t"};
5
+ var styles = {"footer":"bottom-sheet__footer_dbwxf","highlighted":"bottom-sheet__highlighted_dbwxf"};
6
6
  require('./index.css')
7
7
 
8
8
  const Footer = ({ children, className }) => {
@@ -1,4 +1,4 @@
1
- /* hash: qx44t */
1
+ /* hash: 18aaf */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -15,12 +15,12 @@
15
15
  --gap-m: 16px;
16
16
  --gap-3xl: 40px;
17
17
  }
18
- .bottom-sheet__footer_qx44t {
18
+ .bottom-sheet__footer_dbwxf {
19
19
  position: sticky;
20
20
  bottom: 0;
21
21
  padding: var(--gap-m) var(--gap-m) var(--gap-3xl);
22
22
  background-color: var(--color-light-bg-primary);
23
23
  }
24
- .bottom-sheet__highlighted_qx44t {
24
+ .bottom-sheet__highlighted_dbwxf {
25
25
  box-shadow: var(--shadow-s-up);
26
26
  }
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Backdrop } from '@alfalab/core-components-backdrop/dist/modern';
3
3
 
4
- const SwipeableBackdrop = ({ opacity, handlers, opacityTimeout, ...backdropProps }) => (React.createElement("div", Object.assign({}, handlers, { style: {
4
+ const SwipeableBackdrop = ({ opacity, handlers, opacityTimeout, style, ...backdropProps }) => (React.createElement("div", Object.assign({}, handlers, { style: {
5
5
  opacity,
6
6
  transition: opacity === 1 ? `opacity ${opacityTimeout}ms ease-in-out` : '',
7
+ position: 'relative',
8
+ ...style,
7
9
  } }),
8
10
  React.createElement(Backdrop, Object.assign({}, backdropProps))));
9
11
 
@@ -1,4 +1,4 @@
1
- /* hash: 1kio3 */
1
+ /* hash: 1bvaw */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-graphic-neutral: #dbdee1;
@@ -13,23 +13,23 @@
13
13
  /* Hard up */
14
14
  }
15
15
  :root {
16
- --gap-2xs: 4px;
16
+ --gap-xs: 8px;
17
17
  --gap-m: 16px;
18
18
  --gap-xl: 24px;
19
19
  --gap-2xl: 32px;
20
20
  }
21
21
  :root {
22
- --bottom-sheet-in-transition: 0.7s cubic-bezier(0.09, 0.91, 0.18, 0.99);
22
+ --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
23
23
  --bottom-sheet-out-transition: 0.3s ease;
24
24
  }
25
- .bottom-sheet__modal_1kio3 {
25
+ .bottom-sheet__modal_p2g7f {
26
26
  background-color: transparent;
27
27
  position: fixed;
28
28
  bottom: 0;
29
29
  width: 100%;
30
30
  max-width: 600px;
31
31
  }
32
- .bottom-sheet__component_1kio3 {
32
+ .bottom-sheet__component_p2g7f {
33
33
  position: relative;
34
34
  display: flex;
35
35
  flex-direction: column;
@@ -39,12 +39,12 @@
39
39
  background: var(--color-light-bg-primary);
40
40
  transform: translateY(100%);
41
41
  }
42
- .bottom-sheet__withTransition_1kio3 {
42
+ .bottom-sheet__withTransition_p2g7f {
43
43
  transition: var(--bottom-sheet-out-transition);
44
44
  }
45
- .bottom-sheet__marker_1kio3 {
45
+ .bottom-sheet__marker_p2g7f {
46
46
  position: absolute;
47
- top: var(--gap-2xs);
47
+ top: var(--gap-xs);
48
48
  left: 50%;
49
49
  width: 36px;
50
50
  height: 4px;
@@ -52,41 +52,41 @@
52
52
  transform: translateX(-50%);
53
53
  background-color: var(--color-light-graphic-neutral);
54
54
  }
55
- .bottom-sheet__scrollableContainer_1kio3 {
55
+ .bottom-sheet__scrollableContainer_p2g7f {
56
56
  overflow: auto;
57
57
  padding-top: var(--gap-2xl);
58
58
  }
59
- .bottom-sheet__withPadding_1kio3 {
59
+ .bottom-sheet__withPadding_p2g7f {
60
60
  padding-bottom: var(--gap-xl);
61
61
  }
62
- .bottom-sheet__content_1kio3 {
62
+ .bottom-sheet__content_p2g7f {
63
63
  display: flex;
64
64
  flex-direction: column;
65
65
  flex: 1;
66
66
  padding: 0 var(--gap-m) var(--gap-m);
67
67
  color: var(--color-light-text-primary);
68
68
  }
69
- .bottom-sheet__title_1kio3 {
69
+ .bottom-sheet__title_p2g7f {
70
70
  margin-bottom: var(--gap-xl);
71
71
  padding: 0 var(--gap-m);
72
72
  }
73
- .bottom-sheet__scrollLocked_1kio3 {
73
+ .bottom-sheet__scrollLocked_p2g7f {
74
74
  overflow: hidden;
75
75
  }
76
- .bottom-sheet__appear_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__enter_1kio3 .bottom-sheet__component_1kio3 {
76
+ .bottom-sheet__appear_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__enter_p2g7f .bottom-sheet__component_p2g7f {
77
77
  transition: none;
78
78
  }
79
- .bottom-sheet__appearActive_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__enterActive_1kio3 .bottom-sheet__component_1kio3 {
79
+ .bottom-sheet__appearActive_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__enterActive_p2g7f .bottom-sheet__component_p2g7f {
80
80
  transition: var(--bottom-sheet-in-transition);
81
81
  transform: translateY(0);
82
82
  }
83
- .bottom-sheet__enterDone_1kio3 .bottom-sheet__component_1kio3, .bottom-sheet__appearDone_1kio3 .bottom-sheet__component_1kio3 {
83
+ .bottom-sheet__enterDone_p2g7f .bottom-sheet__component_p2g7f, .bottom-sheet__appearDone_p2g7f .bottom-sheet__component_p2g7f {
84
84
  transform: translateY(0);
85
85
  }
86
- .bottom-sheet__exit_1kio3 .bottom-sheet__component_1kio3 {
86
+ .bottom-sheet__exit_p2g7f .bottom-sheet__component_p2g7f {
87
87
  transform: translateY(0);
88
88
  }
89
- .bottom-sheet__exitActive_1kio3 .bottom-sheet__component_1kio3 {
89
+ .bottom-sheet__exitActive_p2g7f .bottom-sheet__component_p2g7f {
90
90
  transition: var(--bottom-sheet-out-transition);
91
91
  transform: translateY(100%);
92
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-bottom-sheet",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "Bottom sheet mobile component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -21,11 +21,11 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@alfalab/core-components-backdrop": "^2.0.1",
24
- "@alfalab/core-components-base-modal": "^3.0.1",
25
- "@alfalab/core-components-typography": "^2.0.1",
24
+ "@alfalab/core-components-base-modal": "^3.0.2",
25
+ "@alfalab/core-components-typography": "^2.2.0",
26
26
  "classnames": "^2.2.6",
27
27
  "react-swipeable": "^5.5.0",
28
28
  "react-transition-group": "^4.3.0"
29
29
  },
30
- "gitHead": "0934905ac76c93940e8dd2b0ea9bb3131908ac00"
30
+ "gitHead": "10c9fd1caacf98a5c15f84529889ddf41e9e1b54"
31
31
  }