@deftui/react 0.2.4 → 0.3.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 (64) hide show
  1. package/README.md +2 -4
  2. package/dist/index.d.mts +7 -7
  3. package/dist/index.mjs +5 -5
  4. package/dist/styles.css +3 -0
  5. package/dist/vendor/README.md +8 -8
  6. package/dist/vendor/coss/calendar.d.mts +4 -0
  7. package/dist/vendor/coss/calendar.mjs +70 -0
  8. package/dist/vendor/coss/card.d.mts +23 -0
  9. package/dist/vendor/coss/card.mjs +160 -0
  10. package/dist/vendor/coss/dialog.d.mts +1 -1
  11. package/dist/vendor/coss/dialog.mjs +1 -1
  12. package/dist/vendor/coss/form.d.mts +1 -0
  13. package/dist/vendor/coss/form.mjs +1 -0
  14. package/dist/vendor/coss/scroll-area.d.mts +1 -0
  15. package/dist/vendor/coss/scroll-area.mjs +1 -0
  16. package/dist/vendor/coss/table.d.mts +15 -0
  17. package/dist/vendor/coss/table.mjs +73 -0
  18. package/dist/vendor/shadcn/badge.d.mts +1 -0
  19. package/dist/vendor/shadcn/badge.mjs +1 -0
  20. package/dist/vendor/shadcn/button.d.mts +1 -0
  21. package/dist/vendor/shadcn/button.mjs +1 -0
  22. package/dist/vendor/shadcn/checkbox.d.mts +1 -0
  23. package/dist/vendor/shadcn/checkbox.mjs +1 -0
  24. package/dist/vendor/shadcn/input.d.mts +1 -0
  25. package/dist/vendor/shadcn/input.mjs +1 -0
  26. package/dist/vendor/shadcn/label.d.mts +1 -0
  27. package/dist/vendor/shadcn/label.mjs +1 -0
  28. package/dist/vendor/shadcn/separator.d.mts +1 -0
  29. package/dist/vendor/shadcn/separator.mjs +1 -0
  30. package/dist/vendor/shadcn/skeleton.d.mts +1 -0
  31. package/dist/vendor/shadcn/skeleton.mjs +1 -0
  32. package/dist/vendor/shadcn/spinner.d.mts +1 -0
  33. package/dist/vendor/shadcn/spinner.mjs +1 -0
  34. package/dist/vendor/shadcn/switch.d.mts +1 -0
  35. package/dist/vendor/shadcn/switch.mjs +1 -0
  36. package/dist/vendor/shadcn/textarea.d.mts +1 -0
  37. package/dist/vendor/shadcn/textarea.mjs +1 -0
  38. package/dist/vendor/tailored/file-tree.d.mts +1 -0
  39. package/dist/vendor/tailored/file-tree.mjs +1 -0
  40. package/dist/vendor/tailored/icon-swap.d.mts +1 -0
  41. package/dist/vendor/tailored/icon-swap.mjs +1 -0
  42. package/dist/vendor/tailored/json-viewer.d.mts +1 -0
  43. package/dist/vendor/tailored/json-viewer.mjs +1 -0
  44. package/dist/vendor/tailored/lightbox.d.mts +1 -1
  45. package/dist/vendor/tailored/lightbox.mjs +1 -1
  46. package/dist/widgets/datetime.d.mts +1 -1
  47. package/dist/widgets/datetime.mjs +6 -1
  48. package/dist/widgets/dropzone.d.mts +5 -3
  49. package/dist/widgets/dropzone.mjs +11 -7
  50. package/dist/widgets/index.d.mts +38 -12
  51. package/dist/widgets/index.mjs +35 -8
  52. package/dist/widgets/multimedia.d.mts +2 -0
  53. package/dist/widgets/multimedia.mjs +2 -0
  54. package/dist/widgets/pagination.d.mts +1 -0
  55. package/dist/widgets/pagination.mjs +1 -0
  56. package/dist/widgets/sidebar.d.mts +1 -0
  57. package/dist/widgets/sidebar.mjs +1 -0
  58. package/package.json +1 -1
  59. package/dist/vendor/shadcn/calendar.d.mts +0 -10
  60. package/dist/vendor/shadcn/calendar.mjs +0 -107
  61. package/dist/vendor/shadcn/card.d.mts +0 -11
  62. package/dist/vendor/shadcn/card.mjs +0 -55
  63. package/dist/vendor/shadcn/table.d.mts +0 -9
  64. package/dist/vendor/shadcn/table.mjs +0 -59
@@ -1,15 +1,15 @@
1
1
  import { AlertDialog as AlertDialog$1, AlertDialogClose, AlertDialogContent as AlertDialogPopup, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../vendor/coss/alert-dialog.mjs";
2
+ import { Card as Card$1, CardAction, CardContent as CardPanel, CardDescription, CardFooter, CardFrame, CardFrameAction, CardFrameDescription, CardFrameFooter, CardFrameHeader, CardFrameTitle, CardHeader, CardTitle } from "../vendor/coss/card.mjs";
2
3
  import { Spinner } from "../vendor/shadcn/spinner.mjs";
3
4
  import { Button } from "../vendor/shadcn/button.mjs";
4
5
  import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
5
6
  import { Dialog as Dialog$1, DialogClose, DialogContent as DialogPopup, DialogDescription, DialogFooter, DialogHeader, DialogPanel, DialogTitle, DialogTrigger } from "../vendor/coss/dialog.mjs";
6
7
  import { Drawer as Drawer$1, DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerPopup, DrawerTitle, DrawerTrigger } from "../vendor/coss/drawer.mjs";
7
8
  import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/coss/empty.mjs";
9
+ import { Table as Table$1, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "../vendor/coss/table.mjs";
8
10
  import { Breadcrumb as Breadcrumb$1, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../vendor/shadcn/breadcrumb.mjs";
9
11
  import { Separator } from "../vendor/shadcn/separator.mjs";
10
12
  import { ButtonGroup as ButtonGroup$1, ButtonGroupSeparator, ButtonGroupText } from "../vendor/shadcn/button-group.mjs";
11
- import { Calendar as Calendar$1, CalendarDayButton } from "../vendor/shadcn/calendar.mjs";
12
- import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../vendor/shadcn/card.mjs";
13
13
  import { Input } from "../vendor/shadcn/input.mjs";
14
14
  import { Textarea } from "../vendor/shadcn/textarea.mjs";
15
15
  import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from "../vendor/shadcn/combobox.mjs";
@@ -22,44 +22,57 @@ import { Popover as Popover$1, PopoverContent, PopoverDescription, PopoverTitle,
22
22
  import { Progress as Progress$1, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from "../vendor/shadcn/progress.mjs";
23
23
  import { RadioGroup, RadioGroupItem } from "../vendor/shadcn/radio-group.mjs";
24
24
  import { Select as Select$1, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from "../vendor/shadcn/select.mjs";
25
- import { Table as Table$1, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "../vendor/shadcn/table.mjs";
26
25
  import { Tabs as Tabs$1, TabsContent, TabsList, TabsTrigger } from "../vendor/shadcn/tabs.mjs";
27
26
  import { Tooltip as Tooltip$1, TooltipContent, TooltipProvider, TooltipTrigger } from "../vendor/shadcn/tooltip.mjs";
28
27
  import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
29
28
  import { Skeleton } from "../vendor/shadcn/skeleton.mjs";
30
29
  import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
31
30
  import { Sidebar } from "./sidebar.mjs";
31
+ import { Calendar } from "../vendor/coss/calendar.mjs";
32
32
  import { DatePicker, DateRangePicker, TimePicker } from "./datetime.mjs";
33
- import { Dropzone, formatSize } from "./dropzone.mjs";
33
+ import { Dropzone, formatBytes, useDropzone } from "./dropzone.mjs";
34
34
  import { Carousel, Image, Lightbox } from "./multimedia.mjs";
35
35
  import { Pagination } from "./pagination.mjs";
36
- import { Form } from "../vendor/coss/form.mjs";
37
36
  import { Badge } from "../vendor/shadcn/badge.mjs";
38
37
  import { Switch } from "../vendor/shadcn/switch.mjs";
39
38
  import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
39
+ import { Form } from "../vendor/coss/form.mjs";
40
40
  import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
41
41
  import { JsonViewer } from "../vendor/tailored/json-viewer.mjs";
42
42
  import { FileTree } from "../vendor/tailored/file-tree.mjs";
43
43
  // src/widgets/index.ts
44
+ /** https://ui.shadcn.com/docs/components/base/kbd */
44
45
  const Kbd = /* @__PURE__ */ Object.assign(Kbd$1, { Group: KbdGroup });
46
+ /** https://ui.shadcn.com/docs/components/base/tabs */
45
47
  const Tabs = /* @__PURE__ */ Object.assign(Tabs$1, {
46
48
  List: TabsList,
47
49
  Trigger: TabsTrigger,
48
50
  Content: TabsContent
49
51
  });
52
+ /** https://coss.com/ui/docs/components/card */
50
53
  const Card = /* @__PURE__ */ Object.assign(Card$1, {
51
54
  Header: CardHeader,
52
- Content: CardContent,
55
+ Panel: CardPanel,
53
56
  Footer: CardFooter,
54
57
  Title: CardTitle,
55
58
  Action: CardAction,
56
59
  Description: CardDescription
57
60
  });
61
+ /** https://coss.com/ui/docs/components/card#cardframe */
62
+ const Frame = /* @__PURE__ */ Object.assign(CardFrame, {
63
+ Header: CardFrameHeader,
64
+ Footer: CardFrameFooter,
65
+ Title: CardFrameTitle,
66
+ Description: CardFrameDescription,
67
+ Action: CardFrameAction
68
+ });
69
+ /** https://ui.shadcn.com/docs/components/base/field */
58
70
  const Field = /* @__PURE__ */ Object.assign(Field$1, {
59
71
  Label: FieldLabel,
60
72
  Description: FieldDescription,
61
73
  Error: FieldError
62
74
  });
75
+ /** https://coss.com/ui/docs/components/empty */
63
76
  const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
64
77
  Header: EmptyHeader,
65
78
  Content: EmptyContent,
@@ -67,15 +80,19 @@ const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
67
80
  Title: EmptyTitle,
68
81
  Description: EmptyDescription
69
82
  });
83
+ /** https://coss.com/ui/docs/components/table */
70
84
  const Table = /* @__PURE__ */ Object.assign(Table$1, {
71
85
  Header: TableHeader,
72
86
  Body: TableBody,
73
87
  Footer: TableFooter,
88
+ Caption: TableCaption,
74
89
  Row: TableRow,
75
90
  Head: TableHead,
76
91
  Cell: TableCell
77
92
  });
93
+ /** https://ui.shadcn.com/docs/components/base/radio-group */
78
94
  const Radio = /* @__PURE__ */ Object.assign(RadioGroupItem, { Group: RadioGroup });
95
+ /** https://ui.shadcn.com/docs/components/base/select */
79
96
  const Select = /* @__PURE__ */ Object.assign(Select$1, {
80
97
  Trigger: SelectTrigger,
81
98
  Value: SelectValue,
@@ -85,6 +102,7 @@ const Select = /* @__PURE__ */ Object.assign(Select$1, {
85
102
  Label: SelectLabel,
86
103
  Item: SelectItem
87
104
  });
105
+ /** https://coss.com/ui/docs/components/drawer */
88
106
  const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
89
107
  Trigger: DrawerTrigger,
90
108
  Close: DrawerClose,
@@ -95,6 +113,7 @@ const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
95
113
  Title: DrawerTitle,
96
114
  Description: DrawerDescription
97
115
  });
116
+ /** https://coss.com/ui/docs/components/dialog */
98
117
  const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
99
118
  Trigger: DialogTrigger,
100
119
  Close: DialogClose,
@@ -105,17 +124,20 @@ const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
105
124
  Title: DialogTitle,
106
125
  Description: DialogDescription
107
126
  });
127
+ /** https://ui.shadcn.com/docs/components/base/tooltip */
108
128
  const Tooltip = /* @__PURE__ */ Object.assign(Tooltip$1, {
109
129
  Provider: TooltipProvider,
110
130
  Trigger: TooltipTrigger,
111
131
  Content: TooltipContent
112
132
  });
133
+ /** https://ui.shadcn.com/docs/components/base/popover */
113
134
  const Popover = /* @__PURE__ */ Object.assign(Popover$1, {
114
135
  Trigger: PopoverTrigger,
115
136
  Content: PopoverContent,
116
137
  Title: PopoverTitle,
117
138
  Description: PopoverDescription
118
139
  });
140
+ /** https://ui.shadcn.com/docs/components/base/dropdown-menu */
119
141
  const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
120
142
  Trigger: DropdownMenuTrigger,
121
143
  Content: DropdownMenuContent,
@@ -131,6 +153,7 @@ const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
131
153
  RadioGroup: DropdownMenuRadioGroup,
132
154
  CheckboxItem: DropdownMenuCheckboxItem
133
155
  });
156
+ /** https://ui.shadcn.com/docs/components/base/combobox */
134
157
  const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
135
158
  Content: ComboboxContent,
136
159
  Empty: ComboboxEmpty,
@@ -146,13 +169,14 @@ const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
146
169
  Item: ComboboxItem,
147
170
  Separator: ComboboxSeparator
148
171
  });
172
+ /** https://ui.shadcn.com/docs/components/base/progress */
149
173
  const Progress = /* @__PURE__ */ Object.assign(Progress$1, {
150
174
  Label: ProgressLabel,
151
175
  Value: ProgressValue,
152
176
  Track: ProgressTrack,
153
177
  Indicator: ProgressIndicator
154
178
  });
155
- const Calendar = /* @__PURE__ */ Object.assign(Calendar$1, { DayButton: CalendarDayButton });
179
+ /** https://ui.shadcn.com/docs/components/base/breadcrumb */
156
180
  const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
157
181
  List: BreadcrumbList,
158
182
  Item: BreadcrumbItem,
@@ -161,6 +185,7 @@ const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
161
185
  Ellipsis: BreadcrumbEllipsis,
162
186
  Page: BreadcrumbPage
163
187
  });
188
+ /** https://coss.com/ui/docs/components/alert-dialog */
164
189
  const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
165
190
  Trigger: AlertDialogTrigger,
166
191
  Close: AlertDialogClose,
@@ -170,10 +195,12 @@ const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
170
195
  Title: AlertDialogTitle,
171
196
  Description: AlertDialogDescription
172
197
  });
198
+ /** https://ui.shadcn.com/docs/components/base/button-group */
173
199
  const ButtonGroup = /* @__PURE__ */ Object.assign(ButtonGroup$1, {
174
200
  Text: ButtonGroupText,
175
201
  Separator: ButtonGroupSeparator
176
202
  });
203
+ /** https://ui.shadcn.com/docs/components/base/input-group */
177
204
  const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
178
205
  Addon: InputGroupAddon,
179
206
  AddonText: InputGroupText,
@@ -181,4 +208,4 @@ const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
181
208
  Textarea: InputGroupTextarea,
182
209
  Button: InputGroupButton
183
210
  });
184
- export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, formatSize, toast, useSidebar };
211
+ export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, Frame, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, formatBytes, toast, useDropzone, useSidebar };
@@ -1,10 +1,12 @@
1
1
  import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../vendor/shadcn/carousel.mjs";
2
2
  import { Lightbox as Lightbox$1, LightboxActions, LightboxBackdrop, LightboxCaptions, LightboxChangeReason, LightboxClose, LightboxContent, LightboxControl, LightboxControlContext, LightboxCounter, LightboxDownload, LightboxImageChangeEventDetails, LightboxImageItem, LightboxItem, LightboxMore, LightboxNext, LightboxOpenEventDetails, LightboxPrevious, LightboxProps, LightboxSlide, LightboxSlides, LightboxThumbnail, LightboxThumbnails, LightboxToolbar, LightboxTrigger, LightboxTriggerProps, LightboxVideoItem, LightboxViewport, LightboxZoom, LightboxZoomButton, useLightbox } from "../vendor/tailored/lightbox.mjs";
3
3
  import { ComponentProps, ReactNode } from "react";
4
+ /** https://ui.iandefined.com/docs/components/lightbox/ */
4
5
  export declare const Lightbox: typeof Lightbox$1 & {
5
6
  Trigger: typeof LightboxTrigger;
6
7
  Content: typeof LightboxContent;
7
8
  };
9
+ /** https://ui.shadcn.com/docs/components/base/carousel */
8
10
  export declare const Carousel: typeof Carousel$1 & {
9
11
  Content: typeof CarouselContent;
10
12
  Previous: typeof CarouselPrevious;
@@ -4,10 +4,12 @@ import { cn } from "cn";
4
4
  import { useEffect, useImperativeHandle, useRef, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  // src/widgets/multimedia.tsx
7
+ /** https://ui.iandefined.com/docs/components/lightbox/ */
7
8
  const Lightbox = /* @__PURE__ */ Object.assign(Lightbox$1, {
8
9
  Trigger: LightboxTrigger,
9
10
  Content: LightboxContent
10
11
  });
12
+ /** https://ui.shadcn.com/docs/components/base/carousel */
11
13
  const Carousel = /* @__PURE__ */ Object.assign(Carousel$1, {
12
14
  Content: CarouselContent,
13
15
  Previous: CarouselPrevious,
@@ -1,4 +1,5 @@
1
1
  import { Pagination as Pagination$1, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../vendor/shadcn/pagination.mjs";
2
+ /** https://ui.shadcn.com/docs/components/base/pagination */
2
3
  export declare const Pagination: typeof Pagination$1 & {
3
4
  Content: typeof PaginationContent;
4
5
  Item: typeof PaginationItem;
@@ -1,5 +1,6 @@
1
1
  import { Pagination as Pagination$1, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../vendor/shadcn/pagination.mjs";
2
2
  // src/widgets/pagination.tsx
3
+ /** https://ui.shadcn.com/docs/components/base/pagination */
3
4
  const Pagination = /* @__PURE__ */ Object.assign(Pagination$1, {
4
5
  Content: PaginationContent,
5
6
  Item: PaginationItem,
@@ -1,4 +1,5 @@
1
1
  import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "../vendor/shadcn/sidebar.mjs";
2
+ /** https://ui.shadcn.com/docs/components/base/sidebar */
2
3
  export declare const Sidebar: typeof Sidebar$1 & {
3
4
  Provider: typeof SidebarProvider;
4
5
  Inset: typeof SidebarInset;
@@ -1,5 +1,6 @@
1
1
  import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "../vendor/shadcn/sidebar.mjs";
2
2
  // src/widgets/sidebar.tsx
3
+ /** https://ui.shadcn.com/docs/components/base/sidebar */
3
4
  const Sidebar = /* @__PURE__ */ Object.assign(Sidebar$1, {
4
5
  Provider: SidebarProvider,
5
6
  Inset: SidebarInset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftui/react",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/KiriRainCat/deftui.git",
@@ -1,10 +0,0 @@
1
- import { Button } from "./button.mjs";
2
- import * as React$1 from "react";
3
- import { DayButton, DayPicker, Locale } from "@daypicker/react";
4
- declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: React$1.ComponentProps<typeof DayPicker> & {
5
- buttonVariant?: React$1.ComponentProps<typeof Button>["variant"];
6
- }): React$1.JSX.Element;
7
- declare function CalendarDayButton({ className, day, modifiers, locale, ...props }: React$1.ComponentProps<typeof DayButton> & {
8
- locale?: Partial<Locale>;
9
- }): React$1.JSX.Element;
10
- export { Calendar, CalendarDayButton };
@@ -1,107 +0,0 @@
1
- "use client";
2
- import { Button, buttonVariants } from "./button.mjs";
3
- import { cn } from "cn";
4
- import * as React$1 from "react";
5
- import { jsx } from "react/jsx-runtime";
6
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
7
- import { DayPicker, getDefaultClassNames } from "@daypicker/react";
8
- // src/vendor/shadcn/calendar.tsx
9
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, ...props }) {
10
- const defaultClassNames = getDefaultClassNames();
11
- return /* @__PURE__ */ jsx(DayPicker, {
12
- showOutsideDays,
13
- className: cn("group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
14
- captionLayout,
15
- locale,
16
- formatters: {
17
- formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
18
- ...formatters
19
- },
20
- classNames: {
21
- root: cn("w-fit", defaultClassNames.root),
22
- months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
23
- month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
24
- nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
25
- button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
26
- button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
27
- month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
28
- dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
29
- dropdown_root: cn("relative rounded-(--cell-radius)", defaultClassNames.dropdown_root),
30
- dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
31
- caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
32
- month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
33
- weekdays: cn("flex", defaultClassNames.weekdays),
34
- weekday: cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
35
- week: cn("mt-2 flex w-full", defaultClassNames.week),
36
- week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
37
- week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
38
- day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", defaultClassNames.day),
39
- range_start: cn("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
40
- range_middle: cn("rounded-none", defaultClassNames.range_middle),
41
- range_end: cn("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
42
- today: cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
43
- outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
44
- disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
45
- hidden: cn("invisible", defaultClassNames.hidden),
46
- ...classNames
47
- },
48
- components: {
49
- Root: ({ className, rootRef, ...props }) => {
50
- return /* @__PURE__ */ jsx("div", {
51
- "data-slot": "calendar",
52
- ref: rootRef,
53
- className: cn(className),
54
- ...props
55
- });
56
- },
57
- Chevron: ({ className, orientation, ...props }) => {
58
- if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {
59
- className: cn("size-4", className),
60
- ...props
61
- });
62
- if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {
63
- className: cn("size-4", className),
64
- ...props
65
- });
66
- return /* @__PURE__ */ jsx(ChevronDownIcon, {
67
- className: cn("size-4", className),
68
- ...props
69
- });
70
- },
71
- DayButton: ({ ...props }) => /* @__PURE__ */ jsx(CalendarDayButton, {
72
- locale,
73
- ...props
74
- }),
75
- WeekNumber: ({ children, ...props }) => {
76
- return /* @__PURE__ */ jsx("td", {
77
- ...props,
78
- children: /* @__PURE__ */ jsx("div", {
79
- className: "flex size-(--cell-size) items-center justify-center text-center",
80
- children
81
- })
82
- });
83
- },
84
- ...components
85
- },
86
- ...props
87
- });
88
- }
89
- function CalendarDayButton({ className, day, modifiers, locale, ...props }) {
90
- const defaultClassNames = getDefaultClassNames();
91
- const ref = React$1.useRef(null);
92
- React$1.useEffect(() => {
93
- if (modifiers.focused) ref.current?.focus();
94
- }, [modifiers.focused]);
95
- return /* @__PURE__ */ jsx(Button, {
96
- variant: "ghost",
97
- size: "icon",
98
- "data-day": day.date.toLocaleDateString(locale?.code),
99
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
100
- "data-range-start": modifiers.range_start,
101
- "data-range-end": modifiers.range_end,
102
- "data-range-middle": modifiers.range_middle,
103
- className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
104
- ...props
105
- });
106
- }
107
- export { Calendar, CalendarDayButton };
@@ -1,11 +0,0 @@
1
- import * as React$1 from "react";
2
- declare function Card({ className, size, ...props }: React$1.ComponentProps<"div"> & {
3
- size?: "default" | "sm";
4
- }): React$1.JSX.Element;
5
- declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
6
- declare function CardTitle({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
7
- declare function CardDescription({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
8
- declare function CardAction({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
9
- declare function CardContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
10
- declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
11
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -1,55 +0,0 @@
1
- import { cn } from "cn";
2
- import "react";
3
- import { jsx } from "react/jsx-runtime";
4
- // src/vendor/shadcn/card.tsx
5
- function Card({ className, size = "default", ...props }) {
6
- return /* @__PURE__ */ jsx("div", {
7
- "data-slot": "card",
8
- "data-size": size,
9
- className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
10
- ...props
11
- });
12
- }
13
- function CardHeader({ className, ...props }) {
14
- return /* @__PURE__ */ jsx("div", {
15
- "data-slot": "card-header",
16
- className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
17
- ...props
18
- });
19
- }
20
- function CardTitle({ className, ...props }) {
21
- return /* @__PURE__ */ jsx("div", {
22
- "data-slot": "card-title",
23
- className: cn("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className),
24
- ...props
25
- });
26
- }
27
- function CardDescription({ className, ...props }) {
28
- return /* @__PURE__ */ jsx("div", {
29
- "data-slot": "card-description",
30
- className: cn("text-sm text-muted-foreground", className),
31
- ...props
32
- });
33
- }
34
- function CardAction({ className, ...props }) {
35
- return /* @__PURE__ */ jsx("div", {
36
- "data-slot": "card-action",
37
- className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
38
- ...props
39
- });
40
- }
41
- function CardContent({ className, ...props }) {
42
- return /* @__PURE__ */ jsx("div", {
43
- "data-slot": "card-content",
44
- className: cn("flex flex-col gap-3 px-(--card-spacing)", className),
45
- ...props
46
- });
47
- }
48
- function CardFooter({ className, ...props }) {
49
- return /* @__PURE__ */ jsx("div", {
50
- "data-slot": "card-footer",
51
- className: cn("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)", className),
52
- ...props
53
- });
54
- }
55
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -1,9 +0,0 @@
1
- import * as React$1 from "react";
2
- declare function Table({ className, ...props }: React$1.ComponentProps<"table">): React$1.JSX.Element;
3
- declare function TableHeader({ className, ...props }: React$1.ComponentProps<"thead">): React$1.JSX.Element;
4
- declare function TableBody({ className, ...props }: React$1.ComponentProps<"tbody">): React$1.JSX.Element;
5
- declare function TableFooter({ className, ...props }: React$1.ComponentProps<"tfoot">): React$1.JSX.Element;
6
- declare function TableRow({ className, ...props }: React$1.ComponentProps<"tr">): React$1.JSX.Element;
7
- declare function TableHead({ className, ...props }: React$1.ComponentProps<"th">): React$1.JSX.Element;
8
- declare function TableCell({ className, ...props }: React$1.ComponentProps<"td">): React$1.JSX.Element;
9
- export { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -1,59 +0,0 @@
1
- "use client";
2
- import { cn } from "cn";
3
- import "react";
4
- import { jsx } from "react/jsx-runtime";
5
- // src/vendor/shadcn/table.tsx
6
- function Table({ className, ...props }) {
7
- return /* @__PURE__ */ jsx("div", {
8
- "data-slot": "table-container",
9
- className: "relative w-full overflow-x-auto",
10
- children: /* @__PURE__ */ jsx("table", {
11
- "data-slot": "table",
12
- className: cn("w-full caption-bottom text-sm", className),
13
- ...props
14
- })
15
- });
16
- }
17
- function TableHeader({ className, ...props }) {
18
- return /* @__PURE__ */ jsx("thead", {
19
- "data-slot": "table-header",
20
- className: cn("[&_tr]:border-b", className),
21
- ...props
22
- });
23
- }
24
- function TableBody({ className, ...props }) {
25
- return /* @__PURE__ */ jsx("tbody", {
26
- "data-slot": "table-body",
27
- className: cn("[&_tr:last-child]:border-0", className),
28
- ...props
29
- });
30
- }
31
- function TableFooter({ className, ...props }) {
32
- return /* @__PURE__ */ jsx("tfoot", {
33
- "data-slot": "table-footer",
34
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
35
- ...props
36
- });
37
- }
38
- function TableRow({ className, ...props }) {
39
- return /* @__PURE__ */ jsx("tr", {
40
- "data-slot": "table-row",
41
- className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
42
- ...props
43
- });
44
- }
45
- function TableHead({ className, ...props }) {
46
- return /* @__PURE__ */ jsx("th", {
47
- "data-slot": "table-head",
48
- className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
49
- ...props
50
- });
51
- }
52
- function TableCell({ className, ...props }) {
53
- return /* @__PURE__ */ jsx("td", {
54
- "data-slot": "table-cell",
55
- className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
56
- ...props
57
- });
58
- }
59
- export { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow };