lupine.components 1.0.14 → 1.0.16
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,4 +1,4 @@
|
|
|
1
|
-
import { RefProps, VNode
|
|
1
|
+
import { RefProps, VNode } from 'lupine.web';
|
|
2
2
|
|
|
3
3
|
export type HtmlVarResult = { value: string | VNode<any>; ref: RefProps; node: VNode<any> };
|
|
4
4
|
export const HtmlVar = (initial?: string | VNode<any>): HtmlVarResult => {
|
|
@@ -6,12 +6,7 @@ export const HtmlVar = (initial?: string | VNode<any>): HtmlVarResult => {
|
|
|
6
6
|
let _dirty = false;
|
|
7
7
|
const waitUpdate = async (value: string | VNode<any>) => {
|
|
8
8
|
if (!ref.current) return;
|
|
9
|
-
|
|
10
|
-
await mountComponents(ref.current, value);
|
|
11
|
-
} else {
|
|
12
|
-
await replaceInnerhtml(ref.current, value as string);
|
|
13
|
-
// ref.current.innerHTML = value;
|
|
14
|
-
}
|
|
9
|
+
await ref.loadContent!(value);
|
|
15
10
|
_dirty = false;
|
|
16
11
|
};
|
|
17
12
|
const ref: RefProps = {
|
|
@@ -19,10 +14,6 @@ export const HtmlVar = (initial?: string | VNode<any>): HtmlVarResult => {
|
|
|
19
14
|
_dirty && waitUpdate(_value);
|
|
20
15
|
},
|
|
21
16
|
};
|
|
22
|
-
const FragmentRef = (props: any) => {
|
|
23
|
-
return <>{props.children}</>;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
17
|
return {
|
|
27
18
|
set value(value: string | VNode<any>) {
|
|
28
19
|
_value = value;
|
|
@@ -35,10 +26,10 @@ export const HtmlVar = (initial?: string | VNode<any>): HtmlVarResult => {
|
|
|
35
26
|
get ref() {
|
|
36
27
|
return ref;
|
|
37
28
|
},
|
|
38
|
-
// _fragment_ref is a special id to add ref to a fragment and it is processed in mount-components
|
|
39
29
|
get node() {
|
|
40
30
|
_dirty = false;
|
|
41
|
-
|
|
31
|
+
// the Fragment Tag will be present in the html if ref is assigned
|
|
32
|
+
return { type: 'Fragment', props: { ref, children: _value }, html: [] };
|
|
42
33
|
},
|
|
43
34
|
};
|
|
44
35
|
};
|
|
@@ -3,10 +3,10 @@ import { stopPropagation } from '../lib';
|
|
|
3
3
|
import { MediaQueryMaxWidth } from '../styles';
|
|
4
4
|
import { NestMenuItemProps } from './menu-item-props';
|
|
5
5
|
|
|
6
|
-
const fetchMenu = async (menuId: string) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
6
|
+
// const fetchMenu = async (menuId: string) => {
|
|
7
|
+
// const data = await getRenderPageProps().renderPageFunctions.fetchData(`/api/menu/get/${menuId}`);
|
|
8
|
+
// return data.json;
|
|
9
|
+
// };
|
|
10
10
|
|
|
11
11
|
export type MenuSidebarProps = {
|
|
12
12
|
mobileMenu?: boolean;
|
|
@@ -186,9 +186,10 @@ export const MenuSidebar = ({
|
|
|
186
186
|
// top: 0,
|
|
187
187
|
flex: 1,
|
|
188
188
|
overflowY: 'auto',
|
|
189
|
-
paddingTop: '200px',
|
|
189
|
+
// paddingTop: '200px',
|
|
190
190
|
width: '200px',
|
|
191
191
|
marginLeft: 'unset',
|
|
192
|
+
justifyContent: 'start',
|
|
192
193
|
},
|
|
193
194
|
'.menu-sidebar-top.open .menu-sidebar-sub-box > .menu-sidebar-sub': {
|
|
194
195
|
display: 'flex',
|
|
@@ -35,7 +35,7 @@ export const Spinner02 = ({
|
|
|
35
35
|
color?: string;
|
|
36
36
|
}) => {
|
|
37
37
|
const base = parseInt(size.replace('px', ''));
|
|
38
|
-
const ballSize = Array.from({ length: 7 }, (_, i) => `${i * base / 15 / 7}px`);
|
|
38
|
+
const ballSize = Array.from({ length: 7 }, (_, i) => `${(i * base / 15 / 7).toFixed(2)}px`);
|
|
39
39
|
const css: any = {
|
|
40
40
|
width: size,
|
|
41
41
|
height: size,
|