iryx-ui 0.10.2 → 0.12.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 +593 -496
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/components/Banner.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BarChart.vue.d.ts +13 -0
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +174 -132
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -30
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +62 -60
- package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +74 -74
- package/dist/components/Dialog.vue_vue_type_script_setup_true_lang.js +34 -34
- package/dist/components/Drawer.js +5 -0
- package/dist/components/Drawer.vue.d.ts +94 -0
- package/dist/components/Drawer.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +77 -77
- package/dist/components/Icon.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +68 -66
- package/dist/components/Pagination.vue.d.ts +1 -1
- package/dist/components/Pagination.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +34 -31
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +47 -45
- package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/components/Stepper.vue_vue_type_script_setup_true_lang.js +38 -38
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +9 -2
- package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +41 -41
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +54 -52
- package/dist/composables/date.js +12 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +55 -54
- package/dist/theme/drawer.d.ts +110 -0
- package/dist/theme/drawer.js +100 -0
- package/dist/theme/index.d.ts +1 -0
- package/package.json +3 -2
- package/theme.css +114 -0
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +0 -377
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/_virtual/_plugin-vue_export-helper.js +0 -8
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue.js +0 -25
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue2.js +0 -63
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +0 -122
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +0 -84
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +0 -91
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +0 -107
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +0 -159
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +0 -29
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +0 -37
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +0 -6
|
@@ -5,37 +5,41 @@ import { barChartTheme as c } from "../theme/bar-chart.js";
|
|
|
5
5
|
import l from "./ChartLegend.js";
|
|
6
6
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, defineComponent as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, openBlock as x, ref as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E } from "vue";
|
|
7
7
|
//#region src/components/BarChart.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var ee = ["role", "aria-label"], D = [
|
|
9
9
|
"width",
|
|
10
10
|
"height",
|
|
11
11
|
"viewBox"
|
|
12
|
-
],
|
|
12
|
+
], te = [
|
|
13
13
|
"x1",
|
|
14
14
|
"y1",
|
|
15
15
|
"x2",
|
|
16
16
|
"y2"
|
|
17
|
-
],
|
|
17
|
+
], O = [
|
|
18
18
|
"x",
|
|
19
19
|
"y",
|
|
20
20
|
"text-anchor",
|
|
21
21
|
"dominant-baseline"
|
|
22
|
-
],
|
|
22
|
+
], k = ["d"], A = [
|
|
23
23
|
"x",
|
|
24
24
|
"y",
|
|
25
25
|
"text-anchor",
|
|
26
26
|
"dominant-baseline"
|
|
27
|
-
],
|
|
27
|
+
], ne = [
|
|
28
28
|
"x",
|
|
29
29
|
"y",
|
|
30
30
|
"width",
|
|
31
31
|
"height",
|
|
32
32
|
"onPointerenter"
|
|
33
|
-
],
|
|
33
|
+
], re = {
|
|
34
|
+
key: 2,
|
|
35
|
+
class: "flex items-center gap-1.5 border-t border-border pt-1"
|
|
36
|
+
}, ie = { scope: "row" }, ae = .7, j = /*@__PURE__*/ g({
|
|
34
37
|
__name: "BarChart",
|
|
35
38
|
props: {
|
|
36
39
|
data: { default: () => [] },
|
|
37
40
|
series: {},
|
|
38
41
|
orientation: { default: "vertical" },
|
|
42
|
+
stacked: { type: Boolean },
|
|
39
43
|
height: { default: 240 },
|
|
40
44
|
ticks: { default: 5 },
|
|
41
45
|
axis: {
|
|
@@ -46,6 +50,7 @@ var D = ["role", "aria-label"], O = [
|
|
|
46
50
|
type: Boolean,
|
|
47
51
|
default: !0
|
|
48
52
|
},
|
|
53
|
+
totalLabel: { default: "Total" },
|
|
49
54
|
locale: {},
|
|
50
55
|
format: {},
|
|
51
56
|
label: {},
|
|
@@ -57,57 +62,84 @@ var D = ["role", "aria-label"], O = [
|
|
|
57
62
|
ui: {}
|
|
58
63
|
},
|
|
59
64
|
setup(g) {
|
|
60
|
-
let
|
|
61
|
-
function
|
|
62
|
-
return
|
|
65
|
+
let j = g, M = e(), N = d(() => j.unstyled ?? M.unstyled), P = S(), { width: F } = s(P), I = d(() => new Intl.NumberFormat(j.locale, j.format));
|
|
66
|
+
function L(e) {
|
|
67
|
+
return I.value.format(e);
|
|
63
68
|
}
|
|
64
|
-
let
|
|
65
|
-
let e =
|
|
69
|
+
let R = d(() => {
|
|
70
|
+
let e = j.series?.length ? [...j.series] : [{ key: "value" }];
|
|
66
71
|
return o(e.length), e;
|
|
67
|
-
}),
|
|
68
|
-
function
|
|
72
|
+
}), z = d(() => R.value.length > 1), oe = d(() => z.value || j.legend && R.value[0].name != null);
|
|
73
|
+
function B(e, t) {
|
|
69
74
|
let n = e[t];
|
|
70
75
|
return typeof n == "number" && Number.isFinite(n) ? n : null;
|
|
71
76
|
}
|
|
72
|
-
let
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
let V = d(() => j.orientation === "horizontal"), H = d(() => j.stacked && z.value);
|
|
78
|
+
function U(e) {
|
|
79
|
+
let t = 0, n = 0;
|
|
80
|
+
for (let r of R.value) {
|
|
81
|
+
let i = B(e, r.key);
|
|
82
|
+
i != null && (i >= 0 ? t += i : n += i);
|
|
83
|
+
}
|
|
84
|
+
return [t, n];
|
|
85
|
+
}
|
|
86
|
+
let W = d(() => t({
|
|
87
|
+
orientation: j.orientation,
|
|
88
|
+
values: H.value ? j.data.flatMap(U) : j.data.flatMap((e) => R.value.map((t) => B(e, t.key))),
|
|
89
|
+
categories: j.data.length,
|
|
90
|
+
longestLabel: Math.max(...j.data.map((e) => e.label.length), 1),
|
|
91
|
+
width: F.value,
|
|
92
|
+
height: j.height,
|
|
93
|
+
tickCount: j.ticks,
|
|
94
|
+
showAxis: j.axis,
|
|
95
|
+
formatTick: L,
|
|
82
96
|
includeZero: !0
|
|
83
|
-
})), G = d(() => W.value.plot), K = d(() => W.value.y), q = d(() => W.value.bandWidth), J = d(() => q.value *
|
|
84
|
-
if (!
|
|
85
|
-
let e = W.value.value(0), t =
|
|
86
|
-
return
|
|
87
|
-
let s =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
97
|
+
})), G = d(() => W.value.plot), K = d(() => W.value.y), q = d(() => W.value.bandWidth), J = d(() => q.value * ae), Y = d(() => Math.max(2, Math.min(24, J.value / (H.value ? 1 : R.value.length)))), se = d(() => {
|
|
98
|
+
if (!F.value || !j.data.length) return [];
|
|
99
|
+
let e = W.value.value(0), t = R.value.length, n = +(t > 1 && !H.value);
|
|
100
|
+
return j.data.flatMap((r, i) => {
|
|
101
|
+
let a = 0, o = 0, s = R.value.reduce((e, t, n) => {
|
|
102
|
+
let i = B(r, t.key);
|
|
103
|
+
return i != null && i >= 0 ? n : e;
|
|
104
|
+
}, -1), c = R.value.reduce((e, t, n) => {
|
|
105
|
+
let i = B(r, t.key);
|
|
106
|
+
return i != null && i < 0 ? n : e;
|
|
107
|
+
}, -1);
|
|
108
|
+
return R.value.flatMap((l, u) => {
|
|
109
|
+
let d = B(r, l.key);
|
|
110
|
+
if (d == null) return [];
|
|
111
|
+
let f = e, p;
|
|
112
|
+
if (H.value) {
|
|
113
|
+
let e = d >= 0 ? a : o, t = e + d;
|
|
114
|
+
f = W.value.value(e), p = W.value.value(t), d >= 0 ? a = t : o = t;
|
|
115
|
+
} else p = W.value.value(d);
|
|
116
|
+
let m = H.value ? Y.value : Y.value * t, h = W.value.bandCentre(i) - m / 2 + (H.value ? 0 : Y.value * u) + n, g = Math.max(Y.value - n * 2, 1), _ = H.value ? Math.min(2, Math.abs(p - f) / 2) : 0, v = Math.max(Math.abs(p - f) - _, 0), y = p < f ? p + _ : f, b = !H.value || u === (d >= 0 ? s : c);
|
|
117
|
+
return [V.value ? {
|
|
118
|
+
x: y,
|
|
119
|
+
y: h,
|
|
120
|
+
width: v,
|
|
121
|
+
height: g,
|
|
122
|
+
direction: d >= 0 ? "right" : "left",
|
|
123
|
+
capped: b,
|
|
124
|
+
seriesIndex: u,
|
|
125
|
+
categoryIndex: i
|
|
126
|
+
} : {
|
|
127
|
+
x: h,
|
|
128
|
+
y,
|
|
129
|
+
width: g,
|
|
130
|
+
height: v,
|
|
131
|
+
direction: d >= 0 ? "up" : "down",
|
|
132
|
+
capped: b,
|
|
133
|
+
seriesIndex: u,
|
|
134
|
+
categoryIndex: i
|
|
135
|
+
}];
|
|
136
|
+
});
|
|
137
|
+
});
|
|
108
138
|
});
|
|
109
|
-
function
|
|
110
|
-
let { x: t, y: n, width: r, height: i } = e, a = t + r
|
|
139
|
+
function ce(e) {
|
|
140
|
+
let { x: t, y: n, width: r, height: i } = e, a = t + r;
|
|
141
|
+
if (!e.capped) return `M${t} ${n} L${a} ${n} L${a} ${n + i} L${t} ${n + i} Z`;
|
|
142
|
+
let o = n + i, s = Math.min(4, r / 2, i / 2, e.direction === "up" || e.direction === "down" ? i : r);
|
|
111
143
|
switch (e.direction) {
|
|
112
144
|
case "up": return `M${t} ${o} L${t} ${n + s} Q${t} ${n} ${t + s} ${n} L${a - s} ${n} Q${a} ${n} ${a} ${n + s} L${a} ${o} Z`;
|
|
113
145
|
case "down": return `M${t} ${n} L${t} ${o - s} Q${t} ${o} ${t + s} ${o} L${a - s} ${o} Q${a} ${o} ${a} ${o - s} L${a} ${n} Z`;
|
|
@@ -115,144 +147,154 @@ var D = ["role", "aria-label"], O = [
|
|
|
115
147
|
default: return `M${a} ${n} L${t + s} ${n} Q${t} ${n} ${t} ${n + s} L${t} ${o - s} Q${t} ${o} ${t + s} ${o} L${a} ${o} Z`;
|
|
116
148
|
}
|
|
117
149
|
}
|
|
118
|
-
let
|
|
150
|
+
let le = d(() => W.value.labelStep), X = S(), Z = d(() => {
|
|
119
151
|
if (X.value == null) return;
|
|
120
|
-
let e =
|
|
152
|
+
let e = j.data[X.value];
|
|
121
153
|
if (!e) return;
|
|
122
|
-
let t =
|
|
154
|
+
let t = R.value.map((t, n) => ({
|
|
123
155
|
name: t.name ?? t.key,
|
|
124
156
|
color: r(i(t, n)),
|
|
125
|
-
value:
|
|
157
|
+
value: B(e, t.key)
|
|
126
158
|
})).filter((e) => e.value != null).map((e) => ({
|
|
127
159
|
...e,
|
|
128
|
-
value:
|
|
160
|
+
value: L(e.value)
|
|
129
161
|
}));
|
|
130
162
|
if (!t.length) return;
|
|
131
|
-
let o =
|
|
132
|
-
if (
|
|
133
|
-
let r = Math.max(...
|
|
134
|
-
let n =
|
|
163
|
+
let o = H.value ? L(U(e).reduce((e, t) => e + t, 0)) : void 0, s = z.value ? Math.max(e.label.length, o ? o.length + 6 : 0, ...t.map((e) => e.name.length + e.value.length + 3)) : e.label.length + t[0].value.length + 2, c = W.value.bandCentre(X.value);
|
|
164
|
+
if (V.value) {
|
|
165
|
+
let r = H.value ? W.value.value(U(e)[0]) : Math.max(...R.value.map((t) => {
|
|
166
|
+
let n = B(e, t.key);
|
|
135
167
|
return n == null ? -Infinity : W.value.value(n);
|
|
136
|
-
})), i = "x".repeat(
|
|
168
|
+
})), i = "x".repeat(s), l = a(i), u = r + l + 8, d = u + l <= F.value;
|
|
137
169
|
return {
|
|
138
170
|
label: e.label,
|
|
139
171
|
rows: t,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
172
|
+
total: o,
|
|
173
|
+
multi: z.value,
|
|
174
|
+
x: n(d ? u : r - l - 8, i, F.value),
|
|
175
|
+
y: c
|
|
143
176
|
};
|
|
144
177
|
}
|
|
145
|
-
let
|
|
146
|
-
let n =
|
|
178
|
+
let l = H.value ? W.value.value(U(e)[0]) : Math.min(...R.value.map((t) => {
|
|
179
|
+
let n = B(e, t.key);
|
|
147
180
|
return n == null ? Infinity : Math.min(W.value.value(n), W.value.value(0));
|
|
148
181
|
}));
|
|
149
182
|
return {
|
|
150
183
|
label: e.label,
|
|
151
184
|
rows: t,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
185
|
+
total: o,
|
|
186
|
+
multi: z.value,
|
|
187
|
+
x: n(c, "x".repeat(s), F.value),
|
|
188
|
+
y: l
|
|
155
189
|
};
|
|
156
190
|
}), Q = d(() => c());
|
|
157
191
|
function $(e, t) {
|
|
158
|
-
let n =
|
|
159
|
-
return
|
|
192
|
+
let n = j.ui?.[e];
|
|
193
|
+
return N.value ? [n, t] : Q.value[e]({ class: [n, t] });
|
|
160
194
|
}
|
|
161
|
-
function
|
|
195
|
+
function ue(e) {
|
|
162
196
|
let t = X.value != null && X.value !== e.categoryIndex;
|
|
163
|
-
return
|
|
197
|
+
return N.value ? [j.ui?.bar] : Q.value.bar({ class: [j.ui?.bar, t ? Q.value.faded() : void 0] });
|
|
164
198
|
}
|
|
165
199
|
return (e, t) => (x(), m("div", {
|
|
166
200
|
ref_key: "root",
|
|
167
|
-
ref:
|
|
168
|
-
role:
|
|
169
|
-
"aria-label":
|
|
170
|
-
class: v($("root",
|
|
201
|
+
ref: P,
|
|
202
|
+
role: j.label ? "figure" : void 0,
|
|
203
|
+
"aria-label": j.label,
|
|
204
|
+
class: v($("root", j.class))
|
|
171
205
|
}, [
|
|
172
|
-
|
|
206
|
+
oe.value ? (x(), f(l, {
|
|
173
207
|
key: 0,
|
|
174
|
-
series:
|
|
175
|
-
unstyled:
|
|
208
|
+
series: R.value,
|
|
209
|
+
unstyled: j.unstyled
|
|
176
210
|
}, null, 8, ["series", "unstyled"])) : p("", !0),
|
|
177
|
-
h("div", { class: v(
|
|
178
|
-
width: E(
|
|
179
|
-
height:
|
|
180
|
-
viewBox: `0 0 ${E(
|
|
211
|
+
h("div", { class: v(N.value ? void 0 : Q.value.plot()) }, [(x(), m("svg", {
|
|
212
|
+
width: E(F),
|
|
213
|
+
height: j.height,
|
|
214
|
+
viewBox: `0 0 ${E(F)} ${j.height}`,
|
|
181
215
|
"aria-hidden": "true",
|
|
182
216
|
class: v($("svg"))
|
|
183
217
|
}, [
|
|
184
|
-
|
|
185
|
-
x1:
|
|
186
|
-
y1:
|
|
187
|
-
x2:
|
|
188
|
-
y2:
|
|
218
|
+
j.axis ? (x(!0), m(u, { key: 0 }, C(W.value.ticks, (e) => (x(), m("g", { key: `tick-${e}` }, [h("line", {
|
|
219
|
+
x1: V.value ? W.value.value(e) : G.value.left,
|
|
220
|
+
y1: V.value ? G.value.top : K.value(e),
|
|
221
|
+
x2: V.value ? W.value.value(e) : G.value.left + G.value.width,
|
|
222
|
+
y2: V.value ? G.value.top + G.value.height : K.value(e),
|
|
189
223
|
"stroke-width": "1",
|
|
190
224
|
class: v($("grid"))
|
|
191
|
-
}, null, 10,
|
|
192
|
-
x:
|
|
193
|
-
y:
|
|
194
|
-
"text-anchor":
|
|
195
|
-
"dominant-baseline":
|
|
225
|
+
}, null, 10, te), h("text", {
|
|
226
|
+
x: V.value ? W.value.value(e) : G.value.left - E(8),
|
|
227
|
+
y: V.value ? G.value.top + G.value.height + 14 : K.value(e),
|
|
228
|
+
"text-anchor": V.value ? "middle" : "end",
|
|
229
|
+
"dominant-baseline": V.value ? void 0 : "middle",
|
|
196
230
|
class: v($("tick"))
|
|
197
|
-
}, T(
|
|
231
|
+
}, T(L(e)), 11, O)]))), 128)) : p("", !0),
|
|
198
232
|
w(e.$slots, "underlay", y(_(W.value))),
|
|
199
|
-
(x(!0), m(u, null, C(
|
|
233
|
+
(x(!0), m(u, null, C(se.value, (e, t) => (x(), m("path", {
|
|
200
234
|
key: `bar-${e.categoryIndex}-${e.seriesIndex}-${t}`,
|
|
201
|
-
d:
|
|
202
|
-
style: b({ fill: E(r)(E(i)(
|
|
203
|
-
class: v(
|
|
204
|
-
}, null, 14,
|
|
205
|
-
(x(!0), m(u, null, C(
|
|
235
|
+
d: ce(e),
|
|
236
|
+
style: b({ fill: E(r)(E(i)(R.value[e.seriesIndex], e.seriesIndex)) }),
|
|
237
|
+
class: v(ue(e))
|
|
238
|
+
}, null, 14, k))), 128)),
|
|
239
|
+
(x(!0), m(u, null, C(j.data, (e, t) => (x(), m(u, { key: `label-${e.label}-${t}` }, [t % le.value === 0 ? (x(), m("text", {
|
|
206
240
|
key: 0,
|
|
207
|
-
x:
|
|
208
|
-
y:
|
|
209
|
-
"text-anchor":
|
|
210
|
-
"dominant-baseline":
|
|
241
|
+
x: V.value ? G.value.left - E(8) : W.value.bandCentre(t),
|
|
242
|
+
y: V.value ? W.value.bandCentre(t) : G.value.top + G.value.height + 14,
|
|
243
|
+
"text-anchor": V.value ? "end" : "middle",
|
|
244
|
+
"dominant-baseline": V.value ? "middle" : void 0,
|
|
211
245
|
class: v($("category"))
|
|
212
|
-
}, T(e.label), 11,
|
|
246
|
+
}, T(e.label), 11, A)) : p("", !0)], 64))), 128)),
|
|
213
247
|
w(e.$slots, "overlay", y(_(W.value))),
|
|
214
|
-
(x(!0), m(u, null, C(
|
|
248
|
+
(x(!0), m(u, null, C(j.data, (e, n) => (x(), m("rect", {
|
|
215
249
|
key: `hit-${e.label}-${n}`,
|
|
216
|
-
x:
|
|
217
|
-
y:
|
|
218
|
-
width:
|
|
219
|
-
height:
|
|
220
|
-
class: v(
|
|
250
|
+
x: V.value ? G.value.left : G.value.left + q.value * n,
|
|
251
|
+
y: V.value ? G.value.top + q.value * n : G.value.top,
|
|
252
|
+
width: V.value ? G.value.width : q.value,
|
|
253
|
+
height: V.value ? q.value : G.value.height,
|
|
254
|
+
class: v(N.value ? void 0 : Q.value.hit()),
|
|
221
255
|
onPointerenter: (e) => X.value = n,
|
|
222
256
|
onPointerleave: t[0] ||= (e) => X.value = void 0
|
|
223
|
-
}, null, 42,
|
|
224
|
-
], 10,
|
|
257
|
+
}, null, 42, ne))), 128))
|
|
258
|
+
], 10, D)), Z.value ? (x(), m("div", {
|
|
225
259
|
key: 0,
|
|
226
260
|
class: v($("tooltip", Z.value.multi ? "flex-col items-start gap-1" : void 0)),
|
|
227
261
|
style: b({
|
|
228
262
|
left: `${Z.value.x}px`,
|
|
229
263
|
top: `${Z.value.y}px`,
|
|
230
|
-
transform:
|
|
264
|
+
transform: V.value ? "translate(-50%, -50%)" : "translate(-50%, -100%) translateY(-8px)"
|
|
231
265
|
})
|
|
232
|
-
}, [h("span", { class: v($("tooltipLabel")) }, T(Z.value.label), 3), Z.value.multi ? (x(!0), m(u, { key: 0 }, C(Z.value.rows, (e) => (x(), m("span", {
|
|
233
|
-
key: e.name,
|
|
234
|
-
class: "flex items-center gap-1.5"
|
|
235
266
|
}, [
|
|
236
|
-
h("span", {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
267
|
+
h("span", { class: v($("tooltipLabel")) }, T(Z.value.label), 3),
|
|
268
|
+
Z.value.multi ? (x(!0), m(u, { key: 0 }, C(Z.value.rows, (e) => (x(), m("span", {
|
|
269
|
+
key: e.name,
|
|
270
|
+
class: "flex items-center gap-1.5"
|
|
271
|
+
}, [
|
|
272
|
+
h("span", {
|
|
273
|
+
class: "size-2 shrink-0 rounded-full",
|
|
274
|
+
style: b({ background: e.color })
|
|
275
|
+
}, null, 4),
|
|
276
|
+
h("span", { class: v($("tooltipLabel")) }, T(e.name), 3),
|
|
277
|
+
h("span", { class: v($("tooltipValue")) }, T(e.value), 3)
|
|
278
|
+
]))), 128)) : (x(), m("span", {
|
|
279
|
+
key: 1,
|
|
280
|
+
class: v($("tooltipValue"))
|
|
281
|
+
}, T(Z.value.rows[0].value), 3)),
|
|
282
|
+
Z.value.total ? (x(), m("span", re, [
|
|
283
|
+
t[1] ||= h("span", { class: "size-2 shrink-0" }, null, -1),
|
|
284
|
+
h("span", { class: v($("tooltipLabel")) }, T(j.totalLabel), 3),
|
|
285
|
+
h("span", { class: v($("tooltipValue")) }, T(Z.value.total), 3)
|
|
286
|
+
])) : p("", !0)
|
|
287
|
+
], 6)) : p("", !0)], 2),
|
|
246
288
|
h("table", { class: v($("table")) }, [
|
|
247
|
-
h("caption", null, T(
|
|
248
|
-
h("thead", null, [h("tr", null, [t[
|
|
289
|
+
h("caption", null, T(j.label), 1),
|
|
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", {
|
|
249
291
|
key: e.key,
|
|
250
292
|
scope: "col"
|
|
251
293
|
}, T(e.name ?? "Value"), 1))), 128))])]),
|
|
252
|
-
h("tbody", null, [(x(!0), m(u, null, C(
|
|
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))])
|
|
253
295
|
], 2)
|
|
254
|
-
], 10,
|
|
296
|
+
], 10, ee));
|
|
255
297
|
}
|
|
256
298
|
});
|
|
257
299
|
//#endregion
|
|
258
|
-
export {
|
|
300
|
+
export { j as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { breadcrumbTheme as n } from "../theme/breadcrumb.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, openBlock as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
5
|
+
import { ArrowRight01Icon as b } from "@hugeicons/core-free-icons";
|
|
6
6
|
import { Primitive as x } from "reka-ui";
|
|
7
7
|
//#region src/components/Breadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var S = /*@__PURE__*/
|
|
8
|
+
var S = /*@__PURE__*/ d({
|
|
9
9
|
__name: "Breadcrumb",
|
|
10
10
|
props: {
|
|
11
11
|
items: {},
|
|
@@ -17,49 +17,49 @@ var S = /*@__PURE__*/ f({
|
|
|
17
17
|
class: {},
|
|
18
18
|
ui: {}
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
21
|
-
let S =
|
|
20
|
+
setup(d) {
|
|
21
|
+
let S = d, C = e(), w = i(() => S.unstyled ?? C.unstyled), T = i(() => S.items ?? []), E = i(() => T.value.length - 1), D = i(() => n());
|
|
22
22
|
function O(e) {
|
|
23
23
|
let t = S.ui?.[e];
|
|
24
24
|
return w.value ? t : D.value[e]({ class: t });
|
|
25
25
|
}
|
|
26
|
-
return (
|
|
26
|
+
return (e, n) => (p(), a(v(x), {
|
|
27
27
|
as: "nav",
|
|
28
28
|
"aria-label": S.label,
|
|
29
|
-
class:
|
|
29
|
+
class: f(w.value ? [S.ui?.root, S.class] : D.value.root({ class: [S.ui?.root, S.class] }))
|
|
30
30
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
key:
|
|
33
|
-
class:
|
|
34
|
-
}, [
|
|
31
|
+
default: y(() => [c("ol", { class: f(O("list")) }, [(p(!0), s(r, null, m(T.value, (n, r) => (p(), s("li", {
|
|
32
|
+
key: r,
|
|
33
|
+
class: f(O("item"))
|
|
34
|
+
}, [r === E.value ? (p(), s("span", {
|
|
35
35
|
key: 0,
|
|
36
36
|
"aria-current": "page",
|
|
37
|
-
class:
|
|
38
|
-
}, [
|
|
37
|
+
class: f(O("current"))
|
|
38
|
+
}, [n.icon ? (p(), a(t, {
|
|
39
39
|
key: 0,
|
|
40
|
-
icon:
|
|
41
|
-
}, null, 8, ["icon"])) :
|
|
40
|
+
icon: n.icon
|
|
41
|
+
}, null, 8, ["icon"])) : o("", !0), l(" " + _(n.label), 1)], 2)) : (p(), a(g(n.href ? "a" : "button"), {
|
|
42
42
|
key: 1,
|
|
43
|
-
href:
|
|
44
|
-
type:
|
|
45
|
-
class:
|
|
46
|
-
onClick: (e) =>
|
|
43
|
+
href: n.href,
|
|
44
|
+
type: n.href ? void 0 : "button",
|
|
45
|
+
class: f(O("link")),
|
|
46
|
+
onClick: (e) => n.onSelect?.()
|
|
47
47
|
}, {
|
|
48
|
-
default:
|
|
48
|
+
default: y(() => [n.icon ? (p(), a(t, {
|
|
49
49
|
key: 0,
|
|
50
|
-
icon:
|
|
51
|
-
}, null, 8, ["icon"])) :
|
|
50
|
+
icon: n.icon
|
|
51
|
+
}, null, 8, ["icon"])) : o("", !0), l(" " + _(n.label), 1)]),
|
|
52
52
|
_: 2
|
|
53
53
|
}, 1032, [
|
|
54
54
|
"href",
|
|
55
55
|
"type",
|
|
56
56
|
"class",
|
|
57
57
|
"onClick"
|
|
58
|
-
])),
|
|
58
|
+
])), r === E.value ? o("", !0) : (p(), s("span", {
|
|
59
59
|
key: 2,
|
|
60
60
|
"aria-hidden": "true",
|
|
61
|
-
class:
|
|
62
|
-
}, [
|
|
61
|
+
class: f(O("separator"))
|
|
62
|
+
}, [h(e.$slots, "separator", {}, () => [u(t, { icon: v(b) }, null, 8, ["icon"])])], 2))], 2))), 128))], 2)]),
|
|
63
63
|
_: 3
|
|
64
64
|
}, 8, ["aria-label", "class"]));
|
|
65
65
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { useButtonGroup as n } from "../composables/button-group.js";
|
|
4
|
+
import { buttonTheme as r } from "../theme/button.js";
|
|
5
|
+
import { computed as i, createBlock as a, createCommentVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, unref as d, withCtx as f } from "vue";
|
|
6
|
+
import { Loading03Icon as p } from "@hugeicons/core-free-icons";
|
|
7
7
|
import { Primitive as m } from "reka-ui";
|
|
8
8
|
//#region src/components/Button.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var h = /*@__PURE__*/
|
|
9
|
+
var h = /*@__PURE__*/ s({
|
|
10
10
|
__name: "Button",
|
|
11
11
|
props: {
|
|
12
12
|
as: { default: "button" },
|
|
@@ -24,27 +24,27 @@ var h = /*@__PURE__*/ c({
|
|
|
24
24
|
type: { default: "button" },
|
|
25
25
|
class: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
let h =
|
|
27
|
+
setup(s) {
|
|
28
|
+
let h = s, g = e(), _ = i(() => h.unstyled ?? g.unstyled), v = n(), y = i(() => h.size ?? v?.size.value), b = i(() => _.value ? h.class : r({
|
|
29
29
|
variant: h.variant,
|
|
30
30
|
size: y.value,
|
|
31
31
|
block: h.block,
|
|
32
32
|
square: h.square,
|
|
33
33
|
class: h.class
|
|
34
34
|
}));
|
|
35
|
-
return (
|
|
35
|
+
return (e, n) => (l(), a(d(m), {
|
|
36
36
|
as: h.as,
|
|
37
37
|
"as-child": h.asChild,
|
|
38
38
|
type: h.as === "button" ? h.type : void 0,
|
|
39
39
|
disabled: h.disabled || h.loading || void 0,
|
|
40
|
-
class:
|
|
40
|
+
class: c(b.value)
|
|
41
41
|
}, {
|
|
42
|
-
default:
|
|
42
|
+
default: f(() => [h.loading ? (l(), a(t, {
|
|
43
43
|
key: 0,
|
|
44
|
-
icon:
|
|
44
|
+
icon: d(p),
|
|
45
45
|
"data-icon": "inline-start",
|
|
46
46
|
class: "animate-spin"
|
|
47
|
-
}, null, 8, ["icon"])) :
|
|
47
|
+
}, null, 8, ["icon"])) : o("", !0), u(e.$slots, "default")]),
|
|
48
48
|
_: 3
|
|
49
49
|
}, 8, [
|
|
50
50
|
"as",
|