@bit.rhplus/ui.f7.detail-item 0.0.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/Custom.jsx +6 -0
- package/components/Download.jsx +51 -0
- package/components/Input.jsx +97 -0
- package/components/Switch.jsx +12 -0
- package/components/Text.jsx +10 -0
- package/components/index.jsx +6 -0
- package/dist/components/Custom.d.ts +3 -0
- package/dist/components/Custom.js +8 -0
- package/dist/components/Custom.js.map +1 -0
- package/dist/components/Download.d.ts +7 -0
- package/dist/components/Download.js +31 -0
- package/dist/components/Download.js.map +1 -0
- package/dist/components/Input.d.ts +9 -0
- package/dist/components/Input.js +29 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Switch.d.ts +5 -0
- package/dist/components/Switch.js +8 -0
- package/dist/components/Switch.js.map +1 -0
- package/dist/components/Text.d.ts +3 -0
- package/dist/components/Text.js +7 -0
- package/dist/components/Text.js.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +6 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/preview-1756983018781.js +7 -0
- package/dist/style.css +62 -0
- package/index.jsx +219 -0
- package/package.json +28 -0
- package/style.css +62 -0
- package/types/asset.d.ts +43 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Link, Icon, Preloader } from 'framework7-react';
|
|
4
|
+
|
|
5
|
+
// Download komponenta s loading stavem
|
|
6
|
+
export const Download = ({ children, href, onClick, color = '#6887d3', size = 16 }) => {
|
|
7
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
8
|
+
|
|
9
|
+
const handleClick = async (e) => {
|
|
10
|
+
if (onClick) {
|
|
11
|
+
setIsLoading(true);
|
|
12
|
+
try {
|
|
13
|
+
await onClick(e);
|
|
14
|
+
} finally {
|
|
15
|
+
setIsLoading(false);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const linkStyle = {
|
|
21
|
+
color,
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
gap: '6px'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
if (href) {
|
|
29
|
+
return (
|
|
30
|
+
<Link href={href} className="link" style={linkStyle}>
|
|
31
|
+
{isLoading ? (
|
|
32
|
+
<Preloader size={size} />
|
|
33
|
+
) : (
|
|
34
|
+
<Icon f7="arrow_down_circle" size={size} />
|
|
35
|
+
)}
|
|
36
|
+
{children}
|
|
37
|
+
</Link>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Link onClick={handleClick} className="link" style={linkStyle}>
|
|
43
|
+
{isLoading ? (
|
|
44
|
+
<Preloader size={size} />
|
|
45
|
+
) : (
|
|
46
|
+
<Icon f7="arrow_down_circle" size={size} />
|
|
47
|
+
)}
|
|
48
|
+
{children}
|
|
49
|
+
</Link>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
Link,
|
|
5
|
+
Icon,
|
|
6
|
+
Popup,
|
|
7
|
+
Navbar,
|
|
8
|
+
NavLeft,
|
|
9
|
+
NavTitle,
|
|
10
|
+
NavTitleLarge,
|
|
11
|
+
NavRight,
|
|
12
|
+
Page,
|
|
13
|
+
Block,
|
|
14
|
+
List,
|
|
15
|
+
ListInput,
|
|
16
|
+
Button
|
|
17
|
+
} from 'framework7-react';
|
|
18
|
+
// import SaveButton from '@bit.rhplus/ui.f7.save-button';
|
|
19
|
+
|
|
20
|
+
// Input komponenta s modální editací
|
|
21
|
+
export const Input = ({
|
|
22
|
+
children,
|
|
23
|
+
value,
|
|
24
|
+
onSave,
|
|
25
|
+
title = 'Editace',
|
|
26
|
+
placeholder = 'Zadejte hodnotu',
|
|
27
|
+
color = '#6887d3',
|
|
28
|
+
size = 16
|
|
29
|
+
}) => {
|
|
30
|
+
const [popupOpened, setPopupOpened] = useState(false);
|
|
31
|
+
const [inputValue, setInputValue] = useState(value || children || '');
|
|
32
|
+
|
|
33
|
+
const linkStyle = {
|
|
34
|
+
color,
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
gap: '6px'
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const handleSave = () => {
|
|
42
|
+
if (onSave) {
|
|
43
|
+
onSave(inputValue);
|
|
44
|
+
}
|
|
45
|
+
setPopupOpened(false);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleCancel = () => {
|
|
49
|
+
setInputValue(value || children || '');
|
|
50
|
+
setPopupOpened(false);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
<Link onClick={() => setPopupOpened(true)} className="link" style={linkStyle}>
|
|
56
|
+
<Icon f7="pencil" size={size} />
|
|
57
|
+
{children}
|
|
58
|
+
</Link>
|
|
59
|
+
|
|
60
|
+
<Popup
|
|
61
|
+
opened={popupOpened}
|
|
62
|
+
onPopupClosed={() => setPopupOpened(false)}
|
|
63
|
+
animate
|
|
64
|
+
backdrop
|
|
65
|
+
className="f7-parallax"
|
|
66
|
+
>
|
|
67
|
+
<Page>
|
|
68
|
+
<Navbar large>
|
|
69
|
+
<NavLeft>
|
|
70
|
+
<Link onClick={handleCancel}>
|
|
71
|
+
<Icon f7="arrow_left" style={{ fontWeight: 'bold' }} />
|
|
72
|
+
</Link>
|
|
73
|
+
</NavLeft>
|
|
74
|
+
<NavTitle>Přidat poznámku</NavTitle>
|
|
75
|
+
<NavTitleLarge>Přidat poznámku</NavTitleLarge>
|
|
76
|
+
</Navbar>
|
|
77
|
+
|
|
78
|
+
<Block style={{ marginTop: '20px' }}>
|
|
79
|
+
<List>
|
|
80
|
+
<ListInput
|
|
81
|
+
type="text"
|
|
82
|
+
label="Typ dokladu"
|
|
83
|
+
placeholder={placeholder}
|
|
84
|
+
value={inputValue}
|
|
85
|
+
onInput={(e) => setInputValue(e.target.value)}
|
|
86
|
+
clearButton
|
|
87
|
+
autoFocus
|
|
88
|
+
style={{ fontSize: '18px' }}
|
|
89
|
+
/>
|
|
90
|
+
</List>
|
|
91
|
+
</Block>
|
|
92
|
+
{/* <SaveButton onClick={handleSave} /> */}
|
|
93
|
+
</Page>
|
|
94
|
+
</Popup>
|
|
95
|
+
</>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
// Custom wrapper pro vlastní obsah
|
|
5
|
+
export const Custom = ({ children }) => {
|
|
6
|
+
return _jsx(_Fragment, { children: children });
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=Custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../components/Custom.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,mCAAmC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrC,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { Link, Icon, Preloader } from 'framework7-react';
|
|
5
|
+
// Download komponenta s loading stavem
|
|
6
|
+
export const Download = ({ children, href, onClick, color = '#6887d3', size = 16 }) => {
|
|
7
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
8
|
+
const handleClick = async (e) => {
|
|
9
|
+
if (onClick) {
|
|
10
|
+
setIsLoading(true);
|
|
11
|
+
try {
|
|
12
|
+
await onClick(e);
|
|
13
|
+
}
|
|
14
|
+
finally {
|
|
15
|
+
setIsLoading(false);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const linkStyle = {
|
|
20
|
+
color,
|
|
21
|
+
cursor: 'pointer',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
gap: '6px'
|
|
25
|
+
};
|
|
26
|
+
if (href) {
|
|
27
|
+
return (_jsxs(Link, { href: href, className: "link", style: linkStyle, children: [isLoading ? (_jsx(Preloader, { size: size })) : (_jsx(Icon, { f7: "arrow_down_circle", size: size })), children] }));
|
|
28
|
+
}
|
|
29
|
+
return (_jsxs(Link, { onClick: handleClick, className: "link", style: linkStyle, children: [isLoading ? (_jsx(Preloader, { size: size })) : (_jsx(Icon, { f7: "arrow_down_circle", size: size })), children] }));
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Download.js","sourceRoot":"","sources":["../../components/Download.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzD,uCAAuC;AACvC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE;IACpF,MAAM,CAAC,SA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der, color, size }: {
|
|
2
|
+
children: any;
|
|
3
|
+
value: any;
|
|
4
|
+
onSave: any;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
placeholder?: string | undefined;
|
|
7
|
+
color?: string | undefined;
|
|
8
|
+
size?: number | undefined;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { Link, Icon, Popup, Navbar, NavLeft, NavTitle, NavTitleLarge, NavRight, Page, Block, List, ListInput, Button } from 'framework7-react';
|
|
5
|
+
// import SaveButton from '@bit.rhplus/ui.f7.save-button';
|
|
6
|
+
// Input komponenta s modální editací
|
|
7
|
+
export const Input = ({ children, value, onSave, title = 'Editace', placeholder = 'Zadejte hodnotu', color = '#6887d3', size = 16 }) => {
|
|
8
|
+
const [popupOpened, setPopupOpened] = useState(false);
|
|
9
|
+
const [inputValue, setInputValue] = useState(value || children || '');
|
|
10
|
+
const linkStyle = {
|
|
11
|
+
color,
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
gap: '6px'
|
|
16
|
+
};
|
|
17
|
+
const handleSave = () => {
|
|
18
|
+
if (onSave) {
|
|
19
|
+
onSave(inputValue);
|
|
20
|
+
}
|
|
21
|
+
setPopupOpened(false);
|
|
22
|
+
};
|
|
23
|
+
const handleCancel = () => {
|
|
24
|
+
setInputValue(value || children || '');
|
|
25
|
+
setPopupOpened(false);
|
|
26
|
+
};
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Link, { onClick: () => setPopupOpened(true), className: "link", style: linkStyle, children: [_jsx(Icon, { f7: "pencil", size: size }), children] }), _jsx(Popup, { opened: popupOpened, onPopupClosed: () => setPopupOpened(false), animate: true, backdrop: true, className: "f7-parallax", children: _jsxs(Page, { children: [_jsxs(Navbar, { large: true, children: [_jsx(NavLeft, { children: _jsx(Link, { onClick: handleCancel, children: _jsx(Icon, { f7: "arrow_left", style: { fontWeight: 'bold' } }) }) }), _jsx(NavTitle, { children: "P\u0159idat pozn\u00E1mku" }), _jsx(NavTitleLarge, { children: "P\u0159idat pozn\u00E1mku" })] }), _jsx(Block, { style: { marginTop: '20px' }, children: _jsx(List, { children: _jsx(ListInput, { type: "text", label: "Typ dokladu", placeholder: placeholder, value: inputValue, onInput: (e) => setInputValue(e.target.value), clearButton: true, autoFocus: true, style: { fontSize: '18px' } }) }) })] }) })] }));
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../components/Input.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,SAAS,EACT,MAAM,EACP,MAAM,kBAAkB,CAAC;AAC1B,0DAA0D;AAE1D,qCAAqC;AACrC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,KAAK,GAAG,SAAS,EACjB,WAAW,GAAG,iBAAiB,EAC/B,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,EAAE,EACV,EAAE,EAAE;IACH,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,QAAQ,IAAI,EAAE,CAAC,CAAC;IAEtE,MAAM,SAAS,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AAK,EAAC,aAAa,EACnB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC7C,WAAW,QACX,SAAS,QACT,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAC3B,GACG,GACD,IAEH,GACD,IACP,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
// Switch komponenta
|
|
5
|
+
export const Switch = ({ checked, onChange, disabled }) => {
|
|
6
|
+
return (_jsx(Toggle, { checked: checked, onChange: onChange, disabled: disabled }));
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../components/Switch.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,oBAAoB;AACpB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../components/Text.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnC,OAAO,CACL,yBACG,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../components/index.jsx"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default DetailItem;
|
|
2
|
+
export { Link } from "framework7-react";
|
|
3
|
+
declare function DetailItem({ title, subtitle, footer, input, className, style }: {
|
|
4
|
+
title: any;
|
|
5
|
+
subtitle: any;
|
|
6
|
+
footer: any;
|
|
7
|
+
input: any;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
style: any;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Text, Download, Input, Switch, Custom } from "./components";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import ListItem from '@bit.rhplus/ui.f7.list-item';
|
|
5
|
+
import './style.css';
|
|
6
|
+
// Základní DetailItem komponenta
|
|
7
|
+
const DetailItem = ({ title, subtitle, footer, input, className = '', style }) => {
|
|
8
|
+
return (_jsx(ListItem, { title: title, subtitle: subtitle, footer: footer, className: `detail-item ${className}`, style: style, after: input && (_jsx("div", { className: "item-after", children: input })) }));
|
|
9
|
+
};
|
|
10
|
+
// Příklady použití
|
|
11
|
+
const DetailItemExample = () => {
|
|
12
|
+
const [notificationsEnabled, setNotificationsEnabled] = React.useState(false);
|
|
13
|
+
const [darkModeEnabled, setDarkModeEnabled] = React.useState(true);
|
|
14
|
+
const [counter, setCounter] = React.useState(5);
|
|
15
|
+
return (_jsxs("div", { className: "page-content", children: [_jsx("div", { className: "block-title", children: "Z\u00E1kladn\u00ED pou\u017Eit\u00ED" }), _jsx("div", { className: "list", children: _jsxs("ul", { children: [_jsx(DetailItem, { title: "Email", input: _jsx(Text, { children: "john.doe@email.com" }) }), _jsx(DetailItem, { title: "Status", input: _jsx(Text, { color: "#34c759", children: "Aktivn\u00ED" }) }), _jsx(DetailItem, { title: "Webov\u00E1 str\u00E1nka", input: _jsx(LinkButton, { href: "https://example.com", children: "Nav\u0161t\u00EDvit" }) }), _jsx(DetailItem, { title: "Profil", subtitle: "Zobrazit detaily profilu", input: _jsx(LinkButton, { onClick: () => alert('Otevírám profil!'), children: "Upravit" }) }), _jsx(DetailItem, { title: "Push notifikace", subtitle: "Povolit zas\u00EDl\u00E1n\u00ED ozn\u00E1men\u00ED", input: _jsx(Switch, { checked: notificationsEnabled, onChange: setNotificationsEnabled }) }), _jsx(DetailItem, { title: "Tmav\u00FD re\u017Eim", input: _jsx(Switch, { checked: darkModeEnabled, onChange: setDarkModeEnabled }) })] }) }), _jsx("div", { className: "block-title", children: "Vlastn\u00ED komponenty" }), _jsx("div", { className: "list", children: _jsxs("ul", { children: [_jsx(DetailItem, { title: "Po\u010Det polo\u017Eek", input: _jsx(Custom, { children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [_jsx("button", { className: "button button-small button-outline", onClick: () => setCounter(prev => Math.max(0, prev - 1)), children: "-" }), _jsx("span", { style: { minWidth: '30px', textAlign: 'center', fontWeight: '500' }, children: counter }), _jsx("button", { className: "button button-small button-outline", onClick: () => setCounter(prev => prev + 1), children: "+" })] }) }) }), _jsx(DetailItem, { title: "\u00DArove\u0148", input: _jsx(Custom, { children: _jsx("span", { className: "badge color-blue", children: "Premium" }) }) }), _jsx(DetailItem, { title: "Hodnocen\u00ED", input: _jsx(Custom, { children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '4px' }, children: [_jsx("span", { children: "\u2B50\u2B50\u2B50\u2B50\u2B50" }), _jsx(Text, { color: "#ff9500", children: "4.8" })] }) }) }), _jsx(DetailItem, { title: "N\u00E1zev sekce", subtitle: "Bez prav\u00E9 \u010D\u00E1sti" })] }) }), _jsx("div", { className: "block-title", children: "Pokro\u010Dil\u00E9 pou\u017Eit\u00ED" }), _jsx("div", { className: "list", children: _jsxs("ul", { children: [_jsx(DetailItem, { title: "Vlastn\u00ED input", input: _jsx("input", { type: "text", placeholder: "Zadej hodnotu", style: {
|
|
16
|
+
border: '1px solid #c7c7cc',
|
|
17
|
+
borderRadius: '4px',
|
|
18
|
+
padding: '4px 8px',
|
|
19
|
+
fontSize: '14px'
|
|
20
|
+
} }) }), _jsx(DetailItem, { title: "Select", input: _jsxs("select", { style: { border: 'none', background: 'transparent' }, children: [_jsx("option", { children: "Mo\u017Enost 1" }), _jsx("option", { children: "Mo\u017Enost 2" }), _jsx("option", { children: "Mo\u017Enost 3" })] }) }), _jsx(DetailItem, { title: "Slider", input: _jsx(Custom, { children: _jsx("input", { type: "range", min: "0", max: "100", value: "50", style: { width: '100px' } }) }) }), _jsx(DetailItem, { title: "Akce", input: _jsx(Custom, { children: _jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [_jsx("button", { className: "button button-small", children: "Ano" }), _jsx("button", { className: "button button-small button-outline", children: "Ne" })] }) }) })] }) })] }));
|
|
21
|
+
};
|
|
22
|
+
// Export všech komponent
|
|
23
|
+
export default DetailItem;
|
|
24
|
+
export { Text, Download, Input, Switch, Custom } from './components';
|
|
25
|
+
export { Link } from 'framework7-react';
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,MAAM,OAA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,MAAM,EACZ,KAAK,EACH,KAAC,MAAM,cACL,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,aACzC,iBAAQ,SAAS,EAAC,qBAAqB,oBAAa,EACpD,iBAAQ,SAAS,EAAC,oCAAoC,mBAAY,IAC9D,GACC,GAEX,IACC,GACD,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,yBAAyB;AACzB,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Framework7 Parallax animation */
|
|
2
|
+
.f7-parallax.popup {
|
|
3
|
+
--f7-popup-transition-duration: 400ms;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* F7 Parallax effect - scale and fade */
|
|
7
|
+
.f7-parallax.popup .popup-inner {
|
|
8
|
+
transition: all var(--f7-popup-transition-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.f7-parallax.popup:not(.popup-in) .popup-inner {
|
|
12
|
+
transform: scale(0.85);
|
|
13
|
+
opacity: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.f7-parallax.popup.popup-in .popup-inner {
|
|
17
|
+
transform: scale(1);
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Enhanced input styling for fullscreen */
|
|
22
|
+
.f7-parallax .list-input input {
|
|
23
|
+
font-size: 18px !important;
|
|
24
|
+
padding: 12px 16px !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.f7-parallax .button-large {
|
|
28
|
+
border-radius: 12px;
|
|
29
|
+
box-shadow: 0 4px 12px rgba(104, 135, 211, 0.3);
|
|
30
|
+
transition: all 0.2s ease;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.f7-parallax .button-large:active {
|
|
34
|
+
transform: translateY(1px);
|
|
35
|
+
box-shadow: 0 2px 8px rgba(104, 135, 211, 0.4);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Smooth navbar animations */
|
|
39
|
+
.f7-parallax .navbar {
|
|
40
|
+
backdrop-filter: blur(10px);
|
|
41
|
+
background: rgba(255, 255, 255, 0.95);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.f7-parallax .navbar-inner {
|
|
45
|
+
animation: slideDownFadeIn 0.4s ease-out;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes slideDownFadeIn {
|
|
49
|
+
0% {
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transform: translateY(-20px);
|
|
52
|
+
}
|
|
53
|
+
100% {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
transform: translateY(0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Content animation */
|
|
60
|
+
.f7-parallax .page-content {
|
|
61
|
+
animation: slideUpFadeIn 0.5s ease-out 0.1s both;
|
|
62
|
+
}
|
package/index.jsx
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ListItem from '@bit.rhplus/ui.f7.list-item';
|
|
4
|
+
import './style.css';
|
|
5
|
+
|
|
6
|
+
// Základní DetailItem komponenta
|
|
7
|
+
const DetailItem = ({
|
|
8
|
+
title,
|
|
9
|
+
subtitle,
|
|
10
|
+
footer,
|
|
11
|
+
input,
|
|
12
|
+
className = '',
|
|
13
|
+
style
|
|
14
|
+
}) => {
|
|
15
|
+
return (
|
|
16
|
+
<ListItem
|
|
17
|
+
title={title}
|
|
18
|
+
subtitle={subtitle}
|
|
19
|
+
footer={footer}
|
|
20
|
+
className={`detail-item ${className}`}
|
|
21
|
+
style={style}
|
|
22
|
+
after={input && (
|
|
23
|
+
<div className="item-after">
|
|
24
|
+
{input}
|
|
25
|
+
</div>
|
|
26
|
+
)}></ListItem>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// Příklady použití
|
|
32
|
+
const DetailItemExample = () => {
|
|
33
|
+
const [notificationsEnabled, setNotificationsEnabled] = React.useState(false);
|
|
34
|
+
const [darkModeEnabled, setDarkModeEnabled] = React.useState(true);
|
|
35
|
+
const [counter, setCounter] = React.useState(5);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className="page-content">
|
|
39
|
+
<div className="block-title">Základní použití</div>
|
|
40
|
+
<div className="list">
|
|
41
|
+
<ul>
|
|
42
|
+
{/* Prostý text */}
|
|
43
|
+
<DetailItem
|
|
44
|
+
title="Email"
|
|
45
|
+
input={<Text>john.doe@email.com</Text>}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
{/* Barevný text */}
|
|
49
|
+
<DetailItem
|
|
50
|
+
title="Status"
|
|
51
|
+
input={<Text color="#34c759">Aktivní</Text>}
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
{/* Link s href */}
|
|
55
|
+
<DetailItem
|
|
56
|
+
title="Webová stránka"
|
|
57
|
+
input={<LinkButton href="https://example.com">Navštívit</LinkButton>}
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
{/* Link s onClick */}
|
|
61
|
+
<DetailItem
|
|
62
|
+
title="Profil"
|
|
63
|
+
subtitle="Zobrazit detaily profilu"
|
|
64
|
+
input={<LinkButton onClick={() => alert('Otevírám profil!')}>Upravit</LinkButton>}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
{/* Switch */}
|
|
68
|
+
<DetailItem
|
|
69
|
+
title="Push notifikace"
|
|
70
|
+
subtitle="Povolit zasílání oznámení"
|
|
71
|
+
input={
|
|
72
|
+
<Switch
|
|
73
|
+
checked={notificationsEnabled}
|
|
74
|
+
onChange={setNotificationsEnabled}
|
|
75
|
+
/>
|
|
76
|
+
}
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
<DetailItem
|
|
80
|
+
title="Tmavý režim"
|
|
81
|
+
input={
|
|
82
|
+
<Switch
|
|
83
|
+
checked={darkModeEnabled}
|
|
84
|
+
onChange={setDarkModeEnabled}
|
|
85
|
+
/>
|
|
86
|
+
}
|
|
87
|
+
/>
|
|
88
|
+
</ul>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div className="block-title">Vlastní komponenty</div>
|
|
92
|
+
<div className="list">
|
|
93
|
+
<ul>
|
|
94
|
+
{/* Custom - tlačítka pro počítadlo */}
|
|
95
|
+
<DetailItem
|
|
96
|
+
title="Počet položek"
|
|
97
|
+
input={
|
|
98
|
+
<Custom>
|
|
99
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
100
|
+
<button
|
|
101
|
+
className="button button-small button-outline"
|
|
102
|
+
onClick={() => setCounter(prev => Math.max(0, prev - 1))}
|
|
103
|
+
>
|
|
104
|
+
-
|
|
105
|
+
</button>
|
|
106
|
+
<span style={{ minWidth: '30px', textAlign: 'center', fontWeight: '500' }}>
|
|
107
|
+
{counter}
|
|
108
|
+
</span>
|
|
109
|
+
<button
|
|
110
|
+
className="button button-small button-outline"
|
|
111
|
+
onClick={() => setCounter(prev => prev + 1)}
|
|
112
|
+
>
|
|
113
|
+
+
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
</Custom>
|
|
117
|
+
}
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
{/* Custom - badge */}
|
|
121
|
+
<DetailItem
|
|
122
|
+
title="Úroveň"
|
|
123
|
+
input={
|
|
124
|
+
<Custom>
|
|
125
|
+
<span className="badge color-blue">Premium</span>
|
|
126
|
+
</Custom>
|
|
127
|
+
}
|
|
128
|
+
/>
|
|
129
|
+
|
|
130
|
+
{/* Custom - kombinace více prvků */}
|
|
131
|
+
<DetailItem
|
|
132
|
+
title="Hodnocení"
|
|
133
|
+
input={
|
|
134
|
+
<Custom>
|
|
135
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
|
|
136
|
+
<span>⭐⭐⭐⭐⭐</span>
|
|
137
|
+
<Text color="#ff9500">4.8</Text>
|
|
138
|
+
</div>
|
|
139
|
+
</Custom>
|
|
140
|
+
}
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
{/* Bez input - jen název */}
|
|
144
|
+
<DetailItem
|
|
145
|
+
title="Název sekce"
|
|
146
|
+
subtitle="Bez pravé části"
|
|
147
|
+
/>
|
|
148
|
+
</ul>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div className="block-title">Pokročilé použití</div>
|
|
152
|
+
<div className="list">
|
|
153
|
+
<ul>
|
|
154
|
+
{/* Můžeš kombinovat jakékoliv React komponenty */}
|
|
155
|
+
<DetailItem
|
|
156
|
+
title="Vlastní input"
|
|
157
|
+
input={
|
|
158
|
+
<input
|
|
159
|
+
type="text"
|
|
160
|
+
placeholder="Zadej hodnotu"
|
|
161
|
+
style={{
|
|
162
|
+
border: '1px solid #c7c7cc',
|
|
163
|
+
borderRadius: '4px',
|
|
164
|
+
padding: '4px 8px',
|
|
165
|
+
fontSize: '14px'
|
|
166
|
+
}}
|
|
167
|
+
/>
|
|
168
|
+
}
|
|
169
|
+
/>
|
|
170
|
+
|
|
171
|
+
<DetailItem
|
|
172
|
+
title="Select"
|
|
173
|
+
input={
|
|
174
|
+
<select style={{ border: 'none', background: 'transparent' }}>
|
|
175
|
+
<option>Možnost 1</option>
|
|
176
|
+
<option>Možnost 2</option>
|
|
177
|
+
<option>Možnost 3</option>
|
|
178
|
+
</select>
|
|
179
|
+
}
|
|
180
|
+
/>
|
|
181
|
+
|
|
182
|
+
{/* Příklad s custom React komponentou */}
|
|
183
|
+
<DetailItem
|
|
184
|
+
title="Slider"
|
|
185
|
+
input={
|
|
186
|
+
<Custom>
|
|
187
|
+
<input
|
|
188
|
+
type="range"
|
|
189
|
+
min="0"
|
|
190
|
+
max="100"
|
|
191
|
+
value="50"
|
|
192
|
+
style={{ width: '100px' }}
|
|
193
|
+
/>
|
|
194
|
+
</Custom>
|
|
195
|
+
}
|
|
196
|
+
/>
|
|
197
|
+
|
|
198
|
+
{/* Multiple komponenty najednou */}
|
|
199
|
+
<DetailItem
|
|
200
|
+
title="Akce"
|
|
201
|
+
input={
|
|
202
|
+
<Custom>
|
|
203
|
+
<div style={{ display: 'flex', gap: '8px' }}>
|
|
204
|
+
<button className="button button-small">Ano</button>
|
|
205
|
+
<button className="button button-small button-outline">Ne</button>
|
|
206
|
+
</div>
|
|
207
|
+
</Custom>
|
|
208
|
+
}
|
|
209
|
+
/>
|
|
210
|
+
</ul>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// Export všech komponent
|
|
217
|
+
export default DetailItem;
|
|
218
|
+
export { Text, Download, Input, Switch, Custom } from './components';
|
|
219
|
+
export {Link} from 'framework7-react';
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bit.rhplus/ui.f7.detail-item",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"componentId": {
|
|
6
|
+
"name": "ui/f7/detail-item",
|
|
7
|
+
"version": "0.0.1",
|
|
8
|
+
"scope": "remote-scope"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@bit.rhplus/ui.f7.list-item": "0.0.7"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@teambit/react.react-env": "1.0.132"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"framework7-react": "^8.3.3",
|
|
18
|
+
"react": "^17.0.0 || ^18.0.0"
|
|
19
|
+
},
|
|
20
|
+
"license": "SEE LICENSE IN UNLICENSED",
|
|
21
|
+
"optionalDependencies": {},
|
|
22
|
+
"peerDependenciesMeta": {},
|
|
23
|
+
"private": false,
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"scope": "@bit.rhplus",
|
|
26
|
+
"registry": "https://registry.npmjs.org/"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/style.css
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Framework7 Parallax animation */
|
|
2
|
+
.f7-parallax.popup {
|
|
3
|
+
--f7-popup-transition-duration: 400ms;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* F7 Parallax effect - scale and fade */
|
|
7
|
+
.f7-parallax.popup .popup-inner {
|
|
8
|
+
transition: all var(--f7-popup-transition-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.f7-parallax.popup:not(.popup-in) .popup-inner {
|
|
12
|
+
transform: scale(0.85);
|
|
13
|
+
opacity: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.f7-parallax.popup.popup-in .popup-inner {
|
|
17
|
+
transform: scale(1);
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Enhanced input styling for fullscreen */
|
|
22
|
+
.f7-parallax .list-input input {
|
|
23
|
+
font-size: 18px !important;
|
|
24
|
+
padding: 12px 16px !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.f7-parallax .button-large {
|
|
28
|
+
border-radius: 12px;
|
|
29
|
+
box-shadow: 0 4px 12px rgba(104, 135, 211, 0.3);
|
|
30
|
+
transition: all 0.2s ease;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.f7-parallax .button-large:active {
|
|
34
|
+
transform: translateY(1px);
|
|
35
|
+
box-shadow: 0 2px 8px rgba(104, 135, 211, 0.4);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Smooth navbar animations */
|
|
39
|
+
.f7-parallax .navbar {
|
|
40
|
+
backdrop-filter: blur(10px);
|
|
41
|
+
background: rgba(255, 255, 255, 0.95);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.f7-parallax .navbar-inner {
|
|
45
|
+
animation: slideDownFadeIn 0.4s ease-out;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes slideDownFadeIn {
|
|
49
|
+
0% {
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transform: translateY(-20px);
|
|
52
|
+
}
|
|
53
|
+
100% {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
transform: translateY(0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Content animation */
|
|
60
|
+
.f7-parallax .page-content {
|
|
61
|
+
animation: slideUpFadeIn 0.5s ease-out 0.1s both;
|
|
62
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
11
|
+
const src: string;
|
|
12
|
+
export default src;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// @TODO Gilad
|
|
16
|
+
declare module '*.jpg' {
|
|
17
|
+
const value: any;
|
|
18
|
+
export = value;
|
|
19
|
+
}
|
|
20
|
+
declare module '*.jpeg' {
|
|
21
|
+
const value: any;
|
|
22
|
+
export = value;
|
|
23
|
+
}
|
|
24
|
+
declare module '*.gif' {
|
|
25
|
+
const value: any;
|
|
26
|
+
export = value;
|
|
27
|
+
}
|
|
28
|
+
declare module '*.bmp' {
|
|
29
|
+
const value: any;
|
|
30
|
+
export = value;
|
|
31
|
+
}
|
|
32
|
+
declare module '*.otf' {
|
|
33
|
+
const value: any;
|
|
34
|
+
export = value;
|
|
35
|
+
}
|
|
36
|
+
declare module '*.woff' {
|
|
37
|
+
const value: any;
|
|
38
|
+
export = value;
|
|
39
|
+
}
|
|
40
|
+
declare module '*.woff2' {
|
|
41
|
+
const value: any;
|
|
42
|
+
export = value;
|
|
43
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|