@policystudio/policy-studio-ui-vue 1.0.20 → 1.0.24
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/.storybook/main.js +9 -1
- package/dist/css/psui_styles.css +15690 -14620
- package/package.json +8 -3
- package/postcss.config.js +2 -0
- package/src/assets/scss/base.scss +10 -3
- package/src/assets/scss/components/PsAccordion.scss +63 -0
- package/src/assets/scss/components/PsButton.scss +145 -0
- package/src/assets/scss/components/PsInput.scss +104 -0
- package/src/components/accordion/PsAccordion.vue +30 -29
- package/src/components/accordion/PsAccordionItem.vue +29 -67
- package/src/components/badges-and-tags/PsCardInfos.vue +38 -0
- package/src/components/badges-and-tags/PsChartLegend.vue +43 -0
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +18 -0
- package/src/components/badges-and-tags/PsCostEffectBar.vue +114 -0
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +78 -0
- package/src/components/badges-and-tags/PsMiniTag.vue +46 -0
- package/src/components/badges-and-tags/PsProgressBar.vue +0 -0
- package/src/components/buttons/PsButton.vue +42 -94
- package/src/components/chips/PsChips.vue +10 -20
- package/src/components/controls/PsCheckbox.vue +29 -16
- package/src/components/controls/PsDraggable.vue +171 -25
- package/src/components/controls/PsRadioButton.vue +25 -19
- package/src/components/controls/PsToggle.vue +1 -1
- package/src/components/forms/PsInput.vue +122 -102
- package/src/components/notifications/PsDialog.vue +37 -18
- package/src/components/tabs/PsTabHeader.vue +3 -2
- package/src/components/tooltip/PsRichTooltip.vue +6 -0
- package/src/components/tooltip/PsTooltip.vue +1 -3
- package/src/index.js +15 -9
- package/src/stories/Accordion.stories.js +88 -28
- package/src/stories/Button.stories.js +83 -35
- package/src/stories/CardInfos.stories.js +16 -0
- package/src/stories/ChartLegend.stories.js +16 -0
- package/src/stories/Chips.stories.js +7 -1
- package/src/stories/ClimateZoneBadge.stories.js +24 -0
- package/src/stories/Colors.stories.mdx +1 -1
- package/src/stories/CostEffectBar.stories.js +23 -0
- package/src/stories/Dialog.stories.js +141 -8
- package/src/stories/Draggable.stories.js +4 -6
- package/src/stories/Dropdown.stories.js +3 -5
- package/src/stories/HighlightRippleDot.stories.js +16 -0
- package/src/stories/Input.stories.js +61 -9
- package/src/stories/MiniTag.stories.js +46 -0
- package/src/stories/ProgressBar.stories.js +23 -0
- package/src/stories/RadioButton.stories.js +2 -2
- package/src/stories/Toggle.stories.js +7 -8
- package/src/stories/Tooltip.stories.js +5 -4
- package/src/util/GeneralFunctions.js +6 -7
- package/src/util/imageLoader.js +1 -1
- package/tailwind.config.js +71 -48
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
class="
|
|
22
22
|
psui-flex
|
|
23
23
|
psui-flex-col
|
|
24
|
-
psui-py-1
|
|
25
|
-
psui-px-2
|
|
26
24
|
psui-rounded-md
|
|
27
25
|
psui-shadow-md
|
|
28
26
|
psui-z-20
|
|
27
|
+
psui-p-4
|
|
29
28
|
"
|
|
30
29
|
aria-orientation="vertical"
|
|
31
30
|
:class="cssClass"
|
|
@@ -69,7 +68,6 @@ export default {
|
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
70
|
mounted() {
|
|
72
|
-
console.log(this.$attrs)
|
|
73
71
|
document.addEventListener("resize", this.updatePosition)
|
|
74
72
|
},
|
|
75
73
|
beforeDestroy() {
|
package/src/index.js
CHANGED
|
@@ -18,15 +18,17 @@ import PsTooltip from './components/tooltip/PsTooltip.vue'
|
|
|
18
18
|
import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
|
|
19
19
|
import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
|
|
20
20
|
import PsDraggable from './components/controls/PsDraggable.vue'
|
|
21
|
+
// import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
|
|
22
|
+
import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
|
|
21
23
|
|
|
22
24
|
export default {
|
|
23
25
|
install(Vue) {
|
|
24
|
-
Vue.component('PsButton',
|
|
25
|
-
Vue.component('PsCheckbox',
|
|
26
|
-
Vue.component('PsDialog',
|
|
27
|
-
Vue.component('PsToast',
|
|
28
|
-
Vue.component('PsTabHeader',
|
|
29
|
-
Vue.component('PsRadioButton',
|
|
26
|
+
Vue.component('PsButton', PsButton)
|
|
27
|
+
Vue.component('PsCheckbox', PsCheckbox)
|
|
28
|
+
Vue.component('PsDialog', PsDialog)
|
|
29
|
+
Vue.component('PsToast', PsToast)
|
|
30
|
+
Vue.component('PsTabHeader', PsTabHeader)
|
|
31
|
+
Vue.component('PsRadioButton', PsRadioButton)
|
|
30
32
|
Vue.component('PsSlider', PsSlider)
|
|
31
33
|
Vue.component('PsSwitch', PsSwitch)
|
|
32
34
|
Vue.component('PsInput', PsInput)
|
|
@@ -41,7 +43,9 @@ export default {
|
|
|
41
43
|
Vue.component('PsRichTooltip', PsRichTooltip)
|
|
42
44
|
Vue.component('PsDialogTooltip', PsDialogTooltip)
|
|
43
45
|
Vue.component('PsDraggable', PsDraggable)
|
|
44
|
-
|
|
46
|
+
// Vue.component('PsCardInfos', PsCardInfos)
|
|
47
|
+
Vue.component('PsChartLegend', PsChartLegend)
|
|
48
|
+
},
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
export {
|
|
@@ -63,5 +67,7 @@ export {
|
|
|
63
67
|
PsTooltip,
|
|
64
68
|
PsRichTooltip,
|
|
65
69
|
PsDialogTooltip,
|
|
66
|
-
PsDraggable
|
|
67
|
-
|
|
70
|
+
PsDraggable,
|
|
71
|
+
// PsCardInfos,
|
|
72
|
+
PsChartLegend,
|
|
73
|
+
}
|
|
@@ -1,35 +1,95 @@
|
|
|
1
|
-
import PsAccordionItem, {
|
|
2
|
-
|
|
1
|
+
import PsAccordionItem, {
|
|
2
|
+
iconTypes,
|
|
3
|
+
fontCss,
|
|
4
|
+
} from '../components/accordion/PsAccordionItem.vue'
|
|
5
|
+
import PsAccordion, { sizes } from '../components/accordion/PsAccordion.vue'
|
|
3
6
|
|
|
4
7
|
export default {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
title: 'Components/Accordion',
|
|
9
|
+
component: PsAccordion,
|
|
10
|
+
subcomponents: { PsAccordionItem },
|
|
11
|
+
argTypes: {
|
|
12
|
+
size: { control: { type: 'select', options: sizes } },
|
|
13
|
+
iconType: { control: { type: 'select', options: iconTypes } },
|
|
14
|
+
fontCss: { control: { type: 'select', options: fontCss } },
|
|
15
|
+
},
|
|
16
|
+
args: {
|
|
17
|
+
title: 'Section 1',
|
|
18
|
+
},
|
|
16
19
|
}
|
|
17
20
|
|
|
18
|
-
export const AccordionItem = (args, { argTypes }) => ({
|
|
19
|
-
props: Object.keys(argTypes, args),
|
|
20
|
-
components: { PsAccordionItem },
|
|
21
|
-
template: '<PsAccordionItem v-bind="$props"><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p></PsAccordionItem>',
|
|
22
|
-
})
|
|
23
|
-
AccordionItem.parameters = {
|
|
24
|
-
controls: {
|
|
25
|
-
include: ['title', 'iconType', 'fontCss']
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
21
|
|
|
29
|
-
export const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
export const Index = (args, { argTypes }) => ({
|
|
23
|
+
props: Object.keys(argTypes, args),
|
|
24
|
+
components: { PsAccordion, PsAccordionItem },
|
|
25
|
+
template:
|
|
26
|
+
`<div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-2 psui-gap-6">
|
|
34
27
|
|
|
28
|
+
<div>
|
|
29
|
+
<div class="psui-my-4">
|
|
30
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">Accordion Big</h1>
|
|
31
|
+
</div>
|
|
32
|
+
<PsAccordion layout="big" class="psui-bg-white">
|
|
33
|
+
<PsAccordionItem title="Header 01">
|
|
34
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
35
|
+
</PsAccordionItem>
|
|
36
|
+
<PsAccordionItem title="Header 02">
|
|
37
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
38
|
+
</PsAccordionItem>
|
|
39
|
+
<PsAccordionItem title="Header 03">
|
|
40
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
41
|
+
</PsAccordionItem>
|
|
42
|
+
</PsAccordion>
|
|
43
|
+
</div>
|
|
35
44
|
|
|
45
|
+
<div>
|
|
46
|
+
<div class="psui-my-4">
|
|
47
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">Accordion Medium</h1>
|
|
48
|
+
</div>
|
|
49
|
+
<PsAccordion layout="medium" class="psui-bg-white">
|
|
50
|
+
<PsAccordionItem title="Header 01">
|
|
51
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
52
|
+
</PsAccordionItem>
|
|
53
|
+
<PsAccordionItem title="Header 02" :opened="false">
|
|
54
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
55
|
+
</PsAccordionItem>
|
|
56
|
+
<PsAccordionItem title="Header 03">
|
|
57
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
58
|
+
</PsAccordionItem>
|
|
59
|
+
</PsAccordion>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div>
|
|
63
|
+
<div class="psui-my-4">
|
|
64
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">Variations</h1>
|
|
65
|
+
</div>
|
|
66
|
+
<PsAccordion layout="medium" class="psui-bg-white" iconOpened="thumb_down" iconClosed="thumb_up">
|
|
67
|
+
<PsAccordionItem title="Custom Icon">
|
|
68
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
69
|
+
</PsAccordionItem>
|
|
70
|
+
<PsAccordionItem title="Initial Content Opened" :opened="true">
|
|
71
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
72
|
+
</PsAccordionItem>
|
|
73
|
+
</PsAccordion>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div>
|
|
77
|
+
<div class="psui-my-4">
|
|
78
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">Custom Icons By Accordion Item</h1>
|
|
79
|
+
</div>
|
|
80
|
+
<PsAccordion layout="medium" class="psui-bg-white">
|
|
81
|
+
<PsAccordionItem title="Custom Icon" iconOpened="thumb_down" iconClosed="thumb_up">
|
|
82
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
83
|
+
</PsAccordionItem>
|
|
84
|
+
<PsAccordionItem title="Initial Content Opened" :opened="true">
|
|
85
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
86
|
+
</PsAccordionItem>
|
|
87
|
+
<PsAccordionItem title="Initial Content Opened" iconOpened="visibility_off" iconClosed="visibility_on">
|
|
88
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
|
|
89
|
+
</PsAccordionItem>
|
|
90
|
+
</PsAccordion>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
</div>
|
|
94
|
+
`,
|
|
95
|
+
})
|
|
@@ -11,44 +11,92 @@ export default {
|
|
|
11
11
|
},
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const TemplateDefault = (args, {argTypes}) => ({
|
|
15
15
|
props: Object.keys(argTypes),
|
|
16
16
|
components: { PsButton },
|
|
17
17
|
template: `
|
|
18
|
-
<
|
|
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>
|
|
19
99
|
`
|
|
20
100
|
})
|
|
21
101
|
|
|
22
|
-
export const
|
|
23
|
-
Solid.args = {
|
|
24
|
-
label: 'Solid button',
|
|
25
|
-
size: 'big',
|
|
26
|
-
disabled: false,
|
|
27
|
-
iconRight: 'add_circle'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const Outline = Template.bind({})
|
|
31
|
-
Outline.args = {
|
|
32
|
-
label: 'Outline button',
|
|
33
|
-
size: 'big',
|
|
34
|
-
disabled: false,
|
|
35
|
-
icon: 'add_circle',
|
|
36
|
-
outline: true
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const Ghost = Template.bind({})
|
|
40
|
-
Ghost.args = {
|
|
41
|
-
label: 'Ghost button',
|
|
42
|
-
size: 'big',
|
|
43
|
-
disabled: false,
|
|
44
|
-
ghost: true
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const TextOnly = Template.bind({})
|
|
48
|
-
TextOnly.args = {
|
|
49
|
-
label: 'TextOnly button',
|
|
50
|
-
disabled: false,
|
|
51
|
-
icon: 'add_circle',
|
|
52
|
-
size: 'big',
|
|
53
|
-
textOnly: true,
|
|
54
|
-
}
|
|
102
|
+
export const Default = TemplateDefault.bind({})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import PsCardInfos from '../components/badges-and-tags/PsCardInfos.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/CardInfos',
|
|
5
|
+
component: PsCardInfos,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
components: { PsCardInfos },
|
|
12
|
+
template: '<PsCardInfos v-bind="$props" />',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const CardInfos = Template.bind({})
|
|
16
|
+
CardInfos.args = {}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import PsChartLegend from '../components/badges-and-tags/PsChartLegend.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/ChartLegend',
|
|
5
|
+
component: PsChartLegend,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
components: { PsChartLegend },
|
|
12
|
+
template: '<PsChartLegend v-bind="$props" />',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const ChartLegend = Template.bind({})
|
|
16
|
+
ChartLegend.args = {}
|
|
@@ -8,8 +8,14 @@ export default {
|
|
|
8
8
|
const Template = (args, { argTypes }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsChips },
|
|
11
|
+
data: ()=>{
|
|
12
|
+
return{
|
|
13
|
+
isChecked: null,
|
|
14
|
+
}
|
|
15
|
+
},
|
|
11
16
|
template: `<div >
|
|
12
|
-
|
|
17
|
+
<PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
18
|
+
<pre>{{isChecked}}</pre>
|
|
13
19
|
</div>
|
|
14
20
|
`
|
|
15
21
|
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PsClimateZoneBadge from '../components/badges-and-tags/PsClimateZoneBadge.vue'
|
|
2
|
+
|
|
3
|
+
// const icons = ["area_chart"];
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/ClimateZoneBadge',
|
|
7
|
+
component: PsClimateZoneBadge,
|
|
8
|
+
argTypes: {
|
|
9
|
+
type: {
|
|
10
|
+
// icon: { control: { type: "select", options: icons } },
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const Template = (args, { argTypes }) => ({
|
|
16
|
+
props: Object.keys(argTypes),
|
|
17
|
+
components: { PsClimateZoneBadge },
|
|
18
|
+
template: '<PsClimateZoneBadge v-bind="$props" />',
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export const ClimateZoneBadge = Template.bind({})
|
|
22
|
+
ClimateZoneBadge.args = {
|
|
23
|
+
icon: 'area_chart',
|
|
24
|
+
}
|
|
@@ -11,7 +11,7 @@ Out colors are designed to be harmonious, ensure accessible text, and distinguis
|
|
|
11
11
|
|
|
12
12
|
## Blue
|
|
13
13
|
<div class="psui-flex">
|
|
14
|
-
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue click-to-copy" data-to-copy="psui-bg-blue">Blue
|
|
14
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue click-to-copy" data-to-copy="psui-bg-blue">Blue <div>#5094D3</div></div>
|
|
15
15
|
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-80 click-to-copy" data-to-copy="psui-bg-blue-80">Blue 80 <div>#002A3A</div></div>
|
|
16
16
|
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-70 click-to-copy" data-to-copy="psui-bg-blue-70">Blue 70 <div>#00465F</div></div>
|
|
17
17
|
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-60 click-to-copy" data-to-copy="psui-bg-blue-60">Blue 60 <div>#318FAC</div></div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import PsCostEffectBar from '../components/badges-and-tags/PsCostEffectBar.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/CostEffectBar',
|
|
5
|
+
component: PsCostEffectBar,
|
|
6
|
+
argTypes: {
|
|
7
|
+
value: {
|
|
8
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
9
|
+
},
|
|
10
|
+
breakEven: {
|
|
11
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const Template = (args, { argTypes }) => ({
|
|
17
|
+
props: Object.keys(argTypes),
|
|
18
|
+
components: { PsCostEffectBar },
|
|
19
|
+
template: '<PsCostEffectBar v-bind="$props" />',
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export const SimpleProgressBar = Template.bind({})
|
|
23
|
+
SimpleProgressBar.args = {}
|
|
@@ -3,32 +3,165 @@ import PsDialog from '../components/notifications/PsDialog.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Dialog',
|
|
5
5
|
component: PsDialog,
|
|
6
|
-
argTypes: {
|
|
7
|
-
type: { control: { type: 'select', options: ['informative', 'success', 'alert'] } },
|
|
8
|
-
},
|
|
9
6
|
}
|
|
10
7
|
|
|
11
8
|
const Template = (args, { argTypes }) => ({
|
|
12
9
|
props: Object.keys(argTypes),
|
|
13
10
|
components: { PsDialog },
|
|
14
|
-
template:
|
|
11
|
+
template: `
|
|
12
|
+
<PsDialog v-bind="$props">
|
|
13
|
+
<template v-slot:content>
|
|
14
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-slot:action>
|
|
17
|
+
<p style='font-weight: 700;'>Action</p>
|
|
18
|
+
</template>
|
|
19
|
+
</PsDialog>
|
|
20
|
+
`,
|
|
15
21
|
})
|
|
16
22
|
|
|
23
|
+
const TemplateExamples = (args, { argTypes }) => ({
|
|
24
|
+
props: Object.keys(argTypes),
|
|
25
|
+
components: { PsDialog },
|
|
26
|
+
template: `
|
|
27
|
+
<div class="psui-grid psui-grid-cols-3 psui-gap-4">
|
|
28
|
+
|
|
29
|
+
<div class="psui-col-span-3 psui-mt-8">
|
|
30
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Horizontal</h1>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div>
|
|
34
|
+
<h2>Informative</h2>
|
|
35
|
+
<PsDialog status="informative" layout="horizontal">
|
|
36
|
+
<template v-slot:content>
|
|
37
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-slot:action>
|
|
40
|
+
<p style='font-weight: 700;'>Action</p>
|
|
41
|
+
</template>
|
|
42
|
+
</PsDialog>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div>
|
|
46
|
+
<h2>Success</h2>
|
|
47
|
+
<PsDialog status="success" layout="horizontal">
|
|
48
|
+
<template v-slot:content>
|
|
49
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
50
|
+
</template>
|
|
51
|
+
<template v-slot:action>
|
|
52
|
+
<p style='font-weight: 700;'>Action</p>
|
|
53
|
+
</template>
|
|
54
|
+
</PsDialog>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div>
|
|
58
|
+
<h2>Alert</h2>
|
|
59
|
+
<PsDialog status="alert" layout="horizontal">
|
|
60
|
+
<template v-slot:content>
|
|
61
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
62
|
+
</template>
|
|
63
|
+
<template v-slot:action>
|
|
64
|
+
<p style='font-weight: 700;'>Action</p>
|
|
65
|
+
</template>
|
|
66
|
+
</PsDialog>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="psui-col-span-3 psui-mt-8">
|
|
70
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Vertical</h1>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div>
|
|
74
|
+
<h2>Informative</h2>
|
|
75
|
+
<PsDialog status="informative" layout="vertical">
|
|
76
|
+
<template v-slot:content>
|
|
77
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
78
|
+
</template>
|
|
79
|
+
<template v-slot:action>
|
|
80
|
+
<p style='font-weight: 700;'>Action</p>
|
|
81
|
+
</template>
|
|
82
|
+
</PsDialog>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div>
|
|
86
|
+
<h2>Success</h2>
|
|
87
|
+
<PsDialog status="success" layout="vertical">
|
|
88
|
+
<template v-slot:content>
|
|
89
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
90
|
+
</template>
|
|
91
|
+
<template v-slot:action>
|
|
92
|
+
<p style='font-weight: 700;'>Action</p>
|
|
93
|
+
</template>
|
|
94
|
+
</PsDialog>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div>
|
|
98
|
+
<h2>Alert</h2>
|
|
99
|
+
<PsDialog status="alert" layout="vertical">
|
|
100
|
+
<template v-slot:content>
|
|
101
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
102
|
+
</template>
|
|
103
|
+
<template v-slot:action>
|
|
104
|
+
<p style='font-weight: 700;'>Action</p>
|
|
105
|
+
</template>
|
|
106
|
+
</PsDialog>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<!-- PSDialog Vertical -->
|
|
112
|
+
<div class="psui-col-span-3 psui-mt-8">
|
|
113
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Vertical Props Message</h1>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<div>
|
|
117
|
+
<h2>Informative</h2>
|
|
118
|
+
<PsDialog status="informative" layout="vertical" message="This component uses only the props message!">
|
|
119
|
+
<template v-slot:action>
|
|
120
|
+
<p style='font-weight: 700;'>Action</p>
|
|
121
|
+
</template>
|
|
122
|
+
</PsDialog>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div>
|
|
126
|
+
<h2>Success</h2>
|
|
127
|
+
<PsDialog status="success" layout="vertical" message="This component uses only the props message!">
|
|
128
|
+
<template v-slot:action>
|
|
129
|
+
<p style='font-weight: 700;'>Action</p>
|
|
130
|
+
</template>
|
|
131
|
+
</PsDialog>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div>
|
|
135
|
+
<h2>Alert</h2>
|
|
136
|
+
<PsDialog status="alert" layout="vertical" message="This component uses only the props message!">
|
|
137
|
+
<template v-slot:action>
|
|
138
|
+
<p style='font-weight: 700;'>Action</p>
|
|
139
|
+
</template>
|
|
140
|
+
</PsDialog>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
`,
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
export const Examples = TemplateExamples.bind({})
|
|
148
|
+
|
|
17
149
|
export const Informative = Template.bind({})
|
|
18
150
|
Informative.args = {
|
|
19
|
-
|
|
20
|
-
|
|
151
|
+
status: 'informative',
|
|
152
|
+
layout: 'vertical',
|
|
153
|
+
cssClass: 'psui-w-2/3'
|
|
21
154
|
}
|
|
22
155
|
|
|
23
156
|
export const Success = Template.bind({})
|
|
24
157
|
Success.args = {
|
|
25
|
-
|
|
158
|
+
status: 'success',
|
|
26
159
|
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
27
160
|
}
|
|
28
161
|
|
|
29
162
|
export const Warning = Template.bind({})
|
|
30
163
|
Warning.args = {
|
|
31
|
-
|
|
164
|
+
status: 'alert',
|
|
32
165
|
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
33
166
|
}
|
|
34
167
|
|
|
@@ -9,16 +9,14 @@ const Template = (args, {argTypes}) => ({
|
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsDraggable },
|
|
11
11
|
template: `
|
|
12
|
-
<div style='width:
|
|
13
|
-
<PsDraggable v-bind='$props'
|
|
14
|
-
<button>Teste 1</button>
|
|
15
|
-
<button>Teste 2</button>
|
|
16
|
-
</PSDraggable>
|
|
12
|
+
<div style='width: 300px; font-family: "Lato", sans-serif; font-size: 12px;'>
|
|
13
|
+
<PsDraggable v-bind='$props'/>
|
|
17
14
|
</div>
|
|
18
15
|
`
|
|
19
16
|
})
|
|
20
17
|
|
|
21
18
|
export const Component = Template.bind({})
|
|
22
19
|
Component.args = {
|
|
23
|
-
|
|
20
|
+
getColumns: {columnGroups:[{title: 'COST EFFECTIVENESS', columns: [ 'Teste1' , 'Teste2' , 'Teste3', 'Teste4']}, {title: 'PER HOME RESULTS', columns: [ 'Teste5' , 'Teste6' , 'Teste7', 'Teste8']}]},
|
|
21
|
+
module: 'comparison'
|
|
24
22
|
}
|
|
@@ -2,8 +2,7 @@ import PsDropdown from '../components/forms/PsDropdown.vue'
|
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Components/Dropdown',
|
|
4
4
|
component: PsDropdown,
|
|
5
|
-
argTypes: {
|
|
6
|
-
},
|
|
5
|
+
argTypes: {},
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
const Template = (args, { argTypes }) => ({
|
|
@@ -24,11 +23,10 @@ const Template = (args, { argTypes }) => ({
|
|
|
24
23
|
</template>
|
|
25
24
|
</PsDropdown>
|
|
26
25
|
</div>
|
|
27
|
-
|
|
26
|
+
`,
|
|
28
27
|
})
|
|
29
28
|
|
|
30
29
|
export const CustomTrigger = Template.bind({})
|
|
31
30
|
CustomTrigger.args = {
|
|
32
|
-
title: 'Custom trigger'
|
|
31
|
+
title: 'Custom trigger',
|
|
33
32
|
}
|
|
34
|
-
|