-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vwc-side-drawer): remove absolute support (#1029)
* feat(vwc-side-drawer): 1st draft * story added * story added * semi-transparent content model * alternate scheme * alternate * devider check * working example * this will break * this will not break * slot="navigation" * margin list * side drawer bigger inline size * side drawer position * appContent inlined * documentation, header, image * vvd-umbrella under devDependencies * @prop * readme * Update package.json * Update package.json * Update package.json * Update package.json * Update package.json * add border and shadow to side drawer * activated * style * Extension panel should not be activated * wider side drawer * slots documentation * restore yarn.lock * refer correct tokens * refactor * declartiveness * correct module import * ESlint * refactor names * update readme * remove absolute * split modal story * match svg to modal side drawer * remove absolute from ui test * remove story duplications * yarn * add modal UI test Co-authored-by: yinonov <yinon@hotmail.com> Co-authored-by: tveinfeld <67224311+tveinfeld@users.noreply.github.com>
- Loading branch information
1 parent
6cf366c
commit b00ded7
Showing
12 changed files
with
195 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,4 @@ export const argTypes = { | |
hasTopBar: { | ||
control: booleanControl | ||
}, | ||
absolute: { | ||
control: booleanControl | ||
} | ||
}; |
29 changes: 29 additions & 0 deletions
29
components/side-drawer/stories/side-drawer-modal.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { html } from 'lit-element'; | ||
import { argTypes } from './arg-types.js'; | ||
import { unsafeSVG } from 'lit-html/directives/unsafe-svg'; | ||
import { pageContentMock } from '../../../scripts/storybook/svg_templates'; | ||
import { Basic } from './side-drawer.stories.js'; | ||
|
||
export default { | ||
title: 'Alpha/Components/Side Drawer/Modal', | ||
component: 'vwc-side-drawer', | ||
argTypes | ||
}; | ||
|
||
const Template = args => html` | ||
<style> | ||
div#demo { | ||
top: 0px; | ||
position: fixed; | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
<div id="demo"> | ||
${Basic(args)} | ||
${unsafeSVG(pageContentMock('100%', '100%', 'xMinYMin slice'))} | ||
</div>`; | ||
|
||
export const Modal = Template.bind({}); | ||
Modal.args = { type: 'modal', open: true }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import '@vonage/vwc-side-drawer'; | ||
import '@vonage/vwc-list/vwc-list-expansion-panel.js'; | ||
import '@vonage/vwc-list/vwc-list.js'; | ||
import '@vonage/vwc-list/vwc-list-item.js'; | ||
import '@vonage/vwc-icon/vwc-icon.js'; | ||
import { snapshotTheWholePage } from '../../utils/testPageUtils'; | ||
import { pageContentMock } from '../../../scripts/storybook/svg_templates'; | ||
|
||
export async function createElementVariations(wrapper) { | ||
snapshotTheWholePage(wrapper); | ||
const elementWrapper = document.createElement('div'); | ||
elementWrapper.innerHTML = ` | ||
<style> | ||
div#demo { | ||
top: 0px; | ||
position: fixed; | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
<div> | ||
<div id="demo"> | ||
<vwc-side-drawer id="side-drawer" type="modal" hasTopBar open> | ||
<span slot="top-bar"> | ||
<vwc-icon type="vonage-mono"></vwc-icon> VONAGE | ||
</span> | ||
<vwc-list | ||
innerRole="navigation" | ||
innerAriaLabel="Primary navigation" | ||
itemRoles="link" | ||
> | ||
<vwc-list-item shape="rounded" graphic="icon"> | ||
<vwc-icon slot="graphic" type="home-line"></vwc-icon>1st level item | ||
</vwc-list-item> | ||
<p>SECTION TITLE</p> | ||
<vwc-list-item shape="rounded" graphic="icon"> | ||
<vwc-icon slot="graphic" type="chat-line"></vwc-icon>1st level item | ||
</vwc-list-item> | ||
<vwc-list-expansion-panel open> | ||
<vwc-list-item slot="header" shape="rounded" graphic="icon"> | ||
<vwc-icon slot="graphic" type="chat-line"></vwc-icon>1st level item | ||
</vwc-list-item> | ||
<vwc-list-expansion-panel open> | ||
<vwc-list-item slot="header" shape="rounded" | ||
>2nd level item</vwc-list-item | ||
> | ||
<vwc-list-item shape="rounded">3rd level item</vwc-list-item> | ||
<vwc-list-item shape="rounded">3rd level item</vwc-list-item> | ||
</vwc-list-expansion-panel> | ||
</vwc-list-expansion-panel> | ||
</vwc-list> | ||
</vwc-side-drawer> | ||
<div id="default"></div> | ||
${pageContentMock('100%', '100%', 'xMinYMin slice')} | ||
</div> | ||
</div> | ||
`; | ||
wrapper.appendChild(elementWrapper); | ||
} | ||
|
||
|
Oops, something went wrong.