@functionalcms/svelte-components 2.1.8 → 2.1.11
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/dist/components/Banner.svelte +1 -0
- package/dist/components/Layout.svelte +2 -0
- package/dist/components/Layout.svelte.d.ts +6 -20
- package/dist/components/menu/FlatMenu.svelte +19 -18
- package/dist/components/menu/FlatMenu.svelte.d.ts +1 -0
- package/dist/components/menu/HamburgerMenu.svelte +1 -4
- package/package.json +5 -2
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} LayoutProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} LayoutEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} LayoutSlots */
|
|
4
|
-
export default class Layout extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
header: {};
|
|
10
|
-
default: {};
|
|
11
|
-
footer: {};
|
|
12
|
-
sticky_footer: {};
|
|
13
|
-
}> {
|
|
14
|
-
}
|
|
15
|
-
export type LayoutProps = typeof __propDef.props;
|
|
16
|
-
export type LayoutEvents = typeof __propDef.events;
|
|
17
|
-
export type LayoutSlots = typeof __propDef.slots;
|
|
18
1
|
import { SvelteComponent } from "svelte";
|
|
19
2
|
declare const __propDef: {
|
|
20
|
-
props:
|
|
21
|
-
[x: string]: never;
|
|
22
|
-
};
|
|
3
|
+
props: Record<string, never>;
|
|
23
4
|
events: {
|
|
24
5
|
[evt: string]: CustomEvent<any>;
|
|
25
6
|
};
|
|
@@ -30,4 +11,9 @@ declare const __propDef: {
|
|
|
30
11
|
sticky_footer: {};
|
|
31
12
|
};
|
|
32
13
|
};
|
|
14
|
+
export type LayoutProps = typeof __propDef.props;
|
|
15
|
+
export type LayoutEvents = typeof __propDef.events;
|
|
16
|
+
export type LayoutSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Layout extends SvelteComponent<LayoutProps, LayoutEvents, LayoutSlots> {
|
|
18
|
+
}
|
|
33
19
|
export {};
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { HeaderNavigationItem } from "../../HeaderNavigationItem";
|
|
3
|
-
import { afterNavigate } from "$app/navigation";
|
|
4
|
-
import { page } from "$app/stores";
|
|
5
|
-
export let pages = [];
|
|
6
|
-
export let authentication = false;
|
|
7
|
-
export let css = "";
|
|
8
|
-
const selectVisible = (pages2, visiblity) => pages2.filter(
|
|
9
|
-
(page2) => page2?.visiblity === Visiblity.Always || page2?.visiblity === visiblity
|
|
10
|
-
);
|
|
11
|
-
$:
|
|
12
|
-
visibility = authentication ? Visiblity.Authenticated : Visiblity.NotAuthenticated;
|
|
13
|
-
$:
|
|
14
|
-
visibleNavItems = selectVisible(pages, visibility);
|
|
15
|
-
$:
|
|
16
|
-
selected = false;
|
|
17
|
-
afterNavigate((navigation) => selected = false);
|
|
18
|
-
</script>
|
|
1
|
+
|
|
19
2
|
<style>
|
|
20
3
|
nav > ul {
|
|
21
4
|
margin: var(--functional-menu-margin, 'auto');
|
|
@@ -99,6 +82,24 @@ afterNavigate((navigation) => selected = false);
|
|
|
99
82
|
}
|
|
100
83
|
</style>
|
|
101
84
|
|
|
85
|
+
<script>import { Visiblity, HeaderNavigationItem } from "./Menu.js";
|
|
86
|
+
import { afterNavigate } from "$app/navigation";
|
|
87
|
+
import { page } from "$app/stores";
|
|
88
|
+
export let pages = [];
|
|
89
|
+
export let authentication = false;
|
|
90
|
+
export let css = "";
|
|
91
|
+
const selectVisible = (pages2, visiblity) => pages2.filter(
|
|
92
|
+
(page2) => page2?.visiblity === Visiblity.Always || page2?.visiblity === visiblity
|
|
93
|
+
);
|
|
94
|
+
$:
|
|
95
|
+
visibility = authentication ? Visiblity.Authenticated : Visiblity.NotAuthenticated;
|
|
96
|
+
$:
|
|
97
|
+
visibleNavItems = selectVisible(pages, visibility);
|
|
98
|
+
$:
|
|
99
|
+
selected = false;
|
|
100
|
+
afterNavigate((navigation) => selected = false);
|
|
101
|
+
</script>
|
|
102
|
+
|
|
102
103
|
<nav class={css}>
|
|
103
104
|
<label for="id-show-menu" class="show-menu">
|
|
104
105
|
<div class="nav-icon">
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
<style>
|
|
2
|
-
.sticky {
|
|
3
|
-
display: block;
|
|
4
|
-
position: absolute;
|
|
5
|
-
}
|
|
6
2
|
:global(.no-border) {
|
|
7
3
|
border: none!important;;
|
|
8
4
|
}
|
|
@@ -57,6 +53,7 @@ const klasses = [
|
|
|
57
53
|
noBorder ? "no-border" : ""
|
|
58
54
|
].filter((c) => c).join(" ");
|
|
59
55
|
</script>
|
|
56
|
+
|
|
60
57
|
<Button
|
|
61
58
|
type="button"
|
|
62
59
|
data-a11y-dialog-show="drawer-start-test"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functionalcms/svelte-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"svelte": "./dist/index.js"
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"./dist/css/properties.css": "./dist/css/properties.css",
|
|
19
|
+
"./css/properties.css": "./dist/css/properties.css",
|
|
20
|
+
"./package.json": "./package.json"
|
|
18
21
|
},
|
|
19
22
|
"files": [
|
|
20
23
|
"dist",
|