lupine.components 1.1.13 → 1.1.14
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/README.md +3 -3
- package/package.json +42 -42
- package/src/components/action-sheet.tsx +419 -419
- package/src/components/button-push-animation.tsx +147 -138
- package/src/components/button.tsx +55 -55
- package/src/components/desktop-footer.tsx +17 -17
- package/src/components/desktop-header.tsx +52 -52
- package/src/components/drag-refresh.tsx +129 -129
- package/src/components/editable-label.tsx +83 -83
- package/src/components/float-window.tsx +233 -233
- package/src/components/grid.tsx +18 -18
- package/src/components/html-load.tsx +41 -41
- package/src/components/html-var.tsx +81 -81
- package/src/components/index.ts +43 -44
- package/src/components/input-with-title.tsx +24 -24
- package/src/components/link-item.tsx +13 -13
- package/src/components/link-list.tsx +62 -62
- package/src/components/menu-bar.tsx +219 -219
- package/src/components/menu-item-props.tsx +13 -13
- package/src/components/menu-sidebar.tsx +325 -318
- package/src/components/message-box.tsx +44 -44
- package/src/components/meta-data.tsx +36 -36
- package/src/components/meta-description.tsx +12 -12
- package/src/components/mobile-components/icon-menu-item-props.ts +6 -6
- package/src/components/mobile-components/index.ts +8 -9
- package/src/components/mobile-components/mobile-footer-menu.tsx +95 -95
- package/src/components/mobile-components/mobile-header-component.tsx +101 -101
- package/src/components/mobile-components/mobile-header-title-icon.tsx +109 -101
- package/src/components/mobile-components/mobile-header-with-back.tsx +127 -117
- package/src/components/mobile-components/mobile-side-menu.tsx +154 -154
- package/src/components/mobile-components/mobile-top-sys-icon.tsx +18 -18
- package/src/components/mobile-components/mobile-top-sys-menu.tsx +62 -62
- package/src/components/modal.tsx +33 -33
- package/src/components/notice-message.tsx +118 -118
- package/src/components/page-title.tsx +6 -6
- package/src/components/paging-link.tsx +175 -175
- package/src/components/panel.tsx +21 -21
- package/src/components/popup-menu.tsx +289 -289
- package/src/components/progress.tsx +91 -91
- package/src/components/radio-label-component.tsx +36 -36
- package/src/components/redirect.tsx +19 -19
- package/src/components/resizable-splitter.tsx +128 -128
- package/src/components/select-angle-component.tsx +127 -127
- package/src/components/select-with-title.tsx +37 -37
- package/src/components/slide-tab-component.tsx +144 -149
- package/src/components/spinner.tsx +106 -100
- package/src/components/stars-component.tsx +66 -66
- package/src/components/svg.tsx +24 -24
- package/src/components/tabs.tsx +279 -279
- package/src/components/text-glow.tsx +37 -37
- package/src/components/text-scale.tsx +42 -42
- package/src/components/text-wave.tsx +55 -55
- package/src/components/theme-selector.tsx +28 -28
- package/src/components/toggle-base.tsx +269 -269
- package/src/components/toggle-switch.tsx +160 -160
- package/src/frames/index.ts +3 -3
- package/src/frames/responsive-frame.tsx +83 -83
- package/src/frames/slider-frame.tsx +111 -111
- package/src/frames/top-frame.tsx +30 -30
- package/src/index.ts +5 -5
- package/src/lib/back-action-helper.ts +54 -54
- package/src/lib/base62.ts +23 -23
- package/src/lib/blob-utils.ts +23 -23
- package/src/lib/calculate-text-width.ts +13 -13
- package/src/lib/date-utils.ts +317 -317
- package/src/lib/deep-merge.ts +37 -37
- package/src/lib/document-ready.ts +34 -34
- package/src/lib/dom-utils.ts +32 -32
- package/src/lib/download-file.ts +118 -118
- package/src/lib/download-link.ts +12 -12
- package/src/lib/download-stream.ts +19 -19
- package/src/lib/drag-util.ts +118 -118
- package/src/lib/dynamical-load.ts +134 -134
- package/src/lib/encode-html.ts +27 -27
- package/src/lib/find-parent-tag.ts +8 -8
- package/src/lib/format-bytes.ts +11 -11
- package/src/lib/index.ts +24 -24
- package/src/lib/lite-dom.ts +225 -225
- package/src/lib/message-hub.ts +103 -104
- package/src/lib/observable.ts +188 -188
- package/src/lib/path-utils.ts +42 -42
- package/src/lib/promise-timeout.ts +1 -1
- package/src/lib/simple-storage.ts +40 -40
- package/src/lib/stop-propagation.ts +7 -7
- package/src/lib/upload-file.ts +101 -101
- package/src/styles/base-themes.ts +17 -17
- package/src/styles/dark-themes.ts +99 -99
- package/src/styles/index.ts +5 -5
- package/src/styles/light-themes.ts +106 -106
- package/src/styles/media-query.ts +93 -93
- package/src/styles/shared-themes.ts +57 -57
- package/tsconfig.json +113 -113
|
@@ -1,101 +1,109 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MobileHeaderTitleIcon can be used in MobileHeaderComponent's Center part.
|
|
3
|
-
It has it's own Left and Right icons.
|
|
4
|
-
*/
|
|
5
|
-
import { VNode, CssProps, HtmlVar, backActionHelper } from 'lupine.components';
|
|
6
|
-
|
|
7
|
-
export const MobileHeadeIconHeight = '40px';
|
|
8
|
-
export const MobileHeadeBackIcon = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
9
|
-
return (
|
|
10
|
-
<i
|
|
11
|
-
class={'ifc-icon mg-arrow_back_ios_new_outlined mhti-back-icon'}
|
|
12
|
-
data-back-action={backActionHelper.genBackActionId()}
|
|
13
|
-
onClick={(event) => onClick(event)}
|
|
14
|
-
></i>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const MobileHeadeCloseIcon = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
19
|
-
return <i class='ifc-icon ma-close mhti-close-icon' onClick={(event) => onClick(event)}></i>;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const MobileHeaderEmptyIcon = () => {
|
|
23
|
-
return <div class='mhti-empty-icon' style={{ width: '28px' }}></div>;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export interface MobileHeaderTitleIconProps {
|
|
27
|
-
title: VNode<any> | string | HtmlVar;
|
|
28
|
-
onBack?: (event: Event) => void;
|
|
29
|
-
left?: VNode<any> | HtmlVar;
|
|
30
|
-
right?: VNode<any> | HtmlVar;
|
|
31
|
-
background?: string;
|
|
32
|
-
color?: string;
|
|
33
|
-
noShadow?: boolean;
|
|
34
|
-
}
|
|
35
|
-
// there may have a few MobileHeaderTitleIcon for different pages
|
|
36
|
-
export const MobileHeaderTitleIcon = ({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
'
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
'.mhti-left': {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
);
|
|
101
|
-
|
|
1
|
+
/*
|
|
2
|
+
MobileHeaderTitleIcon can be used in MobileHeaderComponent's Center part.
|
|
3
|
+
It has it's own Left and Right icons.
|
|
4
|
+
*/
|
|
5
|
+
import { VNode, CssProps, HtmlVar, backActionHelper } from 'lupine.components';
|
|
6
|
+
|
|
7
|
+
export const MobileHeadeIconHeight = '40px';
|
|
8
|
+
export const MobileHeadeBackIcon = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
9
|
+
return (
|
|
10
|
+
<i
|
|
11
|
+
class={'ifc-icon mg-arrow_back_ios_new_outlined mhti-back-icon'}
|
|
12
|
+
data-back-action={backActionHelper.genBackActionId()}
|
|
13
|
+
onClick={(event) => onClick(event)}
|
|
14
|
+
></i>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const MobileHeadeCloseIcon = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
19
|
+
return <i class='ifc-icon ma-close mhti-close-icon' onClick={(event) => onClick(event)}></i>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const MobileHeaderEmptyIcon = () => {
|
|
23
|
+
return <div class='mhti-empty-icon' style={{ width: '28px' }}></div>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export interface MobileHeaderTitleIconProps {
|
|
27
|
+
title: VNode<any> | string | HtmlVar;
|
|
28
|
+
onBack?: (event: Event) => void;
|
|
29
|
+
left?: VNode<any> | HtmlVar;
|
|
30
|
+
right?: VNode<any> | HtmlVar;
|
|
31
|
+
background?: string;
|
|
32
|
+
color?: string;
|
|
33
|
+
noShadow?: boolean;
|
|
34
|
+
}
|
|
35
|
+
// there may have a few MobileHeaderTitleIcon for different pages
|
|
36
|
+
export const MobileHeaderTitleIcon = ({
|
|
37
|
+
title,
|
|
38
|
+
onBack,
|
|
39
|
+
left,
|
|
40
|
+
right,
|
|
41
|
+
background,
|
|
42
|
+
color,
|
|
43
|
+
noShadow,
|
|
44
|
+
}: MobileHeaderTitleIconProps) => {
|
|
45
|
+
// const processBack = (event: Event) => {
|
|
46
|
+
// if (onBack) {
|
|
47
|
+
// onBack(event);
|
|
48
|
+
// }
|
|
49
|
+
// };
|
|
50
|
+
// left = left || <MobileHeadeBackIcon onClick={processBack} />;
|
|
51
|
+
// right = right || <MobileHeadeCloseIcon onClick={processBack} />;
|
|
52
|
+
const css: CssProps = {
|
|
53
|
+
display: 'flex',
|
|
54
|
+
flexDirection: 'row',
|
|
55
|
+
width: '100vw',
|
|
56
|
+
padding: '6px 0',
|
|
57
|
+
// backgroundColor: 'var(--activatable-bg-color-normal)',
|
|
58
|
+
// boxShadow: 'var(--mobile-header-shadow)',
|
|
59
|
+
color: color || 'var(--primary-color)',
|
|
60
|
+
background: background || 'var(--activatable-bg-color-normal)',
|
|
61
|
+
boxShadow: noShadow ? 'unset' : 'var(--mobile-header-shadow)',
|
|
62
|
+
zIndex: 'var(--layer-inside)', // bring boxShadow to front
|
|
63
|
+
'.mhti-title': {
|
|
64
|
+
display: 'flex',
|
|
65
|
+
fontSize: '1.3rem',
|
|
66
|
+
flex: '1',
|
|
67
|
+
color: 'var(--activatable-text-color-normal)',
|
|
68
|
+
overflow: 'hidden',
|
|
69
|
+
textOverflow: 'ellipsis',
|
|
70
|
+
whiteSpace: 'nowrap',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
justifyContent: 'center',
|
|
73
|
+
},
|
|
74
|
+
'.mhti-title > *': {
|
|
75
|
+
display: 'flex',
|
|
76
|
+
width: '100%',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
justifyContent: 'center',
|
|
79
|
+
},
|
|
80
|
+
'.mhti-left, .mhti-right': {
|
|
81
|
+
height: MobileHeadeIconHeight,
|
|
82
|
+
display: 'flex',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
cursor: 'pointer',
|
|
86
|
+
fontSize: '16px',
|
|
87
|
+
},
|
|
88
|
+
'.mhti-left': {
|
|
89
|
+
paddingLeft: '8px',
|
|
90
|
+
},
|
|
91
|
+
'.mhti-right': {
|
|
92
|
+
paddingRight: '8px',
|
|
93
|
+
},
|
|
94
|
+
'.mhti-left i, .mhti-right i': {
|
|
95
|
+
fontSize: '28px',
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const domLeft = left instanceof HtmlVar ? left : new HtmlVar(left);
|
|
100
|
+
const domCenter = title instanceof HtmlVar ? title : new HtmlVar(title);
|
|
101
|
+
const domRight = right instanceof HtmlVar ? right : new HtmlVar(right);
|
|
102
|
+
return (
|
|
103
|
+
<div css={css} class='mobile-header-title-icon-top'>
|
|
104
|
+
<div class='mhti-left'>{domLeft.node}</div>
|
|
105
|
+
<div class='mhti-title'>{domCenter.node}</div>
|
|
106
|
+
<div class='mhti-right'>{domRight.node}</div>
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
@@ -1,117 +1,127 @@
|
|
|
1
|
-
/*
|
|
2
|
-
HeaderWithBackFrame is a full page frame with header for mobile sliders.
|
|
3
|
-
It has Back icon at Left and Close icon at Right.
|
|
4
|
-
*/
|
|
5
|
-
import { VNode, CssProps, RefProps, HtmlVar, backActionHelper } from 'lupine.components';
|
|
6
|
-
import { MobileHeaderTitleIcon } from './mobile-header-title-icon';
|
|
7
|
-
|
|
8
|
-
export const HeaderWithBackFrameHeight = '40px';
|
|
9
|
-
export const HeaderWithBackFrameLeft = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
10
|
-
return (
|
|
11
|
-
<i
|
|
12
|
-
class='ifc-icon mg-arrow_back_ios_new_outlined header-back-left-icon'
|
|
13
|
-
data-back-action={backActionHelper.genBackActionId()}
|
|
14
|
-
onClick={(event) => onClick(event)}
|
|
15
|
-
></i>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const HeaderWithBackFrameRight = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
20
|
-
return <i class='ifc-icon ma-close header-back-right-icon' onClick={(event) => onClick(event)}></i>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const HeaderWithBackFrameEmpty = () => {
|
|
24
|
-
return <div class='header-back-top-empty'></div>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// there may have a few HeaderWithBackFrame one over another at the same time
|
|
28
|
-
export const HeaderWithBackFrame = ({
|
|
29
|
-
children,
|
|
30
|
-
title,
|
|
31
|
-
onBack,
|
|
32
|
-
left,
|
|
33
|
-
right,
|
|
34
|
-
noHeader = false,
|
|
35
|
-
background,
|
|
36
|
-
color,
|
|
37
|
-
noShadow,
|
|
38
|
-
contentColor,
|
|
39
|
-
contentBackground,
|
|
40
|
-
}: {
|
|
41
|
-
children: VNode<any>;
|
|
42
|
-
title: VNode<any> | string | HtmlVar;
|
|
43
|
-
onBack: (event: Event) => void;
|
|
44
|
-
left?: VNode<any> | HtmlVar;
|
|
45
|
-
right?: VNode<any> | HtmlVar;
|
|
46
|
-
noHeader?: boolean;
|
|
47
|
-
color?: string;
|
|
48
|
-
background?: string;
|
|
49
|
-
noShadow?: boolean;
|
|
50
|
-
contentColor?: string;
|
|
51
|
-
contentBackground?: string;
|
|
52
|
-
}) => {
|
|
53
|
-
left = left || <HeaderWithBackFrameLeft onClick={onBack} />;
|
|
54
|
-
right = right || <HeaderWithBackFrameRight onClick={onBack} />;
|
|
55
|
-
const css: CssProps = {
|
|
56
|
-
display: 'flex',
|
|
57
|
-
flexDirection: 'column',
|
|
58
|
-
width: '100%',
|
|
59
|
-
height: '100%',
|
|
60
|
-
minHeight: '100%',
|
|
61
|
-
background: background || 'var(--activatable-bg-color-normal)',
|
|
62
|
-
'.header-back-top': {
|
|
63
|
-
display: 'flex',
|
|
64
|
-
flexDirection: 'row',
|
|
65
|
-
width: '100vw',
|
|
66
|
-
padding: '6px 0',
|
|
67
|
-
backgroundColor: 'var(--activatable-bg-color-normal)',
|
|
68
|
-
boxShadow: 'var(--mobile-header-shadow)',
|
|
69
|
-
},
|
|
70
|
-
'.header-back-content': {
|
|
71
|
-
display: 'flex',
|
|
72
|
-
flex: '1',
|
|
73
|
-
flexDirection: 'column',
|
|
74
|
-
overflowY: 'auto',
|
|
75
|
-
scrollbarWidth: 'none',
|
|
76
|
-
position: 'relative',
|
|
77
|
-
color: contentColor || 'var(--primary-color)',
|
|
78
|
-
background: contentBackground || 'var(--activatable-bg-color-normal)',
|
|
79
|
-
'&::-webkit-scrollbar': {
|
|
80
|
-
display: 'none',
|
|
81
|
-
// height: '0',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
'.header-back-title': {
|
|
85
|
-
fontSize: '15px',
|
|
86
|
-
flex: '1',
|
|
87
|
-
color: 'var(--activatable-text-color-normal)',
|
|
88
|
-
overflow: 'hidden',
|
|
89
|
-
textOverflow: 'ellipsis',
|
|
90
|
-
whiteSpace: 'nowrap',
|
|
91
|
-
},
|
|
92
|
-
'.header-back-left, .header-back-right': {
|
|
93
|
-
// width: HeaderWithBackFrameHeight,
|
|
94
|
-
height: HeaderWithBackFrameHeight,
|
|
95
|
-
display: 'flex',
|
|
96
|
-
alignItems: 'center',
|
|
97
|
-
justifyContent: 'center',
|
|
98
|
-
cursor: 'pointer',
|
|
99
|
-
fontSize: '16px',
|
|
100
|
-
padding: '0 8px',
|
|
101
|
-
},
|
|
102
|
-
'.header-back-left i, .header-back-right i': {
|
|
103
|
-
fontSize: '28px',
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const domLeft = left instanceof HtmlVar ? left : new HtmlVar(left);
|
|
108
|
-
const domCenter = title instanceof HtmlVar ? title : new HtmlVar(title);
|
|
109
|
-
const domRight = right instanceof HtmlVar ? right : new HtmlVar(right);
|
|
110
|
-
const ref: RefProps = {};
|
|
111
|
-
return (
|
|
112
|
-
<div ref={ref} css={css} class='header-back-frame'>
|
|
113
|
-
{!noHeader &&
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
HeaderWithBackFrame is a full page frame with header for mobile sliders.
|
|
3
|
+
It has Back icon at Left and Close icon at Right.
|
|
4
|
+
*/
|
|
5
|
+
import { VNode, CssProps, RefProps, HtmlVar, backActionHelper } from 'lupine.components';
|
|
6
|
+
import { MobileHeaderTitleIcon } from './mobile-header-title-icon';
|
|
7
|
+
|
|
8
|
+
export const HeaderWithBackFrameHeight = '40px';
|
|
9
|
+
export const HeaderWithBackFrameLeft = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
10
|
+
return (
|
|
11
|
+
<i
|
|
12
|
+
class='ifc-icon mg-arrow_back_ios_new_outlined header-back-left-icon'
|
|
13
|
+
data-back-action={backActionHelper.genBackActionId()}
|
|
14
|
+
onClick={(event) => onClick(event)}
|
|
15
|
+
></i>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const HeaderWithBackFrameRight = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
20
|
+
return <i class='ifc-icon ma-close header-back-right-icon' onClick={(event) => onClick(event)}></i>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const HeaderWithBackFrameEmpty = () => {
|
|
24
|
+
return <div class='header-back-top-empty'></div>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// there may have a few HeaderWithBackFrame one over another at the same time
|
|
28
|
+
export const HeaderWithBackFrame = ({
|
|
29
|
+
children,
|
|
30
|
+
title,
|
|
31
|
+
onBack,
|
|
32
|
+
left,
|
|
33
|
+
right,
|
|
34
|
+
noHeader = false,
|
|
35
|
+
background,
|
|
36
|
+
color,
|
|
37
|
+
noShadow,
|
|
38
|
+
contentColor,
|
|
39
|
+
contentBackground,
|
|
40
|
+
}: {
|
|
41
|
+
children: VNode<any>;
|
|
42
|
+
title: VNode<any> | string | HtmlVar;
|
|
43
|
+
onBack: (event: Event) => void;
|
|
44
|
+
left?: VNode<any> | HtmlVar;
|
|
45
|
+
right?: VNode<any> | HtmlVar;
|
|
46
|
+
noHeader?: boolean;
|
|
47
|
+
color?: string;
|
|
48
|
+
background?: string;
|
|
49
|
+
noShadow?: boolean;
|
|
50
|
+
contentColor?: string;
|
|
51
|
+
contentBackground?: string;
|
|
52
|
+
}) => {
|
|
53
|
+
left = left || <HeaderWithBackFrameLeft onClick={onBack} />;
|
|
54
|
+
right = right || <HeaderWithBackFrameRight onClick={onBack} />;
|
|
55
|
+
const css: CssProps = {
|
|
56
|
+
display: 'flex',
|
|
57
|
+
flexDirection: 'column',
|
|
58
|
+
width: '100%',
|
|
59
|
+
height: '100%',
|
|
60
|
+
minHeight: '100%',
|
|
61
|
+
background: background || 'var(--activatable-bg-color-normal)',
|
|
62
|
+
'.header-back-top': {
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
width: '100vw',
|
|
66
|
+
padding: '6px 0',
|
|
67
|
+
backgroundColor: 'var(--activatable-bg-color-normal)',
|
|
68
|
+
boxShadow: 'var(--mobile-header-shadow)',
|
|
69
|
+
},
|
|
70
|
+
'.header-back-content': {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
flex: '1',
|
|
73
|
+
flexDirection: 'column',
|
|
74
|
+
overflowY: 'auto',
|
|
75
|
+
scrollbarWidth: 'none',
|
|
76
|
+
position: 'relative',
|
|
77
|
+
color: contentColor || 'var(--primary-color)',
|
|
78
|
+
background: contentBackground || 'var(--activatable-bg-color-normal)',
|
|
79
|
+
'&::-webkit-scrollbar': {
|
|
80
|
+
display: 'none',
|
|
81
|
+
// height: '0',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
'.header-back-title': {
|
|
85
|
+
fontSize: '15px',
|
|
86
|
+
flex: '1',
|
|
87
|
+
color: 'var(--activatable-text-color-normal)',
|
|
88
|
+
overflow: 'hidden',
|
|
89
|
+
textOverflow: 'ellipsis',
|
|
90
|
+
whiteSpace: 'nowrap',
|
|
91
|
+
},
|
|
92
|
+
'.header-back-left, .header-back-right': {
|
|
93
|
+
// width: HeaderWithBackFrameHeight,
|
|
94
|
+
height: HeaderWithBackFrameHeight,
|
|
95
|
+
display: 'flex',
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
justifyContent: 'center',
|
|
98
|
+
cursor: 'pointer',
|
|
99
|
+
fontSize: '16px',
|
|
100
|
+
padding: '0 8px',
|
|
101
|
+
},
|
|
102
|
+
'.header-back-left i, .header-back-right i': {
|
|
103
|
+
fontSize: '28px',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const domLeft = left instanceof HtmlVar ? left : new HtmlVar(left);
|
|
108
|
+
const domCenter = title instanceof HtmlVar ? title : new HtmlVar(title);
|
|
109
|
+
const domRight = right instanceof HtmlVar ? right : new HtmlVar(right);
|
|
110
|
+
const ref: RefProps = {};
|
|
111
|
+
return (
|
|
112
|
+
<div ref={ref} css={css} class='header-back-frame'>
|
|
113
|
+
{!noHeader && (
|
|
114
|
+
<MobileHeaderTitleIcon
|
|
115
|
+
onBack={onBack}
|
|
116
|
+
left={domLeft}
|
|
117
|
+
title={domCenter}
|
|
118
|
+
right={domRight}
|
|
119
|
+
background={background}
|
|
120
|
+
color={color}
|
|
121
|
+
noShadow={noShadow}
|
|
122
|
+
/>
|
|
123
|
+
)}
|
|
124
|
+
<div class='header-back-content'>{children}</div>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
};
|