framework7-react 8.3.3 → 9.0.0-beta.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.
- 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 +14 -11
- 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
|
@@ -1,23 +1,22 @@
|
|
|
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
|
|
|
7
|
-
const BlockTitle =
|
|
8
|
+
const BlockTitle = props => {
|
|
8
9
|
const {
|
|
9
10
|
className,
|
|
10
11
|
id,
|
|
11
12
|
style,
|
|
12
13
|
children,
|
|
13
14
|
large,
|
|
14
|
-
medium
|
|
15
|
+
medium,
|
|
16
|
+
ref
|
|
15
17
|
} = props;
|
|
16
18
|
const extraAttrs = getExtraAttrs(props);
|
|
17
19
|
const elRef = useRef(null);
|
|
18
|
-
useImperativeHandle(ref, () => ({
|
|
19
|
-
el: elRef.current
|
|
20
|
-
}));
|
|
21
20
|
const classes = classNames(className, 'block-title', {
|
|
22
21
|
'block-title-large': large,
|
|
23
22
|
'block-title-medium': medium
|
|
@@ -26,8 +25,11 @@ const BlockTitle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
26
25
|
id: id,
|
|
27
26
|
style: style,
|
|
28
27
|
className: classes,
|
|
29
|
-
ref:
|
|
28
|
+
ref: el => {
|
|
29
|
+
elRef.current = el;
|
|
30
|
+
setRef(ref, el);
|
|
31
|
+
}
|
|
30
32
|
}, extraAttrs), children);
|
|
31
|
-
}
|
|
33
|
+
};
|
|
32
34
|
BlockTitle.displayName = 'f7-block-title';
|
|
33
35
|
export default BlockTitle;
|
package/components/block.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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
5
|
import { useTab } from '../shared/use-tab.js';
|
|
6
|
+
import { setRef } from '../shared/set-ref.js';
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
const Block =
|
|
9
|
+
const Block = props => {
|
|
9
10
|
const {
|
|
10
11
|
className,
|
|
11
12
|
inset,
|
|
@@ -39,13 +40,11 @@ const Block = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
39
40
|
tabActive,
|
|
40
41
|
id,
|
|
41
42
|
style,
|
|
42
|
-
children
|
|
43
|
+
children,
|
|
44
|
+
ref
|
|
43
45
|
} = props;
|
|
44
46
|
const extraAttrs = getExtraAttrs(props);
|
|
45
47
|
const elRef = useRef(null);
|
|
46
|
-
useImperativeHandle(ref, () => ({
|
|
47
|
-
el: elRef.current
|
|
48
|
-
}));
|
|
49
48
|
useTab(elRef, props);
|
|
50
49
|
const classes = classNames(className, 'block', {
|
|
51
50
|
inset,
|
|
@@ -82,8 +81,11 @@ const Block = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
82
81
|
id: id,
|
|
83
82
|
style: style,
|
|
84
83
|
className: classes,
|
|
85
|
-
ref:
|
|
84
|
+
ref: el => {
|
|
85
|
+
elRef.current = el;
|
|
86
|
+
setRef(ref, el);
|
|
87
|
+
}
|
|
86
88
|
}, extraAttrs), children);
|
|
87
|
-
}
|
|
89
|
+
};
|
|
88
90
|
Block.displayName = 'f7-block';
|
|
89
91
|
export default Block;
|
|
@@ -1,30 +1,32 @@
|
|
|
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, emit } from '../shared/utils.js';
|
|
4
|
+
import { setRef } from '../shared/set-ref.js';
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
const BreadcrumbsCollapsed =
|
|
7
|
+
const BreadcrumbsCollapsed = props => {
|
|
7
8
|
const {
|
|
8
9
|
className,
|
|
9
10
|
id,
|
|
10
11
|
style,
|
|
11
|
-
children
|
|
12
|
+
children,
|
|
13
|
+
ref
|
|
12
14
|
} = props;
|
|
13
15
|
const extraAttrs = getExtraAttrs(props);
|
|
14
16
|
const elRef = useRef(null);
|
|
15
|
-
useImperativeHandle(ref, () => ({
|
|
16
|
-
el: elRef.current
|
|
17
|
-
}));
|
|
18
17
|
const onClick = e => {
|
|
19
18
|
emit(props, 'click', e);
|
|
20
19
|
};
|
|
21
20
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
22
21
|
className: classNames('breadcrumbs-collapsed', className),
|
|
23
|
-
ref:
|
|
22
|
+
ref: el => {
|
|
23
|
+
elRef.current = el;
|
|
24
|
+
setRef(ref, el);
|
|
25
|
+
},
|
|
24
26
|
id: id,
|
|
25
27
|
style: style,
|
|
26
28
|
onClick: onClick
|
|
27
29
|
}, extraAttrs), /*#__PURE__*/React.createElement("span", null), children);
|
|
28
|
-
}
|
|
30
|
+
};
|
|
29
31
|
BreadcrumbsCollapsed.displayName = 'f7-breadcrumbs-collapsed';
|
|
30
32
|
export default BreadcrumbsCollapsed;
|
|
@@ -1,31 +1,33 @@
|
|
|
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, emit } from '../shared/utils.js';
|
|
4
|
+
import { setRef } from '../shared/set-ref.js';
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
const BreadcrumbsItem =
|
|
7
|
+
const BreadcrumbsItem = props => {
|
|
7
8
|
const {
|
|
8
9
|
className,
|
|
9
10
|
id,
|
|
10
11
|
style,
|
|
11
12
|
active,
|
|
12
|
-
children
|
|
13
|
+
children,
|
|
14
|
+
ref
|
|
13
15
|
} = props;
|
|
14
16
|
const extraAttrs = getExtraAttrs(props);
|
|
15
17
|
const elRef = useRef(null);
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
el: elRef.current
|
|
18
|
-
}));
|
|
19
18
|
const onClick = e => {
|
|
20
19
|
emit(props, 'click', e);
|
|
21
20
|
};
|
|
22
21
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
23
22
|
className: classNames('breadcrumbs-item', className, active && 'breadcrumbs-item-active'),
|
|
24
|
-
ref:
|
|
23
|
+
ref: el => {
|
|
24
|
+
elRef.current = el;
|
|
25
|
+
setRef(ref, el);
|
|
26
|
+
},
|
|
25
27
|
id: id,
|
|
26
28
|
style: style,
|
|
27
29
|
onClick: onClick
|
|
28
30
|
}, extraAttrs), children);
|
|
29
|
-
}
|
|
31
|
+
};
|
|
30
32
|
BreadcrumbsItem.displayName = 'f7-breadcrumbs-item';
|
|
31
33
|
export default BreadcrumbsItem;
|
|
@@ -1,25 +1,27 @@
|
|
|
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
|
+
import { setRef } from '../shared/set-ref.js';
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
const BreadcrumbsSeparator =
|
|
7
|
+
const BreadcrumbsSeparator = props => {
|
|
7
8
|
const {
|
|
8
9
|
className,
|
|
9
10
|
id,
|
|
10
|
-
style
|
|
11
|
+
style,
|
|
12
|
+
ref
|
|
11
13
|
} = props;
|
|
12
14
|
const extraAttrs = getExtraAttrs(props);
|
|
13
15
|
const elRef = useRef(null);
|
|
14
|
-
useImperativeHandle(ref, () => ({
|
|
15
|
-
el: elRef.current
|
|
16
|
-
}));
|
|
17
16
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
18
17
|
className: classNames('breadcrumbs-separator', className),
|
|
19
|
-
ref:
|
|
18
|
+
ref: el => {
|
|
19
|
+
elRef.current = el;
|
|
20
|
+
setRef(ref, el);
|
|
21
|
+
},
|
|
20
22
|
id: id,
|
|
21
23
|
style: style
|
|
22
24
|
}, extraAttrs));
|
|
23
|
-
}
|
|
25
|
+
};
|
|
24
26
|
BreadcrumbsSeparator.displayName = 'f7-breadcrumbs-separator';
|
|
25
27
|
export default BreadcrumbsSeparator;
|
|
@@ -1,26 +1,28 @@
|
|
|
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
|
+
import { setRef } from '../shared/set-ref.js';
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
const Breadcrumbs =
|
|
7
|
+
const Breadcrumbs = props => {
|
|
7
8
|
const {
|
|
8
9
|
className,
|
|
9
10
|
id,
|
|
10
11
|
style,
|
|
11
|
-
children
|
|
12
|
+
children,
|
|
13
|
+
ref
|
|
12
14
|
} = props;
|
|
13
15
|
const extraAttrs = getExtraAttrs(props);
|
|
14
16
|
const elRef = useRef(null);
|
|
15
|
-
useImperativeHandle(ref, () => ({
|
|
16
|
-
el: elRef.current
|
|
17
|
-
}));
|
|
18
17
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
18
|
className: classNames('breadcrumbs', className),
|
|
20
|
-
ref:
|
|
19
|
+
ref: el => {
|
|
20
|
+
elRef.current = el;
|
|
21
|
+
setRef(ref, el);
|
|
22
|
+
},
|
|
21
23
|
id: id,
|
|
22
24
|
style: style
|
|
23
25
|
}, extraAttrs), children);
|
|
24
|
-
}
|
|
26
|
+
};
|
|
25
27
|
Breadcrumbs.displayName = 'f7-breadcrumbs';
|
|
26
28
|
export default Breadcrumbs;
|
package/components/button.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
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, extend, isStringProp, emit } from '../shared/utils.js';
|
|
4
4
|
import { colorClasses, actionsAttrs, actionsClasses, routerAttrs, routerClasses } from '../shared/mixins.js';
|
|
5
5
|
import { useTooltip } from '../shared/use-tooltip.js';
|
|
6
6
|
import { useIcon } from '../shared/use-icon.js';
|
|
7
7
|
import { useRouteProps } from '../shared/use-route-props.js';
|
|
8
8
|
import Preloader from './preloader.js';
|
|
9
|
+
import { setRef } from '../shared/set-ref.js';
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
const Button =
|
|
12
|
+
const Button = props => {
|
|
12
13
|
const {
|
|
13
14
|
className,
|
|
14
15
|
id,
|
|
@@ -46,16 +47,14 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
46
47
|
preloader,
|
|
47
48
|
preloaderSize,
|
|
48
49
|
preloaderColor,
|
|
49
|
-
loading
|
|
50
|
+
loading,
|
|
51
|
+
ref
|
|
50
52
|
} = props;
|
|
51
53
|
const extraAttrs = getExtraAttrs(props);
|
|
52
54
|
const elRef = useRef(null);
|
|
53
55
|
const onClick = e => {
|
|
54
56
|
emit(props, 'click', e);
|
|
55
57
|
};
|
|
56
|
-
useImperativeHandle(ref, () => ({
|
|
57
|
-
el: elRef.current
|
|
58
|
-
}));
|
|
59
58
|
useTooltip(elRef, props);
|
|
60
59
|
useRouteProps(elRef, props);
|
|
61
60
|
const getClasses = () => {
|
|
@@ -108,7 +107,10 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
108
107
|
}
|
|
109
108
|
if (preloader) {
|
|
110
109
|
return /*#__PURE__*/React.createElement(ButtonTag, _extends({
|
|
111
|
-
ref:
|
|
110
|
+
ref: el => {
|
|
111
|
+
elRef.current = el;
|
|
112
|
+
setRef(ref, el);
|
|
113
|
+
},
|
|
112
114
|
id: id,
|
|
113
115
|
style: style,
|
|
114
116
|
className: getClasses()
|
|
@@ -120,13 +122,16 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
120
122
|
}), /*#__PURE__*/React.createElement("span", null, iconEl, textEl, children));
|
|
121
123
|
}
|
|
122
124
|
return /*#__PURE__*/React.createElement(ButtonTag, _extends({
|
|
123
|
-
ref:
|
|
125
|
+
ref: el => {
|
|
126
|
+
elRef.current = el;
|
|
127
|
+
setRef(ref, el);
|
|
128
|
+
},
|
|
124
129
|
id: id,
|
|
125
130
|
style: style,
|
|
126
131
|
className: getClasses()
|
|
127
132
|
}, getAttrs(), extraAttrs, {
|
|
128
133
|
onClick: onClick
|
|
129
134
|
}), iconEl, textEl, children);
|
|
130
|
-
}
|
|
135
|
+
};
|
|
131
136
|
Button.displayName = 'f7-button';
|
|
132
137
|
export default Button;
|
|
@@ -1,22 +1,21 @@
|
|
|
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
|
|
|
7
|
-
const CardContent =
|
|
8
|
+
const CardContent = props => {
|
|
8
9
|
const {
|
|
9
10
|
className,
|
|
10
11
|
id,
|
|
11
12
|
style,
|
|
12
13
|
children,
|
|
13
|
-
padding = true
|
|
14
|
+
padding = true,
|
|
15
|
+
ref
|
|
14
16
|
} = props;
|
|
15
17
|
const extraAttrs = getExtraAttrs(props);
|
|
16
18
|
const elRef = useRef(null);
|
|
17
|
-
useImperativeHandle(ref, () => ({
|
|
18
|
-
el: elRef.current
|
|
19
|
-
}));
|
|
20
19
|
const classes = classNames(className, 'card-content', {
|
|
21
20
|
'card-content-padding': padding
|
|
22
21
|
}, colorClasses(props));
|
|
@@ -24,8 +23,11 @@ const CardContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24
23
|
id: id,
|
|
25
24
|
style: style,
|
|
26
25
|
className: classes,
|
|
27
|
-
ref:
|
|
26
|
+
ref: el => {
|
|
27
|
+
elRef.current = el;
|
|
28
|
+
setRef(ref, el);
|
|
29
|
+
}
|
|
28
30
|
}, extraAttrs), children);
|
|
29
|
-
}
|
|
31
|
+
};
|
|
30
32
|
CardContent.displayName = 'f7-card-content';
|
|
31
33
|
export default CardContent;
|
|
@@ -1,28 +1,30 @@
|
|
|
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
|
|
|
7
|
-
const CardFooter =
|
|
8
|
+
const CardFooter = props => {
|
|
8
9
|
const {
|
|
9
10
|
className,
|
|
10
11
|
id,
|
|
11
12
|
style,
|
|
12
|
-
children
|
|
13
|
+
children,
|
|
14
|
+
ref
|
|
13
15
|
} = props;
|
|
14
16
|
const extraAttrs = getExtraAttrs(props);
|
|
15
17
|
const elRef = useRef(null);
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
el: elRef.current
|
|
18
|
-
}));
|
|
19
18
|
const classes = classNames(className, 'card-footer', colorClasses(props));
|
|
20
19
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
21
20
|
id: id,
|
|
22
21
|
style: style,
|
|
23
22
|
className: classes,
|
|
24
|
-
ref:
|
|
23
|
+
ref: el => {
|
|
24
|
+
elRef.current = el;
|
|
25
|
+
setRef(ref, el);
|
|
26
|
+
}
|
|
25
27
|
}, extraAttrs), children);
|
|
26
|
-
}
|
|
28
|
+
};
|
|
27
29
|
CardFooter.displayName = 'f7-card-footer';
|
|
28
30
|
export default CardFooter;
|
|
@@ -1,28 +1,30 @@
|
|
|
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
|
|
|
7
|
-
const CardHeader =
|
|
8
|
+
const CardHeader = props => {
|
|
8
9
|
const {
|
|
9
10
|
className,
|
|
10
11
|
id,
|
|
11
12
|
style,
|
|
12
|
-
children
|
|
13
|
+
children,
|
|
14
|
+
ref
|
|
13
15
|
} = props;
|
|
14
16
|
const extraAttrs = getExtraAttrs(props);
|
|
15
17
|
const elRef = useRef(null);
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
el: elRef.current
|
|
18
|
-
}));
|
|
19
18
|
const classes = classNames(className, 'card-header', colorClasses(props));
|
|
20
19
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
21
20
|
id: id,
|
|
22
21
|
style: style,
|
|
23
22
|
className: classes,
|
|
24
|
-
ref:
|
|
23
|
+
ref: el => {
|
|
24
|
+
elRef.current = el;
|
|
25
|
+
setRef(ref, el);
|
|
26
|
+
}
|
|
25
27
|
}, extraAttrs), children);
|
|
26
|
-
}
|
|
28
|
+
};
|
|
27
29
|
CardHeader.displayName = 'f7-card-header';
|
|
28
30
|
export default CardHeader;
|
package/components/card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 CardHeader from './card-header.js';
|
|
5
5
|
import CardContent from './card-content.js';
|
|
@@ -8,9 +8,10 @@ import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
|
8
8
|
import { colorClasses } from '../shared/mixins.js';
|
|
9
9
|
import { f7, f7ready } from '../shared/f7.js';
|
|
10
10
|
import { watchProp } from '../shared/watch-prop.js';
|
|
11
|
+
import { setRef } from '../shared/set-ref.js';
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
const Card =
|
|
14
|
+
const Card = props => {
|
|
14
15
|
const {
|
|
15
16
|
className,
|
|
16
17
|
id,
|
|
@@ -36,7 +37,8 @@ const Card = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
36
37
|
swipeToClose,
|
|
37
38
|
closeByBackdropClick,
|
|
38
39
|
backdrop,
|
|
39
|
-
backdropEl
|
|
40
|
+
backdropEl,
|
|
41
|
+
ref
|
|
40
42
|
} = props;
|
|
41
43
|
const extraAttrs = getExtraAttrs(props);
|
|
42
44
|
const elRef = useRef(null);
|
|
@@ -107,11 +109,6 @@ const Card = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
107
109
|
close();
|
|
108
110
|
}
|
|
109
111
|
});
|
|
110
|
-
useImperativeHandle(ref, () => ({
|
|
111
|
-
el: elRef.current,
|
|
112
|
-
open,
|
|
113
|
-
close
|
|
114
|
-
}));
|
|
115
112
|
let headerEl;
|
|
116
113
|
let contentEl;
|
|
117
114
|
let footerEl;
|
|
@@ -150,8 +147,14 @@ const Card = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
150
147
|
"data-close-by-backdrop-click": typeof closeByBackdropClick === 'undefined' ? closeByBackdropClick : closeByBackdropClick.toString(),
|
|
151
148
|
"data-backdrop": typeof backdrop === 'undefined' ? backdrop : backdrop.toString(),
|
|
152
149
|
"data-backdrop-el": backdropEl,
|
|
153
|
-
ref:
|
|
150
|
+
ref: el => {
|
|
151
|
+
elRef.current = el;
|
|
152
|
+
setRef(ref, el, {
|
|
153
|
+
open,
|
|
154
|
+
close
|
|
155
|
+
});
|
|
156
|
+
}
|
|
154
157
|
}, extraAttrs), headerEl, contentEl, footerEl, slots.default);
|
|
155
|
-
}
|
|
158
|
+
};
|
|
156
159
|
Card.displayName = 'f7-card';
|
|
157
160
|
export default Card;
|
package/components/checkbox.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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, useEffect } from 'react';
|
|
3
3
|
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
4
4
|
import { colorClasses } from '../shared/mixins.js';
|
|
5
|
+
import { setRef } from '../shared/set-ref.js';
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
const Checkbox =
|
|
8
|
+
const Checkbox = props => {
|
|
8
9
|
const {
|
|
9
10
|
className,
|
|
10
11
|
id,
|
|
@@ -16,15 +17,12 @@ const Checkbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
16
17
|
readonly,
|
|
17
18
|
checked,
|
|
18
19
|
defaultChecked,
|
|
19
|
-
indeterminate
|
|
20
|
+
indeterminate,
|
|
21
|
+
ref
|
|
20
22
|
} = props;
|
|
21
23
|
const extraAttrs = getExtraAttrs(props);
|
|
22
24
|
const elRef = useRef(null);
|
|
23
25
|
const inputElRef = useRef(null);
|
|
24
|
-
useImperativeHandle(ref, () => ({
|
|
25
|
-
el: elRef.current,
|
|
26
|
-
inputEl: inputElRef.current
|
|
27
|
-
}));
|
|
28
26
|
const onChange = event => {
|
|
29
27
|
emit(props, 'change', event);
|
|
30
28
|
};
|
|
@@ -55,8 +53,13 @@ const Checkbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
55
53
|
id: id,
|
|
56
54
|
style: style,
|
|
57
55
|
className: classes,
|
|
58
|
-
ref:
|
|
56
|
+
ref: el => {
|
|
57
|
+
elRef.current = el;
|
|
58
|
+
setRef(ref, el, {
|
|
59
|
+
inputEl: inputElRef.current
|
|
60
|
+
});
|
|
61
|
+
}
|
|
59
62
|
}, extraAttrs), inputEl, iconEl, children);
|
|
60
|
-
}
|
|
63
|
+
};
|
|
61
64
|
Checkbox.displayName = 'f7-checkbox';
|
|
62
65
|
export default Checkbox;
|
package/components/chip.js
CHANGED
|
@@ -1,12 +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 { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
4
4
|
import { colorClasses } from '../shared/mixins.js';
|
|
5
5
|
import { useTooltip } from '../shared/use-tooltip.js';
|
|
6
6
|
import { useIcon } from '../shared/use-icon.js';
|
|
7
|
+
import { setRef } from '../shared/set-ref.js';
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
const Chip =
|
|
10
|
+
const Chip = props => {
|
|
10
11
|
const {
|
|
11
12
|
className,
|
|
12
13
|
id,
|
|
@@ -16,7 +17,8 @@ const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
16
17
|
deleteable,
|
|
17
18
|
mediaTextColor,
|
|
18
19
|
mediaBgColor,
|
|
19
|
-
outline
|
|
20
|
+
outline,
|
|
21
|
+
ref
|
|
20
22
|
} = props;
|
|
21
23
|
const extraAttrs = getExtraAttrs(props);
|
|
22
24
|
const onClick = event => {
|
|
@@ -26,9 +28,6 @@ const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
26
28
|
emit(props, 'delete', event);
|
|
27
29
|
};
|
|
28
30
|
const elRef = useRef(null);
|
|
29
|
-
useImperativeHandle(ref, () => ({
|
|
30
|
-
el: elRef.current
|
|
31
|
-
}));
|
|
32
31
|
useTooltip(elRef, props);
|
|
33
32
|
const slots = getSlots(props);
|
|
34
33
|
const iconEl = useIcon(props);
|
|
@@ -59,10 +58,13 @@ const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
59
58
|
id: id,
|
|
60
59
|
style: style,
|
|
61
60
|
className: classes,
|
|
62
|
-
ref:
|
|
61
|
+
ref: el => {
|
|
62
|
+
elRef.current = el;
|
|
63
|
+
setRef(ref, el);
|
|
64
|
+
}
|
|
63
65
|
}, extraAttrs, {
|
|
64
66
|
onClick: onClick
|
|
65
67
|
}), mediaEl, labelEl, deleteEl);
|
|
66
|
-
}
|
|
68
|
+
};
|
|
67
69
|
Chip.displayName = 'f7-chip';
|
|
68
70
|
export default Chip;
|
|
@@ -1,27 +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 { getExtraAttrs, classNames } from '../shared/utils.js';
|
|
4
|
+
import { setRef } from '../shared/set-ref.js';
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
const FabBackdrop =
|
|
7
|
+
const FabBackdrop = props => {
|
|
7
8
|
const {
|
|
8
9
|
className,
|
|
9
10
|
id,
|
|
10
11
|
style,
|
|
11
|
-
children
|
|
12
|
+
children,
|
|
13
|
+
ref
|
|
12
14
|
} = props;
|
|
13
15
|
const extraAttrs = getExtraAttrs(props);
|
|
14
16
|
const elRef = useRef(null);
|
|
15
|
-
useImperativeHandle(ref, () => ({
|
|
16
|
-
el: elRef.current
|
|
17
|
-
}));
|
|
18
17
|
const classes = classNames(className, 'fab-backdrop');
|
|
19
18
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
20
19
|
id: id,
|
|
21
20
|
style: style,
|
|
22
21
|
className: classes,
|
|
23
|
-
ref:
|
|
22
|
+
ref: el => {
|
|
23
|
+
elRef.current = el;
|
|
24
|
+
setRef(ref, el);
|
|
25
|
+
}
|
|
24
26
|
}, extraAttrs), children);
|
|
25
|
-
}
|
|
27
|
+
};
|
|
26
28
|
FabBackdrop.displayName = 'f7-fab-backdrop';
|
|
27
29
|
export default FabBackdrop;
|