framework7-react 7.0.8 → 8.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 +2 -2
- package/components/accordion-item.js +2 -11
- package/components/accordion-toggle.js +2 -2
- package/components/accordion.js +2 -2
- package/components/actions-button.d.ts +1 -1
- package/components/actions-button.js +4 -8
- package/components/actions-group.js +2 -2
- package/components/actions-label.js +4 -6
- package/components/actions.js +4 -14
- package/components/app.js +4 -8
- package/components/area-chart.js +6 -45
- package/components/badge.js +2 -2
- package/components/block-footer.js +2 -2
- package/components/block-header.js +2 -2
- package/components/block-title.js +2 -2
- package/components/block.d.ts +17 -4
- package/components/block.js +37 -11
- package/components/breadcrumbs-collapsed.js +2 -4
- package/components/breadcrumbs-item.js +2 -4
- package/components/breadcrumbs-separator.js +2 -2
- package/components/breadcrumbs.js +2 -2
- package/components/button.d.ts +3 -7
- package/components/button.js +8 -24
- package/components/card-content.js +2 -2
- package/components/card-footer.js +2 -2
- package/components/card-header.js +2 -2
- package/components/card.d.ts +5 -2
- package/components/card.js +14 -23
- package/components/checkbox.js +2 -4
- package/components/chip.d.ts +0 -1
- package/components/chip.js +2 -9
- package/components/fab-backdrop.js +2 -2
- package/components/fab-button.js +2 -6
- package/components/fab-buttons.js +2 -2
- package/components/fab.js +2 -10
- package/components/gauge.js +2 -2
- package/components/icon.d.ts +0 -1
- package/components/icon.js +3 -17
- package/components/input.js +1 -57
- package/components/link.d.ts +0 -1
- package/components/link.js +5 -12
- package/components/list-button.js +2 -4
- package/components/list-group.js +2 -2
- package/components/list-index.d.ts +0 -1
- package/components/list-index.js +3 -13
- package/components/list-input.d.ts +0 -1
- package/components/list-input.js +1 -55
- package/components/list-item-content.js +6 -20
- package/components/list-item.d.ts +0 -1
- package/components/list-item.js +5 -35
- package/components/list.d.ts +21 -9
- package/components/list.js +43 -37
- package/components/login-screen-title.js +2 -2
- package/components/login-screen.js +3 -15
- package/components/message.js +2 -10
- package/components/messagebar-attachment.js +2 -5
- package/components/messagebar-attachments.js +2 -2
- package/components/messagebar-sheet-image.js +4 -5
- package/components/messagebar-sheet-item.js +2 -2
- package/components/messagebar-sheet.js +2 -2
- package/components/messagebar.js +1 -19
- package/components/messages-title.js +2 -2
- package/components/messages.js +2 -15
- package/components/nav-left.js +2 -6
- package/components/nav-right.js +2 -2
- package/components/nav-title-large.js +2 -2
- package/components/nav-title.js +2 -4
- package/components/navbar.d.ts +1 -2
- package/components/navbar.js +5 -31
- package/components/page-content.js +2 -16
- package/components/page.d.ts +0 -1
- package/components/page.js +4 -62
- package/components/panel.d.ts +1 -0
- package/components/panel.js +6 -26
- package/components/photo-browser.js +1 -17
- package/components/pie-chart.js +6 -18
- package/components/popover.d.ts +1 -0
- package/components/popover.js +4 -14
- package/components/popup.js +3 -19
- package/components/preloader.js +5 -14
- package/components/progressbar.js +2 -4
- package/components/radio.js +2 -4
- package/components/range.js +2 -9
- package/components/routable-modals.js +2 -7
- package/components/searchbar.d.ts +1 -2
- package/components/searchbar.js +5 -30
- package/components/segmented.d.ts +0 -3
- package/components/segmented.js +4 -10
- package/components/sheet.js +2 -22
- package/components/stepper.d.ts +0 -5
- package/components/stepper.js +3 -33
- package/components/subnavbar.js +2 -2
- package/components/swipeout-actions.js +2 -4
- package/components/swipeout-button.js +2 -4
- package/components/swiper-slide.d.ts +1 -0
- package/components/swiper-slide.js +1 -0
- package/components/swiper.d.ts +1 -0
- package/components/swiper.js +1 -0
- package/components/tab.js +4 -15
- package/components/tabs.js +1 -4
- package/components/text-editor.js +1 -18
- package/components/toggle.js +1 -13
- package/components/toolbar.d.ts +2 -6
- package/components/toolbar.js +9 -20
- package/components/treeview-item.d.ts +0 -1
- package/components/treeview-item.js +2 -11
- package/components/treeview.js +2 -2
- package/components/view.d.ts +0 -6
- package/components/view.js +3 -30
- package/components/views.js +2 -2
- package/framework7-react.d.ts +2 -12
- package/framework7-react.js +3 -12
- package/package.json +1 -1
- package/shared/components-router.js +0 -32
- package/shared/f7.js +5 -19
- package/shared/get-router-initial-component.js +0 -4
- package/shared/mixins.js +2 -8
- package/shared/plugin.js +2 -8
- package/shared/router-open-in.js +4 -15
- package/shared/tabbar-context.js +1 -1
- package/shared/use-icon.js +1 -6
- package/shared/use-isomorphic-layout-effect.js +0 -2
- package/shared/use-route-props.js +0 -1
- package/shared/use-smart-select.js +0 -3
- package/shared/use-store.js +4 -8
- package/shared/use-tab.js +0 -4
- package/shared/use-theme.js +0 -2
- package/shared/use-tooltip.js +0 -5
- package/shared/utils.js +0 -18
- package/shared/watch-prop.js +0 -1
- package/components/appbar.d.ts +0 -28
- package/components/appbar.js +0 -45
- package/components/col.d.ts +0 -36
- package/components/col.js +0 -75
- package/components/list-item-cell.d.ts +0 -23
- package/components/list-item-cell.js +0 -28
- package/components/list-item-row.d.ts +0 -23
- package/components/list-item-row.js +0 -28
- package/components/menu-dropdown-item.d.ts +0 -68
- package/components/menu-dropdown-item.js +0 -59
- package/components/menu-dropdown.d.ts +0 -28
- package/components/menu-dropdown.js +0 -42
- package/components/menu-item.d.ts +0 -81
- package/components/menu-item.js +0 -101
- package/components/menu.d.ts +0 -23
- package/components/menu.js +0 -30
- package/components/row.d.ts +0 -31
- package/components/row.js +0 -64
package/shared/utils.js
CHANGED
|
@@ -18,11 +18,9 @@ export function extend() {
|
|
|
18
18
|
let deep = true;
|
|
19
19
|
let to;
|
|
20
20
|
let from;
|
|
21
|
-
|
|
22
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
22
|
args[_key] = arguments[_key];
|
|
24
23
|
}
|
|
25
|
-
|
|
26
24
|
if (typeof args[0] === 'boolean') {
|
|
27
25
|
[deep, to] = args;
|
|
28
26
|
args.splice(0, 2);
|
|
@@ -32,17 +30,13 @@ export function extend() {
|
|
|
32
30
|
args.splice(0, 1);
|
|
33
31
|
from = args;
|
|
34
32
|
}
|
|
35
|
-
|
|
36
33
|
for (let i = 0; i < from.length; i += 1) {
|
|
37
34
|
const nextSource = args[i];
|
|
38
|
-
|
|
39
35
|
if (nextSource !== undefined && nextSource !== null) {
|
|
40
36
|
const keysArray = Object.keys(Object(nextSource));
|
|
41
|
-
|
|
42
37
|
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
|
43
38
|
const nextKey = keysArray[nextIndex];
|
|
44
39
|
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
|
45
|
-
|
|
46
40
|
if (desc !== undefined && desc.enumerable) {
|
|
47
41
|
if (!deep) {
|
|
48
42
|
to[nextKey] = nextSource[nextKey];
|
|
@@ -58,16 +52,13 @@ export function extend() {
|
|
|
58
52
|
}
|
|
59
53
|
}
|
|
60
54
|
}
|
|
61
|
-
|
|
62
55
|
return to;
|
|
63
56
|
}
|
|
64
57
|
export function flattenArray() {
|
|
65
58
|
const arr = [];
|
|
66
|
-
|
|
67
59
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
68
60
|
args[_key2] = arguments[_key2];
|
|
69
61
|
}
|
|
70
|
-
|
|
71
62
|
args.forEach(arg => {
|
|
72
63
|
if (Array.isArray(arg)) arr.push(...flattenArray(...arg));else arr.push(arg);
|
|
73
64
|
});
|
|
@@ -75,11 +66,9 @@ export function flattenArray() {
|
|
|
75
66
|
}
|
|
76
67
|
export function classNames() {
|
|
77
68
|
const classes = [];
|
|
78
|
-
|
|
79
69
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
80
70
|
args[_key3] = arguments[_key3];
|
|
81
71
|
}
|
|
82
|
-
|
|
83
72
|
args.forEach(arg => {
|
|
84
73
|
if (typeof arg === 'object' && arg.constructor === Object) {
|
|
85
74
|
Object.keys(arg).forEach(key => {
|
|
@@ -97,20 +86,16 @@ export function getSlots(props) {
|
|
|
97
86
|
if (props === void 0) {
|
|
98
87
|
props = {};
|
|
99
88
|
}
|
|
100
|
-
|
|
101
89
|
const slots = {};
|
|
102
90
|
if (!props) return slots;
|
|
103
91
|
const children = props.children;
|
|
104
|
-
|
|
105
92
|
if (!children || children.length === 0) {
|
|
106
93
|
return slots;
|
|
107
94
|
}
|
|
108
|
-
|
|
109
95
|
function addChildToSlot(name, child) {
|
|
110
96
|
if (!slots[name]) slots[name] = [];
|
|
111
97
|
slots[name].push(child);
|
|
112
98
|
}
|
|
113
|
-
|
|
114
99
|
if (Array.isArray(children)) {
|
|
115
100
|
children.forEach(child => {
|
|
116
101
|
if (!child) return;
|
|
@@ -122,14 +107,12 @@ export function getSlots(props) {
|
|
|
122
107
|
if (children.props && children.props.slot) slotName = children.props.slot;
|
|
123
108
|
addChildToSlot(slotName, children);
|
|
124
109
|
}
|
|
125
|
-
|
|
126
110
|
return slots;
|
|
127
111
|
}
|
|
128
112
|
export function emit(props, events) {
|
|
129
113
|
for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
|
|
130
114
|
args[_key4 - 2] = arguments[_key4];
|
|
131
115
|
}
|
|
132
|
-
|
|
133
116
|
if (!events || !events.trim().length || typeof events !== 'string') return;
|
|
134
117
|
events.trim().split(' ').forEach(event => {
|
|
135
118
|
let eventName = (event || '').trim();
|
|
@@ -143,7 +126,6 @@ export function getExtraAttrs(props) {
|
|
|
143
126
|
if (props === void 0) {
|
|
144
127
|
props = {};
|
|
145
128
|
}
|
|
146
|
-
|
|
147
129
|
const extraAttrs = {};
|
|
148
130
|
Object.keys(props).forEach(key => {
|
|
149
131
|
if (key.indexOf('data-') === 0 || key.indexOf('aria-') === 0 || key === 'role') {
|
package/shared/watch-prop.js
CHANGED
package/components/appbar.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface AppbarProps {
|
|
6
|
-
slot?: string;
|
|
7
|
-
id?: string | number;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
noShadow?: boolean;
|
|
11
|
-
noHairline?: boolean;
|
|
12
|
-
inner?: boolean;
|
|
13
|
-
innerClass?: string;
|
|
14
|
-
innerClassName?: string;
|
|
15
|
-
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
color?: string;
|
|
18
|
-
colorTheme?: string;
|
|
19
|
-
textColor?: string;
|
|
20
|
-
bgColor?: string;
|
|
21
|
-
borderColor?: string;
|
|
22
|
-
rippleColor?: string;
|
|
23
|
-
dark?: boolean;
|
|
24
|
-
}
|
|
25
|
-
declare const Appbar: React.FunctionComponent<AppbarProps>;
|
|
26
|
-
|
|
27
|
-
export default Appbar;
|
|
28
|
-
|
package/components/appbar.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs, getSlots } from '../shared/utils.js';
|
|
5
|
-
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
-
|
|
7
|
-
const Appbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
-
const {
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
style,
|
|
12
|
-
children,
|
|
13
|
-
inner = true,
|
|
14
|
-
innerClass,
|
|
15
|
-
innerClassName,
|
|
16
|
-
noShadow,
|
|
17
|
-
noHairline
|
|
18
|
-
} = props;
|
|
19
|
-
const extraAttrs = getExtraAttrs(props);
|
|
20
|
-
const elRef = useRef(null);
|
|
21
|
-
useImperativeHandle(ref, () => ({
|
|
22
|
-
el: elRef.current
|
|
23
|
-
}));
|
|
24
|
-
let innerEl;
|
|
25
|
-
|
|
26
|
-
if (inner) {
|
|
27
|
-
innerEl = /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: classNames('appbar-inner', innerClass, innerClassName)
|
|
29
|
-
}, children);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const classes = classNames(className, 'appbar', {
|
|
33
|
-
'no-shadow': noShadow,
|
|
34
|
-
'no-hairline': noHairline
|
|
35
|
-
}, colorClasses(props));
|
|
36
|
-
const slots = getSlots(props);
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
38
|
-
id: id,
|
|
39
|
-
style: style,
|
|
40
|
-
className: classes,
|
|
41
|
-
ref: elRef
|
|
42
|
-
}, extraAttrs), slots['before-inner'], innerEl || slots.default, slots['after-inner']);
|
|
43
|
-
});
|
|
44
|
-
Appbar.displayName = 'f7-appbar';
|
|
45
|
-
export default Appbar;
|
package/components/col.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface ColProps {
|
|
6
|
-
slot?: string;
|
|
7
|
-
id?: string | number;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
tag ?: string;
|
|
11
|
-
width ?: number | string;
|
|
12
|
-
xsmall ?: number | string;
|
|
13
|
-
small ?: number | string;
|
|
14
|
-
medium ?: number | string;
|
|
15
|
-
large ?: number | string;
|
|
16
|
-
xlarge ?: number | string;
|
|
17
|
-
resizable ?: boolean;
|
|
18
|
-
resizableFixed ?: boolean;
|
|
19
|
-
resizableAbsolute ?: boolean;
|
|
20
|
-
resizableHandler ?: boolean;
|
|
21
|
-
onClick ?: (event?: any) => void;
|
|
22
|
-
onGridResize ?: (...args: any[]) => void;
|
|
23
|
-
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
|
|
24
|
-
children?: React.ReactNode;
|
|
25
|
-
color?: string;
|
|
26
|
-
colorTheme?: string;
|
|
27
|
-
textColor?: string;
|
|
28
|
-
bgColor?: string;
|
|
29
|
-
borderColor?: string;
|
|
30
|
-
rippleColor?: string;
|
|
31
|
-
dark?: boolean;
|
|
32
|
-
}
|
|
33
|
-
declare const Col: React.FunctionComponent<ColProps>;
|
|
34
|
-
|
|
35
|
-
export default Col;
|
|
36
|
-
|
package/components/col.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React, { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
5
|
-
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
-
import { f7ready, f7 } from '../shared/f7.js';
|
|
7
|
-
|
|
8
|
-
const Col = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
-
const {
|
|
10
|
-
className,
|
|
11
|
-
id,
|
|
12
|
-
style,
|
|
13
|
-
children,
|
|
14
|
-
tag = 'div',
|
|
15
|
-
width = 'auto',
|
|
16
|
-
xsmall,
|
|
17
|
-
small,
|
|
18
|
-
medium,
|
|
19
|
-
large,
|
|
20
|
-
xlarge,
|
|
21
|
-
resizable,
|
|
22
|
-
resizableFixed,
|
|
23
|
-
resizableAbsolute,
|
|
24
|
-
resizableHandler = true
|
|
25
|
-
} = props;
|
|
26
|
-
const extraAttrs = getExtraAttrs(props);
|
|
27
|
-
const elRef = useRef(null);
|
|
28
|
-
|
|
29
|
-
const onClick = event => {
|
|
30
|
-
emit(props, 'click', event);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const onResize = el => {
|
|
34
|
-
if (el === elRef.current) {
|
|
35
|
-
emit(props, 'gridResize');
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
useImperativeHandle(ref, () => ({
|
|
40
|
-
el: elRef.current
|
|
41
|
-
}));
|
|
42
|
-
const ColTag = tag;
|
|
43
|
-
const classes = classNames(className, {
|
|
44
|
-
col: width === 'auto',
|
|
45
|
-
[`col-${width}`]: width !== 'auto',
|
|
46
|
-
[`xsmall-${xsmall}`]: xsmall,
|
|
47
|
-
[`small-${small}`]: small,
|
|
48
|
-
[`medium-${medium}`]: medium,
|
|
49
|
-
[`large-${large}`]: large,
|
|
50
|
-
[`xlarge-${xlarge}`]: xlarge,
|
|
51
|
-
resizable,
|
|
52
|
-
'resizable-fixed': resizableFixed,
|
|
53
|
-
'resizable-absolute': resizableAbsolute
|
|
54
|
-
}, colorClasses(props));
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
f7ready(() => {
|
|
57
|
-
f7.on('gridResize', onResize);
|
|
58
|
-
});
|
|
59
|
-
return () => {
|
|
60
|
-
f7.off('gridResize', onResize);
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
return /*#__PURE__*/React.createElement(ColTag, _extends({
|
|
64
|
-
id: id,
|
|
65
|
-
style: style,
|
|
66
|
-
className: classes,
|
|
67
|
-
ref: elRef
|
|
68
|
-
}, extraAttrs, {
|
|
69
|
-
onClick: onClick
|
|
70
|
-
}), children, resizable && resizableHandler && /*#__PURE__*/React.createElement("span", {
|
|
71
|
-
className: "resize-handler"
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
74
|
-
Col.displayName = 'f7-col';
|
|
75
|
-
export default Col;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface ListItemCellProps {
|
|
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
|
-
color?: string;
|
|
13
|
-
colorTheme?: string;
|
|
14
|
-
textColor?: string;
|
|
15
|
-
bgColor?: string;
|
|
16
|
-
borderColor?: string;
|
|
17
|
-
rippleColor?: string;
|
|
18
|
-
dark?: boolean;
|
|
19
|
-
}
|
|
20
|
-
declare const ListItemCell: React.FunctionComponent<ListItemCellProps>;
|
|
21
|
-
|
|
22
|
-
export default ListItemCell;
|
|
23
|
-
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
|
-
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
-
|
|
7
|
-
const ListItemCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
-
const {
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
style,
|
|
12
|
-
children
|
|
13
|
-
} = props;
|
|
14
|
-
const extraAttrs = getExtraAttrs(props);
|
|
15
|
-
const elRef = useRef(null);
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
el: elRef.current
|
|
18
|
-
}));
|
|
19
|
-
const classes = classNames(className, 'item-cell', colorClasses(props));
|
|
20
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
21
|
-
id: id,
|
|
22
|
-
style: style,
|
|
23
|
-
className: classes,
|
|
24
|
-
ref: elRef
|
|
25
|
-
}, extraAttrs), children);
|
|
26
|
-
});
|
|
27
|
-
ListItemCell.displayName = 'f7-list-item-cell';
|
|
28
|
-
export default ListItemCell;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface ListItemRowProps {
|
|
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
|
-
color?: string;
|
|
13
|
-
colorTheme?: string;
|
|
14
|
-
textColor?: string;
|
|
15
|
-
bgColor?: string;
|
|
16
|
-
borderColor?: string;
|
|
17
|
-
rippleColor?: string;
|
|
18
|
-
dark?: boolean;
|
|
19
|
-
}
|
|
20
|
-
declare const ListItemRow: React.FunctionComponent<ListItemRowProps>;
|
|
21
|
-
|
|
22
|
-
export default ListItemRow;
|
|
23
|
-
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
|
-
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
-
|
|
7
|
-
const ListItemRow = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
-
const {
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
style,
|
|
12
|
-
children
|
|
13
|
-
} = props;
|
|
14
|
-
const extraAttrs = getExtraAttrs(props);
|
|
15
|
-
const elRef = useRef(null);
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
el: elRef.current
|
|
18
|
-
}));
|
|
19
|
-
const classes = classNames(className, 'item-row', colorClasses(props));
|
|
20
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
21
|
-
id: id,
|
|
22
|
-
style: style,
|
|
23
|
-
className: classes,
|
|
24
|
-
ref: elRef
|
|
25
|
-
}, extraAttrs), children);
|
|
26
|
-
});
|
|
27
|
-
ListItemRow.displayName = 'f7-list-item-row';
|
|
28
|
-
export default ListItemRow;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface MenuDropdownItemProps {
|
|
6
|
-
slot?: string;
|
|
7
|
-
id?: string | number;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
text ?: string;
|
|
11
|
-
link ?: boolean;
|
|
12
|
-
href ?: string;
|
|
13
|
-
target ?: string;
|
|
14
|
-
divider ?: boolean;
|
|
15
|
-
color?: string;
|
|
16
|
-
colorTheme?: string;
|
|
17
|
-
textColor?: string;
|
|
18
|
-
bgColor?: string;
|
|
19
|
-
borderColor?: string;
|
|
20
|
-
rippleColor?: string;
|
|
21
|
-
dark?: boolean;
|
|
22
|
-
back?: boolean;
|
|
23
|
-
external?: boolean;
|
|
24
|
-
force?: boolean;
|
|
25
|
-
animate?: boolean;
|
|
26
|
-
ignoreCache?: boolean;
|
|
27
|
-
reloadCurrent?: boolean;
|
|
28
|
-
reloadAll?: boolean;
|
|
29
|
-
reloadPrevious?: boolean;
|
|
30
|
-
reloadDetail?: boolean;
|
|
31
|
-
routeTabId?: string;
|
|
32
|
-
view?: string;
|
|
33
|
-
routeProps?: any;
|
|
34
|
-
preventRouter?: boolean;
|
|
35
|
-
transition?: string;
|
|
36
|
-
openIn?: string;
|
|
37
|
-
searchbarEnable?: boolean | string;
|
|
38
|
-
searchbarDisable?: boolean | string;
|
|
39
|
-
searchbarClear?: boolean | string;
|
|
40
|
-
searchbarToggle?: boolean | string;
|
|
41
|
-
panelOpen?: boolean | string;
|
|
42
|
-
panelClose?: boolean | string;
|
|
43
|
-
panelToggle?: boolean | string;
|
|
44
|
-
popupOpen?: boolean | string;
|
|
45
|
-
popupClose?: boolean | string;
|
|
46
|
-
actionsOpen?: boolean | string;
|
|
47
|
-
actionsClose?: boolean | string;
|
|
48
|
-
popoverOpen?: boolean | string;
|
|
49
|
-
popoverClose?: boolean | string;
|
|
50
|
-
loginScreenOpen?: boolean | string;
|
|
51
|
-
loginScreenClose?: boolean | string;
|
|
52
|
-
sheetOpen?: boolean | string;
|
|
53
|
-
sheetClose?: boolean | string;
|
|
54
|
-
sortableEnable?: boolean | string;
|
|
55
|
-
sortableDisable?: boolean | string;
|
|
56
|
-
sortableToggle?: boolean | string;
|
|
57
|
-
cardOpen?: boolean | string;
|
|
58
|
-
cardPreventOpen?: boolean | string;
|
|
59
|
-
cardClose?: boolean | string;
|
|
60
|
-
menuClose?: boolean | string;
|
|
61
|
-
onClick ?: (event?: any) => void;
|
|
62
|
-
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
|
|
63
|
-
children?: React.ReactNode;
|
|
64
|
-
}
|
|
65
|
-
declare const MenuDropdownItem: React.FunctionComponent<MenuDropdownItemProps>;
|
|
66
|
-
|
|
67
|
-
export default MenuDropdownItem;
|
|
68
|
-
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
5
|
-
import { colorClasses, routerAttrs, routerClasses, actionsAttrs, actionsClasses } from '../shared/mixins.js';
|
|
6
|
-
import { useRouteProps } from '../shared/use-route-props.js';
|
|
7
|
-
|
|
8
|
-
const MenuDropdownItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
-
const {
|
|
10
|
-
className,
|
|
11
|
-
id,
|
|
12
|
-
style,
|
|
13
|
-
children,
|
|
14
|
-
link,
|
|
15
|
-
href,
|
|
16
|
-
target,
|
|
17
|
-
text,
|
|
18
|
-
divider,
|
|
19
|
-
menuClose
|
|
20
|
-
} = props;
|
|
21
|
-
const extraAttrs = getExtraAttrs(props);
|
|
22
|
-
const elRef = useRef(null);
|
|
23
|
-
|
|
24
|
-
const onClick = e => {
|
|
25
|
-
emit(props, 'click', e);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
useImperativeHandle(ref, () => ({
|
|
29
|
-
el: elRef.current
|
|
30
|
-
}));
|
|
31
|
-
useRouteProps(elRef, props);
|
|
32
|
-
const isLink = link || href || href === '';
|
|
33
|
-
const Tag = isLink ? 'a' : 'div';
|
|
34
|
-
const classes = classNames({
|
|
35
|
-
'menu-dropdown-link': isLink && !divider,
|
|
36
|
-
'menu-dropdown-item': !isLink && !divider,
|
|
37
|
-
'menu-dropdown-divider': divider
|
|
38
|
-
}, className, colorClasses(props), routerClasses(props), actionsClasses(props), {
|
|
39
|
-
'menu-close': typeof menuClose === 'undefined'
|
|
40
|
-
});
|
|
41
|
-
let hrefComputed = href;
|
|
42
|
-
if (typeof hrefComputed === 'undefined' && link) hrefComputed = '#';
|
|
43
|
-
const attrs = {
|
|
44
|
-
href: hrefComputed,
|
|
45
|
-
target,
|
|
46
|
-
...routerAttrs(props),
|
|
47
|
-
...actionsAttrs(props)
|
|
48
|
-
};
|
|
49
|
-
return /*#__PURE__*/React.createElement(Tag, _extends({
|
|
50
|
-
className: classes,
|
|
51
|
-
id: id,
|
|
52
|
-
style: style,
|
|
53
|
-
ref: elRef
|
|
54
|
-
}, attrs, extraAttrs, {
|
|
55
|
-
onClick: onClick
|
|
56
|
-
}), text, children);
|
|
57
|
-
});
|
|
58
|
-
MenuDropdownItem.displayName = 'f7-menu-dropdown-item';
|
|
59
|
-
export default MenuDropdownItem;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface MenuDropdownProps {
|
|
6
|
-
slot?: string;
|
|
7
|
-
id?: string | number;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
contentHeight ?: string;
|
|
11
|
-
position ?: string;
|
|
12
|
-
left ?: boolean;
|
|
13
|
-
center ?: boolean;
|
|
14
|
-
right ?: boolean;
|
|
15
|
-
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
color?: string;
|
|
18
|
-
colorTheme?: string;
|
|
19
|
-
textColor?: string;
|
|
20
|
-
bgColor?: string;
|
|
21
|
-
borderColor?: string;
|
|
22
|
-
rippleColor?: string;
|
|
23
|
-
dark?: boolean;
|
|
24
|
-
}
|
|
25
|
-
declare const MenuDropdown: React.FunctionComponent<MenuDropdownProps>;
|
|
26
|
-
|
|
27
|
-
export default MenuDropdown;
|
|
28
|
-
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
|
-
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
-
|
|
7
|
-
const MenuDropdown = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
-
const {
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
style,
|
|
12
|
-
children,
|
|
13
|
-
contentHeight,
|
|
14
|
-
position,
|
|
15
|
-
left,
|
|
16
|
-
center,
|
|
17
|
-
right
|
|
18
|
-
} = props;
|
|
19
|
-
const extraAttrs = getExtraAttrs(props);
|
|
20
|
-
const elRef = useRef(null);
|
|
21
|
-
useImperativeHandle(ref, () => ({
|
|
22
|
-
el: elRef.current
|
|
23
|
-
}));
|
|
24
|
-
let positionComputed = position || 'left';
|
|
25
|
-
if (left) positionComputed = 'left';
|
|
26
|
-
if (center) positionComputed = 'center';
|
|
27
|
-
if (right) positionComputed = 'right';
|
|
28
|
-
const classes = classNames('menu-dropdown', `menu-dropdown-${positionComputed}`, colorClasses(props), className);
|
|
29
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
30
|
-
id: id,
|
|
31
|
-
style: style,
|
|
32
|
-
className: classes,
|
|
33
|
-
ref: elRef
|
|
34
|
-
}, extraAttrs), /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: "menu-dropdown-content",
|
|
36
|
-
style: {
|
|
37
|
-
height: contentHeight
|
|
38
|
-
}
|
|
39
|
-
}, children));
|
|
40
|
-
});
|
|
41
|
-
MenuDropdown.displayName = 'f7-menu-dropdown';
|
|
42
|
-
export default MenuDropdown;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface MenuItemProps {
|
|
6
|
-
slot?: string;
|
|
7
|
-
id?: string | number;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
text?: string;
|
|
11
|
-
iconOnly?: boolean;
|
|
12
|
-
href?: string;
|
|
13
|
-
link?: boolean;
|
|
14
|
-
target?: string;
|
|
15
|
-
dropdown?: boolean;
|
|
16
|
-
tooltip ?: string;
|
|
17
|
-
tooltipTrigger ?: string;
|
|
18
|
-
color?: string;
|
|
19
|
-
colorTheme?: string;
|
|
20
|
-
textColor?: string;
|
|
21
|
-
bgColor?: string;
|
|
22
|
-
borderColor?: string;
|
|
23
|
-
rippleColor?: string;
|
|
24
|
-
dark?: boolean;
|
|
25
|
-
icon?: string;
|
|
26
|
-
iconMaterial?: string;
|
|
27
|
-
iconF7?: string;
|
|
28
|
-
iconIos?: string;
|
|
29
|
-
iconMd?: string;
|
|
30
|
-
iconAurora?: string;
|
|
31
|
-
iconColor?: string;
|
|
32
|
-
iconSize?: string | number;
|
|
33
|
-
back?: boolean;
|
|
34
|
-
external?: boolean;
|
|
35
|
-
force?: boolean;
|
|
36
|
-
animate?: boolean;
|
|
37
|
-
ignoreCache?: boolean;
|
|
38
|
-
reloadCurrent?: boolean;
|
|
39
|
-
reloadAll?: boolean;
|
|
40
|
-
reloadPrevious?: boolean;
|
|
41
|
-
reloadDetail?: boolean;
|
|
42
|
-
routeTabId?: string;
|
|
43
|
-
view?: string;
|
|
44
|
-
routeProps?: any;
|
|
45
|
-
preventRouter?: boolean;
|
|
46
|
-
transition?: string;
|
|
47
|
-
openIn?: string;
|
|
48
|
-
searchbarEnable?: boolean | string;
|
|
49
|
-
searchbarDisable?: boolean | string;
|
|
50
|
-
searchbarClear?: boolean | string;
|
|
51
|
-
searchbarToggle?: boolean | string;
|
|
52
|
-
panelOpen?: boolean | string;
|
|
53
|
-
panelClose?: boolean | string;
|
|
54
|
-
panelToggle?: boolean | string;
|
|
55
|
-
popupOpen?: boolean | string;
|
|
56
|
-
popupClose?: boolean | string;
|
|
57
|
-
actionsOpen?: boolean | string;
|
|
58
|
-
actionsClose?: boolean | string;
|
|
59
|
-
popoverOpen?: boolean | string;
|
|
60
|
-
popoverClose?: boolean | string;
|
|
61
|
-
loginScreenOpen?: boolean | string;
|
|
62
|
-
loginScreenClose?: boolean | string;
|
|
63
|
-
sheetOpen?: boolean | string;
|
|
64
|
-
sheetClose?: boolean | string;
|
|
65
|
-
sortableEnable?: boolean | string;
|
|
66
|
-
sortableDisable?: boolean | string;
|
|
67
|
-
sortableToggle?: boolean | string;
|
|
68
|
-
cardOpen?: boolean | string;
|
|
69
|
-
cardPreventOpen?: boolean | string;
|
|
70
|
-
cardClose?: boolean | string;
|
|
71
|
-
menuClose?: boolean | string;
|
|
72
|
-
onClick ?: (event?: any) => void;
|
|
73
|
-
onMenuOpened ?: (el?: HTMLElement) => void;
|
|
74
|
-
onMenuClosed ?: (el?: HTMLElement) => void;
|
|
75
|
-
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
}
|
|
78
|
-
declare const MenuItem: React.FunctionComponent<MenuItemProps>;
|
|
79
|
-
|
|
80
|
-
export default MenuItem;
|
|
81
|
-
|