@policystudio/policy-studio-ui-vue 1.0.30 → 1.0.33
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/.eslintrc.js +36 -35
- package/.storybook/preview.js +7 -1
- package/README.md +6 -2
- package/babel.config.js +1 -1
- package/dist/css/psui_styles.css +483 -143
- package/package.json +16 -5
- package/postcss.config.js +1 -1
- package/src/assets/images/multifamily-units.svg +10 -0
- package/src/assets/scss/base.scss +2 -0
- package/src/assets/scss/components/PsAccordion.scss +28 -11
- package/src/assets/scss/components/PsButton.scss +21 -4
- package/src/assets/scss/components/PsCardInfos.scss +1 -1
- package/src/assets/scss/components/PsCheckbox.scss +4 -5
- package/src/assets/scss/components/PsChips.scss +17 -12
- package/src/assets/scss/components/PsDataTable.scss +17 -0
- package/src/assets/scss/components/PsDialog.scss +5 -2
- package/src/assets/scss/components/PsDraggable.scss +64 -0
- package/src/assets/scss/components/PsDropdown.scss +9 -24
- package/src/assets/scss/components/PsDropdownList.scss +19 -0
- package/src/assets/scss/components/PsInput.scss +8 -3
- package/src/assets/scss/components/PsInputSelect.scss +6 -3
- package/src/assets/scss/components/PsInputTextArea.scss +5 -2
- package/src/assets/scss/components/PsRadioButton.scss +5 -5
- package/src/assets/scss/components/PsSwitch.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +14 -0
- package/src/assets/scss/components/PsToast.scss +3 -3
- package/src/assets/scss/components/PsToggle.scss +6 -2
- package/src/assets/scss/components/PsTooltip.scss +50 -18
- package/src/components/accordion/PsAccordion.vue +7 -23
- package/src/components/accordion/PsAccordionItem.vue +42 -26
- package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
- package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
- package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
- package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
- package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
- package/src/components/buttons/PsButton.vue +22 -1
- package/src/components/chips/PsChips.vue +33 -12
- package/src/components/controls/PsCheckbox.vue +32 -16
- package/src/components/controls/PsDraggable.vue +39 -150
- package/src/components/controls/PsInlineSelector.vue +30 -0
- package/src/components/controls/PsRadioButton.vue +28 -15
- package/src/components/controls/PsSwitch.vue +17 -11
- package/src/components/controls/PsToggle.vue +33 -12
- package/src/components/datatable/PsDataTable.vue +21 -1
- package/src/components/datatable/PsDataTableItem.vue +1 -1
- package/src/components/forms/PsDropdown.vue +73 -101
- package/src/components/forms/PsDropdownList.vue +82 -0
- package/src/components/forms/PsInput.vue +28 -1
- package/src/components/forms/PsInputSelect.vue +21 -0
- package/src/components/forms/PsInputTextArea.vue +54 -41
- package/src/components/notifications/PsDialog.vue +15 -0
- package/src/components/notifications/PsToast.vue +12 -0
- package/src/components/playground/PsScrollBar.vue +248 -0
- package/src/components/tabs/PsTabHeader.vue +31 -5
- package/src/components/tooltip/PsDialogTooltip.vue +107 -24
- package/src/components/tooltip/PsRichTooltip.vue +12 -9
- package/src/components/tooltip/PsTooltip.vue +27 -11
- package/src/components/ui/PsIcon.vue +30 -0
- package/src/index.js +30 -2
- package/src/stories/Accordion.stories.js +12 -48
- package/src/stories/Button.stories.js +30 -7
- package/src/stories/Chips.stories.js +11 -24
- package/src/stories/Dropdown.stories.js +81 -14
- package/src/stories/Icon.stories.js +21 -0
- package/src/stories/InlineSelector.stories.js +1 -1
- package/src/stories/Playground.stories.js +16 -0
- package/src/stories/Switch.stories.js +8 -2
- package/src/stories/Toast.stories.js +16 -16
- package/src/stories/Tooltip.stories.js +6 -6
- package/src/stories/Typography.stories.mdx +22 -18
- package/src/util/GeneralFunctions.js +8 -0
- package/src/util/imageLoader.js +1 -1
- package/tailwind.config.js +7 -3
- package/vetur/attributes.json +1376 -0
- package/vetur/tags.json +632 -0
- package/src/components/forms/PsDropdownCopy.vue +0 -212
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.psui-el-switch-button {
|
|
13
13
|
&.toggle-false{
|
|
14
14
|
&::before {
|
|
15
|
-
@apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-
|
|
15
|
+
@apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
|
|
16
16
|
box-shadow: 0 0 98px 6px rgba(0, 0, 0, 0.2);
|
|
17
17
|
left: 2px;
|
|
18
18
|
top: 2px;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@apply psui-bg-green-20;
|
|
25
25
|
|
|
26
26
|
&::before {
|
|
27
|
-
@apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-
|
|
27
|
+
@apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
|
|
28
28
|
box-shadow: 0 0 98px 6px rgba(0, 0, 0, 0.2);
|
|
29
29
|
left: 16px;
|
|
30
30
|
top: 2px;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
&.toggle-false{
|
|
46
46
|
&::before {
|
|
47
|
-
@apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-
|
|
47
|
+
@apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
|
|
48
48
|
left: 2px;
|
|
49
49
|
top: 2px;
|
|
50
50
|
content: '';
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
@apply psui-bg-green-20;
|
|
56
56
|
|
|
57
57
|
&::before {
|
|
58
|
-
@apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-
|
|
58
|
+
@apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
|
|
59
59
|
left: 24px;
|
|
60
60
|
top:2px;
|
|
61
61
|
content: '';
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
&.status-disabled {
|
|
9
9
|
@apply cursor-not-allowed
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
&:focus {
|
|
13
|
+
outline: none;
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
&.status-disabled {
|
|
@@ -24,6 +28,7 @@
|
|
|
24
28
|
button {
|
|
25
29
|
@apply psui-bg-gray-10 psui-text-gray-60;
|
|
26
30
|
padding: 6px 12px;
|
|
31
|
+
box-shadow: inset 0px 0px 8px rgba(40, 50, 59, 0.05);
|
|
27
32
|
|
|
28
33
|
&:not(:last-child) {
|
|
29
34
|
margin-right: 1px;
|
|
@@ -39,6 +44,7 @@
|
|
|
39
44
|
|
|
40
45
|
&:hover {
|
|
41
46
|
@apply psui-text-blue-60;
|
|
47
|
+
box-shadow: inset 0px 0px 8px rgba(40, 50, 59, 0.05);
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
&.status-active {
|
|
@@ -62,6 +68,10 @@
|
|
|
62
68
|
border-bottom: 3px solid transparent;
|
|
63
69
|
padding: 11.5px 0;
|
|
64
70
|
|
|
71
|
+
&:hover {
|
|
72
|
+
@apply psui-text-blue-60;
|
|
73
|
+
}
|
|
74
|
+
|
|
65
75
|
&:not(:last-child) {
|
|
66
76
|
margin-right: 20px;
|
|
67
77
|
}
|
|
@@ -85,6 +95,10 @@
|
|
|
85
95
|
@apply psui-bg-gray-10 psui-text-gray-50 psui-rounded-t;
|
|
86
96
|
padding: 9px 12px;
|
|
87
97
|
|
|
98
|
+
&:hover {
|
|
99
|
+
@apply psui-text-blue-60;
|
|
100
|
+
}
|
|
101
|
+
|
|
88
102
|
&:not(:last-child) {
|
|
89
103
|
margin-right: 4px;
|
|
90
104
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.psui-el-toast {
|
|
3
|
-
@apply psui-flex psui-items-center psui-text-big psui-text-white psui-py-3 psui-px-4 psui-rounded-md psui-font-bold;
|
|
3
|
+
@apply psui-flex psui-items-center psui-text-big psui-text-white psui-py-3 psui-px-4 psui-rounded-md psui-font-bold psui-shadow-elevation-20;
|
|
4
4
|
|
|
5
5
|
.psui-el-toast-icon {
|
|
6
6
|
@apply psui-flex psui-mr-4;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.psui-el-toast-actions {
|
|
15
|
-
@apply psui-flex psui-gap-4
|
|
15
|
+
@apply psui-flex psui-gap-4 psui-text-accentSmall;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&.fill-intense.layout{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
&.fill-soft.layout {
|
|
37
37
|
&-info {
|
|
38
|
-
@apply psui-text-blue-60 psui-bg-blue-20
|
|
38
|
+
@apply psui-text-blue-60 psui-bg-blue-20;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&-success {
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
@layer components{
|
|
2
2
|
|
|
3
3
|
.psui-el-toggle {
|
|
4
|
-
@apply psui-flex psui-
|
|
4
|
+
@apply psui-flex psui-bg-gray-10 psui-items-center;
|
|
5
5
|
padding: 2px;
|
|
6
|
+
gap: 2px;
|
|
7
|
+
border-radius: 4px;
|
|
6
8
|
|
|
7
9
|
button {
|
|
8
|
-
@apply transition-default psui-inline-flex psui-
|
|
10
|
+
@apply transition-default psui-inline-flex psui-text-small psui-bg-gray-10 psui-text-blue-60 psui-outline-none psui-align-middle;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
padding:1px 8px;
|
|
9
13
|
|
|
10
14
|
&.status-active {
|
|
11
15
|
@apply psui-bg-blue-60 psui-text-white psui-font-bold psui-shadow-elevation-10;
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
@apply psui-relative;
|
|
6
6
|
|
|
7
7
|
.psui-el-tooltip-dialog {
|
|
8
|
-
@apply psui-fixed psui-
|
|
9
|
-
|
|
8
|
+
@apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out;
|
|
9
|
+
transition-delay: 0.4s;
|
|
10
|
+
|
|
10
11
|
.psui-el-tooltip-content {
|
|
11
|
-
@apply psui-flex psui-flex-col psui-
|
|
12
|
-
padding: 5px 8px;
|
|
12
|
+
@apply psui-flex psui-flex-col psui-bg-gray-50 psui-text-white;
|
|
13
|
+
padding: 5px 8px 4px 8px;
|
|
14
|
+
border-radius: 4px;
|
|
13
15
|
|
|
14
16
|
h2 {
|
|
15
17
|
@apply psui-font-bold;
|
|
@@ -21,9 +23,10 @@
|
|
|
21
23
|
|
|
22
24
|
&.layout {
|
|
23
25
|
&-gray {
|
|
24
|
-
@apply psui-bg-gray-30 psui-text-gray-80 psui-
|
|
26
|
+
@apply psui-bg-gray-30 psui-text-gray-80 psui-shadow-none;
|
|
25
27
|
font-size: 12px;
|
|
26
28
|
line-height: 120%;
|
|
29
|
+
padding: 10px 16px 12px 16px;
|
|
27
30
|
|
|
28
31
|
.psui-el-tooltip-content-wrapper {
|
|
29
32
|
@apply psui-font-normal psui-mt-1
|
|
@@ -31,9 +34,10 @@
|
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
&-blue {
|
|
34
|
-
@apply psui-bg-blue-70 psui-text-white psui-
|
|
37
|
+
@apply psui-bg-blue-70 psui-text-white psui-shadow-none;
|
|
35
38
|
font-size: 12px;
|
|
36
39
|
line-height: 120%;
|
|
40
|
+
padding: 10px 16px 12px 16px;
|
|
37
41
|
|
|
38
42
|
.psui-el-tooltip-content-wrapper {
|
|
39
43
|
@apply psui-font-normal psui-mt-1
|
|
@@ -41,9 +45,10 @@
|
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
&-red {
|
|
44
|
-
@apply psui-bg-red-10 psui-text-red-70 psui-
|
|
48
|
+
@apply psui-bg-red-10 psui-text-red-70 psui-shadow-none;
|
|
45
49
|
font-size: 12px;
|
|
46
50
|
line-height: 120%;
|
|
51
|
+
padding: 10px 16px 12px 16px;
|
|
47
52
|
|
|
48
53
|
.psui-el-tooltip-content-wrapper {
|
|
49
54
|
@apply psui-font-normal psui-mt-1
|
|
@@ -51,7 +56,8 @@
|
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
&-white {
|
|
54
|
-
@apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-
|
|
59
|
+
@apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
|
|
60
|
+
gap: 8.8px;
|
|
55
61
|
|
|
56
62
|
h2 {
|
|
57
63
|
@apply psui-text-gray-80 psui-font-bold;
|
|
@@ -60,19 +66,27 @@
|
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
.psui-el-tooltip-content-wrapper {
|
|
63
|
-
@apply psui-text-gray-50 psui-
|
|
69
|
+
@apply psui-text-gray-50 psui-font-normal psui-flex psui-flex-col;
|
|
70
|
+
gap: 13.6px;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
line-height: 120%;
|
|
64
73
|
|
|
65
74
|
button {
|
|
66
|
-
@apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60;
|
|
75
|
+
@apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60 psui-font-bold;
|
|
67
76
|
padding: 7px 16px;
|
|
68
77
|
width: fit-content;
|
|
78
|
+
|
|
79
|
+
&:focus {
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
85
|
|
|
73
86
|
&-dark {
|
|
74
|
-
@apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-
|
|
75
|
-
|
|
87
|
+
@apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
|
|
88
|
+
gap: 8.8px;
|
|
89
|
+
|
|
76
90
|
h2 {
|
|
77
91
|
@apply psui-text-white psui-font-bold;
|
|
78
92
|
font-size: 17px;
|
|
@@ -80,19 +94,29 @@
|
|
|
80
94
|
}
|
|
81
95
|
|
|
82
96
|
.psui-el-tooltip-content-wrapper {
|
|
83
|
-
@apply psui-text-white psui-
|
|
97
|
+
@apply psui-text-white psui-font-normal psui-flex psui-flex-col;
|
|
98
|
+
gap: 13.6px;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
line-height: 120%;
|
|
84
101
|
|
|
85
102
|
button {
|
|
86
|
-
@apply psui-rounded-md psui-bg-blue-60 psui-text-white;
|
|
103
|
+
@apply psui-rounded-md psui-bg-blue-60 psui-text-white psui-font-bold;
|
|
87
104
|
padding: 7px 16px;
|
|
88
105
|
width: fit-content;
|
|
106
|
+
|
|
107
|
+
&:focus {
|
|
108
|
+
outline: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
89
111
|
}
|
|
90
112
|
}
|
|
91
113
|
}
|
|
92
114
|
|
|
93
115
|
&-color {
|
|
94
|
-
@apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-
|
|
95
|
-
|
|
116
|
+
@apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
|
|
117
|
+
gap: 8.8px;
|
|
118
|
+
|
|
119
|
+
|
|
96
120
|
h2 {
|
|
97
121
|
@apply psui-text-white psui-font-bold;
|
|
98
122
|
font-size: 17px;
|
|
@@ -100,12 +124,20 @@
|
|
|
100
124
|
}
|
|
101
125
|
|
|
102
126
|
.psui-el-tooltip-content-wrapper {
|
|
103
|
-
@apply psui-text-white psui-
|
|
127
|
+
@apply psui-text-white psui-font-normal psui-flex psui-flex-col;
|
|
128
|
+
gap: 13.6px;
|
|
129
|
+
font-size: 14px;
|
|
130
|
+
line-height: 120%;
|
|
104
131
|
|
|
105
132
|
button {
|
|
106
|
-
@apply psui-rounded-md psui-bg-blue-60 psui-text-white;
|
|
133
|
+
@apply psui-rounded-md psui-bg-blue-60 psui-text-white psui-font-bold;
|
|
107
134
|
padding: 7px 16px;
|
|
108
135
|
width: fit-content;
|
|
136
|
+
|
|
137
|
+
&:focus {
|
|
138
|
+
outline: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
109
141
|
}
|
|
110
142
|
}
|
|
111
143
|
}
|
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="psui-el-accordion" :class="
|
|
2
|
+
<div class="psui-el-accordion" :class="getComponentClass">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
export const layouts = ['big', 'medium']
|
|
9
|
-
export const defaultIconsByLayout = {
|
|
10
|
-
big: {
|
|
11
|
-
'iconOpened': 'remove',
|
|
12
|
-
'iconClosed': 'add'
|
|
13
|
-
},
|
|
14
|
-
medium: {
|
|
15
|
-
'iconOpened': 'expand_less',
|
|
16
|
-
'iconClosed': 'expand_more'
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
9
|
export default {
|
|
20
10
|
name: 'PsAccordion',
|
|
21
11
|
props: {
|
|
12
|
+
/**
|
|
13
|
+
* It defines the size of the accordion items. eg: text size and font.
|
|
14
|
+
*/
|
|
22
15
|
layout: {
|
|
23
16
|
type: String,
|
|
24
17
|
default: 'medium',
|
|
25
|
-
validator: (value) =>
|
|
18
|
+
validator: (value) => ['medium','big'].includes(value),
|
|
26
19
|
},
|
|
27
|
-
'iconOpened': {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
'iconClosed': {
|
|
31
|
-
type: String,
|
|
32
|
-
}
|
|
33
20
|
},
|
|
34
21
|
computed: {
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
'iconOpened' : this.iconOpened ?? defaultIconsByLayout[this.layout].iconOpened,
|
|
38
|
-
'iconClosed' : this.iconClosed ?? defaultIconsByLayout[this.layout].iconClosed,
|
|
39
|
-
}
|
|
22
|
+
getComponentClass() {
|
|
23
|
+
return `layout-${this.layout}`
|
|
40
24
|
}
|
|
41
25
|
}
|
|
42
26
|
}
|
|
@@ -2,31 +2,46 @@
|
|
|
2
2
|
<div class="psui-el-accordion-item" :class="`status-${isOpen ? 'opened' : 'closed'}`">
|
|
3
3
|
<div @click="toggle" class="psui-el-accordion-item-header">
|
|
4
4
|
<h2 v-if="title" class="psui-el-accordion-item-title">{{ title }}</h2>
|
|
5
|
-
|
|
6
|
-
</div>
|
|
7
|
-
<div v-if="isOpen" class="psui-el-accordion-item-content">
|
|
8
|
-
<slot></slot>
|
|
5
|
+
<i class="psui-el-accordion-item-icon">{{ getIcon }}</i>
|
|
9
6
|
</div>
|
|
7
|
+
<transition
|
|
8
|
+
name="accordion-fade"
|
|
9
|
+
@enter="start"
|
|
10
|
+
@after-enter="end"
|
|
11
|
+
@before-leave="start"
|
|
12
|
+
@after-leave="end"
|
|
13
|
+
>
|
|
14
|
+
<div v-if="isOpen" class="psui-el-accordion-item-content">
|
|
15
|
+
<slot></slot>
|
|
16
|
+
</div>
|
|
17
|
+
</transition>
|
|
10
18
|
</div>
|
|
11
19
|
</template>
|
|
12
20
|
|
|
13
21
|
<script>
|
|
22
|
+
import { getParentVueComponentByName } from '../../util/GeneralFunctions'
|
|
14
23
|
export default {
|
|
15
|
-
name:
|
|
24
|
+
name: 'PsAccordionItem',
|
|
16
25
|
props: {
|
|
26
|
+
/**
|
|
27
|
+
* It sets the title of the accordion item.
|
|
28
|
+
*/
|
|
17
29
|
title: {
|
|
18
30
|
type: String,
|
|
19
31
|
required: true,
|
|
20
32
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'iconClosed': {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
33
|
+
/**
|
|
34
|
+
* It sets the status of the accordion item when mounted.
|
|
35
|
+
*/
|
|
27
36
|
opened: {
|
|
28
37
|
type: [Boolean],
|
|
29
38
|
default: false
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
42
|
+
*/
|
|
43
|
+
icon: {
|
|
44
|
+
type: String
|
|
30
45
|
}
|
|
31
46
|
},
|
|
32
47
|
data() {
|
|
@@ -35,17 +50,17 @@ export default {
|
|
|
35
50
|
}
|
|
36
51
|
},
|
|
37
52
|
computed: {
|
|
38
|
-
getIcons() {
|
|
39
|
-
return {
|
|
40
|
-
'iconOpened' : this.iconOpened ?? this.getParentVueComponentByName(this.$parent, 'PsAccordion').getIcons.iconOpened,
|
|
41
|
-
'iconClosed' : this.iconClosed ?? this.getParentVueComponentByName(this.$parent, 'PsAccordion').getIcons.iconClosed,
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
getIcon() {
|
|
45
|
-
return this.isOpen ? this.getIcons.iconOpened : this.getIcons.iconClosed
|
|
46
|
-
},
|
|
47
53
|
isOpen() {
|
|
48
54
|
return this.localOpened !== null ? this.localOpened : this.opened
|
|
55
|
+
},
|
|
56
|
+
getParent() {
|
|
57
|
+
return getParentVueComponentByName(this,'PsAccordion')
|
|
58
|
+
},
|
|
59
|
+
getIcon(){
|
|
60
|
+
if(this.getParent._props.layout === 'medium') return 'expand_more'
|
|
61
|
+
if(this.getParent._props.layout === 'big' && this.isOpen === false) return 'add'
|
|
62
|
+
if(this.getParent._props.layout === 'big' && this.isOpen === true) return 'remove'
|
|
63
|
+
return `${this.icon}`
|
|
49
64
|
}
|
|
50
65
|
},
|
|
51
66
|
methods: {
|
|
@@ -56,12 +71,13 @@ export default {
|
|
|
56
71
|
this.localOpened = !this.localOpened
|
|
57
72
|
}
|
|
58
73
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
start(el) {
|
|
75
|
+
el.style.height = el.scrollHeight + 'px'
|
|
76
|
+
el.style.padding = el.srcollPaddingBottom + 'px'
|
|
77
|
+
},
|
|
78
|
+
end(el) {
|
|
79
|
+
el.style.height = ''
|
|
80
|
+
el.style.padding = ''
|
|
65
81
|
}
|
|
66
82
|
}
|
|
67
83
|
}
|
|
@@ -17,18 +17,30 @@
|
|
|
17
17
|
export default {
|
|
18
18
|
name: 'PsCardInfos',
|
|
19
19
|
props: {
|
|
20
|
+
/**
|
|
21
|
+
* It sets the title of your card.
|
|
22
|
+
*/
|
|
20
23
|
title: {
|
|
21
24
|
type: String,
|
|
22
25
|
default: 'Total',
|
|
23
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* It sets the subtitle of your card if needed.
|
|
29
|
+
*/
|
|
24
30
|
subtitle: {
|
|
25
31
|
type: String,
|
|
26
32
|
default: '',
|
|
27
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the right description of your icon on https://fonts.google.com/.
|
|
36
|
+
*/
|
|
28
37
|
icon: {
|
|
29
38
|
type: String,
|
|
30
39
|
default: 'edit',
|
|
31
40
|
},
|
|
41
|
+
/**
|
|
42
|
+
* It sets the data that will show up when component is mounted.
|
|
43
|
+
*/
|
|
32
44
|
total: {
|
|
33
45
|
type: String,
|
|
34
46
|
default: '',
|
|
@@ -13,19 +13,32 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
+
name: 'PsChartLegend',
|
|
16
17
|
props: {
|
|
18
|
+
/**
|
|
19
|
+
* It sets the text of the chart legend.
|
|
20
|
+
*/
|
|
17
21
|
text: {
|
|
18
22
|
type: [String, Number],
|
|
19
23
|
default: 'Climate Zone 10',
|
|
20
24
|
},
|
|
25
|
+
/**
|
|
26
|
+
* It sets the data that will show up when component is mounted.
|
|
27
|
+
*/
|
|
21
28
|
total: {
|
|
22
29
|
type: String,
|
|
23
30
|
default: null,
|
|
24
31
|
},
|
|
32
|
+
/**
|
|
33
|
+
* It sets the data that wull show up when component is mounted.
|
|
34
|
+
*/
|
|
25
35
|
percentage: {
|
|
26
36
|
type: String,
|
|
27
37
|
default: null,
|
|
28
38
|
},
|
|
39
|
+
/**
|
|
40
|
+
* It sets the color of the dot component.
|
|
41
|
+
*/
|
|
29
42
|
dotColor: {
|
|
30
43
|
type: Object,
|
|
31
44
|
default: null
|
|
@@ -9,11 +9,18 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
export default {
|
|
12
|
+
name: 'PsClimateZoneBadge',
|
|
12
13
|
props: {
|
|
14
|
+
/**
|
|
15
|
+
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the right description of your icon on https://fonts.google.com/.
|
|
16
|
+
*/
|
|
13
17
|
icon: {
|
|
14
18
|
type: String,
|
|
15
19
|
default: 'area_chart',
|
|
16
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* It sets the content that will show up when the component is rendered.
|
|
23
|
+
*/
|
|
17
24
|
content: {
|
|
18
25
|
type: Number,
|
|
19
26
|
default: 10,
|
|
@@ -22,11 +22,17 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
props: {
|
|
25
|
+
/**
|
|
26
|
+
* It sets the value of the progress bar within costeffectbar.
|
|
27
|
+
*/
|
|
25
28
|
value: {
|
|
26
29
|
type: Number,
|
|
27
30
|
required: true,
|
|
28
31
|
default: 0,
|
|
29
32
|
},
|
|
33
|
+
/**
|
|
34
|
+
* It sets the threshold of being effective or not effective within costeffectbar.
|
|
35
|
+
*/
|
|
30
36
|
breakEven: {
|
|
31
37
|
type: Number,
|
|
32
38
|
required: true,
|
|
@@ -15,11 +15,17 @@ export const typeOptions = [
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'PsMiniTag',
|
|
17
17
|
props: {
|
|
18
|
+
/**
|
|
19
|
+
* It sets the layout of the the minitag. eg: info, success, warning, error and default.
|
|
20
|
+
*/
|
|
18
21
|
layout: {
|
|
19
22
|
type: String,
|
|
20
23
|
default: 'info',
|
|
21
24
|
validator: (value) => typeOptions.indexOf(value) !== -1,
|
|
22
25
|
},
|
|
26
|
+
/**
|
|
27
|
+
* It sets the message that will show up within the minitag when component is rendered.
|
|
28
|
+
*/
|
|
23
29
|
message: {
|
|
24
30
|
type: String,
|
|
25
31
|
required: true,
|
|
@@ -13,21 +13,29 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
+
name: 'PsProgressBar',
|
|
16
17
|
props: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
/**
|
|
19
|
+
* It sets the value of the progress bar.
|
|
20
|
+
*/
|
|
21
|
+
value: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
default: 0,
|
|
25
|
+
validator: (value) => {
|
|
26
|
+
return value >= 0 && value <= 100
|
|
24
27
|
},
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* It sets the color of the progressbar.
|
|
31
|
+
*/
|
|
25
32
|
percentageColor: {
|
|
26
33
|
type: String,
|
|
27
34
|
default: 'psui-bg-blue-60'
|
|
28
|
-
// required: true,
|
|
29
|
-
|
|
30
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* It sets the background color of the progressbar.
|
|
38
|
+
*/
|
|
31
39
|
bgColor: {
|
|
32
40
|
type: String,
|
|
33
41
|
default: 'psui-bg-blue-20'
|
|
@@ -14,31 +14,52 @@
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
16
|
props: {
|
|
17
|
+
/**
|
|
18
|
+
* It set de label of the button when component is rendered.
|
|
19
|
+
*/
|
|
17
20
|
label: {
|
|
18
21
|
type: String,
|
|
19
22
|
},
|
|
23
|
+
/**
|
|
24
|
+
* It set the layout of the button. eg: solid, outline, ghost, onlytext and caution.
|
|
25
|
+
*/
|
|
20
26
|
layout: {
|
|
21
27
|
type: String,
|
|
22
28
|
default: 'solid',
|
|
23
|
-
validator: (value) => ['solid','outline','ghost','onlytext'].includes(value)
|
|
29
|
+
validator: (value) => ['solid','outline','ghost','onlytext','caution'].includes(value)
|
|
24
30
|
},
|
|
31
|
+
/**
|
|
32
|
+
* It sets the text key which will retrieve a icon from Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
33
|
+
*/
|
|
25
34
|
icon: {
|
|
26
35
|
type: String,
|
|
27
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* It sets the position of the icon. eg: left or right.
|
|
39
|
+
*/
|
|
28
40
|
iconPosition:{
|
|
29
41
|
type: String,
|
|
30
42
|
default: 'left',
|
|
31
43
|
validator: (value) => ['left','right'].includes(value)
|
|
32
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* It sets the size of the icon. eg: small, medium and big.
|
|
47
|
+
*/
|
|
33
48
|
size: {
|
|
34
49
|
type: String,
|
|
35
50
|
default: 'big',
|
|
36
51
|
validator: (value) => ['small','medium','big'].includes(value)
|
|
37
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* It disable the button. All mouse event are disabled.
|
|
55
|
+
*/
|
|
38
56
|
disabled: {
|
|
39
57
|
type: Boolean,
|
|
40
58
|
default: false
|
|
41
59
|
},
|
|
60
|
+
/**
|
|
61
|
+
* It set any further css style that might be needed.
|
|
62
|
+
*/
|
|
42
63
|
iconClass:{
|
|
43
64
|
type: String
|
|
44
65
|
}
|