removes some unused components
This commit is contained in:
parent
60f5dbe8b4
commit
a0c4093645
|
@ -1,63 +0,0 @@
|
||||||
<script>
|
|
||||||
import { getContext } from "svelte"
|
|
||||||
|
|
||||||
const multilevel = getContext("sidenav-type")
|
|
||||||
import Badge from "../Badge/Badge.svelte"
|
|
||||||
|
|
||||||
export let href = ""
|
|
||||||
export let external = false
|
|
||||||
export let heading = ""
|
|
||||||
export let icon = ""
|
|
||||||
export let selected = false
|
|
||||||
export let disabled = false
|
|
||||||
export let badge = ""
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
||||||
<li
|
|
||||||
class="spectrum-SideNav-item"
|
|
||||||
class:is-selected={selected}
|
|
||||||
class:is-disabled={disabled}
|
|
||||||
on:click
|
|
||||||
>
|
|
||||||
{#if heading}
|
|
||||||
<h2 class="spectrum-SideNav-heading" id="nav-heading-{heading}">
|
|
||||||
{heading}
|
|
||||||
</h2>
|
|
||||||
{/if}
|
|
||||||
<a
|
|
||||||
target={external ? "_blank" : ""}
|
|
||||||
{href}
|
|
||||||
class="spectrum-SideNav-itemLink"
|
|
||||||
aria-current="page"
|
|
||||||
>
|
|
||||||
{#if icon}
|
|
||||||
<svg
|
|
||||||
class="spectrum-Icon spectrum-Icon--sizeM spectrum-SideNav-itemIcon"
|
|
||||||
focusable="false"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
<use xlink:href="#spectrum-icon-18-{icon}" />
|
|
||||||
</svg>
|
|
||||||
{/if}
|
|
||||||
<slot />
|
|
||||||
{#if badge}
|
|
||||||
<div class="badge">
|
|
||||||
<Badge active size="S">{badge}</Badge>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{#if multilevel && $$slots.subnav}
|
|
||||||
<ul class="spectrum-SideNav">
|
|
||||||
<slot name="subnav" />
|
|
||||||
</ul>
|
|
||||||
{/if}
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.badge {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<script>
|
|
||||||
import { setContext } from "svelte"
|
|
||||||
import "@spectrum-css/sidenav/dist/index-vars.css"
|
|
||||||
|
|
||||||
export let multilevel = false
|
|
||||||
setContext("sidenav-type", multilevel)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<ul class="spectrum-SideNav" class:spectrum-SideNav--multiLevel={multilevel}>
|
|
||||||
<slot />
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
|
@ -65,8 +65,6 @@ export { default as Modal } from "./Modal/Modal.svelte"
|
||||||
export { default as ModalContent, keepOpen } from "./Modal/ModalContent.svelte"
|
export { default as ModalContent, keepOpen } from "./Modal/ModalContent.svelte"
|
||||||
export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte"
|
export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte"
|
||||||
export { default as Notification } from "./Notification/Notification.svelte"
|
export { default as Notification } from "./Notification/Notification.svelte"
|
||||||
export { default as SideNavigation } from "./SideNavigation/Navigation.svelte"
|
|
||||||
export { default as SideNavigationItem } from "./SideNavigation/Item.svelte"
|
|
||||||
export { default as Context } from "./context"
|
export { default as Context } from "./context"
|
||||||
export { default as Table } from "./Table/Table.svelte"
|
export { default as Table } from "./Table/Table.svelte"
|
||||||
export { default as Tabs } from "./Tabs/Tabs.svelte"
|
export { default as Tabs } from "./Tabs/Tabs.svelte"
|
||||||
|
|
Loading…
Reference in New Issue