lutra 0.0.19 → 0.0.33
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/color.css +0 -0
- package/dist/display/Avatar.svelte +1 -1
- package/dist/display/Avatar.svelte.d.ts +18 -22
- package/dist/display/Badge.svelte +2 -4
- package/dist/display/Badge.svelte.d.ts +28 -32
- package/dist/display/Callout.svelte +8 -8
- package/dist/display/Callout.svelte.d.ts +27 -35
- package/dist/display/Close.svelte.d.ts +17 -20
- package/dist/display/Code.svelte +26 -31
- package/dist/display/Code.svelte.d.ts +31 -30
- package/dist/display/ContextTip.svelte +2 -5
- package/dist/display/ContextTip.svelte.d.ts +16 -20
- package/dist/display/DataList.svelte +16 -0
- package/dist/display/DataList.svelte.d.ts +21 -0
- package/dist/display/Details.svelte.d.ts +25 -30
- package/dist/display/Hero.svelte.d.ts +24 -28
- package/dist/display/Icon.svelte +3 -4
- package/dist/display/Icon.svelte.d.ts +18 -23
- package/dist/display/IconButton.svelte +12 -5
- package/dist/display/IconButton.svelte.d.ts +26 -29
- package/dist/display/Image.svelte.d.ts +25 -36
- package/dist/display/Indicator.svelte.d.ts +21 -22
- package/dist/display/Inset.svelte.d.ts +16 -20
- package/dist/display/LineChart.svelte +385 -0
- package/dist/display/LineChart.svelte.d.ts +24 -0
- package/dist/display/LoadingIndicator.svelte +33 -0
- package/dist/display/LoadingIndicator.svelte.d.ts +15 -0
- package/dist/display/Modal.svelte +116 -0
- package/dist/display/Modal.svelte.d.ts +27 -0
- package/dist/display/Notification.svelte.d.ts +22 -41
- package/dist/display/Panel.svelte +23 -0
- package/dist/display/Panel.svelte.d.ts +19 -0
- package/dist/display/Popup.svelte.d.ts +23 -28
- package/dist/{data → display}/Stat.svelte +9 -17
- package/dist/display/Stat.svelte.d.ts +30 -0
- package/dist/display/Table.svelte +14 -10
- package/dist/display/Table.svelte.d.ts +22 -32
- package/dist/display/TablePaginator.svelte +51 -0
- package/dist/display/TablePaginator.svelte.d.ts +21 -0
- package/dist/display/Tag.svelte.d.ts +29 -32
- package/dist/display/Tooltip.svelte +5 -4
- package/dist/display/Tooltip.svelte.d.ts +21 -26
- package/dist/display/chart.d.ts +78 -0
- package/dist/display/chart.js +212 -0
- package/dist/display/index.d.ts +11 -1
- package/dist/display/index.js +11 -1
- package/dist/display/notifications.svelte.d.ts +3 -3
- package/dist/display/notifications.svelte.js +2 -2
- package/dist/form/Button.svelte +7 -2
- package/dist/form/Button.svelte.d.ts +25 -35
- package/dist/form/FieldActions.svelte +25 -3
- package/dist/form/FieldActions.svelte.d.ts +18 -22
- package/dist/form/FieldContainer.svelte +1 -1
- package/dist/form/FieldContainer.svelte.d.ts +17 -22
- package/dist/form/FieldContent.svelte +52 -33
- package/dist/form/FieldContent.svelte.d.ts +28 -56
- package/dist/form/FieldError.svelte.d.ts +17 -20
- package/dist/form/FieldSection.svelte.d.ts +18 -32
- package/dist/form/Fieldset.svelte.d.ts +29 -40
- package/dist/form/Form.svelte +55 -16
- package/dist/form/Form.svelte.d.ts +36 -31
- package/dist/form/ImageUpload.svelte +259 -0
- package/dist/form/ImageUpload.svelte.d.ts +31 -0
- package/dist/form/Input.svelte +192 -153
- package/dist/form/Input.svelte.d.ts +115 -140
- package/dist/form/InputLength.svelte.d.ts +19 -20
- package/dist/form/Label.svelte +21 -4
- package/dist/form/Label.svelte.d.ts +24 -30
- package/dist/form/LogoUpload.svelte +100 -0
- package/dist/form/LogoUpload.svelte.d.ts +29 -0
- package/dist/form/Select.svelte +84 -36
- package/dist/form/Select.svelte.d.ts +69 -96
- package/dist/form/Textarea.svelte +163 -0
- package/dist/form/Textarea.svelte.d.ts +108 -0
- package/dist/form/Toggle.svelte +2 -0
- package/dist/form/Toggle.svelte.d.ts +15 -0
- package/dist/form/client.svelte.d.ts +8 -9
- package/dist/form/client.svelte.js +18 -10
- package/dist/form/form.d.ts +6 -4
- package/dist/form/form.js +23 -9
- package/dist/form/index.d.ts +6 -3
- package/dist/form/index.js +6 -3
- package/dist/form/types.d.ts +11 -1
- package/dist/icons/IconAlert.svelte.d.ts +23 -0
- package/dist/icons/{Copy.svelte → IconCopy.svelte} +1 -1
- package/dist/icons/IconCopy.svelte.d.ts +23 -0
- package/dist/icons/IconDone.svelte.d.ts +23 -0
- package/dist/icons/IconError.svelte.d.ts +23 -0
- package/dist/icons/IconHelp.svelte.d.ts +23 -0
- package/dist/icons/IconHide.svelte.d.ts +23 -0
- package/dist/icons/IconInfo.svelte.d.ts +23 -0
- package/dist/icons/IconLink.svelte.d.ts +23 -0
- package/dist/icons/IconMenuBurger.svelte.d.ts +23 -0
- package/dist/icons/IconMenuDots.svelte.d.ts +23 -0
- package/dist/icons/IconSearch.svelte +3 -0
- package/dist/icons/IconSearch.svelte.d.ts +23 -0
- package/dist/icons/IconShow.svelte.d.ts +23 -0
- package/dist/icons/IconSuccess.svelte.d.ts +23 -0
- package/dist/icons/IconWarning.svelte.d.ts +23 -0
- package/dist/icons/index.d.ts +14 -11
- package/dist/icons/index.js +14 -11
- package/dist/layout/Layout.svelte +7 -5
- package/dist/layout/Layout.svelte.d.ts +19 -22
- package/dist/layout/LayoutFooter.svelte.d.ts +17 -18
- package/dist/layout/LayoutGrid.svelte.d.ts +25 -36
- package/dist/layout/LayoutHeader.svelte +3 -0
- package/dist/layout/LayoutHeader.svelte.d.ts +33 -38
- package/dist/layout/LayoutSideMenu.svelte +18 -17
- package/dist/layout/LayoutSideMenu.svelte.d.ts +18 -22
- package/dist/layout/Overlay.svelte.d.ts +22 -32
- package/dist/layout/OverlayContainer.svelte.d.ts +14 -15
- package/dist/layout/OverlayLayer.svelte +6 -11
- package/dist/layout/OverlayLayer.svelte.d.ts +17 -20
- package/dist/layout/PageContent.svelte +9 -24
- package/dist/layout/PageContent.svelte.d.ts +23 -26
- package/dist/layout/Theme.svelte +19 -4
- package/dist/layout/Theme.svelte.d.ts +17 -22
- package/dist/layout/UIContent.svelte.d.ts +16 -20
- package/dist/layout/index.d.ts +5 -1
- package/dist/layout/index.js +5 -1
- package/dist/layout/overlays.svelte.d.ts +2 -2
- package/dist/nav/Breadcrumb.svelte +1 -1
- package/dist/nav/Breadcrumb.svelte.d.ts +26 -31
- package/dist/nav/Menu.svelte +6 -13
- package/dist/nav/Menu.svelte.d.ts +25 -31
- package/dist/nav/MenuItem.svelte +15 -8
- package/dist/nav/MenuItem.svelte.d.ts +20 -24
- package/dist/nav/MenuTypes.d.ts +7 -7
- package/dist/nav/NavMenu.svelte +7 -9
- package/dist/nav/NavMenu.svelte.d.ts +17 -18
- package/dist/nav/TabbedContent.svelte +1 -1
- package/dist/nav/TabbedContent.svelte.d.ts +21 -22
- package/dist/nav/Tabs.svelte +53 -13
- package/dist/nav/Tabs.svelte.d.ts +24 -25
- package/dist/nav/index.d.ts +2 -1
- package/dist/nav/index.js +2 -1
- package/dist/style.css +176 -79
- package/dist/typo/Clamp.svelte.d.ts +22 -26
- package/dist/typo/H.svelte.d.ts +26 -30
- package/dist/typo/H1.svelte.d.ts +24 -28
- package/dist/typo/H2.svelte.d.ts +24 -28
- package/dist/typo/H3.svelte.d.ts +24 -28
- package/dist/typo/H4.svelte.d.ts +24 -28
- package/dist/typo/H5.svelte.d.ts +24 -28
- package/dist/typo/H6.svelte.d.ts +24 -28
- package/dist/typo/P.svelte.d.ts +24 -28
- package/dist/utils/StringOrComponent.svelte +14 -0
- package/dist/utils/StringOrComponent.svelte.d.ts +19 -0
- package/dist/utils/StringOrSnippet.svelte +11 -0
- package/dist/utils/StringOrSnippet.svelte.d.ts +19 -0
- package/dist/utils/color.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/isSnippet.d.ts +3 -5
- package/dist/utils/isSnippet.js +9 -4
- package/package.json +32 -25
- package/dist/data/Stat.svelte.d.ts +0 -39
- package/dist/data/index.d.ts +0 -1
- package/dist/data/index.js +0 -1
- package/dist/grid/Column.svelte +0 -11
- package/dist/grid/Column.svelte.d.ts +0 -22
- package/dist/grid/Grid.svelte +0 -19
- package/dist/grid/Grid.svelte.d.ts +0 -24
- package/dist/grid/Row.svelte +0 -44
- package/dist/grid/Row.svelte.d.ts +0 -24
- package/dist/icons/Alert.svelte.d.ts +0 -23
- package/dist/icons/Copy.svelte.d.ts +0 -23
- package/dist/icons/Done.svelte.d.ts +0 -23
- package/dist/icons/Error.svelte.d.ts +0 -23
- package/dist/icons/Help.svelte.d.ts +0 -23
- package/dist/icons/Hide.svelte.d.ts +0 -23
- package/dist/icons/Info.svelte.d.ts +0 -23
- package/dist/icons/Link.svelte.d.ts +0 -23
- package/dist/icons/MenuBurger.svelte.d.ts +0 -23
- package/dist/icons/MenuDots.svelte.d.ts +0 -23
- package/dist/icons/Show.svelte.d.ts +0 -23
- package/dist/icons/Success.svelte.d.ts +0 -23
- package/dist/icons/Warning.svelte.d.ts +0 -23
- package/dist/utils/StringOrComponentOrSnippet.svelte +0 -14
- package/dist/utils/StringOrComponentOrSnippet.svelte.d.ts +0 -24
- /package/dist/icons/{Alert.svelte → IconAlert.svelte} +0 -0
- /package/dist/icons/{Done.svelte → IconDone.svelte} +0 -0
- /package/dist/icons/{Error.svelte → IconError.svelte} +0 -0
- /package/dist/icons/{Help.svelte → IconHelp.svelte} +0 -0
- /package/dist/icons/{Hide.svelte → IconHide.svelte} +0 -0
- /package/dist/icons/{Info.svelte → IconInfo.svelte} +0 -0
- /package/dist/icons/{Link.svelte → IconLink.svelte} +0 -0
- /package/dist/icons/{MenuBurger.svelte → IconMenuBurger.svelte} +0 -0
- /package/dist/icons/{MenuDots.svelte → IconMenuDots.svelte} +0 -0
- /package/dist/icons/{Show.svelte → IconShow.svelte} +0 -0
- /package/dist/icons/{Success.svelte → IconSuccess.svelte} +0 -0
- /package/dist/icons/{Warning.svelte → IconWarning.svelte} +0 -0
package/dist/nav/MenuTypes.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { StatusColorOrString } from "../utils/color.js";
|
2
|
-
import type {
|
2
|
+
import type { Component, Snippet } from "svelte";
|
3
3
|
export type MenuItem = {
|
4
4
|
/** Type of menu item to render. */
|
5
5
|
type: 'divider';
|
@@ -7,18 +7,18 @@ export type MenuItem = {
|
|
7
7
|
/** Type of menu item to render. */
|
8
8
|
type: 'header';
|
9
9
|
/** Text label of the item to display to the user. */
|
10
|
-
content: string |
|
10
|
+
content: string | Snippet;
|
11
11
|
/** Color to use for the item. */
|
12
12
|
color?: StatusColorOrString;
|
13
13
|
} | {
|
14
14
|
/** Type of menu item to render. */
|
15
15
|
type: 'item';
|
16
|
-
/**
|
17
|
-
content: string |
|
16
|
+
/** Content of the item to display to the user. */
|
17
|
+
content: string | Snippet;
|
18
18
|
/** Keyboard shortcut to display next to the item. */
|
19
19
|
shortcut?: string;
|
20
20
|
/** Icon to display. Pass either a Svelte Component or an URL. Use the Icon component to recolor your icons according to the user theme. */
|
21
|
-
icon?: string |
|
21
|
+
icon?: string | Component;
|
22
22
|
/** Path or URL to use for the menu item. */
|
23
23
|
href?: string;
|
24
24
|
/** Click event handler. */
|
@@ -34,7 +34,7 @@ export type TabItem = {
|
|
34
34
|
/** Text label of the item to display to the user. */
|
35
35
|
label: string;
|
36
36
|
/** 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. */
|
37
|
-
href
|
37
|
+
href?: string;
|
38
38
|
/** Click event handler. */
|
39
39
|
onclick?: (event: MouseEvent, item: TabItem, index: number) => void;
|
40
40
|
/** If true, overrides the currently selected item. */
|
@@ -52,7 +52,7 @@ export type BreadcrumbItem = {
|
|
52
52
|
/** Text label of the item to display to the user. */
|
53
53
|
label: string;
|
54
54
|
/** Icon to display. Pass either a Svelte Component or an URL. Use the Icon component to recolor your icons according to the user theme. */
|
55
|
-
icon?: string |
|
55
|
+
icon?: string | Component;
|
56
56
|
/** Path or URL to use for the breadcrumb item. */
|
57
57
|
href?: string;
|
58
58
|
};
|
package/dist/nav/NavMenu.svelte
CHANGED
@@ -4,11 +4,10 @@ let {
|
|
4
4
|
items
|
5
5
|
} = $props();
|
6
6
|
function parseHref(href) {
|
7
|
-
if (!href)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
};
|
7
|
+
if (!href) return {
|
8
|
+
href: void 0,
|
9
|
+
exact: false
|
10
|
+
};
|
12
11
|
if (href.endsWith("*")) {
|
13
12
|
return {
|
14
13
|
href: href.slice(0, -1),
|
@@ -28,8 +27,7 @@ function parseLinks(items2) {
|
|
28
27
|
...parseHref(item.href)
|
29
28
|
};
|
30
29
|
}
|
31
|
-
if (!item.children)
|
32
|
-
return item;
|
30
|
+
if (!item.children) return item;
|
33
31
|
return {
|
34
32
|
...item,
|
35
33
|
children: parseLinks(item.children)
|
@@ -47,14 +45,14 @@ const parsedItems = parseLinks(items);
|
|
47
45
|
{#if i.href}
|
48
46
|
<a href={i.href}>
|
49
47
|
{#if i.icon}
|
50
|
-
<
|
48
|
+
<i.icon />
|
51
49
|
{/if}
|
52
50
|
{i.label}
|
53
51
|
</a>
|
54
52
|
{:else}
|
55
53
|
<span>
|
56
54
|
{#if i.icon}
|
57
|
-
<
|
55
|
+
<i.icon />
|
58
56
|
{/if}
|
59
57
|
{i.label}
|
60
58
|
</span>
|
@@ -1,20 +1,19 @@
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
2
1
|
import type { MenuItem } from "./MenuTypes.js";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
export type NavMenuProps = typeof __propDef.props;
|
13
|
-
export type NavMenuEvents = typeof __propDef.events;
|
14
|
-
export type NavMenuSlots = typeof __propDef.slots;
|
15
|
-
export default class NavMenu extends SvelteComponent<NavMenuProps, NavMenuEvents, NavMenuSlots> {
|
16
|
-
constructor(options?: import("svelte").ComponentConstructorOptions<{
|
17
|
-
items: MenuItem[];
|
18
|
-
}>);
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
4
|
+
$$bindings?: Bindings;
|
5
|
+
} & Exports;
|
6
|
+
(internal: unknown, props: Props & {
|
7
|
+
$$events?: Events;
|
8
|
+
$$slots?: Slots;
|
9
|
+
}): Exports;
|
10
|
+
z_$$bindings?: Bindings;
|
19
11
|
}
|
20
|
-
|
12
|
+
declare const NavMenu: $$__sveltets_2_IsomorphicComponent<{
|
13
|
+
/** Menu items to display */
|
14
|
+
items: MenuItem[];
|
15
|
+
}, {
|
16
|
+
[evt: string]: CustomEvent<any>;
|
17
|
+
}, {}, {}, "">;
|
18
|
+
type NavMenu = InstanceType<typeof NavMenu>;
|
19
|
+
export default NavMenu;
|
@@ -1,24 +1,23 @@
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
2
1
|
import type { TabbedContentItem } from "./MenuTypes.js";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
slots: {};
|
13
|
-
};
|
14
|
-
export type TabbedContentProps = typeof __propDef.props;
|
15
|
-
export type TabbedContentEvents = typeof __propDef.events;
|
16
|
-
export type TabbedContentSlots = typeof __propDef.slots;
|
17
|
-
export default class TabbedContent extends SvelteComponent<TabbedContentProps, TabbedContentEvents, TabbedContentSlots> {
|
18
|
-
constructor(options?: import("svelte").ComponentConstructorOptions<{
|
19
|
-
items: TabbedContentItem[];
|
20
|
-
contained?: boolean | undefined;
|
21
|
-
rounded?: boolean | undefined;
|
22
|
-
}>);
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
4
|
+
$$bindings?: Bindings;
|
5
|
+
} & Exports;
|
6
|
+
(internal: unknown, props: Props & {
|
7
|
+
$$events?: Events;
|
8
|
+
$$slots?: Slots;
|
9
|
+
}): Exports;
|
10
|
+
z_$$bindings?: Bindings;
|
23
11
|
}
|
24
|
-
|
12
|
+
declare const TabbedContent: $$__sveltets_2_IsomorphicComponent<{
|
13
|
+
/** Tab items to display. */
|
14
|
+
items: TabbedContentItem[];
|
15
|
+
/** Contain the element in a box. */
|
16
|
+
contained?: boolean;
|
17
|
+
/** Round the corners of the element if contained. */
|
18
|
+
rounded?: boolean;
|
19
|
+
}, {
|
20
|
+
[evt: string]: CustomEvent<any>;
|
21
|
+
}, {}, {}, "">;
|
22
|
+
type TabbedContent = InstanceType<typeof TabbedContent>;
|
23
|
+
export default TabbedContent;
|
package/dist/nav/Tabs.svelte
CHANGED
@@ -1,19 +1,57 @@
|
|
1
|
-
<script lang="ts">
|
1
|
+
<script lang="ts">import { browser } from "$app/environment";
|
2
|
+
import { page } from "$app/stores";
|
3
|
+
import { onMount } from "svelte";
|
4
|
+
let {
|
2
5
|
items,
|
3
6
|
underline,
|
4
7
|
contained,
|
5
8
|
rounded
|
6
9
|
} = $props();
|
10
|
+
const id = $state(`Tabs-${Math.random().toString(36).slice(2)}`);
|
7
11
|
function onClickButton(event, item, index) {
|
8
12
|
}
|
13
|
+
let activeIndex = $derived.by(() => {
|
14
|
+
return items.findIndex((item, index) => {
|
15
|
+
if (!item.href) return false;
|
16
|
+
if (item.href.endsWith("*")) {
|
17
|
+
return $page.url.pathname.startsWith(item.href.slice(0, -1));
|
18
|
+
} else {
|
19
|
+
return $page.url.pathname.endsWith(item.href);
|
20
|
+
}
|
21
|
+
});
|
22
|
+
});
|
23
|
+
let loaded = $state(false);
|
24
|
+
onMount(async () => {
|
25
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
26
|
+
loaded = true;
|
27
|
+
});
|
28
|
+
let underlineStyle = $derived.by(() => {
|
29
|
+
if (browser && underline && loaded) {
|
30
|
+
let active = items[activeIndex];
|
31
|
+
let activeElement = document.querySelector(`#${id} li[data-index="${activeIndex}"]`);
|
32
|
+
if (activeElement) {
|
33
|
+
return `
|
34
|
+
opacity: 1;
|
35
|
+
width: ${activeElement.clientWidth}px;
|
36
|
+
transform: translateX(${activeElement.offsetLeft}px)
|
37
|
+
`;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
return "height: 0;";
|
41
|
+
});
|
42
|
+
function removePossibleStar(href) {
|
43
|
+
return href.endsWith("*") ? href.slice(0, -1) : href;
|
44
|
+
}
|
9
45
|
</script>
|
10
46
|
|
11
|
-
<
|
47
|
+
<svelte:window onresize={() => { loaded = false; loaded = true; }} />
|
48
|
+
|
49
|
+
<nav class="Tabs" {id} class:contained class:rounded>
|
12
50
|
<menu>
|
13
51
|
{#each items as item, index}
|
14
|
-
<li data-index={index} aria-current={item.active ? 'page' : undefined}>
|
52
|
+
<li data-index={index} aria-current={item.active || activeIndex === index ? 'page' : undefined}>
|
15
53
|
{#if item.href}
|
16
|
-
<a draggable="false" href={item.href}>
|
54
|
+
<a draggable="false" href={removePossibleStar(item.href)}>
|
17
55
|
{item.label}
|
18
56
|
</a>
|
19
57
|
{:else if item.onclick}
|
@@ -23,7 +61,7 @@ function onClickButton(event, item, index) {
|
|
23
61
|
{/if}
|
24
62
|
</li>
|
25
63
|
{/each}
|
26
|
-
<div class="Underline"></div>
|
64
|
+
<div class="Underline" style={underlineStyle}></div>
|
27
65
|
</menu>
|
28
66
|
</nav>
|
29
67
|
|
@@ -52,7 +90,7 @@ function onClickButton(event, item, index) {
|
|
52
90
|
align-items: center;
|
53
91
|
justify-content: flex-start;
|
54
92
|
padding: 0;
|
55
|
-
gap: 1rem;
|
93
|
+
gap: var(--gap, 1rem);
|
56
94
|
inline-size: 100%;
|
57
95
|
border-block-end: var(--menu-border);
|
58
96
|
}
|
@@ -65,10 +103,11 @@ function onClickButton(event, item, index) {
|
|
65
103
|
a,
|
66
104
|
button {
|
67
105
|
display: block;
|
68
|
-
padding: 0.75rem 0.5rem;
|
106
|
+
padding: var(--padding, 0.75rem 0.5rem);
|
69
107
|
color: var(--menu-text);
|
70
108
|
transition: all var(--menu-trans);
|
71
109
|
font-weight: 500;
|
110
|
+
font-size: var(--font-size, 0.9em);
|
72
111
|
letter-spacing: -0.05ch;
|
73
112
|
background: transparent;
|
74
113
|
border: none;
|
@@ -76,6 +115,9 @@ function onClickButton(event, item, index) {
|
|
76
115
|
cursor: pointer;
|
77
116
|
text-decoration: none;
|
78
117
|
}
|
118
|
+
menu li:first-child > * {
|
119
|
+
padding-inline-start: 0;
|
120
|
+
}
|
79
121
|
.Tabs.contained li {
|
80
122
|
flex-grow: 1;
|
81
123
|
border-inline-end: var(--menu-border);
|
@@ -95,24 +137,22 @@ function onClickButton(event, item, index) {
|
|
95
137
|
}
|
96
138
|
a:hover,
|
97
139
|
button:hover {
|
98
|
-
|
99
|
-
color: var(--menu-
|
140
|
+
color: color-mix(in hsl shorter hue, var(--menu-text) var(--mix-amount), var(--mix-target));
|
141
|
+
background-color: color-mix(in hsl shorter hue, var(--menu-bg) var(--mix-amount), var(--mix-target));
|
100
142
|
}
|
101
143
|
li[aria-current="page"] a,
|
102
144
|
li[aria-current="page"] button {
|
103
145
|
background: var(--menu-bg-active);
|
104
146
|
color: var(--menu-text-active);
|
105
147
|
opacity: 1;
|
106
|
-
border-block-end: 2px solid var(--menu-text-active);
|
107
148
|
}
|
108
149
|
.Underline {
|
109
|
-
|
110
|
-
block-size: 2px;
|
150
|
+
height: 2px;
|
111
151
|
background-color: var(--menu-text-active);
|
112
152
|
position: absolute;
|
113
153
|
bottom: 0;
|
114
154
|
left: 0;
|
115
|
-
transition: all 0.
|
155
|
+
transition: all 0.2s ease-out;
|
116
156
|
opacity: 0;
|
117
157
|
}
|
118
158
|
</style>
|
@@ -1,26 +1,25 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
};
|
10
|
-
|
11
|
-
[evt: string]: CustomEvent<any>;
|
12
|
-
};
|
13
|
-
slots: {};
|
14
|
-
};
|
15
|
-
export type TabsProps = typeof __propDef.props;
|
16
|
-
export type TabsEvents = typeof __propDef.events;
|
17
|
-
export type TabsSlots = typeof __propDef.slots;
|
18
|
-
export default class Tabs extends SvelteComponent<TabsProps, TabsEvents, TabsSlots> {
|
19
|
-
constructor(options?: import("svelte").ComponentConstructorOptions<{
|
20
|
-
items: TabItem[];
|
21
|
-
underline?: boolean | undefined;
|
22
|
-
contained?: boolean | undefined;
|
23
|
-
rounded?: boolean | undefined;
|
24
|
-
}>);
|
1
|
+
import type { TabItem } from "../nav/index.js";
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
4
|
+
$$bindings?: Bindings;
|
5
|
+
} & Exports;
|
6
|
+
(internal: unknown, props: Props & {
|
7
|
+
$$events?: Events;
|
8
|
+
$$slots?: Slots;
|
9
|
+
}): Exports;
|
10
|
+
z_$$bindings?: Bindings;
|
25
11
|
}
|
26
|
-
|
12
|
+
declare const Tabs: $$__sveltets_2_IsomorphicComponent<{
|
13
|
+
/** Tab items to display. */
|
14
|
+
items: TabItem[];
|
15
|
+
/** Underline the active tab. The underline will slide to the selected tab unless reduced motion is enabled. */
|
16
|
+
underline?: boolean;
|
17
|
+
/** Contain the element in a box. */
|
18
|
+
contained?: boolean;
|
19
|
+
/** Round the corners of the element if contained. */
|
20
|
+
rounded?: boolean;
|
21
|
+
}, {
|
22
|
+
[evt: string]: CustomEvent<any>;
|
23
|
+
}, {}, {}, "">;
|
24
|
+
type Tabs = InstanceType<typeof Tabs>;
|
25
|
+
export default Tabs;
|
package/dist/nav/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
export { default as Breadcrumb } from './Breadcrumb.svelte';
|
2
2
|
export { default as Menu } from './Menu.svelte';
|
3
|
+
export { default as MenuItem } from './MenuItem.svelte';
|
4
|
+
export { default as NavMenu } from './NavMenu.svelte';
|
3
5
|
export { default as TabbedContent } from './TabbedContent.svelte';
|
4
6
|
export { default as Tabs } from './Tabs.svelte';
|
5
|
-
export { default as MenuItem } from './MenuItem.svelte';
|
6
7
|
export type { BreadcrumbItem, MenuItem as MenuItemType, TabItem, TabbedContentItem } from './MenuTypes.js';
|
package/dist/nav/index.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export { default as Breadcrumb } from './Breadcrumb.svelte';
|
2
2
|
export { default as Menu } from './Menu.svelte';
|
3
|
+
export { default as MenuItem } from './MenuItem.svelte';
|
4
|
+
export { default as NavMenu } from './NavMenu.svelte';
|
3
5
|
export { default as TabbedContent } from './TabbedContent.svelte';
|
4
6
|
export { default as Tabs } from './Tabs.svelte';
|
5
|
-
export { default as MenuItem } from './MenuItem.svelte';
|