This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
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.
MODUL-1149: Ameliorer slide transition (#1088)
* MODUL-1149 - Améliorer slide-transition * MODUL-1149 - Revue de code * MODUL-1149 - Update snapshot
- Loading branch information
Showing
15 changed files
with
360 additions
and
31 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
66 changes: 66 additions & 0 deletions
66
...nents/transitions/accordion-transition/__snapshots__/accordion-transition.stories.ts.snap
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,66 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots components|m-accordion-transition Accordion example 1`] = ` | ||
<div> | ||
<div> | ||
<button | ||
class="m-button m--is-skin-primary" | ||
type="button" | ||
> | ||
<!----> | ||
<!----> | ||
<span | ||
class="m-button__text" | ||
> | ||
Close accordion | ||
<!----> | ||
</span> | ||
<!----> | ||
<!----> | ||
</button> | ||
<button | ||
class="m-button m-u--margin-left m--is-skin-secondary" | ||
type="button" | ||
> | ||
<!----> | ||
<!----> | ||
<span | ||
class="m-button__text" | ||
> | ||
Disabled transition | ||
<!----> | ||
</span> | ||
<!----> | ||
<!----> | ||
</button> | ||
</div> | ||
<div> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A laudantium odio ipsum, quae quos cum dolor, omnis perferendis, veritatis deleniti iusto consectetur? Impedit tempora quam ab laborum maiores sapiente earum? | ||
</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A laudantium odio ipsum, quae quos cum dolor, omnis perferendis, veritatis deleniti iusto consectetur? Impedit tempora quam ab laborum maiores sapiente earum? | ||
</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A laudantium odio ipsum, quae quos cum dolor, omnis perferendis, veritatis deleniti iusto consectetur? Impedit tempora quam ab laborum maiores sapiente earum? | ||
</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A laudantium odio ipsum, quae quos cum dolor, omnis perferendis, veritatis deleniti iusto consectetur? Impedit tempora quam ab laborum maiores sapiente earum? | ||
</p> | ||
</div> | ||
</div> | ||
`; |
1 change: 1 addition & 0 deletions
1
src/components/transitions/accordion-transition/accordion-transition.html
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<transition name="m--is" | ||
:css="!disabled" | ||
@before-enter="beforeEnter" | ||
@enter="enter" | ||
@after-enter="afterEnter" | ||
|
46 changes: 46 additions & 0 deletions
46
src/components/transitions/accordion-transition/accordion-transition.stories.ts
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,46 @@ | ||
import { storiesOf } from '@storybook/vue'; | ||
import Vue from 'vue'; | ||
import { componentsHierarchyRootSeparator } from '../../../../conf/storybook/utils'; | ||
import { MButtonSkin } from '../../button/button'; | ||
import { ACCORDION_TRANSITION_NAME } from '../../component-names'; | ||
import AccordionTransitionPlugin from './accordion-transition'; | ||
|
||
Vue.use(AccordionTransitionPlugin); | ||
|
||
storiesOf(`${componentsHierarchyRootSeparator}${ACCORDION_TRANSITION_NAME}`, module) | ||
.add('Accordion example', () => ({ | ||
data: () => ({ | ||
open: true, | ||
disabledTransition: false, | ||
buttonSkin: MButtonSkin.Secondary | ||
}), | ||
methods: { | ||
toggleOpen(): void { | ||
let _this: any = this as any; | ||
_this.open = !_this.open; | ||
}, | ||
toggleDisabledTransition(): void { | ||
let _this: any = this as any; | ||
_this.disabledTransition = !_this.disabledTransition; | ||
} | ||
}, | ||
template: ` | ||
<div> | ||
<div> | ||
<m-button @click="toggleOpen()"> | ||
{{open ? 'Close' : 'Open'}} accordion | ||
</m-button> | ||
<m-button class="m-u--margin-left" | ||
:skin="buttonSkin" | ||
@click="toggleDisabledTransition()"> | ||
{{disabledTransition ? 'Enabled' : 'Disabled'}} transition | ||
</m-button> | ||
</div> | ||
<m-accordion-transition :disabled="disabledTransition"> | ||
<div v-if="open"> | ||
<p v-for="index in 4" | ||
:key="index">Lorem ipsum dolor sit amet, consectetur adipisicing elit. A laudantium odio ipsum, quae quos cum dolor, omnis perferendis, veritatis deleniti iusto consectetur? Impedit tempora quam ab laborum maiores sapiente earum?</p> | ||
</div> | ||
</m-accordion-transition> | ||
</div>` | ||
})); |
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
142 changes: 142 additions & 0 deletions
142
src/components/transitions/slide-transition/__snapshots__/slide-transition.stories.ts.snap
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,142 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots components|m-slide-transition Tabs example 1`] = ` | ||
<div> | ||
<m-navbar | ||
selected="1" | ||
skin="tab-light" | ||
> | ||
<m-navbar-item | ||
value="1" | ||
> | ||
Tab 1 | ||
</m-navbar-item> | ||
<m-navbar-item | ||
value="2" | ||
> | ||
Tab 2 | ||
</m-navbar-item> | ||
<m-navbar-item | ||
value="3" | ||
> | ||
Tab 3 | ||
</m-navbar-item> | ||
<m-navbar-item | ||
value="4" | ||
> | ||
Tab 4 | ||
</m-navbar-item> | ||
<m-navbar-item | ||
value="5" | ||
> | ||
Tab 5 | ||
</m-navbar-item> | ||
<m-navbar-item | ||
value="6" | ||
> | ||
Tab 6 | ||
</m-navbar-item> | ||
<m-navbar-item | ||
value="7" | ||
> | ||
Tab 7 | ||
</m-navbar-item> | ||
</m-navbar> | ||
<div | ||
class="m-slide-transition m--is-left-to-right-transition" | ||
> | ||
<div | ||
class="m-u--margin-top" | ||
> | ||
<h3 | ||
class="m-u--no-margin" | ||
> | ||
Tab 1 | ||
</h3> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A laudantium odio ipsum, quae quos cum dolor, omnis perferendis, veritatis deleniti iusto consectetur? Impedit tempora quam ab laborum maiores sapiente earum? | ||
</p> | ||
</div> | ||
</div> | ||
<div | ||
class="m-u--margin-top--m" | ||
> | ||
<button | ||
class="m-button m--is-skin-primary" | ||
type="button" | ||
> | ||
<!----> | ||
<!----> | ||
<span | ||
class="m-button__text" | ||
> | ||
Add tab | ||
<!----> | ||
</span> | ||
<!----> | ||
<!----> | ||
</button> | ||
<button | ||
class="m-button m-u--margin-left m--is-skin-secondary" | ||
type="button" | ||
> | ||
<!----> | ||
<!----> | ||
<span | ||
class="m-button__text" | ||
> | ||
Delete tab | ||
<!----> | ||
</span> | ||
<!----> | ||
<!----> | ||
</button> | ||
<button | ||
class="m-button m-u--margin-left m--is-skin-secondary" | ||
type="button" | ||
> | ||
<!----> | ||
<!----> | ||
<span | ||
class="m-button__text" | ||
> | ||
Disabled transition | ||
<!----> | ||
</span> | ||
<!----> | ||
<!----> | ||
</button> | ||
</div> | ||
</div> | ||
`; |
1 change: 1 addition & 0 deletions
1
src/components/transitions/slide-transition/slide-transition.html
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
Oops, something went wrong.