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.
- package/README.md +161 -2
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +16 -1
- 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.js +5 -0
- package/dist/components/App.vue.d.ts +36 -0
- package/dist/components/App.vue_vue_type_script_setup_true_lang.js +51 -0
- 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 -0
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +4 -1
- 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.js +5 -0
- package/dist/components/Checkbox.vue.d.ts +46 -0
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/Form.js +5 -0
- package/dist/components/Form.vue.d.ts +54 -0
- package/dist/components/Form.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/FormField.js +5 -0
- package/dist/components/FormField.vue.d.ts +46 -0
- package/dist/components/FormField.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/Input.js +5 -0
- package/dist/components/Input.vue.d.ts +29 -0
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/Label.js +5 -0
- package/dist/components/Label.vue.d.ts +23 -0
- package/dist/components/Label.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/components/RadioGroup.js +5 -0
- package/dist/components/RadioGroup.vue.d.ts +41 -0
- package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/Select.js +5 -0
- package/dist/components/Select.vue.d.ts +42 -0
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/components/Switch.vue.d.ts +25 -2
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +45 -14
- package/dist/components/Textarea.js +5 -0
- package/dist/components/Textarea.vue.d.ts +28 -0
- package/dist/components/Textarea.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.js +30 -6
- package/dist/composables/form.d.ts +67 -0
- package/dist/composables/form.js +20 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +29 -8
- 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/checkbox.d.ts +89 -0
- package/dist/theme/checkbox.js +37 -0
- package/dist/theme/form.d.ts +68 -0
- package/dist/theme/form.js +14 -0
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/input.d.ts +60 -0
- package/dist/theme/input.js +27 -0
- package/dist/theme/label.d.ts +14 -0
- package/dist/theme/label.js +8 -0
- package/dist/theme/presets.d.ts +20 -0
- package/dist/theme/presets.js +21 -1
- package/dist/theme/radio-group.d.ts +71 -0
- package/dist/theme/radio-group.js +30 -0
- package/dist/theme/select.d.ts +56 -0
- package/dist/theme/select.js +20 -0
- package/dist/theme/switch.d.ts +27 -0
- package/dist/theme/switch.js +5 -1
- package/package.json +8 -8
- package/theme.css +66 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Shared field chrome for Input, Textarea and the Select trigger. */
|
|
2
|
+
export declare const fieldBase = "w-full rounded-lg border border-border bg-background 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";
|
|
3
|
+
export declare const inputTheme: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
size: {
|
|
5
|
+
sm: string;
|
|
6
|
+
md: string;
|
|
7
|
+
lg: string;
|
|
8
|
+
};
|
|
9
|
+
invalid: {
|
|
10
|
+
true: string;
|
|
11
|
+
};
|
|
12
|
+
}, undefined, "flex w-full rounded-lg border border-border bg-background 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", {
|
|
13
|
+
size: {
|
|
14
|
+
sm: string;
|
|
15
|
+
md: string;
|
|
16
|
+
lg: string;
|
|
17
|
+
};
|
|
18
|
+
invalid: {
|
|
19
|
+
true: string;
|
|
20
|
+
};
|
|
21
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
22
|
+
size: {
|
|
23
|
+
sm: string;
|
|
24
|
+
md: string;
|
|
25
|
+
lg: string;
|
|
26
|
+
};
|
|
27
|
+
invalid: {
|
|
28
|
+
true: string;
|
|
29
|
+
};
|
|
30
|
+
}, undefined, "flex w-full rounded-lg border border-border bg-background 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", unknown, unknown, undefined>>;
|
|
31
|
+
export declare const textareaTheme: import("tailwind-variants").TVReturnType<{
|
|
32
|
+
size: {
|
|
33
|
+
sm: string;
|
|
34
|
+
md: string;
|
|
35
|
+
lg: string;
|
|
36
|
+
};
|
|
37
|
+
invalid: {
|
|
38
|
+
true: string;
|
|
39
|
+
};
|
|
40
|
+
}, undefined, "block resize-y w-full rounded-lg border border-border bg-background 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", {
|
|
41
|
+
size: {
|
|
42
|
+
sm: string;
|
|
43
|
+
md: string;
|
|
44
|
+
lg: string;
|
|
45
|
+
};
|
|
46
|
+
invalid: {
|
|
47
|
+
true: string;
|
|
48
|
+
};
|
|
49
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
50
|
+
size: {
|
|
51
|
+
sm: string;
|
|
52
|
+
md: string;
|
|
53
|
+
lg: string;
|
|
54
|
+
};
|
|
55
|
+
invalid: {
|
|
56
|
+
true: string;
|
|
57
|
+
};
|
|
58
|
+
}, undefined, "block resize-y w-full rounded-lg border border-border bg-background 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", unknown, unknown, undefined>>;
|
|
59
|
+
export type InputVariants = Parameters<typeof inputTheme>[0];
|
|
60
|
+
export type TextareaVariants = Parameters<typeof textareaTheme>[0];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/input.ts
|
|
3
|
+
var t = "w-full rounded-lg border border-border bg-background 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
|
+
base: `flex ${t}`,
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
sm: "h-8 px-2.5 text-sm",
|
|
8
|
+
md: "h-9 px-3 text-sm",
|
|
9
|
+
lg: "h-10 px-4 text-base"
|
|
10
|
+
},
|
|
11
|
+
invalid: { true: "border-red-500 focus-visible:ring-red-500/40" }
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: { size: "md" }
|
|
14
|
+
}), r = e({
|
|
15
|
+
base: `block resize-y ${t}`,
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
sm: "min-h-16 px-2.5 py-1.5 text-sm",
|
|
19
|
+
md: "min-h-20 px-3 py-2 text-sm",
|
|
20
|
+
lg: "min-h-24 px-4 py-2.5 text-base"
|
|
21
|
+
},
|
|
22
|
+
invalid: { true: "border-red-500 focus-visible:ring-red-500/40" }
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: { size: "md" }
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { t as fieldBase, n as inputTheme, r as textareaTheme };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const labelTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
required: {
|
|
3
|
+
true: string;
|
|
4
|
+
};
|
|
5
|
+
}, undefined, "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", {
|
|
6
|
+
required: {
|
|
7
|
+
true: string;
|
|
8
|
+
};
|
|
9
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
10
|
+
required: {
|
|
11
|
+
true: string;
|
|
12
|
+
};
|
|
13
|
+
}, undefined, "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", unknown, unknown, undefined>>;
|
|
14
|
+
export type LabelVariants = Parameters<typeof labelTheme>[0];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/label.ts
|
|
3
|
+
var t = e({
|
|
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: { required: { true: "after:text-red-500 after:content-['*']" } }
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as labelTheme };
|
package/dist/theme/presets.d.ts
CHANGED
|
@@ -12,6 +12,26 @@ export interface ThemeColors {
|
|
|
12
12
|
muted?: string;
|
|
13
13
|
mutedForeground?: string;
|
|
14
14
|
border?: string;
|
|
15
|
+
success?: string;
|
|
16
|
+
successForeground?: string;
|
|
17
|
+
successMuted?: string;
|
|
18
|
+
successMutedForeground?: string;
|
|
19
|
+
successBorder?: string;
|
|
20
|
+
warning?: string;
|
|
21
|
+
warningForeground?: string;
|
|
22
|
+
warningMuted?: string;
|
|
23
|
+
warningMutedForeground?: string;
|
|
24
|
+
warningBorder?: string;
|
|
25
|
+
danger?: string;
|
|
26
|
+
dangerForeground?: string;
|
|
27
|
+
dangerMuted?: string;
|
|
28
|
+
dangerMutedForeground?: string;
|
|
29
|
+
dangerBorder?: string;
|
|
30
|
+
info?: string;
|
|
31
|
+
infoForeground?: string;
|
|
32
|
+
infoMuted?: string;
|
|
33
|
+
infoMutedForeground?: string;
|
|
34
|
+
infoBorder?: string;
|
|
15
35
|
}
|
|
16
36
|
/** A theme provides token values per appearance mode. Omitted tokens keep the defaults from theme.css. */
|
|
17
37
|
export interface Theme {
|
package/dist/theme/presets.js
CHANGED
|
@@ -10,7 +10,27 @@ var e = {
|
|
|
10
10
|
accentForeground: "--iryx-accent-foreground",
|
|
11
11
|
muted: "--iryx-muted",
|
|
12
12
|
mutedForeground: "--iryx-muted-foreground",
|
|
13
|
-
border: "--iryx-border"
|
|
13
|
+
border: "--iryx-border",
|
|
14
|
+
success: "--iryx-success",
|
|
15
|
+
successForeground: "--iryx-success-foreground",
|
|
16
|
+
successMuted: "--iryx-success-muted",
|
|
17
|
+
successMutedForeground: "--iryx-success-muted-foreground",
|
|
18
|
+
successBorder: "--iryx-success-border",
|
|
19
|
+
warning: "--iryx-warning",
|
|
20
|
+
warningForeground: "--iryx-warning-foreground",
|
|
21
|
+
warningMuted: "--iryx-warning-muted",
|
|
22
|
+
warningMutedForeground: "--iryx-warning-muted-foreground",
|
|
23
|
+
warningBorder: "--iryx-warning-border",
|
|
24
|
+
danger: "--iryx-danger",
|
|
25
|
+
dangerForeground: "--iryx-danger-foreground",
|
|
26
|
+
dangerMuted: "--iryx-danger-muted",
|
|
27
|
+
dangerMutedForeground: "--iryx-danger-muted-foreground",
|
|
28
|
+
dangerBorder: "--iryx-danger-border",
|
|
29
|
+
info: "--iryx-info",
|
|
30
|
+
infoForeground: "--iryx-info-foreground",
|
|
31
|
+
infoMuted: "--iryx-info-muted",
|
|
32
|
+
infoMutedForeground: "--iryx-info-muted-foreground",
|
|
33
|
+
infoBorder: "--iryx-info-border"
|
|
14
34
|
}, t = {
|
|
15
35
|
violet: {
|
|
16
36
|
light: {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export declare const radioGroupTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
sm: {
|
|
4
|
+
item: string;
|
|
5
|
+
indicator: string;
|
|
6
|
+
};
|
|
7
|
+
md: {
|
|
8
|
+
item: string;
|
|
9
|
+
indicator: string;
|
|
10
|
+
};
|
|
11
|
+
lg: {
|
|
12
|
+
item: string;
|
|
13
|
+
indicator: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
root: string;
|
|
18
|
+
wrapper: string;
|
|
19
|
+
item: string;
|
|
20
|
+
indicator: string;
|
|
21
|
+
content: string;
|
|
22
|
+
label: string;
|
|
23
|
+
description: string;
|
|
24
|
+
}, undefined, {
|
|
25
|
+
size: {
|
|
26
|
+
sm: {
|
|
27
|
+
item: string;
|
|
28
|
+
indicator: string;
|
|
29
|
+
};
|
|
30
|
+
md: {
|
|
31
|
+
item: string;
|
|
32
|
+
indicator: string;
|
|
33
|
+
};
|
|
34
|
+
lg: {
|
|
35
|
+
item: string;
|
|
36
|
+
indicator: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
root: string;
|
|
41
|
+
wrapper: string;
|
|
42
|
+
item: string;
|
|
43
|
+
indicator: string;
|
|
44
|
+
content: string;
|
|
45
|
+
label: string;
|
|
46
|
+
description: string;
|
|
47
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
48
|
+
size: {
|
|
49
|
+
sm: {
|
|
50
|
+
item: string;
|
|
51
|
+
indicator: string;
|
|
52
|
+
};
|
|
53
|
+
md: {
|
|
54
|
+
item: string;
|
|
55
|
+
indicator: string;
|
|
56
|
+
};
|
|
57
|
+
lg: {
|
|
58
|
+
item: string;
|
|
59
|
+
indicator: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}, {
|
|
63
|
+
root: string;
|
|
64
|
+
wrapper: string;
|
|
65
|
+
item: string;
|
|
66
|
+
indicator: string;
|
|
67
|
+
content: string;
|
|
68
|
+
label: string;
|
|
69
|
+
description: string;
|
|
70
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
71
|
+
export type RadioGroupSlots = keyof ReturnType<typeof radioGroupTheme>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/radio-group.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "grid gap-2",
|
|
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-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
|
|
8
|
+
indicator: "flex size-full items-center justify-center after:block after:rounded-full after:bg-primary",
|
|
9
|
+
content: "grid gap-1",
|
|
10
|
+
label: "text-sm leading-5 text-foreground select-none",
|
|
11
|
+
description: "text-sm leading-snug text-muted-foreground"
|
|
12
|
+
},
|
|
13
|
+
variants: { size: {
|
|
14
|
+
sm: {
|
|
15
|
+
item: "mt-0.5 size-3.5",
|
|
16
|
+
indicator: "after:size-1.5"
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
item: "mt-0.5 size-4",
|
|
20
|
+
indicator: "after:size-2"
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
item: "size-5",
|
|
24
|
+
indicator: "after:size-2.5"
|
|
25
|
+
}
|
|
26
|
+
} },
|
|
27
|
+
defaultVariants: { size: "md" }
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { t as radioGroupTheme };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const selectTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
sm: {
|
|
4
|
+
trigger: string;
|
|
5
|
+
};
|
|
6
|
+
md: {
|
|
7
|
+
trigger: string;
|
|
8
|
+
};
|
|
9
|
+
lg: {
|
|
10
|
+
trigger: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
trigger: string;
|
|
15
|
+
content: string;
|
|
16
|
+
viewport: string;
|
|
17
|
+
item: string;
|
|
18
|
+
itemIndicator: string;
|
|
19
|
+
}, undefined, {
|
|
20
|
+
size: {
|
|
21
|
+
sm: {
|
|
22
|
+
trigger: string;
|
|
23
|
+
};
|
|
24
|
+
md: {
|
|
25
|
+
trigger: string;
|
|
26
|
+
};
|
|
27
|
+
lg: {
|
|
28
|
+
trigger: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
trigger: string;
|
|
33
|
+
content: string;
|
|
34
|
+
viewport: string;
|
|
35
|
+
item: string;
|
|
36
|
+
itemIndicator: string;
|
|
37
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
38
|
+
size: {
|
|
39
|
+
sm: {
|
|
40
|
+
trigger: string;
|
|
41
|
+
};
|
|
42
|
+
md: {
|
|
43
|
+
trigger: string;
|
|
44
|
+
};
|
|
45
|
+
lg: {
|
|
46
|
+
trigger: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
trigger: string;
|
|
51
|
+
content: string;
|
|
52
|
+
viewport: string;
|
|
53
|
+
item: string;
|
|
54
|
+
itemIndicator: string;
|
|
55
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
56
|
+
export type SelectSlots = keyof ReturnType<typeof selectTheme>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { fieldBase as e } from "./input.js";
|
|
2
|
+
import { tv as t } from "tailwind-variants";
|
|
3
|
+
//#region src/theme/select.ts
|
|
4
|
+
var n = t({
|
|
5
|
+
slots: {
|
|
6
|
+
trigger: `flex items-center justify-between gap-2 ${e} cursor-pointer data-[placeholder]:text-muted-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:opacity-60`,
|
|
7
|
+
content: "z-50 min-w-32 overflow-hidden rounded-lg border border-border bg-background text-foreground shadow-md",
|
|
8
|
+
viewport: "p-1",
|
|
9
|
+
item: "relative flex cursor-pointer items-center rounded-md 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",
|
|
10
|
+
itemIndicator: "absolute left-2 flex items-center justify-center text-primary [&_svg]:size-4"
|
|
11
|
+
},
|
|
12
|
+
variants: { size: {
|
|
13
|
+
sm: { trigger: "h-8 px-2.5 text-sm" },
|
|
14
|
+
md: { trigger: "h-9 px-3 text-sm" },
|
|
15
|
+
lg: { trigger: "h-10 px-4 text-base" }
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { size: "md" }
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as selectTheme };
|
package/dist/theme/switch.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ export declare const switchTheme: import("tailwind-variants").TVReturnType<{
|
|
|
2
2
|
[key: string]: {
|
|
3
3
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
4
|
root?: import("tailwind-variants").ClassValue;
|
|
5
|
+
content?: import("tailwind-variants").ClassValue;
|
|
6
|
+
description?: import("tailwind-variants").ClassValue;
|
|
7
|
+
label?: import("tailwind-variants").ClassValue;
|
|
8
|
+
wrapper?: import("tailwind-variants").ClassValue;
|
|
5
9
|
thumb?: import("tailwind-variants").ClassValue;
|
|
6
10
|
};
|
|
7
11
|
};
|
|
@@ -9,24 +13,47 @@ export declare const switchTheme: import("tailwind-variants").TVReturnType<{
|
|
|
9
13
|
[x: string]: {
|
|
10
14
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
11
15
|
root?: import("tailwind-variants").ClassValue;
|
|
16
|
+
content?: import("tailwind-variants").ClassValue;
|
|
17
|
+
description?: import("tailwind-variants").ClassValue;
|
|
18
|
+
label?: import("tailwind-variants").ClassValue;
|
|
19
|
+
wrapper?: import("tailwind-variants").ClassValue;
|
|
12
20
|
thumb?: import("tailwind-variants").ClassValue;
|
|
13
21
|
};
|
|
14
22
|
};
|
|
15
23
|
} | {}, {
|
|
24
|
+
/** Only rendered when a `label` or `description` is provided. */
|
|
25
|
+
wrapper: string;
|
|
16
26
|
root: string;
|
|
17
27
|
thumb: string;
|
|
28
|
+
content: string;
|
|
29
|
+
label: string;
|
|
30
|
+
description: string;
|
|
18
31
|
}, undefined, {
|
|
19
32
|
[key: string]: {
|
|
20
33
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
21
34
|
root?: import("tailwind-variants").ClassValue;
|
|
35
|
+
content?: import("tailwind-variants").ClassValue;
|
|
36
|
+
description?: import("tailwind-variants").ClassValue;
|
|
37
|
+
label?: import("tailwind-variants").ClassValue;
|
|
38
|
+
wrapper?: import("tailwind-variants").ClassValue;
|
|
22
39
|
thumb?: import("tailwind-variants").ClassValue;
|
|
23
40
|
};
|
|
24
41
|
};
|
|
25
42
|
} | {}, {
|
|
43
|
+
/** Only rendered when a `label` or `description` is provided. */
|
|
44
|
+
wrapper: string;
|
|
26
45
|
root: string;
|
|
27
46
|
thumb: string;
|
|
47
|
+
content: string;
|
|
48
|
+
label: string;
|
|
49
|
+
description: string;
|
|
28
50
|
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
51
|
+
/** Only rendered when a `label` or `description` is provided. */
|
|
52
|
+
wrapper: string;
|
|
29
53
|
root: string;
|
|
30
54
|
thumb: string;
|
|
55
|
+
content: string;
|
|
56
|
+
label: string;
|
|
57
|
+
description: string;
|
|
31
58
|
}, undefined, unknown, unknown, undefined>>;
|
|
32
59
|
export type SwitchSlots = keyof ReturnType<typeof switchTheme>;
|
package/dist/theme/switch.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { tv as e } from "tailwind-variants";
|
|
2
2
|
//#region src/theme/switch.ts
|
|
3
3
|
var t = e({ slots: {
|
|
4
|
+
wrapper: "flex items-start gap-2.5",
|
|
4
5
|
root: "inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",
|
|
5
|
-
thumb: "pointer-events-none block size-4 rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-4.5 data-[state=unchecked]:translate-x-0.5"
|
|
6
|
+
thumb: "pointer-events-none block size-4 rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-4.5 data-[state=unchecked]:translate-x-0.5",
|
|
7
|
+
content: "grid gap-1",
|
|
8
|
+
label: "text-sm leading-5 font-medium text-foreground select-none",
|
|
9
|
+
description: "text-sm leading-snug text-muted-foreground"
|
|
6
10
|
} });
|
|
7
11
|
//#endregion
|
|
8
12
|
export { t as switchTheme };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iryx-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "Iryx — an artful Vue 3 component library built on Reka UI and Tailwind CSS v4.",
|
|
6
6
|
"author": "therok1",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,12 +41,6 @@
|
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20"
|
|
43
43
|
},
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "vite build && vue-tsc -p tsconfig.build.json",
|
|
46
|
-
"test": "vitest run",
|
|
47
|
-
"test:watch": "vitest",
|
|
48
|
-
"typecheck": "vue-tsc --noEmit"
|
|
49
|
-
},
|
|
50
44
|
"peerDependencies": {
|
|
51
45
|
"vue": "^3.5.0"
|
|
52
46
|
},
|
|
@@ -66,5 +60,11 @@
|
|
|
66
60
|
"vitest": "^4.1.8",
|
|
67
61
|
"vue": "^3.5.35",
|
|
68
62
|
"vue-tsc": "^3.3.4"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "vite build && vue-tsc -p tsconfig.build.json",
|
|
66
|
+
"test": "vitest run",
|
|
67
|
+
"test:watch": "vitest",
|
|
68
|
+
"typecheck": "vue-tsc --noEmit"
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
}
|
package/theme.css
CHANGED
|
@@ -32,6 +32,31 @@
|
|
|
32
32
|
--iryx-primary-foreground: oklch(0.985 0.005 248);
|
|
33
33
|
--iryx-primary-from: oklch(0.59 0.2 277.19);
|
|
34
34
|
--iryx-primary-to: oklch(0.51 0.23 276.99);
|
|
35
|
+
/*
|
|
36
|
+
* Status colours. Each has five roles: the solid fill, text on that fill,
|
|
37
|
+
* a tinted surface, text on that surface, and a border. Components reference
|
|
38
|
+
* these instead of raw palette classes, so a theme can restyle them.
|
|
39
|
+
*/
|
|
40
|
+
--iryx-success: oklch(0.596 0.145 163.225);
|
|
41
|
+
--iryx-success-foreground: oklch(1 0 0);
|
|
42
|
+
--iryx-success-muted: oklch(0.979 0.021 166.113);
|
|
43
|
+
--iryx-success-muted-foreground: oklch(0.508 0.118 165.612);
|
|
44
|
+
--iryx-success-border: oklch(0.905 0.093 164.15);
|
|
45
|
+
--iryx-warning: oklch(0.666 0.179 58.318);
|
|
46
|
+
--iryx-warning-foreground: oklch(0.279 0.077 45.635);
|
|
47
|
+
--iryx-warning-muted: oklch(0.987 0.022 95.277);
|
|
48
|
+
--iryx-warning-muted-foreground: oklch(0.555 0.163 48.998);
|
|
49
|
+
--iryx-warning-border: oklch(0.924 0.12 95.746);
|
|
50
|
+
--iryx-danger: oklch(0.577 0.245 27.325);
|
|
51
|
+
--iryx-danger-foreground: oklch(1 0 0);
|
|
52
|
+
--iryx-danger-muted: oklch(0.971 0.013 17.38);
|
|
53
|
+
--iryx-danger-muted-foreground: oklch(0.505 0.213 27.518);
|
|
54
|
+
--iryx-danger-border: oklch(0.885 0.062 18.334);
|
|
55
|
+
--iryx-info: oklch(0.546 0.245 262.881);
|
|
56
|
+
--iryx-info-foreground: oklch(1 0 0);
|
|
57
|
+
--iryx-info-muted: oklch(0.97 0.014 254.604);
|
|
58
|
+
--iryx-info-muted-foreground: oklch(0.488 0.243 264.376);
|
|
59
|
+
--iryx-info-border: oklch(0.882 0.059 254.128);
|
|
35
60
|
}
|
|
36
61
|
|
|
37
62
|
.dark {
|
|
@@ -48,6 +73,27 @@
|
|
|
48
73
|
--iryx-primary-foreground: oklch(0.985 0.005 248);
|
|
49
74
|
--iryx-primary-from: oklch(0.62 0.22 293);
|
|
50
75
|
--iryx-primary-to: oklch(0.54 0.24 293);
|
|
76
|
+
/* Status colours — lighter fills, deep tinted surfaces. */
|
|
77
|
+
--iryx-success: oklch(0.696 0.17 162.48);
|
|
78
|
+
--iryx-success-foreground: oklch(0.262 0.051 172.552);
|
|
79
|
+
--iryx-success-muted: oklch(0.262 0.051 172.552);
|
|
80
|
+
--iryx-success-muted-foreground: oklch(0.845 0.143 164.978);
|
|
81
|
+
--iryx-success-border: oklch(0.378 0.077 168.94);
|
|
82
|
+
--iryx-warning: oklch(0.828 0.189 84.429);
|
|
83
|
+
--iryx-warning-foreground: oklch(0.279 0.077 45.635);
|
|
84
|
+
--iryx-warning-muted: oklch(0.279 0.077 45.635);
|
|
85
|
+
--iryx-warning-muted-foreground: oklch(0.879 0.169 91.605);
|
|
86
|
+
--iryx-warning-border: oklch(0.414 0.112 45.904);
|
|
87
|
+
--iryx-danger: oklch(0.637 0.237 25.331);
|
|
88
|
+
--iryx-danger-foreground: oklch(0.258 0.092 26.042);
|
|
89
|
+
--iryx-danger-muted: oklch(0.258 0.092 26.042);
|
|
90
|
+
--iryx-danger-muted-foreground: oklch(0.808 0.114 19.571);
|
|
91
|
+
--iryx-danger-border: oklch(0.396 0.141 25.723);
|
|
92
|
+
--iryx-info: oklch(0.623 0.214 259.815);
|
|
93
|
+
--iryx-info-foreground: oklch(0.282 0.091 267.935);
|
|
94
|
+
--iryx-info-muted: oklch(0.282 0.091 267.935);
|
|
95
|
+
--iryx-info-muted-foreground: oklch(0.809 0.105 251.813);
|
|
96
|
+
--iryx-info-border: oklch(0.379 0.146 265.522);
|
|
51
97
|
}
|
|
52
98
|
|
|
53
99
|
@theme inline {
|
|
@@ -62,4 +108,24 @@
|
|
|
62
108
|
--color-muted: var(--iryx-muted);
|
|
63
109
|
--color-muted-foreground: var(--iryx-muted-foreground);
|
|
64
110
|
--color-border: var(--iryx-border);
|
|
111
|
+
--color-success: var(--iryx-success);
|
|
112
|
+
--color-success-foreground: var(--iryx-success-foreground);
|
|
113
|
+
--color-success-muted: var(--iryx-success-muted);
|
|
114
|
+
--color-success-muted-foreground: var(--iryx-success-muted-foreground);
|
|
115
|
+
--color-success-border: var(--iryx-success-border);
|
|
116
|
+
--color-warning: var(--iryx-warning);
|
|
117
|
+
--color-warning-foreground: var(--iryx-warning-foreground);
|
|
118
|
+
--color-warning-muted: var(--iryx-warning-muted);
|
|
119
|
+
--color-warning-muted-foreground: var(--iryx-warning-muted-foreground);
|
|
120
|
+
--color-warning-border: var(--iryx-warning-border);
|
|
121
|
+
--color-danger: var(--iryx-danger);
|
|
122
|
+
--color-danger-foreground: var(--iryx-danger-foreground);
|
|
123
|
+
--color-danger-muted: var(--iryx-danger-muted);
|
|
124
|
+
--color-danger-muted-foreground: var(--iryx-danger-muted-foreground);
|
|
125
|
+
--color-danger-border: var(--iryx-danger-border);
|
|
126
|
+
--color-info: var(--iryx-info);
|
|
127
|
+
--color-info-foreground: var(--iryx-info-foreground);
|
|
128
|
+
--color-info-muted: var(--iryx-info-muted);
|
|
129
|
+
--color-info-muted-foreground: var(--iryx-info-muted-foreground);
|
|
130
|
+
--color-info-border: var(--iryx-info-border);
|
|
65
131
|
}
|