@alfalab/core-components-bottom-sheet 6.0.5 → 6.2.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.d.ts +5 -0
- package/component.js +256 -13
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +71 -6
- package/components/header/Component.d.ts +7 -0
- package/components/header/Component.js +31 -13
- package/components/header/index.css +14 -15
- package/components/swipeable-backdrop/Component.d.ts +1 -1
- package/cssm/component.d.ts +5 -0
- package/cssm/component.js +256 -15
- package/cssm/components/footer/index.module.css +67 -2
- package/cssm/components/header/Component.d.ts +7 -0
- package/cssm/components/header/Component.js +30 -16
- package/cssm/components/header/index.module.css +1 -2
- package/cssm/components/swipeable-backdrop/Component.d.ts +1 -1
- package/cssm/index.d.ts +3 -1
- package/cssm/index.js +7 -5
- package/cssm/index.module.css +92 -13
- package/{component-76642442.d.ts → cssm/types.d.ts} +41 -12
- package/cssm/types.js +2 -0
- package/cssm/utils.d.ts +8 -0
- package/cssm/utils.js +33 -0
- package/esm/component.d.ts +5 -0
- package/esm/component.js +253 -10
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +71 -6
- package/esm/components/header/Component.d.ts +7 -0
- package/esm/components/header/Component.js +29 -12
- package/esm/components/header/index.css +14 -15
- package/esm/components/swipeable-backdrop/Component.d.ts +1 -1
- package/esm/index.css +102 -23
- package/esm/index.d.ts +3 -1
- package/esm/index.js +3 -1
- package/esm/{component-f5632dcc.d.ts → types.d.ts} +41 -12
- package/esm/types.js +1 -0
- package/esm/utils.d.ts +8 -0
- package/esm/utils.js +23 -0
- package/index.css +102 -23
- package/index.d.ts +3 -1
- package/index.js +6 -4
- package/modern/component.d.ts +5 -0
- package/modern/component.js +284 -9
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +71 -6
- package/modern/components/header/Component.d.ts +7 -0
- package/modern/components/header/Component.js +26 -11
- package/modern/components/header/index.css +14 -15
- package/modern/components/swipeable-backdrop/Component.d.ts +1 -1
- package/modern/index.css +102 -23
- package/modern/index.d.ts +3 -1
- package/modern/index.js +3 -1
- package/{cssm/component-3f9ff39b.d.ts → modern/types.d.ts} +41 -12
- package/modern/types.js +1 -0
- package/modern/utils.d.ts +8 -0
- package/modern/utils.js +23 -0
- package/package.json +5 -5
- package/{modern/component-803dbc9d.d.ts → types.d.ts} +41 -12
- package/types.js +2 -0
- package/utils.d.ts +8 -0
- package/utils.js +33 -0
- package/component-76642442.js +0 -203
- package/cssm/component-3f9ff39b.js +0 -201
- package/esm/component-f5632dcc.js +0 -192
- package/modern/component-803dbc9d.js +0 -220
package/component.d.ts
CHANGED
package/component.js
CHANGED
|
@@ -2,21 +2,264 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('tslib');
|
|
6
|
-
require('react');
|
|
7
|
-
require('react-div-100vh');
|
|
8
|
-
require('react-merge-refs');
|
|
9
|
-
require('react-swipeable');
|
|
10
|
-
require('classnames');
|
|
11
|
-
require('@alfalab/core-components-base-modal');
|
|
12
|
-
var
|
|
13
|
-
require('./components/
|
|
14
|
-
require('./components/swipeable-backdrop/Component.js');
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var reactDiv100vh = require('react-div-100vh');
|
|
8
|
+
var mergeRefs = require('react-merge-refs');
|
|
9
|
+
var reactSwipeable = require('react-swipeable');
|
|
10
|
+
var cn = require('classnames');
|
|
11
|
+
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
12
|
+
var components_footer_Component = require('./components/footer/Component.js');
|
|
13
|
+
var components_header_Component = require('./components/header/Component.js');
|
|
14
|
+
var components_swipeableBackdrop_Component = require('./components/swipeable-backdrop/Component.js');
|
|
15
|
+
var utils = require('./utils.js');
|
|
15
16
|
require('@alfalab/core-components-navigation-bar');
|
|
16
17
|
require('@alfalab/core-components-backdrop');
|
|
17
18
|
|
|
19
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
20
|
|
|
21
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
22
|
+
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
23
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
var getDataTestId = function (dataTestId, element) {
|
|
26
|
+
var elementPart = element ? "-".concat(element.toLowerCase()) : '';
|
|
27
|
+
return dataTestId ? "".concat(dataTestId).concat(elementPart) : undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var isClient = function () { return typeof window !== 'undefined'; };
|
|
31
|
+
|
|
32
|
+
var styles = {"modal":"bottom-sheet__modal_6ikry","wrapper":"bottom-sheet__wrapper_6ikry","component":"bottom-sheet__component_6ikry","withTransition":"bottom-sheet__withTransition_6ikry","scrollableContainer":"bottom-sheet__scrollableContainer_6ikry","marker":"bottom-sheet__marker_6ikry","content":"bottom-sheet__content_6ikry","noHeader":"bottom-sheet__noHeader_6ikry","noFooter":"bottom-sheet__noFooter_6ikry","scrollLocked":"bottom-sheet__scrollLocked_6ikry","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_6ikry","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_6ikry","appear":"bottom-sheet__appear_6ikry","enter":"bottom-sheet__enter_6ikry","appearActive":"bottom-sheet__appearActive_6ikry","enterActive":"bottom-sheet__enterActive_6ikry","enterDone":"bottom-sheet__enterDone_6ikry","appearDone":"bottom-sheet__appearDone_6ikry","exit":"bottom-sheet__exit_6ikry","exitActive":"bottom-sheet__exitActive_6ikry","background-accent":"bottom-sheet__background-accent_6ikry","background-info":"bottom-sheet__background-info_6ikry","background-attention-muted":"bottom-sheet__background-attention-muted_6ikry","background-positive-muted":"bottom-sheet__background-positive-muted_6ikry","background-negative-muted":"bottom-sheet__background-negative-muted_6ikry","background-primary":"bottom-sheet__background-primary_6ikry","background-primary-inverted":"bottom-sheet__background-primary-inverted_6ikry","background-secondary":"bottom-sheet__background-secondary_6ikry","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_6ikry","background-tertiary":"bottom-sheet__background-tertiary_6ikry","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_6ikry","background-quaternary":"bottom-sheet__background-quaternary_6ikry","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_6ikry","background-specialbg-component":"bottom-sheet__background-specialbg-component_6ikry","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_6ikry","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_6ikry","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_6ikry","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_6ikry","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_6ikry","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_6ikry","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_6ikry","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_6ikry"};
|
|
33
|
+
require('./index.css')
|
|
34
|
+
|
|
35
|
+
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
36
|
+
var _b, _c, _d, _e;
|
|
37
|
+
var open = _a.open, title = _a.title, container = _a.container, backgroundColor = _a.backgroundColor, _f = _a.titleSize, titleSize = _f === void 0 ? 'default' : _f, subtitle = _a.subtitle, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, containerProps = _a.containerProps, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, modalClassName = _a.modalClassName, modalWrapperClassName = _a.modalWrapperClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _g = _a.titleAlign, titleAlign = _g === void 0 ? 'left' : _g, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _h = _a.stickyFooter, stickyFooter = _h === void 0 ? true : _h, _j = _a.initialHeight, initialHeight = _j === void 0 ? 'default' : _j, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, children = _a.children, zIndex = _a.zIndex, _k = _a.transitionProps, transitionProps = _k === void 0 ? {} : _k, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _l = _a.swipeable, swipeable = _l === void 0 ? true : _l, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _m = _a.scrollableContainerRef, scrollableContainerRef = _m === void 0 ? function () { return null; } : _m, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _o = _a.sheetContainerRef, sheetContainerRef = _o === void 0 ? function () { return null; } : _o, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize;
|
|
38
|
+
var hasInitialIdx = initialActiveAreaIndex !== undefined;
|
|
39
|
+
var fullHeight = reactDiv100vh.use100vh() || isClient() ? window.innerHeight : 0;
|
|
40
|
+
var magneticAreas = React.useMemo(function () {
|
|
41
|
+
if (magneticAreasProp) {
|
|
42
|
+
return magneticAreasProp.map(function (area) { return utils.convertPercentToNumber(area, fullHeight); });
|
|
43
|
+
}
|
|
44
|
+
return [0, fullHeight - utils.HEADER_OFFSET];
|
|
45
|
+
}, [fullHeight, magneticAreasProp]);
|
|
46
|
+
var lastMagneticArea = magneticAreas[magneticAreas.length - 1];
|
|
47
|
+
var _p = React.useState(hasInitialIdx
|
|
48
|
+
? lastMagneticArea - magneticAreas[initialActiveAreaIndex]
|
|
49
|
+
: magneticAreas[0]), sheetOffset = _p[0], setSheetOffset = _p[1];
|
|
50
|
+
var _q = React.useState(1), backdropOpacity = _q[0], setBackdropOpacity = _q[1];
|
|
51
|
+
var _r = React.useState(hasInitialIdx ? magneticAreas[initialActiveAreaIndex] : lastMagneticArea), activeArea = _r[0], setActiveArea = _r[1];
|
|
52
|
+
var swipingInProgress = React.useRef(false);
|
|
53
|
+
var headerRef = React.useRef(null);
|
|
54
|
+
var sheetHeight = React.useRef(0);
|
|
55
|
+
var sheetRef = React.useRef(null);
|
|
56
|
+
var scrollableContainer = React.useRef(null);
|
|
57
|
+
var emptyHeader = !hasCloser && !leftAddons && !title && !hasBacker && !rightAddons;
|
|
58
|
+
var titleIsReactElement = React__default.default.isValidElement(title);
|
|
59
|
+
var headerProps = tslib.__assign(tslib.__assign({}, (titleIsReactElement
|
|
60
|
+
? { children: title }
|
|
61
|
+
: { title: title ? title === null || title === void 0 ? void 0 : title.toString() : undefined })), { scrollableParentRef: scrollableContainer, headerRef: headerRef, className: headerClassName, addonClassName: addonClassName, closerClassName: closerClassName, backButtonClassName: backerClassName, leftAddons: leftAddons, rightAddons: rightAddons, bottomAddons: bottomAddons, hasCloser: hasCloser, hasBackButton: hasBacker, align: titleAlign, trim: trimTitle, sticky: stickyHeader, dataTestId: getDataTestId(dataTestId, 'header'), onBack: onBack, titleSize: titleSize, subtitle: subtitle, onClose: onClose });
|
|
62
|
+
var getBackdropOpacity = function (offset) {
|
|
63
|
+
var canClose = magneticAreas[0] === 0;
|
|
64
|
+
var secondArea = magneticAreas[1];
|
|
65
|
+
var isSecondArea = secondArea === activeArea;
|
|
66
|
+
if (canClose && isSecondArea && sheetOffset > lastMagneticArea - secondArea) {
|
|
67
|
+
var opacity = 1 - (offset - (lastMagneticArea - secondArea)) / secondArea;
|
|
68
|
+
return Math.max(0, Number(opacity.toFixed(2)));
|
|
69
|
+
}
|
|
70
|
+
return 1;
|
|
71
|
+
};
|
|
72
|
+
var getSheetOffset = function (deltaY) {
|
|
73
|
+
var offset = lastMagneticArea - activeArea + deltaY;
|
|
74
|
+
var maxOffset = magneticAreas[0] === 0 ? 0 : lastMagneticArea - magneticAreas[0];
|
|
75
|
+
if (maxOffset) {
|
|
76
|
+
offset = Math.min(maxOffset, offset);
|
|
77
|
+
}
|
|
78
|
+
return Math.max(0, Math.round(offset));
|
|
79
|
+
};
|
|
80
|
+
var getActiveAreaIndex = function (area) { return magneticAreas.findIndex(function (a) { return a === area; }); };
|
|
81
|
+
var setSheetHeight = function () {
|
|
82
|
+
if (sheetRef.current) {
|
|
83
|
+
sheetHeight.current = sheetRef.current.getBoundingClientRect().height - sheetOffset;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var scrollToArea = function (idx) {
|
|
87
|
+
var nextArea = magneticAreas[idx];
|
|
88
|
+
if (nextArea === 0) {
|
|
89
|
+
onClose();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (nextArea) {
|
|
93
|
+
setActiveArea(nextArea);
|
|
94
|
+
setSheetOffset(lastMagneticArea - nextArea);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var magnetize = function (dir, velocity, deltaY) {
|
|
98
|
+
var shouldMagnetizeDownByVelocity = dir === 'Down' && velocity >= utils.SWIPE_VELOCITY;
|
|
99
|
+
var shouldMagnetizeUpByVelocity = dir === 'Up' && velocity >= utils.SWIPE_VELOCITY;
|
|
100
|
+
if (shouldMagnetizeDownByVelocity) {
|
|
101
|
+
var nextArea_1 = magneticAreas
|
|
102
|
+
.slice()
|
|
103
|
+
.reverse()
|
|
104
|
+
.find(function (area) { return area < activeArea; });
|
|
105
|
+
if (nextArea_1 === 0) {
|
|
106
|
+
onClose();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
var offset_1 = nextArea_1
|
|
110
|
+
? lastMagneticArea - nextArea_1
|
|
111
|
+
: lastMagneticArea - activeArea;
|
|
112
|
+
setSheetOffset(offset_1);
|
|
113
|
+
setActiveArea(function (prevState) { return nextArea_1 !== null && nextArea_1 !== void 0 ? nextArea_1 : prevState; });
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (shouldMagnetizeUpByVelocity) {
|
|
117
|
+
var nextArea_2 = magneticAreas.find(function (area) { return area > activeArea; });
|
|
118
|
+
var offset_2 = nextArea_2 ? lastMagneticArea - nextArea_2 : 0;
|
|
119
|
+
setSheetOffset(offset_2);
|
|
120
|
+
setActiveArea(function (prevState) { return nextArea_2 !== null && nextArea_2 !== void 0 ? nextArea_2 : prevState; });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
var offset = getSheetOffset(deltaY);
|
|
124
|
+
var currentSheetHeight = lastMagneticArea - offset;
|
|
125
|
+
var secondArea = magneticAreas[1];
|
|
126
|
+
var isSecondArea = activeArea === secondArea;
|
|
127
|
+
var canClose = magneticAreas[0] === 0 && dir === 'Down';
|
|
128
|
+
var shouldCloseByOffset = isSecondArea && canClose && 1 - currentSheetHeight / activeArea > utils.CLOSE_OFFSET;
|
|
129
|
+
if (shouldCloseByOffset) {
|
|
130
|
+
onClose();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
var nearestArea = magneticAreas.reduceRight(function (res, area) {
|
|
134
|
+
if (Math.abs(area - currentSheetHeight) < res.minOffset) {
|
|
135
|
+
res.minOffset = area - currentSheetHeight;
|
|
136
|
+
res.nearestArea = area;
|
|
137
|
+
}
|
|
138
|
+
return res;
|
|
139
|
+
}, {
|
|
140
|
+
nearestArea: lastMagneticArea,
|
|
141
|
+
minOffset: lastMagneticArea,
|
|
142
|
+
}).nearestArea;
|
|
143
|
+
if (nearestArea === 0) {
|
|
144
|
+
onClose();
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
setSheetOffset(lastMagneticArea - nearestArea);
|
|
148
|
+
setActiveArea(nearestArea);
|
|
149
|
+
setBackdropOpacity(1);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Если контент внутри шторки скроллится - то шторка не должна свайпаться
|
|
154
|
+
* Если шапка внутри шторки зафиксирована - то шторка должна свайпаться только в области шапки
|
|
155
|
+
*/
|
|
156
|
+
var shouldSkipSwiping = function (dir, startY) {
|
|
157
|
+
if (!swipeable)
|
|
158
|
+
return true;
|
|
159
|
+
if (scrollLockedProp || swipingInProgress.current)
|
|
160
|
+
return false;
|
|
161
|
+
var scrollableNode = scrollableContainer.current;
|
|
162
|
+
// Точка верхней границы (y координата)
|
|
163
|
+
var bottomSheetTopY = fullHeight - sheetHeight.current;
|
|
164
|
+
if (!scrollableNode ||
|
|
165
|
+
(!stickyHeader && Math.abs(bottomSheetTopY - startY) <= utils.MARKER_HEIGHT) ||
|
|
166
|
+
(stickyHeader &&
|
|
167
|
+
headerRef.current &&
|
|
168
|
+
Math.abs(bottomSheetTopY - startY) <= headerRef.current.clientHeight)) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
return dir === 'Down'
|
|
172
|
+
? scrollableNode.scrollTop > 0
|
|
173
|
+
: scrollableNode.scrollHeight -
|
|
174
|
+
scrollableNode.scrollTop -
|
|
175
|
+
scrollableNode.clientHeight >
|
|
176
|
+
utils.SCROLL_OFFSET;
|
|
177
|
+
};
|
|
178
|
+
var handleSheetSwipe = function (_a) {
|
|
179
|
+
var dir = _a.dir, initial = _a.initial, velocity = _a.velocity, deltaY = _a.deltaY;
|
|
180
|
+
if (shouldSkipSwiping(dir, initial[1])) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
magnetize(dir, velocity, deltaY);
|
|
184
|
+
};
|
|
185
|
+
var handleSheetSwipeStart = function (_a) {
|
|
186
|
+
var dir = _a.dir, initial = _a.initial;
|
|
187
|
+
if (shouldSkipSwiping(dir, initial[1])) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
swipingInProgress.current = true;
|
|
191
|
+
};
|
|
192
|
+
var handleSheetSwiped = function () {
|
|
193
|
+
swipingInProgress.current = false;
|
|
194
|
+
};
|
|
195
|
+
var handleSheetSwiping = function (_a) {
|
|
196
|
+
var initial = _a.initial, deltaY = _a.deltaY, dir = _a.dir;
|
|
197
|
+
if (shouldSkipSwiping(dir, initial[1])) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
var offset = getSheetOffset(deltaY);
|
|
201
|
+
var opacity = getBackdropOpacity(offset);
|
|
202
|
+
setSheetOffset(offset);
|
|
203
|
+
setBackdropOpacity(opacity);
|
|
204
|
+
};
|
|
205
|
+
var sheetSwipeableHandlers = reactSwipeable.useSwipeable({
|
|
206
|
+
onSwipeStart: handleSheetSwipeStart,
|
|
207
|
+
onSwiping: handleSheetSwiping,
|
|
208
|
+
onSwipedDown: handleSheetSwipe,
|
|
209
|
+
onSwipedUp: handleSheetSwipe,
|
|
210
|
+
onSwiped: handleSheetSwiped,
|
|
211
|
+
trackMouse: swipeable,
|
|
212
|
+
delta: 5,
|
|
213
|
+
});
|
|
214
|
+
var handleExited = function (node) {
|
|
215
|
+
var idx = initialActiveAreaIndex;
|
|
216
|
+
setBackdropOpacity(1);
|
|
217
|
+
setSheetOffset(hasInitialIdx ? lastMagneticArea - magneticAreas[idx] : magneticAreas[0]);
|
|
218
|
+
setActiveArea(hasInitialIdx ? magneticAreas[idx] : lastMagneticArea);
|
|
219
|
+
if (transitionProps.onExited) {
|
|
220
|
+
transitionProps.onExited(node);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
var handleEntered = function (node, isAppearing) {
|
|
224
|
+
setBackdropOpacity(1);
|
|
225
|
+
setSheetHeight();
|
|
226
|
+
if (transitionProps.onEntered) {
|
|
227
|
+
transitionProps.onEntered(node, isAppearing);
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
React.useEffect(function () {
|
|
231
|
+
onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize(open ? getActiveAreaIndex(activeArea) : 0);
|
|
232
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
233
|
+
}, [activeArea, open]);
|
|
234
|
+
React.useImperativeHandle(bottomSheetInstanceRef, function () { return ({
|
|
235
|
+
scrollToArea: scrollToArea,
|
|
236
|
+
}); });
|
|
237
|
+
var getSwipeStyles = function () { return ({
|
|
238
|
+
transform: sheetOffset ? "translateY(".concat(sheetOffset, "px)") : '',
|
|
239
|
+
}); };
|
|
240
|
+
var getHeightStyles = function () { return ({
|
|
241
|
+
height: initialHeight === 'full' ? "".concat(lastMagneticArea, "px") : 'unset',
|
|
242
|
+
maxHeight: "".concat(lastMagneticArea, "px"),
|
|
243
|
+
}); };
|
|
244
|
+
var bgClassName = backgroundColor && styles["background-".concat(backgroundColor)];
|
|
245
|
+
return (React__default.default.createElement(coreComponentsBaseModal.BaseModal, { open: open, ref: ref, container: container, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: components_swipeableBackdrop_Component.SwipeableBackdrop, backdropProps: tslib.__assign(tslib.__assign({}, backdropProps), { className: styles.disabledPointerEvents, opacity: backdropOpacity, opacityTimeout: utils.TIMEOUT, invisible: hideOverlay }), disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: cn__default.default(styles.modal, modalClassName), wrapperClassName: cn__default.default(modalWrapperClassName, (_b = {},
|
|
246
|
+
_b[styles.disabledPointerEvents] = hideOverlay,
|
|
247
|
+
_b)), disableBlockingScroll: disableBlockingScroll, transitionProps: tslib.__assign(tslib.__assign({ appear: true, timeout: utils.TIMEOUT, classNames: styles }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
|
|
248
|
+
React__default.default.createElement("div", { style: tslib.__assign({}, getHeightStyles()), className: styles.wrapper, onTransitionEnd: setSheetHeight },
|
|
249
|
+
React__default.default.createElement("div", tslib.__assign({ className: cn__default.default(styles.component, bgClassName, className, (_c = {},
|
|
250
|
+
_c[styles.withTransition] = !swipingInProgress.current,
|
|
251
|
+
_c)), style: tslib.__assign(tslib.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeableHandlers, { ref: mergeRefs__default.default([sheetRef, sheetContainerRef, sheetSwipeableHandlers.ref]), onTransitionEnd: setSheetHeight }),
|
|
252
|
+
React__default.default.createElement("div", tslib.__assign({}, containerProps, { className: cn__default.default(styles.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_d = {},
|
|
253
|
+
_d[styles.scrollLocked] = scrollLockedProp || swipingInProgress.current,
|
|
254
|
+
_d[styles.hiddenScrollbar] = hideScrollbar,
|
|
255
|
+
_d)), ref: mergeRefs__default.default([scrollableContainer, scrollableContainerRef]) }),
|
|
256
|
+
swipeable && React__default.default.createElement("div", { className: cn__default.default(styles.marker) }),
|
|
257
|
+
!hideHeader && !emptyHeader && React__default.default.createElement(components_header_Component.Header, tslib.__assign({}, headerProps)),
|
|
258
|
+
React__default.default.createElement("div", { className: cn__default.default(styles.content, contentClassName, (_e = {},
|
|
259
|
+
_e[styles.noHeader] = hideHeader || emptyHeader,
|
|
260
|
+
_e[styles.noFooter] = !actionButton,
|
|
261
|
+
_e)) }, children),
|
|
262
|
+
actionButton && (React__default.default.createElement(components_footer_Component.Footer, { sticky: stickyFooter, className: cn__default.default(bgClassName, footerClassName) }, actionButton)))))));
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
exports.BottomSheet = BottomSheet;
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"footer":"bottom-
|
|
14
|
+
var styles = {"footer":"bottom-sheet__footer_w482m","sticky":"bottom-sheet__sticky_w482m","highlighted":"bottom-sheet__highlighted_w482m","background-accent":"bottom-sheet__background-accent_w482m","background-info":"bottom-sheet__background-info_w482m","background-attention-muted":"bottom-sheet__background-attention-muted_w482m","background-positive-muted":"bottom-sheet__background-positive-muted_w482m","background-negative-muted":"bottom-sheet__background-negative-muted_w482m","background-primary":"bottom-sheet__background-primary_w482m","background-primary-inverted":"bottom-sheet__background-primary-inverted_w482m","background-secondary":"bottom-sheet__background-secondary_w482m","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_w482m","background-tertiary":"bottom-sheet__background-tertiary_w482m","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_w482m","background-quaternary":"bottom-sheet__background-quaternary_w482m","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_w482m","background-specialbg-component":"bottom-sheet__background-specialbg-component_w482m","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_w482m","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_w482m","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_w482m","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_w482m","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_w482m","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_w482m","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_w482m","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_w482m"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Footer = function (_a) {
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: xwbh9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
+
--color-light-bg-accent: #ef3124;
|
|
5
|
+
--color-light-bg-attention-muted: #f7ebd9;
|
|
6
|
+
--color-light-bg-info: #d6e8fc;
|
|
7
|
+
--color-light-bg-negative-muted: #fbe8e7;
|
|
8
|
+
--color-light-bg-positive-muted: #e7f6ef;
|
|
4
9
|
--color-light-bg-primary: #fff;
|
|
5
|
-
--color-light-
|
|
10
|
+
--color-light-bg-primary-inverted: #121212;
|
|
11
|
+
--color-light-bg-quaternary: #dcdcdd;
|
|
12
|
+
--color-light-bg-quaternary-inverted: #3a3a3c;
|
|
13
|
+
--color-light-bg-secondary: #f3f4f5;
|
|
14
|
+
--color-light-bg-secondary-inverted: #202022;
|
|
15
|
+
--color-light-bg-tertiary: #e9e9eb;
|
|
16
|
+
--color-light-bg-tertiary-inverted: #2c2c2e;
|
|
17
|
+
--color-light-border-secondary: #e9e9eb;
|
|
18
|
+
--color-light-specialbg-component: rgba(11, 31, 53, 0.07);
|
|
19
|
+
--color-light-specialbg-component-inverted: rgba(255, 255, 255, 0.1);
|
|
20
|
+
--color-light-specialbg-primary-grouped: #f3f4f5;
|
|
21
|
+
--color-light-specialbg-secondary-grouped: #fff;
|
|
22
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05);
|
|
23
|
+
--color-light-specialbg-secondary-transparent-inverted: rgba(255, 255, 255, 0.06);
|
|
24
|
+
--color-light-specialbg-tertiary-grouped: #f3f4f5;
|
|
25
|
+
--color-light-specialbg-tertiary-transparent: rgba(11, 31, 53, 0.1);
|
|
26
|
+
--color-light-specialbg-tertiary-transparent-inverted: rgba(255, 255, 255, 0.11); /* 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 */
|
|
6
27
|
} :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 */
|
|
7
28
|
} :root {
|
|
8
29
|
} :root {
|
|
@@ -20,14 +41,58 @@
|
|
|
20
41
|
} :root {
|
|
21
42
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-secondary);
|
|
22
43
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
23
|
-
} .bottom-
|
|
44
|
+
} .bottom-sheet__footer_w482m {
|
|
24
45
|
padding: var(--gap-m) var(--gap-m);
|
|
25
46
|
background-color: var(--color-light-bg-primary);
|
|
26
|
-
} .bottom-
|
|
47
|
+
} .bottom-sheet__sticky_w482m {
|
|
27
48
|
position: sticky;
|
|
28
49
|
bottom: 0;
|
|
29
50
|
z-index: 1;
|
|
30
|
-
} .bottom-
|
|
51
|
+
} .bottom-sheet__highlighted_w482m {
|
|
31
52
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
32
53
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
33
|
-
}
|
|
54
|
+
} .bottom-sheet__background-accent_w482m {
|
|
55
|
+
background-color: var(--color-light-bg-accent);
|
|
56
|
+
} .bottom-sheet__background-info_w482m {
|
|
57
|
+
background-color: var(--color-light-bg-info);
|
|
58
|
+
} .bottom-sheet__background-attention-muted_w482m {
|
|
59
|
+
background-color: var(--color-light-bg-attention-muted);
|
|
60
|
+
} .bottom-sheet__background-positive-muted_w482m {
|
|
61
|
+
background-color: var(--color-light-bg-positive-muted);
|
|
62
|
+
} .bottom-sheet__background-negative-muted_w482m {
|
|
63
|
+
background-color: var(--color-light-bg-negative-muted);
|
|
64
|
+
} .bottom-sheet__background-primary_w482m {
|
|
65
|
+
background-color: var(--color-light-bg-primary);
|
|
66
|
+
} .bottom-sheet__background-primary-inverted_w482m {
|
|
67
|
+
background-color: var(--color-light-bg-primary-inverted);
|
|
68
|
+
} .bottom-sheet__background-secondary_w482m {
|
|
69
|
+
background-color: var(--color-light-bg-secondary);
|
|
70
|
+
} .bottom-sheet__background-secondary-inverted_w482m {
|
|
71
|
+
background-color: var(--color-light-bg-secondary-inverted);
|
|
72
|
+
} .bottom-sheet__background-tertiary_w482m {
|
|
73
|
+
background-color: var(--color-light-bg-tertiary);
|
|
74
|
+
} .bottom-sheet__background-tertiary-inverted_w482m {
|
|
75
|
+
background-color: var(--color-light-bg-tertiary-inverted);
|
|
76
|
+
} .bottom-sheet__background-quaternary_w482m {
|
|
77
|
+
background-color: var(--color-light-bg-quaternary);
|
|
78
|
+
} .bottom-sheet__background-quaternary-inverted_w482m {
|
|
79
|
+
background-color: var(--color-light-bg-quaternary-inverted);
|
|
80
|
+
} .bottom-sheet__background-specialbg-component_w482m {
|
|
81
|
+
background-color: var(--color-light-specialbg-component);
|
|
82
|
+
} .bottom-sheet__background-specialbg-component-inverted_w482m {
|
|
83
|
+
background-color: var(--color-light-specialbg-component-inverted);
|
|
84
|
+
} .bottom-sheet__background-specialbg-primary-grouped_w482m {
|
|
85
|
+
background-color: var(--color-light-specialbg-primary-grouped);
|
|
86
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_w482m {
|
|
87
|
+
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
88
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_w482m {
|
|
89
|
+
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
90
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_w482m {
|
|
91
|
+
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
92
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_w482m {
|
|
93
|
+
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
94
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_w482m {
|
|
95
|
+
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
96
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_w482m {
|
|
97
|
+
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
98
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC, RefObject } from 'react';
|
|
2
|
+
import { NavigationBarProps } from "@alfalab/core-components-navigation-bar";
|
|
3
|
+
type HeaderProps = Omit<NavigationBarProps, 'view' | 'size'> & {
|
|
4
|
+
headerRef: RefObject<HTMLDivElement>;
|
|
5
|
+
};
|
|
6
|
+
declare const Header: FC<HeaderProps>;
|
|
7
|
+
export { HeaderProps, Header };
|
|
@@ -2,19 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('tslib');
|
|
6
|
-
require('react');
|
|
7
|
-
require('classnames');
|
|
8
|
-
require('@alfalab/core-components-base-modal');
|
|
9
|
-
require('@alfalab/core-components-navigation-bar');
|
|
10
|
-
var
|
|
11
|
-
require('react-div-100vh');
|
|
12
|
-
require('react-merge-refs');
|
|
13
|
-
require('react-swipeable');
|
|
14
|
-
require('../footer/Component.js');
|
|
15
|
-
require('../swipeable-backdrop/Component.js');
|
|
16
|
-
require('@alfalab/core-components-backdrop');
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var cn = require('classnames');
|
|
8
|
+
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
9
|
+
var coreComponentsNavigationBar = require('@alfalab/core-components-navigation-bar');
|
|
10
|
+
var utils = require('../../utils.js');
|
|
17
11
|
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
13
|
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_tel2m","hasContent":"bottom-sheet__hasContent_tel2m","header":"bottom-sheet__header_tel2m","sticky":"bottom-sheet__sticky_tel2m","highlighted":"bottom-sheet__highlighted_tel2m","justifyEnd":"bottom-sheet__justifyEnd_tel2m","addon":"bottom-sheet__addon_tel2m","addonFixed":"bottom-sheet__addonFixed_tel2m","title":"bottom-sheet__title_tel2m","titleCenter":"bottom-sheet__titleCenter_tel2m","titleLeft":"bottom-sheet__titleLeft_tel2m","trimTitle":"bottom-sheet__trimTitle_tel2m"};
|
|
18
|
+
require('./index.css')
|
|
19
|
+
|
|
20
|
+
var Header = function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var className = _a.className, sticky = _a.sticky, headerRef = _a.headerRef, title = _a.title, children = _a.children, restProps = tslib.__rest(_a, ["className", "sticky", "headerRef", "title", "children"]);
|
|
23
|
+
var _c = React.useContext(coreComponentsBaseModal.BaseModalContext), setHeaderOffset = _c.setHeaderOffset, setHasHeader = _c.setHasHeader, headerHighlighted = _c.headerHighlighted, onClose = _c.onClose;
|
|
24
|
+
React.useEffect(function () {
|
|
25
|
+
setHeaderOffset(utils.HEADER_OFFSET);
|
|
26
|
+
}, [setHeaderOffset]);
|
|
27
|
+
React.useEffect(function () {
|
|
28
|
+
setHasHeader(true);
|
|
29
|
+
}, [setHasHeader]);
|
|
30
|
+
var hasContent = Boolean(title || children);
|
|
31
|
+
return (React__default.default.createElement(coreComponentsNavigationBar.NavigationBar, tslib.__assign({}, restProps, { ref: headerRef, title: title, onClose: onClose, sticky: sticky, view: 'mobile', className: cn__default.default(styles.headerWrapper, className, (_b = {},
|
|
32
|
+
_b[styles.highlighted] = hasContent && headerHighlighted && sticky,
|
|
33
|
+
_b[styles.sticky] = sticky,
|
|
34
|
+
_b[styles.hasContent] = hasContent,
|
|
35
|
+
_b)), contentClassName: cn__default.default(styles.title) }), children));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.Header = Header;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: gnzfi */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-bg-primary: #fff;
|
|
5
4
|
--color-light-border-secondary: #e9e9eb; /* 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 */
|
|
6
5
|
} :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 */
|
|
7
6
|
} :root {
|
|
@@ -28,42 +27,42 @@
|
|
|
28
27
|
--bottom-sheet-title-font-weight: 700;
|
|
29
28
|
--bottom-sheet-title-line-height: 24px;
|
|
30
29
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
|
-
} .bottom-
|
|
30
|
+
} .bottom-sheet__headerWrapper_tel2m {
|
|
32
31
|
padding: var(--gap-s) var(--gap-xs) var(--gap-2xs);
|
|
33
32
|
border-top-right-radius: var(--border-radius-xl);
|
|
34
33
|
border-top-left-radius: var(--border-radius-xl);
|
|
35
34
|
z-index: 1;
|
|
36
|
-
} .bottom-
|
|
37
|
-
background-color:
|
|
38
|
-
} .bottom-
|
|
35
|
+
} .bottom-sheet__hasContent_tel2m {
|
|
36
|
+
background-color: inherit;
|
|
37
|
+
} .bottom-sheet__header_tel2m {
|
|
39
38
|
display: flex;
|
|
40
|
-
} .bottom-
|
|
39
|
+
} .bottom-sheet__sticky_tel2m {
|
|
41
40
|
position: sticky;
|
|
42
41
|
top: 0;
|
|
43
|
-
} .bottom-
|
|
42
|
+
} .bottom-sheet__highlighted_tel2m {
|
|
44
43
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
45
|
-
} .bottom-
|
|
44
|
+
} .bottom-sheet__justifyEnd_tel2m {
|
|
46
45
|
justify-content: flex-end;
|
|
47
|
-
} .bottom-
|
|
46
|
+
} .bottom-sheet__addon_tel2m {
|
|
48
47
|
display: flex;
|
|
49
48
|
justify-content: center;
|
|
50
49
|
align-items: center;
|
|
51
50
|
min-width: 48px;
|
|
52
51
|
height: 48px;
|
|
53
|
-
} .bottom-
|
|
52
|
+
} .bottom-sheet__addonFixed_tel2m {
|
|
54
53
|
position: fixed;
|
|
55
|
-
} .bottom-
|
|
54
|
+
} .bottom-sheet__title_tel2m {
|
|
56
55
|
padding: var(--gap-s) var(--gap-xs);
|
|
57
56
|
width: 100%;
|
|
58
57
|
font-size: var(--bottom-sheet-title-font-size);
|
|
59
58
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
60
59
|
line-height: var(--bottom-sheet-title-line-height);
|
|
61
60
|
font-family: var(--bottom-sheet-title-font-family);
|
|
62
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__titleCenter_tel2m {
|
|
63
62
|
text-align: center;
|
|
64
|
-
} .bottom-
|
|
63
|
+
} .bottom-sheet__titleLeft_tel2m {
|
|
65
64
|
text-align: left;
|
|
66
|
-
} .bottom-
|
|
65
|
+
} .bottom-sheet__trimTitle_tel2m {
|
|
67
66
|
white-space: nowrap;
|
|
68
67
|
overflow: hidden;
|
|
69
68
|
text-overflow: ellipsis;
|
package/cssm/component.d.ts
CHANGED