acai-ui-library 0.1.21 → 0.1.23

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 (85) hide show
  1. package/dist/components/ai-chatbot-logo-glyph.cjs +31 -0
  2. package/dist/components/ai-chatbot-logo-glyph.cjs.map +1 -0
  3. package/dist/components/ai-chatbot-logo-glyph.d.cts +3 -0
  4. package/dist/components/ai-chatbot-logo-glyph.d.ts +3 -0
  5. package/dist/components/ai-chatbot-logo-glyph.js +6 -0
  6. package/dist/components/ai-chatbot-logo-glyph.js.map +1 -0
  7. package/dist/components/ai-chatbot-logo.cjs +136 -0
  8. package/dist/components/ai-chatbot-logo.cjs.map +1 -0
  9. package/dist/components/ai-chatbot-logo.d.cts +13 -0
  10. package/dist/components/ai-chatbot-logo.d.ts +13 -0
  11. package/dist/components/ai-chatbot-logo.js +102 -0
  12. package/dist/components/ai-chatbot-logo.js.map +1 -0
  13. package/dist/components/app-launcher.cjs +224 -0
  14. package/dist/components/app-launcher.cjs.map +1 -0
  15. package/dist/components/app-launcher.d.cts +24 -0
  16. package/dist/components/app-launcher.d.ts +24 -0
  17. package/dist/components/app-launcher.js +190 -0
  18. package/dist/components/app-launcher.js.map +1 -0
  19. package/dist/components/calendar.cjs +13 -5
  20. package/dist/components/calendar.cjs.map +1 -1
  21. package/dist/components/calendar.js +15 -7
  22. package/dist/components/calendar.js.map +1 -1
  23. package/dist/components/date-picker.cjs +17 -7
  24. package/dist/components/date-picker.cjs.map +1 -1
  25. package/dist/components/date-picker.js +23 -13
  26. package/dist/components/date-picker.js.map +1 -1
  27. package/dist/components/date-time-picker.cjs +13 -5
  28. package/dist/components/date-time-picker.cjs.map +1 -1
  29. package/dist/components/date-time-picker.js +28 -20
  30. package/dist/components/date-time-picker.js.map +1 -1
  31. package/dist/components/help-widget/app-id-typecheck.cjs +34 -0
  32. package/dist/components/help-widget/app-id-typecheck.cjs.map +1 -0
  33. package/dist/components/help-widget/app-id-typecheck.d.cts +17 -0
  34. package/dist/components/help-widget/app-id-typecheck.d.ts +17 -0
  35. package/dist/components/help-widget/app-id-typecheck.js +8 -0
  36. package/dist/components/help-widget/app-id-typecheck.js.map +1 -0
  37. package/dist/components/help-widget/consent-dialog.cjs +276 -0
  38. package/dist/components/help-widget/consent-dialog.cjs.map +1 -0
  39. package/dist/components/help-widget/consent-dialog.d.cts +17 -0
  40. package/dist/components/help-widget/consent-dialog.d.ts +17 -0
  41. package/dist/components/help-widget/consent-dialog.js +239 -0
  42. package/dist/components/help-widget/consent-dialog.js.map +1 -0
  43. package/dist/components/help-widget/help-session-banner.cjs +85 -0
  44. package/dist/components/help-widget/help-session-banner.cjs.map +1 -0
  45. package/dist/components/help-widget/help-session-banner.d.cts +17 -0
  46. package/dist/components/help-widget/help-session-banner.d.ts +17 -0
  47. package/dist/components/help-widget/help-session-banner.js +50 -0
  48. package/dist/components/help-widget/help-session-banner.js.map +1 -0
  49. package/dist/components/help-widget/help-widget.cjs +503 -0
  50. package/dist/components/help-widget/help-widget.cjs.map +1 -0
  51. package/dist/components/help-widget/help-widget.d.cts +32 -0
  52. package/dist/components/help-widget/help-widget.d.ts +32 -0
  53. package/dist/components/help-widget/help-widget.js +468 -0
  54. package/dist/components/help-widget/help-widget.js.map +1 -0
  55. package/dist/components/help-widget/highlight-overlay.cjs +84 -0
  56. package/dist/components/help-widget/highlight-overlay.cjs.map +1 -0
  57. package/dist/components/help-widget/highlight-overlay.d.cts +24 -0
  58. package/dist/components/help-widget/highlight-overlay.d.ts +24 -0
  59. package/dist/components/help-widget/highlight-overlay.js +49 -0
  60. package/dist/components/help-widget/highlight-overlay.js.map +1 -0
  61. package/dist/components/help-widget/use-help-session.cjs +85 -0
  62. package/dist/components/help-widget/use-help-session.cjs.map +1 -0
  63. package/dist/components/help-widget/use-help-session.d.cts +46 -0
  64. package/dist/components/help-widget/use-help-session.d.ts +46 -0
  65. package/dist/components/help-widget/use-help-session.js +50 -0
  66. package/dist/components/help-widget/use-help-session.js.map +1 -0
  67. package/dist/index.cjs +665 -82
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.d.cts +9 -0
  70. package/dist/index.d.ts +9 -0
  71. package/dist/index.js +699 -126
  72. package/dist/index.js.map +1 -1
  73. package/dist/lib/app-ids.cjs +58 -0
  74. package/dist/lib/app-ids.cjs.map +1 -0
  75. package/dist/lib/app-ids.d.cts +12 -0
  76. package/dist/lib/app-ids.d.ts +12 -0
  77. package/dist/lib/app-ids.js +32 -0
  78. package/dist/lib/app-ids.js.map +1 -0
  79. package/dist/lib/mask-snapshot.cjs +66 -0
  80. package/dist/lib/mask-snapshot.cjs.map +1 -0
  81. package/dist/lib/mask-snapshot.d.cts +16 -0
  82. package/dist/lib/mask-snapshot.d.ts +16 -0
  83. package/dist/lib/mask-snapshot.js +41 -0
  84. package/dist/lib/mask-snapshot.js.map +1 -0
  85. package/package.json +2 -1
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+
3
+ interface AppLauncherApp {
4
+ id: string;
5
+ displayName: string;
6
+ iconUrl?: string | null;
7
+ }
8
+ interface AppLauncherProps {
9
+ apps: AppLauncherApp[];
10
+ isLoading?: boolean;
11
+ onLaunch: (app: AppLauncherApp) => void;
12
+ title?: string;
13
+ emptyLabel?: string;
14
+ /** Enables the pinned-apps row, persisted to localStorage under this key. Omit to disable pinning. */
15
+ pinStorageKey?: string;
16
+ maxPins?: number;
17
+ trigger?: React.ReactNode;
18
+ open?: boolean;
19
+ onOpenChange?: (open: boolean) => void;
20
+ className?: string;
21
+ }
22
+ declare const AppLauncher: React.ForwardRefExoticComponent<AppLauncherProps & React.RefAttributes<HTMLButtonElement>>;
23
+
24
+ export { AppLauncher, type AppLauncherApp, type AppLauncherProps };
@@ -0,0 +1,190 @@
1
+ "use client";
2
+
3
+ // src/components/app-launcher.tsx
4
+ import * as React2 from "react";
5
+ import { LayoutGrid, Pin } from "lucide-react";
6
+
7
+ // src/components/popover.tsx
8
+ import * as React from "react";
9
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
10
+
11
+ // src/lib/utils.ts
12
+ import { clsx } from "clsx";
13
+ import { twMerge } from "tailwind-merge";
14
+ function cn(...inputs) {
15
+ return twMerge(clsx(inputs));
16
+ }
17
+
18
+ // src/components/popover.tsx
19
+ import { jsx } from "react/jsx-runtime";
20
+ var Popover = PopoverPrimitive.Root;
21
+ var PopoverTrigger = PopoverPrimitive.Trigger;
22
+ var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
23
+ PopoverPrimitive.Content,
24
+ {
25
+ ref,
26
+ align,
27
+ sideOffset,
28
+ className: cn(
29
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
30
+ className
31
+ ),
32
+ ...props
33
+ }
34
+ ) }));
35
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
36
+
37
+ // src/components/app-launcher.tsx
38
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
39
+ function loadPinnedIds(storageKey) {
40
+ if (typeof window === "undefined") return [];
41
+ try {
42
+ const parsed = JSON.parse(localStorage.getItem(storageKey) ?? "[]");
43
+ return Array.isArray(parsed) ? parsed.filter((x) => typeof x === "string") : [];
44
+ } catch {
45
+ return [];
46
+ }
47
+ }
48
+ var DefaultTrigger = React2.forwardRef(({ active, className, ...props }, ref) => /* @__PURE__ */ jsx2(
49
+ "button",
50
+ {
51
+ ...props,
52
+ ref,
53
+ type: "button",
54
+ "aria-label": "Apps",
55
+ className: cn(
56
+ "flex size-9 items-center justify-center rounded-md transition-colors",
57
+ active ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
58
+ className
59
+ ),
60
+ children: /* @__PURE__ */ jsx2(LayoutGrid, { className: "size-[18px]" })
61
+ }
62
+ ));
63
+ DefaultTrigger.displayName = "AppLauncherDefaultTrigger";
64
+ function AppTile({
65
+ app,
66
+ pinned,
67
+ pinningEnabled,
68
+ onLaunch,
69
+ onTogglePin
70
+ }) {
71
+ return /* @__PURE__ */ jsxs("div", { className: "group relative", children: [
72
+ pinningEnabled && /* @__PURE__ */ jsx2(
73
+ "button",
74
+ {
75
+ type: "button",
76
+ "aria-label": pinned ? "Unpin app" : "Pin app",
77
+ onClick: () => onTogglePin(app.id),
78
+ className: cn(
79
+ "absolute end-1 top-1 z-10 flex h-5 w-5 items-center justify-center rounded-full text-muted-foreground outline-none transition-opacity focus-visible:opacity-100",
80
+ pinned ? "text-primary opacity-100" : "opacity-0 hover:text-foreground group-hover:opacity-100"
81
+ ),
82
+ children: /* @__PURE__ */ jsx2(Pin, { className: cn("size-3", pinned && "fill-current") })
83
+ }
84
+ ),
85
+ /* @__PURE__ */ jsxs(
86
+ "button",
87
+ {
88
+ type: "button",
89
+ onClick: () => onLaunch(app),
90
+ className: "flex w-full flex-col items-center gap-2 rounded-xl p-2.5 text-center outline-none transition-colors duration-150 hover:bg-muted/60 focus-visible:bg-muted/60",
91
+ children: [
92
+ /* @__PURE__ */ jsx2("span", { className: "relative flex h-12 w-12 items-center justify-center rounded-2xl bg-muted/50 shadow-sm ring-1 ring-border/60 transition-transform duration-150 group-hover:scale-[1.06] group-hover:shadow-md", children: app.iconUrl ? /* @__PURE__ */ jsx2("img", { src: app.iconUrl, alt: "", className: "h-full w-full rounded-2xl object-contain p-2" }) : /* @__PURE__ */ jsx2("span", { className: "flex h-full w-full items-center justify-center rounded-2xl text-sm font-semibold text-primary", children: app.displayName.slice(0, 1).toUpperCase() }) }),
93
+ /* @__PURE__ */ jsx2("span", { className: "line-clamp-2 text-[11px] font-medium leading-tight text-foreground", children: app.displayName })
94
+ ]
95
+ }
96
+ )
97
+ ] });
98
+ }
99
+ var AppLauncher = React2.forwardRef(
100
+ ({
101
+ apps,
102
+ isLoading = false,
103
+ onLaunch,
104
+ title = "Apps",
105
+ emptyLabel = "No apps available",
106
+ pinStorageKey,
107
+ maxPins = 4,
108
+ trigger,
109
+ open,
110
+ onOpenChange,
111
+ className
112
+ }, ref) => {
113
+ const [internalOpen, setInternalOpen] = React2.useState(false);
114
+ const isOpen = open ?? internalOpen;
115
+ const setOpen = onOpenChange ?? setInternalOpen;
116
+ const [pinnedIds, setPinnedIds] = React2.useState([]);
117
+ React2.useEffect(() => {
118
+ if (pinStorageKey) setPinnedIds(loadPinnedIds(pinStorageKey));
119
+ }, [pinStorageKey]);
120
+ const togglePin = (id) => {
121
+ if (!pinStorageKey) return;
122
+ const next = pinnedIds.includes(id) ? pinnedIds.filter((p) => p !== id) : [...pinnedIds, id].slice(-maxPins);
123
+ setPinnedIds(next);
124
+ try {
125
+ localStorage.setItem(pinStorageKey, JSON.stringify(next));
126
+ } catch {
127
+ }
128
+ };
129
+ const handleLaunch = (app) => {
130
+ onLaunch(app);
131
+ setOpen(false);
132
+ };
133
+ const pinningEnabled = !!pinStorageKey;
134
+ const pinnedApps = pinningEnabled ? pinnedIds.map((id) => apps.find((a) => a.id === id)).filter((a) => !!a) : [];
135
+ const restApps = pinningEnabled ? apps.filter((a) => !pinnedIds.includes(a.id)) : apps;
136
+ return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: setOpen, children: [
137
+ /* @__PURE__ */ jsx2(PopoverTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsx2(DefaultTrigger, { ref, active: isOpen }) }),
138
+ /* @__PURE__ */ jsx2(
139
+ PopoverContent,
140
+ {
141
+ align: "end",
142
+ sideOffset: 10,
143
+ className: cn("w-[22rem] border-none bg-transparent p-0 shadow-none", className),
144
+ children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-2xl border border-border/60 bg-card shadow-2xl shadow-black/10 ring-1 ring-border/50 dark:shadow-black/40", children: [
145
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 pb-3 pt-4", children: [
146
+ /* @__PURE__ */ jsx2("span", { className: "text-[13px] font-semibold tracking-tight text-foreground", children: title }),
147
+ /* @__PURE__ */ jsx2("span", { className: "text-[11px] font-medium text-muted-foreground", children: apps.length > 0 ? apps.length : "" })
148
+ ] }),
149
+ /* @__PURE__ */ jsx2("div", { className: "max-h-96 overflow-y-auto px-2 pb-3", children: isLoading ? /* @__PURE__ */ jsx2("div", { className: "grid grid-cols-4 gap-1 p-1", children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 rounded-xl p-2.5", children: [
150
+ /* @__PURE__ */ jsx2("div", { className: "h-12 w-12 animate-pulse rounded-2xl bg-muted/60" }),
151
+ /* @__PURE__ */ jsx2("div", { className: "h-2.5 w-10 animate-pulse rounded-full bg-muted/60" })
152
+ ] }, i)) }) : apps.length === 0 ? /* @__PURE__ */ jsx2("p", { className: "py-10 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsxs(Fragment, { children: [
153
+ pinnedApps.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
154
+ /* @__PURE__ */ jsx2("div", { className: "px-1 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Pinned" }),
155
+ /* @__PURE__ */ jsx2("div", { className: "grid grid-cols-4 gap-1", children: pinnedApps.map((app) => /* @__PURE__ */ jsx2(
156
+ AppTile,
157
+ {
158
+ app,
159
+ pinned: true,
160
+ pinningEnabled,
161
+ onLaunch: handleLaunch,
162
+ onTogglePin: togglePin
163
+ },
164
+ app.id
165
+ )) }),
166
+ /* @__PURE__ */ jsx2("div", { className: "my-2 border-t border-border/60" })
167
+ ] }),
168
+ /* @__PURE__ */ jsx2("div", { className: "grid grid-cols-4 gap-1", children: restApps.map((app) => /* @__PURE__ */ jsx2(
169
+ AppTile,
170
+ {
171
+ app,
172
+ pinned: false,
173
+ pinningEnabled,
174
+ onLaunch: handleLaunch,
175
+ onTogglePin: togglePin
176
+ },
177
+ app.id
178
+ )) })
179
+ ] }) })
180
+ ] })
181
+ }
182
+ )
183
+ ] });
184
+ }
185
+ );
186
+ AppLauncher.displayName = "AppLauncher";
187
+ export {
188
+ AppLauncher
189
+ };
190
+ //# sourceMappingURL=app-launcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/app-launcher.tsx","../../src/components/popover.tsx","../../src/lib/utils.ts"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { LayoutGrid, Pin } from \"lucide-react\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\"\nimport { cn } from \"../lib/utils\"\n\nexport interface AppLauncherApp {\n id: string\n displayName: string\n iconUrl?: string | null\n}\n\nexport interface AppLauncherProps {\n apps: AppLauncherApp[]\n isLoading?: boolean\n onLaunch: (app: AppLauncherApp) => void\n title?: string\n emptyLabel?: string\n /** Enables the pinned-apps row, persisted to localStorage under this key. Omit to disable pinning. */\n pinStorageKey?: string\n maxPins?: number\n trigger?: React.ReactNode\n open?: boolean\n onOpenChange?: (open: boolean) => void\n className?: string\n}\n\nfunction loadPinnedIds(storageKey: string): string[] {\n if (typeof window === \"undefined\") return []\n try {\n const parsed: unknown = JSON.parse(localStorage.getItem(storageKey) ?? \"[]\")\n return Array.isArray(parsed) ? parsed.filter((x): x is string => typeof x === \"string\") : []\n } catch {\n return []\n }\n}\n\nconst DefaultTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ButtonHTMLAttributes<HTMLButtonElement> & { active?: boolean }\n>(({ active, className, ...props }, ref) => (\n <button\n {...props}\n ref={ref}\n type=\"button\"\n aria-label=\"Apps\"\n className={cn(\n \"flex size-9 items-center justify-center rounded-md transition-colors\",\n active\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/70 hover:text-foreground\",\n className\n )}\n >\n <LayoutGrid className=\"size-[18px]\" />\n </button>\n))\nDefaultTrigger.displayName = \"AppLauncherDefaultTrigger\"\n\nfunction AppTile({\n app,\n pinned,\n pinningEnabled,\n onLaunch,\n onTogglePin,\n}: {\n app: AppLauncherApp\n pinned: boolean\n pinningEnabled: boolean\n onLaunch: (app: AppLauncherApp) => void\n onTogglePin: (id: string) => void\n}) {\n return (\n <div className=\"group relative\">\n {pinningEnabled && (\n <button\n type=\"button\"\n aria-label={pinned ? \"Unpin app\" : \"Pin app\"}\n onClick={() => onTogglePin(app.id)}\n className={cn(\n \"absolute end-1 top-1 z-10 flex h-5 w-5 items-center justify-center rounded-full text-muted-foreground outline-none transition-opacity focus-visible:opacity-100\",\n pinned ? \"text-primary opacity-100\" : \"opacity-0 hover:text-foreground group-hover:opacity-100\"\n )}\n >\n <Pin className={cn(\"size-3\", pinned && \"fill-current\")} />\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => onLaunch(app)}\n className=\"flex w-full flex-col items-center gap-2 rounded-xl p-2.5 text-center outline-none transition-colors duration-150 hover:bg-muted/60 focus-visible:bg-muted/60\"\n >\n <span className=\"relative flex h-12 w-12 items-center justify-center rounded-2xl bg-muted/50 shadow-sm ring-1 ring-border/60 transition-transform duration-150 group-hover:scale-[1.06] group-hover:shadow-md\">\n {app.iconUrl ? (\n <img src={app.iconUrl} alt=\"\" className=\"h-full w-full rounded-2xl object-contain p-2\" />\n ) : (\n <span className=\"flex h-full w-full items-center justify-center rounded-2xl text-sm font-semibold text-primary\">\n {app.displayName.slice(0, 1).toUpperCase()}\n </span>\n )}\n </span>\n <span className=\"line-clamp-2 text-[11px] font-medium leading-tight text-foreground\">\n {app.displayName}\n </span>\n </button>\n </div>\n )\n}\n\nconst AppLauncher = React.forwardRef<HTMLButtonElement, AppLauncherProps>(\n (\n {\n apps,\n isLoading = false,\n onLaunch,\n title = \"Apps\",\n emptyLabel = \"No apps available\",\n pinStorageKey,\n maxPins = 4,\n trigger,\n open,\n onOpenChange,\n className,\n },\n ref\n ) => {\n const [internalOpen, setInternalOpen] = React.useState(false)\n const isOpen = open ?? internalOpen\n const setOpen = onOpenChange ?? setInternalOpen\n\n const [pinnedIds, setPinnedIds] = React.useState<string[]>([])\n React.useEffect(() => {\n if (pinStorageKey) setPinnedIds(loadPinnedIds(pinStorageKey))\n }, [pinStorageKey])\n\n const togglePin = (id: string) => {\n if (!pinStorageKey) return\n const next = pinnedIds.includes(id)\n ? pinnedIds.filter((p) => p !== id)\n : [...pinnedIds, id].slice(-maxPins)\n setPinnedIds(next)\n try {\n localStorage.setItem(pinStorageKey, JSON.stringify(next))\n } catch {\n // storage unavailable (private mode / quota): keep the in-memory pins\n }\n }\n\n const handleLaunch = (app: AppLauncherApp) => {\n onLaunch(app)\n setOpen(false)\n }\n\n const pinningEnabled = !!pinStorageKey\n const pinnedApps = pinningEnabled\n ? pinnedIds.map((id) => apps.find((a) => a.id === id)).filter((a): a is AppLauncherApp => !!a)\n : []\n const restApps = pinningEnabled ? apps.filter((a) => !pinnedIds.includes(a.id)) : apps\n\n return (\n <Popover open={isOpen} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n {trigger ?? <DefaultTrigger ref={ref} active={isOpen} />}\n </PopoverTrigger>\n <PopoverContent\n align=\"end\"\n sideOffset={10}\n className={cn(\"w-[22rem] border-none bg-transparent p-0 shadow-none\", className)}\n >\n <div className=\"overflow-hidden rounded-2xl border border-border/60 bg-card shadow-2xl shadow-black/10 ring-1 ring-border/50 dark:shadow-black/40\">\n <div className=\"flex items-center justify-between px-4 pb-3 pt-4\">\n <span className=\"text-[13px] font-semibold tracking-tight text-foreground\">{title}</span>\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n {apps.length > 0 ? apps.length : \"\"}\n </span>\n </div>\n\n <div className=\"max-h-96 overflow-y-auto px-2 pb-3\">\n {isLoading ? (\n <div className=\"grid grid-cols-4 gap-1 p-1\">\n {Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"flex flex-col items-center gap-2 rounded-xl p-2.5\">\n <div className=\"h-12 w-12 animate-pulse rounded-2xl bg-muted/60\" />\n <div className=\"h-2.5 w-10 animate-pulse rounded-full bg-muted/60\" />\n </div>\n ))}\n </div>\n ) : apps.length === 0 ? (\n <p className=\"py-10 text-center text-sm text-muted-foreground\">{emptyLabel}</p>\n ) : (\n <>\n {pinnedApps.length > 0 && (\n <>\n <div className=\"px-1 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground\">\n Pinned\n </div>\n <div className=\"grid grid-cols-4 gap-1\">\n {pinnedApps.map((app) => (\n <AppTile\n key={app.id}\n app={app}\n pinned\n pinningEnabled={pinningEnabled}\n onLaunch={handleLaunch}\n onTogglePin={togglePin}\n />\n ))}\n </div>\n <div className=\"my-2 border-t border-border/60\" />\n </>\n )}\n <div className=\"grid grid-cols-4 gap-1\">\n {restApps.map((app) => (\n <AppTile\n key={app.id}\n app={app}\n pinned={false}\n pinningEnabled={pinningEnabled}\n onLaunch={handleLaunch}\n onTogglePin={togglePin}\n />\n ))}\n </div>\n </>\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n )\n }\n)\nAppLauncher.displayName = \"AppLauncher\"\n\nexport { AppLauncher }\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { cn } from \"../lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;AAEA,YAAYA,YAAW;AACvB,SAAS,YAAY,WAAW;;;ACHhC,YAAY,WAAW;AACvB,YAAY,sBAAsB;;;ACDlC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADOI;AARJ,IAAM,UAA2B;AACjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oBAAkB,yBAAjB,EACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAA+B,yBAAQ;;;AD+BlD,SA0IgB,UA1IhB,OAAAC,MAiCE,YAjCF;AA3BJ,SAAS,cAAc,YAA8B;AACnD,MAAI,OAAO,WAAW,YAAa,QAAO,CAAC;AAC3C,MAAI;AACF,UAAM,SAAkB,KAAK,MAAM,aAAa,QAAQ,UAAU,KAAK,IAAI;AAC3E,WAAO,MAAM,QAAQ,MAAM,IAAI,OAAO,OAAO,CAAC,MAAmB,OAAO,MAAM,QAAQ,IAAI,CAAC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A,kBACV,aAAa;AAAA;AAAA,gBALR,IAAI;AAAA,cAMX,CACD,GACH;AAAA,eACF,GAEJ;AAAA,aACF;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EAEJ;AACF;AACA,YAAY,cAAc;","names":["React","jsx"]}
@@ -35,6 +35,12 @@ function cn(...inputs) {
35
35
 
36
36
  // src/components/calendar.tsx
37
37
  var import_jsx_runtime = require("react/jsx-runtime");
38
+ function CalendarSelect({ children, ...selectProps }) {
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
40
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("select", { ...selectProps, children }),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { "aria-hidden": "true", className: "pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" })
42
+ ] });
43
+ }
38
44
  var DEFAULT_YEARS_BACK = 10;
39
45
  var DEFAULT_YEARS_FORWARD = 10;
40
46
  function Calendar({
@@ -57,16 +63,16 @@ function Calendar({
57
63
  showOutsideDays,
58
64
  className: cn("w-[260px] rounded-lg p-3", className),
59
65
  classNames: {
60
- months: "flex flex-col",
66
+ months: "relative flex flex-col",
61
67
  month: "space-y-3",
62
68
  month_caption: "relative flex h-8 items-center justify-center",
63
69
  caption_label: "text-sm font-medium hidden",
64
- nav: "flex items-center",
70
+ nav: "absolute inset-x-0 top-0 z-10 flex h-8 items-center pointer-events-none",
65
71
  button_previous: cn(
66
- "absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
72
+ "pointer-events-auto absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
67
73
  ),
68
74
  button_next: cn(
69
- "absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
75
+ "pointer-events-auto absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
70
76
  ),
71
77
  month_grid: "w-full border-collapse",
72
78
  weekdays: "flex w-full",
@@ -83,8 +89,9 @@ function Calendar({
83
89
  disabled: "[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default",
84
90
  range_middle: "[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none",
85
91
  range_start: "[&>button]:rounded-e-none",
92
+ dropdown_root: "relative",
86
93
  dropdowns: "flex items-center gap-1.5 justify-center",
87
- dropdown: "h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
94
+ dropdown: "h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
88
95
  months_dropdown: "w-[104px]",
89
96
  years_dropdown: "w-[72px]",
90
97
  hidden: "invisible",
@@ -92,6 +99,7 @@ function Calendar({
92
99
  },
93
100
  captionLayout,
94
101
  components: {
102
+ Select: CalendarSelect,
95
103
  Chevron: ({ orientation }) => {
96
104
  const Icon = orientation === "left" ? import_lucide_react.ChevronLeft : import_lucide_react.ChevronRight;
97
105
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "size-4" });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/calendar.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { DayPicker } from \"react-day-picker\"\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n/**\n * How far the year dropdown reaches when the caller gives no bounds.\n *\n * `captionLayout` defaults to \"dropdown\" here, and react-day-picker then falls\n * back to [currentYear - 100, currentYear] for the year list. That is wrong in\n * both directions: a hundred dead years to scroll past, and no future year at\n * all - a deadline could not be set beyond December of the current year.\n * Callers that know their range pass `startMonth` / `endMonth` and these are\n * not used.\n */\nconst DEFAULT_YEARS_BACK = 10\nconst DEFAULT_YEARS_FORWARD = 10\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"dropdown\",\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const now = new Date()\n const defaultedStartMonth =\n startMonth ?? new Date(now.getFullYear() - DEFAULT_YEARS_BACK, 0, 1)\n const defaultedEndMonth =\n endMonth ?? new Date(now.getFullYear() + DEFAULT_YEARS_FORWARD, 11, 1)\n\n return (\n <DayPicker\n startMonth={defaultedStartMonth}\n endMonth={defaultedEndMonth}\n showOutsideDays={showOutsideDays}\n className={cn(\"w-[260px] rounded-lg p-3\", className)}\n classNames={{\n months: \"flex flex-col\",\n month: \"space-y-3\",\n month_caption: \"relative flex h-8 items-center justify-center\",\n caption_label: \"text-sm font-medium hidden\",\n nav: \"flex items-center\",\n button_previous: cn(\n \"absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n button_next: cn(\n \"absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: \"flex w-full\",\n weekday:\n \"flex-1 h-8 flex items-center justify-center text-[11px] font-medium text-muted-foreground uppercase tracking-wider\",\n week: \"flex w-full mt-1\",\n day: \"flex-1 h-8 p-0 relative focus-within:z-20 flex items-center justify-center text-sm\",\n day_button: cn(\n \"inline-flex size-8 items-center justify-center rounded-md bg-transparent text-sm font-normal cursor-pointer border-none hover:bg-muted transition-colors\"\n ),\n range_end: \"day-range-end\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground [&>button]:font-medium\",\n today: \"[&>button]:font-semibold [&>button]:text-primary\",\n outside:\n \"day-outside [&>button]:bg-transparent [&>button]:text-muted-foreground [&>button]:opacity-50\",\n disabled: \"[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default\",\n range_middle:\n \"[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none\",\n range_start: \"[&>button]:rounded-e-none\",\n dropdowns: \"flex items-center gap-1.5 justify-center\",\n dropdown:\n \"h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1\",\n months_dropdown: \"w-[104px]\",\n years_dropdown: \"w-[72px]\",\n hidden: \"invisible\",\n ...classNames,\n }}\n captionLayout={captionLayout}\n components={{\n Chevron: ({ orientation }) => {\n const Icon = orientation === \"left\" ? ChevronLeft : ChevronRight\n return <Icon className=\"size-4\" />\n },\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA0B;AAC1B,0BAA0C;;;ACF1C,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD+EiB;AAnEjB,IAAM,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[]}
1
+ {"version":3,"sources":["../../src/components/calendar.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { DayPicker } from \"react-day-picker\"\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n// Module-level so its identity is stable; an inline component remounts the <select> (losing focus) on every Calendar render.\nfunction CalendarSelect({ children, ...selectProps }: React.SelectHTMLAttributes<HTMLSelectElement>) {\n return (\n <>\n <select {...selectProps}>{children}</select>\n <ChevronDown aria-hidden=\"true\" className=\"pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n </>\n )\n}\n\n/**\n * How far the year dropdown reaches when the caller gives no bounds.\n *\n * `captionLayout` defaults to \"dropdown\" here, and react-day-picker then falls\n * back to [currentYear - 100, currentYear] for the year list. That is wrong in\n * both directions: a hundred dead years to scroll past, and no future year at\n * all - a deadline could not be set beyond December of the current year.\n * Callers that know their range pass `startMonth` / `endMonth` and these are\n * not used.\n */\nconst DEFAULT_YEARS_BACK = 10\nconst DEFAULT_YEARS_FORWARD = 10\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"dropdown\",\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const now = new Date()\n const defaultedStartMonth =\n startMonth ?? new Date(now.getFullYear() - DEFAULT_YEARS_BACK, 0, 1)\n const defaultedEndMonth =\n endMonth ?? new Date(now.getFullYear() + DEFAULT_YEARS_FORWARD, 11, 1)\n\n return (\n <DayPicker\n startMonth={defaultedStartMonth}\n endMonth={defaultedEndMonth}\n showOutsideDays={showOutsideDays}\n className={cn(\"w-[260px] rounded-lg p-3\", className)}\n classNames={{\n months: \"relative flex flex-col\",\n month: \"space-y-3\",\n month_caption: \"relative flex h-8 items-center justify-center\",\n caption_label: \"text-sm font-medium hidden\",\n nav: \"absolute inset-x-0 top-0 z-10 flex h-8 items-center pointer-events-none\",\n button_previous: cn(\n \"pointer-events-auto absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n button_next: cn(\n \"pointer-events-auto absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: \"flex w-full\",\n weekday:\n \"flex-1 h-8 flex items-center justify-center text-[11px] font-medium text-muted-foreground uppercase tracking-wider\",\n week: \"flex w-full mt-1\",\n day: \"flex-1 h-8 p-0 relative focus-within:z-20 flex items-center justify-center text-sm\",\n day_button: cn(\n \"inline-flex size-8 items-center justify-center rounded-md bg-transparent text-sm font-normal cursor-pointer border-none hover:bg-muted transition-colors\"\n ),\n range_end: \"day-range-end\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground [&>button]:font-medium\",\n today: \"[&>button]:font-semibold [&>button]:text-primary\",\n outside:\n \"day-outside [&>button]:bg-transparent [&>button]:text-muted-foreground [&>button]:opacity-50\",\n disabled: \"[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default\",\n range_middle:\n \"[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none\",\n range_start: \"[&>button]:rounded-e-none\",\n dropdown_root: \"relative\",\n dropdowns: \"flex items-center gap-1.5 justify-center\",\n dropdown:\n \"h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1\",\n months_dropdown: \"w-[104px]\",\n years_dropdown: \"w-[72px]\",\n hidden: \"invisible\",\n ...classNames,\n }}\n captionLayout={captionLayout}\n components={{\n Select: CalendarSelect,\n Chevron: ({ orientation }) => {\n const Icon = orientation === \"left\" ? ChevronLeft : ChevronRight\n return <Icon className=\"size-4\" />\n },\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA0B;AAC1B,0BAAuD;;;ACFvD,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADKI;AAFJ,SAAS,eAAe,EAAE,UAAU,GAAG,YAAY,GAAkD;AACnG,SACE,4EACE;AAAA,gDAAC,YAAQ,GAAG,aAAc,UAAS;AAAA,IACnC,4CAAC,mCAAY,eAAY,QAAO,WAAU,8FAA6F;AAAA,KACzI;AAEJ;AAYA,IAAM,qBAAqB;AAC3B,IAAM,wBAAwB;AAE9B,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,QAAM,MAAM,oBAAI,KAAK;AACrB,QAAM,sBACJ,cAAc,IAAI,KAAK,IAAI,YAAY,IAAI,oBAAoB,GAAG,CAAC;AACrE,QAAM,oBACJ,YAAY,IAAI,KAAK,IAAI,YAAY,IAAI,uBAAuB,IAAI,CAAC;AAEvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ,UAAU;AAAA,MACV;AAAA,MACA,WAAW,GAAG,4BAA4B,SAAS;AAAA,MACnD,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,eAAe;AAAA,QACf,eAAe;AAAA,QACf,KAAK;AAAA,QACL,iBAAiB;AAAA,UACf;AAAA,QACF;AAAA,QACA,aAAa;AAAA,UACX;AAAA,QACF;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,SACE;AAAA,QACF,MAAM;AAAA,QACN,KAAK;AAAA,QACL,YAAY;AAAA,UACV;AAAA,QACF;AAAA,QACA,WAAW;AAAA,QACX,UACE;AAAA,QACF,OAAO;AAAA,QACP,SACE;AAAA,QACF,UAAU;AAAA,QACV,cACE;AAAA,QACF,aAAa;AAAA,QACb,eAAe;AAAA,QACf,WAAW;AAAA,QACX,UACE;AAAA,QACF,iBAAiB;AAAA,QACjB,gBAAgB;AAAA,QAChB,QAAQ;AAAA,QACR,GAAG;AAAA,MACL;AAAA,MACA;AAAA,MACA,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,SAAS,CAAC,EAAE,YAAY,MAAM;AAC5B,gBAAM,OAAO,gBAAgB,SAAS,kCAAc;AACpD,iBAAO,4CAAC,QAAK,WAAU,UAAS;AAAA,QAClC;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,SAAS,cAAc;","names":[]}
@@ -1,6 +1,6 @@
1
1
  // src/components/calendar.tsx
2
2
  import { DayPicker } from "react-day-picker";
3
- import { ChevronLeft, ChevronRight } from "lucide-react";
3
+ import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react";
4
4
 
5
5
  // src/lib/utils.ts
6
6
  import { clsx } from "clsx";
@@ -10,7 +10,13 @@ function cn(...inputs) {
10
10
  }
11
11
 
12
12
  // src/components/calendar.tsx
13
- import { jsx } from "react/jsx-runtime";
13
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
+ function CalendarSelect({ children, ...selectProps }) {
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ /* @__PURE__ */ jsx("select", { ...selectProps, children }),
17
+ /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: "pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" })
18
+ ] });
19
+ }
14
20
  var DEFAULT_YEARS_BACK = 10;
15
21
  var DEFAULT_YEARS_FORWARD = 10;
16
22
  function Calendar({
@@ -33,16 +39,16 @@ function Calendar({
33
39
  showOutsideDays,
34
40
  className: cn("w-[260px] rounded-lg p-3", className),
35
41
  classNames: {
36
- months: "flex flex-col",
42
+ months: "relative flex flex-col",
37
43
  month: "space-y-3",
38
44
  month_caption: "relative flex h-8 items-center justify-center",
39
45
  caption_label: "text-sm font-medium hidden",
40
- nav: "flex items-center",
46
+ nav: "absolute inset-x-0 top-0 z-10 flex h-8 items-center pointer-events-none",
41
47
  button_previous: cn(
42
- "absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
48
+ "pointer-events-auto absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
43
49
  ),
44
50
  button_next: cn(
45
- "absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
51
+ "pointer-events-auto absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
46
52
  ),
47
53
  month_grid: "w-full border-collapse",
48
54
  weekdays: "flex w-full",
@@ -59,8 +65,9 @@ function Calendar({
59
65
  disabled: "[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default",
60
66
  range_middle: "[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none",
61
67
  range_start: "[&>button]:rounded-e-none",
68
+ dropdown_root: "relative",
62
69
  dropdowns: "flex items-center gap-1.5 justify-center",
63
- dropdown: "h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
70
+ dropdown: "h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
64
71
  months_dropdown: "w-[104px]",
65
72
  years_dropdown: "w-[72px]",
66
73
  hidden: "invisible",
@@ -68,6 +75,7 @@ function Calendar({
68
75
  },
69
76
  captionLayout,
70
77
  components: {
78
+ Select: CalendarSelect,
71
79
  Chevron: ({ orientation }) => {
72
80
  const Icon = orientation === "left" ? ChevronLeft : ChevronRight;
73
81
  return /* @__PURE__ */ jsx(Icon, { className: "size-4" });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/calendar.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { DayPicker } from \"react-day-picker\"\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n/**\n * How far the year dropdown reaches when the caller gives no bounds.\n *\n * `captionLayout` defaults to \"dropdown\" here, and react-day-picker then falls\n * back to [currentYear - 100, currentYear] for the year list. That is wrong in\n * both directions: a hundred dead years to scroll past, and no future year at\n * all - a deadline could not be set beyond December of the current year.\n * Callers that know their range pass `startMonth` / `endMonth` and these are\n * not used.\n */\nconst DEFAULT_YEARS_BACK = 10\nconst DEFAULT_YEARS_FORWARD = 10\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"dropdown\",\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const now = new Date()\n const defaultedStartMonth =\n startMonth ?? new Date(now.getFullYear() - DEFAULT_YEARS_BACK, 0, 1)\n const defaultedEndMonth =\n endMonth ?? new Date(now.getFullYear() + DEFAULT_YEARS_FORWARD, 11, 1)\n\n return (\n <DayPicker\n startMonth={defaultedStartMonth}\n endMonth={defaultedEndMonth}\n showOutsideDays={showOutsideDays}\n className={cn(\"w-[260px] rounded-lg p-3\", className)}\n classNames={{\n months: \"flex flex-col\",\n month: \"space-y-3\",\n month_caption: \"relative flex h-8 items-center justify-center\",\n caption_label: \"text-sm font-medium hidden\",\n nav: \"flex items-center\",\n button_previous: cn(\n \"absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n button_next: cn(\n \"absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: \"flex w-full\",\n weekday:\n \"flex-1 h-8 flex items-center justify-center text-[11px] font-medium text-muted-foreground uppercase tracking-wider\",\n week: \"flex w-full mt-1\",\n day: \"flex-1 h-8 p-0 relative focus-within:z-20 flex items-center justify-center text-sm\",\n day_button: cn(\n \"inline-flex size-8 items-center justify-center rounded-md bg-transparent text-sm font-normal cursor-pointer border-none hover:bg-muted transition-colors\"\n ),\n range_end: \"day-range-end\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground [&>button]:font-medium\",\n today: \"[&>button]:font-semibold [&>button]:text-primary\",\n outside:\n \"day-outside [&>button]:bg-transparent [&>button]:text-muted-foreground [&>button]:opacity-50\",\n disabled: \"[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default\",\n range_middle:\n \"[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none\",\n range_start: \"[&>button]:rounded-e-none\",\n dropdowns: \"flex items-center gap-1.5 justify-center\",\n dropdown:\n \"h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1\",\n months_dropdown: \"w-[104px]\",\n years_dropdown: \"w-[72px]\",\n hidden: \"invisible\",\n ...classNames,\n }}\n captionLayout={captionLayout}\n components={{\n Chevron: ({ orientation }) => {\n const Icon = orientation === \"left\" ? ChevronLeft : ChevronRight\n return <Icon className=\"size-4\" />\n },\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AACA,SAAS,iBAAiB;AAC1B,SAAS,aAAa,oBAAoB;;;ACF1C,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD+EiB;AAnEjB,IAAM,qBAAqB;AAC3B,IAAM,wBAAwB;AAE9B,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,QAAM,MAAM,oBAAI,KAAK;AACrB,QAAM,sBACJ,cAAc,IAAI,KAAK,IAAI,YAAY,IAAI,oBAAoB,GAAG,CAAC;AACrE,QAAM,oBACJ,YAAY,IAAI,KAAK,IAAI,YAAY,IAAI,uBAAuB,IAAI,CAAC;AAEvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ,UAAU;AAAA,MACV;AAAA,MACA,WAAW,GAAG,4BAA4B,SAAS;AAAA,MACnD,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,eAAe;AAAA,QACf,eAAe;AAAA,QACf,KAAK;AAAA,QACL,iBAAiB;AAAA,UACf;AAAA,QACF;AAAA,QACA,aAAa;AAAA,UACX;AAAA,QACF;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,SACE;AAAA,QACF,MAAM;AAAA,QACN,KAAK;AAAA,QACL,YAAY;AAAA,UACV;AAAA,QACF;AAAA,QACA,WAAW;AAAA,QACX,UACE;AAAA,QACF,OAAO;AAAA,QACP,SACE;AAAA,QACF,UAAU;AAAA,QACV,cACE;AAAA,QACF,aAAa;AAAA,QACb,WAAW;AAAA,QACX,UACE;AAAA,QACF,iBAAiB;AAAA,QACjB,gBAAgB;AAAA,QAChB,QAAQ;AAAA,QACR,GAAG;AAAA,MACL;AAAA,MACA;AAAA,MACA,YAAY;AAAA,QACV,SAAS,CAAC,EAAE,YAAY,MAAM;AAC5B,gBAAM,OAAO,gBAAgB,SAAS,cAAc;AACpD,iBAAO,oBAAC,QAAK,WAAU,UAAS;AAAA,QAClC;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,SAAS,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/calendar.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { DayPicker } from \"react-day-picker\"\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n// Module-level so its identity is stable; an inline component remounts the <select> (losing focus) on every Calendar render.\nfunction CalendarSelect({ children, ...selectProps }: React.SelectHTMLAttributes<HTMLSelectElement>) {\n return (\n <>\n <select {...selectProps}>{children}</select>\n <ChevronDown aria-hidden=\"true\" className=\"pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n </>\n )\n}\n\n/**\n * How far the year dropdown reaches when the caller gives no bounds.\n *\n * `captionLayout` defaults to \"dropdown\" here, and react-day-picker then falls\n * back to [currentYear - 100, currentYear] for the year list. That is wrong in\n * both directions: a hundred dead years to scroll past, and no future year at\n * all - a deadline could not be set beyond December of the current year.\n * Callers that know their range pass `startMonth` / `endMonth` and these are\n * not used.\n */\nconst DEFAULT_YEARS_BACK = 10\nconst DEFAULT_YEARS_FORWARD = 10\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"dropdown\",\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const now = new Date()\n const defaultedStartMonth =\n startMonth ?? new Date(now.getFullYear() - DEFAULT_YEARS_BACK, 0, 1)\n const defaultedEndMonth =\n endMonth ?? new Date(now.getFullYear() + DEFAULT_YEARS_FORWARD, 11, 1)\n\n return (\n <DayPicker\n startMonth={defaultedStartMonth}\n endMonth={defaultedEndMonth}\n showOutsideDays={showOutsideDays}\n className={cn(\"w-[260px] rounded-lg p-3\", className)}\n classNames={{\n months: \"relative flex flex-col\",\n month: \"space-y-3\",\n month_caption: \"relative flex h-8 items-center justify-center\",\n caption_label: \"text-sm font-medium hidden\",\n nav: \"absolute inset-x-0 top-0 z-10 flex h-8 items-center pointer-events-none\",\n button_previous: cn(\n \"pointer-events-auto absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n button_next: cn(\n \"pointer-events-auto absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: \"flex w-full\",\n weekday:\n \"flex-1 h-8 flex items-center justify-center text-[11px] font-medium text-muted-foreground uppercase tracking-wider\",\n week: \"flex w-full mt-1\",\n day: \"flex-1 h-8 p-0 relative focus-within:z-20 flex items-center justify-center text-sm\",\n day_button: cn(\n \"inline-flex size-8 items-center justify-center rounded-md bg-transparent text-sm font-normal cursor-pointer border-none hover:bg-muted transition-colors\"\n ),\n range_end: \"day-range-end\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground [&>button]:font-medium\",\n today: \"[&>button]:font-semibold [&>button]:text-primary\",\n outside:\n \"day-outside [&>button]:bg-transparent [&>button]:text-muted-foreground [&>button]:opacity-50\",\n disabled: \"[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default\",\n range_middle:\n \"[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none\",\n range_start: \"[&>button]:rounded-e-none\",\n dropdown_root: \"relative\",\n dropdowns: \"flex items-center gap-1.5 justify-center\",\n dropdown:\n \"h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1\",\n months_dropdown: \"w-[104px]\",\n years_dropdown: \"w-[72px]\",\n hidden: \"invisible\",\n ...classNames,\n }}\n captionLayout={captionLayout}\n components={{\n Select: CalendarSelect,\n Chevron: ({ orientation }) => {\n const Icon = orientation === \"left\" ? ChevronLeft : ChevronRight\n return <Icon className=\"size-4\" />\n },\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AACA,SAAS,iBAAiB;AAC1B,SAAS,aAAa,aAAa,oBAAoB;;;ACFvD,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADKI,mBACE,KADF;AAFJ,SAAS,eAAe,EAAE,UAAU,GAAG,YAAY,GAAkD;AACnG,SACE,iCACE;AAAA,wBAAC,YAAQ,GAAG,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cAAc;AACpD,iBAAO,oBAAC,QAAK,WAAU,UAAS;AAAA,QAClC;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,SAAS,cAAc;","names":[]}
@@ -123,6 +123,12 @@ Button.displayName = "Button";
123
123
  var import_react_day_picker = require("react-day-picker");
124
124
  var import_lucide_react2 = require("lucide-react");
125
125
  var import_jsx_runtime2 = require("react/jsx-runtime");
126
+ function CalendarSelect({ children, ...selectProps }) {
127
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
128
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("select", { ...selectProps, children }),
129
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronDown, { "aria-hidden": "true", className: "pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" })
130
+ ] });
131
+ }
126
132
  var DEFAULT_YEARS_BACK = 10;
127
133
  var DEFAULT_YEARS_FORWARD = 10;
128
134
  function Calendar({
@@ -145,16 +151,16 @@ function Calendar({
145
151
  showOutsideDays,
146
152
  className: cn("w-[260px] rounded-lg p-3", className),
147
153
  classNames: {
148
- months: "flex flex-col",
154
+ months: "relative flex flex-col",
149
155
  month: "space-y-3",
150
156
  month_caption: "relative flex h-8 items-center justify-center",
151
157
  caption_label: "text-sm font-medium hidden",
152
- nav: "flex items-center",
158
+ nav: "absolute inset-x-0 top-0 z-10 flex h-8 items-center pointer-events-none",
153
159
  button_previous: cn(
154
- "absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
160
+ "pointer-events-auto absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
155
161
  ),
156
162
  button_next: cn(
157
- "absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
163
+ "pointer-events-auto absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
158
164
  ),
159
165
  month_grid: "w-full border-collapse",
160
166
  weekdays: "flex w-full",
@@ -171,8 +177,9 @@ function Calendar({
171
177
  disabled: "[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default",
172
178
  range_middle: "[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none",
173
179
  range_start: "[&>button]:rounded-e-none",
180
+ dropdown_root: "relative",
174
181
  dropdowns: "flex items-center gap-1.5 justify-center",
175
- dropdown: "h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
182
+ dropdown: "h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
176
183
  months_dropdown: "w-[104px]",
177
184
  years_dropdown: "w-[72px]",
178
185
  hidden: "invisible",
@@ -180,6 +187,7 @@ function Calendar({
180
187
  },
181
188
  captionLayout,
182
189
  components: {
190
+ Select: CalendarSelect,
183
191
  Chevron: ({ orientation }) => {
184
192
  const Icon = orientation === "left" ? import_lucide_react2.ChevronLeft : import_lucide_react2.ChevronRight;
185
193
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: "size-4" });
@@ -215,7 +223,9 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
215
223
  // src/components/date-picker.tsx
216
224
  var import_jsx_runtime4 = require("react/jsx-runtime");
217
225
  function formatDate(d) {
218
- return d.toLocaleDateString();
226
+ const day = String(d.getDate()).padStart(2, "0");
227
+ const month = String(d.getMonth() + 1).padStart(2, "0");
228
+ return `${day}/${month}/${d.getFullYear()}`;
219
229
  }
220
230
  function DatePicker({
221
231
  date,
@@ -236,7 +246,7 @@ function DatePicker({
236
246
  if (range.from) return formatDate(range.from);
237
247
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: placeholder });
238
248
  }
239
- return date.toLocaleDateString();
249
+ return formatDate(date);
240
250
  }, [date, mode, placeholder]);
241
251
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Popover, { children: [
242
252
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/date-picker.tsx","../../src/lib/utils.ts","../../src/components/button.tsx","../../src/components/calendar.tsx","../../src/components/popover.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { CalendarIcon } from \"lucide-react\"\nimport type { DateRange, Matcher } from \"react-day-picker\"\nimport { cn } from \"../lib/utils\"\nimport { Button } from \"./button\"\nimport { Calendar } from \"./calendar\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\"\n\nexport type DatePickerPreset =\n | { label: string; value: Date }\n | { label: string; value: { from: Date; to: Date } }\n\nexport interface DatePickerProps {\n /** Selected value. For `mode=\"single\"` this is a Date, for `mode=\"range\"` this is a range object. */\n date?: Date | DateRange\n /** Called with the new selection. */\n onDateChange?: (date: Date | DateRange | undefined) => void\n /** Selection mode. Defaults to \"single\". */\n mode?: \"single\" | \"range\"\n /** Placeholder for the trigger when no date is picked. */\n placeholder?: string\n /** Classname applied to the trigger button. */\n className?: string\n /** Optional date format string — reserved for future use. */\n formatStr?: string\n /** Optional preset list rendered in a sidebar to the left of the calendar. */\n presets?: DatePickerPreset[]\n /** Passed through to the underlying Calendar. */\n disabled?: Matcher | Matcher[]\n}\n\nfunction formatDate(d: Date): string {\n return d.toLocaleDateString()\n}\n\nfunction DatePicker({\n date,\n onDateChange,\n mode = \"single\",\n placeholder = \"Pick a date\",\n className,\n presets,\n disabled,\n}: DatePickerProps) {\n const label = React.useMemo(() => {\n if (!date) return <span>{placeholder}</span>\n if (mode === \"range\") {\n const range = date as DateRange\n if (range.from && range.to) {\n return `${formatDate(range.from)} – ${formatDate(range.to)}`\n }\n if (range.from) return formatDate(range.from)\n return <span>{placeholder}</span>\n }\n return (date as Date).toLocaleDateString()\n }, [date, mode, placeholder])\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n className={cn(\n \"w-[280px] justify-start text-left font-normal\",\n !date && \"text-muted-foreground\",\n className\n )}\n >\n <CalendarIcon className=\"me-2 h-4 w-4\" />\n {label}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <div className=\"flex\">\n {presets && presets.length > 0 && (\n <div className=\"flex flex-col gap-1 border-e p-2 min-w-[140px]\">\n {presets.map((preset) => (\n <Button\n key={preset.label}\n variant=\"ghost\"\n size=\"sm\"\n className=\"justify-start font-normal\"\n onClick={() => onDateChange?.(preset.value as Date | DateRange)}\n >\n {preset.label}\n </Button>\n ))}\n </div>\n )}\n <div>\n {mode === \"range\" ? (\n <Calendar\n mode=\"range\"\n selected={date as DateRange | undefined}\n onSelect={(value) => onDateChange?.(value)}\n disabled={disabled}\n // Focus moves into the calendar the user just opened (keyboard navigation).\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n />\n ) : (\n <Calendar\n mode=\"single\"\n selected={date as Date | undefined}\n onSelect={(value) => onDateChange?.(value)}\n disabled={disabled}\n // Focus moves into the calendar the user just opened (keyboard navigation).\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n />\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport { DatePicker }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground hover:bg-primary-hover\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive-hover\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary-hover\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground\",\n link:\n \"text-primary underline-offset-4 hover:underline\",\n success:\n \"bg-success text-success-foreground hover:bg-success-hover\",\n },\n size: {\n xs: \"h-7 px-2.5 text-xs\",\n sm: \"h-9 px-3\",\n default: \"h-10 px-4 py-2\",\n lg: \"h-11 px-8\",\n icon: \"h-10 w-10\",\n \"icon-sm\": \"h-8 w-8\",\n },\n shape: {\n default: \"rounded-md\",\n rounded: \"rounded-lg\",\n pill: \"rounded-full\",\n square: \"rounded-none\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n prefixIcon?: React.ReactNode\n suffixIcon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n shape,\n asChild = false,\n loading = false,\n prefixIcon,\n suffixIcon,\n children,\n disabled,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, shape, className }))}\n ref={ref}\n disabled={isDisabled}\n {...props}\n >\n {loading && <Loader2 className=\"animate-spin\" />}\n {!loading && prefixIcon}\n {children}\n {suffixIcon}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport { DayPicker } from \"react-day-picker\"\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n/**\n * How far the year dropdown reaches when the caller gives no bounds.\n *\n * `captionLayout` defaults to \"dropdown\" here, and react-day-picker then falls\n * back to [currentYear - 100, currentYear] for the year list. That is wrong in\n * both directions: a hundred dead years to scroll past, and no future year at\n * all - a deadline could not be set beyond December of the current year.\n * Callers that know their range pass `startMonth` / `endMonth` and these are\n * not used.\n */\nconst DEFAULT_YEARS_BACK = 10\nconst DEFAULT_YEARS_FORWARD = 10\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"dropdown\",\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const now = new Date()\n const defaultedStartMonth =\n startMonth ?? new Date(now.getFullYear() - DEFAULT_YEARS_BACK, 0, 1)\n const defaultedEndMonth =\n endMonth ?? new Date(now.getFullYear() + DEFAULT_YEARS_FORWARD, 11, 1)\n\n return (\n <DayPicker\n startMonth={defaultedStartMonth}\n endMonth={defaultedEndMonth}\n showOutsideDays={showOutsideDays}\n className={cn(\"w-[260px] rounded-lg p-3\", className)}\n classNames={{\n months: \"flex flex-col\",\n month: \"space-y-3\",\n month_caption: \"relative flex h-8 items-center justify-center\",\n caption_label: \"text-sm font-medium hidden\",\n nav: \"flex items-center\",\n button_previous: cn(\n \"absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n button_next: cn(\n \"absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: \"flex w-full\",\n weekday:\n \"flex-1 h-8 flex items-center justify-center text-[11px] font-medium text-muted-foreground uppercase tracking-wider\",\n week: \"flex w-full mt-1\",\n day: \"flex-1 h-8 p-0 relative focus-within:z-20 flex items-center justify-center text-sm\",\n day_button: cn(\n \"inline-flex size-8 items-center justify-center rounded-md bg-transparent text-sm font-normal cursor-pointer border-none hover:bg-muted transition-colors\"\n ),\n range_end: \"day-range-end\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground [&>button]:font-medium\",\n today: \"[&>button]:font-semibold [&>button]:text-primary\",\n outside:\n \"day-outside [&>button]:bg-transparent [&>button]:text-muted-foreground [&>button]:opacity-50\",\n disabled: \"[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default\",\n range_middle:\n \"[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none\",\n range_start: \"[&>button]:rounded-e-none\",\n dropdowns: \"flex items-center gap-1.5 justify-center\",\n dropdown:\n \"h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1\",\n months_dropdown: \"w-[104px]\",\n years_dropdown: \"w-[72px]\",\n hidden: \"invisible\",\n ...classNames,\n }}\n captionLayout={captionLayout}\n components={{\n Chevron: ({ orientation }) => {\n const Icon = orientation === \"left\" ? ChevronLeft : ChevronRight\n return <Icon className=\"size-4\" />\n },\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { cn } from \"../lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,SAAuB;AACvB,IAAAC,uBAA6B;;;ACD7B,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACJA,YAAuB;AACvB,wBAAqB;AACrB,sCAAuC;AACvC,0BAAwB;AA4ElB;AAzEN,IAAM,qBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OACE;AAAA,QACF,MACE;AAAA,Q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MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS,MAAM,eAAe,OAAO,KAAyB;AAAA,UAE7D,iBAAO;AAAA;AAAA,QANH,OAAO;AAAA,MAOd,CACD,GACH;AAAA,MAEF,6CAAC,SACE,mBAAS,UACR;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU;AAAA,UACV,UAAU,CAAC,UAAU,eAAe,KAAK;AAAA,UACzC;AAAA,UAGA,WAAS;AAAA;AAAA,MACX,IAEA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU;AAAA,UACV,UAAU,CAAC,UAAU,eAAe,KAAK;AAAA,UACzC;AAAA,UAGA,WAAS;AAAA;AAAA,MACX,GAEJ;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":["React","import_lucide_react","import_lucide_react","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/components/date-picker.tsx","../../src/lib/utils.ts","../../src/components/button.tsx","../../src/components/calendar.tsx","../../src/components/popover.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { CalendarIcon } from \"lucide-react\"\nimport type { DateRange, Matcher } from \"react-day-picker\"\nimport { cn } from \"../lib/utils\"\nimport { Button } from \"./button\"\nimport { Calendar } from \"./calendar\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\"\n\nexport type DatePickerPreset =\n | { label: string; value: Date }\n | { label: string; value: { from: Date; to: Date } }\n\nexport interface DatePickerProps {\n /** Selected value. For `mode=\"single\"` this is a Date, for `mode=\"range\"` this is a range object. */\n date?: Date | DateRange\n /** Called with the new selection. */\n onDateChange?: (date: Date | DateRange | undefined) => void\n /** Selection mode. Defaults to \"single\". */\n mode?: \"single\" | \"range\"\n /** Placeholder for the trigger when no date is picked. */\n placeholder?: string\n /** Classname applied to the trigger button. */\n className?: string\n /** Optional date format string — reserved for future use. */\n formatStr?: string\n /** Optional preset list rendered in a sidebar to the left of the calendar. */\n presets?: DatePickerPreset[]\n /** Passed through to the underlying Calendar. */\n disabled?: Matcher | Matcher[]\n}\n\nfunction formatDate(d: Date): string {\n const day = String(d.getDate()).padStart(2, \"0\")\n const month = String(d.getMonth() + 1).padStart(2, \"0\")\n return `${day}/${month}/${d.getFullYear()}`\n}\n\nfunction DatePicker({\n date,\n onDateChange,\n mode = \"single\",\n placeholder = \"Pick a date\",\n className,\n presets,\n disabled,\n}: DatePickerProps) {\n const label = React.useMemo(() => {\n if (!date) return <span>{placeholder}</span>\n if (mode === \"range\") {\n const range = date as DateRange\n if (range.from && range.to) {\n return `${formatDate(range.from)} – ${formatDate(range.to)}`\n }\n if (range.from) return formatDate(range.from)\n return <span>{placeholder}</span>\n }\n return formatDate(date as Date)\n }, [date, mode, placeholder])\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n className={cn(\n \"w-[280px] justify-start text-left font-normal\",\n !date && \"text-muted-foreground\",\n className\n )}\n >\n <CalendarIcon className=\"me-2 h-4 w-4\" />\n {label}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <div className=\"flex\">\n {presets && presets.length > 0 && (\n <div className=\"flex flex-col gap-1 border-e p-2 min-w-[140px]\">\n {presets.map((preset) => (\n <Button\n key={preset.label}\n variant=\"ghost\"\n size=\"sm\"\n className=\"justify-start font-normal\"\n onClick={() => onDateChange?.(preset.value as Date | DateRange)}\n >\n {preset.label}\n </Button>\n ))}\n </div>\n )}\n <div>\n {mode === \"range\" ? (\n <Calendar\n mode=\"range\"\n selected={date as DateRange | undefined}\n onSelect={(value) => onDateChange?.(value)}\n disabled={disabled}\n // Focus moves into the calendar the user just opened (keyboard navigation).\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n />\n ) : (\n <Calendar\n mode=\"single\"\n selected={date as Date | undefined}\n onSelect={(value) => onDateChange?.(value)}\n disabled={disabled}\n // Focus moves into the calendar the user just opened (keyboard navigation).\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n />\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport { DatePicker }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground hover:bg-primary-hover\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive-hover\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary-hover\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground\",\n link:\n \"text-primary underline-offset-4 hover:underline\",\n success:\n \"bg-success text-success-foreground hover:bg-success-hover\",\n },\n size: {\n xs: \"h-7 px-2.5 text-xs\",\n sm: \"h-9 px-3\",\n default: \"h-10 px-4 py-2\",\n lg: \"h-11 px-8\",\n icon: \"h-10 w-10\",\n \"icon-sm\": \"h-8 w-8\",\n },\n shape: {\n default: \"rounded-md\",\n rounded: \"rounded-lg\",\n pill: \"rounded-full\",\n square: \"rounded-none\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n prefixIcon?: React.ReactNode\n suffixIcon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n shape,\n asChild = false,\n loading = false,\n prefixIcon,\n suffixIcon,\n children,\n disabled,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, shape, className }))}\n ref={ref}\n disabled={isDisabled}\n {...props}\n >\n {loading && <Loader2 className=\"animate-spin\" />}\n {!loading && prefixIcon}\n {children}\n {suffixIcon}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport { DayPicker } from \"react-day-picker\"\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n// Module-level so its identity is stable; an inline component remounts the <select> (losing focus) on every Calendar render.\nfunction CalendarSelect({ children, ...selectProps }: React.SelectHTMLAttributes<HTMLSelectElement>) {\n return (\n <>\n <select {...selectProps}>{children}</select>\n <ChevronDown aria-hidden=\"true\" className=\"pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n </>\n )\n}\n\n/**\n * How far the year dropdown reaches when the caller gives no bounds.\n *\n * `captionLayout` defaults to \"dropdown\" here, and react-day-picker then falls\n * back to [currentYear - 100, currentYear] for the year list. That is wrong in\n * both directions: a hundred dead years to scroll past, and no future year at\n * all - a deadline could not be set beyond December of the current year.\n * Callers that know their range pass `startMonth` / `endMonth` and these are\n * not used.\n */\nconst DEFAULT_YEARS_BACK = 10\nconst DEFAULT_YEARS_FORWARD = 10\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"dropdown\",\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const now = new Date()\n const defaultedStartMonth =\n startMonth ?? new Date(now.getFullYear() - DEFAULT_YEARS_BACK, 0, 1)\n const defaultedEndMonth =\n endMonth ?? new Date(now.getFullYear() + DEFAULT_YEARS_FORWARD, 11, 1)\n\n return (\n <DayPicker\n startMonth={defaultedStartMonth}\n endMonth={defaultedEndMonth}\n showOutsideDays={showOutsideDays}\n className={cn(\"w-[260px] rounded-lg p-3\", className)}\n classNames={{\n months: \"relative flex flex-col\",\n month: \"space-y-3\",\n month_caption: \"relative flex h-8 items-center justify-center\",\n caption_label: \"text-sm font-medium hidden\",\n nav: \"absolute inset-x-0 top-0 z-10 flex h-8 items-center pointer-events-none\",\n button_previous: cn(\n \"pointer-events-auto absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n button_next: cn(\n \"pointer-events-auto absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none\"\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: \"flex w-full\",\n weekday:\n \"flex-1 h-8 flex items-center justify-center text-[11px] font-medium text-muted-foreground uppercase tracking-wider\",\n week: \"flex w-full mt-1\",\n day: \"flex-1 h-8 p-0 relative focus-within:z-20 flex items-center justify-center text-sm\",\n day_button: cn(\n \"inline-flex size-8 items-center justify-center rounded-md bg-transparent text-sm font-normal cursor-pointer border-none hover:bg-muted transition-colors\"\n ),\n range_end: \"day-range-end\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground [&>button]:font-medium\",\n today: \"[&>button]:font-semibold [&>button]:text-primary\",\n outside:\n \"day-outside [&>button]:bg-transparent [&>button]:text-muted-foreground [&>button]:opacity-50\",\n disabled: \"[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default\",\n range_middle:\n \"[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none\",\n range_start: \"[&>button]:rounded-e-none\",\n dropdown_root: \"relative\",\n dropdowns: \"flex items-center gap-1.5 justify-center\",\n dropdown:\n \"h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1\",\n months_dropdown: \"w-[104px]\",\n years_dropdown: \"w-[72px]\",\n hidden: \"invisible\",\n ...classNames,\n }}\n captionLayout={captionLayout}\n components={{\n Select: CalendarSelect,\n Chevron: ({ orientation }) => {\n const Icon = orientation === \"left\" ? ChevronLeft : ChevronRight\n return <Icon className=\"size-4\" />\n },\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { cn } from \"../lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\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AAAA,UACL,UAAU;AAAA,UACV,UAAU,CAAC,UAAU,eAAe,KAAK;AAAA,UACzC;AAAA,UAGA,WAAS;AAAA;AAAA,MACX,GAEJ;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":["React","import_lucide_react","import_lucide_react","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime"]}