@alfalab/core-components-bottom-sheet 4.6.2 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/{esm/component-ccb0592e.d.ts → component-90672837.d.ts} +6 -1
  2. package/{component-640abf82.js → component-90672837.js} +14 -8
  3. package/component.js +2 -2
  4. package/components/backer/Component.d.ts +4 -0
  5. package/components/backer/Component.js +4 -4
  6. package/components/backer/index.css +3 -3
  7. package/components/closer/Component.d.ts +4 -0
  8. package/components/closer/Component.js +4 -4
  9. package/components/closer/index.css +3 -3
  10. package/components/footer/Component.js +1 -1
  11. package/components/footer/index.css +4 -4
  12. package/components/header/Component.js +2 -2
  13. package/components/header/index.css +17 -17
  14. package/components/swipeable-backdrop/Component.js +1 -1
  15. package/{component-640abf82.d.ts → cssm/component-c65ae511.d.ts} +6 -1
  16. package/cssm/{component-78755a1d.js → component-c65ae511.js} +11 -5
  17. package/cssm/component.js +1 -1
  18. package/cssm/components/backer/Component.d.ts +4 -0
  19. package/cssm/components/backer/Component.js +2 -2
  20. package/cssm/components/closer/Component.d.ts +4 -0
  21. package/cssm/components/closer/Component.js +2 -2
  22. package/cssm/components/header/Component.js +1 -1
  23. package/cssm/index.d.ts +1 -1
  24. package/cssm/index.js +1 -1
  25. package/{modern/component-1c3da841.d.ts → esm/component-19d1d5d1.d.ts} +6 -1
  26. package/esm/{component-ccb0592e.js → component-19d1d5d1.js} +14 -8
  27. package/esm/component.js +2 -2
  28. package/esm/components/backer/Component.d.ts +4 -0
  29. package/esm/components/backer/Component.js +4 -4
  30. package/esm/components/backer/index.css +3 -3
  31. package/esm/components/closer/Component.d.ts +4 -0
  32. package/esm/components/closer/Component.js +4 -4
  33. package/esm/components/closer/index.css +3 -3
  34. package/esm/components/footer/Component.js +1 -1
  35. package/esm/components/footer/index.css +4 -4
  36. package/esm/components/header/Component.js +2 -2
  37. package/esm/components/header/index.css +17 -17
  38. package/esm/components/swipeable-backdrop/Component.js +1 -1
  39. package/esm/index.css +16 -16
  40. package/esm/index.d.ts +1 -1
  41. package/esm/index.js +2 -2
  42. package/esm/{tslib.es6-7bd2d41b.d.ts → tslib.es6-5b0f031b.d.ts} +0 -0
  43. package/esm/{tslib.es6-7bd2d41b.js → tslib.es6-5b0f031b.js} +0 -0
  44. package/index.css +16 -16
  45. package/index.d.ts +1 -1
  46. package/index.js +2 -2
  47. package/{cssm/component-78755a1d.d.ts → modern/component-5e4ff82e.d.ts} +6 -1
  48. package/modern/{component-1c3da841.js → component-5e4ff82e.js} +14 -8
  49. package/modern/component.js +1 -1
  50. package/modern/components/backer/Component.d.ts +4 -0
  51. package/modern/components/backer/Component.js +3 -3
  52. package/modern/components/backer/index.css +3 -3
  53. package/modern/components/closer/Component.d.ts +4 -0
  54. package/modern/components/closer/Component.js +3 -3
  55. package/modern/components/closer/index.css +3 -3
  56. package/modern/components/footer/Component.js +1 -1
  57. package/modern/components/footer/index.css +4 -4
  58. package/modern/components/header/Component.js +1 -1
  59. package/modern/components/header/index.css +17 -17
  60. package/modern/index.css +16 -16
  61. package/modern/index.d.ts +1 -1
  62. package/modern/index.js +1 -1
  63. package/package.json +8 -8
  64. package/{tslib.es6-fd688139.d.ts → tslib.es6-c03fa1a2.d.ts} +0 -0
  65. package/{tslib.es6-fd688139.js → tslib.es6-c03fa1a2.js} +0 -0
  66. package/CHANGELOG.md +0 -324
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from './tslib.es6-7bd2d41b.js';
1
+ import { _ as __assign } from './tslib.es6-5b0f031b.js';
2
2
  import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { use100vh } from 'react-div-100vh';
@@ -10,12 +10,17 @@ import { Backer } from './components/backer/Component.js';
10
10
  import { Footer } from './components/footer/Component.js';
11
11
  import { SwipeableBackdrop } from './components/swipeable-backdrop/Component.js';
12
12
 
13
- var styles = {"headerWrapper":"bottom-sheet__headerWrapper_1hskz","header":"bottom-sheet__header_1hskz","sticky":"bottom-sheet__sticky_1hskz","highlighted":"bottom-sheet__highlighted_1hskz","justifyEnd":"bottom-sheet__justifyEnd_1hskz","addon":"bottom-sheet__addon_1hskz","addonFixed":"bottom-sheet__addonFixed_1hskz","addonLeft":"bottom-sheet__addonLeft_1hskz","addonRight":"bottom-sheet__addonRight_1hskz","title":"bottom-sheet__title_1hskz","titleCenter":"bottom-sheet__titleCenter_1hskz","titleLeft":"bottom-sheet__titleLeft_1hskz","trimTitle":"bottom-sheet__trimTitle_1hskz","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1hskz","titleIndentRight":"bottom-sheet__titleIndentRight_1hskz","titleIndentLeft":"bottom-sheet__titleIndentLeft_1hskz"};
13
+ var getDataTestId = function (dataTestId, element) {
14
+ var elementPart = element ? "-" + element.toLowerCase() : '';
15
+ return dataTestId ? "" + dataTestId + elementPart : undefined;
16
+ };
17
+
18
+ var styles = {"headerWrapper":"bottom-sheet__headerWrapper_18fxg","header":"bottom-sheet__header_18fxg","sticky":"bottom-sheet__sticky_18fxg","highlighted":"bottom-sheet__highlighted_18fxg","justifyEnd":"bottom-sheet__justifyEnd_18fxg","addon":"bottom-sheet__addon_18fxg","addonFixed":"bottom-sheet__addonFixed_18fxg","addonLeft":"bottom-sheet__addonLeft_18fxg","addonRight":"bottom-sheet__addonRight_18fxg","title":"bottom-sheet__title_18fxg","titleCenter":"bottom-sheet__titleCenter_18fxg","titleLeft":"bottom-sheet__titleLeft_18fxg","trimTitle":"bottom-sheet__trimTitle_18fxg","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_18fxg","titleIndentRight":"bottom-sheet__titleIndentRight_18fxg","titleIndentLeft":"bottom-sheet__titleIndentLeft_18fxg"};
14
19
  require('./components/header/index.css')
15
20
 
16
21
  var Header = function (_a) {
17
22
  var _b, _c, _d, _e, _f;
18
- var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
23
+ var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, dataTestId = _a.dataTestId, onBack = _a.onBack;
19
24
  var _g = useContext(BaseModalContext), headerHighlighted = _g.headerHighlighted, setHasHeader = _g.setHasHeader, setHeaderOffset = _g.setHeaderOffset;
20
25
  var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
21
26
  var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
@@ -40,27 +45,27 @@ var Header = function (_a) {
40
45
  return (React.createElement("div", { className: cn(styles.headerWrapper, headerClassName, (_b = {},
41
46
  _b[styles.highlighted] = headerHighlighted && sticky,
42
47
  _b[styles.sticky] = sticky,
43
- _b)) },
48
+ _b)), "data-test-id": getDataTestId(dataTestId) },
44
49
  React.createElement("div", { className: cn(styles.header, headerClassName, (_c = {},
45
50
  _c[styles.justifyEnd] = !title,
46
51
  _c)) },
47
52
  hasLeftPart && (React.createElement("div", { className: cn(styles.addon, addonClassName, (_d = {},
48
53
  _d[styles.addonFixed] = !sticky,
49
54
  _d[styles.addonLeft] = !sticky,
50
- _d)) }, hasBacker ? (React.createElement(Backer, { className: backerClassName, onClick: onBack })) : (leftAddons))),
55
+ _d)) }, hasBacker ? (React.createElement(Backer, { className: backerClassName, onClick: onBack, dataTestId: getDataTestId(dataTestId, 'backer') })) : (leftAddons))),
51
56
  hasHeaderContent && (React.createElement(Typography.Text, { view: 'primary-large', weight: 'bold', className: cn(styles.title, getTitleIndent(), (_e = {},
52
57
  _e[styles.titleCenter] = titleAlign === 'center',
53
58
  _e[styles.titleLeft] = titleAlign === 'left',
54
59
  _e[styles.trimTitle] = trimTitle,
55
- _e)), color: 'primary' }, title)),
60
+ _e)), color: 'primary', dataTestId: getDataTestId(dataTestId, 'title') }, title)),
56
61
  hasRightPart && (React.createElement("div", { className: cn(styles.addon, addonClassName, (_f = {},
57
62
  _f[styles.addonFixed] = !sticky,
58
63
  _f[styles.addonRight] = !sticky,
59
- _f)) }, hasCloser ? React.createElement(Closer, { className: closerClassName }) : rightAddons))),
64
+ _f)) }, hasCloser ? (React.createElement(Closer, { className: closerClassName, dataTestId: getDataTestId(dataTestId, 'closer') })) : (rightAddons)))),
60
65
  bottomAddons));
61
66
  };
62
67
 
63
- var styles$1 = {"modal":"bottom-sheet__modal_1dcpm","component":"bottom-sheet__component_1dcpm","withTransition":"bottom-sheet__withTransition_1dcpm","withZeroTransition":"bottom-sheet__withZeroTransition_1dcpm","scrollableContainer":"bottom-sheet__scrollableContainer_1dcpm","marker":"bottom-sheet__marker_1dcpm","content":"bottom-sheet__content_1dcpm","noHeader":"bottom-sheet__noHeader_1dcpm","noFooter":"bottom-sheet__noFooter_1dcpm","scrollLocked":"bottom-sheet__scrollLocked_1dcpm","appear":"bottom-sheet__appear_1dcpm","enter":"bottom-sheet__enter_1dcpm","appearActive":"bottom-sheet__appearActive_1dcpm","enterActive":"bottom-sheet__enterActive_1dcpm","enterDone":"bottom-sheet__enterDone_1dcpm","appearDone":"bottom-sheet__appearDone_1dcpm","exit":"bottom-sheet__exit_1dcpm","exitActive":"bottom-sheet__exitActive_1dcpm"};
68
+ var styles$1 = {"modal":"bottom-sheet__modal_1gf4k","component":"bottom-sheet__component_1gf4k","withTransition":"bottom-sheet__withTransition_1gf4k","withZeroTransition":"bottom-sheet__withZeroTransition_1gf4k","scrollableContainer":"bottom-sheet__scrollableContainer_1gf4k","marker":"bottom-sheet__marker_1gf4k","content":"bottom-sheet__content_1gf4k","noHeader":"bottom-sheet__noHeader_1gf4k","noFooter":"bottom-sheet__noFooter_1gf4k","scrollLocked":"bottom-sheet__scrollLocked_1gf4k","appear":"bottom-sheet__appear_1gf4k","enter":"bottom-sheet__enter_1gf4k","appearActive":"bottom-sheet__appearActive_1gf4k","enterActive":"bottom-sheet__enterActive_1gf4k","enterDone":"bottom-sheet__enterDone_1gf4k","appearDone":"bottom-sheet__appearDone_1gf4k","exit":"bottom-sheet__exit_1gf4k","exitActive":"bottom-sheet__exitActive_1gf4k"};
64
69
  require('./index.css')
65
70
 
66
71
  var TIMEOUT = 300;
@@ -99,6 +104,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
99
104
  titleAlign: titleAlign,
100
105
  trimTitle: trimTitle,
101
106
  sticky: stickyHeader,
107
+ dataTestId: getDataTestId(dataTestId, 'header'),
102
108
  onBack: onBack,
103
109
  };
104
110
  var getBackdropOpacity = function (offset) {
package/esm/component.js CHANGED
@@ -1,4 +1,4 @@
1
- import './tslib.es6-7bd2d41b.js';
1
+ import './tslib.es6-5b0f031b.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-div-100vh';
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
10
10
  import './components/closer/Component.js';
11
11
  import '@alfalab/icons-glyph/ArrowBackMIcon';
12
12
  import './components/backer/Component.js';
13
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-ccb0592e.js';
13
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-19d1d5d1.js';
14
14
  import './components/footer/Component.js';
15
15
  import '@alfalab/core-components-backdrop/esm';
16
16
  import './components/swipeable-backdrop/Component.js';
@@ -15,6 +15,10 @@ type BackerProps = ButtonHTMLAttributes<HTMLButtonElement> & {
15
15
  * Иконка
16
16
  */
17
17
  icon?: ElementType;
18
+ /**
19
+ * Идентификатор для систем автоматизированного тестирования
20
+ */
21
+ dataTestId?: string;
18
22
  /**
19
23
  * Обработчик нажатия
20
24
  */
@@ -1,16 +1,16 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-7bd2d41b.js';
1
+ import { a as __rest, _ as __assign } from '../../tslib.es6-5b0f031b.js';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import { IconButton } from '@alfalab/core-components-icon-button/esm';
5
5
  import { ArrowBackMIcon } from '@alfalab/icons-glyph/ArrowBackMIcon';
6
6
 
7
- var styles = {"backer":"bottom-sheet__backer_14xzk","button":"bottom-sheet__button_14xzk"};
7
+ var styles = {"backer":"bottom-sheet__backer_1dfmr","button":"bottom-sheet__button_1dfmr"};
8
8
  require('./index.css')
9
9
 
10
10
  var Backer = function (_a) {
11
- var className = _a.className, _b = _a.size, size = _b === void 0 ? 'xs' : _b, _c = _a.icon, icon = _c === void 0 ? ArrowBackMIcon : _c, onClick = _a.onClick, restProps = __rest(_a, ["className", "size", "icon", "onClick"]);
11
+ var className = _a.className, _b = _a.size, size = _b === void 0 ? 'xs' : _b, _c = _a.icon, icon = _c === void 0 ? ArrowBackMIcon : _c, dataTestId = _a.dataTestId, onClick = _a.onClick, restProps = __rest(_a, ["className", "size", "icon", "dataTestId", "onClick"]);
12
12
  return (React.createElement("div", { className: cn(styles.backer, className) },
13
- React.createElement(IconButton, __assign({ size: size, className: styles.button, "aria-label": '\u043D\u0430\u0437\u0430\u0434', onClick: onClick, icon: icon }, restProps))));
13
+ React.createElement(IconButton, __assign({ size: size, className: styles.button, "aria-label": '\u043D\u0430\u0437\u0430\u0434', onClick: onClick, icon: icon, dataTestId: dataTestId }, restProps))));
14
14
  };
15
15
 
16
16
  export { Backer };
@@ -1,9 +1,9 @@
1
- /* hash: 1hgxs */
1
+ /* hash: 1m24z */
2
2
  :root {
3
3
  --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
4
4
  }
5
5
 
6
- .bottom-sheet__backer_14xzk {
6
+ .bottom-sheet__backer_1dfmr {
7
7
  width: 32px;
8
8
  height: 32px;
9
9
  display: flex;
@@ -13,7 +13,7 @@
13
13
  color: var(--color-light-graphic-primary);
14
14
  }
15
15
 
16
- .bottom-sheet__button_14xzk {
16
+ .bottom-sheet__button_1dfmr {
17
17
  background: var(--bottom-sheet-backer-bg-color);
18
18
  -webkit-backdrop-filter: blur(10px);
19
19
  backdrop-filter: blur(10px);
@@ -11,6 +11,10 @@ type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
11
11
  * Размер кнопки
12
12
  */
13
13
  size?: IconButtonProps['size'];
14
+ /**
15
+ * Идентификатор для систем автоматизированного тестирования
16
+ */
17
+ dataTestId?: string;
14
18
  /**
15
19
  * Иконка
16
20
  */
@@ -1,21 +1,21 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-7bd2d41b.js';
1
+ import { a as __rest, _ as __assign } from '../../tslib.es6-5b0f031b.js';
2
2
  import React, { useContext, useCallback } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
5
5
  import { IconButton } from '@alfalab/core-components-icon-button/esm';
6
6
  import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
7
7
 
8
- var styles = {"closer":"bottom-sheet__closer_1yeo9","button":"bottom-sheet__button_1yeo9"};
8
+ var styles = {"closer":"bottom-sheet__closer_2fz5k","button":"bottom-sheet__button_2fz5k"};
9
9
  require('./index.css')
10
10
 
11
11
  var Closer = function (_a) {
12
- var className = _a.className, _b = _a.size, size = _b === void 0 ? 'xs' : _b, _c = _a.icon, icon = _c === void 0 ? CrossMIcon : _c, restProps = __rest(_a, ["className", "size", "icon"]);
12
+ var className = _a.className, _b = _a.size, size = _b === void 0 ? 'xs' : _b, _c = _a.icon, icon = _c === void 0 ? CrossMIcon : _c, dataTestId = _a.dataTestId, restProps = __rest(_a, ["className", "size", "icon", "dataTestId"]);
13
13
  var onClose = useContext(BaseModalContext).onClose;
14
14
  var handleClick = useCallback(function (event) {
15
15
  onClose(event, 'closerClick');
16
16
  }, [onClose]);
17
17
  return (React.createElement("div", { className: cn(styles.closer, className) },
18
- React.createElement(IconButton, __assign({ size: size, className: styles.button, "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon }, restProps))));
18
+ React.createElement(IconButton, __assign({ size: size, className: styles.button, "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon, dataTestId: dataTestId }, restProps))));
19
19
  };
20
20
 
21
21
  export { Closer };
@@ -1,9 +1,9 @@
1
- /* hash: 1jhck */
1
+ /* hash: 1w8dm */
2
2
  :root {
3
3
  --bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
4
4
  }
5
5
 
6
- .bottom-sheet__closer_1yeo9 {
6
+ .bottom-sheet__closer_2fz5k {
7
7
  width: 32px;
8
8
  height: 32px;
9
9
  display: flex;
@@ -13,7 +13,7 @@
13
13
  color: var(--color-light-graphic-primary);
14
14
  }
15
15
 
16
- .bottom-sheet__button_1yeo9 {
16
+ .bottom-sheet__button_2fz5k {
17
17
  background: var(--bottom-sheet-closer-bg-color);
18
18
  -webkit-backdrop-filter: blur(10px);
19
19
  backdrop-filter: blur(10px);
@@ -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/esm';
4
4
 
5
- var styles = {"footer":"bottom-sheet__footer_1fcyh","sticky":"bottom-sheet__sticky_1fcyh","highlighted":"bottom-sheet__highlighted_1fcyh"};
5
+ var styles = {"footer":"bottom-sheet__footer_1opm0","sticky":"bottom-sheet__sticky_1opm0","highlighted":"bottom-sheet__highlighted_1opm0"};
6
6
  require('./index.css')
7
7
 
8
8
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1jlm4 */
1
+ /* hash: 1wcn7 */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -18,15 +18,15 @@
18
18
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
19
19
  --bottom-sheet-footer-background-color: var(--color-light-bg-primary);
20
20
  }
21
- .bottom-sheet__footer_1fcyh {
21
+ .bottom-sheet__footer_1opm0 {
22
22
  padding: var(--gap-m) var(--gap-m);
23
23
  background-color: var(--color-light-bg-primary);
24
24
  }
25
- .bottom-sheet__sticky_1fcyh {
25
+ .bottom-sheet__sticky_1opm0 {
26
26
  position: sticky;
27
27
  bottom: 0;
28
28
  }
29
- .bottom-sheet__highlighted_1fcyh {
29
+ .bottom-sheet__highlighted_1opm0 {
30
30
  border-top: var(--bottom-sheet-footer-border-top);
31
31
  background-color: var(--bottom-sheet-footer-background-color);
32
32
  }
@@ -1,4 +1,4 @@
1
- import '../../tslib.es6-7bd2d41b.js';
1
+ import '../../tslib.es6-5b0f031b.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-div-100vh';
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
10
10
  import '../closer/Component.js';
11
11
  import '@alfalab/icons-glyph/ArrowBackMIcon';
12
12
  import '../backer/Component.js';
13
- export { a as Header } from '../../component-ccb0592e.js';
13
+ export { a as Header } from '../../component-19d1d5d1.js';
14
14
  import '../footer/Component.js';
15
15
  import '@alfalab/core-components-backdrop/esm';
16
16
  import '../swipeable-backdrop/Component.js';
@@ -1,4 +1,4 @@
1
- /* hash: a32gl */
1
+ /* hash: 1d9qf */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -30,7 +30,7 @@
30
30
  --bottom-sheet-title-font-family: var(--font-family-system);
31
31
  --bottom-sheet-title-margin-vertical: var(--gap-2xs);
32
32
  }
33
- .bottom-sheet__headerWrapper_1hskz {
33
+ .bottom-sheet__headerWrapper_18fxg {
34
34
  padding: var(--gap-xs);
35
35
  padding-bottom: 0;
36
36
  background-color: var(--color-light-bg-primary);
@@ -38,38 +38,38 @@
38
38
  border-top-left-radius: var(--border-radius-xl);
39
39
  z-index: 1;
40
40
  }
41
- .bottom-sheet__header_1hskz {
41
+ .bottom-sheet__header_18fxg {
42
42
  display: flex;
43
43
  }
44
- .bottom-sheet__sticky_1hskz {
44
+ .bottom-sheet__sticky_18fxg {
45
45
  position: sticky;
46
46
  top: 0;
47
47
  }
48
- .bottom-sheet__highlighted_1hskz {
48
+ .bottom-sheet__highlighted_18fxg {
49
49
  border-bottom: var(--bottom-sheet-header-border-bottom);
50
50
  }
51
- .bottom-sheet__justifyEnd_1hskz {
51
+ .bottom-sheet__justifyEnd_18fxg {
52
52
  justify-content: flex-end;
53
53
  }
54
- .bottom-sheet__addon_1hskz {
54
+ .bottom-sheet__addon_18fxg {
55
55
  display: flex;
56
56
  justify-content: center;
57
57
  align-items: center;
58
58
  min-width: 48px;
59
59
  height: 48px;
60
60
  }
61
- .bottom-sheet__addonFixed_1hskz {
61
+ .bottom-sheet__addonFixed_18fxg {
62
62
  position: fixed;
63
63
  }
64
- .bottom-sheet__addonLeft_1hskz {
64
+ .bottom-sheet__addonLeft_18fxg {
65
65
  left: 0;
66
66
  margin-left: var(--gap-xs);
67
67
  }
68
- .bottom-sheet__addonRight_1hskz {
68
+ .bottom-sheet__addonRight_18fxg {
69
69
  right: 0;
70
70
  margin-right: var(--gap-xs);
71
71
  }
72
- .bottom-sheet__title_1hskz {
72
+ .bottom-sheet__title_18fxg {
73
73
  padding: var(--gap-xs) var(--gap-xs);
74
74
  margin: var(--bottom-sheet-title-margin-vertical) 0;
75
75
  width: 100%;
@@ -78,23 +78,23 @@
78
78
  line-height: var(--bottom-sheet-title-line-height);
79
79
  font-family: var(--bottom-sheet-title-font-family);
80
80
  }
81
- .bottom-sheet__titleCenter_1hskz {
81
+ .bottom-sheet__titleCenter_18fxg {
82
82
  text-align: center;
83
83
  }
84
- .bottom-sheet__titleLeft_1hskz {
84
+ .bottom-sheet__titleLeft_18fxg {
85
85
  text-align: left;
86
86
  }
87
- .bottom-sheet__trimTitle_1hskz {
87
+ .bottom-sheet__trimTitle_18fxg {
88
88
  white-space: nowrap;
89
89
  overflow: hidden;
90
90
  text-overflow: ellipsis;
91
91
  }
92
- .bottom-sheet__titleBigIndentHorizontal_1hskz {
92
+ .bottom-sheet__titleBigIndentHorizontal_18fxg {
93
93
  margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
94
94
  }
95
- .bottom-sheet__titleIndentRight_1hskz {
95
+ .bottom-sheet__titleIndentRight_18fxg {
96
96
  margin-right: var(--gap-4xl);
97
97
  }
98
- .bottom-sheet__titleIndentLeft_1hskz {
98
+ .bottom-sheet__titleIndentLeft_18fxg {
99
99
  margin-left: var(--gap-4xl);
100
100
  }
@@ -1,4 +1,4 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-7bd2d41b.js';
1
+ import { a as __rest, _ as __assign } from '../../tslib.es6-5b0f031b.js';
2
2
  import React from 'react';
3
3
  import { Backdrop } from '@alfalab/core-components-backdrop/esm';
4
4
 
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 3wlzb */
1
+ /* hash: 8ht63 */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-graphic-quaternary: #dbdee1;
@@ -24,14 +24,14 @@
24
24
  --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
25
25
  --bottom-sheet-out-transition: 0.3s ease;
26
26
  }
27
- .bottom-sheet__modal_1dcpm {
27
+ .bottom-sheet__modal_1gf4k {
28
28
  background-color: transparent;
29
29
  position: fixed;
30
30
  bottom: 0;
31
31
  width: 100%;
32
32
  max-width: 600px;
33
33
  }
34
- .bottom-sheet__component_1dcpm {
34
+ .bottom-sheet__component_1gf4k {
35
35
  overflow: hidden;
36
36
  position: relative;
37
37
  display: flex;
@@ -41,20 +41,20 @@
41
41
  background: var(--color-light-bg-primary);
42
42
  transform: translateY(100%);
43
43
  }
44
- .bottom-sheet__withTransition_1dcpm {
44
+ .bottom-sheet__withTransition_1gf4k {
45
45
  transition: var(--bottom-sheet-out-transition);
46
46
  }
47
- .bottom-sheet__withZeroTransition_1dcpm {
47
+ .bottom-sheet__withZeroTransition_1gf4k {
48
48
  transition: 0s linear;
49
49
  }
50
- .bottom-sheet__scrollableContainer_1dcpm {
50
+ .bottom-sheet__scrollableContainer_1gf4k {
51
51
  overflow: auto;
52
52
  display: flex;
53
53
  flex-direction: column;
54
54
  position: relative;
55
55
  height: 100%;
56
56
  }
57
- .bottom-sheet__marker_1dcpm {
57
+ .bottom-sheet__marker_1gf4k {
58
58
  position: fixed;
59
59
  top: var(--gap-2xs);
60
60
  left: 50%;
@@ -65,7 +65,7 @@
65
65
  background-color: var(--color-light-graphic-quaternary);
66
66
  z-index: 1000;
67
67
  }
68
- .bottom-sheet__content_1dcpm {
68
+ .bottom-sheet__content_1gf4k {
69
69
  display: flex;
70
70
  flex-direction: column;
71
71
  flex: 1;
@@ -73,29 +73,29 @@
73
73
  color: var(--color-light-text-primary);
74
74
  background-color: var(--color-light-bg-primary);
75
75
  }
76
- .bottom-sheet__noHeader_1dcpm {
76
+ .bottom-sheet__noHeader_1gf4k {
77
77
  padding-top: var(--gap-xl);
78
78
  }
79
- .bottom-sheet__noFooter_1dcpm {
79
+ .bottom-sheet__noFooter_1gf4k {
80
80
  padding-bottom: var(--gap-m);
81
81
  }
82
- .bottom-sheet__scrollLocked_1dcpm {
82
+ .bottom-sheet__scrollLocked_1gf4k {
83
83
  overflow: hidden;
84
84
  }
85
- .bottom-sheet__appear_1dcpm .bottom-sheet__component_1dcpm, .bottom-sheet__enter_1dcpm .bottom-sheet__component_1dcpm {
85
+ .bottom-sheet__appear_1gf4k .bottom-sheet__component_1gf4k, .bottom-sheet__enter_1gf4k .bottom-sheet__component_1gf4k {
86
86
  transition: none;
87
87
  }
88
- .bottom-sheet__appearActive_1dcpm .bottom-sheet__component_1dcpm, .bottom-sheet__enterActive_1dcpm .bottom-sheet__component_1dcpm {
88
+ .bottom-sheet__appearActive_1gf4k .bottom-sheet__component_1gf4k, .bottom-sheet__enterActive_1gf4k .bottom-sheet__component_1gf4k {
89
89
  transition: var(--bottom-sheet-in-transition);
90
90
  transform: translateY(0);
91
91
  }
92
- .bottom-sheet__enterDone_1dcpm .bottom-sheet__component_1dcpm, .bottom-sheet__appearDone_1dcpm .bottom-sheet__component_1dcpm {
92
+ .bottom-sheet__enterDone_1gf4k .bottom-sheet__component_1gf4k, .bottom-sheet__appearDone_1gf4k .bottom-sheet__component_1gf4k {
93
93
  transform: translateY(0);
94
94
  }
95
- .bottom-sheet__exit_1dcpm .bottom-sheet__component_1dcpm {
95
+ .bottom-sheet__exit_1gf4k .bottom-sheet__component_1gf4k {
96
96
  transform: translateY(0);
97
97
  }
98
- .bottom-sheet__exitActive_1dcpm .bottom-sheet__component_1dcpm {
98
+ .bottom-sheet__exitActive_1gf4k .bottom-sheet__component_1gf4k {
99
99
  transition: var(--bottom-sheet-out-transition);
100
100
  transform: translateY(100%);
101
101
  }
package/esm/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./component-ccb0592e";
1
+ export * from "./component-19d1d5d1";
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './tslib.es6-7bd2d41b.js';
1
+ import './tslib.es6-5b0f031b.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-div-100vh';
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
10
10
  import './components/closer/Component.js';
11
11
  import '@alfalab/icons-glyph/ArrowBackMIcon';
12
12
  import './components/backer/Component.js';
13
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-ccb0592e.js';
13
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-19d1d5d1.js';
14
14
  import './components/footer/Component.js';
15
15
  import '@alfalab/core-components-backdrop/esm';
16
16
  import './components/swipeable-backdrop/Component.js';
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 3wlzb */
1
+ /* hash: 8ht63 */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-graphic-quaternary: #dbdee1;
@@ -24,14 +24,14 @@
24
24
  --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
25
25
  --bottom-sheet-out-transition: 0.3s ease;
26
26
  }
27
- .bottom-sheet__modal_1dcpm {
27
+ .bottom-sheet__modal_1gf4k {
28
28
  background-color: transparent;
29
29
  position: fixed;
30
30
  bottom: 0;
31
31
  width: 100%;
32
32
  max-width: 600px;
33
33
  }
34
- .bottom-sheet__component_1dcpm {
34
+ .bottom-sheet__component_1gf4k {
35
35
  overflow: hidden;
36
36
  position: relative;
37
37
  display: flex;
@@ -41,20 +41,20 @@
41
41
  background: var(--color-light-bg-primary);
42
42
  transform: translateY(100%);
43
43
  }
44
- .bottom-sheet__withTransition_1dcpm {
44
+ .bottom-sheet__withTransition_1gf4k {
45
45
  transition: var(--bottom-sheet-out-transition);
46
46
  }
47
- .bottom-sheet__withZeroTransition_1dcpm {
47
+ .bottom-sheet__withZeroTransition_1gf4k {
48
48
  transition: 0s linear;
49
49
  }
50
- .bottom-sheet__scrollableContainer_1dcpm {
50
+ .bottom-sheet__scrollableContainer_1gf4k {
51
51
  overflow: auto;
52
52
  display: flex;
53
53
  flex-direction: column;
54
54
  position: relative;
55
55
  height: 100%;
56
56
  }
57
- .bottom-sheet__marker_1dcpm {
57
+ .bottom-sheet__marker_1gf4k {
58
58
  position: fixed;
59
59
  top: var(--gap-2xs);
60
60
  left: 50%;
@@ -65,7 +65,7 @@
65
65
  background-color: var(--color-light-graphic-quaternary);
66
66
  z-index: 1000;
67
67
  }
68
- .bottom-sheet__content_1dcpm {
68
+ .bottom-sheet__content_1gf4k {
69
69
  display: flex;
70
70
  flex-direction: column;
71
71
  flex: 1;
@@ -73,29 +73,29 @@
73
73
  color: var(--color-light-text-primary);
74
74
  background-color: var(--color-light-bg-primary);
75
75
  }
76
- .bottom-sheet__noHeader_1dcpm {
76
+ .bottom-sheet__noHeader_1gf4k {
77
77
  padding-top: var(--gap-xl);
78
78
  }
79
- .bottom-sheet__noFooter_1dcpm {
79
+ .bottom-sheet__noFooter_1gf4k {
80
80
  padding-bottom: var(--gap-m);
81
81
  }
82
- .bottom-sheet__scrollLocked_1dcpm {
82
+ .bottom-sheet__scrollLocked_1gf4k {
83
83
  overflow: hidden;
84
84
  }
85
- .bottom-sheet__appear_1dcpm .bottom-sheet__component_1dcpm, .bottom-sheet__enter_1dcpm .bottom-sheet__component_1dcpm {
85
+ .bottom-sheet__appear_1gf4k .bottom-sheet__component_1gf4k, .bottom-sheet__enter_1gf4k .bottom-sheet__component_1gf4k {
86
86
  transition: none;
87
87
  }
88
- .bottom-sheet__appearActive_1dcpm .bottom-sheet__component_1dcpm, .bottom-sheet__enterActive_1dcpm .bottom-sheet__component_1dcpm {
88
+ .bottom-sheet__appearActive_1gf4k .bottom-sheet__component_1gf4k, .bottom-sheet__enterActive_1gf4k .bottom-sheet__component_1gf4k {
89
89
  transition: var(--bottom-sheet-in-transition);
90
90
  transform: translateY(0);
91
91
  }
92
- .bottom-sheet__enterDone_1dcpm .bottom-sheet__component_1dcpm, .bottom-sheet__appearDone_1dcpm .bottom-sheet__component_1dcpm {
92
+ .bottom-sheet__enterDone_1gf4k .bottom-sheet__component_1gf4k, .bottom-sheet__appearDone_1gf4k .bottom-sheet__component_1gf4k {
93
93
  transform: translateY(0);
94
94
  }
95
- .bottom-sheet__exit_1dcpm .bottom-sheet__component_1dcpm {
95
+ .bottom-sheet__exit_1gf4k .bottom-sheet__component_1gf4k {
96
96
  transform: translateY(0);
97
97
  }
98
- .bottom-sheet__exitActive_1dcpm .bottom-sheet__component_1dcpm {
98
+ .bottom-sheet__exitActive_1gf4k .bottom-sheet__component_1gf4k {
99
99
  transition: var(--bottom-sheet-out-transition);
100
100
  transform: translateY(100%);
101
101
  }
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./component-640abf82";
1
+ export * from "./component-90672837";
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./tslib.es6-fd688139.js');
5
+ require('./tslib.es6-c03fa1a2.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('react-div-100vh');
@@ -14,7 +14,7 @@ require('@alfalab/icons-glyph/CrossMIcon');
14
14
  require('./components/closer/Component.js');
15
15
  require('@alfalab/icons-glyph/ArrowBackMIcon');
16
16
  require('./components/backer/Component.js');
17
- var components_header_Component = require('./component-640abf82.js');
17
+ var components_header_Component = require('./component-90672837.js');
18
18
  require('./components/footer/Component.js');
19
19
  require('@alfalab/core-components-backdrop');
20
20
  require('./components/swipeable-backdrop/Component.js');
@@ -58,12 +58,17 @@ type HeaderProps = {
58
58
  * Фиксирует шапку
59
59
  */
60
60
  sticky?: boolean;
61
+ /**
62
+ * Идентификатор для систем автоматизированного тестирования
63
+ */
64
+ dataTestId?: string;
61
65
  /**
62
66
  * Обработчик нажатия на стрелку назад
63
67
  */
64
68
  onBack?: () => void;
65
69
  };
66
70
  declare const Header: FC<HeaderProps>;
71
+ declare const getDataTestId: (dataTestId?: string | undefined, element?: string | undefined) => string | undefined;
67
72
  type BottomSheetTitleAlign$0 = 'center' | 'left';
68
73
  type BottomSheetProps = {
69
74
  /**
@@ -219,4 +224,4 @@ type BottomSheetProps = {
219
224
  declare const HEADER_OFFSET = 24;
220
225
  declare const CLOSE_OFFSET = 0.2;
221
226
  declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
222
- export { HeaderProps, Header, BottomSheetTitleAlign$0 as BottomSheetTitleAlign, BottomSheetProps, HEADER_OFFSET, CLOSE_OFFSET, BottomSheet };
227
+ export { HeaderProps, Header, getDataTestId, BottomSheetTitleAlign$0 as BottomSheetTitleAlign, BottomSheetProps, HEADER_OFFSET, CLOSE_OFFSET, BottomSheet };