@saasflare/ui 1.1.2 → 3.0.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.
Files changed (44) hide show
  1. package/README.md +51 -30
  2. package/dist/{button-B2DR7obe.d.mts → button-DUQJ0X7e.d.mts} +0 -23
  3. package/dist/{button-B2DR7obe.d.ts → button-DUQJ0X7e.d.ts} +0 -23
  4. package/dist/chunk-7UGPCRZ6.mjs +130 -0
  5. package/dist/chunk-CWW36RYE.js +59 -0
  6. package/dist/chunk-JOVJRQO3.js +0 -1
  7. package/dist/{chunk-O3CFRMDK.js → chunk-OYH6LQWR.js} +33 -65
  8. package/dist/{chunk-QEKYM3BT.mjs → chunk-QWLQV6FS.mjs} +3 -25
  9. package/dist/chunk-S26666D6.mjs +0 -1
  10. package/dist/chunk-VQQ6MF5I.js +161 -0
  11. package/dist/chunk-W53NTFPB.mjs +28 -0
  12. package/dist/dialog-CwyBJeNl.d.mts +22 -0
  13. package/dist/dialog-CwyBJeNl.d.ts +22 -0
  14. package/dist/entries/calendar.d.mts +13 -0
  15. package/dist/entries/calendar.d.ts +13 -0
  16. package/dist/entries/calendar.js +211 -0
  17. package/dist/entries/calendar.mjs +188 -0
  18. package/dist/entries/carousel.d.mts +1 -1
  19. package/dist/entries/carousel.d.ts +1 -1
  20. package/dist/entries/carousel.js +5 -3
  21. package/dist/entries/carousel.mjs +3 -1
  22. package/dist/entries/chart.js +1 -0
  23. package/dist/entries/chart.mjs +1 -0
  24. package/dist/entries/command.d.mts +21 -0
  25. package/dist/entries/command.d.ts +21 -0
  26. package/dist/entries/command.js +172 -0
  27. package/dist/entries/command.mjs +162 -0
  28. package/dist/entries/drawer.d.mts +16 -0
  29. package/dist/entries/drawer.d.ts +16 -0
  30. package/dist/entries/drawer.js +124 -0
  31. package/dist/entries/drawer.mjs +113 -0
  32. package/dist/entries/input-otp.d.mts +14 -0
  33. package/dist/entries/input-otp.d.ts +14 -0
  34. package/dist/entries/input-otp.js +89 -0
  35. package/dist/entries/input-otp.mjs +64 -0
  36. package/dist/entries/resizable.d.mts +10 -0
  37. package/dist/entries/resizable.d.ts +10 -0
  38. package/dist/entries/resizable.js +69 -0
  39. package/dist/entries/resizable.mjs +45 -0
  40. package/dist/index.d.mts +12 -103
  41. package/dist/index.d.ts +12 -103
  42. package/dist/index.js +1265 -832
  43. package/dist/index.mjs +1172 -740
  44. package/package.json +66 -21
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import { clsx } from 'clsx';
3
2
  import { twMerge } from 'tailwind-merge';
4
3
  import 'react';
@@ -0,0 +1,161 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var chunkCWW36RYE_js = require('./chunk-CWW36RYE.js');
5
+ var chunkJOVJRQO3_js = require('./chunk-JOVJRQO3.js');
6
+ var react = require('motion/react');
7
+ var DialogPrimitive = require('@radix-ui/react-dialog');
8
+ var lucideReact = require('lucide-react');
9
+ var jsxRuntime = require('react/jsx-runtime');
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
30
+
31
+ function Dialog({
32
+ ...props
33
+ }) {
34
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
35
+ }
36
+ function DialogTrigger({
37
+ ...props
38
+ }) {
39
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "dialog-trigger", ...props });
40
+ }
41
+ function DialogPortal({
42
+ ...props
43
+ }) {
44
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "dialog-portal", ...props });
45
+ }
46
+ function DialogClose({
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "dialog-close", ...props });
50
+ }
51
+ function DialogOverlay({
52
+ className,
53
+ ...props
54
+ }) {
55
+ return /* @__PURE__ */ jsxRuntime.jsx(
56
+ DialogPrimitive__namespace.Overlay,
57
+ {
58
+ "data-slot": "dialog-overlay",
59
+ className: chunkJOVJRQO3_js.cn(
60
+ "fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
61
+ className
62
+ ),
63
+ ...props
64
+ }
65
+ );
66
+ }
67
+ function DialogContent({
68
+ className,
69
+ children,
70
+ ...props
71
+ }) {
72
+ const reduced = chunkCWW36RYE_js.useReducedMotion();
73
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
74
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
75
+ /* @__PURE__ */ jsxRuntime.jsx(
76
+ DialogPrimitive__namespace.Content,
77
+ {
78
+ "data-slot": "dialog-content",
79
+ asChild: true,
80
+ ...props,
81
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
82
+ react.m.div,
83
+ {
84
+ initial: reduced ? { opacity: 1 } : { opacity: 0, scale: 0.95, y: 10 },
85
+ animate: { opacity: 1, scale: 1, y: 0 },
86
+ exit: reduced ? { opacity: 0 } : { opacity: 0, scale: 0.95, y: 10 },
87
+ transition: reduced ? chunkCWW36RYE_js.noMotion : chunkCWW36RYE_js.springBouncy,
88
+ className: chunkJOVJRQO3_js.cn(
89
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",
90
+ className
91
+ ),
92
+ children: [
93
+ children,
94
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
95
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
96
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
97
+ ] })
98
+ ]
99
+ }
100
+ )
101
+ }
102
+ )
103
+ ] });
104
+ }
105
+ function DialogHeader({ className, ...props }) {
106
+ return /* @__PURE__ */ jsxRuntime.jsx(
107
+ "div",
108
+ {
109
+ "data-slot": "dialog-header",
110
+ className: chunkJOVJRQO3_js.cn("flex flex-col gap-2 text-center sm:text-left", className),
111
+ ...props
112
+ }
113
+ );
114
+ }
115
+ function DialogFooter({ className, ...props }) {
116
+ return /* @__PURE__ */ jsxRuntime.jsx(
117
+ "div",
118
+ {
119
+ "data-slot": "dialog-footer",
120
+ className: chunkJOVJRQO3_js.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
121
+ ...props
122
+ }
123
+ );
124
+ }
125
+ function DialogTitle({
126
+ className,
127
+ ...props
128
+ }) {
129
+ return /* @__PURE__ */ jsxRuntime.jsx(
130
+ DialogPrimitive__namespace.Title,
131
+ {
132
+ "data-slot": "dialog-title",
133
+ className: chunkJOVJRQO3_js.cn("text-lg leading-none font-semibold", className),
134
+ ...props
135
+ }
136
+ );
137
+ }
138
+ function DialogDescription({
139
+ className,
140
+ ...props
141
+ }) {
142
+ return /* @__PURE__ */ jsxRuntime.jsx(
143
+ DialogPrimitive__namespace.Description,
144
+ {
145
+ "data-slot": "dialog-description",
146
+ className: chunkJOVJRQO3_js.cn("text-sm text-muted-foreground", className),
147
+ ...props
148
+ }
149
+ );
150
+ }
151
+
152
+ exports.Dialog = Dialog;
153
+ exports.DialogClose = DialogClose;
154
+ exports.DialogContent = DialogContent;
155
+ exports.DialogDescription = DialogDescription;
156
+ exports.DialogFooter = DialogFooter;
157
+ exports.DialogHeader = DialogHeader;
158
+ exports.DialogOverlay = DialogOverlay;
159
+ exports.DialogPortal = DialogPortal;
160
+ exports.DialogTitle = DialogTitle;
161
+ exports.DialogTrigger = DialogTrigger;
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+
4
+ // src/hooks/use-reduced-motion.ts
5
+ var QUERY = "(prefers-reduced-motion: reduce)";
6
+ var subscribe = (cb) => {
7
+ const mql = window.matchMedia(QUERY);
8
+ mql.addEventListener("change", cb);
9
+ return () => mql.removeEventListener("change", cb);
10
+ };
11
+ var getSnapshot = () => window.matchMedia(QUERY).matches;
12
+ var getServerSnapshot = () => false;
13
+ function useReducedMotion() {
14
+ return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
15
+ }
16
+
17
+ // src/components/ui/motion-config.ts
18
+ var spring = { type: "spring", stiffness: 400, damping: 25 };
19
+ var springBouncy = { type: "spring", stiffness: 300, damping: 15 };
20
+ var springGentle = { type: "spring", stiffness: 200, damping: 20 };
21
+ var springStiff = { type: "spring", stiffness: 500, damping: 30 };
22
+ var noMotion = { duration: 0 };
23
+ var fadeIn = { initial: { opacity: 0 }, animate: { opacity: 1 } };
24
+ var scaleIn = { initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 } };
25
+ var slideUp = { initial: { opacity: 0, y: 8 }, animate: { opacity: 1, y: 0 } };
26
+ var slideDown = { initial: { opacity: 0, y: -8 }, animate: { opacity: 1, y: 0 } };
27
+
28
+ export { fadeIn, noMotion, scaleIn, slideDown, slideUp, spring, springBouncy, springGentle, springStiff, useReducedMotion };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+
5
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
7
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
8
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
9
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
10
+ /**
11
+ * Dialog content panel with spring entry animation.
12
+ *
13
+ * @component
14
+ * @layer core
15
+ */
16
+ declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
17
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
18
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
19
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
20
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
21
+
22
+ export { Dialog as D, DialogClose as a, DialogContent as b, DialogDescription as c, DialogFooter as d, DialogHeader as e, DialogOverlay as f, DialogPortal as g, DialogTitle as h, DialogTrigger as i };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+
5
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
7
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
8
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
9
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
10
+ /**
11
+ * Dialog content panel with spring entry animation.
12
+ *
13
+ * @component
14
+ * @layer core
15
+ */
16
+ declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
17
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
18
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
19
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
20
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
21
+
22
+ export { Dialog as D, DialogClose as a, DialogContent as b, DialogDescription as c, DialogFooter as d, DialogHeader as e, DialogOverlay as f, DialogPortal as g, DialogTitle as h, DialogTrigger as i };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { DayPicker, DayButton } from 'react-day-picker';
4
+ import { B as Button } from '../button-DUQJ0X7e.mjs';
5
+ import 'class-variance-authority/types';
6
+ import 'class-variance-authority';
7
+
8
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
9
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
10
+ }): react_jsx_runtime.JSX.Element;
11
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
12
+
13
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { DayPicker, DayButton } from 'react-day-picker';
4
+ import { B as Button } from '../button-DUQJ0X7e.js';
5
+ import 'class-variance-authority/types';
6
+ import 'class-variance-authority';
7
+
8
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
9
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
10
+ }): react_jsx_runtime.JSX.Element;
11
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
12
+
13
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,211 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var chunkOYH6LQWR_js = require('../chunk-OYH6LQWR.js');
5
+ require('../chunk-CWW36RYE.js');
6
+ var chunkJOVJRQO3_js = require('../chunk-JOVJRQO3.js');
7
+ var React = require('react');
8
+ var lucideReact = require('lucide-react');
9
+ var reactDayPicker = require('react-day-picker');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n.default = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
+
32
+ function Calendar({
33
+ className,
34
+ classNames,
35
+ showOutsideDays = true,
36
+ captionLayout = "label",
37
+ buttonVariant = "ghost",
38
+ formatters,
39
+ components,
40
+ ...props
41
+ }) {
42
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
43
+ return /* @__PURE__ */ jsxRuntime.jsx(
44
+ reactDayPicker.DayPicker,
45
+ {
46
+ showOutsideDays,
47
+ className: chunkJOVJRQO3_js.cn(
48
+ "group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
49
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
50
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
51
+ className
52
+ ),
53
+ captionLayout,
54
+ formatters: {
55
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
56
+ ...formatters
57
+ },
58
+ classNames: {
59
+ root: chunkJOVJRQO3_js.cn("w-fit", defaultClassNames.root),
60
+ months: chunkJOVJRQO3_js.cn(
61
+ "relative flex flex-col gap-4 md:flex-row",
62
+ defaultClassNames.months
63
+ ),
64
+ month: chunkJOVJRQO3_js.cn("flex w-full flex-col gap-4", defaultClassNames.month),
65
+ nav: chunkJOVJRQO3_js.cn(
66
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
67
+ defaultClassNames.nav
68
+ ),
69
+ button_previous: chunkJOVJRQO3_js.cn(
70
+ chunkOYH6LQWR_js.buttonVariants({ variant: buttonVariant }),
71
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
72
+ defaultClassNames.button_previous
73
+ ),
74
+ button_next: chunkJOVJRQO3_js.cn(
75
+ chunkOYH6LQWR_js.buttonVariants({ variant: buttonVariant }),
76
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
77
+ defaultClassNames.button_next
78
+ ),
79
+ month_caption: chunkJOVJRQO3_js.cn(
80
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
81
+ defaultClassNames.month_caption
82
+ ),
83
+ dropdowns: chunkJOVJRQO3_js.cn(
84
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
85
+ defaultClassNames.dropdowns
86
+ ),
87
+ dropdown_root: chunkJOVJRQO3_js.cn(
88
+ "relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
89
+ defaultClassNames.dropdown_root
90
+ ),
91
+ dropdown: chunkJOVJRQO3_js.cn(
92
+ "absolute inset-0 bg-popover opacity-0",
93
+ defaultClassNames.dropdown
94
+ ),
95
+ caption_label: chunkJOVJRQO3_js.cn(
96
+ "font-medium select-none",
97
+ captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
98
+ defaultClassNames.caption_label
99
+ ),
100
+ table: "w-full border-collapse",
101
+ weekdays: chunkJOVJRQO3_js.cn("flex", defaultClassNames.weekdays),
102
+ weekday: chunkJOVJRQO3_js.cn(
103
+ "flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
104
+ defaultClassNames.weekday
105
+ ),
106
+ week: chunkJOVJRQO3_js.cn("mt-2 flex w-full", defaultClassNames.week),
107
+ week_number_header: chunkJOVJRQO3_js.cn(
108
+ "w-(--cell-size) select-none",
109
+ defaultClassNames.week_number_header
110
+ ),
111
+ week_number: chunkJOVJRQO3_js.cn(
112
+ "text-[0.8rem] text-muted-foreground select-none",
113
+ defaultClassNames.week_number
114
+ ),
115
+ day: chunkJOVJRQO3_js.cn(
116
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
117
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
118
+ defaultClassNames.day
119
+ ),
120
+ range_start: chunkJOVJRQO3_js.cn(
121
+ "rounded-l-md bg-accent",
122
+ defaultClassNames.range_start
123
+ ),
124
+ range_middle: chunkJOVJRQO3_js.cn("rounded-none", defaultClassNames.range_middle),
125
+ range_end: chunkJOVJRQO3_js.cn("rounded-r-md bg-accent", defaultClassNames.range_end),
126
+ today: chunkJOVJRQO3_js.cn(
127
+ "rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
128
+ defaultClassNames.today
129
+ ),
130
+ outside: chunkJOVJRQO3_js.cn(
131
+ "text-muted-foreground aria-selected:text-muted-foreground",
132
+ defaultClassNames.outside
133
+ ),
134
+ disabled: chunkJOVJRQO3_js.cn(
135
+ "text-muted-foreground opacity-50",
136
+ defaultClassNames.disabled
137
+ ),
138
+ hidden: chunkJOVJRQO3_js.cn("invisible", defaultClassNames.hidden),
139
+ ...classNames
140
+ },
141
+ components: {
142
+ Root: ({ className: className2, rootRef, ...props2 }) => {
143
+ return /* @__PURE__ */ jsxRuntime.jsx(
144
+ "div",
145
+ {
146
+ "data-slot": "calendar",
147
+ ref: rootRef,
148
+ className: chunkJOVJRQO3_js.cn(className2),
149
+ ...props2
150
+ }
151
+ );
152
+ },
153
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
154
+ if (orientation === "left") {
155
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: chunkJOVJRQO3_js.cn("size-4", className2), ...props2 });
156
+ }
157
+ if (orientation === "right") {
158
+ return /* @__PURE__ */ jsxRuntime.jsx(
159
+ lucideReact.ChevronRightIcon,
160
+ {
161
+ className: chunkJOVJRQO3_js.cn("size-4", className2),
162
+ ...props2
163
+ }
164
+ );
165
+ }
166
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: chunkJOVJRQO3_js.cn("size-4", className2), ...props2 });
167
+ },
168
+ DayButton: CalendarDayButton,
169
+ WeekNumber: ({ children, ...props2 }) => {
170
+ return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
171
+ },
172
+ ...components
173
+ },
174
+ ...props
175
+ }
176
+ );
177
+ }
178
+ function CalendarDayButton({
179
+ className,
180
+ day,
181
+ modifiers,
182
+ ...props
183
+ }) {
184
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
185
+ const ref = React__namespace.useRef(null);
186
+ React__namespace.useEffect(() => {
187
+ if (modifiers.focused) ref.current?.focus();
188
+ }, [modifiers.focused]);
189
+ return /* @__PURE__ */ jsxRuntime.jsx(
190
+ chunkOYH6LQWR_js.Button,
191
+ {
192
+ ref,
193
+ variant: "ghost",
194
+ size: "icon",
195
+ "data-day": day.date.toLocaleDateString(),
196
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
197
+ "data-range-start": modifiers.range_start,
198
+ "data-range-end": modifiers.range_end,
199
+ "data-range-middle": modifiers.range_middle,
200
+ className: chunkJOVJRQO3_js.cn(
201
+ "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-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md 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-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
202
+ defaultClassNames.day,
203
+ className
204
+ ),
205
+ ...props
206
+ }
207
+ );
208
+ }
209
+
210
+ exports.Calendar = Calendar;
211
+ exports.CalendarDayButton = CalendarDayButton;
@@ -0,0 +1,188 @@
1
+ "use client";
2
+ import { buttonVariants, Button } from '../chunk-QWLQV6FS.mjs';
3
+ import '../chunk-W53NTFPB.mjs';
4
+ import { cn } from '../chunk-S26666D6.mjs';
5
+ import * as React from 'react';
6
+ import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from 'lucide-react';
7
+ import { getDefaultClassNames, DayPicker } from 'react-day-picker';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ function Calendar({
11
+ className,
12
+ classNames,
13
+ showOutsideDays = true,
14
+ captionLayout = "label",
15
+ buttonVariant = "ghost",
16
+ formatters,
17
+ components,
18
+ ...props
19
+ }) {
20
+ const defaultClassNames = getDefaultClassNames();
21
+ return /* @__PURE__ */ jsx(
22
+ DayPicker,
23
+ {
24
+ showOutsideDays,
25
+ className: cn(
26
+ "group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
27
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
28
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
29
+ className
30
+ ),
31
+ captionLayout,
32
+ formatters: {
33
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
34
+ ...formatters
35
+ },
36
+ classNames: {
37
+ root: cn("w-fit", defaultClassNames.root),
38
+ months: cn(
39
+ "relative flex flex-col gap-4 md:flex-row",
40
+ defaultClassNames.months
41
+ ),
42
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
43
+ nav: cn(
44
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
45
+ defaultClassNames.nav
46
+ ),
47
+ button_previous: cn(
48
+ buttonVariants({ variant: buttonVariant }),
49
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
50
+ defaultClassNames.button_previous
51
+ ),
52
+ button_next: cn(
53
+ buttonVariants({ variant: buttonVariant }),
54
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
55
+ defaultClassNames.button_next
56
+ ),
57
+ month_caption: cn(
58
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
59
+ defaultClassNames.month_caption
60
+ ),
61
+ dropdowns: cn(
62
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
63
+ defaultClassNames.dropdowns
64
+ ),
65
+ dropdown_root: cn(
66
+ "relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
67
+ defaultClassNames.dropdown_root
68
+ ),
69
+ dropdown: cn(
70
+ "absolute inset-0 bg-popover opacity-0",
71
+ defaultClassNames.dropdown
72
+ ),
73
+ caption_label: cn(
74
+ "font-medium select-none",
75
+ captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
76
+ defaultClassNames.caption_label
77
+ ),
78
+ table: "w-full border-collapse",
79
+ weekdays: cn("flex", defaultClassNames.weekdays),
80
+ weekday: cn(
81
+ "flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
82
+ defaultClassNames.weekday
83
+ ),
84
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
85
+ week_number_header: cn(
86
+ "w-(--cell-size) select-none",
87
+ defaultClassNames.week_number_header
88
+ ),
89
+ week_number: cn(
90
+ "text-[0.8rem] text-muted-foreground select-none",
91
+ defaultClassNames.week_number
92
+ ),
93
+ day: cn(
94
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
95
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
96
+ defaultClassNames.day
97
+ ),
98
+ range_start: cn(
99
+ "rounded-l-md bg-accent",
100
+ defaultClassNames.range_start
101
+ ),
102
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
103
+ range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
104
+ today: cn(
105
+ "rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
106
+ defaultClassNames.today
107
+ ),
108
+ outside: cn(
109
+ "text-muted-foreground aria-selected:text-muted-foreground",
110
+ defaultClassNames.outside
111
+ ),
112
+ disabled: cn(
113
+ "text-muted-foreground opacity-50",
114
+ defaultClassNames.disabled
115
+ ),
116
+ hidden: cn("invisible", defaultClassNames.hidden),
117
+ ...classNames
118
+ },
119
+ components: {
120
+ Root: ({ className: className2, rootRef, ...props2 }) => {
121
+ return /* @__PURE__ */ jsx(
122
+ "div",
123
+ {
124
+ "data-slot": "calendar",
125
+ ref: rootRef,
126
+ className: cn(className2),
127
+ ...props2
128
+ }
129
+ );
130
+ },
131
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
132
+ if (orientation === "left") {
133
+ return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
134
+ }
135
+ if (orientation === "right") {
136
+ return /* @__PURE__ */ jsx(
137
+ ChevronRightIcon,
138
+ {
139
+ className: cn("size-4", className2),
140
+ ...props2
141
+ }
142
+ );
143
+ }
144
+ return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
145
+ },
146
+ DayButton: CalendarDayButton,
147
+ WeekNumber: ({ children, ...props2 }) => {
148
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
149
+ },
150
+ ...components
151
+ },
152
+ ...props
153
+ }
154
+ );
155
+ }
156
+ function CalendarDayButton({
157
+ className,
158
+ day,
159
+ modifiers,
160
+ ...props
161
+ }) {
162
+ const defaultClassNames = getDefaultClassNames();
163
+ const ref = React.useRef(null);
164
+ React.useEffect(() => {
165
+ if (modifiers.focused) ref.current?.focus();
166
+ }, [modifiers.focused]);
167
+ return /* @__PURE__ */ jsx(
168
+ Button,
169
+ {
170
+ ref,
171
+ variant: "ghost",
172
+ size: "icon",
173
+ "data-day": day.date.toLocaleDateString(),
174
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
175
+ "data-range-start": modifiers.range_start,
176
+ "data-range-end": modifiers.range_end,
177
+ "data-range-middle": modifiers.range_middle,
178
+ className: cn(
179
+ "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-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md 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-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
180
+ defaultClassNames.day,
181
+ className
182
+ ),
183
+ ...props
184
+ }
185
+ );
186
+ }
187
+
188
+ export { Calendar, CalendarDayButton };
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
- import { B as Button } from '../button-B2DR7obe.mjs';
4
+ import { B as Button } from '../button-DUQJ0X7e.mjs';
5
5
  import 'class-variance-authority/types';
6
6
  import 'class-variance-authority';
7
7