@alfalab/core-components-bottom-sheet 6.4.1 → 6.5.0
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 +3 -3
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +26 -26
- package/components/header/Component.js +1 -1
- package/components/header/index.css +13 -13
- package/cssm/component.js +2 -2
- package/cssm/types.d.ts +16 -0
- package/esm/component.js +3 -3
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +26 -26
- package/esm/components/header/Component.js +1 -1
- package/esm/components/header/index.css +13 -13
- package/esm/index.css +41 -41
- package/esm/types.d.ts +16 -0
- package/index.css +41 -41
- package/modern/component.js +3 -3
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +26 -26
- package/modern/components/header/Component.js +1 -1
- package/modern/components/header/index.css +13 -13
- package/modern/index.css +41 -41
- package/modern/types.d.ts +16 -0
- package/package.json +4 -7
- package/types.d.ts +16 -0
- package/send-stats.js +0 -82
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1eiy8 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-accent: #ef3124;
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
} :root {
|
|
46
46
|
--bottom-sheet-in-transition: transform 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
47
47
|
--bottom-sheet-out-transition: transform 0.3s ease;
|
|
48
|
-
} .bottom-
|
|
48
|
+
} .bottom-sheet__modal_1ttf0 {
|
|
49
49
|
background-color: transparent;
|
|
50
50
|
position: fixed;
|
|
51
51
|
bottom: 0;
|
|
52
52
|
width: 100%;
|
|
53
53
|
max-width: 600px;
|
|
54
54
|
pointer-events: none;
|
|
55
|
-
} .bottom-
|
|
55
|
+
} .bottom-sheet__wrapper_1ttf0 {
|
|
56
56
|
transform: translateY(100%);
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
pointer-events: none;
|
|
59
59
|
border-top-right-radius: var(--border-radius-xl);
|
|
60
60
|
border-top-left-radius: var(--border-radius-xl);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__component_1ttf0 {
|
|
62
62
|
overflow: hidden;
|
|
63
63
|
position: relative;
|
|
64
64
|
display: flex;
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
border-radius: inherit;
|
|
67
67
|
background-color: var(--color-light-bg-primary);
|
|
68
68
|
pointer-events: all;
|
|
69
|
-
} .bottom-
|
|
69
|
+
} .bottom-sheet__withTransition_1ttf0 {
|
|
70
70
|
transition: var(--bottom-sheet-out-transition);
|
|
71
|
-
} .bottom-
|
|
71
|
+
} .bottom-sheet__scrollableContainer_1ttf0 {
|
|
72
72
|
overflow: auto;
|
|
73
73
|
display: flex;
|
|
74
74
|
flex-direction: column;
|
|
75
75
|
position: relative;
|
|
76
76
|
height: 100%;
|
|
77
77
|
background-color: inherit;
|
|
78
|
-
} .bottom-
|
|
78
|
+
} .bottom-sheet__marker_1ttf0 {
|
|
79
79
|
position: fixed;
|
|
80
80
|
top: var(--gap-2xs);
|
|
81
81
|
left: 50%;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
transform: translateX(-50%);
|
|
86
86
|
background-color: var(--color-light-graphic-quaternary);
|
|
87
87
|
z-index: 1000;
|
|
88
|
-
} .bottom-
|
|
88
|
+
} .bottom-sheet__content_1ttf0 {
|
|
89
89
|
position: relative;
|
|
90
90
|
z-index: 0;
|
|
91
91
|
display: flex;
|
|
@@ -94,73 +94,73 @@
|
|
|
94
94
|
padding: 0 var(--gap-m);
|
|
95
95
|
color: var(--color-light-text-primary);
|
|
96
96
|
background-color: inherit;
|
|
97
|
-
} .bottom-
|
|
97
|
+
} .bottom-sheet__noHeader_1ttf0 {
|
|
98
98
|
padding-top: var(--gap-m);
|
|
99
|
-
} .bottom-
|
|
99
|
+
} .bottom-sheet__noFooter_1ttf0 {
|
|
100
100
|
padding-bottom: var(--gap-m);
|
|
101
|
-
} .bottom-
|
|
101
|
+
} .bottom-sheet__scrollLocked_1ttf0 {
|
|
102
102
|
overflow: hidden;
|
|
103
|
-
} .bottom-
|
|
103
|
+
} .bottom-sheet__hiddenScrollbar_1ttf0 {
|
|
104
104
|
scrollbar-width: none
|
|
105
|
-
} .bottom-
|
|
105
|
+
} .bottom-sheet__hiddenScrollbar_1ttf0::-webkit-scrollbar {
|
|
106
106
|
width: 0;
|
|
107
107
|
height: 0;
|
|
108
|
-
} .bottom-
|
|
108
|
+
} .bottom-sheet__disabledPointerEvents_1ttf0 {
|
|
109
109
|
pointer-events: none;
|
|
110
|
-
} .bottom-
|
|
110
|
+
} .bottom-sheet__appear_1ttf0 .bottom-sheet__wrapper_1ttf0, .bottom-sheet__enter_1ttf0 .bottom-sheet__wrapper_1ttf0 {
|
|
111
111
|
transition: none;
|
|
112
|
-
} .bottom-
|
|
112
|
+
} .bottom-sheet__appearActive_1ttf0 .bottom-sheet__wrapper_1ttf0, .bottom-sheet__enterActive_1ttf0 .bottom-sheet__wrapper_1ttf0 {
|
|
113
113
|
transition: var(--bottom-sheet-in-transition);
|
|
114
114
|
transform: translateY(0);
|
|
115
|
-
} .bottom-
|
|
115
|
+
} .bottom-sheet__enterDone_1ttf0 .bottom-sheet__wrapper_1ttf0, .bottom-sheet__appearDone_1ttf0 .bottom-sheet__wrapper_1ttf0 {
|
|
116
116
|
transform: translateY(0);
|
|
117
|
-
} .bottom-
|
|
117
|
+
} .bottom-sheet__exit_1ttf0 .bottom-sheet__wrapper_1ttf0 {
|
|
118
118
|
transform: translateY(0);
|
|
119
|
-
} .bottom-
|
|
119
|
+
} .bottom-sheet__exitActive_1ttf0 .bottom-sheet__wrapper_1ttf0 {
|
|
120
120
|
transition: var(--bottom-sheet-out-transition);
|
|
121
121
|
transform: translateY(100%);
|
|
122
|
-
} .bottom-sheet__background-
|
|
122
|
+
} .bottom-sheet__background-accent_1ttf0 {
|
|
123
123
|
background-color: var(--color-light-bg-accent);
|
|
124
|
-
} .bottom-sheet__background-
|
|
124
|
+
} .bottom-sheet__background-info_1ttf0 {
|
|
125
125
|
background-color: var(--color-light-bg-info);
|
|
126
|
-
} .bottom-sheet__background-attention-
|
|
126
|
+
} .bottom-sheet__background-attention-muted_1ttf0 {
|
|
127
127
|
background-color: var(--color-light-bg-attention-muted);
|
|
128
|
-
} .bottom-sheet__background-positive-
|
|
128
|
+
} .bottom-sheet__background-positive-muted_1ttf0 {
|
|
129
129
|
background-color: var(--color-light-bg-positive-muted);
|
|
130
|
-
} .bottom-sheet__background-negative-
|
|
130
|
+
} .bottom-sheet__background-negative-muted_1ttf0 {
|
|
131
131
|
background-color: var(--color-light-bg-negative-muted);
|
|
132
|
-
} .bottom-sheet__background-
|
|
132
|
+
} .bottom-sheet__background-primary_1ttf0 {
|
|
133
133
|
background-color: var(--color-light-bg-primary);
|
|
134
|
-
} .bottom-sheet__background-primary-
|
|
134
|
+
} .bottom-sheet__background-primary-inverted_1ttf0 {
|
|
135
135
|
background-color: var(--color-light-bg-primary-inverted);
|
|
136
|
-
} .bottom-sheet__background-
|
|
136
|
+
} .bottom-sheet__background-secondary_1ttf0 {
|
|
137
137
|
background-color: var(--color-light-bg-secondary);
|
|
138
|
-
} .bottom-sheet__background-secondary-
|
|
138
|
+
} .bottom-sheet__background-secondary-inverted_1ttf0 {
|
|
139
139
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
140
|
-
} .bottom-sheet__background-
|
|
140
|
+
} .bottom-sheet__background-tertiary_1ttf0 {
|
|
141
141
|
background-color: var(--color-light-bg-tertiary);
|
|
142
|
-
} .bottom-sheet__background-tertiary-
|
|
142
|
+
} .bottom-sheet__background-tertiary-inverted_1ttf0 {
|
|
143
143
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
144
|
-
} .bottom-sheet__background-
|
|
144
|
+
} .bottom-sheet__background-quaternary_1ttf0 {
|
|
145
145
|
background-color: var(--color-light-bg-quaternary);
|
|
146
|
-
} .bottom-sheet__background-quaternary-
|
|
146
|
+
} .bottom-sheet__background-quaternary-inverted_1ttf0 {
|
|
147
147
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
148
|
-
} .bottom-sheet__background-specialbg-
|
|
148
|
+
} .bottom-sheet__background-specialbg-component_1ttf0 {
|
|
149
149
|
background-color: var(--color-light-specialbg-component);
|
|
150
|
-
} .bottom-sheet__background-specialbg-component-
|
|
150
|
+
} .bottom-sheet__background-specialbg-component-inverted_1ttf0 {
|
|
151
151
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
152
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
152
|
+
} .bottom-sheet__background-specialbg-primary-grouped_1ttf0 {
|
|
153
153
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
154
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
154
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_1ttf0 {
|
|
155
155
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
156
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
156
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_1ttf0 {
|
|
157
157
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
158
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
158
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_1ttf0 {
|
|
159
159
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
160
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
160
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_1ttf0 {
|
|
161
161
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
162
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
162
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_1ttf0 {
|
|
163
163
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
164
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
164
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_1ttf0 {
|
|
165
165
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
166
166
|
}
|
package/modern/types.d.ts
CHANGED
|
@@ -219,5 +219,21 @@ type BottomSheetProps = {
|
|
|
219
219
|
* Вызывается после притягивания к одной из `magneticAreas`
|
|
220
220
|
*/
|
|
221
221
|
onMagnetize?: (index: number) => void;
|
|
222
|
+
/**
|
|
223
|
+
* Содержимое bottom-sheet всегда в DOM
|
|
224
|
+
*/
|
|
225
|
+
keepMounted?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Отключает автоматический перевод фокуса на bottom-sheet при открытии
|
|
228
|
+
*/
|
|
229
|
+
disableAutoFocus?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
|
|
232
|
+
*/
|
|
233
|
+
disableRestoreFocus?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Отключает вызов `onClose` при нажатии Escape
|
|
236
|
+
*/
|
|
237
|
+
disableEscapeKeyDown?: boolean;
|
|
222
238
|
};
|
|
223
239
|
export { BottomSheetTitleAlign, BottomSheetProps };
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-bottom-sheet",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "Bottom sheet mobile component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "./esm/index.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"postinstall": "node -e \"if (require('fs').existsSync('./send-stats.js')){require('./send-stats.js')} \""
|
|
11
|
-
},
|
|
12
9
|
"publishConfig": {
|
|
13
10
|
"access": "public",
|
|
14
11
|
"directory": "dist"
|
|
@@ -18,9 +15,9 @@
|
|
|
18
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
19
16
|
},
|
|
20
17
|
"dependencies": {
|
|
21
|
-
"@alfalab/core-components-backdrop": "^3.0.
|
|
22
|
-
"@alfalab/core-components-base-modal": "^5.2.
|
|
23
|
-
"@alfalab/core-components-navigation-bar": "^0.3.
|
|
18
|
+
"@alfalab/core-components-backdrop": "^3.0.7",
|
|
19
|
+
"@alfalab/core-components-base-modal": "^5.2.1",
|
|
20
|
+
"@alfalab/core-components-navigation-bar": "^0.3.7",
|
|
24
21
|
"classnames": "^2.3.1",
|
|
25
22
|
"react-div-100vh": "^0.7.0",
|
|
26
23
|
"react-merge-refs": "^1.1.0",
|
package/types.d.ts
CHANGED
|
@@ -219,5 +219,21 @@ type BottomSheetProps = {
|
|
|
219
219
|
* Вызывается после притягивания к одной из `magneticAreas`
|
|
220
220
|
*/
|
|
221
221
|
onMagnetize?: (index: number) => void;
|
|
222
|
+
/**
|
|
223
|
+
* Содержимое bottom-sheet всегда в DOM
|
|
224
|
+
*/
|
|
225
|
+
keepMounted?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Отключает автоматический перевод фокуса на bottom-sheet при открытии
|
|
228
|
+
*/
|
|
229
|
+
disableAutoFocus?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
|
|
232
|
+
*/
|
|
233
|
+
disableRestoreFocus?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Отключает вызов `onClose` при нажатии Escape
|
|
236
|
+
*/
|
|
237
|
+
disableEscapeKeyDown?: boolean;
|
|
222
238
|
};
|
|
223
239
|
export { BottomSheetTitleAlign, BottomSheetProps };
|
package/send-stats.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const http = require('http');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const { promisify } = require('util');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
const readFile = promisify(fs.readFile);
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
const remoteHost = process.env.NIS_HOST || 'digital';
|
|
10
|
-
const remotePort = process.env.NIS_PORT || 80;
|
|
11
|
-
const remotePath = process.env.NIS_PATH || '/npm-install-stats/api/install-stats';
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const [_, node, os, arch] =
|
|
15
|
-
/node\/v(\d+\.\d+\.\d+) (\w+) (\w+)/.exec(process.env.npm_config_user_agent) || [];
|
|
16
|
-
const [__, npm] = /npm\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
|
|
17
|
-
const [___, yarn] = /yarn\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
|
|
18
|
-
|
|
19
|
-
let ownPackageJson, packageJson;
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const result = await Promise.all([
|
|
23
|
-
readFile(path.join(process.cwd(), 'package.json'), 'utf-8'),
|
|
24
|
-
readFile(path.join(process.cwd(), '../../../package.json'), 'utf-8'),
|
|
25
|
-
]);
|
|
26
|
-
|
|
27
|
-
ownPackageJson = JSON.parse(result[0]);
|
|
28
|
-
packageJson = JSON.parse(result[1]);
|
|
29
|
-
} catch (err) {
|
|
30
|
-
ownPackageJson = '';
|
|
31
|
-
packageJson = '';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const data = {
|
|
35
|
-
node,
|
|
36
|
-
npm,
|
|
37
|
-
yarn,
|
|
38
|
-
os,
|
|
39
|
-
arch,
|
|
40
|
-
ownPackageJson: JSON.stringify(ownPackageJson),
|
|
41
|
-
packageJson: JSON.stringify(packageJson),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const body = JSON.stringify(data);
|
|
45
|
-
|
|
46
|
-
const options = {
|
|
47
|
-
host: remoteHost,
|
|
48
|
-
port: remotePort,
|
|
49
|
-
path: remotePath,
|
|
50
|
-
method: 'POST',
|
|
51
|
-
headers: {
|
|
52
|
-
'Content-Type': 'application/json',
|
|
53
|
-
'Content-Length': body.length,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return new Promise((resolve, reject) => {
|
|
58
|
-
const req = http.request(options, (res) => {
|
|
59
|
-
res.on('end', () => {
|
|
60
|
-
resolve();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
req.on('error', () => {
|
|
65
|
-
reject();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
req.write(body);
|
|
69
|
-
req.end();
|
|
70
|
-
});
|
|
71
|
-
} catch (error) {
|
|
72
|
-
throw error;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
main()
|
|
77
|
-
.then(() => {
|
|
78
|
-
process.exit(0);
|
|
79
|
-
})
|
|
80
|
-
.catch(() => {
|
|
81
|
-
process.exit(0);
|
|
82
|
-
});
|