lupine.components 1.1.34 → 1.1.36
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/package.json +1 -1
- package/src/components/float-window.tsx +2 -2
- package/src/components/menu-sidebar.tsx +8 -2
- package/src/components/mobile-components/mobile-header-title-icon.tsx +7 -1
- package/src/components/mobile-components/mobile-header-with-back.tsx +7 -1
- package/src/components/mobile-components/mobile-side-menu.tsx +4 -2
- package/src/frames/responsive-frame.tsx +4 -2
- package/src/frames/slider-frame.tsx +4 -2
- package/src/frames/top-frame.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CssProps, RefProps, VNode, mountInnerComponent } from 'lupine.web';
|
|
2
|
-
import { stopPropagation } from '../lib';
|
|
2
|
+
import { stopPropagation, backActionHelper } from '../lib';
|
|
3
3
|
|
|
4
4
|
export type FloatWindowCloseProps = () => void;
|
|
5
5
|
|
|
@@ -163,7 +163,7 @@ export class FloatWindow {
|
|
|
163
163
|
<div ref={ref} class='fwin-body' onMouseDown={onMousedown}>
|
|
164
164
|
<div class='fwin-title'>
|
|
165
165
|
{title}
|
|
166
|
-
<span class='fwin-close' onClick={handleClose}>
|
|
166
|
+
<span class='fwin-close' onClick={handleClose} data-back-action={backActionHelper.genBackActionId()}>
|
|
167
167
|
×
|
|
168
168
|
</span>
|
|
169
169
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bindGlobalStyle, CssProps, getRenderPageProps, RefProps } from 'lupine.web';
|
|
2
|
-
import { stopPropagation } from '../lib';
|
|
2
|
+
import { stopPropagation, backActionHelper } from '../lib';
|
|
3
3
|
import { MediaQueryMaxWidth } from '../styles';
|
|
4
4
|
import { NestMenuItemProps } from './menu-item-props';
|
|
5
5
|
|
|
@@ -277,7 +277,13 @@ export const MenuSidebar = ({
|
|
|
277
277
|
menu.classList.toggle('active');
|
|
278
278
|
const topMenu = ref.$('.menu-sidebar-top');
|
|
279
279
|
topMenu.classList.toggle('open');
|
|
280
|
-
ref.current.classList.toggle('open');
|
|
280
|
+
const isOpen = ref.current.classList.toggle('open');
|
|
281
|
+
|
|
282
|
+
if (isOpen) {
|
|
283
|
+
ref.current.setAttribute('data-back-action', backActionHelper.genBackActionId());
|
|
284
|
+
} else {
|
|
285
|
+
ref.current.removeAttribute('data-back-action');
|
|
286
|
+
}
|
|
281
287
|
};
|
|
282
288
|
const onItemToggleClick = (ref: RefProps) => {
|
|
283
289
|
// if (event.target != ref.current && (event.target as any).parentNode != ref.current) {
|
|
@@ -16,7 +16,13 @@ export const MobileHeadeBackIcon = ({ onClick }: { onClick: (event: Event) => vo
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const MobileHeadeCloseIcon = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
19
|
-
return
|
|
19
|
+
return (
|
|
20
|
+
<i
|
|
21
|
+
class='ifc-icon ma-close mhti-close-icon'
|
|
22
|
+
data-back-action={backActionHelper.genBackActionId()}
|
|
23
|
+
onClick={(event) => onClick(event)}
|
|
24
|
+
></i>
|
|
25
|
+
);
|
|
20
26
|
};
|
|
21
27
|
|
|
22
28
|
export const MobileHeaderEmptyIcon = () => {
|
|
@@ -17,7 +17,13 @@ export const HeaderWithBackFrameLeft = ({ onClick }: { onClick: (event: Event) =
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const HeaderWithBackFrameRight = ({ onClick }: { onClick: (event: Event) => void }) => {
|
|
20
|
-
return
|
|
20
|
+
return (
|
|
21
|
+
<i
|
|
22
|
+
class='ifc-icon ma-close header-back-right-icon'
|
|
23
|
+
data-back-action={backActionHelper.genBackActionId()}
|
|
24
|
+
onClick={(event) => onClick(event)}
|
|
25
|
+
></i>
|
|
26
|
+
);
|
|
21
27
|
};
|
|
22
28
|
|
|
23
29
|
export const HeaderWithBackFrameEmpty = () => {
|
|
@@ -223,8 +223,10 @@ export const MobileSideMenu = (props: { children: VNode<any>; autoExtend?: boole
|
|
|
223
223
|
overflowY: 'auto',
|
|
224
224
|
transform: 'translateX(-100%)',
|
|
225
225
|
boxShadow: 'var(--cover-box-shadow)',
|
|
226
|
-
'
|
|
227
|
-
|
|
226
|
+
'@supports (-webkit-touch-callout: none)': {
|
|
227
|
+
'padding-top ': 'constant(safe-area-inset-top)',
|
|
228
|
+
'padding-top': 'env(safe-area-inset-top)',
|
|
229
|
+
},
|
|
228
230
|
},
|
|
229
231
|
[MediaQueryRange.TabletAbove]: {
|
|
230
232
|
'&.auto-extend .mobile-side-menu-mask': {
|
|
@@ -35,8 +35,10 @@ export const ResponsiveFrame = (props: ResponsiveFrameProps) => {
|
|
|
35
35
|
borderLeft: props.maxWidth ? '1px solid var(--primary-border-color)' : 'none',
|
|
36
36
|
margin: '0 auto',
|
|
37
37
|
overflowX: 'hidden',
|
|
38
|
-
'
|
|
39
|
-
|
|
38
|
+
'@supports (-webkit-touch-callout: none)': {
|
|
39
|
+
'padding-top ': 'constant(safe-area-inset-top)',
|
|
40
|
+
'padding-top': 'env(safe-area-inset-top)',
|
|
41
|
+
},
|
|
40
42
|
'.frame-top-menu': {
|
|
41
43
|
display: 'flex',
|
|
42
44
|
flexDirection: 'column',
|
|
@@ -72,8 +72,10 @@ export const SliderFrame = (props: SliderFrameProps) => {
|
|
|
72
72
|
transition: 'transform 0.4s ease-in-out',
|
|
73
73
|
backgroundColor: 'var(--primary-bg-color)',
|
|
74
74
|
// trick: to put two padding-top properties
|
|
75
|
-
'
|
|
76
|
-
|
|
75
|
+
'@supports (-webkit-touch-callout: none)': {
|
|
76
|
+
'padding-top ': 'constant(safe-area-inset-top)',
|
|
77
|
+
'padding-top': 'env(safe-area-inset-top)',
|
|
78
|
+
},
|
|
77
79
|
'&.show': {
|
|
78
80
|
transform: props.direction === 'bottom' ? 'translateY(0)' : 'translateX(0)',
|
|
79
81
|
},
|
package/src/frames/top-frame.tsx
CHANGED
|
@@ -16,9 +16,11 @@ export const TopFrame = async (placeholderClassname: string, vnode: VNode<any>)
|
|
|
16
16
|
flexDirection: 'column',
|
|
17
17
|
height: '100%',
|
|
18
18
|
// trick: to put two padding-top properties
|
|
19
|
+
'@supports (-webkit-touch-callout: none)': {
|
|
19
20
|
'padding-top ': 'constant(safe-area-inset-top)',
|
|
20
21
|
'padding-top': 'env(safe-area-inset-top)',
|
|
21
22
|
},
|
|
23
|
+
},
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
return (
|