Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7bc6ea4
Scrollbar implementation (#258)
stefashkaa Jul 21, 2021
e993ecf
fix storybook build scss (#260)
Nikita-Polyakov Jul 21, 2021
fc99cbd
Add an item in the installation instructions with the addition of ele…
Sociopacific Jul 21, 2021
78fa8fe
Merge pull request #262 from soramitsu/feature/add-element-ui-types-i…
Sociopacific Jul 21, 2021
055b7c4
Fix select arrow icon
Sociopacific Jul 22, 2021
2ee27db
Merge pull request #263 from soramitsu/fix/fix-select-arrow-icon
Sociopacific Jul 22, 2021
ca4dcaa
Improve build config (#264)
stefashkaa Jul 22, 2021
7825b3f
Fix customization page (#266)
stefashkaa Jul 22, 2021
269e3f7
Improve build config (#268)
stefashkaa Jul 26, 2021
263b952
Fix UI issues part 1 (#269)
stefashkaa Jul 27, 2021
48e4b4b
add style fixes for input button tabs (#270)
Nikita-Polyakov Jul 27, 2021
0f22278
Fix readme (#271)
stefashkaa Jul 28, 2021
c294da7
PW-239: Bridge Design Update (#273)
alexnatalia Jul 28, 2021
44b620f
Add dark theme (#275)
stefashkaa Aug 2, 2021
3505bfc
Fix theming issues (#276)
stefashkaa Aug 2, 2021
a76834d
Border Radiuses and Sizes Fixing (#272)
alexnatalia Aug 2, 2021
b8e7f20
Neumorphic switch in storybook (#278)
stefashkaa Aug 3, 2021
bef0ae8
update components styles (#280)
Nikita-Polyakov Aug 3, 2021
dcbe95f
Fixed button storybook typograhy behaviour. (#282)
alexnatalia Aug 4, 2021
1941c2f
Add switch theme function (#283)
stefashkaa Aug 4, 2021
28d81ab
fix action button (#285)
Nikita-Polyakov Aug 4, 2021
6ea8e2a
Fixed icons colors. (#287)
alexnatalia Aug 4, 2021
b395663
fix action button style (#289)
Nikita-Polyakov Aug 5, 2021
ddd273c
fix box-shadow (#292)
Nikita-Polyakov Aug 5, 2021
3f6afeb
Added tertiary SDivider type. (#291)
alexnatalia Aug 5, 2021
4615eca
Update UI Lib version. (#293)
alexnatalia Aug 5, 2021
8889d5e
Fix message box and dialog styles (#296)
stefashkaa Aug 5, 2021
4c37fa3
Merge branch 'develop' into release/1.0.13
stefashkaa Aug 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@soramitsu/soramitsu-js-ui",
"version": "1.0.12",
"version": "1.0.13",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu/"
Expand Down
1 change: 1 addition & 0 deletions src/store/LibraryTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const actions = {
},
setDesignSystem ({ commit }, designSystem: DesignSystem) {
commit(types.SET_DESIGN_SYSTEM, designSystem)
document.documentElement.setAttribute('design-system', designSystem)
}
}

Expand Down
14 changes: 6 additions & 8 deletions src/stories/Intro/Theming.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { withKnobs } from '@storybook/addon-knobs'
import Theme from '../../types/Theme'
import DesignSystem from '../../types/DesignSystem'
import { SButton, SDivider } from '../../components'
import { setTheme, setDesignSystem } from '../../utils'
import { switchTheme, setDesignSystem } from '../../utils'
import mainStore from '../../store'

export default {
Expand All @@ -18,25 +18,23 @@ export const configurable = () => ({
<h4>This feature has Work In Progress status</h4>
<div class="s-flex" style="align-items: center;">
<h4 style="margin-right: 10px;">Theme:</h4>
<s-button @click="handleThemeChange(theme)">{{ theme }}</s-button>
<s-button @click="handleThemeChange">{{ theme }}</s-button>
<s-button @click="handleDesignSystemChange(designSystem)">{{ designSystem || 'default' }}</s-button>
</div>
<s-divider />
<h4>You can check all components, these theme settings are applied to the whole library</h4>
</div>`,
computed: {
theme: () => mainStore?.getters?.libraryTheme,
designSystem: () => mainStore?.getters?.libraryDesignSystem
theme: () => mainStore?.getters?.libraryTheme as Theme,
designSystem: () => mainStore?.getters?.libraryDesignSystem as DesignSystem
},
methods: {
handleThemeChange: (theme: Theme) => {
const newTheme = theme === Theme.LIGHT ? Theme.DARK : Theme.LIGHT
setTheme(newTheme)
handleThemeChange: () => {
switchTheme()
},
handleDesignSystemChange: (designSystem: DesignSystem) => {
const newDesignSystem = designSystem === DesignSystem.DEFAULT ? DesignSystem.NEUMORPHIC : DesignSystem.DEFAULT
setDesignSystem(newDesignSystem)
document.documentElement.setAttribute('design-system', newDesignSystem)
}
}
})
41 changes: 41 additions & 0 deletions src/stories/Messages.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { withKnobs } from '@storybook/addon-knobs'

import Vue from 'vue'

import { SButton, SDivider } from '../components'

export default {
title: 'Design System/Components/Messages & Notifications',
decorators: [withKnobs],
excludeStories: /.*Data$/
}

export const configurable = () => ({
components: { SButton, SDivider },
template: `<div>
<h4>Alert messages</h4>
<h5 class="s-code">this.$alert('Message', { title: 'Title', type })</h5>
<s-divider />
<div class="s-flex" style="align-items: center;">
<s-button v-for="type in types" :key="type + 'Alert'" @click="handleOpenAlert(type)">{{ type || 'default' }}</s-button>
</div>
<s-divider />
<h4>Notifications</h4>
<h5 class="s-code">this.$notify({ message: 'Message', title: 'Title', type })</h5>
<s-divider />
<div class="s-flex" style="align-items: center;">
<s-button v-for="type in types" :key="type + 'Notification'" @click="handleOpenNotification(type)">{{ type || 'default' }}</s-button>
</div>
</div>`,
data: () => ({
types: ['error', 'warning', 'success', 'info', '']
}),
methods: {
handleOpenAlert: (type: string) => {
Vue.prototype.$alert(`Some ${type} message`, { title: 'Title', type })
},
handleOpenNotification: (type: string) => {
Vue.prototype.$notify({ message: `Some ${type} message`, title: 'Title', type })
}
}
})
31 changes: 27 additions & 4 deletions src/styles/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ html {
margin: 0;
}

/* Typography */
.d1 {
font-size: var(--s-heading0-font-size);
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6, .h7,
.d2,
Expand Down Expand Up @@ -148,6 +148,10 @@ h6,
line-height: var(--s-line-height-big);
}

.s-code {
font-family: var(--s-font-family-mono);
}

.s-flex {
display: flex;
}
Expand Down Expand Up @@ -248,11 +252,30 @@ button > span {
}

.el-message-box {
background-color: var(--s-color-base-on-accent);
border-radius: var(--s-border-radius-small);
border: none;
[design-system="neumorphic"] & {
box-shadow: var(--s-shadow-dialog);
}
& & {
&__header {
.el-message-box__title {
color: var(--s-color-base-content-primary);
font-size: var(--s-heading5-font-size);
font-feature-settings: var(--s-font-feature-settings-heading);
font-weight: 700;
}
}
&__content {
color: var(--s-color-base-content-primary);
}
&__close {
color: var(--s-color-base-content-secondary);
}
&__headerbtn:focus, &__headerbtn:hover {
.el-message-box__close {
color: var(--s-color-theme-accent);
}
}
&__btns {
Expand All @@ -266,9 +289,9 @@ button > span {
border-color: var(--s-color-theme-accent);
}
&.el-button--primary {
&:hover, &:active, &:focus {
color: var(--s-color-base-on-accent);
}
background-color: var(--s-color-theme-accent);
border-color: var(--s-color-theme-accent);
color: var(--s-color-base-on-accent);
&:hover {
background-color: var(--s-color-theme-accent-hover);
border-color: var(--s-color-theme-accent-hover);
Expand Down
10 changes: 9 additions & 1 deletion src/styles/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
& & {
&__header, &__title {
@include font-weight(700, true);
font-weight: 700;
}
&__title {
font-size: var(--s-heading5-font-size);
Expand All @@ -34,6 +34,14 @@
&__body {
color: var(--s-color-base-content-primary);
}
&__close {
color: var(--s-color-base-content-secondary);
}
&__headerbtn:focus, &__headerbtn:hover {
.el-dialog__close {
color: var(--s-color-theme-accent);
}
}
}
> * {
word-break: break-word;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/neumorphism/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
box-shadow: var(--s-shadow-dialog);
}
}
.v-modal {
[design-system="neumorphic"] .v-modal {
opacity: 0.75;
backdrop-filter: blur(4px);
// TODO: Fix FF behaviour
Expand Down
18 changes: 9 additions & 9 deletions src/styles/neumorphism/index.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import "./button.scss";
@import "./input.scss";
@import "./card.scss";
@import "./collapse.scss";
@import "./tabs.scss";
@import "./radio.scss";
@import "./switch.scss";
@import "./tooltip.scss";
@import "./dialog.scss";
@import "./button";
@import "./input";
@import "./card";
@import "./collapse";
@import "./tabs";
@import "./radio";
@import "./switch";
@import "./tooltip";
@import "./dialog";