framework7-react 8.2.0 → 8.3.1

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.
@@ -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;
@@ -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');
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Framework7 React 8.2.0
2
+ * Framework7 React 8.3.1
3
3
  * Build full featured iOS & Android apps using Framework7 & React
4
4
  * https://framework7.io/react/
5
5
  *
6
- * Copyright 2014-2023 Vladimir Kharlampidi
6
+ * Copyright 2014-2024 Vladimir Kharlampidi
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: July 6, 2023
10
+ * Released on: February 5, 2024
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,10 +1,13 @@
1
1
  {
2
2
  "name": "framework7-react",
3
- "version": "8.2.0",
3
+ "version": "8.3.1",
4
4
  "description": "Build full featured iOS & Android apps using Framework7 & React",
5
5
  "type": "module",
6
6
  "exports": {
7
- ".": "./framework7-react.js",
7
+ ".": {
8
+ "import": "./framework7-react.js",
9
+ "types": "./framework7-react.d.ts"
10
+ },
8
11
  "./components/*": "./components/*",
9
12
  "./shared/*": "./shared/*"
10
13
  },
@@ -47,5 +50,5 @@
47
50
  "type": "patreon",
48
51
  "url": "https://www.patreon.com/framework7"
49
52
  },
50
- "releaseDate": "July 6, 2023"
53
+ "releaseDate": "February 5, 2024"
51
54
  }