iryx-ui 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Checkbox.vue.d.ts +20 -3
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +90 -43
- package/dist/components/Progress.vue.d.ts +29 -3
- package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +103 -47
- package/dist/components/RadioGroup.vue.d.ts +12 -0
- package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +73 -39
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/theme/checkbox.d.ts +42 -39
- package/dist/theme/checkbox.js +117 -15
- package/dist/theme/presets.d.ts +8 -2
- package/dist/theme/presets.js +2 -2
- package/dist/theme/progress.d.ts +75 -0
- package/dist/theme/progress.js +43 -11
- package/dist/theme/radio-group.d.ts +45 -30
- package/dist/theme/radio-group.js +118 -11
- package/package.json +1 -1
- package/theme.css +25 -0
|
@@ -1,13 +1,15 @@
|
|
|
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 { useFormField as n } from "../composables/form.js";
|
|
4
|
+
import { radioGroupTheme as r } from "../theme/radio-group.js";
|
|
5
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
6
|
+
import { Label as x, RadioGroupIndicator as S, RadioGroupItem as C, RadioGroupRoot as w, useForwardPropsEmits as T, useId as E } from "reka-ui";
|
|
6
7
|
//#region src/components/RadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var D = ["id"], O = ["id"], k = ["id"], A = /*@__PURE__*/ f({
|
|
8
9
|
__name: "RadioGroup",
|
|
9
10
|
props: {
|
|
10
11
|
items: {},
|
|
12
|
+
variant: {},
|
|
11
13
|
size: {},
|
|
12
14
|
invalid: {
|
|
13
15
|
type: Boolean,
|
|
@@ -36,37 +38,38 @@ var E = ["id"], D = /*@__PURE__*/ d({
|
|
|
36
38
|
required: { type: Boolean }
|
|
37
39
|
},
|
|
38
40
|
emits: ["update:modelValue"],
|
|
39
|
-
setup(
|
|
40
|
-
let
|
|
41
|
-
let { items: e,
|
|
42
|
-
return
|
|
43
|
-
}),
|
|
41
|
+
setup(f, { emit: A }) {
|
|
42
|
+
let j = f, M = A, N = T(a(() => {
|
|
43
|
+
let { items: e, variant: t, size: n, invalid: r, unstyled: i, class: a, ui: o, ...s } = j;
|
|
44
|
+
return s;
|
|
45
|
+
}), M), P = a(() => (j.items ?? []).map((e) => typeof e == "string" ? {
|
|
44
46
|
label: e,
|
|
45
47
|
value: e
|
|
46
|
-
} : e)),
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"aria-
|
|
56
|
-
"aria-
|
|
57
|
-
|
|
48
|
+
} : e)), F = E(), I = n();
|
|
49
|
+
I && (I.id.value = void 0);
|
|
50
|
+
let L = a(() => j.invalid ?? I?.invalid.value ?? !1), R = e(), z = a(() => j.unstyled ?? R.unstyled), B = a(() => r({
|
|
51
|
+
variant: j.variant,
|
|
52
|
+
size: j.size,
|
|
53
|
+
orientation: j.orientation ?? "vertical",
|
|
54
|
+
invalid: L.value
|
|
55
|
+
})), V = a(() => z.value ? [j.ui?.root, j.class] : B.value.root({ class: [j.ui?.root, j.class] })), H = a(() => z.value ? j.ui?.item : B.value.item({ class: j.ui?.item })), U = a(() => z.value ? j.ui?.label : B.value.label({ class: j.ui?.label })), W = a(() => z.value ? j.ui?.description : B.value.description({ class: j.ui?.description })), G = a(() => z.value ? j.ui?.content : B.value.content({ class: j.ui?.content })), K = a(() => z.value ? j.ui?.mark : B.value.mark({ class: j.ui?.mark })), q = a(() => z.value ? j.ui?.icon : B.value.icon({ class: j.ui?.icon }));
|
|
56
|
+
return (e, n) => (h(), o(y(w), p(y(N), {
|
|
57
|
+
"aria-labelledby": y(I)?.labelId.value,
|
|
58
|
+
"aria-invalid": L.value || void 0,
|
|
59
|
+
"aria-describedby": y(I)?.describedBy.value,
|
|
60
|
+
class: V.value
|
|
58
61
|
}), {
|
|
59
|
-
default:
|
|
60
|
-
key:
|
|
61
|
-
class:
|
|
62
|
-
}, [
|
|
63
|
-
id: `${
|
|
62
|
+
default: b(() => [_(e.$slots, "default", {}, () => [(h(!0), c(i, null, g(P.value, (e) => (h(), c(i, { key: e.value }, [(j.variant ?? "radio") === "radio" ? (h(), c("div", {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: m(z.value ? void 0 : B.value.wrapper())
|
|
65
|
+
}, [d(y(C), {
|
|
66
|
+
id: `${y(F)}-${e.value}`,
|
|
64
67
|
value: e.value,
|
|
65
68
|
disabled: e.disabled,
|
|
66
|
-
"aria-describedby": e.description ? `${
|
|
67
|
-
class:
|
|
69
|
+
"aria-describedby": e.description ? `${y(F)}-${e.value}-description` : void 0,
|
|
70
|
+
class: m(H.value)
|
|
68
71
|
}, {
|
|
69
|
-
default:
|
|
72
|
+
default: b(() => [d(y(S), { class: m(z.value ? void 0 : B.value.indicator()) }, null, 8, ["class"])]),
|
|
70
73
|
_: 1
|
|
71
74
|
}, 8, [
|
|
72
75
|
"id",
|
|
@@ -74,17 +77,48 @@ var E = ["id"], D = /*@__PURE__*/ d({
|
|
|
74
77
|
"disabled",
|
|
75
78
|
"aria-describedby",
|
|
76
79
|
"class"
|
|
77
|
-
]),
|
|
78
|
-
for: `${
|
|
79
|
-
class:
|
|
80
|
+
]), l("div", { class: m(G.value) }, [d(y(x), {
|
|
81
|
+
for: `${y(F)}-${e.value}`,
|
|
82
|
+
class: m(U.value)
|
|
80
83
|
}, {
|
|
81
|
-
default:
|
|
84
|
+
default: b(() => [u(v(e.label), 1)]),
|
|
82
85
|
_: 2
|
|
83
|
-
}, 1032, ["for", "class"]), e.description ? (
|
|
86
|
+
}, 1032, ["for", "class"]), e.description ? (h(), c("p", {
|
|
84
87
|
key: 0,
|
|
85
|
-
id: `${
|
|
86
|
-
class:
|
|
87
|
-
},
|
|
88
|
+
id: `${y(F)}-${e.value}-description`,
|
|
89
|
+
class: m(W.value)
|
|
90
|
+
}, v(e.description), 11, D)) : s("", !0)], 2)], 2)) : (h(), o(y(C), {
|
|
91
|
+
key: 1,
|
|
92
|
+
value: e.value,
|
|
93
|
+
disabled: e.disabled,
|
|
94
|
+
"aria-labelledby": `${y(F)}-${e.value}-label`,
|
|
95
|
+
"aria-describedby": e.description ? `${y(F)}-${e.value}-description` : void 0,
|
|
96
|
+
class: m([H.value, "group/item"])
|
|
97
|
+
}, {
|
|
98
|
+
default: b(() => [j.variant === "card" ? (h(), c("span", {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: m(K.value)
|
|
101
|
+
}, [d(y(S), { class: m(z.value ? void 0 : B.value.indicator()) }, null, 8, ["class"])], 2)) : e.icon ? (h(), o(t, {
|
|
102
|
+
key: 1,
|
|
103
|
+
icon: e.icon,
|
|
104
|
+
"data-slot": "icon",
|
|
105
|
+
class: m(q.value)
|
|
106
|
+
}, null, 8, ["icon", "class"])) : s("", !0), l("span", { class: m(G.value) }, [l("span", {
|
|
107
|
+
id: `${y(F)}-${e.value}-label`,
|
|
108
|
+
class: m(U.value)
|
|
109
|
+
}, v(e.label), 11, O), e.description ? (h(), c("span", {
|
|
110
|
+
key: 0,
|
|
111
|
+
id: `${y(F)}-${e.value}-description`,
|
|
112
|
+
class: m(W.value)
|
|
113
|
+
}, v(e.description), 11, k)) : s("", !0)], 2)]),
|
|
114
|
+
_: 2
|
|
115
|
+
}, 1032, [
|
|
116
|
+
"value",
|
|
117
|
+
"disabled",
|
|
118
|
+
"aria-labelledby",
|
|
119
|
+
"aria-describedby",
|
|
120
|
+
"class"
|
|
121
|
+
]))], 64))), 128))])]),
|
|
88
122
|
_: 3
|
|
89
123
|
}, 16, [
|
|
90
124
|
"aria-labelledby",
|
|
@@ -95,4 +129,4 @@ var E = ["id"], D = /*@__PURE__*/ d({
|
|
|
95
129
|
}
|
|
96
130
|
});
|
|
97
131
|
//#endregion
|
|
98
|
-
export {
|
|
132
|
+
export { A as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { useFormField as t } from "../composables/form.js";
|
|
3
3
|
import { switchTheme as n } from "../theme/switch.js";
|
|
4
|
-
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g,
|
|
5
|
-
import { Label as
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v } from "vue";
|
|
5
|
+
import { Label as y, SwitchRoot as b, SwitchThumb as x, useForwardPropsEmits as S, useId as C } from "reka-ui";
|
|
6
6
|
//#region src/components/Switch.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var w = ["id"], T = /*@__PURE__*/ u({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "Switch",
|
|
10
10
|
props: {
|
|
@@ -39,56 +39,56 @@ var C = ["id"], w = /*@__PURE__*/ u({
|
|
|
39
39
|
required: { type: Boolean }
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:modelValue"],
|
|
42
|
-
setup(u, { emit:
|
|
43
|
-
let
|
|
44
|
-
let { label: e, description: t, size: n, id: r, invalid: i, unstyled: a, class: o, ui: s, ...c } =
|
|
42
|
+
setup(u, { emit: T }) {
|
|
43
|
+
let E = u, D = T, O = S(r(() => {
|
|
44
|
+
let { label: e, description: t, size: n, id: r, invalid: i, unstyled: a, class: o, ui: s, ...c } = E;
|
|
45
45
|
return c;
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
size:
|
|
50
|
-
withText:
|
|
51
|
-
invalid:
|
|
52
|
-
})),
|
|
53
|
-
return (e, t) =>
|
|
46
|
+
}), D), k = _(), A = C(), j = t(), M = r(() => E.invalid ?? j?.invalid.value ?? !1), N = r(() => E.id ?? j?.id.value ?? A);
|
|
47
|
+
j && (j.id.value = N.value);
|
|
48
|
+
let P = r(() => !!(E.description || k.description)), F = r(() => !!(E.label || k.label || P.value)), I = r(() => P.value ? `${N.value}-description` : void 0), L = e(), R = r(() => E.unstyled ?? L.unstyled), z = r(() => n({
|
|
49
|
+
size: E.size,
|
|
50
|
+
withText: F.value,
|
|
51
|
+
invalid: M.value
|
|
52
|
+
})), B = r(() => R.value ? E.ui?.wrapper : z.value.wrapper({ class: E.ui?.wrapper })), V = r(() => R.value ? [E.ui?.root, E.class] : z.value.root({ class: [E.ui?.root, E.class] })), H = r(() => R.value ? E.ui?.thumb : z.value.thumb({ class: E.ui?.thumb })), U = r(() => R.value ? E.ui?.content : z.value.content({ class: E.ui?.content })), W = r(() => R.value ? E.ui?.label : z.value.label({ class: E.ui?.label })), G = r(() => R.value ? E.ui?.description : z.value.description({ class: E.ui?.description }));
|
|
53
|
+
return (e, t) => F.value ? (p(), o("div", {
|
|
54
54
|
key: 0,
|
|
55
|
-
class: f(
|
|
56
|
-
}, [l(g(
|
|
57
|
-
...g(
|
|
55
|
+
class: f(B.value)
|
|
56
|
+
}, [l(g(b), d({ id: N.value }, {
|
|
57
|
+
...g(O),
|
|
58
58
|
...e.$attrs
|
|
59
59
|
}, {
|
|
60
|
-
"aria-invalid":
|
|
61
|
-
"aria-describedby":
|
|
62
|
-
class:
|
|
60
|
+
"aria-invalid": M.value || void 0,
|
|
61
|
+
"aria-describedby": I.value,
|
|
62
|
+
class: V.value
|
|
63
63
|
}), {
|
|
64
|
-
default:
|
|
64
|
+
default: v(() => [l(g(x), { class: f(H.value) }, null, 8, ["class"])]),
|
|
65
65
|
_: 1
|
|
66
66
|
}, 16, [
|
|
67
67
|
"id",
|
|
68
68
|
"aria-invalid",
|
|
69
69
|
"aria-describedby",
|
|
70
70
|
"class"
|
|
71
|
-
]), s("div", { class: f(
|
|
72
|
-
for:
|
|
73
|
-
class: f(
|
|
71
|
+
]), s("div", { class: f(U.value) }, [l(g(y), {
|
|
72
|
+
for: N.value,
|
|
73
|
+
class: f(W.value)
|
|
74
74
|
}, {
|
|
75
|
-
default:
|
|
75
|
+
default: v(() => [m(e.$slots, "label", {}, () => [c(h(E.label), 1)])]),
|
|
76
76
|
_: 3
|
|
77
|
-
}, 8, ["for", "class"]),
|
|
77
|
+
}, 8, ["for", "class"]), P.value ? (p(), o("p", {
|
|
78
78
|
key: 0,
|
|
79
|
-
id: `${
|
|
80
|
-
class: f(
|
|
81
|
-
}, [m(e.$slots, "description", {}, () => [c(h(
|
|
79
|
+
id: `${N.value}-description`,
|
|
80
|
+
class: f(G.value)
|
|
81
|
+
}, [m(e.$slots, "description", {}, () => [c(h(E.description), 1)])], 10, w)) : a("", !0)], 2)], 2)) : (p(), i(g(b), d({
|
|
82
82
|
key: 1,
|
|
83
|
-
id:
|
|
83
|
+
id: N.value
|
|
84
84
|
}, {
|
|
85
|
-
...g(
|
|
85
|
+
...g(O),
|
|
86
86
|
...e.$attrs
|
|
87
87
|
}, {
|
|
88
|
-
"aria-invalid":
|
|
89
|
-
class:
|
|
88
|
+
"aria-invalid": M.value || void 0,
|
|
89
|
+
class: V.value
|
|
90
90
|
}), {
|
|
91
|
-
default:
|
|
91
|
+
default: v(() => [l(g(x), { class: f(H.value) }, null, 8, ["class"])]),
|
|
92
92
|
_: 1
|
|
93
93
|
}, 16, [
|
|
94
94
|
"id",
|
|
@@ -98,4 +98,4 @@ var C = ["id"], w = /*@__PURE__*/ u({
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
//#endregion
|
|
101
|
-
export {
|
|
101
|
+
export { T as default };
|
package/dist/theme/checkbox.d.ts
CHANGED
|
@@ -1,96 +1,99 @@
|
|
|
1
1
|
export declare const checkboxTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
variant: {
|
|
3
|
+
checkbox: {
|
|
4
4
|
root: string;
|
|
5
|
-
indicator: string;
|
|
6
5
|
};
|
|
7
|
-
|
|
6
|
+
card: {
|
|
8
7
|
root: string;
|
|
9
|
-
indicator: string;
|
|
10
8
|
};
|
|
11
|
-
|
|
9
|
+
tile: {
|
|
12
10
|
root: string;
|
|
13
|
-
|
|
11
|
+
content: string;
|
|
14
12
|
};
|
|
15
13
|
};
|
|
14
|
+
size: {
|
|
15
|
+
sm: {};
|
|
16
|
+
md: {};
|
|
17
|
+
lg: {};
|
|
18
|
+
};
|
|
16
19
|
withText: {
|
|
17
|
-
true: {
|
|
18
|
-
root: string;
|
|
19
|
-
};
|
|
20
|
+
true: {};
|
|
20
21
|
};
|
|
21
22
|
invalid: {
|
|
22
|
-
true: {
|
|
23
|
-
root: string;
|
|
24
|
-
};
|
|
23
|
+
true: {};
|
|
25
24
|
};
|
|
26
25
|
}, {
|
|
27
26
|
wrapper: string;
|
|
28
27
|
root: string;
|
|
28
|
+
mark: string;
|
|
29
29
|
indicator: string;
|
|
30
|
+
icon: string;
|
|
30
31
|
content: string;
|
|
31
32
|
label: string;
|
|
32
33
|
description: string;
|
|
33
34
|
}, undefined, {
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
variant: {
|
|
36
|
+
checkbox: {
|
|
36
37
|
root: string;
|
|
37
|
-
indicator: string;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
card: {
|
|
40
40
|
root: string;
|
|
41
|
-
indicator: string;
|
|
42
41
|
};
|
|
43
|
-
|
|
42
|
+
tile: {
|
|
44
43
|
root: string;
|
|
45
|
-
|
|
44
|
+
content: string;
|
|
46
45
|
};
|
|
47
46
|
};
|
|
47
|
+
size: {
|
|
48
|
+
sm: {};
|
|
49
|
+
md: {};
|
|
50
|
+
lg: {};
|
|
51
|
+
};
|
|
48
52
|
withText: {
|
|
49
|
-
true: {
|
|
50
|
-
root: string;
|
|
51
|
-
};
|
|
53
|
+
true: {};
|
|
52
54
|
};
|
|
53
55
|
invalid: {
|
|
54
|
-
true: {
|
|
55
|
-
root: string;
|
|
56
|
-
};
|
|
56
|
+
true: {};
|
|
57
57
|
};
|
|
58
58
|
}, {
|
|
59
59
|
wrapper: string;
|
|
60
60
|
root: string;
|
|
61
|
+
mark: string;
|
|
61
62
|
indicator: string;
|
|
63
|
+
icon: string;
|
|
62
64
|
content: string;
|
|
63
65
|
label: string;
|
|
64
66
|
description: string;
|
|
65
67
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
variant: {
|
|
69
|
+
checkbox: {
|
|
68
70
|
root: string;
|
|
69
|
-
indicator: string;
|
|
70
71
|
};
|
|
71
|
-
|
|
72
|
+
card: {
|
|
72
73
|
root: string;
|
|
73
|
-
indicator: string;
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
tile: {
|
|
76
76
|
root: string;
|
|
77
|
-
|
|
77
|
+
content: string;
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
+
size: {
|
|
81
|
+
sm: {};
|
|
82
|
+
md: {};
|
|
83
|
+
lg: {};
|
|
84
|
+
};
|
|
80
85
|
withText: {
|
|
81
|
-
true: {
|
|
82
|
-
root: string;
|
|
83
|
-
};
|
|
86
|
+
true: {};
|
|
84
87
|
};
|
|
85
88
|
invalid: {
|
|
86
|
-
true: {
|
|
87
|
-
root: string;
|
|
88
|
-
};
|
|
89
|
+
true: {};
|
|
89
90
|
};
|
|
90
91
|
}, {
|
|
91
92
|
wrapper: string;
|
|
92
93
|
root: string;
|
|
94
|
+
mark: string;
|
|
93
95
|
indicator: string;
|
|
96
|
+
icon: string;
|
|
94
97
|
content: string;
|
|
95
98
|
label: string;
|
|
96
99
|
description: string;
|
package/dist/theme/checkbox.js
CHANGED
|
@@ -3,36 +3,138 @@ 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
|
|
6
|
+
root: "peer cursor-pointer transition-[color,background-color,border-color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
7
|
+
mark: "flex shrink-0 items-center justify-center rounded border border-border bg-background text-primary-foreground transition-[color,background-color,border-color] group-data-[state=checked]/item:border-primary group-data-[state=checked]/item:bg-primary group-data-[state=indeterminate]/item:border-primary group-data-[state=indeterminate]/item:bg-primary",
|
|
7
8
|
indicator: "flex items-center justify-center text-current",
|
|
9
|
+
icon: "text-muted-foreground transition-colors",
|
|
8
10
|
content: "grid gap-1",
|
|
9
11
|
label: "text-sm leading-5 font-medium text-foreground select-none",
|
|
10
12
|
description: "text-sm leading-snug text-muted-foreground"
|
|
11
13
|
},
|
|
12
14
|
variants: {
|
|
15
|
+
variant: {
|
|
16
|
+
checkbox: { root: "flex shrink-0 items-center justify-center rounded border border-border bg-background text-primary-foreground data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary" },
|
|
17
|
+
card: { root: "flex w-full items-start gap-3 rounded-lg border border-border bg-background text-left hover:bg-accent/50 data-[state=checked]:border-primary data-[state=checked]:bg-primary/5 data-[state=indeterminate]:border-primary" },
|
|
18
|
+
tile: {
|
|
19
|
+
root: "flex w-full flex-col items-center gap-2 rounded-lg border border-border bg-background text-center hover:bg-accent/50 data-[state=checked]:border-primary data-[state=checked]:bg-primary/5 data-[state=checked]:[&_[data-slot=icon]]:text-primary",
|
|
20
|
+
content: "justify-items-center gap-0.5"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
13
23
|
size: {
|
|
14
|
-
sm: {
|
|
24
|
+
sm: {},
|
|
25
|
+
md: {},
|
|
26
|
+
lg: {}
|
|
27
|
+
},
|
|
28
|
+
withText: { true: {} },
|
|
29
|
+
invalid: { true: {} }
|
|
30
|
+
},
|
|
31
|
+
compoundVariants: [
|
|
32
|
+
{
|
|
33
|
+
variant: "checkbox",
|
|
34
|
+
size: "sm",
|
|
35
|
+
class: {
|
|
15
36
|
root: "size-3.5",
|
|
16
37
|
indicator: "[&_svg]:size-2.5"
|
|
17
|
-
}
|
|
18
|
-
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
variant: "checkbox",
|
|
42
|
+
size: "md",
|
|
43
|
+
class: {
|
|
19
44
|
root: "size-4",
|
|
20
45
|
indicator: "[&_svg]:size-3"
|
|
21
|
-
}
|
|
22
|
-
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
variant: "checkbox",
|
|
50
|
+
size: "lg",
|
|
51
|
+
class: {
|
|
23
52
|
root: "size-5",
|
|
24
53
|
indicator: "[&_svg]:size-3.5"
|
|
25
54
|
}
|
|
26
55
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
56
|
+
{
|
|
57
|
+
variant: "checkbox",
|
|
58
|
+
withText: !0,
|
|
59
|
+
class: { root: "mt-0.5" }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
variant: "checkbox",
|
|
63
|
+
size: "lg",
|
|
64
|
+
withText: !0,
|
|
65
|
+
class: { root: "mt-0" }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: "checkbox",
|
|
69
|
+
invalid: !0,
|
|
70
|
+
class: { root: "border-red-500 focus-visible:ring-red-500/40" }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
variant: "card",
|
|
74
|
+
size: "sm",
|
|
75
|
+
class: {
|
|
76
|
+
root: "p-3",
|
|
77
|
+
mark: "mt-0.5 size-3.5",
|
|
78
|
+
indicator: "[&_svg]:size-2.5"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
variant: "card",
|
|
83
|
+
size: "md",
|
|
84
|
+
class: {
|
|
85
|
+
root: "p-4",
|
|
86
|
+
mark: "mt-0.5 size-4",
|
|
87
|
+
indicator: "[&_svg]:size-3"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
variant: "card",
|
|
92
|
+
size: "lg",
|
|
93
|
+
class: {
|
|
94
|
+
root: "p-5",
|
|
95
|
+
mark: "size-5",
|
|
96
|
+
indicator: "[&_svg]:size-3.5"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
variant: "card",
|
|
101
|
+
invalid: !0,
|
|
102
|
+
class: { root: "border-red-500 focus-visible:ring-red-500/40" }
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
variant: "tile",
|
|
106
|
+
size: "sm",
|
|
107
|
+
class: {
|
|
108
|
+
root: "p-3",
|
|
109
|
+
icon: "size-5"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
variant: "tile",
|
|
114
|
+
size: "md",
|
|
115
|
+
class: {
|
|
116
|
+
root: "p-4",
|
|
117
|
+
icon: "size-6"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
variant: "tile",
|
|
122
|
+
size: "lg",
|
|
123
|
+
class: {
|
|
124
|
+
root: "p-5",
|
|
125
|
+
icon: "size-7"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
variant: "tile",
|
|
130
|
+
invalid: !0,
|
|
131
|
+
class: { root: "border-red-500 focus-visible:ring-red-500/40" }
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
defaultVariants: {
|
|
135
|
+
variant: "checkbox",
|
|
136
|
+
size: "md"
|
|
137
|
+
}
|
|
36
138
|
});
|
|
37
139
|
//#endregion
|
|
38
140
|
export { t as checkboxTheme };
|
package/dist/theme/presets.d.ts
CHANGED
|
@@ -33,8 +33,14 @@ export interface ThemeColors {
|
|
|
33
33
|
}
|
|
34
34
|
/** A theme provides token values per appearance mode. Omitted tokens keep the defaults from theme.css. */
|
|
35
35
|
export interface Theme {
|
|
36
|
-
light
|
|
37
|
-
dark
|
|
36
|
+
light?: ThemeColors;
|
|
37
|
+
dark?: ThemeColors;
|
|
38
|
+
/**
|
|
39
|
+
* Corner radius for the whole library — what `rounded-lg` resolves to, with
|
|
40
|
+
* the rest of the scale derived from it. One value rather than one per mode:
|
|
41
|
+
* corners do not change between light and dark.
|
|
42
|
+
*/
|
|
43
|
+
radius?: string;
|
|
38
44
|
}
|
|
39
45
|
/**
|
|
40
46
|
* Built-in theme presets. Each swaps only the brand primary (solid colour +
|
package/dist/theme/presets.js
CHANGED
|
@@ -66,8 +66,8 @@ function r(t) {
|
|
|
66
66
|
}
|
|
67
67
|
function i(e) {
|
|
68
68
|
if (typeof document > "u") return;
|
|
69
|
-
let i = typeof e == "string" ? t[e] : e, a = document.getElementById(n);
|
|
70
|
-
|
|
69
|
+
let i = typeof e == "string" ? t[e] : e, a = i.radius == null ? "" : `--iryx-radius: ${i.radius}; `, o = document.getElementById(n);
|
|
70
|
+
o || (o = document.createElement("style"), o.id = n, document.head.appendChild(o)), o.textContent = `:root { ${a}${r(i.light ?? {})} }\n.dark { ${r(i.dark ?? {})} }`;
|
|
71
71
|
}
|
|
72
72
|
function a() {
|
|
73
73
|
typeof document > "u" || document.getElementById(n)?.remove();
|