@deftui/react 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -2
- package/dist/index.mjs +6 -2
- package/dist/styles.css +4 -1
- package/dist/vendor/README.md +65 -0
- package/dist/vendor/coss/scroll-area.d.mts +2 -2
- package/dist/vendor/coss/scroll-area.mjs +2 -2
- package/dist/vendor/shadcn/alert-dialog.d.mts +10 -8
- package/dist/vendor/shadcn/alert-dialog.mjs +14 -11
- package/dist/vendor/shadcn/combobox.d.mts +16 -14
- package/dist/vendor/shadcn/combobox.mjs +23 -20
- package/dist/vendor/shadcn/dialog.d.mts +10 -8
- package/dist/vendor/shadcn/dialog.mjs +15 -12
- package/dist/vendor/shadcn/drawer.d.mts +10 -8
- package/dist/vendor/shadcn/drawer.mjs +16 -13
- package/dist/vendor/shadcn/field.mjs +0 -1
- package/dist/vendor/shadcn/input.mjs +1 -1
- package/dist/vendor/shadcn/sidebar.mjs +0 -1
- package/dist/vendor/shadcn/skeleton.mjs +11 -3
- package/dist/vendor/tailored/lightbox.d.mts +187 -0
- package/dist/vendor/tailored/lightbox.mjs +2395 -0
- package/dist/widgets/breadcrumb.mjs +1 -1
- package/dist/widgets/index.d.mts +10 -15
- package/dist/widgets/index.mjs +27 -35
- package/dist/widgets/multimedia.d.mts +22 -0
- package/dist/widgets/multimedia.mjs +69 -0
- package/dist/widgets/pagination.mjs +1 -1
- package/dist/widgets/sidebar.mjs +1 -1
- package/dist/widgets/utils.d.mts +5 -0
- package/package.json +5 -1
- package/dist/vendor.css +0 -1
- package/dist/widgets/image-display.d.mts +0 -12
- package/dist/widgets/image-display.mjs +0 -29
- package/dist/widgets/toast.mjs +0 -1
|
@@ -9,7 +9,7 @@ function BreadcrumbAST({ children, ...props }) {
|
|
|
9
9
|
children: /* @__PURE__ */ jsx(Breadcrumb.List, { children: castArray(children).map((item, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [index > 0 && /* @__PURE__ */ jsx(Breadcrumb.Separator, {}), /* @__PURE__ */ jsx(Breadcrumb.Item, { children: item })] }, item.key ?? index)) })
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
const Breadcrumb = Object.assign(Breadcrumb$1, {
|
|
12
|
+
const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
|
|
13
13
|
AST: BreadcrumbAST,
|
|
14
14
|
Root: Breadcrumb$1,
|
|
15
15
|
List: BreadcrumbList,
|
package/dist/widgets/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
2
|
-
import { AlertDialog as AlertDialog$1, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter,
|
|
2
|
+
import { AlertDialog as AlertDialog$1, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHandle, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, createAlertDialogHandle } from "../vendor/shadcn/alert-dialog.mjs";
|
|
3
3
|
import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../vendor/shadcn/card.mjs";
|
|
4
|
-
import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList,
|
|
5
|
-
import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter,
|
|
6
|
-
import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter,
|
|
4
|
+
import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemCollection, ComboboxLabel, ComboboxList, ComboboxPrimitiveValue, ComboboxValue, CreateComboboxItemsOptions, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
|
|
5
|
+
import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHandle, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
|
|
6
|
+
import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
|
|
7
7
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
|
|
8
8
|
import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/shadcn/empty.mjs";
|
|
9
9
|
import { Label } from "../vendor/shadcn/label.mjs";
|
|
@@ -17,6 +17,7 @@ import { SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, S
|
|
|
17
17
|
import { Table as Table$1, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "../vendor/shadcn/table.mjs";
|
|
18
18
|
import { Tabs as Tabs$1, TabsContent, TabsList, TabsTrigger } from "../vendor/shadcn/tabs.mjs";
|
|
19
19
|
import { Tooltip as Tooltip$1, TooltipContent, TooltipTrigger } from "../vendor/shadcn/tooltip.mjs";
|
|
20
|
+
import "./utils.mjs";
|
|
20
21
|
import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
|
|
21
22
|
import "./toast.mjs";
|
|
22
23
|
import { Input } from "../vendor/shadcn/input.mjs";
|
|
@@ -25,7 +26,8 @@ import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
|
25
26
|
import { Sidebar } from "./sidebar.mjs";
|
|
26
27
|
import { Breadcrumb } from "./breadcrumb.mjs";
|
|
27
28
|
import { Pagination } from "./pagination.mjs";
|
|
28
|
-
import {
|
|
29
|
+
import { 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";
|
|
30
|
+
import { Carousel, Image, ImageProps, Lightbox } from "./multimedia.mjs";
|
|
29
31
|
import { DatePicker, DateRange, DateRangePicker, TimePicker } from "./datetime-picker.mjs";
|
|
30
32
|
import { Form } from "../vendor/coss/form.mjs";
|
|
31
33
|
import { Badge } from "../vendor/shadcn/badge.mjs";
|
|
@@ -98,8 +100,6 @@ export declare const Drawer: typeof Drawer$1 & {
|
|
|
98
100
|
Footer: typeof DrawerFooter;
|
|
99
101
|
Title: typeof DrawerTitle;
|
|
100
102
|
Description: typeof DrawerDescription;
|
|
101
|
-
Handle: typeof DrawerPrimitive.Handle;
|
|
102
|
-
createHandle: typeof DrawerPrimitive.createHandle;
|
|
103
103
|
};
|
|
104
104
|
export declare const Dialog: typeof Dialog$1 & {
|
|
105
105
|
Root: typeof Dialog$1;
|
|
@@ -110,8 +110,6 @@ export declare const Dialog: typeof Dialog$1 & {
|
|
|
110
110
|
Footer: typeof DialogFooter;
|
|
111
111
|
Title: typeof DialogTitle;
|
|
112
112
|
Description: typeof DialogDescription;
|
|
113
|
-
Handle: typeof DialogPrimitive.Handle;
|
|
114
|
-
createHandle: typeof DialogPrimitive.createHandle;
|
|
115
113
|
};
|
|
116
114
|
export declare const Tooltip: typeof Tooltip$1 & {
|
|
117
115
|
Root: typeof Tooltip$1;
|
|
@@ -157,8 +155,6 @@ export declare const AlertDialog: typeof AlertDialog$1 & {
|
|
|
157
155
|
Footer: typeof AlertDialogFooter;
|
|
158
156
|
Title: typeof AlertDialogTitle;
|
|
159
157
|
Description: typeof AlertDialogDescription;
|
|
160
|
-
Handle: typeof AlertDialogPrimitive.Handle;
|
|
161
|
-
createHandle: typeof AlertDialogPrimitive.createHandle;
|
|
162
158
|
};
|
|
163
159
|
export declare const InputGroup: typeof InputGroup$1 & {
|
|
164
160
|
Root: typeof InputGroup$1;
|
|
@@ -167,8 +163,8 @@ export declare const InputGroup: typeof InputGroup$1 & {
|
|
|
167
163
|
Input: typeof InputGroupInput;
|
|
168
164
|
Textarea: typeof InputGroupTextarea;
|
|
169
165
|
};
|
|
170
|
-
export declare const Combobox: typeof
|
|
171
|
-
Root: typeof
|
|
166
|
+
export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
|
|
167
|
+
Root: typeof import("@base-ui/react").ComboboxRoot;
|
|
172
168
|
Content: typeof ComboboxContent;
|
|
173
169
|
Empty: typeof ComboboxEmpty;
|
|
174
170
|
List: typeof ComboboxList;
|
|
@@ -181,6 +177,5 @@ export declare const Combobox: typeof ComboboxPrimitive.Root & {
|
|
|
181
177
|
GroupLabel: typeof ComboboxLabel;
|
|
182
178
|
GroupCollection: typeof ComboboxCollection;
|
|
183
179
|
Item: typeof ComboboxItem;
|
|
184
|
-
createItems: typeof ComboboxPrimitive.createItems;
|
|
185
180
|
};
|
|
186
|
-
export { Badge, Breadcrumb, Button, Carousel, DatePicker, type DateRange, DateRangePicker,
|
|
181
|
+
export { type AlertDialogHandle, Badge, Breadcrumb, Button, Carousel, type ComboboxItemCollection, type ComboboxPrimitiveValue, type CreateComboboxItemsOptions, DatePicker, type DateRange, DateRangePicker, type DialogHandle, type DrawerHandle, Form, Image, ImageProps, Input, Label, Lightbox, type LightboxActions, type LightboxBackdrop, type LightboxCaptions, type LightboxChangeReason, type LightboxClose, type LightboxContent, type LightboxControl, type LightboxControlContext, type LightboxCounter, type LightboxDownload, type LightboxImageChangeEventDetails, type LightboxImageItem, type LightboxItem, type LightboxMore, type LightboxNext, type LightboxOpenEventDetails, type LightboxPrevious, type LightboxProps, type LightboxSlide, type LightboxSlides, type LightboxThumbnail, type LightboxThumbnails, type LightboxToolbar, type LightboxTrigger, type LightboxTriggerProps, type LightboxVideoItem, type LightboxViewport, type LightboxZoom, type LightboxZoomButton, Pagination, ScrollArea, Separator, Sidebar, Spinner, Switch, Textarea, TimePicker, Toaster as ToastProvider, createAlertDialogHandle, createComboboxItems, createDialogHandle, createDrawerHandle, toast, type useLightbox, useSidebar };
|
package/dist/widgets/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Spinner } from "../vendor/shadcn/spinner.mjs";
|
|
2
2
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
3
|
-
import { AlertDialog as AlertDialog$1, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader,
|
|
3
|
+
import { AlertDialog as AlertDialog$1, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, createAlertDialogHandle } from "../vendor/shadcn/alert-dialog.mjs";
|
|
4
4
|
import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../vendor/shadcn/card.mjs";
|
|
5
5
|
import { Input } from "../vendor/shadcn/input.mjs";
|
|
6
6
|
import { Textarea } from "../vendor/shadcn/textarea.mjs";
|
|
7
7
|
import { InputGroup as InputGroup$1, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea } from "../vendor/shadcn/input-group.mjs";
|
|
8
|
-
import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList,
|
|
9
|
-
import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader,
|
|
10
|
-
import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader,
|
|
8
|
+
import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxValue, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
|
|
9
|
+
import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
|
|
10
|
+
import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
|
|
11
11
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
|
|
12
12
|
import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/shadcn/empty.mjs";
|
|
13
13
|
import { Label } from "../vendor/shadcn/label.mjs";
|
|
@@ -22,29 +22,28 @@ import { Table as Table$1, TableBody, TableCell, TableFooter, TableHead, TableHe
|
|
|
22
22
|
import { Tabs as Tabs$1, TabsContent, TabsList, TabsTrigger } from "../vendor/shadcn/tabs.mjs";
|
|
23
23
|
import { Tooltip as Tooltip$1, TooltipContent, TooltipTrigger } from "../vendor/shadcn/tooltip.mjs";
|
|
24
24
|
import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
|
|
25
|
-
import "./toast.mjs";
|
|
26
25
|
import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
27
26
|
import { Sidebar } from "./sidebar.mjs";
|
|
28
27
|
import { Breadcrumb } from "./breadcrumb.mjs";
|
|
29
28
|
import { Pagination } from "./pagination.mjs";
|
|
30
|
-
import { Carousel,
|
|
29
|
+
import { Carousel, Image, Lightbox } from "./multimedia.mjs";
|
|
31
30
|
import { DatePicker, DateRangePicker, TimePicker } from "./datetime-picker.mjs";
|
|
32
31
|
import { Form } from "../vendor/coss/form.mjs";
|
|
33
32
|
import { Badge } from "../vendor/shadcn/badge.mjs";
|
|
34
33
|
import { Switch } from "../vendor/shadcn/switch.mjs";
|
|
35
34
|
import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
|
|
36
35
|
// src/widgets/index.ts
|
|
37
|
-
const Kbd = Object.assign(Kbd$1, {
|
|
36
|
+
const Kbd = /* @__PURE__ */ Object.assign(Kbd$1, {
|
|
38
37
|
Root: Kbd$1,
|
|
39
38
|
Group: KbdGroup
|
|
40
39
|
});
|
|
41
|
-
const Tabs = Object.assign(Tabs$1, {
|
|
40
|
+
const Tabs = /* @__PURE__ */ Object.assign(Tabs$1, {
|
|
42
41
|
Root: Tabs$1,
|
|
43
42
|
List: TabsList,
|
|
44
43
|
Trigger: TabsTrigger,
|
|
45
44
|
Content: TabsContent
|
|
46
45
|
});
|
|
47
|
-
const Card = Object.assign(Card$1, {
|
|
46
|
+
const Card = /* @__PURE__ */ Object.assign(Card$1, {
|
|
48
47
|
Root: Card$1,
|
|
49
48
|
Header: CardHeader,
|
|
50
49
|
Content: CardContent,
|
|
@@ -53,13 +52,13 @@ const Card = Object.assign(Card$1, {
|
|
|
53
52
|
Action: CardAction,
|
|
54
53
|
Description: CardDescription
|
|
55
54
|
});
|
|
56
|
-
const Field = Object.assign(Field$1, {
|
|
55
|
+
const Field = /* @__PURE__ */ Object.assign(Field$1, {
|
|
57
56
|
Root: Field$1,
|
|
58
57
|
Label: FieldLabel,
|
|
59
58
|
Description: FieldDescription,
|
|
60
59
|
Error: FieldError
|
|
61
60
|
});
|
|
62
|
-
const Empty = Object.assign(Empty$1, {
|
|
61
|
+
const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
|
|
63
62
|
Root: Empty$1,
|
|
64
63
|
Header: EmptyHeader,
|
|
65
64
|
Content: EmptyContent,
|
|
@@ -67,7 +66,7 @@ const Empty = Object.assign(Empty$1, {
|
|
|
67
66
|
Title: EmptyTitle,
|
|
68
67
|
Description: EmptyDescription
|
|
69
68
|
});
|
|
70
|
-
const Table = Object.assign(Table$1, {
|
|
69
|
+
const Table = /* @__PURE__ */ Object.assign(Table$1, {
|
|
71
70
|
Root: Table$1,
|
|
72
71
|
Header: TableHeader,
|
|
73
72
|
Body: TableBody,
|
|
@@ -76,11 +75,11 @@ const Table = Object.assign(Table$1, {
|
|
|
76
75
|
Head: TableHead,
|
|
77
76
|
Cell: TableCell
|
|
78
77
|
});
|
|
79
|
-
const Radio = Object.assign(RadioGroupItem, {
|
|
78
|
+
const Radio = /* @__PURE__ */ Object.assign(RadioGroupItem, {
|
|
80
79
|
Root: RadioGroupItem,
|
|
81
80
|
Group: RadioGroup
|
|
82
81
|
});
|
|
83
|
-
const Select = Object.assign(Select$1, {
|
|
82
|
+
const Select = /* @__PURE__ */ Object.assign(Select$1, {
|
|
84
83
|
Root: Select$1,
|
|
85
84
|
Trigger: SelectTrigger,
|
|
86
85
|
Value: SelectValue,
|
|
@@ -90,7 +89,7 @@ const Select = Object.assign(Select$1, {
|
|
|
90
89
|
Label: SelectLabel,
|
|
91
90
|
Item: SelectItem
|
|
92
91
|
});
|
|
93
|
-
const Drawer = Object.assign(Drawer$1, {
|
|
92
|
+
const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
|
|
94
93
|
Root: Drawer$1,
|
|
95
94
|
Trigger: DrawerTrigger,
|
|
96
95
|
Close: DrawerClose,
|
|
@@ -98,11 +97,9 @@ const Drawer = Object.assign(Drawer$1, {
|
|
|
98
97
|
Header: DrawerHeader,
|
|
99
98
|
Footer: DrawerFooter,
|
|
100
99
|
Title: DrawerTitle,
|
|
101
|
-
Description: DrawerDescription
|
|
102
|
-
Handle: DrawerPrimitive.Handle,
|
|
103
|
-
createHandle: DrawerPrimitive.createHandle
|
|
100
|
+
Description: DrawerDescription
|
|
104
101
|
});
|
|
105
|
-
const Dialog = Object.assign(Dialog$1, {
|
|
102
|
+
const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
|
|
106
103
|
Root: Dialog$1,
|
|
107
104
|
Trigger: DialogTrigger,
|
|
108
105
|
Close: DialogClose,
|
|
@@ -110,23 +107,21 @@ const Dialog = Object.assign(Dialog$1, {
|
|
|
110
107
|
Header: DialogHeader,
|
|
111
108
|
Footer: DialogFooter,
|
|
112
109
|
Title: DialogTitle,
|
|
113
|
-
Description: DialogDescription
|
|
114
|
-
Handle: DialogPrimitive.Handle,
|
|
115
|
-
createHandle: DialogPrimitive.createHandle
|
|
110
|
+
Description: DialogDescription
|
|
116
111
|
});
|
|
117
|
-
const Tooltip = Object.assign(Tooltip$1, {
|
|
112
|
+
const Tooltip = /* @__PURE__ */ Object.assign(Tooltip$1, {
|
|
118
113
|
Root: Tooltip$1,
|
|
119
114
|
Trigger: TooltipTrigger,
|
|
120
115
|
Content: TooltipContent
|
|
121
116
|
});
|
|
122
|
-
const Popover = Object.assign(Popover$1, {
|
|
117
|
+
const Popover = /* @__PURE__ */ Object.assign(Popover$1, {
|
|
123
118
|
Root: Popover$1,
|
|
124
119
|
Trigger: PopoverTrigger,
|
|
125
120
|
Content: PopoverContent,
|
|
126
121
|
Title: PopoverTitle,
|
|
127
122
|
Description: PopoverDescription
|
|
128
123
|
});
|
|
129
|
-
const Dropdown = Object.assign(DropdownMenu, {
|
|
124
|
+
const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
|
|
130
125
|
Root: DropdownMenu,
|
|
131
126
|
Trigger: DropdownMenuTrigger,
|
|
132
127
|
Content: DropdownMenuContent,
|
|
@@ -142,14 +137,14 @@ const Dropdown = Object.assign(DropdownMenu, {
|
|
|
142
137
|
RadioGroup: DropdownMenuRadioGroup,
|
|
143
138
|
CheckboxItem: DropdownMenuCheckboxItem
|
|
144
139
|
});
|
|
145
|
-
const Progress = Object.assign(Progress$1, {
|
|
140
|
+
const Progress = /* @__PURE__ */ Object.assign(Progress$1, {
|
|
146
141
|
Root: Progress$1,
|
|
147
142
|
Label: ProgressLabel,
|
|
148
143
|
Value: ProgressValue,
|
|
149
144
|
Track: ProgressTrack,
|
|
150
145
|
Indicator: ProgressIndicator
|
|
151
146
|
});
|
|
152
|
-
const AlertDialog = Object.assign(AlertDialog$1, {
|
|
147
|
+
const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
|
|
153
148
|
Root: AlertDialog$1,
|
|
154
149
|
Trigger: AlertDialogTrigger,
|
|
155
150
|
Close: AlertDialogCancel,
|
|
@@ -157,18 +152,16 @@ const AlertDialog = Object.assign(AlertDialog$1, {
|
|
|
157
152
|
Header: AlertDialogHeader,
|
|
158
153
|
Footer: AlertDialogFooter,
|
|
159
154
|
Title: AlertDialogTitle,
|
|
160
|
-
Description: AlertDialogDescription
|
|
161
|
-
Handle: AlertDialogPrimitive.Handle,
|
|
162
|
-
createHandle: AlertDialogPrimitive.createHandle
|
|
155
|
+
Description: AlertDialogDescription
|
|
163
156
|
});
|
|
164
|
-
const InputGroup = Object.assign(InputGroup$1, {
|
|
157
|
+
const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
|
|
165
158
|
Root: InputGroup$1,
|
|
166
159
|
Addon: InputGroupAddon,
|
|
167
160
|
AddonText: InputGroupText,
|
|
168
161
|
Input: InputGroupInput,
|
|
169
162
|
Textarea: InputGroupTextarea
|
|
170
163
|
});
|
|
171
|
-
const Combobox = Object.assign(Combobox$1, {
|
|
164
|
+
const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
|
|
172
165
|
Root: Combobox$1,
|
|
173
166
|
Content: ComboboxContent,
|
|
174
167
|
Empty: ComboboxEmpty,
|
|
@@ -181,7 +174,6 @@ const Combobox = Object.assign(Combobox$1, {
|
|
|
181
174
|
Group: ComboboxGroup,
|
|
182
175
|
GroupLabel: ComboboxLabel,
|
|
183
176
|
GroupCollection: ComboboxCollection,
|
|
184
|
-
Item: ComboboxItem
|
|
185
|
-
createItems: ComboboxPrimitive.createItems
|
|
177
|
+
Item: ComboboxItem
|
|
186
178
|
});
|
|
187
|
-
export { AlertDialog, Badge, Breadcrumb, Button, Card, Carousel, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Empty,
|
|
179
|
+
export { AlertDialog, Badge, Breadcrumb, Button, Card, Carousel, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Empty, Field, Form, Image, Input, InputGroup, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, createAlertDialogHandle, createComboboxItems, createDialogHandle, createDrawerHandle, toast, useSidebar };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../vendor/shadcn/carousel.mjs";
|
|
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
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
export declare const Lightbox: typeof Lightbox$1 & {
|
|
5
|
+
Root: typeof Lightbox$1;
|
|
6
|
+
Trigger: typeof LightboxTrigger;
|
|
7
|
+
Content: typeof LightboxContent;
|
|
8
|
+
};
|
|
9
|
+
export declare const Carousel: typeof Carousel$1 & {
|
|
10
|
+
Root: typeof Carousel$1;
|
|
11
|
+
Content: typeof CarouselContent;
|
|
12
|
+
Previous: typeof CarouselPrevious;
|
|
13
|
+
Next: typeof CarouselNext;
|
|
14
|
+
Item: typeof CarouselItem;
|
|
15
|
+
};
|
|
16
|
+
export type ImageProps = ComponentProps<"img"> & {
|
|
17
|
+
fallback?: ReactNode;
|
|
18
|
+
placeholder?: ReactNode;
|
|
19
|
+
wrapperClassName?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function Image(props: ImageProps): import("react").JSX.Element;
|
|
22
|
+
export type { 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 };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../vendor/shadcn/carousel.mjs";
|
|
2
|
+
import { Lightbox as Lightbox$1, LightboxContent, LightboxTrigger } from "../vendor/tailored/lightbox.mjs";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
// src/widgets/multimedia.tsx
|
|
7
|
+
const Lightbox = /* @__PURE__ */ Object.assign(Lightbox$1, {
|
|
8
|
+
Root: Lightbox$1,
|
|
9
|
+
Trigger: LightboxTrigger,
|
|
10
|
+
Content: LightboxContent
|
|
11
|
+
});
|
|
12
|
+
const Carousel = /* @__PURE__ */ Object.assign(Carousel$1, {
|
|
13
|
+
Root: Carousel$1,
|
|
14
|
+
Content: CarouselContent,
|
|
15
|
+
Previous: CarouselPrevious,
|
|
16
|
+
Next: CarouselNext,
|
|
17
|
+
Item: CarouselItem
|
|
18
|
+
});
|
|
19
|
+
function ImageContent({ src, srcSet, sizes, ref, onLoad, onError, className, placeholder, fallback, wrapperClassName, ...props }) {
|
|
20
|
+
const imageRef = useRef(null);
|
|
21
|
+
const [status, setStatus] = useState(src || srcSet ? "loading" : "idle");
|
|
22
|
+
useImperativeHandle(ref, () => imageRef.current, [imageRef]);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const image = imageRef.current;
|
|
25
|
+
if (!image || !src && !srcSet || !image.complete) return;
|
|
26
|
+
setStatus(image.naturalWidth > 0 ? "loaded" : "error");
|
|
27
|
+
}, [
|
|
28
|
+
src,
|
|
29
|
+
srcSet,
|
|
30
|
+
sizes
|
|
31
|
+
]);
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: cn("relative", wrapperClassName),
|
|
34
|
+
"data-state": status,
|
|
35
|
+
"aria-busy": status === "loading",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("img", {
|
|
38
|
+
...props,
|
|
39
|
+
ref: imageRef,
|
|
40
|
+
src,
|
|
41
|
+
srcSet,
|
|
42
|
+
sizes,
|
|
43
|
+
"data-state": status,
|
|
44
|
+
onLoad: (event) => {
|
|
45
|
+
setStatus("loaded");
|
|
46
|
+
onLoad?.(event);
|
|
47
|
+
},
|
|
48
|
+
onError: (event) => {
|
|
49
|
+
setStatus("error");
|
|
50
|
+
onError?.(event);
|
|
51
|
+
},
|
|
52
|
+
className: cn("block", status === "error" && fallback != null && "invisible", className)
|
|
53
|
+
}),
|
|
54
|
+
status === "loading" && placeholder != null && /* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: "absolute inset-0 grid place-items-center",
|
|
56
|
+
children: placeholder
|
|
57
|
+
}),
|
|
58
|
+
status === "error" && fallback != null && /* @__PURE__ */ jsx("div", {
|
|
59
|
+
role: "status",
|
|
60
|
+
className: "absolute inset-0 grid place-items-center",
|
|
61
|
+
children: fallback
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function Image(props) {
|
|
67
|
+
return /* @__PURE__ */ jsx(ImageContent, { ...props }, JSON.stringify([props.src, props.srcSet]));
|
|
68
|
+
}
|
|
69
|
+
export { Carousel, Image, Lightbox };
|
|
@@ -1,6 +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
|
-
const Pagination = Object.assign(Pagination$1, {
|
|
3
|
+
const Pagination = /* @__PURE__ */ Object.assign(Pagination$1, {
|
|
4
4
|
Root: Pagination$1,
|
|
5
5
|
Content: PaginationContent,
|
|
6
6
|
Item: PaginationItem,
|
package/dist/widgets/sidebar.mjs
CHANGED
|
@@ -1,6 +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
|
-
const Sidebar = Object.assign(Sidebar$1, {
|
|
3
|
+
const Sidebar = /* @__PURE__ */ Object.assign(Sidebar$1, {
|
|
4
4
|
Provider: SidebarProvider,
|
|
5
5
|
Root: Sidebar$1,
|
|
6
6
|
Inset: SidebarInset,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AlertDialogHandle, createAlertDialogHandle } from "../vendor/shadcn/alert-dialog.mjs";
|
|
2
|
+
import { ComboboxItemCollection, ComboboxPrimitiveValue, CreateComboboxItemsOptions, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
|
|
3
|
+
import { DialogHandle, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
|
|
4
|
+
import { DrawerHandle, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
|
|
5
|
+
export { type AlertDialogHandle, type ComboboxItemCollection, type ComboboxPrimitiveValue, type CreateComboboxItemsOptions, type DialogHandle, type DrawerHandle, createAlertDialogHandle, createComboboxItems, createDialogHandle, createDrawerHandle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftui/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/KiriRainCat/deftui.git",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"type": "module",
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
13
16
|
"types": "./dist/index.d.mts",
|
|
14
17
|
"exports": {
|
|
15
18
|
".": {
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
"date-fns": "^4.4.0",
|
|
39
42
|
"embla-carousel-react": "^8.6.0",
|
|
40
43
|
"lucide-react": "^1.62.0",
|
|
44
|
+
"motion": "^14.7.1",
|
|
41
45
|
"radashi": "^12.9.7",
|
|
42
46
|
"tw-animate-css": "^1.4.0"
|
|
43
47
|
},
|
package/dist/vendor.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/* Temporary landing spot for CSS added by the shadcn CLI; move it to the proper location afterward. */
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../vendor/shadcn/carousel.mjs";
|
|
2
|
-
declare function CarouselAST(props: React.ComponentProps<typeof CarouselContent>): import("react").JSX.Element;
|
|
3
|
-
export declare const Carousel: typeof Carousel$1 & {
|
|
4
|
-
AST: typeof CarouselAST;
|
|
5
|
-
Root: typeof Carousel$1;
|
|
6
|
-
Content: typeof CarouselContent;
|
|
7
|
-
Previous: typeof CarouselPrevious;
|
|
8
|
-
Next: typeof CarouselNext;
|
|
9
|
-
Item: typeof CarouselItem;
|
|
10
|
-
};
|
|
11
|
-
export declare function FadeImage(props: React.ImgHTMLAttributes<HTMLImageElement>): import("react").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../vendor/shadcn/carousel.mjs";
|
|
2
|
-
import { cn } from "cn";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
// src/widgets/image-display.tsx
|
|
6
|
-
function CarouselAST(props) {
|
|
7
|
-
return /* @__PURE__ */ jsxs(Carousel, { children: [
|
|
8
|
-
/* @__PURE__ */ jsx(Carousel.Content, { ...props }),
|
|
9
|
-
/* @__PURE__ */ jsx(Carousel.Previous, {}),
|
|
10
|
-
/* @__PURE__ */ jsx(Carousel.Next, {})
|
|
11
|
-
] });
|
|
12
|
-
}
|
|
13
|
-
const Carousel = Object.assign(Carousel$1, {
|
|
14
|
-
AST: CarouselAST,
|
|
15
|
-
Root: Carousel$1,
|
|
16
|
-
Content: CarouselContent,
|
|
17
|
-
Previous: CarouselPrevious,
|
|
18
|
-
Next: CarouselNext,
|
|
19
|
-
Item: CarouselItem
|
|
20
|
-
});
|
|
21
|
-
function FadeImage(props) {
|
|
22
|
-
const [loaded, setLoaded] = useState(false);
|
|
23
|
-
return /* @__PURE__ */ jsx("img", {
|
|
24
|
-
...props,
|
|
25
|
-
onLoad: (event) => (setLoaded(true), props.onLoad?.(event)),
|
|
26
|
-
className: cn("object-cover transition-opacity duration-300", loaded ? "opacity-100" : "opacity-0", props.className)
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
export { Carousel, FadeImage };
|
package/dist/widgets/toast.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Toaster as ToastProvider, toast } from "../vendor/shadcn/toast.mjs";
|