Skip to content

Commit

Permalink
OHRM5X-1786: Bump version to 1.0.7 (#628)
Browse files Browse the repository at this point in the history
* OHRM5X-1786: Remove unused assets

* OHRM5X-1786: OXD glass button fix icon not displaying issue
  • Loading branch information
Chamara Abesinghe authored Oct 14, 2022
1 parent afb7e1d commit eaf0a5a
Show file tree
Hide file tree
Showing 30 changed files with 24 additions and 82 deletions.
2 changes: 1 addition & 1 deletion components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oxd-components",
"version": "1.0.7-alpha.7",
"version": "1.0.7",
"license": "GPL-3.0",
"scripts": {
"test:unit": "vue-cli-service test:unit",
Expand Down
Binary file removed components/src/assets/images/accountedit-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/admin-icon-w.png
Binary file not shown.
Binary file removed components/src/assets/images/admin-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/development-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/discipline-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/expences-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/home-icon-w.png
Binary file not shown.
Binary file removed components/src/assets/images/home-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/leave-icon-w.png
Binary file not shown.
Binary file removed components/src/assets/images/leave-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/log-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/magnifying-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/myinfo-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/onboarding-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/pim-icon-w.png
Binary file not shown.
Binary file removed components/src/assets/images/pim-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/recent-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/recruitment-icon-w.png
Binary file not shown.
Binary file removed components/src/assets/images/recruitment-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/report-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/time-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/training-icon.png
Binary file not shown.
Binary file removed components/src/assets/images/user-icon.png
Binary file not shown.
12 changes: 4 additions & 8 deletions components/src/core/components/Button/GlassButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

<template>
<button type="button" :class="btnClasses" disabled>
<slot v-if="!iconSrc" name="icon"></slot>
<img v-else :src="iconSrc" :class="iconClasses" />
<span v-if="icon" :class="iconClasses"></span>
<slot v-else name="icon"></slot>
{{ label }}
</button>
</template>
Expand Down Expand Up @@ -53,11 +53,6 @@ export default defineComponent({
},

computed: {
iconSrc(): string | null {
return this.icon
? require(`../../../assets/images/${this.icon}.png`)
: null;
},
btnClasses(): object {
return {
'oxd-glass-button': true,
Expand All @@ -67,7 +62,8 @@ export default defineComponent({
iconClasses(): object {
return {
'oxd-glass-button-icon': true,
[`oxd-glass-button-icon--disabled`]: this.disabled,
'oxd-glass-button-icon--disabled': this.disabled,
[`oxd-glass-button-icon--${this.icon}`]: this.icon,
};
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Button > GlassButton.vue should disable OXD glass button 1`] = `<button type="button" class="oxd-glass-button oxd-glass-button--disabled" disabled="" name="Post Photo"> </button>`;
exports[`Button > GlassButton.vue should disable OXD glass button 1`] = `<button type="button" class="oxd-glass-button oxd-glass-button--disabled" disabled="" name="Post Photo"><span class="oxd-glass-button-icon oxd-glass-button-icon--disabled oxd-glass-button-icon--cameraglass"></span> </button>`;

exports[`Button > GlassButton.vue should renders OXD glass button 1`] = `<button type="button" class="oxd-glass-button" disabled="" name="Post Video"> </button>`;
exports[`Button > GlassButton.vue should renders OXD glass button 1`] = `<button type="button" class="oxd-glass-button" disabled="" name="Post Video"><span class="oxd-glass-button-icon oxd-glass-button-icon--videoglass"></span> </button>`;
2 changes: 2 additions & 0 deletions components/src/core/components/Button/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,5 @@ $oxd-glass-button-font-color: $oxd-interface-gray-darken-2-color !default;
$oxd-glass-button-font-color--disabled: $oxd-interface-gray-lighten-2-color !default;
$oxd-glass-button-background-color--focus: $oxd-interface-gray-lighten-2-color !default;
$oxd-glass-button-background-color--active: $oxd-interface-gray-lighten-2-color !default;
$oxd-glass-button-icon-width: 2rem !default;
$oxd-glass-button-icon-height: 2rem !default;
15 changes: 14 additions & 1 deletion components/src/core/components/Button/glass-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,22 @@
}

&-icon {
width: 2.5rem;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
width: $oxd-glass-button-icon-width;
height: $oxd-glass-button-icon-height;
&--disabled {
opacity: 0.5;
}
&--videoglass {
background-image: url(~assets/images/videoglass.png);
}
&--cameraglass {
background-image: url(~assets/images/cameraglass.png);
}
&--thumbsupglass {
background-image: url(~assets/images/thumbsupglass.png);
}
}
}
69 changes: 0 additions & 69 deletions components/src/styles/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,73 +22,4 @@
background-size: 22px 22px;
display: inline-block;
vertical-align: middle;
&.icon-search {
background-image: url(~assets/images/magnifying-icon.png);
}
&.icon-home {
background-image: url(~assets/images/home-icon.png);
}
&.icon-home-w {
background-image: url(~assets/images/home-icon-w.png);
}
&.icon-pim {
background-image: url(~assets/images/pim-icon.png);
}
&.icon-pim-w {
background-image: url(~assets/images/pim-icon-w.png);
}
&.icon-time {
background-image: url(~assets/images/time-icon.png);
}
&.icon-recruitment {
background-image: url(~assets/images/recruitment-icon.png);
}
&.icon-recruitment-w {
background-image: url(~assets/images/recruitment-icon-w.png);
}
&.icon-leave {
background-image: url(~assets/images/leave-icon.png);
}
&.icon-leave-w {
background-image: url(~assets/images/leave-icon-w.png);
}
&.icon-discipline {
background-image: url(~assets/images/discipline-icon.png);
}
&.icon-training {
background-image: url(~assets/images/training-icon.png);
}
&.icon-development {
background-image: url(~assets/images/development-icon.png);
}
&.icon-onboarding {
background-image: url(~assets/images/onboarding-icon.png);
}
&.icon-expences {
background-image: url(~assets/images/expences-icon.png);
}
&.icon-report {
background-image: url(~assets/images/report-icon.png);
}
&.icon-admin {
background-image: url(~assets/images/admin-icon.png);
}
&.icon-admin-w {
background-image: url(~assets/images/admin-icon-w.png);
}
&.icon-account-edit {
background-image: url(~assets/images/accountedit-icon.png);
}
&.icon-myinfo {
background-image: url(~assets/images/myinfo-icon.png);
}
&.icon-recent {
background-image: url(~assets/images/recent-icon.png);
}
&.icon-user {
background-image: url(~assets/images/user-icon.png);
}
&.icon-log {
background-image: url(~assets/images/log-icon.png);
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oxd",
"license": "GPL-3.0",
"version": "1.0.7-alpha.7",
"version": "1.0.7",
"private": true,
"workspaces": [
"components",
Expand Down

0 comments on commit eaf0a5a

Please sign in to comment.