framework7-react 8.2.0 → 8.3.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/components/sheet.d.ts +3 -0
- package/components/sheet.js +15 -2
- package/framework7-react.js +2 -2
- package/package.json +2 -2
package/components/sheet.d.ts
CHANGED
|
@@ -24,6 +24,9 @@ export interface SheetProps {
|
|
|
24
24
|
swipeToStep ?: boolean;
|
|
25
25
|
swipeHandler ?: string | object;
|
|
26
26
|
containerEl ?: string | object;
|
|
27
|
+
breakpoints ?: number[];
|
|
28
|
+
backdropBreakpoint ?: number;
|
|
29
|
+
pushBreakpoint ?: number;
|
|
27
30
|
color?: string;
|
|
28
31
|
colorTheme?: string;
|
|
29
32
|
textColor?: string;
|
package/components/sheet.js
CHANGED
|
@@ -29,12 +29,18 @@ const Sheet = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
29
29
|
swipeToClose,
|
|
30
30
|
swipeToStep,
|
|
31
31
|
swipeHandler,
|
|
32
|
-
containerEl
|
|
32
|
+
containerEl,
|
|
33
|
+
breakpoints,
|
|
34
|
+
backdropBreakpoint,
|
|
35
|
+
pushBreakpoint
|
|
33
36
|
} = props;
|
|
34
37
|
const extraAttrs = getExtraAttrs(props);
|
|
35
38
|
const elRef = useRef(null);
|
|
36
39
|
const isOpened = useRef(opened);
|
|
37
40
|
const isClosing = useRef(false);
|
|
41
|
+
const onBreakpoint = (instance, breakpoint) => {
|
|
42
|
+
emit(props, 'sheetBreakpoint', instance, breakpoint);
|
|
43
|
+
};
|
|
38
44
|
const onStepProgress = (instance, progress) => {
|
|
39
45
|
emit(props, 'sheetStepProgress', instance, progress);
|
|
40
46
|
};
|
|
@@ -74,11 +80,15 @@ const Sheet = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
74
80
|
f7Sheet.current[method]('stepOpen', onStepOpen);
|
|
75
81
|
f7Sheet.current[method]('stepClose', onStepClose);
|
|
76
82
|
f7Sheet.current[method]('stepProgress', onStepProgress);
|
|
83
|
+
f7Sheet.current[method]('breakpoint', onBreakpoint);
|
|
77
84
|
};
|
|
78
85
|
const onMount = () => {
|
|
79
86
|
if (!elRef.current) return;
|
|
80
87
|
const sheetParams = {
|
|
81
|
-
el: elRef.current
|
|
88
|
+
el: elRef.current,
|
|
89
|
+
breakpoints,
|
|
90
|
+
backdropBreakpoint,
|
|
91
|
+
pushBreakpoint
|
|
82
92
|
};
|
|
83
93
|
if ('animate' in props && typeof animate !== 'undefined') sheetParams.animate = animate;
|
|
84
94
|
if ('backdrop' in props && typeof backdrop !== 'undefined') sheetParams.backdrop = backdrop;
|
|
@@ -90,6 +100,9 @@ const Sheet = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
90
100
|
if ('swipeToStep' in props) sheetParams.swipeToStep = swipeToStep;
|
|
91
101
|
if ('swipeHandler' in props) sheetParams.swipeHandler = swipeHandler;
|
|
92
102
|
if ('containerEl' in props) sheetParams.containerEl = containerEl;
|
|
103
|
+
if ('breakpoints' in props) sheetParams.breakpoints = breakpoints;
|
|
104
|
+
if ('backdropBreakpoint' in props) sheetParams.backdropBreakpoint = backdropBreakpoint;
|
|
105
|
+
if ('pushBreakpoint' in props) sheetParams.pushBreakpoint = pushBreakpoint;
|
|
93
106
|
f7ready(() => {
|
|
94
107
|
f7Sheet.current = f7.sheet.create(sheetParams);
|
|
95
108
|
modalEvents('on');
|
package/framework7-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 React 8.
|
|
2
|
+
* Framework7 React 8.3.0
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & React
|
|
4
4
|
* https://framework7.io/react/
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: August 18, 2023
|
|
11
11
|
*/
|
|
12
12
|
import Framework7React from './shared/plugin.js';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7-react",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "Build full featured iOS & Android apps using Framework7 & React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"type": "patreon",
|
|
48
48
|
"url": "https://www.patreon.com/framework7"
|
|
49
49
|
},
|
|
50
|
-
"releaseDate": "
|
|
50
|
+
"releaseDate": "August 18, 2023"
|
|
51
51
|
}
|