react-side-sheet-pro 0.1.3 → 0.1.4
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/dist/components/SideSheetContainer.js +75 -0
- package/dist/components/SideSheetContent.js +16 -0
- package/dist/components/SideSheetFooter.js +16 -0
- package/dist/components/SideSheetHeader.js +25 -0
- package/dist/components/SideSheetProvider.js +179 -0
- package/dist/constants/defaultOptions.js +45 -0
- package/dist/contexts/SideSheetReducer.js +48 -0
- package/dist/hooks/useSideSheet.js +17 -0
- package/dist/index.js +39 -13833
- package/dist/types/index.js +4 -0
- package/package.json +82 -86
- package/src/components/SideSheetProvider.tsx +118 -107
- package/src/constants/defaultOptions.ts +4 -3
- package/src/types/index.ts +1 -0
- package/dist/index.css +0 -191
- package/dist/index.d.ts +0 -60
- package/dist/index.esm.d.ts +0 -60
- package/dist/index.esm.js +0 -13825
- package/dist/index.umd.d.ts +0 -60
- package/dist/index.umd.js +0 -13836
- package/dist/index.umd.min.d.ts +0 -60
- package/dist/index.umd.min.js +0 -7
package/package.json
CHANGED
|
@@ -1,86 +1,82 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-side-sheet-pro",
|
|
3
|
-
"description": "A flexible React SideSheet component for displaying contextual information.",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"react",
|
|
8
|
-
"react-component",
|
|
9
|
-
"modal",
|
|
10
|
-
"side-sheet",
|
|
11
|
-
"slide-sheet"
|
|
12
|
-
],
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
},
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"react-
|
|
47
|
-
},
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"@babel/
|
|
54
|
-
"@babel/
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"eslint": "
|
|
68
|
-
"eslint-
|
|
69
|
-
"eslint-
|
|
70
|
-
"eslint-plugin-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"rollup": "^
|
|
77
|
-
"rollup-plugin-
|
|
78
|
-
"rollup-plugin-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"ts-loader": "^6.2.1",
|
|
84
|
-
"typescript": "^3.9.3"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-side-sheet-pro",
|
|
3
|
+
"description": "A flexible React SideSheet component for displaying contextual information.",
|
|
4
|
+
"version": "0.1.4",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"react",
|
|
8
|
+
"react-component",
|
|
9
|
+
"modal",
|
|
10
|
+
"side-sheet",
|
|
11
|
+
"slide-sheet"
|
|
12
|
+
],
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"typings": "index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"src",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=10"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"lint": "eslint './src/**/*.{ts,tsx,js,jsx}'",
|
|
25
|
+
"lint-fix": "eslint --fix './src/**/*.{ts,tsx,js,jsx}'",
|
|
26
|
+
"prettier": "prettier ./src/** ./playground/src/** --write",
|
|
27
|
+
"build": "babel --extensions \".ts,.tsx\" src --out-dir dist"
|
|
28
|
+
},
|
|
29
|
+
"husky": {
|
|
30
|
+
"hooks": {
|
|
31
|
+
"pre-push": "npm run lint"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"repository": "git+https://github.com/richardDobron/react-side-sheet-pro.git",
|
|
35
|
+
"author": "Richard Dobroň",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/richardDobron/react-side-sheet-pro/issues"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
41
|
+
"classnames": "^2.3.1",
|
|
42
|
+
"react-icons": "^4"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18 || ^19",
|
|
46
|
+
"react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18 || ^19"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@babel/cli": "^7.14.3",
|
|
50
|
+
"@babel/core": "^7.14.3",
|
|
51
|
+
"@babel/plugin-proposal-class-properties": "^7.14.3",
|
|
52
|
+
"@babel/preset-env": "^7.14.3",
|
|
53
|
+
"@babel/preset-react": "^7.14.3",
|
|
54
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
55
|
+
"@types/react": "^17.0.9",
|
|
56
|
+
"@types/react-dom": "^17.0.6",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^2.24.0",
|
|
58
|
+
"@typescript-eslint/parser": "^2.24.0",
|
|
59
|
+
"@wessberg/rollup-plugin-ts": "^1.2.21",
|
|
60
|
+
"babel-loader": "^8.0.6",
|
|
61
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
62
|
+
"babel-plugin-typescript-to-proptypes": "^1.3.2",
|
|
63
|
+
"eslint": "6.6.0",
|
|
64
|
+
"eslint-config-airbnb": "18.0.1",
|
|
65
|
+
"eslint-config-prettier": "^6.10.0",
|
|
66
|
+
"eslint-plugin-import": "^2.18.2",
|
|
67
|
+
"eslint-plugin-jest": "^22.6.3",
|
|
68
|
+
"eslint-plugin-jsx-a11y": "^6.2.3",
|
|
69
|
+
"eslint-plugin-prettier": "^3.1.2",
|
|
70
|
+
"eslint-plugin-react": "^7.14.3",
|
|
71
|
+
"prettier": "^1.19.1",
|
|
72
|
+
"rollup": "^1.27.0",
|
|
73
|
+
"rollup-plugin-babel": "^4.3.3",
|
|
74
|
+
"rollup-plugin-commonjs": "^10.1.0",
|
|
75
|
+
"rollup-plugin-copy": "^3.4.0",
|
|
76
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
77
|
+
"rollup-plugin-replace": "^2.2.0",
|
|
78
|
+
"rollup-plugin-terser": "^5.1.2",
|
|
79
|
+
"ts-loader": "^6.2.1",
|
|
80
|
+
"typescript": "^3.9.3"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -1,107 +1,118 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
createContext,
|
|
3
|
-
ReactNode,
|
|
4
|
-
useCallback,
|
|
5
|
-
useEffect,
|
|
6
|
-
useReducer,
|
|
7
|
-
useRef,
|
|
8
|
-
} from 'react';
|
|
9
|
-
import { createPortal } from 'react-dom';
|
|
10
|
-
import {
|
|
11
|
-
DEFAULT_OPTIONS,
|
|
12
|
-
DEFAULT_SHEET_OPTIONS,
|
|
13
|
-
} from '../constants/defaultOptions';
|
|
14
|
-
import {
|
|
15
|
-
SideElement,
|
|
16
|
-
SideOptions,
|
|
17
|
-
SideSheetContextValue,
|
|
18
|
-
SideSheetOptions,
|
|
19
|
-
SideStackItem,
|
|
20
|
-
} from '../types';
|
|
21
|
-
import { SideSheetContainer } from './SideSheetContainer';
|
|
22
|
-
import { SideSheetReducer } from '../contexts/SideSheetReducer';
|
|
23
|
-
|
|
24
|
-
export const SideSheetContext = createContext<SideSheetContextValue | null>(
|
|
25
|
-
null
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export const SideSheetProvider: React.FC<{
|
|
29
|
-
children: ReactNode;
|
|
30
|
-
configuration?: Partial<SideSheetOptions>;
|
|
31
|
-
}> = ({ children, configuration }) => {
|
|
32
|
-
const [stack, dispatch] = useReducer(SideSheetReducer, []);
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
dispatch({ type: '
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
createContext,
|
|
3
|
+
ReactNode,
|
|
4
|
+
useCallback,
|
|
5
|
+
useEffect,
|
|
6
|
+
useReducer,
|
|
7
|
+
useRef,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import { createPortal } from 'react-dom';
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_OPTIONS,
|
|
12
|
+
DEFAULT_SHEET_OPTIONS,
|
|
13
|
+
} from '../constants/defaultOptions';
|
|
14
|
+
import {
|
|
15
|
+
SideElement,
|
|
16
|
+
SideOptions,
|
|
17
|
+
SideSheetContextValue,
|
|
18
|
+
SideSheetOptions,
|
|
19
|
+
SideStackItem,
|
|
20
|
+
} from '../types';
|
|
21
|
+
import { SideSheetContainer } from './SideSheetContainer';
|
|
22
|
+
import { SideSheetReducer } from '../contexts/SideSheetReducer';
|
|
23
|
+
|
|
24
|
+
export const SideSheetContext = createContext<SideSheetContextValue | null>(
|
|
25
|
+
null
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export const SideSheetProvider: React.FC<{
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
configuration?: Partial<SideSheetOptions>;
|
|
31
|
+
}> = ({ children, configuration }) => {
|
|
32
|
+
const [stack, dispatch] = useReducer(SideSheetReducer, []);
|
|
33
|
+
const stackRef = useRef<SideStackItem[]>(stack);
|
|
34
|
+
const overflowRef = useRef('');
|
|
35
|
+
const idRef = useRef(0);
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
stackRef.current = stack;
|
|
39
|
+
}, [stack]);
|
|
40
|
+
|
|
41
|
+
const open = useCallback((element: SideElement, opts: SideOptions = {}) => {
|
|
42
|
+
const id = ++idRef.current;
|
|
43
|
+
const options = { ...DEFAULT_SHEET_OPTIONS, ...opts };
|
|
44
|
+
if (!config.enableOverflow && stackRef.current.length === 0) {
|
|
45
|
+
overflowRef.current = document.body.style.overflow;
|
|
46
|
+
document.body.style.overflow = 'hidden';
|
|
47
|
+
}
|
|
48
|
+
dispatch({
|
|
49
|
+
type: 'OPEN',
|
|
50
|
+
payload: { id, element, options, state: 'opening' },
|
|
51
|
+
});
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
dispatch({ type: 'SET_OPEN', id });
|
|
54
|
+
options.onOpen?.(id);
|
|
55
|
+
}, options.animationDuration);
|
|
56
|
+
return id;
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
const close = useCallback(async (id: number | null) => {
|
|
60
|
+
const itemsToClose =
|
|
61
|
+
id === null
|
|
62
|
+
? [...stackRef.current]
|
|
63
|
+
: stackRef.current.filter(i => i.id === id);
|
|
64
|
+
|
|
65
|
+
for (const item of itemsToClose) {
|
|
66
|
+
if (item.options.confirmBeforeClose) {
|
|
67
|
+
const confirmCallback =
|
|
68
|
+
item.options.confirmCallback ?? config.confirmCallback;
|
|
69
|
+
const confirmed = await confirmCallback(
|
|
70
|
+
item.options.confirmMessage ?? config.confirmMessage
|
|
71
|
+
);
|
|
72
|
+
if (!confirmed) return;
|
|
73
|
+
}
|
|
74
|
+
item.options.onClose?.(item.id);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (
|
|
78
|
+
!config.enableOverflow &&
|
|
79
|
+
stackRef.current.length <= itemsToClose.length
|
|
80
|
+
) {
|
|
81
|
+
document.body.style.overflow = overflowRef.current;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const duration =
|
|
85
|
+
itemsToClose[itemsToClose.length - 1]?.options.animationDuration;
|
|
86
|
+
dispatch({ type: 'CLOSE', id });
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
if (id === null) {
|
|
89
|
+
itemsToClose.forEach(item => dispatch({ type: 'REMOVE', id: item.id }));
|
|
90
|
+
} else {
|
|
91
|
+
dispatch({ type: 'REMOVE', id: id! });
|
|
92
|
+
}
|
|
93
|
+
}, duration);
|
|
94
|
+
}, []);
|
|
95
|
+
|
|
96
|
+
const update = useCallback((id: number, options: Partial<SideOptions>) => {
|
|
97
|
+
dispatch({ type: 'UPDATE', id, options });
|
|
98
|
+
}, []);
|
|
99
|
+
const config = { ...DEFAULT_OPTIONS, ...configuration } as Required<
|
|
100
|
+
SideSheetOptions
|
|
101
|
+
>;
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<SideSheetContext.Provider value={{ open, close, update, config }}>
|
|
105
|
+
{children}
|
|
106
|
+
{createPortal(
|
|
107
|
+
<SideSheetContainer
|
|
108
|
+
stack={stack}
|
|
109
|
+
close={close}
|
|
110
|
+
open={open}
|
|
111
|
+
update={update}
|
|
112
|
+
config={config}
|
|
113
|
+
/>,
|
|
114
|
+
document.body
|
|
115
|
+
)}
|
|
116
|
+
</SideSheetContext.Provider>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
@@ -2,12 +2,13 @@ import { SideOptions, SideSheetOptions } from '../types';
|
|
|
2
2
|
|
|
3
3
|
export const DEFAULT_OPTIONS: Required<SideSheetOptions> = {
|
|
4
4
|
side: 'right',
|
|
5
|
+
enableOverflow: false,
|
|
5
6
|
mountStrategy: 'all',
|
|
6
7
|
confirmMessage: 'Are you sure you want to close?',
|
|
7
8
|
confirmCallback: async (msg: string) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
typeof window !== 'undefined'
|
|
10
|
+
? Promise.resolve(window.confirm(msg))
|
|
11
|
+
: Promise.resolve(true),
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const DEFAULT_SHEET_OPTIONS: Required<SideOptions> = {
|
package/src/types/index.ts
CHANGED
package/dist/index.css
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
.sidesheet-overlay {
|
|
2
|
-
opacity: 0.3;
|
|
3
|
-
transition: all 0.4s;
|
|
4
|
-
background: #000;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
position: fixed;
|
|
8
|
-
right: 0;
|
|
9
|
-
top: 0;
|
|
10
|
-
visibility: visible;
|
|
11
|
-
z-index: 10000;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.sidesheet-right {
|
|
15
|
-
right: 0;
|
|
16
|
-
transform: translateX(100%);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.sidesheet-left {
|
|
20
|
-
left: 0;
|
|
21
|
-
transform: translateX(-100%);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.sidesheet-right.sidesheet-animation-open {
|
|
25
|
-
animation: sidesheet-open-right 240ms cubic-bezier(0, 0, 0.3, 1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.sidesheet-left.sidesheet-animation-open {
|
|
29
|
-
animation: sidesheet-open-left 240ms cubic-bezier(0, 0, 0.3, 1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sidesheet.sidesheet-animation-open {
|
|
33
|
-
transform: translateX(0);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.sidesheet-right.sidesheet-animation-closing {
|
|
37
|
-
animation: sidesheet-close-right 240ms cubic-bezier(0, 0, 0.3, 1);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.sidesheet-left.sidesheet-animation-closing {
|
|
41
|
-
animation: sidesheet-close-left 240ms cubic-bezier(0, 0, 0.3, 1);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@keyframes sidesheet-open-right {
|
|
45
|
-
from {
|
|
46
|
-
transform: translateX(100%);
|
|
47
|
-
}
|
|
48
|
-
to {
|
|
49
|
-
transform: translateX(0);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@keyframes sidesheet-close-right {
|
|
54
|
-
from {
|
|
55
|
-
transform: translateX(0);
|
|
56
|
-
}
|
|
57
|
-
to {
|
|
58
|
-
transform: translateX(100%);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@keyframes sidesheet-open-left {
|
|
63
|
-
from {
|
|
64
|
-
transform: translateX(-100%);
|
|
65
|
-
}
|
|
66
|
-
to {
|
|
67
|
-
transform: translateX(0);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@keyframes sidesheet-close-left {
|
|
72
|
-
from {
|
|
73
|
-
transform: translateX(0);
|
|
74
|
-
}
|
|
75
|
-
to {
|
|
76
|
-
transform: translateX(-100%);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.sidesheet {
|
|
81
|
-
flex-direction: column;
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-wrap: nowrap;
|
|
84
|
-
background: #f1f3f4;
|
|
85
|
-
bottom: 0;
|
|
86
|
-
right: 0;
|
|
87
|
-
max-width: 100%;
|
|
88
|
-
overflow-x: hidden;
|
|
89
|
-
overflow-y: auto;
|
|
90
|
-
position: fixed;
|
|
91
|
-
z-index: 10000;
|
|
92
|
-
top: 0;
|
|
93
|
-
width: 100%;
|
|
94
|
-
box-shadow: 0 0 10px -5px rgba(0, 0, 0, 0.2), 0 0 24px 2px rgba(0, 0, 0, 0.14),
|
|
95
|
-
0 0 30px 5px rgba(0, 0, 0, 0.12);
|
|
96
|
-
transition: transform 0.3s ease, width 0.3s ease;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.sheet-white {
|
|
100
|
-
background: #fff;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.sidesheet-header .sidesheet-header-btn {
|
|
104
|
-
background: transparent;
|
|
105
|
-
border: none;
|
|
106
|
-
cursor: pointer;
|
|
107
|
-
padding: 7px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.sidesheet-header {
|
|
111
|
-
padding: 12px;
|
|
112
|
-
gap: 16px;
|
|
113
|
-
border-bottom: 1px solid #dadce0;
|
|
114
|
-
background: #fff;
|
|
115
|
-
display: flex;
|
|
116
|
-
justify-content: space-between;
|
|
117
|
-
align-items: center;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.sidesheet-header svg {
|
|
121
|
-
width: 24px;
|
|
122
|
-
height: 24px;
|
|
123
|
-
display: block;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.sidesheet-header .sidesheet-header-btn {
|
|
127
|
-
border-radius: 50%;
|
|
128
|
-
height: 40px;
|
|
129
|
-
line-height: 40px;
|
|
130
|
-
align-items: center;
|
|
131
|
-
width: 40px;
|
|
132
|
-
justify-content: center;
|
|
133
|
-
display: flex;
|
|
134
|
-
opacity: 0.8;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.sidesheet-header .sidesheet-header-btn:hover {
|
|
138
|
-
opacity: 1;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.sidesheet-header .sidesheet-header-btn:focus {
|
|
142
|
-
background-color: rgba(64, 64, 64, 0.12);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.sidesheet-header-close:hover {
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.sidesheet-header-title {
|
|
150
|
-
font-size: 20px;
|
|
151
|
-
font-weight: 400;
|
|
152
|
-
align-items: center;
|
|
153
|
-
display: flex;
|
|
154
|
-
flex: 1 1 auto;
|
|
155
|
-
overflow: hidden;
|
|
156
|
-
text-overflow: ellipsis;
|
|
157
|
-
white-space: nowrap;
|
|
158
|
-
padding: 6px 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.sidesheet-content.sidesheet-centered {
|
|
162
|
-
margin: 0 auto;
|
|
163
|
-
max-width: 768px;
|
|
164
|
-
width: 100%;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.sidesheet-content {
|
|
168
|
-
flex: 1 1 auto;
|
|
169
|
-
overflow-y: auto;
|
|
170
|
-
position: relative;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.sidesheet-content.sidesheet-padding {
|
|
174
|
-
padding: 24px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.sidesheet-card {
|
|
178
|
-
background: #fff;
|
|
179
|
-
border-radius: 8px;
|
|
180
|
-
padding: 24px;
|
|
181
|
-
box-shadow: 0 0 0 1px #dadce0;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.sidesheet-footer {
|
|
185
|
-
padding: 16px;
|
|
186
|
-
border-top: 1px solid #dadce0;
|
|
187
|
-
background: #fff;
|
|
188
|
-
display: flex;
|
|
189
|
-
justify-content: space-between;
|
|
190
|
-
align-items: center;
|
|
191
|
-
}
|