From ca63c6957ffd2c049bb72bc99dad2901e1b397df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Wed, 21 Apr 2021 15:18:50 +0200 Subject: [PATCH] Implements SideNavigation component --- packages/bbui/package.json | 1 + packages/bbui/src/SideNavigation/Item.svelte | 29 +++++++++++++++++++ .../bbui/src/SideNavigation/Navigation.svelte | 12 ++++++++ packages/bbui/src/index.js | 2 ++ packages/bbui/yarn.lock | 5 ++++ 5 files changed, 49 insertions(+) create mode 100644 packages/bbui/src/SideNavigation/Item.svelte create mode 100644 packages/bbui/src/SideNavigation/Navigation.svelte diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 501a25ed1c..2258de26f9 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -60,6 +60,7 @@ "@spectrum-css/progresscircle": "^1.0.2", "@spectrum-css/radio": "^3.0.2", "@spectrum-css/search": "^3.0.2", + "@spectrum-css/sidenav": "^3.0.2", "@spectrum-css/switch": "^1.0.2", "@spectrum-css/table": "^3.0.1", "@spectrum-css/tabs": "^3.0.1", diff --git a/packages/bbui/src/SideNavigation/Item.svelte b/packages/bbui/src/SideNavigation/Item.svelte new file mode 100644 index 0000000000..44a0d01d4d --- /dev/null +++ b/packages/bbui/src/SideNavigation/Item.svelte @@ -0,0 +1,29 @@ + + +
  • + {#if heading} + + {/if} + + {#if icon} + + {/if} + + + {#if multilevel && $$slots.subnav} + + {/if} +
  • \ No newline at end of file diff --git a/packages/bbui/src/SideNavigation/Navigation.svelte b/packages/bbui/src/SideNavigation/Navigation.svelte new file mode 100644 index 0000000000..1400f0a508 --- /dev/null +++ b/packages/bbui/src/SideNavigation/Navigation.svelte @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index dae40aac47..bce2008f95 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -38,6 +38,8 @@ export { default as Modal } from "./Modal/Modal.svelte" export { default as ModalContent } from "./Modal/ModalContent.svelte" export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte" export { default as Spacer } from "./Spacer/Spacer.svelte" +export { default as SideNavigation } from "./SideNavigation/Navigation.svelte" +export { default as SideNavigationItem } from "./SideNavigation/Item.svelte" export { default as DatePicker } from "./Form/DatePicker.svelte" export { default as Multiselect } from "./Form/Multiselect.svelte" export { default as Context } from "./context" diff --git a/packages/bbui/yarn.lock b/packages/bbui/yarn.lock index 80eeb3ebba..c4fa11535c 100644 --- a/packages/bbui/yarn.lock +++ b/packages/bbui/yarn.lock @@ -181,6 +181,11 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/search/-/search-3.0.2.tgz#70e93e321032d40b399498b2324e3b70e050551e" integrity sha512-3UbT8yZmNOwrZxq+CUmumE+26ZySZ8OoKNM6U20SLMPLgdx6MrRugVE88r3Bl0sJ0RZX/5bU8nausdiHeX+Jlw== +"@spectrum-css/sidenav@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.2.tgz#9d70f408d588ee79c69857751010333671f32713" + integrity sha512-YpIdH/F0jEICYmoduGrnkTmxwJq1kfKxEp0wOs+ZkQOsvKMv1an7nyhsfOKCQqcGNfYzJ9mJAk7/u5+vsxHa8g== + "@spectrum-css/switch@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@spectrum-css/switch/-/switch-1.0.2.tgz#f0b4c69271964573e02b08e90998096e49e1de44"