beez-ui 0.4.2 → 0.5.1
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/CHANGELOG.md +35 -27
- package/README.md +28 -5
- package/dist/adapters/unpic-image.js +92 -14
- package/dist/components/alert-dialog.js +444 -26
- package/dist/components/alert.js +153 -18
- package/dist/components/animated-theme-toggler.js +215 -76
- package/dist/components/avatar.js +247 -15
- package/dist/components/badge.js +18 -16
- package/dist/components/button.js +85 -28
- package/dist/components/calendar.js +327 -68
- package/dist/components/card.js +39 -9
- package/dist/components/carousel.js +454 -84
- package/dist/components/checkbox.js +50 -3
- package/dist/components/data-table.js +827 -583
- package/dist/components/dialog.js +363 -22
- package/dist/components/dropdown-menu.d.ts +1 -0
- package/dist/components/dropdown-menu.js +544 -32
- package/dist/components/filter-query-bar.js +809 -468
- package/dist/components/filter-query-grammar.js +781 -736
- package/dist/components/form.js +305 -43
- package/dist/components/highlighter.js +142 -87
- package/dist/components/hover-card.js +97 -7
- package/dist/components/input-group.js +261 -41
- package/dist/components/input.js +8 -2
- package/dist/components/label.js +38 -3
- package/dist/components/link.js +45 -7
- package/dist/components/pagination.js +332 -16
- package/dist/components/popover.js +222 -16
- package/dist/components/radio-group.js +85 -5
- package/dist/components/select.js +451 -22
- package/dist/components/separator.js +43 -3
- package/dist/components/sheet.js +345 -22
- package/dist/components/sidebar.js +1385 -193
- package/dist/components/skeleton.js +6 -2
- package/dist/components/svgs/whatsappIcon.js +11 -1
- package/dist/components/switch.js +55 -3
- package/dist/components/table.js +288 -18
- package/dist/components/tabs.js +161 -18
- package/dist/components/textarea.js +7 -2
- package/dist/components/themed-toaster.js +63 -20
- package/dist/components/tooltip.js +128 -9
- package/dist/components/typing-animation.js +335 -150
- package/dist/constants/sidebar.js +1 -4
- package/dist/hooks/use-mobile.js +8 -8
- package/dist/hooks/use-sidebar-persistence.js +27 -27
- package/dist/lib/image-dimensions.js +2 -2
- package/dist/lib/year-month-filter.js +38 -40
- package/dist/next.js +69 -17
- package/dist/providers/beez-ui-provider.js +48 -7
- package/dist/providers/native-provider.js +40 -6
- package/dist/styles.css +1 -1
- package/dist/tanstack.js +35 -23
- package/package.json +4 -1
|
@@ -1,37 +1,94 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { Slot } from "radix-ui";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
12
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
14
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
15
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
21
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
22
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
23
|
+
icon: "size-8",
|
|
24
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
26
|
+
"icon-lg": "size-9"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
32
33
|
});
|
|
33
|
-
function Button(
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
function Button(t0) {
|
|
35
|
+
const $ = _c(16);
|
|
36
|
+
let className;
|
|
37
|
+
let props;
|
|
38
|
+
let t1;
|
|
39
|
+
let t2;
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[0] !== t0) {
|
|
42
|
+
({className, variant: t1, size: t2, asChild: t3, ...props} = t0);
|
|
43
|
+
$[0] = t0;
|
|
44
|
+
$[1] = className;
|
|
45
|
+
$[2] = props;
|
|
46
|
+
$[3] = t1;
|
|
47
|
+
$[4] = t2;
|
|
48
|
+
$[5] = t3;
|
|
49
|
+
} else {
|
|
50
|
+
className = $[1];
|
|
51
|
+
props = $[2];
|
|
52
|
+
t1 = $[3];
|
|
53
|
+
t2 = $[4];
|
|
54
|
+
t3 = $[5];
|
|
55
|
+
}
|
|
56
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
57
|
+
const size = t2 === undefined ? "default" : t2;
|
|
58
|
+
const asChild = t3 === undefined ? false : t3;
|
|
59
|
+
const Comp = asChild ? Slot.Root : ButtonPrimitive;
|
|
60
|
+
let t4;
|
|
61
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
62
|
+
t4 = cn(buttonVariants({
|
|
63
|
+
variant,
|
|
64
|
+
size,
|
|
65
|
+
className
|
|
66
|
+
}));
|
|
67
|
+
$[6] = className;
|
|
68
|
+
$[7] = size;
|
|
69
|
+
$[8] = variant;
|
|
70
|
+
$[9] = t4;
|
|
71
|
+
} else {
|
|
72
|
+
t4 = $[9];
|
|
73
|
+
}
|
|
74
|
+
let t5;
|
|
75
|
+
if ($[10] !== Comp || $[11] !== props || $[12] !== size || $[13] !== t4 || $[14] !== variant) {
|
|
76
|
+
t5 = /* @__PURE__ */ _jsx(Comp, {
|
|
77
|
+
"data-slot": "button",
|
|
78
|
+
"data-variant": variant,
|
|
79
|
+
"data-size": size,
|
|
80
|
+
className: t4,
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
$[10] = Comp;
|
|
84
|
+
$[11] = props;
|
|
85
|
+
$[12] = size;
|
|
86
|
+
$[13] = t4;
|
|
87
|
+
$[14] = variant;
|
|
88
|
+
$[15] = t5;
|
|
89
|
+
} else {
|
|
90
|
+
t5 = $[15];
|
|
91
|
+
}
|
|
92
|
+
return t5;
|
|
36
93
|
}
|
|
37
94
|
export { Button, buttonVariants };
|
|
@@ -1,77 +1,336 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { es } from "react-day-picker/locale";
|
|
5
|
-
import { DayPicker, getDefaultClassNames
|
|
5
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
7
|
import { Button, buttonVariants } from "./button.js";
|
|
8
8
|
import { ChevronLeft, ChevronRight, ChevronDown } from "lucide-react";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
function Calendar(t0) {
|
|
11
|
+
const $ = _c(57);
|
|
12
|
+
let className;
|
|
13
|
+
let classNames;
|
|
14
|
+
let components;
|
|
15
|
+
let formatters;
|
|
16
|
+
let props;
|
|
17
|
+
let t1;
|
|
18
|
+
let t2;
|
|
19
|
+
let t3;
|
|
20
|
+
let t4;
|
|
21
|
+
if ($[0] !== t0) {
|
|
22
|
+
({className, classNames, showOutsideDays: t1, captionLayout: t2, buttonVariant: t3, locale: t4, formatters, components, ...props} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = className;
|
|
25
|
+
$[2] = classNames;
|
|
26
|
+
$[3] = components;
|
|
27
|
+
$[4] = formatters;
|
|
28
|
+
$[5] = props;
|
|
29
|
+
$[6] = t1;
|
|
30
|
+
$[7] = t2;
|
|
31
|
+
$[8] = t3;
|
|
32
|
+
$[9] = t4;
|
|
33
|
+
} else {
|
|
34
|
+
className = $[1];
|
|
35
|
+
classNames = $[2];
|
|
36
|
+
components = $[3];
|
|
37
|
+
formatters = $[4];
|
|
38
|
+
props = $[5];
|
|
39
|
+
t1 = $[6];
|
|
40
|
+
t2 = $[7];
|
|
41
|
+
t3 = $[8];
|
|
42
|
+
t4 = $[9];
|
|
43
|
+
}
|
|
44
|
+
const showOutsideDays = t1 === undefined ? true : t1;
|
|
45
|
+
const captionLayout = t2 === undefined ? "label" : t2;
|
|
46
|
+
const buttonVariant = t3 === undefined ? "ghost" : t3;
|
|
47
|
+
const locale = t4 === undefined ? es : t4;
|
|
48
|
+
const defaultClassNames = getDefaultClassNames();
|
|
49
|
+
const T0 = DayPicker;
|
|
50
|
+
const t5 = cn("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className);
|
|
51
|
+
let t6;
|
|
52
|
+
if ($[10] !== locale?.code) {
|
|
53
|
+
t6 = (date) => date.toLocaleString(locale?.code, { month: "short" });
|
|
54
|
+
$[10] = locale?.code;
|
|
55
|
+
$[11] = t6;
|
|
56
|
+
} else {
|
|
57
|
+
t6 = $[11];
|
|
58
|
+
}
|
|
59
|
+
let t7;
|
|
60
|
+
if ($[12] !== formatters || $[13] !== t6) {
|
|
61
|
+
t7 = {
|
|
62
|
+
formatMonthDropdown: t6,
|
|
63
|
+
...formatters
|
|
64
|
+
};
|
|
65
|
+
$[12] = formatters;
|
|
66
|
+
$[13] = t6;
|
|
67
|
+
$[14] = t7;
|
|
68
|
+
} else {
|
|
69
|
+
t7 = $[14];
|
|
70
|
+
}
|
|
71
|
+
const t8 = cn("w-fit", defaultClassNames.root);
|
|
72
|
+
const t9 = cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months);
|
|
73
|
+
const t10 = cn("flex w-full flex-col gap-4", defaultClassNames.month);
|
|
74
|
+
const t11 = cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav);
|
|
75
|
+
const t12 = cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous);
|
|
76
|
+
const t13 = cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next);
|
|
77
|
+
const t14 = cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption);
|
|
78
|
+
const t15 = cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns);
|
|
79
|
+
const t16 = cn("relative rounded-(--cell-radius)", defaultClassNames.dropdown_root);
|
|
80
|
+
const t17 = cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown);
|
|
81
|
+
const t18 = cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label);
|
|
82
|
+
const t19 = cn("w-full border-collapse", defaultClassNames.month_grid);
|
|
83
|
+
const t20 = cn("flex", defaultClassNames.weekdays);
|
|
84
|
+
const t21 = cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday);
|
|
85
|
+
const t22 = cn("mt-2 flex w-full", defaultClassNames.week);
|
|
86
|
+
const t23 = cn("w-(--cell-size) select-none", defaultClassNames.week_number_header);
|
|
87
|
+
const t24 = cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number);
|
|
88
|
+
const t25 = cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", defaultClassNames.day);
|
|
89
|
+
const t26 = cn("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", defaultClassNames.range_start);
|
|
90
|
+
const t27 = cn("rounded-none", defaultClassNames.range_middle);
|
|
91
|
+
const t28 = cn("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", defaultClassNames.range_end);
|
|
92
|
+
const t29 = cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today);
|
|
93
|
+
const t30 = cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside);
|
|
94
|
+
const t31 = cn("text-muted-foreground opacity-50", defaultClassNames.disabled);
|
|
95
|
+
const t32 = cn("invisible", defaultClassNames.hidden);
|
|
96
|
+
let t33;
|
|
97
|
+
if ($[15] !== classNames || $[16] !== t10 || $[17] !== t11 || $[18] !== t12 || $[19] !== t13 || $[20] !== t14 || $[21] !== t15 || $[22] !== t16 || $[23] !== t17 || $[24] !== t18 || $[25] !== t19 || $[26] !== t20 || $[27] !== t21 || $[28] !== t22 || $[29] !== t23 || $[30] !== t24 || $[31] !== t25 || $[32] !== t26 || $[33] !== t27 || $[34] !== t28 || $[35] !== t29 || $[36] !== t30 || $[37] !== t31 || $[38] !== t32 || $[39] !== t8 || $[40] !== t9) {
|
|
98
|
+
t33 = {
|
|
99
|
+
root: t8,
|
|
100
|
+
months: t9,
|
|
101
|
+
month: t10,
|
|
102
|
+
nav: t11,
|
|
103
|
+
button_previous: t12,
|
|
104
|
+
button_next: t13,
|
|
105
|
+
month_caption: t14,
|
|
106
|
+
dropdowns: t15,
|
|
107
|
+
dropdown_root: t16,
|
|
108
|
+
dropdown: t17,
|
|
109
|
+
caption_label: t18,
|
|
110
|
+
month_grid: t19,
|
|
111
|
+
weekdays: t20,
|
|
112
|
+
weekday: t21,
|
|
113
|
+
week: t22,
|
|
114
|
+
week_number_header: t23,
|
|
115
|
+
week_number: t24,
|
|
116
|
+
day: t25,
|
|
117
|
+
range_start: t26,
|
|
118
|
+
range_middle: t27,
|
|
119
|
+
range_end: t28,
|
|
120
|
+
today: t29,
|
|
121
|
+
outside: t30,
|
|
122
|
+
disabled: t31,
|
|
123
|
+
hidden: t32,
|
|
124
|
+
...classNames
|
|
125
|
+
};
|
|
126
|
+
$[15] = classNames;
|
|
127
|
+
$[16] = t10;
|
|
128
|
+
$[17] = t11;
|
|
129
|
+
$[18] = t12;
|
|
130
|
+
$[19] = t13;
|
|
131
|
+
$[20] = t14;
|
|
132
|
+
$[21] = t15;
|
|
133
|
+
$[22] = t16;
|
|
134
|
+
$[23] = t17;
|
|
135
|
+
$[24] = t18;
|
|
136
|
+
$[25] = t19;
|
|
137
|
+
$[26] = t20;
|
|
138
|
+
$[27] = t21;
|
|
139
|
+
$[28] = t22;
|
|
140
|
+
$[29] = t23;
|
|
141
|
+
$[30] = t24;
|
|
142
|
+
$[31] = t25;
|
|
143
|
+
$[32] = t26;
|
|
144
|
+
$[33] = t27;
|
|
145
|
+
$[34] = t28;
|
|
146
|
+
$[35] = t29;
|
|
147
|
+
$[36] = t30;
|
|
148
|
+
$[37] = t31;
|
|
149
|
+
$[38] = t32;
|
|
150
|
+
$[39] = t8;
|
|
151
|
+
$[40] = t9;
|
|
152
|
+
$[41] = t33;
|
|
153
|
+
} else {
|
|
154
|
+
t33 = $[41];
|
|
155
|
+
}
|
|
156
|
+
let t34;
|
|
157
|
+
if ($[42] !== locale) {
|
|
158
|
+
t34 = (t35) => {
|
|
159
|
+
const { ...props_2 } = t35;
|
|
160
|
+
return /* @__PURE__ */ _jsx(CalendarDayButton, {
|
|
161
|
+
locale,
|
|
162
|
+
...props_2
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
$[42] = locale;
|
|
166
|
+
$[43] = t34;
|
|
167
|
+
} else {
|
|
168
|
+
t34 = $[43];
|
|
169
|
+
}
|
|
170
|
+
let t35;
|
|
171
|
+
if ($[44] !== components || $[45] !== t34) {
|
|
172
|
+
t35 = {
|
|
173
|
+
Root: _temp,
|
|
174
|
+
Chevron: _temp2,
|
|
175
|
+
DayButton: t34,
|
|
176
|
+
WeekNumber: _temp3,
|
|
177
|
+
...components
|
|
178
|
+
};
|
|
179
|
+
$[44] = components;
|
|
180
|
+
$[45] = t34;
|
|
181
|
+
$[46] = t35;
|
|
182
|
+
} else {
|
|
183
|
+
t35 = $[46];
|
|
184
|
+
}
|
|
185
|
+
let t36;
|
|
186
|
+
if ($[47] !== T0 || $[48] !== captionLayout || $[49] !== locale || $[50] !== props || $[51] !== showOutsideDays || $[52] !== t33 || $[53] !== t35 || $[54] !== t5 || $[55] !== t7) {
|
|
187
|
+
t36 = /* @__PURE__ */ _jsx(T0, {
|
|
188
|
+
showOutsideDays,
|
|
189
|
+
className: t5,
|
|
190
|
+
captionLayout,
|
|
191
|
+
locale,
|
|
192
|
+
formatters: t7,
|
|
193
|
+
classNames: t33,
|
|
194
|
+
components: t35,
|
|
195
|
+
...props
|
|
196
|
+
});
|
|
197
|
+
$[47] = T0;
|
|
198
|
+
$[48] = captionLayout;
|
|
199
|
+
$[49] = locale;
|
|
200
|
+
$[50] = props;
|
|
201
|
+
$[51] = showOutsideDays;
|
|
202
|
+
$[52] = t33;
|
|
203
|
+
$[53] = t35;
|
|
204
|
+
$[54] = t5;
|
|
205
|
+
$[55] = t7;
|
|
206
|
+
$[56] = t36;
|
|
207
|
+
} else {
|
|
208
|
+
t36 = $[56];
|
|
209
|
+
}
|
|
210
|
+
return t36;
|
|
211
|
+
}
|
|
212
|
+
function _temp3(t0) {
|
|
213
|
+
const { children, ...props_3 } = t0;
|
|
214
|
+
return /* @__PURE__ */ _jsx("td", {
|
|
215
|
+
...props_3,
|
|
216
|
+
children: /* @__PURE__ */ _jsx("div", {
|
|
217
|
+
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
218
|
+
children
|
|
219
|
+
})
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function _temp2(t0) {
|
|
223
|
+
const { className: className_1, orientation, ...props_1 } = t0;
|
|
224
|
+
if (orientation === "left") {
|
|
225
|
+
return /* @__PURE__ */ _jsx(ChevronLeft, {
|
|
226
|
+
className: cn("size-4", className_1),
|
|
227
|
+
...props_1
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
if (orientation === "right") {
|
|
231
|
+
return /* @__PURE__ */ _jsx(ChevronRight, {
|
|
232
|
+
className: cn("size-4", className_1),
|
|
233
|
+
...props_1
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return /* @__PURE__ */ _jsx(ChevronDown, {
|
|
237
|
+
className: cn("size-4", className_1),
|
|
238
|
+
...props_1
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function _temp(t0) {
|
|
242
|
+
const { className: className_0, rootRef, ...props_0 } = t0;
|
|
243
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
244
|
+
"data-slot": "calendar",
|
|
245
|
+
ref: rootRef,
|
|
246
|
+
className: cn(className_0),
|
|
247
|
+
...props_0
|
|
248
|
+
});
|
|
64
249
|
}
|
|
65
|
-
function CalendarDayButton(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
250
|
+
function CalendarDayButton(t0) {
|
|
251
|
+
const $ = _c(21);
|
|
252
|
+
let className;
|
|
253
|
+
let day;
|
|
254
|
+
let locale;
|
|
255
|
+
let modifiers;
|
|
256
|
+
let props;
|
|
257
|
+
if ($[0] !== t0) {
|
|
258
|
+
({className, day, modifiers, locale, ...props} = t0);
|
|
259
|
+
$[0] = t0;
|
|
260
|
+
$[1] = className;
|
|
261
|
+
$[2] = day;
|
|
262
|
+
$[3] = locale;
|
|
263
|
+
$[4] = modifiers;
|
|
264
|
+
$[5] = props;
|
|
265
|
+
} else {
|
|
266
|
+
className = $[1];
|
|
267
|
+
day = $[2];
|
|
268
|
+
locale = $[3];
|
|
269
|
+
modifiers = $[4];
|
|
270
|
+
props = $[5];
|
|
271
|
+
}
|
|
272
|
+
const defaultClassNames = getDefaultClassNames();
|
|
273
|
+
const ref = React.useRef(null);
|
|
274
|
+
let t1;
|
|
275
|
+
let t2;
|
|
276
|
+
if ($[6] !== modifiers.focused) {
|
|
277
|
+
t1 = () => {
|
|
278
|
+
if (modifiers.focused) {
|
|
279
|
+
ref.current?.focus();
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
t2 = [modifiers.focused];
|
|
283
|
+
$[6] = modifiers.focused;
|
|
284
|
+
$[7] = t1;
|
|
285
|
+
$[8] = t2;
|
|
286
|
+
} else {
|
|
287
|
+
t1 = $[7];
|
|
288
|
+
t2 = $[8];
|
|
289
|
+
}
|
|
290
|
+
React.useEffect(t1, t2);
|
|
291
|
+
const T0 = Button;
|
|
292
|
+
const t3 = "ghost";
|
|
293
|
+
const t4 = "icon";
|
|
294
|
+
let t5;
|
|
295
|
+
if ($[9] !== day.date || $[10] !== locale?.code) {
|
|
296
|
+
t5 = day.date.toLocaleDateString(locale?.code);
|
|
297
|
+
$[9] = day.date;
|
|
298
|
+
$[10] = locale?.code;
|
|
299
|
+
$[11] = t5;
|
|
300
|
+
} else {
|
|
301
|
+
t5 = $[11];
|
|
302
|
+
}
|
|
303
|
+
const t6 = modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle;
|
|
304
|
+
const t7 = modifiers.range_start;
|
|
305
|
+
const t8 = modifiers.range_end;
|
|
306
|
+
const t9 = modifiers.range_middle;
|
|
307
|
+
const t10 = cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className);
|
|
308
|
+
let t11;
|
|
309
|
+
if ($[12] !== T0 || $[13] !== modifiers.range_end || $[14] !== modifiers.range_middle || $[15] !== modifiers.range_start || $[16] !== props || $[17] !== t10 || $[18] !== t5 || $[19] !== t6) {
|
|
310
|
+
t11 = /* @__PURE__ */ _jsx(T0, {
|
|
311
|
+
ref,
|
|
312
|
+
variant: t3,
|
|
313
|
+
size: t4,
|
|
314
|
+
"data-day": t5,
|
|
315
|
+
"data-selected-single": t6,
|
|
316
|
+
"data-range-start": t7,
|
|
317
|
+
"data-range-end": t8,
|
|
318
|
+
"data-range-middle": t9,
|
|
319
|
+
className: t10,
|
|
320
|
+
...props
|
|
321
|
+
});
|
|
322
|
+
$[12] = T0;
|
|
323
|
+
$[13] = modifiers.range_end;
|
|
324
|
+
$[14] = modifiers.range_middle;
|
|
325
|
+
$[15] = modifiers.range_start;
|
|
326
|
+
$[16] = props;
|
|
327
|
+
$[17] = t10;
|
|
328
|
+
$[18] = t5;
|
|
329
|
+
$[19] = t6;
|
|
330
|
+
$[20] = t11;
|
|
331
|
+
} else {
|
|
332
|
+
t11 = $[20];
|
|
333
|
+
}
|
|
334
|
+
return t11;
|
|
76
335
|
}
|
|
77
336
|
export { Calendar, CalendarDayButton };
|
package/dist/components/card.js
CHANGED
|
@@ -1,24 +1,54 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
function Card({ className, size = "default", ...props }) {
|
|
4
|
-
|
|
5
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
6
|
+
"data-slot": "card",
|
|
7
|
+
"data-size": size,
|
|
8
|
+
className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
5
11
|
}
|
|
6
12
|
function CardHeader({ className, ...props }) {
|
|
7
|
-
|
|
13
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
14
|
+
"data-slot": "card-header",
|
|
15
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
8
18
|
}
|
|
9
19
|
function CardTitle({ className, ...props }) {
|
|
10
|
-
|
|
20
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
21
|
+
"data-slot": "card-title",
|
|
22
|
+
className: cn("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
11
25
|
}
|
|
12
26
|
function CardDescription({ className, ...props }) {
|
|
13
|
-
|
|
27
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
28
|
+
"data-slot": "card-description",
|
|
29
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
14
32
|
}
|
|
15
33
|
function CardAction({ className, ...props }) {
|
|
16
|
-
|
|
34
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
35
|
+
"data-slot": "card-action",
|
|
36
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
17
39
|
}
|
|
18
40
|
function CardContent({ className, ...props }) {
|
|
19
|
-
|
|
41
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
42
|
+
"data-slot": "card-content",
|
|
43
|
+
className: cn("px-4 group-data-[size=sm]/card:px-3", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
20
46
|
}
|
|
21
47
|
function CardFooter({ className, ...props }) {
|
|
22
|
-
|
|
48
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
49
|
+
"data-slot": "card-footer",
|
|
50
|
+
className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
23
53
|
}
|
|
24
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent
|
|
54
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|