iryx-ui 0.14.0 → 0.15.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 +31 -6
- package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +68 -28
- package/dist/components/BarChart.vue.d.ts +2 -0
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/Drawer.vue.d.ts +1 -1
- package/dist/components/LineChart.vue.d.ts +18 -0
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +178 -131
- package/dist/components/Popover.vue.d.ts +1 -1
- package/dist/components/Stat.vue.d.ts +1 -1
- package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/index.js +50 -50
- package/dist/composables/cartesian.d.ts +7 -0
- package/dist/composables/cartesian.js +6 -1
- package/dist/index.js +56 -56
- package/dist/theme/app-shell.d.ts +42 -0
- package/dist/theme/app-shell.js +13 -1
- package/dist/theme/bar-chart.js +1 -1
- package/dist/theme/button.d.ts +2 -2
- package/dist/theme/button.js +1 -1
- package/dist/theme/command-palette.d.ts +3 -3
- package/dist/theme/form.js +1 -1
- package/dist/theme/line-chart.js +2 -2
- package/dist/theme/sidebar.js +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,14 @@ export interface AppShellProps {
|
|
|
7
7
|
*/
|
|
8
8
|
scroll?: 'main' | 'page';
|
|
9
9
|
sidebarPosition?: 'left' | 'right';
|
|
10
|
+
/**
|
|
11
|
+
* Below `md`, move the sidebar into a drawer and put a trigger for it in
|
|
12
|
+
* the header. A sidebar narrow enough for a phone is not a sidebar, and
|
|
13
|
+
* one that simply squeezes takes the content column with it.
|
|
14
|
+
*/
|
|
15
|
+
mobileNav?: boolean;
|
|
16
|
+
/** Accessible name for that trigger — override for non-English apps. */
|
|
17
|
+
navLabel?: string;
|
|
10
18
|
/** Skip built-in classes; you take over styling entirely. */
|
|
11
19
|
unstyled?: boolean;
|
|
12
20
|
class?: string;
|
|
@@ -16,25 +24,42 @@ export interface AppShellProps {
|
|
|
16
24
|
header?: string;
|
|
17
25
|
body?: string;
|
|
18
26
|
sidebar?: string;
|
|
27
|
+
headerRow?: string;
|
|
28
|
+
headerContent?: string;
|
|
29
|
+
navTrigger?: string;
|
|
30
|
+
navDrawer?: string;
|
|
31
|
+
navDrawerBody?: string;
|
|
19
32
|
main?: string;
|
|
20
33
|
footer?: string;
|
|
21
34
|
};
|
|
22
35
|
}
|
|
23
|
-
declare var
|
|
36
|
+
declare var __VLS_13: {
|
|
37
|
+
navOpen: boolean;
|
|
38
|
+
toggleNav: () => boolean;
|
|
39
|
+
}, __VLS_21: {
|
|
40
|
+
inDrawer: boolean;
|
|
41
|
+
}, __VLS_23: {}, __VLS_25: {}, __VLS_27: {};
|
|
24
42
|
type __VLS_Slots = {} & {
|
|
25
|
-
header?: (props: typeof
|
|
43
|
+
header?: (props: typeof __VLS_13) => any;
|
|
44
|
+
} & {
|
|
45
|
+
sidebar?: (props: typeof __VLS_21) => any;
|
|
26
46
|
} & {
|
|
27
|
-
sidebar?: (props: typeof
|
|
47
|
+
sidebar?: (props: typeof __VLS_23) => any;
|
|
28
48
|
} & {
|
|
29
|
-
default?: (props: typeof
|
|
49
|
+
default?: (props: typeof __VLS_25) => any;
|
|
30
50
|
} & {
|
|
31
|
-
footer?: (props: typeof
|
|
51
|
+
footer?: (props: typeof __VLS_27) => any;
|
|
32
52
|
};
|
|
33
|
-
declare const __VLS_base: import("vue").DefineComponent<AppShellProps, {
|
|
53
|
+
declare const __VLS_base: import("vue").DefineComponent<AppShellProps, {
|
|
54
|
+
/** Open or close the mobile navigation drawer from the outside. */
|
|
55
|
+
navOpen: import("vue").Ref<boolean, boolean>;
|
|
56
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppShellProps> & Readonly<{}>, {
|
|
34
57
|
unstyled: boolean;
|
|
35
58
|
as: string;
|
|
36
59
|
scroll: "main" | "page";
|
|
37
60
|
sidebarPosition: "left" | "right";
|
|
61
|
+
mobileNav: boolean;
|
|
62
|
+
navLabel: string;
|
|
38
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
64
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
65
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { useElementSize as n } from "../composables/element-size.js";
|
|
4
|
+
import { appShellTheme as r } from "../theme/app-shell.js";
|
|
5
|
+
import i from "./Drawer.js";
|
|
6
|
+
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, openBlock as m, ref as h, renderSlot as g, unref as _, useSlots as v, withCtx as y } from "vue";
|
|
7
|
+
import { Menu01Icon as b } from "@hugeicons/core-free-icons";
|
|
8
|
+
import { Primitive as x } from "reka-ui";
|
|
6
9
|
//#region src/components/AppShell.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
10
|
+
var S = ["aria-label", "aria-expanded"], C = /*@__PURE__*/ d({
|
|
8
11
|
__name: "AppShell",
|
|
9
12
|
props: {
|
|
10
13
|
as: { default: "div" },
|
|
11
14
|
scroll: { default: "main" },
|
|
12
15
|
sidebarPosition: { default: "left" },
|
|
16
|
+
mobileNav: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !0
|
|
19
|
+
},
|
|
20
|
+
navLabel: { default: "Open navigation" },
|
|
13
21
|
unstyled: {
|
|
14
22
|
type: Boolean,
|
|
15
23
|
default: void 0
|
|
@@ -17,35 +25,67 @@ var v = /*@__PURE__*/ c({
|
|
|
17
25
|
class: {},
|
|
18
26
|
ui: {}
|
|
19
27
|
},
|
|
20
|
-
setup(
|
|
21
|
-
let
|
|
22
|
-
scroll:
|
|
23
|
-
sidebarPosition:
|
|
28
|
+
setup(d, { expose: C }) {
|
|
29
|
+
let w = d, T = v(), E = e(), D = a(() => w.unstyled ?? E.unstyled), O = h(), { height: k } = n(O), A = a(() => w.scroll === "page" && T.header ? { "--iryx-shell-header-height": `${k.value}px` } : void 0), j = h(!1), M = a(() => w.mobileNav && !!T.sidebar), N = a(() => r({
|
|
30
|
+
scroll: w.scroll,
|
|
31
|
+
sidebarPosition: w.sidebarPosition,
|
|
32
|
+
mobileNav: M.value
|
|
24
33
|
}));
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
C({ navOpen: j });
|
|
35
|
+
function P(e) {
|
|
36
|
+
let t = w.ui?.[e];
|
|
37
|
+
return D.value ? t : N.value[e]({ class: t });
|
|
28
38
|
}
|
|
29
|
-
return (e,
|
|
30
|
-
as:
|
|
31
|
-
style:
|
|
32
|
-
class:
|
|
39
|
+
return (e, n) => (m(), o(_(x), {
|
|
40
|
+
as: w.as,
|
|
41
|
+
style: p(A.value),
|
|
42
|
+
class: f(D.value ? [w.ui?.root, w.class] : N.value.root({ class: [w.ui?.root, w.class] }))
|
|
33
43
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
e.$slots.header ? (
|
|
44
|
+
default: y(() => [
|
|
45
|
+
e.$slots.header ? (m(), c("div", {
|
|
36
46
|
key: 0,
|
|
37
47
|
ref_key: "header",
|
|
38
|
-
ref:
|
|
39
|
-
class:
|
|
40
|
-
}, [
|
|
41
|
-
s("div", { class: l(E("body")) }, [e.$slots.sidebar ? (d(), o("div", {
|
|
48
|
+
ref: O,
|
|
49
|
+
class: f(P("header"))
|
|
50
|
+
}, [l("div", { class: f(P("headerRow")) }, [M.value ? (m(), c("button", {
|
|
42
51
|
key: 0,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
type: "button",
|
|
53
|
+
"aria-label": w.navLabel,
|
|
54
|
+
"aria-expanded": j.value,
|
|
55
|
+
class: f(P("navTrigger")),
|
|
56
|
+
onClick: n[0] ||= (e) => j.value = !0
|
|
57
|
+
}, [u(t, { icon: _(b) }, null, 8, ["icon"])], 10, S)) : s("", !0), l("div", { class: f(P("headerContent")) }, [g(e.$slots, "header", {
|
|
58
|
+
navOpen: j.value,
|
|
59
|
+
toggleNav: () => j.value = !j.value
|
|
60
|
+
})], 2)], 2)], 2)) : s("", !0),
|
|
61
|
+
M.value ? (m(), o(i, {
|
|
46
62
|
key: 1,
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
open: j.value,
|
|
64
|
+
"onUpdate:open": n[1] ||= (e) => j.value = e,
|
|
65
|
+
side: "left",
|
|
66
|
+
size: "sm",
|
|
67
|
+
class: f(P("navDrawer")),
|
|
68
|
+
ui: {
|
|
69
|
+
body: P("navDrawerBody"),
|
|
70
|
+
overlay: "md:hidden",
|
|
71
|
+
content: "md:hidden"
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
default: y(() => [g(e.$slots, "sidebar", { inDrawer: !0 })]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 8, [
|
|
77
|
+
"open",
|
|
78
|
+
"class",
|
|
79
|
+
"ui"
|
|
80
|
+
])) : s("", !0),
|
|
81
|
+
l("div", { class: f(P("body")) }, [e.$slots.sidebar ? (m(), c("div", {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: f(P("sidebar"))
|
|
84
|
+
}, [g(e.$slots, "sidebar")], 2)) : s("", !0), l("main", { class: f(P("main")) }, [g(e.$slots, "default")], 2)], 2),
|
|
85
|
+
e.$slots.footer ? (m(), c("div", {
|
|
86
|
+
key: 2,
|
|
87
|
+
class: f(P("footer"))
|
|
88
|
+
}, [g(e.$slots, "footer")], 2)) : s("", !0)
|
|
49
89
|
]),
|
|
50
90
|
_: 3
|
|
51
91
|
}, 8, [
|
|
@@ -56,4 +96,4 @@ var v = /*@__PURE__*/ c({
|
|
|
56
96
|
}
|
|
57
97
|
});
|
|
58
98
|
//#endregion
|
|
59
|
-
export {
|
|
99
|
+
export { C as default };
|
|
@@ -68,6 +68,7 @@ declare var __VLS_6: {
|
|
|
68
68
|
bandWidth: number;
|
|
69
69
|
labelStep: number;
|
|
70
70
|
bandCentre: (index: number) => number;
|
|
71
|
+
pointAt: (index: number) => number;
|
|
71
72
|
}, __VLS_8: {
|
|
72
73
|
orientation: import("..").ChartOrientation;
|
|
73
74
|
ticks: number[];
|
|
@@ -82,6 +83,7 @@ declare var __VLS_6: {
|
|
|
82
83
|
bandWidth: number;
|
|
83
84
|
labelStep: number;
|
|
84
85
|
bandCentre: (index: number) => number;
|
|
86
|
+
pointAt: (index: number) => number;
|
|
85
87
|
};
|
|
86
88
|
type __VLS_Slots = {} & {
|
|
87
89
|
underlay?: (props: typeof __VLS_6) => any;
|
|
@@ -285,14 +285,14 @@ var ee = ["role", "aria-label"], D = [
|
|
|
285
285
|
h("span", { class: v($("tooltipValue")) }, T(Z.value.total), 3)
|
|
286
286
|
])) : p("", !0)
|
|
287
287
|
], 6)) : p("", !0)], 2),
|
|
288
|
-
h("
|
|
288
|
+
h("div", { class: v($("table")) }, [h("table", null, [
|
|
289
289
|
h("caption", null, T(j.label), 1),
|
|
290
290
|
h("thead", null, [h("tr", null, [t[2] ||= h("th", { scope: "col" }, " Category ", -1), (x(!0), m(u, null, C(R.value, (e) => (x(), m("th", {
|
|
291
291
|
key: e.key,
|
|
292
292
|
scope: "col"
|
|
293
293
|
}, T(e.name ?? "Value"), 1))), 128))])]),
|
|
294
294
|
h("tbody", null, [(x(!0), m(u, null, C(j.data, (e, t) => (x(), m("tr", { key: `row-${e.label}-${t}` }, [h("th", ie, T(e.label), 1), (x(!0), m(u, null, C(R.value, (t) => (x(), m("td", { key: t.key }, T(B(e, t.key) == null ? "—" : L(B(e, t.key))), 1))), 128))]))), 128))])
|
|
295
|
-
], 2)
|
|
295
|
+
])], 2)
|
|
296
296
|
], 10, ee));
|
|
297
297
|
}
|
|
298
298
|
});
|
|
@@ -78,11 +78,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
78
78
|
}>, {
|
|
79
79
|
unstyled: boolean;
|
|
80
80
|
closeLabel: string;
|
|
81
|
+
handle: boolean;
|
|
81
82
|
side: DrawerSide;
|
|
82
83
|
modal: boolean | "trap-focus";
|
|
83
84
|
dismissible: boolean;
|
|
84
85
|
showClose: boolean;
|
|
85
|
-
handle: boolean;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
87
87
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
88
88
|
declare const _default: typeof __VLS_export;
|
|
@@ -19,6 +19,20 @@ export interface LineChartProps {
|
|
|
19
19
|
* overlapping washes muddy into a colour that belongs to neither.
|
|
20
20
|
*/
|
|
21
21
|
variant?: 'line' | 'area';
|
|
22
|
+
/**
|
|
23
|
+
* How much to curve the line, from `0` (straight segments between
|
|
24
|
+
* readings) to `1` (fully rounded). Straight by default: a curve claims the
|
|
25
|
+
* readings run continuously into each other, which is true of a temperature
|
|
26
|
+
* trace and false of six monthly totals.
|
|
27
|
+
*/
|
|
28
|
+
tension?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Carry the line and its fill flat out to the left and right edges of the
|
|
31
|
+
* plot. The readings themselves do not move — markers, labels and the
|
|
32
|
+
* tooltip stay where they are — so the chart fills its box without
|
|
33
|
+
* pretending to know a value it was never given.
|
|
34
|
+
*/
|
|
35
|
+
flush?: boolean;
|
|
22
36
|
/** Rendered height in px. Width always fills the container. */
|
|
23
37
|
height?: number;
|
|
24
38
|
/** Target tick count. The axis lands on round numbers, so this is a hint. */
|
|
@@ -60,6 +74,7 @@ declare var __VLS_6: {
|
|
|
60
74
|
bandWidth: number;
|
|
61
75
|
labelStep: number;
|
|
62
76
|
bandCentre: (index: number) => number;
|
|
77
|
+
pointAt: (index: number) => number;
|
|
63
78
|
}, __VLS_8: {
|
|
64
79
|
orientation: import("..").ChartOrientation;
|
|
65
80
|
ticks: number[];
|
|
@@ -74,6 +89,7 @@ declare var __VLS_6: {
|
|
|
74
89
|
bandWidth: number;
|
|
75
90
|
labelStep: number;
|
|
76
91
|
bandCentre: (index: number) => number;
|
|
92
|
+
pointAt: (index: number) => number;
|
|
77
93
|
};
|
|
78
94
|
type __VLS_Slots = {} & {
|
|
79
95
|
underlay?: (props: typeof __VLS_6) => any;
|
|
@@ -85,9 +101,11 @@ declare const __VLS_base: import("vue").DefineComponent<LineChartProps, {}, {},
|
|
|
85
101
|
unstyled: boolean;
|
|
86
102
|
data: readonly LineChartDatum[];
|
|
87
103
|
legend: boolean;
|
|
104
|
+
flush: boolean;
|
|
88
105
|
height: number;
|
|
89
106
|
ticks: number;
|
|
90
107
|
axis: boolean;
|
|
108
|
+
tension: number;
|
|
91
109
|
zero: boolean;
|
|
92
110
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
93
111
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|