iryx-ui 0.7.0 → 0.9.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 +155 -7
- package/dist/component-names.d.ts +1 -1
- package/dist/components/BarChart.vue.d.ts +36 -0
- package/dist/components/FileUpload.vue.d.ts +64 -0
- package/dist/components/Sparkline.vue.d.ts +38 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/composables/element-size.d.ts +15 -0
- package/dist/composables/scale.d.ts +36 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +78 -70
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +86 -7
- package/dist/packages/iryx-ui/src/component-names.js +1 -1
- package/dist/packages/iryx-ui/src/components/BarChart.js +5 -0
- package/dist/packages/iryx-ui/src/components/BarChart.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/packages/iryx-ui/src/components/FileUpload.js +5 -0
- package/dist/packages/iryx-ui/src/components/FileUpload.vue_vue_type_script_setup_true_lang.js +209 -0
- package/dist/packages/iryx-ui/src/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/packages/iryx-ui/src/components/Sparkline.js +5 -0
- package/dist/packages/iryx-ui/src/components/Sparkline.vue_vue_type_script_setup_true_lang.js +110 -0
- package/dist/packages/iryx-ui/src/components/index.js +72 -66
- package/dist/packages/iryx-ui/src/composables/element-size.js +22 -0
- package/dist/packages/iryx-ui/src/composables/scale.js +43 -0
- package/dist/packages/iryx-ui/src/theme/bar-chart.js +18 -0
- package/dist/packages/iryx-ui/src/theme/file-upload.js +29 -0
- package/dist/packages/iryx-ui/src/theme/password-input.js +1 -0
- package/dist/packages/iryx-ui/src/theme/sparkline.js +15 -0
- package/dist/theme/bar-chart.d.ts +111 -0
- package/dist/theme/file-upload.d.ts +143 -0
- package/dist/theme/form.d.ts +3 -3
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/password-input.d.ts +18 -0
- package/dist/theme/sparkline.d.ts +58 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { extent as t, linearScale as n } from "../composables/scale.js";
|
|
3
|
+
import { sparklineTheme as r } from "../theme/sparkline.js";
|
|
4
|
+
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, openBlock as f, renderList as p } from "vue";
|
|
5
|
+
//#region src/components/Sparkline.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var m = [
|
|
7
|
+
"viewBox",
|
|
8
|
+
"height",
|
|
9
|
+
"role",
|
|
10
|
+
"aria-label",
|
|
11
|
+
"aria-hidden"
|
|
12
|
+
], h = ["d"], g = ["d"], _ = ["d"], v = ["d"], y = 100, b = /*@__PURE__*/ l({
|
|
13
|
+
__name: "Sparkline",
|
|
14
|
+
props: {
|
|
15
|
+
data: { default: () => [] },
|
|
16
|
+
variant: { default: "line" },
|
|
17
|
+
endDot: { type: Boolean },
|
|
18
|
+
baseline: { default: "min" },
|
|
19
|
+
min: {},
|
|
20
|
+
max: {},
|
|
21
|
+
muted: { type: Boolean },
|
|
22
|
+
label: {},
|
|
23
|
+
height: { default: 32 },
|
|
24
|
+
unstyled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
class: {},
|
|
29
|
+
ui: {}
|
|
30
|
+
},
|
|
31
|
+
setup(l) {
|
|
32
|
+
let b = l, x = e(), S = a(() => b.unstyled ?? x.unstyled), C = a(() => b.endDot ? 6 : 1), w = a(() => Math.max(b.height - C.value * 2, 1)), T = a(() => {
|
|
33
|
+
let e = b.data, r = t(e);
|
|
34
|
+
if (!r) return [];
|
|
35
|
+
let [i, a] = r, o = b.min ?? i, s = b.max ?? a, c = n([0, Math.max(e.length - 1, 0)], [0, y]), l = n([o, s], [y, 0]), u = [], d = [];
|
|
36
|
+
return e.forEach((e, t) => {
|
|
37
|
+
if (typeof e != "number" || !Number.isFinite(e)) {
|
|
38
|
+
d.length && u.push(d), d = [];
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
d.push({
|
|
42
|
+
x: E(c(t)),
|
|
43
|
+
y: E(l(e))
|
|
44
|
+
});
|
|
45
|
+
}), d.length && u.push(d), u;
|
|
46
|
+
});
|
|
47
|
+
function E(e) {
|
|
48
|
+
return Math.round(e * 100) / 100;
|
|
49
|
+
}
|
|
50
|
+
function D(e) {
|
|
51
|
+
return e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x} ${e.y}`).join(" ");
|
|
52
|
+
}
|
|
53
|
+
let O = a(() => {
|
|
54
|
+
let e = t(b.data);
|
|
55
|
+
if (!e) return y;
|
|
56
|
+
let r = b.min ?? e[0], i = b.max ?? e[1];
|
|
57
|
+
return b.baseline === "zero" && r <= 0 && i >= 0 ? E(n([r, i], [y, 0])(0)) : y;
|
|
58
|
+
});
|
|
59
|
+
function k(e) {
|
|
60
|
+
let t = e[0], n = e[e.length - 1];
|
|
61
|
+
return `${D(e)} L${n.x} ${O.value} L${t.x} ${O.value} Z`;
|
|
62
|
+
}
|
|
63
|
+
let A = a(() => {
|
|
64
|
+
let e = T.value[T.value.length - 1];
|
|
65
|
+
return e?.[e.length - 1];
|
|
66
|
+
}), j = a(() => r({ muted: b.muted }));
|
|
67
|
+
function M(e, t) {
|
|
68
|
+
let n = b.ui?.[e];
|
|
69
|
+
return S.value ? [n, t] : j.value[e]({ class: [n, t] });
|
|
70
|
+
}
|
|
71
|
+
return (e, t) => (f(), s("span", {
|
|
72
|
+
class: u(M("root", b.class)),
|
|
73
|
+
style: d({ padding: `${C.value}px` })
|
|
74
|
+
}, [(f(), s("svg", {
|
|
75
|
+
viewBox: `0 0 ${y} ${y}`,
|
|
76
|
+
preserveAspectRatio: "none",
|
|
77
|
+
height: w.value,
|
|
78
|
+
style: d({ height: `${w.value}px` }),
|
|
79
|
+
role: b.label ? "img" : void 0,
|
|
80
|
+
"aria-label": b.label,
|
|
81
|
+
"aria-hidden": b.label ? void 0 : !0,
|
|
82
|
+
class: u(M("plot"))
|
|
83
|
+
}, [
|
|
84
|
+
b.variant === "area" ? (f(!0), s(i, { key: 0 }, p(T.value, (e, t) => (f(), s("path", {
|
|
85
|
+
key: `area-${t}`,
|
|
86
|
+
d: k(e),
|
|
87
|
+
class: u(M("area"))
|
|
88
|
+
}, null, 10, h))), 128)) : o("", !0),
|
|
89
|
+
(f(!0), s(i, null, p(T.value, (e, t) => (f(), s("path", {
|
|
90
|
+
key: `line-${t}`,
|
|
91
|
+
d: D(e),
|
|
92
|
+
"vector-effect": "non-scaling-stroke",
|
|
93
|
+
class: u(M("line"))
|
|
94
|
+
}, null, 10, g))), 128)),
|
|
95
|
+
b.endDot && A.value ? (f(), s(i, { key: 1 }, [c("path", {
|
|
96
|
+
d: `M${A.value.x} ${A.value.y} L${A.value.x} ${A.value.y}`,
|
|
97
|
+
"stroke-width": "12",
|
|
98
|
+
"vector-effect": "non-scaling-stroke",
|
|
99
|
+
class: u(M("ring"))
|
|
100
|
+
}, null, 10, _), c("path", {
|
|
101
|
+
d: `M${A.value.x} ${A.value.y} L${A.value.x} ${A.value.y}`,
|
|
102
|
+
"stroke-width": "8",
|
|
103
|
+
"vector-effect": "non-scaling-stroke",
|
|
104
|
+
class: u(M("dot"))
|
|
105
|
+
}, null, 10, v)], 64)) : o("", !0)
|
|
106
|
+
], 14, m))], 6));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
//#endregion
|
|
110
|
+
export { b as default };
|
|
@@ -3,76 +3,82 @@ import t from "./Alert.js";
|
|
|
3
3
|
import n from "./App.js";
|
|
4
4
|
import r from "./Badge.js";
|
|
5
5
|
import i from "./Banner.js";
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
8
|
-
import s from "./
|
|
9
|
-
import c from "./
|
|
10
|
-
import l from "./
|
|
11
|
-
import u from "./
|
|
12
|
-
import d from "./
|
|
13
|
-
import f from "./
|
|
14
|
-
import p from "./
|
|
15
|
-
import m from "./
|
|
16
|
-
import h from "./
|
|
17
|
-
import g from "./
|
|
18
|
-
import _ from "./
|
|
19
|
-
import v from "./
|
|
20
|
-
import y from "./
|
|
21
|
-
import b from "./
|
|
22
|
-
import x from "./
|
|
23
|
-
import S from "./
|
|
24
|
-
import C from "./
|
|
25
|
-
import w from "./
|
|
26
|
-
import T from "./
|
|
27
|
-
import E from "./
|
|
28
|
-
import D from "./
|
|
29
|
-
import O from "./
|
|
30
|
-
import k from "./
|
|
31
|
-
import A from "./
|
|
32
|
-
import j from "./
|
|
33
|
-
import M from "./
|
|
34
|
-
import N from "./
|
|
35
|
-
import P from "./
|
|
36
|
-
import F from "./
|
|
37
|
-
import I from "./
|
|
6
|
+
import a from "./BarChart.js";
|
|
7
|
+
import o from "./Breadcrumb.js";
|
|
8
|
+
import s from "./Button.js";
|
|
9
|
+
import c from "./ButtonGroup.js";
|
|
10
|
+
import l from "./Card.js";
|
|
11
|
+
import u from "./Checkbox.js";
|
|
12
|
+
import d from "./Combobox.js";
|
|
13
|
+
import f from "./Dialog.js";
|
|
14
|
+
import p from "./ConfirmDialog.js";
|
|
15
|
+
import m from "./DatePicker.js";
|
|
16
|
+
import h from "./DateRangePicker.js";
|
|
17
|
+
import g from "./DropdownMenu.js";
|
|
18
|
+
import _ from "./EmptyState.js";
|
|
19
|
+
import v from "./FileUpload.js";
|
|
20
|
+
import y from "./Form.js";
|
|
21
|
+
import b from "./Label.js";
|
|
22
|
+
import x from "./FormField.js";
|
|
23
|
+
import S from "./Input.js";
|
|
24
|
+
import C from "./NumberInput.js";
|
|
25
|
+
import w from "./Pagination.js";
|
|
26
|
+
import T from "./PasswordInput.js";
|
|
27
|
+
import E from "./Progress.js";
|
|
28
|
+
import D from "./RadioGroup.js";
|
|
29
|
+
import O from "./Select.js";
|
|
30
|
+
import k from "./Separator.js";
|
|
31
|
+
import A from "./Skeleton.js";
|
|
32
|
+
import j from "./Sparkline.js";
|
|
33
|
+
import M from "./Stat.js";
|
|
34
|
+
import N from "./Stepper.js";
|
|
35
|
+
import P from "./Switch.js";
|
|
36
|
+
import F from "./Table.js";
|
|
37
|
+
import I from "./Tabs.js";
|
|
38
|
+
import L from "./Textarea.js";
|
|
39
|
+
import R from "./Toaster.js";
|
|
40
|
+
import z from "./Tooltip.js";
|
|
38
41
|
//#region src/components/index.ts
|
|
39
|
-
var
|
|
42
|
+
var B = /* @__PURE__ */ e({
|
|
40
43
|
Alert: () => t,
|
|
41
44
|
App: () => n,
|
|
42
45
|
Badge: () => r,
|
|
43
46
|
Banner: () => i,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
47
|
+
BarChart: () => a,
|
|
48
|
+
Breadcrumb: () => o,
|
|
49
|
+
Button: () => s,
|
|
50
|
+
ButtonGroup: () => c,
|
|
51
|
+
Card: () => l,
|
|
52
|
+
Checkbox: () => u,
|
|
53
|
+
Combobox: () => d,
|
|
54
|
+
ConfirmDialog: () => p,
|
|
55
|
+
DatePicker: () => m,
|
|
56
|
+
DateRangePicker: () => h,
|
|
57
|
+
Dialog: () => f,
|
|
58
|
+
DropdownMenu: () => g,
|
|
59
|
+
EmptyState: () => _,
|
|
60
|
+
FileUpload: () => v,
|
|
61
|
+
Form: () => y,
|
|
62
|
+
FormField: () => x,
|
|
63
|
+
Input: () => S,
|
|
64
|
+
Label: () => b,
|
|
65
|
+
NumberInput: () => C,
|
|
66
|
+
Pagination: () => w,
|
|
67
|
+
PasswordInput: () => T,
|
|
68
|
+
Progress: () => E,
|
|
69
|
+
RadioGroup: () => D,
|
|
70
|
+
Select: () => O,
|
|
71
|
+
Separator: () => k,
|
|
72
|
+
Skeleton: () => A,
|
|
73
|
+
Sparkline: () => j,
|
|
74
|
+
Stat: () => M,
|
|
75
|
+
Stepper: () => N,
|
|
76
|
+
Switch: () => P,
|
|
77
|
+
Table: () => F,
|
|
78
|
+
Tabs: () => I,
|
|
79
|
+
Textarea: () => L,
|
|
80
|
+
Toaster: () => R,
|
|
81
|
+
Tooltip: () => z
|
|
76
82
|
});
|
|
77
83
|
//#endregion
|
|
78
|
-
export {
|
|
84
|
+
export { B as components_exports };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { onBeforeUnmount as e, ref as t, watch as n } from "vue";
|
|
2
|
+
//#region src/composables/element-size.ts
|
|
3
|
+
function r(r) {
|
|
4
|
+
let i = t(0), a = t(0), o;
|
|
5
|
+
function s() {
|
|
6
|
+
o?.disconnect(), o = void 0;
|
|
7
|
+
}
|
|
8
|
+
return n(r, (e) => {
|
|
9
|
+
s(), e && (i.value = e.clientWidth, a.value = e.clientHeight, !(typeof ResizeObserver > "u") && (o = new ResizeObserver((e) => {
|
|
10
|
+
let t = e[0];
|
|
11
|
+
t && (i.value = t.contentRect.width, a.value = t.contentRect.height);
|
|
12
|
+
}), o.observe(e)));
|
|
13
|
+
}, {
|
|
14
|
+
immediate: !0,
|
|
15
|
+
flush: "post"
|
|
16
|
+
}), e(s), {
|
|
17
|
+
width: i,
|
|
18
|
+
height: a
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as useElementSize };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region src/composables/scale.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.filter((e) => typeof e == "number" && Number.isFinite(e));
|
|
4
|
+
}
|
|
5
|
+
function t(t) {
|
|
6
|
+
let n = e(t);
|
|
7
|
+
if (n.length) return [Math.min(...n), Math.max(...n)];
|
|
8
|
+
}
|
|
9
|
+
function n(e, t) {
|
|
10
|
+
let [n, r] = e, [i, a] = t, o = r - n;
|
|
11
|
+
if (o === 0) return () => (i + a) / 2;
|
|
12
|
+
let s = (a - i) / o;
|
|
13
|
+
return (e) => i + (e - n) * s;
|
|
14
|
+
}
|
|
15
|
+
function r(e, t) {
|
|
16
|
+
let n = 10 ** Math.floor(Math.log10(e)), r = e / n, i;
|
|
17
|
+
return i = t ? r < 1.5 ? 1 : r < 3 ? 2 : r < 7 ? 5 : 10 : r <= 1 ? 1 : r <= 2 ? 2 : r <= 5 ? 5 : 10, i * n;
|
|
18
|
+
}
|
|
19
|
+
function i(e, t, n = 5) {
|
|
20
|
+
if (!Number.isFinite(e) || !Number.isFinite(t)) return {
|
|
21
|
+
ticks: [0, 1],
|
|
22
|
+
min: 0,
|
|
23
|
+
max: 1
|
|
24
|
+
};
|
|
25
|
+
if (e === t) {
|
|
26
|
+
if (e === 0) return {
|
|
27
|
+
ticks: [0, 1],
|
|
28
|
+
min: 0,
|
|
29
|
+
max: 1
|
|
30
|
+
};
|
|
31
|
+
let n = Math.abs(e);
|
|
32
|
+
e -= n / 2, t += n / 2;
|
|
33
|
+
}
|
|
34
|
+
let i = r(r(t - e, !1) / Math.max(n - 1, 1), !0), a = Math.floor(e / i) * i, o = Math.ceil(t / i) * i, s = Math.max(0, -Math.floor(Math.log10(i))), c = [], l = Math.round((o - a) / i);
|
|
35
|
+
for (let e = 0; e <= l; e++) c.push(Number((a + e * i).toFixed(s)));
|
|
36
|
+
return {
|
|
37
|
+
ticks: c,
|
|
38
|
+
min: c[0],
|
|
39
|
+
max: c[c.length - 1]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { t as extent, e as finiteValues, n as linearScale, i as niceTicks };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/bar-chart.ts
|
|
3
|
+
var t = e({ slots: {
|
|
4
|
+
root: "relative w-full text-primary",
|
|
5
|
+
svg: "block w-full overflow-visible",
|
|
6
|
+
grid: "stroke-border",
|
|
7
|
+
tick: "fill-muted-foreground text-xs [font-variant-numeric:tabular-nums]",
|
|
8
|
+
category: "fill-muted-foreground text-xs",
|
|
9
|
+
bar: "fill-current transition-opacity",
|
|
10
|
+
hit: "fill-transparent",
|
|
11
|
+
faded: "opacity-30",
|
|
12
|
+
tooltip: "pointer-events-none absolute z-10 flex items-baseline gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs whitespace-nowrap text-foreground shadow-md",
|
|
13
|
+
tooltipLabel: "text-muted-foreground",
|
|
14
|
+
tooltipValue: "font-medium [font-variant-numeric:tabular-nums]",
|
|
15
|
+
table: "sr-only"
|
|
16
|
+
} });
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as barChartTheme };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/file-upload.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "flex w-full flex-col gap-3",
|
|
6
|
+
dropzone: "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border bg-input px-4 py-6 text-center transition-colors focus-within:ring-2 focus-within:ring-primary/50 hover:border-primary/50",
|
|
7
|
+
input: "sr-only",
|
|
8
|
+
icon: "flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground [&_svg]:size-5",
|
|
9
|
+
label: "text-sm text-foreground",
|
|
10
|
+
browse: "mt-2",
|
|
11
|
+
hint: "text-xs text-muted-foreground",
|
|
12
|
+
list: "flex flex-col gap-2",
|
|
13
|
+
item: "flex items-center gap-3 rounded-xl border border-border bg-input p-2",
|
|
14
|
+
thumbnail: "size-10 shrink-0 rounded-lg object-cover",
|
|
15
|
+
placeholder: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground [&_svg]:size-4",
|
|
16
|
+
details: "flex min-w-0 flex-1 flex-col",
|
|
17
|
+
name: "truncate text-sm text-foreground",
|
|
18
|
+
meta: "text-xs text-muted-foreground tabular-nums",
|
|
19
|
+
remove: "flex size-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4",
|
|
20
|
+
error: "text-xs text-danger"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
dragging: { true: { dropzone: "border-primary bg-accent" } },
|
|
24
|
+
invalid: { true: { dropzone: "border-red-500 focus-within:ring-red-500/40" } },
|
|
25
|
+
disabled: { true: { dropzone: "pointer-events-none opacity-50" } }
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { t as fileUploadTheme };
|
|
@@ -3,6 +3,7 @@ import { tv as e } from "tailwind-variants";
|
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
5
|
root: "flex w-full flex-col gap-2",
|
|
6
|
+
input: "[&::-ms-clear]:hidden [&::-ms-reveal]:hidden",
|
|
6
7
|
toggle: "flex items-center rounded-md text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4",
|
|
7
8
|
meter: "flex items-center gap-2",
|
|
8
9
|
track: "flex h-1 flex-1 gap-1",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/sparkline.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "block w-full text-primary",
|
|
6
|
+
plot: "block w-full overflow-visible",
|
|
7
|
+
line: "fill-none stroke-current stroke-2 [stroke-linecap:round] [stroke-linejoin:round]",
|
|
8
|
+
area: "fill-current stroke-none opacity-10",
|
|
9
|
+
dot: "stroke-current [stroke-linecap:round]",
|
|
10
|
+
ring: "[stroke:var(--iryx-background)] [stroke-linecap:round]"
|
|
11
|
+
},
|
|
12
|
+
variants: { muted: { true: { root: "text-muted-foreground" } } }
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { t as sparklineTheme };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything recessive except the bars. Grid and axis text sit one step off
|
|
3
|
+
* the surface; the data is the only thing allowed to be loud.
|
|
4
|
+
*/
|
|
5
|
+
export declare const barChartTheme: import("tailwind-variants").TVReturnType<{
|
|
6
|
+
[key: string]: {
|
|
7
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
8
|
+
root?: import("tailwind-variants").ClassValue;
|
|
9
|
+
svg?: import("tailwind-variants").ClassValue;
|
|
10
|
+
table?: import("tailwind-variants").ClassValue;
|
|
11
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
12
|
+
tick?: import("tailwind-variants").ClassValue;
|
|
13
|
+
category?: import("tailwind-variants").ClassValue;
|
|
14
|
+
bar?: import("tailwind-variants").ClassValue;
|
|
15
|
+
hit?: import("tailwind-variants").ClassValue;
|
|
16
|
+
faded?: import("tailwind-variants").ClassValue;
|
|
17
|
+
tooltip?: import("tailwind-variants").ClassValue;
|
|
18
|
+
tooltipLabel?: import("tailwind-variants").ClassValue;
|
|
19
|
+
tooltipValue?: import("tailwind-variants").ClassValue;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
[x: string]: {
|
|
24
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
25
|
+
root?: import("tailwind-variants").ClassValue;
|
|
26
|
+
svg?: import("tailwind-variants").ClassValue;
|
|
27
|
+
table?: import("tailwind-variants").ClassValue;
|
|
28
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
29
|
+
tick?: import("tailwind-variants").ClassValue;
|
|
30
|
+
category?: import("tailwind-variants").ClassValue;
|
|
31
|
+
bar?: import("tailwind-variants").ClassValue;
|
|
32
|
+
hit?: import("tailwind-variants").ClassValue;
|
|
33
|
+
faded?: import("tailwind-variants").ClassValue;
|
|
34
|
+
tooltip?: import("tailwind-variants").ClassValue;
|
|
35
|
+
tooltipLabel?: import("tailwind-variants").ClassValue;
|
|
36
|
+
tooltipValue?: import("tailwind-variants").ClassValue;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
} | {}, {
|
|
40
|
+
root: string;
|
|
41
|
+
svg: string;
|
|
42
|
+
/** Hairline and solid — a dashed grid competes with the marks. */
|
|
43
|
+
grid: string;
|
|
44
|
+
/** Text never wears the series colour; identity comes from the mark. */
|
|
45
|
+
tick: string;
|
|
46
|
+
category: string;
|
|
47
|
+
bar: string;
|
|
48
|
+
/** Hit target, deliberately wider than the mark it selects. */
|
|
49
|
+
hit: string;
|
|
50
|
+
/** Dims the rest of the series so the hovered bar reads as selected. */
|
|
51
|
+
faded: string;
|
|
52
|
+
tooltip: string;
|
|
53
|
+
tooltipLabel: string;
|
|
54
|
+
tooltipValue: string;
|
|
55
|
+
/** Reachable by screen readers and by nobody's eyes. */
|
|
56
|
+
table: string;
|
|
57
|
+
}, undefined, {
|
|
58
|
+
[key: string]: {
|
|
59
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
60
|
+
root?: import("tailwind-variants").ClassValue;
|
|
61
|
+
svg?: import("tailwind-variants").ClassValue;
|
|
62
|
+
table?: import("tailwind-variants").ClassValue;
|
|
63
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
64
|
+
tick?: import("tailwind-variants").ClassValue;
|
|
65
|
+
category?: import("tailwind-variants").ClassValue;
|
|
66
|
+
bar?: import("tailwind-variants").ClassValue;
|
|
67
|
+
hit?: import("tailwind-variants").ClassValue;
|
|
68
|
+
faded?: import("tailwind-variants").ClassValue;
|
|
69
|
+
tooltip?: import("tailwind-variants").ClassValue;
|
|
70
|
+
tooltipLabel?: import("tailwind-variants").ClassValue;
|
|
71
|
+
tooltipValue?: import("tailwind-variants").ClassValue;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
} | {}, {
|
|
75
|
+
root: string;
|
|
76
|
+
svg: string;
|
|
77
|
+
/** Hairline and solid — a dashed grid competes with the marks. */
|
|
78
|
+
grid: string;
|
|
79
|
+
/** Text never wears the series colour; identity comes from the mark. */
|
|
80
|
+
tick: string;
|
|
81
|
+
category: string;
|
|
82
|
+
bar: string;
|
|
83
|
+
/** Hit target, deliberately wider than the mark it selects. */
|
|
84
|
+
hit: string;
|
|
85
|
+
/** Dims the rest of the series so the hovered bar reads as selected. */
|
|
86
|
+
faded: string;
|
|
87
|
+
tooltip: string;
|
|
88
|
+
tooltipLabel: string;
|
|
89
|
+
tooltipValue: string;
|
|
90
|
+
/** Reachable by screen readers and by nobody's eyes. */
|
|
91
|
+
table: string;
|
|
92
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
93
|
+
root: string;
|
|
94
|
+
svg: string;
|
|
95
|
+
/** Hairline and solid — a dashed grid competes with the marks. */
|
|
96
|
+
grid: string;
|
|
97
|
+
/** Text never wears the series colour; identity comes from the mark. */
|
|
98
|
+
tick: string;
|
|
99
|
+
category: string;
|
|
100
|
+
bar: string;
|
|
101
|
+
/** Hit target, deliberately wider than the mark it selects. */
|
|
102
|
+
hit: string;
|
|
103
|
+
/** Dims the rest of the series so the hovered bar reads as selected. */
|
|
104
|
+
faded: string;
|
|
105
|
+
tooltip: string;
|
|
106
|
+
tooltipLabel: string;
|
|
107
|
+
tooltipValue: string;
|
|
108
|
+
/** Reachable by screen readers and by nobody's eyes. */
|
|
109
|
+
table: string;
|
|
110
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
111
|
+
export type BarChartSlots = keyof ReturnType<typeof barChartTheme>;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export declare const fileUploadTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
/** Held during a drag, so the target is unmistakable while dragging. */
|
|
3
|
+
dragging: {
|
|
4
|
+
true: {
|
|
5
|
+
dropzone: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
invalid: {
|
|
9
|
+
true: {
|
|
10
|
+
dropzone: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
disabled: {
|
|
14
|
+
true: {
|
|
15
|
+
dropzone: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
root: string;
|
|
20
|
+
/**
|
|
21
|
+
* A label, so a click anywhere on the zone opens the picker without any
|
|
22
|
+
* script — the `<input type="file">` inside stays the real control and
|
|
23
|
+
* keeps its native keyboard and screen-reader behaviour.
|
|
24
|
+
*/
|
|
25
|
+
dropzone: string;
|
|
26
|
+
/** Visually hidden rather than `display:none`, which drops it from the tab order. */
|
|
27
|
+
input: string;
|
|
28
|
+
/**
|
|
29
|
+
* A filled disc behind the glyph. A bare icon floating in the middle of a
|
|
30
|
+
* large dashed box reads as an artefact; the disc gives it enough weight
|
|
31
|
+
* to be the thing the zone is built around.
|
|
32
|
+
*/
|
|
33
|
+
icon: string;
|
|
34
|
+
label: string;
|
|
35
|
+
/** Spacing only — the look comes from Button, so it tracks the theme. */
|
|
36
|
+
browse: string;
|
|
37
|
+
hint: string;
|
|
38
|
+
list: string;
|
|
39
|
+
item: string;
|
|
40
|
+
thumbnail: string;
|
|
41
|
+
/** Stand-in for anything without a preview, so rows stay the same height. */
|
|
42
|
+
placeholder: string;
|
|
43
|
+
details: string;
|
|
44
|
+
name: string;
|
|
45
|
+
meta: string;
|
|
46
|
+
remove: string;
|
|
47
|
+
error: string;
|
|
48
|
+
}, undefined, {
|
|
49
|
+
/** Held during a drag, so the target is unmistakable while dragging. */
|
|
50
|
+
dragging: {
|
|
51
|
+
true: {
|
|
52
|
+
dropzone: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
invalid: {
|
|
56
|
+
true: {
|
|
57
|
+
dropzone: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
disabled: {
|
|
61
|
+
true: {
|
|
62
|
+
dropzone: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
root: string;
|
|
67
|
+
/**
|
|
68
|
+
* A label, so a click anywhere on the zone opens the picker without any
|
|
69
|
+
* script — the `<input type="file">` inside stays the real control and
|
|
70
|
+
* keeps its native keyboard and screen-reader behaviour.
|
|
71
|
+
*/
|
|
72
|
+
dropzone: string;
|
|
73
|
+
/** Visually hidden rather than `display:none`, which drops it from the tab order. */
|
|
74
|
+
input: string;
|
|
75
|
+
/**
|
|
76
|
+
* A filled disc behind the glyph. A bare icon floating in the middle of a
|
|
77
|
+
* large dashed box reads as an artefact; the disc gives it enough weight
|
|
78
|
+
* to be the thing the zone is built around.
|
|
79
|
+
*/
|
|
80
|
+
icon: string;
|
|
81
|
+
label: string;
|
|
82
|
+
/** Spacing only — the look comes from Button, so it tracks the theme. */
|
|
83
|
+
browse: string;
|
|
84
|
+
hint: string;
|
|
85
|
+
list: string;
|
|
86
|
+
item: string;
|
|
87
|
+
thumbnail: string;
|
|
88
|
+
/** Stand-in for anything without a preview, so rows stay the same height. */
|
|
89
|
+
placeholder: string;
|
|
90
|
+
details: string;
|
|
91
|
+
name: string;
|
|
92
|
+
meta: string;
|
|
93
|
+
remove: string;
|
|
94
|
+
error: string;
|
|
95
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
96
|
+
/** Held during a drag, so the target is unmistakable while dragging. */
|
|
97
|
+
dragging: {
|
|
98
|
+
true: {
|
|
99
|
+
dropzone: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
invalid: {
|
|
103
|
+
true: {
|
|
104
|
+
dropzone: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
disabled: {
|
|
108
|
+
true: {
|
|
109
|
+
dropzone: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}, {
|
|
113
|
+
root: string;
|
|
114
|
+
/**
|
|
115
|
+
* A label, so a click anywhere on the zone opens the picker without any
|
|
116
|
+
* script — the `<input type="file">` inside stays the real control and
|
|
117
|
+
* keeps its native keyboard and screen-reader behaviour.
|
|
118
|
+
*/
|
|
119
|
+
dropzone: string;
|
|
120
|
+
/** Visually hidden rather than `display:none`, which drops it from the tab order. */
|
|
121
|
+
input: string;
|
|
122
|
+
/**
|
|
123
|
+
* A filled disc behind the glyph. A bare icon floating in the middle of a
|
|
124
|
+
* large dashed box reads as an artefact; the disc gives it enough weight
|
|
125
|
+
* to be the thing the zone is built around.
|
|
126
|
+
*/
|
|
127
|
+
icon: string;
|
|
128
|
+
label: string;
|
|
129
|
+
/** Spacing only — the look comes from Button, so it tracks the theme. */
|
|
130
|
+
browse: string;
|
|
131
|
+
hint: string;
|
|
132
|
+
list: string;
|
|
133
|
+
item: string;
|
|
134
|
+
thumbnail: string;
|
|
135
|
+
/** Stand-in for anything without a preview, so rows stay the same height. */
|
|
136
|
+
placeholder: string;
|
|
137
|
+
details: string;
|
|
138
|
+
name: string;
|
|
139
|
+
meta: string;
|
|
140
|
+
remove: string;
|
|
141
|
+
error: string;
|
|
142
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
143
|
+
export type FileUploadSlots = keyof ReturnType<typeof fileUploadTheme>;
|