lupine.components 1.1.35 → 1.1.37

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,6 +1,6 @@
1
1
  {
2
2
  "name": "lupine.components",
3
- "version": "1.1.35",
3
+ "version": "1.1.37",
4
4
  "license": "MIT",
5
5
  "author": "uuware.com",
6
6
  "homepage": "https://github.com/uuware/lupine.js",
@@ -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 <i class='ifc-icon ma-close mhti-close-icon' onClick={(event) => onClick(event)}></i>;
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 <i class='ifc-icon ma-close header-back-right-icon' onClick={(event) => onClick(event)}></i>;
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,10 +223,8 @@ 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
- '@supports (-webkit-touch-callout: none)': {
227
- 'padding-top ': 'constant(safe-area-inset-top)',
228
- 'padding-top': 'env(safe-area-inset-top)',
229
- },
226
+ 'padding-top ': 'constant(safe-area-inset-top)',
227
+ 'padding-top': 'env(safe-area-inset-top)',
230
228
  },
231
229
  [MediaQueryRange.TabletAbove]: {
232
230
  '&.auto-extend .mobile-side-menu-mask': {
@@ -35,10 +35,8 @@ 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
- '@supports (-webkit-touch-callout: none)': {
39
- 'padding-top ': 'constant(safe-area-inset-top)',
40
- 'padding-top': 'env(safe-area-inset-top)',
41
- },
38
+ 'padding-top ': 'constant(safe-area-inset-top)',
39
+ 'padding-top': 'env(safe-area-inset-top)',
42
40
  '.frame-top-menu': {
43
41
  display: 'flex',
44
42
  flexDirection: 'column',
@@ -72,10 +72,8 @@ 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
- '@supports (-webkit-touch-callout: none)': {
76
- 'padding-top ': 'constant(safe-area-inset-top)',
77
- 'padding-top': 'env(safe-area-inset-top)',
78
- },
75
+ 'padding-top ': 'constant(safe-area-inset-top)',
76
+ 'padding-top': 'env(safe-area-inset-top)',
79
77
  '&.show': {
80
78
  transform: props.direction === 'bottom' ? 'translateY(0)' : 'translateX(0)',
81
79
  },
@@ -16,10 +16,8 @@ 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)': {
20
- 'padding-top ': 'constant(safe-area-inset-top)',
21
- 'padding-top': 'env(safe-area-inset-top)',
22
- },
19
+ 'padding-top ': 'constant(safe-area-inset-top)',
20
+ 'padding-top': 'env(safe-area-inset-top)',
23
21
  },
24
22
  };
25
23