iryx-ui 0.1.0 → 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.
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +3 -0
- package/dist/components/Alert.js +5 -0
- package/dist/components/Alert.vue.d.ts +59 -0
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/App.vue.d.ts +1 -1
- package/dist/components/App.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/Badge.js +5 -0
- package/dist/components/Badge.vue.d.ts +38 -0
- package/dist/components/Badge.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/Button.vue.d.ts +1 -1
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/Card.js +5 -0
- package/dist/components/Card.vue.d.ts +49 -0
- package/dist/components/Card.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +30 -24
- package/dist/index.d.ts +3 -0
- package/dist/index.js +30 -24
- package/dist/plugin.js +5 -5
- package/dist/theme/alert.d.ts +98 -0
- package/dist/theme/alert.js +36 -0
- package/dist/theme/badge.d.ts +92 -0
- package/dist/theme/badge.js +94 -0
- package/dist/theme/card.d.ts +110 -0
- package/dist/theme/card.js +42 -0
- package/dist/theme/form.d.ts +6 -6
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/presets.d.ts +20 -0
- package/dist/theme/presets.js +21 -1
- package/dist/theme/switch.d.ts +6 -6
- package/package.json +1 -1
- package/theme.css +66 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Consumed by the Vue plugin (global registration) and the Nuxt module
|
|
4
4
|
* (auto-imports). Keep in sync with `src/components/index.ts`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const componentNames: readonly ["App", "Button", "Checkbox", "Form", "FormField", "Input", "Label", "RadioGroup", "Select", "Switch", "Textarea"];
|
|
6
|
+
export declare const componentNames: readonly ["Alert", "App", "Badge", "Button", "Card", "Checkbox", "Form", "FormField", "Input", "Label", "RadioGroup", "Select", "Switch", "Textarea"];
|
|
7
7
|
export type ComponentName = (typeof componentNames)[number];
|
package/dist/component-names.js
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
export interface AlertProps {
|
|
3
|
+
/** Render as a different element or component. */
|
|
4
|
+
as?: string;
|
|
5
|
+
variant?: 'info' | 'success' | 'warning' | 'danger';
|
|
6
|
+
/** Heading text above the body. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Body text. Ignored when the default slot is used. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Leading icon. Defaults to one matching the variant; pass a component to
|
|
12
|
+
* override it, or `false` to drop it entirely.
|
|
13
|
+
*/
|
|
14
|
+
icon?: Component | false;
|
|
15
|
+
/** Render a dismiss button that emits `close`. */
|
|
16
|
+
closable?: boolean;
|
|
17
|
+
/** Accessible name for the dismiss button — override for non-English apps. */
|
|
18
|
+
closeLabel?: string;
|
|
19
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
20
|
+
unstyled?: boolean;
|
|
21
|
+
class?: string;
|
|
22
|
+
/** Override classes per slot, e.g. `{ title: 'text-base' }`. */
|
|
23
|
+
ui?: {
|
|
24
|
+
root?: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
content?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
close?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
declare var __VLS_8: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {};
|
|
33
|
+
type __VLS_Slots = {} & {
|
|
34
|
+
icon?: (props: typeof __VLS_8) => any;
|
|
35
|
+
} & {
|
|
36
|
+
title?: (props: typeof __VLS_15) => any;
|
|
37
|
+
} & {
|
|
38
|
+
default?: (props: typeof __VLS_17) => any;
|
|
39
|
+
} & {
|
|
40
|
+
close?: (props: typeof __VLS_19) => any;
|
|
41
|
+
};
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
43
|
+
close: () => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
|
|
45
|
+
onClose?: (() => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
icon: Component | false;
|
|
48
|
+
as: string;
|
|
49
|
+
closeLabel: string;
|
|
50
|
+
unstyled: boolean;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
|
+
declare const _default: typeof __VLS_export;
|
|
54
|
+
export default _default;
|
|
55
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { alertTheme as t } from "../theme/alert.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, normalizeClass as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
4
|
+
import { CircleAlert as _, CircleCheck as v, Info as y, TriangleAlert as b, X as x } from "lucide-vue-next";
|
|
5
|
+
import { Primitive as S } from "reka-ui";
|
|
6
|
+
//#region src/components/Alert.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var C = ["aria-label"], w = /*@__PURE__*/ l({
|
|
8
|
+
__name: "Alert",
|
|
9
|
+
props: {
|
|
10
|
+
as: { default: "div" },
|
|
11
|
+
variant: {},
|
|
12
|
+
title: {},
|
|
13
|
+
description: {},
|
|
14
|
+
icon: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
closable: { type: Boolean },
|
|
19
|
+
closeLabel: { default: "Close" },
|
|
20
|
+
unstyled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
class: {},
|
|
25
|
+
ui: {}
|
|
26
|
+
},
|
|
27
|
+
emits: ["close"],
|
|
28
|
+
setup(l) {
|
|
29
|
+
let w = l, T = {
|
|
30
|
+
info: y,
|
|
31
|
+
success: v,
|
|
32
|
+
warning: b,
|
|
33
|
+
danger: _
|
|
34
|
+
}, E = n(() => {
|
|
35
|
+
if (w.icon !== !1) return w.icon ?? T[w.variant ?? "info"];
|
|
36
|
+
}), D = n(() => w.variant === "danger" || w.variant === "warning" ? "alert" : "status"), O = e(), k = n(() => w.unstyled ?? O.unstyled), A = n(() => t({
|
|
37
|
+
variant: w.variant,
|
|
38
|
+
withTitle: !!w.title
|
|
39
|
+
})), j = n(() => k.value ? [w.ui?.root, w.class] : A.value.root({ class: [w.ui?.root, w.class] })), M = n(() => k.value ? w.ui?.icon : A.value.icon({ class: w.ui?.icon })), N = n(() => k.value ? w.ui?.content : A.value.content({ class: w.ui?.content })), P = n(() => k.value ? w.ui?.title : A.value.title({ class: w.ui?.title })), F = n(() => k.value ? w.ui?.description : A.value.description({ class: w.ui?.description })), I = n(() => k.value ? w.ui?.close : A.value.close({ class: w.ui?.close }));
|
|
40
|
+
return (e, t) => (d(), r(h(S), {
|
|
41
|
+
as: w.as,
|
|
42
|
+
role: D.value,
|
|
43
|
+
class: u(j.value)
|
|
44
|
+
}, {
|
|
45
|
+
default: g(() => [
|
|
46
|
+
E.value || e.$slots.icon ? (d(), a("div", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: u(M.value)
|
|
49
|
+
}, [f(e.$slots, "icon", {}, () => [(d(), r(p(E.value), { "aria-hidden": "true" }))])], 2)) : i("", !0),
|
|
50
|
+
o("div", { class: u(N.value) }, [w.title || e.$slots.title ? (d(), a("p", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: u(P.value)
|
|
53
|
+
}, [f(e.$slots, "title", {}, () => [s(m(w.title), 1)])], 2)) : i("", !0), w.description || e.$slots.default ? (d(), a("div", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: u(F.value)
|
|
56
|
+
}, [f(e.$slots, "default", {}, () => [s(m(w.description), 1)])], 2)) : i("", !0)], 2),
|
|
57
|
+
w.closable ? (d(), a("button", {
|
|
58
|
+
key: 1,
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-label": w.closeLabel,
|
|
61
|
+
class: u(I.value),
|
|
62
|
+
onClick: t[0] ||= (t) => e.$emit("close")
|
|
63
|
+
}, [f(e.$slots, "close", {}, () => [c(h(x), { "aria-hidden": "true" })])], 10, C)) : i("", !0)
|
|
64
|
+
]),
|
|
65
|
+
_: 3
|
|
66
|
+
}, 8, [
|
|
67
|
+
"as",
|
|
68
|
+
"role",
|
|
69
|
+
"class"
|
|
70
|
+
]));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
//#endregion
|
|
74
|
+
export { w as default };
|
|
@@ -23,8 +23,8 @@ type __VLS_Slots = {} & {
|
|
|
23
23
|
default?: (props: typeof __VLS_14) => any;
|
|
24
24
|
};
|
|
25
25
|
declare const __VLS_base: import("vue").DefineComponent<AppProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppProps> & Readonly<{}>, {
|
|
26
|
-
unstyled: boolean;
|
|
27
26
|
as: string;
|
|
27
|
+
unstyled: boolean;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defaultConfig as e, iryxUiConfigKey as t } from "../config.js";
|
|
2
|
+
import { initAppearance as n, useAppearance as r } from "../composables/appearance.js";
|
|
3
3
|
import { applyTheme as i, clearTheme as a } from "../theme/presets.js";
|
|
4
4
|
import { computed as o, createBlock as s, createVNode as c, defineComponent as l, guardReactiveProps as u, normalizeClass as d, normalizeProps as f, openBlock as p, provide as m, reactive as h, renderSlot as g, unref as _, watch as v, withCtx as y } from "vue";
|
|
5
5
|
import { ConfigProvider as b, Primitive as x } from "reka-ui";
|
|
@@ -18,15 +18,15 @@ var S = /*@__PURE__*/ l({
|
|
|
18
18
|
},
|
|
19
19
|
setup(l) {
|
|
20
20
|
let S = l;
|
|
21
|
-
m(
|
|
22
|
-
...
|
|
23
|
-
unstyled: o(() => S.unstyled ??
|
|
21
|
+
m(t, h({
|
|
22
|
+
...e,
|
|
23
|
+
unstyled: o(() => S.unstyled ?? e.unstyled)
|
|
24
24
|
})), v(() => S.theme, (e) => {
|
|
25
25
|
e ? i(e) : a();
|
|
26
26
|
}, { immediate: !0 });
|
|
27
27
|
let C = !1;
|
|
28
|
-
v(() => S.appearance, (
|
|
29
|
-
|
|
28
|
+
v(() => S.appearance, (e) => {
|
|
29
|
+
e && (C ? r().setAppearance(e) : (n(e), C = !0));
|
|
30
30
|
}, { immediate: !0 });
|
|
31
31
|
let w = o(() => ({
|
|
32
32
|
dir: S.dir,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface BadgeProps {
|
|
2
|
+
/** Render as a different element or component. */
|
|
3
|
+
as?: string;
|
|
4
|
+
/** Merge props onto the immediate child instead of rendering an element. */
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
variant?: 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
7
|
+
/** `soft` is a tinted background; `solid` is a filled block of colour. */
|
|
8
|
+
tone?: 'soft' | 'solid';
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Show a small leading dot in the current text colour. */
|
|
11
|
+
dot?: boolean;
|
|
12
|
+
/** Text content. Ignored when the default slot is used. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
15
|
+
unstyled?: boolean;
|
|
16
|
+
class?: string;
|
|
17
|
+
/** Override classes per slot, e.g. `{ dot: 'size-3' }`. */
|
|
18
|
+
ui?: {
|
|
19
|
+
root?: string;
|
|
20
|
+
dot?: 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<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
28
|
+
as: string;
|
|
29
|
+
unstyled: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { badgeTheme as t } from "../theme/badge.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createTextVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, toDisplayString as d, unref as f, withCtx as p } from "vue";
|
|
4
|
+
import { Primitive as m } from "reka-ui";
|
|
5
|
+
//#region src/components/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var h = /*@__PURE__*/ s({
|
|
7
|
+
__name: "Badge",
|
|
8
|
+
props: {
|
|
9
|
+
as: { default: "span" },
|
|
10
|
+
asChild: { type: Boolean },
|
|
11
|
+
variant: {},
|
|
12
|
+
tone: {},
|
|
13
|
+
size: {},
|
|
14
|
+
dot: { type: Boolean },
|
|
15
|
+
label: {},
|
|
16
|
+
unstyled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
class: {},
|
|
21
|
+
ui: {}
|
|
22
|
+
},
|
|
23
|
+
setup(s) {
|
|
24
|
+
let h = s, g = e(), _ = n(() => h.unstyled ?? g.unstyled), v = n(() => t({
|
|
25
|
+
variant: h.variant,
|
|
26
|
+
tone: h.tone,
|
|
27
|
+
size: h.size
|
|
28
|
+
})), y = n(() => _.value ? [h.ui?.root, h.class] : v.value.root({ class: [h.ui?.root, h.class] })), b = n(() => _.value ? h.ui?.dot : v.value.dot({ class: h.ui?.dot }));
|
|
29
|
+
return (e, t) => (l(), r(f(m), {
|
|
30
|
+
as: h.as,
|
|
31
|
+
"as-child": h.asChild,
|
|
32
|
+
class: c(y.value)
|
|
33
|
+
}, {
|
|
34
|
+
default: p(() => [h.dot ? (l(), a("span", {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: c(b.value),
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
}, null, 2)) : i("", !0), u(e.$slots, "default", {}, () => [o(d(h.label), 1)])]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 8, [
|
|
41
|
+
"as",
|
|
42
|
+
"as-child",
|
|
43
|
+
"class"
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//#endregion
|
|
48
|
+
export { h as default };
|
|
@@ -20,8 +20,8 @@ type __VLS_Slots = {} & {
|
|
|
20
20
|
default?: (props: typeof __VLS_13) => any;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
23
|
-
unstyled: boolean;
|
|
24
23
|
as: string;
|
|
24
|
+
unstyled: boolean;
|
|
25
25
|
type: "button" | "submit" | "reset";
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { buttonTheme as t } from "../theme/button.js";
|
|
3
3
|
import { computed as n, createBlock as r, createCommentVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderSlot as c, unref as l, withCtx as u } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { LoaderCircle as d } from "lucide-vue-next";
|
|
5
|
+
import { Primitive as f } from "reka-ui";
|
|
6
6
|
//#region src/components/Button.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var p = /*@__PURE__*/ a({
|
|
8
8
|
__name: "Button",
|
|
@@ -28,14 +28,14 @@ var p = /*@__PURE__*/ a({
|
|
|
28
28
|
block: p.block,
|
|
29
29
|
class: p.class
|
|
30
30
|
}));
|
|
31
|
-
return (e, t) => (s(), r(l(
|
|
31
|
+
return (e, t) => (s(), r(l(f), {
|
|
32
32
|
as: p.as,
|
|
33
33
|
"as-child": p.asChild,
|
|
34
34
|
type: p.as === "button" ? p.type : void 0,
|
|
35
35
|
disabled: p.disabled || p.loading || void 0,
|
|
36
36
|
class: o(g.value)
|
|
37
37
|
}, {
|
|
38
|
-
default: u(() => [p.loading ? (s(), r(l(
|
|
38
|
+
default: u(() => [p.loading ? (s(), r(l(d), {
|
|
39
39
|
key: 0,
|
|
40
40
|
class: "animate-spin",
|
|
41
41
|
"aria-hidden": "true"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface CardProps {
|
|
2
|
+
/** Render as a different element or component. */
|
|
3
|
+
as?: string;
|
|
4
|
+
/** Merge props onto the immediate child instead of rendering an element. */
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
variant?: 'outline' | 'soft';
|
|
7
|
+
/** Inner spacing. `none` leaves padding entirely to you. */
|
|
8
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
9
|
+
/** Heading text. Rendered in the header alongside `description`. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Secondary text under the title. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
14
|
+
unstyled?: boolean;
|
|
15
|
+
class?: string;
|
|
16
|
+
/** Override classes per slot, e.g. `{ footer: 'justify-end' }`. */
|
|
17
|
+
ui?: {
|
|
18
|
+
root?: string;
|
|
19
|
+
header?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
body?: string;
|
|
23
|
+
footer?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
declare var __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
header?: (props: typeof __VLS_8) => any;
|
|
29
|
+
} & {
|
|
30
|
+
title?: (props: typeof __VLS_10) => any;
|
|
31
|
+
} & {
|
|
32
|
+
description?: (props: typeof __VLS_12) => any;
|
|
33
|
+
} & {
|
|
34
|
+
default?: (props: typeof __VLS_14) => any;
|
|
35
|
+
} & {
|
|
36
|
+
footer?: (props: typeof __VLS_16) => any;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<CardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {
|
|
39
|
+
as: string;
|
|
40
|
+
unstyled: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { cardTheme as t } from "../theme/card.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, useSlots as m, withCtx as h } from "vue";
|
|
4
|
+
import { Primitive as g } from "reka-ui";
|
|
5
|
+
//#region src/components/Card.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _ = /*@__PURE__*/ c({
|
|
7
|
+
__name: "Card",
|
|
8
|
+
props: {
|
|
9
|
+
as: { default: "div" },
|
|
10
|
+
asChild: { type: Boolean },
|
|
11
|
+
variant: {},
|
|
12
|
+
padding: {},
|
|
13
|
+
title: {},
|
|
14
|
+
description: {},
|
|
15
|
+
unstyled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
class: {},
|
|
20
|
+
ui: {}
|
|
21
|
+
},
|
|
22
|
+
setup(c) {
|
|
23
|
+
let _ = c, v = m(), y = n(() => !!(_.title || _.description || v.header || v.title || v.description)), b = e(), x = n(() => _.unstyled ?? b.unstyled), S = n(() => t({
|
|
24
|
+
variant: _.variant,
|
|
25
|
+
padding: _.padding
|
|
26
|
+
})), C = n(() => x.value ? [_.ui?.root, _.class] : S.value.root({ class: [_.ui?.root, _.class] })), w = n(() => x.value ? _.ui?.header : S.value.header({ class: _.ui?.header })), T = n(() => x.value ? _.ui?.title : S.value.title({ class: _.ui?.title })), E = n(() => x.value ? _.ui?.description : S.value.description({ class: _.ui?.description })), D = n(() => x.value ? _.ui?.body : S.value.body({ class: _.ui?.body })), O = n(() => x.value ? _.ui?.footer : S.value.footer({ class: _.ui?.footer }));
|
|
27
|
+
return (e, t) => (u(), r(p(g), {
|
|
28
|
+
as: _.as,
|
|
29
|
+
"as-child": _.asChild,
|
|
30
|
+
class: l(C.value)
|
|
31
|
+
}, {
|
|
32
|
+
default: h(() => [
|
|
33
|
+
y.value ? (u(), a("div", {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: l(w.value)
|
|
36
|
+
}, [d(e.$slots, "header", {}, () => [_.title || e.$slots.title ? (u(), a("h3", {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: l(T.value)
|
|
39
|
+
}, [d(e.$slots, "title", {}, () => [s(f(_.title), 1)])], 2)) : i("", !0), _.description || e.$slots.description ? (u(), a("p", {
|
|
40
|
+
key: 1,
|
|
41
|
+
class: l(E.value)
|
|
42
|
+
}, [d(e.$slots, "description", {}, () => [s(f(_.description), 1)])], 2)) : i("", !0)])], 2)) : i("", !0),
|
|
43
|
+
o("div", { class: l(D.value) }, [d(e.$slots, "default")], 2),
|
|
44
|
+
e.$slots.footer ? (u(), a("div", {
|
|
45
|
+
key: 1,
|
|
46
|
+
class: l(O.value)
|
|
47
|
+
}, [d(e.$slots, "footer")], 2)) : i("", !0)
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 8, [
|
|
51
|
+
"as",
|
|
52
|
+
"as-child",
|
|
53
|
+
"class"
|
|
54
|
+
]));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { _ as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { checkboxTheme as t } from "../theme/checkbox.js";
|
|
3
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 {
|
|
5
|
-
import {
|
|
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
6
|
//#region src/components/Checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var w = ["id"], T = /*@__PURE__*/ l({
|
|
8
8
|
__name: "Checkbox",
|
|
@@ -30,22 +30,22 @@ var w = ["id"], T = /*@__PURE__*/ l({
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:modelValue"],
|
|
32
32
|
setup(l, { emit: T }) {
|
|
33
|
-
let E = l, D = T, O =
|
|
33
|
+
let E = l, D = T, O = S(n(() => {
|
|
34
34
|
let { label: e, description: t, size: n, id: r, unstyled: i, class: a, ui: o, ...s } = E;
|
|
35
35
|
return s;
|
|
36
|
-
}), D), k =
|
|
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
37
|
size: E.size,
|
|
38
38
|
withText: j.value
|
|
39
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
40
|
return (e, t) => j.value ? (f(), a("div", {
|
|
41
41
|
key: 0,
|
|
42
42
|
class: d(F.value)
|
|
43
|
-
}, [c(h(
|
|
43
|
+
}, [c(h(b), u({ id: A.value }, h(O), {
|
|
44
44
|
"aria-describedby": E.description ? `${A.value}-description` : void 0,
|
|
45
45
|
class: I.value
|
|
46
46
|
}), {
|
|
47
|
-
default: g(() => [c(h(
|
|
48
|
-
default: g(() => [p(e.$slots, "default", {}, () => [E.modelValue === "indeterminate" ? (f(), r(h(
|
|
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
49
|
_: 3
|
|
50
50
|
}, 8, ["class"])]),
|
|
51
51
|
_: 3
|
|
@@ -53,7 +53,7 @@ var w = ["id"], T = /*@__PURE__*/ l({
|
|
|
53
53
|
"id",
|
|
54
54
|
"aria-describedby",
|
|
55
55
|
"class"
|
|
56
|
-
]), o("div", { class: d(R.value) }, [c(h(
|
|
56
|
+
]), o("div", { class: d(R.value) }, [c(h(x), {
|
|
57
57
|
for: A.value,
|
|
58
58
|
class: d(z.value)
|
|
59
59
|
}, {
|
|
@@ -63,12 +63,12 @@ var w = ["id"], T = /*@__PURE__*/ l({
|
|
|
63
63
|
key: 0,
|
|
64
64
|
id: `${A.value}-description`,
|
|
65
65
|
class: d(B.value)
|
|
66
|
-
}, [p(e.$slots, "description", {}, () => [s(m(E.description), 1)])], 10, w)) : i("", !0)], 2)], 2)) : (f(), r(h(
|
|
66
|
+
}, [p(e.$slots, "description", {}, () => [s(m(E.description), 1)])], 10, w)) : i("", !0)], 2)], 2)) : (f(), r(h(b), u({
|
|
67
67
|
key: 1,
|
|
68
68
|
id: E.id
|
|
69
69
|
}, h(O), { class: I.value }), {
|
|
70
|
-
default: g(() => [c(h(
|
|
71
|
-
default: g(() => [p(e.$slots, "default", {}, () => [E.modelValue === "indeterminate" ? (f(), r(h(
|
|
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
72
|
_: 3
|
|
73
73
|
}, 8, ["class"])]),
|
|
74
74
|
_: 3
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { selectTheme as t } from "../theme/select.js";
|
|
3
3
|
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, guardReactiveProps as l, normalizeClass as u, normalizeProps as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Check as v, ChevronDown as y } from "lucide-vue-next";
|
|
5
|
+
import { SelectContent as b, SelectIcon as x, SelectItem as S, SelectItemIndicator as C, SelectItemText as w, SelectPortal as T, SelectRoot as E, SelectTrigger as D, SelectValue as O, SelectViewport as k, useForwardPropsEmits as A } from "reka-ui";
|
|
6
6
|
//#region src/components/Select.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var j = /*@__PURE__*/ c({
|
|
8
8
|
__name: "Select",
|
|
@@ -30,37 +30,37 @@ var j = /*@__PURE__*/ c({
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:modelValue", "update:open"],
|
|
32
32
|
setup(c, { emit: j }) {
|
|
33
|
-
let M = c, N = j, P =
|
|
33
|
+
let M = c, N = j, P = A(r(() => {
|
|
34
34
|
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } = M;
|
|
35
35
|
return o;
|
|
36
36
|
}), N), F = r(() => (M.items ?? []).map((e) => typeof e == "string" ? {
|
|
37
37
|
label: e,
|
|
38
38
|
value: e
|
|
39
39
|
} : e)), I = e(), L = r(() => M.unstyled ?? I.unstyled), R = r(() => t({ size: M.size })), z = r(() => L.value ? [M.ui?.trigger, M.class] : R.value.trigger({ class: [M.ui?.trigger, M.class] })), B = r(() => L.value ? M.ui?.content : R.value.content({ class: M.ui?.content })), V = r(() => L.value ? M.ui?.viewport : R.value.viewport({ class: M.ui?.viewport })), H = r(() => L.value ? M.ui?.item : R.value.item({ class: M.ui?.item })), U = r(() => L.value ? void 0 : R.value.itemIndicator());
|
|
40
|
-
return (e, t) => (f(), i(g(
|
|
41
|
-
default: _(() => [s(g(
|
|
42
|
-
default: _(() => [s(g(
|
|
43
|
-
default: _(() => [s(g(
|
|
40
|
+
return (e, t) => (f(), i(g(E), d(l(g(P))), {
|
|
41
|
+
default: _(() => [s(g(D), { class: u(z.value) }, {
|
|
42
|
+
default: _(() => [s(g(O), { placeholder: M.placeholder }, null, 8, ["placeholder"]), s(g(x), { "as-child": "" }, {
|
|
43
|
+
default: _(() => [s(g(y))]),
|
|
44
44
|
_: 1
|
|
45
45
|
})]),
|
|
46
46
|
_: 1
|
|
47
|
-
}, 8, ["class"]), s(g(
|
|
48
|
-
default: _(() => [s(g(
|
|
47
|
+
}, 8, ["class"]), s(g(T), null, {
|
|
48
|
+
default: _(() => [s(g(b), {
|
|
49
49
|
class: u(B.value),
|
|
50
50
|
position: "popper",
|
|
51
51
|
"side-offset": 4
|
|
52
52
|
}, {
|
|
53
|
-
default: _(() => [s(g(
|
|
54
|
-
default: _(() => [m(e.$slots, "default", {}, () => [(f(!0), a(n, null, p(F.value, (e) => (f(), i(g(
|
|
53
|
+
default: _(() => [s(g(k), { class: u(V.value) }, {
|
|
54
|
+
default: _(() => [m(e.$slots, "default", {}, () => [(f(!0), a(n, null, p(F.value, (e) => (f(), i(g(S), {
|
|
55
55
|
key: e.value,
|
|
56
56
|
value: e.value,
|
|
57
57
|
disabled: e.disabled,
|
|
58
58
|
class: u(H.value)
|
|
59
59
|
}, {
|
|
60
|
-
default: _(() => [s(g(
|
|
61
|
-
default: _(() => [s(g(
|
|
60
|
+
default: _(() => [s(g(C), { class: u(U.value) }, {
|
|
61
|
+
default: _(() => [s(g(v))]),
|
|
62
62
|
_: 1
|
|
63
|
-
}, 8, ["class"]), s(g(
|
|
63
|
+
}, 8, ["class"]), s(g(w), null, {
|
|
64
64
|
default: _(() => [o(h(e.label), 1)]),
|
|
65
65
|
_: 2
|
|
66
66
|
}, 1024)]),
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export { default as Alert } from './Alert.vue';
|
|
1
2
|
export { default as App } from './App.vue';
|
|
3
|
+
export { default as Badge } from './Badge.vue';
|
|
2
4
|
export { default as Button } from './Button.vue';
|
|
5
|
+
export { default as Card } from './Card.vue';
|
|
3
6
|
export { default as Checkbox } from './Checkbox.vue';
|
|
4
7
|
export { default as Form } from './Form.vue';
|
|
5
8
|
export { default as FormField } from './FormField.vue';
|
package/dist/components/index.js
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
4
|
-
import r from "./
|
|
5
|
-
import i from "./
|
|
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 "./
|
|
2
|
+
import t from "./Alert.js";
|
|
3
|
+
import n from "./App.js";
|
|
4
|
+
import r from "./Badge.js";
|
|
5
|
+
import i from "./Button.js";
|
|
6
|
+
import a from "./Card.js";
|
|
7
|
+
import o from "./Checkbox.js";
|
|
8
|
+
import s from "./Form.js";
|
|
9
|
+
import c from "./Label.js";
|
|
10
|
+
import l from "./FormField.js";
|
|
11
|
+
import u from "./Input.js";
|
|
12
|
+
import d from "./RadioGroup.js";
|
|
13
|
+
import f from "./Select.js";
|
|
14
|
+
import p from "./Switch.js";
|
|
15
|
+
import m from "./Textarea.js";
|
|
13
16
|
//#region src/components/index.ts
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
var h = /* @__PURE__ */ e({
|
|
18
|
+
Alert: () => t,
|
|
19
|
+
App: () => n,
|
|
20
|
+
Badge: () => r,
|
|
21
|
+
Button: () => i,
|
|
22
|
+
Card: () => a,
|
|
23
|
+
Checkbox: () => o,
|
|
24
|
+
Form: () => s,
|
|
25
|
+
FormField: () => l,
|
|
26
|
+
Input: () => u,
|
|
27
|
+
Label: () => c,
|
|
28
|
+
RadioGroup: () => d,
|
|
29
|
+
Select: () => f,
|
|
30
|
+
Switch: () => p,
|
|
31
|
+
Textarea: () => m
|
|
26
32
|
});
|
|
27
33
|
//#endregion
|
|
28
|
-
export {
|
|
34
|
+
export { h as components_exports };
|