@etsoo/materialui 1.5.26 → 1.5.28
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/lib/cjs/TabBox.d.ts +2 -2
- package/lib/cjs/pages/CommonPage.d.ts +4 -0
- package/lib/cjs/pages/CommonPage.js +2 -2
- package/lib/mjs/TabBox.d.ts +2 -2
- package/lib/mjs/pages/CommonPage.d.ts +4 -0
- package/lib/mjs/pages/CommonPage.js +2 -2
- package/package.json +1 -1
- package/src/TabBox.tsx +2 -2
- package/src/pages/CommonPage.tsx +7 -1
package/lib/cjs/TabBox.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface TabBoxPanel extends Omit<TabProps, "value" | "children"> {
|
|
|
20
20
|
/**
|
|
21
21
|
* Tabs with box props
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface TabBoxProps extends Omit<TabsProps, "value"> {
|
|
24
24
|
/**
|
|
25
25
|
* Default selected index
|
|
26
26
|
*/
|
|
@@ -51,5 +51,5 @@ export interface TabBoxPros extends Omit<TabsProps, "value"> {
|
|
|
51
51
|
* @param props Props
|
|
52
52
|
* @returns Component
|
|
53
53
|
*/
|
|
54
|
-
export declare function TabBox(props:
|
|
54
|
+
export declare function TabBox(props: TabBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
export {};
|
|
@@ -25,7 +25,7 @@ function CommonPage(props) {
|
|
|
25
25
|
// Global app
|
|
26
26
|
const app = (0, ReactApp_1.useAppContext)();
|
|
27
27
|
// Destruct
|
|
28
|
-
const { children, disableGutters = true, fabTop, fabButtons, fabColumnDirection, fabPanel, fabPaddingAdjust = 1.5, fabSize = "small", maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal_1.MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, sx = {}, ...rest } = props;
|
|
28
|
+
const { children, disableGutters = true, fabTop, fabButtons, fabColumnDirection, fabPanel, fabPaddingAdjust = 1.5, fabSize = "small", maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal_1.MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, fabRefresh = onRefresh != null, sx = {}, ...rest } = props;
|
|
29
29
|
// Fab padding
|
|
30
30
|
const fabPadding = MUGlobal_1.MUGlobal.increase(MUGlobal_1.MUGlobal.pagePaddings, fabPaddingAdjust);
|
|
31
31
|
if (typeof sx === "object" && sx != null && !Reflect.has(sx, "padding")) {
|
|
@@ -74,5 +74,5 @@ function CommonPage(props) {
|
|
|
74
74
|
bottom: distance,
|
|
75
75
|
right: distance
|
|
76
76
|
})
|
|
77
|
-
}, columnDirection: fabColumnDirection, fabPanel: fabPanel, children: [scrollContainer && ((0, jsx_runtime_1.jsx)(ScrollTopFab_1.ScrollTopFab, { size: fabSize, target: scrollContainer, title: labels.scrollTop })), fabButtons,
|
|
77
|
+
}, columnDirection: fabColumnDirection, fabPanel: fabPanel, children: [scrollContainer && ((0, jsx_runtime_1.jsx)(ScrollTopFab_1.ScrollTopFab, { size: fabSize, target: scrollContainer, title: labels.scrollTop })), fabButtons, fabRefresh && ((0, jsx_runtime_1.jsx)(Fab_1.default, { title: labels.refresh, size: fabSize, onClick: onRefresh, sx: { display: { xs: "none", md: "inherit" } }, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) })), (0, jsx_runtime_1.jsx)(MoreFab_1.MoreFab, { size: fabSize, title: labels.more, actions: moreActions }), supportBack && (0, jsx_runtime_1.jsx)(BackButton_1.BackButton, { title: labels.back, size: fabSize })] }), children] })] }));
|
|
78
78
|
}
|
package/lib/mjs/TabBox.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface TabBoxPanel extends Omit<TabProps, "value" | "children"> {
|
|
|
20
20
|
/**
|
|
21
21
|
* Tabs with box props
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface TabBoxProps extends Omit<TabsProps, "value"> {
|
|
24
24
|
/**
|
|
25
25
|
* Default selected index
|
|
26
26
|
*/
|
|
@@ -51,5 +51,5 @@ export interface TabBoxPros extends Omit<TabsProps, "value"> {
|
|
|
51
51
|
* @param props Props
|
|
52
52
|
* @returns Component
|
|
53
53
|
*/
|
|
54
|
-
export declare function TabBox(props:
|
|
54
|
+
export declare function TabBox(props: TabBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
export {};
|
|
@@ -19,7 +19,7 @@ export function CommonPage(props) {
|
|
|
19
19
|
// Global app
|
|
20
20
|
const app = useAppContext();
|
|
21
21
|
// Destruct
|
|
22
|
-
const { children, disableGutters = true, fabTop, fabButtons, fabColumnDirection, fabPanel, fabPaddingAdjust = 1.5, fabSize = "small", maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, sx = {}, ...rest } = props;
|
|
22
|
+
const { children, disableGutters = true, fabTop, fabButtons, fabColumnDirection, fabPanel, fabPaddingAdjust = 1.5, fabSize = "small", maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, fabRefresh = onRefresh != null, sx = {}, ...rest } = props;
|
|
23
23
|
// Fab padding
|
|
24
24
|
const fabPadding = MUGlobal.increase(MUGlobal.pagePaddings, fabPaddingAdjust);
|
|
25
25
|
if (typeof sx === "object" && sx != null && !Reflect.has(sx, "padding")) {
|
|
@@ -68,5 +68,5 @@ export function CommonPage(props) {
|
|
|
68
68
|
bottom: distance,
|
|
69
69
|
right: distance
|
|
70
70
|
})
|
|
71
|
-
}, columnDirection: fabColumnDirection, fabPanel: fabPanel, children: [scrollContainer && (_jsx(ScrollTopFab, { size: fabSize, target: scrollContainer, title: labels.scrollTop })), fabButtons,
|
|
71
|
+
}, columnDirection: fabColumnDirection, fabPanel: fabPanel, children: [scrollContainer && (_jsx(ScrollTopFab, { size: fabSize, target: scrollContainer, title: labels.scrollTop })), fabButtons, fabRefresh && (_jsx(Fab, { title: labels.refresh, size: fabSize, onClick: onRefresh, sx: { display: { xs: "none", md: "inherit" } }, children: _jsx(RefreshIcon, {}) })), _jsx(MoreFab, { size: fabSize, title: labels.more, actions: moreActions }), supportBack && _jsx(BackButton, { title: labels.back, size: fabSize })] }), children] })] }));
|
|
72
72
|
}
|
package/package.json
CHANGED
package/src/TabBox.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export interface TabBoxPanel extends Omit<TabProps, "value" | "children"> {
|
|
|
35
35
|
/**
|
|
36
36
|
* Tabs with box props
|
|
37
37
|
*/
|
|
38
|
-
export interface
|
|
38
|
+
export interface TabBoxProps extends Omit<TabsProps, "value"> {
|
|
39
39
|
/**
|
|
40
40
|
* Default selected index
|
|
41
41
|
*/
|
|
@@ -72,7 +72,7 @@ export interface TabBoxPros extends Omit<TabsProps, "value"> {
|
|
|
72
72
|
* @param props Props
|
|
73
73
|
* @returns Component
|
|
74
74
|
*/
|
|
75
|
-
export function TabBox(props:
|
|
75
|
+
export function TabBox(props: TabBoxProps) {
|
|
76
76
|
// Destruct
|
|
77
77
|
const {
|
|
78
78
|
index,
|
package/src/pages/CommonPage.tsx
CHANGED
|
@@ -44,6 +44,11 @@ export interface CommonPageProps extends Omit<ContainerProps, "id"> {
|
|
|
44
44
|
*/
|
|
45
45
|
fabPanel?: boolean;
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Fab refresh button is supported or not
|
|
49
|
+
*/
|
|
50
|
+
fabRefresh?: boolean;
|
|
51
|
+
|
|
47
52
|
/**
|
|
48
53
|
* Fab lays in the top
|
|
49
54
|
*/
|
|
@@ -117,6 +122,7 @@ export function CommonPage(props: CommonPageProps) {
|
|
|
117
122
|
scrollContainer,
|
|
118
123
|
supportBack = false,
|
|
119
124
|
targetFields,
|
|
125
|
+
fabRefresh = onRefresh != null,
|
|
120
126
|
sx = {},
|
|
121
127
|
...rest
|
|
122
128
|
} = props;
|
|
@@ -208,7 +214,7 @@ export function CommonPage(props: CommonPageProps) {
|
|
|
208
214
|
/>
|
|
209
215
|
)}
|
|
210
216
|
{fabButtons}
|
|
211
|
-
{
|
|
217
|
+
{fabRefresh && (
|
|
212
218
|
<Fab
|
|
213
219
|
title={labels.refresh}
|
|
214
220
|
size={fabSize}
|