diff --git a/src/components/UIShell/FormTest.svelte b/src/components/UIShell/FormTest.svelte new file mode 100644 index 00000000..970dd450 --- /dev/null +++ b/src/components/UIShell/FormTest.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/components/UIShell/UIShell.Story.svelte b/src/components/UIShell/UIShell.Story.svelte new file mode 100644 index 00000000..ea8bb0be --- /dev/null +++ b/src/components/UIShell/UIShell.Story.svelte @@ -0,0 +1,155 @@ + + +{#if story === 'with-nav'} + +{:else if story === 'with-actions'} + +{:else} + +{/if} diff --git a/src/components/UIShell/UIShell.stories.js b/src/components/UIShell/UIShell.stories.js new file mode 100644 index 00000000..c9022dd6 --- /dev/null +++ b/src/components/UIShell/UIShell.stories.js @@ -0,0 +1,34 @@ +import { withKnobs, text } from '@storybook/addon-knobs'; +import Component from './UIShell.Story.svelte'; + +export default { title: 'UIShell', decorators: [withKnobs] }; + +export const Default = () => ({ + Component, + props: { + story: 'default', + href: text('The link href (href)', '#'), + company: text('Company name', 'IBM'), + platformName: text('Platform name', 'Platform Name') + } +}); + +export const WithNav = () => ({ + Component, + props: { + story: 'with-nav', + href: text('The link href (href)', '#'), + company: text('Company name', 'IBM'), + platformName: text('Platform name', 'Platform Name') + } +}); + +export const WithActions = () => ({ + Component, + props: { + story: 'with-actions', + href: text('The link href (href)', '#'), + company: text('Company name', 'IBM'), + platformName: text('Platform name', 'Platform Name') + } +}); diff --git a/src/components/UIShell/UIShell.svelte b/src/components/UIShell/UIShell.svelte new file mode 100644 index 00000000..0dcb1193 --- /dev/null +++ b/src/components/UIShell/UIShell.svelte @@ -0,0 +1,32 @@ + + + diff --git a/src/components/UIShell/UIShellNav/UIShellNavItem.svelte b/src/components/UIShell/UIShellNav/UIShellNavItem.svelte new file mode 100644 index 00000000..39df2006 --- /dev/null +++ b/src/components/UIShell/UIShellNav/UIShellNavItem.svelte @@ -0,0 +1,41 @@ + + +{#if href} +
  • + + {text} + +
  • +{:else} + +{/if} diff --git a/src/components/UIShell/UIShellNav/UIShellNavSubmenu.svelte b/src/components/UIShell/UIShellNav/UIShellNavSubmenu.svelte new file mode 100644 index 00000000..909ca493 --- /dev/null +++ b/src/components/UIShell/UIShellNav/UIShellNavSubmenu.svelte @@ -0,0 +1,73 @@ + + +
  • + { + if (key === 'Enter') { + expanded = !expanded; + } + }} + on:click + on:mouseover + on:mouseenter + on:mouseleave + on:keyup + on:focus + on:blur> + {text} + + + +
  • diff --git a/src/components/UIShell/UIShellNav/UIShellNavWrapper.svelte b/src/components/UIShell/UIShellNav/UIShellNavWrapper.svelte new file mode 100644 index 00000000..1783a4c2 --- /dev/null +++ b/src/components/UIShell/UIShellNav/UIShellNavWrapper.svelte @@ -0,0 +1,11 @@ + + + diff --git a/src/components/UIShell/UIShellRightPanel/ActionComponent.svelte b/src/components/UIShell/UIShellRightPanel/ActionComponent.svelte new file mode 100644 index 00000000..5469a18c --- /dev/null +++ b/src/components/UIShell/UIShellRightPanel/ActionComponent.svelte @@ -0,0 +1,13 @@ + + + diff --git a/src/components/UIShell/UIShellRightPanel/ActionLink.svelte b/src/components/UIShell/UIShellRightPanel/ActionLink.svelte new file mode 100644 index 00000000..7d367180 --- /dev/null +++ b/src/components/UIShell/UIShellRightPanel/ActionLink.svelte @@ -0,0 +1,38 @@ + + +{#if action === 'switcher'} + +{:else} + +{/if} diff --git a/src/components/UIShell/UIShellRightPanel/ActionSearch.svelte b/src/components/UIShell/UIShellRightPanel/ActionSearch.svelte new file mode 100644 index 00000000..996fe1b8 --- /dev/null +++ b/src/components/UIShell/UIShellRightPanel/ActionSearch.svelte @@ -0,0 +1,36 @@ + + +{#if action === 'search'} + +{:else} + +{/if} diff --git a/src/components/UIShell/UIShellRightPanel/UIShellRightPanel.svelte b/src/components/UIShell/UIShellRightPanel/UIShellRightPanel.svelte new file mode 100644 index 00000000..ff03537b --- /dev/null +++ b/src/components/UIShell/UIShellRightPanel/UIShellRightPanel.svelte @@ -0,0 +1,51 @@ + + +
    + {#each rightPanel as action, index} + {#if action.action === 'search'} + + {:else if action.action === 'switcher'} + {#if index === rightPanel.length} + + {/if} + {:else if action.type === 'search'} + + {:else if action.type === 'component'} + + {:else if action.type === 'link'} + + {/if} + {/each} + {#if renderSwitcher} + + {/if} +
    diff --git a/src/components/UIShell/index.js b/src/components/UIShell/index.js new file mode 100644 index 00000000..d08c3eab --- /dev/null +++ b/src/components/UIShell/index.js @@ -0,0 +1,3 @@ +import UIShell from './UIShell.svelte'; + +export default UIShell; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 0d222e58..b8340eac 100644 --- a/src/index.js +++ b/src/index.js @@ -78,6 +78,7 @@ import ToggleSmall, { ToggleSmallSkeleton } from './components/ToggleSmall'; import Tooltip from './components/Tooltip'; import TooltipDefinition from './components/TooltipDefinition'; import TooltipIcon from './components/TooltipIcon'; +import UIShell from './components/UIShell'; import UnorderedList from './components/UnorderedList'; export { @@ -192,5 +193,6 @@ export { Tooltip, TooltipDefinition, TooltipIcon, + UIShell, UnorderedList };