iryx-ui 0.14.0 → 0.16.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/README.md +3 -1
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- 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 +10 -0
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +170 -152
- package/dist/components/DonutChart.js +5 -0
- package/dist/components/DonutChart.vue.d.ts +96 -0
- package/dist/components/DonutChart.vue_vue_type_script_setup_true_lang.js +234 -0
- package/dist/components/Drawer.vue.d.ts +1 -1
- package/dist/components/LineChart.vue.d.ts +26 -0
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +205 -139
- package/dist/components/Popover.vue.d.ts +1 -1
- package/dist/components/Sparkline.vue.d.ts +9 -0
- package/dist/components/Sparkline.vue_vue_type_script_setup_true_lang.js +90 -53
- 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.d.ts +1 -0
- package/dist/components/index.js +140 -138
- package/dist/composables/cartesian.d.ts +17 -2
- package/dist/composables/cartesian.js +6 -1
- package/dist/composables/chart-reveal.d.ts +45 -0
- package/dist/composables/chart-reveal.js +93 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +147 -144
- 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/donut-chart.d.ts +104 -0
- package/dist/theme/donut-chart.js +17 -0
- package/dist/theme/form.js +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/line-chart.js +2 -2
- package/dist/theme/sidebar.js +1 -1
- package/dist/theme/sparkline.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Consumed by the Vue plugin (global registration) and the Nuxt module
|
|
4
4
|
* (auto-imports). Keep in sync with `src/components/index.ts`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DatePicker", "DateRangePicker", "Dialog", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
|
|
6
|
+
export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DatePicker", "DateRangePicker", "Dialog", "DonutChart", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
|
|
7
7
|
export type ComponentName = (typeof componentNames)[number];
|
package/dist/component-names.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/component-names.ts
|
|
2
|
-
var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DatePicker.DateRangePicker.Dialog.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
|
|
2
|
+
var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DatePicker.DateRangePicker.Dialog.DonutChart.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as componentNames };
|
|
@@ -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 };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChartSeries } from '../composables/cartesian';
|
|
2
|
+
import type { ChartAnimate } from '../composables/chart-reveal';
|
|
2
3
|
import type { SparseValue } from '../composables/scale';
|
|
3
4
|
/**
|
|
4
5
|
* A row. `value` is the single-series shortcut; with `series` set, each entry
|
|
@@ -37,6 +38,12 @@ export interface BarChartProps {
|
|
|
37
38
|
ticks?: number;
|
|
38
39
|
/** Drop the value axis and its gridlines. */
|
|
39
40
|
axis?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Grow the bars out of the baseline on the first paint. Skipped for a
|
|
43
|
+
* reader who has asked for reduced motion, and played once — not again when
|
|
44
|
+
* the data changes underneath it.
|
|
45
|
+
*/
|
|
46
|
+
animate?: ChartAnimate;
|
|
40
47
|
/** Drop the legend. Only honoured for a single series — see below. */
|
|
41
48
|
legend?: boolean;
|
|
42
49
|
/** Word for the stacked tooltip's sum — override for non-English apps. */
|
|
@@ -68,6 +75,7 @@ declare var __VLS_6: {
|
|
|
68
75
|
bandWidth: number;
|
|
69
76
|
labelStep: number;
|
|
70
77
|
bandCentre: (index: number) => number;
|
|
78
|
+
pointAt: (index: number) => number;
|
|
71
79
|
}, __VLS_8: {
|
|
72
80
|
orientation: import("..").ChartOrientation;
|
|
73
81
|
ticks: number[];
|
|
@@ -82,6 +90,7 @@ declare var __VLS_6: {
|
|
|
82
90
|
bandWidth: number;
|
|
83
91
|
labelStep: number;
|
|
84
92
|
bandCentre: (index: number) => number;
|
|
93
|
+
pointAt: (index: number) => number;
|
|
85
94
|
};
|
|
86
95
|
type __VLS_Slots = {} & {
|
|
87
96
|
underlay?: (props: typeof __VLS_6) => any;
|
|
@@ -93,6 +102,7 @@ declare const __VLS_base: import("vue").DefineComponent<BarChartProps, {}, {}, {
|
|
|
93
102
|
orientation: "vertical" | "horizontal";
|
|
94
103
|
data: readonly BarChartDatum[];
|
|
95
104
|
legend: boolean;
|
|
105
|
+
animate: ChartAnimate;
|
|
96
106
|
height: number;
|
|
97
107
|
ticks: number;
|
|
98
108
|
axis: boolean;
|