Skip to content

Commit

Permalink
feat(styles): update design-system version and use button ripple effect
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Feb 2, 2021
1 parent 78e4020 commit 29a14fb
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 76 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@bimdata/design-system": "0.1.4",
"@bimdata/design-system": "0.1.7",
"@bimdata/typescript-fetch-api-client": "^1.0.0",
"@bimdata/utils": "^0.2.15",
"@uppy/core": "^1.15.0",
Expand Down Expand Up @@ -40,6 +40,6 @@
"prettier": "^1.19.1",
"sass-loader": "^8.0.2",
"typescript": "~3.9.3",
"vue-jest": "^5.0.0-0"
"vue-jest": "^5.0.0-alpha.8"
}
}
17 changes: 0 additions & 17 deletions src/components/project-action-menu/ProjectActionMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@

&__btn {
color: $color-tertiary-dark;

// Ripple effect
&.clicked {
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: $color-primary;
transform: scale(0);
animation-name: ripple;
animation-duration: 0.5s;
}
}
}

&__container {
Expand Down
11 changes: 1 addition & 10 deletions src/components/project-action-menu/ProjectActionMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
@click.stop="() => {}"
v-click-away="closeMenu">

<BIMDataButton color="default" ghost rounded icon
<BIMDataButton color="default" ripple rounded icon
class="project-action-menu__btn"
:class="{ clicked }"
@click="toggleMenu">
<BIMDataIcon name="ellipsis" size="l" />
</BIMDataButton>
Expand Down Expand Up @@ -74,12 +73,6 @@ export default {
const loading = ref(false);
provide('loading', loading);
const clicked = ref(false);
const rippleEffect = () => {
clicked.value = true;
setTimeout(() => clicked.value = false, 500);
};
const showMenu = ref(false);
const closeMenu = () => {
closeUpdateForm();
Expand All @@ -88,7 +81,6 @@ export default {
showMenu.value = false;
};
const toggleMenu = () => {
rippleEffect();
closeUpdateForm();
closeDeleteGuard();
loading.value = false;
Expand All @@ -113,7 +105,6 @@ export default {
return {
// References
clicked,
loading,
showDeleteGuard,
showMenu,
Expand Down
17 changes: 0 additions & 17 deletions src/components/space-action-menu/SpaceActionMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@

&__btn {
color: $color-tertiary-dark;

// Ripple effect
&.clicked {
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: $color-primary;
transform: scale(0);
animation-name: ripple;
animation-duration: 0.5s;
}
}
}

&__container {
Expand Down
13 changes: 2 additions & 11 deletions src/components/space-action-menu/SpaceActionMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
@click.stop="() => {}"
v-click-away="closeMenu">

<BIMDataButton color="default" ghost rounded icon
<BIMDataButton color="default" ripple rounded icon
class="space-action-menu__btn"
:class="{ clicked }"
@click="toggleMenu">
<BIMDataIcon name="ellipsis" size="l" />
</BIMDataButton>
Expand Down Expand Up @@ -61,7 +60,7 @@ import { useSpaces } from '@/state/spaces';
// Components
import BIMDataButton from '@bimdata/design-system/dist/js/BIMDataComponents/vue3/BIMDataButton.js';
import BIMDataIcon from '@bimdata/design-system/dist/js/BIMDataComponents/vue3/BIMDataIcon.js';
import BIMDataSpinner from "@bimdata/design-system/dist/js/BIMDataComponents/vue3/BIMDataSpinner.js";
import BIMDataSpinner from '@bimdata/design-system/dist/js/BIMDataComponents/vue3/BIMDataSpinner.js';
import SpaceDeleteGuard from '@/components/space-delete-guard/SpaceDeleteGuard';
import SpaceImageInput from '@/components/space-image-input/SpaceImageInput';
import SpaceUpdateForm from '@/components/space-update-form/SpaceUpdateForm';
Expand All @@ -87,12 +86,6 @@ export default {
const loading = ref(false);
provide('loading', loading);
const clicked = ref(false);
const rippleEffect = () => {
clicked.value = true;
setTimeout(() => clicked.value = false, 500);
};
const showMenu = ref(false);
const closeMenu = () => {
closeUpdateForm();
Expand All @@ -101,7 +94,6 @@ export default {
showMenu.value = false;
};
const toggleMenu = () => {
rippleEffect();
closeUpdateForm();
closeDeleteGuard();
loading.value = false;
Expand Down Expand Up @@ -130,7 +122,6 @@ export default {
return {
// References
clicked,
loading,
showDeleteGuard,
showMenu,
Expand Down
11 changes: 0 additions & 11 deletions src/styles/animations.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/global.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import '~@bimdata/design-system/dist/scss/elements/_BIMDataScrollbar.scss';

@import './animations.scss';
@import './transitions.scss';

* {
Expand Down

0 comments on commit 29a14fb

Please sign in to comment.