lutra 0.0.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/README.md +29 -0
- package/dist/Data/Stat.svelte +89 -0
- package/dist/Data/Stat.svelte.d.ts +33 -0
- package/dist/DataTable/DataTable.svelte +36 -0
- package/dist/DataTable/DataTable.svelte.d.ts +19 -0
- package/dist/DataTable/DataTableColumn.svelte +20 -0
- package/dist/DataTable/DataTableColumn.svelte.d.ts +18 -0
- package/dist/DataTable/DataTableRow.svelte +28 -0
- package/dist/DataTable/DataTableRow.svelte.d.ts +18 -0
- package/dist/Display/Avatar.svelte +61 -0
- package/dist/Display/Avatar.svelte.d.ts +18 -0
- package/dist/Display/Badge.svelte +93 -0
- package/dist/Display/Badge.svelte.d.ts +30 -0
- package/dist/Display/Callout.svelte +105 -0
- package/dist/Display/Callout.svelte.d.ts +34 -0
- package/dist/Display/Code.svelte +195 -0
- package/dist/Display/Code.svelte.d.ts +29 -0
- package/dist/Display/ContextTip.svelte +23 -0
- package/dist/Display/ContextTip.svelte.d.ts +17 -0
- package/dist/Display/Details.svelte +49 -0
- package/dist/Display/Details.svelte.d.ts +26 -0
- package/dist/Display/Hero.svelte +50 -0
- package/dist/Display/Hero.svelte.d.ts +25 -0
- package/dist/Display/Icon.svelte +35 -0
- package/dist/Display/Icon.svelte.d.ts +18 -0
- package/dist/Display/IconButton.svelte +85 -0
- package/dist/Display/IconButton.svelte.d.ts +28 -0
- package/dist/Display/Indicator.svelte +352 -0
- package/dist/Display/Indicator.svelte.d.ts +22 -0
- package/dist/Display/Popup.svelte +111 -0
- package/dist/Display/Popup.svelte.d.ts +26 -0
- package/dist/Display/Tag.svelte +90 -0
- package/dist/Display/Tag.svelte.d.ts +31 -0
- package/dist/Display/Tooltip.svelte +96 -0
- package/dist/Display/Tooltip.svelte.d.ts +22 -0
- package/dist/Form/Button.svelte +34 -0
- package/dist/Form/Button.svelte.d.ts +24 -0
- package/dist/Form/FieldActions.svelte +25 -0
- package/dist/Form/FieldActions.svelte.d.ts +17 -0
- package/dist/Form/FieldContainer.svelte +31 -0
- package/dist/Form/FieldContainer.svelte.d.ts +18 -0
- package/dist/Form/FieldContent.svelte +78 -0
- package/dist/Form/FieldContent.svelte.d.ts +32 -0
- package/dist/Form/FieldSection.svelte +97 -0
- package/dist/Form/FieldSection.svelte.d.ts +23 -0
- package/dist/Form/Fieldset.svelte +63 -0
- package/dist/Form/Fieldset.svelte.d.ts +32 -0
- package/dist/Form/Form.svelte +19 -0
- package/dist/Form/Form.svelte.d.ts +18 -0
- package/dist/Form/Input.svelte +266 -0
- package/dist/Form/Input.svelte.d.ts +113 -0
- package/dist/Form/InputLength.svelte +32 -0
- package/dist/Form/InputLength.svelte.d.ts +19 -0
- package/dist/Form/Label.svelte +26 -0
- package/dist/Form/Label.svelte.d.ts +25 -0
- package/dist/Form/Select.svelte +24 -0
- package/dist/Form/Select.svelte.d.ts +28 -0
- package/dist/Form/form.d.ts +34 -0
- package/dist/Form/form.js +31 -0
- package/dist/Form/types.d.ts +4 -0
- package/dist/Form/types.js +1 -0
- package/dist/Grid/Column.svelte +11 -0
- package/dist/Grid/Column.svelte.d.ts +17 -0
- package/dist/Grid/Grid.svelte +19 -0
- package/dist/Grid/Grid.svelte.d.ts +18 -0
- package/dist/Grid/Row.svelte +44 -0
- package/dist/Grid/Row.svelte.d.ts +19 -0
- package/dist/Icons/Alert.svelte +3 -0
- package/dist/Icons/Alert.svelte.d.ts +23 -0
- package/dist/Icons/Copy.svelte +3 -0
- package/dist/Icons/Copy.svelte.d.ts +23 -0
- package/dist/Icons/Done.svelte +3 -0
- package/dist/Icons/Done.svelte.d.ts +23 -0
- package/dist/Icons/Error.svelte +3 -0
- package/dist/Icons/Error.svelte.d.ts +23 -0
- package/dist/Icons/Help.svelte +3 -0
- package/dist/Icons/Help.svelte.d.ts +23 -0
- package/dist/Icons/Hide.svelte +3 -0
- package/dist/Icons/Hide.svelte.d.ts +23 -0
- package/dist/Icons/Info.svelte +3 -0
- package/dist/Icons/Info.svelte.d.ts +23 -0
- package/dist/Icons/Link.svelte +3 -0
- package/dist/Icons/Link.svelte.d.ts +23 -0
- package/dist/Icons/Show.svelte +3 -0
- package/dist/Icons/Show.svelte.d.ts +23 -0
- package/dist/Icons/Success.svelte +3 -0
- package/dist/Icons/Success.svelte.d.ts +23 -0
- package/dist/Icons/Warning.svelte +3 -0
- package/dist/Icons/Warning.svelte.d.ts +23 -0
- package/dist/Layout/Layout.svelte +43 -0
- package/dist/Layout/Layout.svelte.d.ts +21 -0
- package/dist/Layout/LayoutFooter.svelte +21 -0
- package/dist/Layout/LayoutFooter.svelte.d.ts +17 -0
- package/dist/Layout/LayoutGrid.svelte +51 -0
- package/dist/Layout/LayoutGrid.svelte.d.ts +30 -0
- package/dist/Layout/LayoutHeader.svelte +94 -0
- package/dist/Layout/LayoutHeader.svelte.d.ts +38 -0
- package/dist/Layout/LayoutTypes.svelte.d.ts +15 -0
- package/dist/Layout/LayoutTypes.svelte.js +9 -0
- package/dist/Layout/PageContent.svelte +89 -0
- package/dist/Layout/PageContent.svelte.d.ts +23 -0
- package/dist/Layout/Theme.svelte +215 -0
- package/dist/Layout/Theme.svelte.d.ts +18 -0
- package/dist/Layout/UIContent.svelte +15 -0
- package/dist/Layout/UIContent.svelte.d.ts +17 -0
- package/dist/Navigation/Breadcrumb.svelte +82 -0
- package/dist/Navigation/Breadcrumb.svelte.d.ts +29 -0
- package/dist/Navigation/Menu.svelte +180 -0
- package/dist/Navigation/Menu.svelte.d.ts +18 -0
- package/dist/Navigation/MenuTypes.svelte.d.ts +37 -0
- package/dist/Navigation/MenuTypes.svelte.js +1 -0
- package/dist/Navigation/TabbedContent.svelte +43 -0
- package/dist/Navigation/TabbedContent.svelte.d.ts +22 -0
- package/dist/Navigation/Tabs.svelte +118 -0
- package/dist/Navigation/Tabs.svelte.d.ts +24 -0
- package/dist/Pages/LoginPage.svelte +32 -0
- package/dist/Pages/LoginPage.svelte.d.ts +14 -0
- package/dist/Typography/Clamp.svelte +25 -0
- package/dist/Typography/Clamp.svelte.d.ts +23 -0
- package/dist/Typography/H.svelte +51 -0
- package/dist/Typography/H.svelte.d.ts +25 -0
- package/dist/Typography/H1.svelte +14 -0
- package/dist/Typography/H1.svelte.d.ts +23 -0
- package/dist/Typography/H2.svelte +13 -0
- package/dist/Typography/H2.svelte.d.ts +23 -0
- package/dist/Typography/H3.svelte +13 -0
- package/dist/Typography/H3.svelte.d.ts +23 -0
- package/dist/Typography/H4.svelte +13 -0
- package/dist/Typography/H4.svelte.d.ts +23 -0
- package/dist/Typography/H5.svelte +13 -0
- package/dist/Typography/H5.svelte.d.ts +23 -0
- package/dist/Typography/H6.svelte +13 -0
- package/dist/Typography/H6.svelte.d.ts +23 -0
- package/dist/Typography/P.svelte +32 -0
- package/dist/Typography/P.svelte.d.ts +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/style.css +787 -0
- package/dist/utils/attr.d.ts +5 -0
- package/dist/utils/attr.js +21 -0
- package/dist/utils/color.d.ts +51 -0
- package/dist/utils/color.js +97 -0
- package/dist/utils/defaults.d.ts +4 -0
- package/dist/utils/defaults.js +1 -0
- package/dist/utils/hooks.server.d.ts +2 -0
- package/dist/utils/hooks.server.js +16 -0
- package/dist/utils/id.d.ts +1 -0
- package/dist/utils/id.js +3 -0
- package/dist/utils/isSnippet.d.ts +5 -0
- package/dist/utils/isSnippet.js +6 -0
- package/dist/utils/transitions.d.ts +29 -0
- package/dist/utils/transitions.js +66 -0
- package/package.json +58 -0
@@ -0,0 +1,180 @@
|
|
1
|
+
<script>import { page } from "$app/stores";
|
2
|
+
let {
|
3
|
+
items
|
4
|
+
} = $props();
|
5
|
+
function parseHref(href) {
|
6
|
+
if (!href)
|
7
|
+
return {
|
8
|
+
href: void 0,
|
9
|
+
exact: false
|
10
|
+
};
|
11
|
+
if (href.endsWith("*")) {
|
12
|
+
return {
|
13
|
+
href: href.slice(0, -1),
|
14
|
+
exact: false
|
15
|
+
};
|
16
|
+
}
|
17
|
+
return {
|
18
|
+
href,
|
19
|
+
exact: true
|
20
|
+
};
|
21
|
+
}
|
22
|
+
function parseLinks(items2) {
|
23
|
+
return items2.map((item) => {
|
24
|
+
if (item.href) {
|
25
|
+
return {
|
26
|
+
...item,
|
27
|
+
...parseHref(item.href)
|
28
|
+
};
|
29
|
+
}
|
30
|
+
if (!item.children)
|
31
|
+
return item;
|
32
|
+
return {
|
33
|
+
...item,
|
34
|
+
children: parseLinks(item.children)
|
35
|
+
};
|
36
|
+
});
|
37
|
+
}
|
38
|
+
const parsedItems = parseLinks(items);
|
39
|
+
</script>
|
40
|
+
|
41
|
+
<nav>
|
42
|
+
<ul>
|
43
|
+
{#snippet link(i)}
|
44
|
+
<li aria-current={i.exact ? ($page?.url?.pathname === i.href ? 'page' : undefined) : ($page?.url?.pathname?.startsWith(i.href) ? 'page' : undefined)}>
|
45
|
+
{#if i.href}
|
46
|
+
<a href={i.href}>
|
47
|
+
{#if i.icon}
|
48
|
+
<svelte:component this={i.icon} />
|
49
|
+
{/if}
|
50
|
+
{i.label}
|
51
|
+
</a>
|
52
|
+
{:else}
|
53
|
+
<span>
|
54
|
+
{#if i.icon}
|
55
|
+
<svelte:component this={i.icon} />
|
56
|
+
{/if}
|
57
|
+
{i.label}
|
58
|
+
</span>
|
59
|
+
{/if}
|
60
|
+
{#if i.children}
|
61
|
+
<ul>
|
62
|
+
{#each i.children as child}
|
63
|
+
{@render link(child)}
|
64
|
+
{/each}
|
65
|
+
</ul>
|
66
|
+
{/if}
|
67
|
+
</li>
|
68
|
+
{/snippet}
|
69
|
+
{#each parsedItems as item, index}
|
70
|
+
{@render link(item)}
|
71
|
+
{/each}
|
72
|
+
</ul>
|
73
|
+
</nav>
|
74
|
+
|
75
|
+
<style>
|
76
|
+
nav {
|
77
|
+
}
|
78
|
+
ul {
|
79
|
+
display: flex;
|
80
|
+
list-style: none;
|
81
|
+
padding: 0;
|
82
|
+
margin: 0;
|
83
|
+
}
|
84
|
+
a, span {
|
85
|
+
display: flex;
|
86
|
+
align-items: center;
|
87
|
+
padding: 0.5rem 0.75rem;
|
88
|
+
text-decoration: none;
|
89
|
+
font-weight: 500;
|
90
|
+
color: var(--menu-link);
|
91
|
+
}
|
92
|
+
a:hover, span:hover {
|
93
|
+
background: var(--menu-bg-hover);
|
94
|
+
color: var(--menu-link-hover);
|
95
|
+
}
|
96
|
+
/** loop */
|
97
|
+
ul > li > ul {
|
98
|
+
display: none;
|
99
|
+
position: absolute;
|
100
|
+
flex-direction: column;
|
101
|
+
top: 100%;
|
102
|
+
left: 0;
|
103
|
+
background: var(--menu-bg);
|
104
|
+
border: var(--menu-border);
|
105
|
+
}
|
106
|
+
ul > li:hover > ul,
|
107
|
+
ul > li:focus-within > ul {
|
108
|
+
display: flex;
|
109
|
+
}
|
110
|
+
ul > li:hover,
|
111
|
+
ul > li:focus-within {
|
112
|
+
background: var(--menu-bg-hover);
|
113
|
+
}
|
114
|
+
ul > li:hover > a,
|
115
|
+
ul > li:focus-within > a,
|
116
|
+
ul > li:hover > span,
|
117
|
+
ul > li:focus-within > span {
|
118
|
+
color: var(--menu-link-hover);
|
119
|
+
}
|
120
|
+
|
121
|
+
ul > li {
|
122
|
+
border-block-end: var(--menu-border);
|
123
|
+
position: relative;
|
124
|
+
white-space: nowrap;
|
125
|
+
}
|
126
|
+
ul > li:last-child {
|
127
|
+
border-block-end: none;
|
128
|
+
}
|
129
|
+
ul > li > ul {
|
130
|
+
left: 100%;
|
131
|
+
top: -1px;
|
132
|
+
}
|
133
|
+
ul > li:has(ul) > a {
|
134
|
+
padding-inline-end: 2rem;
|
135
|
+
}
|
136
|
+
ul > li:has(ul) > a::after {
|
137
|
+
content: "▶";
|
138
|
+
padding-inline-start: 0.5rem;
|
139
|
+
font-size: 9px;
|
140
|
+
position: absolute;
|
141
|
+
right: 0.75rem;
|
142
|
+
color: var(--menu-link);
|
143
|
+
}
|
144
|
+
/** top level */
|
145
|
+
nav > ul {
|
146
|
+
flex-direction: row;
|
147
|
+
gap: 1px;
|
148
|
+
position: relative;
|
149
|
+
}
|
150
|
+
nav > ul > li {
|
151
|
+
border-block-end: none;
|
152
|
+
}
|
153
|
+
nav > ul > li > a {
|
154
|
+
border-radius: var(--border-radius);
|
155
|
+
}
|
156
|
+
nav > ul > li > a:hover {
|
157
|
+
border-radius: var(--border-radius);
|
158
|
+
}
|
159
|
+
nav > ul > li > ul {
|
160
|
+
top: 100%;
|
161
|
+
left: 0;
|
162
|
+
background: var(--menu-bg);
|
163
|
+
border: var(--menu-border);
|
164
|
+
filter: drop-shadow(0 0.25rem 0.5rem var(--shadow));
|
165
|
+
}
|
166
|
+
nav > ul > li:has(ul) > a {
|
167
|
+
padding: 0.75rem 1rem;
|
168
|
+
}
|
169
|
+
nav > ul > li:has(ul) > a::after {
|
170
|
+
content: "";
|
171
|
+
padding: 0;
|
172
|
+
}
|
173
|
+
ul > li[aria-current="page"] a {
|
174
|
+
background: var(--menu-bg-active);
|
175
|
+
color: var(--menu-link-active);
|
176
|
+
}
|
177
|
+
ul > li[aria-current="page"] a:hover {
|
178
|
+
color: var(--menu-link-active-hover);
|
179
|
+
}
|
180
|
+
</style>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
import type { MenuItem } from "./MenuTypes.svelte.js";
|
3
|
+
declare const __propDef: {
|
4
|
+
props: {
|
5
|
+
/** Menu items to display */
|
6
|
+
items: MenuItem[];
|
7
|
+
};
|
8
|
+
events: {
|
9
|
+
[evt: string]: CustomEvent<any>;
|
10
|
+
};
|
11
|
+
slots: {};
|
12
|
+
};
|
13
|
+
export type MenuProps = typeof __propDef.props;
|
14
|
+
export type MenuEvents = typeof __propDef.events;
|
15
|
+
export type MenuSlots = typeof __propDef.slots;
|
16
|
+
export default class Menu extends SvelteComponent<MenuProps, MenuEvents, MenuSlots> {
|
17
|
+
}
|
18
|
+
export {};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import type { ComponentType, Snippet } from "svelte";
|
2
|
+
export type MenuItem = {
|
3
|
+
/** Text label of the item to display to the user. */
|
4
|
+
label: string;
|
5
|
+
/** Path or URL to use for the menu item. If the href ends with a star (*), it will match any path that starts with the given path. This allows for nested active menu items. */
|
6
|
+
href?: string;
|
7
|
+
/** Icon to display. Pass either a Svelte Component or an URL. Use the Icon component to recolor your icons according to the user theme. */
|
8
|
+
icon?: string | ComponentType;
|
9
|
+
/** Menu item children. Pass an array of menu items to create a nested menu. */
|
10
|
+
children?: MenuItem[];
|
11
|
+
};
|
12
|
+
export type TabItem = {
|
13
|
+
/** Text label of the item to display to the user. */
|
14
|
+
label: string;
|
15
|
+
/** Path or URL to use for the item. If the href ends with a star (*), it will match any path that starts with the given path. This allows for nested active items. */
|
16
|
+
href: string;
|
17
|
+
/** Click event handler. */
|
18
|
+
onclick?: (event: MouseEvent, item: TabItem, index: number) => void;
|
19
|
+
/** If true, overrides the currently selected item. */
|
20
|
+
active?: boolean;
|
21
|
+
};
|
22
|
+
export type TabbedContentItem = {
|
23
|
+
/** Text label of the item to display to the user. */
|
24
|
+
label: string;
|
25
|
+
/** URL hash to use for the item. */
|
26
|
+
hash?: string;
|
27
|
+
/** Content to display when the item is selected. */
|
28
|
+
content: Snippet;
|
29
|
+
};
|
30
|
+
export type BreadcrumbItem = {
|
31
|
+
/** Text label of the item to display to the user. */
|
32
|
+
label: string;
|
33
|
+
/** Icon to display. Pass either a Svelte Component or an URL. Use the Icon component to recolor your icons according to the user theme. */
|
34
|
+
icon?: string | ComponentType;
|
35
|
+
/** Path or URL to use for the breadcrumb item. */
|
36
|
+
href?: string;
|
37
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<script>import { page } from "$app/stores";
|
2
|
+
import Tabs from "./Tabs.svelte";
|
3
|
+
const {
|
4
|
+
items,
|
5
|
+
contained,
|
6
|
+
rounded
|
7
|
+
} = $props();
|
8
|
+
function formatHash(hash) {
|
9
|
+
hash = hash.toLowerCase().replace(/\s/g, "-");
|
10
|
+
if (!hash.startsWith("#")) {
|
11
|
+
hash = `#${hash}`;
|
12
|
+
}
|
13
|
+
return hash;
|
14
|
+
}
|
15
|
+
;
|
16
|
+
let itemsWithHref = $derived(items.map((item, index) => {
|
17
|
+
const href = item.hash ? formatHash(item.hash) : `#${item.label.toLowerCase().replace(/\s/g, "-")}`;
|
18
|
+
return {
|
19
|
+
content: item.content,
|
20
|
+
label: item.label,
|
21
|
+
href,
|
22
|
+
active: $page.url?.hash === href
|
23
|
+
};
|
24
|
+
}));
|
25
|
+
let activeItem = $derived(itemsWithHref.find((item) => item.active) || itemsWithHref[0]);
|
26
|
+
let activeContent = $derived(activeItem?.content);
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<div>
|
30
|
+
<Tabs items={itemsWithHref} {contained} {rounded} />
|
31
|
+
|
32
|
+
{#if activeContent}
|
33
|
+
{@render activeContent()}
|
34
|
+
{/if}
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<style>
|
38
|
+
div {
|
39
|
+
display: flex;
|
40
|
+
flex-direction: column;
|
41
|
+
gap: var(--gap, 1.5rem);
|
42
|
+
}
|
43
|
+
</style>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
import type { TabbedContentItem } from "./MenuTypes.svelte.js";
|
3
|
+
declare const __propDef: {
|
4
|
+
props: {
|
5
|
+
/** Tab items to display. */
|
6
|
+
items: TabbedContentItem[];
|
7
|
+
/** Contain the element in a box. */
|
8
|
+
contained?: boolean | undefined;
|
9
|
+
/** Round the corners of the element if contained. */
|
10
|
+
rounded?: boolean | undefined;
|
11
|
+
};
|
12
|
+
events: {
|
13
|
+
[evt: string]: CustomEvent<any>;
|
14
|
+
};
|
15
|
+
slots: {};
|
16
|
+
};
|
17
|
+
export type TabbedContentProps = typeof __propDef.props;
|
18
|
+
export type TabbedContentEvents = typeof __propDef.events;
|
19
|
+
export type TabbedContentSlots = typeof __propDef.slots;
|
20
|
+
export default class TabbedContent extends SvelteComponent<TabbedContentProps, TabbedContentEvents, TabbedContentSlots> {
|
21
|
+
}
|
22
|
+
export {};
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<script>const {
|
2
|
+
items,
|
3
|
+
underline,
|
4
|
+
contained,
|
5
|
+
rounded
|
6
|
+
} = $props();
|
7
|
+
function onClickButton(event, item, index) {
|
8
|
+
}
|
9
|
+
</script>
|
10
|
+
|
11
|
+
<nav class="Tabs" class:contained class:rounded>
|
12
|
+
<menu>
|
13
|
+
{#each items as item, index}
|
14
|
+
<li data-index={index} aria-current={item.active ? 'page' : undefined}>
|
15
|
+
{#if item.href}
|
16
|
+
<a draggable="false" href={item.href}>
|
17
|
+
{item.label}
|
18
|
+
</a>
|
19
|
+
{:else if item.onclick}
|
20
|
+
<button draggable="false" onclick={(event) => onClickButton(event, item, index)}>
|
21
|
+
{item.label}
|
22
|
+
</button>
|
23
|
+
{/if}
|
24
|
+
</li>
|
25
|
+
{/each}
|
26
|
+
<div class="Underline"></div>
|
27
|
+
</menu>
|
28
|
+
</nav>
|
29
|
+
|
30
|
+
<style>
|
31
|
+
.Tabs {
|
32
|
+
display: flex;
|
33
|
+
z-index: 2;
|
34
|
+
background: var(--menu-bg);
|
35
|
+
overflow: clip;
|
36
|
+
}
|
37
|
+
.Tabs.contained {
|
38
|
+
border: var(--menu-border);
|
39
|
+
}
|
40
|
+
.Tabs.rounded {
|
41
|
+
border-radius: var(--border-radius);
|
42
|
+
}
|
43
|
+
menu, li {
|
44
|
+
list-style: none;
|
45
|
+
margin: 0;
|
46
|
+
}
|
47
|
+
menu {
|
48
|
+
position: relative;
|
49
|
+
display: flex;
|
50
|
+
flex-direction: row;
|
51
|
+
flex-wrap: nowrap;
|
52
|
+
align-items: center;
|
53
|
+
justify-content: flex-start;
|
54
|
+
padding: 0;
|
55
|
+
gap: 1rem;
|
56
|
+
inline-size: 100%;
|
57
|
+
border-block-end: var(--menu-border);
|
58
|
+
}
|
59
|
+
.Tabs.contained menu {
|
60
|
+
gap: 0;
|
61
|
+
flex-grow: 1;
|
62
|
+
justify-content: stretch;
|
63
|
+
border-block-end: 0;
|
64
|
+
}
|
65
|
+
a,
|
66
|
+
button {
|
67
|
+
display: block;
|
68
|
+
padding: 0.75rem 0.5rem;
|
69
|
+
color: var(--menu-link);
|
70
|
+
transition: all var(--menu-trans);
|
71
|
+
font-weight: 500;
|
72
|
+
letter-spacing: -0.05ch;
|
73
|
+
background: transparent;
|
74
|
+
border: none;
|
75
|
+
border-block-end: 2px solid transparent;
|
76
|
+
cursor: pointer;
|
77
|
+
text-decoration: none;
|
78
|
+
}
|
79
|
+
.Tabs.contained li {
|
80
|
+
flex-grow: 1;
|
81
|
+
border-inline-end: var(--menu-border);
|
82
|
+
flex-basis: auto;
|
83
|
+
}
|
84
|
+
.Tabs.contained menu li:last-of-type {
|
85
|
+
border-inline-end: 0;
|
86
|
+
}
|
87
|
+
.Tabs.contained a,
|
88
|
+
.Tabs.contained button {
|
89
|
+
flex-grow: 1;
|
90
|
+
inline-size: 100%;
|
91
|
+
text-align: center;
|
92
|
+
padding-block-start: calc(0.75rem + 3px);
|
93
|
+
color: var(--menu-link);
|
94
|
+
font-weight: 600;
|
95
|
+
}
|
96
|
+
a:hover,
|
97
|
+
button:hover {
|
98
|
+
background: var(--menu-bg-hover);
|
99
|
+
color: var(--menu-link-hover);
|
100
|
+
}
|
101
|
+
li[aria-current="page"] a,
|
102
|
+
li[aria-current="page"] button {
|
103
|
+
background: var(--menu-bg-active);
|
104
|
+
color: var(--menu-link-active);
|
105
|
+
opacity: 1;
|
106
|
+
border-block-end: 2px solid var(--menu-link-active);
|
107
|
+
}
|
108
|
+
.Underline {
|
109
|
+
inline-size: 0px;
|
110
|
+
block-size: 2px;
|
111
|
+
background-color: var(--menu-link-active);
|
112
|
+
position: absolute;
|
113
|
+
bottom: 0;
|
114
|
+
left: 0;
|
115
|
+
transition: all 0.3s ease-in-out;
|
116
|
+
opacity: 0;
|
117
|
+
}
|
118
|
+
</style>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
import type { TabItem } from "./MenuTypes.svelte.js";
|
3
|
+
declare const __propDef: {
|
4
|
+
props: {
|
5
|
+
/** Tab items to display. */
|
6
|
+
items: TabItem[];
|
7
|
+
/** Underline the active tab. The underline will slide to the selected tab unless reduced motion is enabled. */
|
8
|
+
underline?: boolean | undefined;
|
9
|
+
/** Contain the element in a box. */
|
10
|
+
contained?: boolean | undefined;
|
11
|
+
/** Round the corners of the element if contained. */
|
12
|
+
rounded?: boolean | undefined;
|
13
|
+
};
|
14
|
+
events: {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
};
|
17
|
+
slots: {};
|
18
|
+
};
|
19
|
+
export type TabsProps = typeof __propDef.props;
|
20
|
+
export type TabsEvents = typeof __propDef.events;
|
21
|
+
export type TabsSlots = typeof __propDef.slots;
|
22
|
+
export default class Tabs extends SvelteComponent<TabsProps, TabsEvents, TabsSlots> {
|
23
|
+
}
|
24
|
+
export {};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<script>import Logo from "../../components/Logo.svelte";
|
2
|
+
import Icon from "../Display/Icon.svelte";
|
3
|
+
import Button from "../Form/Button.svelte";
|
4
|
+
import FieldActions from "../Form/FieldActions.svelte";
|
5
|
+
import FieldContainer from "../Form/FieldContainer.svelte";
|
6
|
+
import FieldSection from "../Form/FieldSection.svelte";
|
7
|
+
import Fieldset from "../Form/Fieldset.svelte";
|
8
|
+
import Form from "../Form/Form.svelte";
|
9
|
+
import Input from "../Form/Input.svelte";
|
10
|
+
import PageContent from "../Layout/PageContent.svelte";
|
11
|
+
import H1 from "../Typography/H1.svelte";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<PageContent center middle pad --max-inline-size="420px">
|
15
|
+
<H1 center>
|
16
|
+
Log in
|
17
|
+
</H1>
|
18
|
+
<Form>
|
19
|
+
<FieldContainer contained --font-size="1.25em">
|
20
|
+
<FieldSection>
|
21
|
+
<Fieldset>
|
22
|
+
<Input type="email" autocomplete="email" placeholder="Email" name="email" />
|
23
|
+
<Input type="password" name="password" placeholder="Your password" />
|
24
|
+
</Fieldset>
|
25
|
+
</FieldSection>
|
26
|
+
<FieldActions>
|
27
|
+
<Button type="submit">Log in</Button>
|
28
|
+
<a href="/forgot-password">Forgot your password?</a>
|
29
|
+
</FieldActions>
|
30
|
+
</FieldContainer>
|
31
|
+
</Form>
|
32
|
+
</PageContent>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
declare const __propDef: {
|
3
|
+
props: Record<string, never>;
|
4
|
+
events: {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
};
|
7
|
+
slots: {};
|
8
|
+
};
|
9
|
+
export type LoginPageProps = typeof __propDef.props;
|
10
|
+
export type LoginPageEvents = typeof __propDef.events;
|
11
|
+
export type LoginPageSlots = typeof __propDef.slots;
|
12
|
+
export default class LoginPage extends SvelteComponent<LoginPageProps, LoginPageEvents, LoginPageSlots> {
|
13
|
+
}
|
14
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script>import { setContext } from "svelte";
|
2
|
+
let {
|
3
|
+
children,
|
4
|
+
inline,
|
5
|
+
block,
|
6
|
+
clip
|
7
|
+
} = $props();
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<div class="Clamp" class:clip style="{inline ? '--clampInline: '+inline : ''} {block ? '--clampBlock: '+block : ''}">
|
11
|
+
{@render children()}
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<style>
|
15
|
+
.Clamp {
|
16
|
+
max-inline-size: var(--clampInline, inherit);
|
17
|
+
max-block-size: var(--clampBlock, inherit);
|
18
|
+
}
|
19
|
+
.Clamp.clip {
|
20
|
+
white-space: nowrap;
|
21
|
+
overflow: hidden;
|
22
|
+
text-overflow: ellipsis;
|
23
|
+
container-type: inline-size;
|
24
|
+
}
|
25
|
+
</style>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
import { type Snippet } from "svelte";
|
3
|
+
declare const __propDef: {
|
4
|
+
props: {
|
5
|
+
children: Snippet;
|
6
|
+
/** Clamp in the logical inline direction */
|
7
|
+
inline?: string | undefined;
|
8
|
+
/** Clamp in the logical block direction */
|
9
|
+
block?: string | undefined;
|
10
|
+
/** Clip the text */
|
11
|
+
clip?: boolean | undefined;
|
12
|
+
};
|
13
|
+
events: {
|
14
|
+
[evt: string]: CustomEvent<any>;
|
15
|
+
};
|
16
|
+
slots: {};
|
17
|
+
};
|
18
|
+
export type ClampProps = typeof __propDef.props;
|
19
|
+
export type ClampEvents = typeof __propDef.events;
|
20
|
+
export type ClampSlots = typeof __propDef.slots;
|
21
|
+
export default class Clamp extends SvelteComponent<ClampProps, ClampEvents, ClampSlots> {
|
22
|
+
}
|
23
|
+
export {};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<script>import {} from "svelte";
|
2
|
+
let {
|
3
|
+
children,
|
4
|
+
level = 1,
|
5
|
+
center = false,
|
6
|
+
subtle = false,
|
7
|
+
hr = false
|
8
|
+
} = $props();
|
9
|
+
const Tag = `h${level}`;
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<svelte:element this={Tag} class:subtle class:hr class:center class="H Level-{level}">
|
13
|
+
{@render children()}
|
14
|
+
</svelte:element>
|
15
|
+
|
16
|
+
<style>
|
17
|
+
.center {
|
18
|
+
text-align: center;
|
19
|
+
}
|
20
|
+
.subtle {
|
21
|
+
color: var(--text-subtle);
|
22
|
+
}
|
23
|
+
.hr {
|
24
|
+
border-block-end: var(--border);
|
25
|
+
}
|
26
|
+
.Level-1.hr {
|
27
|
+
padding-block-end: 2rem;
|
28
|
+
margin-block-end: 1rem;
|
29
|
+
border-block-end: var(--border);
|
30
|
+
}
|
31
|
+
.Level-2.hr {
|
32
|
+
padding-block-end: 1.5rem;
|
33
|
+
margin-block-end: 0.75rem;
|
34
|
+
}
|
35
|
+
.Level-3.hr {
|
36
|
+
padding-block-end: 1rem;
|
37
|
+
margin-block-end: 0.5rem;
|
38
|
+
}
|
39
|
+
.Level-4.hr {
|
40
|
+
padding-block-end: 0.75rem;
|
41
|
+
margin-block-end: 0.75rem;
|
42
|
+
}
|
43
|
+
.Level-5.hr {
|
44
|
+
padding-block-end: 0.75rem;
|
45
|
+
margin-block-end: 0.25rem;
|
46
|
+
}
|
47
|
+
.Level-6.hr {
|
48
|
+
padding-block-end: 0.5rem;
|
49
|
+
margin-block-end: 0.25rem;
|
50
|
+
}
|
51
|
+
</style>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
import { type Snippet } from "svelte";
|
3
|
+
declare const __propDef: {
|
4
|
+
props: {
|
5
|
+
children: Snippet;
|
6
|
+
/** The level of the heading. */
|
7
|
+
level?: 5 | 3 | 2 | 1 | 4 | 6 | undefined;
|
8
|
+
/** Center the text. */
|
9
|
+
center?: boolean | undefined;
|
10
|
+
/** Make the text subtle. */
|
11
|
+
subtle?: boolean | undefined;
|
12
|
+
/** Add a horizontal rule below the text. */
|
13
|
+
hr?: boolean | undefined;
|
14
|
+
};
|
15
|
+
events: {
|
16
|
+
[evt: string]: CustomEvent<any>;
|
17
|
+
};
|
18
|
+
slots: {};
|
19
|
+
};
|
20
|
+
export type HProps = typeof __propDef.props;
|
21
|
+
export type HEvents = typeof __propDef.events;
|
22
|
+
export type HSlots = typeof __propDef.slots;
|
23
|
+
export default class H extends SvelteComponent<HProps, HEvents, HSlots> {
|
24
|
+
}
|
25
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<script>import {} from "svelte";
|
2
|
+
import H from "./H.svelte";
|
3
|
+
let {
|
4
|
+
center = false,
|
5
|
+
hr = false,
|
6
|
+
subtle = false,
|
7
|
+
children
|
8
|
+
} = $props();
|
9
|
+
</script>
|
10
|
+
|
11
|
+
|
12
|
+
<H level={1} center={center} hr={hr} subtle={subtle}>
|
13
|
+
{@render children()}
|
14
|
+
</H>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
2
|
+
import { type Snippet } from "svelte";
|
3
|
+
declare const __propDef: {
|
4
|
+
props: {
|
5
|
+
/** Center the text. */
|
6
|
+
center?: boolean | undefined;
|
7
|
+
/** Add a horizontal rule below the text. */
|
8
|
+
hr?: boolean | undefined;
|
9
|
+
/** Make the text subtle. */
|
10
|
+
subtle?: boolean | undefined;
|
11
|
+
children: Snippet;
|
12
|
+
};
|
13
|
+
events: {
|
14
|
+
[evt: string]: CustomEvent<any>;
|
15
|
+
};
|
16
|
+
slots: {};
|
17
|
+
};
|
18
|
+
export type H1Props = typeof __propDef.props;
|
19
|
+
export type H1Events = typeof __propDef.events;
|
20
|
+
export type H1Slots = typeof __propDef.slots;
|
21
|
+
export default class H1 extends SvelteComponent<H1Props, H1Events, H1Slots> {
|
22
|
+
}
|
23
|
+
export {};
|