iryx-ui 0.0.1 → 0.2.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.
Files changed (75) hide show
  1. package/README.md +161 -2
  2. package/dist/component-names.d.ts +1 -1
  3. package/dist/component-names.js +16 -1
  4. package/dist/components/Alert.js +5 -0
  5. package/dist/components/Alert.vue.d.ts +59 -0
  6. package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +74 -0
  7. package/dist/components/App.js +5 -0
  8. package/dist/components/App.vue.d.ts +36 -0
  9. package/dist/components/App.vue_vue_type_script_setup_true_lang.js +51 -0
  10. package/dist/components/Badge.js +5 -0
  11. package/dist/components/Badge.vue.d.ts +38 -0
  12. package/dist/components/Badge.vue_vue_type_script_setup_true_lang.js +48 -0
  13. package/dist/components/Button.vue.d.ts +1 -0
  14. package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +4 -1
  15. package/dist/components/Card.js +5 -0
  16. package/dist/components/Card.vue.d.ts +49 -0
  17. package/dist/components/Card.vue_vue_type_script_setup_true_lang.js +58 -0
  18. package/dist/components/Checkbox.js +5 -0
  19. package/dist/components/Checkbox.vue.d.ts +46 -0
  20. package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +79 -0
  21. package/dist/components/Form.js +5 -0
  22. package/dist/components/Form.vue.d.ts +54 -0
  23. package/dist/components/Form.vue_vue_type_script_setup_true_lang.js +79 -0
  24. package/dist/components/FormField.js +5 -0
  25. package/dist/components/FormField.vue.d.ts +46 -0
  26. package/dist/components/FormField.vue_vue_type_script_setup_true_lang.js +93 -0
  27. package/dist/components/Input.js +5 -0
  28. package/dist/components/Input.vue.d.ts +29 -0
  29. package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +57 -0
  30. package/dist/components/Label.js +5 -0
  31. package/dist/components/Label.vue.d.ts +23 -0
  32. package/dist/components/Label.vue_vue_type_script_setup_true_lang.js +41 -0
  33. package/dist/components/RadioGroup.js +5 -0
  34. package/dist/components/RadioGroup.vue.d.ts +41 -0
  35. package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +72 -0
  36. package/dist/components/Select.js +5 -0
  37. package/dist/components/Select.vue.d.ts +42 -0
  38. package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +84 -0
  39. package/dist/components/Switch.vue.d.ts +25 -2
  40. package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +45 -14
  41. package/dist/components/Textarea.js +5 -0
  42. package/dist/components/Textarea.vue.d.ts +28 -0
  43. package/dist/components/Textarea.vue_vue_type_script_setup_true_lang.js +57 -0
  44. package/dist/components/index.d.ts +12 -0
  45. package/dist/components/index.js +30 -6
  46. package/dist/composables/form.d.ts +67 -0
  47. package/dist/composables/form.js +20 -0
  48. package/dist/index.d.ts +13 -0
  49. package/dist/index.js +29 -8
  50. package/dist/plugin.js +5 -5
  51. package/dist/theme/alert.d.ts +98 -0
  52. package/dist/theme/alert.js +36 -0
  53. package/dist/theme/badge.d.ts +92 -0
  54. package/dist/theme/badge.js +94 -0
  55. package/dist/theme/card.d.ts +110 -0
  56. package/dist/theme/card.js +42 -0
  57. package/dist/theme/checkbox.d.ts +89 -0
  58. package/dist/theme/checkbox.js +37 -0
  59. package/dist/theme/form.d.ts +68 -0
  60. package/dist/theme/form.js +14 -0
  61. package/dist/theme/index.d.ts +8 -0
  62. package/dist/theme/input.d.ts +60 -0
  63. package/dist/theme/input.js +27 -0
  64. package/dist/theme/label.d.ts +14 -0
  65. package/dist/theme/label.js +8 -0
  66. package/dist/theme/presets.d.ts +20 -0
  67. package/dist/theme/presets.js +21 -1
  68. package/dist/theme/radio-group.d.ts +71 -0
  69. package/dist/theme/radio-group.js +30 -0
  70. package/dist/theme/select.d.ts +56 -0
  71. package/dist/theme/select.js +20 -0
  72. package/dist/theme/switch.d.ts +27 -0
  73. package/dist/theme/switch.js +5 -1
  74. package/package.json +8 -8
  75. package/theme.css +66 -0
@@ -0,0 +1,5 @@
1
+ import e from "./Checkbox.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Checkbox.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,46 @@
1
+ import type { CheckboxRootProps } from 'reka-ui';
2
+ export interface CheckboxProps extends CheckboxRootProps {
3
+ /** Text shown beside the box. Also makes the text clickable. */
4
+ label?: string;
5
+ /** Secondary text under the label. */
6
+ description?: string;
7
+ size?: 'sm' | 'md' | 'lg';
8
+ id?: string;
9
+ /** Skip built-in classes; you take over styling entirely. */
10
+ unstyled?: boolean;
11
+ class?: string;
12
+ /** Override classes per slot, e.g. `{ indicator: 'text-black' }`. */
13
+ ui?: {
14
+ wrapper?: string;
15
+ root?: string;
16
+ indicator?: string;
17
+ content?: string;
18
+ label?: string;
19
+ description?: string;
20
+ };
21
+ }
22
+ declare var __VLS_13: {}, __VLS_31: {}, __VLS_33: {}, __VLS_48: {};
23
+ type __VLS_Slots = {} & {
24
+ default?: (props: typeof __VLS_13) => any;
25
+ } & {
26
+ label?: (props: typeof __VLS_31) => any;
27
+ } & {
28
+ description?: (props: typeof __VLS_33) => any;
29
+ } & {
30
+ default?: (props: typeof __VLS_48) => any;
31
+ };
32
+ declare const __VLS_base: import("vue").DefineComponent<CheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
+ "update:modelValue": (value: boolean | "indeterminate") => any;
34
+ }, string, import("vue").PublicProps, Readonly<CheckboxProps> & Readonly<{
35
+ "onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
36
+ }>, {
37
+ unstyled: boolean;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,79 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import { checkboxTheme as t } from "../theme/checkbox.js";
3
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
4
+ import { Check as _, Minus as v } from "lucide-vue-next";
5
+ import { CheckboxIndicator as y, CheckboxRoot as b, Label as x, useForwardPropsEmits as S, useId as C } from "reka-ui";
6
+ //#region src/components/Checkbox.vue?vue&type=script&setup=true&lang.ts
7
+ var w = ["id"], T = /*@__PURE__*/ l({
8
+ __name: "Checkbox",
9
+ props: {
10
+ label: {},
11
+ description: {},
12
+ size: {},
13
+ id: {},
14
+ unstyled: {
15
+ type: Boolean,
16
+ default: void 0
17
+ },
18
+ class: {},
19
+ ui: {},
20
+ defaultValue: {},
21
+ modelValue: {},
22
+ disabled: { type: Boolean },
23
+ value: {},
24
+ trueValue: {},
25
+ falseValue: {},
26
+ asChild: { type: Boolean },
27
+ as: {},
28
+ name: {},
29
+ required: { type: Boolean }
30
+ },
31
+ emits: ["update:modelValue"],
32
+ setup(l, { emit: T }) {
33
+ let E = l, D = T, O = S(n(() => {
34
+ let { label: e, description: t, size: n, id: r, unstyled: i, class: a, ui: o, ...s } = E;
35
+ return s;
36
+ }), D), k = C(), A = n(() => E.id ?? k), j = n(() => !!(E.label || E.description)), M = e(), N = n(() => E.unstyled ?? M.unstyled), P = n(() => t({
37
+ size: E.size,
38
+ withText: j.value
39
+ })), F = n(() => N.value ? E.ui?.wrapper : P.value.wrapper({ class: E.ui?.wrapper })), I = n(() => N.value ? [E.ui?.root, E.class] : P.value.root({ class: [E.ui?.root, E.class] })), L = n(() => N.value ? E.ui?.indicator : P.value.indicator({ class: E.ui?.indicator })), R = n(() => N.value ? E.ui?.content : P.value.content({ class: E.ui?.content })), z = n(() => N.value ? E.ui?.label : P.value.label({ class: E.ui?.label })), B = n(() => N.value ? E.ui?.description : P.value.description({ class: E.ui?.description }));
40
+ return (e, t) => j.value ? (f(), a("div", {
41
+ key: 0,
42
+ class: d(F.value)
43
+ }, [c(h(b), u({ id: A.value }, h(O), {
44
+ "aria-describedby": E.description ? `${A.value}-description` : void 0,
45
+ class: I.value
46
+ }), {
47
+ default: g(() => [c(h(y), { class: d(L.value) }, {
48
+ default: g(() => [p(e.$slots, "default", {}, () => [E.modelValue === "indeterminate" ? (f(), r(h(v), { key: 0 })) : (f(), r(h(_), { key: 1 }))])]),
49
+ _: 3
50
+ }, 8, ["class"])]),
51
+ _: 3
52
+ }, 16, [
53
+ "id",
54
+ "aria-describedby",
55
+ "class"
56
+ ]), o("div", { class: d(R.value) }, [c(h(x), {
57
+ for: A.value,
58
+ class: d(z.value)
59
+ }, {
60
+ default: g(() => [p(e.$slots, "label", {}, () => [s(m(E.label), 1)])]),
61
+ _: 3
62
+ }, 8, ["for", "class"]), E.description || e.$slots.description ? (f(), a("p", {
63
+ key: 0,
64
+ id: `${A.value}-description`,
65
+ class: d(B.value)
66
+ }, [p(e.$slots, "description", {}, () => [s(m(E.description), 1)])], 10, w)) : i("", !0)], 2)], 2)) : (f(), r(h(b), u({
67
+ key: 1,
68
+ id: E.id
69
+ }, h(O), { class: I.value }), {
70
+ default: g(() => [c(h(y), { class: d(L.value) }, {
71
+ default: g(() => [p(e.$slots, "default", {}, () => [E.modelValue === "indeterminate" ? (f(), r(h(v), { key: 0 })) : (f(), r(h(_), { key: 1 }))])]),
72
+ _: 3
73
+ }, 8, ["class"])]),
74
+ _: 3
75
+ }, 16, ["id", "class"]));
76
+ }
77
+ });
78
+ //#endregion
79
+ export { T as default };
@@ -0,0 +1,5 @@
1
+ import e from "./Form.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Form.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,54 @@
1
+ import type { FormError, FormSubmitEvent, FormValidateOn, StandardSchemaLike } from '../composables/form';
2
+ export interface FormProps<S extends Record<string, any>> {
3
+ /** Reactive object holding the field values. */
4
+ state: S;
5
+ /** Any Standard Schema validator (Zod 3.24+, Valibot, ArkType…). */
6
+ schema?: StandardSchemaLike;
7
+ /** Custom validation, run after the schema. Return the errors you found. */
8
+ validate?: (state: S) => FormError[] | Promise<FormError[]>;
9
+ /** Which interactions re-validate a field. Submit always validates everything. */
10
+ validateOn?: FormValidateOn[];
11
+ disabled?: boolean;
12
+ class?: string;
13
+ }
14
+ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
15
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<FormProps<T> & {
16
+ onSubmit?: ((event: FormSubmitEvent<T>) => any) | undefined;
17
+ onError?: ((errors: FormError[]) => any) | undefined;
18
+ }> & (typeof globalThis extends {
19
+ __VLS_PROPS_FALLBACK: infer P;
20
+ } ? P : {});
21
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
22
+ validate: (options?: {
23
+ silent?: boolean;
24
+ }) => Promise<T | false>;
25
+ clear: (name?: string) => void;
26
+ setErrors: (next: FormError[]) => void;
27
+ errors: import("vue").Ref<{
28
+ name?: string | undefined;
29
+ message: string;
30
+ }[], FormError[] | {
31
+ name?: string | undefined;
32
+ message: string;
33
+ }[]>;
34
+ }>) => void;
35
+ attrs: any;
36
+ slots: {
37
+ default?: (props: {
38
+ errors: {
39
+ name?: string | undefined;
40
+ message: string;
41
+ }[];
42
+ }) => any;
43
+ };
44
+ emit: ((evt: "submit", event: FormSubmitEvent<T>) => void) & ((evt: "error", errors: FormError[]) => void);
45
+ }>) => import("vue").VNode & {
46
+ __ctx?: Awaited<typeof __VLS_setup>;
47
+ };
48
+ declare const _default: typeof __VLS_export;
49
+ export default _default;
50
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
51
+ [K in keyof T]: T[K];
52
+ } : {
53
+ [K in keyof T as K]: T[K];
54
+ }) & {};
@@ -0,0 +1,79 @@
1
+ import { formContextKey as e, isStandardSchema as t, issuePath as n } from "../composables/form.js";
2
+ import { computed as r, createElementBlock as i, defineComponent as a, normalizeClass as o, openBlock as s, provide as c, ref as l, renderSlot as u } from "vue";
3
+ //#region src/components/Form.vue?vue&type=script&setup=true&lang.ts
4
+ var d = /*@__PURE__*/ a({
5
+ __name: "Form",
6
+ props: {
7
+ state: {},
8
+ schema: {},
9
+ validate: {},
10
+ validateOn: { default: () => ["blur", "change"] },
11
+ disabled: { type: Boolean },
12
+ class: {}
13
+ },
14
+ emits: ["submit", "error"],
15
+ setup(a, { expose: d, emit: f }) {
16
+ let p = a, m = f, h = l([]);
17
+ async function g() {
18
+ let e = [];
19
+ if (p.schema && t(p.schema)) {
20
+ let t = await p.schema["~standard"].validate(p.state);
21
+ if (t.issues) for (let r of t.issues) e.push({
22
+ name: n(r),
23
+ message: r.message
24
+ });
25
+ }
26
+ return p.validate && e.push(...await p.validate(p.state)), e;
27
+ }
28
+ async function _(e = {}) {
29
+ let t = await g();
30
+ return e.silent || (h.value = t), t.length ? !1 : p.state;
31
+ }
32
+ async function v(e) {
33
+ let t = await g();
34
+ h.value = [...h.value.filter((t) => t.name !== e), ...t.filter((t) => t.name === e)];
35
+ }
36
+ function y(e) {
37
+ h.value = e ? h.value.filter((t) => t.name !== e) : [];
38
+ }
39
+ function b(e) {
40
+ h.value = e;
41
+ }
42
+ function x(e) {
43
+ if (e) return h.value.find((t) => t.name === e)?.message;
44
+ }
45
+ async function S(e) {
46
+ e.preventDefault();
47
+ let t = e.currentTarget, n = await g();
48
+ if (h.value = n, n.length) {
49
+ m("error", n);
50
+ let e = n.find((e) => e.name)?.name;
51
+ if (e && t) {
52
+ let n = `[data-iryx-field="${CSS.escape(e)}"] :is(input,textarea,select,button,[tabindex])`;
53
+ t.querySelector(n)?.focus();
54
+ }
55
+ return;
56
+ }
57
+ m("submit", { data: p.state });
58
+ }
59
+ return c(e, {
60
+ errors: h,
61
+ validateOn: r(() => p.validateOn),
62
+ disabled: r(() => p.disabled ?? !1),
63
+ state: r(() => p.state),
64
+ errorFor: x,
65
+ validateField: v
66
+ }), d({
67
+ validate: _,
68
+ clear: y,
69
+ setErrors: b,
70
+ errors: h
71
+ }), (e, t) => (s(), i("form", {
72
+ novalidate: "",
73
+ class: o(p.class),
74
+ onSubmit: S
75
+ }, [u(e.$slots, "default", { errors: h.value })], 34));
76
+ }
77
+ });
78
+ //#endregion
79
+ export { d as default };
@@ -0,0 +1,5 @@
1
+ import e from "./FormField.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/FormField.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,46 @@
1
+ export interface FormFieldProps {
2
+ /** Dot-path into the form state. Links this field to its validation errors. */
3
+ name?: string;
4
+ label?: string;
5
+ /** Muted text under the label, explaining the field. */
6
+ description?: string;
7
+ /** Muted text on the right of the label, e.g. "Optional". */
8
+ hint?: string;
9
+ /** Muted text under the control, shown while there's no error. */
10
+ help?: string;
11
+ required?: boolean;
12
+ /** Force an error message, bypassing the form's validation. */
13
+ error?: string;
14
+ /** Skip built-in classes; you take over styling entirely. */
15
+ unstyled?: boolean;
16
+ class?: string;
17
+ ui?: {
18
+ root?: string;
19
+ header?: string;
20
+ label?: string;
21
+ hint?: string;
22
+ description?: string;
23
+ error?: string;
24
+ help?: string;
25
+ };
26
+ }
27
+ declare var __VLS_7: {}, __VLS_9: {
28
+ id: string;
29
+ error: string | undefined;
30
+ };
31
+ type __VLS_Slots = {} & {
32
+ hint?: (props: typeof __VLS_7) => any;
33
+ } & {
34
+ default?: (props: typeof __VLS_9) => any;
35
+ };
36
+ declare const __VLS_base: import("vue").DefineComponent<FormFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {
37
+ unstyled: boolean;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,93 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import { formFieldContextKey as t, getByPath as n, useForm as r } from "../composables/form.js";
3
+ import { formFieldTheme as i } from "../theme/form.js";
4
+ import a from "./Label.js";
5
+ import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createTextVNode as u, defineComponent as d, normalizeClass as f, openBlock as p, provide as m, renderSlot as h, toDisplayString as g, unref as _, watch as v, withCtx as y } from "vue";
6
+ import { useId as b } from "reka-ui";
7
+ //#region src/components/FormField.vue?vue&type=script&setup=true&lang.ts
8
+ var x = ["data-iryx-field"], S = ["id"], C = ["id"], w = ["id"], T = /*@__PURE__*/ d({
9
+ __name: "FormField",
10
+ props: {
11
+ name: {},
12
+ label: {},
13
+ description: {},
14
+ hint: {},
15
+ help: {},
16
+ required: { type: Boolean },
17
+ error: {},
18
+ unstyled: {
19
+ type: Boolean,
20
+ default: void 0
21
+ },
22
+ class: {},
23
+ ui: {}
24
+ },
25
+ setup(d) {
26
+ let T = d, E = r(), D = b(), O = o(() => T.error ?? E?.errorFor(T.name)), k = o(() => {
27
+ let e = [];
28
+ return T.description && e.push(`${D}-description`), O.value ? e.push(`${D}-error`) : T.help && e.push(`${D}-help`), e.length ? e.join(" ") : void 0;
29
+ });
30
+ v(() => T.name && E ? n(E.state.value, T.name) : void 0, () => {
31
+ if (!T.name || !E) return;
32
+ let e = E.validateOn.value;
33
+ (e.includes("change") || e.includes("input")) && E.validateField(T.name);
34
+ });
35
+ function A() {
36
+ !T.name || !E || E.validateOn.value.includes("blur") && E.validateField(T.name);
37
+ }
38
+ let j = e(), M = o(() => T.unstyled ?? j.unstyled), N = i();
39
+ function P(e, t) {
40
+ return M.value ? t : N[e]({ class: t });
41
+ }
42
+ return m(t, {
43
+ id: o(() => D),
44
+ name: o(() => T.name),
45
+ invalid: o(() => !!O.value),
46
+ describedBy: k
47
+ }), (e, t) => (p(), l("div", {
48
+ "data-iryx-field": T.name,
49
+ class: f(M.value ? T.class : _(N).root({ class: [T.ui?.root, T.class] })),
50
+ onFocusout: A
51
+ }, [
52
+ T.label || T.hint || e.$slots.hint ? (p(), l("div", {
53
+ key: 0,
54
+ class: f(P("header", T.ui?.header))
55
+ }, [T.label ? (p(), s(a, {
56
+ key: 0,
57
+ for: _(D),
58
+ required: T.required,
59
+ class: f(T.ui?.label)
60
+ }, {
61
+ default: y(() => [u(g(T.label), 1)]),
62
+ _: 1
63
+ }, 8, [
64
+ "for",
65
+ "required",
66
+ "class"
67
+ ])) : c("", !0), T.hint || e.$slots.hint ? (p(), l("span", {
68
+ key: 1,
69
+ class: f(P("hint", T.ui?.hint))
70
+ }, [h(e.$slots, "hint", {}, () => [u(g(T.hint), 1)])], 2)) : c("", !0)], 2)) : c("", !0),
71
+ T.description ? (p(), l("p", {
72
+ key: 1,
73
+ id: `${_(D)}-description`,
74
+ class: f(P("description", T.ui?.description))
75
+ }, g(T.description), 11, S)) : c("", !0),
76
+ h(e.$slots, "default", {
77
+ id: _(D),
78
+ error: O.value
79
+ }),
80
+ O.value ? (p(), l("p", {
81
+ key: 2,
82
+ id: `${_(D)}-error`,
83
+ class: f(P("error", T.ui?.error))
84
+ }, g(O.value), 11, C)) : T.help ? (p(), l("p", {
85
+ key: 3,
86
+ id: `${_(D)}-help`,
87
+ class: f(P("help", T.ui?.help))
88
+ }, g(T.help), 11, w)) : c("", !0)
89
+ ], 42, x));
90
+ }
91
+ });
92
+ //#endregion
93
+ export { T as default };
@@ -0,0 +1,5 @@
1
+ import e from "./Input.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Input.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,29 @@
1
+ export interface InputProps {
2
+ type?: string;
3
+ size?: 'sm' | 'md' | 'lg';
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ required?: boolean;
7
+ /** Mark the field as invalid — styles the border and ring red. */
8
+ invalid?: boolean;
9
+ id?: string;
10
+ /** Skip built-in classes; you take over styling entirely. */
11
+ unstyled?: boolean;
12
+ class?: string;
13
+ }
14
+ type __VLS_Props = InputProps;
15
+ type __VLS_ModelProps = {
16
+ modelValue?: string | number | null;
17
+ };
18
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
19
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:modelValue": (value: string | number | null | undefined) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
23
+ }>, {
24
+ unstyled: boolean;
25
+ type: string;
26
+ invalid: boolean;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -0,0 +1,57 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import { useFormField as t } from "../composables/form.js";
3
+ import { inputTheme as n } from "../theme/input.js";
4
+ import { computed as r, createElementBlock as i, defineComponent as a, mergeModels as o, normalizeClass as s, openBlock as c, unref as l, useModel as u, vModelDynamic as d, withDirectives as f } from "vue";
5
+ //#region src/components/Input.vue?vue&type=script&setup=true&lang.ts
6
+ var p = [
7
+ "id",
8
+ "type",
9
+ "placeholder",
10
+ "disabled",
11
+ "required",
12
+ "aria-invalid",
13
+ "aria-describedby"
14
+ ], m = /*@__PURE__*/ a({
15
+ __name: "Input",
16
+ props: /*@__PURE__*/ o({
17
+ type: { default: "text" },
18
+ size: {},
19
+ placeholder: {},
20
+ disabled: { type: Boolean },
21
+ required: { type: Boolean },
22
+ invalid: {
23
+ type: Boolean,
24
+ default: void 0
25
+ },
26
+ id: {},
27
+ unstyled: {
28
+ type: Boolean,
29
+ default: void 0
30
+ },
31
+ class: {}
32
+ }, {
33
+ modelValue: {},
34
+ modelModifiers: {}
35
+ }),
36
+ emits: ["update:modelValue"],
37
+ setup(a) {
38
+ let o = a, m = u(a, "modelValue"), h = t(), g = r(() => o.id ?? h?.id.value), _ = r(() => o.invalid ?? h?.invalid.value ?? !1), v = e(), y = r(() => o.unstyled ?? v.unstyled), b = r(() => y.value ? o.class : n({
39
+ size: o.size,
40
+ invalid: _.value,
41
+ class: o.class
42
+ }));
43
+ return (e, t) => f((c(), i("input", {
44
+ id: g.value,
45
+ "onUpdate:modelValue": t[0] ||= (e) => m.value = e,
46
+ type: o.type,
47
+ placeholder: o.placeholder,
48
+ disabled: o.disabled,
49
+ required: o.required,
50
+ "aria-invalid": _.value || void 0,
51
+ "aria-describedby": l(h)?.describedBy.value,
52
+ class: s(b.value)
53
+ }, null, 10, p)), [[d, m.value]]);
54
+ }
55
+ });
56
+ //#endregion
57
+ export { m as default };
@@ -0,0 +1,5 @@
1
+ import e from "./Label.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Label.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,23 @@
1
+ import type { LabelProps as RekaLabelProps } from 'reka-ui';
2
+ export interface LabelProps extends RekaLabelProps {
3
+ /** Append a red asterisk to mark the associated field as required. */
4
+ required?: boolean;
5
+ /** Skip built-in classes; you take over styling entirely. */
6
+ unstyled?: boolean;
7
+ class?: string;
8
+ }
9
+ declare var __VLS_8: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_8) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<LabelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LabelProps> & Readonly<{}>, {
14
+ unstyled: boolean;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,41 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import { labelTheme as t } from "../theme/label.js";
3
+ import { computed as n, createBlock as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, unref as c, withCtx as l } from "vue";
4
+ import { Label as u } from "reka-ui";
5
+ //#region src/components/Label.vue?vue&type=script&setup=true&lang.ts
6
+ var d = /*@__PURE__*/ i({
7
+ __name: "Label",
8
+ props: {
9
+ required: { type: Boolean },
10
+ unstyled: {
11
+ type: Boolean,
12
+ default: void 0
13
+ },
14
+ class: {},
15
+ for: {},
16
+ asChild: { type: Boolean },
17
+ as: {}
18
+ },
19
+ setup(i) {
20
+ let d = i, f = e(), p = n(() => d.unstyled ?? f.unstyled), m = n(() => p.value ? d.class : t({
21
+ required: d.required,
22
+ class: d.class
23
+ }));
24
+ return (e, t) => (o(), r(c(u), {
25
+ for: d.for,
26
+ as: d.as,
27
+ "as-child": d.asChild,
28
+ class: a(m.value)
29
+ }, {
30
+ default: l(() => [s(e.$slots, "default")]),
31
+ _: 3
32
+ }, 8, [
33
+ "for",
34
+ "as",
35
+ "as-child",
36
+ "class"
37
+ ]));
38
+ }
39
+ });
40
+ //#endregion
41
+ export { d as default };
@@ -0,0 +1,5 @@
1
+ import e from "./RadioGroup.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/RadioGroup.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,41 @@
1
+ import type { RadioGroupRootProps } from 'reka-ui';
2
+ export interface RadioGroupItemOption {
3
+ label: string;
4
+ value: string;
5
+ /** Secondary text under the label. */
6
+ description?: string;
7
+ disabled?: boolean;
8
+ }
9
+ export interface RadioGroupProps extends RadioGroupRootProps {
10
+ /** Options to render. Strings are expanded to `{ label, value }`. */
11
+ items?: (RadioGroupItemOption | string)[];
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /** Skip built-in classes; you take over styling entirely. */
14
+ unstyled?: boolean;
15
+ class?: string;
16
+ ui?: {
17
+ root?: string;
18
+ item?: string;
19
+ label?: string;
20
+ description?: string;
21
+ };
22
+ }
23
+ declare var __VLS_8: {};
24
+ type __VLS_Slots = {} & {
25
+ default?: (props: typeof __VLS_8) => any;
26
+ };
27
+ declare const __VLS_base: import("vue").DefineComponent<RadioGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ "update:modelValue": (payload: import("reka-ui").AcceptableValue) => any;
29
+ }, string, import("vue").PublicProps, Readonly<RadioGroupProps> & Readonly<{
30
+ "onUpdate:modelValue"?: ((payload: import("reka-ui").AcceptableValue) => any) | undefined;
31
+ }>, {
32
+ unstyled: boolean;
33
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };