@ulu/frontend-vue 0.6.21 → 0.6.22
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/dist/components/collapsible/UluAccordion.vue.d.ts +2 -2
- package/dist/components/collapsible/UluAccordion.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluAccordion.vue.js +35 -33
- package/dist/mcp-data.json +3780 -3780
- package/lib/components/collapsible/UluAccordion.vue +15 -11
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:model-value="resolvedModelValue"
|
|
5
5
|
:start-open="startOpen"
|
|
6
6
|
:trigger-text="triggerText"
|
|
7
|
-
:classes="
|
|
7
|
+
:classes="resolvedClasses"
|
|
8
8
|
:animate="animate"
|
|
9
9
|
@update:model-value="handleUpdateModelValue"
|
|
10
10
|
>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</component>
|
|
16
16
|
</slot>
|
|
17
17
|
<slot name="icon" :isOpen="isOpen">
|
|
18
|
-
<span
|
|
18
|
+
<span :class="resolvedClasses.icon">
|
|
19
19
|
<UluIcon
|
|
20
20
|
:icon="isOpen ? 'type:collapse' : 'type:expand'"
|
|
21
21
|
style="display: inline;"
|
|
@@ -36,6 +36,15 @@
|
|
|
36
36
|
import UluCollapsible from "./UluCollapsible.vue";
|
|
37
37
|
import { useModifiers } from "../../composables/useModifiers.js";
|
|
38
38
|
import { newId } from "../../utils/dom.js";
|
|
39
|
+
import { mergeClassLookups } from "../../utils/props.js";
|
|
40
|
+
|
|
41
|
+
const DEFAULT_CLASSES = {
|
|
42
|
+
container: 'accordion',
|
|
43
|
+
trigger: 'accordion__summary',
|
|
44
|
+
content: 'accordion__content',
|
|
45
|
+
containerOpen: 'is-active',
|
|
46
|
+
icon: 'accordion__icon'
|
|
47
|
+
};
|
|
39
48
|
|
|
40
49
|
const props = defineProps({
|
|
41
50
|
/**
|
|
@@ -76,13 +85,8 @@
|
|
|
76
85
|
* - Any valid class binding value per element
|
|
77
86
|
*/
|
|
78
87
|
classes: {
|
|
79
|
-
type: Object,
|
|
80
|
-
default: () => ({
|
|
81
|
-
container: 'accordion',
|
|
82
|
-
trigger: 'accordion__summary',
|
|
83
|
-
content: 'accordion__content',
|
|
84
|
-
containerOpen: 'is-active'
|
|
85
|
-
})
|
|
88
|
+
type: [Object, Boolean, Function],
|
|
89
|
+
default: () => ({})
|
|
86
90
|
},
|
|
87
91
|
/**
|
|
88
92
|
* Class modifiers (ie. 'transparent', 'secondary', etc)
|
|
@@ -94,8 +98,8 @@
|
|
|
94
98
|
|
|
95
99
|
const { resolvedModifiers } = useModifiers({ props, baseClass: "accordion" });
|
|
96
100
|
|
|
97
|
-
const
|
|
98
|
-
const merged =
|
|
101
|
+
const resolvedClasses = computed(() => {
|
|
102
|
+
const merged = mergeClassLookups(DEFAULT_CLASSES, props.classes);
|
|
99
103
|
merged.container = [merged.container, resolvedModifiers.value];
|
|
100
104
|
return merged;
|
|
101
105
|
});
|
package/package.json
CHANGED