iryx-ui 0.26.0 → 0.27.0
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/AppShell.vue.d.ts +12 -11
- package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +76 -61
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/DropdownMenu.vue_vue_type_script_setup_true_lang.js +19 -18
- package/dist/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +12 -8
- package/dist/components/Sidebar.vue.d.ts +11 -5
- package/dist/components/Sidebar.vue_vue_type_script_setup_true_lang.js +172 -92
- package/dist/composables/dropdown-menu.d.ts +3 -1
- package/dist/composables/sidebar.d.ts +3 -0
- package/dist/composables/sidebar.js +7 -6
- package/dist/index.js +166 -166
- package/dist/theme/app-shell.d.ts +27 -6
- package/dist/theme/app-shell.js +26 -9
- package/dist/theme/avatar.js +1 -1
- package/dist/theme/presets.d.ts +1 -0
- package/dist/theme/presets.js +1 -0
- package/dist/theme/sidebar.d.ts +24 -0
- package/dist/theme/sidebar.js +9 -2
- package/package.json +1 -1
- package/theme.css +4 -0
|
@@ -25,6 +25,7 @@ export interface AppShellProps {
|
|
|
25
25
|
header?: string;
|
|
26
26
|
body?: string;
|
|
27
27
|
sidebar?: string;
|
|
28
|
+
panel?: string;
|
|
28
29
|
headerRow?: string;
|
|
29
30
|
headerContent?: string;
|
|
30
31
|
navTrigger?: string;
|
|
@@ -34,24 +35,24 @@ export interface AppShellProps {
|
|
|
34
35
|
footer?: string;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
declare var
|
|
38
|
-
navOpen: boolean;
|
|
39
|
-
toggleNav: () => boolean;
|
|
40
|
-
}, __VLS_21: {
|
|
38
|
+
declare var __VLS_20: {
|
|
41
39
|
inDrawer: boolean;
|
|
42
|
-
},
|
|
40
|
+
}, __VLS_28: {
|
|
43
41
|
inDrawer: boolean;
|
|
44
|
-
},
|
|
42
|
+
}, __VLS_35: {
|
|
43
|
+
navOpen: boolean;
|
|
44
|
+
toggleNav: () => boolean;
|
|
45
|
+
}, __VLS_37: {}, __VLS_39: {};
|
|
45
46
|
type __VLS_Slots = {} & {
|
|
46
|
-
|
|
47
|
+
sidebar?: (props: typeof __VLS_20) => any;
|
|
47
48
|
} & {
|
|
48
|
-
sidebar?: (props: typeof
|
|
49
|
+
sidebar?: (props: typeof __VLS_28) => any;
|
|
49
50
|
} & {
|
|
50
|
-
|
|
51
|
+
header?: (props: typeof __VLS_35) => any;
|
|
51
52
|
} & {
|
|
52
|
-
default?: (props: typeof
|
|
53
|
+
default?: (props: typeof __VLS_37) => any;
|
|
53
54
|
} & {
|
|
54
|
-
footer?: (props: typeof
|
|
55
|
+
footer?: (props: typeof __VLS_39) => any;
|
|
55
56
|
};
|
|
56
57
|
declare const __VLS_base: import("vue").DefineComponent<AppShellProps, {
|
|
57
58
|
/** Open or close the mobile navigation drawer from the outside. */
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import t from "./Icon.js";
|
|
3
3
|
import { useElementSize as n } from "../composables/element-size.js";
|
|
4
|
-
import {
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { sidebarPlacementKey as r } from "../composables/sidebar.js";
|
|
5
|
+
import { appShellTheme as i } from "../theme/app-shell.js";
|
|
6
|
+
import a from "./Drawer.js";
|
|
7
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, normalizeStyle as m, openBlock as h, provide as g, ref as _, renderSlot as v, unref as y, useSlots as b, withCtx as x } from "vue";
|
|
8
|
+
import { Menu01Icon as S } from "@hugeicons/core-free-icons";
|
|
9
|
+
import { Primitive as C } from "reka-ui";
|
|
9
10
|
//#region src/components/AppShell.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
11
|
+
var w = ["aria-label", "aria-expanded"], T = /*@__PURE__*/ f({
|
|
11
12
|
__name: "AppShell",
|
|
12
13
|
props: {
|
|
13
14
|
as: { default: "div" },
|
|
@@ -30,68 +31,82 @@ var S = ["aria-label", "aria-expanded"], C = /*@__PURE__*/ d({
|
|
|
30
31
|
] },
|
|
31
32
|
ui: {}
|
|
32
33
|
},
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
setup(T, { expose: E }) {
|
|
35
|
+
let D = T, O = b(), k = e(), A = o(() => D.unstyled ?? k.unstyled), j = _(), { height: M } = n(j), N = o(() => D.scroll === "page" && O.header ? { "--iryx-shell-header-height": `${M.value}px` } : void 0), P = _(!1), F = f({
|
|
36
|
+
props: { placement: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: !0
|
|
39
|
+
} },
|
|
40
|
+
setup(e, { slots: t }) {
|
|
41
|
+
return g(r, e.placement), () => t.default?.();
|
|
42
|
+
}
|
|
43
|
+
}), I = o(() => D.mobileNav && !!O.sidebar), L = o(() => i({
|
|
44
|
+
scroll: D.scroll,
|
|
45
|
+
sidebarPosition: D.sidebarPosition,
|
|
46
|
+
mobileNav: I.value,
|
|
47
|
+
hasSidebar: !!O.sidebar
|
|
38
48
|
}));
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
let t =
|
|
42
|
-
return
|
|
49
|
+
E({ navOpen: P });
|
|
50
|
+
function R(e) {
|
|
51
|
+
let t = D.ui?.[e];
|
|
52
|
+
return A.value ? t : L.value[e]({ class: t });
|
|
43
53
|
}
|
|
44
|
-
return (e, n) => (
|
|
45
|
-
as:
|
|
46
|
-
style:
|
|
47
|
-
class:
|
|
54
|
+
return (e, n) => (h(), s(y(C), {
|
|
55
|
+
as: D.as,
|
|
56
|
+
style: m(N.value),
|
|
57
|
+
class: p(A.value ? [D.ui?.root, D.class] : L.value.root({ class: [D.ui?.root, D.class] }))
|
|
48
58
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
59
|
+
default: x(() => [I.value ? (h(), s(a, {
|
|
60
|
+
key: 0,
|
|
61
|
+
open: P.value,
|
|
62
|
+
"onUpdate:open": n[0] ||= (e) => P.value = e,
|
|
63
|
+
side: "left",
|
|
64
|
+
size: "sm",
|
|
65
|
+
class: p(R("navDrawer")),
|
|
66
|
+
ui: {
|
|
67
|
+
body: R("navDrawerBody"),
|
|
68
|
+
overlay: "md:hidden",
|
|
69
|
+
content: "md:hidden"
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
default: x(() => [d(y(F), { placement: "drawer" }, {
|
|
73
|
+
default: x(() => [v(e.$slots, "sidebar", { inDrawer: !0 })]),
|
|
74
|
+
_: 3
|
|
75
|
+
})]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, [
|
|
78
|
+
"open",
|
|
79
|
+
"class",
|
|
80
|
+
"ui"
|
|
81
|
+
])) : c("", !0), u("div", { class: p(R("body")) }, [e.$slots.sidebar ? (h(), l("div", {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: p(R("sidebar"))
|
|
84
|
+
}, [d(y(F), { placement: "column" }, {
|
|
85
|
+
default: x(() => [v(e.$slots, "sidebar", { inDrawer: !1 })]),
|
|
86
|
+
_: 3
|
|
87
|
+
})], 2)) : c("", !0), u("div", { class: p(R("panel")) }, [
|
|
88
|
+
e.$slots.header ? (h(), l("div", {
|
|
51
89
|
key: 0,
|
|
52
90
|
ref_key: "header",
|
|
53
|
-
ref:
|
|
54
|
-
class:
|
|
55
|
-
}, [
|
|
91
|
+
ref: j,
|
|
92
|
+
class: p(R("header"))
|
|
93
|
+
}, [u("div", { class: p(R("headerRow")) }, [I.value ? (h(), l("button", {
|
|
56
94
|
key: 0,
|
|
57
95
|
type: "button",
|
|
58
|
-
"aria-label":
|
|
59
|
-
"aria-expanded":
|
|
60
|
-
class:
|
|
61
|
-
onClick: n[
|
|
62
|
-
}, [
|
|
63
|
-
navOpen:
|
|
64
|
-
toggleNav: () =>
|
|
65
|
-
})], 2)], 2)], 2)) :
|
|
66
|
-
|
|
96
|
+
"aria-label": D.navLabel,
|
|
97
|
+
"aria-expanded": P.value,
|
|
98
|
+
class: p(R("navTrigger")),
|
|
99
|
+
onClick: n[1] ||= (e) => P.value = !0
|
|
100
|
+
}, [d(t, { icon: y(S) }, null, 8, ["icon"])], 10, w)) : c("", !0), u("div", { class: p(R("headerContent")) }, [v(e.$slots, "header", {
|
|
101
|
+
navOpen: P.value,
|
|
102
|
+
toggleNav: () => P.value = !P.value
|
|
103
|
+
})], 2)], 2)], 2)) : c("", !0),
|
|
104
|
+
u("main", { class: p(R("main")) }, [v(e.$slots, "default")], 2),
|
|
105
|
+
e.$slots.footer ? (h(), l("div", {
|
|
67
106
|
key: 1,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
size: "sm",
|
|
72
|
-
class: f(P("navDrawer")),
|
|
73
|
-
ui: {
|
|
74
|
-
body: P("navDrawerBody"),
|
|
75
|
-
overlay: "md:hidden",
|
|
76
|
-
content: "md:hidden"
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
default: y(() => [g(e.$slots, "sidebar", { inDrawer: !0 })]),
|
|
80
|
-
_: 3
|
|
81
|
-
}, 8, [
|
|
82
|
-
"open",
|
|
83
|
-
"class",
|
|
84
|
-
"ui"
|
|
85
|
-
])) : s("", !0),
|
|
86
|
-
l("div", { class: f(P("body")) }, [e.$slots.sidebar ? (m(), c("div", {
|
|
87
|
-
key: 0,
|
|
88
|
-
class: f(P("sidebar"))
|
|
89
|
-
}, [g(e.$slots, "sidebar", { inDrawer: !1 })], 2)) : s("", !0), l("main", { class: f(P("main")) }, [g(e.$slots, "default")], 2)], 2),
|
|
90
|
-
e.$slots.footer ? (m(), c("div", {
|
|
91
|
-
key: 2,
|
|
92
|
-
class: f(P("footer"))
|
|
93
|
-
}, [g(e.$slots, "footer")], 2)) : s("", !0)
|
|
94
|
-
]),
|
|
107
|
+
class: p(R("footer"))
|
|
108
|
+
}, [v(e.$slots, "footer")], 2)) : c("", !0)
|
|
109
|
+
], 2)], 2)]),
|
|
95
110
|
_: 3
|
|
96
111
|
}, 8, [
|
|
97
112
|
"as",
|
|
@@ -101,4 +116,4 @@ var S = ["aria-label", "aria-expanded"], C = /*@__PURE__*/ d({
|
|
|
101
116
|
}
|
|
102
117
|
});
|
|
103
118
|
//#endregion
|
|
104
|
-
export {
|
|
119
|
+
export { T as default };
|
|
@@ -43,7 +43,8 @@ var w = ["aria-label"], T = /*@__PURE__*/ f({
|
|
|
43
43
|
}), M = a(() => O.value.slice(1, 1 + A.value).map((e) => ({
|
|
44
44
|
label: e.label,
|
|
45
45
|
icon: e.icon,
|
|
46
|
-
|
|
46
|
+
href: e.href,
|
|
47
|
+
onSelect: e.onSelect
|
|
47
48
|
}))), N = a(() => n());
|
|
48
49
|
function P(e) {
|
|
49
50
|
let t = T.ui?.[e];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { dropdownMenuTheme as t } from "../theme/dropdown-menu.js";
|
|
3
3
|
import n from "./DropdownMenuItems.js";
|
|
4
|
-
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeModels as l,
|
|
5
|
-
import { DropdownMenuContent as
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, renderSlot as p, unref as m, useModel as h, withCtx as g } from "vue";
|
|
5
|
+
import { DropdownMenuContent as _, DropdownMenuPortal as v, DropdownMenuRoot as y, DropdownMenuTrigger as b } from "reka-ui";
|
|
6
6
|
//#region src/components/DropdownMenu.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var x = /*@__PURE__*/ c({
|
|
8
|
+
inheritAttrs: !1,
|
|
8
9
|
__name: "DropdownMenu",
|
|
9
10
|
props: /*@__PURE__*/ l({
|
|
10
11
|
items: {},
|
|
@@ -32,28 +33,28 @@ var b = /*@__PURE__*/ c({
|
|
|
32
33
|
}),
|
|
33
34
|
emits: ["update:open"],
|
|
34
35
|
setup(c) {
|
|
35
|
-
let l = c,
|
|
36
|
-
return (e, t) => (
|
|
37
|
-
open:
|
|
38
|
-
"onUpdate:open": t[0] ||= (e) =>
|
|
36
|
+
let l = c, x = h(c, "open"), S = e(), C = r(() => l.unstyled ?? S.unstyled), w = r(() => l.items ?? []), T = r(() => C.value ? l.ui?.header : t().header({ class: l.ui?.header })), E = r(() => C.value ? [l.ui?.content, l.class] : t().content({ class: [l.ui?.content, l.class] }));
|
|
37
|
+
return (e, t) => (f(), i(m(y), {
|
|
38
|
+
open: x.value,
|
|
39
|
+
"onUpdate:open": t[0] ||= (e) => x.value = e
|
|
39
40
|
}, {
|
|
40
|
-
default:
|
|
41
|
-
default:
|
|
41
|
+
default: g(() => [s(m(b), u({ "as-child": "" }, e.$attrs), {
|
|
42
|
+
default: g(() => [p(e.$slots, "trigger")]),
|
|
42
43
|
_: 3
|
|
43
|
-
}), s(
|
|
44
|
-
default:
|
|
44
|
+
}, 16), s(m(v), null, {
|
|
45
|
+
default: g(() => [s(m(_), {
|
|
45
46
|
align: l.align,
|
|
46
47
|
"align-offset": l.alignOffset,
|
|
47
48
|
side: l.side,
|
|
48
49
|
"side-offset": l.sideOffset,
|
|
49
|
-
class:
|
|
50
|
+
class: d(E.value)
|
|
50
51
|
}, {
|
|
51
|
-
default:
|
|
52
|
+
default: g(() => [e.$slots.header ? (f(), o("div", {
|
|
52
53
|
key: 0,
|
|
53
|
-
class:
|
|
54
|
-
}, [
|
|
55
|
-
entries:
|
|
56
|
-
unstyled:
|
|
54
|
+
class: d(T.value)
|
|
55
|
+
}, [p(e.$slots, "header")], 2)) : a("", !0), p(e.$slots, "default", {}, () => [s(n, {
|
|
56
|
+
entries: w.value,
|
|
57
|
+
unstyled: C.value,
|
|
57
58
|
ui: l.ui
|
|
58
59
|
}, null, 8, [
|
|
59
60
|
"entries",
|
|
@@ -75,4 +76,4 @@ var b = /*@__PURE__*/ c({
|
|
|
75
76
|
}
|
|
76
77
|
});
|
|
77
78
|
//#endregion
|
|
78
|
-
export {
|
|
79
|
+
export { x as default };
|
|
@@ -63,8 +63,16 @@ var E = /*@__PURE__*/ u({
|
|
|
63
63
|
_: 2
|
|
64
64
|
}, 1024)]),
|
|
65
65
|
_: 2
|
|
66
|
-
}, 1024)) : t.onSelect ? (f(), a(g(
|
|
66
|
+
}, 1024)) : !t.onSelect && !t.href ? (f(), a(g(b), {
|
|
67
|
+
key: 2,
|
|
68
|
+
class: d(D("label"))
|
|
69
|
+
}, {
|
|
70
|
+
default: _(() => [c(h(t.label), 1)]),
|
|
71
|
+
_: 2
|
|
72
|
+
}, 1032, ["class"])) : (f(), a(g(y), {
|
|
67
73
|
key: 3,
|
|
74
|
+
as: t.href ? "a" : void 0,
|
|
75
|
+
href: t.href,
|
|
68
76
|
disabled: t.disabled,
|
|
69
77
|
class: d(D("item", t.danger)),
|
|
70
78
|
onSelect: t.onSelect
|
|
@@ -75,16 +83,12 @@ var E = /*@__PURE__*/ u({
|
|
|
75
83
|
}, null, 8, ["icon"])) : o("", !0), c(" " + h(t.label), 1)]),
|
|
76
84
|
_: 2
|
|
77
85
|
}, 1032, [
|
|
86
|
+
"as",
|
|
87
|
+
"href",
|
|
78
88
|
"disabled",
|
|
79
89
|
"class",
|
|
80
90
|
"onSelect"
|
|
81
|
-
]))
|
|
82
|
-
key: 2,
|
|
83
|
-
class: d(D("label"))
|
|
84
|
-
}, {
|
|
85
|
-
default: _(() => [c(h(t.label), 1)]),
|
|
86
|
-
_: 2
|
|
87
|
-
}, 1032, ["class"]))], 64))), 128);
|
|
91
|
+
]))], 64))), 128);
|
|
88
92
|
};
|
|
89
93
|
}
|
|
90
94
|
});
|
|
@@ -3,7 +3,7 @@ import type { SidebarItems, SidebarLink } from '../composables/sidebar';
|
|
|
3
3
|
export interface SidebarProps {
|
|
4
4
|
/** Links, optionally grouped into labelled sections. */
|
|
5
5
|
items?: SidebarItems;
|
|
6
|
-
/** Which edge it sits on
|
|
6
|
+
/** Which edge it sits on: where the border goes and which way tooltips and group menus open. */
|
|
7
7
|
side?: 'left' | 'right';
|
|
8
8
|
/**
|
|
9
9
|
* Accessible name for the navigation landmark — override for non-English
|
|
@@ -23,6 +23,7 @@ export interface SidebarProps {
|
|
|
23
23
|
sectionLabel?: string;
|
|
24
24
|
link?: string;
|
|
25
25
|
linkLabel?: string;
|
|
26
|
+
linkInitial?: string;
|
|
26
27
|
linkBadge?: string;
|
|
27
28
|
groupIcon?: string;
|
|
28
29
|
groupContent?: string;
|
|
@@ -39,10 +40,13 @@ declare var __VLS_8: {
|
|
|
39
40
|
collapsed: boolean;
|
|
40
41
|
}, __VLS_10: {
|
|
41
42
|
collapsed: boolean;
|
|
42
|
-
},
|
|
43
|
+
}, __VLS_26: {
|
|
44
|
+
link: SidebarLink;
|
|
45
|
+
collapsed: true;
|
|
46
|
+
}, __VLS_92: {
|
|
43
47
|
link: SidebarLink;
|
|
44
48
|
collapsed: boolean;
|
|
45
|
-
},
|
|
49
|
+
}, __VLS_99: {
|
|
46
50
|
collapsed: boolean;
|
|
47
51
|
};
|
|
48
52
|
type __VLS_Slots = {} & {
|
|
@@ -50,9 +54,11 @@ type __VLS_Slots = {} & {
|
|
|
50
54
|
} & {
|
|
51
55
|
default?: (props: typeof __VLS_10) => any;
|
|
52
56
|
} & {
|
|
53
|
-
link?: (props: typeof
|
|
57
|
+
link?: (props: typeof __VLS_26) => any;
|
|
58
|
+
} & {
|
|
59
|
+
link?: (props: typeof __VLS_92) => any;
|
|
54
60
|
} & {
|
|
55
|
-
footer?: (props: typeof
|
|
61
|
+
footer?: (props: typeof __VLS_99) => any;
|
|
56
62
|
};
|
|
57
63
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
58
64
|
"update:collapsed": (value: boolean) => any;
|