@energysage/es-ds-components 3.0.10 → 3.0.11
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.
|
@@ -20,6 +20,7 @@ const props = defineProps({
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const userDeterminedState: Ref<boolean | null> = ref(null);
|
|
23
|
+
const uniqueId = useId();
|
|
23
24
|
|
|
24
25
|
// directly determines the expanded/collapsed state of the panel
|
|
25
26
|
const expanded = computed(() => {
|
|
@@ -52,7 +53,7 @@ const onClick = ({ value }: { value: boolean }) => {
|
|
|
52
53
|
<template>
|
|
53
54
|
<panel
|
|
54
55
|
:collapsed="!expanded"
|
|
55
|
-
:
|
|
56
|
+
:toggle-button-props="{ 'aria-labelledby': uniqueId }"
|
|
56
57
|
:pt="{
|
|
57
58
|
header: 'd-flex flex-column justify-content-center position-relative py-100',
|
|
58
59
|
icons: 'h-100 position-absolute w-100',
|
|
@@ -74,7 +75,9 @@ const onClick = ({ value }: { value: boolean }) => {
|
|
|
74
75
|
toggleable
|
|
75
76
|
@toggle="onClick">
|
|
76
77
|
<template #header>
|
|
77
|
-
<
|
|
78
|
+
<div :id="uniqueId">
|
|
79
|
+
<slot name="title" />
|
|
80
|
+
</div>
|
|
78
81
|
</template>
|
|
79
82
|
<template #togglericon>
|
|
80
83
|
<icon-chevron-down />
|
package/components/es-tabs.vue
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import TabPanel from 'primevue/tabpanel';
|
|
3
3
|
import TabView from 'primevue/tabview';
|
|
4
|
+
import { Comment } from 'vue';
|
|
4
5
|
|
|
5
6
|
// allow use of v-model on this component
|
|
6
7
|
const model = defineModel<number>();
|
|
7
8
|
|
|
8
|
-
// get the list of elements provided as children to the default slot
|
|
9
|
-
const
|
|
9
|
+
// get the list of elements provided as children to the default slot - filtering out comments
|
|
10
|
+
const rawChildren = useSlots().default?.() || [];
|
|
11
|
+
const initialChildren = rawChildren.filter((child) => child.type !== Comment);
|
|
12
|
+
|
|
10
13
|
const panels: any[] = [];
|
|
11
14
|
initialChildren.forEach((child) => {
|
|
12
15
|
// unless this has a v-for element and we instead need to access its children
|
package/components/es-video.vue
CHANGED
|
@@ -12,7 +12,7 @@ const showVideo = ref(false);
|
|
|
12
12
|
|
|
13
13
|
// Methods
|
|
14
14
|
function getVideoIdFromUrl(url: string) {
|
|
15
|
-
const embedPattern = /https:\/\/www\.youtube\.com\/embed\/(?<videoId>[
|
|
15
|
+
const embedPattern = /https:\/\/www\.youtube\.com\/embed\/(?<videoId>[_A-Za-z0-9-]+)/;
|
|
16
16
|
const parsedUrl = embedPattern.exec(url);
|
|
17
17
|
if (parsedUrl) {
|
|
18
18
|
return parsedUrl?.groups?.videoId;
|