@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
|
@@ -6,7 +6,7 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
|
6
6
|
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
7
|
$emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
8
8
|
startOpen: boolean;
|
|
9
|
-
classes: Record<string, any>;
|
|
9
|
+
classes: boolean | Function | Record<string, any>;
|
|
10
10
|
animate: boolean | Record<string, any>;
|
|
11
11
|
triggerTextElement: string;
|
|
12
12
|
triggerText?: string | undefined;
|
|
@@ -14,7 +14,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
14
14
|
modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
15
15
|
$props: {
|
|
16
16
|
readonly startOpen?: boolean | undefined;
|
|
17
|
-
readonly classes?: Record<string, any> | undefined;
|
|
17
|
+
readonly classes?: boolean | Function | Record<string, any> | undefined;
|
|
18
18
|
readonly animate?: boolean | Record<string, any> | undefined;
|
|
19
19
|
readonly triggerTextElement?: string | undefined;
|
|
20
20
|
readonly triggerText?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluAccordion.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluAccordion.vue"],"names":[],"mappings":"AA+BA;
|
|
1
|
+
{"version":3,"file":"UluAccordion.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluAccordion.vue"],"names":[],"mappings":"AA+BA;wBAoWqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAZjC;;;;;;;;;;;;;;;;;;sPASG"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useModifiers as
|
|
5
|
-
import { newId as
|
|
6
|
-
|
|
1
|
+
import { computed as s, inject as V, onMounted as O, createBlock as d, openBlock as u, unref as S, withCtx as i, renderSlot as l, resolveDynamicComponent as C, createTextVNode as T, toDisplayString as A, createElementVNode as B, normalizeClass as _, createVNode as E } from "vue";
|
|
2
|
+
import M from "../elements/UluIcon.vue.js";
|
|
3
|
+
import $ from "./UluCollapsible.vue.js";
|
|
4
|
+
import { useModifiers as b } from "../../composables/useModifiers.js";
|
|
5
|
+
import { newId as j } from "../../utils/dom.js";
|
|
6
|
+
import { mergeClassLookups as U } from "../../utils/props.js";
|
|
7
|
+
const I = {
|
|
7
8
|
__name: "UluAccordion",
|
|
8
9
|
props: {
|
|
9
10
|
/**
|
|
@@ -44,13 +45,8 @@ const G = {
|
|
|
44
45
|
* - Any valid class binding value per element
|
|
45
46
|
*/
|
|
46
47
|
classes: {
|
|
47
|
-
type: Object,
|
|
48
|
-
default: () => ({
|
|
49
|
-
container: "accordion",
|
|
50
|
-
trigger: "accordion__summary",
|
|
51
|
-
content: "accordion__content",
|
|
52
|
-
containerOpen: "is-active"
|
|
53
|
-
})
|
|
48
|
+
type: [Object, Boolean, Function],
|
|
49
|
+
default: () => ({})
|
|
54
50
|
},
|
|
55
51
|
/**
|
|
56
52
|
* Class modifiers (ie. 'transparent', 'secondary', etc)
|
|
@@ -58,51 +54,57 @@ const G = {
|
|
|
58
54
|
modifiers: [String, Array, Object]
|
|
59
55
|
},
|
|
60
56
|
emits: ["update:modelValue"],
|
|
61
|
-
setup(t, { emit:
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
setup(t, { emit: m }) {
|
|
58
|
+
const g = {
|
|
59
|
+
container: "accordion",
|
|
60
|
+
trigger: "accordion__summary",
|
|
61
|
+
content: "accordion__content",
|
|
62
|
+
containerOpen: "is-active",
|
|
63
|
+
icon: "accordion__icon"
|
|
64
|
+
}, r = t, p = m, { resolvedModifiers: f } = b({ props: r, baseClass: "accordion" }), c = s(() => {
|
|
65
|
+
const e = U(g, r.classes);
|
|
66
|
+
return e.container = [e.container, f.value], e;
|
|
67
|
+
}), o = V("uluAccordionGroup", null), a = j("ulu-accordion");
|
|
68
|
+
O(() => {
|
|
67
69
|
o && r.startOpen && o.toggle(a, !0);
|
|
68
70
|
});
|
|
69
|
-
const
|
|
71
|
+
const v = s(() => o ? o.activeAccordionId.value === a : r.modelValue);
|
|
70
72
|
function y(e) {
|
|
71
|
-
o && o.toggle(a, e),
|
|
73
|
+
o && o.toggle(a, e), p("update:modelValue", e);
|
|
72
74
|
}
|
|
73
|
-
return (e,
|
|
74
|
-
id:
|
|
75
|
-
"model-value":
|
|
75
|
+
return (e, h) => (u(), d($, {
|
|
76
|
+
id: S(a),
|
|
77
|
+
"model-value": v.value,
|
|
76
78
|
"start-open": t.startOpen,
|
|
77
79
|
"trigger-text": t.triggerText,
|
|
78
|
-
classes:
|
|
80
|
+
classes: c.value,
|
|
79
81
|
animate: t.animate,
|
|
80
82
|
"onUpdate:modelValue": y
|
|
81
83
|
}, {
|
|
82
84
|
trigger: i(({ isOpen: n }) => [
|
|
83
85
|
l(e.$slots, "trigger", { isOpen: n }, () => [
|
|
84
|
-
(
|
|
86
|
+
(u(), d(C(t.triggerTextElement), null, {
|
|
85
87
|
default: i(() => [
|
|
86
|
-
|
|
88
|
+
T(A(t.triggerText), 1)
|
|
87
89
|
]),
|
|
88
90
|
_: 1
|
|
89
91
|
}))
|
|
90
92
|
]),
|
|
91
93
|
l(e.$slots, "icon", { isOpen: n }, () => [
|
|
92
|
-
|
|
93
|
-
class:
|
|
94
|
+
B("span", {
|
|
95
|
+
class: _(c.value.icon)
|
|
94
96
|
}, [
|
|
95
|
-
|
|
97
|
+
E(M, {
|
|
96
98
|
icon: n ? "type:collapse" : "type:expand",
|
|
97
99
|
style: { display: "inline" }
|
|
98
100
|
}, null, 8, ["icon"])
|
|
99
101
|
], 2)
|
|
100
102
|
])
|
|
101
103
|
]),
|
|
102
|
-
default: i(({ isOpen: n, toggle:
|
|
104
|
+
default: i(({ isOpen: n, toggle: x }) => [
|
|
103
105
|
l(e.$slots, "default", {
|
|
104
106
|
isOpen: n,
|
|
105
|
-
toggle:
|
|
107
|
+
toggle: x
|
|
106
108
|
})
|
|
107
109
|
]),
|
|
108
110
|
_: 3
|
|
@@ -110,5 +112,5 @@ const G = {
|
|
|
110
112
|
}
|
|
111
113
|
};
|
|
112
114
|
export {
|
|
113
|
-
|
|
115
|
+
I as default
|
|
114
116
|
};
|