@salutejs/plasma-new-hope 0.88.0-canary.1225.9347054103.0 → 0.88.0-canary.1225.9412763701.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/cjs/components/Sheet/Sheet.css +9 -5
  2. package/cjs/components/Sheet/Sheet.js +30 -9
  3. package/cjs/components/Sheet/Sheet.js.map +1 -1
  4. package/cjs/components/Sheet/Sheet.styles.js +81 -16
  5. package/cjs/components/Sheet/Sheet.styles.js.map +1 -1
  6. package/cjs/components/Sheet/{Sheet.styles_1bm46e7.css → Sheet.styles_kdjr5m.css} +5 -3
  7. package/cjs/components/Sheet/Sheet.tokens.js +2 -1
  8. package/cjs/components/Sheet/Sheet.tokens.js.map +1 -1
  9. package/cjs/components/Sheet/utils/handleTransition.js +2 -3
  10. package/cjs/components/Sheet/utils/handleTransition.js.map +1 -1
  11. package/cjs/components/Sheet/utils/index.js +8 -0
  12. package/cjs/components/Sheet/utils/index.js.map +1 -0
  13. package/cjs/index.css +7 -5
  14. package/es/components/Sheet/Sheet.css +9 -5
  15. package/es/components/Sheet/Sheet.js +32 -11
  16. package/es/components/Sheet/Sheet.js.map +1 -1
  17. package/es/components/Sheet/Sheet.styles.js +79 -16
  18. package/es/components/Sheet/Sheet.styles.js.map +1 -1
  19. package/es/components/Sheet/{Sheet.styles_1bm46e7.css → Sheet.styles_kdjr5m.css} +5 -3
  20. package/es/components/Sheet/Sheet.tokens.js +2 -1
  21. package/es/components/Sheet/Sheet.tokens.js.map +1 -1
  22. package/es/components/Sheet/utils/handleTransition.js +2 -3
  23. package/es/components/Sheet/utils/handleTransition.js.map +1 -1
  24. package/es/components/Sheet/utils/index.js +4 -0
  25. package/es/components/Sheet/utils/index.js.map +1 -0
  26. package/es/index.css +7 -5
  27. package/package.json +2 -2
  28. package/styled-components/cjs/components/Sheet/Sheet.js +30 -8
  29. package/styled-components/cjs/components/Sheet/Sheet.styles.js +36 -9
  30. package/styled-components/cjs/components/Sheet/Sheet.tokens.js +2 -1
  31. package/styled-components/cjs/components/Sheet/hooks/index.js +0 -7
  32. package/styled-components/cjs/components/Sheet/utils/handleTransition.js +2 -3
  33. package/styled-components/cjs/components/Sheet/utils/index.js +3 -1
  34. package/styled-components/cjs/components/Sheet/variations/_view/tokens.json +4 -1
  35. package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.config.js +1 -1
  36. package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +170 -12
  37. package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.config.js +1 -1
  38. package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.stories.tsx +162 -11
  39. package/styled-components/es/components/Sheet/Sheet.js +33 -11
  40. package/styled-components/es/components/Sheet/Sheet.styles.js +35 -8
  41. package/styled-components/es/components/Sheet/Sheet.tokens.js +2 -1
  42. package/styled-components/es/components/Sheet/hooks/index.js +0 -1
  43. package/styled-components/es/components/Sheet/utils/handleTransition.js +2 -3
  44. package/styled-components/es/components/Sheet/utils/index.js +2 -1
  45. package/styled-components/es/components/Sheet/variations/_view/tokens.json +4 -1
  46. package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.config.js +1 -1
  47. package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +170 -12
  48. package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.config.js +1 -1
  49. package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.stories.tsx +162 -11
  50. package/types/components/Sheet/Sheet.d.ts +1 -0
  51. package/types/components/Sheet/Sheet.d.ts.map +1 -1
  52. package/types/components/Sheet/Sheet.styles.d.ts +12 -8
  53. package/types/components/Sheet/Sheet.styles.d.ts.map +1 -1
  54. package/types/components/Sheet/Sheet.tokens.d.ts +2 -1
  55. package/types/components/Sheet/Sheet.tokens.d.ts.map +1 -1
  56. package/types/components/Sheet/Sheet.types.d.ts +25 -7
  57. package/types/components/Sheet/Sheet.types.d.ts.map +1 -1
  58. package/types/components/Sheet/hooks/index.d.ts +0 -1
  59. package/types/components/Sheet/hooks/index.d.ts.map +1 -1
  60. package/types/components/Sheet/utils/handleTransition.d.ts.map +1 -1
  61. package/types/components/Sheet/utils/index.d.ts +1 -0
  62. package/types/components/Sheet/utils/index.d.ts.map +1 -1
  63. package/types/examples/plasma_b2c/components/Sheet/Sheet.config.d.ts.map +1 -1
  64. package/types/examples/plasma_web/components/Sheet/Sheet.config.d.ts.map +1 -1
  65. package/cjs/components/Sheet/hooks/useThemeContext.js +0 -17
  66. package/cjs/components/Sheet/hooks/useThemeContext.js.map +0 -1
  67. package/es/components/Sheet/hooks/useThemeContext.js +0 -13
  68. package/es/components/Sheet/hooks/useThemeContext.js.map +0 -1
  69. package/styled-components/cjs/components/Sheet/hooks/useThemeContext.js +0 -15
  70. package/styled-components/es/components/Sheet/hooks/useThemeContext.js +0 -9
  71. package/types/components/Sheet/hooks/useThemeContext.d.ts +0 -7
  72. package/types/components/Sheet/hooks/useThemeContext.d.ts.map +0 -1
@@ -8,11 +8,35 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
8
8
  * Обработчик закрытия шторки. Вызывается при клике по оверлею или смахиванию шторки вниз
9
9
  */
10
10
  onClose: () => void;
11
+ /**
12
+ * Слот для контента в заголовке
13
+ */
14
+ contentHeader?: ReactNode;
15
+ /**
16
+ * Является ли заголовок фиксированным
17
+ */
18
+ isHeaderFixed?: boolean;
19
+ /**
20
+ * Слот для контента в нижней части
21
+ */
22
+ contentFooter?: ReactNode;
23
+ /**
24
+ * Является ли нижняя часть фиксированной
25
+ */
26
+ isFooterFixed?: boolean;
27
+ /**
28
+ * Наличие ручки у шторки
29
+ */
30
+ hasHandle?: boolean;
11
31
  /**
12
32
  * Наличие оверлея шторки. Если включен, то контент под шторкой перекрывается оверлеем, при нажатии на
13
33
  * который шторка закрывается.
14
34
  */
15
35
  withOverlay?: boolean;
36
+ /**
37
+ * Нужно ли применять blur для подложки.
38
+ */
39
+ withBlur?: boolean;
16
40
  children?: ReactNode;
17
41
  /**
18
42
  * Наличие состояния анимации/перехода, по-умолчанию true.
@@ -24,12 +48,6 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
24
48
  throttleMs?: number;
25
49
  view?: string;
26
50
  }
27
- export interface ThemeProviderContext {
28
- lowPerformance: boolean;
29
- [key: string]: unknown;
30
- }
31
- export declare type CommonProps = Pick<SheetProps, 'withTransition' | 'isOpen'> & {
32
- theme: ThemeProviderContext;
33
- };
51
+ export declare type CommonProps = Pick<SheetProps, 'withTransition' | 'isOpen'>;
34
52
  export declare type SheetHookArgs = Pick<SheetProps, 'isOpen'>;
35
53
  //# sourceMappingURL=Sheet.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.types.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpE;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,oBAAY,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,GAAG,QAAQ,CAAC,GAAG;IACtE,KAAK,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAEF,oBAAY,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"Sheet.types.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpE;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,GAAG,QAAQ,CAAC,CAAC;AAExE,oBAAY,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC"}
@@ -1,4 +1,3 @@
1
- export { useThemeContext } from './useThemeContext';
2
1
  export { useSheetSwipe } from './useSheetSwipe';
3
2
  export { useSheet } from './useSheet';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"handleTransition.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/utils/handleTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,aAAK,qBAAqB,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEzD,eAAO,MAAM,gBAAgB,eAAgB,MAAM,aAAa,qBAAqB,KAAG,MAOvF,CAAC"}
1
+ {"version":3,"file":"handleTransition.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/utils/handleTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,aAAK,qBAAqB,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEzD,eAAO,MAAM,gBAAgB,eAAgB,MAAM,aAAa,qBAAqB,KAAG,MAIvF,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { handleTransition } from './handleTransition';
2
+ export declare const DEFAULT_Z_INDEX = "0";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Sheet/Sheet.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAalB,CAAC"}
1
+ {"version":3,"file":"Sheet.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Sheet/Sheet.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAclB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Sheet/Sheet.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAalB,CAAC"}
1
+ {"version":3,"file":"Sheet.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Sheet/Sheet.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAclB,CAAC"}
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- var styled = require('styled-components');
7
-
8
- /**
9
- * Возвращает контекст темы.
10
- * @return {ThemeProviderContext}
11
- */
12
- var useThemeContext = function useThemeContext() {
13
- return React.useContext(styled.ThemeContext) || {};
14
- };
15
-
16
- exports.useThemeContext = useThemeContext;
17
- //# sourceMappingURL=useThemeContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useThemeContext.js","sources":["../../../../src/components/Sheet/hooks/useThemeContext.ts"],"sourcesContent":["import { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\n\nimport { ThemeProviderContext } from '../Sheet.types';\n\n/**\n * Возвращает контекст темы.\n * @return {ThemeProviderContext}\n */\nexport const useThemeContext = (): ThemeProviderContext => {\n return useContext<ThemeProviderContext>(ThemeContext) || {};\n};\n"],"names":["useThemeContext","useContext","ThemeContext"],"mappings":";;;;;;;AAKA;AACA;AACA;AACA;IACaA,eAAe,GAAG,SAAlBA,eAAeA,GAA+B;AACvD,EAAA,OAAOC,gBAAU,CAAuBC,mBAAY,CAAC,IAAI,EAAE,CAAA;AAC/D;;;;"}
@@ -1,13 +0,0 @@
1
- import { useContext } from 'react';
2
- import { ThemeContext } from 'styled-components';
3
-
4
- /**
5
- * Возвращает контекст темы.
6
- * @return {ThemeProviderContext}
7
- */
8
- var useThemeContext = function useThemeContext() {
9
- return useContext(ThemeContext) || {};
10
- };
11
-
12
- export { useThemeContext };
13
- //# sourceMappingURL=useThemeContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useThemeContext.js","sources":["../../../../src/components/Sheet/hooks/useThemeContext.ts"],"sourcesContent":["import { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\n\nimport { ThemeProviderContext } from '../Sheet.types';\n\n/**\n * Возвращает контекст темы.\n * @return {ThemeProviderContext}\n */\nexport const useThemeContext = (): ThemeProviderContext => {\n return useContext<ThemeProviderContext>(ThemeContext) || {};\n};\n"],"names":["useThemeContext","useContext","ThemeContext"],"mappings":";;;AAKA;AACA;AACA;AACA;IACaA,eAAe,GAAG,SAAlBA,eAAeA,GAA+B;AACvD,EAAA,OAAOC,UAAU,CAAuBC,YAAY,CAAC,IAAI,EAAE,CAAA;AAC/D;;;;"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useThemeContext = void 0;
7
- var _react = /*#__PURE__*/require("react");
8
- var _styledComponents = /*#__PURE__*/require("styled-components");
9
- /**
10
- * Возвращает контекст темы.
11
- * @return {ThemeProviderContext}
12
- */
13
- var useThemeContext = exports.useThemeContext = function useThemeContext() {
14
- return (0, _react.useContext)(_styledComponents.ThemeContext) || {};
15
- };
@@ -1,9 +0,0 @@
1
- import { useContext } from 'react';
2
- import { ThemeContext } from 'styled-components';
3
- /**
4
- * Возвращает контекст темы.
5
- * @return {ThemeProviderContext}
6
- */
7
- export var useThemeContext = function useThemeContext() {
8
- return useContext(ThemeContext) || {};
9
- };
@@ -1,7 +0,0 @@
1
- import { ThemeProviderContext } from '../Sheet.types';
2
- /**
3
- * Возвращает контекст темы.
4
- * @return {ThemeProviderContext}
5
- */
6
- export declare const useThemeContext: () => ThemeProviderContext;
7
- //# sourceMappingURL=useThemeContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/useThemeContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,oBAElC,CAAC"}