@salutejs/plasma-new-hope 0.88.0-canary.1225.9348142616.0 → 0.88.0-canary.1225.9415530810.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Sheet/Sheet.css +9 -5
- package/cjs/components/Sheet/Sheet.js +30 -9
- package/cjs/components/Sheet/Sheet.js.map +1 -1
- package/cjs/components/Sheet/Sheet.styles.js +81 -16
- package/cjs/components/Sheet/Sheet.styles.js.map +1 -1
- package/cjs/components/Sheet/{Sheet.styles_1bm46e7.css → Sheet.styles_kdjr5m.css} +5 -3
- package/cjs/components/Sheet/Sheet.tokens.js +2 -1
- package/cjs/components/Sheet/Sheet.tokens.js.map +1 -1
- package/cjs/components/Sheet/utils/handleTransition.js +2 -3
- package/cjs/components/Sheet/utils/handleTransition.js.map +1 -1
- package/cjs/components/Sheet/utils/index.js +8 -0
- package/cjs/components/Sheet/utils/index.js.map +1 -0
- package/cjs/index.css +7 -5
- package/es/components/Sheet/Sheet.css +9 -5
- package/es/components/Sheet/Sheet.js +32 -11
- package/es/components/Sheet/Sheet.js.map +1 -1
- package/es/components/Sheet/Sheet.styles.js +79 -16
- package/es/components/Sheet/Sheet.styles.js.map +1 -1
- package/es/components/Sheet/{Sheet.styles_1bm46e7.css → Sheet.styles_kdjr5m.css} +5 -3
- package/es/components/Sheet/Sheet.tokens.js +2 -1
- package/es/components/Sheet/Sheet.tokens.js.map +1 -1
- package/es/components/Sheet/utils/handleTransition.js +2 -3
- package/es/components/Sheet/utils/handleTransition.js.map +1 -1
- package/es/components/Sheet/utils/index.js +4 -0
- package/es/components/Sheet/utils/index.js.map +1 -0
- package/es/index.css +7 -5
- package/package.json +2 -2
- package/styled-components/cjs/components/Sheet/Sheet.js +30 -8
- package/styled-components/cjs/components/Sheet/Sheet.styles.js +36 -9
- package/styled-components/cjs/components/Sheet/Sheet.tokens.js +2 -1
- package/styled-components/cjs/components/Sheet/hooks/index.js +0 -7
- package/styled-components/cjs/components/Sheet/utils/handleTransition.js +2 -3
- package/styled-components/cjs/components/Sheet/utils/index.js +3 -1
- package/styled-components/cjs/components/Sheet/variations/_view/tokens.json +4 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +142 -40
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.stories.tsx +134 -39
- package/styled-components/es/components/Sheet/Sheet.js +33 -11
- package/styled-components/es/components/Sheet/Sheet.styles.js +35 -8
- package/styled-components/es/components/Sheet/Sheet.tokens.js +2 -1
- package/styled-components/es/components/Sheet/hooks/index.js +0 -1
- package/styled-components/es/components/Sheet/utils/handleTransition.js +2 -3
- package/styled-components/es/components/Sheet/utils/index.js +2 -1
- package/styled-components/es/components/Sheet/variations/_view/tokens.json +4 -1
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +142 -40
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.stories.tsx +134 -39
- package/types/components/Sheet/Sheet.d.ts +1 -0
- package/types/components/Sheet/Sheet.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.styles.d.ts +12 -8
- package/types/components/Sheet/Sheet.styles.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.tokens.d.ts +2 -1
- package/types/components/Sheet/Sheet.tokens.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.types.d.ts +25 -7
- package/types/components/Sheet/Sheet.types.d.ts.map +1 -1
- package/types/components/Sheet/hooks/index.d.ts +0 -1
- package/types/components/Sheet/hooks/index.d.ts.map +1 -1
- package/types/components/Sheet/utils/handleTransition.d.ts.map +1 -1
- package/types/components/Sheet/utils/index.d.ts +1 -0
- package/types/components/Sheet/utils/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Sheet/Sheet.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Sheet/Sheet.config.d.ts.map +1 -1
- package/cjs/components/Sheet/hooks/useThemeContext.js +0 -17
- package/cjs/components/Sheet/hooks/useThemeContext.js.map +0 -1
- package/es/components/Sheet/hooks/useThemeContext.js +0 -13
- package/es/components/Sheet/hooks/useThemeContext.js.map +0 -1
- package/styled-components/cjs/components/Sheet/hooks/useThemeContext.js +0 -15
- package/styled-components/es/components/Sheet/hooks/useThemeContext.js +0 -9
- package/types/components/Sheet/hooks/useThemeContext.d.ts +0 -7
- package/types/components/Sheet/hooks/useThemeContext.d.ts.map +0 -1
@@ -1,13 +1,17 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
3
|
-
|
2
|
+
import { CommonProps } from './Sheet.types';
|
3
|
+
export declare const StyledWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & CommonProps>;
|
4
|
+
export declare const StyledContentWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & CommonProps>;
|
5
|
+
export declare const StyledSheetHandle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
6
|
+
export declare const StyledSheetContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
7
|
+
hasHeader?: boolean | undefined;
|
8
|
+
hasFooter?: boolean | undefined;
|
4
9
|
}>;
|
5
|
-
export declare const
|
6
|
-
|
10
|
+
export declare const StyledSheetHeader: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
11
|
+
isHeaderFixed?: boolean | undefined;
|
7
12
|
}>;
|
8
|
-
export declare const
|
9
|
-
|
13
|
+
export declare const StyledSheetBody: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
14
|
+
export declare const StyledSheetFooter: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
15
|
+
isFooterFixed?: boolean | undefined;
|
10
16
|
}>;
|
11
|
-
export declare const StyledSheetContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
12
|
-
export declare const StyledSheetHandle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
13
17
|
//# sourceMappingURL=Sheet.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Sheet.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.styles.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"Sheet.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,eAAO,MAAM,aAAa,0JAczB,CAAC;AAEF,eAAO,MAAM,oBAAoB,0JAiBhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAc7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;EAe9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;EAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe,qKAAe,CAAC;AAE5C,eAAO,MAAM,iBAAiB;;EAQ7B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Sheet.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"Sheet.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;CAOlB,CAAC"}
|
@@ -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
|
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
|
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 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
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,
|
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 +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;;;;;;;;;
|
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;;;;;;;;;
|
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 +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"}
|