iryx-ui 0.5.0 → 0.7.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 +355 -5
- package/dist/component-names.d.ts +1 -1
- package/dist/components/Alert.vue.d.ts +19 -4
- package/dist/components/Badge.vue.d.ts +4 -3
- package/dist/components/Banner.vue.d.ts +81 -0
- package/dist/components/Combobox.vue.d.ts +3 -3
- package/dist/components/DatePicker.vue.d.ts +52 -0
- package/dist/components/DateRangePicker.vue.d.ts +60 -0
- package/dist/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/components/Input.vue.d.ts +39 -1
- package/dist/components/Pagination.vue.d.ts +3 -1
- package/dist/components/PasswordInput.vue.d.ts +54 -0
- package/dist/components/Select.vue.d.ts +2 -2
- package/dist/components/Table.vue.d.ts +131 -0
- package/dist/components/Textarea.vue.d.ts +16 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/composables/data-table.d.ts +93 -0
- package/dist/composables/date.d.ts +21 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +72 -60
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +104 -7
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +122 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +84 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +91 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +107 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +159 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +29 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +37 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +6 -0
- package/dist/packages/iryx-ui/src/component-names.js +1 -1
- package/dist/packages/iryx-ui/src/components/Alert.vue_vue_type_script_setup_true_lang.js +51 -35
- package/dist/packages/iryx-ui/src/components/Badge.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/packages/iryx-ui/src/components/Banner.js +5 -0
- package/dist/packages/iryx-ui/src/components/Banner.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/packages/iryx-ui/src/components/DatePicker.js +5 -0
- package/dist/packages/iryx-ui/src/components/DatePicker.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/packages/iryx-ui/src/components/DateRangePicker.js +5 -0
- package/dist/packages/iryx-ui/src/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +210 -0
- package/dist/packages/iryx-ui/src/components/Input.vue_vue_type_script_setup_true_lang.js +94 -25
- package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/packages/iryx-ui/src/components/PasswordInput.js +5 -0
- package/dist/packages/iryx-ui/src/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/packages/iryx-ui/src/components/Table.js +5 -0
- package/dist/packages/iryx-ui/src/components/Table.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/packages/iryx-ui/src/components/Textarea.vue_vue_type_script_setup_true_lang.js +47 -21
- package/dist/packages/iryx-ui/src/components/index.js +68 -58
- package/dist/packages/iryx-ui/src/composables/data-table.js +106 -0
- package/dist/packages/iryx-ui/src/composables/date.js +25 -0
- package/dist/packages/iryx-ui/src/theme/alert.js +10 -21
- package/dist/packages/iryx-ui/src/theme/badge.js +37 -37
- package/dist/packages/iryx-ui/src/theme/banner.js +62 -0
- package/dist/packages/iryx-ui/src/theme/date-picker.js +45 -0
- package/dist/packages/iryx-ui/src/theme/input.js +22 -6
- package/dist/packages/iryx-ui/src/theme/pagination.js +23 -13
- package/dist/packages/iryx-ui/src/theme/password-input.js +22 -0
- package/dist/packages/iryx-ui/src/theme/stat.js +4 -4
- package/dist/packages/iryx-ui/src/theme/table.js +62 -0
- package/dist/packages/iryx-ui/src/theme/toast.js +11 -26
- package/dist/theme/alert.d.ts +6 -12
- package/dist/theme/badge.d.ts +15 -12
- package/dist/theme/banner.d.ts +185 -0
- package/dist/theme/date-picker.d.ts +254 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/input.d.ts +94 -15
- package/dist/theme/pagination.d.ts +33 -0
- package/dist/theme/password-input.d.ts +79 -0
- package/dist/theme/stat.d.ts +0 -3
- package/dist/theme/table.d.ts +230 -0
- package/dist/theme/toast.d.ts +0 -15
- package/package.json +2 -1
- package/theme.css +10 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { $ad063034c8620db8$export$aa8b41735afcabd2 as e, $ad063034c8620db8$export$d0bdf45af03a6ea3 as t } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js";
|
|
2
|
+
import { $58246871e4652552$export$6b862160d295c8e as n } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js";
|
|
3
|
+
import "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js";
|
|
4
|
+
import { $12a3c853105e5a70$export$ad991b66133851cf as r } from "../../../../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js";
|
|
5
|
+
//#region src/composables/date.ts
|
|
6
|
+
var i = /^\d{4}-\d{2}-\d{2}$/;
|
|
7
|
+
function a(e) {
|
|
8
|
+
if (!(!e || !i.test(e))) try {
|
|
9
|
+
return n(e);
|
|
10
|
+
} catch {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function o(e) {
|
|
15
|
+
return e ? `${e.year.toString().padStart(4, "0")}-${e.month.toString().padStart(2, "0")}-${e.day.toString().padStart(2, "0")}` : null;
|
|
16
|
+
}
|
|
17
|
+
function s() {
|
|
18
|
+
return o(t(e()));
|
|
19
|
+
}
|
|
20
|
+
function c(t, n, i = { dateStyle: "medium" }) {
|
|
21
|
+
let o = a(t);
|
|
22
|
+
return o ? new r(n ?? "en-US", i).format(o.toDate(e())) : "";
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { c as formatIsoDate, s as isoToday, a as toCalendarDate, o as toIsoDate };
|
|
@@ -2,31 +2,20 @@ import { tv as e } from "tailwind-variants";
|
|
|
2
2
|
//#region src/theme/alert.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
|
-
root: "flex w-full gap-3 rounded-xl border p-4",
|
|
6
|
-
icon: "mt-
|
|
5
|
+
root: "flex w-full gap-3 rounded-xl border border-border bg-background p-4 shadow-xs",
|
|
6
|
+
icon: "mt-px shrink-0 [&_svg]:size-4.5",
|
|
7
7
|
content: "min-w-0 flex-1",
|
|
8
|
-
title: "text-sm font-medium",
|
|
9
|
-
description: "text-sm
|
|
10
|
-
|
|
8
|
+
title: "text-sm font-medium text-foreground",
|
|
9
|
+
description: "text-sm text-muted-foreground",
|
|
10
|
+
actions: "mt-3 flex flex-wrap items-center gap-2",
|
|
11
|
+
close: "-m-1 shrink-0 self-start rounded-lg p-1 text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4"
|
|
11
12
|
},
|
|
12
13
|
variants: {
|
|
13
14
|
variant: {
|
|
14
|
-
info: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
success: {
|
|
19
|
-
root: "border-success-border bg-success-muted text-success-muted-foreground",
|
|
20
|
-
icon: "text-success"
|
|
21
|
-
},
|
|
22
|
-
warning: {
|
|
23
|
-
root: "border-warning-border bg-warning-muted text-warning-muted-foreground",
|
|
24
|
-
icon: "text-warning"
|
|
25
|
-
},
|
|
26
|
-
danger: {
|
|
27
|
-
root: "border-danger-border bg-danger-muted text-danger-muted-foreground",
|
|
28
|
-
icon: "text-danger"
|
|
29
|
-
}
|
|
15
|
+
info: { icon: "text-info" },
|
|
16
|
+
success: { icon: "text-success" },
|
|
17
|
+
warning: { icon: "text-warning" },
|
|
18
|
+
danger: { icon: "text-danger" }
|
|
30
19
|
},
|
|
31
20
|
withTitle: { true: { description: "mt-1" } }
|
|
32
21
|
},
|
|
@@ -2,8 +2,8 @@ import { tv as e } from "tailwind-variants";
|
|
|
2
2
|
//#region src/theme/badge.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
|
-
root: "inline-flex shrink-0 items-center rounded-
|
|
6
|
-
dot: "rounded-full
|
|
5
|
+
root: "inline-flex shrink-0 items-center rounded-md border font-medium whitespace-nowrap [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
6
|
+
dot: "rounded-full"
|
|
7
7
|
},
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -13,21 +13,21 @@ var t = e({
|
|
|
13
13
|
danger: {},
|
|
14
14
|
info: {}
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
withDot: {
|
|
17
|
+
true: { root: "border-border bg-background text-foreground" },
|
|
18
|
+
false: {}
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
21
|
sm: {
|
|
22
|
-
root: "h-5 gap-1 px-
|
|
22
|
+
root: "h-5 gap-1 px-1.5 text-xs has-[[data-icon=inline-end]]:pr-1 has-[[data-icon=inline-start]]:pl-1 [&_svg]:size-3",
|
|
23
23
|
dot: "size-1.5"
|
|
24
24
|
},
|
|
25
25
|
md: {
|
|
26
|
-
root: "h-6 gap-1.5 px-2
|
|
26
|
+
root: "h-6 gap-1.5 px-2 text-xs has-[[data-icon=inline-end]]:pr-1.5 has-[[data-icon=inline-start]]:pl-1.5 [&_svg]:size-3.5",
|
|
27
27
|
dot: "size-2"
|
|
28
28
|
},
|
|
29
29
|
lg: {
|
|
30
|
-
root: "h-7 gap-1.5 px-
|
|
30
|
+
root: "h-7 gap-1.5 px-2.5 text-sm has-[[data-icon=inline-end]]:pr-2 has-[[data-icon=inline-start]]:pl-2 [&_svg]:size-4",
|
|
31
31
|
dot: "size-2"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -35,58 +35,58 @@ var t = e({
|
|
|
35
35
|
compoundVariants: [
|
|
36
36
|
{
|
|
37
37
|
variant: "neutral",
|
|
38
|
-
|
|
39
|
-
class: { root: "bg-muted text-muted-foreground" }
|
|
38
|
+
withDot: !1,
|
|
39
|
+
class: { root: "border-border bg-muted text-muted-foreground" }
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
variant: "
|
|
43
|
-
|
|
44
|
-
class: { root: "bg-
|
|
42
|
+
variant: "success",
|
|
43
|
+
withDot: !1,
|
|
44
|
+
class: { root: "border-success-border bg-success-muted text-success-muted-foreground" }
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
variant: "
|
|
48
|
-
|
|
49
|
-
class: { root: "bg-
|
|
47
|
+
variant: "warning",
|
|
48
|
+
withDot: !1,
|
|
49
|
+
class: { root: "border-warning-border bg-warning-muted text-warning-muted-foreground" }
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
variant: "
|
|
53
|
-
|
|
54
|
-
class: { root: "bg-
|
|
52
|
+
variant: "danger",
|
|
53
|
+
withDot: !1,
|
|
54
|
+
class: { root: "border-danger-border bg-danger-muted text-danger-muted-foreground" }
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
variant: "
|
|
58
|
-
|
|
59
|
-
class: { root: "bg-
|
|
57
|
+
variant: "info",
|
|
58
|
+
withDot: !1,
|
|
59
|
+
class: { root: "border-info-border bg-info-muted text-info-muted-foreground" }
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
variant: "
|
|
63
|
-
|
|
64
|
-
class: {
|
|
62
|
+
variant: "neutral",
|
|
63
|
+
withDot: !0,
|
|
64
|
+
class: { dot: "bg-muted-foreground" }
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
variant: "
|
|
68
|
-
|
|
69
|
-
class: {
|
|
67
|
+
variant: "success",
|
|
68
|
+
withDot: !0,
|
|
69
|
+
class: { dot: "bg-success" }
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
variant: "
|
|
73
|
-
|
|
74
|
-
class: {
|
|
72
|
+
variant: "warning",
|
|
73
|
+
withDot: !0,
|
|
74
|
+
class: { dot: "bg-warning" }
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
variant: "
|
|
78
|
-
|
|
79
|
-
class: {
|
|
77
|
+
variant: "danger",
|
|
78
|
+
withDot: !0,
|
|
79
|
+
class: { dot: "bg-danger" }
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
variant: "info",
|
|
83
|
-
|
|
84
|
-
class: {
|
|
83
|
+
withDot: !0,
|
|
84
|
+
class: { dot: "bg-info" }
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
87
|
defaultVariants: {
|
|
88
88
|
variant: "neutral",
|
|
89
|
-
|
|
89
|
+
withDot: !1,
|
|
90
90
|
size: "md"
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/banner.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "w-full border-b",
|
|
6
|
+
container: "mx-auto flex w-full items-center gap-3 px-4 py-2.5",
|
|
7
|
+
icon: "shrink-0 [&_svg]:size-4",
|
|
8
|
+
content: "min-w-0 flex-1 text-sm",
|
|
9
|
+
title: "font-medium",
|
|
10
|
+
actions: "flex shrink-0 items-center gap-2",
|
|
11
|
+
close: "-mr-1 shrink-0 rounded-lg p-1 opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-current/50 [&_svg]:size-4"
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
neutral: {
|
|
16
|
+
root: "border-border bg-muted text-foreground",
|
|
17
|
+
icon: "text-muted-foreground"
|
|
18
|
+
},
|
|
19
|
+
info: {
|
|
20
|
+
root: "border-info-border bg-info-muted text-info-muted-foreground",
|
|
21
|
+
icon: "text-info"
|
|
22
|
+
},
|
|
23
|
+
success: {
|
|
24
|
+
root: "border-success-border bg-success-muted text-success-muted-foreground",
|
|
25
|
+
icon: "text-success"
|
|
26
|
+
},
|
|
27
|
+
warning: {
|
|
28
|
+
root: "border-warning-border bg-warning-muted text-warning-muted-foreground",
|
|
29
|
+
icon: "text-warning"
|
|
30
|
+
},
|
|
31
|
+
danger: {
|
|
32
|
+
root: "border-danger-border bg-danger-muted text-danger-muted-foreground",
|
|
33
|
+
icon: "text-danger"
|
|
34
|
+
},
|
|
35
|
+
primary: {
|
|
36
|
+
root: "border-transparent bg-linear-to-b from-primary-from to-primary-to text-primary-foreground",
|
|
37
|
+
icon: "text-primary-foreground"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
position: {
|
|
41
|
+
static: {},
|
|
42
|
+
top: { root: "sticky top-0 z-30" },
|
|
43
|
+
bottom: { root: "fixed inset-x-0 bottom-0 z-30 border-t border-b-0" }
|
|
44
|
+
},
|
|
45
|
+
contained: {
|
|
46
|
+
true: { container: "max-w-5xl" },
|
|
47
|
+
false: {}
|
|
48
|
+
},
|
|
49
|
+
align: {
|
|
50
|
+
start: {},
|
|
51
|
+
center: { content: "text-center" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
variant: "neutral",
|
|
56
|
+
position: "static",
|
|
57
|
+
contained: !1,
|
|
58
|
+
align: "start"
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//#endregion
|
|
62
|
+
export { t as bannerTheme };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { fieldBase as e } from "./input.js";
|
|
2
|
+
import { tv as t } from "tailwind-variants";
|
|
3
|
+
//#region src/theme/date-picker.ts
|
|
4
|
+
var n = t({
|
|
5
|
+
slots: {
|
|
6
|
+
trigger: `flex items-center justify-between gap-2 ${e} cursor-pointer [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:opacity-60`,
|
|
7
|
+
placeholder: "text-muted-foreground",
|
|
8
|
+
content: "z-50 rounded-xl border border-border bg-background p-3 text-foreground shadow-md",
|
|
9
|
+
header: "flex items-center justify-between gap-2 pb-3",
|
|
10
|
+
heading: "text-sm font-medium",
|
|
11
|
+
nav: "flex size-7 items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4",
|
|
12
|
+
months: "flex items-start gap-4",
|
|
13
|
+
grid: "w-full border-collapse select-none",
|
|
14
|
+
headCell: "pb-1 text-xs font-normal text-muted-foreground",
|
|
15
|
+
cell: "p-0 transition-colors",
|
|
16
|
+
cellTrigger: "flex h-8 w-full min-w-8 items-center justify-center rounded-lg text-sm transition-colors outline-none not-data-[selected]:hover:bg-accent not-data-[selected]:hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50 data-[disabled]:pointer-events-none data-[disabled]:opacity-30 data-[outside-view]:text-muted-foreground/50 data-[today]:font-semibold data-[today]:text-primary data-[unavailable]:pointer-events-none data-[unavailable]:line-through data-[unavailable]:opacity-40",
|
|
17
|
+
footer: "flex items-center justify-between gap-2 pt-3",
|
|
18
|
+
action: "rounded-lg px-2 py-1 text-sm text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50"
|
|
19
|
+
},
|
|
20
|
+
variants: {
|
|
21
|
+
size: {
|
|
22
|
+
sm: { trigger: "h-8 px-2.5 text-sm" },
|
|
23
|
+
md: { trigger: "h-9 px-3 text-sm" },
|
|
24
|
+
lg: { trigger: "h-10 px-4 text-base" }
|
|
25
|
+
},
|
|
26
|
+
invalid: { true: { trigger: "border-red-500 focus-visible:ring-red-500/40" } },
|
|
27
|
+
range: {
|
|
28
|
+
false: { cellTrigger: "data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:data-[today]:text-primary-foreground" },
|
|
29
|
+
true: {
|
|
30
|
+
cell: [
|
|
31
|
+
"has-data-[selected]:bg-primary/15",
|
|
32
|
+
"has-data-[selection-start]:rounded-s-lg",
|
|
33
|
+
"has-data-[selection-end]:rounded-e-lg"
|
|
34
|
+
].join(" "),
|
|
35
|
+
cellTrigger: ["data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary", "data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary"].join(" ")
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: "md",
|
|
41
|
+
range: !1
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { n as datePickerTheme };
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import { tv as e } from "tailwind-variants";
|
|
2
2
|
//#region src/theme/input.ts
|
|
3
3
|
var t = "w-full rounded-xl border border-border bg-input text-foreground transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50", n = e({
|
|
4
|
-
|
|
4
|
+
slots: {
|
|
5
|
+
root: `flex items-center ${t} focus-within:ring-2 focus-within:ring-primary/50 has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50`,
|
|
6
|
+
input: "w-full min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",
|
|
7
|
+
leading: "flex shrink-0 items-center text-muted-foreground [&_svg]:size-4",
|
|
8
|
+
trailing: "flex shrink-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-4",
|
|
9
|
+
clear: "flex items-center rounded-md text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-3.5"
|
|
10
|
+
},
|
|
5
11
|
variants: {
|
|
6
12
|
size: {
|
|
7
|
-
sm:
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
sm: {
|
|
14
|
+
root: "h-8 gap-1.5 px-2.5",
|
|
15
|
+
input: "text-sm"
|
|
16
|
+
},
|
|
17
|
+
md: {
|
|
18
|
+
root: "h-9 gap-2 px-3",
|
|
19
|
+
input: "text-sm"
|
|
20
|
+
},
|
|
21
|
+
lg: {
|
|
22
|
+
root: "h-10 gap-2 px-4",
|
|
23
|
+
input: "text-base"
|
|
24
|
+
}
|
|
10
25
|
},
|
|
11
|
-
invalid: { true: "border-red-500 focus-
|
|
26
|
+
invalid: { true: { root: "border-red-500 focus-within:ring-red-500/40" } }
|
|
12
27
|
},
|
|
13
28
|
defaultVariants: { size: "md" }
|
|
14
29
|
}), r = e({
|
|
@@ -19,7 +34,8 @@ var t = "w-full rounded-xl border border-border bg-input text-foreground transit
|
|
|
19
34
|
md: "min-h-20 px-3 py-2 text-sm",
|
|
20
35
|
lg: "min-h-24 px-4 py-2.5 text-base"
|
|
21
36
|
},
|
|
22
|
-
invalid: { true: "border-red-500 focus-visible:ring-red-500/40" }
|
|
37
|
+
invalid: { true: "border-red-500 focus-visible:ring-red-500/40" },
|
|
38
|
+
autosize: { true: "min-h-0 resize-none" }
|
|
23
39
|
},
|
|
24
40
|
defaultVariants: { size: "md" }
|
|
25
41
|
});
|
|
@@ -9,21 +9,31 @@ var t = e({
|
|
|
9
9
|
inactive: "text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
10
10
|
ellipsis: "inline-flex items-center justify-center text-sm text-muted-foreground"
|
|
11
11
|
},
|
|
12
|
-
variants: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
sm: {
|
|
15
|
+
item: "h-8 min-w-8 px-2",
|
|
16
|
+
ellipsis: "h-8 min-w-8"
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
item: "h-9 min-w-9 px-2.5",
|
|
20
|
+
ellipsis: "h-9 min-w-9"
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
item: "h-10 min-w-10 px-3",
|
|
24
|
+
ellipsis: "h-10 min-w-10"
|
|
25
|
+
}
|
|
16
26
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
lg: {
|
|
22
|
-
item: "h-10 min-w-10 px-3",
|
|
23
|
-
ellipsis: "h-10 min-w-10"
|
|
27
|
+
align: {
|
|
28
|
+
start: { root: "justify-start" },
|
|
29
|
+
center: { root: "justify-center" },
|
|
30
|
+
end: { root: "justify-end" }
|
|
24
31
|
}
|
|
25
|
-
}
|
|
26
|
-
defaultVariants: {
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
size: "sm",
|
|
35
|
+
align: "center"
|
|
36
|
+
}
|
|
27
37
|
});
|
|
28
38
|
//#endregion
|
|
29
39
|
export { t as paginationTheme };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/password-input.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "flex w-full flex-col gap-2",
|
|
6
|
+
toggle: "flex items-center rounded-md text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4",
|
|
7
|
+
meter: "flex items-center gap-2",
|
|
8
|
+
track: "flex h-1 flex-1 gap-1",
|
|
9
|
+
segment: "h-full flex-1 rounded-full bg-muted transition-colors",
|
|
10
|
+
label: "shrink-0 text-xs text-muted-foreground tabular-nums"
|
|
11
|
+
},
|
|
12
|
+
variants: { score: {
|
|
13
|
+
0: {},
|
|
14
|
+
1: { segment: "data-[filled]:bg-danger" },
|
|
15
|
+
2: { segment: "data-[filled]:bg-warning" },
|
|
16
|
+
3: { segment: "data-[filled]:bg-info" },
|
|
17
|
+
4: { segment: "data-[filled]:bg-success" }
|
|
18
|
+
} },
|
|
19
|
+
defaultVariants: { score: 0 }
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { t as passwordInputTheme };
|
|
@@ -5,7 +5,7 @@ var t = e({
|
|
|
5
5
|
root: "flex flex-col gap-2",
|
|
6
6
|
label: "text-xs font-medium tracking-wide text-muted-foreground uppercase",
|
|
7
7
|
value: "font-semibold tracking-tight text-foreground tabular-nums",
|
|
8
|
-
delta: "inline-flex items-center gap-0.5
|
|
8
|
+
delta: "inline-flex items-center gap-0.5 text-xs font-medium tabular-nums [&_svg]:size-3.5",
|
|
9
9
|
hint: "text-xs text-muted-foreground",
|
|
10
10
|
row: "flex flex-col items-start gap-1.5"
|
|
11
11
|
},
|
|
@@ -16,9 +16,9 @@ var t = e({
|
|
|
16
16
|
lg: { value: "text-4xl" }
|
|
17
17
|
},
|
|
18
18
|
trend: {
|
|
19
|
-
up: { delta: "
|
|
20
|
-
down: { delta: "
|
|
21
|
-
neutral: { delta: "
|
|
19
|
+
up: { delta: "text-success" },
|
|
20
|
+
down: { delta: "text-danger" },
|
|
21
|
+
neutral: { delta: "text-muted-foreground" }
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
defaultVariants: {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/table.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "relative w-full overflow-x-auto",
|
|
6
|
+
table: "w-full caption-bottom border-collapse text-sm",
|
|
7
|
+
thead: "",
|
|
8
|
+
tbody: "",
|
|
9
|
+
tr: "border-b border-border transition-colors last:border-b-0",
|
|
10
|
+
th: "border-b border-border px-3 py-3 text-start align-middle text-xs font-semibold tracking-wide text-muted-foreground uppercase",
|
|
11
|
+
sortButton: "inline-flex cursor-pointer items-center gap-1.5 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-3.5 [&_svg]:shrink-0",
|
|
12
|
+
sortIcon: "text-muted-foreground/70 transition-colors",
|
|
13
|
+
td: "px-3 py-3 align-middle text-foreground",
|
|
14
|
+
gutter: "w-px px-3 py-3 align-middle",
|
|
15
|
+
headGutter: "w-px border-b border-border px-3 py-3 align-middle",
|
|
16
|
+
expandButton: "inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-[transform,color,background-color] outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4",
|
|
17
|
+
expandedRow: "bg-muted/30",
|
|
18
|
+
expandedCell: "p-0",
|
|
19
|
+
empty: "px-3 py-10 text-center text-sm text-muted-foreground",
|
|
20
|
+
caption: "mt-3 text-sm text-muted-foreground"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
striped: { true: { tr: "even:bg-muted/30" } },
|
|
24
|
+
hoverable: { true: { tr: "hover:bg-muted/50" } },
|
|
25
|
+
clickable: { true: { tr: "cursor-pointer" } },
|
|
26
|
+
stickyHeader: { true: { th: "sticky top-0 z-10 bg-background" } },
|
|
27
|
+
selected: { true: { tr: "bg-primary/5" } },
|
|
28
|
+
size: {
|
|
29
|
+
sm: {
|
|
30
|
+
th: "py-2",
|
|
31
|
+
td: "py-2",
|
|
32
|
+
gutter: "py-2"
|
|
33
|
+
},
|
|
34
|
+
md: {},
|
|
35
|
+
lg: {
|
|
36
|
+
th: "py-4",
|
|
37
|
+
td: "py-4",
|
|
38
|
+
gutter: "py-4"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
align: {
|
|
42
|
+
start: {
|
|
43
|
+
th: "text-start",
|
|
44
|
+
td: "text-start"
|
|
45
|
+
},
|
|
46
|
+
center: {
|
|
47
|
+
th: "text-center",
|
|
48
|
+
td: "text-center"
|
|
49
|
+
},
|
|
50
|
+
end: {
|
|
51
|
+
th: "text-end",
|
|
52
|
+
td: "text-end"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
size: "md",
|
|
58
|
+
hoverable: !0
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//#endregion
|
|
62
|
+
export { t as tableTheme };
|
|
@@ -3,36 +3,21 @@ import { tv as e } from "tailwind-variants";
|
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
5
|
viewport: "fixed z-50 flex max-h-screen w-full flex-col gap-2 p-4 outline-none sm:max-w-sm",
|
|
6
|
-
root: "flex items-start gap-3 rounded-xl border p-4 shadow-lg data-[state=closed]:animate-fade-out data-[state=open]:animate-toast-in",
|
|
7
|
-
icon: "mt-
|
|
6
|
+
root: "flex items-start gap-3 rounded-xl border border-border bg-background p-4 text-foreground shadow-lg data-[state=closed]:animate-fade-out data-[state=open]:animate-toast-in",
|
|
7
|
+
icon: "mt-px shrink-0 [&_svg]:size-4.5",
|
|
8
8
|
content: "min-w-0 flex-1",
|
|
9
|
-
title: "text-sm font-medium",
|
|
10
|
-
description: "text-sm
|
|
11
|
-
action: "shrink-0 self-center rounded-lg px-2 py-1 text-
|
|
12
|
-
close: "-m-1 shrink-0 self-start rounded-lg p-1
|
|
9
|
+
title: "text-sm font-medium text-foreground",
|
|
10
|
+
description: "text-sm text-muted-foreground",
|
|
11
|
+
action: "shrink-0 self-center rounded-lg border border-border px-2.5 py-1 text-xs font-medium transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary/50",
|
|
12
|
+
close: "-m-1 shrink-0 self-start rounded-lg p-1 text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/50 [&_svg]:size-4"
|
|
13
13
|
},
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
|
-
neutral: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
root: "border-success-border bg-success-muted text-success-muted-foreground",
|
|
22
|
-
icon: "text-success"
|
|
23
|
-
},
|
|
24
|
-
warning: {
|
|
25
|
-
root: "border-warning-border bg-warning-muted text-warning-muted-foreground",
|
|
26
|
-
icon: "text-warning"
|
|
27
|
-
},
|
|
28
|
-
danger: {
|
|
29
|
-
root: "border-danger-border bg-danger-muted text-danger-muted-foreground",
|
|
30
|
-
icon: "text-danger"
|
|
31
|
-
},
|
|
32
|
-
info: {
|
|
33
|
-
root: "border-info-border bg-info-muted text-info-muted-foreground",
|
|
34
|
-
icon: "text-info"
|
|
35
|
-
}
|
|
16
|
+
neutral: { icon: "text-muted-foreground" },
|
|
17
|
+
success: { icon: "text-success" },
|
|
18
|
+
warning: { icon: "text-warning" },
|
|
19
|
+
danger: { icon: "text-danger" },
|
|
20
|
+
info: { icon: "text-info" }
|
|
36
21
|
},
|
|
37
22
|
position: {
|
|
38
23
|
"top-left": { viewport: "top-0 left-0" },
|
package/dist/theme/alert.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
export declare const alertTheme: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
variant: {
|
|
3
3
|
info: {
|
|
4
|
-
root: string;
|
|
5
4
|
icon: string;
|
|
6
5
|
};
|
|
7
6
|
success: {
|
|
8
|
-
root: string;
|
|
9
7
|
icon: string;
|
|
10
8
|
};
|
|
11
9
|
warning: {
|
|
12
|
-
root: string;
|
|
13
10
|
icon: string;
|
|
14
11
|
};
|
|
15
12
|
danger: {
|
|
16
|
-
root: string;
|
|
17
13
|
icon: string;
|
|
18
14
|
};
|
|
19
15
|
};
|
|
@@ -29,23 +25,21 @@ export declare const alertTheme: import("tailwind-variants").TVReturnType<{
|
|
|
29
25
|
content: string;
|
|
30
26
|
title: string;
|
|
31
27
|
description: string;
|
|
28
|
+
/** Buttons or links under the body — "Retry", "Undo", "View invoice". */
|
|
29
|
+
actions: string;
|
|
32
30
|
close: string;
|
|
33
31
|
}, undefined, {
|
|
34
32
|
variant: {
|
|
35
33
|
info: {
|
|
36
|
-
root: string;
|
|
37
34
|
icon: string;
|
|
38
35
|
};
|
|
39
36
|
success: {
|
|
40
|
-
root: string;
|
|
41
37
|
icon: string;
|
|
42
38
|
};
|
|
43
39
|
warning: {
|
|
44
|
-
root: string;
|
|
45
40
|
icon: string;
|
|
46
41
|
};
|
|
47
42
|
danger: {
|
|
48
|
-
root: string;
|
|
49
43
|
icon: string;
|
|
50
44
|
};
|
|
51
45
|
};
|
|
@@ -61,23 +55,21 @@ export declare const alertTheme: import("tailwind-variants").TVReturnType<{
|
|
|
61
55
|
content: string;
|
|
62
56
|
title: string;
|
|
63
57
|
description: string;
|
|
58
|
+
/** Buttons or links under the body — "Retry", "Undo", "View invoice". */
|
|
59
|
+
actions: string;
|
|
64
60
|
close: string;
|
|
65
61
|
}, import("tailwind-variants").TVReturnType<{
|
|
66
62
|
variant: {
|
|
67
63
|
info: {
|
|
68
|
-
root: string;
|
|
69
64
|
icon: string;
|
|
70
65
|
};
|
|
71
66
|
success: {
|
|
72
|
-
root: string;
|
|
73
67
|
icon: string;
|
|
74
68
|
};
|
|
75
69
|
warning: {
|
|
76
|
-
root: string;
|
|
77
70
|
icon: string;
|
|
78
71
|
};
|
|
79
72
|
danger: {
|
|
80
|
-
root: string;
|
|
81
73
|
icon: string;
|
|
82
74
|
};
|
|
83
75
|
};
|
|
@@ -93,6 +85,8 @@ export declare const alertTheme: import("tailwind-variants").TVReturnType<{
|
|
|
93
85
|
content: string;
|
|
94
86
|
title: string;
|
|
95
87
|
description: string;
|
|
88
|
+
/** Buttons or links under the body — "Retry", "Undo", "View invoice". */
|
|
89
|
+
actions: string;
|
|
96
90
|
close: string;
|
|
97
91
|
}, undefined, unknown, unknown, undefined>>;
|
|
98
92
|
export type AlertSlots = keyof ReturnType<typeof alertTheme>;
|