@functionalcms/svelte-components 2.0.7 → 2.1.1
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 +17 -0
- package/dist/components/Banner.svelte.d.ts +19 -0
- package/dist/components/Card.svelte +137 -0
- package/dist/components/Card.svelte.d.ts +49 -0
- package/dist/components/Layout.svelte +41 -0
- package/dist/components/Layout.svelte.d.ts +33 -0
- package/dist/components/Logo.svelte +19 -7
- package/dist/components/SimpleFooter.svelte +13 -15
- package/dist/components/Spacer.svelte +18 -0
- package/dist/components/Spacer.svelte.d.ts +18 -0
- package/dist/components/Styling.d.ts +47 -0
- package/dist/components/Styling.js +52 -0
- package/dist/components/Well.svelte +28 -0
- package/dist/components/Well.svelte.d.ts +19 -0
- package/dist/components/menu/FlatMenu.svelte +119 -0
- package/dist/components/menu/FlatMenu.svelte.d.ts +18 -0
- package/dist/components/menu/HamburgerMenu.svelte +84 -0
- package/dist/components/menu/HamburgerMenu.svelte.d.ts +22 -0
- package/dist/css/properties.css +187 -0
- package/dist/index.d.ts +11 -6
- package/dist/index.js +11 -9
- package/package.json +2 -1
- package/dist/authStore.d.ts +0 -18
- package/dist/authStore.js +0 -72
- package/dist/components/Box.svelte +0 -21
- package/dist/components/Box.svelte.d.ts +0 -27
- package/dist/components/Header.svelte +0 -37
- package/dist/components/Header.svelte.d.ts +0 -32
- package/dist/components/Hero.svelte +0 -19
- package/dist/components/Hero.svelte.d.ts +0 -22
- package/dist/components/Position.d.ts +0 -5
- package/dist/components/Position.js +0 -6
- package/dist/constants.d.ts +0 -5
- package/dist/constants.js +0 -6
- /package/dist/components/{HeaderNavigationItem.d.ts → menu/Menu.d.ts} +0 -0
- /package/dist/components/{HeaderNavigationItem.js → menu/Menu.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>export let background = "";
|
|
2
|
+
export let css = "";
|
|
3
|
+
$:
|
|
4
|
+
klasses = [
|
|
5
|
+
"flex",
|
|
6
|
+
css ? css : ""
|
|
7
|
+
].filter((c) => c).join(" ");
|
|
8
|
+
</script>
|
|
9
|
+
<style>
|
|
10
|
+
div {
|
|
11
|
+
background: var(--functional-banner-background);
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
|
|
15
|
+
<div style="--functional-banner-background: {background};" class={klasses}>
|
|
16
|
+
<slot />
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
background?: string | undefined;
|
|
5
|
+
css?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type BannerProps = typeof __propDef.props;
|
|
15
|
+
export type BannerEvents = typeof __propDef.events;
|
|
16
|
+
export type BannerSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Banner extends SvelteComponent<BannerProps, BannerEvents, BannerSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
/**
|
|
3
|
+
* Cards
|
|
4
|
+
*
|
|
5
|
+
* I drew some inspiration from the article on media-query less cards:
|
|
6
|
+
* https://css-tricks.com/how-to-make-a-media-query-less-card-component/
|
|
7
|
+
*/
|
|
8
|
+
.card,
|
|
9
|
+
.card-base {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: center;
|
|
13
|
+
position: relative;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.card-border {
|
|
19
|
+
border: 1px solid var(--functional-card-border-color, var(--functional-gray-light));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.card-rounded {
|
|
23
|
+
border-radius: var(--functional-radius, 0.25rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.card-shadow {
|
|
27
|
+
box-shadow:
|
|
28
|
+
var(--functional-card-boxshadow1-offset-x, 0)
|
|
29
|
+
var(--functional-card-boxshadow1-offset-y, 0.375rem)
|
|
30
|
+
var(--functional-card-boxshadow1-blur, 0.5625rem)
|
|
31
|
+
var(--functional-card-boxshadow1-color, rgb(6 6 6 / 7.5%)),
|
|
32
|
+
var(--functional-card-boxshadow2-offset-x, 0) var(--functional-card-boxshadow2-offset-y, 0)
|
|
33
|
+
var(--functional-card-boxshadow2-blur, 1px)
|
|
34
|
+
var(--functional-card-boxshadow2-color, rgb(5 5 5 / 10%));
|
|
35
|
+
border-radius: var(--functional-card-border-radius, var(--functional-radius, 0.25rem));
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.card-shadow:hover {
|
|
40
|
+
box-shadow:
|
|
41
|
+
var(--functional-card-boxshadow1-offset-x, 0)
|
|
42
|
+
var(--functional-card-boxshadow1-offset-y, 0.375rem)
|
|
43
|
+
var(--functional-card-boxshadow1-blur, 0.875rem)
|
|
44
|
+
var(--functional-card-boxshadow1-color, rgb(4 4 4 / 10%)),
|
|
45
|
+
var(--functional-card-boxshadow2-offset-x, 0) var(--functional-card-boxshadow2-offset-y, 0)
|
|
46
|
+
var(--functional-card-boxshadow2-blur, 2px)
|
|
47
|
+
var(--functional-card-boxshadow2-color, rgb(3 3 3 / 10%));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Animates the y position and box shadow on hover
|
|
52
|
+
*/
|
|
53
|
+
.card-animated {
|
|
54
|
+
transition:
|
|
55
|
+
box-shadow ease-out 5s,
|
|
56
|
+
transform var(--functional-timing-fast)
|
|
57
|
+
cubic-bezier(
|
|
58
|
+
var(--functional-card-cubic-1, 0.39),
|
|
59
|
+
var(--functional-card-cubic-2, 0.575),
|
|
60
|
+
var(--functional-card-cubic-3, 0.565),
|
|
61
|
+
var(--functional-card-cubic-4, 1)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.card-animated:hover {
|
|
66
|
+
transform: translateY(var(--functional-card-translate-y-hover, -3px));
|
|
67
|
+
transition:
|
|
68
|
+
box-shadow ease-out var(--functional-timing-fast),
|
|
69
|
+
transform var(--functional-timing-slow)
|
|
70
|
+
cubic-bezier(
|
|
71
|
+
var(--functional-card-cubic-1, 0.39),
|
|
72
|
+
var(--functional-card-cubic-2, 0.575),
|
|
73
|
+
var(--functional-card-cubic-3, 0.565),
|
|
74
|
+
var(--functional-card-cubic-4, 1)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (prefers-reduced-motion), (update: slow) {
|
|
79
|
+
.card-animated,
|
|
80
|
+
.card-animated:hover {
|
|
81
|
+
transition-duration: 0.001ms !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.card-stacked {
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.card-success {
|
|
90
|
+
background: var(--functional-action-light);
|
|
91
|
+
color: var(--functional-action-dark);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.card-info {
|
|
95
|
+
background: var(--functional-primary-light);
|
|
96
|
+
color: var(--functional-primary-dark);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.card-error {
|
|
100
|
+
background: var(--functional-error-light);
|
|
101
|
+
color: var(--functional-error-dark);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.card-warning {
|
|
105
|
+
background: var(--functional-warning-light);
|
|
106
|
+
color: var(--functional-warning-dark);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
</style>
|
|
110
|
+
|
|
111
|
+
<script>
|
|
112
|
+
export let isAnimated = false;
|
|
113
|
+
export let isSkinned = true;
|
|
114
|
+
export let isStacked = false;
|
|
115
|
+
export let isShadow = false;
|
|
116
|
+
export let isBorder = false;
|
|
117
|
+
export let isRounded = false;
|
|
118
|
+
export let type = "";
|
|
119
|
+
export let css = "";
|
|
120
|
+
|
|
121
|
+
let klasses = [
|
|
122
|
+
isSkinned ? "card" : "card-base",
|
|
123
|
+
isAnimated ? "card-animated" : "",
|
|
124
|
+
isStacked ? "card-stacked" : "",
|
|
125
|
+
isShadow ? "card-shadow" : "",
|
|
126
|
+
isRounded ? "card-rounded" : "",
|
|
127
|
+
isBorder ? "card-border" : "",
|
|
128
|
+
type ? `card-${type}` : "",
|
|
129
|
+
css ? `${css}` : "",
|
|
130
|
+
]
|
|
131
|
+
.filter((klass) => klass.length)
|
|
132
|
+
.join(" ");
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<div class={klasses} on:click on:focus on:blur>
|
|
136
|
+
<slot />
|
|
137
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} CardProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} CardEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} CardSlots */
|
|
4
|
+
export default class Card extends SvelteComponent<{
|
|
5
|
+
type?: string | undefined;
|
|
6
|
+
css?: string | undefined;
|
|
7
|
+
isAnimated?: boolean | undefined;
|
|
8
|
+
isSkinned?: boolean | undefined;
|
|
9
|
+
isStacked?: boolean | undefined;
|
|
10
|
+
isShadow?: boolean | undefined;
|
|
11
|
+
isBorder?: boolean | undefined;
|
|
12
|
+
isRounded?: boolean | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
click: MouseEvent;
|
|
15
|
+
focus: FocusEvent;
|
|
16
|
+
blur: FocusEvent;
|
|
17
|
+
} & {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {
|
|
20
|
+
default: {};
|
|
21
|
+
}> {
|
|
22
|
+
}
|
|
23
|
+
export type CardProps = typeof __propDef.props;
|
|
24
|
+
export type CardEvents = typeof __propDef.events;
|
|
25
|
+
export type CardSlots = typeof __propDef.slots;
|
|
26
|
+
import { SvelteComponent } from "svelte";
|
|
27
|
+
declare const __propDef: {
|
|
28
|
+
props: {
|
|
29
|
+
type?: string | undefined;
|
|
30
|
+
css?: string | undefined;
|
|
31
|
+
isAnimated?: boolean | undefined;
|
|
32
|
+
isSkinned?: boolean | undefined;
|
|
33
|
+
isStacked?: boolean | undefined;
|
|
34
|
+
isShadow?: boolean | undefined;
|
|
35
|
+
isBorder?: boolean | undefined;
|
|
36
|
+
isRounded?: boolean | undefined;
|
|
37
|
+
};
|
|
38
|
+
events: {
|
|
39
|
+
click: MouseEvent;
|
|
40
|
+
focus: FocusEvent;
|
|
41
|
+
blur: FocusEvent;
|
|
42
|
+
} & {
|
|
43
|
+
[evt: string]: CustomEvent<any>;
|
|
44
|
+
};
|
|
45
|
+
slots: {
|
|
46
|
+
default: {};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
:global(html), :global(body), :global(body > div) {
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
:global(body > div) {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
:global(body > footer) {
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
}
|
|
12
|
+
div {
|
|
13
|
+
flex: 1 0 auto;
|
|
14
|
+
}
|
|
15
|
+
footer {
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
|
|
20
|
+
<div>
|
|
21
|
+
{#if $$slots.header}
|
|
22
|
+
<header>
|
|
23
|
+
<slot name="header" />
|
|
24
|
+
</header>
|
|
25
|
+
{/if}
|
|
26
|
+
<main>
|
|
27
|
+
<slot />
|
|
28
|
+
</main>
|
|
29
|
+
{#if $$slots.footer}
|
|
30
|
+
<footer>
|
|
31
|
+
<slot name="footer" />
|
|
32
|
+
</footer>
|
|
33
|
+
{/if}
|
|
34
|
+
<div id="drawer-root"></div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
{#if $$slots.sticky_footer}
|
|
38
|
+
<footer>
|
|
39
|
+
<slot name="sticky_footer" />
|
|
40
|
+
</footer>
|
|
41
|
+
{/if}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import { SvelteComponent } from "svelte";
|
|
19
|
+
declare const __propDef: {
|
|
20
|
+
props: {
|
|
21
|
+
[x: string]: never;
|
|
22
|
+
};
|
|
23
|
+
events: {
|
|
24
|
+
[evt: string]: CustomEvent<any>;
|
|
25
|
+
};
|
|
26
|
+
slots: {
|
|
27
|
+
header: {};
|
|
28
|
+
default: {};
|
|
29
|
+
footer: {};
|
|
30
|
+
sticky_footer: {};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<style>
|
|
2
|
+
a {
|
|
3
|
+
display: var(--functional-logo-display, 'inline-block');
|
|
4
|
+
}
|
|
5
|
+
a img {
|
|
6
|
+
width: 80vw;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (min-width: 960px) {
|
|
10
|
+
a img {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
|
|
16
|
+
<script>export let companyName;
|
|
3
17
|
export let logoUrl;
|
|
4
18
|
</script>
|
|
5
19
|
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</a>
|
|
10
|
-
</div>
|
|
20
|
+
<a href="/">
|
|
21
|
+
<img src={logoUrl} alt={companyName} />
|
|
22
|
+
</a>
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
aside {
|
|
3
|
+
text-align: center;
|
|
4
|
+
font-size: smaller;
|
|
5
|
+
}
|
|
6
|
+
</style>
|
|
7
|
+
|
|
1
8
|
<script>export let companyName = "";
|
|
2
9
|
export let motto = "";
|
|
3
10
|
export let logoUrl;
|
|
4
11
|
</script>
|
|
5
12
|
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</aside>
|
|
13
|
-
</footer>
|
|
14
|
-
|
|
15
|
-
<style>
|
|
16
|
-
footer {
|
|
17
|
-
text-align: center;
|
|
18
|
-
font-size: smaller;
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
13
|
+
<aside class="items-center grid-flow-col">
|
|
14
|
+
<img src={logoUrl} alt={companyName} />
|
|
15
|
+
<p>{motto}</p>
|
|
16
|
+
<p>Copyright © 2024 - All right reserved by {companyName}</p>
|
|
17
|
+
<p>Powerd by <a href="https://functional-cms.com">Functional CMS</a></p>
|
|
18
|
+
</aside>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
div {
|
|
3
|
+
display: block;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
</style>
|
|
7
|
+
|
|
8
|
+
<script>import { Sizes } from "./Styling";
|
|
9
|
+
export let width = Sizes.V0;
|
|
10
|
+
export let height = Sizes.V0;
|
|
11
|
+
const klasses = [
|
|
12
|
+
width ? `w${width}` : "",
|
|
13
|
+
height ? `h${height}` : ""
|
|
14
|
+
].filter((c) => c).join(" ");
|
|
15
|
+
</script>
|
|
16
|
+
<div class={klasses}>
|
|
17
|
+
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Sizes } from "./Styling";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
width?: Sizes | undefined;
|
|
6
|
+
height?: Sizes | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type SpacerProps = typeof __propDef.props;
|
|
14
|
+
export type SpacerEvents = typeof __propDef.events;
|
|
15
|
+
export type SpacerSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Spacer extends SvelteComponent<SpacerProps, SpacerEvents, SpacerSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum Justify {
|
|
2
|
+
Start = "start",
|
|
3
|
+
End = "end",
|
|
4
|
+
Center = "center",
|
|
5
|
+
Between = "between",
|
|
6
|
+
Around = "around"
|
|
7
|
+
}
|
|
8
|
+
export declare enum Placement {
|
|
9
|
+
Start = "start",
|
|
10
|
+
End = "end",
|
|
11
|
+
Top = "top",
|
|
12
|
+
Up = "up",
|
|
13
|
+
Bottom = "bottom",
|
|
14
|
+
Content = "content"
|
|
15
|
+
}
|
|
16
|
+
export declare enum Orientation {
|
|
17
|
+
Row = "row",
|
|
18
|
+
Column = "column",
|
|
19
|
+
DynamicRow = "row-dynamic"
|
|
20
|
+
}
|
|
21
|
+
export declare enum Position {
|
|
22
|
+
Left = 0,
|
|
23
|
+
Middle = 1,
|
|
24
|
+
Right = 2
|
|
25
|
+
}
|
|
26
|
+
export declare enum Sizes {
|
|
27
|
+
V0 = 0,
|
|
28
|
+
V2 = 2,
|
|
29
|
+
V4 = 4,
|
|
30
|
+
V6 = 6,
|
|
31
|
+
V8 = 8,
|
|
32
|
+
V10 = 10,
|
|
33
|
+
V12 = 12,
|
|
34
|
+
V14 = 14,
|
|
35
|
+
V16 = 16,
|
|
36
|
+
V18 = 18,
|
|
37
|
+
V20 = 20,
|
|
38
|
+
V24 = 24,
|
|
39
|
+
V32 = 32,
|
|
40
|
+
V36 = 36,
|
|
41
|
+
V40 = 40,
|
|
42
|
+
V48 = 48,
|
|
43
|
+
V56 = 56,
|
|
44
|
+
V64 = 64,
|
|
45
|
+
V72 = 72,
|
|
46
|
+
V80 = 80
|
|
47
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export var Justify;
|
|
2
|
+
(function (Justify) {
|
|
3
|
+
Justify["Start"] = "start";
|
|
4
|
+
Justify["End"] = "end";
|
|
5
|
+
Justify["Center"] = "center";
|
|
6
|
+
Justify["Between"] = "between";
|
|
7
|
+
Justify["Around"] = "around";
|
|
8
|
+
})(Justify || (Justify = {}));
|
|
9
|
+
export var Placement;
|
|
10
|
+
(function (Placement) {
|
|
11
|
+
Placement["Start"] = "start";
|
|
12
|
+
Placement["End"] = "end";
|
|
13
|
+
Placement["Top"] = "top";
|
|
14
|
+
Placement["Up"] = "up";
|
|
15
|
+
Placement["Bottom"] = "bottom";
|
|
16
|
+
Placement["Content"] = "content";
|
|
17
|
+
})(Placement || (Placement = {}));
|
|
18
|
+
export var Orientation;
|
|
19
|
+
(function (Orientation) {
|
|
20
|
+
Orientation["Row"] = "row";
|
|
21
|
+
Orientation["Column"] = "column";
|
|
22
|
+
Orientation["DynamicRow"] = "row-dynamic";
|
|
23
|
+
})(Orientation || (Orientation = {}));
|
|
24
|
+
export var Position;
|
|
25
|
+
(function (Position) {
|
|
26
|
+
Position[Position["Left"] = 0] = "Left";
|
|
27
|
+
Position[Position["Middle"] = 1] = "Middle";
|
|
28
|
+
Position[Position["Right"] = 2] = "Right";
|
|
29
|
+
})(Position || (Position = {}));
|
|
30
|
+
export var Sizes;
|
|
31
|
+
(function (Sizes) {
|
|
32
|
+
Sizes[Sizes["V0"] = 0] = "V0";
|
|
33
|
+
Sizes[Sizes["V2"] = 2] = "V2";
|
|
34
|
+
Sizes[Sizes["V4"] = 4] = "V4";
|
|
35
|
+
Sizes[Sizes["V6"] = 6] = "V6";
|
|
36
|
+
Sizes[Sizes["V8"] = 8] = "V8";
|
|
37
|
+
Sizes[Sizes["V10"] = 10] = "V10";
|
|
38
|
+
Sizes[Sizes["V12"] = 12] = "V12";
|
|
39
|
+
Sizes[Sizes["V14"] = 14] = "V14";
|
|
40
|
+
Sizes[Sizes["V16"] = 16] = "V16";
|
|
41
|
+
Sizes[Sizes["V18"] = 18] = "V18";
|
|
42
|
+
Sizes[Sizes["V20"] = 20] = "V20";
|
|
43
|
+
Sizes[Sizes["V24"] = 24] = "V24";
|
|
44
|
+
Sizes[Sizes["V32"] = 32] = "V32";
|
|
45
|
+
Sizes[Sizes["V36"] = 36] = "V36";
|
|
46
|
+
Sizes[Sizes["V40"] = 40] = "V40";
|
|
47
|
+
Sizes[Sizes["V48"] = 48] = "V48";
|
|
48
|
+
Sizes[Sizes["V56"] = 56] = "V56";
|
|
49
|
+
Sizes[Sizes["V64"] = 64] = "V64";
|
|
50
|
+
Sizes[Sizes["V72"] = 72] = "V72";
|
|
51
|
+
Sizes[Sizes["V80"] = 80] = "V80";
|
|
52
|
+
})(Sizes || (Sizes = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
<style>
|
|
3
|
+
div {
|
|
4
|
+
width: 100%;
|
|
5
|
+
margin: 0px;
|
|
6
|
+
}
|
|
7
|
+
@media (min-width: 960px) {
|
|
8
|
+
div {
|
|
9
|
+
width: var(--functional-content-width);
|
|
10
|
+
margin: auto;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
|
|
15
|
+
<script>import { Orientation } from "../Styling";
|
|
16
|
+
export let css = "";
|
|
17
|
+
export let orientation = Orientation.Column;
|
|
18
|
+
$:
|
|
19
|
+
klasses = [
|
|
20
|
+
"flex",
|
|
21
|
+
css ? css : "",
|
|
22
|
+
`flex-${orientation}`
|
|
23
|
+
].filter((c) => c).join(" ");
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class={klasses}>
|
|
27
|
+
<slot />
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
css?: string | undefined;
|
|
5
|
+
orientation?: any;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type WellProps = typeof __propDef.props;
|
|
15
|
+
export type WellEvents = typeof __propDef.events;
|
|
16
|
+
export type WellSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Well extends SvelteComponent<WellProps, WellEvents, WellSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script>import { Visiblity } from "../../Visiblity";
|
|
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>
|
|
19
|
+
<style>
|
|
20
|
+
nav > ul {
|
|
21
|
+
margin: var(--functional-menu-margin, 'auto');
|
|
22
|
+
padding: var(--functional-menu-padding);
|
|
23
|
+
background: var(--functional-menu-background);
|
|
24
|
+
|
|
25
|
+
display: none;
|
|
26
|
+
|
|
27
|
+
transition: all 1.25s;
|
|
28
|
+
}
|
|
29
|
+
nav > ul > li > a {
|
|
30
|
+
margin: var(--functional-menu-item-margin);
|
|
31
|
+
padding: var(--functional-menu-item-padding);
|
|
32
|
+
display: block;
|
|
33
|
+
text-align: center;
|
|
34
|
+
|
|
35
|
+
color: var(--functional-menu-item-color, var(--primary-color));
|
|
36
|
+
background: var(--functional-menu-item-background);
|
|
37
|
+
border-top: var(--functional-menu-item-border-top);
|
|
38
|
+
border-right: var(--functional-menu-item-border-right);
|
|
39
|
+
border-bottom: var(--functional-menu-item-border-bottom);
|
|
40
|
+
border-left: var(--functional-menu-item-border-left);
|
|
41
|
+
}
|
|
42
|
+
nav > ul > li > a:hover {
|
|
43
|
+
color: var(--functional-menu-item-color-hover, var(--primary-color));
|
|
44
|
+
background: var(--functional-menu-item-hover-background);
|
|
45
|
+
border-top: var(--functional-menu-item-hover-border-top);
|
|
46
|
+
border-right: var(--functional-menu-item-hover-border-right);
|
|
47
|
+
border-bottom: var(--functional-menu-item-hover-border-bottom);
|
|
48
|
+
border-left: var(--functional-menu-item-hover-border-left);
|
|
49
|
+
}
|
|
50
|
+
nav > ul > li[aria-current='true'] > a{
|
|
51
|
+
color: var(--functional-menu-item-color-selected, var(--primary-color));
|
|
52
|
+
background: var(--functional-menu-item-selected-background);
|
|
53
|
+
|
|
54
|
+
border-top: var(--functional-menu-item-selected-border-top);
|
|
55
|
+
border-right: var(--functional-menu-item-selected-border-right);
|
|
56
|
+
border-bottom: var(--functional-menu-item-selected-border-bottom);
|
|
57
|
+
border-left: var(--functional-menu-item-selected-border-left);
|
|
58
|
+
}
|
|
59
|
+
.show-menu {
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
.nav-icon {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
font-size: 1.5em;
|
|
65
|
+
padding: 0.5em;
|
|
66
|
+
vertical-align: middle;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
input.checkbox-menu[type="checkbox"] {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
input.checkbox-menu[type="checkbox"]:checked ~ ul {
|
|
74
|
+
display: block;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (max-width: 960px) {
|
|
78
|
+
nav > ul {
|
|
79
|
+
width: 100%;
|
|
80
|
+
position: absolute;
|
|
81
|
+
left: 0;
|
|
82
|
+
top: 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
@media (min-width: 960px) {
|
|
86
|
+
nav > ul {
|
|
87
|
+
position: relative;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
91
|
+
nav > ul > li > a {
|
|
92
|
+
display: block;
|
|
93
|
+
text-align: center;
|
|
94
|
+
height: 100%;
|
|
95
|
+
}
|
|
96
|
+
.show-menu {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
|
|
102
|
+
<nav class={css}>
|
|
103
|
+
<label for="id-show-menu" class="show-menu">
|
|
104
|
+
<div class="nav-icon">
|
|
105
|
+
☰
|
|
106
|
+
</div>
|
|
107
|
+
</label>
|
|
108
|
+
<input type="checkbox" id="id-show-menu" class="checkbox-menu" role="button" bind:checked={selected}>
|
|
109
|
+
<ul>
|
|
110
|
+
{#each visibleNavItems as pageItem}
|
|
111
|
+
<li aria-current={$page.url.pathname === pageItem.path}>
|
|
112
|
+
<span class="screenreader-only">Navigate to {pageItem.name}</span>
|
|
113
|
+
<a on:click={pageItem.action} href={pageItem.path}>
|
|
114
|
+
{pageItem.name}
|
|
115
|
+
</a>
|
|
116
|
+
</li>
|
|
117
|
+
{/each}
|
|
118
|
+
</ul>
|
|
119
|
+
</nav>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
pages?: HeaderNavigationItem[] | undefined;
|
|
5
|
+
authentication?: boolean | undefined;
|
|
6
|
+
css?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type FlatMenuProps = typeof __propDef.props;
|
|
14
|
+
export type FlatMenuEvents = typeof __propDef.events;
|
|
15
|
+
export type FlatMenuSlots = typeof __propDef.slots;
|
|
16
|
+
export default class FlatMenu extends SvelteComponent<FlatMenuProps, FlatMenuEvents, FlatMenuSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|