@alfalab/core-components-popup-sheet 1.0.1 → 1.0.2

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/Component.js CHANGED
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
17
17
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
18
18
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
19
19
 
20
- var styles = {"component":"popup-sheet__component_1br5q","closer":"popup-sheet__closer_1br5q","content":"popup-sheet__content_1br5q","appear":"popup-sheet__appear_1br5q","enter":"popup-sheet__enter_1br5q","appearActive":"popup-sheet__appearActive_1br5q","enterActive":"popup-sheet__enterActive_1br5q","exit":"popup-sheet__exit_1br5q","exitBySwipe":"popup-sheet__exitBySwipe_1br5q","exitActiveBySwipe":"popup-sheet__exitActiveBySwipe_1br5q","exitActive":"popup-sheet__exitActive_1br5q","exitDone":"popup-sheet__exitDone_1br5q"};
20
+ var styles = {"component":"popup-sheet__component_d62qs","closer":"popup-sheet__closer_d62qs","content":"popup-sheet__content_d62qs","appear":"popup-sheet__appear_d62qs","enter":"popup-sheet__enter_d62qs","appearActive":"popup-sheet__appearActive_d62qs","enterActive":"popup-sheet__enterActive_d62qs","exit":"popup-sheet__exit_d62qs","exitBySwipe":"popup-sheet__exitBySwipe_d62qs","exitActiveBySwipe":"popup-sheet__exitActiveBySwipe_d62qs","exitActive":"popup-sheet__exitActive_d62qs","exitDone":"popup-sheet__exitDone_d62qs"};
21
21
  require('./index.css')
22
22
 
23
23
  var SWIPE_VELOCITY = 0.3;
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
10
10
 
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
 
13
- var styles = {"appear":"popup-sheet__appear_u7kb4","enter":"popup-sheet__enter_u7kb4","appearActive":"popup-sheet__appearActive_u7kb4","enterActive":"popup-sheet__enterActive_u7kb4","appearDone":"popup-sheet__appearDone_u7kb4","enterDone":"popup-sheet__enterDone_u7kb4","exit":"popup-sheet__exit_u7kb4","exitActive":"popup-sheet__exitActive_u7kb4","exitDone":"popup-sheet__exitDone_u7kb4"};
13
+ var styles = {"appear":"popup-sheet__appear_1dlkx","enter":"popup-sheet__enter_1dlkx","appearActive":"popup-sheet__appearActive_1dlkx","enterActive":"popup-sheet__enterActive_1dlkx","appearDone":"popup-sheet__appearDone_1dlkx","enterDone":"popup-sheet__enterDone_1dlkx","exit":"popup-sheet__exit_1dlkx","exitActive":"popup-sheet__exitActive_1dlkx","exitDone":"popup-sheet__exitDone_1dlkx"};
14
14
  require('./index.css')
15
15
 
16
16
  var PopupBackdrop = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1ltdt */
1
+ /* hash: zqyur */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-overlay: rgba(0, 0, 0, 0.6); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -18,19 +18,19 @@
18
18
  } :root {
19
19
  --backdrop-visible-background: var(--color-light-bg-overlay);
20
20
  --backdrop-hidden-background: transparent;
21
- } .popup-sheet__appear_u7kb4,
22
- .popup-sheet__enter_u7kb4 {
21
+ } .popup-sheet__appear_1dlkx,
22
+ .popup-sheet__enter_1dlkx {
23
23
  background-color: var(--backdrop-hidden-background);
24
- } .popup-sheet__appearActive_u7kb4,
25
- .popup-sheet__enterActive_u7kb4,
26
- .popup-sheet__appearDone_u7kb4,
27
- .popup-sheet__enterDone_u7kb4 {
24
+ } .popup-sheet__appearActive_1dlkx,
25
+ .popup-sheet__enterActive_1dlkx,
26
+ .popup-sheet__appearDone_1dlkx,
27
+ .popup-sheet__enterDone_1dlkx {
28
28
  background-color: var(--backdrop-visible-background);
29
29
  transition: background-color 300ms cubic-bezier(0.65, 0, 0.35, 1);
30
- } .popup-sheet__exit_u7kb4 {
30
+ } .popup-sheet__exit_1dlkx {
31
31
  background-color: var(--backdrop-visible-background);
32
- } .popup-sheet__exitActive_u7kb4,
33
- .popup-sheet__exitDone_u7kb4 {
32
+ } .popup-sheet__exitActive_1dlkx,
33
+ .popup-sheet__exitDone_1dlkx {
34
34
  background-color: var(--backdrop-hidden-background);
35
35
  transition: background-color 300ms cubic-bezier(0.65, 0, 0.35, 1);
36
36
  }
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { ReactNode } from "react";
4
+ import { TextSkeletonProps } from "./types-1b036d4b";
5
+ type SkeletonProps = {
6
+ /**
7
+ * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
8
+ */
9
+ visible?: boolean;
10
+ /**
11
+ * Флаг явного включения анимации скелета
12
+ */
13
+ animate?: boolean;
14
+ /**
15
+ * Дополнительный класс
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Дополнительные инлайн стили
20
+ */
21
+ style?: React.CSSProperties;
22
+ /**
23
+ * Идентификатор для систем автоматизированного тестирования
24
+ */
25
+ dataTestId?: string;
26
+ /**
27
+ * Дочерние элементы.
28
+ */
29
+ children?: ReactNode;
30
+ };
31
+ declare const Skeleton: React.FC<SkeletonProps>;
32
+ type SkeletonProps$0 = {
33
+ wrapperClassName?: string;
34
+ dataTestId?: string;
35
+ };
36
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
37
+ renderSkeleton: (props: SkeletonProps$0) => React.JSX.Element | null;
38
+ textRef: React.RefObject<HTMLElement>;
39
+ };
40
+ export { SkeletonProps, Skeleton, useSkeleton };
package/esm/Component.js CHANGED
@@ -8,7 +8,7 @@ import { createPaddingStyle, getDataTestId, easingFns } from '@alfalab/core-comp
8
8
  import { PopupBackdrop } from './components/backdrop/Component.js';
9
9
  import '@alfalab/core-components-backdrop/esm';
10
10
 
11
- var styles = {"component":"popup-sheet__component_1br5q","closer":"popup-sheet__closer_1br5q","content":"popup-sheet__content_1br5q","appear":"popup-sheet__appear_1br5q","enter":"popup-sheet__enter_1br5q","appearActive":"popup-sheet__appearActive_1br5q","enterActive":"popup-sheet__enterActive_1br5q","exit":"popup-sheet__exit_1br5q","exitBySwipe":"popup-sheet__exitBySwipe_1br5q","exitActiveBySwipe":"popup-sheet__exitActiveBySwipe_1br5q","exitActive":"popup-sheet__exitActive_1br5q","exitDone":"popup-sheet__exitDone_1br5q"};
11
+ var styles = {"component":"popup-sheet__component_d62qs","closer":"popup-sheet__closer_d62qs","content":"popup-sheet__content_d62qs","appear":"popup-sheet__appear_d62qs","enter":"popup-sheet__enter_d62qs","appearActive":"popup-sheet__appearActive_d62qs","enterActive":"popup-sheet__enterActive_d62qs","exit":"popup-sheet__exit_d62qs","exitBySwipe":"popup-sheet__exitBySwipe_d62qs","exitActiveBySwipe":"popup-sheet__exitActiveBySwipe_d62qs","exitActive":"popup-sheet__exitActive_d62qs","exitDone":"popup-sheet__exitDone_d62qs"};
12
12
  require('./index.css')
13
13
 
14
14
  var SWIPE_VELOCITY = 0.3;
@@ -2,7 +2,7 @@ import { __rest, __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import { Backdrop } from '@alfalab/core-components-backdrop/esm';
4
4
 
5
- var styles = {"appear":"popup-sheet__appear_u7kb4","enter":"popup-sheet__enter_u7kb4","appearActive":"popup-sheet__appearActive_u7kb4","enterActive":"popup-sheet__enterActive_u7kb4","appearDone":"popup-sheet__appearDone_u7kb4","enterDone":"popup-sheet__enterDone_u7kb4","exit":"popup-sheet__exit_u7kb4","exitActive":"popup-sheet__exitActive_u7kb4","exitDone":"popup-sheet__exitDone_u7kb4"};
5
+ var styles = {"appear":"popup-sheet__appear_1dlkx","enter":"popup-sheet__enter_1dlkx","appearActive":"popup-sheet__appearActive_1dlkx","enterActive":"popup-sheet__enterActive_1dlkx","appearDone":"popup-sheet__appearDone_1dlkx","enterDone":"popup-sheet__enterDone_1dlkx","exit":"popup-sheet__exit_1dlkx","exitActive":"popup-sheet__exitActive_1dlkx","exitDone":"popup-sheet__exitDone_1dlkx"};
6
6
  require('./index.css')
7
7
 
8
8
  var PopupBackdrop = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1ltdt */
1
+ /* hash: zqyur */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-overlay: rgba(0, 0, 0, 0.6); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -18,19 +18,19 @@
18
18
  } :root {
19
19
  --backdrop-visible-background: var(--color-light-bg-overlay);
20
20
  --backdrop-hidden-background: transparent;
21
- } .popup-sheet__appear_u7kb4,
22
- .popup-sheet__enter_u7kb4 {
21
+ } .popup-sheet__appear_1dlkx,
22
+ .popup-sheet__enter_1dlkx {
23
23
  background-color: var(--backdrop-hidden-background);
24
- } .popup-sheet__appearActive_u7kb4,
25
- .popup-sheet__enterActive_u7kb4,
26
- .popup-sheet__appearDone_u7kb4,
27
- .popup-sheet__enterDone_u7kb4 {
24
+ } .popup-sheet__appearActive_1dlkx,
25
+ .popup-sheet__enterActive_1dlkx,
26
+ .popup-sheet__appearDone_1dlkx,
27
+ .popup-sheet__enterDone_1dlkx {
28
28
  background-color: var(--backdrop-visible-background);
29
29
  transition: background-color 300ms cubic-bezier(0.65, 0, 0.35, 1);
30
- } .popup-sheet__exit_u7kb4 {
30
+ } .popup-sheet__exit_1dlkx {
31
31
  background-color: var(--backdrop-visible-background);
32
- } .popup-sheet__exitActive_u7kb4,
33
- .popup-sheet__exitDone_u7kb4 {
32
+ } .popup-sheet__exitActive_1dlkx,
33
+ .popup-sheet__exitDone_1dlkx {
34
34
  background-color: var(--backdrop-hidden-background);
35
35
  transition: background-color 300ms cubic-bezier(0.65, 0, 0.35, 1);
36
36
  }
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 112lt */
1
+ /* hash: n9nni */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,7 +15,7 @@
15
15
  --gap-xs: 8px;
16
16
  } :root {
17
17
  } :root {
18
- } .popup-sheet__component_1br5q {
18
+ } .popup-sheet__component_d62qs {
19
19
  position: fixed;
20
20
  bottom: 0;
21
21
  margin: auto var(--gap-xs) var(--gap-xs);
@@ -23,31 +23,31 @@
23
23
  max-width: 600px;
24
24
  border-radius: 36px;
25
25
  overflow: hidden;
26
- } .popup-sheet__closer_1br5q {
26
+ } .popup-sheet__closer_d62qs {
27
27
  position: absolute;
28
28
  top: 8px;
29
29
  right: 8px
30
- } .popup-sheet__closer_1br5q > button {
30
+ } .popup-sheet__closer_d62qs > button {
31
31
  -webkit-backdrop-filter: none;
32
32
  backdrop-filter: none;
33
- } .popup-sheet__content_1br5q {
33
+ } .popup-sheet__content_d62qs {
34
34
  box-sizing: border-box;
35
- } /* 100px нужны для того, чтобы фон успевал немного затемниться перед тем, как начнет выезжать шторка */ .popup-sheet__appear_1br5q,
36
- .popup-sheet__enter_1br5q {
35
+ } /* 100px нужны для того, чтобы фон успевал немного затемниться перед тем, как начнет выезжать шторка */ .popup-sheet__appear_d62qs,
36
+ .popup-sheet__enter_d62qs {
37
37
  transform: translateY(calc(100% + 100px));
38
- } .popup-sheet__appearActive_1br5q,
39
- .popup-sheet__enterActive_1br5q {
38
+ } .popup-sheet__appearActive_d62qs,
39
+ .popup-sheet__enterActive_d62qs {
40
40
  transform: translateY(0);
41
41
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
42
42
  transition-delay: 50ms;
43
- } .popup-sheet__exit_1br5q {
43
+ } .popup-sheet__exit_d62qs {
44
44
  transform: translateY(0);
45
- } .popup-sheet__exitBySwipe_1br5q {
45
+ } .popup-sheet__exitBySwipe_d62qs {
46
46
  transform: translateY(calc(100% + 100px));
47
- } .popup-sheet__exitActiveBySwipe_1br5q {
47
+ } .popup-sheet__exitActiveBySwipe_d62qs {
48
48
  transition: none;
49
- } .popup-sheet__exitActive_1br5q,
50
- .popup-sheet__exitDone_1br5q {
49
+ } .popup-sheet__exitActive_d62qs,
50
+ .popup-sheet__exitDone_d62qs {
51
51
  transform: translateY(calc(100% + 100px));
52
52
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
53
53
  }
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { ReactNode } from "react";
4
+ import { TextSkeletonProps } from "./types-1b036d4b";
5
+ type SkeletonProps = {
6
+ /**
7
+ * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
8
+ */
9
+ visible?: boolean;
10
+ /**
11
+ * Флаг явного включения анимации скелета
12
+ */
13
+ animate?: boolean;
14
+ /**
15
+ * Дополнительный класс
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Дополнительные инлайн стили
20
+ */
21
+ style?: React.CSSProperties;
22
+ /**
23
+ * Идентификатор для систем автоматизированного тестирования
24
+ */
25
+ dataTestId?: string;
26
+ /**
27
+ * Дочерние элементы.
28
+ */
29
+ children?: ReactNode;
30
+ };
31
+ declare const Skeleton: React.FC<SkeletonProps>;
32
+ type SkeletonProps$0 = {
33
+ wrapperClassName?: string;
34
+ dataTestId?: string;
35
+ };
36
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
37
+ renderSkeleton: (props: SkeletonProps$0) => React.JSX.Element | null;
38
+ textRef: React.RefObject<HTMLElement>;
39
+ };
40
+ export { SkeletonProps, Skeleton, useSkeleton };
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 112lt */
1
+ /* hash: n9nni */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,7 +15,7 @@
15
15
  --gap-xs: 8px;
16
16
  } :root {
17
17
  } :root {
18
- } .popup-sheet__component_1br5q {
18
+ } .popup-sheet__component_d62qs {
19
19
  position: fixed;
20
20
  bottom: 0;
21
21
  margin: auto var(--gap-xs) var(--gap-xs);
@@ -23,31 +23,31 @@
23
23
  max-width: 600px;
24
24
  border-radius: 36px;
25
25
  overflow: hidden;
26
- } .popup-sheet__closer_1br5q {
26
+ } .popup-sheet__closer_d62qs {
27
27
  position: absolute;
28
28
  top: 8px;
29
29
  right: 8px
30
- } .popup-sheet__closer_1br5q > button {
30
+ } .popup-sheet__closer_d62qs > button {
31
31
  -webkit-backdrop-filter: none;
32
32
  backdrop-filter: none;
33
- } .popup-sheet__content_1br5q {
33
+ } .popup-sheet__content_d62qs {
34
34
  box-sizing: border-box;
35
- } /* 100px нужны для того, чтобы фон успевал немного затемниться перед тем, как начнет выезжать шторка */ .popup-sheet__appear_1br5q,
36
- .popup-sheet__enter_1br5q {
35
+ } /* 100px нужны для того, чтобы фон успевал немного затемниться перед тем, как начнет выезжать шторка */ .popup-sheet__appear_d62qs,
36
+ .popup-sheet__enter_d62qs {
37
37
  transform: translateY(calc(100% + 100px));
38
- } .popup-sheet__appearActive_1br5q,
39
- .popup-sheet__enterActive_1br5q {
38
+ } .popup-sheet__appearActive_d62qs,
39
+ .popup-sheet__enterActive_d62qs {
40
40
  transform: translateY(0);
41
41
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
42
42
  transition-delay: 50ms;
43
- } .popup-sheet__exit_1br5q {
43
+ } .popup-sheet__exit_d62qs {
44
44
  transform: translateY(0);
45
- } .popup-sheet__exitBySwipe_1br5q {
45
+ } .popup-sheet__exitBySwipe_d62qs {
46
46
  transform: translateY(calc(100% + 100px));
47
- } .popup-sheet__exitActiveBySwipe_1br5q {
47
+ } .popup-sheet__exitActiveBySwipe_d62qs {
48
48
  transition: none;
49
- } .popup-sheet__exitActive_1br5q,
50
- .popup-sheet__exitDone_1br5q {
49
+ } .popup-sheet__exitActive_d62qs,
50
+ .popup-sheet__exitDone_d62qs {
51
51
  transform: translateY(calc(100% + 100px));
52
52
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
53
53
  }
@@ -7,7 +7,7 @@ import { createPaddingStyle, getDataTestId, easingFns } from '@alfalab/core-comp
7
7
  import { PopupBackdrop } from './components/backdrop/Component.js';
8
8
  import '@alfalab/core-components-backdrop/modern';
9
9
 
10
- const styles = {"component":"popup-sheet__component_1br5q","closer":"popup-sheet__closer_1br5q","content":"popup-sheet__content_1br5q","appear":"popup-sheet__appear_1br5q","enter":"popup-sheet__enter_1br5q","appearActive":"popup-sheet__appearActive_1br5q","enterActive":"popup-sheet__enterActive_1br5q","exit":"popup-sheet__exit_1br5q","exitBySwipe":"popup-sheet__exitBySwipe_1br5q","exitActiveBySwipe":"popup-sheet__exitActiveBySwipe_1br5q","exitActive":"popup-sheet__exitActive_1br5q","exitDone":"popup-sheet__exitDone_1br5q"};
10
+ const styles = {"component":"popup-sheet__component_d62qs","closer":"popup-sheet__closer_d62qs","content":"popup-sheet__content_d62qs","appear":"popup-sheet__appear_d62qs","enter":"popup-sheet__enter_d62qs","appearActive":"popup-sheet__appearActive_d62qs","enterActive":"popup-sheet__enterActive_d62qs","exit":"popup-sheet__exit_d62qs","exitBySwipe":"popup-sheet__exitBySwipe_d62qs","exitActiveBySwipe":"popup-sheet__exitActiveBySwipe_d62qs","exitActive":"popup-sheet__exitActive_d62qs","exitDone":"popup-sheet__exitDone_d62qs"};
11
11
  require('./index.css')
12
12
 
13
13
  const SWIPE_VELOCITY = 0.3;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Backdrop } from '@alfalab/core-components-backdrop/modern';
3
3
 
4
- const styles = {"appear":"popup-sheet__appear_u7kb4","enter":"popup-sheet__enter_u7kb4","appearActive":"popup-sheet__appearActive_u7kb4","enterActive":"popup-sheet__enterActive_u7kb4","appearDone":"popup-sheet__appearDone_u7kb4","enterDone":"popup-sheet__enterDone_u7kb4","exit":"popup-sheet__exit_u7kb4","exitActive":"popup-sheet__exitActive_u7kb4","exitDone":"popup-sheet__exitDone_u7kb4"};
4
+ const styles = {"appear":"popup-sheet__appear_1dlkx","enter":"popup-sheet__enter_1dlkx","appearActive":"popup-sheet__appearActive_1dlkx","enterActive":"popup-sheet__enterActive_1dlkx","appearDone":"popup-sheet__appearDone_1dlkx","enterDone":"popup-sheet__enterDone_1dlkx","exit":"popup-sheet__exit_1dlkx","exitActive":"popup-sheet__exitActive_1dlkx","exitDone":"popup-sheet__exitDone_1dlkx"};
5
5
  require('./index.css')
6
6
 
7
7
  const PopupBackdrop = ({ opacity, opacityTimeout, style, ...backdropProps }) => (React.createElement("div", { style: {
@@ -1,4 +1,4 @@
1
- /* hash: 1ltdt */
1
+ /* hash: zqyur */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-overlay: rgba(0, 0, 0, 0.6); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -18,19 +18,19 @@
18
18
  } :root {
19
19
  --backdrop-visible-background: var(--color-light-bg-overlay);
20
20
  --backdrop-hidden-background: transparent;
21
- } .popup-sheet__appear_u7kb4,
22
- .popup-sheet__enter_u7kb4 {
21
+ } .popup-sheet__appear_1dlkx,
22
+ .popup-sheet__enter_1dlkx {
23
23
  background-color: var(--backdrop-hidden-background);
24
- } .popup-sheet__appearActive_u7kb4,
25
- .popup-sheet__enterActive_u7kb4,
26
- .popup-sheet__appearDone_u7kb4,
27
- .popup-sheet__enterDone_u7kb4 {
24
+ } .popup-sheet__appearActive_1dlkx,
25
+ .popup-sheet__enterActive_1dlkx,
26
+ .popup-sheet__appearDone_1dlkx,
27
+ .popup-sheet__enterDone_1dlkx {
28
28
  background-color: var(--backdrop-visible-background);
29
29
  transition: background-color 300ms cubic-bezier(0.65, 0, 0.35, 1);
30
- } .popup-sheet__exit_u7kb4 {
30
+ } .popup-sheet__exit_1dlkx {
31
31
  background-color: var(--backdrop-visible-background);
32
- } .popup-sheet__exitActive_u7kb4,
33
- .popup-sheet__exitDone_u7kb4 {
32
+ } .popup-sheet__exitActive_1dlkx,
33
+ .popup-sheet__exitDone_1dlkx {
34
34
  background-color: var(--backdrop-hidden-background);
35
35
  transition: background-color 300ms cubic-bezier(0.65, 0, 0.35, 1);
36
36
  }
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 112lt */
1
+ /* hash: n9nni */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,7 +15,7 @@
15
15
  --gap-xs: 8px;
16
16
  } :root {
17
17
  } :root {
18
- } .popup-sheet__component_1br5q {
18
+ } .popup-sheet__component_d62qs {
19
19
  position: fixed;
20
20
  bottom: 0;
21
21
  margin: auto var(--gap-xs) var(--gap-xs);
@@ -23,31 +23,31 @@
23
23
  max-width: 600px;
24
24
  border-radius: 36px;
25
25
  overflow: hidden;
26
- } .popup-sheet__closer_1br5q {
26
+ } .popup-sheet__closer_d62qs {
27
27
  position: absolute;
28
28
  top: 8px;
29
29
  right: 8px
30
- } .popup-sheet__closer_1br5q > button {
30
+ } .popup-sheet__closer_d62qs > button {
31
31
  -webkit-backdrop-filter: none;
32
32
  backdrop-filter: none;
33
- } .popup-sheet__content_1br5q {
33
+ } .popup-sheet__content_d62qs {
34
34
  box-sizing: border-box;
35
- } /* 100px нужны для того, чтобы фон успевал немного затемниться перед тем, как начнет выезжать шторка */ .popup-sheet__appear_1br5q,
36
- .popup-sheet__enter_1br5q {
35
+ } /* 100px нужны для того, чтобы фон успевал немного затемниться перед тем, как начнет выезжать шторка */ .popup-sheet__appear_d62qs,
36
+ .popup-sheet__enter_d62qs {
37
37
  transform: translateY(calc(100% + 100px));
38
- } .popup-sheet__appearActive_1br5q,
39
- .popup-sheet__enterActive_1br5q {
38
+ } .popup-sheet__appearActive_d62qs,
39
+ .popup-sheet__enterActive_d62qs {
40
40
  transform: translateY(0);
41
41
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
42
42
  transition-delay: 50ms;
43
- } .popup-sheet__exit_1br5q {
43
+ } .popup-sheet__exit_d62qs {
44
44
  transform: translateY(0);
45
- } .popup-sheet__exitBySwipe_1br5q {
45
+ } .popup-sheet__exitBySwipe_d62qs {
46
46
  transform: translateY(calc(100% + 100px));
47
- } .popup-sheet__exitActiveBySwipe_1br5q {
47
+ } .popup-sheet__exitActiveBySwipe_d62qs {
48
48
  transition: none;
49
- } .popup-sheet__exitActive_1br5q,
50
- .popup-sheet__exitDone_1br5q {
49
+ } .popup-sheet__exitActive_d62qs,
50
+ .popup-sheet__exitDone_d62qs {
51
51
  transform: translateY(calc(100% + 100px));
52
52
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
53
53
  }
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { ReactNode } from "react";
4
+ import { TextSkeletonProps } from "./types-1b036d4b";
5
+ type SkeletonProps = {
6
+ /**
7
+ * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
8
+ */
9
+ visible?: boolean;
10
+ /**
11
+ * Флаг явного включения анимации скелета
12
+ */
13
+ animate?: boolean;
14
+ /**
15
+ * Дополнительный класс
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Дополнительные инлайн стили
20
+ */
21
+ style?: React.CSSProperties;
22
+ /**
23
+ * Идентификатор для систем автоматизированного тестирования
24
+ */
25
+ dataTestId?: string;
26
+ /**
27
+ * Дочерние элементы.
28
+ */
29
+ children?: ReactNode;
30
+ };
31
+ declare const Skeleton: React.FC<SkeletonProps>;
32
+ type SkeletonProps$0 = {
33
+ wrapperClassName?: string;
34
+ dataTestId?: string;
35
+ };
36
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
37
+ renderSkeleton: (props: SkeletonProps$0) => React.JSX.Element | null;
38
+ textRef: React.RefObject<HTMLElement>;
39
+ };
40
+ export { SkeletonProps, Skeleton, useSkeleton };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-popup-sheet",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Popup sheet mobile component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "@alfalab/core-components-base-modal": "^5.4.0",
19
19
  "@alfalab/core-components-backdrop": "^3.1.0",
20
20
  "@alfalab/core-components-shared": "^0.2.0",
21
- "@alfalab/core-components-navigation-bar": "^0.5.1",
21
+ "@alfalab/core-components-navigation-bar": "^0.5.2",
22
22
  "react-swipeable": "^7.0.0",
23
23
  "classnames": "^2.3.1",
24
24
  "tslib": "^2.4.0"
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { ReactNode } from "react";
4
+ import { TextSkeletonProps } from "./types-1b036d4b";
5
+ type SkeletonProps = {
6
+ /**
7
+ * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
8
+ */
9
+ visible?: boolean;
10
+ /**
11
+ * Флаг явного включения анимации скелета
12
+ */
13
+ animate?: boolean;
14
+ /**
15
+ * Дополнительный класс
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Дополнительные инлайн стили
20
+ */
21
+ style?: React.CSSProperties;
22
+ /**
23
+ * Идентификатор для систем автоматизированного тестирования
24
+ */
25
+ dataTestId?: string;
26
+ /**
27
+ * Дочерние элементы.
28
+ */
29
+ children?: ReactNode;
30
+ };
31
+ declare const Skeleton: React.FC<SkeletonProps>;
32
+ type SkeletonProps$0 = {
33
+ wrapperClassName?: string;
34
+ dataTestId?: string;
35
+ };
36
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
37
+ renderSkeleton: (props: SkeletonProps$0) => React.JSX.Element | null;
38
+ textRef: React.RefObject<HTMLElement>;
39
+ };
40
+ export { SkeletonProps, Skeleton, useSkeleton };