iryx-ui 0.3.0 → 0.5.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 +129 -27
- package/dist/component-names.d.ts +1 -1
- package/dist/components/App.vue.d.ts +1 -1
- package/dist/components/Combobox.vue.d.ts +112 -0
- package/dist/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/components/FormField.vue.d.ts +0 -9
- package/dist/components/Label.vue.d.ts +0 -6
- package/dist/components/NumberInput.vue.d.ts +63 -0
- package/dist/components/Select.vue.d.ts +13 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/composables/decimal.d.ts +53 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +49 -44
- package/dist/nuxt.d.ts +1 -1
- package/dist/packages/iryx-ui/src/component-names.js +1 -1
- package/dist/packages/iryx-ui/src/components/Combobox.js +5 -0
- package/dist/packages/iryx-ui/src/components/Combobox.vue_vue_type_script_setup_true_lang.js +284 -0
- package/dist/packages/iryx-ui/src/components/FormField.vue_vue_type_script_setup_true_lang.js +3 -5
- package/dist/packages/iryx-ui/src/components/Label.vue_vue_type_script_setup_true_lang.js +0 -2
- package/dist/packages/iryx-ui/src/components/NumberInput.js +5 -0
- package/dist/packages/iryx-ui/src/components/NumberInput.vue_vue_type_script_setup_true_lang.js +136 -0
- package/dist/packages/iryx-ui/src/components/Select.vue_vue_type_script_setup_true_lang.js +72 -27
- package/dist/packages/iryx-ui/src/components/index.js +48 -44
- package/dist/packages/iryx-ui/src/composables/decimal.js +79 -0
- package/dist/packages/iryx-ui/src/theme/alert.js +2 -2
- package/dist/packages/iryx-ui/src/theme/button.js +2 -2
- package/dist/packages/iryx-ui/src/theme/card.js +1 -1
- package/dist/packages/iryx-ui/src/theme/checkbox.js +1 -1
- package/dist/packages/iryx-ui/src/theme/combobox.js +29 -0
- package/dist/packages/iryx-ui/src/theme/dialog.js +2 -2
- package/dist/packages/iryx-ui/src/theme/dropdown-menu.js +4 -4
- package/dist/packages/iryx-ui/src/theme/form.js +10 -34
- package/dist/packages/iryx-ui/src/theme/input.js +1 -1
- package/dist/packages/iryx-ui/src/theme/label.js +1 -10
- package/dist/packages/iryx-ui/src/theme/number-input.js +49 -0
- package/dist/packages/iryx-ui/src/theme/pagination.js +1 -1
- package/dist/packages/iryx-ui/src/theme/presets.js +0 -42
- package/dist/packages/iryx-ui/src/theme/radio-group.js +1 -1
- package/dist/packages/iryx-ui/src/theme/select.js +5 -3
- package/dist/packages/iryx-ui/src/theme/skeleton.js +1 -1
- package/dist/packages/iryx-ui/src/theme/stepper.js +1 -1
- package/dist/packages/iryx-ui/src/theme/switch.js +1 -1
- package/dist/packages/iryx-ui/src/theme/tabs.js +3 -3
- package/dist/packages/iryx-ui/src/theme/toast.js +3 -3
- package/dist/packages/iryx-ui/src/theme/tooltip.js +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/theme/button.d.ts +2 -2
- package/dist/theme/combobox.d.ts +101 -0
- package/dist/theme/form.d.ts +35 -62
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/input.d.ts +5 -5
- package/dist/theme/label.d.ts +0 -18
- package/dist/theme/number-input.d.ts +92 -0
- package/dist/theme/presets.d.ts +0 -42
- package/dist/theme/select.d.ts +6 -0
- package/package.json +1 -1
- package/theme.css +14 -0
|
@@ -2,10 +2,10 @@ import { ArrowDown01Icon as e, Tick02Icon as t } from "../../../../node_modules/
|
|
|
2
2
|
import { useIryxUiConfig as n } from "../config.js";
|
|
3
3
|
import r from "./Icon.js";
|
|
4
4
|
import { selectTheme as i } from "../theme/select.js";
|
|
5
|
-
import { Fragment as a, computed as o, createBlock as s,
|
|
6
|
-
import { SelectContent as
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, normalizeClass as m, normalizeProps as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
6
|
+
import { SelectContent as S, SelectGroup as C, SelectIcon as w, SelectItem as T, SelectItemIndicator as E, SelectItemText as D, SelectLabel as O, SelectPortal as k, SelectRoot as A, SelectTrigger as j, SelectValue as M, SelectViewport as N, useForwardPropsEmits as P } from "reka-ui";
|
|
7
7
|
//#region src/components/Select.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var F = /*@__PURE__*/ f({
|
|
9
9
|
__name: "Select",
|
|
10
10
|
props: {
|
|
11
11
|
items: {},
|
|
@@ -30,39 +30,84 @@ var M = /*@__PURE__*/ d({
|
|
|
30
30
|
required: { type: Boolean }
|
|
31
31
|
},
|
|
32
32
|
emits: ["update:modelValue", "update:open"],
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
35
|
-
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } =
|
|
33
|
+
setup(f, { emit: F }) {
|
|
34
|
+
let I = f, L = F, R = P(o(() => {
|
|
35
|
+
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } = I;
|
|
36
36
|
return o;
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
}), L);
|
|
38
|
+
function z(e) {
|
|
39
|
+
return typeof e == "string" ? {
|
|
40
|
+
label: e,
|
|
41
|
+
value: e
|
|
42
|
+
} : e;
|
|
43
|
+
}
|
|
44
|
+
function B(e) {
|
|
45
|
+
return typeof e != "string" && "items" in e;
|
|
46
|
+
}
|
|
47
|
+
let V = o(() => {
|
|
48
|
+
let e = I.items ?? [];
|
|
49
|
+
if (e.some(B)) return e.map((e) => B(e) ? {
|
|
50
|
+
label: e.label,
|
|
51
|
+
options: e.items.map(z)
|
|
52
|
+
} : {
|
|
53
|
+
label: "",
|
|
54
|
+
options: [z(e)]
|
|
55
|
+
});
|
|
56
|
+
}), H = o(() => (I.items ?? []).flatMap((e) => B(e) ? e.items.map(z) : [z(e)])), U = n(), W = o(() => I.unstyled ?? U.unstyled), G = o(() => i({ size: I.size })), K = o(() => W.value ? [I.ui?.trigger, I.class] : G.value.trigger({ class: [I.ui?.trigger, I.class] })), q = o(() => W.value ? I.ui?.content : G.value.content({ class: I.ui?.content })), J = o(() => W.value ? I.ui?.viewport : G.value.viewport({ class: I.ui?.viewport })), Y = o(() => W.value ? I.ui?.item : G.value.item({ class: I.ui?.item })), X = o(() => W.value ? void 0 : G.value.itemIndicator()), Z = o(() => W.value ? I.ui?.group : G.value.group({ class: I.ui?.group })), Q = o(() => W.value ? I.ui?.groupLabel : G.value.groupLabel({ class: I.ui?.groupLabel }));
|
|
57
|
+
return (n, i) => (g(), s(b(A), h(p(b(R))), {
|
|
58
|
+
default: x(() => [d(b(j), { class: m(K.value) }, {
|
|
59
|
+
default: x(() => [d(b(M), { placeholder: I.placeholder }, null, 8, ["placeholder"]), d(b(w), { "as-child": "" }, {
|
|
60
|
+
default: x(() => [d(r, { icon: b(e) }, null, 8, ["icon"])]),
|
|
45
61
|
_: 1
|
|
46
62
|
})]),
|
|
47
63
|
_: 1
|
|
48
|
-
}, 8, ["class"]),
|
|
49
|
-
default:
|
|
50
|
-
class:
|
|
51
|
-
position: "
|
|
52
|
-
"side-offset": 4
|
|
64
|
+
}, 8, ["class"]), d(b(k), null, {
|
|
65
|
+
default: x(() => [d(b(S), {
|
|
66
|
+
class: m(q.value),
|
|
67
|
+
position: "item-aligned"
|
|
53
68
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
default:
|
|
69
|
+
default: x(() => [d(b(N), { class: m(J.value) }, {
|
|
70
|
+
default: x(() => [v(n.$slots, "default", {}, () => [V.value ? (g(!0), l(a, { key: 0 }, _(V.value, (e, n) => (g(), s(b(C), {
|
|
71
|
+
key: e.label || n,
|
|
72
|
+
class: m(Z.value)
|
|
73
|
+
}, {
|
|
74
|
+
default: x(() => [e.label ? (g(), s(b(O), {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: m(Q.value)
|
|
77
|
+
}, {
|
|
78
|
+
default: x(() => [u(y(e.label), 1)]),
|
|
79
|
+
_: 2
|
|
80
|
+
}, 1032, ["class"])) : c("", !0), (g(!0), l(a, null, _(e.options, (e) => (g(), s(b(T), {
|
|
81
|
+
key: e.value,
|
|
82
|
+
value: e.value,
|
|
83
|
+
disabled: e.disabled,
|
|
84
|
+
class: m(Y.value)
|
|
85
|
+
}, {
|
|
86
|
+
default: x(() => [d(b(E), { class: m(X.value) }, {
|
|
87
|
+
default: x(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["class"]), d(b(D), null, {
|
|
90
|
+
default: x(() => [u(y(e.label), 1)]),
|
|
91
|
+
_: 2
|
|
92
|
+
}, 1024)]),
|
|
93
|
+
_: 2
|
|
94
|
+
}, 1032, [
|
|
95
|
+
"value",
|
|
96
|
+
"disabled",
|
|
97
|
+
"class"
|
|
98
|
+
]))), 128))]),
|
|
99
|
+
_: 2
|
|
100
|
+
}, 1032, ["class"]))), 128)) : (g(!0), l(a, { key: 1 }, _(H.value, (e) => (g(), s(b(T), {
|
|
56
101
|
key: e.value,
|
|
57
102
|
value: e.value,
|
|
58
103
|
disabled: e.disabled,
|
|
59
|
-
class:
|
|
104
|
+
class: m(Y.value)
|
|
60
105
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
default:
|
|
106
|
+
default: x(() => [d(b(E), { class: m(X.value) }, {
|
|
107
|
+
default: x(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
63
108
|
_: 1
|
|
64
|
-
}, 8, ["class"]),
|
|
65
|
-
default:
|
|
109
|
+
}, 8, ["class"]), d(b(D), null, {
|
|
110
|
+
default: x(() => [u(y(e.label), 1)]),
|
|
66
111
|
_: 2
|
|
67
112
|
}, 1024)]),
|
|
68
113
|
_: 2
|
|
@@ -82,4 +127,4 @@ var M = /*@__PURE__*/ d({
|
|
|
82
127
|
}
|
|
83
128
|
});
|
|
84
129
|
//#endregion
|
|
85
|
-
export {
|
|
130
|
+
export { F as default };
|
|
@@ -7,29 +7,31 @@ import a from "./Button.js";
|
|
|
7
7
|
import o from "./ButtonGroup.js";
|
|
8
8
|
import s from "./Card.js";
|
|
9
9
|
import c from "./Checkbox.js";
|
|
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 "./
|
|
10
|
+
import l from "./Combobox.js";
|
|
11
|
+
import u from "./Dialog.js";
|
|
12
|
+
import d from "./ConfirmDialog.js";
|
|
13
|
+
import f from "./DropdownMenu.js";
|
|
14
|
+
import p from "./EmptyState.js";
|
|
15
|
+
import m from "./Form.js";
|
|
16
|
+
import h from "./Label.js";
|
|
17
|
+
import g from "./FormField.js";
|
|
18
|
+
import _ from "./Input.js";
|
|
19
|
+
import v from "./NumberInput.js";
|
|
20
|
+
import y from "./Pagination.js";
|
|
21
|
+
import b from "./Progress.js";
|
|
22
|
+
import x from "./RadioGroup.js";
|
|
23
|
+
import S from "./Select.js";
|
|
24
|
+
import C from "./Separator.js";
|
|
25
|
+
import w from "./Skeleton.js";
|
|
26
|
+
import T from "./Stat.js";
|
|
27
|
+
import E from "./Stepper.js";
|
|
28
|
+
import D from "./Switch.js";
|
|
29
|
+
import O from "./Tabs.js";
|
|
30
|
+
import k from "./Textarea.js";
|
|
31
|
+
import A from "./Toaster.js";
|
|
32
|
+
import j from "./Tooltip.js";
|
|
31
33
|
//#region src/components/index.ts
|
|
32
|
-
var
|
|
34
|
+
var M = /* @__PURE__ */ e({
|
|
33
35
|
Alert: () => t,
|
|
34
36
|
App: () => n,
|
|
35
37
|
Badge: () => r,
|
|
@@ -38,27 +40,29 @@ var A = /* @__PURE__ */ e({
|
|
|
38
40
|
ButtonGroup: () => o,
|
|
39
41
|
Card: () => s,
|
|
40
42
|
Checkbox: () => c,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
Combobox: () => l,
|
|
44
|
+
ConfirmDialog: () => d,
|
|
45
|
+
Dialog: () => u,
|
|
46
|
+
DropdownMenu: () => f,
|
|
47
|
+
EmptyState: () => p,
|
|
48
|
+
Form: () => m,
|
|
49
|
+
FormField: () => g,
|
|
50
|
+
Input: () => _,
|
|
51
|
+
Label: () => h,
|
|
52
|
+
NumberInput: () => v,
|
|
53
|
+
Pagination: () => y,
|
|
54
|
+
Progress: () => b,
|
|
55
|
+
RadioGroup: () => x,
|
|
56
|
+
Select: () => S,
|
|
57
|
+
Separator: () => C,
|
|
58
|
+
Skeleton: () => w,
|
|
59
|
+
Stat: () => T,
|
|
60
|
+
Stepper: () => E,
|
|
61
|
+
Switch: () => D,
|
|
62
|
+
Tabs: () => O,
|
|
63
|
+
Textarea: () => k,
|
|
64
|
+
Toaster: () => A,
|
|
65
|
+
Tooltip: () => j
|
|
62
66
|
});
|
|
63
67
|
//#endregion
|
|
64
|
-
export {
|
|
68
|
+
export { M as components_exports };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//#region src/composables/decimal.ts
|
|
2
|
+
var e = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/;
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = t.trim();
|
|
5
|
+
if (!n || !e.test(n)) return;
|
|
6
|
+
let r = n.startsWith("-"), [i = "", a = ""] = n.replace(/^[+-]/, "").split("."), o = `${i || "0"}${a}`, s = BigInt(o || "0");
|
|
7
|
+
return {
|
|
8
|
+
units: r ? -s : s,
|
|
9
|
+
scale: a.length
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function n({ units: e, scale: t }) {
|
|
13
|
+
let n = e < 0n, r = (n ? -e : e).toString().padStart(t + 1, "0"), i = r.slice(0, r.length - t), a = t ? r.slice(r.length - t) : "";
|
|
14
|
+
return `${n ? "-" : ""}${i}${a ? `.${a}` : ""}`;
|
|
15
|
+
}
|
|
16
|
+
function r(e, t) {
|
|
17
|
+
let n = Math.max(e.scale, t.scale), r = (e) => e.units * 10n ** BigInt(n - e.scale);
|
|
18
|
+
return [
|
|
19
|
+
r(e),
|
|
20
|
+
r(t),
|
|
21
|
+
n
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
function i(e, n) {
|
|
25
|
+
let i = t(e), a = t(n);
|
|
26
|
+
if (!i || !a) return NaN;
|
|
27
|
+
let [o, s] = r(i, a);
|
|
28
|
+
return o < s ? -1 : +(o > s);
|
|
29
|
+
}
|
|
30
|
+
function a(e, i) {
|
|
31
|
+
let a = t(e), o = t(i);
|
|
32
|
+
if (!a || !o) return;
|
|
33
|
+
let [s, c, l] = r(a, o);
|
|
34
|
+
return n({
|
|
35
|
+
units: s + c,
|
|
36
|
+
scale: l
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function o(e, r) {
|
|
40
|
+
let i = t(e);
|
|
41
|
+
if (!i) return;
|
|
42
|
+
if (i.scale <= r) return n({
|
|
43
|
+
units: i.units * 10n ** BigInt(r - i.scale),
|
|
44
|
+
scale: r
|
|
45
|
+
});
|
|
46
|
+
let a = 10n ** BigInt(i.scale - r), o = i.units < 0n, s = o ? -i.units : i.units, c = s % a * 2n >= a ? 1n : 0n, l = s / a + c;
|
|
47
|
+
return n({
|
|
48
|
+
units: o ? -l : l,
|
|
49
|
+
scale: r
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function s(e, t, n) {
|
|
53
|
+
return t != null && i(e, t) < 0 ? t : n != null && i(e, n) > 0 ? n : e;
|
|
54
|
+
}
|
|
55
|
+
function c(e) {
|
|
56
|
+
return t(e) !== void 0;
|
|
57
|
+
}
|
|
58
|
+
function l(e) {
|
|
59
|
+
let t = new Intl.NumberFormat(e).formatToParts(12345.6);
|
|
60
|
+
return {
|
|
61
|
+
decimal: t.find((e) => e.type === "decimal")?.value ?? ".",
|
|
62
|
+
group: t.find((e) => e.type === "group")?.value ?? ","
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function u(e, n, r) {
|
|
66
|
+
let i = t(e);
|
|
67
|
+
if (!i) return e;
|
|
68
|
+
let a = o(e, r ?? i.scale) ?? e, [s = "0", c = ""] = a.replace("-", "").split("."), { decimal: u, group: d } = l(n), f = s.replace(/\B(?=(\d{3})+(?!\d))/g, d);
|
|
69
|
+
return `${a.startsWith("-") ? "-" : ""}${f}${c ? `${u}${c}` : ""}`;
|
|
70
|
+
}
|
|
71
|
+
function d(e, t) {
|
|
72
|
+
return !e || !t ? e : e.replace(".", l(t).decimal);
|
|
73
|
+
}
|
|
74
|
+
function f(e, t) {
|
|
75
|
+
let { decimal: n, group: r } = l(t), i = e.trim().replaceAll(r, "").replace(/\s/g, "").replace(n, ".");
|
|
76
|
+
return c(i) ? i : void 0;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { a as addDecimals, s as clampDecimal, i as compareDecimals, n as formatDecimal, u as formatForLocale, c as isDecimal, l as localeSeparators, t as parseDecimal, f as parseFromLocale, o as roundDecimal, d as toEditable };
|
|
@@ -2,12 +2,12 @@ import { tv as e } from "tailwind-variants";
|
|
|
2
2
|
//#region src/theme/alert.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
|
-
root: "flex w-full gap-3 rounded-
|
|
5
|
+
root: "flex w-full gap-3 rounded-xl border p-4",
|
|
6
6
|
icon: "mt-0.5 shrink-0 [&_svg]:size-5",
|
|
7
7
|
content: "min-w-0 flex-1",
|
|
8
8
|
title: "text-sm font-medium",
|
|
9
9
|
description: "text-sm opacity-90",
|
|
10
|
-
close: "-m-1 shrink-0 self-start rounded-
|
|
10
|
+
close: "-m-1 shrink-0 self-start rounded-lg p-1 opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-current/50 [&_svg]:size-4"
|
|
11
11
|
},
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { tv as e } from "tailwind-variants";
|
|
2
2
|
//#region src/theme/button.ts
|
|
3
3
|
var t = e({
|
|
4
|
-
base: "inline-flex shrink-0 items-center justify-center gap-2 rounded-
|
|
4
|
+
base: "inline-flex shrink-0 items-center justify-center gap-2 rounded-xl border border-transparent font-medium transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
solid: "bg-linear-to-b from-primary-from to-primary-to text-primary-foreground hover:brightness-110 active:brightness-95",
|
|
8
|
-
outline: "border-border bg-
|
|
8
|
+
outline: "border-border bg-input text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
9
9
|
ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
10
10
|
link: "text-primary underline-offset-4 hover:underline active:translate-y-0"
|
|
11
11
|
},
|
|
@@ -2,7 +2,7 @@ import { tv as e } from "tailwind-variants";
|
|
|
2
2
|
//#region src/theme/card.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
|
-
root: "rounded-
|
|
5
|
+
root: "rounded-2xl text-foreground",
|
|
6
6
|
header: "flex flex-col gap-1",
|
|
7
7
|
title: "text-base leading-none font-semibold",
|
|
8
8
|
description: "text-sm text-muted-foreground",
|
|
@@ -3,7 +3,7 @@ import { tv as e } from "tailwind-variants";
|
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
5
|
wrapper: "flex items-start gap-2.5",
|
|
6
|
-
root: "peer flex shrink-0 cursor-pointer items-center justify-center rounded border border-border bg-background text-primary-foreground transition-colors outline-none focus
|
|
6
|
+
root: "peer flex shrink-0 cursor-pointer items-center justify-center rounded border border-border bg-background text-primary-foreground transition-colors outline-none focus:ring-2 focus:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary",
|
|
7
7
|
indicator: "flex items-center justify-center text-current",
|
|
8
8
|
content: "grid gap-1",
|
|
9
9
|
label: "text-sm leading-5 font-medium text-foreground select-none",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { fieldBase as e } from "./input.js";
|
|
2
|
+
import { tv as t } from "tailwind-variants";
|
|
3
|
+
//#region src/theme/combobox.ts
|
|
4
|
+
var n = t({
|
|
5
|
+
slots: {
|
|
6
|
+
anchor: `flex items-center gap-2 ${e} focus-within:ring-2 focus-within:ring-primary/50`,
|
|
7
|
+
input: "min-w-0 grow bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",
|
|
8
|
+
trigger: "flex shrink-0 cursor-pointer items-center text-muted-foreground disabled:cursor-not-allowed [&_svg]:size-4",
|
|
9
|
+
content: "z-50 max-h-64 w-(--reka-combobox-trigger-width) min-w-32 overflow-hidden rounded-xl border border-border bg-background text-foreground shadow-md",
|
|
10
|
+
viewport: "max-h-64 overflow-y-auto p-1",
|
|
11
|
+
item: "relative flex w-full cursor-pointer items-center rounded-lg py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
12
|
+
itemIndicator: "absolute left-2 flex items-center justify-center text-primary [&_svg]:size-4",
|
|
13
|
+
empty: "px-2 py-6 text-center text-sm text-muted-foreground",
|
|
14
|
+
group: "[[role=group]:not([hidden])~&]:mt-1",
|
|
15
|
+
groupLabel: "px-2 py-1.5 text-xs font-medium text-muted-foreground"
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
sm: { anchor: "h-8 px-2.5 text-sm" },
|
|
20
|
+
md: { anchor: "h-9 px-3 text-sm" },
|
|
21
|
+
lg: { anchor: "h-10 px-4 text-base" }
|
|
22
|
+
},
|
|
23
|
+
invalid: { true: { anchor: "border-red-500 focus-within:ring-red-500/40" } },
|
|
24
|
+
disabled: { true: { anchor: "cursor-not-allowed opacity-50" } }
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: { size: "md" }
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { n as comboboxTheme };
|
|
@@ -3,13 +3,13 @@ import { tv as e } from "tailwind-variants";
|
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
5
|
overlay: "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
6
|
-
content: "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-
|
|
6
|
+
content: "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-2xl border border-border bg-background p-6 text-foreground shadow-lg outline-none data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",
|
|
7
7
|
header: "flex flex-col gap-1",
|
|
8
8
|
title: "text-base leading-none font-semibold",
|
|
9
9
|
description: "text-sm text-muted-foreground",
|
|
10
10
|
body: "-m-1 min-h-0 flex-1 overflow-y-auto p-1",
|
|
11
11
|
footer: "flex flex-wrap items-center justify-end gap-2",
|
|
12
|
-
close: "absolute top-4 right-4 rounded-
|
|
12
|
+
close: "absolute top-4 right-4 rounded-lg p-1 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"
|
|
13
13
|
},
|
|
14
14
|
variants: { size: {
|
|
15
15
|
sm: { content: "sm:max-w-sm" },
|
|
@@ -2,12 +2,12 @@ import { tv as e } from "tailwind-variants";
|
|
|
2
2
|
//#region src/theme/dropdown-menu.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
|
-
content: "z-50 min-w-40 overflow-hidden rounded-
|
|
6
|
-
item: "flex cursor-pointer items-center gap-2 rounded-
|
|
5
|
+
content: "z-50 min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1 text-foreground shadow-lg outline-none data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
6
|
+
item: "flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0",
|
|
7
7
|
label: "px-2 py-1.5 text-xs font-medium text-muted-foreground",
|
|
8
8
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
9
|
-
subTrigger: "flex cursor-default items-center gap-2 rounded-
|
|
10
|
-
subContent: "z-50 min-w-40 overflow-hidden rounded-
|
|
9
|
+
subTrigger: "flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0",
|
|
10
|
+
subContent: "z-50 min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1 text-foreground shadow-lg outline-none data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
11
11
|
subTriggerIcon: "ml-auto"
|
|
12
12
|
},
|
|
13
13
|
variants: { danger: { true: { item: "text-danger data-[highlighted]:bg-danger-muted data-[highlighted]:text-danger-muted-foreground" } } }
|
|
@@ -1,38 +1,14 @@
|
|
|
1
1
|
import { tv as e } from "tailwind-variants";
|
|
2
2
|
//#region src/theme/form.ts
|
|
3
|
-
var t = e({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
variants: { indent: {
|
|
15
|
-
none: {},
|
|
16
|
-
sm: {
|
|
17
|
-
header: "px-2.5",
|
|
18
|
-
description: "px-2.5",
|
|
19
|
-
error: "px-2.5",
|
|
20
|
-
help: "px-2.5"
|
|
21
|
-
},
|
|
22
|
-
md: {
|
|
23
|
-
header: "px-3",
|
|
24
|
-
description: "px-3",
|
|
25
|
-
error: "px-3",
|
|
26
|
-
help: "px-3"
|
|
27
|
-
},
|
|
28
|
-
lg: {
|
|
29
|
-
header: "px-4",
|
|
30
|
-
description: "px-4",
|
|
31
|
-
error: "px-4",
|
|
32
|
-
help: "px-4"
|
|
33
|
-
}
|
|
34
|
-
} },
|
|
35
|
-
defaultVariants: { indent: "md" }
|
|
36
|
-
});
|
|
3
|
+
var t = e({ slots: {
|
|
4
|
+
root: "space-y-2",
|
|
5
|
+
header: "flex items-center justify-between gap-2",
|
|
6
|
+
label: "",
|
|
7
|
+
hint: "text-sm leading-none text-muted-foreground",
|
|
8
|
+
description: "text-sm leading-snug text-muted-foreground",
|
|
9
|
+
control: "",
|
|
10
|
+
error: "text-sm leading-snug text-red-500",
|
|
11
|
+
help: "text-sm leading-snug text-muted-foreground"
|
|
12
|
+
} });
|
|
37
13
|
//#endregion
|
|
38
14
|
export { t as formFieldTheme };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tv as e } from "tailwind-variants";
|
|
2
2
|
//#region src/theme/input.ts
|
|
3
|
-
var t = "w-full rounded-
|
|
3
|
+
var t = "w-full rounded-xl border border-border bg-input text-foreground transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50", n = e({
|
|
4
4
|
base: `flex ${t}`,
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
@@ -2,16 +2,7 @@ import { tv as e } from "tailwind-variants";
|
|
|
2
2
|
//#region src/theme/label.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
base: "inline-flex items-center gap-1 text-sm leading-none font-medium text-foreground select-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
5
|
-
variants: {
|
|
6
|
-
required: { true: "after:text-red-500 after:content-['*']" },
|
|
7
|
-
indent: {
|
|
8
|
-
none: "",
|
|
9
|
-
sm: "ps-2.5",
|
|
10
|
-
md: "ps-3",
|
|
11
|
-
lg: "ps-4"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
defaultVariants: { indent: "md" }
|
|
5
|
+
variants: { required: { true: "after:text-red-500 after:content-['*']" } }
|
|
15
6
|
});
|
|
16
7
|
//#endregion
|
|
17
8
|
export { t as labelTheme };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { fieldBase as e } from "./input.js";
|
|
2
|
+
import { tv as t } from "tailwind-variants";
|
|
3
|
+
//#region src/theme/number-input.ts
|
|
4
|
+
var n = t({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "relative inline-flex w-full items-stretch",
|
|
7
|
+
input: `flex w-full text-right tabular-nums ${e}`,
|
|
8
|
+
stepper: "absolute inset-y-px end-px flex flex-col justify-center overflow-hidden rounded-e-xl border-s border-border",
|
|
9
|
+
step: "flex flex-1 items-center justify-center px-1.5 text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3"
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
sm: {
|
|
14
|
+
input: "h-8 px-2.5 text-sm",
|
|
15
|
+
stepper: "w-5"
|
|
16
|
+
},
|
|
17
|
+
md: {
|
|
18
|
+
input: "h-9 px-3 text-sm",
|
|
19
|
+
stepper: "w-6"
|
|
20
|
+
},
|
|
21
|
+
lg: {
|
|
22
|
+
input: "h-10 px-4 text-base",
|
|
23
|
+
stepper: "w-7"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
invalid: { true: { input: "border-red-500 focus-visible:ring-red-500/40" } },
|
|
27
|
+
withStepper: { true: {} }
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
{
|
|
31
|
+
withStepper: !0,
|
|
32
|
+
size: "sm",
|
|
33
|
+
class: { input: "pe-7" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
withStepper: !0,
|
|
37
|
+
size: "md",
|
|
38
|
+
class: { input: "pe-8" }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
withStepper: !0,
|
|
42
|
+
size: "lg",
|
|
43
|
+
class: { input: "pe-10" }
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
defaultVariants: { size: "md" }
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
export { n as numberInputTheme };
|
|
@@ -4,7 +4,7 @@ var t = e({
|
|
|
4
4
|
slots: {
|
|
5
5
|
root: "flex items-center gap-2",
|
|
6
6
|
list: "flex items-center gap-1",
|
|
7
|
-
item: "inline-flex items-center justify-center rounded-
|
|
7
|
+
item: "inline-flex items-center justify-center rounded-xl border border-transparent text-sm font-medium transition-[color,background-color,border-color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4",
|
|
8
8
|
active: "bg-linear-to-b from-primary-from to-primary-to text-primary-foreground hover:brightness-110",
|
|
9
9
|
inactive: "text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
10
10
|
ellipsis: "inline-flex items-center justify-center text-sm text-muted-foreground"
|
|
@@ -46,20 +46,6 @@ var e = {
|
|
|
46
46
|
primaryTo: "oklch(0.54 0.24 293)"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
emerald: {
|
|
50
|
-
light: {
|
|
51
|
-
primary: "oklch(0.596 0.145 163)",
|
|
52
|
-
primaryForeground: "oklch(0.985 0.005 248)",
|
|
53
|
-
primaryFrom: "oklch(0.596 0.145 163)",
|
|
54
|
-
primaryTo: "oklch(0.52 0.155 163)"
|
|
55
|
-
},
|
|
56
|
-
dark: {
|
|
57
|
-
primary: "oklch(0.7 0.15 162)",
|
|
58
|
-
primaryForeground: "oklch(0.17 0.04 165)",
|
|
59
|
-
primaryFrom: "oklch(0.7 0.15 162)",
|
|
60
|
-
primaryTo: "oklch(0.62 0.16 162)"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
49
|
rose: {
|
|
64
50
|
light: {
|
|
65
51
|
primary: "oklch(0.586 0.222 17)",
|
|
@@ -73,34 +59,6 @@ var e = {
|
|
|
73
59
|
primaryFrom: "oklch(0.65 0.22 16)",
|
|
74
60
|
primaryTo: "oklch(0.57 0.235 16)"
|
|
75
61
|
}
|
|
76
|
-
},
|
|
77
|
-
amber: {
|
|
78
|
-
light: {
|
|
79
|
-
primary: "oklch(0.666 0.157 58)",
|
|
80
|
-
primaryForeground: "oklch(0.16 0.03 80)",
|
|
81
|
-
primaryFrom: "oklch(0.666 0.157 58)",
|
|
82
|
-
primaryTo: "oklch(0.59 0.165 56)"
|
|
83
|
-
},
|
|
84
|
-
dark: {
|
|
85
|
-
primary: "oklch(0.77 0.16 70)",
|
|
86
|
-
primaryForeground: "oklch(0.18 0.04 75)",
|
|
87
|
-
primaryFrom: "oklch(0.77 0.16 70)",
|
|
88
|
-
primaryTo: "oklch(0.7 0.17 68)"
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
sky: {
|
|
92
|
-
light: {
|
|
93
|
-
primary: "oklch(0.588 0.13 242)",
|
|
94
|
-
primaryForeground: "oklch(0.985 0.005 248)",
|
|
95
|
-
primaryFrom: "oklch(0.588 0.13 242)",
|
|
96
|
-
primaryTo: "oklch(0.51 0.14 242)"
|
|
97
|
-
},
|
|
98
|
-
dark: {
|
|
99
|
-
primary: "oklch(0.685 0.14 237)",
|
|
100
|
-
primaryForeground: "oklch(0.15 0.04 240)",
|
|
101
|
-
primaryFrom: "oklch(0.685 0.14 237)",
|
|
102
|
-
primaryTo: "oklch(0.6 0.15 237)"
|
|
103
|
-
}
|
|
104
62
|
}
|
|
105
63
|
}, n = "iryx-ui-theme";
|
|
106
64
|
function r(t) {
|
|
@@ -4,7 +4,7 @@ var t = e({
|
|
|
4
4
|
slots: {
|
|
5
5
|
root: "grid gap-2",
|
|
6
6
|
wrapper: "flex items-start gap-2.5",
|
|
7
|
-
item: "aspect-square shrink-0 cursor-pointer rounded-full border border-border bg-background transition-colors outline-none focus
|
|
7
|
+
item: "aspect-square shrink-0 cursor-pointer rounded-full border border-border bg-background transition-colors outline-none focus:ring-2 focus:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
|
|
8
8
|
indicator: "flex size-full items-center justify-center after:block after:rounded-full after:bg-primary",
|
|
9
9
|
content: "grid gap-1",
|
|
10
10
|
label: "text-sm leading-5 text-foreground select-none",
|