@functionalcms/svelte-components 3.5.20 → 4.0.0-pre-2.0
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/css/functional.css +1 -1
- package/css/functional.css.map +1 -1
- package/dist/auth/authenticationHandle.js +0 -4
- package/dist/auth/redisSessionProvider.js +1 -2
- package/dist/auth/sessionIdGenerator.d.ts +1 -1
- package/dist/components/form/Button.svelte +379 -0
- package/dist/components/form/Button.svelte.d.ts +27 -0
- package/dist/components/form/Input.d.ts +21 -0
- package/dist/components/form/Input.js +23 -0
- package/dist/components/form/Input.svelte +142 -177
- package/dist/components/form/Input.svelte.d.ts +24 -46
- package/dist/components/{Banner.svelte → layouts/Banner.svelte} +5 -5
- package/dist/components/layouts/DefaultLayout.svelte +5 -5
- package/dist/components/layouts/DefaultLayout.svelte.d.ts +4 -4
- package/dist/components/layouts/SimpleFooter.svelte +4 -4
- package/dist/components/layouts/SimpleFooter.svelte.d.ts +3 -3
- package/dist/components/layouts/Well.svelte +46 -0
- package/dist/components/layouts/Well.svelte.d.ts +12 -0
- package/dist/components/menu/CollapsibleMenu.svelte +2 -2
- package/dist/components/menu/CollapsibleMenu.svelte.d.ts +3 -16
- package/dist/components/menu/DynamicMenu.svelte +25 -13
- package/dist/components/menu/DynamicMenu.svelte.d.ts +10 -28
- package/dist/components/menu/HamburgerMenu.svelte +29 -21
- package/dist/components/menu/HamburgerMenu.svelte.d.ts +11 -24
- package/dist/components/menu/ListMenu.svelte +53 -0
- package/dist/components/menu/ListMenu.svelte.d.ts +17 -0
- package/dist/components/menu/{Menu.d.ts → types.d.ts} +2 -0
- package/dist/components/menu/{Menu.js → types.js} +5 -0
- package/dist/components/presentation/Card.svelte +77 -92
- package/dist/components/presentation/Card.svelte.d.ts +10 -13
- package/dist/components/presentation/{Carusele.d.ts → Carousel.d.ts} +1 -1
- package/dist/components/presentation/Carousel.svelte +98 -1
- package/dist/components/presentation/Carousel.svelte.d.ts +14 -15
- package/dist/components/{agnostic/Disclose → presentation}/Disclose.svelte +2 -2
- package/dist/components/presentation/Drawer.svelte +131 -0
- package/dist/components/presentation/Drawer.svelte.d.ts +13 -0
- package/dist/components/presentation/Gallery.svelte +7 -7
- package/dist/components/presentation/Gallery.svelte.d.ts +3 -3
- package/dist/components/presentation/ImageCompare.svelte +39 -46
- package/dist/components/presentation/ImageCompare.svelte.d.ts +8 -26
- package/dist/components/presentation/Link.svelte +362 -0
- package/dist/components/presentation/Link.svelte.d.ts +27 -0
- package/dist/components/presentation/Logo.svelte +36 -0
- package/dist/components/presentation/Logo.svelte.d.ts +8 -0
- package/dist/components/presentation/ShowItem.d.ts +7 -7
- package/dist/components/presentation/ShowItem.js +1 -8
- package/dist/index-server.d.ts +0 -1
- package/dist/index-server.js +0 -3
- package/dist/index.d.ts +17 -22
- package/dist/index.js +40 -57
- package/dist/server-side/getServices.d.ts +1 -1
- package/dist/server-side/types.d.ts +1 -2
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +54 -0
- package/package.json +27 -24
- package/dist/components/CssHelper.d.ts +0 -1
- package/dist/components/CssHelper.js +0 -3
- package/dist/components/Link.svelte +0 -349
- package/dist/components/Link.svelte.d.ts +0 -48
- package/dist/components/Logo.svelte +0 -38
- package/dist/components/Logo.svelte.d.ts +0 -28
- package/dist/components/Spacer.svelte +0 -22
- package/dist/components/Spacer.svelte.d.ts +0 -6
- package/dist/components/Well.svelte +0 -40
- package/dist/components/Well.svelte.d.ts +0 -12
- package/dist/components/agnostic/Button/Button.svelte +0 -371
- package/dist/components/agnostic/Button/Button.svelte.d.ts +0 -52
- package/dist/components/agnostic/Button/ButtonGroup.svelte +0 -21
- package/dist/components/agnostic/Button/ButtonGroup.svelte.d.ts +0 -32
- package/dist/components/agnostic/Button/button-base.css +0 -12
- package/dist/components/agnostic/Button/button-core.css +0 -237
- package/dist/components/agnostic/Button/button-empty.css +0 -31
- package/dist/components/agnostic/Button/button-group.css +0 -8
- package/dist/components/agnostic/Close/Close.svelte +0 -124
- package/dist/components/agnostic/Close/Close.svelte.d.ts +0 -25
- package/dist/components/agnostic/Close/api.d.ts +0 -1
- package/dist/components/agnostic/Divider/Divider.svelte +0 -141
- package/dist/components/agnostic/Divider/Divider.svelte.d.ts +0 -24
- package/dist/components/agnostic/Divider/api.d.ts +0 -3
- package/dist/components/agnostic/Divider/api.js +0 -1
- package/dist/components/agnostic/Loader/Loader.svelte +0 -116
- package/dist/components/agnostic/Loader/Loader.svelte.d.ts +0 -22
- package/dist/components/agnostic/animation.css +0 -37
- package/dist/components/blog/BlogDescription.svelte +0 -9
- package/dist/components/blog/BlogDescription.svelte.d.ts +0 -23
- package/dist/components/blog/BlogPost.d.ts +0 -13
- package/dist/components/blog/BlogPost.js +0 -1
- package/dist/components/blog/BlogTitle.svelte +0 -19
- package/dist/components/blog/BlogTitle.svelte.d.ts +0 -23
- package/dist/components/blog/blog.d.ts +0 -8
- package/dist/components/blog/blog.js +0 -29
- package/dist/components/converters/ShowItemToNavigationItems.d.ts +0 -3
- package/dist/components/converters/ShowItemToNavigationItems.js +0 -10
- package/dist/components/form/DateTimePicker.svelte +0 -59
- package/dist/components/form/DateTimePicker.svelte.d.ts +0 -18
- package/dist/components/form/InputAddonItem.svelte +0 -42
- package/dist/components/form/InputAddonItem.svelte.d.ts +0 -31
- package/dist/components/form/InputTypes.d.ts +0 -9
- package/dist/components/form/InputTypes.js +0 -10
- package/dist/components/form/Select.svelte +0 -157
- package/dist/components/form/Select.svelte.d.ts +0 -34
- package/dist/components/form/Switch.svelte +0 -275
- package/dist/components/form/Switch.svelte.d.ts +0 -30
- package/dist/components/menu/Menu.svelte +0 -526
- package/dist/components/menu/Menu.svelte.d.ts +0 -33
- package/dist/components/menu/MenuItem.svelte +0 -121
- package/dist/components/menu/MenuItem.svelte.d.ts +0 -39
- package/dist/components/menu/NavigationItems.svelte +0 -44
- package/dist/components/menu/NavigationItems.svelte.d.ts +0 -32
- package/dist/components/menu/authentication.d.ts +0 -1
- package/dist/components/menu/authentication.js +0 -6
- package/dist/components/presentation/Carousel/carousel-content.svelte +0 -35
- package/dist/components/presentation/Carousel/carousel-content.svelte.d.ts +0 -28
- package/dist/components/presentation/Carousel/carousel-item.svelte +0 -25
- package/dist/components/presentation/Carousel/carousel-item.svelte.d.ts +0 -28
- package/dist/components/presentation/Carousel/carousel-next.svelte +0 -39
- package/dist/components/presentation/Carousel/carousel-next.svelte.d.ts +0 -18
- package/dist/components/presentation/Carousel/carousel-previous.svelte +0 -40
- package/dist/components/presentation/Carousel/carousel-previous.svelte.d.ts +0 -18
- package/dist/components/presentation/Carousel/carousel.svelte +0 -99
- package/dist/components/presentation/Carousel/carousel.svelte.d.ts +0 -31
- package/dist/components/presentation/Carousel/context.d.ts +0 -32
- package/dist/components/presentation/Carousel/context.js +0 -12
- package/dist/components/presentation/Carusele.js +0 -5
- /package/dist/components/{Markdown.svelte → content/Markdown.svelte} +0 -0
- /package/dist/components/{Markdown.svelte.d.ts → content/Markdown.svelte.d.ts} +0 -0
- /package/dist/components/{Banner.svelte.d.ts → layouts/Banner.svelte.d.ts} +0 -0
- /package/dist/components/{agnostic/Close/api.js → presentation/Carousel.js} +0 -0
- /package/dist/components/{agnostic/Disclose → presentation}/Disclose.svelte.d.ts +0 -0
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { TouchEventHandler } from "svelte/elements";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
before: string;
|
|
6
|
+
after: string;
|
|
7
|
+
offset?: number;
|
|
8
|
+
overlay?: boolean;
|
|
9
|
+
sliding?: boolean;
|
|
10
|
+
contain?: boolean;
|
|
11
|
+
lazyLoad?: 'eager' | 'lazy' | undefined;
|
|
12
|
+
hideOnSlide?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
before,
|
|
17
|
+
after,
|
|
18
|
+
offset = 0.5,
|
|
19
|
+
overlay = true,
|
|
4
20
|
sliding = false,
|
|
5
21
|
contain = false,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
lazyLoad = 'lazy',
|
|
23
|
+
hideOnSlide = true
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
|
|
26
|
+
let imgOffset: any = null;
|
|
27
|
+
let img: any = null;
|
|
12
28
|
|
|
13
|
-
function resize(e) {
|
|
29
|
+
function resize(e: Event) {
|
|
14
30
|
imgOffset = (e.type === 'load' ? e.target : img).getBoundingClientRect();
|
|
15
31
|
}
|
|
16
32
|
|
|
17
|
-
function move(e) {
|
|
33
|
+
function move(e: any) {
|
|
18
34
|
if (sliding && imgOffset) {
|
|
19
35
|
let x = (e.touches ? e.touches[0].pageX : e.pageX) - imgOffset.left;
|
|
20
36
|
x = x < 0 ? 0 : x > w ? w : x;
|
|
@@ -22,7 +38,7 @@
|
|
|
22
38
|
}
|
|
23
39
|
}
|
|
24
40
|
|
|
25
|
-
function start(e) {
|
|
41
|
+
function start(e: Event) {
|
|
26
42
|
sliding = true;
|
|
27
43
|
move(e);
|
|
28
44
|
}
|
|
@@ -31,14 +47,13 @@
|
|
|
31
47
|
sliding = false;
|
|
32
48
|
}
|
|
33
49
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export { before, after, offset, overlay, contain, lazyLoad, hideOnSlide };
|
|
50
|
+
let w = $derived(imgOffset && imgOffset.width);
|
|
51
|
+
let h = $derived(imgOffset && imgOffset.height);
|
|
52
|
+
let x = $derived(w * offset);
|
|
53
|
+
let opacity = $derived(hideOnSlide && sliding ? 0 : 1);
|
|
54
|
+
let style = $derived(
|
|
55
|
+
contain ? `width:100%;height:100%;` : 'width:' + w + 'px;height:' + h + 'px;'
|
|
56
|
+
);
|
|
42
57
|
</script>
|
|
43
58
|
|
|
44
59
|
<svelte:window
|
|
@@ -52,36 +67,28 @@
|
|
|
52
67
|
<div
|
|
53
68
|
class="container"
|
|
54
69
|
{style}
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
ontouchstart={start}
|
|
71
|
+
onmousedown={start}
|
|
57
72
|
role="img"
|
|
58
73
|
aria-roledescription="image slider"
|
|
59
74
|
>
|
|
60
75
|
<img
|
|
61
76
|
bind:this={img}
|
|
62
|
-
loading={
|
|
77
|
+
loading={lazyLoad}
|
|
63
78
|
src={after}
|
|
64
79
|
alt="after"
|
|
65
|
-
|
|
66
|
-
on:load={resize}
|
|
80
|
+
onload={resize}
|
|
67
81
|
{style}
|
|
68
82
|
/>
|
|
69
83
|
<img
|
|
70
|
-
loading={
|
|
84
|
+
loading={lazyLoad}
|
|
71
85
|
src={before}
|
|
72
86
|
alt="before"
|
|
73
|
-
on:mousedown|preventDefault
|
|
74
87
|
style="{style}clip:rect(0, {x}px, {h}px, 0);"
|
|
75
88
|
/>
|
|
76
89
|
{#if overlay}
|
|
77
90
|
<div class="overlay" style="opacity:{opacity}"></div>
|
|
78
91
|
{/if}
|
|
79
|
-
<div class="before-label" style="opacity:{opacity}">
|
|
80
|
-
<slot name="before"></slot>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="after-label" style="opacity:{opacity}">
|
|
83
|
-
<slot name="after"></slot>
|
|
84
|
-
</div>
|
|
85
92
|
<div class="handle" style="left: calc({offset * 100}% - 20px)">
|
|
86
93
|
<div class="arrow-left"></div>
|
|
87
94
|
<div class="arrow-right"></div>
|
|
@@ -114,20 +121,6 @@
|
|
|
114
121
|
transition: opacity 0.5s;
|
|
115
122
|
background: rgba(0, 0, 0, 0.5);
|
|
116
123
|
}
|
|
117
|
-
.before-label,
|
|
118
|
-
.after-label {
|
|
119
|
-
top: 0;
|
|
120
|
-
bottom: 0;
|
|
121
|
-
z-index: 25;
|
|
122
|
-
user-select: none;
|
|
123
|
-
position: absolute;
|
|
124
|
-
}
|
|
125
|
-
.before-label {
|
|
126
|
-
left: 0;
|
|
127
|
-
}
|
|
128
|
-
.after-label {
|
|
129
|
-
right: 0;
|
|
130
|
-
}
|
|
131
124
|
.container:hover > .overlay {
|
|
132
125
|
opacity: 1;
|
|
133
126
|
}
|
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
interface
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const ImageCompare: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
before?: string;
|
|
16
|
-
after?: string;
|
|
1
|
+
interface Props {
|
|
2
|
+
before: string;
|
|
3
|
+
after: string;
|
|
17
4
|
offset?: number;
|
|
18
5
|
overlay?: boolean;
|
|
6
|
+
sliding?: boolean;
|
|
19
7
|
contain?: boolean;
|
|
20
|
-
lazyLoad?:
|
|
8
|
+
lazyLoad?: 'eager' | 'lazy' | undefined;
|
|
21
9
|
hideOnSlide?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
}, {
|
|
27
|
-
before: {};
|
|
28
|
-
after: {};
|
|
29
|
-
}, {}, string>;
|
|
30
|
-
type ImageCompare = InstanceType<typeof ImageCompare>;
|
|
10
|
+
}
|
|
11
|
+
declare const ImageCompare: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type ImageCompare = ReturnType<typeof ImageCompare>;
|
|
31
13
|
export default ImageCompare;
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlignItmes, ComponentSize, Justify, Orientation } from '../Styling.js';
|
|
3
|
+
import { cn } from '../../utils.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
children: Snippet;
|
|
8
|
+
href: string;
|
|
9
|
+
css?: string;
|
|
10
|
+
isPrimary?: boolean;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
isBordered?: boolean;
|
|
13
|
+
isSecondary?: boolean;
|
|
14
|
+
idRounded?: boolean;
|
|
15
|
+
idPill?: boolean;
|
|
16
|
+
idBlock?: boolean;
|
|
17
|
+
idCapsule?: boolean;
|
|
18
|
+
idCircle?: boolean;
|
|
19
|
+
idGrouped?: boolean;
|
|
20
|
+
isCircle?: boolean;
|
|
21
|
+
isFlex?: boolean;
|
|
22
|
+
size?: ComponentSize;
|
|
23
|
+
justify?: Justify;
|
|
24
|
+
alignItems?: AlignItmes;
|
|
25
|
+
orientation?: Orientation;
|
|
26
|
+
role?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let {
|
|
30
|
+
children,
|
|
31
|
+
href,
|
|
32
|
+
css = '',
|
|
33
|
+
isPrimary = false,
|
|
34
|
+
isDisabled = false,
|
|
35
|
+
isBordered = false,
|
|
36
|
+
isSecondary = false,
|
|
37
|
+
idRounded = false,
|
|
38
|
+
idPill = false,
|
|
39
|
+
idBlock = false,
|
|
40
|
+
idCapsule = false,
|
|
41
|
+
idCircle = false,
|
|
42
|
+
idGrouped = false,
|
|
43
|
+
isCircle = false,
|
|
44
|
+
isFlex = true,
|
|
45
|
+
size = ComponentSize.Normal,
|
|
46
|
+
justify = Justify.Center,
|
|
47
|
+
alignItems = AlignItmes.Center,
|
|
48
|
+
orientation = Orientation.Row,
|
|
49
|
+
role = 'link',
|
|
50
|
+
...restProps
|
|
51
|
+
}: Props = $props();
|
|
52
|
+
|
|
53
|
+
let isSmall = $derived(size === ComponentSize.Small);
|
|
54
|
+
let isLarge = $derived(size === ComponentSize.Large);
|
|
55
|
+
|
|
56
|
+
let classes = $derived(
|
|
57
|
+
cn(
|
|
58
|
+
isPrimary ? 'btn-primary' : '',
|
|
59
|
+
isDisabled ? 'disabled' : '',
|
|
60
|
+
|
|
61
|
+
isBordered ? 'btn-bordered' : '',
|
|
62
|
+
isSecondary ? 'btn-secondary' : '',
|
|
63
|
+
|
|
64
|
+
idRounded ? 'btn-rounded' : '',
|
|
65
|
+
idPill ? 'btn-pill' : '',
|
|
66
|
+
idBlock ? 'btn-block' : '',
|
|
67
|
+
idCapsule ? 'btn-capsule' : '',
|
|
68
|
+
idCircle ? 'btn-circle' : '',
|
|
69
|
+
idGrouped ? 'btn-grouped' : '',
|
|
70
|
+
|
|
71
|
+
isLarge ? 'btn-large' : '',
|
|
72
|
+
isSmall ? 'btn-small' : '',
|
|
73
|
+
|
|
74
|
+
isLarge && isCircle ? 'btn-large btn-circle-large' : '',
|
|
75
|
+
isSmall && idCircle ? 'btn-small btn-circle-small' : '',
|
|
76
|
+
|
|
77
|
+
isFlex ? `flex` : '',
|
|
78
|
+
isFlex ? `${orientation}` : '',
|
|
79
|
+
isFlex ? `${justify}` : '',
|
|
80
|
+
isFlex ? `${alignItems}` : '',
|
|
81
|
+
|
|
82
|
+
css ? css : 'btn'
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<a class={classes} {href} {...restProps}>
|
|
88
|
+
{@render children()}
|
|
89
|
+
</a>
|
|
90
|
+
|
|
91
|
+
<style>.btn-base {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
user-select: none;
|
|
97
|
+
appearance: none;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
transition-property: all;
|
|
101
|
+
transition-duration: var(--timing-medium);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.btn {
|
|
105
|
+
/* TODO test this fallback override syntax is correct */
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
white-space: nowrap;
|
|
110
|
+
user-select: none;
|
|
111
|
+
appearance: none;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
transition-property: all;
|
|
115
|
+
transition-duration: var(--timing-medium);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.btn-skin,
|
|
119
|
+
.btn {
|
|
120
|
+
color: var(--btn-font-color, var(--dark));
|
|
121
|
+
background-color: var(--btn-bgcolor, var(--gray-light));
|
|
122
|
+
border-color: var(--btn-bgcolor, var(--gray-light));
|
|
123
|
+
/* seems like a reasonable default as chrome picks `outset` which results in a weird 3d effect */
|
|
124
|
+
border-style: solid;
|
|
125
|
+
border-width: var(--btn-border-size, 1px);
|
|
126
|
+
font-family: var(--btn-font-family, var(--font-family-body));
|
|
127
|
+
font-weight: var(--btn-font-weight, 400);
|
|
128
|
+
font-size: var(--btn-font-size, 1rem);
|
|
129
|
+
/* this can be overriden, but it might mess with the balance of the button heights across variants */
|
|
130
|
+
line-height: var(--line-height, var(--fluid-20, 1.25rem));
|
|
131
|
+
padding-block-start: var(--vertical-pad, 0.5rem);
|
|
132
|
+
padding-block-end: var(--vertical-pad, 0.5rem);
|
|
133
|
+
padding-inline-start: var(--side-padding, 0.75rem);
|
|
134
|
+
padding-inline-end: var(--side-padding, 0.75rem);
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
text-align: center;
|
|
137
|
+
outline: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.btn:visited {
|
|
141
|
+
color: var(--btn-font-color, var(--dark));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.btn:hover {
|
|
145
|
+
opacity: 85%;
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.btn:active {
|
|
150
|
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
|
|
151
|
+
text-decoration: none;
|
|
152
|
+
transition-duration: 0s;
|
|
153
|
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.btn:focus {
|
|
157
|
+
box-shadow: 0 0 0 var(--focus-ring-outline-width) var(--focus-ring-color);
|
|
158
|
+
/* Needed for High Contrast mode */
|
|
159
|
+
outline: var(--focus-ring-outline-width) var(--focus-ring-outline-style) var(--focus-ring-outline-color);
|
|
160
|
+
transition: box-shadow var(--timing-fast) ease-out;
|
|
161
|
+
/* In order for the focused element's box-shadow to appear above its siblings we need to
|
|
162
|
+
establish a new stacking context: https://stackoverflow.com/a/28042700 */
|
|
163
|
+
isolation: isolate;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/*
|
|
167
|
+
* Disabled State
|
|
168
|
+
*
|
|
169
|
+
* The disabled state uses the class .disabled, is-disabled,
|
|
170
|
+
* and the form attribute disabled="disabled".
|
|
171
|
+
* The use of !important is only added because this is a state
|
|
172
|
+
* that must be applied to all buttons when in a disabled state.
|
|
173
|
+
*/
|
|
174
|
+
.btn.disabled,
|
|
175
|
+
.btn:disabled {
|
|
176
|
+
top: 0 !important;
|
|
177
|
+
background: var(--btn-disabled-bg, var(--gray-mid-dark)) !important;
|
|
178
|
+
text-shadow: 0 1px 1px rgb(255, 255, 255) !important;
|
|
179
|
+
/* primary, secondary, natural, all look same when disabled; and we don't want to
|
|
180
|
+
have an inadvertant looking blue primary border when disabled so it's transparent */
|
|
181
|
+
border-color: transparent;
|
|
182
|
+
color: var(--btn-disabled-color, var(--gray-dark)) !important;
|
|
183
|
+
cursor: default !important;
|
|
184
|
+
appearance: none !important;
|
|
185
|
+
box-shadow: none !important;
|
|
186
|
+
opacity: 80% !important;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.btn-primary {
|
|
190
|
+
background-color: var(--btn-primary, var(--primary));
|
|
191
|
+
border-color: var(--btn-primary, var(--primary));
|
|
192
|
+
color: var(--btn-primary-color, var(--light));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Border and font is primary. When hovered, we invert with primary background and white font */
|
|
196
|
+
.btn-primary.btn-bordered {
|
|
197
|
+
color: var(--btn-primary, var(--primary));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.btn-primary.btn-bordered:hover,
|
|
201
|
+
.btn-primary.btn-bordered:focus {
|
|
202
|
+
background-color: var(--btn-primary, var(--primary));
|
|
203
|
+
color: var(--btn-primary-color, var(--light));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.btn-primary:visited {
|
|
207
|
+
color: var(--btn-primary-color, var(--light));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.btn-secondary {
|
|
211
|
+
background-color: var(--btn-secondary, var(--secondary));
|
|
212
|
+
border-color: var(--btn-secondary, var(--secondary));
|
|
213
|
+
color: var(--btn-secondary-color, var(--light));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Border and font is secondary. When hovered, we invert with secondary background and white font */
|
|
217
|
+
.btn-secondary.btn-bordered {
|
|
218
|
+
color: var(--btn-secondary, var(--secondary));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.btn-secondary.btn-bordered:hover,
|
|
222
|
+
.btn-secondary.btn-bordered:focus {
|
|
223
|
+
background-color: var(--btn-secondary, var(--secondary));
|
|
224
|
+
color: var(--btn-secondary-color, var(--light));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.btn-secondary:visited {
|
|
228
|
+
color: var(--btn-secondary-color, var(--light));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/*
|
|
232
|
+
/**
|
|
233
|
+
* Border Buttons
|
|
234
|
+
*/
|
|
235
|
+
.btn-bordered {
|
|
236
|
+
border-width: 1px;
|
|
237
|
+
background: transparent;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Sizes
|
|
242
|
+
*/
|
|
243
|
+
.btn-large {
|
|
244
|
+
font-size: calc(var(--btn-font-size, 1rem) + 0.25rem);
|
|
245
|
+
height: 3rem;
|
|
246
|
+
line-height: 3rem;
|
|
247
|
+
padding: 0 3rem;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.btn-small {
|
|
251
|
+
font-size: calc(var(--btn-font-size, 1rem) - 0.25rem);
|
|
252
|
+
height: 2rem;
|
|
253
|
+
line-height: 2rem;
|
|
254
|
+
padding: 0 2rem;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Rounded
|
|
259
|
+
*/
|
|
260
|
+
.btn-rounded {
|
|
261
|
+
border-radius: var(--btn-radius, var(--radius, 0.25rem));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.btn-pill {
|
|
265
|
+
border-radius: 200px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
* Size Adjustment for equal height & width buttons
|
|
270
|
+
*
|
|
271
|
+
* Remove padding
|
|
272
|
+
*/
|
|
273
|
+
.btn-circle {
|
|
274
|
+
border-radius: 100%;
|
|
275
|
+
width: 2.5rem;
|
|
276
|
+
height: 2.5rem;
|
|
277
|
+
padding: 0 !important;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.btn-circle-large {
|
|
281
|
+
font-size: calc(var(--btn-font-size, 1rem) + 0.25rem);
|
|
282
|
+
width: 3rem;
|
|
283
|
+
height: 3rem;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.btn-circle-small {
|
|
287
|
+
font-size: calc(var(--btn-font-size, 1rem) - 0.25rem);
|
|
288
|
+
width: 2rem;
|
|
289
|
+
height: 2rem;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Button Block (stacked)
|
|
294
|
+
*/
|
|
295
|
+
.btn-block {
|
|
296
|
+
width: 100%;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* This is a utility class used if you literally want to stack block buttons one after another.
|
|
300
|
+
Apply this class to the nth-of-type(2) onwards to ensure the borders line up properly. */
|
|
301
|
+
.btn-block-following {
|
|
302
|
+
margin-block-start: -1px;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.btn-grouped {
|
|
306
|
+
border-radius: var(--btn-radius, var(--radius, 0.25rem));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.btn-grouped:not(:last-child) {
|
|
310
|
+
border-top-right-radius: 0;
|
|
311
|
+
border-bottom-right-radius: 0;
|
|
312
|
+
margin-inline-end: -1px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.btn-grouped:not(:first-child) {
|
|
316
|
+
border-top-left-radius: 0;
|
|
317
|
+
border-bottom-left-radius: 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.btn-capsule {
|
|
321
|
+
--padding-side: calc(var(--side-padding, 0.75rem) * 1.5);
|
|
322
|
+
border-radius: var(--radius-capsule);
|
|
323
|
+
padding-inline-start: var(--padding-side);
|
|
324
|
+
padding-inline-end: var(--padding-side);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@media (prefers-reduced-motion), (update: slow) {
|
|
328
|
+
.btn,
|
|
329
|
+
.btn:focus {
|
|
330
|
+
transition-duration: 0.001ms !important;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Invisible buttons. Generally used for a Cancel or icon button that behaves like a button,
|
|
335
|
+
* semantically and for a11y, but, does so without all the typical "button chrome" behind it.
|
|
336
|
+
*/
|
|
337
|
+
:is(.btn-link, .btn-blank) {
|
|
338
|
+
font-family: var(--btn-font-family, var(--font-family-body));
|
|
339
|
+
font-size: var(--btn-font-size, 1rem);
|
|
340
|
+
background-color: transparent;
|
|
341
|
+
border: 0;
|
|
342
|
+
border-radius: 0;
|
|
343
|
+
box-shadow: none;
|
|
344
|
+
transition: none;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Since blank buttons can be used for things like input addons we don't want to go crazy
|
|
348
|
+
on the side padding. As such, these have a good bit less then regular buttons. */
|
|
349
|
+
.btn-blank {
|
|
350
|
+
--btn-blank-side-padding: var(--btn-blank-side-padding, 0.25rem);
|
|
351
|
+
padding-inline-start: var(--btn-blank-side-padding);
|
|
352
|
+
padding-inline-end: var(--btn-blank-side-padding);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* A button blank with link color text */
|
|
356
|
+
.btn-link {
|
|
357
|
+
color: var(--btn-primary, var(--primary));
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.btn-link:hover {
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
}</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AlignItmes, ComponentSize, Justify, Orientation } from '../Styling.js';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
interface Props {
|
|
4
|
+
children: Snippet;
|
|
5
|
+
href: string;
|
|
6
|
+
css?: string;
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
isBordered?: boolean;
|
|
10
|
+
isSecondary?: boolean;
|
|
11
|
+
idRounded?: boolean;
|
|
12
|
+
idPill?: boolean;
|
|
13
|
+
idBlock?: boolean;
|
|
14
|
+
idCapsule?: boolean;
|
|
15
|
+
idCircle?: boolean;
|
|
16
|
+
idGrouped?: boolean;
|
|
17
|
+
isCircle?: boolean;
|
|
18
|
+
isFlex?: boolean;
|
|
19
|
+
size?: ComponentSize;
|
|
20
|
+
justify?: Justify;
|
|
21
|
+
alignItems?: AlignItmes;
|
|
22
|
+
orientation?: Orientation;
|
|
23
|
+
role?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const Link: import("svelte").Component<Props, {}, "">;
|
|
26
|
+
type Link = ReturnType<typeof Link>;
|
|
27
|
+
export default Link;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
companyName: string;
|
|
4
|
+
logoUrl: string;
|
|
5
|
+
css: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
companyName,
|
|
10
|
+
logoUrl,
|
|
11
|
+
css = 'logo'
|
|
12
|
+
}: Props = $props();
|
|
13
|
+
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<a href="/" class={css}>
|
|
17
|
+
<img src={logoUrl} alt={companyName} loading="lazy" />
|
|
18
|
+
</a>
|
|
19
|
+
|
|
20
|
+
<style>
|
|
21
|
+
a {
|
|
22
|
+
display: var(--logo-display, 'inline-block');
|
|
23
|
+
margin: var(--mobile-logo-margin);
|
|
24
|
+
padding: var(--mobile-logo-padding);
|
|
25
|
+
}
|
|
26
|
+
a img {
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: 960px) {
|
|
31
|
+
a img {
|
|
32
|
+
margin: var(--logo-margin);
|
|
33
|
+
padding: var(--logo-padding);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
name
|
|
3
|
-
image
|
|
4
|
-
title
|
|
5
|
-
short
|
|
6
|
-
content
|
|
7
|
-
path
|
|
1
|
+
export interface ShowItem {
|
|
2
|
+
name?: string;
|
|
3
|
+
image?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
short?: string;
|
|
6
|
+
content?: string;
|
|
7
|
+
path?: string;
|
|
8
8
|
}
|
package/dist/index-server.d.ts
CHANGED
|
@@ -5,6 +5,5 @@ export { redisSessionProvider } from './auth/redisSessionProvider.js';
|
|
|
5
5
|
export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.js';
|
|
6
6
|
export { userAuthenticationProvider } from './auth/userAuthenticationProvider.js';
|
|
7
7
|
export { getBlobService, getCommunicationService, getDataService, getTemplateService, getWebsiteService, getAIService } from './server-side/getServices.js';
|
|
8
|
-
export { AiMessage } from '@functionalcms/services';
|
|
9
8
|
export type { RedirectResponse } from './auth/RedirectResponse.js';
|
|
10
9
|
export { createMachineTokenApprovedLocals } from './auth/getMachineAccessToken.js';
|
package/dist/index-server.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export { authenticationHandle } from './auth/authenticationHandle.js';
|
|
2
2
|
export { default as authorizationHandle } from './auth/authorizationHandle.js';
|
|
3
3
|
export { default as errorHandler } from './auth/errorHandle.js';
|
|
4
|
-
// export { tokenRefreshHandle } from './auth/tokenRefreshHandle.js';
|
|
5
|
-
// export { getStandardHandle } from './auth/standardPipeline.js';
|
|
6
4
|
export { redisSessionProvider } from './auth/redisSessionProvider.js';
|
|
7
5
|
export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.js';
|
|
8
6
|
export { userAuthenticationProvider } from './auth/userAuthenticationProvider.js';
|
|
9
7
|
export { getBlobService, getCommunicationService, getDataService, getTemplateService, getWebsiteService, getAIService } from './server-side/getServices.js';
|
|
10
|
-
export { AiMessage } from '@functionalcms/services';
|
|
11
8
|
export { createMachineTokenApprovedLocals } from './auth/getMachineAccessToken.js';
|