@inspirare/design-system 0.0.22 → 0.0.24
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 +82 -61
- package/dist/book-logo-filled.svg +55 -0
- package/dist/components/ui/accessibility-improvements.js +26 -23
- package/dist/components/ui/accordion.js +34 -24
- package/dist/components/ui/alert-dialog.js +91 -57
- package/dist/components/ui/alert.js +38 -26
- package/dist/components/ui/aspect-ratio.js +11 -3
- package/dist/components/ui/avatar.js +30 -8
- package/dist/components/ui/badge.js +20 -14
- package/dist/components/ui/breadcrumb.js +69 -56
- package/dist/components/ui/button-group.js +17 -13
- package/dist/components/ui/button.js +19 -15
- package/dist/components/ui/calendar.js +63 -59
- package/dist/components/ui/card.js +11 -9
- package/dist/components/ui/carousel.js +70 -75
- package/dist/components/ui/chart.js +75 -72
- package/dist/components/ui/checkbox.js +4 -5
- package/dist/components/ui/collapsible.js +12 -14
- package/dist/components/ui/color-picker.js +60 -80
- package/dist/components/ui/combobox.js +153 -33
- package/dist/components/ui/command.js +50 -48
- package/dist/components/ui/context-menu.js +129 -68
- package/dist/components/ui/dialog.js +65 -60
- package/dist/components/ui/drawer.js +81 -40
- package/dist/components/ui/dropdown-menu.js +100 -87
- package/dist/components/ui/empty.js +7 -6
- package/dist/components/ui/field.js +44 -47
- package/dist/components/ui/form.js +22 -23
- package/dist/components/ui/hover-card.js +14 -11
- package/dist/components/ui/input-group.js +16 -13
- package/dist/components/ui/input-otp.js +37 -32
- package/dist/components/ui/input.js +9 -7
- package/dist/components/ui/item.js +42 -36
- package/dist/components/ui/kbd.js +2 -1
- package/dist/components/ui/label.js +6 -7
- package/dist/components/ui/menubar.js +124 -93
- package/dist/components/ui/navigation-menu.js +79 -54
- package/dist/components/ui/pagination.js +78 -58
- package/dist/components/ui/popover.js +35 -16
- package/dist/components/ui/progress.js +37 -13
- package/dist/components/ui/radio-group.js +14 -14
- package/dist/components/ui/resizable.js +24 -15
- package/dist/components/ui/scroll-area.js +29 -11
- package/dist/components/ui/select.js +98 -56
- package/dist/components/ui/separator.js +5 -7
- package/dist/components/ui/sheet.js +47 -42
- package/dist/components/ui/sidebar.js +279 -248
- package/dist/components/ui/skeleton.js +4 -40
- package/dist/components/ui/slider.js +27 -29
- package/dist/components/ui/sonner.js +27 -10
- package/dist/components/ui/spinner.js +2 -0
- package/dist/components/ui/switch.js +3 -4
- package/dist/components/ui/table.js +6 -6
- package/dist/components/ui/tabs.js +45 -22
- package/dist/components/ui/textarea.js +3 -2
- package/dist/components/ui/theme-toggle.js +38 -41
- package/dist/components/ui/toggle-group.js +30 -21
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/tooltip.js +28 -23
- package/dist/index.css +1 -1
- package/dist/index.d.ts +446 -468
- package/dist/index.js +58 -58
- package/package.json +42 -41
- package/src/App.tsx +28 -34
- package/src/components/branding/assets/book-logo-filled.svg +55 -0
- package/src/components/branding/logo/logo.tsx +56 -0
- package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
- package/src/components/ui/accessibility-improvements.test.tsx +13 -0
- package/src/components/ui/accessibility-improvements.tsx +16 -6
- package/src/components/ui/accordion.stories.tsx +19 -0
- package/src/components/ui/accordion.test.tsx +14 -0
- package/src/components/ui/accordion.tsx +28 -20
- package/src/components/ui/alert-dialog.stories.tsx +19 -0
- package/src/components/ui/alert-dialog.test.tsx +14 -0
- package/src/components/ui/alert-dialog.tsx +159 -123
- package/src/components/ui/alert.stories.tsx +19 -0
- package/src/components/ui/alert.test.tsx +14 -0
- package/src/components/ui/alert.tsx +60 -41
- package/src/components/ui/aspect-ratio.stories.tsx +19 -0
- package/src/components/ui/aspect-ratio.test.tsx +14 -0
- package/src/components/ui/aspect-ratio.tsx +19 -2
- package/src/components/ui/attachment.stories.tsx +19 -0
- package/src/components/ui/attachment.test.tsx +14 -0
- package/src/components/ui/attachment.tsx +209 -0
- package/src/components/ui/avatar.stories.tsx +19 -0
- package/src/components/ui/avatar.test.tsx +14 -0
- package/src/components/ui/avatar.tsx +73 -17
- package/src/components/ui/badge.stories.tsx +19 -0
- package/src/components/ui/badge.test.tsx +14 -0
- package/src/components/ui/badge.tsx +33 -25
- package/src/components/ui/breadcrumb.stories.tsx +19 -0
- package/src/components/ui/breadcrumb.test.tsx +14 -0
- package/src/components/ui/breadcrumb.tsx +98 -86
- package/src/components/ui/bubble.stories.tsx +19 -0
- package/src/components/ui/bubble.test.tsx +14 -0
- package/src/components/ui/bubble.tsx +130 -0
- package/src/components/ui/button-group.stories.tsx +19 -0
- package/src/components/ui/button-group.test.tsx +14 -0
- package/src/components/ui/button-group.tsx +26 -20
- package/src/components/ui/button.stories.tsx +19 -0
- package/src/components/ui/button.test.tsx +14 -0
- package/src/components/ui/button.tsx +30 -31
- package/src/components/ui/calendar.stories.tsx +19 -0
- package/src/components/ui/calendar.test.tsx +14 -0
- package/src/components/ui/calendar.tsx +28 -26
- package/src/components/ui/card.stories.tsx +19 -0
- package/src/components/ui/card.test.tsx +14 -0
- package/src/components/ui/card.tsx +30 -17
- package/src/components/ui/carousel.stories.tsx +19 -0
- package/src/components/ui/carousel.test.tsx +14 -0
- package/src/components/ui/carousel.tsx +115 -135
- package/src/components/ui/chart.stories.tsx +18 -0
- package/src/components/ui/chart.test.tsx +13 -0
- package/src/components/ui/chart.tsx +220 -216
- package/src/components/ui/checkbox.stories.tsx +19 -0
- package/src/components/ui/checkbox.test.tsx +14 -0
- package/src/components/ui/checkbox.tsx +7 -10
- package/src/components/ui/collapsible.stories.tsx +19 -0
- package/src/components/ui/collapsible.test.tsx +14 -0
- package/src/components/ui/collapsible.tsx +11 -26
- package/src/components/ui/color-picker.stories.tsx +19 -0
- package/src/components/ui/color-picker.test.tsx +14 -0
- package/src/components/ui/color-picker.tsx +36 -26
- package/src/components/ui/combobox.stories.tsx +19 -0
- package/src/components/ui/combobox.test.tsx +14 -0
- package/src/components/ui/combobox.tsx +281 -96
- package/src/components/ui/command.stories.tsx +19 -0
- package/src/components/ui/command.test.tsx +14 -0
- package/src/components/ui/command.tsx +59 -47
- package/src/components/ui/context-menu.stories.tsx +19 -0
- package/src/components/ui/context-menu.test.tsx +14 -0
- package/src/components/ui/context-menu.tsx +231 -160
- package/src/components/ui/dialog.stories.tsx +19 -0
- package/src/components/ui/dialog.test.tsx +14 -0
- package/src/components/ui/dialog.tsx +81 -72
- package/src/components/ui/direction.stories.tsx +19 -0
- package/src/components/ui/direction.test.tsx +14 -0
- package/src/components/ui/direction.tsx +6 -0
- package/src/components/ui/drawer.stories.tsx +19 -0
- package/src/components/ui/drawer.test.tsx +14 -0
- package/src/components/ui/drawer.tsx +143 -64
- package/src/components/ui/dropdown-menu.stories.tsx +19 -0
- package/src/components/ui/dropdown-menu.test.tsx +14 -0
- package/src/components/ui/dropdown-menu.tsx +199 -153
- package/src/components/ui/empty.stories.tsx +18 -0
- package/src/components/ui/empty.test.tsx +13 -0
- package/src/components/ui/empty.tsx +11 -9
- package/src/components/ui/field.stories.tsx +18 -0
- package/src/components/ui/field.test.tsx +13 -0
- package/src/components/ui/field.tsx +26 -32
- package/src/components/ui/form.stories.tsx +22 -0
- package/src/components/ui/form.test.tsx +15 -0
- package/src/components/ui/form.tsx +1 -2
- package/src/components/ui/hover-card.stories.tsx +19 -0
- package/src/components/ui/hover-card.test.tsx +14 -0
- package/src/components/ui/hover-card.tsx +34 -32
- package/src/components/ui/input-group.stories.tsx +18 -0
- package/src/components/ui/input-group.test.tsx +13 -0
- package/src/components/ui/input-group.tsx +21 -28
- package/src/components/ui/input-otp.stories.tsx +19 -0
- package/src/components/ui/input-otp.test.tsx +14 -0
- package/src/components/ui/input-otp.tsx +58 -42
- package/src/components/ui/input.stories.tsx +19 -0
- package/src/components/ui/input.test.tsx +14 -0
- package/src/components/ui/input.tsx +9 -8
- package/src/components/ui/item.stories.tsx +18 -0
- package/src/components/ui/item.test.tsx +13 -0
- package/src/components/ui/item.tsx +38 -28
- package/src/components/ui/kbd.stories.tsx +18 -0
- package/src/components/ui/kbd.test.tsx +13 -0
- package/src/components/ui/kbd.tsx +3 -3
- package/src/components/ui/label.stories.tsx +18 -0
- package/src/components/ui/label.test.tsx +13 -0
- package/src/components/ui/label.tsx +7 -11
- package/src/components/ui/marker.stories.tsx +19 -0
- package/src/components/ui/marker.test.tsx +14 -0
- package/src/components/ui/marker.tsx +73 -0
- package/src/components/ui/menubar.stories.tsx +19 -0
- package/src/components/ui/menubar.test.tsx +14 -0
- package/src/components/ui/menubar.tsx +226 -202
- package/src/components/ui/message-scroller.stories.tsx +19 -0
- package/src/components/ui/message-scroller.test.tsx +14 -0
- package/src/components/ui/message-scroller.tsx +131 -0
- package/src/components/ui/message.stories.tsx +19 -0
- package/src/components/ui/message.test.tsx +14 -0
- package/src/components/ui/message.tsx +94 -0
- package/src/components/ui/native-select.stories.tsx +18 -0
- package/src/components/ui/native-select.test.tsx +13 -0
- package/src/components/ui/native-select.tsx +63 -0
- package/src/components/ui/navigation-menu.stories.tsx +19 -0
- package/src/components/ui/navigation-menu.test.tsx +14 -0
- package/src/components/ui/navigation-menu.tsx +145 -103
- package/src/components/ui/pagination.stories.tsx +19 -0
- package/src/components/ui/pagination.test.tsx +14 -0
- package/src/components/ui/pagination.tsx +114 -83
- package/src/components/ui/popover.stories.tsx +19 -0
- package/src/components/ui/popover.test.tsx +14 -0
- package/src/components/ui/popover.tsx +68 -33
- package/src/components/ui/progress.stories.tsx +19 -0
- package/src/components/ui/progress.test.tsx +14 -0
- package/src/components/ui/progress.tsx +67 -15
- package/src/components/ui/questionnaire.stories.tsx +19 -0
- package/src/components/ui/questionnaire.test.tsx +14 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.stories.tsx +19 -0
- package/src/components/ui/radio-group.test.tsx +14 -0
- package/src/components/ui/radio-group.tsx +15 -20
- package/src/components/ui/resizable.stories.tsx +19 -0
- package/src/components/ui/resizable.test.tsx +14 -0
- package/src/components/ui/resizable.tsx +37 -30
- package/src/components/ui/scroll-area.stories.tsx +19 -0
- package/src/components/ui/scroll-area.test.tsx +14 -0
- package/src/components/ui/scroll-area.tsx +41 -19
- package/src/components/ui/select.stories.tsx +19 -0
- package/src/components/ui/select.test.tsx +14 -0
- package/src/components/ui/select.tsx +145 -78
- package/src/components/ui/separator.stories.tsx +19 -0
- package/src/components/ui/separator.test.tsx +14 -0
- package/src/components/ui/separator.tsx +8 -11
- package/src/components/ui/sheet.stories.tsx +19 -0
- package/src/components/ui/sheet.test.tsx +14 -0
- package/src/components/ui/sheet.tsx +56 -71
- package/src/components/ui/sidebar.stories.tsx +18 -0
- package/src/components/ui/sidebar.test.tsx +13 -0
- package/src/components/ui/sidebar.tsx +469 -513
- package/src/components/ui/skeleton.stories.tsx +19 -0
- package/src/components/ui/skeleton.test.tsx +14 -0
- package/src/components/ui/skeleton.tsx +8 -114
- package/src/components/ui/slider.stories.tsx +19 -0
- package/src/components/ui/slider.test.tsx +14 -0
- package/src/components/ui/slider.tsx +31 -40
- package/src/components/ui/sonner.stories.tsx +19 -0
- package/src/components/ui/sonner.test.tsx +14 -0
- package/src/components/ui/sonner.tsx +39 -7
- package/src/components/ui/spinner.stories.tsx +18 -0
- package/src/components/ui/spinner.test.tsx +13 -0
- package/src/components/ui/spinner.tsx +3 -7
- package/src/components/ui/switch.stories.tsx +19 -0
- package/src/components/ui/switch.test.tsx +14 -0
- package/src/components/ui/switch.tsx +4 -7
- package/src/components/ui/table.stories.tsx +19 -0
- package/src/components/ui/table.test.tsx +14 -0
- package/src/components/ui/table.tsx +17 -17
- package/src/components/ui/tabs.stories.tsx +19 -0
- package/src/components/ui/tabs.test.tsx +14 -0
- package/src/components/ui/tabs.tsx +71 -31
- package/src/components/ui/textarea.stories.tsx +19 -0
- package/src/components/ui/textarea.test.tsx +14 -0
- package/src/components/ui/textarea.tsx +7 -5
- package/src/components/ui/theme-toggle.stories.tsx +18 -0
- package/src/components/ui/theme-toggle.test.tsx +13 -0
- package/src/components/ui/theme-toggle.tsx +35 -37
- package/src/components/ui/toggle-group.stories.tsx +19 -0
- package/src/components/ui/toggle-group.test.tsx +14 -0
- package/src/components/ui/toggle-group.tsx +41 -25
- package/src/components/ui/toggle.stories.tsx +19 -0
- package/src/components/ui/toggle.test.tsx +14 -0
- package/src/components/ui/toggle.tsx +17 -19
- package/src/components/ui/tooltip.stories.tsx +19 -0
- package/src/components/ui/tooltip.test.tsx +14 -0
- package/src/components/ui/tooltip.tsx +53 -44
- package/src/demo/AIDemo.tsx +50 -0
- package/src/demo/ButtonsDemo.tsx +41 -18
- package/src/demo/CalendarDemo.tsx +1 -1
- package/src/demo/FeedbackDemo.tsx +4 -6
- package/src/demo/FormsDemo.tsx +34 -11
- package/src/demo/NavigationDemo.tsx +38 -13
- package/src/demo/OverlaysDemo.tsx +22 -36
- package/src/demo/update-demos.js +82 -0
- package/src/index.css +66 -46
- package/src/lib/utils.ts +3 -3
- package/src/stories/Button.stories.ts +54 -0
- package/src/stories/Button.tsx +36 -0
- package/src/stories/Configure.mdx +388 -0
- package/src/stories/Header.stories.ts +34 -0
- package/src/stories/Header.tsx +55 -0
- package/src/stories/Page.stories.ts +33 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
|
@@ -1,32 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { cva as
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { cva as n } from "class-variance-authority";
|
|
5
6
|
//#region src/components/ui/alert.tsx
|
|
6
|
-
var
|
|
7
|
+
var r = n("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
7
8
|
variants: { variant: {
|
|
8
|
-
default: "bg-
|
|
9
|
-
destructive: "
|
|
9
|
+
default: "bg-card text-card-foreground",
|
|
10
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
10
11
|
} },
|
|
11
12
|
defaultVariants: { variant: "default" }
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}))
|
|
18
|
-
a
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
});
|
|
14
|
+
function i({ className: n, variant: i, ...a }) {
|
|
15
|
+
return /* @__PURE__ */ t("div", {
|
|
16
|
+
"data-slot": "alert",
|
|
17
|
+
role: "alert",
|
|
18
|
+
className: e(r({ variant: i }), n),
|
|
19
|
+
...a
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function a({ className: n, ...r }) {
|
|
23
|
+
return /* @__PURE__ */ t("div", {
|
|
24
|
+
"data-slot": "alert-title",
|
|
25
|
+
className: e("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", n),
|
|
26
|
+
...r
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function o({ className: n, ...r }) {
|
|
30
|
+
return /* @__PURE__ */ t("div", {
|
|
31
|
+
"data-slot": "alert-description",
|
|
32
|
+
className: e("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", n),
|
|
33
|
+
...r
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function s({ className: n, ...r }) {
|
|
37
|
+
return /* @__PURE__ */ t("div", {
|
|
38
|
+
"data-slot": "alert-action",
|
|
39
|
+
className: e("absolute top-2 right-2", n),
|
|
40
|
+
...r
|
|
41
|
+
});
|
|
42
|
+
}
|
|
31
43
|
//#endregion
|
|
32
|
-
export {
|
|
44
|
+
export { i as Alert, s as AlertAction, o as AlertDescription, a as AlertTitle };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/ui/aspect-ratio.tsx
|
|
4
|
-
|
|
5
|
+
function n({ ratio: n, className: r, ...i }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
"data-slot": "aspect-ratio",
|
|
8
|
+
style: { "--ratio": n },
|
|
9
|
+
className: e("relative aspect-(--ratio)", r),
|
|
10
|
+
...i
|
|
11
|
+
});
|
|
12
|
+
}
|
|
5
13
|
//#endregion
|
|
6
|
-
export {
|
|
14
|
+
export { n as AspectRatio };
|
|
@@ -1,29 +1,51 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
4
|
+
import "react";
|
|
5
|
+
import { Avatar as n } from "@base-ui/react/avatar";
|
|
6
6
|
//#region src/components/ui/avatar.tsx
|
|
7
|
-
function r({ className: r,
|
|
7
|
+
function r({ className: r, size: i = "default", ...a }) {
|
|
8
8
|
return /* @__PURE__ */ t(n.Root, {
|
|
9
9
|
"data-slot": "avatar",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
"data-size": i,
|
|
11
|
+
className: e("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", r),
|
|
12
|
+
...a
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
15
|
function i({ className: r, ...i }) {
|
|
15
16
|
return /* @__PURE__ */ t(n.Image, {
|
|
16
17
|
"data-slot": "avatar-image",
|
|
17
|
-
className: e("aspect-square size-full", r),
|
|
18
|
+
className: e("aspect-square size-full rounded-full object-cover", r),
|
|
18
19
|
...i
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
function a({ className: r, ...i }) {
|
|
22
23
|
return /* @__PURE__ */ t(n.Fallback, {
|
|
23
24
|
"data-slot": "avatar-fallback",
|
|
24
|
-
className: e("
|
|
25
|
+
className: e("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", r),
|
|
25
26
|
...i
|
|
26
27
|
});
|
|
27
28
|
}
|
|
29
|
+
function o({ className: n, ...r }) {
|
|
30
|
+
return /* @__PURE__ */ t("span", {
|
|
31
|
+
"data-slot": "avatar-badge",
|
|
32
|
+
className: e("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", n),
|
|
33
|
+
...r
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function s({ className: n, ...r }) {
|
|
37
|
+
return /* @__PURE__ */ t("div", {
|
|
38
|
+
"data-slot": "avatar-group",
|
|
39
|
+
className: e("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", n),
|
|
40
|
+
...r
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function c({ className: n, ...r }) {
|
|
44
|
+
return /* @__PURE__ */ t("div", {
|
|
45
|
+
"data-slot": "avatar-group-count",
|
|
46
|
+
className: e("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", n),
|
|
47
|
+
...r
|
|
48
|
+
});
|
|
49
|
+
}
|
|
28
50
|
//#endregion
|
|
29
|
-
export { r as Avatar, a as AvatarFallback, i as AvatarImage };
|
|
51
|
+
export { r as Avatar, o as AvatarBadge, a as AvatarFallback, s as AvatarGroup, c as AvatarGroupCount, i as AvatarImage };
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Slot as r } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as t } from "class-variance-authority";
|
|
4
|
+
import { mergeProps as n } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender as r } from "@base-ui/react/use-render";
|
|
6
6
|
//#region src/components/ui/badge.tsx
|
|
7
|
-
var i =
|
|
7
|
+
var i = t("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
8
8
|
variants: { variant: {
|
|
9
|
-
default: "
|
|
10
|
-
secondary: "
|
|
11
|
-
destructive: "
|
|
12
|
-
outline: "text-foreground [a
|
|
9
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
10
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
11
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
12
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
13
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
14
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
13
15
|
} },
|
|
14
16
|
defaultVariants: { variant: "default" }
|
|
15
17
|
});
|
|
16
|
-
function a({ className:
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
className: e(i({ variant: a }),
|
|
20
|
-
|
|
18
|
+
function a({ className: t, variant: a = "default", render: o, ...s }) {
|
|
19
|
+
return r({
|
|
20
|
+
defaultTagName: "span",
|
|
21
|
+
props: n({ className: e(i({ variant: a }), t) }, s),
|
|
22
|
+
render: o,
|
|
23
|
+
state: {
|
|
24
|
+
slot: "badge",
|
|
25
|
+
variant: a
|
|
26
|
+
}
|
|
21
27
|
});
|
|
22
28
|
}
|
|
23
29
|
//#endregion
|
|
@@ -1,60 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
3
|
+
import { ChevronRightIcon as t, MoreHorizontalIcon as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeProps as a } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender as o } from "@base-ui/react/use-render";
|
|
6
8
|
//#region src/components/ui/breadcrumb.tsx
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
f
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
|
|
9
|
+
function s({ className: t, ...n }) {
|
|
10
|
+
return /* @__PURE__ */ r("nav", {
|
|
11
|
+
"aria-label": "breadcrumb",
|
|
12
|
+
"data-slot": "breadcrumb",
|
|
13
|
+
className: e(t),
|
|
14
|
+
...n
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function c({ className: t, ...n }) {
|
|
18
|
+
return /* @__PURE__ */ r("ol", {
|
|
19
|
+
"data-slot": "breadcrumb-list",
|
|
20
|
+
className: e("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", t),
|
|
21
|
+
...n
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function l({ className: t, ...n }) {
|
|
25
|
+
return /* @__PURE__ */ r("li", {
|
|
26
|
+
"data-slot": "breadcrumb-item",
|
|
27
|
+
className: e("inline-flex items-center gap-1", t),
|
|
28
|
+
...n
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function u({ className: t, render: n, ...r }) {
|
|
32
|
+
return o({
|
|
33
|
+
defaultTagName: "a",
|
|
34
|
+
props: a({ className: e("transition-colors hover:text-foreground", t) }, r),
|
|
35
|
+
render: n,
|
|
36
|
+
state: { slot: "breadcrumb-link" }
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function d({ className: t, ...n }) {
|
|
40
|
+
return /* @__PURE__ */ r("span", {
|
|
41
|
+
"data-slot": "breadcrumb-page",
|
|
42
|
+
role: "link",
|
|
43
|
+
"aria-disabled": "true",
|
|
44
|
+
"aria-current": "page",
|
|
45
|
+
className: e("font-normal text-foreground", t),
|
|
46
|
+
...n
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function f({ children: n, className: i, ...a }) {
|
|
50
|
+
return /* @__PURE__ */ r("li", {
|
|
51
|
+
"data-slot": "breadcrumb-separator",
|
|
52
|
+
role: "presentation",
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
className: e("[&>svg]:size-3.5", i),
|
|
55
|
+
...a,
|
|
56
|
+
children: n ?? /* @__PURE__ */ r(t, {})
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function p({ className: t, ...a }) {
|
|
60
|
+
return /* @__PURE__ */ i("span", {
|
|
61
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
62
|
+
role: "presentation",
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
className: e("flex size-5 items-center justify-center [&>svg]:size-4", t),
|
|
65
|
+
...a,
|
|
66
|
+
children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r("span", {
|
|
67
|
+
className: "sr-only",
|
|
68
|
+
children: "More"
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
59
72
|
//#endregion
|
|
60
73
|
export { s as Breadcrumb, p as BreadcrumbEllipsis, l as BreadcrumbItem, u as BreadcrumbLink, c as BreadcrumbList, d as BreadcrumbPage, f as BreadcrumbSeparator };
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
3
|
import { Separator as t } from "./separator.js";
|
|
3
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
5
|
import { cva as r } from "class-variance-authority";
|
|
5
|
-
import {
|
|
6
|
+
import { mergeProps as i } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender as a } from "@base-ui/react/use-render";
|
|
6
8
|
//#region src/components/ui/button-group.tsx
|
|
7
|
-
var
|
|
9
|
+
var o = r("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
8
10
|
variants: { orientation: {
|
|
9
|
-
horizontal: "[
|
|
10
|
-
vertical: "flex-col [
|
|
11
|
+
horizontal: "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
12
|
+
vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
11
13
|
} },
|
|
12
14
|
defaultVariants: { orientation: "horizontal" }
|
|
13
15
|
});
|
|
14
|
-
function
|
|
16
|
+
function s({ className: t, orientation: r, ...i }) {
|
|
15
17
|
return /* @__PURE__ */ n("div", {
|
|
16
18
|
role: "group",
|
|
17
19
|
"data-slot": "button-group",
|
|
18
20
|
"data-orientation": r,
|
|
19
|
-
className: e(
|
|
21
|
+
className: e(o({ orientation: r }), t),
|
|
20
22
|
...i
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
function c({ className: t, render: n, ...r }) {
|
|
26
|
+
return a({
|
|
27
|
+
defaultTagName: "div",
|
|
28
|
+
props: i({ className: e("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t) }, r),
|
|
29
|
+
render: n,
|
|
30
|
+
state: { slot: "button-group-text" }
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
|
-
function
|
|
33
|
+
function l({ className: r, orientation: i = "vertical", ...a }) {
|
|
30
34
|
return /* @__PURE__ */ n(t, {
|
|
31
35
|
"data-slot": "button-group-separator",
|
|
32
36
|
orientation: i,
|
|
33
|
-
className: e("bg-input
|
|
37
|
+
className: e("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", r),
|
|
34
38
|
...a
|
|
35
39
|
});
|
|
36
40
|
}
|
|
37
41
|
//#endregion
|
|
38
|
-
export {
|
|
42
|
+
export { s as ButtonGroup, l as ButtonGroupSeparator, c as ButtonGroupText, o as buttonGroupVariants };
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { cva as n } from "class-variance-authority";
|
|
5
|
-
import {
|
|
5
|
+
import { Button as r } from "@base-ui/react/button";
|
|
6
6
|
//#region src/components/ui/button.tsx
|
|
7
|
-
var i = n("inline-flex items-center justify-center
|
|
7
|
+
var i = n("group/button inline-flex shrink-0 items-center justify-center cursor-pointer 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:not-aria-[haspopup]: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
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11
|
+
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",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
14
|
+
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",
|
|
15
15
|
link: "text-primary underline-offset-4 hover:underline"
|
|
16
16
|
},
|
|
17
17
|
size: {
|
|
18
|
-
default: "h-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
19
|
+
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",
|
|
20
|
+
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",
|
|
21
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
22
|
+
icon: "size-8",
|
|
23
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
24
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
25
|
+
"icon-lg": "size-9"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
defaultVariants: {
|
|
@@ -26,15 +30,15 @@ var i = n("inline-flex items-center justify-center gap-2 whitespace-nowrap round
|
|
|
26
30
|
size: "default"
|
|
27
31
|
}
|
|
28
32
|
});
|
|
29
|
-
function a({ className: n, variant: a, size: o
|
|
30
|
-
return /* @__PURE__ */ t(
|
|
33
|
+
function a({ className: n, variant: a = "default", size: o = "default", ...s }) {
|
|
34
|
+
return /* @__PURE__ */ t(r, {
|
|
31
35
|
"data-slot": "button",
|
|
32
36
|
className: e(i({
|
|
33
37
|
variant: a,
|
|
34
38
|
size: o,
|
|
35
39
|
className: n
|
|
36
40
|
})),
|
|
37
|
-
...
|
|
41
|
+
...s
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
44
|
//#endregion
|
|
@@ -1,89 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { Button as t, buttonVariants as n } from "./button.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
4
|
+
import { ChevronDownIcon as r, ChevronLeftIcon as i, ChevronRightIcon as a } from "lucide-react";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
import * as s from "react";
|
|
7
7
|
import { DayPicker as c, getDefaultClassNames as l } from "react-day-picker";
|
|
8
|
+
import { ptBR as u } from "date-fns/locale";
|
|
8
9
|
//#region src/components/ui/calendar.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
showOutsideDays:
|
|
13
|
-
className: e("group/calendar bg-background p-
|
|
14
|
-
captionLayout:
|
|
10
|
+
function d({ className: t, classNames: s, showOutsideDays: d = !0, captionLayout: p = "label", buttonVariant: m = "ghost", locale: h = u, formatters: g, components: _, ...v }) {
|
|
11
|
+
let y = l();
|
|
12
|
+
return /* @__PURE__ */ o(c, {
|
|
13
|
+
showOutsideDays: d,
|
|
14
|
+
className: e("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`, t),
|
|
15
|
+
captionLayout: p,
|
|
16
|
+
locale: h,
|
|
15
17
|
formatters: {
|
|
16
|
-
formatMonthDropdown: (e) => e.toLocaleString(
|
|
17
|
-
...
|
|
18
|
+
formatMonthDropdown: (e) => e.toLocaleString(h?.code, { month: "short" }),
|
|
19
|
+
...g
|
|
18
20
|
},
|
|
19
21
|
classNames: {
|
|
20
|
-
root: e("w-fit",
|
|
21
|
-
months: e("relative flex flex-col gap-4 md:flex-row",
|
|
22
|
-
month: e("flex w-full flex-col gap-4",
|
|
23
|
-
nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
24
|
-
button_previous: e(n({ variant:
|
|
25
|
-
button_next: e(n({ variant:
|
|
26
|
-
month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
27
|
-
dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
28
|
-
dropdown_root: e("relative rounded-
|
|
29
|
-
dropdown: e("absolute inset-0 bg-popover opacity-0",
|
|
30
|
-
caption_label: e("font-medium select-none",
|
|
31
|
-
|
|
32
|
-
weekdays: e("flex",
|
|
33
|
-
weekday: e("flex-1 rounded-
|
|
34
|
-
week: e("mt-2 flex w-full",
|
|
35
|
-
week_number_header: e("w-(--cell-size) select-none",
|
|
36
|
-
week_number: e("text-[0.8rem] text-muted-foreground select-none",
|
|
37
|
-
day: e("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-
|
|
38
|
-
range_start: e("rounded-l-
|
|
39
|
-
range_middle: e("rounded-none",
|
|
40
|
-
range_end: e("rounded-r-
|
|
41
|
-
today: e("rounded-
|
|
42
|
-
outside: e("text-muted-foreground aria-selected:text-muted-foreground",
|
|
43
|
-
disabled: e("text-muted-foreground opacity-50",
|
|
44
|
-
hidden: e("invisible",
|
|
45
|
-
...
|
|
22
|
+
root: e("w-fit", y.root),
|
|
23
|
+
months: e("relative flex flex-col gap-4 md:flex-row", y.months),
|
|
24
|
+
month: e("flex w-full flex-col gap-4", y.month),
|
|
25
|
+
nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", y.nav),
|
|
26
|
+
button_previous: e(n({ variant: m }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", y.button_previous),
|
|
27
|
+
button_next: e(n({ variant: m }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", y.button_next),
|
|
28
|
+
month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", y.month_caption),
|
|
29
|
+
dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", y.dropdowns),
|
|
30
|
+
dropdown_root: e("relative rounded-(--cell-radius)", y.dropdown_root),
|
|
31
|
+
dropdown: e("absolute inset-0 bg-popover opacity-0", y.dropdown),
|
|
32
|
+
caption_label: e("font-medium select-none", p === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", y.caption_label),
|
|
33
|
+
month_grid: e("w-full border-collapse", y.month_grid),
|
|
34
|
+
weekdays: e("flex", y.weekdays),
|
|
35
|
+
weekday: e("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", y.weekday),
|
|
36
|
+
week: e("mt-2 flex w-full", y.week),
|
|
37
|
+
week_number_header: e("w-(--cell-size) select-none", y.week_number_header),
|
|
38
|
+
week_number: e("text-[0.8rem] text-muted-foreground select-none", y.week_number),
|
|
39
|
+
day: e("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)", v.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", y.day),
|
|
40
|
+
range_start: e("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", y.range_start),
|
|
41
|
+
range_middle: e("rounded-none", y.range_middle),
|
|
42
|
+
range_end: e("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", y.range_end),
|
|
43
|
+
today: e("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", y.today),
|
|
44
|
+
outside: e("text-muted-foreground aria-selected:text-muted-foreground", y.outside),
|
|
45
|
+
disabled: e("text-muted-foreground opacity-50", y.disabled),
|
|
46
|
+
hidden: e("invisible", y.hidden),
|
|
47
|
+
...s
|
|
46
48
|
},
|
|
47
49
|
components: {
|
|
48
|
-
Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */
|
|
50
|
+
Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */ o("div", {
|
|
49
51
|
"data-slot": "calendar",
|
|
50
52
|
ref: n,
|
|
51
53
|
className: e(t),
|
|
52
54
|
...r
|
|
53
55
|
}),
|
|
54
|
-
Chevron: ({ className: t, orientation: n, ...
|
|
56
|
+
Chevron: ({ className: t, orientation: n, ...s }) => o(n === "left" ? i : n === "right" ? a : r, {
|
|
55
57
|
className: e("size-4", t),
|
|
56
|
-
...
|
|
58
|
+
...s
|
|
59
|
+
}),
|
|
60
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ o(f, {
|
|
61
|
+
locale: h,
|
|
62
|
+
...e
|
|
57
63
|
}),
|
|
58
|
-
|
|
59
|
-
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ s("td", {
|
|
64
|
+
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ o("td", {
|
|
60
65
|
...t,
|
|
61
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ o("div", {
|
|
62
67
|
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
63
68
|
children: e
|
|
64
69
|
})
|
|
65
70
|
}),
|
|
66
|
-
...
|
|
71
|
+
..._
|
|
67
72
|
},
|
|
68
|
-
...
|
|
73
|
+
...v
|
|
69
74
|
});
|
|
70
75
|
}
|
|
71
|
-
function
|
|
72
|
-
let
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
ref: u,
|
|
76
|
+
function f({ className: n, day: r, modifiers: i, locale: a, ...c }) {
|
|
77
|
+
let u = l(), d = s.useRef(null);
|
|
78
|
+
return s.useEffect(() => {
|
|
79
|
+
i.focused && d.current?.focus();
|
|
80
|
+
}, [i.focused]), /* @__PURE__ */ o(t, {
|
|
77
81
|
variant: "ghost",
|
|
78
82
|
size: "icon",
|
|
79
|
-
"data-day":
|
|
80
|
-
"data-selected-single":
|
|
81
|
-
"data-range-start":
|
|
82
|
-
"data-range-end":
|
|
83
|
-
"data-range-middle":
|
|
84
|
-
className: e("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 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-
|
|
85
|
-
...
|
|
83
|
+
"data-day": r.date.toLocaleDateString(a?.code),
|
|
84
|
+
"data-selected-single": i.selected && !i.range_start && !i.range_end && !i.range_middle,
|
|
85
|
+
"data-range-start": i.range_start,
|
|
86
|
+
"data-range-end": i.range_end,
|
|
87
|
+
"data-range-middle": i.range_middle,
|
|
88
|
+
className: e("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", u.day, n),
|
|
89
|
+
...c
|
|
86
90
|
});
|
|
87
91
|
}
|
|
88
92
|
//#endregion
|
|
89
|
-
export {
|
|
93
|
+
export { d as Calendar, f as CalendarDayButton };
|