@policystudio/policy-studio-ui-vue 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/psui_styles.css +4752 -586
- package/package.json +1 -1
- package/src/assets/scss/base.scss +38 -3
- package/src/assets/scss/components/PsButton.scss +114 -120
- package/src/assets/scss/components/PsCardInfos.scss +26 -0
- package/src/assets/scss/components/PsChartLegend.scss +25 -0
- package/src/assets/scss/components/PsCheckbox.scss +96 -0
- package/src/assets/scss/components/PsChips.scss +155 -0
- package/src/assets/scss/components/PsClimateZoneBadge.scss +26 -0
- package/src/assets/scss/components/PsCostEffectBar.scss +31 -0
- package/src/assets/scss/components/PsDataTable.scss +50 -0
- package/src/assets/scss/components/PsDropdown.scss +44 -0
- package/src/assets/scss/components/PsHighlightRippleDot.scss +48 -0
- package/src/assets/scss/components/PsInlineSelector.scss +5 -0
- package/src/assets/scss/components/PsInputSelect.scss +62 -0
- package/src/assets/scss/components/PsInputTextArea.scss +49 -0
- package/src/assets/scss/components/PsProgressBar.scss +24 -0
- package/src/assets/scss/components/PsRadioButton.scss +78 -0
- package/src/assets/scss/components/PsSlider.scss +11 -0
- package/src/assets/scss/components/PsSwitch.scss +66 -0
- package/src/assets/scss/components/PsTabHeader.scss +10 -3
- package/src/assets/scss/components/PsToast.scss +52 -0
- package/src/assets/scss/components/PsToggle.scss +23 -0
- package/src/assets/scss/components/PsTooltip.scss +118 -0
- package/src/components/badges-and-tags/PsCardInfos.vue +14 -7
- package/src/components/badges-and-tags/PsChartLegend.vue +7 -13
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +15 -6
- package/src/components/badges-and-tags/PsCostEffectBar.Copy.vue +72 -0
- package/src/components/badges-and-tags/PsCostEffectBar.vue +33 -70
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -69
- package/src/components/badges-and-tags/PsProgressBar.vue +42 -0
- package/src/components/buttons/PsButton.vue +74 -78
- package/src/components/chips/PsChips.vue +46 -87
- package/src/components/controls/PsCheckbox.vue +58 -134
- package/src/components/controls/PsInlineSelector.vue +15 -0
- package/src/components/controls/PsRadioButton.vue +33 -88
- package/src/components/controls/PsSlider.vue +4 -5
- package/src/components/controls/PsSwitch.vue +29 -81
- package/src/components/controls/PsToggle.vue +45 -39
- package/src/components/datatable/PsDataTable.vue +3 -15
- package/src/components/forms/PsDropdown.vue +27 -11
- package/src/components/forms/PsInputSelect.vue +80 -0
- package/src/components/forms/PsInputTextArea.vue +80 -0
- package/src/components/notifications/PsDialog.vue +3 -0
- package/src/components/notifications/PsToast.vue +13 -28
- package/src/components/tabs/PsTabHeader.vue +30 -12
- package/src/components/tooltip/PsDialogTooltip.vue +6 -31
- package/src/components/tooltip/PsRichTooltip.vue +37 -44
- package/src/components/tooltip/PsTooltip.vue +18 -28
- package/src/components/ui/PsIcon.vue +9 -9
- package/src/index.js +9 -0
- package/src/stories/Button.stories.js +102 -112
- package/src/stories/Checkbox.stories.js +34 -37
- package/src/stories/Chips.stories.js +43 -54
- package/src/stories/ClimateZoneBadge.stories.js +0 -7
- package/src/stories/InlineSelector.stories.js +16 -0
- package/src/stories/InputSelect.stories.js +22 -0
- package/src/stories/InputTextArea.stories.js +25 -0
- package/src/stories/RadioButton.stories.js +32 -29
- package/src/stories/Switch.stories.js +33 -0
- package/src/stories/Toast.stories.js +40 -46
- package/src/stories/Tooltip.stories.js +86 -86
- package/tailwind.config.js +7 -1
- package/src/assets/images/check-checkbox-button.svg +0 -1
- package/src/assets/images/radio-checked-button.svg +0 -1
- package/src/stories/Swith.stories.js +0 -38
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div @mouseover="open" @mouseleave="close" ref="tooltip">
|
|
3
|
-
<div ref="tooltiptrigger">
|
|
2
|
+
<div @mouseover="open" @mouseleave="close" ref="tooltip" class='psui-el-tooltip'>
|
|
3
|
+
<div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
|
|
4
4
|
<slot name="trigger"></slot>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
|
-
<div class=
|
|
7
|
+
<div class='psui-el-tooltip-wrapper'>
|
|
8
8
|
<div
|
|
9
9
|
role="menu"
|
|
10
10
|
ref="dialog"
|
|
11
|
-
class=
|
|
12
|
-
|
|
13
|
-
psui-hidden
|
|
14
|
-
psui-opacity-0
|
|
15
|
-
psui-transition-opacity
|
|
16
|
-
psui-duration-500
|
|
17
|
-
psui-ease-in-out
|
|
18
|
-
"
|
|
11
|
+
class='psui-el-tooltip-dialog'
|
|
12
|
+
:class="cssClass"
|
|
19
13
|
>
|
|
20
14
|
<div
|
|
21
|
-
class="
|
|
22
|
-
psui-flex
|
|
23
|
-
psui-flex-col
|
|
24
|
-
psui-rounded-md
|
|
25
|
-
psui-shadow-md
|
|
26
|
-
psui-z-20
|
|
27
|
-
psui-p-4
|
|
28
|
-
"
|
|
15
|
+
class="psui-el-tooltip-content"
|
|
29
16
|
aria-orientation="vertical"
|
|
30
|
-
:class="
|
|
17
|
+
:class="getComponentClass"
|
|
31
18
|
>
|
|
32
|
-
<h2 v-if="title"
|
|
33
|
-
<
|
|
34
|
-
>
|
|
35
|
-
</
|
|
36
|
-
>
|
|
19
|
+
<h2 v-if="title">{{ title}}</h2>
|
|
20
|
+
<div class="psui-el-tooltip-content-wrapper">
|
|
21
|
+
<slot name="content"></slot>
|
|
22
|
+
</div>
|
|
37
23
|
</div>
|
|
38
24
|
</div>
|
|
39
25
|
</div>
|
|
@@ -51,12 +37,11 @@ export default {
|
|
|
51
37
|
type: Boolean,
|
|
52
38
|
default: false,
|
|
53
39
|
},
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
layout:{
|
|
41
|
+
type: String,
|
|
56
42
|
},
|
|
57
43
|
cssClass:{
|
|
58
44
|
type: String,
|
|
59
|
-
default: 'psui-bg-gray-50 psui-text-white'
|
|
60
45
|
}
|
|
61
46
|
},
|
|
62
47
|
inheritAttrs: true,
|
|
@@ -67,6 +52,11 @@ export default {
|
|
|
67
52
|
closingTimeout: null,
|
|
68
53
|
}
|
|
69
54
|
},
|
|
55
|
+
computed:{
|
|
56
|
+
getComponentClass(){
|
|
57
|
+
return `layout-${this.layout}`
|
|
58
|
+
}
|
|
59
|
+
},
|
|
70
60
|
mounted() {
|
|
71
61
|
document.addEventListener("resize", this.updatePosition)
|
|
72
62
|
},
|
|
@@ -27,7 +27,7 @@ export default {
|
|
|
27
27
|
props: {
|
|
28
28
|
icon: {
|
|
29
29
|
type: String,
|
|
30
|
-
|
|
30
|
+
default: 'more_horiz'
|
|
31
31
|
},
|
|
32
32
|
type: {
|
|
33
33
|
type: String,
|
|
@@ -39,11 +39,11 @@ export default {
|
|
|
39
39
|
type: [Number, String],
|
|
40
40
|
},
|
|
41
41
|
width: {
|
|
42
|
-
type: Number,
|
|
42
|
+
type: [Number, String],
|
|
43
43
|
default: 24
|
|
44
44
|
},
|
|
45
45
|
height: {
|
|
46
|
-
type: Number,
|
|
46
|
+
type: [Number, String],
|
|
47
47
|
default: 24
|
|
48
48
|
},
|
|
49
49
|
stroke: {
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
type: String,
|
|
55
55
|
default: null,
|
|
56
56
|
validator: value => {
|
|
57
|
-
return value
|
|
57
|
+
return value?.includes('psui-text-') &&
|
|
58
58
|
typeof(tailwindConfig.theme.colors[value.replace('psui-text-', '')]) != 'undefined' ||
|
|
59
59
|
typeof(tailwindConfig.theme.colors[value]) != 'undefined'
|
|
60
60
|
}
|
|
@@ -78,15 +78,15 @@ export default {
|
|
|
78
78
|
getIconType() {
|
|
79
79
|
if(this.imageLoadError || !this.finishedImageLoad) return 'material-icons'
|
|
80
80
|
if(this.type) return this.type
|
|
81
|
-
if(!this.icon
|
|
82
|
-
if(!this.icon
|
|
81
|
+
if(!this.icon?.includes('/')) return 'material-icons'
|
|
82
|
+
if(!this.icon?.includes('.svg')) return 'url'
|
|
83
83
|
return 'svg'
|
|
84
84
|
},
|
|
85
85
|
getIcon() {
|
|
86
|
-
if(!this.icon
|
|
86
|
+
if(!this.icon?.includes('/')) return this.icon ? this.icon : this.loaderErrorIcon
|
|
87
87
|
if(!this.finishedImageLoad && !this.imageLoadError && this.loaderIcon) return this.loaderIcon
|
|
88
88
|
if(this.imageLoadError) return this.loaderErrorIcon
|
|
89
|
-
return this.icon ? this.icon :
|
|
89
|
+
return this.icon ? this.icon : this.loaderErrorIcon
|
|
90
90
|
},
|
|
91
91
|
getIconClasses() {
|
|
92
92
|
if(this.iconClasses) return this.iconClasses
|
|
@@ -111,7 +111,7 @@ export default {
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
mounted() {
|
|
114
|
-
if(this.icon
|
|
114
|
+
if(this.icon?.includes('/')) this.loadImage()
|
|
115
115
|
},
|
|
116
116
|
methods: {
|
|
117
117
|
loadImage() {
|
package/src/index.js
CHANGED
|
@@ -20,6 +20,9 @@ import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
|
|
|
20
20
|
import PsDraggable from './components/controls/PsDraggable.vue'
|
|
21
21
|
import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
|
|
22
22
|
import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
|
|
23
|
+
import PsInlineSelector from './components/controls/PsInlineSelector.vue'
|
|
24
|
+
import PsInputTextArea from './components/forms/PsInputTextArea.vue'
|
|
25
|
+
import PsInputSelect from './components/forms/PsInputSelect.vue'
|
|
23
26
|
|
|
24
27
|
export default {
|
|
25
28
|
install(Vue) {
|
|
@@ -45,6 +48,9 @@ export default {
|
|
|
45
48
|
Vue.component('PsDraggable', PsDraggable)
|
|
46
49
|
Vue.component('PsCardInfos', PsCardInfos)
|
|
47
50
|
Vue.component('PsChartLegend', PsChartLegend)
|
|
51
|
+
Vue.component('PsInlineSelector', PsInlineSelector)
|
|
52
|
+
Vue.component('PsInputTextArea', PsInputTextArea)
|
|
53
|
+
Vue.component('PsInputSelect', PsInputSelect)
|
|
48
54
|
},
|
|
49
55
|
}
|
|
50
56
|
|
|
@@ -70,4 +76,7 @@ export {
|
|
|
70
76
|
PsDraggable,
|
|
71
77
|
PsCardInfos,
|
|
72
78
|
PsChartLegend,
|
|
79
|
+
PsInlineSelector,
|
|
80
|
+
PsInputTextArea,
|
|
81
|
+
PsInputSelect
|
|
73
82
|
}
|
|
@@ -1,112 +1,102 @@
|
|
|
1
|
-
import PsButton, { sizes } from '../components/buttons/PsButton.vue'
|
|
2
|
-
const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Button',
|
|
5
|
-
component: PsButton,
|
|
6
|
-
argTypes: {
|
|
7
|
-
size: { control: { type: 'select', options: sizes } },
|
|
8
|
-
disabled: { control: 'boolean' },
|
|
9
|
-
icon: { control: { type: 'select', options: icons} },
|
|
10
|
-
iconRight: { control: { type: 'select', options: icons} }
|
|
11
|
-
},
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const TemplateDefault = (args, {argTypes}) => ({
|
|
15
|
-
props: Object.keys(argTypes),
|
|
16
|
-
components: { PsButton },
|
|
17
|
-
template: `
|
|
18
|
-
<div style="display:flex; flex-direction: column;">
|
|
19
|
-
<p>Size: Big</p>
|
|
20
|
-
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
21
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;"
|
|
22
|
-
<span style="text-align: center; color: red;">Solid Style</span>
|
|
23
|
-
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left'/>
|
|
24
|
-
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right'/>
|
|
25
|
-
<PsButton label='Text Only' layout='solid' />
|
|
26
|
-
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled/>
|
|
27
|
-
</div>
|
|
28
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
29
|
-
<span style="text-align: center; color: blue;">Outline Style</span>
|
|
30
|
-
<PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
|
|
31
|
-
<PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
|
|
32
|
-
<PsButton label='Text Only' layout='outline'/>
|
|
33
|
-
<PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
|
|
34
|
-
</div>
|
|
35
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
36
|
-
<span style="text-align: center; color: brown;">Ghost Style</span>
|
|
37
|
-
<PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
|
|
38
|
-
<PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
|
|
39
|
-
<PsButton label='Text Only' layout='ghost' />
|
|
40
|
-
<PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
|
|
41
|
-
</div>
|
|
42
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
43
|
-
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
44
|
-
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
|
|
45
|
-
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
|
|
46
|
-
<PsButton label='Text Only' layout='onlytext'/>
|
|
47
|
-
<PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<p>Size: Medium</p>
|
|
51
|
-
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
52
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
53
|
-
<span style="text-align: center; color: red;">Solid Style</span>
|
|
54
|
-
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
|
|
55
|
-
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
|
|
56
|
-
<PsButton label='Text Only' layout='solid' size='medium'/>
|
|
57
|
-
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
58
|
-
</div>
|
|
59
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
60
|
-
<span style="text-align: center; color: blue;">Outline Style</span>
|
|
61
|
-
<PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
|
|
62
|
-
<PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
|
|
63
|
-
<PsButton label='Text Only' layout='outline' size='medium'/>
|
|
64
|
-
<PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
65
|
-
</div>
|
|
66
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
67
|
-
<span style="text-align: center; color: brown;">Ghost Style</span>
|
|
68
|
-
<PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
|
|
69
|
-
<PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
|
|
70
|
-
<PsButton label='Text Only' layout='ghost' size='medium'/>
|
|
71
|
-
<PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
72
|
-
</div>
|
|
73
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
74
|
-
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
75
|
-
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
|
|
76
|
-
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
|
|
77
|
-
<PsButton label='Text Only' layout='onlytext' size='medium'/>
|
|
78
|
-
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
<p>Size: Small</p>
|
|
82
|
-
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
83
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
84
|
-
<span style="text-align: center; color: red;">Solid Style</span>
|
|
85
|
-
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
|
|
86
|
-
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
|
|
87
|
-
<PsButton label='Text Only' layout='solid' size='small'/>
|
|
88
|
-
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
|
|
89
|
-
</div>
|
|
90
|
-
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
91
|
-
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
92
|
-
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
|
|
93
|
-
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
|
|
94
|
-
<PsButton label='Text Only' layout='onlytext' size='small'/>
|
|
95
|
-
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
|
|
104
|
-
<PsButton label='Text Only' layout='onlytext'/>
|
|
105
|
-
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' />
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
`
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
export const Default = TemplateDefault.bind({})
|
|
1
|
+
import PsButton, { sizes } from '../components/buttons/PsButton.vue'
|
|
2
|
+
const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Button',
|
|
5
|
+
component: PsButton,
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: { control: { type: 'select', options: sizes } },
|
|
8
|
+
disabled: { control: 'boolean' },
|
|
9
|
+
icon: { control: { type: 'select', options: icons} },
|
|
10
|
+
iconRight: { control: { type: 'select', options: icons} }
|
|
11
|
+
},
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const TemplateDefault = (args, {argTypes}) => ({
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: { PsButton },
|
|
17
|
+
template: `
|
|
18
|
+
<div style="display:flex; flex-direction: column;">
|
|
19
|
+
<p>Size: Big</p>
|
|
20
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
21
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;">
|
|
22
|
+
<span style="text-align: center; color: red;">Solid Style</span>
|
|
23
|
+
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left'/>
|
|
24
|
+
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right'/>
|
|
25
|
+
<PsButton label='Text Only' layout='solid' />
|
|
26
|
+
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled/>
|
|
27
|
+
</div>
|
|
28
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
29
|
+
<span style="text-align: center; color: blue;">Outline Style</span>
|
|
30
|
+
<PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
|
|
31
|
+
<PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
|
|
32
|
+
<PsButton label='Text Only' layout='outline'/>
|
|
33
|
+
<PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
|
|
34
|
+
</div>
|
|
35
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
36
|
+
<span style="text-align: center; color: brown;">Ghost Style</span>
|
|
37
|
+
<PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
|
|
38
|
+
<PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
|
|
39
|
+
<PsButton label='Text Only' layout='ghost' />
|
|
40
|
+
<PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
|
|
41
|
+
</div>
|
|
42
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
43
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
44
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
|
|
45
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
|
|
46
|
+
<PsButton label='Text Only' layout='onlytext'/>
|
|
47
|
+
<PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<p>Size: Medium</p>
|
|
51
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
52
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
53
|
+
<span style="text-align: center; color: red;">Solid Style</span>
|
|
54
|
+
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
|
|
55
|
+
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
|
|
56
|
+
<PsButton label='Text Only' layout='solid' size='medium'/>
|
|
57
|
+
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
58
|
+
</div>
|
|
59
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
60
|
+
<span style="text-align: center; color: blue;">Outline Style</span>
|
|
61
|
+
<PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
|
|
62
|
+
<PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
|
|
63
|
+
<PsButton label='Text Only' layout='outline' size='medium'/>
|
|
64
|
+
<PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
65
|
+
</div>
|
|
66
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
67
|
+
<span style="text-align: center; color: brown;">Ghost Style</span>
|
|
68
|
+
<PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
|
|
69
|
+
<PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
|
|
70
|
+
<PsButton label='Text Only' layout='ghost' size='medium'/>
|
|
71
|
+
<PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
72
|
+
</div>
|
|
73
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
74
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
75
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
|
|
76
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
|
|
77
|
+
<PsButton label='Text Only' layout='onlytext' size='medium'/>
|
|
78
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<p>Size: Small</p>
|
|
82
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
83
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
84
|
+
<span style="text-align: center; color: red;">Solid Style</span>
|
|
85
|
+
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
|
|
86
|
+
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
|
|
87
|
+
<PsButton label='Text Only' layout='solid' size='small'/>
|
|
88
|
+
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
|
|
89
|
+
</div>
|
|
90
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
91
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
92
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
|
|
93
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
|
|
94
|
+
<PsButton label='Text Only' layout='onlytext' size='small'/>
|
|
95
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
`
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
export const Default = TemplateDefault.bind({})
|
|
@@ -3,46 +3,43 @@ import PsCheckbox from '../components/controls/PsCheckbox.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Checkbox',
|
|
5
5
|
component: PsCheckbox,
|
|
6
|
-
argTypes: {
|
|
7
|
-
disabled: { control: 'boolean' },
|
|
8
|
-
},
|
|
9
6
|
}
|
|
10
7
|
|
|
11
|
-
const
|
|
8
|
+
const defaultTemplate = (args, {argTypes}) => ({
|
|
12
9
|
props: Object.keys(argTypes),
|
|
13
|
-
components: { PsCheckbox
|
|
14
|
-
data: () => {
|
|
15
|
-
return {
|
|
16
|
-
items: {
|
|
17
|
-
BUILDING_TYPE: {
|
|
18
|
-
label: 'Building Type',
|
|
19
|
-
key: 'BUILDING_TYPE'
|
|
20
|
-
},
|
|
21
|
-
CLIMATE_ZONE: {
|
|
22
|
-
label: 'Climate Zone',
|
|
23
|
-
key: 'CLIMATE_ZONE'
|
|
24
|
-
},
|
|
25
|
-
YEAR: {
|
|
26
|
-
label: "Year",
|
|
27
|
-
key: "YEAR"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
selected: []
|
|
31
|
-
}
|
|
32
|
-
},
|
|
10
|
+
components: { PsCheckbox},
|
|
33
11
|
template: `
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
<div style='display:flex; gap: 20px;'>
|
|
13
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
14
|
+
<p>Resting</p>
|
|
15
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
16
|
+
<PsCheckbox v-bind="$props" label='Label 1' />
|
|
17
|
+
<PsCheckbox v-bind="$props" label='Label 2' size='small' />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
21
|
+
<p>Active</p>
|
|
22
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
23
|
+
<PsCheckbox v-bind="$props" label='Label 3' checked />
|
|
24
|
+
<PsCheckbox v-bind="$props" label='Label 4' checked size='small'/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
28
|
+
<p>Mixed</p>
|
|
29
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
30
|
+
<PsCheckbox v-bind="$props" label='Label 5' layout='mixed' checked />
|
|
31
|
+
<PsCheckbox v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
35
|
+
<p>Disabled</p>
|
|
36
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
37
|
+
<PsCheckbox v-bind="$props" label='Label 7' disabled/>
|
|
38
|
+
<PsCheckbox v-bind="$props" label='Label 8' size='small' disabled/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
`
|
|
39
43
|
})
|
|
40
44
|
|
|
41
|
-
export const Default =
|
|
42
|
-
Default.args = {
|
|
43
|
-
size: 18,
|
|
44
|
-
disabled: false,
|
|
45
|
-
label: 'Label',
|
|
46
|
-
labelClasses: '',
|
|
47
|
-
}
|
|
48
|
-
|
|
45
|
+
export const Default = defaultTemplate.bind({})
|
|
@@ -1,55 +1,44 @@
|
|
|
1
|
-
import PsChips from "../components/chips/PsChips.vue"
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Simple
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Checkbox.args = {
|
|
45
|
-
title: 'Checkbox Chip',
|
|
46
|
-
type: 'checkbox'
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const Rich = Template.bind({})
|
|
50
|
-
Rich.args = {
|
|
51
|
-
title: 'Rich chips',
|
|
52
|
-
type: 'text',
|
|
53
|
-
icon: 'description',
|
|
54
|
-
rich: true
|
|
1
|
+
import PsChips from "../components/chips/PsChips.vue"
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Chips',
|
|
5
|
+
component: PsChips,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsChips },
|
|
11
|
+
data: ()=>{
|
|
12
|
+
return{
|
|
13
|
+
isChecked: null,
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
template: `<div >
|
|
17
|
+
<PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
18
|
+
</div>
|
|
19
|
+
`
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export const Simple = Template.bind({})
|
|
23
|
+
Simple.args = {
|
|
24
|
+
label: 'Simple Chip',
|
|
25
|
+
icon:"",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const SimpleWithIcon = Template.bind({})
|
|
29
|
+
SimpleWithIcon.args = {
|
|
30
|
+
label: 'Simple With Icon',
|
|
31
|
+
icon: 'home',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const Radio = Template.bind({})
|
|
35
|
+
Radio.args = {
|
|
36
|
+
label: 'Radio Chip',
|
|
37
|
+
type:'radio'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Checkbox = Template.bind({})
|
|
41
|
+
Checkbox.args = {
|
|
42
|
+
label: 'Checkbox Chip',
|
|
43
|
+
type: 'checkbox'
|
|
55
44
|
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import PsClimateZoneBadge from '../components/badges-and-tags/PsClimateZoneBadge.vue'
|
|
2
2
|
|
|
3
|
-
// const icons = ["area_chart"];
|
|
4
|
-
|
|
5
3
|
export default {
|
|
6
4
|
title: 'Components/ClimateZoneBadge',
|
|
7
5
|
component: PsClimateZoneBadge,
|
|
8
|
-
argTypes: {
|
|
9
|
-
type: {
|
|
10
|
-
// icon: { control: { type: "select", options: icons } },
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
6
|
}
|
|
14
7
|
|
|
15
8
|
const Template = (args, { argTypes }) => ({
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import PsInlineSelector from "../components/controls/PsInlineSelector.vue"
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/InlineSelector',
|
|
5
|
+
component: PsInlineSelector,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const TemplateDefault = (args, {argTypes}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: {PsInlineSelector},
|
|
11
|
+
template: `
|
|
12
|
+
<PsInlineSelector v-bind="$props"></PsInlineSelector>
|
|
13
|
+
`
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export const Default = TemplateDefault.bind({})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import PsInputSelect from '../components/forms/PsInputSelect.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/InputSelect',
|
|
5
|
+
component: PsInputSelect
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const TemplateDefault = (args, {argTypes})=> ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: {PsInputSelect},
|
|
11
|
+
template: `
|
|
12
|
+
<div style='width:300px; display:flex; flex-direction: column; gap:20px;'>
|
|
13
|
+
<PsInputSelect v-bind="$props" label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
14
|
+
<PsInputSelect v-bind="$props" disabled label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
15
|
+
</div>
|
|
16
|
+
`
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
export const Default = TemplateDefault.bind({})
|
|
20
|
+
Default.args = {
|
|
21
|
+
items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
|
|
22
|
+
}
|