@energysage/es-ds-components 3.1.2 → 3.1.4
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/components/es-modal.vue +23 -23
- package/components/icon/facebook.vue +1 -0
- package/package.json +2 -2
package/components/es-modal.vue
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import PrimeDialog from 'primevue/dialog';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
bodyClass: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: false,
|
|
21
|
-
default: '',
|
|
22
|
-
},
|
|
4
|
+
interface Props {
|
|
5
|
+
bodyClass?: string;
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
hideFooter?: boolean;
|
|
8
|
+
id: string;
|
|
9
|
+
showFooterSeparator?: boolean;
|
|
10
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
}
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
bodyClass: '',
|
|
14
|
+
closable: true,
|
|
15
|
+
hideFooter: false,
|
|
16
|
+
showFooterSeparator: true,
|
|
17
|
+
size: 'md',
|
|
23
18
|
});
|
|
24
19
|
|
|
20
|
+
const slots = useSlots();
|
|
21
|
+
|
|
25
22
|
const modalPt = {
|
|
26
23
|
root: {
|
|
27
24
|
class: 'modal-dialog modal-dialog-scrollable modal-content',
|
|
28
25
|
},
|
|
29
26
|
header: {
|
|
30
|
-
class: 'modal-header',
|
|
27
|
+
class: slots['modal-title'] ? 'modal-header' : '',
|
|
31
28
|
},
|
|
32
29
|
title: {
|
|
33
30
|
class: 'modal-title',
|
|
@@ -39,7 +36,7 @@ const modalPt = {
|
|
|
39
36
|
class: `modal-body ${props.bodyClass}`,
|
|
40
37
|
},
|
|
41
38
|
footer: {
|
|
42
|
-
class:
|
|
39
|
+
class: `modal-footer ${props.showFooterSeparator ? 'footer-separator' : ''}`,
|
|
43
40
|
},
|
|
44
41
|
mask: {
|
|
45
42
|
class: 'es-modal-mask',
|
|
@@ -64,7 +61,7 @@ const onChange = (visible: boolean) => {
|
|
|
64
61
|
};
|
|
65
62
|
|
|
66
63
|
const getSizeClass = computed(() => {
|
|
67
|
-
const modalSize =
|
|
64
|
+
const modalSize = `modal-${props.size}`;
|
|
68
65
|
return modalSize;
|
|
69
66
|
});
|
|
70
67
|
</script>
|
|
@@ -75,9 +72,12 @@ const getSizeClass = computed(() => {
|
|
|
75
72
|
modal
|
|
76
73
|
:class="getSizeClass"
|
|
77
74
|
:pt="modalPt"
|
|
75
|
+
:closable="closable"
|
|
78
76
|
dismissable-mask
|
|
79
77
|
@update:visible="onChange">
|
|
80
|
-
<template
|
|
78
|
+
<template
|
|
79
|
+
v-if="slots['modal-title']"
|
|
80
|
+
#header>
|
|
81
81
|
<h5
|
|
82
82
|
:id="`${id}_header`"
|
|
83
83
|
class="modal-title h2">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@energysage/es-ds-components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "An EnergySage Vue component library",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"author": "EnergySage",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@energysage/es-ds-styles": "^3.1.
|
|
20
|
+
"@energysage/es-ds-styles": "^3.1.3",
|
|
21
21
|
"@nuxt/eslint": "^1.0.1",
|
|
22
22
|
"@nuxtjs/google-fonts": "^3.2.0",
|
|
23
23
|
"@vuelidate/core": "^2.0.3",
|