framework7-react 8.3.4 → 9.0.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/accordion-content.js +6 -9
- package/components/accordion-item.js +11 -9
- package/components/accordion-toggle.js +11 -9
- package/components/accordion.js +11 -9
- package/components/actions-button.js +11 -9
- package/components/actions-group.js +11 -9
- package/components/actions-label.js +11 -9
- package/components/actions.js +13 -10
- package/components/app.js +10 -8
- package/components/area-chart.js +27 -29
- package/components/badge.js +11 -9
- package/components/block-footer.js +11 -9
- package/components/block-header.js +11 -9
- package/components/block-title.js +11 -9
- package/components/block.js +11 -9
- package/components/breadcrumbs-collapsed.js +11 -9
- package/components/breadcrumbs-item.js +11 -9
- package/components/breadcrumbs-separator.js +11 -9
- package/components/breadcrumbs.js +11 -9
- package/components/button.js +15 -10
- package/components/card-content.js +11 -9
- package/components/card-footer.js +11 -9
- package/components/card-header.js +11 -9
- package/components/card.js +14 -11
- package/components/checkbox.js +13 -10
- package/components/chip.js +11 -9
- package/components/fab-backdrop.js +11 -9
- package/components/fab-button.js +11 -9
- package/components/fab-buttons.js +11 -9
- package/components/fab.js +11 -9
- package/components/gauge.js +11 -9
- package/components/icon.js +11 -9
- package/components/input.js +15 -25
- package/components/link.js +13 -10
- package/components/list-button.js +11 -9
- package/components/list-group.js +11 -9
- package/components/list-index.js +15 -12
- package/components/list-input.js +15 -25
- package/components/list-item-content.js +7 -2
- package/components/list-item.js +13 -10
- package/components/list.js +13 -10
- package/components/login-screen-title.js +11 -9
- package/components/login-screen.js +13 -10
- package/components/message.js +11 -9
- package/components/messagebar-attachment.js +11 -9
- package/components/messagebar-attachments.js +11 -9
- package/components/messagebar-sheet-image.js +11 -9
- package/components/messagebar-sheet-item.js +11 -9
- package/components/messagebar-sheet.js +11 -9
- package/components/messagebar.js +17 -13
- package/components/messages-title.js +11 -9
- package/components/messages.js +13 -10
- package/components/nav-left.d.ts +0 -1
- package/components/nav-left.js +12 -17
- package/components/nav-right.d.ts +0 -1
- package/components/nav-right.js +11 -13
- package/components/nav-title-large.js +11 -10
- package/components/nav-title.d.ts +0 -1
- package/components/nav-title.js +11 -13
- package/components/navbar.d.ts +0 -1
- package/components/navbar.js +15 -40
- package/components/page-content.js +11 -10
- package/components/page.js +10 -8
- package/components/panel.js +14 -15
- package/components/photo-browser.d.ts +0 -1
- package/components/photo-browser.js +14 -15
- package/components/pie-chart.js +16 -16
- package/components/popover.d.ts +0 -1
- package/components/popover.js +14 -16
- package/components/popup.js +13 -11
- package/components/preloader.js +11 -10
- package/components/progressbar.js +13 -11
- package/components/radio.js +11 -10
- package/components/range.js +14 -12
- package/components/routable-modals.js +17 -15
- package/components/searchbar.js +22 -18
- package/components/segmented.js +11 -10
- package/components/sheet.js +13 -11
- package/components/stepper.js +18 -16
- package/components/subnavbar.d.ts +0 -1
- package/components/subnavbar.js +11 -13
- package/components/swipeout-actions.js +11 -10
- package/components/swipeout-button.js +11 -10
- package/components/tab.js +11 -10
- package/components/tabs.js +19 -12
- package/components/text-editor.js +14 -12
- package/components/toggle.js +19 -18
- package/components/toolbar-pane.d.ts +16 -0
- package/components/toolbar-pane.js +29 -0
- package/components/toolbar.js +14 -12
- package/components/treeview-item.js +11 -10
- package/components/treeview.js +11 -10
- package/components/view.d.ts +0 -2
- package/components/view.js +28 -28
- package/components/views.js +11 -10
- package/framework7-react.d.ts +2 -1
- package/framework7-react.js +5 -4
- package/package.json +2 -2
- package/shared/components-router.js +20 -23
- package/shared/f7.js +1 -7
- package/shared/modal-state-classes.js +4 -5
- package/shared/plugin.js +1 -4
- package/shared/set-ref.js +11 -0
- package/shared/use-icon.js +1 -4
- package/shared/use-route-props.js +3 -4
- package/shared/use-store.js +5 -5
- package/shared/utils.js +6 -24
package/components/toggle.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
import React, {
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
3
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
4
4
|
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
5
5
|
import { colorClasses } from '../shared/mixins.js';
|
|
6
6
|
import { f7ready, f7 } from '../shared/f7.js';
|
|
7
7
|
import { watchProp } from '../shared/watch-prop.js';
|
|
8
8
|
import { useTooltip } from '../shared/use-tooltip.js';
|
|
9
|
+
import { setRef } from '../shared/set-ref.js';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
|
+
const Toggle = props => {
|
|
12
12
|
const f7Toggle = useRef(null);
|
|
13
13
|
const {
|
|
14
14
|
className,
|
|
@@ -20,7 +20,8 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
20
20
|
disabled,
|
|
21
21
|
readonly,
|
|
22
22
|
name,
|
|
23
|
-
value
|
|
23
|
+
value,
|
|
24
|
+
ref
|
|
24
25
|
} = props;
|
|
25
26
|
const extraAttrs = getExtraAttrs(props);
|
|
26
27
|
const elRef = useRef(null);
|
|
@@ -28,10 +29,6 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
28
29
|
const onChange = event => {
|
|
29
30
|
emit(props, 'change', event);
|
|
30
31
|
};
|
|
31
|
-
useImperativeHandle(ref, () => ({
|
|
32
|
-
el: elRef.current,
|
|
33
|
-
f7Toggle: () => f7Toggle.current
|
|
34
|
-
}));
|
|
35
32
|
useTooltip(elRef, props);
|
|
36
33
|
watchProp(checked, newValue => {
|
|
37
34
|
if (!f7Toggle.current) return;
|
|
@@ -78,7 +75,17 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
78
75
|
const labelClasses = classNames('toggle', className, {
|
|
79
76
|
disabled
|
|
80
77
|
}, colorClasses(props));
|
|
81
|
-
|
|
78
|
+
return /*#__PURE__*/React.createElement("label", _extends({
|
|
79
|
+
id: id,
|
|
80
|
+
style: style,
|
|
81
|
+
className: labelClasses,
|
|
82
|
+
ref: el => {
|
|
83
|
+
elRef.current = el;
|
|
84
|
+
setRef(ref, el, {
|
|
85
|
+
f7Toggle: () => f7Toggle.current
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, extraAttrs), /*#__PURE__*/React.createElement("input", {
|
|
82
89
|
ref: inputElRef,
|
|
83
90
|
type: "checkbox",
|
|
84
91
|
name: name,
|
|
@@ -88,15 +95,9 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
88
95
|
defaultChecked: defaultChecked,
|
|
89
96
|
value: value,
|
|
90
97
|
onChange: () => {}
|
|
91
|
-
})
|
|
92
|
-
return /*#__PURE__*/React.createElement("label", _extends({
|
|
93
|
-
id: id,
|
|
94
|
-
style: style,
|
|
95
|
-
className: labelClasses,
|
|
96
|
-
ref: elRef
|
|
97
|
-
}, extraAttrs), inputEl, /*#__PURE__*/React.createElement("span", {
|
|
98
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
98
99
|
className: "toggle-icon"
|
|
99
100
|
}));
|
|
100
|
-
}
|
|
101
|
+
};
|
|
101
102
|
Toggle.displayName = 'f7-toggle';
|
|
102
103
|
export default Toggle;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface ToolbarPaneProps {
|
|
6
|
+
slot?: string;
|
|
7
|
+
id?: string | number;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const ToolbarPane: React.FunctionComponent<ToolbarPaneProps>;
|
|
14
|
+
|
|
15
|
+
export default ToolbarPane;
|
|
16
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
4
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
5
|
+
import { setRef } from '../shared/set-ref.js';
|
|
6
|
+
|
|
7
|
+
const ToolbarPane = props => {
|
|
8
|
+
const {
|
|
9
|
+
className,
|
|
10
|
+
id,
|
|
11
|
+
style,
|
|
12
|
+
ref,
|
|
13
|
+
children
|
|
14
|
+
} = props;
|
|
15
|
+
const extraAttrs = getExtraAttrs(props);
|
|
16
|
+
const elRef = useRef(null);
|
|
17
|
+
const classes = classNames('toolbar-pane', className, colorClasses(props));
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
|
+
id: id,
|
|
20
|
+
style: style,
|
|
21
|
+
className: classes,
|
|
22
|
+
ref: el => {
|
|
23
|
+
elRef.current = el;
|
|
24
|
+
setRef(ref, el);
|
|
25
|
+
}
|
|
26
|
+
}, extraAttrs), children);
|
|
27
|
+
};
|
|
28
|
+
ToolbarPane.displayName = 'f7-toolbar-pane';
|
|
29
|
+
export default ToolbarPane;
|
package/components/toolbar.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
import React, {
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
3
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
4
4
|
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
5
5
|
import { colorClasses } from '../shared/mixins.js';
|
|
6
6
|
import { useTheme } from '../shared/use-theme.js';
|
|
7
7
|
import { f7ready, f7 } from '../shared/f7.js';
|
|
8
8
|
import { TabbarContext } from '../shared/tabbar-context.js';
|
|
9
|
+
import { setRef } from '../shared/set-ref.js';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
|
+
const Toolbar = props => {
|
|
12
12
|
const {
|
|
13
13
|
className,
|
|
14
14
|
id,
|
|
@@ -25,7 +25,8 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
25
25
|
bottomMd,
|
|
26
26
|
bottomIos,
|
|
27
27
|
bottom,
|
|
28
|
-
inner = true
|
|
28
|
+
inner = true,
|
|
29
|
+
ref
|
|
29
30
|
} = props;
|
|
30
31
|
const extraAttrs = getExtraAttrs(props);
|
|
31
32
|
const elRef = useRef(null);
|
|
@@ -45,11 +46,6 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
45
46
|
if (!f7) return;
|
|
46
47
|
f7.toolbar.show(elRef.current, animate);
|
|
47
48
|
};
|
|
48
|
-
useImperativeHandle(ref, () => ({
|
|
49
|
-
el: elRef.current,
|
|
50
|
-
hide,
|
|
51
|
-
show
|
|
52
|
-
}));
|
|
53
49
|
useIsomorphicLayoutEffect(() => {
|
|
54
50
|
f7ready(() => {
|
|
55
51
|
if (tabbar && f7 && elRef.current) {
|
|
@@ -79,7 +75,13 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
79
75
|
id: id,
|
|
80
76
|
style: style,
|
|
81
77
|
className: classes,
|
|
82
|
-
ref:
|
|
78
|
+
ref: el => {
|
|
79
|
+
elRef.current = el;
|
|
80
|
+
setRef(ref, el, {
|
|
81
|
+
hide,
|
|
82
|
+
show
|
|
83
|
+
});
|
|
84
|
+
}
|
|
83
85
|
}, extraAttrs), /*#__PURE__*/React.createElement(TabbarContext.Provider, {
|
|
84
86
|
value: {
|
|
85
87
|
tabbarHasIcons: icons
|
|
@@ -87,6 +89,6 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
87
89
|
}, slots['before-inner'], inner ? /*#__PURE__*/React.createElement("div", {
|
|
88
90
|
className: "toolbar-inner"
|
|
89
91
|
}, slots.default) : slots.default, slots['after-inner']));
|
|
90
|
-
}
|
|
92
|
+
};
|
|
91
93
|
Toolbar.displayName = 'f7-toolbar';
|
|
92
94
|
export default Toolbar;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
import React, {
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
3
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
4
4
|
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
5
5
|
import { colorClasses, actionsAttrs, actionsClasses, routerAttrs, routerClasses } from '../shared/mixins.js';
|
|
6
6
|
import { useIcon } from '../shared/use-icon.js';
|
|
7
7
|
import { f7ready, f7 } from '../shared/f7.js';
|
|
8
|
+
import { setRef } from '../shared/set-ref.js';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10
|
+
const TreeviewItem = props => {
|
|
11
11
|
const {
|
|
12
12
|
className,
|
|
13
13
|
id,
|
|
@@ -19,7 +19,8 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
19
19
|
opened,
|
|
20
20
|
label,
|
|
21
21
|
loadChildren,
|
|
22
|
-
link
|
|
22
|
+
link,
|
|
23
|
+
ref
|
|
23
24
|
} = props;
|
|
24
25
|
const extraAttrs = getExtraAttrs(props);
|
|
25
26
|
const elRef = useRef(null);
|
|
@@ -38,9 +39,6 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
38
39
|
if (elRef.current !== el) return;
|
|
39
40
|
emit(props, 'treeviewLoadChildren', el, done);
|
|
40
41
|
};
|
|
41
|
-
useImperativeHandle(ref, () => ({
|
|
42
|
-
el: elRef.current
|
|
43
|
-
}));
|
|
44
42
|
const attachEvents = () => {
|
|
45
43
|
if (!elRef.current) return;
|
|
46
44
|
f7ready(() => {
|
|
@@ -85,7 +83,10 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
85
83
|
id: id,
|
|
86
84
|
style: style,
|
|
87
85
|
className: classes,
|
|
88
|
-
ref:
|
|
86
|
+
ref: el => {
|
|
87
|
+
elRef.current = el;
|
|
88
|
+
setRef(ref, el);
|
|
89
|
+
}
|
|
89
90
|
}, extraAttrs), /*#__PURE__*/React.createElement(TreeviewRootTag, _extends({
|
|
90
91
|
onClick: onClick,
|
|
91
92
|
className: itemRootClasses
|
|
@@ -98,6 +99,6 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
98
99
|
}, slots['label-start'], label, slots.label), slots.content, slots['content-end']), slots.root, slots['root-end']), hasChildren && /*#__PURE__*/React.createElement("div", {
|
|
99
100
|
className: "treeview-item-children"
|
|
100
101
|
}, slots['children-start'], slots.default, slots.children));
|
|
101
|
-
}
|
|
102
|
+
};
|
|
102
103
|
TreeviewItem.displayName = 'f7-treeview-item';
|
|
103
104
|
export default TreeviewItem;
|
package/components/treeview.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
import React, {
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
3
|
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
4
4
|
import { colorClasses } from '../shared/mixins.js';
|
|
5
|
+
import { setRef } from '../shared/set-ref.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
const Treeview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
7
|
+
const Treeview = props => {
|
|
8
8
|
const {
|
|
9
9
|
className,
|
|
10
10
|
id,
|
|
11
11
|
style,
|
|
12
|
-
children
|
|
12
|
+
children,
|
|
13
|
+
ref
|
|
13
14
|
} = props;
|
|
14
15
|
const extraAttrs = getExtraAttrs(props);
|
|
15
16
|
const elRef = useRef(null);
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
el: elRef.current
|
|
18
|
-
}));
|
|
19
17
|
const classes = classNames(className, 'treeview', colorClasses(props));
|
|
20
18
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
21
19
|
id: id,
|
|
22
20
|
style: style,
|
|
23
21
|
className: classes,
|
|
24
|
-
ref:
|
|
22
|
+
ref: el => {
|
|
23
|
+
elRef.current = el;
|
|
24
|
+
setRef(ref, el);
|
|
25
|
+
}
|
|
25
26
|
}, extraAttrs), children);
|
|
26
|
-
}
|
|
27
|
+
};
|
|
27
28
|
Treeview.displayName = 'f7-treeview';
|
|
28
29
|
export default Treeview;
|
package/components/view.d.ts
CHANGED
|
@@ -53,8 +53,6 @@ export interface ViewProps {
|
|
|
53
53
|
browserHistoryStoreHistory?: boolean;
|
|
54
54
|
animate ?: boolean;
|
|
55
55
|
transition ?: string;
|
|
56
|
-
iosDynamicNavbar ?: boolean;
|
|
57
|
-
iosAnimateNavbarBackIcon ?: boolean;
|
|
58
56
|
materialPageLoadDelay ?: number;
|
|
59
57
|
passRouteQueryToRequest ?: boolean;
|
|
60
58
|
passRouteParamsToRequest ?: boolean;
|
package/components/view.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
/* eslint-disable no-nested-ternary */
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { useRef, useState } from 'react';
|
|
4
4
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
5
|
import { classNames, getExtraAttrs, noUndefinedProps, emit, getRouterId } from '../shared/utils.js';
|
|
6
6
|
import { colorClasses } from '../shared/mixins.js';
|
|
@@ -9,8 +9,9 @@ import { useTab } from '../shared/use-tab.js';
|
|
|
9
9
|
import { useAsyncComponent } from '../shared/use-async-component.js';
|
|
10
10
|
import { getRouterInitialComponent } from '../shared/get-router-initial-component.js';
|
|
11
11
|
import { RouterContext } from '../shared/router-context.js';
|
|
12
|
+
import { setRef } from '../shared/set-ref.js';
|
|
12
13
|
|
|
13
|
-
const View =
|
|
14
|
+
const View = props => {
|
|
14
15
|
const {
|
|
15
16
|
className,
|
|
16
17
|
id,
|
|
@@ -22,7 +23,8 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
22
23
|
tabActive,
|
|
23
24
|
url,
|
|
24
25
|
initRouterOnTabShow,
|
|
25
|
-
browserHistoryInitialMatch = true
|
|
26
|
+
browserHistoryInitialMatch = true,
|
|
27
|
+
ref
|
|
26
28
|
} = props;
|
|
27
29
|
const childrenArray = React.Children.toArray(children);
|
|
28
30
|
const initialPageComponent = childrenArray.filter(c => c.props && c.props.initialPage)[0];
|
|
@@ -91,10 +93,6 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
91
93
|
const swipeBackData = data;
|
|
92
94
|
emit(props, 'swipeBackAfterReset', swipeBackData);
|
|
93
95
|
};
|
|
94
|
-
useImperativeHandle(ref, () => ({
|
|
95
|
-
el: elRef.current,
|
|
96
|
-
f7View: () => f7View.current
|
|
97
|
-
}));
|
|
98
96
|
const onMount = () => {
|
|
99
97
|
f7ready(() => {
|
|
100
98
|
if (f7View.current) {
|
|
@@ -192,25 +190,27 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
192
190
|
id: id,
|
|
193
191
|
style: style,
|
|
194
192
|
className: classes,
|
|
195
|
-
ref:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
193
|
+
ref: el => {
|
|
194
|
+
elRef.current = el;
|
|
195
|
+
setRef(ref, el, {
|
|
196
|
+
f7View: () => f7View.current
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}, extraAttrs), restChildren, pages.map(({
|
|
200
|
+
component: PageComponent,
|
|
201
|
+
id: pageId,
|
|
202
|
+
props: pageProps,
|
|
203
|
+
isAsync,
|
|
204
|
+
initialComponent
|
|
205
|
+
}) => /*#__PURE__*/React.createElement(RouterContext.Provider, {
|
|
206
|
+
key: pageId,
|
|
207
|
+
value: {
|
|
208
|
+
router: pageProps.f7router,
|
|
209
|
+
route: pageProps.f7route
|
|
210
|
+
}
|
|
211
|
+
}, initialComponent ? (/*#__PURE__*/React.cloneElement(initialComponent, {
|
|
212
|
+
...pageProps
|
|
213
|
+
})) : isAsync ? useAsyncComponent(PageComponent, pageProps) : /*#__PURE__*/React.createElement(PageComponent, pageProps))));
|
|
214
|
+
};
|
|
215
215
|
View.displayName = 'f7-view';
|
|
216
216
|
export default View;
|
package/components/views.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
import React, {
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
3
|
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
4
4
|
import { colorClasses } from '../shared/mixins.js';
|
|
5
|
+
import { setRef } from '../shared/set-ref.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
const Views = /*#__PURE__*/forwardRef((props, ref) => {
|
|
7
|
+
const Views = props => {
|
|
8
8
|
const {
|
|
9
9
|
className,
|
|
10
10
|
id,
|
|
11
11
|
style,
|
|
12
12
|
children,
|
|
13
|
-
tabs
|
|
13
|
+
tabs,
|
|
14
|
+
ref
|
|
14
15
|
} = props;
|
|
15
16
|
const extraAttrs = getExtraAttrs(props);
|
|
16
17
|
const elRef = useRef(null);
|
|
17
|
-
useImperativeHandle(ref, () => ({
|
|
18
|
-
el: elRef.current
|
|
19
|
-
}));
|
|
20
18
|
const classes = classNames(className, 'views', {
|
|
21
19
|
tabs
|
|
22
20
|
}, colorClasses(props));
|
|
@@ -24,8 +22,11 @@ const Views = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24
22
|
id: id,
|
|
25
23
|
style: style,
|
|
26
24
|
className: classes,
|
|
27
|
-
ref:
|
|
25
|
+
ref: el => {
|
|
26
|
+
elRef.current = el;
|
|
27
|
+
setRef(ref, el);
|
|
28
|
+
}
|
|
28
29
|
}, extraAttrs), children);
|
|
29
|
-
}
|
|
30
|
+
};
|
|
30
31
|
Views.displayName = 'f7-views';
|
|
31
32
|
export default Views;
|
package/framework7-react.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ import Tab from './components/tab.js';
|
|
|
85
85
|
import Tabs from './components/tabs.js';
|
|
86
86
|
import TextEditor from './components/text-editor.js';
|
|
87
87
|
import Toggle from './components/toggle.js';
|
|
88
|
+
import ToolbarPane from './components/toolbar-pane.js';
|
|
88
89
|
import Toolbar from './components/toolbar.js';
|
|
89
90
|
import TreeviewItem from './components/treeview-item.js';
|
|
90
91
|
import Treeview from './components/treeview.js';
|
|
@@ -114,6 +115,6 @@ declare const useStore: useStore;
|
|
|
114
115
|
|
|
115
116
|
declare const Framework7React: Framework7Plugin;
|
|
116
117
|
|
|
117
|
-
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemContent, ListItem, List, LoginScreenTitle, LoginScreen, Message, MessagebarAttachment, MessagebarAttachments, MessagebarSheetImage, MessagebarSheetItem, MessagebarSheet, Messagebar, MessagesTitle, Messages, NavLeft, NavRight, NavTitleLarge, NavTitle, Navbar, PageContent, Page, Panel, PhotoBrowser, PieChart, Popover, Popup, Preloader, Progressbar, Radio, Range, RoutableModals, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
118
|
+
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemContent, ListItem, List, LoginScreenTitle, LoginScreen, Message, MessagebarAttachment, MessagebarAttachments, MessagebarSheetImage, MessagebarSheetItem, MessagebarSheet, Messagebar, MessagesTitle, Messages, NavLeft, NavRight, NavTitleLarge, NavTitle, Navbar, PageContent, Page, Panel, PhotoBrowser, PieChart, Popover, Popup, Preloader, Progressbar, Radio, Range, RoutableModals, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, Tab, Tabs, TextEditor, Toggle, ToolbarPane, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
118
119
|
export { f7, f7ready, theme, useStore };
|
|
119
120
|
export default Framework7React;
|
package/framework7-react.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 React
|
|
2
|
+
* Framework7 React 9.0.0
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & React
|
|
4
4
|
* https://framework7.io/react/
|
|
5
5
|
*
|
|
6
|
-
* Copyright 2014-
|
|
6
|
+
* Copyright 2014-2025 Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: November 25, 2025
|
|
11
11
|
*/
|
|
12
12
|
import Framework7React from './shared/plugin.js';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7.js';
|
|
@@ -97,12 +97,13 @@ import Tab from './components/tab.js';
|
|
|
97
97
|
import Tabs from './components/tabs.js';
|
|
98
98
|
import TextEditor from './components/text-editor.js';
|
|
99
99
|
import Toggle from './components/toggle.js';
|
|
100
|
+
import ToolbarPane from './components/toolbar-pane.js';
|
|
100
101
|
import Toolbar from './components/toolbar.js';
|
|
101
102
|
import TreeviewItem from './components/treeview-item.js';
|
|
102
103
|
import Treeview from './components/treeview.js';
|
|
103
104
|
import View from './components/view.js';
|
|
104
105
|
import Views from './components/views.js';
|
|
105
106
|
|
|
106
|
-
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemContent, ListItem, List, LoginScreenTitle, LoginScreen, Message, MessagebarAttachment, MessagebarAttachments, MessagebarSheetImage, MessagebarSheetItem, MessagebarSheet, Messagebar, MessagesTitle, Messages, NavLeft, NavRight, NavTitleLarge, NavTitle, Navbar, PageContent, Page, Panel, PhotoBrowser, PieChart, Popover, Popup, Preloader, Progressbar, Radio, Range, RoutableModals, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
107
|
+
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemContent, ListItem, List, LoginScreenTitle, LoginScreen, Message, MessagebarAttachment, MessagebarAttachments, MessagebarSheetImage, MessagebarSheetItem, MessagebarSheet, Messagebar, MessagesTitle, Messages, NavLeft, NavRight, NavTitleLarge, NavTitle, Navbar, PageContent, Page, Panel, PhotoBrowser, PieChart, Popover, Popup, Preloader, Progressbar, Radio, Range, RoutableModals, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, Tab, Tabs, TextEditor, Toggle, ToolbarPane, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
107
108
|
export { f7, f7ready, theme, useStore };
|
|
108
109
|
export default Framework7React;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Build full featured iOS & Android apps using Framework7 & React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"type": "patreon",
|
|
51
51
|
"url": "https://www.patreon.com/framework7"
|
|
52
52
|
},
|
|
53
|
-
"releaseDate": "
|
|
53
|
+
"releaseDate": "November 25, 2025"
|
|
54
54
|
}
|
|
@@ -20,14 +20,13 @@ export default {
|
|
|
20
20
|
openIn(router, navigateUrl, options) {
|
|
21
21
|
return routerOpenIn(router, navigateUrl, options);
|
|
22
22
|
},
|
|
23
|
-
pageComponentLoader(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
23
|
+
pageComponentLoader({
|
|
24
|
+
routerEl,
|
|
25
|
+
component,
|
|
26
|
+
options,
|
|
27
|
+
resolve,
|
|
28
|
+
reject
|
|
29
|
+
}) {
|
|
31
30
|
const router = this;
|
|
32
31
|
const routerId = router.id;
|
|
33
32
|
const el = routerEl;
|
|
@@ -101,14 +100,13 @@ export default {
|
|
|
101
100
|
pageEl.parentNode.removeChild(pageEl);
|
|
102
101
|
}
|
|
103
102
|
},
|
|
104
|
-
tabComponentLoader(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
} = _temp === void 0 ? {} : _temp;
|
|
103
|
+
tabComponentLoader({
|
|
104
|
+
tabEl,
|
|
105
|
+
component,
|
|
106
|
+
options,
|
|
107
|
+
resolve,
|
|
108
|
+
reject
|
|
109
|
+
} = {}) {
|
|
112
110
|
const router = this;
|
|
113
111
|
if (!tabEl) reject();
|
|
114
112
|
let tabRouter;
|
|
@@ -155,13 +153,12 @@ export default {
|
|
|
155
153
|
}
|
|
156
154
|
tabRouter.setTabContent(null);
|
|
157
155
|
},
|
|
158
|
-
modalComponentLoader(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
156
|
+
modalComponentLoader({
|
|
157
|
+
component,
|
|
158
|
+
options,
|
|
159
|
+
resolve,
|
|
160
|
+
reject
|
|
161
|
+
} = {}) {
|
|
165
162
|
const router = this;
|
|
166
163
|
const modalsRouter = f7routers.modals;
|
|
167
164
|
if (!modalsRouter) {
|
package/shared/f7.js
CHANGED
|
@@ -25,13 +25,7 @@ const cleanup = () => {
|
|
|
25
25
|
const f7initEvents = () => {
|
|
26
26
|
f7events = new Framework7.Events();
|
|
27
27
|
};
|
|
28
|
-
const f7init =
|
|
29
|
-
if (params === void 0) {
|
|
30
|
-
params = {};
|
|
31
|
-
}
|
|
32
|
-
if (init === void 0) {
|
|
33
|
-
init = true;
|
|
34
|
-
}
|
|
28
|
+
const f7init = (rootEl, params = {}, init = true) => {
|
|
35
29
|
const f7Params = extend({}, params, {
|
|
36
30
|
el: rootEl,
|
|
37
31
|
init
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export const modalStateClasses =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = _temp === void 0 ? {} : _temp;
|
|
1
|
+
export const modalStateClasses = ({
|
|
2
|
+
isOpened,
|
|
3
|
+
isClosing
|
|
4
|
+
} = {}) => {
|
|
6
5
|
return {
|
|
7
6
|
'modal-in': isOpened.current && !isClosing.current,
|
|
8
7
|
'modal-out': isClosing.current
|
package/shared/plugin.js
CHANGED
|
@@ -4,10 +4,7 @@ import { f7, f7ready, theme, f7initEvents, setTheme } from './f7.js';
|
|
|
4
4
|
const Framework7React = {
|
|
5
5
|
name: 'reactPlugin',
|
|
6
6
|
installed: false,
|
|
7
|
-
install(params) {
|
|
8
|
-
if (params === void 0) {
|
|
9
|
-
params = {};
|
|
10
|
-
}
|
|
7
|
+
install(params = {}) {
|
|
11
8
|
if (Framework7React.installed) return;
|
|
12
9
|
Framework7React.installed = true;
|
|
13
10
|
f7initEvents();
|
package/shared/use-icon.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Icon from '../components/icon.js';
|
|
3
3
|
import Badge from '../components/badge.js';
|
|
4
|
-
export const useIcon =
|
|
5
|
-
if (props === void 0) {
|
|
6
|
-
props = {};
|
|
7
|
-
}
|
|
4
|
+
export const useIcon = (props = {}) => {
|
|
8
5
|
const {
|
|
9
6
|
icon,
|
|
10
7
|
iconMaterial,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
export const useRouteProps =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = _temp === void 0 ? {} : _temp;
|
|
2
|
+
export const useRouteProps = (elRef, {
|
|
3
|
+
routeProps
|
|
4
|
+
} = {}) => {
|
|
6
5
|
useEffect(() => {
|
|
7
6
|
if (elRef.current) {
|
|
8
7
|
elRef.current.f7RouteProps = routeProps;
|