lupine.components 1.1.35 → 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
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 = () => {
|