@ulu/frontend-vue 0.6.10 → 0.6.12
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/UluTabGroup.vue.d.ts +3 -0
- package/dist/components/collapsible/UluTabGroup.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluTabGroup.vue.js +28 -21
- package/dist/components/utils/UluRouteAnnouncer.vue.d.ts +2 -0
- package/dist/components/utils/UluRouteAnnouncer.vue.js +25 -21
- package/dist/mcp-data.json +3315 -3281
- package/lib/components/collapsible/UluTabGroup.vue +11 -2
- package/lib/components/utils/UluRouteAnnouncer.vue +28 -16
- package/package.json +1 -1
|
@@ -4,17 +4,20 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
+
$emit: (event: "change", ...args: any[]) => void;
|
|
7
8
|
vertical: boolean;
|
|
8
9
|
sticky: boolean;
|
|
9
10
|
transparent: boolean;
|
|
10
11
|
modifiers?: string | unknown[] | undefined;
|
|
11
12
|
defaultIndex?: number | undefined;
|
|
13
|
+
selectedIndex?: number | undefined;
|
|
12
14
|
$props: {
|
|
13
15
|
readonly vertical?: boolean | undefined;
|
|
14
16
|
readonly sticky?: boolean | undefined;
|
|
15
17
|
readonly transparent?: boolean | undefined;
|
|
16
18
|
readonly modifiers?: string | unknown[] | undefined;
|
|
17
19
|
readonly defaultIndex?: number | undefined;
|
|
20
|
+
readonly selectedIndex?: number | undefined;
|
|
18
21
|
};
|
|
19
22
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
23
|
type __VLS_TemplateResult = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluTabGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluTabGroup.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluTabGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluTabGroup.vue"],"names":[],"mappings":"AAiBA;wBAwMqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;2OAQG"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { TabGroup as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
const
|
|
1
|
+
import { computed as l, createBlock as i, openBlock as d, unref as s, withCtx as c, createElementVNode as u, mergeProps as m, renderSlot as f, normalizeProps as p, guardReactiveProps as v } from "vue";
|
|
2
|
+
import { TabGroup as b } from "@headlessui/vue";
|
|
3
|
+
import { useModifiers as x } from "../../composables/useModifiers.js";
|
|
4
|
+
const B = /* @__PURE__ */ Object.assign({
|
|
5
5
|
inheritAttrs: !1
|
|
6
6
|
}, {
|
|
7
7
|
__name: "UluTabGroup",
|
|
8
8
|
props: {
|
|
9
9
|
/**
|
|
10
|
-
* Active tab index by default
|
|
10
|
+
* Active tab index by default (uncontrolled)
|
|
11
11
|
*/
|
|
12
12
|
defaultIndex: Number,
|
|
13
|
+
/**
|
|
14
|
+
* Actively selected tab index (controlled)
|
|
15
|
+
*/
|
|
16
|
+
selectedIndex: Number,
|
|
13
17
|
/**
|
|
14
18
|
* Whether or not to use vertical layout
|
|
15
19
|
*/
|
|
@@ -27,31 +31,34 @@ const y = /* @__PURE__ */ Object.assign({
|
|
|
27
31
|
*/
|
|
28
32
|
modifiers: [String, Array]
|
|
29
33
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
emits: ["change"],
|
|
35
|
+
setup(e) {
|
|
36
|
+
const t = e, { resolvedModifiers: o } = x({
|
|
37
|
+
props: t,
|
|
33
38
|
baseClass: "tabs",
|
|
34
|
-
internal:
|
|
35
|
-
vertical:
|
|
36
|
-
sticky:
|
|
37
|
-
transparent:
|
|
39
|
+
internal: l(() => ({
|
|
40
|
+
vertical: t.vertical,
|
|
41
|
+
sticky: t.sticky,
|
|
42
|
+
transparent: t.transparent
|
|
38
43
|
}))
|
|
39
44
|
});
|
|
40
|
-
return (r,
|
|
41
|
-
defaultIndex:
|
|
42
|
-
|
|
45
|
+
return (r, n) => (d(), i(s(b), {
|
|
46
|
+
defaultIndex: e.defaultIndex,
|
|
47
|
+
selectedIndex: e.selectedIndex,
|
|
48
|
+
vertical: e.vertical,
|
|
49
|
+
onChange: n[0] || (n[0] = (a) => r.$emit("change", a))
|
|
43
50
|
}, {
|
|
44
|
-
default: c((
|
|
45
|
-
|
|
46
|
-
class: ["tabs",
|
|
51
|
+
default: c((a) => [
|
|
52
|
+
u("div", m(r.$attrs, {
|
|
53
|
+
class: ["tabs", s(o)]
|
|
47
54
|
}), [
|
|
48
|
-
f(r.$slots, "default", p(
|
|
55
|
+
f(r.$slots, "default", p(v(a)))
|
|
49
56
|
], 16)
|
|
50
57
|
]),
|
|
51
58
|
_: 3
|
|
52
|
-
}, 8, ["defaultIndex", "vertical"]));
|
|
59
|
+
}, 8, ["defaultIndex", "selectedIndex", "vertical"]));
|
|
53
60
|
}
|
|
54
61
|
});
|
|
55
62
|
export {
|
|
56
|
-
|
|
63
|
+
B as default
|
|
57
64
|
};
|
|
@@ -2,10 +2,12 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
2
2
|
validator: Function;
|
|
3
3
|
exclude: unknown[];
|
|
4
4
|
getTitle: Function;
|
|
5
|
+
debug: boolean;
|
|
5
6
|
$props: {
|
|
6
7
|
readonly validator?: Function | undefined;
|
|
7
8
|
readonly exclude?: unknown[] | undefined;
|
|
8
9
|
readonly getTitle?: Function | undefined;
|
|
10
|
+
readonly debug?: boolean | undefined;
|
|
9
11
|
};
|
|
10
12
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
11
13
|
el: HTMLParagraphElement;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useRoute as _ } from "vue-router";
|
|
3
|
-
import { getRouteTitle as
|
|
4
|
-
const
|
|
1
|
+
import { ref as d, computed as f, watch as p, nextTick as h, createElementBlock as m, createCommentVNode as g, openBlock as v, toDisplayString as y } from "vue";
|
|
2
|
+
import { useRoute as R, useRouter as _, START_LOCATION as A } from "vue-router";
|
|
3
|
+
import { getRouteTitle as T } from "../../utils/router.js";
|
|
4
|
+
const b = {
|
|
5
5
|
__name: "UluRouteAnnouncer",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
8
8
|
* Allow user to bypass this functionality
|
|
9
9
|
* - Function should return true if the page should be announced
|
|
10
|
-
* - Function is passed
|
|
11
|
-
* - to/from are
|
|
10
|
+
* - Function is passed (to, from) => {}
|
|
11
|
+
* - to/from are RouteLocationNormalizedLoaded objects
|
|
12
12
|
*/
|
|
13
13
|
validator: {
|
|
14
14
|
type: Function,
|
|
@@ -28,32 +28,36 @@ const A = {
|
|
|
28
28
|
*/
|
|
29
29
|
getTitle: {
|
|
30
30
|
type: Function,
|
|
31
|
-
default: (r) =>
|
|
32
|
-
}
|
|
31
|
+
default: (r) => T(r)
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Enable debug logging
|
|
35
|
+
*/
|
|
36
|
+
debug: Boolean
|
|
33
37
|
},
|
|
34
38
|
setup(r) {
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
37
|
-
const e =
|
|
39
|
+
const t = r, l = R(), c = _(), a = d(null), n = f(() => {
|
|
40
|
+
if (!l || l.matched.length === 0) return "";
|
|
41
|
+
const e = t.getTitle(l);
|
|
38
42
|
return e || console.warn("RouteAnnouncer: No page title!"), e;
|
|
39
43
|
});
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
async (e,
|
|
43
|
-
if (
|
|
44
|
+
return c ? p(
|
|
45
|
+
c.currentRoute,
|
|
46
|
+
async (e, o) => {
|
|
47
|
+
if (o === A || o.matched.length === 0 || e.hash)
|
|
44
48
|
return;
|
|
45
|
-
const
|
|
46
|
-
|
|
49
|
+
const s = t.validator(e, o), i = t.exclude.some((u) => u.endsWith("*") ? e.path.startsWith(u.slice(0, u.length - 1)) : e.path === u);
|
|
50
|
+
n.value && s && !i && (t.debug && console.log("RouteAnnouncer: Focused title:", n.value), await h(), a.value?.focus());
|
|
47
51
|
}
|
|
48
|
-
) : console.error("RouteAnnouncer: No route found (install vue-router)."), (e,
|
|
52
|
+
) : console.error("RouteAnnouncer: No route found (install vue-router)."), (e, o) => n.value ? (v(), m("p", {
|
|
49
53
|
key: 0,
|
|
50
54
|
tabindex: "-1",
|
|
51
55
|
class: "hidden-visually",
|
|
52
56
|
ref_key: "el",
|
|
53
|
-
ref:
|
|
54
|
-
},
|
|
57
|
+
ref: a
|
|
58
|
+
}, y(n.value), 513)) : g("", !0);
|
|
55
59
|
}
|
|
56
60
|
};
|
|
57
61
|
export {
|
|
58
|
-
|
|
62
|
+
b as default
|
|
59
63
|
};
|