@yimingliao/cms 0.0.129 → 0.0.131
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/export/client/index.js +2 -1
- package/dist/export/server/index.js +0 -6
- package/dist/export/server/r2/index.js +0 -19
- package/dist/export/server/sftp/index.js +0 -18
- package/dist/src/client/infrastructure/contexts/admin.js +5 -4
- package/dist/src/client/infrastructure/contexts/theme.js +5 -5
- package/dist/src/client/infrastructure/toast/error-display.js +15 -3
- package/dist/src/client/interfaces/components/shadcn/avatar.js +5 -4
- package/dist/src/client/interfaces/components/shadcn/button.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/card.js +9 -8
- package/dist/src/client/interfaces/components/shadcn/collapsible.js +4 -3
- package/dist/src/client/interfaces/components/shadcn/dropdown-menu.js +36 -29
- package/dist/src/client/interfaces/components/shadcn/input-group.js +8 -7
- package/dist/src/client/interfaces/components/shadcn/input.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/label.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/pagination.js +21 -18
- package/dist/src/client/interfaces/components/shadcn/select.js +47 -40
- package/dist/src/client/interfaces/components/shadcn/separator.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/sheet.js +36 -27
- package/dist/src/client/interfaces/components/shadcn/sidebar.js +120 -105
- package/dist/src/client/interfaces/components/shadcn/skeleton.js +2 -1
- package/dist/src/client/interfaces/components/shadcn/spinner.js +2 -1
- package/dist/src/client/interfaces/components/shadcn/textarea.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/tooltip.js +13 -10
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js +35 -23
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js +20 -14
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/pagination.js +35 -26
- package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header-title.js +10 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header.js +21 -15
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch-create.js +2 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch.js +19 -14
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/create.js +2 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/edit.js +2 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/index.js +34 -29
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/show.js +43 -37
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/trash.js +24 -18
- package/dist/src/client/interfaces/components/ui/buttons/button.js +8 -4
- package/dist/src/client/interfaces/components/ui/buttons/return-button.js +5 -4
- package/dist/src/client/interfaces/components/ui/features/expandable-list/expand-bar.js +9 -6
- package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list-content.js +14 -8
- package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list.js +22 -17
- package/dist/src/client/interfaces/components/ui/form/containers/fields-container.js +5 -4
- package/dist/src/client/interfaces/components/ui/form/containers/main-fields.js +5 -4
- package/dist/src/client/interfaces/components/ui/form/containers/side-fields.js +5 -4
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-display.js +80 -57
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-input.js +114 -91
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields.js +4 -3
- package/dist/src/client/interfaces/components/ui/form/field-body.js +31 -28
- package/dist/src/client/interfaces/components/ui/form/field.js +12 -1
- package/dist/src/client/interfaces/components/ui/form/form.js +2 -1
- package/dist/src/client/interfaces/components/ui/form/index-field.js +49 -42
- package/dist/src/client/interfaces/components/ui/form/slug-field.js +45 -38
- package/dist/src/client/interfaces/components/ui/inputs/array-input.js +63 -52
- package/dist/src/client/interfaces/components/ui/inputs/checkbox.js +41 -38
- package/dist/src/client/interfaces/components/ui/inputs/input.js +20 -17
- package/dist/src/client/interfaces/components/ui/inputs/password-input.js +6 -5
- package/dist/src/client/interfaces/components/ui/inputs/search-input.js +6 -5
- package/dist/src/client/interfaces/components/ui/inputs/select.js +19 -13
- package/dist/src/client/interfaces/components/ui/inputs/textarea.js +3 -2
- package/dist/src/client/interfaces/components/ui/layouts/content-container.js +5 -4
- package/dist/src/client/interfaces/components/ui/layouts/layout-skeleton.js +20 -7
- package/dist/src/client/interfaces/components/ui/layouts/navbar/i18n-selector.js +8 -1
- package/dist/src/client/interfaces/components/ui/layouts/navbar/nav-user.js +60 -34
- package/dist/src/client/interfaces/components/ui/layouts/navbar/navbar.js +39 -26
- package/dist/src/client/interfaces/components/ui/layouts/navbar/sign-out-button.js +6 -2
- package/dist/src/client/interfaces/components/ui/layouts/navbar/theme-selector.js +22 -1
- package/dist/src/client/interfaces/components/ui/layouts/sidebar/nav-main.js +43 -27
- package/dist/src/client/interfaces/pages/auth/change-password.js +81 -70
- package/dist/src/client/interfaces/pages/auth/email-unverified.js +39 -21
- package/dist/src/client/interfaces/pages/auth/forgot-password.js +41 -26
- package/dist/src/client/interfaces/pages/auth/reset-password.js +60 -51
- package/dist/src/client/interfaces/pages/auth/sign-in.js +46 -37
- package/dist/src/client/interfaces/pages/auth/verify-email.js +2 -1
- package/dist/types/export/server/r2/index.d.ts +1 -1
- package/dist/types/export/server/r2/index.d.ts.map +1 -1
- package/dist/types/export/server/sftp/index.d.ts +1 -1
- package/dist/types/export/server/sftp/index.d.ts.map +1 -1
- package/dist/types/src/server/index.d.ts +1 -1
- package/dist/types/src/server/index.d.ts.map +1 -1
- package/dist/types/src/server/infrastructure/index.d.ts +1 -1
- package/dist/types/src/server/infrastructure/index.d.ts.map +1 -1
- package/dist/types/src/server/infrastructure/storage/index.d.ts +0 -2
- package/dist/types/src/server/infrastructure/storage/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon } from 'lucide-react';
|
|
2
|
-
import
|
|
3
|
+
import 'react';
|
|
3
4
|
import 'ua-parser-js';
|
|
4
5
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
5
6
|
import 'next/navigation';
|
|
6
7
|
import { Button, buttonVariants } from './button.js';
|
|
7
8
|
|
|
8
9
|
function Pagination({ className, ...props }) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
10
11
|
"nav",
|
|
11
12
|
{
|
|
12
13
|
role: "navigation",
|
|
@@ -21,7 +22,7 @@ function PaginationContent({
|
|
|
21
22
|
className,
|
|
22
23
|
...props
|
|
23
24
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
25
26
|
"ul",
|
|
26
27
|
{
|
|
27
28
|
"data-slot": "pagination-content",
|
|
@@ -31,7 +32,7 @@ function PaginationContent({
|
|
|
31
32
|
);
|
|
32
33
|
}
|
|
33
34
|
function PaginationItem({ ...props }) {
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
|
|
35
36
|
}
|
|
36
37
|
function PaginationLink({
|
|
37
38
|
className,
|
|
@@ -39,7 +40,7 @@ function PaginationLink({
|
|
|
39
40
|
size = "icon",
|
|
40
41
|
...props
|
|
41
42
|
}) {
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
43
44
|
Button,
|
|
44
45
|
{
|
|
45
46
|
variant: "ghost",
|
|
@@ -61,46 +62,48 @@ function PaginationPrevious({
|
|
|
61
62
|
className,
|
|
62
63
|
...props
|
|
63
64
|
}) {
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
65
66
|
PaginationLink,
|
|
66
67
|
{
|
|
67
68
|
"aria-label": "Go to previous page",
|
|
68
69
|
size: "default",
|
|
69
70
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
70
|
-
...props
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
...props,
|
|
72
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
73
|
+
}
|
|
73
74
|
);
|
|
74
75
|
}
|
|
75
76
|
function PaginationNext({
|
|
76
77
|
className,
|
|
77
78
|
...props
|
|
78
79
|
}) {
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
80
81
|
PaginationLink,
|
|
81
82
|
{
|
|
82
83
|
"aria-label": "Go to next page",
|
|
83
84
|
size: "default",
|
|
84
85
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
85
|
-
...props
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
...props,
|
|
87
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
88
|
+
}
|
|
88
89
|
);
|
|
89
90
|
}
|
|
90
91
|
function PaginationEllipsis({
|
|
91
92
|
className,
|
|
92
93
|
...props
|
|
93
94
|
}) {
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ jsxs(
|
|
95
96
|
"span",
|
|
96
97
|
{
|
|
97
98
|
"aria-hidden": true,
|
|
98
99
|
"data-slot": "pagination-ellipsis",
|
|
99
100
|
className: cn("flex size-9 items-center justify-center", className),
|
|
100
|
-
...props
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
...props,
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
|
|
104
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
104
107
|
);
|
|
105
108
|
}
|
|
106
109
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
4
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
|
-
import
|
|
5
|
+
import 'react';
|
|
5
6
|
import 'ua-parser-js';
|
|
6
7
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
7
8
|
import 'next/navigation';
|
|
@@ -9,17 +10,17 @@ import 'next/navigation';
|
|
|
9
10
|
function Select({
|
|
10
11
|
...props
|
|
11
12
|
}) {
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
13
14
|
}
|
|
14
15
|
function SelectGroup({
|
|
15
16
|
...props
|
|
16
17
|
}) {
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
18
19
|
}
|
|
19
20
|
function SelectValue({
|
|
20
21
|
...props
|
|
21
22
|
}) {
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
23
24
|
}
|
|
24
25
|
function SelectTrigger({
|
|
25
26
|
className,
|
|
@@ -27,7 +28,7 @@ function SelectTrigger({
|
|
|
27
28
|
children,
|
|
28
29
|
...props
|
|
29
30
|
}) {
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsxs(
|
|
31
32
|
SelectPrimitive.Trigger,
|
|
32
33
|
{
|
|
33
34
|
"data-slot": "select-trigger",
|
|
@@ -36,10 +37,12 @@ function SelectTrigger({
|
|
|
36
37
|
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
37
38
|
className
|
|
38
39
|
),
|
|
39
|
-
...props
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
...props,
|
|
41
|
+
children: [
|
|
42
|
+
children,
|
|
43
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
43
46
|
);
|
|
44
47
|
}
|
|
45
48
|
function SelectContent({
|
|
@@ -49,7 +52,7 @@ function SelectContent({
|
|
|
49
52
|
align = "center",
|
|
50
53
|
...props
|
|
51
54
|
}) {
|
|
52
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
53
56
|
SelectPrimitive.Content,
|
|
54
57
|
{
|
|
55
58
|
"data-slot": "select-content",
|
|
@@ -60,27 +63,29 @@ function SelectContent({
|
|
|
60
63
|
),
|
|
61
64
|
position,
|
|
62
65
|
align,
|
|
63
|
-
...props
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
...props,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
SelectPrimitive.Viewport,
|
|
71
|
+
{
|
|
72
|
+
className: cn(
|
|
73
|
+
"p-1",
|
|
74
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
75
|
+
),
|
|
76
|
+
children
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
) });
|
|
78
83
|
}
|
|
79
84
|
function SelectLabel({
|
|
80
85
|
className,
|
|
81
86
|
...props
|
|
82
87
|
}) {
|
|
83
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
84
89
|
SelectPrimitive.Label,
|
|
85
90
|
{
|
|
86
91
|
"data-slot": "select-label",
|
|
@@ -94,7 +99,7 @@ function SelectItem({
|
|
|
94
99
|
children,
|
|
95
100
|
...props
|
|
96
101
|
}) {
|
|
97
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ jsxs(
|
|
98
103
|
SelectPrimitive.Item,
|
|
99
104
|
{
|
|
100
105
|
"data-slot": "select-item",
|
|
@@ -102,17 +107,19 @@ function SelectItem({
|
|
|
102
107
|
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
103
108
|
className
|
|
104
109
|
),
|
|
105
|
-
...props
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
...props,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
113
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
109
116
|
);
|
|
110
117
|
}
|
|
111
118
|
function SelectSeparator({
|
|
112
119
|
className,
|
|
113
120
|
...props
|
|
114
121
|
}) {
|
|
115
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
116
123
|
SelectPrimitive.Separator,
|
|
117
124
|
{
|
|
118
125
|
"data-slot": "select-separator",
|
|
@@ -125,7 +132,7 @@ function SelectScrollUpButton({
|
|
|
125
132
|
className,
|
|
126
133
|
...props
|
|
127
134
|
}) {
|
|
128
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
129
136
|
SelectPrimitive.ScrollUpButton,
|
|
130
137
|
{
|
|
131
138
|
"data-slot": "select-scroll-up-button",
|
|
@@ -133,16 +140,16 @@ function SelectScrollUpButton({
|
|
|
133
140
|
"flex cursor-default items-center justify-center py-1",
|
|
134
141
|
className
|
|
135
142
|
),
|
|
136
|
-
...props
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
...props,
|
|
144
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
145
|
+
}
|
|
139
146
|
);
|
|
140
147
|
}
|
|
141
148
|
function SelectScrollDownButton({
|
|
142
149
|
className,
|
|
143
150
|
...props
|
|
144
151
|
}) {
|
|
145
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ jsx(
|
|
146
153
|
SelectPrimitive.ScrollDownButton,
|
|
147
154
|
{
|
|
148
155
|
"data-slot": "select-scroll-down-button",
|
|
@@ -150,9 +157,9 @@ function SelectScrollDownButton({
|
|
|
150
157
|
"flex cursor-default items-center justify-center py-1",
|
|
151
158
|
className
|
|
152
159
|
),
|
|
153
|
-
...props
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
...props,
|
|
161
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
162
|
+
}
|
|
156
163
|
);
|
|
157
164
|
}
|
|
158
165
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
3
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
-
import
|
|
4
|
+
import 'react';
|
|
4
5
|
import 'ua-parser-js';
|
|
5
6
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
6
7
|
import 'next/navigation';
|
|
@@ -11,7 +12,7 @@ function Separator({
|
|
|
11
12
|
decorative = true,
|
|
12
13
|
...props
|
|
13
14
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
15
16
|
SeparatorPrimitive.Root,
|
|
16
17
|
{
|
|
17
18
|
"data-slot": "separator",
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
3
4
|
import { XIcon } from 'lucide-react';
|
|
4
|
-
import
|
|
5
|
+
import 'react';
|
|
5
6
|
import 'ua-parser-js';
|
|
6
7
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
7
8
|
import 'next/navigation';
|
|
8
9
|
|
|
9
10
|
function Sheet({ ...props }) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
11
12
|
}
|
|
12
13
|
function SheetTrigger({
|
|
13
14
|
...props
|
|
14
15
|
}) {
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
16
17
|
}
|
|
17
18
|
function SheetClose({
|
|
18
19
|
...props
|
|
19
20
|
}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
21
22
|
}
|
|
22
23
|
function SheetPortal({
|
|
23
24
|
...props
|
|
24
25
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
26
27
|
}
|
|
27
28
|
function SheetOverlay({
|
|
28
29
|
className,
|
|
29
30
|
...props
|
|
30
31
|
}) {
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
32
33
|
SheetPrimitive.Overlay,
|
|
33
34
|
{
|
|
34
35
|
"data-slot": "sheet-overlay",
|
|
@@ -46,26 +47,34 @@ function SheetContent({
|
|
|
46
47
|
side = "right",
|
|
47
48
|
...props
|
|
48
49
|
}) {
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
52
|
+
/* @__PURE__ */ jsxs(
|
|
53
|
+
SheetPrimitive.Content,
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "sheet-content",
|
|
56
|
+
className: cn(
|
|
57
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
58
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
59
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
60
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
61
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props,
|
|
65
|
+
children: [
|
|
66
|
+
children,
|
|
67
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
|
|
69
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
70
|
+
] })
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
66
75
|
}
|
|
67
76
|
function SheetHeader({ className, ...props }) {
|
|
68
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
69
78
|
"div",
|
|
70
79
|
{
|
|
71
80
|
"data-slot": "sheet-header",
|
|
@@ -75,7 +84,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
75
84
|
);
|
|
76
85
|
}
|
|
77
86
|
function SheetFooter({ className, ...props }) {
|
|
78
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
79
88
|
"div",
|
|
80
89
|
{
|
|
81
90
|
"data-slot": "sheet-footer",
|
|
@@ -88,7 +97,7 @@ function SheetTitle({
|
|
|
88
97
|
className,
|
|
89
98
|
...props
|
|
90
99
|
}) {
|
|
91
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ jsx(
|
|
92
101
|
SheetPrimitive.Title,
|
|
93
102
|
{
|
|
94
103
|
"data-slot": "sheet-title",
|
|
@@ -101,7 +110,7 @@ function SheetDescription({
|
|
|
101
110
|
className,
|
|
102
111
|
...props
|
|
103
112
|
}) {
|
|
104
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
105
114
|
SheetPrimitive.Description,
|
|
106
115
|
{
|
|
107
116
|
"data-slot": "sheet-description",
|