@policystudio/policy-studio-ui-vue 1.1.90-beta.3 → 1.1.90-beta.31
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 +13 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +7090 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js +35 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/directives.d.ts +1 -0
- package/dist/util/directives.js +22 -0
- package/dist/util/directives.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/doc/.nvmrc +1 -0
- package/doc/.storybook/PolicyStudio.ts +11 -0
- package/{.storybook/main.js → doc/.storybook/main.ts} +8 -2
- package/doc/.storybook/manager.ts +7 -0
- package/{.storybook/preview.js → doc/.storybook/preview.ts} +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/doc/shims-vue.d.ts +6 -0
- package/{src/stories/Accordion.stories.js → doc/src/stories/Accordion.stories.ts} +4 -5
- package/{src/stories/BadgeWithIcon.stories.js → doc/src/stories/BadgeWithIcon.stories.ts} +2 -2
- package/{src/stories/BarChart.stories.js → doc/src/stories/BarChart.stories.ts} +2 -2
- package/{src/stories/Breadcrumb.stories.js → doc/src/stories/Breadcrumb.stories.ts} +2 -5
- package/doc/src/stories/Button.stories.ts +130 -0
- package/{src/stories/CardInfos.stories.js → doc/src/stories/CardInfos.stories.ts} +2 -3
- package/{src/stories/ChartLegend.stories.js → doc/src/stories/ChartLegend.stories.ts} +2 -3
- package/{src/stories/Checkbox.stories.js → doc/src/stories/Checkbox.stories.ts} +2 -2
- package/{src/stories/CheckboxSimple.stories.js → doc/src/stories/CheckboxSimple.stories.ts} +2 -2
- package/{src/stories/Chips.stories.js → doc/src/stories/Chips.stories.ts} +22 -23
- package/{src/stories/ClimateZoneBadge.stories.js → doc/src/stories/ClimateZoneBadge.stories.ts} +3 -2
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src/stories/CostEffectBar.stories.js → doc/src/stories/CostEffectBar.stories.ts} +3 -2
- package/{src/stories/Datatable.stories.js → doc/src/stories/Datatable.stories.ts} +7 -4
- package/{src/stories/DateCardInfo.stories.js → doc/src/stories/DateCardInfo.stories.ts} +2 -6
- package/{src/stories/Dialog.stories.js → doc/src/stories/Dialog.stories.ts} +2 -2
- package/{src/stories/Draggable.stories.js → doc/src/stories/Draggable.stories.ts} +3 -2
- package/{src/stories/Dropdown.stories.js → doc/src/stories/Dropdown.stories.ts} +4 -3
- package/{src/stories/DropdownList.stories.js → doc/src/stories/DropdownList.stories.ts} +4 -2
- package/{src/stories/HighlightRippleDot.stories.js → doc/src/stories/HighlightRippleDot.stories.ts} +3 -2
- package/{src/stories/Icon.stories.js → doc/src/stories/Icon.stories.ts} +3 -1
- package/{src/stories/InlineSelector.stories.js → doc/src/stories/InlineSelector.stories.ts} +2 -2
- package/{src/stories/Input.stories.js → doc/src/stories/Input.stories.ts} +7 -4
- package/{src/stories/InputSelect.stories.js → doc/src/stories/InputSelect.stories.ts} +3 -2
- package/{src/stories/InputTextArea.stories.js → doc/src/stories/InputTextArea.stories.ts} +2 -2
- package/{src/stories/MiniTag.stories.js → doc/src/stories/MiniTag.stories.ts} +9 -2
- package/{src/stories/ProgressBar.stories.js → doc/src/stories/ProgressBar.stories.ts} +3 -2
- package/{src/stories/RadioButton.stories.js → doc/src/stories/RadioButton.stories.ts} +2 -2
- package/{src/stories/RadioButtonSimple.stories.js → doc/src/stories/RadioButtonSimple.stories.ts} +2 -2
- package/{src/stories/SimpleAlert.stories.js → doc/src/stories/SimpleAlert.stories.ts} +3 -2
- package/{src/stories/Slider.stories.js → doc/src/stories/Slider.stories.ts} +6 -2
- package/{src/stories/Switch.stories.js → doc/src/stories/Switch.stories.ts} +2 -2
- package/{src/stories/TabHeader.stories.js → doc/src/stories/TabHeader.stories.ts} +6 -1
- package/{src/stories/TableResults.stories.js → doc/src/stories/TableResults.stories.ts} +11 -7
- package/{src/stories/TagScope.stories.js → doc/src/stories/TagScope.stories.ts} +3 -2
- package/{src/stories/TestimonialCard.stories.js → doc/src/stories/TestimonialCard.stories.ts} +3 -3
- package/{src/stories/Toast.stories.js → doc/src/stories/Toast.stories.ts} +2 -2
- package/{src/stories/Toggle.stories.js → doc/src/stories/Toggle.stories.ts} +7 -4
- package/{src/stories/Tooltip.stories.js → doc/src/stories/Tooltip.stories.ts} +6 -6
- package/doc/tsconfig.json +17 -0
- package/package.json +24 -37
- package/src/App.vue +30 -0
- package/src/assets/scss/base.scss +3 -34
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsCollapse.css +74 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -33
- package/src/components/badges-and-tags/PsCardInfos.vue +39 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +46 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
- package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
- package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
- package/src/components/badges-and-tags/PsTagScope.vue +17 -22
- package/src/components/badges-and-tags/PsTestimonialCard.vue +19 -26
- package/src/components/buttons/PsButton.vue +60 -61
- package/src/components/chips/PsChips.vue +98 -101
- package/src/components/collapse/PsCollapse.vue +121 -0
- package/src/components/controls/PsCheckbox.vue +84 -84
- package/src/components/controls/PsCheckboxSimple.vue +95 -95
- package/src/components/controls/PsDraggable.vue +53 -55
- package/src/components/controls/PsInlineSelector.vue +98 -99
- package/src/components/controls/PsRadioButton.vue +59 -58
- package/src/components/controls/PsRadioButtonSimple.vue +79 -75
- package/src/components/controls/PsSlider.vue +185 -176
- package/src/components/controls/PsSwitch.vue +51 -52
- package/src/components/controls/PsToggle.vue +52 -50
- package/src/components/data-graphics/PsBarChart.vue +18 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +13 -28
- package/src/components/forms/PsDropdown.vue +165 -162
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +154 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +70 -71
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +27 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +456 -466
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +67 -61
- package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +68 -61
- package/src/components/table-results/PsTableResultsRow.vue +55 -56
- package/src/components/tabs/PsTabHeader.vue +106 -100
- package/src/components/tooltip/PsDialogTooltip.vue +96 -101
- package/src/components/tooltip/PsRichTooltip.vue +41 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +131 -129
- package/src/index.ts +159 -0
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/GeneralFunctions.js +16 -7
- package/src/util/directives.ts +24 -0
- package/src/util/imageLoader.js +14 -7
- package/tailwind.config.js +1 -1
- package/tsconfig.json +47 -0
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/eventBus.js +0 -26
- package/.storybook/manager.js +0 -6
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/index.js +0 -166
- package/src/stories/Button.stories.js +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.js +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/Playground.stories.js +0 -16
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src/contents/ComparisonData.js → doc/src/contents/ComparisonData.ts} +0 -0
- /package/{src/contents/FlexibleData.js → doc/src/contents/FlexibleData.ts} +0 -0
- /package/{src/contents/ResultsData.js → doc/src/contents/ResultsData.ts} +0 -0
- /package/{src → doc/src}/stories/Colors.mdx +0 -0
- /package/{src → doc/src}/stories/ElevationSystem.mdx +0 -0
- /package/{src → doc/src}/stories/Introduction.mdx +0 -0
- /package/{src → doc/src}/stories/Typography.mdx +0 -0
- /package/{src → doc/src}/stories/assets/code-brackets.svg +0 -0
- /package/{src → doc/src}/stories/assets/colors.svg +0 -0
- /package/{src → doc/src}/stories/assets/comments.svg +0 -0
- /package/{src → doc/src}/stories/assets/direction.svg +0 -0
- /package/{src → doc/src}/stories/assets/flow.svg +0 -0
- /package/{src → doc/src}/stories/assets/plugin.svg +0 -0
- /package/{src → doc/src}/stories/assets/repo.svg +0 -0
- /package/{src → doc/src}/stories/assets/stackalt.svg +0 -0
package/src/App.vue
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img
|
|
3
|
+
alt="Vue logo"
|
|
4
|
+
src="./assets/logo.png"
|
|
5
|
+
>
|
|
6
|
+
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { defineComponent } from 'vue'
|
|
11
|
+
import HelloWorld from './components/HelloWorld.vue'
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
name: 'App',
|
|
15
|
+
components: {
|
|
16
|
+
HelloWorld
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style>
|
|
22
|
+
#app {
|
|
23
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
24
|
+
-webkit-font-smoothing: antialiased;
|
|
25
|
+
-moz-osx-font-smoothing: grayscale;
|
|
26
|
+
text-align: center;
|
|
27
|
+
color: #2c3e50;
|
|
28
|
+
margin-top: 60px;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
@import './components/PsBarChart.scss';
|
|
36
36
|
@import './components/PsSimpleAlert.scss';
|
|
37
37
|
@import './components/PsBreadcrumb.scss';
|
|
38
|
+
@import './components/PsCollapse.css';
|
|
39
|
+
|
|
40
|
+
|
|
38
41
|
@import "tailwindcss/base";
|
|
39
42
|
@import "tailwindcss/components";
|
|
40
43
|
@import "tailwindcss/utilities";
|
|
@@ -68,38 +71,4 @@ html {
|
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
|
|
71
|
-
@layer components {
|
|
72
|
-
.psui-card {
|
|
73
|
-
@apply .psui-w-full .psui-bg-white .psui-rounded-lg .psui-px-6 .psui-py-4 .psui-shadow-elevation-5;
|
|
74
|
-
|
|
75
|
-
&-header {
|
|
76
|
-
@apply .psui-flex .psui-items-center .psui-justify-between .psui-mb-4;
|
|
77
|
-
|
|
78
|
-
h4 {
|
|
79
|
-
@apply .psui-text-h6 .psui-font-bold .psui-text-gray-80;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.psui-show-childrens-on-hover {
|
|
85
|
-
&:hover {
|
|
86
|
-
* {
|
|
87
|
-
opacity: 1 !important;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.absolute-childrens {
|
|
92
|
-
@apply psui-relative;
|
|
93
|
-
|
|
94
|
-
.helper {
|
|
95
|
-
@apply psui-absolute psui-top-0;
|
|
96
|
-
right: -18px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.psui-transition {
|
|
102
|
-
@apply psui-transition-all psui-ease-in-out psui-duration-150;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
74
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
|
|
3
|
+
.psui-el-collapse {
|
|
4
|
+
|
|
5
|
+
.psui-el-collapse-item-content {
|
|
6
|
+
@apply psui-relative psui-pl-4;
|
|
7
|
+
|
|
8
|
+
&::before {
|
|
9
|
+
@apply psui-bg-gray-30 psui-ml-2;
|
|
10
|
+
content: "";
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 1px;
|
|
15
|
+
height: 100%;
|
|
16
|
+
transform: translateX(-50%);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
&.disabled {
|
|
22
|
+
.psui-el-collapse-item-header {
|
|
23
|
+
.psui-el-collapse-item-header-wrapper {
|
|
24
|
+
@apply psui-text-gray-50 hover:psui-text-gray-50;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.psui-el-collapse-item-header {
|
|
30
|
+
@apply psui-flex psui-items-center psui-cursor-pointer;
|
|
31
|
+
|
|
32
|
+
.psui-el-collapse-item-icon {
|
|
33
|
+
@apply psui-text-gray-50 psui-transition-all;
|
|
34
|
+
transition-duration: 0.4s;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.psui-el-collapse-item-header-wrapper {
|
|
39
|
+
@apply psui-flex psui-items-center psui-py-2 psui-text-small psui-w-full psui-text-gray-70 hover:psui-text-blue-60;
|
|
40
|
+
|
|
41
|
+
.psui-el-collapse-item-title {
|
|
42
|
+
@apply psui-ml-1;
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.psui-el-collapse-item-header-action {
|
|
47
|
+
@apply psui-invisible psui-ml-auto;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
.psui-el-collapse-item-header-wrapper {
|
|
53
|
+
.psui-el-collapse-item-header-action {
|
|
54
|
+
@apply psui-visible;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.collapse-fade-enter-active,
|
|
62
|
+
.collapse-fade-leave-active {
|
|
63
|
+
will-change: height, margin-bottom;
|
|
64
|
+
transition: height 0.4s ease-in-out, margin-bottom 0.4s ease-in-out;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.collapse-fade-enter-from,
|
|
69
|
+
.collapse-fade-leave-to {
|
|
70
|
+
height: 0 !important;
|
|
71
|
+
margin-bottom: 0 !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@apply psui-w-full psui-flex psui-flex-col psui-font-medium psui-my-4;
|
|
4
4
|
|
|
5
5
|
.psui-el-dropdown-menu-list-item {
|
|
6
|
-
@apply psui-flex psui-items-end psui-justify-between psui-mx-0 psui-text-small psui-text-gray-60 psui-cursor-pointer psui-transition-all
|
|
6
|
+
@apply psui-flex psui-items-end psui-justify-between psui-mx-0 psui-text-small psui-text-gray-60 psui-cursor-pointer psui-transition-all;
|
|
7
7
|
padding: 7px 20px;
|
|
8
8
|
|
|
9
9
|
&-left-label {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="psui-el-accordion-item"
|
|
4
|
-
:class="{'status-opened':isOpen,
|
|
4
|
+
:class="{ 'status-opened': isOpen, disabled: disabled }"
|
|
5
5
|
>
|
|
6
6
|
<div class="psui-el-accordion-item-header">
|
|
7
7
|
<slot
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<i
|
|
25
25
|
v-if="!disabled"
|
|
26
26
|
class="psui-el-accordion-item-icon"
|
|
27
|
-
>{{ getIcon }}</i>
|
|
27
|
+
>{{ getIcon }}</i>
|
|
28
28
|
</div>
|
|
29
29
|
</slot>
|
|
30
30
|
</div>
|
|
@@ -45,84 +45,98 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
|
-
<script>
|
|
49
|
-
import { getParentVueComponentByName } from '../../util/GeneralFunctions'
|
|
48
|
+
<script setup>
|
|
49
|
+
import { getParentVueComponentByName } from '../../util/GeneralFunctions.js'
|
|
50
|
+
import { ref, computed, getCurrentInstance } from 'vue'
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
* It sets if it has a custom header.
|
|
75
|
-
*/
|
|
76
|
-
hasCustomHeader: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: false
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* It sets the disabled status.
|
|
82
|
-
*/
|
|
83
|
-
disabled: {
|
|
84
|
-
type: Boolean,
|
|
85
|
-
default: false
|
|
86
|
-
}
|
|
52
|
+
const localOpened = ref(null)
|
|
53
|
+
|
|
54
|
+
const props = defineProps({
|
|
55
|
+
/**
|
|
56
|
+
* It sets the title of the accordion item.
|
|
57
|
+
*/
|
|
58
|
+
title: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* It sets the status of the accordion item when mounted.
|
|
64
|
+
*/
|
|
65
|
+
opened: {
|
|
66
|
+
type: [Boolean],
|
|
67
|
+
default: false,
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* 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/.
|
|
71
|
+
*/
|
|
72
|
+
icon: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: '',
|
|
87
75
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
76
|
+
/**
|
|
77
|
+
* It sets if it has a custom header.
|
|
78
|
+
*/
|
|
79
|
+
hasCustomHeader: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false,
|
|
92
82
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
getIcon(){
|
|
101
|
-
if(this.getParent._props.layout === 'medium') return 'expand_more'
|
|
102
|
-
if(this.getParent._props.layout === 'big' && this.isOpen === false) return 'add'
|
|
103
|
-
if(this.getParent._props.layout === 'big' && this.isOpen === true) return 'remove'
|
|
104
|
-
return `${this.icon}`
|
|
105
|
-
}
|
|
83
|
+
/**
|
|
84
|
+
* It sets the disabled status.
|
|
85
|
+
*/
|
|
86
|
+
disabled: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false,
|
|
106
89
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
const isOpen = computed(() => {
|
|
93
|
+
return localOpened.value !== null ? localOpened.value : props.opened
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
const getParent = computed(() => {
|
|
97
|
+
const instance = getCurrentInstance()
|
|
98
|
+
|
|
99
|
+
if (instance?.parent) {
|
|
100
|
+
return getParentVueComponentByName(instance.parent, 'PsAccordion')
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (instance.proxy && instance.proxy.$parent) {
|
|
104
|
+
return getParentVueComponentByName(instance.proxy.$parent, 'PsAccordion')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return null
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
const getIcon = computed(() => {
|
|
111
|
+
if (!getParent.value) return
|
|
112
|
+
|
|
113
|
+
const layout = getParent.value._props ? getParent.value._props.layout : getParent?.value?.props.layout.default
|
|
114
|
+
if (layout === 'medium') return 'expand_more'
|
|
115
|
+
if (layout === 'big' && isOpen.value === false) return 'add'
|
|
116
|
+
if (layout === 'big' && isOpen.value === true) return 'remove'
|
|
117
|
+
return `${props.icon}`
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
const toggle = () => {
|
|
121
|
+
if (localOpened.value === null) {
|
|
122
|
+
localOpened.value = !props.opened
|
|
123
|
+
} else {
|
|
124
|
+
localOpened.value = !localOpened.value
|
|
123
125
|
}
|
|
124
126
|
}
|
|
127
|
+
const start = (el) => {
|
|
128
|
+
el.style.height = el.scrollHeight + 'px'
|
|
129
|
+
el.style.padding = el.srcollPaddingBottom + 'px'
|
|
130
|
+
}
|
|
131
|
+
const end = (el) => {
|
|
132
|
+
el.style.height = ''
|
|
133
|
+
el.style.padding = ''
|
|
134
|
+
}
|
|
125
135
|
</script>
|
|
126
136
|
|
|
127
|
-
<style>
|
|
137
|
+
<style>
|
|
138
|
+
/* Please, use the file src/assets/scss/components/PsAccordion.scss */
|
|
139
|
+
</style>
|
|
140
|
+
|
|
141
|
+
|
|
128
142
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
class="psui-el-badge-with-icon"
|
|
4
4
|
:class="getComponentClass"
|
|
5
5
|
>
|
|
6
|
-
<i
|
|
7
|
-
v-if="icon"
|
|
6
|
+
<i
|
|
7
|
+
v-if="icon"
|
|
8
8
|
:class="iconClass"
|
|
9
9
|
class="psui-el-badge-with-icon-icon"
|
|
10
10
|
>{{ icon }}</i>
|
|
@@ -12,35 +12,33 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
|
-
<script>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
getComponentClass(){
|
|
41
|
-
return `layout-${this.layout}`
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
15
|
+
<script setup>
|
|
16
|
+
import { computed } from 'vue'
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
icon: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'info',
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* It set any further css style that might be needed.
|
|
25
|
+
*/
|
|
26
|
+
iconClass: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
message: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'Lorem ipsum',
|
|
33
|
+
},
|
|
34
|
+
layout: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'grey',
|
|
37
|
+
validator: (value) => ['grey', 'blue', 'green', 'yellow'].includes(value),
|
|
38
|
+
},
|
|
39
|
+
})
|
|
46
40
|
|
|
41
|
+
const getComponentClass = computed(() => {
|
|
42
|
+
return `layout-${props.layout}`
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
3
|
class="psui-el-card-infos"
|
|
4
4
|
@click="onClick()"
|
|
5
5
|
>
|
|
@@ -8,52 +8,50 @@
|
|
|
8
8
|
</h5>
|
|
9
9
|
<div class="psui-el-card-infos-content">
|
|
10
10
|
<span class="psui-el-card-infos-icon material-icons-round">{{ icon }}</span>
|
|
11
|
-
<h5 class="psui-text-gray-80">
|
|
12
|
-
{{ total }}
|
|
11
|
+
<h5 class="psui-text-gray-80">
|
|
12
|
+
{{ total }}
|
|
13
13
|
</h5>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
|
-
<script>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type: String,
|
|
34
|
-
default: '',
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* 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/.
|
|
38
|
-
*/
|
|
39
|
-
icon: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: 'edit',
|
|
42
|
-
},
|
|
43
|
-
/**
|
|
44
|
-
* It sets the data that will show up when component is mounted.
|
|
45
|
-
*/
|
|
46
|
-
total: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: '',
|
|
49
|
-
},
|
|
18
|
+
<script setup>
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits(['click'])
|
|
21
|
+
|
|
22
|
+
defineProps({
|
|
23
|
+
title: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'Total',
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* It sets the subtitle of your card if needed.
|
|
29
|
+
*/
|
|
30
|
+
subtitle: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '',
|
|
50
33
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
+
*/
|
|
37
|
+
icon: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: 'edit',
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* It sets the data that will show up when component is mounted.
|
|
43
|
+
*/
|
|
44
|
+
total: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '',
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const onClick = () => {
|
|
51
|
+
emit('click')
|
|
56
52
|
}
|
|
57
53
|
</script>
|
|
58
54
|
|
|
59
|
-
<style>
|
|
55
|
+
<style>
|
|
56
|
+
/* Please, use the file src/assets/scss/components/PsCardInfos.scss */
|
|
57
|
+
</style>
|
|
@@ -1,69 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="psui-el-chart-legend">
|
|
3
3
|
<div class="psui-flex psui-flex-shrink-0">
|
|
4
|
-
<div
|
|
5
|
-
class="psui-el-chart-legend-dot"
|
|
6
|
-
:style="dotColor"
|
|
4
|
+
<div
|
|
5
|
+
class="psui-el-chart-legend-dot"
|
|
6
|
+
:style="dotColor"
|
|
7
7
|
/>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="psui-flex-grow-1 flex psui-flex-col">
|
|
10
|
-
<div class="psui-el-chart-legend-text">
|
|
11
|
-
{{ text }}
|
|
10
|
+
<div class="psui-el-chart-legend-text">
|
|
11
|
+
{{ text }}
|
|
12
12
|
</div>
|
|
13
13
|
<div class="flex psui-items-center psui-flex-shrink-0 psui-gap-1">
|
|
14
|
-
<span
|
|
15
|
-
v-if="
|
|
16
|
-
class="psui-el-chart-legend-total"
|
|
14
|
+
<span
|
|
15
|
+
v-if="total"
|
|
16
|
+
class="psui-el-chart-legend-total"
|
|
17
17
|
>{{ total }}</span>
|
|
18
|
-
<span
|
|
19
|
-
class="psui-text-gray-30"
|
|
20
|
-
v-if="total && percentage"
|
|
18
|
+
<span
|
|
19
|
+
class="psui-text-gray-30"
|
|
20
|
+
v-if="total && percentage"
|
|
21
21
|
> | </span>
|
|
22
|
-
<span
|
|
23
|
-
class="psui-el-chart-legend-percentage"
|
|
24
|
-
v-if="percentage"
|
|
25
|
-
>
|
|
26
|
-
{{ percentage }}%
|
|
27
|
-
</span>
|
|
22
|
+
<span
|
|
23
|
+
class="psui-el-chart-legend-percentage"
|
|
24
|
+
v-if="percentage"
|
|
25
|
+
> {{ percentage }}% </span>
|
|
28
26
|
</div>
|
|
29
27
|
</div>
|
|
30
28
|
</div>
|
|
31
29
|
</template>
|
|
32
30
|
|
|
33
|
-
<script>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*/
|
|
61
|
-
dotColor: {
|
|
62
|
-
type: Object,
|
|
63
|
-
default: null
|
|
64
|
-
},
|
|
31
|
+
<script setup>
|
|
32
|
+
|
|
33
|
+
defineProps({
|
|
34
|
+
text: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: 'Climate Zone 10',
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* It sets the data that will show up when component is mounted.
|
|
40
|
+
*/
|
|
41
|
+
total: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: null,
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* It sets the data that wull show up when component is mounted.
|
|
47
|
+
*/
|
|
48
|
+
percentage: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: null,
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* It sets the color of the dot component.
|
|
54
|
+
*/
|
|
55
|
+
dotColor: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: null,
|
|
65
58
|
},
|
|
66
|
-
}
|
|
59
|
+
})
|
|
67
60
|
</script>
|
|
68
61
|
|
|
69
|
-
<style>
|
|
62
|
+
<style>
|
|
63
|
+
/* Please, use the file src/assets/scss/components/PsChartLegend.scss */
|
|
64
|
+
</style>
|