Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 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
ddf5bd4
add table empty-text color (#295)
Nikita-Polyakov Aug 6, 2021
9c54b55
Improve theme switch for storybook layouts (#298)
stefashkaa Aug 9, 2021
04587d0
Merge branch 'develop' into release/1.0.14
stefashkaa Aug 9, 2021
af52c27
tooltip close delay & hide after props (#300)
Nikita-Polyakov Aug 9, 2021
591448c
Merge branch 'develop' into release/1.0.14
stefashkaa Aug 9, 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
4 changes: 3 additions & 1 deletion config/storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { addons } from '@storybook/addons'

import theme from './theme'

addons.setConfig({
theme: theme
theme
})
// TODO: Add switch of this config with DARK/LIGHT
49 changes: 0 additions & 49 deletions config/storybook/preview.js

This file was deleted.

78 changes: 78 additions & 0 deletions config/storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import Vue from 'vue'
import { addParameters, addDecorator } from '@storybook/vue'
import { withA11y } from '@storybook/addon-a11y'
import { DocsPage } from '@storybook/addon-docs/blocks'
import ElColorPicker from 'element-ui/lib/color-picker'

import '../../src/styles/index.scss'
import './index.scss'
import './neu-theme-variables.scss'

import Theme from '../../src/types/Theme'
import DesignSystem from '../../src/types/DesignSystem'
import mainStore from '../../src/store'
import { setTheme, switchTheme, setDesignSystem } from '../../src/utils'
import { ElementUIPlugin } from '../../src/plugins'
import { SDesignSystemProvider, SButton, SCheckbox } from '../../src/components'

Vue.use(ElementUIPlugin)
Vue.use(ElColorPicker)
setTheme()
document.documentElement.style.setProperty('color', 'var(--s-color-base-content-primary)')
document.documentElement.style.setProperty('background-color', 'var(--s-color-utility-body)')

addParameters({
options: {
showRoots: true
},
docs: { page: DocsPage },
dependencies: {
// display only dependencies/dependents that have a story in storybook
// by default this is false
withStoriesOnly: true,

// completely hide a dependency/dependents block if it has no elements
// by default this is false
hideEmpty: true
}
})

addDecorator(withA11y)
const neuLabelCode = '%F0%9F%9F%A3'
addDecorator(() => ({
components: { SDesignSystemProvider, SButton, SCheckbox },
template: `<s-design-system-provider :value="designSystem" class="s-flex" style="flex-direction: column;">
<div class="s-flex" style="align-items: center; justify-content: flex-end; margin-right: 10px;">
<s-checkbox
style="margin-right: 10px;"
label="NEUMORPHISM"
:value="!!designSystem"
@change="(value) => handleDesignSystemChange(designSystem)"
/>
<s-button
type="action"
rounded
:icon="theme === 'light' ? 'various-brightness-low-24' : 'various-moon-24'"
@click="handleThemeChange"
/>
</div>
<div class="s-flex" style="padding: 20px;">
<story />
</div>
</s-design-system-provider>`,
store: mainStore,
computed: {
// hasNeumorphicMode: () => window.location.href.includes(neuLabelCode) || window.location.href.includes('🟣'), // Set v-if="hasNeumorphicMode" if needed
theme: () => mainStore?.getters?.libraryTheme as Theme,
designSystem: () => mainStore?.getters?.libraryDesignSystem as DesignSystem
},
methods: {
handleThemeChange: () => {
switchTheme()
},
handleDesignSystemChange: (designSystem: DesignSystem) => {
const newDesignSystem = designSystem === DesignSystem.DEFAULT ? DesignSystem.NEUMORPHIC : DesignSystem.DEFAULT
setDesignSystem(newDesignSystem)
}
}
}))
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.13",
"version": "1.0.14",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu/"
Expand Down
27 changes: 21 additions & 6 deletions src/components/Tooltip/STooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
:open-delay="openDelay"
:popper-class="computedPopperClass"
:manual="manual"
:hide-after="closeDelay"
:hide-after="hideAfter"
:tabindex="tabindex"
>
<slot slot="content" name="content"></slot>
Expand Down Expand Up @@ -105,6 +105,12 @@ export default class STooltip extends Mixins(BorderRadiusMixin, DesignSystemInje
* `0` by default
*/
@Prop({ default: 0, type: Number }) readonly closeDelay!: number
/**
* Timeout in milliseconds to hide tooltip after appearing.
*
* `0` by default
*/
@Prop({ default: 0, type: Number }) readonly hideAfter!: number
/**
* Tabindex of the tooltip.
*
Expand Down Expand Up @@ -142,12 +148,13 @@ export default class STooltip extends Mixins(BorderRadiusMixin, DesignSystemInje
this.$emit('change', value)
}

@Watch('closeDelay')
private handleChangeCloseDelay (value: number): void {
this.updateCloseDelay(value)
}

mounted (): void {
const tooltip = this.tooltip
if (!tooltip) {
return
}
tooltip.debounceClose = debounce(200, tooltip.handleClosePopper)
this.updateCloseDelay(this.closeDelay)
}

get computedTheme (): string {
Expand All @@ -160,5 +167,13 @@ export default class STooltip extends Mixins(BorderRadiusMixin, DesignSystemInje
}
return this.theme
}

updateCloseDelay (value: number): void {
const tooltip = this.tooltip
if (!tooltip) {
return
}
tooltip.debounceClose = debounce(value, tooltip.handleClosePopper)
}
}
</script>
2 changes: 1 addition & 1 deletion src/stories/Collapse/SCollapse.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BorderTypes } from '../../components/Collapse'

export default {
component: SCollapse,
title: 'Design System/Components/Collapse',
title: 'Design System/Components/Collapse 🟣',
decorators: [withKnobs]
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Collapse/SCollapseItem.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SCollapse, SCollapseItem } from '../../components'

export default {
component: SCollapseItem,
title: 'Design System/Components/Collapse/Collapse Item',
title: 'Design System/Components/Collapse 🟣/Collapse Item',
decorators: [withKnobs]
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Form/SForm.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LabelPosition } from '../../components/Form'

export default {
component: SForm,
title: 'Design System/Components/Form',
title: 'Design System/Components/Form 🟣',
decorators: [withKnobs]
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Form/SFormItem.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SButton, SForm, SFormItem, SInput } from '../../components'

export default {
component: SFormItem,
title: 'Design System/Components/Form/Form Item',
title: 'Design System/Components/Form 🟣/Form Item',
decorators: [withKnobs]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { number, text, boolean, object, withKnobs } from '@storybook/addon-knobs'

import { SFloatInput, SRow } from '../components'
import { SFloatInput, SRow } from '../../components'

export default {
component: SFloatInput,
title: 'Design System/Components/Input/Float',
title: 'Design System/Components/Input 🟣/Float',
decorators: [withKnobs]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { text, boolean, withKnobs, number, select } from '@storybook/addon-knobs'

import { SInput, SRow, SCol } from '../components'
import { InputType, InputSize } from '../components/Input'
import { BorderRadius } from '../types'
import { SInput, SRow, SCol } from '../../components'
import { InputType, InputSize } from '../../components/Input'
import { BorderRadius } from '../../types'

export default {
component: SInput,
title: 'Design System/Components/Input',
title: 'Design System/Components/Input 🟣',
decorators: [withKnobs],
excludeStories: /.*Data$/
}
Expand Down
2 changes: 1 addition & 1 deletion src/stories/SButton.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Size, BorderRadius } from '../types'

export default {
component: SButton,
title: 'Design System/Components/Button',
title: 'Design System/Components/Button 🟣',
decorators: [withKnobs],
excludeStories: /.*Data$/
}
Expand Down
2 changes: 1 addition & 1 deletion src/stories/SCard.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BorderRadius, Status, Size } from '../types'

export default {
component: SCard,
title: 'Design System/Components/Card',
title: 'Design System/Components/Card 🟣',
decorators: [withKnobs]
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/SDialog.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BorderRadius } from '../types'

export default {
component: SDialog,
title: 'Design System/Components/Dialog',
title: 'Design System/Components/Dialog 🟣',
decorators: [withKnobs]
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/SRadio.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Size } from '../types'

export default {
component: SRadio,
title: 'Design System/Components/Radio',
title: 'Design System/Components/Radio 🟣',
decorators: [withKnobs],
excludeStories: /.*Data$/
}
Expand Down
4 changes: 2 additions & 2 deletions src/stories/SSwitch.stories.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { text, number, boolean, select, withKnobs } from '@storybook/addon-knobs'
import { text, number, boolean, withKnobs } from '@storybook/addon-knobs'

import { SSwitch } from '../components'

export default {
component: SSwitch,
title: 'Design System/Components/Switch',
title: 'Design System/Components/Switch 🟣',
decorators: [withKnobs],
excludeStories: /.*Data$/
}
Expand Down
12 changes: 10 additions & 2 deletions src/stories/STooltip.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BorderRadius } from '../types'

export default {
component: STooltip,
title: 'Design System/Components/Tooltip',
title: 'Design System/Components/Tooltip 🟣',
decorators: [withKnobs],
excludeStories: /.*Data$/
}
Expand All @@ -21,7 +21,9 @@ export const configurable = () => ({
:disabled="disabled"
:border-radius="borderRadius"
:offset="offset"
:openDelay="openDelay"
:open-delay="openDelay"
:close-delay="closeDelay"
:hide-after="hideAfter"
@change="handleChange"
>
<s-button style="margin: 40px">Custom tooltip</s-button>
Expand All @@ -48,6 +50,12 @@ export const configurable = () => ({
},
openDelay: {
default: number('Open delay', 0)
},
closeDelay: {
default: number('Close delay', 0)
},
hideAfter: {
default: number('Hide after', 0)
}
},
methods: {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Tab/STabs.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BorderRadius } from '../../types'

export default {
component: STabs,
title: 'Design System/Components/Tabs',
title: 'Design System/Components/Tabs 🟣',
decorators: [withKnobs]
}

Expand Down
5 changes: 5 additions & 0 deletions src/styles/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
.el-table thead {
color: var(--s-color-base-content-tertiary);
}
.el-table__empty-block {
.el-table__empty-text {
color: var(--s-color-base-content-tertiary);
}
}
.el-table--group,
.el-table--border,
.el-table th.is-leaf,
Expand Down